create-cloudflare 2.42.0 → 2.42.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
@@ -568,7 +568,7 @@ var require_XDGAppPaths = __commonJS({
568
568
  XDGAppPaths.cache = function cache(dirOptions) {
569
569
  return path6.join(xdg.cache(), finalPathSegment(dirOptions));
570
570
  };
571
- XDGAppPaths.config = function config38(dirOptions) {
571
+ XDGAppPaths.config = function config39(dirOptions) {
572
572
  return path6.join(xdg.config(), finalPathSegment(dirOptions));
573
573
  };
574
574
  XDGAppPaths.data = function data(dirOptions) {
@@ -625,7 +625,7 @@ var require_XDG = __commonJS({
625
625
  var cache = function() {
626
626
  return valOrPath(env3.get("XDG_CACHE_HOME"), [baseDir(), ".cache"]);
627
627
  };
628
- var config38 = function() {
628
+ var config39 = function() {
629
629
  return valOrPath(env3.get("XDG_CONFIG_HOME"), [baseDir(), ".config"]);
630
630
  };
631
631
  var data = function() {
@@ -637,13 +637,13 @@ var require_XDG = __commonJS({
637
637
  var state = function() {
638
638
  return valOrPath(env3.get("XDG_STATE_HOME"), [baseDir(), ".local", "state"]);
639
639
  };
640
- return { cache, config: config38, data, runtime, state };
640
+ return { cache, config: config39, data, runtime, state };
641
641
  };
642
642
  var macos = function() {
643
643
  var cache = function() {
644
644
  return valOrPath(env3.get("XDG_CACHE_HOME"), [baseDir(), "Library", "Caches"]);
645
645
  };
646
- var config38 = function() {
646
+ var config39 = function() {
647
647
  return valOrPath(env3.get("XDG_CONFIG_HOME"), [baseDir(), "Library", "Preferences"]);
648
648
  };
649
649
  var data = function() {
@@ -655,7 +655,7 @@ var require_XDG = __commonJS({
655
655
  var state = function() {
656
656
  return valOrPath(env3.get("XDG_STATE_HOME"), [baseDir(), "Library", "State"]);
657
657
  };
658
- return { cache, config: config38, data, runtime, state };
658
+ return { cache, config: config39, data, runtime, state };
659
659
  };
660
660
  var windows = function() {
661
661
  function appData() {
@@ -667,7 +667,7 @@ var require_XDG = __commonJS({
667
667
  var cache = function() {
668
668
  return valOrPath(env3.get("XDG_CACHE_HOME"), [localAppData(), "xdg.cache"]);
669
669
  };
670
- var config38 = function() {
670
+ var config39 = function() {
671
671
  return valOrPath(env3.get("XDG_CONFIG_HOME"), [appData(), "xdg.config"]);
672
672
  };
673
673
  var data = function() {
@@ -679,7 +679,7 @@ var require_XDG = __commonJS({
679
679
  var state = function() {
680
680
  return valOrPath(env3.get("XDG_STATE_HOME"), [localAppData(), "xdg.state"]);
681
681
  };
682
- return { cache, config: config38, data, runtime, state };
682
+ return { cache, config: config39, data, runtime, state };
683
683
  };
684
684
  var XDG_ = /* @__PURE__ */ function() {
685
685
  function XDG_2() {
@@ -31509,21 +31509,21 @@ var require_dist_web = __commonJS({
31509
31509
  _createClass(Haikunator3, [{
31510
31510
  key: "haikunate",
31511
31511
  value: function haikunate(options) {
31512
- var config38 = (0, _lodash["default"])(options, this.config);
31513
- if (config38.tokenHex === true) {
31514
- config38.tokenChars = "0123456789abcdef";
31512
+ var config39 = (0, _lodash["default"])(options, this.config);
31513
+ if (config39.tokenHex === true) {
31514
+ config39.tokenChars = "0123456789abcdef";
31515
31515
  }
31516
31516
  var adjective = this._randomElement(this.adjectives);
31517
31517
  var noun = this._randomElement(this.nouns);
31518
- if (!config38.tokenLength) config38.tokenLength = 0;
31518
+ if (!config39.tokenLength) config39.tokenLength = 0;
31519
31519
  var token = "";
31520
- for (var i = 0; i < config38.tokenLength; i++) {
31521
- token += this._randomElement(config38.tokenChars);
31520
+ for (var i = 0; i < config39.tokenLength; i++) {
31521
+ token += this._randomElement(config39.tokenChars);
31522
31522
  }
31523
31523
  var sections = [adjective, noun, token];
31524
31524
  return sections.filter(function(e) {
31525
31525
  return !!e;
31526
- }).join(config38.delimiter);
31526
+ }).join(config39.delimiter);
31527
31527
  }
31528
31528
  /**
31529
31529
  * Get a random element from an array/string
@@ -40036,13 +40036,13 @@ var require_esprima = __commonJS({
40036
40036
  return Reader2;
40037
40037
  }();
40038
40038
  var Tokenizer = function() {
40039
- function Tokenizer2(code, config38) {
40039
+ function Tokenizer2(code, config39) {
40040
40040
  this.errorHandler = new error_handler_1.ErrorHandler();
40041
- this.errorHandler.tolerant = config38 ? typeof config38.tolerant === "boolean" && config38.tolerant : false;
40041
+ this.errorHandler.tolerant = config39 ? typeof config39.tolerant === "boolean" && config39.tolerant : false;
40042
40042
  this.scanner = new scanner_1.Scanner(code, this.errorHandler);
40043
- this.scanner.trackComment = config38 ? typeof config38.comment === "boolean" && config38.comment : false;
40044
- this.trackRange = config38 ? typeof config38.range === "boolean" && config38.range : false;
40045
- this.trackLoc = config38 ? typeof config38.loc === "boolean" && config38.loc : false;
40043
+ this.scanner.trackComment = config39 ? typeof config39.comment === "boolean" && config39.comment : false;
40044
+ this.trackRange = config39 ? typeof config39.range === "boolean" && config39.range : false;
40045
+ this.trackLoc = config39 ? typeof config39.loc === "boolean" && config39.loc : false;
40046
40046
  this.buffer = [];
40047
40047
  this.reader = new Reader();
40048
40048
  }
@@ -49803,11 +49803,11 @@ var require_printer = __commonJS({
49803
49803
  return this.code;
49804
49804
  };
49805
49805
  var emptyPrintResult = new PrintResult("");
49806
- var Printer = function Printer2(config38) {
49806
+ var Printer = function Printer2(config39) {
49807
49807
  assert_1.default.ok(this instanceof Printer2);
49808
- var explicitTabWidth = config38 && config38.tabWidth;
49809
- config38 = options_1.normalize(config38);
49810
- config38.sourceFileName = null;
49808
+ var explicitTabWidth = config39 && config39.tabWidth;
49809
+ config39 = options_1.normalize(config39);
49810
+ config39.sourceFileName = null;
49811
49811
  function makePrintFunctionWith(options, overrides) {
49812
49812
  options = Object.assign({}, options, overrides);
49813
49813
  return function(path6) {
@@ -49822,11 +49822,11 @@ var require_printer = __commonJS({
49822
49822
  includeComments: false
49823
49823
  }));
49824
49824
  }
49825
- var oldTabWidth = config38.tabWidth;
49825
+ var oldTabWidth = config39.tabWidth;
49826
49826
  if (!explicitTabWidth) {
49827
49827
  var loc = path6.getNode().loc;
49828
49828
  if (loc && loc.lines && loc.lines.guessTabWidth) {
49829
- config38.tabWidth = loc.lines.guessTabWidth();
49829
+ config39.tabWidth = loc.lines.guessTabWidth();
49830
49830
  }
49831
49831
  }
49832
49832
  var reprinter = patcher_1.getReprinter(path6);
@@ -49840,11 +49840,11 @@ var require_printer = __commonJS({
49840
49840
  // right choice because it gives us the opportunity to reprint
49841
49841
  // such nodes using their original source.
49842
49842
  reprinter(print2)
49843
- ) : genericPrint(path6, config38, options, makePrintFunctionWith(options, {
49843
+ ) : genericPrint(path6, config39, options, makePrintFunctionWith(options, {
49844
49844
  includeComments: true,
49845
49845
  avoidRootParens: false
49846
49846
  }));
49847
- config38.tabWidth = oldTabWidth;
49847
+ config39.tabWidth = oldTabWidth;
49848
49848
  return lines;
49849
49849
  }
49850
49850
  this.print = function(ast) {
@@ -49855,7 +49855,7 @@ var require_printer = __commonJS({
49855
49855
  includeComments: true,
49856
49856
  avoidRootParens: false
49857
49857
  });
49858
- return new PrintResult(lines.toString(config38), util.composeSourceMaps(config38.inputSourceMap, lines.getSourceMap(config38.sourceMapName, config38.sourceRoot)));
49858
+ return new PrintResult(lines.toString(config39), util.composeSourceMaps(config39.inputSourceMap, lines.getSourceMap(config39.sourceMapName, config39.sourceRoot)));
49859
49859
  };
49860
49860
  this.printGenerically = function(ast) {
49861
49861
  if (!ast) {
@@ -49863,26 +49863,26 @@ var require_printer = __commonJS({
49863
49863
  }
49864
49864
  function printGenerically(path7) {
49865
49865
  return comments_1.printComments(path7, function(path8) {
49866
- return genericPrint(path8, config38, {
49866
+ return genericPrint(path8, config39, {
49867
49867
  includeComments: true,
49868
49868
  avoidRootParens: false
49869
49869
  }, printGenerically);
49870
49870
  });
49871
49871
  }
49872
49872
  var path6 = fast_path_1.default.from(ast);
49873
- var oldReuseWhitespace = config38.reuseWhitespace;
49874
- config38.reuseWhitespace = false;
49875
- var pr = new PrintResult(printGenerically(path6).toString(config38));
49876
- config38.reuseWhitespace = oldReuseWhitespace;
49873
+ var oldReuseWhitespace = config39.reuseWhitespace;
49874
+ config39.reuseWhitespace = false;
49875
+ var pr = new PrintResult(printGenerically(path6).toString(config39));
49876
+ config39.reuseWhitespace = oldReuseWhitespace;
49877
49877
  return pr;
49878
49878
  };
49879
49879
  };
49880
49880
  exports2.Printer = Printer;
49881
- function genericPrint(path6, config38, options, printPath) {
49881
+ function genericPrint(path6, config39, options, printPath) {
49882
49882
  assert_1.default.ok(path6 instanceof fast_path_1.default);
49883
49883
  var node = path6.getValue();
49884
49884
  var parts = [];
49885
- var linesWithoutParens = genericPrintNoParens(path6, config38, printPath);
49885
+ var linesWithoutParens = genericPrintNoParens(path6, config39, printPath);
49886
49886
  if (!node || linesWithoutParens.isEmpty()) {
49887
49887
  return linesWithoutParens;
49888
49888
  }
@@ -69380,33 +69380,33 @@ var inputPrompt = async (promptConfig) => {
69380
69380
  }
69381
69381
  return input;
69382
69382
  };
69383
- var renderSubmit = (config38, value) => {
69384
- const { question, label } = config38;
69385
- if (config38.type !== "confirm" && !value) {
69383
+ var renderSubmit = (config39, value) => {
69384
+ const { question, label } = config39;
69385
+ if (config39.type !== "confirm" && !value) {
69386
69386
  return [`${leftT} ${question} ${dim("(skipped)")}`, `${grayBar}`];
69387
69387
  }
69388
- const content = config38.type === "confirm" ? `${grayBar} ${brandColor(value)} ${dim(label)}` : `${grayBar} ${brandColor(label)} ${dim(value)}`;
69388
+ const content = config39.type === "confirm" ? `${grayBar} ${brandColor(value)} ${dim(label)}` : `${grayBar} ${brandColor(label)} ${dim(value)}`;
69389
69389
  return [`${leftT} ${question}`, content, `${grayBar}`];
69390
69390
  };
69391
- var getRenderers = (config38) => {
69392
- switch (config38.type) {
69391
+ var getRenderers = (config39) => {
69392
+ switch (config39.type) {
69393
69393
  case "select":
69394
- return getSelectRenderers(config38);
69394
+ return getSelectRenderers(config39);
69395
69395
  case "confirm":
69396
- return getConfirmRenderers(config38);
69396
+ return getConfirmRenderers(config39);
69397
69397
  case "text":
69398
- return getTextRenderers(config38);
69398
+ return getTextRenderers(config39);
69399
69399
  case "multiselect":
69400
- return getSelectRenderers(config38);
69400
+ return getSelectRenderers(config39);
69401
69401
  case "list":
69402
- return getSelectListRenderers(config38);
69402
+ return getSelectListRenderers(config39);
69403
69403
  }
69404
69404
  };
69405
- var getTextRenderers = (config38) => {
69406
- const { question } = config38;
69407
- const helpText = config38.helpText ?? "";
69408
- const format5 = config38.format ?? ((val) => String(val));
69409
- const defaultValue = config38.defaultValue?.toString() ?? "";
69405
+ var getTextRenderers = (config39) => {
69406
+ const { question } = config39;
69407
+ const helpText = config39.helpText ?? "";
69408
+ const format5 = config39.format ?? ((val) => String(val));
69409
+ const defaultValue = config39.defaultValue?.toString() ?? "";
69410
69410
  const activeRenderer = ({ value }) => [
69411
69411
  `${blCorner} ${bold(question)} ${dim(helpText)}`,
69412
69412
  `${space(2)}${format5(value || dim(defaultValue))}`,
@@ -69429,14 +69429,14 @@ var getTextRenderers = (config38) => {
69429
69429
  ``
69430
69430
  // extra line for readability
69431
69431
  ],
69432
- submit: ({ value }) => renderSubmit(config38, format5(value ?? "")),
69432
+ submit: ({ value }) => renderSubmit(config39, format5(value ?? "")),
69433
69433
  cancel: activeRenderer
69434
69434
  };
69435
69435
  };
69436
- var getSelectRenderers = (config38) => {
69437
- const { options, question, helpText: _helpText } = config38;
69436
+ var getSelectRenderers = (config39) => {
69437
+ const { options, question, helpText: _helpText } = config39;
69438
69438
  const helpText = _helpText ?? "";
69439
- const maxItemsPerPage = config38.maxItemsPerPage ?? 32;
69439
+ const maxItemsPerPage = config39.maxItemsPerPage ?? 32;
69440
69440
  const defaultRenderer = ({ cursor = 0, value }) => {
69441
69441
  const renderOption = (opt, i) => {
69442
69442
  const { label: optionLabel, value: optionValue } = opt;
@@ -69511,21 +69511,21 @@ ${space(2)}${dim("...")}` : ""}`,
69511
69511
  submit: ({ value }) => {
69512
69512
  if (Array.isArray(value)) {
69513
69513
  return renderSubmit(
69514
- config38,
69514
+ config39,
69515
69515
  options.filter((o) => value.includes(o.value)).map((o) => o.label).join(", ")
69516
69516
  );
69517
69517
  }
69518
69518
  return renderSubmit(
69519
- config38,
69519
+ config39,
69520
69520
  options.find((o) => o.value === value)?.label
69521
69521
  );
69522
69522
  },
69523
69523
  cancel: defaultRenderer
69524
69524
  };
69525
69525
  };
69526
- var getSelectListRenderers = (config38) => {
69527
- const { question, helpText: _helpText } = config38;
69528
- let options = config38.options;
69526
+ var getSelectListRenderers = (config39) => {
69527
+ const { question, helpText: _helpText } = config39;
69528
+ let options = config39.options;
69529
69529
  const helpText = _helpText ?? "";
69530
69530
  const { rows } = stdout;
69531
69531
  const defaultRenderer = ({ cursor, value }, prompt) => {
@@ -69606,20 +69606,20 @@ var getSelectListRenderers = (config38) => {
69606
69606
  submit: ({ value }) => {
69607
69607
  if (Array.isArray(value)) {
69608
69608
  return renderSubmit(
69609
- config38,
69609
+ config39,
69610
69610
  options.filter((o) => value.includes(o.value)).map((o) => o.value).join(", ")
69611
69611
  );
69612
69612
  }
69613
69613
  return renderSubmit(
69614
- config38,
69614
+ config39,
69615
69615
  options.find((o) => o.value === value)?.value
69616
69616
  );
69617
69617
  },
69618
69618
  cancel: defaultRenderer
69619
69619
  };
69620
69620
  };
69621
- var getConfirmRenderers = (config38) => {
69622
- const { activeText, inactiveText, question, helpText: _helpText } = config38;
69621
+ var getConfirmRenderers = (config39) => {
69622
+ const { activeText, inactiveText, question, helpText: _helpText } = config39;
69623
69623
  const helpText = _helpText ?? "";
69624
69624
  const active = activeText || "Yes";
69625
69625
  const inactive = inactiveText || "No";
@@ -69636,7 +69636,7 @@ var getConfirmRenderers = (config38) => {
69636
69636
  active: defaultRenderer,
69637
69637
  confirm: defaultRenderer,
69638
69638
  error: defaultRenderer,
69639
- submit: ({ value }) => renderSubmit(config38, value ? "yes" : "no"),
69639
+ submit: ({ value }) => renderSubmit(config39, value ? "yes" : "no"),
69640
69640
  cancel: defaultRenderer
69641
69641
  };
69642
69642
  };
@@ -70604,23 +70604,23 @@ var YargsParser = class {
70604
70604
  const configPath = argv2[configKey] || configLookup[configKey];
70605
70605
  if (configPath) {
70606
70606
  try {
70607
- let config38 = null;
70607
+ let config39 = null;
70608
70608
  const resolvedConfigPath = mixin2.resolve(mixin2.cwd(), configPath);
70609
70609
  const resolveConfig = flags.configs[configKey];
70610
70610
  if (typeof resolveConfig === "function") {
70611
70611
  try {
70612
- config38 = resolveConfig(resolvedConfigPath);
70612
+ config39 = resolveConfig(resolvedConfigPath);
70613
70613
  } catch (e) {
70614
- config38 = e;
70614
+ config39 = e;
70615
70615
  }
70616
- if (config38 instanceof Error) {
70617
- error2 = config38;
70616
+ if (config39 instanceof Error) {
70617
+ error2 = config39;
70618
70618
  return;
70619
70619
  }
70620
70620
  } else {
70621
- config38 = mixin2.require(resolvedConfigPath);
70621
+ config39 = mixin2.require(resolvedConfigPath);
70622
70622
  }
70623
- setConfigObject(config38);
70623
+ setConfigObject(config39);
70624
70624
  } catch (ex) {
70625
70625
  if (ex.name === "PermissionDenied")
70626
70626
  error2 = ex;
@@ -70630,9 +70630,9 @@ var YargsParser = class {
70630
70630
  }
70631
70631
  });
70632
70632
  }
70633
- function setConfigObject(config38, prev) {
70634
- Object.keys(config38).forEach(function(key) {
70635
- const value = config38[key];
70633
+ function setConfigObject(config39, prev) {
70634
+ Object.keys(config39).forEach(function(key) {
70635
+ const value = config39[key];
70636
70636
  const fullKey = prev ? prev + "." + key : key;
70637
70637
  if (typeof value === "object" && value !== null && !Array.isArray(value) && configuration["dot-notation"]) {
70638
70638
  setConfigObject(value, fullKey);
@@ -71784,11 +71784,11 @@ var CommandInstance = class {
71784
71784
  });
71785
71785
  if (!unparsed.length)
71786
71786
  return;
71787
- const config38 = Object.assign({}, options.configuration, {
71787
+ const config39 = Object.assign({}, options.configuration, {
71788
71788
  "populate--": false
71789
71789
  });
71790
71790
  const parsed = this.shim.Parser.detailed(unparsed, Object.assign({}, options, {
71791
- configuration: config38
71791
+ configuration: config39
71792
71792
  }));
71793
71793
  if (parsed.error) {
71794
71794
  yargs.getInternalMethods().getUsageInstance().fail(parsed.error.message, parsed.error);
@@ -73011,31 +73011,31 @@ ${customMsgs.join("\n")}` : "";
73011
73011
  // ../../node_modules/.pnpm/yargs@17.7.2/node_modules/yargs/build/lib/utils/apply-extends.js
73012
73012
  var previouslyVisitedConfigs = [];
73013
73013
  var shim2;
73014
- function applyExtends(config38, cwd, mergeExtends, _shim) {
73014
+ function applyExtends(config39, cwd, mergeExtends, _shim) {
73015
73015
  shim2 = _shim;
73016
73016
  let defaultConfig = {};
73017
- if (Object.prototype.hasOwnProperty.call(config38, "extends")) {
73018
- if (typeof config38.extends !== "string")
73017
+ if (Object.prototype.hasOwnProperty.call(config39, "extends")) {
73018
+ if (typeof config39.extends !== "string")
73019
73019
  return defaultConfig;
73020
- const isPath = /\.json|\..*rc$/.test(config38.extends);
73020
+ const isPath = /\.json|\..*rc$/.test(config39.extends);
73021
73021
  let pathToDefault = null;
73022
73022
  if (!isPath) {
73023
73023
  try {
73024
- pathToDefault = require.resolve(config38.extends);
73024
+ pathToDefault = require.resolve(config39.extends);
73025
73025
  } catch (_err) {
73026
- return config38;
73026
+ return config39;
73027
73027
  }
73028
73028
  } else {
73029
- pathToDefault = getPathToDefaultConfig(cwd, config38.extends);
73029
+ pathToDefault = getPathToDefaultConfig(cwd, config39.extends);
73030
73030
  }
73031
73031
  checkForCircularExtends(pathToDefault);
73032
73032
  previouslyVisitedConfigs.push(pathToDefault);
73033
- defaultConfig = isPath ? JSON.parse(shim2.readFileSync(pathToDefault, "utf8")) : require(config38.extends);
73034
- delete config38.extends;
73033
+ defaultConfig = isPath ? JSON.parse(shim2.readFileSync(pathToDefault, "utf8")) : require(config39.extends);
73034
+ delete config39.extends;
73035
73035
  defaultConfig = applyExtends(defaultConfig, shim2.path.dirname(pathToDefault), mergeExtends, shim2);
73036
73036
  }
73037
73037
  previouslyVisitedConfigs = [];
73038
- return mergeExtends ? mergeDeep(defaultConfig, config38) : Object.assign({}, defaultConfig, config38);
73038
+ return mergeExtends ? mergeDeep(defaultConfig, config39) : Object.assign({}, defaultConfig, config39);
73039
73039
  }
73040
73040
  function checkForCircularExtends(cfgPath) {
73041
73041
  if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) {
@@ -73811,9 +73811,9 @@ var YargsInstance = class {
73811
73811
  }
73812
73812
  return maybePromise;
73813
73813
  }
73814
- parserConfiguration(config38) {
73815
- argsert("<object>", [config38], arguments.length);
73816
- __classPrivateFieldSet(this, _YargsInstance_parserConfig, config38, "f");
73814
+ parserConfiguration(config39) {
73815
+ argsert("<object>", [config39], arguments.length);
73816
+ __classPrivateFieldSet(this, _YargsInstance_parserConfig, config39, "f");
73817
73817
  return this;
73818
73818
  }
73819
73819
  pkgConf(key, rootPath) {
@@ -73985,9 +73985,9 @@ var YargsInstance = class {
73985
73985
  return this;
73986
73986
  }
73987
73987
  }
73988
- usageConfiguration(config38) {
73989
- argsert("<object>", [config38], arguments.length);
73990
- __classPrivateFieldSet(this, _YargsInstance_usageConfig, config38, "f");
73988
+ usageConfiguration(config39) {
73989
+ argsert("<object>", [config39], arguments.length);
73990
+ __classPrivateFieldSet(this, _YargsInstance_usageConfig, config39, "f");
73991
73991
  return this;
73992
73992
  }
73993
73993
  version(opt, msg, ver) {
@@ -74393,11 +74393,11 @@ var YargsInstance = class {
74393
74393
  __classPrivateFieldGet(this, _YargsInstance_options, "f").__ = __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.__;
74394
74394
  __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration = this[kGetParserConfiguration]();
74395
74395
  const populateDoubleDash = !!__classPrivateFieldGet(this, _YargsInstance_options, "f").configuration["populate--"];
74396
- const config38 = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration, {
74396
+ const config39 = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration, {
74397
74397
  "populate--": true
74398
74398
  });
74399
74399
  const parsed = __classPrivateFieldGet(this, _YargsInstance_shim, "f").Parser.detailed(args, Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f"), {
74400
- configuration: { "parse-positional-numbers": false, ...config38 }
74400
+ configuration: { "parse-positional-numbers": false, ...config39 }
74401
74401
  }));
74402
74402
  const argv = Object.assign(parsed.argv, __classPrivateFieldGet(this, _YargsInstance_parseContext, "f"));
74403
74403
  let argvPromise = void 0;
@@ -74560,7 +74560,7 @@ var Yargs = YargsFactory(esm_default);
74560
74560
  var yargs_default = Yargs;
74561
74561
 
74562
74562
  // package.json
74563
- var version = "2.42.0";
74563
+ var version = "2.42.1";
74564
74564
 
74565
74565
  // src/metrics.ts
74566
74566
  var import_node_async_hooks = require("node:async_hooks");
@@ -74604,12 +74604,12 @@ function getGlobalWranglerConfigPath() {
74604
74604
  }
74605
74605
 
74606
74606
  // src/helpers/metrics-config.ts
74607
- function writeMetricsConfig(config38) {
74607
+ function writeMetricsConfig(config39) {
74608
74608
  (0, import_node_fs2.mkdirSync)(import_node_path2.default.dirname(getMetricsConfigPath()), { recursive: true });
74609
74609
  (0, import_node_fs2.writeFileSync)(
74610
74610
  getMetricsConfigPath(),
74611
74611
  JSON.stringify(
74612
- config38,
74612
+ config39,
74613
74613
  (_key, value) => value instanceof Date ? value.toISOString() : value,
74614
74614
  " "
74615
74615
  )
@@ -74617,9 +74617,9 @@ function writeMetricsConfig(config38) {
74617
74617
  }
74618
74618
  function readMetricsConfig() {
74619
74619
  try {
74620
- const config38 = (0, import_node_fs2.readFileSync)(getMetricsConfigPath(), "utf8");
74620
+ const config39 = (0, import_node_fs2.readFileSync)(getMetricsConfigPath(), "utf8");
74621
74621
  return JSON.parse(
74622
- config38,
74622
+ config39,
74623
74623
  (key, value) => key === "date" ? new Date(value) : value
74624
74624
  );
74625
74625
  } catch {
@@ -74629,10 +74629,10 @@ function readMetricsConfig() {
74629
74629
  function getMetricsConfigPath() {
74630
74630
  return import_node_path2.default.resolve(getGlobalWranglerConfigPath(), "metrics.json");
74631
74631
  }
74632
- function getDeviceId(config38) {
74633
- const deviceId = config38.deviceId ?? (0, import_node_crypto.randomUUID)();
74634
- if (config38.deviceId === void 0) {
74635
- writeMetricsConfig({ ...config38, deviceId });
74632
+ function getDeviceId(config39) {
74633
+ const deviceId = config39.deviceId ?? (0, import_node_crypto.randomUUID)();
74634
+ if (config39.deviceId === void 0) {
74635
+ writeMetricsConfig({ ...config39, deviceId });
74636
74636
  }
74637
74637
  return deviceId;
74638
74638
  }
@@ -74907,10 +74907,10 @@ function getPlatform() {
74907
74907
  function createReporter() {
74908
74908
  const events = [];
74909
74909
  const als = new import_node_async_hooks.AsyncLocalStorage();
74910
- const config38 = readMetricsConfig() ?? {};
74911
- const isFirstUsage = config38.c3permission === void 0;
74910
+ const config39 = readMetricsConfig() ?? {};
74911
+ const isFirstUsage = config39.c3permission === void 0;
74912
74912
  const isEnabled = isTelemetryEnabled();
74913
- const deviceId = getDeviceId(config38);
74913
+ const deviceId = getDeviceId(config39);
74914
74914
  const packageManager = detectPackageManager();
74915
74915
  const platform3 = getPlatform();
74916
74916
  const amplitude_session_id = Date.now();
@@ -74943,7 +74943,7 @@ function createReporter() {
74943
74943
  if (process.env.CREATE_CLOUDFLARE_TELEMETRY_DISABLED === "1") {
74944
74944
  return false;
74945
74945
  }
74946
- return hasSparrowSourceKey() && getC3Permission(config38).enabled;
74946
+ return hasSparrowSourceKey() && getC3Permission(config39).enabled;
74947
74947
  }
74948
74948
  async function waitForAllEventsSettled() {
74949
74949
  await Promise.allSettled(events);
@@ -75049,20 +75049,20 @@ function initializeC3Permission(enabled = true) {
75049
75049
  date: /* @__PURE__ */ new Date()
75050
75050
  };
75051
75051
  }
75052
- function getC3Permission(config38 = readMetricsConfig() ?? {}) {
75053
- if (!config38.c3permission) {
75054
- config38.c3permission = initializeC3Permission();
75055
- writeMetricsConfig(config38);
75052
+ function getC3Permission(config39 = readMetricsConfig() ?? {}) {
75053
+ if (!config39.c3permission) {
75054
+ config39.c3permission = initializeC3Permission();
75055
+ writeMetricsConfig(config39);
75056
75056
  }
75057
- return config38.c3permission;
75057
+ return config39.c3permission;
75058
75058
  }
75059
75059
  function updateC3Pemission(enabled) {
75060
- const config38 = readMetricsConfig();
75061
- if (config38.c3permission?.enabled === enabled) {
75060
+ const config39 = readMetricsConfig();
75061
+ if (config39.c3permission?.enabled === enabled) {
75062
75062
  return;
75063
75063
  }
75064
- config38.c3permission = initializeC3Permission(enabled);
75065
- writeMetricsConfig(config38);
75064
+ config39.c3permission = initializeC3Permission(enabled);
75065
+ writeMetricsConfig(config39);
75066
75066
  }
75067
75067
  var runTelemetryCommand = (action) => {
75068
75068
  const logTelemetryStatus = (enabled) => {
@@ -75107,24 +75107,24 @@ var import_haikunator = __toESM(require_dist_web());
75107
75107
  var import_fs6 = require("fs");
75108
75108
  var import_path6 = __toESM(require("path"));
75109
75109
  var import_undici2 = __toESM(require_undici());
75110
- var installPackages = async (packages, config38 = {}) => {
75110
+ var installPackages = async (packages, config39 = {}) => {
75111
75111
  const { npm: npm24 } = detectPackageManager();
75112
75112
  let saveFlag;
75113
75113
  let cmd;
75114
75114
  switch (npm24) {
75115
75115
  case "yarn":
75116
75116
  cmd = "add";
75117
- saveFlag = config38.dev ? "-D" : "";
75117
+ saveFlag = config39.dev ? "-D" : "";
75118
75118
  break;
75119
75119
  case "bun":
75120
75120
  cmd = "add";
75121
- saveFlag = config38.dev ? "-d" : "";
75121
+ saveFlag = config39.dev ? "-d" : "";
75122
75122
  break;
75123
75123
  case "npm":
75124
75124
  case "pnpm":
75125
75125
  default:
75126
75126
  cmd = "install";
75127
- saveFlag = config38.dev ? "--save-dev" : "";
75127
+ saveFlag = config39.dev ? "--save-dev" : "";
75128
75128
  break;
75129
75129
  }
75130
75130
  await runCommand(
@@ -75139,7 +75139,7 @@ var installPackages = async (packages, config38 = {}) => {
75139
75139
  ...npm24 === "npm" ? ["--legacy-peer-deps"] : []
75140
75140
  ],
75141
75141
  {
75142
- ...config38,
75142
+ ...config39,
75143
75143
  silent: true
75144
75144
  }
75145
75145
  );
@@ -75510,117 +75510,6 @@ var getPropertyName = (newProp) => {
75510
75510
  return newProp.key.type === "Identifier" ? newProp.key.name : newProp.key.type === "StringLiteral" ? newProp.key.value : null;
75511
75511
  };
75512
75512
 
75513
- // templates-experimental/qwik/c3.ts
75514
- var recast2 = __toESM(require_main3());
75515
- var { npm, npx, name } = detectPackageManager();
75516
- var generate2 = async (ctx) => {
75517
- await runFrameworkGenerator(ctx, ["playground", ctx.project.name]);
75518
- };
75519
- var configure2 = async (ctx) => {
75520
- const cmd = [name === "pnpm" ? npm : npx, "qwik", "add", "cloudflare-pages"];
75521
- endSection(`Running ${quoteShellArgs(cmd)}`);
75522
- await runCommand(cmd);
75523
- removeFile("./public/_headers");
75524
- removeFile("./public/_redirects");
75525
- removeFile("./public/_routes.json");
75526
- addBindingsProxy(ctx);
75527
- populateCloudflareEnv();
75528
- };
75529
- var addBindingsProxy = (ctx) => {
75530
- if (!usesTypescript(ctx)) {
75531
- return;
75532
- }
75533
- const s = spinner();
75534
- s.start("Updating `vite.config.ts`");
75535
- const snippets = loadTemplateSnippets(ctx);
75536
- const b3 = recast2.types.builders;
75537
- transformFile("vite.config.ts", {
75538
- // Insert the env declaration after the last import (but before the rest of the body)
75539
- visitProgram: function(n) {
75540
- const lastImportIndex = n.node.body.findLastIndex(
75541
- (t2) => t2.type === "ImportDeclaration"
75542
- );
75543
- const lastImport = n.get("body", lastImportIndex);
75544
- lastImport.insertAfter(...snippets.getPlatformProxyTs);
75545
- return this.traverse(n);
75546
- },
75547
- // Pass the `platform` object from the declaration to the `qwikCity` plugin
75548
- visitCallExpression: function(n) {
75549
- const callee = n.node.callee;
75550
- if (callee.name !== "qwikCity") {
75551
- return this.traverse(n);
75552
- }
75553
- const configArgument = n.node.arguments[0];
75554
- const platformPropery = b3.objectProperty.from({
75555
- key: b3.identifier("platform"),
75556
- value: b3.identifier("platform"),
75557
- shorthand: true
75558
- });
75559
- if (!configArgument) {
75560
- n.node.arguments = [b3.objectExpression([platformPropery])];
75561
- return false;
75562
- }
75563
- if (configArgument.type !== "ObjectExpression") {
75564
- crash("Failed to update `vite.config.ts`");
75565
- }
75566
- configArgument.properties.push(platformPropery);
75567
- return false;
75568
- }
75569
- });
75570
- s.stop(`${brandColor("updated")} \`vite.config.ts\``);
75571
- };
75572
- var populateCloudflareEnv = () => {
75573
- const entrypointPath = "src/entry.cloudflare-pages.tsx";
75574
- const s = spinner();
75575
- s.start(`Updating \`${entrypointPath}\``);
75576
- transformFile(entrypointPath, {
75577
- visitTSInterfaceDeclaration: function(n) {
75578
- const b3 = recast2.types.builders;
75579
- const id = n.node.id;
75580
- if (id.name !== "QwikCityPlatform") {
75581
- this.traverse(n);
75582
- }
75583
- const newBody = [
75584
- ["env", "Env"]
75585
- // Qwik doesn't supply `cf` to the platform object. Should they do so, uncomment this
75586
- // ["cf", "CfProperties"],
75587
- ].map(
75588
- ([varName, type]) => b3.tsPropertySignature(
75589
- b3.identifier(varName),
75590
- b3.tsTypeAnnotation(b3.tsTypeReference(b3.identifier(type)))
75591
- )
75592
- );
75593
- n.node.body.body = newBody;
75594
- return false;
75595
- }
75596
- });
75597
- s.stop(`${brandColor("updated")} \`${entrypointPath}\``);
75598
- };
75599
- var config = {
75600
- configVersion: 1,
75601
- id: "qwik",
75602
- frameworkCli: "create-qwik",
75603
- displayName: "Qwik",
75604
- platform: "workers",
75605
- copyFiles: {
75606
- path: "./templates"
75607
- },
75608
- path: "templates-experimental/qwik",
75609
- generate: generate2,
75610
- configure: configure2,
75611
- transformPackageJson: async () => ({
75612
- scripts: {
75613
- deploy: `${npm} run build && wrangler deploy`,
75614
- preview: `${npm} run build && wrangler dev`,
75615
- "cf-typegen": `wrangler types`
75616
- }
75617
- }),
75618
- devScript: "dev",
75619
- deployScript: "deploy",
75620
- previewScript: "preview"
75621
- };
75622
- var c3_default2 = config;
75623
-
75624
75513
  // src/helpers/compatDate.ts
75625
75514
  var import_fs9 = require("fs");
75626
75515
  var import_path9 = require("path");
@@ -75674,18 +75563,18 @@ function getLatestTypesEntrypoint(ctx) {
75674
75563
  }
75675
75564
 
75676
75565
  // templates-experimental/solid/c3.ts
75677
- var recast3 = __toESM(require_main3());
75678
- var { npm: npm2 } = detectPackageManager();
75679
- var generate3 = async (ctx) => {
75566
+ var recast2 = __toESM(require_main3());
75567
+ var { npm } = detectPackageManager();
75568
+ var generate2 = async (ctx) => {
75680
75569
  await runFrameworkGenerator(ctx, ["-p", ctx.project.name, "-s"]);
75681
75570
  logRaw("");
75682
75571
  };
75683
- var configure3 = async (ctx) => {
75572
+ var configure2 = async (ctx) => {
75684
75573
  const packages = ["nitropack"];
75685
75574
  await installPackages(packages, {
75686
75575
  dev: true,
75687
75576
  startText: "Installing nitro module `nitropack`",
75688
- doneText: `${brandColor("installed")} ${dim(`via \`${npm2} install\``)}`
75577
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm} install\``)}`
75689
75578
  });
75690
75579
  usesTypescript(ctx);
75691
75580
  const filePath = `app.config.${usesTypescript(ctx) ? "ts" : "js"}`;
@@ -75697,7 +75586,7 @@ var configure3 = async (ctx) => {
75697
75586
  if (callee.name !== "defineConfig") {
75698
75587
  return this.traverse(n);
75699
75588
  }
75700
- const b3 = recast3.types.builders;
75589
+ const b3 = recast2.types.builders;
75701
75590
  mergeObjectProperties(
75702
75591
  n.node.arguments[0],
75703
75592
  [
@@ -75721,7 +75610,7 @@ var configure3 = async (ctx) => {
75721
75610
  }
75722
75611
  });
75723
75612
  };
75724
- var config2 = {
75613
+ var config = {
75725
75614
  configVersion: 1,
75726
75615
  id: "solid",
75727
75616
  frameworkCli: "create-solid",
@@ -75731,12 +75620,12 @@ var config2 = {
75731
75620
  path: "./templates"
75732
75621
  },
75733
75622
  path: "templates-experimental/solid",
75734
- generate: generate3,
75735
- configure: configure3,
75623
+ generate: generate2,
75624
+ configure: configure2,
75736
75625
  transformPackageJson: async () => ({
75737
75626
  scripts: {
75738
- preview: `${npm2} run build && npx wrangler dev`,
75739
- deploy: `${npm2} run build && wrangler deploy`
75627
+ preview: `${npm} run build && npx wrangler dev`,
75628
+ deploy: `${npm} run build && wrangler deploy`
75740
75629
  }
75741
75630
  }),
75742
75631
  compatibilityFlags: ["nodejs_compat"],
@@ -75744,12 +75633,12 @@ var config2 = {
75744
75633
  deployScript: "deploy",
75745
75634
  previewScript: "preview"
75746
75635
  };
75747
- var c3_default3 = config2;
75636
+ var c3_default2 = config;
75748
75637
 
75749
75638
  // templates/analog/c3.ts
75750
- var recast4 = __toESM(require_main3());
75751
- var { npm: npm3, name: pm } = detectPackageManager();
75752
- var generate4 = async (ctx) => {
75639
+ var recast3 = __toESM(require_main3());
75640
+ var { npm: npm2, name: pm } = detectPackageManager();
75641
+ var generate3 = async (ctx) => {
75753
75642
  await runFrameworkGenerator(ctx, [
75754
75643
  ctx.project.name,
75755
75644
  "--template",
@@ -75757,7 +75646,7 @@ var generate4 = async (ctx) => {
75757
75646
  ]);
75758
75647
  logRaw("");
75759
75648
  };
75760
- var configure4 = async (ctx) => {
75649
+ var configure3 = async (ctx) => {
75761
75650
  if (pm === "pnpm" || pm === "yarn" || pm === "bun") {
75762
75651
  const packages = [];
75763
75652
  packages.push("nitropack");
@@ -75767,7 +75656,7 @@ var configure4 = async (ctx) => {
75767
75656
  await installPackages(packages, {
75768
75657
  dev: true,
75769
75658
  startText: `Installing ${packages.join(", ")}`,
75770
- doneText: `${brandColor("installed")} ${dim(`via \`${npm3} install\``)}`
75659
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm2} install\``)}`
75771
75660
  });
75772
75661
  }
75773
75662
  updateViteConfig(ctx);
@@ -75788,7 +75677,7 @@ var updateEnvTypes = (ctx) => {
75788
75677
  s.stop(`${brandColor(`updated`)} ${dim(`\`${filepath}\``)}`);
75789
75678
  };
75790
75679
  var updateViteConfig = (ctx) => {
75791
- const b3 = recast4.types.builders;
75680
+ const b3 = recast3.types.builders;
75792
75681
  const s = spinner();
75793
75682
  const configFile = "vite.config.ts";
75794
75683
  s.start(`Updating \`${configFile}\``);
@@ -75825,7 +75714,7 @@ var updateViteConfig = (ctx) => {
75825
75714
  });
75826
75715
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
75827
75716
  };
75828
- var config3 = {
75717
+ var config2 = {
75829
75718
  configVersion: 1,
75830
75719
  id: "analog",
75831
75720
  frameworkCli: "create-analog",
@@ -75834,12 +75723,12 @@ var config3 = {
75834
75723
  copyFiles: {
75835
75724
  path: "./templates"
75836
75725
  },
75837
- generate: generate4,
75838
- configure: configure4,
75726
+ generate: generate3,
75727
+ configure: configure3,
75839
75728
  transformPackageJson: async () => ({
75840
75729
  scripts: {
75841
- preview: `${npm3} run build && wrangler pages dev`,
75842
- deploy: `${npm3} run build && wrangler pages deploy`,
75730
+ preview: `${npm2} run build && wrangler pages dev`,
75731
+ deploy: `${npm2} run build && wrangler pages deploy`,
75843
75732
  "cf-typegen": `wrangler types`
75844
75733
  }
75845
75734
  }),
@@ -75847,12 +75736,12 @@ var config3 = {
75847
75736
  deployScript: "deploy",
75848
75737
  previewScript: "preview"
75849
75738
  };
75850
- var c3_default4 = config3;
75739
+ var c3_default3 = config2;
75851
75740
 
75852
75741
  // templates/angular/pages/c3.ts
75853
75742
  var import_node_path3 = require("node:path");
75854
- var { npm: npm4 } = detectPackageManager();
75855
- var generate5 = async (ctx) => {
75743
+ var { npm: npm3 } = detectPackageManager();
75744
+ var generate4 = async (ctx) => {
75856
75745
  await runFrameworkGenerator(ctx, [
75857
75746
  ctx.project.name,
75858
75747
  "--ssr",
@@ -75860,7 +75749,7 @@ var generate5 = async (ctx) => {
75860
75749
  ]);
75861
75750
  logRaw("");
75862
75751
  };
75863
- var configure5 = async (ctx) => {
75752
+ var configure4 = async (ctx) => {
75864
75753
  updateAngularJson(ctx);
75865
75754
  await updateAppCode();
75866
75755
  await installCFWorker();
@@ -75869,7 +75758,7 @@ async function installCFWorker() {
75869
75758
  await installPackages(["xhr2"], {
75870
75759
  dev: true,
75871
75760
  startText: "Installing additional dependencies",
75872
- doneText: `${brandColor("installed")} ${dim(`via \`${npm4} install\``)}`
75761
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm3} install\``)}`
75873
75762
  });
75874
75763
  }
75875
75764
  async function updateAppCode() {
@@ -75911,7 +75800,7 @@ function updateAngularJson(ctx) {
75911
75800
  writeFile2((0, import_node_path3.resolve)("angular.json"), JSON.stringify(angularJson, null, 2));
75912
75801
  s.stop(`${brandColor(`updated`)} ${dim(`\`angular.json\``)}`);
75913
75802
  }
75914
- var config4 = {
75803
+ var config3 = {
75915
75804
  configVersion: 1,
75916
75805
  id: "angular",
75917
75806
  frameworkCli: "@angular/create",
@@ -75924,23 +75813,23 @@ var config4 = {
75924
75813
  devScript: "start",
75925
75814
  deployScript: "deploy",
75926
75815
  previewScript: "start",
75927
- generate: generate5,
75928
- configure: configure5,
75816
+ generate: generate4,
75817
+ configure: configure4,
75929
75818
  transformPackageJson: async () => ({
75930
75819
  scripts: {
75931
- start: `${npm4} run build && wrangler pages dev dist/cloudflare ${await compatDateFlag()}`,
75932
- build: `ng build && ${npm4} run process`,
75820
+ start: `${npm3} run build && wrangler pages dev dist/cloudflare ${await compatDateFlag()}`,
75821
+ build: `ng build && ${npm3} run process`,
75933
75822
  process: "node ./tools/copy-files.mjs",
75934
- deploy: `${npm4} run build && wrangler pages deploy dist/cloudflare`
75823
+ deploy: `${npm3} run build && wrangler pages deploy dist/cloudflare`
75935
75824
  }
75936
75825
  })
75937
75826
  };
75938
- var c3_default5 = config4;
75827
+ var c3_default4 = config3;
75939
75828
 
75940
75829
  // templates/angular/workers/c3.ts
75941
75830
  var import_node_path4 = require("node:path");
75942
- var { npm: npm5 } = detectPackageManager();
75943
- var generate6 = async (ctx) => {
75831
+ var { npm: npm4 } = detectPackageManager();
75832
+ var generate5 = async (ctx) => {
75944
75833
  await runFrameworkGenerator(ctx, [
75945
75834
  ctx.project.name,
75946
75835
  "--ssr",
@@ -75948,7 +75837,7 @@ var generate6 = async (ctx) => {
75948
75837
  ]);
75949
75838
  logRaw("");
75950
75839
  };
75951
- var configure6 = async (ctx) => {
75840
+ var configure5 = async (ctx) => {
75952
75841
  updateAngularJson2(ctx);
75953
75842
  await updateAppCode2();
75954
75843
  await installCFWorker2();
@@ -75957,7 +75846,7 @@ async function installCFWorker2() {
75957
75846
  await installPackages(["xhr2"], {
75958
75847
  dev: true,
75959
75848
  startText: "Installing additional dependencies",
75960
- doneText: `${brandColor("installed")} ${dim(`via \`${npm5} install\``)}`
75849
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm4} install\``)}`
75961
75850
  });
75962
75851
  }
75963
75852
  async function updateAppCode2() {
@@ -75998,7 +75887,7 @@ function updateAngularJson2(ctx) {
75998
75887
  writeFile2((0, import_node_path4.resolve)("angular.json"), JSON.stringify(angularJson, null, 2));
75999
75888
  s.stop(`${brandColor(`updated`)} ${dim(`\`angular.json\``)}`);
76000
75889
  }
76001
- var config5 = {
75890
+ var config4 = {
76002
75891
  configVersion: 1,
76003
75892
  id: "angular",
76004
75893
  frameworkCli: "@angular/create",
@@ -76011,38 +75900,38 @@ var config5 = {
76011
75900
  devScript: "start",
76012
75901
  deployScript: "deploy",
76013
75902
  previewScript: "start",
76014
- generate: generate6,
76015
- configure: configure6,
75903
+ generate: generate5,
75904
+ configure: configure5,
76016
75905
  transformPackageJson: async () => ({
76017
75906
  scripts: {
76018
- start: `${npm5} run build && wrangler dev`,
75907
+ start: `${npm4} run build && wrangler dev`,
76019
75908
  build: `ng build`,
76020
- deploy: `${npm5} run build && wrangler deploy`
75909
+ deploy: `${npm4} run build && wrangler deploy`
76021
75910
  }
76022
75911
  })
76023
75912
  };
76024
- var c3_default6 = config5;
75913
+ var c3_default5 = config4;
76025
75914
 
76026
75915
  // templates/angular/c3.ts
76027
- var config6 = {
75916
+ var config5 = {
76028
75917
  displayName: "Angular",
76029
- platformVariants: { pages: c3_default5, workers: c3_default6 }
75918
+ platformVariants: { pages: c3_default4, workers: c3_default5 }
76030
75919
  };
76031
- var c3_default7 = config6;
75920
+ var c3_default6 = config5;
76032
75921
 
76033
75922
  // templates/astro/pages/c3.ts
76034
- var recast5 = __toESM(require_main3());
76035
- var { npx: npx2 } = detectPackageManager();
76036
- var generate7 = async (ctx) => {
75923
+ var recast4 = __toESM(require_main3());
75924
+ var { npx } = detectPackageManager();
75925
+ var generate6 = async (ctx) => {
76037
75926
  await runFrameworkGenerator(ctx, [ctx.project.name, "--no-install"]);
76038
75927
  logRaw("");
76039
75928
  };
76040
- var configure7 = async () => {
76041
- await runCommand([npx2, "astro", "add", "cloudflare", "-y"], {
75929
+ var configure6 = async () => {
75930
+ await runCommand([npx, "astro", "add", "cloudflare", "-y"], {
76042
75931
  silent: true,
76043
75932
  startText: "Installing adapter",
76044
75933
  doneText: `${brandColor("installed")} ${dim(
76045
- `via \`${npx2} astro add cloudflare\``
75934
+ `via \`${npx} astro add cloudflare\``
76046
75935
  )}`
76047
75936
  });
76048
75937
  updateAstroConfig();
@@ -76056,7 +75945,7 @@ var updateAstroConfig = () => {
76056
75945
  if (callee.name !== "cloudflare") {
76057
75946
  return this.traverse(n);
76058
75947
  }
76059
- const b3 = recast5.types.builders;
75948
+ const b3 = recast4.types.builders;
76060
75949
  n.node.arguments = [
76061
75950
  b3.objectExpression([
76062
75951
  b3.objectProperty(
@@ -76071,7 +75960,7 @@ var updateAstroConfig = () => {
76071
75960
  }
76072
75961
  });
76073
75962
  };
76074
- var config7 = {
75963
+ var config6 = {
76075
75964
  configVersion: 1,
76076
75965
  id: "astro",
76077
75966
  frameworkCli: "create-astro",
@@ -76094,8 +75983,8 @@ var config7 = {
76094
75983
  devScript: "dev",
76095
75984
  deployScript: "deploy",
76096
75985
  previewScript: "preview",
76097
- generate: generate7,
76098
- configure: configure7,
75986
+ generate: generate6,
75987
+ configure: configure6,
76099
75988
  transformPackageJson: async (pkgJson, ctx) => ({
76100
75989
  scripts: {
76101
75990
  deploy: `astro build && wrangler pages deploy`,
@@ -76104,21 +75993,21 @@ var config7 = {
76104
75993
  }
76105
75994
  })
76106
75995
  };
76107
- var c3_default8 = config7;
75996
+ var c3_default7 = config6;
76108
75997
 
76109
75998
  // templates/astro/workers/c3.ts
76110
- var recast6 = __toESM(require_main3());
76111
- var { npx: npx3 } = detectPackageManager();
76112
- var generate8 = async (ctx) => {
75999
+ var recast5 = __toESM(require_main3());
76000
+ var { npx: npx2 } = detectPackageManager();
76001
+ var generate7 = async (ctx) => {
76113
76002
  await runFrameworkGenerator(ctx, [ctx.project.name, "--no-install"]);
76114
76003
  logRaw("");
76115
76004
  };
76116
- var configure8 = async () => {
76117
- await runCommand([npx3, "astro", "add", "cloudflare", "-y"], {
76005
+ var configure7 = async () => {
76006
+ await runCommand([npx2, "astro", "add", "cloudflare", "-y"], {
76118
76007
  silent: true,
76119
76008
  startText: "Installing adapter",
76120
76009
  doneText: `${brandColor("installed")} ${dim(
76121
- `via \`${npx3} astro add cloudflare\``
76010
+ `via \`${npx2} astro add cloudflare\``
76122
76011
  )}`
76123
76012
  });
76124
76013
  updateAstroConfig2();
@@ -76132,7 +76021,7 @@ var updateAstroConfig2 = () => {
76132
76021
  if (callee.name !== "cloudflare") {
76133
76022
  return this.traverse(n);
76134
76023
  }
76135
- const b3 = recast6.types.builders;
76024
+ const b3 = recast5.types.builders;
76136
76025
  n.node.arguments = [
76137
76026
  b3.objectExpression([
76138
76027
  b3.objectProperty(
@@ -76147,7 +76036,7 @@ var updateAstroConfig2 = () => {
76147
76036
  }
76148
76037
  });
76149
76038
  };
76150
- var config8 = {
76039
+ var config7 = {
76151
76040
  configVersion: 1,
76152
76041
  id: "astro",
76153
76042
  frameworkCli: "create-astro",
@@ -76170,8 +76059,8 @@ var config8 = {
76170
76059
  deployScript: "deploy",
76171
76060
  previewScript: "preview",
76172
76061
  path: "templates/astro/workers",
76173
- generate: generate8,
76174
- configure: configure8,
76062
+ generate: generate7,
76063
+ configure: configure7,
76175
76064
  transformPackageJson: async (pkgJson, ctx) => ({
76176
76065
  scripts: {
76177
76066
  deploy: `astro build && wrangler deploy`,
@@ -76180,17 +76069,17 @@ var config8 = {
76180
76069
  }
76181
76070
  })
76182
76071
  };
76183
- var c3_default9 = config8;
76072
+ var c3_default8 = config7;
76184
76073
 
76185
76074
  // templates/astro/c3.ts
76186
- var config9 = {
76075
+ var config8 = {
76187
76076
  displayName: "Astro",
76188
- platformVariants: { pages: c3_default8, workers: c3_default9 }
76077
+ platformVariants: { pages: c3_default7, workers: c3_default8 }
76189
76078
  };
76190
- var c3_default10 = config9;
76079
+ var c3_default9 = config8;
76191
76080
 
76192
76081
  // templates/common/c3.ts
76193
- var c3_default11 = {
76082
+ var c3_default10 = {
76194
76083
  configVersion: 1,
76195
76084
  id: "common",
76196
76085
  displayName: "Example router & proxy Worker",
@@ -76210,36 +76099,36 @@ var c3_default11 = {
76210
76099
  };
76211
76100
 
76212
76101
  // templates/docusaurus/pages/c3.ts
76213
- var { npm: npm6 } = detectPackageManager();
76214
- var generate9 = async (ctx) => {
76102
+ var { npm: npm5 } = detectPackageManager();
76103
+ var generate8 = async (ctx) => {
76215
76104
  await runFrameworkGenerator(ctx, [ctx.project.name, "classic"]);
76216
76105
  };
76217
- var config10 = {
76106
+ var config9 = {
76218
76107
  configVersion: 1,
76219
76108
  id: "docusaurus",
76220
76109
  frameworkCli: "create-docusaurus",
76221
76110
  platform: "pages",
76222
76111
  displayName: "Docusaurus",
76223
76112
  path: "templates/docusaurus/pages",
76224
- generate: generate9,
76113
+ generate: generate8,
76225
76114
  transformPackageJson: async () => ({
76226
76115
  scripts: {
76227
- preview: `${npm6} run build && wrangler pages dev ./build`,
76228
- deploy: `${npm6} run build && wrangler pages deploy ./build`
76116
+ preview: `${npm5} run build && wrangler pages dev ./build`,
76117
+ deploy: `${npm5} run build && wrangler pages deploy ./build`
76229
76118
  }
76230
76119
  }),
76231
76120
  devScript: "preview",
76232
76121
  deployScript: "deploy",
76233
76122
  previewScript: "preview"
76234
76123
  };
76235
- var c3_default12 = config10;
76124
+ var c3_default11 = config9;
76236
76125
 
76237
76126
  // templates/docusaurus/workers/c3.ts
76238
- var { npm: npm7 } = detectPackageManager();
76239
- var generate10 = async (ctx) => {
76127
+ var { npm: npm6 } = detectPackageManager();
76128
+ var generate9 = async (ctx) => {
76240
76129
  await runFrameworkGenerator(ctx, [ctx.project.name, "classic"]);
76241
76130
  };
76242
- var config11 = {
76131
+ var config10 = {
76243
76132
  configVersion: 1,
76244
76133
  id: "docusaurus",
76245
76134
  frameworkCli: "create-docusaurus",
@@ -76249,29 +76138,29 @@ var config11 = {
76249
76138
  path: "./templates"
76250
76139
  },
76251
76140
  path: "templates/docusaurus/workers",
76252
- generate: generate10,
76141
+ generate: generate9,
76253
76142
  transformPackageJson: async () => ({
76254
76143
  scripts: {
76255
- deploy: `${npm7} run build && wrangler deploy`,
76256
- preview: `${npm7} run build && wrangler dev`
76144
+ deploy: `${npm6} run build && wrangler deploy`,
76145
+ preview: `${npm6} run build && wrangler dev`
76257
76146
  }
76258
76147
  }),
76259
76148
  devScript: "start",
76260
76149
  deployScript: "deploy",
76261
76150
  previewScript: "preview"
76262
76151
  };
76263
- var c3_default13 = config11;
76152
+ var c3_default12 = config10;
76264
76153
 
76265
76154
  // templates/docusaurus/c3.ts
76266
- var config12 = {
76155
+ var config11 = {
76267
76156
  displayName: "Docusaurus",
76268
- platformVariants: { pages: c3_default12, workers: c3_default13 }
76157
+ platformVariants: { pages: c3_default11, workers: c3_default12 }
76269
76158
  };
76270
- var c3_default14 = config12;
76159
+ var c3_default13 = config11;
76271
76160
 
76272
76161
  // templates/gatsby/pages/c3.ts
76273
- var { npm: npm8 } = detectPackageManager();
76274
- var generate11 = async (ctx) => {
76162
+ var { npm: npm7 } = detectPackageManager();
76163
+ var generate10 = async (ctx) => {
76275
76164
  const defaultTemplate = "https://github.com/gatsbyjs/gatsby-starter-blog";
76276
76165
  const useTemplate = await inputPrompt({
76277
76166
  type: "confirm",
@@ -76290,29 +76179,29 @@ var generate11 = async (ctx) => {
76290
76179
  }
76291
76180
  await runFrameworkGenerator(ctx, ["new", ctx.project.name, templateUrl]);
76292
76181
  };
76293
- var config13 = {
76182
+ var config12 = {
76294
76183
  configVersion: 1,
76295
76184
  id: "gatsby",
76296
76185
  frameworkCli: "gatsby",
76297
76186
  platform: "pages",
76298
76187
  displayName: "Gatsby",
76299
76188
  path: "templates/gatsby/pages",
76300
- generate: generate11,
76189
+ generate: generate10,
76301
76190
  transformPackageJson: async () => ({
76302
76191
  scripts: {
76303
- deploy: `${npm8} run build && wrangler pages deploy ./public`,
76304
- preview: `${npm8} run build && wrangler pages dev ./public`
76192
+ deploy: `${npm7} run build && wrangler pages deploy ./public`,
76193
+ preview: `${npm7} run build && wrangler pages dev ./public`
76305
76194
  }
76306
76195
  }),
76307
76196
  devScript: "develop",
76308
76197
  deployScript: "deploy",
76309
76198
  previewScript: "preview"
76310
76199
  };
76311
- var c3_default15 = config13;
76200
+ var c3_default14 = config12;
76312
76201
 
76313
76202
  // templates/gatsby/workers/c3.ts
76314
- var { npm: npm9 } = detectPackageManager();
76315
- var generate12 = async (ctx) => {
76203
+ var { npm: npm8 } = detectPackageManager();
76204
+ var generate11 = async (ctx) => {
76316
76205
  const defaultTemplate = "https://github.com/gatsbyjs/gatsby-starter-blog";
76317
76206
  const useTemplate = await inputPrompt({
76318
76207
  type: "confirm",
@@ -76331,7 +76220,7 @@ var generate12 = async (ctx) => {
76331
76220
  }
76332
76221
  await runFrameworkGenerator(ctx, ["new", ctx.project.name, templateUrl]);
76333
76222
  };
76334
- var config14 = {
76223
+ var config13 = {
76335
76224
  configVersion: 1,
76336
76225
  id: "gatsby",
76337
76226
  frameworkCli: "gatsby",
@@ -76341,28 +76230,28 @@ var config14 = {
76341
76230
  path: "./templates"
76342
76231
  },
76343
76232
  path: "templates/gatsby/workers",
76344
- generate: generate12,
76233
+ generate: generate11,
76345
76234
  transformPackageJson: async () => ({
76346
76235
  scripts: {
76347
- deploy: `${npm9} run build && wrangler deploy`,
76348
- preview: `${npm9} run build && wrangler dev`
76236
+ deploy: `${npm8} run build && wrangler deploy`,
76237
+ preview: `${npm8} run build && wrangler dev`
76349
76238
  }
76350
76239
  }),
76351
76240
  devScript: "develop",
76352
76241
  deployScript: "deploy",
76353
76242
  previewScript: "preview"
76354
76243
  };
76355
- var c3_default16 = config14;
76244
+ var c3_default15 = config13;
76356
76245
 
76357
76246
  // templates/gatsby/c3.ts
76358
- var config15 = {
76247
+ var config14 = {
76359
76248
  displayName: "Gatsby",
76360
- platformVariants: { pages: c3_default15, workers: c3_default16 }
76249
+ platformVariants: { pages: c3_default14, workers: c3_default15 }
76361
76250
  };
76362
- var c3_default17 = config15;
76251
+ var c3_default16 = config14;
76363
76252
 
76364
76253
  // templates/hello-world-assets-only/c3.ts
76365
- var config16 = {
76254
+ var config15 = {
76366
76255
  configVersion: 1,
76367
76256
  id: "hello-world-assets-only",
76368
76257
  path: "templates/hello-world-assets-only",
@@ -76373,10 +76262,10 @@ var config16 = {
76373
76262
  path: "./templates"
76374
76263
  }
76375
76264
  };
76376
- var c3_default18 = config16;
76265
+ var c3_default17 = config15;
76377
76266
 
76378
76267
  // templates/hello-world-durable-object-with-assets/c3.ts
76379
- var config17 = {
76268
+ var config16 = {
76380
76269
  configVersion: 1,
76381
76270
  id: "hello-world-durable-object-with-assets",
76382
76271
  path: "templates/hello-world-durable-object-with-assets",
@@ -76394,10 +76283,10 @@ var config17 = {
76394
76283
  }
76395
76284
  }
76396
76285
  };
76397
- var c3_default19 = config17;
76286
+ var c3_default18 = config16;
76398
76287
 
76399
76288
  // templates/hello-world-durable-object/c3.ts
76400
- var c3_default20 = {
76289
+ var c3_default19 = {
76401
76290
  configVersion: 1,
76402
76291
  id: "hello-world-durable-object",
76403
76292
  displayName: "Worker + Durable Objects",
@@ -76416,7 +76305,7 @@ var c3_default20 = {
76416
76305
  };
76417
76306
 
76418
76307
  // templates/hello-world-with-assets/c3.ts
76419
- var c3_default21 = {
76308
+ var c3_default20 = {
76420
76309
  configVersion: 1,
76421
76310
  id: "hello-world-with-assets",
76422
76311
  path: "templates/hello-world-with-assets",
@@ -76441,7 +76330,7 @@ var c3_default21 = {
76441
76330
  // templates/hello-world/c3.ts
76442
76331
  var import_promises2 = require("node:fs/promises");
76443
76332
  var import_node_path5 = require("node:path");
76444
- var c3_default22 = {
76333
+ var c3_default21 = {
76445
76334
  configVersion: 1,
76446
76335
  id: "hello-world",
76447
76336
  displayName: "Worker only",
@@ -76475,7 +76364,7 @@ var c3_default22 = {
76475
76364
  };
76476
76365
 
76477
76366
  // templates/hono/pages/c3.ts
76478
- var generate13 = async (ctx) => {
76367
+ var generate12 = async (ctx) => {
76479
76368
  const { name: pm4 } = detectPackageManager();
76480
76369
  await runFrameworkGenerator(ctx, [
76481
76370
  ctx.project.name,
@@ -76487,7 +76376,7 @@ var generate13 = async (ctx) => {
76487
76376
  ]);
76488
76377
  logRaw("");
76489
76378
  };
76490
- var config18 = {
76379
+ var config17 = {
76491
76380
  configVersion: 1,
76492
76381
  id: "hono",
76493
76382
  frameworkCli: "create-hono",
@@ -76497,7 +76386,7 @@ var config18 = {
76497
76386
  },
76498
76387
  path: "templates/hono/pages",
76499
76388
  platform: "pages",
76500
- generate: generate13,
76389
+ generate: generate12,
76501
76390
  transformPackageJson: async () => ({
76502
76391
  scripts: {
76503
76392
  "cf-typegen": "wrangler types --env-interface CloudflareBindings"
@@ -76507,10 +76396,10 @@ var config18 = {
76507
76396
  deployScript: "deploy",
76508
76397
  previewScript: "dev"
76509
76398
  };
76510
- var c3_default23 = config18;
76399
+ var c3_default22 = config17;
76511
76400
 
76512
76401
  // templates/hono/workers/c3.ts
76513
- var generate14 = async (ctx) => {
76402
+ var generate13 = async (ctx) => {
76514
76403
  const { name: pm4 } = detectPackageManager();
76515
76404
  await runFrameworkGenerator(ctx, [
76516
76405
  ctx.project.name,
@@ -76522,7 +76411,7 @@ var generate14 = async (ctx) => {
76522
76411
  ]);
76523
76412
  logRaw("");
76524
76413
  };
76525
- var config19 = {
76414
+ var config18 = {
76526
76415
  configVersion: 1,
76527
76416
  id: "hono",
76528
76417
  frameworkCli: "create-hono",
@@ -76532,7 +76421,7 @@ var config19 = {
76532
76421
  },
76533
76422
  platform: "workers",
76534
76423
  path: "templates/hono/workers",
76535
- generate: generate14,
76424
+ generate: generate13,
76536
76425
  transformPackageJson: async () => ({
76537
76426
  scripts: {
76538
76427
  "cf-typegen": "wrangler types --env-interface CloudflareBindings"
@@ -76542,19 +76431,19 @@ var config19 = {
76542
76431
  deployScript: "deploy",
76543
76432
  previewScript: "dev"
76544
76433
  };
76545
- var c3_default24 = config19;
76434
+ var c3_default23 = config18;
76546
76435
 
76547
76436
  // templates/hono/c3.ts
76548
- var config20 = {
76437
+ var config19 = {
76549
76438
  displayName: "Hono",
76550
- platformVariants: { pages: c3_default23, workers: c3_default24 }
76439
+ platformVariants: { pages: c3_default22, workers: c3_default23 }
76551
76440
  };
76552
- var c3_default25 = config20;
76441
+ var c3_default24 = config19;
76553
76442
 
76554
76443
  // templates/next/c3.ts
76555
76444
  var import_path10 = require("path");
76556
- var { npm: npm10, npx: npx4 } = detectPackageManager();
76557
- var generate15 = async (ctx) => {
76445
+ var { npm: npm9, npx: npx3 } = detectPackageManager();
76446
+ var generate14 = async (ctx) => {
76558
76447
  const projectName = ctx.project.name;
76559
76448
  await runFrameworkGenerator(ctx, [projectName]);
76560
76449
  const wranglerConfig = readFile((0, import_path10.join)(getTemplatePath(ctx), "wrangler.jsonc"));
@@ -76579,7 +76468,7 @@ var updateNextConfig2 = (usesTs) => {
76579
76468
  writeFile2(configFile, updatedConfigFile);
76580
76469
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
76581
76470
  };
76582
- var configure9 = async (ctx) => {
76471
+ var configure8 = async (ctx) => {
76583
76472
  const projectPath = ctx.project.path;
76584
76473
  const path6 = probePaths([
76585
76474
  `${projectPath}/pages/api`,
@@ -76654,14 +76543,14 @@ var addDevDependencies = async (installEslintPlugin) => {
76654
76543
  doneText: `${brandColor(`installed`)} ${dim(packages.join(", "))}`
76655
76544
  });
76656
76545
  };
76657
- var c3_default26 = {
76546
+ var c3_default25 = {
76658
76547
  configVersion: 1,
76659
76548
  id: "next",
76660
76549
  frameworkCli: "create-next-app",
76661
76550
  platform: "pages",
76662
76551
  displayName: "Next.js",
76663
- generate: generate15,
76664
- configure: configure9,
76552
+ generate: generate14,
76553
+ configure: configure8,
76665
76554
  copyFiles: {
76666
76555
  async selectVariant(ctx) {
76667
76556
  const isApp = probePaths([
@@ -76692,12 +76581,12 @@ var c3_default26 = {
76692
76581
  }
76693
76582
  },
76694
76583
  transformPackageJson: async (_3, ctx) => {
76695
- const isNpm = npm10 === "npm";
76696
- const isBun = npm10 === "bun";
76584
+ const isNpm = npm9 === "npm";
76585
+ const isBun = npm9 === "bun";
76697
76586
  const isNpmOrBun = isNpm || isBun;
76698
76587
  const nextOnPagesScope = isNpmOrBun ? "@cloudflare/" : "";
76699
76588
  const nextOnPagesCommand = `${nextOnPagesScope}next-on-pages`;
76700
- const pmCommand = isNpmOrBun ? npx4 : npm10;
76589
+ const pmCommand = isNpmOrBun ? npx3 : npm9;
76701
76590
  const pagesBuildRunCommand = `${isNpm ? "npm run" : isBun ? "bun" : pmCommand} pages:build`;
76702
76591
  return {
76703
76592
  scripts: {
@@ -76717,21 +76606,21 @@ var c3_default26 = {
76717
76606
  };
76718
76607
 
76719
76608
  // templates/nuxt/pages/c3.ts
76720
- var recast7 = __toESM(require_main3());
76721
- var { npm: npm11, name: pm2 } = detectPackageManager();
76722
- var generate16 = async (ctx) => {
76609
+ var recast6 = __toESM(require_main3());
76610
+ var { npm: npm10, name: pm2 } = detectPackageManager();
76611
+ var generate15 = async (ctx) => {
76723
76612
  const gitFlag = ctx.args.git ? `--gitInit` : `--no-gitInit`;
76724
76613
  await runFrameworkGenerator(ctx, [
76725
76614
  "init",
76726
76615
  ctx.project.name,
76727
76616
  "--packageManager",
76728
- npm11,
76617
+ npm10,
76729
76618
  gitFlag
76730
76619
  ]);
76731
76620
  writeFile2("./.node-version", "18");
76732
76621
  logRaw("");
76733
76622
  };
76734
- var configure10 = async (ctx) => {
76623
+ var configure9 = async (ctx) => {
76735
76624
  const packages = ["nitro-cloudflare-dev"];
76736
76625
  if (pm2 === "pnpm") {
76737
76626
  packages.push("h3");
@@ -76739,7 +76628,7 @@ var configure10 = async (ctx) => {
76739
76628
  await installPackages(packages, {
76740
76629
  dev: true,
76741
76630
  startText: "Installing nitro module `nitro-cloudflare-dev`",
76742
- doneText: `${brandColor("installed")} ${dim(`via \`${npm11} install\``)}`
76631
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm10} install\``)}`
76743
76632
  });
76744
76633
  updateNuxtConfig();
76745
76634
  updateEnvTypes2(ctx);
@@ -76762,7 +76651,7 @@ var updateNuxtConfig = () => {
76762
76651
  const s = spinner();
76763
76652
  const configFile = "nuxt.config.ts";
76764
76653
  s.start(`Updating \`${configFile}\``);
76765
- const b3 = recast7.types.builders;
76654
+ const b3 = recast6.types.builders;
76766
76655
  const presetDef = b3.objectProperty(
76767
76656
  b3.identifier("nitro"),
76768
76657
  b3.objectExpression([
@@ -76800,7 +76689,7 @@ var updateNuxtConfig = () => {
76800
76689
  });
76801
76690
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
76802
76691
  };
76803
- var config21 = {
76692
+ var config20 = {
76804
76693
  configVersion: 1,
76805
76694
  id: "nuxt",
76806
76695
  frameworkCli: "nuxi",
@@ -76810,12 +76699,12 @@ var config21 = {
76810
76699
  path: "./templates"
76811
76700
  },
76812
76701
  path: "templates/nuxt/pages",
76813
- generate: generate16,
76814
- configure: configure10,
76702
+ generate: generate15,
76703
+ configure: configure9,
76815
76704
  transformPackageJson: async () => ({
76816
76705
  scripts: {
76817
- deploy: `${npm11} run build && wrangler pages deploy`,
76818
- preview: `${npm11} run build && wrangler pages dev`,
76706
+ deploy: `${npm10} run build && wrangler pages deploy`,
76707
+ preview: `${npm10} run build && wrangler pages dev`,
76819
76708
  "cf-typegen": `wrangler types`
76820
76709
  }
76821
76710
  }),
@@ -76823,24 +76712,24 @@ var config21 = {
76823
76712
  deployScript: "deploy",
76824
76713
  previewScript: "preview"
76825
76714
  };
76826
- var c3_default27 = config21;
76715
+ var c3_default26 = config20;
76827
76716
 
76828
76717
  // templates/nuxt/workers/c3.ts
76829
- var recast8 = __toESM(require_main3());
76830
- var { npm: npm12, name: pm3 } = detectPackageManager();
76831
- var generate17 = async (ctx) => {
76718
+ var recast7 = __toESM(require_main3());
76719
+ var { npm: npm11, name: pm3 } = detectPackageManager();
76720
+ var generate16 = async (ctx) => {
76832
76721
  const gitFlag = ctx.args.git ? `--gitInit` : `--no-gitInit`;
76833
76722
  await runFrameworkGenerator(ctx, [
76834
76723
  "init",
76835
76724
  ctx.project.name,
76836
76725
  "--packageManager",
76837
- npm12,
76726
+ npm11,
76838
76727
  gitFlag
76839
76728
  ]);
76840
76729
  writeFile2("./.node-version", "18");
76841
76730
  logRaw("");
76842
76731
  };
76843
- var configure11 = async (ctx) => {
76732
+ var configure10 = async (ctx) => {
76844
76733
  const packages = ["nitro-cloudflare-dev", "nitropack"];
76845
76734
  if (pm3 === "pnpm") {
76846
76735
  packages.push("h3");
@@ -76848,7 +76737,7 @@ var configure11 = async (ctx) => {
76848
76737
  await installPackages(packages, {
76849
76738
  dev: true,
76850
76739
  startText: "Installing nitro module `nitro-cloudflare-dev`",
76851
- doneText: `${brandColor("installed")} ${dim(`via \`${npm12} install\``)}`
76740
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm11} install\``)}`
76852
76741
  });
76853
76742
  updateNuxtConfig2();
76854
76743
  updateEnvTypes3(ctx);
@@ -76871,7 +76760,7 @@ var updateNuxtConfig2 = () => {
76871
76760
  const s = spinner();
76872
76761
  const configFile = "nuxt.config.ts";
76873
76762
  s.start(`Updating \`${configFile}\``);
76874
- const b3 = recast8.types.builders;
76763
+ const b3 = recast7.types.builders;
76875
76764
  const presetDef = b3.objectProperty(
76876
76765
  b3.identifier("nitro"),
76877
76766
  b3.objectExpression([
@@ -76909,7 +76798,7 @@ var updateNuxtConfig2 = () => {
76909
76798
  });
76910
76799
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
76911
76800
  };
76912
- var config22 = {
76801
+ var config21 = {
76913
76802
  configVersion: 1,
76914
76803
  id: "nuxt",
76915
76804
  frameworkCli: "nuxi",
@@ -76919,12 +76808,12 @@ var config22 = {
76919
76808
  path: "./templates"
76920
76809
  },
76921
76810
  path: "templates/nuxt/workers",
76922
- generate: generate17,
76923
- configure: configure11,
76811
+ generate: generate16,
76812
+ configure: configure10,
76924
76813
  transformPackageJson: async () => ({
76925
76814
  scripts: {
76926
- deploy: `${npm12} run build && wrangler deploy`,
76927
- preview: `${npm12} run build && wrangler dev`,
76815
+ deploy: `${npm11} run build && wrangler deploy`,
76816
+ preview: `${npm11} run build && wrangler dev`,
76928
76817
  "cf-typegen": `wrangler types`
76929
76818
  }
76930
76819
  }),
@@ -76932,17 +76821,17 @@ var config22 = {
76932
76821
  deployScript: "deploy",
76933
76822
  previewScript: "preview"
76934
76823
  };
76935
- var c3_default28 = config22;
76824
+ var c3_default27 = config21;
76936
76825
 
76937
76826
  // templates/nuxt/c3.ts
76938
- var config23 = {
76827
+ var config22 = {
76939
76828
  displayName: "Nuxt",
76940
- platformVariants: { pages: c3_default27, workers: c3_default28 }
76829
+ platformVariants: { pages: c3_default26, workers: c3_default27 }
76941
76830
  };
76942
- var c3_default29 = config23;
76831
+ var c3_default28 = config22;
76943
76832
 
76944
76833
  // templates/openapi/c3.ts
76945
- var c3_default30 = {
76834
+ var c3_default29 = {
76946
76835
  configVersion: 1,
76947
76836
  id: "openapi",
76948
76837
  displayName: "API starter (OpenAPI compliant)",
@@ -77101,7 +76990,7 @@ async function copyExistingWorkerFiles(ctx) {
77101
76990
  (0, import_path11.join)(ctx.project.path, "wrangler.toml")
77102
76991
  );
77103
76992
  }
77104
- var c3_default31 = {
76993
+ var c3_default30 = {
77105
76994
  configVersion: 1,
77106
76995
  id: "pre-existing",
77107
76996
  displayName: "Pre-existing Worker (from Dashboard)",
@@ -77129,7 +77018,7 @@ function buildConfigure(params) {
77129
77018
  }
77130
77019
 
77131
77020
  // templates/queues/c3.ts
77132
- var c3_default32 = {
77021
+ var c3_default31 = {
77133
77022
  configVersion: 1,
77134
77023
  id: "queues",
77135
77024
  displayName: "Queue consumer & producer Worker",
@@ -77157,7 +77046,115 @@ var c3_default32 = {
77157
77046
  }
77158
77047
  };
77159
77048
 
77160
- // templates/qwik/c3.ts
77049
+ // templates/qwik/pages/c3.ts
77050
+ var recast8 = __toESM(require_main3());
77051
+ var { npm: npm12, npx: npx4, name } = detectPackageManager();
77052
+ var generate17 = async (ctx) => {
77053
+ await runFrameworkGenerator(ctx, ["playground", ctx.project.name]);
77054
+ };
77055
+ var configure11 = async (ctx) => {
77056
+ const cmd = [name === "pnpm" ? npm12 : npx4, "qwik", "add", "cloudflare-pages"];
77057
+ endSection(`Running ${quoteShellArgs(cmd)}`);
77058
+ await runCommand(cmd);
77059
+ addBindingsProxy(ctx);
77060
+ populateCloudflareEnv();
77061
+ };
77062
+ var addBindingsProxy = (ctx) => {
77063
+ if (!usesTypescript(ctx)) {
77064
+ return;
77065
+ }
77066
+ const s = spinner();
77067
+ s.start("Updating `vite.config.ts`");
77068
+ const snippets = loadTemplateSnippets(ctx);
77069
+ const b3 = recast8.types.builders;
77070
+ transformFile("vite.config.ts", {
77071
+ // Insert the env declaration after the last import (but before the rest of the body)
77072
+ visitProgram: function(n) {
77073
+ const lastImportIndex = n.node.body.findLastIndex(
77074
+ (t2) => t2.type === "ImportDeclaration"
77075
+ );
77076
+ const lastImport = n.get("body", lastImportIndex);
77077
+ lastImport.insertAfter(...snippets.getPlatformProxyTs);
77078
+ return this.traverse(n);
77079
+ },
77080
+ // Pass the `platform` object from the declaration to the `qwikCity` plugin
77081
+ visitCallExpression: function(n) {
77082
+ const callee = n.node.callee;
77083
+ if (callee.name !== "qwikCity") {
77084
+ return this.traverse(n);
77085
+ }
77086
+ const configArgument = n.node.arguments[0];
77087
+ const platformPropery = b3.objectProperty.from({
77088
+ key: b3.identifier("platform"),
77089
+ value: b3.identifier("platform"),
77090
+ shorthand: true
77091
+ });
77092
+ if (!configArgument) {
77093
+ n.node.arguments = [b3.objectExpression([platformPropery])];
77094
+ return false;
77095
+ }
77096
+ if (configArgument.type !== "ObjectExpression") {
77097
+ throw new Error("Failed to update `vite.config.ts`");
77098
+ }
77099
+ configArgument.properties.push(platformPropery);
77100
+ return false;
77101
+ }
77102
+ });
77103
+ s.stop(`${brandColor("updated")} \`vite.config.ts\``);
77104
+ };
77105
+ var populateCloudflareEnv = () => {
77106
+ const entrypointPath = "src/entry.cloudflare-pages.tsx";
77107
+ const s = spinner();
77108
+ s.start(`Updating \`${entrypointPath}\``);
77109
+ transformFile(entrypointPath, {
77110
+ visitTSInterfaceDeclaration: function(n) {
77111
+ const b3 = recast8.types.builders;
77112
+ const id = n.node.id;
77113
+ if (id.name !== "QwikCityPlatform") {
77114
+ this.traverse(n);
77115
+ }
77116
+ const newBody = [
77117
+ ["env", "Env"]
77118
+ // Qwik doesn't supply `cf` to the platform object. Should they do so, uncomment this
77119
+ // ["cf", "CfProperties"],
77120
+ ].map(
77121
+ ([varName, type]) => b3.tsPropertySignature(
77122
+ b3.identifier(varName),
77123
+ b3.tsTypeAnnotation(b3.tsTypeReference(b3.identifier(type)))
77124
+ )
77125
+ );
77126
+ n.node.body.body = newBody;
77127
+ return false;
77128
+ }
77129
+ });
77130
+ s.stop(`${brandColor("updated")} \`${entrypointPath}\``);
77131
+ };
77132
+ var config23 = {
77133
+ configVersion: 1,
77134
+ id: "qwik",
77135
+ frameworkCli: "create-qwik",
77136
+ displayName: "Qwik",
77137
+ platform: "pages",
77138
+ copyFiles: {
77139
+ path: "./templates"
77140
+ },
77141
+ path: "templates/qwik/pages",
77142
+ generate: generate17,
77143
+ configure: configure11,
77144
+ transformPackageJson: async () => ({
77145
+ scripts: {
77146
+ deploy: `${npm12} run build && wrangler pages deploy`,
77147
+ preview: `${npm12} run build && wrangler pages dev`,
77148
+ "cf-typegen": `wrangler types`
77149
+ }
77150
+ }),
77151
+ devScript: "dev",
77152
+ deployScript: "deploy",
77153
+ previewScript: "preview"
77154
+ };
77155
+ var c3_default32 = config23;
77156
+
77157
+ // templates/qwik/workers/c3.ts
77161
77158
  var recast9 = __toESM(require_main3());
77162
77159
  var { npm: npm13, npx: npx5, name: name2 } = detectPackageManager();
77163
77160
  var generate18 = async (ctx) => {
@@ -77167,6 +77164,9 @@ var configure12 = async (ctx) => {
77167
77164
  const cmd = [name2 === "pnpm" ? npm13 : npx5, "qwik", "add", "cloudflare-pages"];
77168
77165
  endSection(`Running ${quoteShellArgs(cmd)}`);
77169
77166
  await runCommand(cmd);
77167
+ removeFile("./public/_headers");
77168
+ removeFile("./public/_redirects");
77169
+ removeFile("./public/_routes.json");
77170
77170
  addBindingsProxy2(ctx);
77171
77171
  populateCloudflareEnv2();
77172
77172
  };
@@ -77205,7 +77205,7 @@ var addBindingsProxy2 = (ctx) => {
77205
77205
  return false;
77206
77206
  }
77207
77207
  if (configArgument.type !== "ObjectExpression") {
77208
- throw new Error("Failed to update `vite.config.ts`");
77208
+ crash("Failed to update `vite.config.ts`");
77209
77209
  }
77210
77210
  configArgument.properties.push(platformPropery);
77211
77211
  return false;
@@ -77245,16 +77245,17 @@ var config24 = {
77245
77245
  id: "qwik",
77246
77246
  frameworkCli: "create-qwik",
77247
77247
  displayName: "Qwik",
77248
- platform: "pages",
77248
+ platform: "workers",
77249
77249
  copyFiles: {
77250
77250
  path: "./templates"
77251
77251
  },
77252
+ path: "templates/qwik/workers",
77252
77253
  generate: generate18,
77253
77254
  configure: configure12,
77254
77255
  transformPackageJson: async () => ({
77255
77256
  scripts: {
77256
- deploy: `${npm13} run build && wrangler pages deploy`,
77257
- preview: `${npm13} run build && wrangler pages dev`,
77257
+ deploy: `${npm13} run build && wrangler deploy`,
77258
+ preview: `${npm13} run build && wrangler dev`,
77258
77259
  "cf-typegen": `wrangler types`
77259
77260
  }
77260
77261
  }),
@@ -77264,6 +77265,13 @@ var config24 = {
77264
77265
  };
77265
77266
  var c3_default33 = config24;
77266
77267
 
77268
+ // templates/qwik/c3.ts
77269
+ var config25 = {
77270
+ displayName: "Qwik",
77271
+ platformVariants: { pages: c3_default32, workers: c3_default33 }
77272
+ };
77273
+ var c3_default34 = config25;
77274
+
77267
77275
  // templates/react/pages/c3.ts
77268
77276
  var { npm: npm14 } = detectPackageManager();
77269
77277
  var generate19 = async (ctx) => {
@@ -77295,7 +77303,7 @@ var variantsOptions = [
77295
77303
  label: "JavaScript + SWC"
77296
77304
  }
77297
77305
  ];
77298
- var config25 = {
77306
+ var config26 = {
77299
77307
  configVersion: 1,
77300
77308
  id: "react",
77301
77309
  // React's documentation now recommends using create-vite.
@@ -77314,7 +77322,7 @@ var config25 = {
77314
77322
  deployScript: "deploy",
77315
77323
  previewScript: "preview"
77316
77324
  };
77317
- var c3_default34 = config25;
77325
+ var c3_default35 = config26;
77318
77326
 
77319
77327
  // templates/react/workers/c3.ts
77320
77328
  var import_assert2 = __toESM(require("assert"));
@@ -77363,9 +77371,9 @@ function transformViteConfig(ctx) {
77363
77371
  if (callee.name !== "defineConfig") {
77364
77372
  return this.traverse(n);
77365
77373
  }
77366
- const config38 = n.node.arguments[0];
77367
- (0, import_assert2.default)(t.ObjectExpression.check(config38));
77368
- const pluginsProp = config38.properties.find((prop) => isPluginsProp(prop));
77374
+ const config39 = n.node.arguments[0];
77375
+ (0, import_assert2.default)(t.ObjectExpression.check(config39));
77376
+ const pluginsProp = config39.properties.find((prop) => isPluginsProp(prop));
77369
77377
  (0, import_assert2.default)(pluginsProp && t.ArrayExpression.check(pluginsProp.value));
77370
77378
  pluginsProp.value.elements.push(
77371
77379
  b2.callExpression(b2.identifier("cloudflare"), [])
@@ -77422,7 +77430,7 @@ async function getVariant() {
77422
77430
  (0, import_assert2.default)(selected, "Expected a variant to be selected");
77423
77431
  return selected;
77424
77432
  }
77425
- var config26 = {
77433
+ var config27 = {
77426
77434
  configVersion: 1,
77427
77435
  id: "react",
77428
77436
  frameworkCli: "create-vite",
@@ -77452,14 +77460,14 @@ var config26 = {
77452
77460
  deployScript: "deploy",
77453
77461
  previewScript: "preview"
77454
77462
  };
77455
- var c3_default35 = config26;
77463
+ var c3_default36 = config27;
77456
77464
 
77457
77465
  // templates/react/c3.ts
77458
- var config27 = {
77466
+ var config28 = {
77459
77467
  displayName: "React",
77460
- platformVariants: { pages: c3_default34, workers: c3_default35 }
77468
+ platformVariants: { pages: c3_default35, workers: c3_default36 }
77461
77469
  };
77462
- var c3_default36 = config27;
77470
+ var c3_default37 = config28;
77463
77471
 
77464
77472
  // templates/remix/pages/c3.ts
77465
77473
  var { npm: npm16 } = detectPackageManager();
@@ -77486,7 +77494,7 @@ var configure14 = async () => {
77486
77494
  });
77487
77495
  s.stop(`${brandColor("updated")} \`${dim(typeDefsPath)}\``);
77488
77496
  };
77489
- var config28 = {
77497
+ var config29 = {
77490
77498
  configVersion: 1,
77491
77499
  id: "remix",
77492
77500
  frameworkCli: "create-remix",
@@ -77509,7 +77517,7 @@ var config28 = {
77509
77517
  deployScript: "deploy",
77510
77518
  previewScript: "preview"
77511
77519
  };
77512
- var c3_default37 = config28;
77520
+ var c3_default38 = config29;
77513
77521
 
77514
77522
  // templates/remix/workers/c3.ts
77515
77523
  var { npm: npm17 } = detectPackageManager();
@@ -77528,7 +77536,7 @@ var configure15 = async () => {
77528
77536
  doneText: `${brandColor(`updated`)} ${dim("wrangler@latest")}`
77529
77537
  });
77530
77538
  };
77531
- var config29 = {
77539
+ var config30 = {
77532
77540
  configVersion: 1,
77533
77541
  id: "remix",
77534
77542
  frameworkCli: "create-remix",
@@ -77551,17 +77559,17 @@ var config29 = {
77551
77559
  deployScript: "deploy",
77552
77560
  previewScript: "preview"
77553
77561
  };
77554
- var c3_default38 = config29;
77562
+ var c3_default39 = config30;
77555
77563
 
77556
77564
  // templates/remix/c3.ts
77557
- var config30 = {
77565
+ var config31 = {
77558
77566
  displayName: "Remix",
77559
- platformVariants: { pages: c3_default37, workers: c3_default38 }
77567
+ platformVariants: { pages: c3_default38, workers: c3_default39 }
77560
77568
  };
77561
- var c3_default39 = config30;
77569
+ var c3_default40 = config31;
77562
77570
 
77563
77571
  // templates/scheduled/c3.ts
77564
- var c3_default40 = {
77572
+ var c3_default41 = {
77565
77573
  configVersion: 1,
77566
77574
  id: "scheduled",
77567
77575
  displayName: "Scheduled Worker (Cron Trigger)",
@@ -77624,7 +77632,7 @@ var configure16 = async (ctx) => {
77624
77632
  }
77625
77633
  });
77626
77634
  };
77627
- var config31 = {
77635
+ var config32 = {
77628
77636
  configVersion: 1,
77629
77637
  id: "solid",
77630
77638
  frameworkCli: "create-solid",
@@ -77646,7 +77654,7 @@ var config31 = {
77646
77654
  deployScript: "deploy",
77647
77655
  previewScript: "preview"
77648
77656
  };
77649
- var c3_default41 = config31;
77657
+ var c3_default42 = config32;
77650
77658
 
77651
77659
  // templates/svelte/pages/c3.ts
77652
77660
  var import_node_fs3 = require("node:fs");
@@ -77739,7 +77747,7 @@ var updateTypeDefinitions = (ctx) => {
77739
77747
  }
77740
77748
  });
77741
77749
  };
77742
- var config32 = {
77750
+ var config33 = {
77743
77751
  configVersion: 1,
77744
77752
  id: "svelte",
77745
77753
  frameworkCli: "sv",
@@ -77769,7 +77777,7 @@ var config32 = {
77769
77777
  deployScript: "deploy",
77770
77778
  previewScript: "preview"
77771
77779
  };
77772
- var c3_default42 = config32;
77780
+ var c3_default43 = config33;
77773
77781
 
77774
77782
  // templates/svelte/workers/c3.ts
77775
77783
  var import_node_os4 = require("node:os");
@@ -77838,7 +77846,7 @@ var updateTypeDefinitions2 = (ctx) => {
77838
77846
  }
77839
77847
  });
77840
77848
  };
77841
- var config33 = {
77849
+ var config34 = {
77842
77850
  configVersion: 1,
77843
77851
  id: "svelte",
77844
77852
  frameworkCli: "sv",
@@ -77868,21 +77876,21 @@ var config33 = {
77868
77876
  deployScript: "deploy",
77869
77877
  previewScript: "preview"
77870
77878
  };
77871
- var c3_default43 = config33;
77879
+ var c3_default44 = config34;
77872
77880
 
77873
77881
  // templates/svelte/c3.ts
77874
- var config34 = {
77882
+ var config35 = {
77875
77883
  displayName: "SvelteKit",
77876
- platformVariants: { pages: c3_default42, workers: c3_default43 }
77884
+ platformVariants: { pages: c3_default43, workers: c3_default44 }
77877
77885
  };
77878
- var c3_default44 = config34;
77886
+ var c3_default45 = config35;
77879
77887
 
77880
77888
  // templates/vue/pages/c3.ts
77881
77889
  var { npm: npm21 } = detectPackageManager();
77882
77890
  var generate26 = async (ctx) => {
77883
77891
  await runFrameworkGenerator(ctx, [ctx.project.name]);
77884
77892
  };
77885
- var config35 = {
77893
+ var config36 = {
77886
77894
  configVersion: 1,
77887
77895
  id: "vue",
77888
77896
  frameworkCli: "create-vue",
@@ -77900,7 +77908,7 @@ var config35 = {
77900
77908
  deployScript: "deploy",
77901
77909
  previewScript: "preview"
77902
77910
  };
77903
- var c3_default45 = config35;
77911
+ var c3_default46 = config36;
77904
77912
 
77905
77913
  // templates/vue/workers/c3.ts
77906
77914
  var { npm: npm22 } = detectPackageManager();
@@ -77942,7 +77950,7 @@ function updateTsconfigJson2() {
77942
77950
  writeJSON("tsconfig.json", tsconfig);
77943
77951
  s.stop(`${brandColor(`updated`)} ${dim(`\`tsconfig.json\``)}`);
77944
77952
  }
77945
- var config36 = {
77953
+ var config37 = {
77946
77954
  configVersion: 1,
77947
77955
  id: "vue",
77948
77956
  frameworkCli: "create-vue",
@@ -77975,20 +77983,20 @@ var config36 = {
77975
77983
  deployScript: "deploy",
77976
77984
  previewScript: "preview"
77977
77985
  };
77978
- var c3_default46 = config36;
77986
+ var c3_default47 = config37;
77979
77987
 
77980
77988
  // templates/vue/c3.ts
77981
- var config37 = {
77989
+ var config38 = {
77982
77990
  displayName: "Vue",
77983
- platformVariants: { pages: c3_default45, workers: c3_default46 }
77991
+ platformVariants: { pages: c3_default46, workers: c3_default47 }
77984
77992
  };
77985
- var c3_default47 = config37;
77993
+ var c3_default48 = config38;
77986
77994
 
77987
77995
  // src/git.ts
77988
77996
  var import_node_assert = __toESM(require("node:assert"));
77989
77997
 
77990
77998
  // ../wrangler/package.json
77991
- var version2 = "4.3.0";
77999
+ var version2 = "4.4.0";
77992
78000
 
77993
78001
  // src/git.ts
77994
78002
  var offerGit = async (ctx) => {
@@ -78250,25 +78258,24 @@ function getFrameworkMap({ experimental = false }) {
78250
78258
  if (experimental) {
78251
78259
  return {
78252
78260
  next: c3_default,
78253
- qwik: c3_default2,
78254
- solid: c3_default3
78261
+ solid: c3_default2
78255
78262
  };
78256
78263
  } else {
78257
78264
  return {
78258
- analog: c3_default4,
78259
- angular: c3_default7,
78260
- astro: c3_default10,
78261
- docusaurus: c3_default14,
78262
- gatsby: c3_default17,
78263
- hono: c3_default25,
78264
- next: c3_default26,
78265
- nuxt: c3_default29,
78266
- qwik: c3_default33,
78267
- react: c3_default36,
78268
- remix: c3_default39,
78269
- solid: c3_default41,
78270
- svelte: c3_default44,
78271
- vue: c3_default47
78265
+ analog: c3_default3,
78266
+ angular: c3_default6,
78267
+ astro: c3_default9,
78268
+ docusaurus: c3_default13,
78269
+ gatsby: c3_default16,
78270
+ hono: c3_default24,
78271
+ next: c3_default25,
78272
+ nuxt: c3_default28,
78273
+ qwik: c3_default34,
78274
+ react: c3_default37,
78275
+ remix: c3_default40,
78276
+ solid: c3_default42,
78277
+ svelte: c3_default45,
78278
+ vue: c3_default48
78272
78279
  };
78273
78280
  }
78274
78281
  }
@@ -78277,16 +78284,16 @@ function getTemplateMap({ experimental = false }) {
78277
78284
  return {};
78278
78285
  } else {
78279
78286
  return {
78280
- "hello-world": c3_default22,
78281
- "hello-world-assets-only": c3_default18,
78282
- "hello-world-with-assets": c3_default21,
78283
- "hello-world-durable-object": c3_default20,
78284
- "hello-world-durable-object-with-assets": c3_default19,
78285
- common: c3_default11,
78286
- scheduled: c3_default40,
78287
- queues: c3_default32,
78288
- openapi: c3_default30,
78289
- "pre-existing": c3_default31
78287
+ "hello-world": c3_default21,
78288
+ "hello-world-assets-only": c3_default17,
78289
+ "hello-world-with-assets": c3_default20,
78290
+ "hello-world-durable-object": c3_default19,
78291
+ "hello-world-durable-object-with-assets": c3_default18,
78292
+ common: c3_default10,
78293
+ scheduled: c3_default41,
78294
+ queues: c3_default31,
78295
+ openapi: c3_default29,
78296
+ "pre-existing": c3_default30
78290
78297
  };
78291
78298
  }
78292
78299
  }
@@ -78434,8 +78441,8 @@ var createContext = async (args, prevArgs) => {
78434
78441
  experimental: args.experimental
78435
78442
  });
78436
78443
  const frameworkOptions = Object.entries(frameworkMap).map(
78437
- ([key, config38]) => ({
78438
- label: config38.displayName,
78444
+ ([key, config39]) => ({
78445
+ label: config39.displayName,
78439
78446
  value: key
78440
78447
  })
78441
78448
  );
@@ -78602,28 +78609,28 @@ var processRemoteTemplate = async (args) => {
78602
78609
  src = src.replace("https://github.com/", "github:").replace("/tree/main/", "/");
78603
78610
  }
78604
78611
  const path6 = await downloadRemoteTemplate(src);
78605
- const config38 = inferTemplateConfig(path6);
78606
- validateTemplate(path6, config38);
78612
+ const config39 = inferTemplateConfig(path6);
78613
+ validateTemplate(path6, config39);
78607
78614
  updateStatus(`${brandColor("template")} ${dim("cloned and validated")}`);
78608
78615
  return {
78609
78616
  path: path6,
78610
- ...config38
78617
+ ...config39
78611
78618
  };
78612
78619
  };
78613
- var validateTemplate = (path6, config38) => {
78614
- if (!config38.copyFiles) {
78620
+ var validateTemplate = (path6, config39) => {
78621
+ if (!config39.copyFiles) {
78615
78622
  return;
78616
78623
  }
78617
- if (isVariantInfo(config38.copyFiles)) {
78618
- validateTemplateSrcDirectory((0, import_path13.resolve)(path6, config38.copyFiles.path), config38);
78624
+ if (isVariantInfo(config39.copyFiles)) {
78625
+ validateTemplateSrcDirectory((0, import_path13.resolve)(path6, config39.copyFiles.path), config39);
78619
78626
  } else {
78620
- for (const variant of Object.values(config38.copyFiles.variants)) {
78621
- validateTemplateSrcDirectory((0, import_path13.resolve)(path6, variant.path), config38);
78627
+ for (const variant of Object.values(config39.copyFiles.variants)) {
78628
+ validateTemplateSrcDirectory((0, import_path13.resolve)(path6, variant.path), config39);
78622
78629
  }
78623
78630
  }
78624
78631
  };
78625
- var validateTemplateSrcDirectory = (path6, config38) => {
78626
- if (config38.platform === "workers") {
78632
+ var validateTemplateSrcDirectory = (path6, config39) => {
78633
+ if (config39.platform === "workers") {
78627
78634
  const wranglerTomlPath = (0, import_path13.resolve)(path6, "wrangler.toml");
78628
78635
  const wranglerJsonPath = (0, import_path13.resolve)(path6, "wrangler.json");
78629
78636
  const wranglerJsoncPath = (0, import_path13.resolve)(path6, "wrangler.jsonc");
@@ -80534,20 +80541,20 @@ function applyEdits(text, edits) {
80534
80541
  var import_fs12 = require("fs");
80535
80542
  var import_path14 = require("path");
80536
80543
  var import_toml2 = __toESM(require_toml());
80537
- function ensureNameExists(config38, projectName) {
80538
- config38["name"] = projectName;
80539
- return config38;
80544
+ function ensureNameExists(config39, projectName) {
80545
+ config39["name"] = projectName;
80546
+ return config39;
80540
80547
  }
80541
- async function ensureCompatDateExists(config38) {
80542
- if (typeof config38["compatibility_date"] === "string") {
80548
+ async function ensureCompatDateExists(config39) {
80549
+ if (typeof config39["compatibility_date"] === "string") {
80543
80550
  const validCompatDateRe = /^\d{4}-\d{2}-\d{2}/m;
80544
- if (!config38["compatibility_date"].match(validCompatDateRe)) {
80545
- config38["compatibility_date"] = await getWorkerdCompatibilityDate();
80551
+ if (!config39["compatibility_date"].match(validCompatDateRe)) {
80552
+ config39["compatibility_date"] = await getWorkerdCompatibilityDate();
80546
80553
  }
80547
80554
  } else {
80548
- config38["compatibility_date"] = await getWorkerdCompatibilityDate();
80555
+ config39["compatibility_date"] = await getWorkerdCompatibilityDate();
80549
80556
  }
80550
- return config38;
80557
+ return config39;
80551
80558
  }
80552
80559
  var updateWranglerConfig = async (ctx) => {
80553
80560
  if (wranglerJsonExists(ctx)) {
@@ -81261,8 +81268,8 @@ var renderValues = (values) => {
81261
81268
  };
81262
81269
 
81263
81270
  // src/helpers/retry.ts
81264
- var retry = async (config38, fn) => {
81265
- let { times } = config38;
81271
+ var retry = async (config39, fn) => {
81272
+ let { times } = config39;
81266
81273
  let error2 = null;
81267
81274
  while (times > 0) {
81268
81275
  try {
@@ -81270,10 +81277,10 @@ var retry = async (config38, fn) => {
81270
81277
  } catch (e) {
81271
81278
  error2 = e;
81272
81279
  times--;
81273
- if (config38.exitCondition?.(e)) {
81280
+ if (config39.exitCondition?.(e)) {
81274
81281
  break;
81275
81282
  }
81276
- await sleep(config38.sleepMs ?? 1e3);
81283
+ await sleep(config39.sleepMs ?? 1e3);
81277
81284
  }
81278
81285
  }
81279
81286
  throw error2;
@@ -81393,8 +81400,8 @@ async function addWorkersTypesToTsConfig(ctx) {
81393
81400
  }
81394
81401
  const typesEntrypoint = `@cloudflare/workers-types/${entrypointVersion}`;
81395
81402
  try {
81396
- const config38 = parse4(tsconfig);
81397
- const currentTypes = config38.compilerOptions?.types ?? [];
81403
+ const config39 = parse4(tsconfig);
81404
+ const currentTypes = config39.compilerOptions?.types ?? [];
81398
81405
  const explicitEntrypoint = currentTypes.some(
81399
81406
  (t2) => t2.match(/@cloudflare\/workers-types\/\d{4}-\d{2}-\d{2}/)
81400
81407
  );