@astrojs/cloudflare 13.1.1 → 13.1.3
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/README.md +1 -1
- package/dist/entrypoints/preview.js +1 -1
- package/dist/index.js +1 -1
- package/dist/prerenderer.js +8 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @astrojs/cloudflare
|
|
2
2
|
|
|
3
|
-
An SSR adapter for use with Cloudflare
|
|
3
|
+
An SSR adapter for use with Cloudflare Workers targets. Write your code in Astro/JavaScript and deploy to Cloudflare Workers.
|
|
4
4
|
|
|
5
5
|
## Documentation
|
|
6
6
|
|
|
@@ -87,7 +87,7 @@ function serverStart({
|
|
|
87
87
|
host,
|
|
88
88
|
base
|
|
89
89
|
}) {
|
|
90
|
-
const version = "13.1.
|
|
90
|
+
const version = "13.1.3";
|
|
91
91
|
const localPrefix = `${colors.dim("\u2503")} Local `;
|
|
92
92
|
const networkPrefix = `${colors.dim("\u2503")} Network `;
|
|
93
93
|
const emptyPrefix = " ".repeat(11);
|
package/dist/index.js
CHANGED
|
@@ -212,7 +212,7 @@ function createIntegration({
|
|
|
212
212
|
{
|
|
213
213
|
enforce: "post",
|
|
214
214
|
name: "@astrojs/cloudflare:cf-externals",
|
|
215
|
-
applyToEnvironment: (environment) => environment.name === "ssr",
|
|
215
|
+
applyToEnvironment: (environment) => environment.name === "ssr" || environment.name === "prerender",
|
|
216
216
|
config(conf) {
|
|
217
217
|
if (conf.ssr) {
|
|
218
218
|
conf.ssr.external = void 0;
|
package/dist/prerenderer.js
CHANGED
|
@@ -55,8 +55,11 @@ function createCloudflarePrerenderer({
|
|
|
55
55
|
headers: { "Content-Type": "application/json" }
|
|
56
56
|
});
|
|
57
57
|
if (!response.ok) {
|
|
58
|
+
const body = await response.text();
|
|
59
|
+
const details = body ? `
|
|
60
|
+
${body}` : "";
|
|
58
61
|
throw new Error(
|
|
59
|
-
`Failed to get static paths from the Cloudflare prerender server (${response.status}: ${response.statusText})
|
|
62
|
+
`Failed to get static paths from the Cloudflare prerender server (${response.status}: ${response.statusText}).${details}`
|
|
60
63
|
);
|
|
61
64
|
}
|
|
62
65
|
const data = await response.json();
|
|
@@ -83,8 +86,11 @@ function createCloudflarePrerenderer({
|
|
|
83
86
|
headers: { "Content-Type": "application/json" }
|
|
84
87
|
});
|
|
85
88
|
if (!response.ok) {
|
|
89
|
+
const body = await response.text();
|
|
90
|
+
const details = body ? `
|
|
91
|
+
${body}` : "";
|
|
86
92
|
throw new Error(
|
|
87
|
-
`Failed to get static images from the Cloudflare prerender server (${response.status}: ${response.statusText})
|
|
93
|
+
`Failed to get static images from the Cloudflare prerender server (${response.status}: ${response.statusText}).${details}`
|
|
88
94
|
);
|
|
89
95
|
}
|
|
90
96
|
const entries = await response.json();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/cloudflare",
|
|
3
3
|
"description": "Deploy your site to Cloudflare Workers",
|
|
4
|
-
"version": "13.1.
|
|
4
|
+
"version": "13.1.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"author": "withastro",
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"tinyglobby": "^0.2.15",
|
|
42
42
|
"vite": "^7.3.1",
|
|
43
43
|
"@astrojs/internal-helpers": "0.8.0",
|
|
44
|
-
"@astrojs/underscore-redirects": "1.0.
|
|
44
|
+
"@astrojs/underscore-redirects": "1.0.2"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"astro": "^6.0.0
|
|
47
|
+
"astro": "^6.0.0",
|
|
48
48
|
"wrangler": "^4.61.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@types/node": "^25.2.2",
|
|
53
53
|
"cheerio": "1.2.0",
|
|
54
54
|
"devalue": "^5.6.3",
|
|
55
|
-
"astro": "6.0.
|
|
55
|
+
"astro": "6.0.8",
|
|
56
56
|
"astro-scripts": "0.0.14"
|
|
57
57
|
},
|
|
58
58
|
"publishConfig": {
|