create-cloudflare 2.18.1 → 2.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/cli.js +821 -692
  2. package/package.json +3 -3
  3. package/templates/analog/c3.ts +134 -0
  4. package/templates/analog/snippets/devBindingsModule.ts +7 -0
  5. package/templates/analog/templates/env.d.ts +13 -0
  6. package/templates/analog/templates/src/dev-bindings.ts +18 -0
  7. package/templates/analog/templates/worker-configuration.d.ts +4 -0
  8. package/templates/analog/templates/wrangler.toml +78 -0
  9. package/templates/astro/c3.ts +3 -3
  10. package/templates/astro/templates/wrangler.toml +27 -2
  11. package/templates/common/js/wrangler.toml +3 -1
  12. package/templates/common/ts/package.json +2 -1
  13. package/templates/common/ts/src/index.ts +3 -0
  14. package/templates/common/ts/worker-configuration.d.ts +2 -14
  15. package/templates/common/ts/wrangler.toml +3 -1
  16. package/templates/hello-world/js/test/index.spec.js +17 -17
  17. package/templates/hello-world/js/wrangler.toml +3 -1
  18. package/templates/hello-world/ts/package.json +2 -1
  19. package/templates/hello-world/ts/src/index.ts +3 -17
  20. package/templates/hello-world/ts/test/index.spec.ts +17 -17
  21. package/templates/hello-world/ts/worker-configuration.d.ts +4 -0
  22. package/templates/hello-world/ts/wrangler.toml +3 -1
  23. package/templates/hello-world-durable-object/js/wrangler.toml +3 -1
  24. package/templates/hello-world-durable-object/ts/package.json +2 -1
  25. package/templates/hello-world-durable-object/ts/src/index.ts +3 -20
  26. package/templates/hello-world-durable-object/ts/worker-configuration.d.ts +6 -0
  27. package/templates/hello-world-durable-object/ts/wrangler.toml +3 -2
  28. package/templates/hello-world-python/py/wrangler.toml +3 -1
  29. package/templates/next/README.md +5 -5
  30. package/templates/next/c3.ts +3 -3
  31. package/templates/next/wrangler.toml +25 -1
  32. package/templates/nuxt/c3.ts +4 -4
  33. package/templates/nuxt/templates/worker-configuration.d.ts +1 -1
  34. package/templates/nuxt/templates/wrangler.toml +27 -2
  35. package/templates/openapi/ts/package.json +2 -1
  36. package/templates/openapi/ts/worker-configuration.d.ts +4 -0
  37. package/templates/openapi/ts/wrangler.toml +96 -0
  38. package/templates/queues/js/wrangler.toml +3 -1
  39. package/templates/queues/ts/package.json +2 -1
  40. package/templates/queues/ts/src/index.ts +3 -5
  41. package/templates/queues/ts/worker-configuration.d.ts +5 -0
  42. package/templates/queues/ts/wrangler.toml +3 -1
  43. package/templates/qwik/c3.ts +3 -3
  44. package/templates/qwik/templates/worker-configuration.d.ts +1 -1
  45. package/templates/qwik/templates/wrangler.toml +27 -2
  46. package/templates/remix/c3.ts +3 -3
  47. package/templates/remix/templates/worker-configuration.d.ts +1 -1
  48. package/templates/remix/templates/wrangler.toml +27 -2
  49. package/templates/scheduled/js/wrangler.toml +4 -2
  50. package/templates/scheduled/ts/package.json +2 -1
  51. package/templates/scheduled/ts/src/index.ts +3 -20
  52. package/templates/scheduled/ts/worker-configuration.d.ts +4 -0
  53. package/templates/scheduled/ts/wrangler.toml +4 -2
  54. package/templates/solid/c3.ts +5 -3
  55. package/templates/solid/templates/wrangler.toml +77 -0
  56. package/templates/svelte/c3.ts +3 -3
  57. package/templates/svelte/js/wrangler.toml +27 -2
  58. package/templates/svelte/ts/wrangler.toml +27 -2
package/dist/cli.js CHANGED
@@ -3569,37 +3569,37 @@ var init_interactive = __esm({
3569
3569
  }
3570
3570
  return input;
3571
3571
  };
3572
- renderSubmit = (config13, value) => {
3573
- const { question, label } = config13;
3574
- if (config13.type !== "confirm" && value.length === 0) {
3572
+ renderSubmit = (config14, value) => {
3573
+ const { question, label } = config14;
3574
+ if (config14.type !== "confirm" && value.length === 0) {
3575
3575
  return [`${leftT} ${question} ${dim("(skipped)")}`, `${grayBar}`];
3576
3576
  }
3577
- const content = config13.type === "confirm" ? `${grayBar} ${brandColor(value)} ${dim(label)}` : `${grayBar} ${brandColor(label)} ${dim(value)}`;
3577
+ const content = config14.type === "confirm" ? `${grayBar} ${brandColor(value)} ${dim(label)}` : `${grayBar} ${brandColor(label)} ${dim(value)}`;
3578
3578
  return [`${leftT} ${question}`, content, `${grayBar}`];
3579
3579
  };
3580
3580
  handleCancel = () => {
3581
3581
  cancel("Operation cancelled.");
3582
3582
  process.exit(0);
3583
3583
  };
3584
- getRenderers = (config13) => {
3585
- switch (config13.type) {
3584
+ getRenderers = (config14) => {
3585
+ switch (config14.type) {
3586
3586
  case "select":
3587
- return getSelectRenderers(config13);
3587
+ return getSelectRenderers(config14);
3588
3588
  case "confirm":
3589
- return getConfirmRenderers(config13);
3589
+ return getConfirmRenderers(config14);
3590
3590
  case "text":
3591
- return getTextRenderers(config13);
3591
+ return getTextRenderers(config14);
3592
3592
  case "multiselect":
3593
- return getSelectRenderers(config13);
3593
+ return getSelectRenderers(config14);
3594
3594
  case "list":
3595
- return getSelectListRenderers(config13);
3595
+ return getSelectListRenderers(config14);
3596
3596
  }
3597
3597
  };
3598
- getTextRenderers = (config13) => {
3599
- const { question } = config13;
3600
- const helpText = config13.helpText ?? "";
3601
- const format5 = config13.format ?? ((val) => String(val));
3602
- const defaultValue = config13.defaultValue?.toString() ?? "";
3598
+ getTextRenderers = (config14) => {
3599
+ const { question } = config14;
3600
+ const helpText = config14.helpText ?? "";
3601
+ const format5 = config14.format ?? ((val) => String(val));
3602
+ const defaultValue = config14.defaultValue?.toString() ?? "";
3603
3603
  return {
3604
3604
  initial: () => [
3605
3605
  `${blCorner} ${bold(question)} ${dim(helpText)}`,
@@ -3621,14 +3621,14 @@ var init_interactive = __esm({
3621
3621
  ``
3622
3622
  // extra line for readability
3623
3623
  ],
3624
- submit: ({ value }) => renderSubmit(config13, format5(value ?? "")),
3624
+ submit: ({ value }) => renderSubmit(config14, format5(value ?? "")),
3625
3625
  cancel: handleCancel
3626
3626
  };
3627
3627
  };
3628
- getSelectRenderers = (config13) => {
3629
- const { options, question, helpText: _helpText } = config13;
3628
+ getSelectRenderers = (config14) => {
3629
+ const { options, question, helpText: _helpText } = config14;
3630
3630
  const helpText = _helpText ?? "";
3631
- const maxItemsPerPage = config13.maxItemsPerPage ?? 32;
3631
+ const maxItemsPerPage = config14.maxItemsPerPage ?? 32;
3632
3632
  const defaultRenderer = ({ cursor, value }) => {
3633
3633
  cursor = cursor ?? 0;
3634
3634
  const renderOption = (opt, i) => {
@@ -3675,21 +3675,21 @@ ${space(2)}${dim("...")}` : ""}`,
3675
3675
  submit: ({ value }) => {
3676
3676
  if (Array.isArray(value)) {
3677
3677
  return renderSubmit(
3678
- config13,
3678
+ config14,
3679
3679
  options.filter((o) => value.includes(o.value)).map((o) => o.label).join(", ")
3680
3680
  );
3681
3681
  }
3682
3682
  return renderSubmit(
3683
- config13,
3683
+ config14,
3684
3684
  options.find((o) => o.value === value)?.label
3685
3685
  );
3686
3686
  },
3687
3687
  cancel: handleCancel
3688
3688
  };
3689
3689
  };
3690
- getSelectListRenderers = (config13) => {
3691
- const { question, helpText: _helpText } = config13;
3692
- let options = config13.options;
3690
+ getSelectListRenderers = (config14) => {
3691
+ const { question, helpText: _helpText } = config14;
3692
+ let options = config14.options;
3693
3693
  const helpText = _helpText ?? "";
3694
3694
  const { rows } = stdout;
3695
3695
  const defaultRenderer = ({ cursor, value }, prompt) => {
@@ -3770,20 +3770,20 @@ ${space(2)}${dim("...")}` : ""}`,
3770
3770
  submit: ({ value }) => {
3771
3771
  if (Array.isArray(value)) {
3772
3772
  return renderSubmit(
3773
- config13,
3773
+ config14,
3774
3774
  options.filter((o) => value.includes(o.value)).map((o) => o.value).join(", ")
3775
3775
  );
3776
3776
  }
3777
3777
  return renderSubmit(
3778
- config13,
3778
+ config14,
3779
3779
  options.find((o) => o.value === value)?.value
3780
3780
  );
3781
3781
  },
3782
3782
  cancel: handleCancel
3783
3783
  };
3784
3784
  };
3785
- getConfirmRenderers = (config13) => {
3786
- const { activeText, inactiveText, question, helpText: _helpText } = config13;
3785
+ getConfirmRenderers = (config14) => {
3786
+ const { activeText, inactiveText, question, helpText: _helpText } = config14;
3787
3787
  const helpText = _helpText ?? "";
3788
3788
  const active = activeText || "Yes";
3789
3789
  const inactive = inactiveText || "No";
@@ -3800,7 +3800,7 @@ ${space(2)}${dim("...")}` : ""}`,
3800
3800
  active: defaultRenderer,
3801
3801
  confirm: defaultRenderer,
3802
3802
  error: defaultRenderer,
3803
- submit: ({ value }) => renderSubmit(config13, value ? "yes" : "no"),
3803
+ submit: ({ value }) => renderSubmit(config14, value ? "yes" : "no"),
3804
3804
  cancel: handleCancel
3805
3805
  };
3806
3806
  };
@@ -3897,7 +3897,7 @@ var init_args = __esm({
3897
3897
  var version, devDependencies;
3898
3898
  var init_package = __esm({
3899
3899
  "package.json"() {
3900
- version = "2.18.1";
3900
+ version = "2.20.0";
3901
3901
  devDependencies = {
3902
3902
  "@babel/parser": "^7.21.3",
3903
3903
  "@babel/types": "^7.21.4",
@@ -7065,7 +7065,7 @@ var init_packageManagers = __esm({
7065
7065
  }
7066
7066
  };
7067
7067
  rectifyPmMismatch = async (ctx) => {
7068
- const { npm: npm13 } = detectPackageManager();
7068
+ const { npm: npm14 } = detectPackageManager();
7069
7069
  if (!detectPmMismatch(ctx)) {
7070
7070
  return;
7071
7071
  }
@@ -7075,17 +7075,17 @@ var init_packageManagers = __esm({
7075
7075
  const lockfilePath = import_path5.default.join(ctx.project.path, "package-lock.json");
7076
7076
  if ((0, import_fs5.existsSync)(lockfilePath))
7077
7077
  (0, import_fs5.rmSync)(lockfilePath);
7078
- await runCommand([npm13, "install"], {
7078
+ await runCommand([npm14, "install"], {
7079
7079
  silent: true,
7080
7080
  cwd: ctx.project.path,
7081
7081
  startText: "Installing dependencies",
7082
- doneText: `${brandColor("installed")} ${dim(`via \`${npm13} install\``)}`
7082
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm14} install\``)}`
7083
7083
  });
7084
7084
  };
7085
7085
  detectPmMismatch = (ctx) => {
7086
- const { npm: npm13 } = detectPackageManager();
7086
+ const { npm: npm14 } = detectPackageManager();
7087
7087
  const projectPath = ctx.project.path;
7088
- switch (npm13) {
7088
+ switch (npm14) {
7089
7089
  case "npm":
7090
7090
  return false;
7091
7091
  case "yarn":
@@ -7509,22 +7509,22 @@ var require_dist_web = __commonJS({
7509
7509
  _createClass(Haikunator3, [{
7510
7510
  key: "haikunate",
7511
7511
  value: function haikunate(options) {
7512
- var config13 = (0, _lodash["default"])(options, this.config);
7513
- if (config13.tokenHex === true) {
7514
- config13.tokenChars = "0123456789abcdef";
7512
+ var config14 = (0, _lodash["default"])(options, this.config);
7513
+ if (config14.tokenHex === true) {
7514
+ config14.tokenChars = "0123456789abcdef";
7515
7515
  }
7516
7516
  var adjective = this._randomElement(this.adjectives);
7517
7517
  var noun = this._randomElement(this.nouns);
7518
- if (!config13.tokenLength)
7519
- config13.tokenLength = 0;
7518
+ if (!config14.tokenLength)
7519
+ config14.tokenLength = 0;
7520
7520
  var token = "";
7521
- for (var i = 0; i < config13.tokenLength; i++) {
7522
- token += this._randomElement(config13.tokenChars);
7521
+ for (var i = 0; i < config14.tokenLength; i++) {
7522
+ token += this._randomElement(config14.tokenChars);
7523
7523
  }
7524
7524
  var sections = [adjective, noun, token];
7525
7525
  return sections.filter(function(e) {
7526
7526
  return !!e;
7527
- }).join(config13.delimiter);
7527
+ }).join(config14.delimiter);
7528
7528
  }
7529
7529
  /**
7530
7530
  * Get a random element from an array/string
@@ -11101,7 +11101,7 @@ var require_symbols2 = __commonJS({
11101
11101
  var require_webidl = __commonJS({
11102
11102
  "../../node_modules/.pnpm/undici@5.28.3/node_modules/undici/lib/fetch/webidl.js"(exports2, module2) {
11103
11103
  "use strict";
11104
- var { types: types6 } = require("util");
11104
+ var { types: types7 } = require("util");
11105
11105
  var { hasOwn, toUSVString } = require_util2();
11106
11106
  var webidl = {};
11107
11107
  webidl.converters = {};
@@ -11266,7 +11266,7 @@ var require_webidl = __commonJS({
11266
11266
  });
11267
11267
  }
11268
11268
  const result = {};
11269
- if (!types6.isProxy(O2)) {
11269
+ if (!types7.isProxy(O2)) {
11270
11270
  const keys2 = Object.keys(O2);
11271
11271
  for (const key of keys2) {
11272
11272
  const typedKey = keyConverter(key);
@@ -11392,14 +11392,14 @@ var require_webidl = __commonJS({
11392
11392
  return x2;
11393
11393
  };
11394
11394
  webidl.converters.ArrayBuffer = function(V2, opts = {}) {
11395
- if (webidl.util.Type(V2) !== "Object" || !types6.isAnyArrayBuffer(V2)) {
11395
+ if (webidl.util.Type(V2) !== "Object" || !types7.isAnyArrayBuffer(V2)) {
11396
11396
  throw webidl.errors.conversionFailed({
11397
11397
  prefix: `${V2}`,
11398
11398
  argument: `${V2}`,
11399
11399
  types: ["ArrayBuffer"]
11400
11400
  });
11401
11401
  }
11402
- if (opts.allowShared === false && types6.isSharedArrayBuffer(V2)) {
11402
+ if (opts.allowShared === false && types7.isSharedArrayBuffer(V2)) {
11403
11403
  throw webidl.errors.exception({
11404
11404
  header: "ArrayBuffer",
11405
11405
  message: "SharedArrayBuffer is not allowed."
@@ -11408,14 +11408,14 @@ var require_webidl = __commonJS({
11408
11408
  return V2;
11409
11409
  };
11410
11410
  webidl.converters.TypedArray = function(V2, T2, opts = {}) {
11411
- if (webidl.util.Type(V2) !== "Object" || !types6.isTypedArray(V2) || V2.constructor.name !== T2.name) {
11411
+ if (webidl.util.Type(V2) !== "Object" || !types7.isTypedArray(V2) || V2.constructor.name !== T2.name) {
11412
11412
  throw webidl.errors.conversionFailed({
11413
11413
  prefix: `${T2.name}`,
11414
11414
  argument: `${V2}`,
11415
11415
  types: [T2.name]
11416
11416
  });
11417
11417
  }
11418
- if (opts.allowShared === false && types6.isSharedArrayBuffer(V2.buffer)) {
11418
+ if (opts.allowShared === false && types7.isSharedArrayBuffer(V2.buffer)) {
11419
11419
  throw webidl.errors.exception({
11420
11420
  header: "ArrayBuffer",
11421
11421
  message: "SharedArrayBuffer is not allowed."
@@ -11424,13 +11424,13 @@ var require_webidl = __commonJS({
11424
11424
  return V2;
11425
11425
  };
11426
11426
  webidl.converters.DataView = function(V2, opts = {}) {
11427
- if (webidl.util.Type(V2) !== "Object" || !types6.isDataView(V2)) {
11427
+ if (webidl.util.Type(V2) !== "Object" || !types7.isDataView(V2)) {
11428
11428
  throw webidl.errors.exception({
11429
11429
  header: "DataView",
11430
11430
  message: "Object is not a DataView."
11431
11431
  });
11432
11432
  }
11433
- if (opts.allowShared === false && types6.isSharedArrayBuffer(V2.buffer)) {
11433
+ if (opts.allowShared === false && types7.isSharedArrayBuffer(V2.buffer)) {
11434
11434
  throw webidl.errors.exception({
11435
11435
  header: "ArrayBuffer",
11436
11436
  message: "SharedArrayBuffer is not allowed."
@@ -11439,13 +11439,13 @@ var require_webidl = __commonJS({
11439
11439
  return V2;
11440
11440
  };
11441
11441
  webidl.converters.BufferSource = function(V2, opts = {}) {
11442
- if (types6.isAnyArrayBuffer(V2)) {
11442
+ if (types7.isAnyArrayBuffer(V2)) {
11443
11443
  return webidl.converters.ArrayBuffer(V2, opts);
11444
11444
  }
11445
- if (types6.isTypedArray(V2)) {
11445
+ if (types7.isTypedArray(V2)) {
11446
11446
  return webidl.converters.TypedArray(V2, V2.constructor);
11447
11447
  }
11448
- if (types6.isDataView(V2)) {
11448
+ if (types7.isDataView(V2)) {
11449
11449
  return webidl.converters.DataView(V2, opts);
11450
11450
  }
11451
11451
  throw new TypeError(`Could not convert ${V2} to a BufferSource.`);
@@ -11760,7 +11760,7 @@ var require_file = __commonJS({
11760
11760
  "../../node_modules/.pnpm/undici@5.28.3/node_modules/undici/lib/fetch/file.js"(exports2, module2) {
11761
11761
  "use strict";
11762
11762
  var { Blob: Blob2, File: NativeFile } = require("buffer");
11763
- var { types: types6 } = require("util");
11763
+ var { types: types7 } = require("util");
11764
11764
  var { kState } = require_symbols2();
11765
11765
  var { isBlobLike } = require_util2();
11766
11766
  var { webidl } = require_webidl();
@@ -11869,7 +11869,7 @@ var require_file = __commonJS({
11869
11869
  if (isBlobLike(V2)) {
11870
11870
  return webidl.converters.Blob(V2, { strict: false });
11871
11871
  }
11872
- if (ArrayBuffer.isView(V2) || types6.isAnyArrayBuffer(V2)) {
11872
+ if (ArrayBuffer.isView(V2) || types7.isAnyArrayBuffer(V2)) {
11873
11873
  return webidl.converters.BufferSource(V2, opts);
11874
11874
  }
11875
11875
  }
@@ -11913,7 +11913,7 @@ var require_file = __commonJS({
11913
11913
  s = convertLineEndingsNative(s);
11914
11914
  }
11915
11915
  bytes.push(encoder.encode(s));
11916
- } else if (types6.isAnyArrayBuffer(element) || types6.isTypedArray(element)) {
11916
+ } else if (types7.isAnyArrayBuffer(element) || types7.isTypedArray(element)) {
11917
11917
  if (!element.buffer) {
11918
11918
  bytes.push(new Uint8Array(element));
11919
11919
  } else {
@@ -18802,7 +18802,7 @@ var require_response = __commonJS({
18802
18802
  var { URLSerializer } = require_dataURL();
18803
18803
  var { kHeadersList, kConstruct } = require_symbols();
18804
18804
  var assert = require("assert");
18805
- var { types: types6 } = require("util");
18805
+ var { types: types7 } = require("util");
18806
18806
  var ReadableStream = globalThis.ReadableStream || require("stream/web").ReadableStream;
18807
18807
  var textEncoder = new TextEncoder("utf-8");
18808
18808
  var Response = class {
@@ -19105,7 +19105,7 @@ var require_response = __commonJS({
19105
19105
  if (isBlobLike(V2)) {
19106
19106
  return webidl.converters.Blob(V2, { strict: false });
19107
19107
  }
19108
- if (types6.isArrayBuffer(V2) || types6.isTypedArray(V2) || types6.isDataView(V2)) {
19108
+ if (types7.isArrayBuffer(V2) || types7.isTypedArray(V2) || types7.isDataView(V2)) {
19109
19109
  return webidl.converters.BufferSource(V2);
19110
19110
  }
19111
19111
  if (util.isFormDataLike(V2)) {
@@ -21211,7 +21211,7 @@ var require_util4 = __commonJS({
21211
21211
  var { getEncoding } = require_encoding();
21212
21212
  var { DOMException: DOMException2 } = require_constants2();
21213
21213
  var { serializeAMimeType, parseMIMEType } = require_dataURL();
21214
- var { types: types6 } = require("util");
21214
+ var { types: types7 } = require("util");
21215
21215
  var { StringDecoder } = require("string_decoder");
21216
21216
  var { btoa: btoa2 } = require("buffer");
21217
21217
  var staticPropertyDescriptors = {
@@ -21241,7 +21241,7 @@ var require_util4 = __commonJS({
21241
21241
  });
21242
21242
  }
21243
21243
  isFirstChunk = false;
21244
- if (!done && types6.isUint8Array(value)) {
21244
+ if (!done && types7.isUint8Array(value)) {
21245
21245
  bytes.push(value);
21246
21246
  if ((fr[kLastProgressEventFired] === void 0 || Date.now() - fr[kLastProgressEventFired] >= 50) && !fr[kAborted]) {
21247
21247
  fr[kLastProgressEventFired] = Date.now();
@@ -23623,7 +23623,7 @@ var require_websocket = __commonJS({
23623
23623
  var { ByteParser } = require_receiver();
23624
23624
  var { kEnumerableProperty, isBlobLike } = require_util();
23625
23625
  var { getGlobalDispatcher } = require_global2();
23626
- var { types: types6 } = require("util");
23626
+ var { types: types7 } = require("util");
23627
23627
  var experimentalWarned = false;
23628
23628
  var WebSocket = class extends EventTarget {
23629
23629
  #events = {
@@ -23770,7 +23770,7 @@ var require_websocket = __commonJS({
23770
23770
  socket.write(buffer, () => {
23771
23771
  this.#bufferedAmount -= value.byteLength;
23772
23772
  });
23773
- } else if (types6.isArrayBuffer(data)) {
23773
+ } else if (types7.isArrayBuffer(data)) {
23774
23774
  const value = Buffer.from(data);
23775
23775
  const frame = new WebsocketFrameSend(value);
23776
23776
  const buffer = frame.createFrame(opcodes.BINARY);
@@ -23992,7 +23992,7 @@ var require_websocket = __commonJS({
23992
23992
  if (isBlobLike(V2)) {
23993
23993
  return webidl.converters.Blob(V2, { strict: false });
23994
23994
  }
23995
- if (ArrayBuffer.isView(V2) || types6.isAnyArrayBuffer(V2)) {
23995
+ if (ArrayBuffer.isView(V2) || types7.isAnyArrayBuffer(V2)) {
23996
23996
  return webidl.converters.BufferSource(V2);
23997
23997
  }
23998
23998
  }
@@ -24158,28 +24158,28 @@ var init_packages = __esm({
24158
24158
  import_undici = __toESM(require_undici());
24159
24159
  init_command();
24160
24160
  init_packageManagers();
24161
- installPackages = async (packages, config13 = {}) => {
24162
- const { npm: npm13 } = detectPackageManager();
24161
+ installPackages = async (packages, config14 = {}) => {
24162
+ const { npm: npm14 } = detectPackageManager();
24163
24163
  let saveFlag;
24164
24164
  let cmd;
24165
- switch (npm13) {
24165
+ switch (npm14) {
24166
24166
  case "yarn":
24167
24167
  cmd = "add";
24168
- saveFlag = config13.dev ? "-D" : "";
24168
+ saveFlag = config14.dev ? "-D" : "";
24169
24169
  break;
24170
24170
  case "bun":
24171
24171
  cmd = "add";
24172
- saveFlag = config13.dev ? "-d" : "";
24172
+ saveFlag = config14.dev ? "-d" : "";
24173
24173
  break;
24174
24174
  case "npm":
24175
24175
  case "pnpm":
24176
24176
  default:
24177
24177
  cmd = "install";
24178
- saveFlag = config13.dev ? "--save-dev" : "";
24178
+ saveFlag = config14.dev ? "--save-dev" : "";
24179
24179
  break;
24180
24180
  }
24181
- await runCommand([npm13, cmd, ...saveFlag ? [saveFlag] : [], ...packages], {
24182
- ...config13,
24181
+ await runCommand([npm14, cmd, ...saveFlag ? [saveFlag] : [], ...packages], {
24182
+ ...config14,
24183
24183
  silent: true
24184
24184
  });
24185
24185
  };
@@ -24188,15 +24188,15 @@ var init_packages = __esm({
24188
24188
  if ((0, import_fs6.existsSync)(nodeModulesPath)) {
24189
24189
  return;
24190
24190
  }
24191
- const { npm: npm13 } = detectPackageManager();
24192
- await runCommand([npm13, "install"], {
24191
+ const { npm: npm14 } = detectPackageManager();
24192
+ await runCommand([npm14, "install"], {
24193
24193
  silent: true,
24194
24194
  startText: "Installing dependencies",
24195
- doneText: `${brandColor("installed")} ${dim(`via \`${npm13} install\``)}`
24195
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm14} install\``)}`
24196
24196
  });
24197
24197
  };
24198
24198
  installWrangler = async () => {
24199
- const { npm: npm13 } = detectPackageManager();
24199
+ const { npm: npm14 } = detectPackageManager();
24200
24200
  if ((0, import_fs6.existsSync)(import_path6.default.resolve("node_modules", "wrangler"))) {
24201
24201
  return;
24202
24202
  }
@@ -24206,7 +24206,7 @@ var init_packages = __esm({
24206
24206
  "A command line tool for building Cloudflare Workers"
24207
24207
  )}`,
24208
24208
  doneText: `${brandColor("installed")} ${dim(
24209
- `via \`${npm13} install wrangler --save-dev\``
24209
+ `via \`${npm14} install wrangler --save-dev\``
24210
24210
  )}`
24211
24211
  });
24212
24212
  };
@@ -24575,7 +24575,7 @@ var init_cli2 = __esm({
24575
24575
  C3_DEFAULTS = {
24576
24576
  projectName: new import_haikunator.default().haikunate({ tokenHex: true }),
24577
24577
  type: "hello-world",
24578
- framework: "angular",
24578
+ framework: "analog",
24579
24579
  autoUpdate: true,
24580
24580
  deploy: true,
24581
24581
  git: true,
@@ -24604,6 +24604,7 @@ var init_package2 = __esm({
24604
24604
  ],
24605
24605
  dependencies: {
24606
24606
  "create-astro": "4.7.5",
24607
+ "create-analog": "1.2.0",
24607
24608
  "@angular/create": "17.2.3",
24608
24609
  "create-docusaurus": "3.1.1",
24609
24610
  "create-hono": "0.5.0",
@@ -24618,6 +24619,7 @@ var init_package2 = __esm({
24618
24619
  nuxi: "3.11.1"
24619
24620
  },
24620
24621
  frameworkCliMap: {
24622
+ analog: "create-analog",
24621
24623
  angular: "@angular/create",
24622
24624
  astro: "create-astro",
24623
24625
  docusaurus: "create-docusaurus",
@@ -24656,9 +24658,9 @@ var init_frameworks = __esm({
24656
24658
  };
24657
24659
  runFrameworkGenerator = async (ctx, args) => {
24658
24660
  const cli = getFrameworkCli(ctx, true);
24659
- const { npm: npm13, dlx } = detectPackageManager();
24660
- const cmd = [...npm13 === "yarn" ? ["npx"] : dlx, cli, ...args];
24661
- const env2 = npm13 === "yarn" ? { npm_config_user_agent: "yarn" } : {};
24661
+ const { npm: npm14, dlx } = detectPackageManager();
24662
+ const cmd = [...npm14 === "yarn" ? ["npx"] : dlx, cli, ...args];
24663
+ const env2 = npm14 === "yarn" ? { npm_config_user_agent: "yarn" } : {};
24662
24664
  if (ctx.args.additionalArgs?.length) {
24663
24665
  cmd.push(...ctx.args.additionalArgs);
24664
24666
  }
@@ -29705,7 +29707,7 @@ var require_index_688c5d50 = __commonJS({
29705
29707
  }
29706
29708
  }
29707
29709
  };
29708
- var types6 = createCommonjsModule(function(module3, exports3) {
29710
+ var types7 = createCommonjsModule(function(module3, exports3) {
29709
29711
  exports3.name = /* @__PURE__ */ new Map([
29710
29712
  ["0", "File"],
29711
29713
  // same as File
@@ -29959,14 +29961,14 @@ var require_index_688c5d50 = __commonJS({
29959
29961
  }
29960
29962
  }
29961
29963
  get type() {
29962
- return types6.name.get(this[TYPE]) || this[TYPE];
29964
+ return types7.name.get(this[TYPE]) || this[TYPE];
29963
29965
  }
29964
29966
  get typeKey() {
29965
29967
  return this[TYPE];
29966
29968
  }
29967
29969
  set type(type) {
29968
- if (types6.code.has(type))
29969
- this[TYPE] = types6.code.get(type);
29970
+ if (types7.code.has(type))
29971
+ this[TYPE] = types7.code.get(type);
29970
29972
  else
29971
29973
  this[TYPE] = type;
29972
29974
  }
@@ -33078,7 +33080,7 @@ var require_index_688c5d50 = __commonJS({
33078
33080
  exports3.WriteEntry = writeEntry;
33079
33081
  exports3.Header = header;
33080
33082
  exports3.Pax = pax;
33081
- exports3.types = types6;
33083
+ exports3.types = types7;
33082
33084
  });
33083
33085
  var colorName = {
33084
33086
  "aliceblue": [240, 248, 255],
@@ -39421,97 +39423,6 @@ var init_validators = __esm({
39421
39423
  }
39422
39424
  });
39423
39425
 
39424
- // templates/angular/c3.ts
39425
- var c3_exports = {};
39426
- __export(c3_exports, {
39427
- default: () => c3_default
39428
- });
39429
- async function installCFWorker() {
39430
- await installPackages(
39431
- ["@cloudflare/workers-types", "@miniflare/tre@next", "wrangler@beta"],
39432
- {
39433
- dev: true,
39434
- startText: "Installing adapter dependencies",
39435
- doneText: `${brandColor("installed")} ${dim(`via \`${npm} install\``)}`
39436
- }
39437
- );
39438
- }
39439
- async function updateAppCode() {
39440
- const s = spinner();
39441
- s.start(`Updating application code`);
39442
- const appConfigPath = "src/app/app.config.ts";
39443
- const appConfig = readFile((0, import_node_path.resolve)(appConfigPath));
39444
- const newAppConfig = "import { provideHttpClient, withFetch } from '@angular/common/http';\n" + appConfig.replace(
39445
- "providers: [",
39446
- "providers: [provideHttpClient(withFetch()), "
39447
- );
39448
- writeFile2((0, import_node_path.resolve)(appConfigPath), newAppConfig);
39449
- s.stop(`${brandColor(`updated`)} ${dim(appConfigPath)}`);
39450
- s.start(`Updating package.json`);
39451
- const packageJsonPath = (0, import_node_path.resolve)("package.json");
39452
- const packageManifest = readJSON(packageJsonPath);
39453
- delete packageManifest["dependencies"]["@angular/ssr"];
39454
- delete packageManifest["dependencies"]["express"];
39455
- writeFile2(packageJsonPath, JSON.stringify(packageManifest, null, 2));
39456
- s.stop(`${brandColor(`updated`)} ${dim(`\`package.json\``)}`);
39457
- }
39458
- function updateAngularJson(ctx) {
39459
- const s = spinner();
39460
- s.start(`Updating angular.json config`);
39461
- const angularJson = readJSON((0, import_node_path.resolve)("angular.json"));
39462
- const architectSection = angularJson.projects[ctx.project.name].architect;
39463
- architectSection.build.options.outputPath = "dist";
39464
- architectSection.build.options.assets.push("src/_routes.json");
39465
- writeFile2((0, import_node_path.resolve)("angular.json"), JSON.stringify(angularJson, null, 2));
39466
- s.stop(`${brandColor(`updated`)} ${dim(`\`angular.json\``)}`);
39467
- }
39468
- var import_node_path, npm, generate, configure, config, c3_default;
39469
- var init_c3 = __esm({
39470
- "templates/angular/c3.ts"() {
39471
- import_node_path = require("node:path");
39472
- init_cli();
39473
- init_colors();
39474
- init_interactive();
39475
- init_frameworks();
39476
- init_compatDate();
39477
- init_files();
39478
- init_packageManagers();
39479
- init_packages();
39480
- ({ npm } = detectPackageManager());
39481
- generate = async (ctx) => {
39482
- await runFrameworkGenerator(ctx, [ctx.project.name, "--ssr"]);
39483
- logRaw("");
39484
- };
39485
- configure = async (ctx) => {
39486
- updateAngularJson(ctx);
39487
- await updateAppCode();
39488
- await installCFWorker();
39489
- };
39490
- config = {
39491
- configVersion: 1,
39492
- id: "angular",
39493
- displayName: "Angular",
39494
- platform: "pages",
39495
- copyFiles: {
39496
- path: "./templates"
39497
- },
39498
- devScript: "start",
39499
- deployScript: "deploy",
39500
- generate,
39501
- configure,
39502
- transformPackageJson: async () => ({
39503
- scripts: {
39504
- start: `${npm} run build && wrangler pages dev dist/cloudflare ${await compatDateFlag()} --experimental-local`,
39505
- build: `ng build && ${npm} run process`,
39506
- process: "node ./tools/copy-files.mjs && node ./tools/alter-polyfills.mjs",
39507
- deploy: `${npm} run build && wrangler pages deploy dist/cloudflare`
39508
- }
39509
- })
39510
- };
39511
- c3_default = config;
39512
- }
39513
- });
39514
-
39515
39426
  // ../../node_modules/.pnpm/tslib@2.5.3/node_modules/tslib/tslib.es6.mjs
39516
39427
  var tslib_es6_exports = {};
39517
39428
  __export(tslib_es6_exports, {
@@ -40102,9 +40013,9 @@ var require_types = __commonJS({
40102
40013
  /** @class */
40103
40014
  function(_super) {
40104
40015
  (0, tslib_1.__extends)(OrType2, _super);
40105
- function OrType2(types6) {
40016
+ function OrType2(types7) {
40106
40017
  var _this = _super.call(this) || this;
40107
- _this.types = types6;
40018
+ _this.types = types7;
40108
40019
  _this.kind = "OrType";
40109
40020
  return _this;
40110
40021
  }
@@ -40249,11 +40160,11 @@ var require_types = __commonJS({
40249
40160
  function typesPlugin(_fork) {
40250
40161
  var Type = {
40251
40162
  or: function() {
40252
- var types6 = [];
40163
+ var types7 = [];
40253
40164
  for (var _i = 0; _i < arguments.length; _i++) {
40254
- types6[_i] = arguments[_i];
40165
+ types7[_i] = arguments[_i];
40255
40166
  }
40256
- return new OrType(types6.map(function(type) {
40167
+ return new OrType(types7.map(function(type) {
40257
40168
  return Type.from(type);
40258
40169
  }));
40259
40170
  },
@@ -40702,9 +40613,9 @@ var require_path = __commonJS({
40702
40613
  var Op = Object.prototype;
40703
40614
  var hasOwn = Op.hasOwnProperty;
40704
40615
  function pathPlugin(fork) {
40705
- var types6 = fork.use(types_1.default);
40706
- var isArray = types6.builtInTypes.array;
40707
- var isNumber = types6.builtInTypes.number;
40616
+ var types7 = fork.use(types_1.default);
40617
+ var isArray = types7.builtInTypes.array;
40618
+ var isNumber = types7.builtInTypes.number;
40708
40619
  var Path = function Path2(value, parentPath, name) {
40709
40620
  if (!(this instanceof Path2)) {
40710
40621
  throw new Error("Path constructor cannot be invoked without 'new'");
@@ -41004,13 +40915,13 @@ var require_scope = __commonJS({
41004
40915
  var types_1 = (0, tslib_1.__importDefault)(require_types());
41005
40916
  var hasOwn = Object.prototype.hasOwnProperty;
41006
40917
  function scopePlugin(fork) {
41007
- var types6 = fork.use(types_1.default);
41008
- var Type = types6.Type;
41009
- var namedTypes = types6.namedTypes;
40918
+ var types7 = fork.use(types_1.default);
40919
+ var Type = types7.Type;
40920
+ var namedTypes = types7.namedTypes;
41010
40921
  var Node = namedTypes.Node;
41011
40922
  var Expression = namedTypes.Expression;
41012
- var isArray = types6.builtInTypes.array;
41013
- var b2 = types6.builders;
40923
+ var isArray = types7.builtInTypes.array;
40924
+ var b2 = types7.builders;
41014
40925
  var Scope = function Scope2(path4, parentScope) {
41015
40926
  if (!(this instanceof Scope2)) {
41016
40927
  throw new Error("Scope constructor cannot be invoked without 'new'");
@@ -41078,7 +40989,7 @@ var require_scope = __commonJS({
41078
40989
  ++index;
41079
40990
  }
41080
40991
  var name = prefix + index;
41081
- return this.bindings[name] = types6.builders.identifier(name);
40992
+ return this.bindings[name] = types7.builders.identifier(name);
41082
40993
  };
41083
40994
  Sp.injectTemporary = function(identifier, init) {
41084
40995
  identifier || (identifier = this.declareTemporary());
@@ -41158,7 +41069,7 @@ var require_scope = __commonJS({
41158
41069
  bindings
41159
41070
  );
41160
41071
  } else if (Node.check(node) && !Expression.check(node)) {
41161
- types6.eachField(node, function(name, child) {
41072
+ types7.eachField(node, function(name, child) {
41162
41073
  var childPath = path4.get(name);
41163
41074
  if (!pathHasValue(childPath, child)) {
41164
41075
  throw new Error("");
@@ -41237,24 +41148,24 @@ var require_scope = __commonJS({
41237
41148
  addPattern(patternPath.get("argument"), bindings);
41238
41149
  }
41239
41150
  }
41240
- function addTypePattern(patternPath, types7) {
41151
+ function addTypePattern(patternPath, types8) {
41241
41152
  var pattern = patternPath.value;
41242
41153
  namedTypes.Pattern.assert(pattern);
41243
41154
  if (namedTypes.Identifier.check(pattern)) {
41244
- if (hasOwn.call(types7, pattern.name)) {
41245
- types7[pattern.name].push(patternPath);
41155
+ if (hasOwn.call(types8, pattern.name)) {
41156
+ types8[pattern.name].push(patternPath);
41246
41157
  } else {
41247
- types7[pattern.name] = [patternPath];
41158
+ types8[pattern.name] = [patternPath];
41248
41159
  }
41249
41160
  }
41250
41161
  }
41251
- function addTypeParameter(parameterPath, types7) {
41162
+ function addTypeParameter(parameterPath, types8) {
41252
41163
  var parameter = parameterPath.value;
41253
41164
  FlowOrTSTypeParameterType.assert(parameter);
41254
- if (hasOwn.call(types7, parameter.name)) {
41255
- types7[parameter.name].push(parameterPath);
41165
+ if (hasOwn.call(types8, parameter.name)) {
41166
+ types8[parameter.name].push(parameterPath);
41256
41167
  } else {
41257
- types7[parameter.name] = [parameterPath];
41168
+ types8[parameter.name] = [parameterPath];
41258
41169
  }
41259
41170
  }
41260
41171
  Sp.lookup = function(name) {
@@ -41292,11 +41203,11 @@ var require_node_path = __commonJS({
41292
41203
  var path_1 = (0, tslib_1.__importDefault)(require_path());
41293
41204
  var scope_1 = (0, tslib_1.__importDefault)(require_scope());
41294
41205
  function nodePathPlugin(fork) {
41295
- var types6 = fork.use(types_1.default);
41296
- var n2 = types6.namedTypes;
41297
- var b2 = types6.builders;
41298
- var isNumber = types6.builtInTypes.number;
41299
- var isArray = types6.builtInTypes.array;
41206
+ var types7 = fork.use(types_1.default);
41207
+ var n2 = types7.namedTypes;
41208
+ var b2 = types7.builders;
41209
+ var isNumber = types7.builtInTypes.number;
41210
+ var isArray = types7.builtInTypes.array;
41300
41211
  var Path = fork.use(path_1.default);
41301
41212
  var Scope = fork.use(scope_1.default);
41302
41213
  var NodePath = function NodePath2(value, parentPath, name) {
@@ -41387,7 +41298,7 @@ var require_node_path = __commonJS({
41387
41298
  return scope || null;
41388
41299
  };
41389
41300
  NPp.getValueProperty = function(name) {
41390
- return types6.getFieldValue(this.value, name);
41301
+ return types7.getFieldValue(this.value, name);
41391
41302
  };
41392
41303
  NPp.needsParens = function(assumeExpressionContext) {
41393
41304
  var pp = this.parentPath;
@@ -41529,7 +41440,7 @@ var require_node_path = __commonJS({
41529
41440
  return node.some(containsCallExpression);
41530
41441
  }
41531
41442
  if (n2.Node.check(node)) {
41532
- return types6.someField(node, function(_name, child) {
41443
+ return types7.someField(node, function(_name, child) {
41533
41444
  return containsCallExpression(child);
41534
41445
  });
41535
41446
  }
@@ -41647,11 +41558,11 @@ var require_path_visitor = __commonJS({
41647
41558
  var node_path_1 = (0, tslib_1.__importDefault)(require_node_path());
41648
41559
  var hasOwn = Object.prototype.hasOwnProperty;
41649
41560
  function pathVisitorPlugin(fork) {
41650
- var types6 = fork.use(types_1.default);
41561
+ var types7 = fork.use(types_1.default);
41651
41562
  var NodePath = fork.use(node_path_1.default);
41652
- var isArray = types6.builtInTypes.array;
41653
- var isObject2 = types6.builtInTypes.object;
41654
- var isFunction2 = types6.builtInTypes.function;
41563
+ var isArray = types7.builtInTypes.array;
41564
+ var isObject2 = types7.builtInTypes.object;
41565
+ var isFunction2 = types7.builtInTypes.function;
41655
41566
  var undefined2;
41656
41567
  var PathVisitor = function PathVisitor2() {
41657
41568
  if (!(this instanceof PathVisitor2)) {
@@ -41671,7 +41582,7 @@ var require_path_visitor = __commonJS({
41671
41582
  typeNames[methodName.slice("visit".length)] = true;
41672
41583
  }
41673
41584
  }
41674
- var supertypeTable = types6.computeSupertypeLookupTable(typeNames);
41585
+ var supertypeTable = types7.computeSupertypeLookupTable(typeNames);
41675
41586
  var methodNameTable = /* @__PURE__ */ Object.create(null);
41676
41587
  var typeNameKeys = Object.keys(supertypeTable);
41677
41588
  var typeNameCount = typeNameKeys.length;
@@ -41790,7 +41701,7 @@ var require_path_visitor = __commonJS({
41790
41701
  path4.each(visitor.visitWithoutReset, visitor);
41791
41702
  } else if (!isObject2.check(value)) {
41792
41703
  } else {
41793
- var childNames = types6.getFieldNames(value);
41704
+ var childNames = types7.getFieldNames(value);
41794
41705
  if (visitor._shouldVisitComments && value.comments && childNames.indexOf("comments") < 0) {
41795
41706
  childNames.push("comments");
41796
41707
  }
@@ -41799,7 +41710,7 @@ var require_path_visitor = __commonJS({
41799
41710
  for (var i = 0; i < childCount; ++i) {
41800
41711
  var childName = childNames[i];
41801
41712
  if (!hasOwn.call(value, childName)) {
41802
- value[childName] = types6.getFieldValue(value, childName);
41713
+ value[childName] = types7.getFieldValue(value, childName);
41803
41714
  }
41804
41715
  childPaths.push(path4.get(childName));
41805
41716
  }
@@ -41939,13 +41850,13 @@ var require_equiv = __commonJS({
41939
41850
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
41940
41851
  var types_1 = (0, tslib_1.__importDefault)(require_types());
41941
41852
  function default_1(fork) {
41942
- var types6 = fork.use(types_1.default);
41943
- var getFieldNames = types6.getFieldNames;
41944
- var getFieldValue = types6.getFieldValue;
41945
- var isArray = types6.builtInTypes.array;
41946
- var isObject2 = types6.builtInTypes.object;
41947
- var isDate = types6.builtInTypes.Date;
41948
- var isRegExp = types6.builtInTypes.RegExp;
41853
+ var types7 = fork.use(types_1.default);
41854
+ var getFieldNames = types7.getFieldNames;
41855
+ var getFieldValue = types7.getFieldValue;
41856
+ var isArray = types7.builtInTypes.array;
41857
+ var isObject2 = types7.builtInTypes.object;
41858
+ var isDate = types7.builtInTypes.Date;
41859
+ var isRegExp = types7.builtInTypes.RegExp;
41949
41860
  var hasOwn = Object.prototype.hasOwnProperty;
41950
41861
  function astNodesAreEquivalent(a, b2, problemPath) {
41951
41862
  if (isArray.check(problemPath)) {
@@ -42095,24 +42006,24 @@ var require_fork = __commonJS({
42095
42006
  var node_path_1 = (0, tslib_1.__importDefault)(require_node_path());
42096
42007
  function default_1(plugins) {
42097
42008
  var fork = createFork();
42098
- var types6 = fork.use(types_1.default);
42009
+ var types7 = fork.use(types_1.default);
42099
42010
  plugins.forEach(fork.use);
42100
- types6.finalize();
42011
+ types7.finalize();
42101
42012
  var PathVisitor = fork.use(path_visitor_1.default);
42102
42013
  return {
42103
- Type: types6.Type,
42104
- builtInTypes: types6.builtInTypes,
42105
- namedTypes: types6.namedTypes,
42106
- builders: types6.builders,
42107
- defineMethod: types6.defineMethod,
42108
- getFieldNames: types6.getFieldNames,
42109
- getFieldValue: types6.getFieldValue,
42110
- eachField: types6.eachField,
42111
- someField: types6.someField,
42112
- getSupertypeNames: types6.getSupertypeNames,
42113
- getBuilderName: types6.getBuilderName,
42014
+ Type: types7.Type,
42015
+ builtInTypes: types7.builtInTypes,
42016
+ namedTypes: types7.namedTypes,
42017
+ builders: types7.builders,
42018
+ defineMethod: types7.defineMethod,
42019
+ getFieldNames: types7.getFieldNames,
42020
+ getFieldValue: types7.getFieldValue,
42021
+ eachField: types7.eachField,
42022
+ someField: types7.someField,
42023
+ getSupertypeNames: types7.getSupertypeNames,
42024
+ getBuilderName: types7.getBuilderName,
42114
42025
  astNodesAreEquivalent: fork.use(equiv_1.default),
42115
- finalize: types6.finalize,
42026
+ finalize: types7.finalize,
42116
42027
  Path: fork.use(path_1.default),
42117
42028
  NodePath: fork.use(node_path_1.default),
42118
42029
  PathVisitor,
@@ -42148,9 +42059,9 @@ var require_shared = __commonJS({
42148
42059
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
42149
42060
  var types_1 = (0, tslib_1.__importDefault)(require_types());
42150
42061
  function default_1(fork) {
42151
- var types6 = fork.use(types_1.default);
42152
- var Type = types6.Type;
42153
- var builtin = types6.builtInTypes;
42062
+ var types7 = fork.use(types_1.default);
42063
+ var Type = types7.Type;
42064
+ var builtin = types7.builtInTypes;
42154
42065
  var isNumber = builtin.number;
42155
42066
  function geq(than) {
42156
42067
  return Type.from(function(value) {
@@ -42329,8 +42240,8 @@ var require_core2 = __commonJS({
42329
42240
  var types_1 = (0, tslib_1.__importDefault)(require_types());
42330
42241
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
42331
42242
  function default_1(fork) {
42332
- var types6 = fork.use(types_1.default);
42333
- var Type = types6.Type;
42243
+ var types7 = fork.use(types_1.default);
42244
+ var Type = types7.Type;
42334
42245
  var def = Type.def;
42335
42246
  var or = Type.or;
42336
42247
  var shared = fork.use(shared_1.default);
@@ -42420,9 +42331,9 @@ var require_es6 = __commonJS({
42420
42331
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
42421
42332
  function default_1(fork) {
42422
42333
  fork.use(core_1.default);
42423
- var types6 = fork.use(types_1.default);
42424
- var def = types6.Type.def;
42425
- var or = types6.Type.or;
42334
+ var types7 = fork.use(types_1.default);
42335
+ var def = types7.Type.def;
42336
+ var or = types7.Type.or;
42426
42337
  var defaults = fork.use(shared_1.default).defaults;
42427
42338
  def("Function").field("generator", Boolean, defaults["false"]).field("expression", Boolean, defaults["false"]).field("defaults", [or(def("Expression"), null)], defaults.emptyArray).field("rest", or(def("Identifier"), null), defaults["null"]);
42428
42339
  def("RestElement").bases("Pattern").build("argument").field("argument", def("Pattern")).field(
@@ -42508,8 +42419,8 @@ var require_es2017 = __commonJS({
42508
42419
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
42509
42420
  function default_1(fork) {
42510
42421
  fork.use(es2016_1.default);
42511
- var types6 = fork.use(types_1.default);
42512
- var def = types6.Type.def;
42422
+ var types7 = fork.use(types_1.default);
42423
+ var def = types7.Type.def;
42513
42424
  var defaults = fork.use(shared_1.default).defaults;
42514
42425
  def("Function").field("async", Boolean, defaults["false"]);
42515
42426
  def("AwaitExpression").bases("Expression").build("argument").field("argument", def("Expression"));
@@ -42530,9 +42441,9 @@ var require_es2018 = __commonJS({
42530
42441
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
42531
42442
  function default_1(fork) {
42532
42443
  fork.use(es2017_1.default);
42533
- var types6 = fork.use(types_1.default);
42534
- var def = types6.Type.def;
42535
- var or = types6.Type.or;
42444
+ var types7 = fork.use(types_1.default);
42445
+ var def = types7.Type.def;
42446
+ var or = types7.Type.or;
42536
42447
  var defaults = fork.use(shared_1.default).defaults;
42537
42448
  def("ForOfStatement").field("await", Boolean, defaults["false"]);
42538
42449
  def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
@@ -42562,9 +42473,9 @@ var require_es2019 = __commonJS({
42562
42473
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
42563
42474
  function default_1(fork) {
42564
42475
  fork.use(es2018_1.default);
42565
- var types6 = fork.use(types_1.default);
42566
- var def = types6.Type.def;
42567
- var or = types6.Type.or;
42476
+ var types7 = fork.use(types_1.default);
42477
+ var def = types7.Type.def;
42478
+ var or = types7.Type.or;
42568
42479
  var defaults = fork.use(shared_1.default).defaults;
42569
42480
  def("CatchClause").field("param", or(def("Pattern"), null), defaults["null"]);
42570
42481
  }
@@ -42586,9 +42497,9 @@ var require_es20202 = __commonJS({
42586
42497
  function default_1(fork) {
42587
42498
  fork.use(es2020_1.default);
42588
42499
  fork.use(es2019_1.default);
42589
- var types6 = fork.use(types_1.default);
42590
- var def = types6.Type.def;
42591
- var or = types6.Type.or;
42500
+ var types7 = fork.use(types_1.default);
42501
+ var def = types7.Type.def;
42502
+ var or = types7.Type.or;
42592
42503
  var shared = fork.use(shared_1.default);
42593
42504
  var defaults = shared.defaults;
42594
42505
  def("ImportExpression").bases("Expression").build("source").field("source", def("Expression"));
@@ -42632,8 +42543,8 @@ var require_es2022 = __commonJS({
42632
42543
  var types_1 = (0, tslib_1.__importDefault)(require_types());
42633
42544
  function default_1(fork) {
42634
42545
  fork.use(es2021_1.default);
42635
- var types6 = fork.use(types_1.default);
42636
- var def = types6.Type.def;
42546
+ var types7 = fork.use(types_1.default);
42547
+ var def = types7.Type.def;
42637
42548
  def("StaticBlock").bases("Declaration").build("body").field("body", [def("Statement")]);
42638
42549
  }
42639
42550
  exports2.default = default_1;
@@ -42652,9 +42563,9 @@ var require_es_proposals = __commonJS({
42652
42563
  var es2022_1 = (0, tslib_1.__importDefault)(require_es2022());
42653
42564
  function default_1(fork) {
42654
42565
  fork.use(es2022_1.default);
42655
- var types6 = fork.use(types_1.default);
42656
- var Type = types6.Type;
42657
- var def = types6.Type.def;
42566
+ var types7 = fork.use(types_1.default);
42567
+ var Type = types7.Type;
42568
+ var def = types7.Type.def;
42658
42569
  var or = Type.or;
42659
42570
  var shared = fork.use(shared_1.default);
42660
42571
  var defaults = shared.defaults;
@@ -42692,9 +42603,9 @@ var require_jsx = __commonJS({
42692
42603
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
42693
42604
  function default_1(fork) {
42694
42605
  fork.use(es_proposals_1.default);
42695
- var types6 = fork.use(types_1.default);
42696
- var def = types6.Type.def;
42697
- var or = types6.Type.or;
42606
+ var types7 = fork.use(types_1.default);
42607
+ var def = types7.Type.def;
42608
+ var or = types7.Type.or;
42698
42609
  var defaults = fork.use(shared_1.default).defaults;
42699
42610
  def("JSXAttribute").bases("Node").build("name", "value").field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))).field("value", or(
42700
42611
  def("Literal"),
@@ -42756,9 +42667,9 @@ var require_type_annotations = __commonJS({
42756
42667
  var types_1 = (0, tslib_1.__importDefault)(require_types());
42757
42668
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
42758
42669
  function default_1(fork) {
42759
- var types6 = fork.use(types_1.default);
42760
- var def = types6.Type.def;
42761
- var or = types6.Type.or;
42670
+ var types7 = fork.use(types_1.default);
42671
+ var def = types7.Type.def;
42672
+ var or = types7.Type.or;
42762
42673
  var defaults = fork.use(shared_1.default).defaults;
42763
42674
  var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null);
42764
42675
  var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null);
@@ -42791,9 +42702,9 @@ var require_flow = __commonJS({
42791
42702
  function default_1(fork) {
42792
42703
  fork.use(es_proposals_1.default);
42793
42704
  fork.use(type_annotations_1.default);
42794
- var types6 = fork.use(types_1.default);
42795
- var def = types6.Type.def;
42796
- var or = types6.Type.or;
42705
+ var types7 = fork.use(types_1.default);
42706
+ var def = types7.Type.def;
42707
+ var or = types7.Type.or;
42797
42708
  var defaults = fork.use(shared_1.default).defaults;
42798
42709
  def("Flow").bases("Node");
42799
42710
  def("FlowType").bases("Flow");
@@ -42908,10 +42819,10 @@ var require_esprima = __commonJS({
42908
42819
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
42909
42820
  function default_1(fork) {
42910
42821
  fork.use(es_proposals_1.default);
42911
- var types6 = fork.use(types_1.default);
42822
+ var types7 = fork.use(types_1.default);
42912
42823
  var defaults = fork.use(shared_1.default).defaults;
42913
- var def = types6.Type.def;
42914
- var or = types6.Type.or;
42824
+ var def = types7.Type.def;
42825
+ var or = types7.Type.or;
42915
42826
  def("VariableDeclaration").field("declarations", [or(
42916
42827
  def("VariableDeclarator"),
42917
42828
  def("Identifier")
@@ -42968,11 +42879,11 @@ var require_babel_core = __commonJS({
42968
42879
  function default_1(fork) {
42969
42880
  var _a2, _b2, _c2, _d, _e;
42970
42881
  fork.use(es_proposals_1.default);
42971
- var types6 = fork.use(types_1.default);
42882
+ var types7 = fork.use(types_1.default);
42972
42883
  var defaults = fork.use(shared_1.default).defaults;
42973
- var def = types6.Type.def;
42974
- var or = types6.Type.or;
42975
- var isUndefined = types6.builtInTypes.undefined;
42884
+ var def = types7.Type.def;
42885
+ var or = types7.Type.or;
42886
+ var isUndefined = types7.builtInTypes.undefined;
42976
42887
  def("Noop").bases("Statement").build();
42977
42888
  def("DoExpression").bases("Expression").build("body").field("body", [def("Statement")]);
42978
42889
  def("BindExpression").bases("Expression").build("object", "callee").field("object", or(def("Expression"), null)).field("callee", def("Expression"));
@@ -43007,7 +42918,7 @@ var require_babel_core = __commonJS({
43007
42918
  raw: String
43008
42919
  },
43009
42920
  function getDefault() {
43010
- var value = types6.getFieldValue(this, "value");
42921
+ var value = types7.getFieldValue(this, "value");
43011
42922
  return {
43012
42923
  rawValue: value,
43013
42924
  raw: toRaw ? toRaw(value) : String(value)
@@ -43098,8 +43009,8 @@ var require_babel = __commonJS({
43098
43009
  var babel_core_1 = (0, tslib_1.__importDefault)(require_babel_core());
43099
43010
  var flow_1 = (0, tslib_1.__importDefault)(require_flow());
43100
43011
  function default_1(fork) {
43101
- var types6 = fork.use(types_1.default);
43102
- var def = types6.Type.def;
43012
+ var types7 = fork.use(types_1.default);
43013
+ var def = types7.Type.def;
43103
43014
  fork.use(babel_core_1.default);
43104
43015
  fork.use(flow_1.default);
43105
43016
  def("V8IntrinsicIdentifier").bases("Expression").build("name").field("name", String);
@@ -43123,12 +43034,12 @@ var require_typescript = __commonJS({
43123
43034
  function default_1(fork) {
43124
43035
  fork.use(babel_core_1.default);
43125
43036
  fork.use(type_annotations_1.default);
43126
- var types6 = fork.use(types_1.default);
43127
- var n2 = types6.namedTypes;
43128
- var def = types6.Type.def;
43129
- var or = types6.Type.or;
43037
+ var types7 = fork.use(types_1.default);
43038
+ var n2 = types7.namedTypes;
43039
+ var def = types7.Type.def;
43040
+ var or = types7.Type.or;
43130
43041
  var defaults = fork.use(shared_1.default).defaults;
43131
- var StringLiteral = types6.Type.from(function(value, deep) {
43042
+ var StringLiteral = types7.Type.from(function(value, deep) {
43132
43043
  if (n2.StringLiteral && n2.StringLiteral.check(value, deep)) {
43133
43044
  return true;
43134
43045
  }
@@ -45106,8 +45017,8 @@ var require_util9 = __commonJS({
45106
45017
  exports2.isTrailingCommaEnabled = exports2.getParentExportDeclaration = exports2.isExportDeclaration = exports2.fixFaultyLocations = exports2.getTrueLoc = exports2.composeSourceMaps = exports2.copyPos = exports2.comparePos = exports2.getUnionOfKeys = exports2.getOption = exports2.isBrowser = exports2.getLineTerminator = void 0;
45107
45018
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
45108
45019
  var assert_1 = tslib_1.__importDefault(require("assert"));
45109
- var types6 = tslib_1.__importStar(require_main2());
45110
- var n2 = types6.namedTypes;
45020
+ var types7 = tslib_1.__importStar(require_main2());
45021
+ var n2 = types7.namedTypes;
45111
45022
  var source_map_1 = tslib_1.__importDefault(require_source_map());
45112
45023
  var SourceMapConsumer = source_map_1.default.SourceMapConsumer;
45113
45024
  var SourceMapGenerator = source_map_1.default.SourceMapGenerator;
@@ -51532,13 +51443,13 @@ var require_esprima2 = __commonJS({
51532
51443
  return Reader2;
51533
51444
  }();
51534
51445
  var Tokenizer = function() {
51535
- function Tokenizer2(code, config13) {
51446
+ function Tokenizer2(code, config14) {
51536
51447
  this.errorHandler = new error_handler_1.ErrorHandler();
51537
- this.errorHandler.tolerant = config13 ? typeof config13.tolerant === "boolean" && config13.tolerant : false;
51448
+ this.errorHandler.tolerant = config14 ? typeof config14.tolerant === "boolean" && config14.tolerant : false;
51538
51449
  this.scanner = new scanner_1.Scanner(code, this.errorHandler);
51539
- this.scanner.trackComment = config13 ? typeof config13.comment === "boolean" && config13.comment : false;
51540
- this.trackRange = config13 ? typeof config13.range === "boolean" && config13.range : false;
51541
- this.trackLoc = config13 ? typeof config13.loc === "boolean" && config13.loc : false;
51450
+ this.scanner.trackComment = config14 ? typeof config14.comment === "boolean" && config14.comment : false;
51451
+ this.trackRange = config14 ? typeof config14.range === "boolean" && config14.range : false;
51452
+ this.trackLoc = config14 ? typeof config14.loc === "boolean" && config14.loc : false;
51542
51453
  this.buffer = [];
51543
51454
  this.reader = new Reader();
51544
51455
  }
@@ -52520,10 +52431,10 @@ var require_comments = __commonJS({
52520
52431
  exports2.printComments = exports2.attach = void 0;
52521
52432
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
52522
52433
  var assert_1 = tslib_1.__importDefault(require("assert"));
52523
- var types6 = tslib_1.__importStar(require_main2());
52524
- var n2 = types6.namedTypes;
52525
- var isArray = types6.builtInTypes.array;
52526
- var isObject2 = types6.builtInTypes.object;
52434
+ var types7 = tslib_1.__importStar(require_main2());
52435
+ var n2 = types7.namedTypes;
52436
+ var isArray = types7.builtInTypes.array;
52437
+ var isObject2 = types7.builtInTypes.object;
52527
52438
  var lines_1 = require_lines();
52528
52439
  var util_1 = require_util9();
52529
52440
  var childNodesCache = /* @__PURE__ */ new WeakMap();
@@ -52554,7 +52465,7 @@ var require_comments = __commonJS({
52554
52465
  if (isArray.check(node)) {
52555
52466
  names = Object.keys(node);
52556
52467
  } else if (isObject2.check(node)) {
52557
- names = types6.getFieldNames(node);
52468
+ names = types7.getFieldNames(node);
52558
52469
  } else {
52559
52470
  return resultArray;
52560
52471
  }
@@ -52734,7 +52645,7 @@ var require_comments = __commonJS({
52734
52645
  function printComments(path4, print2) {
52735
52646
  var value = path4.getValue();
52736
52647
  var innerLines = print2(path4);
52737
- var comments = n2.Node.check(value) && types6.getFieldValue(value, "comments");
52648
+ var comments = n2.Node.check(value) && types7.getFieldValue(value, "comments");
52738
52649
  if (!comments || comments.length === 0) {
52739
52650
  return innerLines;
52740
52651
  }
@@ -52742,8 +52653,8 @@ var require_comments = __commonJS({
52742
52653
  var trailingParts = [innerLines];
52743
52654
  path4.each(function(commentPath) {
52744
52655
  var comment = commentPath.getValue();
52745
- var leading = types6.getFieldValue(comment, "leading");
52746
- var trailing = types6.getFieldValue(comment, "trailing");
52656
+ var leading = types7.getFieldValue(comment, "leading");
52657
+ var trailing = types7.getFieldValue(comment, "trailing");
52747
52658
  if (leading || trailing && !(n2.Statement.check(value) || comment.type === "Block" || comment.type === "CommentBlock")) {
52748
52659
  leadingParts.push(printLeadingComment(commentPath, print2));
52749
52660
  } else if (trailing) {
@@ -52765,10 +52676,10 @@ var require_parser2 = __commonJS({
52765
52676
  exports2.parse = void 0;
52766
52677
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
52767
52678
  var assert_1 = tslib_1.__importDefault(require("assert"));
52768
- var types6 = tslib_1.__importStar(require_main2());
52769
- var b2 = types6.builders;
52770
- var isObject2 = types6.builtInTypes.object;
52771
- var isArray = types6.builtInTypes.array;
52679
+ var types7 = tslib_1.__importStar(require_main2());
52680
+ var b2 = types7.builders;
52681
+ var isObject2 = types7.builtInTypes.object;
52682
+ var isArray = types7.builtInTypes.array;
52772
52683
  var options_1 = require_options();
52773
52684
  var lines_1 = require_lines();
52774
52685
  var comments_1 = require_comments();
@@ -52955,11 +52866,11 @@ var require_fast_path = __commonJS({
52955
52866
  Object.defineProperty(exports2, "__esModule", { value: true });
52956
52867
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
52957
52868
  var assert_1 = tslib_1.__importDefault(require("assert"));
52958
- var types6 = tslib_1.__importStar(require_main2());
52869
+ var types7 = tslib_1.__importStar(require_main2());
52959
52870
  var util = tslib_1.__importStar(require_util9());
52960
- var n2 = types6.namedTypes;
52961
- var isArray = types6.builtInTypes.array;
52962
- var isNumber = types6.builtInTypes.number;
52871
+ var n2 = types7.namedTypes;
52872
+ var isArray = types7.builtInTypes.array;
52873
+ var isNumber = types7.builtInTypes.number;
52963
52874
  var PRECEDENCE = {};
52964
52875
  [
52965
52876
  ["??"],
@@ -52988,7 +52899,7 @@ var require_fast_path = __commonJS({
52988
52899
  if (obj instanceof FastPath) {
52989
52900
  return obj.copy();
52990
52901
  }
52991
- if (obj instanceof types6.NodePath) {
52902
+ if (obj instanceof types7.NodePath) {
52992
52903
  var copy = Object.create(FastPath.prototype);
52993
52904
  var stack = [obj.value];
52994
52905
  for (var pp = void 0; pp = obj.parentPath; obj = pp)
@@ -53299,7 +53210,7 @@ var require_fast_path = __commonJS({
53299
53210
  return node.some(containsCallExpression);
53300
53211
  }
53301
53212
  if (n2.Node.check(node)) {
53302
- return types6.someField(node, function(_name, child) {
53213
+ return types7.someField(node, function(_name, child) {
53303
53214
  return containsCallExpression(child);
53304
53215
  });
53305
53216
  }
@@ -53389,16 +53300,16 @@ var require_patcher = __commonJS({
53389
53300
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
53390
53301
  var assert_1 = tslib_1.__importDefault(require("assert"));
53391
53302
  var linesModule = tslib_1.__importStar(require_lines());
53392
- var types6 = tslib_1.__importStar(require_main2());
53393
- var Printable = types6.namedTypes.Printable;
53394
- var Expression = types6.namedTypes.Expression;
53395
- var ReturnStatement = types6.namedTypes.ReturnStatement;
53396
- var SourceLocation = types6.namedTypes.SourceLocation;
53303
+ var types7 = tslib_1.__importStar(require_main2());
53304
+ var Printable = types7.namedTypes.Printable;
53305
+ var Expression = types7.namedTypes.Expression;
53306
+ var ReturnStatement = types7.namedTypes.ReturnStatement;
53307
+ var SourceLocation = types7.namedTypes.SourceLocation;
53397
53308
  var util_1 = require_util9();
53398
53309
  var fast_path_1 = tslib_1.__importDefault(require_fast_path());
53399
- var isObject2 = types6.builtInTypes.object;
53400
- var isArray = types6.builtInTypes.array;
53401
- var isString = types6.builtInTypes.string;
53310
+ var isObject2 = types7.builtInTypes.object;
53311
+ var isArray = types7.builtInTypes.array;
53312
+ var isString = types7.builtInTypes.string;
53402
53313
  var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
53403
53314
  var Patcher = function Patcher2(lines) {
53404
53315
  assert_1.default.ok(this instanceof Patcher2);
@@ -53677,8 +53588,8 @@ var require_patcher = __commonJS({
53677
53588
  if (k2.charAt(0) === "_") {
53678
53589
  continue;
53679
53590
  }
53680
- newPath.stack.push(k2, types6.getFieldValue(newNode, k2));
53681
- oldPath.stack.push(k2, types6.getFieldValue(oldNode, k2));
53591
+ newPath.stack.push(k2, types7.getFieldValue(newNode, k2));
53592
+ oldPath.stack.push(k2, types7.getFieldValue(oldNode, k2));
53682
53593
  var canReprint = findAnyReprints(newPath, oldPath, reprints);
53683
53594
  newPath.stack.length -= 2;
53684
53595
  oldPath.stack.length -= 2;
@@ -53706,10 +53617,10 @@ var require_printer = __commonJS({
53706
53617
  var lines_1 = require_lines();
53707
53618
  var options_1 = require_options();
53708
53619
  var patcher_1 = require_patcher();
53709
- var types6 = tslib_1.__importStar(require_main2());
53710
- var namedTypes = types6.namedTypes;
53711
- var isString = types6.builtInTypes.string;
53712
- var isObject2 = types6.builtInTypes.object;
53620
+ var types7 = tslib_1.__importStar(require_main2());
53621
+ var namedTypes = types7.namedTypes;
53622
+ var isString = types7.builtInTypes.string;
53623
+ var isObject2 = types7.builtInTypes.object;
53713
53624
  var fast_path_1 = tslib_1.__importDefault(require_fast_path());
53714
53625
  var util = tslib_1.__importStar(require_util9());
53715
53626
  var PrintResult = function PrintResult2(code, sourceMap) {
@@ -53731,11 +53642,11 @@ var require_printer = __commonJS({
53731
53642
  return this.code;
53732
53643
  };
53733
53644
  var emptyPrintResult = new PrintResult("");
53734
- var Printer = function Printer2(config13) {
53645
+ var Printer = function Printer2(config14) {
53735
53646
  assert_1.default.ok(this instanceof Printer2);
53736
- var explicitTabWidth = config13 && config13.tabWidth;
53737
- config13 = options_1.normalize(config13);
53738
- config13.sourceFileName = null;
53647
+ var explicitTabWidth = config14 && config14.tabWidth;
53648
+ config14 = options_1.normalize(config14);
53649
+ config14.sourceFileName = null;
53739
53650
  function makePrintFunctionWith(options, overrides) {
53740
53651
  options = Object.assign({}, options, overrides);
53741
53652
  return function(path4) {
@@ -53750,11 +53661,11 @@ var require_printer = __commonJS({
53750
53661
  includeComments: false
53751
53662
  }));
53752
53663
  }
53753
- var oldTabWidth = config13.tabWidth;
53664
+ var oldTabWidth = config14.tabWidth;
53754
53665
  if (!explicitTabWidth) {
53755
53666
  var loc = path4.getNode().loc;
53756
53667
  if (loc && loc.lines && loc.lines.guessTabWidth) {
53757
- config13.tabWidth = loc.lines.guessTabWidth();
53668
+ config14.tabWidth = loc.lines.guessTabWidth();
53758
53669
  }
53759
53670
  }
53760
53671
  var reprinter = patcher_1.getReprinter(path4);
@@ -53768,11 +53679,11 @@ var require_printer = __commonJS({
53768
53679
  // right choice because it gives us the opportunity to reprint
53769
53680
  // such nodes using their original source.
53770
53681
  reprinter(print2)
53771
- ) : genericPrint(path4, config13, options, makePrintFunctionWith(options, {
53682
+ ) : genericPrint(path4, config14, options, makePrintFunctionWith(options, {
53772
53683
  includeComments: true,
53773
53684
  avoidRootParens: false
53774
53685
  }));
53775
- config13.tabWidth = oldTabWidth;
53686
+ config14.tabWidth = oldTabWidth;
53776
53687
  return lines;
53777
53688
  }
53778
53689
  this.print = function(ast) {
@@ -53783,7 +53694,7 @@ var require_printer = __commonJS({
53783
53694
  includeComments: true,
53784
53695
  avoidRootParens: false
53785
53696
  });
53786
- return new PrintResult(lines.toString(config13), util.composeSourceMaps(config13.inputSourceMap, lines.getSourceMap(config13.sourceMapName, config13.sourceRoot)));
53697
+ return new PrintResult(lines.toString(config14), util.composeSourceMaps(config14.inputSourceMap, lines.getSourceMap(config14.sourceMapName, config14.sourceRoot)));
53787
53698
  };
53788
53699
  this.printGenerically = function(ast) {
53789
53700
  if (!ast) {
@@ -53791,26 +53702,26 @@ var require_printer = __commonJS({
53791
53702
  }
53792
53703
  function printGenerically(path5) {
53793
53704
  return comments_1.printComments(path5, function(path6) {
53794
- return genericPrint(path6, config13, {
53705
+ return genericPrint(path6, config14, {
53795
53706
  includeComments: true,
53796
53707
  avoidRootParens: false
53797
53708
  }, printGenerically);
53798
53709
  });
53799
53710
  }
53800
53711
  var path4 = fast_path_1.default.from(ast);
53801
- var oldReuseWhitespace = config13.reuseWhitespace;
53802
- config13.reuseWhitespace = false;
53803
- var pr = new PrintResult(printGenerically(path4).toString(config13));
53804
- config13.reuseWhitespace = oldReuseWhitespace;
53712
+ var oldReuseWhitespace = config14.reuseWhitespace;
53713
+ config14.reuseWhitespace = false;
53714
+ var pr = new PrintResult(printGenerically(path4).toString(config14));
53715
+ config14.reuseWhitespace = oldReuseWhitespace;
53805
53716
  return pr;
53806
53717
  };
53807
53718
  };
53808
53719
  exports2.Printer = Printer;
53809
- function genericPrint(path4, config13, options, printPath) {
53720
+ function genericPrint(path4, config14, options, printPath) {
53810
53721
  assert_1.default.ok(path4 instanceof fast_path_1.default);
53811
53722
  var node = path4.getValue();
53812
53723
  var parts = [];
53813
- var linesWithoutParens = genericPrintNoParens(path4, config13, printPath);
53724
+ var linesWithoutParens = genericPrintNoParens(path4, config14, printPath);
53814
53725
  if (!node || linesWithoutParens.isEmpty()) {
53815
53726
  return linesWithoutParens;
53816
53727
  }
@@ -53883,7 +53794,7 @@ var require_printer = __commonJS({
53883
53794
  case "OptionalMemberExpression": {
53884
53795
  parts.push(path4.call(print2, "object"));
53885
53796
  var property = path4.call(print2, "property");
53886
- var optional = types6.getFieldValue(n2, "optional");
53797
+ var optional = types7.getFieldValue(n2, "optional");
53887
53798
  if (n2.computed) {
53888
53799
  parts.push(optional ? "?.[" : "[", property, "]");
53889
53800
  } else {
@@ -54154,7 +54065,7 @@ var require_printer = __commonJS({
54154
54065
  if (n2.typeArguments) {
54155
54066
  parts.push(path4.call(print2, "typeArguments"));
54156
54067
  }
54157
- if (types6.getFieldValue(n2, "optional")) {
54068
+ if (types7.getFieldValue(n2, "optional")) {
54158
54069
  parts.push("?.");
54159
54070
  }
54160
54071
  parts.push(printArgumentsList(path4, options, print2));
@@ -55786,8 +55697,8 @@ var require_printer = __commonJS({
55786
55697
  });
55787
55698
  }
55788
55699
  function getPossibleRaw(node) {
55789
- var value = types6.getFieldValue(node, "value");
55790
- var extra = types6.getFieldValue(node, "extra");
55700
+ var value = types7.getFieldValue(node, "value");
55701
+ var extra = types7.getFieldValue(node, "extra");
55791
55702
  if (extra && typeof extra.raw === "string" && value == extra.rawValue) {
55792
55703
  return extra.raw;
55793
55704
  }
@@ -55835,8 +55746,8 @@ var require_main3 = __commonJS({
55835
55746
  exports2.run = exports2.prettyPrint = exports2.print = exports2.visit = exports2.types = exports2.parse = void 0;
55836
55747
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
55837
55748
  var fs_1 = tslib_1.__importDefault(require("fs"));
55838
- var types6 = tslib_1.__importStar(require_main2());
55839
- exports2.types = types6;
55749
+ var types7 = tslib_1.__importStar(require_main2());
55750
+ exports2.types = types7;
55840
55751
  var parser_1 = require_parser2();
55841
55752
  Object.defineProperty(exports2, "parse", { enumerable: true, get: function() {
55842
55753
  return parser_1.parse;
@@ -56700,14 +56611,14 @@ var require_lib = __commonJS({
56700
56611
  this.preserveSpace = !!preserveSpace;
56701
56612
  }
56702
56613
  };
56703
- var types6 = {
56614
+ var types7 = {
56704
56615
  brace: new TokContext("{"),
56705
56616
  j_oTag: new TokContext("<tag"),
56706
56617
  j_cTag: new TokContext("</tag"),
56707
56618
  j_expr: new TokContext("<tag>...</tag>", true)
56708
56619
  };
56709
56620
  {
56710
- types6.template = new TokContext("`", true);
56621
+ types7.template = new TokContext("`", true);
56711
56622
  }
56712
56623
  var beforeExpr = true;
56713
56624
  var startsExpr = true;
@@ -57239,17 +57150,17 @@ var require_lib = __commonJS({
57239
57150
  context.pop();
57240
57151
  };
57241
57152
  tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
57242
- context.push(types6.brace);
57153
+ context.push(types7.brace);
57243
57154
  };
57244
57155
  tokenTypes[22].updateContext = (context) => {
57245
- if (context[context.length - 1] === types6.template) {
57156
+ if (context[context.length - 1] === types7.template) {
57246
57157
  context.pop();
57247
57158
  } else {
57248
- context.push(types6.template);
57159
+ context.push(types7.template);
57249
57160
  }
57250
57161
  };
57251
57162
  tokenTypes[140].updateContext = (context) => {
57252
- context.push(types6.j_expr, types6.j_oTag);
57163
+ context.push(types7.j_expr, types7.j_oTag);
57253
57164
  };
57254
57165
  }
57255
57166
  var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
@@ -57855,7 +57766,7 @@ var require_lib = __commonJS({
57855
57766
  this.lastTokEndLoc = null;
57856
57767
  this.lastTokStartLoc = null;
57857
57768
  this.lastTokStart = 0;
57858
- this.context = [types6.brace];
57769
+ this.context = [types7.brace];
57859
57770
  this.canStartJSXElement = true;
57860
57771
  this.containsEsc = false;
57861
57772
  this.firstInvalidTemplateEscapePos = null;
@@ -61746,7 +61657,7 @@ var require_lib = __commonJS({
61746
61657
  context
61747
61658
  } = this.state;
61748
61659
  const currentContext = context[context.length - 1];
61749
- if (currentContext === types6.j_oTag || currentContext === types6.j_expr) {
61660
+ if (currentContext === types7.j_oTag || currentContext === types7.j_expr) {
61750
61661
  context.pop();
61751
61662
  }
61752
61663
  }
@@ -62804,9 +62715,9 @@ var require_lib = __commonJS({
62804
62715
  switch (this.state.type) {
62805
62716
  case 5:
62806
62717
  node = this.startNode();
62807
- this.setContext(types6.brace);
62718
+ this.setContext(types7.brace);
62808
62719
  this.next();
62809
- node = this.jsxParseExpressionContainer(node, types6.j_oTag);
62720
+ node = this.jsxParseExpressionContainer(node, types7.j_oTag);
62810
62721
  if (node.expression.type === "JSXEmptyExpression") {
62811
62722
  this.raise(JsxErrors.AttributeIsEmpty, {
62812
62723
  at: node
@@ -62829,7 +62740,7 @@ var require_lib = __commonJS({
62829
62740
  jsxParseSpreadChild(node) {
62830
62741
  this.next();
62831
62742
  node.expression = this.parseExpression();
62832
- this.setContext(types6.j_expr);
62743
+ this.setContext(types7.j_expr);
62833
62744
  this.state.canStartJSXElement = true;
62834
62745
  this.expect(8);
62835
62746
  return this.finishNode(node, "JSXSpreadChild");
@@ -62849,11 +62760,11 @@ var require_lib = __commonJS({
62849
62760
  jsxParseAttribute() {
62850
62761
  const node = this.startNode();
62851
62762
  if (this.match(5)) {
62852
- this.setContext(types6.brace);
62763
+ this.setContext(types7.brace);
62853
62764
  this.next();
62854
62765
  this.expect(21);
62855
62766
  node.argument = this.parseMaybeAssignAllowIn();
62856
- this.setContext(types6.j_oTag);
62767
+ this.setContext(types7.j_oTag);
62857
62768
  this.state.canStartJSXElement = true;
62858
62769
  this.expect(8);
62859
62770
  return this.finishNode(node, "JSXSpreadAttribute");
@@ -62912,12 +62823,12 @@ var require_lib = __commonJS({
62912
62823
  break;
62913
62824
  case 5: {
62914
62825
  const node2 = this.startNode();
62915
- this.setContext(types6.brace);
62826
+ this.setContext(types7.brace);
62916
62827
  this.next();
62917
62828
  if (this.match(21)) {
62918
62829
  children.push(this.jsxParseSpreadChild(node2));
62919
62830
  } else {
62920
- children.push(this.jsxParseExpressionContainer(node2, types6.j_expr));
62831
+ children.push(this.jsxParseExpressionContainer(node2, types7.j_expr));
62921
62832
  }
62922
62833
  break;
62923
62834
  }
@@ -62988,11 +62899,11 @@ var require_lib = __commonJS({
62988
62899
  }
62989
62900
  getTokenFromCode(code) {
62990
62901
  const context = this.curContext();
62991
- if (context === types6.j_expr) {
62902
+ if (context === types7.j_expr) {
62992
62903
  this.jsxReadToken();
62993
62904
  return;
62994
62905
  }
62995
- if (context === types6.j_oTag || context === types6.j_cTag) {
62906
+ if (context === types7.j_oTag || context === types7.j_cTag) {
62996
62907
  if (isIdentifierStart(code)) {
62997
62908
  this.jsxReadWord();
62998
62909
  return;
@@ -63002,7 +62913,7 @@ var require_lib = __commonJS({
63002
62913
  this.finishToken(141);
63003
62914
  return;
63004
62915
  }
63005
- if ((code === 34 || code === 39) && context === types6.j_oTag) {
62916
+ if ((code === 34 || code === 39) && context === types7.j_oTag) {
63006
62917
  this.jsxReadString(code);
63007
62918
  return;
63008
62919
  }
@@ -63020,17 +62931,17 @@ var require_lib = __commonJS({
63020
62931
  type
63021
62932
  } = this.state;
63022
62933
  if (type === 56 && prevType === 140) {
63023
- context.splice(-2, 2, types6.j_cTag);
62934
+ context.splice(-2, 2, types7.j_cTag);
63024
62935
  this.state.canStartJSXElement = false;
63025
62936
  } else if (type === 140) {
63026
- context.push(types6.j_oTag);
62937
+ context.push(types7.j_oTag);
63027
62938
  } else if (type === 141) {
63028
62939
  const out = context[context.length - 1];
63029
- if (out === types6.j_oTag && prevType === 56 || out === types6.j_cTag) {
62940
+ if (out === types7.j_oTag && prevType === 56 || out === types7.j_cTag) {
63030
62941
  context.pop();
63031
- this.state.canStartJSXElement = context[context.length - 1] === types6.j_expr;
62942
+ this.state.canStartJSXElement = context[context.length - 1] === types7.j_expr;
63032
62943
  } else {
63033
- this.setContext(types6.j_expr);
62944
+ this.setContext(types7.j_expr);
63034
62945
  this.state.canStartJSXElement = true;
63035
62946
  }
63036
62947
  } else {
@@ -64474,14 +64385,14 @@ var require_lib = __commonJS({
64474
64385
  tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
64475
64386
  const node = this.startNode();
64476
64387
  const hasLeadingOperator = this.eat(operator);
64477
- const types7 = [];
64388
+ const types8 = [];
64478
64389
  do {
64479
- types7.push(parseConstituentType());
64390
+ types8.push(parseConstituentType());
64480
64391
  } while (this.eat(operator));
64481
- if (types7.length === 1 && !hasLeadingOperator) {
64482
- return types7[0];
64392
+ if (types8.length === 1 && !hasLeadingOperator) {
64393
+ return types8[0];
64483
64394
  }
64484
- node.types = types7;
64395
+ node.types = types8;
64485
64396
  return this.finishNode(node, kind);
64486
64397
  }
64487
64398
  tsParseIntersectionTypeOrHigher() {
@@ -65055,7 +64966,7 @@ var require_lib = __commonJS({
65055
64966
  this.raise(TSErrors.EmptyTypeArguments, {
65056
64967
  at: node
65057
64968
  });
65058
- } else if (!this.state.inType && this.curContext() === types6.brace) {
64969
+ } else if (!this.state.inType && this.curContext() === types7.brace) {
65059
64970
  this.reScan_lt_gt();
65060
64971
  }
65061
64972
  this.expect(48);
@@ -65732,7 +65643,7 @@ var require_lib = __commonJS({
65732
65643
  context
65733
65644
  } = this.state;
65734
65645
  const currentContext = context[context.length - 1];
65735
- if (currentContext === types6.j_oTag || currentContext === types6.j_expr) {
65646
+ if (currentContext === types7.j_oTag || currentContext === types7.j_expr) {
65736
65647
  context.pop();
65737
65648
  }
65738
65649
  }
@@ -70620,13 +70531,224 @@ var init_codemod = __esm({
70620
70531
  }
70621
70532
  });
70622
70533
 
70623
- // templates/astro/c3.ts
70534
+ // templates/analog/c3.ts
70535
+ var c3_exports = {};
70536
+ __export(c3_exports, {
70537
+ default: () => c3_default
70538
+ });
70539
+ var recast2, npm, pm, generate, configure, updateEnvTypes, updateViteConfig, config, c3_default;
70540
+ var init_c3 = __esm({
70541
+ "templates/analog/c3.ts"() {
70542
+ init_cli();
70543
+ init_colors();
70544
+ init_interactive();
70545
+ init_frameworks();
70546
+ init_codemod();
70547
+ init_compatDate();
70548
+ init_files();
70549
+ init_packageManagers();
70550
+ init_packages();
70551
+ recast2 = __toESM(require_main3());
70552
+ ({ npm, name: pm } = detectPackageManager());
70553
+ generate = async (ctx) => {
70554
+ await runFrameworkGenerator(ctx, [
70555
+ ctx.project.name,
70556
+ "--template",
70557
+ "angular-v17"
70558
+ ]);
70559
+ logRaw("");
70560
+ };
70561
+ configure = async (ctx) => {
70562
+ if (pm === "pnpm" || pm === "yarn" || pm === "bun") {
70563
+ const packages = [];
70564
+ packages.push("nitropack");
70565
+ packages.push("h3");
70566
+ packages.push("@ngtools/webpack");
70567
+ packages.push("@angular-devkit/build-angular");
70568
+ await installPackages(packages, {
70569
+ dev: true,
70570
+ startText: `Installing ${packages.join(", ")}`,
70571
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm} install\``)}`
70572
+ });
70573
+ }
70574
+ updateViteConfig(ctx);
70575
+ updateEnvTypes(ctx);
70576
+ };
70577
+ updateEnvTypes = (ctx) => {
70578
+ const filepath = "env.d.ts";
70579
+ const s = spinner();
70580
+ s.start(`Updating ${filepath}`);
70581
+ let file = readFile(filepath);
70582
+ let typesEntrypoint = `@cloudflare/workers-types`;
70583
+ const latestEntrypoint = getLatestTypesEntrypoint(ctx);
70584
+ if (latestEntrypoint) {
70585
+ typesEntrypoint += `/${latestEntrypoint}`;
70586
+ }
70587
+ file = file.replace("WORKERS_TYPES_ENTRYPOINT", typesEntrypoint);
70588
+ writeFile2("env.d.ts", file);
70589
+ s.stop(`${brandColor(`updated`)} ${dim(`\`${filepath}\``)}`);
70590
+ };
70591
+ updateViteConfig = (ctx) => {
70592
+ const b2 = recast2.types.builders;
70593
+ const s = spinner();
70594
+ const configFile = "vite.config.ts";
70595
+ s.start(`Updating \`${configFile}\``);
70596
+ const snippets = loadTemplateSnippets(ctx);
70597
+ transformFile(configFile, {
70598
+ visitProgram(n2) {
70599
+ const lastImportIndex = n2.node.body.findLastIndex(
70600
+ (t) => t.type === "ImportDeclaration"
70601
+ );
70602
+ const lastImport = n2.get("body", lastImportIndex);
70603
+ lastImport.insertAfter(...snippets.devBindingsModuleTs);
70604
+ return this.traverse(n2);
70605
+ },
70606
+ visitCallExpression(n2) {
70607
+ const callee = n2.node.callee;
70608
+ if (callee.name === "analog") {
70609
+ const pluginArguments = b2.objectProperty(
70610
+ b2.identifier("nitro"),
70611
+ b2.objectExpression([
70612
+ b2.objectProperty(
70613
+ b2.identifier("preset"),
70614
+ b2.stringLiteral("cloudflare-pages")
70615
+ ),
70616
+ b2.objectProperty(
70617
+ b2.identifier("modules"),
70618
+ b2.arrayExpression([b2.identifier("devBindingsModule")])
70619
+ )
70620
+ ])
70621
+ );
70622
+ n2.node.arguments = [b2.objectExpression([pluginArguments])];
70623
+ }
70624
+ return this.traverse(n2);
70625
+ }
70626
+ });
70627
+ s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
70628
+ };
70629
+ config = {
70630
+ configVersion: 1,
70631
+ id: "analog",
70632
+ platform: "pages",
70633
+ displayName: "Analog",
70634
+ copyFiles: {
70635
+ path: "./templates"
70636
+ },
70637
+ generate,
70638
+ configure,
70639
+ transformPackageJson: async () => ({
70640
+ scripts: {
70641
+ preview: `${npm} run build && wrangler pages dev`,
70642
+ deploy: `${npm} run build && wrangler pages deploy`,
70643
+ "cf-typegen": `wrangler types`
70644
+ }
70645
+ }),
70646
+ devScript: "dev",
70647
+ deployScript: "deploy",
70648
+ previewScript: "preview"
70649
+ };
70650
+ c3_default = config;
70651
+ }
70652
+ });
70653
+
70654
+ // templates/angular/c3.ts
70624
70655
  var c3_exports2 = {};
70625
70656
  __export(c3_exports2, {
70626
70657
  default: () => c3_default2
70627
70658
  });
70628
- var recast2, npx2, generate2, configure2, updateAstroConfig, updateEnvDeclaration, config2, c3_default2;
70659
+ async function installCFWorker() {
70660
+ await installPackages(
70661
+ ["@cloudflare/workers-types", "@miniflare/tre@next", "wrangler@beta"],
70662
+ {
70663
+ dev: true,
70664
+ startText: "Installing adapter dependencies",
70665
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm2} install\``)}`
70666
+ }
70667
+ );
70668
+ }
70669
+ async function updateAppCode() {
70670
+ const s = spinner();
70671
+ s.start(`Updating application code`);
70672
+ const appConfigPath = "src/app/app.config.ts";
70673
+ const appConfig = readFile((0, import_node_path.resolve)(appConfigPath));
70674
+ const newAppConfig = "import { provideHttpClient, withFetch } from '@angular/common/http';\n" + appConfig.replace(
70675
+ "providers: [",
70676
+ "providers: [provideHttpClient(withFetch()), "
70677
+ );
70678
+ writeFile2((0, import_node_path.resolve)(appConfigPath), newAppConfig);
70679
+ s.stop(`${brandColor(`updated`)} ${dim(appConfigPath)}`);
70680
+ s.start(`Updating package.json`);
70681
+ const packageJsonPath = (0, import_node_path.resolve)("package.json");
70682
+ const packageManifest = readJSON(packageJsonPath);
70683
+ delete packageManifest["dependencies"]["@angular/ssr"];
70684
+ delete packageManifest["dependencies"]["express"];
70685
+ writeFile2(packageJsonPath, JSON.stringify(packageManifest, null, 2));
70686
+ s.stop(`${brandColor(`updated`)} ${dim(`\`package.json\``)}`);
70687
+ }
70688
+ function updateAngularJson(ctx) {
70689
+ const s = spinner();
70690
+ s.start(`Updating angular.json config`);
70691
+ const angularJson = readJSON((0, import_node_path.resolve)("angular.json"));
70692
+ const architectSection = angularJson.projects[ctx.project.name].architect;
70693
+ architectSection.build.options.outputPath = "dist";
70694
+ architectSection.build.options.assets.push("src/_routes.json");
70695
+ writeFile2((0, import_node_path.resolve)("angular.json"), JSON.stringify(angularJson, null, 2));
70696
+ s.stop(`${brandColor(`updated`)} ${dim(`\`angular.json\``)}`);
70697
+ }
70698
+ var import_node_path, npm2, generate2, configure2, config2, c3_default2;
70629
70699
  var init_c32 = __esm({
70700
+ "templates/angular/c3.ts"() {
70701
+ import_node_path = require("node:path");
70702
+ init_cli();
70703
+ init_colors();
70704
+ init_interactive();
70705
+ init_frameworks();
70706
+ init_compatDate();
70707
+ init_files();
70708
+ init_packageManagers();
70709
+ init_packages();
70710
+ ({ npm: npm2 } = detectPackageManager());
70711
+ generate2 = async (ctx) => {
70712
+ await runFrameworkGenerator(ctx, [ctx.project.name, "--ssr"]);
70713
+ logRaw("");
70714
+ };
70715
+ configure2 = async (ctx) => {
70716
+ updateAngularJson(ctx);
70717
+ await updateAppCode();
70718
+ await installCFWorker();
70719
+ };
70720
+ config2 = {
70721
+ configVersion: 1,
70722
+ id: "angular",
70723
+ displayName: "Angular",
70724
+ platform: "pages",
70725
+ copyFiles: {
70726
+ path: "./templates"
70727
+ },
70728
+ devScript: "start",
70729
+ deployScript: "deploy",
70730
+ generate: generate2,
70731
+ configure: configure2,
70732
+ transformPackageJson: async () => ({
70733
+ scripts: {
70734
+ start: `${npm2} run build && wrangler pages dev dist/cloudflare ${await compatDateFlag()} --experimental-local`,
70735
+ build: `ng build && ${npm2} run process`,
70736
+ process: "node ./tools/copy-files.mjs && node ./tools/alter-polyfills.mjs",
70737
+ deploy: `${npm2} run build && wrangler pages deploy dist/cloudflare`
70738
+ }
70739
+ })
70740
+ };
70741
+ c3_default2 = config2;
70742
+ }
70743
+ });
70744
+
70745
+ // templates/astro/c3.ts
70746
+ var c3_exports3 = {};
70747
+ __export(c3_exports3, {
70748
+ default: () => c3_default3
70749
+ });
70750
+ var recast3, npx2, generate3, configure3, updateAstroConfig, updateEnvDeclaration, config3, c3_default3;
70751
+ var init_c33 = __esm({
70630
70752
  "templates/astro/c3.ts"() {
70631
70753
  init_cli();
70632
70754
  init_colors();
@@ -70635,13 +70757,13 @@ var init_c32 = __esm({
70635
70757
  init_command();
70636
70758
  init_files();
70637
70759
  init_packageManagers();
70638
- recast2 = __toESM(require_main3());
70760
+ recast3 = __toESM(require_main3());
70639
70761
  ({ npx: npx2 } = detectPackageManager());
70640
- generate2 = async (ctx) => {
70762
+ generate3 = async (ctx) => {
70641
70763
  await runFrameworkGenerator(ctx, [ctx.project.name, "--no-install"]);
70642
70764
  logRaw("");
70643
70765
  };
70644
- configure2 = async (ctx) => {
70766
+ configure3 = async (ctx) => {
70645
70767
  await runCommand([npx2, "astro", "add", "cloudflare", "-y"], {
70646
70768
  silent: true,
70647
70769
  startText: "Installing adapter",
@@ -70661,7 +70783,7 @@ var init_c32 = __esm({
70661
70783
  if (callee.name !== "cloudflare") {
70662
70784
  return this.traverse(n2);
70663
70785
  }
70664
- const b2 = recast2.types.builders;
70786
+ const b2 = recast3.types.builders;
70665
70787
  n2.node.arguments = [
70666
70788
  b2.objectExpression([
70667
70789
  b2.objectProperty(
@@ -70686,7 +70808,7 @@ var init_c32 = __esm({
70686
70808
  visitProgram: function(n2) {
70687
70809
  const snippets = loadTemplateSnippets(ctx);
70688
70810
  const patch = snippets.runtimeDeclarationTs;
70689
- const b2 = recast2.types.builders;
70811
+ const b2 = recast3.types.builders;
70690
70812
  const comments = n2.get("comments").value;
70691
70813
  n2.node.comments = comments.map(
70692
70814
  (c2) => b2.commentLine(c2.value)
@@ -70696,7 +70818,7 @@ var init_c32 = __esm({
70696
70818
  }
70697
70819
  });
70698
70820
  };
70699
- config2 = {
70821
+ config3 = {
70700
70822
  configVersion: 1,
70701
70823
  id: "astro",
70702
70824
  platform: "pages",
@@ -70707,65 +70829,65 @@ var init_c32 = __esm({
70707
70829
  devScript: "dev",
70708
70830
  deployScript: "deploy",
70709
70831
  previewScript: "preview",
70710
- generate: generate2,
70711
- configure: configure2,
70832
+ generate: generate3,
70833
+ configure: configure3,
70712
70834
  transformPackageJson: async (pkgJson, ctx) => ({
70713
70835
  scripts: {
70714
- deploy: `astro build && wrangler pages deploy ./dist`,
70715
- preview: `astro build && wrangler pages dev ./dist`,
70716
- ...usesTypescript(ctx) && { "build-cf-types": `wrangler types` }
70836
+ deploy: `astro build && wrangler pages deploy`,
70837
+ preview: `astro build && wrangler pages dev`,
70838
+ ...usesTypescript(ctx) && { "cf-typegen": `wrangler types` }
70717
70839
  }
70718
70840
  })
70719
70841
  };
70720
- c3_default2 = config2;
70842
+ c3_default3 = config3;
70721
70843
  }
70722
70844
  });
70723
70845
 
70724
70846
  // templates/docusaurus/c3.ts
70725
- var c3_exports3 = {};
70726
- __export(c3_exports3, {
70727
- default: () => c3_default3
70847
+ var c3_exports4 = {};
70848
+ __export(c3_exports4, {
70849
+ default: () => c3_default4
70728
70850
  });
70729
- var npm2, generate3, config3, c3_default3;
70730
- var init_c33 = __esm({
70851
+ var npm3, generate4, config4, c3_default4;
70852
+ var init_c34 = __esm({
70731
70853
  "templates/docusaurus/c3.ts"() {
70732
70854
  init_frameworks();
70733
70855
  init_packageManagers();
70734
- ({ npm: npm2 } = detectPackageManager());
70735
- generate3 = async (ctx) => {
70856
+ ({ npm: npm3 } = detectPackageManager());
70857
+ generate4 = async (ctx) => {
70736
70858
  await runFrameworkGenerator(ctx, [ctx.project.name, "classic"]);
70737
70859
  };
70738
- config3 = {
70860
+ config4 = {
70739
70861
  configVersion: 1,
70740
70862
  id: "docusaurus",
70741
70863
  platform: "pages",
70742
70864
  displayName: "Docusaurus",
70743
- generate: generate3,
70865
+ generate: generate4,
70744
70866
  transformPackageJson: async () => ({
70745
70867
  scripts: {
70746
- deploy: `${npm2} run build && wrangler pages deploy ./build`
70868
+ deploy: `${npm3} run build && wrangler pages deploy ./build`
70747
70869
  }
70748
70870
  }),
70749
70871
  devScript: "start",
70750
70872
  deployScript: "deploy"
70751
70873
  };
70752
- c3_default3 = config3;
70874
+ c3_default4 = config4;
70753
70875
  }
70754
70876
  });
70755
70877
 
70756
70878
  // templates/gatsby/c3.ts
70757
- var c3_exports4 = {};
70758
- __export(c3_exports4, {
70759
- default: () => c3_default4
70879
+ var c3_exports5 = {};
70880
+ __export(c3_exports5, {
70881
+ default: () => c3_default5
70760
70882
  });
70761
- var npm3, generate4, config4, c3_default4;
70762
- var init_c34 = __esm({
70883
+ var npm4, generate5, config5, c3_default5;
70884
+ var init_c35 = __esm({
70763
70885
  "templates/gatsby/c3.ts"() {
70764
70886
  init_interactive();
70765
70887
  init_frameworks();
70766
70888
  init_packageManagers();
70767
- ({ npm: npm3 } = detectPackageManager());
70768
- generate4 = async (ctx) => {
70889
+ ({ npm: npm4 } = detectPackageManager());
70890
+ generate5 = async (ctx) => {
70769
70891
  const defaultTemplate = "https://github.com/gatsbyjs/gatsby-starter-blog";
70770
70892
  const useTemplate = await inputPrompt({
70771
70893
  type: "confirm",
@@ -70784,37 +70906,37 @@ var init_c34 = __esm({
70784
70906
  }
70785
70907
  await runFrameworkGenerator(ctx, ["new", ctx.project.name, templateUrl]);
70786
70908
  };
70787
- config4 = {
70909
+ config5 = {
70788
70910
  configVersion: 1,
70789
70911
  id: "gatsby",
70790
70912
  platform: "pages",
70791
70913
  displayName: "Gatsby",
70792
- generate: generate4,
70914
+ generate: generate5,
70793
70915
  transformPackageJson: async () => ({
70794
70916
  scripts: {
70795
- deploy: `${npm3} run build && wrangler pages deploy ./public`,
70796
- preview: `${npm3} run build && wrangler pages dev ./public`
70917
+ deploy: `${npm4} run build && wrangler pages deploy ./public`,
70918
+ preview: `${npm4} run build && wrangler pages dev ./public`
70797
70919
  }
70798
70920
  }),
70799
70921
  devScript: "develop",
70800
70922
  deployScript: "deploy",
70801
70923
  previewScript: "preview"
70802
70924
  };
70803
- c3_default4 = config4;
70925
+ c3_default5 = config5;
70804
70926
  }
70805
70927
  });
70806
70928
 
70807
70929
  // templates/hono/c3.ts
70808
- var c3_exports5 = {};
70809
- __export(c3_exports5, {
70810
- default: () => c3_default5
70930
+ var c3_exports6 = {};
70931
+ __export(c3_exports6, {
70932
+ default: () => c3_default6
70811
70933
  });
70812
- var generate5, config5, c3_default5;
70813
- var init_c35 = __esm({
70934
+ var generate6, config6, c3_default6;
70935
+ var init_c36 = __esm({
70814
70936
  "templates/hono/c3.ts"() {
70815
70937
  init_cli();
70816
70938
  init_frameworks();
70817
- generate5 = async (ctx) => {
70939
+ generate6 = async (ctx) => {
70818
70940
  await runFrameworkGenerator(ctx, [
70819
70941
  ctx.project.name,
70820
70942
  "--template",
@@ -70822,28 +70944,28 @@ var init_c35 = __esm({
70822
70944
  ]);
70823
70945
  logRaw("");
70824
70946
  };
70825
- config5 = {
70947
+ config6 = {
70826
70948
  configVersion: 1,
70827
70949
  id: "hono",
70828
70950
  displayName: "Hono",
70829
70951
  platform: "workers",
70830
- generate: generate5,
70952
+ generate: generate6,
70831
70953
  devScript: "dev",
70832
70954
  deployScript: "deploy"
70833
70955
  };
70834
- c3_default5 = config5;
70956
+ c3_default6 = config6;
70835
70957
  }
70836
70958
  });
70837
70959
 
70838
70960
  // templates/next/c3.ts
70839
- var c3_exports6 = {};
70840
- __export(c3_exports6, {
70841
- default: () => c3_default6,
70961
+ var c3_exports7 = {};
70962
+ __export(c3_exports7, {
70963
+ default: () => c3_default7,
70842
70964
  shouldInstallNextOnPagesEslintPlugin: () => shouldInstallNextOnPagesEslintPlugin,
70843
70965
  writeEslintrc: () => writeEslintrc
70844
70966
  });
70845
- var import_path13, npm4, npx3, generate6, updateNextConfig, configure3, shouldInstallNextOnPagesEslintPlugin, writeEslintrc, addDevDependencies, c3_default6;
70846
- var init_c36 = __esm({
70967
+ var import_path13, npm5, npx3, generate7, updateNextConfig, configure4, shouldInstallNextOnPagesEslintPlugin, writeEslintrc, addDevDependencies, c3_default7;
70968
+ var init_c37 = __esm({
70847
70969
  "templates/next/c3.ts"() {
70848
70970
  import_path13 = require("path");
70849
70971
  init_cli();
@@ -70855,8 +70977,8 @@ var init_c36 = __esm({
70855
70977
  init_packageManagers();
70856
70978
  init_packages();
70857
70979
  init_templates();
70858
- ({ npm: npm4, npx: npx3 } = detectPackageManager());
70859
- generate6 = async (ctx) => {
70980
+ ({ npm: npm5, npx: npx3 } = detectPackageManager());
70981
+ generate7 = async (ctx) => {
70860
70982
  const projectName = ctx.project.name;
70861
70983
  await runFrameworkGenerator(ctx, [projectName]);
70862
70984
  const wranglerToml = readFile((0, import_path13.join)(getTemplatePath(ctx), "wrangler.toml"));
@@ -70889,7 +71011,7 @@ ${$1}`
70889
71011
  writeFile2(configFile, updatedConfigFile);
70890
71012
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
70891
71013
  };
70892
- configure3 = async (ctx) => {
71014
+ configure4 = async (ctx) => {
70893
71015
  const projectPath = ctx.project.path;
70894
71016
  const path4 = probePaths([
70895
71017
  `${projectPath}/pages/api`,
@@ -70963,13 +71085,13 @@ ${$1}`
70963
71085
  doneText: `${brandColor(`installed`)} ${dim(packages.join(", "))}`
70964
71086
  });
70965
71087
  };
70966
- c3_default6 = {
71088
+ c3_default7 = {
70967
71089
  configVersion: 1,
70968
71090
  id: "next",
70969
71091
  platform: "pages",
70970
71092
  displayName: "Next",
70971
- generate: generate6,
70972
- configure: configure3,
71093
+ generate: generate7,
71094
+ configure: configure4,
70973
71095
  copyFiles: {
70974
71096
  async selectVariant(ctx) {
70975
71097
  const isApp = probePaths([
@@ -71000,20 +71122,20 @@ ${$1}`
71000
71122
  }
71001
71123
  },
71002
71124
  transformPackageJson: async (_2, ctx) => {
71003
- const isNpm = npm4 === "npm";
71004
- const isBun = npm4 === "bun";
71125
+ const isNpm = npm5 === "npm";
71126
+ const isBun = npm5 === "bun";
71005
71127
  const isNpmOrBun = isNpm || isBun;
71006
71128
  const nextOnPagesScope = isNpmOrBun ? "@cloudflare/" : "";
71007
71129
  const nextOnPagesCommand = `${nextOnPagesScope}next-on-pages`;
71008
- const pmCommand = isNpmOrBun ? npx3 : npm4;
71130
+ const pmCommand = isNpmOrBun ? npx3 : npm5;
71009
71131
  const pagesBuildRunCommand = `${isNpm ? "npm run" : isBun ? "bun" : pmCommand} pages:build`;
71010
71132
  return {
71011
71133
  scripts: {
71012
71134
  "pages:build": `${pmCommand} ${nextOnPagesCommand}`,
71013
- preview: `${pagesBuildRunCommand} && wrangler pages dev .vercel/output/static`,
71014
- deploy: `${pagesBuildRunCommand} && wrangler pages deploy .vercel/output/static`,
71135
+ preview: `${pagesBuildRunCommand} && wrangler pages dev`,
71136
+ deploy: `${pagesBuildRunCommand} && wrangler pages deploy`,
71015
71137
  ...usesTypescript(ctx) && {
71016
- "build-cf-types": `wrangler types --env-interface CloudflareEnv env.d.ts`
71138
+ "cf-typegen": `wrangler types --env-interface CloudflareEnv env.d.ts`
71017
71139
  }
71018
71140
  }
71019
71141
  };
@@ -71027,12 +71149,12 @@ ${$1}`
71027
71149
  });
71028
71150
 
71029
71151
  // templates/nuxt/c3.ts
71030
- var c3_exports7 = {};
71031
- __export(c3_exports7, {
71032
- default: () => c3_default7
71152
+ var c3_exports8 = {};
71153
+ __export(c3_exports8, {
71154
+ default: () => c3_default8
71033
71155
  });
71034
- var recast3, npm5, pm, generate7, configure4, updateEnvTypes, updateNuxtConfig, config6, c3_default7;
71035
- var init_c37 = __esm({
71156
+ var recast4, npm6, pm2, generate8, configure5, updateEnvTypes2, updateNuxtConfig, config7, c3_default8;
71157
+ var init_c38 = __esm({
71036
71158
  "templates/nuxt/c3.ts"() {
71037
71159
  init_cli();
71038
71160
  init_colors();
@@ -71043,39 +71165,39 @@ var init_c37 = __esm({
71043
71165
  init_files();
71044
71166
  init_packageManagers();
71045
71167
  init_packages();
71046
- recast3 = __toESM(require_main3());
71047
- ({ npm: npm5, name: pm } = detectPackageManager());
71048
- generate7 = async (ctx) => {
71168
+ recast4 = __toESM(require_main3());
71169
+ ({ npm: npm6, name: pm2 } = detectPackageManager());
71170
+ generate8 = async (ctx) => {
71049
71171
  const gitFlag = ctx.args.git ? `--gitInit` : `--no-gitInit`;
71050
71172
  await runFrameworkGenerator(ctx, [
71051
71173
  "init",
71052
71174
  ctx.project.name,
71053
71175
  "--packageManager",
71054
- npm5,
71176
+ npm6,
71055
71177
  gitFlag
71056
71178
  ]);
71057
71179
  writeFile2("./.node-version", "17");
71058
71180
  logRaw("");
71059
71181
  };
71060
- configure4 = async (ctx) => {
71182
+ configure5 = async (ctx) => {
71061
71183
  const packages = ["nitro-cloudflare-dev"];
71062
- if (pm === "pnpm") {
71184
+ if (pm2 === "pnpm") {
71063
71185
  packages.push("h3");
71064
71186
  }
71065
71187
  await installPackages(packages, {
71066
71188
  dev: true,
71067
71189
  startText: "Installing nitro module `nitro-cloudflare-dev`",
71068
- doneText: `${brandColor("installed")} ${dim(`via \`${npm5} install\``)}`
71190
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm6} install\``)}`
71069
71191
  });
71070
71192
  updateNuxtConfig();
71071
- updateEnvTypes(ctx);
71193
+ updateEnvTypes2(ctx);
71072
71194
  };
71073
- updateEnvTypes = (ctx) => {
71195
+ updateEnvTypes2 = (ctx) => {
71074
71196
  const filepath = "env.d.ts";
71075
71197
  const s = spinner();
71076
71198
  s.start(`Updating ${filepath}`);
71077
71199
  let file = readFile(filepath);
71078
- let typesEntrypoint = `@cloudflare/workers-types/`;
71200
+ let typesEntrypoint = `@cloudflare/workers-types`;
71079
71201
  const latestEntrypoint = getLatestTypesEntrypoint(ctx);
71080
71202
  if (latestEntrypoint) {
71081
71203
  typesEntrypoint += `/${latestEntrypoint}`;
@@ -71088,7 +71210,7 @@ var init_c37 = __esm({
71088
71210
  const s = spinner();
71089
71211
  const configFile = "nuxt.config.ts";
71090
71212
  s.start(`Updating \`${configFile}\``);
71091
- const b2 = recast3.types.builders;
71213
+ const b2 = recast4.types.builders;
71092
71214
  const presetDef = b2.objectProperty(
71093
71215
  b2.identifier("nitro"),
71094
71216
  b2.objectExpression([
@@ -71115,7 +71237,7 @@ var init_c37 = __esm({
71115
71237
  });
71116
71238
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
71117
71239
  };
71118
- config6 = {
71240
+ config7 = {
71119
71241
  configVersion: 1,
71120
71242
  id: "nuxt",
71121
71243
  platform: "pages",
@@ -71123,30 +71245,30 @@ var init_c37 = __esm({
71123
71245
  copyFiles: {
71124
71246
  path: "./templates"
71125
71247
  },
71126
- generate: generate7,
71127
- configure: configure4,
71248
+ generate: generate8,
71249
+ configure: configure5,
71128
71250
  transformPackageJson: async () => ({
71129
71251
  scripts: {
71130
- deploy: `${npm5} run build && wrangler pages deploy ./dist`,
71131
- preview: `${npm5} run build && wrangler pages dev ./dist`,
71132
- "build-cf-types": `wrangler types`
71252
+ deploy: `${npm6} run build && wrangler pages deploy`,
71253
+ preview: `${npm6} run build && wrangler pages dev`,
71254
+ "cf-typegen": `wrangler types`
71133
71255
  }
71134
71256
  }),
71135
71257
  devScript: "dev",
71136
71258
  deployScript: "deploy",
71137
71259
  previewScript: "preview"
71138
71260
  };
71139
- c3_default7 = config6;
71261
+ c3_default8 = config7;
71140
71262
  }
71141
71263
  });
71142
71264
 
71143
71265
  // templates/qwik/c3.ts
71144
- var c3_exports8 = {};
71145
- __export(c3_exports8, {
71146
- default: () => c3_default8
71266
+ var c3_exports9 = {};
71267
+ __export(c3_exports9, {
71268
+ default: () => c3_default9
71147
71269
  });
71148
- var recast4, npm6, npx4, generate8, configure5, addBindingsProxy, populateCloudflareEnv, config7, c3_default8;
71149
- var init_c38 = __esm({
71270
+ var recast5, npm7, npx4, generate9, configure6, addBindingsProxy, populateCloudflareEnv, config8, c3_default9;
71271
+ var init_c39 = __esm({
71150
71272
  "templates/qwik/c3.ts"() {
71151
71273
  init_cli();
71152
71274
  init_colors();
@@ -71156,12 +71278,12 @@ var init_c38 = __esm({
71156
71278
  init_command();
71157
71279
  init_files();
71158
71280
  init_packageManagers();
71159
- recast4 = __toESM(require_main3());
71160
- ({ npm: npm6, npx: npx4 } = detectPackageManager());
71161
- generate8 = async (ctx) => {
71281
+ recast5 = __toESM(require_main3());
71282
+ ({ npm: npm7, npx: npx4 } = detectPackageManager());
71283
+ generate9 = async (ctx) => {
71162
71284
  await runFrameworkGenerator(ctx, ["basic", ctx.project.name]);
71163
71285
  };
71164
- configure5 = async (ctx) => {
71286
+ configure6 = async (ctx) => {
71165
71287
  const cmd = [npx4, "qwik", "add", "cloudflare-pages"];
71166
71288
  endSection(`Running ${quoteShellArgs(cmd)}`);
71167
71289
  await runCommand(cmd);
@@ -71175,7 +71297,7 @@ var init_c38 = __esm({
71175
71297
  const s = spinner();
71176
71298
  s.start("Updating `vite.config.ts`");
71177
71299
  const snippets = loadTemplateSnippets(ctx);
71178
- const b2 = recast4.types.builders;
71300
+ const b2 = recast5.types.builders;
71179
71301
  transformFile("vite.config.ts", {
71180
71302
  // Insert the env declaration after the last import (but before the rest of the body)
71181
71303
  visitProgram: function(n2) {
@@ -71217,7 +71339,7 @@ var init_c38 = __esm({
71217
71339
  s.start(`Updating \`${entrypointPath}\``);
71218
71340
  transformFile(entrypointPath, {
71219
71341
  visitTSInterfaceDeclaration: function(n2) {
71220
- const b2 = recast4.types.builders;
71342
+ const b2 = recast5.types.builders;
71221
71343
  const id = n2.node.id;
71222
71344
  if (id.name !== "QwikCityPlatform") {
71223
71345
  this.traverse(n2);
@@ -71238,7 +71360,7 @@ var init_c38 = __esm({
71238
71360
  });
71239
71361
  s.stop(`${brandColor("updated")} \`${entrypointPath}\``);
71240
71362
  };
71241
- config7 = {
71363
+ config8 = {
71242
71364
  configVersion: 1,
71243
71365
  id: "qwik",
71244
71366
  displayName: "Qwik",
@@ -71246,66 +71368,66 @@ var init_c38 = __esm({
71246
71368
  copyFiles: {
71247
71369
  path: "./templates"
71248
71370
  },
71249
- generate: generate8,
71250
- configure: configure5,
71371
+ generate: generate9,
71372
+ configure: configure6,
71251
71373
  transformPackageJson: async () => ({
71252
71374
  scripts: {
71253
- deploy: `${npm6} run build && wrangler pages deploy ./dist`,
71254
- preview: `${npm6} run build && wrangler pages dev ./dist`,
71255
- "build-cf-types": `wrangler types`
71375
+ deploy: `${npm7} run build && wrangler pages deploy`,
71376
+ preview: `${npm7} run build && wrangler pages dev`,
71377
+ "cf-typegen": `wrangler types`
71256
71378
  }
71257
71379
  }),
71258
71380
  devScript: "dev",
71259
71381
  deployScript: "deploy",
71260
71382
  previewScript: "preview"
71261
71383
  };
71262
- c3_default8 = config7;
71384
+ c3_default9 = config8;
71263
71385
  }
71264
71386
  });
71265
71387
 
71266
71388
  // templates/react/c3.ts
71267
- var c3_exports9 = {};
71268
- __export(c3_exports9, {
71269
- default: () => c3_default9
71389
+ var c3_exports10 = {};
71390
+ __export(c3_exports10, {
71391
+ default: () => c3_default10
71270
71392
  });
71271
- var npm7, generate9, config8, c3_default9;
71272
- var init_c39 = __esm({
71393
+ var npm8, generate10, config9, c3_default10;
71394
+ var init_c310 = __esm({
71273
71395
  "templates/react/c3.ts"() {
71274
71396
  init_cli();
71275
71397
  init_frameworks();
71276
71398
  init_packageManagers();
71277
- ({ npm: npm7 } = detectPackageManager());
71278
- generate9 = async (ctx) => {
71399
+ ({ npm: npm8 } = detectPackageManager());
71400
+ generate10 = async (ctx) => {
71279
71401
  await runFrameworkGenerator(ctx, [ctx.project.name]);
71280
71402
  logRaw("");
71281
71403
  };
71282
- config8 = {
71404
+ config9 = {
71283
71405
  configVersion: 1,
71284
71406
  id: "react",
71285
71407
  displayName: "React",
71286
71408
  platform: "pages",
71287
- generate: generate9,
71409
+ generate: generate10,
71288
71410
  transformPackageJson: async () => ({
71289
71411
  scripts: {
71290
- deploy: `${npm7} run build && wrangler pages deploy ./build`,
71291
- preview: `${npm7} run build && wrangler pages dev ./build`
71412
+ deploy: `${npm8} run build && wrangler pages deploy ./build`,
71413
+ preview: `${npm8} run build && wrangler pages dev ./build`
71292
71414
  }
71293
71415
  }),
71294
71416
  devScript: "dev",
71295
71417
  deployScript: "deploy",
71296
71418
  previewScript: "preview"
71297
71419
  };
71298
- c3_default9 = config8;
71420
+ c3_default10 = config9;
71299
71421
  }
71300
71422
  });
71301
71423
 
71302
71424
  // templates/remix/c3.ts
71303
- var c3_exports10 = {};
71304
- __export(c3_exports10, {
71305
- default: () => c3_default10
71425
+ var c3_exports11 = {};
71426
+ __export(c3_exports11, {
71427
+ default: () => c3_default11
71306
71428
  });
71307
- var npm8, generate10, configure6, config9, c3_default10;
71308
- var init_c310 = __esm({
71429
+ var npm9, generate11, configure7, config10, c3_default11;
71430
+ var init_c311 = __esm({
71309
71431
  "templates/remix/c3.ts"() {
71310
71432
  init_cli();
71311
71433
  init_colors();
@@ -71313,8 +71435,8 @@ var init_c310 = __esm({
71313
71435
  init_frameworks();
71314
71436
  init_codemod();
71315
71437
  init_packageManagers();
71316
- ({ npm: npm8 } = detectPackageManager());
71317
- generate10 = async (ctx) => {
71438
+ ({ npm: npm9 } = detectPackageManager());
71439
+ generate11 = async (ctx) => {
71318
71440
  await runFrameworkGenerator(ctx, [
71319
71441
  ctx.project.name,
71320
71442
  "--template",
@@ -71322,7 +71444,7 @@ var init_c310 = __esm({
71322
71444
  ]);
71323
71445
  logRaw("");
71324
71446
  };
71325
- configure6 = async () => {
71447
+ configure7 = async () => {
71326
71448
  const typeDefsPath = "load-context.ts";
71327
71449
  const s = spinner();
71328
71450
  s.start(`Updating \`${typeDefsPath}\``);
@@ -71337,7 +71459,7 @@ var init_c310 = __esm({
71337
71459
  });
71338
71460
  s.stop(`${brandColor("updated")} \`${dim(typeDefsPath)}\``);
71339
71461
  };
71340
- config9 = {
71462
+ config10 = {
71341
71463
  configVersion: 1,
71342
71464
  id: "remix",
71343
71465
  platform: "pages",
@@ -71345,45 +71467,44 @@ var init_c310 = __esm({
71345
71467
  copyFiles: {
71346
71468
  path: "./templates"
71347
71469
  },
71348
- generate: generate10,
71349
- configure: configure6,
71470
+ generate: generate11,
71471
+ configure: configure7,
71350
71472
  transformPackageJson: async () => ({
71351
71473
  scripts: {
71352
- deploy: `${npm8} run build && wrangler pages deploy ./build/client`,
71353
- preview: `${npm8} run build && wrangler pages dev ./build/client`,
71354
- "build-cf-types": `wrangler types`
71474
+ deploy: `${npm9} run build && wrangler pages deploy`,
71475
+ preview: `${npm9} run build && wrangler pages dev`,
71476
+ "cf-typegen": `wrangler types`
71355
71477
  }
71356
71478
  }),
71357
71479
  devScript: "dev",
71358
71480
  deployScript: "deploy",
71359
71481
  previewScript: "preview"
71360
71482
  };
71361
- c3_default10 = config9;
71483
+ c3_default11 = config10;
71362
71484
  }
71363
71485
  });
71364
71486
 
71365
71487
  // templates/solid/c3.ts
71366
- var c3_exports11 = {};
71367
- __export(c3_exports11, {
71368
- default: () => c3_default11
71488
+ var c3_exports12 = {};
71489
+ __export(c3_exports12, {
71490
+ default: () => c3_default12
71369
71491
  });
71370
- var recast5, npm9, generate11, configure7, config10, c3_default11;
71371
- var init_c311 = __esm({
71492
+ var recast6, npm10, generate12, configure8, config11, c3_default12;
71493
+ var init_c312 = __esm({
71372
71494
  "templates/solid/c3.ts"() {
71373
71495
  init_cli();
71374
71496
  init_colors();
71375
71497
  init_frameworks();
71376
71498
  init_codemod();
71377
- init_compatDate();
71378
71499
  init_files();
71379
71500
  init_packageManagers();
71380
- recast5 = __toESM(require_main3());
71381
- ({ npm: npm9 } = detectPackageManager());
71382
- generate11 = async (ctx) => {
71501
+ recast6 = __toESM(require_main3());
71502
+ ({ npm: npm10 } = detectPackageManager());
71503
+ generate12 = async (ctx) => {
71383
71504
  await runFrameworkGenerator(ctx, ["-p", ctx.project.name, "-s"]);
71384
71505
  logRaw("");
71385
71506
  };
71386
- configure7 = async (ctx) => {
71507
+ configure8 = async (ctx) => {
71387
71508
  usesTypescript(ctx);
71388
71509
  const filePath = `app.config.${usesTypescript(ctx) ? "ts" : "js"}`;
71389
71510
  updateStatus(`Updating configuration in ${blue(filePath)}`);
@@ -71393,7 +71514,7 @@ var init_c311 = __esm({
71393
71514
  if (callee.name !== "defineConfig") {
71394
71515
  return this.traverse(n2);
71395
71516
  }
71396
- const b2 = recast5.types.builders;
71517
+ const b2 = recast6.types.builders;
71397
71518
  n2.node.arguments = [
71398
71519
  b2.objectExpression([
71399
71520
  b2.objectProperty(
@@ -71420,17 +71541,20 @@ var init_c311 = __esm({
71420
71541
  }
71421
71542
  });
71422
71543
  };
71423
- config10 = {
71544
+ config11 = {
71424
71545
  configVersion: 1,
71425
71546
  id: "solid",
71426
71547
  displayName: "Solid",
71427
71548
  platform: "pages",
71428
- generate: generate11,
71429
- configure: configure7,
71549
+ copyFiles: {
71550
+ path: "./templates"
71551
+ },
71552
+ generate: generate12,
71553
+ configure: configure8,
71430
71554
  transformPackageJson: async () => ({
71431
71555
  scripts: {
71432
- preview: `${npm9} run build && npx wrangler pages dev dist ${await compatDateFlag()} --compatibility-flag nodejs_compat`,
71433
- deploy: `${npm9} run build && wrangler pages deploy ./dist`
71556
+ preview: `${npm10} run build && npx wrangler pages dev`,
71557
+ deploy: `${npm10} run build && wrangler pages deploy`
71434
71558
  }
71435
71559
  }),
71436
71560
  compatibilityFlags: ["nodejs_compat"],
@@ -71438,17 +71562,17 @@ var init_c311 = __esm({
71438
71562
  deployScript: "deploy",
71439
71563
  previewScript: "preview"
71440
71564
  };
71441
- c3_default11 = config10;
71565
+ c3_default12 = config11;
71442
71566
  }
71443
71567
  });
71444
71568
 
71445
71569
  // templates/svelte/c3.ts
71446
- var c3_exports12 = {};
71447
- __export(c3_exports12, {
71448
- default: () => c3_default12
71570
+ var c3_exports13 = {};
71571
+ __export(c3_exports13, {
71572
+ default: () => c3_default13
71449
71573
  });
71450
- var import_node_os, recast6, npm10, generate12, configure8, updateSvelteConfig, updateTypeDefinitions, config11, c3_default12;
71451
- var init_c312 = __esm({
71574
+ var import_node_os, recast7, npm11, generate13, configure9, updateSvelteConfig, updateTypeDefinitions, config12, c3_default13;
71575
+ var init_c313 = __esm({
71452
71576
  "templates/svelte/c3.ts"() {
71453
71577
  import_node_os = require("node:os");
71454
71578
  init_cli();
@@ -71458,13 +71582,13 @@ var init_c312 = __esm({
71458
71582
  init_files();
71459
71583
  init_packageManagers();
71460
71584
  init_packages();
71461
- recast6 = __toESM(require_main3());
71462
- ({ npm: npm10 } = detectPackageManager());
71463
- generate12 = async (ctx) => {
71585
+ recast7 = __toESM(require_main3());
71586
+ ({ npm: npm11 } = detectPackageManager());
71587
+ generate13 = async (ctx) => {
71464
71588
  await runFrameworkGenerator(ctx, [ctx.project.name]);
71465
71589
  logRaw("");
71466
71590
  };
71467
- configure8 = async (ctx) => {
71591
+ configure9 = async (ctx) => {
71468
71592
  const pkg = `@sveltejs/adapter-cloudflare`;
71469
71593
  await installPackages([pkg], {
71470
71594
  dev: true,
@@ -71491,7 +71615,7 @@ var init_c312 = __esm({
71491
71615
  return;
71492
71616
  }
71493
71617
  updateStatus(`Updating global type definitions in ${blue("app.d.ts")}`);
71494
- const b2 = recast6.types.builders;
71618
+ const b2 = recast7.types.builders;
71495
71619
  transformFile("src/app.d.ts", {
71496
71620
  visitTSModuleDeclaration(n2) {
71497
71621
  if (n2.value.id.name === "App" && n2.node.body) {
@@ -71523,7 +71647,7 @@ var init_c312 = __esm({
71523
71647
  }
71524
71648
  });
71525
71649
  };
71526
- config11 = {
71650
+ config12 = {
71527
71651
  configVersion: 1,
71528
71652
  id: "svelte",
71529
71653
  displayName: "Svelte",
@@ -71534,18 +71658,18 @@ var init_c312 = __esm({
71534
71658
  ts: { path: "./ts" }
71535
71659
  }
71536
71660
  },
71537
- generate: generate12,
71538
- configure: configure8,
71661
+ generate: generate13,
71662
+ configure: configure9,
71539
71663
  transformPackageJson: async (original, ctx) => {
71540
71664
  let scripts = {
71541
- preview: `${npm10} run build && wrangler pages dev .svelte-kit/cloudflare`,
71542
- deploy: `${npm10} run build && wrangler pages deploy .svelte-kit/cloudflare`
71665
+ preview: `${npm11} run build && wrangler pages dev`,
71666
+ deploy: `${npm11} run build && wrangler pages deploy`
71543
71667
  };
71544
71668
  if (usesTypescript(ctx)) {
71545
71669
  const mv = (0, import_node_os.platform)() === "win32" ? "move" : "mv";
71546
71670
  scripts = {
71547
71671
  ...scripts,
71548
- "build-cf-types": `wrangler types && ${mv} worker-configuration.d.ts src/`
71672
+ "cf-typegen": `wrangler types && ${mv} worker-configuration.d.ts src/`
71549
71673
  };
71550
71674
  }
71551
71675
  return { scripts };
@@ -71554,53 +71678,53 @@ var init_c312 = __esm({
71554
71678
  deployScript: "deploy",
71555
71679
  previewScript: "preview"
71556
71680
  };
71557
- c3_default12 = config11;
71681
+ c3_default13 = config12;
71558
71682
  }
71559
71683
  });
71560
71684
 
71561
71685
  // templates/vue/c3.ts
71562
- var c3_exports13 = {};
71563
- __export(c3_exports13, {
71564
- default: () => c3_default13
71686
+ var c3_exports14 = {};
71687
+ __export(c3_exports14, {
71688
+ default: () => c3_default14
71565
71689
  });
71566
- var npm11, generate13, config12, c3_default13;
71567
- var init_c313 = __esm({
71690
+ var npm12, generate14, config13, c3_default14;
71691
+ var init_c314 = __esm({
71568
71692
  "templates/vue/c3.ts"() {
71569
71693
  init_frameworks();
71570
71694
  init_packageManagers();
71571
- ({ npm: npm11 } = detectPackageManager());
71572
- generate13 = async (ctx) => {
71695
+ ({ npm: npm12 } = detectPackageManager());
71696
+ generate14 = async (ctx) => {
71573
71697
  await runFrameworkGenerator(ctx, [ctx.project.name]);
71574
71698
  };
71575
- config12 = {
71699
+ config13 = {
71576
71700
  configVersion: 1,
71577
71701
  id: "vue",
71578
71702
  displayName: "Vue",
71579
71703
  platform: "pages",
71580
- generate: generate13,
71704
+ generate: generate14,
71581
71705
  transformPackageJson: async () => ({
71582
71706
  scripts: {
71583
- deploy: `${npm11} run build && wrangler pages deploy ./dist`,
71584
- preview: `${npm11} run build && wrangler pages dev ./dist`
71707
+ deploy: `${npm12} run build && wrangler pages deploy ./dist`,
71708
+ preview: `${npm12} run build && wrangler pages dev ./dist`
71585
71709
  }
71586
71710
  }),
71587
71711
  devScript: "dev",
71588
71712
  deployScript: "deploy",
71589
71713
  previewScript: "preview"
71590
71714
  };
71591
- c3_default13 = config12;
71715
+ c3_default14 = config13;
71592
71716
  }
71593
71717
  });
71594
71718
 
71595
71719
  // templates/hello-world/c3.ts
71596
- var c3_exports14 = {};
71597
- __export(c3_exports14, {
71598
- default: () => c3_default14
71720
+ var c3_exports15 = {};
71721
+ __export(c3_exports15, {
71722
+ default: () => c3_default15
71599
71723
  });
71600
- var c3_default14;
71601
- var init_c314 = __esm({
71724
+ var c3_default15;
71725
+ var init_c315 = __esm({
71602
71726
  "templates/hello-world/c3.ts"() {
71603
- c3_default14 = {
71727
+ c3_default15 = {
71604
71728
  configVersion: 1,
71605
71729
  id: "hello-world",
71606
71730
  displayName: '"Hello World" Worker',
@@ -71620,14 +71744,14 @@ var init_c314 = __esm({
71620
71744
  });
71621
71745
 
71622
71746
  // templates/hello-world-python/c3.ts
71623
- var c3_exports15 = {};
71624
- __export(c3_exports15, {
71625
- default: () => c3_default15
71747
+ var c3_exports16 = {};
71748
+ __export(c3_exports16, {
71749
+ default: () => c3_default16
71626
71750
  });
71627
- var c3_default15;
71628
- var init_c315 = __esm({
71751
+ var c3_default16;
71752
+ var init_c316 = __esm({
71629
71753
  "templates/hello-world-python/c3.ts"() {
71630
- c3_default15 = {
71754
+ c3_default16 = {
71631
71755
  configVersion: 1,
71632
71756
  id: "hello-world-python",
71633
71757
  displayName: '"Hello World" Worker (Python)',
@@ -71640,14 +71764,14 @@ var init_c315 = __esm({
71640
71764
  });
71641
71765
 
71642
71766
  // templates/hello-world-durable-object/c3.ts
71643
- var c3_exports16 = {};
71644
- __export(c3_exports16, {
71645
- default: () => c3_default16
71767
+ var c3_exports17 = {};
71768
+ __export(c3_exports17, {
71769
+ default: () => c3_default17
71646
71770
  });
71647
- var c3_default16;
71648
- var init_c316 = __esm({
71771
+ var c3_default17;
71772
+ var init_c317 = __esm({
71649
71773
  "templates/hello-world-durable-object/c3.ts"() {
71650
- c3_default16 = {
71774
+ c3_default17 = {
71651
71775
  configVersion: 1,
71652
71776
  id: "hello-world-durable-object",
71653
71777
  displayName: '"Hello World" Durable Object',
@@ -71667,14 +71791,14 @@ var init_c316 = __esm({
71667
71791
  });
71668
71792
 
71669
71793
  // templates/common/c3.ts
71670
- var c3_exports17 = {};
71671
- __export(c3_exports17, {
71672
- default: () => c3_default17
71794
+ var c3_exports18 = {};
71795
+ __export(c3_exports18, {
71796
+ default: () => c3_default18
71673
71797
  });
71674
- var c3_default17;
71675
- var init_c317 = __esm({
71798
+ var c3_default18;
71799
+ var init_c318 = __esm({
71676
71800
  "templates/common/c3.ts"() {
71677
- c3_default17 = {
71801
+ c3_default18 = {
71678
71802
  configVersion: 1,
71679
71803
  id: "common",
71680
71804
  displayName: "Example router & proxy Worker",
@@ -71694,14 +71818,14 @@ var init_c317 = __esm({
71694
71818
  });
71695
71819
 
71696
71820
  // templates/scheduled/c3.ts
71697
- var c3_exports18 = {};
71698
- __export(c3_exports18, {
71699
- default: () => c3_default18
71821
+ var c3_exports19 = {};
71822
+ __export(c3_exports19, {
71823
+ default: () => c3_default19
71700
71824
  });
71701
- var c3_default18;
71702
- var init_c318 = __esm({
71825
+ var c3_default19;
71826
+ var init_c319 = __esm({
71703
71827
  "templates/scheduled/c3.ts"() {
71704
- c3_default18 = {
71828
+ c3_default19 = {
71705
71829
  configVersion: 1,
71706
71830
  id: "scheduled",
71707
71831
  displayName: "Scheduled Worker (Cron Trigger)",
@@ -71721,14 +71845,14 @@ var init_c318 = __esm({
71721
71845
  });
71722
71846
 
71723
71847
  // templates/queues/c3.ts
71724
- var c3_exports19 = {};
71725
- __export(c3_exports19, {
71726
- default: () => c3_default19
71848
+ var c3_exports20 = {};
71849
+ __export(c3_exports20, {
71850
+ default: () => c3_default20
71727
71851
  });
71728
- var c3_default19;
71729
- var init_c319 = __esm({
71852
+ var c3_default20;
71853
+ var init_c320 = __esm({
71730
71854
  "templates/queues/c3.ts"() {
71731
- c3_default19 = {
71855
+ c3_default20 = {
71732
71856
  configVersion: 1,
71733
71857
  id: "queues",
71734
71858
  displayName: "Queue consumer & producer Worker",
@@ -71758,14 +71882,14 @@ var init_c319 = __esm({
71758
71882
  });
71759
71883
 
71760
71884
  // templates/openapi/c3.ts
71761
- var c3_exports20 = {};
71762
- __export(c3_exports20, {
71763
- default: () => c3_default20
71885
+ var c3_exports21 = {};
71886
+ __export(c3_exports21, {
71887
+ default: () => c3_default21
71764
71888
  });
71765
- var c3_default20;
71766
- var init_c320 = __esm({
71889
+ var c3_default21;
71890
+ var init_c321 = __esm({
71767
71891
  "templates/openapi/c3.ts"() {
71768
- c3_default20 = {
71892
+ c3_default21 = {
71769
71893
  configVersion: 1,
71770
71894
  id: "openapi",
71771
71895
  displayName: "API starter (OpenAPI compliant)",
@@ -71778,10 +71902,10 @@ var init_c320 = __esm({
71778
71902
  });
71779
71903
 
71780
71904
  // templates/pre-existing/c3.ts
71781
- var c3_exports21 = {};
71782
- __export(c3_exports21, {
71905
+ var c3_exports22 = {};
71906
+ __export(c3_exports22, {
71783
71907
  copyExistingWorkerFiles: () => copyExistingWorkerFiles,
71784
- default: () => c3_default21
71908
+ default: () => c3_default22
71785
71909
  });
71786
71910
  async function copyExistingWorkerFiles(ctx) {
71787
71911
  const { dlx } = detectPackageManager();
@@ -71830,8 +71954,8 @@ async function copyExistingWorkerFiles(ctx) {
71830
71954
  (0, import_path14.join)(ctx.project.path, "wrangler.toml")
71831
71955
  );
71832
71956
  }
71833
- var import_promises, import_os, import_path14, c3_default21;
71834
- var init_c321 = __esm({
71957
+ var import_promises, import_os, import_path14, c3_default22;
71958
+ var init_c322 = __esm({
71835
71959
  "templates/pre-existing/c3.ts"() {
71836
71960
  import_promises = require("fs/promises");
71837
71961
  import_os = require("os");
@@ -71841,7 +71965,7 @@ var init_c321 = __esm({
71841
71965
  init_command();
71842
71966
  init_packageManagers();
71843
71967
  init_accounts();
71844
- c3_default21 = {
71968
+ c3_default22 = {
71845
71969
  configVersion: 1,
71846
71970
  id: "pre-existing",
71847
71971
  displayName: "Pre-existing Worker (from Dashboard)",
@@ -71905,36 +72029,37 @@ var init_templates = __esm({
71905
72029
  return typescript ? "ts" : "js";
71906
72030
  };
71907
72031
  getFrameworkMap = async () => ({
71908
- angular: (await Promise.resolve().then(() => (init_c3(), c3_exports))).default,
71909
- astro: (await Promise.resolve().then(() => (init_c32(), c3_exports2))).default,
71910
- docusaurus: (await Promise.resolve().then(() => (init_c33(), c3_exports3))).default,
71911
- gatsby: (await Promise.resolve().then(() => (init_c34(), c3_exports4))).default,
71912
- hono: (await Promise.resolve().then(() => (init_c35(), c3_exports5))).default,
71913
- next: (await Promise.resolve().then(() => (init_c36(), c3_exports6))).default,
71914
- nuxt: (await Promise.resolve().then(() => (init_c37(), c3_exports7))).default,
71915
- qwik: (await Promise.resolve().then(() => (init_c38(), c3_exports8))).default,
71916
- react: (await Promise.resolve().then(() => (init_c39(), c3_exports9))).default,
71917
- remix: (await Promise.resolve().then(() => (init_c310(), c3_exports10))).default,
71918
- solid: (await Promise.resolve().then(() => (init_c311(), c3_exports11))).default,
71919
- svelte: (await Promise.resolve().then(() => (init_c312(), c3_exports12))).default,
71920
- vue: (await Promise.resolve().then(() => (init_c313(), c3_exports13))).default
72032
+ analog: (await Promise.resolve().then(() => (init_c3(), c3_exports))).default,
72033
+ angular: (await Promise.resolve().then(() => (init_c32(), c3_exports2))).default,
72034
+ astro: (await Promise.resolve().then(() => (init_c33(), c3_exports3))).default,
72035
+ docusaurus: (await Promise.resolve().then(() => (init_c34(), c3_exports4))).default,
72036
+ gatsby: (await Promise.resolve().then(() => (init_c35(), c3_exports5))).default,
72037
+ hono: (await Promise.resolve().then(() => (init_c36(), c3_exports6))).default,
72038
+ next: (await Promise.resolve().then(() => (init_c37(), c3_exports7))).default,
72039
+ nuxt: (await Promise.resolve().then(() => (init_c38(), c3_exports8))).default,
72040
+ qwik: (await Promise.resolve().then(() => (init_c39(), c3_exports9))).default,
72041
+ react: (await Promise.resolve().then(() => (init_c310(), c3_exports10))).default,
72042
+ remix: (await Promise.resolve().then(() => (init_c311(), c3_exports11))).default,
72043
+ solid: (await Promise.resolve().then(() => (init_c312(), c3_exports12))).default,
72044
+ svelte: (await Promise.resolve().then(() => (init_c313(), c3_exports13))).default,
72045
+ vue: (await Promise.resolve().then(() => (init_c314(), c3_exports14))).default
71921
72046
  });
71922
72047
  getTemplateMap = async () => {
71923
72048
  return {
71924
- "hello-world": (await Promise.resolve().then(() => (init_c314(), c3_exports14))).default,
71925
- "hello-world-python": (await Promise.resolve().then(() => (init_c315(), c3_exports15))).default,
71926
- "hello-world-durable-object": (await Promise.resolve().then(() => (init_c316(), c3_exports16))).default,
72049
+ "hello-world": (await Promise.resolve().then(() => (init_c315(), c3_exports15))).default,
72050
+ "hello-world-python": (await Promise.resolve().then(() => (init_c316(), c3_exports16))).default,
72051
+ "hello-world-durable-object": (await Promise.resolve().then(() => (init_c317(), c3_exports17))).default,
71927
72052
  // Dummy record -- actual template config resolved in `selectFramework`
71928
72053
  "web-framework": { displayName: "Website or web app" },
71929
- common: (await Promise.resolve().then(() => (init_c317(), c3_exports17))).default,
71930
- scheduled: (await Promise.resolve().then(() => (init_c318(), c3_exports18))).default,
71931
- queues: (await Promise.resolve().then(() => (init_c319(), c3_exports19))).default,
71932
- openapi: (await Promise.resolve().then(() => (init_c320(), c3_exports20))).default,
72054
+ common: (await Promise.resolve().then(() => (init_c318(), c3_exports18))).default,
72055
+ scheduled: (await Promise.resolve().then(() => (init_c319(), c3_exports19))).default,
72056
+ queues: (await Promise.resolve().then(() => (init_c320(), c3_exports20))).default,
72057
+ openapi: (await Promise.resolve().then(() => (init_c321(), c3_exports21))).default,
71933
72058
  // Dummy record -- actual template config resolved in `processRemoteTemplate`
71934
72059
  "remote-template": {
71935
72060
  displayName: "Worker built from a template hosted in a git repository"
71936
72061
  },
71937
- "pre-existing": (await Promise.resolve().then(() => (init_c321(), c3_exports21))).default
72062
+ "pre-existing": (await Promise.resolve().then(() => (init_c322(), c3_exports22))).default
71938
72063
  };
71939
72064
  };
71940
72065
  selectTemplate = async (args) => {
@@ -71985,8 +72110,8 @@ var init_templates = __esm({
71985
72110
  selectFramework = async (args) => {
71986
72111
  const frameworkMap = await getFrameworkMap();
71987
72112
  const frameworkOptions = Object.entries(frameworkMap).map(
71988
- ([key, config13]) => ({
71989
- label: config13.displayName,
72113
+ ([key, config14]) => ({
72114
+ label: config14.displayName,
71990
72115
  value: key
71991
72116
  })
71992
72117
  );
@@ -72035,27 +72160,27 @@ var init_templates = __esm({
72035
72160
  defaultValue: C3_DEFAULTS.template
72036
72161
  });
72037
72162
  const path4 = await downloadRemoteTemplate(templateUrl);
72038
- const config13 = inferTemplateConfig(path4);
72039
- validateTemplate(path4, config13);
72163
+ const config14 = inferTemplateConfig(path4);
72164
+ validateTemplate(path4, config14);
72040
72165
  return {
72041
72166
  path: path4,
72042
- ...config13
72167
+ ...config14
72043
72168
  };
72044
72169
  };
72045
- validateTemplate = (path4, config13) => {
72046
- if (!config13.copyFiles) {
72170
+ validateTemplate = (path4, config14) => {
72171
+ if (!config14.copyFiles) {
72047
72172
  return;
72048
72173
  }
72049
- if (isVariantInfo(config13.copyFiles)) {
72050
- validateTemplateSrcDirectory((0, import_path15.resolve)(path4, config13.copyFiles.path), config13);
72174
+ if (isVariantInfo(config14.copyFiles)) {
72175
+ validateTemplateSrcDirectory((0, import_path15.resolve)(path4, config14.copyFiles.path), config14);
72051
72176
  } else {
72052
- for (const variant of Object.values(config13.copyFiles.variants)) {
72053
- validateTemplateSrcDirectory((0, import_path15.resolve)(path4, variant.path), config13);
72177
+ for (const variant of Object.values(config14.copyFiles.variants)) {
72178
+ validateTemplateSrcDirectory((0, import_path15.resolve)(path4, variant.path), config14);
72054
72179
  }
72055
72180
  }
72056
72181
  };
72057
- validateTemplateSrcDirectory = (path4, config13) => {
72058
- if (config13.platform === "workers") {
72182
+ validateTemplateSrcDirectory = (path4, config14) => {
72183
+ if (config14.platform === "workers") {
72059
72184
  const wranglerTomlPath = (0, import_path15.resolve)(path4, "wrangler.toml");
72060
72185
  if (!(0, import_fs12.existsSync)(wranglerTomlPath)) {
72061
72186
  crash(`create-cloudflare templates must contain a "wrangler.toml" file.`);
@@ -73105,23 +73230,23 @@ var YargsParser = class {
73105
73230
  const configPath = argv2[configKey] || configLookup[configKey];
73106
73231
  if (configPath) {
73107
73232
  try {
73108
- let config13 = null;
73233
+ let config14 = null;
73109
73234
  const resolvedConfigPath = mixin2.resolve(mixin2.cwd(), configPath);
73110
73235
  const resolveConfig = flags.configs[configKey];
73111
73236
  if (typeof resolveConfig === "function") {
73112
73237
  try {
73113
- config13 = resolveConfig(resolvedConfigPath);
73238
+ config14 = resolveConfig(resolvedConfigPath);
73114
73239
  } catch (e) {
73115
- config13 = e;
73240
+ config14 = e;
73116
73241
  }
73117
- if (config13 instanceof Error) {
73118
- error2 = config13;
73242
+ if (config14 instanceof Error) {
73243
+ error2 = config14;
73119
73244
  return;
73120
73245
  }
73121
73246
  } else {
73122
- config13 = mixin2.require(resolvedConfigPath);
73247
+ config14 = mixin2.require(resolvedConfigPath);
73123
73248
  }
73124
- setConfigObject(config13);
73249
+ setConfigObject(config14);
73125
73250
  } catch (ex) {
73126
73251
  if (ex.name === "PermissionDenied")
73127
73252
  error2 = ex;
@@ -73131,9 +73256,9 @@ var YargsParser = class {
73131
73256
  }
73132
73257
  });
73133
73258
  }
73134
- function setConfigObject(config13, prev) {
73135
- Object.keys(config13).forEach(function(key) {
73136
- const value = config13[key];
73259
+ function setConfigObject(config14, prev) {
73260
+ Object.keys(config14).forEach(function(key) {
73261
+ const value = config14[key];
73137
73262
  const fullKey = prev ? prev + "." + key : key;
73138
73263
  if (typeof value === "object" && value !== null && !Array.isArray(value) && configuration["dot-notation"]) {
73139
73264
  setConfigObject(value, fullKey);
@@ -74285,11 +74410,11 @@ var CommandInstance = class {
74285
74410
  });
74286
74411
  if (!unparsed.length)
74287
74412
  return;
74288
- const config13 = Object.assign({}, options.configuration, {
74413
+ const config14 = Object.assign({}, options.configuration, {
74289
74414
  "populate--": false
74290
74415
  });
74291
74416
  const parsed = this.shim.Parser.detailed(unparsed, Object.assign({}, options, {
74292
- configuration: config13
74417
+ configuration: config14
74293
74418
  }));
74294
74419
  if (parsed.error) {
74295
74420
  yargs.getInternalMethods().getUsageInstance().fail(parsed.error.message, parsed.error);
@@ -75511,31 +75636,31 @@ ${customMsgs.join("\n")}` : "";
75511
75636
  // ../../node_modules/.pnpm/yargs@17.7.1/node_modules/yargs/build/lib/utils/apply-extends.js
75512
75637
  var previouslyVisitedConfigs = [];
75513
75638
  var shim2;
75514
- function applyExtends(config13, cwd, mergeExtends, _shim) {
75639
+ function applyExtends(config14, cwd, mergeExtends, _shim) {
75515
75640
  shim2 = _shim;
75516
75641
  let defaultConfig = {};
75517
- if (Object.prototype.hasOwnProperty.call(config13, "extends")) {
75518
- if (typeof config13.extends !== "string")
75642
+ if (Object.prototype.hasOwnProperty.call(config14, "extends")) {
75643
+ if (typeof config14.extends !== "string")
75519
75644
  return defaultConfig;
75520
- const isPath = /\.json|\..*rc$/.test(config13.extends);
75645
+ const isPath = /\.json|\..*rc$/.test(config14.extends);
75521
75646
  let pathToDefault = null;
75522
75647
  if (!isPath) {
75523
75648
  try {
75524
- pathToDefault = require.resolve(config13.extends);
75649
+ pathToDefault = require.resolve(config14.extends);
75525
75650
  } catch (_err) {
75526
- return config13;
75651
+ return config14;
75527
75652
  }
75528
75653
  } else {
75529
- pathToDefault = getPathToDefaultConfig(cwd, config13.extends);
75654
+ pathToDefault = getPathToDefaultConfig(cwd, config14.extends);
75530
75655
  }
75531
75656
  checkForCircularExtends(pathToDefault);
75532
75657
  previouslyVisitedConfigs.push(pathToDefault);
75533
- defaultConfig = isPath ? JSON.parse(shim2.readFileSync(pathToDefault, "utf8")) : require(config13.extends);
75534
- delete config13.extends;
75658
+ defaultConfig = isPath ? JSON.parse(shim2.readFileSync(pathToDefault, "utf8")) : require(config14.extends);
75659
+ delete config14.extends;
75535
75660
  defaultConfig = applyExtends(defaultConfig, shim2.path.dirname(pathToDefault), mergeExtends, shim2);
75536
75661
  }
75537
75662
  previouslyVisitedConfigs = [];
75538
- return mergeExtends ? mergeDeep(defaultConfig, config13) : Object.assign({}, defaultConfig, config13);
75663
+ return mergeExtends ? mergeDeep(defaultConfig, config14) : Object.assign({}, defaultConfig, config14);
75539
75664
  }
75540
75665
  function checkForCircularExtends(cfgPath) {
75541
75666
  if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) {
@@ -76316,9 +76441,9 @@ var YargsInstance = class {
76316
76441
  }
76317
76442
  return maybePromise;
76318
76443
  }
76319
- parserConfiguration(config13) {
76320
- argsert("<object>", [config13], arguments.length);
76321
- __classPrivateFieldSet(this, _YargsInstance_parserConfig, config13, "f");
76444
+ parserConfiguration(config14) {
76445
+ argsert("<object>", [config14], arguments.length);
76446
+ __classPrivateFieldSet(this, _YargsInstance_parserConfig, config14, "f");
76322
76447
  return this;
76323
76448
  }
76324
76449
  pkgConf(key, rootPath) {
@@ -76490,9 +76615,9 @@ var YargsInstance = class {
76490
76615
  return this;
76491
76616
  }
76492
76617
  }
76493
- usageConfiguration(config13) {
76494
- argsert("<object>", [config13], arguments.length);
76495
- __classPrivateFieldSet(this, _YargsInstance_usageConfig, config13, "f");
76618
+ usageConfiguration(config14) {
76619
+ argsert("<object>", [config14], arguments.length);
76620
+ __classPrivateFieldSet(this, _YargsInstance_usageConfig, config14, "f");
76496
76621
  return this;
76497
76622
  }
76498
76623
  version(opt, msg, ver) {
@@ -76898,11 +77023,11 @@ var YargsInstance = class {
76898
77023
  __classPrivateFieldGet(this, _YargsInstance_options, "f").__ = __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.__;
76899
77024
  __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration = this[kGetParserConfiguration]();
76900
77025
  const populateDoubleDash = !!__classPrivateFieldGet(this, _YargsInstance_options, "f").configuration["populate--"];
76901
- const config13 = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration, {
77026
+ const config14 = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration, {
76902
77027
  "populate--": true
76903
77028
  });
76904
77029
  const parsed = __classPrivateFieldGet(this, _YargsInstance_shim, "f").Parser.detailed(args, Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f"), {
76905
- configuration: { "parse-positional-numbers": false, ...config13 }
77030
+ configuration: { "parse-positional-numbers": false, ...config14 }
76906
77031
  }));
76907
77032
  const argv = Object.assign(parsed.argv, __classPrivateFieldGet(this, _YargsInstance_parseContext, "f"));
76908
77033
  let argvPromise = void 0;
@@ -77339,15 +77464,15 @@ var showHelp = ({
77339
77464
  options,
77340
77465
  intro
77341
77466
  }) => {
77342
- const { name: pm2 } = detectPackageManager();
77467
+ const { name: pm3 } = detectPackageManager();
77343
77468
  logRaw(`${brandColor("create-cloudflare")} ${dim("v" + version)}
77344
77469
  `);
77345
77470
  indent(`${intro.trim()}
77346
77471
  `, 1);
77347
77472
  logRaw(bold("USAGE\n"));
77348
- const latest = pm2 === "yarn" ? "" : "@latest";
77349
- const opts = pm2 === "npm" ? "-- options" : "options";
77350
- indent(`${pm2} create cloudflare${latest} [directory] [${opts}]
77473
+ const latest = pm3 === "yarn" ? "" : "@latest";
77474
+ const opts = pm3 === "npm" ? "-- options" : "options";
77475
+ indent(`${pm3} create cloudflare${latest} [directory] [${opts}]
77351
77476
  `, 1);
77352
77477
  logRaw(bold("OPTIONS\n"));
77353
77478
  renderPositionals(positionals);
@@ -77476,6 +77601,7 @@ var cliDefinition = {
77476
77601
  pnpm create clouldfare --framework next -- --ts
77477
77602
  `,
77478
77603
  values: [
77604
+ { name: "analog" },
77479
77605
  { name: "angular" },
77480
77606
  { name: "astro" },
77481
77607
  { name: "docusaurus" },
@@ -77676,7 +77802,7 @@ init_command();
77676
77802
  init_packageManagers();
77677
77803
 
77678
77804
  // ../wrangler/package.json
77679
- var version2 = "3.50.0";
77805
+ var version2 = "3.51.1";
77680
77806
 
77681
77807
  // src/git.ts
77682
77808
  init_package();
@@ -78971,7 +79097,7 @@ var writeWranglerToml = (ctx, contents) => {
78971
79097
 
78972
79098
  // src/deploy.ts
78973
79099
  var offerToDeploy = async (ctx) => {
78974
- const { npm: npm13 } = detectPackageManager();
79100
+ const { npm: npm14 } = detectPackageManager();
78975
79101
  startSection(`Deploy with Cloudflare`, `Step 3 of 3`);
78976
79102
  if (!await isDeployable(ctx)) {
78977
79103
  ctx.args.deploy = false;
@@ -78982,7 +79108,7 @@ var offerToDeploy = async (ctx) => {
78982
79108
  );
78983
79109
  }
78984
79110
  const label = `deploy via \`${quoteShellArgs([
78985
- npm13,
79111
+ npm14,
78986
79112
  "run",
78987
79113
  ctx.template.deployScript ?? "deploy"
78988
79114
  ])}\``;
@@ -79013,18 +79139,18 @@ var isDeployable = async (ctx) => {
79013
79139
  return true;
79014
79140
  };
79015
79141
  var runDeploy = async (ctx) => {
79016
- const { npm: npm13, name: pm2 } = detectPackageManager();
79142
+ const { npm: npm14, name: pm3 } = detectPackageManager();
79017
79143
  if (!ctx.account?.id) {
79018
79144
  crash("Failed to read Cloudflare account.");
79019
79145
  return;
79020
79146
  }
79021
- const baseDeployCmd = [npm13, "run", ctx.template.deployScript ?? "deploy"];
79147
+ const baseDeployCmd = [npm14, "run", ctx.template.deployScript ?? "deploy"];
79022
79148
  const insideGitRepo = await isInsideGitRepo(ctx.project.path);
79023
79149
  const deployCmd = [
79024
79150
  ...baseDeployCmd,
79025
79151
  // Important: the following assumes that all framework deploy commands terminate with `wrangler pages deploy`
79026
79152
  ...ctx.template.platform === "pages" && ctx.commitMessage && !insideGitRepo ? [
79027
- ...pm2 === "npm" ? ["--"] : [],
79153
+ ...pm3 === "npm" ? ["--"] : [],
79028
79154
  "--commit-message",
79029
79155
  JSON.stringify(ctx.commitMessage)
79030
79156
  ] : []
@@ -79032,7 +79158,10 @@ var runDeploy = async (ctx) => {
79032
79158
  const result = await runCommand(deployCmd, {
79033
79159
  silent: true,
79034
79160
  cwd: ctx.project.path,
79035
- env: { CLOUDFLARE_ACCOUNT_ID: ctx.account.id, NODE_ENV: "production" },
79161
+ env: {
79162
+ CLOUDFLARE_ACCOUNT_ID: ctx.account.id,
79163
+ NODE_ENV: "production"
79164
+ },
79036
79165
  startText: "Deploying your application",
79037
79166
  doneText: `${brandColor("deployed")} ${dim(
79038
79167
  `via \`${quoteShellArgs(baseDeployCmd)}\``
@@ -79059,8 +79188,8 @@ init_command();
79059
79188
  init_packageManagers();
79060
79189
 
79061
79190
  // src/helpers/retry.ts
79062
- var retry = async (config13, fn) => {
79063
- let { times } = config13;
79191
+ var retry = async (config14, fn) => {
79192
+ let { times } = config14;
79064
79193
  let error2 = null;
79065
79194
  while (times > 0) {
79066
79195
  try {
@@ -79068,7 +79197,7 @@ var retry = async (config13, fn) => {
79068
79197
  } catch (e) {
79069
79198
  error2 = e;
79070
79199
  times--;
79071
- if (config13.exitCondition?.(e)) {
79200
+ if (config14.exitCondition?.(e)) {
79072
79201
  break;
79073
79202
  }
79074
79203
  }
@@ -79257,23 +79386,23 @@ function secondsSince(start) {
79257
79386
 
79258
79387
  // src/summary.ts
79259
79388
  var printSummary = async (ctx) => {
79260
- const { npm: npm13 } = detectPackageManager();
79389
+ const { npm: npm14 } = detectPackageManager();
79261
79390
  const dirRelativePath = (0, import_path10.relative)(ctx.originalCWD, ctx.project.path);
79262
79391
  const nextSteps = [
79263
79392
  dirRelativePath ? ["Navigate to the new directory", `cd ${dirRelativePath}`] : [],
79264
79393
  [
79265
79394
  "Run the development server",
79266
- quoteShellArgs([npm13, "run", ctx.template.devScript ?? "start"])
79395
+ quoteShellArgs([npm14, "run", ctx.template.devScript ?? "start"])
79267
79396
  ],
79268
79397
  ...ctx.template.previewScript ? [
79269
79398
  [
79270
79399
  "Preview your application",
79271
- quoteShellArgs([npm13, "run", ctx.template.previewScript])
79400
+ quoteShellArgs([npm14, "run", ctx.template.previewScript])
79272
79401
  ]
79273
79402
  ] : [],
79274
79403
  [
79275
79404
  "Deploy your application",
79276
- quoteShellArgs([npm13, "run", ctx.template.deployScript ?? "deploy"])
79405
+ quoteShellArgs([npm14, "run", ctx.template.deployScript ?? "deploy"])
79277
79406
  ],
79278
79407
  [
79279
79408
  "Read the documentation",
@@ -79295,7 +79424,7 @@ var printSummary = async (ctx) => {
79295
79424
  `${bgGreen(" APPLICATION CREATED ")}`,
79296
79425
  `${dim("Deploy your application with")}`,
79297
79426
  `${blue(
79298
- quoteShellArgs([npm13, "run", ctx.template.deployScript ?? "deploy"])
79427
+ quoteShellArgs([npm14, "run", ctx.template.deployScript ?? "deploy"])
79299
79428
  )}`
79300
79429
  ].join(" ");
79301
79430
  logRaw(msg);
@@ -80639,14 +80768,14 @@ function applyEdits(text, edits) {
80639
80768
 
80640
80769
  // src/workers.ts
80641
80770
  async function installWorkersTypes(ctx) {
80642
- const { npm: npm13 } = detectPackageManager();
80771
+ const { npm: npm14 } = detectPackageManager();
80643
80772
  if (!usesTypescript(ctx)) {
80644
80773
  return;
80645
80774
  }
80646
80775
  await installPackages(["@cloudflare/workers-types"], {
80647
80776
  dev: true,
80648
80777
  startText: "Installing @cloudflare/workers-types",
80649
- doneText: `${brandColor("installed")} ${dim(`via ${npm13}`)}`
80778
+ doneText: `${brandColor("installed")} ${dim(`via ${npm14}`)}`
80650
80779
  });
80651
80780
  await addWorkersTypesToTsConfig(ctx);
80652
80781
  }
@@ -80669,8 +80798,8 @@ async function addWorkersTypesToTsConfig(ctx) {
80669
80798
  }
80670
80799
  const typesEntrypoint = `@cloudflare/workers-types/${entrypointVersion}`;
80671
80800
  try {
80672
- const config13 = parse3(tsconfig);
80673
- const currentTypes = config13.compilerOptions?.types ?? [];
80801
+ const config14 = parse3(tsconfig);
80802
+ const currentTypes = config14.compilerOptions?.types ?? [];
80674
80803
  const explicitEntrypoint = currentTypes.some(
80675
80804
  (t) => t.match(/@cloudflare\/workers-types\/\d{4}-\d{2}-\d{2}/)
80676
80805
  );
@@ -80700,7 +80829,7 @@ async function addWorkersTypesToTsConfig(ctx) {
80700
80829
  }
80701
80830
 
80702
80831
  // src/cli.ts
80703
- var { npm: npm12 } = detectPackageManager();
80832
+ var { npm: npm13 } = detectPackageManager();
80704
80833
  var main = async (argv) => {
80705
80834
  const args = await parseArgs(argv);
80706
80835
  logRaw("");
@@ -80712,10 +80841,10 @@ var main = async (argv) => {
80712
80841
  };
80713
80842
  var runLatest = async () => {
80714
80843
  const args = process.argv.slice(2);
80715
- if (npm12 === "npm") {
80844
+ if (npm13 === "npm") {
80716
80845
  args.unshift("--");
80717
80846
  }
80718
- await runCommand([npm12, "create", "cloudflare@latest", ...args]);
80847
+ await runCommand([npm13, "create", "cloudflare@latest", ...args]);
80719
80848
  };
80720
80849
  var runCli = async (args) => {
80721
80850
  printBanner();
@@ -80760,7 +80889,7 @@ var setupProjectDirectory = (args) => {
80760
80889
  };
80761
80890
  var runTemplate = async (ctx) => {
80762
80891
  await create(ctx);
80763
- await configure9(ctx);
80892
+ await configure10(ctx);
80764
80893
  await deploy(ctx);
80765
80894
  await printSummary(ctx);
80766
80895
  };
@@ -80776,7 +80905,7 @@ var create = async (ctx) => {
80776
80905
  await rectifyPmMismatch(ctx);
80777
80906
  endSection(`Application created`);
80778
80907
  };
80779
- var configure9 = async (ctx) => {
80908
+ var configure10 = async (ctx) => {
80780
80909
  startSection("Configuring your application for Cloudflare", "Step 2 of 3");
80781
80910
  await installWrangler();
80782
80911
  await installWorkersTypes(ctx);