@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
@@ -0,0 +1,59 @@
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 { defineCommandGenerator, renderCommandTemplate } from "@shell-shock/core/helpers/power-plant";
15
+ import { createComponent } from "@alloy-js/core/jsx-runtime";
16
+
17
+ //#region package.json
18
+ var version = "0.4.31";
19
+
20
+ //#endregion
21
+ //#region src/generator.tsx
22
+ /**
23
+ * Power Plant generator for Shell Shock shell completion commands.
24
+ *
25
+ * @see https://github.com/storm-software/power-plant/tree/main/packages/generators/alloy-js
26
+ */
27
+ const completionsGenerator = defineCommandGenerator({
28
+ meta: {
29
+ name: "shell-shock-completions",
30
+ title: "Shell Shock Completions Generator",
31
+ description: "Generates shell completion shared modules and commands from the Shell Shock command tree specification.",
32
+ version,
33
+ tags: [
34
+ "shell-shock",
35
+ "completions",
36
+ "alloy-js"
37
+ ]
38
+ },
39
+ generator: async (_commands, options) => {
40
+ await renderCommandTemplate(options, [
41
+ createComponent(BashCompletionsShared, {}),
42
+ createComponent(BashScriptCompletionsCommand, {}),
43
+ createComponent(BashConfigCompletionsCommand, {}),
44
+ createComponent(ZshCompletionsShared, {}),
45
+ createComponent(ZshScriptCompletionsCommand, {}),
46
+ createComponent(ZshConfigCompletionsCommand, {}),
47
+ createComponent(PowerShellCompletionsShared, {}),
48
+ createComponent(PowerShellScriptCompletionsCommand, {}),
49
+ createComponent(PowerShellConfigCompletionsCommand, {}),
50
+ createComponent(FishCompletionsShared, {}),
51
+ createComponent(FishScriptCompletionsCommand, {}),
52
+ createComponent(FishConfigCompletionsCommand, {})
53
+ ]);
54
+ }
55
+ });
56
+
57
+ //#endregion
58
+ export { completionsGenerator as t };
59
+ //# sourceMappingURL=generator-DQoArSbb.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator-DQoArSbb.mjs","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
+ const require_generator = require('./generator-BDvpem35.cjs');
3
+
4
+ exports.completionsGenerator = require_generator.completionsGenerator;
5
+ exports.default = require_generator.completionsGenerator;
@@ -0,0 +1,10 @@
1
+ //#region src/generator.d.ts
2
+ /**
3
+ * Power Plant generator for Shell Shock shell completion commands.
4
+ *
5
+ * @see https://github.com/storm-software/power-plant/tree/main/packages/generators/alloy-js
6
+ */
7
+ declare const completionsGenerator: import("@power-plant/core").GeneratorConfigObject<Record<string, import("@shell-shock/schema").SerializedCommandTree>, import("@shell-shock/core/helpers/power-plant").CommandGeneratorOptions, void>;
8
+ //#endregion
9
+ export { completionsGenerator, completionsGenerator as default };
10
+ //# sourceMappingURL=generator.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.d.cts","names":[],"sources":["../src/generator.tsx"],"mappings":";;;;;;cA2Ca,kDAAoB,sBAAA,6CAAA,wEAAA"}
@@ -0,0 +1,10 @@
1
+ //#region src/generator.d.ts
2
+ /**
3
+ * Power Plant generator for Shell Shock shell completion commands.
4
+ *
5
+ * @see https://github.com/storm-software/power-plant/tree/main/packages/generators/alloy-js
6
+ */
7
+ declare const completionsGenerator: import("@power-plant/core").GeneratorConfigObject<Record<string, import("@shell-shock/schema").SerializedCommandTree>, import("@shell-shock/core/helpers/power-plant").CommandGeneratorOptions, void>;
8
+ //#endregion
9
+ export { completionsGenerator, completionsGenerator as default };
10
+ //# sourceMappingURL=generator.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.d.mts","names":[],"sources":["../src/generator.tsx"],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import { t as completionsGenerator } from "./generator-DQoArSbb.mjs";
2
+
3
+ export { completionsGenerator, completionsGenerator as default };
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
2
  //#region src/helpers/complete-command.ts
4
3
  function quoteIfNeeded(path) {
5
4
  return path.includes(" ") ? `'${path}'` : path;
@@ -1 +1 @@
1
- {"version":3,"file":"complete-command.d.cts","names":[],"sources":["../../src/helpers/complete-command.ts"],"mappings":";cAsBa,YAAA"}
1
+ {"version":3,"file":"complete-command.d.cts","names":[],"sources":["../../src/helpers/complete-command.ts"],"mappings":";cAsBa"}
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
2
  //#region src/helpers/completion-directive-constants.ts
4
3
  const CompletionDirective = {
5
4
  CompletionDirectiveError: 1,
@@ -1 +1 @@
1
- {"version":3,"file":"completion-directive-constants.d.cts","names":[],"sources":["../../src/helpers/completion-directive-constants.ts"],"mappings":";cAkBa,mBAAA"}
1
+ {"version":3,"file":"completion-directive-constants.d.cts","names":[],"sources":["../../src/helpers/completion-directive-constants.ts"],"mappings":";cAkBa"}
package/dist/index.cjs CHANGED
@@ -1,20 +1,7 @@
1
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');
2
+ const require_generator = require('./generator-BDvpem35.cjs');
15
3
  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");
4
+ let _shell_shock_core_helpers_power_plant = require("@shell-shock/core/helpers/power-plant");
18
5
  let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
19
6
  let _stryke_path_join = require("@stryke/path/join");
20
7
 
@@ -49,242 +36,238 @@ const plugin = (options = {}) => {
49
36
  entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "index.ts") },
50
37
  virtual: true
51
38
  });
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 ${(0, _shell_shock_core_plugin_utils.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: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "index.ts") },
64
- virtual: true
65
- });
66
- this.inputs.push({
67
- id: "completions-bash-script",
68
- name: "script",
69
- description: `Generate a bash completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
70
- alias: [],
71
- path: "completions/bash/script",
72
- segments: [
73
- "completions",
74
- "bash",
75
- "script"
76
- ],
77
- title: "Completions - Bash Script",
78
- tags: ["Utility"],
79
- entry: {
80
- file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "script", "index.ts"),
81
- input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "script", "command.ts") }
82
- },
83
- virtual: false
84
- });
85
- this.inputs.push({
86
- id: "completions-bash-config",
87
- name: "config",
88
- 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.`,
89
- alias: [],
90
- path: "completions/bash/config",
91
- segments: [
92
- "completions",
93
- "bash",
94
- "config"
95
- ],
96
- title: "Completions - Bash Configuration",
97
- tags: ["Utility"],
98
- entry: {
99
- file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "config", "index.ts"),
100
- input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "config", "command.ts") }
101
- },
102
- virtual: false
103
- });
39
+ if (this.config.completions.shells.includes("bash")) {
40
+ 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.");
41
+ else {
42
+ this.inputs.push({
43
+ id: "completions-bash",
44
+ name: "bash",
45
+ description: `Commands to setup bash completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
46
+ alias: [],
47
+ path: "completions/bash",
48
+ segments: ["completions", "bash"],
49
+ title: "Completions - Bash",
50
+ tags: ["Utility"],
51
+ entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "index.ts") },
52
+ virtual: true
53
+ });
54
+ this.inputs.push({
55
+ id: "completions-bash-script",
56
+ name: "script",
57
+ description: `Generate a bash completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
58
+ alias: [],
59
+ path: "completions/bash/script",
60
+ segments: [
61
+ "completions",
62
+ "bash",
63
+ "script"
64
+ ],
65
+ title: "Completions - Bash Script",
66
+ tags: ["Utility"],
67
+ entry: {
68
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "script", "index.ts"),
69
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "script", "command.ts") }
70
+ },
71
+ virtual: false
72
+ });
73
+ this.inputs.push({
74
+ id: "completions-bash-config",
75
+ name: "config",
76
+ 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.`,
77
+ alias: [],
78
+ path: "completions/bash/config",
79
+ segments: [
80
+ "completions",
81
+ "bash",
82
+ "config"
83
+ ],
84
+ title: "Completions - Bash Configuration",
85
+ tags: ["Utility"],
86
+ entry: {
87
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "config", "index.ts"),
88
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "config", "command.ts") }
89
+ },
90
+ virtual: false
91
+ });
92
+ }
104
93
  }
105
- 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.");
106
- else {
107
- this.inputs.push({
108
- id: "completions-zsh",
109
- name: "zsh",
110
- description: `Commands to setup Zsh completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
111
- alias: [],
112
- path: "completions/zsh",
113
- segments: ["completions", "zsh"],
114
- title: "Completions - Zsh",
115
- tags: ["Utility"],
116
- entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "index.ts") },
117
- virtual: true
118
- });
119
- this.inputs.push({
120
- id: "completions-zsh-script",
121
- name: "script",
122
- description: `Generate a Zsh completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
123
- alias: [],
124
- path: "completions/zsh/script",
125
- segments: [
126
- "completions",
127
- "zsh",
128
- "script"
129
- ],
130
- title: "Completions - Zsh Script",
131
- tags: ["Utility"],
132
- entry: {
133
- file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "script", "index.ts"),
134
- input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "script", "command.ts") }
135
- },
136
- virtual: false
137
- });
138
- this.inputs.push({
139
- id: "completions-zsh-config",
140
- name: "config",
141
- 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.`,
142
- alias: [],
143
- path: "completions/zsh/config",
144
- segments: [
145
- "completions",
146
- "zsh",
147
- "config"
148
- ],
149
- title: "Completions - Zsh Configuration",
150
- tags: ["Utility"],
151
- entry: {
152
- file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "config", "index.ts"),
153
- input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "config", "command.ts") }
154
- },
155
- virtual: false
156
- });
94
+ if (this.config.completions.shells.includes("zsh")) {
95
+ 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.");
96
+ else {
97
+ this.inputs.push({
98
+ id: "completions-zsh",
99
+ name: "zsh",
100
+ description: `Commands to setup Zsh completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
101
+ alias: [],
102
+ path: "completions/zsh",
103
+ segments: ["completions", "zsh"],
104
+ title: "Completions - Zsh",
105
+ tags: ["Utility"],
106
+ entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "index.ts") },
107
+ virtual: true
108
+ });
109
+ this.inputs.push({
110
+ id: "completions-zsh-script",
111
+ name: "script",
112
+ description: `Generate a Zsh completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
113
+ alias: [],
114
+ path: "completions/zsh/script",
115
+ segments: [
116
+ "completions",
117
+ "zsh",
118
+ "script"
119
+ ],
120
+ title: "Completions - Zsh Script",
121
+ tags: ["Utility"],
122
+ entry: {
123
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "script", "index.ts"),
124
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "script", "command.ts") }
125
+ },
126
+ virtual: false
127
+ });
128
+ this.inputs.push({
129
+ id: "completions-zsh-config",
130
+ name: "config",
131
+ 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.`,
132
+ alias: [],
133
+ path: "completions/zsh/config",
134
+ segments: [
135
+ "completions",
136
+ "zsh",
137
+ "config"
138
+ ],
139
+ title: "Completions - Zsh Configuration",
140
+ tags: ["Utility"],
141
+ entry: {
142
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "config", "index.ts"),
143
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "config", "command.ts") }
144
+ },
145
+ virtual: false
146
+ });
147
+ }
157
148
  }
158
- 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.");
159
- else {
160
- this.inputs.push({
161
- id: "completions-powershell",
162
- name: "powershell",
163
- description: `Commands to setup PowerShell completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
164
- alias: [],
165
- path: "completions/powershell",
166
- segments: ["completions", "powershell"],
167
- title: "Completions - PowerShell",
168
- tags: ["Utility"],
169
- entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "index.ts") },
170
- virtual: true
171
- });
172
- this.inputs.push({
173
- id: "completions-powershell-script",
174
- name: "script",
175
- description: `Generate a PowerShell completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
176
- alias: [],
177
- path: "completions/powershell/script",
178
- segments: [
179
- "completions",
180
- "powershell",
181
- "script"
182
- ],
183
- title: "Completions - PowerShell Script",
184
- tags: ["Utility"],
185
- entry: {
186
- file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "script", "index.ts"),
187
- input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "script", "command.ts") }
188
- },
189
- virtual: false
190
- });
191
- this.inputs.push({
192
- id: "completions-powershell-config",
193
- name: "config",
194
- 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.`,
195
- alias: [],
196
- path: "completions/powershell/config",
197
- segments: [
198
- "completions",
199
- "powershell",
200
- "config"
201
- ],
202
- title: "Completions - PowerShell Configuration",
203
- tags: ["Utility"],
204
- entry: {
205
- file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "config", "index.ts"),
206
- input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "config", "command.ts") }
207
- },
208
- virtual: false
209
- });
149
+ if (this.config.completions.shells.includes("powershell")) {
150
+ 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.");
151
+ else {
152
+ this.inputs.push({
153
+ id: "completions-powershell",
154
+ name: "powershell",
155
+ description: `Commands to setup PowerShell completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
156
+ alias: [],
157
+ path: "completions/powershell",
158
+ segments: ["completions", "powershell"],
159
+ title: "Completions - PowerShell",
160
+ tags: ["Utility"],
161
+ entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "index.ts") },
162
+ virtual: true
163
+ });
164
+ this.inputs.push({
165
+ id: "completions-powershell-script",
166
+ name: "script",
167
+ description: `Generate a PowerShell completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
168
+ alias: [],
169
+ path: "completions/powershell/script",
170
+ segments: [
171
+ "completions",
172
+ "powershell",
173
+ "script"
174
+ ],
175
+ title: "Completions - PowerShell Script",
176
+ tags: ["Utility"],
177
+ entry: {
178
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "script", "index.ts"),
179
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "script", "command.ts") }
180
+ },
181
+ virtual: false
182
+ });
183
+ this.inputs.push({
184
+ id: "completions-powershell-config",
185
+ name: "config",
186
+ 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.`,
187
+ alias: [],
188
+ path: "completions/powershell/config",
189
+ segments: [
190
+ "completions",
191
+ "powershell",
192
+ "config"
193
+ ],
194
+ title: "Completions - PowerShell Configuration",
195
+ tags: ["Utility"],
196
+ entry: {
197
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "config", "index.ts"),
198
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "config", "command.ts") }
199
+ },
200
+ virtual: false
201
+ });
202
+ }
210
203
  }
211
- 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.");
212
- else {
213
- this.inputs.push({
214
- id: "completions-fish",
215
- name: "fish",
216
- description: `Commands to setup Fish completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
217
- alias: [],
218
- path: "completions/fish",
219
- segments: ["completions", "fish"],
220
- title: "Completions - Fish",
221
- tags: ["Utility"],
222
- entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "index.ts") },
223
- virtual: true
224
- });
225
- this.inputs.push({
226
- id: "completions-fish-script",
227
- name: "script",
228
- description: `Generate a Fish completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
229
- alias: [],
230
- path: "completions/fish/script",
231
- segments: [
232
- "completions",
233
- "fish",
234
- "script"
235
- ],
236
- title: "Completions - Fish Script",
237
- tags: ["Utility"],
238
- entry: {
239
- file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "script", "index.ts"),
240
- input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "script", "command.ts") }
241
- },
242
- virtual: false
243
- });
244
- this.inputs.push({
245
- id: "completions-fish-config",
246
- name: "config",
247
- 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.`,
248
- alias: [],
249
- path: "completions/fish/config",
250
- segments: [
251
- "completions",
252
- "fish",
253
- "config"
254
- ],
255
- title: "Completions - Fish Configuration",
256
- tags: ["Utility"],
257
- entry: {
258
- file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "config", "index.ts"),
259
- input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "config", "command.ts") }
260
- },
261
- virtual: false
262
- });
204
+ if (this.config.completions.shells.includes("fish")) {
205
+ 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.");
206
+ else {
207
+ this.inputs.push({
208
+ id: "completions-fish",
209
+ name: "fish",
210
+ description: `Commands to setup Fish completions for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
211
+ alias: [],
212
+ path: "completions/fish",
213
+ segments: ["completions", "fish"],
214
+ title: "Completions - Fish",
215
+ tags: ["Utility"],
216
+ entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "index.ts") },
217
+ virtual: true
218
+ });
219
+ this.inputs.push({
220
+ id: "completions-fish-script",
221
+ name: "script",
222
+ description: `Generate a Fish completion script for the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface.`,
223
+ alias: [],
224
+ path: "completions/fish/script",
225
+ segments: [
226
+ "completions",
227
+ "fish",
228
+ "script"
229
+ ],
230
+ title: "Completions - Fish Script",
231
+ tags: ["Utility"],
232
+ entry: {
233
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "script", "index.ts"),
234
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "script", "command.ts") }
235
+ },
236
+ virtual: false
237
+ });
238
+ this.inputs.push({
239
+ id: "completions-fish-config",
240
+ name: "config",
241
+ 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.`,
242
+ alias: [],
243
+ path: "completions/fish/config",
244
+ segments: [
245
+ "completions",
246
+ "fish",
247
+ "config"
248
+ ],
249
+ title: "Completions - Fish Configuration",
250
+ tags: ["Utility"],
251
+ entry: {
252
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "config", "index.ts"),
253
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "config", "command.ts") }
254
+ },
255
+ virtual: false
256
+ });
257
+ }
263
258
  }
264
259
  },
265
260
  prepare: {
266
261
  order: "pre",
267
262
  async handler() {
268
- this.debug("Rendering command handling modules for the Shell Shock `completions` plugin.");
269
- return (0, _powerlines_plugin_alloy_render.render)(this, [
270
- (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_bash_shared.BashCompletionsShared, {}),
271
- (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_bash_script_command.BashScriptCompletionsCommand, {}),
272
- (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_bash_config_command.BashConfigCompletionsCommand, {}),
273
- (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_zsh_shared.ZshCompletionsShared, {}),
274
- (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_zsh_script_command.ZshScriptCompletionsCommand, {}),
275
- (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_zsh_config_command.ZshConfigCompletionsCommand, {}),
276
- (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_powershell_shared.PowerShellCompletionsShared, {}),
277
- (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_powershell_script_command.PowerShellScriptCompletionsCommand, {}),
278
- (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_powershell_config_command.PowerShellConfigCompletionsCommand, {}),
279
- (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_fish_shared.FishCompletionsShared, {}),
280
- (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_fish_script_command.FishScriptCompletionsCommand, {}),
281
- (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_fish_config_command.FishConfigCompletionsCommand, {})
282
- ]);
263
+ this.debug("Rendering command handling modules via Power Plant for the Shell Shock `completions` plugin.");
264
+ return (0, _shell_shock_core_helpers_power_plant.executeCommandGenerator)(this, require_generator.completionsGenerator);
283
265
  }
284
266
  }
285
267
  };
286
268
  };
287
269
 
288
270
  //#endregion
271
+ exports.completionsGenerator = require_generator.completionsGenerator;
289
272
  exports.default = plugin;
290
273
  exports.plugin = plugin;