@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
@@ -3,7 +3,6 @@ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
3
3
  let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
4
4
  let _alloy_js_core = require("@alloy-js/core");
5
5
  let _alloy_js_typescript = require("@alloy-js/typescript");
6
- let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
7
6
  let _powerlines_plugin_alloy_core = require("@powerlines/plugin-alloy/core");
8
7
  let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
9
8
  let _powerlines_plugin_alloy_typescript = require("@powerlines/plugin-alloy/typescript");
@@ -37,7 +36,7 @@ function BashConfigCompletionsCommand() {
37
36
  get children() {
38
37
  return [
39
38
  (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, { heading: "Options for the Bash Completions - Configuration command." }),
40
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceDeclaration, {
39
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript.InterfaceDeclaration, {
41
40
  "export": true,
42
41
  name: "BashConfigCompletionsOptions",
43
42
  get children() {
@@ -45,15 +44,12 @@ function BashConfigCompletionsCommand() {
45
44
  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.",
46
45
  get children() {
47
46
  return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocDefaultValue, {
48
- get type() {
49
- return _powerlines_deepkit_vendor_type.ReflectionKind.boolean;
50
- },
47
+ type: "boolean",
51
48
  defaultValue: false
52
49
  });
53
50
  }
54
51
  }), (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript.InterfaceMember, {
55
52
  name: "display",
56
- optional: true,
57
53
  type: "boolean"
58
54
  })];
59
55
  }
@@ -1,10 +1,8 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
-
3
1
  //#region src/components/bash-config-command.d.ts
4
2
  /**
5
3
  * The Bash Completions - Configuration command's handler wrapper for the Shell Shock project.
6
4
  */
7
- declare function BashConfigCompletionsCommand(): _$_alloy_js_core0.Children;
5
+ declare function BashConfigCompletionsCommand(): import("@alloy-js/core").Children;
8
6
  //#endregion
9
7
  export { BashConfigCompletionsCommand };
10
8
  //# sourceMappingURL=bash-config-command.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bash-config-command.d.cts","names":[],"sources":["../../src/components/bash-config-command.tsx"],"mappings":";;;;;;iBA4CgB,4BAAA,CAAA,GAA4B,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"bash-config-command.d.cts","names":[],"sources":["../../src/components/bash-config-command.tsx"],"mappings":";;AA2CA;;iBAAgB,4BAAA,6BAA4B,QAAA"}
@@ -1,10 +1,8 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
-
3
1
  //#region src/components/bash-config-command.d.ts
4
2
  /**
5
3
  * The Bash Completions - Configuration command's handler wrapper for the Shell Shock project.
6
4
  */
7
- declare function BashConfigCompletionsCommand(): _$_alloy_js_core0.Children;
5
+ declare function BashConfigCompletionsCommand(): import("@alloy-js/core").Children;
8
6
  //#endregion
9
7
  export { BashConfigCompletionsCommand };
10
8
  //# sourceMappingURL=bash-config-command.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bash-config-command.d.mts","names":[],"sources":["../../src/components/bash-config-command.tsx"],"mappings":";;;;;;iBA4CgB,4BAAA,CAAA,GAA4B,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"bash-config-command.d.mts","names":[],"sources":["../../src/components/bash-config-command.tsx"],"mappings":""}
@@ -1,11 +1,10 @@
1
1
  import { createComponent, memo } from "@alloy-js/core/jsx-runtime";
2
2
  import { getAppTitle } from "@shell-shock/core/plugin-utils";
3
3
  import { code } 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
 
@@ -36,7 +35,7 @@ function BashConfigCompletionsCommand() {
36
35
  get children() {
37
36
  return [
38
37
  createComponent(TSDoc$1, { heading: "Options for the Bash Completions - Configuration command." }),
39
- createComponent(InterfaceDeclaration, {
38
+ createComponent(InterfaceDeclaration$1, {
40
39
  "export": true,
41
40
  name: "BashConfigCompletionsOptions",
42
41
  get children() {
@@ -44,15 +43,12 @@ function BashConfigCompletionsCommand() {
44
43
  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.",
45
44
  get children() {
46
45
  return createComponent(TSDocDefaultValue$1, {
47
- get type() {
48
- return ReflectionKind.boolean;
49
- },
46
+ type: "boolean",
50
47
  defaultValue: false
51
48
  });
52
49
  }
53
- }), createComponent(InterfaceMember$1, {
50
+ }), createComponent(InterfaceMember, {
54
51
  name: "display",
55
- optional: true,
56
52
  type: "boolean"
57
53
  })];
58
54
  }
@@ -1 +1 @@
1
- {"version":3,"file":"bash-config-command.mjs","names":[],"sources":["../../src/components/bash-config-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 } 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 { getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { joinPaths } from \"@stryke/path\";\nimport type { CompletionsPluginContext } from \"../types/plugin\";\n\n/**\n * The Bash Completions - Configuration command's handler wrapper for the Shell Shock project.\n */\nexport function BashConfigCompletionsCommand() {\n const context = usePowerlines<CompletionsPluginContext>();\n\n return (\n <TypescriptFile\n path={joinPaths(\n context.entryPath,\n \"completions\",\n \"bash\",\n \"config\",\n \"command.ts\"\n )}\n imports={{\n \"node:os\": \"os\",\n \"node:path\": [\"join\"],\n \"node:fs/promises\": [\"readFile\", \"writeFile\"],\n \"../shared\": [\"SHELL_COMPLETIONS_DISPLAY\", \"SHELL_COMPLETIONS\"]\n }}\n builtinImports={{\n console: [\"bold\", \"inlineCode\", \"writeLine\", \"success\", \"warn\", \"help\"]\n }}>\n <TSDoc heading=\"Options for the Bash Completions - Configuration command.\" />\n <InterfaceDeclaration export name=\"BashConfigCompletionsOptions\">\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 bash config\\` command.\"></TSDoc>\n <FunctionDeclaration\n export\n default\n async\n name=\"handler\"\n parameters={[\n {\n name: \"options\",\n type: \"BashConfigCompletionsOptions\",\n default: \"{}\"\n },\n {\n name: \"path\",\n type: \"string\",\n default: `\"~/.bashrc\"`\n }\n ]}>\n <IfStatement condition={code`options.display !== true`}>\n <VarDeclaration\n let\n name=\"configPath\"\n type=\"string\"\n initializer={code` path.includes(\".\") ? path : join(path, \".bashrc\");`}\n />\n <Spacing />\n <IfStatement condition={code`configPath.startsWith(\"~\")`}>\n {code`configPath = join(os.homedir(), configPath.replace(\"~\", \"\")); `}\n </IfStatement>\n <Spacing />\n <VarDeclaration\n let\n name=\"content\"\n type=\"string\"\n initializer={code`\"\";`}\n />\n <Spacing />\n {code`try {\n content = await readFile(configPath, \"utf8\");\n } catch (error) {\n if (typeof error === \"object\" && error !== null && \"code\" in error && error.code === \"ENOENT\") {\n // If the file doesn't exist, we can create it later when writing the completion script.\n warn(\\`Configuration file \\${bold(configPath)} does not exist. It will be created when the completion script is written.\\`);\n } else {\n return { error };\n }\n }\n\n await writeFile(configPath, \\`\\${content}\\\\n\\\\n### Begin - ${getAppTitle(context)} Shell Completions ###\\\\n\\\\n\\${SHELL_COMPLETIONS} \\\\n\\\\n### End - ${getAppTitle(\n context\n )} Bash Completions ###\\`);\n\n success(\\`${getAppTitle(\n context\n )} shell completions have been applied to Bash configuration file at \\${bold(configPath)}. Please restart your terminal or run \\${inlineCode(\\`source \\${configPath}\\`)} for the changes to take effect.\\`); `}\n </IfStatement>\n <ElseClause>\n {code`writeLine(\" ------------------------------------------------- \");\n writeLine(\"\");\n writeLine(\\`### Begin - ${getAppTitle(context)} Bash Completions ###\\`);\n writeLine(\"\");\n SHELL_COMPLETIONS_DISPLAY.split(\"\\\\n\").map(line => writeLine(line));\n writeLine(\"\");\n writeLine(\\`### End - ${getAppTitle(context)} Bash Completions ###\\`);\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., ~/.bashrc)\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":";;;;;;;;;;;;;;;AA+BA,SAAE,+BAAA;CACA,MAAM,UAAC,eAAwB;AACjC,QAAO,gBAAA,gBAAA;EACL,IAAK,OAAA;AACL,UAAA,UAAA,QAAA,WAAA,eAAA,QAAA,UAAA,aAAA;;EAEF,SAAS;GACH,WAAG;GACH,aAAQ,CAAA,OAAA;;GAEZ,aAAA,CAAA,6BAAA,oBAAA;GACC;EACD,gBAAA,EACI,SAAS;GAAC;GAAA;GAAA;GAA+B;GAAA;GAAA;GAAA,EAC7C;;AAEA,UAAO;IAAA,gBAAA,SAAA,EACJ,SAAA,6DACC,CAAA;IAAI,gBAAW,sBAAA;KACb,UAAQ;KACR,MAAC;KACD,IAAC,WAAK;AACL,aAAO,CAAA,gBAAA,SAAA;OACP,SAAU;OACZ,IAAA,WAAA;AACO,eAAC,gBAAA,qBAAA;SACC,IAAI,OAAG;AACL,iBAAK,eAAM;;SAEjB,cAAW;SAChB,CAAA;;OAEC,CAAA,EAAA,gBAAmB,mBAAc;OACjC,MAAA;OACI,UAAU;OACf,MAAA;OACE,CAAA,CAAA;;KAEF,CAAC;IAAE,gBAAQ,SAAe,EAAA,CAAO;IAAA,gBAAA,SAAA,EAChC,SAAI,gEACL,CAAC;IAAE,gBAAC,qBAAA;KACH,UAAO;KACP,WAAC;KACD,OAAA;KACD,MAAO;KACP,YAAa,CAAC;MACd,MAAA;MACC,MAAA;MACA,SAAA;MACA,EAAA;MACA,MAAM;MACN,MAAA;MACE,SAAA;MACD,CAAC;KACF,IAAI,WAAO;AACT,aAAE,CAAA,gBAAY,aAAA;OACb,WAAA,IAAA;OACD,IAAA,WAAA;AACE,eAAO;SAAA,gBAAK,gBAAA;UACR,OAAG;UACP,MAAU;UACZ,MAAA;UACA,aAAA,IAAA;UACD,CAAA;SAAA,gBAA2B,SAAS,EAAA,CAAA;SAAA,gBAAkB,aAAA;UACpD,WAAA,IAAA;UACC,UAAA,IAAA;UACA,CAAI;SAAE,gBAAU,SAAA,EAAA,CAAA;SAAA,gBAAA,gBAAA;UACZ,OAAE;UACN,MAAA;UACD,MAAA;UACA,aAAS,IAAA;UACT,CAAA;SAAA,gBAAuB,SAAK,EAAA,CAAA;SAAW,WAAa,IAAI;;;;;;;;;;;uEAW/C,YAAA,QAAA,CAAA,oEAAA,YAAA,QAAA,CAAA;;sBAED,YAAO,QAAA,CAAA,6MAAA;SAAA;;OAEf,CAAC,EAAE,gBAAe,YAAe,EAChC,IAAE,WAAO;AACP,cAAK,IAAA;;oCAEP,YAAA,QAAA,CAAA;;;;kCAIA,YAAA,QAAA,CAAA;;;;;;;;;SAUF,CAAA,CAAA;;KAEH,CAAC;IAAC;;EAEN,CAAC"}
1
+ {"version":3,"file":"bash-config-command.mjs","names":[],"sources":[],"mappings":""}
@@ -3,7 +3,6 @@ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
3
3
  let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
4
4
  let _alloy_js_core = require("@alloy-js/core");
5
5
  let _alloy_js_typescript = require("@alloy-js/typescript");
6
- let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
7
6
  let _powerlines_plugin_alloy_core = require("@powerlines/plugin-alloy/core");
8
7
  let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
9
8
  let _powerlines_plugin_alloy_typescript = require("@powerlines/plugin-alloy/typescript");
@@ -37,7 +36,7 @@ function BashScriptCompletionsCommand() {
37
36
  get children() {
38
37
  return [
39
38
  (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, { heading: "Options for the Bash Completions - Script command." }),
40
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceDeclaration, {
39
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript.InterfaceDeclaration, {
41
40
  "export": true,
42
41
  name: "BashScriptCompletionsOptions",
43
42
  get children() {
@@ -45,15 +44,12 @@ function BashScriptCompletionsCommand() {
45
44
  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.",
46
45
  get children() {
47
46
  return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocDefaultValue, {
48
- get type() {
49
- return _powerlines_deepkit_vendor_type.ReflectionKind.boolean;
50
- },
47
+ type: "boolean",
51
48
  defaultValue: false
52
49
  });
53
50
  }
54
51
  }), (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript.InterfaceMember, {
55
52
  name: "display",
56
- optional: true,
57
53
  type: "boolean"
58
54
  })];
59
55
  }
@@ -1,10 +1,8 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
-
3
1
  //#region src/components/bash-script-command.d.ts
4
2
  /**
5
3
  * The Bash Completions - Script command's handler wrapper for the Shell Shock project.
6
4
  */
7
- declare function BashScriptCompletionsCommand(): _$_alloy_js_core0.Children;
5
+ declare function BashScriptCompletionsCommand(): import("@alloy-js/core").Children;
8
6
  //#endregion
9
7
  export { BashScriptCompletionsCommand };
10
8
  //# sourceMappingURL=bash-script-command.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bash-script-command.d.cts","names":[],"sources":["../../src/components/bash-script-command.tsx"],"mappings":";;;;;;iBA4CgB,4BAAA,CAAA,GAA4B,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"bash-script-command.d.cts","names":[],"sources":["../../src/components/bash-script-command.tsx"],"mappings":";;AA2CA;;iBAAgB,4BAAA,6BAA4B,QAAA"}
@@ -1,10 +1,8 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
-
3
1
  //#region src/components/bash-script-command.d.ts
4
2
  /**
5
3
  * The Bash Completions - Script command's handler wrapper for the Shell Shock project.
6
4
  */
7
- declare function BashScriptCompletionsCommand(): _$_alloy_js_core0.Children;
5
+ declare function BashScriptCompletionsCommand(): import("@alloy-js/core").Children;
8
6
  //#endregion
9
7
  export { BashScriptCompletionsCommand };
10
8
  //# sourceMappingURL=bash-script-command.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bash-script-command.d.mts","names":[],"sources":["../../src/components/bash-script-command.tsx"],"mappings":";;;;;;iBA4CgB,4BAAA,CAAA,GAA4B,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"bash-script-command.d.mts","names":[],"sources":["../../src/components/bash-script-command.tsx"],"mappings":""}
@@ -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
 
@@ -36,7 +35,7 @@ function BashScriptCompletionsCommand() {
36
35
  get children() {
37
36
  return [
38
37
  createComponent(TSDoc$1, { heading: "Options for the Bash Completions - Script command." }),
39
- createComponent(InterfaceDeclaration, {
38
+ createComponent(InterfaceDeclaration$1, {
40
39
  "export": true,
41
40
  name: "BashScriptCompletionsOptions",
42
41
  get children() {
@@ -44,15 +43,12 @@ function BashScriptCompletionsCommand() {
44
43
  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.",
45
44
  get children() {
46
45
  return createComponent(TSDocDefaultValue$1, {
47
- get type() {
48
- return ReflectionKind.boolean;
49
- },
46
+ type: "boolean",
50
47
  defaultValue: false
51
48
  });
52
49
  }
53
- }), createComponent(InterfaceMember$1, {
50
+ }), createComponent(InterfaceMember, {
54
51
  name: "display",
55
- optional: true,
56
52
  type: "boolean"
57
53
  })];
58
54
  }
@@ -1 +1 @@
1
- {"version":3,"file":"bash-script-command.mjs","names":[],"sources":["../../src/components/bash-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 type { CompletionsPluginContext } from \"../types/plugin\";\n\n/**\n * The Bash Completions - Script command's handler wrapper for the Shell Shock project.\n */\nexport function BashScriptCompletionsCommand() {\n const context = usePowerlines<CompletionsPluginContext>();\n\n const bin = computed(() => getAppBin(context));\n\n return (\n <TypescriptFile\n path={joinPaths(\n context.entryPath,\n \"completions\",\n \"bash\",\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 Bash Completions - Script command.\" />\n <InterfaceDeclaration export name=\"BashScriptCompletionsOptions\">\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 bash script\\` command.\"></TSDoc>\n <FunctionDeclaration\n export\n default\n async\n name=\"handler\"\n parameters={[\n {\n name: \"options\",\n type: \"BashScriptCompletionsOptions\",\n default: \"{}\"\n },\n {\n name: \"path\",\n type: \"string\",\n default: `\"./${bin.value}-completions.bash\"`\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}.bash\\` : path;`}\n />\n {code`\n await writeFile(scriptPath, \\`# Bash script to add completions for ${getAppTitle(context)}\\\\n\\\\n\\${SHELL_COMPLETIONS}\\`);\n\n success(\\`${getAppTitle(\n context\n )} Bash completion script has been generated at \\${bold(scriptPath)}.\\`); `}\n </IfStatement>\n <ElseClause>\n {code`writeLine(\" ------------------------------------------------- \");\n writeLine(\"\");\n writeLine(\\`# Bash 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., ~/.bashrc)\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":";;;;;;;;;;;;;;;AA+BA,SAAE,+BAAA;CACA,MAAM,UAAC,eAAwB;CACjC,MAAO,MAAA,eAAA,UAAA,QAAA,CAAA;AACL,QAAK,gBAAA,gBAAA;EACL,IAAA,OAAA;AACI,UAAG,UAAW,QAAO,WAAM,eAAsB,QAAM,UAAA,aAAA;;EAE7D,SAAS;GACH,WAAQ;;GAEZ,oBAAA,CAAA,YAAA,YAAA;GACI,aAAM,CAAA,qBAA6B,4BAA0B;GACjE;EACF,gBAAgB,EACd,SAAa;GAAC;GAAE;GAAc;GAAA;GAAwB;GAAG;EAEzD,IAAM,WAAM;;+BAEN,SAAC,sDACJ,CAAA;IAAA,gBAAA,sBAAA;KACC,UAAM;KACJ,MAAA;KACA,IAAC,WAAY;AACZ,aAAK,CAAA,gBAAA,SAAA;OACL,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,gEACV,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,MAAA,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;+EACC,YAAA,QAAA,CAAA;;sBAEM,YAAM,QAAA,CAAA,0EAAA,CAAA;;OAEb,CAAA,EAAA,gBAAA,YAAA,EACA,IAAI,WAAA;AACL,cAAM,IAAS;;gDAEQ,YAAA,QAAA,CAAA;;;;;;;;;;;;;KAc1B,CAAC;IAAC;;EAEN,CAAC"}
1
+ {"version":3,"file":"bash-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/bash-shared.d.ts
4
2
  /**
5
3
  * The Bash Completions generation for the Shell Shock project.
6
4
  */
7
- declare function BashCompletionsShared(): _$_alloy_js_core0.Children;
5
+ declare function BashCompletionsShared(): import("@alloy-js/core").Children;
8
6
  //#endregion
9
7
  export { BashCompletionsShared };
10
8
  //# sourceMappingURL=bash-shared.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bash-shared.d.cts","names":[],"sources":["../../src/components/bash-shared.tsx"],"mappings":";;;;;;iBAiCgB,qBAAA,CAAA,GAAqB,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"bash-shared.d.cts","names":[],"sources":["../../src/components/bash-shared.tsx"],"mappings":";;AAiCA;;iBAAgB,qBAAA,6BAAqB,QAAA"}
@@ -1,10 +1,8 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
-
3
1
  //#region src/components/bash-shared.d.ts
4
2
  /**
5
3
  * The Bash Completions generation for the Shell Shock project.
6
4
  */
7
- declare function BashCompletionsShared(): _$_alloy_js_core0.Children;
5
+ declare function BashCompletionsShared(): import("@alloy-js/core").Children;
8
6
  //#endregion
9
7
  export { BashCompletionsShared };
10
8
  //# sourceMappingURL=bash-shared.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bash-shared.d.mts","names":[],"sources":["../../src/components/bash-shared.tsx"],"mappings":";;;;;;iBAiCgB,qBAAA,CAAA,GAAqB,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"bash-shared.d.mts","names":[],"sources":["../../src/components/bash-shared.tsx"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"bash-shared.mjs","names":[],"sources":["../../src/components/bash-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 Bash Completions generation for the Shell Shock project.\n */\nexport function BashCompletionsShared() {\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\", \"bash\", \"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 export\n const\n name=\"SHELL_COMPLETIONS\"\n initializer={code` \\`# Define shell completion directives\nreadonly ShellCompDirectiveError=${CompletionDirective.CompletionDirectiveError}\nreadonly ShellCompDirectiveNoSpace=${\n CompletionDirective.CompletionDirectiveNoSpace\n }\nreadonly ShellCompDirectiveNoFileComp=${\n CompletionDirective.CompletionDirectiveNoFileComp\n }\nreadonly ShellCompDirectiveFilterFileExt=${\n CompletionDirective.CompletionDirectiveFilterFileExt\n }\nreadonly ShellCompDirectiveFilterDirs=${\n CompletionDirective.CompletionDirectiveFilterDirs\n }\nreadonly ShellCompDirectiveKeepOrder=${\n CompletionDirective.CompletionDirectiveKeepOrder\n }\n\n# Function to debug completion\n__${name.value}_debug() {\n if [[ -n \\\\\\${BASH_COMP_DEBUG_FILE:-} ]]; then\n echo \"$*\" >> \"\\\\\\${BASH_COMP_DEBUG_FILE}\"\n fi\n}\n\n# Function to handle completions\n__${name.value}_complete() {\n local cur prev words cword\n _get_comp_words_by_ref -n \"=:\" cur prev words cword\n\n local requestComp out directive\n\n # Build the command to get completions\n requestComp=\"${EXEC_COMMAND} complete -- \\\\\\${words[@]:1}\"\n\n # Add an empty parameter if the last parameter is complete\n if [[ -z \"$cur\" ]]; then\n requestComp=\"$requestComp ''\"\n fi\n\n # Get completions from the program\n out=$(eval \"$requestComp\" 2>/dev/null)\n\n # Extract directive if present\n directive=0\n if [[ \"$out\" == *:* ]]; then\n directive=\\\\\\${out##*:}\n out=\\\\\\${out%:*}\n fi\n\n # Process completions based on directive\n if [[ $((directive & $ShellCompDirectiveError)) -ne 0 ]]; then\n # Error, no completion\n return\n fi\n\n # Apply directives\n if [[ $((directive & $ShellCompDirectiveNoSpace)) -ne 0 ]]; then\n compopt -o nospace\n fi\n if [[ $((directive & $ShellCompDirectiveKeepOrder)) -ne 0 ]]; then\n compopt -o nosort\n fi\n if [[ $((directive & $ShellCompDirectiveNoFileComp)) -ne 0 ]]; then\n compopt +o default\n fi\n\n # Handle file extension filtering\n if [[ $((directive & $ShellCompDirectiveFilterFileExt)) -ne 0 ]]; then\n local filter=\"\"\n for ext in $out; do\n filter=\"$filter|$ext\"\n done\n filter=\"\\\\.($filter)\"\n compopt -o filenames\n COMPREPLY=( $(compgen -f -X \"!$filter\" -- \"$cur\") )\n return\n fi\n\n # Handle directory filtering\n if [[ $((directive & $ShellCompDirectiveFilterDirs)) -ne 0 ]]; then\n compopt -o dirnames\n COMPREPLY=( $(compgen -d -- \"$cur\") )\n return\n fi\n\n # Process completions\n local IFS=$'\\\\n'\n local tab=$(printf '\\\\t')\n\n # Parse completions with descriptions\n local completions=()\n while read -r comp; do\n if [[ \"$comp\" == *$tab* ]]; then\n # Split completion and description\n local value=\\\\\\${comp%%$tab*}\n local desc=\\\\\\${comp#*$tab}\n completions+=(\"$value\")\n else\n completions+=(\"$comp\")\n fi\n done <<< \"$out\"\n\n # Return completions\n COMPREPLY=( $(compgen -W \"\\\\\\${completions[*]}\" -- \"$cur\") )\n}\n\n# Register completion function\ncomplete -F __${name.value}_complete ${bin.value}\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(/while\\\\s+/g, cyan(\"$&\"))\n .replaceAll(/(?<=while\\\\s+)\\\\w/g, bold(cyanBright(\"$&\")))\n .replaceAll(/(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,wBAAA;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;GAAQ;GAAW;GAAA;GAAA;GAAA;GAAA;GAAA,EACvE;EACD,IAAI,WAAS;AACX,UAAK;IAAA,gBAAM,SAAA,EAAA,CAAA;IAAA,gBAAA,gBAAA;KACT,UAAS;KACT,SAAO;KACP,MAAG;KACH,IAAG,cAAK;AACN,aAAM,IAAA;mCACG,oBAAA,yBAAA;qCACM,oBAAA,2BAAA;wCACF,oBAAA,8BAAA;2CACF,oBAAA,iCAAA;wCACC,oBAAA,8BAAA;uCACR,oBAAA,6BAAA;;;IAGV,KAAG,MAAQ;;;;;;;IAOf,KAAS,MAAA;;;;;;;mBAOC,aAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA2E1B,KAAA,MAAA,YAAA,IAAA,MAAA;;;KAGA,CAAA;IAAM,gBAAS,SAAA,EAAA,CAAA;IAAA,gBAAA,gBAAA;KACf,UAAY;;KAEV,MAAM;KACR,aAAiB,IAAE;;;;;;;;;;;;;;;;;;;;;;KAsBhB,CAAC;IAAA;;EAEL,CAAC"}
1
+ {"version":3,"file":"bash-shared.mjs","names":[],"sources":[],"mappings":""}
@@ -3,7 +3,6 @@ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
3
3
  let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
4
4
  let _alloy_js_core = require("@alloy-js/core");
5
5
  let _alloy_js_typescript = require("@alloy-js/typescript");
6
- let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
7
6
  let _powerlines_plugin_alloy_core = require("@powerlines/plugin-alloy/core");
8
7
  let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
9
8
  let _powerlines_plugin_alloy_typescript = require("@powerlines/plugin-alloy/typescript");
@@ -37,7 +36,7 @@ function FishConfigCompletionsCommand() {
37
36
  get children() {
38
37
  return [
39
38
  (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript.TSDoc, { heading: "Options for the Fish Completions - Configuration command." }),
40
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceDeclaration, {
39
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript.InterfaceDeclaration, {
41
40
  "export": true,
42
41
  name: "FishConfigCompletionsOptions",
43
42
  get children() {
@@ -45,15 +44,12 @@ function FishConfigCompletionsCommand() {
45
44
  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.",
46
45
  get children() {
47
46
  return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript.TSDocDefaultValue, {
48
- get type() {
49
- return _powerlines_deepkit_vendor_type.ReflectionKind.boolean;
50
- },
47
+ type: "boolean",
51
48
  defaultValue: false
52
49
  });
53
50
  }
54
- }), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceMember, {
51
+ }), (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript.InterfaceMember, {
55
52
  name: "display",
56
- optional: true,
57
53
  type: "boolean"
58
54
  })];
59
55
  }
@@ -1,10 +1,8 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
-
3
1
  //#region src/components/fish-config-command.d.ts
4
2
  /**
5
3
  * The Fish Completions - Configuration command's handler wrapper for the Shell Shock project.
6
4
  */
7
- declare function FishConfigCompletionsCommand(): _$_alloy_js_core0.Children;
5
+ declare function FishConfigCompletionsCommand(): import("@alloy-js/core").Children;
8
6
  //#endregion
9
7
  export { FishConfigCompletionsCommand };
10
8
  //# sourceMappingURL=fish-config-command.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fish-config-command.d.cts","names":[],"sources":["../../src/components/fish-config-command.tsx"],"mappings":";;;;;;iBAuCgB,4BAAA,CAAA,GAA4B,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"fish-config-command.d.cts","names":[],"sources":["../../src/components/fish-config-command.tsx"],"mappings":";;AAyCA;;iBAAgB,4BAAA,6BAA4B,QAAA"}
@@ -1,10 +1,8 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
-
3
1
  //#region src/components/fish-config-command.d.ts
4
2
  /**
5
3
  * The Fish Completions - Configuration command's handler wrapper for the Shell Shock project.
6
4
  */
7
- declare function FishConfigCompletionsCommand(): _$_alloy_js_core0.Children;
5
+ declare function FishConfigCompletionsCommand(): import("@alloy-js/core").Children;
8
6
  //#endregion
9
7
  export { FishConfigCompletionsCommand };
10
8
  //# sourceMappingURL=fish-config-command.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fish-config-command.d.mts","names":[],"sources":["../../src/components/fish-config-command.tsx"],"mappings":";;;;;;iBAuCgB,4BAAA,CAAA,GAA4B,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"fish-config-command.d.mts","names":[],"sources":["../../src/components/fish-config-command.tsx"],"mappings":""}
@@ -1,11 +1,10 @@
1
1
  import { createComponent, memo } from "@alloy-js/core/jsx-runtime";
2
2
  import { getAppTitle } from "@shell-shock/core/plugin-utils";
3
3
  import { code } from "@alloy-js/core";
4
- import { ElseClause, FunctionDeclaration, IfStatement, InterfaceDeclaration, InterfaceMember, 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 { TSDoc, TSDocDefaultValue } from "@powerlines/plugin-alloy/typescript";
7
+ import { InterfaceDeclaration as InterfaceDeclaration$1, InterfaceMember, TSDoc, TSDocDefaultValue } from "@powerlines/plugin-alloy/typescript";
9
8
  import { joinPaths } from "@stryke/path";
10
9
  import { TypescriptFile as TypescriptFile$1 } from "@powerlines/plugin-alloy/typescript/components/typescript-file";
11
10
 
@@ -36,7 +35,7 @@ function FishConfigCompletionsCommand() {
36
35
  get children() {
37
36
  return [
38
37
  createComponent(TSDoc, { heading: "Options for the Fish Completions - Configuration command." }),
39
- createComponent(InterfaceDeclaration, {
38
+ createComponent(InterfaceDeclaration$1, {
40
39
  "export": true,
41
40
  name: "FishConfigCompletionsOptions",
42
41
  get children() {
@@ -44,15 +43,12 @@ function FishConfigCompletionsCommand() {
44
43
  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.",
45
44
  get children() {
46
45
  return createComponent(TSDocDefaultValue, {
47
- get type() {
48
- return ReflectionKind.boolean;
49
- },
46
+ type: "boolean",
50
47
  defaultValue: false
51
48
  });
52
49
  }
53
50
  }), createComponent(InterfaceMember, {
54
51
  name: "display",
55
- optional: true,
56
52
  type: "boolean"
57
53
  })];
58
54
  }
@@ -1 +1 @@
1
- {"version":3,"file":"fish-config-command.mjs","names":[],"sources":["../../src/components/fish-config-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 } from \"@alloy-js/core\";\nimport {\n ElseClause,\n FunctionDeclaration,\n IfStatement,\n InterfaceDeclaration,\n InterfaceMember,\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 { TSDoc, TSDocDefaultValue } from \"@powerlines/plugin-alloy/typescript\";\nimport { TypescriptFile } from \"@powerlines/plugin-alloy/typescript/components/typescript-file\";\nimport { getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { joinPaths } from \"@stryke/path\";\nimport type { CompletionsPluginContext } from \"../types/plugin\";\n\n/**\n * The Fish Completions - Configuration command's handler wrapper for the Shell Shock project.\n */\nexport function FishConfigCompletionsCommand() {\n const context = usePowerlines<CompletionsPluginContext>();\n\n return (\n <TypescriptFile\n path={joinPaths(\n context.entryPath,\n \"completions\",\n \"fish\",\n \"config\",\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\", \"inlineCode\", \"writeLine\", \"success\", \"warn\", \"help\"]\n }}>\n <TSDoc heading=\"Options for the Fish Completions - Configuration command.\" />\n <InterfaceDeclaration export name=\"FishConfigCompletionsOptions\">\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 fish config\\` command.\"></TSDoc>\n <FunctionDeclaration\n export\n default\n async\n name=\"handler\"\n parameters={[\n {\n name: \"options\",\n type: \"FishConfigCompletionsOptions\",\n default: \"{}\"\n },\n {\n name: \"path\",\n type: \"string\",\n default: `\"~/.config/fish/config.fish\"`\n }\n ]}>\n <IfStatement condition={code`options.display !== true`}>\n <VarDeclaration\n let\n name=\"configPath\"\n type=\"string\"\n initializer={code` path.includes(\".\") ? path : join(path, \".config\", \"fish\", \"config.fish\");`}\n />\n <Spacing />\n <IfStatement condition={code`configPath.startsWith(\"~\")`}>\n {code`configPath = join(os.homedir(), configPath.replace(\"~\", \"\")); `}\n </IfStatement>\n <Spacing />\n <VarDeclaration\n let\n name=\"content\"\n type=\"string\"\n initializer={code`\"\";`}\n />\n <Spacing />\n {code`try {\n content = await readFile(configPath, \"utf8\");\n } catch (error) {\n if (typeof error === \"object\" && error !== null && \"code\" in error && error.code === \"ENOENT\") {\n // If the file doesn't exist, we can create it later when writing the completion script.\n warn(\\`Configuration file \\${bold(configPath)} does not exist. It will be created when the completion script is written.\\`);\n } else {\n return { error };\n }\n }\n\n await writeFile(configPath, \\`\\${content}\\\\n\\\\n### Begin - ${getAppTitle(context)} Fish Completions ###\\\\n\\\\n\\${SHELL_COMPLETIONS} \\\\n\\\\n### End - ${getAppTitle(\n context\n )} Fish Completions ###\\`);\n\n success(\\`${getAppTitle(\n context\n )} shell completions have been applied to Fish configuration file at \\${bold(configPath)}. Please restart your terminal or run \\${inlineCode(\\`source \\${configPath}\\`)} for the changes to take effect.\\`); `}\n </IfStatement>\n <ElseClause>\n {code`writeLine(\" ------------------------------------------------- \");\n writeLine(\"\");\n writeLine(\\`### Begin - ${getAppTitle(context)} Fish Completions ###\\`);\n writeLine(\"\");\n SHELL_COMPLETIONS_DISPLAY.split(\"\\\\n\").map(line => writeLine(line));\n writeLine(\"\");\n writeLine(\\`### End - ${getAppTitle(context)} Fish Completions ###\\`);\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/fish/config.fish)\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":";;;;;;;;;;;;;;;AA+BA,SAAS,+BAAmC;CAC5C,MAAQ,UAAC,eAAqB;AAC9B,QAAS,gBAAkB,kBAAa;EACxC,IAAO,OAAO;;;EAGX,SAAS;GACV,WAAA;GACI,aAAU,CAAA,OAAA;GACd,oBAAgB,CAAA,YAAc,YAAA;;GAE9B;EACE,gBAAC,EACC,SAAM;GAAA;GAAS;GAAA;GAAA;GAAA;GAAA;GAAA,EAChB;EACD,IAAI,WAAC;AACH,UAAO;IAAC,gBAAA,OAAA,EACN,SAAQ,6DACT,CAAC;IAAC,gBAAU,sBAAA;KACZ,UAAA;KACD,MAAQ;KACN,IAAC,WAAc;AACd,aAAK,CAAI,gBAAW,OAAA;OACpB,SAAQ;OACL,IAAA,WAAW;AAChB,eAAA,gBAAA,mBAAA;SACD,IAAc,OAAE;AACJ,iBAAO,eAAe;;SAE3B,cAAiB;SACvB,CAAA;;OAEI,CAAA,EAAA,gBAAA,iBAAA;OACC,MAAM;OACN,UAAA;OACD,MAAA;OACD,CAAA,CAAA;;KAEH,CAAC;IAAA,gBAAoB,SAAA,EAAA,CAAA;IAAA,gBAAA,OAAA,EACrB,SAAS,gEACT,CAAA;IAAA,gBAAe,qBAAwB;KACvC,UAAA;KACC,WAAA;KACA,OAAA;KACA,MAAA;KACA,YAAM,CAAO;MACb,MAAA;MACE,MAAA;MACA,SAAS;MACV,EAAE;MACD,MAAE;MACF,MAAC;MACD,SAAA;MACD,CAAC;KACF,IAAI,WAAO;AACT,aAAE,CAAA,gBAAqB,aAAgB;OACvC,WAAA,IAAA;OACA,IAAA,WAAA;AACD,eAAY;SAAA,gBAAgB,gBAAmB;UAC7C,OAAA;UACC,MAAA;UACI,MAAE;UACF,aAAQ,IAAA;UACZ,CAAA;SAAA,gBAAwB,SAAS,EAAE,CAAC;SAAE,gBAAkB,aAAa;UACtE,WAAA,IAAA;UACA,UAAS,IAAA;UACT,CAAA;SAAA,gBAAuB,SAAK,EAAA,CAAA;SAAW,gBAAiB,gBAAA;UACtD,OAAK;UACN,MAAA;UACD,MAAS;UACT,aAAA,IAAA;UACC,CAAA;SAAA,gBAAA,SAAA,EAAA,CAAA;SAAA,WAAA,IAAA;;;;;;;;;;;uEAW0D,YAAU,QAAQ,CAAA,mEAAiD,YAAA,QAAA,CAAA;;sBAEnH,YAAQ,QAAA,CAAA,6MAAA;SAAA;;OAEpB,CAAA,EAAA,gBAAA,YAAA;AAEA,cAAM,IAAS;;sCAEW,YAAA,QAAA,CAAA;;;;oCAIA,YAAY,QAAQ,CAAC;;;;;;;;;SAU9C,CAAC,CAAA;;;;;EAIT,CAAC"}
1
+ {"version":3,"file":"fish-config-command.mjs","names":[],"sources":[],"mappings":""}
@@ -3,7 +3,6 @@ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
3
3
  let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
4
4
  let _alloy_js_core = require("@alloy-js/core");
5
5
  let _alloy_js_typescript = require("@alloy-js/typescript");
6
- let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
7
6
  let _powerlines_plugin_alloy_core = require("@powerlines/plugin-alloy/core");
8
7
  let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
9
8
  let _powerlines_plugin_alloy_typescript = require("@powerlines/plugin-alloy/typescript");
@@ -45,15 +44,12 @@ function FishScriptCompletionsCommand() {
45
44
  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.",
46
45
  get children() {
47
46
  return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocDefaultValue, {
48
- get type() {
49
- return _powerlines_deepkit_vendor_type.ReflectionKind.boolean;
50
- },
47
+ type: "boolean",
51
48
  defaultValue: false
52
49
  });
53
50
  }
54
51
  }), (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript.InterfaceMember, {
55
52
  name: "display",
56
- optional: true,
57
53
  type: "boolean"
58
54
  })];
59
55
  }
@@ -1,10 +1,8 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
-
3
1
  //#region src/components/fish-script-command.d.ts
4
2
  /**
5
3
  * The Fish Completions - Script command's handler wrapper for the Shell Shock project.
6
4
  */
7
- declare function FishScriptCompletionsCommand(): _$_alloy_js_core0.Children;
5
+ declare function FishScriptCompletionsCommand(): import("@alloy-js/core").Children;
8
6
  //#endregion
9
7
  export { FishScriptCompletionsCommand };
10
8
  //# sourceMappingURL=fish-script-command.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fish-script-command.d.cts","names":[],"sources":["../../src/components/fish-script-command.tsx"],"mappings":";;;;;;iBA4CgB,4BAAA,CAAA,GAA4B,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"fish-script-command.d.cts","names":[],"sources":["../../src/components/fish-script-command.tsx"],"mappings":";;AA2CA;;iBAAgB,4BAAA,6BAA4B,QAAA"}
@@ -1,10 +1,8 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
-
3
1
  //#region src/components/fish-script-command.d.ts
4
2
  /**
5
3
  * The Fish Completions - Script command's handler wrapper for the Shell Shock project.
6
4
  */
7
- declare function FishScriptCompletionsCommand(): _$_alloy_js_core0.Children;
5
+ declare function FishScriptCompletionsCommand(): import("@alloy-js/core").Children;
8
6
  //#endregion
9
7
  export { FishScriptCompletionsCommand };
10
8
  //# sourceMappingURL=fish-script-command.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fish-script-command.d.mts","names":[],"sources":["../../src/components/fish-script-command.tsx"],"mappings":";;;;;;iBA4CgB,4BAAA,CAAA,GAA4B,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"fish-script-command.d.mts","names":[],"sources":["../../src/components/fish-script-command.tsx"],"mappings":""}
@@ -2,10 +2,9 @@ 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
4
  import { ElseClause, FunctionDeclaration, IfStatement, InterfaceDeclaration, VarDeclaration } from "@alloy-js/typescript";
5
- import { ReflectionKind } from "@powerlines/deepkit/vendor/type";
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 { 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
 
@@ -44,15 +43,12 @@ function FishScriptCompletionsCommand() {
44
43
  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.",
45
44
  get children() {
46
45
  return createComponent(TSDocDefaultValue$1, {
47
- get type() {
48
- return ReflectionKind.boolean;
49
- },
46
+ type: "boolean",
50
47
  defaultValue: false
51
48
  });
52
49
  }
53
- }), createComponent(InterfaceMember$1, {
50
+ }), createComponent(InterfaceMember, {
54
51
  name: "display",
55
- optional: true,
56
52
  type: "boolean"
57
53
  })];
58
54
  }
@@ -1 +1 @@
1
- {"version":3,"file":"fish-script-command.mjs","names":[],"sources":["../../src/components/fish-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 type { CompletionsPluginContext } from \"../types/plugin\";\n\n/**\n * The Fish Completions - Script command's handler wrapper for the Shell Shock project.\n */\nexport function FishScriptCompletionsCommand() {\n const context = usePowerlines<CompletionsPluginContext>();\n\n const bin = computed(() => getAppBin(context));\n\n return (\n <TypescriptFile\n path={joinPaths(\n context.entryPath,\n \"completions\",\n \"fish\",\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 Fish Completions - Script command.\" />\n <InterfaceDeclaration export name=\"FishScriptCompletionsOptions\">\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 fish script\\` command.\"></TSDoc>\n <FunctionDeclaration\n export\n default\n async\n name=\"handler\"\n parameters={[\n {\n name: \"options\",\n type: \"FishScriptCompletionsOptions\",\n default: \"{}\"\n },\n {\n name: \"path\",\n type: \"string\",\n default: `\"./${bin.value}-completions.fish\"`\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}.fish\\` : path;`}\n />\n {code`await writeFile(scriptPath, \\`# Fish script to add completions for ${getAppTitle(context)}\\\\n\\\\n\\${SHELL_COMPLETIONS}\\`);\n\n success(\\`${getAppTitle(\n context\n )} Fish completion script has been generated at \\${bold(scriptPath)}.\\`);`}\n </IfStatement>\n <ElseClause>\n {code`writeLine(\" ------------------------------------------------- \");\n writeLine(\"\");\n writeLine(\\`# Fish 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/fish/config.fish)\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":";;;;;;;;;;;;;;;AA+BA,SAAE,+BAAA;CACA,MAAM,UAAC,eAAwB;CACjC,MAAO,MAAA,eAAA,UAAA,QAAA,CAAA;AACL,QAAK,gBAAA,gBAAA;EACL,IAAA,OAAA;AACI,UAAG,UAAW,QAAO,WAAM,eAAsB,QAAM,UAAA,aAAA;;EAE7D,SAAS;GACH,WAAQ;;GAEZ,oBAAA,CAAA,YAAA,YAAA;GACI,aAAM,CAAA,qBAA6B,4BAA0B;GACjE;EACF,gBAAgB,EACd,SAAa;GAAC;GAAE;GAAc;GAAA;GAAwB;GAAG;EAEzD,IAAM,WAAM;;+BAEN,SAAC,sDACJ,CAAA;IAAA,gBAAA,sBAAA;KACC,UAAM;KACJ,MAAA;KACA,IAAC,WAAY;AACZ,aAAK,CAAA,gBAAA,SAAA;OACL,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,gEACV,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,MAAA,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,sEAAA,YAAA,QAAA,CAAA;;wBAEO,YAAU,QAAA,CAAA,yEAAA,CAAA;;OAEjB,CAAC,EAAA,gBAAmB,YAAa,EACjC,IAAA,WAAA;AACA,cAAU,IAAC;;gDAEa,YAAA,QAAA,CAAA;;;;;;;;;;;;;KAc5B,CAAC;IAAC;;EAEN,CAAC"}
1
+ {"version":3,"file":"fish-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/fish-shared.d.ts
4
2
  /**
5
3
  * The Fish Completions generation for the Shell Shock project.
6
4
  */
7
- declare function FishCompletionsShared(): _$_alloy_js_core0.Children;
5
+ declare function FishCompletionsShared(): import("@alloy-js/core").Children;
8
6
  //#endregion
9
7
  export { FishCompletionsShared };
10
8
  //# sourceMappingURL=fish-shared.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fish-shared.d.cts","names":[],"sources":["../../src/components/fish-shared.tsx"],"mappings":";;;;;;iBAiCgB,qBAAA,CAAA,GAAqB,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"fish-shared.d.cts","names":[],"sources":["../../src/components/fish-shared.tsx"],"mappings":";;AAiCA;;iBAAgB,qBAAA,6BAAqB,QAAA"}
@@ -1,10 +1,8 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
-
3
1
  //#region src/components/fish-shared.d.ts
4
2
  /**
5
3
  * The Fish Completions generation for the Shell Shock project.
6
4
  */
7
- declare function FishCompletionsShared(): _$_alloy_js_core0.Children;
5
+ declare function FishCompletionsShared(): import("@alloy-js/core").Children;
8
6
  //#endregion
9
7
  export { FishCompletionsShared };
10
8
  //# sourceMappingURL=fish-shared.d.mts.map