@shell-shock/preset-cli 0.9.34 → 0.9.36
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/dist/command-entry-BCDDI3RN.mjs +548 -0
- package/dist/command-entry-BCDDI3RN.mjs.map +1 -0
- package/dist/command-entry-iZ5O5Iza.cjs +558 -0
- package/dist/components/banner-builtin.cjs +39 -14
- package/dist/components/banner-builtin.d.cts +1 -2
- package/dist/components/banner-builtin.d.cts.map +1 -1
- package/dist/components/banner-builtin.d.mts +1 -2
- package/dist/components/banner-builtin.mjs +6 -6
- package/dist/components/command-entry.cjs +2 -447
- package/dist/components/command-entry.d.cts +1 -2
- package/dist/components/command-entry.d.cts.map +1 -1
- package/dist/components/command-entry.d.mts +1 -2
- package/dist/components/command-entry.mjs +2 -446
- package/dist/components/command-router.cjs +6 -6
- package/dist/components/command-router.d.cts +0 -1
- package/dist/components/command-router.d.cts.map +1 -1
- package/dist/components/command-router.d.mts +0 -1
- package/dist/components/command-router.mjs +3 -3
- package/dist/components/index.cjs +3 -4
- package/dist/components/index.mjs +1 -2
- package/dist/components/update-builtin.cjs +7 -7
- package/dist/components/update-builtin.d.cts +0 -1
- package/dist/components/update-builtin.d.cts.map +1 -1
- package/dist/components/update-builtin.d.mts +0 -1
- package/dist/components/update-builtin.mjs +5 -5
- package/dist/components/virtual-command-entry.cjs +2 -114
- package/dist/components/virtual-command-entry.d.cts +1 -2
- package/dist/components/virtual-command-entry.d.cts.map +1 -1
- package/dist/components/virtual-command-entry.d.mts +1 -2
- package/dist/components/virtual-command-entry.mjs +2 -113
- package/dist/generator.cjs +158 -0
- package/dist/generator.d.cts +16 -0
- package/dist/generator.d.cts.map +1 -0
- package/dist/generator.d.mts +16 -0
- package/dist/generator.d.mts.map +1 -0
- package/dist/generator.mjs +156 -0
- package/dist/generator.mjs.map +1 -0
- package/dist/helpers/get-global-options.cjs +1 -0
- package/dist/helpers/get-global-options.d.cts +15 -0
- package/dist/helpers/get-global-options.d.cts.map +1 -0
- package/dist/helpers/get-global-options.d.mts +15 -0
- package/dist/helpers/get-global-options.d.mts.map +1 -0
- package/dist/helpers/get-global-options.mjs +4 -4
- package/dist/index.cjs +20 -130
- package/dist/index.d.cts +3 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +25 -129
- package/dist/plugin-BUwcMpPx.d.mts +100 -0
- package/dist/plugin-BUwcMpPx.d.mts.map +1 -0
- package/dist/plugin-Bsdv5DH-.d.cts +100 -0
- package/dist/plugin-Bsdv5DH-.d.cts.map +1 -0
- package/dist/types/index.cjs +1 -0
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.mjs +2 -0
- package/dist/types/plugin.d.cts +2 -101
- package/dist/types/plugin.d.mts +2 -101
- package/package.json +53 -25
- package/dist/_virtual/_rolldown/runtime.cjs +0 -29
- package/dist/components/command-entry.mjs.map +0 -1
- package/dist/components/virtual-command-entry.mjs.map +0 -1
- package/dist/types/plugin.d.cts.map +0 -1
- package/dist/types/plugin.d.mts.map +0 -1
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { CommandBase, CommandOption, Context, UserConfig } from "@shell-shock/core";
|
|
2
|
+
import { BannerPluginContext, BannerPluginResolvedConfig, BannerPluginUserConfig } from "@shell-shock/plugin-banner";
|
|
3
|
+
import { ChangelogPluginContext, ChangelogPluginOptions, ChangelogPluginResolvedConfig, ChangelogPluginUserConfig } from "@shell-shock/plugin-changelog";
|
|
4
|
+
import { CompletionsPluginContext, CompletionsPluginOptions, CompletionsPluginResolvedConfig, CompletionsPluginUserConfig } from "@shell-shock/plugin-completions";
|
|
5
|
+
import { ConsolePluginContext, ConsolePluginResolvedConfig, ConsolePluginUserConfig } from "@shell-shock/plugin-console";
|
|
6
|
+
import { HelpPluginContext, HelpPluginOptions, HelpPluginResolvedConfig, HelpPluginUserConfig } from "@shell-shock/plugin-help";
|
|
7
|
+
import { PromptsPluginContext, PromptsPluginOptions, PromptsPluginResolvedConfig, PromptsPluginUserConfig } from "@shell-shock/plugin-prompts/types/plugin";
|
|
8
|
+
import { SkillsPluginContext, SkillsPluginOptions, SkillsPluginResolvedConfig, SkillsPluginUserConfig } from "@shell-shock/plugin-skills";
|
|
9
|
+
import { ThemePluginContext, ThemePluginResolvedConfig, ThemePluginUserConfig } from "@shell-shock/plugin-theme/types/plugin";
|
|
10
|
+
import { UpdatePluginContext, UpdatePluginOptions, UpdatePluginResolvedConfig, UpdatePluginUserConfig } from "@shell-shock/plugin-update/types/plugin";
|
|
11
|
+
import { ScriptPresetOptions } from "@shell-shock/preset-script/types/plugin";
|
|
12
|
+
import { FigletOptions } from "figlet";
|
|
13
|
+
import { ResolvedConfig } from "powerlines";
|
|
14
|
+
//#region src/types/plugin.d.ts
|
|
15
|
+
type UpdateType = "confirm" | "auto" | "manual";
|
|
16
|
+
type CLIPresetBannerFontOption = "console" | "block" | "simpleBlock" | "simple" | "3d" | "simple3d" | "chrome" | "huge" | "shade" | "slick" | "grid" | "pallet" | "tiny";
|
|
17
|
+
interface CLIPresetBannerOption extends FigletOptions {
|
|
18
|
+
/**
|
|
19
|
+
* The text to display in the banner header. If not specified, the application name will be used.
|
|
20
|
+
*/
|
|
21
|
+
text?: string;
|
|
22
|
+
}
|
|
23
|
+
interface CLIPresetBannerOverrideOption {
|
|
24
|
+
/**
|
|
25
|
+
* The text to display in the banner header verbatim, without applying figlet styling. If this option is set, it will take precedence over the `banner` option and any figlet styling will be ignored. This can be useful if you want to display a custom banner that does not conform to the constraints of figlet fonts, or if you want to include special characters or formatting that may not be supported by figlet. When this option is set, the specified text will be displayed exactly as provided in the banner header, without any modifications or styling applied.
|
|
26
|
+
*/
|
|
27
|
+
override: string;
|
|
28
|
+
}
|
|
29
|
+
type CLIPresetOptions = Omit<ScriptPresetOptions, "globalOptions"> & HelpPluginOptions & PromptsPluginOptions & UpdatePluginOptions & {
|
|
30
|
+
/**
|
|
31
|
+
* The default interactive mode to apply to commands.
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* The following modes are available:
|
|
35
|
+
* - `true`: Enable interactivity when a TTY is detected and no explicit interactive flag is set (default).
|
|
36
|
+
* - `false`: Disable interactivity unless an explicit interactive flag is set.
|
|
37
|
+
* - `"never"`: Always disable interactivity, regardless of TTY presence or flags.
|
|
38
|
+
*
|
|
39
|
+
* @defaultValue `true`
|
|
40
|
+
*/
|
|
41
|
+
interactive?: boolean | "never";
|
|
42
|
+
/**
|
|
43
|
+
* A set of default command options to apply to each command.
|
|
44
|
+
*
|
|
45
|
+
* @remarks
|
|
46
|
+
* By default, Shell Shock adds the following set of default arguments to each command:
|
|
47
|
+
* - `--help` (`-h`, `-?`): Show help information.
|
|
48
|
+
* - `--version` (`-v`): Show the version of the application.
|
|
49
|
+
* - `--interactive` (`-i`, `--interact`): Enable interactive mode.
|
|
50
|
+
* - `--no-interactive`: Disable interactive mode.
|
|
51
|
+
* - `--no-banner`: Hide the banner displayed while running the CLI application.
|
|
52
|
+
* - `--verbose`: Enable verbose output.
|
|
53
|
+
*
|
|
54
|
+
* To disable the addition of these default options, set this property to `false`, or provide a custom set of options/a function that returns them.
|
|
55
|
+
*/
|
|
56
|
+
globalOptions?: CommandOption[] | ((context: Context, input: CommandBase) => CommandOption[]) | false;
|
|
57
|
+
/**
|
|
58
|
+
* The type of update to perform. This option determines how the update process will be handled.
|
|
59
|
+
*
|
|
60
|
+
* @remarks
|
|
61
|
+
* The update logic will behave differently based on the value of this field:
|
|
62
|
+
* - `"confirm"` - the user will be prompted to confirm the update before it is performed. This is the default behavior and is recommended for most users, as it provides an extra layer of safety against unintended updates.
|
|
63
|
+
* - `"auto"` - the update will be performed automatically without any user confirmation. This option is suitable for advanced users who want a seamless update experience and are confident in the stability of new versions.
|
|
64
|
+
* - `"manual"` - the command will only display the latest available version without performing any update. This option is useful for users who want to check for updates without making any changes to their system.
|
|
65
|
+
*
|
|
66
|
+
* @defaultValue "confirm"
|
|
67
|
+
*/
|
|
68
|
+
updateType?: UpdateType | false;
|
|
69
|
+
/**
|
|
70
|
+
* The title to display in the banner for the CLI application. If not specified, the application name will be used.
|
|
71
|
+
*
|
|
72
|
+
* @see https://www.npmjs.com/package/figlet
|
|
73
|
+
* @see http://patorjk.com/software/taag/
|
|
74
|
+
*
|
|
75
|
+
* @remarks
|
|
76
|
+
* This option can be set to a string to specify the banner text directly, or an object with `figlet` options to customize the appearance of the banner. If an object is provided, the `text` property can be used to specify the banner text, and other properties can be used to customize the font, alignment, and other aspects of the banner's appearance.
|
|
77
|
+
*/
|
|
78
|
+
banner?: string | CLIPresetBannerOption | CLIPresetBannerOverrideOption;
|
|
79
|
+
/**
|
|
80
|
+
* Configuration options for the `completions` plugin. This field allows you to customize the behavior of the `completions` plugin, which provides commands for generating shell completion scripts for the CLI application. You can specify which shells to generate completions for, and other related settings.
|
|
81
|
+
*/
|
|
82
|
+
completions?: Pick<CompletionsPluginOptions, "shells"> | false;
|
|
83
|
+
/**
|
|
84
|
+
* Configuration options for the `changelog` plugin. This field allows you to customize the behavior of the `changelog` plugin, which provides commands for displaying the application's changelog. You can specify the path to the changelog file, the command name, and other related settings.
|
|
85
|
+
*/
|
|
86
|
+
changelog?: ChangelogPluginOptions | false;
|
|
87
|
+
/**
|
|
88
|
+
* Configuration options for the `skills` plugin. This field allows you to customize the behavior of the `skills` plugin, which provides commands for managing and displaying the application's skills. You can specify the command name, and other related settings.
|
|
89
|
+
*
|
|
90
|
+
* @remarks
|
|
91
|
+
* If the `skills` plugin is enabled but the specified skills path does not exist, the plugin will be automatically disabled and a warning message will be logged. By default, the plugin looks for a `skills` directory in the current working directory.
|
|
92
|
+
*/
|
|
93
|
+
skills?: SkillsPluginOptions | false;
|
|
94
|
+
};
|
|
95
|
+
type CLIPresetUserConfig = UserConfig & ThemePluginUserConfig & ConsolePluginUserConfig & PromptsPluginUserConfig & BannerPluginUserConfig & HelpPluginUserConfig & CompletionsPluginUserConfig & ChangelogPluginUserConfig & SkillsPluginUserConfig & UpdatePluginUserConfig & CLIPresetOptions;
|
|
96
|
+
type CLIPresetResolvedConfig = ResolvedConfig & ThemePluginResolvedConfig & ConsolePluginResolvedConfig & PromptsPluginResolvedConfig & BannerPluginResolvedConfig & HelpPluginResolvedConfig & CompletionsPluginResolvedConfig & ChangelogPluginResolvedConfig & SkillsPluginResolvedConfig & UpdatePluginResolvedConfig & Required<CLIPresetOptions>;
|
|
97
|
+
type CLIPresetContext<TResolvedConfig extends CLIPresetResolvedConfig = CLIPresetResolvedConfig> = Context<TResolvedConfig> & ThemePluginContext<TResolvedConfig> & ConsolePluginContext<TResolvedConfig> & PromptsPluginContext<TResolvedConfig> & BannerPluginContext<TResolvedConfig> & HelpPluginContext<TResolvedConfig> & CompletionsPluginContext<TResolvedConfig> & ChangelogPluginContext<TResolvedConfig> & SkillsPluginContext<TResolvedConfig> & UpdatePluginContext<TResolvedConfig>;
|
|
98
|
+
//#endregion
|
|
99
|
+
export { CLIPresetOptions as a, UpdateType as c, CLIPresetContext as i, CLIPresetBannerOption as n, CLIPresetResolvedConfig as o, CLIPresetBannerOverrideOption as r, CLIPresetUserConfig as s, CLIPresetBannerFontOption as t };
|
|
100
|
+
//# sourceMappingURL=plugin-Bsdv5DH-.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-Bsdv5DH-.d.cts","names":[],"sources":["../src/types/plugin.ts"],"mappings":";;;;;;;;;;;;;;KA+EY;KAEA;UAeK,8BAA8B;;;;EAI7C;;UAGe;;;;EAIf;;KAGU,mBAAmB,KAAK,wCAClC,oBACA,uBACA;;;;;;;;;;;;EAYE;;;;;;;;;;;;;;;EAgBA,gBACI,oBACE,SAAS,SAAS,OAAO,gBAAgB;;;;;;;;;;;;EAc/C,aAAa;;;;;;;;;;EAWb,kBAAkB,wBAAwB;;;;EAK1C,cAAc,KAAK;;;;EAKnB,YAAY;;;;;;;EAQZ,SAAS;;KAGD,sBAAsB,aAChC,wBACA,0BACA,0BACA,yBACA,uBACA,8BACA,4BACA,yBACA,yBACA;KAEU,0BAA0B,iBACpC,4BACA,8BACA,8BACA,6BACA,2BACA,kCACA,gCACA,6BACA,6BACA,SAAS;KAEC,iBACV,wBAAwB,0BAA0B,2BAChD,QAAQ,mBACV,mBAAmB,mBACnB,qBAAqB,mBACrB,qBAAqB,mBACrB,oBAAoB,mBACpB,kBAAkB,mBAClB,yBAAyB,mBACzB,uBAAuB,mBACvB,oBAAoB,mBACpB,oBAAoB"}
|
package/dist/types/index.cjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('./plugin.cjs');
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as CLIPresetOptions, c as UpdateType, i as CLIPresetContext, n as CLIPresetBannerOption, o as CLIPresetResolvedConfig, r as CLIPresetBannerOverrideOption, s as CLIPresetUserConfig, t as CLIPresetBannerFontOption } from "../plugin-Bsdv5DH-.cjs";
|
|
2
2
|
export { CLIPresetBannerFontOption, CLIPresetBannerOption, CLIPresetBannerOverrideOption, CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpdateType };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as CLIPresetOptions, c as UpdateType, i as CLIPresetContext, n as CLIPresetBannerOption, o as CLIPresetResolvedConfig, r as CLIPresetBannerOverrideOption, s as CLIPresetUserConfig, t as CLIPresetBannerFontOption } from "../plugin-BUwcMpPx.mjs";
|
|
2
2
|
export { CLIPresetBannerFontOption, CLIPresetBannerOption, CLIPresetBannerOverrideOption, CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpdateType };
|
package/dist/types/index.mjs
CHANGED
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,101 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { BannerPluginContext, BannerPluginResolvedConfig, BannerPluginUserConfig } from "@shell-shock/plugin-banner";
|
|
4
|
-
import { ChangelogPluginContext, ChangelogPluginOptions, ChangelogPluginResolvedConfig, ChangelogPluginUserConfig } from "@shell-shock/plugin-changelog";
|
|
5
|
-
import { CompletionsPluginContext, CompletionsPluginOptions, CompletionsPluginResolvedConfig, CompletionsPluginUserConfig } from "@shell-shock/plugin-completions";
|
|
6
|
-
import { ConsolePluginContext, ConsolePluginResolvedConfig, ConsolePluginUserConfig } from "@shell-shock/plugin-console";
|
|
7
|
-
import { HelpPluginContext, HelpPluginOptions, HelpPluginResolvedConfig, HelpPluginUserConfig } from "@shell-shock/plugin-help";
|
|
8
|
-
import { PromptsPluginContext, PromptsPluginOptions, PromptsPluginResolvedConfig, PromptsPluginUserConfig } from "@shell-shock/plugin-prompts/types/plugin";
|
|
9
|
-
import { SkillsPluginContext, SkillsPluginOptions, SkillsPluginResolvedConfig, SkillsPluginUserConfig } from "@shell-shock/plugin-skills";
|
|
10
|
-
import { ThemePluginContext, ThemePluginResolvedConfig, ThemePluginUserConfig } from "@shell-shock/plugin-theme/types/plugin";
|
|
11
|
-
import { UpdatePluginContext, UpdatePluginOptions, UpdatePluginResolvedConfig, UpdatePluginUserConfig } from "@shell-shock/plugin-update/types/plugin";
|
|
12
|
-
import { ScriptPresetOptions } from "@shell-shock/preset-script/types/plugin";
|
|
13
|
-
import { FigletOptions } from "figlet";
|
|
14
|
-
|
|
15
|
-
//#region src/types/plugin.d.ts
|
|
16
|
-
type UpdateType = "confirm" | "auto" | "manual";
|
|
17
|
-
type CLIPresetBannerFontOption = "console" | "block" | "simpleBlock" | "simple" | "3d" | "simple3d" | "chrome" | "huge" | "shade" | "slick" | "grid" | "pallet" | "tiny";
|
|
18
|
-
interface CLIPresetBannerOption extends FigletOptions {
|
|
19
|
-
/**
|
|
20
|
-
* The text to display in the banner header. If not specified, the application name will be used.
|
|
21
|
-
*/
|
|
22
|
-
text?: string;
|
|
23
|
-
}
|
|
24
|
-
interface CLIPresetBannerOverrideOption {
|
|
25
|
-
/**
|
|
26
|
-
* The text to display in the banner header verbatim, without applying figlet styling. If this option is set, it will take precedence over the `banner` option and any figlet styling will be ignored. This can be useful if you want to display a custom banner that does not conform to the constraints of figlet fonts, or if you want to include special characters or formatting that may not be supported by figlet. When this option is set, the specified text will be displayed exactly as provided in the banner header, without any modifications or styling applied.
|
|
27
|
-
*/
|
|
28
|
-
override: string;
|
|
29
|
-
}
|
|
30
|
-
type CLIPresetOptions = Omit<ScriptPresetOptions, "globalOptions"> & HelpPluginOptions & PromptsPluginOptions & UpdatePluginOptions & {
|
|
31
|
-
/**
|
|
32
|
-
* The default interactive mode to apply to commands.
|
|
33
|
-
*
|
|
34
|
-
* @remarks
|
|
35
|
-
* The following modes are available:
|
|
36
|
-
* - `true`: Enable interactivity when a TTY is detected and no explicit interactive flag is set (default).
|
|
37
|
-
* - `false`: Disable interactivity unless an explicit interactive flag is set.
|
|
38
|
-
* - `"never"`: Always disable interactivity, regardless of TTY presence or flags.
|
|
39
|
-
*
|
|
40
|
-
* @defaultValue `true`
|
|
41
|
-
*/
|
|
42
|
-
interactive?: boolean | "never";
|
|
43
|
-
/**
|
|
44
|
-
* A set of default command options to apply to each command.
|
|
45
|
-
*
|
|
46
|
-
* @remarks
|
|
47
|
-
* By default, Shell Shock adds the following set of default arguments to each command:
|
|
48
|
-
* - `--help` (`-h`, `-?`): Show help information.
|
|
49
|
-
* - `--version` (`-v`): Show the version of the application.
|
|
50
|
-
* - `--interactive` (`-i`, `--interact`): Enable interactive mode.
|
|
51
|
-
* - `--no-interactive`: Disable interactive mode.
|
|
52
|
-
* - `--no-banner`: Hide the banner displayed while running the CLI application.
|
|
53
|
-
* - `--verbose`: Enable verbose output.
|
|
54
|
-
*
|
|
55
|
-
* To disable the addition of these default options, set this property to `false`, or provide a custom set of options/a function that returns them.
|
|
56
|
-
*/
|
|
57
|
-
globalOptions?: CommandOption[] | ((context: Context, input: CommandBase) => CommandOption[]) | false;
|
|
58
|
-
/**
|
|
59
|
-
* The type of update to perform. This option determines how the update process will be handled.
|
|
60
|
-
*
|
|
61
|
-
* @remarks
|
|
62
|
-
* The update logic will behave differently based on the value of this field:
|
|
63
|
-
* - `"confirm"` - the user will be prompted to confirm the update before it is performed. This is the default behavior and is recommended for most users, as it provides an extra layer of safety against unintended updates.
|
|
64
|
-
* - `"auto"` - the update will be performed automatically without any user confirmation. This option is suitable for advanced users who want a seamless update experience and are confident in the stability of new versions.
|
|
65
|
-
* - `"manual"` - the command will only display the latest available version without performing any update. This option is useful for users who want to check for updates without making any changes to their system.
|
|
66
|
-
*
|
|
67
|
-
* @defaultValue "confirm"
|
|
68
|
-
*/
|
|
69
|
-
updateType?: UpdateType | false;
|
|
70
|
-
/**
|
|
71
|
-
* The title to display in the banner for the CLI application. If not specified, the application name will be used.
|
|
72
|
-
*
|
|
73
|
-
* @see https://www.npmjs.com/package/figlet
|
|
74
|
-
* @see http://patorjk.com/software/taag/
|
|
75
|
-
*
|
|
76
|
-
* @remarks
|
|
77
|
-
* This option can be set to a string to specify the banner text directly, or an object with `figlet` options to customize the appearance of the banner. If an object is provided, the `text` property can be used to specify the banner text, and other properties can be used to customize the font, alignment, and other aspects of the banner's appearance.
|
|
78
|
-
*/
|
|
79
|
-
banner?: string | CLIPresetBannerOption | CLIPresetBannerOverrideOption;
|
|
80
|
-
/**
|
|
81
|
-
* Configuration options for the `completions` plugin. This field allows you to customize the behavior of the `completions` plugin, which provides commands for generating shell completion scripts for the CLI application. You can specify which shells to generate completions for, and other related settings.
|
|
82
|
-
*/
|
|
83
|
-
completions?: Pick<CompletionsPluginOptions, "shells"> | false;
|
|
84
|
-
/**
|
|
85
|
-
* Configuration options for the `changelog` plugin. This field allows you to customize the behavior of the `changelog` plugin, which provides commands for displaying the application's changelog. You can specify the path to the changelog file, the command name, and other related settings.
|
|
86
|
-
*/
|
|
87
|
-
changelog?: ChangelogPluginOptions | false;
|
|
88
|
-
/**
|
|
89
|
-
* Configuration options for the `skills` plugin. This field allows you to customize the behavior of the `skills` plugin, which provides commands for managing and displaying the application's skills. You can specify the command name, and other related settings.
|
|
90
|
-
*
|
|
91
|
-
* @remarks
|
|
92
|
-
* If the `skills` plugin is enabled but the specified skills path does not exist, the plugin will be automatically disabled and a warning message will be logged. By default, the plugin looks for a `skills` directory in the current working directory.
|
|
93
|
-
*/
|
|
94
|
-
skills?: SkillsPluginOptions | false;
|
|
95
|
-
};
|
|
96
|
-
type CLIPresetUserConfig = UserConfig & ThemePluginUserConfig & ConsolePluginUserConfig & PromptsPluginUserConfig & BannerPluginUserConfig & HelpPluginUserConfig & CompletionsPluginUserConfig & ChangelogPluginUserConfig & SkillsPluginUserConfig & UpdatePluginUserConfig & CLIPresetOptions;
|
|
97
|
-
type CLIPresetResolvedConfig = ResolvedConfig & ThemePluginResolvedConfig & ConsolePluginResolvedConfig & PromptsPluginResolvedConfig & BannerPluginResolvedConfig & HelpPluginResolvedConfig & CompletionsPluginResolvedConfig & ChangelogPluginResolvedConfig & SkillsPluginResolvedConfig & UpdatePluginResolvedConfig & Required<CLIPresetOptions>;
|
|
98
|
-
type CLIPresetContext<TResolvedConfig extends CLIPresetResolvedConfig = CLIPresetResolvedConfig> = Context<TResolvedConfig> & ThemePluginContext<TResolvedConfig> & ConsolePluginContext<TResolvedConfig> & PromptsPluginContext<TResolvedConfig> & BannerPluginContext<TResolvedConfig> & HelpPluginContext<TResolvedConfig> & CompletionsPluginContext<TResolvedConfig> & ChangelogPluginContext<TResolvedConfig> & SkillsPluginContext<TResolvedConfig> & UpdatePluginContext<TResolvedConfig>;
|
|
99
|
-
//#endregion
|
|
100
|
-
export { CLIPresetBannerFontOption, CLIPresetBannerOption, CLIPresetBannerOverrideOption, CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpdateType };
|
|
101
|
-
//# sourceMappingURL=plugin.d.cts.map
|
|
1
|
+
import { a as CLIPresetOptions, c as UpdateType, i as CLIPresetContext, n as CLIPresetBannerOption, o as CLIPresetResolvedConfig, r as CLIPresetBannerOverrideOption, s as CLIPresetUserConfig, t as CLIPresetBannerFontOption } from "../plugin-Bsdv5DH-.cjs";
|
|
2
|
+
export { CLIPresetBannerFontOption, CLIPresetBannerOption, CLIPresetBannerOverrideOption, CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpdateType };
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,101 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { ConsolePluginContext, ConsolePluginResolvedConfig, ConsolePluginUserConfig } from "@shell-shock/plugin-console";
|
|
4
|
-
import { HelpPluginContext, HelpPluginOptions, HelpPluginResolvedConfig, HelpPluginUserConfig } from "@shell-shock/plugin-help";
|
|
5
|
-
import { SkillsPluginContext, SkillsPluginOptions, SkillsPluginResolvedConfig, SkillsPluginUserConfig } from "@shell-shock/plugin-skills";
|
|
6
|
-
import { ResolvedConfig } from "powerlines";
|
|
7
|
-
import { FigletOptions } from "figlet";
|
|
8
|
-
import { CommandBase, CommandOption, Context, UserConfig } from "@shell-shock/core";
|
|
9
|
-
import { BannerPluginContext, BannerPluginResolvedConfig, BannerPluginUserConfig } from "@shell-shock/plugin-banner";
|
|
10
|
-
import { PromptsPluginContext, PromptsPluginOptions, PromptsPluginResolvedConfig, PromptsPluginUserConfig } from "@shell-shock/plugin-prompts/types/plugin";
|
|
11
|
-
import { ThemePluginContext, ThemePluginResolvedConfig, ThemePluginUserConfig } from "@shell-shock/plugin-theme/types/plugin";
|
|
12
|
-
import { UpdatePluginContext, UpdatePluginOptions, UpdatePluginResolvedConfig, UpdatePluginUserConfig } from "@shell-shock/plugin-update/types/plugin";
|
|
13
|
-
import { ScriptPresetOptions } from "@shell-shock/preset-script/types/plugin";
|
|
14
|
-
|
|
15
|
-
//#region src/types/plugin.d.ts
|
|
16
|
-
type UpdateType = "confirm" | "auto" | "manual";
|
|
17
|
-
type CLIPresetBannerFontOption = "console" | "block" | "simpleBlock" | "simple" | "3d" | "simple3d" | "chrome" | "huge" | "shade" | "slick" | "grid" | "pallet" | "tiny";
|
|
18
|
-
interface CLIPresetBannerOption extends FigletOptions {
|
|
19
|
-
/**
|
|
20
|
-
* The text to display in the banner header. If not specified, the application name will be used.
|
|
21
|
-
*/
|
|
22
|
-
text?: string;
|
|
23
|
-
}
|
|
24
|
-
interface CLIPresetBannerOverrideOption {
|
|
25
|
-
/**
|
|
26
|
-
* The text to display in the banner header verbatim, without applying figlet styling. If this option is set, it will take precedence over the `banner` option and any figlet styling will be ignored. This can be useful if you want to display a custom banner that does not conform to the constraints of figlet fonts, or if you want to include special characters or formatting that may not be supported by figlet. When this option is set, the specified text will be displayed exactly as provided in the banner header, without any modifications or styling applied.
|
|
27
|
-
*/
|
|
28
|
-
override: string;
|
|
29
|
-
}
|
|
30
|
-
type CLIPresetOptions = Omit<ScriptPresetOptions, "globalOptions"> & HelpPluginOptions & PromptsPluginOptions & UpdatePluginOptions & {
|
|
31
|
-
/**
|
|
32
|
-
* The default interactive mode to apply to commands.
|
|
33
|
-
*
|
|
34
|
-
* @remarks
|
|
35
|
-
* The following modes are available:
|
|
36
|
-
* - `true`: Enable interactivity when a TTY is detected and no explicit interactive flag is set (default).
|
|
37
|
-
* - `false`: Disable interactivity unless an explicit interactive flag is set.
|
|
38
|
-
* - `"never"`: Always disable interactivity, regardless of TTY presence or flags.
|
|
39
|
-
*
|
|
40
|
-
* @defaultValue `true`
|
|
41
|
-
*/
|
|
42
|
-
interactive?: boolean | "never";
|
|
43
|
-
/**
|
|
44
|
-
* A set of default command options to apply to each command.
|
|
45
|
-
*
|
|
46
|
-
* @remarks
|
|
47
|
-
* By default, Shell Shock adds the following set of default arguments to each command:
|
|
48
|
-
* - `--help` (`-h`, `-?`): Show help information.
|
|
49
|
-
* - `--version` (`-v`): Show the version of the application.
|
|
50
|
-
* - `--interactive` (`-i`, `--interact`): Enable interactive mode.
|
|
51
|
-
* - `--no-interactive`: Disable interactive mode.
|
|
52
|
-
* - `--no-banner`: Hide the banner displayed while running the CLI application.
|
|
53
|
-
* - `--verbose`: Enable verbose output.
|
|
54
|
-
*
|
|
55
|
-
* To disable the addition of these default options, set this property to `false`, or provide a custom set of options/a function that returns them.
|
|
56
|
-
*/
|
|
57
|
-
globalOptions?: CommandOption[] | ((context: Context, input: CommandBase) => CommandOption[]) | false;
|
|
58
|
-
/**
|
|
59
|
-
* The type of update to perform. This option determines how the update process will be handled.
|
|
60
|
-
*
|
|
61
|
-
* @remarks
|
|
62
|
-
* The update logic will behave differently based on the value of this field:
|
|
63
|
-
* - `"confirm"` - the user will be prompted to confirm the update before it is performed. This is the default behavior and is recommended for most users, as it provides an extra layer of safety against unintended updates.
|
|
64
|
-
* - `"auto"` - the update will be performed automatically without any user confirmation. This option is suitable for advanced users who want a seamless update experience and are confident in the stability of new versions.
|
|
65
|
-
* - `"manual"` - the command will only display the latest available version without performing any update. This option is useful for users who want to check for updates without making any changes to their system.
|
|
66
|
-
*
|
|
67
|
-
* @defaultValue "confirm"
|
|
68
|
-
*/
|
|
69
|
-
updateType?: UpdateType | false;
|
|
70
|
-
/**
|
|
71
|
-
* The title to display in the banner for the CLI application. If not specified, the application name will be used.
|
|
72
|
-
*
|
|
73
|
-
* @see https://www.npmjs.com/package/figlet
|
|
74
|
-
* @see http://patorjk.com/software/taag/
|
|
75
|
-
*
|
|
76
|
-
* @remarks
|
|
77
|
-
* This option can be set to a string to specify the banner text directly, or an object with `figlet` options to customize the appearance of the banner. If an object is provided, the `text` property can be used to specify the banner text, and other properties can be used to customize the font, alignment, and other aspects of the banner's appearance.
|
|
78
|
-
*/
|
|
79
|
-
banner?: string | CLIPresetBannerOption | CLIPresetBannerOverrideOption;
|
|
80
|
-
/**
|
|
81
|
-
* Configuration options for the `completions` plugin. This field allows you to customize the behavior of the `completions` plugin, which provides commands for generating shell completion scripts for the CLI application. You can specify which shells to generate completions for, and other related settings.
|
|
82
|
-
*/
|
|
83
|
-
completions?: Pick<CompletionsPluginOptions, "shells"> | false;
|
|
84
|
-
/**
|
|
85
|
-
* Configuration options for the `changelog` plugin. This field allows you to customize the behavior of the `changelog` plugin, which provides commands for displaying the application's changelog. You can specify the path to the changelog file, the command name, and other related settings.
|
|
86
|
-
*/
|
|
87
|
-
changelog?: ChangelogPluginOptions | false;
|
|
88
|
-
/**
|
|
89
|
-
* Configuration options for the `skills` plugin. This field allows you to customize the behavior of the `skills` plugin, which provides commands for managing and displaying the application's skills. You can specify the command name, and other related settings.
|
|
90
|
-
*
|
|
91
|
-
* @remarks
|
|
92
|
-
* If the `skills` plugin is enabled but the specified skills path does not exist, the plugin will be automatically disabled and a warning message will be logged. By default, the plugin looks for a `skills` directory in the current working directory.
|
|
93
|
-
*/
|
|
94
|
-
skills?: SkillsPluginOptions | false;
|
|
95
|
-
};
|
|
96
|
-
type CLIPresetUserConfig = UserConfig & ThemePluginUserConfig & ConsolePluginUserConfig & PromptsPluginUserConfig & BannerPluginUserConfig & HelpPluginUserConfig & CompletionsPluginUserConfig & ChangelogPluginUserConfig & SkillsPluginUserConfig & UpdatePluginUserConfig & CLIPresetOptions;
|
|
97
|
-
type CLIPresetResolvedConfig = ResolvedConfig & ThemePluginResolvedConfig & ConsolePluginResolvedConfig & PromptsPluginResolvedConfig & BannerPluginResolvedConfig & HelpPluginResolvedConfig & CompletionsPluginResolvedConfig & ChangelogPluginResolvedConfig & SkillsPluginResolvedConfig & UpdatePluginResolvedConfig & Required<CLIPresetOptions>;
|
|
98
|
-
type CLIPresetContext<TResolvedConfig extends CLIPresetResolvedConfig = CLIPresetResolvedConfig> = Context<TResolvedConfig> & ThemePluginContext<TResolvedConfig> & ConsolePluginContext<TResolvedConfig> & PromptsPluginContext<TResolvedConfig> & BannerPluginContext<TResolvedConfig> & HelpPluginContext<TResolvedConfig> & CompletionsPluginContext<TResolvedConfig> & ChangelogPluginContext<TResolvedConfig> & SkillsPluginContext<TResolvedConfig> & UpdatePluginContext<TResolvedConfig>;
|
|
99
|
-
//#endregion
|
|
100
|
-
export { CLIPresetBannerFontOption, CLIPresetBannerOption, CLIPresetBannerOverrideOption, CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpdateType };
|
|
101
|
-
//# sourceMappingURL=plugin.d.mts.map
|
|
1
|
+
import { a as CLIPresetOptions, c as UpdateType, i as CLIPresetContext, n as CLIPresetBannerOption, o as CLIPresetResolvedConfig, r as CLIPresetBannerOverrideOption, s as CLIPresetUserConfig, t as CLIPresetBannerFontOption } from "../plugin-BUwcMpPx.mjs";
|
|
2
|
+
export { CLIPresetBannerFontOption, CLIPresetBannerOption, CLIPresetBannerOverrideOption, CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpdateType };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shell-shock/preset-cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.36",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A package containing a Shell Shock plugin to generate source code given a list design tokens.",
|
|
6
6
|
"keywords": [
|
|
@@ -143,6 +143,34 @@
|
|
|
143
143
|
"default": "./dist/components/virtual-command-entry.mjs"
|
|
144
144
|
}
|
|
145
145
|
},
|
|
146
|
+
"./generator": {
|
|
147
|
+
"require": {
|
|
148
|
+
"types": "./dist/generator.d.cts",
|
|
149
|
+
"default": "./dist/generator.cjs"
|
|
150
|
+
},
|
|
151
|
+
"import": {
|
|
152
|
+
"types": "./dist/generator.d.mts",
|
|
153
|
+
"default": "./dist/generator.mjs"
|
|
154
|
+
},
|
|
155
|
+
"default": {
|
|
156
|
+
"types": "./dist/generator.d.mts",
|
|
157
|
+
"default": "./dist/generator.mjs"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"./helpers/get-global-options": {
|
|
161
|
+
"require": {
|
|
162
|
+
"types": "./dist/helpers/get-global-options.d.cts",
|
|
163
|
+
"default": "./dist/helpers/get-global-options.cjs"
|
|
164
|
+
},
|
|
165
|
+
"import": {
|
|
166
|
+
"types": "./dist/helpers/get-global-options.d.mts",
|
|
167
|
+
"default": "./dist/helpers/get-global-options.mjs"
|
|
168
|
+
},
|
|
169
|
+
"default": {
|
|
170
|
+
"types": "./dist/helpers/get-global-options.d.mts",
|
|
171
|
+
"default": "./dist/helpers/get-global-options.mjs"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
146
174
|
"./package.json": "./package.json",
|
|
147
175
|
"./types": {
|
|
148
176
|
"require": {
|
|
@@ -179,32 +207,32 @@
|
|
|
179
207
|
"typings": "dist/index.d.mts",
|
|
180
208
|
"files": ["dist"],
|
|
181
209
|
"dependencies": {
|
|
182
|
-
"@alloy-js/core": "^0.
|
|
183
|
-
"@alloy-js/typescript": "^0.
|
|
184
|
-
"@
|
|
185
|
-
"@powerlines/plugin-alloy": "^0.26.
|
|
186
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
187
|
-
"@shell-shock/core": "0.17.
|
|
188
|
-
"@shell-shock/plugin-banner": "0.1.
|
|
189
|
-
"@shell-shock/plugin-changelog": "0.1.
|
|
190
|
-
"@shell-shock/plugin-completions": "0.4.
|
|
191
|
-
"@shell-shock/plugin-console": "0.2.
|
|
192
|
-
"@shell-shock/plugin-help": "0.2.
|
|
193
|
-
"@shell-shock/plugin-prompts": "0.3.
|
|
194
|
-
"@shell-shock/plugin-skills": "0.0.
|
|
195
|
-
"@shell-shock/plugin-theme": "0.4.
|
|
196
|
-
"@shell-shock/plugin-update": "0.1.
|
|
197
|
-
"@shell-shock/preset-script": "0.6.
|
|
198
|
-
"@stryke/path": "^0.29.
|
|
199
|
-
"@stryke/string-format": "^0.17.
|
|
200
|
-
"@stryke/type-checks": "^0.6.
|
|
201
|
-
"@stryke/types": "^0.12.
|
|
210
|
+
"@alloy-js/core": "^0.24.1",
|
|
211
|
+
"@alloy-js/typescript": "^0.24.0",
|
|
212
|
+
"@power-plant/alloy-js": "^0.0.87",
|
|
213
|
+
"@powerlines/plugin-alloy": "^0.26.309",
|
|
214
|
+
"@powerlines/plugin-plugin": "^0.12.624",
|
|
215
|
+
"@shell-shock/core": "0.17.24",
|
|
216
|
+
"@shell-shock/plugin-banner": "0.1.51",
|
|
217
|
+
"@shell-shock/plugin-changelog": "0.1.27",
|
|
218
|
+
"@shell-shock/plugin-completions": "0.4.32",
|
|
219
|
+
"@shell-shock/plugin-console": "0.2.28",
|
|
220
|
+
"@shell-shock/plugin-help": "0.2.42",
|
|
221
|
+
"@shell-shock/plugin-prompts": "0.3.65",
|
|
222
|
+
"@shell-shock/plugin-skills": "0.0.15",
|
|
223
|
+
"@shell-shock/plugin-theme": "0.4.37",
|
|
224
|
+
"@shell-shock/plugin-update": "0.1.69",
|
|
225
|
+
"@shell-shock/preset-script": "0.6.79",
|
|
226
|
+
"@stryke/path": "^0.29.35",
|
|
227
|
+
"@stryke/string-format": "^0.17.50",
|
|
228
|
+
"@stryke/type-checks": "^0.6.41",
|
|
229
|
+
"@stryke/types": "^0.12.36",
|
|
202
230
|
"defu": "^6.1.7",
|
|
203
|
-
"figlet": "^1.11.
|
|
204
|
-
"powerlines": "^0.47.
|
|
231
|
+
"figlet": "^1.11.4",
|
|
232
|
+
"powerlines": "^0.47.211",
|
|
205
233
|
"strip-ansi": "^7.2.0"
|
|
206
234
|
},
|
|
207
|
-
"devDependencies": { "@stryke/types": "^0.12.
|
|
235
|
+
"devDependencies": { "@stryke/types": "^0.12.36", "@types/node": "^25.9.5" },
|
|
208
236
|
"publishConfig": { "access": "public" },
|
|
209
|
-
"gitHead": "
|
|
237
|
+
"gitHead": "06592cb0cccc2c7e9297af4c5138550e86fa4eec"
|
|
210
238
|
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
//#region \0rolldown/runtime.js
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
-
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
-
key = keys[i];
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
-
__defProp(to, key, {
|
|
14
|
-
get: ((k) => from[k]).bind(null, key),
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
-
value: mod,
|
|
24
|
-
enumerable: true
|
|
25
|
-
}) : target, mod));
|
|
26
|
-
|
|
27
|
-
//#endregion
|
|
28
|
-
|
|
29
|
-
exports.__toESM = __toESM;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command-entry.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"virtual-command-entry.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;;;;;;;;;;KA+EY,UAAA;AAAA,KAEA,yBAAA;AAAA,UAeK,qBAAA,SAA8B,aAAa;EAjBtC;;;EAqBpB,IAAI;AAAA;AAAA,UAGW,6BAAA;;;AAtBoB;EA0BnC,QAAQ;AAAA;AAAA,KAGE,gBAAA,GAAmB,IAAA,CAAK,mBAAA,qBAClC,iBAAA,GACA,oBAAA,GACA,mBAAA;EAjB6C;AAIzC;AAGN;;;;AAIU;AAGV;;;;EAeI,WAAA;EAdF;;;;;;;;;;;;;;EA8BE,aAAA,GACI,aAAA,OACE,OAAA,EAAS,OAAA,EAAS,KAAA,EAAO,WAAA,KAAgB,aAAA;EA2CnB;;;;;;;;;;;EA7B5B,UAAA,GAAa,UAAA;EAdW;;;;;;;;;EAyBxB,MAAA,YAAkB,qBAAA,GAAwB,6BAAA;EAU1C;;;EALA,WAAA,GAAc,IAAA,CAAK,wBAAA;EAaS;AAAA;AAGhC;EAXI,SAAA,GAAY,sBAAA;;;;;;;EAQZ,MAAA,GAAS,mBAAA;AAAA;AAAA,KAGD,mBAAA,GAAsB,UAAA,GAChC,qBAAA,GACA,uBAAA,GACA,uBAAA,GACA,sBAAA,GACA,oBAAA,GACA,2BAAA,GACA,yBAAA,GACA,sBAAA,GACA,sBAAA,GACA,gBAAA;AAAA,KAEU,uBAAA,GAA0B,cAAA,GACpC,yBAAA,GACA,2BAAA,GACA,2BAAA,GACA,0BAAA,GACA,wBAAA,GACA,+BAAA,GACA,6BAAA,GACA,0BAAA,GACA,0BAAA,GACA,QAAA,CAAS,gBAAA;AAAA,KAEC,gBAAA,yBACc,uBAAA,GAA0B,uBAAA,IAChD,OAAA,CAAQ,eAAA,IACV,kBAAA,CAAmB,eAAA,IACnB,oBAAA,CAAqB,eAAA,IACrB,oBAAA,CAAqB,eAAA,IACrB,mBAAA,CAAoB,eAAA,IACpB,iBAAA,CAAkB,eAAA,IAClB,wBAAA,CAAyB,eAAA,IACzB,sBAAA,CAAuB,eAAA,IACvB,mBAAA,CAAoB,eAAA,IACpB,mBAAA,CAAoB,eAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":""}
|