create-cloudflare 2.67.4 → 2.68.0

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.
Files changed (2) hide show
  1. package/dist/cli.js +85 -57
  2. package/package.json +5 -5
package/dist/cli.js CHANGED
@@ -75006,7 +75006,7 @@ var MetricsRegistry = class {
75006
75006
  }
75007
75007
  };
75008
75008
 
75009
- // ../workers-utils/dist/chunk-A4F3D336.mjs
75009
+ // ../workers-utils/dist/chunk-XXCQEG76.mjs
75010
75010
  var import_node_fs = __toESM(require("node:fs"), 1);
75011
75011
  var import_node_path = __toESM(require("node:path"), 1);
75012
75012
  var UserError = class extends Error {
@@ -75017,7 +75017,7 @@ var UserError = class extends Error {
75017
75017
  constructor(message, options) {
75018
75018
  super(message, options);
75019
75019
  Object.setPrototypeOf(this, new.target.prototype);
75020
- this.telemetryMessage = options?.telemetryMessage === true ? message : options?.telemetryMessage;
75020
+ this.telemetryMessage = typeof options?.telemetryMessage === "string" ? options.telemetryMessage : options?.telemetryMessage ? message : void 0;
75021
75021
  }
75022
75022
  };
75023
75023
  var DeprecationError = class extends UserError {
@@ -75030,13 +75030,14 @@ ${message}`, options);
75030
75030
  }
75031
75031
  };
75032
75032
  var FatalError = class extends UserError {
75033
- constructor(message, code, options) {
75034
- super(message, options);
75035
- this.code = code;
75036
- }
75037
75033
  static {
75038
75034
  __name(this, "FatalError");
75039
75035
  }
75036
+ code;
75037
+ constructor(message, options) {
75038
+ super(message, options);
75039
+ this.code = options.code;
75040
+ }
75040
75041
  };
75041
75042
  var CommandLineArgsError = class extends UserError {
75042
75043
  static {
@@ -75044,10 +75045,6 @@ var CommandLineArgsError = class extends UserError {
75044
75045
  }
75045
75046
  };
75046
75047
  var JsonFriendlyFatalError = class extends FatalError {
75047
- constructor(message, code, options) {
75048
- super(message, code, options);
75049
- this.code = code;
75050
- }
75051
75048
  static {
75052
75049
  __name(this, "JsonFriendlyFatalError");
75053
75050
  }
@@ -75062,16 +75059,11 @@ var MissingConfigError = class extends Error {
75062
75059
  this.telemetryMessage = `Missing config value for ${key}`;
75063
75060
  }
75064
75061
  };
75065
- function createFatalError(message, isJson, code, telemetryMessage) {
75062
+ function createFatalError(message, isJson, options) {
75066
75063
  if (isJson) {
75067
- return new JsonFriendlyFatalError(
75068
- JSON.stringify(message),
75069
- code,
75070
- telemetryMessage
75071
- );
75072
- } else {
75073
- return new FatalError(`${message}`, code, telemetryMessage);
75064
+ return new JsonFriendlyFatalError(JSON.stringify(message), options);
75074
75065
  }
75066
+ return new FatalError(`${message}`, options);
75075
75067
  }
75076
75068
  __name(createFatalError, "createFatalError");
75077
75069
  function createScanner(text, ignoreTrivia = false) {
@@ -77431,7 +77423,8 @@ function readFileSyncToBuffer(file2) {
77431
77423
  {
77432
77424
  text: message.replace(file2, (0, import_node_path.resolve)(file2))
77433
77425
  }
77434
- ]
77426
+ ],
77427
+ telemetryMessage: false
77435
77428
  });
77436
77429
  }
77437
77430
  }
@@ -77751,32 +77744,41 @@ function findRedirectedWranglerConfig(cwd, userConfigPath) {
77751
77744
  } catch (e) {
77752
77745
  throw new UserError(
77753
77746
  `Failed to parse the deploy configuration file at ${import_node_path.default.relative(".", deployConfigPath)}`,
77754
- { cause: e }
77747
+ { cause: e, telemetryMessage: false }
77755
77748
  );
77756
77749
  }
77757
77750
  if (!redirectedConfigPath) {
77758
- throw new UserError(esm_default`
77751
+ throw new UserError(
77752
+ esm_default`
77759
77753
  A deploy configuration file was found at "${import_node_path.default.relative(".", deployConfigPath)}".
77760
77754
  But this is not valid - the required "configPath" property was not found.
77761
77755
  Instead this file contains:
77762
77756
  \`\`\`
77763
77757
  ${deployConfigFile}
77764
77758
  \`\`\`
77765
- `);
77759
+ `,
77760
+ { telemetryMessage: false }
77761
+ );
77766
77762
  }
77767
77763
  if (!(0, import_node_fs.existsSync)(redirectedConfigPath)) {
77768
- throw new UserError(esm_default`
77764
+ throw new UserError(
77765
+ esm_default`
77769
77766
  There is a deploy configuration at "${import_node_path.default.relative(".", deployConfigPath)}".
77770
77767
  But the redirected configuration path it points to, "${import_node_path.default.relative(".", redirectedConfigPath)}", does not exist.
77771
- `);
77768
+ `,
77769
+ { telemetryMessage: false }
77770
+ );
77772
77771
  }
77773
77772
  if (userConfigPath) {
77774
77773
  if (import_node_path.default.join(import_node_path.default.dirname(userConfigPath), PATH_TO_DEPLOY_CONFIG) !== deployConfigPath) {
77775
- throw new UserError(esm_default`
77774
+ throw new UserError(
77775
+ esm_default`
77776
77776
  Found both a user configuration file at "${import_node_path.default.relative(".", userConfigPath)}"
77777
77777
  and a deploy configuration file at "${import_node_path.default.relative(".", deployConfigPath)}".
77778
77778
  But these do not share the same base path so it is not clear which should be used.
77779
- `);
77779
+ `,
77780
+ { telemetryMessage: false }
77781
+ );
77780
77782
  }
77781
77783
  }
77782
77784
  return {
@@ -82535,7 +82537,8 @@ function getBooleanEnvironmentVariableFactory(options) {
82535
82537
  throw new UserError(
82536
82538
  `Expected ${options.variableName} to be "true" or "false", but got ${JSON.stringify(
82537
82539
  process.env[options.variableName]
82538
- )}`
82540
+ )}`,
82541
+ { telemetryMessage: false }
82539
82542
  );
82540
82543
  }
82541
82544
  };
@@ -82573,7 +82576,8 @@ __name(getProcessEnv, "getProcessEnv");
82573
82576
  function assertOneOf(choices, value) {
82574
82577
  if (Array.isArray(choices) && !choices.includes(value)) {
82575
82578
  throw new UserError(
82576
- `Expected ${JSON.stringify(value)} to be one of ${JSON.stringify(choices)}`
82579
+ `Expected ${JSON.stringify(value)} to be one of ${JSON.stringify(choices)}`,
82580
+ { telemetryMessage: false }
82577
82581
  );
82578
82582
  }
82579
82583
  }
@@ -82602,11 +82606,14 @@ var getCloudflareComplianceRegionFromEnv = getEnvironmentVariableFactory({
82602
82606
  var getCloudflareComplianceRegion = /* @__PURE__ */ __name((complianceConfig) => {
82603
82607
  const complianceRegionFromEnv = getCloudflareComplianceRegionFromEnv();
82604
82608
  if (complianceRegionFromEnv !== void 0 && complianceConfig?.compliance_region !== void 0 && complianceRegionFromEnv !== complianceConfig.compliance_region) {
82605
- throw new UserError(dedent`
82609
+ throw new UserError(
82610
+ dedent`
82606
82611
  The compliance region has been set to different values in two places:
82607
82612
  - \`CLOUDFLARE_COMPLIANCE_REGION\` environment variable: \`${complianceRegionFromEnv}\`
82608
82613
  - \`compliance_region\` configuration property: \`${complianceConfig.compliance_region}\`
82609
- `);
82614
+ `,
82615
+ { telemetryMessage: false }
82616
+ );
82610
82617
  }
82611
82618
  return complianceRegionFromEnv || complianceConfig?.compliance_region || "public";
82612
82619
  }, "getCloudflareComplianceRegion");
@@ -83440,7 +83447,8 @@ function applyPythonConfig(config49, args) {
83440
83447
  }
83441
83448
  if (!config49.compatibility_flags.includes("python_workers")) {
83442
83449
  throw new UserError(
83443
- "The `python_workers` compatibility flag is required to use Python."
83450
+ "The `python_workers` compatibility flag is required to use Python.",
83451
+ { telemetryMessage: false }
83444
83452
  );
83445
83453
  }
83446
83454
  }
@@ -87710,7 +87718,8 @@ function isDockerfile(imagePath, configPath) {
87710
87718
  if (import_node_fs2.default.existsSync(maybeDockerfile)) {
87711
87719
  if (isDirectory(maybeDockerfile)) {
87712
87720
  throw new UserError(
87713
- `${imagePath} is a directory, you should specify a path to the Dockerfile`
87721
+ `${imagePath} is a directory, you should specify a path to the Dockerfile`,
87722
+ { telemetryMessage: false }
87714
87723
  );
87715
87724
  }
87716
87725
  return true;
@@ -87721,19 +87730,23 @@ function isDockerfile(imagePath, configPath) {
87721
87730
  new URL(`https://${imagePath}`);
87722
87731
  } catch (e2) {
87723
87732
  if (e2 instanceof Error) {
87724
- throw new UserError(errorPrefix + e2.message);
87733
+ throw new UserError(errorPrefix + e2.message, {
87734
+ telemetryMessage: false
87735
+ });
87725
87736
  }
87726
87737
  throw e2;
87727
87738
  }
87728
87739
  const imageParts = imagePath.split("/");
87729
87740
  if (!imageParts[imageParts.length - 1]?.includes(":")) {
87730
87741
  throw new UserError(
87731
- errorPrefix + `If this is an image registry path, it needs to include at least a tag ':' (e.g: docker.io/httpd:1)`
87742
+ errorPrefix + `If this is an image registry path, it needs to include at least a tag ':' (e.g: docker.io/httpd:1)`,
87743
+ { telemetryMessage: false }
87732
87744
  );
87733
87745
  }
87734
87746
  if (imagePath.includes("://")) {
87735
87747
  throw new UserError(
87736
- errorPrefix + `Image reference should not include the protocol part (e.g: docker.io/httpd:1, not https://docker.io/httpd:1)`
87748
+ errorPrefix + `Image reference should not include the protocol part (e.g: docker.io/httpd:1, not https://docker.io/httpd:1)`,
87749
+ { telemetryMessage: false }
87737
87750
  );
87738
87751
  }
87739
87752
  return false;
@@ -87774,8 +87787,11 @@ var supportedPagesConfigFields = [
87774
87787
  ];
87775
87788
  function validatePagesConfig(config49, envNames, projectName) {
87776
87789
  if (!config49.pages_build_output_dir) {
87777
- throw new FatalError(`Attempting to validate Pages configuration file, but "pages_build_output_dir" field was not found.
87778
- "pages_build_output_dir" is required for Pages projects.`);
87790
+ throw new FatalError(
87791
+ `Attempting to validate Pages configuration file, but "pages_build_output_dir" field was not found.
87792
+ "pages_build_output_dir" is required for Pages projects.`,
87793
+ { telemetryMessage: false }
87794
+ );
87779
87795
  }
87780
87796
  const diagnostics = new Diagnostics(
87781
87797
  `Running configuration file validation for Pages:`
@@ -87888,7 +87904,8 @@ function getGoArch() {
87888
87904
  cloudflared supports: x64 (amd64), arm64, arm
87889
87905
 
87890
87906
  You can manually install cloudflared and set the CLOUDFLARED_PATH environment variable.
87891
- Download instructions: https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/`
87907
+ Download instructions: https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/`,
87908
+ { telemetryMessage: "tunnel cloudflared unsupported architecture" }
87892
87909
  );
87893
87910
  }
87894
87911
  }
@@ -87908,7 +87925,8 @@ function getGoOS() {
87908
87925
  cloudflared supports: darwin (macOS), linux, win32 (Windows)
87909
87926
 
87910
87927
  You can manually install cloudflared and set the CLOUDFLARED_PATH environment variable.
87911
- Download instructions: https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/`
87928
+ Download instructions: https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/`,
87929
+ { telemetryMessage: "tunnel cloudflared unsupported platform" }
87912
87930
  );
87913
87931
  }
87914
87932
  }
@@ -87987,7 +88005,8 @@ The update service did not return results for ${goOS}/${goArch},
87987
88005
  and the fallback query also failed.
87988
88006
 
87989
88007
  You can manually install cloudflared from:
87990
- https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/`
88008
+ https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/`,
88009
+ { telemetryMessage: "tunnel cloudflared version lookup failed" }
87991
88010
  );
87992
88011
  }
87993
88012
  const version3 = fallback.version;
@@ -88063,7 +88082,9 @@ You can try:
88063
88082
  errorMessage += ` 3. Manually installing cloudflared: https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/
88064
88083
  `;
88065
88084
  errorMessage += ` 4. Setting CLOUDFLARED_PATH to point to your cloudflared binary`;
88066
- throw new UserError(errorMessage);
88085
+ throw new UserError(errorMessage, {
88086
+ telemetryMessage: "tunnel cloudflared validation failed"
88087
+ });
88067
88088
  }
88068
88089
  }
88069
88090
  __name(validateBinary, "validateBinary");
@@ -88183,7 +88204,8 @@ async function downloadCloudflared(versionInfo, binPath, options) {
88183
88204
  Network error: ${e2 instanceof Error ? e2.message : String(e2)}
88184
88205
 
88185
88206
  Please check your internet connection and try again.
88186
- If you're behind a proxy, make sure it's configured correctly.`
88207
+ If you're behind a proxy, make sure it's configured correctly.`,
88208
+ { telemetryMessage: "tunnel cloudflared download network failed" }
88187
88209
  );
88188
88210
  }
88189
88211
  if (!response.ok) {
@@ -88193,7 +88215,8 @@ If you're behind a proxy, make sure it's configured correctly.`
88193
88215
  HTTP ${response.status}: ${response.statusText}
88194
88216
 
88195
88217
  You can manually download cloudflared from:
88196
- https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/`
88218
+ https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/`,
88219
+ { telemetryMessage: "tunnel cloudflared download response failed" }
88197
88220
  );
88198
88221
  }
88199
88222
  try {
@@ -88217,7 +88240,8 @@ https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-
88217
88240
 
88218
88241
  Error: ${e2 instanceof Error ? e2.message : String(e2)}
88219
88242
 
88220
- Please ensure you have write permissions to: ${cacheDir}`
88243
+ Please ensure you have write permissions to: ${cacheDir}`,
88244
+ { telemetryMessage: "tunnel cloudflared save failed" }
88221
88245
  );
88222
88246
  }
88223
88247
  if (process.platform !== "win32") {
@@ -88237,7 +88261,8 @@ async function downloadAndExtractTarball(response, expectedChecksum, binPath, ca
88237
88261
  `[cloudflared] SHA256 mismatch for downloaded cloudflared tarball.
88238
88262
 
88239
88263
  Expected: ${expectedChecksum}
88240
- Actual: ${actualSha256}`
88264
+ Actual: ${actualSha256}`,
88265
+ { telemetryMessage: "tunnel cloudflared tarball checksum mismatch" }
88241
88266
  );
88242
88267
  }
88243
88268
  }
@@ -88269,7 +88294,8 @@ async function downloadBinary(response, expectedChecksum, binPath) {
88269
88294
  `[cloudflared] SHA256 mismatch for downloaded cloudflared binary.
88270
88295
 
88271
88296
  Expected: ${expectedChecksum}
88272
- Actual: ${actualSha256}`
88297
+ Actual: ${actualSha256}`,
88298
+ { telemetryMessage: "tunnel cloudflared binary checksum mismatch" }
88273
88299
  );
88274
88300
  }
88275
88301
  }
@@ -88284,7 +88310,8 @@ async function getCloudflaredPath(options) {
88284
88310
  throw new UserError(
88285
88311
  `CLOUDFLARED_PATH is set to "${envPath}" but the file does not exist.
88286
88312
 
88287
- Please ensure the path points to a valid cloudflared binary.`
88313
+ Please ensure the path points to a valid cloudflared binary.`,
88314
+ { telemetryMessage: "tunnel cloudflared env path missing" }
88288
88315
  );
88289
88316
  }
88290
88317
  logger?.debug(`Using cloudflared from CLOUDFLARED_PATH: ${envPath}`);
@@ -88323,7 +88350,8 @@ Please ensure the path points to a valid cloudflared binary.`
88323
88350
  You can install it manually from:
88324
88351
  https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/
88325
88352
 
88326
- Then either add it to your PATH or set CLOUDFLARED_PATH.`
88353
+ Then either add it to your PATH or set CLOUDFLARED_PATH.`,
88354
+ { telemetryMessage: "tunnel cloudflared download declined" }
88327
88355
  );
88328
88356
  }
88329
88357
  if ((0, import_node_fs2.existsSync)(binPath)) {
@@ -88594,7 +88622,7 @@ ${stderrOutput || "(no output)"}
88594
88622
  The local dev server started at ${origin.href}.
88595
88623
  ` + (isQuickTunnelRateLimited ? "Cloudflare Quick Tunnel creation was rate limited. Try again in a few minutes, or use a named tunnel if you need more reliable access." : `Check the cloudflared output above for more details, and verify that ${origin.href} is reachable from this machine if this keeps happening.`);
88596
88624
  if (isQuickTunnelRateLimited) {
88597
- return new UserError(errorMessage);
88625
+ return new UserError(errorMessage, { telemetryMessage: false });
88598
88626
  }
88599
88627
  return new Error(errorMessage);
88600
88628
  }
@@ -88607,7 +88635,7 @@ function checkMacOSVersion(options) {
88607
88635
  if (process.platform !== "darwin") return;
88608
88636
  if (import_ci_info.default.isCI) return;
88609
88637
  const macOSVersion = darwinVersionToMacOSVersion(import_node_os3.default.release());
88610
- if (macOSVersion && isVersionLessThan(macOSVersion, MINIMUM_MACOS_VERSION)) if (options.shouldThrow) throw new UserError(`Unsupported macOS version: The Cloudflare Workers runtime cannot run on the current version of macOS (${macOSVersion}). The minimum requirement is macOS ${MINIMUM_MACOS_VERSION}+. See https://github.com/cloudflare/workerd?tab=readme-ov-file#running-workerd If you cannot upgrade your version of macOS, you could try running in a DevContainer setup with a supported version of Linux (glibc 2.35+ required).`);
88638
+ if (macOSVersion && isVersionLessThan(macOSVersion, MINIMUM_MACOS_VERSION)) if (options.shouldThrow) throw new UserError(`Unsupported macOS version: The Cloudflare Workers runtime cannot run on the current version of macOS (${macOSVersion}). The minimum requirement is macOS ${MINIMUM_MACOS_VERSION}+. See https://github.com/cloudflare/workerd?tab=readme-ov-file#running-workerd If you cannot upgrade your version of macOS, you could try running in a DevContainer setup with a supported version of Linux (glibc 2.35+ required).`, { telemetryMessage: false });
88611
88639
  else console.warn(`\u26A0\uFE0F Warning: Unsupported macOS version detected (${macOSVersion}). The Cloudflare Workers runtime may not work correctly on macOS versions below ${MINIMUM_MACOS_VERSION}. Consider upgrading to macOS ${MINIMUM_MACOS_VERSION}+ or using a DevContainer setup with a supported version of Linux (glibc 2.35+ required).`);
88612
88640
  }
88613
88641
  function darwinVersionToMacOSVersion(darwinVersion) {
@@ -95566,7 +95594,7 @@ var Yargs = YargsFactory(esm_default2);
95566
95594
  var yargs_default = Yargs;
95567
95595
 
95568
95596
  // package.json
95569
- var version = "2.67.4";
95597
+ var version = "2.68.0";
95570
95598
 
95571
95599
  // src/metrics.ts
95572
95600
  var import_node_async_hooks = require("node:async_hooks");
@@ -97777,9 +97805,9 @@ __name2(getPropertyName, "getPropertyName");
97777
97805
  var package_default = {
97778
97806
  name: "frameworks_clis_info",
97779
97807
  dependencies: {
97780
- "@angular/create": "21.2.6",
97781
- "@tanstack/create-start": "0.59.22",
97782
- "create-analog": "2.4.10",
97808
+ "@angular/create": "21.2.8",
97809
+ "@tanstack/create-start": "0.59.26",
97810
+ "create-analog": "2.5.0",
97783
97811
  "create-astro": "5.0.6",
97784
97812
  "create-docusaurus": "3.10.0",
97785
97813
  "create-hono": "0.19.4",
@@ -97793,8 +97821,8 @@ var package_default = {
97793
97821
  "create-vue": "3.22.3",
97794
97822
  "create-waku": "0.12.5-1.0.0-alpha.8-0",
97795
97823
  gatsby: "5.16.1",
97796
- nuxi: "3.34.0",
97797
- sv: "0.15.1"
97824
+ nuxi: "3.35.1",
97825
+ sv: "0.15.2"
97798
97826
  },
97799
97827
  info: [
97800
97828
  "This package.json is only used to keep track of the frameworks cli dependencies",
@@ -100252,7 +100280,7 @@ If the application uses Durable Objects or Workflows, refer to the relevant best
100252
100280
  var import_node_assert6 = __toESM(require("node:assert"));
100253
100281
 
100254
100282
  // ../wrangler/package.json
100255
- var version2 = "4.86.0";
100283
+ var version2 = "4.87.0";
100256
100284
 
100257
100285
  // src/git.ts
100258
100286
  var offerGit = async (ctx) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cloudflare",
3
- "version": "2.67.4",
3
+ "version": "2.68.0",
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": "^4.20260426.1",
34
+ "@cloudflare/workers-types": "^4.20260430.1",
35
35
  "@types/command-exists": "^1.2.0",
36
36
  "@types/cross-spawn": "^6.0.2",
37
37
  "@types/deepmerge": "^2.2.0",
@@ -75,13 +75,13 @@
75
75
  "@cloudflare/cli-shared-helpers": "0.1.0",
76
76
  "@cloudflare/codemod": "1.1.0",
77
77
  "@cloudflare/mock-npm-registry": "0.0.0",
78
- "@cloudflare/vite-plugin": "1.34.0",
78
+ "@cloudflare/vite-plugin": "1.35.0",
79
79
  "@cloudflare/workers-tsconfig": "0.0.0",
80
80
  "@cloudflare/workers-utils": "0.18.0",
81
- "wrangler": "4.86.0"
81
+ "wrangler": "4.87.0"
82
82
  },
83
83
  "engines": {
84
- "node": ">=20.0.0"
84
+ "node": ">=22.0.0"
85
85
  },
86
86
  "volta": {
87
87
  "extends": "../../package.json"