@shell-shock/preset-script 0.6.63 → 0.6.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.cjs +29 -1
- package/dist/components/bin-entry.cjs +149 -3
- package/dist/components/bin-entry.mjs +145 -3
- package/dist/components/bin-entry.mjs.map +1 -1
- package/dist/components/command-entry.cjs +205 -3
- package/dist/components/command-entry.mjs +200 -3
- package/dist/components/command-entry.mjs.map +1 -1
- package/dist/components/command-router.cjs +160 -2
- package/dist/components/command-router.mjs +156 -2
- package/dist/components/command-router.mjs.map +1 -1
- package/dist/components/exit-function-declaration.cjs +113 -6
- package/dist/components/exit-function-declaration.mjs +111 -6
- package/dist/components/exit-function-declaration.mjs.map +1 -1
- package/dist/components/index.cjs +18 -1
- package/dist/components/index.mjs +7 -1
- package/dist/components/virtual-command-entry.cjs +156 -1
- package/dist/components/virtual-command-entry.mjs +152 -1
- package/dist/components/virtual-command-entry.mjs.map +1 -1
- package/dist/helpers/get-global-options.cjs +75 -1
- package/dist/helpers/get-global-options.mjs +73 -1
- package/dist/helpers/get-global-options.mjs.map +1 -1
- package/dist/index.cjs +123 -1
- package/dist/index.mjs +117 -1
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/types/plugin.mjs +1 -1
- package/package.json +15 -15
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 type { CommandTree } from \"@shell-shock/core/types/command\";\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 { getGlobalOptions } from \"./helpers/get-global-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): Plugin<TContext>[] => {\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 globalOptions: getGlobalOptions,\n isCaseSensitive: false,\n ...options\n };\n },\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 \"help\"\n ],\n utils: [\"isMinimal\"],\n state: [\"useArgs\", \"hasFlag\", \"isHelp\"]\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\n each={Object.values(\n this.commands as Record<string, CommandTree>\n )}\n doubleHardline>\n {child => (\n <Show\n when={child.isVirtual}\n fallback={<CommandEntry command={child} />}>\n <VirtualCommandEntry command={child} />\n </Show>\n )}\n </For>\n </Show>\n </>\n );\n }\n }\n }\n ];\n};\n\nexport default plugin;\n"],"mappings":"
|
|
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 type { CommandTree } from \"@shell-shock/core/types/command\";\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 { getGlobalOptions } from \"./helpers/get-global-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): Plugin<TContext>[] => {\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 globalOptions: getGlobalOptions,\n isCaseSensitive: false,\n ...options\n };\n },\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 \"help\"\n ],\n utils: [\"isMinimal\"],\n state: [\"useArgs\", \"hasFlag\", \"isHelp\"]\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\n each={Object.values(\n this.commands as Record<string, CommandTree>\n )}\n doubleHardline>\n {child => (\n <Show\n when={child.isVirtual}\n fallback={<CommandEntry command={child} />}>\n <VirtualCommandEntry command={child} />\n </Show>\n )}\n </For>\n </Show>\n </>\n );\n }\n }\n }\n ];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkCA,MAAE,UAAA,UAAA,EAAA,KAAA;AACA,QAAK;EAAA,GAAM,QAAM,QAAK;EAAM,GAAA,KAAA,QAAA;EAAA,GAAA,OAAA,QAAA,OAAA;EAAA;GAC5B,MAAA;GACF,SAAa;AACX,SAAS,MAAA,uEAA8B;AACxC,WAAA;KACC,eAAS;KACR,iBAAsB;KACjB,GAAC;KACF;;GAEH,SAAS;IACT,OAAA;IACE,MAAM,UAAO;KACb,MAAQ,SAAC;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HANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{};
|
|
1
|
+
export { };
|
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.65",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Shell Shock preset that generates a fully-featured script application.",
|
|
6
6
|
"keywords": [
|
|
@@ -195,21 +195,21 @@
|
|
|
195
195
|
"dependencies": {
|
|
196
196
|
"@alloy-js/core": "0.23.0-dev.8",
|
|
197
197
|
"@alloy-js/typescript": "0.23.0-dev.4",
|
|
198
|
-
"@powerlines/deepkit": "^0.8.
|
|
199
|
-
"@powerlines/plugin-alloy": "^0.26.
|
|
200
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
201
|
-
"@shell-shock/core": "^0.17.
|
|
202
|
-
"@shell-shock/plugin-banner": "^0.1.
|
|
203
|
-
"@shell-shock/plugin-console": "^0.2.
|
|
204
|
-
"@shell-shock/plugin-help": "^0.2.
|
|
205
|
-
"@shell-shock/plugin-theme": "^0.4.
|
|
206
|
-
"@stryke/helpers": "^0.10.
|
|
207
|
-
"@stryke/path": "^0.28.
|
|
208
|
-
"@stryke/string-format": "^0.17.
|
|
198
|
+
"@powerlines/deepkit": "^0.8.64",
|
|
199
|
+
"@powerlines/plugin-alloy": "^0.26.84",
|
|
200
|
+
"@powerlines/plugin-plugin": "^0.12.416",
|
|
201
|
+
"@shell-shock/core": "^0.17.10",
|
|
202
|
+
"@shell-shock/plugin-banner": "^0.1.37",
|
|
203
|
+
"@shell-shock/plugin-console": "^0.2.14",
|
|
204
|
+
"@shell-shock/plugin-help": "^0.2.28",
|
|
205
|
+
"@shell-shock/plugin-theme": "^0.4.23",
|
|
206
|
+
"@stryke/helpers": "^0.10.12",
|
|
207
|
+
"@stryke/path": "^0.28.2",
|
|
208
|
+
"@stryke/string-format": "^0.17.13",
|
|
209
209
|
"defu": "^6.1.7",
|
|
210
|
-
"powerlines": "^0.
|
|
210
|
+
"powerlines": "^0.47.4"
|
|
211
211
|
},
|
|
212
|
-
"devDependencies": { "@
|
|
212
|
+
"devDependencies": { "@types/node": "^25.6.0" },
|
|
213
213
|
"publishConfig": { "access": "public" },
|
|
214
|
-
"gitHead": "
|
|
214
|
+
"gitHead": "7b4030fd6be000c960e8cc4c4f7b4db205054e69"
|
|
215
215
|
}
|