create-cloudflare 2.28.1 → 2.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/cli.js +371 -287
  2. package/package.json +4 -4
  3. package/templates/common/js/__dot__gitignore +172 -0
  4. package/templates/common/js/wrangler.toml +6 -0
  5. package/templates/common/ts/__dot__gitignore +172 -0
  6. package/templates/common/ts/wrangler.toml +6 -0
  7. package/templates/hello-world/js/__dot__gitignore +172 -0
  8. package/templates/hello-world/js/wrangler.toml +6 -0
  9. package/templates/hello-world/py/__dot__gitignore +68 -0
  10. package/templates/hello-world/py/wrangler.toml +6 -0
  11. package/templates/hello-world/ts/__dot__gitignore +172 -0
  12. package/templates/hello-world/ts/wrangler.toml +6 -0
  13. package/templates/hello-world-durable-object/js/__dot__gitignore +172 -0
  14. package/templates/hello-world-durable-object/js/wrangler.toml +6 -0
  15. package/templates/hello-world-durable-object/ts/__dot__gitignore +172 -0
  16. package/templates/hello-world-durable-object/ts/wrangler.toml +6 -0
  17. package/templates/hono/templates/wrangler.toml +6 -0
  18. package/templates/openapi/ts/__dot__gitignore +171 -0
  19. package/templates/openapi/ts/wrangler.toml +6 -0
  20. package/templates/pre-existing/js/__dot__gitignore +172 -0
  21. package/templates/queues/js/__dot__gitignore +172 -0
  22. package/templates/queues/js/wrangler.toml +6 -0
  23. package/templates/queues/ts/__dot__gitignore +172 -0
  24. package/templates/queues/ts/wrangler.toml +6 -0
  25. package/templates/scheduled/js/__dot__gitignore +172 -0
  26. package/templates/scheduled/js/wrangler.toml +6 -0
  27. package/templates/scheduled/ts/__dot__gitignore +172 -0
  28. package/templates/scheduled/ts/wrangler.toml +6 -0
  29. package/templates-experimental/angular/templates/wrangler.toml +6 -0
  30. package/templates-experimental/astro/templates/wrangler.toml +6 -0
  31. package/templates-experimental/docusaurus/templates/wrangler.toml +6 -0
  32. package/templates-experimental/gatsby/templates/wrangler.toml +6 -0
  33. package/templates-experimental/hello-world-assets-only/templates/wrangler.toml +6 -0
  34. package/templates-experimental/hello-world-durable-object-with-assets/js/__dot__gitignore +172 -0
  35. package/templates-experimental/hello-world-durable-object-with-assets/js/wrangler.toml +5 -0
  36. package/templates-experimental/hello-world-durable-object-with-assets/ts/__dot__gitignore +172 -0
  37. package/templates-experimental/hello-world-durable-object-with-assets/ts/wrangler.toml +5 -0
  38. package/templates-experimental/hello-world-with-assets/js/__dot__gitignore +172 -0
  39. package/templates-experimental/hello-world-with-assets/js/wrangler.toml +6 -0
  40. package/templates-experimental/hello-world-with-assets/py/__dot__gitignore +68 -0
  41. package/templates-experimental/hello-world-with-assets/py/wrangler.toml +6 -0
  42. package/templates-experimental/hello-world-with-assets/ts/__dot__gitignore +172 -0
  43. package/templates-experimental/hello-world-with-assets/ts/wrangler.toml +6 -0
  44. package/templates-experimental/hono/c3.ts +43 -0
  45. package/templates-experimental/hono/templates/public/index.html +19 -0
  46. package/templates-experimental/hono/templates/src/index.ts +9 -0
  47. package/templates-experimental/hono/templates/worker-configuration.d.ts +4 -0
  48. package/templates-experimental/hono/templates/wrangler.toml +5 -0
  49. package/templates-experimental/next/c3.ts +52 -0
  50. package/templates-experimental/next/templates/__dot__gitignore +42 -0
  51. package/templates-experimental/next/templates/env.d.ts +5 -0
  52. package/templates-experimental/next/templates/wrangler.toml +12 -0
  53. package/templates-experimental/nuxt/templates/wrangler.toml +6 -0
  54. package/templates-experimental/qwik/templates/wrangler.toml +6 -0
  55. package/templates-experimental/remix/templates/wrangler.toml +6 -0
  56. package/templates-experimental/solid/templates/wrangler.toml +6 -0
  57. package/templates-experimental/svelte/js/wrangler.toml +6 -0
  58. package/templates-experimental/svelte/ts/wrangler.toml +6 -0
package/dist/cli.js CHANGED
@@ -550,7 +550,7 @@ var require_XDGAppPaths = __commonJS({
550
550
  XDGAppPaths.cache = function cache(dirOptions) {
551
551
  return path6.join(xdg.cache(), finalPathSegment(dirOptions));
552
552
  };
553
- XDGAppPaths.config = function config25(dirOptions) {
553
+ XDGAppPaths.config = function config26(dirOptions) {
554
554
  return path6.join(xdg.config(), finalPathSegment(dirOptions));
555
555
  };
556
556
  XDGAppPaths.data = function data(dirOptions) {
@@ -607,7 +607,7 @@ var require_XDG = __commonJS({
607
607
  var cache = function() {
608
608
  return valOrPath(env3.get("XDG_CACHE_HOME"), [baseDir(), ".cache"]);
609
609
  };
610
- var config25 = function() {
610
+ var config26 = function() {
611
611
  return valOrPath(env3.get("XDG_CONFIG_HOME"), [baseDir(), ".config"]);
612
612
  };
613
613
  var data = function() {
@@ -619,13 +619,13 @@ var require_XDG = __commonJS({
619
619
  var state = function() {
620
620
  return valOrPath(env3.get("XDG_STATE_HOME"), [baseDir(), ".local", "state"]);
621
621
  };
622
- return { cache, config: config25, data, runtime, state };
622
+ return { cache, config: config26, data, runtime, state };
623
623
  };
624
624
  var macos = function() {
625
625
  var cache = function() {
626
626
  return valOrPath(env3.get("XDG_CACHE_HOME"), [baseDir(), "Library", "Caches"]);
627
627
  };
628
- var config25 = function() {
628
+ var config26 = function() {
629
629
  return valOrPath(env3.get("XDG_CONFIG_HOME"), [baseDir(), "Library", "Preferences"]);
630
630
  };
631
631
  var data = function() {
@@ -637,7 +637,7 @@ var require_XDG = __commonJS({
637
637
  var state = function() {
638
638
  return valOrPath(env3.get("XDG_STATE_HOME"), [baseDir(), "Library", "State"]);
639
639
  };
640
- return { cache, config: config25, data, runtime, state };
640
+ return { cache, config: config26, data, runtime, state };
641
641
  };
642
642
  var windows = function() {
643
643
  function appData() {
@@ -649,7 +649,7 @@ var require_XDG = __commonJS({
649
649
  var cache = function() {
650
650
  return valOrPath(env3.get("XDG_CACHE_HOME"), [localAppData(), "xdg.cache"]);
651
651
  };
652
- var config25 = function() {
652
+ var config26 = function() {
653
653
  return valOrPath(env3.get("XDG_CONFIG_HOME"), [appData(), "xdg.config"]);
654
654
  };
655
655
  var data = function() {
@@ -661,7 +661,7 @@ var require_XDG = __commonJS({
661
661
  var state = function() {
662
662
  return valOrPath(env3.get("XDG_STATE_HOME"), [localAppData(), "xdg.state"]);
663
663
  };
664
- return { cache, config: config25, data, runtime, state };
664
+ return { cache, config: config26, data, runtime, state };
665
665
  };
666
666
  var XDG_ = function() {
667
667
  function XDG_2() {
@@ -32138,22 +32138,22 @@ var require_dist_web = __commonJS({
32138
32138
  _createClass(Haikunator3, [{
32139
32139
  key: "haikunate",
32140
32140
  value: function haikunate(options) {
32141
- var config25 = (0, _lodash["default"])(options, this.config);
32142
- if (config25.tokenHex === true) {
32143
- config25.tokenChars = "0123456789abcdef";
32141
+ var config26 = (0, _lodash["default"])(options, this.config);
32142
+ if (config26.tokenHex === true) {
32143
+ config26.tokenChars = "0123456789abcdef";
32144
32144
  }
32145
32145
  var adjective = this._randomElement(this.adjectives);
32146
32146
  var noun = this._randomElement(this.nouns);
32147
- if (!config25.tokenLength)
32148
- config25.tokenLength = 0;
32147
+ if (!config26.tokenLength)
32148
+ config26.tokenLength = 0;
32149
32149
  var token = "";
32150
- for (var i = 0; i < config25.tokenLength; i++) {
32151
- token += this._randomElement(config25.tokenChars);
32150
+ for (var i = 0; i < config26.tokenLength; i++) {
32151
+ token += this._randomElement(config26.tokenChars);
32152
32152
  }
32153
32153
  var sections = [adjective, noun, token];
32154
32154
  return sections.filter(function(e) {
32155
32155
  return !!e;
32156
- }).join(config25.delimiter);
32156
+ }).join(config26.delimiter);
32157
32157
  }
32158
32158
  /**
32159
32159
  * Get a random element from an array/string
@@ -46576,13 +46576,13 @@ var require_esprima2 = __commonJS({
46576
46576
  return Reader2;
46577
46577
  }();
46578
46578
  var Tokenizer = function() {
46579
- function Tokenizer2(code, config25) {
46579
+ function Tokenizer2(code, config26) {
46580
46580
  this.errorHandler = new error_handler_1.ErrorHandler();
46581
- this.errorHandler.tolerant = config25 ? typeof config25.tolerant === "boolean" && config25.tolerant : false;
46581
+ this.errorHandler.tolerant = config26 ? typeof config26.tolerant === "boolean" && config26.tolerant : false;
46582
46582
  this.scanner = new scanner_1.Scanner(code, this.errorHandler);
46583
- this.scanner.trackComment = config25 ? typeof config25.comment === "boolean" && config25.comment : false;
46584
- this.trackRange = config25 ? typeof config25.range === "boolean" && config25.range : false;
46585
- this.trackLoc = config25 ? typeof config25.loc === "boolean" && config25.loc : false;
46583
+ this.scanner.trackComment = config26 ? typeof config26.comment === "boolean" && config26.comment : false;
46584
+ this.trackRange = config26 ? typeof config26.range === "boolean" && config26.range : false;
46585
+ this.trackLoc = config26 ? typeof config26.loc === "boolean" && config26.loc : false;
46586
46586
  this.buffer = [];
46587
46587
  this.reader = new Reader();
46588
46588
  }
@@ -48775,11 +48775,11 @@ var require_printer = __commonJS({
48775
48775
  return this.code;
48776
48776
  };
48777
48777
  var emptyPrintResult = new PrintResult("");
48778
- var Printer = function Printer2(config25) {
48778
+ var Printer = function Printer2(config26) {
48779
48779
  assert_1.default.ok(this instanceof Printer2);
48780
- var explicitTabWidth = config25 && config25.tabWidth;
48781
- config25 = options_1.normalize(config25);
48782
- config25.sourceFileName = null;
48780
+ var explicitTabWidth = config26 && config26.tabWidth;
48781
+ config26 = options_1.normalize(config26);
48782
+ config26.sourceFileName = null;
48783
48783
  function makePrintFunctionWith(options, overrides) {
48784
48784
  options = Object.assign({}, options, overrides);
48785
48785
  return function(path6) {
@@ -48794,11 +48794,11 @@ var require_printer = __commonJS({
48794
48794
  includeComments: false
48795
48795
  }));
48796
48796
  }
48797
- var oldTabWidth = config25.tabWidth;
48797
+ var oldTabWidth = config26.tabWidth;
48798
48798
  if (!explicitTabWidth) {
48799
48799
  var loc = path6.getNode().loc;
48800
48800
  if (loc && loc.lines && loc.lines.guessTabWidth) {
48801
- config25.tabWidth = loc.lines.guessTabWidth();
48801
+ config26.tabWidth = loc.lines.guessTabWidth();
48802
48802
  }
48803
48803
  }
48804
48804
  var reprinter = patcher_1.getReprinter(path6);
@@ -48812,11 +48812,11 @@ var require_printer = __commonJS({
48812
48812
  // right choice because it gives us the opportunity to reprint
48813
48813
  // such nodes using their original source.
48814
48814
  reprinter(print2)
48815
- ) : genericPrint(path6, config25, options, makePrintFunctionWith(options, {
48815
+ ) : genericPrint(path6, config26, options, makePrintFunctionWith(options, {
48816
48816
  includeComments: true,
48817
48817
  avoidRootParens: false
48818
48818
  }));
48819
- config25.tabWidth = oldTabWidth;
48819
+ config26.tabWidth = oldTabWidth;
48820
48820
  return lines;
48821
48821
  }
48822
48822
  this.print = function(ast) {
@@ -48827,7 +48827,7 @@ var require_printer = __commonJS({
48827
48827
  includeComments: true,
48828
48828
  avoidRootParens: false
48829
48829
  });
48830
- return new PrintResult(lines.toString(config25), util.composeSourceMaps(config25.inputSourceMap, lines.getSourceMap(config25.sourceMapName, config25.sourceRoot)));
48830
+ return new PrintResult(lines.toString(config26), util.composeSourceMaps(config26.inputSourceMap, lines.getSourceMap(config26.sourceMapName, config26.sourceRoot)));
48831
48831
  };
48832
48832
  this.printGenerically = function(ast) {
48833
48833
  if (!ast) {
@@ -48835,26 +48835,26 @@ var require_printer = __commonJS({
48835
48835
  }
48836
48836
  function printGenerically(path7) {
48837
48837
  return comments_1.printComments(path7, function(path8) {
48838
- return genericPrint(path8, config25, {
48838
+ return genericPrint(path8, config26, {
48839
48839
  includeComments: true,
48840
48840
  avoidRootParens: false
48841
48841
  }, printGenerically);
48842
48842
  });
48843
48843
  }
48844
48844
  var path6 = fast_path_1.default.from(ast);
48845
- var oldReuseWhitespace = config25.reuseWhitespace;
48846
- config25.reuseWhitespace = false;
48847
- var pr = new PrintResult(printGenerically(path6).toString(config25));
48848
- config25.reuseWhitespace = oldReuseWhitespace;
48845
+ var oldReuseWhitespace = config26.reuseWhitespace;
48846
+ config26.reuseWhitespace = false;
48847
+ var pr = new PrintResult(printGenerically(path6).toString(config26));
48848
+ config26.reuseWhitespace = oldReuseWhitespace;
48849
48849
  return pr;
48850
48850
  };
48851
48851
  };
48852
48852
  exports2.Printer = Printer;
48853
- function genericPrint(path6, config25, options, printPath) {
48853
+ function genericPrint(path6, config26, options, printPath) {
48854
48854
  assert_1.default.ok(path6 instanceof fast_path_1.default);
48855
48855
  var node = path6.getValue();
48856
48856
  var parts = [];
48857
- var linesWithoutParens = genericPrintNoParens(path6, config25, printPath);
48857
+ var linesWithoutParens = genericPrintNoParens(path6, config26, printPath);
48858
48858
  if (!node || linesWithoutParens.isEmpty()) {
48859
48859
  return linesWithoutParens;
48860
48860
  }
@@ -68909,33 +68909,33 @@ var inputPrompt = async (promptConfig) => {
68909
68909
  }
68910
68910
  return input;
68911
68911
  };
68912
- var renderSubmit = (config25, value) => {
68913
- const { question, label } = config25;
68914
- if (config25.type !== "confirm" && !value) {
68912
+ var renderSubmit = (config26, value) => {
68913
+ const { question, label } = config26;
68914
+ if (config26.type !== "confirm" && !value) {
68915
68915
  return [`${leftT} ${question} ${dim("(skipped)")}`, `${grayBar}`];
68916
68916
  }
68917
- const content = config25.type === "confirm" ? `${grayBar} ${brandColor(value)} ${dim(label)}` : `${grayBar} ${brandColor(label)} ${dim(value)}`;
68917
+ const content = config26.type === "confirm" ? `${grayBar} ${brandColor(value)} ${dim(label)}` : `${grayBar} ${brandColor(label)} ${dim(value)}`;
68918
68918
  return [`${leftT} ${question}`, content, `${grayBar}`];
68919
68919
  };
68920
- var getRenderers = (config25) => {
68921
- switch (config25.type) {
68920
+ var getRenderers = (config26) => {
68921
+ switch (config26.type) {
68922
68922
  case "select":
68923
- return getSelectRenderers(config25);
68923
+ return getSelectRenderers(config26);
68924
68924
  case "confirm":
68925
- return getConfirmRenderers(config25);
68925
+ return getConfirmRenderers(config26);
68926
68926
  case "text":
68927
- return getTextRenderers(config25);
68927
+ return getTextRenderers(config26);
68928
68928
  case "multiselect":
68929
- return getSelectRenderers(config25);
68929
+ return getSelectRenderers(config26);
68930
68930
  case "list":
68931
- return getSelectListRenderers(config25);
68931
+ return getSelectListRenderers(config26);
68932
68932
  }
68933
68933
  };
68934
- var getTextRenderers = (config25) => {
68935
- const { question } = config25;
68936
- const helpText = config25.helpText ?? "";
68937
- const format5 = config25.format ?? ((val) => String(val));
68938
- const defaultValue = config25.defaultValue?.toString() ?? "";
68934
+ var getTextRenderers = (config26) => {
68935
+ const { question } = config26;
68936
+ const helpText = config26.helpText ?? "";
68937
+ const format5 = config26.format ?? ((val) => String(val));
68938
+ const defaultValue = config26.defaultValue?.toString() ?? "";
68939
68939
  const activeRenderer = ({ value }) => [
68940
68940
  `${blCorner} ${bold(question)} ${dim(helpText)}`,
68941
68941
  `${space(2)}${format5(value || dim(defaultValue))}`,
@@ -68958,14 +68958,14 @@ var getTextRenderers = (config25) => {
68958
68958
  ``
68959
68959
  // extra line for readability
68960
68960
  ],
68961
- submit: ({ value }) => renderSubmit(config25, format5(value ?? "")),
68961
+ submit: ({ value }) => renderSubmit(config26, format5(value ?? "")),
68962
68962
  cancel: activeRenderer
68963
68963
  };
68964
68964
  };
68965
- var getSelectRenderers = (config25) => {
68966
- const { options, question, helpText: _helpText } = config25;
68965
+ var getSelectRenderers = (config26) => {
68966
+ const { options, question, helpText: _helpText } = config26;
68967
68967
  const helpText = _helpText ?? "";
68968
- const maxItemsPerPage = config25.maxItemsPerPage ?? 32;
68968
+ const maxItemsPerPage = config26.maxItemsPerPage ?? 32;
68969
68969
  const defaultRenderer = ({ cursor = 0, value }) => {
68970
68970
  const renderOption = (opt, i) => {
68971
68971
  const { label: optionLabel, value: optionValue } = opt;
@@ -69040,21 +69040,21 @@ ${space(2)}${dim("...")}` : ""}`,
69040
69040
  submit: ({ value }) => {
69041
69041
  if (Array.isArray(value)) {
69042
69042
  return renderSubmit(
69043
- config25,
69043
+ config26,
69044
69044
  options.filter((o) => value.includes(o.value)).map((o) => o.label).join(", ")
69045
69045
  );
69046
69046
  }
69047
69047
  return renderSubmit(
69048
- config25,
69048
+ config26,
69049
69049
  options.find((o) => o.value === value)?.label
69050
69050
  );
69051
69051
  },
69052
69052
  cancel: defaultRenderer
69053
69053
  };
69054
69054
  };
69055
- var getSelectListRenderers = (config25) => {
69056
- const { question, helpText: _helpText } = config25;
69057
- let options = config25.options;
69055
+ var getSelectListRenderers = (config26) => {
69056
+ const { question, helpText: _helpText } = config26;
69057
+ let options = config26.options;
69058
69058
  const helpText = _helpText ?? "";
69059
69059
  const { rows } = stdout;
69060
69060
  const defaultRenderer = ({ cursor, value }, prompt) => {
@@ -69135,20 +69135,20 @@ var getSelectListRenderers = (config25) => {
69135
69135
  submit: ({ value }) => {
69136
69136
  if (Array.isArray(value)) {
69137
69137
  return renderSubmit(
69138
- config25,
69138
+ config26,
69139
69139
  options.filter((o) => value.includes(o.value)).map((o) => o.value).join(", ")
69140
69140
  );
69141
69141
  }
69142
69142
  return renderSubmit(
69143
- config25,
69143
+ config26,
69144
69144
  options.find((o) => o.value === value)?.value
69145
69145
  );
69146
69146
  },
69147
69147
  cancel: defaultRenderer
69148
69148
  };
69149
69149
  };
69150
- var getConfirmRenderers = (config25) => {
69151
- const { activeText, inactiveText, question, helpText: _helpText } = config25;
69150
+ var getConfirmRenderers = (config26) => {
69151
+ const { activeText, inactiveText, question, helpText: _helpText } = config26;
69152
69152
  const helpText = _helpText ?? "";
69153
69153
  const active = activeText || "Yes";
69154
69154
  const inactive = inactiveText || "No";
@@ -69165,7 +69165,7 @@ var getConfirmRenderers = (config25) => {
69165
69165
  active: defaultRenderer,
69166
69166
  confirm: defaultRenderer,
69167
69167
  error: defaultRenderer,
69168
- submit: ({ value }) => renderSubmit(config25, value ? "yes" : "no"),
69168
+ submit: ({ value }) => renderSubmit(config26, value ? "yes" : "no"),
69169
69169
  cancel: defaultRenderer
69170
69170
  };
69171
69171
  };
@@ -70129,23 +70129,23 @@ var YargsParser = class {
70129
70129
  const configPath = argv2[configKey] || configLookup[configKey];
70130
70130
  if (configPath) {
70131
70131
  try {
70132
- let config25 = null;
70132
+ let config26 = null;
70133
70133
  const resolvedConfigPath = mixin2.resolve(mixin2.cwd(), configPath);
70134
70134
  const resolveConfig = flags.configs[configKey];
70135
70135
  if (typeof resolveConfig === "function") {
70136
70136
  try {
70137
- config25 = resolveConfig(resolvedConfigPath);
70137
+ config26 = resolveConfig(resolvedConfigPath);
70138
70138
  } catch (e) {
70139
- config25 = e;
70139
+ config26 = e;
70140
70140
  }
70141
- if (config25 instanceof Error) {
70142
- error2 = config25;
70141
+ if (config26 instanceof Error) {
70142
+ error2 = config26;
70143
70143
  return;
70144
70144
  }
70145
70145
  } else {
70146
- config25 = mixin2.require(resolvedConfigPath);
70146
+ config26 = mixin2.require(resolvedConfigPath);
70147
70147
  }
70148
- setConfigObject(config25);
70148
+ setConfigObject(config26);
70149
70149
  } catch (ex) {
70150
70150
  if (ex.name === "PermissionDenied")
70151
70151
  error2 = ex;
@@ -70155,9 +70155,9 @@ var YargsParser = class {
70155
70155
  }
70156
70156
  });
70157
70157
  }
70158
- function setConfigObject(config25, prev) {
70159
- Object.keys(config25).forEach(function(key) {
70160
- const value = config25[key];
70158
+ function setConfigObject(config26, prev) {
70159
+ Object.keys(config26).forEach(function(key) {
70160
+ const value = config26[key];
70161
70161
  const fullKey = prev ? prev + "." + key : key;
70162
70162
  if (typeof value === "object" && value !== null && !Array.isArray(value) && configuration["dot-notation"]) {
70163
70163
  setConfigObject(value, fullKey);
@@ -71309,11 +71309,11 @@ var CommandInstance = class {
71309
71309
  });
71310
71310
  if (!unparsed.length)
71311
71311
  return;
71312
- const config25 = Object.assign({}, options.configuration, {
71312
+ const config26 = Object.assign({}, options.configuration, {
71313
71313
  "populate--": false
71314
71314
  });
71315
71315
  const parsed = this.shim.Parser.detailed(unparsed, Object.assign({}, options, {
71316
- configuration: config25
71316
+ configuration: config26
71317
71317
  }));
71318
71318
  if (parsed.error) {
71319
71319
  yargs.getInternalMethods().getUsageInstance().fail(parsed.error.message, parsed.error);
@@ -72536,31 +72536,31 @@ ${customMsgs.join("\n")}` : "";
72536
72536
  // ../../node_modules/.pnpm/yargs@17.7.2/node_modules/yargs/build/lib/utils/apply-extends.js
72537
72537
  var previouslyVisitedConfigs = [];
72538
72538
  var shim2;
72539
- function applyExtends(config25, cwd, mergeExtends, _shim) {
72539
+ function applyExtends(config26, cwd, mergeExtends, _shim) {
72540
72540
  shim2 = _shim;
72541
72541
  let defaultConfig = {};
72542
- if (Object.prototype.hasOwnProperty.call(config25, "extends")) {
72543
- if (typeof config25.extends !== "string")
72542
+ if (Object.prototype.hasOwnProperty.call(config26, "extends")) {
72543
+ if (typeof config26.extends !== "string")
72544
72544
  return defaultConfig;
72545
- const isPath = /\.json|\..*rc$/.test(config25.extends);
72545
+ const isPath = /\.json|\..*rc$/.test(config26.extends);
72546
72546
  let pathToDefault = null;
72547
72547
  if (!isPath) {
72548
72548
  try {
72549
- pathToDefault = require.resolve(config25.extends);
72549
+ pathToDefault = require.resolve(config26.extends);
72550
72550
  } catch (_err) {
72551
- return config25;
72551
+ return config26;
72552
72552
  }
72553
72553
  } else {
72554
- pathToDefault = getPathToDefaultConfig(cwd, config25.extends);
72554
+ pathToDefault = getPathToDefaultConfig(cwd, config26.extends);
72555
72555
  }
72556
72556
  checkForCircularExtends(pathToDefault);
72557
72557
  previouslyVisitedConfigs.push(pathToDefault);
72558
- defaultConfig = isPath ? JSON.parse(shim2.readFileSync(pathToDefault, "utf8")) : require(config25.extends);
72559
- delete config25.extends;
72558
+ defaultConfig = isPath ? JSON.parse(shim2.readFileSync(pathToDefault, "utf8")) : require(config26.extends);
72559
+ delete config26.extends;
72560
72560
  defaultConfig = applyExtends(defaultConfig, shim2.path.dirname(pathToDefault), mergeExtends, shim2);
72561
72561
  }
72562
72562
  previouslyVisitedConfigs = [];
72563
- return mergeExtends ? mergeDeep(defaultConfig, config25) : Object.assign({}, defaultConfig, config25);
72563
+ return mergeExtends ? mergeDeep(defaultConfig, config26) : Object.assign({}, defaultConfig, config26);
72564
72564
  }
72565
72565
  function checkForCircularExtends(cfgPath) {
72566
72566
  if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) {
@@ -72570,17 +72570,17 @@ function checkForCircularExtends(cfgPath) {
72570
72570
  function getPathToDefaultConfig(cwd, pathToExtend) {
72571
72571
  return shim2.path.resolve(cwd, pathToExtend);
72572
72572
  }
72573
- function mergeDeep(config1, config25) {
72573
+ function mergeDeep(config1, config26) {
72574
72574
  const target = {};
72575
72575
  function isObject2(obj) {
72576
72576
  return obj && typeof obj === "object" && !Array.isArray(obj);
72577
72577
  }
72578
72578
  Object.assign(target, config1);
72579
- for (const key of Object.keys(config25)) {
72580
- if (isObject2(config25[key]) && isObject2(target[key])) {
72581
- target[key] = mergeDeep(config1[key], config25[key]);
72579
+ for (const key of Object.keys(config26)) {
72580
+ if (isObject2(config26[key]) && isObject2(target[key])) {
72581
+ target[key] = mergeDeep(config1[key], config26[key]);
72582
72582
  } else {
72583
- target[key] = config25[key];
72583
+ target[key] = config26[key];
72584
72584
  }
72585
72585
  }
72586
72586
  return target;
@@ -73341,9 +73341,9 @@ var YargsInstance = class {
73341
73341
  }
73342
73342
  return maybePromise;
73343
73343
  }
73344
- parserConfiguration(config25) {
73345
- argsert("<object>", [config25], arguments.length);
73346
- __classPrivateFieldSet(this, _YargsInstance_parserConfig, config25, "f");
73344
+ parserConfiguration(config26) {
73345
+ argsert("<object>", [config26], arguments.length);
73346
+ __classPrivateFieldSet(this, _YargsInstance_parserConfig, config26, "f");
73347
73347
  return this;
73348
73348
  }
73349
73349
  pkgConf(key, rootPath) {
@@ -73515,9 +73515,9 @@ var YargsInstance = class {
73515
73515
  return this;
73516
73516
  }
73517
73517
  }
73518
- usageConfiguration(config25) {
73519
- argsert("<object>", [config25], arguments.length);
73520
- __classPrivateFieldSet(this, _YargsInstance_usageConfig, config25, "f");
73518
+ usageConfiguration(config26) {
73519
+ argsert("<object>", [config26], arguments.length);
73520
+ __classPrivateFieldSet(this, _YargsInstance_usageConfig, config26, "f");
73521
73521
  return this;
73522
73522
  }
73523
73523
  version(opt, msg, ver) {
@@ -73923,11 +73923,11 @@ var YargsInstance = class {
73923
73923
  __classPrivateFieldGet(this, _YargsInstance_options, "f").__ = __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.__;
73924
73924
  __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration = this[kGetParserConfiguration]();
73925
73925
  const populateDoubleDash = !!__classPrivateFieldGet(this, _YargsInstance_options, "f").configuration["populate--"];
73926
- const config25 = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration, {
73926
+ const config26 = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration, {
73927
73927
  "populate--": true
73928
73928
  });
73929
73929
  const parsed = __classPrivateFieldGet(this, _YargsInstance_shim, "f").Parser.detailed(args, Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f"), {
73930
- configuration: { "parse-positional-numbers": false, ...config25 }
73930
+ configuration: { "parse-positional-numbers": false, ...config26 }
73931
73931
  }));
73932
73932
  const argv = Object.assign(parsed.argv, __classPrivateFieldGet(this, _YargsInstance_parseContext, "f"));
73933
73933
  let argvPromise = void 0;
@@ -74090,7 +74090,7 @@ var Yargs = YargsFactory(esm_default);
74090
74090
  var yargs_default = Yargs;
74091
74091
 
74092
74092
  // package.json
74093
- var version = "2.28.1";
74093
+ var version = "2.29.0";
74094
74094
 
74095
74095
  // src/metrics.ts
74096
74096
  var import_node_async_hooks = require("node:async_hooks");
@@ -74134,12 +74134,12 @@ function getGlobalWranglerConfigPath() {
74134
74134
  }
74135
74135
 
74136
74136
  // src/helpers/metrics-config.ts
74137
- function writeMetricsConfig(config25) {
74137
+ function writeMetricsConfig(config26) {
74138
74138
  (0, import_node_fs2.mkdirSync)(import_node_path2.default.dirname(getMetricsConfigPath()), { recursive: true });
74139
74139
  (0, import_node_fs2.writeFileSync)(
74140
74140
  getMetricsConfigPath(),
74141
74141
  JSON.stringify(
74142
- config25,
74142
+ config26,
74143
74143
  (_key, value) => value instanceof Date ? value.toISOString() : value,
74144
74144
  " "
74145
74145
  )
@@ -74147,9 +74147,9 @@ function writeMetricsConfig(config25) {
74147
74147
  }
74148
74148
  function readMetricsConfig() {
74149
74149
  try {
74150
- const config25 = (0, import_node_fs2.readFileSync)(getMetricsConfigPath(), "utf8");
74150
+ const config26 = (0, import_node_fs2.readFileSync)(getMetricsConfigPath(), "utf8");
74151
74151
  return JSON.parse(
74152
- config25,
74152
+ config26,
74153
74153
  (key, value) => key === "date" ? new Date(value) : value
74154
74154
  );
74155
74155
  } catch {
@@ -74159,10 +74159,10 @@ function readMetricsConfig() {
74159
74159
  function getMetricsConfigPath() {
74160
74160
  return import_node_path2.default.resolve(getGlobalWranglerConfigPath(), "metrics.json");
74161
74161
  }
74162
- function getDeviceId(config25) {
74163
- const deviceId = config25.deviceId ?? (0, import_node_crypto.randomUUID)();
74164
- if (config25.deviceId === void 0) {
74165
- writeMetricsConfig({ ...config25, deviceId });
74162
+ function getDeviceId(config26) {
74163
+ const deviceId = config26.deviceId ?? (0, import_node_crypto.randomUUID)();
74164
+ if (config26.deviceId === void 0) {
74165
+ writeMetricsConfig({ ...config26, deviceId });
74166
74166
  }
74167
74167
  return deviceId;
74168
74168
  }
@@ -74424,10 +74424,10 @@ function getPlatform() {
74424
74424
  function createReporter() {
74425
74425
  const events = [];
74426
74426
  const als = new import_node_async_hooks.AsyncLocalStorage();
74427
- const config25 = readMetricsConfig() ?? {};
74428
- const isFirstUsage = config25.c3permission === void 0;
74427
+ const config26 = readMetricsConfig() ?? {};
74428
+ const isFirstUsage = config26.c3permission === void 0;
74429
74429
  const isEnabled = isTelemetryEnabled();
74430
- const deviceId = getDeviceId(config25);
74430
+ const deviceId = getDeviceId(config26);
74431
74431
  const packageManager = detectPackageManager();
74432
74432
  const platform3 = getPlatform();
74433
74433
  const amplitude_session_id = Date.now();
@@ -74456,7 +74456,7 @@ function createReporter() {
74456
74456
  if (process.env.CREATE_CLOUDFLARE_TELEMETRY_DISABLED === "1") {
74457
74457
  return false;
74458
74458
  }
74459
- return hasSparrowSourceKey() && getC3Permission(config25).enabled;
74459
+ return hasSparrowSourceKey() && getC3Permission(config26).enabled;
74460
74460
  }
74461
74461
  async function waitForAllEventsSettled() {
74462
74462
  await Promise.allSettled(events);
@@ -74562,20 +74562,20 @@ function initializeC3Permission(enabled = true) {
74562
74562
  date: /* @__PURE__ */ new Date()
74563
74563
  };
74564
74564
  }
74565
- function getC3Permission(config25 = readMetricsConfig() ?? {}) {
74566
- if (!config25.c3permission) {
74567
- config25.c3permission = initializeC3Permission();
74568
- writeMetricsConfig(config25);
74565
+ function getC3Permission(config26 = readMetricsConfig() ?? {}) {
74566
+ if (!config26.c3permission) {
74567
+ config26.c3permission = initializeC3Permission();
74568
+ writeMetricsConfig(config26);
74569
74569
  }
74570
- return config25.c3permission;
74570
+ return config26.c3permission;
74571
74571
  }
74572
74572
  function updateC3Pemission(enabled) {
74573
- const config25 = readMetricsConfig();
74574
- if (config25.c3permission?.enabled === enabled) {
74573
+ const config26 = readMetricsConfig();
74574
+ if (config26.c3permission?.enabled === enabled) {
74575
74575
  return;
74576
74576
  }
74577
- config25.c3permission = initializeC3Permission(enabled);
74578
- writeMetricsConfig(config25);
74577
+ config26.c3permission = initializeC3Permission(enabled);
74578
+ writeMetricsConfig(config26);
74579
74579
  }
74580
74580
  var runTelemetryCommand = (action) => {
74581
74581
  const logTelemetryStatus = (enabled) => {
@@ -74620,28 +74620,28 @@ var import_haikunator = __toESM(require_dist_web());
74620
74620
  var import_fs6 = require("fs");
74621
74621
  var import_path6 = __toESM(require("path"));
74622
74622
  var import_undici2 = __toESM(require_undici());
74623
- var installPackages = async (packages, config25 = {}) => {
74623
+ var installPackages = async (packages, config26 = {}) => {
74624
74624
  const { npm: npm22 } = detectPackageManager();
74625
74625
  let saveFlag;
74626
74626
  let cmd;
74627
74627
  switch (npm22) {
74628
74628
  case "yarn":
74629
74629
  cmd = "add";
74630
- saveFlag = config25.dev ? "-D" : "";
74630
+ saveFlag = config26.dev ? "-D" : "";
74631
74631
  break;
74632
74632
  case "bun":
74633
74633
  cmd = "add";
74634
- saveFlag = config25.dev ? "-d" : "";
74634
+ saveFlag = config26.dev ? "-d" : "";
74635
74635
  break;
74636
74636
  case "npm":
74637
74637
  case "pnpm":
74638
74638
  default:
74639
74639
  cmd = "install";
74640
- saveFlag = config25.dev ? "--save-dev" : "";
74640
+ saveFlag = config26.dev ? "--save-dev" : "";
74641
74641
  break;
74642
74642
  }
74643
74643
  await runCommand([npm22, cmd, ...saveFlag ? [saveFlag] : [], ...packages], {
74644
- ...config25,
74644
+ ...config26,
74645
74645
  silent: true
74646
74646
  });
74647
74647
  };
@@ -74828,7 +74828,7 @@ var usesEslint = (ctx) => {
74828
74828
  var import_node_path3 = require("node:path");
74829
74829
 
74830
74830
  // ../wrangler/package.json
74831
- var version2 = "3.78.9";
74831
+ var version2 = "3.78.11";
74832
74832
 
74833
74833
  // src/git.ts
74834
74834
  var offerGit = async (ctx) => {
@@ -75437,6 +75437,88 @@ var c3_default7 = {
75437
75437
  }
75438
75438
  };
75439
75439
 
75440
+ // templates-experimental/hono/c3.ts
75441
+ var generate5 = async (ctx) => {
75442
+ const { name: pm4 } = detectPackageManager();
75443
+ await runFrameworkGenerator(ctx, [
75444
+ ctx.project.name,
75445
+ "--template",
75446
+ "cloudflare-workers",
75447
+ "--install",
75448
+ "--pm",
75449
+ pm4
75450
+ ]);
75451
+ logRaw("");
75452
+ };
75453
+ var config7 = {
75454
+ configVersion: 1,
75455
+ id: "hono",
75456
+ frameworkCli: "create-hono",
75457
+ displayName: "Hono",
75458
+ copyFiles: {
75459
+ path: "./templates"
75460
+ },
75461
+ platform: "workers",
75462
+ path: "templates-experimental/hono",
75463
+ generate: generate5,
75464
+ transformPackageJson: async () => ({
75465
+ scripts: {
75466
+ dev: "wrangler dev",
75467
+ deploy: "wrangler deploy --minify",
75468
+ "cf-typegen": "wrangler types --env-interface CloudflareBindings"
75469
+ }
75470
+ }),
75471
+ devScript: "dev",
75472
+ deployScript: "deploy"
75473
+ };
75474
+ var c3_default8 = config7;
75475
+
75476
+ // templates-experimental/next/c3.ts
75477
+ var generate6 = async (ctx) => {
75478
+ await runFrameworkGenerator(ctx, [
75479
+ ctx.project.name,
75480
+ "--ts",
75481
+ "--tailwind",
75482
+ "--eslint",
75483
+ "--app",
75484
+ "--import-alias",
75485
+ "@/*",
75486
+ "--src-dir"
75487
+ ]);
75488
+ };
75489
+ var configure3 = async () => {
75490
+ const packages = ["@opennextjs/cloudflare", "@cloudflare/workers-types"];
75491
+ await installPackages(packages, {
75492
+ dev: true,
75493
+ startText: "Adding the Cloudflare adapter",
75494
+ doneText: `${brandColor(`installed`)} ${dim(packages.join(", "))}`
75495
+ });
75496
+ };
75497
+ var c3_default9 = {
75498
+ configVersion: 1,
75499
+ id: "next",
75500
+ frameworkCli: "create-next-app",
75501
+ platform: "workers",
75502
+ displayName: "Next (using Node.js compat + Workers Assets)",
75503
+ path: "templates-experimental/next",
75504
+ copyFiles: {
75505
+ path: "./templates"
75506
+ },
75507
+ generate: generate6,
75508
+ configure: configure3,
75509
+ transformPackageJson: async () => ({
75510
+ scripts: {
75511
+ deploy: `cloudflare && wrangler deploy`,
75512
+ preview: `cloudflare && wrangler dev`,
75513
+ "cf-typegen": `wrangler types --env-interface CloudflareEnv env.d.ts`
75514
+ }
75515
+ }),
75516
+ devScript: "dev",
75517
+ previewScript: "preview",
75518
+ deployScript: "deploy",
75519
+ compatibilityFlags: ["nodejs_compat"]
75520
+ };
75521
+
75440
75522
  // src/helpers/compatDate.ts
75441
75523
  var import_fs9 = require("fs");
75442
75524
  var import_path9 = require("path");
@@ -75488,7 +75570,7 @@ function getLatestTypesEntrypoint(ctx) {
75488
75570
  // templates-experimental/nuxt/c3.ts
75489
75571
  var recast3 = __toESM(require_main3());
75490
75572
  var { npm: npm4, name: pm } = detectPackageManager();
75491
- var generate5 = async (ctx) => {
75573
+ var generate7 = async (ctx) => {
75492
75574
  const gitFlag = ctx.args.git ? `--gitInit` : `--no-gitInit`;
75493
75575
  await runFrameworkGenerator(ctx, [
75494
75576
  "init",
@@ -75500,7 +75582,7 @@ var generate5 = async (ctx) => {
75500
75582
  writeFile2("./.node-version", "17");
75501
75583
  logRaw("");
75502
75584
  };
75503
- var configure3 = async (ctx) => {
75585
+ var configure4 = async (ctx) => {
75504
75586
  const packages = ["nitro-cloudflare-dev", "nitropack"];
75505
75587
  if (pm === "pnpm") {
75506
75588
  packages.push("h3");
@@ -75559,7 +75641,7 @@ var updateNuxtConfig = () => {
75559
75641
  });
75560
75642
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
75561
75643
  };
75562
- var config7 = {
75644
+ var config8 = {
75563
75645
  configVersion: 1,
75564
75646
  id: "nuxt",
75565
75647
  frameworkCli: "nuxi",
@@ -75569,8 +75651,8 @@ var config7 = {
75569
75651
  path: "./templates"
75570
75652
  },
75571
75653
  path: "templates-experimental/nuxt",
75572
- generate: generate5,
75573
- configure: configure3,
75654
+ generate: generate7,
75655
+ configure: configure4,
75574
75656
  transformPackageJson: async () => ({
75575
75657
  scripts: {
75576
75658
  deploy: `${npm4} run build && wrangler deploy`,
@@ -75582,15 +75664,15 @@ var config7 = {
75582
75664
  deployScript: "deploy",
75583
75665
  previewScript: "preview"
75584
75666
  };
75585
- var c3_default8 = config7;
75667
+ var c3_default10 = config8;
75586
75668
 
75587
75669
  // templates-experimental/qwik/c3.ts
75588
75670
  var recast4 = __toESM(require_main3());
75589
75671
  var { npm: npm5, npx: npx2 } = detectPackageManager();
75590
- var generate6 = async (ctx) => {
75672
+ var generate8 = async (ctx) => {
75591
75673
  await runFrameworkGenerator(ctx, ["playground", ctx.project.name]);
75592
75674
  };
75593
- var configure4 = async (ctx) => {
75675
+ var configure5 = async (ctx) => {
75594
75676
  const cmd = [npx2, "qwik", "add", "cloudflare-pages"];
75595
75677
  endSection(`Running ${quoteShellArgs(cmd)}`);
75596
75678
  await runCommand(cmd);
@@ -75670,7 +75752,7 @@ var populateCloudflareEnv = () => {
75670
75752
  });
75671
75753
  s.stop(`${brandColor("updated")} \`${entrypointPath}\``);
75672
75754
  };
75673
- var config8 = {
75755
+ var config9 = {
75674
75756
  configVersion: 1,
75675
75757
  id: "qwik",
75676
75758
  frameworkCli: "create-qwik",
@@ -75680,8 +75762,8 @@ var config8 = {
75680
75762
  path: "./templates"
75681
75763
  },
75682
75764
  path: "templates-experimental/qwik",
75683
- generate: generate6,
75684
- configure: configure4,
75765
+ generate: generate8,
75766
+ configure: configure5,
75685
75767
  transformPackageJson: async () => ({
75686
75768
  scripts: {
75687
75769
  deploy: `${npm5} run build && wrangler deploy`,
@@ -75693,11 +75775,11 @@ var config8 = {
75693
75775
  deployScript: "deploy",
75694
75776
  previewScript: "preview"
75695
75777
  };
75696
- var c3_default9 = config8;
75778
+ var c3_default11 = config9;
75697
75779
 
75698
75780
  // templates-experimental/remix/c3.ts
75699
75781
  var { npm: npm6 } = detectPackageManager();
75700
- var generate7 = async (ctx) => {
75782
+ var generate9 = async (ctx) => {
75701
75783
  await runFrameworkGenerator(ctx, [
75702
75784
  ctx.project.name,
75703
75785
  "--template",
@@ -75705,7 +75787,7 @@ var generate7 = async (ctx) => {
75705
75787
  ]);
75706
75788
  logRaw("");
75707
75789
  };
75708
- var configure5 = async () => {
75790
+ var configure6 = async () => {
75709
75791
  await installPackages(["wrangler@latest"], {
75710
75792
  dev: true,
75711
75793
  startText: "Updating the Wrangler version",
@@ -75725,7 +75807,7 @@ var configure5 = async () => {
75725
75807
  });
75726
75808
  s.stop(`${brandColor("updated")} \`${dim(typeDefsPath)}\``);
75727
75809
  };
75728
- var config9 = {
75810
+ var config10 = {
75729
75811
  configVersion: 1,
75730
75812
  id: "remix",
75731
75813
  frameworkCli: "create-remix",
@@ -75735,8 +75817,8 @@ var config9 = {
75735
75817
  path: "./templates"
75736
75818
  },
75737
75819
  path: "templates-experimental/remix",
75738
- generate: generate7,
75739
- configure: configure5,
75820
+ generate: generate9,
75821
+ configure: configure6,
75740
75822
  transformPackageJson: async () => ({
75741
75823
  scripts: {
75742
75824
  build: "remix vite:build && wrangler pages functions build --outdir build/worker",
@@ -75749,16 +75831,16 @@ var config9 = {
75749
75831
  deployScript: "deploy",
75750
75832
  previewScript: "preview"
75751
75833
  };
75752
- var c3_default10 = config9;
75834
+ var c3_default12 = config10;
75753
75835
 
75754
75836
  // templates-experimental/solid/c3.ts
75755
75837
  var recast5 = __toESM(require_main3());
75756
75838
  var { npm: npm7 } = detectPackageManager();
75757
- var generate8 = async (ctx) => {
75839
+ var generate10 = async (ctx) => {
75758
75840
  await runFrameworkGenerator(ctx, ["-p", ctx.project.name, "-s"]);
75759
75841
  logRaw("");
75760
75842
  };
75761
- var configure6 = async (ctx) => {
75843
+ var configure7 = async (ctx) => {
75762
75844
  const packages = ["nitropack"];
75763
75845
  await installPackages(packages, {
75764
75846
  dev: true,
@@ -75844,7 +75926,7 @@ var configure6 = async (ctx) => {
75844
75926
  }
75845
75927
  });
75846
75928
  };
75847
- var config10 = {
75929
+ var config11 = {
75848
75930
  configVersion: 1,
75849
75931
  id: "solid",
75850
75932
  frameworkCli: "create-solid",
@@ -75854,8 +75936,8 @@ var config10 = {
75854
75936
  path: "./templates"
75855
75937
  },
75856
75938
  path: "templates-experimental/solid",
75857
- generate: generate8,
75858
- configure: configure6,
75939
+ generate: generate10,
75940
+ configure: configure7,
75859
75941
  transformPackageJson: async () => ({
75860
75942
  scripts: {
75861
75943
  preview: `${npm7} run build && npx wrangler dev`,
@@ -75867,17 +75949,17 @@ var config10 = {
75867
75949
  deployScript: "deploy",
75868
75950
  previewScript: "preview"
75869
75951
  };
75870
- var c3_default11 = config10;
75952
+ var c3_default13 = config11;
75871
75953
 
75872
75954
  // templates-experimental/svelte/c3.ts
75873
75955
  var import_node_os3 = require("node:os");
75874
75956
  var recast6 = __toESM(require_main3());
75875
75957
  var { npm: npm8 } = detectPackageManager();
75876
- var generate9 = async (ctx) => {
75958
+ var generate11 = async (ctx) => {
75877
75959
  await runFrameworkGenerator(ctx, [ctx.project.name]);
75878
75960
  logRaw("");
75879
75961
  };
75880
- var configure7 = async (ctx) => {
75962
+ var configure8 = async (ctx) => {
75881
75963
  const pkg = `@sveltejs/adapter-cloudflare`;
75882
75964
  await installPackages([pkg], {
75883
75965
  dev: true,
@@ -75936,7 +76018,7 @@ var updateTypeDefinitions = (ctx) => {
75936
76018
  }
75937
76019
  });
75938
76020
  };
75939
- var config11 = {
76021
+ var config12 = {
75940
76022
  configVersion: 1,
75941
76023
  id: "svelte",
75942
76024
  frameworkCli: "create-svelte",
@@ -75949,8 +76031,8 @@ var config11 = {
75949
76031
  }
75950
76032
  },
75951
76033
  path: "templates-experimental/svelte",
75952
- generate: generate9,
75953
- configure: configure7,
76034
+ generate: generate11,
76035
+ configure: configure8,
75954
76036
  transformPackageJson: async (original, ctx) => {
75955
76037
  let scripts = {
75956
76038
  preview: `${npm8} run build && wrangler dev`,
@@ -75969,12 +76051,12 @@ var config11 = {
75969
76051
  deployScript: "deploy",
75970
76052
  previewScript: "preview"
75971
76053
  };
75972
- var c3_default12 = config11;
76054
+ var c3_default14 = config12;
75973
76055
 
75974
76056
  // templates/analog/c3.ts
75975
76057
  var recast7 = __toESM(require_main3());
75976
76058
  var { npm: npm9, name: pm2 } = detectPackageManager();
75977
- var generate10 = async (ctx) => {
76059
+ var generate12 = async (ctx) => {
75978
76060
  await runFrameworkGenerator(ctx, [
75979
76061
  ctx.project.name,
75980
76062
  "--template",
@@ -75982,7 +76064,7 @@ var generate10 = async (ctx) => {
75982
76064
  ]);
75983
76065
  logRaw("");
75984
76066
  };
75985
- var configure8 = async (ctx) => {
76067
+ var configure9 = async (ctx) => {
75986
76068
  if (pm2 === "pnpm" || pm2 === "yarn" || pm2 === "bun") {
75987
76069
  const packages = [];
75988
76070
  packages.push("nitropack");
@@ -76050,7 +76132,7 @@ var updateViteConfig = (ctx) => {
76050
76132
  });
76051
76133
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
76052
76134
  };
76053
- var config12 = {
76135
+ var config13 = {
76054
76136
  configVersion: 1,
76055
76137
  id: "analog",
76056
76138
  frameworkCli: "create-analog",
@@ -76059,8 +76141,8 @@ var config12 = {
76059
76141
  copyFiles: {
76060
76142
  path: "./templates"
76061
76143
  },
76062
- generate: generate10,
76063
- configure: configure8,
76144
+ generate: generate12,
76145
+ configure: configure9,
76064
76146
  transformPackageJson: async () => ({
76065
76147
  scripts: {
76066
76148
  preview: `${npm9} run build && wrangler pages dev`,
@@ -76072,16 +76154,16 @@ var config12 = {
76072
76154
  deployScript: "deploy",
76073
76155
  previewScript: "preview"
76074
76156
  };
76075
- var c3_default13 = config12;
76157
+ var c3_default15 = config13;
76076
76158
 
76077
76159
  // templates/angular/c3.ts
76078
76160
  var import_node_path4 = require("node:path");
76079
76161
  var { npm: npm10 } = detectPackageManager();
76080
- var generate11 = async (ctx) => {
76162
+ var generate13 = async (ctx) => {
76081
76163
  await runFrameworkGenerator(ctx, [ctx.project.name, "--ssr"]);
76082
76164
  logRaw("");
76083
76165
  };
76084
- var configure9 = async (ctx) => {
76166
+ var configure10 = async (ctx) => {
76085
76167
  updateAngularJson2(ctx);
76086
76168
  await updateAppCode2();
76087
76169
  await installCFWorker2();
@@ -76126,7 +76208,7 @@ function updateAngularJson2(ctx) {
76126
76208
  writeFile2((0, import_node_path4.resolve)("angular.json"), JSON.stringify(angularJson, null, 2));
76127
76209
  s.stop(`${brandColor(`updated`)} ${dim(`\`angular.json\``)}`);
76128
76210
  }
76129
- var config13 = {
76211
+ var config14 = {
76130
76212
  configVersion: 1,
76131
76213
  id: "angular",
76132
76214
  frameworkCli: "@angular/create",
@@ -76137,8 +76219,8 @@ var config13 = {
76137
76219
  },
76138
76220
  devScript: "start",
76139
76221
  deployScript: "deploy",
76140
- generate: generate11,
76141
- configure: configure9,
76222
+ generate: generate13,
76223
+ configure: configure10,
76142
76224
  transformPackageJson: async () => ({
76143
76225
  scripts: {
76144
76226
  start: `${npm10} run build && wrangler pages dev dist/cloudflare ${await compatDateFlag()} --experimental-local`,
@@ -76148,16 +76230,16 @@ var config13 = {
76148
76230
  }
76149
76231
  })
76150
76232
  };
76151
- var c3_default14 = config13;
76233
+ var c3_default16 = config14;
76152
76234
 
76153
76235
  // templates/astro/c3.ts
76154
76236
  var recast8 = __toESM(require_main3());
76155
76237
  var { npx: npx3 } = detectPackageManager();
76156
- var generate12 = async (ctx) => {
76238
+ var generate14 = async (ctx) => {
76157
76239
  await runFrameworkGenerator(ctx, [ctx.project.name, "--no-install"]);
76158
76240
  logRaw("");
76159
76241
  };
76160
- var configure10 = async (ctx) => {
76242
+ var configure11 = async (ctx) => {
76161
76243
  await runCommand([npx3, "astro", "add", "cloudflare", "-y"], {
76162
76244
  silent: true,
76163
76245
  startText: "Installing adapter",
@@ -76212,7 +76294,7 @@ var updateEnvDeclaration2 = (ctx) => {
76212
76294
  }
76213
76295
  });
76214
76296
  };
76215
- var config14 = {
76297
+ var config15 = {
76216
76298
  configVersion: 1,
76217
76299
  id: "astro",
76218
76300
  frameworkCli: "create-astro",
@@ -76224,8 +76306,8 @@ var config14 = {
76224
76306
  devScript: "dev",
76225
76307
  deployScript: "deploy",
76226
76308
  previewScript: "preview",
76227
- generate: generate12,
76228
- configure: configure10,
76309
+ generate: generate14,
76310
+ configure: configure11,
76229
76311
  transformPackageJson: async (pkgJson, ctx) => ({
76230
76312
  scripts: {
76231
76313
  deploy: `astro build && wrangler pages deploy`,
@@ -76234,10 +76316,10 @@ var config14 = {
76234
76316
  }
76235
76317
  })
76236
76318
  };
76237
- var c3_default15 = config14;
76319
+ var c3_default17 = config15;
76238
76320
 
76239
76321
  // templates/common/c3.ts
76240
- var c3_default16 = {
76322
+ var c3_default18 = {
76241
76323
  configVersion: 1,
76242
76324
  id: "common",
76243
76325
  displayName: "Example router & proxy Worker",
@@ -76258,16 +76340,16 @@ var c3_default16 = {
76258
76340
 
76259
76341
  // templates/docusaurus/c3.ts
76260
76342
  var { npm: npm11 } = detectPackageManager();
76261
- var generate13 = async (ctx) => {
76343
+ var generate15 = async (ctx) => {
76262
76344
  await runFrameworkGenerator(ctx, [ctx.project.name, "classic"]);
76263
76345
  };
76264
- var config15 = {
76346
+ var config16 = {
76265
76347
  configVersion: 1,
76266
76348
  id: "docusaurus",
76267
76349
  frameworkCli: "create-docusaurus",
76268
76350
  platform: "pages",
76269
76351
  displayName: "Docusaurus",
76270
- generate: generate13,
76352
+ generate: generate15,
76271
76353
  transformPackageJson: async () => ({
76272
76354
  scripts: {
76273
76355
  deploy: `${npm11} run build && wrangler pages deploy ./build`
@@ -76276,11 +76358,11 @@ var config15 = {
76276
76358
  devScript: "start",
76277
76359
  deployScript: "deploy"
76278
76360
  };
76279
- var c3_default17 = config15;
76361
+ var c3_default19 = config16;
76280
76362
 
76281
76363
  // templates/gatsby/c3.ts
76282
76364
  var { npm: npm12 } = detectPackageManager();
76283
- var generate14 = async (ctx) => {
76365
+ var generate16 = async (ctx) => {
76284
76366
  const defaultTemplate = "https://github.com/gatsbyjs/gatsby-starter-blog";
76285
76367
  const useTemplate = await inputPrompt({
76286
76368
  type: "confirm",
@@ -76299,13 +76381,13 @@ var generate14 = async (ctx) => {
76299
76381
  }
76300
76382
  await runFrameworkGenerator(ctx, ["new", ctx.project.name, templateUrl]);
76301
76383
  };
76302
- var config16 = {
76384
+ var config17 = {
76303
76385
  configVersion: 1,
76304
76386
  id: "gatsby",
76305
76387
  frameworkCli: "gatsby",
76306
76388
  platform: "pages",
76307
76389
  displayName: "Gatsby",
76308
- generate: generate14,
76390
+ generate: generate16,
76309
76391
  transformPackageJson: async () => ({
76310
76392
  scripts: {
76311
76393
  deploy: `${npm12} run build && wrangler pages deploy ./public`,
@@ -76316,10 +76398,10 @@ var config16 = {
76316
76398
  deployScript: "deploy",
76317
76399
  previewScript: "preview"
76318
76400
  };
76319
- var c3_default18 = config16;
76401
+ var c3_default20 = config17;
76320
76402
 
76321
76403
  // templates/hello-world-durable-object/c3.ts
76322
- var c3_default19 = {
76404
+ var c3_default21 = {
76323
76405
  configVersion: 1,
76324
76406
  id: "hello-world-durable-object",
76325
76407
  displayName: "Hello World Worker Using Durable Objects",
@@ -76338,7 +76420,7 @@ var c3_default19 = {
76338
76420
  };
76339
76421
 
76340
76422
  // templates/hello-world/c3.ts
76341
- var c3_default20 = {
76423
+ var c3_default22 = {
76342
76424
  configVersion: 1,
76343
76425
  id: "hello-world",
76344
76426
  displayName: "Hello World Worker",
@@ -76360,7 +76442,7 @@ var c3_default20 = {
76360
76442
  };
76361
76443
 
76362
76444
  // templates/hono/c3.ts
76363
- var generate15 = async (ctx) => {
76445
+ var generate17 = async (ctx) => {
76364
76446
  const { name: pm4 } = detectPackageManager();
76365
76447
  await runFrameworkGenerator(ctx, [
76366
76448
  ctx.project.name,
@@ -76372,7 +76454,7 @@ var generate15 = async (ctx) => {
76372
76454
  ]);
76373
76455
  logRaw("");
76374
76456
  };
76375
- var configure11 = async (ctx) => {
76457
+ var configure12 = async (ctx) => {
76376
76458
  const indexFile = "src/index.ts";
76377
76459
  const s = spinner();
76378
76460
  s.start(`Updating \`${indexFile}\``);
@@ -76387,7 +76469,7 @@ var configure11 = async (ctx) => {
76387
76469
  });
76388
76470
  s.stop(`${brandColor("updated")} \`${dim(indexFile)}\``);
76389
76471
  };
76390
- var config17 = {
76472
+ var config18 = {
76391
76473
  configVersion: 1,
76392
76474
  id: "hono",
76393
76475
  frameworkCli: "create-hono",
@@ -76396,8 +76478,8 @@ var config17 = {
76396
76478
  path: "./templates"
76397
76479
  },
76398
76480
  platform: "workers",
76399
- generate: generate15,
76400
- configure: configure11,
76481
+ generate: generate17,
76482
+ configure: configure12,
76401
76483
  transformPackageJson: async () => ({
76402
76484
  scripts: {
76403
76485
  dev: "wrangler dev",
@@ -76408,12 +76490,12 @@ var config17 = {
76408
76490
  devScript: "dev",
76409
76491
  deployScript: "deploy"
76410
76492
  };
76411
- var c3_default21 = config17;
76493
+ var c3_default23 = config18;
76412
76494
 
76413
76495
  // templates/next/c3.ts
76414
76496
  var import_path10 = require("path");
76415
76497
  var { npm: npm13, npx: npx4 } = detectPackageManager();
76416
- var generate16 = async (ctx) => {
76498
+ var generate18 = async (ctx) => {
76417
76499
  const projectName = ctx.project.name;
76418
76500
  await runFrameworkGenerator(ctx, [projectName]);
76419
76501
  const wranglerToml = readFile((0, import_path10.join)(getTemplatePath(ctx), "wrangler.toml"));
@@ -76446,7 +76528,7 @@ var updateNextConfig = () => {
76446
76528
  writeFile2(configFile, updatedConfigFile);
76447
76529
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
76448
76530
  };
76449
- var configure12 = async (ctx) => {
76531
+ var configure13 = async (ctx) => {
76450
76532
  const projectPath = ctx.project.path;
76451
76533
  const path6 = probePaths([
76452
76534
  `${projectPath}/pages/api`,
@@ -76521,14 +76603,14 @@ var addDevDependencies = async (installEslintPlugin) => {
76521
76603
  doneText: `${brandColor(`installed`)} ${dim(packages.join(", "))}`
76522
76604
  });
76523
76605
  };
76524
- var c3_default22 = {
76606
+ var c3_default24 = {
76525
76607
  configVersion: 1,
76526
76608
  id: "next",
76527
76609
  frameworkCli: "create-next-app",
76528
76610
  platform: "pages",
76529
76611
  displayName: "Next",
76530
- generate: generate16,
76531
- configure: configure12,
76612
+ generate: generate18,
76613
+ configure: configure13,
76532
76614
  copyFiles: {
76533
76615
  async selectVariant(ctx) {
76534
76616
  const isApp = probePaths([
@@ -76586,7 +76668,7 @@ var c3_default22 = {
76586
76668
  // templates/nuxt/c3.ts
76587
76669
  var recast9 = __toESM(require_main3());
76588
76670
  var { npm: npm14, name: pm3 } = detectPackageManager();
76589
- var generate17 = async (ctx) => {
76671
+ var generate19 = async (ctx) => {
76590
76672
  const gitFlag = ctx.args.git ? `--gitInit` : `--no-gitInit`;
76591
76673
  await runFrameworkGenerator(ctx, [
76592
76674
  "init",
@@ -76598,7 +76680,7 @@ var generate17 = async (ctx) => {
76598
76680
  writeFile2("./.node-version", "17");
76599
76681
  logRaw("");
76600
76682
  };
76601
- var configure13 = async (ctx) => {
76683
+ var configure14 = async (ctx) => {
76602
76684
  const packages = ["nitro-cloudflare-dev"];
76603
76685
  if (pm3 === "pnpm") {
76604
76686
  packages.push("h3");
@@ -76657,7 +76739,7 @@ var updateNuxtConfig2 = () => {
76657
76739
  });
76658
76740
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
76659
76741
  };
76660
- var config18 = {
76742
+ var config19 = {
76661
76743
  configVersion: 1,
76662
76744
  id: "nuxt",
76663
76745
  frameworkCli: "nuxi",
@@ -76666,8 +76748,8 @@ var config18 = {
76666
76748
  copyFiles: {
76667
76749
  path: "./templates"
76668
76750
  },
76669
- generate: generate17,
76670
- configure: configure13,
76751
+ generate: generate19,
76752
+ configure: configure14,
76671
76753
  transformPackageJson: async () => ({
76672
76754
  scripts: {
76673
76755
  deploy: `${npm14} run build && wrangler pages deploy`,
@@ -76679,10 +76761,10 @@ var config18 = {
76679
76761
  deployScript: "deploy",
76680
76762
  previewScript: "preview"
76681
76763
  };
76682
- var c3_default23 = config18;
76764
+ var c3_default25 = config19;
76683
76765
 
76684
76766
  // templates/openapi/c3.ts
76685
- var c3_default24 = {
76767
+ var c3_default26 = {
76686
76768
  configVersion: 1,
76687
76769
  id: "openapi",
76688
76770
  displayName: "API starter (OpenAPI compliant)",
@@ -76842,7 +76924,7 @@ async function copyExistingWorkerFiles(ctx) {
76842
76924
  (0, import_path11.join)(ctx.project.path, "wrangler.toml")
76843
76925
  );
76844
76926
  }
76845
- var c3_default25 = {
76927
+ var c3_default27 = {
76846
76928
  configVersion: 1,
76847
76929
  id: "pre-existing",
76848
76930
  displayName: "Pre-existing Worker (from Dashboard)",
@@ -76858,7 +76940,7 @@ var c3_default25 = {
76858
76940
  };
76859
76941
 
76860
76942
  // templates/queues/c3.ts
76861
- var c3_default26 = {
76943
+ var c3_default28 = {
76862
76944
  configVersion: 1,
76863
76945
  id: "queues",
76864
76946
  displayName: "Queue consumer & producer Worker",
@@ -76889,10 +76971,10 @@ var c3_default26 = {
76889
76971
  // templates/qwik/c3.ts
76890
76972
  var recast10 = __toESM(require_main3());
76891
76973
  var { npm: npm15, npx: npx5 } = detectPackageManager();
76892
- var generate18 = async (ctx) => {
76974
+ var generate20 = async (ctx) => {
76893
76975
  await runFrameworkGenerator(ctx, ["playground", ctx.project.name]);
76894
76976
  };
76895
- var configure14 = async (ctx) => {
76977
+ var configure15 = async (ctx) => {
76896
76978
  const cmd = [npx5, "qwik", "add", "cloudflare-pages"];
76897
76979
  endSection(`Running ${quoteShellArgs(cmd)}`);
76898
76980
  await runCommand(cmd);
@@ -76969,7 +77051,7 @@ var populateCloudflareEnv2 = () => {
76969
77051
  });
76970
77052
  s.stop(`${brandColor("updated")} \`${entrypointPath}\``);
76971
77053
  };
76972
- var config19 = {
77054
+ var config20 = {
76973
77055
  configVersion: 1,
76974
77056
  id: "qwik",
76975
77057
  frameworkCli: "create-qwik",
@@ -76978,8 +77060,8 @@ var config19 = {
76978
77060
  copyFiles: {
76979
77061
  path: "./templates"
76980
77062
  },
76981
- generate: generate18,
76982
- configure: configure14,
77063
+ generate: generate20,
77064
+ configure: configure15,
76983
77065
  transformPackageJson: async () => ({
76984
77066
  scripts: {
76985
77067
  deploy: `${npm15} run build && wrangler pages deploy`,
@@ -76991,11 +77073,11 @@ var config19 = {
76991
77073
  deployScript: "deploy",
76992
77074
  previewScript: "preview"
76993
77075
  };
76994
- var c3_default27 = config19;
77076
+ var c3_default29 = config20;
76995
77077
 
76996
77078
  // templates/react/c3.ts
76997
77079
  var { npm: npm16 } = detectPackageManager();
76998
- var generate19 = async (ctx) => {
77080
+ var generate21 = async (ctx) => {
76999
77081
  const variant = await inputPrompt({
77000
77082
  type: "select",
77001
77083
  question: "Select a variant:",
@@ -77024,14 +77106,14 @@ var variantsOptions = [
77024
77106
  label: "JavaScript + SWC"
77025
77107
  }
77026
77108
  ];
77027
- var config20 = {
77109
+ var config21 = {
77028
77110
  configVersion: 1,
77029
77111
  id: "react",
77030
77112
  // React's documentation now recommends using create-vite.
77031
77113
  frameworkCli: "create-vite",
77032
77114
  displayName: "React",
77033
77115
  platform: "pages",
77034
- generate: generate19,
77116
+ generate: generate21,
77035
77117
  transformPackageJson: async () => ({
77036
77118
  scripts: {
77037
77119
  deploy: `${npm16} run build && wrangler pages deploy ./dist`,
@@ -77042,11 +77124,11 @@ var config20 = {
77042
77124
  deployScript: "deploy",
77043
77125
  previewScript: "preview"
77044
77126
  };
77045
- var c3_default28 = config20;
77127
+ var c3_default30 = config21;
77046
77128
 
77047
77129
  // templates/remix/c3.ts
77048
77130
  var { npm: npm17 } = detectPackageManager();
77049
- var generate20 = async (ctx) => {
77131
+ var generate22 = async (ctx) => {
77050
77132
  await runFrameworkGenerator(ctx, [
77051
77133
  ctx.project.name,
77052
77134
  "--template",
@@ -77054,7 +77136,7 @@ var generate20 = async (ctx) => {
77054
77136
  ]);
77055
77137
  logRaw("");
77056
77138
  };
77057
- var configure15 = async () => {
77139
+ var configure16 = async () => {
77058
77140
  const typeDefsPath = "load-context.ts";
77059
77141
  const s = spinner();
77060
77142
  s.start(`Updating \`${typeDefsPath}\``);
@@ -77069,7 +77151,7 @@ var configure15 = async () => {
77069
77151
  });
77070
77152
  s.stop(`${brandColor("updated")} \`${dim(typeDefsPath)}\``);
77071
77153
  };
77072
- var config21 = {
77154
+ var config22 = {
77073
77155
  configVersion: 1,
77074
77156
  id: "remix",
77075
77157
  frameworkCli: "create-remix",
@@ -77078,8 +77160,8 @@ var config21 = {
77078
77160
  copyFiles: {
77079
77161
  path: "./templates"
77080
77162
  },
77081
- generate: generate20,
77082
- configure: configure15,
77163
+ generate: generate22,
77164
+ configure: configure16,
77083
77165
  transformPackageJson: async () => ({
77084
77166
  scripts: {
77085
77167
  deploy: `${npm17} run build && wrangler pages deploy`,
@@ -77091,10 +77173,10 @@ var config21 = {
77091
77173
  deployScript: "deploy",
77092
77174
  previewScript: "preview"
77093
77175
  };
77094
- var c3_default29 = config21;
77176
+ var c3_default31 = config22;
77095
77177
 
77096
77178
  // templates/scheduled/c3.ts
77097
- var c3_default30 = {
77179
+ var c3_default32 = {
77098
77180
  configVersion: 1,
77099
77181
  id: "scheduled",
77100
77182
  displayName: "Scheduled Worker (Cron Trigger)",
@@ -77115,11 +77197,11 @@ var c3_default30 = {
77115
77197
  // templates/solid/c3.ts
77116
77198
  var recast11 = __toESM(require_main3());
77117
77199
  var { npm: npm18 } = detectPackageManager();
77118
- var generate21 = async (ctx) => {
77200
+ var generate23 = async (ctx) => {
77119
77201
  await runFrameworkGenerator(ctx, ["-p", ctx.project.name, "-s"]);
77120
77202
  logRaw("");
77121
77203
  };
77122
- var configure16 = async (ctx) => {
77204
+ var configure17 = async (ctx) => {
77123
77205
  usesTypescript(ctx);
77124
77206
  const filePath = `app.config.${usesTypescript(ctx) ? "ts" : "js"}`;
77125
77207
  updateStatus(`Updating configuration in ${blue(filePath)}`);
@@ -77157,7 +77239,7 @@ var configure16 = async (ctx) => {
77157
77239
  }
77158
77240
  });
77159
77241
  };
77160
- var config22 = {
77242
+ var config23 = {
77161
77243
  configVersion: 1,
77162
77244
  id: "solid",
77163
77245
  frameworkCli: "create-solid",
@@ -77166,8 +77248,8 @@ var config22 = {
77166
77248
  copyFiles: {
77167
77249
  path: "./templates"
77168
77250
  },
77169
- generate: generate21,
77170
- configure: configure16,
77251
+ generate: generate23,
77252
+ configure: configure17,
77171
77253
  transformPackageJson: async () => ({
77172
77254
  scripts: {
77173
77255
  preview: `${npm18} run build && npx wrangler pages dev`,
@@ -77179,17 +77261,17 @@ var config22 = {
77179
77261
  deployScript: "deploy",
77180
77262
  previewScript: "preview"
77181
77263
  };
77182
- var c3_default31 = config22;
77264
+ var c3_default33 = config23;
77183
77265
 
77184
77266
  // templates/svelte/c3.ts
77185
77267
  var import_node_os4 = require("node:os");
77186
77268
  var recast12 = __toESM(require_main3());
77187
77269
  var { npm: npm19 } = detectPackageManager();
77188
- var generate22 = async (ctx) => {
77270
+ var generate24 = async (ctx) => {
77189
77271
  await runFrameworkGenerator(ctx, [ctx.project.name]);
77190
77272
  logRaw("");
77191
77273
  };
77192
- var configure17 = async (ctx) => {
77274
+ var configure18 = async (ctx) => {
77193
77275
  const pkg = `@sveltejs/adapter-cloudflare`;
77194
77276
  await installPackages([pkg], {
77195
77277
  dev: true,
@@ -77248,7 +77330,7 @@ var updateTypeDefinitions2 = (ctx) => {
77248
77330
  }
77249
77331
  });
77250
77332
  };
77251
- var config23 = {
77333
+ var config24 = {
77252
77334
  configVersion: 1,
77253
77335
  id: "svelte",
77254
77336
  frameworkCli: "create-svelte",
@@ -77260,8 +77342,8 @@ var config23 = {
77260
77342
  ts: { path: "./ts" }
77261
77343
  }
77262
77344
  },
77263
- generate: generate22,
77264
- configure: configure17,
77345
+ generate: generate24,
77346
+ configure: configure18,
77265
77347
  transformPackageJson: async (original, ctx) => {
77266
77348
  let scripts = {
77267
77349
  preview: `${npm19} run build && wrangler pages dev`,
@@ -77280,20 +77362,20 @@ var config23 = {
77280
77362
  deployScript: "deploy",
77281
77363
  previewScript: "preview"
77282
77364
  };
77283
- var c3_default32 = config23;
77365
+ var c3_default34 = config24;
77284
77366
 
77285
77367
  // templates/vue/c3.ts
77286
77368
  var { npm: npm20 } = detectPackageManager();
77287
- var generate23 = async (ctx) => {
77369
+ var generate25 = async (ctx) => {
77288
77370
  await runFrameworkGenerator(ctx, [ctx.project.name]);
77289
77371
  };
77290
- var config24 = {
77372
+ var config25 = {
77291
77373
  configVersion: 1,
77292
77374
  id: "vue",
77293
77375
  frameworkCli: "create-vue",
77294
77376
  displayName: "Vue",
77295
77377
  platform: "pages",
77296
- generate: generate23,
77378
+ generate: generate25,
77297
77379
  transformPackageJson: async () => ({
77298
77380
  scripts: {
77299
77381
  deploy: `${npm20} run build && wrangler pages deploy ./dist`,
@@ -77304,7 +77386,7 @@ var config24 = {
77304
77386
  deployScript: "deploy",
77305
77387
  previewScript: "preview"
77306
77388
  };
77307
- var c3_default33 = config24;
77389
+ var c3_default35 = config25;
77308
77390
 
77309
77391
  // src/validators.ts
77310
77392
  var import_fs10 = require("fs");
@@ -77394,28 +77476,30 @@ function getFrameworkMap({ experimental = false }) {
77394
77476
  astro: c3_default2,
77395
77477
  docusaurus: c3_default3,
77396
77478
  gatsby: c3_default4,
77397
- nuxt: c3_default8,
77398
- qwik: c3_default9,
77399
- remix: c3_default10,
77400
- solid: c3_default11,
77401
- svelte: c3_default12
77479
+ hono: c3_default8,
77480
+ next: c3_default9,
77481
+ nuxt: c3_default10,
77482
+ qwik: c3_default11,
77483
+ remix: c3_default12,
77484
+ solid: c3_default13,
77485
+ svelte: c3_default14
77402
77486
  };
77403
77487
  } else {
77404
77488
  return {
77405
- analog: c3_default13,
77406
- angular: c3_default14,
77407
- astro: c3_default15,
77408
- docusaurus: c3_default17,
77409
- gatsby: c3_default18,
77410
- hono: c3_default21,
77411
- next: c3_default22,
77412
- nuxt: c3_default23,
77413
- qwik: c3_default27,
77414
- react: c3_default28,
77415
- remix: c3_default29,
77416
- solid: c3_default31,
77417
- svelte: c3_default32,
77418
- vue: c3_default33
77489
+ analog: c3_default15,
77490
+ angular: c3_default16,
77491
+ astro: c3_default17,
77492
+ docusaurus: c3_default19,
77493
+ gatsby: c3_default20,
77494
+ hono: c3_default23,
77495
+ next: c3_default24,
77496
+ nuxt: c3_default25,
77497
+ qwik: c3_default29,
77498
+ react: c3_default30,
77499
+ remix: c3_default31,
77500
+ solid: c3_default33,
77501
+ svelte: c3_default34,
77502
+ vue: c3_default35
77419
77503
  };
77420
77504
  }
77421
77505
  }
@@ -77428,13 +77512,13 @@ function getTemplateMap({ experimental = false }) {
77428
77512
  };
77429
77513
  } else {
77430
77514
  return {
77431
- "hello-world": c3_default20,
77432
- common: c3_default16,
77433
- scheduled: c3_default30,
77434
- queues: c3_default26,
77435
- "hello-world-durable-object": c3_default19,
77436
- openapi: c3_default24,
77437
- "pre-existing": c3_default25
77515
+ "hello-world": c3_default22,
77516
+ common: c3_default18,
77517
+ scheduled: c3_default32,
77518
+ queues: c3_default28,
77519
+ "hello-world-durable-object": c3_default21,
77520
+ openapi: c3_default26,
77521
+ "pre-existing": c3_default27
77438
77522
  };
77439
77523
  }
77440
77524
  }
@@ -77573,8 +77657,8 @@ var createContext = async (args, prevArgs) => {
77573
77657
  experimental: args.experimental
77574
77658
  });
77575
77659
  const frameworkOptions = Object.entries(frameworkMap).map(
77576
- ([key, config25]) => ({
77577
- label: config25.displayName,
77660
+ ([key, config26]) => ({
77661
+ label: config26.displayName,
77578
77662
  value: key
77579
77663
  })
77580
77664
  );
@@ -77712,28 +77796,28 @@ var processRemoteTemplate = async (args) => {
77712
77796
  src = src.replace("https://github.com/", "github:").replace("/tree/main/", "/");
77713
77797
  }
77714
77798
  const path6 = await downloadRemoteTemplate(src);
77715
- const config25 = inferTemplateConfig(path6);
77716
- validateTemplate(path6, config25);
77799
+ const config26 = inferTemplateConfig(path6);
77800
+ validateTemplate(path6, config26);
77717
77801
  updateStatus(`${brandColor("template")} ${dim("cloned and validated")}`);
77718
77802
  return {
77719
77803
  path: path6,
77720
- ...config25
77804
+ ...config26
77721
77805
  };
77722
77806
  };
77723
- var validateTemplate = (path6, config25) => {
77724
- if (!config25.copyFiles) {
77807
+ var validateTemplate = (path6, config26) => {
77808
+ if (!config26.copyFiles) {
77725
77809
  return;
77726
77810
  }
77727
- if (isVariantInfo(config25.copyFiles)) {
77728
- validateTemplateSrcDirectory((0, import_path13.resolve)(path6, config25.copyFiles.path), config25);
77811
+ if (isVariantInfo(config26.copyFiles)) {
77812
+ validateTemplateSrcDirectory((0, import_path13.resolve)(path6, config26.copyFiles.path), config26);
77729
77813
  } else {
77730
- for (const variant of Object.values(config25.copyFiles.variants)) {
77731
- validateTemplateSrcDirectory((0, import_path13.resolve)(path6, variant.path), config25);
77814
+ for (const variant of Object.values(config26.copyFiles.variants)) {
77815
+ validateTemplateSrcDirectory((0, import_path13.resolve)(path6, variant.path), config26);
77732
77816
  }
77733
77817
  }
77734
77818
  };
77735
- var validateTemplateSrcDirectory = (path6, config25) => {
77736
- if (config25.platform === "workers") {
77819
+ var validateTemplateSrcDirectory = (path6, config26) => {
77820
+ if (config26.platform === "workers") {
77737
77821
  const wranglerTomlPath = (0, import_path13.resolve)(path6, "wrangler.toml");
77738
77822
  if (!(0, import_fs11.existsSync)(wranglerTomlPath)) {
77739
77823
  throw new Error(
@@ -79924,8 +80008,8 @@ var renderValues = (values) => {
79924
80008
  };
79925
80009
 
79926
80010
  // src/helpers/retry.ts
79927
- var retry = async (config25, fn) => {
79928
- let { times } = config25;
80011
+ var retry = async (config26, fn) => {
80012
+ let { times } = config26;
79929
80013
  let error2 = null;
79930
80014
  while (times > 0) {
79931
80015
  try {
@@ -79933,7 +80017,7 @@ var retry = async (config25, fn) => {
79933
80017
  } catch (e) {
79934
80018
  error2 = e;
79935
80019
  times--;
79936
- if (config25.exitCondition?.(e)) {
80020
+ if (config26.exitCondition?.(e)) {
79937
80021
  break;
79938
80022
  }
79939
80023
  }
@@ -81362,8 +81446,8 @@ async function addWorkersTypesToTsConfig(ctx) {
81362
81446
  }
81363
81447
  const typesEntrypoint = `@cloudflare/workers-types/${entrypointVersion}`;
81364
81448
  try {
81365
- const config25 = parse3(tsconfig);
81366
- const currentTypes = config25.compilerOptions?.types ?? [];
81449
+ const config26 = parse3(tsconfig);
81450
+ const currentTypes = config26.compilerOptions?.types ?? [];
81367
81451
  const explicitEntrypoint = currentTypes.some(
81368
81452
  (t) => t.match(/@cloudflare\/workers-types\/\d{4}-\d{2}-\d{2}/)
81369
81453
  );
@@ -81438,7 +81522,7 @@ var runCli = async (args) => {
81438
81522
  printBanner();
81439
81523
  const ctx = await createContext(args);
81440
81524
  await create(ctx);
81441
- await configure18(ctx);
81525
+ await configure19(ctx);
81442
81526
  await deploy(ctx);
81443
81527
  printSummary(ctx);
81444
81528
  logRaw("");
@@ -81466,7 +81550,7 @@ var create = async (ctx) => {
81466
81550
  await rectifyPmMismatch(ctx);
81467
81551
  endSection(`Application created`);
81468
81552
  };
81469
- var configure18 = async (ctx) => {
81553
+ var configure19 = async (ctx) => {
81470
81554
  startSection("Configuring your application for Cloudflare", "Step 2 of 3");
81471
81555
  await installWrangler();
81472
81556
  await installWorkersTypes(ctx);