@astrojs/cloudflare 13.0.0-alpha.4 → 13.0.0-beta.1
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/entrypoints/preview.js +1 -1
- package/dist/index.js +4 -2
- package/dist/utils/handler.js +11 -1
- package/package.json +8 -8
|
@@ -83,7 +83,7 @@ function serverStart({
|
|
|
83
83
|
host,
|
|
84
84
|
base
|
|
85
85
|
}) {
|
|
86
|
-
const version = "13.0.0-
|
|
86
|
+
const version = "13.0.0-beta.1";
|
|
87
87
|
const localPrefix = `${colors.dim("\u2503")} Local `;
|
|
88
88
|
const networkPrefix = `${colors.dim("\u2503")} Network `;
|
|
89
89
|
const emptyPrefix = " ".repeat(11);
|
package/dist/index.js
CHANGED
|
@@ -59,7 +59,7 @@ function createIntegration(args) {
|
|
|
59
59
|
build: {
|
|
60
60
|
client: new URL(`./client/`, config.outDir),
|
|
61
61
|
server: new URL("./_worker.js/", config.outDir),
|
|
62
|
-
serverEntry: "index.js",
|
|
62
|
+
serverEntry: config.build.serverEntry ?? "index.js",
|
|
63
63
|
redirects: false
|
|
64
64
|
},
|
|
65
65
|
session,
|
|
@@ -111,7 +111,8 @@ function createIntegration(args) {
|
|
|
111
111
|
"unstorage/drivers/cloudflare-kv-binding",
|
|
112
112
|
"astro:*",
|
|
113
113
|
"virtual:astro:*",
|
|
114
|
-
"virtual:astro-cloudflare:*"
|
|
114
|
+
"virtual:astro-cloudflare:*",
|
|
115
|
+
"virtual:@astrojs/*"
|
|
115
116
|
]
|
|
116
117
|
}
|
|
117
118
|
};
|
|
@@ -173,6 +174,7 @@ function createIntegration(args) {
|
|
|
173
174
|
edgeMiddleware: false,
|
|
174
175
|
buildOutput: "server"
|
|
175
176
|
},
|
|
177
|
+
entryType: "self",
|
|
176
178
|
previewEntrypoint: "@astrojs/cloudflare/entrypoints/preview",
|
|
177
179
|
supportedAstroFeatures: {
|
|
178
180
|
serverOutput: "stable",
|
package/dist/utils/handler.js
CHANGED
|
@@ -16,7 +16,17 @@ async function handle(request, env, context) {
|
|
|
16
16
|
if (app.manifest.assets.has(pathname)) {
|
|
17
17
|
return env.ASSETS.fetch(request.url.replace(/\.html$/, ""));
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
let routeData = void 0;
|
|
20
|
+
if (app.isDev()) {
|
|
21
|
+
const result = await app.devMatch(
|
|
22
|
+
app.getPathnameFromRequest(request)
|
|
23
|
+
);
|
|
24
|
+
if (result) {
|
|
25
|
+
routeData = result.routeData;
|
|
26
|
+
}
|
|
27
|
+
} else {
|
|
28
|
+
routeData = app.match(request);
|
|
29
|
+
}
|
|
20
30
|
if (!routeData) {
|
|
21
31
|
const asset = await env.ASSETS.fetch(
|
|
22
32
|
request.url.replace(/index.html$/, "").replace(/\.html$/, "")
|
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": "13.0.0-
|
|
4
|
+
"version": "13.0.0-beta.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"author": "withastro",
|
|
@@ -35,24 +35,24 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@cloudflare/vite-plugin": "^1.17.0",
|
|
38
|
-
"@cloudflare/workers-types": "^4.
|
|
38
|
+
"@cloudflare/workers-types": "^4.20260116.0",
|
|
39
39
|
"dotenv": "^17.2.3",
|
|
40
40
|
"piccolore": "^0.1.3",
|
|
41
41
|
"tinyglobby": "^0.2.15",
|
|
42
42
|
"vite": "^7.1.12",
|
|
43
|
-
"wrangler": "4.53.0",
|
|
44
43
|
"@astrojs/internal-helpers": "0.7.5",
|
|
45
44
|
"@astrojs/underscore-redirects": "1.0.0"
|
|
46
45
|
},
|
|
47
46
|
"peerDependencies": {
|
|
48
|
-
"astro": "^6.0.0-alpha.0"
|
|
47
|
+
"astro": "^6.0.0-alpha.0",
|
|
48
|
+
"wrangler": "^4.53.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"cheerio": "1.1.2",
|
|
52
|
-
"devalue": "^5.
|
|
53
|
-
"rollup": "^4.
|
|
54
|
-
"astro
|
|
55
|
-
"astro": "
|
|
52
|
+
"devalue": "^5.6.2",
|
|
53
|
+
"rollup": "^4.55.1",
|
|
54
|
+
"astro": "6.0.0-beta.2",
|
|
55
|
+
"astro-scripts": "0.0.14"
|
|
56
56
|
},
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"provenance": true
|