Spaces:
No application file
No application file
Shamik Das commited on
Upload 5 files
Browse files- .gitignore +36 -0
- index.html +711 -0
- package-lock.json +911 -0
- package.json +15 -0
- server.js +40 -0
.gitignore
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Dependencies
|
| 2 |
+
node_modules/
|
| 3 |
+
|
| 4 |
+
# Env secrets
|
| 5 |
+
.env
|
| 6 |
+
.env.*
|
| 7 |
+
!.env.example
|
| 8 |
+
|
| 9 |
+
# Logs
|
| 10 |
+
logs/
|
| 11 |
+
*.log
|
| 12 |
+
npm-debug.log*
|
| 13 |
+
yarn-debug.log*
|
| 14 |
+
yarn-error.log*
|
| 15 |
+
pnpm-debug.log*
|
| 16 |
+
|
| 17 |
+
# Builds and caches
|
| 18 |
+
dist/
|
| 19 |
+
build/
|
| 20 |
+
out/
|
| 21 |
+
.cache/
|
| 22 |
+
.parcel-cache/
|
| 23 |
+
.tmp/
|
| 24 |
+
.temp/
|
| 25 |
+
coverage/
|
| 26 |
+
|
| 27 |
+
# Editors/OS
|
| 28 |
+
.vscode/
|
| 29 |
+
.idea/
|
| 30 |
+
.DS_Store
|
| 31 |
+
Thumbs.db
|
| 32 |
+
desktop.ini
|
| 33 |
+
|
| 34 |
+
# Hosting configs
|
| 35 |
+
.netlify/
|
| 36 |
+
.vercel/
|
index.html
ADDED
|
@@ -0,0 +1,711 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Climora - Weather App</title>
|
| 7 |
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script>
|
| 10 |
+
tailwind.config = {
|
| 11 |
+
darkMode: 'class',
|
| 12 |
+
theme: {
|
| 13 |
+
extend: {
|
| 14 |
+
animation: {
|
| 15 |
+
'pulse-slow': 'pulse 3s ease-in-out infinite',
|
| 16 |
+
'float': 'float 6s ease-in-out infinite',
|
| 17 |
+
'bounce-slow': 'bounce 3s infinite',
|
| 18 |
+
'fade-in': 'fadeIn 0.5s ease-in-out',
|
| 19 |
+
'slide-up': 'slideUp 0.7s ease-out',
|
| 20 |
+
'slide-down': 'slideDown 0.7s ease-out',
|
| 21 |
+
'spin-slow': 'spin 3s linear infinite' // added to fix animate-spin-slow
|
| 22 |
+
},
|
| 23 |
+
keyframes: {
|
| 24 |
+
float: {
|
| 25 |
+
'0%, 100%': { transform: 'translateY(0)' },
|
| 26 |
+
'50%': { transform: 'translateY(-10px)' }
|
| 27 |
+
},
|
| 28 |
+
fadeIn: {
|
| 29 |
+
'0%': { opacity: '0' },
|
| 30 |
+
'100%': { opacity: '1' }
|
| 31 |
+
},
|
| 32 |
+
slideUp: {
|
| 33 |
+
'0%': { transform: 'translateY(20px)', opacity: '0' },
|
| 34 |
+
'100%': { transform: 'translateY(0)', opacity: '1' }
|
| 35 |
+
},
|
| 36 |
+
slideDown: {
|
| 37 |
+
'0%': { transform: 'translateY(-20px)', opacity: '0' },
|
| 38 |
+
'100%': { transform: 'translateY(0)', opacity: '1' }
|
| 39 |
+
}
|
| 40 |
+
},
|
| 41 |
+
backdropBlur: {
|
| 42 |
+
xs: '2px',
|
| 43 |
+
}
|
| 44 |
+
}
|
| 45 |
+
}
|
| 46 |
+
}
|
| 47 |
+
</script>
|
| 48 |
+
<style type="text/tailwindcss">
|
| 49 |
+
@layer utilities {
|
| 50 |
+
.glass {
|
| 51 |
+
background-color: rgba(255, 255, 255, 0.2);
|
| 52 |
+
backdrop-filter: blur(4px);
|
| 53 |
+
border: 1px solid rgba(255, 255, 255, 0.3);
|
| 54 |
+
}
|
| 55 |
+
.text-shadow { text-shadow: 0 2px 4px rgba(0,0,0,0.1); }
|
| 56 |
+
/* Animated gradient background */
|
| 57 |
+
@keyframes gradientMove {
|
| 58 |
+
0% { background-position: 0% 50%; }
|
| 59 |
+
50% { background-position: 100% 50%; }
|
| 60 |
+
100% { background-position: 0% 50%; }
|
| 61 |
+
}
|
| 62 |
+
.bg-animated { background-size: 300% 300%; animation: gradientMove 18s ease infinite; }
|
| 63 |
+
.dark .glass { background-color: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); }
|
| 64 |
+
|
| 65 |
+
/* Text visibility and swap animations */
|
| 66 |
+
.text-glow { text-shadow: 0 2px 10px rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.2); }
|
| 67 |
+
@keyframes textOut { to { opacity: 0; transform: translateY(-6px); } }
|
| 68 |
+
@keyframes textIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
|
| 69 |
+
.swap-out { animation: textOut 180ms ease forwards; will-change: transform, opacity; }
|
| 70 |
+
.swap-in { animation: textIn 220ms ease forwards; will-change: transform, opacity; }
|
| 71 |
+
@keyframes pop { 0% { transform: scale(0.9); opacity: .7; } 60% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
|
| 72 |
+
.pop-once { animation: pop 220ms ease both; }
|
| 73 |
+
|
| 74 |
+
/* Sky decor animations */
|
| 75 |
+
@keyframes driftX {
|
| 76 |
+
0% { transform: translateX(-20vw); }
|
| 77 |
+
100% { transform: translateX(120vw); }
|
| 78 |
+
}
|
| 79 |
+
@keyframes bob {
|
| 80 |
+
0%,100% { transform: translateY(0); }
|
| 81 |
+
50% { transform: translateY(-12px); }
|
| 82 |
+
}
|
| 83 |
+
@keyframes twinkle {
|
| 84 |
+
0%, 100% { opacity: .2; }
|
| 85 |
+
50% { opacity: 1; }
|
| 86 |
+
}
|
| 87 |
+
@keyframes cloudDrift {
|
| 88 |
+
0% { transform: translateX(-30vw); }
|
| 89 |
+
100% { transform: translateX(130vw); }
|
| 90 |
+
}
|
| 91 |
+
.orb-path {
|
| 92 |
+
position: absolute;
|
| 93 |
+
top: 14vh;
|
| 94 |
+
left: -20vw;
|
| 95 |
+
animation: driftX 55s linear infinite;
|
| 96 |
+
}
|
| 97 |
+
#moon-wrap { top: 18vh; animation-duration: 65s; }
|
| 98 |
+
.sun-orb, .moon-orb {
|
| 99 |
+
width: clamp(80px, 12vw, 160px);
|
| 100 |
+
height: clamp(80px, 12vw, 160px);
|
| 101 |
+
border-radius: 9999px;
|
| 102 |
+
will-change: transform, filter, opacity;
|
| 103 |
+
animation: bob 6s ease-in-out infinite;
|
| 104 |
+
filter: drop-shadow(0 0 18px rgba(255,255,255,0.35));
|
| 105 |
+
}
|
| 106 |
+
.sun-orb {
|
| 107 |
+
background: radial-gradient(circle at 30% 30%, #fff8b0 0%, #fde047 35%, #f59e0b 60%, rgba(245, 158, 11, 0) 70%);
|
| 108 |
+
box-shadow: 0 0 60px 20px rgba(253, 224, 71, 0.25);
|
| 109 |
+
}
|
| 110 |
+
.moon-orb {
|
| 111 |
+
background: radial-gradient(circle at 35% 35%, #ffffff 0%, #e5e7eb 40%, #cbd5e1 70%, rgba(203,213,225,0) 75%);
|
| 112 |
+
box-shadow: 0 0 60px 18px rgba(148,163,184,0.22);
|
| 113 |
+
}
|
| 114 |
+
.star {
|
| 115 |
+
position: absolute;
|
| 116 |
+
width: 2px; height: 2px;
|
| 117 |
+
border-radius: 9999px;
|
| 118 |
+
background: rgba(255,255,255,0.9);
|
| 119 |
+
box-shadow: 0 0 6px rgba(255,255,255,0.7);
|
| 120 |
+
animation: twinkle var(--twinkle, 2.2s) ease-in-out infinite;
|
| 121 |
+
will-change: opacity;
|
| 122 |
+
}
|
| 123 |
+
.cloud {
|
| 124 |
+
position: absolute;
|
| 125 |
+
height: 90px;
|
| 126 |
+
border-radius: 9999px;
|
| 127 |
+
background: rgba(255,255,255,0.28);
|
| 128 |
+
filter: blur(2px);
|
| 129 |
+
box-shadow:
|
| 130 |
+
40px 10px 0 10px rgba(255,255,255,0.28),
|
| 131 |
+
90px 0px 0 16px rgba(255,255,255,0.24),
|
| 132 |
+
140px 15px 0 12px rgba(255,255,255,0.22);
|
| 133 |
+
animation: cloudDrift var(--speed, 60s) linear infinite;
|
| 134 |
+
will-change: transform, opacity;
|
| 135 |
+
}
|
| 136 |
+
}
|
| 137 |
+
</style>
|
| 138 |
+
</head>
|
| 139 |
+
<body class="min-h-screen bg-gradient-to-br from-blue-400 via-purple-500 to-pink-500 flex flex-col items-center justify-center p-4 transition-all duration-1000">
|
| 140 |
+
<!-- Animated Sky Layer -->
|
| 141 |
+
<div id="sky" class="pointer-events-none fixed inset-0 z-0 overflow-hidden">
|
| 142 |
+
<!-- Day/Night orbs -->
|
| 143 |
+
<div id="sun-wrap" class="orb-path opacity-0 transition-opacity duration-700">
|
| 144 |
+
<div id="sun" class="sun-orb"></div>
|
| 145 |
+
</div>
|
| 146 |
+
<div id="moon-wrap" class="orb-path opacity-0 transition-opacity duration-700">
|
| 147 |
+
<div id="moon" class="moon-orb"></div>
|
| 148 |
+
</div>
|
| 149 |
+
<!-- Stars and clouds -->
|
| 150 |
+
<div id="sky-stars" class="absolute inset-0 opacity-0 transition-opacity duration-700"></div>
|
| 151 |
+
<div id="clouds" class="absolute inset-x-0 top-8 h-44 opacity-0 transition-opacity duration-700"></div>
|
| 152 |
+
</div>
|
| 153 |
+
<div class="w-full max-w-md mx-auto relative z-10">
|
| 154 |
+
<!-- Dark Mode Toggle -->
|
| 155 |
+
<button id="theme-toggle" class="fixed top-4 right-4 glass rounded-full p-3 text-white hover:bg-white/30 transition-all duration-300" aria-label="Toggle dark mode" title="Toggle dark mode">
|
| 156 |
+
<i id="theme-toggle-icon" class="fas fa-moon"></i>
|
| 157 |
+
<span class="sr-only">Toggle dark mode</span>
|
| 158 |
+
</button>
|
| 159 |
+
<!-- App Header with Animation -->
|
| 160 |
+
<header class="text-center mb-8 animate-slide-down">
|
| 161 |
+
<h1 class="text-5xl font-bold text-white mb-2 text-shadow text-glow">Climora</h1>
|
| 162 |
+
<p class="text-white/80 text-lg text-glow">Real-time Weather</p>
|
| 163 |
+
</header>
|
| 164 |
+
|
| 165 |
+
<!-- Search Form -->
|
| 166 |
+
<form class="mb-6 animate-slide-up">
|
| 167 |
+
<div class="flex flex-col sm:flex-row gap-3">
|
| 168 |
+
<div class="relative flex-1">
|
| 169 |
+
<input
|
| 170 |
+
type="text"
|
| 171 |
+
id="city-input"
|
| 172 |
+
placeholder="Enter city name"
|
| 173 |
+
class="w-full px-5 py-4 rounded-2xl glass text-white placeholder-white/70 focus:outline-none focus:ring-2 focus:ring-white/50 transition-all duration-300"
|
| 174 |
+
/>
|
| 175 |
+
<i class="fas fa-search absolute right-4 top-1/2 transform -translate-y-1/2 text-white/70"></i>
|
| 176 |
+
</div>
|
| 177 |
+
<button
|
| 178 |
+
type="submit"
|
| 179 |
+
id="search-btn"
|
| 180 |
+
class="px-6 py-4 glass text-white rounded-2xl hover:bg-white/30 transition-all duration-300 font-medium flex items-center justify-center gap-2"
|
| 181 |
+
>
|
| 182 |
+
<i class="fas fa-search"></i>
|
| 183 |
+
<span>Search</span>
|
| 184 |
+
</button>
|
| 185 |
+
</div>
|
| 186 |
+
|
| 187 |
+
<div class="mt-4 flex justify-center">
|
| 188 |
+
<button
|
| 189 |
+
type="button"
|
| 190 |
+
id="location-btn"
|
| 191 |
+
class="flex items-center gap-3 px-6 py-4 glass text-white rounded-2xl hover:bg-white/30 transition-all duration-300 font-medium animate-pulse-slow"
|
| 192 |
+
>
|
| 193 |
+
<i class="fas fa-location-arrow"></i>
|
| 194 |
+
Use My Location
|
| 195 |
+
</button>
|
| 196 |
+
</div>
|
| 197 |
+
</form>
|
| 198 |
+
|
| 199 |
+
<!-- Loading Animation -->
|
| 200 |
+
<div id="loading" class="hidden flex-col items-center justify-center py-12">
|
| 201 |
+
<div class="relative w-20 h-20 mb-6">
|
| 202 |
+
<div class="absolute inset-0 border-4 border-white/30 border-t-white rounded-full animate-spin"></div>
|
| 203 |
+
<div class="absolute inset-2 border-4 border-white/20 border-b-white rounded-full animate-spin-slow"></div>
|
| 204 |
+
</div>
|
| 205 |
+
<p class="text-white/80 text-lg">Fetching weather data...</p>
|
| 206 |
+
</div>
|
| 207 |
+
|
| 208 |
+
<!-- Error Message -->
|
| 209 |
+
<div id="error-message" class="hidden bg-red-500/20 backdrop-blur-xs border border-red-500/30 text-white p-4 rounded-2xl mb-6 animate-fade-in">
|
| 210 |
+
<div class="flex items-center gap-3">
|
| 211 |
+
<i class="fas fa-exclamation-circle text-xl"></i>
|
| 212 |
+
<p id="error-text">City not found. Please try again.</p>
|
| 213 |
+
</div>
|
| 214 |
+
</div>
|
| 215 |
+
|
| 216 |
+
<!-- Weather Card -->
|
| 217 |
+
<div id="weather-card" class="glass rounded-3xl p-6 shadow-2xl transition-all duration-500 animate-fade-in">
|
| 218 |
+
<div class="flex justify-between items-start mb-6">
|
| 219 |
+
<div>
|
| 220 |
+
<h2 id="city-name" class="text-2xl font-bold text-white text-shadow text-glow">Kolkata, IN</h2>
|
| 221 |
+
<p id="weather-condition" class="text-white/80 capitalize">Loading...</p>
|
| 222 |
+
</div>
|
| 223 |
+
<div id="weather-icon" class="text-white text-5xl animate-float">
|
| 224 |
+
<i class="fas fa-cloud-sun"></i>
|
| 225 |
+
</div>
|
| 226 |
+
</div>
|
| 227 |
+
|
| 228 |
+
<div class="flex items-center justify-center mb-8">
|
| 229 |
+
<div id="temperature" class="text-7xl font-bold text-white text-shadow animate-pulse-slow text-glow">22°C</div>
|
| 230 |
+
</div>
|
| 231 |
+
|
| 232 |
+
<div class="grid grid-cols-2 gap-4">
|
| 233 |
+
<div class="bg-white/10 backdrop-blur-xs rounded-xl p-4 text-center transition-transform duration-300 hover:scale-105">
|
| 234 |
+
<p class="text-white/70 text-sm mb-1">Feels Like</p>
|
| 235 |
+
<p id="feels-like" class="text-white font-semibold text-xl">24°C</p>
|
| 236 |
+
</div>
|
| 237 |
+
<div class="bg-white/10 backdrop-blur-xs rounded-xl p-4 text-center transition-transform duration-300 hover:scale-105">
|
| 238 |
+
<p class="text-white/70 text-sm mb-1">Humidity</p>
|
| 239 |
+
<p id="humidity" class="text-white font-semibold text-xl">65%</p>
|
| 240 |
+
</div>
|
| 241 |
+
<div class="bg-white/10 backdrop-blur-xs rounded-xl p-4 text-center transition-transform duration-300 hover:scale-105">
|
| 242 |
+
<p class="text-white/70 text-sm mb-1">Wind Speed</p>
|
| 243 |
+
<p id="wind-speed" class="text-white font-semibold text-xl">12 km/h</p>
|
| 244 |
+
</div>
|
| 245 |
+
<div class="bg-white/10 backdrop-blur-xs rounded-xl p-4 text-center transition-transform duration-300 hover:scale-105">
|
| 246 |
+
<p class="text-white/70 text-sm mb-1">Pressure</p>
|
| 247 |
+
<p id="pressure" class="text-white font-semibold text-xl">1015 hPa</p>
|
| 248 |
+
</div>
|
| 249 |
+
</div>
|
| 250 |
+
</div>
|
| 251 |
+
|
| 252 |
+
<!-- Footer -->
|
| 253 |
+
<footer class="mt-8 text-center text-white/70 animate-fade-in">
|
| 254 |
+
<p>
|
| 255 |
+
Built with ❤ by
|
| 256 |
+
<a
|
| 257 |
+
href="https://www.linkedin.com/in/shamik-das-379347359"
|
| 258 |
+
target="_blank"
|
| 259 |
+
rel="noopener noreferrer"
|
| 260 |
+
class="no-underline text-amber-200 dark:text-amber-300 hover:text-white/90 transition-colors duration-200 text-glow font-medium focus:outline-none focus-visible:ring-2 focus-visible:ring-white/60 rounded-md"
|
| 261 |
+
title="View LinkedIn profile"
|
| 262 |
+
>Shamik Das</a>
|
| 263 |
+
</p>
|
| 264 |
+
</footer>
|
| 265 |
+
</div>
|
| 266 |
+
|
| 267 |
+
<script>
|
| 268 |
+
// API proxy to keep the key secret on the server
|
| 269 |
+
const API_PROXY = '/api/weather';
|
| 270 |
+
let currentCondition = 'Partly Cloudy';
|
| 271 |
+
let isDayMode = true;
|
| 272 |
+
|
| 273 |
+
// DOM Elements
|
| 274 |
+
const cityInput = document.getElementById('city-input');
|
| 275 |
+
const searchBtn = document.getElementById('search-btn');
|
| 276 |
+
const locationBtn = document.getElementById('location-btn');
|
| 277 |
+
const themeToggleBtn = document.getElementById('theme-toggle');
|
| 278 |
+
const themeToggleIcon = document.getElementById('theme-toggle-icon');
|
| 279 |
+
const loading = document.getElementById('loading');
|
| 280 |
+
const errorMessage = document.getElementById('error-message');
|
| 281 |
+
const errorText = document.getElementById('error-text');
|
| 282 |
+
const weatherCard = document.getElementById('weather-card');
|
| 283 |
+
const cityName = document.getElementById('city-name');
|
| 284 |
+
const weatherCondition = document.getElementById('weather-condition');
|
| 285 |
+
const weatherIcon = document.getElementById('weather-icon');
|
| 286 |
+
const temperature = document.getElementById('temperature');
|
| 287 |
+
const feelsLike = document.getElementById('feels-like');
|
| 288 |
+
const humidity = document.getElementById('humidity');
|
| 289 |
+
const windSpeed = document.getElementById('wind-speed');
|
| 290 |
+
const pressure = document.getElementById('pressure');
|
| 291 |
+
const body = document.body;
|
| 292 |
+
const form = document.querySelector('form');
|
| 293 |
+
const sky = document.getElementById('sky');
|
| 294 |
+
const sunWrap = document.getElementById('sun-wrap');
|
| 295 |
+
const moonWrap = document.getElementById('moon-wrap');
|
| 296 |
+
const starsEl = document.getElementById('sky-stars');
|
| 297 |
+
const cloudsEl = document.getElementById('clouds');
|
| 298 |
+
|
| 299 |
+
// Mock weather data for demonstration
|
| 300 |
+
const mockWeatherData = {
|
| 301 |
+
'new york': {
|
| 302 |
+
city: 'New York',
|
| 303 |
+
country: 'US',
|
| 304 |
+
temp: 22,
|
| 305 |
+
condition: 'Partly Cloudy',
|
| 306 |
+
icon: 'fa-cloud-sun',
|
| 307 |
+
feels_like: 24,
|
| 308 |
+
humidity: 65,
|
| 309 |
+
wind_speed: 12,
|
| 310 |
+
pressure: 1015,
|
| 311 |
+
background: 'from-blue-400 via-purple-500 to-pink-500'
|
| 312 |
+
},
|
| 313 |
+
'london': {
|
| 314 |
+
city: 'London',
|
| 315 |
+
country: 'UK',
|
| 316 |
+
temp: 15,
|
| 317 |
+
condition: 'Rainy',
|
| 318 |
+
icon: 'fa-cloud-rain',
|
| 319 |
+
feels_like: 14,
|
| 320 |
+
humidity: 80,
|
| 321 |
+
wind_speed: 18,
|
| 322 |
+
pressure: 1005,
|
| 323 |
+
background: 'from-blue-500 to-indigo-700'
|
| 324 |
+
},
|
| 325 |
+
'tokyo': {
|
| 326 |
+
city: 'Tokyo',
|
| 327 |
+
country: 'Japan',
|
| 328 |
+
temp: 28,
|
| 329 |
+
condition: 'Sunny',
|
| 330 |
+
icon: 'fa-sun',
|
| 331 |
+
feels_like: 30,
|
| 332 |
+
humidity: 55,
|
| 333 |
+
wind_speed: 8,
|
| 334 |
+
pressure: 1012,
|
| 335 |
+
background: 'from-yellow-400 to-orange-500'
|
| 336 |
+
},
|
| 337 |
+
'sydney': {
|
| 338 |
+
city: 'Sydney',
|
| 339 |
+
country: 'Australia',
|
| 340 |
+
temp: 25,
|
| 341 |
+
condition: 'Cloudy',
|
| 342 |
+
icon: 'fa-cloud',
|
| 343 |
+
feels_like: 26,
|
| 344 |
+
humidity: 70,
|
| 345 |
+
wind_speed: 14,
|
| 346 |
+
pressure: 1018,
|
| 347 |
+
background: 'from-gray-400 to-gray-600'
|
| 348 |
+
},
|
| 349 |
+
'paris': {
|
| 350 |
+
city: 'Paris',
|
| 351 |
+
country: 'France',
|
| 352 |
+
temp: 18,
|
| 353 |
+
condition: 'Clear',
|
| 354 |
+
icon: 'fa-sun',
|
| 355 |
+
feels_like: 17,
|
| 356 |
+
humidity: 60,
|
| 357 |
+
wind_speed: 10,
|
| 358 |
+
pressure: 1013,
|
| 359 |
+
background: 'from-yellow-300 to-orange-400'
|
| 360 |
+
}
|
| 361 |
+
};
|
| 362 |
+
|
| 363 |
+
// Weather gradients (light and dark)
|
| 364 |
+
const weatherGradientsLight = {
|
| 365 |
+
'Clear': 'from-yellow-300 via-orange-400 to-pink-500',
|
| 366 |
+
'Sunny': 'from-yellow-300 via-orange-400 to-pink-500',
|
| 367 |
+
'Clouds': 'from-slate-300 via-slate-400 to-slate-500',
|
| 368 |
+
'Cloudy': 'from-slate-300 via-slate-400 to-slate-500',
|
| 369 |
+
'Partly Cloudy': 'from-blue-300 via-purple-400 to-pink-500',
|
| 370 |
+
'Rain': 'from-indigo-500 via-blue-600 to-slate-700',
|
| 371 |
+
'Rainy': 'from-indigo-500 via-blue-600 to-slate-700',
|
| 372 |
+
'Drizzle': 'from-blue-400 via-indigo-500 to-slate-600',
|
| 373 |
+
'Thunderstorm': 'from-purple-700 via-indigo-800 to-gray-900',
|
| 374 |
+
'Snow': 'from-blue-300 via-blue-400 to-blue-500', // darker for contrast
|
| 375 |
+
'Mist': 'from-gray-400 via-gray-500 to-gray-600', // better contrast
|
| 376 |
+
'Fog': 'from-gray-400 via-gray-500 to-gray-600' // better contrast
|
| 377 |
+
};
|
| 378 |
+
const weatherGradientsDark = {
|
| 379 |
+
'Clear': 'from-amber-400 via-orange-600 to-rose-700',
|
| 380 |
+
'Sunny': 'from-amber-400 via-orange-600 to-rose-700',
|
| 381 |
+
'Clouds': 'from-slate-700 via-slate-800 to-slate-900',
|
| 382 |
+
'Cloudy': 'from-slate-700 via-slate-800 to-slate-900',
|
| 383 |
+
'Partly Cloudy': 'from-indigo-700 via-purple-800 to-slate-900',
|
| 384 |
+
'Rain': 'from-blue-900 via-indigo-900 to-slate-900',
|
| 385 |
+
'Rainy': 'from-blue-900 via-indigo-900 to-slate-900',
|
| 386 |
+
'Drizzle': 'from-slate-800 via-blue-900 to-slate-950',
|
| 387 |
+
'Thunderstorm': 'from-purple-900 via-indigo-950 to-black',
|
| 388 |
+
'Snow': 'from-slate-600 via-slate-700 to-slate-800', // keep dark in dark mode
|
| 389 |
+
'Mist': 'from-slate-600 via-slate-700 to-slate-800',
|
| 390 |
+
'Fog': 'from-slate-600 via-slate-700 to-slate-800'
|
| 391 |
+
};
|
| 392 |
+
|
| 393 |
+
function isDark() {
|
| 394 |
+
return document.documentElement.classList.contains('dark');
|
| 395 |
+
}
|
| 396 |
+
function updateThemeToggleIcon(mode) {
|
| 397 |
+
if ((mode || (isDark() ? 'dark' : 'light')) === 'dark') {
|
| 398 |
+
themeToggleIcon.classList.remove('fa-moon');
|
| 399 |
+
themeToggleIcon.classList.add('fa-sun');
|
| 400 |
+
} else {
|
| 401 |
+
themeToggleIcon.classList.remove('fa-sun');
|
| 402 |
+
themeToggleIcon.classList.add('fa-moon');
|
| 403 |
+
}
|
| 404 |
+
}
|
| 405 |
+
function applyBackgroundGradient(condition) {
|
| 406 |
+
const map = isDark() ? weatherGradientsDark : weatherGradientsLight;
|
| 407 |
+
const gradient = map[condition] || (isDark() ? 'from-slate-700 via-slate-800 to-slate-900' : 'from-blue-400 via-purple-500 to-pink-500');
|
| 408 |
+
body.className = `min-h-screen bg-gradient-to-br ${gradient} bg-animated flex flex-col items-center justify-center p-4 transition-all duration-1000`;
|
| 409 |
+
}
|
| 410 |
+
function setTheme(mode) {
|
| 411 |
+
const m = mode || (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
|
| 412 |
+
document.documentElement.classList.toggle('dark', m === 'dark');
|
| 413 |
+
localStorage.setItem('theme', m);
|
| 414 |
+
updateThemeToggleIcon(m);
|
| 415 |
+
applyBackgroundGradient(currentCondition);
|
| 416 |
+
}
|
| 417 |
+
|
| 418 |
+
// Determine day/night from API response
|
| 419 |
+
function determineIsDay(apiData) {
|
| 420 |
+
try {
|
| 421 |
+
const sunrise = apiData?.sys?.sunrise;
|
| 422 |
+
const sunset = apiData?.sys?.sunset;
|
| 423 |
+
const dt = apiData?.dt;
|
| 424 |
+
if (sunrise && sunset && dt) {
|
| 425 |
+
return dt >= sunrise && dt < sunset;
|
| 426 |
+
}
|
| 427 |
+
// Fallback using timezone offset if needed
|
| 428 |
+
const tz = apiData?.timezone ?? 0;
|
| 429 |
+
const nowUtc = Math.floor(Date.now() / 1000);
|
| 430 |
+
const localTs = nowUtc + tz;
|
| 431 |
+
const hours = (new Date(localTs * 1000)).getUTCHours();
|
| 432 |
+
return hours >= 6 && hours < 18;
|
| 433 |
+
} catch {
|
| 434 |
+
return true;
|
| 435 |
+
}
|
| 436 |
+
}
|
| 437 |
+
|
| 438 |
+
// Build starfield once
|
| 439 |
+
function createStars(count = 80) {
|
| 440 |
+
if (starsEl.childElementCount > 0) return;
|
| 441 |
+
const frag = document.createDocumentFragment();
|
| 442 |
+
for (let i = 0; i < count; i++) {
|
| 443 |
+
const s = document.createElement('span');
|
| 444 |
+
s.className = 'star';
|
| 445 |
+
const left = Math.random() * 100;
|
| 446 |
+
const top = Math.random() * 100;
|
| 447 |
+
const size = Math.random() * 2 + 1;
|
| 448 |
+
s.style.left = `${left}vw`;
|
| 449 |
+
s.style.top = `${top}vh`;
|
| 450 |
+
s.style.width = `${size}px`;
|
| 451 |
+
s.style.height = `${size}px`;
|
| 452 |
+
s.style.setProperty('--twinkle', `${1.8 + Math.random()*2.4}s`);
|
| 453 |
+
s.style.animationDelay = `${Math.random() * 2}s`;
|
| 454 |
+
frag.appendChild(s);
|
| 455 |
+
}
|
| 456 |
+
starsEl.appendChild(frag);
|
| 457 |
+
}
|
| 458 |
+
|
| 459 |
+
// Build a few clouds for daytime
|
| 460 |
+
function createClouds(count = 4) {
|
| 461 |
+
if (cloudsEl.childElementCount > 0) return;
|
| 462 |
+
for (let i = 0; i < count; i++) {
|
| 463 |
+
const c = document.createElement('div');
|
| 464 |
+
c.className = 'cloud';
|
| 465 |
+
const width = 180 + Math.random()*180; // 180-360px
|
| 466 |
+
const top = 5 + Math.random()*60; // 5-65vh
|
| 467 |
+
const delay = Math.random()*-40; // negative to desync
|
| 468 |
+
const speed = 50 + Math.random()*30; // 50-80s
|
| 469 |
+
c.style.width = `${width}px`;
|
| 470 |
+
c.style.top = `${top}vh`;
|
| 471 |
+
c.style.left = `${-30 - Math.random()*30}vw`;
|
| 472 |
+
c.style.setProperty('--speed', `${speed}s`);
|
| 473 |
+
c.style.animationDelay = `${delay}s`;
|
| 474 |
+
cloudsEl.appendChild(c);
|
| 475 |
+
}
|
| 476 |
+
}
|
| 477 |
+
|
| 478 |
+
// Toggle sky based on day/night
|
| 479 |
+
function updateDayNight(day) {
|
| 480 |
+
isDayMode = !!day;
|
| 481 |
+
// Sun / Moon visibility
|
| 482 |
+
sunWrap.classList.toggle('opacity-100', isDayMode);
|
| 483 |
+
sunWrap.classList.toggle('opacity-0', !isDayMode);
|
| 484 |
+
moonWrap.classList.toggle('opacity-100', !isDayMode);
|
| 485 |
+
moonWrap.classList.toggle('opacity-0', isDayMode);
|
| 486 |
+
// Stars and clouds
|
| 487 |
+
starsEl.classList.toggle('opacity-60', !isDayMode);
|
| 488 |
+
starsEl.classList.toggle('opacity-0', isDayMode);
|
| 489 |
+
cloudsEl.classList.toggle('opacity-35', isDayMode);
|
| 490 |
+
cloudsEl.classList.toggle('opacity-0', !isDayMode);
|
| 491 |
+
}
|
| 492 |
+
|
| 493 |
+
// Show loading animation
|
| 494 |
+
function showLoading() {
|
| 495 |
+
loading.classList.remove('hidden');
|
| 496 |
+
weatherCard.classList.add('hidden');
|
| 497 |
+
errorMessage.classList.add('hidden');
|
| 498 |
+
}
|
| 499 |
+
|
| 500 |
+
// Hide loading animation
|
| 501 |
+
function hideLoading() {
|
| 502 |
+
loading.classList.add('hidden');
|
| 503 |
+
}
|
| 504 |
+
|
| 505 |
+
// Show error message
|
| 506 |
+
function showError(message) {
|
| 507 |
+
errorText.textContent = message;
|
| 508 |
+
errorMessage.classList.remove('hidden');
|
| 509 |
+
weatherCard.classList.add('hidden');
|
| 510 |
+
hideLoading();
|
| 511 |
+
}
|
| 512 |
+
|
| 513 |
+
// Hide error message
|
| 514 |
+
function hideError() {
|
| 515 |
+
errorMessage.classList.add('hidden');
|
| 516 |
+
}
|
| 517 |
+
|
| 518 |
+
// Smooth text swaps
|
| 519 |
+
function swapText(el, newText) {
|
| 520 |
+
if (el.textContent === newText) return;
|
| 521 |
+
el.classList.remove('swap-in');
|
| 522 |
+
el.classList.add('swap-out');
|
| 523 |
+
el.addEventListener('animationend', function handler() {
|
| 524 |
+
el.removeEventListener('animationend', handler);
|
| 525 |
+
el.textContent = newText;
|
| 526 |
+
el.classList.remove('swap-out');
|
| 527 |
+
el.classList.add('swap-in');
|
| 528 |
+
// clean up swap-in after it plays
|
| 529 |
+
setTimeout(() => el.classList.remove('swap-in'), 260);
|
| 530 |
+
}, { once: true });
|
| 531 |
+
}
|
| 532 |
+
|
| 533 |
+
// Count-up/down number animation
|
| 534 |
+
function animateNumber(el, to, suffix = '') {
|
| 535 |
+
const currentText = el.textContent || '';
|
| 536 |
+
const match = currentText.match(/-?\d+/);
|
| 537 |
+
const from = match ? parseInt(match[0], 10) : 0;
|
| 538 |
+
const start = performance.now();
|
| 539 |
+
const duration = 500;
|
| 540 |
+
const end = typeof to === 'number' ? to : parseFloat(to);
|
| 541 |
+
if (from === end || isNaN(end)) {
|
| 542 |
+
el.textContent = `${end}${suffix}`;
|
| 543 |
+
return;
|
| 544 |
+
}
|
| 545 |
+
function frame(now) {
|
| 546 |
+
const t = Math.min(1, (now - start) / duration);
|
| 547 |
+
const eased = t < 0.5 ? 2*t*t : -1 + (4 - 2*t)*t; // easeInOutQuad
|
| 548 |
+
const val = Math.round(from + (end - from) * eased);
|
| 549 |
+
el.textContent = `${val}${suffix}`;
|
| 550 |
+
if (t < 1) requestAnimationFrame(frame);
|
| 551 |
+
}
|
| 552 |
+
requestAnimationFrame(frame);
|
| 553 |
+
}
|
| 554 |
+
|
| 555 |
+
// Update weather display
|
| 556 |
+
function updateWeather(data) {
|
| 557 |
+
swapText(cityName, `${data.city}, ${data.country}`);
|
| 558 |
+
swapText(weatherCondition, data.condition);
|
| 559 |
+
animateNumber(temperature, data.temp, '°C');
|
| 560 |
+
animateNumber(feelsLike, data.feels_like, '°C');
|
| 561 |
+
animateNumber(humidity, data.humidity, '%');
|
| 562 |
+
animateNumber(windSpeed, data.wind_speed, ' km/h');
|
| 563 |
+
animateNumber(pressure, data.pressure, ' hPa');
|
| 564 |
+
|
| 565 |
+
// Update weather icon with animation
|
| 566 |
+
weatherIcon.innerHTML = `<i class="fas ${data.icon}"></i>`;
|
| 567 |
+
weatherIcon.classList.remove('pop-once');
|
| 568 |
+
// trigger reflow to restart animation
|
| 569 |
+
void weatherIcon.offsetWidth;
|
| 570 |
+
weatherIcon.classList.add('pop-once');
|
| 571 |
+
|
| 572 |
+
// Update background gradient (animated, theme-aware)
|
| 573 |
+
currentCondition = data.condition;
|
| 574 |
+
applyBackgroundGradient(currentCondition);
|
| 575 |
+
|
| 576 |
+
// Show weather card with animation
|
| 577 |
+
weatherCard.classList.remove('hidden');
|
| 578 |
+
weatherCard.classList.add('animate-fade-in');
|
| 579 |
+
|
| 580 |
+
hideLoading();
|
| 581 |
+
hideError();
|
| 582 |
+
}
|
| 583 |
+
|
| 584 |
+
// Fetch weather from OpenWeatherMap API
|
| 585 |
+
async function fetchWeather(city) {
|
| 586 |
+
showLoading();
|
| 587 |
+
try {
|
| 588 |
+
const response = await fetch(`${API_PROXY}?q=${encodeURIComponent(city)}`);
|
| 589 |
+
if (!response.ok) throw new Error('City not found');
|
| 590 |
+
const data = await response.json();
|
| 591 |
+
// Day/Night by location time
|
| 592 |
+
updateDayNight(determineIsDay(data));
|
| 593 |
+
|
| 594 |
+
const weatherData = {
|
| 595 |
+
city: data.name,
|
| 596 |
+
country: data.sys.country,
|
| 597 |
+
temp: Math.round(data.main.temp),
|
| 598 |
+
condition: data.weather[0].main,
|
| 599 |
+
icon: getWeatherIcon(data.weather[0].main),
|
| 600 |
+
feels_like: Math.round(data.main.feels_like),
|
| 601 |
+
humidity: data.main.humidity,
|
| 602 |
+
wind_speed: Math.round(data.wind.speed * 3.6), // m/s -> km/h
|
| 603 |
+
pressure: data.main.pressure
|
| 604 |
+
};
|
| 605 |
+
updateWeather(weatherData);
|
| 606 |
+
} catch (error) {
|
| 607 |
+
showError('City not found. Please try again.');
|
| 608 |
+
}
|
| 609 |
+
}
|
| 610 |
+
|
| 611 |
+
// Get weather icon based on condition
|
| 612 |
+
function getWeatherIcon(condition) {
|
| 613 |
+
const iconMap = {
|
| 614 |
+
'Clear': 'fa-sun',
|
| 615 |
+
'Clouds': 'fa-cloud',
|
| 616 |
+
'Rain': 'fa-cloud-rain',
|
| 617 |
+
'Drizzle': 'fa-cloud-rain',
|
| 618 |
+
'Thunderstorm': 'fa-bolt',
|
| 619 |
+
'Snow': 'fa-snowflake',
|
| 620 |
+
'Mist': 'fa-smog',
|
| 621 |
+
'Fog': 'fa-smog',
|
| 622 |
+
'Partly Cloudy': 'fa-cloud-sun',
|
| 623 |
+
'Sunny': 'fa-sun'
|
| 624 |
+
};
|
| 625 |
+
return iconMap[condition] || 'fa-cloud';
|
| 626 |
+
}
|
| 627 |
+
|
| 628 |
+
// Geolocation success callback
|
| 629 |
+
function handleLocationSuccess(position) {
|
| 630 |
+
const { latitude, longitude } = position.coords;
|
| 631 |
+
fetchWeatherByCoordinates(latitude, longitude);
|
| 632 |
+
}
|
| 633 |
+
|
| 634 |
+
// Geolocation error callback
|
| 635 |
+
function handleLocationError() {
|
| 636 |
+
showError('Unable to retrieve your location. Please enter a city.');
|
| 637 |
+
}
|
| 638 |
+
|
| 639 |
+
// Fetch weather by coordinates
|
| 640 |
+
async function fetchWeatherByCoordinates(lat, lon) {
|
| 641 |
+
showLoading();
|
| 642 |
+
try {
|
| 643 |
+
const response = await fetch(`${API_PROXY}?lat=${lat}&lon=${lon}`);
|
| 644 |
+
if (!response.ok) throw new Error('Unable to fetch weather data');
|
| 645 |
+
const data = await response.json();
|
| 646 |
+
// Day/Night by location time
|
| 647 |
+
updateDayNight(determineIsDay(data));
|
| 648 |
+
|
| 649 |
+
const weatherData = {
|
| 650 |
+
city: data.name,
|
| 651 |
+
country: data.sys.country,
|
| 652 |
+
temp: Math.round(data.main.temp),
|
| 653 |
+
condition: data.weather[0].main,
|
| 654 |
+
icon: getWeatherIcon(data.weather[0].main),
|
| 655 |
+
feels_like: Math.round(data.main.feels_like),
|
| 656 |
+
humidity: data.main.humidity,
|
| 657 |
+
wind_speed: Math.round(data.wind.speed * 3.6), // m/s -> km/h
|
| 658 |
+
pressure: data.main.pressure
|
| 659 |
+
};
|
| 660 |
+
updateWeather(weatherData);
|
| 661 |
+
} catch (error) {
|
| 662 |
+
showError('Unable to fetch weather data. Please try again later.');
|
| 663 |
+
}
|
| 664 |
+
}
|
| 665 |
+
|
| 666 |
+
// Event Listeners
|
| 667 |
+
form.addEventListener('submit', (e) => {
|
| 668 |
+
e.preventDefault();
|
| 669 |
+
const city = cityInput.value.trim();
|
| 670 |
+
if (city) {
|
| 671 |
+
fetchWeather(city);
|
| 672 |
+
} else {
|
| 673 |
+
showError('Please enter a city name');
|
| 674 |
+
}
|
| 675 |
+
});
|
| 676 |
+
|
| 677 |
+
locationBtn.addEventListener('click', () => {
|
| 678 |
+
if (navigator.geolocation) {
|
| 679 |
+
showLoading();
|
| 680 |
+
navigator.geolocation.getCurrentPosition(
|
| 681 |
+
handleLocationSuccess,
|
| 682 |
+
handleLocationError,
|
| 683 |
+
{ timeout: 10000 }
|
| 684 |
+
);
|
| 685 |
+
} else {
|
| 686 |
+
showError('Geolocation is not supported by this browser');
|
| 687 |
+
}
|
| 688 |
+
});
|
| 689 |
+
|
| 690 |
+
// Theme toggle
|
| 691 |
+
themeToggleBtn.addEventListener('click', () => {
|
| 692 |
+
const next = isDark() ? 'light' : 'dark';
|
| 693 |
+
setTheme(next);
|
| 694 |
+
});
|
| 695 |
+
|
| 696 |
+
// Initialize with default weather
|
| 697 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 698 |
+
const stored = localStorage.getItem('theme');
|
| 699 |
+
setTheme(stored || null);
|
| 700 |
+
updateThemeToggleIcon();
|
| 701 |
+
// Build sky decor once
|
| 702 |
+
createStars(80);
|
| 703 |
+
createClouds(4);
|
| 704 |
+
// Default guess by local time until first API call
|
| 705 |
+
const h = new Date().getHours();
|
| 706 |
+
updateDayNight(h >= 6 && h < 18);
|
| 707 |
+
fetchWeather('Kolkata, IN');
|
| 708 |
+
});
|
| 709 |
+
</script>
|
| 710 |
+
</body>
|
| 711 |
+
</html>
|
package-lock.json
ADDED
|
@@ -0,0 +1,911 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
+
"dotenv": "^16.0.3",
|
| 13 |
+
"express": "^4.18.2",
|
| 14 |
+
"node-fetch": "^2.6.12"
|
| 15 |
+
}
|
| 16 |
+
},
|
| 17 |
+
"node_modules/accepts": {
|
| 18 |
+
"version": "1.3.8",
|
| 19 |
+
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
|
| 20 |
+
"integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
|
| 21 |
+
"license": "MIT",
|
| 22 |
+
"dependencies": {
|
| 23 |
+
"mime-types": "~2.1.34",
|
| 24 |
+
"negotiator": "0.6.3"
|
| 25 |
+
},
|
| 26 |
+
"engines": {
|
| 27 |
+
"node": ">= 0.6"
|
| 28 |
+
}
|
| 29 |
+
},
|
| 30 |
+
"node_modules/array-flatten": {
|
| 31 |
+
"version": "1.1.1",
|
| 32 |
+
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
|
| 33 |
+
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
|
| 34 |
+
"license": "MIT"
|
| 35 |
+
},
|
| 36 |
+
"node_modules/body-parser": {
|
| 37 |
+
"version": "1.20.3",
|
| 38 |
+
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz",
|
| 39 |
+
"integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==",
|
| 40 |
+
"license": "MIT",
|
| 41 |
+
"dependencies": {
|
| 42 |
+
"bytes": "3.1.2",
|
| 43 |
+
"content-type": "~1.0.5",
|
| 44 |
+
"debug": "2.6.9",
|
| 45 |
+
"depd": "2.0.0",
|
| 46 |
+
"destroy": "1.2.0",
|
| 47 |
+
"http-errors": "2.0.0",
|
| 48 |
+
"iconv-lite": "0.4.24",
|
| 49 |
+
"on-finished": "2.4.1",
|
| 50 |
+
"qs": "6.13.0",
|
| 51 |
+
"raw-body": "2.5.2",
|
| 52 |
+
"type-is": "~1.6.18",
|
| 53 |
+
"unpipe": "1.0.0"
|
| 54 |
+
},
|
| 55 |
+
"engines": {
|
| 56 |
+
"node": ">= 0.8",
|
| 57 |
+
"npm": "1.2.8000 || >= 1.4.16"
|
| 58 |
+
}
|
| 59 |
+
},
|
| 60 |
+
"node_modules/bytes": {
|
| 61 |
+
"version": "3.1.2",
|
| 62 |
+
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
| 63 |
+
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
|
| 64 |
+
"license": "MIT",
|
| 65 |
+
"engines": {
|
| 66 |
+
"node": ">= 0.8"
|
| 67 |
+
}
|
| 68 |
+
},
|
| 69 |
+
"node_modules/call-bind-apply-helpers": {
|
| 70 |
+
"version": "1.0.2",
|
| 71 |
+
"resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
|
| 72 |
+
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
|
| 73 |
+
"license": "MIT",
|
| 74 |
+
"dependencies": {
|
| 75 |
+
"es-errors": "^1.3.0",
|
| 76 |
+
"function-bind": "^1.1.2"
|
| 77 |
+
},
|
| 78 |
+
"engines": {
|
| 79 |
+
"node": ">= 0.4"
|
| 80 |
+
}
|
| 81 |
+
},
|
| 82 |
+
"node_modules/call-bound": {
|
| 83 |
+
"version": "1.0.4",
|
| 84 |
+
"resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
|
| 85 |
+
"integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
|
| 86 |
+
"license": "MIT",
|
| 87 |
+
"dependencies": {
|
| 88 |
+
"call-bind-apply-helpers": "^1.0.2",
|
| 89 |
+
"get-intrinsic": "^1.3.0"
|
| 90 |
+
},
|
| 91 |
+
"engines": {
|
| 92 |
+
"node": ">= 0.4"
|
| 93 |
+
},
|
| 94 |
+
"funding": {
|
| 95 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 96 |
+
}
|
| 97 |
+
},
|
| 98 |
+
"node_modules/content-disposition": {
|
| 99 |
+
"version": "0.5.4",
|
| 100 |
+
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
|
| 101 |
+
"integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
|
| 102 |
+
"license": "MIT",
|
| 103 |
+
"dependencies": {
|
| 104 |
+
"safe-buffer": "5.2.1"
|
| 105 |
+
},
|
| 106 |
+
"engines": {
|
| 107 |
+
"node": ">= 0.6"
|
| 108 |
+
}
|
| 109 |
+
},
|
| 110 |
+
"node_modules/content-type": {
|
| 111 |
+
"version": "1.0.5",
|
| 112 |
+
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
|
| 113 |
+
"integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
|
| 114 |
+
"license": "MIT",
|
| 115 |
+
"engines": {
|
| 116 |
+
"node": ">= 0.6"
|
| 117 |
+
}
|
| 118 |
+
},
|
| 119 |
+
"node_modules/cookie": {
|
| 120 |
+
"version": "0.7.1",
|
| 121 |
+
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz",
|
| 122 |
+
"integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==",
|
| 123 |
+
"license": "MIT",
|
| 124 |
+
"engines": {
|
| 125 |
+
"node": ">= 0.6"
|
| 126 |
+
}
|
| 127 |
+
},
|
| 128 |
+
"node_modules/cookie-signature": {
|
| 129 |
+
"version": "1.0.6",
|
| 130 |
+
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
|
| 131 |
+
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==",
|
| 132 |
+
"license": "MIT"
|
| 133 |
+
},
|
| 134 |
+
"node_modules/cors": {
|
| 135 |
+
"version": "2.8.5",
|
| 136 |
+
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
|
| 137 |
+
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
|
| 138 |
+
"license": "MIT",
|
| 139 |
+
"dependencies": {
|
| 140 |
+
"object-assign": "^4",
|
| 141 |
+
"vary": "^1"
|
| 142 |
+
},
|
| 143 |
+
"engines": {
|
| 144 |
+
"node": ">= 0.10"
|
| 145 |
+
}
|
| 146 |
+
},
|
| 147 |
+
"node_modules/debug": {
|
| 148 |
+
"version": "2.6.9",
|
| 149 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
| 150 |
+
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
| 151 |
+
"license": "MIT",
|
| 152 |
+
"dependencies": {
|
| 153 |
+
"ms": "2.0.0"
|
| 154 |
+
}
|
| 155 |
+
},
|
| 156 |
+
"node_modules/depd": {
|
| 157 |
+
"version": "2.0.0",
|
| 158 |
+
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
|
| 159 |
+
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
|
| 160 |
+
"license": "MIT",
|
| 161 |
+
"engines": {
|
| 162 |
+
"node": ">= 0.8"
|
| 163 |
+
}
|
| 164 |
+
},
|
| 165 |
+
"node_modules/destroy": {
|
| 166 |
+
"version": "1.2.0",
|
| 167 |
+
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
|
| 168 |
+
"integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
|
| 169 |
+
"license": "MIT",
|
| 170 |
+
"engines": {
|
| 171 |
+
"node": ">= 0.8",
|
| 172 |
+
"npm": "1.2.8000 || >= 1.4.16"
|
| 173 |
+
}
|
| 174 |
+
},
|
| 175 |
+
"node_modules/dotenv": {
|
| 176 |
+
"version": "16.6.1",
|
| 177 |
+
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz",
|
| 178 |
+
"integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==",
|
| 179 |
+
"license": "BSD-2-Clause",
|
| 180 |
+
"engines": {
|
| 181 |
+
"node": ">=12"
|
| 182 |
+
},
|
| 183 |
+
"funding": {
|
| 184 |
+
"url": "https://dotenvx.com"
|
| 185 |
+
}
|
| 186 |
+
},
|
| 187 |
+
"node_modules/dunder-proto": {
|
| 188 |
+
"version": "1.0.1",
|
| 189 |
+
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
| 190 |
+
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
|
| 191 |
+
"license": "MIT",
|
| 192 |
+
"dependencies": {
|
| 193 |
+
"call-bind-apply-helpers": "^1.0.1",
|
| 194 |
+
"es-errors": "^1.3.0",
|
| 195 |
+
"gopd": "^1.2.0"
|
| 196 |
+
},
|
| 197 |
+
"engines": {
|
| 198 |
+
"node": ">= 0.4"
|
| 199 |
+
}
|
| 200 |
+
},
|
| 201 |
+
"node_modules/ee-first": {
|
| 202 |
+
"version": "1.1.1",
|
| 203 |
+
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
| 204 |
+
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
|
| 205 |
+
"license": "MIT"
|
| 206 |
+
},
|
| 207 |
+
"node_modules/encodeurl": {
|
| 208 |
+
"version": "2.0.0",
|
| 209 |
+
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
|
| 210 |
+
"integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
|
| 211 |
+
"license": "MIT",
|
| 212 |
+
"engines": {
|
| 213 |
+
"node": ">= 0.8"
|
| 214 |
+
}
|
| 215 |
+
},
|
| 216 |
+
"node_modules/es-define-property": {
|
| 217 |
+
"version": "1.0.1",
|
| 218 |
+
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
|
| 219 |
+
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
|
| 220 |
+
"license": "MIT",
|
| 221 |
+
"engines": {
|
| 222 |
+
"node": ">= 0.4"
|
| 223 |
+
}
|
| 224 |
+
},
|
| 225 |
+
"node_modules/es-errors": {
|
| 226 |
+
"version": "1.3.0",
|
| 227 |
+
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
|
| 228 |
+
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
|
| 229 |
+
"license": "MIT",
|
| 230 |
+
"engines": {
|
| 231 |
+
"node": ">= 0.4"
|
| 232 |
+
}
|
| 233 |
+
},
|
| 234 |
+
"node_modules/es-object-atoms": {
|
| 235 |
+
"version": "1.1.1",
|
| 236 |
+
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
|
| 237 |
+
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
|
| 238 |
+
"license": "MIT",
|
| 239 |
+
"dependencies": {
|
| 240 |
+
"es-errors": "^1.3.0"
|
| 241 |
+
},
|
| 242 |
+
"engines": {
|
| 243 |
+
"node": ">= 0.4"
|
| 244 |
+
}
|
| 245 |
+
},
|
| 246 |
+
"node_modules/escape-html": {
|
| 247 |
+
"version": "1.0.3",
|
| 248 |
+
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
|
| 249 |
+
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
|
| 250 |
+
"license": "MIT"
|
| 251 |
+
},
|
| 252 |
+
"node_modules/etag": {
|
| 253 |
+
"version": "1.8.1",
|
| 254 |
+
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
|
| 255 |
+
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
|
| 256 |
+
"license": "MIT",
|
| 257 |
+
"engines": {
|
| 258 |
+
"node": ">= 0.6"
|
| 259 |
+
}
|
| 260 |
+
},
|
| 261 |
+
"node_modules/express": {
|
| 262 |
+
"version": "4.21.2",
|
| 263 |
+
"resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz",
|
| 264 |
+
"integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==",
|
| 265 |
+
"license": "MIT",
|
| 266 |
+
"dependencies": {
|
| 267 |
+
"accepts": "~1.3.8",
|
| 268 |
+
"array-flatten": "1.1.1",
|
| 269 |
+
"body-parser": "1.20.3",
|
| 270 |
+
"content-disposition": "0.5.4",
|
| 271 |
+
"content-type": "~1.0.4",
|
| 272 |
+
"cookie": "0.7.1",
|
| 273 |
+
"cookie-signature": "1.0.6",
|
| 274 |
+
"debug": "2.6.9",
|
| 275 |
+
"depd": "2.0.0",
|
| 276 |
+
"encodeurl": "~2.0.0",
|
| 277 |
+
"escape-html": "~1.0.3",
|
| 278 |
+
"etag": "~1.8.1",
|
| 279 |
+
"finalhandler": "1.3.1",
|
| 280 |
+
"fresh": "0.5.2",
|
| 281 |
+
"http-errors": "2.0.0",
|
| 282 |
+
"merge-descriptors": "1.0.3",
|
| 283 |
+
"methods": "~1.1.2",
|
| 284 |
+
"on-finished": "2.4.1",
|
| 285 |
+
"parseurl": "~1.3.3",
|
| 286 |
+
"path-to-regexp": "0.1.12",
|
| 287 |
+
"proxy-addr": "~2.0.7",
|
| 288 |
+
"qs": "6.13.0",
|
| 289 |
+
"range-parser": "~1.2.1",
|
| 290 |
+
"safe-buffer": "5.2.1",
|
| 291 |
+
"send": "0.19.0",
|
| 292 |
+
"serve-static": "1.16.2",
|
| 293 |
+
"setprototypeof": "1.2.0",
|
| 294 |
+
"statuses": "2.0.1",
|
| 295 |
+
"type-is": "~1.6.18",
|
| 296 |
+
"utils-merge": "1.0.1",
|
| 297 |
+
"vary": "~1.1.2"
|
| 298 |
+
},
|
| 299 |
+
"engines": {
|
| 300 |
+
"node": ">= 0.10.0"
|
| 301 |
+
},
|
| 302 |
+
"funding": {
|
| 303 |
+
"type": "opencollective",
|
| 304 |
+
"url": "https://opencollective.com/express"
|
| 305 |
+
}
|
| 306 |
+
},
|
| 307 |
+
"node_modules/finalhandler": {
|
| 308 |
+
"version": "1.3.1",
|
| 309 |
+
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz",
|
| 310 |
+
"integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==",
|
| 311 |
+
"license": "MIT",
|
| 312 |
+
"dependencies": {
|
| 313 |
+
"debug": "2.6.9",
|
| 314 |
+
"encodeurl": "~2.0.0",
|
| 315 |
+
"escape-html": "~1.0.3",
|
| 316 |
+
"on-finished": "2.4.1",
|
| 317 |
+
"parseurl": "~1.3.3",
|
| 318 |
+
"statuses": "2.0.1",
|
| 319 |
+
"unpipe": "~1.0.0"
|
| 320 |
+
},
|
| 321 |
+
"engines": {
|
| 322 |
+
"node": ">= 0.8"
|
| 323 |
+
}
|
| 324 |
+
},
|
| 325 |
+
"node_modules/forwarded": {
|
| 326 |
+
"version": "0.2.0",
|
| 327 |
+
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
|
| 328 |
+
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
|
| 329 |
+
"license": "MIT",
|
| 330 |
+
"engines": {
|
| 331 |
+
"node": ">= 0.6"
|
| 332 |
+
}
|
| 333 |
+
},
|
| 334 |
+
"node_modules/fresh": {
|
| 335 |
+
"version": "0.5.2",
|
| 336 |
+
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
|
| 337 |
+
"integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
|
| 338 |
+
"license": "MIT",
|
| 339 |
+
"engines": {
|
| 340 |
+
"node": ">= 0.6"
|
| 341 |
+
}
|
| 342 |
+
},
|
| 343 |
+
"node_modules/function-bind": {
|
| 344 |
+
"version": "1.1.2",
|
| 345 |
+
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
| 346 |
+
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
| 347 |
+
"license": "MIT",
|
| 348 |
+
"funding": {
|
| 349 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 350 |
+
}
|
| 351 |
+
},
|
| 352 |
+
"node_modules/get-intrinsic": {
|
| 353 |
+
"version": "1.3.0",
|
| 354 |
+
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
|
| 355 |
+
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
|
| 356 |
+
"license": "MIT",
|
| 357 |
+
"dependencies": {
|
| 358 |
+
"call-bind-apply-helpers": "^1.0.2",
|
| 359 |
+
"es-define-property": "^1.0.1",
|
| 360 |
+
"es-errors": "^1.3.0",
|
| 361 |
+
"es-object-atoms": "^1.1.1",
|
| 362 |
+
"function-bind": "^1.1.2",
|
| 363 |
+
"get-proto": "^1.0.1",
|
| 364 |
+
"gopd": "^1.2.0",
|
| 365 |
+
"has-symbols": "^1.1.0",
|
| 366 |
+
"hasown": "^2.0.2",
|
| 367 |
+
"math-intrinsics": "^1.1.0"
|
| 368 |
+
},
|
| 369 |
+
"engines": {
|
| 370 |
+
"node": ">= 0.4"
|
| 371 |
+
},
|
| 372 |
+
"funding": {
|
| 373 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 374 |
+
}
|
| 375 |
+
},
|
| 376 |
+
"node_modules/get-proto": {
|
| 377 |
+
"version": "1.0.1",
|
| 378 |
+
"resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
|
| 379 |
+
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
|
| 380 |
+
"license": "MIT",
|
| 381 |
+
"dependencies": {
|
| 382 |
+
"dunder-proto": "^1.0.1",
|
| 383 |
+
"es-object-atoms": "^1.0.0"
|
| 384 |
+
},
|
| 385 |
+
"engines": {
|
| 386 |
+
"node": ">= 0.4"
|
| 387 |
+
}
|
| 388 |
+
},
|
| 389 |
+
"node_modules/gopd": {
|
| 390 |
+
"version": "1.2.0",
|
| 391 |
+
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
|
| 392 |
+
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
|
| 393 |
+
"license": "MIT",
|
| 394 |
+
"engines": {
|
| 395 |
+
"node": ">= 0.4"
|
| 396 |
+
},
|
| 397 |
+
"funding": {
|
| 398 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 399 |
+
}
|
| 400 |
+
},
|
| 401 |
+
"node_modules/has-symbols": {
|
| 402 |
+
"version": "1.1.0",
|
| 403 |
+
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
|
| 404 |
+
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
|
| 405 |
+
"license": "MIT",
|
| 406 |
+
"engines": {
|
| 407 |
+
"node": ">= 0.4"
|
| 408 |
+
},
|
| 409 |
+
"funding": {
|
| 410 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 411 |
+
}
|
| 412 |
+
},
|
| 413 |
+
"node_modules/hasown": {
|
| 414 |
+
"version": "2.0.2",
|
| 415 |
+
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
| 416 |
+
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
| 417 |
+
"license": "MIT",
|
| 418 |
+
"dependencies": {
|
| 419 |
+
"function-bind": "^1.1.2"
|
| 420 |
+
},
|
| 421 |
+
"engines": {
|
| 422 |
+
"node": ">= 0.4"
|
| 423 |
+
}
|
| 424 |
+
},
|
| 425 |
+
"node_modules/http-errors": {
|
| 426 |
+
"version": "2.0.0",
|
| 427 |
+
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
|
| 428 |
+
"integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
|
| 429 |
+
"license": "MIT",
|
| 430 |
+
"dependencies": {
|
| 431 |
+
"depd": "2.0.0",
|
| 432 |
+
"inherits": "2.0.4",
|
| 433 |
+
"setprototypeof": "1.2.0",
|
| 434 |
+
"statuses": "2.0.1",
|
| 435 |
+
"toidentifier": "1.0.1"
|
| 436 |
+
},
|
| 437 |
+
"engines": {
|
| 438 |
+
"node": ">= 0.8"
|
| 439 |
+
}
|
| 440 |
+
},
|
| 441 |
+
"node_modules/iconv-lite": {
|
| 442 |
+
"version": "0.4.24",
|
| 443 |
+
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
| 444 |
+
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
| 445 |
+
"license": "MIT",
|
| 446 |
+
"dependencies": {
|
| 447 |
+
"safer-buffer": ">= 2.1.2 < 3"
|
| 448 |
+
},
|
| 449 |
+
"engines": {
|
| 450 |
+
"node": ">=0.10.0"
|
| 451 |
+
}
|
| 452 |
+
},
|
| 453 |
+
"node_modules/inherits": {
|
| 454 |
+
"version": "2.0.4",
|
| 455 |
+
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
| 456 |
+
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
| 457 |
+
"license": "ISC"
|
| 458 |
+
},
|
| 459 |
+
"node_modules/ipaddr.js": {
|
| 460 |
+
"version": "1.9.1",
|
| 461 |
+
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
|
| 462 |
+
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
|
| 463 |
+
"license": "MIT",
|
| 464 |
+
"engines": {
|
| 465 |
+
"node": ">= 0.10"
|
| 466 |
+
}
|
| 467 |
+
},
|
| 468 |
+
"node_modules/math-intrinsics": {
|
| 469 |
+
"version": "1.1.0",
|
| 470 |
+
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
|
| 471 |
+
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
|
| 472 |
+
"license": "MIT",
|
| 473 |
+
"engines": {
|
| 474 |
+
"node": ">= 0.4"
|
| 475 |
+
}
|
| 476 |
+
},
|
| 477 |
+
"node_modules/media-typer": {
|
| 478 |
+
"version": "0.3.0",
|
| 479 |
+
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
| 480 |
+
"integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
|
| 481 |
+
"license": "MIT",
|
| 482 |
+
"engines": {
|
| 483 |
+
"node": ">= 0.6"
|
| 484 |
+
}
|
| 485 |
+
},
|
| 486 |
+
"node_modules/merge-descriptors": {
|
| 487 |
+
"version": "1.0.3",
|
| 488 |
+
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
|
| 489 |
+
"integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",
|
| 490 |
+
"license": "MIT",
|
| 491 |
+
"funding": {
|
| 492 |
+
"url": "https://github.com/sponsors/sindresorhus"
|
| 493 |
+
}
|
| 494 |
+
},
|
| 495 |
+
"node_modules/methods": {
|
| 496 |
+
"version": "1.1.2",
|
| 497 |
+
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
|
| 498 |
+
"integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
|
| 499 |
+
"license": "MIT",
|
| 500 |
+
"engines": {
|
| 501 |
+
"node": ">= 0.6"
|
| 502 |
+
}
|
| 503 |
+
},
|
| 504 |
+
"node_modules/mime": {
|
| 505 |
+
"version": "1.6.0",
|
| 506 |
+
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
|
| 507 |
+
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
|
| 508 |
+
"license": "MIT",
|
| 509 |
+
"bin": {
|
| 510 |
+
"mime": "cli.js"
|
| 511 |
+
},
|
| 512 |
+
"engines": {
|
| 513 |
+
"node": ">=4"
|
| 514 |
+
}
|
| 515 |
+
},
|
| 516 |
+
"node_modules/mime-db": {
|
| 517 |
+
"version": "1.52.0",
|
| 518 |
+
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
| 519 |
+
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
| 520 |
+
"license": "MIT",
|
| 521 |
+
"engines": {
|
| 522 |
+
"node": ">= 0.6"
|
| 523 |
+
}
|
| 524 |
+
},
|
| 525 |
+
"node_modules/mime-types": {
|
| 526 |
+
"version": "2.1.35",
|
| 527 |
+
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
|
| 528 |
+
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
| 529 |
+
"license": "MIT",
|
| 530 |
+
"dependencies": {
|
| 531 |
+
"mime-db": "1.52.0"
|
| 532 |
+
},
|
| 533 |
+
"engines": {
|
| 534 |
+
"node": ">= 0.6"
|
| 535 |
+
}
|
| 536 |
+
},
|
| 537 |
+
"node_modules/ms": {
|
| 538 |
+
"version": "2.0.0",
|
| 539 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
| 540 |
+
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
| 541 |
+
"license": "MIT"
|
| 542 |
+
},
|
| 543 |
+
"node_modules/negotiator": {
|
| 544 |
+
"version": "0.6.3",
|
| 545 |
+
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
|
| 546 |
+
"integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
|
| 547 |
+
"license": "MIT",
|
| 548 |
+
"engines": {
|
| 549 |
+
"node": ">= 0.6"
|
| 550 |
+
}
|
| 551 |
+
},
|
| 552 |
+
"node_modules/node-fetch": {
|
| 553 |
+
"version": "2.7.0",
|
| 554 |
+
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
|
| 555 |
+
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
|
| 556 |
+
"license": "MIT",
|
| 557 |
+
"dependencies": {
|
| 558 |
+
"whatwg-url": "^5.0.0"
|
| 559 |
+
},
|
| 560 |
+
"engines": {
|
| 561 |
+
"node": "4.x || >=6.0.0"
|
| 562 |
+
},
|
| 563 |
+
"peerDependencies": {
|
| 564 |
+
"encoding": "^0.1.0"
|
| 565 |
+
},
|
| 566 |
+
"peerDependenciesMeta": {
|
| 567 |
+
"encoding": {
|
| 568 |
+
"optional": true
|
| 569 |
+
}
|
| 570 |
+
}
|
| 571 |
+
},
|
| 572 |
+
"node_modules/object-assign": {
|
| 573 |
+
"version": "4.1.1",
|
| 574 |
+
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
| 575 |
+
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
|
| 576 |
+
"license": "MIT",
|
| 577 |
+
"engines": {
|
| 578 |
+
"node": ">=0.10.0"
|
| 579 |
+
}
|
| 580 |
+
},
|
| 581 |
+
"node_modules/object-inspect": {
|
| 582 |
+
"version": "1.13.4",
|
| 583 |
+
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
|
| 584 |
+
"integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
|
| 585 |
+
"license": "MIT",
|
| 586 |
+
"engines": {
|
| 587 |
+
"node": ">= 0.4"
|
| 588 |
+
},
|
| 589 |
+
"funding": {
|
| 590 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 591 |
+
}
|
| 592 |
+
},
|
| 593 |
+
"node_modules/on-finished": {
|
| 594 |
+
"version": "2.4.1",
|
| 595 |
+
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
|
| 596 |
+
"integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
|
| 597 |
+
"license": "MIT",
|
| 598 |
+
"dependencies": {
|
| 599 |
+
"ee-first": "1.1.1"
|
| 600 |
+
},
|
| 601 |
+
"engines": {
|
| 602 |
+
"node": ">= 0.8"
|
| 603 |
+
}
|
| 604 |
+
},
|
| 605 |
+
"node_modules/parseurl": {
|
| 606 |
+
"version": "1.3.3",
|
| 607 |
+
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
| 608 |
+
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
|
| 609 |
+
"license": "MIT",
|
| 610 |
+
"engines": {
|
| 611 |
+
"node": ">= 0.8"
|
| 612 |
+
}
|
| 613 |
+
},
|
| 614 |
+
"node_modules/path-to-regexp": {
|
| 615 |
+
"version": "0.1.12",
|
| 616 |
+
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz",
|
| 617 |
+
"integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==",
|
| 618 |
+
"license": "MIT"
|
| 619 |
+
},
|
| 620 |
+
"node_modules/proxy-addr": {
|
| 621 |
+
"version": "2.0.7",
|
| 622 |
+
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
| 623 |
+
"integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
|
| 624 |
+
"license": "MIT",
|
| 625 |
+
"dependencies": {
|
| 626 |
+
"forwarded": "0.2.0",
|
| 627 |
+
"ipaddr.js": "1.9.1"
|
| 628 |
+
},
|
| 629 |
+
"engines": {
|
| 630 |
+
"node": ">= 0.10"
|
| 631 |
+
}
|
| 632 |
+
},
|
| 633 |
+
"node_modules/qs": {
|
| 634 |
+
"version": "6.13.0",
|
| 635 |
+
"resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
|
| 636 |
+
"integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
|
| 637 |
+
"license": "BSD-3-Clause",
|
| 638 |
+
"dependencies": {
|
| 639 |
+
"side-channel": "^1.0.6"
|
| 640 |
+
},
|
| 641 |
+
"engines": {
|
| 642 |
+
"node": ">=0.6"
|
| 643 |
+
},
|
| 644 |
+
"funding": {
|
| 645 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 646 |
+
}
|
| 647 |
+
},
|
| 648 |
+
"node_modules/range-parser": {
|
| 649 |
+
"version": "1.2.1",
|
| 650 |
+
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
| 651 |
+
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
|
| 652 |
+
"license": "MIT",
|
| 653 |
+
"engines": {
|
| 654 |
+
"node": ">= 0.6"
|
| 655 |
+
}
|
| 656 |
+
},
|
| 657 |
+
"node_modules/raw-body": {
|
| 658 |
+
"version": "2.5.2",
|
| 659 |
+
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
|
| 660 |
+
"integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
|
| 661 |
+
"license": "MIT",
|
| 662 |
+
"dependencies": {
|
| 663 |
+
"bytes": "3.1.2",
|
| 664 |
+
"http-errors": "2.0.0",
|
| 665 |
+
"iconv-lite": "0.4.24",
|
| 666 |
+
"unpipe": "1.0.0"
|
| 667 |
+
},
|
| 668 |
+
"engines": {
|
| 669 |
+
"node": ">= 0.8"
|
| 670 |
+
}
|
| 671 |
+
},
|
| 672 |
+
"node_modules/safe-buffer": {
|
| 673 |
+
"version": "5.2.1",
|
| 674 |
+
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
| 675 |
+
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
| 676 |
+
"funding": [
|
| 677 |
+
{
|
| 678 |
+
"type": "github",
|
| 679 |
+
"url": "https://github.com/sponsors/feross"
|
| 680 |
+
},
|
| 681 |
+
{
|
| 682 |
+
"type": "patreon",
|
| 683 |
+
"url": "https://www.patreon.com/feross"
|
| 684 |
+
},
|
| 685 |
+
{
|
| 686 |
+
"type": "consulting",
|
| 687 |
+
"url": "https://feross.org/support"
|
| 688 |
+
}
|
| 689 |
+
],
|
| 690 |
+
"license": "MIT"
|
| 691 |
+
},
|
| 692 |
+
"node_modules/safer-buffer": {
|
| 693 |
+
"version": "2.1.2",
|
| 694 |
+
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
| 695 |
+
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
| 696 |
+
"license": "MIT"
|
| 697 |
+
},
|
| 698 |
+
"node_modules/send": {
|
| 699 |
+
"version": "0.19.0",
|
| 700 |
+
"resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz",
|
| 701 |
+
"integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==",
|
| 702 |
+
"license": "MIT",
|
| 703 |
+
"dependencies": {
|
| 704 |
+
"debug": "2.6.9",
|
| 705 |
+
"depd": "2.0.0",
|
| 706 |
+
"destroy": "1.2.0",
|
| 707 |
+
"encodeurl": "~1.0.2",
|
| 708 |
+
"escape-html": "~1.0.3",
|
| 709 |
+
"etag": "~1.8.1",
|
| 710 |
+
"fresh": "0.5.2",
|
| 711 |
+
"http-errors": "2.0.0",
|
| 712 |
+
"mime": "1.6.0",
|
| 713 |
+
"ms": "2.1.3",
|
| 714 |
+
"on-finished": "2.4.1",
|
| 715 |
+
"range-parser": "~1.2.1",
|
| 716 |
+
"statuses": "2.0.1"
|
| 717 |
+
},
|
| 718 |
+
"engines": {
|
| 719 |
+
"node": ">= 0.8.0"
|
| 720 |
+
}
|
| 721 |
+
},
|
| 722 |
+
"node_modules/send/node_modules/encodeurl": {
|
| 723 |
+
"version": "1.0.2",
|
| 724 |
+
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
|
| 725 |
+
"integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
|
| 726 |
+
"license": "MIT",
|
| 727 |
+
"engines": {
|
| 728 |
+
"node": ">= 0.8"
|
| 729 |
+
}
|
| 730 |
+
},
|
| 731 |
+
"node_modules/send/node_modules/ms": {
|
| 732 |
+
"version": "2.1.3",
|
| 733 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
| 734 |
+
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
| 735 |
+
"license": "MIT"
|
| 736 |
+
},
|
| 737 |
+
"node_modules/serve-static": {
|
| 738 |
+
"version": "1.16.2",
|
| 739 |
+
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz",
|
| 740 |
+
"integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==",
|
| 741 |
+
"license": "MIT",
|
| 742 |
+
"dependencies": {
|
| 743 |
+
"encodeurl": "~2.0.0",
|
| 744 |
+
"escape-html": "~1.0.3",
|
| 745 |
+
"parseurl": "~1.3.3",
|
| 746 |
+
"send": "0.19.0"
|
| 747 |
+
},
|
| 748 |
+
"engines": {
|
| 749 |
+
"node": ">= 0.8.0"
|
| 750 |
+
}
|
| 751 |
+
},
|
| 752 |
+
"node_modules/setprototypeof": {
|
| 753 |
+
"version": "1.2.0",
|
| 754 |
+
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
|
| 755 |
+
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
|
| 756 |
+
"license": "ISC"
|
| 757 |
+
},
|
| 758 |
+
"node_modules/side-channel": {
|
| 759 |
+
"version": "1.1.0",
|
| 760 |
+
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
|
| 761 |
+
"integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
|
| 762 |
+
"license": "MIT",
|
| 763 |
+
"dependencies": {
|
| 764 |
+
"es-errors": "^1.3.0",
|
| 765 |
+
"object-inspect": "^1.13.3",
|
| 766 |
+
"side-channel-list": "^1.0.0",
|
| 767 |
+
"side-channel-map": "^1.0.1",
|
| 768 |
+
"side-channel-weakmap": "^1.0.2"
|
| 769 |
+
},
|
| 770 |
+
"engines": {
|
| 771 |
+
"node": ">= 0.4"
|
| 772 |
+
},
|
| 773 |
+
"funding": {
|
| 774 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 775 |
+
}
|
| 776 |
+
},
|
| 777 |
+
"node_modules/side-channel-list": {
|
| 778 |
+
"version": "1.0.0",
|
| 779 |
+
"resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
|
| 780 |
+
"integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
|
| 781 |
+
"license": "MIT",
|
| 782 |
+
"dependencies": {
|
| 783 |
+
"es-errors": "^1.3.0",
|
| 784 |
+
"object-inspect": "^1.13.3"
|
| 785 |
+
},
|
| 786 |
+
"engines": {
|
| 787 |
+
"node": ">= 0.4"
|
| 788 |
+
},
|
| 789 |
+
"funding": {
|
| 790 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 791 |
+
}
|
| 792 |
+
},
|
| 793 |
+
"node_modules/side-channel-map": {
|
| 794 |
+
"version": "1.0.1",
|
| 795 |
+
"resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
|
| 796 |
+
"integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
|
| 797 |
+
"license": "MIT",
|
| 798 |
+
"dependencies": {
|
| 799 |
+
"call-bound": "^1.0.2",
|
| 800 |
+
"es-errors": "^1.3.0",
|
| 801 |
+
"get-intrinsic": "^1.2.5",
|
| 802 |
+
"object-inspect": "^1.13.3"
|
| 803 |
+
},
|
| 804 |
+
"engines": {
|
| 805 |
+
"node": ">= 0.4"
|
| 806 |
+
},
|
| 807 |
+
"funding": {
|
| 808 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 809 |
+
}
|
| 810 |
+
},
|
| 811 |
+
"node_modules/side-channel-weakmap": {
|
| 812 |
+
"version": "1.0.2",
|
| 813 |
+
"resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
|
| 814 |
+
"integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
|
| 815 |
+
"license": "MIT",
|
| 816 |
+
"dependencies": {
|
| 817 |
+
"call-bound": "^1.0.2",
|
| 818 |
+
"es-errors": "^1.3.0",
|
| 819 |
+
"get-intrinsic": "^1.2.5",
|
| 820 |
+
"object-inspect": "^1.13.3",
|
| 821 |
+
"side-channel-map": "^1.0.1"
|
| 822 |
+
},
|
| 823 |
+
"engines": {
|
| 824 |
+
"node": ">= 0.4"
|
| 825 |
+
},
|
| 826 |
+
"funding": {
|
| 827 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 828 |
+
}
|
| 829 |
+
},
|
| 830 |
+
"node_modules/statuses": {
|
| 831 |
+
"version": "2.0.1",
|
| 832 |
+
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
|
| 833 |
+
"integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
|
| 834 |
+
"license": "MIT",
|
| 835 |
+
"engines": {
|
| 836 |
+
"node": ">= 0.8"
|
| 837 |
+
}
|
| 838 |
+
},
|
| 839 |
+
"node_modules/toidentifier": {
|
| 840 |
+
"version": "1.0.1",
|
| 841 |
+
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
|
| 842 |
+
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
|
| 843 |
+
"license": "MIT",
|
| 844 |
+
"engines": {
|
| 845 |
+
"node": ">=0.6"
|
| 846 |
+
}
|
| 847 |
+
},
|
| 848 |
+
"node_modules/tr46": {
|
| 849 |
+
"version": "0.0.3",
|
| 850 |
+
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
| 851 |
+
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
|
| 852 |
+
"license": "MIT"
|
| 853 |
+
},
|
| 854 |
+
"node_modules/type-is": {
|
| 855 |
+
"version": "1.6.18",
|
| 856 |
+
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
|
| 857 |
+
"integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
|
| 858 |
+
"license": "MIT",
|
| 859 |
+
"dependencies": {
|
| 860 |
+
"media-typer": "0.3.0",
|
| 861 |
+
"mime-types": "~2.1.24"
|
| 862 |
+
},
|
| 863 |
+
"engines": {
|
| 864 |
+
"node": ">= 0.6"
|
| 865 |
+
}
|
| 866 |
+
},
|
| 867 |
+
"node_modules/unpipe": {
|
| 868 |
+
"version": "1.0.0",
|
| 869 |
+
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
| 870 |
+
"integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
|
| 871 |
+
"license": "MIT",
|
| 872 |
+
"engines": {
|
| 873 |
+
"node": ">= 0.8"
|
| 874 |
+
}
|
| 875 |
+
},
|
| 876 |
+
"node_modules/utils-merge": {
|
| 877 |
+
"version": "1.0.1",
|
| 878 |
+
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
|
| 879 |
+
"integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
|
| 880 |
+
"license": "MIT",
|
| 881 |
+
"engines": {
|
| 882 |
+
"node": ">= 0.4.0"
|
| 883 |
+
}
|
| 884 |
+
},
|
| 885 |
+
"node_modules/vary": {
|
| 886 |
+
"version": "1.1.2",
|
| 887 |
+
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
| 888 |
+
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
|
| 889 |
+
"license": "MIT",
|
| 890 |
+
"engines": {
|
| 891 |
+
"node": ">= 0.8"
|
| 892 |
+
}
|
| 893 |
+
},
|
| 894 |
+
"node_modules/webidl-conversions": {
|
| 895 |
+
"version": "3.0.1",
|
| 896 |
+
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
| 897 |
+
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
|
| 898 |
+
"license": "BSD-2-Clause"
|
| 899 |
+
},
|
| 900 |
+
"node_modules/whatwg-url": {
|
| 901 |
+
"version": "5.0.0",
|
| 902 |
+
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
| 903 |
+
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
|
| 904 |
+
"license": "MIT",
|
| 905 |
+
"dependencies": {
|
| 906 |
+
"tr46": "~0.0.3",
|
| 907 |
+
"webidl-conversions": "^3.0.0"
|
| 908 |
+
}
|
| 909 |
+
}
|
| 910 |
+
}
|
| 911 |
+
}
|
package.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "climora",
|
| 3 |
+
"version": "1.0.0",
|
| 4 |
+
"main": "server.js",
|
| 5 |
+
"scripts": {
|
| 6 |
+
"start": "node server.js",
|
| 7 |
+
"dev": "nodemon server.js"
|
| 8 |
+
},
|
| 9 |
+
"dependencies": {
|
| 10 |
+
"cors": "^2.8.5",
|
| 11 |
+
"dotenv": "^16.0.3",
|
| 12 |
+
"express": "^4.18.2",
|
| 13 |
+
"node-fetch": "^2.6.12"
|
| 14 |
+
}
|
| 15 |
+
}
|
server.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const express = require('express');
|
| 2 |
+
const fetch = require('node-fetch');
|
| 3 |
+
const cors = require('cors');
|
| 4 |
+
const path = require('path');
|
| 5 |
+
require('dotenv').config();
|
| 6 |
+
|
| 7 |
+
const API_BASE = 'https://api.openweathermap.org/data/2.5';
|
| 8 |
+
const API_KEY = process.env.OPENWEATHER_API_KEY;
|
| 9 |
+
if (!API_KEY) {
|
| 10 |
+
console.error('Missing OPENWEATHER_API_KEY in .env');
|
| 11 |
+
process.exit(1);
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
const app = express();
|
| 15 |
+
app.use(cors());
|
| 16 |
+
app.use(express.static(path.join(__dirname)));
|
| 17 |
+
|
| 18 |
+
app.get('/api/weather', async (req, res) => {
|
| 19 |
+
try {
|
| 20 |
+
const { q, lat, lon } = req.query;
|
| 21 |
+
if (!q && !(lat && lon)) {
|
| 22 |
+
return res.status(400).json({ error: 'q or lat+lon required' });
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
const params = q
|
| 26 |
+
? `q=${encodeURIComponent(q)}`
|
| 27 |
+
: `lat=${encodeURIComponent(lat)}&lon=${encodeURIComponent(lon)}`;
|
| 28 |
+
|
| 29 |
+
const url = `${API_BASE}/weather?${params}&appid=${API_KEY}&units=metric`;
|
| 30 |
+
const r = await fetch(url);
|
| 31 |
+
const data = await r.json();
|
| 32 |
+
res.status(r.status).json(data);
|
| 33 |
+
} catch (err) {
|
| 34 |
+
console.error(err);
|
| 35 |
+
res.status(500).json({ error: 'Server error' });
|
| 36 |
+
}
|
| 37 |
+
});
|
| 38 |
+
|
| 39 |
+
const PORT = process.env.PORT || 3000;
|
| 40 |
+
app.listen(PORT, () => console.log(`Server listening on ${PORT}`));
|