storybook 9.0.0-alpha.2 → 9.0.0-alpha.20

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 (159) hide show
  1. package/README.md +1 -1
  2. package/assets/docs/addon-backgrounds.gif +0 -0
  3. package/assets/docs/addon-controls-args-annotated.png +0 -0
  4. package/assets/docs/addon-controls-args-background-color.png +0 -0
  5. package/assets/docs/addon-controls-args-background-string.png +0 -0
  6. package/assets/docs/addon-controls-args-docs.png +0 -0
  7. package/assets/docs/addon-controls-args-logging.png +0 -0
  8. package/assets/docs/addon-controls-args-no-annotation.png +0 -0
  9. package/assets/docs/addon-controls-args-reflow-slider.png +0 -0
  10. package/assets/docs/addon-controls-args-reflow.png +0 -0
  11. package/assets/docs/addon-controls-args-template.png +0 -0
  12. package/assets/docs/addon-controls-expanded.png +0 -0
  13. package/assets/docs/addon-controls-hero.gif +0 -0
  14. package/assets/docs/addon-controls-install.png +0 -0
  15. package/assets/docs/hero.gif +0 -0
  16. package/assets/docs/highlight.png +0 -0
  17. package/assets/docs/viewport.png +0 -0
  18. package/bin/index.cjs +2 -2
  19. package/dist/actions/decorator.d.ts +6 -0
  20. package/dist/actions/decorator.js +138 -0
  21. package/dist/actions/index.cjs +126 -0
  22. package/dist/actions/index.d.ts +102 -0
  23. package/dist/actions/index.js +111 -0
  24. package/dist/actions/preview.cjs +164 -0
  25. package/dist/actions/preview.d.ts +54 -0
  26. package/dist/actions/preview.js +155 -0
  27. package/dist/backgrounds/index.cjs +148 -0
  28. package/dist/backgrounds/index.d.ts +91 -0
  29. package/dist/backgrounds/index.js +130 -0
  30. package/dist/backgrounds/preview.cjs +143 -0
  31. package/dist/backgrounds/preview.d.ts +54 -0
  32. package/dist/backgrounds/preview.js +127 -0
  33. package/dist/bin/index.cjs +66 -89
  34. package/dist/bin/index.js +62 -85
  35. package/dist/builder-manager/index.cjs +523 -540
  36. package/dist/builder-manager/index.js +544 -561
  37. package/dist/channels/index.cjs +1026 -981
  38. package/dist/channels/index.js +1194 -1165
  39. package/dist/cli/bin/index.cjs +483 -483
  40. package/dist/cli/bin/index.js +495 -495
  41. package/dist/cli/index.cjs +2279 -2295
  42. package/dist/cli/index.d.ts +4 -8
  43. package/dist/cli/index.js +740 -756
  44. package/dist/client-logger/index.cjs +56 -88
  45. package/dist/client-logger/index.js +41 -47
  46. package/dist/common/index.cjs +2496 -2480
  47. package/dist/common/index.d.ts +5 -29
  48. package/dist/common/index.js +2679 -2663
  49. package/dist/component-testing/index.cjs +23 -0
  50. package/dist/component-testing/index.d.ts +3 -0
  51. package/dist/component-testing/index.js +5 -0
  52. package/dist/component-testing/preview.cjs +40 -0
  53. package/dist/component-testing/preview.d.ts +5 -0
  54. package/dist/component-testing/preview.js +25 -0
  55. package/dist/components/index.cjs +11709 -20418
  56. package/dist/components/index.d.ts +94 -346
  57. package/dist/components/index.js +5827 -19157
  58. package/dist/controls/decorator.d.ts +5 -0
  59. package/dist/controls/decorator.js +8 -0
  60. package/dist/controls/index.cjs +26 -0
  61. package/dist/controls/index.d.ts +39 -0
  62. package/dist/controls/index.js +6 -0
  63. package/dist/controls/preview.cjs +26 -0
  64. package/dist/controls/preview.d.ts +54 -0
  65. package/dist/controls/preview.js +9 -0
  66. package/dist/core-events/index.cjs +91 -106
  67. package/dist/core-events/index.d.ts +139 -104
  68. package/dist/core-events/index.js +79 -94
  69. package/dist/core-server/index.cjs +14413 -13924
  70. package/dist/core-server/index.d.ts +270 -3
  71. package/dist/core-server/index.js +14003 -13519
  72. package/dist/core-server/presets/common-manager.css +170 -0
  73. package/dist/core-server/presets/common-manager.js +12099 -17
  74. package/dist/core-server/presets/common-preset.cjs +2760 -2914
  75. package/dist/core-server/presets/common-preset.js +2852 -3007
  76. package/dist/csf/index.cjs +76 -120
  77. package/dist/csf/index.d.ts +2 -6
  78. package/dist/csf/index.js +69 -113
  79. package/dist/csf-tools/index.cjs +412 -403
  80. package/dist/csf-tools/index.d.ts +0 -4
  81. package/dist/csf-tools/index.js +410 -401
  82. package/dist/docs-tools/index.cjs +2569 -575
  83. package/dist/docs-tools/index.d.ts +2 -2
  84. package/dist/docs-tools/index.js +2557 -564
  85. package/dist/highlight/index.cjs +27 -0
  86. package/dist/highlight/index.d.ts +17 -0
  87. package/dist/highlight/index.js +7 -0
  88. package/dist/highlight/preview.cjs +81 -0
  89. package/dist/highlight/preview.d.ts +54 -0
  90. package/dist/highlight/preview.js +67 -0
  91. package/dist/instrumenter/index.cjs +2207 -2342
  92. package/dist/instrumenter/index.d.ts +8 -7
  93. package/dist/instrumenter/index.js +2438 -2620
  94. package/dist/manager/globals-module-info.cjs +290 -151
  95. package/dist/manager/globals-module-info.d.ts +1 -1
  96. package/dist/manager/globals-module-info.js +274 -135
  97. package/dist/manager/globals-runtime.js +60016 -28331
  98. package/dist/manager/globals.cjs +23 -19
  99. package/dist/manager/globals.d.ts +8 -5
  100. package/dist/manager/globals.js +10 -6
  101. package/dist/manager/runtime.js +4645 -3946
  102. package/dist/manager-api/index.cjs +4228 -3833
  103. package/dist/manager-api/index.d.ts +398 -102
  104. package/dist/manager-api/index.js +3676 -3291
  105. package/dist/manager-errors.d.ts +25 -1
  106. package/dist/manager-errors.js +42 -26
  107. package/dist/measure/index.cjs +474 -0
  108. package/dist/measure/index.d.ts +66 -0
  109. package/dist/measure/index.js +462 -0
  110. package/dist/measure/preview.cjs +464 -0
  111. package/dist/measure/preview.d.ts +59 -0
  112. package/dist/measure/preview.js +448 -0
  113. package/dist/outline/index.cjs +528 -0
  114. package/dist/outline/index.d.ts +66 -0
  115. package/dist/outline/index.js +500 -0
  116. package/dist/outline/preview.cjs +518 -0
  117. package/dist/outline/preview.d.ts +59 -0
  118. package/dist/outline/preview.js +486 -0
  119. package/dist/preview/globals.cjs +21 -17
  120. package/dist/preview/globals.d.ts +4 -1
  121. package/dist/preview/globals.js +6 -2
  122. package/dist/preview/runtime.js +45697 -6618
  123. package/dist/preview-api/index.cjs +1363 -1898
  124. package/dist/preview-api/index.d.ts +449 -498
  125. package/dist/preview-api/index.js +1622 -2095
  126. package/dist/preview-errors.cjs +99 -82
  127. package/dist/preview-errors.d.ts +25 -1
  128. package/dist/preview-errors.js +110 -94
  129. package/dist/router/index.cjs +847 -871
  130. package/dist/router/index.js +193 -199
  131. package/dist/server-errors.cjs +156 -125
  132. package/dist/server-errors.d.ts +28 -2
  133. package/dist/server-errors.js +150 -119
  134. package/dist/telemetry/index.cjs +1050 -1977
  135. package/dist/telemetry/index.d.ts +26 -5
  136. package/dist/telemetry/index.js +1085 -2008
  137. package/dist/test/index.cjs +35686 -0
  138. package/dist/test/index.d.ts +186 -0
  139. package/dist/test/index.js +33752 -0
  140. package/dist/test/preview.cjs +15870 -0
  141. package/dist/test/preview.d.ts +54 -0
  142. package/dist/test/preview.js +14441 -0
  143. package/dist/test/spy.cjs +258 -0
  144. package/dist/test/spy.d.ts +66 -0
  145. package/dist/test/spy.js +240 -0
  146. package/dist/theming/create.cjs +79 -2269
  147. package/dist/theming/create.js +67 -841
  148. package/dist/theming/index.cjs +1065 -3232
  149. package/dist/theming/index.js +951 -1719
  150. package/dist/types/index.cjs +11 -12
  151. package/dist/types/index.d.ts +612 -157
  152. package/dist/types/index.js +1 -2
  153. package/dist/viewport/index.cjs +310 -0
  154. package/dist/viewport/index.d.ts +320 -0
  155. package/dist/viewport/index.js +290 -0
  156. package/dist/viewport/preview.cjs +35 -0
  157. package/dist/viewport/preview.d.ts +68 -0
  158. package/dist/viewport/preview.js +19 -0
  159. package/package.json +359 -12
@@ -4,28 +4,28 @@ var L = Object.defineProperty;
4
4
  var Le = Object.getOwnPropertyDescriptor;
5
5
  var We = Object.getOwnPropertyNames;
6
6
  var Re = Object.getPrototypeOf, Ge = Object.prototype.hasOwnProperty;
7
- var c = (s, e) => L(s, "name", { value: e, configurable: !0 });
8
- var b = (s, e) => () => (e || s((e = { exports: {} }).exports, e), e.exports);
9
- var Ue = (s, e, t, i) => {
7
+ var l = (n, e) => L(n, "name", { value: e, configurable: !0 });
8
+ var b = (n, e) => () => (e || n((e = { exports: {} }).exports, e), e.exports);
9
+ var Ue = (n, e, t, i) => {
10
10
  if (e && typeof e == "object" || typeof e == "function")
11
- for (let n of We(e))
12
- !Ge.call(s, n) && n !== t && L(s, n, { get: () => e[n], enumerable: !(i = Le(e, n)) || i.enumerable });
13
- return s;
11
+ for (let s of We(e))
12
+ !Ge.call(n, s) && s !== t && L(n, s, { get: () => e[s], enumerable: !(i = Le(e, s)) || i.enumerable });
13
+ return n;
14
14
  };
15
- var $ = (s, e, t) => (t = s != null ? Me(Re(s)) : {}, Ue(
15
+ var q = (n, e, t) => (t = n != null ? Me(Re(n)) : {}, Ue(
16
16
  // If the importer is in node compatibility mode or this is not an ESM
17
17
  // file that has been converted to a CommonJS file using a Babel-
18
18
  // compatible transform (i.e. "__esModule" has not been set), then set
19
19
  // "default" to the CommonJS "module.exports" for node compatibility.
20
- e || !s || !s.__esModule ? L(t, "default", { value: s, enumerable: !0 }) : t,
21
- s
20
+ e || !n || !n.__esModule ? L(t, "default", { value: n, enumerable: !0 }) : t,
21
+ n
22
22
  ));
23
23
 
24
24
  // ../node_modules/commander/lib/error.js
25
- var k = b((R) => {
26
- var V = class extends Error {
25
+ var j = b((R) => {
26
+ var $ = class extends Error {
27
27
  static {
28
- c(this, "CommanderError");
28
+ l(this, "CommanderError");
29
29
  }
30
30
  /**
31
31
  * Constructs the CommanderError class
@@ -37,9 +37,9 @@ var k = b((R) => {
37
37
  super(i), Error.captureStackTrace(this, this.constructor), this.name = this.constructor.name, this.code = t, this.exitCode = e, this.nestedError =
38
38
  void 0;
39
39
  }
40
- }, W = class extends V {
40
+ }, W = class extends $ {
41
41
  static {
42
- c(this, "InvalidArgumentError");
42
+ l(this, "InvalidArgumentError");
43
43
  }
44
44
  /**
45
45
  * Constructs the InvalidArgumentError class
@@ -49,15 +49,15 @@ var k = b((R) => {
49
49
  super(1, "commander.invalidArgument", e), Error.captureStackTrace(this, this.constructor), this.name = this.constructor.name;
50
50
  }
51
51
  };
52
- R.CommanderError = V;
52
+ R.CommanderError = $;
53
53
  R.InvalidArgumentError = W;
54
54
  });
55
55
 
56
56
  // ../node_modules/commander/lib/argument.js
57
- var H = b((U) => {
58
- var { InvalidArgumentError: Je } = k(), G = class {
57
+ var V = b((U) => {
58
+ var { InvalidArgumentError: Je } = j(), G = class {
59
59
  static {
60
- c(this, "Argument");
60
+ l(this, "Argument");
61
61
  }
62
62
  /**
63
63
  * Initialize a new command argument with the given name and description.
@@ -147,20 +147,20 @@ var H = b((U) => {
147
147
  return this.required = !1, this;
148
148
  }
149
149
  };
150
- function Ye(s) {
151
- let e = s.name() + (s.variadic === !0 ? "..." : "");
152
- return s.required ? "<" + e + ">" : "[" + e + "]";
150
+ function Ye(n) {
151
+ let e = n.name() + (n.variadic === !0 ? "..." : "");
152
+ return n.required ? "<" + e + ">" : "[" + e + "]";
153
153
  }
154
- c(Ye, "humanReadableArgName");
154
+ l(Ye, "humanReadableArgName");
155
155
  U.Argument = G;
156
156
  U.humanReadableArgName = Ye;
157
157
  });
158
158
 
159
159
  // ../node_modules/commander/lib/help.js
160
- var Y = b((ue) => {
161
- var { humanReadableArgName: ze } = H(), J = class {
160
+ var Y = b((ce) => {
161
+ var { humanReadableArgName: ze } = V(), J = class {
162
162
  static {
163
- c(this, "Help");
163
+ l(this, "Help");
164
164
  }
165
165
  constructor() {
166
166
  this.helpWidth = void 0, this.sortSubcommands = !1, this.sortOptions = !1, this.showGlobalOptions = !1;
@@ -172,8 +172,8 @@ var Y = b((ue) => {
172
172
  * @returns {Command[]}
173
173
  */
174
174
  visibleCommands(e) {
175
- let t = e.commands.filter((n) => !n._hidden), i = e._getHelpCommand();
176
- return i && !i._hidden && t.push(i), this.sortSubcommands && t.sort((n, r) => n.name().localeCompare(r.name())), t;
175
+ let t = e.commands.filter((s) => !s._hidden), i = e._getHelpCommand();
176
+ return i && !i._hidden && t.push(i), this.sortSubcommands && t.sort((s, r) => s.name().localeCompare(r.name())), t;
177
177
  }
178
178
  /**
179
179
  * Compare options for sort.
@@ -183,7 +183,7 @@ var Y = b((ue) => {
183
183
  * @returns {number}
184
184
  */
185
185
  compareOptions(e, t) {
186
- let i = /* @__PURE__ */ c((n) => n.short ? n.short.replace(/^-/, "") : n.long.replace(/^--/, ""), "getSortKey");
186
+ let i = /* @__PURE__ */ l((s) => s.short ? s.short.replace(/^-/, "") : s.long.replace(/^--/, ""), "getSortKey");
187
187
  return i(e).localeCompare(i(t));
188
188
  }
189
189
  /**
@@ -193,12 +193,12 @@ var Y = b((ue) => {
193
193
  * @returns {Option[]}
194
194
  */
195
195
  visibleOptions(e) {
196
- let t = e.options.filter((n) => !n.hidden), i = e._getHelpOption();
196
+ let t = e.options.filter((s) => !s.hidden), i = e._getHelpOption();
197
197
  if (i && !i.hidden) {
198
- let n = i.short && e._findOption(i.short), r = i.long && e._findOption(i.long);
199
- !n && !r ? t.push(i) : i.long && !r ? t.push(
198
+ let s = i.short && e._findOption(i.short), r = i.long && e._findOption(i.long);
199
+ !s && !r ? t.push(i) : i.long && !r ? t.push(
200
200
  e.createOption(i.long, i.description)
201
- ) : i.short && !n && t.push(
201
+ ) : i.short && !s && t.push(
202
202
  e.createOption(i.short, i.description)
203
203
  );
204
204
  }
@@ -214,10 +214,10 @@ var Y = b((ue) => {
214
214
  if (!this.showGlobalOptions) return [];
215
215
  let t = [];
216
216
  for (let i = e.parent; i; i = i.parent) {
217
- let n = i.options.filter(
217
+ let s = i.options.filter(
218
218
  (r) => !r.hidden
219
219
  );
220
- t.push(...n);
220
+ t.push(...s);
221
221
  }
222
222
  return this.sortOptions && t.sort(this.compareOptions), t;
223
223
  }
@@ -269,7 +269,7 @@ var Y = b((ue) => {
269
269
  * @returns {number}
270
270
  */
271
271
  longestSubcommandTermLength(e, t) {
272
- return t.visibleCommands(e).reduce((i, n) => Math.max(i, t.subcommandTerm(n).length), 0);
272
+ return t.visibleCommands(e).reduce((i, s) => Math.max(i, t.subcommandTerm(s).length), 0);
273
273
  }
274
274
  /**
275
275
  * Get the longest option term length.
@@ -279,7 +279,7 @@ var Y = b((ue) => {
279
279
  * @returns {number}
280
280
  */
281
281
  longestOptionTermLength(e, t) {
282
- return t.visibleOptions(e).reduce((i, n) => Math.max(i, t.optionTerm(n).length), 0);
282
+ return t.visibleOptions(e).reduce((i, s) => Math.max(i, t.optionTerm(s).length), 0);
283
283
  }
284
284
  /**
285
285
  * Get the longest global option term length.
@@ -289,7 +289,7 @@ var Y = b((ue) => {
289
289
  * @returns {number}
290
290
  */
291
291
  longestGlobalOptionTermLength(e, t) {
292
- return t.visibleGlobalOptions(e).reduce((i, n) => Math.max(i, t.optionTerm(n).length), 0);
292
+ return t.visibleGlobalOptions(e).reduce((i, s) => Math.max(i, t.optionTerm(s).length), 0);
293
293
  }
294
294
  /**
295
295
  * Get the longest argument term length.
@@ -299,7 +299,7 @@ var Y = b((ue) => {
299
299
  * @returns {number}
300
300
  */
301
301
  longestArgumentTermLength(e, t) {
302
- return t.visibleArguments(e).reduce((i, n) => Math.max(i, t.argumentTerm(n).length), 0);
302
+ return t.visibleArguments(e).reduce((i, s) => Math.max(i, t.argumentTerm(s).length), 0);
303
303
  }
304
304
  /**
305
305
  * Get the command usage to be displayed at the top of the built-in help.
@@ -311,8 +311,8 @@ var Y = b((ue) => {
311
311
  let t = e._name;
312
312
  e._aliases[0] && (t = t + "|" + e._aliases[0]);
313
313
  let i = "";
314
- for (let n = e.parent; n; n = n.parent)
315
- i = n.name() + " " + i;
314
+ for (let s = e.parent; s; s = s.parent)
315
+ i = s.name() + " " + i;
316
316
  return i + t + " " + e.usage();
317
317
  }
318
318
  /**
@@ -377,54 +377,54 @@ var Y = b((ue) => {
377
377
  * @returns {string}
378
378
  */
379
379
  formatHelp(e, t) {
380
- let i = t.padWidth(e, t), n = t.helpWidth || 80, r = 2, o = 2;
381
- function l(f, v) {
382
- if (v) {
383
- let M = `${f.padEnd(i + o)}${v}`;
380
+ let i = t.padWidth(e, t), s = t.helpWidth || 80, r = 2, o = 2;
381
+ function d(g, w) {
382
+ if (w) {
383
+ let M = `${g.padEnd(i + o)}${w}`;
384
384
  return t.wrap(
385
385
  M,
386
- n - r,
386
+ s - r,
387
387
  i + o
388
388
  );
389
389
  }
390
- return f;
390
+ return g;
391
391
  }
392
- c(l, "formatItem");
393
- function a(f) {
394
- return f.join(`
392
+ l(d, "formatItem");
393
+ function a(g) {
394
+ return g.join(`
395
395
  `).replace(/^/gm, " ".repeat(r));
396
396
  }
397
- c(a, "formatList");
398
- let u = [`Usage: ${t.commandUsage(e)}`, ""], d = t.commandDescription(e);
399
- d.length > 0 && (u = u.concat([
400
- t.wrap(d, n, 0),
397
+ l(a, "formatList");
398
+ let c = [`Usage: ${t.commandUsage(e)}`, ""], u = t.commandDescription(e);
399
+ u.length > 0 && (c = c.concat([
400
+ t.wrap(u, s, 0),
401
401
  ""
402
402
  ]));
403
- let h = t.visibleArguments(e).map((f) => l(
404
- t.argumentTerm(f),
405
- t.argumentDescription(f)
403
+ let p = t.visibleArguments(e).map((g) => d(
404
+ t.argumentTerm(g),
405
+ t.argumentDescription(g)
406
406
  ));
407
- h.length > 0 && (u = u.concat(["Arguments:", a(h), ""]));
408
- let m = t.visibleOptions(e).map((f) => l(
409
- t.optionTerm(f),
410
- t.optionDescription(f)
407
+ p.length > 0 && (c = c.concat(["Arguments:", a(p), ""]));
408
+ let m = t.visibleOptions(e).map((g) => d(
409
+ t.optionTerm(g),
410
+ t.optionDescription(g)
411
411
  ));
412
- if (m.length > 0 && (u = u.concat(["Options:", a(m), ""])), this.showGlobalOptions) {
413
- let f = t.visibleGlobalOptions(e).map((v) => l(
414
- t.optionTerm(v),
415
- t.optionDescription(v)
412
+ if (m.length > 0 && (c = c.concat(["Options:", a(m), ""])), this.showGlobalOptions) {
413
+ let g = t.visibleGlobalOptions(e).map((w) => d(
414
+ t.optionTerm(w),
415
+ t.optionDescription(w)
416
416
  ));
417
- f.length > 0 && (u = u.concat([
417
+ g.length > 0 && (c = c.concat([
418
418
  "Global Options:",
419
- a(f),
419
+ a(g),
420
420
  ""
421
421
  ]));
422
422
  }
423
- let x = t.visibleCommands(e).map((f) => l(
424
- t.subcommandTerm(f),
425
- t.subcommandDescription(f)
423
+ let v = t.visibleCommands(e).map((g) => d(
424
+ t.subcommandTerm(g),
425
+ t.subcommandDescription(g)
426
426
  ));
427
- return x.length > 0 && (u = u.concat(["Commands:", a(x), ""])), u.join(`
427
+ return v.length > 0 && (c = c.concat(["Commands:", a(v), ""])), c.join(`
428
428
  `);
429
429
  }
430
430
  /**
@@ -453,31 +453,31 @@ var Y = b((ue) => {
453
453
  * @return {string}
454
454
  *
455
455
  */
456
- wrap(e, t, i, n = 40) {
456
+ wrap(e, t, i, s = 40) {
457
457
  let r = " \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF", o = new RegExp(`[\\n][${r}]+`);
458
458
  if (e.match(o)) return e;
459
- let l = t - i;
460
- if (l < n) return e;
461
- let a = e.slice(0, i), u = e.slice(i).replace(`\r
459
+ let d = t - i;
460
+ if (d < s) return e;
461
+ let a = e.slice(0, i), c = e.slice(i).replace(`\r
462
462
  `, `
463
- `), d = " ".repeat(i), m = "\\s\u200B", x = new RegExp(
463
+ `), u = " ".repeat(i), m = "\\s\u200B", v = new RegExp(
464
464
  `
465
- |.{1,${l - 1}}([${m}]|$)|[^${m}]+?([${m}]|$)`,
465
+ |.{1,${d - 1}}([${m}]|$)|[^${m}]+?([${m}]|$)`,
466
466
  "g"
467
- ), f = u.match(x) || [];
468
- return a + f.map((v, M) => v === `
469
- ` ? "" : (M > 0 ? d : "") + v.trimEnd()).join(`
467
+ ), g = c.match(v) || [];
468
+ return a + g.map((w, M) => w === `
469
+ ` ? "" : (M > 0 ? u : "") + w.trimEnd()).join(`
470
470
  `);
471
471
  }
472
472
  };
473
- ue.Help = J;
473
+ ce.Help = J;
474
474
  });
475
475
 
476
476
  // ../node_modules/commander/lib/option.js
477
477
  var X = b((Q) => {
478
- var { InvalidArgumentError: Ke } = k(), z = class {
478
+ var { InvalidArgumentError: Ke } = j(), z = class {
479
479
  static {
480
- c(this, "Option");
480
+ l(this, "Option");
481
481
  }
482
482
  /**
483
483
  * Initialize a new `Option` with the given `flags` and `description`.
@@ -648,7 +648,7 @@ var X = b((Q) => {
648
648
  }
649
649
  }, K = class {
650
650
  static {
651
- c(this, "DualOptions");
651
+ l(this, "DualOptions");
652
652
  }
653
653
  /**
654
654
  * @param {Option[]} options
@@ -671,74 +671,74 @@ var X = b((Q) => {
671
671
  valueFromOption(e, t) {
672
672
  let i = t.attributeName();
673
673
  if (!this.dualOptions.has(i)) return !0;
674
- let n = this.negativeOptions.get(i).presetArg, r = n !== void 0 ? n : !1;
674
+ let s = this.negativeOptions.get(i).presetArg, r = s !== void 0 ? s : !1;
675
675
  return t.negate === (r === e);
676
676
  }
677
677
  };
678
- function Qe(s) {
679
- return s.split("-").reduce((e, t) => e + t[0].toUpperCase() + t.slice(1));
678
+ function Qe(n) {
679
+ return n.split("-").reduce((e, t) => e + t[0].toUpperCase() + t.slice(1));
680
680
  }
681
- c(Qe, "camelcase");
682
- function Xe(s) {
683
- let e, t, i = s.split(/[ |,]+/);
681
+ l(Qe, "camelcase");
682
+ function Xe(n) {
683
+ let e, t, i = n.split(/[ |,]+/);
684
684
  return i.length > 1 && !/^[[<]/.test(i[1]) && (e = i.shift()), t = i.shift(), !e && /^-[^-]$/.test(t) && (e = t, t = void 0), { shortFlag: e,
685
685
  longFlag: t };
686
686
  }
687
- c(Xe, "splitOptionFlags");
687
+ l(Xe, "splitOptionFlags");
688
688
  Q.Option = z;
689
689
  Q.DualOptions = K;
690
690
  });
691
691
 
692
692
  // ../node_modules/commander/lib/suggestSimilar.js
693
- var he = b((de) => {
694
- function Ze(s, e) {
695
- if (Math.abs(s.length - e.length) > 3)
696
- return Math.max(s.length, e.length);
693
+ var pe = b((ue) => {
694
+ function Ze(n, e) {
695
+ if (Math.abs(n.length - e.length) > 3)
696
+ return Math.max(n.length, e.length);
697
697
  let t = [];
698
- for (let i = 0; i <= s.length; i++)
698
+ for (let i = 0; i <= n.length; i++)
699
699
  t[i] = [i];
700
700
  for (let i = 0; i <= e.length; i++)
701
701
  t[0][i] = i;
702
702
  for (let i = 1; i <= e.length; i++)
703
- for (let n = 1; n <= s.length; n++) {
703
+ for (let s = 1; s <= n.length; s++) {
704
704
  let r = 1;
705
- s[n - 1] === e[i - 1] ? r = 0 : r = 1, t[n][i] = Math.min(
706
- t[n - 1][i] + 1,
705
+ n[s - 1] === e[i - 1] ? r = 0 : r = 1, t[s][i] = Math.min(
706
+ t[s - 1][i] + 1,
707
707
  // deletion
708
- t[n][i - 1] + 1,
708
+ t[s][i - 1] + 1,
709
709
  // insertion
710
- t[n - 1][i - 1] + r
710
+ t[s - 1][i - 1] + r
711
711
  // substitution
712
- ), n > 1 && i > 1 && s[n - 1] === e[i - 2] && s[n - 2] === e[i - 1] && (t[n][i] = Math.min(t[n][i], t[n - 2][i - 2] + 1));
712
+ ), s > 1 && i > 1 && n[s - 1] === e[i - 2] && n[s - 2] === e[i - 1] && (t[s][i] = Math.min(t[s][i], t[s - 2][i - 2] + 1));
713
713
  }
714
- return t[s.length][e.length];
714
+ return t[n.length][e.length];
715
715
  }
716
- c(Ze, "editDistance");
717
- function et(s, e) {
716
+ l(Ze, "editDistance");
717
+ function et(n, e) {
718
718
  if (!e || e.length === 0) return "";
719
719
  e = Array.from(new Set(e));
720
- let t = s.startsWith("--");
721
- t && (s = s.slice(2), e = e.map((o) => o.slice(2)));
722
- let i = [], n = 3, r = 0.4;
720
+ let t = n.startsWith("--");
721
+ t && (n = n.slice(2), e = e.map((o) => o.slice(2)));
722
+ let i = [], s = 3, r = 0.4;
723
723
  return e.forEach((o) => {
724
724
  if (o.length <= 1) return;
725
- let l = Ze(s, o), a = Math.max(s.length, o.length);
726
- (a - l) / a > r && (l < n ? (n = l, i = [o]) : l === n && i.push(o));
727
- }), i.sort((o, l) => o.localeCompare(l)), t && (i = i.map((o) => `--${o}`)), i.length > 1 ? `
725
+ let d = Ze(n, o), a = Math.max(n.length, o.length);
726
+ (a - d) / a > r && (d < s ? (s = d, i = [o]) : d === s && i.push(o));
727
+ }), i.sort((o, d) => o.localeCompare(d)), t && (i = i.map((o) => `--${o}`)), i.length > 1 ? `
728
728
  (Did you mean one of ${i.join(", ")}?)` : i.length === 1 ? `
729
729
  (Did you mean ${i[0]}?)` : "";
730
730
  }
731
- c(et, "suggestSimilar");
732
- de.suggestSimilar = et;
731
+ l(et, "suggestSimilar");
732
+ ue.suggestSimilar = et;
733
733
  });
734
734
 
735
735
  // ../node_modules/commander/lib/command.js
736
- var be = b((ge) => {
737
- var tt = require("node:events").EventEmitter, Z = require("node:child_process"), y = require("node:path"), ee = require("node:fs"), p = require("node:process"),
738
- { Argument: it, humanReadableArgName: nt } = H(), { CommanderError: te } = k(), { Help: rt } = Y(), { Option: pe, DualOptions: st } = X(),
739
- { suggestSimilar: me } = he(), ie = class s extends tt {
736
+ var be = b((fe) => {
737
+ var tt = require("node:events").EventEmitter, Z = require("node:child_process"), _ = require("node:path"), ee = require("node:fs"), h = require("node:process"),
738
+ { Argument: it, humanReadableArgName: st } = V(), { CommanderError: te } = j(), { Help: rt } = Y(), { Option: he, DualOptions: nt } = X(),
739
+ { suggestSimilar: me } = pe(), ie = class n extends tt {
740
740
  static {
741
- c(this, "Command");
741
+ l(this, "Command");
742
742
  }
743
743
  /**
744
744
  * Initialize a new `Command`.
@@ -753,11 +753,11 @@ var be = b((ge) => {
753
753
  null, this._aliases = [], this._combineFlagAndOptionalValue = !0, this._description = "", this._summary = "", this._argsDescription = void 0,
754
754
  this._enablePositionalOptions = !1, this._passThroughOptions = !1, this._lifeCycleHooks = {}, this._showHelpAfterError = !1, this._showSuggestionAfterError =
755
755
  !0, this._outputConfiguration = {
756
- writeOut: /* @__PURE__ */ c((t) => p.stdout.write(t), "writeOut"),
757
- writeErr: /* @__PURE__ */ c((t) => p.stderr.write(t), "writeErr"),
758
- getOutHelpWidth: /* @__PURE__ */ c(() => p.stdout.isTTY ? p.stdout.columns : void 0, "getOutHelpWidth"),
759
- getErrHelpWidth: /* @__PURE__ */ c(() => p.stderr.isTTY ? p.stderr.columns : void 0, "getErrHelpWidth"),
760
- outputError: /* @__PURE__ */ c((t, i) => i(t), "outputError")
756
+ writeOut: /* @__PURE__ */ l((t) => h.stdout.write(t), "writeOut"),
757
+ writeErr: /* @__PURE__ */ l((t) => h.stderr.write(t), "writeErr"),
758
+ getOutHelpWidth: /* @__PURE__ */ l(() => h.stdout.isTTY ? h.stdout.columns : void 0, "getOutHelpWidth"),
759
+ getErrHelpWidth: /* @__PURE__ */ l(() => h.stderr.isTTY ? h.stderr.columns : void 0, "getErrHelpWidth"),
760
+ outputError: /* @__PURE__ */ l((t, i) => i(t), "outputError")
761
761
  }, this._hidden = !1, this._helpOption = void 0, this._addImplicitHelpCommand = void 0, this._helpCommand = void 0, this._helpConfiguration =
762
762
  {};
763
763
  }
@@ -811,12 +811,12 @@ var be = b((ge) => {
811
811
  * @return {Command} returns new command for action handler, or `this` for executable command
812
812
  */
813
813
  command(e, t, i) {
814
- let n = t, r = i;
815
- typeof n == "object" && n !== null && (r = n, n = null), r = r || {};
816
- let [, o, l] = e.match(/([^ ]+) *(.*)/), a = this.createCommand(o);
817
- return n && (a.description(n), a._executableHandler = !0), r.isDefault && (this._defaultCommandName = a._name), a._hidden = !!(r.noHelp ||
818
- r.hidden), a._executableFile = r.executableFile || null, l && a.arguments(l), this._registerCommand(a), a.parent = this, a.copyInheritedSettings(
819
- this), n ? this : a;
814
+ let s = t, r = i;
815
+ typeof s == "object" && s !== null && (r = s, s = null), r = r || {};
816
+ let [, o, d] = e.match(/([^ ]+) *(.*)/), a = this.createCommand(o);
817
+ return s && (a.description(s), a._executableHandler = !0), r.isDefault && (this._defaultCommandName = a._name), a._hidden = !!(r.noHelp ||
818
+ r.hidden), a._executableFile = r.executableFile || null, d && a.arguments(d), this._registerCommand(a), a.parent = this, a.copyInheritedSettings(
819
+ this), s ? this : a;
820
820
  }
821
821
  /**
822
822
  * Factory routine to create a new unattached command.
@@ -828,7 +828,7 @@ var be = b((ge) => {
828
828
  * @return {Command} new command
829
829
  */
830
830
  createCommand(e) {
831
- return new s(e);
831
+ return new n(e);
832
832
  }
833
833
  /**
834
834
  * You can customise the help with a subclass of Help by overriding createHelp,
@@ -933,9 +933,9 @@ var be = b((ge) => {
933
933
  * @param {*} [defaultValue]
934
934
  * @return {Command} `this` command for chaining
935
935
  */
936
- argument(e, t, i, n) {
936
+ argument(e, t, i, s) {
937
937
  let r = this.createArgument(e, t);
938
- return typeof i == "function" ? r.default(n).argParser(i) : r.default(i), this.addArgument(r), this;
938
+ return typeof i == "function" ? r.default(s).argParser(i) : r.default(i), this.addArgument(r), this;
939
939
  }
940
940
  /**
941
941
  * Define argument syntax for command, adding multiple at once (without descriptions).
@@ -988,8 +988,8 @@ var be = b((ge) => {
988
988
  if (typeof e == "boolean")
989
989
  return this._addImplicitHelpCommand = e, this;
990
990
  e = e ?? "help [command]";
991
- let [, i, n] = e.match(/([^ ]+) *(.*)/), r = t ?? "display help for command", o = this.createCommand(i);
992
- return o.helpOption(!1), n && o.arguments(n), r && o.description(r), this._addImplicitHelpCommand = !0, this._helpCommand = o, this;
991
+ let [, i, s] = e.match(/([^ ]+) *(.*)/), r = t ?? "display help for command", o = this.createCommand(i);
992
+ return o.helpOption(!1), s && o.arguments(s), r && o.description(r), this._addImplicitHelpCommand = !0, this._helpCommand = o, this;
993
993
  }
994
994
  /**
995
995
  * Add prepared custom help command.
@@ -1047,7 +1047,7 @@ Expecting one of '${i.join("', '")}'`);
1047
1047
  * @private
1048
1048
  */
1049
1049
  _exit(e, t, i) {
1050
- this._exitCallback && this._exitCallback(new te(e, t, i)), p.exit(e);
1050
+ this._exitCallback && this._exitCallback(new te(e, t, i)), h.exit(e);
1051
1051
  }
1052
1052
  /**
1053
1053
  * Register callback `fn` for the command.
@@ -1064,9 +1064,9 @@ Expecting one of '${i.join("', '")}'`);
1064
1064
  * @return {Command} `this` command for chaining
1065
1065
  */
1066
1066
  action(e) {
1067
- let t = /* @__PURE__ */ c((i) => {
1068
- let n = this.registeredArguments.length, r = i.slice(0, n);
1069
- return this._storeOptionsAsProperties ? r[n] = this : r[n] = this.opts(), r.push(this), e.apply(this, r);
1067
+ let t = /* @__PURE__ */ l((i) => {
1068
+ let s = this.registeredArguments.length, r = i.slice(0, s);
1069
+ return this._storeOptionsAsProperties ? r[s] = this : r[s] = this.opts(), r.push(this), e.apply(this, r);
1070
1070
  }, "listener");
1071
1071
  return this._actionHandler = t, this;
1072
1072
  }
@@ -1081,7 +1081,7 @@ Expecting one of '${i.join("', '")}'`);
1081
1081
  * @return {Option} new option
1082
1082
  */
1083
1083
  createOption(e, t) {
1084
- return new pe(e, t);
1084
+ return new he(e, t);
1085
1085
  }
1086
1086
  /**
1087
1087
  * Wrap parseArgs to catch 'commander.invalidArgument'.
@@ -1092,12 +1092,12 @@ Expecting one of '${i.join("', '")}'`);
1092
1092
  * @param {string} invalidArgumentMessage
1093
1093
  * @private
1094
1094
  */
1095
- _callParseArg(e, t, i, n) {
1095
+ _callParseArg(e, t, i, s) {
1096
1096
  try {
1097
1097
  return e.parseArg(t, i);
1098
1098
  } catch (r) {
1099
1099
  if (r.code === "commander.invalidArgument") {
1100
- let o = `${n} ${r.message}`;
1100
+ let o = `${s} ${r.message}`;
1101
1101
  this.error(o, { exitCode: r.exitCode, code: r.code });
1102
1102
  }
1103
1103
  throw r;
@@ -1127,13 +1127,13 @@ Expecting one of '${i.join("', '")}'`);
1127
1127
  * @private
1128
1128
  */
1129
1129
  _registerCommand(e) {
1130
- let t = /* @__PURE__ */ c((n) => [n.name()].concat(n.aliases()), "knownBy"), i = t(e).find(
1131
- (n) => this._findCommand(n)
1130
+ let t = /* @__PURE__ */ l((s) => [s.name()].concat(s.aliases()), "knownBy"), i = t(e).find(
1131
+ (s) => this._findCommand(s)
1132
1132
  );
1133
1133
  if (i) {
1134
- let n = t(this._findCommand(i)).join("|"), r = t(e).join("|");
1134
+ let s = t(this._findCommand(i)).join("|"), r = t(e).join("|");
1135
1135
  throw new Error(
1136
- `cannot add command '${r}' as already have command '${n}'`
1136
+ `cannot add command '${r}' as already have command '${s}'`
1137
1137
  );
1138
1138
  }
1139
1139
  this.commands.push(e);
@@ -1155,18 +1155,18 @@ Expecting one of '${i.join("', '")}'`);
1155
1155
  "default"
1156
1156
  );
1157
1157
  } else e.defaultValue !== void 0 && this.setOptionValueWithSource(i, e.defaultValue, "default");
1158
- let n = /* @__PURE__ */ c((r, o, l) => {
1158
+ let s = /* @__PURE__ */ l((r, o, d) => {
1159
1159
  r == null && e.presetArg !== void 0 && (r = e.presetArg);
1160
1160
  let a = this.getOptionValue(i);
1161
1161
  r !== null && e.parseArg ? r = this._callParseArg(e, r, a, o) : r !== null && e.variadic && (r = e._concatValue(r, a)), r == null &&
1162
- (e.negate ? r = !1 : e.isBoolean() || e.optional ? r = !0 : r = ""), this.setOptionValueWithSource(i, r, l);
1162
+ (e.negate ? r = !1 : e.isBoolean() || e.optional ? r = !0 : r = ""), this.setOptionValueWithSource(i, r, d);
1163
1163
  }, "handleOptionValue");
1164
1164
  return this.on("option:" + t, (r) => {
1165
1165
  let o = `error: option '${e.flags}' argument '${r}' is invalid.`;
1166
- n(r, o, "cli");
1166
+ s(r, o, "cli");
1167
1167
  }), e.envVar && this.on("optionEnv:" + t, (r) => {
1168
1168
  let o = `error: option '${e.flags}' value '${r}' from env '${e.envVar}' is invalid.`;
1169
- n(r, o, "env");
1169
+ s(r, o, "env");
1170
1170
  }), this;
1171
1171
  }
1172
1172
  /**
@@ -1175,22 +1175,22 @@ Expecting one of '${i.join("', '")}'`);
1175
1175
  * @return {Command} `this` command for chaining
1176
1176
  * @private
1177
1177
  */
1178
- _optionEx(e, t, i, n, r) {
1179
- if (typeof t == "object" && t instanceof pe)
1178
+ _optionEx(e, t, i, s, r) {
1179
+ if (typeof t == "object" && t instanceof he)
1180
1180
  throw new Error(
1181
1181
  "To add an Option object use addOption() instead of option() or requiredOption()"
1182
1182
  );
1183
1183
  let o = this.createOption(t, i);
1184
- if (o.makeOptionMandatory(!!e.mandatory), typeof n == "function")
1185
- o.default(r).argParser(n);
1186
- else if (n instanceof RegExp) {
1187
- let l = n;
1188
- n = /* @__PURE__ */ c((a, u) => {
1189
- let d = l.exec(a);
1190
- return d ? d[0] : u;
1191
- }, "fn"), o.default(r).argParser(n);
1184
+ if (o.makeOptionMandatory(!!e.mandatory), typeof s == "function")
1185
+ o.default(r).argParser(s);
1186
+ else if (s instanceof RegExp) {
1187
+ let d = s;
1188
+ s = /* @__PURE__ */ l((a, c) => {
1189
+ let u = d.exec(a);
1190
+ return u ? u[0] : c;
1191
+ }, "fn"), o.default(r).argParser(s);
1192
1192
  } else
1193
- o.default(n);
1193
+ o.default(s);
1194
1194
  return this.addOption(o);
1195
1195
  }
1196
1196
  /**
@@ -1214,8 +1214,8 @@ Expecting one of '${i.join("', '")}'`);
1214
1214
  * @param {*} [defaultValue]
1215
1215
  * @return {Command} `this` command for chaining
1216
1216
  */
1217
- option(e, t, i, n) {
1218
- return this._optionEx({}, e, t, i, n);
1217
+ option(e, t, i, s) {
1218
+ return this._optionEx({}, e, t, i, s);
1219
1219
  }
1220
1220
  /**
1221
1221
  * Add a required option which must have a value after parsing. This usually means
@@ -1229,13 +1229,13 @@ Expecting one of '${i.join("', '")}'`);
1229
1229
  * @param {*} [defaultValue]
1230
1230
  * @return {Command} `this` command for chaining
1231
1231
  */
1232
- requiredOption(e, t, i, n) {
1232
+ requiredOption(e, t, i, s) {
1233
1233
  return this._optionEx(
1234
1234
  { mandatory: !0 },
1235
1235
  e,
1236
1236
  t,
1237
1237
  i,
1238
- n
1238
+ s
1239
1239
  );
1240
1240
  }
1241
1241
  /**
@@ -1381,11 +1381,11 @@ Expecting one of '${i.join("', '")}'`);
1381
1381
  if (e !== void 0 && !Array.isArray(e))
1382
1382
  throw new Error("first parameter to parse must be array or undefined");
1383
1383
  if (t = t || {}, e === void 0 && t.from === void 0) {
1384
- p.versions?.electron && (t.from = "electron");
1385
- let n = p.execArgv ?? [];
1386
- (n.includes("-e") || n.includes("--eval") || n.includes("-p") || n.includes("--print")) && (t.from = "eval");
1384
+ h.versions?.electron && (t.from = "electron");
1385
+ let s = h.execArgv ?? [];
1386
+ (s.includes("-e") || s.includes("--eval") || s.includes("-p") || s.includes("--print")) && (t.from = "eval");
1387
1387
  }
1388
- e === void 0 && (e = p.argv), this.rawArgs = e.slice();
1388
+ e === void 0 && (e = h.argv), this.rawArgs = e.slice();
1389
1389
  let i;
1390
1390
  switch (t.from) {
1391
1391
  case void 0:
@@ -1393,7 +1393,7 @@ Expecting one of '${i.join("', '")}'`);
1393
1393
  this._scriptPath = e[1], i = e.slice(2);
1394
1394
  break;
1395
1395
  case "electron":
1396
- p.defaultApp ? (this._scriptPath = e[1], i = e.slice(2)) : i = e.slice(1);
1396
+ h.defaultApp ? (this._scriptPath = e[1], i = e.slice(2)) : i = e.slice(1);
1397
1397
  break;
1398
1398
  case "user":
1399
1399
  i = e.slice(0);
@@ -1465,82 +1465,82 @@ Expecting one of '${i.join("', '")}'`);
1465
1465
  */
1466
1466
  _executeSubCommand(e, t) {
1467
1467
  t = t.slice();
1468
- let i = !1, n = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
1469
- function r(d, h) {
1470
- let m = y.resolve(d, h);
1468
+ let i = !1, s = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
1469
+ function r(u, p) {
1470
+ let m = _.resolve(u, p);
1471
1471
  if (ee.existsSync(m)) return m;
1472
- if (n.includes(y.extname(h))) return;
1473
- let x = n.find(
1474
- (f) => ee.existsSync(`${m}${f}`)
1472
+ if (s.includes(_.extname(p))) return;
1473
+ let v = s.find(
1474
+ (g) => ee.existsSync(`${m}${g}`)
1475
1475
  );
1476
- if (x) return `${m}${x}`;
1476
+ if (v) return `${m}${v}`;
1477
1477
  }
1478
- c(r, "findFile"), this._checkForMissingMandatoryOptions(), this._checkForConflictingOptions();
1479
- let o = e._executableFile || `${this._name}-${e._name}`, l = this._executableDir || "";
1478
+ l(r, "findFile"), this._checkForMissingMandatoryOptions(), this._checkForConflictingOptions();
1479
+ let o = e._executableFile || `${this._name}-${e._name}`, d = this._executableDir || "";
1480
1480
  if (this._scriptPath) {
1481
- let d;
1481
+ let u;
1482
1482
  try {
1483
- d = ee.realpathSync(this._scriptPath);
1483
+ u = ee.realpathSync(this._scriptPath);
1484
1484
  } catch {
1485
- d = this._scriptPath;
1485
+ u = this._scriptPath;
1486
1486
  }
1487
- l = y.resolve(
1488
- y.dirname(d),
1489
- l
1487
+ d = _.resolve(
1488
+ _.dirname(u),
1489
+ d
1490
1490
  );
1491
1491
  }
1492
- if (l) {
1493
- let d = r(l, o);
1494
- if (!d && !e._executableFile && this._scriptPath) {
1495
- let h = y.basename(
1492
+ if (d) {
1493
+ let u = r(d, o);
1494
+ if (!u && !e._executableFile && this._scriptPath) {
1495
+ let p = _.basename(
1496
1496
  this._scriptPath,
1497
- y.extname(this._scriptPath)
1497
+ _.extname(this._scriptPath)
1498
1498
  );
1499
- h !== this._name && (d = r(
1500
- l,
1501
- `${h}-${e._name}`
1499
+ p !== this._name && (u = r(
1500
+ d,
1501
+ `${p}-${e._name}`
1502
1502
  ));
1503
1503
  }
1504
- o = d || o;
1504
+ o = u || o;
1505
1505
  }
1506
- i = n.includes(y.extname(o));
1506
+ i = s.includes(_.extname(o));
1507
1507
  let a;
1508
- p.platform !== "win32" ? i ? (t.unshift(o), t = fe(p.execArgv).concat(t), a = Z.spawn(p.argv[0], t, { stdio: "inherit" })) : a = Z.spawn(
1509
- o, t, { stdio: "inherit" }) : (t.unshift(o), t = fe(p.execArgv).concat(t), a = Z.spawn(p.execPath, t, { stdio: "inherit" })), a.killed ||
1510
- ["SIGUSR1", "SIGUSR2", "SIGTERM", "SIGINT", "SIGHUP"].forEach((h) => {
1511
- p.on(h, () => {
1512
- a.killed === !1 && a.exitCode === null && a.kill(h);
1508
+ h.platform !== "win32" ? i ? (t.unshift(o), t = ge(h.execArgv).concat(t), a = Z.spawn(h.argv[0], t, { stdio: "inherit" })) : a = Z.spawn(
1509
+ o, t, { stdio: "inherit" }) : (t.unshift(o), t = ge(h.execArgv).concat(t), a = Z.spawn(h.execPath, t, { stdio: "inherit" })), a.killed ||
1510
+ ["SIGUSR1", "SIGUSR2", "SIGTERM", "SIGINT", "SIGHUP"].forEach((p) => {
1511
+ h.on(p, () => {
1512
+ a.killed === !1 && a.exitCode === null && a.kill(p);
1513
1513
  });
1514
1514
  });
1515
- let u = this._exitCallback;
1516
- a.on("close", (d) => {
1517
- d = d ?? 1, u ? u(
1515
+ let c = this._exitCallback;
1516
+ a.on("close", (u) => {
1517
+ u = u ?? 1, c ? c(
1518
1518
  new te(
1519
- d,
1519
+ u,
1520
1520
  "commander.executeSubCommandAsync",
1521
1521
  "(close)"
1522
1522
  )
1523
- ) : p.exit(d);
1524
- }), a.on("error", (d) => {
1525
- if (d.code === "ENOENT") {
1526
- let h = l ? `searched for local subcommand relative to directory '${l}'` : "no directory for search for local subcommand, use .exe\
1523
+ ) : h.exit(u);
1524
+ }), a.on("error", (u) => {
1525
+ if (u.code === "ENOENT") {
1526
+ let p = d ? `searched for local subcommand relative to directory '${d}'` : "no directory for search for local subcommand, use .exe\
1527
1527
  cutableDir() to supply a custom directory", m = `'${o}' does not exist
1528
1528
  - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\
1529
1529
 
1530
1530
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
1531
- - ${h}`;
1531
+ - ${p}`;
1532
1532
  throw new Error(m);
1533
- } else if (d.code === "EACCES")
1533
+ } else if (u.code === "EACCES")
1534
1534
  throw new Error(`'${o}' not executable`);
1535
- if (!u)
1536
- p.exit(1);
1535
+ if (!c)
1536
+ h.exit(1);
1537
1537
  else {
1538
- let h = new te(
1538
+ let p = new te(
1539
1539
  1,
1540
1540
  "commander.executeSubCommandAsync",
1541
1541
  "(error)"
1542
1542
  );
1543
- h.nestedError = d, u(h);
1543
+ p.nestedError = u, c(p);
1544
1544
  }
1545
1545
  }), this.runningCommand = a;
1546
1546
  }
@@ -1548,18 +1548,18 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1548
1548
  * @private
1549
1549
  */
1550
1550
  _dispatchSubcommand(e, t, i) {
1551
- let n = this._findCommand(e);
1552
- n || this.help({ error: !0 });
1551
+ let s = this._findCommand(e);
1552
+ s || this.help({ error: !0 });
1553
1553
  let r;
1554
1554
  return r = this._chainOrCallSubCommandHook(
1555
1555
  r,
1556
- n,
1556
+ s,
1557
1557
  "preSubcommand"
1558
1558
  ), r = this._chainOrCall(r, () => {
1559
- if (n._executableHandler)
1560
- this._executeSubCommand(n, t.concat(i));
1559
+ if (s._executableHandler)
1560
+ this._executeSubCommand(s, t.concat(i));
1561
1561
  else
1562
- return n._parseCommand(t, i);
1562
+ return s._parseCommand(t, i);
1563
1563
  }), r;
1564
1564
  }
1565
1565
  /**
@@ -1594,25 +1594,25 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1594
1594
  * @private
1595
1595
  */
1596
1596
  _processArguments() {
1597
- let e = /* @__PURE__ */ c((i, n, r) => {
1598
- let o = n;
1599
- if (n !== null && i.parseArg) {
1600
- let l = `error: command-argument value '${n}' is invalid for argument '${i.name()}'.`;
1597
+ let e = /* @__PURE__ */ l((i, s, r) => {
1598
+ let o = s;
1599
+ if (s !== null && i.parseArg) {
1600
+ let d = `error: command-argument value '${s}' is invalid for argument '${i.name()}'.`;
1601
1601
  o = this._callParseArg(
1602
1602
  i,
1603
- n,
1603
+ s,
1604
1604
  r,
1605
- l
1605
+ d
1606
1606
  );
1607
1607
  }
1608
1608
  return o;
1609
1609
  }, "myParseArg");
1610
1610
  this._checkNumberOfArguments();
1611
1611
  let t = [];
1612
- this.registeredArguments.forEach((i, n) => {
1612
+ this.registeredArguments.forEach((i, s) => {
1613
1613
  let r = i.defaultValue;
1614
- i.variadic ? n < this.args.length ? (r = this.args.slice(n), i.parseArg && (r = r.reduce((o, l) => e(i, l, o), i.defaultValue))) : r ===
1615
- void 0 && (r = []) : n < this.args.length && (r = this.args[n], i.parseArg && (r = e(i, r, i.defaultValue))), t[n] = r;
1614
+ i.variadic ? s < this.args.length ? (r = this.args.slice(s), i.parseArg && (r = r.reduce((o, d) => e(i, d, o), i.defaultValue))) : r ===
1615
+ void 0 && (r = []) : s < this.args.length && (r = this.args[s], i.parseArg && (r = e(i, r, i.defaultValue))), t[s] = r;
1616
1616
  }), this.processedArgs = t;
1617
1617
  }
1618
1618
  /**
@@ -1634,12 +1634,12 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1634
1634
  * @private
1635
1635
  */
1636
1636
  _chainOrCallHooks(e, t) {
1637
- let i = e, n = [];
1637
+ let i = e, s = [];
1638
1638
  return this._getCommandAndAncestors().reverse().filter((r) => r._lifeCycleHooks[t] !== void 0).forEach((r) => {
1639
1639
  r._lifeCycleHooks[t].forEach((o) => {
1640
- n.push({ hookedCommand: r, callback: o });
1640
+ s.push({ hookedCommand: r, callback: o });
1641
1641
  });
1642
- }), t === "postAction" && n.reverse(), n.forEach((r) => {
1642
+ }), t === "postAction" && s.reverse(), s.forEach((r) => {
1643
1643
  i = this._chainOrCall(i, () => r.callback(r.hookedCommand, this));
1644
1644
  }), i;
1645
1645
  }
@@ -1652,10 +1652,10 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1652
1652
  * @private
1653
1653
  */
1654
1654
  _chainOrCallSubCommandHook(e, t, i) {
1655
- let n = e;
1655
+ let s = e;
1656
1656
  return this._lifeCycleHooks[i] !== void 0 && this._lifeCycleHooks[i].forEach((r) => {
1657
- n = this._chainOrCall(n, () => r(this, t));
1658
- }), n;
1657
+ s = this._chainOrCall(s, () => r(this, t));
1658
+ }), s;
1659
1659
  }
1660
1660
  /**
1661
1661
  * Process arguments in context of this command.
@@ -1678,11 +1678,11 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1678
1678
  );
1679
1679
  this.commands.length && this.args.length === 0 && !this._actionHandler && !this._defaultCommandName && this.help({ error: !0 }), this.
1680
1680
  _outputHelpIfRequested(i.unknown), this._checkForMissingMandatoryOptions(), this._checkForConflictingOptions();
1681
- let n = /* @__PURE__ */ c(() => {
1681
+ let s = /* @__PURE__ */ l(() => {
1682
1682
  i.unknown.length > 0 && this.unknownOption(i.unknown[0]);
1683
1683
  }, "checkForUnknownOptions"), r = `command:${this.name()}`;
1684
1684
  if (this._actionHandler) {
1685
- n(), this._processArguments();
1685
+ s(), this._processArguments();
1686
1686
  let o;
1687
1687
  return o = this._chainOrCallHooks(o, "preAction"), o = this._chainOrCall(
1688
1688
  o,
@@ -1692,12 +1692,12 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1692
1692
  })), o = this._chainOrCallHooks(o, "postAction"), o;
1693
1693
  }
1694
1694
  if (this.parent && this.parent.listenerCount(r))
1695
- n(), this._processArguments(), this.parent.emit(r, e, t);
1695
+ s(), this._processArguments(), this.parent.emit(r, e, t);
1696
1696
  else if (e.length) {
1697
1697
  if (this._findCommand("*"))
1698
1698
  return this._dispatchSubcommand("*", e, t);
1699
- this.listenerCount("command:*") ? this.emit("command:*", e, t) : this.commands.length ? this.unknownCommand() : (n(), this._processArguments());
1700
- } else this.commands.length ? (n(), this.help({ error: !0 })) : (n(), this._processArguments());
1699
+ this.listenerCount("command:*") ? this.emit("command:*", e, t) : this.commands.length ? this.unknownCommand() : (s(), this._processArguments());
1700
+ } else this.commands.length ? (s(), this.help({ error: !0 })) : (s(), this._processArguments());
1701
1701
  }
1702
1702
  /**
1703
1703
  * Find matching command.
@@ -1741,16 +1741,16 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1741
1741
  */
1742
1742
  _checkForConflictingLocalOptions() {
1743
1743
  let e = this.options.filter((i) => {
1744
- let n = i.attributeName();
1745
- return this.getOptionValue(n) === void 0 ? !1 : this.getOptionValueSource(n) !== "default";
1744
+ let s = i.attributeName();
1745
+ return this.getOptionValue(s) === void 0 ? !1 : this.getOptionValueSource(s) !== "default";
1746
1746
  });
1747
1747
  e.filter(
1748
1748
  (i) => i.conflictsWith.length > 0
1749
1749
  ).forEach((i) => {
1750
- let n = e.find(
1750
+ let s = e.find(
1751
1751
  (r) => i.conflictsWith.includes(r.attributeName())
1752
1752
  );
1753
- n && this._conflictingOption(i, n);
1753
+ s && this._conflictingOption(i, s);
1754
1754
  });
1755
1755
  }
1756
1756
  /**
@@ -1780,53 +1780,53 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1780
1780
  * @return {{operands: string[], unknown: string[]}}
1781
1781
  */
1782
1782
  parseOptions(e) {
1783
- let t = [], i = [], n = t, r = e.slice();
1783
+ let t = [], i = [], s = t, r = e.slice();
1784
1784
  function o(a) {
1785
1785
  return a.length > 1 && a[0] === "-";
1786
1786
  }
1787
- c(o, "maybeOption");
1788
- let l = null;
1787
+ l(o, "maybeOption");
1788
+ let d = null;
1789
1789
  for (; r.length; ) {
1790
1790
  let a = r.shift();
1791
1791
  if (a === "--") {
1792
- n === i && n.push(a), n.push(...r);
1792
+ s === i && s.push(a), s.push(...r);
1793
1793
  break;
1794
1794
  }
1795
- if (l && !o(a)) {
1796
- this.emit(`option:${l.name()}`, a);
1795
+ if (d && !o(a)) {
1796
+ this.emit(`option:${d.name()}`, a);
1797
1797
  continue;
1798
1798
  }
1799
- if (l = null, o(a)) {
1800
- let u = this._findOption(a);
1801
- if (u) {
1802
- if (u.required) {
1803
- let d = r.shift();
1804
- d === void 0 && this.optionMissingArgument(u), this.emit(`option:${u.name()}`, d);
1805
- } else if (u.optional) {
1806
- let d = null;
1807
- r.length > 0 && !o(r[0]) && (d = r.shift()), this.emit(`option:${u.name()}`, d);
1799
+ if (d = null, o(a)) {
1800
+ let c = this._findOption(a);
1801
+ if (c) {
1802
+ if (c.required) {
1803
+ let u = r.shift();
1804
+ u === void 0 && this.optionMissingArgument(c), this.emit(`option:${c.name()}`, u);
1805
+ } else if (c.optional) {
1806
+ let u = null;
1807
+ r.length > 0 && !o(r[0]) && (u = r.shift()), this.emit(`option:${c.name()}`, u);
1808
1808
  } else
1809
- this.emit(`option:${u.name()}`);
1810
- l = u.variadic ? u : null;
1809
+ this.emit(`option:${c.name()}`);
1810
+ d = c.variadic ? c : null;
1811
1811
  continue;
1812
1812
  }
1813
1813
  }
1814
1814
  if (a.length > 2 && a[0] === "-" && a[1] !== "-") {
1815
- let u = this._findOption(`-${a[1]}`);
1816
- if (u) {
1817
- u.required || u.optional && this._combineFlagAndOptionalValue ? this.emit(`option:${u.name()}`, a.slice(2)) : (this.emit(`option\
1818
- :${u.name()}`), r.unshift(`-${a.slice(2)}`));
1815
+ let c = this._findOption(`-${a[1]}`);
1816
+ if (c) {
1817
+ c.required || c.optional && this._combineFlagAndOptionalValue ? this.emit(`option:${c.name()}`, a.slice(2)) : (this.emit(`option\
1818
+ :${c.name()}`), r.unshift(`-${a.slice(2)}`));
1819
1819
  continue;
1820
1820
  }
1821
1821
  }
1822
1822
  if (/^--[^=]+=/.test(a)) {
1823
- let u = a.indexOf("="), d = this._findOption(a.slice(0, u));
1824
- if (d && (d.required || d.optional)) {
1825
- this.emit(`option:${d.name()}`, a.slice(u + 1));
1823
+ let c = a.indexOf("="), u = this._findOption(a.slice(0, c));
1824
+ if (u && (u.required || u.optional)) {
1825
+ this.emit(`option:${u.name()}`, a.slice(c + 1));
1826
1826
  continue;
1827
1827
  }
1828
1828
  }
1829
- if (o(a) && (n = i), (this._enablePositionalOptions || this._passThroughOptions) && t.length === 0 && i.length === 0) {
1829
+ if (o(a) && (s = i), (this._enablePositionalOptions || this._passThroughOptions) && t.length === 0 && i.length === 0) {
1830
1830
  if (this._findCommand(a)) {
1831
1831
  t.push(a), r.length > 0 && i.push(...r);
1832
1832
  break;
@@ -1839,10 +1839,10 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1839
1839
  }
1840
1840
  }
1841
1841
  if (this._passThroughOptions) {
1842
- n.push(a), r.length > 0 && n.push(...r);
1842
+ s.push(a), r.length > 0 && s.push(...r);
1843
1843
  break;
1844
1844
  }
1845
- n.push(a);
1845
+ s.push(a);
1846
1846
  }
1847
1847
  return { operands: t, unknown: i };
1848
1848
  }
@@ -1855,8 +1855,8 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1855
1855
  if (this._storeOptionsAsProperties) {
1856
1856
  let e = {}, t = this.options.length;
1857
1857
  for (let i = 0; i < t; i++) {
1858
- let n = this.options[i].attributeName();
1859
- e[n] = n === this._versionOptionName ? this._version : this[n];
1858
+ let s = this.options[i].attributeName();
1859
+ e[s] = s === this._versionOptionName ? this._version : this[s];
1860
1860
  }
1861
1861
  return e;
1862
1862
  }
@@ -1889,8 +1889,8 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1889
1889
  ), typeof this._showHelpAfterError == "string" ? this._outputConfiguration.writeErr(`${this._showHelpAfterError}
1890
1890
  `) : this._showHelpAfterError && (this._outputConfiguration.writeErr(`
1891
1891
  `), this.outputHelp({ error: !0 }));
1892
- let i = t || {}, n = i.exitCode || 1, r = i.code || "commander.error";
1893
- this._exit(n, r, e);
1892
+ let i = t || {}, s = i.exitCode || 1, r = i.code || "commander.error";
1893
+ this._exit(s, r, e);
1894
1894
  }
1895
1895
  /**
1896
1896
  * Apply any option related environment variables, if option does
@@ -1900,11 +1900,11 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1900
1900
  */
1901
1901
  _parseOptionsEnv() {
1902
1902
  this.options.forEach((e) => {
1903
- if (e.envVar && e.envVar in p.env) {
1903
+ if (e.envVar && e.envVar in h.env) {
1904
1904
  let t = e.attributeName();
1905
1905
  (this.getOptionValue(t) === void 0 || ["default", "config", "env"].includes(
1906
1906
  this.getOptionValueSource(t)
1907
- )) && (e.required || e.optional ? this.emit(`optionEnv:${e.name()}`, p.env[e.envVar]) : this.emit(`optionEnv:${e.name()}`));
1907
+ )) && (e.required || e.optional ? this.emit(`optionEnv:${e.name()}`, h.env[e.envVar]) : this.emit(`optionEnv:${e.name()}`));
1908
1908
  }
1909
1909
  });
1910
1910
  }
@@ -1914,7 +1914,7 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1914
1914
  * @private
1915
1915
  */
1916
1916
  _parseOptionsImplied() {
1917
- let e = new st(this.options), t = /* @__PURE__ */ c((i) => this.getOptionValue(i) !== void 0 && !["default", "implied"].includes(this.
1917
+ let e = new nt(this.options), t = /* @__PURE__ */ l((i) => this.getOptionValue(i) !== void 0 && !["default", "implied"].includes(this.
1918
1918
  getOptionValueSource(i)), "hasCustomOptionValue");
1919
1919
  this.options.filter(
1920
1920
  (i) => i.implied !== void 0 && t(i.attributeName()) && e.valueFromOption(
@@ -1922,10 +1922,10 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1922
1922
  i
1923
1923
  )
1924
1924
  ).forEach((i) => {
1925
- Object.keys(i.implied).filter((n) => !t(n)).forEach((n) => {
1925
+ Object.keys(i.implied).filter((s) => !t(s)).forEach((s) => {
1926
1926
  this.setOptionValueWithSource(
1927
- n,
1928
- i.implied[n],
1927
+ s,
1928
+ i.implied[s],
1929
1929
  "implied"
1930
1930
  );
1931
1931
  });
@@ -1969,17 +1969,17 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1969
1969
  * @private
1970
1970
  */
1971
1971
  _conflictingOption(e, t) {
1972
- let i = /* @__PURE__ */ c((o) => {
1973
- let l = o.attributeName(), a = this.getOptionValue(l), u = this.options.find(
1974
- (h) => h.negate && l === h.attributeName()
1975
- ), d = this.options.find(
1976
- (h) => !h.negate && l === h.attributeName()
1972
+ let i = /* @__PURE__ */ l((o) => {
1973
+ let d = o.attributeName(), a = this.getOptionValue(d), c = this.options.find(
1974
+ (p) => p.negate && d === p.attributeName()
1975
+ ), u = this.options.find(
1976
+ (p) => !p.negate && d === p.attributeName()
1977
1977
  );
1978
- return u && (u.presetArg === void 0 && a === !1 || u.presetArg !== void 0 && a === u.presetArg) ? u : d || o;
1979
- }, "findBestOptionFromValue"), n = /* @__PURE__ */ c((o) => {
1980
- let l = i(o), a = l.attributeName();
1981
- return this.getOptionValueSource(a) === "env" ? `environment variable '${l.envVar}'` : `option '${l.flags}'`;
1982
- }, "getErrorMessage"), r = `error: ${n(e)} cannot be used with ${n(t)}`;
1978
+ return c && (c.presetArg === void 0 && a === !1 || c.presetArg !== void 0 && a === c.presetArg) ? c : u || o;
1979
+ }, "findBestOptionFromValue"), s = /* @__PURE__ */ l((o) => {
1980
+ let d = i(o), a = d.attributeName();
1981
+ return this.getOptionValueSource(a) === "env" ? `environment variable '${d.envVar}'` : `option '${d.flags}'`;
1982
+ }, "getErrorMessage"), r = `error: ${s(e)} cannot be used with ${s(t)}`;
1983
1983
  this.error(r, { code: "commander.conflictingOption" });
1984
1984
  }
1985
1985
  /**
@@ -1992,12 +1992,12 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
1992
1992
  if (this._allowUnknownOption) return;
1993
1993
  let t = "";
1994
1994
  if (e.startsWith("--") && this._showSuggestionAfterError) {
1995
- let n = [], r = this;
1995
+ let s = [], r = this;
1996
1996
  do {
1997
- let o = r.createHelp().visibleOptions(r).filter((l) => l.long).map((l) => l.long);
1998
- n = n.concat(o), r = r.parent;
1997
+ let o = r.createHelp().visibleOptions(r).filter((d) => d.long).map((d) => d.long);
1998
+ s = s.concat(o), r = r.parent;
1999
1999
  } while (r && !r._enablePositionalOptions);
2000
- t = me(e, n);
2000
+ t = me(e, s);
2001
2001
  }
2002
2002
  let i = `error: unknown option '${e}'${t}`;
2003
2003
  this.error(i, { code: "commander.unknownOption" });
@@ -2022,10 +2022,10 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
2022
2022
  unknownCommand() {
2023
2023
  let e = this.args[0], t = "";
2024
2024
  if (this._showSuggestionAfterError) {
2025
- let n = [];
2025
+ let s = [];
2026
2026
  this.createHelp().visibleCommands(this).forEach((r) => {
2027
- n.push(r.name()), r.alias() && n.push(r.alias());
2028
- }), t = me(e, n);
2027
+ s.push(r.name()), r.alias() && s.push(r.alias());
2028
+ }), t = me(e, s);
2029
2029
  }
2030
2030
  let i = `error: unknown command '${e}'${t}`;
2031
2031
  this.error(i, { code: "commander.unknownCommand" });
@@ -2045,8 +2045,8 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
2045
2045
  version(e, t, i) {
2046
2046
  if (e === void 0) return this._version;
2047
2047
  this._version = e, t = t || "-V, --version", i = i || "output the version number";
2048
- let n = this.createOption(t, i);
2049
- return this._versionOptionName = n.attributeName(), this._registerOption(n), this.on("option:" + n.name(), () => {
2048
+ let s = this.createOption(t, i);
2049
+ return this._versionOptionName = s.attributeName(), this._registerOption(s), this.on("option:" + s.name(), () => {
2050
2050
  this._outputConfiguration.writeOut(`${e}
2051
2051
  `), this._exit(0, "commander.version", e);
2052
2052
  }), this;
@@ -2086,9 +2086,9 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
2086
2086
  throw new Error("Command alias can't be the same as its name");
2087
2087
  let i = this.parent?._findCommand(e);
2088
2088
  if (i) {
2089
- let n = [i.name()].concat(i.aliases()).join("|");
2089
+ let s = [i.name()].concat(i.aliases()).join("|");
2090
2090
  throw new Error(
2091
- `cannot add alias '${e}' to command '${this.name()}' as already have command '${n}'`
2091
+ `cannot add alias '${e}' to command '${this.name()}' as already have command '${s}'`
2092
2092
  );
2093
2093
  }
2094
2094
  return t._aliases.push(e), this;
@@ -2113,7 +2113,7 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
2113
2113
  usage(e) {
2114
2114
  if (e === void 0) {
2115
2115
  if (this._usage) return this._usage;
2116
- let t = this.registeredArguments.map((i) => nt(i));
2116
+ let t = this.registeredArguments.map((i) => st(i));
2117
2117
  return [].concat(
2118
2118
  this.options.length || this._helpOption !== null ? "[options]" : [],
2119
2119
  this.commands.length ? "[command]" : [],
@@ -2144,7 +2144,7 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
2144
2144
  * @return {Command}
2145
2145
  */
2146
2146
  nameFromFilename(e) {
2147
- return this._name = y.basename(e, y.extname(e)), this;
2147
+ return this._name = _.basename(e, _.extname(e)), this;
2148
2148
  }
2149
2149
  /**
2150
2150
  * Get or set the directory for searching for executable subcommands of this command.
@@ -2177,8 +2177,8 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
2177
2177
  _getHelpContext(e) {
2178
2178
  e = e || {};
2179
2179
  let t = { error: !!e.error }, i;
2180
- return t.error ? i = /* @__PURE__ */ c((n) => this._outputConfiguration.writeErr(n), "write") : i = /* @__PURE__ */ c((n) => this._outputConfiguration.
2181
- writeOut(n), "write"), t.write = e.write || i, t.command = this, t;
2180
+ return t.error ? i = /* @__PURE__ */ l((s) => this._outputConfiguration.writeErr(s), "write") : i = /* @__PURE__ */ l((s) => this._outputConfiguration.
2181
+ writeOut(s), "write"), t.write = e.write || i, t.command = this, t;
2182
2182
  }
2183
2183
  /**
2184
2184
  * Output help information for this command.
@@ -2192,10 +2192,10 @@ cutableDir() to supply a custom directory", m = `'${o}' does not exist
2192
2192
  typeof e == "function" && (t = e, e = void 0);
2193
2193
  let i = this._getHelpContext(e);
2194
2194
  this._getCommandAndAncestors().reverse().forEach((r) => r.emit("beforeAllHelp", i)), this.emit("beforeHelp", i);
2195
- let n = this.helpInformation(i);
2196
- if (t && (n = t(n), typeof n != "string" && !Buffer.isBuffer(n)))
2195
+ let s = this.helpInformation(i);
2196
+ if (t && (s = t(s), typeof s != "string" && !Buffer.isBuffer(s)))
2197
2197
  throw new Error("outputHelp callback must return a string or a Buffer");
2198
- i.write(n), this._getHelpOption()?.long && this.emit(this._getHelpOption().long), this.emit("afterHelp", i), this._getCommandAndAncestors().
2198
+ i.write(s), this._getHelpOption()?.long && this.emit(this._getHelpOption().long), this.emit("afterHelp", i), this._getCommandAndAncestors().
2199
2199
  forEach(
2200
2200
  (r) => r.emit("afterAllHelp", i)
2201
2201
  );
@@ -2245,7 +2245,7 @@ help", t = t ?? "display help for command", this._helpOption = this.createOption
2245
2245
  */
2246
2246
  help(e) {
2247
2247
  this.outputHelp(e);
2248
- let t = p.exitCode || 0;
2248
+ let t = h.exitCode || 0;
2249
2249
  t === 0 && e && typeof e != "function" && e.error && (t = 1), this._exit(t, "commander.help", "(outputHelp)");
2250
2250
  }
2251
2251
  /**
@@ -2263,8 +2263,8 @@ help", t = t ?? "display help for command", this._helpOption = this.createOption
2263
2263
  if (!i.includes(e))
2264
2264
  throw new Error(`Unexpected value for position to addHelpText.
2265
2265
  Expecting one of '${i.join("', '")}'`);
2266
- let n = `${e}Help`;
2267
- return this.on(n, (r) => {
2266
+ let s = `${e}Help`;
2267
+ return this.on(s, (r) => {
2268
2268
  let o;
2269
2269
  typeof t == "function" ? o = t({ error: r.error, command: r.command }) : o = t, o && r.write(`${o}
2270
2270
  `);
@@ -2278,72 +2278,72 @@ Expecting one of '${i.join("', '")}'`);
2278
2278
  */
2279
2279
  _outputHelpIfRequested(e) {
2280
2280
  let t = this._getHelpOption();
2281
- t && e.find((n) => t.is(n)) && (this.outputHelp(), this._exit(0, "commander.helpDisplayed", "(outputHelp)"));
2281
+ t && e.find((s) => t.is(s)) && (this.outputHelp(), this._exit(0, "commander.helpDisplayed", "(outputHelp)"));
2282
2282
  }
2283
2283
  };
2284
- function fe(s) {
2285
- return s.map((e) => {
2284
+ function ge(n) {
2285
+ return n.map((e) => {
2286
2286
  if (!e.startsWith("--inspect"))
2287
2287
  return e;
2288
- let t, i = "127.0.0.1", n = "9229", r;
2288
+ let t, i = "127.0.0.1", s = "9229", r;
2289
2289
  return (r = e.match(/^(--inspect(-brk)?)$/)) !== null ? t = r[1] : (r = e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null ? (t =
2290
- r[1], /^\d+$/.test(r[3]) ? n = r[3] : i = r[3]) : (r = e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/)) !== null && (t = r[1], i =
2291
- r[3], n = r[4]), t && n !== "0" ? `${t}=${i}:${parseInt(n) + 1}` : e;
2290
+ r[1], /^\d+$/.test(r[3]) ? s = r[3] : i = r[3]) : (r = e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/)) !== null && (t = r[1], i =
2291
+ r[3], s = r[4]), t && s !== "0" ? `${t}=${i}:${parseInt(s) + 1}` : e;
2292
2292
  });
2293
2293
  }
2294
- c(fe, "incrementNodeInspectorPort");
2295
- ge.Command = ie;
2294
+ l(ge, "incrementNodeInspectorPort");
2295
+ fe.Command = ie;
2296
2296
  });
2297
2297
 
2298
2298
  // ../node_modules/commander/index.js
2299
- var ve = b((g) => {
2300
- var { Argument: _e } = H(), { Command: ne } = be(), { CommanderError: ot, InvalidArgumentError: xe } = k(), { Help: at } = Y(), { Option: ye } = X();
2301
- g.program = new ne();
2302
- g.createCommand = (s) => new ne(s);
2303
- g.createOption = (s, e) => new ye(s, e);
2304
- g.createArgument = (s, e) => new _e(s, e);
2305
- g.Command = ne;
2306
- g.Option = ye;
2307
- g.Argument = _e;
2308
- g.Help = at;
2309
- g.CommanderError = ot;
2310
- g.InvalidArgumentError = xe;
2311
- g.InvalidOptionArgumentError = xe;
2299
+ var we = b((f) => {
2300
+ var { Argument: xe } = V(), { Command: se } = be(), { CommanderError: ot, InvalidArgumentError: ve } = j(), { Help: at } = Y(), { Option: _e } = X();
2301
+ f.program = new se();
2302
+ f.createCommand = (n) => new se(n);
2303
+ f.createOption = (n, e) => new _e(n, e);
2304
+ f.createArgument = (n, e) => new xe(n, e);
2305
+ f.Command = se;
2306
+ f.Option = _e;
2307
+ f.Argument = xe;
2308
+ f.Help = at;
2309
+ f.CommanderError = ot;
2310
+ f.InvalidArgumentError = ve;
2311
+ f.InvalidOptionArgumentError = ve;
2312
2312
  });
2313
2313
 
2314
2314
  // ../node_modules/walk-up-path/dist/cjs/index.js
2315
- var we = b((D) => {
2315
+ var Oe = b((H) => {
2316
2316
  "use strict";
2317
- Object.defineProperty(D, "__esModule", { value: !0 });
2318
- D.walkUp = void 0;
2319
- var Oe = require("path"), lt = /* @__PURE__ */ c(function* (s) {
2320
- for (s = (0, Oe.resolve)(s); s; ) {
2321
- yield s;
2322
- let e = (0, Oe.dirname)(s);
2323
- if (e === s)
2317
+ Object.defineProperty(H, "__esModule", { value: !0 });
2318
+ H.walkUp = void 0;
2319
+ var ye = require("path"), dt = /* @__PURE__ */ l(function* (n) {
2320
+ for (n = (0, ye.resolve)(n); n; ) {
2321
+ yield n;
2322
+ let e = (0, ye.dirname)(n);
2323
+ if (e === n)
2324
2324
  break;
2325
- s = e;
2325
+ n = e;
2326
2326
  }
2327
2327
  }, "walkUp");
2328
- D.walkUp = lt;
2328
+ H.walkUp = dt;
2329
2329
  });
2330
2330
 
2331
2331
  // ../node_modules/picocolors/picocolors.js
2332
- var $e = b((Nt, oe) => {
2333
- var I = process || {}, Se = I.argv || [], q = I.env || {}, dt = !(q.NO_COLOR || Se.includes("--no-color")) && (!!q.FORCE_COLOR || Se.includes(
2334
- "--color") || I.platform === "win32" || (I.stdout || {}).isTTY && q.TERM !== "dumb" || !!q.CI), ht = /* @__PURE__ */ c((s, e, t = s) => (i) => {
2335
- let n = "" + i, r = n.indexOf(e, s.length);
2336
- return ~r ? s + pt(n, e, t, r) + e : s + n + e;
2337
- }, "formatter"), pt = /* @__PURE__ */ c((s, e, t, i) => {
2338
- let n = "", r = 0;
2332
+ var qe = b((Nt, oe) => {
2333
+ var I = process || {}, Ee = I.argv || [], P = I.env || {}, ut = !(P.NO_COLOR || Ee.includes("--no-color")) && (!!P.FORCE_COLOR || Ee.includes(
2334
+ "--color") || I.platform === "win32" || (I.stdout || {}).isTTY && P.TERM !== "dumb" || !!P.CI), pt = /* @__PURE__ */ l((n, e, t = n) => (i) => {
2335
+ let s = "" + i, r = s.indexOf(e, n.length);
2336
+ return ~r ? n + ht(s, e, t, r) + e : n + s + e;
2337
+ }, "formatter"), ht = /* @__PURE__ */ l((n, e, t, i) => {
2338
+ let s = "", r = 0;
2339
2339
  do
2340
- n += s.substring(r, i) + t, r = i + e.length, i = s.indexOf(e, r);
2340
+ s += n.substring(r, i) + t, r = i + e.length, i = n.indexOf(e, r);
2341
2341
  while (~i);
2342
- return n + s.substring(r);
2343
- }, "replaceClose"), je = /* @__PURE__ */ c((s = dt) => {
2344
- let e = s ? ht : () => String;
2342
+ return s + n.substring(r);
2343
+ }, "replaceClose"), Se = /* @__PURE__ */ l((n = ut) => {
2344
+ let e = n ? pt : () => String;
2345
2345
  return {
2346
- isColorSupported: s,
2346
+ isColorSupported: n,
2347
2347
  reset: e("\x1B[0m", "\x1B[0m"),
2348
2348
  bold: e("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
2349
2349
  dim: e("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
@@ -2387,206 +2387,206 @@ var $e = b((Nt, oe) => {
2387
2387
  bgWhiteBright: e("\x1B[107m", "\x1B[49m")
2388
2388
  };
2389
2389
  }, "createColors");
2390
- oe.exports = je();
2391
- oe.exports.createColors = je;
2390
+ oe.exports = Se();
2391
+ oe.exports.createColors = Se;
2392
2392
  });
2393
2393
 
2394
2394
  // ../node_modules/ts-dedent/dist/index.js
2395
- var Ne = b((A) => {
2395
+ var Ne = b((k) => {
2396
2396
  "use strict";
2397
- Object.defineProperty(A, "__esModule", { value: !0 });
2398
- A.dedent = void 0;
2399
- function Ie(s) {
2397
+ Object.defineProperty(k, "__esModule", { value: !0 });
2398
+ k.dedent = void 0;
2399
+ function Ie(n) {
2400
2400
  for (var e = [], t = 1; t < arguments.length; t++)
2401
2401
  e[t - 1] = arguments[t];
2402
- var i = Array.from(typeof s == "string" ? [s] : s);
2402
+ var i = Array.from(typeof n == "string" ? [n] : n);
2403
2403
  i[i.length - 1] = i[i.length - 1].replace(/\r?\n([\t ]*)$/, "");
2404
- var n = i.reduce(function(l, a) {
2405
- var u = a.match(/\n([\t ]+|(?!\s).)/g);
2406
- return u ? l.concat(u.map(function(d) {
2407
- var h, m;
2408
- return (m = (h = d.match(/[\t ]/g)) === null || h === void 0 ? void 0 : h.length) !== null && m !== void 0 ? m : 0;
2409
- })) : l;
2404
+ var s = i.reduce(function(d, a) {
2405
+ var c = a.match(/\n([\t ]+|(?!\s).)/g);
2406
+ return c ? d.concat(c.map(function(u) {
2407
+ var p, m;
2408
+ return (m = (p = u.match(/[\t ]/g)) === null || p === void 0 ? void 0 : p.length) !== null && m !== void 0 ? m : 0;
2409
+ })) : d;
2410
2410
  }, []);
2411
- if (n.length) {
2411
+ if (s.length) {
2412
2412
  var r = new RegExp(`
2413
- [ ]{` + Math.min.apply(Math, n) + "}", "g");
2414
- i = i.map(function(l) {
2415
- return l.replace(r, `
2413
+ [ ]{` + Math.min.apply(Math, s) + "}", "g");
2414
+ i = i.map(function(d) {
2415
+ return d.replace(r, `
2416
2416
  `);
2417
2417
  });
2418
2418
  }
2419
2419
  i[0] = i[0].replace(/^\r?\n/, "");
2420
2420
  var o = i[0];
2421
- return e.forEach(function(l, a) {
2422
- var u = o.match(/(?:^|\n)( *)$/), d = u ? u[1] : "", h = l;
2423
- typeof l == "string" && l.includes(`
2424
- `) && (h = String(l).split(`
2425
- `).map(function(m, x) {
2426
- return x === 0 ? m : "" + d + m;
2421
+ return e.forEach(function(d, a) {
2422
+ var c = o.match(/(?:^|\n)( *)$/), u = c ? c[1] : "", p = d;
2423
+ typeof d == "string" && d.includes(`
2424
+ `) && (p = String(d).split(`
2425
+ `).map(function(m, v) {
2426
+ return v === 0 ? m : "" + u + m;
2427
2427
  }).join(`
2428
- `)), o += h + i[a + 1];
2428
+ `)), o += p + i[a + 1];
2429
2429
  }), o;
2430
2430
  }
2431
- c(Ie, "dedent");
2432
- A.dedent = Ie;
2433
- A.default = Ie;
2431
+ l(Ie, "dedent");
2432
+ k.dedent = Ie;
2433
+ k.default = Ie;
2434
2434
  });
2435
2435
 
2436
2436
  // src/cli/bin/index.ts
2437
- var C = require("storybook/internal/common"), B = require("storybook/internal/node-logger"), Be = require("storybook/internal/telemetry"), E = $(ve(), 1);
2437
+ var C = require("storybook/internal/common"), B = require("storybook/internal/node-logger"), Be = require("storybook/internal/telemetry"), A = q(we(), 1);
2438
2438
 
2439
2439
  // ../node_modules/fd-package-json/dist/esm/main.js
2440
- var Ce = $(we(), 1), ke = require("node:path"), P = require("node:fs/promises"), Ae = require("node:fs");
2441
- async function ct(s) {
2440
+ var Ce = q(Oe(), 1), je = require("node:path"), D = require("node:fs/promises"), ke = require("node:fs");
2441
+ async function lt(n) {
2442
2442
  try {
2443
- return (await (0, P.stat)(s)).isFile();
2443
+ return (await (0, D.stat)(n)).isFile();
2444
2444
  } catch {
2445
2445
  return !1;
2446
2446
  }
2447
2447
  }
2448
- c(ct, "fileExists");
2449
- async function ut(s) {
2450
- for (let e of (0, Ce.walkUp)(s)) {
2451
- let t = (0, ke.resolve)(e, "package.json");
2452
- if (await ct(t))
2448
+ l(lt, "fileExists");
2449
+ async function ct(n) {
2450
+ for (let e of (0, Ce.walkUp)(n)) {
2451
+ let t = (0, je.resolve)(e, "package.json");
2452
+ if (await lt(t))
2453
2453
  return t;
2454
2454
  }
2455
2455
  return null;
2456
2456
  }
2457
- c(ut, "findPackagePath");
2458
- async function O(s) {
2459
- let e = await ut(s);
2457
+ l(ct, "findPackagePath");
2458
+ async function y(n) {
2459
+ let e = await ct(n);
2460
2460
  if (!e)
2461
2461
  return null;
2462
2462
  try {
2463
- let t = await (0, P.readFile)(e, { encoding: "utf8" });
2463
+ let t = await (0, D.readFile)(e, { encoding: "utf8" });
2464
2464
  return JSON.parse(t);
2465
2465
  } catch {
2466
2466
  return null;
2467
2467
  }
2468
2468
  }
2469
- c(O, "findPackage");
2469
+ l(y, "findPackage");
2470
2470
 
2471
2471
  // node_modules/leven/index.js
2472
- var re = [], Ee = [];
2473
- function se(s, e) {
2474
- if (s === e)
2472
+ var re = [], Ae = [];
2473
+ function ne(n, e) {
2474
+ if (n === e)
2475
2475
  return 0;
2476
- let t = s;
2477
- s.length > e.length && (s = e, e = t);
2478
- let i = s.length, n = e.length;
2479
- for (; i > 0 && s.charCodeAt(~-i) === e.charCodeAt(~-n); )
2480
- i--, n--;
2476
+ let t = n;
2477
+ n.length > e.length && (n = e, e = t);
2478
+ let i = n.length, s = e.length;
2479
+ for (; i > 0 && n.charCodeAt(~-i) === e.charCodeAt(~-s); )
2480
+ i--, s--;
2481
2481
  let r = 0;
2482
- for (; r < i && s.charCodeAt(r) === e.charCodeAt(r); )
2482
+ for (; r < i && n.charCodeAt(r) === e.charCodeAt(r); )
2483
2483
  r++;
2484
- if (i -= r, n -= r, i === 0)
2485
- return n;
2486
- let o, l, a, u, d = 0, h = 0;
2487
- for (; d < i; )
2488
- Ee[d] = s.charCodeAt(r + d), re[d] = ++d;
2489
- for (; h < n; )
2490
- for (o = e.charCodeAt(r + h), a = h++, l = h, d = 0; d < i; d++)
2491
- u = o === Ee[d] ? a : a + 1, a = re[d], l = re[d] = a > l ? u > l ? l + 1 : u : u > a ? a + 1 : u;
2492
- return l;
2484
+ if (i -= r, s -= r, i === 0)
2485
+ return s;
2486
+ let o, d, a, c, u = 0, p = 0;
2487
+ for (; u < i; )
2488
+ Ae[u] = n.charCodeAt(r + u), re[u] = ++u;
2489
+ for (; p < s; )
2490
+ for (o = e.charCodeAt(r + p), a = p++, d = p, u = 0; u < i; u++)
2491
+ c = o === Ae[u] ? a : a + 1, a = re[u], d = re[u] = a > d ? c > d ? d + 1 : c : c > a ? a + 1 : c;
2492
+ return d;
2493
2493
  }
2494
- c(se, "leven");
2494
+ l(ne, "leven");
2495
2495
 
2496
2496
  // src/cli/bin/index.ts
2497
- var S = $($e(), 1);
2497
+ var E = q(qe(), 1);
2498
2498
 
2499
2499
  // ../node_modules/tiny-invariant/dist/esm/tiny-invariant.js
2500
2500
  var mt = process.env.NODE_ENV === "production", ae = "Invariant failed";
2501
- function w(s, e) {
2502
- if (!s) {
2501
+ function O(n, e) {
2502
+ if (!n) {
2503
2503
  if (mt)
2504
2504
  throw new Error(ae);
2505
2505
  var t = typeof e == "function" ? e() : e, i = t ? "".concat(ae, ": ").concat(t) : ae;
2506
2506
  throw new Error(i);
2507
2507
  }
2508
2508
  }
2509
- c(w, "invariant");
2509
+ l(O, "invariant");
2510
2510
 
2511
2511
  // package.json
2512
- var Ve = "9.0.0-alpha.2";
2512
+ var $e = "9.0.0-alpha.20";
2513
2513
 
2514
2514
  // src/cli/build.ts
2515
- var He = require("storybook/internal/common"), N = require("storybook/internal/core-server");
2516
- var De = /* @__PURE__ */ c(async (s) => {
2517
- let e = await O(__dirname);
2518
- w(e, "Failed to find the closest package.json file.");
2515
+ var Ve = require("storybook/internal/common"), N = require("storybook/internal/core-server");
2516
+ var He = /* @__PURE__ */ l(async (n) => {
2517
+ let e = await y(__dirname);
2518
+ O(e, "Failed to find the closest package.json file.");
2519
2519
  let t = {
2520
- ...s,
2521
- configDir: s.configDir || "./.storybook",
2522
- outputDir: s.outputDir || "./storybook-static",
2523
- ignorePreview: !!s.previewUrl && !s.forceBuildPreview,
2520
+ ...n,
2521
+ configDir: n.configDir || "./.storybook",
2522
+ outputDir: n.outputDir || "./storybook-static",
2523
+ ignorePreview: !!n.previewUrl && !n.forceBuildPreview,
2524
2524
  configType: "PRODUCTION",
2525
- cache: He.cache,
2525
+ cache: Ve.cache,
2526
2526
  packageJson: e
2527
2527
  };
2528
2528
  await (0, N.withTelemetry)(
2529
2529
  "build",
2530
- { cliOptions: s, presetOptions: t },
2530
+ { cliOptions: n, presetOptions: t },
2531
2531
  () => (0, N.buildStaticStandalone)(t)
2532
2532
  );
2533
2533
  }, "build");
2534
2534
 
2535
2535
  // src/cli/buildIndex.ts
2536
- var Pe = require("storybook/internal/common"), T = require("storybook/internal/core-server");
2537
- var qe = /* @__PURE__ */ c(async (s) => {
2536
+ var De = require("storybook/internal/common"), T = require("storybook/internal/core-server");
2537
+ var Pe = /* @__PURE__ */ l(async (n) => {
2538
2538
  let e = {
2539
- ...s,
2540
- configDir: s.configDir || ".storybook",
2541
- outputFile: s.outputFile || "index.json",
2539
+ ...n,
2540
+ configDir: n.configDir || ".storybook",
2541
+ outputFile: n.outputFile || "index.json",
2542
2542
  ignorePreview: !0,
2543
2543
  configType: "PRODUCTION",
2544
- cache: Pe.cache,
2545
- packageJson: s.packageJson
2544
+ cache: De.cache,
2545
+ packageJson: n.packageJson
2546
2546
  }, t = {
2547
2547
  ...e,
2548
2548
  corePresets: [],
2549
2549
  overridePresets: []
2550
2550
  };
2551
- await (0, T.withTelemetry)("index", { cliOptions: s, presetOptions: t }, () => (0, T.buildIndexStandalone)(e));
2551
+ await (0, T.withTelemetry)("index", { cliOptions: n, presetOptions: t }, () => (0, T.buildIndexStandalone)(e));
2552
2552
  }, "buildIndex");
2553
2553
 
2554
2554
  // src/cli/dev.ts
2555
- var Te = require("storybook/internal/common"), F = require("storybook/internal/core-server"), _ = require("storybook/internal/node-logger");
2556
- var le = $(Ne(), 1);
2557
- function gt(s) {
2558
- _.instance.heading = "", s instanceof Error ? s.error ? _.logger.error(s.error) : s.stats && s.stats.compilation.errors ? s.stats.compilation.
2559
- errors.forEach((e) => _.logger.plain(e)) : _.logger.error(s) : s.compilation?.errors && s.compilation.errors.forEach((e) => _.logger.plain(
2560
- e)), _.logger.line(), _.logger.warn(
2561
- s.close ? le.dedent`
2555
+ var Te = require("storybook/internal/common"), F = require("storybook/internal/core-server"), x = require("storybook/internal/node-logger");
2556
+ var de = q(Ne(), 1);
2557
+ function ft(n) {
2558
+ x.instance.heading = "", n instanceof Error ? n.error ? x.logger.error(n.error) : n.stats && n.stats.compilation.errors ? n.stats.compilation.
2559
+ errors.forEach((e) => x.logger.plain(e)) : x.logger.error(n) : n.compilation?.errors && n.compilation.errors.forEach((e) => x.logger.plain(
2560
+ e)), x.logger.line(), x.logger.warn(
2561
+ n.close ? de.dedent`
2562
2562
  FATAL broken build!, will close the process,
2563
2563
  Fix the error below and restart storybook.
2564
- ` : le.dedent`
2564
+ ` : de.dedent`
2565
2565
  Broken build, fix the error above.
2566
2566
  You may need to refresh the browser.
2567
2567
  `
2568
- ), _.logger.line();
2568
+ ), x.logger.line();
2569
2569
  }
2570
- c(gt, "printError");
2571
- var Fe = /* @__PURE__ */ c(async (s) => {
2570
+ l(ft, "printError");
2571
+ var Fe = /* @__PURE__ */ l(async (n) => {
2572
2572
  let { env: e } = process;
2573
2573
  e.NODE_ENV = e.NODE_ENV || "development";
2574
- let t = await O(__dirname);
2575
- w(t, "Failed to find the closest package.json file.");
2574
+ let t = await y(__dirname);
2575
+ O(t, "Failed to find the closest package.json file.");
2576
2576
  let i = {
2577
- ...s,
2578
- configDir: s.configDir || "./.storybook",
2577
+ ...n,
2578
+ configDir: n.configDir || "./.storybook",
2579
2579
  configType: "DEVELOPMENT",
2580
- ignorePreview: !!s.previewUrl && !s.forceBuildPreview,
2580
+ ignorePreview: !!n.previewUrl && !n.forceBuildPreview,
2581
2581
  cache: Te.cache,
2582
2582
  packageJson: t
2583
2583
  };
2584
2584
  await (0, F.withTelemetry)(
2585
2585
  "dev",
2586
2586
  {
2587
- cliOptions: s,
2587
+ cliOptions: n,
2588
2588
  presetOptions: i,
2589
- printError: gt
2589
+ printError: ft
2590
2590
  },
2591
2591
  () => (0, F.buildDevStandalone)(i)
2592
2592
  );
@@ -2594,14 +2594,14 @@ var Fe = /* @__PURE__ */ c(async (s) => {
2594
2594
 
2595
2595
  // src/cli/bin/index.ts
2596
2596
  (0, Be.addToGlobalContext)("cliVersion", C.versions.storybook);
2597
- var j = console, ce = /* @__PURE__ */ c((s) => E.program.command(s).option(
2597
+ var S = console, le = /* @__PURE__ */ l((n) => A.program.command(n).option(
2598
2598
  "--disable-telemetry",
2599
2599
  "Disable sending telemetry data",
2600
2600
  // default value is false, but if the user sets STORYBOOK_DISABLE_TELEMETRY, it can be true
2601
2601
  process.env.STORYBOOK_DISABLE_TELEMETRY && process.env.STORYBOOK_DISABLE_TELEMETRY !== "false"
2602
2602
  ).option("--debug", "Get more logs in debug mode", !1).option("--enable-crash-reports", "Enable sending crash reports to telemetry data"), "\
2603
2603
  command");
2604
- ce("dev").option("-p, --port <number>", "Port to run Storybook", (s) => parseInt(s, 10)).option("-h, --host <string>", "Host to run Storyboo\
2604
+ le("dev").option("-p, --port <number>", "Port to run Storybook", (n) => parseInt(n, 10)).option("-h, --host <string>", "Host to run Storyboo\
2605
2605
  k").option("-c, --config-dir <dir-name>", "Directory where to load Storybook configurations from").option(
2606
2606
  "--https",
2607
2607
  "Serve Storybook over HTTPS. Note: You must provide your own certificate information."
@@ -2623,19 +2623,19 @@ ack", "Display final webpack configurations for debugging purposes").option(
2623
2623
  ly site using addon-docs").option("--exact-port", "Exit early if the desired port is not available").option(
2624
2624
  "--initial-path [path]",
2625
2625
  "URL path to be appended when visiting Storybook for the first time"
2626
- ).action(async (s) => {
2627
- B.logger.setLevel(s.loglevel);
2628
- let e = await O(__dirname);
2629
- w(e, "Failed to find the closest package.json file."), j.log(S.default.bold(`${e.name} v${e.version}`) + S.default.reset(`
2630
- `)), (0, C.getEnvConfig)(s, {
2626
+ ).action(async (n) => {
2627
+ B.logger.setLevel(n.loglevel);
2628
+ let e = await y(__dirname);
2629
+ O(e, "Failed to find the closest package.json file."), S.log(E.default.bold(`${e.name} v${e.version}`) + E.default.reset(`
2630
+ `)), (0, C.getEnvConfig)(n, {
2631
2631
  port: "SBCONFIG_PORT",
2632
2632
  host: "SBCONFIG_HOSTNAME",
2633
2633
  staticDir: "SBCONFIG_STATIC_DIR",
2634
2634
  configDir: "SBCONFIG_CONFIG_DIR",
2635
2635
  ci: "CI"
2636
- }), parseInt(`${s.port}`, 10) && (s.port = parseInt(`${s.port}`, 10)), await Fe({ ...s, packageJson: e }).catch(() => process.exit(1));
2636
+ }), parseInt(`${n.port}`, 10) && (n.port = parseInt(`${n.port}`, 10)), await Fe({ ...n, packageJson: e }).catch(() => process.exit(1));
2637
2637
  });
2638
- ce("build").option("-o, --output-dir <dir-name>", "Directory where to store built files").option("-c, --config-dir <dir-name>", "Directory w\
2638
+ le("build").option("-o, --output-dir <dir-name>", "Directory where to store built files").option("-c, --config-dir <dir-name>", "Directory w\
2639
2639
  here to load Storybook configurations from").option("--quiet", "Suppress verbose build output").option("--loglevel <level>", "Control level \
2640
2640
  of logging during build").option("--debug-webpack", "Display final webpack configurations for debugging purposes").option(
2641
2641
  "--webpack-stats-json [directory]",
@@ -2644,44 +2644,44 @@ of logging during build").option("--debug-webpack", "Display final webpack confi
2644
2644
  "--preview-url <string>",
2645
2645
  "Disables the default storybook preview and lets your use your own"
2646
2646
  ).option("--force-build-preview", "Build the preview iframe even if you are using --preview-url").option("--docs", "Build a documentation-on\
2647
- ly site using addon-docs").option("--test", "Build stories optimized for testing purposes.").action(async (s) => {
2647
+ ly site using addon-docs").option("--test", "Build stories optimized for testing purposes.").action(async (n) => {
2648
2648
  let { env: e } = process;
2649
2649
  e.NODE_ENV = e.NODE_ENV || "production";
2650
- let t = await O(__dirname);
2651
- w(t, "Failed to find the closest package.json file."), B.logger.setLevel(s.loglevel), j.log(S.default.bold(`${t.name} v${t.version}
2652
- `)), (0, C.getEnvConfig)(s, {
2650
+ let t = await y(__dirname);
2651
+ O(t, "Failed to find the closest package.json file."), B.logger.setLevel(n.loglevel), S.log(E.default.bold(`${t.name} v${t.version}
2652
+ `)), (0, C.getEnvConfig)(n, {
2653
2653
  staticDir: "SBCONFIG_STATIC_DIR",
2654
2654
  outputDir: "SBCONFIG_OUTPUT_DIR",
2655
2655
  configDir: "SBCONFIG_CONFIG_DIR"
2656
- }), await De({
2657
- ...s,
2656
+ }), await He({
2657
+ ...n,
2658
2658
  packageJson: t,
2659
- test: !!s.test || process.env.SB_TESTBUILD === "true"
2659
+ test: !!n.test || process.env.SB_TESTBUILD === "true"
2660
2660
  }).catch(() => process.exit(1));
2661
2661
  });
2662
- ce("index").option("-o, --output-file <file-name>", "JSON file to output index").option("-c, --config-dir <dir-name>", "Directory where to l\
2662
+ le("index").option("-o, --output-file <file-name>", "JSON file to output index").option("-c, --config-dir <dir-name>", "Directory where to l\
2663
2663
  oad Storybook configurations from").option("--quiet", "Suppress verbose build output").option("--loglevel <level>", "Control level of loggin\
2664
- g during build").action(async (s) => {
2664
+ g during build").action(async (n) => {
2665
2665
  let { env: e } = process;
2666
2666
  e.NODE_ENV = e.NODE_ENV || "production";
2667
- let t = await O(__dirname);
2668
- w(t, "Failed to find the closest package.json file."), B.logger.setLevel(s.loglevel), j.log(S.default.bold(`${t.name} v${t.version}
2669
- `)), (0, C.getEnvConfig)(s, {
2667
+ let t = await y(__dirname);
2668
+ O(t, "Failed to find the closest package.json file."), B.logger.setLevel(n.loglevel), S.log(E.default.bold(`${t.name} v${t.version}
2669
+ `)), (0, C.getEnvConfig)(n, {
2670
2670
  configDir: "SBCONFIG_CONFIG_DIR",
2671
2671
  outputFile: "SBCONFIG_OUTPUT_FILE"
2672
- }), await qe({
2673
- ...s,
2672
+ }), await Pe({
2673
+ ...n,
2674
2674
  packageJson: t
2675
2675
  }).catch(() => process.exit(1));
2676
2676
  });
2677
- E.program.on("command:*", ([s]) => {
2678
- j.error(
2677
+ A.program.on("command:*", ([n]) => {
2678
+ S.error(
2679
2679
  ` Invalid command: %s.
2680
2680
  See --help for a list of available commands.`,
2681
- s
2681
+ n
2682
2682
  );
2683
- let t = E.program.commands.map((i) => i.name()).find((i) => se(i, s) < 3);
2684
- t && j.info(`
2683
+ let t = A.program.commands.map((i) => i.name()).find((i) => ne(i, n) < 3);
2684
+ t && S.info(`
2685
2685
  Did you mean ${t}?`), process.exit(1);
2686
2686
  });
2687
- E.program.usage("<command> [options]").version(String(Ve)).parse(process.argv);
2687
+ A.program.usage("<command> [options]").version(String($e)).parse(process.argv);