@shell-shock/preset-cli 0.8.20 → 0.9.1

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 (61) hide show
  1. package/README.md +1 -1
  2. package/dist/components/banner-builtin.cjs +5 -5
  3. package/dist/components/banner-builtin.d.cts +1 -1
  4. package/dist/components/banner-builtin.d.mts +1 -1
  5. package/dist/components/banner-builtin.mjs +2 -2
  6. package/dist/components/command-entry.cjs +5 -5
  7. package/dist/components/command-entry.d.mts +1 -1
  8. package/dist/components/command-entry.mjs +4 -4
  9. package/dist/components/virtual-command-entry.cjs +2 -2
  10. package/dist/components/virtual-command-entry.d.mts +1 -1
  11. package/dist/components/virtual-command-entry.mjs +1 -1
  12. package/dist/index.cjs +7 -3
  13. package/dist/index.d.cts.map +1 -1
  14. package/dist/index.d.mts.map +1 -1
  15. package/dist/index.mjs +5 -3
  16. package/dist/index.mjs.map +1 -1
  17. package/dist/types/plugin.d.cts +11 -6
  18. package/dist/types/plugin.d.cts.map +1 -1
  19. package/dist/types/plugin.d.mts +11 -6
  20. package/dist/types/plugin.d.mts.map +1 -1
  21. package/package.json +15 -12
  22. package/dist/plugin-banner/dist/components/banner-builtin.cjs +0 -63
  23. package/dist/plugin-banner/dist/components/banner-builtin.mjs +0 -62
  24. package/dist/plugin-banner/dist/components/banner-builtin.mjs.map +0 -1
  25. package/dist/plugin-banner/dist/components/banner-function-declaration.cjs +0 -162
  26. package/dist/plugin-banner/dist/components/banner-function-declaration.d.cts +0 -45
  27. package/dist/plugin-banner/dist/components/banner-function-declaration.d.cts.map +0 -1
  28. package/dist/plugin-banner/dist/components/banner-function-declaration.d.mts +0 -45
  29. package/dist/plugin-banner/dist/components/banner-function-declaration.d.mts.map +0 -1
  30. package/dist/plugin-banner/dist/components/banner-function-declaration.mjs +0 -160
  31. package/dist/plugin-banner/dist/components/banner-function-declaration.mjs.map +0 -1
  32. package/dist/plugin-banner/dist/index.d.cts +0 -2
  33. package/dist/plugin-banner/dist/index.d.mts +0 -2
  34. package/dist/plugin-banner/dist/types/plugin.d.cts +0 -31
  35. package/dist/plugin-banner/dist/types/plugin.d.cts.map +0 -1
  36. package/dist/plugin-banner/dist/types/plugin.d.mts +0 -31
  37. package/dist/plugin-banner/dist/types/plugin.d.mts.map +0 -1
  38. package/dist/plugin-help/dist/components/display.cjs +0 -285
  39. package/dist/plugin-help/dist/components/display.mjs +0 -280
  40. package/dist/plugin-help/dist/components/display.mjs.map +0 -1
  41. package/dist/plugin-help/dist/components/help-builtin.cjs +0 -86
  42. package/dist/plugin-help/dist/components/help-builtin.mjs +0 -85
  43. package/dist/plugin-help/dist/components/help-builtin.mjs.map +0 -1
  44. package/dist/plugin-help/dist/components/help-command.cjs +0 -96
  45. package/dist/plugin-help/dist/components/help-command.mjs +0 -96
  46. package/dist/plugin-help/dist/components/help-command.mjs.map +0 -1
  47. package/dist/plugin-help/dist/components/index.cjs +0 -3
  48. package/dist/plugin-help/dist/components/index.mjs +0 -5
  49. package/dist/plugin-help/dist/index.cjs +0 -106
  50. package/dist/plugin-help/dist/index.d.cts +0 -2
  51. package/dist/plugin-help/dist/index.d.mts +0 -2
  52. package/dist/plugin-help/dist/index.mjs +0 -103
  53. package/dist/plugin-help/dist/index.mjs.map +0 -1
  54. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_types@0.11.2/node_modules/@stryke/types/dist/base.d.cts +0 -19
  55. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_types@0.11.2/node_modules/@stryke/types/dist/base.d.cts.map +0 -1
  56. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_types@0.11.2/node_modules/@stryke/types/dist/base.d.mts +0 -19
  57. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_types@0.11.2/node_modules/@stryke/types/dist/base.d.mts.map +0 -1
  58. package/dist/plugin-help/dist/types/plugin.d.cts +0 -63
  59. package/dist/plugin-help/dist/types/plugin.d.cts.map +0 -1
  60. package/dist/plugin-help/dist/types/plugin.d.mts +0 -63
  61. package/dist/plugin-help/dist/types/plugin.d.mts.map +0 -1
@@ -1,285 +0,0 @@
1
- const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
2
- let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
3
- let _alloy_js_core = require("@alloy-js/core");
4
- let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
5
- let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
6
- let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
7
- let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
8
- let _shell_shock_core = require("@shell-shock/core");
9
- let _shell_shock_plugin_theme_contexts_theme = require("@shell-shock/plugin-theme/contexts/theme");
10
- let _stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
11
- let _stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
12
- let _stryke_string_format_snake_case = require("@stryke/string-format/snake-case");
13
-
14
- //#region ../plugin-help/dist/components/display.mjs
15
- /**
16
- * A component that generates the usage display for a command.
17
- */
18
- function HelpUsageDisplay(props) {
19
- const { command, indent = 2 } = props;
20
- const context = (0, _powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
21
- const theme = (0, _shell_shock_plugin_theme_contexts_theme.useTheme)();
22
- return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
23
- get each() {
24
- return Object.keys(context.config.bin);
25
- },
26
- hardline: true,
27
- children: (bin) => [(0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`
28
- writeLine(
29
- colors.text.body.secondary(\`\${colors.text.usage.bin("$_ ${bin}")}${command.segments.length > 0 ? ` ${command.segments.map((segment) => `\${colors.text.usage.${(0, _shell_shock_core_plugin_utils.isDynamicPathSegment)(segment) ? "dynamic" : "command"}("${(0, _shell_shock_core_plugin_utils.isDynamicPathSegment)(segment) ? `[${(0, _stryke_string_format_snake_case.snakeCase)((0, _shell_shock_core_plugin_utils.getDynamicPathSegmentName)(segment))}]` : segment}")}`).join(" ")}` : ""}${Object.values(command.children).length > 0 ? ` \${colors.text.usage.dynamic("[command]")}` : ""}${command.args.length > 0 ? ` ${command.args.map((arg) => `\${colors.text.usage.args("<${(0, _stryke_string_format_snake_case.snakeCase)((arg.kind === _shell_shock_core.CommandParameterKinds.string || arg.kind === _shell_shock_core.CommandParameterKinds.number) && arg.choices && arg.choices.length > 0 ? arg.choices.join("|") : arg.kind === _shell_shock_core.CommandParameterKinds.string && arg.format ? arg.format : arg.name)}${(arg.kind === _shell_shock_core.CommandParameterKinds.string || arg.kind === _shell_shock_core.CommandParameterKinds.number) && arg.variadic ? "..." : ""}>")}`).join(" ")}` : ""} \${colors.text.usage.options("[options]")}\`), { padding: ${theme.padding.app * indent} }
30
- );`), (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})]
31
- }), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
32
- get when() {
33
- return command.args.length > 0;
34
- },
35
- get children() {
36
- return [(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
37
- get each() {
38
- return Object.keys(context.config.bin);
39
- },
40
- hardline: true,
41
- children: (bin) => [(0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`
42
- writeLine(
43
- colors.text.body.secondary(\`\${colors.text.usage.bin("$_ ${bin}")}${command.segments.length > 0 ? ` ${command.segments.map((segment) => `\${colors.text.usage.${(0, _shell_shock_core_plugin_utils.isDynamicPathSegment)(segment) ? "dynamic" : "command"}("${(0, _shell_shock_core_plugin_utils.isDynamicPathSegment)(segment) ? `[${(0, _stryke_string_format_snake_case.snakeCase)((0, _shell_shock_core_plugin_utils.getDynamicPathSegmentName)(segment))}]` : segment}")}`).join(" ")}` : ""}${Object.values(command.children).length > 0 ? ` \${colors.text.usage.dynamic("[command]")}` : ""} \${colors.text.usage.options("[options]")}${command.args.length > 0 ? ` ${command.args.map((arg) => `\${colors.text.usage.args("<${(0, _stryke_string_format_snake_case.snakeCase)((arg.kind === _shell_shock_core.CommandParameterKinds.string || arg.kind === _shell_shock_core.CommandParameterKinds.number) && arg.choices && arg.choices.length > 0 ? arg.choices.join("|") : arg.kind === _shell_shock_core.CommandParameterKinds.string && arg.format ? arg.format : arg.name)}${(arg.kind === _shell_shock_core.CommandParameterKinds.string || arg.kind === _shell_shock_core.CommandParameterKinds.number) && arg.variadic ? "..." : ""}>")}`).join(" ")}` : ""}\`), { padding: ${theme.padding.app * indent} }
44
- );`), (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})]
45
- })];
46
- }
47
- })];
48
- }
49
- /**
50
- * A component that generates the options table display for a command.
51
- */
52
- function HelpOptionsDisplay(props) {
53
- const { options } = props;
54
- const context = (0, _powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
55
- return [
56
- _alloy_js_core.code`table([ `,
57
- (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
58
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
59
- get each() {
60
- return (0, _shell_shock_core_plugin_utils.sortOptions)(options);
61
- },
62
- hardline: true,
63
- children: (option) => {
64
- const flags = [];
65
- const names = [];
66
- if (option.name.length === 1) flags.push(`-${option.name}`);
67
- else names.push(`--${(0, _stryke_string_format_kebab_case.kebabCase)(option.name)}`);
68
- option.alias.forEach((alias) => {
69
- if (alias.length === 1) flags.push(`-${alias}`);
70
- else names.push(`--${(0, _stryke_string_format_kebab_case.kebabCase)(alias)}`);
71
- });
72
- return _alloy_js_core.code`[{ value: colors.text.body.primary("${flags.length > 0 ? `${flags.sort().join(", ")}${names.length > 0 ? ", " : ""}` : ""}${names.length > 0 ? names.sort().join(", ") : ""}${option.kind === _shell_shock_core.CommandParameterKinds.string ? ` <${(0, _stryke_string_format_snake_case.snakeCase)(option.choices && option.choices.length > 0 ? option.choices.join("|") : option.format ? option.format : option.name)}${option.variadic ? "..." : ""}>` : option.kind === _shell_shock_core.CommandParameterKinds.number ? ` <${(0, _stryke_string_format_snake_case.snakeCase)(option.choices && option.choices.length > 0 ? option.choices.join("|") : option.name)}${option.variadic ? "..." : ""}>` : ""}"), align: "right", border: "none", maxWidth: "1/3" }, { value: colors.text.body.tertiary(\`${(0, _shell_shock_core_plugin_utils.formatShortDescription)(option.description).replace(/\.+$/, "").trim()}${option.env || option.default !== void 0 ? ` (${option.env ? `env: ${context.config.appSpecificEnvPrefix}_${option.env}${option.default !== void 0 ? ", " : ""}` : ""}${option.default !== void 0 ? `default: ${JSON.stringify(option.default).replace(/"/g, "\\\"")}` : ""})` : ""}.\`), align: "left", border: "none" }], `;
73
- }
74
- }),
75
- (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
76
- _alloy_js_core.code` ]); `
77
- ];
78
- }
79
- /**
80
- * A component that generates the commands table display for a command.
81
- */
82
- function HelpCommandsDisplay(props) {
83
- const { commands } = props;
84
- return [
85
- _alloy_js_core.code`table([ `,
86
- (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
87
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
88
- get each() {
89
- return Object.values(commands);
90
- },
91
- hardline: true,
92
- children: (child) => _alloy_js_core.code`[{ value: colors.text.body.primary("${child.name}"), align: "right", border: "none" }, { value: colors.text.body.tertiary(\`${(0, _shell_shock_core_plugin_utils.formatShortDescription)(child.description).replace(/\.+$/, "").trim()}.\`), align: "left", border: "none" }], `
93
- }),
94
- (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
95
- _alloy_js_core.code` ]); `
96
- ];
97
- }
98
- /**
99
- * A component that generates the `help` function declaration for a command.
100
- */
101
- function BaseHelpDisplay(props) {
102
- const { command, indent = 1, filterGlobalOptions = false } = props;
103
- const theme = (0, _shell_shock_plugin_theme_contexts_theme.useTheme)();
104
- const context = (0, _powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
105
- const options = (0, _alloy_js_core.computed)(() => filterGlobalOptions ? Object.values(command.options).filter((option) => !context.options.some((globalOption) => globalOption.name === option.name || option.alias.includes(globalOption.name) || globalOption.alias?.includes(option.name) || globalOption.alias?.some((alias) => option.alias.includes(alias)))) : Object.values(command.options));
106
- return [
107
- (0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`writeLine(colors.bold(colors.text.heading.secondary("Usage:"))${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : ""});`),
108
- (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
109
- (0, _alloy_js_core_jsx_runtime.createComponent)(HelpUsageDisplay, {
110
- command,
111
- indent
112
- }),
113
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
114
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
115
- get when() {
116
- return options.value.length > 0;
117
- },
118
- get children() {
119
- return [
120
- (0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`writeLine("");
121
- writeLine(colors.bold(colors.text.heading.secondary("Options:"))${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : ""});`),
122
- (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
123
- (0, _alloy_js_core_jsx_runtime.createComponent)(HelpOptionsDisplay, { get options() {
124
- return options.value;
125
- } }),
126
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {})
127
- ];
128
- }
129
- }),
130
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
131
- get when() {
132
- return Object.keys(command.children).length > 0;
133
- },
134
- get children() {
135
- return [
136
- (0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`writeLine("");
137
- writeLine(colors.bold(colors.text.heading.secondary("Commands:"))${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : ""});`),
138
- (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
139
- (0, _alloy_js_core_jsx_runtime.createComponent)(HelpCommandsDisplay, { get commands() {
140
- return command.children;
141
- } }),
142
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {})
143
- ];
144
- }
145
- }),
146
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
147
- get when() {
148
- return (0, _stryke_type_checks_is_set_string.isSetString)(command.reference);
149
- },
150
- get children() {
151
- return [
152
- (0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`writeLine("");
153
- writeLine(colors.text.heading.tertiary(\`More information about this command can be found in the reference documentation at \${link("${command.reference}")}\`)${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : ""});`),
154
- (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
155
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {})
156
- ];
157
- }
158
- })
159
- ];
160
- }
161
- function sortCommands(commands) {
162
- return Object.values(commands).sort((a, b) => {
163
- if (a.tags.some((tag) => tag.toLowerCase() === "deprecated") && !b.tags.some((tag) => tag.toLowerCase() === "deprecated")) return 1;
164
- else if (!a.tags.some((tag) => tag.toLowerCase() === "deprecated") && b.tags.some((tag) => tag.toLowerCase() === "deprecated")) return -1;
165
- else if (a.tags.some((tag) => tag.toLowerCase() === "experimental") && !b.tags.some((tag) => tag.toLowerCase() === "experimental")) return 1;
166
- else if (!a.tags.some((tag) => tag.toLowerCase() === "experimental") && b.tags.some((tag) => tag.toLowerCase() === "experimental")) return -1;
167
- else if (a.tags.some((tag) => tag.toLowerCase() === "utility") && !b.tags.some((tag) => tag.toLowerCase() === "utility")) return 1;
168
- else if (!a.tags.some((tag) => tag.toLowerCase() === "utility") && b.tags.some((tag) => tag.toLowerCase() === "utility")) return -1;
169
- return a.name.localeCompare(b.name);
170
- });
171
- }
172
- /**
173
- * A component that generates the invocation of the `help` function for a command.
174
- */
175
- function VirtualCommandHelpDisplay(props) {
176
- const { options, segments, commands } = props;
177
- const context = (0, _powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
178
- return [
179
- (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
180
- _alloy_js_core.code`writeLine(colors.bold(colors.text.heading.secondary("Global Options:")));`,
181
- (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
182
- (0, _alloy_js_core_jsx_runtime.createComponent)(HelpOptionsDisplay, { options }),
183
- _alloy_js_core.code`writeLine(""); `,
184
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
185
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
186
- get when() {
187
- return Object.keys(commands).length > 0;
188
- },
189
- get children() {
190
- return [
191
- (0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`writeLine(colors.text.body.secondary("The following commands are available through the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(context, true)} command-line interface:"));
192
- writeLine(""); `),
193
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
194
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
195
- get each() {
196
- return sortCommands(commands);
197
- },
198
- doubleHardline: true,
199
- joiner: _alloy_js_core.code`writeLine(""); `,
200
- ender: _alloy_js_core.code`writeLine(""); `,
201
- children: (child) => [
202
- (0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`
203
- writeLine(colors.text.heading.primary(${child.icon ? `(isUnicodeSupported ? " ${child.icon} " : "") + ` : ""}\`${child.title} ${child.isVirtual ? "" : "Command"}${child.tags?.length > 0 ? ` - ${child.tags.map((tag) => `\${colors.text.tags.${(0, _stryke_string_format_camel_case.camelCase)(tag)} ? colors.text.tags.${(0, _stryke_string_format_camel_case.camelCase)(tag)}(colors.inverse(" ${tag} ")) : colors.text.tags.$default(colors.inverse(" ${tag} "))}`).join(" ")}` : ""}\`);
204
- writeLine("");
205
- writeLine(colors.text.body.tertiary(splitText(\`${(0, _shell_shock_core_plugin_utils.formatDescription)(child.description).replace(/\.+$/, "").trim()}.\`)));
206
- writeLine("");
207
- `),
208
- (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
209
- (0, _alloy_js_core_jsx_runtime.createComponent)(BaseHelpDisplay, {
210
- command: child,
211
- indent: 2,
212
- filterGlobalOptions: true
213
- }),
214
- (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
215
- ]
216
- }),
217
- (0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`help("Running a specific command with the help flag (via: '${(0, _shell_shock_core_plugin_utils.getAppBin)(context)}${segments && segments.length > 0 ? ` ${segments.join(" ")}` : ""} <specific command> --help') will provide additional information that is specific to that command.");
218
- writeLine("");`)
219
- ];
220
- }
221
- })
222
- ];
223
- }
224
- /**
225
- * A component that generates the invocation of the `help` function for a command.
226
- */
227
- function CommandHelpDisplay(props) {
228
- const { command } = props;
229
- const context = (0, _powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
230
- return [
231
- _alloy_js_core.code`writeLine(""); `,
232
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
233
- (0, _alloy_js_core_jsx_runtime.createComponent)(BaseHelpDisplay, {
234
- command,
235
- filterGlobalOptions: false
236
- }),
237
- _alloy_js_core.code`writeLine(""); `,
238
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
239
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
240
- get when() {
241
- return Object.keys(command.children).length > 0;
242
- },
243
- get children() {
244
- return [
245
- _alloy_js_core.code`writeLine(colors.text.body.secondary("The following sub-commands are available:"));
246
- writeLine(""); `,
247
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
248
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
249
- get each() {
250
- return sortCommands(command.children);
251
- },
252
- doubleHardline: true,
253
- joiner: _alloy_js_core.code`writeLine(""); `,
254
- ender: _alloy_js_core.code`writeLine(""); `,
255
- children: (child) => [
256
- (0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`
257
- writeLine(colors.text.heading.primary(${child.icon ? `(isUnicodeSupported ? " ${child.icon} " : "") + ` : ""}\`${child.title} ${child.isVirtual ? "" : "Command"}${child.tags?.length > 0 ? ` - ${child.tags.map((tag) => `\${colors.text.tags.${(0, _stryke_string_format_camel_case.camelCase)(tag)} ? colors.text.tags.${(0, _stryke_string_format_camel_case.camelCase)(tag)}(colors.inverse(" ${tag} ")) : colors.text.tags.$default(colors.inverse(" ${tag} "))}`).join(" ")}` : ""}\`);
258
- writeLine("");
259
- writeLine(colors.text.body.tertiary(splitText(\`${(0, _shell_shock_core_plugin_utils.formatDescription)(child.description).replace(/\.+$/, "").trim()}.\`)));
260
- writeLine("");
261
- `),
262
- (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
263
- (0, _alloy_js_core_jsx_runtime.createComponent)(BaseHelpDisplay, {
264
- command: child,
265
- indent: 2,
266
- filterGlobalOptions: true
267
- }),
268
- (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
269
- ]
270
- }),
271
- (0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`help("Running a specific command with the help flag (via: '${(0, _shell_shock_core_plugin_utils.getAppBin)(context)} ${command.segments.join(" ")} <specific command> --help') will provide additional information that is specific to that command.");
272
- writeLine("");`)
273
- ];
274
- }
275
- })
276
- ];
277
- }
278
-
279
- //#endregion
280
- exports.BaseHelpDisplay = BaseHelpDisplay;
281
- exports.CommandHelpDisplay = CommandHelpDisplay;
282
- exports.HelpCommandsDisplay = HelpCommandsDisplay;
283
- exports.HelpOptionsDisplay = HelpOptionsDisplay;
284
- exports.HelpUsageDisplay = HelpUsageDisplay;
285
- exports.VirtualCommandHelpDisplay = VirtualCommandHelpDisplay;
@@ -1,280 +0,0 @@
1
- import { createComponent, createIntrinsic, memo } from "@alloy-js/core/jsx-runtime";
2
- import { For, Show, code, computed } from "@alloy-js/core";
3
- import { formatDescription, formatShortDescription, getAppBin, getAppTitle, getDynamicPathSegmentName, isDynamicPathSegment, sortOptions } from "@shell-shock/core/plugin-utils";
4
- import { isSetString } from "@stryke/type-checks/is-set-string";
5
- import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
6
- import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
7
- import { CommandParameterKinds } from "@shell-shock/core";
8
- import { useTheme } from "@shell-shock/plugin-theme/contexts/theme";
9
- import { camelCase } from "@stryke/string-format/camel-case";
10
- import { kebabCase } from "@stryke/string-format/kebab-case";
11
- import { snakeCase } from "@stryke/string-format/snake-case";
12
-
13
- //#region ../plugin-help/dist/components/display.mjs
14
- /**
15
- * A component that generates the usage display for a command.
16
- */
17
- function HelpUsageDisplay(props) {
18
- const { command, indent = 2 } = props;
19
- const context = usePowerlines();
20
- const theme = useTheme();
21
- return [createComponent(For, {
22
- get each() {
23
- return Object.keys(context.config.bin);
24
- },
25
- hardline: true,
26
- children: (bin) => [memo(() => code`
27
- writeLine(
28
- colors.text.body.secondary(\`\${colors.text.usage.bin("$_ ${bin}")}${command.segments.length > 0 ? ` ${command.segments.map((segment) => `\${colors.text.usage.${isDynamicPathSegment(segment) ? "dynamic" : "command"}("${isDynamicPathSegment(segment) ? `[${snakeCase(getDynamicPathSegmentName(segment))}]` : segment}")}`).join(" ")}` : ""}${Object.values(command.children).length > 0 ? ` \${colors.text.usage.dynamic("[command]")}` : ""}${command.args.length > 0 ? ` ${command.args.map((arg) => `\${colors.text.usage.args("<${snakeCase((arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.choices && arg.choices.length > 0 ? arg.choices.join("|") : arg.kind === CommandParameterKinds.string && arg.format ? arg.format : arg.name)}${(arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.variadic ? "..." : ""}>")}`).join(" ")}` : ""} \${colors.text.usage.options("[options]")}\`), { padding: ${theme.padding.app * indent} }
29
- );`), createIntrinsic("hbr", {})]
30
- }), createComponent(Show, {
31
- get when() {
32
- return command.args.length > 0;
33
- },
34
- get children() {
35
- return [createIntrinsic("hbr", {}), createComponent(For, {
36
- get each() {
37
- return Object.keys(context.config.bin);
38
- },
39
- hardline: true,
40
- children: (bin) => [memo(() => code`
41
- writeLine(
42
- colors.text.body.secondary(\`\${colors.text.usage.bin("$_ ${bin}")}${command.segments.length > 0 ? ` ${command.segments.map((segment) => `\${colors.text.usage.${isDynamicPathSegment(segment) ? "dynamic" : "command"}("${isDynamicPathSegment(segment) ? `[${snakeCase(getDynamicPathSegmentName(segment))}]` : segment}")}`).join(" ")}` : ""}${Object.values(command.children).length > 0 ? ` \${colors.text.usage.dynamic("[command]")}` : ""} \${colors.text.usage.options("[options]")}${command.args.length > 0 ? ` ${command.args.map((arg) => `\${colors.text.usage.args("<${snakeCase((arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.choices && arg.choices.length > 0 ? arg.choices.join("|") : arg.kind === CommandParameterKinds.string && arg.format ? arg.format : arg.name)}${(arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.variadic ? "..." : ""}>")}`).join(" ")}` : ""}\`), { padding: ${theme.padding.app * indent} }
43
- );`), createIntrinsic("hbr", {})]
44
- })];
45
- }
46
- })];
47
- }
48
- /**
49
- * A component that generates the options table display for a command.
50
- */
51
- function HelpOptionsDisplay(props) {
52
- const { options } = props;
53
- const context = usePowerlines();
54
- return [
55
- code`table([ `,
56
- createIntrinsic("hbr", {}),
57
- createComponent(For, {
58
- get each() {
59
- return sortOptions(options);
60
- },
61
- hardline: true,
62
- children: (option) => {
63
- const flags = [];
64
- const names = [];
65
- if (option.name.length === 1) flags.push(`-${option.name}`);
66
- else names.push(`--${kebabCase(option.name)}`);
67
- option.alias.forEach((alias) => {
68
- if (alias.length === 1) flags.push(`-${alias}`);
69
- else names.push(`--${kebabCase(alias)}`);
70
- });
71
- return code`[{ value: colors.text.body.primary("${flags.length > 0 ? `${flags.sort().join(", ")}${names.length > 0 ? ", " : ""}` : ""}${names.length > 0 ? names.sort().join(", ") : ""}${option.kind === CommandParameterKinds.string ? ` <${snakeCase(option.choices && option.choices.length > 0 ? option.choices.join("|") : option.format ? option.format : option.name)}${option.variadic ? "..." : ""}>` : option.kind === CommandParameterKinds.number ? ` <${snakeCase(option.choices && option.choices.length > 0 ? option.choices.join("|") : option.name)}${option.variadic ? "..." : ""}>` : ""}"), align: "right", border: "none", maxWidth: "1/3" }, { value: colors.text.body.tertiary(\`${formatShortDescription(option.description).replace(/\.+$/, "").trim()}${option.env || option.default !== void 0 ? ` (${option.env ? `env: ${context.config.appSpecificEnvPrefix}_${option.env}${option.default !== void 0 ? ", " : ""}` : ""}${option.default !== void 0 ? `default: ${JSON.stringify(option.default).replace(/"/g, "\\\"")}` : ""})` : ""}.\`), align: "left", border: "none" }], `;
72
- }
73
- }),
74
- createIntrinsic("hbr", {}),
75
- code` ]); `
76
- ];
77
- }
78
- /**
79
- * A component that generates the commands table display for a command.
80
- */
81
- function HelpCommandsDisplay(props) {
82
- const { commands } = props;
83
- return [
84
- code`table([ `,
85
- createIntrinsic("hbr", {}),
86
- createComponent(For, {
87
- get each() {
88
- return Object.values(commands);
89
- },
90
- hardline: true,
91
- children: (child) => code`[{ value: colors.text.body.primary("${child.name}"), align: "right", border: "none" }, { value: colors.text.body.tertiary(\`${formatShortDescription(child.description).replace(/\.+$/, "").trim()}.\`), align: "left", border: "none" }], `
92
- }),
93
- createIntrinsic("hbr", {}),
94
- code` ]); `
95
- ];
96
- }
97
- /**
98
- * A component that generates the `help` function declaration for a command.
99
- */
100
- function BaseHelpDisplay(props) {
101
- const { command, indent = 1, filterGlobalOptions = false } = props;
102
- const theme = useTheme();
103
- const context = usePowerlines();
104
- const options = computed(() => filterGlobalOptions ? Object.values(command.options).filter((option) => !context.options.some((globalOption) => globalOption.name === option.name || option.alias.includes(globalOption.name) || globalOption.alias?.includes(option.name) || globalOption.alias?.some((alias) => option.alias.includes(alias)))) : Object.values(command.options));
105
- return [
106
- memo(() => code`writeLine(colors.bold(colors.text.heading.secondary("Usage:"))${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : ""});`),
107
- createIntrinsic("hbr", {}),
108
- createComponent(HelpUsageDisplay, {
109
- command,
110
- indent
111
- }),
112
- createComponent(Spacing, {}),
113
- createComponent(Show, {
114
- get when() {
115
- return options.value.length > 0;
116
- },
117
- get children() {
118
- return [
119
- memo(() => code`writeLine("");
120
- writeLine(colors.bold(colors.text.heading.secondary("Options:"))${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : ""});`),
121
- createIntrinsic("hbr", {}),
122
- createComponent(HelpOptionsDisplay, { get options() {
123
- return options.value;
124
- } }),
125
- createComponent(Spacing, {})
126
- ];
127
- }
128
- }),
129
- createComponent(Show, {
130
- get when() {
131
- return Object.keys(command.children).length > 0;
132
- },
133
- get children() {
134
- return [
135
- memo(() => code`writeLine("");
136
- writeLine(colors.bold(colors.text.heading.secondary("Commands:"))${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : ""});`),
137
- createIntrinsic("hbr", {}),
138
- createComponent(HelpCommandsDisplay, { get commands() {
139
- return command.children;
140
- } }),
141
- createComponent(Spacing, {})
142
- ];
143
- }
144
- }),
145
- createComponent(Show, {
146
- get when() {
147
- return isSetString(command.reference);
148
- },
149
- get children() {
150
- return [
151
- memo(() => code`writeLine("");
152
- writeLine(colors.text.heading.tertiary(\`More information about this command can be found in the reference documentation at \${link("${command.reference}")}\`)${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : ""});`),
153
- createIntrinsic("hbr", {}),
154
- createComponent(Spacing, {})
155
- ];
156
- }
157
- })
158
- ];
159
- }
160
- function sortCommands(commands) {
161
- return Object.values(commands).sort((a, b) => {
162
- if (a.tags.some((tag) => tag.toLowerCase() === "deprecated") && !b.tags.some((tag) => tag.toLowerCase() === "deprecated")) return 1;
163
- else if (!a.tags.some((tag) => tag.toLowerCase() === "deprecated") && b.tags.some((tag) => tag.toLowerCase() === "deprecated")) return -1;
164
- else if (a.tags.some((tag) => tag.toLowerCase() === "experimental") && !b.tags.some((tag) => tag.toLowerCase() === "experimental")) return 1;
165
- else if (!a.tags.some((tag) => tag.toLowerCase() === "experimental") && b.tags.some((tag) => tag.toLowerCase() === "experimental")) return -1;
166
- else if (a.tags.some((tag) => tag.toLowerCase() === "utility") && !b.tags.some((tag) => tag.toLowerCase() === "utility")) return 1;
167
- else if (!a.tags.some((tag) => tag.toLowerCase() === "utility") && b.tags.some((tag) => tag.toLowerCase() === "utility")) return -1;
168
- return a.name.localeCompare(b.name);
169
- });
170
- }
171
- /**
172
- * A component that generates the invocation of the `help` function for a command.
173
- */
174
- function VirtualCommandHelpDisplay(props) {
175
- const { options, segments, commands } = props;
176
- const context = usePowerlines();
177
- return [
178
- createIntrinsic("hbr", {}),
179
- code`writeLine(colors.bold(colors.text.heading.secondary("Global Options:")));`,
180
- createIntrinsic("hbr", {}),
181
- createComponent(HelpOptionsDisplay, { options }),
182
- code`writeLine(""); `,
183
- createComponent(Spacing, {}),
184
- createComponent(Show, {
185
- get when() {
186
- return Object.keys(commands).length > 0;
187
- },
188
- get children() {
189
- return [
190
- memo(() => code`writeLine(colors.text.body.secondary("The following commands are available through the ${getAppTitle(context, true)} command-line interface:"));
191
- writeLine(""); `),
192
- createComponent(Spacing, {}),
193
- createComponent(For, {
194
- get each() {
195
- return sortCommands(commands);
196
- },
197
- doubleHardline: true,
198
- joiner: code`writeLine(""); `,
199
- ender: code`writeLine(""); `,
200
- children: (child) => [
201
- memo(() => code`
202
- writeLine(colors.text.heading.primary(${child.icon ? `(isUnicodeSupported ? " ${child.icon} " : "") + ` : ""}\`${child.title} ${child.isVirtual ? "" : "Command"}${child.tags?.length > 0 ? ` - ${child.tags.map((tag) => `\${colors.text.tags.${camelCase(tag)} ? colors.text.tags.${camelCase(tag)}(colors.inverse(" ${tag} ")) : colors.text.tags.$default(colors.inverse(" ${tag} "))}`).join(" ")}` : ""}\`);
203
- writeLine("");
204
- writeLine(colors.text.body.tertiary(splitText(\`${formatDescription(child.description).replace(/\.+$/, "").trim()}.\`)));
205
- writeLine("");
206
- `),
207
- createIntrinsic("hbr", {}),
208
- createComponent(BaseHelpDisplay, {
209
- command: child,
210
- indent: 2,
211
- filterGlobalOptions: true
212
- }),
213
- createIntrinsic("hbr", {})
214
- ]
215
- }),
216
- memo(() => code`help("Running a specific command with the help flag (via: '${getAppBin(context)}${segments && segments.length > 0 ? ` ${segments.join(" ")}` : ""} <specific command> --help') will provide additional information that is specific to that command.");
217
- writeLine("");`)
218
- ];
219
- }
220
- })
221
- ];
222
- }
223
- /**
224
- * A component that generates the invocation of the `help` function for a command.
225
- */
226
- function CommandHelpDisplay(props) {
227
- const { command } = props;
228
- const context = usePowerlines();
229
- return [
230
- code`writeLine(""); `,
231
- createComponent(Spacing, {}),
232
- createComponent(BaseHelpDisplay, {
233
- command,
234
- filterGlobalOptions: false
235
- }),
236
- code`writeLine(""); `,
237
- createComponent(Spacing, {}),
238
- createComponent(Show, {
239
- get when() {
240
- return Object.keys(command.children).length > 0;
241
- },
242
- get children() {
243
- return [
244
- code`writeLine(colors.text.body.secondary("The following sub-commands are available:"));
245
- writeLine(""); `,
246
- createComponent(Spacing, {}),
247
- createComponent(For, {
248
- get each() {
249
- return sortCommands(command.children);
250
- },
251
- doubleHardline: true,
252
- joiner: code`writeLine(""); `,
253
- ender: code`writeLine(""); `,
254
- children: (child) => [
255
- memo(() => code`
256
- writeLine(colors.text.heading.primary(${child.icon ? `(isUnicodeSupported ? " ${child.icon} " : "") + ` : ""}\`${child.title} ${child.isVirtual ? "" : "Command"}${child.tags?.length > 0 ? ` - ${child.tags.map((tag) => `\${colors.text.tags.${camelCase(tag)} ? colors.text.tags.${camelCase(tag)}(colors.inverse(" ${tag} ")) : colors.text.tags.$default(colors.inverse(" ${tag} "))}`).join(" ")}` : ""}\`);
257
- writeLine("");
258
- writeLine(colors.text.body.tertiary(splitText(\`${formatDescription(child.description).replace(/\.+$/, "").trim()}.\`)));
259
- writeLine("");
260
- `),
261
- createIntrinsic("hbr", {}),
262
- createComponent(BaseHelpDisplay, {
263
- command: child,
264
- indent: 2,
265
- filterGlobalOptions: true
266
- }),
267
- createIntrinsic("hbr", {})
268
- ]
269
- }),
270
- memo(() => code`help("Running a specific command with the help flag (via: '${getAppBin(context)} ${command.segments.join(" ")} <specific command> --help') will provide additional information that is specific to that command.");
271
- writeLine("");`)
272
- ];
273
- }
274
- })
275
- ];
276
- }
277
-
278
- //#endregion
279
- export { BaseHelpDisplay, CommandHelpDisplay, HelpCommandsDisplay, HelpOptionsDisplay, HelpUsageDisplay, VirtualCommandHelpDisplay };
280
- //# sourceMappingURL=display.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"display.mjs","names":[],"sources":["../../../../../plugin-help/dist/components/display.mjs"],"sourcesContent":["import { createComponent, createIntrinsic, memo } from \"@alloy-js/core/jsx-runtime\";\nimport { For, Show, code, computed } from \"@alloy-js/core\";\nimport { formatDescription, formatShortDescription, getAppBin, getAppTitle, getDynamicPathSegmentName, isDynamicPathSegment, sortOptions } from \"@shell-shock/core/plugin-utils\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { CommandParameterKinds } from \"@shell-shock/core\";\nimport { useTheme } from \"@shell-shock/plugin-theme/contexts/theme\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { snakeCase } from \"@stryke/string-format/snake-case\";\n\n//#region src/components/display.tsx\n/**\n* A component that generates the usage display for a command.\n*/\nfunction HelpUsageDisplay(props) {\n\tconst { command, indent = 2 } = props;\n\tconst context = usePowerlines();\n\tconst theme = useTheme();\n\treturn [createComponent(For, {\n\t\tget each() {\n\t\t\treturn Object.keys(context.config.bin);\n\t\t},\n\t\thardline: true,\n\t\tchildren: (bin) => [memo(() => code`\n writeLine(\n colors.text.body.secondary(\\`\\${colors.text.usage.bin(\"$_ ${bin}\")}${command.segments.length > 0 ? ` ${command.segments.map((segment) => `\\${colors.text.usage.${isDynamicPathSegment(segment) ? \"dynamic\" : \"command\"}(\"${isDynamicPathSegment(segment) ? `[${snakeCase(getDynamicPathSegmentName(segment))}]` : segment}\")}`).join(\" \")}` : \"\"}${Object.values(command.children).length > 0 ? ` \\${colors.text.usage.dynamic(\"[command]\")}` : \"\"}${command.args.length > 0 ? ` ${command.args.map((arg) => `\\${colors.text.usage.args(\"<${snakeCase((arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.choices && arg.choices.length > 0 ? arg.choices.join(\"|\") : arg.kind === CommandParameterKinds.string && arg.format ? arg.format : arg.name)}${(arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.variadic ? \"...\" : \"\"}>\")}`).join(\" \")}` : \"\"} \\${colors.text.usage.options(\"[options]\")}\\`), { padding: ${theme.padding.app * indent} }\n );`), createIntrinsic(\"hbr\", {})]\n\t}), createComponent(Show, {\n\t\tget when() {\n\t\t\treturn command.args.length > 0;\n\t\t},\n\t\tget children() {\n\t\t\treturn [createIntrinsic(\"hbr\", {}), createComponent(For, {\n\t\t\t\tget each() {\n\t\t\t\t\treturn Object.keys(context.config.bin);\n\t\t\t\t},\n\t\t\t\thardline: true,\n\t\t\t\tchildren: (bin) => [memo(() => code`\n writeLine(\n colors.text.body.secondary(\\`\\${colors.text.usage.bin(\"$_ ${bin}\")}${command.segments.length > 0 ? ` ${command.segments.map((segment) => `\\${colors.text.usage.${isDynamicPathSegment(segment) ? \"dynamic\" : \"command\"}(\"${isDynamicPathSegment(segment) ? `[${snakeCase(getDynamicPathSegmentName(segment))}]` : segment}\")}`).join(\" \")}` : \"\"}${Object.values(command.children).length > 0 ? ` \\${colors.text.usage.dynamic(\"[command]\")}` : \"\"} \\${colors.text.usage.options(\"[options]\")}${command.args.length > 0 ? ` ${command.args.map((arg) => `\\${colors.text.usage.args(\"<${snakeCase((arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.choices && arg.choices.length > 0 ? arg.choices.join(\"|\") : arg.kind === CommandParameterKinds.string && arg.format ? arg.format : arg.name)}${(arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.variadic ? \"...\" : \"\"}>\")}`).join(\" \")}` : \"\"}\\`), { padding: ${theme.padding.app * indent} }\n );`), createIntrinsic(\"hbr\", {})]\n\t\t\t})];\n\t\t}\n\t})];\n}\n/**\n* A component that generates the options table display for a command.\n*/\nfunction HelpOptionsDisplay(props) {\n\tconst { options } = props;\n\tconst context = usePowerlines();\n\treturn [\n\t\tcode`table([ `,\n\t\tcreateIntrinsic(\"hbr\", {}),\n\t\tcreateComponent(For, {\n\t\t\tget each() {\n\t\t\t\treturn sortOptions(options);\n\t\t\t},\n\t\t\thardline: true,\n\t\t\tchildren: (option) => {\n\t\t\t\tconst flags = [];\n\t\t\t\tconst names = [];\n\t\t\t\tif (option.name.length === 1) flags.push(`-${option.name}`);\n\t\t\t\telse names.push(`--${kebabCase(option.name)}`);\n\t\t\t\toption.alias.forEach((alias) => {\n\t\t\t\t\tif (alias.length === 1) flags.push(`-${alias}`);\n\t\t\t\t\telse names.push(`--${kebabCase(alias)}`);\n\t\t\t\t});\n\t\t\t\treturn code`[{ value: colors.text.body.primary(\"${flags.length > 0 ? `${flags.sort().join(\", \")}${names.length > 0 ? \", \" : \"\"}` : \"\"}${names.length > 0 ? names.sort().join(\", \") : \"\"}${option.kind === CommandParameterKinds.string ? ` <${snakeCase(option.choices && option.choices.length > 0 ? option.choices.join(\"|\") : option.format ? option.format : option.name)}${option.variadic ? \"...\" : \"\"}>` : option.kind === CommandParameterKinds.number ? ` <${snakeCase(option.choices && option.choices.length > 0 ? option.choices.join(\"|\") : option.name)}${option.variadic ? \"...\" : \"\"}>` : \"\"}\"), align: \"right\", border: \"none\", maxWidth: \"1/3\" }, { value: colors.text.body.tertiary(\\`${formatShortDescription(option.description).replace(/\\.+$/, \"\").trim()}${option.env || option.default !== void 0 ? ` (${option.env ? `env: ${context.config.appSpecificEnvPrefix}_${option.env}${option.default !== void 0 ? \", \" : \"\"}` : \"\"}${option.default !== void 0 ? `default: ${JSON.stringify(option.default).replace(/\"/g, \"\\\\\\\"\")}` : \"\"})` : \"\"}.\\`), align: \"left\", border: \"none\" }], `;\n\t\t\t}\n\t\t}),\n\t\tcreateIntrinsic(\"hbr\", {}),\n\t\tcode` ]); `\n\t];\n}\n/**\n* A component that generates the commands table display for a command.\n*/\nfunction HelpCommandsDisplay(props) {\n\tconst { commands } = props;\n\treturn [\n\t\tcode`table([ `,\n\t\tcreateIntrinsic(\"hbr\", {}),\n\t\tcreateComponent(For, {\n\t\t\tget each() {\n\t\t\t\treturn Object.values(commands);\n\t\t\t},\n\t\t\thardline: true,\n\t\t\tchildren: (child) => code`[{ value: colors.text.body.primary(\"${child.name}\"), align: \"right\", border: \"none\" }, { value: colors.text.body.tertiary(\\`${formatShortDescription(child.description).replace(/\\.+$/, \"\").trim()}.\\`), align: \"left\", border: \"none\" }], `\n\t\t}),\n\t\tcreateIntrinsic(\"hbr\", {}),\n\t\tcode` ]); `\n\t];\n}\n/**\n* A component that generates the `help` function declaration for a command.\n*/\nfunction BaseHelpDisplay(props) {\n\tconst { command, indent = 1, filterGlobalOptions = false } = props;\n\tconst theme = useTheme();\n\tconst context = usePowerlines();\n\tconst options = computed(() => filterGlobalOptions ? Object.values(command.options).filter((option) => !context.options.some((globalOption) => globalOption.name === option.name || option.alias.includes(globalOption.name) || globalOption.alias?.includes(option.name) || globalOption.alias?.some((alias) => option.alias.includes(alias)))) : Object.values(command.options));\n\treturn [\n\t\tmemo(() => code`writeLine(colors.bold(colors.text.heading.secondary(\"Usage:\"))${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : \"\"});`),\n\t\tcreateIntrinsic(\"hbr\", {}),\n\t\tcreateComponent(HelpUsageDisplay, {\n\t\t\tcommand,\n\t\t\tindent\n\t\t}),\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(Show, {\n\t\t\tget when() {\n\t\t\t\treturn options.value.length > 0;\n\t\t\t},\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tmemo(() => code`writeLine(\"\");\n writeLine(colors.bold(colors.text.heading.secondary(\"Options:\"))${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : \"\"});`),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(HelpOptionsDisplay, { get options() {\n\t\t\t\t\t\treturn options.value;\n\t\t\t\t\t} }),\n\t\t\t\t\tcreateComponent(Spacing, {})\n\t\t\t\t];\n\t\t\t}\n\t\t}),\n\t\tcreateComponent(Show, {\n\t\t\tget when() {\n\t\t\t\treturn Object.keys(command.children).length > 0;\n\t\t\t},\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tmemo(() => code`writeLine(\"\");\n writeLine(colors.bold(colors.text.heading.secondary(\"Commands:\"))${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : \"\"});`),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(HelpCommandsDisplay, { get commands() {\n\t\t\t\t\t\treturn command.children;\n\t\t\t\t\t} }),\n\t\t\t\t\tcreateComponent(Spacing, {})\n\t\t\t\t];\n\t\t\t}\n\t\t}),\n\t\tcreateComponent(Show, {\n\t\t\tget when() {\n\t\t\t\treturn isSetString(command.reference);\n\t\t\t},\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tmemo(() => code`writeLine(\"\");\n writeLine(colors.text.heading.tertiary(\\`More information about this command can be found in the reference documentation at \\${link(\"${command.reference}\")}\\`)${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : \"\"});`),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(Spacing, {})\n\t\t\t\t];\n\t\t\t}\n\t\t})\n\t];\n}\nfunction sortCommands(commands) {\n\treturn Object.values(commands).sort((a, b) => {\n\t\tif (a.tags.some((tag) => tag.toLowerCase() === \"deprecated\") && !b.tags.some((tag) => tag.toLowerCase() === \"deprecated\")) return 1;\n\t\telse if (!a.tags.some((tag) => tag.toLowerCase() === \"deprecated\") && b.tags.some((tag) => tag.toLowerCase() === \"deprecated\")) return -1;\n\t\telse if (a.tags.some((tag) => tag.toLowerCase() === \"experimental\") && !b.tags.some((tag) => tag.toLowerCase() === \"experimental\")) return 1;\n\t\telse if (!a.tags.some((tag) => tag.toLowerCase() === \"experimental\") && b.tags.some((tag) => tag.toLowerCase() === \"experimental\")) return -1;\n\t\telse if (a.tags.some((tag) => tag.toLowerCase() === \"utility\") && !b.tags.some((tag) => tag.toLowerCase() === \"utility\")) return 1;\n\t\telse if (!a.tags.some((tag) => tag.toLowerCase() === \"utility\") && b.tags.some((tag) => tag.toLowerCase() === \"utility\")) return -1;\n\t\treturn a.name.localeCompare(b.name);\n\t});\n}\n/**\n* A component that generates the invocation of the `help` function for a command.\n*/\nfunction VirtualCommandHelpDisplay(props) {\n\tconst { options, segments, commands } = props;\n\tconst context = usePowerlines();\n\treturn [\n\t\tcreateIntrinsic(\"hbr\", {}),\n\t\tcode`writeLine(colors.bold(colors.text.heading.secondary(\"Global Options:\")));`,\n\t\tcreateIntrinsic(\"hbr\", {}),\n\t\tcreateComponent(HelpOptionsDisplay, { options }),\n\t\tcode`writeLine(\"\"); `,\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(Show, {\n\t\t\tget when() {\n\t\t\t\treturn Object.keys(commands).length > 0;\n\t\t\t},\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tmemo(() => code`writeLine(colors.text.body.secondary(\"The following commands are available through the ${getAppTitle(context, true)} command-line interface:\"));\n writeLine(\"\"); `),\n\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\tcreateComponent(For, {\n\t\t\t\t\t\tget each() {\n\t\t\t\t\t\t\treturn sortCommands(commands);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdoubleHardline: true,\n\t\t\t\t\t\tjoiner: code`writeLine(\"\"); `,\n\t\t\t\t\t\tender: code`writeLine(\"\"); `,\n\t\t\t\t\t\tchildren: (child) => [\n\t\t\t\t\t\t\tmemo(() => code`\n writeLine(colors.text.heading.primary(${child.icon ? `(isUnicodeSupported ? \" ${child.icon} \" : \"\") + ` : \"\"}\\`${child.title} ${child.isVirtual ? \"\" : \"Command\"}${child.tags?.length > 0 ? ` - ${child.tags.map((tag) => `\\${colors.text.tags.${camelCase(tag)} ? colors.text.tags.${camelCase(tag)}(colors.inverse(\" ${tag} \")) : colors.text.tags.$default(colors.inverse(\" ${tag} \"))}`).join(\" \")}` : \"\"}\\`);\n writeLine(\"\");\n writeLine(colors.text.body.tertiary(splitText(\\`${formatDescription(child.description).replace(/\\.+$/, \"\").trim()}.\\`)));\n writeLine(\"\");\n `),\n\t\t\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\t\t\tcreateComponent(BaseHelpDisplay, {\n\t\t\t\t\t\t\t\tcommand: child,\n\t\t\t\t\t\t\t\tindent: 2,\n\t\t\t\t\t\t\t\tfilterGlobalOptions: true\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tcreateIntrinsic(\"hbr\", {})\n\t\t\t\t\t\t]\n\t\t\t\t\t}),\n\t\t\t\t\tmemo(() => code`help(\"Running a specific command with the help flag (via: '${getAppBin(context)}${segments && segments.length > 0 ? ` ${segments.join(\" \")}` : \"\"} <specific command> --help') will provide additional information that is specific to that command.\");\n writeLine(\"\");`)\n\t\t\t\t];\n\t\t\t}\n\t\t})\n\t];\n}\n/**\n* A component that generates the invocation of the `help` function for a command.\n*/\nfunction CommandHelpDisplay(props) {\n\tconst { command } = props;\n\tconst context = usePowerlines();\n\treturn [\n\t\tcode`writeLine(\"\"); `,\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(BaseHelpDisplay, {\n\t\t\tcommand,\n\t\t\tfilterGlobalOptions: false\n\t\t}),\n\t\tcode`writeLine(\"\"); `,\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(Show, {\n\t\t\tget when() {\n\t\t\t\treturn Object.keys(command.children).length > 0;\n\t\t\t},\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tcode`writeLine(colors.text.body.secondary(\"The following sub-commands are available:\"));\n writeLine(\"\"); `,\n\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\tcreateComponent(For, {\n\t\t\t\t\t\tget each() {\n\t\t\t\t\t\t\treturn sortCommands(command.children);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdoubleHardline: true,\n\t\t\t\t\t\tjoiner: code`writeLine(\"\"); `,\n\t\t\t\t\t\tender: code`writeLine(\"\"); `,\n\t\t\t\t\t\tchildren: (child) => [\n\t\t\t\t\t\t\tmemo(() => code`\n writeLine(colors.text.heading.primary(${child.icon ? `(isUnicodeSupported ? \" ${child.icon} \" : \"\") + ` : \"\"}\\`${child.title} ${child.isVirtual ? \"\" : \"Command\"}${child.tags?.length > 0 ? ` - ${child.tags.map((tag) => `\\${colors.text.tags.${camelCase(tag)} ? colors.text.tags.${camelCase(tag)}(colors.inverse(\" ${tag} \")) : colors.text.tags.$default(colors.inverse(\" ${tag} \"))}`).join(\" \")}` : \"\"}\\`);\n writeLine(\"\");\n writeLine(colors.text.body.tertiary(splitText(\\`${formatDescription(child.description).replace(/\\.+$/, \"\").trim()}.\\`)));\n writeLine(\"\");\n `),\n\t\t\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\t\t\tcreateComponent(BaseHelpDisplay, {\n\t\t\t\t\t\t\t\tcommand: child,\n\t\t\t\t\t\t\t\tindent: 2,\n\t\t\t\t\t\t\t\tfilterGlobalOptions: true\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tcreateIntrinsic(\"hbr\", {})\n\t\t\t\t\t\t]\n\t\t\t\t\t}),\n\t\t\t\t\tmemo(() => code`help(\"Running a specific command with the help flag (via: '${getAppBin(context)} ${command.segments.join(\" \")} <specific command> --help') will provide additional information that is specific to that command.\");\n writeLine(\"\");`)\n\t\t\t\t];\n\t\t\t}\n\t\t})\n\t];\n}\n\n//#endregion\nexport { BaseHelpDisplay, CommandHelpDisplay, HelpCommandsDisplay, HelpOptionsDisplay, HelpUsageDisplay, VirtualCommandHelpDisplay };\n//# sourceMappingURL=display.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAgBA,SAAS,iBAAiB,OAAO;CAChC,MAAM,EAAE,SAAS,SAAS,MAAM;CAChC,MAAM,UAAU,eAAe;CAC/B,MAAM,QAAQ,UAAU;AACxB,QAAO,CAAC,gBAAgB,KAAK;EAC5B,IAAI,OAAO;AACV,UAAO,OAAO,KAAK,QAAQ,OAAO,IAAI;;EAEvC,UAAU;EACV,WAAW,QAAQ,CAAC,WAAW,IAAI;;oEAE+B,IAAI,KAAK,QAAQ,SAAS,SAAS,IAAI,IAAI,QAAQ,SAAS,KAAK,YAAY,wBAAwB,qBAAqB,QAAQ,GAAG,YAAY,UAAU,IAAI,qBAAqB,QAAQ,GAAG,IAAI,UAAU,0BAA0B,QAAQ,CAAC,CAAC,KAAK,QAAQ,KAAK,CAAC,KAAK,IAAI,KAAK,KAAK,OAAO,OAAO,QAAQ,SAAS,CAAC,SAAS,IAAI,gDAAgD,KAAK,QAAQ,KAAK,SAAS,IAAI,IAAI,QAAQ,KAAK,KAAK,QAAQ,+BAA+B,WAAW,IAAI,SAAS,sBA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