@astrojs/cloudflare 13.5.4 → 13.5.5

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.5.4";
91
+ const version = "13.5.5";
92
92
  const localPrefix = `${colors.dim("\u2503")} Local `;
93
93
  const networkPrefix = `${colors.dim("\u2503")} Network `;
94
94
  const emptyPrefix = " ".repeat(11);
package/dist/index.js CHANGED
@@ -1,5 +1,8 @@
1
1
  import { createReadStream, existsSync, readFileSync } from "node:fs";
2
- import { appendFile, readFile, rename, stat } from "node:fs/promises";
2
+ import { appendFile, readFile, rename, stat, writeFile } from "node:fs/promises";
3
+ import { relative } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ import { normalizePath } from "vite";
3
6
  import { createInterface } from "node:readline/promises";
4
7
  import { removeLeadingForwardSlash } from "@astrojs/internal-helpers/path";
5
8
  import { createRedirectsFromAstroRoutes, printAsRedirects } from "@astrojs/underscore-redirects";
@@ -360,6 +363,18 @@ function createIntegration({
360
363
  } catch {
361
364
  }
362
365
  }
366
+ try {
367
+ const wranglerJsonUrl = new URL("./wrangler.json", _config.build.server);
368
+ const raw = await readFile(wranglerJsonUrl, "utf-8");
369
+ const wranglerConfig = JSON.parse(raw);
370
+ if (wranglerConfig.assets?.directory) {
371
+ wranglerConfig.assets.directory = normalizePath(
372
+ relative(fileURLToPath(_config.build.server), fileURLToPath(_originalClientDir))
373
+ );
374
+ await writeFile(wranglerJsonUrl, JSON.stringify(wranglerConfig));
375
+ }
376
+ } catch {
377
+ }
363
378
  }
364
379
  let redirectsExists = false;
365
380
  try {
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.5.4",
4
+ "version": "13.5.5",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
7
7
  "author": "withastro",
@@ -53,7 +53,7 @@
53
53
  "cheerio": "1.2.0",
54
54
  "devalue": "^5.6.3",
55
55
  "prismjs": "^1.30.0",
56
- "astro": "6.3.7",
56
+ "astro": "6.3.8",
57
57
  "astro-scripts": "0.0.14"
58
58
  },
59
59
  "publishConfig": {