@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,12 +1,12 @@
|
|
|
1
|
-
import type GlobalCommandArgument from "
|
|
1
|
+
import type { GlobalCommandArgument } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
import {
|
|
3
3
|
type ArgumentSingleValueType,
|
|
4
4
|
ArgumentValueTypeName,
|
|
5
|
-
} from "
|
|
6
|
-
import type GlobalModifierCommand from "
|
|
7
|
-
import type Context from "
|
|
5
|
+
} from "@flowscripter/dynamic-cli-framework-api";
|
|
6
|
+
import type { GlobalModifierCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
7
|
+
import type { Context } from "@flowscripter/dynamic-cli-framework-api";
|
|
8
8
|
import type PrinterServiceProvider from "../PrinterServiceProvider.ts";
|
|
9
|
-
import { Level } from "
|
|
9
|
+
import { Level } from "@flowscripter/dynamic-cli-framework-api";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Command allowing the setting of the log level for {@link PrinterServiceProvider}.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type GlobalModifierCommand from "
|
|
2
|
-
import type GlobalCommandArgument from "
|
|
1
|
+
import type { GlobalModifierCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
|
+
import type { GlobalCommandArgument } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
3
|
import {
|
|
4
4
|
type ArgumentSingleValueType,
|
|
5
5
|
ArgumentValueTypeName,
|
|
6
|
-
} from "
|
|
7
|
-
import type Context from "
|
|
6
|
+
} from "@flowscripter/dynamic-cli-framework-api";
|
|
7
|
+
import type { Context } from "@flowscripter/dynamic-cli-framework-api";
|
|
8
8
|
import type PrinterServiceProvider from "../PrinterServiceProvider.ts";
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type GlobalModifierCommand from "
|
|
2
|
-
import type GlobalCommandArgument from "
|
|
1
|
+
import type { GlobalModifierCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
|
+
import type { GlobalCommandArgument } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
3
|
import {
|
|
4
4
|
type ArgumentSingleValueType,
|
|
5
5
|
ArgumentValueTypeName,
|
|
6
|
-
} from "
|
|
7
|
-
import type Context from "
|
|
6
|
+
} from "@flowscripter/dynamic-cli-framework-api";
|
|
7
|
+
import type { Context } from "@flowscripter/dynamic-cli-framework-api";
|
|
8
8
|
import type PrinterServiceProvider from "../PrinterServiceProvider.ts";
|
|
9
9
|
|
|
10
10
|
export default class NoHyperlinksCommand implements GlobalModifierCommand {
|
|
@@ -3,8 +3,8 @@ import type Terminal from "../../../terminal/Terminal.ts";
|
|
|
3
3
|
|
|
4
4
|
const RATE_SMOOTHING_FACTOR = 0.005;
|
|
5
5
|
|
|
6
|
-
export { ProgressStyle } from "
|
|
7
|
-
import { ProgressStyle } from "
|
|
6
|
+
export { ProgressStyle } from "@flowscripter/dynamic-cli-framework-api";
|
|
7
|
+
import { ProgressStyle } from "@flowscripter/dynamic-cli-framework-api";
|
|
8
8
|
|
|
9
9
|
const STYLE_CHARS: Record<ProgressStyle, { complete: string; remaining: string }> = {
|
|
10
10
|
[ProgressStyle.STROKE]: { complete: "=", remaining: "-" },
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type Styler from "../../../terminal/Styler.ts";
|
|
2
|
+
|
|
3
|
+
interface Level {
|
|
4
|
+
color: number;
|
|
5
|
+
opened: boolean;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const COLUMN = "│ ";
|
|
9
|
+
const BRANCH = "├";
|
|
10
|
+
const OPENER = "┐ ";
|
|
11
|
+
|
|
12
|
+
export default class Quote {
|
|
13
|
+
readonly #styler: Styler;
|
|
14
|
+
readonly #levels: Level[] = [];
|
|
15
|
+
|
|
16
|
+
public constructor(styler: Styler) {
|
|
17
|
+
this.#styler = styler;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
public get isActive(): boolean {
|
|
21
|
+
return this.#levels.length > 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
public push(color: number): void {
|
|
25
|
+
this.#levels.push({ color, opened: false });
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
public pop(): void {
|
|
29
|
+
if (this.#levels.length === 0) {
|
|
30
|
+
throw new Error("endQuote() called without a matching startQuote()");
|
|
31
|
+
}
|
|
32
|
+
this.#levels.pop();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
#prefixLine(): string {
|
|
36
|
+
const count = this.#levels.length;
|
|
37
|
+
const newest = this.#levels[count - 1]!;
|
|
38
|
+
|
|
39
|
+
if (newest.opened) {
|
|
40
|
+
return this.#levels.map((level) => this.#styler.colorText(COLUMN, level.color)).join("");
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
newest.opened = true;
|
|
44
|
+
let prefix = "";
|
|
45
|
+
for (let i = 0; i < count - 2; i++) {
|
|
46
|
+
const level = this.#levels[i]!;
|
|
47
|
+
prefix += this.#styler.colorText(COLUMN, level.color);
|
|
48
|
+
}
|
|
49
|
+
if (count >= 2) {
|
|
50
|
+
const branchLevel = this.#levels[count - 2]!;
|
|
51
|
+
prefix += this.#styler.colorText(BRANCH, branchLevel.color);
|
|
52
|
+
}
|
|
53
|
+
prefix += this.#styler.colorText(OPENER, newest.color);
|
|
54
|
+
return prefix;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
public prefixLines(message: string): string {
|
|
58
|
+
if (!this.isActive) {
|
|
59
|
+
return message;
|
|
60
|
+
}
|
|
61
|
+
const endsWithNewline = message.endsWith("\n");
|
|
62
|
+
const raw = endsWithNewline ? message.slice(0, -1) : message;
|
|
63
|
+
const lines = raw.split("\n").map((line) => this.#prefixLine() + line);
|
|
64
|
+
return lines.join("\n") + (endsWithNewline ? "\n" : "");
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -5,8 +5,8 @@ const BOX_FRAMES = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇
|
|
|
5
5
|
|
|
6
6
|
const STAR_FRAMES = ["★", "✶", "✷", "✹", "✷", "✶", "★", "✦"];
|
|
7
7
|
|
|
8
|
-
export { SpinnerStyle } from "
|
|
9
|
-
import { SpinnerStyle } from "
|
|
8
|
+
export { SpinnerStyle } from "@flowscripter/dynamic-cli-framework-api";
|
|
9
|
+
import { SpinnerStyle } from "@flowscripter/dynamic-cli-framework-api";
|
|
10
10
|
|
|
11
11
|
export default class Spinner {
|
|
12
12
|
#isShown = false;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type PrompterService from "
|
|
1
|
+
import type { PrompterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
import {
|
|
3
3
|
type Prompt,
|
|
4
4
|
type PromptResult,
|
|
5
5
|
PromptType,
|
|
6
|
-
} from "
|
|
6
|
+
} from "@flowscripter/dynamic-cli-framework-api";
|
|
7
7
|
import type Terminal from "../../terminal/Terminal.ts";
|
|
8
8
|
import type KeyReader from "../../terminal/KeyReader.ts";
|
|
9
|
-
import type PrinterService from "
|
|
9
|
+
import type { PrinterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
10
10
|
import type { PromptContext } from "./prompt/PromptContext.ts";
|
|
11
11
|
import promptSingleSelect from "./prompt/promptSingleSelect.ts";
|
|
12
12
|
import promptMultiSelect from "./prompt/promptMultiSelect.ts";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type Context from "
|
|
2
|
-
import type { ServiceInfo, ServiceProvider } from "
|
|
3
|
-
import type PrompterService from "
|
|
4
|
-
import { PROMPTER_SERVICE_ID } from "
|
|
1
|
+
import type { Context } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
|
+
import type { ServiceInfo, ServiceProvider } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
|
+
import type { PrompterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
4
|
+
import { PROMPTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
5
5
|
import NoPromptCommand from "./command/NoPromptCommand.ts";
|
|
6
|
-
import type CLIConfig from "
|
|
6
|
+
import type { CLIConfig } from "@flowscripter/dynamic-cli-framework-api";
|
|
7
7
|
|
|
8
8
|
export default class PrompterServiceProvider implements ServiceProvider {
|
|
9
9
|
readonly serviceId: string = PROMPTER_SERVICE_ID;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type GlobalModifierCommand from "
|
|
2
|
-
import type GlobalCommandArgument from "
|
|
1
|
+
import type { GlobalModifierCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
|
+
import type { GlobalCommandArgument } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
3
|
import {
|
|
4
4
|
type ArgumentSingleValueType,
|
|
5
5
|
ArgumentValueTypeName,
|
|
6
|
-
} from "
|
|
7
|
-
import type Context from "
|
|
6
|
+
} from "@flowscripter/dynamic-cli-framework-api";
|
|
7
|
+
import type { Context } from "@flowscripter/dynamic-cli-framework-api";
|
|
8
8
|
import type PrompterServiceProvider from "../PrompterServiceProvider.ts";
|
|
9
9
|
|
|
10
10
|
export default class NoPromptCommand implements GlobalModifierCommand {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Prompt } from "
|
|
1
|
+
import type { Prompt } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
import type Terminal from "../../../terminal/Terminal.ts";
|
|
3
3
|
import type KeyReader from "../../../terminal/KeyReader.ts";
|
|
4
|
-
import type PrinterService from "
|
|
4
|
+
import type { PrinterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
5
5
|
import type { PrompterServiceConfig } from "../DefaultPrompterService.ts";
|
|
6
6
|
|
|
7
7
|
export interface PromptContext {
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
type Prompt,
|
|
3
3
|
type PromptResult,
|
|
4
4
|
PromptType,
|
|
5
|
-
} from "
|
|
5
|
+
} from "@flowscripter/dynamic-cli-framework-api";
|
|
6
6
|
import type { PromptContext } from "./PromptContext.ts";
|
|
7
7
|
import promptSingleSelect from "./promptSingleSelect.ts";
|
|
8
8
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Prompt, PromptResult } from "
|
|
1
|
+
import type { Prompt, PromptResult } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
import { SpecialKey } from "../../../terminal/KeyReader.ts";
|
|
3
3
|
import ShutdownServiceProvider from "../../shutdown/ShutdownServiceProvider.ts";
|
|
4
4
|
import { headerLineCount, renderPromptHeader } from "./PromptContext.ts";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Prompt, PromptResult } from "
|
|
1
|
+
import type { Prompt, PromptResult } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
import { SpecialKey } from "../../../terminal/KeyReader.ts";
|
|
3
3
|
import ShutdownServiceProvider from "../../shutdown/ShutdownServiceProvider.ts";
|
|
4
4
|
import { renderPromptHeader } from "./PromptContext.ts";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Prompt, PromptResult } from "
|
|
1
|
+
import type { Prompt, PromptResult } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
import { SpecialKey } from "../../../terminal/KeyReader.ts";
|
|
3
3
|
import ShutdownServiceProvider from "../../shutdown/ShutdownServiceProvider.ts";
|
|
4
4
|
import { headerLineCount, renderPromptHeader } from "./PromptContext.ts";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Prompt, PromptResult } from "
|
|
2
|
-
import type { ArgumentSingleValueType } from "
|
|
1
|
+
import type { Prompt, PromptResult } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
|
+
import type { ArgumentSingleValueType } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
3
|
import { SpecialKey } from "../../../terminal/KeyReader.ts";
|
|
4
4
|
import ShutdownServiceProvider from "../../shutdown/ShutdownServiceProvider.ts";
|
|
5
5
|
import { renderPromptHeader } from "./PromptContext.ts";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
type Prompt,
|
|
3
3
|
type PromptResult,
|
|
4
4
|
PromptType,
|
|
5
|
-
} from "
|
|
5
|
+
} from "@flowscripter/dynamic-cli-framework-api";
|
|
6
6
|
import type { PromptContext } from "./PromptContext.ts";
|
|
7
7
|
import promptSingleSelect from "./promptSingleSelect.ts";
|
|
8
8
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type ShutdownService from "
|
|
1
|
+
import type { ShutdownService } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
import { shutdownState } from "./ShutdownState.ts";
|
|
3
3
|
|
|
4
4
|
export default class DefaultShutdownService implements ShutdownService {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import process from "node:process";
|
|
2
|
-
import type { ServiceInfo, ServiceProvider } from "
|
|
2
|
+
import type { ServiceInfo, ServiceProvider } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
3
|
import DefaultShutdownService from "./DefaultShutdownService.ts";
|
|
4
|
-
import type ShutdownService from "
|
|
5
|
-
import { SHUTDOWN_SERVICE_ID } from "
|
|
6
|
-
import type Context from "
|
|
4
|
+
import type { ShutdownService } from "@flowscripter/dynamic-cli-framework-api";
|
|
5
|
+
import { SHUTDOWN_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
6
|
+
import type { Context } from "@flowscripter/dynamic-cli-framework-api";
|
|
7
7
|
import getLogger from "../../util/logger.ts";
|
|
8
|
-
import type CLIConfig from "
|
|
8
|
+
import type { CLIConfig } from "@flowscripter/dynamic-cli-framework-api";
|
|
9
9
|
import { shutdownState } from "./ShutdownState.ts";
|
|
10
10
|
|
|
11
11
|
const logger = getLogger("ShutdownServiceProvider");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type SyntaxHighlighterService from "
|
|
1
|
+
import type { SyntaxHighlighterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
import type { LanguageFn as HighlightSyntax } from "highlight.js";
|
|
3
3
|
import { createEmphasize } from "emphasize";
|
|
4
4
|
import json from "highlight.js/lib/languages/json";
|
|
5
|
-
import type { ColorScheme } from "
|
|
5
|
+
import type { ColorScheme } from "@flowscripter/dynamic-cli-framework-api";
|
|
6
6
|
|
|
7
7
|
type Sheet = Record<string, (value: string) => string> | undefined;
|
|
8
8
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { ServiceInfo, ServiceProvider } from "
|
|
1
|
+
import type { ServiceInfo, ServiceProvider } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
import DefaultSyntaxHighlighterService from "./DefaultSyntaxHighlighterService.ts";
|
|
3
|
-
import { SYNTAX_HIGHLIGHTER_SERVICE_ID } from "
|
|
4
|
-
import type Context from "
|
|
5
|
-
import type PrinterService from "
|
|
6
|
-
import { PRINTER_SERVICE_ID } from "
|
|
7
|
-
import type CLIConfig from "
|
|
3
|
+
import { SYNTAX_HIGHLIGHTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
4
|
+
import type { Context } from "@flowscripter/dynamic-cli-framework-api";
|
|
5
|
+
import type { PrinterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
6
|
+
import { PRINTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
7
|
+
import type { CLIConfig } from "@flowscripter/dynamic-cli-framework-api";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Provides a {@link SyntaxHighlighterService}.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type TableGeneratorService from "
|
|
2
|
-
import { Align } from "
|
|
3
|
-
import type { TableOptions } from "
|
|
4
|
-
import Table from "
|
|
1
|
+
import type { TableGeneratorService } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
|
+
import { Align } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
|
+
import type { TableOptions } from "@flowscripter/dynamic-cli-framework-api";
|
|
4
|
+
import { Table } from "@flowscripter/dynamic-cli-framework-api";
|
|
5
5
|
|
|
6
6
|
const BORDER_TOP_LEFT = "┌";
|
|
7
7
|
const BORDER_TOP = "─";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { ServiceInfo, ServiceProvider } from "
|
|
1
|
+
import type { ServiceInfo, ServiceProvider } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
import DefaultTableGeneratorService from "./DefaultTableGeneratorService.ts";
|
|
3
|
-
import { TABLE_GENERATOR_SERVICE_ID } from "
|
|
4
|
-
import type Context from "
|
|
5
|
-
import type PrinterService from "
|
|
6
|
-
import { PRINTER_SERVICE_ID } from "
|
|
7
|
-
import type CLIConfig from "
|
|
3
|
+
import { TABLE_GENERATOR_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
4
|
+
import type { Context } from "@flowscripter/dynamic-cli-framework-api";
|
|
5
|
+
import type { PrinterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
6
|
+
import { PRINTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
7
|
+
import type { CLIConfig } from "@flowscripter/dynamic-cli-framework-api";
|
|
8
8
|
|
|
9
9
|
export default class TableGeneratorServiceProvider implements ServiceProvider {
|
|
10
10
|
readonly serviceId: string = TABLE_GENERATOR_SERVICE_ID;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type TreePrinterService from "
|
|
2
|
-
import type { TreeNode } from "
|
|
1
|
+
import type { TreePrinterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
|
+
import type { TreeNode } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
3
|
|
|
4
4
|
const DEFAULT_NODE_COLOR = "#839496";
|
|
5
5
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { ServiceInfo, ServiceProvider } from "
|
|
1
|
+
import type { ServiceInfo, ServiceProvider } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
2
|
import DefaultTreePrinterService from "./DefaultTreePrinterService.ts";
|
|
3
|
-
import { TREE_PRINTER_SERVICE_ID } from "
|
|
4
|
-
import type Context from "
|
|
5
|
-
import type PrinterService from "
|
|
6
|
-
import { PRINTER_SERVICE_ID } from "
|
|
7
|
-
import type CLIConfig from "
|
|
3
|
+
import { TREE_PRINTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
4
|
+
import type { Context } from "@flowscripter/dynamic-cli-framework-api";
|
|
5
|
+
import type { PrinterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
6
|
+
import { PRINTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
7
|
+
import type { CLIConfig } from "@flowscripter/dynamic-cli-framework-api";
|
|
8
8
|
|
|
9
9
|
export default class TreePrinterServiceProvider implements ServiceProvider {
|
|
10
10
|
readonly serviceId: string = TREE_PRINTER_SERVICE_ID;
|
|
@@ -23,12 +23,14 @@ export default class ImageRenderer {
|
|
|
23
23
|
hexFormattedBackgroundColor?: string,
|
|
24
24
|
): Promise<string> {
|
|
25
25
|
if (!this.#isMultiplexer()) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
26
|
+
// iTerm2 only supports its own proprietary image protocol, not Kitty's, despite
|
|
27
|
+
// supports-terminal-graphics incorrectly reporting kitty:true for iTerm2 3.6+.
|
|
29
28
|
if (supportsTerminalGraphics.stdout.iterm2) {
|
|
30
29
|
return this.#renderITerm2(imageBuffer, widthPercentage);
|
|
31
30
|
}
|
|
31
|
+
if (supportsTerminalGraphics.stdout.kitty) {
|
|
32
|
+
return this.#renderKitty(imageBuffer, widthPercentage);
|
|
33
|
+
}
|
|
32
34
|
}
|
|
33
35
|
return this.#renderAnsiBlocks(imageBuffer, widthPercentage, hexFormattedBackgroundColor);
|
|
34
36
|
}
|
|
@@ -57,9 +59,9 @@ export default class ImageRenderer {
|
|
|
57
59
|
for (let i = 0; i < chunks.length; i++) {
|
|
58
60
|
const isLast = i === chunks.length - 1;
|
|
59
61
|
if (i === 0) {
|
|
60
|
-
result += `\x1b_Gf=100,a=T,c=${columns},m=${isLast ? 0 : 1};${chunks[i]}\x1b\\`;
|
|
62
|
+
result += `\x1b_Gf=100,a=T,c=${columns},q=2,m=${isLast ? 0 : 1};${chunks[i]}\x1b\\`;
|
|
61
63
|
} else {
|
|
62
|
-
result += `\
|
|
64
|
+
result += `\x1b_Gq=2,m=${isLast ? 0 : 1};${chunks[i]}\x1b\\`;
|
|
63
65
|
}
|
|
64
66
|
}
|
|
65
67
|
return result;
|
package/src/util/configHelper.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type Command from "
|
|
2
|
-
import type CLIConfig from "
|
|
3
|
-
import type Option from "
|
|
4
|
-
import type Positional from "
|
|
5
|
-
import type SubCommandArgument from "
|
|
6
|
-
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 { Option } from "@flowscripter/dynamic-cli-framework-api";
|
|
4
|
+
import type { Positional } from "@flowscripter/dynamic-cli-framework-api";
|
|
5
|
+
import type { SubCommandArgument } from "@flowscripter/dynamic-cli-framework-api";
|
|
6
|
+
import type { GlobalCommandArgument } from "@flowscripter/dynamic-cli-framework-api";
|
|
7
7
|
|
|
8
8
|
function getKeySegment(segment: string, isCustom = false, isArray = false) {
|
|
9
9
|
let keySegment = segment;
|
package/src/util/envVarHelper.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import process from "node:process";
|
|
2
|
-
import type Command from "
|
|
3
|
-
import type CLIConfig from "
|
|
2
|
+
import type { Command } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
|
+
import type { CLIConfig } from "@flowscripter/dynamic-cli-framework-api";
|
|
4
4
|
import {
|
|
5
5
|
ArgumentValueTypeName,
|
|
6
6
|
ComplexValueTypeName,
|
|
7
7
|
type PopulatedArgumentSingleValueType,
|
|
8
8
|
type PopulatedArgumentValues,
|
|
9
|
-
} from "
|
|
9
|
+
} from "@flowscripter/dynamic-cli-framework-api";
|
|
10
10
|
type ProcessEnv = NodeJS.ProcessEnv;
|
|
11
11
|
|
|
12
|
-
import type SubCommandArgument from "
|
|
13
|
-
import { MAXIMUM_ARGUMENT_ARRAY_SIZE } from "
|
|
14
|
-
import type Option from "
|
|
15
|
-
import type GlobalCommandArgument from "
|
|
16
|
-
import type GlobalCommand from "
|
|
17
|
-
import type SubCommand from "
|
|
18
|
-
import type ComplexOption from "
|
|
12
|
+
import type { SubCommandArgument } from "@flowscripter/dynamic-cli-framework-api";
|
|
13
|
+
import { MAXIMUM_ARGUMENT_ARRAY_SIZE } from "@flowscripter/dynamic-cli-framework-api";
|
|
14
|
+
import type { Option } from "@flowscripter/dynamic-cli-framework-api";
|
|
15
|
+
import type { GlobalCommandArgument } from "@flowscripter/dynamic-cli-framework-api";
|
|
16
|
+
import type { GlobalCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
17
|
+
import type { SubCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
18
|
+
import type { ComplexOption } from "@flowscripter/dynamic-cli-framework-api";
|
|
19
19
|
|
|
20
20
|
function getKeySegment(segment: string) {
|
|
21
21
|
let keySegment = segment.replace("-", "_").toUpperCase();
|
package/src/util/helpHelper.ts
CHANGED
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import { distance } from "fastest-levenshtein";
|
|
2
|
-
import type GlobalCommand from "
|
|
3
|
-
import type GlobalCommandArgument from "
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import type
|
|
9
|
-
import type
|
|
10
|
-
import type
|
|
11
|
-
import type
|
|
2
|
+
import type { GlobalCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
|
+
import type { GlobalCommandArgument } from "@flowscripter/dynamic-cli-framework-api";
|
|
4
|
+
import {
|
|
5
|
+
ArgumentValueTypeName,
|
|
6
|
+
ComplexValueTypeName,
|
|
7
|
+
} from "@flowscripter/dynamic-cli-framework-api";
|
|
8
|
+
import type { SubCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
9
|
+
import type { Context } from "@flowscripter/dynamic-cli-framework-api";
|
|
10
|
+
import type { UsageExample } from "@flowscripter/dynamic-cli-framework-api";
|
|
11
|
+
import type { Option } from "@flowscripter/dynamic-cli-framework-api";
|
|
12
|
+
import type { Positional } from "@flowscripter/dynamic-cli-framework-api";
|
|
13
|
+
import type { GlobalModifierCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
14
|
+
import type { GroupCommand } from "@flowscripter/dynamic-cli-framework-api";
|
|
12
15
|
import {
|
|
13
16
|
getGlobalCommandArgumentConfigurationKey,
|
|
14
17
|
getSubCommandArgumentConfigurationKey,
|
|
15
18
|
} from "./configHelper.ts";
|
|
16
|
-
import type Command from "
|
|
17
|
-
import type CLIConfig from "
|
|
18
|
-
import type PrinterService from "
|
|
19
|
-
import type SubCommandArgument from "
|
|
20
|
-
import type ComplexOption from "
|
|
21
|
-
import type TableGeneratorService from "
|
|
19
|
+
import type { Command } from "@flowscripter/dynamic-cli-framework-api";
|
|
20
|
+
import type { CLIConfig } from "@flowscripter/dynamic-cli-framework-api";
|
|
21
|
+
import type { PrinterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
22
|
+
import type { SubCommandArgument } from "@flowscripter/dynamic-cli-framework-api";
|
|
23
|
+
import type { ComplexOption } from "@flowscripter/dynamic-cli-framework-api";
|
|
24
|
+
import type { TableGeneratorService } from "@flowscripter/dynamic-cli-framework-api";
|
|
22
25
|
|
|
23
26
|
const SYNTAX_INDENT_WIDTH = 2;
|
|
24
27
|
const MINIMUM_SYNTAX_COLUMN_WIDTH = 15;
|
package/src/util/runnerHelper.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type PrinterService from "
|
|
2
|
-
import { Icon, PRINTER_SERVICE_ID } from "
|
|
1
|
+
import type { PrinterService } from "@flowscripter/dynamic-cli-framework-api";
|
|
2
|
+
import { Icon, PRINTER_SERVICE_ID } from "@flowscripter/dynamic-cli-framework-api";
|
|
3
3
|
import type { ParseResult } from "../runtime/parser.ts";
|
|
4
4
|
import { isGlobalCommand, isGlobalModifierCommand } from "../runtime/command/CommandTypeGuards.ts";
|
|
5
|
-
import type Context from "
|
|
5
|
+
import type { Context } from "@flowscripter/dynamic-cli-framework-api";
|
|
6
6
|
import { getInvalidArgumentString } from "../runtime/values/argumentValueValidation.ts";
|
|
7
|
-
import type CommandRegistry from "
|
|
7
|
+
import type { CommandRegistry } from "@flowscripter/dynamic-cli-framework-api";
|
|
8
8
|
import { findPossibleCommandNames } from "./helpHelper.ts";
|
|
9
9
|
|
|
10
10
|
function getCommandString(printerService: PrinterService, parseResult: ParseResult): string {
|
package/dist/src/api/CLI.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Interface to be implemented by a CLI application.
|
|
3
|
-
*/
|
|
4
|
-
import type RunResult from "./RunResult.ts";
|
|
5
|
-
import type CLIConfig from "./CLIConfig.ts";
|
|
6
|
-
export default interface CLI {
|
|
7
|
-
/**
|
|
8
|
-
* Run the CLI with the provided arguments which do not include the invoked executable name.
|
|
9
|
-
*
|
|
10
|
-
* @param args the arguments to parse.
|
|
11
|
-
* @param cliConfig the {@link CLIConfig} for the CLI application.
|
|
12
|
-
*
|
|
13
|
-
* @return result of parsing arguments and running appropriate {@link Command} instances.
|
|
14
|
-
*/
|
|
15
|
-
run(args: ReadonlyArray<string>, cliConfig: CLIConfig): Promise<RunResult>;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=CLI.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CLI.d.ts","sourceRoot":"","sources":["../../../src/api/CLI.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAE5C,MAAM,CAAC,OAAO,WAAW,GAAG;IAC1B;;;;;;;OAOG;IACH,GAAG,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;CAC5E"}
|
package/dist/src/api/CLI.js
DELETED
|
File without changes
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Interface specifying common configuration for a {@link CLI} application.
|
|
3
|
-
*/
|
|
4
|
-
export default interface CLIConfig {
|
|
5
|
-
/**
|
|
6
|
-
* Name of the CLI application.
|
|
7
|
-
*/
|
|
8
|
-
readonly name: string;
|
|
9
|
-
/**
|
|
10
|
-
* Optional description of the CLI application.
|
|
11
|
-
*/
|
|
12
|
-
readonly description?: string;
|
|
13
|
-
/**
|
|
14
|
-
* Optional sub-message to display below the banner.
|
|
15
|
-
*/
|
|
16
|
-
readonly subMessage?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Version of the CLI application.
|
|
19
|
-
*/
|
|
20
|
-
readonly version: string;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=CLIConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CLIConfig.d.ts","sourceRoot":"","sources":["../../../src/api/CLIConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,OAAO,WAAW,SAAS;IAChC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B"}
|
|
File without changes
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Interface allowing a {@link CLI} to pass context to a {@link Command} instance.
|
|
3
|
-
*/
|
|
4
|
-
import type CLIConfig from "./CLIConfig.ts";
|
|
5
|
-
export default interface Context {
|
|
6
|
-
/**
|
|
7
|
-
* The {@link CLIConfig} in use by the {@link CLI}.
|
|
8
|
-
*/
|
|
9
|
-
readonly cliConfig: CLIConfig;
|
|
10
|
-
/**
|
|
11
|
-
* Return the service identified by the specified ID.
|
|
12
|
-
*
|
|
13
|
-
* @param id the ID of the service to retrieve.
|
|
14
|
-
*/
|
|
15
|
-
getServiceById(id: string): unknown;
|
|
16
|
-
/**
|
|
17
|
-
* Check if the specified service exists in the context.
|
|
18
|
-
*
|
|
19
|
-
* @param id the ID of the desired service.
|
|
20
|
-
*/
|
|
21
|
-
doesServiceExist(id: string): boolean;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=Context.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../src/api/Context.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAE5C,MAAM,CAAC,OAAO,WAAW,OAAO;IAC9B;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAE9B;;;;OAIG;IACH,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;IAEpC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;CACvC"}
|
package/dist/src/api/Context.js
DELETED
|
File without changes
|