@shell-shock/preset-cli 0.9.20 → 0.9.23
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/_virtual/_rolldown/runtime.cjs +29 -1
- package/dist/components/banner-builtin.cjs +92 -5
- package/dist/components/banner-builtin.d.cts +2 -3
- package/dist/components/banner-builtin.d.cts.map +1 -1
- package/dist/components/banner-builtin.d.mts +3 -4
- package/dist/components/banner-builtin.d.mts.map +1 -1
- package/dist/components/banner-builtin.mjs +90 -5
- package/dist/components/banner-builtin.mjs.map +1 -1
- package/dist/components/command-entry.cjs +358 -56
- 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.d.mts.map +1 -1
- package/dist/components/command-entry.mjs +355 -56
- package/dist/components/command-entry.mjs.map +1 -1
- package/dist/components/command-router.cjs +59 -4
- package/dist/components/command-router.d.cts +2 -3
- package/dist/components/command-router.d.cts.map +1 -1
- package/dist/components/command-router.d.mts +3 -4
- package/dist/components/command-router.d.mts.map +1 -1
- package/dist/components/command-router.mjs +57 -4
- package/dist/components/command-router.mjs.map +1 -1
- package/dist/components/index.cjs +15 -1
- package/dist/components/index.mjs +7 -1
- package/dist/components/upgrade-builtin.cjs +134 -14
- package/dist/components/upgrade-builtin.d.cts +2 -3
- package/dist/components/upgrade-builtin.d.cts.map +1 -1
- package/dist/components/upgrade-builtin.d.mts +2 -3
- package/dist/components/upgrade-builtin.d.mts.map +1 -1
- package/dist/components/upgrade-builtin.mjs +132 -14
- package/dist/components/upgrade-builtin.mjs.map +1 -1
- package/dist/components/virtual-command-entry.cjs +116 -1
- 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.d.mts.map +1 -1
- package/dist/components/virtual-command-entry.mjs +113 -1
- package/dist/components/virtual-command-entry.mjs.map +1 -1
- package/dist/helpers/get-global-options.cjs +37 -1
- package/dist/helpers/get-global-options.mjs +37 -1
- package/dist/helpers/get-global-options.mjs.map +1 -1
- package/dist/index.cjs +185 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +175 -1
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/types/plugin.d.cts +11 -3
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +12 -4
- package/dist/types/plugin.d.mts.map +1 -1
- package/dist/types/plugin.mjs +1 -1
- package/package.json +24 -23
package/dist/index.cjs
CHANGED
|
@@ -1 +1,185 @@
|
|
|
1
|
-
Object.defineProperties(exports,
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_components_banner_builtin = require('./components/banner-builtin.cjs');
|
|
4
|
+
const require_components_command_router = require('./components/command-router.cjs');
|
|
5
|
+
const require_components_virtual_command_entry = require('./components/virtual-command-entry.cjs');
|
|
6
|
+
const require_components_command_entry = require('./components/command-entry.cjs');
|
|
7
|
+
const require_components_upgrade_builtin = require('./components/upgrade-builtin.cjs');
|
|
8
|
+
const require_get_global_options = require('./helpers/get-global-options.cjs');
|
|
9
|
+
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
10
|
+
let _alloy_js_core = require("@alloy-js/core");
|
|
11
|
+
let _alloy_js_typescript = require("@alloy-js/typescript");
|
|
12
|
+
let _powerlines_plugin_alloy_core_components = require("@powerlines/plugin-alloy/core/components");
|
|
13
|
+
let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
|
|
14
|
+
let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
|
|
15
|
+
let _shell_shock_plugin_changelog = require("@shell-shock/plugin-changelog");
|
|
16
|
+
_shell_shock_plugin_changelog = require_runtime.__toESM(_shell_shock_plugin_changelog);
|
|
17
|
+
let _shell_shock_plugin_completions = require("@shell-shock/plugin-completions");
|
|
18
|
+
_shell_shock_plugin_completions = require_runtime.__toESM(_shell_shock_plugin_completions);
|
|
19
|
+
let _shell_shock_plugin_console = require("@shell-shock/plugin-console");
|
|
20
|
+
_shell_shock_plugin_console = require_runtime.__toESM(_shell_shock_plugin_console);
|
|
21
|
+
let _shell_shock_plugin_help = require("@shell-shock/plugin-help");
|
|
22
|
+
_shell_shock_plugin_help = require_runtime.__toESM(_shell_shock_plugin_help);
|
|
23
|
+
let _shell_shock_plugin_prompts = require("@shell-shock/plugin-prompts");
|
|
24
|
+
_shell_shock_plugin_prompts = require_runtime.__toESM(_shell_shock_plugin_prompts);
|
|
25
|
+
let _shell_shock_plugin_skills = require("@shell-shock/plugin-skills");
|
|
26
|
+
_shell_shock_plugin_skills = require_runtime.__toESM(_shell_shock_plugin_skills);
|
|
27
|
+
let _shell_shock_plugin_upgrade = require("@shell-shock/plugin-upgrade");
|
|
28
|
+
_shell_shock_plugin_upgrade = require_runtime.__toESM(_shell_shock_plugin_upgrade);
|
|
29
|
+
let _shell_shock_preset_script_components_bin_entry = require("@shell-shock/preset-script/components/bin-entry");
|
|
30
|
+
let _stryke_path_join = require("@stryke/path/join");
|
|
31
|
+
let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
32
|
+
let node_fs = require("node:fs");
|
|
33
|
+
let powerlines = require("powerlines");
|
|
34
|
+
|
|
35
|
+
//#region src/index.tsx
|
|
36
|
+
/**
|
|
37
|
+
* The Shell Shock CLI Preset plugin.
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* This preset includes a set of built-in modules and commands to create a CLI application, as well as configuration options to customize the generated code. It also includes the `prompts` plugin to provide interactive prompts in the CLI application, and the `upgrade` plugin to manage upgrading the local application's version.
|
|
41
|
+
*/
|
|
42
|
+
const plugin = (options = {}) => {
|
|
43
|
+
return [
|
|
44
|
+
...(0, _shell_shock_plugin_console.default)(options),
|
|
45
|
+
...(0, _shell_shock_plugin_help.default)(options),
|
|
46
|
+
...(0, _shell_shock_plugin_prompts.default)(options),
|
|
47
|
+
...(0, powerlines.enable)((0, _shell_shock_plugin_changelog.default)(options.changelog), options.changelog !== false),
|
|
48
|
+
...(0, powerlines.enable)((0, _shell_shock_plugin_completions.default)(options.completions), options.completions !== false),
|
|
49
|
+
...(0, powerlines.enable)((0, _shell_shock_plugin_skills.default)(options.skills), options.skills !== false && (0, node_fs.existsSync)((0, _stryke_type_checks_is_set_object.isSetObject)(options.skills) && options.skills.path ? options.skills.path : (0, _stryke_path_join.joinPaths)(process.cwd(), "skills"))),
|
|
50
|
+
(0, _shell_shock_plugin_upgrade.default)(options),
|
|
51
|
+
{
|
|
52
|
+
name: "shell-shock/cli-preset:main",
|
|
53
|
+
config() {
|
|
54
|
+
this.debug("Providing default configuration for the Shell Shock `cli` preset.");
|
|
55
|
+
return {
|
|
56
|
+
globalOptions: require_get_global_options.getGlobalOptions,
|
|
57
|
+
isCaseSensitive: false,
|
|
58
|
+
...options,
|
|
59
|
+
env: {
|
|
60
|
+
config: "@shell-shock/plugin-upgrade/types/env#ShellShockUpgradeEnv",
|
|
61
|
+
validate: false
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
prepare: {
|
|
66
|
+
order: "post",
|
|
67
|
+
async handler() {
|
|
68
|
+
const _self$ = this;
|
|
69
|
+
this.debug("Rendering built-in modules.");
|
|
70
|
+
const commands = await (0, _shell_shock_core_plugin_utils.getCommandList)(this);
|
|
71
|
+
this.debug(`Rendering \`banner\` built-ins for each of the ${commands.length} command modules.`);
|
|
72
|
+
return (0, _powerlines_plugin_alloy_render.render)(this, [
|
|
73
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(require_components_upgrade_builtin.UpgradeBuiltin, {}),
|
|
74
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(require_components_banner_builtin.BannerBuiltin, { get command() {
|
|
75
|
+
return (0, _shell_shock_core_plugin_utils.computeBin)(_self$);
|
|
76
|
+
} }),
|
|
77
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
|
|
78
|
+
get each() {
|
|
79
|
+
return commands.sort((a, b) => a.name.localeCompare(b.name));
|
|
80
|
+
},
|
|
81
|
+
doubleHardline: true,
|
|
82
|
+
children: (command) => (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_banner_builtin.BannerBuiltin, { command })
|
|
83
|
+
})
|
|
84
|
+
]);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: "shell-shock/cli-preset:generate-entrypoint",
|
|
90
|
+
prepare: {
|
|
91
|
+
order: "post",
|
|
92
|
+
async handler() {
|
|
93
|
+
const _self$2 = this;
|
|
94
|
+
this.debug("Rendering entrypoint modules for the Shell Shock `cli` preset.");
|
|
95
|
+
return (0, _powerlines_plugin_alloy_render.render)(this, [(0, _alloy_js_core_jsx_runtime.createComponent)(_shell_shock_preset_script_components_bin_entry.BinEntry, {
|
|
96
|
+
builtinImports: {
|
|
97
|
+
console: [
|
|
98
|
+
"info",
|
|
99
|
+
"debug",
|
|
100
|
+
"warn",
|
|
101
|
+
"help",
|
|
102
|
+
"error",
|
|
103
|
+
"cursor",
|
|
104
|
+
"divider",
|
|
105
|
+
"stripAnsi",
|
|
106
|
+
"writeLine",
|
|
107
|
+
"splitText"
|
|
108
|
+
],
|
|
109
|
+
utils: ["isMinimal", "isInteractive"],
|
|
110
|
+
state: ["useArgs", "isHelp"],
|
|
111
|
+
prompts: [
|
|
112
|
+
"text",
|
|
113
|
+
"numeric",
|
|
114
|
+
"toggle",
|
|
115
|
+
"select",
|
|
116
|
+
"confirm",
|
|
117
|
+
"isCancel"
|
|
118
|
+
],
|
|
119
|
+
env: ["env", "paths"],
|
|
120
|
+
upgrade: ["executeUpgrade"]
|
|
121
|
+
},
|
|
122
|
+
get children() {
|
|
123
|
+
return [
|
|
124
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
125
|
+
get when() {
|
|
126
|
+
return Object.keys(_self$2.commands).length > 0;
|
|
127
|
+
},
|
|
128
|
+
get children() {
|
|
129
|
+
return [
|
|
130
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
131
|
+
"let": true,
|
|
132
|
+
name: "args",
|
|
133
|
+
type: "string[]",
|
|
134
|
+
initializer: _alloy_js_core.code`useArgs();`
|
|
135
|
+
}),
|
|
136
|
+
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
137
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(require_components_command_router.CommandRouter, {
|
|
138
|
+
segments: [],
|
|
139
|
+
get commands() {
|
|
140
|
+
return _self$2.commands ?? {};
|
|
141
|
+
}
|
|
142
|
+
}),
|
|
143
|
+
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
|
|
144
|
+
];
|
|
145
|
+
}
|
|
146
|
+
}),
|
|
147
|
+
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
148
|
+
_alloy_js_core.code`await showBanner(0);`,
|
|
149
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components.Spacing, {}),
|
|
150
|
+
_alloy_js_core.code`return showHelp(); `
|
|
151
|
+
];
|
|
152
|
+
}
|
|
153
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
154
|
+
get when() {
|
|
155
|
+
return Object.values(_self$2.commands).length > 0;
|
|
156
|
+
},
|
|
157
|
+
get children() {
|
|
158
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
|
|
159
|
+
get each() {
|
|
160
|
+
return Object.values(_self$2.commands);
|
|
161
|
+
},
|
|
162
|
+
doubleHardline: true,
|
|
163
|
+
children: (child) => (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
164
|
+
get when() {
|
|
165
|
+
return child.virtual;
|
|
166
|
+
},
|
|
167
|
+
get fallback() {
|
|
168
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_command_entry.CommandEntry, { command: child });
|
|
169
|
+
},
|
|
170
|
+
get children() {
|
|
171
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_virtual_command_entry.VirtualCommandEntry, { command: child });
|
|
172
|
+
}
|
|
173
|
+
})
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
})]);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
];
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
//#endregion
|
|
184
|
+
exports.default = plugin;
|
|
185
|
+
exports.plugin = plugin;
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AAsDA;;;;cAAa,MAAA,oBAA2B,gBAAA,GAAmB,gBAAA,EACzD,OAAA,GAAS,gBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":""}
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,176 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { BannerBuiltin } from "./components/banner-builtin.mjs";
|
|
2
|
+
import { CommandRouter } from "./components/command-router.mjs";
|
|
3
|
+
import { VirtualCommandEntry } from "./components/virtual-command-entry.mjs";
|
|
4
|
+
import { CommandEntry } from "./components/command-entry.mjs";
|
|
5
|
+
import { UpgradeBuiltin } from "./components/upgrade-builtin.mjs";
|
|
6
|
+
import { getGlobalOptions } from "./helpers/get-global-options.mjs";
|
|
7
|
+
import { createComponent, createIntrinsic, memo } from "@alloy-js/core/jsx-runtime";
|
|
8
|
+
import { For, Show, code } from "@alloy-js/core";
|
|
9
|
+
import { VarDeclaration } from "@alloy-js/typescript";
|
|
10
|
+
import { Spacing } from "@powerlines/plugin-alloy/core/components";
|
|
11
|
+
import { render } from "@powerlines/plugin-alloy/render";
|
|
12
|
+
import { computeBin, getCommandList } from "@shell-shock/core/plugin-utils";
|
|
13
|
+
import changelog from "@shell-shock/plugin-changelog";
|
|
14
|
+
import completions from "@shell-shock/plugin-completions";
|
|
15
|
+
import console from "@shell-shock/plugin-console";
|
|
16
|
+
import help from "@shell-shock/plugin-help";
|
|
17
|
+
import prompts from "@shell-shock/plugin-prompts";
|
|
18
|
+
import skills from "@shell-shock/plugin-skills";
|
|
19
|
+
import upgrade from "@shell-shock/plugin-upgrade";
|
|
20
|
+
import { BinEntry } from "@shell-shock/preset-script/components/bin-entry";
|
|
21
|
+
import { joinPaths } from "@stryke/path/join";
|
|
22
|
+
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
23
|
+
import { existsSync } from "node:fs";
|
|
24
|
+
import { enable } from "powerlines";
|
|
25
|
+
|
|
26
|
+
//#region src/index.tsx
|
|
27
|
+
/**
|
|
28
|
+
* The Shell Shock CLI Preset plugin.
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* This preset includes a set of built-in modules and commands to create a CLI application, as well as configuration options to customize the generated code. It also includes the `prompts` plugin to provide interactive prompts in the CLI application, and the `upgrade` plugin to manage upgrading the local application's version.
|
|
32
|
+
*/
|
|
33
|
+
const plugin = (options = {}) => {
|
|
34
|
+
return [
|
|
35
|
+
...console(options),
|
|
36
|
+
...help(options),
|
|
37
|
+
...prompts(options),
|
|
38
|
+
...enable(changelog(options.changelog), options.changelog !== false),
|
|
39
|
+
...enable(completions(options.completions), options.completions !== false),
|
|
40
|
+
...enable(skills(options.skills), options.skills !== false && existsSync(isSetObject(options.skills) && options.skills.path ? options.skills.path : joinPaths(process.cwd(), "skills"))),
|
|
41
|
+
upgrade(options),
|
|
42
|
+
{
|
|
43
|
+
name: "shell-shock/cli-preset:main",
|
|
44
|
+
config() {
|
|
45
|
+
this.debug("Providing default configuration for the Shell Shock `cli` preset.");
|
|
46
|
+
return {
|
|
47
|
+
globalOptions: getGlobalOptions,
|
|
48
|
+
isCaseSensitive: false,
|
|
49
|
+
...options,
|
|
50
|
+
env: {
|
|
51
|
+
config: "@shell-shock/plugin-upgrade/types/env#ShellShockUpgradeEnv",
|
|
52
|
+
validate: false
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
prepare: {
|
|
57
|
+
order: "post",
|
|
58
|
+
async handler() {
|
|
59
|
+
const _self$ = this;
|
|
60
|
+
this.debug("Rendering built-in modules.");
|
|
61
|
+
const commands = await getCommandList(this);
|
|
62
|
+
this.debug(`Rendering \`banner\` built-ins for each of the ${commands.length} command modules.`);
|
|
63
|
+
return render(this, [
|
|
64
|
+
createComponent(UpgradeBuiltin, {}),
|
|
65
|
+
createComponent(BannerBuiltin, { get command() {
|
|
66
|
+
return computeBin(_self$);
|
|
67
|
+
} }),
|
|
68
|
+
createComponent(For, {
|
|
69
|
+
get each() {
|
|
70
|
+
return commands.sort((a, b) => a.name.localeCompare(b.name));
|
|
71
|
+
},
|
|
72
|
+
doubleHardline: true,
|
|
73
|
+
children: (command) => createComponent(BannerBuiltin, { command })
|
|
74
|
+
})
|
|
75
|
+
]);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "shell-shock/cli-preset:generate-entrypoint",
|
|
81
|
+
prepare: {
|
|
82
|
+
order: "post",
|
|
83
|
+
async handler() {
|
|
84
|
+
const _self$2 = this;
|
|
85
|
+
this.debug("Rendering entrypoint modules for the Shell Shock `cli` preset.");
|
|
86
|
+
return render(this, [createComponent(BinEntry, {
|
|
87
|
+
builtinImports: {
|
|
88
|
+
console: [
|
|
89
|
+
"info",
|
|
90
|
+
"debug",
|
|
91
|
+
"warn",
|
|
92
|
+
"help",
|
|
93
|
+
"error",
|
|
94
|
+
"cursor",
|
|
95
|
+
"divider",
|
|
96
|
+
"stripAnsi",
|
|
97
|
+
"writeLine",
|
|
98
|
+
"splitText"
|
|
99
|
+
],
|
|
100
|
+
utils: ["isMinimal", "isInteractive"],
|
|
101
|
+
state: ["useArgs", "isHelp"],
|
|
102
|
+
prompts: [
|
|
103
|
+
"text",
|
|
104
|
+
"numeric",
|
|
105
|
+
"toggle",
|
|
106
|
+
"select",
|
|
107
|
+
"confirm",
|
|
108
|
+
"isCancel"
|
|
109
|
+
],
|
|
110
|
+
env: ["env", "paths"],
|
|
111
|
+
upgrade: ["executeUpgrade"]
|
|
112
|
+
},
|
|
113
|
+
get children() {
|
|
114
|
+
return [
|
|
115
|
+
createComponent(Show, {
|
|
116
|
+
get when() {
|
|
117
|
+
return Object.keys(_self$2.commands).length > 0;
|
|
118
|
+
},
|
|
119
|
+
get children() {
|
|
120
|
+
return [
|
|
121
|
+
createComponent(VarDeclaration, {
|
|
122
|
+
"let": true,
|
|
123
|
+
name: "args",
|
|
124
|
+
type: "string[]",
|
|
125
|
+
initializer: code`useArgs();`
|
|
126
|
+
}),
|
|
127
|
+
createIntrinsic("hbr", {}),
|
|
128
|
+
createComponent(CommandRouter, {
|
|
129
|
+
segments: [],
|
|
130
|
+
get commands() {
|
|
131
|
+
return _self$2.commands ?? {};
|
|
132
|
+
}
|
|
133
|
+
}),
|
|
134
|
+
createIntrinsic("hbr", {})
|
|
135
|
+
];
|
|
136
|
+
}
|
|
137
|
+
}),
|
|
138
|
+
createIntrinsic("hbr", {}),
|
|
139
|
+
code`await showBanner(0);`,
|
|
140
|
+
createComponent(Spacing, {}),
|
|
141
|
+
code`return showHelp(); `
|
|
142
|
+
];
|
|
143
|
+
}
|
|
144
|
+
}), createComponent(Show, {
|
|
145
|
+
get when() {
|
|
146
|
+
return Object.values(_self$2.commands).length > 0;
|
|
147
|
+
},
|
|
148
|
+
get children() {
|
|
149
|
+
return createComponent(For, {
|
|
150
|
+
get each() {
|
|
151
|
+
return Object.values(_self$2.commands);
|
|
152
|
+
},
|
|
153
|
+
doubleHardline: true,
|
|
154
|
+
children: (child) => createComponent(Show, {
|
|
155
|
+
get when() {
|
|
156
|
+
return child.virtual;
|
|
157
|
+
},
|
|
158
|
+
get fallback() {
|
|
159
|
+
return createComponent(CommandEntry, { command: child });
|
|
160
|
+
},
|
|
161
|
+
get children() {
|
|
162
|
+
return createComponent(VirtualCommandEntry, { command: child });
|
|
163
|
+
}
|
|
164
|
+
})
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
})]);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
];
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
//#endregion
|
|
175
|
+
export { plugin as default, plugin };
|
|
2
176
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":[
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":[],"mappings":""}
|
package/dist/types/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{};
|
|
1
|
+
export { };
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -6,6 +6,7 @@ import { CompletionsPluginContext, CompletionsPluginOptions, CompletionsPluginRe
|
|
|
6
6
|
import { ConsolePluginContext, ConsolePluginResolvedConfig, ConsolePluginUserConfig } from "@shell-shock/plugin-console";
|
|
7
7
|
import { HelpPluginContext, HelpPluginOptions, HelpPluginResolvedConfig, HelpPluginUserConfig } from "@shell-shock/plugin-help";
|
|
8
8
|
import { PromptsPluginContext, PromptsPluginOptions, PromptsPluginResolvedConfig, PromptsPluginUserConfig } from "@shell-shock/plugin-prompts/types/plugin";
|
|
9
|
+
import { SkillsPluginContext, SkillsPluginOptions, SkillsPluginResolvedConfig, SkillsPluginUserConfig } from "@shell-shock/plugin-skills";
|
|
9
10
|
import { ThemePluginContext, ThemePluginResolvedConfig, ThemePluginUserConfig } from "@shell-shock/plugin-theme/types/plugin";
|
|
10
11
|
import { UpgradePluginContext, UpgradePluginOptions, UpgradePluginResolvedConfig, UpgradePluginUserConfig } from "@shell-shock/plugin-upgrade/types/plugin";
|
|
11
12
|
import { ScriptPresetOptions } from "@shell-shock/preset-script/types/plugin";
|
|
@@ -64,10 +65,17 @@ type CLIPresetOptions = Omit<ScriptPresetOptions, "globalOptions"> & HelpPluginO
|
|
|
64
65
|
* 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.
|
|
65
66
|
*/
|
|
66
67
|
changelog?: ChangelogPluginOptions | false;
|
|
68
|
+
/**
|
|
69
|
+
* 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.
|
|
70
|
+
*
|
|
71
|
+
* @remarks
|
|
72
|
+
* 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.
|
|
73
|
+
*/
|
|
74
|
+
skills?: SkillsPluginOptions | false;
|
|
67
75
|
};
|
|
68
|
-
type CLIPresetUserConfig = UserConfig & ThemePluginUserConfig & ConsolePluginUserConfig & PromptsPluginUserConfig & BannerPluginUserConfig & HelpPluginUserConfig & CompletionsPluginUserConfig & ChangelogPluginUserConfig & UpgradePluginUserConfig & CLIPresetOptions;
|
|
69
|
-
type CLIPresetResolvedConfig = ResolvedConfig & ThemePluginResolvedConfig & ConsolePluginResolvedConfig & PromptsPluginResolvedConfig & BannerPluginResolvedConfig & HelpPluginResolvedConfig & CompletionsPluginResolvedConfig & ChangelogPluginResolvedConfig & UpgradePluginResolvedConfig & Required<CLIPresetOptions>;
|
|
70
|
-
type CLIPresetContext<TResolvedConfig extends CLIPresetResolvedConfig = CLIPresetResolvedConfig> = Context<TResolvedConfig> & ThemePluginContext<TResolvedConfig> & ConsolePluginContext<TResolvedConfig> & PromptsPluginContext<TResolvedConfig> & BannerPluginContext<TResolvedConfig> & HelpPluginContext<TResolvedConfig> & CompletionsPluginContext<TResolvedConfig> & ChangelogPluginContext<TResolvedConfig> & UpgradePluginContext<TResolvedConfig>;
|
|
76
|
+
type CLIPresetUserConfig = UserConfig & ThemePluginUserConfig & ConsolePluginUserConfig & PromptsPluginUserConfig & BannerPluginUserConfig & HelpPluginUserConfig & CompletionsPluginUserConfig & ChangelogPluginUserConfig & SkillsPluginUserConfig & UpgradePluginUserConfig & CLIPresetOptions;
|
|
77
|
+
type CLIPresetResolvedConfig = ResolvedConfig & ThemePluginResolvedConfig & ConsolePluginResolvedConfig & PromptsPluginResolvedConfig & BannerPluginResolvedConfig & HelpPluginResolvedConfig & CompletionsPluginResolvedConfig & ChangelogPluginResolvedConfig & SkillsPluginResolvedConfig & UpgradePluginResolvedConfig & Required<CLIPresetOptions>;
|
|
78
|
+
type CLIPresetContext<TResolvedConfig extends CLIPresetResolvedConfig = CLIPresetResolvedConfig> = Context<TResolvedConfig> & ThemePluginContext<TResolvedConfig> & ConsolePluginContext<TResolvedConfig> & PromptsPluginContext<TResolvedConfig> & BannerPluginContext<TResolvedConfig> & HelpPluginContext<TResolvedConfig> & CompletionsPluginContext<TResolvedConfig> & ChangelogPluginContext<TResolvedConfig> & SkillsPluginContext<TResolvedConfig> & UpgradePluginContext<TResolvedConfig>;
|
|
71
79
|
//#endregion
|
|
72
80
|
export { CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpgradeType };
|
|
73
81
|
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;;;;;;;;;KA+EY,WAAA;AAAA,KAEA,gBAAA,GAAmB,IAAA,CAAK,mBAAA,qBAClC,iBAAA,GACA,oBAAA,GACA,oBAAA;EALU;;;;AAAW;AAEvB;;;;;;EAeI,WAAA;EAZF;;;;;;;;;;;;;;EA4BE,aAAA,GACI,aAAA,OACE,OAAA,EAAS,OAAA,EAAS,KAAA,EAAO,WAAA,KAAgB,aAAA;EAjCf;;;;;;;;;;;EA+ChC,WAAA,GAAc,WAAA;EAAd;;;EAKA,MAAA,GAAS,IAAA,CAAK,mBAAA;EAAA;;;EAKd,WAAA,GAAc,IAAA,CAAK,wBAAA;EAKnB;;;EAAA,SAAA,GAAY,sBAAA;EAQgB;AAAA;AAGhC;;;;EAHI,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,uBAAA,GACA,gBAAA;AAAA,KAEU,uBAAA,GAA0B,cAAA,GACpC,yBAAA,GACA,2BAAA,GACA,2BAAA,GACA,0BAAA,GACA,wBAAA,GACA,+BAAA,GACA,6BAAA,GACA,0BAAA,GACA,2BAAA,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,oBAAA,CAAqB,eAAA"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -2,8 +2,9 @@ import { ChangelogPluginContext, ChangelogPluginOptions, ChangelogPluginResolved
|
|
|
2
2
|
import { CompletionsPluginContext, CompletionsPluginOptions, CompletionsPluginResolvedConfig, CompletionsPluginUserConfig } from "@shell-shock/plugin-completions";
|
|
3
3
|
import { ConsolePluginContext, ConsolePluginResolvedConfig, ConsolePluginUserConfig } from "@shell-shock/plugin-console";
|
|
4
4
|
import { HelpPluginContext, HelpPluginOptions, HelpPluginResolvedConfig, HelpPluginUserConfig } from "@shell-shock/plugin-help";
|
|
5
|
-
import {
|
|
5
|
+
import { SkillsPluginContext, SkillsPluginOptions, SkillsPluginResolvedConfig, SkillsPluginUserConfig } from "@shell-shock/plugin-skills";
|
|
6
6
|
import { ResolvedConfig } from "powerlines";
|
|
7
|
+
import { CommandBase, CommandOption, Context, UserConfig } from "@shell-shock/core";
|
|
7
8
|
import { BannerPluginContext, BannerPluginOptions, BannerPluginResolvedConfig, BannerPluginUserConfig } from "@shell-shock/plugin-banner";
|
|
8
9
|
import { PromptsPluginContext, PromptsPluginOptions, PromptsPluginResolvedConfig, PromptsPluginUserConfig } from "@shell-shock/plugin-prompts/types/plugin";
|
|
9
10
|
import { ThemePluginContext, ThemePluginResolvedConfig, ThemePluginUserConfig } from "@shell-shock/plugin-theme/types/plugin";
|
|
@@ -64,10 +65,17 @@ type CLIPresetOptions = Omit<ScriptPresetOptions, "globalOptions"> & HelpPluginO
|
|
|
64
65
|
* 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.
|
|
65
66
|
*/
|
|
66
67
|
changelog?: ChangelogPluginOptions | false;
|
|
68
|
+
/**
|
|
69
|
+
* 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.
|
|
70
|
+
*
|
|
71
|
+
* @remarks
|
|
72
|
+
* 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.
|
|
73
|
+
*/
|
|
74
|
+
skills?: SkillsPluginOptions | false;
|
|
67
75
|
};
|
|
68
|
-
type CLIPresetUserConfig = UserConfig & ThemePluginUserConfig & ConsolePluginUserConfig & PromptsPluginUserConfig & BannerPluginUserConfig & HelpPluginUserConfig & CompletionsPluginUserConfig & ChangelogPluginUserConfig & UpgradePluginUserConfig & CLIPresetOptions;
|
|
69
|
-
type CLIPresetResolvedConfig = ResolvedConfig & ThemePluginResolvedConfig & ConsolePluginResolvedConfig & PromptsPluginResolvedConfig & BannerPluginResolvedConfig & HelpPluginResolvedConfig & CompletionsPluginResolvedConfig & ChangelogPluginResolvedConfig & UpgradePluginResolvedConfig & Required<CLIPresetOptions>;
|
|
70
|
-
type CLIPresetContext<TResolvedConfig extends CLIPresetResolvedConfig = CLIPresetResolvedConfig> = Context<TResolvedConfig> & ThemePluginContext<TResolvedConfig> & ConsolePluginContext<TResolvedConfig> & PromptsPluginContext<TResolvedConfig> & BannerPluginContext<TResolvedConfig> & HelpPluginContext<TResolvedConfig> & CompletionsPluginContext<TResolvedConfig> & ChangelogPluginContext<TResolvedConfig> & UpgradePluginContext<TResolvedConfig>;
|
|
76
|
+
type CLIPresetUserConfig = UserConfig & ThemePluginUserConfig & ConsolePluginUserConfig & PromptsPluginUserConfig & BannerPluginUserConfig & HelpPluginUserConfig & CompletionsPluginUserConfig & ChangelogPluginUserConfig & SkillsPluginUserConfig & UpgradePluginUserConfig & CLIPresetOptions;
|
|
77
|
+
type CLIPresetResolvedConfig = ResolvedConfig & ThemePluginResolvedConfig & ConsolePluginResolvedConfig & PromptsPluginResolvedConfig & BannerPluginResolvedConfig & HelpPluginResolvedConfig & CompletionsPluginResolvedConfig & ChangelogPluginResolvedConfig & SkillsPluginResolvedConfig & UpgradePluginResolvedConfig & Required<CLIPresetOptions>;
|
|
78
|
+
type CLIPresetContext<TResolvedConfig extends CLIPresetResolvedConfig = CLIPresetResolvedConfig> = Context<TResolvedConfig> & ThemePluginContext<TResolvedConfig> & ConsolePluginContext<TResolvedConfig> & PromptsPluginContext<TResolvedConfig> & BannerPluginContext<TResolvedConfig> & HelpPluginContext<TResolvedConfig> & CompletionsPluginContext<TResolvedConfig> & ChangelogPluginContext<TResolvedConfig> & SkillsPluginContext<TResolvedConfig> & UpgradePluginContext<TResolvedConfig>;
|
|
71
79
|
//#endregion
|
|
72
80
|
export { CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpgradeType };
|
|
73
81
|
//# sourceMappingURL=plugin.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":""}
|
package/dist/types/plugin.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{};
|
|
1
|
+
export { };
|
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.23",
|
|
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": [
|
|
@@ -179,30 +179,31 @@
|
|
|
179
179
|
"typings": "dist/index.d.mts",
|
|
180
180
|
"files": ["dist/**/*"],
|
|
181
181
|
"dependencies": {
|
|
182
|
-
"@alloy-js/core": "0.23.
|
|
183
|
-
"@alloy-js/typescript": "0.23.0
|
|
184
|
-
"@powerlines/deepkit": "^0.
|
|
185
|
-
"@powerlines/plugin-alloy": "^0.26.
|
|
186
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
187
|
-
"@shell-shock/core": "
|
|
188
|
-
"@shell-shock/plugin-banner": "
|
|
189
|
-
"@shell-shock/plugin-changelog": "
|
|
190
|
-
"@shell-shock/plugin-completions": "
|
|
191
|
-
"@shell-shock/plugin-console": "
|
|
192
|
-
"@shell-shock/plugin-help": "
|
|
193
|
-
"@shell-shock/plugin-prompts": "
|
|
194
|
-
"@shell-shock/plugin-
|
|
195
|
-
"@shell-shock/plugin-
|
|
196
|
-
"@shell-shock/
|
|
197
|
-
"@
|
|
198
|
-
"@stryke/
|
|
199
|
-
"@stryke/
|
|
200
|
-
"@stryke/
|
|
182
|
+
"@alloy-js/core": "^0.23.1",
|
|
183
|
+
"@alloy-js/typescript": "^0.23.0",
|
|
184
|
+
"@powerlines/deepkit": "^0.9.78",
|
|
185
|
+
"@powerlines/plugin-alloy": "^0.26.217",
|
|
186
|
+
"@powerlines/plugin-plugin": "^0.12.536",
|
|
187
|
+
"@shell-shock/core": "0.17.11",
|
|
188
|
+
"@shell-shock/plugin-banner": "0.1.38",
|
|
189
|
+
"@shell-shock/plugin-changelog": "0.1.14",
|
|
190
|
+
"@shell-shock/plugin-completions": "0.4.19",
|
|
191
|
+
"@shell-shock/plugin-console": "0.2.15",
|
|
192
|
+
"@shell-shock/plugin-help": "0.2.29",
|
|
193
|
+
"@shell-shock/plugin-prompts": "0.3.52",
|
|
194
|
+
"@shell-shock/plugin-skills": "0.0.2",
|
|
195
|
+
"@shell-shock/plugin-theme": "0.4.24",
|
|
196
|
+
"@shell-shock/plugin-upgrade": "0.1.56",
|
|
197
|
+
"@shell-shock/preset-script": "0.6.66",
|
|
198
|
+
"@stryke/path": "^0.29.11",
|
|
199
|
+
"@stryke/string-format": "^0.17.26",
|
|
200
|
+
"@stryke/type-checks": "^0.6.17",
|
|
201
|
+
"@stryke/types": "^0.12.12",
|
|
201
202
|
"cfonts": "^3.3.1",
|
|
202
203
|
"defu": "^6.1.7",
|
|
203
|
-
"powerlines": "^0.
|
|
204
|
+
"powerlines": "^0.47.124"
|
|
204
205
|
},
|
|
205
|
-
"devDependencies": { "@stryke/types": "^0.
|
|
206
|
+
"devDependencies": { "@stryke/types": "^0.12.12", "@types/node": "^25.9.1" },
|
|
206
207
|
"publishConfig": { "access": "public" },
|
|
207
|
-
"gitHead": "
|
|
208
|
+
"gitHead": "9401c1de122d800040306fc89ad1835930c1a826"
|
|
208
209
|
}
|