@shell-shock/plugin-completions 0.2.23 → 0.3.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.
Files changed (133) 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-shared.cjs +303 -0
  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-shared.mjs +303 -0
  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-shared.cjs +319 -0
  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} +81 -181
  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-shared.cjs +281 -0
  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-shared.mjs +281 -0
  89. package/dist/components/zsh-shared.mjs.map +1 -0
  90. package/dist/helpers/complete-command.cjs +2 -7
  91. package/dist/helpers/complete-command.d.cts +2 -2
  92. package/dist/helpers/complete-command.d.cts.map +1 -1
  93. package/dist/helpers/complete-command.d.mts +2 -2
  94. package/dist/helpers/complete-command.d.mts.map +1 -1
  95. package/dist/helpers/complete-command.mjs +2 -7
  96. package/dist/helpers/complete-command.mjs.map +1 -1
  97. package/dist/helpers/index.cjs +1 -1
  98. package/dist/helpers/index.d.cts +2 -2
  99. package/dist/helpers/index.d.mts +2 -2
  100. package/dist/helpers/index.mjs +2 -2
  101. package/dist/index.cjs +245 -59
  102. package/dist/index.d.cts.map +1 -1
  103. package/dist/index.d.mts.map +1 -1
  104. package/dist/index.mjs +246 -60
  105. package/dist/index.mjs.map +1 -1
  106. package/package.json +148 -37
  107. package/dist/components/bash-command.cjs +0 -273
  108. package/dist/components/bash-command.d.cts +0 -10
  109. package/dist/components/bash-command.d.cts.map +0 -1
  110. package/dist/components/bash-command.d.mts +0 -10
  111. package/dist/components/bash-command.d.mts.map +0 -1
  112. package/dist/components/bash-command.mjs +0 -273
  113. package/dist/components/bash-command.mjs.map +0 -1
  114. package/dist/components/fish-command.cjs +0 -403
  115. package/dist/components/fish-command.d.cts +0 -10
  116. package/dist/components/fish-command.d.cts.map +0 -1
  117. package/dist/components/fish-command.d.mts +0 -10
  118. package/dist/components/fish-command.d.mts.map +0 -1
  119. package/dist/components/fish-command.mjs +0 -403
  120. package/dist/components/fish-command.mjs.map +0 -1
  121. package/dist/components/powershell-command.cjs +0 -419
  122. package/dist/components/powershell-command.d.cts +0 -10
  123. package/dist/components/powershell-command.d.cts.map +0 -1
  124. package/dist/components/powershell-command.d.mts +0 -10
  125. package/dist/components/powershell-command.d.mts.map +0 -1
  126. package/dist/components/powershell-command.mjs.map +0 -1
  127. package/dist/components/zsh-command.cjs +0 -384
  128. package/dist/components/zsh-command.d.cts +0 -10
  129. package/dist/components/zsh-command.d.cts.map +0 -1
  130. package/dist/components/zsh-command.d.mts +0 -10
  131. package/dist/components/zsh-command.d.mts.map +0 -1
  132. package/dist/components/zsh-command.mjs +0 -384
  133. package/dist/components/zsh-command.mjs.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,14 +1,21 @@
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";
8
16
  import { render } from "@powerlines/plugin-alloy/render";
9
17
  import { getAppTitle } from "@shell-shock/core/plugin-utils";
10
- import { relativePath } from "@stryke/path";
11
- import { joinPaths as joinPaths$1 } from "@stryke/path/join";
18
+ import { joinPaths } from "@stryke/path/join";
12
19
 
13
20
  //#region src/index.tsx
14
21
  /**
@@ -20,7 +27,7 @@ const plugin = (options = {}) => {
20
27
  config() {
21
28
  this.debug("Providing default configuration for the Shell Shock `completions` plugin.");
22
29
  return { completions: {
23
- shells: SHELL_TYPES,
30
+ shells: [...SHELL_TYPES],
24
31
  ...options
25
32
  } };
26
33
  },
@@ -35,67 +42,246 @@ const plugin = (options = {}) => {
35
42
  path: "completions",
36
43
  segments: ["completions"],
37
44
  title: "CLI Completions",
45
+ tags: ["Utility"],
38
46
  description: `Commands for generating shell completion scripts for ${getAppTitle(this)}.`,
39
- entry: { file: joinPaths$1(this.entryPath, "completions", "command.ts") },
47
+ entry: {
48
+ file: joinPaths(this.entryPath, "completions", "index.ts"),
49
+ input: { file: joinPaths(this.entryPath, "completions", "command.ts") }
50
+ },
40
51
  isVirtual: true
41
52
  });
42
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.");
43
- else this.inputs.push({
44
- id: "completions-bash",
45
- name: "bash",
46
- description: `Generate a Bash completion script for the ${getAppTitle(this, true)} command-line interface.`,
47
- alias: [],
48
- path: "completions/bash",
49
- segments: ["completions", "bash"],
50
- title: "CLI Completions - Bash Shell",
51
- entry: { file: joinPaths$1(this.entryPath, "completions", "bash", "command.ts") },
52
- isVirtual: false
53
- });
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
+ }
54
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.");
55
- else this.inputs.push({
56
- id: "completions-zsh",
57
- name: "zsh",
58
- description: `Generate a Zsh completion script for the ${getAppTitle(this, true)} command-line interface.`,
59
- alias: [],
60
- path: "completions/zsh",
61
- segments: ["completions", "zsh"],
62
- title: "CLI Completions - Zsh Shell",
63
- entry: { file: relativePath(this.commandsPath, joinPaths$1(this.entryPath, "completions", "zsh", "command.ts")) },
64
- isVirtual: false
65
- });
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
+ }
66
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.");
67
- else this.inputs.push({
68
- id: "completions-powershell",
69
- name: "powershell",
70
- description: `Generate a PowerShell completion script for the ${getAppTitle(this, true)} command-line interface.`,
71
- alias: [],
72
- path: "completions/powershell",
73
- segments: ["completions", "powershell"],
74
- title: "CLI Completions - PowerShell",
75
- entry: { file: relativePath(this.commandsPath, joinPaths$1(this.entryPath, "completions", "powershell", "command.ts")) },
76
- isVirtual: false
77
- });
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
+ }
78
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.");
79
- else this.inputs.push({
80
- id: "completions-fish",
81
- name: "fish",
82
- description: `Generate a Fish completion script for the ${getAppTitle(this, true)} command-line interface.`,
83
- alias: [],
84
- path: "completions/fish",
85
- segments: ["completions", "fish"],
86
- title: "CLI Completions - Fish Shell",
87
- entry: { file: relativePath(this.commandsPath, joinPaths$1(this.entryPath, "completions", "fish", "command.ts")) },
88
- isVirtual: false
89
- });
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
+ }
90
265
  },
91
- async prepare() {
92
- this.debug("Rendering command handling modules for the Shell Shock `completions` plugin.");
93
- return render(this, [
94
- createComponent(BashCompletionsCommand, {}),
95
- createComponent(ZshCompletionsCommand, {}),
96
- createComponent(PowerShellCompletionsCommand, {}),
97
- createComponent(FishCompletionsCommand, {})
98
- ]);
266
+ prepare: {
267
+ order: "pre",
268
+ async handler() {
269
+ this.debug("Rendering command handling modules for the Shell Shock `completions` plugin.");
270
+ return render(this, [
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, {})
283
+ ]);
284
+ }
99
285
  }
100
286
  }];
101
287
  };
@@ -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 { relativePath } from \"@stryke/path\";\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 description: `Commands for generating shell completion scripts for ${getAppTitle(\n this\n )}.`,\n entry: {\n file: joinPaths(this.entryPath, \"completions\", \"command.ts\")\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 entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"command.ts\"\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 entry: {\n file: relativePath(\n this.commandsPath,\n joinPaths(this.entryPath, \"completions\", \"zsh\", \"command.ts\")\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 entry: {\n file: relativePath(\n this.commandsPath,\n 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 entry: {\n file: relativePath(\n this.commandsPath,\n joinPaths(this.entryPath, \"completions\", \"fish\", \"command.ts\")\n )\n },\n isVirtual: false\n });\n }\n }\n },\n async prepare() {\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\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;AAgCA,MAAU,UAAa,UAAA,EAAA,KAAA;AACvB,QAAS,CAAA;;EAET,SAAa;;AAEX,UAAA,EACK,aAAc;IACnB,QAAA;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,aAAiB,wDAAA,YAAA,KAAA,CAAA;IACf,OAAK,EACF,MAAO,YAAQ,KAAA,WAAW,eAAgB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AA,mBAAA,CACzB,MAAI,KAAM,0NAAK;OAEf,MAAK,OAAK,KAAA;IACR,IAAI;IACJ,MAAK;IACL,aAAW,6CAAA,YAAA,MAAA,KAAA,CAAA;IACX,OAAO,EAAE;IACT,MAAE;IACF,UAAU,CAAA,eAAgB,OAAM;IAChC,OAAO;IACP,OAAI,EACF,MAAI,aAAK,KAAY,cAAA,YAAA,KAAA,WAAA,eAAA,QAAA,aAAA,CAAA,EACtB;IACD,WAAI;IACL,CAAC;;EAIR,MAAI,UAAA;;AAEF,UAAM,OAAK,MAAO;IAAA,gBAAmB,wBAAwB,EAAA,CAAA;IAAA,gBAAA,uBAAA,EAAA,CAAA;IAAA,gBAAA,8BAAA,EAAA,CAAA;IAAA,gBAAA,wBAAA,EAAA,CAAA;IAAA,CAAA;;EAEhE,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,i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