@shell-shock/preset-cli 0.9.31 → 0.9.33
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/components/banner-builtin.cjs +39 -11
- package/dist/components/banner-builtin.d.cts.map +1 -1
- package/dist/components/banner-builtin.mjs +36 -9
- package/dist/components/command-entry.cjs +1 -1
- package/dist/components/virtual-command-entry.cjs +1 -1
- package/dist/index.cjs +7 -7
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.mts +2 -2
- package/dist/types/plugin.d.cts +8 -2
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +8 -2
- package/package.json +20 -19
|
@@ -2,6 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
4
4
|
let _alloy_js_core = require("@alloy-js/core");
|
|
5
|
+
let _alloy_js_typescript = require("@alloy-js/typescript");
|
|
5
6
|
let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
|
|
6
7
|
let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
7
8
|
let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
|
|
@@ -11,9 +12,11 @@ let _shell_shock_plugin_banner_components_banner_function_declaration = require(
|
|
|
11
12
|
let _shell_shock_plugin_theme_contexts_theme = require("@shell-shock/plugin-theme/contexts/theme");
|
|
12
13
|
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
13
14
|
let defu = require("defu");
|
|
14
|
-
defu = require_runtime.__toESM(defu);
|
|
15
|
+
defu = require_runtime.__toESM(defu, 1);
|
|
15
16
|
let figlet = require("figlet");
|
|
16
|
-
figlet = require_runtime.__toESM(figlet);
|
|
17
|
+
figlet = require_runtime.__toESM(figlet, 1);
|
|
18
|
+
let strip_ansi = require("strip-ansi");
|
|
19
|
+
strip_ansi = require_runtime.__toESM(strip_ansi, 1);
|
|
17
20
|
|
|
18
21
|
//#region src/components/banner-builtin.tsx
|
|
19
22
|
/**
|
|
@@ -27,11 +30,6 @@ function BannerFunctionBodyDeclaration(props) {
|
|
|
27
30
|
const footer = (0, _alloy_js_core.computed)(() => theme.labels.banner.footer[variant]);
|
|
28
31
|
const title = (0, _alloy_js_core.computed)(() => (0, _shell_shock_core_plugin_utils.getAppTitle)(context, true).replace(`v${context.packageJson.version || "1.0.0"}`, ""));
|
|
29
32
|
const description = (0, _alloy_js_core.computed)(() => command?.description || (0, _shell_shock_core_plugin_utils.getAppDescription)(context));
|
|
30
|
-
const titleLines = (0, _alloy_js_core.computed)(() => {
|
|
31
|
-
const result = figlet.default.textSync((0, _stryke_type_checks_is_set_string.isSetString)(context.config.banner) ? context.config.banner : (0, _stryke_type_checks_is_set_object.isSetObject)(context.config.banner) && (0, _stryke_type_checks_is_set_string.isSetString)(context.config.banner.text) ? context.config.banner.text : (0, _shell_shock_core_plugin_utils.getAppTitle)(context, true), (0, defu.default)((0, _stryke_type_checks_is_set_object.isSetObject)(context.config.banner) ? context.config.banner : {}, { font: "ANSI Compact" }));
|
|
32
|
-
if (!result) return [`${(0, _shell_shock_core_plugin_utils.getAppTitle)(context, true)} Command-Line Interface`];
|
|
33
|
-
return result.split("\n").filter((line) => line.trim().length > 0);
|
|
34
|
-
});
|
|
35
33
|
const bannerPadding = (0, _alloy_js_core.computed)(() => Math.max(theme.padding.app, 0) * 2 + (theme.borderStyles.banner.outline[variant]?.left.length ?? 0) + (theme.borderStyles.banner.outline[variant]?.right.length ?? 0));
|
|
36
34
|
const totalPadding = (0, _alloy_js_core.computed)(() => Math.max(theme.padding.banner, 0) * 2 + bannerPadding.value);
|
|
37
35
|
return (0, _alloy_js_core_jsx_runtime.createComponent)(_shell_shock_plugin_banner_components_banner_function_declaration.BannerFunctionBodyDeclaration, {
|
|
@@ -54,8 +52,8 @@ function BannerFunctionBodyDeclaration(props) {
|
|
|
54
52
|
},
|
|
55
53
|
insertNewlineAfterDescription: true,
|
|
56
54
|
get children() {
|
|
57
|
-
return _alloy_js_core.code`
|
|
58
|
-
const title = Math.max(...
|
|
55
|
+
return _alloy_js_core.code`
|
|
56
|
+
const title = Math.max(...TITLE_LINES.map(line => stripAnsi(line).length)) > Math.max(getTerminalSize().columns + ${totalPadding.value}, 20) ? "${title.value}" : \`\\n\${TITLE_LINES\.join("\\n")}\\n\`;
|
|
59
57
|
|
|
60
58
|
splitText(title,
|
|
61
59
|
Math.max(getTerminalSize().columns - ${totalPadding.value}, 20)
|
|
@@ -70,10 +68,40 @@ function BannerFunctionBodyDeclaration(props) {
|
|
|
70
68
|
*/
|
|
71
69
|
function BannerBuiltin(props) {
|
|
72
70
|
const [{ command, children }, rest] = (0, _alloy_js_core.splitProps)(props, ["command", "children"]);
|
|
71
|
+
const context = (0, _powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
|
|
72
|
+
const titleLines = (0, _alloy_js_core.computed)(() => {
|
|
73
|
+
const result = figlet.default.textSync((0, _stryke_type_checks_is_set_object.isSetObject)(context.config.banner) && (0, _stryke_type_checks_is_set_string.isSetString)(context.config.banner.override) ? context.config.banner.override : (0, _stryke_type_checks_is_set_string.isSetString)(context.config.banner) ? context.config.banner : (0, _stryke_type_checks_is_set_object.isSetObject)(context.config.banner) && (0, _stryke_type_checks_is_set_string.isSetString)(context.config.banner.text) ? context.config.banner.text : (0, _shell_shock_core_plugin_utils.getAppTitle)(context, true), (0, defu.default)((0, _stryke_type_checks_is_set_object.isSetObject)(context.config.banner) ? context.config.banner : {}, { font: "ANSI Compact" }));
|
|
74
|
+
if (!result) return [`${(0, _shell_shock_core_plugin_utils.getAppTitle)(context, true)} Command-Line Interface`];
|
|
75
|
+
const lines = result.trim().split("\n");
|
|
76
|
+
const maxLength = Math.max(...lines.map((line) => (0, strip_ansi.default)(line).length));
|
|
77
|
+
return lines.map((line) => {
|
|
78
|
+
const paddingNeeded = maxLength - (0, strip_ansi.default)(line).length;
|
|
79
|
+
const leftPadding = Math.floor(paddingNeeded / 2);
|
|
80
|
+
const rightPadding = Math.ceil(paddingNeeded / 2);
|
|
81
|
+
return " ".repeat(leftPadding) + line + " ".repeat(rightPadding);
|
|
82
|
+
});
|
|
83
|
+
});
|
|
73
84
|
return (0, _alloy_js_core_jsx_runtime.createComponent)(_shell_shock_plugin_banner_components_banner_builtin.BannerBuiltin, (0, _alloy_js_core_jsx_runtime.mergeProps)(rest, {
|
|
85
|
+
get builtinImports() {
|
|
86
|
+
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!command?.path)() ? (0, defu.default)(rest.builtinImports ?? {}, { banner: ["TITLE_LINES"] }) : rest.builtinImports;
|
|
87
|
+
},
|
|
74
88
|
command,
|
|
75
89
|
get children() {
|
|
76
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
90
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
91
|
+
get when() {
|
|
92
|
+
return !command?.path;
|
|
93
|
+
},
|
|
94
|
+
get children() {
|
|
95
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
96
|
+
"const": true,
|
|
97
|
+
"export": true,
|
|
98
|
+
name: "TITLE_LINES",
|
|
99
|
+
get initializer() {
|
|
100
|
+
return _alloy_js_core.code` [${titleLines.value.map((line) => JSON.stringify(line)).join(", ")}];`;
|
|
101
|
+
}
|
|
102
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {})];
|
|
103
|
+
}
|
|
104
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_shell_shock_plugin_banner_components_banner_function_declaration.BannerFunctionDeclarationWrapper, {
|
|
77
105
|
command,
|
|
78
106
|
get children() {
|
|
79
107
|
return [
|
|
@@ -87,7 +115,7 @@ function BannerBuiltin(props) {
|
|
|
87
115
|
})
|
|
88
116
|
];
|
|
89
117
|
}
|
|
90
|
-
});
|
|
118
|
+
})];
|
|
91
119
|
}
|
|
92
120
|
}));
|
|
93
121
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banner-builtin.d.cts","names":[],"sources":["../../src/components/banner-builtin.tsx"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"banner-builtin.d.cts","names":[],"sources":["../../src/components/banner-builtin.tsx"],"mappings":";;;;;;;AA0CA;iBAAgB,6BAAA,CACd,KAAA,EAAO,IAAI,CACT,kCAAA,kEAED,QAAA;AAAA,KAsES,kBAAA,GAAqB,IAAA,CAC/B,gBAAA;EA1EW;;;EAgFX,OAAA,EAAS,WAAA;AAAA;;AA7ER;AAsEH;iBAagB,aAAA,CAAc,KAAA,EAAO,kBAAkB,4BAAA,QAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createComponent, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
2
2
|
import { Show, code, computed, splitProps } from "@alloy-js/core";
|
|
3
|
+
import { VarDeclaration } from "@alloy-js/typescript";
|
|
3
4
|
import { getAppDescription, getAppTitle } from "@shell-shock/core/plugin-utils";
|
|
4
5
|
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
5
6
|
import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
|
|
@@ -10,6 +11,7 @@ import { useTheme } from "@shell-shock/plugin-theme/contexts/theme";
|
|
|
10
11
|
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
11
12
|
import defu from "defu";
|
|
12
13
|
import figlet from "figlet";
|
|
14
|
+
import stripAnsi from "strip-ansi";
|
|
13
15
|
|
|
14
16
|
//#region src/components/banner-builtin.tsx
|
|
15
17
|
/**
|
|
@@ -23,11 +25,6 @@ function BannerFunctionBodyDeclaration(props) {
|
|
|
23
25
|
const footer = computed(() => theme.labels.banner.footer[variant]);
|
|
24
26
|
const title = computed(() => getAppTitle(context, true).replace(`v${context.packageJson.version || "1.0.0"}`, ""));
|
|
25
27
|
const description = computed(() => command?.description || getAppDescription(context));
|
|
26
|
-
const titleLines = computed(() => {
|
|
27
|
-
const result = figlet.textSync(isSetString(context.config.banner) ? context.config.banner : isSetObject(context.config.banner) && isSetString(context.config.banner.text) ? context.config.banner.text : getAppTitle(context, true), defu(isSetObject(context.config.banner) ? context.config.banner : {}, { font: "ANSI Compact" }));
|
|
28
|
-
if (!result) return [`${getAppTitle(context, true)} Command-Line Interface`];
|
|
29
|
-
return result.split("\n").filter((line) => line.trim().length > 0);
|
|
30
|
-
});
|
|
31
28
|
const bannerPadding = computed(() => Math.max(theme.padding.app, 0) * 2 + (theme.borderStyles.banner.outline[variant]?.left.length ?? 0) + (theme.borderStyles.banner.outline[variant]?.right.length ?? 0));
|
|
32
29
|
const totalPadding = computed(() => Math.max(theme.padding.banner, 0) * 2 + bannerPadding.value);
|
|
33
30
|
return createComponent(BannerFunctionBodyDeclaration$1, {
|
|
@@ -50,8 +47,8 @@ function BannerFunctionBodyDeclaration(props) {
|
|
|
50
47
|
},
|
|
51
48
|
insertNewlineAfterDescription: true,
|
|
52
49
|
get children() {
|
|
53
|
-
return code`
|
|
54
|
-
const title = Math.max(...
|
|
50
|
+
return code`
|
|
51
|
+
const title = Math.max(...TITLE_LINES.map(line => stripAnsi(line).length)) > Math.max(getTerminalSize().columns + ${totalPadding.value}, 20) ? "${title.value}" : \`\\n\${TITLE_LINES\.join("\\n")}\\n\`;
|
|
55
52
|
|
|
56
53
|
splitText(title,
|
|
57
54
|
Math.max(getTerminalSize().columns - ${totalPadding.value}, 20)
|
|
@@ -66,10 +63,40 @@ function BannerFunctionBodyDeclaration(props) {
|
|
|
66
63
|
*/
|
|
67
64
|
function BannerBuiltin(props) {
|
|
68
65
|
const [{ command, children }, rest] = splitProps(props, ["command", "children"]);
|
|
66
|
+
const context = usePowerlines();
|
|
67
|
+
const titleLines = computed(() => {
|
|
68
|
+
const result = figlet.textSync(isSetObject(context.config.banner) && isSetString(context.config.banner.override) ? context.config.banner.override : isSetString(context.config.banner) ? context.config.banner : isSetObject(context.config.banner) && isSetString(context.config.banner.text) ? context.config.banner.text : getAppTitle(context, true), defu(isSetObject(context.config.banner) ? context.config.banner : {}, { font: "ANSI Compact" }));
|
|
69
|
+
if (!result) return [`${getAppTitle(context, true)} Command-Line Interface`];
|
|
70
|
+
const lines = result.trim().split("\n");
|
|
71
|
+
const maxLength = Math.max(...lines.map((line) => stripAnsi(line).length));
|
|
72
|
+
return lines.map((line) => {
|
|
73
|
+
const paddingNeeded = maxLength - stripAnsi(line).length;
|
|
74
|
+
const leftPadding = Math.floor(paddingNeeded / 2);
|
|
75
|
+
const rightPadding = Math.ceil(paddingNeeded / 2);
|
|
76
|
+
return " ".repeat(leftPadding) + line + " ".repeat(rightPadding);
|
|
77
|
+
});
|
|
78
|
+
});
|
|
69
79
|
return createComponent(BannerBuiltin$1, mergeProps(rest, {
|
|
80
|
+
get builtinImports() {
|
|
81
|
+
return memo(() => !!command?.path)() ? defu(rest.builtinImports ?? {}, { banner: ["TITLE_LINES"] }) : rest.builtinImports;
|
|
82
|
+
},
|
|
70
83
|
command,
|
|
71
84
|
get children() {
|
|
72
|
-
return createComponent(
|
|
85
|
+
return [createComponent(Show, {
|
|
86
|
+
get when() {
|
|
87
|
+
return !command?.path;
|
|
88
|
+
},
|
|
89
|
+
get children() {
|
|
90
|
+
return [createComponent(VarDeclaration, {
|
|
91
|
+
"const": true,
|
|
92
|
+
"export": true,
|
|
93
|
+
name: "TITLE_LINES",
|
|
94
|
+
get initializer() {
|
|
95
|
+
return code` [${titleLines.value.map((line) => JSON.stringify(line)).join(", ")}];`;
|
|
96
|
+
}
|
|
97
|
+
}), createComponent(Spacing, {})];
|
|
98
|
+
}
|
|
99
|
+
}), createComponent(BannerFunctionDeclarationWrapper, {
|
|
73
100
|
command,
|
|
74
101
|
get children() {
|
|
75
102
|
return [
|
|
@@ -83,7 +110,7 @@ function BannerBuiltin(props) {
|
|
|
83
110
|
})
|
|
84
111
|
];
|
|
85
112
|
}
|
|
86
|
-
});
|
|
113
|
+
})];
|
|
87
114
|
}
|
|
88
115
|
}));
|
|
89
116
|
}
|
|
@@ -9,7 +9,7 @@ let _stryke_path_join = require("@stryke/path/join");
|
|
|
9
9
|
let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
|
|
10
10
|
let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
|
|
11
11
|
let defu = require("defu");
|
|
12
|
-
defu = require_runtime.__toESM(defu);
|
|
12
|
+
defu = require_runtime.__toESM(defu, 1);
|
|
13
13
|
let _powerlines_plugin_alloy_typescript_components_entry_file = require("@powerlines/plugin-alloy/typescript/components/entry-file");
|
|
14
14
|
let _shell_shock_core_components_command_validation_logic = require("@shell-shock/core/components/command-validation-logic");
|
|
15
15
|
let _shell_shock_preset_script_components_command_entry = require("@shell-shock/preset-script/components/command-entry");
|
|
@@ -9,7 +9,7 @@ let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
|
|
|
9
9
|
let _stryke_path_join = require("@stryke/path/join");
|
|
10
10
|
let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
|
|
11
11
|
let defu = require("defu");
|
|
12
|
-
defu = require_runtime.__toESM(defu);
|
|
12
|
+
defu = require_runtime.__toESM(defu, 1);
|
|
13
13
|
let _stryke_string_format_pascal_case = require("@stryke/string-format/pascal-case");
|
|
14
14
|
let _powerlines_plugin_alloy_typescript_components_typescript_file = require("@powerlines/plugin-alloy/typescript/components/typescript-file");
|
|
15
15
|
let _shell_shock_preset_script_components_virtual_command_entry = require("@shell-shock/preset-script/components/virtual-command-entry");
|
package/dist/index.cjs
CHANGED
|
@@ -13,19 +13,19 @@ let _powerlines_plugin_alloy_core_components = require("@powerlines/plugin-alloy
|
|
|
13
13
|
let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
|
|
14
14
|
let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
|
|
15
15
|
let _shell_shock_plugin_changelog = require("@shell-shock/plugin-changelog");
|
|
16
|
-
_shell_shock_plugin_changelog = require_runtime.__toESM(_shell_shock_plugin_changelog);
|
|
16
|
+
_shell_shock_plugin_changelog = require_runtime.__toESM(_shell_shock_plugin_changelog, 1);
|
|
17
17
|
let _shell_shock_plugin_completions = require("@shell-shock/plugin-completions");
|
|
18
|
-
_shell_shock_plugin_completions = require_runtime.__toESM(_shell_shock_plugin_completions);
|
|
18
|
+
_shell_shock_plugin_completions = require_runtime.__toESM(_shell_shock_plugin_completions, 1);
|
|
19
19
|
let _shell_shock_plugin_console = require("@shell-shock/plugin-console");
|
|
20
|
-
_shell_shock_plugin_console = require_runtime.__toESM(_shell_shock_plugin_console);
|
|
20
|
+
_shell_shock_plugin_console = require_runtime.__toESM(_shell_shock_plugin_console, 1);
|
|
21
21
|
let _shell_shock_plugin_help = require("@shell-shock/plugin-help");
|
|
22
|
-
_shell_shock_plugin_help = require_runtime.__toESM(_shell_shock_plugin_help);
|
|
22
|
+
_shell_shock_plugin_help = require_runtime.__toESM(_shell_shock_plugin_help, 1);
|
|
23
23
|
let _shell_shock_plugin_prompts = require("@shell-shock/plugin-prompts");
|
|
24
|
-
_shell_shock_plugin_prompts = require_runtime.__toESM(_shell_shock_plugin_prompts);
|
|
24
|
+
_shell_shock_plugin_prompts = require_runtime.__toESM(_shell_shock_plugin_prompts, 1);
|
|
25
25
|
let _shell_shock_plugin_skills = require("@shell-shock/plugin-skills");
|
|
26
|
-
_shell_shock_plugin_skills = require_runtime.__toESM(_shell_shock_plugin_skills);
|
|
26
|
+
_shell_shock_plugin_skills = require_runtime.__toESM(_shell_shock_plugin_skills, 1);
|
|
27
27
|
let _shell_shock_plugin_update = require("@shell-shock/plugin-update");
|
|
28
|
-
_shell_shock_plugin_update = require_runtime.__toESM(_shell_shock_plugin_update);
|
|
28
|
+
_shell_shock_plugin_update = require_runtime.__toESM(_shell_shock_plugin_update, 1);
|
|
29
29
|
let _shell_shock_preset_script_components_bin_entry = require("@shell-shock/preset-script/components/bin-entry");
|
|
30
30
|
let _stryke_path_join = require("@stryke/path/join");
|
|
31
31
|
let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CLIPresetBannerFontOption, CLIPresetBannerOption, CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpdateType } from "./plugin.cjs";
|
|
2
|
-
export { CLIPresetBannerFontOption, CLIPresetBannerOption, CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpdateType };
|
|
1
|
+
import { CLIPresetBannerFontOption, CLIPresetBannerOption, CLIPresetBannerOverrideOption, CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpdateType } from "./plugin.cjs";
|
|
2
|
+
export { CLIPresetBannerFontOption, CLIPresetBannerOption, CLIPresetBannerOverrideOption, CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpdateType };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CLIPresetBannerFontOption, CLIPresetBannerOption, CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpdateType } from "./plugin.mjs";
|
|
2
|
-
export { CLIPresetBannerFontOption, CLIPresetBannerOption, CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpdateType };
|
|
1
|
+
import { CLIPresetBannerFontOption, CLIPresetBannerOption, CLIPresetBannerOverrideOption, CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpdateType } from "./plugin.mjs";
|
|
2
|
+
export { CLIPresetBannerFontOption, CLIPresetBannerOption, CLIPresetBannerOverrideOption, CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpdateType };
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -21,6 +21,12 @@ interface CLIPresetBannerOption extends FigletOptions {
|
|
|
21
21
|
*/
|
|
22
22
|
text?: string;
|
|
23
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
|
+
}
|
|
24
30
|
type CLIPresetOptions = Omit<ScriptPresetOptions, "globalOptions"> & HelpPluginOptions & PromptsPluginOptions & UpdatePluginOptions & {
|
|
25
31
|
/**
|
|
26
32
|
* The default interactive mode to apply to commands.
|
|
@@ -70,7 +76,7 @@ type CLIPresetOptions = Omit<ScriptPresetOptions, "globalOptions"> & HelpPluginO
|
|
|
70
76
|
* @remarks
|
|
71
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.
|
|
72
78
|
*/
|
|
73
|
-
banner?: string | CLIPresetBannerOption;
|
|
79
|
+
banner?: string | CLIPresetBannerOption | CLIPresetBannerOverrideOption;
|
|
74
80
|
/**
|
|
75
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.
|
|
76
82
|
*/
|
|
@@ -91,5 +97,5 @@ type CLIPresetUserConfig = UserConfig & ThemePluginUserConfig & ConsolePluginUse
|
|
|
91
97
|
type CLIPresetResolvedConfig = ResolvedConfig & ThemePluginResolvedConfig & ConsolePluginResolvedConfig & PromptsPluginResolvedConfig & BannerPluginResolvedConfig & HelpPluginResolvedConfig & CompletionsPluginResolvedConfig & ChangelogPluginResolvedConfig & SkillsPluginResolvedConfig & UpdatePluginResolvedConfig & Required<CLIPresetOptions>;
|
|
92
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>;
|
|
93
99
|
//#endregion
|
|
94
|
-
export { CLIPresetBannerFontOption, CLIPresetBannerOption, CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpdateType };
|
|
100
|
+
export { CLIPresetBannerFontOption, CLIPresetBannerOption, CLIPresetBannerOverrideOption, CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpdateType };
|
|
95
101
|
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -21,6 +21,12 @@ interface CLIPresetBannerOption extends FigletOptions {
|
|
|
21
21
|
*/
|
|
22
22
|
text?: string;
|
|
23
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
|
+
}
|
|
24
30
|
type CLIPresetOptions = Omit<ScriptPresetOptions, "globalOptions"> & HelpPluginOptions & PromptsPluginOptions & UpdatePluginOptions & {
|
|
25
31
|
/**
|
|
26
32
|
* The default interactive mode to apply to commands.
|
|
@@ -70,7 +76,7 @@ type CLIPresetOptions = Omit<ScriptPresetOptions, "globalOptions"> & HelpPluginO
|
|
|
70
76
|
* @remarks
|
|
71
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.
|
|
72
78
|
*/
|
|
73
|
-
banner?: string | CLIPresetBannerOption;
|
|
79
|
+
banner?: string | CLIPresetBannerOption | CLIPresetBannerOverrideOption;
|
|
74
80
|
/**
|
|
75
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.
|
|
76
82
|
*/
|
|
@@ -91,5 +97,5 @@ type CLIPresetUserConfig = UserConfig & ThemePluginUserConfig & ConsolePluginUse
|
|
|
91
97
|
type CLIPresetResolvedConfig = ResolvedConfig & ThemePluginResolvedConfig & ConsolePluginResolvedConfig & PromptsPluginResolvedConfig & BannerPluginResolvedConfig & HelpPluginResolvedConfig & CompletionsPluginResolvedConfig & ChangelogPluginResolvedConfig & SkillsPluginResolvedConfig & UpdatePluginResolvedConfig & Required<CLIPresetOptions>;
|
|
92
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>;
|
|
93
99
|
//#endregion
|
|
94
|
-
export { CLIPresetBannerFontOption, CLIPresetBannerOption, CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpdateType };
|
|
100
|
+
export { CLIPresetBannerFontOption, CLIPresetBannerOption, CLIPresetBannerOverrideOption, CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpdateType };
|
|
95
101
|
//# sourceMappingURL=plugin.d.mts.map
|
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.33",
|
|
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": [
|
|
@@ -177,33 +177,34 @@
|
|
|
177
177
|
"module": "./dist/index.mjs",
|
|
178
178
|
"types": "./dist/index.d.cts",
|
|
179
179
|
"typings": "dist/index.d.mts",
|
|
180
|
-
"files": ["dist
|
|
180
|
+
"files": ["dist"],
|
|
181
181
|
"dependencies": {
|
|
182
182
|
"@alloy-js/core": "^0.23.1",
|
|
183
183
|
"@alloy-js/typescript": "^0.23.0",
|
|
184
|
-
"@powerlines/deepkit": "^0.9.
|
|
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.
|
|
184
|
+
"@powerlines/deepkit": "^0.9.88",
|
|
185
|
+
"@powerlines/plugin-alloy": "^0.26.227",
|
|
186
|
+
"@powerlines/plugin-plugin": "^0.12.546",
|
|
187
|
+
"@shell-shock/core": "0.17.21",
|
|
188
|
+
"@shell-shock/plugin-banner": "0.1.48",
|
|
189
|
+
"@shell-shock/plugin-changelog": "0.1.24",
|
|
190
|
+
"@shell-shock/plugin-completions": "0.4.29",
|
|
191
|
+
"@shell-shock/plugin-console": "0.2.25",
|
|
192
|
+
"@shell-shock/plugin-help": "0.2.39",
|
|
193
|
+
"@shell-shock/plugin-prompts": "0.3.62",
|
|
194
|
+
"@shell-shock/plugin-skills": "0.0.12",
|
|
195
|
+
"@shell-shock/plugin-theme": "0.4.34",
|
|
196
|
+
"@shell-shock/plugin-update": "0.1.66",
|
|
197
|
+
"@shell-shock/preset-script": "0.6.76",
|
|
198
198
|
"@stryke/path": "^0.29.11",
|
|
199
199
|
"@stryke/string-format": "^0.17.26",
|
|
200
200
|
"@stryke/type-checks": "^0.6.17",
|
|
201
201
|
"@stryke/types": "^0.12.12",
|
|
202
202
|
"defu": "^6.1.7",
|
|
203
203
|
"figlet": "^1.11.0",
|
|
204
|
-
"powerlines": "^0.47.
|
|
204
|
+
"powerlines": "^0.47.134",
|
|
205
|
+
"strip-ansi": "^7.2.0"
|
|
205
206
|
},
|
|
206
|
-
"devDependencies": { "@stryke/types": "^0.12.12", "@types/node": "^25.9.
|
|
207
|
+
"devDependencies": { "@stryke/types": "^0.12.12", "@types/node": "^25.9.3" },
|
|
207
208
|
"publishConfig": { "access": "public" },
|
|
208
|
-
"gitHead": "
|
|
209
|
+
"gitHead": "0876468f621d3b455f99de7dc3ebdd3af8883842"
|
|
209
210
|
}
|