@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.
Files changed (53) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +29 -1
  2. package/dist/components/banner-builtin.cjs +92 -5
  3. package/dist/components/banner-builtin.d.cts +2 -3
  4. package/dist/components/banner-builtin.d.cts.map +1 -1
  5. package/dist/components/banner-builtin.d.mts +3 -4
  6. package/dist/components/banner-builtin.d.mts.map +1 -1
  7. package/dist/components/banner-builtin.mjs +90 -5
  8. package/dist/components/banner-builtin.mjs.map +1 -1
  9. package/dist/components/command-entry.cjs +358 -56
  10. package/dist/components/command-entry.d.cts +1 -2
  11. package/dist/components/command-entry.d.cts.map +1 -1
  12. package/dist/components/command-entry.d.mts +1 -2
  13. package/dist/components/command-entry.d.mts.map +1 -1
  14. package/dist/components/command-entry.mjs +355 -56
  15. package/dist/components/command-entry.mjs.map +1 -1
  16. package/dist/components/command-router.cjs +59 -4
  17. package/dist/components/command-router.d.cts +2 -3
  18. package/dist/components/command-router.d.cts.map +1 -1
  19. package/dist/components/command-router.d.mts +3 -4
  20. package/dist/components/command-router.d.mts.map +1 -1
  21. package/dist/components/command-router.mjs +57 -4
  22. package/dist/components/command-router.mjs.map +1 -1
  23. package/dist/components/index.cjs +15 -1
  24. package/dist/components/index.mjs +7 -1
  25. package/dist/components/upgrade-builtin.cjs +134 -14
  26. package/dist/components/upgrade-builtin.d.cts +2 -3
  27. package/dist/components/upgrade-builtin.d.cts.map +1 -1
  28. package/dist/components/upgrade-builtin.d.mts +2 -3
  29. package/dist/components/upgrade-builtin.d.mts.map +1 -1
  30. package/dist/components/upgrade-builtin.mjs +132 -14
  31. package/dist/components/upgrade-builtin.mjs.map +1 -1
  32. package/dist/components/virtual-command-entry.cjs +116 -1
  33. package/dist/components/virtual-command-entry.d.cts +1 -2
  34. package/dist/components/virtual-command-entry.d.cts.map +1 -1
  35. package/dist/components/virtual-command-entry.d.mts +1 -2
  36. package/dist/components/virtual-command-entry.d.mts.map +1 -1
  37. package/dist/components/virtual-command-entry.mjs +113 -1
  38. package/dist/components/virtual-command-entry.mjs.map +1 -1
  39. package/dist/helpers/get-global-options.cjs +37 -1
  40. package/dist/helpers/get-global-options.mjs +37 -1
  41. package/dist/helpers/get-global-options.mjs.map +1 -1
  42. package/dist/index.cjs +185 -1
  43. package/dist/index.d.cts.map +1 -1
  44. package/dist/index.d.mts.map +1 -1
  45. package/dist/index.mjs +175 -1
  46. package/dist/index.mjs.map +1 -1
  47. package/dist/types/index.mjs +1 -1
  48. package/dist/types/plugin.d.cts +11 -3
  49. package/dist/types/plugin.d.cts.map +1 -1
  50. package/dist/types/plugin.d.mts +12 -4
  51. package/dist/types/plugin.d.mts.map +1 -1
  52. package/dist/types/plugin.mjs +1 -1
  53. package/package.json +24 -23
package/dist/index.cjs CHANGED
@@ -1 +1,185 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`./_virtual/_rolldown/runtime.cjs`),t=require(`./components/banner-builtin.cjs`),n=require(`./components/command-router.cjs`),r=require(`./components/virtual-command-entry.cjs`),i=require(`./components/command-entry.cjs`),a=require(`./components/upgrade-builtin.cjs`),o=require(`./helpers/get-global-options.cjs`);let s=require(`@alloy-js/core/jsx-runtime`),c=require(`@alloy-js/core`),l=require(`@alloy-js/typescript`),u=require(`@powerlines/plugin-alloy/core/components`),d=require(`@powerlines/plugin-alloy/render`),f=require(`@shell-shock/core/plugin-utils`),p=require(`@shell-shock/plugin-changelog`);p=e.__toESM(p);let m=require(`@shell-shock/plugin-completions`);m=e.__toESM(m);let h=require(`@shell-shock/plugin-console`);h=e.__toESM(h);let g=require(`@shell-shock/plugin-help`);g=e.__toESM(g);let _=require(`@shell-shock/plugin-prompts`);_=e.__toESM(_);let v=require(`@shell-shock/plugin-upgrade`);v=e.__toESM(v);let y=require(`@shell-shock/preset-script/components/bin-entry`);const b=(e={})=>[...(0,h.default)(e),...(0,g.default)(e),...(0,_.default)(e),...e.changelog===!1?[]:[(0,p.default)(e.changelog)],...e.completions===!1?[]:(0,m.default)(e.completions),(0,v.default)(e),{name:`shell-shock:cli-preset`,config(){return this.debug("Providing default configuration for the Shell Shock `cli` preset."),{globalOptions:o.getGlobalOptions,isCaseSensitive:!1,...e,env:{types:`@shell-shock/plugin-upgrade/types/env#ShellShockUpgradePluginEnv`,validate:!1}}},prepare:{order:`post`,async handler(){let e=this;this.debug(`Rendering built-in modules.`);let n=await(0,f.getCommandList)(this);return this.debug(`Rendering \`banner\` built-ins for each of the ${n.length} command modules.`),(0,d.render)(this,[(0,s.createComponent)(a.UpgradeBuiltin,{}),(0,s.createComponent)(t.BannerBuiltin,{get command(){return(0,f.computeBin)(e)}}),(0,s.createComponent)(c.For,{get each(){return n.sort((e,t)=>e.name.localeCompare(t.name))},doubleHardline:!0,children:e=>(0,s.createComponent)(t.BannerBuiltin,{command:e})})])}}},{name:`shell-shock:cli-preset:generate-entrypoint`,prepare:{order:`post`,async handler(){let e=this;return this.debug("Rendering entrypoint modules for the Shell Shock `cli` preset."),(0,d.render)(this,[(0,s.createComponent)(y.BinEntry,{builtinImports:{console:[`info`,`debug`,`warn`,`help`,`error`,`cursor`,`divider`,`stripAnsi`,`writeLine`,`splitText`],utils:[`isMinimal`,`isInteractive`],state:[`useArgs`,`isHelp`],prompts:[`text`,`numeric`,`toggle`,`select`,`confirm`,`isCancel`],env:[`env`,`paths`],upgrade:[`executeUpgrade`]},get children(){return[(0,s.createComponent)(c.Show,{get when(){return Object.keys(e.commands).length>0},get children(){return[(0,s.createComponent)(l.VarDeclaration,{let:!0,name:`args`,type:`string[]`,initializer:c.code`useArgs();`}),(0,s.createIntrinsic)(`hbr`,{}),(0,s.createComponent)(n.CommandRouter,{segments:[],get commands(){return e.commands??{}}}),(0,s.createIntrinsic)(`hbr`,{})]}}),(0,s.createIntrinsic)(`hbr`,{}),c.code`await showBanner(0);`,(0,s.createComponent)(u.Spacing,{}),c.code`return showHelp(); `]}}),(0,s.createComponent)(c.Show,{get when(){return Object.values(e.commands).length>0},get children(){return(0,s.createComponent)(c.For,{get each(){return Object.values(e.commands)},doubleHardline:!0,children:e=>(0,s.createComponent)(c.Show,{get when(){return e.isVirtual},get fallback(){return(0,s.createComponent)(i.CommandEntry,{command:e})},get children(){return(0,s.createComponent)(r.VirtualCommandEntry,{command:e})}})})}})])}}}];exports.default=b,exports.plugin=b;
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;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AA8CA;;;;cAAa,MAAA,oBAA2B,gBAAA,GAAmB,gBAAA,EACzD,OAAA,GAAS,gBAAA,KACR,MAAA,CAAO,QAAA"}
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"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AA8CA;;;;cAAa,MAAA,oBAA2B,gBAAA,GAAmB,gBAAA,EACzD,OAAA,GAAS,gBAAA,KACR,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":""}
package/dist/index.mjs CHANGED
@@ -1,2 +1,176 @@
1
- import{BannerBuiltin as e}from"./components/banner-builtin.mjs";import{CommandRouter as t}from"./components/command-router.mjs";import{VirtualCommandEntry as n}from"./components/virtual-command-entry.mjs";import{CommandEntry as r}from"./components/command-entry.mjs";import{UpgradeBuiltin as i}from"./components/upgrade-builtin.mjs";import{getGlobalOptions as a}from"./helpers/get-global-options.mjs";import{createComponent as o,createIntrinsic as s}from"@alloy-js/core/jsx-runtime";import{For as c,Show as l,code as u}from"@alloy-js/core";import{VarDeclaration as d}from"@alloy-js/typescript";import{Spacing as f}from"@powerlines/plugin-alloy/core/components";import{render as p}from"@powerlines/plugin-alloy/render";import{computeBin as m,getCommandList as h}from"@shell-shock/core/plugin-utils";import g from"@shell-shock/plugin-changelog";import _ from"@shell-shock/plugin-completions";import v from"@shell-shock/plugin-console";import y from"@shell-shock/plugin-help";import b from"@shell-shock/plugin-prompts";import x from"@shell-shock/plugin-upgrade";import{BinEntry as S}from"@shell-shock/preset-script/components/bin-entry";const C=(C={})=>[...v(C),...y(C),...b(C),...C.changelog===!1?[]:[g(C.changelog)],...C.completions===!1?[]:_(C.completions),x(C),{name:`shell-shock:cli-preset`,config(){return this.debug("Providing default configuration for the Shell Shock `cli` preset."),{globalOptions:a,isCaseSensitive:!1,...C,env:{types:`@shell-shock/plugin-upgrade/types/env#ShellShockUpgradePluginEnv`,validate:!1}}},prepare:{order:`post`,async handler(){let t=this;this.debug(`Rendering built-in modules.`);let n=await h(this);return this.debug(`Rendering \`banner\` built-ins for each of the ${n.length} command modules.`),p(this,[o(i,{}),o(e,{get command(){return m(t)}}),o(c,{get each(){return n.sort((e,t)=>e.name.localeCompare(t.name))},doubleHardline:!0,children:t=>o(e,{command:t})})])}}},{name:`shell-shock:cli-preset:generate-entrypoint`,prepare:{order:`post`,async handler(){let e=this;return this.debug("Rendering entrypoint modules for the Shell Shock `cli` preset."),p(this,[o(S,{builtinImports:{console:[`info`,`debug`,`warn`,`help`,`error`,`cursor`,`divider`,`stripAnsi`,`writeLine`,`splitText`],utils:[`isMinimal`,`isInteractive`],state:[`useArgs`,`isHelp`],prompts:[`text`,`numeric`,`toggle`,`select`,`confirm`,`isCancel`],env:[`env`,`paths`],upgrade:[`executeUpgrade`]},get children(){return[o(l,{get when(){return Object.keys(e.commands).length>0},get children(){return[o(d,{let:!0,name:`args`,type:`string[]`,initializer:u`useArgs();`}),s(`hbr`,{}),o(t,{segments:[],get commands(){return e.commands??{}}}),s(`hbr`,{})]}}),s(`hbr`,{}),u`await showBanner(0);`,o(f,{}),u`return showHelp(); `]}}),o(l,{get when(){return Object.values(e.commands).length>0},get children(){return o(c,{get each(){return Object.values(e.commands)},doubleHardline:!0,children:e=>o(l,{get when(){return e.isVirtual},get fallback(){return o(r,{command:e})},get children(){return o(n,{command:e})}})})}})])}}}];export{C as default,C as plugin};
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
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, For, Show } from \"@alloy-js/core\";\nimport { VarDeclaration } from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport { computeBin, getCommandList } from \"@shell-shock/core/plugin-utils\";\nimport type { CommandTree } from \"@shell-shock/core/types/command\";\nimport changelog from \"@shell-shock/plugin-changelog\";\nimport completions from \"@shell-shock/plugin-completions\";\nimport console from \"@shell-shock/plugin-console\";\nimport help from \"@shell-shock/plugin-help\";\nimport prompts from \"@shell-shock/plugin-prompts\";\nimport upgrade from \"@shell-shock/plugin-upgrade\";\nimport { BinEntry } from \"@shell-shock/preset-script/components/bin-entry\";\nimport type { Plugin } from \"powerlines\";\nimport { BannerBuiltin } from \"./components/banner-builtin\";\nimport { CommandEntry } from \"./components/command-entry\";\nimport { CommandRouter } from \"./components/command-router\";\nimport { UpgradeBuiltin } from \"./components/upgrade-builtin\";\nimport { VirtualCommandEntry } from \"./components/virtual-command-entry\";\nimport { getGlobalOptions } from \"./helpers/get-global-options\";\nimport type { CLIPresetContext, CLIPresetOptions } from \"./types/plugin\";\n\n/**\n * The Shell Shock CLI Preset plugin.\n *\n * @remarks\n * 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.\n */\nexport const plugin = <TContext extends CLIPresetContext = CLIPresetContext>(\n options: CLIPresetOptions = {}\n): Plugin<TContext>[] => {\n return [\n ...console<TContext>(options),\n ...help<TContext>(options),\n ...prompts<TContext>(options),\n ...(options.changelog !== false\n ? [changelog<TContext>(options.changelog)]\n : []),\n ...(options.completions !== false\n ? completions<TContext>(options.completions)\n : []),\n upgrade<TContext>(options),\n {\n name: \"shell-shock:cli-preset\",\n config() {\n this.debug(\n \"Providing default configuration for the Shell Shock `cli` preset.\"\n );\n\n return {\n globalOptions: getGlobalOptions,\n isCaseSensitive: false,\n ...options,\n env: {\n types:\n \"@shell-shock/plugin-upgrade/types/env#ShellShockUpgradePluginEnv\",\n validate: false\n }\n };\n },\n prepare: {\n order: \"post\",\n async handler() {\n this.debug(\"Rendering built-in modules.\");\n\n const commands = await getCommandList(this);\n this.debug(\n `Rendering \\`banner\\` built-ins for each of the ${\n commands.length\n } command modules.`\n );\n\n return render(\n this,\n <>\n <UpgradeBuiltin />\n <BannerBuiltin command={computeBin(this)} />\n <For\n each={commands.sort((a, b) => a.name.localeCompare(b.name))}\n doubleHardline>\n {command => <BannerBuiltin command={command} />}\n </For>\n </>\n );\n }\n }\n },\n {\n name: \"shell-shock:cli-preset:generate-entrypoint\",\n prepare: {\n order: \"post\",\n async handler() {\n this.debug(\n \"Rendering entrypoint modules for the Shell Shock `cli` preset.\"\n );\n\n return render(\n this,\n <>\n <BinEntry\n builtinImports={{\n console: [\n \"info\",\n \"debug\",\n \"warn\",\n \"help\",\n \"error\",\n \"cursor\",\n \"divider\",\n \"stripAnsi\",\n \"writeLine\",\n \"splitText\"\n ],\n utils: [\"isMinimal\", \"isInteractive\"],\n state: [\"useArgs\", \"isHelp\"],\n prompts: [\n \"text\",\n \"numeric\",\n \"toggle\",\n \"select\",\n \"confirm\",\n \"isCancel\"\n ],\n env: [\"env\", \"paths\"],\n upgrade: [\"executeUpgrade\"]\n }}>\n <Show when={Object.keys(this.commands).length > 0}>\n <VarDeclaration\n let\n name=\"args\"\n type=\"string[]\"\n initializer={code`useArgs();`}\n />\n <hbr />\n <CommandRouter segments={[]} commands={this.commands ?? {}} />\n <hbr />\n </Show>\n <hbr />\n {code`await showBanner(0);`}\n <Spacing />\n {code`return showHelp(); `}\n </BinEntry>\n <Show when={Object.values(this.commands).length > 0}>\n <For\n each={Object.values(\n this.commands as Record<string, CommandTree>\n )}\n doubleHardline>\n {child => (\n <Show\n when={child.isVirtual}\n fallback={<CommandEntry command={child} />}>\n <VirtualCommandEntry command={child} />\n </Show>\n )}\n </For>\n </Show>\n </>\n );\n }\n }\n }\n ];\n};\n\nexport default plugin;\n"],"mappings":"8mCA2CA,MAAI,GAAA,EAAA,EAAA,GACI,CAAA,GAAA,EAAO,EAAc,CAAC,GAAG,EAAM,EAAG,CAAO,GAAC,EAAI,EAAY,CAAA,GAAQ,EAAK,YAAgB,GAA0C,EAAC,CAAnC,CAAA,EAAA,EAAc,UAAW,CAAA,CAAc,GAAA,EAAU,cAAc,GAAyC,EAAA,CAA7B,EAAW,EAAS,YAAS,CAAW,EAAQ,EAAQ,CAAA,CACxO,KAAA,yBACF,QAAa,CAEV,OADD,KAAS,MAAA,oEAAoB,CACrB,CACF,cAAC,EACF,gBAAkB,GAClB,GAAI,EACJ,IAAA,CACC,MAAQ,mEACP,SAAU,GACV,CACF,EAEH,QAAO,CACP,MAAQ,OACR,MAAA,SAAA,CACE,IAAO,EAAM,KACb,KAAO,MAAE,8BAAA,CACP,IAAK,EAAK,MAAA,EAAA,KAAA,CAEV,OADA,KAAG,MAAA,kDAA0D,EAAO,OAAA,mBAAA,CACnE,EAAA,KAAA,CAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA,EAAA,CAAA,IAAA,SAAA,CAED,OAAO,EAAA,EAAA,EAEN,CAAC,CAAA,EAAiB,EAAK,CACtB,IAAG,MAAO,CACV,OAAK,EAAA,MAAA,EAAA,IAAA,EAAA,KAAA,cAAA,EAAA,KAAA,CAAA,EAEL,eAAY,GACZ,SAAU,GAAE,EAAA,EAAA,CACZ,UACD,CAAA,CACF,CAAA,CAAA,CAAA,EAEF,CACF,CAAE,CACD,KAAM,sDAEJ,MAAI,OACJ,MAAI,SAAU,CACZ,IAAK,EAAW,KAEhB,OADA,KAAK,MAAC,iEAAS,CACT,EAAQ,KAAA,CAAO,EAAC,EAAA,CACpB,eAAC,uGAED,MAAO,CAAA,YAAM,gBAAA,CACX,MAAI,CAAA,UAAA,SAAA,CACJ,QAAC,CAAA,OAAA,UAAA,SAAA,SAAA,UAAA,WAAA,CACD,IAAG,CAAA,MAAA,QAAgB,CACnB,QAAG,CAAA,iBAAuB,CAC3B,CACD,IAAI,UAAQ,CACV,MAAI,CAAA,EAAc,EAAA,CAChB,IAAG,MAAQ,CACT,OAAG,OAAA,KAAA,EAAA,SAAA,CAAA,OAAA,GAER,IAAA,UAAA,CACH,MAAA,CAAA,EAAA,EAAA,CACF,IAAA,GACD,KAAA,OACD,KAAA,WACc,YAAW,CAAM,aACpB,CAAA,CAAA,EAAA,MAAA,EAAA,CAAA,CAAA,EAAA,EAAA,CACC,SAAK,EAAA,CACP,IAAQ,UAAE,CACJ,OAAA,EAAA,UAAA,EAAA,EAET,CAAA,CAAA,EAAA,MAAA,EAAA,CAAA,CAAA,EAED,CAAA,CAAM,EAAO,MAAA,EAAA,CAAA,CAAA,CAAA,uBAAA,EAAA,EAAA,EAAA,CAAA,CAAA,CAAA,sBAAA,EAEd,CAAC,CAAE,EAAC,EAAA,CACH,IAAI,MAAC,CACH,OAAI,OAAA,OAAgB,EAAA,SAAA,CAAA,OAAA,GAEtB,IAAI,UAAW,CACb,OAAO,EAAQ,EAAA,CACb,IAAI,MAAO,CACT,OAAK,OAAK,OAAA,EAAA,SAAA,EAEZ,eAAc,GACd,SAAO,GAAQ,EAAA,EAAA,CACb,IAAI,MAAC,CACH,OAAG,EAAU,WAEf,IAAG,UAAA,CACD,OAAO,EAAe,EAAe,CACrC,QAAS,EACT,CAAA,EAEF,IAAI,UAAS,CACX,OAAG,EAAO,EAAA,CACR,QAAQ,EACT,CAAC,EAEL,CAAC,CACH,CAAC,EAEL,CAAC,CAAC,CAAC,EAEP,CACF,CAAC"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- export{};
1
+ export { };
@@ -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":";;;;;;;;;;;;;KAyEY,WAAA;AAAA,KAEA,gBAAA,GAAmB,IAAA,CAAK,mBAAA,qBAClC,iBAAA,GACA,oBAAA,GACA,oBAAA;EALU;;;;;AAEZ;;;;;;EAeI,WAAA;EAZF;;;;;;;;;;;;;;EA4BE,aAAA,GACI,aAAA,OACE,OAAA,EAAS,OAAA,EAAS,KAAA,EAAO,WAAA,KAAgB,aAAA;EAhCjD;;;;;;;;;;;EA8CE,WAAA,GAAc,WAAA;EAAA;;;EAKd,MAAA,GAAS,IAAA,CAAK,mBAAA;EAKd;;;EAAA,WAAA,GAAc,IAAA,CAAK,wBAAA;EAKP;;;EAAZ,SAAA,GAAY,sBAAA;AAAA;AAAA,KAGJ,mBAAA,GAAsB,UAAA,GAChC,qBAAA,GACA,uBAAA,GACA,uBAAA,GACA,sBAAA,GACA,oBAAA,GACA,2BAAA,GACA,yBAAA,GACA,uBAAA,GACA,gBAAA;AAAA,KAEU,uBAAA,GAA0B,cAAA,GACpC,yBAAA,GACA,2BAAA,GACA,2BAAA,GACA,0BAAA,GACA,wBAAA,GACA,+BAAA,GACA,6BAAA,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,oBAAA,CAAqB,eAAA"}
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"}
@@ -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 { CommandBase, CommandOption, Context, UserConfig } from "@shell-shock/core";
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":";;;;;;;;;;;;;KAyEY,WAAA;AAAA,KAEA,gBAAA,GAAmB,IAAA,CAAK,mBAAA,qBAClC,iBAAA,GACA,oBAAA,GACA,oBAAA;EALU;;;;;AAEZ;;;;;;EAeI,WAAA;EAZF;;;;;;;;;;;;;;EA4BE,aAAA,GACI,aAAA,OACE,OAAA,EAAS,OAAA,EAAS,KAAA,EAAO,WAAA,KAAgB,aAAA;EAhCjD;;;;;;;;;;;EA8CE,WAAA,GAAc,WAAA;EAAA;;;EAKd,MAAA,GAAS,IAAA,CAAK,mBAAA;EAKd;;;EAAA,WAAA,GAAc,IAAA,CAAK,wBAAA;EAKP;;;EAAZ,SAAA,GAAY,sBAAA;AAAA;AAAA,KAGJ,mBAAA,GAAsB,UAAA,GAChC,qBAAA,GACA,uBAAA,GACA,uBAAA,GACA,sBAAA,GACA,oBAAA,GACA,2BAAA,GACA,yBAAA,GACA,uBAAA,GACA,gBAAA;AAAA,KAEU,uBAAA,GAA0B,cAAA,GACpC,yBAAA,GACA,2BAAA,GACA,2BAAA,GACA,0BAAA,GACA,wBAAA,GACA,+BAAA,GACA,6BAAA,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,oBAAA,CAAqB,eAAA"}
1
+ {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":""}
@@ -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.20",
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.0-dev.8",
183
- "@alloy-js/typescript": "0.23.0-dev.4",
184
- "@powerlines/deepkit": "^0.8.49",
185
- "@powerlines/plugin-alloy": "^0.26.67",
186
- "@powerlines/plugin-plugin": "^0.12.399",
187
- "@shell-shock/core": "^0.17.8",
188
- "@shell-shock/plugin-banner": "^0.1.35",
189
- "@shell-shock/plugin-changelog": "^0.1.11",
190
- "@shell-shock/plugin-completions": "^0.4.16",
191
- "@shell-shock/plugin-console": "^0.2.12",
192
- "@shell-shock/plugin-help": "^0.2.26",
193
- "@shell-shock/plugin-prompts": "^0.3.49",
194
- "@shell-shock/plugin-theme": "^0.4.21",
195
- "@shell-shock/plugin-upgrade": "^0.1.53",
196
- "@shell-shock/preset-script": "^0.6.63",
197
- "@stryke/path": "^0.28.1",
198
- "@stryke/string-format": "^0.17.12",
199
- "@stryke/type-checks": "^0.6.4",
200
- "@stryke/types": "^0.11.6",
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.44.12"
204
+ "powerlines": "^0.47.124"
204
205
  },
205
- "devDependencies": { "@stryke/types": "^0.11.6", "@types/node": "^25.6.0" },
206
+ "devDependencies": { "@stryke/types": "^0.12.12", "@types/node": "^25.9.1" },
206
207
  "publishConfig": { "access": "public" },
207
- "gitHead": "832c19e668deb4d29b5e0219a7708d111790f607"
208
+ "gitHead": "9401c1de122d800040306fc89ad1835930c1a826"
208
209
  }