@shell-shock/preset-script 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/banner-function-declaration.cjs +68 -0
- package/dist/components/banner-function-declaration.cjs.map +1 -0
- package/dist/components/banner-function-declaration.d.cts +19 -0
- package/dist/components/banner-function-declaration.d.cts.map +1 -0
- package/dist/components/banner-function-declaration.d.mts +19 -0
- package/dist/components/banner-function-declaration.d.mts.map +1 -0
- package/dist/components/banner-function-declaration.mjs +67 -0
- package/dist/components/banner-function-declaration.mjs.map +1 -0
- package/dist/components/bin-entry.cjs +1 -1
- package/dist/components/bin-entry.mjs +1 -1
- package/dist/components/command-entry.cjs +28 -18
- package/dist/components/command-entry.cjs.map +1 -1
- package/dist/components/command-entry.d.cts +5 -5
- package/dist/components/command-entry.d.cts.map +1 -1
- package/dist/components/command-entry.d.mts +4 -4
- package/dist/components/command-entry.d.mts.map +1 -1
- package/dist/components/command-entry.mjs +27 -17
- package/dist/components/command-entry.mjs.map +1 -1
- package/dist/components/command-router.cjs +8 -29
- package/dist/components/command-router.cjs.map +1 -1
- package/dist/components/command-router.mjs +8 -29
- package/dist/components/command-router.mjs.map +1 -1
- package/dist/components/console-builtin.cjs +2 -58
- package/dist/components/console-builtin.cjs.map +1 -1
- package/dist/components/console-builtin.d.cts +3 -21
- package/dist/components/console-builtin.d.cts.map +1 -1
- package/dist/components/console-builtin.d.mts +3 -21
- package/dist/components/console-builtin.d.mts.map +1 -1
- package/dist/components/console-builtin.mjs +4 -59
- package/dist/components/console-builtin.mjs.map +1 -1
- package/dist/components/help.cjs +72 -6
- package/dist/components/help.cjs.map +1 -1
- package/dist/components/help.d.cts +20 -6
- package/dist/components/help.d.cts.map +1 -1
- package/dist/components/help.d.mts +15 -1
- package/dist/components/help.d.mts.map +1 -1
- package/dist/components/help.mjs +72 -7
- package/dist/components/help.mjs.map +1 -1
- package/dist/components/index.cjs +3 -8
- package/dist/components/index.d.cts +4 -4
- package/dist/components/index.d.mts +4 -4
- package/dist/components/index.mjs +4 -4
- package/dist/components/utils-builtin.cjs +1 -1
- package/dist/components/utils-builtin.d.mts +7 -7
- package/dist/components/utils-builtin.mjs +1 -1
- package/dist/components/virtual-command-entry.cjs +3 -3
- package/dist/components/virtual-command-entry.cjs.map +1 -1
- package/dist/components/virtual-command-entry.d.cts +1 -1
- package/dist/components/virtual-command-entry.d.mts +3 -3
- package/dist/components/virtual-command-entry.mjs +3 -3
- package/dist/components/virtual-command-entry.mjs.map +1 -1
- package/dist/index.cjs +18 -51
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +19 -52
- package/dist/index.mjs.map +1 -1
- package/dist/types/plugin.d.cts.map +1 -1
- package/package.json +18 -19
- package/dist/components/args-parser-logic.cjs +0 -678
- package/dist/components/args-parser-logic.cjs.map +0 -1
- package/dist/components/args-parser-logic.d.cts +0 -45
- package/dist/components/args-parser-logic.d.cts.map +0 -1
- package/dist/components/args-parser-logic.d.mts +0 -45
- package/dist/components/args-parser-logic.d.mts.map +0 -1
- package/dist/components/args-parser-logic.mjs +0 -672
- package/dist/components/args-parser-logic.mjs.map +0 -1
|
@@ -5,8 +5,8 @@ const require_components_command_entry = require('./command-entry.cjs');
|
|
|
5
5
|
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
6
6
|
let __alloy_js_core = require("@alloy-js/core");
|
|
7
7
|
let __alloy_js_typescript = require("@alloy-js/typescript");
|
|
8
|
-
let __shell_shock_core_plugin_utils_context_helpers = require("@shell-shock/core/plugin-utils/context-helpers");
|
|
9
8
|
let __powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
|
|
9
|
+
let __shell_shock_core_plugin_utils_context_helpers = require("@shell-shock/core/plugin-utils/context-helpers");
|
|
10
10
|
let __powerlines_plugin_alloy_typescript_components_tsdoc = require("@powerlines/plugin-alloy/typescript/components/tsdoc");
|
|
11
11
|
let __stryke_string_format_pascal_case = require("@stryke/string-format/pascal-case");
|
|
12
12
|
let defu = require("defu");
|
|
@@ -24,7 +24,7 @@ function VirtualCommandHandlerDeclaration(props) {
|
|
|
24
24
|
const context = (0, __powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
|
|
25
25
|
return [(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
|
|
26
26
|
get heading() {
|
|
27
|
-
return `The ${command.title} (${(0, __shell_shock_core_plugin_utils_context_helpers.getAppBin)(context)} ${command.path.segments.map((segment) => (0, __shell_shock_core_plugin_utils_context_helpers.
|
|
27
|
+
return `The ${command.title} (${(0, __shell_shock_core_plugin_utils_context_helpers.getAppBin)(context)} ${command.path.segments.map((segment) => (0, __shell_shock_core_plugin_utils_context_helpers.isPositionalCommandOption)(segment) ? `[${(0, __stryke_string_format_constant_case.constantCase)((0, __shell_shock_core_plugin_utils_context_helpers.getPositionalCommandOptionName)(segment))}]` : segment).join(" ")}) virtual command.`;
|
|
28
28
|
},
|
|
29
29
|
get children() {
|
|
30
30
|
return [
|
|
@@ -80,7 +80,7 @@ function VirtualCommandHandlerDeclaration(props) {
|
|
|
80
80
|
function VirtualCommandEntry(props) {
|
|
81
81
|
const { command, imports, builtinImports, ...rest } = props;
|
|
82
82
|
const context = (0, __powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
|
|
83
|
-
const filePath = (0, __alloy_js_core.computed)(() => (0, __stryke_path_join.joinPaths)(context.entryPath, command.path.segments.filter((segment) => !(0, __shell_shock_core_plugin_utils_context_helpers.
|
|
83
|
+
const filePath = (0, __alloy_js_core.computed)(() => (0, __stryke_path_join.joinPaths)(context.entryPath, command.path.segments.filter((segment) => !(0, __shell_shock_core_plugin_utils_context_helpers.isPositionalCommandOption)(segment)).join("/"), "index.ts"));
|
|
84
84
|
return [(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_typescript_file.TypescriptFile, (0, __alloy_js_core_jsx_runtime.mergeProps)(rest, {
|
|
85
85
|
get path() {
|
|
86
86
|
return filePath.value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtual-command-entry.cjs","names":["code","computed","For","Show","FunctionDeclaration","usePowerlines","TSDoc","TSDocParam","TSDocRemarks","TSDocTitle","TypescriptFile","getAppBin","getAppTitle","
|
|
1
|
+
{"version":3,"file":"virtual-command-entry.cjs","names":["code","computed","For","Show","FunctionDeclaration","usePowerlines","TSDoc","TSDocParam","TSDocRemarks","TSDocTitle","TypescriptFile","getAppBin","getAppTitle","getPositionalCommandOptionName","isPositionalCommandOption","joinPaths","constantCase","pascalCase","defu","CommandEntry","CommandRouter","Help","VirtualCommandHandlerDeclaration","props","command","context","_$createComponent","heading","title","path","segments","map","segment","join","children","description","replace","_$createIntrinsic","name","async","parameters","type","default","commands","_$memo","VirtualCommandEntry","imports","builtinImports","rest","filePath","entryPath","filter","_$mergeProps","value","didyoumean2","Object","entries","child","isVirtual","reduce","ret","alias","console","utils","each","values","when","fallback"],"sources":["../../src/components/virtual-command-entry.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, computed, For, Show } from \"@alloy-js/core\";\nimport { FunctionDeclaration } from \"@alloy-js/typescript\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport type { TypescriptFileImports } from \"@powerlines/plugin-alloy/types/components\";\nimport type { EntryFileProps } from \"@powerlines/plugin-alloy/typescript/components/entry-file\";\nimport {\n TSDoc,\n TSDocParam,\n TSDocRemarks,\n TSDocTitle\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport { TypescriptFile } from \"@powerlines/plugin-alloy/typescript/components/typescript-file\";\nimport {\n getAppBin,\n getAppTitle,\n getPositionalCommandOptionName,\n isPositionalCommandOption\n} from \"@shell-shock/core/plugin-utils/context-helpers\";\nimport type { CommandTree } from \"@shell-shock/core/types/command\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { constantCase } from \"@stryke/string-format/constant-case\";\nimport { pascalCase } from \"@stryke/string-format/pascal-case\";\nimport defu from \"defu\";\nimport type { ScriptPresetContext } from \"../types/plugin\";\nimport { CommandEntry } from \"./command-entry\";\nimport { CommandRouter } from \"./command-router\";\nimport { Help } from \"./help\";\n\n/**\n * A component that generates the `handler` function declaration for a command.\n */\nexport function VirtualCommandHandlerDeclaration(props: {\n command: CommandTree;\n}) {\n const { command } = props;\n\n const context = usePowerlines<ScriptPresetContext>();\n\n return (\n <>\n <TSDoc\n heading={`The ${command.title} (${getAppBin(context)} ${command.path.segments\n .map(segment =>\n isPositionalCommandOption(segment)\n ? `[${constantCase(getPositionalCommandOptionName(segment))}]`\n : segment\n )\n .join(\" \")}) virtual command.`}>\n <TSDocRemarks>{`${command.description.replace(/\\.+$/, \"\")}.`}</TSDocRemarks>\n <hbr />\n <TSDocTitle>{command.title}</TSDocTitle>\n <TSDocParam name=\"args\">{`The command-line arguments passed to the command.`}</TSDocParam>\n </TSDoc>\n <FunctionDeclaration\n export\n async\n name=\"handler\"\n parameters={[{ name: \"args\", type: \"string[]\", default: \"getArgs()\" }]}>\n <CommandRouter\n path={command.path.segments}\n commands={command.children}\n />\n <hbr />\n <hbr />\n {code`\n writeLine(\"\");\n writeLine(colors.text.heading.primary(\"${getAppTitle(context)} - ${\n command.title\n }\"));\n writeLine(\"\");\n writeLine(colors.text.body.primary(\"${command.description.replace(/\\.+$/, \"\")}.\"));\n writeLine(\"\");`}\n <hbr />\n <Help command={command} />\n </FunctionDeclaration>\n </>\n );\n}\n\nexport interface VirtualCommandEntryProps extends Omit<\n EntryFileProps,\n \"path\" | \"typeDefinition\"\n> {\n command: CommandTree;\n}\n\n/**\n * The virtual command entry point for the Shell Shock project.\n */\nexport function VirtualCommandEntry(props: VirtualCommandEntryProps) {\n const { command, imports, builtinImports, ...rest } = props;\n\n const context = usePowerlines<ScriptPresetContext>();\n const filePath = computed(() =>\n joinPaths(\n context.entryPath,\n command.path.segments\n .filter(segment => !isPositionalCommandOption(segment))\n .join(\"/\"),\n \"index.ts\"\n )\n );\n\n return (\n <>\n <TypescriptFile\n {...rest}\n path={filePath.value}\n imports={defu(\n {\n didyoumean2: [\n { name: \"didYouMean\", default: true },\n { name: \"ReturnTypeEnums\" },\n { name: \"ThresholdTypeEnums\" }\n ]\n },\n imports ?? {},\n Object.entries(command.children)\n .filter(([, child]) => child.isVirtual)\n .reduce((ret, [name, child]) => {\n ret[`./${child.name}`] = [\n { name: \"handler\", alias: `handle${pascalCase(name)}` }\n ];\n\n return ret;\n }, {} as TypescriptFileImports)\n )}\n builtinImports={defu(builtinImports ?? {}, {\n console: [\"warn\", \"error\", \"table\", \"colors\", \"writeLine\"],\n utils: [\"getArgs\"]\n })}>\n <VirtualCommandHandlerDeclaration command={command} />\n </TypescriptFile>\n <For each={Object.values(command.children)}>\n {child => (\n <Show\n when={child.isVirtual}\n fallback={<CommandEntry command={child} />}>\n <VirtualCommandEntry command={child} />\n </Show>\n )}\n </For>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAiDA,SAAgBsB,iCAAiCC,OAE9C;CACD,MAAM,EAAEC,YAAYD;CAEpB,MAAME,8EAA8C;AAEpD,QAAA,kDAEKnB,6DAAK;EAAA,IACJqB,UAAO;AAAA,UAAE,OAAOH,QAAQI,MAAK,mEAAeH,QAAQ,CAAA,GAAID,QAAQK,KAAKC,SAClEC,KAAIC,2F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MAAI;EAAA,IACRnB,OAAI;AAAA,UAAEoB,SAASI;;EAAK,IACpBP,UAAO;AAAA,4BACL,EACEQ,aAAa;IACX;KAAEhB,MAAM;KAAcI,SAAS;KAAM;IACrC,EAAEJ,MAAM,mBAAmB;IAC3B,EAAEA,MAAM,sBAAsB;IAAA,EAEjC,EACDQ,WAAW,EAAE,EACbS,OAAOC,QAAQhC,QAAQU,SAAS,CAC7BiB,QAAQ,GAAGM,WAAWA,MAAMC,UAAU,CACtCC,QAAQC,KAAK,CAACtB,MAAMmB,WAAW;AAC9BG,QAAI,KAAKH,MAAMnB,UAAU,CACvB;KAAEA,MAAM;KAAWuB,OAAO,4DAAoBvB,KAAK;KAAI,CACxD;AAED,WAAOsB;MACN,EAA2B,CAClC,CAAC;;EAAA,IACDb,iBAAc;AAAA,4BAAOA,kBAAkB,EAAE,EAAE;IACzCe,SAAS;KAAC;KAAQ;KAAS;KAAS;KAAU;KAAY;IAC1DC,OAAO,CAAC,UAAS;IAClB,CAAC;;EAAA,IAAA7B,WAAA;AAAA,2DACDZ,kCAAgC,EAAUE,SAAO,CAAA;;EAAA,CAAA,CAAA,mDAEnDtB,qBAAG;EAAA,IAAC8D,OAAI;AAAA,UAAET,OAAOU,OAAOzC,QAAQU,SAAS;;EAAAA,WACvCuB,2DACEtD,sBAAI;GAAA,IACH+D,OAAI;AAAA,WAAET,MAAMC;;GAAS,IACrBS,WAAQ;AAAA,4DAAGhD,+CAAY,EAACK,SAASiC,OAAK,CAAA;;GAAA,IAAAvB,WAAA;AAAA,4DACrCW,qBAAmB,EAACrB,SAASiC,OAAK,CAAA;;GAAA,CAAA;EAEtC,CAAA,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _alloy_js_core5 from "@alloy-js/core";
|
|
2
|
-
import { CommandTree } from "@shell-shock/core/types/command";
|
|
3
2
|
import { EntryFileProps } from "@powerlines/plugin-alloy/typescript/components/entry-file";
|
|
3
|
+
import { CommandTree } from "@shell-shock/core/types/command";
|
|
4
4
|
|
|
5
5
|
//#region src/components/virtual-command-entry.d.ts
|
|
6
6
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _alloy_js_core5 from "@alloy-js/core";
|
|
2
2
|
import { EntryFileProps } from "@powerlines/plugin-alloy/typescript/components/entry-file";
|
|
3
3
|
import { CommandTree } from "@shell-shock/core/types/command";
|
|
4
4
|
|
|
@@ -8,14 +8,14 @@ import { CommandTree } from "@shell-shock/core/types/command";
|
|
|
8
8
|
*/
|
|
9
9
|
declare function VirtualCommandHandlerDeclaration(props: {
|
|
10
10
|
command: CommandTree;
|
|
11
|
-
}):
|
|
11
|
+
}): _alloy_js_core5.Children;
|
|
12
12
|
interface VirtualCommandEntryProps extends Omit<EntryFileProps, "path" | "typeDefinition"> {
|
|
13
13
|
command: CommandTree;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* The virtual command entry point for the Shell Shock project.
|
|
17
17
|
*/
|
|
18
|
-
declare function VirtualCommandEntry(props: VirtualCommandEntryProps):
|
|
18
|
+
declare function VirtualCommandEntry(props: VirtualCommandEntryProps): _alloy_js_core5.Children;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { VirtualCommandEntry, VirtualCommandEntryProps, VirtualCommandHandlerDeclaration };
|
|
21
21
|
//# sourceMappingURL=virtual-command-entry.d.mts.map
|
|
@@ -4,8 +4,8 @@ import { CommandEntry } from "./command-entry.mjs";
|
|
|
4
4
|
import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
5
5
|
import { For, Show, code, computed } from "@alloy-js/core";
|
|
6
6
|
import { FunctionDeclaration } from "@alloy-js/typescript";
|
|
7
|
-
import { getAppBin, getAppTitle, getVariableCommandPathName, isVariableCommandPath } from "@shell-shock/core/plugin-utils/context-helpers";
|
|
8
7
|
import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
|
|
8
|
+
import { getAppBin, getAppTitle, getPositionalCommandOptionName, isPositionalCommandOption } from "@shell-shock/core/plugin-utils/context-helpers";
|
|
9
9
|
import { TSDoc, TSDocParam, TSDocRemarks, TSDocTitle } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
|
|
10
10
|
import { pascalCase } from "@stryke/string-format/pascal-case";
|
|
11
11
|
import defu from "defu";
|
|
@@ -22,7 +22,7 @@ function VirtualCommandHandlerDeclaration(props) {
|
|
|
22
22
|
const context = usePowerlines();
|
|
23
23
|
return [createComponent(TSDoc, {
|
|
24
24
|
get heading() {
|
|
25
|
-
return `The ${command.title} (${getAppBin(context)} ${command.path.segments.map((segment) =>
|
|
25
|
+
return `The ${command.title} (${getAppBin(context)} ${command.path.segments.map((segment) => isPositionalCommandOption(segment) ? `[${constantCase(getPositionalCommandOptionName(segment))}]` : segment).join(" ")}) virtual command.`;
|
|
26
26
|
},
|
|
27
27
|
get children() {
|
|
28
28
|
return [
|
|
@@ -78,7 +78,7 @@ function VirtualCommandHandlerDeclaration(props) {
|
|
|
78
78
|
function VirtualCommandEntry(props) {
|
|
79
79
|
const { command, imports, builtinImports, ...rest } = props;
|
|
80
80
|
const context = usePowerlines();
|
|
81
|
-
const filePath = computed(() => joinPaths(context.entryPath, command.path.segments.filter((segment) => !
|
|
81
|
+
const filePath = computed(() => joinPaths(context.entryPath, command.path.segments.filter((segment) => !isPositionalCommandOption(segment)).join("/"), "index.ts"));
|
|
82
82
|
return [createComponent(TypescriptFile, mergeProps(rest, {
|
|
83
83
|
get path() {
|
|
84
84
|
return filePath.value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtual-command-entry.mjs","names":["code","computed","For","Show","FunctionDeclaration","usePowerlines","TSDoc","TSDocParam","TSDocRemarks","TSDocTitle","TypescriptFile","getAppBin","getAppTitle","
|
|
1
|
+
{"version":3,"file":"virtual-command-entry.mjs","names":["code","computed","For","Show","FunctionDeclaration","usePowerlines","TSDoc","TSDocParam","TSDocRemarks","TSDocTitle","TypescriptFile","getAppBin","getAppTitle","getPositionalCommandOptionName","isPositionalCommandOption","joinPaths","constantCase","pascalCase","defu","CommandEntry","CommandRouter","Help","VirtualCommandHandlerDeclaration","props","command","context","_$createComponent","heading","title","path","segments","map","segment","join","children","description","replace","_$createIntrinsic","name","async","parameters","type","default","commands","_$memo","VirtualCommandEntry","imports","builtinImports","rest","filePath","entryPath","filter","_$mergeProps","value","didyoumean2","Object","entries","child","isVirtual","reduce","ret","alias","console","utils","each","values","when","fallback"],"sources":["../../src/components/virtual-command-entry.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, computed, For, Show } from \"@alloy-js/core\";\nimport { FunctionDeclaration } from \"@alloy-js/typescript\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport type { TypescriptFileImports } from \"@powerlines/plugin-alloy/types/components\";\nimport type { EntryFileProps } from \"@powerlines/plugin-alloy/typescript/components/entry-file\";\nimport {\n TSDoc,\n TSDocParam,\n TSDocRemarks,\n TSDocTitle\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport { TypescriptFile } from \"@powerlines/plugin-alloy/typescript/components/typescript-file\";\nimport {\n getAppBin,\n getAppTitle,\n getPositionalCommandOptionName,\n isPositionalCommandOption\n} from \"@shell-shock/core/plugin-utils/context-helpers\";\nimport type { CommandTree } from \"@shell-shock/core/types/command\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { constantCase } from \"@stryke/string-format/constant-case\";\nimport { pascalCase } from \"@stryke/string-format/pascal-case\";\nimport defu from \"defu\";\nimport type { ScriptPresetContext } from \"../types/plugin\";\nimport { CommandEntry } from \"./command-entry\";\nimport { CommandRouter } from \"./command-router\";\nimport { Help } from \"./help\";\n\n/**\n * A component that generates the `handler` function declaration for a command.\n */\nexport function VirtualCommandHandlerDeclaration(props: {\n command: CommandTree;\n}) {\n const { command } = props;\n\n const context = usePowerlines<ScriptPresetContext>();\n\n return (\n <>\n <TSDoc\n heading={`The ${command.title} (${getAppBin(context)} ${command.path.segments\n .map(segment =>\n isPositionalCommandOption(segment)\n ? `[${constantCase(getPositionalCommandOptionName(segment))}]`\n : segment\n )\n .join(\" \")}) virtual command.`}>\n <TSDocRemarks>{`${command.description.replace(/\\.+$/, \"\")}.`}</TSDocRemarks>\n <hbr />\n <TSDocTitle>{command.title}</TSDocTitle>\n <TSDocParam name=\"args\">{`The command-line arguments passed to the command.`}</TSDocParam>\n </TSDoc>\n <FunctionDeclaration\n export\n async\n name=\"handler\"\n parameters={[{ name: \"args\", type: \"string[]\", default: \"getArgs()\" }]}>\n <CommandRouter\n path={command.path.segments}\n commands={command.children}\n />\n <hbr />\n <hbr />\n {code`\n writeLine(\"\");\n writeLine(colors.text.heading.primary(\"${getAppTitle(context)} - ${\n command.title\n }\"));\n writeLine(\"\");\n writeLine(colors.text.body.primary(\"${command.description.replace(/\\.+$/, \"\")}.\"));\n writeLine(\"\");`}\n <hbr />\n <Help command={command} />\n </FunctionDeclaration>\n </>\n );\n}\n\nexport interface VirtualCommandEntryProps extends Omit<\n EntryFileProps,\n \"path\" | \"typeDefinition\"\n> {\n command: CommandTree;\n}\n\n/**\n * The virtual command entry point for the Shell Shock project.\n */\nexport function VirtualCommandEntry(props: VirtualCommandEntryProps) {\n const { command, imports, builtinImports, ...rest } = props;\n\n const context = usePowerlines<ScriptPresetContext>();\n const filePath = computed(() =>\n joinPaths(\n context.entryPath,\n command.path.segments\n .filter(segment => !isPositionalCommandOption(segment))\n .join(\"/\"),\n \"index.ts\"\n )\n );\n\n return (\n <>\n <TypescriptFile\n {...rest}\n path={filePath.value}\n imports={defu(\n {\n didyoumean2: [\n { name: \"didYouMean\", default: true },\n { name: \"ReturnTypeEnums\" },\n { name: \"ThresholdTypeEnums\" }\n ]\n },\n imports ?? {},\n Object.entries(command.children)\n .filter(([, child]) => child.isVirtual)\n .reduce((ret, [name, child]) => {\n ret[`./${child.name}`] = [\n { name: \"handler\", alias: `handle${pascalCase(name)}` }\n ];\n\n return ret;\n }, {} as TypescriptFileImports)\n )}\n builtinImports={defu(builtinImports ?? {}, {\n console: [\"warn\", \"error\", \"table\", \"colors\", \"writeLine\"],\n utils: [\"getArgs\"]\n })}>\n <VirtualCommandHandlerDeclaration command={command} />\n </TypescriptFile>\n <For each={Object.values(command.children)}>\n {child => (\n <Show\n when={child.isVirtual}\n fallback={<CommandEntry command={child} />}>\n <VirtualCommandEntry command={child} />\n </Show>\n )}\n </For>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAiDA,SAAgBsB,iCAAiCC,OAE9C;CACD,MAAM,EAAEC,YAAYD;CAEpB,MAAME,UAAUpB,eAAoC;AAEpD,QAAA,CAAAqB,gBAEKpB,OAAK;EAAA,IACJqB,UAAO;AAAA,UAAE,OAAOH,QAAQI,MAAK,IAAKjB,UAAUc,QAAQ,CAAA,GAAID,QAAQK,KAAKC,SAClEC,KAAIC,YACHlB,0BAA0BkB,QAAQ,GAC9B,IAAIhB,aAAaH,+BAA+BmB,QAAQ,CAAC,CAAA,KACzDA,QACL,CACAC,KAAK,IAAI,CAAA;;EAAoB,IAAAC,WAAA;AAAA,UAAA;IAAAR,gBAC/BlB,cAAY,EAAA,IAAA0B,WAAA;AAAA,YAAE,GAAGV,QAAQW,YAAYC,QAAQ,QAAQ,GAAG,CAAA;OAAG,CAAA;IAAAC,gBAAA,OAAA,EAAA,CAAA;IAAAX,gBAE3DjB,YAAU,EAAA,IAAAyB,WAAA;AAAA,YAAEV,QAAQI;OAAK,CAAA;IA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ACbS,OAAOC,QAAQhC,QAAQU,SAAS,CAC7BiB,QAAQ,GAAGM,WAAWA,MAAMC,UAAU,CACtCC,QAAQC,KAAK,CAACtB,MAAMmB,WAAW;AAC9BG,QAAI,KAAKH,MAAMnB,UAAU,CACvB;KAAEA,MAAM;KAAWuB,OAAO,SAAS5C,WAAWqB,KAAK;KAAI,CACxD;AAED,WAAOsB;MACN,EAA2B,CAClC,CAAC;;EAAA,IACDb,iBAAc;AAAA,UAAE7B,KAAK6B,kBAAkB,EAAE,EAAE;IACzCe,SAAS;KAAC;KAAQ;KAAS;KAAS;KAAU;KAAY;IAC1DC,OAAO,CAAC,UAAS;IAClB,CAAC;;EAAA,IAAA7B,WAAA;AAAA,UAAAR,gBACDJ,kCAAgC,EAAUE,SAAO,CAAA;;EAAA,CAAA,CAAA,EAAAE,gBAEnDxB,KAAG;EAAA,IAAC8D,OAAI;AAAA,UAAET,OAAOU,OAAOzC,QAAQU,SAAS;;EAAAA,WACvCuB,UAAK/B,gBACHvB,MAAI;GAAA,IACH+D,OAAI;AAAA,WAAET,MAAMC;;GAAS,IACrBS,WAAQ;AAAA,WAAAzC,gBAAGP,cAAY,EAACK,SAASiC,OAAK,CAAA;;GAAA,IAAAvB,WAAA;AAAA,WAAAR,gBACrCmB,qBAAmB,EAACrB,SAASiC,OAAK,CAAA;;GAAA,CAAA;EAEtC,CAAA,CAAA"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
3
|
+
const require_components_banner_function_declaration = require('./components/banner-function-declaration.cjs');
|
|
3
4
|
const require_components_bin_entry = require('./components/bin-entry.cjs');
|
|
4
5
|
const require_components_help = require('./components/help.cjs');
|
|
5
6
|
const require_components_command_router = require('./components/command-router.cjs');
|
|
@@ -7,12 +8,12 @@ const require_components_virtual_command_entry = require('./components/virtual-c
|
|
|
7
8
|
const require_components_command_entry = require('./components/command-entry.cjs');
|
|
8
9
|
const require_components_console_builtin = require('./components/console-builtin.cjs');
|
|
9
10
|
const require_components_utils_builtin = require('./components/utils-builtin.cjs');
|
|
11
|
+
require('./components/index.cjs');
|
|
10
12
|
const require_helpers_get_default_options = require('./helpers/get-default-options.cjs');
|
|
11
13
|
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
12
14
|
let __alloy_js_core = require("@alloy-js/core");
|
|
13
15
|
let __alloy_js_typescript = require("@alloy-js/typescript");
|
|
14
16
|
let __powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
|
|
15
|
-
let __shell_shock_core_plugin_utils_context_helpers = require("@shell-shock/core/plugin-utils/context-helpers");
|
|
16
17
|
let __shell_shock_plugin_theme = require("@shell-shock/plugin-theme");
|
|
17
18
|
__shell_shock_plugin_theme = require_rolldown_runtime.__toESM(__shell_shock_plugin_theme);
|
|
18
19
|
|
|
@@ -52,12 +53,21 @@ const plugin = (options = {}) => {
|
|
|
52
53
|
builtinImports: {
|
|
53
54
|
console: [
|
|
54
55
|
"divider",
|
|
56
|
+
"stripAnsi",
|
|
55
57
|
"writeLine",
|
|
58
|
+
"splitText",
|
|
56
59
|
"colors",
|
|
57
|
-
"banner",
|
|
58
60
|
"help"
|
|
59
61
|
],
|
|
60
|
-
utils: ["getArgs"]
|
|
62
|
+
utils: ["getArgs", "isMinimal"],
|
|
63
|
+
env: ["isCI"]
|
|
64
|
+
},
|
|
65
|
+
get prefix() {
|
|
66
|
+
return [
|
|
67
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(require_components_banner_function_declaration.BannerFunctionDeclaration, {}),
|
|
68
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
69
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
|
|
70
|
+
];
|
|
61
71
|
},
|
|
62
72
|
get children() {
|
|
63
73
|
return [
|
|
@@ -85,55 +95,12 @@ const plugin = (options = {}) => {
|
|
|
85
95
|
}
|
|
86
96
|
}),
|
|
87
97
|
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
writeLine(""); `,
|
|
92
|
-
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
93
|
-
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
94
|
-
__alloy_js_core.code`writeLine(colors.text.heading.secondary("Global Options:"));`,
|
|
95
|
-
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
96
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(require_components_help.HelpOptions, { get options() {
|
|
97
|
-
return _self$.options;
|
|
98
|
-
} }),
|
|
99
|
-
__alloy_js_core.code`writeLine(""); `,
|
|
100
|
-
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
101
|
-
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
102
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
103
|
-
get when() {
|
|
104
|
-
return Object.keys(_self$.commands).length > 0;
|
|
98
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(require_components_help.HelpInvoke, {
|
|
99
|
+
get options() {
|
|
100
|
+
return _self$.options;
|
|
105
101
|
},
|
|
106
|
-
get
|
|
107
|
-
return
|
|
108
|
-
__alloy_js_core.code`writeLine(colors.text.body.secondary("The following commands are available:"));
|
|
109
|
-
writeLine(""); `,
|
|
110
|
-
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
111
|
-
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
112
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
|
|
113
|
-
get each() {
|
|
114
|
-
return Object.values(_self$.commands);
|
|
115
|
-
},
|
|
116
|
-
doubleHardline: true,
|
|
117
|
-
joiner: __alloy_js_core.code`writeLine(""); `,
|
|
118
|
-
ender: __alloy_js_core.code`writeLine(""); `,
|
|
119
|
-
children: (child) => [
|
|
120
|
-
(0, __alloy_js_core_jsx_runtime.memo)(() => __alloy_js_core.code`
|
|
121
|
-
writeLine(colors.text.heading.primary("${child.title} ${child.isVirtual ? "" : "Command"}"));
|
|
122
|
-
writeLine("");
|
|
123
|
-
writeLine(colors.text.body.secondary("${child.description}"));
|
|
124
|
-
writeLine("");
|
|
125
|
-
`),
|
|
126
|
-
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
127
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(require_components_help.Help, {
|
|
128
|
-
command: child,
|
|
129
|
-
indent: 2
|
|
130
|
-
}),
|
|
131
|
-
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
|
|
132
|
-
]
|
|
133
|
-
}),
|
|
134
|
-
(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_context_helpers.getAppBin)(_self$)} <specific command> --help') will provide additional information that is specific to that command.");
|
|
135
|
-
writeLine("");`)
|
|
136
|
-
];
|
|
102
|
+
get commands() {
|
|
103
|
+
return _self$.commands ?? {};
|
|
137
104
|
}
|
|
138
105
|
})
|
|
139
106
|
];
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["code","For","Show","VarDeclaration","render","
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["code","For","Show","VarDeclaration","render","theme","BannerFunctionDeclaration","HelpInvoke","BinEntry","CommandEntry","CommandRouter","ConsoleBuiltin","UtilsBuiltin","VirtualCommandEntry","getDefaultOptions","plugin","options","name","config","debug","defaultOptions","isCaseSensitive","configResolved","dependencies","didyoumean2","prepare","_$createComponent","order","handler","_self$","builtinImports","console","utils","env","prefix","_$createIntrinsic","children","when","Object","keys","commands","length","type","initializer","path","values","each","doubleHardline","child","isVirtual","fallback","command"],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, For, Show } from \"@alloy-js/core\";\nimport { VarDeclaration } from \"@alloy-js/typescript\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport theme from \"@shell-shock/plugin-theme\";\nimport type { Plugin } from \"powerlines/types/plugin\";\nimport { BannerFunctionDeclaration, HelpInvoke } from \"./components\";\nimport { BinEntry } from \"./components/bin-entry\";\nimport { CommandEntry } from \"./components/command-entry\";\nimport { CommandRouter } from \"./components/command-router\";\nimport { ConsoleBuiltin } from \"./components/console-builtin\";\nimport { UtilsBuiltin } from \"./components/utils-builtin\";\nimport { VirtualCommandEntry } from \"./components/virtual-command-entry\";\nimport { getDefaultOptions } from \"./helpers/get-default-options\";\nimport type { ScriptPresetContext, ScriptPresetOptions } from \"./types/plugin\";\n\n/**\n * The Shell Shock base plugin.\n */\nexport const plugin = <\n TContext extends ScriptPresetContext = ScriptPresetContext\n>(\n options: ScriptPresetOptions = {}\n) => {\n return [\n theme({\n theme: options.theme\n }),\n {\n name: \"shell-shock:script-preset\",\n config() {\n this.debug(\n \"Providing default configuration for the Shell Shock `script` preset.\"\n );\n\n return {\n defaultOptions: getDefaultOptions,\n isCaseSensitive: false,\n ...options\n };\n },\n configResolved() {\n this.dependencies.didyoumean2 = \"^7.0.4\";\n },\n async prepare() {\n this.debug(\n \"Rendering built-in modules for the Shell Shock `script` preset.\"\n );\n\n return render(\n this,\n <>\n <UtilsBuiltin />\n <ConsoleBuiltin />\n </>\n );\n }\n },\n {\n name: \"shell-shock:script-preset:generate-entrypoint\",\n prepare: {\n order: \"post\",\n async handler() {\n this.debug(\n \"Rendering entrypoint modules for the Shell Shock `script` preset.\"\n );\n\n return render(\n this,\n <>\n <BinEntry\n builtinImports={{\n console: [\n \"divider\",\n \"stripAnsi\",\n \"writeLine\",\n \"splitText\",\n \"colors\",\n \"help\"\n ],\n utils: [\"getArgs\", \"isMinimal\"],\n env: [\"isCI\"]\n }}\n prefix={\n <>\n <BannerFunctionDeclaration />\n <hbr />\n <hbr />\n </>\n }>\n <Show when={Object.keys(this.commands).length > 0}>\n <VarDeclaration\n const\n name=\"args\"\n type=\"string[]\"\n initializer={code`getArgs();`}\n />\n <hbr />\n <CommandRouter path={[]} commands={this.commands ?? {}} />\n <hbr />\n </Show>\n <hbr />\n <HelpInvoke\n options={this.options}\n commands={this.commands ?? {}}\n />\n </BinEntry>\n <Show when={Object.values(this.commands).length > 0}>\n <For each={Object.values(this.commands)} doubleHardline>\n {child => (\n <Show\n when={child.isVirtual}\n fallback={<CommandEntry command={child} />}>\n <VirtualCommandEntry command={child} />\n </Show>\n )}\n </For>\n </Show>\n </>\n );\n }\n }\n }\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAae,UAGXC,UAA+B,EAAE,KAC9B;AACH,QAAO;0CACC,EACJX,OAAOW,QAAQX,OAChB,CAAC;EACF;GACEY,MAAM;GACNC,SAAS;AACP,SAAKC,MACH,uEACD;AAED,WAAO;KACLC,gBAAgBN;KAChBO,iBAAiB;KACjB,GAAGL;KACJ;;GAEHM,iBAAiB;AACf,SAAKC,aAAaC,cAAc;;GAElC,MAAMC,UAAU;AACd,SAAKN,MACH,kEACD;AAED,wDACE,MAAI,kDAEDP,+CAAY,EAAA,CAAA,mDACZD,m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pDY,2DACE9C,sBAAI;SAAA,IACHmC,OAAI;AAAA,iBAAEW,MAAMC;;SAAS,IACrBC,WAAQ;AAAA,kEAAGzC,+CAAY,EAAC0C,SAASH,OAAK,CAAA;;SAAA,IAAAZ,WAAA;AAAA,kEACrCvB,8DAAmB,EAACsC,SAASH,OAAK,CAAA;;SAAA,CAAA;QAEtC,CAAA;;MAAA,CAAA,CAIT,CAAC;;IAEL;GACD;EACF;;AAGH,kBAAejC"}
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"sourcesContent":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAoCA;AACmB,cADN,MACM,EAAA,CAAA,iBAAA,mBAAA,GAAsB,mBAAtB,CAAA,CAAA,OAAA,CAAA,EAER,mBAFQ,EAAA,GAuGZ,MAvGY,CAuGL,QAvGK,CAAA,EAAA"}
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"sourcesContent":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAoCA;AACmB,cADN,MACM,EAAA,CAAA,iBAAA,mBAAA,GAAsB,mBAAtB,CAAA,CAAA,OAAA,CAAA,EAER,mBAFQ,EAAA,GAuGZ,MAvGY,CAuGL,QAvGK,CAAA,EAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
import { BannerFunctionDeclaration } from "./components/banner-function-declaration.mjs";
|
|
1
2
|
import { BinEntry } from "./components/bin-entry.mjs";
|
|
2
|
-
import {
|
|
3
|
+
import { HelpInvoke } from "./components/help.mjs";
|
|
3
4
|
import { CommandRouter } from "./components/command-router.mjs";
|
|
4
5
|
import { VirtualCommandEntry } from "./components/virtual-command-entry.mjs";
|
|
5
6
|
import { CommandEntry } from "./components/command-entry.mjs";
|
|
6
7
|
import { ConsoleBuiltin } from "./components/console-builtin.mjs";
|
|
7
8
|
import { UtilsBuiltin } from "./components/utils-builtin.mjs";
|
|
9
|
+
import "./components/index.mjs";
|
|
8
10
|
import { getDefaultOptions } from "./helpers/get-default-options.mjs";
|
|
9
11
|
import { createComponent, createIntrinsic, memo } from "@alloy-js/core/jsx-runtime";
|
|
10
12
|
import { For, Show, code } from "@alloy-js/core";
|
|
11
13
|
import { VarDeclaration } from "@alloy-js/typescript";
|
|
12
14
|
import { render } from "@powerlines/plugin-alloy/render";
|
|
13
|
-
import { getAppBin } from "@shell-shock/core/plugin-utils/context-helpers";
|
|
14
15
|
import theme from "@shell-shock/plugin-theme";
|
|
15
16
|
|
|
16
17
|
//#region src/index.tsx
|
|
@@ -49,12 +50,21 @@ const plugin = (options = {}) => {
|
|
|
49
50
|
builtinImports: {
|
|
50
51
|
console: [
|
|
51
52
|
"divider",
|
|
53
|
+
"stripAnsi",
|
|
52
54
|
"writeLine",
|
|
55
|
+
"splitText",
|
|
53
56
|
"colors",
|
|
54
|
-
"banner",
|
|
55
57
|
"help"
|
|
56
58
|
],
|
|
57
|
-
utils: ["getArgs"]
|
|
59
|
+
utils: ["getArgs", "isMinimal"],
|
|
60
|
+
env: ["isCI"]
|
|
61
|
+
},
|
|
62
|
+
get prefix() {
|
|
63
|
+
return [
|
|
64
|
+
createComponent(BannerFunctionDeclaration, {}),
|
|
65
|
+
createIntrinsic("hbr", {}),
|
|
66
|
+
createIntrinsic("hbr", {})
|
|
67
|
+
];
|
|
58
68
|
},
|
|
59
69
|
get children() {
|
|
60
70
|
return [
|
|
@@ -82,55 +92,12 @@ const plugin = (options = {}) => {
|
|
|
82
92
|
}
|
|
83
93
|
}),
|
|
84
94
|
createIntrinsic("hbr", {}),
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
writeLine(""); `,
|
|
89
|
-
createIntrinsic("hbr", {}),
|
|
90
|
-
createIntrinsic("hbr", {}),
|
|
91
|
-
code`writeLine(colors.text.heading.secondary("Global Options:"));`,
|
|
92
|
-
createIntrinsic("hbr", {}),
|
|
93
|
-
createComponent(HelpOptions, { get options() {
|
|
94
|
-
return _self$.options;
|
|
95
|
-
} }),
|
|
96
|
-
code`writeLine(""); `,
|
|
97
|
-
createIntrinsic("hbr", {}),
|
|
98
|
-
createIntrinsic("hbr", {}),
|
|
99
|
-
createComponent(Show, {
|
|
100
|
-
get when() {
|
|
101
|
-
return Object.keys(_self$.commands).length > 0;
|
|
95
|
+
createComponent(HelpInvoke, {
|
|
96
|
+
get options() {
|
|
97
|
+
return _self$.options;
|
|
102
98
|
},
|
|
103
|
-
get
|
|
104
|
-
return
|
|
105
|
-
code`writeLine(colors.text.body.secondary("The following commands are available:"));
|
|
106
|
-
writeLine(""); `,
|
|
107
|
-
createIntrinsic("hbr", {}),
|
|
108
|
-
createIntrinsic("hbr", {}),
|
|
109
|
-
createComponent(For, {
|
|
110
|
-
get each() {
|
|
111
|
-
return Object.values(_self$.commands);
|
|
112
|
-
},
|
|
113
|
-
doubleHardline: true,
|
|
114
|
-
joiner: code`writeLine(""); `,
|
|
115
|
-
ender: code`writeLine(""); `,
|
|
116
|
-
children: (child) => [
|
|
117
|
-
memo(() => code`
|
|
118
|
-
writeLine(colors.text.heading.primary("${child.title} ${child.isVirtual ? "" : "Command"}"));
|
|
119
|
-
writeLine("");
|
|
120
|
-
writeLine(colors.text.body.secondary("${child.description}"));
|
|
121
|
-
writeLine("");
|
|
122
|
-
`),
|
|
123
|
-
createIntrinsic("hbr", {}),
|
|
124
|
-
createComponent(Help, {
|
|
125
|
-
command: child,
|
|
126
|
-
indent: 2
|
|
127
|
-
}),
|
|
128
|
-
createIntrinsic("hbr", {})
|
|
129
|
-
]
|
|
130
|
-
}),
|
|
131
|
-
memo(() => code`help("Running a specific command with the help flag (via: '${getAppBin(_self$)} <specific command> --help') will provide additional information that is specific to that command.");
|
|
132
|
-
writeLine("");`)
|
|
133
|
-
];
|
|
99
|
+
get commands() {
|
|
100
|
+
return _self$.commands ?? {};
|
|
134
101
|
}
|
|
135
102
|
})
|
|
136
103
|
];
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["code","For","Show","VarDeclaration","render","
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["code","For","Show","VarDeclaration","render","theme","BannerFunctionDeclaration","HelpInvoke","BinEntry","CommandEntry","CommandRouter","ConsoleBuiltin","UtilsBuiltin","VirtualCommandEntry","getDefaultOptions","plugin","options","name","config","debug","defaultOptions","isCaseSensitive","configResolved","dependencies","didyoumean2","prepare","_$createComponent","order","handler","_self$","builtinImports","console","utils","env","prefix","_$createIntrinsic","children","when","Object","keys","commands","length","type","initializer","path","values","each","doubleHardline","child","isVirtual","fallback","command"],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, For, Show } from \"@alloy-js/core\";\nimport { VarDeclaration } from \"@alloy-js/typescript\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport theme from \"@shell-shock/plugin-theme\";\nimport type { Plugin } from \"powerlines/types/plugin\";\nimport { BannerFunctionDeclaration, HelpInvoke } from \"./components\";\nimport { BinEntry } from \"./components/bin-entry\";\nimport { CommandEntry } from \"./components/command-entry\";\nimport { CommandRouter } from \"./components/command-router\";\nimport { ConsoleBuiltin } from \"./components/console-builtin\";\nimport { UtilsBuiltin } from \"./components/utils-builtin\";\nimport { VirtualCommandEntry } from \"./components/virtual-command-entry\";\nimport { getDefaultOptions } from \"./helpers/get-default-options\";\nimport type { ScriptPresetContext, ScriptPresetOptions } from \"./types/plugin\";\n\n/**\n * The Shell Shock base plugin.\n */\nexport const plugin = <\n TContext extends ScriptPresetContext = ScriptPresetContext\n>(\n options: ScriptPresetOptions = {}\n) => {\n return [\n theme({\n theme: options.theme\n }),\n {\n name: \"shell-shock:script-preset\",\n config() {\n this.debug(\n \"Providing default configuration for the Shell Shock `script` preset.\"\n );\n\n return {\n defaultOptions: getDefaultOptions,\n isCaseSensitive: false,\n ...options\n };\n },\n configResolved() {\n this.dependencies.didyoumean2 = \"^7.0.4\";\n },\n async prepare() {\n this.debug(\n \"Rendering built-in modules for the Shell Shock `script` preset.\"\n );\n\n return render(\n this,\n <>\n <UtilsBuiltin />\n <ConsoleBuiltin />\n </>\n );\n }\n },\n {\n name: \"shell-shock:script-preset:generate-entrypoint\",\n prepare: {\n order: \"post\",\n async handler() {\n this.debug(\n \"Rendering entrypoint modules for the Shell Shock `script` preset.\"\n );\n\n return render(\n this,\n <>\n <BinEntry\n builtinImports={{\n console: [\n \"divider\",\n \"stripAnsi\",\n \"writeLine\",\n \"splitText\",\n \"colors\",\n \"help\"\n ],\n utils: [\"getArgs\", \"isMinimal\"],\n env: [\"isCI\"]\n }}\n prefix={\n <>\n <BannerFunctionDeclaration />\n <hbr />\n <hbr />\n </>\n }>\n <Show when={Object.keys(this.commands).length > 0}>\n <VarDeclaration\n const\n name=\"args\"\n type=\"string[]\"\n initializer={code`getArgs();`}\n />\n <hbr />\n <CommandRouter path={[]} commands={this.commands ?? {}} />\n <hbr />\n </Show>\n <hbr />\n <HelpInvoke\n options={this.options}\n commands={this.commands ?? {}}\n />\n </BinEntry>\n <Show when={Object.values(this.commands).length > 0}>\n <For each={Object.values(this.commands)} doubleHardline>\n {child => (\n <Show\n when={child.isVirtual}\n fallback={<CommandEntry command={child} />}>\n <VirtualCommandEntry command={child} />\n </Show>\n )}\n </For>\n </Show>\n </>\n );\n }\n }\n }\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoCA,MAAae,UAGXC,UAA+B,EAAE,KAC9B;AACH,QAAO;EACLX,MAAM,EACJA,OAAOW,QAAQX,OAChB,CAAC;EACF;GACEY,MAAM;GACNC,SAAS;AACP,SAAKC,MACH,uEACD;AAED,WAAO;KACLC,gBAAgBN;KAChBO,iBAAiB;KACjB,GAAGL;KACJ;;GAEHM,iBAAiB;AACf,SAAKC,aAAaC,cAAc;;GAElC,MAAMC,UAAU;AACd,SAAKN,MACH,kEACD;AAED,WAAOf,OACL,MAAI,CAAAsB,gBAEDd,cAAY,EAAA,CAAA,EAAAc,gBACZf,gBAAc,EAAA,CAAA,CAEnB,CAAC;;GAEJ;EACD;GACEM,MAAM;GACNQ,SAAS;IACPE,OAAO;IACP,MAAMC,UAAU;KAAA,MAAAC,SAAA;AACd,UAAKV,MACH,oEACD;AAED,YAAOf,OACL,MAAI,CAAAsB,gBAEDlB,UAAQ;MACPsB,gBAAgB;OACdC,SAAS;QACP;QACA;QACA;QACA;QACA;QACA;QACD;OACDC,OAAO,CAAC,WAAW,YAAY;OAC/BC,KAAK,CAAC,OAAM;OACb;MAAA,IACDC,SAAM;AAAA,cAAA;QAAAR,gBAEDpB,2BAAyB,EAAA,CAAA;QAAA6B,gBAAA,OAAA,EAAA,CAAA;QAAAA,gBAAA,OAAA,EAAA,CAAA;QAAA;;MAAA,IAAAC,WAAA;AAAA,cAAA;QAAAV,gBAK7BxB,MAAI;SAAA,IAACmC,OAAI;AAAA,iBAAEC,OAAOC,KAAKV,OAAKW,SAAS,CAACC,SAAS;;SAAC,IAAAL,WAAA;AAAA,iBAAA;WAAAV,gBAC9CvB,gBAAc;YAAA,SAAA;YAEbc,MAAI;Y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":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;UAmCiB,mBAAA,SACP,KAAK,4BAA4B,QAAQ;;AADnD;;;;;;;;;;EAmBY,cAAA,CAAA,EALN,aAK4B,EAAA,GAAA,CAAG,CAAA,OAAA,EAJpB,OAIiC,EAAA,KAAA,EAJjB,WAIoC,EAAA,GAJpB,aAIoB,EAAA,CAAA,GAAA,KAAA;AAErE;AAAyC,KAF7B,sBAAA,GAAyB,UAEI,GAFS,mBAET;AACzB,KADJ,0BAAA,GAA6B,cACzB,GAAd,QAAc,CAAL,IAAK,CAAA,mBAAA,EAAA,OAAA,CAAA,CAAA,GACd,yBADc;AAAL,KAGC,mBAHD,CAAA,wBAIe,0BAJf,GAKP,0BALO,CAAA,GAMP,kBANO,CAMY,eANZ,CAAA,GAOT,kBAPS,CAOU,eAPV,CAAA,GAQT,OARS,CAQD,eARC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shell-shock/preset-script",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Shell Shock preset that generates a fully-featured script application.",
|
|
6
6
|
"repository": {
|
|
@@ -69,18 +69,18 @@
|
|
|
69
69
|
"default": "./dist/components/index.mjs"
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
|
-
"./components/
|
|
72
|
+
"./components/banner-function-declaration": {
|
|
73
73
|
"require": {
|
|
74
|
-
"types": "./dist/components/
|
|
75
|
-
"default": "./dist/components/
|
|
74
|
+
"types": "./dist/components/banner-function-declaration.d.cts",
|
|
75
|
+
"default": "./dist/components/banner-function-declaration.cjs"
|
|
76
76
|
},
|
|
77
77
|
"import": {
|
|
78
|
-
"types": "./dist/components/
|
|
79
|
-
"default": "./dist/components/
|
|
78
|
+
"types": "./dist/components/banner-function-declaration.d.mts",
|
|
79
|
+
"default": "./dist/components/banner-function-declaration.mjs"
|
|
80
80
|
},
|
|
81
81
|
"default": {
|
|
82
|
-
"types": "./dist/components/
|
|
83
|
-
"default": "./dist/components/
|
|
82
|
+
"types": "./dist/components/banner-function-declaration.d.mts",
|
|
83
|
+
"default": "./dist/components/banner-function-declaration.mjs"
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
"./components/bin-entry": {
|
|
@@ -277,25 +277,24 @@
|
|
|
277
277
|
"storm-software"
|
|
278
278
|
],
|
|
279
279
|
"dependencies": {
|
|
280
|
-
"@alloy-js/core": "0.22.0",
|
|
280
|
+
"@alloy-js/core": "^0.22.0",
|
|
281
281
|
"@alloy-js/typescript": "^0.22.0",
|
|
282
|
-
"@powerlines/deepkit": "^0.6.
|
|
283
|
-
"@powerlines/plugin-alloy": "^0.20.
|
|
284
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
285
|
-
"@shell-shock/core": "^0.
|
|
286
|
-
"@shell-shock/plugin-theme": "^0.0.
|
|
282
|
+
"@powerlines/deepkit": "^0.6.50",
|
|
283
|
+
"@powerlines/plugin-alloy": "^0.20.14",
|
|
284
|
+
"@powerlines/plugin-plugin": "^0.12.221",
|
|
285
|
+
"@shell-shock/core": "^0.5.0",
|
|
286
|
+
"@shell-shock/plugin-theme": "^0.0.13",
|
|
287
287
|
"@stryke/path": "^0.26.4",
|
|
288
288
|
"@stryke/string-format": "^0.13.7",
|
|
289
|
-
"@stryke/type-checks": "^0.5.23",
|
|
290
289
|
"defu": "^6.1.4",
|
|
291
|
-
"powerlines": "^0.38.
|
|
292
|
-
"@stryke/helpers": "0.9.40"
|
|
290
|
+
"powerlines": "^0.38.37",
|
|
291
|
+
"@stryke/helpers": "^0.9.40"
|
|
293
292
|
},
|
|
294
293
|
"devDependencies": {
|
|
295
294
|
"@babel/core": "^7.29.0",
|
|
296
|
-
"@powerlines/plugin-alloy": "^0.20.
|
|
295
|
+
"@powerlines/plugin-alloy": "^0.20.14",
|
|
297
296
|
"@types/node": "^22.19.9"
|
|
298
297
|
},
|
|
299
298
|
"publishConfig": { "access": "public" },
|
|
300
|
-
"gitHead": "
|
|
299
|
+
"gitHead": "533bcb80b1bcd7b3419e062287bedf4afed8a449"
|
|
301
300
|
}
|