create-cloudflare 2.40.0 → 2.40.1

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
@@ -573,7 +573,7 @@ var require_XDGAppPaths = __commonJS({
573
573
  XDGAppPaths.cache = function cache(dirOptions) {
574
574
  return path6.join(xdg.cache(), finalPathSegment(dirOptions));
575
575
  };
576
- XDGAppPaths.config = function config28(dirOptions) {
576
+ XDGAppPaths.config = function config29(dirOptions) {
577
577
  return path6.join(xdg.config(), finalPathSegment(dirOptions));
578
578
  };
579
579
  XDGAppPaths.data = function data(dirOptions) {
@@ -630,7 +630,7 @@ var require_XDG = __commonJS({
630
630
  var cache = function() {
631
631
  return valOrPath(env3.get("XDG_CACHE_HOME"), [baseDir(), ".cache"]);
632
632
  };
633
- var config28 = function() {
633
+ var config29 = function() {
634
634
  return valOrPath(env3.get("XDG_CONFIG_HOME"), [baseDir(), ".config"]);
635
635
  };
636
636
  var data = function() {
@@ -642,13 +642,13 @@ var require_XDG = __commonJS({
642
642
  var state = function() {
643
643
  return valOrPath(env3.get("XDG_STATE_HOME"), [baseDir(), ".local", "state"]);
644
644
  };
645
- return { cache, config: config28, data, runtime, state };
645
+ return { cache, config: config29, data, runtime, state };
646
646
  };
647
647
  var macos = function() {
648
648
  var cache = function() {
649
649
  return valOrPath(env3.get("XDG_CACHE_HOME"), [baseDir(), "Library", "Caches"]);
650
650
  };
651
- var config28 = function() {
651
+ var config29 = function() {
652
652
  return valOrPath(env3.get("XDG_CONFIG_HOME"), [baseDir(), "Library", "Preferences"]);
653
653
  };
654
654
  var data = function() {
@@ -660,7 +660,7 @@ var require_XDG = __commonJS({
660
660
  var state = function() {
661
661
  return valOrPath(env3.get("XDG_STATE_HOME"), [baseDir(), "Library", "State"]);
662
662
  };
663
- return { cache, config: config28, data, runtime, state };
663
+ return { cache, config: config29, data, runtime, state };
664
664
  };
665
665
  var windows = function() {
666
666
  function appData() {
@@ -672,7 +672,7 @@ var require_XDG = __commonJS({
672
672
  var cache = function() {
673
673
  return valOrPath(env3.get("XDG_CACHE_HOME"), [localAppData(), "xdg.cache"]);
674
674
  };
675
- var config28 = function() {
675
+ var config29 = function() {
676
676
  return valOrPath(env3.get("XDG_CONFIG_HOME"), [appData(), "xdg.config"]);
677
677
  };
678
678
  var data = function() {
@@ -684,7 +684,7 @@ var require_XDG = __commonJS({
684
684
  var state = function() {
685
685
  return valOrPath(env3.get("XDG_STATE_HOME"), [localAppData(), "xdg.state"]);
686
686
  };
687
- return { cache, config: config28, data, runtime, state };
687
+ return { cache, config: config29, data, runtime, state };
688
688
  };
689
689
  var XDG_ = function() {
690
690
  function XDG_2() {
@@ -31619,22 +31619,22 @@ var require_dist_web = __commonJS({
31619
31619
  _createClass(Haikunator3, [{
31620
31620
  key: "haikunate",
31621
31621
  value: function haikunate(options) {
31622
- var config28 = (0, _lodash["default"])(options, this.config);
31623
- if (config28.tokenHex === true) {
31624
- config28.tokenChars = "0123456789abcdef";
31622
+ var config29 = (0, _lodash["default"])(options, this.config);
31623
+ if (config29.tokenHex === true) {
31624
+ config29.tokenChars = "0123456789abcdef";
31625
31625
  }
31626
31626
  var adjective = this._randomElement(this.adjectives);
31627
31627
  var noun = this._randomElement(this.nouns);
31628
- if (!config28.tokenLength)
31629
- config28.tokenLength = 0;
31628
+ if (!config29.tokenLength)
31629
+ config29.tokenLength = 0;
31630
31630
  var token = "";
31631
- for (var i = 0; i < config28.tokenLength; i++) {
31632
- token += this._randomElement(config28.tokenChars);
31631
+ for (var i = 0; i < config29.tokenLength; i++) {
31632
+ token += this._randomElement(config29.tokenChars);
31633
31633
  }
31634
31634
  var sections = [adjective, noun, token];
31635
31635
  return sections.filter(function(e) {
31636
31636
  return !!e;
31637
- }).join(config28.delimiter);
31637
+ }).join(config29.delimiter);
31638
31638
  }
31639
31639
  /**
31640
31640
  * Get a random element from an array/string
@@ -40191,13 +40191,13 @@ var require_esprima = __commonJS({
40191
40191
  return Reader2;
40192
40192
  }();
40193
40193
  var Tokenizer = function() {
40194
- function Tokenizer2(code, config28) {
40194
+ function Tokenizer2(code, config29) {
40195
40195
  this.errorHandler = new error_handler_1.ErrorHandler();
40196
- this.errorHandler.tolerant = config28 ? typeof config28.tolerant === "boolean" && config28.tolerant : false;
40196
+ this.errorHandler.tolerant = config29 ? typeof config29.tolerant === "boolean" && config29.tolerant : false;
40197
40197
  this.scanner = new scanner_1.Scanner(code, this.errorHandler);
40198
- this.scanner.trackComment = config28 ? typeof config28.comment === "boolean" && config28.comment : false;
40199
- this.trackRange = config28 ? typeof config28.range === "boolean" && config28.range : false;
40200
- this.trackLoc = config28 ? typeof config28.loc === "boolean" && config28.loc : false;
40198
+ this.scanner.trackComment = config29 ? typeof config29.comment === "boolean" && config29.comment : false;
40199
+ this.trackRange = config29 ? typeof config29.range === "boolean" && config29.range : false;
40200
+ this.trackLoc = config29 ? typeof config29.loc === "boolean" && config29.loc : false;
40201
40201
  this.buffer = [];
40202
40202
  this.reader = new Reader();
40203
40203
  }
@@ -50020,11 +50020,11 @@ var require_printer = __commonJS({
50020
50020
  return this.code;
50021
50021
  };
50022
50022
  var emptyPrintResult = new PrintResult("");
50023
- var Printer = function Printer2(config28) {
50023
+ var Printer = function Printer2(config29) {
50024
50024
  assert_1.default.ok(this instanceof Printer2);
50025
- var explicitTabWidth = config28 && config28.tabWidth;
50026
- config28 = options_1.normalize(config28);
50027
- config28.sourceFileName = null;
50025
+ var explicitTabWidth = config29 && config29.tabWidth;
50026
+ config29 = options_1.normalize(config29);
50027
+ config29.sourceFileName = null;
50028
50028
  function makePrintFunctionWith(options, overrides) {
50029
50029
  options = Object.assign({}, options, overrides);
50030
50030
  return function(path6) {
@@ -50039,11 +50039,11 @@ var require_printer = __commonJS({
50039
50039
  includeComments: false
50040
50040
  }));
50041
50041
  }
50042
- var oldTabWidth = config28.tabWidth;
50042
+ var oldTabWidth = config29.tabWidth;
50043
50043
  if (!explicitTabWidth) {
50044
50044
  var loc = path6.getNode().loc;
50045
50045
  if (loc && loc.lines && loc.lines.guessTabWidth) {
50046
- config28.tabWidth = loc.lines.guessTabWidth();
50046
+ config29.tabWidth = loc.lines.guessTabWidth();
50047
50047
  }
50048
50048
  }
50049
50049
  var reprinter = patcher_1.getReprinter(path6);
@@ -50057,11 +50057,11 @@ var require_printer = __commonJS({
50057
50057
  // right choice because it gives us the opportunity to reprint
50058
50058
  // such nodes using their original source.
50059
50059
  reprinter(print2)
50060
- ) : genericPrint(path6, config28, options, makePrintFunctionWith(options, {
50060
+ ) : genericPrint(path6, config29, options, makePrintFunctionWith(options, {
50061
50061
  includeComments: true,
50062
50062
  avoidRootParens: false
50063
50063
  }));
50064
- config28.tabWidth = oldTabWidth;
50064
+ config29.tabWidth = oldTabWidth;
50065
50065
  return lines;
50066
50066
  }
50067
50067
  this.print = function(ast) {
@@ -50072,7 +50072,7 @@ var require_printer = __commonJS({
50072
50072
  includeComments: true,
50073
50073
  avoidRootParens: false
50074
50074
  });
50075
- return new PrintResult(lines.toString(config28), util.composeSourceMaps(config28.inputSourceMap, lines.getSourceMap(config28.sourceMapName, config28.sourceRoot)));
50075
+ return new PrintResult(lines.toString(config29), util.composeSourceMaps(config29.inputSourceMap, lines.getSourceMap(config29.sourceMapName, config29.sourceRoot)));
50076
50076
  };
50077
50077
  this.printGenerically = function(ast) {
50078
50078
  if (!ast) {
@@ -50080,26 +50080,26 @@ var require_printer = __commonJS({
50080
50080
  }
50081
50081
  function printGenerically(path7) {
50082
50082
  return comments_1.printComments(path7, function(path8) {
50083
- return genericPrint(path8, config28, {
50083
+ return genericPrint(path8, config29, {
50084
50084
  includeComments: true,
50085
50085
  avoidRootParens: false
50086
50086
  }, printGenerically);
50087
50087
  });
50088
50088
  }
50089
50089
  var path6 = fast_path_1.default.from(ast);
50090
- var oldReuseWhitespace = config28.reuseWhitespace;
50091
- config28.reuseWhitespace = false;
50092
- var pr = new PrintResult(printGenerically(path6).toString(config28));
50093
- config28.reuseWhitespace = oldReuseWhitespace;
50090
+ var oldReuseWhitespace = config29.reuseWhitespace;
50091
+ config29.reuseWhitespace = false;
50092
+ var pr = new PrintResult(printGenerically(path6).toString(config29));
50093
+ config29.reuseWhitespace = oldReuseWhitespace;
50094
50094
  return pr;
50095
50095
  };
50096
50096
  };
50097
50097
  exports2.Printer = Printer;
50098
- function genericPrint(path6, config28, options, printPath) {
50098
+ function genericPrint(path6, config29, options, printPath) {
50099
50099
  assert_1.default.ok(path6 instanceof fast_path_1.default);
50100
50100
  var node = path6.getValue();
50101
50101
  var parts = [];
50102
- var linesWithoutParens = genericPrintNoParens(path6, config28, printPath);
50102
+ var linesWithoutParens = genericPrintNoParens(path6, config29, printPath);
50103
50103
  if (!node || linesWithoutParens.isEmpty()) {
50104
50104
  return linesWithoutParens;
50105
50105
  }
@@ -69790,33 +69790,33 @@ var inputPrompt = async (promptConfig) => {
69790
69790
  }
69791
69791
  return input;
69792
69792
  };
69793
- var renderSubmit = (config28, value) => {
69794
- const { question, label } = config28;
69795
- if (config28.type !== "confirm" && !value) {
69793
+ var renderSubmit = (config29, value) => {
69794
+ const { question, label } = config29;
69795
+ if (config29.type !== "confirm" && !value) {
69796
69796
  return [`${leftT} ${question} ${dim("(skipped)")}`, `${grayBar}`];
69797
69797
  }
69798
- const content = config28.type === "confirm" ? `${grayBar} ${brandColor(value)} ${dim(label)}` : `${grayBar} ${brandColor(label)} ${dim(value)}`;
69798
+ const content = config29.type === "confirm" ? `${grayBar} ${brandColor(value)} ${dim(label)}` : `${grayBar} ${brandColor(label)} ${dim(value)}`;
69799
69799
  return [`${leftT} ${question}`, content, `${grayBar}`];
69800
69800
  };
69801
- var getRenderers = (config28) => {
69802
- switch (config28.type) {
69801
+ var getRenderers = (config29) => {
69802
+ switch (config29.type) {
69803
69803
  case "select":
69804
- return getSelectRenderers(config28);
69804
+ return getSelectRenderers(config29);
69805
69805
  case "confirm":
69806
- return getConfirmRenderers(config28);
69806
+ return getConfirmRenderers(config29);
69807
69807
  case "text":
69808
- return getTextRenderers(config28);
69808
+ return getTextRenderers(config29);
69809
69809
  case "multiselect":
69810
- return getSelectRenderers(config28);
69810
+ return getSelectRenderers(config29);
69811
69811
  case "list":
69812
- return getSelectListRenderers(config28);
69812
+ return getSelectListRenderers(config29);
69813
69813
  }
69814
69814
  };
69815
- var getTextRenderers = (config28) => {
69816
- const { question } = config28;
69817
- const helpText = config28.helpText ?? "";
69818
- const format5 = config28.format ?? ((val) => String(val));
69819
- const defaultValue = config28.defaultValue?.toString() ?? "";
69815
+ var getTextRenderers = (config29) => {
69816
+ const { question } = config29;
69817
+ const helpText = config29.helpText ?? "";
69818
+ const format5 = config29.format ?? ((val) => String(val));
69819
+ const defaultValue = config29.defaultValue?.toString() ?? "";
69820
69820
  const activeRenderer = ({ value }) => [
69821
69821
  `${blCorner} ${bold(question)} ${dim(helpText)}`,
69822
69822
  `${space(2)}${format5(value || dim(defaultValue))}`,
@@ -69839,14 +69839,14 @@ var getTextRenderers = (config28) => {
69839
69839
  ``
69840
69840
  // extra line for readability
69841
69841
  ],
69842
- submit: ({ value }) => renderSubmit(config28, format5(value ?? "")),
69842
+ submit: ({ value }) => renderSubmit(config29, format5(value ?? "")),
69843
69843
  cancel: activeRenderer
69844
69844
  };
69845
69845
  };
69846
- var getSelectRenderers = (config28) => {
69847
- const { options, question, helpText: _helpText } = config28;
69846
+ var getSelectRenderers = (config29) => {
69847
+ const { options, question, helpText: _helpText } = config29;
69848
69848
  const helpText = _helpText ?? "";
69849
- const maxItemsPerPage = config28.maxItemsPerPage ?? 32;
69849
+ const maxItemsPerPage = config29.maxItemsPerPage ?? 32;
69850
69850
  const defaultRenderer = ({ cursor = 0, value }) => {
69851
69851
  const renderOption = (opt, i) => {
69852
69852
  const { label: optionLabel, value: optionValue } = opt;
@@ -69921,21 +69921,21 @@ ${space(2)}${dim("...")}` : ""}`,
69921
69921
  submit: ({ value }) => {
69922
69922
  if (Array.isArray(value)) {
69923
69923
  return renderSubmit(
69924
- config28,
69924
+ config29,
69925
69925
  options.filter((o) => value.includes(o.value)).map((o) => o.label).join(", ")
69926
69926
  );
69927
69927
  }
69928
69928
  return renderSubmit(
69929
- config28,
69929
+ config29,
69930
69930
  options.find((o) => o.value === value)?.label
69931
69931
  );
69932
69932
  },
69933
69933
  cancel: defaultRenderer
69934
69934
  };
69935
69935
  };
69936
- var getSelectListRenderers = (config28) => {
69937
- const { question, helpText: _helpText } = config28;
69938
- let options = config28.options;
69936
+ var getSelectListRenderers = (config29) => {
69937
+ const { question, helpText: _helpText } = config29;
69938
+ let options = config29.options;
69939
69939
  const helpText = _helpText ?? "";
69940
69940
  const { rows } = stdout;
69941
69941
  const defaultRenderer = ({ cursor, value }, prompt) => {
@@ -70016,20 +70016,20 @@ var getSelectListRenderers = (config28) => {
70016
70016
  submit: ({ value }) => {
70017
70017
  if (Array.isArray(value)) {
70018
70018
  return renderSubmit(
70019
- config28,
70019
+ config29,
70020
70020
  options.filter((o) => value.includes(o.value)).map((o) => o.value).join(", ")
70021
70021
  );
70022
70022
  }
70023
70023
  return renderSubmit(
70024
- config28,
70024
+ config29,
70025
70025
  options.find((o) => o.value === value)?.value
70026
70026
  );
70027
70027
  },
70028
70028
  cancel: defaultRenderer
70029
70029
  };
70030
70030
  };
70031
- var getConfirmRenderers = (config28) => {
70032
- const { activeText, inactiveText, question, helpText: _helpText } = config28;
70031
+ var getConfirmRenderers = (config29) => {
70032
+ const { activeText, inactiveText, question, helpText: _helpText } = config29;
70033
70033
  const helpText = _helpText ?? "";
70034
70034
  const active = activeText || "Yes";
70035
70035
  const inactive = inactiveText || "No";
@@ -70046,7 +70046,7 @@ var getConfirmRenderers = (config28) => {
70046
70046
  active: defaultRenderer,
70047
70047
  confirm: defaultRenderer,
70048
70048
  error: defaultRenderer,
70049
- submit: ({ value }) => renderSubmit(config28, value ? "yes" : "no"),
70049
+ submit: ({ value }) => renderSubmit(config29, value ? "yes" : "no"),
70050
70050
  cancel: defaultRenderer
70051
70051
  };
70052
70052
  };
@@ -71016,23 +71016,23 @@ var YargsParser = class {
71016
71016
  const configPath = argv2[configKey] || configLookup[configKey];
71017
71017
  if (configPath) {
71018
71018
  try {
71019
- let config28 = null;
71019
+ let config29 = null;
71020
71020
  const resolvedConfigPath = mixin2.resolve(mixin2.cwd(), configPath);
71021
71021
  const resolveConfig = flags.configs[configKey];
71022
71022
  if (typeof resolveConfig === "function") {
71023
71023
  try {
71024
- config28 = resolveConfig(resolvedConfigPath);
71024
+ config29 = resolveConfig(resolvedConfigPath);
71025
71025
  } catch (e) {
71026
- config28 = e;
71026
+ config29 = e;
71027
71027
  }
71028
- if (config28 instanceof Error) {
71029
- error2 = config28;
71028
+ if (config29 instanceof Error) {
71029
+ error2 = config29;
71030
71030
  return;
71031
71031
  }
71032
71032
  } else {
71033
- config28 = mixin2.require(resolvedConfigPath);
71033
+ config29 = mixin2.require(resolvedConfigPath);
71034
71034
  }
71035
- setConfigObject(config28);
71035
+ setConfigObject(config29);
71036
71036
  } catch (ex) {
71037
71037
  if (ex.name === "PermissionDenied")
71038
71038
  error2 = ex;
@@ -71042,9 +71042,9 @@ var YargsParser = class {
71042
71042
  }
71043
71043
  });
71044
71044
  }
71045
- function setConfigObject(config28, prev) {
71046
- Object.keys(config28).forEach(function(key) {
71047
- const value = config28[key];
71045
+ function setConfigObject(config29, prev) {
71046
+ Object.keys(config29).forEach(function(key) {
71047
+ const value = config29[key];
71048
71048
  const fullKey = prev ? prev + "." + key : key;
71049
71049
  if (typeof value === "object" && value !== null && !Array.isArray(value) && configuration["dot-notation"]) {
71050
71050
  setConfigObject(value, fullKey);
@@ -72196,11 +72196,11 @@ var CommandInstance = class {
72196
72196
  });
72197
72197
  if (!unparsed.length)
72198
72198
  return;
72199
- const config28 = Object.assign({}, options.configuration, {
72199
+ const config29 = Object.assign({}, options.configuration, {
72200
72200
  "populate--": false
72201
72201
  });
72202
72202
  const parsed = this.shim.Parser.detailed(unparsed, Object.assign({}, options, {
72203
- configuration: config28
72203
+ configuration: config29
72204
72204
  }));
72205
72205
  if (parsed.error) {
72206
72206
  yargs.getInternalMethods().getUsageInstance().fail(parsed.error.message, parsed.error);
@@ -73423,31 +73423,31 @@ ${customMsgs.join("\n")}` : "";
73423
73423
  // ../../node_modules/.pnpm/yargs@17.7.2/node_modules/yargs/build/lib/utils/apply-extends.js
73424
73424
  var previouslyVisitedConfigs = [];
73425
73425
  var shim2;
73426
- function applyExtends(config28, cwd, mergeExtends, _shim) {
73426
+ function applyExtends(config29, cwd, mergeExtends, _shim) {
73427
73427
  shim2 = _shim;
73428
73428
  let defaultConfig = {};
73429
- if (Object.prototype.hasOwnProperty.call(config28, "extends")) {
73430
- if (typeof config28.extends !== "string")
73429
+ if (Object.prototype.hasOwnProperty.call(config29, "extends")) {
73430
+ if (typeof config29.extends !== "string")
73431
73431
  return defaultConfig;
73432
- const isPath = /\.json|\..*rc$/.test(config28.extends);
73432
+ const isPath = /\.json|\..*rc$/.test(config29.extends);
73433
73433
  let pathToDefault = null;
73434
73434
  if (!isPath) {
73435
73435
  try {
73436
- pathToDefault = require.resolve(config28.extends);
73436
+ pathToDefault = require.resolve(config29.extends);
73437
73437
  } catch (_err) {
73438
- return config28;
73438
+ return config29;
73439
73439
  }
73440
73440
  } else {
73441
- pathToDefault = getPathToDefaultConfig(cwd, config28.extends);
73441
+ pathToDefault = getPathToDefaultConfig(cwd, config29.extends);
73442
73442
  }
73443
73443
  checkForCircularExtends(pathToDefault);
73444
73444
  previouslyVisitedConfigs.push(pathToDefault);
73445
- defaultConfig = isPath ? JSON.parse(shim2.readFileSync(pathToDefault, "utf8")) : require(config28.extends);
73446
- delete config28.extends;
73445
+ defaultConfig = isPath ? JSON.parse(shim2.readFileSync(pathToDefault, "utf8")) : require(config29.extends);
73446
+ delete config29.extends;
73447
73447
  defaultConfig = applyExtends(defaultConfig, shim2.path.dirname(pathToDefault), mergeExtends, shim2);
73448
73448
  }
73449
73449
  previouslyVisitedConfigs = [];
73450
- return mergeExtends ? mergeDeep(defaultConfig, config28) : Object.assign({}, defaultConfig, config28);
73450
+ return mergeExtends ? mergeDeep(defaultConfig, config29) : Object.assign({}, defaultConfig, config29);
73451
73451
  }
73452
73452
  function checkForCircularExtends(cfgPath) {
73453
73453
  if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) {
@@ -73457,17 +73457,17 @@ function checkForCircularExtends(cfgPath) {
73457
73457
  function getPathToDefaultConfig(cwd, pathToExtend) {
73458
73458
  return shim2.path.resolve(cwd, pathToExtend);
73459
73459
  }
73460
- function mergeDeep(config1, config28) {
73460
+ function mergeDeep(config1, config29) {
73461
73461
  const target = {};
73462
73462
  function isObject(obj) {
73463
73463
  return obj && typeof obj === "object" && !Array.isArray(obj);
73464
73464
  }
73465
73465
  Object.assign(target, config1);
73466
- for (const key of Object.keys(config28)) {
73467
- if (isObject(config28[key]) && isObject(target[key])) {
73468
- target[key] = mergeDeep(config1[key], config28[key]);
73466
+ for (const key of Object.keys(config29)) {
73467
+ if (isObject(config29[key]) && isObject(target[key])) {
73468
+ target[key] = mergeDeep(config1[key], config29[key]);
73469
73469
  } else {
73470
- target[key] = config28[key];
73470
+ target[key] = config29[key];
73471
73471
  }
73472
73472
  }
73473
73473
  return target;
@@ -74228,9 +74228,9 @@ var YargsInstance = class {
74228
74228
  }
74229
74229
  return maybePromise;
74230
74230
  }
74231
- parserConfiguration(config28) {
74232
- argsert("<object>", [config28], arguments.length);
74233
- __classPrivateFieldSet(this, _YargsInstance_parserConfig, config28, "f");
74231
+ parserConfiguration(config29) {
74232
+ argsert("<object>", [config29], arguments.length);
74233
+ __classPrivateFieldSet(this, _YargsInstance_parserConfig, config29, "f");
74234
74234
  return this;
74235
74235
  }
74236
74236
  pkgConf(key, rootPath) {
@@ -74402,9 +74402,9 @@ var YargsInstance = class {
74402
74402
  return this;
74403
74403
  }
74404
74404
  }
74405
- usageConfiguration(config28) {
74406
- argsert("<object>", [config28], arguments.length);
74407
- __classPrivateFieldSet(this, _YargsInstance_usageConfig, config28, "f");
74405
+ usageConfiguration(config29) {
74406
+ argsert("<object>", [config29], arguments.length);
74407
+ __classPrivateFieldSet(this, _YargsInstance_usageConfig, config29, "f");
74408
74408
  return this;
74409
74409
  }
74410
74410
  version(opt, msg, ver) {
@@ -74810,11 +74810,11 @@ var YargsInstance = class {
74810
74810
  __classPrivateFieldGet(this, _YargsInstance_options, "f").__ = __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.__;
74811
74811
  __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration = this[kGetParserConfiguration]();
74812
74812
  const populateDoubleDash = !!__classPrivateFieldGet(this, _YargsInstance_options, "f").configuration["populate--"];
74813
- const config28 = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration, {
74813
+ const config29 = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration, {
74814
74814
  "populate--": true
74815
74815
  });
74816
74816
  const parsed = __classPrivateFieldGet(this, _YargsInstance_shim, "f").Parser.detailed(args, Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f"), {
74817
- configuration: { "parse-positional-numbers": false, ...config28 }
74817
+ configuration: { "parse-positional-numbers": false, ...config29 }
74818
74818
  }));
74819
74819
  const argv = Object.assign(parsed.argv, __classPrivateFieldGet(this, _YargsInstance_parseContext, "f"));
74820
74820
  let argvPromise = void 0;
@@ -74977,7 +74977,7 @@ var Yargs = YargsFactory(esm_default);
74977
74977
  var yargs_default = Yargs;
74978
74978
 
74979
74979
  // package.json
74980
- var version = "2.40.0";
74980
+ var version = "2.40.1";
74981
74981
 
74982
74982
  // src/metrics.ts
74983
74983
  var import_node_async_hooks = require("node:async_hooks");
@@ -75021,12 +75021,12 @@ function getGlobalWranglerConfigPath() {
75021
75021
  }
75022
75022
 
75023
75023
  // src/helpers/metrics-config.ts
75024
- function writeMetricsConfig(config28) {
75024
+ function writeMetricsConfig(config29) {
75025
75025
  (0, import_node_fs2.mkdirSync)(import_node_path2.default.dirname(getMetricsConfigPath()), { recursive: true });
75026
75026
  (0, import_node_fs2.writeFileSync)(
75027
75027
  getMetricsConfigPath(),
75028
75028
  JSON.stringify(
75029
- config28,
75029
+ config29,
75030
75030
  (_key, value) => value instanceof Date ? value.toISOString() : value,
75031
75031
  " "
75032
75032
  )
@@ -75034,9 +75034,9 @@ function writeMetricsConfig(config28) {
75034
75034
  }
75035
75035
  function readMetricsConfig() {
75036
75036
  try {
75037
- const config28 = (0, import_node_fs2.readFileSync)(getMetricsConfigPath(), "utf8");
75037
+ const config29 = (0, import_node_fs2.readFileSync)(getMetricsConfigPath(), "utf8");
75038
75038
  return JSON.parse(
75039
- config28,
75039
+ config29,
75040
75040
  (key, value) => key === "date" ? new Date(value) : value
75041
75041
  );
75042
75042
  } catch {
@@ -75046,10 +75046,10 @@ function readMetricsConfig() {
75046
75046
  function getMetricsConfigPath() {
75047
75047
  return import_node_path2.default.resolve(getGlobalWranglerConfigPath(), "metrics.json");
75048
75048
  }
75049
- function getDeviceId(config28) {
75050
- const deviceId = config28.deviceId ?? (0, import_node_crypto.randomUUID)();
75051
- if (config28.deviceId === void 0) {
75052
- writeMetricsConfig({ ...config28, deviceId });
75049
+ function getDeviceId(config29) {
75050
+ const deviceId = config29.deviceId ?? (0, import_node_crypto.randomUUID)();
75051
+ if (config29.deviceId === void 0) {
75052
+ writeMetricsConfig({ ...config29, deviceId });
75053
75053
  }
75054
75054
  return deviceId;
75055
75055
  }
@@ -75324,10 +75324,10 @@ function getPlatform() {
75324
75324
  function createReporter() {
75325
75325
  const events = [];
75326
75326
  const als = new import_node_async_hooks.AsyncLocalStorage();
75327
- const config28 = readMetricsConfig() ?? {};
75328
- const isFirstUsage = config28.c3permission === void 0;
75327
+ const config29 = readMetricsConfig() ?? {};
75328
+ const isFirstUsage = config29.c3permission === void 0;
75329
75329
  const isEnabled = isTelemetryEnabled();
75330
- const deviceId = getDeviceId(config28);
75330
+ const deviceId = getDeviceId(config29);
75331
75331
  const packageManager = detectPackageManager();
75332
75332
  const platform3 = getPlatform();
75333
75333
  const amplitude_session_id = Date.now();
@@ -75360,7 +75360,7 @@ function createReporter() {
75360
75360
  if (process.env.CREATE_CLOUDFLARE_TELEMETRY_DISABLED === "1") {
75361
75361
  return false;
75362
75362
  }
75363
- return hasSparrowSourceKey() && getC3Permission(config28).enabled;
75363
+ return hasSparrowSourceKey() && getC3Permission(config29).enabled;
75364
75364
  }
75365
75365
  async function waitForAllEventsSettled() {
75366
75366
  await Promise.allSettled(events);
@@ -75466,20 +75466,20 @@ function initializeC3Permission(enabled = true) {
75466
75466
  date: /* @__PURE__ */ new Date()
75467
75467
  };
75468
75468
  }
75469
- function getC3Permission(config28 = readMetricsConfig() ?? {}) {
75470
- if (!config28.c3permission) {
75471
- config28.c3permission = initializeC3Permission();
75472
- writeMetricsConfig(config28);
75469
+ function getC3Permission(config29 = readMetricsConfig() ?? {}) {
75470
+ if (!config29.c3permission) {
75471
+ config29.c3permission = initializeC3Permission();
75472
+ writeMetricsConfig(config29);
75473
75473
  }
75474
- return config28.c3permission;
75474
+ return config29.c3permission;
75475
75475
  }
75476
75476
  function updateC3Pemission(enabled) {
75477
- const config28 = readMetricsConfig();
75478
- if (config28.c3permission?.enabled === enabled) {
75477
+ const config29 = readMetricsConfig();
75478
+ if (config29.c3permission?.enabled === enabled) {
75479
75479
  return;
75480
75480
  }
75481
- config28.c3permission = initializeC3Permission(enabled);
75482
- writeMetricsConfig(config28);
75481
+ config29.c3permission = initializeC3Permission(enabled);
75482
+ writeMetricsConfig(config29);
75483
75483
  }
75484
75484
  var runTelemetryCommand = (action) => {
75485
75485
  const logTelemetryStatus = (enabled) => {
@@ -75524,28 +75524,28 @@ var import_haikunator = __toESM(require_dist_web());
75524
75524
  var import_fs6 = require("fs");
75525
75525
  var import_path6 = __toESM(require("path"));
75526
75526
  var import_undici2 = __toESM(require_undici());
75527
- var installPackages = async (packages, config28 = {}) => {
75527
+ var installPackages = async (packages, config29 = {}) => {
75528
75528
  const { npm: npm24 } = detectPackageManager();
75529
75529
  let saveFlag;
75530
75530
  let cmd;
75531
75531
  switch (npm24) {
75532
75532
  case "yarn":
75533
75533
  cmd = "add";
75534
- saveFlag = config28.dev ? "-D" : "";
75534
+ saveFlag = config29.dev ? "-D" : "";
75535
75535
  break;
75536
75536
  case "bun":
75537
75537
  cmd = "add";
75538
- saveFlag = config28.dev ? "-d" : "";
75538
+ saveFlag = config29.dev ? "-d" : "";
75539
75539
  break;
75540
75540
  case "npm":
75541
75541
  case "pnpm":
75542
75542
  default:
75543
75543
  cmd = "install";
75544
- saveFlag = config28.dev ? "--save-dev" : "";
75544
+ saveFlag = config29.dev ? "--save-dev" : "";
75545
75545
  break;
75546
75546
  }
75547
75547
  await runCommand([npm24, cmd, ...saveFlag ? [saveFlag] : [], ...packages], {
75548
- ...config28,
75548
+ ...config29,
75549
75549
  silent: true
75550
75550
  });
75551
75551
  };
@@ -76016,37 +76016,9 @@ var config2 = {
76016
76016
  };
76017
76017
  var c3_default2 = config2;
76018
76018
 
76019
- // templates-experimental/docusaurus/c3.ts
76019
+ // templates-experimental/gatsby/c3.ts
76020
76020
  var { npm: npm2 } = detectPackageManager();
76021
76021
  var generate3 = async (ctx) => {
76022
- await runFrameworkGenerator(ctx, [ctx.project.name, "classic"]);
76023
- };
76024
- var config3 = {
76025
- configVersion: 1,
76026
- id: "docusaurus",
76027
- frameworkCli: "create-docusaurus",
76028
- platform: "workers",
76029
- displayName: "Docusaurus",
76030
- copyFiles: {
76031
- path: "./templates"
76032
- },
76033
- path: "templates-experimental/docusaurus",
76034
- generate: generate3,
76035
- transformPackageJson: async () => ({
76036
- scripts: {
76037
- deploy: `${npm2} run build && wrangler deploy`,
76038
- preview: `${npm2} run build && wrangler dev`
76039
- }
76040
- }),
76041
- devScript: "start",
76042
- deployScript: "deploy",
76043
- previewScript: "preview"
76044
- };
76045
- var c3_default3 = config3;
76046
-
76047
- // templates-experimental/gatsby/c3.ts
76048
- var { npm: npm3 } = detectPackageManager();
76049
- var generate4 = async (ctx) => {
76050
76022
  const defaultTemplate = "https://github.com/gatsbyjs/gatsby-starter-blog";
76051
76023
  const useTemplate = await inputPrompt({
76052
76024
  type: "confirm",
@@ -76065,7 +76037,7 @@ var generate4 = async (ctx) => {
76065
76037
  }
76066
76038
  await runFrameworkGenerator(ctx, ["new", ctx.project.name, templateUrl]);
76067
76039
  };
76068
- var config4 = {
76040
+ var config3 = {
76069
76041
  configVersion: 1,
76070
76042
  id: "gatsby",
76071
76043
  frameworkCli: "gatsby",
@@ -76075,21 +76047,21 @@ var config4 = {
76075
76047
  path: "./templates"
76076
76048
  },
76077
76049
  path: "templates-experimental/gatsby",
76078
- generate: generate4,
76050
+ generate: generate3,
76079
76051
  transformPackageJson: async () => ({
76080
76052
  scripts: {
76081
- deploy: `${npm3} run build && wrangler deploy`,
76082
- preview: `${npm3} run build && wrangler dev`
76053
+ deploy: `${npm2} run build && wrangler deploy`,
76054
+ preview: `${npm2} run build && wrangler dev`
76083
76055
  }
76084
76056
  }),
76085
76057
  devScript: "develop",
76086
76058
  deployScript: "deploy",
76087
76059
  previewScript: "preview"
76088
76060
  };
76089
- var c3_default4 = config4;
76061
+ var c3_default3 = config3;
76090
76062
 
76091
76063
  // templates-experimental/hello-world-assets-only/c3.ts
76092
- var config5 = {
76064
+ var config4 = {
76093
76065
  configVersion: 1,
76094
76066
  id: "hello-world-assets-only",
76095
76067
  path: "templates-experimental/hello-world-assets-only",
@@ -76100,10 +76072,10 @@ var config5 = {
76100
76072
  path: "./templates"
76101
76073
  }
76102
76074
  };
76103
- var c3_default5 = config5;
76075
+ var c3_default4 = config4;
76104
76076
 
76105
76077
  // templates-experimental/hello-world-durable-object-with-assets/c3.ts
76106
- var config6 = {
76078
+ var config5 = {
76107
76079
  configVersion: 1,
76108
76080
  id: "hello-world-durable-object-with-assets",
76109
76081
  path: "templates-experimental/hello-world-durable-object-with-assets",
@@ -76121,10 +76093,10 @@ var config6 = {
76121
76093
  }
76122
76094
  }
76123
76095
  };
76124
- var c3_default6 = config6;
76096
+ var c3_default5 = config5;
76125
76097
 
76126
76098
  // templates-experimental/hello-world-with-assets/c3.ts
76127
- var c3_default7 = {
76099
+ var c3_default6 = {
76128
76100
  configVersion: 1,
76129
76101
  id: "hello-world-with-assets",
76130
76102
  path: "templates-experimental/hello-world-with-assets",
@@ -76147,7 +76119,7 @@ var c3_default7 = {
76147
76119
  };
76148
76120
 
76149
76121
  // templates-experimental/hono/c3.ts
76150
- var generate5 = async (ctx) => {
76122
+ var generate4 = async (ctx) => {
76151
76123
  const { name: pm4 } = detectPackageManager();
76152
76124
  await runFrameworkGenerator(ctx, [
76153
76125
  ctx.project.name,
@@ -76159,7 +76131,7 @@ var generate5 = async (ctx) => {
76159
76131
  ]);
76160
76132
  logRaw("");
76161
76133
  };
76162
- var config7 = {
76134
+ var config6 = {
76163
76135
  configVersion: 1,
76164
76136
  id: "hono",
76165
76137
  frameworkCli: "create-hono",
@@ -76169,7 +76141,7 @@ var config7 = {
76169
76141
  },
76170
76142
  platform: "workers",
76171
76143
  path: "templates-experimental/hono",
76172
- generate: generate5,
76144
+ generate: generate4,
76173
76145
  transformPackageJson: async () => ({
76174
76146
  scripts: {
76175
76147
  dev: "wrangler dev",
@@ -76181,10 +76153,10 @@ var config7 = {
76181
76153
  deployScript: "deploy",
76182
76154
  previewScript: "dev"
76183
76155
  };
76184
- var c3_default8 = config7;
76156
+ var c3_default7 = config6;
76185
76157
 
76186
76158
  // templates-experimental/next/c3.ts
76187
- var generate6 = async (ctx) => {
76159
+ var generate5 = async (ctx) => {
76188
76160
  await runFrameworkGenerator(ctx, [ctx.project.name]);
76189
76161
  };
76190
76162
  var configure3 = async () => {
@@ -76212,7 +76184,7 @@ var updateNextConfig = () => {
76212
76184
  writeFile2(configFile, updatedConfigFile);
76213
76185
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
76214
76186
  };
76215
- var c3_default9 = {
76187
+ var c3_default8 = {
76216
76188
  configVersion: 1,
76217
76189
  id: "next",
76218
76190
  frameworkCli: "create-next-app",
@@ -76226,7 +76198,7 @@ var c3_default9 = {
76226
76198
  copyFiles: {
76227
76199
  path: "./templates"
76228
76200
  },
76229
- generate: generate6,
76201
+ generate: generate5,
76230
76202
  configure: configure3,
76231
76203
  transformPackageJson: async () => ({
76232
76204
  scripts: {
@@ -76295,14 +76267,14 @@ function getLatestTypesEntrypoint(ctx) {
76295
76267
 
76296
76268
  // templates-experimental/nuxt/c3.ts
76297
76269
  var recast3 = __toESM(require_main3());
76298
- var { npm: npm4, name: pm } = detectPackageManager();
76299
- var generate7 = async (ctx) => {
76270
+ var { npm: npm3, name: pm } = detectPackageManager();
76271
+ var generate6 = async (ctx) => {
76300
76272
  const gitFlag = ctx.args.git ? `--gitInit` : `--no-gitInit`;
76301
76273
  await runFrameworkGenerator(ctx, [
76302
76274
  "init",
76303
76275
  ctx.project.name,
76304
76276
  "--packageManager",
76305
- npm4,
76277
+ npm3,
76306
76278
  gitFlag
76307
76279
  ]);
76308
76280
  writeFile2("./.node-version", "18");
@@ -76316,7 +76288,7 @@ var configure4 = async (ctx) => {
76316
76288
  await installPackages(packages, {
76317
76289
  dev: true,
76318
76290
  startText: "Installing nitro module `nitro-cloudflare-dev`",
76319
- doneText: `${brandColor("installed")} ${dim(`via \`${npm4} install\``)}`
76291
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm3} install\``)}`
76320
76292
  });
76321
76293
  updateNuxtConfig();
76322
76294
  updateEnvTypes(ctx);
@@ -76367,7 +76339,7 @@ var updateNuxtConfig = () => {
76367
76339
  });
76368
76340
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
76369
76341
  };
76370
- var config8 = {
76342
+ var config7 = {
76371
76343
  configVersion: 1,
76372
76344
  id: "nuxt",
76373
76345
  frameworkCli: "nuxi",
@@ -76377,12 +76349,12 @@ var config8 = {
76377
76349
  path: "./templates"
76378
76350
  },
76379
76351
  path: "templates-experimental/nuxt",
76380
- generate: generate7,
76352
+ generate: generate6,
76381
76353
  configure: configure4,
76382
76354
  transformPackageJson: async () => ({
76383
76355
  scripts: {
76384
- deploy: `${npm4} run build && wrangler deploy`,
76385
- preview: `${npm4} run build && wrangler dev`,
76356
+ deploy: `${npm3} run build && wrangler deploy`,
76357
+ preview: `${npm3} run build && wrangler dev`,
76386
76358
  "cf-typegen": `wrangler types`
76387
76359
  }
76388
76360
  }),
@@ -76390,16 +76362,16 @@ var config8 = {
76390
76362
  deployScript: "deploy",
76391
76363
  previewScript: "preview"
76392
76364
  };
76393
- var c3_default10 = config8;
76365
+ var c3_default9 = config7;
76394
76366
 
76395
76367
  // templates-experimental/qwik/c3.ts
76396
76368
  var recast4 = __toESM(require_main3());
76397
- var { npm: npm5, npx: npx2, name } = detectPackageManager();
76398
- var generate8 = async (ctx) => {
76369
+ var { npm: npm4, npx: npx2, name } = detectPackageManager();
76370
+ var generate7 = async (ctx) => {
76399
76371
  await runFrameworkGenerator(ctx, ["playground", ctx.project.name]);
76400
76372
  };
76401
76373
  var configure5 = async (ctx) => {
76402
- const cmd = [name === "pnpm" ? npm5 : npx2, "qwik", "add", "cloudflare-pages"];
76374
+ const cmd = [name === "pnpm" ? npm4 : npx2, "qwik", "add", "cloudflare-pages"];
76403
76375
  endSection(`Running ${quoteShellArgs(cmd)}`);
76404
76376
  await runCommand(cmd);
76405
76377
  removeFile("./public/_headers");
@@ -76478,7 +76450,7 @@ var populateCloudflareEnv = () => {
76478
76450
  });
76479
76451
  s.stop(`${brandColor("updated")} \`${entrypointPath}\``);
76480
76452
  };
76481
- var config9 = {
76453
+ var config8 = {
76482
76454
  configVersion: 1,
76483
76455
  id: "qwik",
76484
76456
  frameworkCli: "create-qwik",
@@ -76488,12 +76460,12 @@ var config9 = {
76488
76460
  path: "./templates"
76489
76461
  },
76490
76462
  path: "templates-experimental/qwik",
76491
- generate: generate8,
76463
+ generate: generate7,
76492
76464
  configure: configure5,
76493
76465
  transformPackageJson: async () => ({
76494
76466
  scripts: {
76495
- deploy: `${npm5} run build && wrangler deploy`,
76496
- preview: `${npm5} run build && wrangler dev`,
76467
+ deploy: `${npm4} run build && wrangler deploy`,
76468
+ preview: `${npm4} run build && wrangler dev`,
76497
76469
  "cf-typegen": `wrangler types`
76498
76470
  }
76499
76471
  }),
@@ -76501,15 +76473,15 @@ var config9 = {
76501
76473
  deployScript: "deploy",
76502
76474
  previewScript: "preview"
76503
76475
  };
76504
- var c3_default11 = config9;
76476
+ var c3_default10 = config8;
76505
76477
 
76506
76478
  // templates-experimental/react/c3.ts
76507
76479
  var import_assert2 = __toESM(require("assert"));
76508
76480
  var recast5 = __toESM(require_main3());
76509
76481
  var b2 = recast5.types.builders;
76510
76482
  var t = recast5.types.namedTypes;
76511
- var { npm: npm6 } = detectPackageManager();
76512
- var generate9 = async (ctx) => {
76483
+ var { npm: npm5 } = detectPackageManager();
76484
+ var generate8 = async (ctx) => {
76513
76485
  const variant = await getVariant();
76514
76486
  ctx.args.lang = variant.lang;
76515
76487
  await runFrameworkGenerator(ctx, [
@@ -76550,9 +76522,9 @@ function transformViteConfig(ctx) {
76550
76522
  if (callee.name !== "defineConfig") {
76551
76523
  return this.traverse(n);
76552
76524
  }
76553
- const config28 = n.node.arguments[0];
76554
- (0, import_assert2.default)(t.ObjectExpression.check(config28));
76555
- const pluginsProp = config28.properties.find((prop) => isPluginsProp(prop));
76525
+ const config29 = n.node.arguments[0];
76526
+ (0, import_assert2.default)(t.ObjectExpression.check(config29));
76527
+ const pluginsProp = config29.properties.find((prop) => isPluginsProp(prop));
76556
76528
  (0, import_assert2.default)(pluginsProp && t.ArrayExpression.check(pluginsProp.value));
76557
76529
  pluginsProp.value.elements.push(
76558
76530
  b2.callExpression(b2.identifier("cloudflare"), [])
@@ -76609,7 +76581,7 @@ async function getVariant() {
76609
76581
  (0, import_assert2.default)(selected, "Expected a variant to be selected");
76610
76582
  return selected;
76611
76583
  }
76612
- var config10 = {
76584
+ var config9 = {
76613
76585
  configVersion: 1,
76614
76586
  id: "react",
76615
76587
  frameworkCli: "create-vite",
@@ -76626,23 +76598,23 @@ var config10 = {
76626
76598
  }
76627
76599
  }
76628
76600
  },
76629
- generate: generate9,
76601
+ generate: generate8,
76630
76602
  configure: configure6,
76631
76603
  transformPackageJson: async () => ({
76632
76604
  scripts: {
76633
- deploy: `${npm6} run build && wrangler deploy`,
76634
- preview: `${npm6} run build && vite preview`
76605
+ deploy: `${npm5} run build && wrangler deploy`,
76606
+ preview: `${npm5} run build && vite preview`
76635
76607
  }
76636
76608
  }),
76637
76609
  devScript: "dev",
76638
76610
  deployScript: "deploy",
76639
76611
  previewScript: "preview"
76640
76612
  };
76641
- var c3_default12 = config10;
76613
+ var c3_default11 = config9;
76642
76614
 
76643
76615
  // templates-experimental/remix/c3.ts
76644
- var { npm: npm7 } = detectPackageManager();
76645
- var generate10 = async (ctx) => {
76616
+ var { npm: npm6 } = detectPackageManager();
76617
+ var generate9 = async (ctx) => {
76646
76618
  await runFrameworkGenerator(ctx, [
76647
76619
  ctx.project.name,
76648
76620
  "--template",
@@ -76657,7 +76629,7 @@ var configure7 = async () => {
76657
76629
  doneText: `${brandColor(`updated`)} ${dim("wrangler@latest")}`
76658
76630
  });
76659
76631
  };
76660
- var config11 = {
76632
+ var config10 = {
76661
76633
  configVersion: 1,
76662
76634
  id: "remix",
76663
76635
  frameworkCli: "create-remix",
@@ -76667,12 +76639,12 @@ var config11 = {
76667
76639
  path: "./templates"
76668
76640
  },
76669
76641
  path: "templates-experimental/remix",
76670
- generate: generate10,
76642
+ generate: generate9,
76671
76643
  configure: configure7,
76672
76644
  transformPackageJson: async () => ({
76673
76645
  scripts: {
76674
- deploy: `${npm7} run build && wrangler deploy`,
76675
- preview: `${npm7} run build && wrangler dev`,
76646
+ deploy: `${npm6} run build && wrangler deploy`,
76647
+ preview: `${npm6} run build && wrangler dev`,
76676
76648
  "cf-typegen": `wrangler types`
76677
76649
  }
76678
76650
  }),
@@ -76680,12 +76652,12 @@ var config11 = {
76680
76652
  deployScript: "deploy",
76681
76653
  previewScript: "preview"
76682
76654
  };
76683
- var c3_default13 = config11;
76655
+ var c3_default12 = config10;
76684
76656
 
76685
76657
  // templates-experimental/solid/c3.ts
76686
76658
  var recast6 = __toESM(require_main3());
76687
- var { npm: npm8 } = detectPackageManager();
76688
- var generate11 = async (ctx) => {
76659
+ var { npm: npm7 } = detectPackageManager();
76660
+ var generate10 = async (ctx) => {
76689
76661
  await runFrameworkGenerator(ctx, ["-p", ctx.project.name, "-s"]);
76690
76662
  logRaw("");
76691
76663
  };
@@ -76694,7 +76666,7 @@ var configure8 = async (ctx) => {
76694
76666
  await installPackages(packages, {
76695
76667
  dev: true,
76696
76668
  startText: "Installing nitro module `nitropack`",
76697
- doneText: `${brandColor("installed")} ${dim(`via \`${npm8} install\``)}`
76669
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm7} install\``)}`
76698
76670
  });
76699
76671
  usesTypescript(ctx);
76700
76672
  const filePath = `app.config.${usesTypescript(ctx) ? "ts" : "js"}`;
@@ -76730,7 +76702,7 @@ var configure8 = async (ctx) => {
76730
76702
  }
76731
76703
  });
76732
76704
  };
76733
- var config12 = {
76705
+ var config11 = {
76734
76706
  configVersion: 1,
76735
76707
  id: "solid",
76736
76708
  frameworkCli: "create-solid",
@@ -76740,12 +76712,12 @@ var config12 = {
76740
76712
  path: "./templates"
76741
76713
  },
76742
76714
  path: "templates-experimental/solid",
76743
- generate: generate11,
76715
+ generate: generate10,
76744
76716
  configure: configure8,
76745
76717
  transformPackageJson: async () => ({
76746
76718
  scripts: {
76747
- preview: `${npm8} run build && npx wrangler dev`,
76748
- deploy: `${npm8} run build && wrangler deploy`
76719
+ preview: `${npm7} run build && npx wrangler dev`,
76720
+ deploy: `${npm7} run build && wrangler deploy`
76749
76721
  }
76750
76722
  }),
76751
76723
  compatibilityFlags: ["nodejs_compat"],
@@ -76753,13 +76725,13 @@ var config12 = {
76753
76725
  deployScript: "deploy",
76754
76726
  previewScript: "preview"
76755
76727
  };
76756
- var c3_default14 = config12;
76728
+ var c3_default13 = config11;
76757
76729
 
76758
76730
  // templates-experimental/svelte/c3.ts
76759
76731
  var import_node_os3 = require("node:os");
76760
76732
  var recast7 = __toESM(require_main3());
76761
- var { npm: npm9 } = detectPackageManager();
76762
- var generate12 = async (ctx) => {
76733
+ var { npm: npm8 } = detectPackageManager();
76734
+ var generate11 = async (ctx) => {
76763
76735
  await runFrameworkGenerator(ctx, ["create", ctx.project.name]);
76764
76736
  logRaw("");
76765
76737
  };
@@ -76822,7 +76794,7 @@ var updateTypeDefinitions = (ctx) => {
76822
76794
  }
76823
76795
  });
76824
76796
  };
76825
- var config13 = {
76797
+ var config12 = {
76826
76798
  configVersion: 1,
76827
76799
  id: "svelte",
76828
76800
  frameworkCli: "sv",
@@ -76832,12 +76804,12 @@ var config13 = {
76832
76804
  path: "./templates"
76833
76805
  },
76834
76806
  path: "templates-experimental/svelte",
76835
- generate: generate12,
76807
+ generate: generate11,
76836
76808
  configure: configure9,
76837
76809
  transformPackageJson: async (original, ctx) => {
76838
76810
  let scripts = {
76839
- preview: `${npm9} run build && wrangler dev`,
76840
- deploy: `${npm9} run build && wrangler deploy`
76811
+ preview: `${npm8} run build && wrangler dev`,
76812
+ deploy: `${npm8} run build && wrangler deploy`
76841
76813
  };
76842
76814
  if (usesTypescript(ctx)) {
76843
76815
  const mv = (0, import_node_os3.platform)() === "win32" ? "move" : "mv";
@@ -76852,14 +76824,14 @@ var config13 = {
76852
76824
  deployScript: "deploy",
76853
76825
  previewScript: "preview"
76854
76826
  };
76855
- var c3_default15 = config13;
76827
+ var c3_default14 = config12;
76856
76828
 
76857
76829
  // templates-experimental/vue/c3.ts
76858
- var { npm: npm10 } = detectPackageManager();
76859
- var generate13 = async (ctx) => {
76830
+ var { npm: npm9 } = detectPackageManager();
76831
+ var generate12 = async (ctx) => {
76860
76832
  await runFrameworkGenerator(ctx, [ctx.project.name]);
76861
76833
  };
76862
- var config14 = {
76834
+ var config13 = {
76863
76835
  configVersion: 1,
76864
76836
  id: "vue",
76865
76837
  frameworkCli: "create-vue",
@@ -76869,23 +76841,23 @@ var config14 = {
76869
76841
  path: "./templates"
76870
76842
  },
76871
76843
  path: "templates-experimental/vue",
76872
- generate: generate13,
76844
+ generate: generate12,
76873
76845
  transformPackageJson: async () => ({
76874
76846
  scripts: {
76875
- deploy: `${npm10} run build && wrangler deploy`,
76876
- preview: `${npm10} run build && wrangler dev`
76847
+ deploy: `${npm9} run build && wrangler deploy`,
76848
+ preview: `${npm9} run build && wrangler dev`
76877
76849
  }
76878
76850
  }),
76879
76851
  devScript: "dev",
76880
76852
  deployScript: "deploy",
76881
76853
  previewScript: "preview"
76882
76854
  };
76883
- var c3_default16 = config14;
76855
+ var c3_default15 = config13;
76884
76856
 
76885
76857
  // templates/analog/c3.ts
76886
76858
  var recast8 = __toESM(require_main3());
76887
- var { npm: npm11, name: pm2 } = detectPackageManager();
76888
- var generate14 = async (ctx) => {
76859
+ var { npm: npm10, name: pm2 } = detectPackageManager();
76860
+ var generate13 = async (ctx) => {
76889
76861
  await runFrameworkGenerator(ctx, [
76890
76862
  ctx.project.name,
76891
76863
  "--template",
@@ -76903,7 +76875,7 @@ var configure10 = async (ctx) => {
76903
76875
  await installPackages(packages, {
76904
76876
  dev: true,
76905
76877
  startText: `Installing ${packages.join(", ")}`,
76906
- doneText: `${brandColor("installed")} ${dim(`via \`${npm11} install\``)}`
76878
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm10} install\``)}`
76907
76879
  });
76908
76880
  }
76909
76881
  updateViteConfig(ctx);
@@ -76961,7 +76933,7 @@ var updateViteConfig = (ctx) => {
76961
76933
  });
76962
76934
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
76963
76935
  };
76964
- var config15 = {
76936
+ var config14 = {
76965
76937
  configVersion: 1,
76966
76938
  id: "analog",
76967
76939
  frameworkCli: "create-analog",
@@ -76970,12 +76942,12 @@ var config15 = {
76970
76942
  copyFiles: {
76971
76943
  path: "./templates"
76972
76944
  },
76973
- generate: generate14,
76945
+ generate: generate13,
76974
76946
  configure: configure10,
76975
76947
  transformPackageJson: async () => ({
76976
76948
  scripts: {
76977
- preview: `${npm11} run build && wrangler pages dev`,
76978
- deploy: `${npm11} run build && wrangler pages deploy`,
76949
+ preview: `${npm10} run build && wrangler pages dev`,
76950
+ deploy: `${npm10} run build && wrangler pages deploy`,
76979
76951
  "cf-typegen": `wrangler types`
76980
76952
  }
76981
76953
  }),
@@ -76983,12 +76955,12 @@ var config15 = {
76983
76955
  deployScript: "deploy",
76984
76956
  previewScript: "preview"
76985
76957
  };
76986
- var c3_default17 = config15;
76958
+ var c3_default16 = config14;
76987
76959
 
76988
76960
  // templates/angular/c3.ts
76989
76961
  var import_node_path4 = require("node:path");
76990
- var { npm: npm12 } = detectPackageManager();
76991
- var generate15 = async (ctx) => {
76962
+ var { npm: npm11 } = detectPackageManager();
76963
+ var generate14 = async (ctx) => {
76992
76964
  await runFrameworkGenerator(ctx, [
76993
76965
  ctx.project.name,
76994
76966
  "--ssr",
@@ -77005,7 +76977,7 @@ async function installCFWorker2() {
77005
76977
  await installPackages(["xhr2"], {
77006
76978
  dev: true,
77007
76979
  startText: "Installing additional dependencies",
77008
- doneText: `${brandColor("installed")} ${dim(`via \`${npm12} install\``)}`
76980
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm11} install\``)}`
77009
76981
  });
77010
76982
  }
77011
76983
  async function updateAppCode2() {
@@ -77047,7 +77019,7 @@ function updateAngularJson2(ctx) {
77047
77019
  writeFile2((0, import_node_path4.resolve)("angular.json"), JSON.stringify(angularJson, null, 2));
77048
77020
  s.stop(`${brandColor(`updated`)} ${dim(`\`angular.json\``)}`);
77049
77021
  }
77050
- var config16 = {
77022
+ var config15 = {
77051
77023
  configVersion: 1,
77052
77024
  id: "angular",
77053
77025
  frameworkCli: "@angular/create",
@@ -77059,23 +77031,23 @@ var config16 = {
77059
77031
  devScript: "start",
77060
77032
  deployScript: "deploy",
77061
77033
  previewScript: "start",
77062
- generate: generate15,
77034
+ generate: generate14,
77063
77035
  configure: configure11,
77064
77036
  transformPackageJson: async () => ({
77065
77037
  scripts: {
77066
- start: `${npm12} run build && wrangler pages dev dist/cloudflare ${await compatDateFlag()}`,
77067
- build: `ng build && ${npm12} run process`,
77038
+ start: `${npm11} run build && wrangler pages dev dist/cloudflare ${await compatDateFlag()}`,
77039
+ build: `ng build && ${npm11} run process`,
77068
77040
  process: "node ./tools/copy-files.mjs",
77069
- deploy: `${npm12} run build && wrangler pages deploy dist/cloudflare`
77041
+ deploy: `${npm11} run build && wrangler pages deploy dist/cloudflare`
77070
77042
  }
77071
77043
  })
77072
77044
  };
77073
- var c3_default18 = config16;
77045
+ var c3_default17 = config15;
77074
77046
 
77075
77047
  // templates/astro/c3.ts
77076
77048
  var recast9 = __toESM(require_main3());
77077
77049
  var { npx: npx3 } = detectPackageManager();
77078
- var generate16 = async (ctx) => {
77050
+ var generate15 = async (ctx) => {
77079
77051
  await runFrameworkGenerator(ctx, [ctx.project.name, "--no-install"]);
77080
77052
  logRaw("");
77081
77053
  };
@@ -77113,7 +77085,7 @@ var updateAstroConfig2 = () => {
77113
77085
  }
77114
77086
  });
77115
77087
  };
77116
- var config17 = {
77088
+ var config16 = {
77117
77089
  configVersion: 1,
77118
77090
  id: "astro",
77119
77091
  frameworkCli: "create-astro",
@@ -77135,7 +77107,7 @@ var config17 = {
77135
77107
  devScript: "dev",
77136
77108
  deployScript: "deploy",
77137
77109
  previewScript: "preview",
77138
- generate: generate16,
77110
+ generate: generate15,
77139
77111
  configure: configure12,
77140
77112
  transformPackageJson: async (pkgJson, ctx) => ({
77141
77113
  scripts: {
@@ -77145,10 +77117,10 @@ var config17 = {
77145
77117
  }
77146
77118
  })
77147
77119
  };
77148
- var c3_default19 = config17;
77120
+ var c3_default18 = config16;
77149
77121
 
77150
77122
  // templates/common/c3.ts
77151
- var c3_default20 = {
77123
+ var c3_default19 = {
77152
77124
  configVersion: 1,
77153
77125
  id: "common",
77154
77126
  displayName: "Example router & proxy Worker",
@@ -77167,7 +77139,32 @@ var c3_default20 = {
77167
77139
  }
77168
77140
  };
77169
77141
 
77170
- // templates/docusaurus/c3.ts
77142
+ // templates/docusaurus/pages/c3.ts
77143
+ var { npm: npm12 } = detectPackageManager();
77144
+ var generate16 = async (ctx) => {
77145
+ await runFrameworkGenerator(ctx, [ctx.project.name, "classic"]);
77146
+ };
77147
+ var config17 = {
77148
+ configVersion: 1,
77149
+ id: "docusaurus",
77150
+ frameworkCli: "create-docusaurus",
77151
+ platform: "pages",
77152
+ displayName: "Docusaurus",
77153
+ path: "templates/docusaurus/pages",
77154
+ generate: generate16,
77155
+ transformPackageJson: async () => ({
77156
+ scripts: {
77157
+ preview: `${npm12} run build && wrangler pages dev ./build`,
77158
+ deploy: `${npm12} run build && wrangler pages deploy ./build`
77159
+ }
77160
+ }),
77161
+ devScript: "preview",
77162
+ deployScript: "deploy",
77163
+ previewScript: "preview"
77164
+ };
77165
+ var c3_default20 = config17;
77166
+
77167
+ // templates/docusaurus/workers/c3.ts
77171
77168
  var { npm: npm13 } = detectPackageManager();
77172
77169
  var generate17 = async (ctx) => {
77173
77170
  await runFrameworkGenerator(ctx, [ctx.project.name, "classic"]);
@@ -77176,21 +77173,32 @@ var config18 = {
77176
77173
  configVersion: 1,
77177
77174
  id: "docusaurus",
77178
77175
  frameworkCli: "create-docusaurus",
77179
- platform: "pages",
77176
+ platform: "workers",
77180
77177
  displayName: "Docusaurus",
77178
+ copyFiles: {
77179
+ path: "./templates"
77180
+ },
77181
+ path: "templates/docusaurus/workers",
77181
77182
  generate: generate17,
77182
77183
  transformPackageJson: async () => ({
77183
77184
  scripts: {
77184
- preview: `${npm13} run build && wrangler pages dev ./build`,
77185
- deploy: `${npm13} run build && wrangler pages deploy ./build`
77185
+ deploy: `${npm13} run build && wrangler deploy`,
77186
+ preview: `${npm13} run build && wrangler dev`
77186
77187
  }
77187
77188
  }),
77188
- devScript: "preview",
77189
+ devScript: "start",
77189
77190
  deployScript: "deploy",
77190
77191
  previewScript: "preview"
77191
77192
  };
77192
77193
  var c3_default21 = config18;
77193
77194
 
77195
+ // templates/docusaurus/c3.ts
77196
+ var config19 = {
77197
+ displayName: "Docusaurus",
77198
+ platformVariants: { pages: c3_default20, workers: c3_default21 }
77199
+ };
77200
+ var c3_default22 = config19;
77201
+
77194
77202
  // templates/gatsby/c3.ts
77195
77203
  var { npm: npm14 } = detectPackageManager();
77196
77204
  var generate18 = async (ctx) => {
@@ -77212,7 +77220,7 @@ var generate18 = async (ctx) => {
77212
77220
  }
77213
77221
  await runFrameworkGenerator(ctx, ["new", ctx.project.name, templateUrl]);
77214
77222
  };
77215
- var config19 = {
77223
+ var config20 = {
77216
77224
  configVersion: 1,
77217
77225
  id: "gatsby",
77218
77226
  frameworkCli: "gatsby",
@@ -77229,10 +77237,10 @@ var config19 = {
77229
77237
  deployScript: "deploy",
77230
77238
  previewScript: "preview"
77231
77239
  };
77232
- var c3_default22 = config19;
77240
+ var c3_default23 = config20;
77233
77241
 
77234
77242
  // templates/hello-world-durable-object/c3.ts
77235
- var c3_default23 = {
77243
+ var c3_default24 = {
77236
77244
  configVersion: 1,
77237
77245
  id: "hello-world-durable-object",
77238
77246
  displayName: "Hello World Worker Using Durable Objects",
@@ -77253,7 +77261,7 @@ var c3_default23 = {
77253
77261
  // templates/hello-world/c3.ts
77254
77262
  var import_promises2 = require("node:fs/promises");
77255
77263
  var import_node_path5 = require("node:path");
77256
- var c3_default24 = {
77264
+ var c3_default25 = {
77257
77265
  configVersion: 1,
77258
77266
  id: "hello-world",
77259
77267
  displayName: "Hello World Worker",
@@ -77314,7 +77322,7 @@ var configure13 = async (ctx) => {
77314
77322
  });
77315
77323
  s.stop(`${brandColor("updated")} \`${dim(indexFile)}\``);
77316
77324
  };
77317
- var config20 = {
77325
+ var config21 = {
77318
77326
  configVersion: 1,
77319
77327
  id: "hono",
77320
77328
  frameworkCli: "create-hono",
@@ -77336,7 +77344,7 @@ var config20 = {
77336
77344
  deployScript: "deploy",
77337
77345
  previewScript: "dev"
77338
77346
  };
77339
- var c3_default25 = config20;
77347
+ var c3_default26 = config21;
77340
77348
 
77341
77349
  // templates/next/c3.ts
77342
77350
  var import_path10 = require("path");
@@ -77441,7 +77449,7 @@ var addDevDependencies = async (installEslintPlugin) => {
77441
77449
  doneText: `${brandColor(`installed`)} ${dim(packages.join(", "))}`
77442
77450
  });
77443
77451
  };
77444
- var c3_default26 = {
77452
+ var c3_default27 = {
77445
77453
  configVersion: 1,
77446
77454
  id: "next",
77447
77455
  frameworkCli: "create-next-app",
@@ -77577,7 +77585,7 @@ var updateNuxtConfig2 = () => {
77577
77585
  });
77578
77586
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
77579
77587
  };
77580
- var config21 = {
77588
+ var config22 = {
77581
77589
  configVersion: 1,
77582
77590
  id: "nuxt",
77583
77591
  frameworkCli: "nuxi",
@@ -77599,10 +77607,10 @@ var config21 = {
77599
77607
  deployScript: "deploy",
77600
77608
  previewScript: "preview"
77601
77609
  };
77602
- var c3_default27 = config21;
77610
+ var c3_default28 = config22;
77603
77611
 
77604
77612
  // templates/openapi/c3.ts
77605
- var c3_default28 = {
77613
+ var c3_default29 = {
77606
77614
  configVersion: 1,
77607
77615
  id: "openapi",
77608
77616
  displayName: "API starter (OpenAPI compliant)",
@@ -77761,7 +77769,7 @@ async function copyExistingWorkerFiles(ctx) {
77761
77769
  (0, import_path11.join)(ctx.project.path, "wrangler.toml")
77762
77770
  );
77763
77771
  }
77764
- var c3_default29 = {
77772
+ var c3_default30 = {
77765
77773
  configVersion: 1,
77766
77774
  id: "pre-existing",
77767
77775
  displayName: "Pre-existing Worker (from Dashboard)",
@@ -77789,7 +77797,7 @@ function buildConfigure(params) {
77789
77797
  }
77790
77798
 
77791
77799
  // templates/queues/c3.ts
77792
- var c3_default30 = {
77800
+ var c3_default31 = {
77793
77801
  configVersion: 1,
77794
77802
  id: "queues",
77795
77803
  displayName: "Queue consumer & producer Worker",
@@ -77900,7 +77908,7 @@ var populateCloudflareEnv2 = () => {
77900
77908
  });
77901
77909
  s.stop(`${brandColor("updated")} \`${entrypointPath}\``);
77902
77910
  };
77903
- var config22 = {
77911
+ var config23 = {
77904
77912
  configVersion: 1,
77905
77913
  id: "qwik",
77906
77914
  frameworkCli: "create-qwik",
@@ -77922,7 +77930,7 @@ var config22 = {
77922
77930
  deployScript: "deploy",
77923
77931
  previewScript: "preview"
77924
77932
  };
77925
- var c3_default31 = config22;
77933
+ var c3_default32 = config23;
77926
77934
 
77927
77935
  // templates/react/c3.ts
77928
77936
  var { npm: npm18 } = detectPackageManager();
@@ -77955,7 +77963,7 @@ var variantsOptions = [
77955
77963
  label: "JavaScript + SWC"
77956
77964
  }
77957
77965
  ];
77958
- var config23 = {
77966
+ var config24 = {
77959
77967
  configVersion: 1,
77960
77968
  id: "react",
77961
77969
  // React's documentation now recommends using create-vite.
@@ -77973,7 +77981,7 @@ var config23 = {
77973
77981
  deployScript: "deploy",
77974
77982
  previewScript: "preview"
77975
77983
  };
77976
- var c3_default32 = config23;
77984
+ var c3_default33 = config24;
77977
77985
 
77978
77986
  // templates/remix/c3.ts
77979
77987
  var { npm: npm19 } = detectPackageManager();
@@ -78000,7 +78008,7 @@ var configure17 = async () => {
78000
78008
  });
78001
78009
  s.stop(`${brandColor("updated")} \`${dim(typeDefsPath)}\``);
78002
78010
  };
78003
- var config24 = {
78011
+ var config25 = {
78004
78012
  configVersion: 1,
78005
78013
  id: "remix",
78006
78014
  frameworkCli: "create-remix",
@@ -78022,10 +78030,10 @@ var config24 = {
78022
78030
  deployScript: "deploy",
78023
78031
  previewScript: "preview"
78024
78032
  };
78025
- var c3_default33 = config24;
78033
+ var c3_default34 = config25;
78026
78034
 
78027
78035
  // templates/scheduled/c3.ts
78028
- var c3_default34 = {
78036
+ var c3_default35 = {
78029
78037
  configVersion: 1,
78030
78038
  id: "scheduled",
78031
78039
  displayName: "Scheduled Worker (Cron Trigger)",
@@ -78088,7 +78096,7 @@ var configure18 = async (ctx) => {
78088
78096
  }
78089
78097
  });
78090
78098
  };
78091
- var config25 = {
78099
+ var config26 = {
78092
78100
  configVersion: 1,
78093
78101
  id: "solid",
78094
78102
  frameworkCli: "create-solid",
@@ -78110,7 +78118,7 @@ var config25 = {
78110
78118
  deployScript: "deploy",
78111
78119
  previewScript: "preview"
78112
78120
  };
78113
- var c3_default35 = config25;
78121
+ var c3_default36 = config26;
78114
78122
 
78115
78123
  // templates/svelte/c3.ts
78116
78124
  var import_node_fs3 = require("node:fs");
@@ -78203,7 +78211,7 @@ var updateTypeDefinitions2 = (ctx) => {
78203
78211
  }
78204
78212
  });
78205
78213
  };
78206
- var config26 = {
78214
+ var config27 = {
78207
78215
  configVersion: 1,
78208
78216
  id: "svelte",
78209
78217
  frameworkCli: "sv",
@@ -78232,14 +78240,14 @@ var config26 = {
78232
78240
  deployScript: "deploy",
78233
78241
  previewScript: "preview"
78234
78242
  };
78235
- var c3_default36 = config26;
78243
+ var c3_default37 = config27;
78236
78244
 
78237
78245
  // templates/vue/c3.ts
78238
78246
  var { npm: npm22 } = detectPackageManager();
78239
78247
  var generate27 = async (ctx) => {
78240
78248
  await runFrameworkGenerator(ctx, [ctx.project.name]);
78241
78249
  };
78242
- var config27 = {
78250
+ var config28 = {
78243
78251
  configVersion: 1,
78244
78252
  id: "vue",
78245
78253
  frameworkCli: "create-vue",
@@ -78256,13 +78264,13 @@ var config27 = {
78256
78264
  deployScript: "deploy",
78257
78265
  previewScript: "preview"
78258
78266
  };
78259
- var c3_default37 = config27;
78267
+ var c3_default38 = config28;
78260
78268
 
78261
78269
  // src/git.ts
78262
78270
  var import_node_assert = __toESM(require("node:assert"));
78263
78271
 
78264
78272
  // ../wrangler/package.json
78265
- var version2 = "3.112.0";
78273
+ var version2 = "3.113.0";
78266
78274
 
78267
78275
  // src/git.ts
78268
78276
  var offerGit = async (ctx) => {
@@ -78525,53 +78533,52 @@ function getFrameworkMap({ experimental = false }) {
78525
78533
  return {
78526
78534
  angular: c3_default,
78527
78535
  astro: c3_default2,
78528
- docusaurus: c3_default3,
78529
- gatsby: c3_default4,
78530
- hono: c3_default8,
78531
- next: c3_default9,
78532
- nuxt: c3_default10,
78533
- qwik: c3_default11,
78534
- react: c3_default12,
78535
- remix: c3_default13,
78536
- solid: c3_default14,
78537
- svelte: c3_default15,
78538
- vue: c3_default16
78536
+ gatsby: c3_default3,
78537
+ hono: c3_default7,
78538
+ next: c3_default8,
78539
+ nuxt: c3_default9,
78540
+ qwik: c3_default10,
78541
+ react: c3_default11,
78542
+ remix: c3_default12,
78543
+ solid: c3_default13,
78544
+ svelte: c3_default14,
78545
+ vue: c3_default15
78539
78546
  };
78540
78547
  } else {
78541
78548
  return {
78542
- analog: c3_default17,
78543
- angular: c3_default18,
78544
- astro: c3_default19,
78545
- docusaurus: c3_default21,
78546
- gatsby: c3_default22,
78547
- hono: c3_default25,
78548
- next: c3_default26,
78549
- nuxt: c3_default27,
78550
- qwik: c3_default31,
78551
- react: c3_default32,
78552
- remix: c3_default33,
78553
- solid: c3_default35,
78554
- svelte: c3_default36,
78555
- vue: c3_default37
78549
+ analog: c3_default16,
78550
+ angular: c3_default17,
78551
+ astro: c3_default18,
78552
+ docusaurus: c3_default22,
78553
+ gatsby: c3_default23,
78554
+ hono: c3_default26,
78555
+ next: c3_default27,
78556
+ nuxt: c3_default28,
78557
+ qwik: c3_default32,
78558
+ react: c3_default33,
78559
+ remix: c3_default34,
78560
+ solid: c3_default36,
78561
+ svelte: c3_default37,
78562
+ vue: c3_default38
78556
78563
  };
78557
78564
  }
78558
78565
  }
78559
78566
  function getTemplateMap({ experimental = false }) {
78560
78567
  if (experimental) {
78561
78568
  return {
78562
- "hello-world-assets-only": c3_default5,
78563
- "hello-world-with-assets": c3_default7,
78564
- "hello-world-durable-object-with-assets": c3_default6
78569
+ "hello-world-assets-only": c3_default4,
78570
+ "hello-world-with-assets": c3_default6,
78571
+ "hello-world-durable-object-with-assets": c3_default5
78565
78572
  };
78566
78573
  } else {
78567
78574
  return {
78568
- "hello-world": c3_default24,
78569
- common: c3_default20,
78570
- scheduled: c3_default34,
78571
- queues: c3_default30,
78572
- "hello-world-durable-object": c3_default23,
78573
- openapi: c3_default28,
78574
- "pre-existing": c3_default29
78575
+ "hello-world": c3_default25,
78576
+ common: c3_default19,
78577
+ scheduled: c3_default35,
78578
+ queues: c3_default31,
78579
+ "hello-world-durable-object": c3_default24,
78580
+ openapi: c3_default29,
78581
+ "pre-existing": c3_default30
78575
78582
  };
78576
78583
  }
78577
78584
  }
@@ -78631,25 +78638,25 @@ var deriveCorrelatedArgs = (args) => {
78631
78638
  };
78632
78639
  var createContext = async (args, prevArgs) => {
78633
78640
  deriveCorrelatedArgs(args);
78641
+ let linesPrinted = 0;
78634
78642
  const goBack = async (from) => {
78635
78643
  const currentArgs = { ...args };
78636
- let linesPrinted = 0;
78637
78644
  switch (from) {
78638
78645
  case "category":
78639
- linesPrinted = 6;
78640
78646
  args.projectName = void 0;
78641
78647
  break;
78642
78648
  case "type":
78643
- linesPrinted = 9;
78644
78649
  args.category = void 0;
78645
78650
  break;
78646
78651
  case "framework":
78647
- linesPrinted = 9;
78648
78652
  args.category = void 0;
78649
78653
  break;
78654
+ case "platform":
78655
+ args.framework = void 0;
78656
+ break;
78650
78657
  case "lang":
78651
- linesPrinted = 12;
78652
78658
  args.type = void 0;
78659
+ args.framework = void 0;
78653
78660
  break;
78654
78661
  }
78655
78662
  currentArgs[from] = void 0;
@@ -78709,6 +78716,7 @@ var createContext = async (args, prevArgs) => {
78709
78716
  options: categoryOptions,
78710
78717
  defaultValue: prevArgs?.category ?? C3_DEFAULTS.category
78711
78718
  });
78719
+ linesPrinted += 6;
78712
78720
  if (category === BACK_VALUE) {
78713
78721
  return goBack("category");
78714
78722
  }
@@ -78718,8 +78726,8 @@ var createContext = async (args, prevArgs) => {
78718
78726
  experimental: args.experimental
78719
78727
  });
78720
78728
  const frameworkOptions = Object.entries(frameworkMap).map(
78721
- ([key, config28]) => ({
78722
- label: config28.displayName,
78729
+ ([key, config29]) => ({
78730
+ label: config29.displayName,
78723
78731
  value: key
78724
78732
  })
78725
78733
  );
@@ -78730,13 +78738,40 @@ var createContext = async (args, prevArgs) => {
78730
78738
  options: frameworkOptions.concat(backOption),
78731
78739
  defaultValue: prevArgs?.framework ?? C3_DEFAULTS.framework
78732
78740
  });
78741
+ linesPrinted += 3;
78733
78742
  if (framework === BACK_VALUE) {
78734
78743
  return goBack("framework");
78735
78744
  }
78736
- const frameworkConfig = frameworkMap[framework];
78745
+ let frameworkConfig = frameworkMap[framework];
78737
78746
  if (!frameworkConfig) {
78738
78747
  throw new Error(`Unsupported framework: ${framework}`);
78739
78748
  }
78749
+ if ("platformVariants" in frameworkConfig) {
78750
+ const platform3 = await processArgument(args, "platform", {
78751
+ type: "select",
78752
+ label: "platform",
78753
+ question: "Select your deployment platform",
78754
+ options: [
78755
+ {
78756
+ label: "Workers with Assets (BETA)",
78757
+ value: "workers",
78758
+ description: "Take advantage of the full Developer Platform, including R2, Queues, Durable Objects and more."
78759
+ },
78760
+ {
78761
+ label: "Pages",
78762
+ value: "pages",
78763
+ description: "Great for simple websites and applications."
78764
+ },
78765
+ backOption
78766
+ ],
78767
+ defaultValue: "workers"
78768
+ });
78769
+ linesPrinted += 3;
78770
+ if (platform3 === BACK_VALUE) {
78771
+ return goBack("platform");
78772
+ }
78773
+ frameworkConfig = frameworkConfig.platformVariants[platform3];
78774
+ }
78740
78775
  template = {
78741
78776
  deployScript: "pages:deploy",
78742
78777
  devScript: "pages:dev",
@@ -78767,6 +78802,7 @@ var createContext = async (args, prevArgs) => {
78767
78802
  options: templateOptions.concat(backOption),
78768
78803
  defaultValue: prevArgs?.type ?? C3_DEFAULTS.type
78769
78804
  });
78805
+ linesPrinted += 3;
78770
78806
  if (type === BACK_VALUE) {
78771
78807
  return goBack("type");
78772
78808
  }
@@ -78795,6 +78831,7 @@ var createContext = async (args, prevArgs) => {
78795
78831
  options: languageOptions.filter((option) => languageVariants.includes(option.value)).concat(args.template ? [] : backOption),
78796
78832
  defaultValue: C3_DEFAULTS.lang
78797
78833
  });
78834
+ linesPrinted += 3;
78798
78835
  if (lang === BACK_VALUE) {
78799
78836
  return goBack("lang");
78800
78837
  }
@@ -78857,28 +78894,28 @@ var processRemoteTemplate = async (args) => {
78857
78894
  src = src.replace("https://github.com/", "github:").replace("/tree/main/", "/");
78858
78895
  }
78859
78896
  const path6 = await downloadRemoteTemplate(src);
78860
- const config28 = inferTemplateConfig(path6);
78861
- validateTemplate(path6, config28);
78897
+ const config29 = inferTemplateConfig(path6);
78898
+ validateTemplate(path6, config29);
78862
78899
  updateStatus(`${brandColor("template")} ${dim("cloned and validated")}`);
78863
78900
  return {
78864
78901
  path: path6,
78865
- ...config28
78902
+ ...config29
78866
78903
  };
78867
78904
  };
78868
- var validateTemplate = (path6, config28) => {
78869
- if (!config28.copyFiles) {
78905
+ var validateTemplate = (path6, config29) => {
78906
+ if (!config29.copyFiles) {
78870
78907
  return;
78871
78908
  }
78872
- if (isVariantInfo(config28.copyFiles)) {
78873
- validateTemplateSrcDirectory((0, import_path13.resolve)(path6, config28.copyFiles.path), config28);
78909
+ if (isVariantInfo(config29.copyFiles)) {
78910
+ validateTemplateSrcDirectory((0, import_path13.resolve)(path6, config29.copyFiles.path), config29);
78874
78911
  } else {
78875
- for (const variant of Object.values(config28.copyFiles.variants)) {
78876
- validateTemplateSrcDirectory((0, import_path13.resolve)(path6, variant.path), config28);
78912
+ for (const variant of Object.values(config29.copyFiles.variants)) {
78913
+ validateTemplateSrcDirectory((0, import_path13.resolve)(path6, variant.path), config29);
78877
78914
  }
78878
78915
  }
78879
78916
  };
78880
- var validateTemplateSrcDirectory = (path6, config28) => {
78881
- if (config28.platform === "workers") {
78917
+ var validateTemplateSrcDirectory = (path6, config29) => {
78918
+ if (config29.platform === "workers") {
78882
78919
  const wranglerTomlPath = (0, import_path13.resolve)(path6, "wrangler.toml");
78883
78920
  const wranglerJsonPath = (0, import_path13.resolve)(path6, "wrangler.json");
78884
78921
  const wranglerJsoncPath = (0, import_path13.resolve)(path6, "wrangler.jsonc");
@@ -79130,6 +79167,22 @@ var cliDefinition = {
79130
79167
  })
79131
79168
  )
79132
79169
  },
79170
+ {
79171
+ name: "platform",
79172
+ type: "string",
79173
+ description: `Whether the application should be deployed to Pages or Workers. This is only applicable for Frameworks templates that support both Pages and Workers.`,
79174
+ values: [
79175
+ {
79176
+ name: "pages",
79177
+ description: "Create a web application that can be deployed to Pages."
79178
+ },
79179
+ {
79180
+ name: "workers",
79181
+ description: "Create a web application that can be deployed to Workers (BETA)."
79182
+ }
79183
+ ],
79184
+ requiresArg: true
79185
+ },
79133
79186
  {
79134
79187
  name: "lang",
79135
79188
  type: "string",
@@ -80759,20 +80812,20 @@ function applyEdits(text, edits) {
80759
80812
  var import_fs12 = require("fs");
80760
80813
  var import_path14 = require("path");
80761
80814
  var import_toml2 = __toESM(require_toml());
80762
- function ensureNameExists(config28, projectName) {
80763
- config28["name"] = projectName;
80764
- return config28;
80815
+ function ensureNameExists(config29, projectName) {
80816
+ config29["name"] = projectName;
80817
+ return config29;
80765
80818
  }
80766
- async function ensureCompatDateExists(config28) {
80767
- if (typeof config28["compatibility_date"] === "string") {
80819
+ async function ensureCompatDateExists(config29) {
80820
+ if (typeof config29["compatibility_date"] === "string") {
80768
80821
  const validCompatDateRe = /^\d{4}-\d{2}-\d{2}/m;
80769
- if (!config28["compatibility_date"].match(validCompatDateRe)) {
80770
- config28["compatibility_date"] = await getWorkerdCompatibilityDate();
80822
+ if (!config29["compatibility_date"].match(validCompatDateRe)) {
80823
+ config29["compatibility_date"] = await getWorkerdCompatibilityDate();
80771
80824
  }
80772
80825
  } else {
80773
- config28["compatibility_date"] = await getWorkerdCompatibilityDate();
80826
+ config29["compatibility_date"] = await getWorkerdCompatibilityDate();
80774
80827
  }
80775
- return config28;
80828
+ return config29;
80776
80829
  }
80777
80830
  var updateWranglerConfig = async (ctx) => {
80778
80831
  if (wranglerJsonExists(ctx)) {
@@ -80796,40 +80849,40 @@ var updateWranglerConfig = async (ctx) => {
80796
80849
  writeWranglerJson(
80797
80850
  ctx,
80798
80851
  stringified.slice(0, -2) + `
80799
- /**
80800
- * Smart Placement
80801
- * Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement
80802
- */
80803
- // "placement": { "mode": "smart" },
80852
+ /**
80853
+ * Smart Placement
80854
+ * Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement
80855
+ */
80856
+ // "placement": { "mode": "smart" },
80804
80857
 
80805
- /**
80806
- * Bindings
80807
- * Bindings allow your Worker to interact with resources on the Cloudflare Developer Platform, including
80808
- * databases, object storage, AI inference, real-time communication and more.
80809
- * https://developers.cloudflare.com/workers/runtime-apis/bindings/
80810
- */
80858
+ /**
80859
+ * Bindings
80860
+ * Bindings allow your Worker to interact with resources on the Cloudflare Developer Platform, including
80861
+ * databases, object storage, AI inference, real-time communication and more.
80862
+ * https://developers.cloudflare.com/workers/runtime-apis/bindings/
80863
+ */
80811
80864
 
80812
- /**
80813
- * Environment Variables
80814
- * https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
80815
- */
80816
- // "vars": { "MY_VARIABLE": "production_value" },
80817
- /**
80818
- * Note: Use secrets to store sensitive data.
80819
- * https://developers.cloudflare.com/workers/configuration/secrets/
80820
- */
80865
+ /**
80866
+ * Environment Variables
80867
+ * https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
80868
+ */
80869
+ // "vars": { "MY_VARIABLE": "production_value" },
80870
+ /**
80871
+ * Note: Use secrets to store sensitive data.
80872
+ * https://developers.cloudflare.com/workers/configuration/secrets/
80873
+ */
80821
80874
 
80822
- /**
80823
- * Static Assets
80824
- * https://developers.cloudflare.com/workers/static-assets/binding/
80825
- */
80826
- // "assets": { "directory": "./public/", "binding": "ASSETS" },
80875
+ /**
80876
+ * Static Assets
80877
+ * https://developers.cloudflare.com/workers/static-assets/binding/
80878
+ */
80879
+ // "assets": { "directory": "./public/", "binding": "ASSETS" },
80827
80880
 
80828
- /**
80829
- * Service Bindings (communicate between multiple Workers)
80830
- * https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
80831
- */
80832
- // "services": [{ "binding": "MY_SERVICE", "service": "my-service" }]
80881
+ /**
80882
+ * Service Bindings (communicate between multiple Workers)
80883
+ * https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
80884
+ */
80885
+ // "services": [{ "binding": "MY_SERVICE", "service": "my-service" }]
80833
80886
  }
80834
80887
  `
80835
80888
  );
@@ -81486,8 +81539,8 @@ var renderValues = (values) => {
81486
81539
  };
81487
81540
 
81488
81541
  // src/helpers/retry.ts
81489
- var retry = async (config28, fn) => {
81490
- let { times } = config28;
81542
+ var retry = async (config29, fn) => {
81543
+ let { times } = config29;
81491
81544
  let error2 = null;
81492
81545
  while (times > 0) {
81493
81546
  try {
@@ -81495,10 +81548,10 @@ var retry = async (config28, fn) => {
81495
81548
  } catch (e) {
81496
81549
  error2 = e;
81497
81550
  times--;
81498
- if (config28.exitCondition?.(e)) {
81551
+ if (config29.exitCondition?.(e)) {
81499
81552
  break;
81500
81553
  }
81501
- await sleep(config28.sleepMs ?? 1e3);
81554
+ await sleep(config29.sleepMs ?? 1e3);
81502
81555
  }
81503
81556
  }
81504
81557
  throw error2;
@@ -81618,8 +81671,8 @@ async function addWorkersTypesToTsConfig(ctx) {
81618
81671
  }
81619
81672
  const typesEntrypoint = `@cloudflare/workers-types/${entrypointVersion}`;
81620
81673
  try {
81621
- const config28 = parse4(tsconfig);
81622
- const currentTypes = config28.compilerOptions?.types ?? [];
81674
+ const config29 = parse4(tsconfig);
81675
+ const currentTypes = config29.compilerOptions?.types ?? [];
81623
81676
  const explicitEntrypoint = currentTypes.some(
81624
81677
  (t2) => t2.match(/@cloudflare\/workers-types\/\d{4}-\d{2}-\d{2}/)
81625
81678
  );