@shell-shock/plugin-completions 0.4.15 → 0.4.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/bash-config-command.cjs +6 -120
- package/dist/components/bash-config-command.mjs +6 -119
- package/dist/components/bash-config-command.mjs.map +1 -1
- package/dist/components/bash-script-command.cjs +5 -105
- package/dist/components/bash-script-command.mjs +5 -104
- package/dist/components/bash-script-command.mjs.map +1 -1
- package/dist/components/bash-shared.cjs +13 -77
- package/dist/components/bash-shared.mjs +13 -76
- package/dist/components/bash-shared.mjs.map +1 -1
- package/dist/components/fish-config-command.cjs +6 -120
- package/dist/components/fish-config-command.mjs +6 -119
- package/dist/components/fish-config-command.mjs.map +1 -1
- package/dist/components/fish-script-command.cjs +4 -104
- package/dist/components/fish-script-command.mjs +4 -103
- package/dist/components/fish-script-command.mjs.map +1 -1
- package/dist/components/fish-shared.cjs +77 -141
- package/dist/components/fish-shared.mjs +77 -140
- package/dist/components/fish-shared.mjs.map +1 -1
- package/dist/components/index.cjs +1 -26
- package/dist/components/index.mjs +1 -14
- package/dist/components/powershell-config-command.cjs +6 -116
- package/dist/components/powershell-config-command.mjs +6 -115
- package/dist/components/powershell-config-command.mjs.map +1 -1
- package/dist/components/powershell-script-command.cjs +4 -104
- package/dist/components/powershell-script-command.mjs +4 -103
- package/dist/components/powershell-script-command.mjs.map +1 -1
- package/dist/components/powershell-shared.cjs +37 -101
- package/dist/components/powershell-shared.mjs +37 -100
- package/dist/components/powershell-shared.mjs.map +1 -1
- package/dist/components/zsh-config-command.cjs +6 -120
- package/dist/components/zsh-config-command.mjs +6 -119
- package/dist/components/zsh-config-command.mjs.map +1 -1
- package/dist/components/zsh-script-command.cjs +6 -108
- package/dist/components/zsh-script-command.mjs +6 -107
- package/dist/components/zsh-script-command.mjs.map +1 -1
- package/dist/components/zsh-shared.cjs +42 -106
- package/dist/components/zsh-shared.mjs +42 -105
- package/dist/components/zsh-shared.mjs.map +1 -1
- package/dist/helpers/complete-command.cjs +1 -10
- package/dist/helpers/complete-command.mjs +1 -8
- package/dist/helpers/complete-command.mjs.map +1 -1
- package/dist/helpers/completion-directive-constants.cjs +1 -16
- package/dist/helpers/completion-directive-constants.mjs +1 -14
- package/dist/helpers/completion-directive-constants.mjs.map +1 -1
- package/dist/helpers/index.cjs +1 -6
- package/dist/helpers/index.mjs +1 -4
- package/dist/index.cjs +1 -303
- package/dist/index.mjs +1 -301
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.cjs +1 -4
- package/dist/types/index.mjs +1 -3
- package/dist/types/plugin.mjs +1 -1
- package/dist/types/shell-type.cjs +1 -12
- package/dist/types/shell-type.mjs +1 -10
- package/dist/types/shell-type.mjs.map +1 -1
- package/package.json +10 -10
package/dist/index.mjs
CHANGED
|
@@ -1,302 +1,2 @@
|
|
|
1
|
-
import {
|
|
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";
|
|
13
|
-
import "./components/index.mjs";
|
|
14
|
-
import { SHELL_TYPES } from "./types/shell-type.mjs";
|
|
15
|
-
import { createComponent } from "@alloy-js/core/jsx-runtime";
|
|
16
|
-
import { render } from "@powerlines/plugin-alloy/render";
|
|
17
|
-
import { getAppTitle } from "@shell-shock/core/plugin-utils";
|
|
18
|
-
import { joinPaths } from "@stryke/path/join";
|
|
19
|
-
|
|
20
|
-
//#region src/index.tsx
|
|
21
|
-
/**
|
|
22
|
-
* The Completions - Shell Shock plugin to add completion commands to a Shell Shock application.
|
|
23
|
-
*/
|
|
24
|
-
const plugin = (options = {}) => {
|
|
25
|
-
return [{
|
|
26
|
-
name: "shell-shock:completions",
|
|
27
|
-
config() {
|
|
28
|
-
this.debug("Providing default configuration for the Shell Shock `completions` plugin.");
|
|
29
|
-
return { completions: {
|
|
30
|
-
shells: [...SHELL_TYPES],
|
|
31
|
-
...options
|
|
32
|
-
} };
|
|
33
|
-
},
|
|
34
|
-
configResolved() {
|
|
35
|
-
this.debug("Adding the CLI completion commands to the application context.");
|
|
36
|
-
this.inputs ??= [];
|
|
37
|
-
if (this.inputs.some((input) => input.id === "completions")) this.info("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.");
|
|
38
|
-
else this.inputs.push({
|
|
39
|
-
id: "completions",
|
|
40
|
-
name: "completions",
|
|
41
|
-
alias: ["completion"],
|
|
42
|
-
path: "completions",
|
|
43
|
-
segments: ["completions"],
|
|
44
|
-
title: "Completions",
|
|
45
|
-
icon: "🖵",
|
|
46
|
-
tags: ["Utility"],
|
|
47
|
-
description: `Commands for generating shell completion scripts for ${getAppTitle(this)}.`,
|
|
48
|
-
entry: { file: joinPaths(this.entryPath, "completions", "index.ts") },
|
|
49
|
-
isVirtual: true,
|
|
50
|
-
source: "completions-plugin"
|
|
51
|
-
});
|
|
52
|
-
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.");
|
|
53
|
-
else {
|
|
54
|
-
this.inputs.push({
|
|
55
|
-
id: "completions-bash",
|
|
56
|
-
name: "bash",
|
|
57
|
-
description: `Commands to setup bash completions for the ${getAppTitle(this, true)} command-line interface.`,
|
|
58
|
-
alias: [],
|
|
59
|
-
path: "completions/bash",
|
|
60
|
-
segments: ["completions", "bash"],
|
|
61
|
-
title: "Completions - Bash",
|
|
62
|
-
tags: ["Utility"],
|
|
63
|
-
entry: { file: joinPaths(this.entryPath, "completions", "bash", "index.ts") },
|
|
64
|
-
isVirtual: true,
|
|
65
|
-
source: "completions-plugin"
|
|
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
|
-
source: "completions-plugin"
|
|
86
|
-
});
|
|
87
|
-
this.inputs.push({
|
|
88
|
-
id: "completions-bash-config",
|
|
89
|
-
name: "config",
|
|
90
|
-
description: `Update the current system's bash shell configuration to include completions for the ${getAppTitle(this, true)} command-line interface.`,
|
|
91
|
-
alias: [],
|
|
92
|
-
path: "completions/bash/config",
|
|
93
|
-
segments: [
|
|
94
|
-
"completions",
|
|
95
|
-
"bash",
|
|
96
|
-
"config"
|
|
97
|
-
],
|
|
98
|
-
title: "Completions - Bash Configuration",
|
|
99
|
-
tags: ["Utility"],
|
|
100
|
-
entry: {
|
|
101
|
-
file: joinPaths(this.entryPath, "completions", "bash", "config", "index.ts"),
|
|
102
|
-
input: { file: joinPaths(this.entryPath, "completions", "bash", "config", "command.ts") }
|
|
103
|
-
},
|
|
104
|
-
isVirtual: false,
|
|
105
|
-
source: "completions-plugin"
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
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.");
|
|
109
|
-
else {
|
|
110
|
-
this.inputs.push({
|
|
111
|
-
id: "completions-zsh",
|
|
112
|
-
name: "zsh",
|
|
113
|
-
description: `Commands to setup Zsh completions for the ${getAppTitle(this, true)} command-line interface.`,
|
|
114
|
-
alias: [],
|
|
115
|
-
path: "completions/zsh",
|
|
116
|
-
segments: ["completions", "zsh"],
|
|
117
|
-
title: "Completions - Zsh",
|
|
118
|
-
tags: ["Utility"],
|
|
119
|
-
entry: { file: joinPaths(this.entryPath, "completions", "zsh", "index.ts") },
|
|
120
|
-
isVirtual: true,
|
|
121
|
-
source: "completions-plugin"
|
|
122
|
-
});
|
|
123
|
-
this.inputs.push({
|
|
124
|
-
id: "completions-zsh-script",
|
|
125
|
-
name: "script",
|
|
126
|
-
description: `Generate a Zsh completion script for the ${getAppTitle(this, true)} command-line interface.`,
|
|
127
|
-
alias: [],
|
|
128
|
-
path: "completions/zsh/script",
|
|
129
|
-
segments: [
|
|
130
|
-
"completions",
|
|
131
|
-
"zsh",
|
|
132
|
-
"script"
|
|
133
|
-
],
|
|
134
|
-
title: "Completions - Zsh Script",
|
|
135
|
-
tags: ["Utility"],
|
|
136
|
-
entry: {
|
|
137
|
-
file: joinPaths(this.entryPath, "completions", "zsh", "script", "index.ts"),
|
|
138
|
-
input: { file: joinPaths(this.entryPath, "completions", "zsh", "script", "command.ts") }
|
|
139
|
-
},
|
|
140
|
-
isVirtual: false,
|
|
141
|
-
source: "completions-plugin"
|
|
142
|
-
});
|
|
143
|
-
this.inputs.push({
|
|
144
|
-
id: "completions-zsh-config",
|
|
145
|
-
name: "config",
|
|
146
|
-
description: `Update the current system's Zsh shell configuration to include completions for the ${getAppTitle(this, true)} command-line interface.`,
|
|
147
|
-
alias: [],
|
|
148
|
-
path: "completions/zsh/config",
|
|
149
|
-
segments: [
|
|
150
|
-
"completions",
|
|
151
|
-
"zsh",
|
|
152
|
-
"config"
|
|
153
|
-
],
|
|
154
|
-
title: "Completions - Zsh Configuration",
|
|
155
|
-
tags: ["Utility"],
|
|
156
|
-
entry: {
|
|
157
|
-
file: joinPaths(this.entryPath, "completions", "zsh", "config", "index.ts"),
|
|
158
|
-
input: { file: joinPaths(this.entryPath, "completions", "zsh", "config", "command.ts") }
|
|
159
|
-
},
|
|
160
|
-
isVirtual: false,
|
|
161
|
-
source: "completions-plugin"
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
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.");
|
|
165
|
-
else {
|
|
166
|
-
this.inputs.push({
|
|
167
|
-
id: "completions-powershell",
|
|
168
|
-
name: "powershell",
|
|
169
|
-
description: `Commands to setup PowerShell completions for the ${getAppTitle(this, true)} command-line interface.`,
|
|
170
|
-
alias: [],
|
|
171
|
-
path: "completions/powershell",
|
|
172
|
-
segments: ["completions", "powershell"],
|
|
173
|
-
title: "Completions - PowerShell",
|
|
174
|
-
tags: ["Utility"],
|
|
175
|
-
entry: { file: joinPaths(this.entryPath, "completions", "powershell", "index.ts") },
|
|
176
|
-
isVirtual: true,
|
|
177
|
-
source: "completions-plugin"
|
|
178
|
-
});
|
|
179
|
-
this.inputs.push({
|
|
180
|
-
id: "completions-powershell-script",
|
|
181
|
-
name: "script",
|
|
182
|
-
description: `Generate a PowerShell completion script for the ${getAppTitle(this, true)} command-line interface.`,
|
|
183
|
-
alias: [],
|
|
184
|
-
path: "completions/powershell/script",
|
|
185
|
-
segments: [
|
|
186
|
-
"completions",
|
|
187
|
-
"powershell",
|
|
188
|
-
"script"
|
|
189
|
-
],
|
|
190
|
-
title: "Completions - PowerShell Script",
|
|
191
|
-
tags: ["Utility"],
|
|
192
|
-
entry: {
|
|
193
|
-
file: joinPaths(this.entryPath, "completions", "powershell", "script", "index.ts"),
|
|
194
|
-
input: { file: joinPaths(this.entryPath, "completions", "powershell", "script", "command.ts") }
|
|
195
|
-
},
|
|
196
|
-
isVirtual: false,
|
|
197
|
-
source: "completions-plugin"
|
|
198
|
-
});
|
|
199
|
-
this.inputs.push({
|
|
200
|
-
id: "completions-powershell-config",
|
|
201
|
-
name: "config",
|
|
202
|
-
description: `Update the current system's PowerShell configuration to include completions for the ${getAppTitle(this, true)} command-line interface.`,
|
|
203
|
-
alias: [],
|
|
204
|
-
path: "completions/powershell/config",
|
|
205
|
-
segments: [
|
|
206
|
-
"completions",
|
|
207
|
-
"powershell",
|
|
208
|
-
"config"
|
|
209
|
-
],
|
|
210
|
-
title: "Completions - PowerShell Configuration",
|
|
211
|
-
tags: ["Utility"],
|
|
212
|
-
entry: {
|
|
213
|
-
file: joinPaths(this.entryPath, "completions", "powershell", "config", "index.ts"),
|
|
214
|
-
input: { file: joinPaths(this.entryPath, "completions", "powershell", "config", "command.ts") }
|
|
215
|
-
},
|
|
216
|
-
isVirtual: false,
|
|
217
|
-
source: "completions-plugin"
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
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.");
|
|
221
|
-
else {
|
|
222
|
-
this.inputs.push({
|
|
223
|
-
id: "completions-fish",
|
|
224
|
-
name: "fish",
|
|
225
|
-
description: `Commands to setup Fish completions for the ${getAppTitle(this, true)} command-line interface.`,
|
|
226
|
-
alias: [],
|
|
227
|
-
path: "completions/fish",
|
|
228
|
-
segments: ["completions", "fish"],
|
|
229
|
-
title: "Completions - Fish",
|
|
230
|
-
tags: ["Utility"],
|
|
231
|
-
entry: { file: joinPaths(this.entryPath, "completions", "fish", "index.ts") },
|
|
232
|
-
isVirtual: true,
|
|
233
|
-
source: "completions-plugin"
|
|
234
|
-
});
|
|
235
|
-
this.inputs.push({
|
|
236
|
-
id: "completions-fish-script",
|
|
237
|
-
name: "script",
|
|
238
|
-
description: `Generate a Fish completion script for the ${getAppTitle(this, true)} command-line interface.`,
|
|
239
|
-
alias: [],
|
|
240
|
-
path: "completions/fish/script",
|
|
241
|
-
segments: [
|
|
242
|
-
"completions",
|
|
243
|
-
"fish",
|
|
244
|
-
"script"
|
|
245
|
-
],
|
|
246
|
-
title: "Completions - Fish Script",
|
|
247
|
-
tags: ["Utility"],
|
|
248
|
-
entry: {
|
|
249
|
-
file: joinPaths(this.entryPath, "completions", "fish", "script", "index.ts"),
|
|
250
|
-
input: { file: joinPaths(this.entryPath, "completions", "fish", "script", "command.ts") }
|
|
251
|
-
},
|
|
252
|
-
isVirtual: false,
|
|
253
|
-
source: "completions-plugin"
|
|
254
|
-
});
|
|
255
|
-
this.inputs.push({
|
|
256
|
-
id: "completions-fish-config",
|
|
257
|
-
name: "config",
|
|
258
|
-
description: `Update the current system's Fish shell configuration to include completions for the ${getAppTitle(this, true)} command-line interface.`,
|
|
259
|
-
alias: [],
|
|
260
|
-
path: "completions/fish/config",
|
|
261
|
-
segments: [
|
|
262
|
-
"completions",
|
|
263
|
-
"fish",
|
|
264
|
-
"config"
|
|
265
|
-
],
|
|
266
|
-
title: "Completions - Fish Configuration",
|
|
267
|
-
tags: ["Utility"],
|
|
268
|
-
entry: {
|
|
269
|
-
file: joinPaths(this.entryPath, "completions", "fish", "config", "index.ts"),
|
|
270
|
-
input: { file: joinPaths(this.entryPath, "completions", "fish", "config", "command.ts") }
|
|
271
|
-
},
|
|
272
|
-
isVirtual: false,
|
|
273
|
-
source: "completions-plugin"
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
},
|
|
277
|
-
prepare: {
|
|
278
|
-
order: "pre",
|
|
279
|
-
async handler() {
|
|
280
|
-
this.debug("Rendering command handling modules for the Shell Shock `completions` plugin.");
|
|
281
|
-
return render(this, [
|
|
282
|
-
createComponent(BashCompletionsShared, {}),
|
|
283
|
-
createComponent(BashScriptCompletionsCommand, {}),
|
|
284
|
-
createComponent(BashConfigCompletionsCommand, {}),
|
|
285
|
-
createComponent(ZshCompletionsShared, {}),
|
|
286
|
-
createComponent(ZshScriptCompletionsCommand, {}),
|
|
287
|
-
createComponent(ZshConfigCompletionsCommand, {}),
|
|
288
|
-
createComponent(PowerShellCompletionsShared, {}),
|
|
289
|
-
createComponent(PowerShellScriptCompletionsCommand, {}),
|
|
290
|
-
createComponent(PowerShellConfigCompletionsCommand, {}),
|
|
291
|
-
createComponent(FishCompletionsShared, {}),
|
|
292
|
-
createComponent(FishScriptCompletionsCommand, {}),
|
|
293
|
-
createComponent(FishConfigCompletionsCommand, {})
|
|
294
|
-
]);
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}];
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
//#endregion
|
|
301
|
-
export { plugin as default, plugin };
|
|
1
|
+
import{BashConfigCompletionsCommand as e}from"./components/bash-config-command.mjs";import{BashScriptCompletionsCommand as t}from"./components/bash-script-command.mjs";import{BashCompletionsShared as n}from"./components/bash-shared.mjs";import{FishConfigCompletionsCommand as r}from"./components/fish-config-command.mjs";import{FishScriptCompletionsCommand as i}from"./components/fish-script-command.mjs";import{FishCompletionsShared as a}from"./components/fish-shared.mjs";import{PowerShellConfigCompletionsCommand as o}from"./components/powershell-config-command.mjs";import{PowerShellScriptCompletionsCommand as s}from"./components/powershell-script-command.mjs";import{PowerShellCompletionsShared as c}from"./components/powershell-shared.mjs";import{ZshConfigCompletionsCommand as l}from"./components/zsh-config-command.mjs";import{ZshScriptCompletionsCommand as u}from"./components/zsh-script-command.mjs";import{ZshCompletionsShared as d}from"./components/zsh-shared.mjs";import"./components/index.mjs";import{SHELL_TYPES as f}from"./types/shell-type.mjs";import{createComponent as p}from"@alloy-js/core/jsx-runtime";import{render as m}from"@powerlines/plugin-alloy/render";import{getAppTitle as h}from"@shell-shock/core/plugin-utils";import{joinPaths as g}from"@stryke/path/join";const _=(_={})=>[{name:`shell-shock:completions`,config(){return this.debug("Providing default configuration for the Shell Shock `completions` plugin."),{completions:{shells:[...f],..._}}},configResolved(){this.debug(`Adding the CLI completion commands to the application context.`),this.inputs??=[],this.inputs.some(e=>e.id===`completions`)?this.info("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."):this.inputs.push({id:`completions`,name:`completions`,alias:[`completion`],path:`completions`,segments:[`completions`],title:`Completions`,icon:`🖵`,tags:[`Utility`],description:`Commands for generating shell completion scripts for ${h(this)}.`,entry:{file:g(this.entryPath,`completions`,`index.ts`)},isVirtual:!0,source:`completions-plugin`}),this.config.completions.shells.includes(`bash`)&&(this.inputs.some(e=>e.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."):(this.inputs.push({id:`completions-bash`,name:`bash`,description:`Commands to setup bash completions for the ${h(this,!0)} command-line interface.`,alias:[],path:`completions/bash`,segments:[`completions`,`bash`],title:`Completions - Bash`,tags:[`Utility`],entry:{file:g(this.entryPath,`completions`,`bash`,`index.ts`)},isVirtual:!0,source:`completions-plugin`}),this.inputs.push({id:`completions-bash-script`,name:`script`,description:`Generate a bash completion script for the ${h(this,!0)} command-line interface.`,alias:[],path:`completions/bash/script`,segments:[`completions`,`bash`,`script`],title:`Completions - Bash Script`,tags:[`Utility`],entry:{file:g(this.entryPath,`completions`,`bash`,`script`,`index.ts`),input:{file:g(this.entryPath,`completions`,`bash`,`script`,`command.ts`)}},isVirtual:!1,source:`completions-plugin`}),this.inputs.push({id:`completions-bash-config`,name:`config`,description:`Update the current system's bash shell configuration to include completions for the ${h(this,!0)} command-line interface.`,alias:[],path:`completions/bash/config`,segments:[`completions`,`bash`,`config`],title:`Completions - Bash Configuration`,tags:[`Utility`],entry:{file:g(this.entryPath,`completions`,`bash`,`config`,`index.ts`),input:{file:g(this.entryPath,`completions`,`bash`,`config`,`command.ts`)}},isVirtual:!1,source:`completions-plugin`}))),this.config.completions.shells.includes(`zsh`)&&(this.inputs.some(e=>e.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."):(this.inputs.push({id:`completions-zsh`,name:`zsh`,description:`Commands to setup Zsh completions for the ${h(this,!0)} command-line interface.`,alias:[],path:`completions/zsh`,segments:[`completions`,`zsh`],title:`Completions - Zsh`,tags:[`Utility`],entry:{file:g(this.entryPath,`completions`,`zsh`,`index.ts`)},isVirtual:!0,source:`completions-plugin`}),this.inputs.push({id:`completions-zsh-script`,name:`script`,description:`Generate a Zsh completion script for the ${h(this,!0)} command-line interface.`,alias:[],path:`completions/zsh/script`,segments:[`completions`,`zsh`,`script`],title:`Completions - Zsh Script`,tags:[`Utility`],entry:{file:g(this.entryPath,`completions`,`zsh`,`script`,`index.ts`),input:{file:g(this.entryPath,`completions`,`zsh`,`script`,`command.ts`)}},isVirtual:!1,source:`completions-plugin`}),this.inputs.push({id:`completions-zsh-config`,name:`config`,description:`Update the current system's Zsh shell configuration to include completions for the ${h(this,!0)} command-line interface.`,alias:[],path:`completions/zsh/config`,segments:[`completions`,`zsh`,`config`],title:`Completions - Zsh Configuration`,tags:[`Utility`],entry:{file:g(this.entryPath,`completions`,`zsh`,`config`,`index.ts`),input:{file:g(this.entryPath,`completions`,`zsh`,`config`,`command.ts`)}},isVirtual:!1,source:`completions-plugin`}))),this.config.completions.shells.includes(`powershell`)&&(this.inputs.some(e=>e.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."):(this.inputs.push({id:`completions-powershell`,name:`powershell`,description:`Commands to setup PowerShell completions for the ${h(this,!0)} command-line interface.`,alias:[],path:`completions/powershell`,segments:[`completions`,`powershell`],title:`Completions - PowerShell`,tags:[`Utility`],entry:{file:g(this.entryPath,`completions`,`powershell`,`index.ts`)},isVirtual:!0,source:`completions-plugin`}),this.inputs.push({id:`completions-powershell-script`,name:`script`,description:`Generate a PowerShell completion script for the ${h(this,!0)} command-line interface.`,alias:[],path:`completions/powershell/script`,segments:[`completions`,`powershell`,`script`],title:`Completions - PowerShell Script`,tags:[`Utility`],entry:{file:g(this.entryPath,`completions`,`powershell`,`script`,`index.ts`),input:{file:g(this.entryPath,`completions`,`powershell`,`script`,`command.ts`)}},isVirtual:!1,source:`completions-plugin`}),this.inputs.push({id:`completions-powershell-config`,name:`config`,description:`Update the current system's PowerShell configuration to include completions for the ${h(this,!0)} command-line interface.`,alias:[],path:`completions/powershell/config`,segments:[`completions`,`powershell`,`config`],title:`Completions - PowerShell Configuration`,tags:[`Utility`],entry:{file:g(this.entryPath,`completions`,`powershell`,`config`,`index.ts`),input:{file:g(this.entryPath,`completions`,`powershell`,`config`,`command.ts`)}},isVirtual:!1,source:`completions-plugin`}))),this.config.completions.shells.includes(`fish`)&&(this.inputs.some(e=>e.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."):(this.inputs.push({id:`completions-fish`,name:`fish`,description:`Commands to setup Fish completions for the ${h(this,!0)} command-line interface.`,alias:[],path:`completions/fish`,segments:[`completions`,`fish`],title:`Completions - Fish`,tags:[`Utility`],entry:{file:g(this.entryPath,`completions`,`fish`,`index.ts`)},isVirtual:!0,source:`completions-plugin`}),this.inputs.push({id:`completions-fish-script`,name:`script`,description:`Generate a Fish completion script for the ${h(this,!0)} command-line interface.`,alias:[],path:`completions/fish/script`,segments:[`completions`,`fish`,`script`],title:`Completions - Fish Script`,tags:[`Utility`],entry:{file:g(this.entryPath,`completions`,`fish`,`script`,`index.ts`),input:{file:g(this.entryPath,`completions`,`fish`,`script`,`command.ts`)}},isVirtual:!1,source:`completions-plugin`}),this.inputs.push({id:`completions-fish-config`,name:`config`,description:`Update the current system's Fish shell configuration to include completions for the ${h(this,!0)} command-line interface.`,alias:[],path:`completions/fish/config`,segments:[`completions`,`fish`,`config`],title:`Completions - Fish Configuration`,tags:[`Utility`],entry:{file:g(this.entryPath,`completions`,`fish`,`config`,`index.ts`),input:{file:g(this.entryPath,`completions`,`fish`,`config`,`command.ts`)}},isVirtual:!1,source:`completions-plugin`})))},prepare:{order:`pre`,async handler(){return this.debug("Rendering command handling modules for the Shell Shock `completions` plugin."),m(this,[p(n,{}),p(t,{}),p(e,{}),p(d,{}),p(u,{}),p(l,{}),p(c,{}),p(s,{}),p(o,{}),p(a,{}),p(i,{}),p(r,{})])}}}];export{_ as default,_ as plugin};
|
|
302
2
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -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 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: \"Completions\",\n icon: \"🖵\",\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 },\n isVirtual: true,\n source: \"completions-plugin\"\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 source: \"completions-plugin\"\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 source: \"completions-plugin\"\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 source: \"completions-plugin\"\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 source: \"completions-plugin\"\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 source: \"completions-plugin\"\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 source: \"completions-plugin\"\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 source: \"completions-plugin\"\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 source: \"completions-plugin\"\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 source: \"completions-plugin\"\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 source: \"completions-plugin\"\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 source: \"completions-plugin\"\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 source: \"completions-plugin\"\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,CACK,MAAM,KAAA,gNAAS;OAErB,MAAA,OAAA,KAAA;IACS,IAAC;IACD,MAAA;IACD,OAAA,CAAA,aAAA;IACL,MAAA;IACM,UAAS,CAAA,cAAM;IACnB,OAAS;IACP,MAAK;IACH,MAAC,CAAA,UAAU;IACZ,aAAA,wDAAA,YAAA,KAAA,CAAA;aAED,MAAO,UAAA,KAAA,WAAA,eAAA,WAAA,EACL;IACD,WAAA;IACF,QAAA;IACD,CAAA;AAEA,OAAI,KAAC,OAAW,YAAI,OAAW,SAAY,OAAI,CAC7C,KAAC,KAAA,OAAA,MAAA,UAAA,MAAA,OAAA,mBAAA;QAEI;AACH,SAAE,OAAK,KAAO;KACd,IAAK;KACH,MAAM;KACP,aAAA,8CAAA,YAAA,MAAA,KAAA,CAAA;KACD,OAAK,EAAA;KACL,MAAK;KACH,UAAK,CAAA,eAAY,OAAA;KACjB,OAAO;KACP,MAAM,CAAC,UAAE;KACT,OAAO,EACP,MAAQ,UAAI,KAAW,WAAE,eAAA,QAAA,WAAA,EACzB;KACA,WAAU;KACV,QAAQ;KACT,CAAC;AACF,SAAI,OAAA,KAAA;KACF,IAAI;KACJ,MAAM;KACN,aAAQ,6CAAkD,YAAC,MAA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,KAAA;KACL,IAAI;KACJ,MAAM;KACN,aAAa,uFAAS,YAAA,MAAA,KAAA,CAAA;KACtB,OAAO,EAAE;KACT,MAAM;KACN,UAAS;MAAA;MAAO;MAAA;MAAA;KAChB,OAAO;KACP,MAAM,CAAA,UAAA;KACN,OAAI;MACF,MAAC,UAAA,KAAA,WAAA,eAAA,QAAA,UAAA,WAAA;MACD,OAAA,EACA,MAAQ,UAAC,KAAY,WAAM,eAAA,QAAA,UAAA,aAAA,EAC3B;MACJ;KACF,WAAA;;KAEG,CAAC;;;EAIR,SAAQ;GACN,OAAO;GACP,MAAM,UAAC;AACL,SAAI,MAAK,+EAAA;AACT,WAAI,OAAK,MAAW;KAAC,gBAAA,uBAAA,EAAA,CAAA;KAAA,gBAAA,8BAAA,EAAA,CAAA;KAAA,gBAAA,8BAAA,EAAA,CAAA;KAAA,gBAAA,sBAAA,EAAA,CAAA;KAAA,gBAAA,6BAAA,EAAA,CAAA;KAAA,gBAAA,6BAAA,EAAA,CAAA;KAAA,gBAAA,6BAAA,EAAA,CAAA;KAAA,gBAAA,oCAAA,EAAA,CAAA;KAAA,gBAAA,oCAAA,EAAA,CAAA;KAAA,gBAAA,uBAAA,EAAA,CAAA;KAAA,gBAAA,8BAAA,EAAA,CAAA;KAAA,gBAAA,8BAAA,EAAA,CAAA;KAAA,CAAA;;GAExB;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: \"Completions\",\n icon: \"🖵\",\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 },\n isVirtual: true,\n source: \"completions-plugin\"\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 source: \"completions-plugin\"\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 source: \"completions-plugin\"\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 source: \"completions-plugin\"\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 source: \"completions-plugin\"\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 source: \"completions-plugin\"\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 source: \"completions-plugin\"\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 source: \"completions-plugin\"\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 source: \"completions-plugin\"\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 source: \"completions-plugin\"\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 source: \"completions-plugin\"\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 source: \"completions-plugin\"\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 source: \"completions-plugin\"\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":"uwCA2BA,MAAE,GAAA,EAA4B,EAAA,GAC5B,CAAA,CACA,KAAA,0BACA,QAAA,CAEA,OADA,KAAA,MAAA,4EAAkC,CAClC,CACA,YAAA,CACA,OAAA,CAAA,GAAA,EAAA,CACQ,GAAA,EACH,CACL,EAEA,gBAAc,CACV,KAAG,MAAA,iEAAuC,kBAEzC,KAAO,OAAQ,KAAK,GAAC,EAAA,KAAA,cAAA,CAAA,KAAA,KAAA,gNAAA,CAGrB,KAAA,OAAa,KAAC,CACnB,GAAA,cACK,KAAM,cACH,MAAC,CAAO,aAAC,CAClB,KAAA,cACS,SAAC,CAAA,cAAwB,CACzB,MAAA,cACD,KAAA,KACL,KAAA,CAAA,UAAA,CACM,YAAS,wDAAkB,EAAA,KAAA,CAAA,GAC/B,MAAS,CACH,KAAM,EAAA,KAAA,UAAA,cAAA,WAAA,CACP,CACF,UAAA,+BAED,CAAA,CAEC,KAAA,OAAA,YAAA,OAAA,SAAA,OAAA,GACF,KAAA,OAAA,KAAA,GAAA,EAAA,KAAA,mBAAA,CACD,KAAA,KAAc,0NAAG,EAEb,KAAC,OAAW,KAAI,CACjB,GAAA,+BAEG,YAAa,8CAAC,EAAA,KAAA,GAAA,CAAA,0BACd,MAAK,EAAA,CACP,KAAK,mBACH,SAAM,CAAA,cAAoB,OAAC,CAC5B,MAAA,qBACD,KAAK,CAAA,UAAA,CACL,MAAK,CACD,KAAG,EAAY,KAAA,UAAA,cAAA,OAAA,WAAA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WAAA,CACT,MAAO,CACP,KAAQ,EAAI,KAAW,UAAW,cAAQ,OAAA,SAAA,aAAA,CAC1C,CACD,CACD,UAAS,GACT,OAAQ,qBACT,CAAC,CACF,KAAK,OAAI,KAAA,CACP,GAAI,0BACJ,KAAM,SACN,YAAa,uFAAE,EAAA,KAAA,GAAA,CAAA,0BACf,MAAK,EAAA,CACL,KAAI,0BACJ,SAAU,CAAC,cAAU,OAAA,SAAA,CACrB,MAAO,mCACP,KAAM,CAAC,UAAE,CACT,MAAO,CACL,KAAM,EAAQ,KAAA,UAAA,cAAA,OAAA,SAAA,WAAA,CACd,MAAO,CACL,KAAE,EAAA,KAAA,UAAA,cAAA,OAAA,SAAA,aAAA,CACH,CACF,CACD,UAAW,GACX,OAAQ,qBACT,CAAC,IAIR,QAAQ,CACN,MAAO,MACP,MAAM,SAAK,CAET,OADA,KAAI,MAAA,+EAAA,CACA,EAAS,KAAA,CAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAEhB,CACF,CAAC"}
|
package/dist/types/index.cjs
CHANGED
|
@@ -1,4 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,
|
|
2
|
-
const require_types_shell_type = require('./shell-type.cjs');
|
|
3
|
-
|
|
4
|
-
exports.SHELL_TYPES = require_types_shell_type.SHELL_TYPES;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./shell-type.cjs`);exports.SHELL_TYPES=e.SHELL_TYPES;
|
package/dist/types/index.mjs
CHANGED
package/dist/types/plugin.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export{};
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,
|
|
2
|
-
|
|
3
|
-
//#region src/types/shell-type.ts
|
|
4
|
-
const SHELL_TYPES = [
|
|
5
|
-
"bash",
|
|
6
|
-
"fish",
|
|
7
|
-
"zsh",
|
|
8
|
-
"powershell"
|
|
9
|
-
];
|
|
10
|
-
|
|
11
|
-
//#endregion
|
|
12
|
-
exports.SHELL_TYPES = SHELL_TYPES;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=[`bash`,`fish`,`zsh`,`powershell`];exports.SHELL_TYPES=e;
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
const SHELL_TYPES = [
|
|
3
|
-
"bash",
|
|
4
|
-
"fish",
|
|
5
|
-
"zsh",
|
|
6
|
-
"powershell"
|
|
7
|
-
];
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
|
-
export { SHELL_TYPES };
|
|
1
|
+
const e=[`bash`,`fish`,`zsh`,`powershell`];export{e as SHELL_TYPES};
|
|
11
2
|
//# sourceMappingURL=shell-type.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell-type.mjs","names":[],"sources":["../../src/types/shell-type.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\nexport type ShellType = \"bash\" | \"fish\" | \"zsh\" | \"powershell\";\n\nexport const SHELL_TYPES: readonly ShellType[] = [\n \"bash\",\n \"fish\",\n \"zsh\",\n \"powershell\"\n] as const;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"shell-type.mjs","names":[],"sources":["../../src/types/shell-type.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\nexport type ShellType = \"bash\" | \"fish\" | \"zsh\" | \"powershell\";\n\nexport const SHELL_TYPES: readonly ShellType[] = [\n \"bash\",\n \"fish\",\n \"zsh\",\n \"powershell\"\n] as const;\n"],"mappings":"AAkBA,MAAY,EAAa,CAAA,OAAS,OAAS,MAAQ,aAAW"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shell-shock/plugin-completions",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.16",
|
|
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": {
|
|
@@ -335,16 +335,16 @@
|
|
|
335
335
|
"dependencies": {
|
|
336
336
|
"@alloy-js/core": "0.23.0-dev.8",
|
|
337
337
|
"@alloy-js/typescript": "0.23.0-dev.4",
|
|
338
|
-
"@powerlines/deepkit": "^0.8.
|
|
339
|
-
"@powerlines/plugin-alloy": "^0.26.
|
|
340
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
341
|
-
"@shell-shock/core": "^0.17.
|
|
342
|
-
"@stryke/path": "^0.
|
|
343
|
-
"@stryke/string-format": "^0.17.
|
|
344
|
-
"powerlines": "^0.
|
|
338
|
+
"@powerlines/deepkit": "^0.8.49",
|
|
339
|
+
"@powerlines/plugin-alloy": "^0.26.67",
|
|
340
|
+
"@powerlines/plugin-plugin": "^0.12.399",
|
|
341
|
+
"@shell-shock/core": "^0.17.8",
|
|
342
|
+
"@stryke/path": "^0.28.1",
|
|
343
|
+
"@stryke/string-format": "^0.17.12",
|
|
344
|
+
"powerlines": "^0.44.12"
|
|
345
345
|
},
|
|
346
346
|
"devDependencies": {
|
|
347
|
-
"@powerlines/plugin-deepkit": "^0.11.
|
|
347
|
+
"@powerlines/plugin-deepkit": "^0.11.330",
|
|
348
348
|
"@types/node": "^25.6.0"
|
|
349
349
|
},
|
|
350
350
|
"publishConfig": {
|
|
@@ -362,5 +362,5 @@
|
|
|
362
362
|
"./package.json": "./package.json"
|
|
363
363
|
}
|
|
364
364
|
},
|
|
365
|
-
"gitHead": "
|
|
365
|
+
"gitHead": "832c19e668deb4d29b5e0219a7708d111790f607"
|
|
366
366
|
}
|