@shell-shock/preset-cli 0.9.19 → 0.9.22

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 (386) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +0 -16
  2. package/dist/components/banner-builtin.cjs +1 -1
  3. package/dist/components/banner-builtin.mjs +1 -1
  4. package/dist/components/banner-builtin.mjs.map +1 -1
  5. package/dist/components/command-entry.cjs +8 -5
  6. package/dist/components/command-entry.mjs +7 -4
  7. package/dist/components/command-entry.mjs.map +1 -1
  8. package/dist/components/command-router.cjs +1 -1
  9. package/dist/components/command-router.mjs +1 -1
  10. package/dist/components/command-router.mjs.map +1 -1
  11. package/dist/components/upgrade-builtin.cjs +1 -1
  12. package/dist/components/upgrade-builtin.mjs +1 -1
  13. package/dist/components/upgrade-builtin.mjs.map +1 -1
  14. package/dist/components/virtual-command-entry.cjs +5 -2
  15. package/dist/components/virtual-command-entry.mjs +5 -2
  16. package/dist/components/virtual-command-entry.mjs.map +1 -1
  17. package/dist/helpers/get-global-options.mjs.map +1 -1
  18. package/dist/index.cjs +8 -3
  19. package/dist/index.d.cts.map +1 -1
  20. package/dist/index.d.mts.map +1 -1
  21. package/dist/index.mjs +7 -3
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/types/plugin.d.cts +3 -3
  24. package/dist/types/plugin.d.cts.map +1 -1
  25. package/dist/types/plugin.d.mts +3 -3
  26. package/dist/types/plugin.d.mts.map +1 -1
  27. package/package.json +22 -74
  28. package/dist/_virtual/_rolldown/runtime.mjs +0 -42
  29. package/dist/node_modules/.pnpm/@mdit_plugin-alert@0.23.2_markdown-it@14.1.1/node_modules/@mdit/plugin-alert/dist/index.cjs +0 -94
  30. package/dist/node_modules/.pnpm/@mdit_plugin-alert@0.23.2_markdown-it@14.1.1/node_modules/@mdit/plugin-alert/dist/index.mjs +0 -94
  31. package/dist/node_modules/.pnpm/@mdit_plugin-alert@0.23.2_markdown-it@14.1.1/node_modules/@mdit/plugin-alert/dist/index.mjs.map +0 -1
  32. package/dist/node_modules/.pnpm/@stryke_types@0.11.3/node_modules/@stryke/types/dist/base.d.cts +0 -17
  33. package/dist/node_modules/.pnpm/@stryke_types@0.11.3/node_modules/@stryke/types/dist/base.d.cts.map +0 -1
  34. package/dist/node_modules/.pnpm/@stryke_types@0.11.3/node_modules/@stryke/types/dist/base.d.mts +0 -17
  35. package/dist/node_modules/.pnpm/@stryke_types@0.11.3/node_modules/@stryke/types/dist/base.d.mts.map +0 -1
  36. package/dist/node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.cjs +0 -8
  37. package/dist/node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.mjs +0 -8
  38. package/dist/node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.mjs.map +0 -1
  39. package/dist/node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.cjs +0 -167
  40. package/dist/node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.mjs +0 -167
  41. package/dist/node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.mjs.map +0 -1
  42. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.cjs +0 -373
  43. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.mjs +0 -374
  44. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.mjs.map +0 -1
  45. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.cjs +0 -60
  46. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.mjs +0 -59
  47. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.mjs.map +0 -1
  48. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.cjs +0 -6
  49. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.mjs +0 -6
  50. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.mjs.map +0 -1
  51. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.cjs +0 -6
  52. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.mjs +0 -6
  53. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.mjs.map +0 -1
  54. package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode-codepoint.cjs +0 -59
  55. package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode-codepoint.mjs +0 -59
  56. package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode-codepoint.mjs.map +0 -1
  57. package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode.cjs +0 -338
  58. package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode.mjs +0 -333
  59. package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode.mjs.map +0 -1
  60. package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/generated/decode-data-html.cjs +0 -6
  61. package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/generated/decode-data-html.mjs +0 -6
  62. package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/generated/decode-data-html.mjs.map +0 -1
  63. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.cjs +0 -14
  64. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.mjs +0 -15
  65. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.mjs.map +0 -1
  66. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup-data.cjs +0 -655
  67. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup-data.mjs +0 -651
  68. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup-data.mjs.map +0 -1
  69. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.cjs +0 -48
  70. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.mjs +0 -47
  71. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.mjs.map +0 -1
  72. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/utilities.cjs +0 -24
  73. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/utilities.mjs +0 -24
  74. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/utilities.mjs.map +0 -1
  75. package/dist/node_modules/.pnpm/he@1.2.0/node_modules/he/he.cjs +0 -4095
  76. package/dist/node_modules/.pnpm/he@1.2.0/node_modules/he/he.mjs +0 -4093
  77. package/dist/node_modules/.pnpm/he@1.2.0/node_modules/he/he.mjs.map +0 -1
  78. package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/index.cjs +0 -449
  79. package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/index.mjs +0 -450
  80. package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/index.mjs.map +0 -1
  81. package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.cjs +0 -47
  82. package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.mjs +0 -48
  83. package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.mjs.map +0 -1
  84. package/dist/node_modules/.pnpm/markdown-it-abbr@2.0.0/node_modules/markdown-it-abbr/index.cjs +0 -94
  85. package/dist/node_modules/.pnpm/markdown-it-abbr@2.0.0/node_modules/markdown-it-abbr/index.mjs +0 -94
  86. package/dist/node_modules/.pnpm/markdown-it-abbr@2.0.0/node_modules/markdown-it-abbr/index.mjs.map +0 -1
  87. package/dist/node_modules/.pnpm/markdown-it-container@4.0.0/node_modules/markdown-it-container/index.cjs +0 -78
  88. package/dist/node_modules/.pnpm/markdown-it-container@4.0.0/node_modules/markdown-it-container/index.mjs +0 -78
  89. package/dist/node_modules/.pnpm/markdown-it-container@4.0.0/node_modules/markdown-it-container/index.mjs.map +0 -1
  90. package/dist/node_modules/.pnpm/markdown-it-deflist@3.0.0/node_modules/markdown-it-deflist/index.cjs +0 -123
  91. package/dist/node_modules/.pnpm/markdown-it-deflist@3.0.0/node_modules/markdown-it-deflist/index.mjs +0 -123
  92. package/dist/node_modules/.pnpm/markdown-it-deflist@3.0.0/node_modules/markdown-it-deflist/index.mjs.map +0 -1
  93. package/dist/node_modules/.pnpm/markdown-it-footnote@4.0.0/node_modules/markdown-it-footnote/index.cjs +0 -246
  94. package/dist/node_modules/.pnpm/markdown-it-footnote@4.0.0/node_modules/markdown-it-footnote/index.mjs +0 -244
  95. package/dist/node_modules/.pnpm/markdown-it-footnote@4.0.0/node_modules/markdown-it-footnote/index.mjs.map +0 -1
  96. package/dist/node_modules/.pnpm/markdown-it-ins@4.0.0/node_modules/markdown-it-ins/index.cjs +0 -80
  97. package/dist/node_modules/.pnpm/markdown-it-ins@4.0.0/node_modules/markdown-it-ins/index.mjs +0 -80
  98. package/dist/node_modules/.pnpm/markdown-it-ins@4.0.0/node_modules/markdown-it-ins/index.mjs.map +0 -1
  99. package/dist/node_modules/.pnpm/markdown-it-mark@4.0.0/node_modules/markdown-it-mark/index.cjs +0 -80
  100. package/dist/node_modules/.pnpm/markdown-it-mark@4.0.0/node_modules/markdown-it-mark/index.mjs +0 -80
  101. package/dist/node_modules/.pnpm/markdown-it-mark@4.0.0/node_modules/markdown-it-mark/index.mjs.map +0 -1
  102. package/dist/node_modules/.pnpm/markdown-it-sub@2.0.0/node_modules/markdown-it-sub/index.cjs +0 -45
  103. package/dist/node_modules/.pnpm/markdown-it-sub@2.0.0/node_modules/markdown-it-sub/index.mjs +0 -45
  104. package/dist/node_modules/.pnpm/markdown-it-sub@2.0.0/node_modules/markdown-it-sub/index.mjs.map +0 -1
  105. package/dist/node_modules/.pnpm/markdown-it-sup@2.0.0/node_modules/markdown-it-sup/index.cjs +0 -45
  106. package/dist/node_modules/.pnpm/markdown-it-sup@2.0.0/node_modules/markdown-it-sup/index.mjs +0 -45
  107. package/dist/node_modules/.pnpm/markdown-it-sup@2.0.0/node_modules/markdown-it-sup/index.mjs.map +0 -1
  108. package/dist/node_modules/.pnpm/markdown-it-task-lists@2.1.1/node_modules/markdown-it-task-lists/index.cjs +0 -94
  109. package/dist/node_modules/.pnpm/markdown-it-task-lists@2.1.1/node_modules/markdown-it-task-lists/index.mjs +0 -92
  110. package/dist/node_modules/.pnpm/markdown-it-task-lists@2.1.1/node_modules/markdown-it-task-lists/index.mjs.map +0 -1
  111. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/index.cjs +0 -1
  112. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/index.mjs +0 -3
  113. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/html_blocks.cjs +0 -69
  114. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/html_blocks.mjs +0 -69
  115. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/html_blocks.mjs.map +0 -1
  116. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/html_re.cjs +0 -9
  117. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/html_re.mjs +0 -8
  118. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/html_re.mjs.map +0 -1
  119. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/utils.cjs +0 -205
  120. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/utils.mjs +0 -189
  121. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/utils.mjs.map +0 -1
  122. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/index.cjs +0 -19
  123. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/index.mjs +0 -15
  124. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/index.mjs.map +0 -1
  125. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_destination.cjs +0 -61
  126. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs +0 -62
  127. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs.map +0 -1
  128. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_label.cjs +0 -35
  129. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_label.mjs +0 -35
  130. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_label.mjs.map +0 -1
  131. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_title.cjs +0 -43
  132. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_title.mjs +0 -44
  133. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_title.mjs.map +0 -1
  134. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/index.cjs +0 -488
  135. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/index.mjs +0 -489
  136. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/index.mjs.map +0 -1
  137. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_block.cjs +0 -148
  138. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_block.mjs +0 -149
  139. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_block.mjs.map +0 -1
  140. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_core.cjs +0 -51
  141. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_core.mjs +0 -52
  142. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_core.mjs.map +0 -1
  143. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_inline.cjs +0 -126
  144. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_inline.mjs +0 -127
  145. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_inline.mjs.map +0 -1
  146. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/commonmark.cjs +0 -57
  147. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/commonmark.mjs +0 -57
  148. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/commonmark.mjs.map +0 -1
  149. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/default.cjs +0 -23
  150. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/default.mjs +0 -23
  151. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/default.mjs.map +0 -1
  152. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/zero.cjs +0 -31
  153. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/zero.mjs +0 -31
  154. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/zero.mjs.map +0 -1
  155. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/renderer.cjs +0 -217
  156. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/renderer.mjs +0 -218
  157. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/renderer.mjs.map +0 -1
  158. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/ruler.cjs +0 -274
  159. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/ruler.mjs +0 -274
  160. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/ruler.mjs.map +0 -1
  161. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/blockquote.cjs +0 -107
  162. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/blockquote.mjs +0 -108
  163. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/blockquote.mjs.map +0 -1
  164. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/code.cjs +0 -27
  165. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/code.mjs +0 -27
  166. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/code.mjs.map +0 -1
  167. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/fence.cjs +0 -48
  168. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/fence.mjs +0 -48
  169. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/fence.mjs.map +0 -1
  170. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/heading.cjs +0 -35
  171. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/heading.mjs +0 -36
  172. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/heading.mjs.map +0 -1
  173. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/hr.cjs +0 -26
  174. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/hr.mjs +0 -27
  175. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/hr.mjs.map +0 -1
  176. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/html_block.cjs +0 -72
  177. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/html_block.mjs +0 -73
  178. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/html_block.mjs.map +0 -1
  179. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/lheading.cjs +0 -53
  180. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/lheading.mjs +0 -53
  181. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/lheading.mjs.map +0 -1
  182. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/list.cjs +0 -157
  183. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/list.mjs +0 -158
  184. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/list.mjs.map +0 -1
  185. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/paragraph.cjs +0 -32
  186. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/paragraph.mjs +0 -32
  187. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/paragraph.mjs.map +0 -1
  188. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/reference.cjs +0 -140
  189. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/reference.mjs +0 -141
  190. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/reference.mjs.map +0 -1
  191. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/state_block.cjs +0 -112
  192. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/state_block.mjs +0 -113
  193. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/state_block.mjs.map +0 -1
  194. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/table.cjs +0 -139
  195. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/table.mjs +0 -140
  196. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/table.mjs.map +0 -1
  197. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/block.cjs +0 -15
  198. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/block.mjs +0 -15
  199. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/block.mjs.map +0 -1
  200. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/inline.cjs +0 -12
  201. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/inline.mjs +0 -12
  202. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/inline.mjs.map +0 -1
  203. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/linkify.cjs +0 -81
  204. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/linkify.mjs +0 -82
  205. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/linkify.mjs.map +0 -1
  206. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/normalize.cjs +0 -13
  207. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/normalize.mjs +0 -13
  208. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/normalize.mjs.map +0 -1
  209. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/replacements.cjs +0 -45
  210. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/replacements.mjs +0 -45
  211. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/replacements.mjs.map +0 -1
  212. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/smartquotes.cjs +0 -112
  213. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/smartquotes.mjs +0 -113
  214. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/smartquotes.mjs.map +0 -1
  215. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/state_core.cjs +0 -14
  216. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/state_core.mjs +0 -15
  217. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/state_core.mjs.map +0 -1
  218. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/text_join.cjs +0 -22
  219. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/text_join.mjs +0 -22
  220. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/text_join.mjs.map +0 -1
  221. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/autolink.cjs +0 -55
  222. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/autolink.mjs +0 -55
  223. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/autolink.mjs.map +0 -1
  224. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/backticks.cjs +0 -41
  225. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/backticks.mjs +0 -41
  226. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/backticks.mjs.map +0 -1
  227. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/balance_pairs.cjs +0 -62
  228. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs +0 -62
  229. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs.map +0 -1
  230. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/emphasis.cjs +0 -64
  231. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/emphasis.mjs +0 -64
  232. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/emphasis.mjs.map +0 -1
  233. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/entity.cjs +0 -45
  234. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/entity.mjs +0 -46
  235. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/entity.mjs.map +0 -1
  236. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/escape.cjs +0 -48
  237. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/escape.mjs +0 -49
  238. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/escape.mjs.map +0 -1
  239. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/fragments_join.cjs +0 -22
  240. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/fragments_join.mjs +0 -22
  241. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/fragments_join.mjs.map +0 -1
  242. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/html_inline.cjs +0 -34
  243. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/html_inline.mjs +0 -35
  244. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/html_inline.mjs.map +0 -1
  245. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/image.cjs +0 -82
  246. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/image.mjs +0 -83
  247. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/image.mjs.map +0 -1
  248. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/link.cjs +0 -84
  249. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/link.mjs +0 -85
  250. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/link.mjs.map +0 -1
  251. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/linkify.cjs +0 -42
  252. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/linkify.mjs +0 -42
  253. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/linkify.mjs.map +0 -1
  254. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/newline.cjs +0 -26
  255. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/newline.mjs +0 -27
  256. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/newline.mjs.map +0 -1
  257. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/state_inline.cjs +0 -74
  258. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/state_inline.mjs +0 -75
  259. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/state_inline.mjs.map +0 -1
  260. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/strikethrough.cjs +0 -80
  261. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs +0 -80
  262. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs.map +0 -1
  263. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/text.cjs +0 -41
  264. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/text.mjs +0 -41
  265. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/text.mjs.map +0 -1
  266. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/token.cjs +0 -157
  267. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/token.mjs +0 -157
  268. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/token.mjs.map +0 -1
  269. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/index.cjs +0 -21
  270. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/index.mjs +0 -17
  271. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/index.mjs.map +0 -1
  272. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/decode.cjs +0 -74
  273. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/decode.mjs +0 -74
  274. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/decode.mjs.map +0 -1
  275. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/encode.cjs +0 -57
  276. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/encode.mjs +0 -57
  277. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/encode.mjs.map +0 -1
  278. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/format.cjs +0 -18
  279. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/format.mjs +0 -18
  280. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/format.mjs.map +0 -1
  281. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/parse.cjs +0 -175
  282. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/parse.mjs +0 -175
  283. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/parse.mjs.map +0 -1
  284. package/dist/node_modules/.pnpm/normalize-html-whitespace@1.0.0/node_modules/normalize-html-whitespace/index.cjs +0 -19
  285. package/dist/node_modules/.pnpm/normalize-html-whitespace@1.0.0/node_modules/normalize-html-whitespace/index.mjs +0 -15
  286. package/dist/node_modules/.pnpm/normalize-html-whitespace@1.0.0/node_modules/normalize-html-whitespace/index.mjs.map +0 -1
  287. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/doctype.cjs +0 -104
  288. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/doctype.mjs +0 -104
  289. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/doctype.mjs.map +0 -1
  290. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/error-codes.cjs +0 -73
  291. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/error-codes.mjs +0 -68
  292. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/error-codes.mjs.map +0 -1
  293. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/foreign-content.cjs +0 -266
  294. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/foreign-content.mjs +0 -262
  295. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/foreign-content.mjs.map +0 -1
  296. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/html.cjs +0 -575
  297. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/html.mjs +0 -543
  298. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/html.mjs.map +0 -1
  299. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/token.cjs +0 -27
  300. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/token.mjs +0 -21
  301. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/token.mjs.map +0 -1
  302. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/unicode.cjs +0 -105
  303. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/unicode.mjs +0 -94
  304. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/unicode.mjs.map +0 -1
  305. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/index.cjs +0 -33
  306. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/index.mjs +0 -34
  307. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/index.mjs.map +0 -1
  308. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/formatting-element-list.cjs +0 -99
  309. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/formatting-element-list.mjs +0 -93
  310. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/formatting-element-list.mjs.map +0 -1
  311. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/index.cjs +0 -2544
  312. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/index.mjs +0 -2545
  313. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/index.mjs.map +0 -1
  314. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/open-element-stack.cjs +0 -296
  315. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/open-element-stack.mjs +0 -297
  316. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/open-element-stack.mjs.map +0 -1
  317. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/serializer/index.cjs +0 -26
  318. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/serializer/index.mjs +0 -28
  319. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/serializer/index.mjs.map +0 -1
  320. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tokenizer/index.cjs +0 -2069
  321. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tokenizer/index.mjs +0 -2069
  322. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tokenizer/index.mjs.map +0 -1
  323. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tokenizer/preprocessor.cjs +0 -156
  324. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tokenizer/preprocessor.mjs +0 -157
  325. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tokenizer/preprocessor.mjs.map +0 -1
  326. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tree-adapters/default.cjs +0 -166
  327. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tree-adapters/default.mjs +0 -167
  328. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tree-adapters/default.mjs.map +0 -1
  329. package/dist/node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.cjs +0 -299
  330. package/dist/node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.mjs +0 -295
  331. package/dist/node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.mjs.map +0 -1
  332. package/dist/node_modules/.pnpm/string-width@8.2.0/node_modules/string-width/index.cjs +0 -65
  333. package/dist/node_modules/.pnpm/string-width@8.2.0/node_modules/string-width/index.mjs +0 -66
  334. package/dist/node_modules/.pnpm/string-width@8.2.0/node_modules/string-width/index.mjs.map +0 -1
  335. package/dist/node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.cjs +0 -12
  336. package/dist/node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.mjs +0 -13
  337. package/dist/node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.mjs.map +0 -1
  338. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.cjs +0 -6
  339. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.mjs +0 -6
  340. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.mjs.map +0 -1
  341. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.cjs +0 -6
  342. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.mjs +0 -6
  343. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.mjs.map +0 -1
  344. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.cjs +0 -6
  345. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.mjs +0 -6
  346. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.mjs.map +0 -1
  347. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.cjs +0 -6
  348. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.mjs +0 -6
  349. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.mjs.map +0 -1
  350. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.cjs +0 -6
  351. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.mjs +0 -6
  352. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.mjs.map +0 -1
  353. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/index.cjs +0 -25
  354. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/index.mjs +0 -21
  355. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/index.mjs.map +0 -1
  356. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.cjs +0 -6
  357. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.mjs +0 -6
  358. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.mjs.map +0 -1
  359. package/dist/node_modules/.pnpm/wrap-ansi@10.0.0/node_modules/wrap-ansi/index.cjs +0 -302
  360. package/dist/node_modules/.pnpm/wrap-ansi@10.0.0/node_modules/wrap-ansi/index.mjs +0 -303
  361. package/dist/node_modules/.pnpm/wrap-ansi@10.0.0/node_modules/wrap-ansi/index.mjs.map +0 -1
  362. package/dist/packages/plugin-changelog/dist/components/changelog-command.cjs +0 -106
  363. package/dist/packages/plugin-changelog/dist/components/changelog-command.mjs +0 -106
  364. package/dist/packages/plugin-changelog/dist/components/changelog-command.mjs.map +0 -1
  365. package/dist/packages/plugin-changelog/dist/components/index.cjs +0 -1
  366. package/dist/packages/plugin-changelog/dist/components/index.mjs +0 -3
  367. package/dist/packages/plugin-changelog/dist/helpers/resolve-changelog.cjs +0 -51
  368. package/dist/packages/plugin-changelog/dist/helpers/resolve-changelog.mjs +0 -51
  369. package/dist/packages/plugin-changelog/dist/helpers/resolve-changelog.mjs.map +0 -1
  370. package/dist/packages/plugin-changelog/dist/index.cjs +0 -65
  371. package/dist/packages/plugin-changelog/dist/index.d.cts +0 -2
  372. package/dist/packages/plugin-changelog/dist/index.d.mts +0 -2
  373. package/dist/packages/plugin-changelog/dist/index.mjs +0 -64
  374. package/dist/packages/plugin-changelog/dist/index.mjs.map +0 -1
  375. package/dist/packages/plugin-changelog/dist/types/plugin.d.cts +0 -91
  376. package/dist/packages/plugin-changelog/dist/types/plugin.d.cts.map +0 -1
  377. package/dist/packages/plugin-changelog/dist/types/plugin.d.mts +0 -91
  378. package/dist/packages/plugin-changelog/dist/types/plugin.d.mts.map +0 -1
  379. package/dist/packages/unified/dist/html-DzwMMQv6.cjs +0 -612
  380. package/dist/packages/unified/dist/html-DzwMMQv6.mjs +0 -613
  381. package/dist/packages/unified/dist/html-DzwMMQv6.mjs.map +0 -1
  382. package/dist/packages/unified/dist/markdown/index.cjs +0 -1
  383. package/dist/packages/unified/dist/markdown/index.mjs +0 -3
  384. package/dist/packages/unified/dist/markdown-CLMRZZ3Y.cjs +0 -46
  385. package/dist/packages/unified/dist/markdown-CLMRZZ3Y.mjs +0 -47
  386. package/dist/packages/unified/dist/markdown-CLMRZZ3Y.mjs.map +0 -1
@@ -5,20 +5,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
9
- var __exportAll = (all, no_symbols) => {
10
- let target = {};
11
- for (var name in all) {
12
- __defProp(target, name, {
13
- get: all[name],
14
- enumerable: true
15
- });
16
- }
17
- if (!no_symbols) {
18
- __defProp(target, Symbol.toStringTag, { value: "Module" });
19
- }
20
- return target;
21
- };
22
8
  var __copyProps = (to, from, except, desc) => {
23
9
  if (from && typeof from === "object" || typeof from === "function") {
24
10
  for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
@@ -40,6 +26,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
40
26
 
41
27
  //#endregion
42
28
 
43
- exports.__commonJSMin = __commonJSMin;
44
- exports.__exportAll = __exportAll;
45
29
  exports.__toESM = __toESM;
@@ -3,8 +3,8 @@ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
3
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
4
4
  let _alloy_js_core = require("@alloy-js/core");
5
5
  let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
6
- let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
7
6
  let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
7
+ let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
8
8
  let _shell_shock_plugin_banner_components_banner_builtin = require("@shell-shock/plugin-banner/components/banner-builtin");
9
9
  let _shell_shock_plugin_banner_components_banner_function_declaration = require("@shell-shock/plugin-banner/components/banner-function-declaration");
10
10
  let _shell_shock_plugin_theme_contexts_theme = require("@shell-shock/plugin-theme/contexts/theme");
@@ -1,8 +1,8 @@
1
1
  import { createComponent, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
2
2
  import { Show, code, computed, splitProps } from "@alloy-js/core";
3
3
  import { getAppDescription, getAppTitle } from "@shell-shock/core/plugin-utils";
4
- import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
5
4
  import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
5
+ import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
6
6
  import { BannerBuiltin as BannerBuiltin$1 } from "@shell-shock/plugin-banner/components/banner-builtin";
7
7
  import { BannerFunctionBodyDeclaration as BannerFunctionBodyDeclaration$1, BannerFunctionDeclarationWrapper } from "@shell-shock/plugin-banner/components/banner-function-declaration";
8
8
  import { useTheme } from "@shell-shock/plugin-theme/contexts/theme";
@@ -1 +1 @@
1
- {"version":3,"file":"banner-builtin.mjs","names":[],"sources":["../../src/components/banner-builtin.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, computed, Show, splitProps } from \"@alloy-js/core\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport type { BuiltinFileProps } from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport type { CommandTree } from \"@shell-shock/core\";\nimport { getAppDescription, getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { BannerBuiltin as BaseBannerBuiltin } from \"@shell-shock/plugin-banner/components/banner-builtin\";\nimport type { BannerFunctionBodyDeclarationProps } from \"@shell-shock/plugin-banner/components/banner-function-declaration\";\nimport {\n BannerFunctionDeclarationWrapper,\n BannerFunctionBodyDeclaration as BaseBannerFunctionBodyDeclaration\n} from \"@shell-shock/plugin-banner/components/banner-function-declaration\";\nimport { useTheme } from \"@shell-shock/plugin-theme/contexts/theme\";\nimport { render } from \"cfonts\";\nimport type { CLIPresetContext } from \"../types/plugin\";\n\n/**\n * A component to generate the `banner` function in the `shell-shock:console` builtin module.\n */\nexport function BannerFunctionBodyDeclaration(\n props: Omit<\n BannerFunctionBodyDeclarationProps,\n \"header\" | \"description\" | \"footer\"\n >\n) {\n const { consoleFnName = \"log\", variant = \"primary\", command } = props;\n\n const theme = useTheme();\n const context = usePowerlines<CLIPresetContext>();\n\n const header = computed(\n () =>\n `${theme.labels.banner.header[variant] || getAppTitle(context)} v${\n context.packageJson.version || \"1.0.0\"\n }`\n );\n const footer = computed(() => theme.labels.banner.footer[variant]);\n const title = computed(() =>\n getAppTitle(context, true).replace(\n `v${context.packageJson.version || \"1.0.0\"}`,\n \"\"\n )\n );\n const description = computed(\n () => command?.description || getAppDescription(context)\n );\n\n const titleLines = computed(() => {\n const result = render(getAppTitle(context, true), {\n font: \"tiny\",\n align: \"left\",\n background: \"transparent\",\n letterSpacing: 1,\n lineHeight: 1,\n gradient: false,\n transitionGradient: false,\n env: \"node\"\n });\n if (!result) {\n return [`${getAppTitle(context, true)} Command-Line Interface`];\n }\n\n return result.array;\n });\n\n const bannerPadding = computed(\n () =>\n Math.max(theme.padding.app, 0) * 2 +\n (theme.borderStyles.banner.outline[variant]?.left.length ?? 0) +\n (theme.borderStyles.banner.outline[variant]?.right.length ?? 0)\n );\n const totalPadding = computed(\n () => Math.max(theme.padding.banner, 0) * 2 + bannerPadding.value\n );\n\n return (\n <BaseBannerFunctionBodyDeclaration\n header={header.value}\n description={description.value}\n footer={footer.value}\n variant={variant}\n consoleFnName={consoleFnName}\n command={command}\n insertNewlineAfterDescription>\n {code`const titleLines = [${titleLines.value\n .map(line => JSON.stringify(line.trim()))\n .join(\", \")}];\n const title = Math.max(...titleLines.map(line => stripAnsi(line).length)) > Math.max(getTerminalSize().columns + ${\n totalPadding.value\n }, 20) ? \"${title.value}\" : \\`\\\\n\\${titleLines.join(\"\\\\n\")}\\\\n\\`;\n\n splitText(title,\n Math.max(getTerminalSize().columns - ${totalPadding.value}, 20)\n ).forEach((line) => {\n writeLine(borderColors.banner.outline.${variant}(\"${\n theme.borderStyles.banner.outline[variant].left\n }\") + \" \".repeat(Math.max(Math.floor((getTerminalSize().columns - (stripAnsi(line).length + ${\n bannerPadding.value\n })) / 2), 0)) + bold(textColors.banner.title.${variant}(line)) + \" \".repeat(Math.max(Math.ceil((getTerminalSize().columns - (stripAnsi(line).length + ${\n bannerPadding.value\n })) / 2), 0)) + borderColors.banner.outline.${variant}(\"${\n theme.borderStyles.banner.outline[variant].right\n }\"), { consoleFn: console.${consoleFnName} });\n }); `}\n </BaseBannerFunctionBodyDeclaration>\n );\n}\n\nexport type BannerBuiltinProps = Omit<\n BuiltinFileProps,\n \"id\" | \"description\"\n> & {\n /**\n * The command to generate the `banner` function declaration for.\n */\n command: CommandTree;\n};\n\n/**\n * A built-in banner module for Shell Shock.\n */\nexport function BannerBuiltin(props: BannerBuiltinProps) {\n const [{ command, children }, rest] = splitProps(props, [\n \"command\",\n \"children\"\n ]);\n\n return (\n <BaseBannerBuiltin {...rest} command={command}>\n <BannerFunctionDeclarationWrapper command={command}>\n <BannerFunctionBodyDeclaration command={command} />\n <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </BannerFunctionDeclarationWrapper>\n </BaseBannerBuiltin>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAmCA,SAAe,8BAAyB,OAAoD;CAC1F,MAAA,EACF,gBAAgB,OACd,UAAW,WACT,YACC;CACH,MAAA,QAAA,UAAA;CACA,MAAA,UAAA,eAAA;CACA,MAAM,SAAE,eAAsB,GAAC,MAAQ,OAAG,OAAU,OAAQ,YAAS,YAAA,QAAA,CAAA,IAAA,QAAA,YAAA,WAAA,UAAA;;CAErE,MAAM,QAAQ,eAAU,YAAA,SAAA,KAAA,CAAA,QAAA,IAAA,QAAA,YAAA,WAAA,WAAA,GAAA,CAAA;CACxB,MAAM,cAAU,eAAc,SAAA,eAAmB,kBAAA,QAAA,CAAA;;EAEjD,MAAM,SAAS,OAAQ,YAAA,SAAA,KAAA,EAAA;GACnB,MAAE;GACF,OAAG;GACH,YAAU;GACV,eAAC;GACJ,YAAA;GACD,UAAc;GACd,oBAAwB;GACtB,KAAA;GACC,CAAC;AACF,MAAG,CAAA,OACH,QAAA,CAAA,GAAA,YAAA,SAAA,KAAA,CAAA,yBAAA;AAEF,SAAM,OAAA;GACJ;CACF,MAAC,gBAAA,eAAA,KAAA,IAAA,MAAA,QAAA,KAAA,EAAA,GAAA,KAAA,MAAA,aAAA,OAAA,QAAA,UAAA,KAAA,UAAA,MAAA,MAAA,aAAA,OAAA,QAAA,UAAA,MAAA,UAAA,GAAA;;AAED,QAAM,gBAAa,iCAAe;EAChC,IAAA,SAAa;AACX,UAAO,OAAK;;EAEd,IAAE,cAAa;AACb,UAAA,YAAgB;;EAElB,IAAE,SAAU;AACV,UAAA,OAAA;;EAEA;EACW;EACJ;EACT,+BAAA;;AAEA,UAAO,IAAM,uBAAM,WAAA,MAAA,KAAA,SAAA,KAAA,UAAA,KAAA,MAAA,CAAA,CAAA,CAAA,KAAA,KAAA,CAAA;yHACnB,aAAA,MAAA,WAAA,MAAA,MAAA;;;+CAGI,aAAA,MAAA;;gDAEwC,QAAQ,IAAA,MAAU,aAAG,OAAA,QAAA,SAAA,KAAA,6FAAA,cAAA,MAAA,8CAAA,QAAA,iGAAA,cAAA,MAAA,6CAAA,QAAA,IAAA,MAAA,aAAA,OAAA,QAAA,SAAA,MAAA,2BAAA,cAAA;;;EAGnE,CAAA;;;;;AAYF,SAAM,cAAA,OAA6B;CACjC,MAAK,CAAA,EACH,SACA,YACC,QAAO,WAAY,OAAO,CAAC,WAAW,WAAW,CAAC;AACrD,QAAM,gBAAa,iBAAA,WAAA,MAAA;EACR;;AAEP,UAAA,gBAAe,kCAAA;IACJ;IACT,IAAA,WAAe;AACf,YAAS;MAAC,gBAAa,+BAA4B,EAC3C,SACL,CAAC;MAAE,gBAAgB,SAAS,EAAA,CAAK;MAAE,gBAAkB,MAAA;OACtD,IAAA,OAAa;AACT,eAAO,QAAQ,SAAA;;OAEP;OACZ,CAAA;MAAA;;IAEH,CAAC;;EAEL,CAAA,CAAA"}
1
+ {"version":3,"file":"banner-builtin.mjs","names":[],"sources":["../../src/components/banner-builtin.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, computed, Show, splitProps } from \"@alloy-js/core\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport type { BuiltinFileProps } from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport type { CommandTree } from \"@shell-shock/core\";\nimport { getAppDescription, getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { BannerBuiltin as BaseBannerBuiltin } from \"@shell-shock/plugin-banner/components/banner-builtin\";\nimport type { BannerFunctionBodyDeclarationProps } from \"@shell-shock/plugin-banner/components/banner-function-declaration\";\nimport {\n BannerFunctionDeclarationWrapper,\n BannerFunctionBodyDeclaration as BaseBannerFunctionBodyDeclaration\n} from \"@shell-shock/plugin-banner/components/banner-function-declaration\";\nimport { useTheme } from \"@shell-shock/plugin-theme/contexts/theme\";\nimport { render } from \"cfonts\";\nimport type { CLIPresetContext } from \"../types/plugin\";\n\n/**\n * A component to generate the `banner` function in the `shell-shock:console` builtin module.\n */\nexport function BannerFunctionBodyDeclaration(\n props: Omit<\n BannerFunctionBodyDeclarationProps,\n \"header\" | \"description\" | \"footer\"\n >\n) {\n const { consoleFnName = \"log\", variant = \"primary\", command } = props;\n\n const theme = useTheme();\n const context = usePowerlines<CLIPresetContext>();\n\n const header = computed(\n () =>\n `${theme.labels.banner.header[variant] || getAppTitle(context)} v${\n context.packageJson.version || \"1.0.0\"\n }`\n );\n const footer = computed(() => theme.labels.banner.footer[variant]);\n const title = computed(() =>\n getAppTitle(context, true).replace(\n `v${context.packageJson.version || \"1.0.0\"}`,\n \"\"\n )\n );\n const description = computed(\n () => command?.description || getAppDescription(context)\n );\n\n const titleLines = computed(() => {\n const result = render(getAppTitle(context, true), {\n font: \"tiny\",\n align: \"left\",\n background: \"transparent\",\n letterSpacing: 1,\n lineHeight: 1,\n gradient: false,\n transitionGradient: false,\n env: \"node\"\n });\n if (!result) {\n return [`${getAppTitle(context, true)} Command-Line Interface`];\n }\n\n return result.array;\n });\n\n const bannerPadding = computed(\n () =>\n Math.max(theme.padding.app, 0) * 2 +\n (theme.borderStyles.banner.outline[variant]?.left.length ?? 0) +\n (theme.borderStyles.banner.outline[variant]?.right.length ?? 0)\n );\n const totalPadding = computed(\n () => Math.max(theme.padding.banner, 0) * 2 + bannerPadding.value\n );\n\n return (\n <BaseBannerFunctionBodyDeclaration\n header={header.value}\n description={description.value}\n footer={footer.value}\n variant={variant}\n consoleFnName={consoleFnName}\n command={command}\n insertNewlineAfterDescription>\n {code`const titleLines = [${titleLines.value\n .map(line => JSON.stringify(line.trim()))\n .join(\", \")}];\n const title = Math.max(...titleLines.map(line => stripAnsi(line).length)) > Math.max(getTerminalSize().columns + ${\n totalPadding.value\n }, 20) ? \"${title.value}\" : \\`\\\\n\\${titleLines.join(\"\\\\n\")}\\\\n\\`;\n\n splitText(title,\n Math.max(getTerminalSize().columns - ${totalPadding.value}, 20)\n ).forEach((line) => {\n writeLine(borderColors.banner.outline.${variant}(\"${\n theme.borderStyles.banner.outline[variant].left\n }\") + \" \".repeat(Math.max(Math.floor((getTerminalSize().columns - (stripAnsi(line).length + ${\n bannerPadding.value\n })) / 2), 0)) + bold(textColors.banner.title.${variant}(line)) + \" \".repeat(Math.max(Math.ceil((getTerminalSize().columns - (stripAnsi(line).length + ${\n bannerPadding.value\n })) / 2), 0)) + borderColors.banner.outline.${variant}(\"${\n theme.borderStyles.banner.outline[variant].right\n }\"), { consoleFn: console.${consoleFnName} });\n }); `}\n </BaseBannerFunctionBodyDeclaration>\n );\n}\n\nexport type BannerBuiltinProps = Omit<\n BuiltinFileProps,\n \"id\" | \"description\"\n> & {\n /**\n * The command to generate the `banner` function declaration for.\n */\n command: CommandTree;\n};\n\n/**\n * A built-in banner module for Shell Shock.\n */\nexport function BannerBuiltin(props: BannerBuiltinProps) {\n const [{ command, children }, rest] = splitProps(props, [\n \"command\",\n \"children\"\n ]);\n\n return (\n <BaseBannerBuiltin {...rest} command={command}>\n <BannerFunctionDeclarationWrapper command={command}>\n <BannerFunctionBodyDeclaration command={command} />\n <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </BannerFunctionDeclarationWrapper>\n </BaseBannerBuiltin>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AA8BA,SAAS,8BAAqC,OAAM;CACpD,MAAQ,EACR,gBAAc,4BAEZ,YACG;CACH,MAAA,QAAA,UAAA;CACF,MAAO,UAAS,eAAA;CACd,MAAM,SAAK,eAAA,GAAA,MAAA,OAAA,OAAA,OAAA,YAAA,YAAA,QAAA,CAAA,IAAA,QAAA,YAAA,WAAA,UAAA;CACX,MAAE,SAAA,eAAA,MAAkC,OAAA,OAAA,OAAA,SAAA;CACpC,MAAG,QAAW,eAAe,YAAO,SAAA,KAAA,CAAA,QAAA,IAAA,QAAA,YAAA,WAAA,WAAA,GAAA,CAAA;CACpC,MAAA,cAAA,eAAA,SAAA,eAAA,kBAAA,QAAA,CAAA;CACA,MAAA,aAAA,eAAA;EACA,MAAQ,SAAA,OAAgB,YAAO,SAAW,KAAQ,EAAE;;GAEpD,OAAW;GACX,YAAgB;;GAEhB,YAAe;GACX,UAAE;GACF,oBAAgB;GAChB,KAAE;GACH,CAAC;AACH,MAAA,CAAA,OACD,QAAM,CAAM,GAAG,YAAY,SAAS,KAAA,CAAM,yBAAwB;AAEhE,SAAA,OAAY;GACZ;CACF,MAAK,gBAAA,eAAA,KAAA,IAAA,MAAA,QAAA,KAAA,EAAA,GAAA,KAAA,MAAA,aAAA,OAAA,QAAA,UAAA,KAAA,UAAA,MAAA,MAAA,aAAA,OAAA,QAAA,UAAA,MAAA,UAAA,GAAA;CACL,MAAE,eAAA,eAAA,KAAA,IAAA,MAAA,QAAA,QAAA,EAAA,GAAA,IAAA,cAAA,MAAA;AACF,QAAC,gBAAA,iCAAA;EACD,IAAM,SAAA;AACF,UAAI,OAAS;;;AAGjB,UAAM,YAAa;;EAEjB,IAAE,SAAW;AACX,UAAO,OAAM;;EAEb;EACa;EACb;EACF,+BAA2B;EAC3B,IAAE,WAAU;AACV,UAAA,IAAA,uBAAA,WAAA,MAAA,KAAA,SAAA,KAAA,UAAA,KAAA,MAAA,CAAA,CAAA,CAAA,KAAA,KAAA,CAAA;yHACW,aAAA,MAAA,WAAA,MAAA,MAAA;;;;;gDAKb,QAAA,IAAA,MAAA,aAAA,OAAA,QAAA,SAAA,KAAA,6FAAA,cAAA,MAAA,8CAAA,QAAA,iGAAA,cAAA,MAAA,6CAAA,QAAA,IAAA,MAAA,aAAA,OAAA,QAAA,SAAA,MAAA,2BAAA,cAAA;;;EAGD,CAAC;;;;;AAKJ,SAAQ,cAAe,OAAQ;CAC7B,MAAM,CAAC,EACN,qBAED,QAAO,WAAA,OAAA,CAAA,WAAA,WAAA,CAAA;AACP,QAAG,gBAAA,iBAAA,WAAA,MAAA;EACQ;EACT,IAAE,WAAa;AACb,UAAO,gBAAa,kCAAA;IACX;IACT,IAAA,WAAe;AACf,YAAS;MAAA,gBAAO,+BAAA,EAChB,SACK,CAAC;MAAA,gBAAoB,SAAE,EAAA,CAAU;MAAC,gBAAA,MAAA;OACjC,IAAC,OAAQ;AACP,eAAO,QAAA,SAAA;;OAEA;OACV,CAAC;MAAC;;IAEP,CAAA;;EAEH,CAAC,CAAC"}
@@ -5,19 +5,19 @@ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
5
5
  let _alloy_js_core = require("@alloy-js/core");
6
6
  let _alloy_js_typescript = require("@alloy-js/typescript");
7
7
  let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
8
- let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
9
- let _stryke_path_join = require("@stryke/path/join");
10
- let defu = require("defu");
11
- defu = require_runtime.__toESM(defu);
12
8
  let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
9
+ let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
13
10
  let _powerlines_plugin_alloy_typescript_components_entry_file = require("@powerlines/plugin-alloy/typescript/components/entry-file");
14
11
  let _shell_shock_core = require("@shell-shock/core");
15
12
  let _shell_shock_core_components_command_validation_logic = require("@shell-shock/core/components/command-validation-logic");
16
13
  let _shell_shock_preset_script_components_command_entry = require("@shell-shock/preset-script/components/command-entry");
17
14
  let _stryke_path_find = require("@stryke/path/find");
15
+ let _stryke_path_join = require("@stryke/path/join");
18
16
  let _stryke_path_replace = require("@stryke/path/replace");
19
17
  let _stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
20
18
  let _stryke_string_format_pascal_case = require("@stryke/string-format/pascal-case");
19
+ let defu = require("defu");
20
+ defu = require_runtime.__toESM(defu);
21
21
 
22
22
  //#region src/components/command-entry.tsx
23
23
  /**
@@ -72,8 +72,11 @@ function CommandEntry(props) {
72
72
  "isUnicodeSupported"
73
73
  ],
74
74
  state: [
75
+ {
76
+ name: "GlobalOptions",
77
+ type: true
78
+ },
75
79
  "useGlobal",
76
- "GlobalOptions",
77
80
  "useGlobalOptions",
78
81
  "withCommand",
79
82
  "useArgs",
@@ -3,18 +3,18 @@ import { createComponent, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
3
3
  import { For, Match, Show, Switch, code, computed } from "@alloy-js/core";
4
4
  import { ElseIfClause, IfStatement } from "@alloy-js/typescript";
5
5
  import { formatDescription, formatShortDescription, isDynamicPathSegment } from "@shell-shock/core/plugin-utils";
6
- import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
7
- import { joinPaths } from "@stryke/path/join";
8
- import defu from "defu";
9
6
  import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
7
+ import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
10
8
  import { EntryFile } from "@powerlines/plugin-alloy/typescript/components/entry-file";
11
9
  import { CommandParameterKinds } from "@shell-shock/core";
12
10
  import { CommandValidationLogic } from "@shell-shock/core/components/command-validation-logic";
13
11
  import { CommandHandlerDeclaration } from "@shell-shock/preset-script/components/command-entry";
14
12
  import { findFilePath, relativePath } from "@stryke/path/find";
13
+ import { joinPaths } from "@stryke/path/join";
15
14
  import { replaceExtension } from "@stryke/path/replace";
16
15
  import { camelCase } from "@stryke/string-format/camel-case";
17
16
  import { pascalCase } from "@stryke/string-format/pascal-case";
17
+ import defu from "defu";
18
18
 
19
19
  //#region src/components/command-entry.tsx
20
20
  /**
@@ -69,8 +69,11 @@ function CommandEntry(props) {
69
69
  "isUnicodeSupported"
70
70
  ],
71
71
  state: [
72
+ {
73
+ name: "GlobalOptions",
74
+ type: true
75
+ },
72
76
  "useGlobal",
73
- "GlobalOptions",
74
77
  "useGlobalOptions",
75
78
  "withCommand",
76
79
  "useArgs",
@@ -1 +1 @@
1
- {"version":3,"file":"command-entry.mjs","names":[],"sources":["../../src/components/command-entry.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, computed, For, Match, Show, Switch } from \"@alloy-js/core\";\nimport { ElseIfClause, IfStatement } from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport type { EntryFileProps } from \"@powerlines/plugin-alloy/typescript/components/entry-file\";\nimport { EntryFile } from \"@powerlines/plugin-alloy/typescript/components/entry-file\";\nimport type {\n CommandTree,\n NumberCommandParameter,\n StringCommandParameter\n} from \"@shell-shock/core\";\nimport { CommandParameterKinds } from \"@shell-shock/core\";\nimport { CommandValidationLogic } from \"@shell-shock/core/components/command-validation-logic\";\nimport {\n formatDescription,\n formatShortDescription,\n isDynamicPathSegment\n} from \"@shell-shock/core/plugin-utils\";\nimport { CommandHandlerDeclaration } from \"@shell-shock/preset-script/components/command-entry\";\nimport { findFilePath, relativePath } from \"@stryke/path/find\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { replaceExtension } from \"@stryke/path/replace\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { pascalCase } from \"@stryke/string-format/pascal-case\";\nimport defu from \"defu\";\nimport type { CLIPresetContext } from \"../types/plugin\";\nimport { VirtualCommandEntry } from \"./virtual-command-entry\";\n\nexport interface CommandEntryProps extends Omit<\n EntryFileProps,\n \"path\" | \"typeDefinition\"\n> {\n command: CommandTree;\n}\n\n/**\n * The command entry point for the Shell Shock project.\n */\nexport function CommandEntry(props: CommandEntryProps) {\n const { command, imports, builtinImports, ...rest } = props;\n\n const context = usePowerlines<CLIPresetContext>();\n const filePath = computed(() =>\n joinPaths(\n command.segments\n .filter(segment => !isDynamicPathSegment(segment))\n .join(\"/\"),\n \"index.ts\"\n )\n );\n const commandSourcePath = computed(() =>\n replaceExtension(\n relativePath(\n joinPaths(context.entryPath, findFilePath(filePath.value)),\n command.entry.input?.file || command.entry.file\n )\n )\n );\n const typeDefinition = computed(() => ({\n ...command.entry,\n output: command.id\n }));\n\n return (\n <>\n <EntryFile\n {...rest}\n path={filePath.value}\n typeDefinition={typeDefinition.value}\n imports={defu(imports ?? {}, {\n [commandSourcePath.value.startsWith(\".\")\n ? commandSourcePath.value\n : `./${commandSourcePath.value}`]:\n `handle${pascalCase(command.name)}`\n })}\n builtinImports={defu(builtinImports ?? {}, {\n env: [\"env\", \"isDevelopment\", \"isDebug\", \"paths\"],\n console: [\n \"debug\",\n \"info\",\n \"help\",\n \"warn\",\n \"error\",\n \"table\",\n \"italic\",\n \"cursor\",\n \"stripAnsi\",\n \"writeLine\",\n \"splitText\",\n \"textColors\",\n \"createSpinner\"\n ],\n utils: [\"sleep\", \"isMinimal\", \"isInteractive\", \"isUnicodeSupported\"],\n state: [\n \"useGlobal\",\n \"GlobalOptions\",\n \"useGlobalOptions\",\n \"withCommand\",\n \"useArgs\",\n \"hasFlag\",\n \"isHelp\"\n ],\n prompts: [\n \"text\",\n \"numeric\",\n \"toggle\",\n \"select\",\n \"confirm\",\n \"waitForKeyPress\",\n \"isCancel\"\n ],\n [joinPaths(\n \"help\",\n ...command.segments.filter(\n segment => !isDynamicPathSegment(segment)\n )\n )]: [\"showHelp\"],\n [joinPaths(\n \"banner\",\n ...command.segments.filter(\n segment => !isDynamicPathSegment(segment)\n )\n )]: [\"showBanner\"],\n upgrade: [\"executeUpgrade\"]\n })}>\n <Spacing />\n <CommandHandlerDeclaration\n command={command}\n banner={code`await showBanner();\n await executeUpgrade(); `}>\n <IfStatement condition={code`!isInteractive`}>\n <CommandValidationLogic command={command} />\n </IfStatement>\n <Show\n when={\n Object.values(command.options ?? {}).filter(\n option => !option.optional\n ).length > 0 ||\n Object.values(command.args ?? {}).filter(arg => !arg.optional)\n .length > 0\n }>\n <ElseIfClause\n condition={code`!isHelp() && (${Object.values(\n command.options ?? {}\n )\n .filter(option => !option.optional)\n .map(option =>\n (option.kind === CommandParameterKinds.string ||\n option.kind === CommandParameterKinds.number) &&\n option.variadic\n ? `(!options${\n option.name.includes(\"?\")\n ? `[\"${option.name}\"]`\n : `.${camelCase(option.name)}`\n } || options${\n option.name.includes(\"?\")\n ? `[\"${option.name}\"]`\n : `.${camelCase(option.name)}`\n }.length === 0)`\n : `options${\n option.name.includes(\"?\")\n ? `[\"${option.name}\"]`\n : `.${camelCase(option.name)}`\n } === undefined`\n )\n .join(\" || \")}${\n Object.values(command.options ?? {}).filter(\n option => !option.optional\n ).length > 0 &&\n Object.values(command.args ?? {}).filter(arg => !arg.optional)\n .length > 0\n ? \" || \"\n : \"\"\n }${Object.values(command.args ?? {})\n .filter(arg => !arg.optional)\n .map(arg =>\n (arg.kind === CommandParameterKinds.string ||\n arg.kind === CommandParameterKinds.number) &&\n arg.variadic\n ? `(!${camelCase(\n arg.name\n )} || ${camelCase(arg.name)}.length === 0)`\n : `${camelCase(arg.name)} === undefined`\n )\n .join(\" || \")}) `}>\n {code`writeLine(\"\"); `}\n <Spacing />\n <For each={Object.values(command.options ?? {})} doubleHardline>\n {option => (\n <>\n <Show when={!option.optional}>\n <IfStatement\n condition={code`!options${\n option.name.includes(\"?\")\n ? `[\"${option.name}\"]`\n : `.${camelCase(option.name)}`\n }`}>\n <Show\n when={\n option.kind === CommandParameterKinds.boolean ||\n !option.choices ||\n option.choices.length === 0\n }\n fallback={code`const value = await select({\n message: \\`Please select a value for the \\${italic(\"${\n option.name\n }\")} option\\`, ${\n option.description\n ? `description: \\`${formatDescription(\n option.description\n )}\\`,\n `\n : \"\"\n }options: [ ${(\n option as\n | StringCommandParameter\n | NumberCommandParameter\n ).choices\n ?.map(\n choice =>\n `{ value: ${JSON.stringify(\n choice\n )}, label: \"${choice}\", ${\n option.description\n ? `description: \\`${formatShortDescription(\n option.description\n )}\\``\n : \"\"\n } }`\n )\n .join(\", \")} ]\n });\n if (isCancel(value)) {\n return;\n }\n\n options${\n option.name.includes(\"?\")\n ? `[\"${option.name}\"]`\n : `.${camelCase(option.name)}`\n } = value;\n `}>\n <Switch>\n <Match\n when={\n option.kind === CommandParameterKinds.string\n }>{code`\n const value = await text({\n message: \\`Please provide a value for the \\${italic(\"${\n option.name\n }\")} option\\`,\n ${\n option.description\n ? `description: \\`${formatDescription(\n option.description\n )}\\`,\n `\n : \"\"\n }validate(val) {\n if (!val || val.trim() === \"\") {\n return \"A value must be provided for this option\";\n }\n\n return null;\n }\n });\n if (isCancel(value)) {\n return;\n }\n\n options${\n option.name.includes(\"?\")\n ? `[\"${option.name}\"]`\n : `.${camelCase(option.name)}`\n } = value;\n `}</Match>\n <Match\n when={\n option.kind === CommandParameterKinds.number\n }>{code`\n const value = await numeric({\n message: \\`Please provide a numeric value for the \\${italic(\"${option.name}\")} option\\`,\n ${\n option.description\n ? `description: \\`${formatDescription(\n option.description\n )}\\`,\n `\n : \"\"\n }\n });\n if (isCancel(value)) {\n return;\n }\n\n options${\n option.name.includes(\"?\")\n ? `[\"${option.name}\"]`\n : `.${camelCase(option.name)}`\n } = value;\n `}</Match>\n <Match\n when={\n option.kind === CommandParameterKinds.boolean\n }>{code`\n const value = await toggle({\n message: \\`Please select a value for the \\${italic(\"${option.name}\")} option\\`,\n ${\n option.description\n ? `description: \\`${formatDescription(\n option.description\n )}\\`,\n `\n : \"\"\n }\n });\n if (isCancel(value)) {\n return;\n }\n\n options${\n option.name.includes(\"?\")\n ? `[\"${option.name}\"]`\n : `.${camelCase(option.name)}`\n } = value;\n `}</Match>\n </Switch>\n </Show>\n </IfStatement>\n <Show\n when={\n (option.kind === CommandParameterKinds.string ||\n option.kind === CommandParameterKinds.number) &&\n option.variadic\n }>\n <ElseIfClause\n condition={code`options${\n option.name.includes(\"?\")\n ? `[\"${option.name}\"]`\n : `.${camelCase(option.name)}`\n }.length === 0`}>\n {code`\n const value = await text({\n message: \\`Please provide one or more${\n option.kind === CommandParameterKinds.number\n ? \" numeric\"\n : \"\"\n } values for the \\${italic(\"${\n option.name\n }\")} option (values are separated by a \\\\\",\\\\\" character)\\`,\n ${\n option.description\n ? `description: \\`${formatDescription(\n option.description\n )}\\`,\n `\n : \"\"\n }validate(val) {\n if (!val || val.trim() === \"\") {\n return \"A value must be provided for this option\";\n }\n if (val.split(\",\").map(v => v.trim()).filter(Boolean).length === 0) {\n return \"At least one value must be provided for this option\";\n }\n ${\n option.kind === CommandParameterKinds.number\n ? `const invalidIndex = val.split(\",\").map(v => v.trim()).filter(Boolean).findIndex(v => Number.isNaN(Number(v));\n if (invalidIndex !== -1) {\n return \\`Invalid numeric value provided for item #\\${invalidIndex + 1} - all provided items must be a valid number\\`;\n } `\n : \"\"\n }\n return undefined;\n }\n });\n if (isCancel(value)) {\n return;\n }\n\n options${\n option.name.includes(\"?\")\n ? `[\"${option.name}\"]`\n : `.${camelCase(option.name)}`\n } = value.split(\",\").map(value => value.trim()).filter(Boolean)${\n option.kind === CommandParameterKinds.number\n ? `.map(Number)`\n : \"\"\n } ;\n `}\n </ElseIfClause>\n </Show>\n </Show>\n </>\n )}\n </For>\n <Spacing />\n <For each={command.args} doubleHardline>\n {arg => (\n <>\n <Show when={!arg.optional}>\n <IfStatement condition={code`!${camelCase(arg.name)}`}>\n <Show\n when={\n arg.kind === CommandParameterKinds.boolean ||\n !arg.choices ||\n arg.choices.length === 0\n }\n fallback={code`const value = await select({\n message: \\`Please select a value for the \\${italic(\"${\n arg.name\n }\")} argument\\`,${\n arg.description\n ? `description: \\`${formatDescription(\n arg.description\n )}\\`,\n `\n : \"\"\n }\n options: [ ${(\n arg as\n | StringCommandParameter\n | NumberCommandParameter\n ).choices\n ?.map(\n choice =>\n `{ value: ${JSON.stringify(\n choice\n )}, label: \"${choice}\", ${\n arg.description\n ? `description: \\`${formatShortDescription(\n arg.description\n )}\\``\n : \"\"\n } }`\n )\n .join(\", \")} ]\n });\n if (isCancel(value)) {\n return;\n }\n\n ${camelCase(arg.name)} = value;\n `}>\n <Switch>\n <Match\n when={\n arg.kind === CommandParameterKinds.string\n }>{code`\n const value = await text({\n message: \\`Please provide a value for the \\${italic(\"${arg.name}\")} argument\\`,\n ${\n arg.description\n ? `description: \\`${formatShortDescription(\n arg.description\n )}\\`,\n `\n : \"\"\n }validate(val) {\n if (!val || val.trim() === \"\") {\n return \"A value must be provided for this argument\";\n }\n\n return null;\n }\n });\n if (isCancel(value)) {\n return;\n }\n\n ${camelCase(arg.name)} = value;\n `}</Match>\n <Match\n when={\n arg.kind === CommandParameterKinds.number\n }>{code`\n const value = await numeric({\n message: \\`Please provide a numeric value for the \\${italic(\"${arg.name}\")} argument\\`,\n ${\n arg.description\n ? `description: \\`${formatShortDescription(\n arg.description\n )}\\`,\n `\n : \"\"\n }\n });\n if (isCancel(value)) {\n return;\n }\n\n ${camelCase(arg.name)} = value;\n `}</Match>\n <Match\n when={\n arg.kind === CommandParameterKinds.boolean\n }>{code`\n const value = await toggle({\n message: \\`Please select a value for the \\${italic(\"${arg.name}\")} argument\\`,\n ${\n arg.description\n ? `description: \\`${formatShortDescription(\n arg.description\n )}\\`,\n `\n : \"\"\n }\n });\n if (isCancel(value)) {\n return;\n }\n\n ${camelCase(arg.name)} = value;\n `}</Match>\n </Switch>\n </Show>\n </IfStatement>\n <Show when={arg.variadic}>\n <ElseIfClause\n condition={code`${camelCase(arg.name)}.length === 0`}>\n {code`\n const value = await text({\n message: \\`Please provide one or more${\n arg.kind === CommandParameterKinds.number\n ? \" numeric\"\n : \"\"\n } values for the \\${italic(\"${arg.name}\")} argument (values are separated by a \\\\\",\\\\\" character)\\`,\n ${\n arg.description\n ? `description: \\`${formatShortDescription(\n arg.description\n )}\\`,\n `\n : \"\"\n }validate(val) {\n if (!val || val.trim() === \"\") {\n return \"A value must be provided for this argument\";\n }\n if (val.split(\",\").map(v => v.trim()).filter(Boolean).length === 0) {\n return \"At least one value must be provided for this argument\";\n }\n ${\n arg.kind === CommandParameterKinds.number\n ? `const invalidIndex = val.split(\",\").map(v => v.trim()).filter(Boolean).findIndex(v => Number.isNaN(Number(v));\n if (invalidIndex !== -1) {\n return \\`Invalid numeric value provided for item #\\${invalidIndex + 1} - all provided items must be a valid number\\`;\n } `\n : \"\"\n }\n\n return undefined;\n }\n });\n if (isCancel(value)) {\n return;\n }\n\n ${camelCase(arg.name)} = value.split(\",\").map(value => value.trim()).filter(Boolean)${\n arg.kind === CommandParameterKinds.number\n ? `.map(Number)`\n : arg.kind === CommandParameterKinds.boolean\n ? `.map(Boolean)`\n : \"\"\n } ;\n `}\n </ElseIfClause>\n </Show>\n </Show>\n </>\n )}\n </For>\n {code`writeLine(\"\"); `}\n <Spacing />\n <CommandValidationLogic command={command} />\n <IfStatement condition={code`failures.length > 0`}>\n {code`error(\\`The following validation failures were found while processing the user provided input, and must be corrected before the \\${italic(\"${\n command.title\n }\")} command can be executed: \\\\n\\\\n\\${failures.map(failure => \" - \" + failure).join(\"\\\\n\")}\\`);\n options.help = true; `}\n </IfStatement>\n </ElseIfClause>\n </Show>\n </CommandHandlerDeclaration>\n </EntryFile>\n <For each={Object.values(command.children)}>\n {child => (\n <Show\n when={child.isVirtual}\n fallback={<CommandEntry command={child} />}>\n <VirtualCommandEntry command={child} />\n </Show>\n )}\n </For>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;CA8CA,MAAO,EACL,SACC,SACD,gBACA,GAAA,SACF;;CAEE,MAAA,WAAA,eAAA,UAAA,QAAA,SAAA,QAAA,YAAA,CAAA,qBAAA,QAAA,CAAA,CAAA,KAAA,IAAA,EAAA,WAAA,CAAA;CACA,MAAK,oBAAoB,eAAc,iBAAa,aAAA,UAAA,QAAA,WAAA,aAAA,SAAA,MAAA,CAAA,EAAA,QAAA,MAAA,OAAA,QAAA,QAAA,MAAA,KAAA,CAAA,CAAA;CACpD,MAAA,iBAAA,gBAAA;EACF,GAAO,QAAQ;EACb,QAAQ,QAAS;;AAEjB,QAAM,CAAA,gBAAU,WAAc,WAAmB,MAAA;EACjD,IAAM,OAAA;AACJ,UAAS,SAAA;;EAET,IAAI,iBAAiB;AACnB,UAAO,eAAK;;EAEd,IAAA,UAAA;AACD,UAAA,KAAA,WAAA,EAAA,EAAA,GACK,kBAAmB,MAAC,WAAa,IAAA,GAAA,kBAAA,QAAA,KAAA,kBAAA,UAAA,SAAA,WAAA,QAAA,KAAA,IACrC,CAAA;;EAEA,IAAI,iBAAiB;AACnB,UAAE,KAAQ,kBAAoB,EAAC,EAAA;IAC/B,KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IACF,SAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IACD,OAAA;KAAA;KAAA;KAAA;KAAA;KAAA;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IAAK,OAAA;AACF,sBAAO,IAAK;;cAEb,IAAA,WAAO;AACR,sBAAA,gBAAA,cAAA;gBACA,IAAA,YAAA;AACC,wBAAW,IAAK,GAAA,UAAQ,IAAA,KAAA,CAAA;;gBAEpB,IAAI,WAAU;AACZ,wBAAI,IAAA;;qEAEL,IAAA,SAAA,sBAAA,SAAA,aAAA,GAAA,6BAAA,IAAA,KAAA;gCACH,IAAM,cAAc,kBAAK,uBAAA,IAAA,YAAA,CAAA;kCACvB,GAAO;;;;;;;kCAON,IAAA,SAAA,sBAAA,SAAA;;;0CAGO,GAAO;;;;;;;;;8BASf,UAAU,IAAI,KAAC,CAAK,gEAA4C,IAAA,SAAA,sBAAA,SAAA,iBAAA,IAAA,SAAA,sBAAA,UAAA,kBAAA,GAAA;;;gBAGjE,CAAC;;cAEL,CAAC,CAAC;;YAEN,CAAC,CAAC;WACJ,CAAC;UAAE,IAAI;UAAa,gBAAA,SAAA,EAAA,CAAA;UAAA,gBAAA,wBAAA,EACV,SACV,CAAC;UAAE,gBAAiB,aAAS;WAC5B,WAAU,IAAA;WACV,IAAI,WAAM;AACR,mBAAM,IAAI,8IAAiB,QAAA,MAAA;;;;;;QAKlC,CAAC;;MAEL,CAAC,CAAC;;IAEN,CAAC,CAAC;;EAEN,CAAC,CAAC,EAAE,gBAAkB,KAAK;EAC1B,IAAI,OAAO;AACT,UAAO,OAAO,OAAO,QAAA,SAAA;;EAEvB,WAAU,UAAS,gBAAK,MAAA;GACtB,IAAI,OAAO;AACT,WAAO,MAAK;;GAEd,IAAI,WAAS;AACX,WAAO,gBAAS,cAAA,EACd,SAAS,OACV,CAAC;;GAEJ,IAAI,WAAW;AACb,WAAO,gBAAQ,qBAA+B,EAC5C,SAAS,OACV,CAAC;;GAEL,CAAC;EACH,CAAC,CAAC"}
1
+ {"version":3,"file":"command-entry.mjs","names":[],"sources":["../../src/components/command-entry.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, computed, For, Match, Show, Switch } from \"@alloy-js/core\";\nimport { ElseIfClause, IfStatement } from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport type { EntryFileProps } from \"@powerlines/plugin-alloy/typescript/components/entry-file\";\nimport { EntryFile } from \"@powerlines/plugin-alloy/typescript/components/entry-file\";\nimport type {\n CommandTree,\n NumberCommandParameter,\n StringCommandParameter\n} from \"@shell-shock/core\";\nimport { CommandParameterKinds } from \"@shell-shock/core\";\nimport { CommandValidationLogic } from \"@shell-shock/core/components/command-validation-logic\";\nimport {\n formatDescription,\n formatShortDescription,\n isDynamicPathSegment\n} from \"@shell-shock/core/plugin-utils\";\nimport { CommandHandlerDeclaration } from \"@shell-shock/preset-script/components/command-entry\";\nimport { findFilePath, relativePath } from \"@stryke/path/find\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { replaceExtension } from \"@stryke/path/replace\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { pascalCase } from \"@stryke/string-format/pascal-case\";\nimport defu from \"defu\";\nimport type { CLIPresetContext } from \"../types/plugin\";\nimport { VirtualCommandEntry } from \"./virtual-command-entry\";\n\nexport interface CommandEntryProps extends Omit<\n EntryFileProps,\n \"path\" | \"typeDefinition\"\n> {\n command: CommandTree;\n}\n\n/**\n * The command entry point for the Shell Shock project.\n */\nexport function CommandEntry(props: CommandEntryProps) {\n const { command, imports, builtinImports, ...rest } = props;\n\n const context = usePowerlines<CLIPresetContext>();\n const filePath = computed(() =>\n joinPaths(\n command.segments\n .filter(segment => !isDynamicPathSegment(segment))\n .join(\"/\"),\n \"index.ts\"\n )\n );\n const commandSourcePath = computed(() =>\n replaceExtension(\n relativePath(\n joinPaths(context.entryPath, findFilePath(filePath.value)),\n command.entry.input?.file || command.entry.file\n )\n )\n );\n const typeDefinition = computed(() => ({\n ...command.entry,\n output: command.id\n }));\n\n return (\n <>\n <EntryFile\n {...rest}\n path={filePath.value}\n typeDefinition={typeDefinition.value}\n imports={defu(imports ?? {}, {\n [commandSourcePath.value.startsWith(\".\")\n ? commandSourcePath.value\n : `./${commandSourcePath.value}`]:\n `handle${pascalCase(command.name)}`\n })}\n builtinImports={defu(builtinImports ?? {}, {\n env: [\"env\", \"isDevelopment\", \"isDebug\", \"paths\"],\n console: [\n \"debug\",\n \"info\",\n \"help\",\n \"warn\",\n \"error\",\n \"table\",\n \"italic\",\n \"cursor\",\n \"stripAnsi\",\n \"writeLine\",\n \"splitText\",\n \"textColors\",\n \"createSpinner\"\n ],\n utils: [\"sleep\", \"isMinimal\", \"isInteractive\", \"isUnicodeSupported\"],\n state: [\n { name: \"GlobalOptions\", type: true },\n \"useGlobal\",\n \"useGlobalOptions\",\n \"withCommand\",\n \"useArgs\",\n \"hasFlag\",\n \"isHelp\"\n ],\n prompts: [\n \"text\",\n \"numeric\",\n \"toggle\",\n \"select\",\n \"confirm\",\n \"waitForKeyPress\",\n \"isCancel\"\n ],\n [joinPaths(\n \"help\",\n ...command.segments.filter(\n segment => !isDynamicPathSegment(segment)\n )\n )]: [\"showHelp\"],\n [joinPaths(\n \"banner\",\n ...command.segments.filter(\n segment => !isDynamicPathSegment(segment)\n )\n )]: [\"showBanner\"],\n upgrade: [\"executeUpgrade\"]\n })}>\n <Spacing />\n <CommandHandlerDeclaration\n command={command}\n banner={code`await showBanner();\n await executeUpgrade(); `}>\n <IfStatement condition={code`!isInteractive`}>\n <CommandValidationLogic command={command} />\n </IfStatement>\n <Show\n when={\n Object.values(command.options ?? {}).filter(\n option => !option.optional\n ).length > 0 ||\n Object.values(command.args ?? {}).filter(arg => !arg.optional)\n .length > 0\n }>\n <ElseIfClause\n condition={code`!isHelp() && (${Object.values(\n command.options ?? {}\n )\n .filter(option => !option.optional)\n .map(option =>\n (option.kind === CommandParameterKinds.string ||\n option.kind === CommandParameterKinds.number) &&\n option.variadic\n ? `(!options${\n option.name.includes(\"?\")\n ? `[\"${option.name}\"]`\n : `.${camelCase(option.name)}`\n } || options${\n option.name.includes(\"?\")\n ? `[\"${option.name}\"]`\n : `.${camelCase(option.name)}`\n }.length === 0)`\n : `options${\n option.name.includes(\"?\")\n ? `[\"${option.name}\"]`\n : `.${camelCase(option.name)}`\n } === undefined`\n )\n .join(\" || \")}${\n Object.values(command.options ?? {}).filter(\n option => !option.optional\n ).length > 0 &&\n Object.values(command.args ?? {}).filter(arg => !arg.optional)\n .length > 0\n ? \" || \"\n : \"\"\n }${Object.values(command.args ?? {})\n .filter(arg => !arg.optional)\n .map(arg =>\n (arg.kind === CommandParameterKinds.string ||\n arg.kind === CommandParameterKinds.number) &&\n arg.variadic\n ? `(!${camelCase(\n arg.name\n )} || ${camelCase(arg.name)}.length === 0)`\n : `${camelCase(arg.name)} === undefined`\n )\n .join(\" || \")}) `}>\n {code`writeLine(\"\"); `}\n <Spacing />\n <For each={Object.values(command.options ?? {})} doubleHardline>\n {option => (\n <>\n <Show when={!option.optional}>\n <IfStatement\n condition={code`!options${\n option.name.includes(\"?\")\n ? `[\"${option.name}\"]`\n : `.${camelCase(option.name)}`\n }`}>\n <Show\n when={\n option.kind === CommandParameterKinds.boolean ||\n !option.choices ||\n option.choices.length === 0\n }\n fallback={code`const value = await select({\n message: \\`Please select a value for the \\${italic(\"${\n option.name\n }\")} option\\`, ${\n option.description\n ? `description: \\`${formatDescription(\n option.description\n )}\\`,\n `\n : \"\"\n }options: [ ${(\n option as\n | StringCommandParameter\n | NumberCommandParameter\n ).choices\n ?.map(\n choice =>\n `{ value: ${JSON.stringify(\n choice\n )}, label: \"${choice}\", ${\n option.description\n ? `description: \\`${formatShortDescription(\n option.description\n )}\\``\n : \"\"\n } }`\n )\n .join(\", \")} ]\n });\n if (isCancel(value)) {\n return;\n }\n\n options${\n option.name.includes(\"?\")\n ? `[\"${option.name}\"]`\n : `.${camelCase(option.name)}`\n } = value;\n `}>\n <Switch>\n <Match\n when={\n option.kind === CommandParameterKinds.string\n }>{code`\n const value = await text({\n message: \\`Please provide a value for the \\${italic(\"${\n option.name\n }\")} option\\`,\n ${\n option.description\n ? `description: \\`${formatDescription(\n option.description\n )}\\`,\n `\n : \"\"\n }validate(val) {\n if (!val || val.trim() === \"\") {\n return \"A value must be provided for this option\";\n }\n\n return null;\n }\n });\n if (isCancel(value)) {\n return;\n }\n\n options${\n option.name.includes(\"?\")\n ? `[\"${option.name}\"]`\n : `.${camelCase(option.name)}`\n } = value;\n `}</Match>\n <Match\n when={\n option.kind === CommandParameterKinds.number\n }>{code`\n const value = await numeric({\n message: \\`Please provide a numeric value for the \\${italic(\"${option.name}\")} option\\`,\n ${\n option.description\n ? `description: \\`${formatDescription(\n option.description\n )}\\`,\n `\n : \"\"\n }\n });\n if (isCancel(value)) {\n return;\n }\n\n options${\n option.name.includes(\"?\")\n ? `[\"${option.name}\"]`\n : `.${camelCase(option.name)}`\n } = value;\n `}</Match>\n <Match\n when={\n option.kind === CommandParameterKinds.boolean\n }>{code`\n const value = await toggle({\n message: \\`Please select a value for the \\${italic(\"${option.name}\")} option\\`,\n ${\n option.description\n ? `description: \\`${formatDescription(\n option.description\n )}\\`,\n `\n : \"\"\n }\n });\n if (isCancel(value)) {\n return;\n }\n\n options${\n option.name.includes(\"?\")\n ? `[\"${option.name}\"]`\n : `.${camelCase(option.name)}`\n } = value;\n `}</Match>\n </Switch>\n </Show>\n </IfStatement>\n <Show\n when={\n (option.kind === CommandParameterKinds.string ||\n option.kind === CommandParameterKinds.number) &&\n option.variadic\n }>\n <ElseIfClause\n condition={code`options${\n option.name.includes(\"?\")\n ? `[\"${option.name}\"]`\n : `.${camelCase(option.name)}`\n }.length === 0`}>\n {code`\n const value = await text({\n message: \\`Please provide one or more${\n option.kind === CommandParameterKinds.number\n ? \" numeric\"\n : \"\"\n } values for the \\${italic(\"${\n option.name\n }\")} option (values are separated by a \\\\\",\\\\\" character)\\`,\n ${\n option.description\n ? `description: \\`${formatDescription(\n option.description\n )}\\`,\n `\n : \"\"\n }validate(val) {\n if (!val || val.trim() === \"\") {\n return \"A value must be provided for this option\";\n }\n if (val.split(\",\").map(v => v.trim()).filter(Boolean).length === 0) {\n return \"At least one value must be provided for this option\";\n }\n ${\n option.kind === CommandParameterKinds.number\n ? `const invalidIndex = val.split(\",\").map(v => v.trim()).filter(Boolean).findIndex(v => Number.isNaN(Number(v));\n if (invalidIndex !== -1) {\n return \\`Invalid numeric value provided for item #\\${invalidIndex + 1} - all provided items must be a valid number\\`;\n } `\n : \"\"\n }\n return undefined;\n }\n });\n if (isCancel(value)) {\n return;\n }\n\n options${\n option.name.includes(\"?\")\n ? `[\"${option.name}\"]`\n : `.${camelCase(option.name)}`\n } = value.split(\",\").map(value => value.trim()).filter(Boolean)${\n option.kind === CommandParameterKinds.number\n ? `.map(Number)`\n : \"\"\n } ;\n `}\n </ElseIfClause>\n </Show>\n </Show>\n </>\n )}\n </For>\n <Spacing />\n <For each={command.args} doubleHardline>\n {arg => (\n <>\n <Show when={!arg.optional}>\n <IfStatement condition={code`!${camelCase(arg.name)}`}>\n <Show\n when={\n arg.kind === CommandParameterKinds.boolean ||\n !arg.choices ||\n arg.choices.length === 0\n }\n fallback={code`const value = await select({\n message: \\`Please select a value for the \\${italic(\"${\n arg.name\n }\")} argument\\`,${\n arg.description\n ? `description: \\`${formatDescription(\n arg.description\n )}\\`,\n `\n : \"\"\n }\n options: [ ${(\n arg as\n | StringCommandParameter\n | NumberCommandParameter\n ).choices\n ?.map(\n choice =>\n `{ value: ${JSON.stringify(\n choice\n )}, label: \"${choice}\", ${\n arg.description\n ? `description: \\`${formatShortDescription(\n arg.description\n )}\\``\n : \"\"\n } }`\n )\n .join(\", \")} ]\n });\n if (isCancel(value)) {\n return;\n }\n\n ${camelCase(arg.name)} = value;\n `}>\n <Switch>\n <Match\n when={\n arg.kind === CommandParameterKinds.string\n }>{code`\n const value = await text({\n message: \\`Please provide a value for the \\${italic(\"${arg.name}\")} argument\\`,\n ${\n arg.description\n ? `description: \\`${formatShortDescription(\n arg.description\n )}\\`,\n `\n : \"\"\n }validate(val) {\n if (!val || val.trim() === \"\") {\n return \"A value must be provided for this argument\";\n }\n\n return null;\n }\n });\n if (isCancel(value)) {\n return;\n }\n\n ${camelCase(arg.name)} = value;\n `}</Match>\n <Match\n when={\n arg.kind === CommandParameterKinds.number\n }>{code`\n const value = await numeric({\n message: \\`Please provide a numeric value for the \\${italic(\"${arg.name}\")} argument\\`,\n ${\n arg.description\n ? `description: \\`${formatShortDescription(\n arg.description\n )}\\`,\n `\n : \"\"\n }\n });\n if (isCancel(value)) {\n return;\n }\n\n ${camelCase(arg.name)} = value;\n `}</Match>\n <Match\n when={\n arg.kind === CommandParameterKinds.boolean\n }>{code`\n const value = await toggle({\n message: \\`Please select a value for the \\${italic(\"${arg.name}\")} argument\\`,\n ${\n arg.description\n ? `description: \\`${formatShortDescription(\n arg.description\n )}\\`,\n `\n : \"\"\n }\n });\n if (isCancel(value)) {\n return;\n }\n\n ${camelCase(arg.name)} = value;\n `}</Match>\n </Switch>\n </Show>\n </IfStatement>\n <Show when={arg.variadic}>\n <ElseIfClause\n condition={code`${camelCase(arg.name)}.length === 0`}>\n {code`\n const value = await text({\n message: \\`Please provide one or more${\n arg.kind === CommandParameterKinds.number\n ? \" numeric\"\n : \"\"\n } values for the \\${italic(\"${arg.name}\")} argument (values are separated by a \\\\\",\\\\\" character)\\`,\n ${\n arg.description\n ? `description: \\`${formatShortDescription(\n arg.description\n )}\\`,\n `\n : \"\"\n }validate(val) {\n if (!val || val.trim() === \"\") {\n return \"A value must be provided for this argument\";\n }\n if (val.split(\",\").map(v => v.trim()).filter(Boolean).length === 0) {\n return \"At least one value must be provided for this argument\";\n }\n ${\n arg.kind === CommandParameterKinds.number\n ? `const invalidIndex = val.split(\",\").map(v => v.trim()).filter(Boolean).findIndex(v => Number.isNaN(Number(v));\n if (invalidIndex !== -1) {\n return \\`Invalid numeric value provided for item #\\${invalidIndex + 1} - all provided items must be a valid number\\`;\n } `\n : \"\"\n }\n\n return undefined;\n }\n });\n if (isCancel(value)) {\n return;\n }\n\n ${camelCase(arg.name)} = value.split(\",\").map(value => value.trim()).filter(Boolean)${\n arg.kind === CommandParameterKinds.number\n ? `.map(Number)`\n : arg.kind === CommandParameterKinds.boolean\n ? `.map(Boolean)`\n : \"\"\n } ;\n `}\n </ElseIfClause>\n </Show>\n </Show>\n </>\n )}\n </For>\n {code`writeLine(\"\"); `}\n <Spacing />\n <CommandValidationLogic command={command} />\n <IfStatement condition={code`failures.length > 0`}>\n {code`error(\\`The following validation failures were found while processing the user provided input, and must be corrected before the \\${italic(\"${\n command.title\n }\")} command can be executed: \\\\n\\\\n\\${failures.map(failure => \" - \" + failure).join(\"\\\\n\")}\\`);\n options.help = true; `}\n </IfStatement>\n </ElseIfClause>\n </Show>\n </CommandHandlerDeclaration>\n </EntryFile>\n <For each={Object.values(command.children)}>\n {child => (\n <Show\n when={child.isVirtual}\n fallback={<CommandEntry command={child} />}>\n <VirtualCommandEntry command={child} />\n </Show>\n )}\n </For>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAsCA,SAAS,aAAmB,OAAO;CACnC,MAAQ,EACR,SACA,SACA,gBACA,GAAO,SACD;;CAEN,MAAO,WAAU,eAAiB,UAAS,QAAI,SAAA,QAAA,YAAA,CAAA,qBAAA,QAAA,CAAA,CAAA,KAAA,IAAA,EAAA,WAAA,CAAA;CAC7C,MAAA,oBAAc,eAAA,iBAAA,aAAA,UAAA,QAAA,WAAA,aAAA,SAAA,MAAA,CAAA,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C1F,SACV,CAAC;UAAE,gBAAgB,aAAS;WAC3B,WAAW,IAAI;WACf,IAAI,WAAW;AACb,mBAAO,IAAG,8IAAA,QAAA,MAAA;;;WAGb,CAAC;UAAC;;QAEN,CAAC;;;;IAIT,CAAC,CAAC;;EAEN,CAAC,CAAC,EAAE,gBAAkB,KAAK;EAC1B,IAAI,OAAO;AACT,UAAO,OAAO,OAAO,QAAG,SAAc;;EAExC,WAAU,UAAS,gBAAY,MAAA;GAC7B,IAAI,OAAO;AACT,WAAO,MAAM;;GAEf,IAAI,WAAW;AACb,WAAO,gBAAW,cAAA,EAChB,SAAS,OACV,CAAC;;GAEJ,IAAI,WAAK;AACP,WAAO,gBAAkB,qBAAoB,EAC3C,SAAO,OACR,CAAC;;GAEL,CAAC;EACH,CAAC,CAAC"}
@@ -4,8 +4,8 @@ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
4
4
  let _alloy_js_core = require("@alloy-js/core");
5
5
  let _alloy_js_typescript = require("@alloy-js/typescript");
6
6
  let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
7
- let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
8
7
  let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
8
+ let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
9
9
  let _shell_shock_preset_script_components = require("@shell-shock/preset-script/components");
10
10
 
11
11
  //#region src/components/command-router.tsx
@@ -2,8 +2,8 @@ import { createComponent, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
2
2
  import { For, code } from "@alloy-js/core";
3
3
  import { IfStatement } from "@alloy-js/typescript";
4
4
  import { getAppBin } from "@shell-shock/core/plugin-utils";
5
- import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
6
5
  import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
6
+ import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
7
7
  import { CommandRouter as CommandRouter$1, CommandRouterBody } from "@shell-shock/preset-script/components";
8
8
 
9
9
  //#region src/components/command-router.tsx
@@ -1 +1 @@
1
- {"version":3,"file":"command-router.mjs","names":[],"sources":["../../src/components/command-router.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, For } from \"@alloy-js/core\";\nimport { IfStatement } from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport type { CommandTree } from \"@shell-shock/core\";\nimport { getAppBin } from \"@shell-shock/core/plugin-utils\";\nimport type { CommandRouterProps } from \"@shell-shock/preset-script/components\";\nimport {\n CommandRouter as BaseCommandRouter,\n CommandRouterBody\n} from \"@shell-shock/preset-script/components\";\nimport type { CLIPresetContext } from \"../types\";\n\nexport interface CommandRouterSelectOptionsProps {\n commands?: Record<string, CommandTree>;\n}\n\nexport function CommandRouterSelectOptions(\n props: CommandRouterSelectOptionsProps\n) {\n const { commands } = props;\n\n const context = usePowerlines<CLIPresetContext>();\n\n return (\n <For each={Object.values(commands ?? {})} joiner=\",\" hardline>\n {command =>\n command.isVirtual ? (\n <CommandRouterSelectOptions commands={command.children ?? {}} />\n ) : (\n code`{ value: [${command.segments\n .map(segment => `\"${segment}\"`)\n .join(\n \", \"\n )}], label: \"${command.title}\", description: \\`(${getAppBin(\n context\n )} ${command.segments.join(\" \")})\\`${\n command.icon ? `, icon: \"${command.icon.trim()}\"` : \"\"\n } }`\n )\n }\n </For>\n );\n}\n\n/**\n * A component that renders a command router interface, allowing users to select and execute commands from a provided list of commands and segments. This component serves as a wrapper around the base CommandRouter, adding additional UI elements and logic for command selection.\n */\nexport function CommandRouter(props: CommandRouterProps) {\n const { segments, commands } = props;\n\n return (\n <>\n <BaseCommandRouter {...props} segments={segments} commands={commands} />\n <Spacing />\n <IfStatement condition={code`isInteractive && !isHelp()`}>\n {code`await showBanner();\n\n let segments = await select({\n message: \"Which command would you like to execute?\",\n options: [ `}\n <CommandRouterSelectOptions commands={commands} />\n {` ],\n });\n if (isCancel(segments)) {\n return;\n }\n\n let dynamics = {} as Record<string, string>;\n for (const dynamic of segments.filter(segment => segment.startsWith(\"[\") && segment.endsWith(\"]\"))) {\n const value = await text({\n message: \\`Please provide a value for \\${dynamic.replace(/^\\[+/, \"\").replace(/\\]+$/, \"\")}:\\`,\n });\n if (isCancel(value)) {\n return;\n }\n dynamics[dynamic] = value;\n }\n\n segments = segments.map(segment => dynamics[segment] || segment);\n const context = useGlobal();\n if (context) {\n context.inputArgs = [args.length > 0 ? args[0] : undefined, args.length > 1 ? args[1] : undefined, ...segments, ...args.slice(${\n segments.length + 2\n })].filter(Boolean) as string[];\n }\n\n command = segments[0];\n args = context.inputArgs; `}\n <CommandRouterBody {...props} segments={segments} commands={commands} />\n </IfStatement>\n <Spacing />\n </>\n );\n}\n"],"mappings":";;;;;;;;;AA+BA,SAAgB,2BAAC,OAAgC;CAC/C,MAAA,EACF;CAEA,MAAO,UAAS,eAA0B;AACxC,QAAO,gBAAA,KAAA;EACP,IAAA,OAAA;AACA,UAAQ,OAAU,OAAG,YAAK,EAAA,CAAA;;EAE1B,QAAM;;EAEN,WAAO,YAAA,QAAA,YAAA,gBAAA,4BAAA,EACJ,IAAI,WAAY;AACd,UAAQ,QAAC,YAAA,EAAA;KAEX,CAAC,GAAG,IAAE,aAAA,QAAA,SAA2B,KAAS,YAAS,IAAA,QAAc,GAAG,CAAA,KAAA,KAAA,CAAA,aAAA,QAAA,MAAA,qBAAA,UAAA,QAAA,CAAA,GAAA,QAAA,SAAA,KAAA,IAAA,CAAA,KAAA,QAAA,OAAA,YAAA,QAAA,KAAA,MAAA,CAAA,KAAA,GAAA;EACtE,CAAC;;;;;AAMJ,SAAY,cAAA,OAAA;CACV,MAAM,EACJ,UACA,aACE;AACJ,QAAI;EAAA,gBAAA,iBAAA,WAAA,OAAA;GACG;GACN;GACH,CAAA,CAAA;EAAA,gBAAA,SAAA,EAAA,CAAA;EAAA,gBAAA,aAAA;;GAEE,IAAA,WAAA;AACG,WAAA;KAAS,IAAC;;;;;mDAKN,UACJ,CAAA;KAAA,WAAA;;;;;;;;;;;;;;;;;;;;0IAoBO,SAAA,SAAA,EAAA;;;;oCAIuB;KAAA,gBAAA,mBAAA,WAAA,OAAA;MAC3B;;MAED,CAAC,CAAA;KAAA;;GAEL,CAAC;EAAE,gBAAe,SAAA,EAAA,CAAA;EAAA"}
1
+ {"version":3,"file":"command-router.mjs","names":[],"sources":["../../src/components/command-router.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, For } from \"@alloy-js/core\";\nimport { IfStatement } from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport type { CommandTree } from \"@shell-shock/core\";\nimport { getAppBin } from \"@shell-shock/core/plugin-utils\";\nimport type { CommandRouterProps } from \"@shell-shock/preset-script/components\";\nimport {\n CommandRouter as BaseCommandRouter,\n CommandRouterBody\n} from \"@shell-shock/preset-script/components\";\nimport type { CLIPresetContext } from \"../types\";\n\nexport interface CommandRouterSelectOptionsProps {\n commands?: Record<string, CommandTree>;\n}\n\nexport function CommandRouterSelectOptions(\n props: CommandRouterSelectOptionsProps\n) {\n const { commands } = props;\n\n const context = usePowerlines<CLIPresetContext>();\n\n return (\n <For each={Object.values(commands ?? {})} joiner=\",\" hardline>\n {command =>\n command.isVirtual ? (\n <CommandRouterSelectOptions commands={command.children ?? {}} />\n ) : (\n code`{ value: [${command.segments\n .map(segment => `\"${segment}\"`)\n .join(\n \", \"\n )}], label: \"${command.title}\", description: \\`(${getAppBin(\n context\n )} ${command.segments.join(\" \")})\\`${\n command.icon ? `, icon: \"${command.icon.trim()}\"` : \"\"\n } }`\n )\n }\n </For>\n );\n}\n\n/**\n * A component that renders a command router interface, allowing users to select and execute commands from a provided list of commands and segments. This component serves as a wrapper around the base CommandRouter, adding additional UI elements and logic for command selection.\n */\nexport function CommandRouter(props: CommandRouterProps) {\n const { segments, commands } = props;\n\n return (\n <>\n <BaseCommandRouter {...props} segments={segments} commands={commands} />\n <Spacing />\n <IfStatement condition={code`isInteractive && !isHelp()`}>\n {code`await showBanner();\n\n let segments = await select({\n message: \"Which command would you like to execute?\",\n options: [ `}\n <CommandRouterSelectOptions commands={commands} />\n {` ],\n });\n if (isCancel(segments)) {\n return;\n }\n\n let dynamics = {} as Record<string, string>;\n for (const dynamic of segments.filter(segment => segment.startsWith(\"[\") && segment.endsWith(\"]\"))) {\n const value = await text({\n message: \\`Please provide a value for \\${dynamic.replace(/^\\[+/, \"\").replace(/\\]+$/, \"\")}:\\`,\n });\n if (isCancel(value)) {\n return;\n }\n dynamics[dynamic] = value;\n }\n\n segments = segments.map(segment => dynamics[segment] || segment);\n const context = useGlobal();\n if (context) {\n context.inputArgs = [args.length > 0 ? args[0] : undefined, args.length > 1 ? args[1] : undefined, ...segments, ...args.slice(${\n segments.length + 2\n })].filter(Boolean) as string[];\n }\n\n command = segments[0];\n args = context.inputArgs; `}\n <CommandRouterBody {...props} segments={segments} commands={commands} />\n </IfStatement>\n <Spacing />\n </>\n );\n}\n"],"mappings":";;;;;;;;;AAyBA,SAAO,2BAAA,OAAA;CACL,MAAA,EACA,aACI;CACN,MAAO,UAAO,eAAmB;;EAEjC,IAAO,OAAA;AACL,UAAW,OAAO,OAAO,YAAY,EAAC,CAAA;;;EAGxC,UAAO;EACL,WAAO,YAAA,QAAA,YAAA,gBAAA,4BAAA,EACP,IAAA,WAAA;AACM,UAAE,QAAa,YAAK,EAAA;KAE1B,CAAA,GAAM,IAAA,aAAU,QAAc,SAAA,KAAA,YAAmB,IAAA,QAAA,GAAA,CAAA,KAAA,KAAA,CAAA,aAAA,QAAA,MAAA,qBAAA,UAAA,QAAA,CAAA,GAAA,QAAA,SAAA,KAAA,IAAA,CAAA,KAAA,QAAA,OAAA,YAAA,QAAA,KAAA,MAAA,CAAA,KAAA,GAAA;;;;;;AAOnD,SAAY,cAAA,OAAA;CACV,MAAM,EACJ,UACA,aACE;AACJ,QAAO;EAAC,gBAAiB,iBAAiB,WAAgB,OAAE;GAClD;GACE;GACX,CAAC,CAAC;EAAE,gBAAkB,SAAS,EAAE,CAAC;EAAE,gBAAkB,aAAQ;GAC7D,WAAS,IAAA;GACT,IAAI,WAAA;AACF,WAAA;KAAA,IAAA;;;;;mDAKJ,UACG,CAAA;KAAA,WAAe;;;;;;;;;;;;;;;;;;;;0IAoBZ,SAAA,SAAA,EAAA;;;;oCAI2B;KAAA,gBAAA,mBAAA,WAAA,OAAA;MACvB;MACA;MACL,CAAC,CAAC;KAAC;;GAEP,CAAC;EAAE,gBAAI,SAAA,EAAA,CAAA;EAAA"}
@@ -4,9 +4,9 @@ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
4
4
  let _alloy_js_core = require("@alloy-js/core");
5
5
  let _alloy_js_typescript = require("@alloy-js/typescript");
6
6
  let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
7
+ let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
7
8
  let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
8
9
  let defu = require("defu");
9
- let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
10
10
  let _shell_shock_plugin_upgrade_components_upgrade_builtin = require("@shell-shock/plugin-upgrade/components/upgrade-builtin");
11
11
 
12
12
  //#region src/components/upgrade-builtin.tsx
@@ -2,9 +2,9 @@ import { createComponent, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
2
2
  import { Show, code, splitProps } from "@alloy-js/core";
3
3
  import { ElseClause, ElseIfClause, FunctionDeclaration, IfStatement, VarDeclaration } from "@alloy-js/typescript";
4
4
  import { getAppBin, getAppTitle } from "@shell-shock/core/plugin-utils";
5
+ import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
5
6
  import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
6
7
  import { defu as defu$1 } from "defu";
7
- import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
8
8
  import { UpgradeBuiltin as UpgradeBuiltin$1 } from "@shell-shock/plugin-upgrade/components/upgrade-builtin";
9
9
 
10
10
  //#region src/components/upgrade-builtin.tsx
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-builtin.mjs","names":[],"sources":["../../src/components/upgrade-builtin.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, Show, splitProps } from \"@alloy-js/core\";\nimport {\n ElseClause,\n ElseIfClause,\n FunctionDeclaration,\n IfStatement,\n VarDeclaration\n} from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { getAppBin, getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport type { UpgradeBuiltinProps } from \"@shell-shock/plugin-upgrade/components/upgrade-builtin\";\nimport { UpgradeBuiltin as BaseUpgradeBuiltin } from \"@shell-shock/plugin-upgrade/components/upgrade-builtin\";\nimport { defu } from \"defu\";\nimport type { CLIPresetContext } from \"../types/plugin\";\n\n/**\n * A component to generate the `executeUpgrade` function in the `shell-shock:upgrade` builtin module.\n */\nexport function ExecuteUpgradeFunctionDeclaration() {\n const context = usePowerlines<CLIPresetContext>();\n\n return (\n <Show when={context.config.upgradeType !== false}>\n <FunctionDeclaration\n export\n async\n name=\"executeUpgrade\"\n doc={`Run upgrade processing for the ${getAppTitle(\n context,\n true\n )} application.`}>\n <IfStatement condition={code`await isCheckForUpdatesRequired()`}>\n <VarDeclaration\n const\n name=\"spinner\"\n initializer={code`createSpinner({\n message: \"Checking for updates...\"\n }).start(); `}\n />\n <VarDeclaration\n const\n name=\"result\"\n initializer={code`await checkForUpdates({ force: true }); `}\n />\n <IfStatement\n condition={code`(result as CheckForUpdatesErrorResult)?.isError`}>\n {code`spinner.error(\\`An error occurred while checking for ${getAppTitle(\n context,\n true\n )} application updates. Please try again later - if the problem persists, please contact support.\\`);\n debug((result as CheckForUpdatesErrorResult).error); `}\n </IfStatement>\n <ElseIfClause\n condition={code`!(result as CheckForUpdatesSuccessResult)?.isUpToDate`}>\n <Show\n when={\n context.config.upgradeType !== false &&\n (context.config.upgradeType === \"confirm\" ||\n context.config.upgradeType === \"manual\")\n }\n fallback={\n <>\n {code`spinner.stop();\n info(\\`A new version of ${getAppTitle(\n context,\n true\n )} is available: \\${red(\\`v\\${(result as CheckForUpdatesSuccessResult).currentVersion}\\`)} \\${textColors.body.tertiary(\"➜\")} \\${green(\\`v\\${(result as CheckForUpdatesSuccessResult).latestVersion}\\`)}\\${(result as CheckForUpdatesSuccessResult).package?.date ? textColors.body.tertiary(\\` (updated on \\${(result as CheckForUpdatesSuccessResult).package?.date})\\`) : \"\"}\\`);\n\n try {\n await upgrade();\n spinner.success(\"Update successful! Please restart the application to apply the update.\");\n\n writeLine(\"\");\n help(\\`You can view the changelog for this release at any time by running the \\${inlineCode(\"${getAppBin(\n context\n )} changelog --latest\")} command.\\`);\n\n writeLine(\"\");\n writeLine(\"Press any key to exit the application...\");\n\n await waitForKeyPress();\n return;\n } catch (err) {\n spinner.error(\\`An error occurred while updating ${getAppTitle(\n context,\n true\n )} to v\\${(result as CheckForUpdatesSuccessResult).latestVersion}. Please try again later - if the problem persists, please contact support.\\`);\n debug(err);\n } `}\n <Spacing />\n </>\n }>\n {code`spinner.stop();\n warn(\\`A new version of ${getAppTitle(\n context,\n true\n )} is available: \\${red(\\`v\\${(result as CheckForUpdatesSuccessResult).currentVersion}\\`)} \\${textColors.body.tertiary(\"➜\")} \\${green(\\`v\\${(result as CheckForUpdatesSuccessResult).latestVersion}\\`)}\\${(result as CheckForUpdatesSuccessResult).package.date ? textColors.body.tertiary(\\` (updated on \\${(result as CheckForUpdatesSuccessResult).package.date})\\`) : \"\"}${\n context.config.upgradeType !== false &&\n context.config.upgradeType === \"manual\"\n ? ` \\\\nPlease run \\`${getAppBin(\n context\n )} upgrade\\` to upgrade to the latest version.`\n : \"\"\n }\\`); `}\n <Spacing />\n <Show\n when={\n context.config.upgradeType !== false &&\n context.config.upgradeType === \"confirm\"\n }>\n {code`const willUpgradeNow = await confirm({\n message: \\`Would you like to update to v\\${(result as CheckForUpdatesSuccessResult).latestVersion} now?\\`,\n initialValue: true\n });\n if (isCancel(willUpgradeNow)) {\n return;\n }\n\n if (willUpgradeNow) {\n spinner.text = \\`Updating ${getAppTitle(\n context,\n true\n )} to v\\${(result as CheckForUpdatesSuccessResult).latestVersion}...\\`;\n spinner.start();\n\n try {\n await upgrade();\n spinner.success(\"Update successful! Please restart the application to apply the update.\");\n\n writeLine(\"\");\n help(\\`You can view the changelog for this release at any time by running the \\${inlineCode(\"${getAppBin(\n context\n )} changelog --latest\")} command.\\`);\n\n writeLine(\"\");\n writeLine(\"Press any key to exit the application...\");\n\n await waitForKeyPress();\n return;\n } catch (err) {\n spinner.error(\\`An error occurred while updating ${getAppTitle(\n context,\n true\n )} to v\\${(result as CheckForUpdatesSuccessResult).latestVersion}. Please try again later - if the problem persists, please contact support.\\`);\n return { error: err };\n }\n } else {\n help(\"Updates can be performed at any time by running the \\`${getAppBin(\n context\n )} upgrade\\` command. Please remember that keeping your application up to date is important for ensuring you have the latest features, performance improvements, and security patches.\");\n } `}\n </Show>\n </Show>\n </ElseIfClause>\n <ElseClause>{code`spinner.success(\"Currently running the latest version of ${getAppTitle(\n context,\n true\n )}.\");\n writeLine(\"\");\n `}</ElseClause>\n </IfStatement>\n </FunctionDeclaration>\n </Show>\n );\n}\n\n/**\n * A built-in upgrade module for Shell Shock.\n */\nexport function UpgradeBuiltin(props: UpgradeBuiltinProps) {\n const [{ children, builtinImports }, rest] = splitProps(props, [\n \"children\",\n \"builtinImports\"\n ]);\n\n return (\n <BaseUpgradeBuiltin\n {...rest}\n builtinImports={defu(builtinImports ?? {}, {\n console: [\"createSpinner\", \"debug\", \"info\"],\n prompts: [\"waitForKeyPress\"]\n })}>\n <ExecuteUpgradeFunctionDeclaration />\n <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </BaseUpgradeBuiltin>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAgCA,SAAc,oCAAkC;;AAE9C,QAAA,gBAAA,MAAA;EACE,IAAC,OAAU;AACb,UAAA,QAAA,OAAA,gBAAA;;EAEA,IAAM,WAAU;;IAEV,UAAC;IACJ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ED,CAAC;QAAE,gBAAkB,YAAA,EACpB,IAAE,WAAa;AACb,gBAAE,IAAO,4DAAA,YAAA,SAAA,KAAA,CAAA;;;;;;MAMhB,CAAC;;;;EAIT,CAAC;;;;;;CAOF,MAAM,CAAC,EACL,UACA,kBACC,QAAQ,WAAO,OAAQ,CAAA,YAAgB,iBAAgB,CAAA;AAC1D,QAAO,gBAAa,kBAAO,WAAA,MAAA;EACzB,IAAI,iBAAc;AAChB,UAAO,OAAK,kBAAa,EAAO,EAAE;IAChC,SAAS;KAAC;KAAiB;KAAM;KAAA;IACjC,SAAS,CAAC,kBAAA;IACX,CAAC;;EAEJ,IAAI,WAAW;AACb,UAAO;IAAC,gBAAiB,mCAA8B,EAAQ,CAAA;IAAA,gBAAoB,SAAU,EAAC,CAAA;IAAA,gBAAsB,MAAK;KACvH,IAAI,OAAO;AACT,aAAM,QAAI,SAAA;;KAER;KACL,CAAC;IAAC;;EAEN,CAAC,CAAC"}
1
+ {"version":3,"file":"upgrade-builtin.mjs","names":[],"sources":["../../src/components/upgrade-builtin.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, Show, splitProps } from \"@alloy-js/core\";\nimport {\n ElseClause,\n ElseIfClause,\n FunctionDeclaration,\n IfStatement,\n VarDeclaration\n} from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { getAppBin, getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport type { UpgradeBuiltinProps } from \"@shell-shock/plugin-upgrade/components/upgrade-builtin\";\nimport { UpgradeBuiltin as BaseUpgradeBuiltin } from \"@shell-shock/plugin-upgrade/components/upgrade-builtin\";\nimport { defu } from \"defu\";\nimport type { CLIPresetContext } from \"../types/plugin\";\n\n/**\n * A component to generate the `executeUpgrade` function in the `shell-shock:upgrade` builtin module.\n */\nexport function ExecuteUpgradeFunctionDeclaration() {\n const context = usePowerlines<CLIPresetContext>();\n\n return (\n <Show when={context.config.upgradeType !== false}>\n <FunctionDeclaration\n export\n async\n name=\"executeUpgrade\"\n doc={`Run upgrade processing for the ${getAppTitle(\n context,\n true\n )} application.`}>\n <IfStatement condition={code`await isCheckForUpdatesRequired()`}>\n <VarDeclaration\n const\n name=\"spinner\"\n initializer={code`createSpinner({\n message: \"Checking for updates...\"\n }).start(); `}\n />\n <VarDeclaration\n const\n name=\"result\"\n initializer={code`await checkForUpdates({ force: true }); `}\n />\n <IfStatement\n condition={code`(result as CheckForUpdatesErrorResult)?.isError`}>\n {code`spinner.error(\\`An error occurred while checking for ${getAppTitle(\n context,\n true\n )} application updates. Please try again later - if the problem persists, please contact support.\\`);\n debug((result as CheckForUpdatesErrorResult).error); `}\n </IfStatement>\n <ElseIfClause\n condition={code`!(result as CheckForUpdatesSuccessResult)?.isUpToDate`}>\n <Show\n when={\n context.config.upgradeType !== false &&\n (context.config.upgradeType === \"confirm\" ||\n context.config.upgradeType === \"manual\")\n }\n fallback={\n <>\n {code`spinner.stop();\n info(\\`A new version of ${getAppTitle(\n context,\n true\n )} is available: \\${red(\\`v\\${(result as CheckForUpdatesSuccessResult).currentVersion}\\`)} \\${textColors.body.tertiary(\"➜\")} \\${green(\\`v\\${(result as CheckForUpdatesSuccessResult).latestVersion}\\`)}\\${(result as CheckForUpdatesSuccessResult).package?.date ? textColors.body.tertiary(\\` (updated on \\${(result as CheckForUpdatesSuccessResult).package?.date})\\`) : \"\"}\\`);\n\n try {\n await upgrade();\n spinner.success(\"Update successful! Please restart the application to apply the update.\");\n\n writeLine(\"\");\n help(\\`You can view the changelog for this release at any time by running the \\${inlineCode(\"${getAppBin(\n context\n )} changelog --latest\")} command.\\`);\n\n writeLine(\"\");\n writeLine(\"Press any key to exit the application...\");\n\n await waitForKeyPress();\n return;\n } catch (err) {\n spinner.error(\\`An error occurred while updating ${getAppTitle(\n context,\n true\n )} to v\\${(result as CheckForUpdatesSuccessResult).latestVersion}. Please try again later - if the problem persists, please contact support.\\`);\n debug(err);\n } `}\n <Spacing />\n </>\n }>\n {code`spinner.stop();\n warn(\\`A new version of ${getAppTitle(\n context,\n true\n )} is available: \\${red(\\`v\\${(result as CheckForUpdatesSuccessResult).currentVersion}\\`)} \\${textColors.body.tertiary(\"➜\")} \\${green(\\`v\\${(result as CheckForUpdatesSuccessResult).latestVersion}\\`)}\\${(result as CheckForUpdatesSuccessResult).package.date ? textColors.body.tertiary(\\` (updated on \\${(result as CheckForUpdatesSuccessResult).package.date})\\`) : \"\"}${\n context.config.upgradeType !== false &&\n context.config.upgradeType === \"manual\"\n ? ` \\\\nPlease run \\`${getAppBin(\n context\n )} upgrade\\` to upgrade to the latest version.`\n : \"\"\n }\\`); `}\n <Spacing />\n <Show\n when={\n context.config.upgradeType !== false &&\n context.config.upgradeType === \"confirm\"\n }>\n {code`const willUpgradeNow = await confirm({\n message: \\`Would you like to update to v\\${(result as CheckForUpdatesSuccessResult).latestVersion} now?\\`,\n initialValue: true\n });\n if (isCancel(willUpgradeNow)) {\n return;\n }\n\n if (willUpgradeNow) {\n spinner.text = \\`Updating ${getAppTitle(\n context,\n true\n )} to v\\${(result as CheckForUpdatesSuccessResult).latestVersion}...\\`;\n spinner.start();\n\n try {\n await upgrade();\n spinner.success(\"Update successful! Please restart the application to apply the update.\");\n\n writeLine(\"\");\n help(\\`You can view the changelog for this release at any time by running the \\${inlineCode(\"${getAppBin(\n context\n )} changelog --latest\")} command.\\`);\n\n writeLine(\"\");\n writeLine(\"Press any key to exit the application...\");\n\n await waitForKeyPress();\n return;\n } catch (err) {\n spinner.error(\\`An error occurred while updating ${getAppTitle(\n context,\n true\n )} to v\\${(result as CheckForUpdatesSuccessResult).latestVersion}. Please try again later - if the problem persists, please contact support.\\`);\n return { error: err };\n }\n } else {\n help(\"Updates can be performed at any time by running the \\`${getAppBin(\n context\n )} upgrade\\` command. Please remember that keeping your application up to date is important for ensuring you have the latest features, performance improvements, and security patches.\");\n } `}\n </Show>\n </Show>\n </ElseIfClause>\n <ElseClause>{code`spinner.success(\"Currently running the latest version of ${getAppTitle(\n context,\n true\n )}.\");\n writeLine(\"\");\n `}</ElseClause>\n </IfStatement>\n </FunctionDeclaration>\n </Show>\n );\n}\n\n/**\n * A built-in upgrade module for Shell Shock.\n */\nexport function UpgradeBuiltin(props: UpgradeBuiltinProps) {\n const [{ children, builtinImports }, rest] = splitProps(props, [\n \"children\",\n \"builtinImports\"\n ]);\n\n return (\n <BaseUpgradeBuiltin\n {...rest}\n builtinImports={defu(builtinImports ?? {}, {\n console: [\"createSpinner\", \"debug\", \"info\"],\n prompts: [\"waitForKeyPress\"]\n })}>\n <ExecuteUpgradeFunctionDeclaration />\n <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </BaseUpgradeBuiltin>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AA6BA,SAAc,oCAAmC;CACjD,MAAQ,UAAC,eAAkB;AAC3B,QAAS,gBAAkB,MAAA;EAC3B,IAAO,OAAO;;;EAGV,IAAC,WAAa;AAChB,UAAA,gBAAA,qBAAA;IACK,UAAS;IACR,OAAO;;IAEP,IAAC,MAAA;AACC,YAAM,kCAA+B,YAAM,SAAA,KAAA,CAAA;;IAE7C,IAAA,WAAA;AACA,YAAA,gBAAA,aAAA;MACI,WAAE,IAAA;MACF,IAAE,WAAY;AAChB,cAAO;QAAA,gBAAA,gBAAA;SACP,SAAA;SACC,MAAW;SACb,aAAY,IAAW;;;SAGpB,CAAI;QAAE,gBAAO,gBAAA;SACb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WAAA,MAAA;EACtB,IAAI,iBAAiB;AACnB,UAAO,OAAK,kBAAkB,EAAE,EAAC;IAC/B,SAAS;KAAC;KAAW;KAAA;KAAA;IACrB,SAAS,CAAC,kBAAI;IACf,CAAC;;EAEJ,IAAI,WAAU;AACZ,UAAO;IAAC,gBAAS,mCAAA,EAAA,CAAA;IAAA,gBAAA,SAAA,EAAA,CAAA;IAAA,gBAAA,MAAA;KACf,IAAI,OAAM;AACR,aAAO,QAAG,SAAA;;KAEF;KACX,CAAC;IAAC;;EAEN,CAAC,CAAC"}
@@ -8,9 +8,9 @@ let _powerlines_plugin_alloy_core_components = require("@powerlines/plugin-alloy
8
8
  let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
9
9
  let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
10
10
  let _stryke_path_join = require("@stryke/path/join");
11
+ let _stryke_string_format_pascal_case = require("@stryke/string-format/pascal-case");
11
12
  let defu = require("defu");
12
13
  defu = require_runtime.__toESM(defu);
13
- let _stryke_string_format_pascal_case = require("@stryke/string-format/pascal-case");
14
14
  let _powerlines_plugin_alloy_typescript_components_typescript_file = require("@powerlines/plugin-alloy/typescript/components/typescript-file");
15
15
  let _shell_shock_preset_script_components_virtual_command_entry = require("@shell-shock/preset-script/components/virtual-command-entry");
16
16
 
@@ -57,8 +57,11 @@ function VirtualCommandEntry(props) {
57
57
  "sleep"
58
58
  ],
59
59
  state: [
60
+ {
61
+ name: "GlobalOptions",
62
+ type: true
63
+ },
60
64
  "useGlobal",
61
- "GlobalOptions",
62
65
  "useGlobalOptions",
63
66
  "withCommand",
64
67
  "useArgs",
@@ -6,8 +6,8 @@ import { Spacing } from "@powerlines/plugin-alloy/core/components";
6
6
  import { isDynamicPathSegment } from "@shell-shock/core/plugin-utils";
7
7
  import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
8
8
  import { joinPaths } from "@stryke/path/join";
9
- import defu from "defu";
10
9
  import { pascalCase } from "@stryke/string-format/pascal-case";
10
+ import defu from "defu";
11
11
  import { TypescriptFile } from "@powerlines/plugin-alloy/typescript/components/typescript-file";
12
12
  import { VirtualCommandHandlerDeclaration } from "@shell-shock/preset-script/components/virtual-command-entry";
13
13
 
@@ -54,8 +54,11 @@ function VirtualCommandEntry(props) {
54
54
  "sleep"
55
55
  ],
56
56
  state: [
57
+ {
58
+ name: "GlobalOptions",
59
+ type: true
60
+ },
57
61
  "useGlobal",
58
- "GlobalOptions",
59
62
  "useGlobalOptions",
60
63
  "withCommand",
61
64
  "useArgs",
@@ -1 +1 @@
1
- {"version":3,"file":"virtual-command-entry.mjs","names":[],"sources":["../../src/components/virtual-command-entry.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { computed, For, Show } from \"@alloy-js/core\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport type { TypescriptFileImports } from \"@powerlines/plugin-alloy/types/components\";\nimport type { EntryFileProps } from \"@powerlines/plugin-alloy/typescript/components/entry-file\";\nimport { TypescriptFile } from \"@powerlines/plugin-alloy/typescript/components/typescript-file\";\nimport type { CommandTree } from \"@shell-shock/core\";\nimport { isDynamicPathSegment } from \"@shell-shock/core/plugin-utils\";\nimport { VirtualCommandHandlerDeclaration } from \"@shell-shock/preset-script/components/virtual-command-entry\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { pascalCase } from \"@stryke/string-format/pascal-case\";\nimport defu from \"defu\";\nimport type { CLIPresetContext } from \"../types/plugin\";\nimport { CommandEntry } from \"./command-entry\";\nimport { CommandRouter } from \"./command-router\";\n\nexport interface VirtualCommandEntryProps extends Omit<\n EntryFileProps,\n \"path\" | \"typeDefinition\"\n> {\n command: CommandTree;\n}\n\n/**\n * The virtual command entry point for the Shell Shock project.\n */\nexport function VirtualCommandEntry(props: VirtualCommandEntryProps) {\n const { command, imports, builtinImports, ...rest } = props;\n\n const context = usePowerlines<CLIPresetContext>();\n const filePath = computed(() =>\n joinPaths(\n context.entryPath,\n command.segments\n .filter(segment => !isDynamicPathSegment(segment))\n .join(\"/\"),\n \"index.ts\"\n )\n );\n\n return (\n <>\n <TypescriptFile\n {...rest}\n path={filePath.value}\n imports={defu(\n imports ?? {},\n Object.entries(command.children)\n .filter(([, child]) => child.isVirtual)\n .reduce((ret, [name, child]) => {\n ret[`./${child.name}`] = [\n { name: \"handler\", alias: `handle${pascalCase(name)}` }\n ];\n\n return ret;\n }, {} as TypescriptFileImports)\n )}\n builtinImports={defu(builtinImports ?? {}, {\n env: [\"isDevelopment\", \"isDebug\"],\n console: [\n \"warn\",\n \"error\",\n \"info\",\n \"help\",\n \"table\",\n \"writeLine\",\n \"splitText\",\n \"textColors\",\n \"stripAnsi\"\n ],\n utils: [\n \"isMinimal\",\n \"isUnicodeSupported\",\n \"isInteractive\",\n \"findSuggestions\",\n \"sleep\"\n ],\n state: [\n \"useGlobal\",\n \"GlobalOptions\",\n \"useGlobalOptions\",\n \"withCommand\",\n \"useArgs\",\n \"hasFlag\",\n \"isHelp\"\n ],\n prompts: [\"text\", \"numeric\", \"toggle\", \"select\", \"isCancel\"],\n [joinPaths(\n \"help\",\n ...command.segments.filter(\n segment => !isDynamicPathSegment(segment)\n )\n )]: [\"showHelp\"],\n [joinPaths(\n \"banner\",\n ...command.segments.filter(\n segment => !isDynamicPathSegment(segment)\n )\n )]: [\"showBanner\"]\n })}>\n <Spacing />\n <VirtualCommandHandlerDeclaration command={command}>\n <CommandRouter\n segments={command.segments}\n commands={command.children}\n />\n </VirtualCommandHandlerDeclaration>\n </TypescriptFile>\n <For each={Object.values(command.children)}>\n {child => (\n <Show\n when={child.isVirtual}\n fallback={<CommandEntry command={child} />}>\n <VirtualCommandEntry command={child} />\n </Show>\n )}\n </For>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAyCA,SAAE,oBAAA,OAAA;CACA,MAAK,EACL,SACF,SACE,4BAEA;CACA,MAAM,UAAU,eAAc;CAC9B,MAAE,WAAS,eAAA,UAAA,QAAA,WAAA,QAAA,SAAA,QAAA,YAAA,CAAA,qBAAA,QAAA,CAAA,CAAA,KAAA,IAAA,EAAA,WAAA,CAAA;AACX,QAAI,CAAA,gBAAiB,gBAAA,WAAA,MAAA;EACnB,IAAE,OAAQ;AACR,UAAG,SAAO;;EAEZ,IAAG,UAAQ;AACX,UAAA,KAAA,WAAA,EAAA,EAAA,OAAA,QAAA,QAAA,SAAA,CAAA,QAAA,GAAA,WAAA,MAAA,UAAA,CAAA,QAAA,KAAA,CAAA,MAAA,WAAA;AACD,QAAA,KAAA,MAAA,UAAA,CAAA;;KAEM,OAAA,SAAA,WAAA,KAAA;KACJ,CAAA;AACE,WAAA;MACE,EAAE,CAAK,CAAA;;EAEZ,IAAI,iBAAa;AACf,UAAI,KAAQ,kBAAK,EAAA,EAAA;IACf,KAAE,CAAA,iBAAe,UAAgB;IACjC,SAAK;KAAA;KAAW;KAAW;KAAM;KAAS;KAAA;KAAA;KAAA;KAAA;KAAA;IAC1C,OAAK;KAAA;KAAc;KAAiB;KAAA;KAAA;KAAA;IACpC,OAAM;KAAA;KAAe;KAAU;KAAA;KAAA;KAAA;KAAA;KAAA;IAC/B,SAAS;KAAC;KAAO;KAAU;KAAQ;KAAQ;KAAiB;KAC3D,UAAM,QAAA,GAAA,QAAA,SAAA,QAAA,YAAA,CAAA,qBAAA,QAAA,CAAA,CAAA,GAAA,CAAA,WAAA;;IAER,CAAC;;EAEJ,IAAI,WAAC;AACH,UAAE,CAAA,gBAAqB,SAAA,EAAc,CAAC,EAAE,gBAAK,kCAAA;IAClC;IACT,IAAE,WAAS;AACT,YAAO,gBAAC,eAAA;MACN,IAAC,WAAM;AACN,cAAK,QAAA;;MAEN,IAAC,WAAM;AACN,cAAA,QAAU;;MAEZ,CAAC;;IAEL,CAAC,CAAC;;EAEN,CAAC,CAAC,EAAE,gBAAgB,KAAA;EACnB,IAAI,OAAK;AACP,UAAO,OAAA,OAAc,QAAA,SAAA;;EAEvB,WAAS,UAAK,gBAAA,MAAA;GACZ,IAAI,OAAC;AACH,WAAO,MAAE;;GAEX,IAAI,WAAG;AACL,WAAK,gBAAiB,cAAA,EACpB,SAAG,OACJ,CAAC;;GAEJ,IAAI,WAAS;AACX,WAAG,gBAAA,qBAAA,EACD,SAAS,OACV,CAAC;;GAEL,CAAC;EACH,CAAC,CAAC"}
1
+ {"version":3,"file":"virtual-command-entry.mjs","names":[],"sources":["../../src/components/virtual-command-entry.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { computed, For, Show } from \"@alloy-js/core\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport type { TypescriptFileImports } from \"@powerlines/plugin-alloy/types/components\";\nimport type { EntryFileProps } from \"@powerlines/plugin-alloy/typescript/components/entry-file\";\nimport { TypescriptFile } from \"@powerlines/plugin-alloy/typescript/components/typescript-file\";\nimport type { CommandTree } from \"@shell-shock/core\";\nimport { isDynamicPathSegment } from \"@shell-shock/core/plugin-utils\";\nimport { VirtualCommandHandlerDeclaration } from \"@shell-shock/preset-script/components/virtual-command-entry\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { pascalCase } from \"@stryke/string-format/pascal-case\";\nimport defu from \"defu\";\nimport type { CLIPresetContext } from \"../types/plugin\";\nimport { CommandEntry } from \"./command-entry\";\nimport { CommandRouter } from \"./command-router\";\n\nexport interface VirtualCommandEntryProps extends Omit<\n EntryFileProps,\n \"path\" | \"typeDefinition\"\n> {\n command: CommandTree;\n}\n\n/**\n * The virtual command entry point for the Shell Shock project.\n */\nexport function VirtualCommandEntry(props: VirtualCommandEntryProps) {\n const { command, imports, builtinImports, ...rest } = props;\n\n const context = usePowerlines<CLIPresetContext>();\n const filePath = computed(() =>\n joinPaths(\n context.entryPath,\n command.segments\n .filter(segment => !isDynamicPathSegment(segment))\n .join(\"/\"),\n \"index.ts\"\n )\n );\n\n return (\n <>\n <TypescriptFile\n {...rest}\n path={filePath.value}\n imports={defu(\n imports ?? {},\n Object.entries(command.children)\n .filter(([, child]) => child.isVirtual)\n .reduce((ret, [name, child]) => {\n ret[`./${child.name}`] = [\n { name: \"handler\", alias: `handle${pascalCase(name)}` }\n ];\n\n return ret;\n }, {} as TypescriptFileImports)\n )}\n builtinImports={defu(builtinImports ?? {}, {\n env: [\"isDevelopment\", \"isDebug\"],\n console: [\n \"warn\",\n \"error\",\n \"info\",\n \"help\",\n \"table\",\n \"writeLine\",\n \"splitText\",\n \"textColors\",\n \"stripAnsi\"\n ],\n utils: [\n \"isMinimal\",\n \"isUnicodeSupported\",\n \"isInteractive\",\n \"findSuggestions\",\n \"sleep\"\n ],\n state: [\n { name: \"GlobalOptions\", type: true },\n \"useGlobal\",\n \"useGlobalOptions\",\n \"withCommand\",\n \"useArgs\",\n \"hasFlag\",\n \"isHelp\"\n ],\n prompts: [\"text\", \"numeric\", \"toggle\", \"select\", \"isCancel\"],\n [joinPaths(\n \"help\",\n ...command.segments.filter(\n segment => !isDynamicPathSegment(segment)\n )\n )]: [\"showHelp\"],\n [joinPaths(\n \"banner\",\n ...command.segments.filter(\n segment => !isDynamicPathSegment(segment)\n )\n )]: [\"showBanner\"]\n })}>\n <Spacing />\n <VirtualCommandHandlerDeclaration command={command}>\n <CommandRouter\n segments={command.segments}\n commands={command.children}\n />\n </VirtualCommandHandlerDeclaration>\n </TypescriptFile>\n <For each={Object.values(command.children)}>\n {child => (\n <Show\n when={child.isVirtual}\n fallback={<CommandEntry command={child} />}>\n <VirtualCommandEntry command={child} />\n </Show>\n )}\n </For>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;CAkCA,MAAO,EACL,SACC,SACD,gBACA,GAAA,SACF;;CAEE,MAAA,WAAA,eAAA,UAAA,QAAA,WAAA,QAAA,SAAA,QAAA,YAAA,CAAA,qBAAA,QAAA,CAAA,CAAA,KAAA,IAAA,EAAA,WAAA,CAAA;AACA,QAAK,CAAA,gBAAqB,gBAAe,WAAY,MAAO;EAC5D,IAAA,OAAA;AACI,UAAC,SAAS;;;AAGd,UAAM,KAAU,WAAA,EAAa,EAAC,OAAA,QAAgB,QAAG,SAAA,CAAA,QAAA,GAAA,WAAA,MAAA,UAAA,CAAA,QAAA,KAAA,CAAA,MAAA,WAAA;AAC3C,QAAA,KAAS,MAAE,UAAa,CAAA;KAC5B,MAAS;KACP,OAAQ,SAAS,WAAA,KAAA;KACjB,CAAA;AACE,WAAO;MACN,EAAA,CAAA,CAAI;;EAET,IAAA,iBAAA;AACD,UAAA,KAAA,kBAAA,EAAA,EAAA;;IAEK,SAAC;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IACJ,OAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IACE,OAAA;KAAA;MACG,MAAM;MACR,MAAM;MACN;KAAA;KAAa;KAAA;KAAA;KAAA;KAAA;KAAA;IACb,SAAS;KAAC;KAAK;KAAA;KAAA;KAAA;KAAA;KACd,UAAQ,QAAQ,GAAA,QAAQ,SAAQ,QAAA,YAAA,CAAA,qBAAA,QAAA,CAAA,CAAA,GAAA,CAAA,WAAA;KAChC,UAAU,UAAU,GAAG,QAAQ,SAAC,QAAS,YAAA,CAAA,qBAAA,QAAA,CAAA,CAAA,GAAA,CAAA,aAAA;IAC3C,CAAC;;EAEJ,IAAI,WAAU;AACZ,UAAO,CAAC,gBAAC,SAAA,EAAA,CAAA,EAAA,gBAAA,kCAAA;;IAEP,IAAI,WAAS;AACX,YAAO,gBAAI,eAAqB;MACjC,IAAA,WAAA;AACD,cAAA,QAAqB;;MAEnB,IAAA,WAAS;AACN,cAAK,QAAA;;MAEP,CAAC;;IAEL,CAAC,CAAC;;EAEN,CAAC,CAAC,EAAE,gBAAgB,KAAA;EACnB,IAAI,OAAK;AACP,UAAO,OAAA,OAAS,QAAA,SAAA;;EAElB,WAAM,UAAO,gBAAA,MAAA;GACX,IAAI,OAAG;AACL,WAAK,MAAA;;GAEP,IAAI,WAAG;AACL,WAAK,gBAAK,cAAA,EACR,SAAC,OACF,CAAC;;GAEJ,IAAI,WAAG;AACL,WAAK,gBAAiB,qBAAA,EACpB,SAAG,OACJ,CAAC;;GAEL,CAAC;EACH,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-global-options.mjs","names":["getGlobalOptions","_getGlobalOptions"],"sources":["../../src/helpers/get-global-options.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { CommandBase, CommandOption } from \"@shell-shock/core\";\nimport { CommandParameterKinds } from \"@shell-shock/core\";\nimport { getGlobalOptions as _getGlobalOptions } from \"@shell-shock/preset-script/helpers/get-global-options\";\nimport type { CLIPresetContext } from \"../types\";\n\n/**\n * Get the default command options.\n *\n * @param context - The build context.\n * @param _ - The command input.\n * @returns The default command options.\n */\nexport function getGlobalOptions(\n context: CLIPresetContext,\n _: CommandBase\n): CommandOption[] {\n return [\n ..._getGlobalOptions(),\n context.config.interactive !== \"never\" &&\n context.config.interactive !== true && {\n name: \"interactive\",\n title: \"Interactive\",\n description:\n \"Enable interactive mode - will be set to false if running in a CI pipeline.\",\n alias: [\"i\", \"interact\"],\n kind: CommandParameterKinds.boolean,\n optional: true,\n default: context.config.interactive !== false\n },\n context.config.interactive !== \"never\" &&\n context.config.interactive !== false && {\n name: \"non-interactive\",\n title: \"Non-Interactive\",\n description:\n \"Disable interactive mode - will be set to true if running in a CI pipeline.\",\n alias: [\"no-interactive\"],\n kind: CommandParameterKinds.boolean,\n optional: true,\n default: false,\n isNegativeOf: \"interactive\"\n }\n ].filter(Boolean) as CommandOption[];\n}\n"],"mappings":";;;;;;;;;;;AA8BA,SAAgBA,mBACd,SACA,GACiB;AACjB,QAAO;EACL,GAAGC,kBAAmB;EACtB,QAAQ,OAAO,gBAAgB,WAC7B,QAAQ,OAAO,gBAAgB,QAAQ;GACrC,MAAM;GACN,OAAO;GACP,aACE;GACF,OAAO,CAAC,KAAK,WAAW;GACxB,MAAM,sBAAsB;GAC5B,UAAU;GACV,SAAS,QAAQ,OAAO,gBAAgB;GACzC;EACH,QAAQ,OAAO,gBAAgB,WAC7B,QAAQ,OAAO,gBAAgB,SAAS;GACtC,MAAM;GACN,OAAO;GACP,aACE;GACF,OAAO,CAAC,iBAAiB;GACzB,MAAM,sBAAsB;GAC5B,UAAU;GACV,SAAS;GACT,cAAc;GACf;EACJ,CAAC,OAAO,QAAQ"}
1
+ {"version":3,"file":"get-global-options.mjs","names":[],"sources":["../../src/helpers/get-global-options.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { CommandBase, CommandOption } from \"@shell-shock/core\";\nimport { CommandParameterKinds } from \"@shell-shock/core\";\nimport { getGlobalOptions as _getGlobalOptions } from \"@shell-shock/preset-script/helpers/get-global-options\";\nimport type { CLIPresetContext } from \"../types\";\n\n/**\n * Get the default command options.\n *\n * @param context - The build context.\n * @param _ - The command input.\n * @returns The default command options.\n */\nexport function getGlobalOptions(\n context: CLIPresetContext,\n _: CommandBase\n): CommandOption[] {\n return [\n ..._getGlobalOptions(),\n context.config.interactive !== \"never\" &&\n context.config.interactive !== true && {\n name: \"interactive\",\n title: \"Interactive\",\n description:\n \"Enable interactive mode - will be set to false if running in a CI pipeline.\",\n alias: [\"i\", \"interact\"],\n kind: CommandParameterKinds.boolean,\n optional: true,\n default: context.config.interactive !== false\n },\n context.config.interactive !== \"never\" &&\n context.config.interactive !== false && {\n name: \"non-interactive\",\n title: \"Non-Interactive\",\n description:\n \"Disable interactive mode - will be set to true if running in a CI pipeline.\",\n alias: [\"no-interactive\"],\n kind: CommandParameterKinds.boolean,\n optional: true,\n default: false,\n isNegativeOf: \"interactive\"\n }\n ].filter(Boolean) as CommandOption[];\n}\n"],"mappings":";;;;;;;;;;;AA2BA,SAAc,mBAAiB,SAAA,GAAA;AAC7B,QAAE;EAAA,GAAQ,kBAAoB;EAAA,QAAO,OAAA,gBAAA,WAAA,QAAA,OAAA,gBAAA,QAAA;GACrC,MAAA;GACF,OAAO;GACL,aAAS;GACP,OAAC,CAAA,KAAA,WAAA;GACF,MAAA,sBAAgB;GACjB,UAAO;GACL,SAAG,QAAA,OAAmB,gBAAA;GACvB;EAAC,QAAQ,OAAO,gBAAiB,WAAQ,QAAA,OAAA,gBAAA,SAAA;GACxC,MAAE;GACF,OAAI;GACJ,aAAY;GACZ,OAAI,CAAA,iBAAW;GACf,MAAM,sBAAoB;GAC1B,UAAU;GACV,SAAS;GACT,cAAc;GACf;EAAC,CAAC,OAAG,QAAS"}