@astrojs/cloudflare 13.2.1 → 13.3.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.
|
@@ -14,6 +14,7 @@ const createPreviewServer = async ({
|
|
|
14
14
|
headers,
|
|
15
15
|
port,
|
|
16
16
|
host,
|
|
17
|
+
allowedHosts,
|
|
17
18
|
root
|
|
18
19
|
}) => {
|
|
19
20
|
const wranglerConfigPath = resolvePath(fileURLToPath(root), ".wrangler/deploy/config.json");
|
|
@@ -37,7 +38,7 @@ const createPreviewServer = async ({
|
|
|
37
38
|
port,
|
|
38
39
|
headers,
|
|
39
40
|
open: false,
|
|
40
|
-
allowedHosts
|
|
41
|
+
allowedHosts
|
|
41
42
|
},
|
|
42
43
|
plugins: [
|
|
43
44
|
cfVitePlugin({ ...globalThis.astroCloudflareOptions, viteEnvironment: { name: "ssr" } })
|
|
@@ -87,7 +88,7 @@ function serverStart({
|
|
|
87
88
|
host,
|
|
88
89
|
base
|
|
89
90
|
}) {
|
|
90
|
-
const version = "13.
|
|
91
|
+
const version = "13.3.0";
|
|
91
92
|
const localPrefix = `${colors.dim("\u2503")} Local `;
|
|
92
93
|
const networkPrefix = `${colors.dim("\u2503")} Network `;
|
|
93
94
|
const emptyPrefix = " ".repeat(11);
|
|
@@ -11,14 +11,14 @@ function astroFrontmatterScanPlugin() {
|
|
|
11
11
|
if (frontmatterMatch) {
|
|
12
12
|
const contents = frontmatterMatch[1].replace(/\breturn\s*;/g, "throw 0;").replace(/\breturn\b/g, "throw ");
|
|
13
13
|
return {
|
|
14
|
-
contents,
|
|
14
|
+
contents: contents + "\nexport default {}",
|
|
15
15
|
loader: "ts"
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
} catch {
|
|
19
19
|
}
|
|
20
20
|
return {
|
|
21
|
-
contents: "",
|
|
21
|
+
contents: "export default {}",
|
|
22
22
|
loader: "ts"
|
|
23
23
|
};
|
|
24
24
|
});
|
package/dist/utils/handler.js
CHANGED
|
@@ -89,9 +89,11 @@ async function handle(request, env, context) {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
|
+
const waitUntil = context.waitUntil.bind(context);
|
|
92
93
|
const response = await app.render(request, {
|
|
93
94
|
routeData,
|
|
94
95
|
locals,
|
|
96
|
+
waitUntil,
|
|
95
97
|
prerenderedErrorPageFetch: async (url) => {
|
|
96
98
|
return env.ASSETS.fetch(url.replace(/\.html$/, ""));
|
|
97
99
|
},
|
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.
|
|
4
|
+
"version": "13.3.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"author": "withastro",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"piccolore": "^0.1.3",
|
|
40
40
|
"tinyglobby": "^0.2.15",
|
|
41
41
|
"vite": "^7.3.2",
|
|
42
|
-
"@astrojs/
|
|
43
|
-
"@astrojs/
|
|
42
|
+
"@astrojs/underscore-redirects": "1.0.3",
|
|
43
|
+
"@astrojs/internal-helpers": "0.9.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"astro": "^6.0.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@types/node": "^25.2.2",
|
|
52
52
|
"cheerio": "1.2.0",
|
|
53
53
|
"devalue": "^5.6.3",
|
|
54
|
-
"astro": "6.
|
|
54
|
+
"astro": "6.2.0",
|
|
55
55
|
"astro-scripts": "0.0.14"
|
|
56
56
|
},
|
|
57
57
|
"publishConfig": {
|