@shell-shock/preset-cli 0.9.18 → 0.9.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (393) hide show
  1. package/README.md +1 -1
  2. package/dist/_virtual/_rolldown/runtime.cjs +1 -45
  3. package/dist/components/banner-builtin.cjs +5 -93
  4. package/dist/components/banner-builtin.mjs +5 -90
  5. package/dist/components/banner-builtin.mjs.map +1 -1
  6. package/dist/components/command-entry.cjs +56 -356
  7. package/dist/components/command-entry.mjs +56 -353
  8. package/dist/components/command-entry.mjs.map +1 -1
  9. package/dist/components/command-router.cjs +4 -60
  10. package/dist/components/command-router.mjs +4 -57
  11. package/dist/components/command-router.mjs.map +1 -1
  12. package/dist/components/index.cjs +1 -15
  13. package/dist/components/index.mjs +1 -7
  14. package/dist/components/upgrade-builtin.cjs +14 -135
  15. package/dist/components/upgrade-builtin.mjs +14 -132
  16. package/dist/components/upgrade-builtin.mjs.map +1 -1
  17. package/dist/components/virtual-command-entry.cjs +1 -113
  18. package/dist/components/virtual-command-entry.mjs +1 -110
  19. package/dist/components/virtual-command-entry.mjs.map +1 -1
  20. package/dist/helpers/get-global-options.cjs +1 -39
  21. package/dist/helpers/get-global-options.mjs +1 -38
  22. package/dist/helpers/get-global-options.mjs.map +1 -1
  23. package/dist/index.cjs +1 -173
  24. package/dist/index.d.cts.map +1 -1
  25. package/dist/index.d.mts.map +1 -1
  26. package/dist/index.mjs +1 -165
  27. package/dist/index.mjs.map +1 -1
  28. package/dist/types/index.mjs +1 -1
  29. package/dist/types/plugin.d.cts +3 -3
  30. package/dist/types/plugin.d.cts.map +1 -1
  31. package/dist/types/plugin.d.mts +3 -3
  32. package/dist/types/plugin.d.mts.map +1 -1
  33. package/dist/types/plugin.mjs +1 -1
  34. package/package.json +22 -74
  35. package/dist/_virtual/_rolldown/runtime.mjs +0 -42
  36. 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
  37. 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
  38. 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
  39. package/dist/node_modules/.pnpm/@stryke_types@0.11.3/node_modules/@stryke/types/dist/base.d.cts +0 -17
  40. package/dist/node_modules/.pnpm/@stryke_types@0.11.3/node_modules/@stryke/types/dist/base.d.cts.map +0 -1
  41. package/dist/node_modules/.pnpm/@stryke_types@0.11.3/node_modules/@stryke/types/dist/base.d.mts +0 -17
  42. package/dist/node_modules/.pnpm/@stryke_types@0.11.3/node_modules/@stryke/types/dist/base.d.mts.map +0 -1
  43. package/dist/node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.cjs +0 -8
  44. package/dist/node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.mjs +0 -8
  45. package/dist/node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.mjs.map +0 -1
  46. package/dist/node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.cjs +0 -167
  47. package/dist/node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.mjs +0 -167
  48. package/dist/node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.mjs.map +0 -1
  49. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.cjs +0 -373
  50. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.mjs +0 -374
  51. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.mjs.map +0 -1
  52. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.cjs +0 -60
  53. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.mjs +0 -59
  54. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.mjs.map +0 -1
  55. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.cjs +0 -6
  56. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.mjs +0 -6
  57. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.mjs.map +0 -1
  58. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.cjs +0 -6
  59. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.mjs +0 -6
  60. package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.mjs.map +0 -1
  61. package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode-codepoint.cjs +0 -59
  62. package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode-codepoint.mjs +0 -59
  63. package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode-codepoint.mjs.map +0 -1
  64. package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode.cjs +0 -338
  65. package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode.mjs +0 -333
  66. package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode.mjs.map +0 -1
  67. package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/generated/decode-data-html.cjs +0 -6
  68. package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/generated/decode-data-html.mjs +0 -6
  69. package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/generated/decode-data-html.mjs.map +0 -1
  70. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.cjs +0 -14
  71. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.mjs +0 -15
  72. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.mjs.map +0 -1
  73. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup-data.cjs +0 -655
  74. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup-data.mjs +0 -651
  75. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup-data.mjs.map +0 -1
  76. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.cjs +0 -48
  77. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.mjs +0 -47
  78. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.mjs.map +0 -1
  79. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/utilities.cjs +0 -24
  80. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/utilities.mjs +0 -24
  81. package/dist/node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/utilities.mjs.map +0 -1
  82. package/dist/node_modules/.pnpm/he@1.2.0/node_modules/he/he.cjs +0 -4095
  83. package/dist/node_modules/.pnpm/he@1.2.0/node_modules/he/he.mjs +0 -4093
  84. package/dist/node_modules/.pnpm/he@1.2.0/node_modules/he/he.mjs.map +0 -1
  85. package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/index.cjs +0 -449
  86. package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/index.mjs +0 -450
  87. package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/index.mjs.map +0 -1
  88. package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.cjs +0 -47
  89. package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.mjs +0 -48
  90. package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.mjs.map +0 -1
  91. package/dist/node_modules/.pnpm/markdown-it-abbr@2.0.0/node_modules/markdown-it-abbr/index.cjs +0 -94
  92. package/dist/node_modules/.pnpm/markdown-it-abbr@2.0.0/node_modules/markdown-it-abbr/index.mjs +0 -94
  93. package/dist/node_modules/.pnpm/markdown-it-abbr@2.0.0/node_modules/markdown-it-abbr/index.mjs.map +0 -1
  94. package/dist/node_modules/.pnpm/markdown-it-container@4.0.0/node_modules/markdown-it-container/index.cjs +0 -78
  95. package/dist/node_modules/.pnpm/markdown-it-container@4.0.0/node_modules/markdown-it-container/index.mjs +0 -78
  96. package/dist/node_modules/.pnpm/markdown-it-container@4.0.0/node_modules/markdown-it-container/index.mjs.map +0 -1
  97. package/dist/node_modules/.pnpm/markdown-it-deflist@3.0.0/node_modules/markdown-it-deflist/index.cjs +0 -123
  98. package/dist/node_modules/.pnpm/markdown-it-deflist@3.0.0/node_modules/markdown-it-deflist/index.mjs +0 -123
  99. package/dist/node_modules/.pnpm/markdown-it-deflist@3.0.0/node_modules/markdown-it-deflist/index.mjs.map +0 -1
  100. package/dist/node_modules/.pnpm/markdown-it-footnote@4.0.0/node_modules/markdown-it-footnote/index.cjs +0 -246
  101. package/dist/node_modules/.pnpm/markdown-it-footnote@4.0.0/node_modules/markdown-it-footnote/index.mjs +0 -244
  102. package/dist/node_modules/.pnpm/markdown-it-footnote@4.0.0/node_modules/markdown-it-footnote/index.mjs.map +0 -1
  103. package/dist/node_modules/.pnpm/markdown-it-ins@4.0.0/node_modules/markdown-it-ins/index.cjs +0 -80
  104. package/dist/node_modules/.pnpm/markdown-it-ins@4.0.0/node_modules/markdown-it-ins/index.mjs +0 -80
  105. package/dist/node_modules/.pnpm/markdown-it-ins@4.0.0/node_modules/markdown-it-ins/index.mjs.map +0 -1
  106. package/dist/node_modules/.pnpm/markdown-it-mark@4.0.0/node_modules/markdown-it-mark/index.cjs +0 -80
  107. package/dist/node_modules/.pnpm/markdown-it-mark@4.0.0/node_modules/markdown-it-mark/index.mjs +0 -80
  108. package/dist/node_modules/.pnpm/markdown-it-mark@4.0.0/node_modules/markdown-it-mark/index.mjs.map +0 -1
  109. package/dist/node_modules/.pnpm/markdown-it-sub@2.0.0/node_modules/markdown-it-sub/index.cjs +0 -45
  110. package/dist/node_modules/.pnpm/markdown-it-sub@2.0.0/node_modules/markdown-it-sub/index.mjs +0 -45
  111. package/dist/node_modules/.pnpm/markdown-it-sub@2.0.0/node_modules/markdown-it-sub/index.mjs.map +0 -1
  112. package/dist/node_modules/.pnpm/markdown-it-sup@2.0.0/node_modules/markdown-it-sup/index.cjs +0 -45
  113. package/dist/node_modules/.pnpm/markdown-it-sup@2.0.0/node_modules/markdown-it-sup/index.mjs +0 -45
  114. package/dist/node_modules/.pnpm/markdown-it-sup@2.0.0/node_modules/markdown-it-sup/index.mjs.map +0 -1
  115. package/dist/node_modules/.pnpm/markdown-it-task-lists@2.1.1/node_modules/markdown-it-task-lists/index.cjs +0 -94
  116. package/dist/node_modules/.pnpm/markdown-it-task-lists@2.1.1/node_modules/markdown-it-task-lists/index.mjs +0 -92
  117. package/dist/node_modules/.pnpm/markdown-it-task-lists@2.1.1/node_modules/markdown-it-task-lists/index.mjs.map +0 -1
  118. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/index.cjs +0 -1
  119. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/index.mjs +0 -3
  120. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/html_blocks.cjs +0 -69
  121. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/html_blocks.mjs +0 -69
  122. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/html_blocks.mjs.map +0 -1
  123. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/html_re.cjs +0 -9
  124. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/html_re.mjs +0 -8
  125. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/html_re.mjs.map +0 -1
  126. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/utils.cjs +0 -205
  127. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/utils.mjs +0 -189
  128. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/utils.mjs.map +0 -1
  129. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/index.cjs +0 -19
  130. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/index.mjs +0 -15
  131. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/index.mjs.map +0 -1
  132. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_destination.cjs +0 -61
  133. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs +0 -62
  134. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs.map +0 -1
  135. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_label.cjs +0 -35
  136. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_label.mjs +0 -35
  137. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_label.mjs.map +0 -1
  138. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_title.cjs +0 -43
  139. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_title.mjs +0 -44
  140. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_title.mjs.map +0 -1
  141. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/index.cjs +0 -488
  142. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/index.mjs +0 -489
  143. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/index.mjs.map +0 -1
  144. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_block.cjs +0 -148
  145. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_block.mjs +0 -149
  146. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_block.mjs.map +0 -1
  147. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_core.cjs +0 -51
  148. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_core.mjs +0 -52
  149. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_core.mjs.map +0 -1
  150. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_inline.cjs +0 -126
  151. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_inline.mjs +0 -127
  152. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_inline.mjs.map +0 -1
  153. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/commonmark.cjs +0 -57
  154. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/commonmark.mjs +0 -57
  155. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/commonmark.mjs.map +0 -1
  156. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/default.cjs +0 -23
  157. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/default.mjs +0 -23
  158. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/default.mjs.map +0 -1
  159. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/zero.cjs +0 -31
  160. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/zero.mjs +0 -31
  161. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/zero.mjs.map +0 -1
  162. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/renderer.cjs +0 -217
  163. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/renderer.mjs +0 -218
  164. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/renderer.mjs.map +0 -1
  165. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/ruler.cjs +0 -274
  166. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/ruler.mjs +0 -274
  167. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/ruler.mjs.map +0 -1
  168. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/blockquote.cjs +0 -107
  169. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/blockquote.mjs +0 -108
  170. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/blockquote.mjs.map +0 -1
  171. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/code.cjs +0 -27
  172. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/code.mjs +0 -27
  173. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/code.mjs.map +0 -1
  174. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/fence.cjs +0 -48
  175. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/fence.mjs +0 -48
  176. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/fence.mjs.map +0 -1
  177. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/heading.cjs +0 -35
  178. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/heading.mjs +0 -36
  179. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/heading.mjs.map +0 -1
  180. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/hr.cjs +0 -26
  181. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/hr.mjs +0 -27
  182. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/hr.mjs.map +0 -1
  183. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/html_block.cjs +0 -72
  184. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/html_block.mjs +0 -73
  185. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/html_block.mjs.map +0 -1
  186. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/lheading.cjs +0 -53
  187. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/lheading.mjs +0 -53
  188. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/lheading.mjs.map +0 -1
  189. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/list.cjs +0 -157
  190. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/list.mjs +0 -158
  191. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/list.mjs.map +0 -1
  192. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/paragraph.cjs +0 -32
  193. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/paragraph.mjs +0 -32
  194. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/paragraph.mjs.map +0 -1
  195. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/reference.cjs +0 -140
  196. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/reference.mjs +0 -141
  197. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/reference.mjs.map +0 -1
  198. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/state_block.cjs +0 -112
  199. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/state_block.mjs +0 -113
  200. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/state_block.mjs.map +0 -1
  201. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/table.cjs +0 -139
  202. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/table.mjs +0 -140
  203. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/table.mjs.map +0 -1
  204. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/block.cjs +0 -15
  205. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/block.mjs +0 -15
  206. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/block.mjs.map +0 -1
  207. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/inline.cjs +0 -12
  208. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/inline.mjs +0 -12
  209. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/inline.mjs.map +0 -1
  210. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/linkify.cjs +0 -81
  211. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/linkify.mjs +0 -82
  212. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/linkify.mjs.map +0 -1
  213. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/normalize.cjs +0 -13
  214. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/normalize.mjs +0 -13
  215. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/normalize.mjs.map +0 -1
  216. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/replacements.cjs +0 -45
  217. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/replacements.mjs +0 -45
  218. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/replacements.mjs.map +0 -1
  219. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/smartquotes.cjs +0 -112
  220. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/smartquotes.mjs +0 -113
  221. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/smartquotes.mjs.map +0 -1
  222. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/state_core.cjs +0 -14
  223. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/state_core.mjs +0 -15
  224. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/state_core.mjs.map +0 -1
  225. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/text_join.cjs +0 -22
  226. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/text_join.mjs +0 -22
  227. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/text_join.mjs.map +0 -1
  228. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/autolink.cjs +0 -55
  229. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/autolink.mjs +0 -55
  230. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/autolink.mjs.map +0 -1
  231. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/backticks.cjs +0 -41
  232. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/backticks.mjs +0 -41
  233. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/backticks.mjs.map +0 -1
  234. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/balance_pairs.cjs +0 -62
  235. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs +0 -62
  236. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs.map +0 -1
  237. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/emphasis.cjs +0 -64
  238. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/emphasis.mjs +0 -64
  239. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/emphasis.mjs.map +0 -1
  240. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/entity.cjs +0 -45
  241. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/entity.mjs +0 -46
  242. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/entity.mjs.map +0 -1
  243. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/escape.cjs +0 -48
  244. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/escape.mjs +0 -49
  245. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/escape.mjs.map +0 -1
  246. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/fragments_join.cjs +0 -22
  247. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/fragments_join.mjs +0 -22
  248. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/fragments_join.mjs.map +0 -1
  249. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/html_inline.cjs +0 -34
  250. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/html_inline.mjs +0 -35
  251. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/html_inline.mjs.map +0 -1
  252. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/image.cjs +0 -82
  253. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/image.mjs +0 -83
  254. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/image.mjs.map +0 -1
  255. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/link.cjs +0 -84
  256. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/link.mjs +0 -85
  257. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/link.mjs.map +0 -1
  258. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/linkify.cjs +0 -42
  259. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/linkify.mjs +0 -42
  260. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/linkify.mjs.map +0 -1
  261. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/newline.cjs +0 -26
  262. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/newline.mjs +0 -27
  263. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/newline.mjs.map +0 -1
  264. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/state_inline.cjs +0 -74
  265. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/state_inline.mjs +0 -75
  266. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/state_inline.mjs.map +0 -1
  267. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/strikethrough.cjs +0 -80
  268. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs +0 -80
  269. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs.map +0 -1
  270. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/text.cjs +0 -41
  271. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/text.mjs +0 -41
  272. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/text.mjs.map +0 -1
  273. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/token.cjs +0 -157
  274. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/token.mjs +0 -157
  275. package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/token.mjs.map +0 -1
  276. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/index.cjs +0 -21
  277. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/index.mjs +0 -17
  278. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/index.mjs.map +0 -1
  279. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/decode.cjs +0 -74
  280. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/decode.mjs +0 -74
  281. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/decode.mjs.map +0 -1
  282. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/encode.cjs +0 -57
  283. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/encode.mjs +0 -57
  284. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/encode.mjs.map +0 -1
  285. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/format.cjs +0 -18
  286. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/format.mjs +0 -18
  287. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/format.mjs.map +0 -1
  288. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/parse.cjs +0 -175
  289. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/parse.mjs +0 -175
  290. package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/parse.mjs.map +0 -1
  291. package/dist/node_modules/.pnpm/normalize-html-whitespace@1.0.0/node_modules/normalize-html-whitespace/index.cjs +0 -19
  292. package/dist/node_modules/.pnpm/normalize-html-whitespace@1.0.0/node_modules/normalize-html-whitespace/index.mjs +0 -15
  293. package/dist/node_modules/.pnpm/normalize-html-whitespace@1.0.0/node_modules/normalize-html-whitespace/index.mjs.map +0 -1
  294. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/doctype.cjs +0 -104
  295. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/doctype.mjs +0 -104
  296. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/doctype.mjs.map +0 -1
  297. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/error-codes.cjs +0 -73
  298. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/error-codes.mjs +0 -68
  299. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/error-codes.mjs.map +0 -1
  300. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/foreign-content.cjs +0 -266
  301. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/foreign-content.mjs +0 -262
  302. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/foreign-content.mjs.map +0 -1
  303. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/html.cjs +0 -575
  304. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/html.mjs +0 -543
  305. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/html.mjs.map +0 -1
  306. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/token.cjs +0 -27
  307. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/token.mjs +0 -21
  308. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/token.mjs.map +0 -1
  309. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/unicode.cjs +0 -105
  310. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/unicode.mjs +0 -94
  311. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/unicode.mjs.map +0 -1
  312. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/index.cjs +0 -33
  313. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/index.mjs +0 -34
  314. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/index.mjs.map +0 -1
  315. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/formatting-element-list.cjs +0 -99
  316. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/formatting-element-list.mjs +0 -93
  317. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/formatting-element-list.mjs.map +0 -1
  318. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/index.cjs +0 -2544
  319. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/index.mjs +0 -2545
  320. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/index.mjs.map +0 -1
  321. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/open-element-stack.cjs +0 -296
  322. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/open-element-stack.mjs +0 -297
  323. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/open-element-stack.mjs.map +0 -1
  324. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/serializer/index.cjs +0 -26
  325. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/serializer/index.mjs +0 -28
  326. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/serializer/index.mjs.map +0 -1
  327. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tokenizer/index.cjs +0 -2069
  328. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tokenizer/index.mjs +0 -2069
  329. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tokenizer/index.mjs.map +0 -1
  330. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tokenizer/preprocessor.cjs +0 -156
  331. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tokenizer/preprocessor.mjs +0 -157
  332. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tokenizer/preprocessor.mjs.map +0 -1
  333. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tree-adapters/default.cjs +0 -166
  334. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tree-adapters/default.mjs +0 -167
  335. package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tree-adapters/default.mjs.map +0 -1
  336. package/dist/node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.cjs +0 -299
  337. package/dist/node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.mjs +0 -295
  338. package/dist/node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.mjs.map +0 -1
  339. package/dist/node_modules/.pnpm/string-width@8.2.0/node_modules/string-width/index.cjs +0 -65
  340. package/dist/node_modules/.pnpm/string-width@8.2.0/node_modules/string-width/index.mjs +0 -66
  341. package/dist/node_modules/.pnpm/string-width@8.2.0/node_modules/string-width/index.mjs.map +0 -1
  342. package/dist/node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.cjs +0 -12
  343. package/dist/node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.mjs +0 -13
  344. package/dist/node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.mjs.map +0 -1
  345. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.cjs +0 -6
  346. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.mjs +0 -6
  347. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.mjs.map +0 -1
  348. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.cjs +0 -6
  349. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.mjs +0 -6
  350. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.mjs.map +0 -1
  351. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.cjs +0 -6
  352. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.mjs +0 -6
  353. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.mjs.map +0 -1
  354. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.cjs +0 -6
  355. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.mjs +0 -6
  356. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.mjs.map +0 -1
  357. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.cjs +0 -6
  358. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.mjs +0 -6
  359. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.mjs.map +0 -1
  360. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/index.cjs +0 -25
  361. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/index.mjs +0 -21
  362. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/index.mjs.map +0 -1
  363. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.cjs +0 -6
  364. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.mjs +0 -6
  365. package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.mjs.map +0 -1
  366. package/dist/node_modules/.pnpm/wrap-ansi@10.0.0/node_modules/wrap-ansi/index.cjs +0 -302
  367. package/dist/node_modules/.pnpm/wrap-ansi@10.0.0/node_modules/wrap-ansi/index.mjs +0 -303
  368. package/dist/node_modules/.pnpm/wrap-ansi@10.0.0/node_modules/wrap-ansi/index.mjs.map +0 -1
  369. package/dist/packages/plugin-changelog/dist/components/changelog-command.cjs +0 -106
  370. package/dist/packages/plugin-changelog/dist/components/changelog-command.mjs +0 -106
  371. package/dist/packages/plugin-changelog/dist/components/changelog-command.mjs.map +0 -1
  372. package/dist/packages/plugin-changelog/dist/components/index.cjs +0 -1
  373. package/dist/packages/plugin-changelog/dist/components/index.mjs +0 -3
  374. package/dist/packages/plugin-changelog/dist/helpers/resolve-changelog.cjs +0 -51
  375. package/dist/packages/plugin-changelog/dist/helpers/resolve-changelog.mjs +0 -51
  376. package/dist/packages/plugin-changelog/dist/helpers/resolve-changelog.mjs.map +0 -1
  377. package/dist/packages/plugin-changelog/dist/index.cjs +0 -65
  378. package/dist/packages/plugin-changelog/dist/index.d.cts +0 -2
  379. package/dist/packages/plugin-changelog/dist/index.d.mts +0 -2
  380. package/dist/packages/plugin-changelog/dist/index.mjs +0 -64
  381. package/dist/packages/plugin-changelog/dist/index.mjs.map +0 -1
  382. package/dist/packages/plugin-changelog/dist/types/plugin.d.cts +0 -91
  383. package/dist/packages/plugin-changelog/dist/types/plugin.d.cts.map +0 -1
  384. package/dist/packages/plugin-changelog/dist/types/plugin.d.mts +0 -91
  385. package/dist/packages/plugin-changelog/dist/types/plugin.d.mts.map +0 -1
  386. package/dist/packages/unified/dist/html-DzwMMQv6.cjs +0 -612
  387. package/dist/packages/unified/dist/html-DzwMMQv6.mjs +0 -613
  388. package/dist/packages/unified/dist/html-DzwMMQv6.mjs.map +0 -1
  389. package/dist/packages/unified/dist/markdown/index.cjs +0 -1
  390. package/dist/packages/unified/dist/markdown/index.mjs +0 -3
  391. package/dist/packages/unified/dist/markdown-CLMRZZ3Y.cjs +0 -46
  392. package/dist/packages/unified/dist/markdown-CLMRZZ3Y.mjs +0 -47
  393. package/dist/packages/unified/dist/markdown-CLMRZZ3Y.mjs.map +0 -1
@@ -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,KAA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AW;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":"6sCAsCA,SAAS,EAAmB,EAAO,CACnC,GAAQ,CACR,UACA,UACA,iBACA,GAAO,GACD,QAEC,EAAU,MAAiB,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AW,CACb,MAAO,EAAG,8IAAA,EAAA,MAAA;wCAGb,CAAC,CAAC,EAEN,CAAC,MAIT,CAAC,CAAC,EAEN,CAAC,CAAC,CAAE,EAAkB,EAAK,CAC1B,IAAI,MAAO,CACT,OAAO,OAAO,OAAO,EAAG,SAAc,EAExC,SAAU,GAAS,EAAY,EAAA,CAC7B,IAAI,MAAO,CACT,OAAO,EAAM,WAEf,IAAI,UAAW,CACb,OAAO,EAAW,EAAA,CAChB,QAAS,EACV,CAAC,EAEJ,IAAI,UAAK,CACP,OAAO,EAAkB,EAAoB,CAC3C,QAAO,EACR,CAAC,EAEL,CAAC,CACH,CAAC,CAAC"}
@@ -1,50 +1,8 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
- let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
4
- let _alloy_js_core = require("@alloy-js/core");
5
- let _alloy_js_typescript = require("@alloy-js/typescript");
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
- let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
9
- let _shell_shock_preset_script_components = require("@shell-shock/preset-script/components");
10
-
11
- //#region src/components/command-router.tsx
12
- function CommandRouterSelectOptions(props) {
13
- const { commands } = props;
14
- const context = (0, _powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
15
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
16
- get each() {
17
- return Object.values(commands ?? {});
18
- },
19
- joiner: ",",
20
- hardline: true,
21
- children: (command) => command.isVirtual ? (0, _alloy_js_core_jsx_runtime.createComponent)(CommandRouterSelectOptions, { get commands() {
22
- return command.children ?? {};
23
- } }) : _alloy_js_core.code`{ value: [${command.segments.map((segment) => `"${segment}"`).join(", ")}], label: "${command.title}", description: \`(${(0, _shell_shock_core_plugin_utils.getAppBin)(context)} ${command.segments.join(" ")})\`${command.icon ? `, icon: "${command.icon.trim()}"` : ""} }`
24
- });
25
- }
26
- /**
27
- * 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.
28
- */
29
- function CommandRouter(props) {
30
- const { segments, commands } = props;
31
- return [
32
- (0, _alloy_js_core_jsx_runtime.createComponent)(_shell_shock_preset_script_components.CommandRouter, (0, _alloy_js_core_jsx_runtime.mergeProps)(props, {
33
- segments,
34
- commands
35
- })),
36
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
37
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
38
- condition: _alloy_js_core.code`isInteractive && !isHelp()`,
39
- get children() {
40
- return [
41
- _alloy_js_core.code`await showBanner();
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../_virtual/_rolldown/runtime.cjs`);let e=require(`@alloy-js/core/jsx-runtime`),t=require(`@alloy-js/core`),n=require(`@alloy-js/typescript`),r=require(`@shell-shock/core/plugin-utils`),i=require(`@powerlines/plugin-alloy/core/components/spacing`),a=require(`@powerlines/plugin-alloy/core/contexts/context`),o=require(`@shell-shock/preset-script/components`);function s(n){let{commands:i}=n,o=(0,a.usePowerlines)();return(0,e.createComponent)(t.For,{get each(){return Object.values(i??{})},joiner:`,`,hardline:!0,children:n=>n.isVirtual?(0,e.createComponent)(s,{get commands(){return n.children??{}}}):t.code`{ value: [${n.segments.map(e=>`"${e}"`).join(`, `)}], label: "${n.title}", description: \`(${(0,r.getAppBin)(o)} ${n.segments.join(` `)})\`${n.icon?`, icon: "${n.icon.trim()}"`:``} }`})}function c(r){let{segments:a,commands:c}=r;return[(0,e.createComponent)(o.CommandRouter,(0,e.mergeProps)(r,{segments:a,commands:c})),(0,e.createComponent)(i.Spacing,{}),(0,e.createComponent)(n.IfStatement,{condition:t.code`isInteractive && !isHelp()`,get children(){return[t.code`await showBanner();
42
2
 
43
3
  let segments = await select({
44
4
  message: "Which command would you like to execute?",
45
- options: [ `,
46
- (0, _alloy_js_core_jsx_runtime.createComponent)(CommandRouterSelectOptions, { commands }),
47
- (0, _alloy_js_core_jsx_runtime.memo)(() => ` ],
5
+ options: [ `,(0,e.createComponent)(s,{commands:c}),(0,e.memo)(()=>` ],
48
6
  });
49
7
  if (isCancel(segments)) {
50
8
  return;
@@ -64,22 +22,8 @@ function CommandRouter(props) {
64
22
  segments = segments.map(segment => dynamics[segment] || segment);
65
23
  const context = useGlobal();
66
24
  if (context) {
67
- context.inputArgs = [args.length > 0 ? args[0] : undefined, args.length > 1 ? args[1] : undefined, ...segments, ...args.slice(${segments.length + 2})].filter(Boolean) as string[];
25
+ context.inputArgs = [args.length > 0 ? args[0] : undefined, args.length > 1 ? args[1] : undefined, ...segments, ...args.slice(${a.length+2})].filter(Boolean) as string[];
68
26
  }
69
27
 
70
28
  command = segments[0];
71
- args = context.inputArgs; `),
72
- (0, _alloy_js_core_jsx_runtime.createComponent)(_shell_shock_preset_script_components.CommandRouterBody, (0, _alloy_js_core_jsx_runtime.mergeProps)(props, {
73
- segments,
74
- commands
75
- }))
76
- ];
77
- }
78
- }),
79
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {})
80
- ];
81
- }
82
-
83
- //#endregion
84
- exports.CommandRouter = CommandRouter;
85
- exports.CommandRouterSelectOptions = CommandRouterSelectOptions;
29
+ args = context.inputArgs; `),(0,e.createComponent)(o.CommandRouterBody,(0,e.mergeProps)(r,{segments:a,commands:c}))]}}),(0,e.createComponent)(i.Spacing,{})]}exports.CommandRouter=c,exports.CommandRouterSelectOptions=s;
@@ -1,48 +1,8 @@
1
- import { createComponent, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
2
- import { For, code } from "@alloy-js/core";
3
- import { IfStatement } from "@alloy-js/typescript";
4
- import { getAppBin } from "@shell-shock/core/plugin-utils";
5
- import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
6
- import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
7
- import { CommandRouter as CommandRouter$1, CommandRouterBody } from "@shell-shock/preset-script/components";
8
-
9
- //#region src/components/command-router.tsx
10
- function CommandRouterSelectOptions(props) {
11
- const { commands } = props;
12
- const context = usePowerlines();
13
- return createComponent(For, {
14
- get each() {
15
- return Object.values(commands ?? {});
16
- },
17
- joiner: ",",
18
- hardline: true,
19
- children: (command) => command.isVirtual ? createComponent(CommandRouterSelectOptions, { get commands() {
20
- return command.children ?? {};
21
- } }) : code`{ value: [${command.segments.map((segment) => `"${segment}"`).join(", ")}], label: "${command.title}", description: \`(${getAppBin(context)} ${command.segments.join(" ")})\`${command.icon ? `, icon: "${command.icon.trim()}"` : ""} }`
22
- });
23
- }
24
- /**
25
- * 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.
26
- */
27
- function CommandRouter(props) {
28
- const { segments, commands } = props;
29
- return [
30
- createComponent(CommandRouter$1, mergeProps(props, {
31
- segments,
32
- commands
33
- })),
34
- createComponent(Spacing, {}),
35
- createComponent(IfStatement, {
36
- condition: code`isInteractive && !isHelp()`,
37
- get children() {
38
- return [
39
- code`await showBanner();
1
+ import{createComponent as e,memo as t,mergeProps as n}from"@alloy-js/core/jsx-runtime";import{For as r,code as i}from"@alloy-js/core";import{IfStatement as a}from"@alloy-js/typescript";import{getAppBin as o}from"@shell-shock/core/plugin-utils";import{Spacing as s}from"@powerlines/plugin-alloy/core/components/spacing";import{usePowerlines as c}from"@powerlines/plugin-alloy/core/contexts/context";import{CommandRouter as l,CommandRouterBody as u}from"@shell-shock/preset-script/components";function d(t){let{commands:n}=t,a=c();return e(r,{get each(){return Object.values(n??{})},joiner:`,`,hardline:!0,children:t=>t.isVirtual?e(d,{get commands(){return t.children??{}}}):i`{ value: [${t.segments.map(e=>`"${e}"`).join(`, `)}], label: "${t.title}", description: \`(${o(a)} ${t.segments.join(` `)})\`${t.icon?`, icon: "${t.icon.trim()}"`:``} }`})}function f(r){let{segments:o,commands:c}=r;return[e(l,n(r,{segments:o,commands:c})),e(s,{}),e(a,{condition:i`isInteractive && !isHelp()`,get children(){return[i`await showBanner();
40
2
 
41
3
  let segments = await select({
42
4
  message: "Which command would you like to execute?",
43
- options: [ `,
44
- createComponent(CommandRouterSelectOptions, { commands }),
45
- memo(() => ` ],
5
+ options: [ `,e(d,{commands:c}),t(()=>` ],
46
6
  });
47
7
  if (isCancel(segments)) {
48
8
  return;
@@ -62,22 +22,9 @@ function CommandRouter(props) {
62
22
  segments = segments.map(segment => dynamics[segment] || segment);
63
23
  const context = useGlobal();
64
24
  if (context) {
65
- context.inputArgs = [args.length > 0 ? args[0] : undefined, args.length > 1 ? args[1] : undefined, ...segments, ...args.slice(${segments.length + 2})].filter(Boolean) as string[];
25
+ context.inputArgs = [args.length > 0 ? args[0] : undefined, args.length > 1 ? args[1] : undefined, ...segments, ...args.slice(${o.length+2})].filter(Boolean) as string[];
66
26
  }
67
27
 
68
28
  command = segments[0];
69
- args = context.inputArgs; `),
70
- createComponent(CommandRouterBody, mergeProps(props, {
71
- segments,
72
- commands
73
- }))
74
- ];
75
- }
76
- }),
77
- createComponent(Spacing, {})
78
- ];
79
- }
80
-
81
- //#endregion
82
- export { CommandRouter, CommandRouterSelectOptions };
29
+ args = context.inputArgs; `),e(u,n(r,{segments:o,commands:c}))]}}),e(s,{})]}export{f as CommandRouter,d as CommandRouterSelectOptions};
83
30
  //# sourceMappingURL=command-router.mjs.map
@@ -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":"2eAyBA,SAAO,EAAA,EAAA,CACL,GAAA,CACA,YACI,EACC,EAAO,GAAmB,aAEjC,IAAO,MAAA,CACL,OAAW,OAAO,OAAO,GAAY,EAAC,CAAA,aAGxC,SAAO,GACL,SAAO,GAAA,EAAA,UAAA,EAAA,EAAA,CACP,IAAA,UAAA,CACM,OAAE,EAAa,UAAK,EAAA,EAE1B,CAAA,CAAM,CAAA,aAAU,EAAc,SAAA,IAAA,GAAmB,IAAA,EAAA,GAAA,CAAA,KAAA,KAAA,CAAA,aAAA,EAAA,MAAA,qBAAA,EAAA,EAAA,CAAA,GAAA,EAAA,SAAA,KAAA,IAAA,CAAA,KAAA,EAAA,KAAA,YAAA,EAAA,KAAA,MAAA,CAAA,GAAA,GAAA,MAOnD,SAAY,EAAA,EAAA,CACV,GAAM,CACJ,WACA,YACE,EACJ,MAAO,CAAC,EAAiB,EAAiB,EAAgB,EAAE,CAClD,WACE,WACX,CAAC,CAAC,CAAE,EAAkB,EAAS,EAAE,CAAC,CAAE,EAAkB,EAAQ,CAC7D,UAAS,CAAA,6BACT,IAAI,UAAA,CACF,MAAA,CAAA,CAAA;;;;4BAKJ,WACG,CAAA,CAAA,MAAe;;;;;;;;;;;;;;;;;;;;0IAoBZ,EAAA,OAAA,EAAA;;;;oCAI2B,CAAA,EAAA,EAAA,EAAA,EAAA,CACvB,WACA,WACL,CAAC,CAAC,CAAC,EAEP,CAAC,CAAE,EAAI,EAAA,EAAA,CAAA,CAAA"}
@@ -1,15 +1 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_components_banner_builtin = require('./banner-builtin.cjs');
3
- const require_components_command_router = require('./command-router.cjs');
4
- const require_components_virtual_command_entry = require('./virtual-command-entry.cjs');
5
- const require_components_command_entry = require('./command-entry.cjs');
6
- const require_components_upgrade_builtin = require('./upgrade-builtin.cjs');
7
-
8
- exports.BannerBuiltin = require_components_banner_builtin.BannerBuiltin;
9
- exports.BannerFunctionBodyDeclaration = require_components_banner_builtin.BannerFunctionBodyDeclaration;
10
- exports.CommandEntry = require_components_command_entry.CommandEntry;
11
- exports.CommandRouter = require_components_command_router.CommandRouter;
12
- exports.CommandRouterSelectOptions = require_components_command_router.CommandRouterSelectOptions;
13
- exports.ExecuteUpgradeFunctionDeclaration = require_components_upgrade_builtin.ExecuteUpgradeFunctionDeclaration;
14
- exports.UpgradeBuiltin = require_components_upgrade_builtin.UpgradeBuiltin;
15
- exports.VirtualCommandEntry = require_components_virtual_command_entry.VirtualCommandEntry;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./banner-builtin.cjs`),t=require(`./command-router.cjs`),n=require(`./virtual-command-entry.cjs`),r=require(`./command-entry.cjs`),i=require(`./upgrade-builtin.cjs`);exports.BannerBuiltin=e.BannerBuiltin,exports.BannerFunctionBodyDeclaration=e.BannerFunctionBodyDeclaration,exports.CommandEntry=r.CommandEntry,exports.CommandRouter=t.CommandRouter,exports.CommandRouterSelectOptions=t.CommandRouterSelectOptions,exports.ExecuteUpgradeFunctionDeclaration=i.ExecuteUpgradeFunctionDeclaration,exports.UpgradeBuiltin=i.UpgradeBuiltin,exports.VirtualCommandEntry=n.VirtualCommandEntry;
@@ -1,7 +1 @@
1
- import { BannerBuiltin, BannerFunctionBodyDeclaration } from "./banner-builtin.mjs";
2
- import { CommandRouter, CommandRouterSelectOptions } from "./command-router.mjs";
3
- import { VirtualCommandEntry } from "./virtual-command-entry.mjs";
4
- import { CommandEntry } from "./command-entry.mjs";
5
- import { ExecuteUpgradeFunctionDeclaration, UpgradeBuiltin } from "./upgrade-builtin.mjs";
6
-
7
- export { BannerBuiltin, BannerFunctionBodyDeclaration, CommandEntry, CommandRouter, CommandRouterSelectOptions, ExecuteUpgradeFunctionDeclaration, UpgradeBuiltin, VirtualCommandEntry };
1
+ import{BannerBuiltin as e,BannerFunctionBodyDeclaration as t}from"./banner-builtin.mjs";import{CommandRouter as n,CommandRouterSelectOptions as r}from"./command-router.mjs";import{VirtualCommandEntry as i}from"./virtual-command-entry.mjs";import{CommandEntry as a}from"./command-entry.mjs";import{ExecuteUpgradeFunctionDeclaration as o,UpgradeBuiltin as s}from"./upgrade-builtin.mjs";export{e as BannerBuiltin,t as BannerFunctionBodyDeclaration,a as CommandEntry,n as CommandRouter,r as CommandRouterSelectOptions,o as ExecuteUpgradeFunctionDeclaration,s as UpgradeBuiltin,i as VirtualCommandEntry};
@@ -1,73 +1,15 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
- let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
4
- let _alloy_js_core = require("@alloy-js/core");
5
- let _alloy_js_typescript = require("@alloy-js/typescript");
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
- let defu = require("defu");
9
- let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
10
- let _shell_shock_plugin_upgrade_components_upgrade_builtin = require("@shell-shock/plugin-upgrade/components/upgrade-builtin");
11
-
12
- //#region src/components/upgrade-builtin.tsx
13
- /**
14
- * A component to generate the `executeUpgrade` function in the `shell-shock:upgrade` builtin module.
15
- */
16
- function ExecuteUpgradeFunctionDeclaration() {
17
- const context = (0, _powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
18
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
19
- get when() {
20
- return context.config.upgradeType !== false;
21
- },
22
- get children() {
23
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
24
- "export": true,
25
- async: true,
26
- name: "executeUpgrade",
27
- get doc() {
28
- return `Run upgrade processing for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(context, true)} application.`;
29
- },
30
- get children() {
31
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
32
- condition: _alloy_js_core.code`await isCheckForUpdatesRequired()`,
33
- get children() {
34
- return [
35
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
36
- "const": true,
37
- name: "spinner",
38
- initializer: _alloy_js_core.code`createSpinner({
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../_virtual/_rolldown/runtime.cjs`);let e=require(`@alloy-js/core/jsx-runtime`),t=require(`@alloy-js/core`),n=require(`@alloy-js/typescript`),r=require(`@shell-shock/core/plugin-utils`),i=require(`@powerlines/plugin-alloy/core/components/spacing`),a=require(`@powerlines/plugin-alloy/core/contexts/context`),o=require(`defu`),s=require(`@shell-shock/plugin-upgrade/components/upgrade-builtin`);function c(){let o=(0,a.usePowerlines)();return(0,e.createComponent)(t.Show,{get when(){return o.config.upgradeType!==!1},get children(){return(0,e.createComponent)(n.FunctionDeclaration,{export:!0,async:!0,name:`executeUpgrade`,get doc(){return`Run upgrade processing for the ${(0,r.getAppTitle)(o,!0)} application.`},get children(){return(0,e.createComponent)(n.IfStatement,{condition:t.code`await isCheckForUpdatesRequired()`,get children(){return[(0,e.createComponent)(n.VarDeclaration,{const:!0,name:`spinner`,initializer:t.code`createSpinner({
39
2
  message: "Checking for updates..."
40
- }).start(); `
41
- }),
42
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
43
- "const": true,
44
- name: "result",
45
- initializer: _alloy_js_core.code`await checkForUpdates({ force: true }); `
46
- }),
47
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
48
- condition: _alloy_js_core.code`(result as CheckForUpdatesErrorResult)?.isError`,
49
- get children() {
50
- return _alloy_js_core.code`spinner.error(\`An error occurred while checking for ${(0, _shell_shock_core_plugin_utils.getAppTitle)(context, true)} application updates. Please try again later - if the problem persists, please contact support.\`);
51
- debug((result as CheckForUpdatesErrorResult).error); `;
52
- }
53
- }),
54
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseIfClause, {
55
- condition: _alloy_js_core.code`!(result as CheckForUpdatesSuccessResult)?.isUpToDate`,
56
- get children() {
57
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
58
- get when() {
59
- return context.config.upgradeType !== false && (context.config.upgradeType === "confirm" || context.config.upgradeType === "manual");
60
- },
61
- get fallback() {
62
- return [(0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`spinner.stop();
63
- info(\`A new version of ${(0, _shell_shock_core_plugin_utils.getAppTitle)(context, true)} 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})\`) : ""}\`);
3
+ }).start(); `}),(0,e.createComponent)(n.VarDeclaration,{const:!0,name:`result`,initializer:t.code`await checkForUpdates({ force: true }); `}),(0,e.createComponent)(n.IfStatement,{condition:t.code`(result as CheckForUpdatesErrorResult)?.isError`,get children(){return t.code`spinner.error(\`An error occurred while checking for ${(0,r.getAppTitle)(o,!0)} application updates. Please try again later - if the problem persists, please contact support.\`);
4
+ debug((result as CheckForUpdatesErrorResult).error); `}}),(0,e.createComponent)(n.ElseIfClause,{condition:t.code`!(result as CheckForUpdatesSuccessResult)?.isUpToDate`,get children(){return(0,e.createComponent)(t.Show,{get when(){return o.config.upgradeType!==!1&&(o.config.upgradeType===`confirm`||o.config.upgradeType===`manual`)},get fallback(){return[(0,e.memo)(()=>t.code`spinner.stop();
5
+ info(\`A new version of ${(0,r.getAppTitle)(o,!0)} 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})\`) : ""}\`);
64
6
 
65
7
  try {
66
8
  await upgrade();
67
9
  spinner.success("Update successful! Please restart the application to apply the update.");
68
10
 
69
11
  writeLine("");
70
- help(\`You can view the changelog for this release at any time by running the \${inlineCode("${(0, _shell_shock_core_plugin_utils.getAppBin)(context)} changelog --latest")} command.\`);
12
+ help(\`You can view the changelog for this release at any time by running the \${inlineCode("${(0,r.getAppBin)(o)} changelog --latest")} command.\`);
71
13
 
72
14
  writeLine("");
73
15
  writeLine("Press any key to exit the application...");
@@ -75,21 +17,10 @@ function ExecuteUpgradeFunctionDeclaration() {
75
17
  await waitForKeyPress();
76
18
  return;
77
19
  } catch (err) {
78
- spinner.error(\`An error occurred while updating ${(0, _shell_shock_core_plugin_utils.getAppTitle)(context, true)} to v\${(result as CheckForUpdatesSuccessResult).latestVersion}. Please try again later - if the problem persists, please contact support.\`);
20
+ spinner.error(\`An error occurred while updating ${(0,r.getAppTitle)(o,!0)} to v\${(result as CheckForUpdatesSuccessResult).latestVersion}. Please try again later - if the problem persists, please contact support.\`);
79
21
  debug(err);
80
- } `), (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {})];
81
- },
82
- get children() {
83
- return [
84
- (0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`spinner.stop();
85
- warn(\`A new version of ${(0, _shell_shock_core_plugin_utils.getAppTitle)(context, true)} 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})\`) : ""}${context.config.upgradeType !== false && context.config.upgradeType === "manual" ? ` \\nPlease run \`${(0, _shell_shock_core_plugin_utils.getAppBin)(context)} upgrade\` to upgrade to the latest version.` : ""}\`); `),
86
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
87
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
88
- get when() {
89
- return context.config.upgradeType !== false && context.config.upgradeType === "confirm";
90
- },
91
- get children() {
92
- return _alloy_js_core.code`const willUpgradeNow = await confirm({
22
+ } `),(0,e.createComponent)(i.Spacing,{})]},get children(){return[(0,e.memo)(()=>t.code`spinner.stop();
23
+ warn(\`A new version of ${(0,r.getAppTitle)(o,!0)} 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})\`) : ""}${o.config.upgradeType!==!1&&o.config.upgradeType===`manual`?` \\nPlease run \`${(0,r.getAppBin)(o)} upgrade\` to upgrade to the latest version.`:``}\`); `),(0,e.createComponent)(i.Spacing,{}),(0,e.createComponent)(t.Show,{get when(){return o.config.upgradeType!==!1&&o.config.upgradeType===`confirm`},get children(){return t.code`const willUpgradeNow = await confirm({
93
24
  message: \`Would you like to update to v\${(result as CheckForUpdatesSuccessResult).latestVersion} now?\`,
94
25
  initialValue: true
95
26
  });
@@ -98,7 +29,7 @@ function ExecuteUpgradeFunctionDeclaration() {
98
29
  }
99
30
 
100
31
  if (willUpgradeNow) {
101
- spinner.text = \`Updating ${(0, _shell_shock_core_plugin_utils.getAppTitle)(context, true)} to v\${(result as CheckForUpdatesSuccessResult).latestVersion}...\`;
32
+ spinner.text = \`Updating ${(0,r.getAppTitle)(o,!0)} to v\${(result as CheckForUpdatesSuccessResult).latestVersion}...\`;
102
33
  spinner.start();
103
34
 
104
35
  try {
@@ -106,7 +37,7 @@ function ExecuteUpgradeFunctionDeclaration() {
106
37
  spinner.success("Update successful! Please restart the application to apply the update.");
107
38
 
108
39
  writeLine("");
109
- help(\`You can view the changelog for this release at any time by running the \${inlineCode("${(0, _shell_shock_core_plugin_utils.getAppBin)(context)} changelog --latest")} command.\`);
40
+ help(\`You can view the changelog for this release at any time by running the \${inlineCode("${(0,r.getAppBin)(o)} changelog --latest")} command.\`);
110
41
 
111
42
  writeLine("");
112
43
  writeLine("Press any key to exit the application...");
@@ -114,63 +45,11 @@ function ExecuteUpgradeFunctionDeclaration() {
114
45
  await waitForKeyPress();
115
46
  return;
116
47
  } catch (err) {
117
- spinner.error(\`An error occurred while updating ${(0, _shell_shock_core_plugin_utils.getAppTitle)(context, true)} to v\${(result as CheckForUpdatesSuccessResult).latestVersion}. Please try again later - if the problem persists, please contact support.\`);
48
+ spinner.error(\`An error occurred while updating ${(0,r.getAppTitle)(o,!0)} to v\${(result as CheckForUpdatesSuccessResult).latestVersion}. Please try again later - if the problem persists, please contact support.\`);
118
49
  return { error: err };
119
50
  }
120
51
  } else {
121
- help("Updates can be performed at any time by running the \`${(0, _shell_shock_core_plugin_utils.getAppBin)(context)} 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.");
122
- } `;
123
- }
124
- })
125
- ];
126
- }
127
- });
128
- }
129
- }),
130
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseClause, { get children() {
131
- return _alloy_js_core.code`spinner.success("Currently running the latest version of ${(0, _shell_shock_core_plugin_utils.getAppTitle)(context, true)}.");
52
+ help("Updates can be performed at any time by running the \`${(0,r.getAppBin)(o)} 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.");
53
+ } `}})]}})}}),(0,e.createComponent)(n.ElseClause,{get children(){return t.code`spinner.success("Currently running the latest version of ${(0,r.getAppTitle)(o,!0)}.");
132
54
  writeLine("");
133
- `;
134
- } })
135
- ];
136
- }
137
- });
138
- }
139
- });
140
- }
141
- });
142
- }
143
- /**
144
- * A built-in upgrade module for Shell Shock.
145
- */
146
- function UpgradeBuiltin(props) {
147
- const [{ children, builtinImports }, rest] = (0, _alloy_js_core.splitProps)(props, ["children", "builtinImports"]);
148
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_shell_shock_plugin_upgrade_components_upgrade_builtin.UpgradeBuiltin, (0, _alloy_js_core_jsx_runtime.mergeProps)(rest, {
149
- get builtinImports() {
150
- return (0, defu.defu)(builtinImports ?? {}, {
151
- console: [
152
- "createSpinner",
153
- "debug",
154
- "info"
155
- ],
156
- prompts: ["waitForKeyPress"]
157
- });
158
- },
159
- get children() {
160
- return [
161
- (0, _alloy_js_core_jsx_runtime.createComponent)(ExecuteUpgradeFunctionDeclaration, {}),
162
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
163
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
164
- get when() {
165
- return Boolean(children);
166
- },
167
- children
168
- })
169
- ];
170
- }
171
- }));
172
- }
173
-
174
- //#endregion
175
- exports.ExecuteUpgradeFunctionDeclaration = ExecuteUpgradeFunctionDeclaration;
176
- exports.UpgradeBuiltin = UpgradeBuiltin;
55
+ `}})]}})}})}})}function l(n){let[{children:r,builtinImports:a},l]=(0,t.splitProps)(n,[`children`,`builtinImports`]);return(0,e.createComponent)(s.UpgradeBuiltin,(0,e.mergeProps)(l,{get builtinImports(){return(0,o.defu)(a??{},{console:[`createSpinner`,`debug`,`info`],prompts:[`waitForKeyPress`]})},get children(){return[(0,e.createComponent)(c,{}),(0,e.createComponent)(i.Spacing,{}),(0,e.createComponent)(t.Show,{get when(){return!!r},children:r})]}}))}exports.ExecuteUpgradeFunctionDeclaration=c,exports.UpgradeBuiltin=l;