@shell-shock/plugin-completions 0.4.18 → 0.4.20

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 (92) hide show
  1. package/dist/components/bash-config-command.cjs +2 -6
  2. package/dist/components/bash-config-command.d.cts +1 -3
  3. package/dist/components/bash-config-command.d.cts.map +1 -1
  4. package/dist/components/bash-config-command.d.mts +1 -3
  5. package/dist/components/bash-config-command.d.mts.map +1 -1
  6. package/dist/components/bash-config-command.mjs +5 -9
  7. package/dist/components/bash-config-command.mjs.map +1 -1
  8. package/dist/components/bash-script-command.cjs +2 -6
  9. package/dist/components/bash-script-command.d.cts +1 -3
  10. package/dist/components/bash-script-command.d.cts.map +1 -1
  11. package/dist/components/bash-script-command.d.mts +1 -3
  12. package/dist/components/bash-script-command.d.mts.map +1 -1
  13. package/dist/components/bash-script-command.mjs +5 -9
  14. package/dist/components/bash-script-command.mjs.map +1 -1
  15. package/dist/components/bash-shared.d.cts +1 -3
  16. package/dist/components/bash-shared.d.cts.map +1 -1
  17. package/dist/components/bash-shared.d.mts +1 -3
  18. package/dist/components/bash-shared.d.mts.map +1 -1
  19. package/dist/components/bash-shared.mjs.map +1 -1
  20. package/dist/components/fish-config-command.cjs +3 -7
  21. package/dist/components/fish-config-command.d.cts +1 -3
  22. package/dist/components/fish-config-command.d.cts.map +1 -1
  23. package/dist/components/fish-config-command.d.mts +1 -3
  24. package/dist/components/fish-config-command.d.mts.map +1 -1
  25. package/dist/components/fish-config-command.mjs +4 -8
  26. package/dist/components/fish-config-command.mjs.map +1 -1
  27. package/dist/components/fish-script-command.cjs +1 -5
  28. package/dist/components/fish-script-command.d.cts +1 -3
  29. package/dist/components/fish-script-command.d.cts.map +1 -1
  30. package/dist/components/fish-script-command.d.mts +1 -3
  31. package/dist/components/fish-script-command.d.mts.map +1 -1
  32. package/dist/components/fish-script-command.mjs +3 -7
  33. package/dist/components/fish-script-command.mjs.map +1 -1
  34. package/dist/components/fish-shared.d.cts +1 -3
  35. package/dist/components/fish-shared.d.cts.map +1 -1
  36. package/dist/components/fish-shared.d.mts +1 -3
  37. package/dist/components/fish-shared.d.mts.map +1 -1
  38. package/dist/components/fish-shared.mjs.map +1 -1
  39. package/dist/components/powershell-config-command.cjs +2 -6
  40. package/dist/components/powershell-config-command.d.cts +1 -3
  41. package/dist/components/powershell-config-command.d.cts.map +1 -1
  42. package/dist/components/powershell-config-command.d.mts +1 -3
  43. package/dist/components/powershell-config-command.d.mts.map +1 -1
  44. package/dist/components/powershell-config-command.mjs +3 -7
  45. package/dist/components/powershell-config-command.mjs.map +1 -1
  46. package/dist/components/powershell-script-command.cjs +2 -6
  47. package/dist/components/powershell-script-command.d.cts +1 -3
  48. package/dist/components/powershell-script-command.d.cts.map +1 -1
  49. package/dist/components/powershell-script-command.d.mts +1 -3
  50. package/dist/components/powershell-script-command.d.mts.map +1 -1
  51. package/dist/components/powershell-script-command.mjs +5 -9
  52. package/dist/components/powershell-script-command.mjs.map +1 -1
  53. package/dist/components/powershell-shared.d.cts +1 -3
  54. package/dist/components/powershell-shared.d.cts.map +1 -1
  55. package/dist/components/powershell-shared.d.mts +1 -3
  56. package/dist/components/powershell-shared.d.mts.map +1 -1
  57. package/dist/components/powershell-shared.mjs.map +1 -1
  58. package/dist/components/zsh-config-command.cjs +2 -6
  59. package/dist/components/zsh-config-command.d.cts +1 -3
  60. package/dist/components/zsh-config-command.d.cts.map +1 -1
  61. package/dist/components/zsh-config-command.d.mts +1 -3
  62. package/dist/components/zsh-config-command.d.mts.map +1 -1
  63. package/dist/components/zsh-config-command.mjs +5 -9
  64. package/dist/components/zsh-config-command.mjs.map +1 -1
  65. package/dist/components/zsh-script-command.cjs +2 -6
  66. package/dist/components/zsh-script-command.d.cts +1 -3
  67. package/dist/components/zsh-script-command.d.cts.map +1 -1
  68. package/dist/components/zsh-script-command.d.mts +1 -3
  69. package/dist/components/zsh-script-command.d.mts.map +1 -1
  70. package/dist/components/zsh-script-command.mjs +5 -9
  71. package/dist/components/zsh-script-command.mjs.map +1 -1
  72. package/dist/components/zsh-shared.d.cts +1 -3
  73. package/dist/components/zsh-shared.d.cts.map +1 -1
  74. package/dist/components/zsh-shared.d.mts +1 -3
  75. package/dist/components/zsh-shared.d.mts.map +1 -1
  76. package/dist/components/zsh-shared.mjs.map +1 -1
  77. package/dist/helpers/complete-command.d.mts.map +1 -1
  78. package/dist/helpers/complete-command.mjs.map +1 -1
  79. package/dist/helpers/completion-directive-constants.d.mts.map +1 -1
  80. package/dist/helpers/completion-directive-constants.mjs.map +1 -1
  81. package/dist/index.cjs +16 -29
  82. package/dist/index.d.cts +2 -2
  83. package/dist/index.d.mts +2 -2
  84. package/dist/index.d.mts.map +1 -1
  85. package/dist/index.mjs +16 -29
  86. package/dist/index.mjs.map +1 -1
  87. package/dist/types/plugin.d.cts.map +1 -1
  88. package/dist/types/plugin.d.mts.map +1 -1
  89. package/dist/types/shell-type.d.cts.map +1 -1
  90. package/dist/types/shell-type.d.mts.map +1 -1
  91. package/dist/types/shell-type.mjs.map +1 -1
  92. package/package.json +13 -13
@@ -1,11 +1,10 @@
1
1
  import { createComponent, memo } from "@alloy-js/core/jsx-runtime";
2
2
  import { getAppBin, getAppTitle } from "@shell-shock/core/plugin-utils";
3
3
  import { code, computed } from "@alloy-js/core";
4
- import { ElseClause, FunctionDeclaration, IfStatement, InterfaceDeclaration, VarDeclaration } from "@alloy-js/typescript";
5
- import { ReflectionKind } from "@powerlines/deepkit/vendor/type";
4
+ import { ElseClause, FunctionDeclaration, IfStatement, VarDeclaration } from "@alloy-js/typescript";
6
5
  import { Spacing } from "@powerlines/plugin-alloy/core";
7
6
  import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
8
- import { InterfaceMember as InterfaceMember$1, TypescriptFile } from "@powerlines/plugin-alloy/typescript";
7
+ import { InterfaceDeclaration as InterfaceDeclaration$1, InterfaceMember, TypescriptFile } from "@powerlines/plugin-alloy/typescript";
9
8
  import { TSDoc as TSDoc$1, TSDocDefaultValue as TSDocDefaultValue$1 } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
10
9
  import { joinPaths } from "@stryke/path";
11
10
  import { snakeCase } from "@stryke/string-format/snake-case";
@@ -38,7 +37,7 @@ function ZshScriptCompletionsCommand() {
38
37
  get children() {
39
38
  return [
40
39
  createComponent(TSDoc$1, { heading: "Options for the Zsh Completions - Script command." }),
41
- createComponent(InterfaceDeclaration, {
40
+ createComponent(InterfaceDeclaration$1, {
42
41
  "export": true,
43
42
  name: "ZshScriptCompletionsOptions",
44
43
  get children() {
@@ -46,15 +45,12 @@ function ZshScriptCompletionsCommand() {
46
45
  heading: "Should the generated completion script be written to console output instead of an actual file on disk? This is useful for debugging purposes or if you want to manually handle the output.",
47
46
  get children() {
48
47
  return createComponent(TSDocDefaultValue$1, {
49
- get type() {
50
- return ReflectionKind.boolean;
51
- },
48
+ type: "boolean",
52
49
  defaultValue: false
53
50
  });
54
51
  }
55
- }), createComponent(InterfaceMember$1, {
52
+ }), createComponent(InterfaceMember, {
56
53
  name: "display",
57
- optional: true,
58
54
  type: "boolean"
59
55
  })];
60
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"zsh-script-command.mjs","names":[],"sources":["../../src/components/zsh-script-command.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 { code, computed } from \"@alloy-js/core\";\nimport {\n ElseClause,\n FunctionDeclaration,\n IfStatement,\n InterfaceDeclaration,\n VarDeclaration\n} from \"@alloy-js/typescript\";\nimport { ReflectionKind } from \"@powerlines/deepkit/vendor/type\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport {\n InterfaceMember,\n TypescriptFile\n} from \"@powerlines/plugin-alloy/typescript\";\nimport {\n TSDoc,\n TSDocDefaultValue\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport { getAppBin, getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { joinPaths } from \"@stryke/path\";\nimport { snakeCase } from \"@stryke/string-format/snake-case\";\nimport type { CompletionsPluginContext } from \"../types/plugin\";\n\n/**\n * The Zsh Completions - Script command's handler wrapper for the Shell Shock project.\n */\nexport function ZshScriptCompletionsCommand() {\n const context = usePowerlines<CompletionsPluginContext>();\n\n const bin = computed(() => getAppBin(context));\n const name = computed(() => snakeCase(bin.value));\n\n return (\n <TypescriptFile\n path={joinPaths(\n context.entryPath,\n \"completions\",\n \"zsh\",\n \"script\",\n \"command.ts\"\n )}\n imports={{\n \"node:os\": \"os\",\n \"node:path\": [\"join\"],\n \"node:fs/promises\": [\"readFile\", \"writeFile\"],\n \"../shared\": [\"SHELL_COMPLETIONS\", \"SHELL_COMPLETIONS_DISPLAY\"]\n }}\n builtinImports={{\n console: [\"bold\", \"writeLine\", \"success\", \"warn\", \"help\"]\n }}>\n <TSDoc heading=\"Options for the Zsh Completions - Script command.\" />\n <InterfaceDeclaration export name=\"ZshScriptCompletionsOptions\">\n <TSDoc heading=\"Should the generated completion script be written to console output instead of an actual file on disk? This is useful for debugging purposes or if you want to manually handle the output.\">\n <TSDocDefaultValue\n type={ReflectionKind.boolean}\n defaultValue={false}\n />\n </TSDoc>\n <InterfaceMember name=\"display\" optional type=\"boolean\" />\n </InterfaceDeclaration>\n <Spacing />\n <TSDoc heading=\"Handler logic for the \\`completions zsh script\\` command.\"></TSDoc>\n <FunctionDeclaration\n export\n default\n async\n name=\"handler\"\n parameters={[\n {\n name: \"options\",\n type: \"ZshScriptCompletionsOptions\",\n default: \"{}\"\n },\n {\n name: \"path\",\n type: \"string\",\n default: `\"${bin.value}-completions.zsh\"`\n }\n ]}>\n <IfStatement condition={code`options.display !== true`}>\n <VarDeclaration\n const\n name=\"scriptPath\"\n type=\"string\"\n initializer={code` path.includes(\".\") ? \\`\\${path}.zsh\\` : path;`}\n />\n {code`await writeFile(scriptPath, \\`# Zsh script to add completions for ${getAppTitle(context)}\\\\n\\\\n\\${SHELL_COMPLETIONS}\\`);\n\n success(\\`${getAppTitle(\n context\n )} Zsh completion script has been generated at \\${bold(scriptPath)}.\\`);`}\n </IfStatement>\n <ElseClause>\n {code`writeLine(\" ------------------------------------------------- \");\n writeLine(\"\");\n writeLine(\"#compdef ${bin.value} \");\n writeLine(\"#compdef _${name.value} ${bin.value}\");\n writeLine(\"\");\n writeLine(\"# Zsh completion for ${getAppTitle(context)}\");\n writeLine(\"\");\n SHELL_COMPLETIONS_DISPLAY.split(\"\\\\n\").map(line => writeLine(line));\n writeLine(\"\");\n writeLine(\" ------------------------------------------------- \");\n\n writeLine(\"\");\n help(\\`To enable these completions, perform one of the following actions:\n\n 1) Copy and paste the above script into your shell configuration file (e.g., ~/.config/zsh/.zshrc)\n 2) Save the above script to a file and source it from your shell configuration file \\`); `}\n </ElseClause>\n </FunctionDeclaration>\n </TypescriptFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAgCA,SAAS,8BAAmC;CAC5C,MAAO,UAAA,eAAA;CACL,MAAK,MAAA,eAAA,UAAA,QAAA,CAAA;CACL,MAAA,OAAA,eAAA,UAAA,IAAA,MAAA,CAAA;AACA,QAAO,gBAAkB,gBAAgB;EAC3C,IAAQ,OAAC;AACH,UAAG,UAAY,QAAO,WAAY,eAAA,OAAA,UAAA,aAAA;;EAExC,SAAa;;GAEX,aAAA,CAAA,OAAA;GACI,oBAAmB,CAAA,YAAc,YAAW;GAChD,aAAA,CAAA,qBAAA,4BAAA;GACF;EACE,gBAAgB;;;;;;KAEhB;EACA,IAAM,WAAO;;+BAEP,SAAC,qDACJ,CAAA;IAAA,gBAAA,sBAAA;KACC,UAAM;KACJ,MAAA;KACA,IAAC,WAAY;AACZ,aAAI,CAAA,gBAAA,SAAA;OACJ,SAAO;OACP,IAAO,WAAG;AACZ,eAAA,gBAAA,qBAAA;SACQ,IAAA,OAAA;AACG,iBAAK,eAAA;;SAEP,cAAc;SAClB,CAAA;;OAEN,CAAA,EAAA,gBAAgB,mBAAA;OACd,MAAU;OACV,UAAA;OACI,MAAC;OACN,CAAA,CAAA;;KAEA,CAAC;IAAE,gBAAC,SAAA,EAAA,CAAA;IAAA,gBAAA,SAAA,EACH,SAAS,+DACV,CAAC;IAAE,gBAAgB,qBAAK;KACvB,UAAG;KACH,WAAO;KACP,OAAC;KACD,MAAA;KACD,IAAA,aAAS;AACT,aAAM,CAAA;OACN,MAAA;OACC,MAAA;OACA,SAAA;OACA,EAAA;OACI,MAAE;OACN,MAAU;OACR,SAAA,IAAA,IAAA,MAAA;OACC,CAAC;;KAEJ,IAAI,WAAW;AACb,aAAC,CAAA,gBAAA,aAAA;OACD,WAAA,IAAA;OACE,IAAI,WAAQ;AACZ,eAAO,CAAA,gBAAO,gBAAA;SACd,SAAa;SACf,MAAA;SACA,MAAA;SACD,aAAY,IAAW;SACrB,CAAA,EAAA,WAAA,IAAA,qEAAA,YAAA,QAAA,CAAA;;wBAEO,YAAU,QAAA,CAAA,wEAAA,CAAA;;OAEjB,CAAC,EAAA,gBAAmB,YAAa,EACjC,IAAA,WAAA;AACA,cAAU,IAAC;;kCAEE,IAAW,MAAA;mCACrB,KAAA,MAAA,GAAA,IAAA,MAAA;;8CAEO,YAAA,QAAA,CAAA;;;;;;;;;;;;;KAcd,CAAC;IAAC;;EAEN,CAAC"}
1
+ {"version":3,"file":"zsh-script-command.mjs","names":[],"sources":[],"mappings":""}
@@ -1,10 +1,8 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
-
3
1
  //#region src/components/zsh-shared.d.ts
4
2
  /**
5
3
  * The Zsh Completions generation for the Shell Shock project.
6
4
  */
7
- declare function ZshCompletionsShared(): _$_alloy_js_core0.Children;
5
+ declare function ZshCompletionsShared(): import("@alloy-js/core").Children;
8
6
  //#endregion
9
7
  export { ZshCompletionsShared };
10
8
  //# sourceMappingURL=zsh-shared.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"zsh-shared.d.cts","names":[],"sources":["../../src/components/zsh-shared.tsx"],"mappings":";;;;;;iBAiCgB,oBAAA,CAAA,GAAoB,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"zsh-shared.d.cts","names":[],"sources":["../../src/components/zsh-shared.tsx"],"mappings":";;AAiCA;;iBAAgB,oBAAA,6BAAoB,QAAA"}
@@ -1,10 +1,8 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
-
3
1
  //#region src/components/zsh-shared.d.ts
4
2
  /**
5
3
  * The Zsh Completions generation for the Shell Shock project.
6
4
  */
7
- declare function ZshCompletionsShared(): _$_alloy_js_core0.Children;
5
+ declare function ZshCompletionsShared(): import("@alloy-js/core").Children;
8
6
  //#endregion
9
7
  export { ZshCompletionsShared };
10
8
  //# sourceMappingURL=zsh-shared.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"zsh-shared.d.mts","names":[],"sources":["../../src/components/zsh-shared.tsx"],"mappings":";;;;;;iBAiCgB,oBAAA,CAAA,GAAoB,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"zsh-shared.d.mts","names":[],"sources":["../../src/components/zsh-shared.tsx"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"zsh-shared.mjs","names":[],"sources":["../../src/components/zsh-shared.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 { code, computed } from \"@alloy-js/core\";\nimport { VarDeclaration } from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { TypescriptFile } from \"@powerlines/plugin-alloy/typescript\";\nimport { getAppBin } from \"@shell-shock/core/plugin-utils\";\nimport { joinPaths } from \"@stryke/path\";\nimport { snakeCase } from \"@stryke/string-format/snake-case\";\nimport { CompletionDirective } from \"../helpers\";\nimport { EXEC_COMMAND } from \"../helpers/complete-command\";\nimport type { CompletionsPluginContext } from \"../types/plugin\";\n\n/**\n * The Zsh Completions generation for the Shell Shock project.\n */\nexport function ZshCompletionsShared() {\n const context = usePowerlines<CompletionsPluginContext>();\n\n const bin = computed(() => getAppBin(context));\n const name = computed(() => snakeCase(bin.value));\n\n return (\n <TypescriptFile\n path={joinPaths(context.entryPath, \"completions\", \"zsh\", \"shared.ts\")}\n builtinImports={{\n console: [\n \"white\",\n \"green\",\n \"red\",\n \"bold\",\n \"cyan\",\n \"gray\",\n \"magenta\",\n \"magentaBright\",\n \"greenBright\",\n \"redBright\",\n \"cyanBright\",\n \"dim\"\n ]\n }}>\n <Spacing />\n <VarDeclaration\n const\n export\n name=\"SHELL_COMPLETIONS\"\n initializer={code` \\`__${name.value}_debug() {\n local file=\"$BASH_COMP_DEBUG_FILE\"\n if [[ -n \\\\\\${file} ]]; then\n echo \"$*\" >> \"\\\\\\${file}\"\n fi\n}\n\n_${name.value}() {\n local shellCompDirectiveError=${\n CompletionDirective.CompletionDirectiveError\n }\n local shellCompDirectiveNoSpace=${\n CompletionDirective.CompletionDirectiveNoSpace\n }\n local shellCompDirectiveNoFileComp=${\n CompletionDirective.CompletionDirectiveNoFileComp\n }\n local shellCompDirectiveFilterFileExt=${\n CompletionDirective.CompletionDirectiveFilterFileExt\n }\n local shellCompDirectiveFilterDirs=${\n CompletionDirective.CompletionDirectiveFilterDirs\n }\n local shellCompDirectiveKeepOrder=${\n CompletionDirective.CompletionDirectiveKeepOrder\n }\n\n local lastParam lastChar flagPrefix requestComp out directive comp lastComp noSpace keepOrder\n local -a completions\n\n __${name.value}_debug \"\\\\n========= starting completion logic ==========\"\n __${name.value}_debug \"CURRENT: \\\\\\${CURRENT}, words[*]: \\\\\\${words[*]}\"\n\n # The user could have moved the cursor backwards on the command-line.\n # We need to trigger completion from the $CURRENT location, so we need\n # to truncate the command-line ($words) up to the $CURRENT location.\n # (We cannot use $CURSOR as its value does not work when a command is an alias.)\n words=( \"\\\\\\${=words[1,CURRENT]}\" )\n __${name.value}_debug \"Truncated words[*]: \\\\\\${words[*]},\"\n\n lastParam=\\\\\\${words[-1]}\n lastChar=\\\\\\${lastParam[-1]}\n __${name.value}_debug \"lastParam: \\\\\\${lastParam}, lastChar: \\\\\\${lastChar}\"\n # For zsh, when completing a flag with an = (e.g., ${bin.value} -n=<TAB>)\n # completions must be prefixed with the flag\n setopt local_options BASH_REMATCH\n if [[ \"\\\\\\${lastParam}\" =~ '-.*=' ]]; then\n # We are dealing with a flag with an =\n flagPrefix=\"-P \\\\\\${BASH_REMATCH}\"\n fi\n\n # Prepare the command to obtain completions, ensuring arguments are quoted for eval\n local -a args_to_quote=(\"\\\\\\${(@)words[2,-1]}\")\n if [ \"\\\\\\${lastChar}\" = \"\" ]; then\n # If the last parameter is complete (there is a space following it)\n # We add an extra empty parameter so we can indicate this to the go completion code.\n __${name.value}_debug \"Adding extra empty parameter\"\n args_to_quote+=(\"\")\n fi\n\n # Use Zsh's (q) flag to quote each argument safely for eval\n local quoted_args=(\"\\\\\\${(@q)args_to_quote}\")\n\n # Join the main command and the quoted arguments into a single string for eval\n requestComp=\"${EXEC_COMMAND} complete -- \\\\\\${quoted_args[*]}\"\n\n __${name.value}_debug \"About to call: eval \\\\\\${requestComp}\"\n\n # Use eval to handle any environment variables and such\n out=$(eval \\\\\\${requestComp} 2>/dev/null)\n __${name.value}_debug \"completion output: \\\\\\${out}\"\n\n # Extract the directive integer following a : from the last line\n local lastLine\n while IFS='\\n' read -r line; do\n lastLine=\\\\\\${line}\n done < <(printf \"%s\\n\" \"\\\\\\${out[@]}\")\n __${name.value}_debug \"last line: \\\\\\${lastLine}\"\n\n if [ \"\\\\\\${lastLine[1]}\" = : ]; then\n directive=\\\\\\${lastLine[2,-1]}\n # Remove the directive including the : and the newline\n local suffix\n (( suffix=\\\\\\${#lastLine}+2))\n out=\\\\\\${out[1,-$suffix]}\n else\n # There is no directive specified. Leave $out as is.\n __${name.value}_debug \"No directive found. Setting to default\"\n directive=0\n fi\n\n __${name.value}_debug \"directive: \\\\\\${directive}\"\n __${name.value}_debug \"completions: \\\\\\${out}\"\n __${name.value}_debug \"flagPrefix: \\\\\\${flagPrefix}\"\n\n if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then\n __${name.value}_debug \"Completion received error. Ignoring completions.\"\n return\n fi\n\n local activeHelpMarker=\"%\"\n local endIndex=\\\\\\${#activeHelpMarker}\n local startIndex=$((\\\\\\${#activeHelpMarker}+1))\n local hasActiveHelp=0\n while IFS='\\n' read -r comp; do\n # Check if this is an activeHelp statement (i.e., prefixed with $activeHelpMarker)\n if [ \"\\\\\\${comp[1,$endIndex]}\" = \"$activeHelpMarker\" ];then\n __${name.value}_debug \"ActiveHelp found: $comp\"\n comp=\"\\\\\\${comp[$startIndex,-1]}\"\n if [ -n \"$comp\" ]; then\n compadd -x \"\\\\\\${comp}\"\n __${name.value}_debug \"ActiveHelp will need delimiter\"\n hasActiveHelp=1\n fi\n continue\n fi\n\n if [ -n \"$comp\" ]; then\n # If requested, completions are returned with a description.\n # The description is preceded by a TAB character.\n # For zsh's _describe, we need to use a : instead of a TAB.\n # We first need to escape any : as part of the completion itself.\n comp=\\\\\\${comp//:/\\\\:}\n\n local tab=\"$(printf '\\\\t')\"\n comp=\\\\\\${comp//$tab/:}\n\n __${name.value}_debug \"Adding completion: \\\\\\${comp}\"\n completions+=\\\\\\${comp}\n lastComp=$comp\n fi\n done < <(printf \"%s\\n\" \"\\\\\\${out[@]}\")\n\n # Add a delimiter after the activeHelp statements, but only if:\n # - there are completions following the activeHelp statements, or\n # - file completion will be performed (so there will be choices after the activeHelp)\n if [ $hasActiveHelp -eq 1 ]; then\n if [ \\\\\\${#completions} -ne 0 ] || [ $((directive & shellCompDirectiveNoFileComp)) -eq 0 ]; then\n __${name.value}_debug \"Adding activeHelp delimiter\"\n compadd -x \"--\"\n hasActiveHelp=0\n fi\n fi\n\n if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then\n __${name.value}_debug \"Activating nospace.\"\n noSpace=\"-S ''\"\n fi\n\n if [ $((directive & shellCompDirectiveKeepOrder)) -ne 0 ]; then\n __${name.value}_debug \"Activating keep order.\"\n keepOrder=\"-V\"\n fi\n\n if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then\n # File extension filtering\n local filteringCmd\n filteringCmd='_files'\n for filter in \\\\\\${completions[@]}; do\n if [ \\\\\\${filter[1]} != '*' ]; then\n # zsh requires a glob pattern to do file filtering\n filter=\"\\\\*.$filter\"\n fi\n filteringCmd+=\" -g $filter\"\n done\n filteringCmd+=\" \\\\\\${flagPrefix}\"\n\n __${name.value}_debug \"File filtering command: $filteringCmd\"\n _arguments '*:filename:'\"$filteringCmd\"\n elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then\n # File completion for directories only\n local subdir\n subdir=\"\\\\\\${completions[1]}\"\n if [ -n \"$subdir\" ]; then\n __${name.value}_debug \"Listing directories in $subdir\"\n pushd \"\\\\\\${subdir}\" >/dev/null 2>&1\n else\n __${name.value}_debug \"Listing directories in .\"\n fi\n\n local result\n _arguments '*:dirname:_files -/'\" \\\\\\${flagPrefix}\"\n result=$?\n if [ -n \"$subdir\" ]; then\n popd >/dev/null 2>&1\n fi\n return $result\n else\n __${name.value}_debug \"Calling _describe\"\n if eval _describe $keepOrder \"completions\" completions -Q \\\\\\${flagPrefix} \\\\\\${noSpace}; then\n __${name.value}_debug \"_describe found some completions\"\n\n # Return the success of having called _describe\n return 0\n else\n __${name.value}_debug \"_describe did not find completions.\"\n __${name.value}_debug \"Checking if we should do file completion.\"\n if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then\n __${name.value}_debug \"deactivating file completion\"\n\n # Return 0 to indicate completion is finished and prevent zsh from\n # trying other completion algorithms (which could cause hanging).\n # We use NoFileComp directive to explicitly disable file completion.\n return 0\n else\n # Perform file completion\n __${name.value}_debug \"Activating file completion\"\n\n # We must return the result of this command, so it must be the\n # last command, or else we must store its result to return it.\n _arguments '*:filename:_files'\" \\\\\\${flagPrefix}\"\n fi\n fi\n fi\n}\n\n# don't run the completion function when being sourced or eval-ed\nif [ \"\\\\\\${funcstack[1]}\" = \"_${name.value}\" ]; then\n _${name.value}\nfi\n\\`; `}\n />\n <Spacing />\n <VarDeclaration\n export\n const\n name=\"SHELL_COMPLETIONS_DISPLAY\"\n initializer={code` SHELL_COMPLETIONS.split(\"\\\\n\").map(line => {\n if (!line.trim()) {\n return \"\";\n }\n if (line.trim().startsWith(\"#\")) {\n return \\`\\${dim(line)}\\`;\n }\n\n return white(line).replaceAll(/(?<=\\\\\\$(\\\\{|\\\\()).*(?=(\\\\}\\\\)))/g, green(\"$&\"))\n .replaceAll(/\\\\\".*\\\\\"/g, cyan(\"$&\"))\n .replaceAll(/(\\\\[|\\\\]|\\\\(|\\\\)|\\\\||<|>|\\\\$\\\\(|\\\\$?\\\\{|\\\\}|\\\\+|=|;|:)/g, bold(gray(\"$&\")))\n .replaceAll(/(readonly|complete)\\\\s+/g, green(\"$&\"))\n .replaceAll(/(?<=(readonly|complete)\\\\s+)\\\\w/g, bold(greenBright(\"$&\")))\n .replaceAll(/local\\\\s+/g, red(\"$&\"))\n .replaceAll(/(?<=local\\\\s+)\\\\w/g, bold(redBright(\"$&\")))\n .replaceAll(/(for|while)\\\\s+/g, cyan(\"$&\"))\n .replaceAll(/(?<=for|while\\\\s+)\\\\w/g, bold(cyanBright(\"$&\")))\n .replaceAll(/(return|if|fi|else|elif|then|done)\\\\s+/g, green(\"$&\"))\n .replaceAll(/__\\\\w/g, bold(magentaBright(\"$&\")))\n .replaceAll(/(?<=\\\\s)(-\\\\w|--\\\\w[\\\\w-]*)(?=\\\\s|$)/g, bold(magenta(\"$&\")));\n\n }).join(\"\\\\n\"); `}\n />\n </TypescriptFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAgCA,SAAE,uBAAA;CACF,MAAO,UAAS,eAAA;CACd,MAAM,MAAA,eAAU,UAAc,QAAA,CAAA;;AAE9B,QAAM,gBAAmB,gBAAY;EACrC,IAAM,OAAO;;;EAGX,gBAAC,EACC,SAAM;GAAA;GAAU;GAAQ;GAAW;GAAC;GAAe;GAAO;GAAW;GAAA;GAAA;GAAA;GAAA;GAAA,EACtE;EACD,IAAI,WAAS;AACX,UAAK;IAAA,gBAAM,SAAA,EAAA,CAAA;IAAA,gBAAA,gBAAA;KACT,SAAS;KACT,UAAO;KACP,MAAG;KACH,IAAG,cAAK;AACN,aAAM,IAAA,QAAA,KAAA,MAAA;;;;;;;GAOb,KAAK,MAAA;oCACA,oBAAA,yBAAA;sCACQ,oBAAA,2BAAA;yCACT,oBAAA,8BAAA;4CACC,oBAAA,iCAAA;yCACA,oBAAA,8BAAA;wCACuB,oBAAA,6BAAA;;;;;QAK3B,KAAA,MAAA;QACJ,KAAA,MAAA;;;;;;;QAOM,KAAA,MAAA;;;;QAIF,KAAA,MAAA;yDACuC,IAAA,MAAA;;;;;;;;;;;;;YAa/B,KAAC,MAAM;;;;;;;;mBAQA,aAAQ;;QAEvB,KAAS,MAAM;;;;QAIb,KAAA,MAAY;;;;;;;QAOZ,KAAO,MAAK;;;;;;;;;;YAUR,KAAA,MAAa;;;;;QAKf,KAAK,MAAM;;;;YAIP,KAAC,MAAM;;;;;;;;;;;gBAWH,KAAK,MAAA;;;;oBAIjB,KAAA,MAAA;;;;;;;;;;;;;;;;gBAgBM,KAAW,MAAI;;;;;;;;;;;gBAWT,KAAA,MAAA;;;;;;;YAOJ,KAAK,MAAC;;;;;YAKN,KAAK,MAAM;;;;;;;;;;;;;;;;;YAiBf,KAAA,MAAA;;;;;;;;;;gBAUA,KAAa,MAAA;;;;;;;;;;;YAWT,KAAA,MAAA;;gBAEJ,KAAA,MAAA;;;;;gBAKM,KAAA,MAAY;gBACX,KAAA,MAAW;;oBAEN,KAAC,MAAA;;;;;;;;oBAQP,KAAA,MAAA;;;;;;;;;;;;OAYP,KAAK,MAAE;;;;KAIP,CAAC;IAAE,gBAAiB,SAAQ,EAAA,CAAA;IAAA,gBAAyB,gBAAgB;KACpE,UAAU;KACV,SAAQ;;KAER,aAAU,IAAO;;;;;;;;;;;;;;;;;;;;;;KAsBlB,CAAA;IAAA;;EAEJ,CAAC"}
1
+ {"version":3,"file":"zsh-shared.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"complete-command.d.mts","names":[],"sources":["../../src/helpers/complete-command.ts"],"mappings":";cAsBa,YAAA"}
1
+ {"version":3,"file":"complete-command.d.mts","names":[],"sources":["../../src/helpers/complete-command.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"complete-command.mjs","names":[],"sources":["../../src/helpers/complete-command.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nfunction quoteIfNeeded(path: string): string {\n return path.includes(\" \") ? `'${path}'` : path;\n}\n\nexport const EXEC_COMMAND = `${quoteIfNeeded(process.execPath)} ${process.execArgv\n .map(quoteIfNeeded)\n .join(\" \")} ${process.argv.slice(1).map(quoteIfNeeded)[0]}`;\n"],"mappings":";AAkBA,SAAS,cAAc,MAAM;AAC3B,QAAO,KAAK,SAAS,IAAI,GAAG,IAAI,KAAK,KAAK"}
1
+ {"version":3,"file":"complete-command.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"completion-directive-constants.d.mts","names":[],"sources":["../../src/helpers/completion-directive-constants.ts"],"mappings":";cAkBa,mBAAA"}
1
+ {"version":3,"file":"completion-directive-constants.d.mts","names":[],"sources":["../../src/helpers/completion-directive-constants.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"completion-directive-constants.mjs","names":[],"sources":["../../src/helpers/completion-directive-constants.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const CompletionDirective = {\n CompletionDirectiveError: 1 << 0,\n CompletionDirectiveNoSpace: 1 << 1,\n CompletionDirectiveNoFileComp: 1 << 2,\n CompletionDirectiveFilterFileExt: 1 << 3,\n CompletionDirectiveFilterDirs: 1 << 4,\n CompletionDirectiveKeepOrder: 1 << 5,\n CompletionDirectiveMaxValue: 1 << 6,\n CompletionDirectiveDefault: 0\n};\n"],"mappings":";AAkBA,MAAa,sBAAsB;CACjC,0BAA0B;CAC1B,4BAA4B;CAC5B,+BAA+B;CAC/B,kCAAkC;CAClC,+BAA+B;CAC/B,8BAA8B;CAC9B,6BAA6B;CAC7B,4BAA4B;CAC7B"}
1
+ {"version":3,"file":"completion-directive-constants.mjs","names":[],"sources":[],"mappings":""}
package/dist/index.cjs CHANGED
@@ -23,8 +23,8 @@ let _stryke_path_join = require("@stryke/path/join");
23
23
  * The Completions - Shell Shock plugin to add completion commands to a Shell Shock application.
24
24
  */
25
25
  const plugin = (options = {}) => {
26
- return [{
27
- name: "shell-shock:completions",
26
+ return {
27
+ name: "shell-shock/completions",
28
28
  config() {
29
29
  this.debug("Providing default configuration for the Shell Shock `completions` plugin.");
30
30
  return { completions: {
@@ -47,8 +47,7 @@ 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,
51
- source: "completions-plugin"
50
+ virtual: true
52
51
  });
53
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.");
54
53
  else {
@@ -62,8 +61,7 @@ const plugin = (options = {}) => {
62
61
  title: "Completions - Bash",
63
62
  tags: ["Utility"],
64
63
  entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "index.ts") },
65
- isVirtual: true,
66
- source: "completions-plugin"
64
+ virtual: true
67
65
  });
68
66
  this.inputs.push({
69
67
  id: "completions-bash-script",
@@ -82,8 +80,7 @@ const plugin = (options = {}) => {
82
80
  file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "script", "index.ts"),
83
81
  input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "script", "command.ts") }
84
82
  },
85
- isVirtual: false,
86
- source: "completions-plugin"
83
+ virtual: false
87
84
  });
88
85
  this.inputs.push({
89
86
  id: "completions-bash-config",
@@ -102,8 +99,7 @@ const plugin = (options = {}) => {
102
99
  file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "config", "index.ts"),
103
100
  input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "bash", "config", "command.ts") }
104
101
  },
105
- isVirtual: false,
106
- source: "completions-plugin"
102
+ virtual: false
107
103
  });
108
104
  }
109
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.");
@@ -118,8 +114,7 @@ const plugin = (options = {}) => {
118
114
  title: "Completions - Zsh",
119
115
  tags: ["Utility"],
120
116
  entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "index.ts") },
121
- isVirtual: true,
122
- source: "completions-plugin"
117
+ virtual: true
123
118
  });
124
119
  this.inputs.push({
125
120
  id: "completions-zsh-script",
@@ -138,8 +133,7 @@ const plugin = (options = {}) => {
138
133
  file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "script", "index.ts"),
139
134
  input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "script", "command.ts") }
140
135
  },
141
- isVirtual: false,
142
- source: "completions-plugin"
136
+ virtual: false
143
137
  });
144
138
  this.inputs.push({
145
139
  id: "completions-zsh-config",
@@ -158,8 +152,7 @@ const plugin = (options = {}) => {
158
152
  file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "config", "index.ts"),
159
153
  input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "zsh", "config", "command.ts") }
160
154
  },
161
- isVirtual: false,
162
- source: "completions-plugin"
155
+ virtual: false
163
156
  });
164
157
  }
165
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.");
@@ -174,8 +167,7 @@ const plugin = (options = {}) => {
174
167
  title: "Completions - PowerShell",
175
168
  tags: ["Utility"],
176
169
  entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "index.ts") },
177
- isVirtual: true,
178
- source: "completions-plugin"
170
+ virtual: true
179
171
  });
180
172
  this.inputs.push({
181
173
  id: "completions-powershell-script",
@@ -194,8 +186,7 @@ const plugin = (options = {}) => {
194
186
  file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "script", "index.ts"),
195
187
  input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "script", "command.ts") }
196
188
  },
197
- isVirtual: false,
198
- source: "completions-plugin"
189
+ virtual: false
199
190
  });
200
191
  this.inputs.push({
201
192
  id: "completions-powershell-config",
@@ -214,8 +205,7 @@ const plugin = (options = {}) => {
214
205
  file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "config", "index.ts"),
215
206
  input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "powershell", "config", "command.ts") }
216
207
  },
217
- isVirtual: false,
218
- source: "completions-plugin"
208
+ virtual: false
219
209
  });
220
210
  }
221
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.");
@@ -230,8 +220,7 @@ const plugin = (options = {}) => {
230
220
  title: "Completions - Fish",
231
221
  tags: ["Utility"],
232
222
  entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "index.ts") },
233
- isVirtual: true,
234
- source: "completions-plugin"
223
+ virtual: true
235
224
  });
236
225
  this.inputs.push({
237
226
  id: "completions-fish-script",
@@ -250,8 +239,7 @@ const plugin = (options = {}) => {
250
239
  file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "script", "index.ts"),
251
240
  input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "script", "command.ts") }
252
241
  },
253
- isVirtual: false,
254
- source: "completions-plugin"
242
+ virtual: false
255
243
  });
256
244
  this.inputs.push({
257
245
  id: "completions-fish-config",
@@ -270,8 +258,7 @@ const plugin = (options = {}) => {
270
258
  file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "config", "index.ts"),
271
259
  input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "completions", "fish", "config", "command.ts") }
272
260
  },
273
- isVirtual: false,
274
- source: "completions-plugin"
261
+ virtual: false
275
262
  });
276
263
  }
277
264
  },
@@ -295,7 +282,7 @@ const plugin = (options = {}) => {
295
282
  ]);
296
283
  }
297
284
  }
298
- }];
285
+ };
299
286
  };
300
287
 
301
288
  //#endregion
package/dist/index.d.cts CHANGED
@@ -6,7 +6,7 @@ import { Plugin } from "powerlines";
6
6
  /**
7
7
  * The Completions - Shell Shock plugin to add completion commands to a Shell Shock application.
8
8
  */
9
- declare const plugin: <TContext extends CompletionsPluginContext = CompletionsPluginContext>(options?: CompletionsPluginOptions) => Plugin<TContext>[];
9
+ declare const plugin: <TContext extends CompletionsPluginContext = CompletionsPluginContext>(options?: CompletionsPluginOptions) => Plugin<TContext>;
10
10
  //#endregion
11
- export { CompletionsPluginContext, CompletionsPluginOptions, CompletionsPluginResolvedConfig, CompletionsPluginUserConfig, SHELL_TYPES, ShellType, plugin as default, plugin };
11
+ export { type CompletionsPluginContext, type CompletionsPluginOptions, type CompletionsPluginResolvedConfig, type CompletionsPluginUserConfig, type SHELL_TYPES, type ShellType, plugin as default, plugin };
12
12
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.mts CHANGED
@@ -6,7 +6,7 @@ import { Plugin } from "powerlines";
6
6
  /**
7
7
  * The Completions - Shell Shock plugin to add completion commands to a Shell Shock application.
8
8
  */
9
- declare const plugin: <TContext extends CompletionsPluginContext = CompletionsPluginContext>(options?: CompletionsPluginOptions) => Plugin<TContext>[];
9
+ declare const plugin: <TContext extends CompletionsPluginContext = CompletionsPluginContext>(options?: CompletionsPluginOptions) => Plugin<TContext>;
10
10
  //#endregion
11
- export { CompletionsPluginContext, CompletionsPluginOptions, CompletionsPluginResolvedConfig, CompletionsPluginUserConfig, SHELL_TYPES, ShellType, plugin as default, plugin };
11
+ export { type CompletionsPluginContext, type CompletionsPluginOptions, type CompletionsPluginResolvedConfig, type CompletionsPluginUserConfig, type SHELL_TYPES, type ShellType, plugin as default, plugin };
12
12
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;;;cA+Ca,MAAA,oBACM,wBAAA,GAA2B,wBAAA,EAE5C,OAAA,GAAS,wBAAA,KACR,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":""}
package/dist/index.mjs CHANGED
@@ -22,8 +22,8 @@ import { joinPaths } from "@stryke/path/join";
22
22
  * The Completions - Shell Shock plugin to add completion commands to a Shell Shock application.
23
23
  */
24
24
  const plugin = (options = {}) => {
25
- return [{
26
- name: "shell-shock:completions",
25
+ return {
26
+ name: "shell-shock/completions",
27
27
  config() {
28
28
  this.debug("Providing default configuration for the Shell Shock `completions` plugin.");
29
29
  return { completions: {
@@ -46,8 +46,7 @@ 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,
50
- source: "completions-plugin"
49
+ virtual: true
51
50
  });
52
51
  if (this.config.completions.shells.includes("bash")) if (this.inputs.some((input) => input.id === "completions-bash")) this.info("The `completions-bash` command already exists in the commands list. If you would like the completions-bash command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.");
53
52
  else {
@@ -61,8 +60,7 @@ const plugin = (options = {}) => {
61
60
  title: "Completions - Bash",
62
61
  tags: ["Utility"],
63
62
  entry: { file: joinPaths(this.entryPath, "completions", "bash", "index.ts") },
64
- isVirtual: true,
65
- source: "completions-plugin"
63
+ virtual: true
66
64
  });
67
65
  this.inputs.push({
68
66
  id: "completions-bash-script",
@@ -81,8 +79,7 @@ const plugin = (options = {}) => {
81
79
  file: joinPaths(this.entryPath, "completions", "bash", "script", "index.ts"),
82
80
  input: { file: joinPaths(this.entryPath, "completions", "bash", "script", "command.ts") }
83
81
  },
84
- isVirtual: false,
85
- source: "completions-plugin"
82
+ virtual: false
86
83
  });
87
84
  this.inputs.push({
88
85
  id: "completions-bash-config",
@@ -101,8 +98,7 @@ const plugin = (options = {}) => {
101
98
  file: joinPaths(this.entryPath, "completions", "bash", "config", "index.ts"),
102
99
  input: { file: joinPaths(this.entryPath, "completions", "bash", "config", "command.ts") }
103
100
  },
104
- isVirtual: false,
105
- source: "completions-plugin"
101
+ virtual: false
106
102
  });
107
103
  }
108
104
  if (this.config.completions.shells.includes("zsh")) if (this.inputs.some((input) => input.id === "completions-zsh")) this.info("The `completions-zsh` command already exists in the commands list. If you would like the completions-zsh command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.");
@@ -117,8 +113,7 @@ const plugin = (options = {}) => {
117
113
  title: "Completions - Zsh",
118
114
  tags: ["Utility"],
119
115
  entry: { file: joinPaths(this.entryPath, "completions", "zsh", "index.ts") },
120
- isVirtual: true,
121
- source: "completions-plugin"
116
+ virtual: true
122
117
  });
123
118
  this.inputs.push({
124
119
  id: "completions-zsh-script",
@@ -137,8 +132,7 @@ const plugin = (options = {}) => {
137
132
  file: joinPaths(this.entryPath, "completions", "zsh", "script", "index.ts"),
138
133
  input: { file: joinPaths(this.entryPath, "completions", "zsh", "script", "command.ts") }
139
134
  },
140
- isVirtual: false,
141
- source: "completions-plugin"
135
+ virtual: false
142
136
  });
143
137
  this.inputs.push({
144
138
  id: "completions-zsh-config",
@@ -157,8 +151,7 @@ const plugin = (options = {}) => {
157
151
  file: joinPaths(this.entryPath, "completions", "zsh", "config", "index.ts"),
158
152
  input: { file: joinPaths(this.entryPath, "completions", "zsh", "config", "command.ts") }
159
153
  },
160
- isVirtual: false,
161
- source: "completions-plugin"
154
+ virtual: false
162
155
  });
163
156
  }
164
157
  if (this.config.completions.shells.includes("powershell")) if (this.inputs.some((input) => input.id === "completions-powershell")) this.info("The `completions-powershell` command already exists in the commands list. If you would like the completions-powershell command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.");
@@ -173,8 +166,7 @@ const plugin = (options = {}) => {
173
166
  title: "Completions - PowerShell",
174
167
  tags: ["Utility"],
175
168
  entry: { file: joinPaths(this.entryPath, "completions", "powershell", "index.ts") },
176
- isVirtual: true,
177
- source: "completions-plugin"
169
+ virtual: true
178
170
  });
179
171
  this.inputs.push({
180
172
  id: "completions-powershell-script",
@@ -193,8 +185,7 @@ const plugin = (options = {}) => {
193
185
  file: joinPaths(this.entryPath, "completions", "powershell", "script", "index.ts"),
194
186
  input: { file: joinPaths(this.entryPath, "completions", "powershell", "script", "command.ts") }
195
187
  },
196
- isVirtual: false,
197
- source: "completions-plugin"
188
+ virtual: false
198
189
  });
199
190
  this.inputs.push({
200
191
  id: "completions-powershell-config",
@@ -213,8 +204,7 @@ const plugin = (options = {}) => {
213
204
  file: joinPaths(this.entryPath, "completions", "powershell", "config", "index.ts"),
214
205
  input: { file: joinPaths(this.entryPath, "completions", "powershell", "config", "command.ts") }
215
206
  },
216
- isVirtual: false,
217
- source: "completions-plugin"
207
+ virtual: false
218
208
  });
219
209
  }
220
210
  if (this.config.completions.shells.includes("fish")) if (this.inputs.some((input) => input.id === "completions-fish")) this.info("The `completions-fish` command already exists in the commands list. If you would like the completions-fish command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.");
@@ -229,8 +219,7 @@ const plugin = (options = {}) => {
229
219
  title: "Completions - Fish",
230
220
  tags: ["Utility"],
231
221
  entry: { file: joinPaths(this.entryPath, "completions", "fish", "index.ts") },
232
- isVirtual: true,
233
- source: "completions-plugin"
222
+ virtual: true
234
223
  });
235
224
  this.inputs.push({
236
225
  id: "completions-fish-script",
@@ -249,8 +238,7 @@ const plugin = (options = {}) => {
249
238
  file: joinPaths(this.entryPath, "completions", "fish", "script", "index.ts"),
250
239
  input: { file: joinPaths(this.entryPath, "completions", "fish", "script", "command.ts") }
251
240
  },
252
- isVirtual: false,
253
- source: "completions-plugin"
241
+ virtual: false
254
242
  });
255
243
  this.inputs.push({
256
244
  id: "completions-fish-config",
@@ -269,8 +257,7 @@ const plugin = (options = {}) => {
269
257
  file: joinPaths(this.entryPath, "completions", "fish", "config", "index.ts"),
270
258
  input: { file: joinPaths(this.entryPath, "completions", "fish", "config", "command.ts") }
271
259
  },
272
- isVirtual: false,
273
- source: "completions-plugin"
260
+ virtual: false
274
261
  });
275
262
  }
276
263
  },
@@ -294,7 +281,7 @@ const plugin = (options = {}) => {
294
281
  ]);
295
282
  }
296
283
  }
297
- }];
284
+ };
298
285
  };
299
286
 
300
287
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport { getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport type { Plugin } from \"powerlines\";\nimport {\n BashCompletionsShared,\n BashConfigCompletionsCommand,\n BashScriptCompletionsCommand,\n FishCompletionsShared,\n FishConfigCompletionsCommand,\n FishScriptCompletionsCommand,\n PowerShellCompletionsShared,\n PowerShellConfigCompletionsCommand,\n PowerShellScriptCompletionsCommand,\n ZshCompletionsShared,\n ZshConfigCompletionsCommand,\n ZshScriptCompletionsCommand\n} from \"./components\";\nimport type {\n CompletionsPluginContext,\n CompletionsPluginOptions\n} from \"./types/plugin\";\nimport { SHELL_TYPES } from \"./types/shell-type\";\n\nexport type * from \"./types\";\n\n/**\n * The Completions - Shell Shock plugin to add completion commands to a Shell Shock application.\n */\nexport const plugin = <\n TContext extends CompletionsPluginContext = CompletionsPluginContext\n>(\n options: CompletionsPluginOptions = {}\n): Plugin<TContext>[] => {\n return [\n {\n name: \"shell-shock:completions\",\n config() {\n this.debug(\n \"Providing default configuration for the Shell Shock `completions` plugin.\"\n );\n\n return {\n completions: { shells: [...SHELL_TYPES], ...options }\n };\n },\n configResolved() {\n this.debug(\n \"Adding the CLI completion commands to the application context.\"\n );\n\n this.inputs ??= [];\n if (this.inputs.some(input => input.id === \"completions\")) {\n this.info(\n \"The `completions` command already exists in the commands list. If you would like the completions command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.\"\n );\n } else {\n this.inputs.push({\n id: \"completions\",\n name: \"completions\",\n alias: [\"completion\"],\n path: \"completions\",\n segments: [\"completions\"],\n title: \"Completions\",\n icon: \"🖵\",\n tags: [\"Utility\"],\n description: `Commands for generating shell completion scripts for ${getAppTitle(\n this\n )}.`,\n entry: {\n file: joinPaths(this.entryPath, \"completions\", \"index.ts\")\n },\n isVirtual: true,\n source: \"completions-plugin\"\n });\n }\n\n if (this.config.completions.shells.includes(\"bash\")) {\n if (this.inputs.some(input => input.id === \"completions-bash\")) {\n this.info(\n \"The `completions-bash` command already exists in the commands list. If you would like the completions-bash command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.\"\n );\n } else {\n this.inputs.push({\n id: \"completions-bash\",\n name: \"bash\",\n description: `Commands to setup bash completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/bash\",\n segments: [\"completions\", \"bash\"],\n title: \"Completions - Bash\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"index.ts\"\n )\n },\n isVirtual: true,\n source: \"completions-plugin\"\n });\n this.inputs.push({\n id: \"completions-bash-script\",\n name: \"script\",\n description: `Generate a bash completion script for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/bash/script\",\n segments: [\"completions\", \"bash\", \"script\"],\n title: \"Completions - Bash Script\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"script\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"script\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false,\n source: \"completions-plugin\"\n });\n this.inputs.push({\n id: \"completions-bash-config\",\n name: \"config\",\n description: `Update the current system's bash shell configuration to include completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/bash/config\",\n segments: [\"completions\", \"bash\", \"config\"],\n title: \"Completions - Bash Configuration\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"config\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"bash\",\n \"config\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false,\n source: \"completions-plugin\"\n });\n }\n }\n\n if (this.config.completions.shells.includes(\"zsh\")) {\n if (this.inputs.some(input => input.id === \"completions-zsh\")) {\n this.info(\n \"The `completions-zsh` command already exists in the commands list. If you would like the completions-zsh command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.\"\n );\n } else {\n this.inputs.push({\n id: \"completions-zsh\",\n name: \"zsh\",\n description: `Commands to setup Zsh completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/zsh\",\n segments: [\"completions\", \"zsh\"],\n title: \"Completions - Zsh\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"index.ts\"\n )\n },\n isVirtual: true,\n source: \"completions-plugin\"\n });\n this.inputs.push({\n id: \"completions-zsh-script\",\n name: \"script\",\n description: `Generate a Zsh completion script for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/zsh/script\",\n segments: [\"completions\", \"zsh\", \"script\"],\n title: \"Completions - Zsh Script\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"script\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"script\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false,\n source: \"completions-plugin\"\n });\n this.inputs.push({\n id: \"completions-zsh-config\",\n name: \"config\",\n description: `Update the current system's Zsh shell configuration to include completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/zsh/config\",\n segments: [\"completions\", \"zsh\", \"config\"],\n title: \"Completions - Zsh Configuration\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"config\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"zsh\",\n \"config\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false,\n source: \"completions-plugin\"\n });\n }\n }\n\n if (this.config.completions.shells.includes(\"powershell\")) {\n if (\n this.inputs.some(input => input.id === \"completions-powershell\")\n ) {\n this.info(\n \"The `completions-powershell` command already exists in the commands list. If you would like the completions-powershell command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.\"\n );\n } else {\n this.inputs.push({\n id: \"completions-powershell\",\n name: \"powershell\",\n description: `Commands to setup PowerShell completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/powershell\",\n segments: [\"completions\", \"powershell\"],\n title: \"Completions - PowerShell\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"powershell\",\n \"index.ts\"\n )\n },\n isVirtual: true,\n source: \"completions-plugin\"\n });\n this.inputs.push({\n id: \"completions-powershell-script\",\n name: \"script\",\n description: `Generate a PowerShell completion script for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/powershell/script\",\n segments: [\"completions\", \"powershell\", \"script\"],\n title: \"Completions - PowerShell Script\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"powershell\",\n \"script\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"powershell\",\n \"script\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false,\n source: \"completions-plugin\"\n });\n this.inputs.push({\n id: \"completions-powershell-config\",\n name: \"config\",\n description: `Update the current system's PowerShell configuration to include completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/powershell/config\",\n segments: [\"completions\", \"powershell\", \"config\"],\n title: \"Completions - PowerShell Configuration\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"powershell\",\n \"config\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"powershell\",\n \"config\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false,\n source: \"completions-plugin\"\n });\n }\n }\n\n if (this.config.completions.shells.includes(\"fish\")) {\n if (this.inputs.some(input => input.id === \"completions-fish\")) {\n this.info(\n \"The `completions-fish` command already exists in the commands list. If you would like the completions-fish command to be managed by the `@shell-shock/plugin-completions` package, please remove or rename the command.\"\n );\n } else {\n this.inputs.push({\n id: \"completions-fish\",\n name: \"fish\",\n description: `Commands to setup Fish completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/fish\",\n segments: [\"completions\", \"fish\"],\n title: \"Completions - Fish\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"fish\",\n \"index.ts\"\n )\n },\n isVirtual: true,\n source: \"completions-plugin\"\n });\n this.inputs.push({\n id: \"completions-fish-script\",\n name: \"script\",\n description: `Generate a Fish completion script for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/fish/script\",\n segments: [\"completions\", \"fish\", \"script\"],\n title: \"Completions - Fish Script\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"fish\",\n \"script\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"fish\",\n \"script\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false,\n source: \"completions-plugin\"\n });\n this.inputs.push({\n id: \"completions-fish-config\",\n name: \"config\",\n description: `Update the current system's Fish shell configuration to include completions for the ${getAppTitle(\n this,\n true\n )} command-line interface.`,\n alias: [],\n path: \"completions/fish/config\",\n segments: [\"completions\", \"fish\", \"config\"],\n title: \"Completions - Fish Configuration\",\n tags: [\"Utility\"],\n entry: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"fish\",\n \"config\",\n \"index.ts\"\n ),\n input: {\n file: joinPaths(\n this.entryPath,\n \"completions\",\n \"fish\",\n \"config\",\n \"command.ts\"\n )\n }\n },\n isVirtual: false,\n source: \"completions-plugin\"\n });\n }\n }\n },\n prepare: {\n order: \"pre\",\n async handler() {\n this.debug(\n \"Rendering command handling modules for the Shell Shock `completions` plugin.\"\n );\n\n return render(\n this,\n <>\n <BashCompletionsShared />\n <BashScriptCompletionsCommand />\n <BashConfigCompletionsCommand />\n <ZshCompletionsShared />\n <ZshScriptCompletionsCommand />\n <ZshConfigCompletionsCommand />\n <PowerShellCompletionsShared />\n <PowerShellScriptCompletionsCommand />\n <PowerShellConfigCompletionsCommand />\n <FishCompletionsShared />\n <FishScriptCompletionsCommand />\n <FishConfigCompletionsCommand />\n </>\n );\n }\n }\n }\n ];\n};\n\nexport default plugin;\n"],"mappings":"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"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;UAyBiB,wBAAA;;AAAjB;;;;;AAcA;;;;EAHE,MAAA,GAAS,SAAA;AAAA;AAAA,KAGC,2BAAA,GAA8B,UAAA;EAInB;;;EAArB,WAAA,EAAa,QAAA,CAAS,wBAAA;AAAA;AAAA,KAGZ,+BAAA,GAAkC,cAAA;EAHE;AAGhD;;EAIE,WAAA,EAAa,QAAA,CAAS,wBAAA;AAAA;AAAA,KAGZ,wBAAA,yBACc,+BAAA,GACtB,+BAAA,IACA,OAAA,CAAQ,eAAA"}
1
+ {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;UAyBiB,wBAAA;;AAAjB;;;;AAWoB;AAGpB;;;;EAHE,MAAA,GAAS,SAAS;AAAA;AAAA,KAGR,2BAAA,GAA8B,UAAA;EAInB;;;EAArB,WAAA,EAAa,QAAA,CAAS,wBAAA;AAAA;AAAA,KAGZ,+BAAA,GAAkC,cAAA;EAHE;AAGhD;;EAIE,WAAA,EAAa,QAAA,CAAS,wBAAA;AAAA;AAAA,KAGZ,wBAAA,yBACc,+BAAA,GACtB,+BAAA,IACA,OAAA,CAAQ,eAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;UAyBiB,wBAAA;;AAAjB;;;;;AAcA;;;;EAHE,MAAA,GAAS,SAAA;AAAA;AAAA,KAGC,2BAAA,GAA8B,UAAA;EAInB;;;EAArB,WAAA,EAAa,QAAA,CAAS,wBAAA;AAAA;AAAA,KAGZ,+BAAA,GAAkC,cAAA;EAHE;AAGhD;;EAIE,WAAA,EAAa,QAAA,CAAS,wBAAA;AAAA;AAAA,KAGZ,wBAAA,yBACc,+BAAA,GACtB,+BAAA,IACA,OAAA,CAAQ,eAAA"}
1
+ {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"shell-type.d.cts","names":[],"sources":["../../src/types/shell-type.ts"],"mappings":";KAkBY,SAAA;AAAA,cAEC,WAAA,WAAsB,SAAA"}
1
+ {"version":3,"file":"shell-type.d.cts","names":[],"sources":["../../src/types/shell-type.ts"],"mappings":";KAkBY,SAAA;AAAA,cAEC,WAAA,WAAsB,SAAS"}
@@ -1 +1 @@
1
- {"version":3,"file":"shell-type.d.mts","names":[],"sources":["../../src/types/shell-type.ts"],"mappings":";KAkBY,SAAA;AAAA,cAEC,WAAA,WAAsB,SAAA"}
1
+ {"version":3,"file":"shell-type.d.mts","names":[],"sources":["../../src/types/shell-type.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"shell-type.mjs","names":[],"sources":["../../src/types/shell-type.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport type ShellType = \"bash\" | \"fish\" | \"zsh\" | \"powershell\";\n\nexport const SHELL_TYPES: readonly ShellType[] = [\n \"bash\",\n \"fish\",\n \"zsh\",\n \"powershell\"\n] as const;\n"],"mappings":";AAkBA,MAAY,cAAa;CAAA;CAAS;CAAS;CAAQ;CAAW"}
1
+ {"version":3,"file":"shell-type.mjs","names":[],"sources":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shell-shock/plugin-completions",
3
- "version": "0.4.18",
3
+ "version": "0.4.20",
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": {
@@ -333,19 +333,19 @@
333
333
  "storm-software"
334
334
  ],
335
335
  "dependencies": {
336
- "@alloy-js/core": "0.23.0-dev.8",
337
- "@alloy-js/typescript": "0.23.0-dev.4",
338
- "@powerlines/deepkit": "^0.8.64",
339
- "@powerlines/plugin-alloy": "^0.26.84",
340
- "@powerlines/plugin-plugin": "^0.12.416",
341
- "@shell-shock/core": "^0.17.10",
342
- "@stryke/path": "^0.28.2",
343
- "@stryke/string-format": "^0.17.13",
344
- "powerlines": "^0.47.4"
336
+ "@alloy-js/core": "^0.23.1",
337
+ "@alloy-js/typescript": "^0.23.0",
338
+ "@powerlines/deepkit": "^0.9.80",
339
+ "@powerlines/plugin-alloy": "^0.26.219",
340
+ "@powerlines/plugin-plugin": "^0.12.538",
341
+ "@shell-shock/core": "0.17.12",
342
+ "@stryke/path": "^0.29.11",
343
+ "@stryke/string-format": "^0.17.26",
344
+ "powerlines": "^0.47.126"
345
345
  },
346
346
  "devDependencies": {
347
- "@powerlines/plugin-deepkit": "^0.11.347",
348
- "@types/node": "^25.6.0"
347
+ "@powerlines/plugin-deepkit": "^0.11.469",
348
+ "@types/node": "^25.9.1"
349
349
  },
350
350
  "publishConfig": {
351
351
  "access": "public",
@@ -362,5 +362,5 @@
362
362
  "./package.json": "./package.json"
363
363
  }
364
364
  },
365
- "gitHead": "7b4030fd6be000c960e8cc4c4f7b4db205054e69"
365
+ "gitHead": "3c10901dd3fbbc3c9d6d1a3373f01cc5f56d3321"
366
366
  }