@shell-shock/plugin-completions 0.0.5 → 0.0.7

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 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
- [![Version](https://img.shields.io/badge/version-0.0.3-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://stormsoftware.com/projects/shell-shock/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/shell-shock/release.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
30
+ [![Version](https://img.shields.io/badge/version-0.0.4-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://stormsoftware.com/projects/shell-shock/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/shell-shock/release.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
31
31
 
32
32
  <!-- prettier-ignore-start -->
33
33
  <!-- markdownlint-disable -->
package/dist/index.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
  const require_command = require('./components/command.cjs');
3
3
  require('./components/index.cjs');
4
+ let __shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
4
5
  let __stryke_path_join = require("@stryke/path/join");
5
- let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
6
6
 
7
7
  //#region src/index.ts
8
8
  /**
@@ -22,12 +22,13 @@ const plugin = (options = {}) => {
22
22
  else this.inputs.push({
23
23
  id: "completions",
24
24
  name: "completions",
25
+ alias: ["completion"],
25
26
  path: {
26
27
  segments: ["completions"],
27
28
  value: "completions"
28
29
  },
29
30
  title: "CLI Completions",
30
- description: `Commands for generating shell completion scripts for the ${(0, __stryke_string_format_title_case.titleCase)(this.config.name)}.`,
31
+ description: `Commands for generating shell completion scripts for the ${(0, __shell_shock_core_plugin_utils.getAppTitle)(this)}.`,
31
32
  entry: { file: (0, __stryke_path_join.joinPaths)(this.entryPath, "completions", "command.ts") },
32
33
  isVirtual: true
33
34
  });
@@ -35,6 +36,7 @@ const plugin = (options = {}) => {
35
36
  else this.inputs.push({
36
37
  id: "completions-bash",
37
38
  name: "bash",
39
+ alias: [],
38
40
  path: {
39
41
  segments: ["completions", "bash"],
40
42
  value: "completions/bash"
@@ -47,6 +49,7 @@ const plugin = (options = {}) => {
47
49
  else this.inputs.push({
48
50
  id: "completions-zsh",
49
51
  name: "zsh",
52
+ alias: [],
50
53
  path: {
51
54
  segments: ["completions", "zsh"],
52
55
  value: "completions/zsh"
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { CommandHandlerWrapper } from "./components/command.mjs";
2
2
  import "./components/index.mjs";
3
+ import { getAppTitle } from "@shell-shock/core/plugin-utils";
3
4
  import { joinPaths } from "@stryke/path/join";
4
- import { titleCase } from "@stryke/string-format/title-case";
5
5
 
6
6
  //#region src/index.ts
7
7
  /**
@@ -21,12 +21,13 @@ const plugin = (options = {}) => {
21
21
  else this.inputs.push({
22
22
  id: "completions",
23
23
  name: "completions",
24
+ alias: ["completion"],
24
25
  path: {
25
26
  segments: ["completions"],
26
27
  value: "completions"
27
28
  },
28
29
  title: "CLI Completions",
29
- description: `Commands for generating shell completion scripts for the ${titleCase(this.config.name)}.`,
30
+ description: `Commands for generating shell completion scripts for the ${getAppTitle(this)}.`,
30
31
  entry: { file: joinPaths(this.entryPath, "completions", "command.ts") },
31
32
  isVirtual: true
32
33
  });
@@ -34,6 +35,7 @@ const plugin = (options = {}) => {
34
35
  else this.inputs.push({
35
36
  id: "completions-bash",
36
37
  name: "bash",
38
+ alias: [],
37
39
  path: {
38
40
  segments: ["completions", "bash"],
39
41
  value: "completions/bash"
@@ -46,6 +48,7 @@ const plugin = (options = {}) => {
46
48
  else this.inputs.push({
47
49
  id: "completions-zsh",
48
50
  name: "zsh",
51
+ alias: [],
49
52
  path: {
50
53
  segments: ["completions", "zsh"],
51
54
  value: "completions/zsh"
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["joinPaths","titleCase","plugin","options","name","config","debug","completions","configResolved","inputs","some","input","id","info","push","path","segments","value","title","description","entry","file","entryPath","isVirtual"],"sources":["../src/index.ts"],"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 { joinPaths } from \"@stryke/path/join\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport type { Plugin } from \"powerlines\";\nimport type {\n CompletionsPluginContext,\n CompletionsPluginOptions\n} from \"./types/plugin\";\n\nexport * from \"./components\";\nexport * from \"./types\";\n\n/**\n * The Completions - Shell Shock plugin to add completion commands to a Shell Shock application.\n */\nexport const plugin = <\n TContext extends CompletionsPluginContext = CompletionsPluginContext\n>(\n options: CompletionsPluginOptions = {}\n): Plugin<TContext>[] => {\n return [\n {\n name: \"shell-shock:completions\",\n config() {\n this.debug(\n \"Providing default configuration for the Shell Shock `completions` plugin.\"\n );\n\n return {\n completions: options\n };\n },\n configResolved() {\n this.debug(\"Adding the CLI completion commands to the entry points.\");\n\n this.inputs ??= [];\n if (this.inputs.some(input => input.id === \"completions\")) {\n this.info(\n \"The `completions` command already exists in the commands list. If you would like the completions command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.\"\n );\n } else {\n this.inputs.push({\n id: \"completions\",\n name: \"completions\",\n path: {\n segments: [\"completions\"],\n value: \"completions\"\n },\n title: \"CLI Completions\",\n description: `Commands for generating shell completion scripts for the ${titleCase(this.config.name)}.`,\n entry: {\n file: joinPaths(this.entryPath, \"completions\", \"command.ts\")\n },\n isVirtual: true\n });\n }\n\n if (this.inputs.some(input => input.id === \"completions-bash\")) {\n this.info(\n \"The `completions-bash` command already exists in the commands list. If you would like the completions-bash command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.\"\n );\n } else {\n this.inputs.push({\n id: \"completions-bash\",\n name: \"bash\",\n path: {\n segments: [\"completions\", \"bash\"],\n value: \"completions/bash\"\n },\n title: \"CLI Completions - Bash Shell\",\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"command.ts\"\n )\n },\n isVirtual: false\n });\n }\n\n if (this.inputs.some(input => input.id === \"completions-zsh\")) {\n this.info(\n \"The `completions-zsh` command already exists in the commands list. If you would like the completions-zsh command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.\"\n );\n } else {\n this.inputs.push({\n id: \"completions-zsh\",\n name: \"zsh\",\n path: {\n segments: [\"completions\", \"zsh\"],\n value: \"completions/zsh\"\n },\n title: \"CLI Completions - Zsh Shell\",\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"command.ts\"\n )\n },\n isVirtual: false\n });\n }\n }\n }\n ];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;AAgCA,MAAaE,UAGXC,UAAoC,EAAE,KACf;AACvB,QAAO,CACL;EACEC,MAAM;EACNC,SAAS;AACP,QAAKC,MACH,4EACD;AAED,UAAO,EACLC,aAAaJ,SACd;;EAEHK,iBAAiB;AACf,QAAKF,MAAM,0DAA0D;AAErE,QAAKG,WAAW,EAAE;AAClB,OAAI,KAAKA,OAAOC,MAAKC,UAASA,MAAMC,OAAO,cAAc,CACvD,MAAKC,KACH,gNACD;OAED,MAAKJ,OAAOK,KAAK;IACfF,IAAI;IACJR,MAAM;IACNW,MAAM;KACJC,UAAU,CAAC,cAAc;KACzBC,OAAO;KACR;IACDC,OAAO;IACPC,aAAa,4DAA4DlB,UAAU,KAAKI,OAAOD,KAAK,CAAA;IACpGgB,OAAO,EACLC,MAAMrB,UAAU,KAAKsB,WAAW,eAAe,aAAY,EAC5D;IACDC,WAAW;IACZ,CAAC;AAGJ,OAAI,KAAKd,OAAOC,MAAKC,UAASA,MAAMC,OAAO,mBAAmB,CAC5D,MAAKC,KACH,0NACD;OAED,MAAKJ,OAAOK,KAAK;IACfF,IAAI;IACJR,MAAM;IACNW,MAAM;KACJC,UAAU,CAAC,eAAe,OAAO;KACjCC,OAAO;KACR;IACDC,OAAO;IACPE,OAAO,EACLC,MAAMrB,UACJ,KAAKsB,WACL,eACA,QACA,aACF,EACD;IACDC,WAAW;IACZ,CAAC;AAGJ,OAAI,KAAKd,OAAOC,MAAKC,UAASA,MAAMC,OAAO,kBAAkB,CAC3D,MAAKC,KACH,wNACD;OAED,MAAKJ,OAAOK,KAAK;IACfF,IAAI;IACJR,MAAM;IACNW,MAAM;KACJC,UAAU,CAAC,eAAe,MAAM;KAChCC,OAAO;KACR;IACDC,OAAO;IACPE,OAAO,EACLC,MAAMrB,UACJ,KAAKsB,WACL,eACA,OACA,aACF,EACD;IACDC,WAAW;IACZ,CAAC;;EAGP,CACF;;AAGH,kBAAerB"}
1
+ {"version":3,"file":"index.mjs","names":["getAppTitle","joinPaths","plugin","options","name","config","debug","completions","configResolved","inputs","some","input","id","info","push","alias","path","segments","value","title","description","entry","file","entryPath","isVirtual"],"sources":["../src/index.ts"],"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 { getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport type { Plugin } from \"powerlines\";\nimport type {\n CompletionsPluginContext,\n CompletionsPluginOptions\n} from \"./types/plugin\";\n\nexport * from \"./components\";\nexport * from \"./types\";\n\n/**\n * The Completions - Shell Shock plugin to add completion commands to a Shell Shock application.\n */\nexport const plugin = <\n TContext extends CompletionsPluginContext = CompletionsPluginContext\n>(\n options: CompletionsPluginOptions = {}\n): Plugin<TContext>[] => {\n return [\n {\n name: \"shell-shock:completions\",\n config() {\n this.debug(\n \"Providing default configuration for the Shell Shock `completions` plugin.\"\n );\n\n return {\n completions: options\n };\n },\n configResolved() {\n this.debug(\"Adding the CLI completion commands to the entry points.\");\n\n this.inputs ??= [];\n if (this.inputs.some(input => input.id === \"completions\")) {\n this.info(\n \"The `completions` command already exists in the commands list. If you would like the completions command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.\"\n );\n } else {\n this.inputs.push({\n id: \"completions\",\n name: \"completions\",\n alias: [\"completion\"],\n path: {\n segments: [\"completions\"],\n value: \"completions\"\n },\n title: \"CLI Completions\",\n description: `Commands for generating shell completion scripts for the ${getAppTitle(\n this\n )}.`,\n entry: {\n file: joinPaths(this.entryPath, \"completions\", \"command.ts\")\n },\n isVirtual: true\n });\n }\n\n if (this.inputs.some(input => input.id === \"completions-bash\")) {\n this.info(\n \"The `completions-bash` command already exists in the commands list. If you would like the completions-bash command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.\"\n );\n } else {\n this.inputs.push({\n id: \"completions-bash\",\n name: \"bash\",\n alias: [],\n path: {\n segments: [\"completions\", \"bash\"],\n value: \"completions/bash\"\n },\n title: \"CLI Completions - Bash Shell\",\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"command.ts\"\n )\n },\n isVirtual: false\n });\n }\n\n if (this.inputs.some(input => input.id === \"completions-zsh\")) {\n this.info(\n \"The `completions-zsh` command already exists in the commands list. If you would like the completions-zsh command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.\"\n );\n } else {\n this.inputs.push({\n id: \"completions-zsh\",\n name: \"zsh\",\n alias: [],\n path: {\n segments: [\"completions\", \"zsh\"],\n value: \"completions/zsh\"\n },\n title: \"CLI Completions - Zsh Shell\",\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"command.ts\"\n )\n },\n isVirtual: false\n });\n }\n }\n }\n ];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;AAgCA,MAAaE,UAGXC,UAAoC,EAAE,KACf;AACvB,QAAO,CACL;EACEC,MAAM;EACNC,SAAS;AACP,QAAKC,MACH,4EACD;AAED,UAAO,EACLC,aAAaJ,SACd;;EAEHK,iBAAiB;AACf,QAAKF,MAAM,0DAA0D;AAErE,QAAKG,WAAW,EAAE;AAClB,OAAI,KAAKA,OAAOC,MAAKC,UAASA,MAAMC,OAAO,cAAc,CACvD,MAAKC,KACH,gNACD;OAED,MAAKJ,OAAOK,KAAK;IACfF,IAAI;IACJR,MAAM;IACNW,OAAO,CAAC,aAAa;IACrBC,MAAM;KACJC,UAAU,CAAC,cAAc;KACzBC,OAAO;KACR;IACDC,OAAO;IACPC,aAAa,4DAA4DpB,YACvE,KACD,CAAA;IACDqB,OAAO,EACLC,MAAMrB,UAAU,KAAKsB,WAAW,eAAe,aAAY,EAC5D;IACDC,WAAW;IACZ,CAAC;AAGJ,OAAI,KAAKf,OAAOC,MAAKC,UAASA,MAAMC,OAAO,mBAAmB,CAC5D,MAAKC,KACH,0NACD;OAED,MAAKJ,OAAOK,KAAK;IACfF,IAAI;IACJR,MAAM;IACNW,OAAO,EAAE;IACTC,MAAM;KACJC,UAAU,CAAC,eAAe,OAAO;KACjCC,OAAO;KACR;IACDC,OAAO;IACPE,OAAO,EACLC,MAAMrB,UACJ,KAAKsB,WACL,eACA,QACA,aACF,EACD;IACDC,WAAW;IACZ,CAAC;AAGJ,OAAI,KAAKf,OAAOC,MAAKC,UAASA,MAAMC,OAAO,kBAAkB,CAC3D,MAAKC,KACH,wNACD;OAED,MAAKJ,OAAOK,KAAK;IACfF,IAAI;IACJR,MAAM;IACNW,OAAO,EAAE;IACTC,MAAM;KACJC,UAAU,CAAC,eAAe,MAAM;KAChCC,OAAO;KACR;IACDC,OAAO;IACPE,OAAO,EACLC,MAAMrB,UACJ,KAAKsB,WACL,eACA,OACA,aACF,EACD;IACDC,WAAW;IACZ,CAAC;;EAGP,CACF;;AAGH,kBAAetB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shell-shock/plugin-completions",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "type": "module",
5
5
  "description": "A package containing a Shell Shock plugin to generate source code given a list design tokens.",
6
6
  "repository": {
@@ -98,16 +98,15 @@
98
98
  "dependencies": {
99
99
  "@alloy-js/core": "0.22.0",
100
100
  "@alloy-js/typescript": "^0.22.0",
101
- "@powerlines/plugin-alloy": "^0.20.7",
102
- "@powerlines/plugin-plugin": "^0.12.215",
103
- "@shell-shock/core": "^0.4.1",
101
+ "@powerlines/plugin-alloy": "^0.20.10",
102
+ "@powerlines/plugin-plugin": "^0.12.218",
103
+ "@shell-shock/core": "^0.4.3",
104
104
  "@stryke/path": "^0.26.4",
105
- "@stryke/string-format": "^0.13.7",
106
- "powerlines": "^0.38.31"
105
+ "powerlines": "^0.38.34"
107
106
  },
108
107
  "devDependencies": {
109
- "@powerlines/plugin-deepkit": "^0.11.143",
110
- "@types/node": "^22.19.7"
108
+ "@powerlines/plugin-deepkit": "^0.11.146",
109
+ "@types/node": "^22.19.8"
111
110
  },
112
111
  "publishConfig": {
113
112
  "access": "public",
@@ -124,5 +123,5 @@
124
123
  "./package.json": "./package.json"
125
124
  }
126
125
  },
127
- "gitHead": "e40c2e1e052ea01a5c75aae48a9e9436d4bff313"
126
+ "gitHead": "f9959bdb64b0b497c2504a844eeec7048b407066"
128
127
  }