@shell-shock/plugin-banner 0.1.31 → 0.1.33

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
@@ -11,7 +11,6 @@ let _shell_shock_plugin_console = require("@shell-shock/plugin-console");
11
11
  _shell_shock_plugin_console = require_runtime.__toESM(_shell_shock_plugin_console);
12
12
  let _shell_shock_plugin_theme = require("@shell-shock/plugin-theme");
13
13
  _shell_shock_plugin_theme = require_runtime.__toESM(_shell_shock_plugin_theme);
14
- let _stryke_path_join = require("@stryke/path/join");
15
14
 
16
15
  //#region src/index.tsx
17
16
  /**
@@ -28,27 +27,12 @@ const plugin = (options = {}) => {
28
27
  return { banner: { title: options.title } };
29
28
  },
30
29
  prepare: { async handler() {
30
+ const _self$ = this;
31
31
  const commands = await (0, _shell_shock_core_plugin_utils.getCommandList)(this);
32
32
  this.debug(`Rendering \`banner\` built-ins for each of the ${commands.length} command modules.`);
33
- const bin = (0, _alloy_js_core.computed)(() => ({
34
- id: "",
35
- name: (0, _shell_shock_core_plugin_utils.getAppName)(this),
36
- title: "",
37
- description: (0, _shell_shock_core_plugin_utils.getAppDescription)(this),
38
- isVirtual: true,
39
- path: null,
40
- segments: [],
41
- alias: [],
42
- tags: [],
43
- options: Object.fromEntries(this.options.map((option) => [option.name, option])),
44
- entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "bin.ts") },
45
- args: [],
46
- parent: null,
47
- children: this.commands
48
- }));
49
33
  return (0, _powerlines_plugin_alloy_render.render)(this, [
50
34
  (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_banner_builtin.BannerBuiltin, { get command() {
51
- return bin.value;
35
+ return (0, _shell_shock_core_plugin_utils.computeBin)(_self$);
52
36
  } }),
53
37
  (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components.Spacing, {}),
54
38
  (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AAsCA;cAAa,MAAA,oBACM,mBAAA,GAAsB,mBAAA,EAEvC,OAAA,GAAS,mBAAA,KA4DJ,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AAiCA;cAAa,MAAA,oBACM,mBAAA,GAAsB,mBAAA,EAEvC,OAAA,GAAS,mBAAA,KAuCJ,MAAA,CAAO,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AAsCA;cAAa,MAAA,oBACM,mBAAA,GAAsB,mBAAA,EAEvC,OAAA,GAAS,mBAAA,KA4DJ,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AAiCA;cAAa,MAAA,oBACM,mBAAA,GAAsB,mBAAA,EAEvC,OAAA,GAAS,mBAAA,KAuCJ,MAAA,CAAO,QAAA"}
package/dist/index.mjs CHANGED
@@ -1,13 +1,12 @@
1
1
  import { BannerBuiltin } from "./components/banner-builtin.mjs";
2
2
  import "./components/index.mjs";
3
3
  import { createComponent } from "@alloy-js/core/jsx-runtime";
4
- import { For, computed } from "@alloy-js/core";
4
+ import { For } from "@alloy-js/core";
5
5
  import { Spacing } from "@powerlines/plugin-alloy/core/components";
6
6
  import { render } from "@powerlines/plugin-alloy/render";
7
- import { getAppDescription, getAppName, getCommandList } from "@shell-shock/core/plugin-utils";
7
+ import { computeBin, getCommandList } from "@shell-shock/core/plugin-utils";
8
8
  import console from "@shell-shock/plugin-console";
9
9
  import theme from "@shell-shock/plugin-theme";
10
- import { joinPaths } from "@stryke/path/join";
11
10
 
12
11
  //#region src/index.tsx
13
12
  /**
@@ -24,27 +23,12 @@ const plugin = (options = {}) => {
24
23
  return { banner: { title: options.title } };
25
24
  },
26
25
  prepare: { async handler() {
26
+ const _self$ = this;
27
27
  const commands = await getCommandList(this);
28
28
  this.debug(`Rendering \`banner\` built-ins for each of the ${commands.length} command modules.`);
29
- const bin = computed(() => ({
30
- id: "",
31
- name: getAppName(this),
32
- title: "",
33
- description: getAppDescription(this),
34
- isVirtual: true,
35
- path: null,
36
- segments: [],
37
- alias: [],
38
- tags: [],
39
- options: Object.fromEntries(this.options.map((option) => [option.name, option])),
40
- entry: { file: joinPaths(this.entryPath, "bin.ts") },
41
- args: [],
42
- parent: null,
43
- children: this.commands
44
- }));
45
29
  return render(this, [
46
30
  createComponent(BannerBuiltin, { get command() {
47
- return bin.value;
31
+ return computeBin(_self$);
48
32
  } }),
49
33
  createComponent(Spacing, {}),
50
34
  createComponent(For, {
@@ -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 } 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 getCommandList\n} from \"@shell-shock/core/plugin-utils\";\nimport console from \"@shell-shock/plugin-console\";\nimport theme from \"@shell-shock/plugin-theme\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport type { Plugin } from \"powerlines\";\nimport { BannerBuiltin } from \"./components\";\nimport type { BannerPluginContext, BannerPluginOptions } from \"./types/plugin\";\n\nexport type * from \"./types\";\n\n/**\n * The Banner - Shell Shock plugin to add a banner command to the application.\n */\nexport const plugin = <\n TContext extends BannerPluginContext = BannerPluginContext\n>(\n options: BannerPluginOptions = {}\n) => {\n return [\n ...theme(options.theme),\n console(options.console),\n {\n name: \"shell-shock:banner\",\n enforce: \"post\",\n config() {\n return {\n banner: {\n title: options.title\n }\n };\n },\n prepare: {\n async handler() {\n const commands = await getCommandList(this);\n this.debug(\n `Rendering \\`banner\\` 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: \"\",\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 <BannerBuiltin command={bin.value} />\n <Spacing />\n <For\n each={commands.sort((a, b) => a.name.localeCompare(b.name))}\n doubleHardline>\n {command => <BannerBuiltin command={command} />}\n </For>\n </>\n );\n }\n }\n }\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;AAmCE,QAAA;EAAA,GAAA,MAAA,QAAA,MAAA;EAAA,QAAA,QAAA,QAAA;EAAA;GACC,MAAI;GACL,SAAA;GACF,SAAa;AACX,WAAS,EACV,QAAA,EACS,OAAC,QAAA,OACN,EACH;;GAEE,SAAQ,EACR,MAAA,UAAA;IACE,MAAO,WAAY,MAAM,eAAC,KAAA;AAC1B,SAAO,MAAG,kDAAK,SAAA,OAAA,mBAAA;IACf,MAAQ,MAAC,gBAAA;KACP,IAAM;KACJ,MAAM,WAAE,KAAA;KACR,OAAO;KACP,aAAA,kBAAA,KAAA;KACD,WAAA;KACF,MAAA;KACD,UAAS,EAAA;KACP,OAAM,EAAA;KACJ,MAAM,EAAA;KACN,SAAK,OAAK,YAAA,KAAA,QAAA,KAAA,WAAA,CAAA,OAAA,MAAA,OAAA,CAAA,CAAA;KACV,OAAG,EACD,MAAE,UAAS,KAAA,WAAA,SAAA,EACZ;KACD,MAAC,EAAA;;KAED,UAAU,KAAE;KACb,EAAE;AACH,WAAI,OAAM,MAAU;KAAC,gBAAK,eAAA,EACxB,IAAE,UAAS;AACT,aAAA,IAAW;QAEd,CAAC;KAAE,gBAAU,SAAA,EAAA,CAAA;KAAA,gBAAA,KAAA;MACZ,IAAE,OAAS;AACT,cAAO,SAAE,MAAA,GAAA,MAAA,EAAA,KAAA,cAAA,EAAA,KAAA,CAAA;;MAEX,gBAAW;MACX,WAAS,YAAY,gBAAkB,eAAa,EACjD,SACF,CAAC;MACH,CAAC;KAAC,CAAC;MAEP;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 { For } from \"@alloy-js/core\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport { computeBin, getCommandList } from \"@shell-shock/core/plugin-utils\";\nimport console from \"@shell-shock/plugin-console\";\nimport theme from \"@shell-shock/plugin-theme\";\nimport type { Plugin } from \"powerlines\";\nimport { BannerBuiltin } from \"./components\";\nimport type { BannerPluginContext, BannerPluginOptions } from \"./types/plugin\";\n\nexport type * from \"./types\";\n\n/**\n * The Banner - Shell Shock plugin to add a banner command to the application.\n */\nexport const plugin = <\n TContext extends BannerPluginContext = BannerPluginContext\n>(\n options: BannerPluginOptions = {}\n) => {\n return [\n ...theme(options.theme),\n console(options.console),\n {\n name: \"shell-shock:banner\",\n enforce: \"post\",\n config() {\n return {\n banner: {\n title: options.title\n }\n };\n },\n prepare: {\n async handler() {\n const commands = await getCommandList(this);\n this.debug(\n `Rendering \\`banner\\` built-ins for each of the ${\n commands.length\n } command modules.`\n );\n\n return render(\n this,\n <>\n <BannerBuiltin command={computeBin(this)} />\n <Spacing />\n <For\n each={commands.sort((a, b) => a.name.localeCompare(b.name))}\n doubleHardline>\n {command => <BannerBuiltin command={command} />}\n </For>\n </>\n );\n }\n }\n }\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;AAiCA,MAAa,UAAS,UAAA,EAAA,KAAA;AACpB,QAAA;EAAQ,GAAC,MAAQ,QAAA,MAAA;EAAA,QAAsB,QAAA,QAAA;EAAA;GACxC,MAAA;GACC,SAAS;GACP,SAAC;AACH,WAAO,EACF,QAAM,EACT,OAAQ,QAAQ,OAChB,EACE;;GAEF,SAAS,EACP,MAAE,UAAO;IACP,MAAE,SAAQ;IACV,MAAI,WAAO,MAAQ,eAAA,KAAA;AACnB,SAAE,MAAA,kDAAA,SAAA,OAAA,mBAAA;AACF,WAAC,OAAA,MAAA;KAAA,gBAAA,eAAA,EACF,IAAA,UAAA;AACD,aAAS,WAAA,OAAA;QAEN,CAAC;KAAA,gBAAiB,SAAM,EAAA,CAAA;KAAA,gBAAoB,KAAA;MAC3C,IAAI,OAAM;AACR,cAAC,SAAY,MAAS,GAAA,MAAS,EAAC,KAAI,cAAa,EAAA,KAAA,CAAA;;MAEnD,gBAAY;MACZ,WAAC,YAAA,gBAAA,eAAA,WAED,CAAA;MACD,CAAC;KAAC,CAAC;MAEP;GACF;EAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shell-shock/plugin-banner",
3
- "version": "0.1.31",
3
+ "version": "0.1.33",
4
4
  "private": false,
5
5
  "description": "A package containing a Shell Shock plugin to generate banner built-in modules that display information about the application.",
6
6
  "keywords": [
@@ -52,19 +52,19 @@
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.8.1",
56
- "@powerlines/plugin-alloy": "^0.26.16",
57
- "@powerlines/plugin-plugin": "^0.12.348",
58
- "@shell-shock/core": "^0.17.4",
59
- "@shell-shock/plugin-theme": "^0.4.17",
60
- "@shell-shock/plugin-console": "^0.2.8",
55
+ "@powerlines/deepkit": "^0.8.2",
56
+ "@powerlines/plugin-alloy": "^0.26.18",
57
+ "@powerlines/plugin-plugin": "^0.12.350",
58
+ "@shell-shock/core": "^0.17.6",
59
+ "@shell-shock/plugin-theme": "^0.4.19",
60
+ "@shell-shock/plugin-console": "^0.2.10",
61
61
  "@stryke/path": "^0.27.4",
62
62
  "@stryke/type-checks": "^0.6.1",
63
63
  "defu": "^6.1.7",
64
- "powerlines": "^0.42.38"
64
+ "powerlines": "^0.42.40"
65
65
  },
66
66
  "devDependencies": {
67
- "@powerlines/plugin-deepkit": "^0.11.278",
67
+ "@powerlines/plugin-deepkit": "^0.11.280",
68
68
  "@types/node": "^25.6.0"
69
69
  },
70
70
  "publishConfig": { "access": "public" },
@@ -155,5 +155,5 @@
155
155
  }
156
156
  }
157
157
  },
158
- "gitHead": "1364666ac28f03cca26271afb582c71a2fe12ecd"
158
+ "gitHead": "592aee8162fccb2d8547f6cf31b820aca3ae13ec"
159
159
  }