create-cloudflare 0.0.0-6d15863ec → 0.0.0-6d2931922

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 (32) hide show
  1. package/dist/cli.js +448 -402
  2. package/dist/tsconfig.tsbuildinfo +1 -1
  3. package/package.json +4 -4
  4. package/templates/angular/c3.ts +25 -13
  5. package/templates/angular/templates/src/server.ts +15 -0
  6. package/templates/angular/templates/tools/copy-files.mjs +8 -2
  7. package/templates/hello-world/js/package.json +1 -1
  8. package/templates/hello-world/ts/package.json +1 -1
  9. package/templates/hello-world/ts/test/tsconfig.json +1 -1
  10. package/templates/svelte/c3.ts +31 -4
  11. package/templates-experimental/angular/c3.ts +21 -7
  12. package/templates-experimental/angular/templates/src/server.ts +15 -0
  13. package/templates-experimental/hello-world-with-assets/js/package.json +1 -1
  14. package/templates-experimental/hello-world-with-assets/ts/package.json +1 -1
  15. package/templates-experimental/nuxt/c3.ts +1 -1
  16. package/templates-experimental/nuxt/templates/wrangler.toml +2 -2
  17. package/templates-experimental/solid/c3.ts +7 -50
  18. package/templates-experimental/solid/templates/wrangler.toml +2 -2
  19. package/templates-experimental/svelte/c3.ts +1 -4
  20. package/templates-experimental/vue/c3.ts +33 -0
  21. package/templates-experimental/{svelte/ts → vue/templates}/wrangler.toml +1 -2
  22. package/templates/angular/templates/server.ts +0 -34
  23. package/templates/angular/templates/tools/alter-polyfills.mjs +0 -27
  24. package/templates/angular/templates/tools/paths.mjs +0 -9
  25. package/templates/svelte/ts/wrangler.toml +0 -85
  26. package/templates-experimental/angular/templates/server.ts +0 -34
  27. package/templates-experimental/angular/templates/tools/alter-polyfills.mjs +0 -32
  28. package/templates-experimental/nuxt/templates/cloudflare-preset/nitro.config.ts +0 -27
  29. package/templates-experimental/svelte/ts/static/.assetsignore +0 -4
  30. /package/templates/svelte/{js → templates}/wrangler.toml +0 -0
  31. /package/templates-experimental/svelte/{js → templates}/static/.assetsignore +0 -0
  32. /package/templates-experimental/svelte/{js → templates}/wrangler.toml +0 -0
package/dist/cli.js CHANGED
@@ -558,7 +558,7 @@ var require_XDGAppPaths = __commonJS({
558
558
  XDGAppPaths.cache = function cache(dirOptions) {
559
559
  return path6.join(xdg.cache(), finalPathSegment(dirOptions));
560
560
  };
561
- XDGAppPaths.config = function config26(dirOptions) {
561
+ XDGAppPaths.config = function config27(dirOptions) {
562
562
  return path6.join(xdg.config(), finalPathSegment(dirOptions));
563
563
  };
564
564
  XDGAppPaths.data = function data(dirOptions) {
@@ -615,7 +615,7 @@ var require_XDG = __commonJS({
615
615
  var cache = function() {
616
616
  return valOrPath(env3.get("XDG_CACHE_HOME"), [baseDir(), ".cache"]);
617
617
  };
618
- var config26 = function() {
618
+ var config27 = function() {
619
619
  return valOrPath(env3.get("XDG_CONFIG_HOME"), [baseDir(), ".config"]);
620
620
  };
621
621
  var data = function() {
@@ -627,13 +627,13 @@ var require_XDG = __commonJS({
627
627
  var state = function() {
628
628
  return valOrPath(env3.get("XDG_STATE_HOME"), [baseDir(), ".local", "state"]);
629
629
  };
630
- return { cache, config: config26, data, runtime, state };
630
+ return { cache, config: config27, data, runtime, state };
631
631
  };
632
632
  var macos = function() {
633
633
  var cache = function() {
634
634
  return valOrPath(env3.get("XDG_CACHE_HOME"), [baseDir(), "Library", "Caches"]);
635
635
  };
636
- var config26 = function() {
636
+ var config27 = function() {
637
637
  return valOrPath(env3.get("XDG_CONFIG_HOME"), [baseDir(), "Library", "Preferences"]);
638
638
  };
639
639
  var data = function() {
@@ -645,7 +645,7 @@ var require_XDG = __commonJS({
645
645
  var state = function() {
646
646
  return valOrPath(env3.get("XDG_STATE_HOME"), [baseDir(), "Library", "State"]);
647
647
  };
648
- return { cache, config: config26, data, runtime, state };
648
+ return { cache, config: config27, data, runtime, state };
649
649
  };
650
650
  var windows = function() {
651
651
  function appData() {
@@ -657,7 +657,7 @@ var require_XDG = __commonJS({
657
657
  var cache = function() {
658
658
  return valOrPath(env3.get("XDG_CACHE_HOME"), [localAppData(), "xdg.cache"]);
659
659
  };
660
- var config26 = function() {
660
+ var config27 = function() {
661
661
  return valOrPath(env3.get("XDG_CONFIG_HOME"), [appData(), "xdg.config"]);
662
662
  };
663
663
  var data = function() {
@@ -669,7 +669,7 @@ var require_XDG = __commonJS({
669
669
  var state = function() {
670
670
  return valOrPath(env3.get("XDG_STATE_HOME"), [localAppData(), "xdg.state"]);
671
671
  };
672
- return { cache, config: config26, data, runtime, state };
672
+ return { cache, config: config27, data, runtime, state };
673
673
  };
674
674
  var XDG_ = function() {
675
675
  function XDG_2() {
@@ -32170,22 +32170,22 @@ var require_dist_web = __commonJS({
32170
32170
  _createClass(Haikunator3, [{
32171
32171
  key: "haikunate",
32172
32172
  value: function haikunate(options) {
32173
- var config26 = (0, _lodash["default"])(options, this.config);
32174
- if (config26.tokenHex === true) {
32175
- config26.tokenChars = "0123456789abcdef";
32173
+ var config27 = (0, _lodash["default"])(options, this.config);
32174
+ if (config27.tokenHex === true) {
32175
+ config27.tokenChars = "0123456789abcdef";
32176
32176
  }
32177
32177
  var adjective = this._randomElement(this.adjectives);
32178
32178
  var noun = this._randomElement(this.nouns);
32179
- if (!config26.tokenLength)
32180
- config26.tokenLength = 0;
32179
+ if (!config27.tokenLength)
32180
+ config27.tokenLength = 0;
32181
32181
  var token = "";
32182
- for (var i = 0; i < config26.tokenLength; i++) {
32183
- token += this._randomElement(config26.tokenChars);
32182
+ for (var i = 0; i < config27.tokenLength; i++) {
32183
+ token += this._randomElement(config27.tokenChars);
32184
32184
  }
32185
32185
  var sections = [adjective, noun, token];
32186
32186
  return sections.filter(function(e) {
32187
32187
  return !!e;
32188
- }).join(config26.delimiter);
32188
+ }).join(config27.delimiter);
32189
32189
  }
32190
32190
  /**
32191
32191
  * Get a random element from an array/string
@@ -46608,13 +46608,13 @@ var require_esprima2 = __commonJS({
46608
46608
  return Reader2;
46609
46609
  }();
46610
46610
  var Tokenizer = function() {
46611
- function Tokenizer2(code, config26) {
46611
+ function Tokenizer2(code, config27) {
46612
46612
  this.errorHandler = new error_handler_1.ErrorHandler();
46613
- this.errorHandler.tolerant = config26 ? typeof config26.tolerant === "boolean" && config26.tolerant : false;
46613
+ this.errorHandler.tolerant = config27 ? typeof config27.tolerant === "boolean" && config27.tolerant : false;
46614
46614
  this.scanner = new scanner_1.Scanner(code, this.errorHandler);
46615
- this.scanner.trackComment = config26 ? typeof config26.comment === "boolean" && config26.comment : false;
46616
- this.trackRange = config26 ? typeof config26.range === "boolean" && config26.range : false;
46617
- this.trackLoc = config26 ? typeof config26.loc === "boolean" && config26.loc : false;
46615
+ this.scanner.trackComment = config27 ? typeof config27.comment === "boolean" && config27.comment : false;
46616
+ this.trackRange = config27 ? typeof config27.range === "boolean" && config27.range : false;
46617
+ this.trackLoc = config27 ? typeof config27.loc === "boolean" && config27.loc : false;
46618
46618
  this.buffer = [];
46619
46619
  this.reader = new Reader();
46620
46620
  }
@@ -48807,11 +48807,11 @@ var require_printer = __commonJS({
48807
48807
  return this.code;
48808
48808
  };
48809
48809
  var emptyPrintResult = new PrintResult("");
48810
- var Printer = function Printer2(config26) {
48810
+ var Printer = function Printer2(config27) {
48811
48811
  assert_1.default.ok(this instanceof Printer2);
48812
- var explicitTabWidth = config26 && config26.tabWidth;
48813
- config26 = options_1.normalize(config26);
48814
- config26.sourceFileName = null;
48812
+ var explicitTabWidth = config27 && config27.tabWidth;
48813
+ config27 = options_1.normalize(config27);
48814
+ config27.sourceFileName = null;
48815
48815
  function makePrintFunctionWith(options, overrides) {
48816
48816
  options = Object.assign({}, options, overrides);
48817
48817
  return function(path6) {
@@ -48826,11 +48826,11 @@ var require_printer = __commonJS({
48826
48826
  includeComments: false
48827
48827
  }));
48828
48828
  }
48829
- var oldTabWidth = config26.tabWidth;
48829
+ var oldTabWidth = config27.tabWidth;
48830
48830
  if (!explicitTabWidth) {
48831
48831
  var loc = path6.getNode().loc;
48832
48832
  if (loc && loc.lines && loc.lines.guessTabWidth) {
48833
- config26.tabWidth = loc.lines.guessTabWidth();
48833
+ config27.tabWidth = loc.lines.guessTabWidth();
48834
48834
  }
48835
48835
  }
48836
48836
  var reprinter = patcher_1.getReprinter(path6);
@@ -48844,11 +48844,11 @@ var require_printer = __commonJS({
48844
48844
  // right choice because it gives us the opportunity to reprint
48845
48845
  // such nodes using their original source.
48846
48846
  reprinter(print2)
48847
- ) : genericPrint(path6, config26, options, makePrintFunctionWith(options, {
48847
+ ) : genericPrint(path6, config27, options, makePrintFunctionWith(options, {
48848
48848
  includeComments: true,
48849
48849
  avoidRootParens: false
48850
48850
  }));
48851
- config26.tabWidth = oldTabWidth;
48851
+ config27.tabWidth = oldTabWidth;
48852
48852
  return lines;
48853
48853
  }
48854
48854
  this.print = function(ast) {
@@ -48859,7 +48859,7 @@ var require_printer = __commonJS({
48859
48859
  includeComments: true,
48860
48860
  avoidRootParens: false
48861
48861
  });
48862
- return new PrintResult(lines.toString(config26), util.composeSourceMaps(config26.inputSourceMap, lines.getSourceMap(config26.sourceMapName, config26.sourceRoot)));
48862
+ return new PrintResult(lines.toString(config27), util.composeSourceMaps(config27.inputSourceMap, lines.getSourceMap(config27.sourceMapName, config27.sourceRoot)));
48863
48863
  };
48864
48864
  this.printGenerically = function(ast) {
48865
48865
  if (!ast) {
@@ -48867,26 +48867,26 @@ var require_printer = __commonJS({
48867
48867
  }
48868
48868
  function printGenerically(path7) {
48869
48869
  return comments_1.printComments(path7, function(path8) {
48870
- return genericPrint(path8, config26, {
48870
+ return genericPrint(path8, config27, {
48871
48871
  includeComments: true,
48872
48872
  avoidRootParens: false
48873
48873
  }, printGenerically);
48874
48874
  });
48875
48875
  }
48876
48876
  var path6 = fast_path_1.default.from(ast);
48877
- var oldReuseWhitespace = config26.reuseWhitespace;
48878
- config26.reuseWhitespace = false;
48879
- var pr = new PrintResult(printGenerically(path6).toString(config26));
48880
- config26.reuseWhitespace = oldReuseWhitespace;
48877
+ var oldReuseWhitespace = config27.reuseWhitespace;
48878
+ config27.reuseWhitespace = false;
48879
+ var pr = new PrintResult(printGenerically(path6).toString(config27));
48880
+ config27.reuseWhitespace = oldReuseWhitespace;
48881
48881
  return pr;
48882
48882
  };
48883
48883
  };
48884
48884
  exports2.Printer = Printer;
48885
- function genericPrint(path6, config26, options, printPath) {
48885
+ function genericPrint(path6, config27, options, printPath) {
48886
48886
  assert_1.default.ok(path6 instanceof fast_path_1.default);
48887
48887
  var node = path6.getValue();
48888
48888
  var parts = [];
48889
- var linesWithoutParens = genericPrintNoParens(path6, config26, printPath);
48889
+ var linesWithoutParens = genericPrintNoParens(path6, config27, printPath);
48890
48890
  if (!node || linesWithoutParens.isEmpty()) {
48891
48891
  return linesWithoutParens;
48892
48892
  }
@@ -67118,7 +67118,7 @@ var logRaw = (msg) => {
67118
67118
  `);
67119
67119
  };
67120
67120
  var log = (msg) => {
67121
- const lines = msg.split("\n").map((ln) => `${gray(shapes.bar)} ${white(ln)}`);
67121
+ const lines = msg.split("\n").map((ln) => `${gray(shapes.bar)}${ln.length > 0 ? " " + white(ln) : ""}`);
67122
67122
  logRaw(lines.join("\n"));
67123
67123
  };
67124
67124
  var newline = () => {
@@ -68538,33 +68538,33 @@ var inputPrompt = async (promptConfig) => {
68538
68538
  }
68539
68539
  return input;
68540
68540
  };
68541
- var renderSubmit = (config26, value) => {
68542
- const { question, label } = config26;
68543
- if (config26.type !== "confirm" && !value) {
68541
+ var renderSubmit = (config27, value) => {
68542
+ const { question, label } = config27;
68543
+ if (config27.type !== "confirm" && !value) {
68544
68544
  return [`${leftT} ${question} ${dim("(skipped)")}`, `${grayBar}`];
68545
68545
  }
68546
- const content = config26.type === "confirm" ? `${grayBar} ${brandColor(value)} ${dim(label)}` : `${grayBar} ${brandColor(label)} ${dim(value)}`;
68546
+ const content = config27.type === "confirm" ? `${grayBar} ${brandColor(value)} ${dim(label)}` : `${grayBar} ${brandColor(label)} ${dim(value)}`;
68547
68547
  return [`${leftT} ${question}`, content, `${grayBar}`];
68548
68548
  };
68549
- var getRenderers = (config26) => {
68550
- switch (config26.type) {
68549
+ var getRenderers = (config27) => {
68550
+ switch (config27.type) {
68551
68551
  case "select":
68552
- return getSelectRenderers(config26);
68552
+ return getSelectRenderers(config27);
68553
68553
  case "confirm":
68554
- return getConfirmRenderers(config26);
68554
+ return getConfirmRenderers(config27);
68555
68555
  case "text":
68556
- return getTextRenderers(config26);
68556
+ return getTextRenderers(config27);
68557
68557
  case "multiselect":
68558
- return getSelectRenderers(config26);
68558
+ return getSelectRenderers(config27);
68559
68559
  case "list":
68560
- return getSelectListRenderers(config26);
68560
+ return getSelectListRenderers(config27);
68561
68561
  }
68562
68562
  };
68563
- var getTextRenderers = (config26) => {
68564
- const { question } = config26;
68565
- const helpText = config26.helpText ?? "";
68566
- const format5 = config26.format ?? ((val) => String(val));
68567
- const defaultValue = config26.defaultValue?.toString() ?? "";
68563
+ var getTextRenderers = (config27) => {
68564
+ const { question } = config27;
68565
+ const helpText = config27.helpText ?? "";
68566
+ const format5 = config27.format ?? ((val) => String(val));
68567
+ const defaultValue = config27.defaultValue?.toString() ?? "";
68568
68568
  const activeRenderer = ({ value }) => [
68569
68569
  `${blCorner} ${bold(question)} ${dim(helpText)}`,
68570
68570
  `${space(2)}${format5(value || dim(defaultValue))}`,
@@ -68587,14 +68587,14 @@ var getTextRenderers = (config26) => {
68587
68587
  ``
68588
68588
  // extra line for readability
68589
68589
  ],
68590
- submit: ({ value }) => renderSubmit(config26, format5(value ?? "")),
68590
+ submit: ({ value }) => renderSubmit(config27, format5(value ?? "")),
68591
68591
  cancel: activeRenderer
68592
68592
  };
68593
68593
  };
68594
- var getSelectRenderers = (config26) => {
68595
- const { options, question, helpText: _helpText } = config26;
68594
+ var getSelectRenderers = (config27) => {
68595
+ const { options, question, helpText: _helpText } = config27;
68596
68596
  const helpText = _helpText ?? "";
68597
- const maxItemsPerPage = config26.maxItemsPerPage ?? 32;
68597
+ const maxItemsPerPage = config27.maxItemsPerPage ?? 32;
68598
68598
  const defaultRenderer = ({ cursor = 0, value }) => {
68599
68599
  const renderOption = (opt, i) => {
68600
68600
  const { label: optionLabel, value: optionValue } = opt;
@@ -68669,21 +68669,21 @@ ${space(2)}${dim("...")}` : ""}`,
68669
68669
  submit: ({ value }) => {
68670
68670
  if (Array.isArray(value)) {
68671
68671
  return renderSubmit(
68672
- config26,
68672
+ config27,
68673
68673
  options.filter((o) => value.includes(o.value)).map((o) => o.label).join(", ")
68674
68674
  );
68675
68675
  }
68676
68676
  return renderSubmit(
68677
- config26,
68677
+ config27,
68678
68678
  options.find((o) => o.value === value)?.label
68679
68679
  );
68680
68680
  },
68681
68681
  cancel: defaultRenderer
68682
68682
  };
68683
68683
  };
68684
- var getSelectListRenderers = (config26) => {
68685
- const { question, helpText: _helpText } = config26;
68686
- let options = config26.options;
68684
+ var getSelectListRenderers = (config27) => {
68685
+ const { question, helpText: _helpText } = config27;
68686
+ let options = config27.options;
68687
68687
  const helpText = _helpText ?? "";
68688
68688
  const { rows } = stdout;
68689
68689
  const defaultRenderer = ({ cursor, value }, prompt) => {
@@ -68764,20 +68764,20 @@ var getSelectListRenderers = (config26) => {
68764
68764
  submit: ({ value }) => {
68765
68765
  if (Array.isArray(value)) {
68766
68766
  return renderSubmit(
68767
- config26,
68767
+ config27,
68768
68768
  options.filter((o) => value.includes(o.value)).map((o) => o.value).join(", ")
68769
68769
  );
68770
68770
  }
68771
68771
  return renderSubmit(
68772
- config26,
68772
+ config27,
68773
68773
  options.find((o) => o.value === value)?.value
68774
68774
  );
68775
68775
  },
68776
68776
  cancel: defaultRenderer
68777
68777
  };
68778
68778
  };
68779
- var getConfirmRenderers = (config26) => {
68780
- const { activeText, inactiveText, question, helpText: _helpText } = config26;
68779
+ var getConfirmRenderers = (config27) => {
68780
+ const { activeText, inactiveText, question, helpText: _helpText } = config27;
68781
68781
  const helpText = _helpText ?? "";
68782
68782
  const active = activeText || "Yes";
68783
68783
  const inactive = inactiveText || "No";
@@ -68794,7 +68794,7 @@ var getConfirmRenderers = (config26) => {
68794
68794
  active: defaultRenderer,
68795
68795
  confirm: defaultRenderer,
68796
68796
  error: defaultRenderer,
68797
- submit: ({ value }) => renderSubmit(config26, value ? "yes" : "no"),
68797
+ submit: ({ value }) => renderSubmit(config27, value ? "yes" : "no"),
68798
68798
  cancel: defaultRenderer
68799
68799
  };
68800
68800
  };
@@ -68818,7 +68818,10 @@ var spinner = (frames = spinnerFrames.clockwise, color = brandColor) => {
68818
68818
  start(msg, helpText) {
68819
68819
  helpText ||= ``;
68820
68820
  currentMsg = msg;
68821
- startMsg = `${currentMsg} ${dim(helpText)}`;
68821
+ startMsg = currentMsg;
68822
+ if (helpText !== void 0 && helpText.length > 0) {
68823
+ startMsg += ` ${dim(helpText)}`;
68824
+ }
68822
68825
  if (isInteractive()) {
68823
68826
  let index = 0;
68824
68827
  clearLoop();
@@ -68831,7 +68834,7 @@ var spinner = (frames = spinnerFrames.clockwise, color = brandColor) => {
68831
68834
  }
68832
68835
  }, frameRate);
68833
68836
  } else {
68834
- logUpdate2(`${leftT} ${startMsg}`);
68837
+ logRaw(`${leftT} ${startMsg}`);
68835
68838
  }
68836
68839
  },
68837
68840
  update(msg) {
@@ -68849,17 +68852,20 @@ ${grayBar} ${msg}`);
68849
68852
  clearLoop();
68850
68853
  } else {
68851
68854
  if (msg !== void 0) {
68852
- logUpdate2(`
68853
- ${grayBar} ${msg}`);
68855
+ logRaw(`${grayBar} ${msg}`);
68854
68856
  }
68855
68857
  newline();
68856
68858
  }
68857
68859
  }
68858
68860
  };
68859
68861
  };
68860
- var isInteractive = () => {
68861
- return process.stdin.isTTY;
68862
- };
68862
+ function isInteractive() {
68863
+ try {
68864
+ return Boolean(process.stdin.isTTY && process.stdout.isTTY);
68865
+ } catch {
68866
+ return false;
68867
+ }
68868
+ }
68863
68869
 
68864
68870
  // ../../node_modules/.pnpm/yargs@17.7.2/node_modules/yargs/lib/platform-shims/esm.mjs
68865
68871
  var import_assert = require("assert");
@@ -69758,23 +69764,23 @@ var YargsParser = class {
69758
69764
  const configPath = argv2[configKey] || configLookup[configKey];
69759
69765
  if (configPath) {
69760
69766
  try {
69761
- let config26 = null;
69767
+ let config27 = null;
69762
69768
  const resolvedConfigPath = mixin2.resolve(mixin2.cwd(), configPath);
69763
69769
  const resolveConfig = flags.configs[configKey];
69764
69770
  if (typeof resolveConfig === "function") {
69765
69771
  try {
69766
- config26 = resolveConfig(resolvedConfigPath);
69772
+ config27 = resolveConfig(resolvedConfigPath);
69767
69773
  } catch (e) {
69768
- config26 = e;
69774
+ config27 = e;
69769
69775
  }
69770
- if (config26 instanceof Error) {
69771
- error2 = config26;
69776
+ if (config27 instanceof Error) {
69777
+ error2 = config27;
69772
69778
  return;
69773
69779
  }
69774
69780
  } else {
69775
- config26 = mixin2.require(resolvedConfigPath);
69781
+ config27 = mixin2.require(resolvedConfigPath);
69776
69782
  }
69777
- setConfigObject(config26);
69783
+ setConfigObject(config27);
69778
69784
  } catch (ex) {
69779
69785
  if (ex.name === "PermissionDenied")
69780
69786
  error2 = ex;
@@ -69784,9 +69790,9 @@ var YargsParser = class {
69784
69790
  }
69785
69791
  });
69786
69792
  }
69787
- function setConfigObject(config26, prev) {
69788
- Object.keys(config26).forEach(function(key) {
69789
- const value = config26[key];
69793
+ function setConfigObject(config27, prev) {
69794
+ Object.keys(config27).forEach(function(key) {
69795
+ const value = config27[key];
69790
69796
  const fullKey = prev ? prev + "." + key : key;
69791
69797
  if (typeof value === "object" && value !== null && !Array.isArray(value) && configuration["dot-notation"]) {
69792
69798
  setConfigObject(value, fullKey);
@@ -70938,11 +70944,11 @@ var CommandInstance = class {
70938
70944
  });
70939
70945
  if (!unparsed.length)
70940
70946
  return;
70941
- const config26 = Object.assign({}, options.configuration, {
70947
+ const config27 = Object.assign({}, options.configuration, {
70942
70948
  "populate--": false
70943
70949
  });
70944
70950
  const parsed = this.shim.Parser.detailed(unparsed, Object.assign({}, options, {
70945
- configuration: config26
70951
+ configuration: config27
70946
70952
  }));
70947
70953
  if (parsed.error) {
70948
70954
  yargs.getInternalMethods().getUsageInstance().fail(parsed.error.message, parsed.error);
@@ -72165,31 +72171,31 @@ ${customMsgs.join("\n")}` : "";
72165
72171
  // ../../node_modules/.pnpm/yargs@17.7.2/node_modules/yargs/build/lib/utils/apply-extends.js
72166
72172
  var previouslyVisitedConfigs = [];
72167
72173
  var shim2;
72168
- function applyExtends(config26, cwd, mergeExtends, _shim) {
72174
+ function applyExtends(config27, cwd, mergeExtends, _shim) {
72169
72175
  shim2 = _shim;
72170
72176
  let defaultConfig = {};
72171
- if (Object.prototype.hasOwnProperty.call(config26, "extends")) {
72172
- if (typeof config26.extends !== "string")
72177
+ if (Object.prototype.hasOwnProperty.call(config27, "extends")) {
72178
+ if (typeof config27.extends !== "string")
72173
72179
  return defaultConfig;
72174
- const isPath = /\.json|\..*rc$/.test(config26.extends);
72180
+ const isPath = /\.json|\..*rc$/.test(config27.extends);
72175
72181
  let pathToDefault = null;
72176
72182
  if (!isPath) {
72177
72183
  try {
72178
- pathToDefault = require.resolve(config26.extends);
72184
+ pathToDefault = require.resolve(config27.extends);
72179
72185
  } catch (_err) {
72180
- return config26;
72186
+ return config27;
72181
72187
  }
72182
72188
  } else {
72183
- pathToDefault = getPathToDefaultConfig(cwd, config26.extends);
72189
+ pathToDefault = getPathToDefaultConfig(cwd, config27.extends);
72184
72190
  }
72185
72191
  checkForCircularExtends(pathToDefault);
72186
72192
  previouslyVisitedConfigs.push(pathToDefault);
72187
- defaultConfig = isPath ? JSON.parse(shim2.readFileSync(pathToDefault, "utf8")) : require(config26.extends);
72188
- delete config26.extends;
72193
+ defaultConfig = isPath ? JSON.parse(shim2.readFileSync(pathToDefault, "utf8")) : require(config27.extends);
72194
+ delete config27.extends;
72189
72195
  defaultConfig = applyExtends(defaultConfig, shim2.path.dirname(pathToDefault), mergeExtends, shim2);
72190
72196
  }
72191
72197
  previouslyVisitedConfigs = [];
72192
- return mergeExtends ? mergeDeep(defaultConfig, config26) : Object.assign({}, defaultConfig, config26);
72198
+ return mergeExtends ? mergeDeep(defaultConfig, config27) : Object.assign({}, defaultConfig, config27);
72193
72199
  }
72194
72200
  function checkForCircularExtends(cfgPath) {
72195
72201
  if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) {
@@ -72199,17 +72205,17 @@ function checkForCircularExtends(cfgPath) {
72199
72205
  function getPathToDefaultConfig(cwd, pathToExtend) {
72200
72206
  return shim2.path.resolve(cwd, pathToExtend);
72201
72207
  }
72202
- function mergeDeep(config1, config26) {
72208
+ function mergeDeep(config1, config27) {
72203
72209
  const target = {};
72204
72210
  function isObject2(obj) {
72205
72211
  return obj && typeof obj === "object" && !Array.isArray(obj);
72206
72212
  }
72207
72213
  Object.assign(target, config1);
72208
- for (const key of Object.keys(config26)) {
72209
- if (isObject2(config26[key]) && isObject2(target[key])) {
72210
- target[key] = mergeDeep(config1[key], config26[key]);
72214
+ for (const key of Object.keys(config27)) {
72215
+ if (isObject2(config27[key]) && isObject2(target[key])) {
72216
+ target[key] = mergeDeep(config1[key], config27[key]);
72211
72217
  } else {
72212
- target[key] = config26[key];
72218
+ target[key] = config27[key];
72213
72219
  }
72214
72220
  }
72215
72221
  return target;
@@ -72970,9 +72976,9 @@ var YargsInstance = class {
72970
72976
  }
72971
72977
  return maybePromise;
72972
72978
  }
72973
- parserConfiguration(config26) {
72974
- argsert("<object>", [config26], arguments.length);
72975
- __classPrivateFieldSet(this, _YargsInstance_parserConfig, config26, "f");
72979
+ parserConfiguration(config27) {
72980
+ argsert("<object>", [config27], arguments.length);
72981
+ __classPrivateFieldSet(this, _YargsInstance_parserConfig, config27, "f");
72976
72982
  return this;
72977
72983
  }
72978
72984
  pkgConf(key, rootPath) {
@@ -73144,9 +73150,9 @@ var YargsInstance = class {
73144
73150
  return this;
73145
73151
  }
73146
73152
  }
73147
- usageConfiguration(config26) {
73148
- argsert("<object>", [config26], arguments.length);
73149
- __classPrivateFieldSet(this, _YargsInstance_usageConfig, config26, "f");
73153
+ usageConfiguration(config27) {
73154
+ argsert("<object>", [config27], arguments.length);
73155
+ __classPrivateFieldSet(this, _YargsInstance_usageConfig, config27, "f");
73150
73156
  return this;
73151
73157
  }
73152
73158
  version(opt, msg, ver) {
@@ -73552,11 +73558,11 @@ var YargsInstance = class {
73552
73558
  __classPrivateFieldGet(this, _YargsInstance_options, "f").__ = __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.__;
73553
73559
  __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration = this[kGetParserConfiguration]();
73554
73560
  const populateDoubleDash = !!__classPrivateFieldGet(this, _YargsInstance_options, "f").configuration["populate--"];
73555
- const config26 = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration, {
73561
+ const config27 = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration, {
73556
73562
  "populate--": true
73557
73563
  });
73558
73564
  const parsed = __classPrivateFieldGet(this, _YargsInstance_shim, "f").Parser.detailed(args, Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f"), {
73559
- configuration: { "parse-positional-numbers": false, ...config26 }
73565
+ configuration: { "parse-positional-numbers": false, ...config27 }
73560
73566
  }));
73561
73567
  const argv = Object.assign(parsed.argv, __classPrivateFieldGet(this, _YargsInstance_parseContext, "f"));
73562
73568
  let argvPromise = void 0;
@@ -73719,7 +73725,7 @@ var Yargs = YargsFactory(esm_default);
73719
73725
  var yargs_default = Yargs;
73720
73726
 
73721
73727
  // package.json
73722
- var version = "0.0.0-6d15863ec";
73728
+ var version = "0.0.0-6d2931922";
73723
73729
 
73724
73730
  // src/metrics.ts
73725
73731
  var import_node_async_hooks = require("node:async_hooks");
@@ -73763,12 +73769,12 @@ function getGlobalWranglerConfigPath() {
73763
73769
  }
73764
73770
 
73765
73771
  // src/helpers/metrics-config.ts
73766
- function writeMetricsConfig(config26) {
73772
+ function writeMetricsConfig(config27) {
73767
73773
  (0, import_node_fs2.mkdirSync)(import_node_path2.default.dirname(getMetricsConfigPath()), { recursive: true });
73768
73774
  (0, import_node_fs2.writeFileSync)(
73769
73775
  getMetricsConfigPath(),
73770
73776
  JSON.stringify(
73771
- config26,
73777
+ config27,
73772
73778
  (_key, value) => value instanceof Date ? value.toISOString() : value,
73773
73779
  " "
73774
73780
  )
@@ -73776,9 +73782,9 @@ function writeMetricsConfig(config26) {
73776
73782
  }
73777
73783
  function readMetricsConfig() {
73778
73784
  try {
73779
- const config26 = (0, import_node_fs2.readFileSync)(getMetricsConfigPath(), "utf8");
73785
+ const config27 = (0, import_node_fs2.readFileSync)(getMetricsConfigPath(), "utf8");
73780
73786
  return JSON.parse(
73781
- config26,
73787
+ config27,
73782
73788
  (key, value) => key === "date" ? new Date(value) : value
73783
73789
  );
73784
73790
  } catch {
@@ -73788,10 +73794,10 @@ function readMetricsConfig() {
73788
73794
  function getMetricsConfigPath() {
73789
73795
  return import_node_path2.default.resolve(getGlobalWranglerConfigPath(), "metrics.json");
73790
73796
  }
73791
- function getDeviceId(config26) {
73792
- const deviceId = config26.deviceId ?? (0, import_node_crypto.randomUUID)();
73793
- if (config26.deviceId === void 0) {
73794
- writeMetricsConfig({ ...config26, deviceId });
73797
+ function getDeviceId(config27) {
73798
+ const deviceId = config27.deviceId ?? (0, import_node_crypto.randomUUID)();
73799
+ if (config27.deviceId === void 0) {
73800
+ writeMetricsConfig({ ...config27, deviceId });
73795
73801
  }
73796
73802
  return deviceId;
73797
73803
  }
@@ -73811,6 +73817,13 @@ var runCommand = async (command2, opts = {}) => {
73811
73817
  doneText: opts.doneText,
73812
73818
  promise() {
73813
73819
  const [executable, ...args] = command2;
73820
+ if (args[0] === "wrangler") {
73821
+ const metrics = readMetricsConfig();
73822
+ if (metrics.c3permission?.enabled === false) {
73823
+ opts.env ??= {};
73824
+ opts.env["WRANGLER_SEND_METRICS"] = "false";
73825
+ }
73826
+ }
73814
73827
  const abortController = new AbortController();
73815
73828
  const cmd = (0, import_cross_spawn.spawn)(executable, [...args], {
73816
73829
  // TODO: ideally inherit stderr, but npm install uses this for warnings
@@ -73969,7 +73982,7 @@ var detectPackageManager = () => {
73969
73982
  }
73970
73983
  };
73971
73984
  var rectifyPmMismatch = async (ctx) => {
73972
- const { npm: npm22 } = detectPackageManager();
73985
+ const { npm: npm23 } = detectPackageManager();
73973
73986
  if (!detectPmMismatch(ctx)) {
73974
73987
  return;
73975
73988
  }
@@ -73981,17 +73994,17 @@ var rectifyPmMismatch = async (ctx) => {
73981
73994
  if ((0, import_fs5.existsSync)(lockfilePath)) {
73982
73995
  (0, import_fs5.rmSync)(lockfilePath);
73983
73996
  }
73984
- await runCommand([npm22, "install"], {
73997
+ await runCommand([npm23, "install"], {
73985
73998
  silent: true,
73986
73999
  cwd: ctx.project.path,
73987
74000
  startText: "Installing dependencies",
73988
- doneText: `${brandColor("installed")} ${dim(`via \`${npm22} install\``)}`
74001
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm23} install\``)}`
73989
74002
  });
73990
74003
  };
73991
74004
  var detectPmMismatch = (ctx) => {
73992
- const { npm: npm22 } = detectPackageManager();
74005
+ const { npm: npm23 } = detectPackageManager();
73993
74006
  const projectPath = ctx.project.path;
73994
- switch (npm22) {
74007
+ switch (npm23) {
73995
74008
  case "npm":
73996
74009
  return false;
73997
74010
  case "yarn":
@@ -73999,7 +74012,7 @@ var detectPmMismatch = (ctx) => {
73999
74012
  case "pnpm":
74000
74013
  return !(0, import_fs5.existsSync)(import_path5.default.join(projectPath, "pnpm-lock.yaml"));
74001
74014
  case "bun":
74002
- return !(0, import_fs5.existsSync)(import_path5.default.join(projectPath, "bun.lockb"));
74015
+ return !(0, import_fs5.existsSync)(import_path5.default.join(projectPath, "bun.lockb")) && !(0, import_fs5.existsSync)(import_path5.default.join(projectPath, "bun.lock"));
74003
74016
  }
74004
74017
  };
74005
74018
 
@@ -74059,10 +74072,10 @@ function getPlatform() {
74059
74072
  function createReporter() {
74060
74073
  const events = [];
74061
74074
  const als = new import_node_async_hooks.AsyncLocalStorage();
74062
- const config26 = readMetricsConfig() ?? {};
74063
- const isFirstUsage = config26.c3permission === void 0;
74075
+ const config27 = readMetricsConfig() ?? {};
74076
+ const isFirstUsage = config27.c3permission === void 0;
74064
74077
  const isEnabled = isTelemetryEnabled();
74065
- const deviceId = getDeviceId(config26);
74078
+ const deviceId = getDeviceId(config27);
74066
74079
  const packageManager = detectPackageManager();
74067
74080
  const platform3 = getPlatform();
74068
74081
  const amplitude_session_id = Date.now();
@@ -74095,7 +74108,7 @@ function createReporter() {
74095
74108
  if (process.env.CREATE_CLOUDFLARE_TELEMETRY_DISABLED === "1") {
74096
74109
  return false;
74097
74110
  }
74098
- return hasSparrowSourceKey() && getC3Permission(config26).enabled;
74111
+ return hasSparrowSourceKey() && getC3Permission(config27).enabled;
74099
74112
  }
74100
74113
  async function waitForAllEventsSettled() {
74101
74114
  await Promise.allSettled(events);
@@ -74201,20 +74214,20 @@ function initializeC3Permission(enabled = true) {
74201
74214
  date: /* @__PURE__ */ new Date()
74202
74215
  };
74203
74216
  }
74204
- function getC3Permission(config26 = readMetricsConfig() ?? {}) {
74205
- if (!config26.c3permission) {
74206
- config26.c3permission = initializeC3Permission();
74207
- writeMetricsConfig(config26);
74217
+ function getC3Permission(config27 = readMetricsConfig() ?? {}) {
74218
+ if (!config27.c3permission) {
74219
+ config27.c3permission = initializeC3Permission();
74220
+ writeMetricsConfig(config27);
74208
74221
  }
74209
- return config26.c3permission;
74222
+ return config27.c3permission;
74210
74223
  }
74211
74224
  function updateC3Pemission(enabled) {
74212
- const config26 = readMetricsConfig();
74213
- if (config26.c3permission?.enabled === enabled) {
74225
+ const config27 = readMetricsConfig();
74226
+ if (config27.c3permission?.enabled === enabled) {
74214
74227
  return;
74215
74228
  }
74216
- config26.c3permission = initializeC3Permission(enabled);
74217
- writeMetricsConfig(config26);
74229
+ config27.c3permission = initializeC3Permission(enabled);
74230
+ writeMetricsConfig(config27);
74218
74231
  }
74219
74232
  var runTelemetryCommand = (action) => {
74220
74233
  const logTelemetryStatus = (enabled) => {
@@ -74259,28 +74272,28 @@ var import_haikunator = __toESM(require_dist_web());
74259
74272
  var import_fs6 = require("fs");
74260
74273
  var import_path6 = __toESM(require("path"));
74261
74274
  var import_undici2 = __toESM(require_undici());
74262
- var installPackages = async (packages, config26 = {}) => {
74263
- const { npm: npm22 } = detectPackageManager();
74275
+ var installPackages = async (packages, config27 = {}) => {
74276
+ const { npm: npm23 } = detectPackageManager();
74264
74277
  let saveFlag;
74265
74278
  let cmd;
74266
- switch (npm22) {
74279
+ switch (npm23) {
74267
74280
  case "yarn":
74268
74281
  cmd = "add";
74269
- saveFlag = config26.dev ? "-D" : "";
74282
+ saveFlag = config27.dev ? "-D" : "";
74270
74283
  break;
74271
74284
  case "bun":
74272
74285
  cmd = "add";
74273
- saveFlag = config26.dev ? "-d" : "";
74286
+ saveFlag = config27.dev ? "-d" : "";
74274
74287
  break;
74275
74288
  case "npm":
74276
74289
  case "pnpm":
74277
74290
  default:
74278
74291
  cmd = "install";
74279
- saveFlag = config26.dev ? "--save-dev" : "";
74292
+ saveFlag = config27.dev ? "--save-dev" : "";
74280
74293
  break;
74281
74294
  }
74282
- await runCommand([npm22, cmd, ...saveFlag ? [saveFlag] : [], ...packages], {
74283
- ...config26,
74295
+ await runCommand([npm23, cmd, ...saveFlag ? [saveFlag] : [], ...packages], {
74296
+ ...config27,
74284
74297
  silent: true
74285
74298
  });
74286
74299
  };
@@ -74289,11 +74302,11 @@ var npmInstall = async (ctx) => {
74289
74302
  if ((0, import_fs6.existsSync)(nodeModulesPath)) {
74290
74303
  return;
74291
74304
  }
74292
- const { npm: npm22 } = detectPackageManager();
74293
- await runCommand([npm22, "install"], {
74305
+ const { npm: npm23 } = detectPackageManager();
74306
+ await runCommand([npm23, "install"], {
74294
74307
  silent: true,
74295
74308
  startText: "Installing dependencies",
74296
- doneText: `${brandColor("installed")} ${dim(`via \`${npm22} install\``)}`
74309
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm23} install\``)}`
74297
74310
  });
74298
74311
  };
74299
74312
  async function getLatestPackageVersion(packageSpecifier) {
@@ -74302,7 +74315,7 @@ async function getLatestPackageVersion(packageSpecifier) {
74302
74315
  return npmInfo["dist-tags"].latest;
74303
74316
  }
74304
74317
  var installWrangler = async () => {
74305
- const { npm: npm22 } = detectPackageManager();
74318
+ const { npm: npm23 } = detectPackageManager();
74306
74319
  if ((0, import_fs6.existsSync)(import_path6.default.resolve("node_modules", "wrangler"))) {
74307
74320
  return;
74308
74321
  }
@@ -74312,7 +74325,7 @@ var installWrangler = async () => {
74312
74325
  "A command line tool for building Cloudflare Workers"
74313
74326
  )}`,
74314
74327
  doneText: `${brandColor("installed")} ${dim(
74315
- `via \`${npm22} install wrangler --save-dev\``
74328
+ `via \`${npm23} install wrangler --save-dev\``
74316
74329
  )}`
74317
74330
  });
74318
74331
  };
@@ -74476,18 +74489,18 @@ var package_default = {
74476
74489
  dependencies: {
74477
74490
  "create-astro": "4.10.0",
74478
74491
  "create-analog": "1.8.1",
74479
- "@angular/create": "18.2.11",
74480
- "create-docusaurus": "3.6.1",
74492
+ "@angular/create": "19.0.0",
74493
+ "create-docusaurus": "3.6.3",
74481
74494
  "create-hono": "0.14.2",
74482
74495
  "create-next-app": "14.2.5",
74483
- "create-qwik": "1.9.1",
74484
- "create-vite": "5.5.5",
74485
- "create-remix": "2.14.0",
74486
- "create-solid": "0.5.13",
74496
+ "create-qwik": "1.11.0",
74497
+ "create-vite": "6.0.1",
74498
+ "create-remix": "2.15.0",
74499
+ "create-solid": "0.5.14",
74487
74500
  "create-vue": "3.12.1",
74488
74501
  gatsby: "5.14.0",
74489
- nuxi: "3.15.0",
74490
- sv: "0.6.1"
74502
+ sv: "0.6.2",
74503
+ nuxi: "3.16.0"
74491
74504
  }
74492
74505
  };
74493
74506
 
@@ -74502,9 +74515,9 @@ var getFrameworkCli = (ctx, withVersion = true) => {
74502
74515
  };
74503
74516
  var runFrameworkGenerator = async (ctx, args) => {
74504
74517
  const cli = getFrameworkCli(ctx, true);
74505
- const { npm: npm22, dlx } = detectPackageManager();
74506
- const cmd = [...npm22 === "yarn" ? ["npx"] : dlx, cli, ...args];
74507
- const env3 = npm22 === "yarn" ? { npm_config_user_agent: "yarn" } : {};
74518
+ const { npm: npm23, dlx } = detectPackageManager();
74519
+ const cmd = [...npm23 === "yarn" ? ["npx"] : dlx, cli, ...args];
74520
+ const env3 = npm23 === "yarn" ? { npm_config_user_agent: "yarn" } : {};
74508
74521
  if (ctx.args.additionalArgs?.length) {
74509
74522
  cmd.push(...ctx.args.additionalArgs);
74510
74523
  }
@@ -74520,7 +74533,11 @@ var runFrameworkGenerator = async (ctx, args) => {
74520
74533
  // templates-experimental/angular/c3.ts
74521
74534
  var { npm } = detectPackageManager();
74522
74535
  var generate = async (ctx) => {
74523
- await runFrameworkGenerator(ctx, [ctx.project.name, "--ssr"]);
74536
+ await runFrameworkGenerator(ctx, [
74537
+ ctx.project.name,
74538
+ "--ssr",
74539
+ "--server-routing"
74540
+ ]);
74524
74541
  logRaw("");
74525
74542
  };
74526
74543
  var configure = async (ctx) => {
@@ -74529,9 +74546,9 @@ var configure = async (ctx) => {
74529
74546
  await installCFWorker();
74530
74547
  };
74531
74548
  async function installCFWorker() {
74532
- await installPackages(["@cloudflare/workers-types", "wrangler"], {
74549
+ await installPackages(["xhr2"], {
74533
74550
  dev: true,
74534
- startText: "Installing adapter dependencies",
74551
+ startText: "Installing additional dependencies",
74535
74552
  doneText: `${brandColor("installed")} ${dim(`via \`${npm} install\``)}`
74536
74553
  });
74537
74554
  }
@@ -74546,10 +74563,17 @@ async function updateAppCode() {
74546
74563
  );
74547
74564
  writeFile2((0, import_node_path3.resolve)(appConfigPath), newAppConfig);
74548
74565
  s.stop(`${brandColor(`updated`)} ${dim(appConfigPath)}`);
74566
+ const appServerRoutesPath = "src/app/app.routes.server.ts";
74567
+ const appRoutes = readFile((0, import_node_path3.resolve)(appServerRoutesPath));
74568
+ const newAppRoutes = appRoutes.replace(
74569
+ "RenderMode.Prerender",
74570
+ "RenderMode.Server"
74571
+ );
74572
+ writeFile2((0, import_node_path3.resolve)(appServerRoutesPath), newAppRoutes);
74573
+ s.stop(`${brandColor(`updated`)} ${dim(appServerRoutesPath)}`);
74549
74574
  s.start(`Updating package.json`);
74550
74575
  const packageJsonPath = (0, import_node_path3.resolve)("package.json");
74551
74576
  const packageManifest = readJSON(packageJsonPath);
74552
- delete packageManifest["dependencies"]["@angular/ssr"];
74553
74577
  delete packageManifest["dependencies"]["express"];
74554
74578
  delete packageManifest["devDependencies"]["@types/express"];
74555
74579
  writeFile2(packageJsonPath, JSON.stringify(packageManifest, null, 2));
@@ -74561,7 +74585,8 @@ function updateAngularJson(ctx) {
74561
74585
  const angularJson = readJSON((0, import_node_path3.resolve)("angular.json"));
74562
74586
  const architectSection = angularJson.projects[ctx.project.name].architect;
74563
74587
  architectSection.build.options.outputPath = "dist";
74564
- architectSection.build.options.assets.push("src/_routes.json");
74588
+ architectSection.build.options.outputMode = "server";
74589
+ architectSection.build.options.ssr.experimentalPlatform = "neutral";
74565
74590
  writeFile2((0, import_node_path3.resolve)("angular.json"), JSON.stringify(angularJson, null, 2));
74566
74591
  s.stop(`${brandColor(`updated`)} ${dim(`\`angular.json\``)}`);
74567
74592
  }
@@ -74577,13 +74602,13 @@ var config = {
74577
74602
  path: "templates-experimental/angular",
74578
74603
  devScript: "start",
74579
74604
  deployScript: "deploy",
74605
+ previewScript: "start",
74580
74606
  generate,
74581
74607
  configure,
74582
74608
  transformPackageJson: async () => ({
74583
74609
  scripts: {
74584
74610
  start: `${npm} run build && wrangler dev`,
74585
- build: `ng build && ${npm} run process`,
74586
- process: "node ./tools/alter-polyfills.mjs",
74611
+ build: `ng build`,
74587
74612
  deploy: `${npm} run build && wrangler deploy`
74588
74613
  }
74589
74614
  })
@@ -75063,7 +75088,7 @@ var updateNuxtConfig = () => {
75063
75088
  b2.objectExpression([
75064
75089
  b2.objectProperty(
75065
75090
  b2.identifier("preset"),
75066
- b2.stringLiteral("./cloudflare-preset")
75091
+ b2.stringLiteral("cloudflare_module")
75067
75092
  )
75068
75093
  ])
75069
75094
  );
@@ -75279,6 +75304,7 @@ var configure7 = async (ctx) => {
75279
75304
  });
75280
75305
  usesTypescript(ctx);
75281
75306
  const filePath = `app.config.${usesTypescript(ctx) ? "ts" : "js"}`;
75307
+ const compatDate = await getWorkerdCompatibilityDate();
75282
75308
  updateStatus(`Updating configuration in ${blue(filePath)}`);
75283
75309
  transformFile(filePath, {
75284
75310
  visitCallExpression: function(n2) {
@@ -75293,60 +75319,14 @@ var configure7 = async (ctx) => {
75293
75319
  b2.objectProperty(
75294
75320
  b2.identifier("server"),
75295
75321
  b2.objectExpression([
75296
- // preset: "cloudflare-pages"
75322
+ // preset: "cloudflare_module"
75297
75323
  b2.objectProperty(
75298
75324
  b2.identifier("preset"),
75299
- b2.stringLiteral("cloudflare-pages")
75300
- ),
75301
- // output: {
75302
- // dir: "{{ rootDir }}/dist",
75303
- // publicDir: "{{ output.dir }}/public",
75304
- // serverDir: "{{ output.dir }}/worker",
75305
- // },
75306
- b2.objectProperty(
75307
- b2.identifier("output"),
75308
- b2.objectExpression([
75309
- b2.objectProperty(
75310
- b2.identifier("dir"),
75311
- b2.stringLiteral("{{ rootDir }}/dist")
75312
- ),
75313
- b2.objectProperty(
75314
- b2.identifier("publicDir"),
75315
- b2.stringLiteral("{{ output.dir }}/public")
75316
- ),
75317
- b2.objectProperty(
75318
- b2.identifier("serverDir"),
75319
- b2.stringLiteral("{{ output.dir }}/worker")
75320
- )
75321
- ])
75322
- ),
75323
- // rollupConfig: {
75324
- // external: ["node:async_hooks"],
75325
- // },
75326
- b2.objectProperty(
75327
- b2.identifier("rollupConfig"),
75328
- b2.objectExpression([
75329
- b2.objectProperty(
75330
- b2.identifier("external"),
75331
- b2.arrayExpression([b2.stringLiteral("node:async_hooks")])
75332
- )
75333
- ])
75325
+ b2.stringLiteral("cloudflare_module")
75334
75326
  ),
75335
- // hooks: {
75336
- // // Prevent the Pages preset from writing the _routes.json etc.
75337
- // compiled() {},
75338
- // },
75339
75327
  b2.objectProperty(
75340
- b2.identifier("hooks"),
75341
- b2.objectExpression([
75342
- b2.objectMethod(
75343
- "method",
75344
- b2.identifier("compiled"),
75345
- [],
75346
- b2.blockStatement([]),
75347
- false
75348
- )
75349
- ])
75328
+ b2.identifier("compatibilityDate"),
75329
+ b2.stringLiteral(compatDate)
75350
75330
  )
75351
75331
  ])
75352
75332
  )
@@ -75455,10 +75435,7 @@ var config12 = {
75455
75435
  displayName: "SvelteKit",
75456
75436
  platform: "workers",
75457
75437
  copyFiles: {
75458
- variants: {
75459
- js: { path: "./js" },
75460
- ts: { path: "./ts" }
75461
- }
75438
+ path: "./templates"
75462
75439
  },
75463
75440
  path: "templates-experimental/svelte",
75464
75441
  generate: generate11,
@@ -75483,10 +75460,38 @@ var config12 = {
75483
75460
  };
75484
75461
  var c3_default14 = config12;
75485
75462
 
75463
+ // templates-experimental/vue/c3.ts
75464
+ var { npm: npm9 } = detectPackageManager();
75465
+ var generate12 = async (ctx) => {
75466
+ await runFrameworkGenerator(ctx, [ctx.project.name]);
75467
+ };
75468
+ var config13 = {
75469
+ configVersion: 1,
75470
+ id: "vue",
75471
+ frameworkCli: "create-vue",
75472
+ platform: "workers",
75473
+ displayName: "Vue",
75474
+ copyFiles: {
75475
+ path: "./templates"
75476
+ },
75477
+ path: "templates-experimental/vue",
75478
+ generate: generate12,
75479
+ transformPackageJson: async () => ({
75480
+ scripts: {
75481
+ deploy: `${npm9} run build && wrangler deploy`,
75482
+ preview: `${npm9} run build && wrangler dev`
75483
+ }
75484
+ }),
75485
+ devScript: "dev",
75486
+ deployScript: "deploy",
75487
+ previewScript: "preview"
75488
+ };
75489
+ var c3_default15 = config13;
75490
+
75486
75491
  // templates/analog/c3.ts
75487
75492
  var recast7 = __toESM(require_main3());
75488
- var { npm: npm9, name: pm2 } = detectPackageManager();
75489
- var generate12 = async (ctx) => {
75493
+ var { npm: npm10, name: pm2 } = detectPackageManager();
75494
+ var generate13 = async (ctx) => {
75490
75495
  await runFrameworkGenerator(ctx, [
75491
75496
  ctx.project.name,
75492
75497
  "--template",
@@ -75504,7 +75509,7 @@ var configure9 = async (ctx) => {
75504
75509
  await installPackages(packages, {
75505
75510
  dev: true,
75506
75511
  startText: `Installing ${packages.join(", ")}`,
75507
- doneText: `${brandColor("installed")} ${dim(`via \`${npm9} install\``)}`
75512
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm10} install\``)}`
75508
75513
  });
75509
75514
  }
75510
75515
  updateViteConfig(ctx);
@@ -75562,7 +75567,7 @@ var updateViteConfig = (ctx) => {
75562
75567
  });
75563
75568
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
75564
75569
  };
75565
- var config13 = {
75570
+ var config14 = {
75566
75571
  configVersion: 1,
75567
75572
  id: "analog",
75568
75573
  frameworkCli: "create-analog",
@@ -75571,12 +75576,12 @@ var config13 = {
75571
75576
  copyFiles: {
75572
75577
  path: "./templates"
75573
75578
  },
75574
- generate: generate12,
75579
+ generate: generate13,
75575
75580
  configure: configure9,
75576
75581
  transformPackageJson: async () => ({
75577
75582
  scripts: {
75578
- preview: `${npm9} run build && wrangler pages dev`,
75579
- deploy: `${npm9} run build && wrangler pages deploy`,
75583
+ preview: `${npm10} run build && wrangler pages dev`,
75584
+ deploy: `${npm10} run build && wrangler pages deploy`,
75580
75585
  "cf-typegen": `wrangler types`
75581
75586
  }
75582
75587
  }),
@@ -75584,13 +75589,17 @@ var config13 = {
75584
75589
  deployScript: "deploy",
75585
75590
  previewScript: "preview"
75586
75591
  };
75587
- var c3_default15 = config13;
75592
+ var c3_default16 = config14;
75588
75593
 
75589
75594
  // templates/angular/c3.ts
75590
75595
  var import_node_path4 = require("node:path");
75591
- var { npm: npm10 } = detectPackageManager();
75592
- var generate13 = async (ctx) => {
75593
- await runFrameworkGenerator(ctx, [ctx.project.name, "--ssr"]);
75596
+ var { npm: npm11 } = detectPackageManager();
75597
+ var generate14 = async (ctx) => {
75598
+ await runFrameworkGenerator(ctx, [
75599
+ ctx.project.name,
75600
+ "--ssr",
75601
+ "--server-routing"
75602
+ ]);
75594
75603
  logRaw("");
75595
75604
  };
75596
75605
  var configure10 = async (ctx) => {
@@ -75599,14 +75608,11 @@ var configure10 = async (ctx) => {
75599
75608
  await installCFWorker2();
75600
75609
  };
75601
75610
  async function installCFWorker2() {
75602
- await installPackages(
75603
- ["@cloudflare/workers-types", "@miniflare/tre@next", "wrangler@beta"],
75604
- {
75605
- dev: true,
75606
- startText: "Installing adapter dependencies",
75607
- doneText: `${brandColor("installed")} ${dim(`via \`${npm10} install\``)}`
75608
- }
75609
- );
75611
+ await installPackages(["xhr2"], {
75612
+ dev: true,
75613
+ startText: "Installing additional dependencies",
75614
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm11} install\``)}`
75615
+ });
75610
75616
  }
75611
75617
  async function updateAppCode2() {
75612
75618
  const s = spinner();
@@ -75619,10 +75625,17 @@ async function updateAppCode2() {
75619
75625
  );
75620
75626
  writeFile2((0, import_node_path4.resolve)(appConfigPath), newAppConfig);
75621
75627
  s.stop(`${brandColor(`updated`)} ${dim(appConfigPath)}`);
75628
+ const appServerRoutesPath = "src/app/app.routes.server.ts";
75629
+ const appRoutes = readFile((0, import_node_path4.resolve)(appServerRoutesPath));
75630
+ const newAppRoutes = appRoutes.replace(
75631
+ "RenderMode.Prerender",
75632
+ "RenderMode.Server"
75633
+ );
75634
+ writeFile2((0, import_node_path4.resolve)(appServerRoutesPath), newAppRoutes);
75635
+ s.stop(`${brandColor(`updated`)} ${dim(appServerRoutesPath)}`);
75622
75636
  s.start(`Updating package.json`);
75623
75637
  const packageJsonPath = (0, import_node_path4.resolve)("package.json");
75624
75638
  const packageManifest = readJSON(packageJsonPath);
75625
- delete packageManifest["dependencies"]["@angular/ssr"];
75626
75639
  delete packageManifest["dependencies"]["express"];
75627
75640
  delete packageManifest["devDependencies"]["@types/express"];
75628
75641
  writeFile2(packageJsonPath, JSON.stringify(packageManifest, null, 2));
@@ -75634,11 +75647,13 @@ function updateAngularJson2(ctx) {
75634
75647
  const angularJson = readJSON((0, import_node_path4.resolve)("angular.json"));
75635
75648
  const architectSection = angularJson.projects[ctx.project.name].architect;
75636
75649
  architectSection.build.options.outputPath = "dist";
75650
+ architectSection.build.options.outputMode = "server";
75651
+ architectSection.build.options.ssr.experimentalPlatform = "neutral";
75637
75652
  architectSection.build.options.assets.push("src/_routes.json");
75638
75653
  writeFile2((0, import_node_path4.resolve)("angular.json"), JSON.stringify(angularJson, null, 2));
75639
75654
  s.stop(`${brandColor(`updated`)} ${dim(`\`angular.json\``)}`);
75640
75655
  }
75641
- var config14 = {
75656
+ var config15 = {
75642
75657
  configVersion: 1,
75643
75658
  id: "angular",
75644
75659
  frameworkCli: "@angular/create",
@@ -75649,23 +75664,24 @@ var config14 = {
75649
75664
  },
75650
75665
  devScript: "start",
75651
75666
  deployScript: "deploy",
75652
- generate: generate13,
75667
+ previewScript: "start",
75668
+ generate: generate14,
75653
75669
  configure: configure10,
75654
75670
  transformPackageJson: async () => ({
75655
75671
  scripts: {
75656
- start: `${npm10} run build && wrangler pages dev dist/cloudflare ${await compatDateFlag()} --experimental-local`,
75657
- build: `ng build && ${npm10} run process`,
75658
- process: "node ./tools/copy-files.mjs && node ./tools/alter-polyfills.mjs",
75659
- deploy: `${npm10} run build && wrangler pages deploy dist/cloudflare`
75672
+ start: `${npm11} run build && wrangler pages dev dist/cloudflare ${await compatDateFlag()}`,
75673
+ build: `ng build && ${npm11} run process`,
75674
+ process: "node ./tools/copy-files.mjs",
75675
+ deploy: `${npm11} run build && wrangler pages deploy dist/cloudflare`
75660
75676
  }
75661
75677
  })
75662
75678
  };
75663
- var c3_default16 = config14;
75679
+ var c3_default17 = config15;
75664
75680
 
75665
75681
  // templates/astro/c3.ts
75666
75682
  var recast8 = __toESM(require_main3());
75667
75683
  var { npx: npx3 } = detectPackageManager();
75668
- var generate14 = async (ctx) => {
75684
+ var generate15 = async (ctx) => {
75669
75685
  await runFrameworkGenerator(ctx, [ctx.project.name, "--no-install"]);
75670
75686
  logRaw("");
75671
75687
  };
@@ -75724,7 +75740,7 @@ var updateEnvDeclaration2 = (ctx) => {
75724
75740
  }
75725
75741
  });
75726
75742
  };
75727
- var config15 = {
75743
+ var config16 = {
75728
75744
  configVersion: 1,
75729
75745
  id: "astro",
75730
75746
  frameworkCli: "create-astro",
@@ -75736,7 +75752,7 @@ var config15 = {
75736
75752
  devScript: "dev",
75737
75753
  deployScript: "deploy",
75738
75754
  previewScript: "preview",
75739
- generate: generate14,
75755
+ generate: generate15,
75740
75756
  configure: configure11,
75741
75757
  transformPackageJson: async (pkgJson, ctx) => ({
75742
75758
  scripts: {
@@ -75746,10 +75762,10 @@ var config15 = {
75746
75762
  }
75747
75763
  })
75748
75764
  };
75749
- var c3_default17 = config15;
75765
+ var c3_default18 = config16;
75750
75766
 
75751
75767
  // templates/common/c3.ts
75752
- var c3_default18 = {
75768
+ var c3_default19 = {
75753
75769
  configVersion: 1,
75754
75770
  id: "common",
75755
75771
  displayName: "Example router & proxy Worker",
@@ -75769,31 +75785,31 @@ var c3_default18 = {
75769
75785
  };
75770
75786
 
75771
75787
  // templates/docusaurus/c3.ts
75772
- var { npm: npm11 } = detectPackageManager();
75773
- var generate15 = async (ctx) => {
75788
+ var { npm: npm12 } = detectPackageManager();
75789
+ var generate16 = async (ctx) => {
75774
75790
  await runFrameworkGenerator(ctx, [ctx.project.name, "classic"]);
75775
75791
  };
75776
- var config16 = {
75792
+ var config17 = {
75777
75793
  configVersion: 1,
75778
75794
  id: "docusaurus",
75779
75795
  frameworkCli: "create-docusaurus",
75780
75796
  platform: "pages",
75781
75797
  displayName: "Docusaurus",
75782
- generate: generate15,
75798
+ generate: generate16,
75783
75799
  transformPackageJson: async () => ({
75784
75800
  scripts: {
75785
- preview: `${npm11} run build && wrangler pages dev ./build`,
75786
- deploy: `${npm11} run build && wrangler pages deploy ./build`
75801
+ preview: `${npm12} run build && wrangler pages dev ./build`,
75802
+ deploy: `${npm12} run build && wrangler pages deploy ./build`
75787
75803
  }
75788
75804
  }),
75789
75805
  devScript: "preview",
75790
75806
  deployScript: "deploy"
75791
75807
  };
75792
- var c3_default19 = config16;
75808
+ var c3_default20 = config17;
75793
75809
 
75794
75810
  // templates/gatsby/c3.ts
75795
- var { npm: npm12 } = detectPackageManager();
75796
- var generate16 = async (ctx) => {
75811
+ var { npm: npm13 } = detectPackageManager();
75812
+ var generate17 = async (ctx) => {
75797
75813
  const defaultTemplate = "https://github.com/gatsbyjs/gatsby-starter-blog";
75798
75814
  const useTemplate = await inputPrompt({
75799
75815
  type: "confirm",
@@ -75812,27 +75828,27 @@ var generate16 = async (ctx) => {
75812
75828
  }
75813
75829
  await runFrameworkGenerator(ctx, ["new", ctx.project.name, templateUrl]);
75814
75830
  };
75815
- var config17 = {
75831
+ var config18 = {
75816
75832
  configVersion: 1,
75817
75833
  id: "gatsby",
75818
75834
  frameworkCli: "gatsby",
75819
75835
  platform: "pages",
75820
75836
  displayName: "Gatsby",
75821
- generate: generate16,
75837
+ generate: generate17,
75822
75838
  transformPackageJson: async () => ({
75823
75839
  scripts: {
75824
- deploy: `${npm12} run build && wrangler pages deploy ./public`,
75825
- preview: `${npm12} run build && wrangler pages dev ./public`
75840
+ deploy: `${npm13} run build && wrangler pages deploy ./public`,
75841
+ preview: `${npm13} run build && wrangler pages dev ./public`
75826
75842
  }
75827
75843
  }),
75828
75844
  devScript: "develop",
75829
75845
  deployScript: "deploy",
75830
75846
  previewScript: "preview"
75831
75847
  };
75832
- var c3_default20 = config17;
75848
+ var c3_default21 = config18;
75833
75849
 
75834
75850
  // templates/hello-world-durable-object/c3.ts
75835
- var c3_default21 = {
75851
+ var c3_default22 = {
75836
75852
  configVersion: 1,
75837
75853
  id: "hello-world-durable-object",
75838
75854
  displayName: "Hello World Worker Using Durable Objects",
@@ -75851,7 +75867,7 @@ var c3_default21 = {
75851
75867
  };
75852
75868
 
75853
75869
  // templates/hello-world/c3.ts
75854
- var c3_default22 = {
75870
+ var c3_default23 = {
75855
75871
  configVersion: 1,
75856
75872
  id: "hello-world",
75857
75873
  displayName: "Hello World Worker",
@@ -75873,7 +75889,7 @@ var c3_default22 = {
75873
75889
  };
75874
75890
 
75875
75891
  // templates/hono/c3.ts
75876
- var generate17 = async (ctx) => {
75892
+ var generate18 = async (ctx) => {
75877
75893
  const { name: pm4 } = detectPackageManager();
75878
75894
  await runFrameworkGenerator(ctx, [
75879
75895
  ctx.project.name,
@@ -75900,7 +75916,7 @@ var configure12 = async (ctx) => {
75900
75916
  });
75901
75917
  s.stop(`${brandColor("updated")} \`${dim(indexFile)}\``);
75902
75918
  };
75903
- var config18 = {
75919
+ var config19 = {
75904
75920
  configVersion: 1,
75905
75921
  id: "hono",
75906
75922
  frameworkCli: "create-hono",
@@ -75909,7 +75925,7 @@ var config18 = {
75909
75925
  path: "./templates"
75910
75926
  },
75911
75927
  platform: "workers",
75912
- generate: generate17,
75928
+ generate: generate18,
75913
75929
  configure: configure12,
75914
75930
  transformPackageJson: async () => ({
75915
75931
  scripts: {
@@ -75921,12 +75937,12 @@ var config18 = {
75921
75937
  devScript: "dev",
75922
75938
  deployScript: "deploy"
75923
75939
  };
75924
- var c3_default23 = config18;
75940
+ var c3_default24 = config19;
75925
75941
 
75926
75942
  // templates/next/c3.ts
75927
75943
  var import_path10 = require("path");
75928
- var { npm: npm13, npx: npx4 } = detectPackageManager();
75929
- var generate18 = async (ctx) => {
75944
+ var { npm: npm14, npx: npx4 } = detectPackageManager();
75945
+ var generate19 = async (ctx) => {
75930
75946
  const projectName = ctx.project.name;
75931
75947
  await runFrameworkGenerator(ctx, [projectName]);
75932
75948
  const wranglerToml = readFile((0, import_path10.join)(getTemplatePath(ctx), "wrangler.toml"));
@@ -76034,13 +76050,13 @@ var addDevDependencies = async (installEslintPlugin) => {
76034
76050
  doneText: `${brandColor(`installed`)} ${dim(packages.join(", "))}`
76035
76051
  });
76036
76052
  };
76037
- var c3_default24 = {
76053
+ var c3_default25 = {
76038
76054
  configVersion: 1,
76039
76055
  id: "next",
76040
76056
  frameworkCli: "create-next-app",
76041
76057
  platform: "pages",
76042
76058
  displayName: "Next",
76043
- generate: generate18,
76059
+ generate: generate19,
76044
76060
  configure: configure13,
76045
76061
  copyFiles: {
76046
76062
  async selectVariant(ctx) {
@@ -76072,12 +76088,12 @@ var c3_default24 = {
76072
76088
  }
76073
76089
  },
76074
76090
  transformPackageJson: async (_3, ctx) => {
76075
- const isNpm = npm13 === "npm";
76076
- const isBun = npm13 === "bun";
76091
+ const isNpm = npm14 === "npm";
76092
+ const isBun = npm14 === "bun";
76077
76093
  const isNpmOrBun = isNpm || isBun;
76078
76094
  const nextOnPagesScope = isNpmOrBun ? "@cloudflare/" : "";
76079
76095
  const nextOnPagesCommand = `${nextOnPagesScope}next-on-pages`;
76080
- const pmCommand = isNpmOrBun ? npx4 : npm13;
76096
+ const pmCommand = isNpmOrBun ? npx4 : npm14;
76081
76097
  const pagesBuildRunCommand = `${isNpm ? "npm run" : isBun ? "bun" : pmCommand} pages:build`;
76082
76098
  return {
76083
76099
  scripts: {
@@ -76098,14 +76114,14 @@ var c3_default24 = {
76098
76114
 
76099
76115
  // templates/nuxt/c3.ts
76100
76116
  var recast9 = __toESM(require_main3());
76101
- var { npm: npm14, name: pm3 } = detectPackageManager();
76102
- var generate19 = async (ctx) => {
76117
+ var { npm: npm15, name: pm3 } = detectPackageManager();
76118
+ var generate20 = async (ctx) => {
76103
76119
  const gitFlag = ctx.args.git ? `--gitInit` : `--no-gitInit`;
76104
76120
  await runFrameworkGenerator(ctx, [
76105
76121
  "init",
76106
76122
  ctx.project.name,
76107
76123
  "--packageManager",
76108
- npm14,
76124
+ npm15,
76109
76125
  gitFlag
76110
76126
  ]);
76111
76127
  writeFile2("./.node-version", "17");
@@ -76119,7 +76135,7 @@ var configure14 = async (ctx) => {
76119
76135
  await installPackages(packages, {
76120
76136
  dev: true,
76121
76137
  startText: "Installing nitro module `nitro-cloudflare-dev`",
76122
- doneText: `${brandColor("installed")} ${dim(`via \`${npm14} install\``)}`
76138
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm15} install\``)}`
76123
76139
  });
76124
76140
  updateNuxtConfig2();
76125
76141
  updateEnvTypes3(ctx);
@@ -76170,7 +76186,7 @@ var updateNuxtConfig2 = () => {
76170
76186
  });
76171
76187
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
76172
76188
  };
76173
- var config19 = {
76189
+ var config20 = {
76174
76190
  configVersion: 1,
76175
76191
  id: "nuxt",
76176
76192
  frameworkCli: "nuxi",
@@ -76179,12 +76195,12 @@ var config19 = {
76179
76195
  copyFiles: {
76180
76196
  path: "./templates"
76181
76197
  },
76182
- generate: generate19,
76198
+ generate: generate20,
76183
76199
  configure: configure14,
76184
76200
  transformPackageJson: async () => ({
76185
76201
  scripts: {
76186
- deploy: `${npm14} run build && wrangler pages deploy`,
76187
- preview: `${npm14} run build && wrangler pages dev`,
76202
+ deploy: `${npm15} run build && wrangler pages deploy`,
76203
+ preview: `${npm15} run build && wrangler pages dev`,
76188
76204
  "cf-typegen": `wrangler types`
76189
76205
  }
76190
76206
  }),
@@ -76192,10 +76208,10 @@ var config19 = {
76192
76208
  deployScript: "deploy",
76193
76209
  previewScript: "preview"
76194
76210
  };
76195
- var c3_default25 = config19;
76211
+ var c3_default26 = config20;
76196
76212
 
76197
76213
  // templates/openapi/c3.ts
76198
- var c3_default26 = {
76214
+ var c3_default27 = {
76199
76215
  configVersion: 1,
76200
76216
  id: "openapi",
76201
76217
  displayName: "API starter (OpenAPI compliant)",
@@ -76354,7 +76370,7 @@ async function copyExistingWorkerFiles(ctx) {
76354
76370
  (0, import_path11.join)(ctx.project.path, "wrangler.toml")
76355
76371
  );
76356
76372
  }
76357
- var c3_default27 = {
76373
+ var c3_default28 = {
76358
76374
  configVersion: 1,
76359
76375
  id: "pre-existing",
76360
76376
  displayName: "Pre-existing Worker (from Dashboard)",
@@ -76382,7 +76398,7 @@ function buildConfigure(params) {
76382
76398
  }
76383
76399
 
76384
76400
  // templates/queues/c3.ts
76385
- var c3_default28 = {
76401
+ var c3_default29 = {
76386
76402
  configVersion: 1,
76387
76403
  id: "queues",
76388
76404
  displayName: "Queue consumer & producer Worker",
@@ -76412,8 +76428,8 @@ var c3_default28 = {
76412
76428
 
76413
76429
  // templates/qwik/c3.ts
76414
76430
  var recast10 = __toESM(require_main3());
76415
- var { npm: npm15, npx: npx5 } = detectPackageManager();
76416
- var generate20 = async (ctx) => {
76431
+ var { npm: npm16, npx: npx5 } = detectPackageManager();
76432
+ var generate21 = async (ctx) => {
76417
76433
  await runFrameworkGenerator(ctx, ["playground", ctx.project.name]);
76418
76434
  };
76419
76435
  var configure15 = async (ctx) => {
@@ -76493,7 +76509,7 @@ var populateCloudflareEnv2 = () => {
76493
76509
  });
76494
76510
  s.stop(`${brandColor("updated")} \`${entrypointPath}\``);
76495
76511
  };
76496
- var config20 = {
76512
+ var config21 = {
76497
76513
  configVersion: 1,
76498
76514
  id: "qwik",
76499
76515
  frameworkCli: "create-qwik",
@@ -76502,12 +76518,12 @@ var config20 = {
76502
76518
  copyFiles: {
76503
76519
  path: "./templates"
76504
76520
  },
76505
- generate: generate20,
76521
+ generate: generate21,
76506
76522
  configure: configure15,
76507
76523
  transformPackageJson: async () => ({
76508
76524
  scripts: {
76509
- deploy: `${npm15} run build && wrangler pages deploy`,
76510
- preview: `${npm15} run build && wrangler pages dev`,
76525
+ deploy: `${npm16} run build && wrangler pages deploy`,
76526
+ preview: `${npm16} run build && wrangler pages dev`,
76511
76527
  "cf-typegen": `wrangler types`
76512
76528
  }
76513
76529
  }),
@@ -76515,11 +76531,11 @@ var config20 = {
76515
76531
  deployScript: "deploy",
76516
76532
  previewScript: "preview"
76517
76533
  };
76518
- var c3_default29 = config20;
76534
+ var c3_default30 = config21;
76519
76535
 
76520
76536
  // templates/react/c3.ts
76521
- var { npm: npm16 } = detectPackageManager();
76522
- var generate21 = async (ctx) => {
76537
+ var { npm: npm17 } = detectPackageManager();
76538
+ var generate22 = async (ctx) => {
76523
76539
  const variant = await inputPrompt({
76524
76540
  type: "select",
76525
76541
  question: "Select a variant:",
@@ -76548,29 +76564,29 @@ var variantsOptions = [
76548
76564
  label: "JavaScript + SWC"
76549
76565
  }
76550
76566
  ];
76551
- var config21 = {
76567
+ var config22 = {
76552
76568
  configVersion: 1,
76553
76569
  id: "react",
76554
76570
  // React's documentation now recommends using create-vite.
76555
76571
  frameworkCli: "create-vite",
76556
76572
  displayName: "React",
76557
76573
  platform: "pages",
76558
- generate: generate21,
76574
+ generate: generate22,
76559
76575
  transformPackageJson: async () => ({
76560
76576
  scripts: {
76561
- deploy: `${npm16} run build && wrangler pages deploy ./dist`,
76562
- preview: `${npm16} run build && wrangler pages dev ./dist`
76577
+ deploy: `${npm17} run build && wrangler pages deploy ./dist`,
76578
+ preview: `${npm17} run build && wrangler pages dev ./dist`
76563
76579
  }
76564
76580
  }),
76565
76581
  devScript: "dev",
76566
76582
  deployScript: "deploy",
76567
76583
  previewScript: "preview"
76568
76584
  };
76569
- var c3_default30 = config21;
76585
+ var c3_default31 = config22;
76570
76586
 
76571
76587
  // templates/remix/c3.ts
76572
- var { npm: npm17 } = detectPackageManager();
76573
- var generate22 = async (ctx) => {
76588
+ var { npm: npm18 } = detectPackageManager();
76589
+ var generate23 = async (ctx) => {
76574
76590
  await runFrameworkGenerator(ctx, [
76575
76591
  ctx.project.name,
76576
76592
  "--template",
@@ -76593,7 +76609,7 @@ var configure16 = async () => {
76593
76609
  });
76594
76610
  s.stop(`${brandColor("updated")} \`${dim(typeDefsPath)}\``);
76595
76611
  };
76596
- var config22 = {
76612
+ var config23 = {
76597
76613
  configVersion: 1,
76598
76614
  id: "remix",
76599
76615
  frameworkCli: "create-remix",
@@ -76602,12 +76618,12 @@ var config22 = {
76602
76618
  copyFiles: {
76603
76619
  path: "./templates"
76604
76620
  },
76605
- generate: generate22,
76621
+ generate: generate23,
76606
76622
  configure: configure16,
76607
76623
  transformPackageJson: async () => ({
76608
76624
  scripts: {
76609
- deploy: `${npm17} run build && wrangler pages deploy`,
76610
- preview: `${npm17} run build && wrangler pages dev`,
76625
+ deploy: `${npm18} run build && wrangler pages deploy`,
76626
+ preview: `${npm18} run build && wrangler pages dev`,
76611
76627
  "cf-typegen": `wrangler types`
76612
76628
  }
76613
76629
  }),
@@ -76615,10 +76631,10 @@ var config22 = {
76615
76631
  deployScript: "deploy",
76616
76632
  previewScript: "preview"
76617
76633
  };
76618
- var c3_default31 = config22;
76634
+ var c3_default32 = config23;
76619
76635
 
76620
76636
  // templates/scheduled/c3.ts
76621
- var c3_default32 = {
76637
+ var c3_default33 = {
76622
76638
  configVersion: 1,
76623
76639
  id: "scheduled",
76624
76640
  displayName: "Scheduled Worker (Cron Trigger)",
@@ -76638,8 +76654,8 @@ var c3_default32 = {
76638
76654
 
76639
76655
  // templates/solid/c3.ts
76640
76656
  var recast11 = __toESM(require_main3());
76641
- var { npm: npm18 } = detectPackageManager();
76642
- var generate23 = async (ctx) => {
76657
+ var { npm: npm19 } = detectPackageManager();
76658
+ var generate24 = async (ctx) => {
76643
76659
  await runFrameworkGenerator(ctx, ["-p", ctx.project.name, "-s"]);
76644
76660
  logRaw("");
76645
76661
  };
@@ -76681,7 +76697,7 @@ var configure17 = async (ctx) => {
76681
76697
  }
76682
76698
  });
76683
76699
  };
76684
- var config23 = {
76700
+ var config24 = {
76685
76701
  configVersion: 1,
76686
76702
  id: "solid",
76687
76703
  frameworkCli: "create-solid",
@@ -76690,12 +76706,12 @@ var config23 = {
76690
76706
  copyFiles: {
76691
76707
  path: "./templates"
76692
76708
  },
76693
- generate: generate23,
76709
+ generate: generate24,
76694
76710
  configure: configure17,
76695
76711
  transformPackageJson: async () => ({
76696
76712
  scripts: {
76697
- preview: `${npm18} run build && npx wrangler pages dev`,
76698
- deploy: `${npm18} run build && wrangler pages deploy`
76713
+ preview: `${npm19} run build && npx wrangler pages dev`,
76714
+ deploy: `${npm19} run build && wrangler pages deploy`
76699
76715
  }
76700
76716
  }),
76701
76717
  compatibilityFlags: ["nodejs_compat"],
@@ -76703,13 +76719,14 @@ var config23 = {
76703
76719
  deployScript: "deploy",
76704
76720
  previewScript: "preview"
76705
76721
  };
76706
- var c3_default33 = config23;
76722
+ var c3_default34 = config24;
76707
76723
 
76708
76724
  // templates/svelte/c3.ts
76725
+ var import_node_fs3 = require("node:fs");
76709
76726
  var import_node_os4 = require("node:os");
76710
76727
  var recast12 = __toESM(require_main3());
76711
- var { npm: npm19 } = detectPackageManager();
76712
- var generate24 = async (ctx) => {
76728
+ var { npm: npm20 } = detectPackageManager();
76729
+ var generate25 = async (ctx) => {
76713
76730
  await runFrameworkGenerator(ctx, ["create", ctx.project.name]);
76714
76731
  logRaw("");
76715
76732
  };
@@ -76721,6 +76738,7 @@ var configure18 = async (ctx) => {
76721
76738
  doneText: `${brandColor(`installed`)} ${dim(pkg)}`
76722
76739
  });
76723
76740
  updateSvelteConfig2();
76741
+ updatePlaywrightConfig(usesTypescript(ctx));
76724
76742
  updateTypeDefinitions2(ctx);
76725
76743
  };
76726
76744
  var updateSvelteConfig2 = () => {
@@ -76735,6 +76753,28 @@ var updateSvelteConfig2 = () => {
76735
76753
  }
76736
76754
  });
76737
76755
  };
76756
+ var updatePlaywrightConfig = (shouldUseTypescript) => {
76757
+ const filePath = `playwright.config.${shouldUseTypescript ? "ts" : "js"}`;
76758
+ if (!(0, import_node_fs3.existsSync)(filePath)) {
76759
+ return;
76760
+ }
76761
+ updateStatus(`Changing webServer port in ${blue(filePath)}`);
76762
+ transformFile(filePath, {
76763
+ visitObjectExpression: function(n2) {
76764
+ const portProp = n2.node.properties.find((prop) => {
76765
+ if (!("key" in prop) || !("name" in prop.key)) {
76766
+ return false;
76767
+ }
76768
+ return prop.key.name === "port";
76769
+ });
76770
+ if (!portProp || !("value" in portProp) || !("value" in portProp.value)) {
76771
+ return this.traverse(n2);
76772
+ }
76773
+ portProp.value.value = 8788;
76774
+ return false;
76775
+ }
76776
+ });
76777
+ };
76738
76778
  var updateTypeDefinitions2 = (ctx) => {
76739
76779
  if (!usesTypescript(ctx)) {
76740
76780
  return;
@@ -76772,24 +76812,21 @@ var updateTypeDefinitions2 = (ctx) => {
76772
76812
  }
76773
76813
  });
76774
76814
  };
76775
- var config24 = {
76815
+ var config25 = {
76776
76816
  configVersion: 1,
76777
76817
  id: "svelte",
76778
76818
  frameworkCli: "sv",
76779
76819
  displayName: "SvelteKit",
76780
76820
  platform: "pages",
76781
76821
  copyFiles: {
76782
- variants: {
76783
- js: { path: "./js" },
76784
- ts: { path: "./ts" }
76785
- }
76822
+ path: "./templates"
76786
76823
  },
76787
- generate: generate24,
76824
+ generate: generate25,
76788
76825
  configure: configure18,
76789
76826
  transformPackageJson: async (original, ctx) => {
76790
76827
  let scripts = {
76791
- preview: `${npm19} run build && wrangler pages dev`,
76792
- deploy: `${npm19} run build && wrangler pages deploy`
76828
+ preview: `${npm20} run build && wrangler pages dev`,
76829
+ deploy: `${npm20} run build && wrangler pages deploy`
76793
76830
  };
76794
76831
  if (usesTypescript(ctx)) {
76795
76832
  const mv = (0, import_node_os4.platform)() === "win32" ? "move" : "mv";
@@ -76804,34 +76841,34 @@ var config24 = {
76804
76841
  deployScript: "deploy",
76805
76842
  previewScript: "preview"
76806
76843
  };
76807
- var c3_default34 = config24;
76844
+ var c3_default35 = config25;
76808
76845
 
76809
76846
  // templates/vue/c3.ts
76810
- var { npm: npm20 } = detectPackageManager();
76811
- var generate25 = async (ctx) => {
76847
+ var { npm: npm21 } = detectPackageManager();
76848
+ var generate26 = async (ctx) => {
76812
76849
  await runFrameworkGenerator(ctx, [ctx.project.name]);
76813
76850
  };
76814
- var config25 = {
76851
+ var config26 = {
76815
76852
  configVersion: 1,
76816
76853
  id: "vue",
76817
76854
  frameworkCli: "create-vue",
76818
76855
  displayName: "Vue",
76819
76856
  platform: "pages",
76820
- generate: generate25,
76857
+ generate: generate26,
76821
76858
  transformPackageJson: async () => ({
76822
76859
  scripts: {
76823
- deploy: `${npm20} run build && wrangler pages deploy ./dist`,
76824
- preview: `${npm20} run build && wrangler pages dev ./dist`
76860
+ deploy: `${npm21} run build && wrangler pages deploy ./dist`,
76861
+ preview: `${npm21} run build && wrangler pages dev ./dist`
76825
76862
  }
76826
76863
  }),
76827
76864
  devScript: "dev",
76828
76865
  deployScript: "deploy",
76829
76866
  previewScript: "preview"
76830
76867
  };
76831
- var c3_default35 = config25;
76868
+ var c3_default36 = config26;
76832
76869
 
76833
76870
  // ../wrangler/package.json
76834
- var version2 = "0.0.0-6d15863ec";
76871
+ var version2 = "0.0.0-6d2931922";
76835
76872
 
76836
76873
  // src/git.ts
76837
76874
  var offerGit = async (ctx) => {
@@ -77107,24 +77144,25 @@ function getFrameworkMap({ experimental = false }) {
77107
77144
  qwik: c3_default11,
77108
77145
  remix: c3_default12,
77109
77146
  solid: c3_default13,
77110
- svelte: c3_default14
77147
+ svelte: c3_default14,
77148
+ vue: c3_default15
77111
77149
  };
77112
77150
  } else {
77113
77151
  return {
77114
- analog: c3_default15,
77115
- angular: c3_default16,
77116
- astro: c3_default17,
77117
- docusaurus: c3_default19,
77118
- gatsby: c3_default20,
77119
- hono: c3_default23,
77120
- next: c3_default24,
77121
- nuxt: c3_default25,
77122
- qwik: c3_default29,
77123
- react: c3_default30,
77124
- remix: c3_default31,
77125
- solid: c3_default33,
77126
- svelte: c3_default34,
77127
- vue: c3_default35
77152
+ analog: c3_default16,
77153
+ angular: c3_default17,
77154
+ astro: c3_default18,
77155
+ docusaurus: c3_default20,
77156
+ gatsby: c3_default21,
77157
+ hono: c3_default24,
77158
+ next: c3_default25,
77159
+ nuxt: c3_default26,
77160
+ qwik: c3_default30,
77161
+ react: c3_default31,
77162
+ remix: c3_default32,
77163
+ solid: c3_default34,
77164
+ svelte: c3_default35,
77165
+ vue: c3_default36
77128
77166
  };
77129
77167
  }
77130
77168
  }
@@ -77137,13 +77175,13 @@ function getTemplateMap({ experimental = false }) {
77137
77175
  };
77138
77176
  } else {
77139
77177
  return {
77140
- "hello-world": c3_default22,
77141
- common: c3_default18,
77142
- scheduled: c3_default32,
77143
- queues: c3_default28,
77144
- "hello-world-durable-object": c3_default21,
77145
- openapi: c3_default26,
77146
- "pre-existing": c3_default27
77178
+ "hello-world": c3_default23,
77179
+ common: c3_default19,
77180
+ scheduled: c3_default33,
77181
+ queues: c3_default29,
77182
+ "hello-world-durable-object": c3_default22,
77183
+ openapi: c3_default27,
77184
+ "pre-existing": c3_default28
77147
77185
  };
77148
77186
  }
77149
77187
  }
@@ -77290,8 +77328,8 @@ var createContext = async (args, prevArgs) => {
77290
77328
  experimental: args.experimental
77291
77329
  });
77292
77330
  const frameworkOptions = Object.entries(frameworkMap).map(
77293
- ([key, config26]) => ({
77294
- label: config26.displayName,
77331
+ ([key, config27]) => ({
77332
+ label: config27.displayName,
77295
77333
  value: key
77296
77334
  })
77297
77335
  );
@@ -77429,28 +77467,28 @@ var processRemoteTemplate = async (args) => {
77429
77467
  src = src.replace("https://github.com/", "github:").replace("/tree/main/", "/");
77430
77468
  }
77431
77469
  const path6 = await downloadRemoteTemplate(src);
77432
- const config26 = inferTemplateConfig(path6);
77433
- validateTemplate(path6, config26);
77470
+ const config27 = inferTemplateConfig(path6);
77471
+ validateTemplate(path6, config27);
77434
77472
  updateStatus(`${brandColor("template")} ${dim("cloned and validated")}`);
77435
77473
  return {
77436
77474
  path: path6,
77437
- ...config26
77475
+ ...config27
77438
77476
  };
77439
77477
  };
77440
- var validateTemplate = (path6, config26) => {
77441
- if (!config26.copyFiles) {
77478
+ var validateTemplate = (path6, config27) => {
77479
+ if (!config27.copyFiles) {
77442
77480
  return;
77443
77481
  }
77444
- if (isVariantInfo(config26.copyFiles)) {
77445
- validateTemplateSrcDirectory((0, import_path13.resolve)(path6, config26.copyFiles.path), config26);
77482
+ if (isVariantInfo(config27.copyFiles)) {
77483
+ validateTemplateSrcDirectory((0, import_path13.resolve)(path6, config27.copyFiles.path), config27);
77446
77484
  } else {
77447
- for (const variant of Object.values(config26.copyFiles.variants)) {
77448
- validateTemplateSrcDirectory((0, import_path13.resolve)(path6, variant.path), config26);
77485
+ for (const variant of Object.values(config27.copyFiles.variants)) {
77486
+ validateTemplateSrcDirectory((0, import_path13.resolve)(path6, variant.path), config27);
77449
77487
  }
77450
77488
  }
77451
77489
  };
77452
- var validateTemplateSrcDirectory = (path6, config26) => {
77453
- if (config26.platform === "workers") {
77490
+ var validateTemplateSrcDirectory = (path6, config27) => {
77491
+ if (config27.platform === "workers") {
77454
77492
  const wranglerTomlPath = (0, import_path13.resolve)(path6, "wrangler.toml");
77455
77493
  if (!(0, import_fs11.existsSync)(wranglerTomlPath)) {
77456
77494
  throw new Error(
@@ -79156,14 +79194,16 @@ var updateWranglerToml = async (ctx) => {
79156
79194
  }
79157
79195
  } else {
79158
79196
  newToml.prepend(
79159
- `compatibility_date = "${await getWorkerdCompatibilityDate()}"`
79197
+ `compatibility_date = "${await getWorkerdCompatibilityDate()}"
79198
+ `
79160
79199
  );
79161
79200
  }
79162
79201
  const nameRe = /^name\s*=.*/m;
79163
79202
  if (wranglerToml.match(nameRe)) {
79164
79203
  newToml.replace(nameRe, `name = "${ctx.project.name}"`);
79165
79204
  } else {
79166
- newToml.prepend(`name = "${ctx.project.name}"`);
79205
+ newToml.prepend(`name = "${ctx.project.name}"
79206
+ `);
79167
79207
  }
79168
79208
  writeWranglerToml(ctx, newToml.toString());
79169
79209
  };
@@ -79185,7 +79225,7 @@ var writeWranglerToml = (ctx, contents) => {
79185
79225
 
79186
79226
  // src/deploy.ts
79187
79227
  var offerToDeploy = async (ctx) => {
79188
- const { npm: npm22 } = detectPackageManager();
79228
+ const { npm: npm23 } = detectPackageManager();
79189
79229
  startSection(`Deploy with Cloudflare`, `Step 3 of 3`);
79190
79230
  if (!await isDeployable(ctx)) {
79191
79231
  ctx.args.deploy = false;
@@ -79196,7 +79236,7 @@ var offerToDeploy = async (ctx) => {
79196
79236
  );
79197
79237
  }
79198
79238
  const label = `deploy via \`${quoteShellArgs([
79199
- npm22,
79239
+ npm23,
79200
79240
  "run",
79201
79241
  ctx.template.deployScript ?? "deploy"
79202
79242
  ])}\``;
@@ -79226,11 +79266,11 @@ var isDeployable = async (ctx) => {
79226
79266
  return !hasBinding(wranglerToml);
79227
79267
  };
79228
79268
  var runDeploy = async (ctx) => {
79229
- const { npm: npm22, name: pm4 } = detectPackageManager();
79269
+ const { npm: npm23, name: pm4 } = detectPackageManager();
79230
79270
  if (!ctx.account?.id) {
79231
79271
  throw new Error("Failed to read Cloudflare account.");
79232
79272
  }
79233
- const baseDeployCmd = [npm22, "run", ctx.template.deployScript ?? "deploy"];
79273
+ const baseDeployCmd = [npm23, "run", ctx.template.deployScript ?? "deploy"];
79234
79274
  const insideGitRepo = await isInsideGitRepo(ctx.project.path);
79235
79275
  const deployCmd = [
79236
79276
  ...baseDeployCmd,
@@ -79320,16 +79360,22 @@ function createDialog(lines) {
79320
79360
  ""
79321
79361
  ].join("\n");
79322
79362
  }
79323
- function printWelcomeMessage(version3, telemetryEnabled) {
79363
+ function printWelcomeMessage(version3, telemetryEnabled, args) {
79324
79364
  const lines = [
79325
79365
  `\u{1F44B} Welcome to create-cloudflare v${version3}!`,
79326
79366
  `\u{1F9E1} Let's get started.`
79327
79367
  ];
79368
+ if (args.experimental) {
79369
+ lines.push("", blue`🧪 Running in experimental mode`);
79370
+ }
79328
79371
  if (telemetryEnabled) {
79372
+ if (args.experimental) {
79373
+ lines.push("");
79374
+ }
79329
79375
  const telemetryDocsUrl = `https://github.com/cloudflare/workers-sdk/blob/main/packages/create-cloudflare/telemetry.md`;
79330
79376
  lines.push(
79331
79377
  `\u{1F4CA} Cloudflare collects telemetry about your usage of Create-Cloudflare.`,
79332
- ``,
79378
+ "",
79333
79379
  `Learn more at: ${blue.underline(hyperlink(telemetryDocsUrl))}`
79334
79380
  );
79335
79381
  }
@@ -79340,14 +79386,14 @@ var printSummary = (ctx) => {
79340
79386
  const dashboardUrl = ctx.account ? `https://dash.cloudflare.com/?to=/:account/workers/services/view/${ctx.project.name}` : null;
79341
79387
  const relativePath = (0, import_path15.relative)(ctx.originalCWD, ctx.project.path);
79342
79388
  const cdCommand = relativePath ? `cd ${relativePath}` : null;
79343
- const { npm: npm22 } = detectPackageManager();
79389
+ const { npm: npm23 } = detectPackageManager();
79344
79390
  const devServerCommand = quoteShellArgs([
79345
- npm22,
79391
+ npm23,
79346
79392
  "run",
79347
79393
  ctx.template.devScript ?? "start"
79348
79394
  ]);
79349
79395
  const deployCommand = quoteShellArgs([
79350
- npm22,
79396
+ npm23,
79351
79397
  "run",
79352
79398
  ctx.template.deployScript ?? "deploy"
79353
79399
  ]);
@@ -79715,8 +79761,8 @@ var renderValues = (values) => {
79715
79761
  };
79716
79762
 
79717
79763
  // src/helpers/retry.ts
79718
- var retry = async (config26, fn) => {
79719
- let { times } = config26;
79764
+ var retry = async (config27, fn) => {
79765
+ let { times } = config27;
79720
79766
  let error2 = null;
79721
79767
  while (times > 0) {
79722
79768
  try {
@@ -79724,10 +79770,10 @@ var retry = async (config26, fn) => {
79724
79770
  } catch (e) {
79725
79771
  error2 = e;
79726
79772
  times--;
79727
- if (config26.exitCondition?.(e)) {
79773
+ if (config27.exitCondition?.(e)) {
79728
79774
  break;
79729
79775
  }
79730
- await sleep(config26.sleepMs ?? 1e3);
79776
+ await sleep(config27.sleepMs ?? 1e3);
79731
79777
  }
79732
79778
  }
79733
79779
  throw error2;
@@ -81124,14 +81170,14 @@ function applyEdits(text, edits) {
81124
81170
 
81125
81171
  // src/workers.ts
81126
81172
  async function installWorkersTypes(ctx) {
81127
- const { npm: npm22 } = detectPackageManager();
81173
+ const { npm: npm23 } = detectPackageManager();
81128
81174
  if (!usesTypescript(ctx)) {
81129
81175
  return;
81130
81176
  }
81131
81177
  await installPackages(["@cloudflare/workers-types"], {
81132
81178
  dev: true,
81133
81179
  startText: "Installing @cloudflare/workers-types",
81134
- doneText: `${brandColor("installed")} ${dim(`via ${npm22}`)}`
81180
+ doneText: `${brandColor("installed")} ${dim(`via ${npm23}`)}`
81135
81181
  });
81136
81182
  await addWorkersTypesToTsConfig(ctx);
81137
81183
  }
@@ -81154,8 +81200,8 @@ async function addWorkersTypesToTsConfig(ctx) {
81154
81200
  }
81155
81201
  const typesEntrypoint = `@cloudflare/workers-types/${entrypointVersion}`;
81156
81202
  try {
81157
- const config26 = parse3(tsconfig);
81158
- const currentTypes = config26.compilerOptions?.types ?? [];
81203
+ const config27 = parse3(tsconfig);
81204
+ const currentTypes = config27.compilerOptions?.types ?? [];
81159
81205
  const explicitEntrypoint = currentTypes.some(
81160
81206
  (t) => t.match(/@cloudflare\/workers-types\/\d{4}-\d{2}-\d{2}/)
81161
81207
  );
@@ -81185,7 +81231,7 @@ async function addWorkersTypesToTsConfig(ctx) {
81185
81231
  }
81186
81232
 
81187
81233
  // src/cli.ts
81188
- var { npm: npm21 } = detectPackageManager();
81234
+ var { npm: npm22 } = detectPackageManager();
81189
81235
  var main = async (argv) => {
81190
81236
  const result = await parseArgs(argv);
81191
81237
  if (result.type === "unknown") {
@@ -81221,13 +81267,13 @@ ${result.errorMessage}`);
81221
81267
  };
81222
81268
  var runLatest = async () => {
81223
81269
  const args = process.argv.slice(2);
81224
- if (npm21 === "npm") {
81270
+ if (npm22 === "npm") {
81225
81271
  args.unshift("--");
81226
81272
  }
81227
- await runCommand([npm21, "create", "cloudflare@latest", ...args]);
81273
+ await runCommand([npm22, "create", "cloudflare@latest", ...args]);
81228
81274
  };
81229
81275
  var runCli = async (args) => {
81230
- printBanner();
81276
+ printBanner(args);
81231
81277
  const ctx = await createContext(args);
81232
81278
  await create(ctx);
81233
81279
  await configure19(ctx);
@@ -81281,8 +81327,8 @@ var deploy = async (ctx) => {
81281
81327
  await maybeOpenBrowser(ctx);
81282
81328
  endSection("Done");
81283
81329
  };
81284
- var printBanner = () => {
81285
- printWelcomeMessage(version, reporter.isEnabled);
81330
+ var printBanner = (args) => {
81331
+ printWelcomeMessage(version, reporter.isEnabled, args);
81286
81332
  startSection(`Create an application with Cloudflare`, "Step 1 of 3");
81287
81333
  };
81288
81334
  main(process.argv).catch((e) => {