@shell-shock/preset-script 0.4.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/banner-function-declaration.cjs +1 -1
- package/dist/components/banner-function-declaration.cjs.map +1 -1
- package/dist/components/banner-function-declaration.mjs +1 -1
- package/dist/components/banner-function-declaration.mjs.map +1 -1
- package/dist/components/bin-entry.cjs +6 -3
- package/dist/components/bin-entry.cjs.map +1 -1
- package/dist/components/bin-entry.d.cts.map +1 -1
- package/dist/components/bin-entry.d.mts.map +1 -1
- package/dist/components/bin-entry.mjs +6 -3
- package/dist/components/bin-entry.mjs.map +1 -1
- package/dist/components/command-entry.cjs +112 -74
- 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.map +1 -1
- package/dist/components/command-entry.mjs +114 -76
- package/dist/components/command-entry.mjs.map +1 -1
- package/dist/components/command-router.cjs +5 -5
- package/dist/components/command-router.cjs.map +1 -1
- package/dist/components/command-router.d.cts +1 -1
- package/dist/components/command-router.d.cts.map +1 -1
- package/dist/components/command-router.d.mts +1 -1
- package/dist/components/command-router.d.mts.map +1 -1
- package/dist/components/command-router.mjs +5 -5
- package/dist/components/command-router.mjs.map +1 -1
- package/dist/components/console-builtin.cjs +22 -16
- package/dist/components/console-builtin.cjs.map +1 -1
- package/dist/components/console-builtin.d.cts +1 -0
- package/dist/components/console-builtin.d.cts.map +1 -1
- package/dist/components/console-builtin.d.mts +1 -0
- package/dist/components/console-builtin.d.mts.map +1 -1
- package/dist/components/console-builtin.mjs +22 -16
- package/dist/components/console-builtin.mjs.map +1 -1
- package/dist/components/help.cjs +27 -20
- package/dist/components/help.cjs.map +1 -1
- package/dist/components/help.d.cts +9 -9
- package/dist/components/help.d.cts.map +1 -1
- package/dist/components/help.d.mts +9 -9
- package/dist/components/help.d.mts.map +1 -1
- package/dist/components/help.mjs +28 -21
- package/dist/components/help.mjs.map +1 -1
- package/dist/components/helpers.cjs +54 -0
- package/dist/components/helpers.cjs.map +1 -0
- package/dist/components/helpers.d.cts +29 -0
- package/dist/components/helpers.d.cts.map +1 -0
- package/dist/components/helpers.d.mts +29 -0
- package/dist/components/helpers.d.mts.map +1 -0
- package/dist/components/helpers.mjs +50 -0
- package/dist/components/helpers.mjs.map +1 -0
- package/dist/components/index.cjs +1 -0
- package/dist/components/index.d.cts +2 -2
- package/dist/components/index.d.mts +2 -2
- package/dist/components/index.mjs +2 -2
- package/dist/components/utils-builtin.cjs +160 -6
- package/dist/components/utils-builtin.cjs.map +1 -1
- package/dist/components/utils-builtin.d.cts +9 -8
- package/dist/components/utils-builtin.d.cts.map +1 -1
- package/dist/components/utils-builtin.d.mts +9 -8
- package/dist/components/utils-builtin.d.mts.map +1 -1
- package/dist/components/utils-builtin.mjs +161 -8
- package/dist/components/utils-builtin.mjs.map +1 -1
- package/dist/components/virtual-command-entry.cjs +12 -8
- package/dist/components/virtual-command-entry.cjs.map +1 -1
- package/dist/components/virtual-command-entry.mjs +12 -8
- package/dist/components/virtual-command-entry.mjs.map +1 -1
- package/dist/helpers/ansi-utils.cjs +4 -4
- package/dist/helpers/ansi-utils.cjs.map +1 -1
- package/dist/helpers/ansi-utils.mjs +4 -4
- package/dist/helpers/ansi-utils.mjs.map +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.map +1 -1
- package/package.json +24 -10
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["code","For","Show","VarDeclaration","render","theme","BannerFunctionDeclaration","VirtualHelp","BinEntry","CommandEntry","CommandRouter","ConsoleBuiltin","UtilsBuiltin","VirtualCommandEntry","getDefaultOptions","plugin","options","name","config","debug","defaultOptions","isCaseSensitive","configResolved","dependencies","didyoumean2","prepare","_$createComponent","order","handler","_self$","builtinImports","console","utils","env","prefix","_$createIntrinsic","children","when","Object","keys","commands","length","type","initializer","
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["code","For","Show","VarDeclaration","render","theme","BannerFunctionDeclaration","VirtualHelp","BinEntry","CommandEntry","CommandRouter","ConsoleBuiltin","UtilsBuiltin","VirtualCommandEntry","getDefaultOptions","plugin","options","name","config","debug","defaultOptions","isCaseSensitive","configResolved","dependencies","didyoumean2","prepare","_$createComponent","order","handler","_self$","builtinImports","console","utils","env","prefix","_$createIntrinsic","children","when","Object","keys","commands","length","type","initializer","segments","values","each","doubleHardline","child","isVirtual","fallback","command"],"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 { render } from \"@powerlines/plugin-alloy/render\";\nimport theme from \"@shell-shock/plugin-theme\";\nimport type { Plugin } from \"powerlines/types/plugin\";\nimport { BannerFunctionDeclaration, VirtualHelp } from \"./components\";\nimport { BinEntry } from \"./components/bin-entry\";\nimport { CommandEntry } from \"./components/command-entry\";\nimport { CommandRouter } from \"./components/command-router\";\nimport { ConsoleBuiltin } from \"./components/console-builtin\";\nimport { UtilsBuiltin } from \"./components/utils-builtin\";\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 theme({\n theme: options.theme\n }),\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 configResolved() {\n this.dependencies.didyoumean2 = \"^7.0.4\";\n },\n async prepare() {\n this.debug(\n \"Rendering built-in modules for the Shell Shock `script` preset.\"\n );\n\n return render(\n this,\n <>\n <UtilsBuiltin />\n <ConsoleBuiltin />\n </>\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: [\"getArgs\", \"isMinimal\"],\n env: [\"isCI\"]\n }}\n prefix={\n <>\n <BannerFunctionDeclaration />\n <hbr />\n <hbr />\n </>\n }>\n <Show when={Object.keys(this.commands).length > 0}>\n <VarDeclaration\n const\n name=\"args\"\n type=\"string[]\"\n initializer={code`getArgs();`}\n />\n <hbr />\n <CommandRouter segments={[]} commands={this.commands ?? {}} />\n <hbr />\n </Show>\n <hbr />\n <hbr />\n {code`writeLine(\"\");\n banner();`}\n <hbr />\n <hbr />\n <VirtualHelp\n options={this.options}\n commands={this.commands ?? {}}\n />\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":";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AE;;YAAA,CAAA;WAAAL,gBAAA,OAAA,EAAA,CAAA;WAAA;;SAAA,CAAA;QAAAA,gBAAA,OAAA,EAAA,CAAA;QAAAA,gBAAA,OAAA,EAAA,CAAA;QAK3DnC,IAAI;;QACKmC,gBAAA,OAAA,EAAA,CAAA;QAAAA,gBAAA,OAAA,EAAA,CAAA;QAAAT,gBAGTnB,aAAW;SAAA,IACVS,UAAO;AAAA,iBAAEa,OAAKb;;SAAO,IACrBwB,WAAQ;AAAA,iBAAEX,OAAKW,YAAY,EAAE;;SAAA,CAAA;QAAA;;MAAA,CAAA,EAAAd,gBAGhCxB,MAAI;MAAA,IAACmC,OAAI;AAAA,cAAEC,OAAOO,OAAOhB,OAAKW,SAAS,CAACC,SAAS;;MAAC,IAAAL,WAAA;AAAA,cAAAV,gBAChDzB,KAAG;QAAA,IAAC6C,OAAI;AAAA,gBAAER,OAAOO,OAAOhB,OAAKW,SAAS;;QAAEO,gBAAc;QAAAX,WACpDY,UAAKtB,gBACHxB,MAAI;SAAA,IACHmC,OAAI;AAAA,iBAAEW,MAAMC;;SAAS,IACrBC,WAAQ;AAAA,iBAAAxB,gBAAGjB,cAAY,EAAC0C,SAASH,OAAK,CAAA;;SAAA,IAAAZ,WAAA;AAAA,iBAAAV,gBACrCb,qBAAmB,EAACsC,SAASH,OAAK,CAAA;;SAAA,CAAA;QAEtC,CAAA;;MAAA,CAAA,CAIT,CAAC;;IAEL;GACD;EACF;;AAGH,kBAAejC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;UAmCiB,mBAAA,SACP,KAAK,4BAA4B,QAAQ;;AADnD;;;;;;;;;;EAmBY,cAAA,CAAA,EALN,aAK4B,EAAA,GAAA,CAAG,
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;UAmCiB,mBAAA,SACP,KAAK,4BAA4B,QAAQ;;AADnD;;;;;;;;;;EAmBY,cAAA,CAAA,EALN,aAK4B,EAAA,GAAA,CAAA,CAAG,OAAA,EAJpB,OAIiC,EAAA,KAAA,EAJjB,WAIoC,EAAA,GAJpB,aAIoB,EAAA,CAAA,GAAA,KAAA;AAErE;AAAyC,KAF7B,sBAAA,GAAyB,UAEI,GAFS,mBAET;AACzB,KADJ,0BAAA,GAA6B,cACzB,GAAd,QAAc,CAAL,IAAK,CAAA,mBAAA,EAAA,OAAA,CAAA,CAAA,GACd,yBADc;AAAL,KAGC,mBAHD,CAAA,wBAIe,0BAJf,GAKP,0BALO,CAAA,GAMP,kBANO,CAMY,eANZ,CAAA,GAOT,kBAPS,CAOU,eAPV,CAAA,GAQT,OARS,CAQD,eARC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shell-shock/preset-script",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Shell Shock preset that generates a fully-featured script application.",
|
|
6
6
|
"repository": {
|
|
@@ -153,6 +153,20 @@
|
|
|
153
153
|
"default": "./dist/components/help.mjs"
|
|
154
154
|
}
|
|
155
155
|
},
|
|
156
|
+
"./components/helpers": {
|
|
157
|
+
"require": {
|
|
158
|
+
"types": "./dist/components/helpers.d.cts",
|
|
159
|
+
"default": "./dist/components/helpers.cjs"
|
|
160
|
+
},
|
|
161
|
+
"import": {
|
|
162
|
+
"types": "./dist/components/helpers.d.mts",
|
|
163
|
+
"default": "./dist/components/helpers.mjs"
|
|
164
|
+
},
|
|
165
|
+
"default": {
|
|
166
|
+
"types": "./dist/components/helpers.d.mts",
|
|
167
|
+
"default": "./dist/components/helpers.mjs"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
156
170
|
"./components/utils-builtin": {
|
|
157
171
|
"require": {
|
|
158
172
|
"types": "./dist/components/utils-builtin.d.cts",
|
|
@@ -279,22 +293,22 @@
|
|
|
279
293
|
"dependencies": {
|
|
280
294
|
"@alloy-js/core": "^0.22.0",
|
|
281
295
|
"@alloy-js/typescript": "^0.22.0",
|
|
282
|
-
"@powerlines/deepkit": "^0.6.
|
|
283
|
-
"@powerlines/plugin-alloy": "^0.20.
|
|
284
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
285
|
-
"@shell-shock/core": "^0.
|
|
286
|
-
"@shell-shock/plugin-theme": "^0.0.
|
|
296
|
+
"@powerlines/deepkit": "^0.6.51",
|
|
297
|
+
"@powerlines/plugin-alloy": "^0.20.15",
|
|
298
|
+
"@powerlines/plugin-plugin": "^0.12.222",
|
|
299
|
+
"@shell-shock/core": "^0.8.0",
|
|
300
|
+
"@shell-shock/plugin-theme": "^0.0.17",
|
|
287
301
|
"@stryke/path": "0.26.4",
|
|
288
302
|
"@stryke/string-format": "0.13.7",
|
|
289
303
|
"defu": "6.1.4",
|
|
290
|
-
"powerlines": "^0.38.
|
|
304
|
+
"powerlines": "^0.38.38",
|
|
291
305
|
"@stryke/helpers": "^0.9.40"
|
|
292
306
|
},
|
|
293
307
|
"devDependencies": {
|
|
294
308
|
"@babel/core": "^7.29.0",
|
|
295
|
-
"@powerlines/plugin-alloy": "^0.20.
|
|
296
|
-
"@types/node": "^22.19.
|
|
309
|
+
"@powerlines/plugin-alloy": "^0.20.15",
|
|
310
|
+
"@types/node": "^22.19.10"
|
|
297
311
|
},
|
|
298
312
|
"publishConfig": { "access": "public" },
|
|
299
|
-
"gitHead": "
|
|
313
|
+
"gitHead": "a3710248496a9b6251c18d6ee4af3587a0dc1fa5"
|
|
300
314
|
}
|