create-cloudflare 2.68.2 → 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 +58 -47
  2. package/package.json +4 -4
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
  }
@@ -88421,17 +88429,14 @@ function startTunnel(options) {
88421
88429
  const timeoutMs = options.timeoutMs ?? TUNNEL_STARTUP_TIMEOUT_MS;
88422
88430
  const reminderIntervalMs = options.reminderIntervalMs ?? DEFAULT_TUNNEL_REMINDER_INTERVAL_MS;
88423
88431
  const defaultExpiryMs = options.expiryMs ?? DEFAULT_TUNNEL_EXPIRY_MS;
88432
+ const isNamedTunnel = options.token !== void 0;
88424
88433
  const timeFormatter = new Intl.DateTimeFormat(void 0, {
88425
88434
  timeStyle: "short"
88426
88435
  });
88427
- const cloudflaredArgs = [
88428
- "tunnel",
88429
- "--no-autoupdate",
88430
- "--url",
88431
- options.origin.href
88432
- ];
88436
+ const cloudflaredArgs = isNamedTunnel ? ["tunnel", "--no-autoupdate", "run"] : ["tunnel", "--no-autoupdate", "--url", options.origin.href];
88433
88437
  const cloudflaredPromise = spawnCloudflared(cloudflaredArgs, {
88434
88438
  stdio: "pipe",
88439
+ env: options.token ? { TUNNEL_TOKEN: options.token } : void 0,
88435
88440
  skipVersionCheck: true,
88436
88441
  logger
88437
88442
  }).then((process22) => {
@@ -88441,15 +88446,20 @@ function startTunnel(options) {
88441
88446
  }
88442
88447
  return process22;
88443
88448
  });
88444
- const readyPromise = cloudflaredPromise.then(
88445
- (process22) => waitForQuickTunnelReady(process22, timeoutMs, {
88449
+ const readyPromise = cloudflaredPromise.then((process22) => {
88450
+ if (isNamedTunnel) {
88451
+ return { mode: "named" };
88452
+ }
88453
+ return waitForQuickTunnelReady(process22, timeoutMs, {
88446
88454
  logger,
88447
88455
  origin: options.origin
88448
- })
88449
- ).then((result) => {
88456
+ });
88457
+ }).then((result) => {
88450
88458
  expiresAt = Date.now() + defaultExpiryMs;
88451
88459
  scheduleExpiryTimeout();
88452
- scheduleReminder(result.publicUrl.origin);
88460
+ scheduleReminder(
88461
+ result.mode === "quick" ? result.publicUrl.origin : void 0
88462
+ );
88453
88463
  return result;
88454
88464
  });
88455
88465
  function disposeTunnel() {
@@ -88482,7 +88492,7 @@ function startTunnel(options) {
88482
88492
  return;
88483
88493
  }
88484
88494
  logger?.log(
88485
- `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 ?? ""}`
88486
88496
  );
88487
88497
  }, reminderIntervalMs);
88488
88498
  reminderInterval.unref?.();
@@ -88535,6 +88545,7 @@ function startTunnel(options) {
88535
88545
  __name(extendExpiry, "extendExpiry");
88536
88546
  return {
88537
88547
  ready: /* @__PURE__ */ __name(() => readyPromise, "ready"),
88548
+ isOpen: /* @__PURE__ */ __name(() => !disposed, "isOpen"),
88538
88549
  dispose: disposeTunnel,
88539
88550
  extendExpiry
88540
88551
  };
@@ -88596,7 +88607,7 @@ function waitForQuickTunnelReady(cloudflared, timeoutMs, options) {
88596
88607
  if (match && !resolved) {
88597
88608
  resolved = true;
88598
88609
  clearTimeout(timeoutId);
88599
- resolve12({ publicUrl: new URL(match[0]) });
88610
+ resolve12({ mode: "quick", publicUrl: new URL(match[0]) });
88600
88611
  }
88601
88612
  });
88602
88613
  }
@@ -95607,7 +95618,7 @@ var Yargs = YargsFactory(esm_default2);
95607
95618
  var yargs_default = Yargs;
95608
95619
 
95609
95620
  // package.json
95610
- var version = "2.68.2";
95621
+ var version = "2.68.3";
95611
95622
 
95612
95623
  // src/metrics.ts
95613
95624
  var import_node_async_hooks = require("node:async_hooks");
@@ -97818,23 +97829,23 @@ __name2(getPropertyName, "getPropertyName");
97818
97829
  var package_default = {
97819
97830
  name: "frameworks_clis_info",
97820
97831
  dependencies: {
97821
- "@angular/create": "21.2.10",
97822
- "@tanstack/create-start": "0.59.30",
97823
- "create-analog": "2.5.0",
97832
+ "@angular/create": "21.2.11",
97833
+ "@tanstack/create-start": "0.59.32",
97834
+ "create-analog": "2.5.1",
97824
97835
  "create-astro": "5.0.6",
97825
97836
  "create-docusaurus": "3.10.1",
97826
97837
  "create-hono": "0.19.4",
97827
97838
  "create-next-app": "16.2.6",
97828
97839
  "create-qwik": "1.19.2",
97829
- "create-react-router": "7.15.0",
97840
+ "create-react-router": "7.15.1",
97830
97841
  "create-rwsdk": "3.1.3",
97831
97842
  "create-solid": "0.7.0",
97832
- "create-vike": "0.0.625",
97833
- "create-vite": "9.0.6",
97843
+ "create-vike": "0.0.627",
97844
+ "create-vite": "9.0.7",
97834
97845
  "create-vue": "3.22.3",
97835
97846
  "create-waku": "0.12.5-1.0.0-alpha.10-0",
97836
97847
  gatsby: "5.16.1",
97837
- nuxi: "3.35.1",
97848
+ nuxi: "3.35.2",
97838
97849
  sv: "0.15.3"
97839
97850
  },
97840
97851
  info: [
@@ -100293,7 +100304,7 @@ If the application uses Durable Objects or Workflows, refer to the relevant best
100293
100304
  var import_node_assert6 = __toESM(require("node:assert"));
100294
100305
 
100295
100306
  // ../wrangler/package.json
100296
- var version2 = "4.90.1";
100307
+ var version2 = "4.93.0";
100297
100308
 
100298
100309
  // src/git.ts
100299
100310
  var offerGit = async (ctx) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cloudflare",
3
- "version": "2.68.2",
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.20260508.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",
@@ -75,10 +75,10 @@
75
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.4",
78
+ "@cloudflare/vite-plugin": "1.37.2",
79
79
  "@cloudflare/workers-tsconfig": "0.0.0",
80
80
  "@cloudflare/workers-utils": "0.21.0",
81
- "wrangler": "4.90.1"
81
+ "wrangler": "4.93.0"
82
82
  },
83
83
  "engines": {
84
84
  "node": ">=22.0.0"