@astrojs/cloudflare 11.1.0 → 11.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -0
- package/dist/utils/generate-routes-json.js +2 -3
- package/package.json +11 -11
package/dist/index.js
CHANGED
|
@@ -50,6 +50,16 @@ export default function createIntegration(args) {
|
|
|
50
50
|
// https://developers.cloudflare.com/pages/functions/module-support/
|
|
51
51
|
// Allows imports of '.wasm', '.bin', and '.txt' file types
|
|
52
52
|
cloudflareModulePlugin,
|
|
53
|
+
{
|
|
54
|
+
name: 'vite:cf-imports',
|
|
55
|
+
enforce: 'pre',
|
|
56
|
+
resolveId(source) {
|
|
57
|
+
if (source.startsWith('cloudflare:')) {
|
|
58
|
+
return { id: source, external: true };
|
|
59
|
+
}
|
|
60
|
+
return null;
|
|
61
|
+
},
|
|
62
|
+
},
|
|
53
63
|
],
|
|
54
64
|
},
|
|
55
65
|
integrations: [astroWhen()],
|
|
@@ -237,9 +237,8 @@ export async function createRoutesFile(_config, logger, routes, pages, redirects
|
|
|
237
237
|
const AUTOMATIC_EXCLUDE_RULES_COUNT = deduplicatedExcludePaths.length;
|
|
238
238
|
const EXTENDED_EXCLUDE_RULES_COUNT = excludeExtends?.length ?? 0;
|
|
239
239
|
const EXCLUDE_RULES_COUNT = AUTOMATIC_EXCLUDE_RULES_COUNT + EXTENDED_EXCLUDE_RULES_COUNT;
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
EXCLUDE_RULES_COUNT > CLOUDFLARE_COMBINED_LIMIT) {
|
|
240
|
+
const OPTION2_TOTAL_COUNT = INCLUDE_RULES_COUNT + (includedPathsHaveWildcard ? EXCLUDE_RULES_COUNT : 0);
|
|
241
|
+
if (!hasPrerendered404 || OPTION2_TOTAL_COUNT > CLOUDFLARE_COMBINED_LIMIT) {
|
|
243
242
|
await writeRoutesFileToOutDir(_config, logger, ['/*'].concat(includeExtends?.map((entry) => entry.pattern) ?? []), deduplicatedExcludePaths
|
|
244
243
|
.map((path) => `${prependForwardSlash(path.join('/'))}`)
|
|
245
244
|
.slice(0, CLOUDFLARE_COMBINED_LIMIT -
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/cloudflare",
|
|
3
3
|
"description": "Deploy your site to Cloudflare Workers/Pages",
|
|
4
|
-
"version": "11.
|
|
4
|
+
"version": "11.2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"author": "withastro",
|
|
@@ -31,28 +31,28 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@astrojs/internal-helpers": "0.4.1",
|
|
33
33
|
"@astrojs/underscore-redirects": "^0.3.4",
|
|
34
|
-
"@cloudflare/workers-types": "^4.
|
|
34
|
+
"@cloudflare/workers-types": "^4.20241022.0",
|
|
35
35
|
"esbuild": "^0.21.5",
|
|
36
36
|
"estree-walker": "^3.0.3",
|
|
37
|
-
"magic-string": "^0.30.
|
|
38
|
-
"miniflare": "^3.
|
|
37
|
+
"magic-string": "^0.30.12",
|
|
38
|
+
"miniflare": "^3.20241018.0",
|
|
39
39
|
"tiny-glob": "^0.2.9",
|
|
40
|
-
"wrangler": "^3.
|
|
41
|
-
"@inox-tools/astro-when": "^0.2.
|
|
40
|
+
"wrangler": "^3.82.0",
|
|
41
|
+
"@inox-tools/astro-when": "^0.2.4"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"astro": "^4.10.3"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"astro": "^4.
|
|
47
|
+
"astro": "^4.16.7",
|
|
48
48
|
"cheerio": "1.0.0",
|
|
49
49
|
"execa": "^8.0.1",
|
|
50
50
|
"fast-glob": "^3.3.2",
|
|
51
|
-
"rollup": "^4.
|
|
51
|
+
"rollup": "^4.24.0",
|
|
52
52
|
"strip-ansi": "^7.1.0",
|
|
53
|
-
"vite": "^5.4.
|
|
54
|
-
"
|
|
55
|
-
"
|
|
53
|
+
"vite": "^5.4.10",
|
|
54
|
+
"@astrojs/test-utils": "0.0.1",
|
|
55
|
+
"astro-scripts": "0.0.14"
|
|
56
56
|
},
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"provenance": true
|