@shell-shock/preset-cli 0.8.19 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/banner-builtin.cjs +14 -8
- package/dist/components/banner-builtin.d.cts +1 -1
- package/dist/components/banner-builtin.d.cts.map +1 -1
- package/dist/components/banner-builtin.d.mts +2 -2
- package/dist/components/banner-builtin.d.mts.map +1 -1
- package/dist/components/banner-builtin.mjs +11 -5
- package/dist/components/banner-builtin.mjs.map +1 -1
- package/dist/components/command-entry.cjs +6 -6
- package/dist/components/command-entry.d.mts +1 -1
- package/dist/components/command-entry.mjs +5 -5
- package/dist/components/command-router.cjs +1 -1
- package/dist/components/command-router.mjs +1 -1
- package/dist/components/upgrade-builtin.cjs +1 -1
- package/dist/components/upgrade-builtin.mjs +1 -1
- package/dist/components/virtual-command-entry.cjs +2 -2
- package/dist/components/virtual-command-entry.d.mts +1 -1
- package/dist/components/virtual-command-entry.mjs +1 -1
- package/dist/index.cjs +8 -7
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +7 -8
- package/dist/index.mjs.map +1 -1
- package/dist/types/plugin.d.cts +16 -7
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +16 -7
- package/dist/types/plugin.d.mts.map +1 -1
- package/package.json +11 -8
- package/dist/plugin-banner/dist/components/banner-builtin.cjs +0 -63
- package/dist/plugin-banner/dist/components/banner-builtin.mjs +0 -62
- package/dist/plugin-banner/dist/components/banner-builtin.mjs.map +0 -1
- package/dist/plugin-banner/dist/components/banner-function-declaration.cjs +0 -138
- package/dist/plugin-banner/dist/components/banner-function-declaration.d.cts +0 -45
- package/dist/plugin-banner/dist/components/banner-function-declaration.d.cts.map +0 -1
- package/dist/plugin-banner/dist/components/banner-function-declaration.d.mts +0 -45
- package/dist/plugin-banner/dist/components/banner-function-declaration.d.mts.map +0 -1
- package/dist/plugin-banner/dist/components/banner-function-declaration.mjs +0 -136
- package/dist/plugin-banner/dist/components/banner-function-declaration.mjs.map +0 -1
- package/dist/plugin-banner/dist/components/index.cjs +0 -2
- package/dist/plugin-banner/dist/components/index.mjs +0 -4
- package/dist/plugin-banner/dist/index.cjs +0 -70
- package/dist/plugin-banner/dist/index.d.cts +0 -2
- package/dist/plugin-banner/dist/index.d.mts +0 -2
- package/dist/plugin-banner/dist/index.mjs +0 -68
- package/dist/plugin-banner/dist/index.mjs.map +0 -1
- package/dist/plugin-banner/dist/types/plugin.d.cts +0 -31
- package/dist/plugin-banner/dist/types/plugin.d.cts.map +0 -1
- package/dist/plugin-banner/dist/types/plugin.d.mts +0 -31
- package/dist/plugin-banner/dist/types/plugin.d.mts.map +0 -1
- package/dist/plugin-help/dist/components/display.cjs +0 -285
- package/dist/plugin-help/dist/components/display.mjs +0 -280
- package/dist/plugin-help/dist/components/display.mjs.map +0 -1
- package/dist/plugin-help/dist/components/help-builtin.cjs +0 -85
- package/dist/plugin-help/dist/components/help-builtin.mjs +0 -84
- package/dist/plugin-help/dist/components/help-builtin.mjs.map +0 -1
- package/dist/plugin-help/dist/components/help-command.cjs +0 -96
- package/dist/plugin-help/dist/components/help-command.mjs +0 -96
- package/dist/plugin-help/dist/components/help-command.mjs.map +0 -1
- package/dist/plugin-help/dist/components/index.cjs +0 -3
- package/dist/plugin-help/dist/components/index.mjs +0 -5
- package/dist/plugin-help/dist/index.cjs +0 -106
- package/dist/plugin-help/dist/index.d.cts +0 -2
- package/dist/plugin-help/dist/index.d.mts +0 -2
- package/dist/plugin-help/dist/index.mjs +0 -103
- package/dist/plugin-help/dist/index.mjs.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_types@0.11.2/node_modules/@stryke/types/dist/base.d.cts +0 -19
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_types@0.11.2/node_modules/@stryke/types/dist/base.d.cts.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_types@0.11.2/node_modules/@stryke/types/dist/base.d.mts +0 -19
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_types@0.11.2/node_modules/@stryke/types/dist/base.d.mts.map +0 -1
- package/dist/plugin-help/dist/types/plugin.d.cts +0 -63
- package/dist/plugin-help/dist/types/plugin.d.cts.map +0 -1
- package/dist/plugin-help/dist/types/plugin.d.mts +0 -63
- package/dist/plugin-help/dist/types/plugin.d.mts.map +0 -1
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { code } from "@alloy-js/core";
|
|
3
|
-
import { FunctionDeclaration, InterfaceDeclaration } from "@alloy-js/typescript";
|
|
4
|
-
import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
|
|
5
|
-
import { joinPaths } from "@stryke/path";
|
|
6
|
-
import { InterfaceMember, TypescriptFile } from "@powerlines/plugin-alloy/typescript";
|
|
7
|
-
import { ReflectionKind } from "@powerlines/deepkit/vendor/type";
|
|
8
|
-
import { Spacing } from "@powerlines/plugin-alloy/core";
|
|
9
|
-
import { TSDoc, TSDocDefaultValue, TSDocRemarks } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
|
|
10
|
-
|
|
11
|
-
//#region ../plugin-help/dist/components/help-command.mjs
|
|
12
|
-
/**
|
|
13
|
-
* The Help command's handler wrapper for the Shell Shock project.
|
|
14
|
-
*/
|
|
15
|
-
function HelpCommand() {
|
|
16
|
-
const context = usePowerlines();
|
|
17
|
-
return createComponent(TypescriptFile, {
|
|
18
|
-
get path() {
|
|
19
|
-
return joinPaths(context.entryPath, "help", "command.ts");
|
|
20
|
-
},
|
|
21
|
-
imports: {
|
|
22
|
-
"node:os": ["os"],
|
|
23
|
-
"node:fs/promises": ["readFile", "writeFile"]
|
|
24
|
-
},
|
|
25
|
-
builtinImports: { console: [
|
|
26
|
-
"colors",
|
|
27
|
-
"writeLine",
|
|
28
|
-
"success",
|
|
29
|
-
"warn",
|
|
30
|
-
"stripAnsi"
|
|
31
|
-
] },
|
|
32
|
-
get children() {
|
|
33
|
-
return [
|
|
34
|
-
createComponent(TSDoc, { heading: "Options for the Help command." }),
|
|
35
|
-
createComponent(InterfaceDeclaration, {
|
|
36
|
-
"export": true,
|
|
37
|
-
name: "HelpOptions",
|
|
38
|
-
get children() {
|
|
39
|
-
return [
|
|
40
|
-
createComponent(TSDoc, {
|
|
41
|
-
heading: "Whether to help to the latest version.",
|
|
42
|
-
get children() {
|
|
43
|
-
return [createComponent(TSDocRemarks, { children: `If set to \`true\`, the command will attempt to help to the latest version. This option takes precedence over the \`version\` option.` }), createComponent(TSDocDefaultValue, {
|
|
44
|
-
get type() {
|
|
45
|
-
return ReflectionKind.boolean;
|
|
46
|
-
},
|
|
47
|
-
defaultValue: false
|
|
48
|
-
})];
|
|
49
|
-
}
|
|
50
|
-
}),
|
|
51
|
-
createComponent(InterfaceMember, {
|
|
52
|
-
name: "latest",
|
|
53
|
-
optional: true,
|
|
54
|
-
type: "boolean"
|
|
55
|
-
}),
|
|
56
|
-
createComponent(Spacing, {}),
|
|
57
|
-
createComponent(TSDoc, {
|
|
58
|
-
heading: "A specific application version to help to.",
|
|
59
|
-
get children() {
|
|
60
|
-
return [createComponent(TSDocRemarks, { children: `The command will attempt to help to the specified version. The version should be a valid semantic version string, or \`latest\` to help to the latest version.` }), createComponent(TSDocDefaultValue, {
|
|
61
|
-
get type() {
|
|
62
|
-
return ReflectionKind.string;
|
|
63
|
-
},
|
|
64
|
-
defaultValue: "latest"
|
|
65
|
-
})];
|
|
66
|
-
}
|
|
67
|
-
}),
|
|
68
|
-
createComponent(InterfaceMember, {
|
|
69
|
-
name: "version",
|
|
70
|
-
optional: true,
|
|
71
|
-
type: "string"
|
|
72
|
-
})
|
|
73
|
-
];
|
|
74
|
-
}
|
|
75
|
-
}),
|
|
76
|
-
createComponent(Spacing, {}),
|
|
77
|
-
createComponent(TSDoc, { heading: "Handler logic for the \\`help\\` command." }),
|
|
78
|
-
createComponent(FunctionDeclaration, {
|
|
79
|
-
"export": true,
|
|
80
|
-
"default": true,
|
|
81
|
-
async: true,
|
|
82
|
-
name: "handler",
|
|
83
|
-
parameters: [{
|
|
84
|
-
name: "options",
|
|
85
|
-
type: "HelpOptions"
|
|
86
|
-
}],
|
|
87
|
-
children: code` return;`
|
|
88
|
-
})
|
|
89
|
-
];
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
//#endregion
|
|
95
|
-
export { HelpCommand };
|
|
96
|
-
//# sourceMappingURL=help-command.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"help-command.mjs","names":["TSDoc$1","TSDocRemarks$1"],"sources":["../../../../../plugin-help/dist/components/help-command.mjs"],"sourcesContent":["import { createComponent } from \"@alloy-js/core/jsx-runtime\";\nimport { code } from \"@alloy-js/core\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { FunctionDeclaration, InterfaceDeclaration } from \"@alloy-js/typescript\";\nimport { InterfaceMember, TypescriptFile } from \"@powerlines/plugin-alloy/typescript\";\nimport { joinPaths } from \"@stryke/path\";\nimport { ReflectionKind } from \"@powerlines/deepkit/vendor/type\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core\";\nimport { TSDoc as TSDoc$1, TSDocDefaultValue, TSDocRemarks as TSDocRemarks$1 } from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\n\n//#region src/components/help-command.tsx\n/**\n* The Help command's handler wrapper for the Shell Shock project.\n*/\nfunction HelpCommand() {\n\tconst context = usePowerlines();\n\treturn createComponent(TypescriptFile, {\n\t\tget path() {\n\t\t\treturn joinPaths(context.entryPath, \"help\", \"command.ts\");\n\t\t},\n\t\timports: {\n\t\t\t\"node:os\": [\"os\"],\n\t\t\t\"node:fs/promises\": [\"readFile\", \"writeFile\"]\n\t\t},\n\t\tbuiltinImports: { console: [\n\t\t\t\"colors\",\n\t\t\t\"writeLine\",\n\t\t\t\"success\",\n\t\t\t\"warn\",\n\t\t\t\"stripAnsi\"\n\t\t] },\n\t\tget children() {\n\t\t\treturn [\n\t\t\t\tcreateComponent(TSDoc$1, { heading: \"Options for the Help command.\" }),\n\t\t\t\tcreateComponent(InterfaceDeclaration, {\n\t\t\t\t\t\"export\": true,\n\t\t\t\t\tname: \"HelpOptions\",\n\t\t\t\t\tget children() {\n\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\tcreateComponent(TSDoc$1, {\n\t\t\t\t\t\t\t\theading: \"Whether to help to the latest version.\",\n\t\t\t\t\t\t\t\tget children() {\n\t\t\t\t\t\t\t\t\treturn [createComponent(TSDocRemarks$1, { children: `If set to \\`true\\`, the command will attempt to help to the latest version. This option takes precedence over the \\`version\\` option.` }), createComponent(TSDocDefaultValue, {\n\t\t\t\t\t\t\t\t\t\tget type() {\n\t\t\t\t\t\t\t\t\t\t\treturn ReflectionKind.boolean;\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tdefaultValue: false\n\t\t\t\t\t\t\t\t\t})];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\t\t\tname: \"latest\",\n\t\t\t\t\t\t\t\toptional: true,\n\t\t\t\t\t\t\t\ttype: \"boolean\"\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\t\t\tcreateComponent(TSDoc$1, {\n\t\t\t\t\t\t\t\theading: \"A specific application version to help to.\",\n\t\t\t\t\t\t\t\tget children() {\n\t\t\t\t\t\t\t\t\treturn [createComponent(TSDocRemarks$1, { children: `The command will attempt to help to the specified version. The version should be a valid semantic version string, or \\`latest\\` to help to the latest version.` }), createComponent(TSDocDefaultValue, {\n\t\t\t\t\t\t\t\t\t\tget type() {\n\t\t\t\t\t\t\t\t\t\t\treturn ReflectionKind.string;\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tdefaultValue: \"latest\"\n\t\t\t\t\t\t\t\t\t})];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\t\t\tname: \"version\",\n\t\t\t\t\t\t\t\toptional: true,\n\t\t\t\t\t\t\t\ttype: \"string\"\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\tcreateComponent(TSDoc$1, { heading: \"Handler logic for the \\\\`help\\\\` command.\" }),\n\t\t\t\tcreateComponent(FunctionDeclaration, {\n\t\t\t\t\t\"export\": true,\n\t\t\t\t\t\"default\": true,\n\t\t\t\t\tasync: true,\n\t\t\t\t\tname: \"handler\",\n\t\t\t\t\tparameters: [{\n\t\t\t\t\t\tname: \"options\",\n\t\t\t\t\t\ttype: \"HelpOptions\"\n\t\t\t\t\t}],\n\t\t\t\t\tchildren: code` return;`\n\t\t\t\t})\n\t\t\t];\n\t\t}\n\t});\n}\n\n//#endregion\nexport { HelpCommand };\n//# sourceMappingURL=help-command.mjs.map"],"mappings":";;;;;;;;;;;;;;AAcA,SAAS,cAAc;CACtB,MAAM,UAAU,eAAe;AAC/B,QAAO,gBAAgB,gBAAgB;EACtC,IAAI,OAAO;AACV,UAAO,UAAU,QAAQ,WAAW,QAAQ,aAAa;;EAE1D,SAAS;GACR,WAAW,CAAC,KAAK;GACjB,oBAAoB,CAAC,YAAY,YAAY;GAC7C;EACD,gBAAgB,EAAE,SAAS;GAC1B;GACA;GACA;GACA;GACA;GACA,EAAE;EACH,IAAI,WAAW;AACd,UAAO;IACN,gBAAgBA,OAAS,EAAE,SAAS,iCAAiC,CAAC;IACtE,gBAAgB,sBAAsB;KACrC,UAAU;KACV,MAAM;KACN,IAAI,WAAW;AACd,aAAO;OACN,gBAAgBA,OAAS;QACxB,SAAS;QACT,IAAI,WAAW;AACd,gBAAO,CAAC,gBAAgBC,cAAgB,EAAE,UAAU,yIAAyI,CAAC,EAAE,gBAAgB,mBAAmB;UAClO,IAAI,OAAO;AACV,kBAAO,eAAe;;UAEvB,cAAc;UACd,CAAC,CAAC;;QAEJ,CAAC;OACF,gBAAgB,iBAAiB;QAChC,MAAM;QACN,UAAU;QACV,MAAM;QACN,CAAC;OACF,gBAAgB,SAAS,EAAE,CAAC;OAC5B,gBAAgBD,OAAS;QACxB,SAAS;QACT,IAAI,WAAW;AACd,gBAAO,CAAC,gBAAgBC,cAAgB,EAAE,UAAU,kKAAkK,CAAC,EAAE,gBAAgB,mBAAmB;UAC3P,IAAI,OAAO;AACV,kBAAO,eAAe;;UAEvB,cAAc;UACd,CAAC,CAAC;;QAEJ,CAAC;OACF,gBAAgB,iBAAiB;QAChC,MAAM;QACN,UAAU;QACV,MAAM;QACN,CAAC;OACF;;KAEF,CAAC;IACF,gBAAgB,SAAS,EAAE,CAAC;IAC5B,gBAAgBD,OAAS,EAAE,SAAS,6CAA6C,CAAC;IAClF,gBAAgB,qBAAqB;KACpC,UAAU;KACV,WAAW;KACX,OAAO;KACP,MAAM;KACN,YAAY,CAAC;MACZ,MAAM;MACN,MAAM;MACN,CAAC;KACF,UAAU,IAAI;KACd,CAAC;IACF;;EAEF,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { BaseHelpDisplay, CommandHelpDisplay, HelpCommandsDisplay, HelpOptionsDisplay, HelpUsageDisplay, VirtualCommandHelpDisplay } from "./display.mjs";
|
|
2
|
-
import { HelpBuiltin } from "./help-builtin.mjs";
|
|
3
|
-
import { HelpCommand } from "./help-command.mjs";
|
|
4
|
-
|
|
5
|
-
export { };
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
2
|
-
const require_help_builtin = require('./components/help-builtin.cjs');
|
|
3
|
-
const require_help_command = require('./components/help-command.cjs');
|
|
4
|
-
require('./components/index.cjs');
|
|
5
|
-
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
6
|
-
let _alloy_js_core = require("@alloy-js/core");
|
|
7
|
-
let _powerlines_plugin_alloy_core_components = require("@powerlines/plugin-alloy/core/components");
|
|
8
|
-
let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
|
|
9
|
-
let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
|
|
10
|
-
let defu = require("defu");
|
|
11
|
-
defu = require_runtime.__toESM(defu);
|
|
12
|
-
let _shell_shock_plugin_console = require("@shell-shock/plugin-console");
|
|
13
|
-
_shell_shock_plugin_console = require_runtime.__toESM(_shell_shock_plugin_console);
|
|
14
|
-
let _shell_shock_plugin_theme = require("@shell-shock/plugin-theme");
|
|
15
|
-
_shell_shock_plugin_theme = require_runtime.__toESM(_shell_shock_plugin_theme);
|
|
16
|
-
let _stryke_path_join = require("@stryke/path/join");
|
|
17
|
-
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
18
|
-
|
|
19
|
-
//#region ../plugin-help/dist/index.mjs
|
|
20
|
-
/**
|
|
21
|
-
* The Help - Shell Shock plugin to add a help command to the application.
|
|
22
|
-
*/
|
|
23
|
-
const plugin = (options = {}) => {
|
|
24
|
-
return [
|
|
25
|
-
...(0, _shell_shock_plugin_theme.default)(options.theme),
|
|
26
|
-
(0, _shell_shock_plugin_console.default)(options.console),
|
|
27
|
-
{
|
|
28
|
-
name: "shell-shock:help",
|
|
29
|
-
enforce: "post",
|
|
30
|
-
config() {
|
|
31
|
-
this.debug("Providing default configuration for the Shell Shock `help` plugin.");
|
|
32
|
-
return { help: (0, defu.default)({ command: options.command === false ? false : (0, _stryke_type_checks_is_set_string.isSetString)(options.command) ? { name: options.command } : { name: "help" } }, options, { builtins: true }) };
|
|
33
|
-
},
|
|
34
|
-
async configResolved() {
|
|
35
|
-
this.debug("Adding the Help command to the application context.");
|
|
36
|
-
if (this.config.help.command !== false) {
|
|
37
|
-
this.inputs ??= [];
|
|
38
|
-
if (this.inputs.some((input) => input.name === this.config.help.command.name)) this.info("The `help` command already exists in the commands list. If you would like the help command to be managed by the `@shell-shock/plugin-help` package, please remove or rename the command.");
|
|
39
|
-
else this.inputs.push({
|
|
40
|
-
id: this.config.help.command.name,
|
|
41
|
-
path: this.config.help.command.name,
|
|
42
|
-
segments: [this.config.help.command.name],
|
|
43
|
-
title: "Help",
|
|
44
|
-
icon: "🛈",
|
|
45
|
-
tags: ["Utility"],
|
|
46
|
-
description: `A command for displaying help information to assist in using the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface application.`,
|
|
47
|
-
entry: {
|
|
48
|
-
file: (0, _stryke_path_join.joinPaths)(this.entryPath, "help", "index.ts"),
|
|
49
|
-
input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "help", "command.ts") }
|
|
50
|
-
},
|
|
51
|
-
isVirtual: false,
|
|
52
|
-
...this.config.help.command
|
|
53
|
-
});
|
|
54
|
-
await (0, _powerlines_plugin_alloy_render.render)(this, (0, _alloy_js_core_jsx_runtime.createComponent)(require_help_command.HelpCommand, {}));
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
prepare: {
|
|
58
|
-
order: "post",
|
|
59
|
-
async handler() {
|
|
60
|
-
const _self$ = this;
|
|
61
|
-
const commands = await (0, _shell_shock_core_plugin_utils.getCommandList)(this);
|
|
62
|
-
this.debug(`Rendering \`help\` built-ins for each of the ${commands.length} command modules.`);
|
|
63
|
-
const bin = (0, _alloy_js_core.computed)(() => ({
|
|
64
|
-
id: "",
|
|
65
|
-
name: (0, _shell_shock_core_plugin_utils.getAppName)(this),
|
|
66
|
-
title: (0, _shell_shock_core_plugin_utils.getAppTitle)(this),
|
|
67
|
-
description: (0, _shell_shock_core_plugin_utils.getAppDescription)(this),
|
|
68
|
-
isVirtual: true,
|
|
69
|
-
path: null,
|
|
70
|
-
segments: [],
|
|
71
|
-
alias: [],
|
|
72
|
-
tags: [],
|
|
73
|
-
options: Object.fromEntries(this.options.map((option) => [option.name, option])),
|
|
74
|
-
entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "bin.ts") },
|
|
75
|
-
args: [],
|
|
76
|
-
parent: null,
|
|
77
|
-
children: this.commands
|
|
78
|
-
}));
|
|
79
|
-
return (0, _powerlines_plugin_alloy_render.render)(this, [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
80
|
-
get when() {
|
|
81
|
-
return _self$.config.help.builtins !== false;
|
|
82
|
-
},
|
|
83
|
-
get children() {
|
|
84
|
-
return [
|
|
85
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(require_help_builtin.HelpBuiltin, { get command() {
|
|
86
|
-
return bin.value;
|
|
87
|
-
} }),
|
|
88
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components.Spacing, {}),
|
|
89
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
|
|
90
|
-
get each() {
|
|
91
|
-
return commands.sort((a, b) => a.name.localeCompare(b.name));
|
|
92
|
-
},
|
|
93
|
-
doubleHardline: true,
|
|
94
|
-
children: (command) => (0, _alloy_js_core_jsx_runtime.createComponent)(require_help_builtin.HelpBuiltin, { command })
|
|
95
|
-
})
|
|
96
|
-
];
|
|
97
|
-
}
|
|
98
|
-
})]);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
];
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
//#endregion
|
|
106
|
-
exports.plugin = plugin;
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { HelpBuiltin } from "./components/help-builtin.mjs";
|
|
2
|
-
import { HelpCommand } from "./components/help-command.mjs";
|
|
3
|
-
import "./components/index.mjs";
|
|
4
|
-
import { createComponent } from "@alloy-js/core/jsx-runtime";
|
|
5
|
-
import { For, Show, computed } from "@alloy-js/core";
|
|
6
|
-
import { Spacing } from "@powerlines/plugin-alloy/core/components";
|
|
7
|
-
import { render } from "@powerlines/plugin-alloy/render";
|
|
8
|
-
import { getAppDescription, getAppName, getAppTitle, getCommandList } from "@shell-shock/core/plugin-utils";
|
|
9
|
-
import defu from "defu";
|
|
10
|
-
import console from "@shell-shock/plugin-console";
|
|
11
|
-
import theme from "@shell-shock/plugin-theme";
|
|
12
|
-
import { joinPaths } from "@stryke/path/join";
|
|
13
|
-
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
14
|
-
|
|
15
|
-
//#region ../plugin-help/dist/index.mjs
|
|
16
|
-
/**
|
|
17
|
-
* The Help - Shell Shock plugin to add a help command to the application.
|
|
18
|
-
*/
|
|
19
|
-
const plugin = (options = {}) => {
|
|
20
|
-
return [
|
|
21
|
-
...theme(options.theme),
|
|
22
|
-
console(options.console),
|
|
23
|
-
{
|
|
24
|
-
name: "shell-shock:help",
|
|
25
|
-
enforce: "post",
|
|
26
|
-
config() {
|
|
27
|
-
this.debug("Providing default configuration for the Shell Shock `help` plugin.");
|
|
28
|
-
return { help: defu({ command: options.command === false ? false : isSetString(options.command) ? { name: options.command } : { name: "help" } }, options, { builtins: true }) };
|
|
29
|
-
},
|
|
30
|
-
async configResolved() {
|
|
31
|
-
this.debug("Adding the Help command to the application context.");
|
|
32
|
-
if (this.config.help.command !== false) {
|
|
33
|
-
this.inputs ??= [];
|
|
34
|
-
if (this.inputs.some((input) => input.name === this.config.help.command.name)) this.info("The `help` command already exists in the commands list. If you would like the help command to be managed by the `@shell-shock/plugin-help` package, please remove or rename the command.");
|
|
35
|
-
else this.inputs.push({
|
|
36
|
-
id: this.config.help.command.name,
|
|
37
|
-
path: this.config.help.command.name,
|
|
38
|
-
segments: [this.config.help.command.name],
|
|
39
|
-
title: "Help",
|
|
40
|
-
icon: "🛈",
|
|
41
|
-
tags: ["Utility"],
|
|
42
|
-
description: `A command for displaying help information to assist in using the ${getAppTitle(this, true)} command-line interface application.`,
|
|
43
|
-
entry: {
|
|
44
|
-
file: joinPaths(this.entryPath, "help", "index.ts"),
|
|
45
|
-
input: { file: joinPaths(this.entryPath, "help", "command.ts") }
|
|
46
|
-
},
|
|
47
|
-
isVirtual: false,
|
|
48
|
-
...this.config.help.command
|
|
49
|
-
});
|
|
50
|
-
await render(this, createComponent(HelpCommand, {}));
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
prepare: {
|
|
54
|
-
order: "post",
|
|
55
|
-
async handler() {
|
|
56
|
-
const _self$ = this;
|
|
57
|
-
const commands = await getCommandList(this);
|
|
58
|
-
this.debug(`Rendering \`help\` built-ins for each of the ${commands.length} command modules.`);
|
|
59
|
-
const bin = computed(() => ({
|
|
60
|
-
id: "",
|
|
61
|
-
name: getAppName(this),
|
|
62
|
-
title: getAppTitle(this),
|
|
63
|
-
description: getAppDescription(this),
|
|
64
|
-
isVirtual: true,
|
|
65
|
-
path: null,
|
|
66
|
-
segments: [],
|
|
67
|
-
alias: [],
|
|
68
|
-
tags: [],
|
|
69
|
-
options: Object.fromEntries(this.options.map((option) => [option.name, option])),
|
|
70
|
-
entry: { file: joinPaths(this.entryPath, "bin.ts") },
|
|
71
|
-
args: [],
|
|
72
|
-
parent: null,
|
|
73
|
-
children: this.commands
|
|
74
|
-
}));
|
|
75
|
-
return render(this, [createComponent(Show, {
|
|
76
|
-
get when() {
|
|
77
|
-
return _self$.config.help.builtins !== false;
|
|
78
|
-
},
|
|
79
|
-
get children() {
|
|
80
|
-
return [
|
|
81
|
-
createComponent(HelpBuiltin, { get command() {
|
|
82
|
-
return bin.value;
|
|
83
|
-
} }),
|
|
84
|
-
createComponent(Spacing, {}),
|
|
85
|
-
createComponent(For, {
|
|
86
|
-
get each() {
|
|
87
|
-
return commands.sort((a, b) => a.name.localeCompare(b.name));
|
|
88
|
-
},
|
|
89
|
-
doubleHardline: true,
|
|
90
|
-
children: (command) => createComponent(HelpBuiltin, { command })
|
|
91
|
-
})
|
|
92
|
-
];
|
|
93
|
-
}
|
|
94
|
-
})]);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
];
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
//#endregion
|
|
102
|
-
export { plugin };
|
|
103
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../plugin-help/dist/index.mjs"],"sourcesContent":["import { HelpBuiltin } from \"./components/help-builtin.mjs\";\nimport { HelpCommand } from \"./components/help-command.mjs\";\nimport \"./components/index.mjs\";\nimport { createComponent } from \"@alloy-js/core/jsx-runtime\";\nimport { For, Show, computed } from \"@alloy-js/core\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport { getAppDescription, getAppName, getAppTitle, getCommandList } from \"@shell-shock/core/plugin-utils\";\nimport console from \"@shell-shock/plugin-console\";\nimport theme from \"@shell-shock/plugin-theme\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport defu from \"defu\";\n\n//#region src/index.tsx\n/**\n* The Help - Shell Shock plugin to add a help command to the application.\n*/\nconst plugin = (options = {}) => {\n\treturn [\n\t\t...theme(options.theme),\n\t\tconsole(options.console),\n\t\t{\n\t\t\tname: \"shell-shock:help\",\n\t\t\tenforce: \"post\",\n\t\t\tconfig() {\n\t\t\t\tthis.debug(\"Providing default configuration for the Shell Shock `help` plugin.\");\n\t\t\t\treturn { help: defu({ command: options.command === false ? false : isSetString(options.command) ? { name: options.command } : { name: \"help\" } }, options, { builtins: true }) };\n\t\t\t},\n\t\t\tasync configResolved() {\n\t\t\t\tthis.debug(\"Adding the Help command to the application context.\");\n\t\t\t\tif (this.config.help.command !== false) {\n\t\t\t\t\tthis.inputs ??= [];\n\t\t\t\t\tif (this.inputs.some((input) => input.name === this.config.help.command.name)) this.info(\"The `help` command already exists in the commands list. If you would like the help command to be managed by the `@shell-shock/plugin-help` package, please remove or rename the command.\");\n\t\t\t\t\telse this.inputs.push({\n\t\t\t\t\t\tid: this.config.help.command.name,\n\t\t\t\t\t\tpath: this.config.help.command.name,\n\t\t\t\t\t\tsegments: [this.config.help.command.name],\n\t\t\t\t\t\ttitle: \"Help\",\n\t\t\t\t\t\ticon: \"🛈\",\n\t\t\t\t\t\ttags: [\"Utility\"],\n\t\t\t\t\t\tdescription: `A command for displaying help information to assist in using the ${getAppTitle(this, true)} command-line interface application.`,\n\t\t\t\t\t\tentry: {\n\t\t\t\t\t\t\tfile: joinPaths(this.entryPath, \"help\", \"index.ts\"),\n\t\t\t\t\t\t\tinput: { file: joinPaths(this.entryPath, \"help\", \"command.ts\") }\n\t\t\t\t\t\t},\n\t\t\t\t\t\tisVirtual: false,\n\t\t\t\t\t\t...this.config.help.command\n\t\t\t\t\t});\n\t\t\t\t\tawait render(this, createComponent(HelpCommand, {}));\n\t\t\t\t}\n\t\t\t},\n\t\t\tprepare: {\n\t\t\t\torder: \"post\",\n\t\t\t\tasync handler() {\n\t\t\t\t\tconst _self$ = this;\n\t\t\t\t\tconst commands = await getCommandList(this);\n\t\t\t\t\tthis.debug(`Rendering \\`help\\` built-ins for each of the ${commands.length} command modules.`);\n\t\t\t\t\tconst bin = computed(() => ({\n\t\t\t\t\t\tid: \"\",\n\t\t\t\t\t\tname: getAppName(this),\n\t\t\t\t\t\ttitle: getAppTitle(this),\n\t\t\t\t\t\tdescription: getAppDescription(this),\n\t\t\t\t\t\tisVirtual: true,\n\t\t\t\t\t\tpath: null,\n\t\t\t\t\t\tsegments: [],\n\t\t\t\t\t\talias: [],\n\t\t\t\t\t\ttags: [],\n\t\t\t\t\t\toptions: Object.fromEntries(this.options.map((option) => [option.name, option])),\n\t\t\t\t\t\tentry: { file: joinPaths(this.entryPath, \"bin.ts\") },\n\t\t\t\t\t\targs: [],\n\t\t\t\t\t\tparent: null,\n\t\t\t\t\t\tchildren: this.commands\n\t\t\t\t\t}));\n\t\t\t\t\treturn render(this, [createComponent(Show, {\n\t\t\t\t\t\tget when() {\n\t\t\t\t\t\t\treturn _self$.config.help.builtins !== false;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tget children() {\n\t\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\t\tcreateComponent(HelpBuiltin, { get command() {\n\t\t\t\t\t\t\t\t\treturn bin.value;\n\t\t\t\t\t\t\t\t} }),\n\t\t\t\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\t\t\t\tcreateComponent(For, {\n\t\t\t\t\t\t\t\t\tget each() {\n\t\t\t\t\t\t\t\t\t\treturn commands.sort((a, b) => a.name.localeCompare(b.name));\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tdoubleHardline: true,\n\t\t\t\t\t\t\t\t\tchildren: (command) => createComponent(HelpBuiltin, { command })\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t}\n\t\t\t\t\t})]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t];\n};\n\n//#endregion\nexport { plugin as default, plugin };\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAM,UAAU,UAAU,EAAE,KAAK;AAChC,QAAO;EACN,GAAG,MAAM,QAAQ,MAAM;EACvB,QAAQ,QAAQ,QAAQ;EACxB;GACC,MAAM;GACN,SAAS;GACT,SAAS;AACR,SAAK,MAAM,qEAAqE;AAChF,WAAO,EAAE,MAAM,KAAK,EAAE,SAAS,QAAQ,YAAY,QAAQ,QAAQ,YAAY,QAAQ,QAAQ,GAAG,EAAE,MAAM,QAAQ,SAAS,GAAG,EAAE,MAAM,QAAQ,EAAE,EAAE,SAAS,EAAE,UAAU,MAAM,CAAC,EAAE;;GAEjL,MAAM,iBAAiB;AACtB,SAAK,MAAM,sDAAsD;AACjE,QAAI,KAAK,OAAO,KAAK,YAAY,OAAO;AACvC,UAAK,WAAW,EAAE;AAClB,SAAI,KAAK,OAAO,MAAM,UAAU,MAAM,SAAS,KAAK,OAAO,KAAK,QAAQ,KAAK,CAAE,MAAK,KAAK,2LAA2L;SAC/Q,MAAK,OAAO,KAAK;MACrB,IAAI,KAAK,OAAO,KAAK,QAAQ;MAC7B,MAAM,KAAK,OAAO,KAAK,QAAQ;MAC/B,UAAU,CAAC,KAAK,OAAO,KAAK,QAAQ,KAAK;MACzC,OAAO;MACP,MAAM;MACN,MAAM,CAAC,UAAU;MACjB,aAAa,oEAAoE,YAAY,MAAM,KAAK,CAAC;MACzG,OAAO;OACN,MAAM,UAAU,KAAK,WAAW,QAAQ,WAAW;OACnD,OAAO,EAAE,MAAM,UAAU,KAAK,WAAW,QAAQ,aAAa,EAAE;OAChE;MACD,WAAW;MACX,GAAG,KAAK,OAAO,KAAK;MACpB,CAAC;AACF,WAAM,OAAO,MAAM,gBAAgB,aAAa,EAAE,CAAC,CAAC;;;GAGtD,SAAS;IACR,OAAO;IACP,MAAM,UAAU;KACf,MAAM,SAAS;KACf,MAAM,WAAW,MAAM,eAAe,KAAK;AAC3C,UAAK,MAAM,gDAAgD,SAAS,OAAO,mBAAmB;KAC9F,MAAM,MAAM,gBAAgB;MAC3B,IAAI;MACJ,MAAM,WAAW,KAAK;MACtB,OAAO,YAAY,KAAK;MACxB,aAAa,kBAAkB,KAAK;MACpC,WAAW;MACX,MAAM;MACN,UAAU,EAAE;MACZ,OAAO,EAAE;MACT,MAAM,EAAE;MACR,SAAS,OAAO,YAAY,KAAK,QAAQ,KAAK,WAAW,CAAC,OAAO,MAAM,OAAO,CAAC,CAAC;MAChF,OAAO,EAAE,MAAM,UAAU,KAAK,WAAW,SAAS,EAAE;MACpD,MAAM,EAAE;MACR,QAAQ;MACR,UAAU,KAAK;MACf,EAAE;AACH,YAAO,OAAO,MAAM,CAAC,gBAAgB,MAAM;MAC1C,IAAI,OAAO;AACV,cAAO,OAAO,OAAO,KAAK,aAAa;;MAExC,IAAI,WAAW;AACd,cAAO;QACN,gBAAgB,aAAa,EAAE,IAAI,UAAU;AAC5C,gBAAO,IAAI;WACT,CAAC;QACJ,gBAAgB,SAAS,EAAE,CAAC;QAC5B,gBAAgB,KAAK;SACpB,IAAI,OAAO;AACV,iBAAO,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,cAAc,EAAE,KAAK,CAAC;;SAE7D,gBAAgB;SAChB,WAAW,YAAY,gBAAgB,aAAa,EAAE,SAAS,CAAC;SAChE,CAAC;QACF;;MAEF,CAAC,CAAC,CAAC;;IAEL;GACD;EACD"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
//#region ../plugin-help/dist/node_modules/.pnpm/@stryke_types@0.11.2/node_modules/@stryke/types/dist/base.d.cts
|
|
2
|
-
//#region ../../node_modules/.pnpm/@stryke+types@0.11.2/node_modules/@stryke/types/dist/base.d.cts
|
|
3
|
-
/**
|
|
4
|
-
* Create a type that makes the given keys required. The remaining keys are kept as is.
|
|
5
|
-
*
|
|
6
|
-
* @remarks
|
|
7
|
-
* Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are required.
|
|
8
|
-
*/
|
|
9
|
-
type RequiredKeys<BaseType, Keys extends keyof BaseType> = Required<Pick<BaseType, Keys>> & Omit<BaseType, Keys>;
|
|
10
|
-
/**
|
|
11
|
-
* Create a type that makes the given keys optional. The remaining keys are kept as is.
|
|
12
|
-
*
|
|
13
|
-
* @remarks
|
|
14
|
-
* Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are optional.
|
|
15
|
-
*/
|
|
16
|
-
//#endregion
|
|
17
|
-
//#endregion
|
|
18
|
-
export { RequiredKeys };
|
|
19
|
-
//# sourceMappingURL=base.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.cts","names":["RequiredKeys","BaseType","Keys","Pick","Required","Omit"],"sources":["../../../../../../../../../../../plugin-help/dist/node_modules/.pnpm/@stryke_types@0.11.2/node_modules/@stryke/types/dist/base.d.cts"],"x_google_ignoreList":[0],"mappings":";;;;;;;;KAOKA,YAAAA,8BAA0CC,QAAAA,IAAYG,QAAAA,CAASD,IAAAA,CAAKF,QAAAA,EAAUC,IAAAA,KAASG,IAAAA,CAAKJ,QAAAA,EAAUC,IAAAA"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
//#region ../plugin-help/dist/node_modules/.pnpm/@stryke_types@0.11.2/node_modules/@stryke/types/dist/base.d.cts
|
|
2
|
-
//#region ../../node_modules/.pnpm/@stryke+types@0.11.2/node_modules/@stryke/types/dist/base.d.cts
|
|
3
|
-
/**
|
|
4
|
-
* Create a type that makes the given keys required. The remaining keys are kept as is.
|
|
5
|
-
*
|
|
6
|
-
* @remarks
|
|
7
|
-
* Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are required.
|
|
8
|
-
*/
|
|
9
|
-
type RequiredKeys<BaseType, Keys extends keyof BaseType> = Required<Pick<BaseType, Keys>> & Omit<BaseType, Keys>;
|
|
10
|
-
/**
|
|
11
|
-
* Create a type that makes the given keys optional. The remaining keys are kept as is.
|
|
12
|
-
*
|
|
13
|
-
* @remarks
|
|
14
|
-
* Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are optional.
|
|
15
|
-
*/
|
|
16
|
-
//#endregion
|
|
17
|
-
//#endregion
|
|
18
|
-
export { RequiredKeys };
|
|
19
|
-
//# sourceMappingURL=base.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.mts","names":["RequiredKeys","BaseType","Keys","Pick","Required","Omit"],"sources":["../../../../../../../../../../../plugin-help/dist/node_modules/.pnpm/@stryke_types@0.11.2/node_modules/@stryke/types/dist/base.d.cts"],"x_google_ignoreList":[0],"mappings":";;;;;;;;KAOKA,YAAAA,8BAA0CC,QAAAA,IAAYG,QAAAA,CAASD,IAAAA,CAAKF,QAAAA,EAAUC,IAAAA,KAASG,IAAAA,CAAKJ,QAAAA,EAAUC,IAAAA"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { RequiredKeys } from "../node_modules/.pnpm/@stryke_types@0.11.2/node_modules/@stryke/types/dist/base.cjs";
|
|
2
|
-
import { CommandConfig, ResolvedConfig, UserConfig } from "@shell-shock/core";
|
|
3
|
-
import { Context as Context$1 } from "@shell-shock/core/types/context";
|
|
4
|
-
import { ConsolePluginContext, ConsolePluginOptions, ConsolePluginResolvedConfig, ConsolePluginUserConfig } from "@shell-shock/plugin-console";
|
|
5
|
-
import { ThemePluginContext, ThemePluginOptions, ThemePluginResolvedConfig, ThemePluginUserConfig } from "@shell-shock/plugin-theme";
|
|
6
|
-
|
|
7
|
-
//#region ../plugin-help/dist/types/plugin.d.cts
|
|
8
|
-
//#region src/types/plugin.d.ts
|
|
9
|
-
interface HelpPluginOptions {
|
|
10
|
-
/**
|
|
11
|
-
* Should the plugin automatically add built-in help entries for all commands in the application?
|
|
12
|
-
*
|
|
13
|
-
* @defaultValue true
|
|
14
|
-
*/
|
|
15
|
-
builtins?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Should the plugin add the `help` command?
|
|
18
|
-
*
|
|
19
|
-
* @remarks
|
|
20
|
-
* This can be set to a string to specify a custom command name for the `help` command, an object to override the default command configuration, or `false` to disable the help command. By default, the command name will be `"help"`.
|
|
21
|
-
*
|
|
22
|
-
* @defaultValue "help"
|
|
23
|
-
*/
|
|
24
|
-
command?: Partial<CommandConfig> | string | false;
|
|
25
|
-
/**
|
|
26
|
-
* Theme plugin options.
|
|
27
|
-
*/
|
|
28
|
-
theme?: ThemePluginOptions;
|
|
29
|
-
/**
|
|
30
|
-
* Console plugin options.
|
|
31
|
-
*/
|
|
32
|
-
console?: ConsolePluginOptions;
|
|
33
|
-
}
|
|
34
|
-
type HelpPluginUserConfig = ThemePluginUserConfig & ConsolePluginUserConfig & UserConfig & {
|
|
35
|
-
/**
|
|
36
|
-
* Resolved help configuration for the plugin.
|
|
37
|
-
*/
|
|
38
|
-
help: Omit<HelpPluginOptions, "theme" | "console" | "command"> & {
|
|
39
|
-
/**
|
|
40
|
-
* The name of the help command to add to the application, or `false` to disable adding a help command.
|
|
41
|
-
*
|
|
42
|
-
* @defaultValue "help"
|
|
43
|
-
*/
|
|
44
|
-
command: Partial<CommandConfig> | string | false;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
type HelpPluginResolvedConfig = ThemePluginResolvedConfig & ConsolePluginResolvedConfig & ResolvedConfig & {
|
|
48
|
-
/**
|
|
49
|
-
* Resolved help configuration for the plugin.
|
|
50
|
-
*/
|
|
51
|
-
help: Required<Omit<HelpPluginOptions, "theme" | "console" | "command">> & {
|
|
52
|
-
/**
|
|
53
|
-
* The properties of the help command to add to the application, or `false` to disable adding a help command.
|
|
54
|
-
*
|
|
55
|
-
* @defaultValue \{ name: "help" \}
|
|
56
|
-
*/
|
|
57
|
-
command: RequiredKeys<Partial<CommandConfig>, "name"> | false;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
type HelpPluginContext<TResolvedConfig extends HelpPluginResolvedConfig = HelpPluginResolvedConfig> = ThemePluginContext<TResolvedConfig> & ConsolePluginContext<TResolvedConfig> & Context$1<TResolvedConfig>; //#endregion
|
|
61
|
-
//#endregion
|
|
62
|
-
export { HelpPluginContext, HelpPluginOptions, HelpPluginResolvedConfig, HelpPluginUserConfig };
|
|
63
|
-
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":["RequiredKeys","CommandConfig","ResolvedConfig","UserConfig","Context","ConsolePluginContext","ConsolePluginOptions","ConsolePluginResolvedConfig","ConsolePluginUserConfig","ThemePluginContext","ThemePluginOptions","ThemePluginResolvedConfig","ThemePluginUserConfig","HelpPluginOptions","Partial","builtins","command","theme","console","HelpPluginUserConfig","Omit","help","HelpPluginResolvedConfig","Required","HelpPluginContext","TResolvedConfig"],"sources":["../../../../../plugin-help/dist/types/plugin.d.cts"],"mappings":";;;;;;;;UAOUa,iBAAAA;EAAiB;;;;;EAMzBE,QAAAA;EAiB8B;;;;;;;;EAR9BC,OAAAA,GAAUF,OAAAA,CAAQb,aAAAA;EAQRK;;;EAJVW,KAAAA,GAAQP,kBAAAA;EAMe;;;EAFvBQ,OAAAA,GAAUZ,oBAAAA;AAAAA;AAAAA,KAEPa,oBAAAA,GAAuBP,qBAAAA,GAAwBJ,uBAAAA,GAA0BL,UAAAA;EAItEiB;;;EAANC,IAAAA,EAAMD,IAAAA,CAAKP,iBAAAA;IAMO;;;;;IAAhBG,OAAAA,EAASF,OAAAA,CAAQb,aAAAA;EAAAA;AAAAA;AAAAA,KAGhBqB,wBAAAA,GAA2BX,yBAAAA,GAA4BJ,2BAAAA,GAA8BL,cAAAA;EAHrED;;;EAOnBoB,IAAAA,EAAME,QAAAA,CAASH,IAAAA,CAAKP,iBAAAA;IAJO;;;;;IAUzBG,OAAAA,EAAShB,YAAAA,CAAac,OAAAA,CAAQb,aAAAA;EAAAA;AAAAA;AAAAA,KAG7BuB,iBAAAA,yBAA0CF,wBAAAA,GAA2BA,wBAAAA,IAA4Bb,kBAAAA,CAAmBgB,eAAAA,IAAmBpB,oBAAAA,CAAqBoB,eAAAA,IAAmBrB,SAAAA,CAAQqB,eAAAA"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { RequiredKeys } from "../node_modules/.pnpm/@stryke_types@0.11.2/node_modules/@stryke/types/dist/base.mjs";
|
|
2
|
-
import { ConsolePluginContext, ConsolePluginOptions, ConsolePluginResolvedConfig, ConsolePluginUserConfig } from "@shell-shock/plugin-console";
|
|
3
|
-
import { ThemePluginContext, ThemePluginOptions, ThemePluginResolvedConfig, ThemePluginUserConfig } from "@shell-shock/plugin-theme";
|
|
4
|
-
import { CommandConfig, ResolvedConfig, UserConfig } from "@shell-shock/core";
|
|
5
|
-
import { Context as Context$1 } from "@shell-shock/core/types/context";
|
|
6
|
-
|
|
7
|
-
//#region ../plugin-help/dist/types/plugin.d.cts
|
|
8
|
-
//#region src/types/plugin.d.ts
|
|
9
|
-
interface HelpPluginOptions {
|
|
10
|
-
/**
|
|
11
|
-
* Should the plugin automatically add built-in help entries for all commands in the application?
|
|
12
|
-
*
|
|
13
|
-
* @defaultValue true
|
|
14
|
-
*/
|
|
15
|
-
builtins?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Should the plugin add the `help` command?
|
|
18
|
-
*
|
|
19
|
-
* @remarks
|
|
20
|
-
* This can be set to a string to specify a custom command name for the `help` command, an object to override the default command configuration, or `false` to disable the help command. By default, the command name will be `"help"`.
|
|
21
|
-
*
|
|
22
|
-
* @defaultValue "help"
|
|
23
|
-
*/
|
|
24
|
-
command?: Partial<CommandConfig> | string | false;
|
|
25
|
-
/**
|
|
26
|
-
* Theme plugin options.
|
|
27
|
-
*/
|
|
28
|
-
theme?: ThemePluginOptions;
|
|
29
|
-
/**
|
|
30
|
-
* Console plugin options.
|
|
31
|
-
*/
|
|
32
|
-
console?: ConsolePluginOptions;
|
|
33
|
-
}
|
|
34
|
-
type HelpPluginUserConfig = ThemePluginUserConfig & ConsolePluginUserConfig & UserConfig & {
|
|
35
|
-
/**
|
|
36
|
-
* Resolved help configuration for the plugin.
|
|
37
|
-
*/
|
|
38
|
-
help: Omit<HelpPluginOptions, "theme" | "console" | "command"> & {
|
|
39
|
-
/**
|
|
40
|
-
* The name of the help command to add to the application, or `false` to disable adding a help command.
|
|
41
|
-
*
|
|
42
|
-
* @defaultValue "help"
|
|
43
|
-
*/
|
|
44
|
-
command: Partial<CommandConfig> | string | false;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
type HelpPluginResolvedConfig = ThemePluginResolvedConfig & ConsolePluginResolvedConfig & ResolvedConfig & {
|
|
48
|
-
/**
|
|
49
|
-
* Resolved help configuration for the plugin.
|
|
50
|
-
*/
|
|
51
|
-
help: Required<Omit<HelpPluginOptions, "theme" | "console" | "command">> & {
|
|
52
|
-
/**
|
|
53
|
-
* The properties of the help command to add to the application, or `false` to disable adding a help command.
|
|
54
|
-
*
|
|
55
|
-
* @defaultValue \{ name: "help" \}
|
|
56
|
-
*/
|
|
57
|
-
command: RequiredKeys<Partial<CommandConfig>, "name"> | false;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
type HelpPluginContext<TResolvedConfig extends HelpPluginResolvedConfig = HelpPluginResolvedConfig> = ThemePluginContext<TResolvedConfig> & ConsolePluginContext<TResolvedConfig> & Context$1<TResolvedConfig>; //#endregion
|
|
61
|
-
//#endregion
|
|
62
|
-
export { HelpPluginContext, HelpPluginOptions, HelpPluginResolvedConfig, HelpPluginUserConfig };
|
|
63
|
-
//# sourceMappingURL=plugin.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":["RequiredKeys","CommandConfig","ResolvedConfig","UserConfig","Context","ConsolePluginContext","ConsolePluginOptions","ConsolePluginResolvedConfig","ConsolePluginUserConfig","ThemePluginContext","ThemePluginOptions","ThemePluginResolvedConfig","ThemePluginUserConfig","HelpPluginOptions","Partial","builtins","command","theme","console","HelpPluginUserConfig","Omit","help","HelpPluginResolvedConfig","Required","HelpPluginContext","TResolvedConfig"],"sources":["../../../../../plugin-help/dist/types/plugin.d.cts"],"mappings":";;;;;;;;UAOUa,iBAAAA;EAAiB;;;;;EAMzBE,QAAAA;EAiB8B;;;;;;;;EAR9BC,OAAAA,GAAUF,OAAAA,CAAQb,aAAAA;EAQRK;;;EAJVW,KAAAA,GAAQP,kBAAAA;EAMe;;;EAFvBQ,OAAAA,GAAUZ,oBAAAA;AAAAA;AAAAA,KAEPa,oBAAAA,GAAuBP,qBAAAA,GAAwBJ,uBAAAA,GAA0BL,UAAAA;EAItEiB;;;EAANC,IAAAA,EAAMD,IAAAA,CAAKP,iBAAAA;IAMO;;;;;IAAhBG,OAAAA,EAASF,OAAAA,CAAQb,aAAAA;EAAAA;AAAAA;AAAAA,KAGhBqB,wBAAAA,GAA2BX,yBAAAA,GAA4BJ,2BAAAA,GAA8BL,cAAAA;EAHrED;;;EAOnBoB,IAAAA,EAAME,QAAAA,CAASH,IAAAA,CAAKP,iBAAAA;IAJO;;;;;IAUzBG,OAAAA,EAAShB,YAAAA,CAAac,OAAAA,CAAQb,aAAAA;EAAAA;AAAAA;AAAAA,KAG7BuB,iBAAAA,yBAA0CF,wBAAAA,GAA2BA,wBAAAA,IAA4Bb,kBAAAA,CAAmBgB,eAAAA,IAAmBpB,oBAAAA,CAAqBoB,eAAAA,IAAmBrB,SAAAA,CAAQqB,eAAAA"}
|