@shell-shock/preset-cli 0.7.13 → 0.8.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/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +1 -1
- package/dist/_virtual/_rolldown/runtime.mjs +3 -0
- package/dist/components/banner-function-declaration.cjs +48 -164
- package/dist/components/banner-function-declaration.d.cts +2 -2
- package/dist/components/banner-function-declaration.d.cts.map +1 -1
- package/dist/components/banner-function-declaration.d.mts +2 -2
- package/dist/components/banner-function-declaration.d.mts.map +1 -1
- package/dist/components/banner-function-declaration.mjs +29 -146
- package/dist/components/banner-function-declaration.mjs.map +1 -1
- package/dist/components/command-entry.cjs +185 -144
- package/dist/components/command-entry.d.cts +2 -2
- package/dist/components/command-entry.d.cts.map +1 -1
- package/dist/components/command-entry.d.mts +3 -3
- package/dist/components/command-entry.d.mts.map +1 -1
- package/dist/components/command-entry.mjs +124 -84
- package/dist/components/command-entry.mjs.map +1 -1
- package/dist/components/command-router.cjs +20 -18
- package/dist/components/command-router.d.cts.map +1 -1
- package/dist/components/command-router.d.mts.map +1 -1
- package/dist/components/command-router.mjs +2 -1
- package/dist/components/command-router.mjs.map +1 -1
- package/dist/components/index.cjs +4 -0
- package/dist/components/index.d.cts +2 -1
- package/dist/components/index.d.mts +2 -1
- package/dist/components/index.mjs +2 -1
- package/dist/components/upgrade-builtin.cjs +171 -0
- package/dist/components/upgrade-builtin.d.cts +15 -0
- package/dist/components/upgrade-builtin.d.cts.map +1 -0
- package/dist/components/upgrade-builtin.d.mts +15 -0
- package/dist/components/upgrade-builtin.d.mts.map +1 -0
- package/dist/components/upgrade-builtin.mjs +169 -0
- package/dist/components/upgrade-builtin.mjs.map +1 -0
- package/dist/components/virtual-command-entry.cjs +26 -24
- package/dist/components/virtual-command-entry.d.cts.map +1 -1
- package/dist/components/virtual-command-entry.d.mts +1 -1
- package/dist/components/virtual-command-entry.d.mts.map +1 -1
- package/dist/components/virtual-command-entry.mjs +7 -6
- package/dist/components/virtual-command-entry.mjs.map +1 -1
- package/dist/helpers/get-default-options.cjs +6 -6
- package/dist/helpers/get-default-options.mjs.map +1 -1
- package/dist/index.cjs +49 -62
- package/dist/index.d.cts +0 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +0 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +23 -36
- package/dist/index.mjs.map +1 -1
- package/dist/plugin-help/dist/components/display.cjs +259 -0
- package/dist/plugin-help/dist/components/display.mjs +254 -0
- package/dist/plugin-help/dist/components/display.mjs.map +1 -0
- package/dist/plugin-help/dist/components/help-builtin.cjs +85 -0
- package/dist/plugin-help/dist/components/help-builtin.mjs +84 -0
- package/dist/plugin-help/dist/components/help-builtin.mjs.map +1 -0
- package/dist/plugin-help/dist/components/help-command.cjs +96 -0
- package/dist/plugin-help/dist/components/help-command.mjs +96 -0
- package/dist/plugin-help/dist/components/help-command.mjs.map +1 -0
- package/dist/plugin-help/dist/components/index.cjs +3 -0
- package/dist/plugin-help/dist/components/index.mjs +5 -0
- package/dist/plugin-help/dist/index.cjs +103 -0
- package/dist/plugin-help/dist/index.d.cts +2 -0
- package/dist/plugin-help/dist/index.d.mts +2 -0
- package/dist/plugin-help/dist/index.mjs +100 -0
- package/dist/plugin-help/dist/index.mjs.map +1 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/constant-case.cjs +17 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/constant-case.mjs +17 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/constant-case.mjs.map +1 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/get-words.cjs +38 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/get-words.mjs +38 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/get-words.mjs.map +1 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/kebab-case.cjs +33 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/kebab-case.mjs +34 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/kebab-case.mjs.map +1 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/snake-case.cjs +40 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/snake-case.mjs +41 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/snake-case.mjs.map +1 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/upper-case-first.cjs +17 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/upper-case-first.mjs +17 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/upper-case-first.mjs.map +1 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-empty.cjs +20 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-empty.mjs +21 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-empty.mjs.map +1 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-null.cjs +12 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-null.mjs +12 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-null.mjs.map +1 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-set-string.cjs +20 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-set-string.mjs +21 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-set-string.mjs.map +1 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-set.cjs +19 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-set.mjs +20 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-set.mjs.map +1 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-string.cjs +12 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-string.mjs +12 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-string.mjs.map +1 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-undefined.cjs +8 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-undefined.mjs +8 -0
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-undefined.mjs.map +1 -0
- package/dist/plugin-help/dist/types/plugin.d.cts +62 -0
- package/dist/plugin-help/dist/types/plugin.d.cts.map +1 -0
- package/dist/plugin-help/dist/types/plugin.d.mts +62 -0
- package/dist/plugin-help/dist/types/plugin.d.mts.map +1 -0
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.mts +2 -2
- package/dist/types/plugin.d.cts +20 -34
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +20 -34
- package/dist/types/plugin.d.mts.map +1 -1
- package/package.json +30 -16
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { BannerFunctionDeclaration } from "./banner-function-declaration.mjs";
|
|
2
2
|
import { CommandRouter } from "./command-router.mjs";
|
|
3
3
|
import { CommandEntry } from "./command-entry.mjs";
|
|
4
|
-
import { createComponent,
|
|
4
|
+
import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
5
5
|
import { For, Show, computed } from "@alloy-js/core";
|
|
6
|
-
import {
|
|
6
|
+
import { Spacing } from "@powerlines/plugin-alloy/core/components";
|
|
7
7
|
import { isDynamicPathSegment } from "@shell-shock/core/plugin-utils";
|
|
8
|
+
import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
|
|
9
|
+
import defu from "defu";
|
|
8
10
|
import { joinPaths } from "@stryke/path/join";
|
|
9
11
|
import { pascalCase } from "@stryke/string-format/pascal-case";
|
|
10
|
-
import defu from "defu";
|
|
11
12
|
import { TypescriptFile } from "@powerlines/plugin-alloy/typescript/components/typescript-file";
|
|
12
13
|
import { VirtualCommandHandlerDeclaration } from "@shell-shock/preset-script/components/virtual-command-entry";
|
|
13
14
|
|
|
@@ -63,14 +64,14 @@ function VirtualCommandEntry(props) {
|
|
|
63
64
|
"select",
|
|
64
65
|
"isCancel",
|
|
65
66
|
"sleep"
|
|
66
|
-
]
|
|
67
|
+
],
|
|
68
|
+
[joinPaths("help", ...command.segments.filter((segment) => !isDynamicPathSegment(segment)))]: ["showHelp"]
|
|
67
69
|
});
|
|
68
70
|
},
|
|
69
71
|
get children() {
|
|
70
72
|
return [
|
|
71
73
|
createComponent(BannerFunctionDeclaration, { command }),
|
|
72
|
-
|
|
73
|
-
createIntrinsic("hbr", {}),
|
|
74
|
+
createComponent(Spacing, {}),
|
|
74
75
|
createComponent(VirtualCommandHandlerDeclaration, {
|
|
75
76
|
command,
|
|
76
77
|
get children() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtual-command-entry.mjs","names":[
|
|
1
|
+
{"version":3,"file":"virtual-command-entry.mjs","names":[],"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 { computed, For, Show } from \"@alloy-js/core\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components\";\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 { TypescriptFile } from \"@powerlines/plugin-alloy/typescript/components/typescript-file\";\nimport type { CommandTree } from \"@shell-shock/core\";\nimport { isDynamicPathSegment } from \"@shell-shock/core/plugin-utils\";\nimport { VirtualCommandHandlerDeclaration } from \"@shell-shock/preset-script/components/virtual-command-entry\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { pascalCase } from \"@stryke/string-format/pascal-case\";\nimport defu from \"defu\";\nimport type { CLIPresetContext } from \"../types/plugin\";\nimport { BannerFunctionDeclaration } from \"./banner-function-declaration\";\nimport { CommandEntry } from \"./command-entry\";\nimport { CommandRouter } from \"./command-router\";\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<CLIPresetContext>();\n const filePath = computed(() =>\n joinPaths(\n context.entryPath,\n command.segments\n .filter(segment => !isDynamicPathSegment(segment))\n .join(\"/\"),\n \"index.ts\"\n )\n );\n\n return (\n <>\n <TypescriptFile\n {...rest}\n path={filePath.value}\n imports={defu(\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 env: [\"isDevelopment\", \"isDebug\"],\n console: [\n \"warn\",\n \"error\",\n \"info\",\n \"help\",\n \"table\",\n \"colors\",\n \"writeLine\",\n \"splitText\",\n \"stripAnsi\"\n ],\n utils: [\n \"useApp\",\n \"useArgs\",\n \"hasFlag\",\n \"isMinimal\",\n \"isUnicodeSupported\",\n \"isInteractive\",\n \"isHelp\",\n \"findSuggestions\"\n ],\n prompts: [\"text\", \"numeric\", \"toggle\", \"select\", \"isCancel\", \"sleep\"],\n [joinPaths(\n \"help\",\n ...command.segments.filter(\n segment => !isDynamicPathSegment(segment)\n )\n )]: [\"showHelp\"]\n })}>\n <BannerFunctionDeclaration command={command} />\n <Spacing />\n <VirtualCommandHandlerDeclaration command={command}>\n <CommandRouter\n segments={command.segments}\n commands={command.children}\n />\n </VirtualCommandHandlerDeclaration>\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":";;;;;;;;;;;;;;;;;;AA0CA,SAAE,oBAAA,OAAA;CACA,MAAK,EACL,SACF,SACE,4BAEA;CACA,MAAM,UAAU,eAAc;CAC9B,MAAE,WAAS,eAAA,UAAA,QAAA,WAAA,QAAA,SAAA,QAAA,YAAA,CAAA,qBAAA,QAAA,CAAA,CAAA,KAAA,IAAA,EAAA,WAAA,CAAA;AACX,QAAI,CAAA,gBAAiB,gBAAA,WAAA,MAAA;EACnB,IAAE,OAAQ;AACR,UAAG,SAAO;;EAEZ,IAAG,UAAQ;AACX,UAAA,KAAA,WAAA,EAAA,EAAA,OAAA,QAAA,QAAA,SAAA,CAAA,QAAA,GAAA,WAAA,MAAA,UAAA,CAAA,QAAA,KAAA,CAAA,MAAA,WAAA;AACD,QAAA,KAAA,MAAA,UAAA,CAAA;;KAEM,OAAA,SAAA,WAAA,KAAA;KACJ,CAAA;AACE,WAAA;MACE,EAAE,CAAK,CAAA;;EAEZ,IAAI,iBAAa;AACf,UAAI,KAAQ,kBAAK,EAAA,EAAA;IACf,KAAE,CAAA,iBAAe,UAAgB;IACjC,SAAK;KAAA;KAAW;KAAW;KAAM;KAAS;KAAA;KAAA;KAAA;KAAA;KAAA;IAC1C,OAAK;KAAA;KAAa;KAAO;KAAW;KAAA;KAAA;KAAA;KAAA;KAAA;IACpC,SAAS;KAAC;KAAK;KAAc;KAAE;KAAA;KAAA;KAAA;KAC9B,UAAS,QAAO,GAAA,QAAU,SAAQ,QAAQ,YAAW,CAAI,qBAAI,QAAA,CAAA,CAAA,GAAA,CAAA,WAAA;IAC/D,CAAC;;EAEJ,IAAI,WAAM;AACR,UAAO;IAAC,gBAAO,2BAAqB,EACjC,SACF,CAAC;IAAA,gBAAoB,SAAC,EAAA,CAAA;IAAA,gBAAsB,kCAAA;KAClC;KACT,IAAE,WAAS;AACT,aAAO,gBAAC,eAAA;OACN,IAAC,WAAM;AACN,eAAK,QAAA;;OAEN,IAAC,WAAM;AACN,eAAO,QAAA;;OAET,CAAC;;KAEL,CAAC;IAAC;;EAEN,CAAC,CAAC,EAAE,gBAAa,KAAA;EAChB,IAAI,OAAK;AACP,UAAO,OAAO,OAAC,QAAA,SAAA;;EAEjB,WAAS,UAAA,gBAAmB,MAAA;GAC1B,IAAI,OAAG;AACL,WAAK,MAAO;;GAEd,IAAI,WAAC;AACH,WAAE,gBAAmB,cAAkB,EACrC,SAAC,OACF,CAAC;;GAEJ,IAAI,WAAW;AACb,WAAI,gBAAA,qBAAA,EACF,SAAM,OACP,CAAC;;GAEL,CAAC;EACH,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const
|
|
2
|
-
let
|
|
3
|
-
let
|
|
1
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
let _shell_shock_core = require("@shell-shock/core");
|
|
3
|
+
let _shell_shock_preset_script_helpers_get_default_options = require("@shell-shock/preset-script/helpers/get-default-options");
|
|
4
4
|
|
|
5
5
|
//#region src/helpers/get-default-options.ts
|
|
6
6
|
/**
|
|
@@ -12,13 +12,13 @@ let __shell_shock_preset_script_helpers_get_default_options = require("@shell-sh
|
|
|
12
12
|
*/
|
|
13
13
|
function getDefaultOptions(context, _) {
|
|
14
14
|
return [
|
|
15
|
-
...(0,
|
|
15
|
+
...(0, _shell_shock_preset_script_helpers_get_default_options.getDefaultOptions)(),
|
|
16
16
|
context.config.interactive !== "never" && context.config.interactive !== true && {
|
|
17
17
|
name: "interactive",
|
|
18
18
|
title: "Interactive",
|
|
19
19
|
description: "Enable interactive mode - will be set to false if running in a CI pipeline.",
|
|
20
20
|
alias: ["i", "interact"],
|
|
21
|
-
kind:
|
|
21
|
+
kind: _shell_shock_core.CommandParameterKinds.boolean,
|
|
22
22
|
optional: true,
|
|
23
23
|
default: context.config.interactive !== false
|
|
24
24
|
},
|
|
@@ -27,7 +27,7 @@ function getDefaultOptions(context, _) {
|
|
|
27
27
|
title: "Non-Interactive",
|
|
28
28
|
description: "Disable interactive mode - will be set to true if running in a CI pipeline.",
|
|
29
29
|
alias: ["no-interactive"],
|
|
30
|
-
kind:
|
|
30
|
+
kind: _shell_shock_core.CommandParameterKinds.boolean,
|
|
31
31
|
optional: true,
|
|
32
32
|
default: false,
|
|
33
33
|
isNegativeOf: "interactive"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-default-options.mjs","names":["
|
|
1
|
+
{"version":3,"file":"get-default-options.mjs","names":["getDefaultOptions","getDefaultOptionsBase"],"sources":["../../src/helpers/get-default-options.ts"],"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 type { CommandBase, CommandOption } from \"@shell-shock/core\";\nimport { CommandParameterKinds } from \"@shell-shock/core\";\nimport { getDefaultOptions as getDefaultOptionsBase } from \"@shell-shock/preset-script/helpers/get-default-options\";\nimport type { CLIPresetContext } from \"../types\";\n\n/**\n * Get the default command options.\n *\n * @param context - The build context.\n * @param _ - The command input.\n * @returns The default command options.\n */\nexport function getDefaultOptions(\n context: CLIPresetContext,\n _: CommandBase\n): CommandOption[] {\n return [\n ...getDefaultOptionsBase(),\n context.config.interactive !== \"never\" &&\n context.config.interactive !== true && {\n name: \"interactive\",\n title: \"Interactive\",\n description:\n \"Enable interactive mode - will be set to false if running in a CI pipeline.\",\n alias: [\"i\", \"interact\"],\n kind: CommandParameterKinds.boolean,\n optional: true,\n default: context.config.interactive !== false\n },\n context.config.interactive !== \"never\" &&\n context.config.interactive !== false && {\n name: \"non-interactive\",\n title: \"Non-Interactive\",\n description:\n \"Disable interactive mode - will be set to true if running in a CI pipeline.\",\n alias: [\"no-interactive\"],\n kind: CommandParameterKinds.boolean,\n optional: true,\n default: false,\n isNegativeOf: \"interactive\"\n }\n ].filter(Boolean) as CommandOption[];\n}\n"],"mappings":";;;;;;;;;;;AA8BA,SAAgBA,oBACd,SACA,GACiB;AACjB,QAAO;EACL,GAAGC,mBAAuB;EAC1B,QAAQ,OAAO,gBAAgB,WAC7B,QAAQ,OAAO,gBAAgB,QAAQ;GACrC,MAAM;GACN,OAAO;GACP,aACE;GACF,OAAO,CAAC,KAAK,WAAW;GACxB,MAAM,sBAAsB;GAC5B,UAAU;GACV,SAAS,QAAQ,OAAO,gBAAgB;GACzC;EACH,QAAQ,OAAO,gBAAgB,WAC7B,QAAQ,OAAO,gBAAgB,SAAS;GACtC,MAAM;GACN,OAAO;GACP,aACE;GACF,OAAO,CAAC,iBAAiB;GACzB,MAAM,sBAAsB;GAC5B,UAAU;GACV,SAAS;GACT,cAAc;GACf;EACJ,CAAC,OAAO,QAAQ"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
const
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_index = require('./plugin-help/dist/index.cjs');
|
|
3
4
|
const require_components_banner_function_declaration = require('./components/banner-function-declaration.cjs');
|
|
4
5
|
const require_components_command_router = require('./components/command-router.cjs');
|
|
5
6
|
const require_components_virtual_command_entry = require('./components/virtual-command-entry.cjs');
|
|
6
7
|
const require_components_command_entry = require('./components/command-entry.cjs');
|
|
8
|
+
const require_components_upgrade_builtin = require('./components/upgrade-builtin.cjs');
|
|
7
9
|
const require_get_default_options = require('./helpers/get-default-options.cjs');
|
|
8
|
-
let
|
|
9
|
-
let
|
|
10
|
-
let
|
|
11
|
-
let
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
let
|
|
10
|
+
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
11
|
+
let _alloy_js_core = require("@alloy-js/core");
|
|
12
|
+
let _alloy_js_typescript = require("@alloy-js/typescript");
|
|
13
|
+
let _powerlines_plugin_alloy_core_components = require("@powerlines/plugin-alloy/core/components");
|
|
14
|
+
let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
|
|
15
|
+
let _shell_shock_plugin_console = require("@shell-shock/plugin-console");
|
|
16
|
+
_shell_shock_plugin_console = require_runtime.__toESM(_shell_shock_plugin_console);
|
|
17
|
+
let _shell_shock_plugin_prompts = require("@shell-shock/plugin-prompts");
|
|
18
|
+
_shell_shock_plugin_prompts = require_runtime.__toESM(_shell_shock_plugin_prompts);
|
|
19
|
+
let _shell_shock_plugin_upgrade = require("@shell-shock/plugin-upgrade");
|
|
20
|
+
_shell_shock_plugin_upgrade = require_runtime.__toESM(_shell_shock_plugin_upgrade);
|
|
21
|
+
let _shell_shock_preset_script_components_bin_entry = require("@shell-shock/preset-script/components/bin-entry");
|
|
20
22
|
|
|
21
23
|
//#region src/index.tsx
|
|
22
24
|
/**
|
|
@@ -27,9 +29,10 @@ let __shell_shock_preset_script_components_help = require("@shell-shock/preset-s
|
|
|
27
29
|
*/
|
|
28
30
|
const plugin = (options = {}) => {
|
|
29
31
|
return [
|
|
30
|
-
(0,
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
...(0, _shell_shock_plugin_console.default)(options),
|
|
33
|
+
...require_index.plugin(options),
|
|
34
|
+
...(0, _shell_shock_plugin_prompts.default)(options),
|
|
35
|
+
(0, _shell_shock_plugin_upgrade.default)(options),
|
|
33
36
|
{
|
|
34
37
|
name: "shell-shock:cli-preset",
|
|
35
38
|
config() {
|
|
@@ -39,6 +42,13 @@ const plugin = (options = {}) => {
|
|
|
39
42
|
isCaseSensitive: false,
|
|
40
43
|
...options
|
|
41
44
|
};
|
|
45
|
+
},
|
|
46
|
+
prepare: {
|
|
47
|
+
order: "post",
|
|
48
|
+
async handler() {
|
|
49
|
+
this.debug("Rendering upgrade built-in module.");
|
|
50
|
+
return (0, _powerlines_plugin_alloy_render.render)(this, (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_upgrade_builtin.UpgradeBuiltin, {}));
|
|
51
|
+
}
|
|
42
52
|
}
|
|
43
53
|
},
|
|
44
54
|
{
|
|
@@ -48,7 +58,7 @@ const plugin = (options = {}) => {
|
|
|
48
58
|
async handler() {
|
|
49
59
|
const _self$ = this;
|
|
50
60
|
this.debug("Rendering entrypoint modules for the Shell Shock `cli` preset.");
|
|
51
|
-
return (0,
|
|
61
|
+
return (0, _powerlines_plugin_alloy_render.render)(this, [(0, _alloy_js_core_jsx_runtime.createComponent)(_shell_shock_preset_script_components_bin_entry.BinEntry, {
|
|
52
62
|
builtinImports: {
|
|
53
63
|
console: [
|
|
54
64
|
"info",
|
|
@@ -61,11 +71,7 @@ const plugin = (options = {}) => {
|
|
|
61
71
|
"stripAnsi",
|
|
62
72
|
"writeLine",
|
|
63
73
|
"splitText",
|
|
64
|
-
"colors"
|
|
65
|
-
"writeLine",
|
|
66
|
-
"splitText",
|
|
67
|
-
"stripAnsi",
|
|
68
|
-
"createSpinner"
|
|
74
|
+
"colors"
|
|
69
75
|
],
|
|
70
76
|
utils: [
|
|
71
77
|
"useApp",
|
|
@@ -80,82 +86,64 @@ const plugin = (options = {}) => {
|
|
|
80
86
|
"toggle",
|
|
81
87
|
"select",
|
|
82
88
|
"confirm",
|
|
83
|
-
"
|
|
84
|
-
"isCancel",
|
|
85
|
-
"sleep"
|
|
89
|
+
"isCancel"
|
|
86
90
|
],
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"isCheckForUpdatesRequired",
|
|
90
|
-
"upgrade"
|
|
91
|
-
],
|
|
92
|
-
env: ["env", "paths"]
|
|
91
|
+
env: ["env", "paths"],
|
|
92
|
+
upgrade: ["executeUpgrade"]
|
|
93
93
|
},
|
|
94
94
|
get prefix() {
|
|
95
|
-
return [
|
|
96
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(require_components_banner_function_declaration.BannerFunctionDeclaration, {}),
|
|
97
|
-
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
98
|
-
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
|
|
99
|
-
];
|
|
95
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(require_components_banner_function_declaration.BannerFunctionDeclaration, {}), (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components.Spacing, {})];
|
|
100
96
|
},
|
|
101
97
|
get children() {
|
|
102
98
|
return [
|
|
103
|
-
(0,
|
|
99
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
104
100
|
get when() {
|
|
105
101
|
return Object.keys(_self$.commands).length > 0;
|
|
106
102
|
},
|
|
107
103
|
get children() {
|
|
108
104
|
return [
|
|
109
|
-
(0,
|
|
105
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
110
106
|
"let": true,
|
|
111
107
|
name: "args",
|
|
112
108
|
type: "string[]",
|
|
113
|
-
initializer:
|
|
109
|
+
initializer: _alloy_js_core.code`useArgs();`
|
|
114
110
|
}),
|
|
115
|
-
(0,
|
|
116
|
-
(0,
|
|
111
|
+
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
112
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(require_components_command_router.CommandRouter, {
|
|
117
113
|
segments: [],
|
|
118
114
|
get commands() {
|
|
119
115
|
return _self$.commands ?? {};
|
|
120
116
|
}
|
|
121
117
|
}),
|
|
122
|
-
(0,
|
|
118
|
+
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
|
|
123
119
|
];
|
|
124
120
|
}
|
|
125
121
|
}),
|
|
126
|
-
(0,
|
|
127
|
-
|
|
128
|
-
(0,
|
|
129
|
-
(
|
|
130
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(__shell_shock_preset_script_components_help.VirtualHelp, {
|
|
131
|
-
get options() {
|
|
132
|
-
return _self$.options;
|
|
133
|
-
},
|
|
134
|
-
get commands() {
|
|
135
|
-
return _self$.commands ?? {};
|
|
136
|
-
}
|
|
137
|
-
})
|
|
122
|
+
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
123
|
+
_alloy_js_core.code`await banner(0);`,
|
|
124
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components.Spacing, {}),
|
|
125
|
+
_alloy_js_core.code`return showHelp(); `
|
|
138
126
|
];
|
|
139
127
|
}
|
|
140
|
-
}), (0,
|
|
128
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
141
129
|
get when() {
|
|
142
130
|
return Object.values(_self$.commands).length > 0;
|
|
143
131
|
},
|
|
144
132
|
get children() {
|
|
145
|
-
return (0,
|
|
133
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
|
|
146
134
|
get each() {
|
|
147
135
|
return Object.values(_self$.commands);
|
|
148
136
|
},
|
|
149
137
|
doubleHardline: true,
|
|
150
|
-
children: (child) => (0,
|
|
138
|
+
children: (child) => (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
151
139
|
get when() {
|
|
152
140
|
return child.isVirtual;
|
|
153
141
|
},
|
|
154
142
|
get fallback() {
|
|
155
|
-
return (0,
|
|
143
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_command_entry.CommandEntry, { command: child });
|
|
156
144
|
},
|
|
157
145
|
get children() {
|
|
158
|
-
return (0,
|
|
146
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_virtual_command_entry.VirtualCommandEntry, { command: child });
|
|
159
147
|
}
|
|
160
148
|
})
|
|
161
149
|
});
|
|
@@ -166,8 +154,7 @@ const plugin = (options = {}) => {
|
|
|
166
154
|
}
|
|
167
155
|
];
|
|
168
156
|
};
|
|
169
|
-
var src_default = plugin;
|
|
170
157
|
|
|
171
158
|
//#endregion
|
|
172
|
-
exports.default =
|
|
159
|
+
exports.default = plugin;
|
|
173
160
|
exports.plugin = plugin;
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AA0CA;;;;cAAa,MAAA,oBAA2B,gBAAA,GAAmB,gBAAA,EACzD,OAAA,GAAS,gBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AA0CA;;;;cAAa,MAAA,oBAA2B,gBAAA,GAAmB,gBAAA,EACzD,OAAA,GAAS,gBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
+
import { plugin as plugin$1 } from "./plugin-help/dist/index.mjs";
|
|
1
2
|
import { BannerFunctionDeclaration } from "./components/banner-function-declaration.mjs";
|
|
2
3
|
import { CommandRouter } from "./components/command-router.mjs";
|
|
3
4
|
import { VirtualCommandEntry } from "./components/virtual-command-entry.mjs";
|
|
4
5
|
import { CommandEntry } from "./components/command-entry.mjs";
|
|
6
|
+
import { UpgradeBuiltin } from "./components/upgrade-builtin.mjs";
|
|
5
7
|
import { getDefaultOptions } from "./helpers/get-default-options.mjs";
|
|
6
8
|
import { createComponent, createIntrinsic, memo } from "@alloy-js/core/jsx-runtime";
|
|
7
9
|
import { For, Show, code } from "@alloy-js/core";
|
|
8
10
|
import { VarDeclaration } from "@alloy-js/typescript";
|
|
11
|
+
import { Spacing } from "@powerlines/plugin-alloy/core/components";
|
|
9
12
|
import { render } from "@powerlines/plugin-alloy/render";
|
|
10
13
|
import console from "@shell-shock/plugin-console";
|
|
11
14
|
import prompts from "@shell-shock/plugin-prompts";
|
|
12
15
|
import upgrade from "@shell-shock/plugin-upgrade";
|
|
13
16
|
import { BinEntry } from "@shell-shock/preset-script/components/bin-entry";
|
|
14
|
-
import { VirtualHelp } from "@shell-shock/preset-script/components/help";
|
|
15
17
|
|
|
16
18
|
//#region src/index.tsx
|
|
17
19
|
/**
|
|
@@ -22,9 +24,10 @@ import { VirtualHelp } from "@shell-shock/preset-script/components/help";
|
|
|
22
24
|
*/
|
|
23
25
|
const plugin = (options = {}) => {
|
|
24
26
|
return [
|
|
25
|
-
console(options),
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
...console(options),
|
|
28
|
+
...plugin$1(options),
|
|
29
|
+
...prompts(options),
|
|
30
|
+
upgrade(options),
|
|
28
31
|
{
|
|
29
32
|
name: "shell-shock:cli-preset",
|
|
30
33
|
config() {
|
|
@@ -34,6 +37,13 @@ const plugin = (options = {}) => {
|
|
|
34
37
|
isCaseSensitive: false,
|
|
35
38
|
...options
|
|
36
39
|
};
|
|
40
|
+
},
|
|
41
|
+
prepare: {
|
|
42
|
+
order: "post",
|
|
43
|
+
async handler() {
|
|
44
|
+
this.debug("Rendering upgrade built-in module.");
|
|
45
|
+
return render(this, createComponent(UpgradeBuiltin, {}));
|
|
46
|
+
}
|
|
37
47
|
}
|
|
38
48
|
},
|
|
39
49
|
{
|
|
@@ -56,11 +66,7 @@ const plugin = (options = {}) => {
|
|
|
56
66
|
"stripAnsi",
|
|
57
67
|
"writeLine",
|
|
58
68
|
"splitText",
|
|
59
|
-
"colors"
|
|
60
|
-
"writeLine",
|
|
61
|
-
"splitText",
|
|
62
|
-
"stripAnsi",
|
|
63
|
-
"createSpinner"
|
|
69
|
+
"colors"
|
|
64
70
|
],
|
|
65
71
|
utils: [
|
|
66
72
|
"useApp",
|
|
@@ -75,23 +81,13 @@ const plugin = (options = {}) => {
|
|
|
75
81
|
"toggle",
|
|
76
82
|
"select",
|
|
77
83
|
"confirm",
|
|
78
|
-
"
|
|
79
|
-
"isCancel",
|
|
80
|
-
"sleep"
|
|
81
|
-
],
|
|
82
|
-
upgrade: [
|
|
83
|
-
"checkForUpdates",
|
|
84
|
-
"isCheckForUpdatesRequired",
|
|
85
|
-
"upgrade"
|
|
84
|
+
"isCancel"
|
|
86
85
|
],
|
|
87
|
-
env: ["env", "paths"]
|
|
86
|
+
env: ["env", "paths"],
|
|
87
|
+
upgrade: ["executeUpgrade"]
|
|
88
88
|
},
|
|
89
89
|
get prefix() {
|
|
90
|
-
return [
|
|
91
|
-
createComponent(BannerFunctionDeclaration, {}),
|
|
92
|
-
createIntrinsic("hbr", {}),
|
|
93
|
-
createIntrinsic("hbr", {})
|
|
94
|
-
];
|
|
90
|
+
return [createComponent(BannerFunctionDeclaration, {}), createComponent(Spacing, {})];
|
|
95
91
|
},
|
|
96
92
|
get children() {
|
|
97
93
|
return [
|
|
@@ -119,17 +115,9 @@ const plugin = (options = {}) => {
|
|
|
119
115
|
}
|
|
120
116
|
}),
|
|
121
117
|
createIntrinsic("hbr", {}),
|
|
122
|
-
code`await banner(0
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
createComponent(VirtualHelp, {
|
|
126
|
-
get options() {
|
|
127
|
-
return _self$.options;
|
|
128
|
-
},
|
|
129
|
-
get commands() {
|
|
130
|
-
return _self$.commands ?? {};
|
|
131
|
-
}
|
|
132
|
-
})
|
|
118
|
+
code`await banner(0);`,
|
|
119
|
+
createComponent(Spacing, {}),
|
|
120
|
+
code`return showHelp(); `
|
|
133
121
|
];
|
|
134
122
|
}
|
|
135
123
|
}), createComponent(Show, {
|
|
@@ -161,8 +149,7 @@ const plugin = (options = {}) => {
|
|
|
161
149
|
}
|
|
162
150
|
];
|
|
163
151
|
};
|
|
164
|
-
var src_default = plugin;
|
|
165
152
|
|
|
166
153
|
//#endregion
|
|
167
|
-
export {
|
|
154
|
+
export { plugin as default, plugin };
|
|
168
155
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, For, Show } from \"@alloy-js/core\";\nimport { VarDeclaration } from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport console from \"@shell-shock/plugin-console\";\nimport help from \"@shell-shock/plugin-help\";\nimport prompts from \"@shell-shock/plugin-prompts\";\nimport upgrade from \"@shell-shock/plugin-upgrade\";\nimport { BinEntry } from \"@shell-shock/preset-script/components/bin-entry\";\nimport type { Plugin } from \"powerlines\";\nimport { BannerFunctionDeclaration } from \"./components/banner-function-declaration\";\nimport { CommandEntry } from \"./components/command-entry\";\nimport { CommandRouter } from \"./components/command-router\";\nimport { UpgradeBuiltin } from \"./components/upgrade-builtin\";\nimport { VirtualCommandEntry } from \"./components/virtual-command-entry\";\nimport { getDefaultOptions } from \"./helpers/get-default-options\";\nimport type { CLIPresetContext, CLIPresetOptions } from \"./types/plugin\";\n\n/**\n * The Shell Shock CLI Preset plugin.\n *\n * @remarks\n * This preset includes a set of built-in modules and commands to create a CLI application, as well as configuration options to customize the generated code. It also includes the `prompts` plugin to provide interactive prompts in the CLI application, and the `upgrade` plugin to manage upgrading the local application's version.\n */\nexport const plugin = <TContext extends CLIPresetContext = CLIPresetContext>(\n options: CLIPresetOptions = {}\n): Plugin<TContext>[] => {\n return [\n ...console<TContext>(options),\n ...help<TContext>(options),\n ...prompts<TContext>(options),\n upgrade<TContext>(options),\n {\n name: \"shell-shock:cli-preset\",\n config() {\n this.debug(\n \"Providing default configuration for the Shell Shock `cli` preset.\"\n );\n\n return {\n defaultOptions: getDefaultOptions,\n isCaseSensitive: false,\n ...options\n };\n },\n prepare: {\n order: \"post\",\n async handler() {\n this.debug(\"Rendering upgrade built-in module.\");\n\n return render(this, <UpgradeBuiltin />);\n }\n }\n },\n {\n name: \"shell-shock:cli-preset:generate-entrypoint\",\n prepare: {\n order: \"post\",\n async handler() {\n this.debug(\n \"Rendering entrypoint modules for the Shell Shock `cli` preset.\"\n );\n\n return render(\n this,\n <>\n <BinEntry\n builtinImports={{\n console: [\n \"info\",\n \"debug\",\n \"warn\",\n \"help\",\n \"error\",\n \"cursor\",\n \"divider\",\n \"stripAnsi\",\n \"writeLine\",\n \"splitText\",\n \"colors\"\n ],\n utils: [\n \"useApp\",\n \"useArgs\",\n \"isMinimal\",\n \"isInteractive\",\n \"isHelp\"\n ],\n prompts: [\n \"text\",\n \"numeric\",\n \"toggle\",\n \"select\",\n \"confirm\",\n \"isCancel\"\n ],\n env: [\"env\", \"paths\"],\n upgrade: [\"executeUpgrade\"]\n }}\n prefix={\n <>\n <BannerFunctionDeclaration />\n <Spacing />\n </>\n }>\n <Show when={Object.keys(this.commands).length > 0}>\n <VarDeclaration\n let\n name=\"args\"\n type=\"string[]\"\n initializer={code`useArgs();`}\n />\n <hbr />\n <CommandRouter segments={[]} commands={this.commands ?? {}} />\n <hbr />\n </Show>\n <hbr />\n {code`await banner(0);`}\n <Spacing />\n {code`return showHelp(); `}\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 ];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAW,UAAoB,UAAA,EAAA,KAAA;AAC7B,QAAO;EAAC,GAAA,QAAe,QAAA;EAAA,GAAA,SAAA,QAAA;EAAA,GAAA,QAAA,QAAA;EAAA,QAAA,QAAA;EAAA;GACvB,MAAO;GACL,SAAG;AACD,SAAK,MAAC,oEAAkB;AACxB,WAAC;KACH,gBAAkB;KAClB,iBAAA;KACE,GAAK;KACL;;GAEF,SAAO;IACL,OAAG;;AAED,UAAA,MAAO,qCAAA;AACP,YAAE,OAAA,MAAgB,gBAAiB,gBAAA,EAAA,CAAA,CAAA;;IAEtC;GACF;EAAE;GACD,MAAG;GACH,SAAS;IACP,OAAO;IACP,MAAE,UAAc;KACd,MAAM,SAAQ;;AAEd,YAAE,OAAO,MAAW,CAAC,gBAAkB,UAAE;MACzC,gBAAA;OACF,SAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;OACD,OAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;OACD,SAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;OACQ,KAAC,CAAK,OAAO,QAAI;OACvB,SAAS,CAAA,iBAAA;OACP;MACA,IAAM,SAAS;AACb,cAAK,CAAK,gBAAA,2BAAA,EAAA,CAAA,EAAA,gBAAA,SAAA,EAAA,CAAA,CAAA;;MAEV,IAAC,WAAA;;;SAED,IAAO,OAAM;AACP,iBAAA,OAAA,KAAA,OAAA,SAAA,CAAA,SAAA;;SAEF,IAAC,WAAA;AACC,iBAAA;WAAA,gBAAgB,gBAAA;YACd,OAAO;YACP,MAAG;YACH,MAAG;YACH,aAAQ,IAAA;YACT,CAAC;WAAE,gBAAM,OAAA,EAAA,CAAA;WAAA,gBAAA,eAAA;YACR,UAAS,EAAA;YACT,IAAG,WAAO;AACR,oBAAC,OAAQ,YAAA,EAAA;;YAEZ,CAAC;WAAE,gBAAW,OAAA,EAAA,CAAA;WAAA;;SAElB,CAAC;QAAE,gBAAW,OAAA,EAAA,CAAA;QAAA,IAAA;QAAA,gBAAA,SAAA,EAAA,CAAA;QAAA,IAAA;QAAA;;MAElB,CAAC,EAAE,gBAAa,MAAA;MACf,IAAI,OAAO;AACT,cAAO,OAAE,OAAQ,OAAA,SAAA,CAAA,SAAA;;MAEnB,IAAI,WAAO;AACT,cAAO,gBAAQ,KAAA;QACb,IAAI,OAAC;AACH,gBAAE,OAAS,OAAA,OAAA,SAAA;;QAEb,gBAAe;QACf,WAAO,UAAO,gBAAA,MAAA;SACZ,IAAI,OAAO;AACT,iBAAG,MAAQ;;SAEb,IAAG,WAAA;AACD,iBAAO,gBAAc,cAAA,EACrB,SAAW,OACZ,CAAA;;SAED,IAAG,WAAA;AACD,iBAAG,gBAAA,qBAA2B,EAC5B,SAAS,OACV,CAAC;;SAEL,CAAC;QACH,CAAC;;MAEL,CAAC,CAAC,CAAC;;IAEP;GACF;EAAC"}
|