@flowscripter/dynamic-cli-framework 1.7.5 → 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 (497) 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 -1
  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 -6
  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/util/configHelper.d.ts +4 -4
  234. package/dist/src/util/configHelper.d.ts.map +1 -1
  235. package/dist/src/util/envVarHelper.d.ts +4 -4
  236. package/dist/src/util/envVarHelper.d.ts.map +1 -1
  237. package/dist/src/util/envVarHelper.js +2 -2
  238. package/dist/src/util/helpHelper.d.ts +8 -8
  239. package/dist/src/util/helpHelper.d.ts.map +1 -1
  240. package/dist/src/util/helpHelper.js +1 -1
  241. package/dist/src/util/runnerHelper.d.ts +2 -2
  242. package/dist/src/util/runnerHelper.d.ts.map +1 -1
  243. package/dist/src/util/runnerHelper.js +1 -1
  244. package/index.ts +70 -69
  245. package/package.json +2 -1
  246. package/src/cli/BaseCLI.ts +10 -10
  247. package/src/cli/DefaultRuntimeCLI.ts +3 -3
  248. package/src/cli/DynamicPluginRuntimeCLI.ts +8 -8
  249. package/src/command/MultiCommandCliHelpCommand.ts +13 -13
  250. package/src/command/SingleCommandCliHelpCommand.ts +12 -12
  251. package/src/command/UsageCommand.ts +5 -5
  252. package/src/command/VersionCommand.ts +4 -4
  253. package/src/launcher.ts +8 -6
  254. package/src/runtime/DefaultContext.ts +2 -2
  255. package/src/runtime/argument/ArgumentTypeGuards.ts +2 -2
  256. package/src/runtime/command/CommandTypeGuards.ts +5 -5
  257. package/src/runtime/command/CommandValidator.ts +13 -13
  258. package/src/runtime/parser.ts +6 -38
  259. package/src/runtime/registry/DefaultCommandRegistry.ts +6 -6
  260. package/src/runtime/registry/DefaultServiceProviderRegistry.ts +2 -2
  261. package/src/runtime/runner.ts +13 -13
  262. package/src/runtime/scanner.ts +4 -4
  263. package/src/runtime/values/ValuePopulationResult.ts +2 -2
  264. package/src/runtime/values/argumentValueMerge.ts +3 -3
  265. package/src/runtime/values/argumentValueValidation.ts +10 -10
  266. package/src/runtime/values/globalCommandValuePopulation.ts +4 -4
  267. package/src/runtime/values/subCommandValuePopulation.ts +10 -7
  268. package/src/service/argumentPrompter/ArgumentPrompterServiceProvider.ts +5 -5
  269. package/src/service/argumentPrompter/DefaultArgumentPrompterService.ts +12 -12
  270. package/src/service/asciiBannerGenerator/AsciiBannerGeneratorServiceProvider.ts +5 -5
  271. package/src/service/asciiBannerGenerator/DefaultAsciiBannerGeneratorService.ts +2 -5
  272. package/src/service/banner/BannerServiceProvider.ts +7 -7
  273. package/src/service/banner/command/NoBannerCommand.ts +4 -4
  274. package/src/service/chiselAsciiBannerGenerator/ChiselFontAsciiBannerGeneratorService.ts +2 -2
  275. package/src/service/completion/CompletionServiceProvider.ts +14 -14
  276. package/src/service/completion/DefaultCompletionService.ts +5 -5
  277. package/src/service/completion/command/CompletionCompleteSubCommand.ts +8 -8
  278. package/src/service/completion/command/CompletionGroupCommand.ts +3 -3
  279. package/src/service/completion/command/CompletionIntegrationSubCommand.ts +8 -8
  280. package/src/service/completion/shell/ShellHandler.ts +1 -1
  281. package/src/service/completion/shell/bash.ts +1 -1
  282. package/src/service/completion/shell/fish.ts +1 -1
  283. package/src/service/completion/shell/powershell.ts +1 -1
  284. package/src/service/completion/shell/zsh.ts +1 -1
  285. package/src/service/configuration/ConfigurationServiceProvider.ts +6 -6
  286. package/src/service/configuration/DefaultKeyValueService.ts +2 -2
  287. package/src/service/configuration/DefaultSecretService.ts +1 -1
  288. package/src/service/configuration/command/ConfigCommand.ts +4 -4
  289. package/src/service/configuration/command/DumpConfigCommand.ts +6 -6
  290. package/src/service/dataDumpGenerator/DataDumpGeneratorServiceProvider.ts +6 -6
  291. package/src/service/dataDumpGenerator/DefaultDataDumpGeneratorService.ts +2 -2
  292. package/src/service/imagePrinter/DefaultImagePrinterService.ts +1 -1
  293. package/src/service/imagePrinter/ImagePrinterServiceProvider.ts +4 -4
  294. package/src/service/plugin/DefaultPluginService.ts +1 -1
  295. package/src/service/plugin/DefaultPluginServiceProvider.ts +4 -4
  296. package/src/service/plugin/command/PluginAddSubCommand.ts +8 -8
  297. package/src/service/plugin/command/PluginGroupCommand.ts +3 -3
  298. package/src/service/plugin/command/PluginListSubCommand.ts +7 -7
  299. package/src/service/plugin/command/PluginRemoveSubCommand.ts +8 -8
  300. package/src/service/plugin/command/PluginSearchSubCommand.ts +8 -8
  301. package/src/service/plugin/command/PluginUpgradeSubCommand.ts +7 -7
  302. package/src/service/prettyPrinter/DefaultPrettyPrinterService.ts +3 -3
  303. package/src/service/prettyPrinter/PrettyPrinterServiceProvider.ts +4 -4
  304. package/src/service/printer/DefaultPrinterService.ts +70 -8
  305. package/src/service/printer/PrinterServiceProvider.ts +7 -7
  306. package/src/service/printer/command/DarkModeCommand.ts +4 -4
  307. package/src/service/printer/command/LogLevelCommand.ts +5 -5
  308. package/src/service/printer/command/NoColorCommand.ts +4 -4
  309. package/src/service/printer/command/NoHyperlinksCommand.ts +4 -4
  310. package/src/service/printer/terminal/Progress.ts +2 -2
  311. package/src/service/printer/terminal/Quote.ts +66 -0
  312. package/src/service/printer/terminal/Spinner.ts +2 -2
  313. package/src/service/prompter/DefaultPrompterService.ts +3 -3
  314. package/src/service/prompter/PrompterServiceProvider.ts +5 -5
  315. package/src/service/prompter/command/NoPromptCommand.ts +4 -4
  316. package/src/service/prompter/prompt/PromptContext.ts +2 -2
  317. package/src/service/prompter/prompt/promptAcknowledge.ts +1 -1
  318. package/src/service/prompter/prompt/promptMultiSelect.ts +1 -1
  319. package/src/service/prompter/prompt/promptOpenUrl.ts +1 -1
  320. package/src/service/prompter/prompt/promptSingleSelect.ts +1 -1
  321. package/src/service/prompter/prompt/promptText.ts +2 -2
  322. package/src/service/prompter/prompt/promptToggle.ts +1 -1
  323. package/src/service/shutdown/DefaultShutdownService.ts +1 -1
  324. package/src/service/shutdown/ShutdownServiceProvider.ts +5 -5
  325. package/src/service/syntaxHighlighter/DefaultSyntaxHighlighterService.ts +2 -2
  326. package/src/service/syntaxHighlighter/SyntaxHighlighterServiceProvider.ts +6 -6
  327. package/src/service/tableGenerator/DefaultTableGeneratorService.ts +4 -4
  328. package/src/service/tableGenerator/TableGeneratorServiceProvider.ts +6 -6
  329. package/src/service/treePrinter/DefaultTreePrinterService.ts +2 -2
  330. package/src/service/treePrinter/TreePrinterServiceProvider.ts +6 -6
  331. package/src/util/configHelper.ts +6 -6
  332. package/src/util/envVarHelper.ts +10 -10
  333. package/src/util/helpHelper.ts +19 -16
  334. package/src/util/runnerHelper.ts +4 -4
  335. package/dist/src/api/CLI.d.ts +0 -17
  336. package/dist/src/api/CLI.d.ts.map +0 -1
  337. package/dist/src/api/CLI.js +0 -0
  338. package/dist/src/api/CLIConfig.d.ts +0 -22
  339. package/dist/src/api/CLIConfig.d.ts.map +0 -1
  340. package/dist/src/api/CLIConfig.js +0 -0
  341. package/dist/src/api/Context.d.ts +0 -23
  342. package/dist/src/api/Context.d.ts.map +0 -1
  343. package/dist/src/api/Context.js +0 -0
  344. package/dist/src/api/RunResult.d.ts +0 -128
  345. package/dist/src/api/RunResult.d.ts.map +0 -1
  346. package/dist/src/api/RunResult.js +0 -73
  347. package/dist/src/api/argument/Argument.d.ts +0 -62
  348. package/dist/src/api/argument/Argument.d.ts.map +0 -1
  349. package/dist/src/api/argument/Argument.js +0 -0
  350. package/dist/src/api/argument/ArgumentValueTypes.d.ts +0 -68
  351. package/dist/src/api/argument/ArgumentValueTypes.d.ts.map +0 -1
  352. package/dist/src/api/argument/ArgumentValueTypes.js +0 -18
  353. package/dist/src/api/argument/ComplexOption.d.ts +0 -21
  354. package/dist/src/api/argument/ComplexOption.d.ts.map +0 -1
  355. package/dist/src/api/argument/ComplexOption.js +0 -1
  356. package/dist/src/api/argument/GlobalCommandArgument.d.ts +0 -16
  357. package/dist/src/api/argument/GlobalCommandArgument.d.ts.map +0 -1
  358. package/dist/src/api/argument/GlobalCommandArgument.js +0 -0
  359. package/dist/src/api/argument/Option.d.ts +0 -29
  360. package/dist/src/api/argument/Option.d.ts.map +0 -1
  361. package/dist/src/api/argument/Option.js +0 -0
  362. package/dist/src/api/argument/Positional.d.ts +0 -26
  363. package/dist/src/api/argument/Positional.d.ts.map +0 -1
  364. package/dist/src/api/argument/Positional.js +0 -0
  365. package/dist/src/api/argument/SubCommandArgument.d.ts +0 -18
  366. package/dist/src/api/argument/SubCommandArgument.d.ts.map +0 -1
  367. package/dist/src/api/argument/SubCommandArgument.js +0 -1
  368. package/dist/src/api/command/Command.d.ts +0 -26
  369. package/dist/src/api/command/Command.d.ts.map +0 -1
  370. package/dist/src/api/command/Command.js +0 -0
  371. package/dist/src/api/command/GlobalCommand.d.ts +0 -28
  372. package/dist/src/api/command/GlobalCommand.d.ts.map +0 -1
  373. package/dist/src/api/command/GlobalCommand.js +0 -0
  374. package/dist/src/api/command/GlobalModifierCommand.d.ts +0 -12
  375. package/dist/src/api/command/GlobalModifierCommand.d.ts.map +0 -1
  376. package/dist/src/api/command/GlobalModifierCommand.js +0 -0
  377. package/dist/src/api/command/GroupCommand.d.ts +0 -19
  378. package/dist/src/api/command/GroupCommand.d.ts.map +0 -1
  379. package/dist/src/api/command/GroupCommand.js +0 -0
  380. package/dist/src/api/command/SubCommand.d.ts +0 -37
  381. package/dist/src/api/command/SubCommand.d.ts.map +0 -1
  382. package/dist/src/api/command/SubCommand.js +0 -0
  383. package/dist/src/api/command/UsageExample.d.ts +0 -20
  384. package/dist/src/api/command/UsageExample.d.ts.map +0 -1
  385. package/dist/src/api/command/UsageExample.js +0 -0
  386. package/dist/src/api/plugin/CLIPlugin.d.ts +0 -31
  387. package/dist/src/api/plugin/CLIPlugin.d.ts.map +0 -1
  388. package/dist/src/api/plugin/CLIPlugin.js +0 -2
  389. package/dist/src/api/plugin/CommandFactory.d.ts +0 -23
  390. package/dist/src/api/plugin/CommandFactory.d.ts.map +0 -1
  391. package/dist/src/api/plugin/CommandFactory.js +0 -7
  392. package/dist/src/api/plugin/ServiceProviderFactory.d.ts +0 -25
  393. package/dist/src/api/plugin/ServiceProviderFactory.d.ts.map +0 -1
  394. package/dist/src/api/plugin/ServiceProviderFactory.js +0 -7
  395. package/dist/src/api/plugin/createCLIPlugin.d.ts +0 -14
  396. package/dist/src/api/plugin/createCLIPlugin.d.ts.map +0 -1
  397. package/dist/src/api/plugin/createCLIPlugin.js +0 -30
  398. package/dist/src/api/service/ServiceProvider.d.ts +0 -47
  399. package/dist/src/api/service/ServiceProvider.d.ts.map +0 -1
  400. package/dist/src/api/service/ServiceProvider.js +0 -0
  401. package/dist/src/api/service/core/ArgumentPrompterService.d.ts +0 -6
  402. package/dist/src/api/service/core/ArgumentPrompterService.d.ts.map +0 -1
  403. package/dist/src/api/service/core/ArgumentPrompterService.js +0 -1
  404. package/dist/src/api/service/core/AsciiBannerGeneratorService.d.ts +0 -59
  405. package/dist/src/api/service/core/AsciiBannerGeneratorService.d.ts.map +0 -1
  406. package/dist/src/api/service/core/AsciiBannerGeneratorService.js +0 -1
  407. package/dist/src/api/service/core/CompletionService.d.ts +0 -22
  408. package/dist/src/api/service/core/CompletionService.d.ts.map +0 -1
  409. package/dist/src/api/service/core/CompletionService.js +0 -8
  410. package/dist/src/api/service/core/DataDumpGeneratorService.d.ts +0 -22
  411. package/dist/src/api/service/core/DataDumpGeneratorService.d.ts.map +0 -1
  412. package/dist/src/api/service/core/DataDumpGeneratorService.js +0 -7
  413. package/dist/src/api/service/core/ImagePrinterService.d.ts +0 -21
  414. package/dist/src/api/service/core/ImagePrinterService.d.ts.map +0 -1
  415. package/dist/src/api/service/core/ImagePrinterService.js +0 -1
  416. package/dist/src/api/service/core/KeyValueService.d.ts +0 -40
  417. package/dist/src/api/service/core/KeyValueService.d.ts.map +0 -1
  418. package/dist/src/api/service/core/KeyValueService.js +0 -7
  419. package/dist/src/api/service/core/PluginService.d.ts +0 -55
  420. package/dist/src/api/service/core/PluginService.d.ts.map +0 -1
  421. package/dist/src/api/service/core/PluginService.js +0 -6
  422. package/dist/src/api/service/core/PrettyPrinterService.d.ts +0 -35
  423. package/dist/src/api/service/core/PrettyPrinterService.d.ts.map +0 -1
  424. package/dist/src/api/service/core/PrettyPrinterService.js +0 -1
  425. package/dist/src/api/service/core/PrinterService.d.ts +0 -339
  426. package/dist/src/api/service/core/PrinterService.d.ts.map +0 -1
  427. package/dist/src/api/service/core/PrinterService.js +0 -42
  428. package/dist/src/api/service/core/PrompterService.d.ts +0 -35
  429. package/dist/src/api/service/core/PrompterService.d.ts.map +0 -1
  430. package/dist/src/api/service/core/PrompterService.js +0 -10
  431. package/dist/src/api/service/core/SecretService.d.ts +0 -25
  432. package/dist/src/api/service/core/SecretService.d.ts.map +0 -1
  433. package/dist/src/api/service/core/SecretService.js +0 -0
  434. package/dist/src/api/service/core/ShutdownService.d.ts +0 -24
  435. package/dist/src/api/service/core/ShutdownService.d.ts.map +0 -1
  436. package/dist/src/api/service/core/ShutdownService.js +0 -1
  437. package/dist/src/api/service/core/SyntaxHighlighterService.d.ts +0 -49
  438. package/dist/src/api/service/core/SyntaxHighlighterService.d.ts.map +0 -1
  439. package/dist/src/api/service/core/SyntaxHighlighterService.js +0 -1
  440. package/dist/src/api/service/core/Table.d.ts +0 -18
  441. package/dist/src/api/service/core/Table.d.ts.map +0 -1
  442. package/dist/src/api/service/core/Table.js +0 -49
  443. package/dist/src/api/service/core/TableGeneratorService.d.ts +0 -32
  444. package/dist/src/api/service/core/TableGeneratorService.d.ts.map +0 -1
  445. package/dist/src/api/service/core/TableGeneratorService.js +0 -7
  446. package/dist/src/api/service/core/TreePrinterService.d.ts +0 -9
  447. package/dist/src/api/service/core/TreePrinterService.d.ts.map +0 -1
  448. package/dist/src/api/service/core/TreePrinterService.js +0 -1
  449. package/dist/src/runtime/registry/CommandRegistry.d.ts +0 -89
  450. package/dist/src/runtime/registry/CommandRegistry.d.ts.map +0 -1
  451. package/dist/src/runtime/registry/CommandRegistry.js +0 -0
  452. package/dist/src/runtime/registry/ServiceProviderRegistry.d.ts +0 -11
  453. package/dist/src/runtime/registry/ServiceProviderRegistry.d.ts.map +0 -1
  454. package/dist/src/runtime/registry/ServiceProviderRegistry.js +0 -0
  455. package/src/api/CLI.ts +0 -17
  456. package/src/api/CLIConfig.ts +0 -24
  457. package/src/api/Context.ts +0 -25
  458. package/src/api/RunResult.ts +0 -158
  459. package/src/api/argument/Argument.ts +0 -75
  460. package/src/api/argument/ArgumentValueTypes.ts +0 -80
  461. package/src/api/argument/ComplexOption.ts +0 -27
  462. package/src/api/argument/GlobalCommandArgument.ts +0 -17
  463. package/src/api/argument/Option.ts +0 -32
  464. package/src/api/argument/Positional.ts +0 -27
  465. package/src/api/argument/SubCommandArgument.ts +0 -20
  466. package/src/api/command/Command.ts +0 -28
  467. package/src/api/command/GlobalCommand.ts +0 -30
  468. package/src/api/command/GlobalModifierCommand.ts +0 -12
  469. package/src/api/command/GroupCommand.ts +0 -20
  470. package/src/api/command/SubCommand.ts +0 -41
  471. package/src/api/command/UsageExample.ts +0 -21
  472. package/src/api/plugin/CLIPlugin.ts +0 -35
  473. package/src/api/plugin/CommandFactory.ts +0 -25
  474. package/src/api/plugin/ServiceProviderFactory.ts +0 -27
  475. package/src/api/plugin/createCLIPlugin.ts +0 -47
  476. package/src/api/service/ServiceProvider.ts +0 -52
  477. package/src/api/service/core/ArgumentPrompterService.ts +0 -8
  478. package/src/api/service/core/AsciiBannerGeneratorService.ts +0 -69
  479. package/src/api/service/core/CompletionService.ts +0 -32
  480. package/src/api/service/core/DataDumpGeneratorService.ts +0 -27
  481. package/src/api/service/core/ImagePrinterService.ts +0 -25
  482. package/src/api/service/core/KeyValueService.ts +0 -44
  483. package/src/api/service/core/PluginService.ts +0 -63
  484. package/src/api/service/core/PrettyPrinterService.ts +0 -39
  485. package/src/api/service/core/PrinterService.ts +0 -400
  486. package/src/api/service/core/PrompterService.ts +0 -42
  487. package/src/api/service/core/SecretService.ts +0 -27
  488. package/src/api/service/core/ShutdownService.ts +0 -27
  489. package/src/api/service/core/SyntaxHighlighterService.ts +0 -54
  490. package/src/api/service/core/Table.ts +0 -67
  491. package/src/api/service/core/TableGeneratorService.ts +0 -39
  492. package/src/api/service/core/TreePrinterService.ts +0 -10
  493. package/src/runtime/registry/CommandRegistry.ts +0 -116
  494. package/src/runtime/registry/ServiceProviderRegistry.ts +0 -11
  495. /package/dist/src/{api → cli}/BaseCLIFeatureOptions.d.ts +0 -0
  496. /package/dist/src/{api → cli}/BaseCLIFeatureOptions.js +0 -0
  497. /package/src/{api → cli}/BaseCLIFeatureOptions.ts +0 -0
@@ -1,63 +0,0 @@
1
- import type {
2
- VersionedPluginDescriptor,
3
- SearchQuery,
4
- } from "@flowscripter/dynamic-plugin-framework";
5
-
6
- /**
7
- * Service ID for {@link PluginService}.
8
- *
9
- * Pass to {@link Context.getServiceById} to retrieve the active {@link PluginService} instance.
10
- */
11
- export const PLUGIN_SERVICE_ID = "PLUGIN_SERVICE";
12
-
13
- /**
14
- * Service providing plugin lifecycle management for a CLI with dynamic plugin support.
15
- *
16
- * Exposes search, install, uninstall, list, and update operations backed by a
17
- * {@link MarketplacePluginManager}. Provided by {@link DefaultPluginServiceProvider}
18
- * when plugin support is enabled via {@link DynamicPluginRuntimeCLI}.
19
- *
20
- * After {@link install} or an upgrade, the CLI must be restarted for new or updated
21
- * plugin commands and service providers to become active.
22
- */
23
- export default interface PluginService {
24
- /**
25
- * Search the remote marketplace for plugins matching the given query.
26
- *
27
- * @param query criteria to filter results by.
28
- * @returns an async iterable of matching {@link VersionedPluginDescriptor} entries.
29
- */
30
- search(query: Readonly<SearchQuery>): AsyncIterable<Readonly<VersionedPluginDescriptor>>;
31
-
32
- /**
33
- * Install a plugin from the remote marketplace into the local plugin store.
34
- *
35
- * @param descriptor the plugin to install, as returned by {@link search}.
36
- */
37
- install(descriptor: Readonly<VersionedPluginDescriptor>): Promise<void>;
38
-
39
- /**
40
- * Remove a previously installed plugin from the local plugin store.
41
- *
42
- * @param pluginId the package identifier of the plugin to remove (e.g. `@scope/my-plugin`).
43
- */
44
- uninstall(pluginId: string): Promise<void>;
45
-
46
- /**
47
- * List all plugins currently installed in the local plugin store.
48
- *
49
- * @returns an async iterable of {@link VersionedPluginDescriptor} entries for each installed plugin.
50
- */
51
- listInstalled(): AsyncIterable<Readonly<VersionedPluginDescriptor>>;
52
-
53
- /**
54
- * Check each installed plugin for a newer version available on the remote marketplace.
55
- *
56
- * @returns an async iterable of objects pairing the installed plugin descriptor with the
57
- * latest available version string for plugins that have an update available.
58
- */
59
- checkForUpdates(): AsyncIterable<{
60
- descriptor: Readonly<VersionedPluginDescriptor>;
61
- availableVersion: string;
62
- }>;
63
- }
@@ -1,39 +0,0 @@
1
- export const PRETTY_PRINTER_SERVICE_ID =
2
- "@flowscripter/dynamic-cli-framework/pretty-printer-service";
3
-
4
- import type { Plugin } from "prettier";
5
-
6
- /**
7
- * Service providing syntax based pretty printing of text for the CLI using [prettier](https://github.com/prettier/prettier).
8
- */
9
- export default interface PrettyPrinterService {
10
- /**
11
- * Register a new syntax.
12
- *
13
- * The recommended way to define a new language syntax plugin is to follow the instructions here:
14
- *
15
- * https://prettier.io/docs/plugins#developing-plugins
16
- *
17
- * There is a list of already defined languages available for import here:
18
- *
19
- * * https://prettier.io/docs/
20
- * * https://prettier.io/docs/plugins
21
- *
22
- * @param syntaxName the name used to refer to the syntax.
23
- * @param syntaxDefinition the definition for the syntax conforming to the Prettier plugin interface.
24
- */
25
- registerSyntax(syntaxName: string, syntaxDefinition: Plugin<unknown>): Promise<void>;
26
-
27
- /**
28
- * Return the names of the currently registered syntaxes.
29
- */
30
- getRegisteredSyntaxes(): Promise<ReadonlyArray<string>>;
31
-
32
- /**
33
- * Return a pretty printed version of the provided text using the specified syntax.
34
- *
35
- * @param text the text to prettify.
36
- * @param syntaxName the syntax to use.
37
- */
38
- prettify(text: string, syntaxName: string): Promise<string>;
39
- }
@@ -1,400 +0,0 @@
1
- export const PRINTER_SERVICE_ID = "@flowscripter/dynamic-cli-framework/printer-service";
2
- import { WritableStream } from "node:stream/web";
3
-
4
- /**
5
- * Enum of message importance level.
6
- */
7
- export enum Level {
8
- DEBUG = 0,
9
- INFO = 1,
10
- WARN = 2,
11
- ERROR = 3,
12
- }
13
-
14
- /**
15
- * Enum of spinner animation styles.
16
- */
17
- export enum SpinnerStyle {
18
- BOX = "BOX",
19
- STAR = "STAR",
20
- }
21
-
22
- /**
23
- * Enum of progress bar rendering styles.
24
- */
25
- export enum ProgressStyle {
26
- STROKE = "STROKE",
27
- FILL = "FILL",
28
- }
29
-
30
- /**
31
- * Enum of message icons.
32
- */
33
- export enum Icon {
34
- // Will be displayed in green if {@link Printer.colorEnabled} is `true`.
35
- SUCCESS = 0,
36
- // Will be displayed in red if {@link Printer.colorEnabled} is `true`.
37
- FAILURE = 1,
38
- // Will be displayed in yellow if {@link Printer.colorEnabled} is `true`.
39
- ALERT = 2,
40
- // Will be displayed in blue if {@link Printer.colorEnabled} is `true`.
41
- INFORMATION = 3,
42
- }
43
-
44
- /**
45
- * Service allowing a {@link Command} to output user messages to `stdout` and/or `stderr`.
46
- *
47
- * Output to `stdout` is via {@link print} whilst output to `stderr` is via a filtered logging mechanism
48
- * using {@link debug}, {@link info}, {@link warn} and {@link error}.
49
- */
50
- export default interface PrinterService {
51
- /**
52
- * Disable or enable color output for messages.
53
- */
54
- colorEnabled: boolean;
55
-
56
- /**
57
- * Disable or enable hyperlink output for messages.
58
- */
59
- hyperlinksEnabled: boolean;
60
-
61
- /**
62
- * Enable or disable dark mode. Default is disabled i.e. `false`.
63
- */
64
- darkMode: boolean;
65
-
66
- /**
67
- * The WritableStream used for `stdout`. Can be accessed directly for output of binary data etc.
68
- */
69
- stdoutWritable: WritableStream;
70
-
71
- /**
72
- * The WritableStream used for `stderr`. Can be accessed directly for output of binary data etc.
73
- */
74
- stderrWritable: WritableStream;
75
-
76
- /**
77
- * Return the provided message so that the foreground is colored as primary content. This is the default
78
- * calor applied. The actual color will depend on the value of {@link darkMode}.
79
- * Has no effect if {@link colorEnabled} is `false`.
80
- */
81
- primary(message: string): string;
82
-
83
- /**
84
- * Return the provided message so that the foreground is colored as secondary content.
85
- * The actual color will depend on the value of {@link darkMode}.
86
- * Has no effect if {@link colorEnabled} is `false`.
87
- */
88
- secondary(message: string): string;
89
-
90
- /**
91
- * Return the provided message so that the foreground is colored as emphasised content.
92
- * The actual color will depend on the value of {@link darkMode}.
93
- * Has no effect if {@link colorEnabled} is `false`.
94
- */
95
- emphasised(message: string): string;
96
-
97
- /**
98
- * Return the provided message so that the background is colored as selected content.
99
- * The actual color will depend on the value of {@link darkMode}.
100
- * Has no effect if {@link colorEnabled} is `false`.
101
- */
102
- selected(message: string): string;
103
-
104
- /**
105
- * Return the provided message so that the text is displayed in italic.
106
- */
107
- italic(message: string): string;
108
-
109
- /**
110
- * Return the provided message so that the foreground is yellow.
111
- * Has no effect if {@link colorEnabled} is `false`.
112
- */
113
- yellow(message: string): string;
114
-
115
- /**
116
- * Return the provided message so that the foreground is orange.
117
- * Has no effect if {@link colorEnabled} is `false`.
118
- */
119
- orange(message: string): string;
120
-
121
- /**
122
- * Return the provided message so that the foreground is red.
123
- * Has no effect if {@link colorEnabled} is `false`.
124
- */
125
- red(message: string): string;
126
-
127
- /**
128
- * Return the provided message so that the foreground is magenta.
129
- * Has no effect if {@link colorEnabled} is `false`.
130
- */
131
- magenta(message: string): string;
132
-
133
- /**
134
- * Return the provided message so that the foreground is violet.
135
- * Has no effect if {@link colorEnabled} is `false`.
136
- */
137
- violet(message: string): string;
138
-
139
- /**
140
- * Return the provided message so that the foreground is blue.
141
- * Has no effect if {@link colorEnabled} is `false`.
142
- */
143
- blue(message: string): string;
144
-
145
- /**
146
- * Return the provided message so that the foreground is cyan.
147
- * Has no effect if {@link colorEnabled} is `false`.
148
- */
149
- cyan(message: string): string;
150
-
151
- /**
152
- * Return the provided message so that the foreground is green.
153
- * Has no effect if {@link colorEnabled} is `false`.
154
- */
155
- green(message: string): string;
156
-
157
- /**
158
- * Return the provided message so that the foreground is the specified color.
159
- * Has no effect if {@link colorEnabled} is `false`.
160
- *
161
- * @param message the message to color.
162
- * @param hexFormattedColor the color to use. This should be a valid hex formatted string e.g. "#rrggbb".
163
- */
164
- color(message: string, hexFormattedColor: string): string;
165
-
166
- /**
167
- * Return the provided message so that the background is colored as primary content.
168
- * Has no effect if {@link colorEnabled} is `false`.
169
- */
170
- backgroundPrimary(message: string): string;
171
-
172
- /**
173
- * Return the provided message so that the background is colored as secondary content.
174
- * Has no effect if {@link colorEnabled} is `false`.
175
- */
176
- backgroundSecondary(message: string): string;
177
-
178
- /**
179
- * Return the provided message so that the background is colored as emphasised content.
180
- * Has no effect if {@link colorEnabled} is `false`.
181
- */
182
- backgroundEmphasised(message: string): string;
183
-
184
- /**
185
- * Return the provided message so that the background is colored as selected content.
186
- * Has no effect if {@link colorEnabled} is `false`.
187
- */
188
- backgroundSelected(message: string): string;
189
-
190
- /**
191
- * Return the provided message so that the background is yellow.
192
- * Has no effect if {@link colorEnabled} is `false`.
193
- */
194
- backgroundYellow(message: string): string;
195
-
196
- /**
197
- * Return the provided message so that the background is orange.
198
- * Has no effect if {@link colorEnabled} is `false`.
199
- */
200
- backgroundOrange(message: string): string;
201
-
202
- /**
203
- * Return the provided message so that the background is red.
204
- * Has no effect if {@link colorEnabled} is `false`.
205
- */
206
- backgroundRed(message: string): string;
207
-
208
- /**
209
- * Return the provided message so that the background is magenta.
210
- * Has no effect if {@link colorEnabled} is `false`.
211
- */
212
- backgroundMagenta(message: string): string;
213
-
214
- /**
215
- * Return the provided message so that the background is violet.
216
- * Has no effect if {@link colorEnabled} is `false`.
217
- */
218
- backgroundViolet(message: string): string;
219
-
220
- /**
221
- * Return the provided message so that the background is blue.
222
- * Has no effect if {@link colorEnabled} is `false`.
223
- */
224
- backgroundBlue(message: string): string;
225
-
226
- /**
227
- * Return the provided message so that the background is cyan.
228
- * Has no effect if {@link colorEnabled} is `false`.
229
- */
230
- backgroundCyan(message: string): string;
231
-
232
- /**
233
- * Return the provided message so that the background is green.
234
- * Has no effect if {@link colorEnabled} is `false`.
235
- */
236
- backgroundGreen(message: string): string;
237
-
238
- /**
239
- * Return the provided message so that the background is the specified color.
240
- * Has no effect if {@link colorEnabled} is `false`.
241
- *
242
- * @param message the message to color.
243
- * @param hexFormattedColor the color to use. This should be a valid hex formatted string e.g. "#rrggbb".
244
- */
245
- backgroundColor(message: string, hexFormattedColor: string): string;
246
-
247
- /**
248
- * Return the provided text wrapped in an OSC 8 hyperlink to the specified URL.
249
- * Has no effect if {@link hyperlinksEnabled} is `false`, in which case the text is returned unchanged.
250
- *
251
- * @param text the text to display as the hyperlink.
252
- * @param url the URL target of the hyperlink.
253
- */
254
- hyperlink(text: string, url: string): string;
255
-
256
- /**
257
- * The number of columns available on the stdout terminal.
258
- * Defaults to 80 if the terminal width cannot be determined.
259
- */
260
- stdoutColumns(): number;
261
-
262
- /**
263
- * The number of columns available on the stderr terminal.
264
- * Defaults to 80 if the terminal width cannot be determined.
265
- */
266
- stderrColumns(): number;
267
-
268
- /**
269
- * Print a message on `stdout`.
270
- * Will be displayed as primary content if {@link colorEnabled} is `true`.
271
- *
272
- * @param message the message to output.
273
- * @param icon optional icon to display with the message.
274
- */
275
- print(message: string, icon?: Icon): Promise<void>;
276
-
277
- /**
278
- * Print a {@link Level.DEBUG} level message on `stderr`.
279
- * Will be displayed as secondary content if {@link colorEnabled} is `true`.
280
- *
281
- * @param message the message to output.
282
- * @param icon optional icon to display with the message.
283
- */
284
- debug(message: string, icon?: Icon): Promise<void>;
285
-
286
- /**
287
- * Print an {@link Level.INFO} level message on `stderr`.
288
- * Will be displayed as primary content if {@link colorEnabled} is `true`.
289
- *
290
- * @param message the message to output.
291
- * @param icon optional icon to display with the message.
292
- */
293
- info(message: string, icon?: Icon): Promise<void>;
294
-
295
- /**
296
- * Print a {@link Level.WARN} level message on `stderr`.
297
- * Will be displayed as yellow content if {@link colorEnabled} is `true`.
298
- *
299
- * @param message the message to output.
300
- * @param icon optional icon to display with the message.
301
- */
302
- warn(message: string, icon?: Icon): Promise<void>;
303
-
304
- /**
305
- * Print an {@link Level.ERROR} level message on `stderr`.
306
- * Will be displayed as red content if {@link colorEnabled} is `true`.
307
- *
308
- * @param message the message to output.
309
- * @param icon optional icon to display with the message.
310
- */
311
- error(message: string, icon?: Icon): Promise<void>;
312
-
313
- /**
314
- * Set the output threshold {@link Level} for `stderr`.
315
- *
316
- * Default level is {@link Level.INFO}.
317
- *
318
- * @param level any message below this level will be filtered from output,
319
- */
320
- setLevel(level: Level): void;
321
-
322
- /**
323
- * Get the output threshold {@link Level} for `stderr`.
324
- */
325
- getLevel(): Level;
326
-
327
- /**
328
- * Display the spinner on `stderr`.
329
- *
330
- * The spinner will be displayed as emphasised content and the message will
331
- * be displayed as primary content if {@link colorEnabled} is `true`.
332
- *
333
- * NOTE: The spinner and message will be displayed at {@link Level.INFO} level.
334
- *
335
- * NOTE: If the spinner is already displayed the message will be updated to that specified.
336
- *
337
- * NOTE: If any progress bars are currently displayed they will be hidden.
338
- *
339
- * @param message the message to output after the spinner.
340
- * @param style optional spinner animation style, defaults to {@link SpinnerStyle.BOX}.
341
- */
342
- showSpinner(message: string, style?: SpinnerStyle): Promise<void>;
343
-
344
- /**
345
- * Hide the spinner.
346
- *
347
- * NOTE: Showing a progress bar will also hide the spinner.
348
- */
349
- hideSpinner(): Promise<void>;
350
-
351
- /**
352
- * Display a progress bar on `stderr`.
353
- *
354
- * The progress will be displayed in green if {@link colorEnabled} is `true`.
355
- *
356
- * NOTE: The progress bar and message will be displayed at {@link Level.INFO} level.
357
- *
358
- * NOTE: If the spinner is currently displayed it will be hidden.
359
- *
360
- * @param units the units to display for progress indication e.g. 'MB' or 'Kb'.
361
- * @param message an optional message for the progress bar.
362
- * @param total the total value which equates to 100% complete, defaults to `100`.
363
- * @param current the current value which is a portion of the total value, defaults to `0`.
364
- * @param style optional progress bar rendering style, defaults to {@link ProgressStyle.STROKE}.
365
- *
366
- * @return a handle to use when invoking {@link updateProgressBar}.
367
- */
368
- showProgressBar(
369
- units: string,
370
- message?: string,
371
- total?: number,
372
- current?: number,
373
- style?: ProgressStyle,
374
- ): Promise<number>;
375
-
376
- /**
377
- * Hides a specified progress bar.
378
- *
379
- * NOTE: Showing the spinner will also hide ALL progress bars.
380
- *
381
- * @param handle the handle referring to the progress bar to be hidden.
382
- */
383
- hideProgressBar(handle: number): Promise<void>;
384
-
385
- /**
386
- * Hides all progress bars.
387
- *
388
- * NOTE: Showing the spinner will also hide ALL progress bars.
389
- */
390
- hideAllProgressBars(): Promise<void>;
391
-
392
- /**
393
- * Update a specific progress bar.
394
- *
395
- * @param handle the handle referring to the progress bar to be updated.
396
- * @param current the current value to set on the progress bar.
397
- * @param message an optional message to set on the progress bar, if not specified the initially specified message will be displayed.
398
- */
399
- updateProgressBar(handle: number, current: number, message?: string): void;
400
- }
@@ -1,42 +0,0 @@
1
- import type { ArgumentSingleValueType } from "../../argument/ArgumentValueTypes.ts";
2
-
3
- export const PROMPTER_SERVICE_ID = "@flowscripter/dynamic-cli-framework/prompter-service";
4
-
5
- export enum PromptType {
6
- SINGLE_SELECT = 0,
7
- MULTI_SELECT = 1,
8
- ACKNOWLEDGE = 2,
9
- TOGGLE = 3,
10
- TEXT = 4,
11
- OPEN_URL = 5,
12
- }
13
-
14
- export interface PromptOption {
15
- readonly displayValue: string;
16
- readonly returnedValue: ArgumentSingleValueType;
17
- readonly min?: number;
18
- readonly max?: number;
19
- readonly validate?: (value: ArgumentSingleValueType) => string | undefined;
20
- }
21
-
22
- export interface Prompt {
23
- readonly name: string;
24
- readonly promptText: string;
25
- readonly type: PromptType;
26
- readonly description?: string;
27
- readonly defaultOption?: PromptOption;
28
- readonly options: ReadonlyArray<PromptOption>;
29
- }
30
-
31
- export interface PromptResult {
32
- readonly name: string;
33
- readonly value: ArgumentSingleValueType | ReadonlyArray<ArgumentSingleValueType>;
34
- }
35
-
36
- export default interface PrompterService {
37
- promptEnabled: boolean;
38
-
39
- prompt(prompt: Prompt): Promise<PromptResult>;
40
-
41
- promptAll(prompts: ReadonlyArray<Prompt>): Promise<ReadonlyArray<PromptResult>>;
42
- }
@@ -1,27 +0,0 @@
1
- /**
2
- * Internal service providing secret storage via OS-native credential stores.
3
- * Not registered in Context -- used internally by {@link DefaultKeyValueService}.
4
- */
5
- export default interface SecretService {
6
- /**
7
- * Store a secret value. Constructs the Bun secret name from the current scope and key.
8
- *
9
- * @returns the constructed Bun secret name (used as part of the sentinel value in the key-value Map).
10
- */
11
- setSecret(key: string, value: string): Promise<string>;
12
-
13
- /**
14
- * Retrieve a secret value by its full Bun secret name.
15
- */
16
- getSecret(bunSecretName: string): Promise<string | null>;
17
-
18
- /**
19
- * Delete a secret by its full Bun secret name.
20
- */
21
- deleteSecret(bunSecretName: string): Promise<boolean>;
22
-
23
- /**
24
- * Check if a secret exists by its full Bun secret name.
25
- */
26
- hasSecret(bunSecretName: string): Promise<boolean>;
27
- }
@@ -1,27 +0,0 @@
1
- export const SHUTDOWN_SERVICE_ID = "@flowscripter/dynamic-cli-framework/shutdown-service";
2
-
3
- /**
4
- * Service allowing registration of callbacks for CLI shutdown.
5
- */
6
- export default interface ShutdownService {
7
- /**
8
- * Register a callback to be invoked during graceful shutdown.
9
- */
10
- addShutdownListener(callback: () => Promise<void>): void;
11
-
12
- /**
13
- * Enter long-running mode where the first Ctrl-C sets a cooperative flag
14
- * instead of exiting, and a third Ctrl-C forces exit.
15
- */
16
- enterLongRunningMode(): void;
17
-
18
- /**
19
- * Leave long-running mode, restoring default single Ctrl-C exit behavior.
20
- */
21
- leaveLongRunningMode(): void;
22
-
23
- /**
24
- * True once shutdown has been requested (e.g. first Ctrl-C in long-running mode).
25
- */
26
- readonly isShutdownRequested: boolean;
27
- }
@@ -1,54 +0,0 @@
1
- import type { LanguageFn as HighlightSyntax } from "highlight.js";
2
-
3
- export const SYNTAX_HIGHLIGHTER_SERVICE_ID =
4
- "@flowscripter/dynamic-cli-framework/syntax-highlighter-service";
5
-
6
- /**
7
- * Color scheme for syntax highlighting.
8
- *
9
- * The keys are the names of the defined [highlight.js scopes](https://highlightjs.readthedocs.io/en/latest/css-classes-reference.html).
10
- *
11
- * The values are colors expressed as a hex formatted string e.g. "#rrggbb".
12
- *
13
- * The scheme does not need to list all scopes exhaustively.
14
- */
15
- export type ColorScheme = Record<string, string>;
16
-
17
- /**
18
- * Service providing syntax based color highlighting of text for the CLI using [highlight.js](https://github.com/highlightjs/highlight.js).
19
- */
20
- export default interface SyntaxHighlighterService {
21
- /**
22
- * Register a new syntax.
23
- *
24
- * The recommended way to define a new language syntax is to follow the instructions here:
25
- *
26
- * * https://highlightjs.readthedocs.io/en/latest/language-contribution.html
27
- * * https://highlightjs.readthedocs.io/en/latest/building-testing.html
28
- * * https://github.com/highlightjs/highlight.js/blob/main/docs/language-guide.rst
29
- *
30
- * There is a list of already defined languages available for import here:
31
- *
32
- * https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md
33
- *
34
- * @param syntaxName the name used to refer to the syntax.
35
- * @param syntaxDefinition the definition for the syntax conforming to the Highlight JS
36
- * language definition syntax.
37
- */
38
- registerSyntax(syntaxName: string, syntaxDefinition: HighlightSyntax): void;
39
-
40
- /**
41
- * Return the names of the currently registered syntaxes.
42
- */
43
- getRegisteredSyntaxes(): ReadonlyArray<string>;
44
-
45
- /**
46
- * Return a syntactically highlighted version of the provided text using the specified syntax.
47
- * The returned text will include appropriate color styling. An optional {@link ColorScheme} can be provided.
48
- *
49
- * @param text the text to highlight.
50
- * @param syntaxName the syntax to use.
51
- * @param colorScheme the color scheme to use.
52
- */
53
- highlight(text: string, syntaxName: string, colorScheme?: ColorScheme): string;
54
- }