diff --git a/package-lock.json b/package-lock.json index 8c4a2fe7..d4cb5921 100644 --- a/package-lock.json +++ b/package-lock.json @@ -51,6 +51,7 @@ "prettier": "^3.6.0", "prettier-plugin-svelte": "^3.4.0", "prettier-plugin-tailwindcss": "^0.7.1", + "replace-in-file": "^8.3.0", "start-server-and-test": "^2.1.0", "svelte": "^5.43.2", "svelte-check": "^4.3.0", @@ -385,6 +386,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=18" }, @@ -428,6 +430,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=18" } @@ -1667,10 +1670,114 @@ "integrity": "sha512-oxDR/NTEJ1k+UFVQElaNIk65E/Z83HK1z1WI3lQyhTtnNg4R5oVXaPzK3jcpKG8UHKDVuDQHzn+wsxSz8RP3aw==", "dev": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "@swc/helpers": "^0.5.0" } }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/@isaacs/fs-minipass": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", @@ -1785,6 +1892,17 @@ "node": ">=12.0" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@polka/url": { "version": "1.0.0-next.28", "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.28.tgz", @@ -2250,6 +2368,7 @@ "integrity": "sha512-GAAbkWrbRJvysL7+HOWs5v/+TmnRcEQPeED2sUcDFTHpPvRYADEtScL6x8hWuKp0DKauJVaVJLTjQVy9e7cMiw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@standard-schema/spec": "^1.0.0", "@sveltejs/acorn-typescript": "^1.0.5", @@ -2298,6 +2417,7 @@ "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-6.2.0.tgz", "integrity": "sha512-nJsV36+o7rZUDlrnSduMNl11+RoDE1cKqOI0yUEBCcqFoAZOk47TwD3dPKS2WmRutke9StXnzsPBslY7prDM9w==", "license": "MIT", + "peer": true, "dependencies": { "@sveltejs/vite-plugin-svelte-inspector": "^5.0.0", "debug": "^4.4.1", @@ -2948,6 +3068,7 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.0.tgz", "integrity": "sha512-n1H6IcDhmmUEG7TNVSspGmiHHutt7iVKtZwRppD7e04wha5MrkV1h3pti9xQLcCMt6YWsncpoT0HMjkH1FNwWQ==", "license": "MIT", + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.46.0", "@typescript-eslint/types": "8.46.0", @@ -3374,6 +3495,7 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -3888,6 +4010,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001688", "electron-to-chromium": "^1.5.73", @@ -4806,6 +4929,13 @@ "dev": true, "license": "MIT" }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -4870,6 +5000,7 @@ "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "ansi-colors": "^4.1.1", "strip-ansi": "^6.0.1" @@ -4952,6 +5083,7 @@ "integrity": "sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==", "hasInstallScript": true, "license": "MIT", + "peer": true, "bin": { "esbuild": "bin/esbuild" }, @@ -5038,6 +5170,7 @@ "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.0.tgz", "integrity": "sha512-iy2GE3MHrYTL5lrCtMZ0X1KLEKKUjmK0kzwcnefhR66txcEmXZD2YWgR5GNdcEwkNx3a0siYkSvl0vIC+Svjmg==", "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -5585,6 +5718,36 @@ } } }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -5784,6 +5947,27 @@ "assert-plus": "^1.0.0" } }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -5796,6 +5980,32 @@ "node": ">=10.13.0" } }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/global-dirs": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", @@ -6399,6 +6609,22 @@ "node": ">=8" } }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/javascript-natural-sort": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", @@ -6666,6 +6892,14 @@ "node": ">= 0.8.0" } }, + "node_modules/libphonenumber-js": { + "version": "1.12.26", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.12.26.tgz", + "integrity": "sha512-MagMOuqEXB2Pa90cWE+BoCmcKJx+de5uBIicaUkQ+uiEslZ0OBMNOkSZT/36syXNHu68UeayTxPm3DYM2IHoLQ==", + "dev": true, + "license": "MIT", + "optional": true + }, "node_modules/lightningcss": { "version": "1.30.1", "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.30.1.tgz", @@ -7721,6 +7955,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -7794,6 +8035,30 @@ "node": ">=8" } }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, "node_modules/pathe": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", @@ -7875,6 +8140,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -8012,6 +8278,7 @@ "integrity": "sha512-ujSB9uXHJKzM/2GBuE0hBOUgC77CN3Bnpqa+g80bkv3T3A93wL/xlzDATHhnhkzifz/UE2SNOvmbTz5hSkDlHw==", "dev": true, "license": "MIT", + "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -8028,6 +8295,7 @@ "integrity": "sha512-pn1ra/0mPObzqoIQn/vUTR3ZZI6UuZ0sHqMK5x2jMLGrs53h0sXhkVuDcrlssHwIMk7FYrMjHBPoUSyyEEDlBQ==", "dev": true, "license": "MIT", + "peer": true, "peerDependencies": { "prettier": "^3.0.0", "svelte": "^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0" @@ -8319,6 +8587,37 @@ "integrity": "sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==", "license": "MIT" }, + "node_modules/replace-in-file": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/replace-in-file/-/replace-in-file-8.3.0.tgz", + "integrity": "sha512-4VhddQiMCPIuypiwHDTM+XHjZoVu9h7ngBbSCnwGRcwdHwxltjt/m//Ep3GDwqaOx1fDSrKFQ+n7uo4uVcEz9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "glob": "^10.4.2", + "yargs": "^17.7.2" + }, + "bin": { + "replace-in-file": "bin/cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/replace-in-file/node_modules/chalk": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/request-progress": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", @@ -8393,6 +8692,7 @@ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.46.2.tgz", "integrity": "sha512-WMmLFI+Boh6xbop+OAGo9cQ3OgX9MIg7xOQjn+pTCwOkk+FNDAeAemXkJ3HzDJrVXleLOFVa1ipuc1AmEx1Dwg==", "license": "MIT", + "peer": true, "dependencies": { "@types/estree": "1.0.8" }, @@ -9024,6 +9324,22 @@ "node": ">=8" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/stringify-entities": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz", @@ -9050,6 +9366,20 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -9110,6 +9440,7 @@ "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.43.2.tgz", "integrity": "sha512-ro1umEzX8rT5JpCmlf0PPv7ncD8MdVob9e18bhwqTKNoLjS8kDvhVpaoYVPc+qMwDAOfcwJtyY7ZFSDbOaNPgA==", "license": "MIT", + "peer": true, "dependencies": { "@jridgewell/remapping": "^2.3.4", "@jridgewell/sourcemap-codec": "^1.5.0", @@ -9263,6 +9594,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "devalue": "^5.3.2", "memoize-weak": "^1.0.2", @@ -9412,6 +9744,7 @@ "integrity": "sha512-uSaO4gnW+b3Y2aWoWfFpX62vn2sR3skfhbjsEnaBI81WD1wBLlHZe5sWf0AqjksNdYTbGBEd0UasQMT3SNV15g==", "dev": true, "license": "MIT", + "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/dcastil" @@ -9441,7 +9774,8 @@ "version": "4.1.11", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.11.tgz", "integrity": "sha512-2E9TBm6MDD/xKYe+dvJZAmg3yxIEDNRc0jwlNyDg/4Fil2QcSLjFKGVff0lAf1jjeaArlG/M75Ey/EYr/OJtBA==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/tapable": { "version": "2.2.2", @@ -9746,6 +10080,7 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -10061,6 +10396,7 @@ "resolved": "https://registry.npmjs.org/vite/-/vite-7.2.2.tgz", "integrity": "sha512-BxAKBWmIbrDgrokdGZH1IgkIk/5mMHDreLDmCJ0qpyJaAteP8NvMhkwr/ZCQNqNH97bw/dANTE9PDzqwJghfMQ==", "license": "MIT", + "peer": true, "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.5.0", @@ -10169,6 +10505,7 @@ "integrity": "sha512-gR7INfiVRwnEOkCk47faros/9McCZMp5LM+OMNWGLaDBSvJxIzwjgNFufkuePBNaesGRnLmNfW+ddbUJRZn0nQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@vitest/expect": "4.0.6", "@vitest/mocker": "4.0.6", @@ -10397,6 +10734,25 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -10537,6 +10893,7 @@ "integrity": "sha512-JInaHOamG8pt5+Ey8kGmdcAcg3OL9reK8ltczgHTAwNhMys/6ThXHityHxVV2p3fkw/c+MAvBHFVYHFZDmjMCQ==", "dev": true, "license": "MIT", + "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/package.json b/package.json index 50b6f03c..c21c952b 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "dev": "svelte-kit sync && vite dev --host", "build": "svelte-kit sync && vite build -l info", - "build-weather": "BUILD_WEATHER_PAGES=true svelte-kit sync && BUILD_WEATHER_PAGES=true vite build -l info", + "build:weather": "BUILD_WEATHER_PAGES=true svelte-kit sync && BUILD_WEATHER_PAGES=true vite build -l info", "staging": "NODE_ENV=development vite build --mode development", "preview": "vite preview --host", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", @@ -50,6 +50,7 @@ "prettier": "^3.6.0", "prettier-plugin-svelte": "^3.4.0", "prettier-plugin-tailwindcss": "^0.7.1", + "replace-in-file": "^8.3.0", "start-server-and-test": "^2.1.0", "svelte": "^5.43.2", "svelte-check": "^4.3.0", diff --git a/scripts/fetch-domain-data.ts b/scripts/fetch-domain-data.ts new file mode 100644 index 00000000..b163c1fd --- /dev/null +++ b/scripts/fetch-domain-data.ts @@ -0,0 +1,56 @@ +import fs from 'fs'; +import { replaceInFileSync } from 'replace-in-file'; + +export const fetchDomainData = (generateNewOptionFiles = true) => { + return { + name: 'pull-domain-data', + transform(code, id, options) { + if (id.includes('src/routes/en/docs') && id.endsWith('options.ts')) { + if (options?.ssr) { + if (id.includes('dwd-api')) { + const basePath = id.replace('options.ts', ''); + const domainMetaData = JSON.parse( + fs.readFileSync(basePath + 'meta-data-poc.json', 'utf8') + ); + + fetch('https://openmeteo.s3.amazonaws.com/data/dwd_icon/static/meta.json') + .then((response) => response.json()) + .then(function (response) { + console.log(response); + let newHourly = `export const hourly = [ + [`; + for (const [index, variable] of domainMetaData.variables.entries()) { + newHourly += ` + { value: '${variable}', label: '${domainMetaData.labels[index]}' },`; + } + + newHourly += ` + ] +];`; + + const regex = /export const hourly = \[[\s\S]*?\];/; + + if (generateNewOptionFiles) { + const replaceOptions = { + files: basePath + 'domains/dwd-icon.ts', + from: regex, + to: newHourly, + countMatches: true + }; + + try { + const results = replaceInFileSync(replaceOptions); + console.log('Replacement results:', results); + } catch (error) { + console.error('Error occurred:', error); + } + } else { + return code.replace(regex, newHourly); + } + }); + } + } + } + } + }; +}; diff --git a/src/lib/components/variables/all-hourly.ts b/src/lib/components/variables/all-hourly.ts new file mode 100644 index 00000000..1fa542af --- /dev/null +++ b/src/lib/components/variables/all-hourly.ts @@ -0,0 +1,9 @@ +export const allHourly = [ + { value: 'temperature_2m', label: 'Temperature (2 m)' }, + { value: 'relative_humidity_2m', label: 'Relative Humidity (2 m)' }, + { value: 'apparent_temperature', label: 'Apparent Temperature' }, + { value: 'precipitation', label: 'Precipitation (rain + showers + snow)' }, + { value: 'surface_pressure', label: 'Surface Pressure' }, + { value: 'sea_level_pressure', label: 'Sea Level Pressure' }, + { value: 'weather_code', label: 'Weather code' } +]; diff --git a/src/lib/components/variables/hourly-variables-empty.svelte b/src/lib/components/variables/hourly-variables-empty.svelte new file mode 100644 index 00000000..de1164de --- /dev/null +++ b/src/lib/components/variables/hourly-variables-empty.svelte @@ -0,0 +1,5 @@ + + +
diff --git a/src/lib/components/variables/hourly-variables.svelte b/src/lib/components/variables/hourly-variables.svelte index 3d8b9d69..e342d9e7 100644 --- a/src/lib/components/variables/hourly-variables.svelte +++ b/src/lib/components/variables/hourly-variables.svelte @@ -1,53 +1,99 @@ -
-

Hourly Weather Variables

-
- {#each hourly as group, i (i)} -
- {#each group as { value, label } (value)} -
- { - if (params.hourly?.includes(value)) { - params.hourly = params.hourly.filter((item) => { - return item !== value; - }); - } else if (params.hourly) { - params.hourly.push(value); - params.hourly = params.hourly; - } - }} - /> - -
- {/each} -
- {/each} -
+
+ {#each hourly as group, i (i)} +
+ {#each group as { value, label } (value)} +
+ { + if (params.hourly?.includes(value)) { + params.hourly = params.hourly.filter((item: string) => { + return item !== value; + }); + } else if (params.hourly) { + params.hourly.push(value); + params.hourly = params.hourly; + } + }} + /> + +
+ {/each} +
+ {/each} + {#if notAvailable.length > 0} +
+
Not available for selected model:
+ {#each notAvailable as { value, label } (value)} +
+ { + if (params.hourly?.includes(value)) { + params.hourly = params.hourly.filter((item) => { + return item !== value; + }); + } + }} + /> + +
+ {/each} +
+ {/if}
diff --git a/src/routes/en/docs/dwd-api/+page.svelte b/src/routes/en/docs/dwd-api/+page.svelte index 64aec2e9..89626603 100644 --- a/src/routes/en/docs/dwd-api/+page.svelte +++ b/src/routes/en/docs/dwd-api/+page.svelte @@ -1,6 +1,8 @@ @@ -163,7 +172,7 @@ delivering 15-minutely data for short-term forecasts in central Europe and 11 km resolution global forecasts. The ICON model is a preferred choice in generic weather forecast APIgeneric weather forecast API if no other high resolution weather models are available. @@ -181,8 +190,38 @@ {lastDate} /> + + + + - +
+

+ Hourly Weather Variables +

+ {#await hourly} + + {:then hourly} + + {/await} +
diff --git a/src/routes/en/docs/dwd-api/domains/dwd-icon-d2.ts b/src/routes/en/docs/dwd-api/domains/dwd-icon-d2.ts new file mode 100644 index 00000000..44d80547 --- /dev/null +++ b/src/routes/en/docs/dwd-api/domains/dwd-icon-d2.ts @@ -0,0 +1,9 @@ +export const hourly = [ + [ + { value: 'temperature_2m', label: 'Temperature (2 m)' }, + { value: 'relative_humidity_2m', label: 'Relative Humidity (2 m)' }, + { value: 'surface_pressure', label: 'Surface Pressure' }, + { value: 'sea_level_pressure', label: 'Sea Level Pressure' }, + { value: 'weather_code', label: 'Weather code' } + ] +]; diff --git a/src/routes/en/docs/dwd-api/domains/dwd-icon-europe.ts b/src/routes/en/docs/dwd-api/domains/dwd-icon-europe.ts new file mode 100644 index 00000000..4714d68f --- /dev/null +++ b/src/routes/en/docs/dwd-api/domains/dwd-icon-europe.ts @@ -0,0 +1,10 @@ +export const hourly = [ + [ + { value: 'temperature_2m', label: 'Temperature (2 m)' }, + { value: 'relative_humidity_2m', label: 'Relative Humidity (2 m)' }, + { value: 'apparent_temperature', label: 'Apparent Temperature' }, + { value: 'precipitation', label: 'Precipitation (rain + showers + snow)' }, + { value: 'surface_pressure', label: 'Surface Pressure' }, + { value: 'sea_level_pressure', label: 'Sea Level Pressure' } + ] +]; diff --git a/src/routes/en/docs/dwd-api/domains/dwd-icon.ts b/src/routes/en/docs/dwd-api/domains/dwd-icon.ts new file mode 100644 index 00000000..33c6e59d --- /dev/null +++ b/src/routes/en/docs/dwd-api/domains/dwd-icon.ts @@ -0,0 +1,9 @@ +export const hourly = [ + [ + { value: 'temperature_2m', label: 'Temperature (2 m)' }, + { value: 'relative_humidity_2m', label: 'Relative Humidity (2 m)' }, + { value: 'apparent_temperature', label: 'Apparent Temperature' }, + { value: 'precipitation', label: 'Precipitation (rain + showers + snow)' }, + { value: 'surface_pressure', label: 'Surface Pressure' }, + ] +]; diff --git a/src/routes/en/docs/dwd-api/meta-data-poc.json b/src/routes/en/docs/dwd-api/meta-data-poc.json new file mode 100644 index 00000000..82f5c98b --- /dev/null +++ b/src/routes/en/docs/dwd-api/meta-data-poc.json @@ -0,0 +1,23 @@ +{ + "chunk_time_length": 253, + "data_end_time": 1763643600, + "last_run_availability_time": 1763006383, + "last_run_initialisation_time": 1762992000, + "last_run_modification_time": 1763006383, + "temporal_resolution_seconds": 3600, + "update_interval_seconds": 21600, + "variables": [ + "temperature_2m", + "relative_humidity_2m", + "apparent_temperature", + "precipitation", + "surface_pressure" + ], + "labels": [ + "Temperature (2 m)", + "Relative Humidity (2 m)", + "Apparent Temperature", + "Precipitation (rain + showers + snow)", + "Surface Pressure" + ] +} diff --git a/svelte.config.js b/svelte.config.js index 3af7c113..08ac4edb 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -28,7 +28,7 @@ const mdsvexOptions = { const weatherRoutes = cityNames.map((city) => '/en/weather/week/' + city); if (process.env.BUILD_WEATHER_PAGES && process._eventsCount == 5) { - console.log(` Building ${weatherRoutes.length} weather pages`); + console.log(` Pregenerating ${weatherRoutes.length} weather pages`); } /** @type {import('@sveltejs/kit').Config} */ @@ -55,9 +55,12 @@ const config = { '/en/docs/seasonal-forecast-api', '/en/weather/week', ...weatherRoutes - ] + ], + handleUnseenRoutes: 'warn' } - : {}, + : { + concurrency: 10 // usefull when making requests for domains + }, paths: { relative: false }, diff --git a/vite.config.ts b/vite.config.ts index 585f6f7d..a7daa751 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -6,8 +6,9 @@ import { visualizer } from 'rollup-plugin-visualizer'; import { type UserConfig, defineConfig } from 'vite'; import rollupOptions from './rollup.config'; +import { fetchDomainData } from './scripts/fetch-domain-data'; -function replaceChunckNames() { +const replaceChunckNames = () => { return { name: 'replace-chunk-names-plugin', apply: 'build' as const, @@ -17,10 +18,11 @@ function replaceChunckNames() { return config; } }; -} +}; export default defineConfig({ plugins: [ + fetchDomainData(), tailwindcss(), enhancedImages(), sveltekit(),