@flowscripter/dynamic-cli-framework 1.7.4 → 2.0.0

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 (500) hide show
  1. package/cli-plugin.ts +1 -104
  2. package/dist/cli-plugin.d.ts +1 -58
  3. package/dist/cli-plugin.d.ts.map +1 -1
  4. package/dist/cli-plugin.js +1 -25
  5. package/dist/index.d.ts +70 -69
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +27 -26
  8. package/dist/src/cli/BaseCLI.d.ts +6 -6
  9. package/dist/src/cli/BaseCLI.d.ts.map +1 -1
  10. package/dist/src/cli/BaseCLI.js +1 -2
  11. package/dist/src/{api → cli}/BaseCLIFeatureOptions.d.ts.map +1 -1
  12. package/dist/src/cli/DefaultRuntimeCLI.d.ts +3 -3
  13. package/dist/src/cli/DefaultRuntimeCLI.d.ts.map +1 -1
  14. package/dist/src/cli/DynamicPluginRuntimeCLI.d.ts +3 -3
  15. package/dist/src/cli/DynamicPluginRuntimeCLI.d.ts.map +1 -1
  16. package/dist/src/cli/DynamicPluginRuntimeCLI.js +3 -3
  17. package/dist/src/command/MultiCommandCliHelpCommand.d.ts +7 -7
  18. package/dist/src/command/MultiCommandCliHelpCommand.d.ts.map +1 -1
  19. package/dist/src/command/MultiCommandCliHelpCommand.js +3 -3
  20. package/dist/src/command/SingleCommandCliHelpCommand.d.ts +6 -6
  21. package/dist/src/command/SingleCommandCliHelpCommand.d.ts.map +1 -1
  22. package/dist/src/command/SingleCommandCliHelpCommand.js +2 -2
  23. package/dist/src/command/UsageCommand.d.ts +3 -3
  24. package/dist/src/command/UsageCommand.d.ts.map +1 -1
  25. package/dist/src/command/UsageCommand.js +1 -1
  26. package/dist/src/command/VersionCommand.d.ts +2 -2
  27. package/dist/src/command/VersionCommand.d.ts.map +1 -1
  28. package/dist/src/command/VersionCommand.js +1 -1
  29. package/dist/src/launcher.d.ts +2 -5
  30. package/dist/src/launcher.d.ts.map +1 -1
  31. package/dist/src/runtime/DefaultContext.d.ts +2 -2
  32. package/dist/src/runtime/DefaultContext.d.ts.map +1 -1
  33. package/dist/src/runtime/argument/ArgumentTypeGuards.d.ts +2 -2
  34. package/dist/src/runtime/argument/ArgumentTypeGuards.d.ts.map +1 -1
  35. package/dist/src/runtime/command/CommandTypeGuards.d.ts +5 -5
  36. package/dist/src/runtime/command/CommandTypeGuards.d.ts.map +1 -1
  37. package/dist/src/runtime/command/CommandValidator.d.ts +2 -2
  38. package/dist/src/runtime/command/CommandValidator.d.ts.map +1 -1
  39. package/dist/src/runtime/command/CommandValidator.js +1 -1
  40. package/dist/src/runtime/parser.d.ts +3 -32
  41. package/dist/src/runtime/parser.d.ts.map +1 -1
  42. package/dist/src/runtime/registry/DefaultCommandRegistry.d.ts +6 -6
  43. package/dist/src/runtime/registry/DefaultCommandRegistry.d.ts.map +1 -1
  44. package/dist/src/runtime/registry/DefaultServiceProviderRegistry.d.ts +2 -2
  45. package/dist/src/runtime/registry/DefaultServiceProviderRegistry.d.ts.map +1 -1
  46. package/dist/src/runtime/runner.d.ts +5 -5
  47. package/dist/src/runtime/runner.d.ts.map +1 -1
  48. package/dist/src/runtime/runner.js +2 -2
  49. package/dist/src/runtime/scanner.d.ts +4 -4
  50. package/dist/src/runtime/scanner.d.ts.map +1 -1
  51. package/dist/src/runtime/values/ValuePopulationResult.d.ts +2 -2
  52. package/dist/src/runtime/values/ValuePopulationResult.d.ts.map +1 -1
  53. package/dist/src/runtime/values/argumentValueMerge.d.ts +1 -1
  54. package/dist/src/runtime/values/argumentValueMerge.d.ts.map +1 -1
  55. package/dist/src/runtime/values/argumentValueMerge.js +2 -2
  56. package/dist/src/runtime/values/argumentValueValidation.d.ts +6 -6
  57. package/dist/src/runtime/values/argumentValueValidation.d.ts.map +1 -1
  58. package/dist/src/runtime/values/argumentValueValidation.js +2 -2
  59. package/dist/src/runtime/values/globalCommandValuePopulation.d.ts +2 -2
  60. package/dist/src/runtime/values/globalCommandValuePopulation.d.ts.map +1 -1
  61. package/dist/src/runtime/values/globalCommandValuePopulation.js +2 -2
  62. package/dist/src/runtime/values/subCommandValuePopulation.d.ts +2 -2
  63. package/dist/src/runtime/values/subCommandValuePopulation.d.ts.map +1 -1
  64. package/dist/src/runtime/values/subCommandValuePopulation.js +4 -4
  65. package/dist/src/service/argumentPrompter/ArgumentPrompterServiceProvider.d.ts +4 -4
  66. package/dist/src/service/argumentPrompter/ArgumentPrompterServiceProvider.d.ts.map +1 -1
  67. package/dist/src/service/argumentPrompter/ArgumentPrompterServiceProvider.js +1 -1
  68. package/dist/src/service/argumentPrompter/DefaultArgumentPrompterService.d.ts +2 -2
  69. package/dist/src/service/argumentPrompter/DefaultArgumentPrompterService.d.ts.map +1 -1
  70. package/dist/src/service/argumentPrompter/DefaultArgumentPrompterService.js +3 -3
  71. package/dist/src/service/asciiBannerGenerator/AsciiBannerGeneratorServiceProvider.d.ts +3 -3
  72. package/dist/src/service/asciiBannerGenerator/AsciiBannerGeneratorServiceProvider.d.ts.map +1 -1
  73. package/dist/src/service/asciiBannerGenerator/AsciiBannerGeneratorServiceProvider.js +1 -1
  74. package/dist/src/service/asciiBannerGenerator/DefaultAsciiBannerGeneratorService.d.ts +2 -2
  75. package/dist/src/service/asciiBannerGenerator/DefaultAsciiBannerGeneratorService.d.ts.map +1 -1
  76. package/dist/src/service/banner/BannerServiceProvider.d.ts +3 -3
  77. package/dist/src/service/banner/BannerServiceProvider.d.ts.map +1 -1
  78. package/dist/src/service/banner/BannerServiceProvider.js +2 -2
  79. package/dist/src/service/banner/command/NoBannerCommand.d.ts +4 -4
  80. package/dist/src/service/banner/command/NoBannerCommand.d.ts.map +1 -1
  81. package/dist/src/service/banner/command/NoBannerCommand.js +1 -1
  82. package/dist/src/service/chiselAsciiBannerGenerator/ChiselFontAsciiBannerGeneratorService.d.ts +2 -2
  83. package/dist/src/service/chiselAsciiBannerGenerator/ChiselFontAsciiBannerGeneratorService.d.ts.map +1 -1
  84. package/dist/src/service/completion/CompletionServiceProvider.d.ts +5 -5
  85. package/dist/src/service/completion/CompletionServiceProvider.d.ts.map +1 -1
  86. package/dist/src/service/completion/CompletionServiceProvider.js +6 -7
  87. package/dist/src/service/completion/DefaultCompletionService.d.ts +3 -3
  88. package/dist/src/service/completion/DefaultCompletionService.d.ts.map +1 -1
  89. package/dist/src/service/completion/DefaultCompletionService.js +1 -1
  90. package/dist/src/service/completion/command/CompletionCompleteSubCommand.d.ts +5 -5
  91. package/dist/src/service/completion/command/CompletionCompleteSubCommand.d.ts.map +1 -1
  92. package/dist/src/service/completion/command/CompletionCompleteSubCommand.js +3 -3
  93. package/dist/src/service/completion/command/CompletionGroupCommand.d.ts +3 -3
  94. package/dist/src/service/completion/command/CompletionGroupCommand.d.ts.map +1 -1
  95. package/dist/src/service/completion/command/CompletionIntegrationSubCommand.d.ts +5 -5
  96. package/dist/src/service/completion/command/CompletionIntegrationSubCommand.d.ts.map +1 -1
  97. package/dist/src/service/completion/command/CompletionIntegrationSubCommand.js +3 -3
  98. package/dist/src/service/completion/shell/ShellHandler.d.ts +1 -1
  99. package/dist/src/service/completion/shell/ShellHandler.d.ts.map +1 -1
  100. package/dist/src/service/completion/shell/bash.d.ts +1 -1
  101. package/dist/src/service/completion/shell/bash.d.ts.map +1 -1
  102. package/dist/src/service/completion/shell/fish.d.ts +1 -1
  103. package/dist/src/service/completion/shell/fish.d.ts.map +1 -1
  104. package/dist/src/service/completion/shell/powershell.d.ts +1 -1
  105. package/dist/src/service/completion/shell/powershell.d.ts.map +1 -1
  106. package/dist/src/service/completion/shell/zsh.d.ts +1 -1
  107. package/dist/src/service/completion/shell/zsh.d.ts.map +1 -1
  108. package/dist/src/service/configuration/ConfigurationServiceProvider.d.ts +5 -5
  109. package/dist/src/service/configuration/ConfigurationServiceProvider.d.ts.map +1 -1
  110. package/dist/src/service/configuration/ConfigurationServiceProvider.js +1 -1
  111. package/dist/src/service/configuration/DefaultKeyValueService.d.ts +1 -1
  112. package/dist/src/service/configuration/DefaultKeyValueService.d.ts.map +1 -1
  113. package/dist/src/service/configuration/DefaultKeyValueService.js +1 -1
  114. package/dist/src/service/configuration/DefaultSecretService.d.ts +1 -1
  115. package/dist/src/service/configuration/DefaultSecretService.d.ts.map +1 -1
  116. package/dist/src/service/configuration/command/ConfigCommand.d.ts +4 -4
  117. package/dist/src/service/configuration/command/ConfigCommand.d.ts.map +1 -1
  118. package/dist/src/service/configuration/command/ConfigCommand.js +1 -1
  119. package/dist/src/service/configuration/command/DumpConfigCommand.d.ts +2 -2
  120. package/dist/src/service/configuration/command/DumpConfigCommand.d.ts.map +1 -1
  121. package/dist/src/service/configuration/command/DumpConfigCommand.js +2 -2
  122. package/dist/src/service/dataDumpGenerator/DataDumpGeneratorServiceProvider.d.ts +3 -3
  123. package/dist/src/service/dataDumpGenerator/DataDumpGeneratorServiceProvider.d.ts.map +1 -1
  124. package/dist/src/service/dataDumpGenerator/DataDumpGeneratorServiceProvider.js +2 -2
  125. package/dist/src/service/dataDumpGenerator/DefaultDataDumpGeneratorService.d.ts +2 -2
  126. package/dist/src/service/dataDumpGenerator/DefaultDataDumpGeneratorService.d.ts.map +1 -1
  127. package/dist/src/service/dataDumpGenerator/DefaultDataDumpGeneratorService.js +1 -1
  128. package/dist/src/service/imagePrinter/DefaultImagePrinterService.d.ts +1 -1
  129. package/dist/src/service/imagePrinter/DefaultImagePrinterService.d.ts.map +1 -1
  130. package/dist/src/service/imagePrinter/ImagePrinterServiceProvider.d.ts +3 -3
  131. package/dist/src/service/imagePrinter/ImagePrinterServiceProvider.d.ts.map +1 -1
  132. package/dist/src/service/imagePrinter/ImagePrinterServiceProvider.js +1 -1
  133. package/dist/src/service/plugin/DefaultPluginService.d.ts +1 -1
  134. package/dist/src/service/plugin/DefaultPluginService.d.ts.map +1 -1
  135. package/dist/src/service/plugin/DefaultPluginServiceProvider.d.ts +3 -3
  136. package/dist/src/service/plugin/DefaultPluginServiceProvider.d.ts.map +1 -1
  137. package/dist/src/service/plugin/DefaultPluginServiceProvider.js +1 -1
  138. package/dist/src/service/plugin/command/PluginAddSubCommand.d.ts +4 -4
  139. package/dist/src/service/plugin/command/PluginAddSubCommand.d.ts.map +1 -1
  140. package/dist/src/service/plugin/command/PluginAddSubCommand.js +3 -3
  141. package/dist/src/service/plugin/command/PluginGroupCommand.d.ts +3 -3
  142. package/dist/src/service/plugin/command/PluginGroupCommand.d.ts.map +1 -1
  143. package/dist/src/service/plugin/command/PluginListSubCommand.d.ts +3 -3
  144. package/dist/src/service/plugin/command/PluginListSubCommand.d.ts.map +1 -1
  145. package/dist/src/service/plugin/command/PluginListSubCommand.js +2 -2
  146. package/dist/src/service/plugin/command/PluginRemoveSubCommand.d.ts +4 -4
  147. package/dist/src/service/plugin/command/PluginRemoveSubCommand.d.ts.map +1 -1
  148. package/dist/src/service/plugin/command/PluginRemoveSubCommand.js +3 -3
  149. package/dist/src/service/plugin/command/PluginSearchSubCommand.d.ts +4 -4
  150. package/dist/src/service/plugin/command/PluginSearchSubCommand.d.ts.map +1 -1
  151. package/dist/src/service/plugin/command/PluginSearchSubCommand.js +3 -3
  152. package/dist/src/service/plugin/command/PluginUpgradeSubCommand.d.ts +3 -3
  153. package/dist/src/service/plugin/command/PluginUpgradeSubCommand.d.ts.map +1 -1
  154. package/dist/src/service/plugin/command/PluginUpgradeSubCommand.js +2 -2
  155. package/dist/src/service/prettyPrinter/DefaultPrettyPrinterService.d.ts +2 -2
  156. package/dist/src/service/prettyPrinter/DefaultPrettyPrinterService.d.ts.map +1 -1
  157. package/dist/src/service/prettyPrinter/PrettyPrinterServiceProvider.d.ts +3 -3
  158. package/dist/src/service/prettyPrinter/PrettyPrinterServiceProvider.d.ts.map +1 -1
  159. package/dist/src/service/prettyPrinter/PrettyPrinterServiceProvider.js +1 -1
  160. package/dist/src/service/printer/DefaultPrinterService.d.ts +7 -2
  161. package/dist/src/service/printer/DefaultPrinterService.d.ts.map +1 -1
  162. package/dist/src/service/printer/DefaultPrinterService.js +60 -3
  163. package/dist/src/service/printer/PrinterServiceProvider.d.ts +4 -4
  164. package/dist/src/service/printer/PrinterServiceProvider.d.ts.map +1 -1
  165. package/dist/src/service/printer/PrinterServiceProvider.js +2 -2
  166. package/dist/src/service/printer/command/DarkModeCommand.d.ts +4 -4
  167. package/dist/src/service/printer/command/DarkModeCommand.d.ts.map +1 -1
  168. package/dist/src/service/printer/command/DarkModeCommand.js +1 -1
  169. package/dist/src/service/printer/command/LogLevelCommand.d.ts +4 -4
  170. package/dist/src/service/printer/command/LogLevelCommand.d.ts.map +1 -1
  171. package/dist/src/service/printer/command/LogLevelCommand.js +2 -2
  172. package/dist/src/service/printer/command/NoColorCommand.d.ts +4 -4
  173. package/dist/src/service/printer/command/NoColorCommand.d.ts.map +1 -1
  174. package/dist/src/service/printer/command/NoColorCommand.js +1 -1
  175. package/dist/src/service/printer/command/NoHyperlinksCommand.d.ts +4 -4
  176. package/dist/src/service/printer/command/NoHyperlinksCommand.d.ts.map +1 -1
  177. package/dist/src/service/printer/command/NoHyperlinksCommand.js +1 -1
  178. package/dist/src/service/printer/terminal/Progress.d.ts +2 -2
  179. package/dist/src/service/printer/terminal/Progress.d.ts.map +1 -1
  180. package/dist/src/service/printer/terminal/Progress.js +2 -2
  181. package/dist/src/service/printer/terminal/Quote.d.ts +10 -0
  182. package/dist/src/service/printer/terminal/Quote.d.ts.map +1 -0
  183. package/dist/src/service/printer/terminal/Quote.js +50 -0
  184. package/dist/src/service/printer/terminal/Spinner.d.ts +2 -2
  185. package/dist/src/service/printer/terminal/Spinner.d.ts.map +1 -1
  186. package/dist/src/service/printer/terminal/Spinner.js +2 -2
  187. package/dist/src/service/prompter/DefaultPrompterService.d.ts +3 -3
  188. package/dist/src/service/prompter/DefaultPrompterService.d.ts.map +1 -1
  189. package/dist/src/service/prompter/DefaultPrompterService.js +1 -1
  190. package/dist/src/service/prompter/PrompterServiceProvider.d.ts +4 -4
  191. package/dist/src/service/prompter/PrompterServiceProvider.d.ts.map +1 -1
  192. package/dist/src/service/prompter/PrompterServiceProvider.js +1 -1
  193. package/dist/src/service/prompter/command/NoPromptCommand.d.ts +4 -4
  194. package/dist/src/service/prompter/command/NoPromptCommand.d.ts.map +1 -1
  195. package/dist/src/service/prompter/command/NoPromptCommand.js +1 -1
  196. package/dist/src/service/prompter/prompt/PromptContext.d.ts +2 -2
  197. package/dist/src/service/prompter/prompt/PromptContext.d.ts.map +1 -1
  198. package/dist/src/service/prompter/prompt/promptAcknowledge.d.ts +1 -1
  199. package/dist/src/service/prompter/prompt/promptAcknowledge.d.ts.map +1 -1
  200. package/dist/src/service/prompter/prompt/promptAcknowledge.js +1 -1
  201. package/dist/src/service/prompter/prompt/promptMultiSelect.d.ts +1 -1
  202. package/dist/src/service/prompter/prompt/promptMultiSelect.d.ts.map +1 -1
  203. package/dist/src/service/prompter/prompt/promptOpenUrl.d.ts +1 -1
  204. package/dist/src/service/prompter/prompt/promptOpenUrl.d.ts.map +1 -1
  205. package/dist/src/service/prompter/prompt/promptSingleSelect.d.ts +1 -1
  206. package/dist/src/service/prompter/prompt/promptSingleSelect.d.ts.map +1 -1
  207. package/dist/src/service/prompter/prompt/promptText.d.ts +1 -1
  208. package/dist/src/service/prompter/prompt/promptText.d.ts.map +1 -1
  209. package/dist/src/service/prompter/prompt/promptToggle.d.ts +1 -1
  210. package/dist/src/service/prompter/prompt/promptToggle.d.ts.map +1 -1
  211. package/dist/src/service/prompter/prompt/promptToggle.js +1 -1
  212. package/dist/src/service/shutdown/DefaultShutdownService.d.ts +1 -1
  213. package/dist/src/service/shutdown/DefaultShutdownService.d.ts.map +1 -1
  214. package/dist/src/service/shutdown/ShutdownServiceProvider.d.ts +3 -3
  215. package/dist/src/service/shutdown/ShutdownServiceProvider.d.ts.map +1 -1
  216. package/dist/src/service/shutdown/ShutdownServiceProvider.js +1 -1
  217. package/dist/src/service/syntaxHighlighter/DefaultSyntaxHighlighterService.d.ts +2 -2
  218. package/dist/src/service/syntaxHighlighter/DefaultSyntaxHighlighterService.d.ts.map +1 -1
  219. package/dist/src/service/syntaxHighlighter/SyntaxHighlighterServiceProvider.d.ts +3 -3
  220. package/dist/src/service/syntaxHighlighter/SyntaxHighlighterServiceProvider.d.ts.map +1 -1
  221. package/dist/src/service/syntaxHighlighter/SyntaxHighlighterServiceProvider.js +2 -2
  222. package/dist/src/service/tableGenerator/DefaultTableGeneratorService.d.ts +3 -3
  223. package/dist/src/service/tableGenerator/DefaultTableGeneratorService.d.ts.map +1 -1
  224. package/dist/src/service/tableGenerator/DefaultTableGeneratorService.js +2 -2
  225. package/dist/src/service/tableGenerator/TableGeneratorServiceProvider.d.ts +3 -3
  226. package/dist/src/service/tableGenerator/TableGeneratorServiceProvider.d.ts.map +1 -1
  227. package/dist/src/service/tableGenerator/TableGeneratorServiceProvider.js +2 -2
  228. package/dist/src/service/treePrinter/DefaultTreePrinterService.d.ts +2 -2
  229. package/dist/src/service/treePrinter/DefaultTreePrinterService.d.ts.map +1 -1
  230. package/dist/src/service/treePrinter/TreePrinterServiceProvider.d.ts +3 -3
  231. package/dist/src/service/treePrinter/TreePrinterServiceProvider.d.ts.map +1 -1
  232. package/dist/src/service/treePrinter/TreePrinterServiceProvider.js +2 -2
  233. package/dist/src/terminal/ImageRenderer.d.ts.map +1 -1
  234. package/dist/src/terminal/ImageRenderer.js +7 -5
  235. package/dist/src/util/configHelper.d.ts +4 -4
  236. package/dist/src/util/configHelper.d.ts.map +1 -1
  237. package/dist/src/util/envVarHelper.d.ts +4 -4
  238. package/dist/src/util/envVarHelper.d.ts.map +1 -1
  239. package/dist/src/util/envVarHelper.js +2 -2
  240. package/dist/src/util/helpHelper.d.ts +8 -8
  241. package/dist/src/util/helpHelper.d.ts.map +1 -1
  242. package/dist/src/util/helpHelper.js +1 -1
  243. package/dist/src/util/runnerHelper.d.ts +2 -2
  244. package/dist/src/util/runnerHelper.d.ts.map +1 -1
  245. package/dist/src/util/runnerHelper.js +1 -1
  246. package/index.ts +70 -69
  247. package/package.json +2 -1
  248. package/src/cli/BaseCLI.ts +10 -11
  249. package/src/cli/DefaultRuntimeCLI.ts +3 -3
  250. package/src/cli/DynamicPluginRuntimeCLI.ts +8 -8
  251. package/src/command/MultiCommandCliHelpCommand.ts +13 -13
  252. package/src/command/SingleCommandCliHelpCommand.ts +12 -12
  253. package/src/command/UsageCommand.ts +5 -5
  254. package/src/command/VersionCommand.ts +4 -4
  255. package/src/launcher.ts +8 -6
  256. package/src/runtime/DefaultContext.ts +2 -2
  257. package/src/runtime/argument/ArgumentTypeGuards.ts +2 -2
  258. package/src/runtime/command/CommandTypeGuards.ts +5 -5
  259. package/src/runtime/command/CommandValidator.ts +13 -13
  260. package/src/runtime/parser.ts +6 -38
  261. package/src/runtime/registry/DefaultCommandRegistry.ts +6 -6
  262. package/src/runtime/registry/DefaultServiceProviderRegistry.ts +2 -2
  263. package/src/runtime/runner.ts +13 -13
  264. package/src/runtime/scanner.ts +4 -4
  265. package/src/runtime/values/ValuePopulationResult.ts +2 -2
  266. package/src/runtime/values/argumentValueMerge.ts +3 -3
  267. package/src/runtime/values/argumentValueValidation.ts +10 -10
  268. package/src/runtime/values/globalCommandValuePopulation.ts +4 -4
  269. package/src/runtime/values/subCommandValuePopulation.ts +10 -7
  270. package/src/service/argumentPrompter/ArgumentPrompterServiceProvider.ts +5 -5
  271. package/src/service/argumentPrompter/DefaultArgumentPrompterService.ts +12 -12
  272. package/src/service/asciiBannerGenerator/AsciiBannerGeneratorServiceProvider.ts +5 -5
  273. package/src/service/asciiBannerGenerator/DefaultAsciiBannerGeneratorService.ts +2 -5
  274. package/src/service/banner/BannerServiceProvider.ts +7 -7
  275. package/src/service/banner/command/NoBannerCommand.ts +4 -4
  276. package/src/service/chiselAsciiBannerGenerator/ChiselFontAsciiBannerGeneratorService.ts +2 -2
  277. package/src/service/completion/CompletionServiceProvider.ts +14 -15
  278. package/src/service/completion/DefaultCompletionService.ts +5 -5
  279. package/src/service/completion/command/CompletionCompleteSubCommand.ts +8 -8
  280. package/src/service/completion/command/CompletionGroupCommand.ts +3 -3
  281. package/src/service/completion/command/CompletionIntegrationSubCommand.ts +8 -8
  282. package/src/service/completion/shell/ShellHandler.ts +1 -1
  283. package/src/service/completion/shell/bash.ts +1 -1
  284. package/src/service/completion/shell/fish.ts +1 -1
  285. package/src/service/completion/shell/powershell.ts +1 -1
  286. package/src/service/completion/shell/zsh.ts +1 -1
  287. package/src/service/configuration/ConfigurationServiceProvider.ts +6 -6
  288. package/src/service/configuration/DefaultKeyValueService.ts +2 -2
  289. package/src/service/configuration/DefaultSecretService.ts +1 -1
  290. package/src/service/configuration/command/ConfigCommand.ts +4 -4
  291. package/src/service/configuration/command/DumpConfigCommand.ts +6 -6
  292. package/src/service/dataDumpGenerator/DataDumpGeneratorServiceProvider.ts +6 -6
  293. package/src/service/dataDumpGenerator/DefaultDataDumpGeneratorService.ts +2 -2
  294. package/src/service/imagePrinter/DefaultImagePrinterService.ts +1 -1
  295. package/src/service/imagePrinter/ImagePrinterServiceProvider.ts +4 -4
  296. package/src/service/plugin/DefaultPluginService.ts +1 -1
  297. package/src/service/plugin/DefaultPluginServiceProvider.ts +4 -4
  298. package/src/service/plugin/command/PluginAddSubCommand.ts +8 -8
  299. package/src/service/plugin/command/PluginGroupCommand.ts +3 -3
  300. package/src/service/plugin/command/PluginListSubCommand.ts +7 -7
  301. package/src/service/plugin/command/PluginRemoveSubCommand.ts +8 -8
  302. package/src/service/plugin/command/PluginSearchSubCommand.ts +8 -8
  303. package/src/service/plugin/command/PluginUpgradeSubCommand.ts +7 -7
  304. package/src/service/prettyPrinter/DefaultPrettyPrinterService.ts +3 -3
  305. package/src/service/prettyPrinter/PrettyPrinterServiceProvider.ts +4 -4
  306. package/src/service/printer/DefaultPrinterService.ts +70 -8
  307. package/src/service/printer/PrinterServiceProvider.ts +7 -7
  308. package/src/service/printer/command/DarkModeCommand.ts +4 -4
  309. package/src/service/printer/command/LogLevelCommand.ts +5 -5
  310. package/src/service/printer/command/NoColorCommand.ts +4 -4
  311. package/src/service/printer/command/NoHyperlinksCommand.ts +4 -4
  312. package/src/service/printer/terminal/Progress.ts +2 -2
  313. package/src/service/printer/terminal/Quote.ts +66 -0
  314. package/src/service/printer/terminal/Spinner.ts +2 -2
  315. package/src/service/prompter/DefaultPrompterService.ts +3 -3
  316. package/src/service/prompter/PrompterServiceProvider.ts +5 -5
  317. package/src/service/prompter/command/NoPromptCommand.ts +4 -4
  318. package/src/service/prompter/prompt/PromptContext.ts +2 -2
  319. package/src/service/prompter/prompt/promptAcknowledge.ts +1 -1
  320. package/src/service/prompter/prompt/promptMultiSelect.ts +1 -1
  321. package/src/service/prompter/prompt/promptOpenUrl.ts +1 -1
  322. package/src/service/prompter/prompt/promptSingleSelect.ts +1 -1
  323. package/src/service/prompter/prompt/promptText.ts +2 -2
  324. package/src/service/prompter/prompt/promptToggle.ts +1 -1
  325. package/src/service/shutdown/DefaultShutdownService.ts +1 -1
  326. package/src/service/shutdown/ShutdownServiceProvider.ts +5 -5
  327. package/src/service/syntaxHighlighter/DefaultSyntaxHighlighterService.ts +2 -2
  328. package/src/service/syntaxHighlighter/SyntaxHighlighterServiceProvider.ts +6 -6
  329. package/src/service/tableGenerator/DefaultTableGeneratorService.ts +4 -4
  330. package/src/service/tableGenerator/TableGeneratorServiceProvider.ts +6 -6
  331. package/src/service/treePrinter/DefaultTreePrinterService.ts +2 -2
  332. package/src/service/treePrinter/TreePrinterServiceProvider.ts +6 -6
  333. package/src/terminal/ImageRenderer.ts +7 -5
  334. package/src/util/configHelper.ts +6 -6
  335. package/src/util/envVarHelper.ts +10 -10
  336. package/src/util/helpHelper.ts +19 -16
  337. package/src/util/runnerHelper.ts +4 -4
  338. package/dist/src/api/CLI.d.ts +0 -17
  339. package/dist/src/api/CLI.d.ts.map +0 -1
  340. package/dist/src/api/CLI.js +0 -0
  341. package/dist/src/api/CLIConfig.d.ts +0 -22
  342. package/dist/src/api/CLIConfig.d.ts.map +0 -1
  343. package/dist/src/api/CLIConfig.js +0 -0
  344. package/dist/src/api/Context.d.ts +0 -23
  345. package/dist/src/api/Context.d.ts.map +0 -1
  346. package/dist/src/api/Context.js +0 -0
  347. package/dist/src/api/RunResult.d.ts +0 -128
  348. package/dist/src/api/RunResult.d.ts.map +0 -1
  349. package/dist/src/api/RunResult.js +0 -73
  350. package/dist/src/api/argument/Argument.d.ts +0 -62
  351. package/dist/src/api/argument/Argument.d.ts.map +0 -1
  352. package/dist/src/api/argument/Argument.js +0 -0
  353. package/dist/src/api/argument/ArgumentValueTypes.d.ts +0 -68
  354. package/dist/src/api/argument/ArgumentValueTypes.d.ts.map +0 -1
  355. package/dist/src/api/argument/ArgumentValueTypes.js +0 -18
  356. package/dist/src/api/argument/ComplexOption.d.ts +0 -21
  357. package/dist/src/api/argument/ComplexOption.d.ts.map +0 -1
  358. package/dist/src/api/argument/ComplexOption.js +0 -1
  359. package/dist/src/api/argument/GlobalCommandArgument.d.ts +0 -16
  360. package/dist/src/api/argument/GlobalCommandArgument.d.ts.map +0 -1
  361. package/dist/src/api/argument/GlobalCommandArgument.js +0 -0
  362. package/dist/src/api/argument/Option.d.ts +0 -29
  363. package/dist/src/api/argument/Option.d.ts.map +0 -1
  364. package/dist/src/api/argument/Option.js +0 -0
  365. package/dist/src/api/argument/Positional.d.ts +0 -26
  366. package/dist/src/api/argument/Positional.d.ts.map +0 -1
  367. package/dist/src/api/argument/Positional.js +0 -0
  368. package/dist/src/api/argument/SubCommandArgument.d.ts +0 -18
  369. package/dist/src/api/argument/SubCommandArgument.d.ts.map +0 -1
  370. package/dist/src/api/argument/SubCommandArgument.js +0 -1
  371. package/dist/src/api/command/Command.d.ts +0 -26
  372. package/dist/src/api/command/Command.d.ts.map +0 -1
  373. package/dist/src/api/command/Command.js +0 -0
  374. package/dist/src/api/command/GlobalCommand.d.ts +0 -28
  375. package/dist/src/api/command/GlobalCommand.d.ts.map +0 -1
  376. package/dist/src/api/command/GlobalCommand.js +0 -0
  377. package/dist/src/api/command/GlobalModifierCommand.d.ts +0 -12
  378. package/dist/src/api/command/GlobalModifierCommand.d.ts.map +0 -1
  379. package/dist/src/api/command/GlobalModifierCommand.js +0 -0
  380. package/dist/src/api/command/GroupCommand.d.ts +0 -19
  381. package/dist/src/api/command/GroupCommand.d.ts.map +0 -1
  382. package/dist/src/api/command/GroupCommand.js +0 -0
  383. package/dist/src/api/command/SubCommand.d.ts +0 -37
  384. package/dist/src/api/command/SubCommand.d.ts.map +0 -1
  385. package/dist/src/api/command/SubCommand.js +0 -0
  386. package/dist/src/api/command/UsageExample.d.ts +0 -20
  387. package/dist/src/api/command/UsageExample.d.ts.map +0 -1
  388. package/dist/src/api/command/UsageExample.js +0 -0
  389. package/dist/src/api/plugin/CLIPlugin.d.ts +0 -31
  390. package/dist/src/api/plugin/CLIPlugin.d.ts.map +0 -1
  391. package/dist/src/api/plugin/CLIPlugin.js +0 -2
  392. package/dist/src/api/plugin/CommandFactory.d.ts +0 -23
  393. package/dist/src/api/plugin/CommandFactory.d.ts.map +0 -1
  394. package/dist/src/api/plugin/CommandFactory.js +0 -7
  395. package/dist/src/api/plugin/ServiceProviderFactory.d.ts +0 -25
  396. package/dist/src/api/plugin/ServiceProviderFactory.d.ts.map +0 -1
  397. package/dist/src/api/plugin/ServiceProviderFactory.js +0 -7
  398. package/dist/src/api/plugin/createCLIPlugin.d.ts +0 -14
  399. package/dist/src/api/plugin/createCLIPlugin.d.ts.map +0 -1
  400. package/dist/src/api/plugin/createCLIPlugin.js +0 -30
  401. package/dist/src/api/service/ServiceProvider.d.ts +0 -47
  402. package/dist/src/api/service/ServiceProvider.d.ts.map +0 -1
  403. package/dist/src/api/service/ServiceProvider.js +0 -0
  404. package/dist/src/api/service/core/ArgumentPrompterService.d.ts +0 -6
  405. package/dist/src/api/service/core/ArgumentPrompterService.d.ts.map +0 -1
  406. package/dist/src/api/service/core/ArgumentPrompterService.js +0 -1
  407. package/dist/src/api/service/core/AsciiBannerGeneratorService.d.ts +0 -59
  408. package/dist/src/api/service/core/AsciiBannerGeneratorService.d.ts.map +0 -1
  409. package/dist/src/api/service/core/AsciiBannerGeneratorService.js +0 -1
  410. package/dist/src/api/service/core/CompletionService.d.ts +0 -22
  411. package/dist/src/api/service/core/CompletionService.d.ts.map +0 -1
  412. package/dist/src/api/service/core/CompletionService.js +0 -8
  413. package/dist/src/api/service/core/DataDumpGeneratorService.d.ts +0 -22
  414. package/dist/src/api/service/core/DataDumpGeneratorService.d.ts.map +0 -1
  415. package/dist/src/api/service/core/DataDumpGeneratorService.js +0 -7
  416. package/dist/src/api/service/core/ImagePrinterService.d.ts +0 -21
  417. package/dist/src/api/service/core/ImagePrinterService.d.ts.map +0 -1
  418. package/dist/src/api/service/core/ImagePrinterService.js +0 -1
  419. package/dist/src/api/service/core/KeyValueService.d.ts +0 -40
  420. package/dist/src/api/service/core/KeyValueService.d.ts.map +0 -1
  421. package/dist/src/api/service/core/KeyValueService.js +0 -7
  422. package/dist/src/api/service/core/PluginService.d.ts +0 -55
  423. package/dist/src/api/service/core/PluginService.d.ts.map +0 -1
  424. package/dist/src/api/service/core/PluginService.js +0 -6
  425. package/dist/src/api/service/core/PrettyPrinterService.d.ts +0 -35
  426. package/dist/src/api/service/core/PrettyPrinterService.d.ts.map +0 -1
  427. package/dist/src/api/service/core/PrettyPrinterService.js +0 -1
  428. package/dist/src/api/service/core/PrinterService.d.ts +0 -339
  429. package/dist/src/api/service/core/PrinterService.d.ts.map +0 -1
  430. package/dist/src/api/service/core/PrinterService.js +0 -42
  431. package/dist/src/api/service/core/PrompterService.d.ts +0 -35
  432. package/dist/src/api/service/core/PrompterService.d.ts.map +0 -1
  433. package/dist/src/api/service/core/PrompterService.js +0 -10
  434. package/dist/src/api/service/core/SecretService.d.ts +0 -25
  435. package/dist/src/api/service/core/SecretService.d.ts.map +0 -1
  436. package/dist/src/api/service/core/SecretService.js +0 -0
  437. package/dist/src/api/service/core/ShutdownService.d.ts +0 -24
  438. package/dist/src/api/service/core/ShutdownService.d.ts.map +0 -1
  439. package/dist/src/api/service/core/ShutdownService.js +0 -1
  440. package/dist/src/api/service/core/SyntaxHighlighterService.d.ts +0 -49
  441. package/dist/src/api/service/core/SyntaxHighlighterService.d.ts.map +0 -1
  442. package/dist/src/api/service/core/SyntaxHighlighterService.js +0 -1
  443. package/dist/src/api/service/core/Table.d.ts +0 -18
  444. package/dist/src/api/service/core/Table.d.ts.map +0 -1
  445. package/dist/src/api/service/core/Table.js +0 -49
  446. package/dist/src/api/service/core/TableGeneratorService.d.ts +0 -32
  447. package/dist/src/api/service/core/TableGeneratorService.d.ts.map +0 -1
  448. package/dist/src/api/service/core/TableGeneratorService.js +0 -7
  449. package/dist/src/api/service/core/TreePrinterService.d.ts +0 -9
  450. package/dist/src/api/service/core/TreePrinterService.d.ts.map +0 -1
  451. package/dist/src/api/service/core/TreePrinterService.js +0 -1
  452. package/dist/src/runtime/registry/CommandRegistry.d.ts +0 -89
  453. package/dist/src/runtime/registry/CommandRegistry.d.ts.map +0 -1
  454. package/dist/src/runtime/registry/CommandRegistry.js +0 -0
  455. package/dist/src/runtime/registry/ServiceProviderRegistry.d.ts +0 -11
  456. package/dist/src/runtime/registry/ServiceProviderRegistry.d.ts.map +0 -1
  457. package/dist/src/runtime/registry/ServiceProviderRegistry.js +0 -0
  458. package/src/api/CLI.ts +0 -17
  459. package/src/api/CLIConfig.ts +0 -24
  460. package/src/api/Context.ts +0 -25
  461. package/src/api/RunResult.ts +0 -158
  462. package/src/api/argument/Argument.ts +0 -75
  463. package/src/api/argument/ArgumentValueTypes.ts +0 -80
  464. package/src/api/argument/ComplexOption.ts +0 -27
  465. package/src/api/argument/GlobalCommandArgument.ts +0 -17
  466. package/src/api/argument/Option.ts +0 -32
  467. package/src/api/argument/Positional.ts +0 -27
  468. package/src/api/argument/SubCommandArgument.ts +0 -20
  469. package/src/api/command/Command.ts +0 -28
  470. package/src/api/command/GlobalCommand.ts +0 -30
  471. package/src/api/command/GlobalModifierCommand.ts +0 -12
  472. package/src/api/command/GroupCommand.ts +0 -20
  473. package/src/api/command/SubCommand.ts +0 -41
  474. package/src/api/command/UsageExample.ts +0 -21
  475. package/src/api/plugin/CLIPlugin.ts +0 -35
  476. package/src/api/plugin/CommandFactory.ts +0 -25
  477. package/src/api/plugin/ServiceProviderFactory.ts +0 -27
  478. package/src/api/plugin/createCLIPlugin.ts +0 -47
  479. package/src/api/service/ServiceProvider.ts +0 -52
  480. package/src/api/service/core/ArgumentPrompterService.ts +0 -8
  481. package/src/api/service/core/AsciiBannerGeneratorService.ts +0 -69
  482. package/src/api/service/core/CompletionService.ts +0 -32
  483. package/src/api/service/core/DataDumpGeneratorService.ts +0 -27
  484. package/src/api/service/core/ImagePrinterService.ts +0 -25
  485. package/src/api/service/core/KeyValueService.ts +0 -44
  486. package/src/api/service/core/PluginService.ts +0 -63
  487. package/src/api/service/core/PrettyPrinterService.ts +0 -39
  488. package/src/api/service/core/PrinterService.ts +0 -400
  489. package/src/api/service/core/PrompterService.ts +0 -42
  490. package/src/api/service/core/SecretService.ts +0 -27
  491. package/src/api/service/core/ShutdownService.ts +0 -27
  492. package/src/api/service/core/SyntaxHighlighterService.ts +0 -54
  493. package/src/api/service/core/Table.ts +0 -67
  494. package/src/api/service/core/TableGeneratorService.ts +0 -39
  495. package/src/api/service/core/TreePrinterService.ts +0 -10
  496. package/src/runtime/registry/CommandRegistry.ts +0 -116
  497. package/src/runtime/registry/ServiceProviderRegistry.ts +0 -11
  498. /package/dist/src/{api → cli}/BaseCLIFeatureOptions.d.ts +0 -0
  499. /package/dist/src/{api → cli}/BaseCLIFeatureOptions.js +0 -0
  500. /package/src/{api → cli}/BaseCLIFeatureOptions.ts +0 -0
@@ -1,32 +0,0 @@
1
- import type { ArgumentValueType } from "./ArgumentValueTypes.ts";
2
- import type SubCommandArgument from "./SubCommandArgument.ts";
3
-
4
- /**
5
- * Interface for {@link SubCommand} option arguments.
6
- */
7
- export default interface Option extends SubCommandArgument {
8
- /**
9
- * Optional short alias for the option.
10
- *
11
- * Must consist of a single alphanumeric non-whitespace ASCII character.
12
- */
13
- readonly shortAlias?: string;
14
-
15
- /**
16
- * Default value for the argument if not specified.
17
- */
18
- readonly defaultValue?: ArgumentValueType;
19
-
20
- /**
21
- * If this is `true` the option does not need to be specified nor have a default value.
22
- */
23
- readonly isOptional?: boolean;
24
-
25
- /**
26
- * If this is `true` the option can be specified multiple times and all values will be returned in an array
27
- * matching the order provided.
28
- *
29
- * NOTE: If {@link isOptional} is `false`, at least one instance of the option must be specified.
30
- */
31
- readonly isArray?: boolean;
32
- }
@@ -1,27 +0,0 @@
1
- import type SubCommandArgument from "./SubCommandArgument.ts";
2
-
3
- /**
4
- * Interface for {@link SubCommand} positional arguments.
5
- */
6
- export default interface Positional extends SubCommandArgument {
7
- /**
8
- * If this is `true` the argument can be specified one or multiple times and all values will be returned in
9
- * an array matching the order provided.
10
- *
11
- * NOTE: If {@link isVarargOptional} is `true`, the argument can specified zero, one or multiple times.
12
- *
13
- * NOTE: There can be only one positional with this set and it must be the last the last item if there
14
- * are multiple positionals defined.
15
- */
16
- readonly isVarargMultiple?: boolean;
17
-
18
- /**
19
- * If this is `true` the argument can be specified zero or once i.e. it does not need to be specified.
20
- *
21
- * NOTE: If {@link isVarargMultiple} is `true`, the argument can specified zero, one or multiple times.
22
- *
23
- * NOTE: There can be only one positional with this set and it must be the last the last item if there
24
- * are multiple positionals defined.
25
- */
26
- readonly isVarargOptional?: boolean;
27
- }
@@ -1,20 +0,0 @@
1
- import type Argument from "./Argument.ts";
2
-
3
- export const MAXIMUM_ARGUMENT_ARRAY_SIZE = 255;
4
-
5
- /**
6
- * Interface to be implemented by all {@link SubCommand} arguments.
7
- */
8
- export default interface SubCommandArgument extends Argument {
9
- /**
10
- * Name of the argument.
11
- *
12
- * Must consist of alphanumeric non-whitespace ASCII or `_` and `-` characters. Cannot start with `-`.
13
- */
14
- readonly name: string;
15
-
16
- /**
17
- * Optional description of the argument.
18
- */
19
- readonly description?: string;
20
- }
@@ -1,28 +0,0 @@
1
- /**
2
- * Common interface for all command types.
3
- */
4
- export default interface Command {
5
- /**
6
- * Name of the command.
7
- *
8
- * Must consist of alphanumeric non-whitespace ASCII or `_` and `-` characters. Cannot start with `-`.
9
- */
10
- readonly name: string;
11
-
12
- /**
13
- * Optional description of the command.
14
- */
15
- readonly description?: string;
16
-
17
- /**
18
- * Optionally enable support for populating argument values via configuration. If this is `true` then
19
- * default argument values may be sourced using a configuration source provided by the CLI runtime.
20
- */
21
- readonly enableConfiguration?: boolean;
22
-
23
- /**
24
- * Optionally hide the command from generic help listings. The command remains registered and
25
- * executable, and its own usage help (`help <command>`) is still shown if explicitly requested.
26
- */
27
- readonly disableGenericHelpDisplay?: boolean;
28
- }
@@ -1,30 +0,0 @@
1
- import type Command from "./Command.ts";
2
- import type GlobalCommandArgument from "../argument/GlobalCommandArgument.ts";
3
- import type Context from "../Context.ts";
4
- import type { ArgumentSingleValueType } from "../argument/ArgumentValueTypes.ts";
5
-
6
- /**
7
- * Interface for a global command.
8
- */
9
- export default interface GlobalCommand extends Command {
10
- /**
11
- * Optional short alias for the global command.
12
- *
13
- * Must consist of a single alphanumeric non-whitespace ASCII character.
14
- */
15
- readonly shortAlias?: string;
16
-
17
- /**
18
- * Optional {@link GlobalCommandArgument} for the command.
19
- */
20
- readonly argument?: GlobalCommandArgument;
21
-
22
- /**
23
- * Execute the command.
24
- *
25
- * @param context the {@link Context} in which to execute the command.
26
- * @param argumentValue optional argument value for the command. This will be populated unless
27
- * the command's {@link GlobalCommandArgument} is optional and the argument value was not provided.
28
- */
29
- execute(context: Context, argumentValue?: ArgumentSingleValueType): Promise<void>;
30
- }
@@ -1,12 +0,0 @@
1
- import type GlobalCommand from "./GlobalCommand.ts";
2
-
3
- /**
4
- * Interface for a global modifier command.
5
- */
6
- export default interface GlobalModifierCommand extends GlobalCommand {
7
- /**
8
- * Used to determine the order in which multiple global modifier command instances
9
- * parsed from the provided arguments will be executed. Higher values will execute before lower values.
10
- */
11
- readonly executePriority: number;
12
- }
@@ -1,20 +0,0 @@
1
- import type SubCommand from "./SubCommand.ts";
2
- import type Command from "./Command.ts";
3
- import type Context from "../Context.ts";
4
-
5
- /**
6
- * Interface for a group command.
7
- */
8
- export default interface GroupCommand extends Command {
9
- /**
10
- * Array of {@link SubCommand} instances for this group command. Must contain at least one sub-command.
11
- */
12
- readonly memberSubCommands: ReadonlyArray<SubCommand>;
13
-
14
- /**
15
- * Execute the command.
16
- *
17
- * @param context the {@link Context} in which to execute the command.
18
- */
19
- execute(context: Context): Promise<void>;
20
- }
@@ -1,41 +0,0 @@
1
- import type Command from "./Command.ts";
2
- import type Option from "../argument/Option.ts";
3
- import type Positional from "../argument/Positional.ts";
4
- import type UsageExample from "./UsageExample.ts";
5
- import type ComplexOption from "../argument/ComplexOption.ts";
6
- import type { ArgumentValues } from "../argument/ArgumentValueTypes.ts";
7
- import type Context from "../Context.ts";
8
-
9
- /**
10
- * Interface for a sub-command.
11
- */
12
- export default interface SubCommand extends Command {
13
- /**
14
- * {@link Option} or {@link ComplexOption} argument definitions for the sub-command.
15
- */
16
- readonly options: ReadonlyArray<Option | ComplexOption>;
17
-
18
- /**
19
- * {@link Positional} argument definitions for the sub-command.
20
- */
21
- readonly positionals: ReadonlyArray<Positional>;
22
-
23
- /**
24
- * Optional grouping topic of the command for structuring of help output.
25
- */
26
- readonly helpTopic?: string;
27
-
28
- /**
29
- * Optional usage examples for the command to support help output.
30
- */
31
- readonly usageExamples?: ReadonlyArray<UsageExample>;
32
-
33
- /**
34
- * Execute the command.
35
- *
36
- * @param context the {@link Context} in which to execute the command.
37
- * @param argumentValues the argument values for the command. This may be empty if
38
- * the command's {@link Option} and {@link Positional} instances are all optional and no argument values were provided.
39
- */
40
- execute(context: Context, argumentValues: ArgumentValues): Promise<void>;
41
- }
@@ -1,21 +0,0 @@
1
- /**
2
- * A usage example for a {@link SubCommand} to be used in help output.
3
- */
4
- export default interface UsageExample {
5
- /**
6
- * The example arguments used to generate an example invocation.
7
- *
8
- * This should not include the CLI or command name.
9
- */
10
- readonly exampleArguments: string;
11
-
12
- /**
13
- * Optional description of the command example.
14
- */
15
- readonly description?: string;
16
-
17
- /**
18
- * Optional output result of executing the example command.
19
- */
20
- readonly output?: ReadonlyArray<string>;
21
- }
@@ -1,35 +0,0 @@
1
- import type { Plugin, ExtensionDescriptor } from "@flowscripter/dynamic-plugin-framework";
2
- import type CommandFactory from "./CommandFactory.ts";
3
- import { DYNAMIC_CLI_FRAMEWORK_COMMAND_FACTORY_EXTENSION_POINT } from "./CommandFactory.ts";
4
- import type ServiceProviderFactory from "./ServiceProviderFactory.ts";
5
- import { DYNAMIC_CLI_FRAMEWORK_SERVICE_PROVIDER_FACTORY_EXTENSION_POINT } from "./ServiceProviderFactory.ts";
6
-
7
- /**
8
- * {@link ExtensionDescriptor} for a {@link CommandFactory} extension.
9
- */
10
- export interface CommandFactoryExtensionDescriptor extends ExtensionDescriptor {
11
- readonly extensionPoint: typeof DYNAMIC_CLI_FRAMEWORK_COMMAND_FACTORY_EXTENSION_POINT;
12
- readonly factory: {
13
- create(hostData?: Map<string, string>): Promise<CommandFactory>;
14
- };
15
- }
16
-
17
- /**
18
- * {@link ExtensionDescriptor} for a {@link ServiceProviderFactory} extension.
19
- */
20
- export interface ServiceProviderFactoryExtensionDescriptor extends ExtensionDescriptor {
21
- readonly extensionPoint: typeof DYNAMIC_CLI_FRAMEWORK_SERVICE_PROVIDER_FACTORY_EXTENSION_POINT;
22
- readonly factory: {
23
- create(hostData?: Map<string, string>): Promise<ServiceProviderFactory>;
24
- };
25
- }
26
-
27
- /**
28
- * A {@link Plugin} for {@link DynamicPluginRuntimeCLI} whose {@link extensionDescriptors} are
29
- * limited to the {@link CommandFactory} and {@link ServiceProviderFactory} extension points.
30
- */
31
- export default interface CLIPlugin extends Plugin {
32
- readonly extensionDescriptors: ReadonlyArray<
33
- CommandFactoryExtensionDescriptor | ServiceProviderFactoryExtensionDescriptor
34
- >;
35
- }
@@ -1,25 +0,0 @@
1
- import type Command from "../command/Command.ts";
2
-
3
- /**
4
- * Extension point identifier for {@link CommandFactory} extensions.
5
- *
6
- * Plugins register against this extension point to supply {@link Command} instances
7
- * that are added to the CLI before execution begins.
8
- */
9
- export const DYNAMIC_CLI_FRAMEWORK_COMMAND_FACTORY_EXTENSION_POINT =
10
- "DYNAMIC_CLI_FRAMEWORK_COMMAND_FACTORY";
11
-
12
- /**
13
- * Extension interface implemented by a plugin to provide {@link Command} instances.
14
- *
15
- * A plugin registers an {@link CommandFactory} against
16
- * {@link DYNAMIC_CLI_FRAMEWORK_COMMAND_FACTORY_EXTENSION_POINT}. On startup,
17
- * {@link DynamicPluginRuntimeCLI} instantiates each factory and adds the returned
18
- * commands to the CLI registry before the runner executes.
19
- */
20
- export default interface CommandFactory {
21
- /**
22
- * Return the {@link Command} instances provided by this factory.
23
- */
24
- getCommands(): ReadonlyArray<Command>;
25
- }
@@ -1,27 +0,0 @@
1
- import type { ServiceProvider } from "../service/ServiceProvider.ts";
2
-
3
- /**
4
- * Extension point identifier for {@link ServiceProviderFactory} extensions.
5
- *
6
- * Plugins register against this extension point to supply {@link ServiceProvider} instances
7
- * that are initialised by the runner as part of the normal service lifecycle.
8
- */
9
- export const DYNAMIC_CLI_FRAMEWORK_SERVICE_PROVIDER_FACTORY_EXTENSION_POINT =
10
- "DYNAMIC_CLI_FRAMEWORK_SERVICE_PROVIDER_FACTORY";
11
-
12
- /**
13
- * Extension interface implemented by a plugin to provide {@link ServiceProvider} instances.
14
- *
15
- * A plugin registers a {@link ServiceProviderFactory} against
16
- * {@link DYNAMIC_CLI_FRAMEWORK_SERVICE_PROVIDER_FACTORY_EXTENSION_POINT}. On startup,
17
- * {@link DynamicPluginRuntimeCLI} instantiates each factory and adds the returned
18
- * service providers to the CLI registry before the runner executes, so they participate
19
- * in the full initialization lifecycle (including {@link GlobalModifierCommand} scanning
20
- * and {@link ServiceProvider.initService}).
21
- */
22
- export default interface ServiceProviderFactory {
23
- /**
24
- * Return the {@link ServiceProvider} instances provided by this factory.
25
- */
26
- getServiceProviders(): ReadonlyArray<ServiceProvider>;
27
- }
@@ -1,47 +0,0 @@
1
- import type CommandFactory from "./CommandFactory.ts";
2
- import { DYNAMIC_CLI_FRAMEWORK_COMMAND_FACTORY_EXTENSION_POINT } from "./CommandFactory.ts";
3
- import type ServiceProviderFactory from "./ServiceProviderFactory.ts";
4
- import { DYNAMIC_CLI_FRAMEWORK_SERVICE_PROVIDER_FACTORY_EXTENSION_POINT } from "./ServiceProviderFactory.ts";
5
- import type CLIPlugin from "./CLIPlugin.ts";
6
-
7
- export interface CLIPluginOptions {
8
- readonly commandFactory?: CommandFactory | (() => Promise<CommandFactory>);
9
- readonly serviceProviderFactory?:
10
- | ServiceProviderFactory
11
- | (() => Promise<ServiceProviderFactory>);
12
- readonly pluginData?: ReadonlyMap<string, string>;
13
- }
14
-
15
- /**
16
- * Build a {@link CLIPlugin} from optional {@link CommandFactory} and {@link ServiceProviderFactory}
17
- * instances (or factory functions), without needing to hand-construct extension descriptors.
18
- */
19
- export default function createCLIPlugin(options: CLIPluginOptions): CLIPlugin {
20
- const extensionDescriptors: CLIPlugin["extensionDescriptors"][number][] = [];
21
-
22
- if (options.commandFactory) {
23
- const commandFactory = options.commandFactory;
24
- extensionDescriptors.push({
25
- extensionPoint: DYNAMIC_CLI_FRAMEWORK_COMMAND_FACTORY_EXTENSION_POINT,
26
- factory: {
27
- create: async () =>
28
- typeof commandFactory === "function" ? commandFactory() : commandFactory,
29
- },
30
- });
31
- }
32
-
33
- if (options.serviceProviderFactory) {
34
- const serviceProviderFactory = options.serviceProviderFactory;
35
- extensionDescriptors.push({
36
- extensionPoint: DYNAMIC_CLI_FRAMEWORK_SERVICE_PROVIDER_FACTORY_EXTENSION_POINT,
37
- factory: {
38
- create: async () =>
39
- typeof serviceProviderFactory === "function"
40
- ? serviceProviderFactory()
41
- : serviceProviderFactory,
42
- },
43
- });
44
- }
45
-
46
- return { extensionDescriptors, pluginData: options.pluginData };
47
- }
@@ -1,52 +0,0 @@
1
- import type Command from "../command/Command.ts";
2
- import type Context from "../Context.ts";
3
- import type CLIConfig from "../CLIConfig.ts";
4
-
5
- /**
6
- * Information regarding a service instance provided by a {@link ServiceProvider}.
7
- */
8
- export interface ServiceInfo {
9
- /**
10
- * Optional, a service in the {@link Context}.
11
- */
12
- readonly service?: unknown;
13
-
14
- /**
15
- * Zero or more {@link Command} instances related to the service which should be registered.
16
- */
17
- readonly commands: ReadonlyArray<Command>;
18
- }
19
-
20
- /**
21
- * Interface allowing a service to be provided to the CLI.
22
- */
23
- export interface ServiceProvider {
24
- /**
25
- * The ID which identifies the service provided.
26
- */
27
- readonly serviceId: string;
28
-
29
- /**
30
- * Used to determine the order in which multiple service instances will be initialised. Higher values
31
- * will be initialised before lower values.
32
- */
33
- readonly servicePriority: number;
34
-
35
- /**
36
- * Return {@link ServiceInfo} containing the service and any commands it provides which should be registered in the CLI.
37
- *
38
- * @param cliConfig the {@link CLIConfig} for the CLI.
39
- */
40
- getServiceInfo(cliConfig: CLIConfig): Promise<ServiceInfo>;
41
-
42
- /**
43
- * Initialise the service. This will be invoked AFTER any {@link GlobalModifierCommand} provided in the
44
- * {@link ServiceInfo} have been invoked (if specified as CLI arguments or CLI configuration).
45
- *
46
- * NOTE: Other services within the provided context will only have been initialised if they have a higher
47
- * {@link servicePriority} value than the current service.
48
- *
49
- * @param context the {@link Context} in which the CLI is running.
50
- */
51
- initService(context: Context): Promise<void>;
52
- }
@@ -1,8 +0,0 @@
1
- import type { ParseResult } from "../../../runtime/parser.ts";
2
-
3
- export const ARGUMENT_PROMPTER_SERVICE_ID =
4
- "@flowscripter/dynamic-cli-framework/argument-prompter-service";
5
-
6
- export default interface ArgumentPrompterService {
7
- promptForMissingArguments(parseResult: ParseResult): Promise<ParseResult>;
8
- }
@@ -1,69 +0,0 @@
1
- export const ASCII_BANNER_GENERATOR_SERVICE_ID =
2
- "@flowscripter/dynamic-cli-framework/ascii-banner-generator-service";
3
-
4
- export type ColorEffectDirection = "horizontal" | "vertical";
5
-
6
- export interface FixedColorEffect {
7
- type: "fixed";
8
- color: string; // hex "#rrggbb"
9
- }
10
-
11
- export interface GradientColorEffect {
12
- type: "gradient";
13
- colors: string[]; // 2+ hex color stops
14
- direction: ColorEffectDirection;
15
- }
16
-
17
- export interface RainbowColorEffect {
18
- type: "rainbow";
19
- spread?: number; // default 8.0
20
- frequency?: number; // default 0.3
21
- seed?: number; // default 0 = random seed
22
- direction: ColorEffectDirection;
23
- }
24
-
25
- export type ColorEffect = FixedColorEffect | GradientColorEffect | RainbowColorEffect;
26
-
27
- export interface BannerColorEffects {
28
- background?: ColorEffect;
29
- messageForeground?: ColorEffect;
30
- subMessageForeground?: ColorEffect;
31
- }
32
-
33
- export interface BannerGenerateOptions {
34
- fontName?: string;
35
- subMessage?: string;
36
- colorEffects?: BannerColorEffects;
37
- }
38
-
39
- /**
40
- * Service allowing a text string to be rendered using an ASCII banner font.
41
- */
42
- export default interface AsciiBannerGeneratorService {
43
- /**
44
- * Register a new font.
45
- *
46
- * The recommended way to load the font definition is to convert the font definition to a JSON string
47
- * (replacing newlines with `\n`) and placing in a simple JSON file: `{ "font": "<figlet font definition>" }`.
48
- * This can then be imported as follows:
49
- *
50
- * `import { font as myFont } from "./myfont.json" with { type: "json" };`
51
- *
52
- * @param fontName the name used to refer to the font.
53
- * @param fontDefinition the definition for the syntax conforming to the FIGfont format.
54
- */
55
- registerFont(fontName: string, fontDefinition: string): void;
56
-
57
- /**
58
- * Return the names of the currently registered fonts.
59
- */
60
- getRegisteredFonts(): ReadonlyArray<string>;
61
-
62
- /**
63
- * Generate an ASCII banner text for the message using the specified options.
64
- *
65
- * @param message the message to output.
66
- * @param options optional generation options.
67
- */
68
- generate(message: string, options?: BannerGenerateOptions): Promise<string>;
69
- }
@@ -1,32 +0,0 @@
1
- export const COMPLETION_SERVICE_ID = "@flowscripter/dynamic-cli-framework/completion-service";
2
-
3
- export enum ShellType {
4
- BASH = "bash",
5
- ZSH = "zsh",
6
- FISH = "fish",
7
- POWERSHELL = "powershell",
8
- }
9
-
10
- export interface CompletionItem {
11
- readonly value: string;
12
- readonly description?: string;
13
- }
14
-
15
- /**
16
- * Interface for a service providing shell auto-completion support.
17
- */
18
- export default interface CompletionService {
19
- generateCompletions(
20
- shellType: ShellType,
21
- line: string,
22
- cursorPosition: number,
23
- ): Promise<ReadonlyArray<CompletionItem>>;
24
-
25
- getBootstrapScript(shellType: ShellType, cliName: string, executablePath: string): string;
26
-
27
- getDefaultConfigPath(shellType: ShellType): string;
28
-
29
- validateShellEnvironment(shellType: ShellType): Promise<boolean>;
30
-
31
- formatCompletions(shellType: ShellType, completions: ReadonlyArray<CompletionItem>): string;
32
- }
@@ -1,27 +0,0 @@
1
- import { Buffer } from "node:buffer";
2
-
3
- export const DATA_DUMP_GENERATOR_SERVICE_ID =
4
- "@flowscripter/dynamic-cli-framework/data-dump-generator-service";
5
-
6
- export enum DumpFormat {
7
- HEX = "HEX",
8
- ASCII = "ASCII",
9
- }
10
-
11
- export interface ByteRangeColor {
12
- start: number;
13
- end: number;
14
- color: string;
15
- }
16
-
17
- export interface HexDumpGenerateOptions {
18
- format?: DumpFormat;
19
- bytesPerGroup?: number;
20
- groupsPerRow?: number;
21
- spacesBetweenGroups?: number;
22
- colorScheme?: ByteRangeColor[];
23
- }
24
-
25
- export default interface DataDumpGeneratorService {
26
- generate(data: Buffer, options?: HexDumpGenerateOptions): string;
27
- }
@@ -1,25 +0,0 @@
1
- export const IMAGE_PRINTER_SERVICE_ID = "@flowscripter/dynamic-cli-framework/image-printer-service";
2
-
3
- /**
4
- * Service for rendering images in the terminal.
5
- *
6
- * Uses the Kitty or iTerm2 graphics protocol when supported, otherwise falls back
7
- * to ANSI half-block character rendering. Terminal multiplexers (tmux, screen) always
8
- * use the ANSI fallback as they do not pass through graphics protocol escape sequences.
9
- */
10
- export default interface ImagePrinterService {
11
- /**
12
- * Render an image as a string suitable for terminal output.
13
- *
14
- * @param imageBuffer the raw image data (e.g. PNG file contents).
15
- * @param widthPercentage the percentage of terminal width to use for rendering. Defaults to 100.
16
- * @param hexFormattedBackgroundColor optional background color for transparent pixels.
17
- * This should be a valid hex formatted string e.g. "#rrggbb". If not specified,
18
- * transparent pixels show through to the terminal background.
19
- */
20
- image(
21
- imageBuffer: Uint8Array,
22
- widthPercentage?: number,
23
- hexFormattedBackgroundColor?: string,
24
- ): Promise<string>;
25
- }
@@ -1,44 +0,0 @@
1
- export const KEY_VALUE_SERVICE_ID = "@flowscripter/dynamic-cli-framework/key-value-service";
2
-
3
- /**
4
- * The sentinel prefix used to indicate a value is stored as an OS-native secret.
5
- * Values starting with this prefix are resolved via the {@link SecretService}.
6
- * This prefix is reserved and must not be used for regular key-value data.
7
- */
8
- export const SECRET_SENTINEL_PREFIX = "__SECRET__:";
9
-
10
- /**
11
- * Service providing keystore functionality for the CLI. The keystore data is scoped to the
12
- * service or {@link Command} instances accessing this service via {@link Context.getServiceById}.
13
- *
14
- * Values can optionally be stored as OS-native secrets using the `isSecret` parameter on
15
- * {@link setKey}. Secret values are stored via {@link SecretService} and only a sentinel
16
- * reference is kept in the key-value Map. The sentinel prefix `__SECRET__:` is reserved.
17
- */
18
- export default interface KeyValueService {
19
- /**
20
- * Get a value for a specified key in the keystore.
21
- * If the stored value is a secret sentinel, the actual value is retrieved from the OS secret store.
22
- */
23
- getKey(key: string): Promise<string>;
24
-
25
- /**
26
- * Set a value for a specified key in the keystore.
27
- *
28
- * @param isSecret if true, the value is stored in the OS-native secret store and a sentinel
29
- * reference is kept in the key-value Map. Requires that the service was constructed with
30
- * secret support enabled.
31
- */
32
- setKey(key: string, value: string, isSecret?: boolean): Promise<void>;
33
-
34
- /**
35
- * Check if a value for a specified key exists in the keystore.
36
- */
37
- hasKey(key: string): Promise<boolean>;
38
-
39
- /**
40
- * Delete the value for a specified key in the keystore.
41
- * If the stored value is a secret sentinel, the secret is also deleted from the OS secret store.
42
- */
43
- deleteKey(key: string): Promise<void>;
44
- }