create-cloudflare 2.70.13 → 2.70.14

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/cli.js CHANGED
@@ -95068,6 +95068,10 @@ var getLocalExplorerEnabledFromEnv = getBooleanEnvironmentVariableFactory({
95068
95068
  variableName: "X_LOCAL_EXPLORER",
95069
95069
  defaultValue: true
95070
95070
  });
95071
+ var getLocalObservabilityEnabledFromEnv = getBooleanEnvironmentVariableFactory({
95072
+ variableName: "X_LOCAL_OBSERVABILITY",
95073
+ defaultValue: false
95074
+ });
95071
95075
  var getBrowserRenderingHeadfulFromEnv = getBooleanEnvironmentVariableFactory({
95072
95076
  variableName: "X_BROWSER_HEADFUL",
95073
95077
  defaultValue: false
@@ -95590,14 +95594,21 @@ function normalizeAndValidateConfig(rawConfig, configPath, userConfigPath, args,
95590
95594
  const diagnostics = new Diagnostics(
95591
95595
  `Processing ${configPath ? import_node_path4.default.relative(process.cwd(), configPath) : "wrangler"} configuration:`
95592
95596
  );
95597
+ const isRedirectedConfig2 = isRedirectedRawConfig(
95598
+ rawConfig,
95599
+ configPath,
95600
+ userConfigPath
95601
+ );
95593
95602
  if ("legacy_env" in rawConfig) {
95594
- diagnostics.errors.push(
95595
- dedent`
95596
- The "legacy_env" field is no longer supported, so please remove it from your configuration file.
95597
- Service environments have been removed, and each environment is now deployed as its own Worker named "<name>-<environment>". This matches the behaviour of "legacy_env = true", which was the default, so removing the field will not change how your Worker is deployed.
95598
- Refer to https://developers.cloudflare.com/workers/wrangler/environments/ for more information.
95599
- `
95600
- );
95603
+ if (!isRedirectedConfig2) {
95604
+ diagnostics.errors.push(
95605
+ dedent`
95606
+ The "legacy_env" field is no longer supported, so please remove it from your configuration file.
95607
+ Service environments have been removed, and each environment is now deployed as its own Worker named "<name>-<environment>". This matches the behaviour of "legacy_env = true", which was the default, so removing the field will not change how your Worker is deployed.
95608
+ Refer to https://developers.cloudflare.com/workers/wrangler/environments/ for more information.
95609
+ `
95610
+ );
95611
+ }
95601
95612
  delete rawConfig.legacy_env;
95602
95613
  }
95603
95614
  validateOptionalProperty(
@@ -95673,11 +95684,6 @@ function normalizeAndValidateConfig(rawConfig, configPath, userConfigPath, args,
95673
95684
  isDispatchNamespace,
95674
95685
  preserveOriginalMain
95675
95686
  );
95676
- const isRedirectedConfig2 = isRedirectedRawConfig(
95677
- rawConfig,
95678
- configPath,
95679
- userConfigPath
95680
- );
95681
95687
  const definedEnvironments = Object.keys(rawConfig.env ?? {});
95682
95688
  if (isRedirectedConfig2 && definedEnvironments.length > 0) {
95683
95689
  diagnostics.errors.push(
@@ -109449,7 +109455,7 @@ var Yargs = YargsFactory(esm_default2);
109449
109455
  var yargs_default = Yargs;
109450
109456
 
109451
109457
  // package.json
109452
- var version2 = "2.70.13";
109458
+ var version2 = "2.70.14";
109453
109459
 
109454
109460
  // src/metrics.ts
109455
109461
  var import_node_async_hooks = require("node:async_hooks");
@@ -110977,7 +110983,7 @@ var hasTsConfig = (path7) => {
110977
110983
  };
110978
110984
 
110979
110985
  // src/helpers/pnpmBuildApprovals.ts
110980
- var APPROVED_BUILDS = ["esbuild", "workerd", "sharp"];
110986
+ var APPROVED_BUILDS = ["esbuild", "workerd"];
110981
110987
  var APPROVED_BUILDS_SET = new Set(APPROVED_BUILDS);
110982
110988
  var writePnpmBuildApprovals = (projectPath) => {
110983
110989
  const { npm: npm24 } = detectPackageManager();
@@ -110997,9 +111003,9 @@ var writePnpmBuildApprovals = (projectPath) => {
110997
111003
  };
110998
111004
  var FRESH_HEADER = [
110999
111005
  "# Pre-approve build scripts for the packages C3 itself installs that need",
111000
- "# them: `workerd` downloads the platform binary, `esbuild` and `sharp`",
111001
- "# (via miniflare) download/build native bindings. Without these, pnpm 11+",
111002
- "# aborts the install with ERR_PNPM_IGNORED_BUILDS."
111006
+ "# them: `workerd` downloads the platform binary and `esbuild` downloads/",
111007
+ "# builds native bindings. Without these, pnpm 11+ aborts the install with",
111008
+ "# ERR_PNPM_IGNORED_BUILDS."
111003
111009
  ];
111004
111010
  var formatEntry = (pkg) => pkg.startsWith("@") ? ` '${pkg}': true` : ` ${pkg}: true`;
111005
111011
  var freshWorkspaceYaml = () => [
@@ -112029,12 +112035,12 @@ var package_default = {
112029
112035
  "create-react-router": "8.2.0",
112030
112036
  "create-rwsdk": "3.1.3",
112031
112037
  "create-solid": "0.7.0",
112032
- "create-vike": "0.0.662",
112038
+ "create-vike": "0.0.664",
112033
112039
  "create-vite": "9.1.1",
112034
112040
  "create-vue": "3.22.4",
112035
112041
  "create-waku": "0.12.5-1.0.0-alpha.10-0",
112036
112042
  gatsby: "5.16.1",
112037
- nuxi: "3.36.1",
112043
+ nuxi: "3.37.0",
112038
112044
  sv: "0.16.3"
112039
112045
  },
112040
112046
  info: [
@@ -112957,7 +112963,7 @@ var generate14 = async (ctx) => {
112957
112963
  var configure6 = async () => {
112958
112964
  const packages = ["nitro-cloudflare-dev"];
112959
112965
  if (pm === "pnpm") {
112960
- packages.push("h3");
112966
+ packages.push("h3@^1");
112961
112967
  }
112962
112968
  await installPackages2(packages, {
112963
112969
  dev: true,
@@ -113053,7 +113059,7 @@ var generate15 = async (ctx) => {
113053
113059
  var configure7 = async () => {
113054
113060
  const packages = ["nitro-cloudflare-dev", "nitropack"];
113055
113061
  if (pm2 === "pnpm") {
113056
- packages.push("h3");
113062
+ packages.push("h3@^1");
113057
113063
  }
113058
113064
  await installPackages2(packages, {
113059
113065
  dev: true,
@@ -114539,7 +114545,7 @@ If the application uses Durable Objects or Workflows, refer to the relevant best
114539
114545
  var import_node_assert6 = __toESM(require("node:assert"));
114540
114546
 
114541
114547
  // ../wrangler/package.json
114542
- var version3 = "4.113.0";
114548
+ var version3 = "4.114.0";
114543
114549
 
114544
114550
  // src/git.ts
114545
114551
  var offerGit = async (ctx) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cloudflare",
3
- "version": "2.70.13",
3
+ "version": "2.70.14",
4
4
  "description": "A CLI for creating and deploying new applications to Cloudflare.",
5
5
  "keywords": [
6
6
  "cloudflare",
@@ -31,7 +31,7 @@
31
31
  "@babel/parser": "^7.21.3",
32
32
  "@babel/types": "^7.21.4",
33
33
  "@clack/prompts": "^1.2.0",
34
- "@cloudflare/workers-types": "^5.20260721.1",
34
+ "@cloudflare/workers-types": "^5.20260722.1",
35
35
  "@types/command-exists": "^1.2.0",
36
36
  "@types/cross-spawn": "^6.0.2",
37
37
  "@types/deepmerge": "^2.2.0",
@@ -72,12 +72,12 @@
72
72
  "wrap-ansi": "^9.0.0",
73
73
  "yargs": "^17.7.2",
74
74
  "@cloudflare/cli-shared-helpers": "0.1.16",
75
+ "@cloudflare/vite-plugin": "1.47.0",
75
76
  "@cloudflare/mock-npm-registry": "0.0.0",
76
- "@cloudflare/vite-plugin": "1.46.0",
77
- "@cloudflare/codemod": "1.1.0",
77
+ "@cloudflare/workers-tsconfig": "0.0.0",
78
78
  "@cloudflare/workers-utils": "0.28.0",
79
- "wrangler": "4.113.0",
80
- "@cloudflare/workers-tsconfig": "0.0.0"
79
+ "@cloudflare/codemod": "1.1.0",
80
+ "wrangler": "4.114.0"
81
81
  },
82
82
  "engines": {
83
83
  "node": ">=22.0.0"
@@ -33,9 +33,12 @@ const configure = async () => {
33
33
  const packages = ["nitro-cloudflare-dev"];
34
34
 
35
35
  // When using pnpm, explicitly add h3 package so the H3Event type declaration can be updated.
36
- // Package managers other than pnpm will hoist the dependency, as will pnpm with `--shamefully-hoist`
36
+ // Package managers other than pnpm will hoist the dependency, as will pnpm with `--shamefully-hoist`.
37
+ // Pin to the h3 major used by nitropack — h3's `latest` dist-tag now points at the 2.x release
38
+ // candidates, which are incompatible with the h3 v1 runtime Nuxt/Nitro use and break
39
+ // `event.context.cloudflare` in dev.
37
40
  if (pm === "pnpm") {
38
- packages.push("h3");
41
+ packages.push("h3@^1");
39
42
  }
40
43
 
41
44
  await installPackages(packages, {
@@ -33,9 +33,12 @@ const configure = async () => {
33
33
  const packages = ["nitro-cloudflare-dev", "nitropack"];
34
34
 
35
35
  // When using pnpm, explicitly add h3 package so the H3Event type declaration can be updated.
36
- // Package managers other than pnpm will hoist the dependency, as will pnpm with `--shamefully-hoist`
36
+ // Package managers other than pnpm will hoist the dependency, as will pnpm with `--shamefully-hoist`.
37
+ // Pin to the h3 major used by nitropack — h3's `latest` dist-tag now points at the 2.x release
38
+ // candidates, which are incompatible with the h3 v1 runtime Nuxt/Nitro use and break
39
+ // `event.context.cloudflare` in dev.
37
40
  if (pm === "pnpm") {
38
- packages.push("h3");
41
+ packages.push("h3@^1");
39
42
  }
40
43
 
41
44
  await installPackages(packages, {
@@ -1,42 +0,0 @@
1
- import type { EntryContext } from "react-router";
2
- import { ServerRouter } from "react-router";
3
- import { isbot } from "isbot";
4
- import { renderToReadableStream } from "react-dom/server";
5
-
6
- export default async function handleRequest(
7
- request: Request,
8
- responseStatusCode: number,
9
- responseHeaders: Headers,
10
- routerContext: EntryContext,
11
- ) {
12
- let shellRendered = false;
13
- const userAgent = request.headers.get("user-agent");
14
-
15
- const body = await renderToReadableStream(
16
- <ServerRouter context={routerContext} url={request.url} />,
17
- {
18
- onError(error: unknown) {
19
- responseStatusCode = 500;
20
- // Log streaming rendering errors from inside the shell. Don't log
21
- // errors encountered during initial shell rendering since they'll
22
- // reject and get logged in handleDocumentRequest.
23
- if (shellRendered) {
24
- console.error(error);
25
- }
26
- },
27
- },
28
- );
29
- shellRendered = true;
30
-
31
- // Ensure requests from bots and SPA Mode renders wait for all content to load before responding
32
- // https://react.dev/reference/react-dom/server/renderToPipeableStream#waiting-for-all-content-to-load-for-crawlers-and-static-generation
33
- if ((userAgent && isbot(userAgent)) || routerContext.isSpaMode) {
34
- await body.allReady;
35
- }
36
-
37
- responseHeaders.set("Content-Type", "text/html");
38
- return new Response(body, {
39
- headers: responseHeaders,
40
- status: responseStatusCode,
41
- });
42
- }