create-cloudflare 2.28.1 → 2.29.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/cli.js +405 -311
  2. package/package.json +3 -3
  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.1";
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
  }
@@ -74381,18 +74381,24 @@ var SPARROW_URL = "https://sparrow.cloudflare.com";
74381
74381
  function hasSparrowSourceKey() {
74382
74382
  return SPARROW_SOURCE_KEY !== "";
74383
74383
  }
74384
- async function sendEvent(payload) {
74385
- if (process.env.CREATE_CLOUDFLARE_TELEMETRY_DEBUG === "1") {
74384
+ async function sendEvent(payload, enableLog) {
74385
+ if (enableLog) {
74386
74386
  console.log("[telemetry]", JSON.stringify(payload, null, 2));
74387
74387
  }
74388
- await (0, import_undici.fetch)(`${SPARROW_URL}/api/v1/event`, {
74389
- method: "POST",
74390
- headers: {
74391
- "Content-Type": "application/json",
74392
- "Sparrow-Source-Key": SPARROW_SOURCE_KEY
74393
- },
74394
- body: JSON.stringify(payload)
74395
- });
74388
+ try {
74389
+ await (0, import_undici.fetch)(`${SPARROW_URL}/api/v1/event`, {
74390
+ method: "POST",
74391
+ headers: {
74392
+ "Content-Type": "application/json",
74393
+ "Sparrow-Source-Key": SPARROW_SOURCE_KEY
74394
+ },
74395
+ body: JSON.stringify(payload)
74396
+ });
74397
+ } catch (error2) {
74398
+ if (enableLog) {
74399
+ console.log("[telemetry]", error2);
74400
+ }
74401
+ }
74396
74402
  }
74397
74403
 
74398
74404
  // src/metrics.ts
@@ -74424,39 +74430,43 @@ function getPlatform() {
74424
74430
  function createReporter() {
74425
74431
  const events = [];
74426
74432
  const als = new import_node_async_hooks.AsyncLocalStorage();
74427
- const config25 = readMetricsConfig() ?? {};
74428
- const isFirstUsage = config25.c3permission === void 0;
74433
+ const config26 = readMetricsConfig() ?? {};
74434
+ const isFirstUsage = config26.c3permission === void 0;
74429
74435
  const isEnabled = isTelemetryEnabled();
74430
- const deviceId = getDeviceId(config25);
74436
+ const deviceId = getDeviceId(config26);
74431
74437
  const packageManager = detectPackageManager();
74432
74438
  const platform3 = getPlatform();
74433
74439
  const amplitude_session_id = Date.now();
74440
+ const enableLog = process.env.CREATE_CLOUDFLARE_TELEMETRY_DEBUG === "1";
74434
74441
  let amplitude_event_id = 0;
74435
74442
  function sendEvent2(name, properties) {
74436
74443
  if (!isEnabled) {
74437
74444
  return;
74438
74445
  }
74439
- const request2 = sendEvent({
74440
- event: name,
74441
- deviceId,
74442
- timestamp: Date.now(),
74443
- properties: {
74444
- amplitude_session_id,
74445
- amplitude_event_id: amplitude_event_id++,
74446
- platform: platform3,
74447
- c3Version: version,
74448
- isFirstUsage,
74449
- packageManager: packageManager.name,
74450
- ...properties
74451
- }
74452
- });
74446
+ const request2 = sendEvent(
74447
+ {
74448
+ event: name,
74449
+ deviceId,
74450
+ timestamp: Date.now(),
74451
+ properties: {
74452
+ amplitude_session_id,
74453
+ amplitude_event_id: amplitude_event_id++,
74454
+ platform: platform3,
74455
+ c3Version: version,
74456
+ isFirstUsage,
74457
+ packageManager: packageManager.name,
74458
+ ...properties
74459
+ }
74460
+ },
74461
+ enableLog
74462
+ );
74453
74463
  events.push(request2);
74454
74464
  }
74455
74465
  function isTelemetryEnabled() {
74456
74466
  if (process.env.CREATE_CLOUDFLARE_TELEMETRY_DISABLED === "1") {
74457
74467
  return false;
74458
74468
  }
74459
- return hasSparrowSourceKey() && getC3Permission(config25).enabled;
74469
+ return hasSparrowSourceKey() && getC3Permission(config26).enabled;
74460
74470
  }
74461
74471
  async function waitForAllEventsSettled() {
74462
74472
  await Promise.allSettled(events);
@@ -74562,20 +74572,20 @@ function initializeC3Permission(enabled = true) {
74562
74572
  date: /* @__PURE__ */ new Date()
74563
74573
  };
74564
74574
  }
74565
- function getC3Permission(config25 = readMetricsConfig() ?? {}) {
74566
- if (!config25.c3permission) {
74567
- config25.c3permission = initializeC3Permission();
74568
- writeMetricsConfig(config25);
74575
+ function getC3Permission(config26 = readMetricsConfig() ?? {}) {
74576
+ if (!config26.c3permission) {
74577
+ config26.c3permission = initializeC3Permission();
74578
+ writeMetricsConfig(config26);
74569
74579
  }
74570
- return config25.c3permission;
74580
+ return config26.c3permission;
74571
74581
  }
74572
74582
  function updateC3Pemission(enabled) {
74573
- const config25 = readMetricsConfig();
74574
- if (config25.c3permission?.enabled === enabled) {
74583
+ const config26 = readMetricsConfig();
74584
+ if (config26.c3permission?.enabled === enabled) {
74575
74585
  return;
74576
74586
  }
74577
- config25.c3permission = initializeC3Permission(enabled);
74578
- writeMetricsConfig(config25);
74587
+ config26.c3permission = initializeC3Permission(enabled);
74588
+ writeMetricsConfig(config26);
74579
74589
  }
74580
74590
  var runTelemetryCommand = (action) => {
74581
74591
  const logTelemetryStatus = (enabled) => {
@@ -74620,28 +74630,28 @@ var import_haikunator = __toESM(require_dist_web());
74620
74630
  var import_fs6 = require("fs");
74621
74631
  var import_path6 = __toESM(require("path"));
74622
74632
  var import_undici2 = __toESM(require_undici());
74623
- var installPackages = async (packages, config25 = {}) => {
74633
+ var installPackages = async (packages, config26 = {}) => {
74624
74634
  const { npm: npm22 } = detectPackageManager();
74625
74635
  let saveFlag;
74626
74636
  let cmd;
74627
74637
  switch (npm22) {
74628
74638
  case "yarn":
74629
74639
  cmd = "add";
74630
- saveFlag = config25.dev ? "-D" : "";
74640
+ saveFlag = config26.dev ? "-D" : "";
74631
74641
  break;
74632
74642
  case "bun":
74633
74643
  cmd = "add";
74634
- saveFlag = config25.dev ? "-d" : "";
74644
+ saveFlag = config26.dev ? "-d" : "";
74635
74645
  break;
74636
74646
  case "npm":
74637
74647
  case "pnpm":
74638
74648
  default:
74639
74649
  cmd = "install";
74640
- saveFlag = config25.dev ? "--save-dev" : "";
74650
+ saveFlag = config26.dev ? "--save-dev" : "";
74641
74651
  break;
74642
74652
  }
74643
74653
  await runCommand([npm22, cmd, ...saveFlag ? [saveFlag] : [], ...packages], {
74644
- ...config25,
74654
+ ...config26,
74645
74655
  silent: true
74646
74656
  });
74647
74657
  };
@@ -74828,7 +74838,7 @@ var usesEslint = (ctx) => {
74828
74838
  var import_node_path3 = require("node:path");
74829
74839
 
74830
74840
  // ../wrangler/package.json
74831
- var version2 = "3.78.9";
74841
+ var version2 = "3.78.12";
74832
74842
 
74833
74843
  // src/git.ts
74834
74844
  var offerGit = async (ctx) => {
@@ -75437,6 +75447,88 @@ var c3_default7 = {
75437
75447
  }
75438
75448
  };
75439
75449
 
75450
+ // templates-experimental/hono/c3.ts
75451
+ var generate5 = async (ctx) => {
75452
+ const { name: pm4 } = detectPackageManager();
75453
+ await runFrameworkGenerator(ctx, [
75454
+ ctx.project.name,
75455
+ "--template",
75456
+ "cloudflare-workers",
75457
+ "--install",
75458
+ "--pm",
75459
+ pm4
75460
+ ]);
75461
+ logRaw("");
75462
+ };
75463
+ var config7 = {
75464
+ configVersion: 1,
75465
+ id: "hono",
75466
+ frameworkCli: "create-hono",
75467
+ displayName: "Hono",
75468
+ copyFiles: {
75469
+ path: "./templates"
75470
+ },
75471
+ platform: "workers",
75472
+ path: "templates-experimental/hono",
75473
+ generate: generate5,
75474
+ transformPackageJson: async () => ({
75475
+ scripts: {
75476
+ dev: "wrangler dev",
75477
+ deploy: "wrangler deploy --minify",
75478
+ "cf-typegen": "wrangler types --env-interface CloudflareBindings"
75479
+ }
75480
+ }),
75481
+ devScript: "dev",
75482
+ deployScript: "deploy"
75483
+ };
75484
+ var c3_default8 = config7;
75485
+
75486
+ // templates-experimental/next/c3.ts
75487
+ var generate6 = async (ctx) => {
75488
+ await runFrameworkGenerator(ctx, [
75489
+ ctx.project.name,
75490
+ "--ts",
75491
+ "--tailwind",
75492
+ "--eslint",
75493
+ "--app",
75494
+ "--import-alias",
75495
+ "@/*",
75496
+ "--src-dir"
75497
+ ]);
75498
+ };
75499
+ var configure3 = async () => {
75500
+ const packages = ["@opennextjs/cloudflare", "@cloudflare/workers-types"];
75501
+ await installPackages(packages, {
75502
+ dev: true,
75503
+ startText: "Adding the Cloudflare adapter",
75504
+ doneText: `${brandColor(`installed`)} ${dim(packages.join(", "))}`
75505
+ });
75506
+ };
75507
+ var c3_default9 = {
75508
+ configVersion: 1,
75509
+ id: "next",
75510
+ frameworkCli: "create-next-app",
75511
+ platform: "workers",
75512
+ displayName: "Next (using Node.js compat + Workers Assets)",
75513
+ path: "templates-experimental/next",
75514
+ copyFiles: {
75515
+ path: "./templates"
75516
+ },
75517
+ generate: generate6,
75518
+ configure: configure3,
75519
+ transformPackageJson: async () => ({
75520
+ scripts: {
75521
+ deploy: `cloudflare && wrangler deploy`,
75522
+ preview: `cloudflare && wrangler dev`,
75523
+ "cf-typegen": `wrangler types --env-interface CloudflareEnv env.d.ts`
75524
+ }
75525
+ }),
75526
+ devScript: "dev",
75527
+ previewScript: "preview",
75528
+ deployScript: "deploy",
75529
+ compatibilityFlags: ["nodejs_compat"]
75530
+ };
75531
+
75440
75532
  // src/helpers/compatDate.ts
75441
75533
  var import_fs9 = require("fs");
75442
75534
  var import_path9 = require("path");
@@ -75488,7 +75580,7 @@ function getLatestTypesEntrypoint(ctx) {
75488
75580
  // templates-experimental/nuxt/c3.ts
75489
75581
  var recast3 = __toESM(require_main3());
75490
75582
  var { npm: npm4, name: pm } = detectPackageManager();
75491
- var generate5 = async (ctx) => {
75583
+ var generate7 = async (ctx) => {
75492
75584
  const gitFlag = ctx.args.git ? `--gitInit` : `--no-gitInit`;
75493
75585
  await runFrameworkGenerator(ctx, [
75494
75586
  "init",
@@ -75500,7 +75592,7 @@ var generate5 = async (ctx) => {
75500
75592
  writeFile2("./.node-version", "17");
75501
75593
  logRaw("");
75502
75594
  };
75503
- var configure3 = async (ctx) => {
75595
+ var configure4 = async (ctx) => {
75504
75596
  const packages = ["nitro-cloudflare-dev", "nitropack"];
75505
75597
  if (pm === "pnpm") {
75506
75598
  packages.push("h3");
@@ -75559,7 +75651,7 @@ var updateNuxtConfig = () => {
75559
75651
  });
75560
75652
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
75561
75653
  };
75562
- var config7 = {
75654
+ var config8 = {
75563
75655
  configVersion: 1,
75564
75656
  id: "nuxt",
75565
75657
  frameworkCli: "nuxi",
@@ -75569,8 +75661,8 @@ var config7 = {
75569
75661
  path: "./templates"
75570
75662
  },
75571
75663
  path: "templates-experimental/nuxt",
75572
- generate: generate5,
75573
- configure: configure3,
75664
+ generate: generate7,
75665
+ configure: configure4,
75574
75666
  transformPackageJson: async () => ({
75575
75667
  scripts: {
75576
75668
  deploy: `${npm4} run build && wrangler deploy`,
@@ -75582,15 +75674,15 @@ var config7 = {
75582
75674
  deployScript: "deploy",
75583
75675
  previewScript: "preview"
75584
75676
  };
75585
- var c3_default8 = config7;
75677
+ var c3_default10 = config8;
75586
75678
 
75587
75679
  // templates-experimental/qwik/c3.ts
75588
75680
  var recast4 = __toESM(require_main3());
75589
75681
  var { npm: npm5, npx: npx2 } = detectPackageManager();
75590
- var generate6 = async (ctx) => {
75682
+ var generate8 = async (ctx) => {
75591
75683
  await runFrameworkGenerator(ctx, ["playground", ctx.project.name]);
75592
75684
  };
75593
- var configure4 = async (ctx) => {
75685
+ var configure5 = async (ctx) => {
75594
75686
  const cmd = [npx2, "qwik", "add", "cloudflare-pages"];
75595
75687
  endSection(`Running ${quoteShellArgs(cmd)}`);
75596
75688
  await runCommand(cmd);
@@ -75670,7 +75762,7 @@ var populateCloudflareEnv = () => {
75670
75762
  });
75671
75763
  s.stop(`${brandColor("updated")} \`${entrypointPath}\``);
75672
75764
  };
75673
- var config8 = {
75765
+ var config9 = {
75674
75766
  configVersion: 1,
75675
75767
  id: "qwik",
75676
75768
  frameworkCli: "create-qwik",
@@ -75680,8 +75772,8 @@ var config8 = {
75680
75772
  path: "./templates"
75681
75773
  },
75682
75774
  path: "templates-experimental/qwik",
75683
- generate: generate6,
75684
- configure: configure4,
75775
+ generate: generate8,
75776
+ configure: configure5,
75685
75777
  transformPackageJson: async () => ({
75686
75778
  scripts: {
75687
75779
  deploy: `${npm5} run build && wrangler deploy`,
@@ -75693,11 +75785,11 @@ var config8 = {
75693
75785
  deployScript: "deploy",
75694
75786
  previewScript: "preview"
75695
75787
  };
75696
- var c3_default9 = config8;
75788
+ var c3_default11 = config9;
75697
75789
 
75698
75790
  // templates-experimental/remix/c3.ts
75699
75791
  var { npm: npm6 } = detectPackageManager();
75700
- var generate7 = async (ctx) => {
75792
+ var generate9 = async (ctx) => {
75701
75793
  await runFrameworkGenerator(ctx, [
75702
75794
  ctx.project.name,
75703
75795
  "--template",
@@ -75705,7 +75797,7 @@ var generate7 = async (ctx) => {
75705
75797
  ]);
75706
75798
  logRaw("");
75707
75799
  };
75708
- var configure5 = async () => {
75800
+ var configure6 = async () => {
75709
75801
  await installPackages(["wrangler@latest"], {
75710
75802
  dev: true,
75711
75803
  startText: "Updating the Wrangler version",
@@ -75725,7 +75817,7 @@ var configure5 = async () => {
75725
75817
  });
75726
75818
  s.stop(`${brandColor("updated")} \`${dim(typeDefsPath)}\``);
75727
75819
  };
75728
- var config9 = {
75820
+ var config10 = {
75729
75821
  configVersion: 1,
75730
75822
  id: "remix",
75731
75823
  frameworkCli: "create-remix",
@@ -75735,8 +75827,8 @@ var config9 = {
75735
75827
  path: "./templates"
75736
75828
  },
75737
75829
  path: "templates-experimental/remix",
75738
- generate: generate7,
75739
- configure: configure5,
75830
+ generate: generate9,
75831
+ configure: configure6,
75740
75832
  transformPackageJson: async () => ({
75741
75833
  scripts: {
75742
75834
  build: "remix vite:build && wrangler pages functions build --outdir build/worker",
@@ -75749,16 +75841,16 @@ var config9 = {
75749
75841
  deployScript: "deploy",
75750
75842
  previewScript: "preview"
75751
75843
  };
75752
- var c3_default10 = config9;
75844
+ var c3_default12 = config10;
75753
75845
 
75754
75846
  // templates-experimental/solid/c3.ts
75755
75847
  var recast5 = __toESM(require_main3());
75756
75848
  var { npm: npm7 } = detectPackageManager();
75757
- var generate8 = async (ctx) => {
75849
+ var generate10 = async (ctx) => {
75758
75850
  await runFrameworkGenerator(ctx, ["-p", ctx.project.name, "-s"]);
75759
75851
  logRaw("");
75760
75852
  };
75761
- var configure6 = async (ctx) => {
75853
+ var configure7 = async (ctx) => {
75762
75854
  const packages = ["nitropack"];
75763
75855
  await installPackages(packages, {
75764
75856
  dev: true,
@@ -75844,7 +75936,7 @@ var configure6 = async (ctx) => {
75844
75936
  }
75845
75937
  });
75846
75938
  };
75847
- var config10 = {
75939
+ var config11 = {
75848
75940
  configVersion: 1,
75849
75941
  id: "solid",
75850
75942
  frameworkCli: "create-solid",
@@ -75854,8 +75946,8 @@ var config10 = {
75854
75946
  path: "./templates"
75855
75947
  },
75856
75948
  path: "templates-experimental/solid",
75857
- generate: generate8,
75858
- configure: configure6,
75949
+ generate: generate10,
75950
+ configure: configure7,
75859
75951
  transformPackageJson: async () => ({
75860
75952
  scripts: {
75861
75953
  preview: `${npm7} run build && npx wrangler dev`,
@@ -75867,17 +75959,17 @@ var config10 = {
75867
75959
  deployScript: "deploy",
75868
75960
  previewScript: "preview"
75869
75961
  };
75870
- var c3_default11 = config10;
75962
+ var c3_default13 = config11;
75871
75963
 
75872
75964
  // templates-experimental/svelte/c3.ts
75873
75965
  var import_node_os3 = require("node:os");
75874
75966
  var recast6 = __toESM(require_main3());
75875
75967
  var { npm: npm8 } = detectPackageManager();
75876
- var generate9 = async (ctx) => {
75968
+ var generate11 = async (ctx) => {
75877
75969
  await runFrameworkGenerator(ctx, [ctx.project.name]);
75878
75970
  logRaw("");
75879
75971
  };
75880
- var configure7 = async (ctx) => {
75972
+ var configure8 = async (ctx) => {
75881
75973
  const pkg = `@sveltejs/adapter-cloudflare`;
75882
75974
  await installPackages([pkg], {
75883
75975
  dev: true,
@@ -75936,7 +76028,7 @@ var updateTypeDefinitions = (ctx) => {
75936
76028
  }
75937
76029
  });
75938
76030
  };
75939
- var config11 = {
76031
+ var config12 = {
75940
76032
  configVersion: 1,
75941
76033
  id: "svelte",
75942
76034
  frameworkCli: "create-svelte",
@@ -75949,8 +76041,8 @@ var config11 = {
75949
76041
  }
75950
76042
  },
75951
76043
  path: "templates-experimental/svelte",
75952
- generate: generate9,
75953
- configure: configure7,
76044
+ generate: generate11,
76045
+ configure: configure8,
75954
76046
  transformPackageJson: async (original, ctx) => {
75955
76047
  let scripts = {
75956
76048
  preview: `${npm8} run build && wrangler dev`,
@@ -75969,12 +76061,12 @@ var config11 = {
75969
76061
  deployScript: "deploy",
75970
76062
  previewScript: "preview"
75971
76063
  };
75972
- var c3_default12 = config11;
76064
+ var c3_default14 = config12;
75973
76065
 
75974
76066
  // templates/analog/c3.ts
75975
76067
  var recast7 = __toESM(require_main3());
75976
76068
  var { npm: npm9, name: pm2 } = detectPackageManager();
75977
- var generate10 = async (ctx) => {
76069
+ var generate12 = async (ctx) => {
75978
76070
  await runFrameworkGenerator(ctx, [
75979
76071
  ctx.project.name,
75980
76072
  "--template",
@@ -75982,7 +76074,7 @@ var generate10 = async (ctx) => {
75982
76074
  ]);
75983
76075
  logRaw("");
75984
76076
  };
75985
- var configure8 = async (ctx) => {
76077
+ var configure9 = async (ctx) => {
75986
76078
  if (pm2 === "pnpm" || pm2 === "yarn" || pm2 === "bun") {
75987
76079
  const packages = [];
75988
76080
  packages.push("nitropack");
@@ -76050,7 +76142,7 @@ var updateViteConfig = (ctx) => {
76050
76142
  });
76051
76143
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
76052
76144
  };
76053
- var config12 = {
76145
+ var config13 = {
76054
76146
  configVersion: 1,
76055
76147
  id: "analog",
76056
76148
  frameworkCli: "create-analog",
@@ -76059,8 +76151,8 @@ var config12 = {
76059
76151
  copyFiles: {
76060
76152
  path: "./templates"
76061
76153
  },
76062
- generate: generate10,
76063
- configure: configure8,
76154
+ generate: generate12,
76155
+ configure: configure9,
76064
76156
  transformPackageJson: async () => ({
76065
76157
  scripts: {
76066
76158
  preview: `${npm9} run build && wrangler pages dev`,
@@ -76072,16 +76164,16 @@ var config12 = {
76072
76164
  deployScript: "deploy",
76073
76165
  previewScript: "preview"
76074
76166
  };
76075
- var c3_default13 = config12;
76167
+ var c3_default15 = config13;
76076
76168
 
76077
76169
  // templates/angular/c3.ts
76078
76170
  var import_node_path4 = require("node:path");
76079
76171
  var { npm: npm10 } = detectPackageManager();
76080
- var generate11 = async (ctx) => {
76172
+ var generate13 = async (ctx) => {
76081
76173
  await runFrameworkGenerator(ctx, [ctx.project.name, "--ssr"]);
76082
76174
  logRaw("");
76083
76175
  };
76084
- var configure9 = async (ctx) => {
76176
+ var configure10 = async (ctx) => {
76085
76177
  updateAngularJson2(ctx);
76086
76178
  await updateAppCode2();
76087
76179
  await installCFWorker2();
@@ -76126,7 +76218,7 @@ function updateAngularJson2(ctx) {
76126
76218
  writeFile2((0, import_node_path4.resolve)("angular.json"), JSON.stringify(angularJson, null, 2));
76127
76219
  s.stop(`${brandColor(`updated`)} ${dim(`\`angular.json\``)}`);
76128
76220
  }
76129
- var config13 = {
76221
+ var config14 = {
76130
76222
  configVersion: 1,
76131
76223
  id: "angular",
76132
76224
  frameworkCli: "@angular/create",
@@ -76137,8 +76229,8 @@ var config13 = {
76137
76229
  },
76138
76230
  devScript: "start",
76139
76231
  deployScript: "deploy",
76140
- generate: generate11,
76141
- configure: configure9,
76232
+ generate: generate13,
76233
+ configure: configure10,
76142
76234
  transformPackageJson: async () => ({
76143
76235
  scripts: {
76144
76236
  start: `${npm10} run build && wrangler pages dev dist/cloudflare ${await compatDateFlag()} --experimental-local`,
@@ -76148,16 +76240,16 @@ var config13 = {
76148
76240
  }
76149
76241
  })
76150
76242
  };
76151
- var c3_default14 = config13;
76243
+ var c3_default16 = config14;
76152
76244
 
76153
76245
  // templates/astro/c3.ts
76154
76246
  var recast8 = __toESM(require_main3());
76155
76247
  var { npx: npx3 } = detectPackageManager();
76156
- var generate12 = async (ctx) => {
76248
+ var generate14 = async (ctx) => {
76157
76249
  await runFrameworkGenerator(ctx, [ctx.project.name, "--no-install"]);
76158
76250
  logRaw("");
76159
76251
  };
76160
- var configure10 = async (ctx) => {
76252
+ var configure11 = async (ctx) => {
76161
76253
  await runCommand([npx3, "astro", "add", "cloudflare", "-y"], {
76162
76254
  silent: true,
76163
76255
  startText: "Installing adapter",
@@ -76212,7 +76304,7 @@ var updateEnvDeclaration2 = (ctx) => {
76212
76304
  }
76213
76305
  });
76214
76306
  };
76215
- var config14 = {
76307
+ var config15 = {
76216
76308
  configVersion: 1,
76217
76309
  id: "astro",
76218
76310
  frameworkCli: "create-astro",
@@ -76224,8 +76316,8 @@ var config14 = {
76224
76316
  devScript: "dev",
76225
76317
  deployScript: "deploy",
76226
76318
  previewScript: "preview",
76227
- generate: generate12,
76228
- configure: configure10,
76319
+ generate: generate14,
76320
+ configure: configure11,
76229
76321
  transformPackageJson: async (pkgJson, ctx) => ({
76230
76322
  scripts: {
76231
76323
  deploy: `astro build && wrangler pages deploy`,
@@ -76234,10 +76326,10 @@ var config14 = {
76234
76326
  }
76235
76327
  })
76236
76328
  };
76237
- var c3_default15 = config14;
76329
+ var c3_default17 = config15;
76238
76330
 
76239
76331
  // templates/common/c3.ts
76240
- var c3_default16 = {
76332
+ var c3_default18 = {
76241
76333
  configVersion: 1,
76242
76334
  id: "common",
76243
76335
  displayName: "Example router & proxy Worker",
@@ -76258,16 +76350,16 @@ var c3_default16 = {
76258
76350
 
76259
76351
  // templates/docusaurus/c3.ts
76260
76352
  var { npm: npm11 } = detectPackageManager();
76261
- var generate13 = async (ctx) => {
76353
+ var generate15 = async (ctx) => {
76262
76354
  await runFrameworkGenerator(ctx, [ctx.project.name, "classic"]);
76263
76355
  };
76264
- var config15 = {
76356
+ var config16 = {
76265
76357
  configVersion: 1,
76266
76358
  id: "docusaurus",
76267
76359
  frameworkCli: "create-docusaurus",
76268
76360
  platform: "pages",
76269
76361
  displayName: "Docusaurus",
76270
- generate: generate13,
76362
+ generate: generate15,
76271
76363
  transformPackageJson: async () => ({
76272
76364
  scripts: {
76273
76365
  deploy: `${npm11} run build && wrangler pages deploy ./build`
@@ -76276,11 +76368,11 @@ var config15 = {
76276
76368
  devScript: "start",
76277
76369
  deployScript: "deploy"
76278
76370
  };
76279
- var c3_default17 = config15;
76371
+ var c3_default19 = config16;
76280
76372
 
76281
76373
  // templates/gatsby/c3.ts
76282
76374
  var { npm: npm12 } = detectPackageManager();
76283
- var generate14 = async (ctx) => {
76375
+ var generate16 = async (ctx) => {
76284
76376
  const defaultTemplate = "https://github.com/gatsbyjs/gatsby-starter-blog";
76285
76377
  const useTemplate = await inputPrompt({
76286
76378
  type: "confirm",
@@ -76299,13 +76391,13 @@ var generate14 = async (ctx) => {
76299
76391
  }
76300
76392
  await runFrameworkGenerator(ctx, ["new", ctx.project.name, templateUrl]);
76301
76393
  };
76302
- var config16 = {
76394
+ var config17 = {
76303
76395
  configVersion: 1,
76304
76396
  id: "gatsby",
76305
76397
  frameworkCli: "gatsby",
76306
76398
  platform: "pages",
76307
76399
  displayName: "Gatsby",
76308
- generate: generate14,
76400
+ generate: generate16,
76309
76401
  transformPackageJson: async () => ({
76310
76402
  scripts: {
76311
76403
  deploy: `${npm12} run build && wrangler pages deploy ./public`,
@@ -76316,10 +76408,10 @@ var config16 = {
76316
76408
  deployScript: "deploy",
76317
76409
  previewScript: "preview"
76318
76410
  };
76319
- var c3_default18 = config16;
76411
+ var c3_default20 = config17;
76320
76412
 
76321
76413
  // templates/hello-world-durable-object/c3.ts
76322
- var c3_default19 = {
76414
+ var c3_default21 = {
76323
76415
  configVersion: 1,
76324
76416
  id: "hello-world-durable-object",
76325
76417
  displayName: "Hello World Worker Using Durable Objects",
@@ -76338,7 +76430,7 @@ var c3_default19 = {
76338
76430
  };
76339
76431
 
76340
76432
  // templates/hello-world/c3.ts
76341
- var c3_default20 = {
76433
+ var c3_default22 = {
76342
76434
  configVersion: 1,
76343
76435
  id: "hello-world",
76344
76436
  displayName: "Hello World Worker",
@@ -76360,7 +76452,7 @@ var c3_default20 = {
76360
76452
  };
76361
76453
 
76362
76454
  // templates/hono/c3.ts
76363
- var generate15 = async (ctx) => {
76455
+ var generate17 = async (ctx) => {
76364
76456
  const { name: pm4 } = detectPackageManager();
76365
76457
  await runFrameworkGenerator(ctx, [
76366
76458
  ctx.project.name,
@@ -76372,7 +76464,7 @@ var generate15 = async (ctx) => {
76372
76464
  ]);
76373
76465
  logRaw("");
76374
76466
  };
76375
- var configure11 = async (ctx) => {
76467
+ var configure12 = async (ctx) => {
76376
76468
  const indexFile = "src/index.ts";
76377
76469
  const s = spinner();
76378
76470
  s.start(`Updating \`${indexFile}\``);
@@ -76387,7 +76479,7 @@ var configure11 = async (ctx) => {
76387
76479
  });
76388
76480
  s.stop(`${brandColor("updated")} \`${dim(indexFile)}\``);
76389
76481
  };
76390
- var config17 = {
76482
+ var config18 = {
76391
76483
  configVersion: 1,
76392
76484
  id: "hono",
76393
76485
  frameworkCli: "create-hono",
@@ -76396,8 +76488,8 @@ var config17 = {
76396
76488
  path: "./templates"
76397
76489
  },
76398
76490
  platform: "workers",
76399
- generate: generate15,
76400
- configure: configure11,
76491
+ generate: generate17,
76492
+ configure: configure12,
76401
76493
  transformPackageJson: async () => ({
76402
76494
  scripts: {
76403
76495
  dev: "wrangler dev",
@@ -76408,12 +76500,12 @@ var config17 = {
76408
76500
  devScript: "dev",
76409
76501
  deployScript: "deploy"
76410
76502
  };
76411
- var c3_default21 = config17;
76503
+ var c3_default23 = config18;
76412
76504
 
76413
76505
  // templates/next/c3.ts
76414
76506
  var import_path10 = require("path");
76415
76507
  var { npm: npm13, npx: npx4 } = detectPackageManager();
76416
- var generate16 = async (ctx) => {
76508
+ var generate18 = async (ctx) => {
76417
76509
  const projectName = ctx.project.name;
76418
76510
  await runFrameworkGenerator(ctx, [projectName]);
76419
76511
  const wranglerToml = readFile((0, import_path10.join)(getTemplatePath(ctx), "wrangler.toml"));
@@ -76446,7 +76538,7 @@ var updateNextConfig = () => {
76446
76538
  writeFile2(configFile, updatedConfigFile);
76447
76539
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
76448
76540
  };
76449
- var configure12 = async (ctx) => {
76541
+ var configure13 = async (ctx) => {
76450
76542
  const projectPath = ctx.project.path;
76451
76543
  const path6 = probePaths([
76452
76544
  `${projectPath}/pages/api`,
@@ -76521,14 +76613,14 @@ var addDevDependencies = async (installEslintPlugin) => {
76521
76613
  doneText: `${brandColor(`installed`)} ${dim(packages.join(", "))}`
76522
76614
  });
76523
76615
  };
76524
- var c3_default22 = {
76616
+ var c3_default24 = {
76525
76617
  configVersion: 1,
76526
76618
  id: "next",
76527
76619
  frameworkCli: "create-next-app",
76528
76620
  platform: "pages",
76529
76621
  displayName: "Next",
76530
- generate: generate16,
76531
- configure: configure12,
76622
+ generate: generate18,
76623
+ configure: configure13,
76532
76624
  copyFiles: {
76533
76625
  async selectVariant(ctx) {
76534
76626
  const isApp = probePaths([
@@ -76586,7 +76678,7 @@ var c3_default22 = {
76586
76678
  // templates/nuxt/c3.ts
76587
76679
  var recast9 = __toESM(require_main3());
76588
76680
  var { npm: npm14, name: pm3 } = detectPackageManager();
76589
- var generate17 = async (ctx) => {
76681
+ var generate19 = async (ctx) => {
76590
76682
  const gitFlag = ctx.args.git ? `--gitInit` : `--no-gitInit`;
76591
76683
  await runFrameworkGenerator(ctx, [
76592
76684
  "init",
@@ -76598,7 +76690,7 @@ var generate17 = async (ctx) => {
76598
76690
  writeFile2("./.node-version", "17");
76599
76691
  logRaw("");
76600
76692
  };
76601
- var configure13 = async (ctx) => {
76693
+ var configure14 = async (ctx) => {
76602
76694
  const packages = ["nitro-cloudflare-dev"];
76603
76695
  if (pm3 === "pnpm") {
76604
76696
  packages.push("h3");
@@ -76657,7 +76749,7 @@ var updateNuxtConfig2 = () => {
76657
76749
  });
76658
76750
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
76659
76751
  };
76660
- var config18 = {
76752
+ var config19 = {
76661
76753
  configVersion: 1,
76662
76754
  id: "nuxt",
76663
76755
  frameworkCli: "nuxi",
@@ -76666,8 +76758,8 @@ var config18 = {
76666
76758
  copyFiles: {
76667
76759
  path: "./templates"
76668
76760
  },
76669
- generate: generate17,
76670
- configure: configure13,
76761
+ generate: generate19,
76762
+ configure: configure14,
76671
76763
  transformPackageJson: async () => ({
76672
76764
  scripts: {
76673
76765
  deploy: `${npm14} run build && wrangler pages deploy`,
@@ -76679,10 +76771,10 @@ var config18 = {
76679
76771
  deployScript: "deploy",
76680
76772
  previewScript: "preview"
76681
76773
  };
76682
- var c3_default23 = config18;
76774
+ var c3_default25 = config19;
76683
76775
 
76684
76776
  // templates/openapi/c3.ts
76685
- var c3_default24 = {
76777
+ var c3_default26 = {
76686
76778
  configVersion: 1,
76687
76779
  id: "openapi",
76688
76780
  displayName: "API starter (OpenAPI compliant)",
@@ -76842,7 +76934,7 @@ async function copyExistingWorkerFiles(ctx) {
76842
76934
  (0, import_path11.join)(ctx.project.path, "wrangler.toml")
76843
76935
  );
76844
76936
  }
76845
- var c3_default25 = {
76937
+ var c3_default27 = {
76846
76938
  configVersion: 1,
76847
76939
  id: "pre-existing",
76848
76940
  displayName: "Pre-existing Worker (from Dashboard)",
@@ -76858,7 +76950,7 @@ var c3_default25 = {
76858
76950
  };
76859
76951
 
76860
76952
  // templates/queues/c3.ts
76861
- var c3_default26 = {
76953
+ var c3_default28 = {
76862
76954
  configVersion: 1,
76863
76955
  id: "queues",
76864
76956
  displayName: "Queue consumer & producer Worker",
@@ -76889,10 +76981,10 @@ var c3_default26 = {
76889
76981
  // templates/qwik/c3.ts
76890
76982
  var recast10 = __toESM(require_main3());
76891
76983
  var { npm: npm15, npx: npx5 } = detectPackageManager();
76892
- var generate18 = async (ctx) => {
76984
+ var generate20 = async (ctx) => {
76893
76985
  await runFrameworkGenerator(ctx, ["playground", ctx.project.name]);
76894
76986
  };
76895
- var configure14 = async (ctx) => {
76987
+ var configure15 = async (ctx) => {
76896
76988
  const cmd = [npx5, "qwik", "add", "cloudflare-pages"];
76897
76989
  endSection(`Running ${quoteShellArgs(cmd)}`);
76898
76990
  await runCommand(cmd);
@@ -76969,7 +77061,7 @@ var populateCloudflareEnv2 = () => {
76969
77061
  });
76970
77062
  s.stop(`${brandColor("updated")} \`${entrypointPath}\``);
76971
77063
  };
76972
- var config19 = {
77064
+ var config20 = {
76973
77065
  configVersion: 1,
76974
77066
  id: "qwik",
76975
77067
  frameworkCli: "create-qwik",
@@ -76978,8 +77070,8 @@ var config19 = {
76978
77070
  copyFiles: {
76979
77071
  path: "./templates"
76980
77072
  },
76981
- generate: generate18,
76982
- configure: configure14,
77073
+ generate: generate20,
77074
+ configure: configure15,
76983
77075
  transformPackageJson: async () => ({
76984
77076
  scripts: {
76985
77077
  deploy: `${npm15} run build && wrangler pages deploy`,
@@ -76991,11 +77083,11 @@ var config19 = {
76991
77083
  deployScript: "deploy",
76992
77084
  previewScript: "preview"
76993
77085
  };
76994
- var c3_default27 = config19;
77086
+ var c3_default29 = config20;
76995
77087
 
76996
77088
  // templates/react/c3.ts
76997
77089
  var { npm: npm16 } = detectPackageManager();
76998
- var generate19 = async (ctx) => {
77090
+ var generate21 = async (ctx) => {
76999
77091
  const variant = await inputPrompt({
77000
77092
  type: "select",
77001
77093
  question: "Select a variant:",
@@ -77024,14 +77116,14 @@ var variantsOptions = [
77024
77116
  label: "JavaScript + SWC"
77025
77117
  }
77026
77118
  ];
77027
- var config20 = {
77119
+ var config21 = {
77028
77120
  configVersion: 1,
77029
77121
  id: "react",
77030
77122
  // React's documentation now recommends using create-vite.
77031
77123
  frameworkCli: "create-vite",
77032
77124
  displayName: "React",
77033
77125
  platform: "pages",
77034
- generate: generate19,
77126
+ generate: generate21,
77035
77127
  transformPackageJson: async () => ({
77036
77128
  scripts: {
77037
77129
  deploy: `${npm16} run build && wrangler pages deploy ./dist`,
@@ -77042,11 +77134,11 @@ var config20 = {
77042
77134
  deployScript: "deploy",
77043
77135
  previewScript: "preview"
77044
77136
  };
77045
- var c3_default28 = config20;
77137
+ var c3_default30 = config21;
77046
77138
 
77047
77139
  // templates/remix/c3.ts
77048
77140
  var { npm: npm17 } = detectPackageManager();
77049
- var generate20 = async (ctx) => {
77141
+ var generate22 = async (ctx) => {
77050
77142
  await runFrameworkGenerator(ctx, [
77051
77143
  ctx.project.name,
77052
77144
  "--template",
@@ -77054,7 +77146,7 @@ var generate20 = async (ctx) => {
77054
77146
  ]);
77055
77147
  logRaw("");
77056
77148
  };
77057
- var configure15 = async () => {
77149
+ var configure16 = async () => {
77058
77150
  const typeDefsPath = "load-context.ts";
77059
77151
  const s = spinner();
77060
77152
  s.start(`Updating \`${typeDefsPath}\``);
@@ -77069,7 +77161,7 @@ var configure15 = async () => {
77069
77161
  });
77070
77162
  s.stop(`${brandColor("updated")} \`${dim(typeDefsPath)}\``);
77071
77163
  };
77072
- var config21 = {
77164
+ var config22 = {
77073
77165
  configVersion: 1,
77074
77166
  id: "remix",
77075
77167
  frameworkCli: "create-remix",
@@ -77078,8 +77170,8 @@ var config21 = {
77078
77170
  copyFiles: {
77079
77171
  path: "./templates"
77080
77172
  },
77081
- generate: generate20,
77082
- configure: configure15,
77173
+ generate: generate22,
77174
+ configure: configure16,
77083
77175
  transformPackageJson: async () => ({
77084
77176
  scripts: {
77085
77177
  deploy: `${npm17} run build && wrangler pages deploy`,
@@ -77091,10 +77183,10 @@ var config21 = {
77091
77183
  deployScript: "deploy",
77092
77184
  previewScript: "preview"
77093
77185
  };
77094
- var c3_default29 = config21;
77186
+ var c3_default31 = config22;
77095
77187
 
77096
77188
  // templates/scheduled/c3.ts
77097
- var c3_default30 = {
77189
+ var c3_default32 = {
77098
77190
  configVersion: 1,
77099
77191
  id: "scheduled",
77100
77192
  displayName: "Scheduled Worker (Cron Trigger)",
@@ -77115,11 +77207,11 @@ var c3_default30 = {
77115
77207
  // templates/solid/c3.ts
77116
77208
  var recast11 = __toESM(require_main3());
77117
77209
  var { npm: npm18 } = detectPackageManager();
77118
- var generate21 = async (ctx) => {
77210
+ var generate23 = async (ctx) => {
77119
77211
  await runFrameworkGenerator(ctx, ["-p", ctx.project.name, "-s"]);
77120
77212
  logRaw("");
77121
77213
  };
77122
- var configure16 = async (ctx) => {
77214
+ var configure17 = async (ctx) => {
77123
77215
  usesTypescript(ctx);
77124
77216
  const filePath = `app.config.${usesTypescript(ctx) ? "ts" : "js"}`;
77125
77217
  updateStatus(`Updating configuration in ${blue(filePath)}`);
@@ -77157,7 +77249,7 @@ var configure16 = async (ctx) => {
77157
77249
  }
77158
77250
  });
77159
77251
  };
77160
- var config22 = {
77252
+ var config23 = {
77161
77253
  configVersion: 1,
77162
77254
  id: "solid",
77163
77255
  frameworkCli: "create-solid",
@@ -77166,8 +77258,8 @@ var config22 = {
77166
77258
  copyFiles: {
77167
77259
  path: "./templates"
77168
77260
  },
77169
- generate: generate21,
77170
- configure: configure16,
77261
+ generate: generate23,
77262
+ configure: configure17,
77171
77263
  transformPackageJson: async () => ({
77172
77264
  scripts: {
77173
77265
  preview: `${npm18} run build && npx wrangler pages dev`,
@@ -77179,17 +77271,17 @@ var config22 = {
77179
77271
  deployScript: "deploy",
77180
77272
  previewScript: "preview"
77181
77273
  };
77182
- var c3_default31 = config22;
77274
+ var c3_default33 = config23;
77183
77275
 
77184
77276
  // templates/svelte/c3.ts
77185
77277
  var import_node_os4 = require("node:os");
77186
77278
  var recast12 = __toESM(require_main3());
77187
77279
  var { npm: npm19 } = detectPackageManager();
77188
- var generate22 = async (ctx) => {
77280
+ var generate24 = async (ctx) => {
77189
77281
  await runFrameworkGenerator(ctx, [ctx.project.name]);
77190
77282
  logRaw("");
77191
77283
  };
77192
- var configure17 = async (ctx) => {
77284
+ var configure18 = async (ctx) => {
77193
77285
  const pkg = `@sveltejs/adapter-cloudflare`;
77194
77286
  await installPackages([pkg], {
77195
77287
  dev: true,
@@ -77248,7 +77340,7 @@ var updateTypeDefinitions2 = (ctx) => {
77248
77340
  }
77249
77341
  });
77250
77342
  };
77251
- var config23 = {
77343
+ var config24 = {
77252
77344
  configVersion: 1,
77253
77345
  id: "svelte",
77254
77346
  frameworkCli: "create-svelte",
@@ -77260,8 +77352,8 @@ var config23 = {
77260
77352
  ts: { path: "./ts" }
77261
77353
  }
77262
77354
  },
77263
- generate: generate22,
77264
- configure: configure17,
77355
+ generate: generate24,
77356
+ configure: configure18,
77265
77357
  transformPackageJson: async (original, ctx) => {
77266
77358
  let scripts = {
77267
77359
  preview: `${npm19} run build && wrangler pages dev`,
@@ -77280,20 +77372,20 @@ var config23 = {
77280
77372
  deployScript: "deploy",
77281
77373
  previewScript: "preview"
77282
77374
  };
77283
- var c3_default32 = config23;
77375
+ var c3_default34 = config24;
77284
77376
 
77285
77377
  // templates/vue/c3.ts
77286
77378
  var { npm: npm20 } = detectPackageManager();
77287
- var generate23 = async (ctx) => {
77379
+ var generate25 = async (ctx) => {
77288
77380
  await runFrameworkGenerator(ctx, [ctx.project.name]);
77289
77381
  };
77290
- var config24 = {
77382
+ var config25 = {
77291
77383
  configVersion: 1,
77292
77384
  id: "vue",
77293
77385
  frameworkCli: "create-vue",
77294
77386
  displayName: "Vue",
77295
77387
  platform: "pages",
77296
- generate: generate23,
77388
+ generate: generate25,
77297
77389
  transformPackageJson: async () => ({
77298
77390
  scripts: {
77299
77391
  deploy: `${npm20} run build && wrangler pages deploy ./dist`,
@@ -77304,7 +77396,7 @@ var config24 = {
77304
77396
  deployScript: "deploy",
77305
77397
  previewScript: "preview"
77306
77398
  };
77307
- var c3_default33 = config24;
77399
+ var c3_default35 = config25;
77308
77400
 
77309
77401
  // src/validators.ts
77310
77402
  var import_fs10 = require("fs");
@@ -77394,28 +77486,30 @@ function getFrameworkMap({ experimental = false }) {
77394
77486
  astro: c3_default2,
77395
77487
  docusaurus: c3_default3,
77396
77488
  gatsby: c3_default4,
77397
- nuxt: c3_default8,
77398
- qwik: c3_default9,
77399
- remix: c3_default10,
77400
- solid: c3_default11,
77401
- svelte: c3_default12
77489
+ hono: c3_default8,
77490
+ next: c3_default9,
77491
+ nuxt: c3_default10,
77492
+ qwik: c3_default11,
77493
+ remix: c3_default12,
77494
+ solid: c3_default13,
77495
+ svelte: c3_default14
77402
77496
  };
77403
77497
  } else {
77404
77498
  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
77499
+ analog: c3_default15,
77500
+ angular: c3_default16,
77501
+ astro: c3_default17,
77502
+ docusaurus: c3_default19,
77503
+ gatsby: c3_default20,
77504
+ hono: c3_default23,
77505
+ next: c3_default24,
77506
+ nuxt: c3_default25,
77507
+ qwik: c3_default29,
77508
+ react: c3_default30,
77509
+ remix: c3_default31,
77510
+ solid: c3_default33,
77511
+ svelte: c3_default34,
77512
+ vue: c3_default35
77419
77513
  };
77420
77514
  }
77421
77515
  }
@@ -77428,13 +77522,13 @@ function getTemplateMap({ experimental = false }) {
77428
77522
  };
77429
77523
  } else {
77430
77524
  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
77525
+ "hello-world": c3_default22,
77526
+ common: c3_default18,
77527
+ scheduled: c3_default32,
77528
+ queues: c3_default28,
77529
+ "hello-world-durable-object": c3_default21,
77530
+ openapi: c3_default26,
77531
+ "pre-existing": c3_default27
77438
77532
  };
77439
77533
  }
77440
77534
  }
@@ -77573,8 +77667,8 @@ var createContext = async (args, prevArgs) => {
77573
77667
  experimental: args.experimental
77574
77668
  });
77575
77669
  const frameworkOptions = Object.entries(frameworkMap).map(
77576
- ([key, config25]) => ({
77577
- label: config25.displayName,
77670
+ ([key, config26]) => ({
77671
+ label: config26.displayName,
77578
77672
  value: key
77579
77673
  })
77580
77674
  );
@@ -77712,28 +77806,28 @@ var processRemoteTemplate = async (args) => {
77712
77806
  src = src.replace("https://github.com/", "github:").replace("/tree/main/", "/");
77713
77807
  }
77714
77808
  const path6 = await downloadRemoteTemplate(src);
77715
- const config25 = inferTemplateConfig(path6);
77716
- validateTemplate(path6, config25);
77809
+ const config26 = inferTemplateConfig(path6);
77810
+ validateTemplate(path6, config26);
77717
77811
  updateStatus(`${brandColor("template")} ${dim("cloned and validated")}`);
77718
77812
  return {
77719
77813
  path: path6,
77720
- ...config25
77814
+ ...config26
77721
77815
  };
77722
77816
  };
77723
- var validateTemplate = (path6, config25) => {
77724
- if (!config25.copyFiles) {
77817
+ var validateTemplate = (path6, config26) => {
77818
+ if (!config26.copyFiles) {
77725
77819
  return;
77726
77820
  }
77727
- if (isVariantInfo(config25.copyFiles)) {
77728
- validateTemplateSrcDirectory((0, import_path13.resolve)(path6, config25.copyFiles.path), config25);
77821
+ if (isVariantInfo(config26.copyFiles)) {
77822
+ validateTemplateSrcDirectory((0, import_path13.resolve)(path6, config26.copyFiles.path), config26);
77729
77823
  } else {
77730
- for (const variant of Object.values(config25.copyFiles.variants)) {
77731
- validateTemplateSrcDirectory((0, import_path13.resolve)(path6, variant.path), config25);
77824
+ for (const variant of Object.values(config26.copyFiles.variants)) {
77825
+ validateTemplateSrcDirectory((0, import_path13.resolve)(path6, variant.path), config26);
77732
77826
  }
77733
77827
  }
77734
77828
  };
77735
- var validateTemplateSrcDirectory = (path6, config25) => {
77736
- if (config25.platform === "workers") {
77829
+ var validateTemplateSrcDirectory = (path6, config26) => {
77830
+ if (config26.platform === "workers") {
77737
77831
  const wranglerTomlPath = (0, import_path13.resolve)(path6, "wrangler.toml");
77738
77832
  if (!(0, import_fs11.existsSync)(wranglerTomlPath)) {
77739
77833
  throw new Error(
@@ -79924,8 +80018,8 @@ var renderValues = (values) => {
79924
80018
  };
79925
80019
 
79926
80020
  // src/helpers/retry.ts
79927
- var retry = async (config25, fn) => {
79928
- let { times } = config25;
80021
+ var retry = async (config26, fn) => {
80022
+ let { times } = config26;
79929
80023
  let error2 = null;
79930
80024
  while (times > 0) {
79931
80025
  try {
@@ -79933,7 +80027,7 @@ var retry = async (config25, fn) => {
79933
80027
  } catch (e) {
79934
80028
  error2 = e;
79935
80029
  times--;
79936
- if (config25.exitCondition?.(e)) {
80030
+ if (config26.exitCondition?.(e)) {
79937
80031
  break;
79938
80032
  }
79939
80033
  }
@@ -81362,8 +81456,8 @@ async function addWorkersTypesToTsConfig(ctx) {
81362
81456
  }
81363
81457
  const typesEntrypoint = `@cloudflare/workers-types/${entrypointVersion}`;
81364
81458
  try {
81365
- const config25 = parse3(tsconfig);
81366
- const currentTypes = config25.compilerOptions?.types ?? [];
81459
+ const config26 = parse3(tsconfig);
81460
+ const currentTypes = config26.compilerOptions?.types ?? [];
81367
81461
  const explicitEntrypoint = currentTypes.some(
81368
81462
  (t) => t.match(/@cloudflare\/workers-types\/\d{4}-\d{2}-\d{2}/)
81369
81463
  );
@@ -81438,7 +81532,7 @@ var runCli = async (args) => {
81438
81532
  printBanner();
81439
81533
  const ctx = await createContext(args);
81440
81534
  await create(ctx);
81441
- await configure18(ctx);
81535
+ await configure19(ctx);
81442
81536
  await deploy(ctx);
81443
81537
  printSummary(ctx);
81444
81538
  logRaw("");
@@ -81466,7 +81560,7 @@ var create = async (ctx) => {
81466
81560
  await rectifyPmMismatch(ctx);
81467
81561
  endSection(`Application created`);
81468
81562
  };
81469
- var configure18 = async (ctx) => {
81563
+ var configure19 = async (ctx) => {
81470
81564
  startSection("Configuring your application for Cloudflare", "Step 2 of 3");
81471
81565
  await installWrangler();
81472
81566
  await installWorkersTypes(ctx);