@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.
- package/cli-plugin.ts +1 -104
- package/dist/cli-plugin.d.ts +1 -58
- package/dist/cli-plugin.d.ts.map +1 -1
- package/dist/cli-plugin.js +1 -25
- package/dist/index.d.ts +70 -69
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -26
- package/dist/src/cli/BaseCLI.d.ts +6 -6
- package/dist/src/cli/BaseCLI.d.ts.map +1 -1
- package/dist/src/cli/BaseCLI.js +1 -2
- package/dist/src/{api → cli}/BaseCLIFeatureOptions.d.ts.map +1 -1
- package/dist/src/cli/DefaultRuntimeCLI.d.ts +3 -3
- package/dist/src/cli/DefaultRuntimeCLI.d.ts.map +1 -1
- package/dist/src/cli/DynamicPluginRuntimeCLI.d.ts +3 -3
- package/dist/src/cli/DynamicPluginRuntimeCLI.d.ts.map +1 -1
- package/dist/src/cli/DynamicPluginRuntimeCLI.js +3 -3
- package/dist/src/command/MultiCommandCliHelpCommand.d.ts +7 -7
- package/dist/src/command/MultiCommandCliHelpCommand.d.ts.map +1 -1
- package/dist/src/command/MultiCommandCliHelpCommand.js +3 -3
- package/dist/src/command/SingleCommandCliHelpCommand.d.ts +6 -6
- package/dist/src/command/SingleCommandCliHelpCommand.d.ts.map +1 -1
- package/dist/src/command/SingleCommandCliHelpCommand.js +2 -2
- package/dist/src/command/UsageCommand.d.ts +3 -3
- package/dist/src/command/UsageCommand.d.ts.map +1 -1
- package/dist/src/command/UsageCommand.js +1 -1
- package/dist/src/command/VersionCommand.d.ts +2 -2
- package/dist/src/command/VersionCommand.d.ts.map +1 -1
- package/dist/src/command/VersionCommand.js +1 -1
- package/dist/src/launcher.d.ts +2 -5
- package/dist/src/launcher.d.ts.map +1 -1
- package/dist/src/runtime/DefaultContext.d.ts +2 -2
- package/dist/src/runtime/DefaultContext.d.ts.map +1 -1
- package/dist/src/runtime/argument/ArgumentTypeGuards.d.ts +2 -2
- package/dist/src/runtime/argument/ArgumentTypeGuards.d.ts.map +1 -1
- package/dist/src/runtime/command/CommandTypeGuards.d.ts +5 -5
- package/dist/src/runtime/command/CommandTypeGuards.d.ts.map +1 -1
- package/dist/src/runtime/command/CommandValidator.d.ts +2 -2
- package/dist/src/runtime/command/CommandValidator.d.ts.map +1 -1
- package/dist/src/runtime/command/CommandValidator.js +1 -1
- package/dist/src/runtime/parser.d.ts +3 -32
- package/dist/src/runtime/parser.d.ts.map +1 -1
- package/dist/src/runtime/registry/DefaultCommandRegistry.d.ts +6 -6
- package/dist/src/runtime/registry/DefaultCommandRegistry.d.ts.map +1 -1
- package/dist/src/runtime/registry/DefaultServiceProviderRegistry.d.ts +2 -2
- package/dist/src/runtime/registry/DefaultServiceProviderRegistry.d.ts.map +1 -1
- package/dist/src/runtime/runner.d.ts +5 -5
- package/dist/src/runtime/runner.d.ts.map +1 -1
- package/dist/src/runtime/runner.js +2 -2
- package/dist/src/runtime/scanner.d.ts +4 -4
- package/dist/src/runtime/scanner.d.ts.map +1 -1
- package/dist/src/runtime/values/ValuePopulationResult.d.ts +2 -2
- package/dist/src/runtime/values/ValuePopulationResult.d.ts.map +1 -1
- package/dist/src/runtime/values/argumentValueMerge.d.ts +1 -1
- package/dist/src/runtime/values/argumentValueMerge.d.ts.map +1 -1
- package/dist/src/runtime/values/argumentValueMerge.js +2 -2
- package/dist/src/runtime/values/argumentValueValidation.d.ts +6 -6
- package/dist/src/runtime/values/argumentValueValidation.d.ts.map +1 -1
- package/dist/src/runtime/values/argumentValueValidation.js +2 -2
- package/dist/src/runtime/values/globalCommandValuePopulation.d.ts +2 -2
- package/dist/src/runtime/values/globalCommandValuePopulation.d.ts.map +1 -1
- package/dist/src/runtime/values/globalCommandValuePopulation.js +2 -2
- package/dist/src/runtime/values/subCommandValuePopulation.d.ts +2 -2
- package/dist/src/runtime/values/subCommandValuePopulation.d.ts.map +1 -1
- package/dist/src/runtime/values/subCommandValuePopulation.js +4 -4
- package/dist/src/service/argumentPrompter/ArgumentPrompterServiceProvider.d.ts +4 -4
- package/dist/src/service/argumentPrompter/ArgumentPrompterServiceProvider.d.ts.map +1 -1
- package/dist/src/service/argumentPrompter/ArgumentPrompterServiceProvider.js +1 -1
- package/dist/src/service/argumentPrompter/DefaultArgumentPrompterService.d.ts +2 -2
- package/dist/src/service/argumentPrompter/DefaultArgumentPrompterService.d.ts.map +1 -1
- package/dist/src/service/argumentPrompter/DefaultArgumentPrompterService.js +3 -3
- package/dist/src/service/asciiBannerGenerator/AsciiBannerGeneratorServiceProvider.d.ts +3 -3
- package/dist/src/service/asciiBannerGenerator/AsciiBannerGeneratorServiceProvider.d.ts.map +1 -1
- package/dist/src/service/asciiBannerGenerator/AsciiBannerGeneratorServiceProvider.js +1 -1
- package/dist/src/service/asciiBannerGenerator/DefaultAsciiBannerGeneratorService.d.ts +2 -2
- package/dist/src/service/asciiBannerGenerator/DefaultAsciiBannerGeneratorService.d.ts.map +1 -1
- package/dist/src/service/banner/BannerServiceProvider.d.ts +3 -3
- package/dist/src/service/banner/BannerServiceProvider.d.ts.map +1 -1
- package/dist/src/service/banner/BannerServiceProvider.js +2 -2
- package/dist/src/service/banner/command/NoBannerCommand.d.ts +4 -4
- package/dist/src/service/banner/command/NoBannerCommand.d.ts.map +1 -1
- package/dist/src/service/banner/command/NoBannerCommand.js +1 -1
- package/dist/src/service/chiselAsciiBannerGenerator/ChiselFontAsciiBannerGeneratorService.d.ts +2 -2
- package/dist/src/service/chiselAsciiBannerGenerator/ChiselFontAsciiBannerGeneratorService.d.ts.map +1 -1
- package/dist/src/service/completion/CompletionServiceProvider.d.ts +5 -5
- package/dist/src/service/completion/CompletionServiceProvider.d.ts.map +1 -1
- package/dist/src/service/completion/CompletionServiceProvider.js +6 -7
- package/dist/src/service/completion/DefaultCompletionService.d.ts +3 -3
- package/dist/src/service/completion/DefaultCompletionService.d.ts.map +1 -1
- package/dist/src/service/completion/DefaultCompletionService.js +1 -1
- package/dist/src/service/completion/command/CompletionCompleteSubCommand.d.ts +5 -5
- package/dist/src/service/completion/command/CompletionCompleteSubCommand.d.ts.map +1 -1
- package/dist/src/service/completion/command/CompletionCompleteSubCommand.js +3 -3
- package/dist/src/service/completion/command/CompletionGroupCommand.d.ts +3 -3
- package/dist/src/service/completion/command/CompletionGroupCommand.d.ts.map +1 -1
- package/dist/src/service/completion/command/CompletionIntegrationSubCommand.d.ts +5 -5
- package/dist/src/service/completion/command/CompletionIntegrationSubCommand.d.ts.map +1 -1
- package/dist/src/service/completion/command/CompletionIntegrationSubCommand.js +3 -3
- package/dist/src/service/completion/shell/ShellHandler.d.ts +1 -1
- package/dist/src/service/completion/shell/ShellHandler.d.ts.map +1 -1
- package/dist/src/service/completion/shell/bash.d.ts +1 -1
- package/dist/src/service/completion/shell/bash.d.ts.map +1 -1
- package/dist/src/service/completion/shell/fish.d.ts +1 -1
- package/dist/src/service/completion/shell/fish.d.ts.map +1 -1
- package/dist/src/service/completion/shell/powershell.d.ts +1 -1
- package/dist/src/service/completion/shell/powershell.d.ts.map +1 -1
- package/dist/src/service/completion/shell/zsh.d.ts +1 -1
- package/dist/src/service/completion/shell/zsh.d.ts.map +1 -1
- package/dist/src/service/configuration/ConfigurationServiceProvider.d.ts +5 -5
- package/dist/src/service/configuration/ConfigurationServiceProvider.d.ts.map +1 -1
- package/dist/src/service/configuration/ConfigurationServiceProvider.js +1 -1
- package/dist/src/service/configuration/DefaultKeyValueService.d.ts +1 -1
- package/dist/src/service/configuration/DefaultKeyValueService.d.ts.map +1 -1
- package/dist/src/service/configuration/DefaultKeyValueService.js +1 -1
- package/dist/src/service/configuration/DefaultSecretService.d.ts +1 -1
- package/dist/src/service/configuration/DefaultSecretService.d.ts.map +1 -1
- package/dist/src/service/configuration/command/ConfigCommand.d.ts +4 -4
- package/dist/src/service/configuration/command/ConfigCommand.d.ts.map +1 -1
- package/dist/src/service/configuration/command/ConfigCommand.js +1 -1
- package/dist/src/service/configuration/command/DumpConfigCommand.d.ts +2 -2
- package/dist/src/service/configuration/command/DumpConfigCommand.d.ts.map +1 -1
- package/dist/src/service/configuration/command/DumpConfigCommand.js +2 -2
- package/dist/src/service/dataDumpGenerator/DataDumpGeneratorServiceProvider.d.ts +3 -3
- package/dist/src/service/dataDumpGenerator/DataDumpGeneratorServiceProvider.d.ts.map +1 -1
- package/dist/src/service/dataDumpGenerator/DataDumpGeneratorServiceProvider.js +2 -2
- package/dist/src/service/dataDumpGenerator/DefaultDataDumpGeneratorService.d.ts +2 -2
- package/dist/src/service/dataDumpGenerator/DefaultDataDumpGeneratorService.d.ts.map +1 -1
- package/dist/src/service/dataDumpGenerator/DefaultDataDumpGeneratorService.js +1 -1
- package/dist/src/service/imagePrinter/DefaultImagePrinterService.d.ts +1 -1
- package/dist/src/service/imagePrinter/DefaultImagePrinterService.d.ts.map +1 -1
- package/dist/src/service/imagePrinter/ImagePrinterServiceProvider.d.ts +3 -3
- package/dist/src/service/imagePrinter/ImagePrinterServiceProvider.d.ts.map +1 -1
- package/dist/src/service/imagePrinter/ImagePrinterServiceProvider.js +1 -1
- package/dist/src/service/plugin/DefaultPluginService.d.ts +1 -1
- package/dist/src/service/plugin/DefaultPluginService.d.ts.map +1 -1
- package/dist/src/service/plugin/DefaultPluginServiceProvider.d.ts +3 -3
- package/dist/src/service/plugin/DefaultPluginServiceProvider.d.ts.map +1 -1
- package/dist/src/service/plugin/DefaultPluginServiceProvider.js +1 -1
- package/dist/src/service/plugin/command/PluginAddSubCommand.d.ts +4 -4
- package/dist/src/service/plugin/command/PluginAddSubCommand.d.ts.map +1 -1
- package/dist/src/service/plugin/command/PluginAddSubCommand.js +3 -3
- package/dist/src/service/plugin/command/PluginGroupCommand.d.ts +3 -3
- package/dist/src/service/plugin/command/PluginGroupCommand.d.ts.map +1 -1
- package/dist/src/service/plugin/command/PluginListSubCommand.d.ts +3 -3
- package/dist/src/service/plugin/command/PluginListSubCommand.d.ts.map +1 -1
- package/dist/src/service/plugin/command/PluginListSubCommand.js +2 -2
- package/dist/src/service/plugin/command/PluginRemoveSubCommand.d.ts +4 -4
- package/dist/src/service/plugin/command/PluginRemoveSubCommand.d.ts.map +1 -1
- package/dist/src/service/plugin/command/PluginRemoveSubCommand.js +3 -3
- package/dist/src/service/plugin/command/PluginSearchSubCommand.d.ts +4 -4
- package/dist/src/service/plugin/command/PluginSearchSubCommand.d.ts.map +1 -1
- package/dist/src/service/plugin/command/PluginSearchSubCommand.js +3 -3
- package/dist/src/service/plugin/command/PluginUpgradeSubCommand.d.ts +3 -3
- package/dist/src/service/plugin/command/PluginUpgradeSubCommand.d.ts.map +1 -1
- package/dist/src/service/plugin/command/PluginUpgradeSubCommand.js +2 -2
- package/dist/src/service/prettyPrinter/DefaultPrettyPrinterService.d.ts +2 -2
- package/dist/src/service/prettyPrinter/DefaultPrettyPrinterService.d.ts.map +1 -1
- package/dist/src/service/prettyPrinter/PrettyPrinterServiceProvider.d.ts +3 -3
- package/dist/src/service/prettyPrinter/PrettyPrinterServiceProvider.d.ts.map +1 -1
- package/dist/src/service/prettyPrinter/PrettyPrinterServiceProvider.js +1 -1
- package/dist/src/service/printer/DefaultPrinterService.d.ts +7 -2
- package/dist/src/service/printer/DefaultPrinterService.d.ts.map +1 -1
- package/dist/src/service/printer/DefaultPrinterService.js +60 -3
- package/dist/src/service/printer/PrinterServiceProvider.d.ts +4 -4
- package/dist/src/service/printer/PrinterServiceProvider.d.ts.map +1 -1
- package/dist/src/service/printer/PrinterServiceProvider.js +2 -2
- package/dist/src/service/printer/command/DarkModeCommand.d.ts +4 -4
- package/dist/src/service/printer/command/DarkModeCommand.d.ts.map +1 -1
- package/dist/src/service/printer/command/DarkModeCommand.js +1 -1
- package/dist/src/service/printer/command/LogLevelCommand.d.ts +4 -4
- package/dist/src/service/printer/command/LogLevelCommand.d.ts.map +1 -1
- package/dist/src/service/printer/command/LogLevelCommand.js +2 -2
- package/dist/src/service/printer/command/NoColorCommand.d.ts +4 -4
- package/dist/src/service/printer/command/NoColorCommand.d.ts.map +1 -1
- package/dist/src/service/printer/command/NoColorCommand.js +1 -1
- package/dist/src/service/printer/command/NoHyperlinksCommand.d.ts +4 -4
- package/dist/src/service/printer/command/NoHyperlinksCommand.d.ts.map +1 -1
- package/dist/src/service/printer/command/NoHyperlinksCommand.js +1 -1
- package/dist/src/service/printer/terminal/Progress.d.ts +2 -2
- package/dist/src/service/printer/terminal/Progress.d.ts.map +1 -1
- package/dist/src/service/printer/terminal/Progress.js +2 -2
- package/dist/src/service/printer/terminal/Quote.d.ts +10 -0
- package/dist/src/service/printer/terminal/Quote.d.ts.map +1 -0
- package/dist/src/service/printer/terminal/Quote.js +50 -0
- package/dist/src/service/printer/terminal/Spinner.d.ts +2 -2
- package/dist/src/service/printer/terminal/Spinner.d.ts.map +1 -1
- package/dist/src/service/printer/terminal/Spinner.js +2 -2
- package/dist/src/service/prompter/DefaultPrompterService.d.ts +3 -3
- package/dist/src/service/prompter/DefaultPrompterService.d.ts.map +1 -1
- package/dist/src/service/prompter/DefaultPrompterService.js +1 -1
- package/dist/src/service/prompter/PrompterServiceProvider.d.ts +4 -4
- package/dist/src/service/prompter/PrompterServiceProvider.d.ts.map +1 -1
- package/dist/src/service/prompter/PrompterServiceProvider.js +1 -1
- package/dist/src/service/prompter/command/NoPromptCommand.d.ts +4 -4
- package/dist/src/service/prompter/command/NoPromptCommand.d.ts.map +1 -1
- package/dist/src/service/prompter/command/NoPromptCommand.js +1 -1
- package/dist/src/service/prompter/prompt/PromptContext.d.ts +2 -2
- package/dist/src/service/prompter/prompt/PromptContext.d.ts.map +1 -1
- package/dist/src/service/prompter/prompt/promptAcknowledge.d.ts +1 -1
- package/dist/src/service/prompter/prompt/promptAcknowledge.d.ts.map +1 -1
- package/dist/src/service/prompter/prompt/promptAcknowledge.js +1 -1
- package/dist/src/service/prompter/prompt/promptMultiSelect.d.ts +1 -1
- package/dist/src/service/prompter/prompt/promptMultiSelect.d.ts.map +1 -1
- package/dist/src/service/prompter/prompt/promptOpenUrl.d.ts +1 -1
- package/dist/src/service/prompter/prompt/promptOpenUrl.d.ts.map +1 -1
- package/dist/src/service/prompter/prompt/promptSingleSelect.d.ts +1 -1
- package/dist/src/service/prompter/prompt/promptSingleSelect.d.ts.map +1 -1
- package/dist/src/service/prompter/prompt/promptText.d.ts +1 -1
- package/dist/src/service/prompter/prompt/promptText.d.ts.map +1 -1
- package/dist/src/service/prompter/prompt/promptToggle.d.ts +1 -1
- package/dist/src/service/prompter/prompt/promptToggle.d.ts.map +1 -1
- package/dist/src/service/prompter/prompt/promptToggle.js +1 -1
- package/dist/src/service/shutdown/DefaultShutdownService.d.ts +1 -1
- package/dist/src/service/shutdown/DefaultShutdownService.d.ts.map +1 -1
- package/dist/src/service/shutdown/ShutdownServiceProvider.d.ts +3 -3
- package/dist/src/service/shutdown/ShutdownServiceProvider.d.ts.map +1 -1
- package/dist/src/service/shutdown/ShutdownServiceProvider.js +1 -1
- package/dist/src/service/syntaxHighlighter/DefaultSyntaxHighlighterService.d.ts +2 -2
- package/dist/src/service/syntaxHighlighter/DefaultSyntaxHighlighterService.d.ts.map +1 -1
- package/dist/src/service/syntaxHighlighter/SyntaxHighlighterServiceProvider.d.ts +3 -3
- package/dist/src/service/syntaxHighlighter/SyntaxHighlighterServiceProvider.d.ts.map +1 -1
- package/dist/src/service/syntaxHighlighter/SyntaxHighlighterServiceProvider.js +2 -2
- package/dist/src/service/tableGenerator/DefaultTableGeneratorService.d.ts +3 -3
- package/dist/src/service/tableGenerator/DefaultTableGeneratorService.d.ts.map +1 -1
- package/dist/src/service/tableGenerator/DefaultTableGeneratorService.js +2 -2
- package/dist/src/service/tableGenerator/TableGeneratorServiceProvider.d.ts +3 -3
- package/dist/src/service/tableGenerator/TableGeneratorServiceProvider.d.ts.map +1 -1
- package/dist/src/service/tableGenerator/TableGeneratorServiceProvider.js +2 -2
- package/dist/src/service/treePrinter/DefaultTreePrinterService.d.ts +2 -2
- package/dist/src/service/treePrinter/DefaultTreePrinterService.d.ts.map +1 -1
- package/dist/src/service/treePrinter/TreePrinterServiceProvider.d.ts +3 -3
- package/dist/src/service/treePrinter/TreePrinterServiceProvider.d.ts.map +1 -1
- package/dist/src/service/treePrinter/TreePrinterServiceProvider.js +2 -2
- package/dist/src/terminal/ImageRenderer.d.ts.map +1 -1
- package/dist/src/terminal/ImageRenderer.js +7 -5
- package/dist/src/util/configHelper.d.ts +4 -4
- package/dist/src/util/configHelper.d.ts.map +1 -1
- package/dist/src/util/envVarHelper.d.ts +4 -4
- package/dist/src/util/envVarHelper.d.ts.map +1 -1
- package/dist/src/util/envVarHelper.js +2 -2
- package/dist/src/util/helpHelper.d.ts +8 -8
- package/dist/src/util/helpHelper.d.ts.map +1 -1
- package/dist/src/util/helpHelper.js +1 -1
- package/dist/src/util/runnerHelper.d.ts +2 -2
- package/dist/src/util/runnerHelper.d.ts.map +1 -1
- package/dist/src/util/runnerHelper.js +1 -1
- package/index.ts +70 -69
- package/package.json +2 -1
- package/src/cli/BaseCLI.ts +10 -11
- package/src/cli/DefaultRuntimeCLI.ts +3 -3
- package/src/cli/DynamicPluginRuntimeCLI.ts +8 -8
- package/src/command/MultiCommandCliHelpCommand.ts +13 -13
- package/src/command/SingleCommandCliHelpCommand.ts +12 -12
- package/src/command/UsageCommand.ts +5 -5
- package/src/command/VersionCommand.ts +4 -4
- package/src/launcher.ts +8 -6
- package/src/runtime/DefaultContext.ts +2 -2
- package/src/runtime/argument/ArgumentTypeGuards.ts +2 -2
- package/src/runtime/command/CommandTypeGuards.ts +5 -5
- package/src/runtime/command/CommandValidator.ts +13 -13
- package/src/runtime/parser.ts +6 -38
- package/src/runtime/registry/DefaultCommandRegistry.ts +6 -6
- package/src/runtime/registry/DefaultServiceProviderRegistry.ts +2 -2
- package/src/runtime/runner.ts +13 -13
- package/src/runtime/scanner.ts +4 -4
- package/src/runtime/values/ValuePopulationResult.ts +2 -2
- package/src/runtime/values/argumentValueMerge.ts +3 -3
- package/src/runtime/values/argumentValueValidation.ts +10 -10
- package/src/runtime/values/globalCommandValuePopulation.ts +4 -4
- package/src/runtime/values/subCommandValuePopulation.ts +10 -7
- package/src/service/argumentPrompter/ArgumentPrompterServiceProvider.ts +5 -5
- package/src/service/argumentPrompter/DefaultArgumentPrompterService.ts +12 -12
- package/src/service/asciiBannerGenerator/AsciiBannerGeneratorServiceProvider.ts +5 -5
- package/src/service/asciiBannerGenerator/DefaultAsciiBannerGeneratorService.ts +2 -5
- package/src/service/banner/BannerServiceProvider.ts +7 -7
- package/src/service/banner/command/NoBannerCommand.ts +4 -4
- package/src/service/chiselAsciiBannerGenerator/ChiselFontAsciiBannerGeneratorService.ts +2 -2
- package/src/service/completion/CompletionServiceProvider.ts +14 -15
- package/src/service/completion/DefaultCompletionService.ts +5 -5
- package/src/service/completion/command/CompletionCompleteSubCommand.ts +8 -8
- package/src/service/completion/command/CompletionGroupCommand.ts +3 -3
- package/src/service/completion/command/CompletionIntegrationSubCommand.ts +8 -8
- package/src/service/completion/shell/ShellHandler.ts +1 -1
- package/src/service/completion/shell/bash.ts +1 -1
- package/src/service/completion/shell/fish.ts +1 -1
- package/src/service/completion/shell/powershell.ts +1 -1
- package/src/service/completion/shell/zsh.ts +1 -1
- package/src/service/configuration/ConfigurationServiceProvider.ts +6 -6
- package/src/service/configuration/DefaultKeyValueService.ts +2 -2
- package/src/service/configuration/DefaultSecretService.ts +1 -1
- package/src/service/configuration/command/ConfigCommand.ts +4 -4
- package/src/service/configuration/command/DumpConfigCommand.ts +6 -6
- package/src/service/dataDumpGenerator/DataDumpGeneratorServiceProvider.ts +6 -6
- package/src/service/dataDumpGenerator/DefaultDataDumpGeneratorService.ts +2 -2
- package/src/service/imagePrinter/DefaultImagePrinterService.ts +1 -1
- package/src/service/imagePrinter/ImagePrinterServiceProvider.ts +4 -4
- package/src/service/plugin/DefaultPluginService.ts +1 -1
- package/src/service/plugin/DefaultPluginServiceProvider.ts +4 -4
- package/src/service/plugin/command/PluginAddSubCommand.ts +8 -8
- package/src/service/plugin/command/PluginGroupCommand.ts +3 -3
- package/src/service/plugin/command/PluginListSubCommand.ts +7 -7
- package/src/service/plugin/command/PluginRemoveSubCommand.ts +8 -8
- package/src/service/plugin/command/PluginSearchSubCommand.ts +8 -8
- package/src/service/plugin/command/PluginUpgradeSubCommand.ts +7 -7
- package/src/service/prettyPrinter/DefaultPrettyPrinterService.ts +3 -3
- package/src/service/prettyPrinter/PrettyPrinterServiceProvider.ts +4 -4
- package/src/service/printer/DefaultPrinterService.ts +70 -8
- package/src/service/printer/PrinterServiceProvider.ts +7 -7
- package/src/service/printer/command/DarkModeCommand.ts +4 -4
- package/src/service/printer/command/LogLevelCommand.ts +5 -5
- package/src/service/printer/command/NoColorCommand.ts +4 -4
- package/src/service/printer/command/NoHyperlinksCommand.ts +4 -4
- package/src/service/printer/terminal/Progress.ts +2 -2
- package/src/service/printer/terminal/Quote.ts +66 -0
- package/src/service/printer/terminal/Spinner.ts +2 -2
- package/src/service/prompter/DefaultPrompterService.ts +3 -3
- package/src/service/prompter/PrompterServiceProvider.ts +5 -5
- package/src/service/prompter/command/NoPromptCommand.ts +4 -4
- package/src/service/prompter/prompt/PromptContext.ts +2 -2
- package/src/service/prompter/prompt/promptAcknowledge.ts +1 -1
- package/src/service/prompter/prompt/promptMultiSelect.ts +1 -1
- package/src/service/prompter/prompt/promptOpenUrl.ts +1 -1
- package/src/service/prompter/prompt/promptSingleSelect.ts +1 -1
- package/src/service/prompter/prompt/promptText.ts +2 -2
- package/src/service/prompter/prompt/promptToggle.ts +1 -1
- package/src/service/shutdown/DefaultShutdownService.ts +1 -1
- package/src/service/shutdown/ShutdownServiceProvider.ts +5 -5
- package/src/service/syntaxHighlighter/DefaultSyntaxHighlighterService.ts +2 -2
- package/src/service/syntaxHighlighter/SyntaxHighlighterServiceProvider.ts +6 -6
- package/src/service/tableGenerator/DefaultTableGeneratorService.ts +4 -4
- package/src/service/tableGenerator/TableGeneratorServiceProvider.ts +6 -6
- package/src/service/treePrinter/DefaultTreePrinterService.ts +2 -2
- package/src/service/treePrinter/TreePrinterServiceProvider.ts +6 -6
- package/src/terminal/ImageRenderer.ts +7 -5
- package/src/util/configHelper.ts +6 -6
- package/src/util/envVarHelper.ts +10 -10
- package/src/util/helpHelper.ts +19 -16
- package/src/util/runnerHelper.ts +4 -4
- package/dist/src/api/CLI.d.ts +0 -17
- package/dist/src/api/CLI.d.ts.map +0 -1
- package/dist/src/api/CLI.js +0 -0
- package/dist/src/api/CLIConfig.d.ts +0 -22
- package/dist/src/api/CLIConfig.d.ts.map +0 -1
- package/dist/src/api/CLIConfig.js +0 -0
- package/dist/src/api/Context.d.ts +0 -23
- package/dist/src/api/Context.d.ts.map +0 -1
- package/dist/src/api/Context.js +0 -0
- package/dist/src/api/RunResult.d.ts +0 -128
- package/dist/src/api/RunResult.d.ts.map +0 -1
- package/dist/src/api/RunResult.js +0 -73
- package/dist/src/api/argument/Argument.d.ts +0 -62
- package/dist/src/api/argument/Argument.d.ts.map +0 -1
- package/dist/src/api/argument/Argument.js +0 -0
- package/dist/src/api/argument/ArgumentValueTypes.d.ts +0 -68
- package/dist/src/api/argument/ArgumentValueTypes.d.ts.map +0 -1
- package/dist/src/api/argument/ArgumentValueTypes.js +0 -18
- package/dist/src/api/argument/ComplexOption.d.ts +0 -21
- package/dist/src/api/argument/ComplexOption.d.ts.map +0 -1
- package/dist/src/api/argument/ComplexOption.js +0 -1
- package/dist/src/api/argument/GlobalCommandArgument.d.ts +0 -16
- package/dist/src/api/argument/GlobalCommandArgument.d.ts.map +0 -1
- package/dist/src/api/argument/GlobalCommandArgument.js +0 -0
- package/dist/src/api/argument/Option.d.ts +0 -29
- package/dist/src/api/argument/Option.d.ts.map +0 -1
- package/dist/src/api/argument/Option.js +0 -0
- package/dist/src/api/argument/Positional.d.ts +0 -26
- package/dist/src/api/argument/Positional.d.ts.map +0 -1
- package/dist/src/api/argument/Positional.js +0 -0
- package/dist/src/api/argument/SubCommandArgument.d.ts +0 -18
- package/dist/src/api/argument/SubCommandArgument.d.ts.map +0 -1
- package/dist/src/api/argument/SubCommandArgument.js +0 -1
- package/dist/src/api/command/Command.d.ts +0 -26
- package/dist/src/api/command/Command.d.ts.map +0 -1
- package/dist/src/api/command/Command.js +0 -0
- package/dist/src/api/command/GlobalCommand.d.ts +0 -28
- package/dist/src/api/command/GlobalCommand.d.ts.map +0 -1
- package/dist/src/api/command/GlobalCommand.js +0 -0
- package/dist/src/api/command/GlobalModifierCommand.d.ts +0 -12
- package/dist/src/api/command/GlobalModifierCommand.d.ts.map +0 -1
- package/dist/src/api/command/GlobalModifierCommand.js +0 -0
- package/dist/src/api/command/GroupCommand.d.ts +0 -19
- package/dist/src/api/command/GroupCommand.d.ts.map +0 -1
- package/dist/src/api/command/GroupCommand.js +0 -0
- package/dist/src/api/command/SubCommand.d.ts +0 -37
- package/dist/src/api/command/SubCommand.d.ts.map +0 -1
- package/dist/src/api/command/SubCommand.js +0 -0
- package/dist/src/api/command/UsageExample.d.ts +0 -20
- package/dist/src/api/command/UsageExample.d.ts.map +0 -1
- package/dist/src/api/command/UsageExample.js +0 -0
- package/dist/src/api/plugin/CLIPlugin.d.ts +0 -31
- package/dist/src/api/plugin/CLIPlugin.d.ts.map +0 -1
- package/dist/src/api/plugin/CLIPlugin.js +0 -2
- package/dist/src/api/plugin/CommandFactory.d.ts +0 -23
- package/dist/src/api/plugin/CommandFactory.d.ts.map +0 -1
- package/dist/src/api/plugin/CommandFactory.js +0 -7
- package/dist/src/api/plugin/ServiceProviderFactory.d.ts +0 -25
- package/dist/src/api/plugin/ServiceProviderFactory.d.ts.map +0 -1
- package/dist/src/api/plugin/ServiceProviderFactory.js +0 -7
- package/dist/src/api/plugin/createCLIPlugin.d.ts +0 -14
- package/dist/src/api/plugin/createCLIPlugin.d.ts.map +0 -1
- package/dist/src/api/plugin/createCLIPlugin.js +0 -30
- package/dist/src/api/service/ServiceProvider.d.ts +0 -47
- package/dist/src/api/service/ServiceProvider.d.ts.map +0 -1
- package/dist/src/api/service/ServiceProvider.js +0 -0
- package/dist/src/api/service/core/ArgumentPrompterService.d.ts +0 -6
- package/dist/src/api/service/core/ArgumentPrompterService.d.ts.map +0 -1
- package/dist/src/api/service/core/ArgumentPrompterService.js +0 -1
- package/dist/src/api/service/core/AsciiBannerGeneratorService.d.ts +0 -59
- package/dist/src/api/service/core/AsciiBannerGeneratorService.d.ts.map +0 -1
- package/dist/src/api/service/core/AsciiBannerGeneratorService.js +0 -1
- package/dist/src/api/service/core/CompletionService.d.ts +0 -22
- package/dist/src/api/service/core/CompletionService.d.ts.map +0 -1
- package/dist/src/api/service/core/CompletionService.js +0 -8
- package/dist/src/api/service/core/DataDumpGeneratorService.d.ts +0 -22
- package/dist/src/api/service/core/DataDumpGeneratorService.d.ts.map +0 -1
- package/dist/src/api/service/core/DataDumpGeneratorService.js +0 -7
- package/dist/src/api/service/core/ImagePrinterService.d.ts +0 -21
- package/dist/src/api/service/core/ImagePrinterService.d.ts.map +0 -1
- package/dist/src/api/service/core/ImagePrinterService.js +0 -1
- package/dist/src/api/service/core/KeyValueService.d.ts +0 -40
- package/dist/src/api/service/core/KeyValueService.d.ts.map +0 -1
- package/dist/src/api/service/core/KeyValueService.js +0 -7
- package/dist/src/api/service/core/PluginService.d.ts +0 -55
- package/dist/src/api/service/core/PluginService.d.ts.map +0 -1
- package/dist/src/api/service/core/PluginService.js +0 -6
- package/dist/src/api/service/core/PrettyPrinterService.d.ts +0 -35
- package/dist/src/api/service/core/PrettyPrinterService.d.ts.map +0 -1
- package/dist/src/api/service/core/PrettyPrinterService.js +0 -1
- package/dist/src/api/service/core/PrinterService.d.ts +0 -339
- package/dist/src/api/service/core/PrinterService.d.ts.map +0 -1
- package/dist/src/api/service/core/PrinterService.js +0 -42
- package/dist/src/api/service/core/PrompterService.d.ts +0 -35
- package/dist/src/api/service/core/PrompterService.d.ts.map +0 -1
- package/dist/src/api/service/core/PrompterService.js +0 -10
- package/dist/src/api/service/core/SecretService.d.ts +0 -25
- package/dist/src/api/service/core/SecretService.d.ts.map +0 -1
- package/dist/src/api/service/core/SecretService.js +0 -0
- package/dist/src/api/service/core/ShutdownService.d.ts +0 -24
- package/dist/src/api/service/core/ShutdownService.d.ts.map +0 -1
- package/dist/src/api/service/core/ShutdownService.js +0 -1
- package/dist/src/api/service/core/SyntaxHighlighterService.d.ts +0 -49
- package/dist/src/api/service/core/SyntaxHighlighterService.d.ts.map +0 -1
- package/dist/src/api/service/core/SyntaxHighlighterService.js +0 -1
- package/dist/src/api/service/core/Table.d.ts +0 -18
- package/dist/src/api/service/core/Table.d.ts.map +0 -1
- package/dist/src/api/service/core/Table.js +0 -49
- package/dist/src/api/service/core/TableGeneratorService.d.ts +0 -32
- package/dist/src/api/service/core/TableGeneratorService.d.ts.map +0 -1
- package/dist/src/api/service/core/TableGeneratorService.js +0 -7
- package/dist/src/api/service/core/TreePrinterService.d.ts +0 -9
- package/dist/src/api/service/core/TreePrinterService.d.ts.map +0 -1
- package/dist/src/api/service/core/TreePrinterService.js +0 -1
- package/dist/src/runtime/registry/CommandRegistry.d.ts +0 -89
- package/dist/src/runtime/registry/CommandRegistry.d.ts.map +0 -1
- package/dist/src/runtime/registry/CommandRegistry.js +0 -0
- package/dist/src/runtime/registry/ServiceProviderRegistry.d.ts +0 -11
- package/dist/src/runtime/registry/ServiceProviderRegistry.d.ts.map +0 -1
- package/dist/src/runtime/registry/ServiceProviderRegistry.js +0 -0
- package/src/api/CLI.ts +0 -17
- package/src/api/CLIConfig.ts +0 -24
- package/src/api/Context.ts +0 -25
- package/src/api/RunResult.ts +0 -158
- package/src/api/argument/Argument.ts +0 -75
- package/src/api/argument/ArgumentValueTypes.ts +0 -80
- package/src/api/argument/ComplexOption.ts +0 -27
- package/src/api/argument/GlobalCommandArgument.ts +0 -17
- package/src/api/argument/Option.ts +0 -32
- package/src/api/argument/Positional.ts +0 -27
- package/src/api/argument/SubCommandArgument.ts +0 -20
- package/src/api/command/Command.ts +0 -28
- package/src/api/command/GlobalCommand.ts +0 -30
- package/src/api/command/GlobalModifierCommand.ts +0 -12
- package/src/api/command/GroupCommand.ts +0 -20
- package/src/api/command/SubCommand.ts +0 -41
- package/src/api/command/UsageExample.ts +0 -21
- package/src/api/plugin/CLIPlugin.ts +0 -35
- package/src/api/plugin/CommandFactory.ts +0 -25
- package/src/api/plugin/ServiceProviderFactory.ts +0 -27
- package/src/api/plugin/createCLIPlugin.ts +0 -47
- package/src/api/service/ServiceProvider.ts +0 -52
- package/src/api/service/core/ArgumentPrompterService.ts +0 -8
- package/src/api/service/core/AsciiBannerGeneratorService.ts +0 -69
- package/src/api/service/core/CompletionService.ts +0 -32
- package/src/api/service/core/DataDumpGeneratorService.ts +0 -27
- package/src/api/service/core/ImagePrinterService.ts +0 -25
- package/src/api/service/core/KeyValueService.ts +0 -44
- package/src/api/service/core/PluginService.ts +0 -63
- package/src/api/service/core/PrettyPrinterService.ts +0 -39
- package/src/api/service/core/PrinterService.ts +0 -400
- package/src/api/service/core/PrompterService.ts +0 -42
- package/src/api/service/core/SecretService.ts +0 -27
- package/src/api/service/core/ShutdownService.ts +0 -27
- package/src/api/service/core/SyntaxHighlighterService.ts +0 -54
- package/src/api/service/core/Table.ts +0 -67
- package/src/api/service/core/TableGeneratorService.ts +0 -39
- package/src/api/service/core/TreePrinterService.ts +0 -10
- package/src/runtime/registry/CommandRegistry.ts +0 -116
- package/src/runtime/registry/ServiceProviderRegistry.ts +0 -11
- /package/dist/src/{api → cli}/BaseCLIFeatureOptions.d.ts +0 -0
- /package/dist/src/{api → cli}/BaseCLIFeatureOptions.js +0 -0
- /package/src/{api → cli}/BaseCLIFeatureOptions.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import DefaultTreePrinterService from "./DefaultTreePrinterService.js";
|
|
2
|
-
import { TREE_PRINTER_SERVICE_ID } from "
|
|
3
|
-
import { PRINTER_SERVICE_ID } from "
|
|
2
|
+
import { TREE_PRINTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
|
+
import { PRINTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
4
4
|
export default class TreePrinterServiceProvider {
|
|
5
5
|
servicePriority;
|
|
6
6
|
serviceId = TREE_PRINTER_SERVICE_ID;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageRenderer.d.ts","sourceRoot":"","sources":["../../../src/terminal/ImageRenderer.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAG1C,MAAM,CAAC,OAAO,OAAO,aAAa;;gBAGpB,QAAQ,EAAE,QAAQ;IAI9B,WAAW,CACT,WAAW,EAAE,UAAU,EACvB,eAAe,GAAE,MAAY,EAC7B,2BAA2B,CAAC,EAAE,MAAM,GACnC,OAAO,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ImageRenderer.d.ts","sourceRoot":"","sources":["../../../src/terminal/ImageRenderer.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAG1C,MAAM,CAAC,OAAO,OAAO,aAAa;;gBAGpB,QAAQ,EAAE,QAAQ;IAI9B,WAAW,CACT,WAAW,EAAE,UAAU,EACvB,eAAe,GAAE,MAAY,EAC7B,2BAA2B,CAAC,EAAE,MAAM,GACnC,OAAO,CAAC,MAAM,CAAC;CA8JnB"}
|
|
@@ -10,12 +10,14 @@ export default class ImageRenderer {
|
|
|
10
10
|
}
|
|
11
11
|
renderImage(imageBuffer, widthPercentage = 100, hexFormattedBackgroundColor) {
|
|
12
12
|
if (!this.#isMultiplexer()) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
13
|
+
// iTerm2 only supports its own proprietary image protocol, not Kitty's, despite
|
|
14
|
+
// supports-terminal-graphics incorrectly reporting kitty:true for iTerm2 3.6+.
|
|
16
15
|
if (supportsTerminalGraphics.stdout.iterm2) {
|
|
17
16
|
return this.#renderITerm2(imageBuffer, widthPercentage);
|
|
18
17
|
}
|
|
18
|
+
if (supportsTerminalGraphics.stdout.kitty) {
|
|
19
|
+
return this.#renderKitty(imageBuffer, widthPercentage);
|
|
20
|
+
}
|
|
19
21
|
}
|
|
20
22
|
return this.#renderAnsiBlocks(imageBuffer, widthPercentage, hexFormattedBackgroundColor);
|
|
21
23
|
}
|
|
@@ -40,10 +42,10 @@ export default class ImageRenderer {
|
|
|
40
42
|
for (let i = 0; i < chunks.length; i++) {
|
|
41
43
|
const isLast = i === chunks.length - 1;
|
|
42
44
|
if (i === 0) {
|
|
43
|
-
result += `\x1b_Gf=100,a=T,c=${columns},m=${isLast ? 0 : 1};${chunks[i]}\x1b\\`;
|
|
45
|
+
result += `\x1b_Gf=100,a=T,c=${columns},q=2,m=${isLast ? 0 : 1};${chunks[i]}\x1b\\`;
|
|
44
46
|
}
|
|
45
47
|
else {
|
|
46
|
-
result += `\
|
|
48
|
+
result += `\x1b_Gq=2,m=${isLast ? 0 : 1};${chunks[i]}\x1b\\`;
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
51
|
return result;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type Command from "
|
|
2
|
-
import type CLIConfig from "
|
|
3
|
-
import type SubCommandArgument from "
|
|
4
|
-
import type GlobalCommandArgument from "
|
|
1
|
+
import type { Command } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
|
+
import type { CLIConfig } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
|
+
import type { SubCommandArgument } from "@flowscripter/dynamic-cli-framework-api";
|
|
4
|
+
import type { GlobalCommandArgument } from "@flowscripter/dynamic-cli-framework-api";
|
|
5
5
|
/**
|
|
6
6
|
* Determine the configuration key for the specified {@link SubCommandArgument}.
|
|
7
7
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configHelper.d.ts","sourceRoot":"","sources":["../../../src/util/configHelper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"configHelper.d.ts","sourceRoot":"","sources":["../../../src/util/configHelper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAgBrF;;;;;;;GAOG;AACH,wBAAgB,qCAAqC,CACnD,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,gBAAgB,EAAE,KAAK,CAAC,kBAAkB,CAAC,GAC1C,MAAM,GAAG,SAAS,CA2BpB;AAED;;;;;;GAMG;AACH,wBAAgB,wCAAwC,CACtD,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,qBAAqB,EAAE,qBAAqB,GAC3C,MAAM,GAAG,SAAS,CAcpB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type CLIConfig from "
|
|
2
|
-
import { type PopulatedArgumentSingleValueType, type PopulatedArgumentValues } from "
|
|
3
|
-
import type GlobalCommand from "
|
|
4
|
-
import type SubCommand from "
|
|
1
|
+
import type { CLIConfig } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
|
+
import { type PopulatedArgumentSingleValueType, type PopulatedArgumentValues } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
|
+
import type { GlobalCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
4
|
+
import type { SubCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
5
5
|
/**
|
|
6
6
|
* Get configured argument value for the specified {@link GlobalCommandArgument} from environment variables.
|
|
7
7
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envVarHelper.d.ts","sourceRoot":"","sources":["../../../src/util/envVarHelper.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"envVarHelper.d.ts","sourceRoot":"","sources":["../../../src/util/envVarHelper.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAGL,KAAK,gCAAgC,EACrC,KAAK,uBAAuB,EAC7B,MAAM,yCAAyC,CAAC;AAOjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AAmC1E;;;;;;GAMG;AACH,wBAAgB,gCAAgC,CAC9C,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,aAAa,GACrB,gCAAgC,CAalC;AA0ID;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAC5C,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,UAAU,GAClB,uBAAuB,GAAG,SAAS,CA6ErC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import process from "node:process";
|
|
2
|
-
import { ArgumentValueTypeName, ComplexValueTypeName, } from "
|
|
3
|
-
import { MAXIMUM_ARGUMENT_ARRAY_SIZE } from "
|
|
2
|
+
import { ArgumentValueTypeName, ComplexValueTypeName, } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
|
+
import { MAXIMUM_ARGUMENT_ARRAY_SIZE } from "@flowscripter/dynamic-cli-framework-api";
|
|
4
4
|
function getKeySegment(segment) {
|
|
5
5
|
let keySegment = segment.replace("-", "_").toUpperCase();
|
|
6
6
|
if (keySegment[0].match(/[0-9]/)) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type GlobalCommand from "
|
|
2
|
-
import type SubCommand from "
|
|
3
|
-
import type Context from "
|
|
4
|
-
import type GlobalModifierCommand from "
|
|
5
|
-
import type GroupCommand from "
|
|
6
|
-
import type CLIConfig from "
|
|
7
|
-
import type PrinterService from "
|
|
8
|
-
import type TableGeneratorService from "
|
|
1
|
+
import type { GlobalCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
|
+
import type { SubCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
|
+
import type { Context } from "@flowscripter/dynamic-cli-framework-api";
|
|
4
|
+
import type { GlobalModifierCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
5
|
+
import type { GroupCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
6
|
+
import type { CLIConfig } from "@flowscripter/dynamic-cli-framework-api";
|
|
7
|
+
import type { PrinterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
8
|
+
import type { TableGeneratorService } from "@flowscripter/dynamic-cli-framework-api";
|
|
9
9
|
export interface HelpEntry {
|
|
10
10
|
readonly syntax: string;
|
|
11
11
|
readonly description?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpHelper.d.ts","sourceRoot":"","sources":["../../../src/util/helpHelper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,aAAa,MAAM,
|
|
1
|
+
{"version":3,"file":"helpHelper.d.ts","sourceRoot":"","sources":["../../../src/util/helpHelper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAM7E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AAIvE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAM5E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAG9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAMrF,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;CAC5C;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;CACxC;AAsDD,wBAAsB,iBAAiB,CACrC,cAAc,EAAE,cAAc,EAC9B,qBAAqB,EAAE,qBAAqB,EAC5C,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,GAC3B,OAAO,CAAC,IAAI,CAAC,CA2Cf;AA8BD,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,OAAO,EACvB,aAAa,EAAE,aAAa,GAC3B,SAAS,CA6DX;AAED,wBAAgB,4BAA4B,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CA+C3E;AAkLD,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,OAAO,EACvB,UAAU,EAAE,UAAU,EACtB,kBAAkB,EAAE,OAAO,GAC1B,KAAK,CAAC,WAAW,CAAC,CAoBpB;AACD,wBAAgB,8BAA8B,CAC5C,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,GACrB,KAAK,CAAC,WAAW,CAAC,CAgCpB;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,OAAO,EAChB,sBAAsB,EAAE,aAAa,CAAC,qBAAqB,CAAC,EAC5D,cAAc,EAAE,aAAa,CAAC,aAAa,CAAC,EAC5C,aAAa,EAAE,aAAa,CAAC,YAAY,CAAC,EAC1C,WAAW,EAAE,aAAa,CAAC,UAAU,CAAC,GACrC,MAAM,CAgJR;AAED,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,aAAa,CAAC,YAAY,CAAC,EAC1C,WAAW,EAAE,aAAa,CAAC,UAAU,CAAC,GACrC,MAAM,EAAE,CAkBV"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { distance } from "fastest-levenshtein";
|
|
2
|
-
import { ArgumentValueTypeName, ComplexValueTypeName } from "
|
|
2
|
+
import { ArgumentValueTypeName, ComplexValueTypeName, } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
3
|
import { getGlobalCommandArgumentConfigurationKey, getSubCommandArgumentConfigurationKey, } from "./configHelper.js";
|
|
4
4
|
const SYNTAX_INDENT_WIDTH = 2;
|
|
5
5
|
const MINIMUM_SYNTAX_COLUMN_WIDTH = 15;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ParseResult } from "../runtime/parser.ts";
|
|
2
|
-
import type Context from "
|
|
3
|
-
import type CommandRegistry from "
|
|
2
|
+
import type { Context } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
|
+
import type { CommandRegistry } from "@flowscripter/dynamic-cli-framework-api";
|
|
4
4
|
export declare function printParseResultError(context: Context, parseResult: ParseResult, isDefaultCommand?: boolean): Promise<void>;
|
|
5
5
|
export declare function printCommandExecutionError(context: Context, parseResult: ParseResult, err: Error, isDefaultCommand?: boolean): Promise<void>;
|
|
6
6
|
export declare function printRuntimeError(context: Context, err: Error): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runnerHelper.d.ts","sourceRoot":"","sources":["../../../src/util/runnerHelper.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,KAAK,OAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"runnerHelper.d.ts","sourceRoot":"","sources":["../../../src/util/runnerHelper.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AAEvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAY/E,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,gBAAgB,UAAQ,iBAiBzB;AAED,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,GAAG,EAAE,KAAK,EACV,gBAAgB,UAAQ,iBAiBzB;AAED,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,iBAMnE;AAED,wBAAsB,4BAA4B,CAAC,OAAO,EAAE,OAAO,iBAGlE;AAED,wBAAsB,6BAA6B,CACjD,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,iBAgCrC;AAED,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,OAAO,EAChB,iBAAiB,EAAE,aAAa,CAAC,MAAM,CAAC,iBAQzC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Icon, PRINTER_SERVICE_ID } from "
|
|
1
|
+
import { Icon, PRINTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
import { isGlobalCommand, isGlobalModifierCommand } from "../runtime/command/CommandTypeGuards.js";
|
|
3
3
|
import { getInvalidArgumentString } from "../runtime/values/argumentValueValidation.js";
|
|
4
4
|
import { findPossibleCommandNames } from "./helpHelper.js";
|
package/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Argument API
|
|
2
|
-
export type {
|
|
2
|
+
export type { Argument } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
3
|
export type {
|
|
4
4
|
ArgumentSingleValueType,
|
|
5
5
|
ArgumentValues,
|
|
@@ -7,37 +7,37 @@ export type {
|
|
|
7
7
|
PopulatedArgumentSingleValueType,
|
|
8
8
|
PopulatedArgumentValues,
|
|
9
9
|
PopulatedArgumentValueType,
|
|
10
|
-
} from "
|
|
10
|
+
} from "@flowscripter/dynamic-cli-framework-api";
|
|
11
11
|
export {
|
|
12
12
|
ArgumentValueTypeName,
|
|
13
13
|
ComplexValueTypeName,
|
|
14
|
-
} from "
|
|
15
|
-
export type {
|
|
16
|
-
export { MAXIMUM_COMPLEX_OPTION_NESTING_DEPTH } from "
|
|
17
|
-
export type {
|
|
18
|
-
export { MAXIMUM_ARGUMENT_ARRAY_SIZE } from "
|
|
19
|
-
export type {
|
|
20
|
-
export type {
|
|
21
|
-
export type {
|
|
14
|
+
} from "@flowscripter/dynamic-cli-framework-api";
|
|
15
|
+
export type { ComplexOption } from "@flowscripter/dynamic-cli-framework-api";
|
|
16
|
+
export { MAXIMUM_COMPLEX_OPTION_NESTING_DEPTH } from "@flowscripter/dynamic-cli-framework-api";
|
|
17
|
+
export type { SubCommandArgument } from "@flowscripter/dynamic-cli-framework-api";
|
|
18
|
+
export { MAXIMUM_ARGUMENT_ARRAY_SIZE } from "@flowscripter/dynamic-cli-framework-api";
|
|
19
|
+
export type { GlobalCommandArgument } from "@flowscripter/dynamic-cli-framework-api";
|
|
20
|
+
export type { Option } from "@flowscripter/dynamic-cli-framework-api";
|
|
21
|
+
export type { Positional } from "@flowscripter/dynamic-cli-framework-api";
|
|
22
22
|
|
|
23
23
|
// Command API
|
|
24
|
-
export type {
|
|
25
|
-
export type {
|
|
26
|
-
export type {
|
|
27
|
-
export type {
|
|
28
|
-
export type {
|
|
29
|
-
export type {
|
|
24
|
+
export type { Command } from "@flowscripter/dynamic-cli-framework-api";
|
|
25
|
+
export type { GlobalCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
26
|
+
export type { GlobalModifierCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
27
|
+
export type { GroupCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
28
|
+
export type { SubCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
29
|
+
export type { UsageExample } from "@flowscripter/dynamic-cli-framework-api";
|
|
30
30
|
|
|
31
31
|
// Service API
|
|
32
|
-
export type { ServiceInfo, ServiceProvider } from "
|
|
32
|
+
export type { ServiceInfo, ServiceProvider } from "@flowscripter/dynamic-cli-framework-api";
|
|
33
33
|
|
|
34
34
|
// Registry API
|
|
35
|
-
export type {
|
|
36
|
-
export type {
|
|
35
|
+
export type { CommandRegistry } from "@flowscripter/dynamic-cli-framework-api";
|
|
36
|
+
export type { ServiceProviderRegistry } from "@flowscripter/dynamic-cli-framework-api";
|
|
37
37
|
|
|
38
38
|
// Core Services
|
|
39
|
-
export { ASCII_BANNER_GENERATOR_SERVICE_ID } from "
|
|
40
|
-
export type {
|
|
39
|
+
export { ASCII_BANNER_GENERATOR_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
40
|
+
export type { AsciiBannerGeneratorService } from "@flowscripter/dynamic-cli-framework-api";
|
|
41
41
|
export type {
|
|
42
42
|
BannerColorEffects,
|
|
43
43
|
BannerGenerateOptions,
|
|
@@ -46,7 +46,7 @@ export type {
|
|
|
46
46
|
FixedColorEffect,
|
|
47
47
|
GradientColorEffect,
|
|
48
48
|
RainbowColorEffect,
|
|
49
|
-
} from "
|
|
49
|
+
} from "@flowscripter/dynamic-cli-framework-api";
|
|
50
50
|
export { default as DefaultAsciiBannerGeneratorService } from "./src/service/asciiBannerGenerator/DefaultAsciiBannerGeneratorService.ts";
|
|
51
51
|
export { default as AsciiBannerGeneratorServiceProvider } from "./src/service/asciiBannerGenerator/AsciiBannerGeneratorServiceProvider.ts";
|
|
52
52
|
export { default as ChiselFontAsciiBannerGeneratorService } from "./src/service/chiselAsciiBannerGenerator/ChiselFontAsciiBannerGeneratorService.ts";
|
|
@@ -57,86 +57,86 @@ export type {
|
|
|
57
57
|
|
|
58
58
|
export { default as BannerServiceProvider } from "./src/service/banner/BannerServiceProvider.ts";
|
|
59
59
|
|
|
60
|
-
export { KEY_VALUE_SERVICE_ID } from "
|
|
61
|
-
export { SECRET_SENTINEL_PREFIX } from "
|
|
62
|
-
export type {
|
|
63
|
-
export type {
|
|
60
|
+
export { KEY_VALUE_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
61
|
+
export { SECRET_SENTINEL_PREFIX } from "@flowscripter/dynamic-cli-framework-api";
|
|
62
|
+
export type { KeyValueService } from "@flowscripter/dynamic-cli-framework-api";
|
|
63
|
+
export type { SecretService } from "@flowscripter/dynamic-cli-framework-api";
|
|
64
64
|
export { default as DefaultKeyValueService } from "./src/service/configuration/DefaultKeyValueService.ts";
|
|
65
65
|
export { default as DefaultSecretService } from "./src/service/configuration/DefaultSecretService.ts";
|
|
66
66
|
export type { SecretsApi } from "./src/service/configuration/DefaultSecretService.ts";
|
|
67
67
|
export { default as ConfigCommand } from "./src/service/configuration/command/ConfigCommand.ts";
|
|
68
68
|
export { default as ConfigurationServiceProvider } from "./src/service/configuration/ConfigurationServiceProvider.ts";
|
|
69
69
|
|
|
70
|
-
export { PRINTER_SERVICE_ID } from "
|
|
71
|
-
export type {
|
|
72
|
-
export { Icon, Level, ProgressStyle, SpinnerStyle } from "
|
|
70
|
+
export { PRINTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
71
|
+
export type { PrinterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
72
|
+
export { Icon, Level, ProgressStyle, SpinnerStyle } from "@flowscripter/dynamic-cli-framework-api";
|
|
73
73
|
export { default as DefaultPrinterService } from "./src/service/printer/DefaultPrinterService.ts";
|
|
74
74
|
export { default as PrinterServiceProvider } from "./src/service/printer/PrinterServiceProvider.ts";
|
|
75
75
|
|
|
76
|
-
export { SHUTDOWN_SERVICE_ID } from "
|
|
77
|
-
export type {
|
|
76
|
+
export { SHUTDOWN_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
77
|
+
export type { ShutdownService } from "@flowscripter/dynamic-cli-framework-api";
|
|
78
78
|
export { default as DefaultShutdownService } from "./src/service/shutdown/DefaultShutdownService.ts";
|
|
79
79
|
export { default as ShutdownServiceProvider } from "./src/service/shutdown/ShutdownServiceProvider.ts";
|
|
80
80
|
|
|
81
|
-
export { SYNTAX_HIGHLIGHTER_SERVICE_ID } from "
|
|
82
|
-
export type {
|
|
83
|
-
export type { ColorScheme } from "
|
|
81
|
+
export { SYNTAX_HIGHLIGHTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
82
|
+
export type { SyntaxHighlighterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
83
|
+
export type { ColorScheme } from "@flowscripter/dynamic-cli-framework-api";
|
|
84
84
|
export { default as DefaultSyntaxHighlighterService } from "./src/service/syntaxHighlighter/DefaultSyntaxHighlighterService.ts";
|
|
85
85
|
export { default as SyntaxHighlighterServiceProvider } from "./src/service/syntaxHighlighter/SyntaxHighlighterServiceProvider.ts";
|
|
86
86
|
|
|
87
|
-
export { PRETTY_PRINTER_SERVICE_ID } from "
|
|
88
|
-
export type {
|
|
87
|
+
export { PRETTY_PRINTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
88
|
+
export type { PrettyPrinterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
89
89
|
export { default as DefaultPrettyPrinterService } from "./src/service/prettyPrinter/DefaultPrettyPrinterService.ts";
|
|
90
90
|
export { default as PrettyPrinterServiceProvider } from "./src/service/prettyPrinter/PrettyPrinterServiceProvider.ts";
|
|
91
91
|
|
|
92
|
-
export { IMAGE_PRINTER_SERVICE_ID } from "
|
|
93
|
-
export type {
|
|
92
|
+
export { IMAGE_PRINTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
93
|
+
export type { ImagePrinterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
94
94
|
export { default as DefaultImagePrinterService } from "./src/service/imagePrinter/DefaultImagePrinterService.ts";
|
|
95
95
|
export { default as ImagePrinterServiceProvider } from "./src/service/imagePrinter/ImagePrinterServiceProvider.ts";
|
|
96
96
|
|
|
97
|
-
export { TREE_PRINTER_SERVICE_ID } from "
|
|
98
|
-
export type {
|
|
99
|
-
export type { TreeNode } from "
|
|
97
|
+
export { TREE_PRINTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
98
|
+
export type { TreePrinterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
99
|
+
export type { TreeNode } from "@flowscripter/dynamic-cli-framework-api";
|
|
100
100
|
export { default as DefaultTreePrinterService } from "./src/service/treePrinter/DefaultTreePrinterService.ts";
|
|
101
101
|
export { default as TreePrinterServiceProvider } from "./src/service/treePrinter/TreePrinterServiceProvider.ts";
|
|
102
102
|
|
|
103
|
-
export { TABLE_GENERATOR_SERVICE_ID } from "
|
|
104
|
-
export type {
|
|
103
|
+
export { TABLE_GENERATOR_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
104
|
+
export type { TableGeneratorService } from "@flowscripter/dynamic-cli-framework-api";
|
|
105
105
|
export {
|
|
106
106
|
Align,
|
|
107
107
|
type CellOptions,
|
|
108
108
|
type ColumnOptions,
|
|
109
109
|
type RowOptions,
|
|
110
110
|
type TableOptions,
|
|
111
|
-
} from "
|
|
112
|
-
export {
|
|
111
|
+
} from "@flowscripter/dynamic-cli-framework-api";
|
|
112
|
+
export { Table } from "@flowscripter/dynamic-cli-framework-api";
|
|
113
113
|
export { default as DefaultTableGeneratorService } from "./src/service/tableGenerator/DefaultTableGeneratorService.ts";
|
|
114
114
|
export { default as TableGeneratorServiceProvider } from "./src/service/tableGenerator/TableGeneratorServiceProvider.ts";
|
|
115
115
|
|
|
116
|
-
export { DATA_DUMP_GENERATOR_SERVICE_ID } from "
|
|
117
|
-
export type {
|
|
116
|
+
export { DATA_DUMP_GENERATOR_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
117
|
+
export type { DataDumpGeneratorService } from "@flowscripter/dynamic-cli-framework-api";
|
|
118
118
|
export {
|
|
119
119
|
type ByteRangeColor,
|
|
120
120
|
DumpFormat,
|
|
121
121
|
type HexDumpGenerateOptions,
|
|
122
|
-
} from "
|
|
122
|
+
} from "@flowscripter/dynamic-cli-framework-api";
|
|
123
123
|
export { default as DefaultDataDumpGeneratorService } from "./src/service/dataDumpGenerator/DefaultDataDumpGeneratorService.ts";
|
|
124
124
|
export { default as DataDumpGeneratorServiceProvider } from "./src/service/dataDumpGenerator/DataDumpGeneratorServiceProvider.ts";
|
|
125
125
|
|
|
126
|
-
export { COMPLETION_SERVICE_ID } from "
|
|
127
|
-
export type {
|
|
128
|
-
export { type CompletionItem, ShellType } from "
|
|
126
|
+
export { COMPLETION_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
127
|
+
export type { CompletionService } from "@flowscripter/dynamic-cli-framework-api";
|
|
128
|
+
export { type CompletionItem, ShellType } from "@flowscripter/dynamic-cli-framework-api";
|
|
129
129
|
export { default as DefaultCompletionService } from "./src/service/completion/DefaultCompletionService.ts";
|
|
130
130
|
export { default as CompletionServiceProvider } from "./src/service/completion/CompletionServiceProvider.ts";
|
|
131
131
|
|
|
132
|
-
export { PROMPTER_SERVICE_ID } from "
|
|
133
|
-
export type {
|
|
132
|
+
export { PROMPTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
133
|
+
export type { PrompterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
134
134
|
export {
|
|
135
135
|
type Prompt,
|
|
136
136
|
type PromptOption,
|
|
137
137
|
type PromptResult,
|
|
138
138
|
PromptType,
|
|
139
|
-
} from "
|
|
139
|
+
} from "@flowscripter/dynamic-cli-framework-api";
|
|
140
140
|
export { default as DefaultPrompterService } from "./src/service/prompter/DefaultPrompterService.ts";
|
|
141
141
|
export {
|
|
142
142
|
DEFAULT_PROMPTER_CONFIG,
|
|
@@ -144,19 +144,20 @@ export {
|
|
|
144
144
|
} from "./src/service/prompter/DefaultPrompterService.ts";
|
|
145
145
|
export { default as PrompterServiceProvider } from "./src/service/prompter/PrompterServiceProvider.ts";
|
|
146
146
|
|
|
147
|
-
export { ARGUMENT_PROMPTER_SERVICE_ID } from "
|
|
148
|
-
export type {
|
|
149
|
-
export type { ParseResult } from "
|
|
147
|
+
export { ARGUMENT_PROMPTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
148
|
+
export type { ArgumentPrompterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
149
|
+
export type { ParseResult } from "@flowscripter/dynamic-cli-framework-api";
|
|
150
150
|
export { default as DefaultArgumentPrompterService } from "./src/service/argumentPrompter/DefaultArgumentPrompterService.ts";
|
|
151
151
|
export { default as ArgumentPrompterServiceProvider } from "./src/service/argumentPrompter/ArgumentPrompterServiceProvider.ts";
|
|
152
152
|
|
|
153
153
|
// CLI API
|
|
154
|
-
export type { InvalidArgument } from "
|
|
155
|
-
export type {
|
|
156
|
-
export type {
|
|
157
|
-
export
|
|
158
|
-
export type { default as
|
|
159
|
-
export type {
|
|
154
|
+
export type { InvalidArgument } from "@flowscripter/dynamic-cli-framework-api";
|
|
155
|
+
export type { Context } from "@flowscripter/dynamic-cli-framework-api";
|
|
156
|
+
export type { RunResult } from "@flowscripter/dynamic-cli-framework-api";
|
|
157
|
+
export { InvalidArgumentReason, RunState } from "@flowscripter/dynamic-cli-framework-api";
|
|
158
|
+
export type { default as BaseCLIFeatureOptions } from "./src/cli/BaseCLIFeatureOptions.ts";
|
|
159
|
+
export type { CLIConfig } from "@flowscripter/dynamic-cli-framework-api";
|
|
160
|
+
export type { CLI } from "@flowscripter/dynamic-cli-framework-api";
|
|
160
161
|
|
|
161
162
|
// Help Commands
|
|
162
163
|
export {
|
|
@@ -169,12 +170,12 @@ export {
|
|
|
169
170
|
} from "./src/command/MultiCommandCliHelpCommand.ts";
|
|
170
171
|
|
|
171
172
|
// Plugin API
|
|
172
|
-
export type {
|
|
173
|
-
export { DYNAMIC_CLI_FRAMEWORK_COMMAND_FACTORY_EXTENSION_POINT } from "
|
|
174
|
-
export type {
|
|
175
|
-
export { DYNAMIC_CLI_FRAMEWORK_SERVICE_PROVIDER_FACTORY_EXTENSION_POINT } from "
|
|
176
|
-
export { PLUGIN_SERVICE_ID } from "
|
|
177
|
-
export type {
|
|
173
|
+
export type { CommandFactory } from "@flowscripter/dynamic-cli-framework-api";
|
|
174
|
+
export { DYNAMIC_CLI_FRAMEWORK_COMMAND_FACTORY_EXTENSION_POINT } from "@flowscripter/dynamic-cli-framework-api";
|
|
175
|
+
export type { ServiceProviderFactory } from "@flowscripter/dynamic-cli-framework-api";
|
|
176
|
+
export { DYNAMIC_CLI_FRAMEWORK_SERVICE_PROVIDER_FACTORY_EXTENSION_POINT } from "@flowscripter/dynamic-cli-framework-api";
|
|
177
|
+
export { PLUGIN_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
178
|
+
export type { PluginService } from "@flowscripter/dynamic-cli-framework-api";
|
|
178
179
|
export { default as DefaultPluginServiceProvider } from "./src/service/plugin/DefaultPluginServiceProvider.ts";
|
|
179
180
|
|
|
180
181
|
// Core CLI
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowscripter/dynamic-cli-framework",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "A framework for developing CLI applications which supports dynamic discovery and installation of new commands",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"build": "tsc -p tsconfig.build.json"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
+
"@flowscripter/dynamic-cli-framework-api": "^1.0.1",
|
|
51
52
|
"@flowscripter/dynamic-plugin-framework": "1.10.1",
|
|
52
53
|
"emphasize": "^7.0.0",
|
|
53
54
|
"fastest-levenshtein": "^1.0.16",
|
package/src/cli/BaseCLI.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type CLI from "
|
|
2
|
-
import type RunResult from "
|
|
3
|
-
import { RunState } from "
|
|
1
|
+
import type { CLI } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
|
+
import type { RunResult } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
|
+
import { RunState } from "@flowscripter/dynamic-cli-framework-api";
|
|
4
4
|
import getLogger from "../util/logger.ts";
|
|
5
5
|
import DefaultCommandRegistry from "../runtime/registry/DefaultCommandRegistry.ts";
|
|
6
|
-
import type Command from "
|
|
6
|
+
import type { Command } from "@flowscripter/dynamic-cli-framework-api";
|
|
7
7
|
import DefaultServiceProviderRegistry from "../runtime/registry/DefaultServiceProviderRegistry.ts";
|
|
8
8
|
import DefaultContext from "../runtime/DefaultContext.ts";
|
|
9
|
-
import type { ServiceProvider } from "
|
|
10
|
-
import type CLIConfig from "
|
|
11
|
-
import type SubCommand from "
|
|
12
|
-
import type GlobalCommand from "
|
|
9
|
+
import type { ServiceProvider } from "@flowscripter/dynamic-cli-framework-api";
|
|
10
|
+
import type { CLIConfig } from "@flowscripter/dynamic-cli-framework-api";
|
|
11
|
+
import type { SubCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
12
|
+
import type { GlobalCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
13
13
|
import {
|
|
14
14
|
SingleCommandCliHelpGlobalCommand,
|
|
15
15
|
SingleCommandCliHelpSubCommand,
|
|
@@ -37,11 +37,11 @@ import { printRuntimeError } from "../util/runnerHelper.ts";
|
|
|
37
37
|
|
|
38
38
|
import { WritableStream } from "node:stream/web";
|
|
39
39
|
import type Terminal from "../terminal/Terminal.ts";
|
|
40
|
-
import type PrinterService from "
|
|
40
|
+
import type { PrinterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
41
41
|
import DefaultPrinterService from "../service/printer/DefaultPrinterService.ts";
|
|
42
42
|
import type Styler from "../terminal/Styler.ts";
|
|
43
43
|
import type KeyReader from "../terminal/KeyReader.ts";
|
|
44
|
-
import type BaseCLIFeatureOptions from "
|
|
44
|
+
import type BaseCLIFeatureOptions from "./BaseCLIFeatureOptions.ts";
|
|
45
45
|
import DefaultPrompterService, {
|
|
46
46
|
DEFAULT_PROMPTER_CONFIG,
|
|
47
47
|
} from "../service/prompter/DefaultPrompterService.ts";
|
|
@@ -331,7 +331,6 @@ export default class BaseCLI implements CLI {
|
|
|
331
331
|
if (shutdownState.shutdownRequested || (error as Error).message === "Interrupted") {
|
|
332
332
|
return { runState: RunState.INTERRUPTED };
|
|
333
333
|
}
|
|
334
|
-
logger.error("Runtime error: %s", (error as Error).message);
|
|
335
334
|
await printRuntimeError(this.#context, error as Error);
|
|
336
335
|
return {
|
|
337
336
|
runState: RunState.RUNTIME_ERROR,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import process from "node:process";
|
|
2
2
|
import BaseCLI from "./BaseCLI.ts";
|
|
3
|
-
import type RunResult from "
|
|
4
|
-
import type CLIConfig from "
|
|
5
|
-
import type BaseCLIFeatureOptions from "
|
|
3
|
+
import type { RunResult } from "@flowscripter/dynamic-cli-framework-api";
|
|
4
|
+
import type { CLIConfig } from "@flowscripter/dynamic-cli-framework-api";
|
|
5
|
+
import type BaseCLIFeatureOptions from "./BaseCLIFeatureOptions.ts";
|
|
6
6
|
import { Writable } from "node:stream";
|
|
7
7
|
import TtyTerminal from "../terminal/TtyTerminal.ts";
|
|
8
8
|
import TtyKeyReader from "../terminal/TtyKeyReader.ts";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { MarketplacePluginManager } from "@flowscripter/dynamic-plugin-framework";
|
|
2
|
-
import type CLIConfig from "
|
|
3
|
-
import type BaseCLIFeatureOptions from "
|
|
4
|
-
import type RunResult from "
|
|
5
|
-
import { RunState } from "
|
|
2
|
+
import type { CLIConfig } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
|
+
import type BaseCLIFeatureOptions from "./BaseCLIFeatureOptions.ts";
|
|
4
|
+
import type { RunResult } from "@flowscripter/dynamic-cli-framework-api";
|
|
5
|
+
import { RunState } from "@flowscripter/dynamic-cli-framework-api";
|
|
6
6
|
import DefaultRuntimeCLI from "./DefaultRuntimeCLI.ts";
|
|
7
7
|
import DefaultPluginServiceProvider from "../service/plugin/DefaultPluginServiceProvider.ts";
|
|
8
|
-
import { DYNAMIC_CLI_FRAMEWORK_COMMAND_FACTORY_EXTENSION_POINT } from "
|
|
9
|
-
import { DYNAMIC_CLI_FRAMEWORK_SERVICE_PROVIDER_FACTORY_EXTENSION_POINT } from "
|
|
10
|
-
import type CommandFactory from "
|
|
11
|
-
import type ServiceProviderFactory from "
|
|
8
|
+
import { DYNAMIC_CLI_FRAMEWORK_COMMAND_FACTORY_EXTENSION_POINT } from "@flowscripter/dynamic-cli-framework-api";
|
|
9
|
+
import { DYNAMIC_CLI_FRAMEWORK_SERVICE_PROVIDER_FACTORY_EXTENSION_POINT } from "@flowscripter/dynamic-cli-framework-api";
|
|
10
|
+
import type { CommandFactory } from "@flowscripter/dynamic-cli-framework-api";
|
|
11
|
+
import type { ServiceProviderFactory } from "@flowscripter/dynamic-cli-framework-api";
|
|
12
12
|
import process from "node:process";
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type Positional from "
|
|
2
|
-
import type Option from "
|
|
3
|
-
import type SubCommand from "
|
|
4
|
-
import type GlobalCommand from "
|
|
5
|
-
import type GroupCommand from "
|
|
1
|
+
import type { Positional } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
|
+
import type { Option } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
|
+
import type { SubCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
4
|
+
import type { GlobalCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
5
|
+
import type { GroupCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
6
6
|
import {
|
|
7
7
|
type ArgumentSingleValueType,
|
|
8
8
|
type ArgumentValues,
|
|
9
9
|
ArgumentValueTypeName,
|
|
10
|
-
} from "
|
|
11
|
-
import type Context from "
|
|
10
|
+
} from "@flowscripter/dynamic-cli-framework-api";
|
|
11
|
+
import type { Context } from "@flowscripter/dynamic-cli-framework-api";
|
|
12
12
|
import type { HelpSection } from "../util/helpHelper.ts";
|
|
13
13
|
import {
|
|
14
14
|
findPossibleCommandNames,
|
|
@@ -19,12 +19,12 @@ import {
|
|
|
19
19
|
getSubCommandArgumentsSyntax,
|
|
20
20
|
printHelpSections,
|
|
21
21
|
} from "../util/helpHelper.ts";
|
|
22
|
-
import type GlobalModifierCommand from "
|
|
23
|
-
import type CommandRegistry from "
|
|
24
|
-
import type PrinterService from "
|
|
25
|
-
import { Icon, PRINTER_SERVICE_ID } from "
|
|
26
|
-
import type TableGeneratorService from "
|
|
27
|
-
import { TABLE_GENERATOR_SERVICE_ID } from "
|
|
22
|
+
import type { GlobalModifierCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
23
|
+
import type { CommandRegistry } from "@flowscripter/dynamic-cli-framework-api";
|
|
24
|
+
import type { PrinterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
25
|
+
import { Icon, PRINTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
26
|
+
import type { TableGeneratorService } from "@flowscripter/dynamic-cli-framework-api";
|
|
27
|
+
import { TABLE_GENERATOR_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Provides common implementation for both {@link MultiCommandCliHelpGlobalCommand} and {@link MultiCommandCliHelpSubCommand}.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type GlobalCommand from "
|
|
2
|
-
import type SubCommand from "
|
|
3
|
-
import type Option from "
|
|
4
|
-
import type Positional from "
|
|
5
|
-
import type Context from "
|
|
1
|
+
import type { GlobalCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
|
+
import type { SubCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
|
+
import type { Option } from "@flowscripter/dynamic-cli-framework-api";
|
|
4
|
+
import type { Positional } from "@flowscripter/dynamic-cli-framework-api";
|
|
5
|
+
import type { Context } from "@flowscripter/dynamic-cli-framework-api";
|
|
6
6
|
import {
|
|
7
7
|
getCommandArgsHelpSections,
|
|
8
8
|
getCommandExamplesHelpSections,
|
|
@@ -12,13 +12,13 @@ import {
|
|
|
12
12
|
type HelpSection,
|
|
13
13
|
printHelpSections,
|
|
14
14
|
} from "../util/helpHelper.ts";
|
|
15
|
-
import type GlobalModifierCommand from "
|
|
16
|
-
import type GroupCommand from "
|
|
17
|
-
import type CommandRegistry from "
|
|
18
|
-
import type PrinterService from "
|
|
19
|
-
import { PRINTER_SERVICE_ID } from "
|
|
20
|
-
import type TableGeneratorService from "
|
|
21
|
-
import { TABLE_GENERATOR_SERVICE_ID } from "
|
|
15
|
+
import type { GlobalModifierCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
16
|
+
import type { GroupCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
17
|
+
import type { CommandRegistry } from "@flowscripter/dynamic-cli-framework-api";
|
|
18
|
+
import type { PrinterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
19
|
+
import { PRINTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
20
|
+
import type { TableGeneratorService } from "@flowscripter/dynamic-cli-framework-api";
|
|
21
|
+
import { TABLE_GENERATOR_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Provides common implementation for both {@link SingleCommandCliHelpGlobalCommand} and {@link SingleCommandCliHelpSubCommand}.
|