@shell-shock/plugin-completions 0.4.10 → 0.4.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -47,7 +47,8 @@ const plugin = (options = {}) => {
47
47
  tags: ["Utility"],
48
48
  description: `Commands for generating shell completion scripts for ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this)}.`,
49
49
  entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "index.ts") },
50
- isVirtual: true
50
+ isVirtual: true,
51
+ source: "completions-plugin"
51
52
  });
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.");
53
54
  else {
@@ -61,7 +62,8 @@ const plugin = (options = {}) => {
61
62
  title: "Completions - Bash",
62
63
  tags: ["Utility"],
63
64
  entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "index.ts") },
64
- isVirtual: true
65
+ isVirtual: true,
66
+ source: "completions-plugin"
65
67
  });
66
68
  this.inputs.push({
67
69
  id: "completions-bash-script",
@@ -80,7 +82,8 @@ const plugin = (options = {}) => {
80
82
  file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "script", "index.ts"),
81
83
  input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "script", "command.ts") }
82
84
  },
83
- isVirtual: false
85
+ isVirtual: false,
86
+ source: "completions-plugin"
84
87
  });
85
88
  this.inputs.push({
86
89
  id: "completions-bash-config",
@@ -99,7 +102,8 @@ const plugin = (options = {}) => {
99
102
  file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "config", "index.ts"),
100
103
  input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "config", "command.ts") }
101
104
  },
102
- isVirtual: false
105
+ isVirtual: false,
106
+ source: "completions-plugin"
103
107
  });
104
108
  }
105
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.");
@@ -114,7 +118,8 @@ const plugin = (options = {}) => {
114
118
  title: "Completions - Zsh",
115
119
  tags: ["Utility"],
116
120
  entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "index.ts") },
117
- isVirtual: true
121
+ isVirtual: true,
122
+ source: "completions-plugin"
118
123
  });
119
124
  this.inputs.push({
120
125
  id: "completions-zsh-script",
@@ -133,7 +138,8 @@ const plugin = (options = {}) => {
133
138
  file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "script", "index.ts"),
134
139
  input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "script", "command.ts") }
135
140
  },
136
- isVirtual: false
141
+ isVirtual: false,
142
+ source: "completions-plugin"
137
143
  });
138
144
  this.inputs.push({
139
145
  id: "completions-zsh-config",
@@ -152,7 +158,8 @@ const plugin = (options = {}) => {
152
158
  file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "config", "index.ts"),
153
159
  input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "config", "command.ts") }
154
160
  },
155
- isVirtual: false
161
+ isVirtual: false,
162
+ source: "completions-plugin"
156
163
  });
157
164
  }
158
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.");
@@ -167,7 +174,8 @@ const plugin = (options = {}) => {
167
174
  title: "Completions - PowerShell",
168
175
  tags: ["Utility"],
169
176
  entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "index.ts") },
170
- isVirtual: true
177
+ isVirtual: true,
178
+ source: "completions-plugin"
171
179
  });
172
180
  this.inputs.push({
173
181
  id: "completions-powershell-script",
@@ -186,7 +194,8 @@ const plugin = (options = {}) => {
186
194
  file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "script", "index.ts"),
187
195
  input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "script", "command.ts") }
188
196
  },
189
- isVirtual: false
197
+ isVirtual: false,
198
+ source: "completions-plugin"
190
199
  });
191
200
  this.inputs.push({
192
201
  id: "completions-powershell-config",
@@ -205,7 +214,8 @@ const plugin = (options = {}) => {
205
214
  file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "config", "index.ts"),
206
215
  input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "config", "command.ts") }
207
216
  },
208
- isVirtual: false
217
+ isVirtual: false,
218
+ source: "completions-plugin"
209
219
  });
210
220
  }
211
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.");
@@ -220,7 +230,8 @@ const plugin = (options = {}) => {
220
230
  title: "Completions - Fish",
221
231
  tags: ["Utility"],
222
232
  entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "index.ts") },
223
- isVirtual: true
233
+ isVirtual: true,
234
+ source: "completions-plugin"
224
235
  });
225
236
  this.inputs.push({
226
237
  id: "completions-fish-script",
@@ -239,7 +250,8 @@ const plugin = (options = {}) => {
239
250
  file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "script", "index.ts"),
240
251
  input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "script", "command.ts") }
241
252
  },
242
- isVirtual: false
253
+ isVirtual: false,
254
+ source: "completions-plugin"
243
255
  });
244
256
  this.inputs.push({
245
257
  id: "completions-fish-config",
@@ -258,7 +270,8 @@ const plugin = (options = {}) => {
258
270
  file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "config", "index.ts"),
259
271
  input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "config", "command.ts") }
260
272
  },
261
- isVirtual: false
273
+ isVirtual: false,
274
+ source: "completions-plugin"
262
275
  });
263
276
  }
264
277
  },
package/dist/index.mjs CHANGED
@@ -46,7 +46,8 @@ const plugin = (options = {}) => {
46
46
  tags: ["Utility"],
47
47
  description: `Commands for generating shell completion scripts for ${getAppTitle(this)}.`,
48
48
  entry: { file: joinPaths(this.entryPath, "completions", "index.ts") },
49
- isVirtual: true
49
+ isVirtual: true,
50
+ source: "completions-plugin"
50
51
  });
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.");
52
53
  else {
@@ -60,7 +61,8 @@ const plugin = (options = {}) => {
60
61
  title: "Completions - Bash",
61
62
  tags: ["Utility"],
62
63
  entry: { file: joinPaths(this.entryPath, "completions", "bash", "index.ts") },
63
- isVirtual: true
64
+ isVirtual: true,
65
+ source: "completions-plugin"
64
66
  });
65
67
  this.inputs.push({
66
68
  id: "completions-bash-script",
@@ -79,7 +81,8 @@ const plugin = (options = {}) => {
79
81
  file: joinPaths(this.entryPath, "completions", "bash", "script", "index.ts"),
80
82
  input: { file: joinPaths(this.entryPath, "completions", "bash", "script", "command.ts") }
81
83
  },
82
- isVirtual: false
84
+ isVirtual: false,
85
+ source: "completions-plugin"
83
86
  });
84
87
  this.inputs.push({
85
88
  id: "completions-bash-config",
@@ -98,7 +101,8 @@ const plugin = (options = {}) => {
98
101
  file: joinPaths(this.entryPath, "completions", "bash", "config", "index.ts"),
99
102
  input: { file: joinPaths(this.entryPath, "completions", "bash", "config", "command.ts") }
100
103
  },
101
- isVirtual: false
104
+ isVirtual: false,
105
+ source: "completions-plugin"
102
106
  });
103
107
  }
104
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.");
@@ -113,7 +117,8 @@ const plugin = (options = {}) => {
113
117
  title: "Completions - Zsh",
114
118
  tags: ["Utility"],
115
119
  entry: { file: joinPaths(this.entryPath, "completions", "zsh", "index.ts") },
116
- isVirtual: true
120
+ isVirtual: true,
121
+ source: "completions-plugin"
117
122
  });
118
123
  this.inputs.push({
119
124
  id: "completions-zsh-script",
@@ -132,7 +137,8 @@ const plugin = (options = {}) => {
132
137
  file: joinPaths(this.entryPath, "completions", "zsh", "script", "index.ts"),
133
138
  input: { file: joinPaths(this.entryPath, "completions", "zsh", "script", "command.ts") }
134
139
  },
135
- isVirtual: false
140
+ isVirtual: false,
141
+ source: "completions-plugin"
136
142
  });
137
143
  this.inputs.push({
138
144
  id: "completions-zsh-config",
@@ -151,7 +157,8 @@ const plugin = (options = {}) => {
151
157
  file: joinPaths(this.entryPath, "completions", "zsh", "config", "index.ts"),
152
158
  input: { file: joinPaths(this.entryPath, "completions", "zsh", "config", "command.ts") }
153
159
  },
154
- isVirtual: false
160
+ isVirtual: false,
161
+ source: "completions-plugin"
155
162
  });
156
163
  }
157
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.");
@@ -166,7 +173,8 @@ const plugin = (options = {}) => {
166
173
  title: "Completions - PowerShell",
167
174
  tags: ["Utility"],
168
175
  entry: { file: joinPaths(this.entryPath, "completions", "powershell", "index.ts") },
169
- isVirtual: true
176
+ isVirtual: true,
177
+ source: "completions-plugin"
170
178
  });
171
179
  this.inputs.push({
172
180
  id: "completions-powershell-script",
@@ -185,7 +193,8 @@ const plugin = (options = {}) => {
185
193
  file: joinPaths(this.entryPath, "completions", "powershell", "script", "index.ts"),
186
194
  input: { file: joinPaths(this.entryPath, "completions", "powershell", "script", "command.ts") }
187
195
  },
188
- isVirtual: false
196
+ isVirtual: false,
197
+ source: "completions-plugin"
189
198
  });
190
199
  this.inputs.push({
191
200
  id: "completions-powershell-config",
@@ -204,7 +213,8 @@ const plugin = (options = {}) => {
204
213
  file: joinPaths(this.entryPath, "completions", "powershell", "config", "index.ts"),
205
214
  input: { file: joinPaths(this.entryPath, "completions", "powershell", "config", "command.ts") }
206
215
  },
207
- isVirtual: false
216
+ isVirtual: false,
217
+ source: "completions-plugin"
208
218
  });
209
219
  }
210
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.");
@@ -219,7 +229,8 @@ const plugin = (options = {}) => {
219
229
  title: "Completions - Fish",
220
230
  tags: ["Utility"],
221
231
  entry: { file: joinPaths(this.entryPath, "completions", "fish", "index.ts") },
222
- isVirtual: true
232
+ isVirtual: true,
233
+ source: "completions-plugin"
223
234
  });
224
235
  this.inputs.push({
225
236
  id: "completions-fish-script",
@@ -238,7 +249,8 @@ const plugin = (options = {}) => {
238
249
  file: joinPaths(this.entryPath, "completions", "fish", "script", "index.ts"),
239
250
  input: { file: joinPaths(this.entryPath, "completions", "fish", "script", "command.ts") }
240
251
  },
241
- isVirtual: false
252
+ isVirtual: false,
253
+ source: "completions-plugin"
242
254
  });
243
255
  this.inputs.push({
244
256
  id: "completions-fish-config",
@@ -257,7 +269,8 @@ const plugin = (options = {}) => {
257
269
  file: joinPaths(this.entryPath, "completions", "fish", "config", "index.ts"),
258
270
  input: { file: joinPaths(this.entryPath, "completions", "fish", "config", "command.ts") }
259
271
  },
260
- isVirtual: false
272
+ isVirtual: false,
273
+ source: "completions-plugin"
261
274
  });
262
275
  }
263
276
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport { getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport type { Plugin } from \"powerlines\";\nimport {\n BashCompletionsShared,\n BashConfigCompletionsCommand,\n BashScriptCompletionsCommand,\n FishCompletionsShared,\n FishConfigCompletionsCommand,\n FishScriptCompletionsCommand,\n PowerShellCompletionsShared,\n PowerShellConfigCompletionsCommand,\n PowerShellScriptCompletionsCommand,\n ZshCompletionsShared,\n ZshConfigCompletionsCommand,\n ZshScriptCompletionsCommand\n} from \"./components\";\nimport type {\n CompletionsPluginContext,\n CompletionsPluginOptions\n} from \"./types/plugin\";\nimport { SHELL_TYPES } from \"./types/shell-type\";\n\nexport type * from \"./types\";\n\n/**\n * The Completions - Shell Shock plugin to add completion commands to a Shell Shock application.\n */\nexport const plugin = <\n TContext extends CompletionsPluginContext = CompletionsPluginContext\n>(\n options: CompletionsPluginOptions = {}\n): Plugin<TContext>[] => {\n return [\n {\n name: \"shell-shock:completions\",\n config() {\n this.debug(\n \"Providing default configuration for the Shell Shock `completions` plugin.\"\n );\n\n return {\n completions: { shells: [...SHELL_TYPES], ...options }\n };\n },\n configResolved() {\n this.debug(\n \"Adding the CLI completion commands to the application context.\"\n );\n\n this.inputs ??= [];\n if (this.inputs.some(input => input.id === \"completions\")) {\n this.info(\n \"The `completions` command already exists in the commands list. If you would like the completions command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.\"\n );\n } else {\n this.inputs.push({\n id: \"completions\",\n name: \"completions\",\n alias: [\"completion\"],\n path: \"completions\",\n segments: [\"completions\"],\n title: \"Completions\",\n icon: \"🖵\",\n tags: [\"Utility\"],\n description: `Commands for generating shell completion scripts for ${getAppTitle(\n this\n )}.`,\n entry: {\n file: joinPaths(this.entryPath, \"completions\", \"index.ts\")\n },\n isVirtual: true\n });\n }\n\n if (this.config.completions.shells.includes(\"bash\")) {\n if (this.inputs.some(input => input.id === \"completions-bash\")) {\n this.info(\n \"The `completions-bash` command already exists in the commands list. If you would like the completions-bash command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.\"\n );\n } else {\n this.inputs.push({\n id: \"completions-bash\",\n name: \"bash\",\n description: `Commands to setup bash completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/bash\",\n segments: [\"completions\", \"bash\"],\n title: \"Completions - Bash\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"index.ts\"\n )\n },\n isVirtual: true\n });\n this.inputs.push({\n id: \"completions-bash-script\",\n name: \"script\",\n description: `Generate a bash completion script for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/bash/script\",\n segments: [\"completions\", \"bash\", \"script\"],\n title: \"Completions - Bash Script\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"script\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"script\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false\n });\n this.inputs.push({\n id: \"completions-bash-config\",\n name: \"config\",\n description: `Update the current system's bash shell configuration to include completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/bash/config\",\n segments: [\"completions\", \"bash\", \"config\"],\n title: \"Completions - Bash Configuration\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"config\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"config\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false\n });\n }\n }\n\n if (this.config.completions.shells.includes(\"zsh\")) {\n if (this.inputs.some(input => input.id === \"completions-zsh\")) {\n this.info(\n \"The `completions-zsh` command already exists in the commands list. If you would like the completions-zsh command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.\"\n );\n } else {\n this.inputs.push({\n id: \"completions-zsh\",\n name: \"zsh\",\n description: `Commands to setup Zsh completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/zsh\",\n segments: [\"completions\", \"zsh\"],\n title: \"Completions - Zsh\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"index.ts\"\n )\n },\n isVirtual: true\n });\n this.inputs.push({\n id: \"completions-zsh-script\",\n name: \"script\",\n description: `Generate a Zsh completion script for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/zsh/script\",\n segments: [\"completions\", \"zsh\", \"script\"],\n title: \"Completions - Zsh Script\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"script\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"script\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false\n });\n this.inputs.push({\n id: \"completions-zsh-config\",\n name: \"config\",\n description: `Update the current system's Zsh shell configuration to include completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/zsh/config\",\n segments: [\"completions\", \"zsh\", \"config\"],\n title: \"Completions - Zsh Configuration\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"config\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"config\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false\n });\n }\n }\n\n if (this.config.completions.shells.includes(\"powershell\")) {\n if (\n this.inputs.some(input => input.id === \"completions-powershell\")\n ) {\n this.info(\n \"The `completions-powershell` command already exists in the commands list. If you would like the completions-powershell command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.\"\n );\n } else {\n this.inputs.push({\n id: \"completions-powershell\",\n name: \"powershell\",\n description: `Commands to setup PowerShell completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/powershell\",\n segments: [\"completions\", \"powershell\"],\n title: \"Completions - PowerShell\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"powershell\",\n \"index.ts\"\n )\n },\n isVirtual: true\n });\n this.inputs.push({\n id: \"completions-powershell-script\",\n name: \"script\",\n description: `Generate a PowerShell completion script for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/powershell/script\",\n segments: [\"completions\", \"powershell\", \"script\"],\n title: \"Completions - PowerShell Script\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"powershell\",\n \"script\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"powershell\",\n \"script\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false\n });\n this.inputs.push({\n id: \"completions-powershell-config\",\n name: \"config\",\n description: `Update the current system's PowerShell configuration to include completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/powershell/config\",\n segments: [\"completions\", \"powershell\", \"config\"],\n title: \"Completions - PowerShell Configuration\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"powershell\",\n \"config\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"powershell\",\n \"config\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false\n });\n }\n }\n\n if (this.config.completions.shells.includes(\"fish\")) {\n if (this.inputs.some(input => input.id === \"completions-fish\")) {\n this.info(\n \"The `completions-fish` command already exists in the commands list. If you would like the completions-fish command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.\"\n );\n } else {\n this.inputs.push({\n id: \"completions-fish\",\n name: \"fish\",\n description: `Commands to setup Fish completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/fish\",\n segments: [\"completions\", \"fish\"],\n title: \"Completions - Fish\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"fish\",\n \"index.ts\"\n )\n },\n isVirtual: true\n });\n this.inputs.push({\n id: \"completions-fish-script\",\n name: \"script\",\n description: `Generate a Fish completion script for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/fish/script\",\n segments: [\"completions\", \"fish\", \"script\"],\n title: \"Completions - Fish Script\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"fish\",\n \"script\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"fish\",\n \"script\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false\n });\n this.inputs.push({\n id: \"completions-fish-config\",\n name: \"config\",\n description: `Update the current system's Fish shell configuration to include completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/fish/config\",\n segments: [\"completions\", \"fish\", \"config\"],\n title: \"Completions - Fish Configuration\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"fish\",\n \"config\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"fish\",\n \"config\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false\n });\n }\n }\n },\n prepare: {\n order: \"pre\",\n async handler() {\n this.debug(\n \"Rendering command handling modules for the Shell Shock `completions` plugin.\"\n );\n\n return render(\n this,\n <>\n <BashCompletionsShared />\n <BashScriptCompletionsCommand />\n <BashConfigCompletionsCommand />\n <ZshCompletionsShared />\n <ZshScriptCompletionsCommand />\n <ZshConfigCompletionsCommand />\n <PowerShellCompletionsShared />\n <PowerShellScriptCompletionsCommand />\n <PowerShellConfigCompletionsCommand />\n <FishCompletionsShared />\n <FishScriptCompletionsCommand />\n <FishConfigCompletionsCommand />\n </>\n );\n }\n }\n }\n ];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAE,UAAkC,UAAA,EAAA,KAAA;AAClC,QAAA,CAAA;EACA,MAAA;EACA,SAAA;AACI,QAAI,MAAA,4EAAW;AACf,UAAM,EACV,aAAA;IACA,QAAA,CAAA,GAAA,YAAA;IACQ,GAAA;IACD;;;AAIP,QAAA,MAAA,iEAAA;AACI,QAAC,WAAc,EAAA;AACnB,OAAA,KAAA,OAAA,MAAA,UAAA,MAAA,OAAA,cAAA,CACK,MAAM,KAAA,gNAAS;OAErB,MAAA,OAAA,KAAA;IACS,IAAC;IACD,MAAA;IACD,OAAA,CAAA,aAAA;IACL,MAAA;IACM,UAAS,CAAA,cAAM;IACnB,OAAS;IACP,MAAK;IACH,MAAC,CAAA,UAAU;IACZ,aAAA,wDAAA,YAAA,KAAA,CAAA;aAED,MAAO,UAAA,KAAA,WAAA,eAAA,WAAA,EACL;IACD,WAAA;IACF,CAAA;AAED,OAAE,KAAK,OAAK,YAAA,OAAA,SAAA,OAAA,CACV,KAAG,KAAM,OAAK,MAAI,UAAW,MAAA,OAAY,mBAAgB,CACxD,MAAA,KAAA,0NAAA;;AAED,SAAK,OAAS,KAAI;KACd,IAAI;KACN,MAAK;KACH,aAAM,8CAAoD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,OAAO,EACP,MAAO,UAAW,KAAK,WAAO,eAAA,QAAA,UAAA,aAAA,EAC9B;MACD;KACD,WAAU;KACX,CAAC;AACF,SAAK,OAAO,KAAA;KACV,IAAI;KACJ,MAAM;KACN,aAAW,uFAAA,YAAA,MAAA,KAAA,CAAA;KACX,OAAO,EAAA;KACP,MAAM;KACN,UAAK;MAAA;MAAA;MAAA;MAAA;KACL,OAAI;KACJ,MAAM,CAAA,UAAM;KACZ,OAAO;MACL,MAAM,UAAC,KAAY,WAAA,eAAA,QAAA,UAAA,WAAA;MACnB,OAAO,EACL,MAAK,UAAO,KAAA,WAAA,eAAA,QAAA,UAAA,aAAA,EACb;MACF;KACD,WAAI;KACL,CAAC;;;EAIR,SAAI;;GAEF,MAAM,UAAK;AACT,SAAK,MAAA,+EAAA;AACL,WAAI,OAAK,MAAW;KAAC,gBAAkB,uBAAiB,EAAA,CAAA;KAAW,gBAAA,8BAAA,EAAA,CAAA;KAAA,gBAAA,8BAAA,EAAA,CAAA;KAAA,gBAAA,sBAAA,EAAA,CAAA;KAAA,gBAAA,6BAAA,EAAA,CAAA;KAAA,gBAAA,6BAAA,EAAA,CAAA;KAAA,gBAAA,6BAAA,EAAA,CAAA;KAAA,gBAAA,oCAAA,EAAA,CAAA;KAAA,gBAAA,oCAAA,EAAA,CAAA;KAAA,gBAAA,uBAAA,EAAA,CAAA;KAAA,gBAAA,8BAAA,EAAA,CAAA;KAAA,gBAAA,8BAAA,EAAA,CAAA;KAAA,CAAA;;GAEtE;EACF,CAAC"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport { getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport type { Plugin } from \"powerlines\";\nimport {\n BashCompletionsShared,\n BashConfigCompletionsCommand,\n BashScriptCompletionsCommand,\n FishCompletionsShared,\n FishConfigCompletionsCommand,\n FishScriptCompletionsCommand,\n PowerShellCompletionsShared,\n PowerShellConfigCompletionsCommand,\n PowerShellScriptCompletionsCommand,\n ZshCompletionsShared,\n ZshConfigCompletionsCommand,\n ZshScriptCompletionsCommand\n} from \"./components\";\nimport type {\n CompletionsPluginContext,\n CompletionsPluginOptions\n} from \"./types/plugin\";\nimport { SHELL_TYPES } from \"./types/shell-type\";\n\nexport type * from \"./types\";\n\n/**\n * The Completions - Shell Shock plugin to add completion commands to a Shell Shock application.\n */\nexport const plugin = <\n TContext extends CompletionsPluginContext = CompletionsPluginContext\n>(\n options: CompletionsPluginOptions = {}\n): Plugin<TContext>[] => {\n return [\n {\n name: \"shell-shock:completions\",\n config() {\n this.debug(\n \"Providing default configuration for the Shell Shock `completions` plugin.\"\n );\n\n return {\n completions: { shells: [...SHELL_TYPES], ...options }\n };\n },\n configResolved() {\n this.debug(\n \"Adding the CLI completion commands to the application context.\"\n );\n\n this.inputs ??= [];\n if (this.inputs.some(input => input.id === \"completions\")) {\n this.info(\n \"The `completions` command already exists in the commands list. If you would like the completions command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.\"\n );\n } else {\n this.inputs.push({\n id: \"completions\",\n name: \"completions\",\n alias: [\"completion\"],\n path: \"completions\",\n segments: [\"completions\"],\n title: \"Completions\",\n icon: \"🖵\",\n tags: [\"Utility\"],\n description: `Commands for generating shell completion scripts for ${getAppTitle(\n this\n )}.`,\n entry: {\n file: joinPaths(this.entryPath, \"completions\", \"index.ts\")\n },\n isVirtual: true,\n source: \"completions-plugin\"\n });\n }\n\n if (this.config.completions.shells.includes(\"bash\")) {\n if (this.inputs.some(input => input.id === \"completions-bash\")) {\n this.info(\n \"The `completions-bash` command already exists in the commands list. If you would like the completions-bash command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.\"\n );\n } else {\n this.inputs.push({\n id: \"completions-bash\",\n name: \"bash\",\n description: `Commands to setup bash completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/bash\",\n segments: [\"completions\", \"bash\"],\n title: \"Completions - Bash\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"index.ts\"\n )\n },\n isVirtual: true,\n source: \"completions-plugin\"\n });\n this.inputs.push({\n id: \"completions-bash-script\",\n name: \"script\",\n description: `Generate a bash completion script for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/bash/script\",\n segments: [\"completions\", \"bash\", \"script\"],\n title: \"Completions - Bash Script\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"script\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"script\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false,\n source: \"completions-plugin\"\n });\n this.inputs.push({\n id: \"completions-bash-config\",\n name: \"config\",\n description: `Update the current system's bash shell configuration to include completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/bash/config\",\n segments: [\"completions\", \"bash\", \"config\"],\n title: \"Completions - Bash Configuration\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"config\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"config\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false,\n source: \"completions-plugin\"\n });\n }\n }\n\n if (this.config.completions.shells.includes(\"zsh\")) {\n if (this.inputs.some(input => input.id === \"completions-zsh\")) {\n this.info(\n \"The `completions-zsh` command already exists in the commands list. If you would like the completions-zsh command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.\"\n );\n } else {\n this.inputs.push({\n id: \"completions-zsh\",\n name: \"zsh\",\n description: `Commands to setup Zsh completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/zsh\",\n segments: [\"completions\", \"zsh\"],\n title: \"Completions - Zsh\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"index.ts\"\n )\n },\n isVirtual: true,\n source: \"completions-plugin\"\n });\n this.inputs.push({\n id: \"completions-zsh-script\",\n name: \"script\",\n description: `Generate a Zsh completion script for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/zsh/script\",\n segments: [\"completions\", \"zsh\", \"script\"],\n title: \"Completions - Zsh Script\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"script\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"script\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false,\n source: \"completions-plugin\"\n });\n this.inputs.push({\n id: \"completions-zsh-config\",\n name: \"config\",\n description: `Update the current system's Zsh shell configuration to include completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/zsh/config\",\n segments: [\"completions\", \"zsh\", \"config\"],\n title: \"Completions - Zsh Configuration\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"config\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"config\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false,\n source: \"completions-plugin\"\n });\n }\n }\n\n if (this.config.completions.shells.includes(\"powershell\")) {\n if (\n this.inputs.some(input => input.id === \"completions-powershell\")\n ) {\n this.info(\n \"The `completions-powershell` command already exists in the commands list. If you would like the completions-powershell command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.\"\n );\n } else {\n this.inputs.push({\n id: \"completions-powershell\",\n name: \"powershell\",\n description: `Commands to setup PowerShell completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/powershell\",\n segments: [\"completions\", \"powershell\"],\n title: \"Completions - PowerShell\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"powershell\",\n \"index.ts\"\n )\n },\n isVirtual: true,\n source: \"completions-plugin\"\n });\n this.inputs.push({\n id: \"completions-powershell-script\",\n name: \"script\",\n description: `Generate a PowerShell completion script for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/powershell/script\",\n segments: [\"completions\", \"powershell\", \"script\"],\n title: \"Completions - PowerShell Script\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"powershell\",\n \"script\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"powershell\",\n \"script\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false,\n source: \"completions-plugin\"\n });\n this.inputs.push({\n id: \"completions-powershell-config\",\n name: \"config\",\n description: `Update the current system's PowerShell configuration to include completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/powershell/config\",\n segments: [\"completions\", \"powershell\", \"config\"],\n title: \"Completions - PowerShell Configuration\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"powershell\",\n \"config\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"powershell\",\n \"config\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false,\n source: \"completions-plugin\"\n });\n }\n }\n\n if (this.config.completions.shells.includes(\"fish\")) {\n if (this.inputs.some(input => input.id === \"completions-fish\")) {\n this.info(\n \"The `completions-fish` command already exists in the commands list. If you would like the completions-fish command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.\"\n );\n } else {\n this.inputs.push({\n id: \"completions-fish\",\n name: \"fish\",\n description: `Commands to setup Fish completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/fish\",\n segments: [\"completions\", \"fish\"],\n title: \"Completions - Fish\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"fish\",\n \"index.ts\"\n )\n },\n isVirtual: true,\n source: \"completions-plugin\"\n });\n this.inputs.push({\n id: \"completions-fish-script\",\n name: \"script\",\n description: `Generate a Fish completion script for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/fish/script\",\n segments: [\"completions\", \"fish\", \"script\"],\n title: \"Completions - Fish Script\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"fish\",\n \"script\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"fish\",\n \"script\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false,\n source: \"completions-plugin\"\n });\n this.inputs.push({\n id: \"completions-fish-config\",\n name: \"config\",\n description: `Update the current system's Fish shell configuration to include completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/fish/config\",\n segments: [\"completions\", \"fish\", \"config\"],\n title: \"Completions - Fish Configuration\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"fish\",\n \"config\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"fish\",\n \"config\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false,\n source: \"completions-plugin\"\n });\n }\n }\n },\n prepare: {\n order: \"pre\",\n async handler() {\n this.debug(\n \"Rendering command handling modules for the Shell Shock `completions` plugin.\"\n );\n\n return render(\n this,\n <>\n <BashCompletionsShared />\n <BashScriptCompletionsCommand />\n <BashConfigCompletionsCommand />\n <ZshCompletionsShared />\n <ZshScriptCompletionsCommand />\n <ZshConfigCompletionsCommand />\n <PowerShellCompletionsShared />\n <PowerShellScriptCompletionsCommand />\n <PowerShellConfigCompletionsCommand />\n <FishCompletionsShared />\n <FishScriptCompletionsCommand />\n <FishConfigCompletionsCommand />\n </>\n );\n }\n }\n }\n ];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAE,UAAkC,UAAA,EAAA,KAAA;AAClC,QAAA,CAAA;EACA,MAAA;EACA,SAAA;AACI,QAAI,MAAA,4EAAW;AACf,UAAM,EACV,aAAA;IACA,QAAA,CAAA,GAAA,YAAA;IACQ,GAAA;IACD;;;AAIP,QAAA,MAAA,iEAAA;AACI,QAAC,WAAc,EAAA;AACnB,OAAA,KAAA,OAAA,MAAA,UAAA,MAAA,OAAA,cAAA,CACK,MAAM,KAAA,gNAAS;OAErB,MAAA,OAAA,KAAA;IACS,IAAC;IACD,MAAA;IACD,OAAA,CAAA,aAAA;IACL,MAAA;IACM,UAAS,CAAA,cAAM;IACnB,OAAS;IACP,MAAK;IACH,MAAC,CAAA,UAAU;IACZ,aAAA,wDAAA,YAAA,KAAA,CAAA;aAED,MAAO,UAAA,KAAA,WAAA,eAAA,WAAA,EACL;IACD,WAAA;IACF,QAAA;IACD,CAAA;AAEA,OAAI,KAAC,OAAW,YAAI,OAAW,SAAY,OAAI,CAC7C,KAAC,KAAA,OAAA,MAAA,UAAA,MAAA,OAAA,mBAAA;QAEI;AACH,SAAE,OAAK,KAAO;KACd,IAAK;KACH,MAAM;KACP,aAAA,8CAAA,YAAA,MAAA,KAAA,CAAA;KACD,OAAK,EAAA;KACL,MAAK;KAC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A;MAAA;MAAA;KACX,OAAO;KACP,MAAE,CAAA,UAAY;KACd,OAAO;MACL,MAAM,UAAU,KAAC,WAAA,eAAA,QAAA,UAAA,WAAA;MACjB,OAAO,EACL,MAAM,UAAS,KAAA,WAAA,eAAA,QAAA,UAAA,aAAA,EAChB;MACF;KACD,WAAW;KACX,QAAO;KACR,CAAC;AACF,SAAK,OAAE,KAAA;KACL,IAAI;KACJ,MAAM;KACN,aAAa,uFAAS,YAAA,MAAA,KAAA,CAAA;KACtB,OAAO,EAAE;KACT,MAAM;KACN,UAAS;MAAA;MAAO;MAAA;MAAA;KAChB,OAAO;KACP,MAAM,CAAA,UAAA;KACN,OAAI;MACF,MAAC,UAAA,KAAA,WAAA,eAAA,QAAA,UAAA,WAAA;MACD,OAAA,EACA,MAAQ,UAAC,KAAY,WAAM,eAAA,QAAA,UAAA,aAAA,EAC3B;MACJ;KACF,WAAA;;KAEG,CAAC;;;EAIR,SAAQ;GACN,OAAO;GACP,MAAM,UAAC;AACL,SAAI,MAAK,+EAAA;AACT,WAAI,OAAK,MAAW;KAAC,gBAAA,uBAAA,EAAA,CAAA;KAAA,gBAAA,8BAAA,EAAA,CAAA;KAAA,gBAAA,8BAAA,EAAA,CAAA;KAAA,gBAAA,sBAAA,EAAA,CAAA;KAAA,gBAAA,6BAAA,EAAA,CAAA;KAAA,gBAAA,6BAAA,EAAA,CAAA;KAAA,gBAAA,6BAAA,EAAA,CAAA;KAAA,gBAAA,oCAAA,EAAA,CAAA;KAAA,gBAAA,oCAAA,EAAA,CAAA;KAAA,gBAAA,uBAAA,EAAA,CAAA;KAAA,gBAAA,8BAAA,EAAA,CAAA;KAAA,gBAAA,8BAAA,EAAA,CAAA;KAAA,CAAA;;GAExB;EACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shell-shock/plugin-completions",
3
- "version": "0.4.10",
3
+ "version": "0.4.12",
4
4
  "type": "module",
5
5
  "description": "A package containing a Shell Shock plugin to generate source code given a list design tokens.",
6
6
  "repository": {
@@ -335,16 +335,16 @@
335
335
  "dependencies": {
336
336
  "@alloy-js/core": "0.23.0-dev.8",
337
337
  "@alloy-js/typescript": "0.23.0-dev.4",
338
- "@powerlines/deepkit": "^0.6.167",
339
- "@powerlines/plugin-alloy": "^0.26.10",
340
- "@powerlines/plugin-plugin": "^0.12.344",
341
- "@shell-shock/core": "^0.17.2",
338
+ "@powerlines/deepkit": "^0.8.1",
339
+ "@powerlines/plugin-alloy": "^0.26.16",
340
+ "@powerlines/plugin-plugin": "^0.12.348",
341
+ "@shell-shock/core": "^0.17.4",
342
342
  "@stryke/path": "^0.27.4",
343
343
  "@stryke/string-format": "^0.17.9",
344
- "powerlines": "^0.42.34"
344
+ "powerlines": "^0.42.38"
345
345
  },
346
346
  "devDependencies": {
347
- "@powerlines/plugin-deepkit": "^0.11.272",
347
+ "@powerlines/plugin-deepkit": "^0.11.278",
348
348
  "@types/node": "^25.6.0"
349
349
  },
350
350
  "publishConfig": {
@@ -362,5 +362,5 @@
362
362
  "./package.json": "./package.json"
363
363
  }
364
364
  },
365
- "gitHead": "38e2393cfc876607226b05a59cc9bd62e3b59960"
365
+ "gitHead": "1364666ac28f03cca26271afb582c71a2fe12ecd"
366
366
  }