create-cloudflare 0.0.0-bd00dc82 → 0.0.0-bd2031bd

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 (60) hide show
  1. package/dist/cli.js +830 -696
  2. package/package.json +4 -4
  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 +28 -2
  11. package/templates/common/js/wrangler.toml +4 -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 +4 -1
  16. package/templates/hello-world/js/package.json +2 -1
  17. package/templates/hello-world/js/test/index.spec.js +17 -17
  18. package/templates/hello-world/js/wrangler.toml +4 -1
  19. package/templates/hello-world/ts/package.json +2 -1
  20. package/templates/hello-world/ts/src/index.ts +3 -17
  21. package/templates/hello-world/ts/test/index.spec.ts +17 -17
  22. package/templates/hello-world/ts/worker-configuration.d.ts +4 -0
  23. package/templates/hello-world/ts/wrangler.toml +4 -1
  24. package/templates/hello-world-durable-object/js/wrangler.toml +4 -1
  25. package/templates/hello-world-durable-object/ts/package.json +2 -1
  26. package/templates/hello-world-durable-object/ts/src/index.ts +3 -20
  27. package/templates/hello-world-durable-object/ts/worker-configuration.d.ts +6 -0
  28. package/templates/hello-world-durable-object/ts/wrangler.toml +4 -2
  29. package/templates/hello-world-python/py/wrangler.toml +97 -0
  30. package/templates/next/README.md +5 -5
  31. package/templates/next/c3.ts +3 -3
  32. package/templates/next/wrangler.toml +26 -1
  33. package/templates/nuxt/c3.ts +4 -4
  34. package/templates/nuxt/templates/worker-configuration.d.ts +1 -1
  35. package/templates/nuxt/templates/wrangler.toml +28 -2
  36. package/templates/openapi/ts/package.json +2 -1
  37. package/templates/openapi/ts/worker-configuration.d.ts +4 -0
  38. package/templates/openapi/ts/wrangler.toml +97 -0
  39. package/templates/pre-existing/js/wrangler.toml +1 -0
  40. package/templates/queues/js/wrangler.toml +4 -1
  41. package/templates/queues/ts/package.json +2 -1
  42. package/templates/queues/ts/src/index.ts +3 -5
  43. package/templates/queues/ts/worker-configuration.d.ts +5 -0
  44. package/templates/queues/ts/wrangler.toml +4 -1
  45. package/templates/qwik/c3.ts +3 -3
  46. package/templates/qwik/templates/worker-configuration.d.ts +1 -1
  47. package/templates/qwik/templates/wrangler.toml +28 -2
  48. package/templates/remix/c3.ts +3 -3
  49. package/templates/remix/templates/worker-configuration.d.ts +1 -1
  50. package/templates/remix/templates/wrangler.toml +28 -2
  51. package/templates/scheduled/js/wrangler.toml +5 -2
  52. package/templates/scheduled/ts/package.json +2 -1
  53. package/templates/scheduled/ts/src/index.ts +3 -20
  54. package/templates/scheduled/ts/worker-configuration.d.ts +4 -0
  55. package/templates/scheduled/ts/wrangler.toml +5 -2
  56. package/templates/solid/c3.ts +5 -3
  57. package/templates/solid/templates/wrangler.toml +77 -0
  58. package/templates/svelte/c3.ts +3 -3
  59. package/templates/svelte/js/wrangler.toml +28 -2
  60. package/templates/svelte/ts/wrangler.toml +28 -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 = "0.0.0-bd00dc82";
3900
+ version = "0.0.0-bd2031bd";
3901
3901
  devDependencies = {
3902
3902
  "@babel/parser": "^7.21.3",
3903
3903
  "@babel/types": "^7.21.4",
@@ -3905,7 +3905,7 @@ var init_package = __esm({
3905
3905
  "@cloudflare/cli": "workspace:*",
3906
3906
  "@cloudflare/eslint-config-worker": "*",
3907
3907
  "@cloudflare/workers-tsconfig": "workspace:*",
3908
- "@cloudflare/workers-types": "^4.20240320.1",
3908
+ "@cloudflare/workers-types": "^4.20240405.0",
3909
3909
  "@iarna/toml": "^3.0.0",
3910
3910
  "@types/command-exists": "^1.2.0",
3911
3911
  "@types/cross-spawn": "^6.0.2",
@@ -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,
@@ -24603,7 +24603,8 @@ var init_package2 = __esm({
24603
24603
  "additionally it also contains a map that maps frameworks to their respective clis"
24604
24604
  ],
24605
24605
  dependencies: {
24606
- "create-astro": "4.7.4",
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",
@@ -24613,11 +24614,12 @@ var init_package2 = __esm({
24613
24614
  "create-remix": "2.8.1",
24614
24615
  "create-solid": "0.5.5",
24615
24616
  "create-svelte": "6.0.10",
24616
- "create-vue": "3.9.2",
24617
+ "create-vue": "3.10.2",
24617
24618
  gatsby: "5.13.3",
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
  }
@@ -24686,7 +24688,12 @@ var init_accounts = __esm({
24686
24688
  s.start(`Selecting Cloudflare account ${dim("retrieving accounts")}`);
24687
24689
  const accounts = await listAccounts();
24688
24690
  let accountId;
24689
- if (Object.keys(accounts).length == 1) {
24691
+ const numAccounts = Object.keys(accounts).length;
24692
+ if (numAccounts === 0) {
24693
+ throw new Error(
24694
+ "Unable to find any accounts to deploy to! Please ensure you're logged in as a user that can deploy Workers."
24695
+ );
24696
+ } else if (numAccounts === 1) {
24690
24697
  const accountName2 = Object.keys(accounts)[0];
24691
24698
  accountId = accounts[accountName2];
24692
24699
  s.stop(`${brandColor("account")} ${dim(accountName2)}`);
@@ -29700,7 +29707,7 @@ var require_index_688c5d50 = __commonJS({
29700
29707
  }
29701
29708
  }
29702
29709
  };
29703
- var types6 = createCommonjsModule(function(module3, exports3) {
29710
+ var types7 = createCommonjsModule(function(module3, exports3) {
29704
29711
  exports3.name = /* @__PURE__ */ new Map([
29705
29712
  ["0", "File"],
29706
29713
  // same as File
@@ -29954,14 +29961,14 @@ var require_index_688c5d50 = __commonJS({
29954
29961
  }
29955
29962
  }
29956
29963
  get type() {
29957
- return types6.name.get(this[TYPE]) || this[TYPE];
29964
+ return types7.name.get(this[TYPE]) || this[TYPE];
29958
29965
  }
29959
29966
  get typeKey() {
29960
29967
  return this[TYPE];
29961
29968
  }
29962
29969
  set type(type) {
29963
- if (types6.code.has(type))
29964
- this[TYPE] = types6.code.get(type);
29970
+ if (types7.code.has(type))
29971
+ this[TYPE] = types7.code.get(type);
29965
29972
  else
29966
29973
  this[TYPE] = type;
29967
29974
  }
@@ -33073,7 +33080,7 @@ var require_index_688c5d50 = __commonJS({
33073
33080
  exports3.WriteEntry = writeEntry;
33074
33081
  exports3.Header = header;
33075
33082
  exports3.Pax = pax;
33076
- exports3.types = types6;
33083
+ exports3.types = types7;
33077
33084
  });
33078
33085
  var colorName = {
33079
33086
  "aliceblue": [240, 248, 255],
@@ -39416,97 +39423,6 @@ var init_validators = __esm({
39416
39423
  }
39417
39424
  });
39418
39425
 
39419
- // templates/angular/c3.ts
39420
- var c3_exports = {};
39421
- __export(c3_exports, {
39422
- default: () => c3_default
39423
- });
39424
- async function installCFWorker() {
39425
- await installPackages(
39426
- ["@cloudflare/workers-types", "@miniflare/tre@next", "wrangler@beta"],
39427
- {
39428
- dev: true,
39429
- startText: "Installing adapter dependencies",
39430
- doneText: `${brandColor("installed")} ${dim(`via \`${npm} install\``)}`
39431
- }
39432
- );
39433
- }
39434
- async function updateAppCode() {
39435
- const s = spinner();
39436
- s.start(`Updating application code`);
39437
- const appConfigPath = "src/app/app.config.ts";
39438
- const appConfig = readFile((0, import_node_path.resolve)(appConfigPath));
39439
- const newAppConfig = "import { provideHttpClient, withFetch } from '@angular/common/http';\n" + appConfig.replace(
39440
- "providers: [",
39441
- "providers: [provideHttpClient(withFetch()), "
39442
- );
39443
- writeFile2((0, import_node_path.resolve)(appConfigPath), newAppConfig);
39444
- s.stop(`${brandColor(`updated`)} ${dim(appConfigPath)}`);
39445
- s.start(`Updating package.json`);
39446
- const packageJsonPath = (0, import_node_path.resolve)("package.json");
39447
- const packageManifest = readJSON(packageJsonPath);
39448
- delete packageManifest["dependencies"]["@angular/ssr"];
39449
- delete packageManifest["dependencies"]["express"];
39450
- writeFile2(packageJsonPath, JSON.stringify(packageManifest, null, 2));
39451
- s.stop(`${brandColor(`updated`)} ${dim(`\`package.json\``)}`);
39452
- }
39453
- function updateAngularJson(ctx) {
39454
- const s = spinner();
39455
- s.start(`Updating angular.json config`);
39456
- const angularJson = readJSON((0, import_node_path.resolve)("angular.json"));
39457
- const architectSection = angularJson.projects[ctx.project.name].architect;
39458
- architectSection.build.options.outputPath = "dist";
39459
- architectSection.build.options.assets.push("src/_routes.json");
39460
- writeFile2((0, import_node_path.resolve)("angular.json"), JSON.stringify(angularJson, null, 2));
39461
- s.stop(`${brandColor(`updated`)} ${dim(`\`angular.json\``)}`);
39462
- }
39463
- var import_node_path, npm, generate, configure, config, c3_default;
39464
- var init_c3 = __esm({
39465
- "templates/angular/c3.ts"() {
39466
- import_node_path = require("node:path");
39467
- init_cli();
39468
- init_colors();
39469
- init_interactive();
39470
- init_frameworks();
39471
- init_compatDate();
39472
- init_files();
39473
- init_packageManagers();
39474
- init_packages();
39475
- ({ npm } = detectPackageManager());
39476
- generate = async (ctx) => {
39477
- await runFrameworkGenerator(ctx, [ctx.project.name, "--ssr"]);
39478
- logRaw("");
39479
- };
39480
- configure = async (ctx) => {
39481
- updateAngularJson(ctx);
39482
- await updateAppCode();
39483
- await installCFWorker();
39484
- };
39485
- config = {
39486
- configVersion: 1,
39487
- id: "angular",
39488
- displayName: "Angular",
39489
- platform: "pages",
39490
- copyFiles: {
39491
- path: "./templates"
39492
- },
39493
- devScript: "start",
39494
- deployScript: "deploy",
39495
- generate,
39496
- configure,
39497
- transformPackageJson: async () => ({
39498
- scripts: {
39499
- start: `${npm} run build && wrangler pages dev dist/cloudflare ${await compatDateFlag()} --experimental-local`,
39500
- build: `ng build && ${npm} run process`,
39501
- process: "node ./tools/copy-files.mjs && node ./tools/alter-polyfills.mjs",
39502
- deploy: `${npm} run build && wrangler pages deploy dist/cloudflare`
39503
- }
39504
- })
39505
- };
39506
- c3_default = config;
39507
- }
39508
- });
39509
-
39510
39426
  // ../../node_modules/.pnpm/tslib@2.5.3/node_modules/tslib/tslib.es6.mjs
39511
39427
  var tslib_es6_exports = {};
39512
39428
  __export(tslib_es6_exports, {
@@ -40097,9 +40013,9 @@ var require_types = __commonJS({
40097
40013
  /** @class */
40098
40014
  function(_super) {
40099
40015
  (0, tslib_1.__extends)(OrType2, _super);
40100
- function OrType2(types6) {
40016
+ function OrType2(types7) {
40101
40017
  var _this = _super.call(this) || this;
40102
- _this.types = types6;
40018
+ _this.types = types7;
40103
40019
  _this.kind = "OrType";
40104
40020
  return _this;
40105
40021
  }
@@ -40244,11 +40160,11 @@ var require_types = __commonJS({
40244
40160
  function typesPlugin(_fork) {
40245
40161
  var Type = {
40246
40162
  or: function() {
40247
- var types6 = [];
40163
+ var types7 = [];
40248
40164
  for (var _i = 0; _i < arguments.length; _i++) {
40249
- types6[_i] = arguments[_i];
40165
+ types7[_i] = arguments[_i];
40250
40166
  }
40251
- return new OrType(types6.map(function(type) {
40167
+ return new OrType(types7.map(function(type) {
40252
40168
  return Type.from(type);
40253
40169
  }));
40254
40170
  },
@@ -40697,9 +40613,9 @@ var require_path = __commonJS({
40697
40613
  var Op = Object.prototype;
40698
40614
  var hasOwn = Op.hasOwnProperty;
40699
40615
  function pathPlugin(fork) {
40700
- var types6 = fork.use(types_1.default);
40701
- var isArray = types6.builtInTypes.array;
40702
- 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;
40703
40619
  var Path = function Path2(value, parentPath, name) {
40704
40620
  if (!(this instanceof Path2)) {
40705
40621
  throw new Error("Path constructor cannot be invoked without 'new'");
@@ -40999,13 +40915,13 @@ var require_scope = __commonJS({
40999
40915
  var types_1 = (0, tslib_1.__importDefault)(require_types());
41000
40916
  var hasOwn = Object.prototype.hasOwnProperty;
41001
40917
  function scopePlugin(fork) {
41002
- var types6 = fork.use(types_1.default);
41003
- var Type = types6.Type;
41004
- var namedTypes = types6.namedTypes;
40918
+ var types7 = fork.use(types_1.default);
40919
+ var Type = types7.Type;
40920
+ var namedTypes = types7.namedTypes;
41005
40921
  var Node = namedTypes.Node;
41006
40922
  var Expression = namedTypes.Expression;
41007
- var isArray = types6.builtInTypes.array;
41008
- var b2 = types6.builders;
40923
+ var isArray = types7.builtInTypes.array;
40924
+ var b2 = types7.builders;
41009
40925
  var Scope = function Scope2(path4, parentScope) {
41010
40926
  if (!(this instanceof Scope2)) {
41011
40927
  throw new Error("Scope constructor cannot be invoked without 'new'");
@@ -41073,7 +40989,7 @@ var require_scope = __commonJS({
41073
40989
  ++index;
41074
40990
  }
41075
40991
  var name = prefix + index;
41076
- return this.bindings[name] = types6.builders.identifier(name);
40992
+ return this.bindings[name] = types7.builders.identifier(name);
41077
40993
  };
41078
40994
  Sp.injectTemporary = function(identifier, init) {
41079
40995
  identifier || (identifier = this.declareTemporary());
@@ -41153,7 +41069,7 @@ var require_scope = __commonJS({
41153
41069
  bindings
41154
41070
  );
41155
41071
  } else if (Node.check(node) && !Expression.check(node)) {
41156
- types6.eachField(node, function(name, child) {
41072
+ types7.eachField(node, function(name, child) {
41157
41073
  var childPath = path4.get(name);
41158
41074
  if (!pathHasValue(childPath, child)) {
41159
41075
  throw new Error("");
@@ -41232,24 +41148,24 @@ var require_scope = __commonJS({
41232
41148
  addPattern(patternPath.get("argument"), bindings);
41233
41149
  }
41234
41150
  }
41235
- function addTypePattern(patternPath, types7) {
41151
+ function addTypePattern(patternPath, types8) {
41236
41152
  var pattern = patternPath.value;
41237
41153
  namedTypes.Pattern.assert(pattern);
41238
41154
  if (namedTypes.Identifier.check(pattern)) {
41239
- if (hasOwn.call(types7, pattern.name)) {
41240
- types7[pattern.name].push(patternPath);
41155
+ if (hasOwn.call(types8, pattern.name)) {
41156
+ types8[pattern.name].push(patternPath);
41241
41157
  } else {
41242
- types7[pattern.name] = [patternPath];
41158
+ types8[pattern.name] = [patternPath];
41243
41159
  }
41244
41160
  }
41245
41161
  }
41246
- function addTypeParameter(parameterPath, types7) {
41162
+ function addTypeParameter(parameterPath, types8) {
41247
41163
  var parameter = parameterPath.value;
41248
41164
  FlowOrTSTypeParameterType.assert(parameter);
41249
- if (hasOwn.call(types7, parameter.name)) {
41250
- types7[parameter.name].push(parameterPath);
41165
+ if (hasOwn.call(types8, parameter.name)) {
41166
+ types8[parameter.name].push(parameterPath);
41251
41167
  } else {
41252
- types7[parameter.name] = [parameterPath];
41168
+ types8[parameter.name] = [parameterPath];
41253
41169
  }
41254
41170
  }
41255
41171
  Sp.lookup = function(name) {
@@ -41287,11 +41203,11 @@ var require_node_path = __commonJS({
41287
41203
  var path_1 = (0, tslib_1.__importDefault)(require_path());
41288
41204
  var scope_1 = (0, tslib_1.__importDefault)(require_scope());
41289
41205
  function nodePathPlugin(fork) {
41290
- var types6 = fork.use(types_1.default);
41291
- var n2 = types6.namedTypes;
41292
- var b2 = types6.builders;
41293
- var isNumber = types6.builtInTypes.number;
41294
- 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;
41295
41211
  var Path = fork.use(path_1.default);
41296
41212
  var Scope = fork.use(scope_1.default);
41297
41213
  var NodePath = function NodePath2(value, parentPath, name) {
@@ -41382,7 +41298,7 @@ var require_node_path = __commonJS({
41382
41298
  return scope || null;
41383
41299
  };
41384
41300
  NPp.getValueProperty = function(name) {
41385
- return types6.getFieldValue(this.value, name);
41301
+ return types7.getFieldValue(this.value, name);
41386
41302
  };
41387
41303
  NPp.needsParens = function(assumeExpressionContext) {
41388
41304
  var pp = this.parentPath;
@@ -41524,7 +41440,7 @@ var require_node_path = __commonJS({
41524
41440
  return node.some(containsCallExpression);
41525
41441
  }
41526
41442
  if (n2.Node.check(node)) {
41527
- return types6.someField(node, function(_name, child) {
41443
+ return types7.someField(node, function(_name, child) {
41528
41444
  return containsCallExpression(child);
41529
41445
  });
41530
41446
  }
@@ -41642,11 +41558,11 @@ var require_path_visitor = __commonJS({
41642
41558
  var node_path_1 = (0, tslib_1.__importDefault)(require_node_path());
41643
41559
  var hasOwn = Object.prototype.hasOwnProperty;
41644
41560
  function pathVisitorPlugin(fork) {
41645
- var types6 = fork.use(types_1.default);
41561
+ var types7 = fork.use(types_1.default);
41646
41562
  var NodePath = fork.use(node_path_1.default);
41647
- var isArray = types6.builtInTypes.array;
41648
- var isObject2 = types6.builtInTypes.object;
41649
- var isFunction2 = types6.builtInTypes.function;
41563
+ var isArray = types7.builtInTypes.array;
41564
+ var isObject2 = types7.builtInTypes.object;
41565
+ var isFunction2 = types7.builtInTypes.function;
41650
41566
  var undefined2;
41651
41567
  var PathVisitor = function PathVisitor2() {
41652
41568
  if (!(this instanceof PathVisitor2)) {
@@ -41666,7 +41582,7 @@ var require_path_visitor = __commonJS({
41666
41582
  typeNames[methodName.slice("visit".length)] = true;
41667
41583
  }
41668
41584
  }
41669
- var supertypeTable = types6.computeSupertypeLookupTable(typeNames);
41585
+ var supertypeTable = types7.computeSupertypeLookupTable(typeNames);
41670
41586
  var methodNameTable = /* @__PURE__ */ Object.create(null);
41671
41587
  var typeNameKeys = Object.keys(supertypeTable);
41672
41588
  var typeNameCount = typeNameKeys.length;
@@ -41785,7 +41701,7 @@ var require_path_visitor = __commonJS({
41785
41701
  path4.each(visitor.visitWithoutReset, visitor);
41786
41702
  } else if (!isObject2.check(value)) {
41787
41703
  } else {
41788
- var childNames = types6.getFieldNames(value);
41704
+ var childNames = types7.getFieldNames(value);
41789
41705
  if (visitor._shouldVisitComments && value.comments && childNames.indexOf("comments") < 0) {
41790
41706
  childNames.push("comments");
41791
41707
  }
@@ -41794,7 +41710,7 @@ var require_path_visitor = __commonJS({
41794
41710
  for (var i = 0; i < childCount; ++i) {
41795
41711
  var childName = childNames[i];
41796
41712
  if (!hasOwn.call(value, childName)) {
41797
- value[childName] = types6.getFieldValue(value, childName);
41713
+ value[childName] = types7.getFieldValue(value, childName);
41798
41714
  }
41799
41715
  childPaths.push(path4.get(childName));
41800
41716
  }
@@ -41934,13 +41850,13 @@ var require_equiv = __commonJS({
41934
41850
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
41935
41851
  var types_1 = (0, tslib_1.__importDefault)(require_types());
41936
41852
  function default_1(fork) {
41937
- var types6 = fork.use(types_1.default);
41938
- var getFieldNames = types6.getFieldNames;
41939
- var getFieldValue = types6.getFieldValue;
41940
- var isArray = types6.builtInTypes.array;
41941
- var isObject2 = types6.builtInTypes.object;
41942
- var isDate = types6.builtInTypes.Date;
41943
- 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;
41944
41860
  var hasOwn = Object.prototype.hasOwnProperty;
41945
41861
  function astNodesAreEquivalent(a, b2, problemPath) {
41946
41862
  if (isArray.check(problemPath)) {
@@ -42090,24 +42006,24 @@ var require_fork = __commonJS({
42090
42006
  var node_path_1 = (0, tslib_1.__importDefault)(require_node_path());
42091
42007
  function default_1(plugins) {
42092
42008
  var fork = createFork();
42093
- var types6 = fork.use(types_1.default);
42009
+ var types7 = fork.use(types_1.default);
42094
42010
  plugins.forEach(fork.use);
42095
- types6.finalize();
42011
+ types7.finalize();
42096
42012
  var PathVisitor = fork.use(path_visitor_1.default);
42097
42013
  return {
42098
- Type: types6.Type,
42099
- builtInTypes: types6.builtInTypes,
42100
- namedTypes: types6.namedTypes,
42101
- builders: types6.builders,
42102
- defineMethod: types6.defineMethod,
42103
- getFieldNames: types6.getFieldNames,
42104
- getFieldValue: types6.getFieldValue,
42105
- eachField: types6.eachField,
42106
- someField: types6.someField,
42107
- getSupertypeNames: types6.getSupertypeNames,
42108
- 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,
42109
42025
  astNodesAreEquivalent: fork.use(equiv_1.default),
42110
- finalize: types6.finalize,
42026
+ finalize: types7.finalize,
42111
42027
  Path: fork.use(path_1.default),
42112
42028
  NodePath: fork.use(node_path_1.default),
42113
42029
  PathVisitor,
@@ -42143,9 +42059,9 @@ var require_shared = __commonJS({
42143
42059
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
42144
42060
  var types_1 = (0, tslib_1.__importDefault)(require_types());
42145
42061
  function default_1(fork) {
42146
- var types6 = fork.use(types_1.default);
42147
- var Type = types6.Type;
42148
- var builtin = types6.builtInTypes;
42062
+ var types7 = fork.use(types_1.default);
42063
+ var Type = types7.Type;
42064
+ var builtin = types7.builtInTypes;
42149
42065
  var isNumber = builtin.number;
42150
42066
  function geq(than) {
42151
42067
  return Type.from(function(value) {
@@ -42324,8 +42240,8 @@ var require_core2 = __commonJS({
42324
42240
  var types_1 = (0, tslib_1.__importDefault)(require_types());
42325
42241
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
42326
42242
  function default_1(fork) {
42327
- var types6 = fork.use(types_1.default);
42328
- var Type = types6.Type;
42243
+ var types7 = fork.use(types_1.default);
42244
+ var Type = types7.Type;
42329
42245
  var def = Type.def;
42330
42246
  var or = Type.or;
42331
42247
  var shared = fork.use(shared_1.default);
@@ -42415,9 +42331,9 @@ var require_es6 = __commonJS({
42415
42331
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
42416
42332
  function default_1(fork) {
42417
42333
  fork.use(core_1.default);
42418
- var types6 = fork.use(types_1.default);
42419
- var def = types6.Type.def;
42420
- 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;
42421
42337
  var defaults = fork.use(shared_1.default).defaults;
42422
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"]);
42423
42339
  def("RestElement").bases("Pattern").build("argument").field("argument", def("Pattern")).field(
@@ -42503,8 +42419,8 @@ var require_es2017 = __commonJS({
42503
42419
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
42504
42420
  function default_1(fork) {
42505
42421
  fork.use(es2016_1.default);
42506
- var types6 = fork.use(types_1.default);
42507
- var def = types6.Type.def;
42422
+ var types7 = fork.use(types_1.default);
42423
+ var def = types7.Type.def;
42508
42424
  var defaults = fork.use(shared_1.default).defaults;
42509
42425
  def("Function").field("async", Boolean, defaults["false"]);
42510
42426
  def("AwaitExpression").bases("Expression").build("argument").field("argument", def("Expression"));
@@ -42525,9 +42441,9 @@ var require_es2018 = __commonJS({
42525
42441
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
42526
42442
  function default_1(fork) {
42527
42443
  fork.use(es2017_1.default);
42528
- var types6 = fork.use(types_1.default);
42529
- var def = types6.Type.def;
42530
- 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;
42531
42447
  var defaults = fork.use(shared_1.default).defaults;
42532
42448
  def("ForOfStatement").field("await", Boolean, defaults["false"]);
42533
42449
  def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
@@ -42557,9 +42473,9 @@ var require_es2019 = __commonJS({
42557
42473
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
42558
42474
  function default_1(fork) {
42559
42475
  fork.use(es2018_1.default);
42560
- var types6 = fork.use(types_1.default);
42561
- var def = types6.Type.def;
42562
- 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;
42563
42479
  var defaults = fork.use(shared_1.default).defaults;
42564
42480
  def("CatchClause").field("param", or(def("Pattern"), null), defaults["null"]);
42565
42481
  }
@@ -42581,9 +42497,9 @@ var require_es20202 = __commonJS({
42581
42497
  function default_1(fork) {
42582
42498
  fork.use(es2020_1.default);
42583
42499
  fork.use(es2019_1.default);
42584
- var types6 = fork.use(types_1.default);
42585
- var def = types6.Type.def;
42586
- 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;
42587
42503
  var shared = fork.use(shared_1.default);
42588
42504
  var defaults = shared.defaults;
42589
42505
  def("ImportExpression").bases("Expression").build("source").field("source", def("Expression"));
@@ -42627,8 +42543,8 @@ var require_es2022 = __commonJS({
42627
42543
  var types_1 = (0, tslib_1.__importDefault)(require_types());
42628
42544
  function default_1(fork) {
42629
42545
  fork.use(es2021_1.default);
42630
- var types6 = fork.use(types_1.default);
42631
- var def = types6.Type.def;
42546
+ var types7 = fork.use(types_1.default);
42547
+ var def = types7.Type.def;
42632
42548
  def("StaticBlock").bases("Declaration").build("body").field("body", [def("Statement")]);
42633
42549
  }
42634
42550
  exports2.default = default_1;
@@ -42647,9 +42563,9 @@ var require_es_proposals = __commonJS({
42647
42563
  var es2022_1 = (0, tslib_1.__importDefault)(require_es2022());
42648
42564
  function default_1(fork) {
42649
42565
  fork.use(es2022_1.default);
42650
- var types6 = fork.use(types_1.default);
42651
- var Type = types6.Type;
42652
- var def = types6.Type.def;
42566
+ var types7 = fork.use(types_1.default);
42567
+ var Type = types7.Type;
42568
+ var def = types7.Type.def;
42653
42569
  var or = Type.or;
42654
42570
  var shared = fork.use(shared_1.default);
42655
42571
  var defaults = shared.defaults;
@@ -42687,9 +42603,9 @@ var require_jsx = __commonJS({
42687
42603
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
42688
42604
  function default_1(fork) {
42689
42605
  fork.use(es_proposals_1.default);
42690
- var types6 = fork.use(types_1.default);
42691
- var def = types6.Type.def;
42692
- 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;
42693
42609
  var defaults = fork.use(shared_1.default).defaults;
42694
42610
  def("JSXAttribute").bases("Node").build("name", "value").field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))).field("value", or(
42695
42611
  def("Literal"),
@@ -42751,9 +42667,9 @@ var require_type_annotations = __commonJS({
42751
42667
  var types_1 = (0, tslib_1.__importDefault)(require_types());
42752
42668
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
42753
42669
  function default_1(fork) {
42754
- var types6 = fork.use(types_1.default);
42755
- var def = types6.Type.def;
42756
- 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;
42757
42673
  var defaults = fork.use(shared_1.default).defaults;
42758
42674
  var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null);
42759
42675
  var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null);
@@ -42786,9 +42702,9 @@ var require_flow = __commonJS({
42786
42702
  function default_1(fork) {
42787
42703
  fork.use(es_proposals_1.default);
42788
42704
  fork.use(type_annotations_1.default);
42789
- var types6 = fork.use(types_1.default);
42790
- var def = types6.Type.def;
42791
- 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;
42792
42708
  var defaults = fork.use(shared_1.default).defaults;
42793
42709
  def("Flow").bases("Node");
42794
42710
  def("FlowType").bases("Flow");
@@ -42903,10 +42819,10 @@ var require_esprima = __commonJS({
42903
42819
  var shared_1 = (0, tslib_1.__importDefault)(require_shared());
42904
42820
  function default_1(fork) {
42905
42821
  fork.use(es_proposals_1.default);
42906
- var types6 = fork.use(types_1.default);
42822
+ var types7 = fork.use(types_1.default);
42907
42823
  var defaults = fork.use(shared_1.default).defaults;
42908
- var def = types6.Type.def;
42909
- var or = types6.Type.or;
42824
+ var def = types7.Type.def;
42825
+ var or = types7.Type.or;
42910
42826
  def("VariableDeclaration").field("declarations", [or(
42911
42827
  def("VariableDeclarator"),
42912
42828
  def("Identifier")
@@ -42963,11 +42879,11 @@ var require_babel_core = __commonJS({
42963
42879
  function default_1(fork) {
42964
42880
  var _a2, _b2, _c2, _d, _e;
42965
42881
  fork.use(es_proposals_1.default);
42966
- var types6 = fork.use(types_1.default);
42882
+ var types7 = fork.use(types_1.default);
42967
42883
  var defaults = fork.use(shared_1.default).defaults;
42968
- var def = types6.Type.def;
42969
- var or = types6.Type.or;
42970
- var isUndefined = types6.builtInTypes.undefined;
42884
+ var def = types7.Type.def;
42885
+ var or = types7.Type.or;
42886
+ var isUndefined = types7.builtInTypes.undefined;
42971
42887
  def("Noop").bases("Statement").build();
42972
42888
  def("DoExpression").bases("Expression").build("body").field("body", [def("Statement")]);
42973
42889
  def("BindExpression").bases("Expression").build("object", "callee").field("object", or(def("Expression"), null)).field("callee", def("Expression"));
@@ -43002,7 +42918,7 @@ var require_babel_core = __commonJS({
43002
42918
  raw: String
43003
42919
  },
43004
42920
  function getDefault() {
43005
- var value = types6.getFieldValue(this, "value");
42921
+ var value = types7.getFieldValue(this, "value");
43006
42922
  return {
43007
42923
  rawValue: value,
43008
42924
  raw: toRaw ? toRaw(value) : String(value)
@@ -43093,8 +43009,8 @@ var require_babel = __commonJS({
43093
43009
  var babel_core_1 = (0, tslib_1.__importDefault)(require_babel_core());
43094
43010
  var flow_1 = (0, tslib_1.__importDefault)(require_flow());
43095
43011
  function default_1(fork) {
43096
- var types6 = fork.use(types_1.default);
43097
- var def = types6.Type.def;
43012
+ var types7 = fork.use(types_1.default);
43013
+ var def = types7.Type.def;
43098
43014
  fork.use(babel_core_1.default);
43099
43015
  fork.use(flow_1.default);
43100
43016
  def("V8IntrinsicIdentifier").bases("Expression").build("name").field("name", String);
@@ -43118,12 +43034,12 @@ var require_typescript = __commonJS({
43118
43034
  function default_1(fork) {
43119
43035
  fork.use(babel_core_1.default);
43120
43036
  fork.use(type_annotations_1.default);
43121
- var types6 = fork.use(types_1.default);
43122
- var n2 = types6.namedTypes;
43123
- var def = types6.Type.def;
43124
- 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;
43125
43041
  var defaults = fork.use(shared_1.default).defaults;
43126
- var StringLiteral = types6.Type.from(function(value, deep) {
43042
+ var StringLiteral = types7.Type.from(function(value, deep) {
43127
43043
  if (n2.StringLiteral && n2.StringLiteral.check(value, deep)) {
43128
43044
  return true;
43129
43045
  }
@@ -45101,8 +45017,8 @@ var require_util9 = __commonJS({
45101
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;
45102
45018
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
45103
45019
  var assert_1 = tslib_1.__importDefault(require("assert"));
45104
- var types6 = tslib_1.__importStar(require_main2());
45105
- var n2 = types6.namedTypes;
45020
+ var types7 = tslib_1.__importStar(require_main2());
45021
+ var n2 = types7.namedTypes;
45106
45022
  var source_map_1 = tslib_1.__importDefault(require_source_map());
45107
45023
  var SourceMapConsumer = source_map_1.default.SourceMapConsumer;
45108
45024
  var SourceMapGenerator = source_map_1.default.SourceMapGenerator;
@@ -51527,13 +51443,13 @@ var require_esprima2 = __commonJS({
51527
51443
  return Reader2;
51528
51444
  }();
51529
51445
  var Tokenizer = function() {
51530
- function Tokenizer2(code, config13) {
51446
+ function Tokenizer2(code, config14) {
51531
51447
  this.errorHandler = new error_handler_1.ErrorHandler();
51532
- this.errorHandler.tolerant = config13 ? typeof config13.tolerant === "boolean" && config13.tolerant : false;
51448
+ this.errorHandler.tolerant = config14 ? typeof config14.tolerant === "boolean" && config14.tolerant : false;
51533
51449
  this.scanner = new scanner_1.Scanner(code, this.errorHandler);
51534
- this.scanner.trackComment = config13 ? typeof config13.comment === "boolean" && config13.comment : false;
51535
- this.trackRange = config13 ? typeof config13.range === "boolean" && config13.range : false;
51536
- 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;
51537
51453
  this.buffer = [];
51538
51454
  this.reader = new Reader();
51539
51455
  }
@@ -52515,10 +52431,10 @@ var require_comments = __commonJS({
52515
52431
  exports2.printComments = exports2.attach = void 0;
52516
52432
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
52517
52433
  var assert_1 = tslib_1.__importDefault(require("assert"));
52518
- var types6 = tslib_1.__importStar(require_main2());
52519
- var n2 = types6.namedTypes;
52520
- var isArray = types6.builtInTypes.array;
52521
- 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;
52522
52438
  var lines_1 = require_lines();
52523
52439
  var util_1 = require_util9();
52524
52440
  var childNodesCache = /* @__PURE__ */ new WeakMap();
@@ -52549,7 +52465,7 @@ var require_comments = __commonJS({
52549
52465
  if (isArray.check(node)) {
52550
52466
  names = Object.keys(node);
52551
52467
  } else if (isObject2.check(node)) {
52552
- names = types6.getFieldNames(node);
52468
+ names = types7.getFieldNames(node);
52553
52469
  } else {
52554
52470
  return resultArray;
52555
52471
  }
@@ -52729,7 +52645,7 @@ var require_comments = __commonJS({
52729
52645
  function printComments(path4, print2) {
52730
52646
  var value = path4.getValue();
52731
52647
  var innerLines = print2(path4);
52732
- var comments = n2.Node.check(value) && types6.getFieldValue(value, "comments");
52648
+ var comments = n2.Node.check(value) && types7.getFieldValue(value, "comments");
52733
52649
  if (!comments || comments.length === 0) {
52734
52650
  return innerLines;
52735
52651
  }
@@ -52737,8 +52653,8 @@ var require_comments = __commonJS({
52737
52653
  var trailingParts = [innerLines];
52738
52654
  path4.each(function(commentPath) {
52739
52655
  var comment = commentPath.getValue();
52740
- var leading = types6.getFieldValue(comment, "leading");
52741
- var trailing = types6.getFieldValue(comment, "trailing");
52656
+ var leading = types7.getFieldValue(comment, "leading");
52657
+ var trailing = types7.getFieldValue(comment, "trailing");
52742
52658
  if (leading || trailing && !(n2.Statement.check(value) || comment.type === "Block" || comment.type === "CommentBlock")) {
52743
52659
  leadingParts.push(printLeadingComment(commentPath, print2));
52744
52660
  } else if (trailing) {
@@ -52760,10 +52676,10 @@ var require_parser2 = __commonJS({
52760
52676
  exports2.parse = void 0;
52761
52677
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
52762
52678
  var assert_1 = tslib_1.__importDefault(require("assert"));
52763
- var types6 = tslib_1.__importStar(require_main2());
52764
- var b2 = types6.builders;
52765
- var isObject2 = types6.builtInTypes.object;
52766
- 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;
52767
52683
  var options_1 = require_options();
52768
52684
  var lines_1 = require_lines();
52769
52685
  var comments_1 = require_comments();
@@ -52950,11 +52866,11 @@ var require_fast_path = __commonJS({
52950
52866
  Object.defineProperty(exports2, "__esModule", { value: true });
52951
52867
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
52952
52868
  var assert_1 = tslib_1.__importDefault(require("assert"));
52953
- var types6 = tslib_1.__importStar(require_main2());
52869
+ var types7 = tslib_1.__importStar(require_main2());
52954
52870
  var util = tslib_1.__importStar(require_util9());
52955
- var n2 = types6.namedTypes;
52956
- var isArray = types6.builtInTypes.array;
52957
- var isNumber = types6.builtInTypes.number;
52871
+ var n2 = types7.namedTypes;
52872
+ var isArray = types7.builtInTypes.array;
52873
+ var isNumber = types7.builtInTypes.number;
52958
52874
  var PRECEDENCE = {};
52959
52875
  [
52960
52876
  ["??"],
@@ -52983,7 +52899,7 @@ var require_fast_path = __commonJS({
52983
52899
  if (obj instanceof FastPath) {
52984
52900
  return obj.copy();
52985
52901
  }
52986
- if (obj instanceof types6.NodePath) {
52902
+ if (obj instanceof types7.NodePath) {
52987
52903
  var copy = Object.create(FastPath.prototype);
52988
52904
  var stack = [obj.value];
52989
52905
  for (var pp = void 0; pp = obj.parentPath; obj = pp)
@@ -53294,7 +53210,7 @@ var require_fast_path = __commonJS({
53294
53210
  return node.some(containsCallExpression);
53295
53211
  }
53296
53212
  if (n2.Node.check(node)) {
53297
- return types6.someField(node, function(_name, child) {
53213
+ return types7.someField(node, function(_name, child) {
53298
53214
  return containsCallExpression(child);
53299
53215
  });
53300
53216
  }
@@ -53384,16 +53300,16 @@ var require_patcher = __commonJS({
53384
53300
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
53385
53301
  var assert_1 = tslib_1.__importDefault(require("assert"));
53386
53302
  var linesModule = tslib_1.__importStar(require_lines());
53387
- var types6 = tslib_1.__importStar(require_main2());
53388
- var Printable = types6.namedTypes.Printable;
53389
- var Expression = types6.namedTypes.Expression;
53390
- var ReturnStatement = types6.namedTypes.ReturnStatement;
53391
- 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;
53392
53308
  var util_1 = require_util9();
53393
53309
  var fast_path_1 = tslib_1.__importDefault(require_fast_path());
53394
- var isObject2 = types6.builtInTypes.object;
53395
- var isArray = types6.builtInTypes.array;
53396
- var isString = types6.builtInTypes.string;
53310
+ var isObject2 = types7.builtInTypes.object;
53311
+ var isArray = types7.builtInTypes.array;
53312
+ var isString = types7.builtInTypes.string;
53397
53313
  var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
53398
53314
  var Patcher = function Patcher2(lines) {
53399
53315
  assert_1.default.ok(this instanceof Patcher2);
@@ -53672,8 +53588,8 @@ var require_patcher = __commonJS({
53672
53588
  if (k2.charAt(0) === "_") {
53673
53589
  continue;
53674
53590
  }
53675
- newPath.stack.push(k2, types6.getFieldValue(newNode, k2));
53676
- 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));
53677
53593
  var canReprint = findAnyReprints(newPath, oldPath, reprints);
53678
53594
  newPath.stack.length -= 2;
53679
53595
  oldPath.stack.length -= 2;
@@ -53701,10 +53617,10 @@ var require_printer = __commonJS({
53701
53617
  var lines_1 = require_lines();
53702
53618
  var options_1 = require_options();
53703
53619
  var patcher_1 = require_patcher();
53704
- var types6 = tslib_1.__importStar(require_main2());
53705
- var namedTypes = types6.namedTypes;
53706
- var isString = types6.builtInTypes.string;
53707
- 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;
53708
53624
  var fast_path_1 = tslib_1.__importDefault(require_fast_path());
53709
53625
  var util = tslib_1.__importStar(require_util9());
53710
53626
  var PrintResult = function PrintResult2(code, sourceMap) {
@@ -53726,11 +53642,11 @@ var require_printer = __commonJS({
53726
53642
  return this.code;
53727
53643
  };
53728
53644
  var emptyPrintResult = new PrintResult("");
53729
- var Printer = function Printer2(config13) {
53645
+ var Printer = function Printer2(config14) {
53730
53646
  assert_1.default.ok(this instanceof Printer2);
53731
- var explicitTabWidth = config13 && config13.tabWidth;
53732
- config13 = options_1.normalize(config13);
53733
- config13.sourceFileName = null;
53647
+ var explicitTabWidth = config14 && config14.tabWidth;
53648
+ config14 = options_1.normalize(config14);
53649
+ config14.sourceFileName = null;
53734
53650
  function makePrintFunctionWith(options, overrides) {
53735
53651
  options = Object.assign({}, options, overrides);
53736
53652
  return function(path4) {
@@ -53745,11 +53661,11 @@ var require_printer = __commonJS({
53745
53661
  includeComments: false
53746
53662
  }));
53747
53663
  }
53748
- var oldTabWidth = config13.tabWidth;
53664
+ var oldTabWidth = config14.tabWidth;
53749
53665
  if (!explicitTabWidth) {
53750
53666
  var loc = path4.getNode().loc;
53751
53667
  if (loc && loc.lines && loc.lines.guessTabWidth) {
53752
- config13.tabWidth = loc.lines.guessTabWidth();
53668
+ config14.tabWidth = loc.lines.guessTabWidth();
53753
53669
  }
53754
53670
  }
53755
53671
  var reprinter = patcher_1.getReprinter(path4);
@@ -53763,11 +53679,11 @@ var require_printer = __commonJS({
53763
53679
  // right choice because it gives us the opportunity to reprint
53764
53680
  // such nodes using their original source.
53765
53681
  reprinter(print2)
53766
- ) : genericPrint(path4, config13, options, makePrintFunctionWith(options, {
53682
+ ) : genericPrint(path4, config14, options, makePrintFunctionWith(options, {
53767
53683
  includeComments: true,
53768
53684
  avoidRootParens: false
53769
53685
  }));
53770
- config13.tabWidth = oldTabWidth;
53686
+ config14.tabWidth = oldTabWidth;
53771
53687
  return lines;
53772
53688
  }
53773
53689
  this.print = function(ast) {
@@ -53778,7 +53694,7 @@ var require_printer = __commonJS({
53778
53694
  includeComments: true,
53779
53695
  avoidRootParens: false
53780
53696
  });
53781
- 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)));
53782
53698
  };
53783
53699
  this.printGenerically = function(ast) {
53784
53700
  if (!ast) {
@@ -53786,26 +53702,26 @@ var require_printer = __commonJS({
53786
53702
  }
53787
53703
  function printGenerically(path5) {
53788
53704
  return comments_1.printComments(path5, function(path6) {
53789
- return genericPrint(path6, config13, {
53705
+ return genericPrint(path6, config14, {
53790
53706
  includeComments: true,
53791
53707
  avoidRootParens: false
53792
53708
  }, printGenerically);
53793
53709
  });
53794
53710
  }
53795
53711
  var path4 = fast_path_1.default.from(ast);
53796
- var oldReuseWhitespace = config13.reuseWhitespace;
53797
- config13.reuseWhitespace = false;
53798
- var pr = new PrintResult(printGenerically(path4).toString(config13));
53799
- 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;
53800
53716
  return pr;
53801
53717
  };
53802
53718
  };
53803
53719
  exports2.Printer = Printer;
53804
- function genericPrint(path4, config13, options, printPath) {
53720
+ function genericPrint(path4, config14, options, printPath) {
53805
53721
  assert_1.default.ok(path4 instanceof fast_path_1.default);
53806
53722
  var node = path4.getValue();
53807
53723
  var parts = [];
53808
- var linesWithoutParens = genericPrintNoParens(path4, config13, printPath);
53724
+ var linesWithoutParens = genericPrintNoParens(path4, config14, printPath);
53809
53725
  if (!node || linesWithoutParens.isEmpty()) {
53810
53726
  return linesWithoutParens;
53811
53727
  }
@@ -53878,7 +53794,7 @@ var require_printer = __commonJS({
53878
53794
  case "OptionalMemberExpression": {
53879
53795
  parts.push(path4.call(print2, "object"));
53880
53796
  var property = path4.call(print2, "property");
53881
- var optional = types6.getFieldValue(n2, "optional");
53797
+ var optional = types7.getFieldValue(n2, "optional");
53882
53798
  if (n2.computed) {
53883
53799
  parts.push(optional ? "?.[" : "[", property, "]");
53884
53800
  } else {
@@ -54149,7 +54065,7 @@ var require_printer = __commonJS({
54149
54065
  if (n2.typeArguments) {
54150
54066
  parts.push(path4.call(print2, "typeArguments"));
54151
54067
  }
54152
- if (types6.getFieldValue(n2, "optional")) {
54068
+ if (types7.getFieldValue(n2, "optional")) {
54153
54069
  parts.push("?.");
54154
54070
  }
54155
54071
  parts.push(printArgumentsList(path4, options, print2));
@@ -55781,8 +55697,8 @@ var require_printer = __commonJS({
55781
55697
  });
55782
55698
  }
55783
55699
  function getPossibleRaw(node) {
55784
- var value = types6.getFieldValue(node, "value");
55785
- var extra = types6.getFieldValue(node, "extra");
55700
+ var value = types7.getFieldValue(node, "value");
55701
+ var extra = types7.getFieldValue(node, "extra");
55786
55702
  if (extra && typeof extra.raw === "string" && value == extra.rawValue) {
55787
55703
  return extra.raw;
55788
55704
  }
@@ -55830,8 +55746,8 @@ var require_main3 = __commonJS({
55830
55746
  exports2.run = exports2.prettyPrint = exports2.print = exports2.visit = exports2.types = exports2.parse = void 0;
55831
55747
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
55832
55748
  var fs_1 = tslib_1.__importDefault(require("fs"));
55833
- var types6 = tslib_1.__importStar(require_main2());
55834
- exports2.types = types6;
55749
+ var types7 = tslib_1.__importStar(require_main2());
55750
+ exports2.types = types7;
55835
55751
  var parser_1 = require_parser2();
55836
55752
  Object.defineProperty(exports2, "parse", { enumerable: true, get: function() {
55837
55753
  return parser_1.parse;
@@ -56695,14 +56611,14 @@ var require_lib = __commonJS({
56695
56611
  this.preserveSpace = !!preserveSpace;
56696
56612
  }
56697
56613
  };
56698
- var types6 = {
56614
+ var types7 = {
56699
56615
  brace: new TokContext("{"),
56700
56616
  j_oTag: new TokContext("<tag"),
56701
56617
  j_cTag: new TokContext("</tag"),
56702
56618
  j_expr: new TokContext("<tag>...</tag>", true)
56703
56619
  };
56704
56620
  {
56705
- types6.template = new TokContext("`", true);
56621
+ types7.template = new TokContext("`", true);
56706
56622
  }
56707
56623
  var beforeExpr = true;
56708
56624
  var startsExpr = true;
@@ -57234,17 +57150,17 @@ var require_lib = __commonJS({
57234
57150
  context.pop();
57235
57151
  };
57236
57152
  tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
57237
- context.push(types6.brace);
57153
+ context.push(types7.brace);
57238
57154
  };
57239
57155
  tokenTypes[22].updateContext = (context) => {
57240
- if (context[context.length - 1] === types6.template) {
57156
+ if (context[context.length - 1] === types7.template) {
57241
57157
  context.pop();
57242
57158
  } else {
57243
- context.push(types6.template);
57159
+ context.push(types7.template);
57244
57160
  }
57245
57161
  };
57246
57162
  tokenTypes[140].updateContext = (context) => {
57247
- context.push(types6.j_expr, types6.j_oTag);
57163
+ context.push(types7.j_expr, types7.j_oTag);
57248
57164
  };
57249
57165
  }
57250
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";
@@ -57850,7 +57766,7 @@ var require_lib = __commonJS({
57850
57766
  this.lastTokEndLoc = null;
57851
57767
  this.lastTokStartLoc = null;
57852
57768
  this.lastTokStart = 0;
57853
- this.context = [types6.brace];
57769
+ this.context = [types7.brace];
57854
57770
  this.canStartJSXElement = true;
57855
57771
  this.containsEsc = false;
57856
57772
  this.firstInvalidTemplateEscapePos = null;
@@ -61741,7 +61657,7 @@ var require_lib = __commonJS({
61741
61657
  context
61742
61658
  } = this.state;
61743
61659
  const currentContext = context[context.length - 1];
61744
- if (currentContext === types6.j_oTag || currentContext === types6.j_expr) {
61660
+ if (currentContext === types7.j_oTag || currentContext === types7.j_expr) {
61745
61661
  context.pop();
61746
61662
  }
61747
61663
  }
@@ -62799,9 +62715,9 @@ var require_lib = __commonJS({
62799
62715
  switch (this.state.type) {
62800
62716
  case 5:
62801
62717
  node = this.startNode();
62802
- this.setContext(types6.brace);
62718
+ this.setContext(types7.brace);
62803
62719
  this.next();
62804
- node = this.jsxParseExpressionContainer(node, types6.j_oTag);
62720
+ node = this.jsxParseExpressionContainer(node, types7.j_oTag);
62805
62721
  if (node.expression.type === "JSXEmptyExpression") {
62806
62722
  this.raise(JsxErrors.AttributeIsEmpty, {
62807
62723
  at: node
@@ -62824,7 +62740,7 @@ var require_lib = __commonJS({
62824
62740
  jsxParseSpreadChild(node) {
62825
62741
  this.next();
62826
62742
  node.expression = this.parseExpression();
62827
- this.setContext(types6.j_expr);
62743
+ this.setContext(types7.j_expr);
62828
62744
  this.state.canStartJSXElement = true;
62829
62745
  this.expect(8);
62830
62746
  return this.finishNode(node, "JSXSpreadChild");
@@ -62844,11 +62760,11 @@ var require_lib = __commonJS({
62844
62760
  jsxParseAttribute() {
62845
62761
  const node = this.startNode();
62846
62762
  if (this.match(5)) {
62847
- this.setContext(types6.brace);
62763
+ this.setContext(types7.brace);
62848
62764
  this.next();
62849
62765
  this.expect(21);
62850
62766
  node.argument = this.parseMaybeAssignAllowIn();
62851
- this.setContext(types6.j_oTag);
62767
+ this.setContext(types7.j_oTag);
62852
62768
  this.state.canStartJSXElement = true;
62853
62769
  this.expect(8);
62854
62770
  return this.finishNode(node, "JSXSpreadAttribute");
@@ -62907,12 +62823,12 @@ var require_lib = __commonJS({
62907
62823
  break;
62908
62824
  case 5: {
62909
62825
  const node2 = this.startNode();
62910
- this.setContext(types6.brace);
62826
+ this.setContext(types7.brace);
62911
62827
  this.next();
62912
62828
  if (this.match(21)) {
62913
62829
  children.push(this.jsxParseSpreadChild(node2));
62914
62830
  } else {
62915
- children.push(this.jsxParseExpressionContainer(node2, types6.j_expr));
62831
+ children.push(this.jsxParseExpressionContainer(node2, types7.j_expr));
62916
62832
  }
62917
62833
  break;
62918
62834
  }
@@ -62983,11 +62899,11 @@ var require_lib = __commonJS({
62983
62899
  }
62984
62900
  getTokenFromCode(code) {
62985
62901
  const context = this.curContext();
62986
- if (context === types6.j_expr) {
62902
+ if (context === types7.j_expr) {
62987
62903
  this.jsxReadToken();
62988
62904
  return;
62989
62905
  }
62990
- if (context === types6.j_oTag || context === types6.j_cTag) {
62906
+ if (context === types7.j_oTag || context === types7.j_cTag) {
62991
62907
  if (isIdentifierStart(code)) {
62992
62908
  this.jsxReadWord();
62993
62909
  return;
@@ -62997,7 +62913,7 @@ var require_lib = __commonJS({
62997
62913
  this.finishToken(141);
62998
62914
  return;
62999
62915
  }
63000
- if ((code === 34 || code === 39) && context === types6.j_oTag) {
62916
+ if ((code === 34 || code === 39) && context === types7.j_oTag) {
63001
62917
  this.jsxReadString(code);
63002
62918
  return;
63003
62919
  }
@@ -63015,17 +62931,17 @@ var require_lib = __commonJS({
63015
62931
  type
63016
62932
  } = this.state;
63017
62933
  if (type === 56 && prevType === 140) {
63018
- context.splice(-2, 2, types6.j_cTag);
62934
+ context.splice(-2, 2, types7.j_cTag);
63019
62935
  this.state.canStartJSXElement = false;
63020
62936
  } else if (type === 140) {
63021
- context.push(types6.j_oTag);
62937
+ context.push(types7.j_oTag);
63022
62938
  } else if (type === 141) {
63023
62939
  const out = context[context.length - 1];
63024
- if (out === types6.j_oTag && prevType === 56 || out === types6.j_cTag) {
62940
+ if (out === types7.j_oTag && prevType === 56 || out === types7.j_cTag) {
63025
62941
  context.pop();
63026
- this.state.canStartJSXElement = context[context.length - 1] === types6.j_expr;
62942
+ this.state.canStartJSXElement = context[context.length - 1] === types7.j_expr;
63027
62943
  } else {
63028
- this.setContext(types6.j_expr);
62944
+ this.setContext(types7.j_expr);
63029
62945
  this.state.canStartJSXElement = true;
63030
62946
  }
63031
62947
  } else {
@@ -64469,14 +64385,14 @@ var require_lib = __commonJS({
64469
64385
  tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
64470
64386
  const node = this.startNode();
64471
64387
  const hasLeadingOperator = this.eat(operator);
64472
- const types7 = [];
64388
+ const types8 = [];
64473
64389
  do {
64474
- types7.push(parseConstituentType());
64390
+ types8.push(parseConstituentType());
64475
64391
  } while (this.eat(operator));
64476
- if (types7.length === 1 && !hasLeadingOperator) {
64477
- return types7[0];
64392
+ if (types8.length === 1 && !hasLeadingOperator) {
64393
+ return types8[0];
64478
64394
  }
64479
- node.types = types7;
64395
+ node.types = types8;
64480
64396
  return this.finishNode(node, kind);
64481
64397
  }
64482
64398
  tsParseIntersectionTypeOrHigher() {
@@ -65050,7 +64966,7 @@ var require_lib = __commonJS({
65050
64966
  this.raise(TSErrors.EmptyTypeArguments, {
65051
64967
  at: node
65052
64968
  });
65053
- } else if (!this.state.inType && this.curContext() === types6.brace) {
64969
+ } else if (!this.state.inType && this.curContext() === types7.brace) {
65054
64970
  this.reScan_lt_gt();
65055
64971
  }
65056
64972
  this.expect(48);
@@ -65727,7 +65643,7 @@ var require_lib = __commonJS({
65727
65643
  context
65728
65644
  } = this.state;
65729
65645
  const currentContext = context[context.length - 1];
65730
- if (currentContext === types6.j_oTag || currentContext === types6.j_expr) {
65646
+ if (currentContext === types7.j_oTag || currentContext === types7.j_expr) {
65731
65647
  context.pop();
65732
65648
  }
65733
65649
  }
@@ -70615,13 +70531,224 @@ var init_codemod = __esm({
70615
70531
  }
70616
70532
  });
70617
70533
 
70618
- // 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
70619
70655
  var c3_exports2 = {};
70620
70656
  __export(c3_exports2, {
70621
70657
  default: () => c3_default2
70622
70658
  });
70623
- 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;
70624
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({
70625
70752
  "templates/astro/c3.ts"() {
70626
70753
  init_cli();
70627
70754
  init_colors();
@@ -70630,13 +70757,13 @@ var init_c32 = __esm({
70630
70757
  init_command();
70631
70758
  init_files();
70632
70759
  init_packageManagers();
70633
- recast2 = __toESM(require_main3());
70760
+ recast3 = __toESM(require_main3());
70634
70761
  ({ npx: npx2 } = detectPackageManager());
70635
- generate2 = async (ctx) => {
70762
+ generate3 = async (ctx) => {
70636
70763
  await runFrameworkGenerator(ctx, [ctx.project.name, "--no-install"]);
70637
70764
  logRaw("");
70638
70765
  };
70639
- configure2 = async (ctx) => {
70766
+ configure3 = async (ctx) => {
70640
70767
  await runCommand([npx2, "astro", "add", "cloudflare", "-y"], {
70641
70768
  silent: true,
70642
70769
  startText: "Installing adapter",
@@ -70656,7 +70783,7 @@ var init_c32 = __esm({
70656
70783
  if (callee.name !== "cloudflare") {
70657
70784
  return this.traverse(n2);
70658
70785
  }
70659
- const b2 = recast2.types.builders;
70786
+ const b2 = recast3.types.builders;
70660
70787
  n2.node.arguments = [
70661
70788
  b2.objectExpression([
70662
70789
  b2.objectProperty(
@@ -70681,7 +70808,7 @@ var init_c32 = __esm({
70681
70808
  visitProgram: function(n2) {
70682
70809
  const snippets = loadTemplateSnippets(ctx);
70683
70810
  const patch = snippets.runtimeDeclarationTs;
70684
- const b2 = recast2.types.builders;
70811
+ const b2 = recast3.types.builders;
70685
70812
  const comments = n2.get("comments").value;
70686
70813
  n2.node.comments = comments.map(
70687
70814
  (c2) => b2.commentLine(c2.value)
@@ -70691,7 +70818,7 @@ var init_c32 = __esm({
70691
70818
  }
70692
70819
  });
70693
70820
  };
70694
- config2 = {
70821
+ config3 = {
70695
70822
  configVersion: 1,
70696
70823
  id: "astro",
70697
70824
  platform: "pages",
@@ -70702,65 +70829,65 @@ var init_c32 = __esm({
70702
70829
  devScript: "dev",
70703
70830
  deployScript: "deploy",
70704
70831
  previewScript: "preview",
70705
- generate: generate2,
70706
- configure: configure2,
70832
+ generate: generate3,
70833
+ configure: configure3,
70707
70834
  transformPackageJson: async (pkgJson, ctx) => ({
70708
70835
  scripts: {
70709
- deploy: `astro build && wrangler pages deploy ./dist`,
70710
- preview: `astro build && wrangler pages dev ./dist`,
70711
- ...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` }
70712
70839
  }
70713
70840
  })
70714
70841
  };
70715
- c3_default2 = config2;
70842
+ c3_default3 = config3;
70716
70843
  }
70717
70844
  });
70718
70845
 
70719
70846
  // templates/docusaurus/c3.ts
70720
- var c3_exports3 = {};
70721
- __export(c3_exports3, {
70722
- default: () => c3_default3
70847
+ var c3_exports4 = {};
70848
+ __export(c3_exports4, {
70849
+ default: () => c3_default4
70723
70850
  });
70724
- var npm2, generate3, config3, c3_default3;
70725
- var init_c33 = __esm({
70851
+ var npm3, generate4, config4, c3_default4;
70852
+ var init_c34 = __esm({
70726
70853
  "templates/docusaurus/c3.ts"() {
70727
70854
  init_frameworks();
70728
70855
  init_packageManagers();
70729
- ({ npm: npm2 } = detectPackageManager());
70730
- generate3 = async (ctx) => {
70856
+ ({ npm: npm3 } = detectPackageManager());
70857
+ generate4 = async (ctx) => {
70731
70858
  await runFrameworkGenerator(ctx, [ctx.project.name, "classic"]);
70732
70859
  };
70733
- config3 = {
70860
+ config4 = {
70734
70861
  configVersion: 1,
70735
70862
  id: "docusaurus",
70736
70863
  platform: "pages",
70737
70864
  displayName: "Docusaurus",
70738
- generate: generate3,
70865
+ generate: generate4,
70739
70866
  transformPackageJson: async () => ({
70740
70867
  scripts: {
70741
- deploy: `${npm2} run build && wrangler pages deploy ./build`
70868
+ deploy: `${npm3} run build && wrangler pages deploy ./build`
70742
70869
  }
70743
70870
  }),
70744
70871
  devScript: "start",
70745
70872
  deployScript: "deploy"
70746
70873
  };
70747
- c3_default3 = config3;
70874
+ c3_default4 = config4;
70748
70875
  }
70749
70876
  });
70750
70877
 
70751
70878
  // templates/gatsby/c3.ts
70752
- var c3_exports4 = {};
70753
- __export(c3_exports4, {
70754
- default: () => c3_default4
70879
+ var c3_exports5 = {};
70880
+ __export(c3_exports5, {
70881
+ default: () => c3_default5
70755
70882
  });
70756
- var npm3, generate4, config4, c3_default4;
70757
- var init_c34 = __esm({
70883
+ var npm4, generate5, config5, c3_default5;
70884
+ var init_c35 = __esm({
70758
70885
  "templates/gatsby/c3.ts"() {
70759
70886
  init_interactive();
70760
70887
  init_frameworks();
70761
70888
  init_packageManagers();
70762
- ({ npm: npm3 } = detectPackageManager());
70763
- generate4 = async (ctx) => {
70889
+ ({ npm: npm4 } = detectPackageManager());
70890
+ generate5 = async (ctx) => {
70764
70891
  const defaultTemplate = "https://github.com/gatsbyjs/gatsby-starter-blog";
70765
70892
  const useTemplate = await inputPrompt({
70766
70893
  type: "confirm",
@@ -70779,37 +70906,37 @@ var init_c34 = __esm({
70779
70906
  }
70780
70907
  await runFrameworkGenerator(ctx, ["new", ctx.project.name, templateUrl]);
70781
70908
  };
70782
- config4 = {
70909
+ config5 = {
70783
70910
  configVersion: 1,
70784
70911
  id: "gatsby",
70785
70912
  platform: "pages",
70786
70913
  displayName: "Gatsby",
70787
- generate: generate4,
70914
+ generate: generate5,
70788
70915
  transformPackageJson: async () => ({
70789
70916
  scripts: {
70790
- deploy: `${npm3} run build && wrangler pages deploy ./public`,
70791
- 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`
70792
70919
  }
70793
70920
  }),
70794
70921
  devScript: "develop",
70795
70922
  deployScript: "deploy",
70796
70923
  previewScript: "preview"
70797
70924
  };
70798
- c3_default4 = config4;
70925
+ c3_default5 = config5;
70799
70926
  }
70800
70927
  });
70801
70928
 
70802
70929
  // templates/hono/c3.ts
70803
- var c3_exports5 = {};
70804
- __export(c3_exports5, {
70805
- default: () => c3_default5
70930
+ var c3_exports6 = {};
70931
+ __export(c3_exports6, {
70932
+ default: () => c3_default6
70806
70933
  });
70807
- var generate5, config5, c3_default5;
70808
- var init_c35 = __esm({
70934
+ var generate6, config6, c3_default6;
70935
+ var init_c36 = __esm({
70809
70936
  "templates/hono/c3.ts"() {
70810
70937
  init_cli();
70811
70938
  init_frameworks();
70812
- generate5 = async (ctx) => {
70939
+ generate6 = async (ctx) => {
70813
70940
  await runFrameworkGenerator(ctx, [
70814
70941
  ctx.project.name,
70815
70942
  "--template",
@@ -70817,28 +70944,28 @@ var init_c35 = __esm({
70817
70944
  ]);
70818
70945
  logRaw("");
70819
70946
  };
70820
- config5 = {
70947
+ config6 = {
70821
70948
  configVersion: 1,
70822
70949
  id: "hono",
70823
70950
  displayName: "Hono",
70824
70951
  platform: "workers",
70825
- generate: generate5,
70952
+ generate: generate6,
70826
70953
  devScript: "dev",
70827
70954
  deployScript: "deploy"
70828
70955
  };
70829
- c3_default5 = config5;
70956
+ c3_default6 = config6;
70830
70957
  }
70831
70958
  });
70832
70959
 
70833
70960
  // templates/next/c3.ts
70834
- var c3_exports6 = {};
70835
- __export(c3_exports6, {
70836
- default: () => c3_default6,
70961
+ var c3_exports7 = {};
70962
+ __export(c3_exports7, {
70963
+ default: () => c3_default7,
70837
70964
  shouldInstallNextOnPagesEslintPlugin: () => shouldInstallNextOnPagesEslintPlugin,
70838
70965
  writeEslintrc: () => writeEslintrc
70839
70966
  });
70840
- var import_path13, npm4, npx3, generate6, updateNextConfig, configure3, shouldInstallNextOnPagesEslintPlugin, writeEslintrc, addDevDependencies, c3_default6;
70841
- var init_c36 = __esm({
70967
+ var import_path13, npm5, npx3, generate7, updateNextConfig, configure4, shouldInstallNextOnPagesEslintPlugin, writeEslintrc, addDevDependencies, c3_default7;
70968
+ var init_c37 = __esm({
70842
70969
  "templates/next/c3.ts"() {
70843
70970
  import_path13 = require("path");
70844
70971
  init_cli();
@@ -70850,8 +70977,8 @@ var init_c36 = __esm({
70850
70977
  init_packageManagers();
70851
70978
  init_packages();
70852
70979
  init_templates();
70853
- ({ npm: npm4, npx: npx3 } = detectPackageManager());
70854
- generate6 = async (ctx) => {
70980
+ ({ npm: npm5, npx: npx3 } = detectPackageManager());
70981
+ generate7 = async (ctx) => {
70855
70982
  const projectName = ctx.project.name;
70856
70983
  await runFrameworkGenerator(ctx, [projectName]);
70857
70984
  const wranglerToml = readFile((0, import_path13.join)(getTemplatePath(ctx), "wrangler.toml"));
@@ -70884,7 +71011,7 @@ ${$1}`
70884
71011
  writeFile2(configFile, updatedConfigFile);
70885
71012
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
70886
71013
  };
70887
- configure3 = async (ctx) => {
71014
+ configure4 = async (ctx) => {
70888
71015
  const projectPath = ctx.project.path;
70889
71016
  const path4 = probePaths([
70890
71017
  `${projectPath}/pages/api`,
@@ -70958,13 +71085,13 @@ ${$1}`
70958
71085
  doneText: `${brandColor(`installed`)} ${dim(packages.join(", "))}`
70959
71086
  });
70960
71087
  };
70961
- c3_default6 = {
71088
+ c3_default7 = {
70962
71089
  configVersion: 1,
70963
71090
  id: "next",
70964
71091
  platform: "pages",
70965
71092
  displayName: "Next",
70966
- generate: generate6,
70967
- configure: configure3,
71093
+ generate: generate7,
71094
+ configure: configure4,
70968
71095
  copyFiles: {
70969
71096
  async selectVariant(ctx) {
70970
71097
  const isApp = probePaths([
@@ -70995,20 +71122,20 @@ ${$1}`
70995
71122
  }
70996
71123
  },
70997
71124
  transformPackageJson: async (_2, ctx) => {
70998
- const isNpm = npm4 === "npm";
70999
- const isBun = npm4 === "bun";
71125
+ const isNpm = npm5 === "npm";
71126
+ const isBun = npm5 === "bun";
71000
71127
  const isNpmOrBun = isNpm || isBun;
71001
71128
  const nextOnPagesScope = isNpmOrBun ? "@cloudflare/" : "";
71002
71129
  const nextOnPagesCommand = `${nextOnPagesScope}next-on-pages`;
71003
- const pmCommand = isNpmOrBun ? npx3 : npm4;
71130
+ const pmCommand = isNpmOrBun ? npx3 : npm5;
71004
71131
  const pagesBuildRunCommand = `${isNpm ? "npm run" : isBun ? "bun" : pmCommand} pages:build`;
71005
71132
  return {
71006
71133
  scripts: {
71007
71134
  "pages:build": `${pmCommand} ${nextOnPagesCommand}`,
71008
- preview: `${pagesBuildRunCommand} && wrangler pages dev .vercel/output/static`,
71009
- deploy: `${pagesBuildRunCommand} && wrangler pages deploy .vercel/output/static`,
71135
+ preview: `${pagesBuildRunCommand} && wrangler pages dev`,
71136
+ deploy: `${pagesBuildRunCommand} && wrangler pages deploy`,
71010
71137
  ...usesTypescript(ctx) && {
71011
- "build-cf-types": `wrangler types --env-interface CloudflareEnv env.d.ts`
71138
+ "cf-typegen": `wrangler types --env-interface CloudflareEnv env.d.ts`
71012
71139
  }
71013
71140
  }
71014
71141
  };
@@ -71022,12 +71149,12 @@ ${$1}`
71022
71149
  });
71023
71150
 
71024
71151
  // templates/nuxt/c3.ts
71025
- var c3_exports7 = {};
71026
- __export(c3_exports7, {
71027
- default: () => c3_default7
71152
+ var c3_exports8 = {};
71153
+ __export(c3_exports8, {
71154
+ default: () => c3_default8
71028
71155
  });
71029
- var recast3, npm5, pm, generate7, configure4, updateEnvTypes, updateNuxtConfig, config6, c3_default7;
71030
- var init_c37 = __esm({
71156
+ var recast4, npm6, pm2, generate8, configure5, updateEnvTypes2, updateNuxtConfig, config7, c3_default8;
71157
+ var init_c38 = __esm({
71031
71158
  "templates/nuxt/c3.ts"() {
71032
71159
  init_cli();
71033
71160
  init_colors();
@@ -71038,39 +71165,39 @@ var init_c37 = __esm({
71038
71165
  init_files();
71039
71166
  init_packageManagers();
71040
71167
  init_packages();
71041
- recast3 = __toESM(require_main3());
71042
- ({ npm: npm5, name: pm } = detectPackageManager());
71043
- generate7 = async (ctx) => {
71168
+ recast4 = __toESM(require_main3());
71169
+ ({ npm: npm6, name: pm2 } = detectPackageManager());
71170
+ generate8 = async (ctx) => {
71044
71171
  const gitFlag = ctx.args.git ? `--gitInit` : `--no-gitInit`;
71045
71172
  await runFrameworkGenerator(ctx, [
71046
71173
  "init",
71047
71174
  ctx.project.name,
71048
71175
  "--packageManager",
71049
- npm5,
71176
+ npm6,
71050
71177
  gitFlag
71051
71178
  ]);
71052
71179
  writeFile2("./.node-version", "17");
71053
71180
  logRaw("");
71054
71181
  };
71055
- configure4 = async (ctx) => {
71182
+ configure5 = async (ctx) => {
71056
71183
  const packages = ["nitro-cloudflare-dev"];
71057
- if (pm === "pnpm") {
71184
+ if (pm2 === "pnpm") {
71058
71185
  packages.push("h3");
71059
71186
  }
71060
71187
  await installPackages(packages, {
71061
71188
  dev: true,
71062
71189
  startText: "Installing nitro module `nitro-cloudflare-dev`",
71063
- doneText: `${brandColor("installed")} ${dim(`via \`${npm5} install\``)}`
71190
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm6} install\``)}`
71064
71191
  });
71065
71192
  updateNuxtConfig();
71066
- updateEnvTypes(ctx);
71193
+ updateEnvTypes2(ctx);
71067
71194
  };
71068
- updateEnvTypes = (ctx) => {
71195
+ updateEnvTypes2 = (ctx) => {
71069
71196
  const filepath = "env.d.ts";
71070
71197
  const s = spinner();
71071
71198
  s.start(`Updating ${filepath}`);
71072
71199
  let file = readFile(filepath);
71073
- let typesEntrypoint = `@cloudflare/workers-types/`;
71200
+ let typesEntrypoint = `@cloudflare/workers-types`;
71074
71201
  const latestEntrypoint = getLatestTypesEntrypoint(ctx);
71075
71202
  if (latestEntrypoint) {
71076
71203
  typesEntrypoint += `/${latestEntrypoint}`;
@@ -71083,7 +71210,7 @@ var init_c37 = __esm({
71083
71210
  const s = spinner();
71084
71211
  const configFile = "nuxt.config.ts";
71085
71212
  s.start(`Updating \`${configFile}\``);
71086
- const b2 = recast3.types.builders;
71213
+ const b2 = recast4.types.builders;
71087
71214
  const presetDef = b2.objectProperty(
71088
71215
  b2.identifier("nitro"),
71089
71216
  b2.objectExpression([
@@ -71110,7 +71237,7 @@ var init_c37 = __esm({
71110
71237
  });
71111
71238
  s.stop(`${brandColor(`updated`)} ${dim(`\`${configFile}\``)}`);
71112
71239
  };
71113
- config6 = {
71240
+ config7 = {
71114
71241
  configVersion: 1,
71115
71242
  id: "nuxt",
71116
71243
  platform: "pages",
@@ -71118,30 +71245,30 @@ var init_c37 = __esm({
71118
71245
  copyFiles: {
71119
71246
  path: "./templates"
71120
71247
  },
71121
- generate: generate7,
71122
- configure: configure4,
71248
+ generate: generate8,
71249
+ configure: configure5,
71123
71250
  transformPackageJson: async () => ({
71124
71251
  scripts: {
71125
- deploy: `${npm5} run build && wrangler pages deploy ./dist`,
71126
- preview: `${npm5} run build && wrangler pages dev ./dist`,
71127
- "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`
71128
71255
  }
71129
71256
  }),
71130
71257
  devScript: "dev",
71131
71258
  deployScript: "deploy",
71132
71259
  previewScript: "preview"
71133
71260
  };
71134
- c3_default7 = config6;
71261
+ c3_default8 = config7;
71135
71262
  }
71136
71263
  });
71137
71264
 
71138
71265
  // templates/qwik/c3.ts
71139
- var c3_exports8 = {};
71140
- __export(c3_exports8, {
71141
- default: () => c3_default8
71266
+ var c3_exports9 = {};
71267
+ __export(c3_exports9, {
71268
+ default: () => c3_default9
71142
71269
  });
71143
- var recast4, npm6, npx4, generate8, configure5, addBindingsProxy, populateCloudflareEnv, config7, c3_default8;
71144
- var init_c38 = __esm({
71270
+ var recast5, npm7, npx4, generate9, configure6, addBindingsProxy, populateCloudflareEnv, config8, c3_default9;
71271
+ var init_c39 = __esm({
71145
71272
  "templates/qwik/c3.ts"() {
71146
71273
  init_cli();
71147
71274
  init_colors();
@@ -71151,12 +71278,12 @@ var init_c38 = __esm({
71151
71278
  init_command();
71152
71279
  init_files();
71153
71280
  init_packageManagers();
71154
- recast4 = __toESM(require_main3());
71155
- ({ npm: npm6, npx: npx4 } = detectPackageManager());
71156
- generate8 = async (ctx) => {
71281
+ recast5 = __toESM(require_main3());
71282
+ ({ npm: npm7, npx: npx4 } = detectPackageManager());
71283
+ generate9 = async (ctx) => {
71157
71284
  await runFrameworkGenerator(ctx, ["basic", ctx.project.name]);
71158
71285
  };
71159
- configure5 = async (ctx) => {
71286
+ configure6 = async (ctx) => {
71160
71287
  const cmd = [npx4, "qwik", "add", "cloudflare-pages"];
71161
71288
  endSection(`Running ${quoteShellArgs(cmd)}`);
71162
71289
  await runCommand(cmd);
@@ -71170,7 +71297,7 @@ var init_c38 = __esm({
71170
71297
  const s = spinner();
71171
71298
  s.start("Updating `vite.config.ts`");
71172
71299
  const snippets = loadTemplateSnippets(ctx);
71173
- const b2 = recast4.types.builders;
71300
+ const b2 = recast5.types.builders;
71174
71301
  transformFile("vite.config.ts", {
71175
71302
  // Insert the env declaration after the last import (but before the rest of the body)
71176
71303
  visitProgram: function(n2) {
@@ -71212,7 +71339,7 @@ var init_c38 = __esm({
71212
71339
  s.start(`Updating \`${entrypointPath}\``);
71213
71340
  transformFile(entrypointPath, {
71214
71341
  visitTSInterfaceDeclaration: function(n2) {
71215
- const b2 = recast4.types.builders;
71342
+ const b2 = recast5.types.builders;
71216
71343
  const id = n2.node.id;
71217
71344
  if (id.name !== "QwikCityPlatform") {
71218
71345
  this.traverse(n2);
@@ -71233,7 +71360,7 @@ var init_c38 = __esm({
71233
71360
  });
71234
71361
  s.stop(`${brandColor("updated")} \`${entrypointPath}\``);
71235
71362
  };
71236
- config7 = {
71363
+ config8 = {
71237
71364
  configVersion: 1,
71238
71365
  id: "qwik",
71239
71366
  displayName: "Qwik",
@@ -71241,66 +71368,66 @@ var init_c38 = __esm({
71241
71368
  copyFiles: {
71242
71369
  path: "./templates"
71243
71370
  },
71244
- generate: generate8,
71245
- configure: configure5,
71371
+ generate: generate9,
71372
+ configure: configure6,
71246
71373
  transformPackageJson: async () => ({
71247
71374
  scripts: {
71248
- deploy: `${npm6} run build && wrangler pages deploy ./dist`,
71249
- preview: `${npm6} run build && wrangler pages dev ./dist`,
71250
- "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`
71251
71378
  }
71252
71379
  }),
71253
71380
  devScript: "dev",
71254
71381
  deployScript: "deploy",
71255
71382
  previewScript: "preview"
71256
71383
  };
71257
- c3_default8 = config7;
71384
+ c3_default9 = config8;
71258
71385
  }
71259
71386
  });
71260
71387
 
71261
71388
  // templates/react/c3.ts
71262
- var c3_exports9 = {};
71263
- __export(c3_exports9, {
71264
- default: () => c3_default9
71389
+ var c3_exports10 = {};
71390
+ __export(c3_exports10, {
71391
+ default: () => c3_default10
71265
71392
  });
71266
- var npm7, generate9, config8, c3_default9;
71267
- var init_c39 = __esm({
71393
+ var npm8, generate10, config9, c3_default10;
71394
+ var init_c310 = __esm({
71268
71395
  "templates/react/c3.ts"() {
71269
71396
  init_cli();
71270
71397
  init_frameworks();
71271
71398
  init_packageManagers();
71272
- ({ npm: npm7 } = detectPackageManager());
71273
- generate9 = async (ctx) => {
71399
+ ({ npm: npm8 } = detectPackageManager());
71400
+ generate10 = async (ctx) => {
71274
71401
  await runFrameworkGenerator(ctx, [ctx.project.name]);
71275
71402
  logRaw("");
71276
71403
  };
71277
- config8 = {
71404
+ config9 = {
71278
71405
  configVersion: 1,
71279
71406
  id: "react",
71280
71407
  displayName: "React",
71281
71408
  platform: "pages",
71282
- generate: generate9,
71409
+ generate: generate10,
71283
71410
  transformPackageJson: async () => ({
71284
71411
  scripts: {
71285
- deploy: `${npm7} run build && wrangler pages deploy ./build`,
71286
- 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`
71287
71414
  }
71288
71415
  }),
71289
71416
  devScript: "dev",
71290
71417
  deployScript: "deploy",
71291
71418
  previewScript: "preview"
71292
71419
  };
71293
- c3_default9 = config8;
71420
+ c3_default10 = config9;
71294
71421
  }
71295
71422
  });
71296
71423
 
71297
71424
  // templates/remix/c3.ts
71298
- var c3_exports10 = {};
71299
- __export(c3_exports10, {
71300
- default: () => c3_default10
71425
+ var c3_exports11 = {};
71426
+ __export(c3_exports11, {
71427
+ default: () => c3_default11
71301
71428
  });
71302
- var npm8, generate10, configure6, config9, c3_default10;
71303
- var init_c310 = __esm({
71429
+ var npm9, generate11, configure7, config10, c3_default11;
71430
+ var init_c311 = __esm({
71304
71431
  "templates/remix/c3.ts"() {
71305
71432
  init_cli();
71306
71433
  init_colors();
@@ -71308,8 +71435,8 @@ var init_c310 = __esm({
71308
71435
  init_frameworks();
71309
71436
  init_codemod();
71310
71437
  init_packageManagers();
71311
- ({ npm: npm8 } = detectPackageManager());
71312
- generate10 = async (ctx) => {
71438
+ ({ npm: npm9 } = detectPackageManager());
71439
+ generate11 = async (ctx) => {
71313
71440
  await runFrameworkGenerator(ctx, [
71314
71441
  ctx.project.name,
71315
71442
  "--template",
@@ -71317,7 +71444,7 @@ var init_c310 = __esm({
71317
71444
  ]);
71318
71445
  logRaw("");
71319
71446
  };
71320
- configure6 = async () => {
71447
+ configure7 = async () => {
71321
71448
  const typeDefsPath = "load-context.ts";
71322
71449
  const s = spinner();
71323
71450
  s.start(`Updating \`${typeDefsPath}\``);
@@ -71332,7 +71459,7 @@ var init_c310 = __esm({
71332
71459
  });
71333
71460
  s.stop(`${brandColor("updated")} \`${dim(typeDefsPath)}\``);
71334
71461
  };
71335
- config9 = {
71462
+ config10 = {
71336
71463
  configVersion: 1,
71337
71464
  id: "remix",
71338
71465
  platform: "pages",
@@ -71340,45 +71467,44 @@ var init_c310 = __esm({
71340
71467
  copyFiles: {
71341
71468
  path: "./templates"
71342
71469
  },
71343
- generate: generate10,
71344
- configure: configure6,
71470
+ generate: generate11,
71471
+ configure: configure7,
71345
71472
  transformPackageJson: async () => ({
71346
71473
  scripts: {
71347
- deploy: `${npm8} run build && wrangler pages deploy ./build/client`,
71348
- preview: `${npm8} run build && wrangler pages dev ./build/client`,
71349
- "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`
71350
71477
  }
71351
71478
  }),
71352
71479
  devScript: "dev",
71353
71480
  deployScript: "deploy",
71354
71481
  previewScript: "preview"
71355
71482
  };
71356
- c3_default10 = config9;
71483
+ c3_default11 = config10;
71357
71484
  }
71358
71485
  });
71359
71486
 
71360
71487
  // templates/solid/c3.ts
71361
- var c3_exports11 = {};
71362
- __export(c3_exports11, {
71363
- default: () => c3_default11
71488
+ var c3_exports12 = {};
71489
+ __export(c3_exports12, {
71490
+ default: () => c3_default12
71364
71491
  });
71365
- var recast5, npm9, generate11, configure7, config10, c3_default11;
71366
- var init_c311 = __esm({
71492
+ var recast6, npm10, generate12, configure8, config11, c3_default12;
71493
+ var init_c312 = __esm({
71367
71494
  "templates/solid/c3.ts"() {
71368
71495
  init_cli();
71369
71496
  init_colors();
71370
71497
  init_frameworks();
71371
71498
  init_codemod();
71372
- init_compatDate();
71373
71499
  init_files();
71374
71500
  init_packageManagers();
71375
- recast5 = __toESM(require_main3());
71376
- ({ npm: npm9 } = detectPackageManager());
71377
- generate11 = async (ctx) => {
71501
+ recast6 = __toESM(require_main3());
71502
+ ({ npm: npm10 } = detectPackageManager());
71503
+ generate12 = async (ctx) => {
71378
71504
  await runFrameworkGenerator(ctx, ["-p", ctx.project.name, "-s"]);
71379
71505
  logRaw("");
71380
71506
  };
71381
- configure7 = async (ctx) => {
71507
+ configure8 = async (ctx) => {
71382
71508
  usesTypescript(ctx);
71383
71509
  const filePath = `app.config.${usesTypescript(ctx) ? "ts" : "js"}`;
71384
71510
  updateStatus(`Updating configuration in ${blue(filePath)}`);
@@ -71388,7 +71514,7 @@ var init_c311 = __esm({
71388
71514
  if (callee.name !== "defineConfig") {
71389
71515
  return this.traverse(n2);
71390
71516
  }
71391
- const b2 = recast5.types.builders;
71517
+ const b2 = recast6.types.builders;
71392
71518
  n2.node.arguments = [
71393
71519
  b2.objectExpression([
71394
71520
  b2.objectProperty(
@@ -71415,17 +71541,20 @@ var init_c311 = __esm({
71415
71541
  }
71416
71542
  });
71417
71543
  };
71418
- config10 = {
71544
+ config11 = {
71419
71545
  configVersion: 1,
71420
71546
  id: "solid",
71421
71547
  displayName: "Solid",
71422
71548
  platform: "pages",
71423
- generate: generate11,
71424
- configure: configure7,
71549
+ copyFiles: {
71550
+ path: "./templates"
71551
+ },
71552
+ generate: generate12,
71553
+ configure: configure8,
71425
71554
  transformPackageJson: async () => ({
71426
71555
  scripts: {
71427
- preview: `${npm9} run build && npx wrangler pages dev dist ${await compatDateFlag()} --compatibility-flag nodejs_compat`,
71428
- 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`
71429
71558
  }
71430
71559
  }),
71431
71560
  compatibilityFlags: ["nodejs_compat"],
@@ -71433,17 +71562,17 @@ var init_c311 = __esm({
71433
71562
  deployScript: "deploy",
71434
71563
  previewScript: "preview"
71435
71564
  };
71436
- c3_default11 = config10;
71565
+ c3_default12 = config11;
71437
71566
  }
71438
71567
  });
71439
71568
 
71440
71569
  // templates/svelte/c3.ts
71441
- var c3_exports12 = {};
71442
- __export(c3_exports12, {
71443
- default: () => c3_default12
71570
+ var c3_exports13 = {};
71571
+ __export(c3_exports13, {
71572
+ default: () => c3_default13
71444
71573
  });
71445
- var import_node_os, recast6, npm10, generate12, configure8, updateSvelteConfig, updateTypeDefinitions, config11, c3_default12;
71446
- var init_c312 = __esm({
71574
+ var import_node_os, recast7, npm11, generate13, configure9, updateSvelteConfig, updateTypeDefinitions, config12, c3_default13;
71575
+ var init_c313 = __esm({
71447
71576
  "templates/svelte/c3.ts"() {
71448
71577
  import_node_os = require("node:os");
71449
71578
  init_cli();
@@ -71453,13 +71582,13 @@ var init_c312 = __esm({
71453
71582
  init_files();
71454
71583
  init_packageManagers();
71455
71584
  init_packages();
71456
- recast6 = __toESM(require_main3());
71457
- ({ npm: npm10 } = detectPackageManager());
71458
- generate12 = async (ctx) => {
71585
+ recast7 = __toESM(require_main3());
71586
+ ({ npm: npm11 } = detectPackageManager());
71587
+ generate13 = async (ctx) => {
71459
71588
  await runFrameworkGenerator(ctx, [ctx.project.name]);
71460
71589
  logRaw("");
71461
71590
  };
71462
- configure8 = async (ctx) => {
71591
+ configure9 = async (ctx) => {
71463
71592
  const pkg = `@sveltejs/adapter-cloudflare`;
71464
71593
  await installPackages([pkg], {
71465
71594
  dev: true,
@@ -71486,7 +71615,7 @@ var init_c312 = __esm({
71486
71615
  return;
71487
71616
  }
71488
71617
  updateStatus(`Updating global type definitions in ${blue("app.d.ts")}`);
71489
- const b2 = recast6.types.builders;
71618
+ const b2 = recast7.types.builders;
71490
71619
  transformFile("src/app.d.ts", {
71491
71620
  visitTSModuleDeclaration(n2) {
71492
71621
  if (n2.value.id.name === "App" && n2.node.body) {
@@ -71518,7 +71647,7 @@ var init_c312 = __esm({
71518
71647
  }
71519
71648
  });
71520
71649
  };
71521
- config11 = {
71650
+ config12 = {
71522
71651
  configVersion: 1,
71523
71652
  id: "svelte",
71524
71653
  displayName: "Svelte",
@@ -71529,18 +71658,18 @@ var init_c312 = __esm({
71529
71658
  ts: { path: "./ts" }
71530
71659
  }
71531
71660
  },
71532
- generate: generate12,
71533
- configure: configure8,
71661
+ generate: generate13,
71662
+ configure: configure9,
71534
71663
  transformPackageJson: async (original, ctx) => {
71535
71664
  let scripts = {
71536
- preview: `${npm10} run build && wrangler pages dev .svelte-kit/cloudflare`,
71537
- 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`
71538
71667
  };
71539
71668
  if (usesTypescript(ctx)) {
71540
71669
  const mv = (0, import_node_os.platform)() === "win32" ? "move" : "mv";
71541
71670
  scripts = {
71542
71671
  ...scripts,
71543
- "build-cf-types": `wrangler types && ${mv} worker-configuration.d.ts src/`
71672
+ "cf-typegen": `wrangler types && ${mv} worker-configuration.d.ts src/`
71544
71673
  };
71545
71674
  }
71546
71675
  return { scripts };
@@ -71549,53 +71678,53 @@ var init_c312 = __esm({
71549
71678
  deployScript: "deploy",
71550
71679
  previewScript: "preview"
71551
71680
  };
71552
- c3_default12 = config11;
71681
+ c3_default13 = config12;
71553
71682
  }
71554
71683
  });
71555
71684
 
71556
71685
  // templates/vue/c3.ts
71557
- var c3_exports13 = {};
71558
- __export(c3_exports13, {
71559
- default: () => c3_default13
71686
+ var c3_exports14 = {};
71687
+ __export(c3_exports14, {
71688
+ default: () => c3_default14
71560
71689
  });
71561
- var npm11, generate13, config12, c3_default13;
71562
- var init_c313 = __esm({
71690
+ var npm12, generate14, config13, c3_default14;
71691
+ var init_c314 = __esm({
71563
71692
  "templates/vue/c3.ts"() {
71564
71693
  init_frameworks();
71565
71694
  init_packageManagers();
71566
- ({ npm: npm11 } = detectPackageManager());
71567
- generate13 = async (ctx) => {
71695
+ ({ npm: npm12 } = detectPackageManager());
71696
+ generate14 = async (ctx) => {
71568
71697
  await runFrameworkGenerator(ctx, [ctx.project.name]);
71569
71698
  };
71570
- config12 = {
71699
+ config13 = {
71571
71700
  configVersion: 1,
71572
71701
  id: "vue",
71573
71702
  displayName: "Vue",
71574
71703
  platform: "pages",
71575
- generate: generate13,
71704
+ generate: generate14,
71576
71705
  transformPackageJson: async () => ({
71577
71706
  scripts: {
71578
- deploy: `${npm11} run build && wrangler pages deploy ./dist`,
71579
- 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`
71580
71709
  }
71581
71710
  }),
71582
71711
  devScript: "dev",
71583
71712
  deployScript: "deploy",
71584
71713
  previewScript: "preview"
71585
71714
  };
71586
- c3_default13 = config12;
71715
+ c3_default14 = config13;
71587
71716
  }
71588
71717
  });
71589
71718
 
71590
71719
  // templates/hello-world/c3.ts
71591
- var c3_exports14 = {};
71592
- __export(c3_exports14, {
71593
- default: () => c3_default14
71720
+ var c3_exports15 = {};
71721
+ __export(c3_exports15, {
71722
+ default: () => c3_default15
71594
71723
  });
71595
- var c3_default14;
71596
- var init_c314 = __esm({
71724
+ var c3_default15;
71725
+ var init_c315 = __esm({
71597
71726
  "templates/hello-world/c3.ts"() {
71598
- c3_default14 = {
71727
+ c3_default15 = {
71599
71728
  configVersion: 1,
71600
71729
  id: "hello-world",
71601
71730
  displayName: '"Hello World" Worker',
@@ -71615,14 +71744,14 @@ var init_c314 = __esm({
71615
71744
  });
71616
71745
 
71617
71746
  // templates/hello-world-python/c3.ts
71618
- var c3_exports15 = {};
71619
- __export(c3_exports15, {
71620
- default: () => c3_default15
71747
+ var c3_exports16 = {};
71748
+ __export(c3_exports16, {
71749
+ default: () => c3_default16
71621
71750
  });
71622
- var c3_default15;
71623
- var init_c315 = __esm({
71751
+ var c3_default16;
71752
+ var init_c316 = __esm({
71624
71753
  "templates/hello-world-python/c3.ts"() {
71625
- c3_default15 = {
71754
+ c3_default16 = {
71626
71755
  configVersion: 1,
71627
71756
  id: "hello-world-python",
71628
71757
  displayName: '"Hello World" Worker (Python)',
@@ -71635,14 +71764,14 @@ var init_c315 = __esm({
71635
71764
  });
71636
71765
 
71637
71766
  // templates/hello-world-durable-object/c3.ts
71638
- var c3_exports16 = {};
71639
- __export(c3_exports16, {
71640
- default: () => c3_default16
71767
+ var c3_exports17 = {};
71768
+ __export(c3_exports17, {
71769
+ default: () => c3_default17
71641
71770
  });
71642
- var c3_default16;
71643
- var init_c316 = __esm({
71771
+ var c3_default17;
71772
+ var init_c317 = __esm({
71644
71773
  "templates/hello-world-durable-object/c3.ts"() {
71645
- c3_default16 = {
71774
+ c3_default17 = {
71646
71775
  configVersion: 1,
71647
71776
  id: "hello-world-durable-object",
71648
71777
  displayName: '"Hello World" Durable Object',
@@ -71662,14 +71791,14 @@ var init_c316 = __esm({
71662
71791
  });
71663
71792
 
71664
71793
  // templates/common/c3.ts
71665
- var c3_exports17 = {};
71666
- __export(c3_exports17, {
71667
- default: () => c3_default17
71794
+ var c3_exports18 = {};
71795
+ __export(c3_exports18, {
71796
+ default: () => c3_default18
71668
71797
  });
71669
- var c3_default17;
71670
- var init_c317 = __esm({
71798
+ var c3_default18;
71799
+ var init_c318 = __esm({
71671
71800
  "templates/common/c3.ts"() {
71672
- c3_default17 = {
71801
+ c3_default18 = {
71673
71802
  configVersion: 1,
71674
71803
  id: "common",
71675
71804
  displayName: "Example router & proxy Worker",
@@ -71689,14 +71818,14 @@ var init_c317 = __esm({
71689
71818
  });
71690
71819
 
71691
71820
  // templates/scheduled/c3.ts
71692
- var c3_exports18 = {};
71693
- __export(c3_exports18, {
71694
- default: () => c3_default18
71821
+ var c3_exports19 = {};
71822
+ __export(c3_exports19, {
71823
+ default: () => c3_default19
71695
71824
  });
71696
- var c3_default18;
71697
- var init_c318 = __esm({
71825
+ var c3_default19;
71826
+ var init_c319 = __esm({
71698
71827
  "templates/scheduled/c3.ts"() {
71699
- c3_default18 = {
71828
+ c3_default19 = {
71700
71829
  configVersion: 1,
71701
71830
  id: "scheduled",
71702
71831
  displayName: "Scheduled Worker (Cron Trigger)",
@@ -71716,14 +71845,14 @@ var init_c318 = __esm({
71716
71845
  });
71717
71846
 
71718
71847
  // templates/queues/c3.ts
71719
- var c3_exports19 = {};
71720
- __export(c3_exports19, {
71721
- default: () => c3_default19
71848
+ var c3_exports20 = {};
71849
+ __export(c3_exports20, {
71850
+ default: () => c3_default20
71722
71851
  });
71723
- var c3_default19;
71724
- var init_c319 = __esm({
71852
+ var c3_default20;
71853
+ var init_c320 = __esm({
71725
71854
  "templates/queues/c3.ts"() {
71726
- c3_default19 = {
71855
+ c3_default20 = {
71727
71856
  configVersion: 1,
71728
71857
  id: "queues",
71729
71858
  displayName: "Queue consumer & producer Worker",
@@ -71753,14 +71882,14 @@ var init_c319 = __esm({
71753
71882
  });
71754
71883
 
71755
71884
  // templates/openapi/c3.ts
71756
- var c3_exports20 = {};
71757
- __export(c3_exports20, {
71758
- default: () => c3_default20
71885
+ var c3_exports21 = {};
71886
+ __export(c3_exports21, {
71887
+ default: () => c3_default21
71759
71888
  });
71760
- var c3_default20;
71761
- var init_c320 = __esm({
71889
+ var c3_default21;
71890
+ var init_c321 = __esm({
71762
71891
  "templates/openapi/c3.ts"() {
71763
- c3_default20 = {
71892
+ c3_default21 = {
71764
71893
  configVersion: 1,
71765
71894
  id: "openapi",
71766
71895
  displayName: "API starter (OpenAPI compliant)",
@@ -71773,10 +71902,10 @@ var init_c320 = __esm({
71773
71902
  });
71774
71903
 
71775
71904
  // templates/pre-existing/c3.ts
71776
- var c3_exports21 = {};
71777
- __export(c3_exports21, {
71905
+ var c3_exports22 = {};
71906
+ __export(c3_exports22, {
71778
71907
  copyExistingWorkerFiles: () => copyExistingWorkerFiles,
71779
- default: () => c3_default21
71908
+ default: () => c3_default22
71780
71909
  });
71781
71910
  async function copyExistingWorkerFiles(ctx) {
71782
71911
  const { dlx } = detectPackageManager();
@@ -71825,8 +71954,8 @@ async function copyExistingWorkerFiles(ctx) {
71825
71954
  (0, import_path14.join)(ctx.project.path, "wrangler.toml")
71826
71955
  );
71827
71956
  }
71828
- var import_promises, import_os, import_path14, c3_default21;
71829
- var init_c321 = __esm({
71957
+ var import_promises, import_os, import_path14, c3_default22;
71958
+ var init_c322 = __esm({
71830
71959
  "templates/pre-existing/c3.ts"() {
71831
71960
  import_promises = require("fs/promises");
71832
71961
  import_os = require("os");
@@ -71836,7 +71965,7 @@ var init_c321 = __esm({
71836
71965
  init_command();
71837
71966
  init_packageManagers();
71838
71967
  init_accounts();
71839
- c3_default21 = {
71968
+ c3_default22 = {
71840
71969
  configVersion: 1,
71841
71970
  id: "pre-existing",
71842
71971
  displayName: "Pre-existing Worker (from Dashboard)",
@@ -71900,36 +72029,37 @@ var init_templates = __esm({
71900
72029
  return typescript ? "ts" : "js";
71901
72030
  };
71902
72031
  getFrameworkMap = async () => ({
71903
- angular: (await Promise.resolve().then(() => (init_c3(), c3_exports))).default,
71904
- astro: (await Promise.resolve().then(() => (init_c32(), c3_exports2))).default,
71905
- docusaurus: (await Promise.resolve().then(() => (init_c33(), c3_exports3))).default,
71906
- gatsby: (await Promise.resolve().then(() => (init_c34(), c3_exports4))).default,
71907
- hono: (await Promise.resolve().then(() => (init_c35(), c3_exports5))).default,
71908
- next: (await Promise.resolve().then(() => (init_c36(), c3_exports6))).default,
71909
- nuxt: (await Promise.resolve().then(() => (init_c37(), c3_exports7))).default,
71910
- qwik: (await Promise.resolve().then(() => (init_c38(), c3_exports8))).default,
71911
- react: (await Promise.resolve().then(() => (init_c39(), c3_exports9))).default,
71912
- remix: (await Promise.resolve().then(() => (init_c310(), c3_exports10))).default,
71913
- solid: (await Promise.resolve().then(() => (init_c311(), c3_exports11))).default,
71914
- svelte: (await Promise.resolve().then(() => (init_c312(), c3_exports12))).default,
71915
- 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
71916
72046
  });
71917
72047
  getTemplateMap = async () => {
71918
72048
  return {
71919
- "hello-world": (await Promise.resolve().then(() => (init_c314(), c3_exports14))).default,
71920
- "hello-world-python": (await Promise.resolve().then(() => (init_c315(), c3_exports15))).default,
71921
- "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,
71922
72052
  // Dummy record -- actual template config resolved in `selectFramework`
71923
72053
  "web-framework": { displayName: "Website or web app" },
71924
- common: (await Promise.resolve().then(() => (init_c317(), c3_exports17))).default,
71925
- scheduled: (await Promise.resolve().then(() => (init_c318(), c3_exports18))).default,
71926
- queues: (await Promise.resolve().then(() => (init_c319(), c3_exports19))).default,
71927
- 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,
71928
72058
  // Dummy record -- actual template config resolved in `processRemoteTemplate`
71929
72059
  "remote-template": {
71930
72060
  displayName: "Worker built from a template hosted in a git repository"
71931
72061
  },
71932
- "pre-existing": (await Promise.resolve().then(() => (init_c321(), c3_exports21))).default
72062
+ "pre-existing": (await Promise.resolve().then(() => (init_c322(), c3_exports22))).default
71933
72063
  };
71934
72064
  };
71935
72065
  selectTemplate = async (args) => {
@@ -71980,8 +72110,8 @@ var init_templates = __esm({
71980
72110
  selectFramework = async (args) => {
71981
72111
  const frameworkMap = await getFrameworkMap();
71982
72112
  const frameworkOptions = Object.entries(frameworkMap).map(
71983
- ([key, config13]) => ({
71984
- label: config13.displayName,
72113
+ ([key, config14]) => ({
72114
+ label: config14.displayName,
71985
72115
  value: key
71986
72116
  })
71987
72117
  );
@@ -72030,27 +72160,27 @@ var init_templates = __esm({
72030
72160
  defaultValue: C3_DEFAULTS.template
72031
72161
  });
72032
72162
  const path4 = await downloadRemoteTemplate(templateUrl);
72033
- const config13 = inferTemplateConfig(path4);
72034
- validateTemplate(path4, config13);
72163
+ const config14 = inferTemplateConfig(path4);
72164
+ validateTemplate(path4, config14);
72035
72165
  return {
72036
72166
  path: path4,
72037
- ...config13
72167
+ ...config14
72038
72168
  };
72039
72169
  };
72040
- validateTemplate = (path4, config13) => {
72041
- if (!config13.copyFiles) {
72170
+ validateTemplate = (path4, config14) => {
72171
+ if (!config14.copyFiles) {
72042
72172
  return;
72043
72173
  }
72044
- if (isVariantInfo(config13.copyFiles)) {
72045
- 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);
72046
72176
  } else {
72047
- for (const variant of Object.values(config13.copyFiles.variants)) {
72048
- 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);
72049
72179
  }
72050
72180
  }
72051
72181
  };
72052
- validateTemplateSrcDirectory = (path4, config13) => {
72053
- if (config13.platform === "workers") {
72182
+ validateTemplateSrcDirectory = (path4, config14) => {
72183
+ if (config14.platform === "workers") {
72054
72184
  const wranglerTomlPath = (0, import_path15.resolve)(path4, "wrangler.toml");
72055
72185
  if (!(0, import_fs12.existsSync)(wranglerTomlPath)) {
72056
72186
  crash(`create-cloudflare templates must contain a "wrangler.toml" file.`);
@@ -73100,23 +73230,23 @@ var YargsParser = class {
73100
73230
  const configPath = argv2[configKey] || configLookup[configKey];
73101
73231
  if (configPath) {
73102
73232
  try {
73103
- let config13 = null;
73233
+ let config14 = null;
73104
73234
  const resolvedConfigPath = mixin2.resolve(mixin2.cwd(), configPath);
73105
73235
  const resolveConfig = flags.configs[configKey];
73106
73236
  if (typeof resolveConfig === "function") {
73107
73237
  try {
73108
- config13 = resolveConfig(resolvedConfigPath);
73238
+ config14 = resolveConfig(resolvedConfigPath);
73109
73239
  } catch (e) {
73110
- config13 = e;
73240
+ config14 = e;
73111
73241
  }
73112
- if (config13 instanceof Error) {
73113
- error2 = config13;
73242
+ if (config14 instanceof Error) {
73243
+ error2 = config14;
73114
73244
  return;
73115
73245
  }
73116
73246
  } else {
73117
- config13 = mixin2.require(resolvedConfigPath);
73247
+ config14 = mixin2.require(resolvedConfigPath);
73118
73248
  }
73119
- setConfigObject(config13);
73249
+ setConfigObject(config14);
73120
73250
  } catch (ex) {
73121
73251
  if (ex.name === "PermissionDenied")
73122
73252
  error2 = ex;
@@ -73126,9 +73256,9 @@ var YargsParser = class {
73126
73256
  }
73127
73257
  });
73128
73258
  }
73129
- function setConfigObject(config13, prev) {
73130
- Object.keys(config13).forEach(function(key) {
73131
- const value = config13[key];
73259
+ function setConfigObject(config14, prev) {
73260
+ Object.keys(config14).forEach(function(key) {
73261
+ const value = config14[key];
73132
73262
  const fullKey = prev ? prev + "." + key : key;
73133
73263
  if (typeof value === "object" && value !== null && !Array.isArray(value) && configuration["dot-notation"]) {
73134
73264
  setConfigObject(value, fullKey);
@@ -74280,11 +74410,11 @@ var CommandInstance = class {
74280
74410
  });
74281
74411
  if (!unparsed.length)
74282
74412
  return;
74283
- const config13 = Object.assign({}, options.configuration, {
74413
+ const config14 = Object.assign({}, options.configuration, {
74284
74414
  "populate--": false
74285
74415
  });
74286
74416
  const parsed = this.shim.Parser.detailed(unparsed, Object.assign({}, options, {
74287
- configuration: config13
74417
+ configuration: config14
74288
74418
  }));
74289
74419
  if (parsed.error) {
74290
74420
  yargs.getInternalMethods().getUsageInstance().fail(parsed.error.message, parsed.error);
@@ -75506,31 +75636,31 @@ ${customMsgs.join("\n")}` : "";
75506
75636
  // ../../node_modules/.pnpm/yargs@17.7.1/node_modules/yargs/build/lib/utils/apply-extends.js
75507
75637
  var previouslyVisitedConfigs = [];
75508
75638
  var shim2;
75509
- function applyExtends(config13, cwd, mergeExtends, _shim) {
75639
+ function applyExtends(config14, cwd, mergeExtends, _shim) {
75510
75640
  shim2 = _shim;
75511
75641
  let defaultConfig = {};
75512
- if (Object.prototype.hasOwnProperty.call(config13, "extends")) {
75513
- if (typeof config13.extends !== "string")
75642
+ if (Object.prototype.hasOwnProperty.call(config14, "extends")) {
75643
+ if (typeof config14.extends !== "string")
75514
75644
  return defaultConfig;
75515
- const isPath = /\.json|\..*rc$/.test(config13.extends);
75645
+ const isPath = /\.json|\..*rc$/.test(config14.extends);
75516
75646
  let pathToDefault = null;
75517
75647
  if (!isPath) {
75518
75648
  try {
75519
- pathToDefault = require.resolve(config13.extends);
75649
+ pathToDefault = require.resolve(config14.extends);
75520
75650
  } catch (_err) {
75521
- return config13;
75651
+ return config14;
75522
75652
  }
75523
75653
  } else {
75524
- pathToDefault = getPathToDefaultConfig(cwd, config13.extends);
75654
+ pathToDefault = getPathToDefaultConfig(cwd, config14.extends);
75525
75655
  }
75526
75656
  checkForCircularExtends(pathToDefault);
75527
75657
  previouslyVisitedConfigs.push(pathToDefault);
75528
- defaultConfig = isPath ? JSON.parse(shim2.readFileSync(pathToDefault, "utf8")) : require(config13.extends);
75529
- delete config13.extends;
75658
+ defaultConfig = isPath ? JSON.parse(shim2.readFileSync(pathToDefault, "utf8")) : require(config14.extends);
75659
+ delete config14.extends;
75530
75660
  defaultConfig = applyExtends(defaultConfig, shim2.path.dirname(pathToDefault), mergeExtends, shim2);
75531
75661
  }
75532
75662
  previouslyVisitedConfigs = [];
75533
- return mergeExtends ? mergeDeep(defaultConfig, config13) : Object.assign({}, defaultConfig, config13);
75663
+ return mergeExtends ? mergeDeep(defaultConfig, config14) : Object.assign({}, defaultConfig, config14);
75534
75664
  }
75535
75665
  function checkForCircularExtends(cfgPath) {
75536
75666
  if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) {
@@ -76311,9 +76441,9 @@ var YargsInstance = class {
76311
76441
  }
76312
76442
  return maybePromise;
76313
76443
  }
76314
- parserConfiguration(config13) {
76315
- argsert("<object>", [config13], arguments.length);
76316
- __classPrivateFieldSet(this, _YargsInstance_parserConfig, config13, "f");
76444
+ parserConfiguration(config14) {
76445
+ argsert("<object>", [config14], arguments.length);
76446
+ __classPrivateFieldSet(this, _YargsInstance_parserConfig, config14, "f");
76317
76447
  return this;
76318
76448
  }
76319
76449
  pkgConf(key, rootPath) {
@@ -76485,9 +76615,9 @@ var YargsInstance = class {
76485
76615
  return this;
76486
76616
  }
76487
76617
  }
76488
- usageConfiguration(config13) {
76489
- argsert("<object>", [config13], arguments.length);
76490
- __classPrivateFieldSet(this, _YargsInstance_usageConfig, config13, "f");
76618
+ usageConfiguration(config14) {
76619
+ argsert("<object>", [config14], arguments.length);
76620
+ __classPrivateFieldSet(this, _YargsInstance_usageConfig, config14, "f");
76491
76621
  return this;
76492
76622
  }
76493
76623
  version(opt, msg, ver) {
@@ -76893,11 +77023,11 @@ var YargsInstance = class {
76893
77023
  __classPrivateFieldGet(this, _YargsInstance_options, "f").__ = __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.__;
76894
77024
  __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration = this[kGetParserConfiguration]();
76895
77025
  const populateDoubleDash = !!__classPrivateFieldGet(this, _YargsInstance_options, "f").configuration["populate--"];
76896
- const config13 = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration, {
77026
+ const config14 = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration, {
76897
77027
  "populate--": true
76898
77028
  });
76899
77029
  const parsed = __classPrivateFieldGet(this, _YargsInstance_shim, "f").Parser.detailed(args, Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f"), {
76900
- configuration: { "parse-positional-numbers": false, ...config13 }
77030
+ configuration: { "parse-positional-numbers": false, ...config14 }
76901
77031
  }));
76902
77032
  const argv = Object.assign(parsed.argv, __classPrivateFieldGet(this, _YargsInstance_parseContext, "f"));
76903
77033
  let argvPromise = void 0;
@@ -77334,15 +77464,15 @@ var showHelp = ({
77334
77464
  options,
77335
77465
  intro
77336
77466
  }) => {
77337
- const { name: pm2 } = detectPackageManager();
77467
+ const { name: pm3 } = detectPackageManager();
77338
77468
  logRaw(`${brandColor("create-cloudflare")} ${dim("v" + version)}
77339
77469
  `);
77340
77470
  indent(`${intro.trim()}
77341
77471
  `, 1);
77342
77472
  logRaw(bold("USAGE\n"));
77343
- const latest = pm2 === "yarn" ? "" : "@latest";
77344
- const opts = pm2 === "npm" ? "-- options" : "options";
77345
- 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}]
77346
77476
  `, 1);
77347
77477
  logRaw(bold("OPTIONS\n"));
77348
77478
  renderPositionals(positionals);
@@ -77471,6 +77601,7 @@ var cliDefinition = {
77471
77601
  pnpm create clouldfare --framework next -- --ts
77472
77602
  `,
77473
77603
  values: [
77604
+ { name: "analog" },
77474
77605
  { name: "angular" },
77475
77606
  { name: "astro" },
77476
77607
  { name: "docusaurus" },
@@ -77671,7 +77802,7 @@ init_command();
77671
77802
  init_packageManagers();
77672
77803
 
77673
77804
  // ../wrangler/package.json
77674
- var version2 = "3.44.0";
77805
+ var version2 = "3.51.0";
77675
77806
 
77676
77807
  // src/git.ts
77677
77808
  init_package();
@@ -78966,7 +79097,7 @@ var writeWranglerToml = (ctx, contents) => {
78966
79097
 
78967
79098
  // src/deploy.ts
78968
79099
  var offerToDeploy = async (ctx) => {
78969
- const { npm: npm13 } = detectPackageManager();
79100
+ const { npm: npm14 } = detectPackageManager();
78970
79101
  startSection(`Deploy with Cloudflare`, `Step 3 of 3`);
78971
79102
  if (!await isDeployable(ctx)) {
78972
79103
  ctx.args.deploy = false;
@@ -78977,7 +79108,7 @@ var offerToDeploy = async (ctx) => {
78977
79108
  );
78978
79109
  }
78979
79110
  const label = `deploy via \`${quoteShellArgs([
78980
- npm13,
79111
+ npm14,
78981
79112
  "run",
78982
79113
  ctx.template.deployScript ?? "deploy"
78983
79114
  ])}\``;
@@ -79008,18 +79139,18 @@ var isDeployable = async (ctx) => {
79008
79139
  return true;
79009
79140
  };
79010
79141
  var runDeploy = async (ctx) => {
79011
- const { npm: npm13, name: pm2 } = detectPackageManager();
79142
+ const { npm: npm14, name: pm3 } = detectPackageManager();
79012
79143
  if (!ctx.account?.id) {
79013
79144
  crash("Failed to read Cloudflare account.");
79014
79145
  return;
79015
79146
  }
79016
- const baseDeployCmd = [npm13, "run", ctx.template.deployScript ?? "deploy"];
79147
+ const baseDeployCmd = [npm14, "run", ctx.template.deployScript ?? "deploy"];
79017
79148
  const insideGitRepo = await isInsideGitRepo(ctx.project.path);
79018
79149
  const deployCmd = [
79019
79150
  ...baseDeployCmd,
79020
79151
  // Important: the following assumes that all framework deploy commands terminate with `wrangler pages deploy`
79021
79152
  ...ctx.template.platform === "pages" && ctx.commitMessage && !insideGitRepo ? [
79022
- ...pm2 === "npm" ? ["--"] : [],
79153
+ ...pm3 === "npm" ? ["--"] : [],
79023
79154
  "--commit-message",
79024
79155
  JSON.stringify(ctx.commitMessage)
79025
79156
  ] : []
@@ -79027,7 +79158,10 @@ var runDeploy = async (ctx) => {
79027
79158
  const result = await runCommand(deployCmd, {
79028
79159
  silent: true,
79029
79160
  cwd: ctx.project.path,
79030
- env: { CLOUDFLARE_ACCOUNT_ID: ctx.account.id, NODE_ENV: "production" },
79161
+ env: {
79162
+ CLOUDFLARE_ACCOUNT_ID: ctx.account.id,
79163
+ NODE_ENV: "production"
79164
+ },
79031
79165
  startText: "Deploying your application",
79032
79166
  doneText: `${brandColor("deployed")} ${dim(
79033
79167
  `via \`${quoteShellArgs(baseDeployCmd)}\``
@@ -79054,8 +79188,8 @@ init_command();
79054
79188
  init_packageManagers();
79055
79189
 
79056
79190
  // src/helpers/retry.ts
79057
- var retry = async (config13, fn) => {
79058
- let { times } = config13;
79191
+ var retry = async (config14, fn) => {
79192
+ let { times } = config14;
79059
79193
  let error2 = null;
79060
79194
  while (times > 0) {
79061
79195
  try {
@@ -79063,7 +79197,7 @@ var retry = async (config13, fn) => {
79063
79197
  } catch (e) {
79064
79198
  error2 = e;
79065
79199
  times--;
79066
- if (config13.exitCondition?.(e)) {
79200
+ if (config14.exitCondition?.(e)) {
79067
79201
  break;
79068
79202
  }
79069
79203
  }
@@ -79252,23 +79386,23 @@ function secondsSince(start) {
79252
79386
 
79253
79387
  // src/summary.ts
79254
79388
  var printSummary = async (ctx) => {
79255
- const { npm: npm13 } = detectPackageManager();
79389
+ const { npm: npm14 } = detectPackageManager();
79256
79390
  const dirRelativePath = (0, import_path10.relative)(ctx.originalCWD, ctx.project.path);
79257
79391
  const nextSteps = [
79258
79392
  dirRelativePath ? ["Navigate to the new directory", `cd ${dirRelativePath}`] : [],
79259
79393
  [
79260
79394
  "Run the development server",
79261
- quoteShellArgs([npm13, "run", ctx.template.devScript ?? "start"])
79395
+ quoteShellArgs([npm14, "run", ctx.template.devScript ?? "start"])
79262
79396
  ],
79263
79397
  ...ctx.template.previewScript ? [
79264
79398
  [
79265
79399
  "Preview your application",
79266
- quoteShellArgs([npm13, "run", ctx.template.previewScript])
79400
+ quoteShellArgs([npm14, "run", ctx.template.previewScript])
79267
79401
  ]
79268
79402
  ] : [],
79269
79403
  [
79270
79404
  "Deploy your application",
79271
- quoteShellArgs([npm13, "run", ctx.template.deployScript ?? "deploy"])
79405
+ quoteShellArgs([npm14, "run", ctx.template.deployScript ?? "deploy"])
79272
79406
  ],
79273
79407
  [
79274
79408
  "Read the documentation",
@@ -79290,7 +79424,7 @@ var printSummary = async (ctx) => {
79290
79424
  `${bgGreen(" APPLICATION CREATED ")}`,
79291
79425
  `${dim("Deploy your application with")}`,
79292
79426
  `${blue(
79293
- quoteShellArgs([npm13, "run", ctx.template.deployScript ?? "deploy"])
79427
+ quoteShellArgs([npm14, "run", ctx.template.deployScript ?? "deploy"])
79294
79428
  )}`
79295
79429
  ].join(" ");
79296
79430
  logRaw(msg);
@@ -80634,14 +80768,14 @@ function applyEdits(text, edits) {
80634
80768
 
80635
80769
  // src/workers.ts
80636
80770
  async function installWorkersTypes(ctx) {
80637
- const { npm: npm13 } = detectPackageManager();
80771
+ const { npm: npm14 } = detectPackageManager();
80638
80772
  if (!usesTypescript(ctx)) {
80639
80773
  return;
80640
80774
  }
80641
80775
  await installPackages(["@cloudflare/workers-types"], {
80642
80776
  dev: true,
80643
80777
  startText: "Installing @cloudflare/workers-types",
80644
- doneText: `${brandColor("installed")} ${dim(`via ${npm13}`)}`
80778
+ doneText: `${brandColor("installed")} ${dim(`via ${npm14}`)}`
80645
80779
  });
80646
80780
  await addWorkersTypesToTsConfig(ctx);
80647
80781
  }
@@ -80664,8 +80798,8 @@ async function addWorkersTypesToTsConfig(ctx) {
80664
80798
  }
80665
80799
  const typesEntrypoint = `@cloudflare/workers-types/${entrypointVersion}`;
80666
80800
  try {
80667
- const config13 = parse3(tsconfig);
80668
- const currentTypes = config13.compilerOptions?.types ?? [];
80801
+ const config14 = parse3(tsconfig);
80802
+ const currentTypes = config14.compilerOptions?.types ?? [];
80669
80803
  const explicitEntrypoint = currentTypes.some(
80670
80804
  (t) => t.match(/@cloudflare\/workers-types\/\d{4}-\d{2}-\d{2}/)
80671
80805
  );
@@ -80695,7 +80829,7 @@ async function addWorkersTypesToTsConfig(ctx) {
80695
80829
  }
80696
80830
 
80697
80831
  // src/cli.ts
80698
- var { npm: npm12 } = detectPackageManager();
80832
+ var { npm: npm13 } = detectPackageManager();
80699
80833
  var main = async (argv) => {
80700
80834
  const args = await parseArgs(argv);
80701
80835
  logRaw("");
@@ -80707,10 +80841,10 @@ var main = async (argv) => {
80707
80841
  };
80708
80842
  var runLatest = async () => {
80709
80843
  const args = process.argv.slice(2);
80710
- if (npm12 === "npm") {
80844
+ if (npm13 === "npm") {
80711
80845
  args.unshift("--");
80712
80846
  }
80713
- await runCommand([npm12, "create", "cloudflare@latest", ...args]);
80847
+ await runCommand([npm13, "create", "cloudflare@latest", ...args]);
80714
80848
  };
80715
80849
  var runCli = async (args) => {
80716
80850
  printBanner();
@@ -80755,7 +80889,7 @@ var setupProjectDirectory = (args) => {
80755
80889
  };
80756
80890
  var runTemplate = async (ctx) => {
80757
80891
  await create(ctx);
80758
- await configure9(ctx);
80892
+ await configure10(ctx);
80759
80893
  await deploy(ctx);
80760
80894
  await printSummary(ctx);
80761
80895
  };
@@ -80771,7 +80905,7 @@ var create = async (ctx) => {
80771
80905
  await rectifyPmMismatch(ctx);
80772
80906
  endSection(`Application created`);
80773
80907
  };
80774
- var configure9 = async (ctx) => {
80908
+ var configure10 = async (ctx) => {
80775
80909
  startSection("Configuring your application for Cloudflare", "Step 2 of 3");
80776
80910
  await installWrangler();
80777
80911
  await installWorkersTypes(ctx);