@shell-shock/plugin-completions 0.4.30 → 0.4.32

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 (71) hide show
  1. package/dist/components/bash-config-command.cjs +17 -17
  2. package/dist/components/bash-config-command.d.cts.map +1 -1
  3. package/dist/components/bash-config-command.mjs +5 -5
  4. package/dist/components/bash-script-command.cjs +14 -14
  5. package/dist/components/bash-script-command.d.cts.map +1 -1
  6. package/dist/components/bash-script-command.mjs +5 -5
  7. package/dist/components/bash-shared.cjs +8 -8
  8. package/dist/components/bash-shared.d.cts.map +1 -1
  9. package/dist/components/bash-shared.mjs +4 -4
  10. package/dist/components/fish-config-command.cjs +17 -17
  11. package/dist/components/fish-config-command.d.cts.map +1 -1
  12. package/dist/components/fish-config-command.mjs +5 -5
  13. package/dist/components/fish-script-command.cjs +13 -13
  14. package/dist/components/fish-script-command.d.cts.map +1 -1
  15. package/dist/components/fish-script-command.mjs +5 -5
  16. package/dist/components/fish-shared.cjs +8 -8
  17. package/dist/components/fish-shared.d.cts.map +1 -1
  18. package/dist/components/fish-shared.mjs +4 -4
  19. package/dist/components/powershell-config-command.cjs +15 -15
  20. package/dist/components/powershell-config-command.d.cts.map +1 -1
  21. package/dist/components/powershell-config-command.mjs +4 -4
  22. package/dist/components/powershell-script-command.cjs +14 -14
  23. package/dist/components/powershell-script-command.d.cts.map +1 -1
  24. package/dist/components/powershell-script-command.mjs +5 -5
  25. package/dist/components/powershell-shared.cjs +8 -8
  26. package/dist/components/powershell-shared.d.cts.map +1 -1
  27. package/dist/components/powershell-shared.mjs +4 -4
  28. package/dist/components/zsh-config-command.cjs +17 -17
  29. package/dist/components/zsh-config-command.d.cts.map +1 -1
  30. package/dist/components/zsh-config-command.mjs +5 -5
  31. package/dist/components/zsh-script-command.cjs +14 -14
  32. package/dist/components/zsh-script-command.d.cts.map +1 -1
  33. package/dist/components/zsh-script-command.mjs +5 -5
  34. package/dist/components/zsh-shared.cjs +8 -8
  35. package/dist/components/zsh-shared.d.cts.map +1 -1
  36. package/dist/components/zsh-shared.mjs +4 -4
  37. package/dist/generator-BDvpem35.cjs +63 -0
  38. package/dist/generator-DQoArSbb.mjs +59 -0
  39. package/dist/generator-DQoArSbb.mjs.map +1 -0
  40. package/dist/generator.cjs +5 -0
  41. package/dist/generator.d.cts +10 -0
  42. package/dist/generator.d.cts.map +1 -0
  43. package/dist/generator.d.mts +10 -0
  44. package/dist/generator.d.mts.map +1 -0
  45. package/dist/generator.mjs +3 -0
  46. package/dist/helpers/complete-command.cjs +0 -1
  47. package/dist/helpers/complete-command.d.cts.map +1 -1
  48. package/dist/helpers/completion-directive-constants.cjs +0 -1
  49. package/dist/helpers/completion-directive-constants.d.cts.map +1 -1
  50. package/dist/index.cjs +221 -238
  51. package/dist/index.d.cts +4 -3
  52. package/dist/index.d.cts.map +1 -1
  53. package/dist/index.d.mts +4 -3
  54. package/dist/index.mjs +221 -239
  55. package/dist/shell-type-DETq6QwA.d.cts +6 -0
  56. package/dist/shell-type-DETq6QwA.d.cts.map +1 -0
  57. package/dist/shell-type-DETq6QwA.d.mts +6 -0
  58. package/dist/shell-type-DETq6QwA.d.mts.map +1 -0
  59. package/dist/types/index.cjs +1 -0
  60. package/dist/types/index.d.cts +1 -1
  61. package/dist/types/index.d.mts +1 -1
  62. package/dist/types/index.mjs +1 -0
  63. package/dist/types/plugin.d.cts +1 -2
  64. package/dist/types/plugin.d.cts.map +1 -1
  65. package/dist/types/plugin.d.mts +1 -2
  66. package/dist/types/shell-type.cjs +0 -1
  67. package/dist/types/shell-type.d.cts +2 -6
  68. package/dist/types/shell-type.d.mts +2 -6
  69. package/package.json +28 -14
  70. package/dist/types/shell-type.d.cts.map +0 -1
  71. package/dist/types/shell-type.d.mts.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,12 +1,13 @@
1
- import { SHELL_TYPES, ShellType } from "./types/shell-type.cjs";
1
+ import { completionsGenerator } from "./generator.cjs";
2
+ import { n as ShellType, t as SHELL_TYPES } from "./shell-type-DETq6QwA.cjs";
2
3
  import { CompletionsPluginContext, CompletionsPluginOptions, CompletionsPluginResolvedConfig, CompletionsPluginUserConfig } from "./types/plugin.cjs";
4
+ import "./types/index.cjs";
3
5
  import { Plugin } from "powerlines";
4
-
5
6
  //#region src/index.d.ts
6
7
  /**
7
8
  * The Completions - Shell Shock plugin to add completion commands to a Shell Shock application.
8
9
  */
9
10
  declare const plugin: <TContext extends CompletionsPluginContext = CompletionsPluginContext>(options?: CompletionsPluginOptions) => Plugin<TContext>;
10
11
  //#endregion
11
- export { type CompletionsPluginContext, type CompletionsPluginOptions, type CompletionsPluginResolvedConfig, type CompletionsPluginUserConfig, type SHELL_TYPES, type ShellType, plugin as default, plugin };
12
+ export { type CompletionsPluginContext, type CompletionsPluginOptions, type CompletionsPluginResolvedConfig, type CompletionsPluginUserConfig, type SHELL_TYPES, type ShellType, completionsGenerator, plugin as default, plugin };
12
13
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;;;cA+Ca,MAAA,oBACM,wBAAA,GAA2B,wBAAA,EAE5C,OAAA,GAAS,wBAAA,KACR,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;;;;cAmCa,SACX,iBAAiB,2BAA2B,0BAE5C,UAAS,6BACR,OAAO"}
package/dist/index.d.mts CHANGED
@@ -1,12 +1,13 @@
1
- import { SHELL_TYPES, ShellType } from "./types/shell-type.mjs";
1
+ import { completionsGenerator } from "./generator.mjs";
2
+ import { n as ShellType, t as SHELL_TYPES } from "./shell-type-DETq6QwA.mjs";
2
3
  import { CompletionsPluginContext, CompletionsPluginOptions, CompletionsPluginResolvedConfig, CompletionsPluginUserConfig } from "./types/plugin.mjs";
4
+ import "./types/index.mjs";
3
5
  import { Plugin } from "powerlines";
4
-
5
6
  //#region src/index.d.ts
6
7
  /**
7
8
  * The Completions - Shell Shock plugin to add completion commands to a Shell Shock application.
8
9
  */
9
10
  declare const plugin: <TContext extends CompletionsPluginContext = CompletionsPluginContext>(options?: CompletionsPluginOptions) => Plugin<TContext>;
10
11
  //#endregion
11
- export { type CompletionsPluginContext, type CompletionsPluginOptions, type CompletionsPluginResolvedConfig, type CompletionsPluginUserConfig, type SHELL_TYPES, type ShellType, plugin as default, plugin };
12
+ export { type CompletionsPluginContext, type CompletionsPluginOptions, type CompletionsPluginResolvedConfig, type CompletionsPluginUserConfig, type SHELL_TYPES, type ShellType, completionsGenerator, plugin as default, plugin };
12
13
  //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs CHANGED
@@ -1,19 +1,6 @@
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";
13
- import "./components/index.mjs";
1
+ import { t as completionsGenerator } from "./generator-DQoArSbb.mjs";
14
2
  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";
3
+ import { executeCommandGenerator } from "@shell-shock/core/helpers/power-plant";
17
4
  import { getAppTitle } from "@shell-shock/core/plugin-utils";
18
5
  import { joinPaths } from "@stryke/path/join";
19
6
 
@@ -48,242 +35,237 @@ const plugin = (options = {}) => {
48
35
  entry: { file: joinPaths(this.entryPath, "completions", "index.ts") },
49
36
  virtual: true
50
37
  });
51
- 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.");
52
- else {
53
- this.inputs.push({
54
- id: "completions-bash",
55
- name: "bash",
56
- description: `Commands to setup bash completions for the ${getAppTitle(this, true)} command-line interface.`,
57
- alias: [],
58
- path: "completions/bash",
59
- segments: ["completions", "bash"],
60
- title: "Completions - Bash",
61
- tags: ["Utility"],
62
- entry: { file: joinPaths(this.entryPath, "completions", "bash", "index.ts") },
63
- virtual: true
64
- });
65
- this.inputs.push({
66
- id: "completions-bash-script",
67
- name: "script",
68
- description: `Generate a bash completion script for the ${getAppTitle(this, true)} command-line interface.`,
69
- alias: [],
70
- path: "completions/bash/script",
71
- segments: [
72
- "completions",
73
- "bash",
74
- "script"
75
- ],
76
- title: "Completions - Bash Script",
77
- tags: ["Utility"],
78
- entry: {
79
- file: joinPaths(this.entryPath, "completions", "bash", "script", "index.ts"),
80
- input: { file: joinPaths(this.entryPath, "completions", "bash", "script", "command.ts") }
81
- },
82
- virtual: false
83
- });
84
- this.inputs.push({
85
- id: "completions-bash-config",
86
- name: "config",
87
- description: `Update the current system's bash shell configuration to include completions for the ${getAppTitle(this, true)} command-line interface.`,
88
- alias: [],
89
- path: "completions/bash/config",
90
- segments: [
91
- "completions",
92
- "bash",
93
- "config"
94
- ],
95
- title: "Completions - Bash Configuration",
96
- tags: ["Utility"],
97
- entry: {
98
- file: joinPaths(this.entryPath, "completions", "bash", "config", "index.ts"),
99
- input: { file: joinPaths(this.entryPath, "completions", "bash", "config", "command.ts") }
100
- },
101
- virtual: false
102
- });
38
+ if (this.config.completions.shells.includes("bash")) {
39
+ 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.");
40
+ else {
41
+ this.inputs.push({
42
+ id: "completions-bash",
43
+ name: "bash",
44
+ description: `Commands to setup bash completions for the ${getAppTitle(this, true)} command-line interface.`,
45
+ alias: [],
46
+ path: "completions/bash",
47
+ segments: ["completions", "bash"],
48
+ title: "Completions - Bash",
49
+ tags: ["Utility"],
50
+ entry: { file: joinPaths(this.entryPath, "completions", "bash", "index.ts") },
51
+ virtual: true
52
+ });
53
+ this.inputs.push({
54
+ id: "completions-bash-script",
55
+ name: "script",
56
+ description: `Generate a bash completion script for the ${getAppTitle(this, true)} command-line interface.`,
57
+ alias: [],
58
+ path: "completions/bash/script",
59
+ segments: [
60
+ "completions",
61
+ "bash",
62
+ "script"
63
+ ],
64
+ title: "Completions - Bash Script",
65
+ tags: ["Utility"],
66
+ entry: {
67
+ file: joinPaths(this.entryPath, "completions", "bash", "script", "index.ts"),
68
+ input: { file: joinPaths(this.entryPath, "completions", "bash", "script", "command.ts") }
69
+ },
70
+ virtual: false
71
+ });
72
+ this.inputs.push({
73
+ id: "completions-bash-config",
74
+ name: "config",
75
+ description: `Update the current system's bash shell configuration to include completions for the ${getAppTitle(this, true)} command-line interface.`,
76
+ alias: [],
77
+ path: "completions/bash/config",
78
+ segments: [
79
+ "completions",
80
+ "bash",
81
+ "config"
82
+ ],
83
+ title: "Completions - Bash Configuration",
84
+ tags: ["Utility"],
85
+ entry: {
86
+ file: joinPaths(this.entryPath, "completions", "bash", "config", "index.ts"),
87
+ input: { file: joinPaths(this.entryPath, "completions", "bash", "config", "command.ts") }
88
+ },
89
+ virtual: false
90
+ });
91
+ }
103
92
  }
104
- 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.");
105
- else {
106
- this.inputs.push({
107
- id: "completions-zsh",
108
- name: "zsh",
109
- description: `Commands to setup Zsh completions for the ${getAppTitle(this, true)} command-line interface.`,
110
- alias: [],
111
- path: "completions/zsh",
112
- segments: ["completions", "zsh"],
113
- title: "Completions - Zsh",
114
- tags: ["Utility"],
115
- entry: { file: joinPaths(this.entryPath, "completions", "zsh", "index.ts") },
116
- virtual: true
117
- });
118
- this.inputs.push({
119
- id: "completions-zsh-script",
120
- name: "script",
121
- description: `Generate a Zsh completion script for the ${getAppTitle(this, true)} command-line interface.`,
122
- alias: [],
123
- path: "completions/zsh/script",
124
- segments: [
125
- "completions",
126
- "zsh",
127
- "script"
128
- ],
129
- title: "Completions - Zsh Script",
130
- tags: ["Utility"],
131
- entry: {
132
- file: joinPaths(this.entryPath, "completions", "zsh", "script", "index.ts"),
133
- input: { file: joinPaths(this.entryPath, "completions", "zsh", "script", "command.ts") }
134
- },
135
- virtual: false
136
- });
137
- this.inputs.push({
138
- id: "completions-zsh-config",
139
- name: "config",
140
- description: `Update the current system's Zsh shell configuration to include completions for the ${getAppTitle(this, true)} command-line interface.`,
141
- alias: [],
142
- path: "completions/zsh/config",
143
- segments: [
144
- "completions",
145
- "zsh",
146
- "config"
147
- ],
148
- title: "Completions - Zsh Configuration",
149
- tags: ["Utility"],
150
- entry: {
151
- file: joinPaths(this.entryPath, "completions", "zsh", "config", "index.ts"),
152
- input: { file: joinPaths(this.entryPath, "completions", "zsh", "config", "command.ts") }
153
- },
154
- virtual: false
155
- });
93
+ if (this.config.completions.shells.includes("zsh")) {
94
+ 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.");
95
+ else {
96
+ this.inputs.push({
97
+ id: "completions-zsh",
98
+ name: "zsh",
99
+ description: `Commands to setup Zsh completions for the ${getAppTitle(this, true)} command-line interface.`,
100
+ alias: [],
101
+ path: "completions/zsh",
102
+ segments: ["completions", "zsh"],
103
+ title: "Completions - Zsh",
104
+ tags: ["Utility"],
105
+ entry: { file: joinPaths(this.entryPath, "completions", "zsh", "index.ts") },
106
+ virtual: true
107
+ });
108
+ this.inputs.push({
109
+ id: "completions-zsh-script",
110
+ name: "script",
111
+ description: `Generate a Zsh completion script for the ${getAppTitle(this, true)} command-line interface.`,
112
+ alias: [],
113
+ path: "completions/zsh/script",
114
+ segments: [
115
+ "completions",
116
+ "zsh",
117
+ "script"
118
+ ],
119
+ title: "Completions - Zsh Script",
120
+ tags: ["Utility"],
121
+ entry: {
122
+ file: joinPaths(this.entryPath, "completions", "zsh", "script", "index.ts"),
123
+ input: { file: joinPaths(this.entryPath, "completions", "zsh", "script", "command.ts") }
124
+ },
125
+ virtual: false
126
+ });
127
+ this.inputs.push({
128
+ id: "completions-zsh-config",
129
+ name: "config",
130
+ description: `Update the current system's Zsh shell configuration to include completions for the ${getAppTitle(this, true)} command-line interface.`,
131
+ alias: [],
132
+ path: "completions/zsh/config",
133
+ segments: [
134
+ "completions",
135
+ "zsh",
136
+ "config"
137
+ ],
138
+ title: "Completions - Zsh Configuration",
139
+ tags: ["Utility"],
140
+ entry: {
141
+ file: joinPaths(this.entryPath, "completions", "zsh", "config", "index.ts"),
142
+ input: { file: joinPaths(this.entryPath, "completions", "zsh", "config", "command.ts") }
143
+ },
144
+ virtual: false
145
+ });
146
+ }
156
147
  }
157
- 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.");
158
- else {
159
- this.inputs.push({
160
- id: "completions-powershell",
161
- name: "powershell",
162
- description: `Commands to setup PowerShell completions for the ${getAppTitle(this, true)} command-line interface.`,
163
- alias: [],
164
- path: "completions/powershell",
165
- segments: ["completions", "powershell"],
166
- title: "Completions - PowerShell",
167
- tags: ["Utility"],
168
- entry: { file: joinPaths(this.entryPath, "completions", "powershell", "index.ts") },
169
- virtual: true
170
- });
171
- this.inputs.push({
172
- id: "completions-powershell-script",
173
- name: "script",
174
- description: `Generate a PowerShell completion script for the ${getAppTitle(this, true)} command-line interface.`,
175
- alias: [],
176
- path: "completions/powershell/script",
177
- segments: [
178
- "completions",
179
- "powershell",
180
- "script"
181
- ],
182
- title: "Completions - PowerShell Script",
183
- tags: ["Utility"],
184
- entry: {
185
- file: joinPaths(this.entryPath, "completions", "powershell", "script", "index.ts"),
186
- input: { file: joinPaths(this.entryPath, "completions", "powershell", "script", "command.ts") }
187
- },
188
- virtual: false
189
- });
190
- this.inputs.push({
191
- id: "completions-powershell-config",
192
- name: "config",
193
- description: `Update the current system's PowerShell configuration to include completions for the ${getAppTitle(this, true)} command-line interface.`,
194
- alias: [],
195
- path: "completions/powershell/config",
196
- segments: [
197
- "completions",
198
- "powershell",
199
- "config"
200
- ],
201
- title: "Completions - PowerShell Configuration",
202
- tags: ["Utility"],
203
- entry: {
204
- file: joinPaths(this.entryPath, "completions", "powershell", "config", "index.ts"),
205
- input: { file: joinPaths(this.entryPath, "completions", "powershell", "config", "command.ts") }
206
- },
207
- virtual: false
208
- });
148
+ if (this.config.completions.shells.includes("powershell")) {
149
+ 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.");
150
+ else {
151
+ this.inputs.push({
152
+ id: "completions-powershell",
153
+ name: "powershell",
154
+ description: `Commands to setup PowerShell completions for the ${getAppTitle(this, true)} command-line interface.`,
155
+ alias: [],
156
+ path: "completions/powershell",
157
+ segments: ["completions", "powershell"],
158
+ title: "Completions - PowerShell",
159
+ tags: ["Utility"],
160
+ entry: { file: joinPaths(this.entryPath, "completions", "powershell", "index.ts") },
161
+ virtual: true
162
+ });
163
+ this.inputs.push({
164
+ id: "completions-powershell-script",
165
+ name: "script",
166
+ description: `Generate a PowerShell completion script for the ${getAppTitle(this, true)} command-line interface.`,
167
+ alias: [],
168
+ path: "completions/powershell/script",
169
+ segments: [
170
+ "completions",
171
+ "powershell",
172
+ "script"
173
+ ],
174
+ title: "Completions - PowerShell Script",
175
+ tags: ["Utility"],
176
+ entry: {
177
+ file: joinPaths(this.entryPath, "completions", "powershell", "script", "index.ts"),
178
+ input: { file: joinPaths(this.entryPath, "completions", "powershell", "script", "command.ts") }
179
+ },
180
+ virtual: false
181
+ });
182
+ this.inputs.push({
183
+ id: "completions-powershell-config",
184
+ name: "config",
185
+ description: `Update the current system's PowerShell configuration to include completions for the ${getAppTitle(this, true)} command-line interface.`,
186
+ alias: [],
187
+ path: "completions/powershell/config",
188
+ segments: [
189
+ "completions",
190
+ "powershell",
191
+ "config"
192
+ ],
193
+ title: "Completions - PowerShell Configuration",
194
+ tags: ["Utility"],
195
+ entry: {
196
+ file: joinPaths(this.entryPath, "completions", "powershell", "config", "index.ts"),
197
+ input: { file: joinPaths(this.entryPath, "completions", "powershell", "config", "command.ts") }
198
+ },
199
+ virtual: false
200
+ });
201
+ }
209
202
  }
210
- 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.");
211
- else {
212
- this.inputs.push({
213
- id: "completions-fish",
214
- name: "fish",
215
- description: `Commands to setup Fish completions for the ${getAppTitle(this, true)} command-line interface.`,
216
- alias: [],
217
- path: "completions/fish",
218
- segments: ["completions", "fish"],
219
- title: "Completions - Fish",
220
- tags: ["Utility"],
221
- entry: { file: joinPaths(this.entryPath, "completions", "fish", "index.ts") },
222
- virtual: true
223
- });
224
- this.inputs.push({
225
- id: "completions-fish-script",
226
- name: "script",
227
- description: `Generate a Fish completion script for the ${getAppTitle(this, true)} command-line interface.`,
228
- alias: [],
229
- path: "completions/fish/script",
230
- segments: [
231
- "completions",
232
- "fish",
233
- "script"
234
- ],
235
- title: "Completions - Fish Script",
236
- tags: ["Utility"],
237
- entry: {
238
- file: joinPaths(this.entryPath, "completions", "fish", "script", "index.ts"),
239
- input: { file: joinPaths(this.entryPath, "completions", "fish", "script", "command.ts") }
240
- },
241
- virtual: false
242
- });
243
- this.inputs.push({
244
- id: "completions-fish-config",
245
- name: "config",
246
- description: `Update the current system's Fish shell configuration to include completions for the ${getAppTitle(this, true)} command-line interface.`,
247
- alias: [],
248
- path: "completions/fish/config",
249
- segments: [
250
- "completions",
251
- "fish",
252
- "config"
253
- ],
254
- title: "Completions - Fish Configuration",
255
- tags: ["Utility"],
256
- entry: {
257
- file: joinPaths(this.entryPath, "completions", "fish", "config", "index.ts"),
258
- input: { file: joinPaths(this.entryPath, "completions", "fish", "config", "command.ts") }
259
- },
260
- virtual: false
261
- });
203
+ if (this.config.completions.shells.includes("fish")) {
204
+ 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.");
205
+ else {
206
+ this.inputs.push({
207
+ id: "completions-fish",
208
+ name: "fish",
209
+ description: `Commands to setup Fish completions for the ${getAppTitle(this, true)} command-line interface.`,
210
+ alias: [],
211
+ path: "completions/fish",
212
+ segments: ["completions", "fish"],
213
+ title: "Completions - Fish",
214
+ tags: ["Utility"],
215
+ entry: { file: joinPaths(this.entryPath, "completions", "fish", "index.ts") },
216
+ virtual: true
217
+ });
218
+ this.inputs.push({
219
+ id: "completions-fish-script",
220
+ name: "script",
221
+ description: `Generate a Fish completion script for the ${getAppTitle(this, true)} command-line interface.`,
222
+ alias: [],
223
+ path: "completions/fish/script",
224
+ segments: [
225
+ "completions",
226
+ "fish",
227
+ "script"
228
+ ],
229
+ title: "Completions - Fish Script",
230
+ tags: ["Utility"],
231
+ entry: {
232
+ file: joinPaths(this.entryPath, "completions", "fish", "script", "index.ts"),
233
+ input: { file: joinPaths(this.entryPath, "completions", "fish", "script", "command.ts") }
234
+ },
235
+ virtual: false
236
+ });
237
+ this.inputs.push({
238
+ id: "completions-fish-config",
239
+ name: "config",
240
+ description: `Update the current system's Fish shell configuration to include completions for the ${getAppTitle(this, true)} command-line interface.`,
241
+ alias: [],
242
+ path: "completions/fish/config",
243
+ segments: [
244
+ "completions",
245
+ "fish",
246
+ "config"
247
+ ],
248
+ title: "Completions - Fish Configuration",
249
+ tags: ["Utility"],
250
+ entry: {
251
+ file: joinPaths(this.entryPath, "completions", "fish", "config", "index.ts"),
252
+ input: { file: joinPaths(this.entryPath, "completions", "fish", "config", "command.ts") }
253
+ },
254
+ virtual: false
255
+ });
256
+ }
262
257
  }
263
258
  },
264
259
  prepare: {
265
260
  order: "pre",
266
261
  async handler() {
267
- this.debug("Rendering command handling modules for the Shell Shock `completions` plugin.");
268
- return render(this, [
269
- createComponent(BashCompletionsShared, {}),
270
- createComponent(BashScriptCompletionsCommand, {}),
271
- createComponent(BashConfigCompletionsCommand, {}),
272
- createComponent(ZshCompletionsShared, {}),
273
- createComponent(ZshScriptCompletionsCommand, {}),
274
- createComponent(ZshConfigCompletionsCommand, {}),
275
- createComponent(PowerShellCompletionsShared, {}),
276
- createComponent(PowerShellScriptCompletionsCommand, {}),
277
- createComponent(PowerShellConfigCompletionsCommand, {}),
278
- createComponent(FishCompletionsShared, {}),
279
- createComponent(FishScriptCompletionsCommand, {}),
280
- createComponent(FishConfigCompletionsCommand, {})
281
- ]);
262
+ this.debug("Rendering command handling modules via Power Plant for the Shell Shock `completions` plugin.");
263
+ return executeCommandGenerator(this, completionsGenerator);
282
264
  }
283
265
  }
284
266
  };
285
267
  };
286
268
 
287
269
  //#endregion
288
- export { plugin as default, plugin };
270
+ export { completionsGenerator, plugin as default, plugin };
289
271
  //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,6 @@
1
+ //#region src/types/shell-type.d.ts
2
+ type ShellType = "bash" | "fish" | "zsh" | "powershell";
3
+ declare const SHELL_TYPES: readonly ShellType[];
4
+ //#endregion
5
+ export { ShellType as n, SHELL_TYPES as t };
6
+ //# sourceMappingURL=shell-type-DETq6QwA.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shell-type-DETq6QwA.d.cts","names":[],"sources":["../src/types/shell-type.ts"],"mappings":";KAkBY;cAEC,sBAAsB"}
@@ -0,0 +1,6 @@
1
+ //#region src/types/shell-type.d.ts
2
+ type ShellType = "bash" | "fish" | "zsh" | "powershell";
3
+ declare const SHELL_TYPES: readonly ShellType[];
4
+ //#endregion
5
+ export { ShellType as n, SHELL_TYPES as t };
6
+ //# sourceMappingURL=shell-type-DETq6QwA.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shell-type-DETq6QwA.d.mts","names":[],"sources":["../src/types/shell-type.ts"],"mappings":""}
@@ -1,4 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_types_shell_type = require('./shell-type.cjs');
3
+ require('./plugin.cjs');
3
4
 
4
5
  exports.SHELL_TYPES = require_types_shell_type.SHELL_TYPES;
@@ -1,3 +1,3 @@
1
- import { SHELL_TYPES, ShellType } from "./shell-type.cjs";
1
+ import { n as ShellType, t as SHELL_TYPES } from "../shell-type-DETq6QwA.cjs";
2
2
  import { CompletionsPluginContext, CompletionsPluginOptions, CompletionsPluginResolvedConfig, CompletionsPluginUserConfig } from "./plugin.cjs";
3
3
  export { CompletionsPluginContext, CompletionsPluginOptions, CompletionsPluginResolvedConfig, CompletionsPluginUserConfig, SHELL_TYPES, ShellType };
@@ -1,3 +1,3 @@
1
- import { SHELL_TYPES, ShellType } from "./shell-type.mjs";
1
+ import { n as ShellType, t as SHELL_TYPES } from "../shell-type-DETq6QwA.mjs";
2
2
  import { CompletionsPluginContext, CompletionsPluginOptions, CompletionsPluginResolvedConfig, CompletionsPluginUserConfig } from "./plugin.mjs";
3
3
  export { CompletionsPluginContext, CompletionsPluginOptions, CompletionsPluginResolvedConfig, CompletionsPluginUserConfig, SHELL_TYPES, ShellType };
@@ -1,3 +1,4 @@
1
1
  import { SHELL_TYPES } from "./shell-type.mjs";
2
+ import "./plugin.mjs";
2
3
 
3
4
  export { SHELL_TYPES };
@@ -1,7 +1,6 @@
1
- import { ShellType } from "./shell-type.cjs";
1
+ import { n as ShellType } from "../shell-type-DETq6QwA.cjs";
2
2
  import { ResolvedConfig, UserConfig } from "@shell-shock/core/types/config";
3
3
  import { Context } from "@shell-shock/core/types/context";
4
-
5
4
  //#region src/types/plugin.d.ts
6
5
  interface CompletionsPluginOptions {
7
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;UAyBiB,wBAAA;;AAAjB;;;;AAWoB;AAGpB;;;;EAHE,MAAA,GAAS,SAAS;AAAA;AAAA,KAGR,2BAAA,GAA8B,UAAA;EAInB;;;EAArB,WAAA,EAAa,QAAA,CAAS,wBAAA;AAAA;AAAA,KAGZ,+BAAA,GAAkC,cAAA;EAHE;AAGhD;;EAIE,WAAA,EAAa,QAAA,CAAS,wBAAA;AAAA;AAAA,KAGZ,wBAAA,yBACc,+BAAA,GACtB,+BAAA,IACA,OAAA,CAAQ,eAAA"}
1
+ {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;UAyBiB;;;;;;;;;;;EAWf,SAAS;;KAGC,8BAA8B;;;;EAIxC,aAAa,SAAS;;KAGZ,kCAAkC;;;;EAI5C,aAAa,SAAS;;KAGZ,yBACV,wBAAwB,kCACtB,mCACA,QAAQ"}
@@ -1,7 +1,6 @@
1
- import { ShellType } from "./shell-type.mjs";
1
+ import { n as ShellType } from "../shell-type-DETq6QwA.mjs";
2
2
  import { ResolvedConfig, UserConfig } from "@shell-shock/core/types/config";
3
3
  import { Context } from "@shell-shock/core/types/context";
4
-
5
4
  //#region src/types/plugin.d.ts
6
5
  interface CompletionsPluginOptions {
7
6
  /**
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
2
  //#region src/types/shell-type.ts
4
3
  const SHELL_TYPES = [
5
4
  "bash",
@@ -1,6 +1,2 @@
1
- //#region src/types/shell-type.d.ts
2
- type ShellType = "bash" | "fish" | "zsh" | "powershell";
3
- declare const SHELL_TYPES: readonly ShellType[];
4
- //#endregion
5
- export { SHELL_TYPES, ShellType };
6
- //# sourceMappingURL=shell-type.d.cts.map
1
+ import { n as ShellType, t as SHELL_TYPES } from "../shell-type-DETq6QwA.cjs";
2
+ export { SHELL_TYPES, ShellType };