@astrojs/cloudflare 13.6.1 → 14.0.0-alpha.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.
@@ -88,7 +88,7 @@ function serverStart({
88
88
  host,
89
89
  base
90
90
  }) {
91
- const version = "13.6.1";
91
+ const version = "14.0.0-alpha.1";
92
92
  const localPrefix = `${colors.dim("\u2503")} Local `;
93
93
  const networkPrefix = `${colors.dim("\u2503")} Network `;
94
94
  const emptyPrefix = " ".repeat(11);
package/dist/fetch.js CHANGED
@@ -10,9 +10,15 @@ import {
10
10
  createLocals,
11
11
  getClientAddress
12
12
  } from "./utils/cf.js";
13
- setGetEnv(createGetEnv(globalEnv));
14
- const app = createApp();
13
+ let app;
14
+ function ensureInitialized() {
15
+ if (!app) {
16
+ setGetEnv(createGetEnv(globalEnv));
17
+ app = createApp();
18
+ }
19
+ }
15
20
  async function cf(state, env, ctx) {
21
+ ensureInitialized();
16
22
  injectSessionBinding(app.manifest, env);
17
23
  const staticAsset = matchStaticAsset(app.manifest, state.request.url, env);
18
24
  if (staticAsset) return staticAsset;
package/dist/index.js CHANGED
@@ -343,10 +343,10 @@ function createIntegration({
343
343
  vite.ssr ||= {};
344
344
  vite.ssr.noExternal = true;
345
345
  vite.build ||= {};
346
- vite.build.rollupOptions ||= {};
347
- vite.build.rollupOptions.output ||= {};
348
- vite.build.rollupOptions.external = ["sharp"];
349
- vite.build.rollupOptions.output.banner ||= "globalThis.process ??= {}; globalThis.process.env ??= {};";
346
+ vite.build.rolldownOptions ||= {};
347
+ vite.build.rolldownOptions.output ||= {};
348
+ vite.build.rolldownOptions.external = ["sharp"];
349
+ vite.build.rolldownOptions.output.banner ||= "globalThis.process ??= {}; globalThis.process.env ??= {};";
350
350
  vite.define = {
351
351
  "process.env": "process.env",
352
352
  "globalThis.__ASTRO_IMAGES_BINDING_NAME": JSON.stringify(imagesBindingName),
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.6.1",
4
+ "version": "14.0.0-alpha.1",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
7
7
  "author": "withastro",
@@ -40,12 +40,12 @@
40
40
  "@cloudflare/vite-plugin": "^1.39.0",
41
41
  "piccolore": "^0.1.3",
42
42
  "tinyglobby": "^0.2.15",
43
- "vite": "^7.3.2",
43
+ "vite": "^8.0.13",
44
44
  "@astrojs/internal-helpers": "0.10.0",
45
45
  "@astrojs/underscore-redirects": "1.0.3"
46
46
  },
47
47
  "peerDependencies": {
48
- "astro": "^6.3.0",
48
+ "astro": "^7.0.0-alpha.2",
49
49
  "wrangler": "^4.83.0"
50
50
  },
51
51
  "devDependencies": {
@@ -55,7 +55,7 @@
55
55
  "cheerio": "1.2.0",
56
56
  "devalue": "^5.8.1",
57
57
  "prismjs": "^1.30.0",
58
- "astro": "6.4.3",
58
+ "astro": "7.0.0-alpha.2",
59
59
  "astro-scripts": "0.0.14"
60
60
  },
61
61
  "publishConfig": {