From 30d1f4698029ea8681346758e10aba6d1bf10dd3 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Thu, 28 Nov 2024 11:38:01 +0000 Subject: [PATCH] feat: use the new Workers Static Assets feature from Cloudflare This changes the adapter to stop using the old Workers Sites (kv-asset-handler) approach. Instead, making use of the new Workers Static Assets feature, which is embedded into Cloudflare natively. Also this change removes the extra esbuild step that was being run inside the adapter, relying upon Wrangler to do the bundling. The extra esbuild step required a hardcoded list of Node.js compatible modules. This is no longer needed since Wrangler now manages all of that. - This version of the adapter requires Wrangler version 3.87.0 or later. Run `npm add -D wrangler@latest` (or similar) in your project to update Wrangler. - The user's Wrangler configuration (`wrangler.toml`) must be migrated from using Workers Sites to using Workers Assets. Previously a user's `wrangler.toml` might look like: ```toml name = "" account_id = "" compatibility_date = "2021-11-12" main = "./.cloudflare/worker.js" # Workers Sites configuration site.bucket = "./.cloudflare/public" ``` Change it to to look like: ```toml name = "" account_id = "" compatibility_date = "2021-11-12"` main = ".svelte-kit/cloudflare/server/index.js" # Workers Assets configuration assets = { directory = ".svelte-kit/cloudflare/client" } ``` - Workers Assets defaults to serving assets directly for a matching request, rather than routing it through the Worker code. The previous adapter would add custom headers to assets responses (such as `cache-control`, `content-type`, and `x-robots-tag`. Such direct asset responses no longer contain these headers - but the will include eTag headers that have proven (in Pages) to be an effective caching strategy for assets. If you wish to always run the Worker before every request then add `serve_directly = false` to the assets configuration section. For example: ```toml assets = { directory = ".svelte-kit/cloudflare/client", serve_directly = false } ``` --- .changeset/smart-owls-trade.md | 53 +++++ packages/adapter-cloudflare-workers/README.md | 2 +- .../files/_package.json | 9 - .../adapter-cloudflare-workers/files/entry.js | 45 +---- packages/adapter-cloudflare-workers/index.js | 142 +++----------- .../adapter-cloudflare-workers/package.json | 3 +- .../placeholders.d.ts | 5 - pnpm-lock.yaml | 183 +++++++++++++++++- 8 files changed, 260 insertions(+), 182 deletions(-) create mode 100644 .changeset/smart-owls-trade.md delete mode 100644 packages/adapter-cloudflare-workers/files/_package.json diff --git a/.changeset/smart-owls-trade.md b/.changeset/smart-owls-trade.md new file mode 100644 index 000000000000..576b467b6134 --- /dev/null +++ b/.changeset/smart-owls-trade.md @@ -0,0 +1,53 @@ +--- +'@sveltejs/adapter-cloudflare-workers': major +--- + +feat: use the new Workers Static Assets feature from Cloudflare + +This changes the adapter to stop using the old Workers Sites (kv-asset-handler) approach. +Instead, making use of the new Workers Static Assets feature, which is embedded into Cloudflare natively. + +Also this change removes the extra esbuild step that was being run inside the adapter, relying upon Wrangler to do the bundling. +The extra esbuild step required a hardcoded list of Node.js compatible modules. +This is no longer needed since Wrangler now manages all of that. + +## Breaking changes and migration + +- This version of the adapter requires Wrangler version 3.87.0 or later. + + Run `npm add -D wrangler@latest` (or similar) in your project to update Wrangler. +- The user's Wrangler configuration (`wrangler.toml`) must be migrated from using Workers Sites to using Workers Assets. + + Previously a user's `wrangler.toml` might look like: + + ```toml + name = "" + account_id = "" + compatibility_date = "2021-11-12" + main = "./.cloudflare/worker.js" + + # Workers Sites configuration + site.bucket = "./.cloudflare/public" + ``` + + Change it to to look like: + + ```toml + name = "" + account_id = "" + compatibility_date = "2021-11-12"` + main = ".svelte-kit/cloudflare/server/index.js" + + # Workers Assets configuration + assets = { directory = ".svelte-kit/cloudflare/client" } + ``` + +- Workers Assets defaults to serving assets directly for a matching request, rather than routing it through the Worker code. + + The previous adapter would add custom headers to assets responses (such as `cache-control`, `content-type`, and `x-robots-tag`. Such direct asset responses no longer contain these headers - but the will include eTag headers that have proven (in Pages) to be an effective caching strategy for assets. + + If you wish to always run the Worker before every request then add `serve_directly = false` to the assets configuration section. For example: + + ```toml + assets = { directory = ".svelte-kit/cloudflare/client", serve_directly = false } + ``` diff --git a/packages/adapter-cloudflare-workers/README.md b/packages/adapter-cloudflare-workers/README.md index a3805020a4aa..ecf995809db8 100644 --- a/packages/adapter-cloudflare-workers/README.md +++ b/packages/adapter-cloudflare-workers/README.md @@ -2,7 +2,7 @@ SvelteKit adapter that creates a Cloudflare Workers site using a function for dynamic server rendering. -**Requires [Wrangler v2](https://developers.cloudflare.com/workers/wrangler/get-started/).** Wrangler v1 is no longer supported. +**Requires [Wrangler v3 or later](https://developers.cloudflare.com/workers/wrangler/get-started/).**. ## Docs diff --git a/packages/adapter-cloudflare-workers/files/_package.json b/packages/adapter-cloudflare-workers/files/_package.json deleted file mode 100644 index bc4c8d4aabac..000000000000 --- a/packages/adapter-cloudflare-workers/files/_package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "private": true, - "version": "0.0.1", - "description": "Worker site generated by SvelteKit", - "main": "index.js", - "dependencies": { - "@cloudflare/kv-asset-handler": "~0.1.3" - } -} diff --git a/packages/adapter-cloudflare-workers/files/entry.js b/packages/adapter-cloudflare-workers/files/entry.js index 5f022e5096b9..997eee746884 100644 --- a/packages/adapter-cloudflare-workers/files/entry.js +++ b/packages/adapter-cloudflare-workers/files/entry.js @@ -1,8 +1,5 @@ import { Server } from 'SERVER'; import { manifest, prerendered, base_path } from 'MANIFEST'; -import { getAssetFromKV, mapRequestToAsset } from '@cloudflare/kv-asset-handler'; -import static_asset_manifest_json from '__STATIC_CONTENT_MANIFEST'; -const static_asset_manifest = JSON.parse(static_asset_manifest_json); const server = new Server(manifest); @@ -25,7 +22,7 @@ export default { // static assets if (url.pathname.startsWith(app_path)) { /** @type {Response} */ - const res = await get_asset_from_kv(req, env, context); + const res = await env.ASSETS.fetch(req); if (is_error(res.status)) return res; const cache_control = url.pathname.startsWith(immutable) @@ -65,20 +62,11 @@ export default { let location = pathname.at(-1) === '/' ? stripped_pathname : pathname + '/'; - if ( - is_static_asset || - prerendered.has(pathname) || - pathname === version_file || - pathname.startsWith(immutable) - ) { - return get_asset_from_kv(req, env, context, (request, options) => { - if (prerendered.has(pathname)) { - url.pathname = '/' + prerendered.get(pathname).file; - return new Request(url.toString(), request); - } - - return mapRequestToAsset(request, options); - }); + if (prerendered.has(pathname)) { + url.pathname = '/' + prerendered.get(pathname).file; + return env.ASSETS.fetch(new Request(url.toString(), req)); + } else if (is_static_asset || pathname === version_file || pathname.startsWith(immutable)) { + return env.ASSETS.fetch(req); } else if (location && prerendered.has(location)) { if (search) location += search; return new Response('', { @@ -106,27 +94,6 @@ export default { } }; -/** - * @param {Request} req - * @param {any} env - * @param {any} context - */ -async function get_asset_from_kv(req, env, context, map = mapRequestToAsset) { - return await getAssetFromKV( - { - request: req, - waitUntil(promise) { - return context.waitUntil(promise); - } - }, - { - ASSET_NAMESPACE: env.__STATIC_CONTENT, - ASSET_MANIFEST: static_asset_manifest, - mapRequestToAsset: map - } - ); -} - /** * @param {number} status * @returns {boolean} diff --git a/packages/adapter-cloudflare-workers/index.js b/packages/adapter-cloudflare-workers/index.js index 8a4f9252d1ac..5fe79ad8a1dd 100644 --- a/packages/adapter-cloudflare-workers/index.js +++ b/packages/adapter-cloudflare-workers/index.js @@ -1,7 +1,5 @@ import { existsSync, readFileSync, writeFileSync } from 'node:fs'; import { posix, dirname } from 'node:path'; -import { execSync } from 'node:child_process'; -import esbuild from 'esbuild'; import toml from '@iarna/toml'; import { fileURLToPath } from 'node:url'; import { getPlatformProxy } from 'wrangler'; @@ -9,144 +7,58 @@ import { getPlatformProxy } from 'wrangler'; /** * @typedef {{ * main: string; - * site: { - * bucket: string; + * assets: { + * directory: string; + * binding: string; * } - * compatibility_flags?: string[]; * }} WranglerConfig */ -// list from https://developers.cloudflare.com/workers/runtime-apis/nodejs/ -const compatible_node_modules = [ - 'assert', - 'async_hooks', - 'buffer', - 'crypto', - 'diagnostics_channel', - 'events', - 'path', - 'process', - 'stream', - 'string_decoder', - 'util' -]; - /** @type {import('./index.js').default} */ export default function ({ config = 'wrangler.toml', platformProxy = {} } = {}) { return { name: '@sveltejs/adapter-cloudflare-workers', - async adapt(builder) { - const { main, site, compatibility_flags } = validate_config(builder, config); - + adapt(builder) { + const { main, assets } = validate_config(builder, config); const files = fileURLToPath(new URL('./files', import.meta.url).href); - const tmp = builder.getBuildDirectory('cloudflare-workers-tmp'); - - builder.rimraf(site.bucket); - builder.rimraf(dirname(main)); - - builder.log.info('Installing worker dependencies...'); - builder.copy(`${files}/_package.json`, `${tmp}/package.json`); - - // TODO would be cool if we could make this step unnecessary somehow - const stdout = execSync('npm install', { cwd: tmp }); - builder.log.info(stdout.toString()); + const outDir = dirname(main); + const relativePath = posix.relative(outDir, builder.getServerDirectory()); builder.log.minor('Generating worker...'); - const relativePath = posix.relative(tmp, builder.getServerDirectory()); - builder.copy(`${files}/entry.js`, `${tmp}/entry.js`, { + // Clear out old files + builder.rimraf(assets.directory); + builder.rimraf(outDir); + + // Create the entry-point for the Worker + builder.copy(`${files}/entry.js`, main, { replace: { SERVER: `${relativePath}/index.js`, - MANIFEST: './manifest.js' + MANIFEST: './manifest.js', + ASSETS: assets.binding || 'ASSETS' } }); + // Create the manifest for the Worker let prerendered_entries = Array.from(builder.prerendered.pages.entries()); - if (builder.config.kit.paths.base) { prerendered_entries = prerendered_entries.map(([path, { file }]) => [ path, { file: `${builder.config.kit.paths.base}/${file}` } ]); } - writeFileSync( - `${tmp}/manifest.js`, + `${outDir}/manifest.js`, `export const manifest = ${builder.generateManifest({ relativePath })};\n\n` + `export const prerendered = new Map(${JSON.stringify(prerendered_entries)});\n\n` + `export const base_path = ${JSON.stringify(builder.config.kit.paths.base)};\n` ); - const external = ['__STATIC_CONTENT_MANIFEST', 'cloudflare:*']; - if (compatibility_flags && compatibility_flags.includes('nodejs_compat')) { - external.push(...compatible_node_modules.map((id) => `node:${id}`)); - } - - try { - const result = await esbuild.build({ - platform: 'browser', - // https://github.com/cloudflare/workers-sdk/blob/a12b2786ce745f24475174bcec994ad691e65b0f/packages/wrangler/src/deployment-bundle/bundle.ts#L35-L36 - conditions: ['workerd', 'worker', 'browser'], - sourcemap: 'linked', - target: 'es2022', - entryPoints: [`${tmp}/entry.js`], - outfile: main, - bundle: true, - external, - alias: Object.fromEntries(compatible_node_modules.map((id) => [id, `node:${id}`])), - format: 'esm', - loader: { - '.wasm': 'copy', - '.woff': 'copy', - '.woff2': 'copy', - '.ttf': 'copy', - '.eot': 'copy', - '.otf': 'copy' - }, - logLevel: 'silent' - }); - - if (result.warnings.length > 0) { - const formatted = await esbuild.formatMessages(result.warnings, { - kind: 'warning', - color: true - }); - - console.error(formatted.join('\n')); - } - } catch (error) { - for (const e of error.errors) { - for (const node of e.notes) { - const match = - /The package "(.+)" wasn't found on the file system but is built into node/.exec( - node.text - ); - - if (match) { - node.text = `Cannot use "${match[1]}" when deploying to Cloudflare.`; - } - } - } - - const formatted = await esbuild.formatMessages(error.errors, { - kind: 'error', - color: true - }); - - console.error(formatted.join('\n')); - - throw new Error( - `Bundling with esbuild failed with ${error.errors.length} ${ - error.errors.length === 1 ? 'error' : 'errors' - }` - ); - } - builder.log.minor('Copying assets...'); - const bucket_dir = `${site.bucket}${builder.config.kit.paths.base}`; - builder.writeClient(bucket_dir); - builder.writePrerendered(bucket_dir); + const assets_dir = `${assets.directory}${builder.config.kit.paths.base}`; + builder.writeClient(assets_dir); + builder.writePrerendered(assets_dir); }, async emulate() { @@ -198,9 +110,9 @@ function validate_config(builder, config_file) { throw err; } - if (!wrangler_config.site?.bucket) { + if (!wrangler_config.assets?.directory) { throw new Error( - `You must specify site.bucket in ${config_file}. Consult https://developers.cloudflare.com/workers/platform/sites/configuration` + `You must specify assets.directory in ${config_file}. Consult https://developers.cloudflare.com/workers/platform/sites/configuration` ); } @@ -223,14 +135,10 @@ function validate_config(builder, config_file) { name = "" account_id = "" - - main = "./.cloudflare/worker.js" - site.bucket = "./.cloudflare/public" - + main = ".svelte-kit/cloudflare/server/index.js" + assets = { directory = ".svelte-kit/cloudflare/client" } build.command = "npm run build" - - compatibility_date = "2021-11-12" - workers_dev = true` + compatibility_date = "2021-11-12"` .replace(/^\t+/gm, '') .trim() ); diff --git a/packages/adapter-cloudflare-workers/package.json b/packages/adapter-cloudflare-workers/package.json index 3e82abd677d4..6e28203fcfc8 100644 --- a/packages/adapter-cloudflare-workers/package.json +++ b/packages/adapter-cloudflare-workers/package.json @@ -43,13 +43,12 @@ "esbuild": "^0.21.5" }, "devDependencies": { - "@cloudflare/kv-asset-handler": "^0.3.0", "@sveltejs/kit": "workspace:^", "@types/node": "^18.19.48", "typescript": "^5.3.3" }, "peerDependencies": { "@sveltejs/kit": "^2.0.0", - "wrangler": "^3.28.4" + "wrangler": "^3.87.0" } } diff --git a/packages/adapter-cloudflare-workers/placeholders.d.ts b/packages/adapter-cloudflare-workers/placeholders.d.ts index 3877ad52f4a5..50b543eb1452 100644 --- a/packages/adapter-cloudflare-workers/placeholders.d.ts +++ b/packages/adapter-cloudflare-workers/placeholders.d.ts @@ -9,8 +9,3 @@ declare module 'MANIFEST' { export const prerendered: Map; export const base_path: string; } - -declare module '__STATIC_CONTENT_MANIFEST' { - const json: string; - export default json; -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a33bda6a51ed..ede9012eda1f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -92,12 +92,9 @@ importers: specifier: ^0.21.5 version: 0.21.5 wrangler: - specifier: ^3.28.4 - version: 3.63.1(@cloudflare/workers-types@4.20240405.0) + specifier: ^3.87.0 + version: 3.90.0(@cloudflare/workers-types@4.20240405.0) devDependencies: - '@cloudflare/kv-asset-handler': - specifier: ^0.3.0 - version: 0.3.4 '@sveltejs/kit': specifier: workspace:^ version: link:../kit @@ -1207,30 +1204,64 @@ packages: cpu: [x64] os: [darwin] + '@cloudflare/workerd-darwin-64@1.20241106.1': + resolution: {integrity: sha512-zxvaToi1m0qzAScrxFt7UvFVqU8DxrCO2CinM1yQkv5no7pA1HolpIrwZ0xOhR3ny64Is2s/J6BrRjpO5dM9Zw==} + engines: {node: '>=16'} + cpu: [x64] + os: [darwin] + '@cloudflare/workerd-darwin-arm64@1.20240701.0': resolution: {integrity: sha512-w80ZVAgfH4UwTz7fXZtk7KmS2FzlXniuQm4ku4+cIgRTilBAuKqjpOjwUCbx5g13Gqcm9NuiHce+IDGtobRTIQ==} engines: {node: '>=16'} cpu: [arm64] os: [darwin] + '@cloudflare/workerd-darwin-arm64@1.20241106.1': + resolution: {integrity: sha512-j3dg/42D/bPgfNP3cRUBxF+4waCKO/5YKwXNj+lnVOwHxDu+ne5pFw9TIkKYcWTcwn0ZUkbNZNM5rhJqRn4xbg==} + engines: {node: '>=16'} + cpu: [arm64] + os: [darwin] + '@cloudflare/workerd-linux-64@1.20240701.0': resolution: {integrity: sha512-UWLr/Anxwwe/25nGv451MNd2jhREmPt/ws17DJJqTLAx6JxwGWA15MeitAIzl0dbxRFAJa+0+R8ag2WR3F/D6g==} engines: {node: '>=16'} cpu: [x64] os: [linux] + '@cloudflare/workerd-linux-64@1.20241106.1': + resolution: {integrity: sha512-Ih+Ye8E1DMBXcKrJktGfGztFqHKaX1CeByqshmTbODnWKHt6O65ax3oTecUwyC0+abuyraOpAtdhHNpFMhUkmw==} + engines: {node: '>=16'} + cpu: [x64] + os: [linux] + '@cloudflare/workerd-linux-arm64@1.20240701.0': resolution: {integrity: sha512-3kCnF9kYgov1ggpuWbgpXt4stPOIYtVmPCa7MO2xhhA0TWP6JDUHRUOsnmIgKrvDjXuXqlK16cdg3v+EWsaPJg==} engines: {node: '>=16'} cpu: [arm64] os: [linux] + '@cloudflare/workerd-linux-arm64@1.20241106.1': + resolution: {integrity: sha512-mdQFPk4+14Yywn7n1xIzI+6olWM8Ybz10R7H3h+rk0XulMumCWUCy1CzIDauOx6GyIcSgKIibYMssVHZR30ObA==} + engines: {node: '>=16'} + cpu: [arm64] + os: [linux] + '@cloudflare/workerd-windows-64@1.20240701.0': resolution: {integrity: sha512-6IPGITRAeS67j3BH1rN4iwYWDt47SqJG7KlZJ5bB4UaNAia4mvMBSy/p2p4vA89bbXoDRjMtEvRu7Robu6O7hQ==} engines: {node: '>=16'} cpu: [x64] os: [win32] + '@cloudflare/workerd-windows-64@1.20241106.1': + resolution: {integrity: sha512-4rtcss31E/Rb/PeFocZfr+B9i1MdrkhsTBWizh8siNR4KMmkslU2xs2wPaH1z8+ErxkOsHrKRa5EPLh5rIiFeg==} + engines: {node: '>=16'} + cpu: [x64] + os: [win32] + + '@cloudflare/workers-shared@0.8.0': + resolution: {integrity: sha512-1OvFkNtslaMZAJsaocTmbACApgmWv55uLpNj50Pn2MGcxdAjpqykXJFQw5tKc+lGV9TDZh9oO3Rsk17IEQDzIg==} + engines: {node: '>=16.7.0'} + '@cloudflare/workers-types@4.20240405.0': resolution: {integrity: sha512-sEVOhyOgXUwfLkgHqbLZa/sfkSYrh7/zLmI6EZNibPaVPvAnAcItbNNl3SAlLyLKuwf8m4wAIAgu9meKWCvXjg==} @@ -2192,6 +2223,10 @@ packages: resolution: {integrity: sha512-mxIojEAQcuEvT/lyXq+jf/3cO/KoA6z4CeNDGGevTybECPOMFCnQy3OPahluUkbqgPNGw5Bi78UC7Po6Lhy+NA==} engines: {node: '>= 14.16.0'} + chokidar@4.0.1: + resolution: {integrity: sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==} + engines: {node: '>= 14.16.0'} + chownr@2.0.0: resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} engines: {node: '>=10'} @@ -2276,6 +2311,9 @@ packages: date-fns@3.6.0: resolution: {integrity: sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==} + date-fns@4.1.0: + resolution: {integrity: sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==} + debug@4.3.5: resolution: {integrity: sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==} engines: {node: '>=6.0'} @@ -2767,6 +2805,9 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + itty-time@1.0.6: + resolution: {integrity: sha512-+P8IZaLLBtFv8hCkIjcymZOp4UJ+xW6bSlQsXGqrkmJh7vSiMFSlNne0mCYagEE0N7HDNR5jJBRxwN0oYv61Rw==} + js-yaml@3.14.1: resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} hasBin: true @@ -2938,6 +2979,11 @@ packages: engines: {node: '>=16.13'} hasBin: true + miniflare@3.20241106.1: + resolution: {integrity: sha512-dM3RBlJE8rUFxnqlPCaFCq0E7qQqEQvKbYX7W/APGCK+rLcyLmEBzC4GQR/niXdNM/oV6gdg9AA50ghnn2ALuw==} + engines: {node: '>=16.13'} + hasBin: true + minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} @@ -3049,6 +3095,9 @@ packages: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} + ohash@1.1.4: + resolution: {integrity: sha512-FlDryZAahJmEF3VR3w1KogSEdWX3WhA5GPakFx4J81kEAiHyLMpdLLElS8n8dfNadMgAne/MywcvmogzscVt4g==} + once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} @@ -3127,6 +3176,9 @@ packages: path-to-regexp@6.2.2: resolution: {integrity: sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==} + path-to-regexp@6.3.0: + resolution: {integrity: sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==} + path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -3635,8 +3687,8 @@ packages: engines: {node: '>=14.17'} hasBin: true - ufo@1.5.3: - resolution: {integrity: sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==} + ufo@1.5.4: + resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} @@ -3648,6 +3700,9 @@ packages: unenv-nightly@1.10.0-1717606461.a117952: resolution: {integrity: sha512-u3TfBX02WzbHTpaEfWEKwDijDSFAHcgXkayUZ+MVDrjhLFvgAJzFGTSTmwlEhwWi2exyRQey23ah9wELMM6etg==} + unenv-nightly@2.0.0-20241111-080453-894aa31: + resolution: {integrity: sha512-0W39QQOQ9VE8kVVUpGwEG+pZcsCXk5wqNG6rDPE6Gr+fiA69LR0qERM61hW5KCOkC1/ArCFrfCGjwHyyv/bI0Q==} + universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} @@ -3803,6 +3858,11 @@ packages: engines: {node: '>=16'} hasBin: true + workerd@1.20241106.1: + resolution: {integrity: sha512-1GdKl0kDw8rrirr/ThcK66Kbl4/jd4h8uHx5g7YHBrnenY5SX1UPuop2cnCzYUxlg55kPjzIqqYslz1muRFgFw==} + engines: {node: '>=16'} + hasBin: true + worktop@0.8.0-next.18: resolution: {integrity: sha512-+TvsA6VAVoMC3XDKR5MoC/qlLqDixEfOBysDEKnPIPou/NvoPWCAuXHXMsswwlvmEuvX56lQjvELLyLuzTKvRw==} engines: {node: '>=12'} @@ -3817,6 +3877,16 @@ packages: '@cloudflare/workers-types': optional: true + wrangler@3.90.0: + resolution: {integrity: sha512-E/6E9ORAl987+3kP8wDiE3L1lj9r4vQ32/dl5toIxIkSMssmPRQVdxqwgMxbxJrytbFNo8Eo6swgjd4y4nUaLg==} + engines: {node: '>=16.17.0'} + hasBin: true + peerDependencies: + '@cloudflare/workers-types': ^4.20241106.0 + peerDependenciesMeta: + '@cloudflare/workers-types': + optional: true + wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} @@ -4029,18 +4099,38 @@ snapshots: '@cloudflare/workerd-darwin-64@1.20240701.0': optional: true + '@cloudflare/workerd-darwin-64@1.20241106.1': + optional: true + '@cloudflare/workerd-darwin-arm64@1.20240701.0': optional: true + '@cloudflare/workerd-darwin-arm64@1.20241106.1': + optional: true + '@cloudflare/workerd-linux-64@1.20240701.0': optional: true + '@cloudflare/workerd-linux-64@1.20241106.1': + optional: true + '@cloudflare/workerd-linux-arm64@1.20240701.0': optional: true + '@cloudflare/workerd-linux-arm64@1.20241106.1': + optional: true + '@cloudflare/workerd-windows-64@1.20240701.0': optional: true + '@cloudflare/workerd-windows-64@1.20241106.1': + optional: true + + '@cloudflare/workers-shared@0.8.0': + dependencies: + mime: 3.0.0 + zod: 3.22.4 + '@cloudflare/workers-types@4.20240405.0': {} '@cspotcode/source-map-support@0.8.1': @@ -4938,6 +5028,10 @@ snapshots: dependencies: readdirp: 4.0.1 + chokidar@4.0.1: + dependencies: + readdirp: 4.0.1 + chownr@2.0.0: {} ci-info@3.9.0: {} @@ -5011,6 +5105,8 @@ snapshots: date-fns@3.6.0: {} + date-fns@4.1.0: {} + debug@4.3.5: dependencies: ms: 2.1.2 @@ -5544,6 +5640,8 @@ snapshots: isexe@2.0.0: {} + itty-time@1.0.6: {} + js-yaml@3.14.1: dependencies: argparse: 1.0.10 @@ -5701,6 +5799,25 @@ snapshots: - supports-color - utf-8-validate + miniflare@3.20241106.1: + dependencies: + '@cspotcode/source-map-support': 0.8.1 + acorn: 8.12.1 + acorn-walk: 8.3.2 + capnp-ts: 0.7.0 + exit-hook: 2.2.1 + glob-to-regexp: 0.4.1 + stoppable: 1.1.0 + undici: 5.28.4 + workerd: 1.20241106.1 + ws: 8.18.0 + youch: 3.3.3 + zod: 3.22.4 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + minimatch@3.1.2: dependencies: brace-expansion: 1.1.11 @@ -5787,6 +5904,8 @@ snapshots: object-assign@4.1.1: {} + ohash@1.1.4: {} + once@1.4.0: dependencies: wrappy: 1.0.2 @@ -5855,6 +5974,8 @@ snapshots: path-to-regexp@6.2.2: {} + path-to-regexp@6.3.0: {} + path-type@4.0.0: {} pathe@1.1.2: {} @@ -6350,7 +6471,7 @@ snapshots: typescript@5.6.3: {} - ufo@1.5.3: {} + ufo@1.5.4: {} undici-types@5.26.5: {} @@ -6365,7 +6486,14 @@ snapshots: mime: 3.0.0 node-fetch-native: 1.6.4 pathe: 1.1.2 - ufo: 1.5.3 + ufo: 1.5.4 + + unenv-nightly@2.0.0-20241111-080453-894aa31: + dependencies: + defu: 6.1.4 + ohash: 1.1.4 + pathe: 1.1.2 + ufo: 1.5.4 universalify@0.1.2: {} @@ -6505,6 +6633,14 @@ snapshots: '@cloudflare/workerd-linux-arm64': 1.20240701.0 '@cloudflare/workerd-windows-64': 1.20240701.0 + workerd@1.20241106.1: + optionalDependencies: + '@cloudflare/workerd-darwin-64': 1.20241106.1 + '@cloudflare/workerd-darwin-arm64': 1.20241106.1 + '@cloudflare/workerd-linux-64': 1.20241106.1 + '@cloudflare/workerd-linux-arm64': 1.20241106.1 + '@cloudflare/workerd-windows-64': 1.20241106.1 + worktop@0.8.0-next.18: dependencies: mrmime: 2.0.0 @@ -6536,6 +6672,35 @@ snapshots: - supports-color - utf-8-validate + wrangler@3.90.0(@cloudflare/workers-types@4.20240405.0): + dependencies: + '@cloudflare/kv-asset-handler': 0.3.4 + '@cloudflare/workers-shared': 0.8.0 + '@esbuild-plugins/node-globals-polyfill': 0.2.3(esbuild@0.17.19) + '@esbuild-plugins/node-modules-polyfill': 0.2.2(esbuild@0.17.19) + blake3-wasm: 2.1.5 + chokidar: 4.0.1 + date-fns: 4.1.0 + esbuild: 0.17.19 + itty-time: 1.0.6 + miniflare: 3.20241106.1 + nanoid: 3.3.7 + path-to-regexp: 6.3.0 + resolve: 1.22.8 + resolve.exports: 2.0.2 + selfsigned: 2.4.1 + source-map: 0.6.1 + unenv: unenv-nightly@2.0.0-20241111-080453-894aa31 + workerd: 1.20241106.1 + xxhash-wasm: 1.0.2 + optionalDependencies: + '@cloudflare/workers-types': 4.20240405.0 + fsevents: 2.3.3 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + wrappy@1.0.2: {} ws@8.18.0: {}