create-cloudflare 2.68.1 → 2.68.3

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 +69 -51
  2. package/package.json +7 -7
package/dist/cli.js CHANGED
@@ -75006,7 +75006,7 @@ var MetricsRegistry = class {
75006
75006
  }
75007
75007
  };
75008
75008
 
75009
- // ../workers-utils/dist/chunk-XXCQEG76.mjs
75009
+ // ../workers-utils/dist/chunk-GMTGAG26.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 {
@@ -77788,8 +77788,12 @@ function findRedirectedWranglerConfig(cwd, userConfigPath) {
77788
77788
  };
77789
77789
  }
77790
77790
  __name(findRedirectedWranglerConfig, "findRedirectedWranglerConfig");
77791
+ function isRedirectedConfig(config49) {
77792
+ return config49.configPath !== void 0 && config49.configPath !== config49.userConfigPath;
77793
+ }
77794
+ __name(isRedirectedConfig, "isRedirectedConfig");
77791
77795
  function isRedirectedRawConfig(rawConfig, configPath, userConfigPath) {
77792
- return configPath !== void 0 && configPath !== userConfigPath;
77796
+ return isRedirectedConfig({ configPath, userConfigPath });
77793
77797
  }
77794
77798
  __name(isRedirectedRawConfig, "isRedirectedRawConfig");
77795
77799
  function configFormat(configPath) {
@@ -83305,13 +83309,13 @@ function normalizeAndValidateConfig(rawConfig, configPath, userConfigPath, args,
83305
83309
  isDispatchNamespace,
83306
83310
  preserveOriginalMain
83307
83311
  );
83308
- const isRedirectedConfig = isRedirectedRawConfig(
83312
+ const isRedirectedConfig2 = isRedirectedRawConfig(
83309
83313
  rawConfig,
83310
83314
  configPath,
83311
83315
  userConfigPath
83312
83316
  );
83313
83317
  const definedEnvironments = Object.keys(rawConfig.env ?? {});
83314
- if (isRedirectedConfig && definedEnvironments.length > 0) {
83318
+ if (isRedirectedConfig2 && definedEnvironments.length > 0) {
83315
83319
  diagnostics.errors.push(
83316
83320
  dedent`
83317
83321
  Redirected configurations cannot include environments but the following have been found:\n${definedEnvironments.map((env3) => ` - ${env3}`).join("\n")}
@@ -83327,7 +83331,7 @@ function normalizeAndValidateConfig(rawConfig, configPath, userConfigPath, args,
83327
83331
  (0, import_node_assert2.default)(envName === void 0 || typeof envName === "string");
83328
83332
  let activeEnv = topLevelEnv;
83329
83333
  if (envName) {
83330
- if (isRedirectedConfig) {
83334
+ if (isRedirectedConfig2) {
83331
83335
  if (!isPagesConfig(rawConfig) && rawConfig.targetEnvironment && rawConfig.targetEnvironment !== envName) {
83332
83336
  const via = args.env !== void 0 ? "via the `--env/-e` CLI argument" : "via the CLOUDFLARE_ENV environment variable";
83333
83337
  throw new Error(dedent`
@@ -83388,9 +83392,9 @@ Consider adding an environment configuration section to the ${configFileName(con
83388
83392
  const config49 = {
83389
83393
  configPath,
83390
83394
  userConfigPath,
83391
- topLevelName: isRedirectedConfig ? rawConfig.topLevelName : rawConfig.name,
83392
- definedEnvironments: isRedirectedConfig ? rawConfig.definedEnvironments : definedEnvironments,
83393
- targetEnvironment: isRedirectedConfig ? rawConfig.targetEnvironment : envName,
83395
+ topLevelName: isRedirectedConfig2 ? rawConfig.topLevelName : rawConfig.name,
83396
+ definedEnvironments: isRedirectedConfig2 ? rawConfig.definedEnvironments : definedEnvironments,
83397
+ targetEnvironment: isRedirectedConfig2 ? rawConfig.targetEnvironment : envName,
83394
83398
  pages_build_output_dir: normalizeAndValidatePagesBuildOutputDir(
83395
83399
  configPath,
83396
83400
  rawConfig.pages_build_output_dir
@@ -84085,7 +84089,9 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
84085
84089
  "Removed",
84086
84090
  "error"
84087
84091
  );
84088
- experimental(diagnostics, rawEnv, "unsafe");
84092
+ if (topLevelEnv === void 0 || rawConfig?.unsafe === void 0) {
84093
+ experimental(diagnostics, rawEnv, "unsafe");
84094
+ }
84089
84095
  const route = normalizeAndValidateRoute(diagnostics, topLevelEnv, rawEnv);
84090
84096
  const account_id = inheritableInWranglerEnvironments(
84091
84097
  diagnostics,
@@ -84873,14 +84879,16 @@ var validateDefines = /* @__PURE__ */ __name((envName) => (diagnostics, field, v
84873
84879
  if (configDefines.length > 0) {
84874
84880
  if (typeof value === "object" && value !== null) {
84875
84881
  const configEnvDefines = config49 === void 0 ? [] : Object.keys(value);
84876
- for (const varName of configDefines) {
84877
- if (!(varName in value)) {
84878
- diagnostics.warnings.push(
84879
- `"define.${varName}" exists at the top level, but not on "${fieldPath}".
84880
- This is not what you probably want, since "define" configuration is not inherited by environments.
84881
- Please add "define.${varName}" to "env.${envName}".`
84882
- );
84883
- }
84882
+ const missingDefines = configDefines.filter(
84883
+ (varName) => !(varName in value)
84884
+ );
84885
+ if (missingDefines.length > 0) {
84886
+ diagnostics.warnings.push(
84887
+ `The following define entries exist at the top level, but not on "${fieldPath}".
84888
+ This is probably not what you want, since "define" configuration is not inherited by environments.
84889
+ Please add these entries to "env.${envName}.define":
84890
+ ` + missingDefines.map((varName) => `- ${varName}`).join("\n")
84891
+ );
84884
84892
  }
84885
84893
  for (const varName of configEnvDefines) {
84886
84894
  if (!configDefines.includes(varName)) {
@@ -84921,14 +84929,14 @@ var validateVars = /* @__PURE__ */ __name((envName) => (diagnostics, field, valu
84921
84929
  const configVars = Object.keys(config49?.vars ?? {});
84922
84930
  if (configVars.length > 0) {
84923
84931
  if (typeof value === "object" && value !== null) {
84924
- for (const varName of configVars) {
84925
- if (!(varName in value)) {
84926
- diagnostics.warnings.push(
84927
- `"vars.${varName}" exists at the top level, but not on "${fieldPath}".
84928
- This is not what you probably want, since "vars" configuration is not inherited by environments.
84929
- Please add "vars.${varName}" to "env.${envName}".`
84930
- );
84931
- }
84932
+ const missingVars = configVars.filter((varName) => !(varName in value));
84933
+ if (missingVars.length > 0) {
84934
+ diagnostics.warnings.push(
84935
+ `The following vars exist at the top level, but not on "${fieldPath}".
84936
+ This is probably not what you want, since "vars" configuration is not inherited by environments.
84937
+ Please add these vars to "env.${envName}.vars":
84938
+ ` + missingVars.map((varName) => `- ${varName}`).join("\n")
84939
+ );
84932
84940
  }
84933
84941
  }
84934
84942
  }
@@ -86137,6 +86145,11 @@ var validateQueueBinding = /* @__PURE__ */ __name((diagnostics, field, value) =>
86137
86145
  isValid2 = false;
86138
86146
  }
86139
86147
  }
86148
+ if (hasProperty(value, "delivery_delay") && value.delivery_delay !== void 0) {
86149
+ diagnostics.warnings.push(
86150
+ `The "delivery_delay" field in "${field}" is deprecated and has no effect. Queue-level settings should be configured using "wrangler queues update" instead. This setting will be removed in a future version.`
86151
+ );
86152
+ }
86140
86153
  if (!isRemoteValid(value, field, diagnostics)) {
86141
86154
  isValid2 = false;
86142
86155
  }
@@ -87171,7 +87184,8 @@ var validatePreviewsConfig = /* @__PURE__ */ __name((envName) => (diagnostics, f
87171
87184
  "version_metadata",
87172
87185
  "logpush",
87173
87186
  "observability",
87174
- "limits"
87187
+ "limits",
87188
+ "cache"
87175
87189
  ]) && isValid2;
87176
87190
  isValid2 = validateVars(envName)(
87177
87191
  diagnostics,
@@ -87400,6 +87414,7 @@ var validatePreviewsConfig = /* @__PURE__ */ __name((envName) => (diagnostics, f
87400
87414
  "number"
87401
87415
  ) && isValid2;
87402
87416
  }
87417
+ isValid2 = validateCache(diagnostics, `${field}.cache`, previews.cache, void 0) && isValid2;
87403
87418
  return isValid2;
87404
87419
  }, "validatePreviewsConfig");
87405
87420
  var validateMigrations = /* @__PURE__ */ __name((diagnostics, field, value) => {
@@ -88414,17 +88429,14 @@ function startTunnel(options) {
88414
88429
  const timeoutMs = options.timeoutMs ?? TUNNEL_STARTUP_TIMEOUT_MS;
88415
88430
  const reminderIntervalMs = options.reminderIntervalMs ?? DEFAULT_TUNNEL_REMINDER_INTERVAL_MS;
88416
88431
  const defaultExpiryMs = options.expiryMs ?? DEFAULT_TUNNEL_EXPIRY_MS;
88432
+ const isNamedTunnel = options.token !== void 0;
88417
88433
  const timeFormatter = new Intl.DateTimeFormat(void 0, {
88418
88434
  timeStyle: "short"
88419
88435
  });
88420
- const cloudflaredArgs = [
88421
- "tunnel",
88422
- "--no-autoupdate",
88423
- "--url",
88424
- options.origin.href
88425
- ];
88436
+ const cloudflaredArgs = isNamedTunnel ? ["tunnel", "--no-autoupdate", "run"] : ["tunnel", "--no-autoupdate", "--url", options.origin.href];
88426
88437
  const cloudflaredPromise = spawnCloudflared(cloudflaredArgs, {
88427
88438
  stdio: "pipe",
88439
+ env: options.token ? { TUNNEL_TOKEN: options.token } : void 0,
88428
88440
  skipVersionCheck: true,
88429
88441
  logger
88430
88442
  }).then((process22) => {
@@ -88434,15 +88446,20 @@ function startTunnel(options) {
88434
88446
  }
88435
88447
  return process22;
88436
88448
  });
88437
- const readyPromise = cloudflaredPromise.then(
88438
- (process22) => waitForQuickTunnelReady(process22, timeoutMs, {
88449
+ const readyPromise = cloudflaredPromise.then((process22) => {
88450
+ if (isNamedTunnel) {
88451
+ return { mode: "named" };
88452
+ }
88453
+ return waitForQuickTunnelReady(process22, timeoutMs, {
88439
88454
  logger,
88440
88455
  origin: options.origin
88441
- })
88442
- ).then((result) => {
88456
+ });
88457
+ }).then((result) => {
88443
88458
  expiresAt = Date.now() + defaultExpiryMs;
88444
88459
  scheduleExpiryTimeout();
88445
- scheduleReminder(result.publicUrl.origin);
88460
+ scheduleReminder(
88461
+ result.mode === "quick" ? result.publicUrl.origin : void 0
88462
+ );
88446
88463
  return result;
88447
88464
  });
88448
88465
  function disposeTunnel() {
@@ -88475,7 +88492,7 @@ function startTunnel(options) {
88475
88492
  return;
88476
88493
  }
88477
88494
  logger?.log(
88478
- `The tunnel is still open at ${publicURL}. It expires in ${formatTunnelDuration(remainingMs)}. ${options.extendHint ?? ""}`
88495
+ `${publicURL ? `The tunnel is still open at ${publicURL}.` : "The tunnel is still open."} It expires in ${formatTunnelDuration(remainingMs)}. ${options.extendHint ?? ""}`
88479
88496
  );
88480
88497
  }, reminderIntervalMs);
88481
88498
  reminderInterval.unref?.();
@@ -88528,6 +88545,7 @@ function startTunnel(options) {
88528
88545
  __name(extendExpiry, "extendExpiry");
88529
88546
  return {
88530
88547
  ready: /* @__PURE__ */ __name(() => readyPromise, "ready"),
88548
+ isOpen: /* @__PURE__ */ __name(() => !disposed, "isOpen"),
88531
88549
  dispose: disposeTunnel,
88532
88550
  extendExpiry
88533
88551
  };
@@ -88589,7 +88607,7 @@ function waitForQuickTunnelReady(cloudflared, timeoutMs, options) {
88589
88607
  if (match && !resolved) {
88590
88608
  resolved = true;
88591
88609
  clearTimeout(timeoutId);
88592
- resolve12({ publicUrl: new URL(match[0]) });
88610
+ resolve12({ mode: "quick", publicUrl: new URL(match[0]) });
88593
88611
  }
88594
88612
  });
88595
88613
  }
@@ -95600,7 +95618,7 @@ var Yargs = YargsFactory(esm_default2);
95600
95618
  var yargs_default = Yargs;
95601
95619
 
95602
95620
  // package.json
95603
- var version = "2.68.1";
95621
+ var version = "2.68.3";
95604
95622
 
95605
95623
  // src/metrics.ts
95606
95624
  var import_node_async_hooks = require("node:async_hooks");
@@ -97811,24 +97829,24 @@ __name2(getPropertyName, "getPropertyName");
97811
97829
  var package_default = {
97812
97830
  name: "frameworks_clis_info",
97813
97831
  dependencies: {
97814
- "@angular/create": "21.2.9",
97815
- "@tanstack/create-start": "0.59.28",
97816
- "create-analog": "2.5.0",
97832
+ "@angular/create": "21.2.11",
97833
+ "@tanstack/create-start": "0.59.32",
97834
+ "create-analog": "2.5.1",
97817
97835
  "create-astro": "5.0.6",
97818
97836
  "create-docusaurus": "3.10.1",
97819
97837
  "create-hono": "0.19.4",
97820
- "create-next-app": "16.2.4",
97838
+ "create-next-app": "16.2.6",
97821
97839
  "create-qwik": "1.19.2",
97822
- "create-react-router": "7.14.2",
97840
+ "create-react-router": "7.15.1",
97823
97841
  "create-rwsdk": "3.1.3",
97824
97842
  "create-solid": "0.7.0",
97825
- "create-vike": "0.0.622",
97826
- "create-vite": "9.0.6",
97843
+ "create-vike": "0.0.627",
97844
+ "create-vite": "9.0.7",
97827
97845
  "create-vue": "3.22.3",
97828
- "create-waku": "0.12.5-1.0.0-alpha.9-0",
97846
+ "create-waku": "0.12.5-1.0.0-alpha.10-0",
97829
97847
  gatsby: "5.16.1",
97830
- nuxi: "3.35.1",
97831
- sv: "0.15.2"
97848
+ nuxi: "3.35.2",
97849
+ sv: "0.15.3"
97832
97850
  },
97833
97851
  info: [
97834
97852
  "This package.json is only used to keep track of the frameworks cli dependencies",
@@ -100286,7 +100304,7 @@ If the application uses Durable Objects or Workflows, refer to the relevant best
100286
100304
  var import_node_assert6 = __toESM(require("node:assert"));
100287
100305
 
100288
100306
  // ../wrangler/package.json
100289
- var version2 = "4.88.0";
100307
+ var version2 = "4.93.0";
100290
100308
 
100291
100309
  // src/git.ts
100292
100310
  var offerGit = async (ctx) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cloudflare",
3
- "version": "2.68.1",
3
+ "version": "2.68.3",
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.20260504.1",
34
+ "@cloudflare/workers-types": "^4.20260518.1",
35
35
  "@types/command-exists": "^1.2.0",
36
36
  "@types/cross-spawn": "^6.0.2",
37
37
  "@types/deepmerge": "^2.2.0",
@@ -65,20 +65,20 @@
65
65
  "tree-kill": "^1.2.2",
66
66
  "typescript": "~5.8.3",
67
67
  "undici": "7.24.8",
68
- "vite": "^8.0.0",
68
+ "vite": "^8.0.12",
69
69
  "vite-tsconfig-paths": "^4.0.8",
70
70
  "vitest": "4.1.0",
71
71
  "which-pm-runs": "^1.1.0",
72
72
  "wrap-ansi": "^9.0.0",
73
73
  "xdg-app-paths": "^8.3.0",
74
74
  "yargs": "^17.7.2",
75
- "@cloudflare/cli-shared-helpers": "0.1.1",
75
+ "@cloudflare/cli-shared-helpers": "0.1.3",
76
76
  "@cloudflare/codemod": "1.1.0",
77
77
  "@cloudflare/mock-npm-registry": "0.0.0",
78
- "@cloudflare/vite-plugin": "1.36.0",
78
+ "@cloudflare/vite-plugin": "1.37.2",
79
79
  "@cloudflare/workers-tsconfig": "0.0.0",
80
- "@cloudflare/workers-utils": "0.19.0",
81
- "wrangler": "4.88.0"
80
+ "@cloudflare/workers-utils": "0.21.0",
81
+ "wrangler": "4.93.0"
82
82
  },
83
83
  "engines": {
84
84
  "node": ">=22.0.0"