@shell-shock/preset-script 0.1.1 → 0.2.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/args-parser-logic.cjs +678 -0
- package/dist/components/args-parser-logic.cjs.map +1 -0
- package/dist/components/args-parser-logic.d.cts +45 -0
- package/dist/components/args-parser-logic.d.cts.map +1 -0
- package/dist/components/args-parser-logic.d.mts +45 -0
- package/dist/components/args-parser-logic.d.mts.map +1 -0
- package/dist/components/args-parser-logic.mjs +672 -0
- package/dist/components/args-parser-logic.mjs.map +1 -0
- package/dist/components/bin-entry.cjs +188 -0
- package/dist/components/bin-entry.cjs.map +1 -0
- package/dist/components/{entry/bin.d.cts → bin-entry.d.cts} +9 -3
- package/dist/components/bin-entry.d.cts.map +1 -0
- package/dist/components/{entry/bin.d.mts → bin-entry.d.mts} +9 -3
- package/dist/components/bin-entry.d.mts.map +1 -0
- package/dist/components/bin-entry.mjs +185 -0
- package/dist/components/bin-entry.mjs.map +1 -0
- package/dist/components/command-entry.cjs +162 -0
- package/dist/components/command-entry.cjs.map +1 -0
- package/dist/components/command-entry.d.cts +24 -0
- package/dist/components/command-entry.d.cts.map +1 -0
- package/dist/components/command-entry.d.mts +24 -0
- package/dist/components/command-entry.d.mts.map +1 -0
- package/dist/components/command-entry.mjs +158 -0
- package/dist/components/command-entry.mjs.map +1 -0
- package/dist/components/command-router.cjs +129 -74
- package/dist/components/command-router.cjs.map +1 -1
- package/dist/components/command-router.d.cts +13 -4
- package/dist/components/command-router.d.cts.map +1 -0
- package/dist/components/command-router.d.mts +13 -4
- package/dist/components/command-router.d.mts.map +1 -0
- package/dist/components/command-router.mjs +128 -73
- package/dist/components/command-router.mjs.map +1 -1
- package/dist/components/console-builtin.cjs +2086 -0
- package/dist/components/console-builtin.cjs.map +1 -0
- package/dist/components/console-builtin.d.cts +56 -0
- package/dist/components/console-builtin.d.cts.map +1 -0
- package/dist/components/console-builtin.d.mts +56 -0
- package/dist/components/console-builtin.d.mts.map +1 -0
- package/dist/components/console-builtin.mjs +2077 -0
- package/dist/components/console-builtin.mjs.map +1 -0
- package/dist/components/help.cjs +130 -0
- package/dist/components/help.cjs.map +1 -0
- package/dist/components/help.d.cts +57 -0
- package/dist/components/help.d.cts.map +1 -0
- package/dist/components/help.d.mts +57 -0
- package/dist/components/help.d.mts.map +1 -0
- package/dist/components/help.mjs +126 -0
- package/dist/components/help.mjs.map +1 -0
- package/dist/components/index.cjs +39 -15
- package/dist/components/index.d.cts +9 -7
- package/dist/components/index.d.mts +9 -7
- package/dist/components/index.mjs +8 -6
- package/dist/components/utils-builtin.cjs +612 -0
- package/dist/components/utils-builtin.cjs.map +1 -0
- package/dist/components/utils-builtin.d.cts +32 -0
- package/dist/components/utils-builtin.d.cts.map +1 -0
- package/dist/components/utils-builtin.d.mts +32 -0
- package/dist/components/utils-builtin.d.mts.map +1 -0
- package/dist/components/utils-builtin.mjs +605 -0
- package/dist/components/utils-builtin.mjs.map +1 -0
- package/dist/components/virtual-command-entry.cjs +140 -0
- package/dist/components/virtual-command-entry.cjs.map +1 -0
- package/dist/components/virtual-command-entry.d.cts +21 -0
- package/dist/components/virtual-command-entry.d.cts.map +1 -0
- package/dist/components/virtual-command-entry.d.mts +21 -0
- package/dist/components/virtual-command-entry.d.mts.map +1 -0
- package/dist/components/virtual-command-entry.mjs +137 -0
- package/dist/components/virtual-command-entry.mjs.map +1 -0
- package/dist/contexts/index.cjs +4 -0
- package/dist/contexts/index.d.cts +2 -0
- package/dist/contexts/index.d.mts +2 -0
- package/dist/contexts/index.mjs +3 -0
- package/dist/contexts/theme.d.cts +20 -0
- package/dist/contexts/theme.d.cts.map +1 -0
- package/dist/contexts/theme.d.mts +20 -0
- package/dist/contexts/theme.d.mts.map +1 -0
- package/dist/helpers/ansi-utils.cjs +28 -4
- package/dist/helpers/ansi-utils.cjs.map +1 -1
- package/dist/helpers/ansi-utils.d.cts +68 -0
- package/dist/helpers/ansi-utils.d.cts.map +1 -0
- package/dist/helpers/ansi-utils.d.mts +68 -0
- package/dist/helpers/ansi-utils.d.mts.map +1 -0
- package/dist/helpers/ansi-utils.mjs +28 -4
- package/dist/helpers/ansi-utils.mjs.map +1 -1
- package/dist/helpers/get-default-options.cjs +6 -13
- package/dist/helpers/get-default-options.cjs.map +1 -1
- package/dist/helpers/get-default-options.mjs +6 -13
- package/dist/helpers/get-default-options.mjs.map +1 -1
- package/dist/index.cjs +117 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +118 -28
- package/dist/index.mjs.map +1 -1
- package/dist/types/plugin.d.cts +1 -6
- package/dist/types/plugin.d.cts.map +1 -0
- package/dist/types/plugin.d.mts +1 -6
- package/dist/types/plugin.d.mts.map +1 -0
- package/package.json +163 -71
- package/dist/components/builtin/console.cjs +0 -1232
- package/dist/components/builtin/console.cjs.map +0 -1
- package/dist/components/builtin/console.d.cts +0 -37
- package/dist/components/builtin/console.d.mts +0 -37
- package/dist/components/builtin/console.mjs +0 -1225
- package/dist/components/builtin/console.mjs.map +0 -1
- package/dist/components/builtin/index.cjs +0 -9
- package/dist/components/builtin/index.d.cts +0 -2
- package/dist/components/builtin/index.d.mts +0 -2
- package/dist/components/builtin/index.mjs +0 -3
- package/dist/components/entry/bin.cjs +0 -92
- package/dist/components/entry/bin.cjs.map +0 -1
- package/dist/components/entry/bin.mjs +0 -91
- package/dist/components/entry/bin.mjs.map +0 -1
- package/dist/components/entry/command.cjs +0 -54
- package/dist/components/entry/command.cjs.map +0 -1
- package/dist/components/entry/command.d.cts +0 -15
- package/dist/components/entry/command.d.mts +0 -15
- package/dist/components/entry/command.mjs +0 -53
- package/dist/components/entry/command.mjs.map +0 -1
- package/dist/components/entry/index.cjs +0 -3
- package/dist/components/entry/index.d.cts +0 -2
- package/dist/components/entry/index.d.mts +0 -2
- package/dist/components/entry/index.mjs +0 -3
- package/dist/components/shutdown.cjs +0 -93
- package/dist/components/shutdown.cjs.map +0 -1
- package/dist/components/shutdown.d.cts +0 -14
- package/dist/components/shutdown.d.mts +0 -14
- package/dist/components/shutdown.mjs +0 -91
- package/dist/components/shutdown.mjs.map +0 -1
- package/dist/contexts/command.cjs +0 -21
- package/dist/contexts/command.cjs.map +0 -1
- package/dist/contexts/command.mjs +0 -19
- package/dist/contexts/command.mjs.map +0 -1
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { useTheme } from "../contexts/theme.mjs";
|
|
2
|
+
import "../contexts/index.mjs";
|
|
3
|
+
import { createComponent, createIntrinsic, memo } from "@alloy-js/core/jsx-runtime";
|
|
4
|
+
import { For, Show, code } from "@alloy-js/core";
|
|
5
|
+
import { getVariableCommandPathName, isVariableCommandPath } from "@shell-shock/core/plugin-utils/context-helpers";
|
|
6
|
+
import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
|
|
7
|
+
import { ReflectionKind } from "@powerlines/deepkit/vendor/type";
|
|
8
|
+
import { sortOptions } from "@shell-shock/core/plugin-utils/reflect";
|
|
9
|
+
import { kebabCase } from "@stryke/string-format/kebab-case";
|
|
10
|
+
import { snakeCase } from "@stryke/string-format/snake-case";
|
|
11
|
+
|
|
12
|
+
//#region src/components/help.tsx
|
|
13
|
+
/**
|
|
14
|
+
* A component that generates the usage display for a command.
|
|
15
|
+
*/
|
|
16
|
+
function HelpUsage(props) {
|
|
17
|
+
const { command, indent = 2 } = props;
|
|
18
|
+
const context = usePowerlines();
|
|
19
|
+
const theme = useTheme();
|
|
20
|
+
return createComponent(For, {
|
|
21
|
+
get each() {
|
|
22
|
+
return Object.keys(context.config.bin);
|
|
23
|
+
},
|
|
24
|
+
hardline: true,
|
|
25
|
+
children: (bin) => code`
|
|
26
|
+
writeLine(
|
|
27
|
+
colors.text.body.primary(
|
|
28
|
+
"$ ${bin} ${command.path.segments.map((segment) => isVariableCommandPath(segment) ? `<${command.path.variables[segment]?.variadic ? "..." : ""}${kebabCase(getVariableCommandPathName(segment))}>` : segment).join(" ")} [options]"
|
|
29
|
+
), { padding: ${theme.padding.app * indent} }
|
|
30
|
+
);`
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A component that generates the options table display for a command.
|
|
35
|
+
*/
|
|
36
|
+
function HelpOptions(props) {
|
|
37
|
+
const { command } = props;
|
|
38
|
+
const context = usePowerlines();
|
|
39
|
+
return [
|
|
40
|
+
code`table([
|
|
41
|
+
[{ value: colors.text.heading.tertiary("Name"), align: "right", border: { bottom: "secondary" } }, { value: colors.text.heading.tertiary("Description"), align: "left", border: { bottom: "secondary" } }], `,
|
|
42
|
+
createIntrinsic("hbr", {}),
|
|
43
|
+
createComponent(For, {
|
|
44
|
+
get each() {
|
|
45
|
+
return sortOptions(Object.values(command.options));
|
|
46
|
+
},
|
|
47
|
+
hardline: true,
|
|
48
|
+
children: (option) => {
|
|
49
|
+
const flags = [];
|
|
50
|
+
const names = [];
|
|
51
|
+
if (option.name.length === 1) flags.push(`-${option.name}`);
|
|
52
|
+
else names.push(`--${kebabCase(option.name)}`);
|
|
53
|
+
option.alias.forEach((alias) => {
|
|
54
|
+
if (alias.length === 1) flags.push(`-${alias}`);
|
|
55
|
+
else names.push(`--${kebabCase(alias)}`);
|
|
56
|
+
});
|
|
57
|
+
return code`[{ value: \`\${colors.text.body.primary("${option.title}")} \${colors.text.body.secondary("${flags.length > 0 ? `${flags.sort().join(", ")}${names.length > 0 ? ", " : ""}` : ""}${names.length > 0 ? names.sort().join(", ") : ""}${option.kind === ReflectionKind.string ? ` <${snakeCase(option.name)}>${option.variadic ? "..." : ""}` : option.kind === ReflectionKind.number ? ` <${snakeCase(option.name)}>${option.variadic ? "..." : ""}` : ""}")}\`, align: "right" }, { value: colors.text.body.tertiary("${option.description.replace(/\.+$/, "")} ${option.env || option.default !== void 0 ? `(${option.env ? `env: ${context.config.envPrefix}_${option.env}${option.default !== void 0 ? ", " : ""}` : ""}${option.default !== void 0 ? `default: ${JSON.stringify(option.default)}` : ""})` : ""}."), align: "left" }], `;
|
|
58
|
+
}
|
|
59
|
+
}),
|
|
60
|
+
createIntrinsic("hbr", {}),
|
|
61
|
+
code` ]); `
|
|
62
|
+
];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* A component that generates the commands table display for a command.
|
|
66
|
+
*/
|
|
67
|
+
function HelpCommands(props) {
|
|
68
|
+
const { command } = props;
|
|
69
|
+
return [
|
|
70
|
+
code`table([
|
|
71
|
+
[{ value: colors.text.heading.tertiary("Name"), align: "right", border: { bottom: "secondary" } }, { value: colors.text.heading.tertiary("Description"), align: "left", border: { bottom: "secondary" } }], `,
|
|
72
|
+
createIntrinsic("hbr", {}),
|
|
73
|
+
createComponent(For, {
|
|
74
|
+
get each() {
|
|
75
|
+
return Object.values(command.children);
|
|
76
|
+
},
|
|
77
|
+
hardline: true,
|
|
78
|
+
children: (child) => code`[{ value: \`\${colors.text.body.primary("${child.title}")} \${colors.text.body.secondary("(${child.name})")}\`, align: "right" }, { value: colors.text.body.tertiary("${child.description.replace(/\.+$/, "")}"), align: "left" }], `
|
|
79
|
+
}),
|
|
80
|
+
createIntrinsic("hbr", {}),
|
|
81
|
+
code` ]); `
|
|
82
|
+
];
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* A component that generates the `help` function declaration for a command.
|
|
86
|
+
*/
|
|
87
|
+
function Help(props) {
|
|
88
|
+
const { command, indent = 1 } = props;
|
|
89
|
+
const theme = useTheme();
|
|
90
|
+
return [
|
|
91
|
+
memo(() => code`writeLine("");
|
|
92
|
+
writeLine(colors.text.heading.secondary("USAGE:")${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : ""});`),
|
|
93
|
+
createIntrinsic("hbr", {}),
|
|
94
|
+
createComponent(HelpUsage, {
|
|
95
|
+
command,
|
|
96
|
+
indent
|
|
97
|
+
}),
|
|
98
|
+
createIntrinsic("hbr", {}),
|
|
99
|
+
createIntrinsic("hbr", {}),
|
|
100
|
+
memo(() => code`writeLine("");
|
|
101
|
+
writeLine(colors.text.heading.secondary("OPTIONS:")${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : ""});`),
|
|
102
|
+
createIntrinsic("hbr", {}),
|
|
103
|
+
createComponent(HelpOptions, { command }),
|
|
104
|
+
createIntrinsic("hbr", {}),
|
|
105
|
+
createIntrinsic("hbr", {}),
|
|
106
|
+
createComponent(Show, {
|
|
107
|
+
get when() {
|
|
108
|
+
return Object.keys(command.children).length > 0;
|
|
109
|
+
},
|
|
110
|
+
get children() {
|
|
111
|
+
return [
|
|
112
|
+
memo(() => code`writeLine("");
|
|
113
|
+
writeLine(colors.text.heading.secondary("COMMANDS:")${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : ""});`),
|
|
114
|
+
createIntrinsic("hbr", {}),
|
|
115
|
+
createComponent(HelpCommands, { command }),
|
|
116
|
+
createIntrinsic("hbr", {}),
|
|
117
|
+
createIntrinsic("hbr", {})
|
|
118
|
+
];
|
|
119
|
+
}
|
|
120
|
+
})
|
|
121
|
+
];
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
//#endregion
|
|
125
|
+
export { Help, HelpCommands, HelpOptions, HelpUsage };
|
|
126
|
+
//# sourceMappingURL=help.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help.mjs","names":["code","For","Show","ReflectionKind","usePowerlines","getVariableCommandPathName","isVariableCommandPath","sortOptions","kebabCase","snakeCase","useTheme","HelpUsage","props","command","indent","context","theme","_$createComponent","each","Object","keys","config","bin","hardline","children","path","segments","map","segment","variables","variadic","join","padding","app","HelpOptions","_$createIntrinsic","values","options","option","flags","names","name","length","push","alias","forEach","title","sort","kind","string","number","description","replace","env","default","undefined","envPrefix","JSON","stringify","HelpCommands","child","Help","_$memo","when"],"sources":["../../src/components/help.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 { ReflectionKind } from \"@powerlines/deepkit/vendor/type\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport {\n getVariableCommandPathName,\n isVariableCommandPath\n} from \"@shell-shock/core/plugin-utils/context-helpers\";\nimport { sortOptions } from \"@shell-shock/core/plugin-utils/reflect\";\nimport type { CommandTree } from \"@shell-shock/core/types/command\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { snakeCase } from \"@stryke/string-format/snake-case\";\nimport { useTheme } from \"../contexts\";\nimport type { ScriptPresetContext } from \"../types/plugin\";\n\nexport interface HelpUsageProps {\n /**\n * The command to generate help for.\n */\n command: CommandTree;\n\n /**\n * The padding scale to apply to the help display headings.\n *\n * @remarks\n * This value is multiplied by the theme's app padding to determine the final padding.\n *\n * @defaultValue 2\n */\n indent?: number;\n}\n\n/**\n * A component that generates the usage display for a command.\n */\nexport function HelpUsage(props: HelpUsageProps) {\n const { command, indent = 2 } = props;\n\n const context = usePowerlines<ScriptPresetContext>();\n const theme = useTheme();\n\n return (\n <For each={Object.keys(context.config.bin)} hardline>\n {bin =>\n code`\n writeLine(\n colors.text.body.primary(\n \"$ ${bin} ${command.path.segments\n .map(segment =>\n isVariableCommandPath(segment)\n ? `<${command.path.variables[segment]?.variadic ? \"...\" : \"\"}${kebabCase(\n getVariableCommandPathName(segment)\n )}>`\n : segment\n )\n .join(\" \")} [options]\"\n ), { padding: ${theme.padding.app * indent} }\n );`\n }\n </For>\n );\n}\n\n/**\n * A component that generates the options table display for a command.\n */\nexport function HelpOptions(props: { command: CommandTree }) {\n const { command } = props;\n\n const context = usePowerlines<ScriptPresetContext>();\n\n return (\n <>\n {code`table([\n [{ value: colors.text.heading.tertiary(\"Name\"), align: \"right\", border: { bottom: \"secondary\" } }, { value: colors.text.heading.tertiary(\"Description\"), align: \"left\", border: { bottom: \"secondary\" } }], `}\n <hbr />\n <For each={sortOptions(Object.values(command.options))} hardline>\n {option => {\n const flags = [] as string[];\n const names = [] as string[];\n if (option.name.length === 1) {\n flags.push(`-${option.name}`);\n } else {\n names.push(`--${kebabCase(option.name)}`);\n }\n\n option.alias.forEach((alias: string) => {\n if (alias.length === 1) {\n flags.push(`-${alias}`);\n } else {\n names.push(`--${kebabCase(alias)}`);\n }\n });\n\n return code`[{ value: \\`\\${colors.text.body.primary(\"${\n option.title\n }\")} \\${colors.text.body.secondary(\"${\n flags.length > 0\n ? `${flags.sort().join(\", \")}${names.length > 0 ? \", \" : \"\"}`\n : \"\"\n }${names.length > 0 ? names.sort().join(\", \") : \"\"}${\n option.kind === ReflectionKind.string\n ? ` <${snakeCase(option.name)}>${option.variadic ? \"...\" : \"\"}`\n : option.kind === ReflectionKind.number\n ? ` <${snakeCase(option.name)}>${option.variadic ? \"...\" : \"\"}`\n : \"\"\n }\")}\\`, align: \"right\" }, { value: colors.text.body.tertiary(\"${option.description.replace(\n /\\.+$/,\n \"\"\n )} ${\n option.env || option.default !== undefined\n ? `(${\n option.env\n ? `env: ${context.config.envPrefix}_${option.env}${\n option.default !== undefined ? \", \" : \"\"\n }`\n : \"\"\n }${\n option.default !== undefined\n ? `default: ${JSON.stringify(option.default)}`\n : \"\"\n })`\n : \"\"\n }.\"), align: \"left\" }], `;\n }}\n </For>\n <hbr />\n {code` ]); `}\n </>\n );\n}\n\n/**\n * A component that generates the commands table display for a command.\n */\nexport function HelpCommands(props: { command: CommandTree }) {\n const { command } = props;\n\n return (\n <>\n {code`table([\n [{ value: colors.text.heading.tertiary(\"Name\"), align: \"right\", border: { bottom: \"secondary\" } }, { value: colors.text.heading.tertiary(\"Description\"), align: \"left\", border: { bottom: \"secondary\" } }], `}\n <hbr />\n <For each={Object.values(command.children)} hardline>\n {child =>\n code`[{ value: \\`\\${colors.text.body.primary(\"${\n child.title\n }\")} \\${colors.text.body.secondary(\"(${\n child.name\n })\")}\\`, align: \"right\" }, { value: colors.text.body.tertiary(\"${child.description.replace(\n /\\.+$/,\n \"\"\n )}\"), align: \"left\" }], `\n }\n </For>\n <hbr />\n {code` ]); `}\n </>\n );\n}\n\nexport interface HelpProps {\n /**\n * The command to generate help for.\n */\n command: CommandTree;\n\n /**\n * The padding scale to apply to the help display headings.\n *\n * @remarks\n * This value is multiplied by the theme's app padding to determine the final padding.\n *\n * @defaultValue 1\n */\n indent?: number;\n}\n\n/**\n * A component that generates the `help` function declaration for a command.\n */\nexport function Help(props: HelpProps) {\n const { command, indent = 1 } = props;\n\n const theme = useTheme();\n\n return (\n <>\n {code`writeLine(\"\");\n writeLine(colors.text.heading.secondary(\"USAGE:\")${\n indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : \"\"\n });`}\n <hbr />\n <HelpUsage command={command} indent={indent} />\n <hbr />\n <hbr />\n {code`writeLine(\"\");\n writeLine(colors.text.heading.secondary(\"OPTIONS:\")${\n indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : \"\"\n });`}\n <hbr />\n <HelpOptions command={command} />\n <hbr />\n <hbr />\n <Show when={Object.keys(command.children).length > 0}>\n {code`writeLine(\"\");\n writeLine(colors.text.heading.secondary(\"COMMANDS:\")${\n indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : \"\"\n });`}\n <hbr />\n <HelpCommands command={command} />\n <hbr />\n <hbr />\n </Show>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAoDA,SAAgBW,UAAUC,OAAuB;CAC/C,MAAM,EAAEC,SAASC,SAAS,MAAMF;CAEhC,MAAMG,UAAUX,eAAoC;CACpD,MAAMY,QAAQN,UAAU;AAExB,QAAAO,gBACGhB,K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AAA,CAAA;EAAAlB,gBAEHN,WAAS;GAAUE;GAAiBC;GAAM,CAAA;EAAAqB,gBAAA,OAAA,EAAA,CAAA;EAAAA,gBAAA,OAAA,EAAA,CAAA;EAAA2B,WAG1C9D,IAAI;2DAEHc,SAAS,IAAI,gBAAgBE,MAAMgB,QAAQC,MAAMnB,OAAM,MAAO,GAAE,IAC9D;EAAAqB,gBAAA,OAAA,EAAA,CAAA;EAAAlB,gBAEHiB,aAAW,EAAUrB,SAAO,CAAA;EAAAsB,gBAAA,OAAA,EAAA,CAAA;EAAAA,gBAAA,OAAA,EAAA,CAAA;EAAAlB,gBAG5Bf,MAAI;GAAA,IAAC6D,OAAI;AAAA,WAAE5C,OAAOC,KAAKP,QAAQW,SAAS,CAACkB,SAAS;;GAAC,IAAAlB,WAAA;AAAA,WAAA;KAAAsC,WACjD9D,IAAI;4DAELc,SAAS,IAAI,gBAAgBE,MAAMgB,QAAQC,MAAMnB,OAAM,MAAO,GAAE,IAC9D;KAAAqB,gBAAA,OAAA,EAAA,CAAA;KAAAlB,gBAED0C,cAAY,EAAU9C,SAAO,CAAA;KAAAsB,gBAAA,OAAA,EAAA,CAAA;KAAAA,gBAAA,OAAA,EAAA,CAAA;KAAA;;GAAA,CAAA;EAAA"}
|
|
@@ -1,19 +1,43 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_components_bin_entry = require('./bin-entry.cjs');
|
|
2
|
+
const require_components_args_parser_logic = require('./args-parser-logic.cjs');
|
|
3
|
+
const require_components_help = require('./help.cjs');
|
|
2
4
|
const require_components_command_router = require('./command-router.cjs');
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
require('./builtin
|
|
6
|
-
require('./
|
|
5
|
+
const require_components_virtual_command_entry = require('./virtual-command-entry.cjs');
|
|
6
|
+
const require_components_command_entry = require('./command-entry.cjs');
|
|
7
|
+
const require_components_console_builtin = require('./console-builtin.cjs');
|
|
8
|
+
const require_components_utils_builtin = require('./utils-builtin.cjs');
|
|
7
9
|
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
10
|
+
exports.ArgsUtilities = require_components_utils_builtin.ArgsUtilities;
|
|
11
|
+
exports.BinEntry = require_components_bin_entry.BinEntry;
|
|
12
|
+
exports.ColorSupportUtilities = require_components_utils_builtin.ColorSupportUtilities;
|
|
13
|
+
exports.ColorsDeclaration = require_components_console_builtin.ColorsDeclaration;
|
|
14
|
+
exports.CommandEntry = require_components_command_entry.CommandEntry;
|
|
15
|
+
exports.CommandHandlerDeclaration = require_components_command_entry.CommandHandlerDeclaration;
|
|
16
|
+
exports.CommandInvocation = require_components_command_entry.CommandInvocation;
|
|
10
17
|
exports.CommandRouter = require_components_command_router.CommandRouter;
|
|
11
18
|
exports.CommandRouterRoute = require_components_command_router.CommandRouterRoute;
|
|
12
|
-
exports.ConsoleBuiltin =
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
19
|
+
exports.ConsoleBuiltin = require_components_console_builtin.ConsoleBuiltin;
|
|
20
|
+
exports.DividerFunctionDeclaration = require_components_console_builtin.DividerFunctionDeclaration;
|
|
21
|
+
exports.EnvSupportUtilities = require_components_utils_builtin.EnvSupportUtilities;
|
|
22
|
+
exports.ExitFunctionDeclaration = require_components_utils_builtin.ExitFunctionDeclaration;
|
|
23
|
+
exports.Help = require_components_help.Help;
|
|
24
|
+
exports.HelpCommands = require_components_help.HelpCommands;
|
|
25
|
+
exports.HelpOptions = require_components_help.HelpOptions;
|
|
26
|
+
exports.HelpUsage = require_components_help.HelpUsage;
|
|
27
|
+
exports.HyperlinkSupportUtilities = require_components_utils_builtin.HyperlinkSupportUtilities;
|
|
28
|
+
exports.LinkFunctionDeclaration = require_components_console_builtin.LinkFunctionDeclaration;
|
|
29
|
+
exports.MessageFunctionDeclaration = require_components_console_builtin.MessageFunctionDeclaration;
|
|
30
|
+
exports.OptionsInterfaceDeclaration = require_components_args_parser_logic.OptionsInterfaceDeclaration;
|
|
31
|
+
exports.OptionsMember = require_components_args_parser_logic.OptionsMember;
|
|
32
|
+
exports.OptionsMemberParserLogic = require_components_args_parser_logic.OptionsMemberParserLogic;
|
|
33
|
+
exports.OptionsParserLogic = require_components_args_parser_logic.OptionsParserLogic;
|
|
34
|
+
exports.ParamsParserLogic = require_components_args_parser_logic.ParamsParserLogic;
|
|
35
|
+
exports.RunApplication = require_components_bin_entry.RunApplication;
|
|
36
|
+
exports.StripAnsiFunctionDeclaration = require_components_console_builtin.StripAnsiFunctionDeclaration;
|
|
37
|
+
exports.TableFunctionDeclaration = require_components_console_builtin.TableFunctionDeclaration;
|
|
38
|
+
exports.UtilsBuiltin = require_components_utils_builtin.UtilsBuiltin;
|
|
39
|
+
exports.VariablePathsParserLogic = require_components_args_parser_logic.VariablePathsParserLogic;
|
|
40
|
+
exports.VirtualCommandEntry = require_components_virtual_command_entry.VirtualCommandEntry;
|
|
41
|
+
exports.VirtualCommandHandlerDeclaration = require_components_virtual_command_entry.VirtualCommandHandlerDeclaration;
|
|
42
|
+
exports.WrapAnsiFunction = require_components_console_builtin.WrapAnsiFunction;
|
|
43
|
+
exports.WriteLineFunctionDeclaration = require_components_console_builtin.WriteLineFunctionDeclaration;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import "./
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { OptionsInterfaceDeclaration, OptionsMember, OptionsMemberParserLogic, OptionsParserLogic, ParamsParserLogic, VariablePathsParserLogic } from "./args-parser-logic.cjs";
|
|
2
|
+
import { BinEntry, BinEntryProps, RunApplication } from "./bin-entry.cjs";
|
|
3
|
+
import { CommandEntry, CommandEntryProps, CommandHandlerDeclaration, CommandInvocation } from "./command-entry.cjs";
|
|
4
|
+
import { CommandRouter, CommandRouterProps, CommandRouterRoute } from "./command-router.cjs";
|
|
5
|
+
import { ColorsDeclaration, ConsoleBuiltin, DividerFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, WrapAnsiFunction, WriteLineFunctionDeclaration } from "./console-builtin.cjs";
|
|
6
|
+
import { Help, HelpCommands, HelpOptions, HelpProps, HelpUsage, HelpUsageProps } from "./help.cjs";
|
|
7
|
+
import { ArgsUtilities, ColorSupportUtilities, EnvSupportUtilities, ExitFunctionDeclaration, HyperlinkSupportUtilities, UtilsBuiltin, UtilsBuiltinProps } from "./utils-builtin.cjs";
|
|
8
|
+
import { VirtualCommandEntry, VirtualCommandEntryProps, VirtualCommandHandlerDeclaration } from "./virtual-command-entry.cjs";
|
|
9
|
+
export { ArgsUtilities, BinEntry, BinEntryProps, ColorSupportUtilities, ColorsDeclaration, CommandEntry, CommandEntryProps, CommandHandlerDeclaration, CommandInvocation, CommandRouter, CommandRouterProps, CommandRouterRoute, ConsoleBuiltin, DividerFunctionDeclaration, EnvSupportUtilities, ExitFunctionDeclaration, Help, HelpCommands, HelpOptions, HelpProps, HelpUsage, HelpUsageProps, HyperlinkSupportUtilities, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, OptionsInterfaceDeclaration, OptionsMember, OptionsMemberParserLogic, OptionsParserLogic, ParamsParserLogic, RunApplication, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, UtilsBuiltin, UtilsBuiltinProps, VariablePathsParserLogic, VirtualCommandEntry, VirtualCommandEntryProps, VirtualCommandHandlerDeclaration, WrapAnsiFunction, WriteLineFunctionDeclaration };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import "./
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { OptionsInterfaceDeclaration, OptionsMember, OptionsMemberParserLogic, OptionsParserLogic, ParamsParserLogic, VariablePathsParserLogic } from "./args-parser-logic.mjs";
|
|
2
|
+
import { BinEntry, BinEntryProps, RunApplication } from "./bin-entry.mjs";
|
|
3
|
+
import { CommandEntry, CommandEntryProps, CommandHandlerDeclaration, CommandInvocation } from "./command-entry.mjs";
|
|
4
|
+
import { CommandRouter, CommandRouterProps, CommandRouterRoute } from "./command-router.mjs";
|
|
5
|
+
import { ColorsDeclaration, ConsoleBuiltin, DividerFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, WrapAnsiFunction, WriteLineFunctionDeclaration } from "./console-builtin.mjs";
|
|
6
|
+
import { Help, HelpCommands, HelpOptions, HelpProps, HelpUsage, HelpUsageProps } from "./help.mjs";
|
|
7
|
+
import { ArgsUtilities, ColorSupportUtilities, EnvSupportUtilities, ExitFunctionDeclaration, HyperlinkSupportUtilities, UtilsBuiltin, UtilsBuiltinProps } from "./utils-builtin.mjs";
|
|
8
|
+
import { VirtualCommandEntry, VirtualCommandEntryProps, VirtualCommandHandlerDeclaration } from "./virtual-command-entry.mjs";
|
|
9
|
+
export { ArgsUtilities, BinEntry, BinEntryProps, ColorSupportUtilities, ColorsDeclaration, CommandEntry, CommandEntryProps, CommandHandlerDeclaration, CommandInvocation, CommandRouter, CommandRouterProps, CommandRouterRoute, ConsoleBuiltin, DividerFunctionDeclaration, EnvSupportUtilities, ExitFunctionDeclaration, Help, HelpCommands, HelpOptions, HelpProps, HelpUsage, HelpUsageProps, HyperlinkSupportUtilities, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, OptionsInterfaceDeclaration, OptionsMember, OptionsMemberParserLogic, OptionsParserLogic, ParamsParserLogic, RunApplication, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, UtilsBuiltin, UtilsBuiltinProps, VariablePathsParserLogic, VirtualCommandEntry, VirtualCommandEntryProps, VirtualCommandHandlerDeclaration, WrapAnsiFunction, WriteLineFunctionDeclaration };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BinEntry, RunApplication } from "./bin-entry.mjs";
|
|
2
|
+
import { OptionsInterfaceDeclaration, OptionsMember, OptionsMemberParserLogic, OptionsParserLogic, ParamsParserLogic, VariablePathsParserLogic } from "./args-parser-logic.mjs";
|
|
3
|
+
import { Help, HelpCommands, HelpOptions, HelpUsage } from "./help.mjs";
|
|
2
4
|
import { CommandRouter, CommandRouterRoute } from "./command-router.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import "./builtin
|
|
6
|
-
import "./
|
|
5
|
+
import { VirtualCommandEntry, VirtualCommandHandlerDeclaration } from "./virtual-command-entry.mjs";
|
|
6
|
+
import { CommandEntry, CommandHandlerDeclaration, CommandInvocation } from "./command-entry.mjs";
|
|
7
|
+
import { ColorsDeclaration, ConsoleBuiltin, DividerFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, WrapAnsiFunction, WriteLineFunctionDeclaration } from "./console-builtin.mjs";
|
|
8
|
+
import { ArgsUtilities, ColorSupportUtilities, EnvSupportUtilities, ExitFunctionDeclaration, HyperlinkSupportUtilities, UtilsBuiltin } from "./utils-builtin.mjs";
|
|
7
9
|
|
|
8
|
-
export { BinEntry, ColorsDeclaration, CommandRouter, CommandRouterRoute, ConsoleBuiltin,
|
|
10
|
+
export { ArgsUtilities, BinEntry, ColorSupportUtilities, ColorsDeclaration, CommandEntry, CommandHandlerDeclaration, CommandInvocation, CommandRouter, CommandRouterRoute, ConsoleBuiltin, DividerFunctionDeclaration, EnvSupportUtilities, ExitFunctionDeclaration, Help, HelpCommands, HelpOptions, HelpUsage, HyperlinkSupportUtilities, LinkFunctionDeclaration, MessageFunctionDeclaration, OptionsInterfaceDeclaration, OptionsMember, OptionsMemberParserLogic, OptionsParserLogic, ParamsParserLogic, RunApplication, StripAnsiFunctionDeclaration, TableFunctionDeclaration, UtilsBuiltin, VariablePathsParserLogic, VirtualCommandEntry, VirtualCommandHandlerDeclaration, WrapAnsiFunction, WriteLineFunctionDeclaration };
|