@shell-shock/preset-script 0.6.41 → 0.6.43
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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/types/plugin.d.cts +5 -1
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +5 -1
- package/dist/types/plugin.d.mts.map +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ This package is part of the ⚡<b>Shell Shock</b> monorepo. The Shell Shock pack
|
|
|
27
27
|
|
|
28
28
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
29
29
|
|
|
30
|
-
[](https://stormsoftware.com/projects/shell-shock/) [](http://commitizen.github.io/cz-cli/)  
|
|
31
31
|
|
|
32
32
|
<!-- prettier-ignore-start -->
|
|
33
33
|
<!-- markdownlint-disable -->
|
package/dist/index.cjs
CHANGED
|
@@ -25,7 +25,7 @@ const plugin = (options = {}) => {
|
|
|
25
25
|
return [
|
|
26
26
|
...(0, _shell_shock_plugin_console.default)(options),
|
|
27
27
|
...(0, _shell_shock_plugin_help.default)(options),
|
|
28
|
-
...(0, _shell_shock_plugin_banner.default)(options),
|
|
28
|
+
...(0, _shell_shock_plugin_banner.default)(options.banner),
|
|
29
29
|
{
|
|
30
30
|
name: "shell-shock:script-preset",
|
|
31
31
|
config() {
|
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 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"}
|
|
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.banner),\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,OAAA;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.mjs
CHANGED
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 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"}
|
|
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.banner),\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,OAAA;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
|
@@ -6,7 +6,7 @@ import { HelpPluginContext, HelpPluginOptions, HelpPluginResolvedConfig, HelpPlu
|
|
|
6
6
|
import { ThemePluginContext, ThemePluginOptions, ThemePluginResolvedConfig, ThemePluginUserConfig } from "@shell-shock/plugin-theme";
|
|
7
7
|
|
|
8
8
|
//#region src/types/plugin.d.ts
|
|
9
|
-
type ScriptPresetOptions = Omit<Options, "defaultOptions"> & ThemePluginOptions & ConsolePluginOptions & HelpPluginOptions &
|
|
9
|
+
type ScriptPresetOptions = Omit<Options, "defaultOptions"> & ThemePluginOptions & ConsolePluginOptions & HelpPluginOptions & {
|
|
10
10
|
/**
|
|
11
11
|
* A set of default command options to apply to each command.
|
|
12
12
|
*
|
|
@@ -19,6 +19,10 @@ type ScriptPresetOptions = Omit<Options, "defaultOptions"> & ThemePluginOptions
|
|
|
19
19
|
* To disable the addition of these default options, set this property to `false`, or provide a custom set of options/a function that returns them.
|
|
20
20
|
*/
|
|
21
21
|
defaultOptions?: CommandOption[] | ((context: Context, input: CommandBase) => CommandOption[]) | false;
|
|
22
|
+
/**
|
|
23
|
+
* The title to display in the banner for the CLI application. If not specified, the application name will be used.
|
|
24
|
+
*/
|
|
25
|
+
banner?: Pick<BannerPluginOptions, "title">;
|
|
22
26
|
};
|
|
23
27
|
type ScriptPresetUserConfig = UserConfig & ScriptPresetOptions & ThemePluginUserConfig & ConsolePluginUserConfig & HelpPluginUserConfig & BannerPluginUserConfig;
|
|
24
28
|
type ScriptPresetResolvedConfig = ResolvedConfig & ScriptPresetOptions & ThemePluginResolvedConfig & ConsolePluginResolvedConfig & HelpPluginResolvedConfig & BannerPluginResolvedConfig;
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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;;AAHF;;;;;;;;;;EAeI,cAAA,GACI,aAAA,OACE,OAAA,EAAS,OAAA,EAAS,KAAA,EAAO,WAAA,KAAgB,aAAA;EAAA;;;EAM/C,MAAA,GAAS,IAAA,CAAK,mBAAA;AAAA;AAAA,KAGN,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
|
@@ -6,7 +6,7 @@ import { AlloyPluginContext } from "@powerlines/plugin-alloy/types/plugin";
|
|
|
6
6
|
import { ThemePluginContext, ThemePluginOptions, ThemePluginResolvedConfig, ThemePluginUserConfig } from "@shell-shock/plugin-theme";
|
|
7
7
|
|
|
8
8
|
//#region src/types/plugin.d.ts
|
|
9
|
-
type ScriptPresetOptions = Omit<Options, "defaultOptions"> & ThemePluginOptions & ConsolePluginOptions & HelpPluginOptions &
|
|
9
|
+
type ScriptPresetOptions = Omit<Options, "defaultOptions"> & ThemePluginOptions & ConsolePluginOptions & HelpPluginOptions & {
|
|
10
10
|
/**
|
|
11
11
|
* A set of default command options to apply to each command.
|
|
12
12
|
*
|
|
@@ -19,6 +19,10 @@ type ScriptPresetOptions = Omit<Options, "defaultOptions"> & ThemePluginOptions
|
|
|
19
19
|
* To disable the addition of these default options, set this property to `false`, or provide a custom set of options/a function that returns them.
|
|
20
20
|
*/
|
|
21
21
|
defaultOptions?: CommandOption[] | ((context: Context, input: CommandBase) => CommandOption[]) | false;
|
|
22
|
+
/**
|
|
23
|
+
* The title to display in the banner for the CLI application. If not specified, the application name will be used.
|
|
24
|
+
*/
|
|
25
|
+
banner?: Pick<BannerPluginOptions, "title">;
|
|
22
26
|
};
|
|
23
27
|
type ScriptPresetUserConfig = UserConfig & ScriptPresetOptions & ThemePluginUserConfig & ConsolePluginUserConfig & HelpPluginUserConfig & BannerPluginUserConfig;
|
|
24
28
|
type ScriptPresetResolvedConfig = ResolvedConfig & ScriptPresetOptions & ThemePluginResolvedConfig & ConsolePluginResolvedConfig & HelpPluginResolvedConfig & BannerPluginResolvedConfig;
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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;;AAHF;;;;;;;;;;EAeI,cAAA,GACI,aAAA,OACE,OAAA,EAAS,OAAA,EAAS,KAAA,EAAO,WAAA,KAAgB,aAAA;EAAA;;;EAM/C,MAAA,GAAS,IAAA,CAAK,mBAAA;AAAA;AAAA,KAGN,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.43",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Shell Shock preset that generates a fully-featured script application.",
|
|
6
6
|
"keywords": [
|
|
@@ -198,11 +198,11 @@
|
|
|
198
198
|
"@powerlines/deepkit": "^0.6.162",
|
|
199
199
|
"@powerlines/plugin-alloy": "^0.25.70",
|
|
200
200
|
"@powerlines/plugin-plugin": "^0.12.334",
|
|
201
|
-
"@shell-shock/core": "^0.14.
|
|
202
|
-
"@shell-shock/plugin-banner": "^0.1.
|
|
203
|
-
"@shell-shock/plugin-help": "^0.2.
|
|
204
|
-
"@shell-shock/plugin-console": "^0.1.
|
|
205
|
-
"@shell-shock/plugin-theme": "^0.
|
|
201
|
+
"@shell-shock/core": "^0.14.2",
|
|
202
|
+
"@shell-shock/plugin-banner": "^0.1.15",
|
|
203
|
+
"@shell-shock/plugin-help": "^0.2.6",
|
|
204
|
+
"@shell-shock/plugin-console": "^0.1.28",
|
|
205
|
+
"@shell-shock/plugin-theme": "^0.4.1",
|
|
206
206
|
"@stryke/helpers": "^0.10.7",
|
|
207
207
|
"@stryke/path": "^0.27.3",
|
|
208
208
|
"@stryke/string-format": "^0.17.7",
|
|
@@ -215,5 +215,5 @@
|
|
|
215
215
|
"@types/node": "^25.5.0"
|
|
216
216
|
},
|
|
217
217
|
"publishConfig": { "access": "public" },
|
|
218
|
-
"gitHead": "
|
|
218
|
+
"gitHead": "081a1a99ff0c263af9b6d34547d02e96d0ac398e"
|
|
219
219
|
}
|