@wix/cli-app 1.1.58 → 1.1.59

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 (91) hide show
  1. package/build/{CreateVersionCommand-NNN5WEDG.js → CreateVersionCommand-6HJGN4WS.js} +16 -16
  2. package/build/{DevCommand-DTV4QLZX.js → DevCommand-U7PV4HW6.js} +15 -15
  3. package/build/DevCommand-U7PV4HW6.js.map +1 -0
  4. package/build/{GenerateCommand-3EILY6GU.js → GenerateCommand-M3T6OD4B.js} +295 -181
  5. package/build/GenerateCommand-M3T6OD4B.js.map +1 -0
  6. package/build/{LogsCommand-GBLWWXA4.js → LogsCommand-ECPZQ3LE.js} +4 -4
  7. package/build/PreviewCommand-ZQ3OUOKW.js +23 -0
  8. package/build/ReleaseCommand-KLZWNOVY.js +91 -0
  9. package/build/ReleaseCommand-KLZWNOVY.js.map +1 -0
  10. package/build/{ServeCommand-HBKGVBCD.js → ServeCommand-I65XXTLM.js} +13 -13
  11. package/build/{build-NYCCEFPM.js → build-HZ5LVFAS.js} +10 -9
  12. package/build/build-HZ5LVFAS.js.map +1 -0
  13. package/build/{chunk-XRPBC4UX.js → chunk-4JDHJDA5.js} +3 -3
  14. package/build/{chunk-NTTJJSCK.js → chunk-ACN6EZGH.js} +3 -3
  15. package/build/{chunk-IWJPJJEU.js → chunk-AQKGIDJO.js} +1969 -342
  16. package/build/chunk-AQKGIDJO.js.map +1 -0
  17. package/build/{chunk-RFDDKVTR.js → chunk-BNROT2BN.js} +5 -5
  18. package/build/{chunk-2ROHQF53.js → chunk-DXNFLVQP.js} +477 -484
  19. package/build/chunk-DXNFLVQP.js.map +1 -0
  20. package/build/{chunk-PUIMS4NQ.js → chunk-EZLVJJON.js} +3 -3
  21. package/build/{chunk-DKKXEKW7.js → chunk-FHMCCDCY.js} +3 -3
  22. package/build/{chunk-P5P6YINI.js → chunk-FMM24YL4.js} +2018 -886
  23. package/build/chunk-FMM24YL4.js.map +1 -0
  24. package/build/{chunk-CDB46GX7.js → chunk-IDWDZWLM.js} +2 -2
  25. package/build/{chunk-MVNY3M6D.js → chunk-OCC6MO6R.js} +5 -5
  26. package/build/{chunk-UGZFZOEU.js → chunk-PAWIUC26.js} +8 -8
  27. package/build/{chunk-SE6QML7T.js → chunk-QVGYU6D4.js} +17 -7
  28. package/build/chunk-QVGYU6D4.js.map +1 -0
  29. package/build/{chunk-FQ554CIC.js → chunk-QW4WBWJK.js} +3 -3
  30. package/build/{chunk-ZDKKDXHS.js → chunk-U72IPCQR.js} +3 -3
  31. package/build/{chunk-TQB6XTPS.js → chunk-UQBZVJDQ.js} +6 -3
  32. package/build/chunk-UQBZVJDQ.js.map +1 -0
  33. package/build/{chunk-JSDDG7MC.js → chunk-W4HI7DI3.js} +2 -2
  34. package/build/{chunk-QVLKHYBX.js → chunk-ZJYRE4BT.js} +3 -3
  35. package/build/{chunk-XIKZ45R2.js → chunk-ZXHKA32C.js} +56 -12
  36. package/build/chunk-ZXHKA32C.js.map +1 -0
  37. package/build/cloudflare-runtime/entry.js +306 -252
  38. package/build/cloudflare-runtime/getRegisteredExtensions.js +21 -273
  39. package/build/index.js +444 -134
  40. package/build/index.js.map +1 -1
  41. package/build/platform-sdk/chunk-7EYXEF6M.js +2 -0
  42. package/build/platform-sdk/chunk-7EYXEF6M.js.map +1 -0
  43. package/build/platform-sdk/chunk-EVF6HSFE.js +2 -0
  44. package/build/platform-sdk/chunk-EVF6HSFE.js.map +1 -0
  45. package/build/platform-sdk/chunk-LO6MZPZE.js +2 -0
  46. package/build/platform-sdk/chunk-LO6MZPZE.js.map +1 -0
  47. package/build/platform-sdk/dashboard.js +1 -1
  48. package/build/platform-sdk/dashboard.js.map +1 -1
  49. package/build/platform-sdk/editor.js +4 -4
  50. package/build/platform-sdk/editor.js.map +1 -1
  51. package/build/platform-sdk/site.js +1 -1
  52. package/build/platform-sdk/site.js.map +1 -1
  53. package/build/platform-sdk/web-methods.js +2 -0
  54. package/build/platform-sdk/web-methods.js.map +1 -0
  55. package/build/{preview-CCEFGOHW.js → preview-FI6WYZUP.js} +13 -13
  56. package/build/preview-FI6WYZUP.js.map +1 -0
  57. package/build/{render-command-T2HCJX3F.js → render-command-UKYXN7C7.js} +6 -6
  58. package/package.json +13 -10
  59. package/templates/web-method/files/placeholder.ts.ejs +17 -0
  60. package/build/DevCommand-DTV4QLZX.js.map +0 -1
  61. package/build/GenerateCommand-3EILY6GU.js.map +0 -1
  62. package/build/PreviewCommand-A2C52TVM.js +0 -23
  63. package/build/build-NYCCEFPM.js.map +0 -1
  64. package/build/chunk-2ROHQF53.js.map +0 -1
  65. package/build/chunk-IWJPJJEU.js.map +0 -1
  66. package/build/chunk-P5P6YINI.js.map +0 -1
  67. package/build/chunk-SE6QML7T.js.map +0 -1
  68. package/build/chunk-TQB6XTPS.js.map +0 -1
  69. package/build/chunk-XIKZ45R2.js.map +0 -1
  70. package/build/platform-sdk/chunk-DGX4CFXG.js +0 -2
  71. package/build/platform-sdk/chunk-DGX4CFXG.js.map +0 -1
  72. package/build/platform-sdk/chunk-TN6HYRXL.js +0 -2
  73. package/build/platform-sdk/chunk-TN6HYRXL.js.map +0 -1
  74. package/build/preview-CCEFGOHW.js.map +0 -1
  75. /package/build/{CreateVersionCommand-NNN5WEDG.js.map → CreateVersionCommand-6HJGN4WS.js.map} +0 -0
  76. /package/build/{LogsCommand-GBLWWXA4.js.map → LogsCommand-ECPZQ3LE.js.map} +0 -0
  77. /package/build/{PreviewCommand-A2C52TVM.js.map → PreviewCommand-ZQ3OUOKW.js.map} +0 -0
  78. /package/build/{ServeCommand-HBKGVBCD.js.map → ServeCommand-I65XXTLM.js.map} +0 -0
  79. /package/build/{chunk-XRPBC4UX.js.map → chunk-4JDHJDA5.js.map} +0 -0
  80. /package/build/{chunk-NTTJJSCK.js.map → chunk-ACN6EZGH.js.map} +0 -0
  81. /package/build/{chunk-RFDDKVTR.js.map → chunk-BNROT2BN.js.map} +0 -0
  82. /package/build/{chunk-PUIMS4NQ.js.map → chunk-EZLVJJON.js.map} +0 -0
  83. /package/build/{chunk-DKKXEKW7.js.map → chunk-FHMCCDCY.js.map} +0 -0
  84. /package/build/{chunk-CDB46GX7.js.map → chunk-IDWDZWLM.js.map} +0 -0
  85. /package/build/{chunk-MVNY3M6D.js.map → chunk-OCC6MO6R.js.map} +0 -0
  86. /package/build/{chunk-UGZFZOEU.js.map → chunk-PAWIUC26.js.map} +0 -0
  87. /package/build/{chunk-FQ554CIC.js.map → chunk-QW4WBWJK.js.map} +0 -0
  88. /package/build/{chunk-ZDKKDXHS.js.map → chunk-U72IPCQR.js.map} +0 -0
  89. /package/build/{chunk-JSDDG7MC.js.map → chunk-W4HI7DI3.js.map} +0 -0
  90. /package/build/{chunk-QVLKHYBX.js.map → chunk-ZJYRE4BT.js.map} +0 -0
  91. /package/build/{render-command-T2HCJX3F.js.map → render-command-UKYXN7C7.js.map} +0 -0
package/build/index.js CHANGED
@@ -2,13 +2,13 @@ import { createRequire as _createRequire } from 'node:module';
2
2
  const require = _createRequire(import.meta.url);
3
3
  import {
4
4
  createI18nT
5
- } from "./chunk-XRPBC4UX.js";
6
- import "./chunk-SE6QML7T.js";
5
+ } from "./chunk-4JDHJDA5.js";
6
+ import "./chunk-QVGYU6D4.js";
7
7
  import {
8
8
  require_react,
9
9
  version,
10
10
  z
11
- } from "./chunk-2ROHQF53.js";
11
+ } from "./chunk-DXNFLVQP.js";
12
12
  import {
13
13
  __commonJS,
14
14
  __require,
@@ -191,10 +191,22 @@ var require_help = __commonJS({
191
191
  var Help2 = class {
192
192
  constructor() {
193
193
  this.helpWidth = void 0;
194
+ this.minWidthToWrap = 40;
194
195
  this.sortSubcommands = false;
195
196
  this.sortOptions = false;
196
197
  this.showGlobalOptions = false;
197
198
  }
199
+ /**
200
+ * prepareContext is called by Commander after applying overrides from `Command.configureHelp()`
201
+ * and just before calling `formatHelp()`.
202
+ *
203
+ * Commander just uses the helpWidth and the rest is provided for optional use by more complex subclasses.
204
+ *
205
+ * @param {{ error?: boolean, helpWidth?: number, outputHasColors?: boolean }} contextOptions
206
+ */
207
+ prepareContext(contextOptions) {
208
+ this.helpWidth = this.helpWidth ?? contextOptions.helpWidth ?? 80;
209
+ }
198
210
  /**
199
211
  * Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one.
200
212
  *
@@ -331,7 +343,12 @@ var require_help = __commonJS({
331
343
  */
332
344
  longestSubcommandTermLength(cmd, helper) {
333
345
  return helper.visibleCommands(cmd).reduce((max, command) => {
334
- return Math.max(max, helper.subcommandTerm(command).length);
346
+ return Math.max(
347
+ max,
348
+ this.displayWidth(
349
+ helper.styleSubcommandTerm(helper.subcommandTerm(command))
350
+ )
351
+ );
335
352
  }, 0);
336
353
  }
337
354
  /**
@@ -343,7 +360,10 @@ var require_help = __commonJS({
343
360
  */
344
361
  longestOptionTermLength(cmd, helper) {
345
362
  return helper.visibleOptions(cmd).reduce((max, option) => {
346
- return Math.max(max, helper.optionTerm(option).length);
363
+ return Math.max(
364
+ max,
365
+ this.displayWidth(helper.styleOptionTerm(helper.optionTerm(option)))
366
+ );
347
367
  }, 0);
348
368
  }
349
369
  /**
@@ -355,7 +375,10 @@ var require_help = __commonJS({
355
375
  */
356
376
  longestGlobalOptionTermLength(cmd, helper) {
357
377
  return helper.visibleGlobalOptions(cmd).reduce((max, option) => {
358
- return Math.max(max, helper.optionTerm(option).length);
378
+ return Math.max(
379
+ max,
380
+ this.displayWidth(helper.styleOptionTerm(helper.optionTerm(option)))
381
+ );
359
382
  }, 0);
360
383
  }
361
384
  /**
@@ -367,7 +390,12 @@ var require_help = __commonJS({
367
390
  */
368
391
  longestArgumentTermLength(cmd, helper) {
369
392
  return helper.visibleArguments(cmd).reduce((max, argument) => {
370
- return Math.max(max, helper.argumentTerm(argument).length);
393
+ return Math.max(
394
+ max,
395
+ this.displayWidth(
396
+ helper.styleArgumentTerm(helper.argumentTerm(argument))
397
+ )
398
+ );
371
399
  }, 0);
372
400
  }
373
401
  /**
@@ -459,11 +487,11 @@ var require_help = __commonJS({
459
487
  );
460
488
  }
461
489
  if (extraInfo.length > 0) {
462
- const extraDescripton = `(${extraInfo.join(", ")})`;
490
+ const extraDescription = `(${extraInfo.join(", ")})`;
463
491
  if (argument.description) {
464
- return `${argument.description} ${extraDescripton}`;
492
+ return `${argument.description} ${extraDescription}`;
465
493
  }
466
- return extraDescripton;
494
+ return extraDescription;
467
495
  }
468
496
  return argument.description;
469
497
  }
@@ -476,75 +504,148 @@ var require_help = __commonJS({
476
504
  */
477
505
  formatHelp(cmd, helper) {
478
506
  const termWidth = helper.padWidth(cmd, helper);
479
- const helpWidth = helper.helpWidth || 80;
480
- const itemIndentWidth = 2;
481
- const itemSeparatorWidth = 2;
482
- function formatItem(term, description) {
483
- if (description) {
484
- const fullText = `${term.padEnd(termWidth + itemSeparatorWidth)}${description}`;
485
- return helper.wrap(
486
- fullText,
487
- helpWidth - itemIndentWidth,
488
- termWidth + itemSeparatorWidth
489
- );
490
- }
491
- return term;
492
- }
493
- function formatList(textArray) {
494
- return textArray.join("\n").replace(/^/gm, " ".repeat(itemIndentWidth));
495
- }
496
- let output = [`Usage: ${helper.commandUsage(cmd)}`, ""];
507
+ const helpWidth = helper.helpWidth ?? 80;
508
+ function callFormatItem(term, description) {
509
+ return helper.formatItem(term, termWidth, description, helper);
510
+ }
511
+ let output = [
512
+ `${helper.styleTitle("Usage:")} ${helper.styleUsage(helper.commandUsage(cmd))}`,
513
+ ""
514
+ ];
497
515
  const commandDescription = helper.commandDescription(cmd);
498
516
  if (commandDescription.length > 0) {
499
517
  output = output.concat([
500
- helper.wrap(commandDescription, helpWidth, 0),
518
+ helper.boxWrap(
519
+ helper.styleCommandDescription(commandDescription),
520
+ helpWidth
521
+ ),
501
522
  ""
502
523
  ]);
503
524
  }
504
525
  const argumentList = helper.visibleArguments(cmd).map((argument) => {
505
- return formatItem(
506
- helper.argumentTerm(argument),
507
- helper.argumentDescription(argument)
526
+ return callFormatItem(
527
+ helper.styleArgumentTerm(helper.argumentTerm(argument)),
528
+ helper.styleArgumentDescription(helper.argumentDescription(argument))
508
529
  );
509
530
  });
510
531
  if (argumentList.length > 0) {
511
- output = output.concat(["Arguments:", formatList(argumentList), ""]);
532
+ output = output.concat([
533
+ helper.styleTitle("Arguments:"),
534
+ ...argumentList,
535
+ ""
536
+ ]);
512
537
  }
513
538
  const optionList = helper.visibleOptions(cmd).map((option) => {
514
- return formatItem(
515
- helper.optionTerm(option),
516
- helper.optionDescription(option)
539
+ return callFormatItem(
540
+ helper.styleOptionTerm(helper.optionTerm(option)),
541
+ helper.styleOptionDescription(helper.optionDescription(option))
517
542
  );
518
543
  });
519
544
  if (optionList.length > 0) {
520
- output = output.concat(["Options:", formatList(optionList), ""]);
545
+ output = output.concat([
546
+ helper.styleTitle("Options:"),
547
+ ...optionList,
548
+ ""
549
+ ]);
521
550
  }
522
- if (this.showGlobalOptions) {
551
+ if (helper.showGlobalOptions) {
523
552
  const globalOptionList = helper.visibleGlobalOptions(cmd).map((option) => {
524
- return formatItem(
525
- helper.optionTerm(option),
526
- helper.optionDescription(option)
553
+ return callFormatItem(
554
+ helper.styleOptionTerm(helper.optionTerm(option)),
555
+ helper.styleOptionDescription(helper.optionDescription(option))
527
556
  );
528
557
  });
529
558
  if (globalOptionList.length > 0) {
530
559
  output = output.concat([
531
- "Global Options:",
532
- formatList(globalOptionList),
560
+ helper.styleTitle("Global Options:"),
561
+ ...globalOptionList,
533
562
  ""
534
563
  ]);
535
564
  }
536
565
  }
537
566
  const commandList = helper.visibleCommands(cmd).map((cmd2) => {
538
- return formatItem(
539
- helper.subcommandTerm(cmd2),
540
- helper.subcommandDescription(cmd2)
567
+ return callFormatItem(
568
+ helper.styleSubcommandTerm(helper.subcommandTerm(cmd2)),
569
+ helper.styleSubcommandDescription(helper.subcommandDescription(cmd2))
541
570
  );
542
571
  });
543
572
  if (commandList.length > 0) {
544
- output = output.concat(["Commands:", formatList(commandList), ""]);
573
+ output = output.concat([
574
+ helper.styleTitle("Commands:"),
575
+ ...commandList,
576
+ ""
577
+ ]);
545
578
  }
546
579
  return output.join("\n");
547
580
  }
581
+ /**
582
+ * Return display width of string, ignoring ANSI escape sequences. Used in padding and wrapping calculations.
583
+ *
584
+ * @param {string} str
585
+ * @returns {number}
586
+ */
587
+ displayWidth(str) {
588
+ return stripColor(str).length;
589
+ }
590
+ /**
591
+ * Style the title for displaying in the help. Called with 'Usage:', 'Options:', etc.
592
+ *
593
+ * @param {string} str
594
+ * @returns {string}
595
+ */
596
+ styleTitle(str) {
597
+ return str;
598
+ }
599
+ styleUsage(str) {
600
+ return str.split(" ").map((word) => {
601
+ if (word === "[options]") return this.styleOptionText(word);
602
+ if (word === "[command]") return this.styleSubcommandText(word);
603
+ if (word[0] === "[" || word[0] === "<")
604
+ return this.styleArgumentText(word);
605
+ return this.styleCommandText(word);
606
+ }).join(" ");
607
+ }
608
+ styleCommandDescription(str) {
609
+ return this.styleDescriptionText(str);
610
+ }
611
+ styleOptionDescription(str) {
612
+ return this.styleDescriptionText(str);
613
+ }
614
+ styleSubcommandDescription(str) {
615
+ return this.styleDescriptionText(str);
616
+ }
617
+ styleArgumentDescription(str) {
618
+ return this.styleDescriptionText(str);
619
+ }
620
+ styleDescriptionText(str) {
621
+ return str;
622
+ }
623
+ styleOptionTerm(str) {
624
+ return this.styleOptionText(str);
625
+ }
626
+ styleSubcommandTerm(str) {
627
+ return str.split(" ").map((word) => {
628
+ if (word === "[options]") return this.styleOptionText(word);
629
+ if (word[0] === "[" || word[0] === "<")
630
+ return this.styleArgumentText(word);
631
+ return this.styleSubcommandText(word);
632
+ }).join(" ");
633
+ }
634
+ styleArgumentTerm(str) {
635
+ return this.styleArgumentText(str);
636
+ }
637
+ styleOptionText(str) {
638
+ return str;
639
+ }
640
+ styleArgumentText(str) {
641
+ return str;
642
+ }
643
+ styleSubcommandText(str) {
644
+ return str;
645
+ }
646
+ styleCommandText(str) {
647
+ return str;
648
+ }
548
649
  /**
549
650
  * Calculate the pad width from the maximum term length.
550
651
  *
@@ -561,40 +662,94 @@ var require_help = __commonJS({
561
662
  );
562
663
  }
563
664
  /**
564
- * Wrap the given string to width characters per line, with lines after the first indented.
565
- * Do not wrap if insufficient room for wrapping (minColumnWidth), or string is manually formatted.
665
+ * Detect manually wrapped and indented strings by checking for line break followed by whitespace.
566
666
  *
567
667
  * @param {string} str
568
- * @param {number} width
569
- * @param {number} indent
570
- * @param {number} [minColumnWidth=40]
571
- * @return {string}
668
+ * @returns {boolean}
669
+ */
670
+ preformatted(str) {
671
+ return /\n[^\S\r\n]/.test(str);
672
+ }
673
+ /**
674
+ * Format the "item", which consists of a term and description. Pad the term and wrap the description, indenting the following lines.
675
+ *
676
+ * So "TTT", 5, "DDD DDDD DD DDD" might be formatted for this.helpWidth=17 like so:
677
+ * TTT DDD DDDD
678
+ * DD DDD
572
679
  *
680
+ * @param {string} term
681
+ * @param {number} termWidth
682
+ * @param {string} description
683
+ * @param {Help} helper
684
+ * @returns {string}
573
685
  */
574
- wrap(str, width, indent, minColumnWidth = 40) {
575
- const indents = " \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF";
576
- const manualIndent = new RegExp(`[\\n][${indents}]+`);
577
- if (str.match(manualIndent)) return str;
578
- const columnWidth = width - indent;
579
- if (columnWidth < minColumnWidth) return str;
580
- const leadingStr = str.slice(0, indent);
581
- const columnText = str.slice(indent).replace("\r\n", "\n");
582
- const indentString = " ".repeat(indent);
583
- const zeroWidthSpace = "\u200B";
584
- const breaks = `\\s${zeroWidthSpace}`;
585
- const regex = new RegExp(
586
- `
587
- |.{1,${columnWidth - 1}}([${breaks}]|$)|[^${breaks}]+?([${breaks}]|$)`,
588
- "g"
686
+ formatItem(term, termWidth, description, helper) {
687
+ const itemIndent = 2;
688
+ const itemIndentStr = " ".repeat(itemIndent);
689
+ if (!description) return itemIndentStr + term;
690
+ const paddedTerm = term.padEnd(
691
+ termWidth + term.length - helper.displayWidth(term)
589
692
  );
590
- const lines = columnText.match(regex) || [];
591
- return leadingStr + lines.map((line, i) => {
592
- if (line === "\n") return "";
593
- return (i > 0 ? indentString : "") + line.trimEnd();
594
- }).join("\n");
693
+ const spacerWidth = 2;
694
+ const helpWidth = this.helpWidth ?? 80;
695
+ const remainingWidth = helpWidth - termWidth - spacerWidth - itemIndent;
696
+ let formattedDescription;
697
+ if (remainingWidth < this.minWidthToWrap || helper.preformatted(description)) {
698
+ formattedDescription = description;
699
+ } else {
700
+ const wrappedDescription = helper.boxWrap(description, remainingWidth);
701
+ formattedDescription = wrappedDescription.replace(
702
+ /\n/g,
703
+ "\n" + " ".repeat(termWidth + spacerWidth)
704
+ );
705
+ }
706
+ return itemIndentStr + paddedTerm + " ".repeat(spacerWidth) + formattedDescription.replace(/\n/g, `
707
+ ${itemIndentStr}`);
708
+ }
709
+ /**
710
+ * Wrap a string at whitespace, preserving existing line breaks.
711
+ * Wrapping is skipped if the width is less than `minWidthToWrap`.
712
+ *
713
+ * @param {string} str
714
+ * @param {number} width
715
+ * @returns {string}
716
+ */
717
+ boxWrap(str, width) {
718
+ if (width < this.minWidthToWrap) return str;
719
+ const rawLines = str.split(/\r\n|\n/);
720
+ const chunkPattern = /[\s]*[^\s]+/g;
721
+ const wrappedLines = [];
722
+ rawLines.forEach((line) => {
723
+ const chunks = line.match(chunkPattern);
724
+ if (chunks === null) {
725
+ wrappedLines.push("");
726
+ return;
727
+ }
728
+ let sumChunks = [chunks.shift()];
729
+ let sumWidth = this.displayWidth(sumChunks[0]);
730
+ chunks.forEach((chunk) => {
731
+ const visibleWidth = this.displayWidth(chunk);
732
+ if (sumWidth + visibleWidth <= width) {
733
+ sumChunks.push(chunk);
734
+ sumWidth += visibleWidth;
735
+ return;
736
+ }
737
+ wrappedLines.push(sumChunks.join(""));
738
+ const nextChunk = chunk.trimStart();
739
+ sumChunks = [nextChunk];
740
+ sumWidth = this.displayWidth(nextChunk);
741
+ });
742
+ wrappedLines.push(sumChunks.join(""));
743
+ });
744
+ return wrappedLines.join("\n");
595
745
  }
596
746
  };
747
+ function stripColor(str) {
748
+ const sgrPattern = /\x1b\[\d*(;\d*)*m/g;
749
+ return str.replace(sgrPattern, "");
750
+ }
597
751
  exports.Help = Help2;
752
+ exports.stripColor = stripColor;
598
753
  }
599
754
  });
600
755
 
@@ -784,12 +939,15 @@ var require_option = __commonJS({
784
939
  }
785
940
  /**
786
941
  * Return option name, in a camelcase format that can be used
787
- * as a object attribute key.
942
+ * as an object attribute key.
788
943
  *
789
944
  * @return {string}
790
945
  */
791
946
  attributeName() {
792
- return camelcase(this.name().replace(/^no-/, ""));
947
+ if (this.negate) {
948
+ return camelcase(this.name().replace(/^no-/, ""));
949
+ }
950
+ return camelcase(this.name());
793
951
  }
794
952
  /**
795
953
  * Check if `arg` matches the short or long flag.
@@ -857,14 +1015,25 @@ var require_option = __commonJS({
857
1015
  function splitOptionFlags(flags) {
858
1016
  let shortFlag;
859
1017
  let longFlag;
860
- const flagParts = flags.split(/[ |,]+/);
861
- if (flagParts.length > 1 && !/^[[<]/.test(flagParts[1]))
862
- shortFlag = flagParts.shift();
863
- longFlag = flagParts.shift();
864
- if (!shortFlag && /^-[^-]$/.test(longFlag)) {
865
- shortFlag = longFlag;
866
- longFlag = void 0;
867
- }
1018
+ const shortFlagExp = /^-[^-]$/;
1019
+ const longFlagExp = /^--[^-]/;
1020
+ const flagParts = flags.split(/[ |,]+/).concat("guard");
1021
+ if (shortFlagExp.test(flagParts[0])) shortFlag = flagParts.shift();
1022
+ if (longFlagExp.test(flagParts[0])) longFlag = flagParts.shift();
1023
+ if (/^-[^-][^-]/.test(flagParts[0]))
1024
+ throw new Error(
1025
+ `invalid Option flags, short option is dash and single character: '${flags}'`
1026
+ );
1027
+ if (shortFlag && shortFlagExp.test(flagParts[0]))
1028
+ throw new Error(
1029
+ `invalid Option flags, more than one short flag: '${flags}'`
1030
+ );
1031
+ if (longFlag && longFlagExp.test(flagParts[0]))
1032
+ throw new Error(
1033
+ `invalid Option flags, more than one long flag: '${flags}'`
1034
+ );
1035
+ if (!(shortFlag || longFlag) || flagParts[0].startsWith("-"))
1036
+ throw new Error(`invalid Option flags: '${flags}'`);
868
1037
  return { shortFlag, longFlag };
869
1038
  }
870
1039
  exports.Option = Option2;
@@ -966,7 +1135,7 @@ var require_command = __commonJS({
966
1135
  var process = __require("node:process");
967
1136
  var { Argument: Argument2, humanReadableArgName } = require_argument();
968
1137
  var { CommanderError: CommanderError2 } = require_error();
969
- var { Help: Help2 } = require_help();
1138
+ var { Help: Help2, stripColor } = require_help();
970
1139
  var { Option: Option2, DualOptions } = require_option();
971
1140
  var { suggestSimilar } = require_suggestSimilar();
972
1141
  var Command2 = class _Command extends EventEmitter {
@@ -981,7 +1150,7 @@ var require_command = __commonJS({
981
1150
  this.options = [];
982
1151
  this.parent = null;
983
1152
  this._allowUnknownOption = false;
984
- this._allowExcessArguments = true;
1153
+ this._allowExcessArguments = false;
985
1154
  this.registeredArguments = [];
986
1155
  this._args = this.registeredArguments;
987
1156
  this.args = [];
@@ -1008,12 +1177,16 @@ var require_command = __commonJS({
1008
1177
  this._lifeCycleHooks = {};
1009
1178
  this._showHelpAfterError = false;
1010
1179
  this._showSuggestionAfterError = true;
1180
+ this._savedState = null;
1011
1181
  this._outputConfiguration = {
1012
1182
  writeOut: (str) => process.stdout.write(str),
1013
1183
  writeErr: (str) => process.stderr.write(str),
1184
+ outputError: (str, write) => write(str),
1014
1185
  getOutHelpWidth: () => process.stdout.isTTY ? process.stdout.columns : void 0,
1015
1186
  getErrHelpWidth: () => process.stderr.isTTY ? process.stderr.columns : void 0,
1016
- outputError: (str, write) => write(str)
1187
+ getOutHasColors: () => useColor() ?? (process.stdout.isTTY && process.stdout.hasColors?.()),
1188
+ getErrHasColors: () => useColor() ?? (process.stderr.isTTY && process.stderr.hasColors?.()),
1189
+ stripColor: (str) => stripColor(str)
1017
1190
  };
1018
1191
  this._hidden = false;
1019
1192
  this._helpOption = void 0;
@@ -1141,14 +1314,18 @@ var require_command = __commonJS({
1141
1314
  *
1142
1315
  * The configuration properties are all functions:
1143
1316
  *
1144
- * // functions to change where being written, stdout and stderr
1317
+ * // change how output being written, defaults to stdout and stderr
1145
1318
  * writeOut(str)
1146
1319
  * writeErr(str)
1147
- * // matching functions to specify width for wrapping help
1320
+ * // change how output being written for errors, defaults to writeErr
1321
+ * outputError(str, write) // used for displaying errors and not used for displaying help
1322
+ * // specify width for wrapping help
1148
1323
  * getOutHelpWidth()
1149
1324
  * getErrHelpWidth()
1150
- * // functions based on what is being written out
1151
- * outputError(str, write) // used for displaying errors, and not used for displaying help
1325
+ * // color support, currently only used with Help
1326
+ * getOutHasColors()
1327
+ * getErrHasColors()
1328
+ * stripColor() // used to remove ANSI escape codes if output does not have colors
1152
1329
  *
1153
1330
  * @param {object} [configuration] - configuration options
1154
1331
  * @return {(Command | object)} `this` command for chaining, or stored configuration
@@ -1855,6 +2032,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1855
2032
  * @return {Command} `this` command for chaining
1856
2033
  */
1857
2034
  parse(argv, parseOptions) {
2035
+ this._prepareForParse();
1858
2036
  const userArgs = this._prepareUserArgs(argv, parseOptions);
1859
2037
  this._parseCommand([], userArgs);
1860
2038
  return this;
@@ -1880,10 +2058,68 @@ Expecting one of '${allowedValues.join("', '")}'`);
1880
2058
  * @return {Promise}
1881
2059
  */
1882
2060
  async parseAsync(argv, parseOptions) {
2061
+ this._prepareForParse();
1883
2062
  const userArgs = this._prepareUserArgs(argv, parseOptions);
1884
2063
  await this._parseCommand([], userArgs);
1885
2064
  return this;
1886
2065
  }
2066
+ _prepareForParse() {
2067
+ if (this._savedState === null) {
2068
+ this.saveStateBeforeParse();
2069
+ } else {
2070
+ this.restoreStateBeforeParse();
2071
+ }
2072
+ }
2073
+ /**
2074
+ * Called the first time parse is called to save state and allow a restore before subsequent calls to parse.
2075
+ * Not usually called directly, but available for subclasses to save their custom state.
2076
+ *
2077
+ * This is called in a lazy way. Only commands used in parsing chain will have state saved.
2078
+ */
2079
+ saveStateBeforeParse() {
2080
+ this._savedState = {
2081
+ // name is stable if supplied by author, but may be unspecified for root command and deduced during parsing
2082
+ _name: this._name,
2083
+ // option values before parse have default values (including false for negated options)
2084
+ // shallow clones
2085
+ _optionValues: { ...this._optionValues },
2086
+ _optionValueSources: { ...this._optionValueSources }
2087
+ };
2088
+ }
2089
+ /**
2090
+ * Restore state before parse for calls after the first.
2091
+ * Not usually called directly, but available for subclasses to save their custom state.
2092
+ *
2093
+ * This is called in a lazy way. Only commands used in parsing chain will have state restored.
2094
+ */
2095
+ restoreStateBeforeParse() {
2096
+ if (this._storeOptionsAsProperties)
2097
+ throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
2098
+ - either make a new Command for each call to parse, or stop storing options as properties`);
2099
+ this._name = this._savedState._name;
2100
+ this._scriptPath = null;
2101
+ this.rawArgs = [];
2102
+ this._optionValues = { ...this._savedState._optionValues };
2103
+ this._optionValueSources = { ...this._savedState._optionValueSources };
2104
+ this.args = [];
2105
+ this.processedArgs = [];
2106
+ }
2107
+ /**
2108
+ * Throw if expected executable is missing. Add lots of help for author.
2109
+ *
2110
+ * @param {string} executableFile
2111
+ * @param {string} executableDir
2112
+ * @param {string} subcommandName
2113
+ */
2114
+ _checkForMissingExecutable(executableFile, executableDir, subcommandName) {
2115
+ if (fs.existsSync(executableFile)) return;
2116
+ const executableDirMessage = executableDir ? `searched for local subcommand relative to directory '${executableDir}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory";
2117
+ const executableMissing = `'${executableFile}' does not exist
2118
+ - if '${subcommandName}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
2119
+ - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
2120
+ - ${executableDirMessage}`;
2121
+ throw new Error(executableMissing);
2122
+ }
1887
2123
  /**
1888
2124
  * Execute a sub-command executable.
1889
2125
  *
@@ -1911,7 +2147,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1911
2147
  let resolvedScriptPath;
1912
2148
  try {
1913
2149
  resolvedScriptPath = fs.realpathSync(this._scriptPath);
1914
- } catch (err) {
2150
+ } catch {
1915
2151
  resolvedScriptPath = this._scriptPath;
1916
2152
  }
1917
2153
  executableDir = path.resolve(
@@ -1946,6 +2182,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
1946
2182
  proc = childProcess.spawn(executableFile, args, { stdio: "inherit" });
1947
2183
  }
1948
2184
  } else {
2185
+ this._checkForMissingExecutable(
2186
+ executableFile,
2187
+ executableDir,
2188
+ subcommand._name
2189
+ );
1949
2190
  args.unshift(executableFile);
1950
2191
  args = incrementNodeInspectorPort(process.execArgv).concat(args);
1951
2192
  proc = childProcess.spawn(process.execPath, args, { stdio: "inherit" });
@@ -1977,12 +2218,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
1977
2218
  });
1978
2219
  proc.on("error", (err) => {
1979
2220
  if (err.code === "ENOENT") {
1980
- const executableDirMessage = executableDir ? `searched for local subcommand relative to directory '${executableDir}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory";
1981
- const executableMissing = `'${executableFile}' does not exist
1982
- - if '${subcommand._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
1983
- - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
1984
- - ${executableDirMessage}`;
1985
- throw new Error(executableMissing);
2221
+ this._checkForMissingExecutable(
2222
+ executableFile,
2223
+ executableDir,
2224
+ subcommand._name
2225
+ );
1986
2226
  } else if (err.code === "EACCES") {
1987
2227
  throw new Error(`'${executableFile}' not executable`);
1988
2228
  }
@@ -2006,6 +2246,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2006
2246
  _dispatchSubcommand(commandName, operands, unknown) {
2007
2247
  const subCommand = this._findCommand(commandName);
2008
2248
  if (!subCommand) this.help({ error: true });
2249
+ subCommand._prepareForParse();
2009
2250
  let promiseChain;
2010
2251
  promiseChain = this._chainOrCallSubCommandHook(
2011
2252
  promiseChain,
@@ -2318,6 +2559,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
2318
2559
  * Parse options from `argv` removing known options,
2319
2560
  * and return argv split into operands and unknown arguments.
2320
2561
  *
2562
+ * Side effects: modifies command by storing options. Does not reset state if called again.
2563
+ *
2321
2564
  * Examples:
2322
2565
  *
2323
2566
  * argv => operands, unknown
@@ -2802,26 +3045,47 @@ Expecting one of '${allowedValues.join("', '")}'`);
2802
3045
  */
2803
3046
  helpInformation(contextOptions) {
2804
3047
  const helper = this.createHelp();
2805
- if (helper.helpWidth === void 0) {
2806
- helper.helpWidth = contextOptions && contextOptions.error ? this._outputConfiguration.getErrHelpWidth() : this._outputConfiguration.getOutHelpWidth();
2807
- }
2808
- return helper.formatHelp(this, helper);
3048
+ const context = this._getOutputContext(contextOptions);
3049
+ helper.prepareContext({
3050
+ error: context.error,
3051
+ helpWidth: context.helpWidth,
3052
+ outputHasColors: context.hasColors
3053
+ });
3054
+ const text = helper.formatHelp(this, helper);
3055
+ if (context.hasColors) return text;
3056
+ return this._outputConfiguration.stripColor(text);
2809
3057
  }
2810
3058
  /**
3059
+ * @typedef HelpContext
3060
+ * @type {object}
3061
+ * @property {boolean} error
3062
+ * @property {number} helpWidth
3063
+ * @property {boolean} hasColors
3064
+ * @property {function} write - includes stripColor if needed
3065
+ *
3066
+ * @returns {HelpContext}
2811
3067
  * @private
2812
3068
  */
2813
- _getHelpContext(contextOptions) {
3069
+ _getOutputContext(contextOptions) {
2814
3070
  contextOptions = contextOptions || {};
2815
- const context = { error: !!contextOptions.error };
2816
- let write;
2817
- if (context.error) {
2818
- write = (arg) => this._outputConfiguration.writeErr(arg);
3071
+ const error = !!contextOptions.error;
3072
+ let baseWrite;
3073
+ let hasColors;
3074
+ let helpWidth;
3075
+ if (error) {
3076
+ baseWrite = (str) => this._outputConfiguration.writeErr(str);
3077
+ hasColors = this._outputConfiguration.getErrHasColors();
3078
+ helpWidth = this._outputConfiguration.getErrHelpWidth();
2819
3079
  } else {
2820
- write = (arg) => this._outputConfiguration.writeOut(arg);
3080
+ baseWrite = (str) => this._outputConfiguration.writeOut(str);
3081
+ hasColors = this._outputConfiguration.getOutHasColors();
3082
+ helpWidth = this._outputConfiguration.getOutHelpWidth();
2821
3083
  }
2822
- context.write = contextOptions.write || write;
2823
- context.command = this;
2824
- return context;
3084
+ const write = (str) => {
3085
+ if (!hasColors) str = this._outputConfiguration.stripColor(str);
3086
+ return baseWrite(str);
3087
+ };
3088
+ return { error, write, hasColors, helpWidth };
2825
3089
  }
2826
3090
  /**
2827
3091
  * Output help information for this command.
@@ -2836,23 +3100,28 @@ Expecting one of '${allowedValues.join("', '")}'`);
2836
3100
  deprecatedCallback = contextOptions;
2837
3101
  contextOptions = void 0;
2838
3102
  }
2839
- const context = this._getHelpContext(contextOptions);
2840
- this._getCommandAndAncestors().reverse().forEach((command) => command.emit("beforeAllHelp", context));
2841
- this.emit("beforeHelp", context);
2842
- let helpInformation = this.helpInformation(context);
3103
+ const outputContext = this._getOutputContext(contextOptions);
3104
+ const eventContext = {
3105
+ error: outputContext.error,
3106
+ write: outputContext.write,
3107
+ command: this
3108
+ };
3109
+ this._getCommandAndAncestors().reverse().forEach((command) => command.emit("beforeAllHelp", eventContext));
3110
+ this.emit("beforeHelp", eventContext);
3111
+ let helpInformation = this.helpInformation({ error: outputContext.error });
2843
3112
  if (deprecatedCallback) {
2844
3113
  helpInformation = deprecatedCallback(helpInformation);
2845
3114
  if (typeof helpInformation !== "string" && !Buffer.isBuffer(helpInformation)) {
2846
3115
  throw new Error("outputHelp callback must return a string or a Buffer");
2847
3116
  }
2848
3117
  }
2849
- context.write(helpInformation);
3118
+ outputContext.write(helpInformation);
2850
3119
  if (this._getHelpOption()?.long) {
2851
3120
  this.emit(this._getHelpOption().long);
2852
3121
  }
2853
- this.emit("afterHelp", context);
3122
+ this.emit("afterHelp", eventContext);
2854
3123
  this._getCommandAndAncestors().forEach(
2855
- (command) => command.emit("afterAllHelp", context)
3124
+ (command) => command.emit("afterAllHelp", eventContext)
2856
3125
  );
2857
3126
  }
2858
3127
  /**
@@ -2914,12 +3183,20 @@ Expecting one of '${allowedValues.join("', '")}'`);
2914
3183
  */
2915
3184
  help(contextOptions) {
2916
3185
  this.outputHelp(contextOptions);
2917
- let exitCode = process.exitCode || 0;
3186
+ let exitCode = Number(process.exitCode ?? 0);
2918
3187
  if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) {
2919
3188
  exitCode = 1;
2920
3189
  }
2921
3190
  this._exit(exitCode, "commander.help", "(outputHelp)");
2922
3191
  }
3192
+ /**
3193
+ * // Do a little typing to coordinate emit and listener for the help text events.
3194
+ * @typedef HelpTextEventContext
3195
+ * @type {object}
3196
+ * @property {boolean} error
3197
+ * @property {Command} command
3198
+ * @property {function} write
3199
+ */
2923
3200
  /**
2924
3201
  * Add additional text to be displayed with the built-in help.
2925
3202
  *
@@ -2995,7 +3272,15 @@ Expecting one of '${allowedValues.join("', '")}'`);
2995
3272
  return arg;
2996
3273
  });
2997
3274
  }
3275
+ function useColor() {
3276
+ if (process.env.NO_COLOR || process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false")
3277
+ return false;
3278
+ if (process.env.FORCE_COLOR || process.env.CLICOLOR_FORCE !== void 0)
3279
+ return true;
3280
+ return void 0;
3281
+ }
2998
3282
  exports.Command = Command2;
3283
+ exports.useColor = useColor;
2999
3284
  }
3000
3285
  });
3001
3286
 
@@ -3071,8 +3356,8 @@ var {
3071
3356
  // src/commands/build.ts
3072
3357
  init_esm_shims();
3073
3358
  var buildCommand = (services) => createCommand("build").action(async (_, command) => {
3074
- const { runCommand } = await import("./render-command-T2HCJX3F.js");
3075
- const { build } = await import("./build-NYCCEFPM.js");
3359
+ const { runCommand } = await import("./render-command-UKYXN7C7.js");
3360
+ const { build } = await import("./build-HZ5LVFAS.js");
3076
3361
  await runCommand(command, services, build);
3077
3362
  });
3078
3363
 
@@ -3082,8 +3367,8 @@ var import_react = __toESM(require_react(), 1);
3082
3367
  var devCommand = (services) => {
3083
3368
  const t = createI18nT();
3084
3369
  return createCommand("dev").option("-s, --https", t("dev_command_def.option.https")).action(async (options, command) => {
3085
- const { DevCommand } = await import("./DevCommand-DTV4QLZX.js");
3086
- const { renderCommand } = await import("./render-command-T2HCJX3F.js");
3370
+ const { DevCommand } = await import("./DevCommand-U7PV4HW6.js");
3371
+ const { renderCommand } = await import("./render-command-UKYXN7C7.js");
3087
3372
  const { https = false } = options;
3088
3373
  await renderCommand(command, services, /* @__PURE__ */ import_react.default.createElement(DevCommand, { https }), {
3089
3374
  watchForModelChanges: true
@@ -3134,10 +3419,10 @@ var previewCommand = (services) => {
3134
3419
  validateBase
3135
3420
  ).option("--no-input", t("app_preview_command_def.option.no_input")).action(async (options, command) => {
3136
3421
  const { site, baseUrl, input } = options;
3137
- const { renderCommand, runCommand } = await import("./render-command-T2HCJX3F.js");
3422
+ const { renderCommand, runCommand } = await import("./render-command-UKYXN7C7.js");
3138
3423
  if (!input) {
3139
3424
  return runCommand(command, services, async (model) => {
3140
- const { nonInteractivePreview } = await import("./preview-CCEFGOHW.js");
3425
+ const { nonInteractivePreview } = await import("./preview-FI6WYZUP.js");
3141
3426
  return nonInteractivePreview(
3142
3427
  { siteId: site, baseUrl },
3143
3428
  model,
@@ -3145,7 +3430,7 @@ var previewCommand = (services) => {
3145
3430
  );
3146
3431
  });
3147
3432
  }
3148
- const { PreviewCommand } = await import("./PreviewCommand-A2C52TVM.js");
3433
+ const { PreviewCommand } = await import("./PreviewCommand-ZQ3OUOKW.js");
3149
3434
  await renderCommand(
3150
3435
  command,
3151
3436
  services,
@@ -3177,8 +3462,8 @@ var createVersionCommand = (services) => {
3177
3462
  validateBase
3178
3463
  ).action(async (options, command) => {
3179
3464
  const { VersionType } = await import("./types.impl-CD4WWRUK.js");
3180
- const { renderCommand } = await import("./render-command-T2HCJX3F.js");
3181
- const { CreateVersionCommand } = await import("./CreateVersionCommand-NNN5WEDG.js");
3465
+ const { renderCommand } = await import("./render-command-UKYXN7C7.js");
3466
+ const { CreateVersionCommand } = await import("./CreateVersionCommand-6HJGN4WS.js");
3182
3467
  const {
3183
3468
  approvePreview = false,
3184
3469
  versionType: versionTypeString,
@@ -3210,8 +3495,8 @@ var createVersionCommand = (services) => {
3210
3495
  init_esm_shims();
3211
3496
  var import_react4 = __toESM(require_react(), 1);
3212
3497
  var serveCommand = (services) => createCommand("serve").action(async (_, command) => {
3213
- const { renderCommand } = await import("./render-command-T2HCJX3F.js");
3214
- const { ServeCommand } = await import("./ServeCommand-HBKGVBCD.js");
3498
+ const { renderCommand } = await import("./render-command-UKYXN7C7.js");
3499
+ const { ServeCommand } = await import("./ServeCommand-I65XXTLM.js");
3215
3500
  await renderCommand(command, services, /* @__PURE__ */ import_react4.default.createElement(ServeCommand, null));
3216
3501
  });
3217
3502
 
@@ -3221,8 +3506,8 @@ var import_react5 = __toESM(require_react(), 1);
3221
3506
  var generateCommand = (services) => {
3222
3507
  const t = createI18nT();
3223
3508
  return createCommand("generate").description(t("generate_command.description")).action(async (options, command) => {
3224
- const { GenerateCommand } = await import("./GenerateCommand-3EILY6GU.js");
3225
- const { renderCommand } = await import("./render-command-T2HCJX3F.js");
3509
+ const { GenerateCommand } = await import("./GenerateCommand-M3T6OD4B.js");
3510
+ const { renderCommand } = await import("./render-command-UKYXN7C7.js");
3226
3511
  await renderCommand(command, services, /* @__PURE__ */ import_react5.default.createElement(GenerateCommand, null), {
3227
3512
  skipProjectValidation: true
3228
3513
  });
@@ -3240,15 +3525,40 @@ var logsCommand = (services) => {
3240
3525
  validateVersion
3241
3526
  ).action(async (options, command) => {
3242
3527
  const { version: version2 } = options;
3243
- const { renderCommand } = await import("./render-command-T2HCJX3F.js");
3244
- const { LogsCommand } = await import("./LogsCommand-GBLWWXA4.js");
3528
+ const { renderCommand } = await import("./render-command-UKYXN7C7.js");
3529
+ const { LogsCommand } = await import("./LogsCommand-ECPZQ3LE.js");
3245
3530
  await renderCommand(command, services, /* @__PURE__ */ import_react6.default.createElement(LogsCommand, { version: version2 }));
3246
3531
  });
3247
3532
  };
3248
3533
 
3534
+ // src/commands/release.tsx
3535
+ init_esm_shims();
3536
+ var import_react7 = __toESM(require_react(), 1);
3537
+ var releaseCommand = (services) => {
3538
+ const t = createI18nT();
3539
+ return createCommand("release").description(t("release_command_def.description")).option(
3540
+ "-s, --site <site-id>",
3541
+ t("release_command_def.option.site"),
3542
+ validateSite
3543
+ ).option(
3544
+ "--base-url <url>",
3545
+ t("release_command_def.option.base_url"),
3546
+ validateBase
3547
+ ).action(async (options, command) => {
3548
+ const { renderCommand } = await import("./render-command-UKYXN7C7.js");
3549
+ const { ReleaseCommand } = await import("./ReleaseCommand-KLZWNOVY.js");
3550
+ const { baseUrl, site } = options;
3551
+ await renderCommand(
3552
+ command,
3553
+ services,
3554
+ /* @__PURE__ */ import_react7.default.createElement(ReleaseCommand, { baseUrl, siteIdOverride: site })
3555
+ );
3556
+ });
3557
+ };
3558
+
3249
3559
  // src/commands/root-command.ts
3250
3560
  var getRootCommand = async (services) => {
3251
- return createCommand("app").version(version, "-v, --version", "Output the version number").enablePositionalOptions(true).helpOption("-h, --help", "Display help for command").helpCommand(false).addCommand(devCommand(services)).addCommand(buildCommand(services)).addCommand(serveCommand(services)).addCommand(previewCommand(services)).addCommand(createVersionCommand(services)).addCommand(generateCommand(services)).addCommand(logsCommand(services));
3561
+ return createCommand("app").version(version, "-v, --version", "Output the version number").enablePositionalOptions(true).helpOption("-h, --help", "Display help for command").helpCommand(false).addCommand(devCommand(services)).addCommand(buildCommand(services)).addCommand(serveCommand(services)).addCommand(previewCommand(services)).addCommand(createVersionCommand(services)).addCommand(generateCommand(services)).addCommand(logsCommand(services)).addCommand(releaseCommand(services), { hidden: true });
3252
3562
  };
3253
3563
  export {
3254
3564
  getRootCommand