@shell-shock/core 0.17.8 → 0.17.11

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 (272) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +29 -1
  2. package/dist/api.cjs +36 -1
  3. package/dist/api.cjs.map +1 -0
  4. package/dist/api.d.cts +2 -77
  5. package/dist/api.d.cts.map +1 -1
  6. package/dist/api.d.mts +2 -76
  7. package/dist/api.d.mts.map +1 -1
  8. package/dist/api.mjs +35 -1
  9. package/dist/api.mjs.map +1 -1
  10. package/dist/components/command-validation-logic.cjs +291 -1
  11. package/dist/components/command-validation-logic.cjs.map +1 -0
  12. package/dist/components/command-validation-logic.d.cts +1 -3
  13. package/dist/components/command-validation-logic.d.cts.map +1 -1
  14. package/dist/components/command-validation-logic.d.mts +1 -3
  15. package/dist/components/command-validation-logic.d.mts.map +1 -1
  16. package/dist/components/command-validation-logic.mjs +288 -1
  17. package/dist/components/command-validation-logic.mjs.map +1 -1
  18. package/dist/components/docs.cjs +265 -1
  19. package/dist/components/docs.cjs.map +1 -0
  20. package/dist/components/docs.d.cts +4 -5
  21. package/dist/components/docs.d.cts.map +1 -1
  22. package/dist/components/docs.d.mts +4 -5
  23. package/dist/components/docs.d.mts.map +1 -1
  24. package/dist/components/docs.mjs +256 -1
  25. package/dist/components/docs.mjs.map +1 -1
  26. package/dist/components/exec-builtin.cjs +429 -15
  27. package/dist/components/exec-builtin.cjs.map +1 -0
  28. package/dist/components/exec-builtin.d.cts +1 -2
  29. package/dist/components/exec-builtin.d.cts.map +1 -1
  30. package/dist/components/exec-builtin.d.mts +1 -2
  31. package/dist/components/exec-builtin.d.mts.map +1 -1
  32. package/dist/components/exec-builtin.mjs +424 -15
  33. package/dist/components/exec-builtin.mjs.map +1 -1
  34. package/dist/components/helpers.cjs +119 -1
  35. package/dist/components/helpers.cjs.map +1 -0
  36. package/dist/components/helpers.d.cts +6 -8
  37. package/dist/components/helpers.d.cts.map +1 -1
  38. package/dist/components/helpers.d.mts +6 -8
  39. package/dist/components/helpers.d.mts.map +1 -1
  40. package/dist/components/helpers.mjs +111 -1
  41. package/dist/components/helpers.mjs.map +1 -1
  42. package/dist/components/index.cjs +58 -1
  43. package/dist/components/index.mjs +10 -1
  44. package/dist/components/options-parser-logic.cjs +959 -5
  45. package/dist/components/options-parser-logic.cjs.map +1 -0
  46. package/dist/components/options-parser-logic.d.cts +8 -9
  47. package/dist/components/options-parser-logic.d.cts.map +1 -1
  48. package/dist/components/options-parser-logic.d.mts +8 -9
  49. package/dist/components/options-parser-logic.d.mts.map +1 -1
  50. package/dist/components/options-parser-logic.mjs +944 -5
  51. package/dist/components/options-parser-logic.mjs.map +1 -1
  52. package/dist/components/state-builtin.cjs +630 -8
  53. package/dist/components/state-builtin.cjs.map +1 -0
  54. package/dist/components/state-builtin.d.cts +4 -5
  55. package/dist/components/state-builtin.d.cts.map +1 -1
  56. package/dist/components/state-builtin.d.mts +4 -5
  57. package/dist/components/state-builtin.d.mts.map +1 -1
  58. package/dist/components/state-builtin.mjs +622 -8
  59. package/dist/components/state-builtin.mjs.map +1 -1
  60. package/dist/components/usage.cjs +116 -1
  61. package/dist/components/usage.cjs.map +1 -0
  62. package/dist/components/usage.d.cts +1 -2
  63. package/dist/components/usage.d.cts.map +1 -1
  64. package/dist/components/usage.d.mts +1 -2
  65. package/dist/components/usage.d.mts.map +1 -1
  66. package/dist/components/usage.mjs +113 -1
  67. package/dist/components/usage.mjs.map +1 -1
  68. package/dist/components/utils-builtin.cjs +839 -33
  69. package/dist/components/utils-builtin.cjs.map +1 -0
  70. package/dist/components/utils-builtin.d.cts +7 -8
  71. package/dist/components/utils-builtin.d.cts.map +1 -1
  72. package/dist/components/utils-builtin.d.mts +7 -8
  73. package/dist/components/utils-builtin.d.mts.map +1 -1
  74. package/dist/components/utils-builtin.mjs +828 -33
  75. package/dist/components/utils-builtin.mjs.map +1 -1
  76. package/dist/config.cjs +65 -1
  77. package/dist/config.cjs.map +1 -0
  78. package/dist/config.d.cts +29 -8
  79. package/dist/config.d.cts.map +1 -1
  80. package/dist/config.d.mts +29 -8
  81. package/dist/config.d.mts.map +1 -1
  82. package/dist/config.mjs +62 -1
  83. package/dist/config.mjs.map +1 -1
  84. package/dist/contexts/command.cjs +26 -1
  85. package/dist/contexts/command.cjs.map +1 -0
  86. package/dist/contexts/command.d.cts.map +1 -1
  87. package/dist/contexts/command.d.mts.map +1 -1
  88. package/dist/contexts/command.mjs +23 -1
  89. package/dist/contexts/command.mjs.map +1 -1
  90. package/dist/contexts/index.cjs +9 -1
  91. package/dist/contexts/index.mjs +4 -1
  92. package/dist/contexts/options.cjs +63 -1
  93. package/dist/contexts/options.cjs.map +1 -0
  94. package/dist/contexts/options.d.cts.map +1 -1
  95. package/dist/contexts/options.d.mts.map +1 -1
  96. package/dist/contexts/options.mjs +57 -1
  97. package/dist/contexts/options.mjs.map +1 -1
  98. package/dist/engine.cjs +138 -0
  99. package/dist/engine.cjs.map +1 -0
  100. package/dist/engine.d.cts +79 -0
  101. package/dist/engine.d.cts.map +1 -0
  102. package/dist/engine.d.mts +79 -0
  103. package/dist/engine.d.mts.map +1 -0
  104. package/dist/engine.mjs +136 -0
  105. package/dist/engine.mjs.map +1 -0
  106. package/dist/helpers/automd.cjs +70 -1
  107. package/dist/helpers/automd.cjs.map +1 -0
  108. package/dist/helpers/automd.mjs +69 -1
  109. package/dist/helpers/automd.mjs.map +1 -1
  110. package/dist/helpers/docs-helpers.cjs +23 -1
  111. package/dist/helpers/docs-helpers.cjs.map +1 -0
  112. package/dist/helpers/docs-helpers.mjs +22 -1
  113. package/dist/helpers/docs-helpers.mjs.map +1 -1
  114. package/dist/helpers/get-framework.cjs +24 -0
  115. package/dist/helpers/get-framework.cjs.map +1 -0
  116. package/dist/helpers/get-framework.mjs +24 -0
  117. package/dist/helpers/get-framework.mjs.map +1 -0
  118. package/dist/helpers/paths.cjs +137 -1
  119. package/dist/helpers/paths.cjs.map +1 -0
  120. package/dist/helpers/paths.mjs +133 -1
  121. package/dist/helpers/paths.mjs.map +1 -1
  122. package/dist/helpers/persistence.cjs +113 -1
  123. package/dist/helpers/persistence.cjs.map +1 -0
  124. package/dist/helpers/persistence.mjs +112 -1
  125. package/dist/helpers/persistence.mjs.map +1 -1
  126. package/dist/helpers/update-package-json.cjs +65 -1
  127. package/dist/helpers/update-package-json.cjs.map +1 -0
  128. package/dist/helpers/update-package-json.mjs +63 -1
  129. package/dist/helpers/update-package-json.mjs.map +1 -1
  130. package/dist/helpers/utilities.cjs +95 -1
  131. package/dist/helpers/utilities.cjs.map +1 -0
  132. package/dist/helpers/utilities.mjs +93 -1
  133. package/dist/helpers/utilities.mjs.map +1 -1
  134. package/dist/helpers/validations.cjs +71 -1
  135. package/dist/helpers/validations.cjs.map +1 -0
  136. package/dist/helpers/validations.mjs +69 -1
  137. package/dist/helpers/validations.mjs.map +1 -1
  138. package/dist/index.cjs +123 -1
  139. package/dist/index.cjs.map +1 -0
  140. package/dist/index.d.cts +80 -5
  141. package/dist/index.d.cts.map +1 -0
  142. package/dist/index.d.mts +80 -5
  143. package/dist/index.d.mts.map +1 -0
  144. package/dist/index.mjs +119 -1
  145. package/dist/index.mjs.map +1 -0
  146. package/dist/package.cjs +12 -0
  147. package/dist/package.cjs.map +1 -0
  148. package/dist/package.mjs +6 -0
  149. package/dist/package.mjs.map +1 -0
  150. package/dist/plugin-utils/compute-bin.cjs +48 -1
  151. package/dist/plugin-utils/compute-bin.cjs.map +1 -0
  152. package/dist/plugin-utils/compute-bin.d.cts +2 -2
  153. package/dist/plugin-utils/compute-bin.d.cts.map +1 -1
  154. package/dist/plugin-utils/compute-bin.d.mts +2 -2
  155. package/dist/plugin-utils/compute-bin.d.mts.map +1 -1
  156. package/dist/plugin-utils/compute-bin.mjs +47 -1
  157. package/dist/plugin-utils/compute-bin.mjs.map +1 -1
  158. package/dist/plugin-utils/context-helpers.cjs +224 -1
  159. package/dist/plugin-utils/context-helpers.cjs.map +1 -0
  160. package/dist/plugin-utils/context-helpers.d.cts +4 -4
  161. package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
  162. package/dist/plugin-utils/context-helpers.d.mts +4 -4
  163. package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
  164. package/dist/plugin-utils/context-helpers.mjs +214 -1
  165. package/dist/plugin-utils/context-helpers.mjs.map +1 -1
  166. package/dist/plugin-utils/deepkit.cjs +70 -1
  167. package/dist/plugin-utils/deepkit.cjs.map +1 -0
  168. package/dist/plugin-utils/deepkit.d.cts +5 -5
  169. package/dist/plugin-utils/deepkit.d.cts.map +1 -1
  170. package/dist/plugin-utils/deepkit.d.mts +5 -5
  171. package/dist/plugin-utils/deepkit.d.mts.map +1 -1
  172. package/dist/plugin-utils/deepkit.mjs +68 -1
  173. package/dist/plugin-utils/deepkit.mjs.map +1 -1
  174. package/dist/plugin-utils/description-helpers.cjs +112 -2
  175. package/dist/plugin-utils/description-helpers.cjs.map +1 -0
  176. package/dist/plugin-utils/description-helpers.d.cts.map +1 -1
  177. package/dist/plugin-utils/description-helpers.d.mts.map +1 -1
  178. package/dist/plugin-utils/description-helpers.mjs +107 -2
  179. package/dist/plugin-utils/description-helpers.mjs.map +1 -1
  180. package/dist/plugin-utils/get-command-tree.cjs +118 -1
  181. package/dist/plugin-utils/get-command-tree.cjs.map +1 -0
  182. package/dist/plugin-utils/get-command-tree.d.cts.map +1 -1
  183. package/dist/plugin-utils/get-command-tree.d.mts.map +1 -1
  184. package/dist/plugin-utils/get-command-tree.mjs +114 -1
  185. package/dist/plugin-utils/get-command-tree.mjs.map +1 -1
  186. package/dist/plugin-utils/index.cjs +39 -1
  187. package/dist/plugin-utils/index.d.cts +2 -2
  188. package/dist/plugin-utils/index.d.mts +2 -2
  189. package/dist/plugin-utils/index.mjs +10 -1
  190. package/dist/plugin-utils/reflect.cjs +52 -1
  191. package/dist/plugin-utils/reflect.cjs.map +1 -0
  192. package/dist/plugin-utils/reflect.d.cts.map +1 -1
  193. package/dist/plugin-utils/reflect.d.mts.map +1 -1
  194. package/dist/plugin-utils/reflect.mjs +50 -1
  195. package/dist/plugin-utils/reflect.mjs.map +1 -1
  196. package/dist/plugin-utils/traverse-command-tree.cjs +65 -1
  197. package/dist/plugin-utils/traverse-command-tree.cjs.map +1 -0
  198. package/dist/plugin-utils/traverse-command-tree.d.cts.map +1 -1
  199. package/dist/plugin-utils/traverse-command-tree.d.mts.map +1 -1
  200. package/dist/plugin-utils/traverse-command-tree.mjs +62 -1
  201. package/dist/plugin-utils/traverse-command-tree.mjs.map +1 -1
  202. package/dist/plugin-utils/type-checks.cjs +222 -1
  203. package/dist/plugin-utils/type-checks.cjs.map +1 -0
  204. package/dist/plugin-utils/type-checks.d.cts +5 -5
  205. package/dist/plugin-utils/type-checks.d.cts.map +1 -1
  206. package/dist/plugin-utils/type-checks.d.mts +5 -5
  207. package/dist/plugin-utils/type-checks.d.mts.map +1 -1
  208. package/dist/plugin-utils/type-checks.mjs +217 -1
  209. package/dist/plugin-utils/type-checks.mjs.map +1 -1
  210. package/dist/plugin.cjs +495 -4
  211. package/dist/plugin.cjs.map +1 -0
  212. package/dist/plugin.d.cts.map +1 -1
  213. package/dist/plugin.d.mts.map +1 -1
  214. package/dist/plugin.mjs +488 -4
  215. package/dist/plugin.mjs.map +1 -1
  216. package/dist/resolver/helpers.cjs +182 -1
  217. package/dist/resolver/helpers.cjs.map +1 -0
  218. package/dist/resolver/helpers.mjs +178 -1
  219. package/dist/resolver/helpers.mjs.map +1 -1
  220. package/dist/resolver/resolve.cjs +479 -1
  221. package/dist/resolver/resolve.cjs.map +1 -0
  222. package/dist/resolver/resolve.mjs +478 -1
  223. package/dist/resolver/resolve.mjs.map +1 -1
  224. package/dist/types/command.cjs +402 -1
  225. package/dist/types/command.cjs.map +1 -0
  226. package/dist/types/command.d.cts +61 -119
  227. package/dist/types/command.d.cts.map +1 -1
  228. package/dist/types/command.d.mts +61 -119
  229. package/dist/types/command.d.mts.map +1 -1
  230. package/dist/types/command.mjs +367 -1
  231. package/dist/types/command.mjs.map +1 -1
  232. package/dist/types/config.cjs +175 -1
  233. package/dist/types/config.cjs.map +1 -0
  234. package/dist/types/config.d.cts +19 -12
  235. package/dist/types/config.d.cts.map +1 -1
  236. package/dist/types/config.d.mts +19 -12
  237. package/dist/types/config.d.mts.map +1 -1
  238. package/dist/types/config.mjs +163 -1
  239. package/dist/types/config.mjs.map +1 -1
  240. package/dist/types/context.cjs +45 -1
  241. package/dist/types/context.cjs.map +1 -0
  242. package/dist/types/context.d.cts +3 -2
  243. package/dist/types/context.d.cts.map +1 -1
  244. package/dist/types/context.d.mts +3 -2
  245. package/dist/types/context.d.mts.map +1 -1
  246. package/dist/types/context.mjs +40 -1
  247. package/dist/types/context.mjs.map +1 -1
  248. package/dist/types/env.cjs +53 -1
  249. package/dist/types/env.cjs.map +1 -0
  250. package/dist/types/env.d.cts +1 -1
  251. package/dist/types/env.d.cts.map +1 -1
  252. package/dist/types/env.d.mts +1 -1
  253. package/dist/types/env.d.mts.map +1 -1
  254. package/dist/types/env.mjs +50 -1
  255. package/dist/types/env.mjs.map +1 -1
  256. package/dist/types/index.cjs +53 -1
  257. package/dist/types/index.d.cts +4 -4
  258. package/dist/types/index.d.mts +4 -4
  259. package/dist/types/index.mjs +6 -1
  260. package/dist/types/options.cjs +13 -1
  261. package/dist/types/options.cjs.map +1 -0
  262. package/dist/types/options.d.cts.map +1 -1
  263. package/dist/types/options.d.mts.map +1 -1
  264. package/dist/types/options.mjs +10 -1
  265. package/dist/types/options.mjs.map +1 -1
  266. package/package.json +43 -34
  267. package/dist/resolver/deepkit.cjs +0 -1
  268. package/dist/resolver/deepkit.mjs +0 -2
  269. package/dist/resolver/deepkit.mjs.map +0 -1
  270. package/dist/resolver/module.cjs +0 -1
  271. package/dist/resolver/module.mjs +0 -2
  272. package/dist/resolver/module.mjs.map +0 -1
@@ -1 +1,402 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=[`T`,`K`,`Pick`,`l+e#!e"!fRb!b"Pde""N#!w#y`],t=[`T`,`Partial`,`l+e#!e"!fRb!Pde"!gN#"w"y`],n=[`T`,`K`,()=>e,()=>i,`Omit`,`b!b"e!!e!!ge!"o$#o##w%y`],r=[`K`,`T`,`Record`,`l'e#"Rb!b"Pde"!N#!w#y`],i=[`T`,`U`,`Exclude`,`l6!Re$!RPe#!e$"qk#%QRb!b"Pde"!p)w#y`],a=[`CommandParameterType`,`P&')P&'JFJw!y`],o={string:`string`,number:`number`,boolean:`boolean`},s=[()=>o,()=>o,`CommandParameterKind`,`i!i"gfw#y`],c=[`name`,`The option name.`,()=>s,`kind`,`The option kind.`,`title`,`The display title.`,`description`,`The option description.`,`alias`,`Alternative option names.`,`default`,`The default value.`,!1,`env`,`The environment variable name or false to disable.`,`optional`,`Whether the option is optional.`,`variadic`,`Whether the option accepts multiple values.`,`BaseCommandParameter`,`P&4!?"n#4$?%&4&?'&4(?)&F4*?+P&')&F'F)FJ4,8?-P&..J4/?0)41?2)43?4Mw5y`],l=[`default`,`The default value.`,!1,`variadic`,`Whether the option accepts multiple values.`,`BaseSingleCommandParameter`,`PP&')J4!8?".#4$?%Mw&y`],u=[`default`,`The default value.`,!0,`variadic`,`Whether the option accepts multiple values.`,`BaseVariadicCommandParameter`,`PP&F'F)FJ4!8?".#4$?%Mw&y`],d=[()=>c,`string`,`kind`,`The option kind.`,`default`,`The default value.`,`email`,`uri`,`uuid`,`ipv4`,`ipv6`,`date`,`time`,`date-time`,`duration`,`format`,`A standard string format to validate the option value against.`,`choices`,`The allowed choices for the option value.`,`BaseStringCommandParameter`,`Pn!."4#?$P&&FJ4%8?&P.'.(.).*.+.,.-.../J408?1&F428?3Mw4y`],f=[()=>d,`default`,`The default value.`,!1,`variadic`,`Whether the option accepts multiple values.`,`SingleStringCommandParameter`,`Pn!&4"8?#.$4%?&Mw'y`],p=[()=>d,`default`,`The default value.`,!0,`variadic`,`Whether the option accepts multiple values.`,`VariadicStringCommandParameter`,`Pn!&F4"8?#.$4%?&Mw'y`],m=[()=>f,()=>p,`StringCommandParameter`,`Pn!n"Jw#y`],h=[()=>c,`number`,`kind`,`The option kind.`,`default`,`The default value.`,`choices`,`The allowed choices for the option value.`,`BaseNumberCommandParameter`,`Pn!."4#?$P''FJ4%8?&'F4'8?(Mw)y`],g=[()=>h,`default`,`The default value.`,!1,`variadic`,`Whether the option accepts multiple values.`,`SingleNumberCommandParameter`,`Pn!'4"8?#.$4%?&Mw'y`],_=[()=>h,`default`,`The default value.`,!0,`variadic`,`Whether the option accepts multiple values.`,`VariadicNumberCommandParameter`,`Pn!'F4"8?#.$4%?&Mw'y`],v=[()=>g,()=>_,`NumberCommandParameter`,`Pn!n"Jw#y`],y=[()=>c,`boolean`,`kind`,`The option kind.`,`default`,`The default value.`,`BaseBooleanCommandParameter`,`Pn!."4#?$P))FJ4%8?&Mw'y`],b=[()=>y,`default`,`The default value.`,!1,`variadic`,`Whether the option accepts multiple values.`,`SingleBooleanCommandParameter`,`Pn!)4"8?#.$4%?&Mw'y`],x=[()=>y,`default`,`The default value.`,!0,`variadic`,`Whether the option accepts multiple values.`,`VariadicBooleanCommandParameter`,`Pn!)F4"8?#.$4%?&Mw'y`],S=[()=>b,()=>x,`BooleanCommandParameter`,`Pn!n"Jw#y`],C=[()=>m,()=>v,()=>S,`CommandParameter`,`Pn!n"n#Jw$y`],w=[`T`,()=>e,`kind`,`alias`,()=>t,()=>n,`kind`,`alias`,`alias`,`AsCommandParameterConfig`,`b!Pe"!P.#.$Jo"#e"!P.'.(Jo&#o%"PP&&FJ4)8MKw*y`],T=[()=>w,()=>m,`StringCommandParameterConfig`,`n"o!"w#y`],E=[()=>w,()=>v,`NumberCommandParameterConfig`,`n"o!"w#y`],D=[()=>w,()=>S,`BooleanCommandParameterConfig`,`n"o!"w#y`],O=[()=>T,()=>E,()=>D,`CommandParameterConfig`,`Pn!n"n#Jw$y`],k=[()=>b,`isNegativeOf`,`The option this negates.`,`skipAddingNegative`,`Whether to skip adding a negative option.`,`BooleanCommandOption`,`Pn!&4"8?#)4$8?%Mw&y`],A=[()=>m,()=>v,()=>k,()=>x,`CommandOption`,`Pn!n"n#n$Jw%y`],j=[()=>w,()=>A,`CommandOptionConfig`,`n"o!"w#y`],M=[()=>m,()=>v,()=>S,`CommandArgument`,`Pn!n"n#Jw$y`],N=[()=>w,()=>M,`CommandArgumentConfig`,`n"o!"w#y`],P=[`id`,`The command id.`,`name`,`The command name.`,`path`,`The full command path value.`,`segments`,`The path segments.`,`title`,`The display title.`,`description`,`The command description.`,`alias`,`Alternative command names.`,`icon`,`The command icon.`,`reference`,`A URL to the command documentation or reference.`,`isVirtual`,`Whether the command is virtual.`,`CommandBase`,`PP&,J4!?"&4#?$P&,J4%?&&F4'?(&4)8?*&4+8?,&F4-8?.&4/8?0&418?2)43?4Mw5y`],F=[()=>P,`id`,`The command id.`,`entry`,`The resolved entry definition.`,`tags`,`Optional tags for the command.`,`file`,`source`,`A string representing the source of the command, which can be "file", a specific plugin name, or any other string value that describes the source that added the command.`,`CommandConfig`,`Pn!&4"?#!4$?%&F4&8?'P.(&J4)8?*Mw+y`],I=[()=>F,`title`,`The display title.`,`description`,`The command description.`,`alias`,`Alternative command names.`,`tags`,`A set of tags for the command.`,`file`,`source`,`A string representing the source of the command, which can be "file", a specific plugin name, or any other string value that describes the source that added the command.`,()=>r,()=>A,`options`,`The command options.`,()=>M,`args`,`The positional arguments provided to the command.`,0,`parent`,`The parent command.`,()=>r,0,`children`,`Child commands.`,`CommandTree`,`Pn!P&4"?#&4$?%&F4&?'&F4(?)P.*&J4+?,&n.o-#4/?0n1F42?3P,n4J45?6&n8o7#49?:MKw;y`],L=[()=>n,()=>I,`parent`,`children`,`parent`,`The parent command id.`,()=>r,0,`children`,`Serialized child commands.`,`SerializedCommandTree`,`Pn"P.#.$Jo!#PP,&J4%?&&n(o'#4)?*MKw+y`],R=[`title`,`The display name of the command.`,`description`,`A brief description of what the command does.`,`alias`,`One or more alternative names for the command.`,`tags`,`Optional tags for the command.`,`icon`,`An optional icon to visually represent the command in user interfaces.`,`reference`,`A URL to the command documentation or reference.`,`CommandMetadata`,`P&4!8?"&4#8?$P&&FJ4%8?&&F4'8?(&4)8?*&4+8?,Mw-y`],z=[()=>R,`metadata`,()=>r,()=>j,`JSONSchema7Object`,`StandardJSONSchemaV1`,`options`,()=>N,`args`,`default`,`CommandModule`,`Pn!4"8P&n$o##"w%"w&!J4'8Pn(F!"w&!J4)8!4*8Mw+y`];exports.CommandParameterKinds=o,exports.__ΩAsCommandParameterConfig=w,exports.__ΩBaseBooleanCommandParameter=y,exports.__ΩBaseCommandParameter=c,exports.__ΩBaseNumberCommandParameter=h,exports.__ΩBaseSingleCommandParameter=l,exports.__ΩBaseStringCommandParameter=d,exports.__ΩBaseVariadicCommandParameter=u,exports.__ΩBooleanCommandOption=k,exports.__ΩBooleanCommandParameter=S,exports.__ΩBooleanCommandParameterConfig=D,exports.__ΩCommandArgument=M,exports.__ΩCommandArgumentConfig=N,exports.__ΩCommandBase=P,exports.__ΩCommandConfig=F,exports.__ΩCommandMetadata=R,exports.__ΩCommandModule=z,exports.__ΩCommandOption=A,exports.__ΩCommandOptionConfig=j,exports.__ΩCommandParameter=C,exports.__ΩCommandParameterConfig=O,exports.__ΩCommandParameterKind=s,exports.__ΩCommandParameterType=a,exports.__ΩCommandTree=I,exports.__ΩNumberCommandParameter=v,exports.__ΩNumberCommandParameterConfig=E,exports.__ΩSerializedCommandTree=L,exports.__ΩSingleBooleanCommandParameter=b,exports.__ΩSingleNumberCommandParameter=g,exports.__ΩSingleStringCommandParameter=f,exports.__ΩStringCommandParameter=m,exports.__ΩStringCommandParameterConfig=T,exports.__ΩVariadicBooleanCommandParameter=x,exports.__ΩVariadicNumberCommandParameter=_,exports.__ΩVariadicStringCommandParameter=p;
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ //#region src/types/command.ts
4
+ const __ΩPick = [
5
+ "T",
6
+ "K",
7
+ "Pick",
8
+ "l+e#!e\"!fRb!b\"Pde\"\"N#!w#y"
9
+ ];
10
+ const __ΩPartial = [
11
+ "T",
12
+ "Partial",
13
+ "l+e#!e\"!fRb!Pde\"!gN#\"w\"y"
14
+ ];
15
+ const __ΩOmit = [
16
+ "T",
17
+ "K",
18
+ () => __ΩPick,
19
+ () => __ΩExclude,
20
+ "Omit",
21
+ "b!b\"e!!e!!ge!\"o$#o##w%y"
22
+ ];
23
+ const __ΩRecord = [
24
+ "K",
25
+ "T",
26
+ "Record",
27
+ "l'e#\"Rb!b\"Pde\"!N#!w#y"
28
+ ];
29
+ const __ΩExclude = [
30
+ "T",
31
+ "U",
32
+ "Exclude",
33
+ "l6!Re$!RPe#!e$\"qk#%QRb!b\"Pde\"!p)w#y"
34
+ ];
35
+ const __ΩCommandParameterType = [
36
+ "string",
37
+ "number",
38
+ "boolean",
39
+ "CommandParameterType",
40
+ "P.!.\".#Jw$y"
41
+ ];
42
+ const __ΩBaseCommandParameter = [
43
+ "name",
44
+ "The option name.",
45
+ () => __ΩCommandParameterType,
46
+ "type",
47
+ "The option kind.",
48
+ "title",
49
+ "The display title.",
50
+ "description",
51
+ "The option description.",
52
+ "alias",
53
+ "Alternative option names.",
54
+ "default",
55
+ "The default value.",
56
+ false,
57
+ "env",
58
+ "The environment variable name or false to disable.",
59
+ "required",
60
+ "Whether the option is required.",
61
+ "variadic",
62
+ "Whether the option accepts multiple values.",
63
+ "BaseCommandParameter",
64
+ "P&4!?\"n#4$?%&4&?'&4(?)&F4*?+P&')&F'F)FJ4,8?-P&..J4/?0)41?2)43?4Mw5y"
65
+ ];
66
+ const __ΩBaseSingleCommandParameter = [
67
+ "default",
68
+ "The default value.",
69
+ false,
70
+ "variadic",
71
+ "Whether the option accepts multiple values.",
72
+ "BaseSingleCommandParameter",
73
+ "PP&')J4!8?\".#4$?%Mw&y"
74
+ ];
75
+ const __ΩBaseVariadicCommandParameter = [
76
+ "default",
77
+ "The default value.",
78
+ true,
79
+ "variadic",
80
+ "Whether the option accepts multiple values.",
81
+ "BaseVariadicCommandParameter",
82
+ "PP&F'F)FJ4!8?\".#4$?%Mw&y"
83
+ ];
84
+ const __ΩBaseStringCommandParameter = [
85
+ () => __ΩBaseCommandParameter,
86
+ "string",
87
+ "type",
88
+ "The option kind.",
89
+ "default",
90
+ "The default value.",
91
+ "format",
92
+ "A standard string format to validate the option value against.",
93
+ "choices",
94
+ "The allowed choices for the option value.",
95
+ "BaseStringCommandParameter",
96
+ "Pn!.\"4#?$P&&FJ4%8?&P!&J4'8?(&F4)8?*Mw+y"
97
+ ];
98
+ const __ΩSingleStringCommandParameter = [
99
+ () => __ΩBaseStringCommandParameter,
100
+ "default",
101
+ "The default value.",
102
+ false,
103
+ "variadic",
104
+ "Whether the option accepts multiple values.",
105
+ "SingleStringCommandParameter",
106
+ "Pn!&4\"8?#.$4%?&Mw'y"
107
+ ];
108
+ const __ΩVariadicStringCommandParameter = [
109
+ () => __ΩBaseStringCommandParameter,
110
+ "default",
111
+ "The default value.",
112
+ true,
113
+ "variadic",
114
+ "Whether the option accepts multiple values.",
115
+ "VariadicStringCommandParameter",
116
+ "Pn!&F4\"8?#.$4%?&Mw'y"
117
+ ];
118
+ const __ΩStringCommandParameter = [
119
+ () => __ΩSingleStringCommandParameter,
120
+ () => __ΩVariadicStringCommandParameter,
121
+ "StringCommandParameter",
122
+ "Pn!n\"Jw#y"
123
+ ];
124
+ const __ΩBaseNumberCommandParameter = [
125
+ () => __ΩBaseCommandParameter,
126
+ "number",
127
+ "type",
128
+ "The option kind.",
129
+ "default",
130
+ "The default value.",
131
+ "choices",
132
+ "The allowed choices for the option value.",
133
+ "BaseNumberCommandParameter",
134
+ "Pn!.\"4#?$P''FJ4%8?&'F4'8?(Mw)y"
135
+ ];
136
+ const __ΩSingleNumberCommandParameter = [
137
+ () => __ΩBaseNumberCommandParameter,
138
+ "default",
139
+ "The default value.",
140
+ false,
141
+ "variadic",
142
+ "Whether the option accepts multiple values.",
143
+ "SingleNumberCommandParameter",
144
+ "Pn!'4\"8?#.$4%?&Mw'y"
145
+ ];
146
+ const __ΩVariadicNumberCommandParameter = [
147
+ () => __ΩBaseNumberCommandParameter,
148
+ "default",
149
+ "The default value.",
150
+ true,
151
+ "variadic",
152
+ "Whether the option accepts multiple values.",
153
+ "VariadicNumberCommandParameter",
154
+ "Pn!'F4\"8?#.$4%?&Mw'y"
155
+ ];
156
+ const __ΩNumberCommandParameter = [
157
+ () => __ΩSingleNumberCommandParameter,
158
+ () => __ΩVariadicNumberCommandParameter,
159
+ "NumberCommandParameter",
160
+ "Pn!n\"Jw#y"
161
+ ];
162
+ const __ΩBaseBooleanCommandParameter = [
163
+ () => __ΩBaseCommandParameter,
164
+ "boolean",
165
+ "type",
166
+ "The option kind.",
167
+ "default",
168
+ "The default value.",
169
+ "BaseBooleanCommandParameter",
170
+ "Pn!.\"4#?$P))FJ4%8?&Mw'y"
171
+ ];
172
+ const __ΩSingleBooleanCommandParameter = [
173
+ () => __ΩBaseBooleanCommandParameter,
174
+ "default",
175
+ "The default value.",
176
+ false,
177
+ "variadic",
178
+ "Whether the option accepts multiple values.",
179
+ "SingleBooleanCommandParameter",
180
+ "Pn!)4\"8?#.$4%?&Mw'y"
181
+ ];
182
+ const __ΩVariadicBooleanCommandParameter = [
183
+ () => __ΩBaseBooleanCommandParameter,
184
+ "default",
185
+ "The default value.",
186
+ true,
187
+ "variadic",
188
+ "Whether the option accepts multiple values.",
189
+ "VariadicBooleanCommandParameter",
190
+ "Pn!)F4\"8?#.$4%?&Mw'y"
191
+ ];
192
+ const __ΩBooleanCommandParameter = [
193
+ () => __ΩSingleBooleanCommandParameter,
194
+ () => __ΩVariadicBooleanCommandParameter,
195
+ "BooleanCommandParameter",
196
+ "Pn!n\"Jw#y"
197
+ ];
198
+ const __ΩCommandParameter = [
199
+ () => __ΩStringCommandParameter,
200
+ () => __ΩNumberCommandParameter,
201
+ () => __ΩBooleanCommandParameter,
202
+ "CommandParameter",
203
+ "Pn!n\"n#Jw$y"
204
+ ];
205
+ const __ΩAsCommandParameterConfig = [
206
+ "T",
207
+ () => __ΩPick,
208
+ "type",
209
+ () => __ΩPartial,
210
+ () => __ΩOmit,
211
+ "type",
212
+ "alias",
213
+ "alias",
214
+ "AsCommandParameterConfig",
215
+ "b!Pe\"!.#o\"#e\"!P.&.'Jo%#o$\"PP&&FJ4(8MKw)y"
216
+ ];
217
+ const __ΩStringCommandParameterConfig = [
218
+ () => __ΩAsCommandParameterConfig,
219
+ () => __ΩStringCommandParameter,
220
+ "StringCommandParameterConfig",
221
+ "n\"o!\"w#y"
222
+ ];
223
+ const __ΩNumberCommandParameterConfig = [
224
+ () => __ΩAsCommandParameterConfig,
225
+ () => __ΩNumberCommandParameter,
226
+ "NumberCommandParameterConfig",
227
+ "n\"o!\"w#y"
228
+ ];
229
+ const __ΩBooleanCommandParameterConfig = [
230
+ () => __ΩAsCommandParameterConfig,
231
+ () => __ΩBooleanCommandParameter,
232
+ "BooleanCommandParameterConfig",
233
+ "n\"o!\"w#y"
234
+ ];
235
+ const __ΩCommandParameterConfig = [
236
+ () => __ΩStringCommandParameterConfig,
237
+ () => __ΩNumberCommandParameterConfig,
238
+ () => __ΩBooleanCommandParameterConfig,
239
+ "CommandParameterConfig",
240
+ "Pn!n\"n#Jw$y"
241
+ ];
242
+ const __ΩBooleanCommandOption = [
243
+ () => __ΩSingleBooleanCommandParameter,
244
+ "isNegativeOf",
245
+ "The option this negates.",
246
+ "skipAddingNegative",
247
+ "Whether to skip adding a negative option.",
248
+ "BooleanCommandOption",
249
+ "Pn!&4\"8?#)4$8?%Mw&y"
250
+ ];
251
+ const __ΩCommandOption = [
252
+ () => __ΩStringCommandParameter,
253
+ () => __ΩNumberCommandParameter,
254
+ () => __ΩBooleanCommandOption,
255
+ () => __ΩVariadicBooleanCommandParameter,
256
+ "CommandOption",
257
+ "Pn!n\"n#n$Jw%y"
258
+ ];
259
+ const __ΩCommandOptionConfig = [
260
+ () => __ΩAsCommandParameterConfig,
261
+ () => __ΩCommandOption,
262
+ "CommandOptionConfig",
263
+ "n\"o!\"w#y"
264
+ ];
265
+ const __ΩCommandArgument = [
266
+ () => __ΩStringCommandParameter,
267
+ () => __ΩNumberCommandParameter,
268
+ () => __ΩBooleanCommandParameter,
269
+ "CommandArgument",
270
+ "Pn!n\"n#Jw$y"
271
+ ];
272
+ const __ΩCommandArgumentConfig = [
273
+ () => __ΩAsCommandParameterConfig,
274
+ () => __ΩCommandArgument,
275
+ "CommandArgumentConfig",
276
+ "n\"o!\"w#y"
277
+ ];
278
+ const __ΩCommandMetadata = [
279
+ "title",
280
+ "The display name of the command.",
281
+ "description",
282
+ "A brief description of what the command does.",
283
+ "alias",
284
+ "One or more alternative names for the command.",
285
+ "tags",
286
+ "Optional tags for the command.",
287
+ "icon",
288
+ "An optional icon to visually represent the command in user interfaces.",
289
+ "docs",
290
+ "A URL to the command documentation or reference.",
291
+ "CommandMetadata",
292
+ "P&4!8?\"&4#8?$P&&FJ4%8?&&F4'8?(&4)8?*&4+8?,Mw-y"
293
+ ];
294
+ const __ΩCommandBase = [
295
+ () => __ΩCommandMetadata,
296
+ "id",
297
+ "The command id.",
298
+ "name",
299
+ "The command name.",
300
+ "path",
301
+ "The full command path value.",
302
+ "segments",
303
+ "The path segments.",
304
+ "alias",
305
+ "Alternative command names.",
306
+ "virtual",
307
+ "Whether the command is virtual.",
308
+ "CommandBase",
309
+ "Pn!P&,J4\"?#&4$?%P&,J4&?'&F4(?)&F4*8?+)4,?-Mw.y"
310
+ ];
311
+ const __ΩCommandConfig = [
312
+ () => __ΩCommandBase,
313
+ "id",
314
+ "The command id.",
315
+ "entry",
316
+ "The resolved entry definition.",
317
+ () => __ΩCommandMetadata,
318
+ "tags",
319
+ "tags",
320
+ "CommandConfig",
321
+ "Pn!&4\"?#!4$?%n&.'f4(8Mw)y"
322
+ ];
323
+ const __ΩCommandTree = [
324
+ () => __ΩRecord,
325
+ () => __ΩCommandOption,
326
+ "options",
327
+ "The command options.",
328
+ () => __ΩCommandArgument,
329
+ "args",
330
+ "The positional arguments provided to the command.",
331
+ 0,
332
+ "parent",
333
+ "The parent command.",
334
+ () => __ΩRecord,
335
+ 0,
336
+ "children",
337
+ "Child commands.",
338
+ "CommandTree",
339
+ "P!P&n\"o!#4#?$n%F4&?'P,n(J4)?*&n,o+#4-?.MKw/y"
340
+ ];
341
+ const __ΩSerializedCommandTree = [
342
+ () => __ΩOmit,
343
+ () => __ΩCommandTree,
344
+ "parent",
345
+ "children",
346
+ "parent",
347
+ "The parent command id.",
348
+ () => __ΩRecord,
349
+ 0,
350
+ "children",
351
+ "Serialized child commands.",
352
+ "SerializedCommandTree",
353
+ "Pn\"P.#.$Jo!#PP,&J4%?&&n(o'#4)?*MKw+y"
354
+ ];
355
+ const __ΩCommandModule = [
356
+ () => __ΩCommandMetadata,
357
+ "metadata",
358
+ () => __ΩRecord,
359
+ () => __ΩCommandOptionConfig,
360
+ "options",
361
+ () => __ΩCommandArgumentConfig,
362
+ "args",
363
+ "default",
364
+ "CommandModule",
365
+ "Pn!4\"8P&n$o##!J4%8Pn&!JF4'8!4(8Mw)y"
366
+ ];
367
+
368
+ //#endregion
369
+ exports.__ΩAsCommandParameterConfig = __ΩAsCommandParameterConfig;
370
+ exports.__ΩBaseBooleanCommandParameter = __ΩBaseBooleanCommandParameter;
371
+ exports.__ΩBaseCommandParameter = __ΩBaseCommandParameter;
372
+ exports.__ΩBaseNumberCommandParameter = __ΩBaseNumberCommandParameter;
373
+ exports.__ΩBaseSingleCommandParameter = __ΩBaseSingleCommandParameter;
374
+ exports.__ΩBaseStringCommandParameter = __ΩBaseStringCommandParameter;
375
+ exports.__ΩBaseVariadicCommandParameter = __ΩBaseVariadicCommandParameter;
376
+ exports.__ΩBooleanCommandOption = __ΩBooleanCommandOption;
377
+ exports.__ΩBooleanCommandParameter = __ΩBooleanCommandParameter;
378
+ exports.__ΩBooleanCommandParameterConfig = __ΩBooleanCommandParameterConfig;
379
+ exports.__ΩCommandArgument = __ΩCommandArgument;
380
+ exports.__ΩCommandArgumentConfig = __ΩCommandArgumentConfig;
381
+ exports.__ΩCommandBase = __ΩCommandBase;
382
+ exports.__ΩCommandConfig = __ΩCommandConfig;
383
+ exports.__ΩCommandMetadata = __ΩCommandMetadata;
384
+ exports.__ΩCommandModule = __ΩCommandModule;
385
+ exports.__ΩCommandOption = __ΩCommandOption;
386
+ exports.__ΩCommandOptionConfig = __ΩCommandOptionConfig;
387
+ exports.__ΩCommandParameter = __ΩCommandParameter;
388
+ exports.__ΩCommandParameterConfig = __ΩCommandParameterConfig;
389
+ exports.__ΩCommandParameterType = __ΩCommandParameterType;
390
+ exports.__ΩCommandTree = __ΩCommandTree;
391
+ exports.__ΩNumberCommandParameter = __ΩNumberCommandParameter;
392
+ exports.__ΩNumberCommandParameterConfig = __ΩNumberCommandParameterConfig;
393
+ exports.__ΩSerializedCommandTree = __ΩSerializedCommandTree;
394
+ exports.__ΩSingleBooleanCommandParameter = __ΩSingleBooleanCommandParameter;
395
+ exports.__ΩSingleNumberCommandParameter = __ΩSingleNumberCommandParameter;
396
+ exports.__ΩSingleStringCommandParameter = __ΩSingleStringCommandParameter;
397
+ exports.__ΩStringCommandParameter = __ΩStringCommandParameter;
398
+ exports.__ΩStringCommandParameterConfig = __ΩStringCommandParameterConfig;
399
+ exports.__ΩVariadicBooleanCommandParameter = __ΩVariadicBooleanCommandParameter;
400
+ exports.__ΩVariadicNumberCommandParameter = __ΩVariadicNumberCommandParameter;
401
+ exports.__ΩVariadicStringCommandParameter = __ΩVariadicStringCommandParameter;
402
+ //# sourceMappingURL=command.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.cjs","names":[],"sources":[],"mappings":""}
@@ -1,18 +1,9 @@
1
- import { ResolvedEntryTypeDefinition } from "powerlines";
2
- import { StandardJSONSchemaV1 } from "@standard-schema/spec";
3
- import { JsonSchema7TupleType } from "@stryke/json";
4
- import { AnyFunction } from "@stryke/types/base";
5
- import { JSONSchema7Object } from "json-schema";
6
- import * as z3 from "zod/v3";
1
+ import { JsonSchemaStringFormat, SchemaInput } from "@powerlines/schema";
2
+ import { AnyFunction, RequiredKeys } from "@stryke/types/base";
3
+ import { ResolvedEntryFileReference } from "powerlines";
7
4
 
8
5
  //#region src/types/command.d.ts
9
- type CommandParameterType = string | number | boolean | (string | number)[];
10
- declare const CommandParameterKinds: {
11
- readonly string: "string";
12
- readonly number: "number";
13
- readonly boolean: "boolean";
14
- };
15
- type CommandParameterKind = (typeof CommandParameterKinds)[keyof typeof CommandParameterKinds];
6
+ type CommandParameterType = "string" | "number" | "boolean";
16
7
  interface BaseCommandParameter {
17
8
  /**
18
9
  * The option name.
@@ -21,7 +12,7 @@ interface BaseCommandParameter {
21
12
  /**
22
13
  * The option kind.
23
14
  */
24
- kind: CommandParameterKind;
15
+ type: CommandParameterType;
25
16
  /**
26
17
  * The display title.
27
18
  */
@@ -43,9 +34,9 @@ interface BaseCommandParameter {
43
34
  */
44
35
  env: string | false;
45
36
  /**
46
- * Whether the option is optional.
37
+ * Whether the option is required.
47
38
  */
48
- optional: boolean;
39
+ required: boolean;
49
40
  /**
50
41
  * Whether the option accepts multiple values.
51
42
  */
@@ -75,7 +66,7 @@ interface BaseStringCommandParameter extends BaseCommandParameter {
75
66
  /**
76
67
  * The option kind.
77
68
  */
78
- kind: "string";
69
+ type: "string";
79
70
  /**
80
71
  * The default value.
81
72
  */
@@ -83,7 +74,7 @@ interface BaseStringCommandParameter extends BaseCommandParameter {
83
74
  /**
84
75
  * A standard string format to validate the option value against.
85
76
  */
86
- format?: "email" | "uri" | "uuid" | "ipv4" | "ipv6" | "date" | "time" | "date-time" | "duration";
77
+ format?: JsonSchemaStringFormat | string;
87
78
  /**
88
79
  * The allowed choices for the option value.
89
80
  */
@@ -114,7 +105,7 @@ interface BaseNumberCommandParameter extends BaseCommandParameter {
114
105
  /**
115
106
  * The option kind.
116
107
  */
117
- kind: "number";
108
+ type: "number";
118
109
  /**
119
110
  * The default value.
120
111
  */
@@ -149,7 +140,7 @@ interface BaseBooleanCommandParameter extends BaseCommandParameter {
149
140
  /**
150
141
  * The option kind.
151
142
  */
152
- kind: "boolean";
143
+ type: "boolean";
153
144
  /**
154
145
  * The default value.
155
146
  */
@@ -177,7 +168,7 @@ interface VariadicBooleanCommandParameter extends BaseBooleanCommandParameter {
177
168
  }
178
169
  type BooleanCommandParameter = SingleBooleanCommandParameter | VariadicBooleanCommandParameter;
179
170
  type CommandParameter = StringCommandParameter | NumberCommandParameter | BooleanCommandParameter;
180
- type AsCommandParameterConfig<T extends BaseCommandParameter> = Pick<T, "kind" | "alias"> & Partial<Omit<T, "kind" | "alias">> & {
171
+ type AsCommandParameterConfig<T extends BaseCommandParameter> = Pick<T, "type"> & Partial<Omit<T, "type" | "alias">> & {
181
172
  alias?: string | string[];
182
173
  };
183
174
  type StringCommandParameterConfig = AsCommandParameterConfig<StringCommandParameter>;
@@ -198,7 +189,48 @@ type CommandOption = StringCommandParameter | NumberCommandParameter | BooleanCo
198
189
  type CommandOptionConfig = AsCommandParameterConfig<CommandOption>;
199
190
  type CommandArgument = StringCommandParameter | NumberCommandParameter | BooleanCommandParameter;
200
191
  type CommandArgumentConfig = AsCommandParameterConfig<CommandArgument>;
201
- interface CommandBase {
192
+ interface CommandMetadata {
193
+ /**
194
+ * The display name of the command.
195
+ *
196
+ * @remarks
197
+ * This value will be used in various displays of the user interface and documentation. If not provided, a formatted value of the command name will be used.
198
+ */
199
+ title?: string;
200
+ /**
201
+ * A brief description of what the command does.
202
+ *
203
+ * @remarks
204
+ * This value will be used in various displays of the user interface and documentation. If not provided, a default message may be shown.
205
+ */
206
+ description?: string;
207
+ /**
208
+ * One or more alternative names for the command.
209
+ */
210
+ alias?: string | string[];
211
+ /**
212
+ * Optional tags for the command.
213
+ *
214
+ * @remarks
215
+ * Tags can be used to categorize and organize commands, and can also be utilized by plugins to provide additional functionality or filtering based on tags.
216
+ */
217
+ tags?: string[];
218
+ /**
219
+ * An optional icon to visually represent the command in user interfaces.
220
+ *
221
+ * @remarks
222
+ * This can be a string containing an emoji, a Unicode character, or any other symbol that helps to visually identify the command. If not provided, no icon will be displayed.
223
+ */
224
+ icon?: string;
225
+ /**
226
+ * A URL to the command documentation or reference.
227
+ *
228
+ * @remarks
229
+ * This URL can be used in various displays of the user interface and documentation to provide users with a reference for the command. It can also be used by plugins to link to the documentation in relevant contexts. If the token `{command}` is included in the URL, it will be replaced with the full command path to provide links to command specific documentation. For example, `myapp command subcommand` will be translated to `{docs}/command/subcommand`.
230
+ */
231
+ docs?: string;
232
+ }
233
+ interface CommandBase extends CommandMetadata {
202
234
  /**
203
235
  * The command id.
204
236
  */
@@ -215,33 +247,17 @@ interface CommandBase {
215
247
  * The path segments.
216
248
  */
217
249
  segments: string[];
218
- /**
219
- * The display title.
220
- */
221
- title?: string;
222
- /**
223
- * The command description.
224
- */
225
- description?: string;
226
250
  /**
227
251
  * Alternative command names.
228
252
  */
229
253
  alias?: string[];
230
- /**
231
- * The command icon.
232
- */
233
- icon?: string;
234
- /**
235
- * A URL to the command documentation or reference.
236
- */
237
- reference?: string;
238
254
  /**
239
255
  * Whether the command is virtual.
240
256
  *
241
257
  * @remarks
242
258
  * Virtual commands are considered forks in the command tree and are not directly executable. They are used to group related subcommands together without having an actual command handler or entry point.
243
259
  */
244
- isVirtual: boolean;
260
+ virtual: boolean;
245
261
  }
246
262
  interface CommandConfig extends CommandBase {
247
263
  /**
@@ -251,43 +267,10 @@ interface CommandConfig extends CommandBase {
251
267
  /**
252
268
  * The resolved entry definition.
253
269
  */
254
- entry: ResolvedEntryTypeDefinition;
255
- /**
256
- * Optional tags for the command.
257
- *
258
- * @remarks
259
- * Tags can be used to categorize and organize commands, and can also be utilized by plugins to provide additional functionality or filtering based on tags.
260
- */
261
- tags?: string[];
262
- /**
263
- * A string representing the source of the command, which can be "file", a specific plugin name, or any other string value that describes the source that added the command.
264
- */
265
- source?: "file" | string;
270
+ entry: ResolvedEntryFileReference;
271
+ tags?: CommandMetadata["tags"];
266
272
  }
267
- type CommandTree = CommandConfig & {
268
- /**
269
- * The display title.
270
- */
271
- title: string;
272
- /**
273
- * The command description.
274
- */
275
- description: string;
276
- /**
277
- * Alternative command names.
278
- */
279
- alias: string[];
280
- /**
281
- * A set of tags for the command.
282
- *
283
- * @remarks
284
- * Tags can be used to categorize and organize commands, and can also be utilized by plugins to provide additional functionality or filtering based on tags.
285
- */
286
- tags: string[];
287
- /**
288
- * A string representing the source of the command, which can be "file", a specific plugin name, or any other string value that describes the source that added the command.
289
- */
290
- source: "file" | string;
273
+ type CommandTree = RequiredKeys<CommandConfig, "title" | "description" | "alias" | "tags"> & {
291
274
  /**
292
275
  * The command options.
293
276
  */
@@ -315,53 +298,12 @@ type SerializedCommandTree = Omit<CommandTree, "parent" | "children"> & {
315
298
  */
316
299
  children: Record<string, SerializedCommandTree>;
317
300
  };
318
- interface CommandMetadata {
319
- /**
320
- * The display name of the command.
321
- *
322
- * @remarks
323
- * This value will be used in various displays of the user interface and documentation. If not provided, a formatted value of the command name will be used.
324
- */
325
- title?: string;
326
- /**
327
- * A brief description of what the command does.
328
- *
329
- * @remarks
330
- * This value will be used in various displays of the user interface and documentation. If not provided, a default message may be shown.
331
- */
332
- description?: string;
333
- /**
334
- * One or more alternative names for the command.
335
- */
336
- alias?: string | string[];
337
- /**
338
- * Optional tags for the command.
339
- *
340
- * @remarks
341
- * Tags can be used to categorize and organize commands, and can also be utilized by plugins to provide additional functionality or filtering based on tags.
342
- */
343
- tags?: string[];
344
- /**
345
- * An optional icon to visually represent the command in user interfaces.
346
- *
347
- * @remarks
348
- * This can be a string containing an emoji, a Unicode character, or any other symbol that helps to visually identify the command. If not provided, no icon will be displayed.
349
- */
350
- icon?: string;
351
- /**
352
- * A URL to the command documentation or reference.
353
- *
354
- * @remarks
355
- * This URL can be used in various displays of the user interface and documentation to provide users with a reference for the command. It can also be used by plugins to link to the documentation in relevant contexts. If the token `{command}` is included in the URL, it will be replaced with the full command path to provide links to command specific documentation. For example, `myapp command subcommand` will be translated to `{referenceLink}/command/subcommand`.
356
- */
357
- reference?: string;
358
- }
359
301
  interface CommandModule {
360
302
  metadata?: CommandMetadata;
361
- options?: Record<string, CommandOptionConfig> | JSONSchema7Object | StandardJSONSchemaV1<Record<string, CommandParameterType>> | z3.AnyZodObject;
362
- args?: CommandArgumentConfig[] | JsonSchema7TupleType | StandardJSONSchemaV1<CommandParameterType[]> | z3.AnyZodTuple;
303
+ options?: Record<string, CommandOptionConfig> | SchemaInput;
304
+ args?: (CommandArgumentConfig | SchemaInput)[];
363
305
  default?: AnyFunction;
364
306
  }
365
307
  //#endregion
366
- export { AsCommandParameterConfig, BaseBooleanCommandParameter, BaseCommandParameter, BaseNumberCommandParameter, BaseSingleCommandParameter, BaseStringCommandParameter, BaseVariadicCommandParameter, BooleanCommandOption, BooleanCommandParameter, BooleanCommandParameterConfig, CommandArgument, CommandArgumentConfig, CommandBase, CommandConfig, CommandMetadata, CommandModule, CommandOption, CommandOptionConfig, CommandParameter, CommandParameterConfig, CommandParameterKind, CommandParameterKinds, CommandParameterType, CommandTree, NumberCommandParameter, NumberCommandParameterConfig, SerializedCommandTree, SingleBooleanCommandParameter, SingleNumberCommandParameter, SingleStringCommandParameter, StringCommandParameter, StringCommandParameterConfig, VariadicBooleanCommandParameter, VariadicNumberCommandParameter, VariadicStringCommandParameter };
308
+ export { AsCommandParameterConfig, BaseBooleanCommandParameter, BaseCommandParameter, BaseNumberCommandParameter, BaseSingleCommandParameter, BaseStringCommandParameter, BaseVariadicCommandParameter, BooleanCommandOption, BooleanCommandParameter, BooleanCommandParameterConfig, CommandArgument, CommandArgumentConfig, CommandBase, CommandConfig, CommandMetadata, CommandModule, CommandOption, CommandOptionConfig, CommandParameter, CommandParameterConfig, CommandParameterType, CommandTree, NumberCommandParameter, NumberCommandParameterConfig, SerializedCommandTree, SingleBooleanCommandParameter, SingleNumberCommandParameter, SingleStringCommandParameter, StringCommandParameter, StringCommandParameterConfig, VariadicBooleanCommandParameter, VariadicNumberCommandParameter, VariadicStringCommandParameter };
367
309
  //# sourceMappingURL=command.d.cts.map