@shell-shock/plugin-completions 0.2.24 → 0.3.1

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.
Files changed (117) hide show
  1. package/README.md +1 -1
  2. package/dist/components/bash-config-command.cjs +132 -0
  3. package/dist/components/bash-config-command.d.cts +10 -0
  4. package/dist/components/bash-config-command.d.cts.map +1 -0
  5. package/dist/components/bash-config-command.d.mts +10 -0
  6. package/dist/components/bash-config-command.d.mts.map +1 -0
  7. package/dist/components/bash-config-command.mjs +132 -0
  8. package/dist/components/bash-config-command.mjs.map +1 -0
  9. package/dist/components/bash-script-command.cjs +106 -0
  10. package/dist/components/bash-script-command.d.cts +10 -0
  11. package/dist/components/bash-script-command.d.cts.map +1 -0
  12. package/dist/components/bash-script-command.d.mts +10 -0
  13. package/dist/components/bash-script-command.d.mts.map +1 -0
  14. package/dist/components/bash-script-command.mjs +106 -0
  15. package/dist/components/bash-script-command.mjs.map +1 -0
  16. package/dist/components/bash-shared.cjs +172 -0
  17. package/dist/components/bash-shared.d.cts +10 -0
  18. package/dist/components/bash-shared.d.cts.map +1 -0
  19. package/dist/components/bash-shared.d.mts +10 -0
  20. package/dist/components/bash-shared.d.mts.map +1 -0
  21. package/dist/components/bash-shared.mjs +172 -0
  22. package/dist/components/bash-shared.mjs.map +1 -0
  23. package/dist/components/fish-config-command.cjs +132 -0
  24. package/dist/components/fish-config-command.d.cts +10 -0
  25. package/dist/components/fish-config-command.d.cts.map +1 -0
  26. package/dist/components/fish-config-command.d.mts +10 -0
  27. package/dist/components/fish-config-command.d.mts.map +1 -0
  28. package/dist/components/fish-config-command.mjs +132 -0
  29. package/dist/components/fish-config-command.mjs.map +1 -0
  30. package/dist/components/fish-script-command.cjs +106 -0
  31. package/dist/components/fish-script-command.d.cts +10 -0
  32. package/dist/components/fish-script-command.d.cts.map +1 -0
  33. package/dist/components/fish-script-command.d.mts +10 -0
  34. package/dist/components/fish-script-command.d.mts.map +1 -0
  35. package/dist/components/fish-script-command.mjs +106 -0
  36. package/dist/components/fish-script-command.mjs.map +1 -0
  37. package/dist/components/{fish-command.cjs → fish-shared.cjs} +40 -144
  38. package/dist/components/fish-shared.d.cts +10 -0
  39. package/dist/components/fish-shared.d.cts.map +1 -0
  40. package/dist/components/fish-shared.d.mts +10 -0
  41. package/dist/components/fish-shared.d.mts.map +1 -0
  42. package/dist/components/{fish-command.mjs → fish-shared.mjs} +45 -149
  43. package/dist/components/fish-shared.mjs.map +1 -0
  44. package/dist/components/index.cjs +24 -8
  45. package/dist/components/index.d.cts +13 -5
  46. package/dist/components/index.d.mts +13 -5
  47. package/dist/components/index.mjs +13 -5
  48. package/dist/components/powershell-config-command.cjs +128 -0
  49. package/dist/components/powershell-config-command.d.cts +7 -0
  50. package/dist/components/powershell-config-command.d.cts.map +1 -0
  51. package/dist/components/powershell-config-command.d.mts +7 -0
  52. package/dist/components/powershell-config-command.d.mts.map +1 -0
  53. package/dist/components/powershell-config-command.mjs +128 -0
  54. package/dist/components/powershell-config-command.mjs.map +1 -0
  55. package/dist/components/powershell-script-command.cjs +106 -0
  56. package/dist/components/powershell-script-command.d.cts +10 -0
  57. package/dist/components/powershell-script-command.d.cts.map +1 -0
  58. package/dist/components/powershell-script-command.d.mts +10 -0
  59. package/dist/components/powershell-script-command.d.mts.map +1 -0
  60. package/dist/components/powershell-script-command.mjs +106 -0
  61. package/dist/components/powershell-script-command.mjs.map +1 -0
  62. package/dist/components/{powershell-command.cjs → powershell-shared.cjs} +40 -146
  63. package/dist/components/powershell-shared.d.cts +10 -0
  64. package/dist/components/powershell-shared.d.cts.map +1 -0
  65. package/dist/components/powershell-shared.d.mts +10 -0
  66. package/dist/components/powershell-shared.d.mts.map +1 -0
  67. package/dist/components/{powershell-command.mjs → powershell-shared.mjs} +44 -150
  68. package/dist/components/powershell-shared.mjs.map +1 -0
  69. package/dist/components/zsh-config-command.cjs +132 -0
  70. package/dist/components/zsh-config-command.d.cts +10 -0
  71. package/dist/components/zsh-config-command.d.cts.map +1 -0
  72. package/dist/components/zsh-config-command.d.mts +10 -0
  73. package/dist/components/zsh-config-command.d.mts.map +1 -0
  74. package/dist/components/zsh-config-command.mjs +132 -0
  75. package/dist/components/zsh-config-command.mjs.map +1 -0
  76. package/dist/components/zsh-script-command.cjs +111 -0
  77. package/dist/components/zsh-script-command.d.cts +10 -0
  78. package/dist/components/zsh-script-command.d.cts.map +1 -0
  79. package/dist/components/zsh-script-command.d.mts +10 -0
  80. package/dist/components/zsh-script-command.d.mts.map +1 -0
  81. package/dist/components/zsh-script-command.mjs +111 -0
  82. package/dist/components/zsh-script-command.mjs.map +1 -0
  83. package/dist/components/{zsh-command.cjs → zsh-shared.cjs} +41 -147
  84. package/dist/components/zsh-shared.d.cts +10 -0
  85. package/dist/components/zsh-shared.d.cts.map +1 -0
  86. package/dist/components/zsh-shared.d.mts +10 -0
  87. package/dist/components/zsh-shared.d.mts.map +1 -0
  88. package/dist/components/{zsh-command.mjs → zsh-shared.mjs} +45 -151
  89. package/dist/components/zsh-shared.mjs.map +1 -0
  90. package/dist/index.cjs +232 -68
  91. package/dist/index.d.cts.map +1 -1
  92. package/dist/index.d.mts.map +1 -1
  93. package/dist/index.mjs +232 -68
  94. package/dist/index.mjs.map +1 -1
  95. package/package.json +148 -36
  96. package/dist/components/bash-command.cjs +0 -276
  97. package/dist/components/bash-command.d.cts +0 -10
  98. package/dist/components/bash-command.d.cts.map +0 -1
  99. package/dist/components/bash-command.d.mts +0 -10
  100. package/dist/components/bash-command.d.mts.map +0 -1
  101. package/dist/components/bash-command.mjs +0 -276
  102. package/dist/components/bash-command.mjs.map +0 -1
  103. package/dist/components/fish-command.d.cts +0 -10
  104. package/dist/components/fish-command.d.cts.map +0 -1
  105. package/dist/components/fish-command.d.mts +0 -10
  106. package/dist/components/fish-command.d.mts.map +0 -1
  107. package/dist/components/fish-command.mjs.map +0 -1
  108. package/dist/components/powershell-command.d.cts +0 -10
  109. package/dist/components/powershell-command.d.cts.map +0 -1
  110. package/dist/components/powershell-command.d.mts +0 -10
  111. package/dist/components/powershell-command.d.mts.map +0 -1
  112. package/dist/components/powershell-command.mjs.map +0 -1
  113. package/dist/components/zsh-command.d.cts +0 -10
  114. package/dist/components/zsh-command.d.cts.map +0 -1
  115. package/dist/components/zsh-command.d.mts +0 -10
  116. package/dist/components/zsh-command.d.mts.map +0 -1
  117. package/dist/components/zsh-command.mjs.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,7 +1,15 @@
1
- import { BashCompletionsCommand } from "./components/bash-command.mjs";
2
- import { FishCompletionsCommand } from "./components/fish-command.mjs";
3
- import { PowerShellCompletionsCommand } from "./components/powershell-command.mjs";
4
- import { ZshCompletionsCommand } from "./components/zsh-command.mjs";
1
+ import { BashConfigCompletionsCommand } from "./components/bash-config-command.mjs";
2
+ import { BashScriptCompletionsCommand } from "./components/bash-script-command.mjs";
3
+ import { BashCompletionsShared } from "./components/bash-shared.mjs";
4
+ import { FishConfigCompletionsCommand } from "./components/fish-config-command.mjs";
5
+ import { FishScriptCompletionsCommand } from "./components/fish-script-command.mjs";
6
+ import { FishCompletionsShared } from "./components/fish-shared.mjs";
7
+ import { PowerShellConfigCompletionsCommand } from "./components/powershell-config-command.mjs";
8
+ import { PowerShellScriptCompletionsCommand } from "./components/powershell-script-command.mjs";
9
+ import { PowerShellCompletionsShared } from "./components/powershell-shared.mjs";
10
+ import { ZshConfigCompletionsCommand } from "./components/zsh-config-command.mjs";
11
+ import { ZshScriptCompletionsCommand } from "./components/zsh-script-command.mjs";
12
+ import { ZshCompletionsShared } from "./components/zsh-shared.mjs";
5
13
  import "./components/index.mjs";
6
14
  import { SHELL_TYPES } from "./types/shell-type.mjs";
7
15
  import { createComponent } from "@alloy-js/core/jsx-runtime";
@@ -43,79 +51,235 @@ const plugin = (options = {}) => {
43
51
  isVirtual: true
44
52
  });
45
53
  if (this.config.completions.shells.includes("bash")) if (this.inputs.some((input) => input.id === "completions-bash")) this.info("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.");
46
- else this.inputs.push({
47
- id: "completions-bash",
48
- name: "bash",
49
- description: `Generate a Bash completion script for the ${getAppTitle(this, true)} command-line interface.`,
50
- alias: [],
51
- path: "completions/bash",
52
- segments: ["completions", "bash"],
53
- title: "CLI Completions - Bash Shell",
54
- tags: ["Utility"],
55
- entry: {
56
- file: joinPaths(this.entryPath, "completions", "bash", "index.ts"),
57
- input: { file: joinPaths(this.entryPath, "completions", "bash", "command.ts") }
58
- },
59
- isVirtual: false
60
- });
54
+ else {
55
+ this.inputs.push({
56
+ id: "completions-bash",
57
+ name: "bash",
58
+ description: `Commands to setup bash completions for the ${getAppTitle(this, true)} command-line interface.`,
59
+ alias: [],
60
+ path: "completions/bash",
61
+ segments: ["completions", "bash"],
62
+ title: "Completions - Bash",
63
+ tags: ["Utility"],
64
+ entry: { file: joinPaths(this.entryPath, "completions", "bash", "index.ts") },
65
+ isVirtual: true
66
+ });
67
+ this.inputs.push({
68
+ id: "completions-bash-script",
69
+ name: "script",
70
+ description: `Generate a bash completion script for the ${getAppTitle(this, true)} command-line interface.`,
71
+ alias: [],
72
+ path: "completions/bash/script",
73
+ segments: [
74
+ "completions",
75
+ "bash",
76
+ "script"
77
+ ],
78
+ title: "Completions - Bash Script",
79
+ tags: ["Utility"],
80
+ entry: {
81
+ file: joinPaths(this.entryPath, "completions", "bash", "script", "index.ts"),
82
+ input: { file: joinPaths(this.entryPath, "completions", "bash", "script", "command.ts") }
83
+ },
84
+ isVirtual: false
85
+ });
86
+ this.inputs.push({
87
+ id: "completions-bash-config",
88
+ name: "config",
89
+ description: `Update the current system's bash shell configuration to include completions for the ${getAppTitle(this, true)} command-line interface.`,
90
+ alias: [],
91
+ path: "completions/bash/config",
92
+ segments: [
93
+ "completions",
94
+ "bash",
95
+ "config"
96
+ ],
97
+ title: "Completions - Bash Configuration",
98
+ tags: ["Utility"],
99
+ entry: {
100
+ file: joinPaths(this.entryPath, "completions", "bash", "config", "index.ts"),
101
+ input: { file: joinPaths(this.entryPath, "completions", "bash", "config", "command.ts") }
102
+ },
103
+ isVirtual: false
104
+ });
105
+ }
61
106
  if (this.config.completions.shells.includes("zsh")) if (this.inputs.some((input) => input.id === "completions-zsh")) this.info("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.");
62
- else this.inputs.push({
63
- id: "completions-zsh",
64
- name: "zsh",
65
- description: `Generate a Zsh completion script for the ${getAppTitle(this, true)} command-line interface.`,
66
- alias: [],
67
- path: "completions/zsh",
68
- segments: ["completions", "zsh"],
69
- title: "CLI Completions - Zsh Shell",
70
- tags: ["Utility"],
71
- entry: {
72
- file: joinPaths(this.entryPath, "completions", "zsh", "index.ts"),
73
- input: { file: joinPaths(this.entryPath, "completions", "zsh", "command.ts") }
74
- },
75
- isVirtual: false
76
- });
107
+ else {
108
+ this.inputs.push({
109
+ id: "completions-zsh",
110
+ name: "zsh",
111
+ description: `Commands to setup Zsh completions for the ${getAppTitle(this, true)} command-line interface.`,
112
+ alias: [],
113
+ path: "completions/zsh",
114
+ segments: ["completions", "zsh"],
115
+ title: "Completions - Zsh",
116
+ tags: ["Utility"],
117
+ entry: { file: joinPaths(this.entryPath, "completions", "zsh", "index.ts") },
118
+ isVirtual: true
119
+ });
120
+ this.inputs.push({
121
+ id: "completions-zsh-script",
122
+ name: "script",
123
+ description: `Generate a Zsh completion script for the ${getAppTitle(this, true)} command-line interface.`,
124
+ alias: [],
125
+ path: "completions/zsh/script",
126
+ segments: [
127
+ "completions",
128
+ "zsh",
129
+ "script"
130
+ ],
131
+ title: "Completions - Zsh Script",
132
+ tags: ["Utility"],
133
+ entry: {
134
+ file: joinPaths(this.entryPath, "completions", "zsh", "script", "index.ts"),
135
+ input: { file: joinPaths(this.entryPath, "completions", "zsh", "script", "command.ts") }
136
+ },
137
+ isVirtual: false
138
+ });
139
+ this.inputs.push({
140
+ id: "completions-zsh-config",
141
+ name: "config",
142
+ description: `Update the current system's Zsh shell configuration to include completions for the ${getAppTitle(this, true)} command-line interface.`,
143
+ alias: [],
144
+ path: "completions/zsh/config",
145
+ segments: [
146
+ "completions",
147
+ "zsh",
148
+ "config"
149
+ ],
150
+ title: "Completions - Zsh Configuration",
151
+ tags: ["Utility"],
152
+ entry: {
153
+ file: joinPaths(this.entryPath, "completions", "zsh", "config", "index.ts"),
154
+ input: { file: joinPaths(this.entryPath, "completions", "zsh", "config", "command.ts") }
155
+ },
156
+ isVirtual: false
157
+ });
158
+ }
77
159
  if (this.config.completions.shells.includes("powershell")) if (this.inputs.some((input) => input.id === "completions-powershell")) this.info("The `completions-powershell` command already exists in the commands list. If you would like the completions-powershell command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.");
78
- else this.inputs.push({
79
- id: "completions-powershell",
80
- name: "powershell",
81
- description: `Generate a PowerShell completion script for the ${getAppTitle(this, true)} command-line interface.`,
82
- alias: [],
83
- path: "completions/powershell",
84
- segments: ["completions", "powershell"],
85
- title: "CLI Completions - PowerShell",
86
- tags: ["Utility"],
87
- entry: {
88
- file: joinPaths(this.entryPath, "completions", "powershell", "index.ts"),
89
- input: { file: joinPaths(this.entryPath, "completions", "powershell", "command.ts") }
90
- },
91
- isVirtual: false
92
- });
160
+ else {
161
+ this.inputs.push({
162
+ id: "completions-powershell",
163
+ name: "powershell",
164
+ description: `Commands to setup PowerShell completions for the ${getAppTitle(this, true)} command-line interface.`,
165
+ alias: [],
166
+ path: "completions/powershell",
167
+ segments: ["completions", "powershell"],
168
+ title: "Completions - PowerShell",
169
+ tags: ["Utility"],
170
+ entry: { file: joinPaths(this.entryPath, "completions", "powershell", "index.ts") },
171
+ isVirtual: true
172
+ });
173
+ this.inputs.push({
174
+ id: "completions-powershell-script",
175
+ name: "script",
176
+ description: `Generate a PowerShell completion script for the ${getAppTitle(this, true)} command-line interface.`,
177
+ alias: [],
178
+ path: "completions/powershell/script",
179
+ segments: [
180
+ "completions",
181
+ "powershell",
182
+ "script"
183
+ ],
184
+ title: "Completions - PowerShell Script",
185
+ tags: ["Utility"],
186
+ entry: {
187
+ file: joinPaths(this.entryPath, "completions", "powershell", "script", "index.ts"),
188
+ input: { file: joinPaths(this.entryPath, "completions", "powershell", "script", "command.ts") }
189
+ },
190
+ isVirtual: false
191
+ });
192
+ this.inputs.push({
193
+ id: "completions-powershell-config",
194
+ name: "config",
195
+ description: `Update the current system's PowerShell configuration to include completions for the ${getAppTitle(this, true)} command-line interface.`,
196
+ alias: [],
197
+ path: "completions/powershell/config",
198
+ segments: [
199
+ "completions",
200
+ "powershell",
201
+ "config"
202
+ ],
203
+ title: "Completions - PowerShell Configuration",
204
+ tags: ["Utility"],
205
+ entry: {
206
+ file: joinPaths(this.entryPath, "completions", "powershell", "config", "index.ts"),
207
+ input: { file: joinPaths(this.entryPath, "completions", "powershell", "config", "command.ts") }
208
+ },
209
+ isVirtual: false
210
+ });
211
+ }
93
212
  if (this.config.completions.shells.includes("fish")) if (this.inputs.some((input) => input.id === "completions-fish")) this.info("The `completions-fish` command already exists in the commands list. If you would like the completions-fish command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.");
94
- else this.inputs.push({
95
- id: "completions-fish",
96
- name: "fish",
97
- description: `Generate a Fish completion script for the ${getAppTitle(this, true)} command-line interface.`,
98
- alias: [],
99
- path: "completions/fish",
100
- segments: ["completions", "fish"],
101
- title: "CLI Completions - Fish Shell",
102
- tags: ["Utility"],
103
- entry: {
104
- file: joinPaths(this.entryPath, "completions", "fish", "index.ts"),
105
- input: { file: joinPaths(this.entryPath, "completions", "fish", "command.ts") }
106
- },
107
- isVirtual: false
108
- });
213
+ else {
214
+ this.inputs.push({
215
+ id: "completions-fish",
216
+ name: "fish",
217
+ description: `Commands to setup Fish completions for the ${getAppTitle(this, true)} command-line interface.`,
218
+ alias: [],
219
+ path: "completions/fish",
220
+ segments: ["completions", "fish"],
221
+ title: "Completions - Fish",
222
+ tags: ["Utility"],
223
+ entry: { file: joinPaths(this.entryPath, "completions", "fish", "index.ts") },
224
+ isVirtual: true
225
+ });
226
+ this.inputs.push({
227
+ id: "completions-fish-script",
228
+ name: "script",
229
+ description: `Generate a Fish completion script for the ${getAppTitle(this, true)} command-line interface.`,
230
+ alias: [],
231
+ path: "completions/fish/script",
232
+ segments: [
233
+ "completions",
234
+ "fish",
235
+ "script"
236
+ ],
237
+ title: "Completions - Fish Script",
238
+ tags: ["Utility"],
239
+ entry: {
240
+ file: joinPaths(this.entryPath, "completions", "fish", "script", "index.ts"),
241
+ input: { file: joinPaths(this.entryPath, "completions", "fish", "script", "command.ts") }
242
+ },
243
+ isVirtual: false
244
+ });
245
+ this.inputs.push({
246
+ id: "completions-fish-config",
247
+ name: "config",
248
+ description: `Update the current system's Fish shell configuration to include completions for the ${getAppTitle(this, true)} command-line interface.`,
249
+ alias: [],
250
+ path: "completions/fish/config",
251
+ segments: [
252
+ "completions",
253
+ "fish",
254
+ "config"
255
+ ],
256
+ title: "Completions - Fish Configuration",
257
+ tags: ["Utility"],
258
+ entry: {
259
+ file: joinPaths(this.entryPath, "completions", "fish", "config", "index.ts"),
260
+ input: { file: joinPaths(this.entryPath, "completions", "fish", "config", "command.ts") }
261
+ },
262
+ isVirtual: false
263
+ });
264
+ }
109
265
  },
110
266
  prepare: {
111
267
  order: "pre",
112
268
  async handler() {
113
269
  this.debug("Rendering command handling modules for the Shell Shock `completions` plugin.");
114
270
  return render(this, [
115
- createComponent(BashCompletionsCommand, {}),
116
- createComponent(ZshCompletionsCommand, {}),
117
- createComponent(PowerShellCompletionsCommand, {}),
118
- createComponent(FishCompletionsCommand, {})
271
+ createComponent(BashCompletionsShared, {}),
272
+ createComponent(BashScriptCompletionsCommand, {}),
273
+ createComponent(BashConfigCompletionsCommand, {}),
274
+ createComponent(ZshCompletionsShared, {}),
275
+ createComponent(ZshScriptCompletionsCommand, {}),
276
+ createComponent(ZshConfigCompletionsCommand, {}),
277
+ createComponent(PowerShellCompletionsShared, {}),
278
+ createComponent(PowerShellScriptCompletionsCommand, {}),
279
+ createComponent(PowerShellConfigCompletionsCommand, {}),
280
+ createComponent(FishCompletionsShared, {}),
281
+ createComponent(FishScriptCompletionsCommand, {}),
282
+ createComponent(FishConfigCompletionsCommand, {})
119
283
  ]);
120
284
  }
121
285
  }
@@ -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 { render } from \"@powerlines/plugin-alloy/render\";\nimport { getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport type { Plugin } from \"powerlines\";\nimport {\n BashCompletionsCommand,\n FishCompletionsCommand,\n PowerShellCompletionsCommand,\n ZshCompletionsCommand\n} from \"./components\";\nimport type {\n CompletionsPluginContext,\n CompletionsPluginOptions\n} from \"./types/plugin\";\nimport { SHELL_TYPES } from \"./types/shell-type\";\n\nexport type * 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: { shells: [...SHELL_TYPES], ...options }\n };\n },\n configResolved() {\n this.debug(\n \"Adding the CLI completion commands to the application context.\"\n );\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: \"completions\",\n segments: [\"completions\"],\n title: \"CLI Completions\",\n tags: [\"Utility\"],\n description: `Commands for generating shell completion scripts for ${getAppTitle(\n this\n )}.`,\n entry: {\n file: joinPaths(this.entryPath, \"completions\", \"index.ts\"),\n input: {\n file: joinPaths(this.entryPath, \"completions\", \"command.ts\")\n }\n },\n isVirtual: true\n });\n }\n\n if (this.config.completions.shells.includes(\"bash\")) {\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 description: `Generate a Bash completion script for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/bash\",\n segments: [\"completions\", \"bash\"],\n title: \"CLI Completions - Bash Shell\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false\n });\n }\n }\n\n if (this.config.completions.shells.includes(\"zsh\")) {\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 description: `Generate a Zsh completion script for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/zsh\",\n segments: [\"completions\", \"zsh\"],\n title: \"CLI Completions - Zsh Shell\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false\n });\n }\n }\n\n if (this.config.completions.shells.includes(\"powershell\")) {\n if (\n this.inputs.some(input => input.id === \"completions-powershell\")\n ) {\n this.info(\n \"The `completions-powershell` command already exists in the commands list. If you would like the completions-powershell 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-powershell\",\n name: \"powershell\",\n description: `Generate a PowerShell completion script for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/powershell\",\n segments: [\"completions\", \"powershell\"],\n title: \"CLI Completions - PowerShell\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"powershell\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"powershell\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false\n });\n }\n }\n\n if (this.config.completions.shells.includes(\"fish\")) {\n if (this.inputs.some(input => input.id === \"completions-fish\")) {\n this.info(\n \"The `completions-fish` command already exists in the commands list. If you would like the completions-fish 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-fish\",\n name: \"fish\",\n description: `Generate a Fish completion script for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/fish\",\n segments: [\"completions\", \"fish\"],\n title: \"CLI Completions - Fish Shell\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"fish\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"fish\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false\n });\n }\n }\n },\n prepare: {\n order: \"pre\",\n async handler() {\n this.debug(\n \"Rendering command handling modules for the Shell Shock `completions` plugin.\"\n );\n\n return render(\n this,\n <>\n <BashCompletionsCommand />\n <ZshCompletionsCommand />\n <PowerShellCompletionsCommand />\n <FishCompletionsCommand />\n </>\n );\n }\n }\n }\n ];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;AA+BA,MAAU,UAAa,UAAA,EAAA,KAAA;AACvB,QAAS,CAAA;;EAET,SAAa;;AAEX,UAAA,EACK,aAAc;IACnB,QAAA,CAAA,GAAA,YAAA;IACK,GAAM;IACX,EACD;;EAEE,iBAAkB;AACnB,QAAO,MAAA,iEAAA;AACL,QAAA,WAAA,EAAA;AACE,OAAI,KAAG,OAAM,MAAM,UAAW,MAAC,OAAA,cAAA,CAC/B,MAAO,KAAE,gNAAA;OAEP,MAAG,OAAS,KAAC;IACZ,IAAA;;IAED,OAAO,CAAA,aAAA;IACL,MAAA;IACD,UAAA,CAAA,cAAA;IACF,OAAA;IACD,MAAA,CAAA,UAAiB;IACf,aAAU,wDAAA,YAAA,KAAA,CAAA;IACR,OAAO;KACR,MAAA,UAAA,KAAA,WAAA,eAAA,WAAA;cAEI,MAAO,UAAM,KAAA,WAAA,eAAA,aAAA,EACd;KACF;IACA,WAAQ;IACT,CAAC;AAEJ,OAAI,KAAK,OAAO,YAAK,OAAA,SAAA,OAAA,CACnB,KAAI,KAAK,OAAA,MAAY,UAAA,MAAA,OAAA,mBAAA,CACnB,MAAE,KAAO,0NAAY;OAErB,MAAE,OAAO,KAAA;IACP,IAAA;IACA,MAAM;IACN,aAAQ,6CAAS,YAAA,MAAA,KAAA,CAAA;IACjB,OAAA,EAAA;IACA,MAAE;IACF,UAAI,CAAA,eAAA,OAAA;IACJ,OAAO;IACP,MAAM,CAAC,UAAU;IACjB,OAAO;KACL,MAAM,UAAE,KAAU,WAAc,eAAe,QAAG,WAAW;KAC7D,OAAA,EACD,MAAA,UAAA,KAAA,WAAA,eAAA,QAAA,a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AAM;IACN,MAAM,CAAC,UAAA;IACP,OAAO;KACL,MAAK,UAAQ,KAAA,WAAA,eAAA,QAAA,WAAA;KACb,OAAG,EACD,MAAM,UAAC,KAAA,WAAA,eAAA,QAAA,aAAA,EACR;KACF;IACD,WAAS;IACV,CAAC;;EAIR,SAAS;GACP,OAAO;GACP,MAAM,UAAE;AACN,SAAE,MAAA,+EAAA;AACF,WAAA,OAAA,MAAA;KAAA,gBAAA,wBAAA,EAAA,CAAA;KAAA,gBAAA,uBAAA,EAAA,CAAA;KAAA,gBAAA,8BAAA,EAAA,CAAA;KAAA,gBAAA,wBAAA,EAAA,CAAA;KAAA,CAAA;;GAEH;EACF,CAAC"}
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 { render } from \"@powerlines/plugin-alloy/render\";\nimport { getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport type { Plugin } from \"powerlines\";\nimport {\n BashCompletionsShared,\n BashConfigCompletionsCommand,\n BashScriptCompletionsCommand,\n FishCompletionsShared,\n FishConfigCompletionsCommand,\n FishScriptCompletionsCommand,\n PowerShellCompletionsShared,\n PowerShellConfigCompletionsCommand,\n PowerShellScriptCompletionsCommand,\n ZshCompletionsShared,\n ZshConfigCompletionsCommand,\n ZshScriptCompletionsCommand\n} from \"./components\";\nimport type {\n CompletionsPluginContext,\n CompletionsPluginOptions\n} from \"./types/plugin\";\nimport { SHELL_TYPES } from \"./types/shell-type\";\n\nexport type * 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: { shells: [...SHELL_TYPES], ...options }\n };\n },\n configResolved() {\n this.debug(\n \"Adding the CLI completion commands to the application context.\"\n );\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: \"completions\",\n segments: [\"completions\"],\n title: \"CLI Completions\",\n tags: [\"Utility\"],\n description: `Commands for generating shell completion scripts for ${getAppTitle(\n this\n )}.`,\n entry: {\n file: joinPaths(this.entryPath, \"completions\", \"index.ts\"),\n input: {\n file: joinPaths(this.entryPath, \"completions\", \"command.ts\")\n }\n },\n isVirtual: true\n });\n }\n\n if (this.config.completions.shells.includes(\"bash\")) {\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 description: `Commands to setup bash completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/bash\",\n segments: [\"completions\", \"bash\"],\n title: \"Completions - Bash\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"index.ts\"\n )\n },\n isVirtual: true\n });\n this.inputs.push({\n id: \"completions-bash-script\",\n name: \"script\",\n description: `Generate a bash completion script for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/bash/script\",\n segments: [\"completions\", \"bash\", \"script\"],\n title: \"Completions - Bash Script\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"script\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"script\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false\n });\n this.inputs.push({\n id: \"completions-bash-config\",\n name: \"config\",\n description: `Update the current system's bash shell configuration to include completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/bash/config\",\n segments: [\"completions\", \"bash\", \"config\"],\n title: \"Completions - Bash Configuration\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"config\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"config\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false\n });\n }\n }\n\n if (this.config.completions.shells.includes(\"zsh\")) {\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 description: `Commands to setup Zsh completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/zsh\",\n segments: [\"completions\", \"zsh\"],\n title: \"Completions - Zsh\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"index.ts\"\n )\n },\n isVirtual: true\n });\n this.inputs.push({\n id: \"completions-zsh-script\",\n name: \"script\",\n description: `Generate a Zsh completion script for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/zsh/script\",\n segments: [\"completions\", \"zsh\", \"script\"],\n title: \"Completions - Zsh Script\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"script\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"script\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false\n });\n this.inputs.push({\n id: \"completions-zsh-config\",\n name: \"config\",\n description: `Update the current system's Zsh shell configuration to include completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/zsh/config\",\n segments: [\"completions\", \"zsh\", \"config\"],\n title: \"Completions - Zsh Configuration\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"config\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"config\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false\n });\n }\n }\n\n if (this.config.completions.shells.includes(\"powershell\")) {\n if (\n this.inputs.some(input => input.id === \"completions-powershell\")\n ) {\n this.info(\n \"The `completions-powershell` command already exists in the commands list. If you would like the completions-powershell 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-powershell\",\n name: \"powershell\",\n description: `Commands to setup PowerShell completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/powershell\",\n segments: [\"completions\", \"powershell\"],\n title: \"Completions - PowerShell\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"powershell\",\n \"index.ts\"\n )\n },\n isVirtual: true\n });\n this.inputs.push({\n id: \"completions-powershell-script\",\n name: \"script\",\n description: `Generate a PowerShell completion script for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/powershell/script\",\n segments: [\"completions\", \"powershell\", \"script\"],\n title: \"Completions - PowerShell Script\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"powershell\",\n \"script\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"powershell\",\n \"script\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false\n });\n this.inputs.push({\n id: \"completions-powershell-config\",\n name: \"config\",\n description: `Update the current system's PowerShell configuration to include completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/powershell/config\",\n segments: [\"completions\", \"powershell\", \"config\"],\n title: \"Completions - PowerShell Configuration\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"powershell\",\n \"config\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"powershell\",\n \"config\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false\n });\n }\n }\n\n if (this.config.completions.shells.includes(\"fish\")) {\n if (this.inputs.some(input => input.id === \"completions-fish\")) {\n this.info(\n \"The `completions-fish` command already exists in the commands list. If you would like the completions-fish 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-fish\",\n name: \"fish\",\n description: `Commands to setup Fish completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/fish\",\n segments: [\"completions\", \"fish\"],\n title: \"Completions - Fish\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"fish\",\n \"index.ts\"\n )\n },\n isVirtual: true\n });\n this.inputs.push({\n id: \"completions-fish-script\",\n name: \"script\",\n description: `Generate a Fish completion script for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/fish/script\",\n segments: [\"completions\", \"fish\", \"script\"],\n title: \"Completions - Fish Script\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"fish\",\n \"script\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"fish\",\n \"script\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false\n });\n this.inputs.push({\n id: \"completions-fish-config\",\n name: \"config\",\n description: `Update the current system's Fish shell configuration to include completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/fish/config\",\n segments: [\"completions\", \"fish\", \"config\"],\n title: \"Completions - Fish Configuration\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"fish\",\n \"config\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"fish\",\n \"config\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false\n });\n }\n }\n },\n prepare: {\n order: \"pre\",\n async handler() {\n this.debug(\n \"Rendering command handling modules for the Shell Shock `completions` plugin.\"\n );\n\n return render(\n this,\n <>\n <BashCompletionsShared />\n <BashScriptCompletionsCommand />\n <BashConfigCompletionsCommand />\n <ZshCompletionsShared />\n <ZshScriptCompletionsCommand />\n <ZshConfigCompletionsCommand />\n <PowerShellCompletionsShared />\n <PowerShellScriptCompletionsCommand />\n <PowerShellConfigCompletionsCommand />\n <FishCompletionsShared />\n <FishScriptCompletionsCommand />\n <FishConfigCompletionsCommand />\n </>\n );\n }\n }\n }\n ];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAE,UAAkC,UAAA,EAAA,KAAA;AAClC,QAAA,CAAA;EACA,MAAA;EACA,SAAA;AACI,QAAI,MAAA,4EAAW;AACf,UAAM,EACV,aAAA;IACA,QAAA,CAAA,GAAA,YAAA;IACQ,GAAA;IACD;;;AAIP,QAAA,MAAA,iEAAA;AACI,QAAC,WAAc,EAAA;AACnB,OAAA,KAAA,OAAA,MAAA,UAAA,MAAA,OAAA,cAAA,C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