create-cloudflare 0.0.0-dae7bd4dd → 0.0.0-db0172707

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 (81) hide show
  1. package/dist/cli.js +638 -651
  2. package/dist/tsconfig.tsbuildinfo +1 -1
  3. package/package.json +7 -7
  4. package/templates/astro/c3.ts +93 -5
  5. package/templates/hello-world/c3.ts +2 -3
  6. package/templates/hello-world-durable-object/c3.ts +2 -2
  7. package/templates/hello-world-durable-object/js/src/index.js +9 -10
  8. package/templates/hello-world-durable-object/js/wrangler.jsonc +1 -1
  9. package/templates/hello-world-durable-object/ts/src/index.ts +9 -10
  10. package/templates/hello-world-durable-object/ts/wrangler.jsonc +1 -1
  11. package/templates/react/workers/js/src/assets/Cloudflare_Logo.svg +5 -7
  12. package/templates/remix/c3.ts +63 -5
  13. package/{templates/astro/workers → templates-experimental/astro}/c3.ts +2 -2
  14. package/templates-experimental/astro/templates/js/public/.assetsignore +4 -0
  15. package/templates-experimental/astro/templates/ts/public/.assetsignore +4 -0
  16. package/{templates → templates-experimental}/hello-world-assets-only/c3.ts +3 -4
  17. package/{templates → templates-experimental}/hello-world-durable-object-with-assets/c3.ts +3 -3
  18. package/{templates → templates-experimental}/hello-world-with-assets/c3.ts +4 -3
  19. package/{templates/remix/workers → templates-experimental/remix}/c3.ts +2 -2
  20. package/templates/astro/pages/c3.ts +0 -98
  21. package/templates/astro/workers/templates/js/public/.assetsignore +0 -2
  22. package/templates/astro/workers/templates/ts/public/.assetsignore +0 -2
  23. package/templates/remix/pages/c3.ts +0 -68
  24. /package/templates/astro/{pages/templates → templates}/js/wrangler.jsonc +0 -0
  25. /package/templates/astro/{workers/templates → templates}/ts/src/env.d.ts +0 -0
  26. /package/templates/{hello-world-with-assets → astro/templates}/ts/worker-configuration.d.ts +0 -0
  27. /package/templates/astro/{pages/templates → templates}/ts/wrangler.jsonc +0 -0
  28. /package/templates/remix/{pages/templates → templates}/worker-configuration.d.ts +0 -0
  29. /package/templates/remix/{pages/templates → templates}/wrangler.jsonc +0 -0
  30. /package/{templates/astro/workers → templates-experimental/astro}/templates/js/wrangler.jsonc +0 -0
  31. /package/{templates/astro/pages → templates-experimental/astro}/templates/ts/src/env.d.ts +0 -0
  32. /package/{templates/astro/pages → templates-experimental/astro}/templates/ts/worker-configuration.d.ts +0 -0
  33. /package/{templates/astro/workers → templates-experimental/astro}/templates/ts/wrangler.jsonc +0 -0
  34. /package/{templates → templates-experimental}/hello-world-assets-only/templates/package.json +0 -0
  35. /package/{templates → templates-experimental}/hello-world-assets-only/templates/public/index.html +0 -0
  36. /package/{templates → templates-experimental}/hello-world-assets-only/templates/wrangler.jsonc +0 -0
  37. /package/{templates → templates-experimental}/hello-world-durable-object-with-assets/js/.editorconfig +0 -0
  38. /package/{templates → templates-experimental}/hello-world-durable-object-with-assets/js/.prettierrc +0 -0
  39. /package/{templates → templates-experimental}/hello-world-durable-object-with-assets/js/__dot__gitignore +0 -0
  40. /package/{templates → templates-experimental}/hello-world-durable-object-with-assets/js/package.json +0 -0
  41. /package/{templates → templates-experimental}/hello-world-durable-object-with-assets/js/public/index.html +0 -0
  42. /package/{templates → templates-experimental}/hello-world-durable-object-with-assets/js/src/index.js +0 -0
  43. /package/{templates → templates-experimental}/hello-world-durable-object-with-assets/js/wrangler.jsonc +0 -0
  44. /package/{templates → templates-experimental}/hello-world-durable-object-with-assets/ts/.editorconfig +0 -0
  45. /package/{templates → templates-experimental}/hello-world-durable-object-with-assets/ts/.prettierrc +0 -0
  46. /package/{templates → templates-experimental}/hello-world-durable-object-with-assets/ts/__dot__gitignore +0 -0
  47. /package/{templates → templates-experimental}/hello-world-durable-object-with-assets/ts/package.json +0 -0
  48. /package/{templates → templates-experimental}/hello-world-durable-object-with-assets/ts/public/index.html +0 -0
  49. /package/{templates → templates-experimental}/hello-world-durable-object-with-assets/ts/src/index.ts +0 -0
  50. /package/{templates → templates-experimental}/hello-world-durable-object-with-assets/ts/tsconfig.json +0 -0
  51. /package/{templates → templates-experimental}/hello-world-durable-object-with-assets/ts/worker-configuration.d.ts +0 -0
  52. /package/{templates → templates-experimental}/hello-world-durable-object-with-assets/ts/wrangler.jsonc +0 -0
  53. /package/{templates → templates-experimental}/hello-world-with-assets/js/.editorconfig +0 -0
  54. /package/{templates → templates-experimental}/hello-world-with-assets/js/.prettierrc +0 -0
  55. /package/{templates → templates-experimental}/hello-world-with-assets/js/__dot__gitignore +0 -0
  56. /package/{templates → templates-experimental}/hello-world-with-assets/js/package.json +0 -0
  57. /package/{templates → templates-experimental}/hello-world-with-assets/js/public/index.html +0 -0
  58. /package/{templates → templates-experimental}/hello-world-with-assets/js/src/index.js +0 -0
  59. /package/{templates → templates-experimental}/hello-world-with-assets/js/test/index.spec.js +0 -0
  60. /package/{templates → templates-experimental}/hello-world-with-assets/js/vitest.config.js +0 -0
  61. /package/{templates → templates-experimental}/hello-world-with-assets/js/wrangler.jsonc +0 -0
  62. /package/{templates → templates-experimental}/hello-world-with-assets/py/__dot__gitignore +0 -0
  63. /package/{templates → templates-experimental}/hello-world-with-assets/py/package.json +0 -0
  64. /package/{templates → templates-experimental}/hello-world-with-assets/py/public/index.html +0 -0
  65. /package/{templates → templates-experimental}/hello-world-with-assets/py/src/entry.py +0 -0
  66. /package/{templates → templates-experimental}/hello-world-with-assets/py/wrangler.jsonc +0 -0
  67. /package/{templates → templates-experimental}/hello-world-with-assets/ts/.editorconfig +0 -0
  68. /package/{templates → templates-experimental}/hello-world-with-assets/ts/.prettierrc +0 -0
  69. /package/{templates → templates-experimental}/hello-world-with-assets/ts/__dot__gitignore +0 -0
  70. /package/{templates → templates-experimental}/hello-world-with-assets/ts/package.json +0 -0
  71. /package/{templates → templates-experimental}/hello-world-with-assets/ts/public/index.html +0 -0
  72. /package/{templates → templates-experimental}/hello-world-with-assets/ts/src/index.ts +0 -0
  73. /package/{templates → templates-experimental}/hello-world-with-assets/ts/test/index.spec.ts +0 -0
  74. /package/{templates → templates-experimental}/hello-world-with-assets/ts/test/tsconfig.json +0 -0
  75. /package/{templates → templates-experimental}/hello-world-with-assets/ts/tsconfig.json +0 -0
  76. /package/{templates → templates-experimental}/hello-world-with-assets/ts/vitest.config.mts +0 -0
  77. /package/{templates/astro/workers/templates → templates-experimental/hello-world-with-assets}/ts/worker-configuration.d.ts +0 -0
  78. /package/{templates → templates-experimental}/hello-world-with-assets/ts/wrangler.jsonc +0 -0
  79. /package/{templates/remix/workers → templates-experimental/remix}/templates/public/.assetsignore +0 -0
  80. /package/{templates/remix/workers → templates-experimental/remix}/templates/worker-configuration.d.ts +0 -0
  81. /package/{templates/remix/workers → templates-experimental/remix}/templates/wrangler.toml +0 -0
package/dist/cli.js CHANGED
@@ -568,7 +568,7 @@ var require_XDGAppPaths = __commonJS({
568
568
  XDGAppPaths.cache = function cache(dirOptions) {
569
569
  return path6.join(xdg.cache(), finalPathSegment(dirOptions));
570
570
  };
571
- XDGAppPaths.config = function config36(dirOptions) {
571
+ XDGAppPaths.config = function config34(dirOptions) {
572
572
  return path6.join(xdg.config(), finalPathSegment(dirOptions));
573
573
  };
574
574
  XDGAppPaths.data = function data(dirOptions) {
@@ -625,7 +625,7 @@ var require_XDG = __commonJS({
625
625
  var cache = function() {
626
626
  return valOrPath(env3.get("XDG_CACHE_HOME"), [baseDir(), ".cache"]);
627
627
  };
628
- var config36 = function() {
628
+ var config34 = function() {
629
629
  return valOrPath(env3.get("XDG_CONFIG_HOME"), [baseDir(), ".config"]);
630
630
  };
631
631
  var data = function() {
@@ -637,13 +637,13 @@ var require_XDG = __commonJS({
637
637
  var state = function() {
638
638
  return valOrPath(env3.get("XDG_STATE_HOME"), [baseDir(), ".local", "state"]);
639
639
  };
640
- return { cache, config: config36, data, runtime, state };
640
+ return { cache, config: config34, data, runtime, state };
641
641
  };
642
642
  var macos = function() {
643
643
  var cache = function() {
644
644
  return valOrPath(env3.get("XDG_CACHE_HOME"), [baseDir(), "Library", "Caches"]);
645
645
  };
646
- var config36 = function() {
646
+ var config34 = function() {
647
647
  return valOrPath(env3.get("XDG_CONFIG_HOME"), [baseDir(), "Library", "Preferences"]);
648
648
  };
649
649
  var data = function() {
@@ -655,7 +655,7 @@ var require_XDG = __commonJS({
655
655
  var state = function() {
656
656
  return valOrPath(env3.get("XDG_STATE_HOME"), [baseDir(), "Library", "State"]);
657
657
  };
658
- return { cache, config: config36, data, runtime, state };
658
+ return { cache, config: config34, data, runtime, state };
659
659
  };
660
660
  var windows = function() {
661
661
  function appData() {
@@ -667,7 +667,7 @@ var require_XDG = __commonJS({
667
667
  var cache = function() {
668
668
  return valOrPath(env3.get("XDG_CACHE_HOME"), [localAppData(), "xdg.cache"]);
669
669
  };
670
- var config36 = function() {
670
+ var config34 = function() {
671
671
  return valOrPath(env3.get("XDG_CONFIG_HOME"), [appData(), "xdg.config"]);
672
672
  };
673
673
  var data = function() {
@@ -679,7 +679,7 @@ var require_XDG = __commonJS({
679
679
  var state = function() {
680
680
  return valOrPath(env3.get("XDG_STATE_HOME"), [localAppData(), "xdg.state"]);
681
681
  };
682
- return { cache, config: config36, data, runtime, state };
682
+ return { cache, config: config34, data, runtime, state };
683
683
  };
684
684
  var XDG_ = /* @__PURE__ */ function() {
685
685
  function XDG_2() {
@@ -31509,21 +31509,21 @@ var require_dist_web = __commonJS({
31509
31509
  _createClass(Haikunator3, [{
31510
31510
  key: "haikunate",
31511
31511
  value: function haikunate(options) {
31512
- var config36 = (0, _lodash["default"])(options, this.config);
31513
- if (config36.tokenHex === true) {
31514
- config36.tokenChars = "0123456789abcdef";
31512
+ var config34 = (0, _lodash["default"])(options, this.config);
31513
+ if (config34.tokenHex === true) {
31514
+ config34.tokenChars = "0123456789abcdef";
31515
31515
  }
31516
31516
  var adjective = this._randomElement(this.adjectives);
31517
31517
  var noun = this._randomElement(this.nouns);
31518
- if (!config36.tokenLength) config36.tokenLength = 0;
31518
+ if (!config34.tokenLength) config34.tokenLength = 0;
31519
31519
  var token = "";
31520
- for (var i = 0; i < config36.tokenLength; i++) {
31521
- token += this._randomElement(config36.tokenChars);
31520
+ for (var i = 0; i < config34.tokenLength; i++) {
31521
+ token += this._randomElement(config34.tokenChars);
31522
31522
  }
31523
31523
  var sections = [adjective, noun, token];
31524
31524
  return sections.filter(function(e) {
31525
31525
  return !!e;
31526
- }).join(config36.delimiter);
31526
+ }).join(config34.delimiter);
31527
31527
  }
31528
31528
  /**
31529
31529
  * Get a random element from an array/string
@@ -40036,13 +40036,13 @@ var require_esprima = __commonJS({
40036
40036
  return Reader2;
40037
40037
  }();
40038
40038
  var Tokenizer = function() {
40039
- function Tokenizer2(code, config36) {
40039
+ function Tokenizer2(code, config34) {
40040
40040
  this.errorHandler = new error_handler_1.ErrorHandler();
40041
- this.errorHandler.tolerant = config36 ? typeof config36.tolerant === "boolean" && config36.tolerant : false;
40041
+ this.errorHandler.tolerant = config34 ? typeof config34.tolerant === "boolean" && config34.tolerant : false;
40042
40042
  this.scanner = new scanner_1.Scanner(code, this.errorHandler);
40043
- this.scanner.trackComment = config36 ? typeof config36.comment === "boolean" && config36.comment : false;
40044
- this.trackRange = config36 ? typeof config36.range === "boolean" && config36.range : false;
40045
- this.trackLoc = config36 ? typeof config36.loc === "boolean" && config36.loc : false;
40043
+ this.scanner.trackComment = config34 ? typeof config34.comment === "boolean" && config34.comment : false;
40044
+ this.trackRange = config34 ? typeof config34.range === "boolean" && config34.range : false;
40045
+ this.trackLoc = config34 ? typeof config34.loc === "boolean" && config34.loc : false;
40046
40046
  this.buffer = [];
40047
40047
  this.reader = new Reader();
40048
40048
  }
@@ -49803,11 +49803,11 @@ var require_printer = __commonJS({
49803
49803
  return this.code;
49804
49804
  };
49805
49805
  var emptyPrintResult = new PrintResult("");
49806
- var Printer = function Printer2(config36) {
49806
+ var Printer = function Printer2(config34) {
49807
49807
  assert_1.default.ok(this instanceof Printer2);
49808
- var explicitTabWidth = config36 && config36.tabWidth;
49809
- config36 = options_1.normalize(config36);
49810
- config36.sourceFileName = null;
49808
+ var explicitTabWidth = config34 && config34.tabWidth;
49809
+ config34 = options_1.normalize(config34);
49810
+ config34.sourceFileName = null;
49811
49811
  function makePrintFunctionWith(options, overrides) {
49812
49812
  options = Object.assign({}, options, overrides);
49813
49813
  return function(path6) {
@@ -49822,11 +49822,11 @@ var require_printer = __commonJS({
49822
49822
  includeComments: false
49823
49823
  }));
49824
49824
  }
49825
- var oldTabWidth = config36.tabWidth;
49825
+ var oldTabWidth = config34.tabWidth;
49826
49826
  if (!explicitTabWidth) {
49827
49827
  var loc = path6.getNode().loc;
49828
49828
  if (loc && loc.lines && loc.lines.guessTabWidth) {
49829
- config36.tabWidth = loc.lines.guessTabWidth();
49829
+ config34.tabWidth = loc.lines.guessTabWidth();
49830
49830
  }
49831
49831
  }
49832
49832
  var reprinter = patcher_1.getReprinter(path6);
@@ -49840,11 +49840,11 @@ var require_printer = __commonJS({
49840
49840
  // right choice because it gives us the opportunity to reprint
49841
49841
  // such nodes using their original source.
49842
49842
  reprinter(print2)
49843
- ) : genericPrint(path6, config36, options, makePrintFunctionWith(options, {
49843
+ ) : genericPrint(path6, config34, options, makePrintFunctionWith(options, {
49844
49844
  includeComments: true,
49845
49845
  avoidRootParens: false
49846
49846
  }));
49847
- config36.tabWidth = oldTabWidth;
49847
+ config34.tabWidth = oldTabWidth;
49848
49848
  return lines;
49849
49849
  }
49850
49850
  this.print = function(ast) {
@@ -49855,7 +49855,7 @@ var require_printer = __commonJS({
49855
49855
  includeComments: true,
49856
49856
  avoidRootParens: false
49857
49857
  });
49858
- return new PrintResult(lines.toString(config36), util.composeSourceMaps(config36.inputSourceMap, lines.getSourceMap(config36.sourceMapName, config36.sourceRoot)));
49858
+ return new PrintResult(lines.toString(config34), util.composeSourceMaps(config34.inputSourceMap, lines.getSourceMap(config34.sourceMapName, config34.sourceRoot)));
49859
49859
  };
49860
49860
  this.printGenerically = function(ast) {
49861
49861
  if (!ast) {
@@ -49863,26 +49863,26 @@ var require_printer = __commonJS({
49863
49863
  }
49864
49864
  function printGenerically(path7) {
49865
49865
  return comments_1.printComments(path7, function(path8) {
49866
- return genericPrint(path8, config36, {
49866
+ return genericPrint(path8, config34, {
49867
49867
  includeComments: true,
49868
49868
  avoidRootParens: false
49869
49869
  }, printGenerically);
49870
49870
  });
49871
49871
  }
49872
49872
  var path6 = fast_path_1.default.from(ast);
49873
- var oldReuseWhitespace = config36.reuseWhitespace;
49874
- config36.reuseWhitespace = false;
49875
- var pr = new PrintResult(printGenerically(path6).toString(config36));
49876
- config36.reuseWhitespace = oldReuseWhitespace;
49873
+ var oldReuseWhitespace = config34.reuseWhitespace;
49874
+ config34.reuseWhitespace = false;
49875
+ var pr = new PrintResult(printGenerically(path6).toString(config34));
49876
+ config34.reuseWhitespace = oldReuseWhitespace;
49877
49877
  return pr;
49878
49878
  };
49879
49879
  };
49880
49880
  exports2.Printer = Printer;
49881
- function genericPrint(path6, config36, options, printPath) {
49881
+ function genericPrint(path6, config34, options, printPath) {
49882
49882
  assert_1.default.ok(path6 instanceof fast_path_1.default);
49883
49883
  var node = path6.getValue();
49884
49884
  var parts = [];
49885
- var linesWithoutParens = genericPrintNoParens(path6, config36, printPath);
49885
+ var linesWithoutParens = genericPrintNoParens(path6, config34, printPath);
49886
49886
  if (!node || linesWithoutParens.isEmpty()) {
49887
49887
  return linesWithoutParens;
49888
49888
  }
@@ -69380,33 +69380,33 @@ var inputPrompt = async (promptConfig) => {
69380
69380
  }
69381
69381
  return input;
69382
69382
  };
69383
- var renderSubmit = (config36, value) => {
69384
- const { question, label } = config36;
69385
- if (config36.type !== "confirm" && !value) {
69383
+ var renderSubmit = (config34, value) => {
69384
+ const { question, label } = config34;
69385
+ if (config34.type !== "confirm" && !value) {
69386
69386
  return [`${leftT} ${question} ${dim("(skipped)")}`, `${grayBar}`];
69387
69387
  }
69388
- const content = config36.type === "confirm" ? `${grayBar} ${brandColor(value)} ${dim(label)}` : `${grayBar} ${brandColor(label)} ${dim(value)}`;
69388
+ const content = config34.type === "confirm" ? `${grayBar} ${brandColor(value)} ${dim(label)}` : `${grayBar} ${brandColor(label)} ${dim(value)}`;
69389
69389
  return [`${leftT} ${question}`, content, `${grayBar}`];
69390
69390
  };
69391
- var getRenderers = (config36) => {
69392
- switch (config36.type) {
69391
+ var getRenderers = (config34) => {
69392
+ switch (config34.type) {
69393
69393
  case "select":
69394
- return getSelectRenderers(config36);
69394
+ return getSelectRenderers(config34);
69395
69395
  case "confirm":
69396
- return getConfirmRenderers(config36);
69396
+ return getConfirmRenderers(config34);
69397
69397
  case "text":
69398
- return getTextRenderers(config36);
69398
+ return getTextRenderers(config34);
69399
69399
  case "multiselect":
69400
- return getSelectRenderers(config36);
69400
+ return getSelectRenderers(config34);
69401
69401
  case "list":
69402
- return getSelectListRenderers(config36);
69402
+ return getSelectListRenderers(config34);
69403
69403
  }
69404
69404
  };
69405
- var getTextRenderers = (config36) => {
69406
- const { question } = config36;
69407
- const helpText = config36.helpText ?? "";
69408
- const format5 = config36.format ?? ((val) => String(val));
69409
- const defaultValue = config36.defaultValue?.toString() ?? "";
69405
+ var getTextRenderers = (config34) => {
69406
+ const { question } = config34;
69407
+ const helpText = config34.helpText ?? "";
69408
+ const format5 = config34.format ?? ((val) => String(val));
69409
+ const defaultValue = config34.defaultValue?.toString() ?? "";
69410
69410
  const activeRenderer = ({ value }) => [
69411
69411
  `${blCorner} ${bold(question)} ${dim(helpText)}`,
69412
69412
  `${space(2)}${format5(value || dim(defaultValue))}`,
@@ -69429,14 +69429,14 @@ var getTextRenderers = (config36) => {
69429
69429
  ``
69430
69430
  // extra line for readability
69431
69431
  ],
69432
- submit: ({ value }) => renderSubmit(config36, format5(value ?? "")),
69432
+ submit: ({ value }) => renderSubmit(config34, format5(value ?? "")),
69433
69433
  cancel: activeRenderer
69434
69434
  };
69435
69435
  };
69436
- var getSelectRenderers = (config36) => {
69437
- const { options, question, helpText: _helpText } = config36;
69436
+ var getSelectRenderers = (config34) => {
69437
+ const { options, question, helpText: _helpText } = config34;
69438
69438
  const helpText = _helpText ?? "";
69439
- const maxItemsPerPage = config36.maxItemsPerPage ?? 32;
69439
+ const maxItemsPerPage = config34.maxItemsPerPage ?? 32;
69440
69440
  const defaultRenderer = ({ cursor = 0, value }) => {
69441
69441
  const renderOption = (opt, i) => {
69442
69442
  const { label: optionLabel, value: optionValue } = opt;
@@ -69511,21 +69511,21 @@ ${space(2)}${dim("...")}` : ""}`,
69511
69511
  submit: ({ value }) => {
69512
69512
  if (Array.isArray(value)) {
69513
69513
  return renderSubmit(
69514
- config36,
69514
+ config34,
69515
69515
  options.filter((o) => value.includes(o.value)).map((o) => o.label).join(", ")
69516
69516
  );
69517
69517
  }
69518
69518
  return renderSubmit(
69519
- config36,
69519
+ config34,
69520
69520
  options.find((o) => o.value === value)?.label
69521
69521
  );
69522
69522
  },
69523
69523
  cancel: defaultRenderer
69524
69524
  };
69525
69525
  };
69526
- var getSelectListRenderers = (config36) => {
69527
- const { question, helpText: _helpText } = config36;
69528
- let options = config36.options;
69526
+ var getSelectListRenderers = (config34) => {
69527
+ const { question, helpText: _helpText } = config34;
69528
+ let options = config34.options;
69529
69529
  const helpText = _helpText ?? "";
69530
69530
  const { rows } = stdout;
69531
69531
  const defaultRenderer = ({ cursor, value }, prompt) => {
@@ -69606,20 +69606,20 @@ var getSelectListRenderers = (config36) => {
69606
69606
  submit: ({ value }) => {
69607
69607
  if (Array.isArray(value)) {
69608
69608
  return renderSubmit(
69609
- config36,
69609
+ config34,
69610
69610
  options.filter((o) => value.includes(o.value)).map((o) => o.value).join(", ")
69611
69611
  );
69612
69612
  }
69613
69613
  return renderSubmit(
69614
- config36,
69614
+ config34,
69615
69615
  options.find((o) => o.value === value)?.value
69616
69616
  );
69617
69617
  },
69618
69618
  cancel: defaultRenderer
69619
69619
  };
69620
69620
  };
69621
- var getConfirmRenderers = (config36) => {
69622
- const { activeText, inactiveText, question, helpText: _helpText } = config36;
69621
+ var getConfirmRenderers = (config34) => {
69622
+ const { activeText, inactiveText, question, helpText: _helpText } = config34;
69623
69623
  const helpText = _helpText ?? "";
69624
69624
  const active = activeText || "Yes";
69625
69625
  const inactive = inactiveText || "No";
@@ -69636,7 +69636,7 @@ var getConfirmRenderers = (config36) => {
69636
69636
  active: defaultRenderer,
69637
69637
  confirm: defaultRenderer,
69638
69638
  error: defaultRenderer,
69639
- submit: ({ value }) => renderSubmit(config36, value ? "yes" : "no"),
69639
+ submit: ({ value }) => renderSubmit(config34, value ? "yes" : "no"),
69640
69640
  cancel: defaultRenderer
69641
69641
  };
69642
69642
  };
@@ -70604,23 +70604,23 @@ var YargsParser = class {
70604
70604
  const configPath = argv2[configKey] || configLookup[configKey];
70605
70605
  if (configPath) {
70606
70606
  try {
70607
- let config36 = null;
70607
+ let config34 = null;
70608
70608
  const resolvedConfigPath = mixin2.resolve(mixin2.cwd(), configPath);
70609
70609
  const resolveConfig = flags.configs[configKey];
70610
70610
  if (typeof resolveConfig === "function") {
70611
70611
  try {
70612
- config36 = resolveConfig(resolvedConfigPath);
70612
+ config34 = resolveConfig(resolvedConfigPath);
70613
70613
  } catch (e) {
70614
- config36 = e;
70614
+ config34 = e;
70615
70615
  }
70616
- if (config36 instanceof Error) {
70617
- error2 = config36;
70616
+ if (config34 instanceof Error) {
70617
+ error2 = config34;
70618
70618
  return;
70619
70619
  }
70620
70620
  } else {
70621
- config36 = mixin2.require(resolvedConfigPath);
70621
+ config34 = mixin2.require(resolvedConfigPath);
70622
70622
  }
70623
- setConfigObject(config36);
70623
+ setConfigObject(config34);
70624
70624
  } catch (ex) {
70625
70625
  if (ex.name === "PermissionDenied")
70626
70626
  error2 = ex;
@@ -70630,9 +70630,9 @@ var YargsParser = class {
70630
70630
  }
70631
70631
  });
70632
70632
  }
70633
- function setConfigObject(config36, prev) {
70634
- Object.keys(config36).forEach(function(key) {
70635
- const value = config36[key];
70633
+ function setConfigObject(config34, prev) {
70634
+ Object.keys(config34).forEach(function(key) {
70635
+ const value = config34[key];
70636
70636
  const fullKey = prev ? prev + "." + key : key;
70637
70637
  if (typeof value === "object" && value !== null && !Array.isArray(value) && configuration["dot-notation"]) {
70638
70638
  setConfigObject(value, fullKey);
@@ -71784,11 +71784,11 @@ var CommandInstance = class {
71784
71784
  });
71785
71785
  if (!unparsed.length)
71786
71786
  return;
71787
- const config36 = Object.assign({}, options.configuration, {
71787
+ const config34 = Object.assign({}, options.configuration, {
71788
71788
  "populate--": false
71789
71789
  });
71790
71790
  const parsed = this.shim.Parser.detailed(unparsed, Object.assign({}, options, {
71791
- configuration: config36
71791
+ configuration: config34
71792
71792
  }));
71793
71793
  if (parsed.error) {
71794
71794
  yargs.getInternalMethods().getUsageInstance().fail(parsed.error.message, parsed.error);
@@ -73011,31 +73011,31 @@ ${customMsgs.join("\n")}` : "";
73011
73011
  // ../../node_modules/.pnpm/yargs@17.7.2/node_modules/yargs/build/lib/utils/apply-extends.js
73012
73012
  var previouslyVisitedConfigs = [];
73013
73013
  var shim2;
73014
- function applyExtends(config36, cwd, mergeExtends, _shim) {
73014
+ function applyExtends(config34, cwd, mergeExtends, _shim) {
73015
73015
  shim2 = _shim;
73016
73016
  let defaultConfig = {};
73017
- if (Object.prototype.hasOwnProperty.call(config36, "extends")) {
73018
- if (typeof config36.extends !== "string")
73017
+ if (Object.prototype.hasOwnProperty.call(config34, "extends")) {
73018
+ if (typeof config34.extends !== "string")
73019
73019
  return defaultConfig;
73020
- const isPath = /\.json|\..*rc$/.test(config36.extends);
73020
+ const isPath = /\.json|\..*rc$/.test(config34.extends);
73021
73021
  let pathToDefault = null;
73022
73022
  if (!isPath) {
73023
73023
  try {
73024
- pathToDefault = require.resolve(config36.extends);
73024
+ pathToDefault = require.resolve(config34.extends);
73025
73025
  } catch (_err) {
73026
- return config36;
73026
+ return config34;
73027
73027
  }
73028
73028
  } else {
73029
- pathToDefault = getPathToDefaultConfig(cwd, config36.extends);
73029
+ pathToDefault = getPathToDefaultConfig(cwd, config34.extends);
73030
73030
  }
73031
73031
  checkForCircularExtends(pathToDefault);
73032
73032
  previouslyVisitedConfigs.push(pathToDefault);
73033
- defaultConfig = isPath ? JSON.parse(shim2.readFileSync(pathToDefault, "utf8")) : require(config36.extends);
73034
- delete config36.extends;
73033
+ defaultConfig = isPath ? JSON.parse(shim2.readFileSync(pathToDefault, "utf8")) : require(config34.extends);
73034
+ delete config34.extends;
73035
73035
  defaultConfig = applyExtends(defaultConfig, shim2.path.dirname(pathToDefault), mergeExtends, shim2);
73036
73036
  }
73037
73037
  previouslyVisitedConfigs = [];
73038
- return mergeExtends ? mergeDeep(defaultConfig, config36) : Object.assign({}, defaultConfig, config36);
73038
+ return mergeExtends ? mergeDeep(defaultConfig, config34) : Object.assign({}, defaultConfig, config34);
73039
73039
  }
73040
73040
  function checkForCircularExtends(cfgPath) {
73041
73041
  if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) {
@@ -73811,9 +73811,9 @@ var YargsInstance = class {
73811
73811
  }
73812
73812
  return maybePromise;
73813
73813
  }
73814
- parserConfiguration(config36) {
73815
- argsert("<object>", [config36], arguments.length);
73816
- __classPrivateFieldSet(this, _YargsInstance_parserConfig, config36, "f");
73814
+ parserConfiguration(config34) {
73815
+ argsert("<object>", [config34], arguments.length);
73816
+ __classPrivateFieldSet(this, _YargsInstance_parserConfig, config34, "f");
73817
73817
  return this;
73818
73818
  }
73819
73819
  pkgConf(key, rootPath) {
@@ -73985,9 +73985,9 @@ var YargsInstance = class {
73985
73985
  return this;
73986
73986
  }
73987
73987
  }
73988
- usageConfiguration(config36) {
73989
- argsert("<object>", [config36], arguments.length);
73990
- __classPrivateFieldSet(this, _YargsInstance_usageConfig, config36, "f");
73988
+ usageConfiguration(config34) {
73989
+ argsert("<object>", [config34], arguments.length);
73990
+ __classPrivateFieldSet(this, _YargsInstance_usageConfig, config34, "f");
73991
73991
  return this;
73992
73992
  }
73993
73993
  version(opt, msg, ver) {
@@ -74393,11 +74393,11 @@ var YargsInstance = class {
74393
74393
  __classPrivateFieldGet(this, _YargsInstance_options, "f").__ = __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.__;
74394
74394
  __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration = this[kGetParserConfiguration]();
74395
74395
  const populateDoubleDash = !!__classPrivateFieldGet(this, _YargsInstance_options, "f").configuration["populate--"];
74396
- const config36 = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration, {
74396
+ const config34 = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration, {
74397
74397
  "populate--": true
74398
74398
  });
74399
74399
  const parsed = __classPrivateFieldGet(this, _YargsInstance_shim, "f").Parser.detailed(args, Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f"), {
74400
- configuration: { "parse-positional-numbers": false, ...config36 }
74400
+ configuration: { "parse-positional-numbers": false, ...config34 }
74401
74401
  }));
74402
74402
  const argv = Object.assign(parsed.argv, __classPrivateFieldGet(this, _YargsInstance_parseContext, "f"));
74403
74403
  let argvPromise = void 0;
@@ -74560,7 +74560,7 @@ var Yargs = YargsFactory(esm_default);
74560
74560
  var yargs_default = Yargs;
74561
74561
 
74562
74562
  // package.json
74563
- var version = "0.0.0-dae7bd4dd";
74563
+ var version = "0.0.0-db0172707";
74564
74564
 
74565
74565
  // src/metrics.ts
74566
74566
  var import_node_async_hooks = require("node:async_hooks");
@@ -74604,12 +74604,12 @@ function getGlobalWranglerConfigPath() {
74604
74604
  }
74605
74605
 
74606
74606
  // src/helpers/metrics-config.ts
74607
- function writeMetricsConfig(config36) {
74607
+ function writeMetricsConfig(config34) {
74608
74608
  (0, import_node_fs2.mkdirSync)(import_node_path2.default.dirname(getMetricsConfigPath()), { recursive: true });
74609
74609
  (0, import_node_fs2.writeFileSync)(
74610
74610
  getMetricsConfigPath(),
74611
74611
  JSON.stringify(
74612
- config36,
74612
+ config34,
74613
74613
  (_key, value) => value instanceof Date ? value.toISOString() : value,
74614
74614
  " "
74615
74615
  )
@@ -74617,9 +74617,9 @@ function writeMetricsConfig(config36) {
74617
74617
  }
74618
74618
  function readMetricsConfig() {
74619
74619
  try {
74620
- const config36 = (0, import_node_fs2.readFileSync)(getMetricsConfigPath(), "utf8");
74620
+ const config34 = (0, import_node_fs2.readFileSync)(getMetricsConfigPath(), "utf8");
74621
74621
  return JSON.parse(
74622
- config36,
74622
+ config34,
74623
74623
  (key, value) => key === "date" ? new Date(value) : value
74624
74624
  );
74625
74625
  } catch {
@@ -74629,10 +74629,10 @@ function readMetricsConfig() {
74629
74629
  function getMetricsConfigPath() {
74630
74630
  return import_node_path2.default.resolve(getGlobalWranglerConfigPath(), "metrics.json");
74631
74631
  }
74632
- function getDeviceId(config36) {
74633
- const deviceId = config36.deviceId ?? (0, import_node_crypto.randomUUID)();
74634
- if (config36.deviceId === void 0) {
74635
- writeMetricsConfig({ ...config36, deviceId });
74632
+ function getDeviceId(config34) {
74633
+ const deviceId = config34.deviceId ?? (0, import_node_crypto.randomUUID)();
74634
+ if (config34.deviceId === void 0) {
74635
+ writeMetricsConfig({ ...config34, deviceId });
74636
74636
  }
74637
74637
  return deviceId;
74638
74638
  }
@@ -74907,10 +74907,10 @@ function getPlatform() {
74907
74907
  function createReporter() {
74908
74908
  const events = [];
74909
74909
  const als = new import_node_async_hooks.AsyncLocalStorage();
74910
- const config36 = readMetricsConfig() ?? {};
74911
- const isFirstUsage = config36.c3permission === void 0;
74910
+ const config34 = readMetricsConfig() ?? {};
74911
+ const isFirstUsage = config34.c3permission === void 0;
74912
74912
  const isEnabled = isTelemetryEnabled();
74913
- const deviceId = getDeviceId(config36);
74913
+ const deviceId = getDeviceId(config34);
74914
74914
  const packageManager = detectPackageManager();
74915
74915
  const platform3 = getPlatform();
74916
74916
  const amplitude_session_id = Date.now();
@@ -74943,7 +74943,7 @@ function createReporter() {
74943
74943
  if (process.env.CREATE_CLOUDFLARE_TELEMETRY_DISABLED === "1") {
74944
74944
  return false;
74945
74945
  }
74946
- return hasSparrowSourceKey() && getC3Permission(config36).enabled;
74946
+ return hasSparrowSourceKey() && getC3Permission(config34).enabled;
74947
74947
  }
74948
74948
  async function waitForAllEventsSettled() {
74949
74949
  await Promise.allSettled(events);
@@ -75049,20 +75049,20 @@ function initializeC3Permission(enabled = true) {
75049
75049
  date: /* @__PURE__ */ new Date()
75050
75050
  };
75051
75051
  }
75052
- function getC3Permission(config36 = readMetricsConfig() ?? {}) {
75053
- if (!config36.c3permission) {
75054
- config36.c3permission = initializeC3Permission();
75055
- writeMetricsConfig(config36);
75052
+ function getC3Permission(config34 = readMetricsConfig() ?? {}) {
75053
+ if (!config34.c3permission) {
75054
+ config34.c3permission = initializeC3Permission();
75055
+ writeMetricsConfig(config34);
75056
75056
  }
75057
- return config36.c3permission;
75057
+ return config34.c3permission;
75058
75058
  }
75059
75059
  function updateC3Pemission(enabled) {
75060
- const config36 = readMetricsConfig();
75061
- if (config36.c3permission?.enabled === enabled) {
75060
+ const config34 = readMetricsConfig();
75061
+ if (config34.c3permission?.enabled === enabled) {
75062
75062
  return;
75063
75063
  }
75064
- config36.c3permission = initializeC3Permission(enabled);
75065
- writeMetricsConfig(config36);
75064
+ config34.c3permission = initializeC3Permission(enabled);
75065
+ writeMetricsConfig(config34);
75066
75066
  }
75067
75067
  var runTelemetryCommand = (action) => {
75068
75068
  const logTelemetryStatus = (enabled) => {
@@ -75107,24 +75107,24 @@ var import_haikunator = __toESM(require_dist_web());
75107
75107
  var import_fs6 = require("fs");
75108
75108
  var import_path6 = __toESM(require("path"));
75109
75109
  var import_undici2 = __toESM(require_undici());
75110
- var installPackages = async (packages, config36 = {}) => {
75110
+ var installPackages = async (packages, config34 = {}) => {
75111
75111
  const { npm: npm24 } = detectPackageManager();
75112
75112
  let saveFlag;
75113
75113
  let cmd;
75114
75114
  switch (npm24) {
75115
75115
  case "yarn":
75116
75116
  cmd = "add";
75117
- saveFlag = config36.dev ? "-D" : "";
75117
+ saveFlag = config34.dev ? "-D" : "";
75118
75118
  break;
75119
75119
  case "bun":
75120
75120
  cmd = "add";
75121
- saveFlag = config36.dev ? "-d" : "";
75121
+ saveFlag = config34.dev ? "-d" : "";
75122
75122
  break;
75123
75123
  case "npm":
75124
75124
  case "pnpm":
75125
75125
  default:
75126
75126
  cmd = "install";
75127
- saveFlag = config36.dev ? "--save-dev" : "";
75127
+ saveFlag = config34.dev ? "--save-dev" : "";
75128
75128
  break;
75129
75129
  }
75130
75130
  await runCommand(
@@ -75139,7 +75139,7 @@ var installPackages = async (packages, config36 = {}) => {
75139
75139
  ...npm24 === "npm" ? ["--legacy-peer-deps"] : []
75140
75140
  ],
75141
75141
  {
75142
- ...config36,
75142
+ ...config34,
75143
75143
  silent: true
75144
75144
  }
75145
75145
  );
@@ -75209,7 +75209,7 @@ var isUpdateAvailable = async () => {
75209
75209
  var C3_DEFAULTS = {
75210
75210
  projectName: new import_haikunator.default().haikunate({ tokenHex: true }),
75211
75211
  category: "hello-world",
75212
- type: "hello-world-with-assets",
75212
+ type: "hello-world",
75213
75213
  framework: "analog",
75214
75214
  experimental: false,
75215
75215
  autoUpdate: true,
@@ -75217,11 +75217,11 @@ var C3_DEFAULTS = {
75217
75217
  git: true,
75218
75218
  open: true,
75219
75219
  lang: "ts",
75220
- template: "cloudflare/workers-sdk/packages/create-cloudflare/templates/hello-world-with-assets"
75220
+ template: "cloudflare/workers-sdk/packages/create-cloudflare/templates/hello-world"
75221
75221
  };
75222
75222
  var WRANGLER_DEFAULTS = {
75223
75223
  ...C3_DEFAULTS,
75224
- type: "hello-world-with-assets",
75224
+ type: "hello-world",
75225
75225
  deploy: false
75226
75226
  };
75227
75227
 
@@ -75378,8 +75378,217 @@ var runFrameworkGenerator = async (ctx, args) => {
75378
75378
  await runCommand(cmd, { env: env3 });
75379
75379
  };
75380
75380
 
75381
- // templates-experimental/hono/c3.ts
75381
+ // src/helpers/codemod.ts
75382
+ var import_fs8 = require("fs");
75383
+ var import_path8 = __toESM(require("path"));
75384
+ var recast = __toESM(require_main3());
75385
+ var esprimaParser = __toESM(require_esprima3());
75386
+ var typescriptParser = __toESM(require_typescript2());
75387
+ var parseFile = (filePath) => {
75388
+ const lang = import_path8.default.extname(filePath).slice(1);
75389
+ const parser2 = lang === "js" ? esprimaParser : typescriptParser;
75390
+ try {
75391
+ const fileContents = readFile(import_path8.default.resolve(filePath));
75392
+ if (fileContents) {
75393
+ return recast.parse(fileContents, { parser: parser2 }).program;
75394
+ }
75395
+ } catch (error2) {
75396
+ throw new Error(`Error parsing file: ${filePath}`);
75397
+ }
75398
+ return null;
75399
+ };
75400
+ var transformFile = (filePath, methods) => {
75401
+ const ast = parseFile(filePath);
75402
+ if (ast) {
75403
+ recast.visit(ast, methods);
75404
+ writeFile2(filePath, recast.print(ast).code);
75405
+ }
75406
+ };
75407
+ var loadSnippets = (parentFolder) => {
75408
+ const snippetsPath = (0, import_path8.join)(parentFolder, "snippets");
75409
+ if (!(0, import_fs8.existsSync)(snippetsPath)) {
75410
+ return {};
75411
+ }
75412
+ if (!(0, import_fs8.lstatSync)(snippetsPath).isDirectory) {
75413
+ return {};
75414
+ }
75415
+ const files = (0, import_fs8.readdirSync)(snippetsPath);
75416
+ return files.filter((fileName) => (0, import_fs8.lstatSync)((0, import_path8.join)(snippetsPath, fileName)).isFile).filter((fileName) => [".js", ".ts"].includes((0, import_path8.extname)(fileName))).reduce((acc, snippetPath) => {
75417
+ const [file, ext] = snippetPath.split(".");
75418
+ const key = `${file}${ext === "js" ? "Js" : "Ts"}`;
75419
+ return {
75420
+ ...acc,
75421
+ [key]: parseFile((0, import_path8.join)(snippetsPath, snippetPath))?.body
75422
+ };
75423
+ }, {});
75424
+ };
75425
+ var loadTemplateSnippets = (ctx) => {
75426
+ return loadSnippets(getTemplatePath(ctx));
75427
+ };
75428
+ var mergeObjectProperties = (sourceObject, newProperties) => {
75429
+ newProperties.forEach((newProp) => {
75430
+ const newPropName = getPropertyName(newProp);
75431
+ if (!newPropName) {
75432
+ return false;
75433
+ }
75434
+ const indexOfExisting = sourceObject.properties.findIndex(
75435
+ (p2) => p2.type === "ObjectProperty" && getPropertyName(p2) === newPropName
75436
+ );
75437
+ const existing = sourceObject.properties[indexOfExisting];
75438
+ if (!existing) {
75439
+ sourceObject.properties.push(newProp);
75440
+ return;
75441
+ }
75442
+ if (existing.type === "ObjectProperty" && existing.value.type === "ObjectExpression" && newProp.value.type === "ObjectExpression") {
75443
+ mergeObjectProperties(
75444
+ existing.value,
75445
+ newProp.value.properties
75446
+ );
75447
+ return;
75448
+ }
75449
+ sourceObject.properties[indexOfExisting] = newProp;
75450
+ });
75451
+ };
75452
+ var getPropertyName = (newProp) => {
75453
+ return newProp.key.type === "Identifier" ? newProp.key.name : newProp.key.type === "StringLiteral" ? newProp.key.value : null;
75454
+ };
75455
+
75456
+ // templates-experimental/astro/c3.ts
75457
+ var recast2 = __toESM(require_main3());
75458
+ var { npx } = detectPackageManager();
75382
75459
  var generate = async (ctx) => {
75460
+ await runFrameworkGenerator(ctx, [ctx.project.name, "--no-install"]);
75461
+ logRaw("");
75462
+ };
75463
+ var configure = async () => {
75464
+ await runCommand([npx, "astro", "add", "cloudflare", "-y"], {
75465
+ silent: true,
75466
+ startText: "Installing adapter",
75467
+ doneText: `${brandColor("installed")} ${dim(
75468
+ `via \`${npx} astro add cloudflare\``
75469
+ )}`
75470
+ });
75471
+ updateAstroConfig();
75472
+ };
75473
+ var updateAstroConfig = () => {
75474
+ const filePath = "astro.config.mjs";
75475
+ updateStatus(`Updating configuration in ${blue(filePath)}`);
75476
+ transformFile(filePath, {
75477
+ visitCallExpression: function(n) {
75478
+ const callee = n.node.callee;
75479
+ if (callee.name !== "cloudflare") {
75480
+ return this.traverse(n);
75481
+ }
75482
+ const b3 = recast2.types.builders;
75483
+ n.node.arguments = [
75484
+ b3.objectExpression([
75485
+ b3.objectProperty(
75486
+ b3.identifier("platformProxy"),
75487
+ b3.objectExpression([
75488
+ b3.objectProperty(b3.identifier("enabled"), b3.booleanLiteral(true))
75489
+ ])
75490
+ )
75491
+ ])
75492
+ ];
75493
+ return false;
75494
+ }
75495
+ });
75496
+ };
75497
+ var config = {
75498
+ configVersion: 1,
75499
+ id: "astro",
75500
+ frameworkCli: "create-astro",
75501
+ platform: "workers",
75502
+ displayName: "Astro",
75503
+ copyFiles: {
75504
+ async selectVariant(ctx) {
75505
+ return usesTypescript(ctx) ? "ts" : "js";
75506
+ },
75507
+ variants: {
75508
+ js: {
75509
+ path: "./templates/js"
75510
+ },
75511
+ ts: {
75512
+ path: "./templates/ts"
75513
+ }
75514
+ }
75515
+ },
75516
+ devScript: "dev",
75517
+ deployScript: "deploy",
75518
+ previewScript: "preview",
75519
+ path: "templates-experimental/astro",
75520
+ generate,
75521
+ configure,
75522
+ transformPackageJson: async (pkgJson, ctx) => ({
75523
+ scripts: {
75524
+ deploy: `astro build && wrangler deploy`,
75525
+ preview: `astro build && wrangler dev`,
75526
+ ...usesTypescript(ctx) && { "cf-typegen": `wrangler types` }
75527
+ }
75528
+ })
75529
+ };
75530
+ var c3_default = config;
75531
+
75532
+ // templates-experimental/hello-world-assets-only/c3.ts
75533
+ var config2 = {
75534
+ configVersion: 1,
75535
+ id: "hello-world-assets-only",
75536
+ path: "templates-experimental/hello-world-assets-only",
75537
+ displayName: "Hello World - Assets-only",
75538
+ description: "Get started with a basic Worker that only serves static assets",
75539
+ platform: "workers",
75540
+ copyFiles: {
75541
+ path: "./templates"
75542
+ }
75543
+ };
75544
+ var c3_default2 = config2;
75545
+
75546
+ // templates-experimental/hello-world-durable-object-with-assets/c3.ts
75547
+ var config3 = {
75548
+ configVersion: 1,
75549
+ id: "hello-world-durable-object-with-assets",
75550
+ path: "templates-experimental/hello-world-durable-object-with-assets",
75551
+ displayName: "Hello World - Worker Using Durable Objects with Assets",
75552
+ description: "Get started with a basic stateful app to build projects like real-time chats, collaborative apps, and multiplayer games, which hosts assets",
75553
+ platform: "workers",
75554
+ copyFiles: {
75555
+ variants: {
75556
+ js: {
75557
+ path: "./js"
75558
+ },
75559
+ ts: {
75560
+ path: "./ts"
75561
+ }
75562
+ }
75563
+ }
75564
+ };
75565
+ var c3_default3 = config3;
75566
+
75567
+ // templates-experimental/hello-world-with-assets/c3.ts
75568
+ var c3_default4 = {
75569
+ configVersion: 1,
75570
+ id: "hello-world-with-assets",
75571
+ path: "templates-experimental/hello-world-with-assets",
75572
+ displayName: "Hello World - Worker with Assets",
75573
+ description: "Get started with a basic Worker that also serves static assets, in the language of your choice",
75574
+ platform: "workers",
75575
+ copyFiles: {
75576
+ variants: {
75577
+ js: {
75578
+ path: "./js"
75579
+ },
75580
+ ts: {
75581
+ path: "./ts"
75582
+ },
75583
+ python: {
75584
+ path: "./py"
75585
+ }
75586
+ }
75587
+ }
75588
+ };
75589
+
75590
+ // templates-experimental/hono/c3.ts
75591
+ var generate2 = async (ctx) => {
75383
75592
  const { name: pm4 } = detectPackageManager();
75384
75593
  await runFrameworkGenerator(ctx, [
75385
75594
  ctx.project.name,
@@ -75391,7 +75600,7 @@ var generate = async (ctx) => {
75391
75600
  ]);
75392
75601
  logRaw("");
75393
75602
  };
75394
- var config = {
75603
+ var config4 = {
75395
75604
  configVersion: 1,
75396
75605
  id: "hono",
75397
75606
  frameworkCli: "create-hono",
@@ -75401,7 +75610,7 @@ var config = {
75401
75610
  },
75402
75611
  platform: "workers",
75403
75612
  path: "templates-experimental/hono",
75404
- generate,
75613
+ generate: generate2,
75405
75614
  transformPackageJson: async () => ({
75406
75615
  scripts: {
75407
75616
  dev: "wrangler dev",
@@ -75413,13 +75622,13 @@ var config = {
75413
75622
  deployScript: "deploy",
75414
75623
  previewScript: "dev"
75415
75624
  };
75416
- var c3_default = config;
75625
+ var c3_default5 = config4;
75417
75626
 
75418
75627
  // templates-experimental/next/c3.ts
75419
- var generate2 = async (ctx) => {
75628
+ var generate3 = async (ctx) => {
75420
75629
  await runFrameworkGenerator(ctx, [ctx.project.name]);
75421
75630
  };
75422
- var configure = async (ctx) => {
75631
+ var configure2 = async (ctx) => {
75423
75632
  const packages = [
75424
75633
  "@opennextjs/cloudflare@0.5.x",
75425
75634
  "@cloudflare/workers-types"
@@ -75445,7 +75654,7 @@ var updateNextConfig = (usesTs) => {
75445
75654
  writeFile2(configFile, updatedConfigFile);
75446
75655
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
75447
75656
  };
75448
- var c3_default2 = {
75657
+ var c3_default6 = {
75449
75658
  configVersion: 1,
75450
75659
  id: "next",
75451
75660
  frameworkCli: "create-next-app",
@@ -75457,8 +75666,8 @@ var c3_default2 = {
75457
75666
  copyFiles: {
75458
75667
  path: "./templates"
75459
75668
  },
75460
- generate: generate2,
75461
- configure,
75669
+ generate: generate3,
75670
+ configure: configure2,
75462
75671
  transformPackageJson: async () => ({
75463
75672
  scripts: {
75464
75673
  deploy: `opennextjs-cloudflare && wrangler deploy`,
@@ -75472,89 +75681,14 @@ var c3_default2 = {
75472
75681
  compatibilityFlags: ["nodejs_compat"]
75473
75682
  };
75474
75683
 
75475
- // src/helpers/codemod.ts
75476
- var import_fs8 = require("fs");
75477
- var import_path8 = __toESM(require("path"));
75478
- var recast = __toESM(require_main3());
75479
- var esprimaParser = __toESM(require_esprima3());
75480
- var typescriptParser = __toESM(require_typescript2());
75481
- var parseFile = (filePath) => {
75482
- const lang = import_path8.default.extname(filePath).slice(1);
75483
- const parser2 = lang === "js" ? esprimaParser : typescriptParser;
75484
- try {
75485
- const fileContents = readFile(import_path8.default.resolve(filePath));
75486
- if (fileContents) {
75487
- return recast.parse(fileContents, { parser: parser2 }).program;
75488
- }
75489
- } catch (error2) {
75490
- throw new Error(`Error parsing file: ${filePath}`);
75491
- }
75492
- return null;
75493
- };
75494
- var transformFile = (filePath, methods) => {
75495
- const ast = parseFile(filePath);
75496
- if (ast) {
75497
- recast.visit(ast, methods);
75498
- writeFile2(filePath, recast.print(ast).code);
75499
- }
75500
- };
75501
- var loadSnippets = (parentFolder) => {
75502
- const snippetsPath = (0, import_path8.join)(parentFolder, "snippets");
75503
- if (!(0, import_fs8.existsSync)(snippetsPath)) {
75504
- return {};
75505
- }
75506
- if (!(0, import_fs8.lstatSync)(snippetsPath).isDirectory) {
75507
- return {};
75508
- }
75509
- const files = (0, import_fs8.readdirSync)(snippetsPath);
75510
- return files.filter((fileName) => (0, import_fs8.lstatSync)((0, import_path8.join)(snippetsPath, fileName)).isFile).filter((fileName) => [".js", ".ts"].includes((0, import_path8.extname)(fileName))).reduce((acc, snippetPath) => {
75511
- const [file, ext] = snippetPath.split(".");
75512
- const key = `${file}${ext === "js" ? "Js" : "Ts"}`;
75513
- return {
75514
- ...acc,
75515
- [key]: parseFile((0, import_path8.join)(snippetsPath, snippetPath))?.body
75516
- };
75517
- }, {});
75518
- };
75519
- var loadTemplateSnippets = (ctx) => {
75520
- return loadSnippets(getTemplatePath(ctx));
75521
- };
75522
- var mergeObjectProperties = (sourceObject, newProperties) => {
75523
- newProperties.forEach((newProp) => {
75524
- const newPropName = getPropertyName(newProp);
75525
- if (!newPropName) {
75526
- return false;
75527
- }
75528
- const indexOfExisting = sourceObject.properties.findIndex(
75529
- (p2) => p2.type === "ObjectProperty" && getPropertyName(p2) === newPropName
75530
- );
75531
- const existing = sourceObject.properties[indexOfExisting];
75532
- if (!existing) {
75533
- sourceObject.properties.push(newProp);
75534
- return;
75535
- }
75536
- if (existing.type === "ObjectProperty" && existing.value.type === "ObjectExpression" && newProp.value.type === "ObjectExpression") {
75537
- mergeObjectProperties(
75538
- existing.value,
75539
- newProp.value.properties
75540
- );
75541
- return;
75542
- }
75543
- sourceObject.properties[indexOfExisting] = newProp;
75544
- });
75545
- };
75546
- var getPropertyName = (newProp) => {
75547
- return newProp.key.type === "Identifier" ? newProp.key.name : newProp.key.type === "StringLiteral" ? newProp.key.value : null;
75548
- };
75549
-
75550
75684
  // templates-experimental/qwik/c3.ts
75551
- var recast2 = __toESM(require_main3());
75552
- var { npm, npx, name } = detectPackageManager();
75553
- var generate3 = async (ctx) => {
75685
+ var recast3 = __toESM(require_main3());
75686
+ var { npm, npx: npx2, name } = detectPackageManager();
75687
+ var generate4 = async (ctx) => {
75554
75688
  await runFrameworkGenerator(ctx, ["playground", ctx.project.name]);
75555
75689
  };
75556
- var configure2 = async (ctx) => {
75557
- const cmd = [name === "pnpm" ? npm : npx, "qwik", "add", "cloudflare-pages"];
75690
+ var configure3 = async (ctx) => {
75691
+ const cmd = [name === "pnpm" ? npm : npx2, "qwik", "add", "cloudflare-pages"];
75558
75692
  endSection(`Running ${quoteShellArgs(cmd)}`);
75559
75693
  await runCommand(cmd);
75560
75694
  removeFile("./public/_headers");
@@ -75570,7 +75704,7 @@ var addBindingsProxy = (ctx) => {
75570
75704
  const s = spinner();
75571
75705
  s.start("Updating `vite.config.ts`");
75572
75706
  const snippets = loadTemplateSnippets(ctx);
75573
- const b3 = recast2.types.builders;
75707
+ const b3 = recast3.types.builders;
75574
75708
  transformFile("vite.config.ts", {
75575
75709
  // Insert the env declaration after the last import (but before the rest of the body)
75576
75710
  visitProgram: function(n) {
@@ -75612,7 +75746,7 @@ var populateCloudflareEnv = () => {
75612
75746
  s.start(`Updating \`${entrypointPath}\``);
75613
75747
  transformFile(entrypointPath, {
75614
75748
  visitTSInterfaceDeclaration: function(n) {
75615
- const b3 = recast2.types.builders;
75749
+ const b3 = recast3.types.builders;
75616
75750
  const id = n.node.id;
75617
75751
  if (id.name !== "QwikCityPlatform") {
75618
75752
  this.traverse(n);
@@ -75633,7 +75767,7 @@ var populateCloudflareEnv = () => {
75633
75767
  });
75634
75768
  s.stop(`${brandColor("updated")} \`${entrypointPath}\``);
75635
75769
  };
75636
- var config2 = {
75770
+ var config5 = {
75637
75771
  configVersion: 1,
75638
75772
  id: "qwik",
75639
75773
  frameworkCli: "create-qwik",
@@ -75643,8 +75777,8 @@ var config2 = {
75643
75777
  path: "./templates"
75644
75778
  },
75645
75779
  path: "templates-experimental/qwik",
75646
- generate: generate3,
75647
- configure: configure2,
75780
+ generate: generate4,
75781
+ configure: configure3,
75648
75782
  transformPackageJson: async () => ({
75649
75783
  scripts: {
75650
75784
  deploy: `${npm} run build && wrangler deploy`,
@@ -75656,7 +75790,49 @@ var config2 = {
75656
75790
  deployScript: "deploy",
75657
75791
  previewScript: "preview"
75658
75792
  };
75659
- var c3_default3 = config2;
75793
+ var c3_default7 = config5;
75794
+
75795
+ // templates-experimental/remix/c3.ts
75796
+ var { npm: npm2 } = detectPackageManager();
75797
+ var generate5 = async (ctx) => {
75798
+ await runFrameworkGenerator(ctx, [
75799
+ ctx.project.name,
75800
+ "--template",
75801
+ "https://github.com/remix-run/remix/tree/main/templates/cloudflare-workers"
75802
+ ]);
75803
+ logRaw("");
75804
+ };
75805
+ var configure4 = async () => {
75806
+ await installPackages(["wrangler@latest"], {
75807
+ dev: true,
75808
+ startText: "Updating the Wrangler version",
75809
+ doneText: `${brandColor(`updated`)} ${dim("wrangler@latest")}`
75810
+ });
75811
+ };
75812
+ var config6 = {
75813
+ configVersion: 1,
75814
+ id: "remix",
75815
+ frameworkCli: "create-remix",
75816
+ platform: "workers",
75817
+ displayName: "Remix",
75818
+ copyFiles: {
75819
+ path: "./templates"
75820
+ },
75821
+ path: "templates-experimental/remix",
75822
+ generate: generate5,
75823
+ configure: configure4,
75824
+ transformPackageJson: async () => ({
75825
+ scripts: {
75826
+ deploy: `${npm2} run build && wrangler deploy`,
75827
+ preview: `${npm2} run build && wrangler dev`,
75828
+ "cf-typegen": `wrangler types`
75829
+ }
75830
+ }),
75831
+ devScript: "dev",
75832
+ deployScript: "deploy",
75833
+ previewScript: "preview"
75834
+ };
75835
+ var c3_default8 = config6;
75660
75836
 
75661
75837
  // src/helpers/compatDate.ts
75662
75838
  var import_fs9 = require("fs");
@@ -75711,18 +75887,18 @@ function getLatestTypesEntrypoint(ctx) {
75711
75887
  }
75712
75888
 
75713
75889
  // templates-experimental/solid/c3.ts
75714
- var recast3 = __toESM(require_main3());
75715
- var { npm: npm2 } = detectPackageManager();
75716
- var generate4 = async (ctx) => {
75890
+ var recast4 = __toESM(require_main3());
75891
+ var { npm: npm3 } = detectPackageManager();
75892
+ var generate6 = async (ctx) => {
75717
75893
  await runFrameworkGenerator(ctx, ["-p", ctx.project.name, "-s"]);
75718
75894
  logRaw("");
75719
75895
  };
75720
- var configure3 = async (ctx) => {
75896
+ var configure5 = async (ctx) => {
75721
75897
  const packages = ["nitropack"];
75722
75898
  await installPackages(packages, {
75723
75899
  dev: true,
75724
75900
  startText: "Installing nitro module `nitropack`",
75725
- doneText: `${brandColor("installed")} ${dim(`via \`${npm2} install\``)}`
75901
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm3} install\``)}`
75726
75902
  });
75727
75903
  usesTypescript(ctx);
75728
75904
  const filePath = `app.config.${usesTypescript(ctx) ? "ts" : "js"}`;
@@ -75734,7 +75910,7 @@ var configure3 = async (ctx) => {
75734
75910
  if (callee.name !== "defineConfig") {
75735
75911
  return this.traverse(n);
75736
75912
  }
75737
- const b3 = recast3.types.builders;
75913
+ const b3 = recast4.types.builders;
75738
75914
  mergeObjectProperties(
75739
75915
  n.node.arguments[0],
75740
75916
  [
@@ -75758,7 +75934,7 @@ var configure3 = async (ctx) => {
75758
75934
  }
75759
75935
  });
75760
75936
  };
75761
- var config3 = {
75937
+ var config7 = {
75762
75938
  configVersion: 1,
75763
75939
  id: "solid",
75764
75940
  frameworkCli: "create-solid",
@@ -75768,12 +75944,12 @@ var config3 = {
75768
75944
  path: "./templates"
75769
75945
  },
75770
75946
  path: "templates-experimental/solid",
75771
- generate: generate4,
75772
- configure: configure3,
75947
+ generate: generate6,
75948
+ configure: configure5,
75773
75949
  transformPackageJson: async () => ({
75774
75950
  scripts: {
75775
- preview: `${npm2} run build && npx wrangler dev`,
75776
- deploy: `${npm2} run build && wrangler deploy`
75951
+ preview: `${npm3} run build && npx wrangler dev`,
75952
+ deploy: `${npm3} run build && wrangler deploy`
75777
75953
  }
75778
75954
  }),
75779
75955
  compatibilityFlags: ["nodejs_compat"],
@@ -75781,17 +75957,17 @@ var config3 = {
75781
75957
  deployScript: "deploy",
75782
75958
  previewScript: "preview"
75783
75959
  };
75784
- var c3_default4 = config3;
75960
+ var c3_default9 = config7;
75785
75961
 
75786
75962
  // templates-experimental/svelte/c3.ts
75787
75963
  var import_node_os3 = require("node:os");
75788
- var recast4 = __toESM(require_main3());
75789
- var { npm: npm3 } = detectPackageManager();
75790
- var generate5 = async (ctx) => {
75964
+ var recast5 = __toESM(require_main3());
75965
+ var { npm: npm4 } = detectPackageManager();
75966
+ var generate7 = async (ctx) => {
75791
75967
  await runFrameworkGenerator(ctx, ["create", ctx.project.name]);
75792
75968
  logRaw("");
75793
75969
  };
75794
- var configure4 = async (ctx) => {
75970
+ var configure6 = async (ctx) => {
75795
75971
  const pkg = `@sveltejs/adapter-cloudflare`;
75796
75972
  await installPackages([pkg], {
75797
75973
  dev: true,
@@ -75818,7 +75994,7 @@ var updateTypeDefinitions = (ctx) => {
75818
75994
  return;
75819
75995
  }
75820
75996
  updateStatus(`Updating global type definitions in ${blue("app.d.ts")}`);
75821
- const b3 = recast4.types.builders;
75997
+ const b3 = recast5.types.builders;
75822
75998
  transformFile("src/app.d.ts", {
75823
75999
  visitTSModuleDeclaration(n) {
75824
76000
  if (n.value.id.name === "App" && n.node.body) {
@@ -75850,7 +76026,7 @@ var updateTypeDefinitions = (ctx) => {
75850
76026
  }
75851
76027
  });
75852
76028
  };
75853
- var config4 = {
76029
+ var config8 = {
75854
76030
  configVersion: 1,
75855
76031
  id: "svelte",
75856
76032
  frameworkCli: "sv",
@@ -75860,12 +76036,12 @@ var config4 = {
75860
76036
  path: "./templates"
75861
76037
  },
75862
76038
  path: "templates-experimental/svelte",
75863
- generate: generate5,
75864
- configure: configure4,
76039
+ generate: generate7,
76040
+ configure: configure6,
75865
76041
  transformPackageJson: async (original, ctx) => {
75866
76042
  let scripts = {
75867
- preview: `${npm3} run build && wrangler dev`,
75868
- deploy: `${npm3} run build && wrangler deploy`
76043
+ preview: `${npm4} run build && wrangler dev`,
76044
+ deploy: `${npm4} run build && wrangler deploy`
75869
76045
  };
75870
76046
  if (usesTypescript(ctx)) {
75871
76047
  const mv = (0, import_node_os3.platform)() === "win32" ? "move" : "mv";
@@ -75880,12 +76056,12 @@ var config4 = {
75880
76056
  deployScript: "deploy",
75881
76057
  previewScript: "preview"
75882
76058
  };
75883
- var c3_default5 = config4;
76059
+ var c3_default10 = config8;
75884
76060
 
75885
76061
  // templates/analog/c3.ts
75886
- var recast5 = __toESM(require_main3());
75887
- var { npm: npm4, name: pm } = detectPackageManager();
75888
- var generate6 = async (ctx) => {
76062
+ var recast6 = __toESM(require_main3());
76063
+ var { npm: npm5, name: pm } = detectPackageManager();
76064
+ var generate8 = async (ctx) => {
75889
76065
  await runFrameworkGenerator(ctx, [
75890
76066
  ctx.project.name,
75891
76067
  "--template",
@@ -75893,7 +76069,7 @@ var generate6 = async (ctx) => {
75893
76069
  ]);
75894
76070
  logRaw("");
75895
76071
  };
75896
- var configure5 = async (ctx) => {
76072
+ var configure7 = async (ctx) => {
75897
76073
  if (pm === "pnpm" || pm === "yarn" || pm === "bun") {
75898
76074
  const packages = [];
75899
76075
  packages.push("nitropack");
@@ -75903,7 +76079,7 @@ var configure5 = async (ctx) => {
75903
76079
  await installPackages(packages, {
75904
76080
  dev: true,
75905
76081
  startText: `Installing ${packages.join(", ")}`,
75906
- doneText: `${brandColor("installed")} ${dim(`via \`${npm4} install\``)}`
76082
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm5} install\``)}`
75907
76083
  });
75908
76084
  }
75909
76085
  updateViteConfig(ctx);
@@ -75924,7 +76100,7 @@ var updateEnvTypes = (ctx) => {
75924
76100
  s.stop(`${brandColor(`updated`)} ${dim(`\`${filepath}\``)}`);
75925
76101
  };
75926
76102
  var updateViteConfig = (ctx) => {
75927
- const b3 = recast5.types.builders;
76103
+ const b3 = recast6.types.builders;
75928
76104
  const s = spinner();
75929
76105
  const configFile = "vite.config.ts";
75930
76106
  s.start(`Updating \`${configFile}\``);
@@ -75961,7 +76137,7 @@ var updateViteConfig = (ctx) => {
75961
76137
  });
75962
76138
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
75963
76139
  };
75964
- var config5 = {
76140
+ var config9 = {
75965
76141
  configVersion: 1,
75966
76142
  id: "analog",
75967
76143
  frameworkCli: "create-analog",
@@ -75970,12 +76146,12 @@ var config5 = {
75970
76146
  copyFiles: {
75971
76147
  path: "./templates"
75972
76148
  },
75973
- generate: generate6,
75974
- configure: configure5,
76149
+ generate: generate8,
76150
+ configure: configure7,
75975
76151
  transformPackageJson: async () => ({
75976
76152
  scripts: {
75977
- preview: `${npm4} run build && wrangler pages dev`,
75978
- deploy: `${npm4} run build && wrangler pages deploy`,
76153
+ preview: `${npm5} run build && wrangler pages dev`,
76154
+ deploy: `${npm5} run build && wrangler pages deploy`,
75979
76155
  "cf-typegen": `wrangler types`
75980
76156
  }
75981
76157
  }),
@@ -75983,12 +76159,12 @@ var config5 = {
75983
76159
  deployScript: "deploy",
75984
76160
  previewScript: "preview"
75985
76161
  };
75986
- var c3_default6 = config5;
76162
+ var c3_default11 = config9;
75987
76163
 
75988
76164
  // templates/angular/pages/c3.ts
75989
76165
  var import_node_path3 = require("node:path");
75990
- var { npm: npm5 } = detectPackageManager();
75991
- var generate7 = async (ctx) => {
76166
+ var { npm: npm6 } = detectPackageManager();
76167
+ var generate9 = async (ctx) => {
75992
76168
  await runFrameworkGenerator(ctx, [
75993
76169
  ctx.project.name,
75994
76170
  "--ssr",
@@ -75996,7 +76172,7 @@ var generate7 = async (ctx) => {
75996
76172
  ]);
75997
76173
  logRaw("");
75998
76174
  };
75999
- var configure6 = async (ctx) => {
76175
+ var configure8 = async (ctx) => {
76000
76176
  updateAngularJson(ctx);
76001
76177
  await updateAppCode();
76002
76178
  await installCFWorker();
@@ -76005,7 +76181,7 @@ async function installCFWorker() {
76005
76181
  await installPackages(["xhr2"], {
76006
76182
  dev: true,
76007
76183
  startText: "Installing additional dependencies",
76008
- doneText: `${brandColor("installed")} ${dim(`via \`${npm5} install\``)}`
76184
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm6} install\``)}`
76009
76185
  });
76010
76186
  }
76011
76187
  async function updateAppCode() {
@@ -76047,7 +76223,7 @@ function updateAngularJson(ctx) {
76047
76223
  writeFile2((0, import_node_path3.resolve)("angular.json"), JSON.stringify(angularJson, null, 2));
76048
76224
  s.stop(`${brandColor(`updated`)} ${dim(`\`angular.json\``)}`);
76049
76225
  }
76050
- var config6 = {
76226
+ var config10 = {
76051
76227
  configVersion: 1,
76052
76228
  id: "angular",
76053
76229
  frameworkCli: "@angular/create",
@@ -76060,23 +76236,23 @@ var config6 = {
76060
76236
  devScript: "start",
76061
76237
  deployScript: "deploy",
76062
76238
  previewScript: "start",
76063
- generate: generate7,
76064
- configure: configure6,
76239
+ generate: generate9,
76240
+ configure: configure8,
76065
76241
  transformPackageJson: async () => ({
76066
76242
  scripts: {
76067
- start: `${npm5} run build && wrangler pages dev dist/cloudflare ${await compatDateFlag()}`,
76068
- build: `ng build && ${npm5} run process`,
76243
+ start: `${npm6} run build && wrangler pages dev dist/cloudflare ${await compatDateFlag()}`,
76244
+ build: `ng build && ${npm6} run process`,
76069
76245
  process: "node ./tools/copy-files.mjs",
76070
- deploy: `${npm5} run build && wrangler pages deploy dist/cloudflare`
76246
+ deploy: `${npm6} run build && wrangler pages deploy dist/cloudflare`
76071
76247
  }
76072
76248
  })
76073
76249
  };
76074
- var c3_default7 = config6;
76250
+ var c3_default12 = config10;
76075
76251
 
76076
76252
  // templates/angular/workers/c3.ts
76077
76253
  var import_node_path4 = require("node:path");
76078
- var { npm: npm6 } = detectPackageManager();
76079
- var generate8 = async (ctx) => {
76254
+ var { npm: npm7 } = detectPackageManager();
76255
+ var generate10 = async (ctx) => {
76080
76256
  await runFrameworkGenerator(ctx, [
76081
76257
  ctx.project.name,
76082
76258
  "--ssr",
@@ -76084,7 +76260,7 @@ var generate8 = async (ctx) => {
76084
76260
  ]);
76085
76261
  logRaw("");
76086
76262
  };
76087
- var configure7 = async (ctx) => {
76263
+ var configure9 = async (ctx) => {
76088
76264
  updateAngularJson2(ctx);
76089
76265
  await updateAppCode2();
76090
76266
  await installCFWorker2();
@@ -76093,7 +76269,7 @@ async function installCFWorker2() {
76093
76269
  await installPackages(["xhr2"], {
76094
76270
  dev: true,
76095
76271
  startText: "Installing additional dependencies",
76096
- doneText: `${brandColor("installed")} ${dim(`via \`${npm6} install\``)}`
76272
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm7} install\``)}`
76097
76273
  });
76098
76274
  }
76099
76275
  async function updateAppCode2() {
@@ -76134,7 +76310,7 @@ function updateAngularJson2(ctx) {
76134
76310
  writeFile2((0, import_node_path4.resolve)("angular.json"), JSON.stringify(angularJson, null, 2));
76135
76311
  s.stop(`${brandColor(`updated`)} ${dim(`\`angular.json\``)}`);
76136
76312
  }
76137
- var config7 = {
76313
+ var config11 = {
76138
76314
  configVersion: 1,
76139
76315
  id: "angular",
76140
76316
  frameworkCli: "@angular/create",
@@ -76147,43 +76323,43 @@ var config7 = {
76147
76323
  devScript: "start",
76148
76324
  deployScript: "deploy",
76149
76325
  previewScript: "start",
76150
- generate: generate8,
76151
- configure: configure7,
76326
+ generate: generate10,
76327
+ configure: configure9,
76152
76328
  transformPackageJson: async () => ({
76153
76329
  scripts: {
76154
- start: `${npm6} run build && wrangler dev`,
76330
+ start: `${npm7} run build && wrangler dev`,
76155
76331
  build: `ng build`,
76156
- deploy: `${npm6} run build && wrangler deploy`
76332
+ deploy: `${npm7} run build && wrangler deploy`
76157
76333
  }
76158
76334
  })
76159
76335
  };
76160
- var c3_default8 = config7;
76336
+ var c3_default13 = config11;
76161
76337
 
76162
76338
  // templates/angular/c3.ts
76163
- var config8 = {
76339
+ var config12 = {
76164
76340
  displayName: "Angular",
76165
- platformVariants: { pages: c3_default7, workers: c3_default8 }
76341
+ platformVariants: { pages: c3_default12, workers: c3_default13 }
76166
76342
  };
76167
- var c3_default9 = config8;
76343
+ var c3_default14 = config12;
76168
76344
 
76169
- // templates/astro/pages/c3.ts
76170
- var recast6 = __toESM(require_main3());
76171
- var { npx: npx2 } = detectPackageManager();
76172
- var generate9 = async (ctx) => {
76345
+ // templates/astro/c3.ts
76346
+ var recast7 = __toESM(require_main3());
76347
+ var { npx: npx3 } = detectPackageManager();
76348
+ var generate11 = async (ctx) => {
76173
76349
  await runFrameworkGenerator(ctx, [ctx.project.name, "--no-install"]);
76174
76350
  logRaw("");
76175
76351
  };
76176
- var configure8 = async () => {
76177
- await runCommand([npx2, "astro", "add", "cloudflare", "-y"], {
76352
+ var configure10 = async () => {
76353
+ await runCommand([npx3, "astro", "add", "cloudflare", "-y"], {
76178
76354
  silent: true,
76179
76355
  startText: "Installing adapter",
76180
76356
  doneText: `${brandColor("installed")} ${dim(
76181
- `via \`${npx2} astro add cloudflare\``
76357
+ `via \`${npx3} astro add cloudflare\``
76182
76358
  )}`
76183
76359
  });
76184
- updateAstroConfig();
76360
+ updateAstroConfig2();
76185
76361
  };
76186
- var updateAstroConfig = () => {
76362
+ var updateAstroConfig2 = () => {
76187
76363
  const filePath = "astro.config.mjs";
76188
76364
  updateStatus(`Updating configuration in ${blue(filePath)}`);
76189
76365
  transformFile(filePath, {
@@ -76192,7 +76368,7 @@ var updateAstroConfig = () => {
76192
76368
  if (callee.name !== "cloudflare") {
76193
76369
  return this.traverse(n);
76194
76370
  }
76195
- const b3 = recast6.types.builders;
76371
+ const b3 = recast7.types.builders;
76196
76372
  n.node.arguments = [
76197
76373
  b3.objectExpression([
76198
76374
  b3.objectProperty(
@@ -76207,13 +76383,12 @@ var updateAstroConfig = () => {
76207
76383
  }
76208
76384
  });
76209
76385
  };
76210
- var config9 = {
76386
+ var config13 = {
76211
76387
  configVersion: 1,
76212
76388
  id: "astro",
76213
76389
  frameworkCli: "create-astro",
76214
76390
  platform: "pages",
76215
76391
  displayName: "Astro",
76216
- path: "templates/astro/pages",
76217
76392
  copyFiles: {
76218
76393
  async selectVariant(ctx) {
76219
76394
  return usesTypescript(ctx) ? "ts" : "js";
@@ -76230,8 +76405,8 @@ var config9 = {
76230
76405
  devScript: "dev",
76231
76406
  deployScript: "deploy",
76232
76407
  previewScript: "preview",
76233
- generate: generate9,
76234
- configure: configure8,
76408
+ generate: generate11,
76409
+ configure: configure10,
76235
76410
  transformPackageJson: async (pkgJson, ctx) => ({
76236
76411
  scripts: {
76237
76412
  deploy: `astro build && wrangler pages deploy`,
@@ -76240,93 +76415,10 @@ var config9 = {
76240
76415
  }
76241
76416
  })
76242
76417
  };
76243
- var c3_default10 = config9;
76244
-
76245
- // templates/astro/workers/c3.ts
76246
- var recast7 = __toESM(require_main3());
76247
- var { npx: npx3 } = detectPackageManager();
76248
- var generate10 = async (ctx) => {
76249
- await runFrameworkGenerator(ctx, [ctx.project.name, "--no-install"]);
76250
- logRaw("");
76251
- };
76252
- var configure9 = async () => {
76253
- await runCommand([npx3, "astro", "add", "cloudflare", "-y"], {
76254
- silent: true,
76255
- startText: "Installing adapter",
76256
- doneText: `${brandColor("installed")} ${dim(
76257
- `via \`${npx3} astro add cloudflare\``
76258
- )}`
76259
- });
76260
- updateAstroConfig2();
76261
- };
76262
- var updateAstroConfig2 = () => {
76263
- const filePath = "astro.config.mjs";
76264
- updateStatus(`Updating configuration in ${blue(filePath)}`);
76265
- transformFile(filePath, {
76266
- visitCallExpression: function(n) {
76267
- const callee = n.node.callee;
76268
- if (callee.name !== "cloudflare") {
76269
- return this.traverse(n);
76270
- }
76271
- const b3 = recast7.types.builders;
76272
- n.node.arguments = [
76273
- b3.objectExpression([
76274
- b3.objectProperty(
76275
- b3.identifier("platformProxy"),
76276
- b3.objectExpression([
76277
- b3.objectProperty(b3.identifier("enabled"), b3.booleanLiteral(true))
76278
- ])
76279
- )
76280
- ])
76281
- ];
76282
- return false;
76283
- }
76284
- });
76285
- };
76286
- var config10 = {
76287
- configVersion: 1,
76288
- id: "astro",
76289
- frameworkCli: "create-astro",
76290
- platform: "workers",
76291
- displayName: "Astro",
76292
- copyFiles: {
76293
- async selectVariant(ctx) {
76294
- return usesTypescript(ctx) ? "ts" : "js";
76295
- },
76296
- variants: {
76297
- js: {
76298
- path: "./templates/js"
76299
- },
76300
- ts: {
76301
- path: "./templates/ts"
76302
- }
76303
- }
76304
- },
76305
- devScript: "dev",
76306
- deployScript: "deploy",
76307
- previewScript: "preview",
76308
- path: "templates/astro/workers",
76309
- generate: generate10,
76310
- configure: configure9,
76311
- transformPackageJson: async (pkgJson, ctx) => ({
76312
- scripts: {
76313
- deploy: `astro build && wrangler deploy`,
76314
- preview: `astro build && wrangler dev`,
76315
- ...usesTypescript(ctx) && { "cf-typegen": `wrangler types` }
76316
- }
76317
- })
76318
- };
76319
- var c3_default11 = config10;
76320
-
76321
- // templates/astro/c3.ts
76322
- var config11 = {
76323
- displayName: "Astro",
76324
- platformVariants: { pages: c3_default10, workers: c3_default11 }
76325
- };
76326
- var c3_default12 = config11;
76418
+ var c3_default15 = config13;
76327
76419
 
76328
76420
  // templates/common/c3.ts
76329
- var c3_default13 = {
76421
+ var c3_default16 = {
76330
76422
  configVersion: 1,
76331
76423
  id: "common",
76332
76424
  displayName: "Example router & proxy Worker",
@@ -76346,36 +76438,36 @@ var c3_default13 = {
76346
76438
  };
76347
76439
 
76348
76440
  // templates/docusaurus/pages/c3.ts
76349
- var { npm: npm7 } = detectPackageManager();
76350
- var generate11 = async (ctx) => {
76441
+ var { npm: npm8 } = detectPackageManager();
76442
+ var generate12 = async (ctx) => {
76351
76443
  await runFrameworkGenerator(ctx, [ctx.project.name, "classic"]);
76352
76444
  };
76353
- var config12 = {
76445
+ var config14 = {
76354
76446
  configVersion: 1,
76355
76447
  id: "docusaurus",
76356
76448
  frameworkCli: "create-docusaurus",
76357
76449
  platform: "pages",
76358
76450
  displayName: "Docusaurus",
76359
76451
  path: "templates/docusaurus/pages",
76360
- generate: generate11,
76452
+ generate: generate12,
76361
76453
  transformPackageJson: async () => ({
76362
76454
  scripts: {
76363
- preview: `${npm7} run build && wrangler pages dev ./build`,
76364
- deploy: `${npm7} run build && wrangler pages deploy ./build`
76455
+ preview: `${npm8} run build && wrangler pages dev ./build`,
76456
+ deploy: `${npm8} run build && wrangler pages deploy ./build`
76365
76457
  }
76366
76458
  }),
76367
76459
  devScript: "preview",
76368
76460
  deployScript: "deploy",
76369
76461
  previewScript: "preview"
76370
76462
  };
76371
- var c3_default14 = config12;
76463
+ var c3_default17 = config14;
76372
76464
 
76373
76465
  // templates/docusaurus/workers/c3.ts
76374
- var { npm: npm8 } = detectPackageManager();
76375
- var generate12 = async (ctx) => {
76466
+ var { npm: npm9 } = detectPackageManager();
76467
+ var generate13 = async (ctx) => {
76376
76468
  await runFrameworkGenerator(ctx, [ctx.project.name, "classic"]);
76377
76469
  };
76378
- var config13 = {
76470
+ var config15 = {
76379
76471
  configVersion: 1,
76380
76472
  id: "docusaurus",
76381
76473
  frameworkCli: "create-docusaurus",
@@ -76385,29 +76477,29 @@ var config13 = {
76385
76477
  path: "./templates"
76386
76478
  },
76387
76479
  path: "templates/docusaurus/workers",
76388
- generate: generate12,
76480
+ generate: generate13,
76389
76481
  transformPackageJson: async () => ({
76390
76482
  scripts: {
76391
- deploy: `${npm8} run build && wrangler deploy`,
76392
- preview: `${npm8} run build && wrangler dev`
76483
+ deploy: `${npm9} run build && wrangler deploy`,
76484
+ preview: `${npm9} run build && wrangler dev`
76393
76485
  }
76394
76486
  }),
76395
76487
  devScript: "start",
76396
76488
  deployScript: "deploy",
76397
76489
  previewScript: "preview"
76398
76490
  };
76399
- var c3_default15 = config13;
76491
+ var c3_default18 = config15;
76400
76492
 
76401
76493
  // templates/docusaurus/c3.ts
76402
- var config14 = {
76494
+ var config16 = {
76403
76495
  displayName: "Docusaurus",
76404
- platformVariants: { pages: c3_default14, workers: c3_default15 }
76496
+ platformVariants: { pages: c3_default17, workers: c3_default18 }
76405
76497
  };
76406
- var c3_default16 = config14;
76498
+ var c3_default19 = config16;
76407
76499
 
76408
76500
  // templates/gatsby/pages/c3.ts
76409
- var { npm: npm9 } = detectPackageManager();
76410
- var generate13 = async (ctx) => {
76501
+ var { npm: npm10 } = detectPackageManager();
76502
+ var generate14 = async (ctx) => {
76411
76503
  const defaultTemplate = "https://github.com/gatsbyjs/gatsby-starter-blog";
76412
76504
  const useTemplate = await inputPrompt({
76413
76505
  type: "confirm",
@@ -76426,29 +76518,29 @@ var generate13 = async (ctx) => {
76426
76518
  }
76427
76519
  await runFrameworkGenerator(ctx, ["new", ctx.project.name, templateUrl]);
76428
76520
  };
76429
- var config15 = {
76521
+ var config17 = {
76430
76522
  configVersion: 1,
76431
76523
  id: "gatsby",
76432
76524
  frameworkCli: "gatsby",
76433
76525
  platform: "pages",
76434
76526
  displayName: "Gatsby",
76435
76527
  path: "templates/gatsby/pages",
76436
- generate: generate13,
76528
+ generate: generate14,
76437
76529
  transformPackageJson: async () => ({
76438
76530
  scripts: {
76439
- deploy: `${npm9} run build && wrangler pages deploy ./public`,
76440
- preview: `${npm9} run build && wrangler pages dev ./public`
76531
+ deploy: `${npm10} run build && wrangler pages deploy ./public`,
76532
+ preview: `${npm10} run build && wrangler pages dev ./public`
76441
76533
  }
76442
76534
  }),
76443
76535
  devScript: "develop",
76444
76536
  deployScript: "deploy",
76445
76537
  previewScript: "preview"
76446
76538
  };
76447
- var c3_default17 = config15;
76539
+ var c3_default20 = config17;
76448
76540
 
76449
76541
  // templates/gatsby/workers/c3.ts
76450
- var { npm: npm10 } = detectPackageManager();
76451
- var generate14 = async (ctx) => {
76542
+ var { npm: npm11 } = detectPackageManager();
76543
+ var generate15 = async (ctx) => {
76452
76544
  const defaultTemplate = "https://github.com/gatsbyjs/gatsby-starter-blog";
76453
76545
  const useTemplate = await inputPrompt({
76454
76546
  type: "confirm",
@@ -76467,7 +76559,7 @@ var generate14 = async (ctx) => {
76467
76559
  }
76468
76560
  await runFrameworkGenerator(ctx, ["new", ctx.project.name, templateUrl]);
76469
76561
  };
76470
- var config16 = {
76562
+ var config18 = {
76471
76563
  configVersion: 1,
76472
76564
  id: "gatsby",
76473
76565
  frameworkCli: "gatsby",
@@ -76477,67 +76569,32 @@ var config16 = {
76477
76569
  path: "./templates"
76478
76570
  },
76479
76571
  path: "templates/gatsby/workers",
76480
- generate: generate14,
76572
+ generate: generate15,
76481
76573
  transformPackageJson: async () => ({
76482
76574
  scripts: {
76483
- deploy: `${npm10} run build && wrangler deploy`,
76484
- preview: `${npm10} run build && wrangler dev`
76575
+ deploy: `${npm11} run build && wrangler deploy`,
76576
+ preview: `${npm11} run build && wrangler dev`
76485
76577
  }
76486
76578
  }),
76487
76579
  devScript: "develop",
76488
76580
  deployScript: "deploy",
76489
76581
  previewScript: "preview"
76490
76582
  };
76491
- var c3_default18 = config16;
76583
+ var c3_default21 = config18;
76492
76584
 
76493
76585
  // templates/gatsby/c3.ts
76494
- var config17 = {
76495
- displayName: "Gatsby",
76496
- platformVariants: { pages: c3_default17, workers: c3_default18 }
76497
- };
76498
- var c3_default19 = config17;
76499
-
76500
- // templates/hello-world-assets-only/c3.ts
76501
- var config18 = {
76502
- configVersion: 1,
76503
- id: "hello-world-assets-only",
76504
- path: "templates/hello-world-assets-only",
76505
- displayName: "Assets only",
76506
- description: "For static sites (including SPAs) or when using your own backend",
76507
- platform: "workers",
76508
- copyFiles: {
76509
- path: "./templates"
76510
- }
76511
- };
76512
- var c3_default20 = config18;
76513
-
76514
- // templates/hello-world-durable-object-with-assets/c3.ts
76515
76586
  var config19 = {
76516
- configVersion: 1,
76517
- id: "hello-world-durable-object-with-assets",
76518
- path: "templates/hello-world-durable-object-with-assets",
76519
- displayName: "Worker + Durable Objects + Assets",
76520
- description: "For full-stack applications requiring static assets, an API, and real-time coordination",
76521
- platform: "workers",
76522
- copyFiles: {
76523
- variants: {
76524
- js: {
76525
- path: "./js"
76526
- },
76527
- ts: {
76528
- path: "./ts"
76529
- }
76530
- }
76531
- }
76587
+ displayName: "Gatsby",
76588
+ platformVariants: { pages: c3_default20, workers: c3_default21 }
76532
76589
  };
76533
- var c3_default21 = config19;
76590
+ var c3_default22 = config19;
76534
76591
 
76535
76592
  // templates/hello-world-durable-object/c3.ts
76536
- var c3_default22 = {
76593
+ var c3_default23 = {
76537
76594
  configVersion: 1,
76538
76595
  id: "hello-world-durable-object",
76539
- displayName: "Worker + Durable Objects",
76540
- description: "For multiplayer apps using WebSockets, or when you need synchronization",
76596
+ displayName: "Hello World Worker Using Durable Objects",
76597
+ description: "Get started with a basic stateful app to build projects like real-time chats, collaborative apps, and multiplayer games",
76541
76598
  platform: "workers",
76542
76599
  copyFiles: {
76543
76600
  variants: {
@@ -76551,37 +76608,14 @@ var c3_default22 = {
76551
76608
  }
76552
76609
  };
76553
76610
 
76554
- // templates/hello-world-with-assets/c3.ts
76555
- var c3_default23 = {
76556
- configVersion: 1,
76557
- id: "hello-world-with-assets",
76558
- path: "templates/hello-world-with-assets",
76559
- displayName: "Worker + Assets",
76560
- description: "For static sites with an API or server-side rendering (SSR)",
76561
- platform: "workers",
76562
- copyFiles: {
76563
- variants: {
76564
- js: {
76565
- path: "./js"
76566
- },
76567
- ts: {
76568
- path: "./ts"
76569
- },
76570
- python: {
76571
- path: "./py"
76572
- }
76573
- }
76574
- }
76575
- };
76576
-
76577
76611
  // templates/hello-world/c3.ts
76578
76612
  var import_promises2 = require("node:fs/promises");
76579
76613
  var import_node_path5 = require("node:path");
76580
76614
  var c3_default24 = {
76581
76615
  configVersion: 1,
76582
76616
  id: "hello-world",
76583
- displayName: "Worker only",
76584
- description: "For processing requests, transforming responses, or API endpoints",
76617
+ displayName: "Hello World Worker",
76618
+ description: "Get started with a basic Worker in the language of your choice",
76585
76619
  platform: "workers",
76586
76620
  async configure(ctx) {
76587
76621
  if (ctx.args.lang === "python") {
@@ -76611,7 +76645,7 @@ var c3_default24 = {
76611
76645
  };
76612
76646
 
76613
76647
  // templates/hono/c3.ts
76614
- var generate15 = async (ctx) => {
76648
+ var generate16 = async (ctx) => {
76615
76649
  const { name: pm4 } = detectPackageManager();
76616
76650
  await runFrameworkGenerator(ctx, [
76617
76651
  ctx.project.name,
@@ -76623,7 +76657,7 @@ var generate15 = async (ctx) => {
76623
76657
  ]);
76624
76658
  logRaw("");
76625
76659
  };
76626
- var configure10 = async (ctx) => {
76660
+ var configure11 = async (ctx) => {
76627
76661
  const indexFile = "src/index.ts";
76628
76662
  const s = spinner();
76629
76663
  s.start(`Updating \`${indexFile}\``);
@@ -76647,8 +76681,8 @@ var config20 = {
76647
76681
  path: "./templates"
76648
76682
  },
76649
76683
  platform: "workers",
76650
- generate: generate15,
76651
- configure: configure10,
76684
+ generate: generate16,
76685
+ configure: configure11,
76652
76686
  transformPackageJson: async () => ({
76653
76687
  scripts: {
76654
76688
  dev: "wrangler dev",
@@ -76664,8 +76698,8 @@ var c3_default25 = config20;
76664
76698
 
76665
76699
  // templates/next/c3.ts
76666
76700
  var import_path10 = require("path");
76667
- var { npm: npm11, npx: npx4 } = detectPackageManager();
76668
- var generate16 = async (ctx) => {
76701
+ var { npm: npm12, npx: npx4 } = detectPackageManager();
76702
+ var generate17 = async (ctx) => {
76669
76703
  const projectName = ctx.project.name;
76670
76704
  await runFrameworkGenerator(ctx, [projectName]);
76671
76705
  const wranglerConfig = readFile((0, import_path10.join)(getTemplatePath(ctx), "wrangler.jsonc"));
@@ -76690,7 +76724,7 @@ var updateNextConfig2 = (usesTs) => {
76690
76724
  writeFile2(configFile, updatedConfigFile);
76691
76725
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
76692
76726
  };
76693
- var configure11 = async (ctx) => {
76727
+ var configure12 = async (ctx) => {
76694
76728
  const projectPath = ctx.project.path;
76695
76729
  const path6 = probePaths([
76696
76730
  `${projectPath}/pages/api`,
@@ -76771,8 +76805,8 @@ var c3_default26 = {
76771
76805
  frameworkCli: "create-next-app",
76772
76806
  platform: "pages",
76773
76807
  displayName: "Next.js",
76774
- generate: generate16,
76775
- configure: configure11,
76808
+ generate: generate17,
76809
+ configure: configure12,
76776
76810
  copyFiles: {
76777
76811
  async selectVariant(ctx) {
76778
76812
  const isApp = probePaths([
@@ -76803,12 +76837,12 @@ var c3_default26 = {
76803
76837
  }
76804
76838
  },
76805
76839
  transformPackageJson: async (_3, ctx) => {
76806
- const isNpm = npm11 === "npm";
76807
- const isBun = npm11 === "bun";
76840
+ const isNpm = npm12 === "npm";
76841
+ const isBun = npm12 === "bun";
76808
76842
  const isNpmOrBun = isNpm || isBun;
76809
76843
  const nextOnPagesScope = isNpmOrBun ? "@cloudflare/" : "";
76810
76844
  const nextOnPagesCommand = `${nextOnPagesScope}next-on-pages`;
76811
- const pmCommand = isNpmOrBun ? npx4 : npm11;
76845
+ const pmCommand = isNpmOrBun ? npx4 : npm12;
76812
76846
  const pagesBuildRunCommand = `${isNpm ? "npm run" : isBun ? "bun" : pmCommand} pages:build`;
76813
76847
  return {
76814
76848
  scripts: {
@@ -76829,20 +76863,20 @@ var c3_default26 = {
76829
76863
 
76830
76864
  // templates/nuxt/pages/c3.ts
76831
76865
  var recast8 = __toESM(require_main3());
76832
- var { npm: npm12, name: pm2 } = detectPackageManager();
76833
- var generate17 = async (ctx) => {
76866
+ var { npm: npm13, name: pm2 } = detectPackageManager();
76867
+ var generate18 = async (ctx) => {
76834
76868
  const gitFlag = ctx.args.git ? `--gitInit` : `--no-gitInit`;
76835
76869
  await runFrameworkGenerator(ctx, [
76836
76870
  "init",
76837
76871
  ctx.project.name,
76838
76872
  "--packageManager",
76839
- npm12,
76873
+ npm13,
76840
76874
  gitFlag
76841
76875
  ]);
76842
76876
  writeFile2("./.node-version", "18");
76843
76877
  logRaw("");
76844
76878
  };
76845
- var configure12 = async (ctx) => {
76879
+ var configure13 = async (ctx) => {
76846
76880
  const packages = ["nitro-cloudflare-dev"];
76847
76881
  if (pm2 === "pnpm") {
76848
76882
  packages.push("h3");
@@ -76850,7 +76884,7 @@ var configure12 = async (ctx) => {
76850
76884
  await installPackages(packages, {
76851
76885
  dev: true,
76852
76886
  startText: "Installing nitro module `nitro-cloudflare-dev`",
76853
- doneText: `${brandColor("installed")} ${dim(`via \`${npm12} install\``)}`
76887
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm13} install\``)}`
76854
76888
  });
76855
76889
  updateNuxtConfig();
76856
76890
  updateEnvTypes2(ctx);
@@ -76921,12 +76955,12 @@ var config21 = {
76921
76955
  path: "./templates"
76922
76956
  },
76923
76957
  path: "templates/nuxt/pages",
76924
- generate: generate17,
76925
- configure: configure12,
76958
+ generate: generate18,
76959
+ configure: configure13,
76926
76960
  transformPackageJson: async () => ({
76927
76961
  scripts: {
76928
- deploy: `${npm12} run build && wrangler pages deploy`,
76929
- preview: `${npm12} run build && wrangler pages dev`,
76962
+ deploy: `${npm13} run build && wrangler pages deploy`,
76963
+ preview: `${npm13} run build && wrangler pages dev`,
76930
76964
  "cf-typegen": `wrangler types`
76931
76965
  }
76932
76966
  }),
@@ -76938,20 +76972,20 @@ var c3_default27 = config21;
76938
76972
 
76939
76973
  // templates/nuxt/workers/c3.ts
76940
76974
  var recast9 = __toESM(require_main3());
76941
- var { npm: npm13, name: pm3 } = detectPackageManager();
76942
- var generate18 = async (ctx) => {
76975
+ var { npm: npm14, name: pm3 } = detectPackageManager();
76976
+ var generate19 = async (ctx) => {
76943
76977
  const gitFlag = ctx.args.git ? `--gitInit` : `--no-gitInit`;
76944
76978
  await runFrameworkGenerator(ctx, [
76945
76979
  "init",
76946
76980
  ctx.project.name,
76947
76981
  "--packageManager",
76948
- npm13,
76982
+ npm14,
76949
76983
  gitFlag
76950
76984
  ]);
76951
76985
  writeFile2("./.node-version", "18");
76952
76986
  logRaw("");
76953
76987
  };
76954
- var configure13 = async (ctx) => {
76988
+ var configure14 = async (ctx) => {
76955
76989
  const packages = ["nitro-cloudflare-dev", "nitropack"];
76956
76990
  if (pm3 === "pnpm") {
76957
76991
  packages.push("h3");
@@ -76959,7 +76993,7 @@ var configure13 = async (ctx) => {
76959
76993
  await installPackages(packages, {
76960
76994
  dev: true,
76961
76995
  startText: "Installing nitro module `nitro-cloudflare-dev`",
76962
- doneText: `${brandColor("installed")} ${dim(`via \`${npm13} install\``)}`
76996
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm14} install\``)}`
76963
76997
  });
76964
76998
  updateNuxtConfig2();
76965
76999
  updateEnvTypes3(ctx);
@@ -77030,12 +77064,12 @@ var config22 = {
77030
77064
  path: "./templates"
77031
77065
  },
77032
77066
  path: "templates/nuxt/workers",
77033
- generate: generate18,
77034
- configure: configure13,
77067
+ generate: generate19,
77068
+ configure: configure14,
77035
77069
  transformPackageJson: async () => ({
77036
77070
  scripts: {
77037
- deploy: `${npm13} run build && wrangler deploy`,
77038
- preview: `${npm13} run build && wrangler dev`,
77071
+ deploy: `${npm14} run build && wrangler deploy`,
77072
+ preview: `${npm14} run build && wrangler dev`,
77039
77073
  "cf-typegen": `wrangler types`
77040
77074
  }
77041
77075
  }),
@@ -77270,12 +77304,12 @@ var c3_default32 = {
77270
77304
 
77271
77305
  // templates/qwik/c3.ts
77272
77306
  var recast10 = __toESM(require_main3());
77273
- var { npm: npm14, npx: npx5, name: name2 } = detectPackageManager();
77274
- var generate19 = async (ctx) => {
77307
+ var { npm: npm15, npx: npx5, name: name2 } = detectPackageManager();
77308
+ var generate20 = async (ctx) => {
77275
77309
  await runFrameworkGenerator(ctx, ["playground", ctx.project.name]);
77276
77310
  };
77277
- var configure14 = async (ctx) => {
77278
- const cmd = [name2 === "pnpm" ? npm14 : npx5, "qwik", "add", "cloudflare-pages"];
77311
+ var configure15 = async (ctx) => {
77312
+ const cmd = [name2 === "pnpm" ? npm15 : npx5, "qwik", "add", "cloudflare-pages"];
77279
77313
  endSection(`Running ${quoteShellArgs(cmd)}`);
77280
77314
  await runCommand(cmd);
77281
77315
  addBindingsProxy2(ctx);
@@ -77360,12 +77394,12 @@ var config24 = {
77360
77394
  copyFiles: {
77361
77395
  path: "./templates"
77362
77396
  },
77363
- generate: generate19,
77364
- configure: configure14,
77397
+ generate: generate20,
77398
+ configure: configure15,
77365
77399
  transformPackageJson: async () => ({
77366
77400
  scripts: {
77367
- deploy: `${npm14} run build && wrangler pages deploy`,
77368
- preview: `${npm14} run build && wrangler pages dev`,
77401
+ deploy: `${npm15} run build && wrangler pages deploy`,
77402
+ preview: `${npm15} run build && wrangler pages dev`,
77369
77403
  "cf-typegen": `wrangler types`
77370
77404
  }
77371
77405
  }),
@@ -77376,8 +77410,8 @@ var config24 = {
77376
77410
  var c3_default33 = config24;
77377
77411
 
77378
77412
  // templates/react/pages/c3.ts
77379
- var { npm: npm15 } = detectPackageManager();
77380
- var generate20 = async (ctx) => {
77413
+ var { npm: npm16 } = detectPackageManager();
77414
+ var generate21 = async (ctx) => {
77381
77415
  const variant = await inputPrompt({
77382
77416
  type: "select",
77383
77417
  question: "Select a variant:",
@@ -77414,11 +77448,11 @@ var config25 = {
77414
77448
  displayName: "React",
77415
77449
  platform: "pages",
77416
77450
  path: "templates/react/pages",
77417
- generate: generate20,
77451
+ generate: generate21,
77418
77452
  transformPackageJson: async () => ({
77419
77453
  scripts: {
77420
- deploy: `${npm15} run build && wrangler pages deploy ./dist`,
77421
- preview: `${npm15} run build && wrangler pages dev ./dist`
77454
+ deploy: `${npm16} run build && wrangler pages deploy ./dist`,
77455
+ preview: `${npm16} run build && wrangler pages dev ./dist`
77422
77456
  }
77423
77457
  }),
77424
77458
  devScript: "dev",
@@ -77432,8 +77466,8 @@ var import_assert2 = __toESM(require("assert"));
77432
77466
  var recast11 = __toESM(require_main3());
77433
77467
  var b2 = recast11.types.builders;
77434
77468
  var t = recast11.types.namedTypes;
77435
- var { npm: npm16 } = detectPackageManager();
77436
- var generate21 = async (ctx) => {
77469
+ var { npm: npm17 } = detectPackageManager();
77470
+ var generate22 = async (ctx) => {
77437
77471
  const variant = await getVariant();
77438
77472
  ctx.args.lang = variant.lang;
77439
77473
  await runFrameworkGenerator(ctx, [
@@ -77443,7 +77477,7 @@ var generate21 = async (ctx) => {
77443
77477
  ]);
77444
77478
  logRaw("");
77445
77479
  };
77446
- var configure15 = async (ctx) => {
77480
+ var configure16 = async (ctx) => {
77447
77481
  await installPackages(["@cloudflare/vite-plugin"], {
77448
77482
  dev: true,
77449
77483
  startText: "Installing the Cloudflare Vite plugin",
@@ -77474,9 +77508,9 @@ function transformViteConfig(ctx) {
77474
77508
  if (callee.name !== "defineConfig") {
77475
77509
  return this.traverse(n);
77476
77510
  }
77477
- const config36 = n.node.arguments[0];
77478
- (0, import_assert2.default)(t.ObjectExpression.check(config36));
77479
- const pluginsProp = config36.properties.find((prop) => isPluginsProp(prop));
77511
+ const config34 = n.node.arguments[0];
77512
+ (0, import_assert2.default)(t.ObjectExpression.check(config34));
77513
+ const pluginsProp = config34.properties.find((prop) => isPluginsProp(prop));
77480
77514
  (0, import_assert2.default)(pluginsProp && t.ArrayExpression.check(pluginsProp.value));
77481
77515
  pluginsProp.value.elements.push(
77482
77516
  b2.callExpression(b2.identifier("cloudflare"), [])
@@ -77550,12 +77584,12 @@ var config26 = {
77550
77584
  }
77551
77585
  }
77552
77586
  },
77553
- generate: generate21,
77554
- configure: configure15,
77587
+ generate: generate22,
77588
+ configure: configure16,
77555
77589
  transformPackageJson: async (_3, ctx) => ({
77556
77590
  scripts: {
77557
- deploy: `${npm16} run build && wrangler deploy`,
77558
- preview: `${npm16} run build && vite preview`,
77591
+ deploy: `${npm17} run build && wrangler deploy`,
77592
+ preview: `${npm17} run build && vite preview`,
77559
77593
  ...usesTypescript(ctx) && { "cf-typegen": `wrangler types` }
77560
77594
  }
77561
77595
  }),
@@ -77572,9 +77606,9 @@ var config27 = {
77572
77606
  };
77573
77607
  var c3_default36 = config27;
77574
77608
 
77575
- // templates/remix/pages/c3.ts
77576
- var { npm: npm17 } = detectPackageManager();
77577
- var generate22 = async (ctx) => {
77609
+ // templates/remix/c3.ts
77610
+ var { npm: npm18 } = detectPackageManager();
77611
+ var generate23 = async (ctx) => {
77578
77612
  await runFrameworkGenerator(ctx, [
77579
77613
  ctx.project.name,
77580
77614
  "--template",
@@ -77582,7 +77616,7 @@ var generate22 = async (ctx) => {
77582
77616
  ]);
77583
77617
  logRaw("");
77584
77618
  };
77585
- var configure16 = async () => {
77619
+ var configure17 = async () => {
77586
77620
  const typeDefsPath = "load-context.ts";
77587
77621
  const s = spinner();
77588
77622
  s.start(`Updating \`${typeDefsPath}\``);
@@ -77606,55 +77640,12 @@ var config28 = {
77606
77640
  copyFiles: {
77607
77641
  path: "./templates"
77608
77642
  },
77609
- path: "templates/remix/pages",
77610
- generate: generate22,
77611
- configure: configure16,
77612
- transformPackageJson: async () => ({
77613
- scripts: {
77614
- deploy: `${npm17} run build && wrangler pages deploy`,
77615
- preview: `${npm17} run build && wrangler pages dev`,
77616
- "cf-typegen": `wrangler types`
77617
- }
77618
- }),
77619
- devScript: "dev",
77620
- deployScript: "deploy",
77621
- previewScript: "preview"
77622
- };
77623
- var c3_default37 = config28;
77624
-
77625
- // templates/remix/workers/c3.ts
77626
- var { npm: npm18 } = detectPackageManager();
77627
- var generate23 = async (ctx) => {
77628
- await runFrameworkGenerator(ctx, [
77629
- ctx.project.name,
77630
- "--template",
77631
- "https://github.com/remix-run/remix/tree/main/templates/cloudflare-workers"
77632
- ]);
77633
- logRaw("");
77634
- };
77635
- var configure17 = async () => {
77636
- await installPackages(["wrangler@latest"], {
77637
- dev: true,
77638
- startText: "Updating the Wrangler version",
77639
- doneText: `${brandColor(`updated`)} ${dim("wrangler@latest")}`
77640
- });
77641
- };
77642
- var config29 = {
77643
- configVersion: 1,
77644
- id: "remix",
77645
- frameworkCli: "create-remix",
77646
- platform: "workers",
77647
- displayName: "Remix",
77648
- copyFiles: {
77649
- path: "./templates"
77650
- },
77651
- path: "templates/remix/workers",
77652
77643
  generate: generate23,
77653
77644
  configure: configure17,
77654
77645
  transformPackageJson: async () => ({
77655
77646
  scripts: {
77656
- deploy: `${npm18} run build && wrangler deploy`,
77657
- preview: `${npm18} run build && wrangler dev`,
77647
+ deploy: `${npm18} run build && wrangler pages deploy`,
77648
+ preview: `${npm18} run build && wrangler pages dev`,
77658
77649
  "cf-typegen": `wrangler types`
77659
77650
  }
77660
77651
  }),
@@ -77662,17 +77653,10 @@ var config29 = {
77662
77653
  deployScript: "deploy",
77663
77654
  previewScript: "preview"
77664
77655
  };
77665
- var c3_default38 = config29;
77666
-
77667
- // templates/remix/c3.ts
77668
- var config30 = {
77669
- displayName: "Remix",
77670
- platformVariants: { pages: c3_default37, workers: c3_default38 }
77671
- };
77672
- var c3_default39 = config30;
77656
+ var c3_default37 = config28;
77673
77657
 
77674
77658
  // templates/scheduled/c3.ts
77675
- var c3_default40 = {
77659
+ var c3_default38 = {
77676
77660
  configVersion: 1,
77677
77661
  id: "scheduled",
77678
77662
  displayName: "Scheduled Worker (Cron Trigger)",
@@ -77735,7 +77719,7 @@ var configure18 = async (ctx) => {
77735
77719
  }
77736
77720
  });
77737
77721
  };
77738
- var config31 = {
77722
+ var config29 = {
77739
77723
  configVersion: 1,
77740
77724
  id: "solid",
77741
77725
  frameworkCli: "create-solid",
@@ -77757,7 +77741,7 @@ var config31 = {
77757
77741
  deployScript: "deploy",
77758
77742
  previewScript: "preview"
77759
77743
  };
77760
- var c3_default41 = config31;
77744
+ var c3_default39 = config29;
77761
77745
 
77762
77746
  // templates/svelte/c3.ts
77763
77747
  var import_node_fs3 = require("node:fs");
@@ -77850,7 +77834,7 @@ var updateTypeDefinitions2 = (ctx) => {
77850
77834
  }
77851
77835
  });
77852
77836
  };
77853
- var config32 = {
77837
+ var config30 = {
77854
77838
  configVersion: 1,
77855
77839
  id: "svelte",
77856
77840
  frameworkCli: "sv",
@@ -77879,14 +77863,14 @@ var config32 = {
77879
77863
  deployScript: "deploy",
77880
77864
  previewScript: "preview"
77881
77865
  };
77882
- var c3_default42 = config32;
77866
+ var c3_default40 = config30;
77883
77867
 
77884
77868
  // templates/vue/pages/c3.ts
77885
77869
  var { npm: npm21 } = detectPackageManager();
77886
77870
  var generate26 = async (ctx) => {
77887
77871
  await runFrameworkGenerator(ctx, [ctx.project.name]);
77888
77872
  };
77889
- var config33 = {
77873
+ var config31 = {
77890
77874
  configVersion: 1,
77891
77875
  id: "vue",
77892
77876
  frameworkCli: "create-vue",
@@ -77904,7 +77888,7 @@ var config33 = {
77904
77888
  deployScript: "deploy",
77905
77889
  previewScript: "preview"
77906
77890
  };
77907
- var c3_default43 = config33;
77891
+ var c3_default41 = config31;
77908
77892
 
77909
77893
  // templates/vue/workers/c3.ts
77910
77894
  var { npm: npm22 } = detectPackageManager();
@@ -77946,7 +77930,7 @@ function updateTsconfigJson2() {
77946
77930
  writeJSON("tsconfig.json", tsconfig);
77947
77931
  s.stop(`${brandColor(`updated`)} ${dim(`\`tsconfig.json\``)}`);
77948
77932
  }
77949
- var config34 = {
77933
+ var config32 = {
77950
77934
  configVersion: 1,
77951
77935
  id: "vue",
77952
77936
  frameworkCli: "create-vue",
@@ -77979,20 +77963,20 @@ var config34 = {
77979
77963
  deployScript: "deploy",
77980
77964
  previewScript: "preview"
77981
77965
  };
77982
- var c3_default44 = config34;
77966
+ var c3_default42 = config32;
77983
77967
 
77984
77968
  // templates/vue/c3.ts
77985
- var config35 = {
77969
+ var config33 = {
77986
77970
  displayName: "Vue",
77987
- platformVariants: { pages: c3_default43, workers: c3_default44 }
77971
+ platformVariants: { pages: c3_default41, workers: c3_default42 }
77988
77972
  };
77989
- var c3_default45 = config35;
77973
+ var c3_default43 = config33;
77990
77974
 
77991
77975
  // src/git.ts
77992
77976
  var import_node_assert = __toESM(require("node:assert"));
77993
77977
 
77994
77978
  // ../wrangler/package.json
77995
- var version2 = "0.0.0-dae7bd4dd";
77979
+ var version2 = "0.0.0-db0172707";
77996
77980
 
77997
77981
  // src/git.ts
77998
77982
  var offerGit = async (ctx) => {
@@ -78253,44 +78237,47 @@ var defaultSelectVariant = async (ctx) => {
78253
78237
  function getFrameworkMap({ experimental = false }) {
78254
78238
  if (experimental) {
78255
78239
  return {
78256
- hono: c3_default,
78257
- next: c3_default2,
78258
- qwik: c3_default3,
78259
- solid: c3_default4,
78260
- svelte: c3_default5
78240
+ astro: c3_default,
78241
+ hono: c3_default5,
78242
+ next: c3_default6,
78243
+ qwik: c3_default7,
78244
+ remix: c3_default8,
78245
+ solid: c3_default9,
78246
+ svelte: c3_default10
78261
78247
  };
78262
78248
  } else {
78263
78249
  return {
78264
- analog: c3_default6,
78265
- angular: c3_default9,
78266
- astro: c3_default12,
78267
- docusaurus: c3_default16,
78268
- gatsby: c3_default19,
78250
+ analog: c3_default11,
78251
+ angular: c3_default14,
78252
+ astro: c3_default15,
78253
+ docusaurus: c3_default19,
78254
+ gatsby: c3_default22,
78269
78255
  hono: c3_default25,
78270
78256
  next: c3_default26,
78271
78257
  nuxt: c3_default29,
78272
78258
  qwik: c3_default33,
78273
78259
  react: c3_default36,
78274
- remix: c3_default39,
78275
- solid: c3_default41,
78276
- svelte: c3_default42,
78277
- vue: c3_default45
78260
+ remix: c3_default37,
78261
+ solid: c3_default39,
78262
+ svelte: c3_default40,
78263
+ vue: c3_default43
78278
78264
  };
78279
78265
  }
78280
78266
  }
78281
78267
  function getTemplateMap({ experimental = false }) {
78282
78268
  if (experimental) {
78283
- return {};
78269
+ return {
78270
+ "hello-world-assets-only": c3_default2,
78271
+ "hello-world-with-assets": c3_default4,
78272
+ "hello-world-durable-object-with-assets": c3_default3
78273
+ };
78284
78274
  } else {
78285
78275
  return {
78286
78276
  "hello-world": c3_default24,
78287
- "hello-world-assets-only": c3_default20,
78288
- "hello-world-with-assets": c3_default23,
78289
- "hello-world-durable-object": c3_default22,
78290
- "hello-world-durable-object-with-assets": c3_default21,
78291
- common: c3_default13,
78292
- scheduled: c3_default40,
78277
+ common: c3_default16,
78278
+ scheduled: c3_default38,
78293
78279
  queues: c3_default32,
78280
+ "hello-world-durable-object": c3_default23,
78294
78281
  openapi: c3_default30,
78295
78282
  "pre-existing": c3_default31
78296
78283
  };
@@ -78400,9 +78387,9 @@ var createContext = async (args, prevArgs) => {
78400
78387
  });
78401
78388
  const categoryOptions = [
78402
78389
  {
78403
- label: "Hello World Starter",
78390
+ label: "Hello World example",
78404
78391
  value: "hello-world",
78405
- description: "Select from basic scaffolds to get started with Workers, Assets and Durable Objects"
78392
+ description: "Select from barebones examples to get started with Workers"
78406
78393
  },
78407
78394
  {
78408
78395
  label: "Framework Starter",
@@ -78440,8 +78427,8 @@ var createContext = async (args, prevArgs) => {
78440
78427
  experimental: args.experimental
78441
78428
  });
78442
78429
  const frameworkOptions = Object.entries(frameworkMap).map(
78443
- ([key, config36]) => ({
78444
- label: config36.displayName,
78430
+ ([key, config34]) => ({
78431
+ label: config34.displayName,
78445
78432
  value: key
78446
78433
  })
78447
78434
  );
@@ -78608,28 +78595,28 @@ var processRemoteTemplate = async (args) => {
78608
78595
  src = src.replace("https://github.com/", "github:").replace("/tree/main/", "/");
78609
78596
  }
78610
78597
  const path6 = await downloadRemoteTemplate(src);
78611
- const config36 = inferTemplateConfig(path6);
78612
- validateTemplate(path6, config36);
78598
+ const config34 = inferTemplateConfig(path6);
78599
+ validateTemplate(path6, config34);
78613
78600
  updateStatus(`${brandColor("template")} ${dim("cloned and validated")}`);
78614
78601
  return {
78615
78602
  path: path6,
78616
- ...config36
78603
+ ...config34
78617
78604
  };
78618
78605
  };
78619
- var validateTemplate = (path6, config36) => {
78620
- if (!config36.copyFiles) {
78606
+ var validateTemplate = (path6, config34) => {
78607
+ if (!config34.copyFiles) {
78621
78608
  return;
78622
78609
  }
78623
- if (isVariantInfo(config36.copyFiles)) {
78624
- validateTemplateSrcDirectory((0, import_path13.resolve)(path6, config36.copyFiles.path), config36);
78610
+ if (isVariantInfo(config34.copyFiles)) {
78611
+ validateTemplateSrcDirectory((0, import_path13.resolve)(path6, config34.copyFiles.path), config34);
78625
78612
  } else {
78626
- for (const variant of Object.values(config36.copyFiles.variants)) {
78627
- validateTemplateSrcDirectory((0, import_path13.resolve)(path6, variant.path), config36);
78613
+ for (const variant of Object.values(config34.copyFiles.variants)) {
78614
+ validateTemplateSrcDirectory((0, import_path13.resolve)(path6, variant.path), config34);
78628
78615
  }
78629
78616
  }
78630
78617
  };
78631
- var validateTemplateSrcDirectory = (path6, config36) => {
78632
- if (config36.platform === "workers") {
78618
+ var validateTemplateSrcDirectory = (path6, config34) => {
78619
+ if (config34.platform === "workers") {
78633
78620
  const wranglerTomlPath = (0, import_path13.resolve)(path6, "wrangler.toml");
78634
78621
  const wranglerJsonPath = (0, import_path13.resolve)(path6, "wrangler.json");
78635
78622
  const wranglerJsoncPath = (0, import_path13.resolve)(path6, "wrangler.jsonc");
@@ -78803,12 +78790,12 @@ var cliDefinition = {
78803
78790
  const experimental = Boolean(args?.["experimental"]);
78804
78791
  if (experimental) {
78805
78792
  return [
78806
- { name: "hello-world", description: "Hello World Starter" },
78793
+ { name: "hello-world", description: "Hello World example" },
78807
78794
  { name: "web-framework", description: "Framework Starter" }
78808
78795
  ];
78809
78796
  } else {
78810
78797
  return [
78811
- { name: "hello-world", description: "Hello World Starter" },
78798
+ { name: "hello-world", description: "Hello World example" },
78812
78799
  { name: "web-framework", description: "Framework Starter" },
78813
78800
  { name: "demo", description: "Application Starter" },
78814
78801
  {
@@ -80540,20 +80527,20 @@ function applyEdits(text, edits) {
80540
80527
  var import_fs12 = require("fs");
80541
80528
  var import_path14 = require("path");
80542
80529
  var import_toml2 = __toESM(require_toml());
80543
- function ensureNameExists(config36, projectName) {
80544
- config36["name"] = projectName;
80545
- return config36;
80530
+ function ensureNameExists(config34, projectName) {
80531
+ config34["name"] = projectName;
80532
+ return config34;
80546
80533
  }
80547
- async function ensureCompatDateExists(config36) {
80548
- if (typeof config36["compatibility_date"] === "string") {
80534
+ async function ensureCompatDateExists(config34) {
80535
+ if (typeof config34["compatibility_date"] === "string") {
80549
80536
  const validCompatDateRe = /^\d{4}-\d{2}-\d{2}/m;
80550
- if (!config36["compatibility_date"].match(validCompatDateRe)) {
80551
- config36["compatibility_date"] = await getWorkerdCompatibilityDate();
80537
+ if (!config34["compatibility_date"].match(validCompatDateRe)) {
80538
+ config34["compatibility_date"] = await getWorkerdCompatibilityDate();
80552
80539
  }
80553
80540
  } else {
80554
- config36["compatibility_date"] = await getWorkerdCompatibilityDate();
80541
+ config34["compatibility_date"] = await getWorkerdCompatibilityDate();
80555
80542
  }
80556
- return config36;
80543
+ return config34;
80557
80544
  }
80558
80545
  var updateWranglerConfig = async (ctx) => {
80559
80546
  if (wranglerJsonExists(ctx)) {
@@ -81267,8 +81254,8 @@ var renderValues = (values) => {
81267
81254
  };
81268
81255
 
81269
81256
  // src/helpers/retry.ts
81270
- var retry = async (config36, fn) => {
81271
- let { times } = config36;
81257
+ var retry = async (config34, fn) => {
81258
+ let { times } = config34;
81272
81259
  let error2 = null;
81273
81260
  while (times > 0) {
81274
81261
  try {
@@ -81276,10 +81263,10 @@ var retry = async (config36, fn) => {
81276
81263
  } catch (e) {
81277
81264
  error2 = e;
81278
81265
  times--;
81279
- if (config36.exitCondition?.(e)) {
81266
+ if (config34.exitCondition?.(e)) {
81280
81267
  break;
81281
81268
  }
81282
- await sleep(config36.sleepMs ?? 1e3);
81269
+ await sleep(config34.sleepMs ?? 1e3);
81283
81270
  }
81284
81271
  }
81285
81272
  throw error2;
@@ -81399,8 +81386,8 @@ async function addWorkersTypesToTsConfig(ctx) {
81399
81386
  }
81400
81387
  const typesEntrypoint = `@cloudflare/workers-types/${entrypointVersion}`;
81401
81388
  try {
81402
- const config36 = parse4(tsconfig);
81403
- const currentTypes = config36.compilerOptions?.types ?? [];
81389
+ const config34 = parse4(tsconfig);
81390
+ const currentTypes = config34.compilerOptions?.types ?? [];
81404
81391
  const explicitEntrypoint = currentTypes.some(
81405
81392
  (t2) => t2.match(/@cloudflare\/workers-types\/\d{4}-\d{2}-\d{2}/)
81406
81393
  );