create-cloudflare 0.0.0-d3c687ba6 → 0.0.0-d42966125

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 config36(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 config36 = 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: config36, 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 config36 = 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: config36, 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 config36 = 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: config36, 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 config36 = (0, _lodash["default"])(options, this.config);
31513
+ if (config36.tokenHex === true) {
31514
+ config36.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 (!config36.tokenLength) config36.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 < config36.tokenLength; i++) {
31521
+ token += this._randomElement(config36.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(config36.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, config36) {
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 = config36 ? typeof config36.tolerant === "boolean" && config36.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 = config36 ? typeof config36.comment === "boolean" && config36.comment : false;
40044
+ this.trackRange = config36 ? typeof config36.range === "boolean" && config36.range : false;
40045
+ this.trackLoc = config36 ? typeof config36.loc === "boolean" && config36.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(config36) {
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 = config36 && config36.tabWidth;
49809
+ config36 = options_1.normalize(config36);
49810
+ config36.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 = config36.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
+ config36.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, config36, options, makePrintFunctionWith(options, {
49844
49844
  includeComments: true,
49845
49845
  avoidRootParens: false
49846
49846
  }));
49847
- config38.tabWidth = oldTabWidth;
49847
+ config36.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(config36), util.composeSourceMaps(config36.inputSourceMap, lines.getSourceMap(config36.sourceMapName, config36.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, config36, {
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 = config36.reuseWhitespace;
49874
+ config36.reuseWhitespace = false;
49875
+ var pr = new PrintResult(printGenerically(path6).toString(config36));
49876
+ config36.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, config36, 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, config36, 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 = (config36, value) => {
69384
+ const { question, label } = config36;
69385
+ if (config36.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 = config36.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 = (config36) => {
69392
+ switch (config36.type) {
69393
69393
  case "select":
69394
- return getSelectRenderers(config38);
69394
+ return getSelectRenderers(config36);
69395
69395
  case "confirm":
69396
- return getConfirmRenderers(config38);
69396
+ return getConfirmRenderers(config36);
69397
69397
  case "text":
69398
- return getTextRenderers(config38);
69398
+ return getTextRenderers(config36);
69399
69399
  case "multiselect":
69400
- return getSelectRenderers(config38);
69400
+ return getSelectRenderers(config36);
69401
69401
  case "list":
69402
- return getSelectListRenderers(config38);
69402
+ return getSelectListRenderers(config36);
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 = (config36) => {
69406
+ const { question } = config36;
69407
+ const helpText = config36.helpText ?? "";
69408
+ const format5 = config36.format ?? ((val) => String(val));
69409
+ const defaultValue = config36.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(config36, format5(value ?? "")),
69433
69433
  cancel: activeRenderer
69434
69434
  };
69435
69435
  };
69436
- var getSelectRenderers = (config38) => {
69437
- const { options, question, helpText: _helpText } = config38;
69436
+ var getSelectRenderers = (config36) => {
69437
+ const { options, question, helpText: _helpText } = config36;
69438
69438
  const helpText = _helpText ?? "";
69439
- const maxItemsPerPage = config38.maxItemsPerPage ?? 32;
69439
+ const maxItemsPerPage = config36.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
+ config36,
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
+ config36,
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 = (config36) => {
69527
+ const { question, helpText: _helpText } = config36;
69528
+ let options = config36.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
+ config36,
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
+ config36,
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 = (config36) => {
69622
+ const { activeText, inactiveText, question, helpText: _helpText } = config36;
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(config36, 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 config36 = 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
+ config36 = resolveConfig(resolvedConfigPath);
70613
70613
  } catch (e) {
70614
- config38 = e;
70614
+ config36 = e;
70615
70615
  }
70616
- if (config38 instanceof Error) {
70617
- error2 = config38;
70616
+ if (config36 instanceof Error) {
70617
+ error2 = config36;
70618
70618
  return;
70619
70619
  }
70620
70620
  } else {
70621
- config38 = mixin2.require(resolvedConfigPath);
70621
+ config36 = mixin2.require(resolvedConfigPath);
70622
70622
  }
70623
- setConfigObject(config38);
70623
+ setConfigObject(config36);
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(config36, prev) {
70634
+ Object.keys(config36).forEach(function(key) {
70635
+ const value = config36[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 config36 = 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: config36
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(config36, 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(config36, "extends")) {
73018
+ if (typeof config36.extends !== "string")
73019
73019
  return defaultConfig;
73020
- const isPath = /\.json|\..*rc$/.test(config38.extends);
73020
+ const isPath = /\.json|\..*rc$/.test(config36.extends);
73021
73021
  let pathToDefault = null;
73022
73022
  if (!isPath) {
73023
73023
  try {
73024
- pathToDefault = require.resolve(config38.extends);
73024
+ pathToDefault = require.resolve(config36.extends);
73025
73025
  } catch (_err) {
73026
- return config38;
73026
+ return config36;
73027
73027
  }
73028
73028
  } else {
73029
- pathToDefault = getPathToDefaultConfig(cwd, config38.extends);
73029
+ pathToDefault = getPathToDefaultConfig(cwd, config36.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(config36.extends);
73034
+ delete config36.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, config36) : Object.assign({}, defaultConfig, config36);
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(config36) {
73815
+ argsert("<object>", [config36], arguments.length);
73816
+ __classPrivateFieldSet(this, _YargsInstance_parserConfig, config36, "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(config36) {
73989
+ argsert("<object>", [config36], arguments.length);
73990
+ __classPrivateFieldSet(this, _YargsInstance_usageConfig, config36, "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 config36 = 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, ...config36 }
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 = "0.0.0-d3c687ba6";
74563
+ var version = "0.0.0-d42966125";
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(config36) {
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
+ config36,
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 config36 = (0, import_node_fs2.readFileSync)(getMetricsConfigPath(), "utf8");
74621
74621
  return JSON.parse(
74622
- config38,
74622
+ config36,
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(config36) {
74633
+ const deviceId = config36.deviceId ?? (0, import_node_crypto.randomUUID)();
74634
+ if (config36.deviceId === void 0) {
74635
+ writeMetricsConfig({ ...config36, 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 config36 = readMetricsConfig() ?? {};
74911
+ const isFirstUsage = config36.c3permission === void 0;
74912
74912
  const isEnabled = isTelemetryEnabled();
74913
- const deviceId = getDeviceId(config38);
74913
+ const deviceId = getDeviceId(config36);
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(config36).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(config36 = readMetricsConfig() ?? {}) {
75053
+ if (!config36.c3permission) {
75054
+ config36.c3permission = initializeC3Permission();
75055
+ writeMetricsConfig(config36);
75056
75056
  }
75057
- return config38.c3permission;
75057
+ return config36.c3permission;
75058
75058
  }
75059
75059
  function updateC3Pemission(enabled) {
75060
- const config38 = readMetricsConfig();
75061
- if (config38.c3permission?.enabled === enabled) {
75060
+ const config36 = readMetricsConfig();
75061
+ if (config36.c3permission?.enabled === enabled) {
75062
75062
  return;
75063
75063
  }
75064
- config38.c3permission = initializeC3Permission(enabled);
75065
- writeMetricsConfig(config38);
75064
+ config36.c3permission = initializeC3Permission(enabled);
75065
+ writeMetricsConfig(config36);
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, config36 = {}) => {
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 = config36.dev ? "-D" : "";
75118
75118
  break;
75119
75119
  case "bun":
75120
75120
  cmd = "add";
75121
- saveFlag = config38.dev ? "-d" : "";
75121
+ saveFlag = config36.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 = config36.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
+ ...config36,
75143
75143
  silent: true
75144
75144
  }
75145
75145
  );
@@ -75378,8 +75378,45 @@ var runFrameworkGenerator = async (ctx, args) => {
75378
75378
  await runCommand(cmd, { env: env3 });
75379
75379
  };
75380
75380
 
75381
- // templates-experimental/next/c3.ts
75381
+ // templates-experimental/hono/c3.ts
75382
75382
  var generate = async (ctx) => {
75383
+ const { name: pm4 } = detectPackageManager();
75384
+ await runFrameworkGenerator(ctx, [
75385
+ ctx.project.name,
75386
+ "--template",
75387
+ "cloudflare-workers",
75388
+ "--install",
75389
+ "--pm",
75390
+ pm4
75391
+ ]);
75392
+ logRaw("");
75393
+ };
75394
+ var config = {
75395
+ configVersion: 1,
75396
+ id: "hono",
75397
+ frameworkCli: "create-hono",
75398
+ displayName: "Hono",
75399
+ copyFiles: {
75400
+ path: "./templates"
75401
+ },
75402
+ platform: "workers",
75403
+ path: "templates-experimental/hono",
75404
+ generate,
75405
+ transformPackageJson: async () => ({
75406
+ scripts: {
75407
+ dev: "wrangler dev",
75408
+ deploy: "wrangler deploy --minify",
75409
+ "cf-typegen": "wrangler types --env-interface CloudflareBindings"
75410
+ }
75411
+ }),
75412
+ devScript: "dev",
75413
+ deployScript: "deploy",
75414
+ previewScript: "dev"
75415
+ };
75416
+ var c3_default = config;
75417
+
75418
+ // templates-experimental/next/c3.ts
75419
+ var generate2 = async (ctx) => {
75383
75420
  await runFrameworkGenerator(ctx, [ctx.project.name]);
75384
75421
  };
75385
75422
  var configure = async (ctx) => {
@@ -75408,7 +75445,7 @@ var updateNextConfig = (usesTs) => {
75408
75445
  writeFile2(configFile, updatedConfigFile);
75409
75446
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
75410
75447
  };
75411
- var c3_default = {
75448
+ var c3_default2 = {
75412
75449
  configVersion: 1,
75413
75450
  id: "next",
75414
75451
  frameworkCli: "create-next-app",
@@ -75420,7 +75457,7 @@ var c3_default = {
75420
75457
  copyFiles: {
75421
75458
  path: "./templates"
75422
75459
  },
75423
- generate,
75460
+ generate: generate2,
75424
75461
  configure,
75425
75462
  transformPackageJson: async () => ({
75426
75463
  scripts: {
@@ -75513,7 +75550,7 @@ var getPropertyName = (newProp) => {
75513
75550
  // templates-experimental/qwik/c3.ts
75514
75551
  var recast2 = __toESM(require_main3());
75515
75552
  var { npm, npx, name } = detectPackageManager();
75516
- var generate2 = async (ctx) => {
75553
+ var generate3 = async (ctx) => {
75517
75554
  await runFrameworkGenerator(ctx, ["playground", ctx.project.name]);
75518
75555
  };
75519
75556
  var configure2 = async (ctx) => {
@@ -75596,7 +75633,7 @@ var populateCloudflareEnv = () => {
75596
75633
  });
75597
75634
  s.stop(`${brandColor("updated")} \`${entrypointPath}\``);
75598
75635
  };
75599
- var config = {
75636
+ var config2 = {
75600
75637
  configVersion: 1,
75601
75638
  id: "qwik",
75602
75639
  frameworkCli: "create-qwik",
@@ -75606,7 +75643,7 @@ var config = {
75606
75643
  path: "./templates"
75607
75644
  },
75608
75645
  path: "templates-experimental/qwik",
75609
- generate: generate2,
75646
+ generate: generate3,
75610
75647
  configure: configure2,
75611
75648
  transformPackageJson: async () => ({
75612
75649
  scripts: {
@@ -75619,7 +75656,7 @@ var config = {
75619
75656
  deployScript: "deploy",
75620
75657
  previewScript: "preview"
75621
75658
  };
75622
- var c3_default2 = config;
75659
+ var c3_default3 = config2;
75623
75660
 
75624
75661
  // src/helpers/compatDate.ts
75625
75662
  var import_fs9 = require("fs");
@@ -75676,7 +75713,7 @@ function getLatestTypesEntrypoint(ctx) {
75676
75713
  // templates-experimental/solid/c3.ts
75677
75714
  var recast3 = __toESM(require_main3());
75678
75715
  var { npm: npm2 } = detectPackageManager();
75679
- var generate3 = async (ctx) => {
75716
+ var generate4 = async (ctx) => {
75680
75717
  await runFrameworkGenerator(ctx, ["-p", ctx.project.name, "-s"]);
75681
75718
  logRaw("");
75682
75719
  };
@@ -75721,7 +75758,7 @@ var configure3 = async (ctx) => {
75721
75758
  }
75722
75759
  });
75723
75760
  };
75724
- var config2 = {
75761
+ var config3 = {
75725
75762
  configVersion: 1,
75726
75763
  id: "solid",
75727
75764
  frameworkCli: "create-solid",
@@ -75731,7 +75768,7 @@ var config2 = {
75731
75768
  path: "./templates"
75732
75769
  },
75733
75770
  path: "templates-experimental/solid",
75734
- generate: generate3,
75771
+ generate: generate4,
75735
75772
  configure: configure3,
75736
75773
  transformPackageJson: async () => ({
75737
75774
  scripts: {
@@ -75744,12 +75781,111 @@ var config2 = {
75744
75781
  deployScript: "deploy",
75745
75782
  previewScript: "preview"
75746
75783
  };
75747
- var c3_default3 = config2;
75784
+ var c3_default4 = config3;
75748
75785
 
75749
- // templates/analog/c3.ts
75786
+ // templates-experimental/svelte/c3.ts
75787
+ var import_node_os3 = require("node:os");
75750
75788
  var recast4 = __toESM(require_main3());
75751
- var { npm: npm3, name: pm } = detectPackageManager();
75752
- var generate4 = async (ctx) => {
75789
+ var { npm: npm3 } = detectPackageManager();
75790
+ var generate5 = async (ctx) => {
75791
+ await runFrameworkGenerator(ctx, ["create", ctx.project.name]);
75792
+ logRaw("");
75793
+ };
75794
+ var configure4 = async (ctx) => {
75795
+ const pkg = `@sveltejs/adapter-cloudflare`;
75796
+ await installPackages([pkg], {
75797
+ dev: true,
75798
+ startText: "Adding the Cloudflare Pages adapter",
75799
+ doneText: `${brandColor(`installed`)} ${dim(pkg)}`
75800
+ });
75801
+ updateSvelteConfig();
75802
+ updateTypeDefinitions(ctx);
75803
+ };
75804
+ var updateSvelteConfig = () => {
75805
+ updateStatus(`Changing adapter in ${blue("svelte.config.js")}`);
75806
+ transformFile("svelte.config.js", {
75807
+ visitImportDeclaration: function(n) {
75808
+ const importSource = n.value.source;
75809
+ if (importSource.value === "@sveltejs/adapter-auto") {
75810
+ importSource.value = "@sveltejs/adapter-cloudflare";
75811
+ }
75812
+ return false;
75813
+ }
75814
+ });
75815
+ };
75816
+ var updateTypeDefinitions = (ctx) => {
75817
+ if (!usesTypescript(ctx)) {
75818
+ return;
75819
+ }
75820
+ updateStatus(`Updating global type definitions in ${blue("app.d.ts")}`);
75821
+ const b3 = recast4.types.builders;
75822
+ transformFile("src/app.d.ts", {
75823
+ visitTSModuleDeclaration(n) {
75824
+ if (n.value.id.name === "App" && n.node.body) {
75825
+ const moduleBlock = n.node.body;
75826
+ const platformInterface = b3.tsInterfaceDeclaration(
75827
+ b3.identifier("Platform"),
75828
+ b3.tsInterfaceBody([
75829
+ b3.tsPropertySignature(
75830
+ b3.identifier("env"),
75831
+ b3.tsTypeAnnotation(b3.tsTypeReference(b3.identifier("Env")))
75832
+ ),
75833
+ b3.tsPropertySignature(
75834
+ b3.identifier("cf"),
75835
+ b3.tsTypeAnnotation(
75836
+ b3.tsTypeReference(b3.identifier("CfProperties"))
75837
+ )
75838
+ ),
75839
+ b3.tsPropertySignature(
75840
+ b3.identifier("ctx"),
75841
+ b3.tsTypeAnnotation(
75842
+ b3.tsTypeReference(b3.identifier("ExecutionContext"))
75843
+ )
75844
+ )
75845
+ ])
75846
+ );
75847
+ moduleBlock.body.unshift(platformInterface);
75848
+ }
75849
+ this.traverse(n);
75850
+ }
75851
+ });
75852
+ };
75853
+ var config4 = {
75854
+ configVersion: 1,
75855
+ id: "svelte",
75856
+ frameworkCli: "sv",
75857
+ displayName: "SvelteKit",
75858
+ platform: "workers",
75859
+ copyFiles: {
75860
+ path: "./templates"
75861
+ },
75862
+ path: "templates-experimental/svelte",
75863
+ generate: generate5,
75864
+ configure: configure4,
75865
+ transformPackageJson: async (original, ctx) => {
75866
+ let scripts = {
75867
+ preview: `${npm3} run build && wrangler dev`,
75868
+ deploy: `${npm3} run build && wrangler deploy`
75869
+ };
75870
+ if (usesTypescript(ctx)) {
75871
+ const mv = (0, import_node_os3.platform)() === "win32" ? "move" : "mv";
75872
+ scripts = {
75873
+ ...scripts,
75874
+ "cf-typegen": `wrangler types && ${mv} worker-configuration.d.ts src/`
75875
+ };
75876
+ }
75877
+ return { scripts };
75878
+ },
75879
+ devScript: "dev",
75880
+ deployScript: "deploy",
75881
+ previewScript: "preview"
75882
+ };
75883
+ var c3_default5 = config4;
75884
+
75885
+ // templates/analog/c3.ts
75886
+ var recast5 = __toESM(require_main3());
75887
+ var { npm: npm4, name: pm } = detectPackageManager();
75888
+ var generate6 = async (ctx) => {
75753
75889
  await runFrameworkGenerator(ctx, [
75754
75890
  ctx.project.name,
75755
75891
  "--template",
@@ -75757,7 +75893,7 @@ var generate4 = async (ctx) => {
75757
75893
  ]);
75758
75894
  logRaw("");
75759
75895
  };
75760
- var configure4 = async (ctx) => {
75896
+ var configure5 = async (ctx) => {
75761
75897
  if (pm === "pnpm" || pm === "yarn" || pm === "bun") {
75762
75898
  const packages = [];
75763
75899
  packages.push("nitropack");
@@ -75767,7 +75903,7 @@ var configure4 = async (ctx) => {
75767
75903
  await installPackages(packages, {
75768
75904
  dev: true,
75769
75905
  startText: `Installing ${packages.join(", ")}`,
75770
- doneText: `${brandColor("installed")} ${dim(`via \`${npm3} install\``)}`
75906
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm4} install\``)}`
75771
75907
  });
75772
75908
  }
75773
75909
  updateViteConfig(ctx);
@@ -75788,7 +75924,7 @@ var updateEnvTypes = (ctx) => {
75788
75924
  s.stop(`${brandColor(`updated`)} ${dim(`\`${filepath}\``)}`);
75789
75925
  };
75790
75926
  var updateViteConfig = (ctx) => {
75791
- const b3 = recast4.types.builders;
75927
+ const b3 = recast5.types.builders;
75792
75928
  const s = spinner();
75793
75929
  const configFile = "vite.config.ts";
75794
75930
  s.start(`Updating \`${configFile}\``);
@@ -75825,7 +75961,7 @@ var updateViteConfig = (ctx) => {
75825
75961
  });
75826
75962
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
75827
75963
  };
75828
- var config3 = {
75964
+ var config5 = {
75829
75965
  configVersion: 1,
75830
75966
  id: "analog",
75831
75967
  frameworkCli: "create-analog",
@@ -75834,12 +75970,12 @@ var config3 = {
75834
75970
  copyFiles: {
75835
75971
  path: "./templates"
75836
75972
  },
75837
- generate: generate4,
75838
- configure: configure4,
75973
+ generate: generate6,
75974
+ configure: configure5,
75839
75975
  transformPackageJson: async () => ({
75840
75976
  scripts: {
75841
- preview: `${npm3} run build && wrangler pages dev`,
75842
- deploy: `${npm3} run build && wrangler pages deploy`,
75977
+ preview: `${npm4} run build && wrangler pages dev`,
75978
+ deploy: `${npm4} run build && wrangler pages deploy`,
75843
75979
  "cf-typegen": `wrangler types`
75844
75980
  }
75845
75981
  }),
@@ -75847,12 +75983,12 @@ var config3 = {
75847
75983
  deployScript: "deploy",
75848
75984
  previewScript: "preview"
75849
75985
  };
75850
- var c3_default4 = config3;
75986
+ var c3_default6 = config5;
75851
75987
 
75852
75988
  // templates/angular/pages/c3.ts
75853
75989
  var import_node_path3 = require("node:path");
75854
- var { npm: npm4 } = detectPackageManager();
75855
- var generate5 = async (ctx) => {
75990
+ var { npm: npm5 } = detectPackageManager();
75991
+ var generate7 = async (ctx) => {
75856
75992
  await runFrameworkGenerator(ctx, [
75857
75993
  ctx.project.name,
75858
75994
  "--ssr",
@@ -75860,7 +75996,7 @@ var generate5 = async (ctx) => {
75860
75996
  ]);
75861
75997
  logRaw("");
75862
75998
  };
75863
- var configure5 = async (ctx) => {
75999
+ var configure6 = async (ctx) => {
75864
76000
  updateAngularJson(ctx);
75865
76001
  await updateAppCode();
75866
76002
  await installCFWorker();
@@ -75869,7 +76005,7 @@ async function installCFWorker() {
75869
76005
  await installPackages(["xhr2"], {
75870
76006
  dev: true,
75871
76007
  startText: "Installing additional dependencies",
75872
- doneText: `${brandColor("installed")} ${dim(`via \`${npm4} install\``)}`
76008
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm5} install\``)}`
75873
76009
  });
75874
76010
  }
75875
76011
  async function updateAppCode() {
@@ -75911,7 +76047,7 @@ function updateAngularJson(ctx) {
75911
76047
  writeFile2((0, import_node_path3.resolve)("angular.json"), JSON.stringify(angularJson, null, 2));
75912
76048
  s.stop(`${brandColor(`updated`)} ${dim(`\`angular.json\``)}`);
75913
76049
  }
75914
- var config4 = {
76050
+ var config6 = {
75915
76051
  configVersion: 1,
75916
76052
  id: "angular",
75917
76053
  frameworkCli: "@angular/create",
@@ -75924,23 +76060,23 @@ var config4 = {
75924
76060
  devScript: "start",
75925
76061
  deployScript: "deploy",
75926
76062
  previewScript: "start",
75927
- generate: generate5,
75928
- configure: configure5,
76063
+ generate: generate7,
76064
+ configure: configure6,
75929
76065
  transformPackageJson: async () => ({
75930
76066
  scripts: {
75931
- start: `${npm4} run build && wrangler pages dev dist/cloudflare ${await compatDateFlag()}`,
75932
- build: `ng build && ${npm4} run process`,
76067
+ start: `${npm5} run build && wrangler pages dev dist/cloudflare ${await compatDateFlag()}`,
76068
+ build: `ng build && ${npm5} run process`,
75933
76069
  process: "node ./tools/copy-files.mjs",
75934
- deploy: `${npm4} run build && wrangler pages deploy dist/cloudflare`
76070
+ deploy: `${npm5} run build && wrangler pages deploy dist/cloudflare`
75935
76071
  }
75936
76072
  })
75937
76073
  };
75938
- var c3_default5 = config4;
76074
+ var c3_default7 = config6;
75939
76075
 
75940
76076
  // templates/angular/workers/c3.ts
75941
76077
  var import_node_path4 = require("node:path");
75942
- var { npm: npm5 } = detectPackageManager();
75943
- var generate6 = async (ctx) => {
76078
+ var { npm: npm6 } = detectPackageManager();
76079
+ var generate8 = async (ctx) => {
75944
76080
  await runFrameworkGenerator(ctx, [
75945
76081
  ctx.project.name,
75946
76082
  "--ssr",
@@ -75948,7 +76084,7 @@ var generate6 = async (ctx) => {
75948
76084
  ]);
75949
76085
  logRaw("");
75950
76086
  };
75951
- var configure6 = async (ctx) => {
76087
+ var configure7 = async (ctx) => {
75952
76088
  updateAngularJson2(ctx);
75953
76089
  await updateAppCode2();
75954
76090
  await installCFWorker2();
@@ -75957,7 +76093,7 @@ async function installCFWorker2() {
75957
76093
  await installPackages(["xhr2"], {
75958
76094
  dev: true,
75959
76095
  startText: "Installing additional dependencies",
75960
- doneText: `${brandColor("installed")} ${dim(`via \`${npm5} install\``)}`
76096
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm6} install\``)}`
75961
76097
  });
75962
76098
  }
75963
76099
  async function updateAppCode2() {
@@ -75998,7 +76134,7 @@ function updateAngularJson2(ctx) {
75998
76134
  writeFile2((0, import_node_path4.resolve)("angular.json"), JSON.stringify(angularJson, null, 2));
75999
76135
  s.stop(`${brandColor(`updated`)} ${dim(`\`angular.json\``)}`);
76000
76136
  }
76001
- var config5 = {
76137
+ var config7 = {
76002
76138
  configVersion: 1,
76003
76139
  id: "angular",
76004
76140
  frameworkCli: "@angular/create",
@@ -76011,33 +76147,33 @@ var config5 = {
76011
76147
  devScript: "start",
76012
76148
  deployScript: "deploy",
76013
76149
  previewScript: "start",
76014
- generate: generate6,
76015
- configure: configure6,
76150
+ generate: generate8,
76151
+ configure: configure7,
76016
76152
  transformPackageJson: async () => ({
76017
76153
  scripts: {
76018
- start: `${npm5} run build && wrangler dev`,
76154
+ start: `${npm6} run build && wrangler dev`,
76019
76155
  build: `ng build`,
76020
- deploy: `${npm5} run build && wrangler deploy`
76156
+ deploy: `${npm6} run build && wrangler deploy`
76021
76157
  }
76022
76158
  })
76023
76159
  };
76024
- var c3_default6 = config5;
76160
+ var c3_default8 = config7;
76025
76161
 
76026
76162
  // templates/angular/c3.ts
76027
- var config6 = {
76163
+ var config8 = {
76028
76164
  displayName: "Angular",
76029
- platformVariants: { pages: c3_default5, workers: c3_default6 }
76165
+ platformVariants: { pages: c3_default7, workers: c3_default8 }
76030
76166
  };
76031
- var c3_default7 = config6;
76167
+ var c3_default9 = config8;
76032
76168
 
76033
76169
  // templates/astro/pages/c3.ts
76034
- var recast5 = __toESM(require_main3());
76170
+ var recast6 = __toESM(require_main3());
76035
76171
  var { npx: npx2 } = detectPackageManager();
76036
- var generate7 = async (ctx) => {
76172
+ var generate9 = async (ctx) => {
76037
76173
  await runFrameworkGenerator(ctx, [ctx.project.name, "--no-install"]);
76038
76174
  logRaw("");
76039
76175
  };
76040
- var configure7 = async () => {
76176
+ var configure8 = async () => {
76041
76177
  await runCommand([npx2, "astro", "add", "cloudflare", "-y"], {
76042
76178
  silent: true,
76043
76179
  startText: "Installing adapter",
@@ -76056,7 +76192,7 @@ var updateAstroConfig = () => {
76056
76192
  if (callee.name !== "cloudflare") {
76057
76193
  return this.traverse(n);
76058
76194
  }
76059
- const b3 = recast5.types.builders;
76195
+ const b3 = recast6.types.builders;
76060
76196
  n.node.arguments = [
76061
76197
  b3.objectExpression([
76062
76198
  b3.objectProperty(
@@ -76071,7 +76207,7 @@ var updateAstroConfig = () => {
76071
76207
  }
76072
76208
  });
76073
76209
  };
76074
- var config7 = {
76210
+ var config9 = {
76075
76211
  configVersion: 1,
76076
76212
  id: "astro",
76077
76213
  frameworkCli: "create-astro",
@@ -76094,8 +76230,8 @@ var config7 = {
76094
76230
  devScript: "dev",
76095
76231
  deployScript: "deploy",
76096
76232
  previewScript: "preview",
76097
- generate: generate7,
76098
- configure: configure7,
76233
+ generate: generate9,
76234
+ configure: configure8,
76099
76235
  transformPackageJson: async (pkgJson, ctx) => ({
76100
76236
  scripts: {
76101
76237
  deploy: `astro build && wrangler pages deploy`,
@@ -76104,16 +76240,16 @@ var config7 = {
76104
76240
  }
76105
76241
  })
76106
76242
  };
76107
- var c3_default8 = config7;
76243
+ var c3_default10 = config9;
76108
76244
 
76109
76245
  // templates/astro/workers/c3.ts
76110
- var recast6 = __toESM(require_main3());
76246
+ var recast7 = __toESM(require_main3());
76111
76247
  var { npx: npx3 } = detectPackageManager();
76112
- var generate8 = async (ctx) => {
76248
+ var generate10 = async (ctx) => {
76113
76249
  await runFrameworkGenerator(ctx, [ctx.project.name, "--no-install"]);
76114
76250
  logRaw("");
76115
76251
  };
76116
- var configure8 = async () => {
76252
+ var configure9 = async () => {
76117
76253
  await runCommand([npx3, "astro", "add", "cloudflare", "-y"], {
76118
76254
  silent: true,
76119
76255
  startText: "Installing adapter",
@@ -76132,7 +76268,7 @@ var updateAstroConfig2 = () => {
76132
76268
  if (callee.name !== "cloudflare") {
76133
76269
  return this.traverse(n);
76134
76270
  }
76135
- const b3 = recast6.types.builders;
76271
+ const b3 = recast7.types.builders;
76136
76272
  n.node.arguments = [
76137
76273
  b3.objectExpression([
76138
76274
  b3.objectProperty(
@@ -76147,7 +76283,7 @@ var updateAstroConfig2 = () => {
76147
76283
  }
76148
76284
  });
76149
76285
  };
76150
- var config8 = {
76286
+ var config10 = {
76151
76287
  configVersion: 1,
76152
76288
  id: "astro",
76153
76289
  frameworkCli: "create-astro",
@@ -76170,8 +76306,8 @@ var config8 = {
76170
76306
  deployScript: "deploy",
76171
76307
  previewScript: "preview",
76172
76308
  path: "templates/astro/workers",
76173
- generate: generate8,
76174
- configure: configure8,
76309
+ generate: generate10,
76310
+ configure: configure9,
76175
76311
  transformPackageJson: async (pkgJson, ctx) => ({
76176
76312
  scripts: {
76177
76313
  deploy: `astro build && wrangler deploy`,
@@ -76180,17 +76316,17 @@ var config8 = {
76180
76316
  }
76181
76317
  })
76182
76318
  };
76183
- var c3_default9 = config8;
76319
+ var c3_default11 = config10;
76184
76320
 
76185
76321
  // templates/astro/c3.ts
76186
- var config9 = {
76322
+ var config11 = {
76187
76323
  displayName: "Astro",
76188
- platformVariants: { pages: c3_default8, workers: c3_default9 }
76324
+ platformVariants: { pages: c3_default10, workers: c3_default11 }
76189
76325
  };
76190
- var c3_default10 = config9;
76326
+ var c3_default12 = config11;
76191
76327
 
76192
76328
  // templates/common/c3.ts
76193
- var c3_default11 = {
76329
+ var c3_default13 = {
76194
76330
  configVersion: 1,
76195
76331
  id: "common",
76196
76332
  displayName: "Example router & proxy Worker",
@@ -76210,36 +76346,36 @@ var c3_default11 = {
76210
76346
  };
76211
76347
 
76212
76348
  // templates/docusaurus/pages/c3.ts
76213
- var { npm: npm6 } = detectPackageManager();
76214
- var generate9 = async (ctx) => {
76349
+ var { npm: npm7 } = detectPackageManager();
76350
+ var generate11 = async (ctx) => {
76215
76351
  await runFrameworkGenerator(ctx, [ctx.project.name, "classic"]);
76216
76352
  };
76217
- var config10 = {
76353
+ var config12 = {
76218
76354
  configVersion: 1,
76219
76355
  id: "docusaurus",
76220
76356
  frameworkCli: "create-docusaurus",
76221
76357
  platform: "pages",
76222
76358
  displayName: "Docusaurus",
76223
76359
  path: "templates/docusaurus/pages",
76224
- generate: generate9,
76360
+ generate: generate11,
76225
76361
  transformPackageJson: async () => ({
76226
76362
  scripts: {
76227
- preview: `${npm6} run build && wrangler pages dev ./build`,
76228
- deploy: `${npm6} run build && wrangler pages deploy ./build`
76363
+ preview: `${npm7} run build && wrangler pages dev ./build`,
76364
+ deploy: `${npm7} run build && wrangler pages deploy ./build`
76229
76365
  }
76230
76366
  }),
76231
76367
  devScript: "preview",
76232
76368
  deployScript: "deploy",
76233
76369
  previewScript: "preview"
76234
76370
  };
76235
- var c3_default12 = config10;
76371
+ var c3_default14 = config12;
76236
76372
 
76237
76373
  // templates/docusaurus/workers/c3.ts
76238
- var { npm: npm7 } = detectPackageManager();
76239
- var generate10 = async (ctx) => {
76374
+ var { npm: npm8 } = detectPackageManager();
76375
+ var generate12 = async (ctx) => {
76240
76376
  await runFrameworkGenerator(ctx, [ctx.project.name, "classic"]);
76241
76377
  };
76242
- var config11 = {
76378
+ var config13 = {
76243
76379
  configVersion: 1,
76244
76380
  id: "docusaurus",
76245
76381
  frameworkCli: "create-docusaurus",
@@ -76249,29 +76385,29 @@ var config11 = {
76249
76385
  path: "./templates"
76250
76386
  },
76251
76387
  path: "templates/docusaurus/workers",
76252
- generate: generate10,
76388
+ generate: generate12,
76253
76389
  transformPackageJson: async () => ({
76254
76390
  scripts: {
76255
- deploy: `${npm7} run build && wrangler deploy`,
76256
- preview: `${npm7} run build && wrangler dev`
76391
+ deploy: `${npm8} run build && wrangler deploy`,
76392
+ preview: `${npm8} run build && wrangler dev`
76257
76393
  }
76258
76394
  }),
76259
76395
  devScript: "start",
76260
76396
  deployScript: "deploy",
76261
76397
  previewScript: "preview"
76262
76398
  };
76263
- var c3_default13 = config11;
76399
+ var c3_default15 = config13;
76264
76400
 
76265
76401
  // templates/docusaurus/c3.ts
76266
- var config12 = {
76402
+ var config14 = {
76267
76403
  displayName: "Docusaurus",
76268
- platformVariants: { pages: c3_default12, workers: c3_default13 }
76404
+ platformVariants: { pages: c3_default14, workers: c3_default15 }
76269
76405
  };
76270
- var c3_default14 = config12;
76406
+ var c3_default16 = config14;
76271
76407
 
76272
76408
  // templates/gatsby/pages/c3.ts
76273
- var { npm: npm8 } = detectPackageManager();
76274
- var generate11 = async (ctx) => {
76409
+ var { npm: npm9 } = detectPackageManager();
76410
+ var generate13 = async (ctx) => {
76275
76411
  const defaultTemplate = "https://github.com/gatsbyjs/gatsby-starter-blog";
76276
76412
  const useTemplate = await inputPrompt({
76277
76413
  type: "confirm",
@@ -76290,29 +76426,29 @@ var generate11 = async (ctx) => {
76290
76426
  }
76291
76427
  await runFrameworkGenerator(ctx, ["new", ctx.project.name, templateUrl]);
76292
76428
  };
76293
- var config13 = {
76429
+ var config15 = {
76294
76430
  configVersion: 1,
76295
76431
  id: "gatsby",
76296
76432
  frameworkCli: "gatsby",
76297
76433
  platform: "pages",
76298
76434
  displayName: "Gatsby",
76299
76435
  path: "templates/gatsby/pages",
76300
- generate: generate11,
76436
+ generate: generate13,
76301
76437
  transformPackageJson: async () => ({
76302
76438
  scripts: {
76303
- deploy: `${npm8} run build && wrangler pages deploy ./public`,
76304
- preview: `${npm8} run build && wrangler pages dev ./public`
76439
+ deploy: `${npm9} run build && wrangler pages deploy ./public`,
76440
+ preview: `${npm9} run build && wrangler pages dev ./public`
76305
76441
  }
76306
76442
  }),
76307
76443
  devScript: "develop",
76308
76444
  deployScript: "deploy",
76309
76445
  previewScript: "preview"
76310
76446
  };
76311
- var c3_default15 = config13;
76447
+ var c3_default17 = config15;
76312
76448
 
76313
76449
  // templates/gatsby/workers/c3.ts
76314
- var { npm: npm9 } = detectPackageManager();
76315
- var generate12 = async (ctx) => {
76450
+ var { npm: npm10 } = detectPackageManager();
76451
+ var generate14 = async (ctx) => {
76316
76452
  const defaultTemplate = "https://github.com/gatsbyjs/gatsby-starter-blog";
76317
76453
  const useTemplate = await inputPrompt({
76318
76454
  type: "confirm",
@@ -76331,7 +76467,7 @@ var generate12 = async (ctx) => {
76331
76467
  }
76332
76468
  await runFrameworkGenerator(ctx, ["new", ctx.project.name, templateUrl]);
76333
76469
  };
76334
- var config14 = {
76470
+ var config16 = {
76335
76471
  configVersion: 1,
76336
76472
  id: "gatsby",
76337
76473
  frameworkCli: "gatsby",
@@ -76341,28 +76477,28 @@ var config14 = {
76341
76477
  path: "./templates"
76342
76478
  },
76343
76479
  path: "templates/gatsby/workers",
76344
- generate: generate12,
76480
+ generate: generate14,
76345
76481
  transformPackageJson: async () => ({
76346
76482
  scripts: {
76347
- deploy: `${npm9} run build && wrangler deploy`,
76348
- preview: `${npm9} run build && wrangler dev`
76483
+ deploy: `${npm10} run build && wrangler deploy`,
76484
+ preview: `${npm10} run build && wrangler dev`
76349
76485
  }
76350
76486
  }),
76351
76487
  devScript: "develop",
76352
76488
  deployScript: "deploy",
76353
76489
  previewScript: "preview"
76354
76490
  };
76355
- var c3_default16 = config14;
76491
+ var c3_default18 = config16;
76356
76492
 
76357
76493
  // templates/gatsby/c3.ts
76358
- var config15 = {
76494
+ var config17 = {
76359
76495
  displayName: "Gatsby",
76360
- platformVariants: { pages: c3_default15, workers: c3_default16 }
76496
+ platformVariants: { pages: c3_default17, workers: c3_default18 }
76361
76497
  };
76362
- var c3_default17 = config15;
76498
+ var c3_default19 = config17;
76363
76499
 
76364
76500
  // templates/hello-world-assets-only/c3.ts
76365
- var config16 = {
76501
+ var config18 = {
76366
76502
  configVersion: 1,
76367
76503
  id: "hello-world-assets-only",
76368
76504
  path: "templates/hello-world-assets-only",
@@ -76373,10 +76509,10 @@ var config16 = {
76373
76509
  path: "./templates"
76374
76510
  }
76375
76511
  };
76376
- var c3_default18 = config16;
76512
+ var c3_default20 = config18;
76377
76513
 
76378
76514
  // templates/hello-world-durable-object-with-assets/c3.ts
76379
- var config17 = {
76515
+ var config19 = {
76380
76516
  configVersion: 1,
76381
76517
  id: "hello-world-durable-object-with-assets",
76382
76518
  path: "templates/hello-world-durable-object-with-assets",
@@ -76394,10 +76530,10 @@ var config17 = {
76394
76530
  }
76395
76531
  }
76396
76532
  };
76397
- var c3_default19 = config17;
76533
+ var c3_default21 = config19;
76398
76534
 
76399
76535
  // templates/hello-world-durable-object/c3.ts
76400
- var c3_default20 = {
76536
+ var c3_default22 = {
76401
76537
  configVersion: 1,
76402
76538
  id: "hello-world-durable-object",
76403
76539
  displayName: "Worker + Durable Objects",
@@ -76416,7 +76552,7 @@ var c3_default20 = {
76416
76552
  };
76417
76553
 
76418
76554
  // templates/hello-world-with-assets/c3.ts
76419
- var c3_default21 = {
76555
+ var c3_default23 = {
76420
76556
  configVersion: 1,
76421
76557
  id: "hello-world-with-assets",
76422
76558
  path: "templates/hello-world-with-assets",
@@ -76441,7 +76577,7 @@ var c3_default21 = {
76441
76577
  // templates/hello-world/c3.ts
76442
76578
  var import_promises2 = require("node:fs/promises");
76443
76579
  var import_node_path5 = require("node:path");
76444
- var c3_default22 = {
76580
+ var c3_default24 = {
76445
76581
  configVersion: 1,
76446
76582
  id: "hello-world",
76447
76583
  displayName: "Worker only",
@@ -76474,55 +76610,35 @@ var c3_default22 = {
76474
76610
  }
76475
76611
  };
76476
76612
 
76477
- // templates/hono/pages/c3.ts
76478
- var generate13 = async (ctx) => {
76613
+ // templates/hono/c3.ts
76614
+ var generate15 = async (ctx) => {
76479
76615
  const { name: pm4 } = detectPackageManager();
76480
76616
  await runFrameworkGenerator(ctx, [
76481
76617
  ctx.project.name,
76482
76618
  "--template",
76483
- "cloudflare-pages",
76619
+ "cloudflare-workers",
76484
76620
  "--install",
76485
76621
  "--pm",
76486
76622
  pm4
76487
76623
  ]);
76488
76624
  logRaw("");
76489
76625
  };
76490
- var config18 = {
76491
- configVersion: 1,
76492
- id: "hono",
76493
- frameworkCli: "create-hono",
76494
- displayName: "Hono",
76495
- copyFiles: {
76496
- path: "./templates"
76497
- },
76498
- path: "templates/hono/pages",
76499
- platform: "pages",
76500
- generate: generate13,
76501
- transformPackageJson: async () => ({
76502
- scripts: {
76503
- "cf-typegen": "wrangler types --env-interface CloudflareBindings"
76626
+ var configure10 = async (ctx) => {
76627
+ const indexFile = "src/index.ts";
76628
+ const s = spinner();
76629
+ s.start(`Updating \`${indexFile}\``);
76630
+ const snippets = loadTemplateSnippets(ctx);
76631
+ transformFile(indexFile, {
76632
+ visitVariableDeclarator(n) {
76633
+ if (n.node.id.type === "Identifier" && n.node.id.name === "app") {
76634
+ n.node.init = snippets.appDeclarationTs[0];
76635
+ return false;
76636
+ }
76504
76637
  }
76505
- }),
76506
- devScript: "dev",
76507
- deployScript: "deploy",
76508
- previewScript: "dev"
76509
- };
76510
- var c3_default23 = config18;
76511
-
76512
- // templates/hono/workers/c3.ts
76513
- var generate14 = async (ctx) => {
76514
- const { name: pm4 } = detectPackageManager();
76515
- await runFrameworkGenerator(ctx, [
76516
- ctx.project.name,
76517
- "--template",
76518
- "cloudflare-workers",
76519
- "--install",
76520
- "--pm",
76521
- pm4
76522
- ]);
76523
- logRaw("");
76638
+ });
76639
+ s.stop(`${brandColor("updated")} \`${dim(indexFile)}\``);
76524
76640
  };
76525
- var config19 = {
76641
+ var config20 = {
76526
76642
  configVersion: 1,
76527
76643
  id: "hono",
76528
76644
  frameworkCli: "create-hono",
@@ -76531,10 +76647,12 @@ var config19 = {
76531
76647
  path: "./templates"
76532
76648
  },
76533
76649
  platform: "workers",
76534
- path: "templates/hono/workers",
76535
- generate: generate14,
76650
+ generate: generate15,
76651
+ configure: configure10,
76536
76652
  transformPackageJson: async () => ({
76537
76653
  scripts: {
76654
+ dev: "wrangler dev",
76655
+ deploy: "wrangler deploy --minify",
76538
76656
  "cf-typegen": "wrangler types --env-interface CloudflareBindings"
76539
76657
  }
76540
76658
  }),
@@ -76542,19 +76660,12 @@ var config19 = {
76542
76660
  deployScript: "deploy",
76543
76661
  previewScript: "dev"
76544
76662
  };
76545
- var c3_default24 = config19;
76546
-
76547
- // templates/hono/c3.ts
76548
- var config20 = {
76549
- displayName: "Hono",
76550
- platformVariants: { pages: c3_default23, workers: c3_default24 }
76551
- };
76552
76663
  var c3_default25 = config20;
76553
76664
 
76554
76665
  // templates/next/c3.ts
76555
76666
  var import_path10 = require("path");
76556
- var { npm: npm10, npx: npx4 } = detectPackageManager();
76557
- var generate15 = async (ctx) => {
76667
+ var { npm: npm11, npx: npx4 } = detectPackageManager();
76668
+ var generate16 = async (ctx) => {
76558
76669
  const projectName = ctx.project.name;
76559
76670
  await runFrameworkGenerator(ctx, [projectName]);
76560
76671
  const wranglerConfig = readFile((0, import_path10.join)(getTemplatePath(ctx), "wrangler.jsonc"));
@@ -76579,7 +76690,7 @@ var updateNextConfig2 = (usesTs) => {
76579
76690
  writeFile2(configFile, updatedConfigFile);
76580
76691
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
76581
76692
  };
76582
- var configure9 = async (ctx) => {
76693
+ var configure11 = async (ctx) => {
76583
76694
  const projectPath = ctx.project.path;
76584
76695
  const path6 = probePaths([
76585
76696
  `${projectPath}/pages/api`,
@@ -76660,8 +76771,8 @@ var c3_default26 = {
76660
76771
  frameworkCli: "create-next-app",
76661
76772
  platform: "pages",
76662
76773
  displayName: "Next.js",
76663
- generate: generate15,
76664
- configure: configure9,
76774
+ generate: generate16,
76775
+ configure: configure11,
76665
76776
  copyFiles: {
76666
76777
  async selectVariant(ctx) {
76667
76778
  const isApp = probePaths([
@@ -76692,12 +76803,12 @@ var c3_default26 = {
76692
76803
  }
76693
76804
  },
76694
76805
  transformPackageJson: async (_3, ctx) => {
76695
- const isNpm = npm10 === "npm";
76696
- const isBun = npm10 === "bun";
76806
+ const isNpm = npm11 === "npm";
76807
+ const isBun = npm11 === "bun";
76697
76808
  const isNpmOrBun = isNpm || isBun;
76698
76809
  const nextOnPagesScope = isNpmOrBun ? "@cloudflare/" : "";
76699
76810
  const nextOnPagesCommand = `${nextOnPagesScope}next-on-pages`;
76700
- const pmCommand = isNpmOrBun ? npx4 : npm10;
76811
+ const pmCommand = isNpmOrBun ? npx4 : npm11;
76701
76812
  const pagesBuildRunCommand = `${isNpm ? "npm run" : isBun ? "bun" : pmCommand} pages:build`;
76702
76813
  return {
76703
76814
  scripts: {
@@ -76717,21 +76828,21 @@ var c3_default26 = {
76717
76828
  };
76718
76829
 
76719
76830
  // templates/nuxt/pages/c3.ts
76720
- var recast7 = __toESM(require_main3());
76721
- var { npm: npm11, name: pm2 } = detectPackageManager();
76722
- var generate16 = async (ctx) => {
76831
+ var recast8 = __toESM(require_main3());
76832
+ var { npm: npm12, name: pm2 } = detectPackageManager();
76833
+ var generate17 = async (ctx) => {
76723
76834
  const gitFlag = ctx.args.git ? `--gitInit` : `--no-gitInit`;
76724
76835
  await runFrameworkGenerator(ctx, [
76725
76836
  "init",
76726
76837
  ctx.project.name,
76727
76838
  "--packageManager",
76728
- npm11,
76839
+ npm12,
76729
76840
  gitFlag
76730
76841
  ]);
76731
76842
  writeFile2("./.node-version", "18");
76732
76843
  logRaw("");
76733
76844
  };
76734
- var configure10 = async (ctx) => {
76845
+ var configure12 = async (ctx) => {
76735
76846
  const packages = ["nitro-cloudflare-dev"];
76736
76847
  if (pm2 === "pnpm") {
76737
76848
  packages.push("h3");
@@ -76739,7 +76850,7 @@ var configure10 = async (ctx) => {
76739
76850
  await installPackages(packages, {
76740
76851
  dev: true,
76741
76852
  startText: "Installing nitro module `nitro-cloudflare-dev`",
76742
- doneText: `${brandColor("installed")} ${dim(`via \`${npm11} install\``)}`
76853
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm12} install\``)}`
76743
76854
  });
76744
76855
  updateNuxtConfig();
76745
76856
  updateEnvTypes2(ctx);
@@ -76762,7 +76873,7 @@ var updateNuxtConfig = () => {
76762
76873
  const s = spinner();
76763
76874
  const configFile = "nuxt.config.ts";
76764
76875
  s.start(`Updating \`${configFile}\``);
76765
- const b3 = recast7.types.builders;
76876
+ const b3 = recast8.types.builders;
76766
76877
  const presetDef = b3.objectProperty(
76767
76878
  b3.identifier("nitro"),
76768
76879
  b3.objectExpression([
@@ -76810,12 +76921,12 @@ var config21 = {
76810
76921
  path: "./templates"
76811
76922
  },
76812
76923
  path: "templates/nuxt/pages",
76813
- generate: generate16,
76814
- configure: configure10,
76924
+ generate: generate17,
76925
+ configure: configure12,
76815
76926
  transformPackageJson: async () => ({
76816
76927
  scripts: {
76817
- deploy: `${npm11} run build && wrangler pages deploy`,
76818
- preview: `${npm11} run build && wrangler pages dev`,
76928
+ deploy: `${npm12} run build && wrangler pages deploy`,
76929
+ preview: `${npm12} run build && wrangler pages dev`,
76819
76930
  "cf-typegen": `wrangler types`
76820
76931
  }
76821
76932
  }),
@@ -76826,21 +76937,21 @@ var config21 = {
76826
76937
  var c3_default27 = config21;
76827
76938
 
76828
76939
  // templates/nuxt/workers/c3.ts
76829
- var recast8 = __toESM(require_main3());
76830
- var { npm: npm12, name: pm3 } = detectPackageManager();
76831
- var generate17 = async (ctx) => {
76940
+ var recast9 = __toESM(require_main3());
76941
+ var { npm: npm13, name: pm3 } = detectPackageManager();
76942
+ var generate18 = async (ctx) => {
76832
76943
  const gitFlag = ctx.args.git ? `--gitInit` : `--no-gitInit`;
76833
76944
  await runFrameworkGenerator(ctx, [
76834
76945
  "init",
76835
76946
  ctx.project.name,
76836
76947
  "--packageManager",
76837
- npm12,
76948
+ npm13,
76838
76949
  gitFlag
76839
76950
  ]);
76840
76951
  writeFile2("./.node-version", "18");
76841
76952
  logRaw("");
76842
76953
  };
76843
- var configure11 = async (ctx) => {
76954
+ var configure13 = async (ctx) => {
76844
76955
  const packages = ["nitro-cloudflare-dev", "nitropack"];
76845
76956
  if (pm3 === "pnpm") {
76846
76957
  packages.push("h3");
@@ -76848,7 +76959,7 @@ var configure11 = async (ctx) => {
76848
76959
  await installPackages(packages, {
76849
76960
  dev: true,
76850
76961
  startText: "Installing nitro module `nitro-cloudflare-dev`",
76851
- doneText: `${brandColor("installed")} ${dim(`via \`${npm12} install\``)}`
76962
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm13} install\``)}`
76852
76963
  });
76853
76964
  updateNuxtConfig2();
76854
76965
  updateEnvTypes3(ctx);
@@ -76871,7 +76982,7 @@ var updateNuxtConfig2 = () => {
76871
76982
  const s = spinner();
76872
76983
  const configFile = "nuxt.config.ts";
76873
76984
  s.start(`Updating \`${configFile}\``);
76874
- const b3 = recast8.types.builders;
76985
+ const b3 = recast9.types.builders;
76875
76986
  const presetDef = b3.objectProperty(
76876
76987
  b3.identifier("nitro"),
76877
76988
  b3.objectExpression([
@@ -76919,12 +77030,12 @@ var config22 = {
76919
77030
  path: "./templates"
76920
77031
  },
76921
77032
  path: "templates/nuxt/workers",
76922
- generate: generate17,
76923
- configure: configure11,
77033
+ generate: generate18,
77034
+ configure: configure13,
76924
77035
  transformPackageJson: async () => ({
76925
77036
  scripts: {
76926
- deploy: `${npm12} run build && wrangler deploy`,
76927
- preview: `${npm12} run build && wrangler dev`,
77037
+ deploy: `${npm13} run build && wrangler deploy`,
77038
+ preview: `${npm13} run build && wrangler dev`,
76928
77039
  "cf-typegen": `wrangler types`
76929
77040
  }
76930
77041
  }),
@@ -77117,7 +77228,7 @@ var c3_default31 = {
77117
77228
  })
77118
77229
  };
77119
77230
  function buildConfigure(params) {
77120
- return async function configure21(ctx) {
77231
+ return async function configure22(ctx) {
77121
77232
  const loginSuccess = await params.login(ctx);
77122
77233
  if (!loginSuccess) {
77123
77234
  throw new Error("Failed to login to Cloudflare");
@@ -77158,13 +77269,13 @@ var c3_default32 = {
77158
77269
  };
77159
77270
 
77160
77271
  // templates/qwik/c3.ts
77161
- var recast9 = __toESM(require_main3());
77162
- var { npm: npm13, npx: npx5, name: name2 } = detectPackageManager();
77163
- var generate18 = async (ctx) => {
77272
+ var recast10 = __toESM(require_main3());
77273
+ var { npm: npm14, npx: npx5, name: name2 } = detectPackageManager();
77274
+ var generate19 = async (ctx) => {
77164
77275
  await runFrameworkGenerator(ctx, ["playground", ctx.project.name]);
77165
77276
  };
77166
- var configure12 = async (ctx) => {
77167
- const cmd = [name2 === "pnpm" ? npm13 : npx5, "qwik", "add", "cloudflare-pages"];
77277
+ var configure14 = async (ctx) => {
77278
+ const cmd = [name2 === "pnpm" ? npm14 : npx5, "qwik", "add", "cloudflare-pages"];
77168
77279
  endSection(`Running ${quoteShellArgs(cmd)}`);
77169
77280
  await runCommand(cmd);
77170
77281
  addBindingsProxy2(ctx);
@@ -77177,7 +77288,7 @@ var addBindingsProxy2 = (ctx) => {
77177
77288
  const s = spinner();
77178
77289
  s.start("Updating `vite.config.ts`");
77179
77290
  const snippets = loadTemplateSnippets(ctx);
77180
- const b3 = recast9.types.builders;
77291
+ const b3 = recast10.types.builders;
77181
77292
  transformFile("vite.config.ts", {
77182
77293
  // Insert the env declaration after the last import (but before the rest of the body)
77183
77294
  visitProgram: function(n) {
@@ -77219,7 +77330,7 @@ var populateCloudflareEnv2 = () => {
77219
77330
  s.start(`Updating \`${entrypointPath}\``);
77220
77331
  transformFile(entrypointPath, {
77221
77332
  visitTSInterfaceDeclaration: function(n) {
77222
- const b3 = recast9.types.builders;
77333
+ const b3 = recast10.types.builders;
77223
77334
  const id = n.node.id;
77224
77335
  if (id.name !== "QwikCityPlatform") {
77225
77336
  this.traverse(n);
@@ -77249,12 +77360,12 @@ var config24 = {
77249
77360
  copyFiles: {
77250
77361
  path: "./templates"
77251
77362
  },
77252
- generate: generate18,
77253
- configure: configure12,
77363
+ generate: generate19,
77364
+ configure: configure14,
77254
77365
  transformPackageJson: async () => ({
77255
77366
  scripts: {
77256
- deploy: `${npm13} run build && wrangler pages deploy`,
77257
- preview: `${npm13} run build && wrangler pages dev`,
77367
+ deploy: `${npm14} run build && wrangler pages deploy`,
77368
+ preview: `${npm14} run build && wrangler pages dev`,
77258
77369
  "cf-typegen": `wrangler types`
77259
77370
  }
77260
77371
  }),
@@ -77265,8 +77376,8 @@ var config24 = {
77265
77376
  var c3_default33 = config24;
77266
77377
 
77267
77378
  // templates/react/pages/c3.ts
77268
- var { npm: npm14 } = detectPackageManager();
77269
- var generate19 = async (ctx) => {
77379
+ var { npm: npm15 } = detectPackageManager();
77380
+ var generate20 = async (ctx) => {
77270
77381
  const variant = await inputPrompt({
77271
77382
  type: "select",
77272
77383
  question: "Select a variant:",
@@ -77303,11 +77414,11 @@ var config25 = {
77303
77414
  displayName: "React",
77304
77415
  platform: "pages",
77305
77416
  path: "templates/react/pages",
77306
- generate: generate19,
77417
+ generate: generate20,
77307
77418
  transformPackageJson: async () => ({
77308
77419
  scripts: {
77309
- deploy: `${npm14} run build && wrangler pages deploy ./dist`,
77310
- preview: `${npm14} run build && wrangler pages dev ./dist`
77420
+ deploy: `${npm15} run build && wrangler pages deploy ./dist`,
77421
+ preview: `${npm15} run build && wrangler pages dev ./dist`
77311
77422
  }
77312
77423
  }),
77313
77424
  devScript: "dev",
@@ -77318,11 +77429,11 @@ var c3_default34 = config25;
77318
77429
 
77319
77430
  // templates/react/workers/c3.ts
77320
77431
  var import_assert2 = __toESM(require("assert"));
77321
- var recast10 = __toESM(require_main3());
77322
- var b2 = recast10.types.builders;
77323
- var t = recast10.types.namedTypes;
77324
- var { npm: npm15 } = detectPackageManager();
77325
- var generate20 = async (ctx) => {
77432
+ var recast11 = __toESM(require_main3());
77433
+ var b2 = recast11.types.builders;
77434
+ var t = recast11.types.namedTypes;
77435
+ var { npm: npm16 } = detectPackageManager();
77436
+ var generate21 = async (ctx) => {
77326
77437
  const variant = await getVariant();
77327
77438
  ctx.args.lang = variant.lang;
77328
77439
  await runFrameworkGenerator(ctx, [
@@ -77332,7 +77443,7 @@ var generate20 = async (ctx) => {
77332
77443
  ]);
77333
77444
  logRaw("");
77334
77445
  };
77335
- var configure13 = async (ctx) => {
77446
+ var configure15 = async (ctx) => {
77336
77447
  await installPackages(["@cloudflare/vite-plugin"], {
77337
77448
  dev: true,
77338
77449
  startText: "Installing the Cloudflare Vite plugin",
@@ -77363,9 +77474,9 @@ function transformViteConfig(ctx) {
77363
77474
  if (callee.name !== "defineConfig") {
77364
77475
  return this.traverse(n);
77365
77476
  }
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));
77477
+ const config36 = n.node.arguments[0];
77478
+ (0, import_assert2.default)(t.ObjectExpression.check(config36));
77479
+ const pluginsProp = config36.properties.find((prop) => isPluginsProp(prop));
77369
77480
  (0, import_assert2.default)(pluginsProp && t.ArrayExpression.check(pluginsProp.value));
77370
77481
  pluginsProp.value.elements.push(
77371
77482
  b2.callExpression(b2.identifier("cloudflare"), [])
@@ -77439,12 +77550,12 @@ var config26 = {
77439
77550
  }
77440
77551
  }
77441
77552
  },
77442
- generate: generate20,
77443
- configure: configure13,
77553
+ generate: generate21,
77554
+ configure: configure15,
77444
77555
  transformPackageJson: async (_3, ctx) => ({
77445
77556
  scripts: {
77446
- deploy: `${npm15} run build && wrangler deploy`,
77447
- preview: `${npm15} run build && vite preview`,
77557
+ deploy: `${npm16} run build && wrangler deploy`,
77558
+ preview: `${npm16} run build && vite preview`,
77448
77559
  ...usesTypescript(ctx) && { "cf-typegen": `wrangler types` }
77449
77560
  }
77450
77561
  }),
@@ -77462,8 +77573,8 @@ var config27 = {
77462
77573
  var c3_default36 = config27;
77463
77574
 
77464
77575
  // templates/remix/pages/c3.ts
77465
- var { npm: npm16 } = detectPackageManager();
77466
- var generate21 = async (ctx) => {
77576
+ var { npm: npm17 } = detectPackageManager();
77577
+ var generate22 = async (ctx) => {
77467
77578
  await runFrameworkGenerator(ctx, [
77468
77579
  ctx.project.name,
77469
77580
  "--template",
@@ -77471,7 +77582,7 @@ var generate21 = async (ctx) => {
77471
77582
  ]);
77472
77583
  logRaw("");
77473
77584
  };
77474
- var configure14 = async () => {
77585
+ var configure16 = async () => {
77475
77586
  const typeDefsPath = "load-context.ts";
77476
77587
  const s = spinner();
77477
77588
  s.start(`Updating \`${typeDefsPath}\``);
@@ -77496,12 +77607,12 @@ var config28 = {
77496
77607
  path: "./templates"
77497
77608
  },
77498
77609
  path: "templates/remix/pages",
77499
- generate: generate21,
77500
- configure: configure14,
77610
+ generate: generate22,
77611
+ configure: configure16,
77501
77612
  transformPackageJson: async () => ({
77502
77613
  scripts: {
77503
- deploy: `${npm16} run build && wrangler pages deploy`,
77504
- preview: `${npm16} run build && wrangler pages dev`,
77614
+ deploy: `${npm17} run build && wrangler pages deploy`,
77615
+ preview: `${npm17} run build && wrangler pages dev`,
77505
77616
  "cf-typegen": `wrangler types`
77506
77617
  }
77507
77618
  }),
@@ -77512,8 +77623,8 @@ var config28 = {
77512
77623
  var c3_default37 = config28;
77513
77624
 
77514
77625
  // templates/remix/workers/c3.ts
77515
- var { npm: npm17 } = detectPackageManager();
77516
- var generate22 = async (ctx) => {
77626
+ var { npm: npm18 } = detectPackageManager();
77627
+ var generate23 = async (ctx) => {
77517
77628
  await runFrameworkGenerator(ctx, [
77518
77629
  ctx.project.name,
77519
77630
  "--template",
@@ -77521,7 +77632,7 @@ var generate22 = async (ctx) => {
77521
77632
  ]);
77522
77633
  logRaw("");
77523
77634
  };
77524
- var configure15 = async () => {
77635
+ var configure17 = async () => {
77525
77636
  await installPackages(["wrangler@latest"], {
77526
77637
  dev: true,
77527
77638
  startText: "Updating the Wrangler version",
@@ -77538,12 +77649,12 @@ var config29 = {
77538
77649
  path: "./templates"
77539
77650
  },
77540
77651
  path: "templates/remix/workers",
77541
- generate: generate22,
77542
- configure: configure15,
77652
+ generate: generate23,
77653
+ configure: configure17,
77543
77654
  transformPackageJson: async () => ({
77544
77655
  scripts: {
77545
- deploy: `${npm17} run build && wrangler deploy`,
77546
- preview: `${npm17} run build && wrangler dev`,
77656
+ deploy: `${npm18} run build && wrangler deploy`,
77657
+ preview: `${npm18} run build && wrangler dev`,
77547
77658
  "cf-typegen": `wrangler types`
77548
77659
  }
77549
77660
  }),
@@ -77580,13 +77691,13 @@ var c3_default40 = {
77580
77691
  };
77581
77692
 
77582
77693
  // templates/solid/c3.ts
77583
- var recast11 = __toESM(require_main3());
77584
- var { npm: npm18 } = detectPackageManager();
77585
- var generate23 = async (ctx) => {
77694
+ var recast12 = __toESM(require_main3());
77695
+ var { npm: npm19 } = detectPackageManager();
77696
+ var generate24 = async (ctx) => {
77586
77697
  await runFrameworkGenerator(ctx, ["-p", ctx.project.name, "-s"]);
77587
77698
  logRaw("");
77588
77699
  };
77589
- var configure16 = async (ctx) => {
77700
+ var configure18 = async (ctx) => {
77590
77701
  usesTypescript(ctx);
77591
77702
  const filePath = `app.config.${usesTypescript(ctx) ? "ts" : "js"}`;
77592
77703
  updateStatus(`Updating configuration in ${blue(filePath)}`);
@@ -77596,7 +77707,7 @@ var configure16 = async (ctx) => {
77596
77707
  if (callee.name !== "defineConfig") {
77597
77708
  return this.traverse(n);
77598
77709
  }
77599
- const b3 = recast11.types.builders;
77710
+ const b3 = recast12.types.builders;
77600
77711
  mergeObjectProperties(
77601
77712
  n.node.arguments[0],
77602
77713
  [
@@ -77633,12 +77744,12 @@ var config31 = {
77633
77744
  copyFiles: {
77634
77745
  path: "./templates"
77635
77746
  },
77636
- generate: generate23,
77637
- configure: configure16,
77747
+ generate: generate24,
77748
+ configure: configure18,
77638
77749
  transformPackageJson: async () => ({
77639
77750
  scripts: {
77640
- preview: `${npm18} run build && npx wrangler pages dev`,
77641
- deploy: `${npm18} run build && wrangler pages deploy`
77751
+ preview: `${npm19} run build && npx wrangler pages dev`,
77752
+ deploy: `${npm19} run build && wrangler pages deploy`
77642
77753
  }
77643
77754
  }),
77644
77755
  compatibilityFlags: ["nodejs_compat"],
@@ -77648,27 +77759,27 @@ var config31 = {
77648
77759
  };
77649
77760
  var c3_default41 = config31;
77650
77761
 
77651
- // templates/svelte/pages/c3.ts
77762
+ // templates/svelte/c3.ts
77652
77763
  var import_node_fs3 = require("node:fs");
77653
- var import_node_os3 = require("node:os");
77654
- var recast12 = __toESM(require_main3());
77655
- var { npm: npm19 } = detectPackageManager();
77656
- var generate24 = async (ctx) => {
77764
+ var import_node_os4 = require("node:os");
77765
+ var recast13 = __toESM(require_main3());
77766
+ var { npm: npm20 } = detectPackageManager();
77767
+ var generate25 = async (ctx) => {
77657
77768
  await runFrameworkGenerator(ctx, ["create", ctx.project.name]);
77658
77769
  logRaw("");
77659
77770
  };
77660
- var configure17 = async (ctx) => {
77771
+ var configure19 = async (ctx) => {
77661
77772
  const pkg = `@sveltejs/adapter-cloudflare`;
77662
77773
  await installPackages([pkg], {
77663
77774
  dev: true,
77664
77775
  startText: "Adding the Cloudflare Pages adapter",
77665
77776
  doneText: `${brandColor(`installed`)} ${dim(pkg)}`
77666
77777
  });
77667
- updateSvelteConfig();
77778
+ updateSvelteConfig2();
77668
77779
  updatePlaywrightConfig(usesTypescript(ctx));
77669
- updateTypeDefinitions(ctx);
77780
+ updateTypeDefinitions2(ctx);
77670
77781
  };
77671
- var updateSvelteConfig = () => {
77782
+ var updateSvelteConfig2 = () => {
77672
77783
  updateStatus(`Changing adapter in ${blue("svelte.config.js")}`);
77673
77784
  transformFile("svelte.config.js", {
77674
77785
  visitImportDeclaration: function(n) {
@@ -77702,105 +77813,6 @@ var updatePlaywrightConfig = (shouldUseTypescript) => {
77702
77813
  }
77703
77814
  });
77704
77815
  };
77705
- var updateTypeDefinitions = (ctx) => {
77706
- if (!usesTypescript(ctx)) {
77707
- return;
77708
- }
77709
- updateStatus(`Updating global type definitions in ${blue("app.d.ts")}`);
77710
- const b3 = recast12.types.builders;
77711
- transformFile("src/app.d.ts", {
77712
- visitTSModuleDeclaration(n) {
77713
- if (n.value.id.name === "App" && n.node.body) {
77714
- const moduleBlock = n.node.body;
77715
- const platformInterface = b3.tsInterfaceDeclaration(
77716
- b3.identifier("Platform"),
77717
- b3.tsInterfaceBody([
77718
- b3.tsPropertySignature(
77719
- b3.identifier("env"),
77720
- b3.tsTypeAnnotation(b3.tsTypeReference(b3.identifier("Env")))
77721
- ),
77722
- b3.tsPropertySignature(
77723
- b3.identifier("cf"),
77724
- b3.tsTypeAnnotation(
77725
- b3.tsTypeReference(b3.identifier("CfProperties"))
77726
- )
77727
- ),
77728
- b3.tsPropertySignature(
77729
- b3.identifier("ctx"),
77730
- b3.tsTypeAnnotation(
77731
- b3.tsTypeReference(b3.identifier("ExecutionContext"))
77732
- )
77733
- )
77734
- ])
77735
- );
77736
- moduleBlock.body.unshift(platformInterface);
77737
- }
77738
- this.traverse(n);
77739
- }
77740
- });
77741
- };
77742
- var config32 = {
77743
- configVersion: 1,
77744
- id: "svelte",
77745
- frameworkCli: "sv",
77746
- displayName: "SvelteKit",
77747
- platform: "pages",
77748
- copyFiles: {
77749
- path: "./templates"
77750
- },
77751
- path: "templates/svelte/pages",
77752
- generate: generate24,
77753
- configure: configure17,
77754
- transformPackageJson: async (original, ctx) => {
77755
- let scripts = {
77756
- preview: `${npm19} run build && wrangler pages dev`,
77757
- deploy: `${npm19} run build && wrangler pages deploy`
77758
- };
77759
- if (usesTypescript(ctx)) {
77760
- const mv = (0, import_node_os3.platform)() === "win32" ? "move" : "mv";
77761
- scripts = {
77762
- ...scripts,
77763
- "cf-typegen": `wrangler types && ${mv} worker-configuration.d.ts src/`
77764
- };
77765
- }
77766
- return { scripts };
77767
- },
77768
- devScript: "dev",
77769
- deployScript: "deploy",
77770
- previewScript: "preview"
77771
- };
77772
- var c3_default42 = config32;
77773
-
77774
- // templates/svelte/workers/c3.ts
77775
- var import_node_os4 = require("node:os");
77776
- var recast13 = __toESM(require_main3());
77777
- var { npm: npm20 } = detectPackageManager();
77778
- var generate25 = async (ctx) => {
77779
- await runFrameworkGenerator(ctx, ["create", ctx.project.name]);
77780
- logRaw("");
77781
- };
77782
- var configure18 = async (ctx) => {
77783
- const pkg = `@sveltejs/adapter-cloudflare`;
77784
- await installPackages([pkg], {
77785
- dev: true,
77786
- startText: "Adding the Cloudflare adapter",
77787
- doneText: `${brandColor(`installed`)} ${dim(pkg)}`
77788
- });
77789
- updateSvelteConfig2();
77790
- updateTypeDefinitions2(ctx);
77791
- };
77792
- var updateSvelteConfig2 = () => {
77793
- updateStatus(`Changing adapter in ${blue("svelte.config.js")}`);
77794
- transformFile("svelte.config.js", {
77795
- visitImportDeclaration: function(n) {
77796
- const importSource = n.value.source;
77797
- if (importSource.value === "@sveltejs/adapter-auto") {
77798
- importSource.value = "@sveltejs/adapter-cloudflare";
77799
- }
77800
- return false;
77801
- }
77802
- });
77803
- };
77804
77816
  var updateTypeDefinitions2 = (ctx) => {
77805
77817
  if (!usesTypescript(ctx)) {
77806
77818
  return;
@@ -77838,22 +77850,21 @@ var updateTypeDefinitions2 = (ctx) => {
77838
77850
  }
77839
77851
  });
77840
77852
  };
77841
- var config33 = {
77853
+ var config32 = {
77842
77854
  configVersion: 1,
77843
77855
  id: "svelte",
77844
77856
  frameworkCli: "sv",
77845
77857
  displayName: "SvelteKit",
77846
- platform: "workers",
77858
+ platform: "pages",
77847
77859
  copyFiles: {
77848
77860
  path: "./templates"
77849
77861
  },
77850
- path: "templates/svelte/workers",
77851
77862
  generate: generate25,
77852
- configure: configure18,
77863
+ configure: configure19,
77853
77864
  transformPackageJson: async (original, ctx) => {
77854
77865
  let scripts = {
77855
- preview: `${npm20} run build && wrangler dev`,
77856
- deploy: `${npm20} run build && wrangler deploy`
77866
+ preview: `${npm20} run build && wrangler pages dev`,
77867
+ deploy: `${npm20} run build && wrangler pages deploy`
77857
77868
  };
77858
77869
  if (usesTypescript(ctx)) {
77859
77870
  const mv = (0, import_node_os4.platform)() === "win32" ? "move" : "mv";
@@ -77868,21 +77879,14 @@ var config33 = {
77868
77879
  deployScript: "deploy",
77869
77880
  previewScript: "preview"
77870
77881
  };
77871
- var c3_default43 = config33;
77872
-
77873
- // templates/svelte/c3.ts
77874
- var config34 = {
77875
- displayName: "SvelteKit",
77876
- platformVariants: { pages: c3_default42, workers: c3_default43 }
77877
- };
77878
- var c3_default44 = config34;
77882
+ var c3_default42 = config32;
77879
77883
 
77880
77884
  // templates/vue/pages/c3.ts
77881
77885
  var { npm: npm21 } = detectPackageManager();
77882
77886
  var generate26 = async (ctx) => {
77883
77887
  await runFrameworkGenerator(ctx, [ctx.project.name]);
77884
77888
  };
77885
- var config35 = {
77889
+ var config33 = {
77886
77890
  configVersion: 1,
77887
77891
  id: "vue",
77888
77892
  frameworkCli: "create-vue",
@@ -77900,7 +77904,7 @@ var config35 = {
77900
77904
  deployScript: "deploy",
77901
77905
  previewScript: "preview"
77902
77906
  };
77903
- var c3_default45 = config35;
77907
+ var c3_default43 = config33;
77904
77908
 
77905
77909
  // templates/vue/workers/c3.ts
77906
77910
  var { npm: npm22 } = detectPackageManager();
@@ -77921,7 +77925,7 @@ var generate27 = async (ctx) => {
77921
77925
  ]);
77922
77926
  logRaw("");
77923
77927
  };
77924
- var configure19 = async (ctx) => {
77928
+ var configure20 = async (ctx) => {
77925
77929
  await installPackages(["@cloudflare/vite-plugin"], {
77926
77930
  dev: true,
77927
77931
  startText: "Installing the Cloudflare Vite plugin",
@@ -77942,7 +77946,7 @@ function updateTsconfigJson2() {
77942
77946
  writeJSON("tsconfig.json", tsconfig);
77943
77947
  s.stop(`${brandColor(`updated`)} ${dim(`\`tsconfig.json\``)}`);
77944
77948
  }
77945
- var config36 = {
77949
+ var config34 = {
77946
77950
  configVersion: 1,
77947
77951
  id: "vue",
77948
77952
  frameworkCli: "create-vue",
@@ -77962,7 +77966,7 @@ var config36 = {
77962
77966
  }
77963
77967
  }
77964
77968
  },
77965
- configure: configure19,
77969
+ configure: configure20,
77966
77970
  generate: generate27,
77967
77971
  transformPackageJson: async (_3, ctx) => ({
77968
77972
  scripts: {
@@ -77975,20 +77979,20 @@ var config36 = {
77975
77979
  deployScript: "deploy",
77976
77980
  previewScript: "preview"
77977
77981
  };
77978
- var c3_default46 = config36;
77982
+ var c3_default44 = config34;
77979
77983
 
77980
77984
  // templates/vue/c3.ts
77981
- var config37 = {
77985
+ var config35 = {
77982
77986
  displayName: "Vue",
77983
- platformVariants: { pages: c3_default45, workers: c3_default46 }
77987
+ platformVariants: { pages: c3_default43, workers: c3_default44 }
77984
77988
  };
77985
- var c3_default47 = config37;
77989
+ var c3_default45 = config35;
77986
77990
 
77987
77991
  // src/git.ts
77988
77992
  var import_node_assert = __toESM(require("node:assert"));
77989
77993
 
77990
77994
  // ../wrangler/package.json
77991
- var version2 = "0.0.0-d3c687ba6";
77995
+ var version2 = "0.0.0-d42966125";
77992
77996
 
77993
77997
  // src/git.ts
77994
77998
  var offerGit = async (ctx) => {
@@ -78249,17 +78253,19 @@ var defaultSelectVariant = async (ctx) => {
78249
78253
  function getFrameworkMap({ experimental = false }) {
78250
78254
  if (experimental) {
78251
78255
  return {
78252
- next: c3_default,
78253
- qwik: c3_default2,
78254
- solid: c3_default3
78256
+ hono: c3_default,
78257
+ next: c3_default2,
78258
+ qwik: c3_default3,
78259
+ solid: c3_default4,
78260
+ svelte: c3_default5
78255
78261
  };
78256
78262
  } else {
78257
78263
  return {
78258
- analog: c3_default4,
78259
- angular: c3_default7,
78260
- astro: c3_default10,
78261
- docusaurus: c3_default14,
78262
- gatsby: c3_default17,
78264
+ analog: c3_default6,
78265
+ angular: c3_default9,
78266
+ astro: c3_default12,
78267
+ docusaurus: c3_default16,
78268
+ gatsby: c3_default19,
78263
78269
  hono: c3_default25,
78264
78270
  next: c3_default26,
78265
78271
  nuxt: c3_default29,
@@ -78267,8 +78273,8 @@ function getFrameworkMap({ experimental = false }) {
78267
78273
  react: c3_default36,
78268
78274
  remix: c3_default39,
78269
78275
  solid: c3_default41,
78270
- svelte: c3_default44,
78271
- vue: c3_default47
78276
+ svelte: c3_default42,
78277
+ vue: c3_default45
78272
78278
  };
78273
78279
  }
78274
78280
  }
@@ -78277,12 +78283,12 @@ function getTemplateMap({ experimental = false }) {
78277
78283
  return {};
78278
78284
  } else {
78279
78285
  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
+ "hello-world": c3_default24,
78287
+ "hello-world-assets-only": c3_default20,
78288
+ "hello-world-with-assets": c3_default23,
78289
+ "hello-world-durable-object": c3_default22,
78290
+ "hello-world-durable-object-with-assets": c3_default21,
78291
+ common: c3_default13,
78286
78292
  scheduled: c3_default40,
78287
78293
  queues: c3_default32,
78288
78294
  openapi: c3_default30,
@@ -78434,8 +78440,8 @@ var createContext = async (args, prevArgs) => {
78434
78440
  experimental: args.experimental
78435
78441
  });
78436
78442
  const frameworkOptions = Object.entries(frameworkMap).map(
78437
- ([key, config38]) => ({
78438
- label: config38.displayName,
78443
+ ([key, config36]) => ({
78444
+ label: config36.displayName,
78439
78445
  value: key
78440
78446
  })
78441
78447
  );
@@ -78602,28 +78608,28 @@ var processRemoteTemplate = async (args) => {
78602
78608
  src = src.replace("https://github.com/", "github:").replace("/tree/main/", "/");
78603
78609
  }
78604
78610
  const path6 = await downloadRemoteTemplate(src);
78605
- const config38 = inferTemplateConfig(path6);
78606
- validateTemplate(path6, config38);
78611
+ const config36 = inferTemplateConfig(path6);
78612
+ validateTemplate(path6, config36);
78607
78613
  updateStatus(`${brandColor("template")} ${dim("cloned and validated")}`);
78608
78614
  return {
78609
78615
  path: path6,
78610
- ...config38
78616
+ ...config36
78611
78617
  };
78612
78618
  };
78613
- var validateTemplate = (path6, config38) => {
78614
- if (!config38.copyFiles) {
78619
+ var validateTemplate = (path6, config36) => {
78620
+ if (!config36.copyFiles) {
78615
78621
  return;
78616
78622
  }
78617
- if (isVariantInfo(config38.copyFiles)) {
78618
- validateTemplateSrcDirectory((0, import_path13.resolve)(path6, config38.copyFiles.path), config38);
78623
+ if (isVariantInfo(config36.copyFiles)) {
78624
+ validateTemplateSrcDirectory((0, import_path13.resolve)(path6, config36.copyFiles.path), config36);
78619
78625
  } else {
78620
- for (const variant of Object.values(config38.copyFiles.variants)) {
78621
- validateTemplateSrcDirectory((0, import_path13.resolve)(path6, variant.path), config38);
78626
+ for (const variant of Object.values(config36.copyFiles.variants)) {
78627
+ validateTemplateSrcDirectory((0, import_path13.resolve)(path6, variant.path), config36);
78622
78628
  }
78623
78629
  }
78624
78630
  };
78625
- var validateTemplateSrcDirectory = (path6, config38) => {
78626
- if (config38.platform === "workers") {
78631
+ var validateTemplateSrcDirectory = (path6, config36) => {
78632
+ if (config36.platform === "workers") {
78627
78633
  const wranglerTomlPath = (0, import_path13.resolve)(path6, "wrangler.toml");
78628
78634
  const wranglerJsonPath = (0, import_path13.resolve)(path6, "wrangler.json");
78629
78635
  const wranglerJsoncPath = (0, import_path13.resolve)(path6, "wrangler.jsonc");
@@ -80534,20 +80540,20 @@ function applyEdits(text, edits) {
80534
80540
  var import_fs12 = require("fs");
80535
80541
  var import_path14 = require("path");
80536
80542
  var import_toml2 = __toESM(require_toml());
80537
- function ensureNameExists(config38, projectName) {
80538
- config38["name"] = projectName;
80539
- return config38;
80543
+ function ensureNameExists(config36, projectName) {
80544
+ config36["name"] = projectName;
80545
+ return config36;
80540
80546
  }
80541
- async function ensureCompatDateExists(config38) {
80542
- if (typeof config38["compatibility_date"] === "string") {
80547
+ async function ensureCompatDateExists(config36) {
80548
+ if (typeof config36["compatibility_date"] === "string") {
80543
80549
  const validCompatDateRe = /^\d{4}-\d{2}-\d{2}/m;
80544
- if (!config38["compatibility_date"].match(validCompatDateRe)) {
80545
- config38["compatibility_date"] = await getWorkerdCompatibilityDate();
80550
+ if (!config36["compatibility_date"].match(validCompatDateRe)) {
80551
+ config36["compatibility_date"] = await getWorkerdCompatibilityDate();
80546
80552
  }
80547
80553
  } else {
80548
- config38["compatibility_date"] = await getWorkerdCompatibilityDate();
80554
+ config36["compatibility_date"] = await getWorkerdCompatibilityDate();
80549
80555
  }
80550
- return config38;
80556
+ return config36;
80551
80557
  }
80552
80558
  var updateWranglerConfig = async (ctx) => {
80553
80559
  if (wranglerJsonExists(ctx)) {
@@ -81261,8 +81267,8 @@ var renderValues = (values) => {
81261
81267
  };
81262
81268
 
81263
81269
  // src/helpers/retry.ts
81264
- var retry = async (config38, fn) => {
81265
- let { times } = config38;
81270
+ var retry = async (config36, fn) => {
81271
+ let { times } = config36;
81266
81272
  let error2 = null;
81267
81273
  while (times > 0) {
81268
81274
  try {
@@ -81270,10 +81276,10 @@ var retry = async (config38, fn) => {
81270
81276
  } catch (e) {
81271
81277
  error2 = e;
81272
81278
  times--;
81273
- if (config38.exitCondition?.(e)) {
81279
+ if (config36.exitCondition?.(e)) {
81274
81280
  break;
81275
81281
  }
81276
- await sleep(config38.sleepMs ?? 1e3);
81282
+ await sleep(config36.sleepMs ?? 1e3);
81277
81283
  }
81278
81284
  }
81279
81285
  throw error2;
@@ -81393,8 +81399,8 @@ async function addWorkersTypesToTsConfig(ctx) {
81393
81399
  }
81394
81400
  const typesEntrypoint = `@cloudflare/workers-types/${entrypointVersion}`;
81395
81401
  try {
81396
- const config38 = parse4(tsconfig);
81397
- const currentTypes = config38.compilerOptions?.types ?? [];
81402
+ const config36 = parse4(tsconfig);
81403
+ const currentTypes = config36.compilerOptions?.types ?? [];
81398
81404
  const explicitEntrypoint = currentTypes.some(
81399
81405
  (t2) => t2.match(/@cloudflare\/workers-types\/\d{4}-\d{2}-\d{2}/)
81400
81406
  );
@@ -81469,7 +81475,7 @@ var runCli = async (args) => {
81469
81475
  printBanner(args);
81470
81476
  const ctx = await createContext(args);
81471
81477
  await create(ctx);
81472
- await configure20(ctx);
81478
+ await configure21(ctx);
81473
81479
  await deploy(ctx);
81474
81480
  printSummary(ctx);
81475
81481
  logRaw("");
@@ -81497,7 +81503,7 @@ var create = async (ctx) => {
81497
81503
  await rectifyPmMismatch(ctx);
81498
81504
  endSection(`Application created`);
81499
81505
  };
81500
- var configure20 = async (ctx) => {
81506
+ var configure21 = async (ctx) => {
81501
81507
  startSection("Configuring your application for Cloudflare", "Step 2 of 3");
81502
81508
  await installWrangler();
81503
81509
  await installWorkersTypes(ctx);