@shell-shock/plugin-help 0.2.20 → 0.2.21

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/index.cjs CHANGED
@@ -50,6 +50,7 @@ const plugin = (options = {}) => {
50
50
  input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "help", "command.ts") }
51
51
  },
52
52
  isVirtual: false,
53
+ source: "help-plugin",
53
54
  ...this.config.help.command
54
55
  });
55
56
  await (0, _powerlines_plugin_alloy_render.render)(this, (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_help_command.HelpCommand, {}));
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AA0CA;cAAa,MAAA,oBAA2B,iBAAA,GAAoB,iBAAA,EAC1D,OAAA,GAAS,iBAAA,KAmHJ,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AA0CA;cAAa,MAAA,oBAA2B,iBAAA,GAAoB,iBAAA,EAC1D,OAAA,GAAS,iBAAA,KAoHJ,MAAA,CAAO,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AA0CA;cAAa,MAAA,oBAA2B,iBAAA,GAAoB,iBAAA,EAC1D,OAAA,GAAS,iBAAA,KAmHJ,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AA0CA;cAAa,MAAA,oBAA2B,iBAAA,GAAoB,iBAAA,EAC1D,OAAA,GAAS,iBAAA,KAoHJ,MAAA,CAAO,QAAA"}
package/dist/index.mjs CHANGED
@@ -45,6 +45,7 @@ const plugin = (options = {}) => {
45
45
  input: { file: joinPaths(this.entryPath, "help", "command.ts") }
46
46
  },
47
47
  isVirtual: false,
48
+ source: "help-plugin",
48
49
  ...this.config.help.command
49
50
  });
50
51
  await render(this, createComponent(HelpCommand, {}));
@@ -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 { computed, For, Show } from \"@alloy-js/core\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport {\n getAppDescription,\n getAppName,\n getAppTitle,\n getCommandList\n} from \"@shell-shock/core/plugin-utils\";\nimport type { CommandConfig } from \"@shell-shock/core/types/command\";\nimport console from \"@shell-shock/plugin-console\";\nimport theme from \"@shell-shock/plugin-theme\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport defu from \"defu\";\nimport type { Plugin } from \"powerlines\";\nimport { HelpBuiltin, HelpCommand } from \"./components\";\nimport type { HelpPluginContext, HelpPluginOptions } from \"./types/plugin\";\n\nexport type * from \"./types\";\n\n/**\n * The Help - Shell Shock plugin to add a help command to the application.\n */\nexport const plugin = <TContext extends HelpPluginContext = HelpPluginContext>(\n options: HelpPluginOptions = {}\n) => {\n return [\n ...theme(options.theme),\n console(options.console),\n {\n name: \"shell-shock:help\",\n enforce: \"post\",\n config() {\n this.debug(\n \"Providing default configuration for the Shell Shock `help` plugin.\"\n );\n\n return {\n help: defu(\n {\n command:\n options.command === false\n ? false\n : isSetString(options.command)\n ? { name: options.command }\n : { name: \"help\" }\n },\n options,\n {\n builtins: true\n }\n )\n };\n },\n async configResolved() {\n this.debug(\"Adding the Help command to the application context.\");\n\n if (this.config.help.command !== false) {\n this.inputs ??= [];\n if (\n this.inputs.some(\n input =>\n input.name === (this.config.help.command as CommandConfig).name\n )\n ) {\n this.info(\n \"The `help` command already exists in the commands list. If you would like the help command to be managed by the `@shell-shock/plugin-help` package, please remove or rename the command.\"\n );\n } else {\n this.inputs.push({\n id: this.config.help.command.name,\n path: this.config.help.command.name,\n segments: [this.config.help.command.name],\n title: \"Help\",\n icon: \"🛈\",\n tags: [\"Utility\"],\n description: `Display command usage details and other useful information to the user.`,\n entry: {\n file: joinPaths(this.entryPath, \"help\", \"index.ts\"),\n input: {\n file: joinPaths(this.entryPath, \"help\", \"command.ts\")\n }\n },\n isVirtual: false,\n ...this.config.help.command\n });\n }\n\n await render(this, <HelpCommand />);\n }\n },\n prepare: {\n order: \"post\",\n async handler() {\n const commands = await getCommandList(this);\n this.debug(\n `Rendering \\`help\\` built-ins for each of the ${\n commands.length\n } command modules.`\n );\n\n const bin = computed(() => ({\n id: \"\",\n name: getAppName(this),\n title: getAppTitle(this),\n description: getAppDescription(this),\n isVirtual: true,\n path: null,\n segments: [],\n alias: [],\n tags: [],\n options: Object.fromEntries(\n this.options.map(option => [option.name, option])\n ),\n entry: {\n file: joinPaths(this.entryPath, \"bin.ts\")\n },\n args: [],\n parent: null,\n children: this.commands\n }));\n\n return render(\n this,\n <>\n <Show when={this.config.help.builtins !== false}>\n <HelpBuiltin command={bin.value} />\n <Spacing />\n <For\n each={commands.sort((a, b) => a.name.localeCompare(b.name))}\n doubleHardline>\n {command => <HelpBuiltin command={command} />}\n </For>\n </Show>\n </>\n );\n }\n }\n }\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAqCA,MAAa,UAAe,UAAA,EAAA,KAAA;;;;;GAE1B,MAAA;GACC,SAAU;GACX,SAAA;AACI,SAAC,MAAM,qEAAiE;AAC5E,WAAS,EACN,MAAA,KAA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;MACD,MAAM,EAAC;MACP,QAAI;MACJ,UAAA,KAAA;;AAEF,YAAO,OAAO,MAAM,CAAC,gBAAgB,MAAA;MACrC,IAAA,OAAA;AACD,cAAA,OAAA,OAAA,KAAA,aAAA;;MAEC,IAAM,WAAO;AACb,cAAM;QAAA,gBAAU,aAAA,EACd,IAAM,UAAW;AACZ,gBAAK,IAAA;WAEP,CAAC;QAAA,gBAAS,SAAA,EAAA,CAAA;QAAA,gBAAA,KAAA;SACT,IAAA,OAAQ;AACX,iBAAA,SAAA,MAAA,GAAA,MAAA,EAAA,KAAA,cAAA,EAAA,KAAA,CAAA;;SAED,gBAAoB;SAChB,WAAI,YAAA,gBAAA,aAAA,EACA,SACN,CAAA;SACA,CAAA;QAAA;;MAEH,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 { computed, For, Show } from \"@alloy-js/core\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport {\n getAppDescription,\n getAppName,\n getAppTitle,\n getCommandList\n} from \"@shell-shock/core/plugin-utils\";\nimport type { CommandConfig } from \"@shell-shock/core/types/command\";\nimport console from \"@shell-shock/plugin-console\";\nimport theme from \"@shell-shock/plugin-theme\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport defu from \"defu\";\nimport type { Plugin } from \"powerlines\";\nimport { HelpBuiltin, HelpCommand } from \"./components\";\nimport type { HelpPluginContext, HelpPluginOptions } from \"./types/plugin\";\n\nexport type * from \"./types\";\n\n/**\n * The Help - Shell Shock plugin to add a help command to the application.\n */\nexport const plugin = <TContext extends HelpPluginContext = HelpPluginContext>(\n options: HelpPluginOptions = {}\n) => {\n return [\n ...theme(options.theme),\n console(options.console),\n {\n name: \"shell-shock:help\",\n enforce: \"post\",\n config() {\n this.debug(\n \"Providing default configuration for the Shell Shock `help` plugin.\"\n );\n\n return {\n help: defu(\n {\n command:\n options.command === false\n ? false\n : isSetString(options.command)\n ? { name: options.command }\n : { name: \"help\" }\n },\n options,\n {\n builtins: true\n }\n )\n };\n },\n async configResolved() {\n this.debug(\"Adding the Help command to the application context.\");\n\n if (this.config.help.command !== false) {\n this.inputs ??= [];\n if (\n this.inputs.some(\n input =>\n input.name === (this.config.help.command as CommandConfig).name\n )\n ) {\n this.info(\n \"The `help` command already exists in the commands list. If you would like the help command to be managed by the `@shell-shock/plugin-help` package, please remove or rename the command.\"\n );\n } else {\n this.inputs.push({\n id: this.config.help.command.name,\n path: this.config.help.command.name,\n segments: [this.config.help.command.name],\n title: \"Help\",\n icon: \"🛈\",\n tags: [\"Utility\"],\n description: `Display command usage details and other useful information to the user.`,\n entry: {\n file: joinPaths(this.entryPath, \"help\", \"index.ts\"),\n input: {\n file: joinPaths(this.entryPath, \"help\", \"command.ts\")\n }\n },\n isVirtual: false,\n source: \"help-plugin\",\n ...this.config.help.command\n });\n }\n\n await render(this, <HelpCommand />);\n }\n },\n prepare: {\n order: \"post\",\n async handler() {\n const commands = await getCommandList(this);\n this.debug(\n `Rendering \\`help\\` built-ins for each of the ${\n commands.length\n } command modules.`\n );\n\n const bin = computed(() => ({\n id: \"\",\n name: getAppName(this),\n title: getAppTitle(this),\n description: getAppDescription(this),\n isVirtual: true,\n path: null,\n segments: [],\n alias: [],\n tags: [],\n options: Object.fromEntries(\n this.options.map(option => [option.name, option])\n ),\n entry: {\n file: joinPaths(this.entryPath, \"bin.ts\")\n },\n args: [],\n parent: null,\n children: this.commands\n }));\n\n return render(\n this,\n <>\n <Show when={this.config.help.builtins !== false}>\n <HelpBuiltin command={bin.value} />\n <Spacing />\n <For\n each={commands.sort((a, b) => a.name.localeCompare(b.name))}\n doubleHardline>\n {command => <HelpBuiltin command={command} />}\n </For>\n </Show>\n </>\n );\n }\n }\n }\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAqCA,MAAa,UAAe,UAAA,EAAA,KAAA;;;;;GAE1B,MAAA;GACC,SAAU;GACX,SAAA;AACI,SAAC,MAAM,qEAAiE;AAC5E,WAAS,EACN,MAAA,KAAA,EACI,SAAA,QAAA,YAAA,QAAA,QAAA,YAAA,QAAA,QAAA,GAAA,EACG,MAAC,QAAa,SACf,GAAC,EACR,MAAA,QACO,EACL,EAAA,SAAc,EACd,UAAS,MACP,CAAA,EACD;;;AAGD,SAAE,MAAO,sDAAA;AACT,QAAI,KAAK,OAAK,KAAA,YAAA,OAAA;AACZ,UAAI,WAAA,EAAA;AACJ,SAAI,KAAE,OAAO,MAAA,UAAA,MAAA,SAAA,KAAA,OAAA,KAAA,QAAA,KAAA,CACX,MAAK,KAAC,2LAAoB;SAE1B,MAAK,OAAK,KAAA;MACR,IAAI,KAAK,OAAO,KAAE,QAAQ;MAC1B,MAAM,KAAK,OAAO,KAAK,QAAE;MACzB,UAAC,CAAA,KAAA,OAAA,KAAA,QAAA,KAAA;MACD,OAAO;MACP,MAAA;MACA,MAAE,CAAA,UAAU;MACZ,aAAA;MACF,OAAA;OACD,MAAA,UAAA,KAAA,WAAA,QAAA,WAAA;OACF,OAAA,EACK,MAAA,UAAiB,KAAA,WAAA,QAAA,aAAA,EAChB;;MAED,WAAW;MACb,QAAK;MACH,GAAC,KAAA,OAAA,KAAA;MACF,CAAC;AAEJ,WAAM,OAAO,MAAM,gBAAiB,aAAa,EAAG,CAAA,CAAA;;;GAGxD,SAAQ;IACN,OAAO;IACP,MAAM,UAAC;KACL,MAAI,SAAK;KACT,MAAI,WAAY,MAAK,eAAA,KAAA;AACrB,UAAK,MAAK,gDAA6B,SAAA,OAAA,mBAAA;KACvC,MAAM,MAAM,gBAAgB;MAC1B,IAAI;MACJ,MAAI,WAAa,KAAA;MACjB,OAAI,YAAU,KAAA;MACd,aAAY,kBAAS,KAAA;MACrB,WAAI;MACJ,MAAI;MACJ,UAAU,EAAE;MACZ,OAAM,EAAA;MACN,MAAM,EAAE;MACR,SAAM,OAAA,YAAA,KAAA,QAAA,KAAA,WAAA,CAAA,OAAA,MAAA,OAAA,CAAA,CAAA;MACN,OAAK,EACH,MAAE,UAAW,KAAK,WAAA,SAAA,EACnB;MACD,MAAM,EAAC;MACP,QAAI;MACJ,UAAA,KAAA;;AAEF,YAAO,OAAO,MAAM,CAAC,gBAAgB,MAAA;MACrC,IAAA,OAAA;AACD,cAAA,OAAA,OAAA,KAAA,aAAA;;MAEC,IAAM,WAAO;AACb,cAAM;QAAA,gBAAU,aAAA,EACd,IAAM,UAAW;AACZ,gBAAK,IAAA;WAEP,CAAC;QAAA,gBAAS,SAAA,EAAA,CAAA;QAAA,gBAAA,KAAA;SACT,IAAA,OAAQ;AACX,iBAAA,SAAA,MAAA,GAAA,MAAA,EAAA,KAAA,cAAA,EAAA,KAAA,CAAA;;SAED,gBAAoB;SAChB,WAAI,YAAA,gBAAA,aAAA,EACA,SACN,CAAA;SACA,CAAA;QAAA;;MAEH,CAAC,CAAC,CAAC;;IAEP;GACF;EAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shell-shock/plugin-help",
3
- "version": "0.2.20",
3
+ "version": "0.2.21",
4
4
  "private": false,
5
5
  "description": "A package containing a Shell Shock plugin to provide help and documentation for the local application's commands.",
6
6
  "keywords": [
@@ -52,21 +52,21 @@
52
52
  "dependencies": {
53
53
  "@alloy-js/core": "0.23.0-dev.8",
54
54
  "@alloy-js/typescript": "0.23.0-dev.4",
55
- "@powerlines/deepkit": "^0.6.167",
56
- "@powerlines/plugin-alloy": "^0.26.10",
57
- "@powerlines/plugin-plugin": "^0.12.344",
58
- "@shell-shock/core": "^0.17.2",
59
- "@shell-shock/plugin-theme": "^0.4.15",
60
- "@shell-shock/plugin-console": "^0.2.6",
55
+ "@powerlines/deepkit": "^0.8.0",
56
+ "@powerlines/plugin-alloy": "^0.26.15",
57
+ "@powerlines/plugin-plugin": "^0.12.347",
58
+ "@shell-shock/core": "^0.17.3",
59
+ "@shell-shock/plugin-theme": "^0.4.16",
60
+ "@shell-shock/plugin-console": "^0.2.7",
61
61
  "@stryke/string-format": "^0.17.9",
62
62
  "@stryke/type-checks": "^0.6.1",
63
63
  "@stryke/path": "^0.27.4",
64
64
  "@stryke/types": "^0.11.3",
65
65
  "defu": "^6.1.7",
66
- "powerlines": "^0.42.34"
66
+ "powerlines": "^0.42.37"
67
67
  },
68
68
  "devDependencies": {
69
- "@powerlines/plugin-deepkit": "^0.11.272",
69
+ "@powerlines/plugin-deepkit": "^0.11.277",
70
70
  "@types/node": "^25.6.0"
71
71
  },
72
72
  "publishConfig": { "access": "public" },
@@ -171,5 +171,5 @@
171
171
  }
172
172
  }
173
173
  },
174
- "gitHead": "38e2393cfc876607226b05a59cc9bd62e3b59960"
174
+ "gitHead": "d6ec6746792a83206915332c4eb87c9da70a5148"
175
175
  }