create-cloudflare 0.0.0-7d7f19a2c → 0.0.0-7dbd0c82a

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 (54) hide show
  1. package/dist/cli.js +417 -324
  2. package/dist/tsconfig.tsbuildinfo +1 -1
  3. package/package.json +4 -4
  4. package/templates/common/js/wrangler.toml +6 -0
  5. package/templates/common/ts/wrangler.toml +6 -0
  6. package/templates/docusaurus/c3.ts +2 -1
  7. package/templates/hello-world/js/wrangler.toml +6 -0
  8. package/templates/hello-world/py/wrangler.toml +6 -0
  9. package/templates/hello-world/ts/wrangler.toml +6 -0
  10. package/templates/hello-world-durable-object/js/wrangler.toml +6 -0
  11. package/templates/hello-world-durable-object/ts/src/index.ts +0 -21
  12. package/templates/hello-world-durable-object/ts/worker-configuration.d.ts +3 -4
  13. package/templates/hello-world-durable-object/ts/wrangler.toml +6 -0
  14. package/templates/hono/templates/wrangler.toml +6 -0
  15. package/templates/nuxt/templates/wrangler.toml +1 -0
  16. package/templates/openapi/ts/wrangler.toml +6 -0
  17. package/templates/queues/js/wrangler.toml +6 -0
  18. package/templates/queues/ts/wrangler.toml +6 -0
  19. package/templates/scheduled/js/wrangler.toml +6 -0
  20. package/templates/scheduled/ts/wrangler.toml +6 -0
  21. package/templates-experimental/angular/c3.ts +6 -10
  22. package/templates-experimental/angular/templates/tools/alter-polyfills.mjs +12 -7
  23. package/templates-experimental/angular/templates/wrangler.toml +8 -2
  24. package/templates-experimental/astro/templates/wrangler.toml +7 -1
  25. package/templates-experimental/docusaurus/templates/wrangler.toml +7 -1
  26. package/templates-experimental/gatsby/templates/wrangler.toml +7 -1
  27. package/templates-experimental/hello-world-assets-only/templates/wrangler.toml +7 -1
  28. package/templates-experimental/hello-world-durable-object-with-assets/js/wrangler.toml +6 -1
  29. package/templates-experimental/hello-world-durable-object-with-assets/ts/src/index.ts +0 -20
  30. package/templates-experimental/hello-world-durable-object-with-assets/ts/worker-configuration.d.ts +3 -4
  31. package/templates-experimental/hello-world-durable-object-with-assets/ts/wrangler.toml +6 -1
  32. package/templates-experimental/hello-world-with-assets/js/test/index.spec.js +3 -3
  33. package/templates-experimental/hello-world-with-assets/js/wrangler.toml +7 -1
  34. package/templates-experimental/hello-world-with-assets/py/wrangler.toml +7 -1
  35. package/templates-experimental/hello-world-with-assets/ts/test/index.spec.ts +5 -5
  36. package/templates-experimental/hello-world-with-assets/ts/wrangler.toml +7 -1
  37. package/templates-experimental/hono/c3.ts +43 -0
  38. package/templates-experimental/hono/templates/public/index.html +19 -0
  39. package/templates-experimental/hono/templates/src/index.ts +9 -0
  40. package/templates-experimental/hono/templates/worker-configuration.d.ts +4 -0
  41. package/templates-experimental/hono/templates/wrangler.toml +5 -0
  42. package/templates-experimental/next/c3.ts +52 -0
  43. package/templates-experimental/next/templates/__dot__gitignore +42 -0
  44. package/templates-experimental/next/templates/env.d.ts +5 -0
  45. package/templates-experimental/next/templates/wrangler.toml +12 -0
  46. package/templates-experimental/nuxt/templates/wrangler.toml +7 -1
  47. package/templates-experimental/qwik/templates/wrangler.toml +7 -1
  48. package/templates-experimental/remix/templates/wrangler.toml +7 -1
  49. package/templates-experimental/solid/templates/wrangler.toml +7 -1
  50. package/templates-experimental/svelte/js/wrangler.toml +7 -1
  51. package/templates-experimental/svelte/ts/wrangler.toml +7 -1
  52. package/templates-experimental/angular/templates/src/.assetsignore +0 -4
  53. package/templates-experimental/angular/templates/tools/copy-files.mjs +0 -9
  54. package/templates-experimental/angular/templates/tools/paths.mjs +0 -9
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 = "0.0.0-7d7f19a2c";
74093
+ var version = "0.0.0-7dbd0c82a";
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
  }
@@ -74376,23 +74376,29 @@ var detectPmMismatch = (ctx) => {
74376
74376
 
74377
74377
  // src/helpers/sparrow.ts
74378
74378
  var import_undici = __toESM(require_undici());
74379
- var SPARROW_SOURCE_KEY = "";
74379
+ var SPARROW_SOURCE_KEY = "5adf183f94b3436ba78d67f506965998";
74380
74380
  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 = "0.0.0-7d7f19a2c";
74841
+ var version2 = "0.0.0-7dbd0c82a";
74832
74842
 
74833
74843
  // src/git.ts
74834
74844
  var offerGit = async (ctx) => {
@@ -75019,7 +75029,7 @@ var package_default = {
75019
75029
  ],
75020
75030
  dependencies: {
75021
75031
  "create-astro": "4.8.0",
75022
- "create-analog": "1.3.1",
75032
+ "create-analog": "1.8.1",
75023
75033
  "@angular/create": "18.2.0",
75024
75034
  "create-docusaurus": "3.5.2",
75025
75035
  "create-hono": "0.12.0",
@@ -75085,14 +75095,11 @@ var configure = async (ctx) => {
75085
75095
  await installCFWorker();
75086
75096
  };
75087
75097
  async function installCFWorker() {
75088
- await installPackages(
75089
- ["@cloudflare/workers-types", "@miniflare/tre@next", "wrangler@beta"],
75090
- {
75091
- dev: true,
75092
- startText: "Installing adapter dependencies",
75093
- doneText: `${brandColor("installed")} ${dim(`via \`${npm} install\``)}`
75094
- }
75095
- );
75098
+ await installPackages(["@cloudflare/workers-types", "wrangler"], {
75099
+ dev: true,
75100
+ startText: "Installing adapter dependencies",
75101
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm} install\``)}`
75102
+ });
75096
75103
  }
75097
75104
  async function updateAppCode() {
75098
75105
  const s = spinner();
@@ -75142,7 +75149,7 @@ var config = {
75142
75149
  scripts: {
75143
75150
  start: `${npm} run build && wrangler dev`,
75144
75151
  build: `ng build && ${npm} run process`,
75145
- process: "node ./tools/copy-files.mjs && node ./tools/alter-polyfills.mjs",
75152
+ process: "node ./tools/alter-polyfills.mjs",
75146
75153
  deploy: `${npm} run build && wrangler deploy`
75147
75154
  }
75148
75155
  })
@@ -75440,6 +75447,88 @@ var c3_default7 = {
75440
75447
  }
75441
75448
  };
75442
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
+
75443
75532
  // src/helpers/compatDate.ts
75444
75533
  var import_fs9 = require("fs");
75445
75534
  var import_path9 = require("path");
@@ -75491,7 +75580,7 @@ function getLatestTypesEntrypoint(ctx) {
75491
75580
  // templates-experimental/nuxt/c3.ts
75492
75581
  var recast3 = __toESM(require_main3());
75493
75582
  var { npm: npm4, name: pm } = detectPackageManager();
75494
- var generate5 = async (ctx) => {
75583
+ var generate7 = async (ctx) => {
75495
75584
  const gitFlag = ctx.args.git ? `--gitInit` : `--no-gitInit`;
75496
75585
  await runFrameworkGenerator(ctx, [
75497
75586
  "init",
@@ -75503,7 +75592,7 @@ var generate5 = async (ctx) => {
75503
75592
  writeFile2("./.node-version", "17");
75504
75593
  logRaw("");
75505
75594
  };
75506
- var configure3 = async (ctx) => {
75595
+ var configure4 = async (ctx) => {
75507
75596
  const packages = ["nitro-cloudflare-dev", "nitropack"];
75508
75597
  if (pm === "pnpm") {
75509
75598
  packages.push("h3");
@@ -75562,7 +75651,7 @@ var updateNuxtConfig = () => {
75562
75651
  });
75563
75652
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
75564
75653
  };
75565
- var config7 = {
75654
+ var config8 = {
75566
75655
  configVersion: 1,
75567
75656
  id: "nuxt",
75568
75657
  frameworkCli: "nuxi",
@@ -75572,8 +75661,8 @@ var config7 = {
75572
75661
  path: "./templates"
75573
75662
  },
75574
75663
  path: "templates-experimental/nuxt",
75575
- generate: generate5,
75576
- configure: configure3,
75664
+ generate: generate7,
75665
+ configure: configure4,
75577
75666
  transformPackageJson: async () => ({
75578
75667
  scripts: {
75579
75668
  deploy: `${npm4} run build && wrangler deploy`,
@@ -75585,15 +75674,15 @@ var config7 = {
75585
75674
  deployScript: "deploy",
75586
75675
  previewScript: "preview"
75587
75676
  };
75588
- var c3_default8 = config7;
75677
+ var c3_default10 = config8;
75589
75678
 
75590
75679
  // templates-experimental/qwik/c3.ts
75591
75680
  var recast4 = __toESM(require_main3());
75592
75681
  var { npm: npm5, npx: npx2 } = detectPackageManager();
75593
- var generate6 = async (ctx) => {
75682
+ var generate8 = async (ctx) => {
75594
75683
  await runFrameworkGenerator(ctx, ["playground", ctx.project.name]);
75595
75684
  };
75596
- var configure4 = async (ctx) => {
75685
+ var configure5 = async (ctx) => {
75597
75686
  const cmd = [npx2, "qwik", "add", "cloudflare-pages"];
75598
75687
  endSection(`Running ${quoteShellArgs(cmd)}`);
75599
75688
  await runCommand(cmd);
@@ -75673,7 +75762,7 @@ var populateCloudflareEnv = () => {
75673
75762
  });
75674
75763
  s.stop(`${brandColor("updated")} \`${entrypointPath}\``);
75675
75764
  };
75676
- var config8 = {
75765
+ var config9 = {
75677
75766
  configVersion: 1,
75678
75767
  id: "qwik",
75679
75768
  frameworkCli: "create-qwik",
@@ -75683,8 +75772,8 @@ var config8 = {
75683
75772
  path: "./templates"
75684
75773
  },
75685
75774
  path: "templates-experimental/qwik",
75686
- generate: generate6,
75687
- configure: configure4,
75775
+ generate: generate8,
75776
+ configure: configure5,
75688
75777
  transformPackageJson: async () => ({
75689
75778
  scripts: {
75690
75779
  deploy: `${npm5} run build && wrangler deploy`,
@@ -75696,11 +75785,11 @@ var config8 = {
75696
75785
  deployScript: "deploy",
75697
75786
  previewScript: "preview"
75698
75787
  };
75699
- var c3_default9 = config8;
75788
+ var c3_default11 = config9;
75700
75789
 
75701
75790
  // templates-experimental/remix/c3.ts
75702
75791
  var { npm: npm6 } = detectPackageManager();
75703
- var generate7 = async (ctx) => {
75792
+ var generate9 = async (ctx) => {
75704
75793
  await runFrameworkGenerator(ctx, [
75705
75794
  ctx.project.name,
75706
75795
  "--template",
@@ -75708,7 +75797,7 @@ var generate7 = async (ctx) => {
75708
75797
  ]);
75709
75798
  logRaw("");
75710
75799
  };
75711
- var configure5 = async () => {
75800
+ var configure6 = async () => {
75712
75801
  await installPackages(["wrangler@latest"], {
75713
75802
  dev: true,
75714
75803
  startText: "Updating the Wrangler version",
@@ -75728,7 +75817,7 @@ var configure5 = async () => {
75728
75817
  });
75729
75818
  s.stop(`${brandColor("updated")} \`${dim(typeDefsPath)}\``);
75730
75819
  };
75731
- var config9 = {
75820
+ var config10 = {
75732
75821
  configVersion: 1,
75733
75822
  id: "remix",
75734
75823
  frameworkCli: "create-remix",
@@ -75738,8 +75827,8 @@ var config9 = {
75738
75827
  path: "./templates"
75739
75828
  },
75740
75829
  path: "templates-experimental/remix",
75741
- generate: generate7,
75742
- configure: configure5,
75830
+ generate: generate9,
75831
+ configure: configure6,
75743
75832
  transformPackageJson: async () => ({
75744
75833
  scripts: {
75745
75834
  build: "remix vite:build && wrangler pages functions build --outdir build/worker",
@@ -75752,16 +75841,16 @@ var config9 = {
75752
75841
  deployScript: "deploy",
75753
75842
  previewScript: "preview"
75754
75843
  };
75755
- var c3_default10 = config9;
75844
+ var c3_default12 = config10;
75756
75845
 
75757
75846
  // templates-experimental/solid/c3.ts
75758
75847
  var recast5 = __toESM(require_main3());
75759
75848
  var { npm: npm7 } = detectPackageManager();
75760
- var generate8 = async (ctx) => {
75849
+ var generate10 = async (ctx) => {
75761
75850
  await runFrameworkGenerator(ctx, ["-p", ctx.project.name, "-s"]);
75762
75851
  logRaw("");
75763
75852
  };
75764
- var configure6 = async (ctx) => {
75853
+ var configure7 = async (ctx) => {
75765
75854
  const packages = ["nitropack"];
75766
75855
  await installPackages(packages, {
75767
75856
  dev: true,
@@ -75847,7 +75936,7 @@ var configure6 = async (ctx) => {
75847
75936
  }
75848
75937
  });
75849
75938
  };
75850
- var config10 = {
75939
+ var config11 = {
75851
75940
  configVersion: 1,
75852
75941
  id: "solid",
75853
75942
  frameworkCli: "create-solid",
@@ -75857,8 +75946,8 @@ var config10 = {
75857
75946
  path: "./templates"
75858
75947
  },
75859
75948
  path: "templates-experimental/solid",
75860
- generate: generate8,
75861
- configure: configure6,
75949
+ generate: generate10,
75950
+ configure: configure7,
75862
75951
  transformPackageJson: async () => ({
75863
75952
  scripts: {
75864
75953
  preview: `${npm7} run build && npx wrangler dev`,
@@ -75870,17 +75959,17 @@ var config10 = {
75870
75959
  deployScript: "deploy",
75871
75960
  previewScript: "preview"
75872
75961
  };
75873
- var c3_default11 = config10;
75962
+ var c3_default13 = config11;
75874
75963
 
75875
75964
  // templates-experimental/svelte/c3.ts
75876
75965
  var import_node_os3 = require("node:os");
75877
75966
  var recast6 = __toESM(require_main3());
75878
75967
  var { npm: npm8 } = detectPackageManager();
75879
- var generate9 = async (ctx) => {
75968
+ var generate11 = async (ctx) => {
75880
75969
  await runFrameworkGenerator(ctx, [ctx.project.name]);
75881
75970
  logRaw("");
75882
75971
  };
75883
- var configure7 = async (ctx) => {
75972
+ var configure8 = async (ctx) => {
75884
75973
  const pkg = `@sveltejs/adapter-cloudflare`;
75885
75974
  await installPackages([pkg], {
75886
75975
  dev: true,
@@ -75939,7 +76028,7 @@ var updateTypeDefinitions = (ctx) => {
75939
76028
  }
75940
76029
  });
75941
76030
  };
75942
- var config11 = {
76031
+ var config12 = {
75943
76032
  configVersion: 1,
75944
76033
  id: "svelte",
75945
76034
  frameworkCli: "create-svelte",
@@ -75952,8 +76041,8 @@ var config11 = {
75952
76041
  }
75953
76042
  },
75954
76043
  path: "templates-experimental/svelte",
75955
- generate: generate9,
75956
- configure: configure7,
76044
+ generate: generate11,
76045
+ configure: configure8,
75957
76046
  transformPackageJson: async (original, ctx) => {
75958
76047
  let scripts = {
75959
76048
  preview: `${npm8} run build && wrangler dev`,
@@ -75972,12 +76061,12 @@ var config11 = {
75972
76061
  deployScript: "deploy",
75973
76062
  previewScript: "preview"
75974
76063
  };
75975
- var c3_default12 = config11;
76064
+ var c3_default14 = config12;
75976
76065
 
75977
76066
  // templates/analog/c3.ts
75978
76067
  var recast7 = __toESM(require_main3());
75979
76068
  var { npm: npm9, name: pm2 } = detectPackageManager();
75980
- var generate10 = async (ctx) => {
76069
+ var generate12 = async (ctx) => {
75981
76070
  await runFrameworkGenerator(ctx, [
75982
76071
  ctx.project.name,
75983
76072
  "--template",
@@ -75985,7 +76074,7 @@ var generate10 = async (ctx) => {
75985
76074
  ]);
75986
76075
  logRaw("");
75987
76076
  };
75988
- var configure8 = async (ctx) => {
76077
+ var configure9 = async (ctx) => {
75989
76078
  if (pm2 === "pnpm" || pm2 === "yarn" || pm2 === "bun") {
75990
76079
  const packages = [];
75991
76080
  packages.push("nitropack");
@@ -76053,7 +76142,7 @@ var updateViteConfig = (ctx) => {
76053
76142
  });
76054
76143
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
76055
76144
  };
76056
- var config12 = {
76145
+ var config13 = {
76057
76146
  configVersion: 1,
76058
76147
  id: "analog",
76059
76148
  frameworkCli: "create-analog",
@@ -76062,8 +76151,8 @@ var config12 = {
76062
76151
  copyFiles: {
76063
76152
  path: "./templates"
76064
76153
  },
76065
- generate: generate10,
76066
- configure: configure8,
76154
+ generate: generate12,
76155
+ configure: configure9,
76067
76156
  transformPackageJson: async () => ({
76068
76157
  scripts: {
76069
76158
  preview: `${npm9} run build && wrangler pages dev`,
@@ -76075,16 +76164,16 @@ var config12 = {
76075
76164
  deployScript: "deploy",
76076
76165
  previewScript: "preview"
76077
76166
  };
76078
- var c3_default13 = config12;
76167
+ var c3_default15 = config13;
76079
76168
 
76080
76169
  // templates/angular/c3.ts
76081
76170
  var import_node_path4 = require("node:path");
76082
76171
  var { npm: npm10 } = detectPackageManager();
76083
- var generate11 = async (ctx) => {
76172
+ var generate13 = async (ctx) => {
76084
76173
  await runFrameworkGenerator(ctx, [ctx.project.name, "--ssr"]);
76085
76174
  logRaw("");
76086
76175
  };
76087
- var configure9 = async (ctx) => {
76176
+ var configure10 = async (ctx) => {
76088
76177
  updateAngularJson2(ctx);
76089
76178
  await updateAppCode2();
76090
76179
  await installCFWorker2();
@@ -76129,7 +76218,7 @@ function updateAngularJson2(ctx) {
76129
76218
  writeFile2((0, import_node_path4.resolve)("angular.json"), JSON.stringify(angularJson, null, 2));
76130
76219
  s.stop(`${brandColor(`updated`)} ${dim(`\`angular.json\``)}`);
76131
76220
  }
76132
- var config13 = {
76221
+ var config14 = {
76133
76222
  configVersion: 1,
76134
76223
  id: "angular",
76135
76224
  frameworkCli: "@angular/create",
@@ -76140,8 +76229,8 @@ var config13 = {
76140
76229
  },
76141
76230
  devScript: "start",
76142
76231
  deployScript: "deploy",
76143
- generate: generate11,
76144
- configure: configure9,
76232
+ generate: generate13,
76233
+ configure: configure10,
76145
76234
  transformPackageJson: async () => ({
76146
76235
  scripts: {
76147
76236
  start: `${npm10} run build && wrangler pages dev dist/cloudflare ${await compatDateFlag()} --experimental-local`,
@@ -76151,16 +76240,16 @@ var config13 = {
76151
76240
  }
76152
76241
  })
76153
76242
  };
76154
- var c3_default14 = config13;
76243
+ var c3_default16 = config14;
76155
76244
 
76156
76245
  // templates/astro/c3.ts
76157
76246
  var recast8 = __toESM(require_main3());
76158
76247
  var { npx: npx3 } = detectPackageManager();
76159
- var generate12 = async (ctx) => {
76248
+ var generate14 = async (ctx) => {
76160
76249
  await runFrameworkGenerator(ctx, [ctx.project.name, "--no-install"]);
76161
76250
  logRaw("");
76162
76251
  };
76163
- var configure10 = async (ctx) => {
76252
+ var configure11 = async (ctx) => {
76164
76253
  await runCommand([npx3, "astro", "add", "cloudflare", "-y"], {
76165
76254
  silent: true,
76166
76255
  startText: "Installing adapter",
@@ -76215,7 +76304,7 @@ var updateEnvDeclaration2 = (ctx) => {
76215
76304
  }
76216
76305
  });
76217
76306
  };
76218
- var config14 = {
76307
+ var config15 = {
76219
76308
  configVersion: 1,
76220
76309
  id: "astro",
76221
76310
  frameworkCli: "create-astro",
@@ -76227,8 +76316,8 @@ var config14 = {
76227
76316
  devScript: "dev",
76228
76317
  deployScript: "deploy",
76229
76318
  previewScript: "preview",
76230
- generate: generate12,
76231
- configure: configure10,
76319
+ generate: generate14,
76320
+ configure: configure11,
76232
76321
  transformPackageJson: async (pkgJson, ctx) => ({
76233
76322
  scripts: {
76234
76323
  deploy: `astro build && wrangler pages deploy`,
@@ -76237,10 +76326,10 @@ var config14 = {
76237
76326
  }
76238
76327
  })
76239
76328
  };
76240
- var c3_default15 = config14;
76329
+ var c3_default17 = config15;
76241
76330
 
76242
76331
  // templates/common/c3.ts
76243
- var c3_default16 = {
76332
+ var c3_default18 = {
76244
76333
  configVersion: 1,
76245
76334
  id: "common",
76246
76335
  displayName: "Example router & proxy Worker",
@@ -76261,29 +76350,30 @@ var c3_default16 = {
76261
76350
 
76262
76351
  // templates/docusaurus/c3.ts
76263
76352
  var { npm: npm11 } = detectPackageManager();
76264
- var generate13 = async (ctx) => {
76353
+ var generate15 = async (ctx) => {
76265
76354
  await runFrameworkGenerator(ctx, [ctx.project.name, "classic"]);
76266
76355
  };
76267
- var config15 = {
76356
+ var config16 = {
76268
76357
  configVersion: 1,
76269
76358
  id: "docusaurus",
76270
76359
  frameworkCli: "create-docusaurus",
76271
76360
  platform: "pages",
76272
76361
  displayName: "Docusaurus",
76273
- generate: generate13,
76362
+ generate: generate15,
76274
76363
  transformPackageJson: async () => ({
76275
76364
  scripts: {
76365
+ preview: `${npm11} run build && wrangler pages dev ./build`,
76276
76366
  deploy: `${npm11} run build && wrangler pages deploy ./build`
76277
76367
  }
76278
76368
  }),
76279
- devScript: "start",
76369
+ devScript: "preview",
76280
76370
  deployScript: "deploy"
76281
76371
  };
76282
- var c3_default17 = config15;
76372
+ var c3_default19 = config16;
76283
76373
 
76284
76374
  // templates/gatsby/c3.ts
76285
76375
  var { npm: npm12 } = detectPackageManager();
76286
- var generate14 = async (ctx) => {
76376
+ var generate16 = async (ctx) => {
76287
76377
  const defaultTemplate = "https://github.com/gatsbyjs/gatsby-starter-blog";
76288
76378
  const useTemplate = await inputPrompt({
76289
76379
  type: "confirm",
@@ -76302,13 +76392,13 @@ var generate14 = async (ctx) => {
76302
76392
  }
76303
76393
  await runFrameworkGenerator(ctx, ["new", ctx.project.name, templateUrl]);
76304
76394
  };
76305
- var config16 = {
76395
+ var config17 = {
76306
76396
  configVersion: 1,
76307
76397
  id: "gatsby",
76308
76398
  frameworkCli: "gatsby",
76309
76399
  platform: "pages",
76310
76400
  displayName: "Gatsby",
76311
- generate: generate14,
76401
+ generate: generate16,
76312
76402
  transformPackageJson: async () => ({
76313
76403
  scripts: {
76314
76404
  deploy: `${npm12} run build && wrangler pages deploy ./public`,
@@ -76319,10 +76409,10 @@ var config16 = {
76319
76409
  deployScript: "deploy",
76320
76410
  previewScript: "preview"
76321
76411
  };
76322
- var c3_default18 = config16;
76412
+ var c3_default20 = config17;
76323
76413
 
76324
76414
  // templates/hello-world-durable-object/c3.ts
76325
- var c3_default19 = {
76415
+ var c3_default21 = {
76326
76416
  configVersion: 1,
76327
76417
  id: "hello-world-durable-object",
76328
76418
  displayName: "Hello World Worker Using Durable Objects",
@@ -76341,7 +76431,7 @@ var c3_default19 = {
76341
76431
  };
76342
76432
 
76343
76433
  // templates/hello-world/c3.ts
76344
- var c3_default20 = {
76434
+ var c3_default22 = {
76345
76435
  configVersion: 1,
76346
76436
  id: "hello-world",
76347
76437
  displayName: "Hello World Worker",
@@ -76363,7 +76453,7 @@ var c3_default20 = {
76363
76453
  };
76364
76454
 
76365
76455
  // templates/hono/c3.ts
76366
- var generate15 = async (ctx) => {
76456
+ var generate17 = async (ctx) => {
76367
76457
  const { name: pm4 } = detectPackageManager();
76368
76458
  await runFrameworkGenerator(ctx, [
76369
76459
  ctx.project.name,
@@ -76375,7 +76465,7 @@ var generate15 = async (ctx) => {
76375
76465
  ]);
76376
76466
  logRaw("");
76377
76467
  };
76378
- var configure11 = async (ctx) => {
76468
+ var configure12 = async (ctx) => {
76379
76469
  const indexFile = "src/index.ts";
76380
76470
  const s = spinner();
76381
76471
  s.start(`Updating \`${indexFile}\``);
@@ -76390,7 +76480,7 @@ var configure11 = async (ctx) => {
76390
76480
  });
76391
76481
  s.stop(`${brandColor("updated")} \`${dim(indexFile)}\``);
76392
76482
  };
76393
- var config17 = {
76483
+ var config18 = {
76394
76484
  configVersion: 1,
76395
76485
  id: "hono",
76396
76486
  frameworkCli: "create-hono",
@@ -76399,8 +76489,8 @@ var config17 = {
76399
76489
  path: "./templates"
76400
76490
  },
76401
76491
  platform: "workers",
76402
- generate: generate15,
76403
- configure: configure11,
76492
+ generate: generate17,
76493
+ configure: configure12,
76404
76494
  transformPackageJson: async () => ({
76405
76495
  scripts: {
76406
76496
  dev: "wrangler dev",
@@ -76411,12 +76501,12 @@ var config17 = {
76411
76501
  devScript: "dev",
76412
76502
  deployScript: "deploy"
76413
76503
  };
76414
- var c3_default21 = config17;
76504
+ var c3_default23 = config18;
76415
76505
 
76416
76506
  // templates/next/c3.ts
76417
76507
  var import_path10 = require("path");
76418
76508
  var { npm: npm13, npx: npx4 } = detectPackageManager();
76419
- var generate16 = async (ctx) => {
76509
+ var generate18 = async (ctx) => {
76420
76510
  const projectName = ctx.project.name;
76421
76511
  await runFrameworkGenerator(ctx, [projectName]);
76422
76512
  const wranglerToml = readFile((0, import_path10.join)(getTemplatePath(ctx), "wrangler.toml"));
@@ -76449,7 +76539,7 @@ var updateNextConfig = () => {
76449
76539
  writeFile2(configFile, updatedConfigFile);
76450
76540
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
76451
76541
  };
76452
- var configure12 = async (ctx) => {
76542
+ var configure13 = async (ctx) => {
76453
76543
  const projectPath = ctx.project.path;
76454
76544
  const path6 = probePaths([
76455
76545
  `${projectPath}/pages/api`,
@@ -76524,14 +76614,14 @@ var addDevDependencies = async (installEslintPlugin) => {
76524
76614
  doneText: `${brandColor(`installed`)} ${dim(packages.join(", "))}`
76525
76615
  });
76526
76616
  };
76527
- var c3_default22 = {
76617
+ var c3_default24 = {
76528
76618
  configVersion: 1,
76529
76619
  id: "next",
76530
76620
  frameworkCli: "create-next-app",
76531
76621
  platform: "pages",
76532
76622
  displayName: "Next",
76533
- generate: generate16,
76534
- configure: configure12,
76623
+ generate: generate18,
76624
+ configure: configure13,
76535
76625
  copyFiles: {
76536
76626
  async selectVariant(ctx) {
76537
76627
  const isApp = probePaths([
@@ -76589,7 +76679,7 @@ var c3_default22 = {
76589
76679
  // templates/nuxt/c3.ts
76590
76680
  var recast9 = __toESM(require_main3());
76591
76681
  var { npm: npm14, name: pm3 } = detectPackageManager();
76592
- var generate17 = async (ctx) => {
76682
+ var generate19 = async (ctx) => {
76593
76683
  const gitFlag = ctx.args.git ? `--gitInit` : `--no-gitInit`;
76594
76684
  await runFrameworkGenerator(ctx, [
76595
76685
  "init",
@@ -76601,7 +76691,7 @@ var generate17 = async (ctx) => {
76601
76691
  writeFile2("./.node-version", "17");
76602
76692
  logRaw("");
76603
76693
  };
76604
- var configure13 = async (ctx) => {
76694
+ var configure14 = async (ctx) => {
76605
76695
  const packages = ["nitro-cloudflare-dev"];
76606
76696
  if (pm3 === "pnpm") {
76607
76697
  packages.push("h3");
@@ -76660,7 +76750,7 @@ var updateNuxtConfig2 = () => {
76660
76750
  });
76661
76751
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
76662
76752
  };
76663
- var config18 = {
76753
+ var config19 = {
76664
76754
  configVersion: 1,
76665
76755
  id: "nuxt",
76666
76756
  frameworkCli: "nuxi",
@@ -76669,8 +76759,8 @@ var config18 = {
76669
76759
  copyFiles: {
76670
76760
  path: "./templates"
76671
76761
  },
76672
- generate: generate17,
76673
- configure: configure13,
76762
+ generate: generate19,
76763
+ configure: configure14,
76674
76764
  transformPackageJson: async () => ({
76675
76765
  scripts: {
76676
76766
  deploy: `${npm14} run build && wrangler pages deploy`,
@@ -76682,10 +76772,10 @@ var config18 = {
76682
76772
  deployScript: "deploy",
76683
76773
  previewScript: "preview"
76684
76774
  };
76685
- var c3_default23 = config18;
76775
+ var c3_default25 = config19;
76686
76776
 
76687
76777
  // templates/openapi/c3.ts
76688
- var c3_default24 = {
76778
+ var c3_default26 = {
76689
76779
  configVersion: 1,
76690
76780
  id: "openapi",
76691
76781
  displayName: "API starter (OpenAPI compliant)",
@@ -76845,7 +76935,7 @@ async function copyExistingWorkerFiles(ctx) {
76845
76935
  (0, import_path11.join)(ctx.project.path, "wrangler.toml")
76846
76936
  );
76847
76937
  }
76848
- var c3_default25 = {
76938
+ var c3_default27 = {
76849
76939
  configVersion: 1,
76850
76940
  id: "pre-existing",
76851
76941
  displayName: "Pre-existing Worker (from Dashboard)",
@@ -76861,7 +76951,7 @@ var c3_default25 = {
76861
76951
  };
76862
76952
 
76863
76953
  // templates/queues/c3.ts
76864
- var c3_default26 = {
76954
+ var c3_default28 = {
76865
76955
  configVersion: 1,
76866
76956
  id: "queues",
76867
76957
  displayName: "Queue consumer & producer Worker",
@@ -76892,10 +76982,10 @@ var c3_default26 = {
76892
76982
  // templates/qwik/c3.ts
76893
76983
  var recast10 = __toESM(require_main3());
76894
76984
  var { npm: npm15, npx: npx5 } = detectPackageManager();
76895
- var generate18 = async (ctx) => {
76985
+ var generate20 = async (ctx) => {
76896
76986
  await runFrameworkGenerator(ctx, ["playground", ctx.project.name]);
76897
76987
  };
76898
- var configure14 = async (ctx) => {
76988
+ var configure15 = async (ctx) => {
76899
76989
  const cmd = [npx5, "qwik", "add", "cloudflare-pages"];
76900
76990
  endSection(`Running ${quoteShellArgs(cmd)}`);
76901
76991
  await runCommand(cmd);
@@ -76972,7 +77062,7 @@ var populateCloudflareEnv2 = () => {
76972
77062
  });
76973
77063
  s.stop(`${brandColor("updated")} \`${entrypointPath}\``);
76974
77064
  };
76975
- var config19 = {
77065
+ var config20 = {
76976
77066
  configVersion: 1,
76977
77067
  id: "qwik",
76978
77068
  frameworkCli: "create-qwik",
@@ -76981,8 +77071,8 @@ var config19 = {
76981
77071
  copyFiles: {
76982
77072
  path: "./templates"
76983
77073
  },
76984
- generate: generate18,
76985
- configure: configure14,
77074
+ generate: generate20,
77075
+ configure: configure15,
76986
77076
  transformPackageJson: async () => ({
76987
77077
  scripts: {
76988
77078
  deploy: `${npm15} run build && wrangler pages deploy`,
@@ -76994,11 +77084,11 @@ var config19 = {
76994
77084
  deployScript: "deploy",
76995
77085
  previewScript: "preview"
76996
77086
  };
76997
- var c3_default27 = config19;
77087
+ var c3_default29 = config20;
76998
77088
 
76999
77089
  // templates/react/c3.ts
77000
77090
  var { npm: npm16 } = detectPackageManager();
77001
- var generate19 = async (ctx) => {
77091
+ var generate21 = async (ctx) => {
77002
77092
  const variant = await inputPrompt({
77003
77093
  type: "select",
77004
77094
  question: "Select a variant:",
@@ -77027,14 +77117,14 @@ var variantsOptions = [
77027
77117
  label: "JavaScript + SWC"
77028
77118
  }
77029
77119
  ];
77030
- var config20 = {
77120
+ var config21 = {
77031
77121
  configVersion: 1,
77032
77122
  id: "react",
77033
77123
  // React's documentation now recommends using create-vite.
77034
77124
  frameworkCli: "create-vite",
77035
77125
  displayName: "React",
77036
77126
  platform: "pages",
77037
- generate: generate19,
77127
+ generate: generate21,
77038
77128
  transformPackageJson: async () => ({
77039
77129
  scripts: {
77040
77130
  deploy: `${npm16} run build && wrangler pages deploy ./dist`,
@@ -77045,11 +77135,11 @@ var config20 = {
77045
77135
  deployScript: "deploy",
77046
77136
  previewScript: "preview"
77047
77137
  };
77048
- var c3_default28 = config20;
77138
+ var c3_default30 = config21;
77049
77139
 
77050
77140
  // templates/remix/c3.ts
77051
77141
  var { npm: npm17 } = detectPackageManager();
77052
- var generate20 = async (ctx) => {
77142
+ var generate22 = async (ctx) => {
77053
77143
  await runFrameworkGenerator(ctx, [
77054
77144
  ctx.project.name,
77055
77145
  "--template",
@@ -77057,7 +77147,7 @@ var generate20 = async (ctx) => {
77057
77147
  ]);
77058
77148
  logRaw("");
77059
77149
  };
77060
- var configure15 = async () => {
77150
+ var configure16 = async () => {
77061
77151
  const typeDefsPath = "load-context.ts";
77062
77152
  const s = spinner();
77063
77153
  s.start(`Updating \`${typeDefsPath}\``);
@@ -77072,7 +77162,7 @@ var configure15 = async () => {
77072
77162
  });
77073
77163
  s.stop(`${brandColor("updated")} \`${dim(typeDefsPath)}\``);
77074
77164
  };
77075
- var config21 = {
77165
+ var config22 = {
77076
77166
  configVersion: 1,
77077
77167
  id: "remix",
77078
77168
  frameworkCli: "create-remix",
@@ -77081,8 +77171,8 @@ var config21 = {
77081
77171
  copyFiles: {
77082
77172
  path: "./templates"
77083
77173
  },
77084
- generate: generate20,
77085
- configure: configure15,
77174
+ generate: generate22,
77175
+ configure: configure16,
77086
77176
  transformPackageJson: async () => ({
77087
77177
  scripts: {
77088
77178
  deploy: `${npm17} run build && wrangler pages deploy`,
@@ -77094,10 +77184,10 @@ var config21 = {
77094
77184
  deployScript: "deploy",
77095
77185
  previewScript: "preview"
77096
77186
  };
77097
- var c3_default29 = config21;
77187
+ var c3_default31 = config22;
77098
77188
 
77099
77189
  // templates/scheduled/c3.ts
77100
- var c3_default30 = {
77190
+ var c3_default32 = {
77101
77191
  configVersion: 1,
77102
77192
  id: "scheduled",
77103
77193
  displayName: "Scheduled Worker (Cron Trigger)",
@@ -77118,11 +77208,11 @@ var c3_default30 = {
77118
77208
  // templates/solid/c3.ts
77119
77209
  var recast11 = __toESM(require_main3());
77120
77210
  var { npm: npm18 } = detectPackageManager();
77121
- var generate21 = async (ctx) => {
77211
+ var generate23 = async (ctx) => {
77122
77212
  await runFrameworkGenerator(ctx, ["-p", ctx.project.name, "-s"]);
77123
77213
  logRaw("");
77124
77214
  };
77125
- var configure16 = async (ctx) => {
77215
+ var configure17 = async (ctx) => {
77126
77216
  usesTypescript(ctx);
77127
77217
  const filePath = `app.config.${usesTypescript(ctx) ? "ts" : "js"}`;
77128
77218
  updateStatus(`Updating configuration in ${blue(filePath)}`);
@@ -77160,7 +77250,7 @@ var configure16 = async (ctx) => {
77160
77250
  }
77161
77251
  });
77162
77252
  };
77163
- var config22 = {
77253
+ var config23 = {
77164
77254
  configVersion: 1,
77165
77255
  id: "solid",
77166
77256
  frameworkCli: "create-solid",
@@ -77169,8 +77259,8 @@ var config22 = {
77169
77259
  copyFiles: {
77170
77260
  path: "./templates"
77171
77261
  },
77172
- generate: generate21,
77173
- configure: configure16,
77262
+ generate: generate23,
77263
+ configure: configure17,
77174
77264
  transformPackageJson: async () => ({
77175
77265
  scripts: {
77176
77266
  preview: `${npm18} run build && npx wrangler pages dev`,
@@ -77182,17 +77272,17 @@ var config22 = {
77182
77272
  deployScript: "deploy",
77183
77273
  previewScript: "preview"
77184
77274
  };
77185
- var c3_default31 = config22;
77275
+ var c3_default33 = config23;
77186
77276
 
77187
77277
  // templates/svelte/c3.ts
77188
77278
  var import_node_os4 = require("node:os");
77189
77279
  var recast12 = __toESM(require_main3());
77190
77280
  var { npm: npm19 } = detectPackageManager();
77191
- var generate22 = async (ctx) => {
77281
+ var generate24 = async (ctx) => {
77192
77282
  await runFrameworkGenerator(ctx, [ctx.project.name]);
77193
77283
  logRaw("");
77194
77284
  };
77195
- var configure17 = async (ctx) => {
77285
+ var configure18 = async (ctx) => {
77196
77286
  const pkg = `@sveltejs/adapter-cloudflare`;
77197
77287
  await installPackages([pkg], {
77198
77288
  dev: true,
@@ -77251,7 +77341,7 @@ var updateTypeDefinitions2 = (ctx) => {
77251
77341
  }
77252
77342
  });
77253
77343
  };
77254
- var config23 = {
77344
+ var config24 = {
77255
77345
  configVersion: 1,
77256
77346
  id: "svelte",
77257
77347
  frameworkCli: "create-svelte",
@@ -77263,8 +77353,8 @@ var config23 = {
77263
77353
  ts: { path: "./ts" }
77264
77354
  }
77265
77355
  },
77266
- generate: generate22,
77267
- configure: configure17,
77356
+ generate: generate24,
77357
+ configure: configure18,
77268
77358
  transformPackageJson: async (original, ctx) => {
77269
77359
  let scripts = {
77270
77360
  preview: `${npm19} run build && wrangler pages dev`,
@@ -77283,20 +77373,20 @@ var config23 = {
77283
77373
  deployScript: "deploy",
77284
77374
  previewScript: "preview"
77285
77375
  };
77286
- var c3_default32 = config23;
77376
+ var c3_default34 = config24;
77287
77377
 
77288
77378
  // templates/vue/c3.ts
77289
77379
  var { npm: npm20 } = detectPackageManager();
77290
- var generate23 = async (ctx) => {
77380
+ var generate25 = async (ctx) => {
77291
77381
  await runFrameworkGenerator(ctx, [ctx.project.name]);
77292
77382
  };
77293
- var config24 = {
77383
+ var config25 = {
77294
77384
  configVersion: 1,
77295
77385
  id: "vue",
77296
77386
  frameworkCli: "create-vue",
77297
77387
  displayName: "Vue",
77298
77388
  platform: "pages",
77299
- generate: generate23,
77389
+ generate: generate25,
77300
77390
  transformPackageJson: async () => ({
77301
77391
  scripts: {
77302
77392
  deploy: `${npm20} run build && wrangler pages deploy ./dist`,
@@ -77307,7 +77397,7 @@ var config24 = {
77307
77397
  deployScript: "deploy",
77308
77398
  previewScript: "preview"
77309
77399
  };
77310
- var c3_default33 = config24;
77400
+ var c3_default35 = config25;
77311
77401
 
77312
77402
  // src/validators.ts
77313
77403
  var import_fs10 = require("fs");
@@ -77397,28 +77487,30 @@ function getFrameworkMap({ experimental = false }) {
77397
77487
  astro: c3_default2,
77398
77488
  docusaurus: c3_default3,
77399
77489
  gatsby: c3_default4,
77400
- nuxt: c3_default8,
77401
- qwik: c3_default9,
77402
- remix: c3_default10,
77403
- solid: c3_default11,
77404
- svelte: c3_default12
77490
+ hono: c3_default8,
77491
+ next: c3_default9,
77492
+ nuxt: c3_default10,
77493
+ qwik: c3_default11,
77494
+ remix: c3_default12,
77495
+ solid: c3_default13,
77496
+ svelte: c3_default14
77405
77497
  };
77406
77498
  } else {
77407
77499
  return {
77408
- analog: c3_default13,
77409
- angular: c3_default14,
77410
- astro: c3_default15,
77411
- docusaurus: c3_default17,
77412
- gatsby: c3_default18,
77413
- hono: c3_default21,
77414
- next: c3_default22,
77415
- nuxt: c3_default23,
77416
- qwik: c3_default27,
77417
- react: c3_default28,
77418
- remix: c3_default29,
77419
- solid: c3_default31,
77420
- svelte: c3_default32,
77421
- vue: c3_default33
77500
+ analog: c3_default15,
77501
+ angular: c3_default16,
77502
+ astro: c3_default17,
77503
+ docusaurus: c3_default19,
77504
+ gatsby: c3_default20,
77505
+ hono: c3_default23,
77506
+ next: c3_default24,
77507
+ nuxt: c3_default25,
77508
+ qwik: c3_default29,
77509
+ react: c3_default30,
77510
+ remix: c3_default31,
77511
+ solid: c3_default33,
77512
+ svelte: c3_default34,
77513
+ vue: c3_default35
77422
77514
  };
77423
77515
  }
77424
77516
  }
@@ -77431,13 +77523,13 @@ function getTemplateMap({ experimental = false }) {
77431
77523
  };
77432
77524
  } else {
77433
77525
  return {
77434
- "hello-world": c3_default20,
77435
- common: c3_default16,
77436
- scheduled: c3_default30,
77437
- queues: c3_default26,
77438
- "hello-world-durable-object": c3_default19,
77439
- openapi: c3_default24,
77440
- "pre-existing": c3_default25
77526
+ "hello-world": c3_default22,
77527
+ common: c3_default18,
77528
+ scheduled: c3_default32,
77529
+ queues: c3_default28,
77530
+ "hello-world-durable-object": c3_default21,
77531
+ openapi: c3_default26,
77532
+ "pre-existing": c3_default27
77441
77533
  };
77442
77534
  }
77443
77535
  }
@@ -77576,8 +77668,8 @@ var createContext = async (args, prevArgs) => {
77576
77668
  experimental: args.experimental
77577
77669
  });
77578
77670
  const frameworkOptions = Object.entries(frameworkMap).map(
77579
- ([key, config25]) => ({
77580
- label: config25.displayName,
77671
+ ([key, config26]) => ({
77672
+ label: config26.displayName,
77581
77673
  value: key
77582
77674
  })
77583
77675
  );
@@ -77715,28 +77807,28 @@ var processRemoteTemplate = async (args) => {
77715
77807
  src = src.replace("https://github.com/", "github:").replace("/tree/main/", "/");
77716
77808
  }
77717
77809
  const path6 = await downloadRemoteTemplate(src);
77718
- const config25 = inferTemplateConfig(path6);
77719
- validateTemplate(path6, config25);
77810
+ const config26 = inferTemplateConfig(path6);
77811
+ validateTemplate(path6, config26);
77720
77812
  updateStatus(`${brandColor("template")} ${dim("cloned and validated")}`);
77721
77813
  return {
77722
77814
  path: path6,
77723
- ...config25
77815
+ ...config26
77724
77816
  };
77725
77817
  };
77726
- var validateTemplate = (path6, config25) => {
77727
- if (!config25.copyFiles) {
77818
+ var validateTemplate = (path6, config26) => {
77819
+ if (!config26.copyFiles) {
77728
77820
  return;
77729
77821
  }
77730
- if (isVariantInfo(config25.copyFiles)) {
77731
- validateTemplateSrcDirectory((0, import_path13.resolve)(path6, config25.copyFiles.path), config25);
77822
+ if (isVariantInfo(config26.copyFiles)) {
77823
+ validateTemplateSrcDirectory((0, import_path13.resolve)(path6, config26.copyFiles.path), config26);
77732
77824
  } else {
77733
- for (const variant of Object.values(config25.copyFiles.variants)) {
77734
- validateTemplateSrcDirectory((0, import_path13.resolve)(path6, variant.path), config25);
77825
+ for (const variant of Object.values(config26.copyFiles.variants)) {
77826
+ validateTemplateSrcDirectory((0, import_path13.resolve)(path6, variant.path), config26);
77735
77827
  }
77736
77828
  }
77737
77829
  };
77738
- var validateTemplateSrcDirectory = (path6, config25) => {
77739
- if (config25.platform === "workers") {
77830
+ var validateTemplateSrcDirectory = (path6, config26) => {
77831
+ if (config26.platform === "workers") {
77740
77832
  const wranglerTomlPath = (0, import_path13.resolve)(path6, "wrangler.toml");
77741
77833
  if (!(0, import_fs11.existsSync)(wranglerTomlPath)) {
77742
77834
  throw new Error(
@@ -79508,7 +79600,7 @@ var hasBinding = (node) => {
79508
79600
  return false;
79509
79601
  }
79510
79602
  for (const key of Object.keys(node)) {
79511
- if (key === "experimental_assets" || key === "assets") {
79603
+ if (key === "assets") {
79512
79604
  continue;
79513
79605
  }
79514
79606
  if (key === "binding" || key === "bindings") {
@@ -79927,8 +80019,8 @@ var renderValues = (values) => {
79927
80019
  };
79928
80020
 
79929
80021
  // src/helpers/retry.ts
79930
- var retry = async (config25, fn) => {
79931
- let { times } = config25;
80022
+ var retry = async (config26, fn) => {
80023
+ let { times } = config26;
79932
80024
  let error2 = null;
79933
80025
  while (times > 0) {
79934
80026
  try {
@@ -79936,9 +80028,10 @@ var retry = async (config25, fn) => {
79936
80028
  } catch (e) {
79937
80029
  error2 = e;
79938
80030
  times--;
79939
- if (config25.exitCondition?.(e)) {
80031
+ if (config26.exitCondition?.(e)) {
79940
80032
  break;
79941
80033
  }
80034
+ await sleep(config26.sleepMs ?? 1e3);
79942
80035
  }
79943
80036
  }
79944
80037
  throw error2;
@@ -81365,8 +81458,8 @@ async function addWorkersTypesToTsConfig(ctx) {
81365
81458
  }
81366
81459
  const typesEntrypoint = `@cloudflare/workers-types/${entrypointVersion}`;
81367
81460
  try {
81368
- const config25 = parse3(tsconfig);
81369
- const currentTypes = config25.compilerOptions?.types ?? [];
81461
+ const config26 = parse3(tsconfig);
81462
+ const currentTypes = config26.compilerOptions?.types ?? [];
81370
81463
  const explicitEntrypoint = currentTypes.some(
81371
81464
  (t) => t.match(/@cloudflare\/workers-types\/\d{4}-\d{2}-\d{2}/)
81372
81465
  );
@@ -81441,7 +81534,7 @@ var runCli = async (args) => {
81441
81534
  printBanner();
81442
81535
  const ctx = await createContext(args);
81443
81536
  await create(ctx);
81444
- await configure18(ctx);
81537
+ await configure19(ctx);
81445
81538
  await deploy(ctx);
81446
81539
  printSummary(ctx);
81447
81540
  logRaw("");
@@ -81469,7 +81562,7 @@ var create = async (ctx) => {
81469
81562
  await rectifyPmMismatch(ctx);
81470
81563
  endSection(`Application created`);
81471
81564
  };
81472
- var configure18 = async (ctx) => {
81565
+ var configure19 = async (ctx) => {
81473
81566
  startSection("Configuring your application for Cloudflare", "Step 2 of 3");
81474
81567
  await installWrangler();
81475
81568
  await installWorkersTypes(ctx);