create-cloudflare 2.70.12 → 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
@@ -94853,6 +94853,7 @@ function date4(params) {
94853
94853
  }
94854
94854
  __name(date4, "date");
94855
94855
  config(en_default());
94856
+ var SENSITIVE_STEP_OUTPUT = "output";
94856
94857
  var MAX_WORKFLOW_NAME_LENGTH = 64;
94857
94858
  var ALLOWED_STRING_ID_PATTERN = "^[a-zA-Z0-9_][a-zA-Z0-9-_]*$";
94858
94859
  var ALLOWED_WORKFLOW_INSTANCE_ID_REGEX = new RegExp(
@@ -94875,7 +94876,8 @@ external_exports.object({
94875
94876
  limit: external_exports.number().gte(0),
94876
94877
  backoff: external_exports.enum(["constant", "linear", "exponential"]).optional()
94877
94878
  }).strict().optional(),
94878
- timeout: external_exports.number().gte(0).or(external_exports.string()).optional()
94879
+ timeout: external_exports.number().gte(0).or(external_exports.string()).optional(),
94880
+ sensitive: external_exports.literal(SENSITIVE_STEP_OUTPUT).optional()
94879
94881
  }).strict();
94880
94882
  function getBooleanEnvironmentVariableFactory(options) {
94881
94883
  return () => {
@@ -95066,6 +95068,10 @@ var getLocalExplorerEnabledFromEnv = getBooleanEnvironmentVariableFactory({
95066
95068
  variableName: "X_LOCAL_EXPLORER",
95067
95069
  defaultValue: true
95068
95070
  });
95071
+ var getLocalObservabilityEnabledFromEnv = getBooleanEnvironmentVariableFactory({
95072
+ variableName: "X_LOCAL_OBSERVABILITY",
95073
+ defaultValue: false
95074
+ });
95069
95075
  var getBrowserRenderingHeadfulFromEnv = getBooleanEnvironmentVariableFactory({
95070
95076
  variableName: "X_BROWSER_HEADFUL",
95071
95077
  defaultValue: false
@@ -95588,14 +95594,21 @@ function normalizeAndValidateConfig(rawConfig, configPath, userConfigPath, args,
95588
95594
  const diagnostics = new Diagnostics(
95589
95595
  `Processing ${configPath ? import_node_path4.default.relative(process.cwd(), configPath) : "wrangler"} configuration:`
95590
95596
  );
95597
+ const isRedirectedConfig2 = isRedirectedRawConfig(
95598
+ rawConfig,
95599
+ configPath,
95600
+ userConfigPath
95601
+ );
95591
95602
  if ("legacy_env" in rawConfig) {
95592
- diagnostics.errors.push(
95593
- dedent`
95594
- The "legacy_env" field is no longer supported, so please remove it from your configuration file.
95595
- 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.
95596
- Refer to https://developers.cloudflare.com/workers/wrangler/environments/ for more information.
95597
- `
95598
- );
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
+ }
95599
95612
  delete rawConfig.legacy_env;
95600
95613
  }
95601
95614
  validateOptionalProperty(
@@ -95620,13 +95633,19 @@ function normalizeAndValidateConfig(rawConfig, configPath, userConfigPath, args,
95620
95633
  rawConfig.dependencies_instrumentation.enabled,
95621
95634
  "boolean"
95622
95635
  );
95636
+ validateOptionalTypedArray(
95637
+ diagnostics,
95638
+ "dependencies_instrumentation.exclude_packages",
95639
+ rawConfig.dependencies_instrumentation.exclude_packages,
95640
+ "string"
95641
+ );
95623
95642
  validateAdditionalProperties(
95624
95643
  diagnostics,
95625
95644
  "dependencies_instrumentation",
95626
95645
  Object.keys(
95627
95646
  rawConfig.dependencies_instrumentation
95628
95647
  ),
95629
- ["enabled"]
95648
+ ["enabled", "exclude_packages"]
95630
95649
  );
95631
95650
  }
95632
95651
  }
@@ -95665,11 +95684,6 @@ function normalizeAndValidateConfig(rawConfig, configPath, userConfigPath, args,
95665
95684
  isDispatchNamespace,
95666
95685
  preserveOriginalMain
95667
95686
  );
95668
- const isRedirectedConfig2 = isRedirectedRawConfig(
95669
- rawConfig,
95670
- configPath,
95671
- userConfigPath
95672
- );
95673
95687
  const definedEnvironments = Object.keys(rawConfig.env ?? {});
95674
95688
  if (isRedirectedConfig2 && definedEnvironments.length > 0) {
95675
95689
  diagnostics.errors.push(
@@ -98570,9 +98584,9 @@ var validateQueueBinding = /* @__PURE__ */ __name((diagnostics, field, value) =>
98570
98584
  );
98571
98585
  isValid = false;
98572
98586
  }
98573
- if (!isRequiredProperty(value, "queue", "string") || value.queue.length === 0) {
98587
+ if (!isOptionalProperty(value, "queue", "string") || hasProperty(value, "queue") && value.queue === "") {
98574
98588
  diagnostics.errors.push(
98575
- `"${field}" bindings should have a string "queue" field but got ${JSON.stringify(
98589
+ `"${field}" bindings should optionally have a non-empty string "queue" field but got ${JSON.stringify(
98576
98590
  value
98577
98591
  )}.`
98578
98592
  );
@@ -99198,9 +99212,9 @@ var validateWorkerNamespaceBinding = /* @__PURE__ */ __name((diagnostics, field,
99198
99212
  );
99199
99213
  isValid = false;
99200
99214
  }
99201
- if (!isRequiredProperty(value, "namespace", "string")) {
99215
+ if (!isOptionalProperty(value, "namespace", "string")) {
99202
99216
  diagnostics.errors.push(
99203
- `"${field}" should have a string "namespace" field but got ${JSON.stringify(
99217
+ `"${field}" should optionally have a string "namespace" field but got ${JSON.stringify(
99204
99218
  value
99205
99219
  )}.`
99206
99220
  );
@@ -99571,9 +99585,9 @@ var validateFlagshipBinding = /* @__PURE__ */ __name((diagnostics, field, value)
99571
99585
  );
99572
99586
  isValid = false;
99573
99587
  }
99574
- if (!isRequiredProperty(value, "app_id", "string")) {
99588
+ if (!isOptionalProperty(value, "app_id", "string")) {
99575
99589
  diagnostics.errors.push(
99576
- `"${field}" bindings must have a string "app_id" field but got ${JSON.stringify(
99590
+ `"${field}" bindings may have a string "app_id" field but got ${JSON.stringify(
99577
99591
  value
99578
99592
  )}.`
99579
99593
  );
@@ -100289,7 +100303,7 @@ var validateObservability = /* @__PURE__ */ __name((diagnostics, field, value) =
100289
100303
  if (value === void 0) {
100290
100304
  return true;
100291
100305
  }
100292
- if (typeof value !== "object") {
100306
+ if (typeof value !== "object" || value === null) {
100293
100307
  diagnostics.errors.push(
100294
100308
  `"${field}" should be an object but got ${JSON.stringify(value)}.`
100295
100309
  );
@@ -109441,7 +109455,7 @@ var Yargs = YargsFactory(esm_default2);
109441
109455
  var yargs_default = Yargs;
109442
109456
 
109443
109457
  // package.json
109444
- var version2 = "2.70.12";
109458
+ var version2 = "2.70.14";
109445
109459
 
109446
109460
  // src/metrics.ts
109447
109461
  var import_node_async_hooks = require("node:async_hooks");
@@ -110969,7 +110983,7 @@ var hasTsConfig = (path7) => {
110969
110983
  };
110970
110984
 
110971
110985
  // src/helpers/pnpmBuildApprovals.ts
110972
- var APPROVED_BUILDS = ["esbuild", "workerd", "sharp"];
110986
+ var APPROVED_BUILDS = ["esbuild", "workerd"];
110973
110987
  var APPROVED_BUILDS_SET = new Set(APPROVED_BUILDS);
110974
110988
  var writePnpmBuildApprovals = (projectPath) => {
110975
110989
  const { npm: npm24 } = detectPackageManager();
@@ -110989,9 +111003,9 @@ var writePnpmBuildApprovals = (projectPath) => {
110989
111003
  };
110990
111004
  var FRESH_HEADER = [
110991
111005
  "# Pre-approve build scripts for the packages C3 itself installs that need",
110992
- "# them: `workerd` downloads the platform binary, `esbuild` and `sharp`",
110993
- "# (via miniflare) download/build native bindings. Without these, pnpm 11+",
110994
- "# 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."
110995
111009
  ];
110996
111010
  var formatEntry = (pkg) => pkg.startsWith("@") ? ` '${pkg}': true` : ` ${pkg}: true`;
110997
111011
  var freshWorkspaceYaml = () => [
@@ -111978,10 +111992,29 @@ function mergeObjectProperties(sourceObject, newProperties) {
111978
111992
  );
111979
111993
  return;
111980
111994
  }
111995
+ if (existing.type === "ObjectProperty" && existing.value.type === "ArrayExpression" && newProp.value.type === "ArrayExpression") {
111996
+ mergeArrayElements(existing.value, newProp.value);
111997
+ return;
111998
+ }
111981
111999
  sourceObject.properties[indexOfExisting] = newProp;
111982
112000
  });
111983
112001
  }
111984
112002
  __name2(mergeObjectProperties, "mergeObjectProperties");
112003
+ function mergeArrayElements(existingArray, newArray) {
112004
+ const existingStringValues = new Set(
112005
+ existingArray.elements.filter((el) => el?.type === "StringLiteral").map((el) => el.value)
112006
+ );
112007
+ newArray.elements.forEach((el) => {
112008
+ if (el?.type === "StringLiteral") {
112009
+ if (existingStringValues.has(el.value)) {
112010
+ return;
112011
+ }
112012
+ existingStringValues.add(el.value);
112013
+ }
112014
+ existingArray.elements.push(el);
112015
+ });
112016
+ }
112017
+ __name2(mergeArrayElements, "mergeArrayElements");
111985
112018
  function getPropertyName(newProp) {
111986
112019
  return newProp.key.type === "Identifier" ? newProp.key.name : newProp.key.type === "StringLiteral" ? newProp.key.value : null;
111987
112020
  }
@@ -111991,24 +112024,24 @@ __name2(getPropertyName, "getPropertyName");
111991
112024
  var package_default = {
111992
112025
  name: "frameworks_clis_info",
111993
112026
  dependencies: {
111994
- "@angular/create": "22.0.6",
112027
+ "@angular/create": "22.0.7",
111995
112028
  "@tanstack/cli": "0.69.5",
111996
112029
  "create-analog": "2.6.3",
111997
112030
  "create-astro": "5.2.2",
111998
- "create-docusaurus": "3.10.1",
112031
+ "create-docusaurus": "3.10.2",
111999
112032
  "create-hono": "0.19.4",
112000
- "create-next-app": "16.2.10",
112033
+ "create-next-app": "16.2.11",
112001
112034
  "create-qwik": "1.20.0",
112002
112035
  "create-react-router": "8.2.0",
112003
112036
  "create-rwsdk": "3.1.3",
112004
112037
  "create-solid": "0.7.0",
112005
- "create-vike": "0.0.662",
112038
+ "create-vike": "0.0.664",
112006
112039
  "create-vite": "9.1.1",
112007
112040
  "create-vue": "3.22.4",
112008
112041
  "create-waku": "0.12.5-1.0.0-alpha.10-0",
112009
112042
  gatsby: "5.16.1",
112010
- nuxi: "3.36.1",
112011
- sv: "0.16.2"
112043
+ nuxi: "3.37.0",
112044
+ sv: "0.16.3"
112012
112045
  },
112013
112046
  info: [
112014
112047
  "This package.json is only used to keep track of the frameworks cli dependencies",
@@ -112930,7 +112963,7 @@ var generate14 = async (ctx) => {
112930
112963
  var configure6 = async () => {
112931
112964
  const packages = ["nitro-cloudflare-dev"];
112932
112965
  if (pm === "pnpm") {
112933
- packages.push("h3");
112966
+ packages.push("h3@^1");
112934
112967
  }
112935
112968
  await installPackages2(packages, {
112936
112969
  dev: true,
@@ -113026,7 +113059,7 @@ var generate15 = async (ctx) => {
113026
113059
  var configure7 = async () => {
113027
113060
  const packages = ["nitro-cloudflare-dev", "nitropack"];
113028
113061
  if (pm2 === "pnpm") {
113029
- packages.push("h3");
113062
+ packages.push("h3@^1");
113030
113063
  }
113031
113064
  await installPackages2(packages, {
113032
113065
  dev: true,
@@ -114512,7 +114545,7 @@ If the application uses Durable Objects or Workflows, refer to the relevant best
114512
114545
  var import_node_assert6 = __toESM(require("node:assert"));
114513
114546
 
114514
114547
  // ../wrangler/package.json
114515
- var version3 = "4.112.0";
114548
+ var version3 = "4.114.0";
114516
114549
 
114517
114550
  // src/git.ts
114518
114551
  var offerGit = async (ctx) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cloudflare",
3
- "version": "2.70.12",
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.20260714.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",
@@ -71,13 +71,13 @@
71
71
  "which-pm-runs": "^1.1.0",
72
72
  "wrap-ansi": "^9.0.0",
73
73
  "yargs": "^17.7.2",
74
- "@cloudflare/cli-shared-helpers": "0.1.15",
75
- "@cloudflare/codemod": "1.1.0",
76
- "@cloudflare/workers-tsconfig": "0.0.0",
77
- "@cloudflare/vite-plugin": "1.45.1",
74
+ "@cloudflare/cli-shared-helpers": "0.1.16",
75
+ "@cloudflare/vite-plugin": "1.47.0",
78
76
  "@cloudflare/mock-npm-registry": "0.0.0",
79
- "wrangler": "4.112.0",
80
- "@cloudflare/workers-utils": "0.27.0"
77
+ "@cloudflare/workers-tsconfig": "0.0.0",
78
+ "@cloudflare/workers-utils": "0.28.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
- }