@shell-shock/plugin-completions 0.4.16 → 0.4.18

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 (56) hide show
  1. package/dist/components/bash-config-command.cjs +120 -6
  2. package/dist/components/bash-config-command.mjs +119 -6
  3. package/dist/components/bash-config-command.mjs.map +1 -1
  4. package/dist/components/bash-script-command.cjs +105 -5
  5. package/dist/components/bash-script-command.mjs +104 -5
  6. package/dist/components/bash-script-command.mjs.map +1 -1
  7. package/dist/components/bash-shared.cjs +77 -13
  8. package/dist/components/bash-shared.mjs +76 -13
  9. package/dist/components/bash-shared.mjs.map +1 -1
  10. package/dist/components/fish-config-command.cjs +120 -6
  11. package/dist/components/fish-config-command.mjs +119 -6
  12. package/dist/components/fish-config-command.mjs.map +1 -1
  13. package/dist/components/fish-script-command.cjs +104 -4
  14. package/dist/components/fish-script-command.mjs +103 -4
  15. package/dist/components/fish-script-command.mjs.map +1 -1
  16. package/dist/components/fish-shared.cjs +141 -77
  17. package/dist/components/fish-shared.mjs +140 -77
  18. package/dist/components/fish-shared.mjs.map +1 -1
  19. package/dist/components/index.cjs +26 -1
  20. package/dist/components/index.mjs +14 -1
  21. package/dist/components/powershell-config-command.cjs +116 -6
  22. package/dist/components/powershell-config-command.mjs +115 -6
  23. package/dist/components/powershell-config-command.mjs.map +1 -1
  24. package/dist/components/powershell-script-command.cjs +104 -4
  25. package/dist/components/powershell-script-command.mjs +103 -4
  26. package/dist/components/powershell-script-command.mjs.map +1 -1
  27. package/dist/components/powershell-shared.cjs +101 -37
  28. package/dist/components/powershell-shared.mjs +100 -37
  29. package/dist/components/powershell-shared.mjs.map +1 -1
  30. package/dist/components/zsh-config-command.cjs +120 -6
  31. package/dist/components/zsh-config-command.mjs +119 -6
  32. package/dist/components/zsh-config-command.mjs.map +1 -1
  33. package/dist/components/zsh-script-command.cjs +108 -6
  34. package/dist/components/zsh-script-command.mjs +107 -6
  35. package/dist/components/zsh-script-command.mjs.map +1 -1
  36. package/dist/components/zsh-shared.cjs +106 -42
  37. package/dist/components/zsh-shared.mjs +105 -42
  38. package/dist/components/zsh-shared.mjs.map +1 -1
  39. package/dist/helpers/complete-command.cjs +10 -1
  40. package/dist/helpers/complete-command.mjs +8 -1
  41. package/dist/helpers/complete-command.mjs.map +1 -1
  42. package/dist/helpers/completion-directive-constants.cjs +16 -1
  43. package/dist/helpers/completion-directive-constants.mjs +14 -1
  44. package/dist/helpers/completion-directive-constants.mjs.map +1 -1
  45. package/dist/helpers/index.cjs +6 -1
  46. package/dist/helpers/index.mjs +4 -1
  47. package/dist/index.cjs +303 -1
  48. package/dist/index.mjs +301 -1
  49. package/dist/index.mjs.map +1 -1
  50. package/dist/types/index.cjs +4 -1
  51. package/dist/types/index.mjs +3 -1
  52. package/dist/types/plugin.mjs +1 -1
  53. package/dist/types/shell-type.cjs +12 -1
  54. package/dist/types/shell-type.mjs +10 -1
  55. package/dist/types/shell-type.mjs.map +1 -1
  56. package/package.json +10 -10
package/dist/index.cjs CHANGED
@@ -1 +1,303 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`./components/bash-config-command.cjs`),t=require(`./components/bash-script-command.cjs`),n=require(`./components/bash-shared.cjs`),r=require(`./components/fish-config-command.cjs`),i=require(`./components/fish-script-command.cjs`),a=require(`./components/fish-shared.cjs`),o=require(`./components/powershell-config-command.cjs`),s=require(`./components/powershell-script-command.cjs`),c=require(`./components/powershell-shared.cjs`),l=require(`./components/zsh-config-command.cjs`),u=require(`./components/zsh-script-command.cjs`),d=require(`./components/zsh-shared.cjs`);require(`./components/index.cjs`);const f=require(`./types/shell-type.cjs`);let p=require(`@alloy-js/core/jsx-runtime`),m=require(`@powerlines/plugin-alloy/render`),h=require(`@shell-shock/core/plugin-utils`),g=require(`@stryke/path/join`);const _=(_={})=>[{name:`shell-shock:completions`,config(){return this.debug("Providing default configuration for the Shell Shock `completions` plugin."),{completions:{shells:[...f.SHELL_TYPES],..._}}},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 ${(0,h.getAppTitle)(this)}.`,entry:{file:(0,g.joinPaths)(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 ${(0,h.getAppTitle)(this,!0)} command-line interface.`,alias:[],path:`completions/bash`,segments:[`completions`,`bash`],title:`Completions - Bash`,tags:[`Utility`],entry:{file:(0,g.joinPaths)(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 ${(0,h.getAppTitle)(this,!0)} command-line interface.`,alias:[],path:`completions/bash/script`,segments:[`completions`,`bash`,`script`],title:`Completions - Bash Script`,tags:[`Utility`],entry:{file:(0,g.joinPaths)(this.entryPath,`completions`,`bash`,`script`,`index.ts`),input:{file:(0,g.joinPaths)(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 ${(0,h.getAppTitle)(this,!0)} command-line interface.`,alias:[],path:`completions/bash/config`,segments:[`completions`,`bash`,`config`],title:`Completions - Bash Configuration`,tags:[`Utility`],entry:{file:(0,g.joinPaths)(this.entryPath,`completions`,`bash`,`config`,`index.ts`),input:{file:(0,g.joinPaths)(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 ${(0,h.getAppTitle)(this,!0)} command-line interface.`,alias:[],path:`completions/zsh`,segments:[`completions`,`zsh`],title:`Completions - Zsh`,tags:[`Utility`],entry:{file:(0,g.joinPaths)(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 ${(0,h.getAppTitle)(this,!0)} command-line interface.`,alias:[],path:`completions/zsh/script`,segments:[`completions`,`zsh`,`script`],title:`Completions - Zsh Script`,tags:[`Utility`],entry:{file:(0,g.joinPaths)(this.entryPath,`completions`,`zsh`,`script`,`index.ts`),input:{file:(0,g.joinPaths)(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 ${(0,h.getAppTitle)(this,!0)} command-line interface.`,alias:[],path:`completions/zsh/config`,segments:[`completions`,`zsh`,`config`],title:`Completions - Zsh Configuration`,tags:[`Utility`],entry:{file:(0,g.joinPaths)(this.entryPath,`completions`,`zsh`,`config`,`index.ts`),input:{file:(0,g.joinPaths)(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 ${(0,h.getAppTitle)(this,!0)} command-line interface.`,alias:[],path:`completions/powershell`,segments:[`completions`,`powershell`],title:`Completions - PowerShell`,tags:[`Utility`],entry:{file:(0,g.joinPaths)(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 ${(0,h.getAppTitle)(this,!0)} command-line interface.`,alias:[],path:`completions/powershell/script`,segments:[`completions`,`powershell`,`script`],title:`Completions - PowerShell Script`,tags:[`Utility`],entry:{file:(0,g.joinPaths)(this.entryPath,`completions`,`powershell`,`script`,`index.ts`),input:{file:(0,g.joinPaths)(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 ${(0,h.getAppTitle)(this,!0)} command-line interface.`,alias:[],path:`completions/powershell/config`,segments:[`completions`,`powershell`,`config`],title:`Completions - PowerShell Configuration`,tags:[`Utility`],entry:{file:(0,g.joinPaths)(this.entryPath,`completions`,`powershell`,`config`,`index.ts`),input:{file:(0,g.joinPaths)(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 ${(0,h.getAppTitle)(this,!0)} command-line interface.`,alias:[],path:`completions/fish`,segments:[`completions`,`fish`],title:`Completions - Fish`,tags:[`Utility`],entry:{file:(0,g.joinPaths)(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 ${(0,h.getAppTitle)(this,!0)} command-line interface.`,alias:[],path:`completions/fish/script`,segments:[`completions`,`fish`,`script`],title:`Completions - Fish Script`,tags:[`Utility`],entry:{file:(0,g.joinPaths)(this.entryPath,`completions`,`fish`,`script`,`index.ts`),input:{file:(0,g.joinPaths)(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 ${(0,h.getAppTitle)(this,!0)} command-line interface.`,alias:[],path:`completions/fish/config`,segments:[`completions`,`fish`,`config`],title:`Completions - Fish Configuration`,tags:[`Utility`],entry:{file:(0,g.joinPaths)(this.entryPath,`completions`,`fish`,`config`,`index.ts`),input:{file:(0,g.joinPaths)(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."),(0,m.render)(this,[(0,p.createComponent)(n.BashCompletionsShared,{}),(0,p.createComponent)(t.BashScriptCompletionsCommand,{}),(0,p.createComponent)(e.BashConfigCompletionsCommand,{}),(0,p.createComponent)(d.ZshCompletionsShared,{}),(0,p.createComponent)(u.ZshScriptCompletionsCommand,{}),(0,p.createComponent)(l.ZshConfigCompletionsCommand,{}),(0,p.createComponent)(c.PowerShellCompletionsShared,{}),(0,p.createComponent)(s.PowerShellScriptCompletionsCommand,{}),(0,p.createComponent)(o.PowerShellConfigCompletionsCommand,{}),(0,p.createComponent)(a.FishCompletionsShared,{}),(0,p.createComponent)(i.FishScriptCompletionsCommand,{}),(0,p.createComponent)(r.FishConfigCompletionsCommand,{})])}}}];exports.default=_,exports.plugin=_;
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
+ const require_components_bash_config_command = require('./components/bash-config-command.cjs');
3
+ const require_components_bash_script_command = require('./components/bash-script-command.cjs');
4
+ const require_components_bash_shared = require('./components/bash-shared.cjs');
5
+ const require_components_fish_config_command = require('./components/fish-config-command.cjs');
6
+ const require_components_fish_script_command = require('./components/fish-script-command.cjs');
7
+ const require_components_fish_shared = require('./components/fish-shared.cjs');
8
+ const require_components_powershell_config_command = require('./components/powershell-config-command.cjs');
9
+ const require_components_powershell_script_command = require('./components/powershell-script-command.cjs');
10
+ const require_components_powershell_shared = require('./components/powershell-shared.cjs');
11
+ const require_components_zsh_config_command = require('./components/zsh-config-command.cjs');
12
+ const require_components_zsh_script_command = require('./components/zsh-script-command.cjs');
13
+ const require_components_zsh_shared = require('./components/zsh-shared.cjs');
14
+ require('./components/index.cjs');
15
+ const require_types_shell_type = require('./types/shell-type.cjs');
16
+ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
17
+ let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
18
+ let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
19
+ let _stryke_path_join = require("@stryke/path/join");
20
+
21
+ //#region src/index.tsx
22
+ /**
23
+ * The Completions - Shell Shock plugin to add completion commands to a Shell Shock application.
24
+ */
25
+ const plugin = (options = {}) => {
26
+ return [{
27
+ name: "shell-shock:completions",
28
+ config() {
29
+ this.debug("Providing default configuration for the Shell Shock `completions` plugin.");
30
+ return { completions: {
31
+ shells: [...require_types_shell_type.SHELL_TYPES],
32
+ ...options
33
+ } };
34
+ },
35
+ configResolved() {
36
+ this.debug("Adding the CLI completion commands to the application context.");
37
+ this.inputs ??= [];
38
+ 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.");
39
+ else this.inputs.push({
40
+ id: "completions",
41
+ name: "completions",
42
+ alias: ["completion"],
43
+ path: "completions",
44
+ segments: ["completions"],
45
+ title: "Completions",
46
+ icon: "🖵",
47
+ tags: ["Utility"],
48
+ description: `Commands for generating shell completion scripts for ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this)}.`,
49
+ entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "index.ts") },
50
+ isVirtual: true,
51
+ source: "completions-plugin"
52
+ });
53
+ if (this.config.completions.shells.includes("bash")) if (this.inputs.some((input) => input.id === "completions-bash")) this.info("The `completions-bash` command already exists in the commands list. If you would like the completions-bash command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.");
54
+ else {
55
+ this.inputs.push({
56
+ id: "completions-bash",
57
+ name: "bash",
58
+ description: `Commands to setup bash completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
59
+ alias: [],
60
+ path: "completions/bash",
61
+ segments: ["completions", "bash"],
62
+ title: "Completions - Bash",
63
+ tags: ["Utility"],
64
+ entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "index.ts") },
65
+ isVirtual: true,
66
+ source: "completions-plugin"
67
+ });
68
+ this.inputs.push({
69
+ id: "completions-bash-script",
70
+ name: "script",
71
+ description: `Generate a bash completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
72
+ alias: [],
73
+ path: "completions/bash/script",
74
+ segments: [
75
+ "completions",
76
+ "bash",
77
+ "script"
78
+ ],
79
+ title: "Completions - Bash Script",
80
+ tags: ["Utility"],
81
+ entry: {
82
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "script", "index.ts"),
83
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "script", "command.ts") }
84
+ },
85
+ isVirtual: false,
86
+ source: "completions-plugin"
87
+ });
88
+ this.inputs.push({
89
+ id: "completions-bash-config",
90
+ name: "config",
91
+ description: `Update the current system's bash shell configuration to include completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
92
+ alias: [],
93
+ path: "completions/bash/config",
94
+ segments: [
95
+ "completions",
96
+ "bash",
97
+ "config"
98
+ ],
99
+ title: "Completions - Bash Configuration",
100
+ tags: ["Utility"],
101
+ entry: {
102
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "config", "index.ts"),
103
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "config", "command.ts") }
104
+ },
105
+ isVirtual: false,
106
+ source: "completions-plugin"
107
+ });
108
+ }
109
+ 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.");
110
+ else {
111
+ this.inputs.push({
112
+ id: "completions-zsh",
113
+ name: "zsh",
114
+ description: `Commands to setup Zsh completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
115
+ alias: [],
116
+ path: "completions/zsh",
117
+ segments: ["completions", "zsh"],
118
+ title: "Completions - Zsh",
119
+ tags: ["Utility"],
120
+ entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "index.ts") },
121
+ isVirtual: true,
122
+ source: "completions-plugin"
123
+ });
124
+ this.inputs.push({
125
+ id: "completions-zsh-script",
126
+ name: "script",
127
+ description: `Generate a Zsh completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
128
+ alias: [],
129
+ path: "completions/zsh/script",
130
+ segments: [
131
+ "completions",
132
+ "zsh",
133
+ "script"
134
+ ],
135
+ title: "Completions - Zsh Script",
136
+ tags: ["Utility"],
137
+ entry: {
138
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "script", "index.ts"),
139
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "script", "command.ts") }
140
+ },
141
+ isVirtual: false,
142
+ source: "completions-plugin"
143
+ });
144
+ this.inputs.push({
145
+ id: "completions-zsh-config",
146
+ name: "config",
147
+ description: `Update the current system's Zsh shell configuration to include completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
148
+ alias: [],
149
+ path: "completions/zsh/config",
150
+ segments: [
151
+ "completions",
152
+ "zsh",
153
+ "config"
154
+ ],
155
+ title: "Completions - Zsh Configuration",
156
+ tags: ["Utility"],
157
+ entry: {
158
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "config", "index.ts"),
159
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "config", "command.ts") }
160
+ },
161
+ isVirtual: false,
162
+ source: "completions-plugin"
163
+ });
164
+ }
165
+ 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.");
166
+ else {
167
+ this.inputs.push({
168
+ id: "completions-powershell",
169
+ name: "powershell",
170
+ description: `Commands to setup PowerShell completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
171
+ alias: [],
172
+ path: "completions/powershell",
173
+ segments: ["completions", "powershell"],
174
+ title: "Completions - PowerShell",
175
+ tags: ["Utility"],
176
+ entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "index.ts") },
177
+ isVirtual: true,
178
+ source: "completions-plugin"
179
+ });
180
+ this.inputs.push({
181
+ id: "completions-powershell-script",
182
+ name: "script",
183
+ description: `Generate a PowerShell completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
184
+ alias: [],
185
+ path: "completions/powershell/script",
186
+ segments: [
187
+ "completions",
188
+ "powershell",
189
+ "script"
190
+ ],
191
+ title: "Completions - PowerShell Script",
192
+ tags: ["Utility"],
193
+ entry: {
194
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "script", "index.ts"),
195
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "script", "command.ts") }
196
+ },
197
+ isVirtual: false,
198
+ source: "completions-plugin"
199
+ });
200
+ this.inputs.push({
201
+ id: "completions-powershell-config",
202
+ name: "config",
203
+ description: `Update the current system's PowerShell configuration to include completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
204
+ alias: [],
205
+ path: "completions/powershell/config",
206
+ segments: [
207
+ "completions",
208
+ "powershell",
209
+ "config"
210
+ ],
211
+ title: "Completions - PowerShell Configuration",
212
+ tags: ["Utility"],
213
+ entry: {
214
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "config", "index.ts"),
215
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "config", "command.ts") }
216
+ },
217
+ isVirtual: false,
218
+ source: "completions-plugin"
219
+ });
220
+ }
221
+ 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.");
222
+ else {
223
+ this.inputs.push({
224
+ id: "completions-fish",
225
+ name: "fish",
226
+ description: `Commands to setup Fish completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
227
+ alias: [],
228
+ path: "completions/fish",
229
+ segments: ["completions", "fish"],
230
+ title: "Completions - Fish",
231
+ tags: ["Utility"],
232
+ entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "index.ts") },
233
+ isVirtual: true,
234
+ source: "completions-plugin"
235
+ });
236
+ this.inputs.push({
237
+ id: "completions-fish-script",
238
+ name: "script",
239
+ description: `Generate a Fish completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
240
+ alias: [],
241
+ path: "completions/fish/script",
242
+ segments: [
243
+ "completions",
244
+ "fish",
245
+ "script"
246
+ ],
247
+ title: "Completions - Fish Script",
248
+ tags: ["Utility"],
249
+ entry: {
250
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "script", "index.ts"),
251
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "script", "command.ts") }
252
+ },
253
+ isVirtual: false,
254
+ source: "completions-plugin"
255
+ });
256
+ this.inputs.push({
257
+ id: "completions-fish-config",
258
+ name: "config",
259
+ description: `Update the current system's Fish shell configuration to include completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
260
+ alias: [],
261
+ path: "completions/fish/config",
262
+ segments: [
263
+ "completions",
264
+ "fish",
265
+ "config"
266
+ ],
267
+ title: "Completions - Fish Configuration",
268
+ tags: ["Utility"],
269
+ entry: {
270
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "config", "index.ts"),
271
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "config", "command.ts") }
272
+ },
273
+ isVirtual: false,
274
+ source: "completions-plugin"
275
+ });
276
+ }
277
+ },
278
+ prepare: {
279
+ order: "pre",
280
+ async handler() {
281
+ this.debug("Rendering command handling modules for the Shell Shock `completions` plugin.");
282
+ return (0, _powerlines_plugin_alloy_render.render)(this, [
283
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_bash_shared.BashCompletionsShared, {}),
284
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_bash_script_command.BashScriptCompletionsCommand, {}),
285
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_bash_config_command.BashConfigCompletionsCommand, {}),
286
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_zsh_shared.ZshCompletionsShared, {}),
287
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_zsh_script_command.ZshScriptCompletionsCommand, {}),
288
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_zsh_config_command.ZshConfigCompletionsCommand, {}),
289
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_powershell_shared.PowerShellCompletionsShared, {}),
290
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_powershell_script_command.PowerShellScriptCompletionsCommand, {}),
291
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_powershell_config_command.PowerShellConfigCompletionsCommand, {}),
292
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_fish_shared.FishCompletionsShared, {}),
293
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_fish_script_command.FishScriptCompletionsCommand, {}),
294
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_fish_config_command.FishConfigCompletionsCommand, {})
295
+ ]);
296
+ }
297
+ }
298
+ }];
299
+ };
300
+
301
+ //#endregion
302
+ exports.default = plugin;
303
+ exports.plugin = plugin;
package/dist/index.mjs CHANGED
@@ -1,2 +1,302 @@
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};
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";
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 };
2
302
  //# sourceMappingURL=index.mjs.map