@shell-shock/preset-script 0.6.27 → 0.6.29
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/bin-entry.cjs +6 -5
- package/dist/components/bin-entry.cjs.map +1 -1
- package/dist/components/bin-entry.mjs +5 -4
- package/dist/components/bin-entry.mjs.map +1 -1
- package/dist/components/command-entry.cjs +9 -9
- package/dist/components/command-entry.cjs.map +1 -1
- package/dist/components/command-entry.d.cts.map +1 -1
- package/dist/components/command-entry.d.mts +1 -1
- package/dist/components/command-entry.d.mts.map +1 -1
- package/dist/components/command-entry.mjs +8 -8
- package/dist/components/command-entry.mjs.map +1 -1
- package/dist/components/command-router.cjs +1 -1
- package/dist/components/command-router.mjs +1 -1
- package/dist/components/exit-function-declaration.cjs +1 -1
- package/dist/components/exit-function-declaration.mjs +1 -1
- package/dist/components/index.cjs +0 -3
- package/dist/components/index.d.cts +1 -2
- package/dist/components/index.d.mts +1 -2
- package/dist/components/index.mjs +1 -2
- package/dist/components/virtual-command-entry.cjs +19 -23
- 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.cts.map +1 -1
- package/dist/components/virtual-command-entry.d.mts.map +1 -1
- package/dist/components/virtual-command-entry.mjs +19 -23
- package/dist/components/virtual-command-entry.mjs.map +1 -1
- package/dist/index.cjs +8 -9
- 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 +6 -9
- package/dist/index.mjs.map +1 -1
- package/dist/types/plugin.d.cts +6 -5
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +7 -6
- package/dist/types/plugin.d.mts.map +1 -1
- package/package.json +12 -24
- package/dist/components/banner-function-declaration.cjs +0 -110
- package/dist/components/banner-function-declaration.cjs.map +0 -1
- package/dist/components/banner-function-declaration.d.cts +0 -38
- package/dist/components/banner-function-declaration.d.cts.map +0 -1
- package/dist/components/banner-function-declaration.d.mts +0 -38
- package/dist/components/banner-function-declaration.d.mts.map +0 -1
- package/dist/components/banner-function-declaration.mjs +0 -107
- package/dist/components/banner-function-declaration.mjs.map +0 -1
- package/dist/plugin-help/dist/components/display.cjs +0 -260
- package/dist/plugin-help/dist/components/display.cjs.map +0 -1
- package/dist/plugin-help/dist/components/display.mjs +0 -254
- package/dist/plugin-help/dist/components/display.mjs.map +0 -1
- package/dist/plugin-help/dist/components/help-builtin.cjs +0 -86
- package/dist/plugin-help/dist/components/help-builtin.cjs.map +0 -1
- package/dist/plugin-help/dist/components/help-builtin.mjs +0 -84
- package/dist/plugin-help/dist/components/help-builtin.mjs.map +0 -1
- package/dist/plugin-help/dist/components/help-command.cjs +0 -97
- package/dist/plugin-help/dist/components/help-command.cjs.map +0 -1
- package/dist/plugin-help/dist/components/help-command.mjs +0 -96
- package/dist/plugin-help/dist/components/help-command.mjs.map +0 -1
- package/dist/plugin-help/dist/components/index.cjs +0 -3
- package/dist/plugin-help/dist/components/index.mjs +0 -5
- package/dist/plugin-help/dist/index.cjs +0 -104
- package/dist/plugin-help/dist/index.cjs.map +0 -1
- package/dist/plugin-help/dist/index.d.cts +0 -2
- package/dist/plugin-help/dist/index.d.mts +0 -2
- package/dist/plugin-help/dist/index.mjs +0 -100
- package/dist/plugin-help/dist/index.mjs.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/constant-case.cjs +0 -18
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/constant-case.cjs.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/constant-case.mjs +0 -17
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/constant-case.mjs.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/get-words.cjs +0 -39
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/get-words.cjs.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/get-words.mjs +0 -38
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/get-words.mjs.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/kebab-case.cjs +0 -34
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/kebab-case.cjs.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/kebab-case.mjs +0 -34
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/kebab-case.mjs.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/snake-case.cjs +0 -41
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/snake-case.cjs.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/snake-case.mjs +0 -41
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/snake-case.mjs.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/upper-case-first.cjs +0 -18
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/upper-case-first.cjs.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/upper-case-first.mjs +0 -17
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/upper-case-first.mjs.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-empty.cjs +0 -21
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-empty.cjs.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-empty.mjs +0 -21
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-empty.mjs.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-null.cjs +0 -13
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-null.cjs.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-null.mjs +0 -12
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-null.mjs.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set-string.cjs +0 -21
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set-string.cjs.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set-string.mjs +0 -21
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set-string.mjs.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set.cjs +0 -20
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set.cjs.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set.mjs +0 -20
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set.mjs.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-string.cjs +0 -13
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-string.cjs.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-string.mjs +0 -12
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-string.mjs.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-undefined.cjs +0 -9
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-undefined.cjs.map +0 -1
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-undefined.mjs +0 -8
- package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-undefined.mjs.map +0 -1
- package/dist/plugin-help/dist/types/plugin.d.cts +0 -62
- package/dist/plugin-help/dist/types/plugin.d.cts.map +0 -1
- package/dist/plugin-help/dist/types/plugin.d.mts +0 -62
- package/dist/plugin-help/dist/types/plugin.d.mts.map +0 -1
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
-
const require_components_banner_function_declaration = require('./banner-function-declaration.cjs');
|
|
4
3
|
const require_components_command_router = require('./command-router.cjs');
|
|
5
4
|
const require_components_command_entry = require('./command-entry.cjs');
|
|
6
5
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
7
6
|
let _alloy_js_core = require("@alloy-js/core");
|
|
8
7
|
let _alloy_js_typescript = require("@alloy-js/typescript");
|
|
9
8
|
let _powerlines_plugin_alloy_core_components = require("@powerlines/plugin-alloy/core/components");
|
|
10
|
-
let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
|
|
11
9
|
let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
|
|
10
|
+
let _powerlines_plugin_alloy_typescript_components_tsdoc = require("@powerlines/plugin-alloy/typescript/components/tsdoc");
|
|
11
|
+
let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
|
|
12
|
+
let _stryke_string_format_pascal_case = require("@stryke/string-format/pascal-case");
|
|
12
13
|
let defu = require("defu");
|
|
13
14
|
defu = require_runtime.__toESM(defu);
|
|
14
|
-
let _powerlines_plugin_alloy_typescript_components_tsdoc = require("@powerlines/plugin-alloy/typescript/components/tsdoc");
|
|
15
15
|
let _stryke_path_join = require("@stryke/path/join");
|
|
16
|
-
let _stryke_string_format_pascal_case = require("@stryke/string-format/pascal-case");
|
|
17
16
|
let _stryke_string_format_constant_case = require("@stryke/string-format/constant-case");
|
|
18
17
|
let _powerlines_plugin_alloy_typescript_components_typescript_file = require("@powerlines/plugin-alloy/typescript/components/typescript-file");
|
|
19
18
|
|
|
@@ -106,28 +105,25 @@ function VirtualCommandEntry(props) {
|
|
|
106
105
|
"isUnicodeSupported",
|
|
107
106
|
"findSuggestions"
|
|
108
107
|
],
|
|
109
|
-
[(0, _stryke_path_join.joinPaths)("help", ...command.segments.filter((segment) => !(0, _shell_shock_core_plugin_utils.isDynamicPathSegment)(segment)))]: ["showHelp"]
|
|
108
|
+
[(0, _stryke_path_join.joinPaths)("help", ...command.segments.filter((segment) => !(0, _shell_shock_core_plugin_utils.isDynamicPathSegment)(segment)))]: ["showHelp"],
|
|
109
|
+
[(0, _stryke_path_join.joinPaths)("banner", ...command.segments.filter((segment) => !(0, _shell_shock_core_plugin_utils.isDynamicPathSegment)(segment)))]: ["showBanner"]
|
|
110
110
|
});
|
|
111
111
|
},
|
|
112
112
|
get children() {
|
|
113
|
-
return [
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
})
|
|
130
|
-
];
|
|
113
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components.Spacing, {}), (0, _alloy_js_core_jsx_runtime.createComponent)(VirtualCommandHandlerDeclaration, {
|
|
114
|
+
command,
|
|
115
|
+
banner: _alloy_js_core.code`await showBanner(); `,
|
|
116
|
+
get children() {
|
|
117
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_command_router.CommandRouter, {
|
|
118
|
+
get segments() {
|
|
119
|
+
return command.segments;
|
|
120
|
+
},
|
|
121
|
+
get commands() {
|
|
122
|
+
return command.children;
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
})];
|
|
131
127
|
}
|
|
132
128
|
})), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
|
|
133
129
|
get each() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtual-command-entry.cjs","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 type { Children } from \"@alloy-js/core\";\nimport { code, computed, For, Show } from \"@alloy-js/core\";\nimport { FunctionDeclaration } from \"@alloy-js/typescript\";\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 {\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 getDynamicPathSegmentName,\n isDynamicPathSegment\n} from \"@shell-shock/core/plugin-utils\";\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 {
|
|
1
|
+
{"version":3,"file":"virtual-command-entry.cjs","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 type { Children } from \"@alloy-js/core\";\nimport { code, computed, For, Show } from \"@alloy-js/core\";\nimport { FunctionDeclaration } from \"@alloy-js/typescript\";\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 {\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 getDynamicPathSegmentName,\n isDynamicPathSegment\n} from \"@shell-shock/core/plugin-utils\";\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\";\n\nexport interface VirtualCommandHandlerDeclarationProps {\n command: CommandTree;\n banner?: Children;\n children?: Children;\n}\n\n/**\n * A component that generates the `handler` function declaration for a command.\n */\nexport function VirtualCommandHandlerDeclaration(\n props: VirtualCommandHandlerDeclarationProps\n) {\n const { command, children, banner } = props;\n\n const context = usePowerlines<ScriptPresetContext>();\n\n return (\n <>\n <TSDoc\n heading={`The ${command.title} (${getAppBin(context)} ${command.segments\n .map(segment =>\n isDynamicPathSegment(segment)\n ? `[${constantCase(getDynamicPathSegmentName(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: \"useArgs()\" }]}>\n <Spacing />\n {children}\n <Spacing />\n <Show when={Boolean(banner)}>{banner}</Show>\n <Spacing />\n {code`return showHelp(); `}\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.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: [\"warn\", \"error\", \"colors\", \"writeLine\"],\n utils: [\n \"useApp\",\n \"useArgs\",\n \"hasFlag\",\n \"isMinimal\",\n \"isUnicodeSupported\",\n \"findSuggestions\"\n ],\n [joinPaths(\n \"help\",\n ...command.segments.filter(\n segment => !isDynamicPathSegment(segment)\n )\n )]: [\"showHelp\"],\n [joinPaths(\n \"banner\",\n ...command.segments.filter(\n segment => !isDynamicPathSegment(segment)\n )\n )]: [\"showBanner\"]\n })}>\n <Spacing />\n <VirtualCommandHandlerDeclaration\n command={command}\n banner={code`await showBanner(); `}>\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":";;;;;;;;;;;;;;;;;;;;;;AA8CA,SAAgB,iCAAC,OAAsC;CACrD,MAAA,EACA,SACA,UACF;CAEE,MAAA,6EAAA;AACA,QAAG,iDAAe,4DAAe;EACjC,IAAA,UAAA;AACI,UAAC,OAAS,QAAA,MAAA,kDAAgC,QAAA,CAAA,GAAA,QAAA,SAAA,KAAA,qEAAA,QAAA,GAAA,wHAAA,QAAA,CAAA,CAAA,KAAA,QAAA,CAAA,KAAA,IAAA,CAAA;;EAE9C,IAAA,WAAA;AACA,UAAQ;oDAAmB,mEAAgB;AAErC,YAAS,GAAC,QAAA,YAAc,QAAA,QAAsB,GAAA,CAAA;OAEpD,CAAM;oDAAC,OAAA,EAAA,CAAA;oDAAA,iEAAA,EACJ,IAAA,WAAA;AACE,YAAA,QAAA;OAEA,CAAC;oDAAgB,iEAAA;KAChB,MAAI;KACJ,UAAU;KACX,CAAC;IAAC;;EAEN,CAAC,kDAAmB,0CAAkB;EACrC,UAAK;EACL,OAAK;EACL,MAAK;EACL,YAAK,CAAA;GACH,MAAE;GACF,MAAC;GACD,SAAE;GACH,CAAC;EACF,IAAI,WAAM;AACR,UAAE;oDAAsB,kDAAW,EAAE,CAAC;IAAA;oDAA8B,kDAAK,EAAA,CAAA;oDAAA,qBAAA;KACvE,IAAC,OAAS;AACT,aAAQ,QAAA,OAAA;;KAET,UAAU;KACX,CAAC;oDAAU,kDAAA,EAAA,CAAA;IAAA,mBAAA;IAAA;;EAEf,CAAC,CAAC;;;;;AASL,SAAW,oBAAW,OAAA;CACtB,MAAA,WAEE,SACC,gBACD,GAAA,SACI;CACJ,MAAM,6EAA8C;;AAEpD,QAAM,iDAAU,0HAAoC,MAAA;EACpD,IAAM,OAAA;AACJ,UAAS,SAAA;;EAET,IAAE,UAAQ;AACR,4BAAU,WAAY,EAAA,EAAA,OAAA,QAAoB,QAAQ,SAAC,CAAA,QAAA,GAAA,WAAA,MAAA,UAAA,CAAA,QAAA,KAAA,CAAA,MAAA,WAAA;AACjD,QAAC,KAAQ,MAAC,UAAA,CAAA;KACX,MAAQ;KACX,OAAA,2DAAA,KAAA;KACD,CAAA;;MAEM,EAAA,CAAA,CAAA;;EAEL,IAAG,iBAAA;AACD,4BAAU,kBAAA,EAAA,EAAA;IACR,KAAK,CAAC,iBAAc,UAAA;IACpB,SAAS;KAAA;KAAI;KAAA;KAAA;KAAA;IACb,OAAE;KAAA;KAAa;KAAA;KAAA;KAAA;KAAA;KAAA;sCACN,QAAQ,GAAA,QAAQ,SAAQ,QAAA,YAAA,0DAAA,QAAA,CAAA,CAAA,GAAA,CAAA,WAAA;sCACtB,UAAU,GAAG,QAAQ,SAAC,QAAS,YAAA,0DAAA,QAAA,CAAA,CAAA,GAAA,CAAA,aAAA;IAC3C,CAAC;;EAEJ,IAAI,WAAU;AACZ,UAAO,iDAAE,kDAAA,EAAA,CAAA,kDAAA,kCAAA;;IAEP,QAAM,mBAAM;IACZ,IAAI,WAAS;AACZ,4DAAA,iDAAA;MACD,IAAA,WAAgB;AACV,cAAG,QAAA;;MAEP,IAAM,WAAC;AACJ,cAAO,QAAA;;MAET,CAAC;;IAEL,CAAC,CAAC;;EAEN,CAAC,CAAC,kDAAM,oBAAA;EACP,IAAI,OAAG;AACL,UAAO,OAAK,OAAA,QAAA,SAAA;;EAEd,WAAU,0DAAY,qBAAqB;GACzC,IAAI,OAAE;AACJ,WAAO,MAAC;;GAEV,IAAI,WAAU;AACZ,2DAAwB,+CAAM,EAC5B,SAAI,OACL,CAAC;;GAEJ,IAAI,WAAC;AACH,2DAAU,qBAAA,EACT,SAAA,OACA,CAAC;;GAEL,CAAC;EACH,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Children } 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
|
interface VirtualCommandHandlerDeclarationProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtual-command-entry.d.cts","names":[],"sources":["../../src/components/virtual-command-entry.tsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"virtual-command-entry.d.cts","names":[],"sources":["../../src/components/virtual-command-entry.tsx"],"mappings":";;;;;UA8CiB,qCAAA;EACf,OAAA,EAAS,WAAA;EACT,MAAA,GAAS,QAAA;EACT,QAAA,GAAW,QAAA;AAAA;;;;iBAMG,gCAAA,CACd,KAAA,EAAO,qCAAA,GAAqC,QAAA;AAAA,UAqC7B,wBAAA,SAAiC,IAAA,CAChD,cAAA;EAGA,OAAA,EAAS,WAAA;AAAA;;;;iBAMK,mBAAA,CAAoB,KAAA,EAAO,wBAAA,GAAwB,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtual-command-entry.d.mts","names":[],"sources":["../../src/components/virtual-command-entry.tsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"virtual-command-entry.d.mts","names":[],"sources":["../../src/components/virtual-command-entry.tsx"],"mappings":";;;;;UA8CiB,qCAAA;EACf,OAAA,EAAS,WAAA;EACT,MAAA,GAAS,QAAA;EACT,QAAA,GAAW,QAAA;AAAA;;;;iBAMG,gCAAA,CACd,KAAA,EAAO,qCAAA,GAAqC,QAAA;AAAA,UAqC7B,wBAAA,SAAiC,IAAA,CAChD,cAAA;EAGA,OAAA,EAAS,WAAA;AAAA;;;;iBAMK,mBAAA,CAAoB,KAAA,EAAO,wBAAA,GAAwB,QAAA"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { BannerFunctionDeclaration } from "./banner-function-declaration.mjs";
|
|
2
1
|
import { CommandRouter } from "./command-router.mjs";
|
|
3
2
|
import { CommandEntry } from "./command-entry.mjs";
|
|
4
3
|
import { createComponent, createIntrinsic, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
5
4
|
import { For, Show, code, computed } from "@alloy-js/core";
|
|
6
5
|
import { FunctionDeclaration } from "@alloy-js/typescript";
|
|
7
6
|
import { Spacing } from "@powerlines/plugin-alloy/core/components";
|
|
8
|
-
import { getAppBin, getDynamicPathSegmentName, isDynamicPathSegment } from "@shell-shock/core/plugin-utils";
|
|
9
7
|
import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
|
|
10
|
-
import defu from "defu";
|
|
11
8
|
import { TSDoc, TSDocParam, TSDocRemarks, TSDocTitle } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
|
|
12
|
-
import {
|
|
9
|
+
import { getAppBin, getDynamicPathSegmentName, isDynamicPathSegment } from "@shell-shock/core/plugin-utils";
|
|
13
10
|
import { pascalCase } from "@stryke/string-format/pascal-case";
|
|
11
|
+
import defu from "defu";
|
|
12
|
+
import { joinPaths } from "@stryke/path/join";
|
|
14
13
|
import { constantCase } from "@stryke/string-format/constant-case";
|
|
15
14
|
import { TypescriptFile } from "@powerlines/plugin-alloy/typescript/components/typescript-file";
|
|
16
15
|
|
|
@@ -103,28 +102,25 @@ function VirtualCommandEntry(props) {
|
|
|
103
102
|
"isUnicodeSupported",
|
|
104
103
|
"findSuggestions"
|
|
105
104
|
],
|
|
106
|
-
[joinPaths("help", ...command.segments.filter((segment) => !isDynamicPathSegment(segment)))]: ["showHelp"]
|
|
105
|
+
[joinPaths("help", ...command.segments.filter((segment) => !isDynamicPathSegment(segment)))]: ["showHelp"],
|
|
106
|
+
[joinPaths("banner", ...command.segments.filter((segment) => !isDynamicPathSegment(segment)))]: ["showBanner"]
|
|
107
107
|
});
|
|
108
108
|
},
|
|
109
109
|
get children() {
|
|
110
|
-
return [
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
})
|
|
127
|
-
];
|
|
110
|
+
return [createComponent(Spacing, {}), createComponent(VirtualCommandHandlerDeclaration, {
|
|
111
|
+
command,
|
|
112
|
+
banner: code`await showBanner(); `,
|
|
113
|
+
get children() {
|
|
114
|
+
return createComponent(CommandRouter, {
|
|
115
|
+
get segments() {
|
|
116
|
+
return command.segments;
|
|
117
|
+
},
|
|
118
|
+
get commands() {
|
|
119
|
+
return command.children;
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
})];
|
|
128
124
|
}
|
|
129
125
|
})), createComponent(For, {
|
|
130
126
|
get each() {
|
|
@@ -1 +1 @@
|
|
|
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 type { Children } from \"@alloy-js/core\";\nimport { code, computed, For, Show } from \"@alloy-js/core\";\nimport { FunctionDeclaration } from \"@alloy-js/typescript\";\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 {\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 getDynamicPathSegmentName,\n isDynamicPathSegment\n} from \"@shell-shock/core/plugin-utils\";\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 {
|
|
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 type { Children } from \"@alloy-js/core\";\nimport { code, computed, For, Show } from \"@alloy-js/core\";\nimport { FunctionDeclaration } from \"@alloy-js/typescript\";\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 {\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 getDynamicPathSegmentName,\n isDynamicPathSegment\n} from \"@shell-shock/core/plugin-utils\";\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\";\n\nexport interface VirtualCommandHandlerDeclarationProps {\n command: CommandTree;\n banner?: Children;\n children?: Children;\n}\n\n/**\n * A component that generates the `handler` function declaration for a command.\n */\nexport function VirtualCommandHandlerDeclaration(\n props: VirtualCommandHandlerDeclarationProps\n) {\n const { command, children, banner } = props;\n\n const context = usePowerlines<ScriptPresetContext>();\n\n return (\n <>\n <TSDoc\n heading={`The ${command.title} (${getAppBin(context)} ${command.segments\n .map(segment =>\n isDynamicPathSegment(segment)\n ? `[${constantCase(getDynamicPathSegmentName(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: \"useArgs()\" }]}>\n <Spacing />\n {children}\n <Spacing />\n <Show when={Boolean(banner)}>{banner}</Show>\n <Spacing />\n {code`return showHelp(); `}\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.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: [\"warn\", \"error\", \"colors\", \"writeLine\"],\n utils: [\n \"useApp\",\n \"useArgs\",\n \"hasFlag\",\n \"isMinimal\",\n \"isUnicodeSupported\",\n \"findSuggestions\"\n ],\n [joinPaths(\n \"help\",\n ...command.segments.filter(\n segment => !isDynamicPathSegment(segment)\n )\n )]: [\"showHelp\"],\n [joinPaths(\n \"banner\",\n ...command.segments.filter(\n segment => !isDynamicPathSegment(segment)\n )\n )]: [\"showBanner\"]\n })}>\n <Spacing />\n <VirtualCommandHandlerDeclaration\n command={command}\n banner={code`await showBanner(); `}>\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":";;;;;;;;;;;;;;;;;;;AA8CA,SAAgB,iCAAC,OAAsC;CACrD,MAAA,EACA,SACA,UACF;CAEE,MAAA,UAAA,eAAA;AACA,QAAG,CAAA,gBAAe,OAAe;EACjC,IAAA,UAAA;AACI,UAAC,OAAS,QAAA,MAAA,IAAA,UAAgC,QAAA,CAAA,GAAA,QAAA,SAAA,KAAA,YAAA,qBAAA,QAAA,GAAA,IAAA,aAAA,0BAAA,QAAA,CAAA,CAAA,KAAA,QAAA,CAAA,KAAA,IAAA,CAAA;;EAE9C,IAAA,WAAA;AACA,UAAQ;IAAA,gBAAmB,cAAgB;AAErC,YAAS,GAAC,QAAA,YAAc,QAAA,QAAsB,GAAA,CAAA;OAEpD,CAAM;IAAC,gBAAA,OAAA,EAAA,CAAA;IAAA,gBAAA,YAAA,EACJ,IAAA,WAAA;AACE,YAAA,QAAA;OAEA,CAAC;IAAE,gBAAc,YAAA;KAChB,MAAI;KACJ,UAAU;KACX,CAAC;IAAC;;EAEN,CAAC,EAAE,gBAAiB,qBAAkB;EACrC,UAAK;EACL,OAAK;EACL,MAAK;EACL,YAAK,CAAA;GACH,MAAE;GACF,MAAC;GACD,SAAE;GACH,CAAC;EACF,IAAI,WAAM;AACR,UAAE;IAAA,gBAAsB,SAAW,EAAE,CAAC;IAAA;IAAW,gBAAmB,SAAK,EAAA,CAAA;IAAA,gBAAA,MAAA;KACvE,IAAC,OAAS;AACT,aAAQ,QAAA,OAAA;;KAET,UAAU;KACX,CAAC;IAAC,gBAAS,SAAA,EAAA,CAAA;IAAA,IAAA;IAAA;;EAEf,CAAC,CAAC;;;;;AASL,SAAW,oBAAW,OAAA;CACtB,MAAA,WAEE,SACC,gBACD,GAAA,SACI;CACJ,MAAM,UAAU,eAAoC;;AAEpD,QAAM,CAAA,gBAAU,gBAAc,WAAsB,MAAA;EACpD,IAAM,OAAA;AACJ,UAAS,SAAA;;EAET,IAAE,UAAQ;AACR,UAAG,KAAO,WAAY,EAAA,EAAA,OAAA,QAAoB,QAAQ,SAAC,CAAA,QAAA,GAAA,WAAA,MAAA,UAAA,CAAA,QAAA,KAAA,CAAA,MAAA,WAAA;AACjD,QAAC,KAAQ,MAAC,UAAA,CAAA;KACX,MAAQ;KACX,OAAA,SAAA,WAAA,KAAA;KACD,CAAA;;MAEM,EAAA,CAAA,CAAA;;EAEL,IAAG,iBAAA;AACD,UAAM,KAAI,kBAAA,EAAA,EAAA;IACR,KAAK,CAAC,iBAAc,UAAA;IACpB,SAAS;KAAA;KAAI;KAAA;KAAA;KAAA;IACb,OAAE;KAAA;KAAa;KAAA;KAAA;KAAA;KAAA;KAAA;KACd,UAAQ,QAAQ,GAAA,QAAQ,SAAQ,QAAA,YAAA,CAAA,qBAAA,QAAA,CAAA,CAAA,GAAA,CAAA,WAAA;KAChC,UAAU,UAAU,GAAG,QAAQ,SAAC,QAAS,YAAA,CAAA,qBAAA,QAAA,CAAA,CAAA,GAAA,CAAA,aAAA;IAC3C,CAAC;;EAEJ,IAAI,WAAU;AACZ,UAAO,CAAC,gBAAC,SAAA,EAAA,CAAA,EAAA,gBAAA,kCAAA;;IAEP,QAAM,IAAM;IACZ,IAAI,WAAS;AACZ,YAAA,gBAAA,eAAA;MACD,IAAA,WAAgB;AACV,cAAG,QAAA;;MAEP,IAAM,WAAC;AACJ,cAAO,QAAA;;MAET,CAAC;;IAEL,CAAC,CAAC;;EAEN,CAAC,CAAC,EAAE,gBAAI,KAAA;EACP,IAAI,OAAG;AACL,UAAO,OAAK,OAAA,QAAA,SAAA;;EAEd,WAAU,UAAS,gBAAG,MAAqB;GACzC,IAAI,OAAE;AACJ,WAAO,MAAC;;GAEV,IAAI,WAAU;AACZ,WAAO,gBAAiB,cAAM,EAC5B,SAAI,OACL,CAAC;;GAEJ,IAAI,WAAC;AACH,WAAC,gBAAS,qBAAA,EACT,SAAA,OACA,CAAC;;GAEL,CAAC;EACH,CAAC,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
2
|
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
|
-
const require_index = require('./plugin-help/dist/index.cjs');
|
|
4
|
-
const require_components_banner_function_declaration = require('./components/banner-function-declaration.cjs');
|
|
5
3
|
const require_components_bin_entry = require('./components/bin-entry.cjs');
|
|
6
4
|
const require_components_command_router = require('./components/command-router.cjs');
|
|
7
5
|
const require_components_virtual_command_entry = require('./components/virtual-command-entry.cjs');
|
|
8
6
|
const require_components_command_entry = require('./components/command-entry.cjs');
|
|
9
|
-
require('./components/index.cjs');
|
|
10
7
|
const require_helpers_get_default_options = require('./helpers/get-default-options.cjs');
|
|
11
8
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
12
9
|
let _alloy_js_core = require("@alloy-js/core");
|
|
13
10
|
let _alloy_js_typescript = require("@alloy-js/typescript");
|
|
14
11
|
let _powerlines_plugin_alloy_core_components = require("@powerlines/plugin-alloy/core/components");
|
|
15
12
|
let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
|
|
13
|
+
let _shell_shock_plugin_banner = require("@shell-shock/plugin-banner");
|
|
14
|
+
_shell_shock_plugin_banner = require_runtime.__toESM(_shell_shock_plugin_banner);
|
|
16
15
|
let _shell_shock_plugin_console = require("@shell-shock/plugin-console");
|
|
17
16
|
_shell_shock_plugin_console = require_runtime.__toESM(_shell_shock_plugin_console);
|
|
17
|
+
let _shell_shock_plugin_help = require("@shell-shock/plugin-help");
|
|
18
|
+
_shell_shock_plugin_help = require_runtime.__toESM(_shell_shock_plugin_help);
|
|
18
19
|
|
|
19
20
|
//#region src/index.tsx
|
|
20
21
|
/**
|
|
@@ -22,8 +23,9 @@ _shell_shock_plugin_console = require_runtime.__toESM(_shell_shock_plugin_consol
|
|
|
22
23
|
*/
|
|
23
24
|
const plugin = (options = {}) => {
|
|
24
25
|
return [
|
|
25
|
-
(0, _shell_shock_plugin_console.default)(options),
|
|
26
|
-
...
|
|
26
|
+
...(0, _shell_shock_plugin_console.default)(options),
|
|
27
|
+
...(0, _shell_shock_plugin_help.default)(options),
|
|
28
|
+
...(0, _shell_shock_plugin_banner.default)(options),
|
|
27
29
|
{
|
|
28
30
|
name: "shell-shock:script-preset",
|
|
29
31
|
config() {
|
|
@@ -58,9 +60,6 @@ const plugin = (options = {}) => {
|
|
|
58
60
|
"isMinimal"
|
|
59
61
|
]
|
|
60
62
|
},
|
|
61
|
-
get prefix() {
|
|
62
|
-
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, {})];
|
|
63
|
-
},
|
|
64
63
|
get children() {
|
|
65
64
|
return [
|
|
66
65
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
@@ -87,7 +86,7 @@ const plugin = (options = {}) => {
|
|
|
87
86
|
}
|
|
88
87
|
}),
|
|
89
88
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components.Spacing, {}),
|
|
90
|
-
_alloy_js_core.code`
|
|
89
|
+
_alloy_js_core.code`await showBanner();`,
|
|
91
90
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components.Spacing, {}),
|
|
92
91
|
_alloy_js_core.code`return showHelp();`
|
|
93
92
|
];
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","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
|
|
1
|
+
{"version":3,"file":"index.cjs","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 banner from \"@shell-shock/plugin-banner\";\nimport console from \"@shell-shock/plugin-console\";\nimport help from \"@shell-shock/plugin-help\";\nimport type { Plugin } from \"powerlines\";\nimport { BinEntry } from \"./components/bin-entry\";\nimport { CommandEntry } from \"./components/command-entry\";\nimport { CommandRouter } from \"./components/command-router\";\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 ...console<TContext>(options),\n ...help<TContext>(options),\n ...banner<TContext>(options),\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 },\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: [\"useApp\", \"useArgs\", \"isMinimal\"]\n }}>\n <Show when={Object.keys(this.commands).length > 0}>\n <VarDeclaration\n const\n name=\"args\"\n type=\"string[]\"\n initializer={code`useArgs();`}\n />\n <hbr />\n <CommandRouter segments={[]} commands={this.commands ?? {}} />\n <hbr />\n </Show>\n <Spacing />\n {code`await showBanner();`}\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 ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAqCA,MAAW,UAA8B,UAAA,EAAA,KAAA;AACxC,QAAA;EAAA,4CAAA,QAAA;EAAA,yCAAA,QAAA;EAAA,2CAAA,QAAA;EAAA;GACC,MAAQ;GACN,SAAC;AACH,SAAO,MAAA,uEAAA;AACH,WAAC;KACA,gBAAe;KACf,iBAAiB;KACpB,GAAA;KACE;;GAEH;EAAE;GACD,MAAM;GACN,SAAK;;IAEH,MAAE,UAAO;KACP,MAAE,SAAA;AACF,UAAE,MAAA,oEAAsB;AACxB,wDAAK,MAAA,iDAAA,uCAAA;MACJ,gBAAA;OACH,SAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;OACD,OAAA;QAAA;QAAA;QAAA;QAAA;OACD;MACM,IAAG,WAAY;AACnB,cAAS;wDAAA,qBAAA;SACD,IAAE,OAAK;AACP,iBAAS,OAAC,KAAA,OAAA,SAAA,CAAA,SAAA;;SAEX,IAAA,WAAU;AACZ,iBAAA;2DAAA,qCAAA;;YAEM,MAAM;YACP,MAAA;YACH,aAAA,mBAAA;YACE,CAAA;2DAAA,OAAA,EAAA,CAAA;2DAAA,iDAAA;YACC,UAAA,EAAc;YACZ,IAAA,WAAS;AACP,oBAAC,OAAQ,YAAA,EAAA;;YAEZ,CAAC;2DAAa,OAAA,EAAA,CAAA;WAAA;;SAElB,CAAC;wDAAc,kDAAA,EAAA,CAAA;QAAA,mBAAA;wDAAA,kDAAA,EAAA,CAAA;QAAA,mBAAA;QAAA;;MAEnB,CAAC,kDAAS,qBAAA;MACT,IAAI,OAAI;AACN,cAAM,OAAA,OAAA,OAAA,SAAA,CAAA,SAAA;;MAER,IAAI,WAAK;AACP,8DAAQ,oBAAA;QACN,IAAI,OAAO;AACT,gBAAI,OAAM,OAAQ,OAAA,SAAA;;QAEpB,gBAAK;QACL,WAAU,0DAAA,qBAAA;SACR,IAAG,OAAA;AACD,iBAAM,MAAA;;SAER,IAAC,WAAS;AACT,iEAAyB,+CAAA,EACzB,SAAS,OACT,CAAA;;SAEF,IAAK,WAAM;AACT,iEAAwB,8DAAgB,EACtC,SAAS,OACT,CAAC;;SAEL,CAAC;QACH,CAAC;;MAEL,CAAC,CAAC,CAAC;;IAEP;GACF;EAAC"}
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AAoCA;cAAa,MAAA,oBACM,mBAAA,GAAsB,mBAAA,EAEvC,OAAA,GAAS,mBAAA,
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AAoCA;cAAa,MAAA,oBACM,mBAAA,GAAsB,mBAAA,EAEvC,OAAA,GAAS,mBAAA,KA4EJ,MAAA,CAAO,QAAA"}
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AAoCA;cAAa,MAAA,oBACM,mBAAA,GAAsB,mBAAA,EAEvC,OAAA,GAAS,mBAAA,
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AAoCA;cAAa,MAAA,oBACM,mBAAA,GAAsB,mBAAA,EAEvC,OAAA,GAAS,mBAAA,KA4EJ,MAAA,CAAO,QAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { plugin as plugin$1 } from "./plugin-help/dist/index.mjs";
|
|
2
|
-
import { BannerFunctionDeclaration } from "./components/banner-function-declaration.mjs";
|
|
3
1
|
import { BinEntry } from "./components/bin-entry.mjs";
|
|
4
2
|
import { CommandRouter } from "./components/command-router.mjs";
|
|
5
3
|
import { VirtualCommandEntry } from "./components/virtual-command-entry.mjs";
|
|
6
4
|
import { CommandEntry } from "./components/command-entry.mjs";
|
|
7
|
-
import "./components/index.mjs";
|
|
8
5
|
import { getDefaultOptions } from "./helpers/get-default-options.mjs";
|
|
9
6
|
import { createComponent, createIntrinsic, memo } from "@alloy-js/core/jsx-runtime";
|
|
10
7
|
import { For, Show, code } from "@alloy-js/core";
|
|
11
8
|
import { VarDeclaration } from "@alloy-js/typescript";
|
|
12
9
|
import { Spacing } from "@powerlines/plugin-alloy/core/components";
|
|
13
10
|
import { render } from "@powerlines/plugin-alloy/render";
|
|
11
|
+
import banner from "@shell-shock/plugin-banner";
|
|
14
12
|
import console from "@shell-shock/plugin-console";
|
|
13
|
+
import help from "@shell-shock/plugin-help";
|
|
15
14
|
|
|
16
15
|
//#region src/index.tsx
|
|
17
16
|
/**
|
|
@@ -19,8 +18,9 @@ import console from "@shell-shock/plugin-console";
|
|
|
19
18
|
*/
|
|
20
19
|
const plugin = (options = {}) => {
|
|
21
20
|
return [
|
|
22
|
-
console(options),
|
|
23
|
-
...
|
|
21
|
+
...console(options),
|
|
22
|
+
...help(options),
|
|
23
|
+
...banner(options),
|
|
24
24
|
{
|
|
25
25
|
name: "shell-shock:script-preset",
|
|
26
26
|
config() {
|
|
@@ -55,9 +55,6 @@ const plugin = (options = {}) => {
|
|
|
55
55
|
"isMinimal"
|
|
56
56
|
]
|
|
57
57
|
},
|
|
58
|
-
get prefix() {
|
|
59
|
-
return [createComponent(BannerFunctionDeclaration, {}), createComponent(Spacing, {})];
|
|
60
|
-
},
|
|
61
58
|
get children() {
|
|
62
59
|
return [
|
|
63
60
|
createComponent(Show, {
|
|
@@ -84,7 +81,7 @@ const plugin = (options = {}) => {
|
|
|
84
81
|
}
|
|
85
82
|
}),
|
|
86
83
|
createComponent(Spacing, {}),
|
|
87
|
-
code`
|
|
84
|
+
code`await showBanner();`,
|
|
88
85
|
createComponent(Spacing, {}),
|
|
89
86
|
code`return showHelp();`
|
|
90
87
|
];
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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
|
|
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 banner from \"@shell-shock/plugin-banner\";\nimport console from \"@shell-shock/plugin-console\";\nimport help from \"@shell-shock/plugin-help\";\nimport type { Plugin } from \"powerlines\";\nimport { BinEntry } from \"./components/bin-entry\";\nimport { CommandEntry } from \"./components/command-entry\";\nimport { CommandRouter } from \"./components/command-router\";\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 ...console<TContext>(options),\n ...help<TContext>(options),\n ...banner<TContext>(options),\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 },\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: [\"useApp\", \"useArgs\", \"isMinimal\"]\n }}>\n <Show when={Object.keys(this.commands).length > 0}>\n <VarDeclaration\n const\n name=\"args\"\n type=\"string[]\"\n initializer={code`useArgs();`}\n />\n <hbr />\n <CommandRouter segments={[]} commands={this.commands ?? {}} />\n <hbr />\n </Show>\n <Spacing />\n {code`await showBanner();`}\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 ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAqCA,MAAW,UAA8B,UAAA,EAAA,KAAA;AACxC,QAAA;EAAA,GAAA,QAAA,QAAA;EAAA,GAAA,KAAA,QAAA;EAAA,GAAA,OAAA,QAAA;EAAA;GACC,MAAQ;GACN,SAAC;AACH,SAAO,MAAA,uEAAA;AACH,WAAC;KACA,gBAAe;KACf,iBAAiB;KACpB,GAAA;KACE;;GAEH;EAAE;GACD,MAAM;GACN,SAAK;;IAEH,MAAE,UAAO;KACP,MAAE,SAAA;AACF,UAAE,MAAA,oEAAsB;AACxB,YAAK,OAAA,MAAA,CAAA,gBAAA,UAAA;MACJ,gBAAA;OACH,SAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;OACD,OAAA;QAAA;QAAA;QAAA;QAAA;OACD;MACM,IAAG,WAAY;AACnB,cAAS;QAAA,gBAAA,MAAA;SACD,IAAE,OAAK;AACP,iBAAS,OAAC,KAAA,OAAA,SAAA,CAAA,SAAA;;SAEX,IAAA,WAAU;AACZ,iBAAA;WAAA,gBAAA,gBAAA;;YAEM,MAAM;YACP,MAAA;YACH,aAAA,IAAA;YACE,CAAA;WAAA,gBAAA,OAAA,EAAA,CAAA;WAAA,gBAAA,eAAA;YACC,UAAA,EAAc;YACZ,IAAA,WAAS;AACP,oBAAC,OAAQ,YAAA,EAAA;;YAEZ,CAAC;WAAE,gBAAW,OAAA,EAAA,CAAA;WAAA;;SAElB,CAAC;QAAE,gBAAY,SAAA,EAAA,CAAA;QAAA,IAAA;QAAA,gBAAA,SAAA,EAAA,CAAA;QAAA,IAAA;QAAA;;MAEnB,CAAC,EAAE,gBAAO,MAAA;MACT,IAAI,OAAI;AACN,cAAM,OAAA,OAAA,OAAA,SAAA,CAAA,SAAA;;MAER,IAAI,WAAK;AACP,cAAO,gBAAC,KAAA;QACN,IAAI,OAAO;AACT,gBAAI,OAAM,OAAQ,OAAA,SAAA;;QAEpB,gBAAK;QACL,WAAU,UAAA,gBAAA,MAAA;SACR,IAAG,OAAA;AACD,iBAAM,MAAA;;SAER,IAAC,WAAS;AACT,iBAAK,gBAAoB,cAAA,EACzB,SAAS,OACT,CAAA;;SAEF,IAAK,WAAM;AACT,iBAAQ,gBAAgB,qBAAgB,EACtC,SAAS,OACT,CAAC;;SAEL,CAAC;QACH,CAAC;;MAEL,CAAC,CAAC,CAAC;;IAEP;GACF;EAAC"}
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { HelpPluginContext, HelpPluginOptions, HelpPluginResolvedConfig, HelpPluginUserConfig } from "../plugin-help/dist/types/plugin.cjs";
|
|
2
1
|
import { CommandBase, CommandOption, Context, Options, ResolvedConfig, UserConfig } from "@shell-shock/core";
|
|
3
2
|
import { AlloyPluginContext } from "@powerlines/plugin-alloy/types/plugin";
|
|
3
|
+
import { BannerPluginContext, BannerPluginOptions, BannerPluginResolvedConfig, BannerPluginUserConfig } from "@shell-shock/plugin-banner";
|
|
4
4
|
import { ConsolePluginContext, ConsolePluginOptions, ConsolePluginResolvedConfig, ConsolePluginUserConfig } from "@shell-shock/plugin-console";
|
|
5
|
+
import { HelpPluginContext, HelpPluginOptions, HelpPluginResolvedConfig, HelpPluginUserConfig } from "@shell-shock/plugin-help";
|
|
5
6
|
import { ThemePluginContext, ThemePluginOptions, ThemePluginResolvedConfig, ThemePluginUserConfig } from "@shell-shock/plugin-theme";
|
|
6
7
|
|
|
7
8
|
//#region src/types/plugin.d.ts
|
|
8
|
-
type ScriptPresetOptions = Omit<Options, "defaultOptions"> & ThemePluginOptions & ConsolePluginOptions & HelpPluginOptions & {
|
|
9
|
+
type ScriptPresetOptions = Omit<Options, "defaultOptions"> & ThemePluginOptions & ConsolePluginOptions & HelpPluginOptions & BannerPluginOptions & {
|
|
9
10
|
/**
|
|
10
11
|
* A set of default command options to apply to each command.
|
|
11
12
|
*
|
|
@@ -19,9 +20,9 @@ type ScriptPresetOptions = Omit<Options, "defaultOptions"> & ThemePluginOptions
|
|
|
19
20
|
*/
|
|
20
21
|
defaultOptions?: CommandOption[] | ((context: Context, input: CommandBase) => CommandOption[]) | false;
|
|
21
22
|
};
|
|
22
|
-
type ScriptPresetUserConfig = UserConfig & ScriptPresetOptions & ThemePluginUserConfig & ConsolePluginUserConfig & HelpPluginUserConfig;
|
|
23
|
-
type ScriptPresetResolvedConfig = ResolvedConfig & ScriptPresetOptions & ThemePluginResolvedConfig & ConsolePluginResolvedConfig & HelpPluginResolvedConfig;
|
|
24
|
-
type ScriptPresetContext<TResolvedConfig extends ScriptPresetResolvedConfig = ScriptPresetResolvedConfig> = AlloyPluginContext<TResolvedConfig> & Context<TResolvedConfig> & ThemePluginContext<TResolvedConfig> & ConsolePluginContext<TResolvedConfig> & HelpPluginContext<TResolvedConfig>;
|
|
23
|
+
type ScriptPresetUserConfig = UserConfig & ScriptPresetOptions & ThemePluginUserConfig & ConsolePluginUserConfig & HelpPluginUserConfig & BannerPluginUserConfig;
|
|
24
|
+
type ScriptPresetResolvedConfig = ResolvedConfig & ScriptPresetOptions & ThemePluginResolvedConfig & ConsolePluginResolvedConfig & HelpPluginResolvedConfig & BannerPluginResolvedConfig;
|
|
25
|
+
type ScriptPresetContext<TResolvedConfig extends ScriptPresetResolvedConfig = ScriptPresetResolvedConfig> = AlloyPluginContext<TResolvedConfig> & Context<TResolvedConfig> & ThemePluginContext<TResolvedConfig> & ConsolePluginContext<TResolvedConfig> & HelpPluginContext<TResolvedConfig> & BannerPluginContext<TResolvedConfig>;
|
|
25
26
|
//#endregion
|
|
26
27
|
export { ScriptPresetContext, ScriptPresetOptions, ScriptPresetResolvedConfig, ScriptPresetUserConfig };
|
|
27
28
|
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;;;KAoDY,mBAAA,GAAsB,IAAA,CAAK,OAAA,sBACrC,kBAAA,GACA,oBAAA,GACA,iBAAA,GACA,mBAAA;;AAJF;;;;;;;;;;EAgBI,cAAA,GACI,aAAA,OACE,OAAA,EAAS,OAAA,EAAS,KAAA,EAAO,WAAA,KAAgB,aAAA;AAAA;AAAA,KAIvC,sBAAA,GAAyB,UAAA,GACnC,mBAAA,GACA,qBAAA,GACA,uBAAA,GACA,oBAAA,GACA,sBAAA;AAAA,KAEU,0BAAA,GAA6B,cAAA,GACvC,mBAAA,GACA,yBAAA,GACA,2BAAA,GACA,wBAAA,GACA,0BAAA;AAAA,KAEU,mBAAA,yBACc,0BAAA,GACtB,0BAAA,IACA,kBAAA,CAAmB,eAAA,IACrB,OAAA,CAAQ,eAAA,IACR,kBAAA,CAAmB,eAAA,IACnB,oBAAA,CAAqB,eAAA,IACrB,iBAAA,CAAkB,eAAA,IAClB,mBAAA,CAAoB,eAAA"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BannerPluginContext, BannerPluginOptions, BannerPluginResolvedConfig, BannerPluginUserConfig } from "@shell-shock/plugin-banner";
|
|
2
2
|
import { ConsolePluginContext, ConsolePluginOptions, ConsolePluginResolvedConfig, ConsolePluginUserConfig } from "@shell-shock/plugin-console";
|
|
3
|
+
import { HelpPluginContext, HelpPluginOptions, HelpPluginResolvedConfig, HelpPluginUserConfig } from "@shell-shock/plugin-help";
|
|
3
4
|
import { CommandBase, CommandOption, Context, Options, ResolvedConfig, UserConfig } from "@shell-shock/core";
|
|
4
|
-
import { ThemePluginContext, ThemePluginOptions, ThemePluginResolvedConfig, ThemePluginUserConfig } from "@shell-shock/plugin-theme";
|
|
5
5
|
import { AlloyPluginContext } from "@powerlines/plugin-alloy/types/plugin";
|
|
6
|
+
import { ThemePluginContext, ThemePluginOptions, ThemePluginResolvedConfig, ThemePluginUserConfig } from "@shell-shock/plugin-theme";
|
|
6
7
|
|
|
7
8
|
//#region src/types/plugin.d.ts
|
|
8
|
-
type ScriptPresetOptions = Omit<Options, "defaultOptions"> & ThemePluginOptions & ConsolePluginOptions & HelpPluginOptions & {
|
|
9
|
+
type ScriptPresetOptions = Omit<Options, "defaultOptions"> & ThemePluginOptions & ConsolePluginOptions & HelpPluginOptions & BannerPluginOptions & {
|
|
9
10
|
/**
|
|
10
11
|
* A set of default command options to apply to each command.
|
|
11
12
|
*
|
|
@@ -19,9 +20,9 @@ type ScriptPresetOptions = Omit<Options, "defaultOptions"> & ThemePluginOptions
|
|
|
19
20
|
*/
|
|
20
21
|
defaultOptions?: CommandOption[] | ((context: Context, input: CommandBase) => CommandOption[]) | false;
|
|
21
22
|
};
|
|
22
|
-
type ScriptPresetUserConfig = UserConfig & ScriptPresetOptions & ThemePluginUserConfig & ConsolePluginUserConfig & HelpPluginUserConfig;
|
|
23
|
-
type ScriptPresetResolvedConfig = ResolvedConfig & ScriptPresetOptions & ThemePluginResolvedConfig & ConsolePluginResolvedConfig & HelpPluginResolvedConfig;
|
|
24
|
-
type ScriptPresetContext<TResolvedConfig extends ScriptPresetResolvedConfig = ScriptPresetResolvedConfig> = AlloyPluginContext<TResolvedConfig> & Context<TResolvedConfig> & ThemePluginContext<TResolvedConfig> & ConsolePluginContext<TResolvedConfig> & HelpPluginContext<TResolvedConfig>;
|
|
23
|
+
type ScriptPresetUserConfig = UserConfig & ScriptPresetOptions & ThemePluginUserConfig & ConsolePluginUserConfig & HelpPluginUserConfig & BannerPluginUserConfig;
|
|
24
|
+
type ScriptPresetResolvedConfig = ResolvedConfig & ScriptPresetOptions & ThemePluginResolvedConfig & ConsolePluginResolvedConfig & HelpPluginResolvedConfig & BannerPluginResolvedConfig;
|
|
25
|
+
type ScriptPresetContext<TResolvedConfig extends ScriptPresetResolvedConfig = ScriptPresetResolvedConfig> = AlloyPluginContext<TResolvedConfig> & Context<TResolvedConfig> & ThemePluginContext<TResolvedConfig> & ConsolePluginContext<TResolvedConfig> & HelpPluginContext<TResolvedConfig> & BannerPluginContext<TResolvedConfig>;
|
|
25
26
|
//#endregion
|
|
26
27
|
export { ScriptPresetContext, ScriptPresetOptions, ScriptPresetResolvedConfig, ScriptPresetUserConfig };
|
|
27
28
|
//# sourceMappingURL=plugin.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;;;KAoDY,mBAAA,GAAsB,IAAA,CAAK,OAAA,sBACrC,kBAAA,GACA,oBAAA,GACA,iBAAA,GACA,mBAAA;;AAJF;;;;;;;;;;EAgBI,cAAA,GACI,aAAA,OACE,OAAA,EAAS,OAAA,EAAS,KAAA,EAAO,WAAA,KAAgB,aAAA;AAAA;AAAA,KAIvC,sBAAA,GAAyB,UAAA,GACnC,mBAAA,GACA,qBAAA,GACA,uBAAA,GACA,oBAAA,GACA,sBAAA;AAAA,KAEU,0BAAA,GAA6B,cAAA,GACvC,mBAAA,GACA,yBAAA,GACA,2BAAA,GACA,wBAAA,GACA,0BAAA;AAAA,KAEU,mBAAA,yBACc,0BAAA,GACtB,0BAAA,IACA,kBAAA,CAAmB,eAAA,IACrB,OAAA,CAAQ,eAAA,IACR,kBAAA,CAAmB,eAAA,IACnB,oBAAA,CAAqB,eAAA,IACrB,iBAAA,CAAkB,eAAA,IAClB,mBAAA,CAAoB,eAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shell-shock/preset-script",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.29",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Shell Shock preset that generates a fully-featured script application.",
|
|
6
6
|
"keywords": [
|
|
@@ -73,20 +73,6 @@
|
|
|
73
73
|
"default": "./dist/components/index.mjs"
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
|
-
"./components/banner-function-declaration": {
|
|
77
|
-
"require": {
|
|
78
|
-
"types": "./dist/components/banner-function-declaration.d.cts",
|
|
79
|
-
"default": "./dist/components/banner-function-declaration.cjs"
|
|
80
|
-
},
|
|
81
|
-
"import": {
|
|
82
|
-
"types": "./dist/components/banner-function-declaration.d.mts",
|
|
83
|
-
"default": "./dist/components/banner-function-declaration.mjs"
|
|
84
|
-
},
|
|
85
|
-
"default": {
|
|
86
|
-
"types": "./dist/components/banner-function-declaration.d.mts",
|
|
87
|
-
"default": "./dist/components/banner-function-declaration.mjs"
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
76
|
"./components/bin-entry": {
|
|
91
77
|
"require": {
|
|
92
78
|
"types": "./dist/components/bin-entry.d.cts",
|
|
@@ -209,23 +195,25 @@
|
|
|
209
195
|
"dependencies": {
|
|
210
196
|
"@alloy-js/core": "0.23.0-dev.8",
|
|
211
197
|
"@alloy-js/typescript": "0.23.0-dev.4",
|
|
212
|
-
"@powerlines/deepkit": "^0.6.
|
|
213
|
-
"@powerlines/plugin-alloy": "^0.25.
|
|
214
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
215
|
-
"@shell-shock/core": "^0.13.
|
|
216
|
-
"@shell-shock/plugin-
|
|
217
|
-
"@shell-shock/plugin-
|
|
198
|
+
"@powerlines/deepkit": "^0.6.147",
|
|
199
|
+
"@powerlines/plugin-alloy": "^0.25.54",
|
|
200
|
+
"@powerlines/plugin-plugin": "^0.12.319",
|
|
201
|
+
"@shell-shock/core": "^0.13.3",
|
|
202
|
+
"@shell-shock/plugin-banner": "^0.1.1",
|
|
203
|
+
"@shell-shock/plugin-help": "^0.1.5",
|
|
204
|
+
"@shell-shock/plugin-console": "^0.1.14",
|
|
205
|
+
"@shell-shock/plugin-theme": "^0.3.18",
|
|
218
206
|
"@stryke/helpers": "^0.10.6",
|
|
219
207
|
"@stryke/path": "^0.27.2",
|
|
220
208
|
"@stryke/string-format": "^0.17.6",
|
|
221
209
|
"defu": "^6.1.4",
|
|
222
|
-
"powerlines": "^0.
|
|
210
|
+
"powerlines": "^0.42.9"
|
|
223
211
|
},
|
|
224
212
|
"devDependencies": {
|
|
225
213
|
"@babel/core": "^7.29.0",
|
|
226
|
-
"@powerlines/plugin-alloy": "^0.25.
|
|
214
|
+
"@powerlines/plugin-alloy": "^0.25.54",
|
|
227
215
|
"@types/node": "^25.5.0"
|
|
228
216
|
},
|
|
229
217
|
"publishConfig": { "access": "public" },
|
|
230
|
-
"gitHead": "
|
|
218
|
+
"gitHead": "86ac1c51d3258bded9e493024e6631d241f62dd2"
|
|
231
219
|
}
|