From c070df33306ab35f12720ac629837fb2e410ab0e Mon Sep 17 00:00:00 2001 From: "cloudflare-workers-and-pages[bot]" <73139402+cloudflare-workers-and-pages[bot]@users.noreply.github.com> Date: Tue, 26 May 2026 12:26:46 +0000 Subject: [PATCH] Add Cloudflare Workers configuration --- .gitignore | 4 + astro.config.mjs | 8 +- package-lock.json | 193 ++++++++++--------------------------------- package.json | 10 ++- public/.assetsignore | 2 + tsconfig.json | 13 ++- wrangler.jsonc | 13 +++ 7 files changed, 87 insertions(+), 156 deletions(-) create mode 100644 public/.assetsignore create mode 100644 wrangler.jsonc diff --git a/.gitignore b/.gitignore index 8c1581a..740dded 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,7 @@ pnpm-debug.log* # vscode (not used) .vscode/ + +.dev.vars* +!.dev.vars.example +!.env.example diff --git a/astro.config.mjs b/astro.config.mjs index 0ab64f9..f5bdc08 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,6 +4,8 @@ import react from '@astrojs/react'; import mdx from '@astrojs/mdx'; import minifyInlineScripts from './scripts/minify-inline-scripts.mjs'; +import cloudflare from '@astrojs/cloudflare'; + // EN is served at the apex of type10.com; DE is built under /de/ and served at the // apex of type10.de via a Cloudflare Pages Function (see functions/_middleware.ts). // `site` is the English canonical base; DE canonicals/hreflang are computed per-page @@ -12,6 +14,7 @@ export default defineConfig({ site: 'https://type10.com', trailingSlash: 'never', build: { format: 'file' }, + i18n: { defaultLocale: 'en', locales: ['en', 'de'], @@ -20,8 +23,11 @@ export default defineConfig({ redirectToDefaultLocale: false, }, }, + // Sitemaps are hand-rolled per locale/domain in src/pages/sitemap.xml.ts and // src/pages/de/sitemap.xml.ts — @astrojs/sitemap can't express the two-domain // + localized-slug structure (it would emit type10.com/de/... URLs). integrations: [react(), mdx(), minifyInlineScripts()], -}); + + adapter: cloudflare(), +}); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index e86a5a2..144b7a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "type10-website", "version": "0.0.1", "dependencies": { + "@astrojs/cloudflare": "^13.5.4", "@astrojs/mdx": "^5.0.6", "@astrojs/react": "^5.0.5", "@astrojs/sitemap": "^3.7.2", @@ -79,6 +80,24 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/@astrojs/cloudflare": { + "version": "13.5.4", + "resolved": "https://registry.npmjs.org/@astrojs/cloudflare/-/cloudflare-13.5.4.tgz", + "integrity": "sha512-LX/G5gDLBZjj/qVBrW83j/EkfpQDiKVSQ9iRTv0n+DamTjCuVwoYILSEatsqZ86hDRoTzzEt5G5G15UQ+/VulA==", + "license": "MIT", + "dependencies": { + "@astrojs/internal-helpers": "0.9.1", + "@astrojs/underscore-redirects": "1.0.3", + "@cloudflare/vite-plugin": "^1.32.3", + "piccolore": "^0.1.3", + "tinyglobby": "^0.2.15", + "vite": "^7.3.2" + }, + "peerDependencies": { + "astro": "^6.3.0", + "wrangler": "^4.83.0" + } + }, "node_modules/@astrojs/compiler": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-4.0.0.tgz", @@ -260,6 +279,12 @@ "node": "18.20.8 || ^20.3.0 || >=22.0.0" } }, + "node_modules/@astrojs/underscore-redirects": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@astrojs/underscore-redirects/-/underscore-redirects-1.0.3.tgz", + "integrity": "sha512-cxnGSw+sJigBLdX4TMSZKkzV6C3gMLJMucDk2W+n281Xhie68T2/9f1+1NMNDCZsc5i0FED7Qt5I10g2O9wtZg==", + "license": "MIT" + }, "node_modules/@astrojs/yaml2ts": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/@astrojs/yaml2ts/-/yaml2ts-0.2.4.tgz", @@ -604,7 +629,6 @@ "version": "0.5.0", "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.5.0.tgz", "integrity": "sha512-jxQYkj8dSIzc0cD6cMMNdOc1UVjqSqu8BZdor5s8cGjW2I8BjODt/kWPVdY+u9zj3ms75Q5qaZgnxUad83+eAg==", - "dev": true, "license": "MIT OR Apache-2.0", "engines": { "node": ">=22.0.0" @@ -614,7 +638,6 @@ "version": "2.16.1", "resolved": "https://registry.npmjs.org/@cloudflare/unenv-preset/-/unenv-preset-2.16.1.tgz", "integrity": "sha512-ECxObrMfyTl5bhQf/lZCXwo5G6xX9IAUo+nDMKK4SZ8m4Jvvxp52vilxyySSWh2YTZz8+HQ07qGH/2rEom1vDw==", - "dev": true, "license": "MIT OR Apache-2.0", "peerDependencies": { "unenv": "2.0.0-rc.24", @@ -626,6 +649,23 @@ } } }, + "node_modules/@cloudflare/vite-plugin": { + "version": "1.38.0", + "resolved": "https://registry.npmjs.org/@cloudflare/vite-plugin/-/vite-plugin-1.38.0.tgz", + "integrity": "sha512-ndb83ywNF2fU5Eb/YSH1ik5cJAU0CSdkRacbV8UbnMw8DLyOgK9fC8ovjA7uT7xdHoPgZTyh5iR3pqFo/2UHrw==", + "license": "MIT", + "dependencies": { + "@cloudflare/unenv-preset": "2.16.1", + "miniflare": "4.20260521.0", + "unenv": "2.0.0-rc.24", + "wrangler": "4.94.0", + "ws": "8.20.1" + }, + "peerDependencies": { + "vite": "^6.1.0 || ^7.0.0 || ^8.0.0", + "wrangler": "^4.94.0" + } + }, "node_modules/@cloudflare/workerd-darwin-64": { "version": "1.20260521.1", "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20260521.1.tgz", @@ -633,7 +673,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "Apache-2.0", "optional": true, "os": [ @@ -650,7 +689,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "Apache-2.0", "optional": true, "os": [ @@ -667,7 +705,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "Apache-2.0", "optional": true, "os": [ @@ -684,7 +721,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "Apache-2.0", "optional": true, "os": [ @@ -701,7 +737,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "Apache-2.0", "optional": true, "os": [ @@ -715,14 +750,13 @@ "version": "4.20260523.1", "resolved": "https://registry.npmjs.org/@cloudflare/workers-types/-/workers-types-4.20260523.1.tgz", "integrity": "sha512-Kr66Jip2K3t0srdoLLImzblTTx2T409Zk2J6AHANmlB950rlHr2henMQx7+cdQOLm2p1CttuBcYB1UVjdiFN8Q==", - "dev": true, + "devOptional": true, "license": "MIT OR Apache-2.0" }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "0.3.9" @@ -735,7 +769,6 @@ "version": "0.3.9", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", @@ -1278,7 +1311,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz", "integrity": "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==", - "devOptional": true, "license": "MIT", "engines": { "node": ">=18" @@ -1367,9 +1399,6 @@ "cpu": [ "arm" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1386,9 +1415,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1405,9 +1431,6 @@ "cpu": [ "ppc64" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1424,9 +1447,6 @@ "cpu": [ "riscv64" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1443,9 +1463,6 @@ "cpu": [ "s390x" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1462,9 +1479,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1481,9 +1495,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1500,9 +1511,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1519,9 +1527,6 @@ "cpu": [ "arm" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1544,9 +1549,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1569,9 +1571,6 @@ "cpu": [ "ppc64" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1594,9 +1593,6 @@ "cpu": [ "riscv64" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1619,9 +1615,6 @@ "cpu": [ "s390x" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1644,9 +1637,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1669,9 +1659,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1694,9 +1681,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1889,7 +1873,6 @@ "version": "4.1.6", "resolved": "https://registry.npmjs.org/@poppinss/colors/-/colors-4.1.6.tgz", "integrity": "sha512-H9xkIdFswbS8n1d6vmRd8+c10t2Qe+rZITbbDHHkQixH5+2x1FDGmi/0K+WgWiqQFKPSlIYB7jlH6Kpfn6Fleg==", - "dev": true, "license": "MIT", "dependencies": { "kleur": "^4.1.5" @@ -1899,7 +1882,6 @@ "version": "0.6.5", "resolved": "https://registry.npmjs.org/@poppinss/dumper/-/dumper-0.6.5.tgz", "integrity": "sha512-NBdYIb90J7LfOI32dOewKI1r7wnkiH6m920puQ3qHUeZkxNkQiFnXVWoE6YtFSv6QOiPPf7ys6i+HWWecDz7sw==", - "dev": true, "license": "MIT", "dependencies": { "@poppinss/colors": "^4.1.5", @@ -1911,7 +1893,6 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/@poppinss/exception/-/exception-1.2.3.tgz", "integrity": "sha512-dCED+QRChTVatE9ibtoaxc+WkdzOSjYTKi/+uacHWIsfodVfpsueo3+DKpgU5Px8qXjgmXkSvhXvSCz3fnP9lw==", - "dev": true, "license": "MIT" }, "node_modules/@rolldown/pluginutils": { @@ -2027,9 +2008,6 @@ "cpu": [ "arm" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2043,9 +2021,6 @@ "cpu": [ "arm" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2059,9 +2034,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2075,9 +2047,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2091,9 +2060,6 @@ "cpu": [ "loong64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2107,9 +2073,6 @@ "cpu": [ "loong64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2123,9 +2086,6 @@ "cpu": [ "ppc64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2139,9 +2099,6 @@ "cpu": [ "ppc64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2155,9 +2112,6 @@ "cpu": [ "riscv64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2171,9 +2125,6 @@ "cpu": [ "riscv64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2187,9 +2138,6 @@ "cpu": [ "s390x" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2203,9 +2151,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2219,9 +2164,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2410,7 +2352,6 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-7.2.0.tgz", "integrity": "sha512-P1Cz1dWaFfR4IR+U13mqqiGsLFf1KbayybWwdd2vfctdV6hDpUkgCY0nKOLLTMSoRd/jJNjtbqzf13K8DCCXQw==", - "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -2423,7 +2364,6 @@ "version": "1.2.15", "resolved": "https://registry.npmjs.org/@speed-highlight/core/-/core-1.2.15.tgz", "integrity": "sha512-BMq1K3DsElxDWawkX6eLg9+CKJrTVGCBAWVuHXVUV2u0s2711qiChLSId6ikYPfxhdYocLNt3wWwSvDiTvFabw==", - "dev": true, "license": "CC0-1.0" }, "node_modules/@types/babel__core": { @@ -3417,7 +3357,6 @@ "version": "2.1.5", "resolved": "https://registry.npmjs.org/blake3-wasm/-/blake3-wasm-2.1.5.tgz", "integrity": "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==", - "dev": true, "license": "MIT" }, "node_modules/boolbase": { @@ -3810,7 +3749,6 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", - "devOptional": true, "license": "Apache-2.0", "engines": { "node": ">=8" @@ -3966,7 +3904,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/error-stack-parser-es/-/error-stack-parser-es-1.0.5.tgz", "integrity": "sha512-5qucVt2XcuGMcEGgWI7i+yZpmpByQ8J1lHhcL7PwqCwu9FPP3VUXzT4ltHe5i2z9dePwEHcDVOAfSnHsOlCXRA==", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/antfu" @@ -4805,7 +4742,6 @@ "version": "4.1.5", "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -5901,7 +5837,6 @@ "version": "4.20260521.0", "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-4.20260521.0.tgz", "integrity": "sha512-roRfxPq49OkuSeQsc43hRjSB1+HdHtDNKRwDEVk2hCjCBuBWxb5Wvwq88b0ULj6QVEJLN/+ZqF19M+h4VYJ/zg==", - "dev": true, "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "0.8.1", @@ -6181,14 +6116,12 @@ "version": "6.3.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", - "dev": true, "license": "MIT" }, "node_modules/pathe": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", - "dev": true, "license": "MIT" }, "node_modules/piccolore": { @@ -6740,7 +6673,6 @@ "version": "0.6.4", "resolved": "https://registry.npmjs.org/rosie-skills/-/rosie-skills-0.6.4.tgz", "integrity": "sha512-ojfhSiQRdZ2QyWbmKAHOSAUbaLYrTc5zIH7mS1jKoP8KCFSQddwVhMyFqldckTeybTfW3zNcsZzyOTzGTN1SBA==", - "dev": true, "license": "BSD-3-Clause", "bin": { "rosie-skills": "dist/bin.js" @@ -6761,7 +6693,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "BSD-3-Clause", "optional": true, "os": [ @@ -6775,7 +6706,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "BSD-3-Clause", "optional": true, "os": [ @@ -6789,7 +6719,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "BSD-3-Clause", "optional": true, "os": [ @@ -6827,7 +6756,6 @@ "version": "0.34.5", "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.34.5.tgz", "integrity": "sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==", - "devOptional": true, "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { @@ -7022,7 +6950,6 @@ "version": "10.2.2", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz", "integrity": "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==", - "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -7176,7 +7103,6 @@ "version": "7.24.8", "resolved": "https://registry.npmjs.org/undici/-/undici-7.24.8.tgz", "integrity": "sha512-6KQ/+QxK49Z/p3HO6E5ZCZWNnCasyZLa5ExaVYyvPxUwKtbCPMKELJOqh7EqOle0t9cH/7d2TaaTRRa6Nhs4YQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=20.18.1" @@ -7192,7 +7118,6 @@ "version": "2.0.0-rc.24", "resolved": "https://registry.npmjs.org/unenv/-/unenv-2.0.0-rc.24.tgz", "integrity": "sha512-i7qRCmY42zmCwnYlh9H2SvLEypEFGye5iRmEMKjcGi7zk9UquigRjFtTLz0TYqr0ZGLZhaMHl/foy1bZR+Cwlw==", - "dev": true, "license": "MIT", "dependencies": { "pathe": "^2.0.3" @@ -8353,7 +8278,6 @@ "version": "1.20260521.1", "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20260521.1.tgz", "integrity": "sha512-HzIThcZ0ZVEuzVxpY2IYZ3yssSrTjtrWXAVfmOl5rVwyqcu7aeZXGMiwrEmi9MOcC3wjy+BNv+hFrMMY5OrjQQ==", - "dev": true, "hasInstallScript": true, "license": "Apache-2.0", "bin": { @@ -8374,7 +8298,6 @@ "version": "4.94.0", "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-4.94.0.tgz", "integrity": "sha512-GsNw0DomGFfeXFtKVTwn2X69UKcCxcTB0CXykjsMineJIxOeyrw7LovlHQ/3JU8KJHH7repLB+kOHvfTBA/Eew==", - "dev": true, "license": "MIT OR Apache-2.0", "dependencies": { "@cloudflare/kv-asset-handler": "0.5.0", @@ -8413,7 +8336,6 @@ "cpu": [ "ppc64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8430,7 +8352,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8447,7 +8368,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8464,7 +8384,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8481,7 +8400,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8498,7 +8416,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8515,7 +8432,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8532,7 +8448,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8549,7 +8464,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8566,7 +8480,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8583,7 +8496,6 @@ "cpu": [ "ia32" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8600,7 +8512,6 @@ "cpu": [ "loong64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8617,7 +8528,6 @@ "cpu": [ "mips64el" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8634,7 +8544,6 @@ "cpu": [ "ppc64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8651,7 +8560,6 @@ "cpu": [ "riscv64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8668,7 +8576,6 @@ "cpu": [ "s390x" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8685,7 +8592,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8702,7 +8608,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8719,7 +8624,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8736,7 +8640,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8753,7 +8656,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8770,7 +8672,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8787,7 +8688,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8804,7 +8704,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8821,7 +8720,6 @@ "cpu": [ "ia32" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8838,7 +8736,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -8852,7 +8749,6 @@ "version": "0.27.3", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.3.tgz", "integrity": "sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==", - "dev": true, "hasInstallScript": true, "license": "MIT", "bin": { @@ -8912,7 +8808,6 @@ "version": "8.20.1", "resolved": "https://registry.npmjs.org/ws/-/ws-8.20.1.tgz", "integrity": "sha512-It4dO0K5v//JtTXuPkfEOaI3uUN87iYPnqo/ZzqCoG3g8uhA66QUMs/SrM0YK7/NAu+r4LMh/9dq2A7k+rHs+w==", - "dev": true, "license": "MIT", "engines": { "node": ">=10.0.0" @@ -9065,7 +8960,6 @@ "version": "4.1.0-beta.10", "resolved": "https://registry.npmjs.org/youch/-/youch-4.1.0-beta.10.tgz", "integrity": "sha512-rLfVLB4FgQneDr0dv1oddCVZmKjcJ6yX6mS4pU82Mq/Dt9a3cLZQ62pDBL4AUO+uVrCvtWz3ZFUL2HFAFJ/BXQ==", - "dev": true, "license": "MIT", "dependencies": { "@poppinss/colors": "^4.1.5", @@ -9079,7 +8973,6 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/youch-core/-/youch-core-0.3.3.tgz", "integrity": "sha512-ho7XuGjLaJ2hWHoK8yFnsUGy2Y5uDpqSTq1FkHLK4/oqKtyUU1AFbOOxY4IpC9f0fTLjwYbslUz0Po5BpD1wrA==", - "dev": true, "license": "MIT", "dependencies": { "@poppinss/exception": "^1.2.2", diff --git a/package.json b/package.json index 5b17fa3..c1ae9a2 100644 --- a/package.json +++ b/package.json @@ -8,16 +8,19 @@ "scripts": { "dev": "astro dev", "build": "astro build", - "preview": "astro preview", + "preview": "npm run build && wrangler dev", "preview:cf": "astro build && wrangler pages dev dist --compatibility-date=2024-05-01 --port 8788", "check": "astro check", "check:seo": "npm run build && node scripts/check-seo.mjs", "astro": "astro", "cloudflare:setup": "wrangler pages deploy dist --project-name=website", "cloudflare:login": "wrangler login", - "cloudflare:deploy": "wrangler pages deploy dist --project-name=website" + "cloudflare:deploy": "wrangler pages deploy dist --project-name=website", + "generate-types": "wrangler types", + "deploy": "npm run build && wrangler deploy" }, "dependencies": { + "@astrojs/cloudflare": "^13.5.4", "@astrojs/mdx": "^5.0.6", "@astrojs/react": "^5.0.5", "@astrojs/sitemap": "^3.7.2", @@ -35,5 +38,8 @@ "esbuild": "^0.28.0", "typescript": "^6.0.3", "wrangler": "^4.94.0" + }, + "overrides": { + "vite": "^7" } } diff --git a/public/.assetsignore b/public/.assetsignore new file mode 100644 index 0000000..1b006a0 --- /dev/null +++ b/public/.assetsignore @@ -0,0 +1,2 @@ +_worker.js +_routes.json \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 67c2bd7..583882c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,12 @@ { "extends": "astro/tsconfigs/strict", - "include": [".astro/types.d.ts", "**/*"], - "exclude": ["dist", "functions"] -} + "include": [ + ".astro/types.d.ts", + "**/*", + "./worker-configuration.d.ts" + ], + "exclude": [ + "dist", + "functions" + ] +} \ No newline at end of file diff --git a/wrangler.jsonc b/wrangler.jsonc new file mode 100644 index 0000000..e83c1bf --- /dev/null +++ b/wrangler.jsonc @@ -0,0 +1,13 @@ +{ + "compatibility_date": "2026-05-26", + "compatibility_flags": ["global_fetch_strictly_public"], + "name": "type10-website", + "main": "@astrojs/cloudflare/entrypoints/server", + "assets": { + "directory": "./dist", + "binding": "ASSETS" + }, + "observability": { + "enabled": true + } +} \ No newline at end of file