@shell-shock/preset-cli 0.8.18 → 0.8.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 (45) hide show
  1. package/README.md +1 -1
  2. package/dist/components/banner-builtin.cjs +9 -3
  3. package/dist/components/banner-builtin.d.cts.map +1 -1
  4. package/dist/components/banner-builtin.d.mts +1 -1
  5. package/dist/components/banner-builtin.d.mts.map +1 -1
  6. package/dist/components/banner-builtin.mjs +9 -3
  7. package/dist/components/banner-builtin.mjs.map +1 -1
  8. package/dist/components/command-entry.cjs +3 -3
  9. package/dist/components/command-entry.mjs +3 -3
  10. package/dist/components/command-router.cjs +1 -1
  11. package/dist/components/command-router.mjs +1 -1
  12. package/dist/components/upgrade-builtin.cjs +1 -1
  13. package/dist/components/upgrade-builtin.mjs +1 -1
  14. package/dist/index.cjs +3 -6
  15. package/dist/index.d.cts.map +1 -1
  16. package/dist/index.d.mts.map +1 -1
  17. package/dist/index.mjs +4 -7
  18. package/dist/index.mjs.map +1 -1
  19. package/dist/plugin-banner/dist/components/banner-builtin.cjs +2 -2
  20. package/dist/plugin-banner/dist/components/banner-builtin.mjs +1 -1
  21. package/dist/plugin-banner/dist/components/banner-function-declaration.cjs +43 -19
  22. package/dist/plugin-banner/dist/components/banner-function-declaration.mjs +44 -20
  23. package/dist/plugin-banner/dist/components/banner-function-declaration.mjs.map +1 -1
  24. package/dist/plugin-banner/dist/types/plugin.d.mts +1 -1
  25. package/dist/plugin-help/dist/components/display.cjs +11 -10
  26. package/dist/plugin-help/dist/components/display.mjs +11 -10
  27. package/dist/plugin-help/dist/components/display.mjs.map +1 -1
  28. package/dist/plugin-help/dist/components/help-builtin.cjs +5 -4
  29. package/dist/plugin-help/dist/components/help-builtin.mjs +5 -4
  30. package/dist/plugin-help/dist/components/help-builtin.mjs.map +1 -1
  31. package/dist/plugin-help/dist/components/help-command.cjs +1 -1
  32. package/dist/plugin-help/dist/components/help-command.mjs +1 -1
  33. package/dist/plugin-help/dist/index.cjs +3 -3
  34. package/dist/plugin-help/dist/index.mjs +2 -2
  35. package/dist/plugin-help/dist/types/plugin.d.mts +1 -1
  36. package/dist/types/plugin.d.cts +5 -1
  37. package/dist/types/plugin.d.cts.map +1 -1
  38. package/dist/types/plugin.d.mts +5 -1
  39. package/dist/types/plugin.d.mts.map +1 -1
  40. package/package.json +8 -8
  41. package/dist/plugin-banner/dist/components/index.cjs +0 -2
  42. package/dist/plugin-banner/dist/components/index.mjs +0 -4
  43. package/dist/plugin-banner/dist/index.cjs +0 -70
  44. package/dist/plugin-banner/dist/index.mjs +0 -68
  45. package/dist/plugin-banner/dist/index.mjs.map +0 -1
@@ -1,9 +1,10 @@
1
1
  import { createComponent, memo } from "@alloy-js/core/jsx-runtime";
2
- import { Show, code, computed } from "@alloy-js/core";
2
+ import { For, Show, code, computed } from "@alloy-js/core";
3
3
  import { FunctionDeclaration, IfStatement } from "@alloy-js/typescript";
4
4
  import { formatDescription, getAppDescription, getAppTitle } from "@shell-shock/core/plugin-utils";
5
- import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
5
+ import { isSetString } from "@stryke/type-checks/is-set-string";
6
6
  import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
7
+ import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
7
8
  import { useTheme } from "@shell-shock/plugin-theme/contexts/theme";
8
9
 
9
10
  //#region ../plugin-banner/dist/components/banner-function-declaration.mjs
@@ -54,8 +55,6 @@ function BannerFunctionBodyDeclaration(props) {
54
55
  }
55
56
 
56
57
  useApp().set("banner", true); `,
57
- createComponent(Spacing, {}),
58
- children,
59
58
  createComponent(Spacing, {}),
60
59
  createComponent(Show, {
61
60
  when: insertNewlineBeforeBanner,
@@ -63,24 +62,49 @@ function BannerFunctionBodyDeclaration(props) {
63
62
  }),
64
63
  createComponent(Spacing, {}),
65
64
  memo(() => code`
66
- writeLine(colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].topLeft}") + ${theme.icons.banner.header[variant] ? `colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].top}".repeat(6)) + " " + ${theme.icons.banner.header[variant] ? `colors.text.banner.header.${variant}("${theme.icons.banner.header[variant]}") + " " + colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].top}") + " " +` : ""} colors.bold(colors.text.banner.header.${variant}("${header}")) + " " + colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].top}".repeat(Math.max(process.stdout.columns - ${6 + (theme.icons.banner.header[variant] ? theme.icons.banner.header[variant].length + 3 : 0) + (header ? header.length + 2 : 0) + bannerPadding.value}, 0)))` : `colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].top}".repeat(Math.max(process.stdout.columns - ${bannerPadding.value}, 0)))`} + colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].topRight}"), { consoleFn: console.${consoleFnName} });
67
-
68
- ${title ? title.split("\n").map((line) => `splitText("${line}",
69
- Math.max(process.stdout.columns - ${totalPadding.value}, 0)
70
- ).forEach((line) => {
71
- writeLine(colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].left}") + " ".repeat(Math.max(Math.floor((process.stdout.columns - (stripAnsi(line).length + ${bannerPadding.value})) / 2), 0)) + colors.bold(colors.text.banner.title.${variant}(line)) + " ".repeat(Math.max(Math.ceil((process.stdout.columns - (stripAnsi(line).length + ${bannerPadding.value})) / 2), 0)) + colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].right}"), { consoleFn: console.${consoleFnName} });
72
- }); `) : `splitText(title,
73
- Math.max(process.stdout.columns - ${totalPadding.value}, 0)
65
+ writeLine(colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].topLeft}") + ${theme.icons.banner.header[variant] ? `colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].top}".repeat(6)) + " " + ${theme.icons.banner.header[variant] ? `colors.text.banner.header.${variant}("${theme.icons.banner.header[variant]}") + " " + colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].top}") + " " +` : ""} colors.bold(colors.text.banner.header.${variant}("${header}")) + " " + colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].top}".repeat(Math.max(process.stdout.columns - ${6 + (theme.icons.banner.header[variant] ? theme.icons.banner.header[variant].length + 3 : 0) + (header ? header.length + 2 : 0) + bannerPadding.value}, 0)))` : `colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].top}".repeat(Math.max(process.stdout.columns - ${bannerPadding.value}, 0)))`} + colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].topRight}"), { consoleFn: console.${consoleFnName} }); `),
66
+ createComponent(Show, {
67
+ when: !!children,
68
+ get fallback() {
69
+ return createComponent(Show, {
70
+ get when() {
71
+ return isSetString(title);
72
+ },
73
+ get children() {
74
+ return createComponent(For, {
75
+ get each() {
76
+ return title ? title.split("\n") : [];
77
+ },
78
+ hardline: true,
79
+ children: (line) => code`splitText("${line}",
80
+ Math.max(process.stdout.columns - ${totalPadding.value}, 20)
74
81
  ).forEach((line) => {
75
82
  writeLine(colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].left}") + " ".repeat(Math.max(Math.floor((process.stdout.columns - (stripAnsi(line).length + ${bannerPadding.value})) / 2), 0)) + colors.bold(colors.text.banner.title.${variant}(line)) + " ".repeat(Math.max(Math.ceil((process.stdout.columns - (stripAnsi(line).length + ${bannerPadding.value})) / 2), 0)) + colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].right}"), { consoleFn: console.${consoleFnName} });
76
- });`}
77
-
78
- ${command?.title ? `${insertNewlineBeforeCommand ? `writeLine(colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].left}") + " ".repeat(Math.max(process.stdout.columns - ${bannerPadding.value})) + colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].right}"), { consoleFn: console.${consoleFnName} }); ` : ""}
79
- ${`writeLine(colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].left}") + " ".repeat(Math.max(Math.floor((process.stdout.columns - (stripAnsi("${command.title}").length ${command.icon ? " + 3" : ""} + ${bannerPadding.value})) / 2), 0)) + colors.bold(colors.text.banner.command.${variant}("${command.icon ? `${command.icon} ` : ""}${command.title}")) + " ".repeat(Math.max(Math.ceil((process.stdout.columns - (stripAnsi("${command.title}").length ${command.icon ? " + 3" : ""} + ${bannerPadding.value})) / 2), 0)) + colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].right}"), { consoleFn: console.${consoleFnName} }); `} ` : ""}
80
-
81
- splitText(
83
+ }); `
84
+ });
85
+ }
86
+ });
87
+ },
88
+ children
89
+ }),
90
+ createComponent(Spacing, {}),
91
+ createComponent(Show, {
92
+ get when() {
93
+ return isSetString(command?.title) && !!command?.path;
94
+ },
95
+ get children() {
96
+ return [createComponent(Show, {
97
+ when: insertNewlineBeforeCommand,
98
+ get children() {
99
+ return code`writeLine(colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].left}") + " ".repeat(Math.max(process.stdout.columns - ${bannerPadding.value})) + colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].right}"), { consoleFn: console.${consoleFnName} }); `;
100
+ }
101
+ }), memo(() => `writeLine(colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].left}") + " ".repeat(Math.max(Math.floor((process.stdout.columns - (stripAnsi("${command?.title}").length ${command?.icon ? " + 3" : ""} + ${bannerPadding.value})) / 2), 0)) + colors.bold(colors.text.banner.command.${variant}("${command?.icon ? `${command.icon} ` : ""}${command?.title}")) + " ".repeat(Math.max(Math.ceil((process.stdout.columns - (stripAnsi("${command?.title}").length ${command?.icon ? " + 3" : ""} + ${bannerPadding.value})) / 2), 0)) + colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].right}"), { consoleFn: console.${consoleFnName} }); `)];
102
+ }
103
+ }),
104
+ createComponent(Spacing, {}),
105
+ memo(() => code`splitText(
82
106
  colors.bold(${command?.title ? "colors.text.banner.description" : "colors.text.banner.command"}.${variant}(\`${formatDescription(description)}\`)),
83
- Math.max(${command?.title ? `${totalPadding.value} * 2 > process.stdout.columns / 2 ? process.stdout.columns - 6 : process.stdout.columns - ${totalPadding.value}` : `process.stdout.columns - ${totalPadding.value}`} , 0)
107
+ Math.max(${command?.title ? `${totalPadding.value} * 2 > process.stdout.columns / 2 ? process.stdout.columns - 6 : process.stdout.columns - ${totalPadding.value}` : `process.stdout.columns - ${totalPadding.value}`} , 20)
84
108
  ).forEach((line) => {
85
109
  writeLine(colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].left}") + " ".repeat(Math.max(Math.floor((process.stdout.columns - (stripAnsi(line).length + ${bannerPadding.value})) / 2), 0)) + colors.text.banner.description.${variant}(line) + " ".repeat(Math.max(Math.ceil((process.stdout.columns - (stripAnsi(line).length + ${bannerPadding.value})) / 2), 0)) + colors.border.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].right}"), { consoleFn: console.${consoleFnName} });
86
110
  });
@@ -109,7 +133,7 @@ function BannerFunctionDeclaration(props) {
109
133
  get children() {
110
134
  return createComponent(BannerFunctionBodyDeclaration, {
111
135
  get title() {
112
- return title.value;
136
+ return !children ? title.value : void 0;
113
137
  },
114
138
  get header() {
115
139
  return header.value;
@@ -1 +1 @@
1
- {"version":3,"file":"banner-function-declaration.mjs","names":[],"sources":["../../../../../plugin-banner/dist/components/banner-function-declaration.mjs"],"sourcesContent":["import { createComponent, memo } from \"@alloy-js/core/jsx-runtime\";\nimport { Show, code, computed } from \"@alloy-js/core\";\nimport { formatDescription, getAppDescription, getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { FunctionDeclaration, IfStatement } from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { useTheme } from \"@shell-shock/plugin-theme/contexts/theme\";\n\n//#region src/components/banner-function-declaration.tsx\n/**\n* A component to generate the `banner` function for a specific command or application.\n*\n* @remarks\n* This function will display a banner in the console with the application's name, version, and description. It can be customized with different variants for styling and supports conditional rendering based on flags or environment variables.\n*/\nfunction BannerFunctionDeclarationWrapper(props) {\n\tconst { command, children } = props;\n\tconst context = usePowerlines();\n\treturn createComponent(FunctionDeclaration, {\n\t\t\"export\": true,\n\t\tasync: true,\n\t\tname: \"showBanner\",\n\t\tget doc() {\n\t\t\treturn `Write the ${getAppTitle(context, true)} command-line interface application banner ${command ? `for the ${command.title} command ` : \"\"}to the console.`;\n\t\t},\n\t\tparameters: [{\n\t\t\tname: \"sleepTimeoutMs\",\n\t\t\ttype: \"number\",\n\t\t\tdefault: 500\n\t\t}],\n\t\tget children() {\n\t\t\treturn [children, createComponent(IfStatement, {\n\t\t\t\tcondition: code`isInteractive && !isHelp`,\n\t\t\t\tchildren: code`await sleep(sleepTimeoutMs);`\n\t\t\t})];\n\t\t}\n\t});\n}\n/**\n* A component to generate the `banner` function's body for a specific command or application.\n*\n* @remarks\n* This function will display a banner in the console with the application's name, version, and description. It can be customized with different variants for styling and supports conditional rendering based on flags or environment variables.\n*/\nfunction BannerFunctionBodyDeclaration(props) {\n\tconst { consoleFnName = \"log\", variant = \"primary\", title, header, footer, description, command, children, insertNewlineBeforeCommand = false, insertNewlineBeforeBanner = true, insertNewlineAfterDescription = false } = props;\n\tconst theme = useTheme();\n\tconst bannerPadding = computed(() => Math.max(theme.padding.app, 0) * 2 + theme.borderStyles.banner.outline[variant].left.length + theme.borderStyles.banner.outline[variant].right.length);\n\tconst totalPadding = computed(() => Math.max(theme.padding.banner, 0) * 2 + bannerPadding.value);\n\treturn [\n\t\tcode`\n if (useApp().get(\"banner\") || hasFlag(\"no-banner\") || hasFlag(\"hide-banner\") || isMinimal) {\n return;\n }\n\n useApp().set(\"banner\", true); `,\n\t\tcreateComponent(Spacing, {}),\n\t\tchildren,\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(Show, {\n\t\t\twhen: insertNewlineBeforeBanner,\n\t\t\tchildren: code`writeLine(\"\"); `\n\t\t}),\n\t\tcreateComponent(Spacing, {}),\n\t\tmemo(() => code`\n writeLine(colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].topLeft}\") + ${theme.icons.banner.header[variant] ? `colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].top}\".repeat(6)) + \" \" + ${theme.icons.banner.header[variant] ? `colors.text.banner.header.${variant}(\"${theme.icons.banner.header[variant]}\") + \" \" + colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].top}\") + \" \" +` : \"\"} colors.bold(colors.text.banner.header.${variant}(\"${header}\")) + \" \" + colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].top}\".repeat(Math.max(process.stdout.columns - ${6 + (theme.icons.banner.header[variant] ? theme.icons.banner.header[variant].length + 3 : 0) + (header ? header.length + 2 : 0) + bannerPadding.value}, 0)))` : `colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].top}\".repeat(Math.max(process.stdout.columns - ${bannerPadding.value}, 0)))`} + colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].topRight}\"), { consoleFn: console.${consoleFnName} });\n\n ${title ? title.split(\"\\n\").map((line) => `splitText(\"${line}\",\n Math.max(process.stdout.columns - ${totalPadding.value}, 0)\n ).forEach((line) => {\n writeLine(colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].left}\") + \" \".repeat(Math.max(Math.floor((process.stdout.columns - (stripAnsi(line).length + ${bannerPadding.value})) / 2), 0)) + colors.bold(colors.text.banner.title.${variant}(line)) + \" \".repeat(Math.max(Math.ceil((process.stdout.columns - (stripAnsi(line).length + ${bannerPadding.value})) / 2), 0)) + colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].right}\"), { consoleFn: console.${consoleFnName} });\n }); `) : `splitText(title,\n Math.max(process.stdout.columns - ${totalPadding.value}, 0)\n ).forEach((line) => {\n writeLine(colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].left}\") + \" \".repeat(Math.max(Math.floor((process.stdout.columns - (stripAnsi(line).length + ${bannerPadding.value})) / 2), 0)) + colors.bold(colors.text.banner.title.${variant}(line)) + \" \".repeat(Math.max(Math.ceil((process.stdout.columns - (stripAnsi(line).length + ${bannerPadding.value})) / 2), 0)) + colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].right}\"), { consoleFn: console.${consoleFnName} });\n });`}\n\n ${command?.title ? `${insertNewlineBeforeCommand ? `writeLine(colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].left}\") + \" \".repeat(Math.max(process.stdout.columns - ${bannerPadding.value})) + colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].right}\"), { consoleFn: console.${consoleFnName} }); ` : \"\"}\n ${`writeLine(colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].left}\") + \" \".repeat(Math.max(Math.floor((process.stdout.columns - (stripAnsi(\"${command.title}\").length ${command.icon ? \" + 3\" : \"\"} + ${bannerPadding.value})) / 2), 0)) + colors.bold(colors.text.banner.command.${variant}(\"${command.icon ? `${command.icon} ` : \"\"}${command.title}\")) + \" \".repeat(Math.max(Math.ceil((process.stdout.columns - (stripAnsi(\"${command.title}\").length ${command.icon ? \" + 3\" : \"\"} + ${bannerPadding.value})) / 2), 0)) + colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].right}\"), { consoleFn: console.${consoleFnName} }); `} ` : \"\"}\n\n splitText(\n colors.bold(${command?.title ? \"colors.text.banner.description\" : \"colors.text.banner.command\"}.${variant}(\\`${formatDescription(description)}\\`)),\n Math.max(${command?.title ? `${totalPadding.value} * 2 > process.stdout.columns / 2 ? process.stdout.columns - 6 : process.stdout.columns - ${totalPadding.value}` : `process.stdout.columns - ${totalPadding.value}`} , 0)\n ).forEach((line) => {\n writeLine(colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].left}\") + \" \".repeat(Math.max(Math.floor((process.stdout.columns - (stripAnsi(line).length + ${bannerPadding.value})) / 2), 0)) + colors.text.banner.description.${variant}(line) + \" \".repeat(Math.max(Math.ceil((process.stdout.columns - (stripAnsi(line).length + ${bannerPadding.value})) / 2), 0)) + colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].right}\"), { consoleFn: console.${consoleFnName} });\n });\n ${insertNewlineAfterDescription ? `writeLine(colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].left}\") + \" \".repeat(Math.max(process.stdout.columns - ${bannerPadding.value})) + colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].right}\"), { consoleFn: console.${consoleFnName} });` : \"\"}\n writeLine(colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].bottomLeft}\") + ${footer ? `colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].bottom}\".repeat(Math.max(process.stdout.columns - ${8 + (footer ? footer.length : 0) + bannerPadding.value}, 0))) + \" \" + ${footer ? `colors.bold(colors.text.banner.footer.${variant}(\"${footer}\"))` : \"\"} + \" \" + colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].bottom}\".repeat(6))` : `colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].bottom}\".repeat(Math.max(process.stdout.columns - ${bannerPadding.value}, 0)))`} + colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].bottomRight}\"), { consoleFn: console.${consoleFnName} });\n\n writeLine(\"\"); `)\n\t];\n}\n/**\n* A component to generate the `banner` function for a specific command or application.\n*\n* @remarks\n* This function will display a banner in the console with the application's name, version, and description. It can be customized with different variants for styling and supports conditional rendering based on flags or environment variables.\n*/\nfunction BannerFunctionDeclaration(props) {\n\tconst { consoleFnName = \"log\", variant = \"primary\", command, children, insertNewlineBeforeBanner = true } = props;\n\tconst theme = useTheme();\n\tconst context = usePowerlines();\n\tconst header = computed(() => `${theme.labels.banner.header[variant] || getAppTitle(context, false)} v${context.packageJson.version || \"1.0.0\"}`);\n\tconst footer = computed(() => theme.labels.banner.footer[variant]);\n\tconst title = computed(() => context.config.banner.title || getAppTitle(context, true).replace(`v${context.packageJson.version || \"1.0.0\"}`, \"\"));\n\tconst description = computed(() => command?.description || getAppDescription(context));\n\treturn createComponent(BannerFunctionDeclarationWrapper, {\n\t\tcommand,\n\t\tget children() {\n\t\t\treturn createComponent(BannerFunctionBodyDeclaration, {\n\t\t\t\tget title() {\n\t\t\t\t\treturn title.value;\n\t\t\t\t},\n\t\t\t\tget header() {\n\t\t\t\t\treturn header.value;\n\t\t\t\t},\n\t\t\t\tget description() {\n\t\t\t\t\treturn description.value;\n\t\t\t\t},\n\t\t\t\tget footer() {\n\t\t\t\t\treturn footer.value;\n\t\t\t\t},\n\t\t\t\tvariant,\n\t\t\t\tconsoleFnName,\n\t\t\t\tcommand,\n\t\t\t\tinsertNewlineBeforeCommand: true,\n\t\t\t\tinsertNewlineBeforeBanner,\n\t\t\t\tchildren\n\t\t\t});\n\t\t}\n\t});\n}\n\n//#endregion\nexport { BannerFunctionBodyDeclaration, BannerFunctionDeclaration, BannerFunctionDeclarationWrapper };\n//# sourceMappingURL=banner-function-declaration.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAeA,SAAS,iCAAiC,OAAO;CAChD,MAAM,EAAE,SAAS,aAAa;CAC9B,MAAM,UAAU,eAAe;AAC/B,QAAO,gBAAgB,qBAAqB;EAC3C,UAAU;EACV,OAAO;EACP,MAAM;EACN,IAAI,MAAM;AACT,UAAO,aAAa,YAAY,SAAS,KAAK,CAAC,6CAA6C,UAAU,WAAW,QAAQ,MAAM,aAAa,GAAG;;EAEhJ,YAAY,CAAC;GACZ,MAAM;GACN,MAAM;GACN,SAAS;GACT,CAAC;EACF,IAAI,WAAW;AACd,UAAO,CAAC,UAAU,gBAAgB,aAAa;IAC9C,WAAW,I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,OAAO,OAAO,OAAO,YAAY,YAAY,SAAS,MAAM,CAAC,IAAI,QAAQ,YAAY,WAAW,UAAU;CACjJ,MAAM,SAAS,eAAe,MAAM,OAAO,OAAO,OAAO,SAAS;CAClE,MAAM,QAAQ,eAAe,QAAQ,OAAO,OAAO,SAAS,YAAY,SAAS,KAAK,CAAC,QAAQ,IAAI,QAAQ,YAAY,WAAW,WAAW,GAAG,CAAC;CACjJ,MAAM,cAAc,eAAe,SAAS,eAAe,kBAAkB,QAAQ,CAAC;AACtF,QAAO,gBAAgB,kCAAkC;EACxD;EACA,IAAI,WAAW;AACd,UAAO,gBAAgB,+BAA+B;IACrD,IAAI,QAAQ;AACX,YAAO,MAAM;;IAEd,IAAI,SAAS;AACZ,YAAO,OAAO;;IAEf,IAAI,cAAc;AACjB,YAAO,YAAY;;IAEpB,IAAI,SAAS;AACZ,YAAO,OAAO;;IAEf;IACA;IACA;IACA,4BAA4B;IAC5B;IACA;IACA,CAAC;;EAEH,CAAC"}
1
+ {"version":3,"file":"banner-function-declaration.mjs","names":[],"sources":["../../../../../plugin-banner/dist/components/banner-function-declaration.mjs"],"sourcesContent":["import { createComponent, memo } from \"@alloy-js/core/jsx-runtime\";\nimport { For, Show, code, computed } from \"@alloy-js/core\";\nimport { formatDescription, getAppDescription, getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { FunctionDeclaration, IfStatement } from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { useTheme } from \"@shell-shock/plugin-theme/contexts/theme\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\n\n//#region src/components/banner-function-declaration.tsx\n/**\n* A component to generate the `banner` function for a specific command or application.\n*\n* @remarks\n* This function will display a banner in the console with the application's name, version, and description. It can be customized with different variants for styling and supports conditional rendering based on flags or environment variables.\n*/\nfunction BannerFunctionDeclarationWrapper(props) {\n\tconst { command, children } = props;\n\tconst context = usePowerlines();\n\treturn createComponent(FunctionDeclaration, {\n\t\t\"export\": true,\n\t\tasync: true,\n\t\tname: \"showBanner\",\n\t\tget doc() {\n\t\t\treturn `Write the ${getAppTitle(context, true)} command-line interface application banner ${command ? `for the ${command.title} command ` : \"\"}to the console.`;\n\t\t},\n\t\tparameters: [{\n\t\t\tname: \"sleepTimeoutMs\",\n\t\t\ttype: \"number\",\n\t\t\tdefault: 500\n\t\t}],\n\t\tget children() {\n\t\t\treturn [children, createComponent(IfStatement, {\n\t\t\t\tcondition: code`isInteractive && !isHelp`,\n\t\t\t\tchildren: code`await sleep(sleepTimeoutMs);`\n\t\t\t})];\n\t\t}\n\t});\n}\n/**\n* A component to generate the `banner` function's body for a specific command or application.\n*\n* @remarks\n* This function will display a banner in the console with the application's name, version, and description. It can be customized with different variants for styling and supports conditional rendering based on flags or environment variables.\n*/\nfunction BannerFunctionBodyDeclaration(props) {\n\tconst { consoleFnName = \"log\", variant = \"primary\", title, header, footer, description, command, children, insertNewlineBeforeCommand = false, insertNewlineBeforeBanner = true, insertNewlineAfterDescription = false } = props;\n\tconst theme = useTheme();\n\tconst bannerPadding = computed(() => Math.max(theme.padding.app, 0) * 2 + theme.borderStyles.banner.outline[variant].left.length + theme.borderStyles.banner.outline[variant].right.length);\n\tconst totalPadding = computed(() => Math.max(theme.padding.banner, 0) * 2 + bannerPadding.value);\n\treturn [\n\t\tcode`\n if (useApp().get(\"banner\") || hasFlag(\"no-banner\") || hasFlag(\"hide-banner\") || isMinimal) {\n return;\n }\n\n useApp().set(\"banner\", true); `,\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(Show, {\n\t\t\twhen: insertNewlineBeforeBanner,\n\t\t\tchildren: code`writeLine(\"\"); `\n\t\t}),\n\t\tcreateComponent(Spacing, {}),\n\t\tmemo(() => code`\n writeLine(colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].topLeft}\") + ${theme.icons.banner.header[variant] ? `colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].top}\".repeat(6)) + \" \" + ${theme.icons.banner.header[variant] ? `colors.text.banner.header.${variant}(\"${theme.icons.banner.header[variant]}\") + \" \" + colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].top}\") + \" \" +` : \"\"} colors.bold(colors.text.banner.header.${variant}(\"${header}\")) + \" \" + colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].top}\".repeat(Math.max(process.stdout.columns - ${6 + (theme.icons.banner.header[variant] ? theme.icons.banner.header[variant].length + 3 : 0) + (header ? header.length + 2 : 0) + bannerPadding.value}, 0)))` : `colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].top}\".repeat(Math.max(process.stdout.columns - ${bannerPadding.value}, 0)))`} + colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].topRight}\"), { consoleFn: console.${consoleFnName} }); `),\n\t\tcreateComponent(Show, {\n\t\t\twhen: !!children,\n\t\t\tget fallback() {\n\t\t\t\treturn createComponent(Show, {\n\t\t\t\t\tget when() {\n\t\t\t\t\t\treturn isSetString(title);\n\t\t\t\t\t},\n\t\t\t\t\tget children() {\n\t\t\t\t\t\treturn createComponent(For, {\n\t\t\t\t\t\t\tget each() {\n\t\t\t\t\t\t\t\treturn title ? title.split(\"\\n\") : [];\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\thardline: true,\n\t\t\t\t\t\t\tchildren: (line) => code`splitText(\"${line}\",\n Math.max(process.stdout.columns - ${totalPadding.value}, 20)\n ).forEach((line) => {\n writeLine(colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].left}\") + \" \".repeat(Math.max(Math.floor((process.stdout.columns - (stripAnsi(line).length + ${bannerPadding.value})) / 2), 0)) + colors.bold(colors.text.banner.title.${variant}(line)) + \" \".repeat(Math.max(Math.ceil((process.stdout.columns - (stripAnsi(line).length + ${bannerPadding.value})) / 2), 0)) + colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].right}\"), { consoleFn: console.${consoleFnName} });\n }); `\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t},\n\t\t\tchildren\n\t\t}),\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(Show, {\n\t\t\tget when() {\n\t\t\t\treturn isSetString(command?.title) && !!command?.path;\n\t\t\t},\n\t\t\tget children() {\n\t\t\t\treturn [createComponent(Show, {\n\t\t\t\t\twhen: insertNewlineBeforeCommand,\n\t\t\t\t\tget children() {\n\t\t\t\t\t\treturn code`writeLine(colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].left}\") + \" \".repeat(Math.max(process.stdout.columns - ${bannerPadding.value})) + colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].right}\"), { consoleFn: console.${consoleFnName} }); `;\n\t\t\t\t\t}\n\t\t\t\t}), memo(() => `writeLine(colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].left}\") + \" \".repeat(Math.max(Math.floor((process.stdout.columns - (stripAnsi(\"${command?.title}\").length ${command?.icon ? \" + 3\" : \"\"} + ${bannerPadding.value})) / 2), 0)) + colors.bold(colors.text.banner.command.${variant}(\"${command?.icon ? `${command.icon} ` : \"\"}${command?.title}\")) + \" \".repeat(Math.max(Math.ceil((process.stdout.columns - (stripAnsi(\"${command?.title}\").length ${command?.icon ? \" + 3\" : \"\"} + ${bannerPadding.value})) / 2), 0)) + colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].right}\"), { consoleFn: console.${consoleFnName} }); `)];\n\t\t\t}\n\t\t}),\n\t\tcreateComponent(Spacing, {}),\n\t\tmemo(() => code`splitText(\n colors.bold(${command?.title ? \"colors.text.banner.description\" : \"colors.text.banner.command\"}.${variant}(\\`${formatDescription(description)}\\`)),\n Math.max(${command?.title ? `${totalPadding.value} * 2 > process.stdout.columns / 2 ? process.stdout.columns - 6 : process.stdout.columns - ${totalPadding.value}` : `process.stdout.columns - ${totalPadding.value}`} , 20)\n ).forEach((line) => {\n writeLine(colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].left}\") + \" \".repeat(Math.max(Math.floor((process.stdout.columns - (stripAnsi(line).length + ${bannerPadding.value})) / 2), 0)) + colors.text.banner.description.${variant}(line) + \" \".repeat(Math.max(Math.ceil((process.stdout.columns - (stripAnsi(line).length + ${bannerPadding.value})) / 2), 0)) + colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].right}\"), { consoleFn: console.${consoleFnName} });\n });\n ${insertNewlineAfterDescription ? `writeLine(colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].left}\") + \" \".repeat(Math.max(process.stdout.columns - ${bannerPadding.value})) + colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].right}\"), { consoleFn: console.${consoleFnName} });` : \"\"}\n writeLine(colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].bottomLeft}\") + ${footer ? `colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].bottom}\".repeat(Math.max(process.stdout.columns - ${8 + (footer ? footer.length : 0) + bannerPadding.value}, 0))) + \" \" + ${footer ? `colors.bold(colors.text.banner.footer.${variant}(\"${footer}\"))` : \"\"} + \" \" + colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].bottom}\".repeat(6))` : `colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].bottom}\".repeat(Math.max(process.stdout.columns - ${bannerPadding.value}, 0)))`} + colors.border.banner.outline.${variant}(\"${theme.borderStyles.banner.outline[variant].bottomRight}\"), { consoleFn: console.${consoleFnName} });\n\n writeLine(\"\"); `)\n\t];\n}\n/**\n* A component to generate the `banner` function for a specific command or application.\n*\n* @remarks\n* This function will display a banner in the console with the application's name, version, and description. It can be customized with different variants for styling and supports conditional rendering based on flags or environment variables.\n*/\nfunction BannerFunctionDeclaration(props) {\n\tconst { consoleFnName = \"log\", variant = \"primary\", command, children, insertNewlineBeforeBanner = true } = props;\n\tconst theme = useTheme();\n\tconst context = usePowerlines();\n\tconst header = computed(() => `${theme.labels.banner.header[variant] || getAppTitle(context, false)} v${context.packageJson.version || \"1.0.0\"}`);\n\tconst footer = computed(() => theme.labels.banner.footer[variant]);\n\tconst title = computed(() => context.config.banner.title || getAppTitle(context, true).replace(`v${context.packageJson.version || \"1.0.0\"}`, \"\"));\n\tconst description = computed(() => command?.description || getAppDescription(context));\n\treturn createComponent(BannerFunctionDeclarationWrapper, {\n\t\tcommand,\n\t\tget children() {\n\t\t\treturn createComponent(BannerFunctionBodyDeclaration, {\n\t\t\t\tget title() {\n\t\t\t\t\treturn !children ? title.value : void 0;\n\t\t\t\t},\n\t\t\t\tget header() {\n\t\t\t\t\treturn header.value;\n\t\t\t\t},\n\t\t\t\tget description() {\n\t\t\t\t\treturn description.value;\n\t\t\t\t},\n\t\t\t\tget footer() {\n\t\t\t\t\treturn footer.value;\n\t\t\t\t},\n\t\t\t\tvariant,\n\t\t\t\tconsoleFnName,\n\t\t\t\tcommand,\n\t\t\t\tinsertNewlineBeforeCommand: true,\n\t\t\t\tinsertNewlineBeforeBanner,\n\t\t\t\tchildren\n\t\t\t});\n\t\t}\n\t});\n}\n\n//#endregion\nexport { BannerFunctionBodyDeclaration, BannerFunctionDeclaration, BannerFunctionDeclarationWrapper };\n//# sourceMappingURL=banner-function-declaration.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAgBA,SAAS,iCAAiC,OAAO;CAChD,MAAM,EAAE,SAAS,aAAa;CAC9B,MAAM,UAAU,eAAe;AAC/B,QAAO,gBAAgB,qBAAqB;EAC3C,UAAU;EACV,OAAO;EACP,MAAM;EACN,IAAI,MAAM;AACT,UAAO,aAAa,YAAY,SAAS,KAAK,CAAC,6CAA6C,UAAU,WAAW,QAAQ,MAAM,aAAa,GAAG;;EAEhJ,YAAY,CAAC;GACZ,MAAM;GACN,MAAM;GACN,SAAS;GACT,CAAC;EAC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AS,OAAO,6CAA6C,cAAc,MAAM,QAAQ,kCAAkC,QAAQ,IAAI,MAAM,aAAa,OAAO,QAAQ,SAAS,YAAY,2BAA2B,cAAc;;yBAEvzB;EACvB;;;;;;;;AAQF,SAAS,0BAA0B,OAAO;CACzC,MAAM,EAAE,gBAAgB,OAAO,UAAU,WAAW,SAAS,UAAU,4BAA4B,SAAS;CAC5G,MAAM,QAAQ,UAAU;CACxB,MAAM,UAAU,eAAe;CAC/B,MAAM,SAAS,eAAe,GAAG,MAAM,OAAO,OAAO,OAAO,YAAY,YAAY,SAAS,MAAM,CAAC,IAAI,QAAQ,YAAY,WAAW,UAAU;CACjJ,MAAM,SAAS,eAAe,MAAM,OAAO,OAAO,OAAO,SAAS;CAClE,MAAM,QAAQ,eAAe,QAAQ,OAAO,OAAO,SAAS,YAAY,SAAS,KAAK,CAAC,QAAQ,IAAI,QAAQ,YAAY,WAAW,WAAW,GAAG,CAAC;CACjJ,MAAM,cAAc,eAAe,SAAS,eAAe,kBAAkB,QAAQ,CAAC;AACtF,QAAO,gBAAgB,kCAAkC;EACxD;EACA,IAAI,WAAW;AACd,UAAO,gBAAgB,+BAA+B;IACrD,IAAI,QAAQ;AACX,YAAO,CAAC,WAAW,MAAM,QAAQ,KAAK;;IAEvC,IAAI,SAAS;AACZ,YAAO,OAAO;;IAEf,IAAI,cAAc;AACjB,YAAO,YAAY;;IAEpB,IAAI,SAAS;AACZ,YAAO,OAAO;;IAEf;IACA;IACA;IACA,4BAA4B;IAC5B;IACA;IACA,CAAC;;EAEH,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { ConsolePluginContext, ConsolePluginOptions, ConsolePluginResolvedConfig, ConsolePluginUserConfig } from "@shell-shock/plugin-console";
2
- import { ThemePluginContext, ThemePluginOptions, ThemePluginResolvedConfig, ThemePluginUserConfig } from "@shell-shock/plugin-theme";
3
2
  import { ResolvedConfig, UserConfig } from "@shell-shock/core";
3
+ import { ThemePluginContext, ThemePluginOptions, ThemePluginResolvedConfig, ThemePluginUserConfig } from "@shell-shock/plugin-theme";
4
4
  import { Context as Context$1 } from "@shell-shock/core/types/context";
5
5
 
6
6
  //#region ../plugin-banner/dist/types/plugin.d.cts
@@ -2,11 +2,12 @@ const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
2
2
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
3
3
  let _alloy_js_core = require("@alloy-js/core");
4
4
  let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
5
- let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
6
- let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
7
- let _shell_shock_plugin_theme_contexts_theme = require("@shell-shock/plugin-theme/contexts/theme");
8
5
  let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
6
+ let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
7
+ let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
9
8
  let _shell_shock_core = require("@shell-shock/core");
9
+ let _shell_shock_plugin_theme_contexts_theme = require("@shell-shock/plugin-theme/contexts/theme");
10
+ let _stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
10
11
  let _stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
11
12
  let _stryke_string_format_snake_case = require("@stryke/string-format/snake-case");
12
13
 
@@ -25,7 +26,7 @@ function HelpUsageDisplay(props) {
25
26
  hardline: true,
26
27
  children: (bin) => [(0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`
27
28
  writeLine(
28
- colors.text.body.secondary(\`\${colors.border.app.divider.tertiary("\$_")} \${colors.text.usage.bin("${bin}")}${command.segments.length > 0 ? ` ${command.segments.map((segment) => `\${colors.text.usage.${(0, _shell_shock_core_plugin_utils.isDynamicPathSegment)(segment) ? "dynamic" : "command"}("${(0, _shell_shock_core_plugin_utils.isDynamicPathSegment)(segment) ? `[${(0, _stryke_string_format_snake_case.snakeCase)((0, _shell_shock_core_plugin_utils.getDynamicPathSegmentName)(segment))}]` : segment}")}`).join(" ")}` : ""}${Object.values(command.children).length > 0 ? ` \${colors.text.usage.dynamic("[command]")}` : ""}${command.args.length > 0 ? ` ${command.args.map((arg) => `\${colors.text.usage.args("<${(0, _stryke_string_format_snake_case.snakeCase)((arg.kind === _shell_shock_core.CommandParameterKinds.string || arg.kind === _shell_shock_core.CommandParameterKinds.number) && arg.choices && arg.choices.length > 0 ? arg.choices.join("|") : arg.kind === _shell_shock_core.CommandParameterKinds.string && arg.format ? arg.format : arg.name)}${(arg.kind === _shell_shock_core.CommandParameterKinds.string || arg.kind === _shell_shock_core.CommandParameterKinds.number) && arg.variadic ? "..." : ""}>")}`).join(" ")}` : ""} \${colors.text.usage.options("[options]")}\`), { padding: ${theme.padding.app * indent} }
29
+ colors.text.body.secondary(\`\${colors.text.usage.bin("$_ ${bin}")}${command.segments.length > 0 ? ` ${command.segments.map((segment) => `\${colors.text.usage.${(0, _shell_shock_core_plugin_utils.isDynamicPathSegment)(segment) ? "dynamic" : "command"}("${(0, _shell_shock_core_plugin_utils.isDynamicPathSegment)(segment) ? `[${(0, _stryke_string_format_snake_case.snakeCase)((0, _shell_shock_core_plugin_utils.getDynamicPathSegmentName)(segment))}]` : segment}")}`).join(" ")}` : ""}${Object.values(command.children).length > 0 ? ` \${colors.text.usage.dynamic("[command]")}` : ""}${command.args.length > 0 ? ` ${command.args.map((arg) => `\${colors.text.usage.args("<${(0, _stryke_string_format_snake_case.snakeCase)((arg.kind === _shell_shock_core.CommandParameterKinds.string || arg.kind === _shell_shock_core.CommandParameterKinds.number) && arg.choices && arg.choices.length > 0 ? arg.choices.join("|") : arg.kind === _shell_shock_core.CommandParameterKinds.string && arg.format ? arg.format : arg.name)}${(arg.kind === _shell_shock_core.CommandParameterKinds.string || arg.kind === _shell_shock_core.CommandParameterKinds.number) && arg.variadic ? "..." : ""}>")}`).join(" ")}` : ""} \${colors.text.usage.options("[options]")}\`), { padding: ${theme.padding.app * indent} }
29
30
  );`), (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})]
30
31
  }), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
31
32
  get when() {
@@ -39,7 +40,7 @@ function HelpUsageDisplay(props) {
39
40
  hardline: true,
40
41
  children: (bin) => [(0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`
41
42
  writeLine(
42
- colors.text.body.secondary(\`\$ \${colors.text.usage.bin("${bin}")}${command.segments.length > 0 ? ` ${command.segments.map((segment) => `\${colors.text.usage.${(0, _shell_shock_core_plugin_utils.isDynamicPathSegment)(segment) ? "dynamic" : "command"}("${(0, _shell_shock_core_plugin_utils.isDynamicPathSegment)(segment) ? `[${(0, _stryke_string_format_snake_case.snakeCase)((0, _shell_shock_core_plugin_utils.getDynamicPathSegmentName)(segment))}]` : segment}")}`).join(" ")}` : ""}${Object.values(command.children).length > 0 ? ` \${colors.text.usage.dynamic("[command]")}` : ""} \${colors.text.usage.options("[options]")}${command.args.length > 0 ? ` ${command.args.map((arg) => `\${colors.text.usage.args("<${(0, _stryke_string_format_snake_case.snakeCase)((arg.kind === _shell_shock_core.CommandParameterKinds.string || arg.kind === _shell_shock_core.CommandParameterKinds.number) && arg.choices && arg.choices.length > 0 ? arg.choices.join("|") : arg.kind === _shell_shock_core.CommandParameterKinds.string && arg.format ? arg.format : arg.name)}${(arg.kind === _shell_shock_core.CommandParameterKinds.string || arg.kind === _shell_shock_core.CommandParameterKinds.number) && arg.variadic ? "..." : ""}>")}`).join(" ")}` : ""}\`), { padding: ${theme.padding.app * indent} }
43
+ colors.text.body.secondary(\`\${colors.text.usage.bin("$_ ${bin}")}${command.segments.length > 0 ? ` ${command.segments.map((segment) => `\${colors.text.usage.${(0, _shell_shock_core_plugin_utils.isDynamicPathSegment)(segment) ? "dynamic" : "command"}("${(0, _shell_shock_core_plugin_utils.isDynamicPathSegment)(segment) ? `[${(0, _stryke_string_format_snake_case.snakeCase)((0, _shell_shock_core_plugin_utils.getDynamicPathSegmentName)(segment))}]` : segment}")}`).join(" ")}` : ""}${Object.values(command.children).length > 0 ? ` \${colors.text.usage.dynamic("[command]")}` : ""} \${colors.text.usage.options("[options]")}${command.args.length > 0 ? ` ${command.args.map((arg) => `\${colors.text.usage.args("<${(0, _stryke_string_format_snake_case.snakeCase)((arg.kind === _shell_shock_core.CommandParameterKinds.string || arg.kind === _shell_shock_core.CommandParameterKinds.number) && arg.choices && arg.choices.length > 0 ? arg.choices.join("|") : arg.kind === _shell_shock_core.CommandParameterKinds.string && arg.format ? arg.format : arg.name)}${(arg.kind === _shell_shock_core.CommandParameterKinds.string || arg.kind === _shell_shock_core.CommandParameterKinds.number) && arg.variadic ? "..." : ""}>")}`).join(" ")}` : ""}\`), { padding: ${theme.padding.app * indent} }
43
44
  );`), (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})]
44
45
  })];
45
46
  }
@@ -149,7 +150,7 @@ function BaseHelpDisplay(props) {
149
150
  get children() {
150
151
  return [
151
152
  (0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`writeLine("");
152
- writeLine(colors.text.heading.tertiary(\`More information about this command can be found in the reference documentation at ${command.reference}\`)${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : ""});`),
153
+ writeLine(colors.text.heading.tertiary(\`More information about this command can be found in the reference documentation at \${link("${command.reference}")}\`)${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : ""});`),
153
154
  (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
154
155
  (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {})
155
156
  ];
@@ -199,9 +200,9 @@ function VirtualCommandHelpDisplay(props) {
199
200
  ender: _alloy_js_core.code`writeLine(""); `,
200
201
  children: (child) => [
201
202
  (0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`
202
- writeLine(colors.text.heading.primary(${child.icon ? `(isUnicodeSupported ? " ${child.icon} " : "") + ` : ""}\`${child.title} ${child.isVirtual ? "" : "Command"}${child.tags?.length > 0 ? ` ${child.tags.map((tag) => `\${colors.text.heading.primary(colors.black(" ${tag} "), true)}`).join(" ")}` : ""}\`);
203
+ writeLine(colors.text.heading.primary(${child.icon ? `(isUnicodeSupported ? " ${child.icon} " : "") + ` : ""}\`${child.title} ${child.isVirtual ? "" : "Command"}${child.tags?.length > 0 ? ` - ${child.tags.map((tag) => `\${colors.text.tags.${(0, _stryke_string_format_camel_case.camelCase)(tag)} ? colors.text.tags.${(0, _stryke_string_format_camel_case.camelCase)(tag)}(colors.inverse(" ${tag} ")) : colors.text.tags.$default(colors.inverse(" ${tag} "))}`).join(" ")}` : ""}\`);
203
204
  writeLine("");
204
- writeLine(colors.text.body.secondary(splitText(\`${(0, _shell_shock_core_plugin_utils.formatDescription)(child.description).replace(/\.+$/, "").trim()}.\`)));
205
+ writeLine(colors.text.body.tertiary(splitText(\`${(0, _shell_shock_core_plugin_utils.formatDescription)(child.description).replace(/\.+$/, "").trim()}.\`)));
205
206
  writeLine("");
206
207
  `),
207
208
  (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
@@ -253,9 +254,9 @@ function CommandHelpDisplay(props) {
253
254
  ender: _alloy_js_core.code`writeLine(""); `,
254
255
  children: (child) => [
255
256
  (0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`
256
- writeLine(colors.text.heading.primary(${child.icon ? `(isUnicodeSupported ? " ${child.icon} " : "") + ` : ""}\`${child.title} ${child.isVirtual ? "" : "Command"}${child.tags?.length > 0 ? ` ${child.tags.map((tag) => `\${colors.text.heading.primary(colors.black(" ${tag} "), true)}`).join(" ")}` : ""}\`);
257
+ writeLine(colors.text.heading.primary(${child.icon ? `(isUnicodeSupported ? " ${child.icon} " : "") + ` : ""}\`${child.title} ${child.isVirtual ? "" : "Command"}${child.tags?.length > 0 ? ` - ${child.tags.map((tag) => `\${colors.text.tags.${(0, _stryke_string_format_camel_case.camelCase)(tag)} ? colors.text.tags.${(0, _stryke_string_format_camel_case.camelCase)(tag)}(colors.inverse(" ${tag} ")) : colors.text.tags.$default(colors.inverse(" ${tag} "))}`).join(" ")}` : ""}\`);
257
258
  writeLine("");
258
- writeLine(colors.text.body.secondary(splitText(\`${(0, _shell_shock_core_plugin_utils.formatDescription)(child.description).replace(/\.+$/, "").trim()}.\`)));
259
+ writeLine(colors.text.body.tertiary(splitText(\`${(0, _shell_shock_core_plugin_utils.formatDescription)(child.description).replace(/\.+$/, "").trim()}.\`)));
259
260
  writeLine("");
260
261
  `),
261
262
  (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
@@ -1,11 +1,12 @@
1
1
  import { createComponent, createIntrinsic, memo } from "@alloy-js/core/jsx-runtime";
2
2
  import { For, Show, code, computed } from "@alloy-js/core";
3
3
  import { formatDescription, formatShortDescription, getAppBin, getAppTitle, getDynamicPathSegmentName, isDynamicPathSegment, sortOptions } from "@shell-shock/core/plugin-utils";
4
- import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
5
- import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
6
- import { useTheme } from "@shell-shock/plugin-theme/contexts/theme";
7
4
  import { isSetString } from "@stryke/type-checks/is-set-string";
5
+ import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
6
+ import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
8
7
  import { CommandParameterKinds } from "@shell-shock/core";
8
+ import { useTheme } from "@shell-shock/plugin-theme/contexts/theme";
9
+ import { camelCase } from "@stryke/string-format/camel-case";
9
10
  import { kebabCase } from "@stryke/string-format/kebab-case";
10
11
  import { snakeCase } from "@stryke/string-format/snake-case";
11
12
 
@@ -24,7 +25,7 @@ function HelpUsageDisplay(props) {
24
25
  hardline: true,
25
26
  children: (bin) => [memo(() => code`
26
27
  writeLine(
27
- colors.text.body.secondary(\`\${colors.border.app.divider.tertiary("\$_")} \${colors.text.usage.bin("${bin}")}${command.segments.length > 0 ? ` ${command.segments.map((segment) => `\${colors.text.usage.${isDynamicPathSegment(segment) ? "dynamic" : "command"}("${isDynamicPathSegment(segment) ? `[${snakeCase(getDynamicPathSegmentName(segment))}]` : segment}")}`).join(" ")}` : ""}${Object.values(command.children).length > 0 ? ` \${colors.text.usage.dynamic("[command]")}` : ""}${command.args.length > 0 ? ` ${command.args.map((arg) => `\${colors.text.usage.args("<${snakeCase((arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.choices && arg.choices.length > 0 ? arg.choices.join("|") : arg.kind === CommandParameterKinds.string && arg.format ? arg.format : arg.name)}${(arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.variadic ? "..." : ""}>")}`).join(" ")}` : ""} \${colors.text.usage.options("[options]")}\`), { padding: ${theme.padding.app * indent} }
28
+ colors.text.body.secondary(\`\${colors.text.usage.bin("$_ ${bin}")}${command.segments.length > 0 ? ` ${command.segments.map((segment) => `\${colors.text.usage.${isDynamicPathSegment(segment) ? "dynamic" : "command"}("${isDynamicPathSegment(segment) ? `[${snakeCase(getDynamicPathSegmentName(segment))}]` : segment}")}`).join(" ")}` : ""}${Object.values(command.children).length > 0 ? ` \${colors.text.usage.dynamic("[command]")}` : ""}${command.args.length > 0 ? ` ${command.args.map((arg) => `\${colors.text.usage.args("<${snakeCase((arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.choices && arg.choices.length > 0 ? arg.choices.join("|") : arg.kind === CommandParameterKinds.string && arg.format ? arg.format : arg.name)}${(arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.variadic ? "..." : ""}>")}`).join(" ")}` : ""} \${colors.text.usage.options("[options]")}\`), { padding: ${theme.padding.app * indent} }
28
29
  );`), createIntrinsic("hbr", {})]
29
30
  }), createComponent(Show, {
30
31
  get when() {
@@ -38,7 +39,7 @@ function HelpUsageDisplay(props) {
38
39
  hardline: true,
39
40
  children: (bin) => [memo(() => code`
40
41
  writeLine(
41
- colors.text.body.secondary(\`\$ \${colors.text.usage.bin("${bin}")}${command.segments.length > 0 ? ` ${command.segments.map((segment) => `\${colors.text.usage.${isDynamicPathSegment(segment) ? "dynamic" : "command"}("${isDynamicPathSegment(segment) ? `[${snakeCase(getDynamicPathSegmentName(segment))}]` : segment}")}`).join(" ")}` : ""}${Object.values(command.children).length > 0 ? ` \${colors.text.usage.dynamic("[command]")}` : ""} \${colors.text.usage.options("[options]")}${command.args.length > 0 ? ` ${command.args.map((arg) => `\${colors.text.usage.args("<${snakeCase((arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.choices && arg.choices.length > 0 ? arg.choices.join("|") : arg.kind === CommandParameterKinds.string && arg.format ? arg.format : arg.name)}${(arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.variadic ? "..." : ""}>")}`).join(" ")}` : ""}\`), { padding: ${theme.padding.app * indent} }
42
+ colors.text.body.secondary(\`\${colors.text.usage.bin("$_ ${bin}")}${command.segments.length > 0 ? ` ${command.segments.map((segment) => `\${colors.text.usage.${isDynamicPathSegment(segment) ? "dynamic" : "command"}("${isDynamicPathSegment(segment) ? `[${snakeCase(getDynamicPathSegmentName(segment))}]` : segment}")}`).join(" ")}` : ""}${Object.values(command.children).length > 0 ? ` \${colors.text.usage.dynamic("[command]")}` : ""} \${colors.text.usage.options("[options]")}${command.args.length > 0 ? ` ${command.args.map((arg) => `\${colors.text.usage.args("<${snakeCase((arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.choices && arg.choices.length > 0 ? arg.choices.join("|") : arg.kind === CommandParameterKinds.string && arg.format ? arg.format : arg.name)}${(arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.variadic ? "..." : ""}>")}`).join(" ")}` : ""}\`), { padding: ${theme.padding.app * indent} }
42
43
  );`), createIntrinsic("hbr", {})]
43
44
  })];
44
45
  }
@@ -148,7 +149,7 @@ function BaseHelpDisplay(props) {
148
149
  get children() {
149
150
  return [
150
151
  memo(() => code`writeLine("");
151
- writeLine(colors.text.heading.tertiary(\`More information about this command can be found in the reference documentation at ${command.reference}\`)${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : ""});`),
152
+ writeLine(colors.text.heading.tertiary(\`More information about this command can be found in the reference documentation at \${link("${command.reference}")}\`)${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : ""});`),
152
153
  createIntrinsic("hbr", {}),
153
154
  createComponent(Spacing, {})
154
155
  ];
@@ -198,9 +199,9 @@ function VirtualCommandHelpDisplay(props) {
198
199
  ender: code`writeLine(""); `,
199
200
  children: (child) => [
200
201
  memo(() => code`
201
- writeLine(colors.text.heading.primary(${child.icon ? `(isUnicodeSupported ? " ${child.icon} " : "") + ` : ""}\`${child.title} ${child.isVirtual ? "" : "Command"}${child.tags?.length > 0 ? ` ${child.tags.map((tag) => `\${colors.text.heading.primary(colors.black(" ${tag} "), true)}`).join(" ")}` : ""}\`);
202
+ writeLine(colors.text.heading.primary(${child.icon ? `(isUnicodeSupported ? " ${child.icon} " : "") + ` : ""}\`${child.title} ${child.isVirtual ? "" : "Command"}${child.tags?.length > 0 ? ` - ${child.tags.map((tag) => `\${colors.text.tags.${camelCase(tag)} ? colors.text.tags.${camelCase(tag)}(colors.inverse(" ${tag} ")) : colors.text.tags.$default(colors.inverse(" ${tag} "))}`).join(" ")}` : ""}\`);
202
203
  writeLine("");
203
- writeLine(colors.text.body.secondary(splitText(\`${formatDescription(child.description).replace(/\.+$/, "").trim()}.\`)));
204
+ writeLine(colors.text.body.tertiary(splitText(\`${formatDescription(child.description).replace(/\.+$/, "").trim()}.\`)));
204
205
  writeLine("");
205
206
  `),
206
207
  createIntrinsic("hbr", {}),
@@ -252,9 +253,9 @@ function CommandHelpDisplay(props) {
252
253
  ender: code`writeLine(""); `,
253
254
  children: (child) => [
254
255
  memo(() => code`
255
- writeLine(colors.text.heading.primary(${child.icon ? `(isUnicodeSupported ? " ${child.icon} " : "") + ` : ""}\`${child.title} ${child.isVirtual ? "" : "Command"}${child.tags?.length > 0 ? ` ${child.tags.map((tag) => `\${colors.text.heading.primary(colors.black(" ${tag} "), true)}`).join(" ")}` : ""}\`);
256
+ writeLine(colors.text.heading.primary(${child.icon ? `(isUnicodeSupported ? " ${child.icon} " : "") + ` : ""}\`${child.title} ${child.isVirtual ? "" : "Command"}${child.tags?.length > 0 ? ` - ${child.tags.map((tag) => `\${colors.text.tags.${camelCase(tag)} ? colors.text.tags.${camelCase(tag)}(colors.inverse(" ${tag} ")) : colors.text.tags.$default(colors.inverse(" ${tag} "))}`).join(" ")}` : ""}\`);
256
257
  writeLine("");
257
- writeLine(colors.text.body.secondary(splitText(\`${formatDescription(child.description).replace(/\.+$/, "").trim()}.\`)));
258
+ writeLine(colors.text.body.tertiary(splitText(\`${formatDescription(child.description).replace(/\.+$/, "").trim()}.\`)));
258
259
  writeLine("");
259
260
  `),
260
261
  createIntrinsic("hbr", {}),
@@ -1 +1 @@
1
- {"version":3,"file":"display.mjs","names":[],"sources":["../../../../../plugin-help/dist/components/display.mjs"],"sourcesContent":["import { createComponent, createIntrinsic, memo } from \"@alloy-js/core/jsx-runtime\";\nimport { For, Show, code, computed } from \"@alloy-js/core\";\nimport { formatDescription, formatShortDescription, getAppBin, getAppTitle, getDynamicPathSegmentName, isDynamicPathSegment, sortOptions } from \"@shell-shock/core/plugin-utils\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { CommandParameterKinds } from \"@shell-shock/core\";\nimport { useTheme } from \"@shell-shock/plugin-theme/contexts/theme\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { snakeCase } from \"@stryke/string-format/snake-case\";\n\n//#region src/components/display.tsx\n/**\n* A component that generates the usage display for a command.\n*/\nfunction HelpUsageDisplay(props) {\n\tconst { command, indent = 2 } = props;\n\tconst context = usePowerlines();\n\tconst theme = useTheme();\n\treturn [createComponent(For, {\n\t\tget each() {\n\t\t\treturn Object.keys(context.config.bin);\n\t\t},\n\t\thardline: true,\n\t\tchildren: (bin) => [memo(() => code`\n writeLine(\n colors.text.body.secondary(\\`\\${colors.border.app.divider.tertiary(\"\\$_\")} \\${colors.text.usage.bin(\"${bin}\")}${command.segments.length > 0 ? ` ${command.segments.map((segment) => `\\${colors.text.usage.${isDynamicPathSegment(segment) ? \"dynamic\" : \"command\"}(\"${isDynamicPathSegment(segment) ? `[${snakeCase(getDynamicPathSegmentName(segment))}]` : segment}\")}`).join(\" \")}` : \"\"}${Object.values(command.children).length > 0 ? ` \\${colors.text.usage.dynamic(\"[command]\")}` : \"\"}${command.args.length > 0 ? ` ${command.args.map((arg) => `\\${colors.text.usage.args(\"<${snakeCase((arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.choices && arg.choices.length > 0 ? arg.choices.join(\"|\") : arg.kind === CommandParameterKinds.string && arg.format ? arg.format : arg.name)}${(arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.variadic ? \"...\" : \"\"}>\")}`).join(\" \")}` : \"\"} \\${colors.text.usage.options(\"[options]\")}\\`), { padding: ${theme.padding.app * indent} }\n );`), createIntrinsic(\"hbr\", {})]\n\t}), createComponent(Show, {\n\t\tget when() {\n\t\t\treturn command.args.length > 0;\n\t\t},\n\t\tget children() {\n\t\t\treturn [createIntrinsic(\"hbr\", {}), createComponent(For, {\n\t\t\t\tget each() {\n\t\t\t\t\treturn Object.keys(context.config.bin);\n\t\t\t\t},\n\t\t\t\thardline: true,\n\t\t\t\tchildren: (bin) => [memo(() => code`\n writeLine(\n colors.text.body.secondary(\\`\\$ \\${colors.text.usage.bin(\"${bin}\")}${command.segments.length > 0 ? ` ${command.segments.map((segment) => `\\${colors.text.usage.${isDynamicPathSegment(segment) ? \"dynamic\" : \"command\"}(\"${isDynamicPathSegment(segment) ? `[${snakeCase(getDynamicPathSegmentName(segment))}]` : segment}\")}`).join(\" \")}` : \"\"}${Object.values(command.children).length > 0 ? ` \\${colors.text.usage.dynamic(\"[command]\")}` : \"\"} \\${colors.text.usage.options(\"[options]\")}${command.args.length > 0 ? ` ${command.args.map((arg) => `\\${colors.text.usage.args(\"<${snakeCase((arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.choices && arg.choices.length > 0 ? arg.choices.join(\"|\") : arg.kind === CommandParameterKinds.string && arg.format ? arg.format : arg.name)}${(arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.variadic ? \"...\" : \"\"}>\")}`).join(\" \")}` : \"\"}\\`), { padding: ${theme.padding.app * indent} }\n );`), createIntrinsic(\"hbr\", {})]\n\t\t\t})];\n\t\t}\n\t})];\n}\n/**\n* A component that generates the options table display for a command.\n*/\nfunction HelpOptionsDisplay(props) {\n\tconst { options } = props;\n\tconst context = usePowerlines();\n\treturn [\n\t\tcode`table([ `,\n\t\tcreateIntrinsic(\"hbr\", {}),\n\t\tcreateComponent(For, {\n\t\t\tget each() {\n\t\t\t\treturn sortOptions(options);\n\t\t\t},\n\t\t\thardline: true,\n\t\t\tchildren: (option) => {\n\t\t\t\tconst flags = [];\n\t\t\t\tconst names = [];\n\t\t\t\tif (option.name.length === 1) flags.push(`-${option.name}`);\n\t\t\t\telse names.push(`--${kebabCase(option.name)}`);\n\t\t\t\toption.alias.forEach((alias) => {\n\t\t\t\t\tif (alias.length === 1) flags.push(`-${alias}`);\n\t\t\t\t\telse names.push(`--${kebabCase(alias)}`);\n\t\t\t\t});\n\t\t\t\treturn code`[{ value: colors.text.body.primary(\"${flags.length > 0 ? `${flags.sort().join(\", \")}${names.length > 0 ? \", \" : \"\"}` : \"\"}${names.length > 0 ? names.sort().join(\", \") : \"\"}${option.kind === CommandParameterKinds.string ? ` <${snakeCase(option.choices && option.choices.length > 0 ? option.choices.join(\"|\") : option.format ? option.format : option.name)}${option.variadic ? \"...\" : \"\"}>` : option.kind === CommandParameterKinds.number ? ` <${snakeCase(option.choices && option.choices.length > 0 ? option.choices.join(\"|\") : option.name)}${option.variadic ? \"...\" : \"\"}>` : \"\"}\"), align: \"right\", border: \"none\", maxWidth: \"1/3\" }, { value: colors.text.body.tertiary(\\`${formatShortDescription(option.description).replace(/\\.+$/, \"\").trim()}${option.env || option.default !== void 0 ? ` (${option.env ? `env: ${context.config.appSpecificEnvPrefix}_${option.env}${option.default !== void 0 ? \", \" : \"\"}` : \"\"}${option.default !== void 0 ? `default: ${JSON.stringify(option.default).replace(/\"/g, \"\\\\\\\"\")}` : \"\"})` : \"\"}.\\`), align: \"left\", border: \"none\" }], `;\n\t\t\t}\n\t\t}),\n\t\tcreateIntrinsic(\"hbr\", {}),\n\t\tcode` ]); `\n\t];\n}\n/**\n* A component that generates the commands table display for a command.\n*/\nfunction HelpCommandsDisplay(props) {\n\tconst { commands } = props;\n\treturn [\n\t\tcode`table([ `,\n\t\tcreateIntrinsic(\"hbr\", {}),\n\t\tcreateComponent(For, {\n\t\t\tget each() {\n\t\t\t\treturn Object.values(commands);\n\t\t\t},\n\t\t\thardline: true,\n\t\t\tchildren: (child) => code`[{ value: colors.text.body.primary(\"${child.name}\"), align: \"right\", border: \"none\" }, { value: colors.text.body.tertiary(\\`${formatShortDescription(child.description).replace(/\\.+$/, \"\").trim()}.\\`), align: \"left\", border: \"none\" }], `\n\t\t}),\n\t\tcreateIntrinsic(\"hbr\", {}),\n\t\tcode` ]); `\n\t];\n}\n/**\n* A component that generates the `help` function declaration for a command.\n*/\nfunction BaseHelpDisplay(props) {\n\tconst { command, indent = 1, filterGlobalOptions = false } = props;\n\tconst theme = useTheme();\n\tconst context = usePowerlines();\n\tconst options = computed(() => filterGlobalOptions ? Object.values(command.options).filter((option) => !context.options.some((globalOption) => globalOption.name === option.name || option.alias.includes(globalOption.name) || globalOption.alias?.includes(option.name) || globalOption.alias?.some((alias) => option.alias.includes(alias)))) : Object.values(command.options));\n\treturn [\n\t\tmemo(() => code`writeLine(colors.bold(colors.text.heading.secondary(\"Usage:\"))${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : \"\"});`),\n\t\tcreateIntrinsic(\"hbr\", {}),\n\t\tcreateComponent(HelpUsageDisplay, {\n\t\t\tcommand,\n\t\t\tindent\n\t\t}),\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(Show, {\n\t\t\tget when() {\n\t\t\t\treturn options.value.length > 0;\n\t\t\t},\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tmemo(() => code`writeLine(\"\");\n writeLine(colors.bold(colors.text.heading.secondary(\"Options:\"))${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : \"\"});`),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(HelpOptionsDisplay, { get options() {\n\t\t\t\t\t\treturn options.value;\n\t\t\t\t\t} }),\n\t\t\t\t\tcreateComponent(Spacing, {})\n\t\t\t\t];\n\t\t\t}\n\t\t}),\n\t\tcreateComponent(Show, {\n\t\t\tget when() {\n\t\t\t\treturn Object.keys(command.children).length > 0;\n\t\t\t},\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tmemo(() => code`writeLine(\"\");\n writeLine(colors.bold(colors.text.heading.secondary(\"Commands:\"))${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : \"\"});`),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(HelpCommandsDisplay, { get commands() {\n\t\t\t\t\t\treturn command.children;\n\t\t\t\t\t} }),\n\t\t\t\t\tcreateComponent(Spacing, {})\n\t\t\t\t];\n\t\t\t}\n\t\t}),\n\t\tcreateComponent(Show, {\n\t\t\tget when() {\n\t\t\t\treturn isSetString(command.reference);\n\t\t\t},\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tmemo(() => code`writeLine(\"\");\n writeLine(colors.text.heading.tertiary(\\`More information about this command can be found in the reference documentation at ${command.reference}\\`)${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : \"\"});`),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(Spacing, {})\n\t\t\t\t];\n\t\t\t}\n\t\t})\n\t];\n}\nfunction sortCommands(commands) {\n\treturn Object.values(commands).sort((a, b) => {\n\t\tif (a.tags.some((tag) => tag.toLowerCase() === \"deprecated\") && !b.tags.some((tag) => tag.toLowerCase() === \"deprecated\")) return 1;\n\t\telse if (!a.tags.some((tag) => tag.toLowerCase() === \"deprecated\") && b.tags.some((tag) => tag.toLowerCase() === \"deprecated\")) return -1;\n\t\telse if (a.tags.some((tag) => tag.toLowerCase() === \"experimental\") && !b.tags.some((tag) => tag.toLowerCase() === \"experimental\")) return 1;\n\t\telse if (!a.tags.some((tag) => tag.toLowerCase() === \"experimental\") && b.tags.some((tag) => tag.toLowerCase() === \"experimental\")) return -1;\n\t\telse if (a.tags.some((tag) => tag.toLowerCase() === \"utility\") && !b.tags.some((tag) => tag.toLowerCase() === \"utility\")) return 1;\n\t\telse if (!a.tags.some((tag) => tag.toLowerCase() === \"utility\") && b.tags.some((tag) => tag.toLowerCase() === \"utility\")) return -1;\n\t\treturn a.name.localeCompare(b.name);\n\t});\n}\n/**\n* A component that generates the invocation of the `help` function for a command.\n*/\nfunction VirtualCommandHelpDisplay(props) {\n\tconst { options, segments, commands } = props;\n\tconst context = usePowerlines();\n\treturn [\n\t\tcreateIntrinsic(\"hbr\", {}),\n\t\tcode`writeLine(colors.bold(colors.text.heading.secondary(\"Global Options:\")));`,\n\t\tcreateIntrinsic(\"hbr\", {}),\n\t\tcreateComponent(HelpOptionsDisplay, { options }),\n\t\tcode`writeLine(\"\"); `,\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(Show, {\n\t\t\tget when() {\n\t\t\t\treturn Object.keys(commands).length > 0;\n\t\t\t},\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tmemo(() => code`writeLine(colors.text.body.secondary(\"The following commands are available through the ${getAppTitle(context, true)} command-line interface:\"));\n writeLine(\"\"); `),\n\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\tcreateComponent(For, {\n\t\t\t\t\t\tget each() {\n\t\t\t\t\t\t\treturn sortCommands(commands);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdoubleHardline: true,\n\t\t\t\t\t\tjoiner: code`writeLine(\"\"); `,\n\t\t\t\t\t\tender: code`writeLine(\"\"); `,\n\t\t\t\t\t\tchildren: (child) => [\n\t\t\t\t\t\t\tmemo(() => code`\n writeLine(colors.text.heading.primary(${child.icon ? `(isUnicodeSupported ? \" ${child.icon} \" : \"\") + ` : \"\"}\\`${child.title} ${child.isVirtual ? \"\" : \"Command\"}${child.tags?.length > 0 ? ` ${child.tags.map((tag) => `\\${colors.text.heading.primary(colors.black(\" ${tag} \"), true)}`).join(\" \")}` : \"\"}\\`);\n writeLine(\"\");\n writeLine(colors.text.body.secondary(splitText(\\`${formatDescription(child.description).replace(/\\.+$/, \"\").trim()}.\\`)));\n writeLine(\"\");\n `),\n\t\t\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\t\t\tcreateComponent(BaseHelpDisplay, {\n\t\t\t\t\t\t\t\tcommand: child,\n\t\t\t\t\t\t\t\tindent: 2,\n\t\t\t\t\t\t\t\tfilterGlobalOptions: true\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tcreateIntrinsic(\"hbr\", {})\n\t\t\t\t\t\t]\n\t\t\t\t\t}),\n\t\t\t\t\tmemo(() => code`help(\"Running a specific command with the help flag (via: '${getAppBin(context)}${segments && segments.length > 0 ? ` ${segments.join(\" \")}` : \"\"} <specific command> --help') will provide additional information that is specific to that command.\");\n writeLine(\"\");`)\n\t\t\t\t];\n\t\t\t}\n\t\t})\n\t];\n}\n/**\n* A component that generates the invocation of the `help` function for a command.\n*/\nfunction CommandHelpDisplay(props) {\n\tconst { command } = props;\n\tconst context = usePowerlines();\n\treturn [\n\t\tcode`writeLine(\"\"); `,\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(BaseHelpDisplay, {\n\t\t\tcommand,\n\t\t\tfilterGlobalOptions: false\n\t\t}),\n\t\tcode`writeLine(\"\"); `,\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(Show, {\n\t\t\tget when() {\n\t\t\t\treturn Object.keys(command.children).length > 0;\n\t\t\t},\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tcode`writeLine(colors.text.body.secondary(\"The following sub-commands are available:\"));\n writeLine(\"\"); `,\n\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\tcreateComponent(For, {\n\t\t\t\t\t\tget each() {\n\t\t\t\t\t\t\treturn sortCommands(command.children);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdoubleHardline: true,\n\t\t\t\t\t\tjoiner: code`writeLine(\"\"); `,\n\t\t\t\t\t\tender: code`writeLine(\"\"); `,\n\t\t\t\t\t\tchildren: (child) => [\n\t\t\t\t\t\t\tmemo(() => code`\n writeLine(colors.text.heading.primary(${child.icon ? `(isUnicodeSupported ? \" ${child.icon} \" : \"\") + ` : \"\"}\\`${child.title} ${child.isVirtual ? \"\" : \"Command\"}${child.tags?.length > 0 ? ` ${child.tags.map((tag) => `\\${colors.text.heading.primary(colors.black(\" ${tag} \"), true)}`).join(\" \")}` : \"\"}\\`);\n writeLine(\"\");\n writeLine(colors.text.body.secondary(splitText(\\`${formatDescription(child.description).replace(/\\.+$/, \"\").trim()}.\\`)));\n writeLine(\"\");\n `),\n\t\t\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\t\t\tcreateComponent(BaseHelpDisplay, {\n\t\t\t\t\t\t\t\tcommand: child,\n\t\t\t\t\t\t\t\tindent: 2,\n\t\t\t\t\t\t\t\tfilterGlobalOptions: true\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tcreateIntrinsic(\"hbr\", {})\n\t\t\t\t\t\t]\n\t\t\t\t\t}),\n\t\t\t\t\tmemo(() => code`help(\"Running a specific command with the help flag (via: '${getAppBin(context)} ${command.segments.join(\" \")} <specific command> --help') will provide additional information that is specific to that command.\");\n writeLine(\"\");`)\n\t\t\t\t];\n\t\t\t}\n\t\t})\n\t];\n}\n\n//#endregion\nexport { BaseHelpDisplay, CommandHelpDisplay, HelpCommandsDisplay, HelpOptionsDisplay, HelpUsageDisplay, VirtualCommandHelpDisplay };\n//# sourceMappingURL=display.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAeA,SAAS,iBAAiB,OAAO;CAChC,MAAM,EAAE,SAAS,SAAS,MAAM;CAChC,MAAM,UAAU,eAAe;CAC/B,MAAM,QAAQ,UAAU;AACxB,QAAO,CAAC,gBAAgB,KAAK;EAC5B,IAAI,OAAO;AACV,UAAO,OAAO,KAAK,QAAQ,OAAO,IAAI;;EAEvC,UAAU;EACV,WAAW,QAAQ,CAAC,WAAW,IAAI;;+GAE0E,IAAI,KAAK,QAAQ,SAAS,SAAS,IAAI,IAAI,QAAQ,SAAS,KAAK,YAAY,wBAAwB,qBAAqB,QAAQ,GAAG,YAAY,UAAU,IAAI,qBAAqB,QAAQ,GAAG,IAAI,UAAU,0BAA0B,QAAQ,CAAC,CAAC,KAAK,QAAQ,KAAK,CAAC,KAAK,IAAI,KAAK,KAAK,OAAO,OAAO,QAAQ,SAAS,CAAC,SAAS,IAAI,gDAAgD,KAAK,QAAQ,KAAK,SAAS,IAAI,IAAI,QAAQ,KAAK,KAAK,QAAQ,+BAA+B,WAAW,IAAI,SAAS,sBAAsB,UAAU,IAAI,SAAS,sBAAsB,WAAW,IAAI,WAAW,IAAI,QAAQ,SAAS,IAAI,IAAI,QAAQ,KAAK,IAAI,GAAG,IAAI,SAAS,sBAAsB,UAAU,IAAI,SAAS,IAAI,SAAS,IAAI,KAAK,IAAI,IAAI,SAAS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UAAU;OACpB,WAAW,IAAI;wDACkC,MAAM,OAAO,2BAA2B,MAAM,KAAK,gBAAgB,GAAG,IAAI,MAAM,MAAM,GAAG,MAAM,YAAY,KAAK,YAAY,MAAM,MAAM,SAAS,IAAI,OAAO,MAAM,KAAK,KAAK,QAAQ,iDAAiD,IAAI,aAAa,CAAC,KAAK,IAAI,KAAK,GAAG;;mEAE7P,kBAAkB,MAAM,YAAY,CAAC,QAAQ,QAAQ,GAAG,CAAC,MAAM,CAAC;;kBAEjH;OACX,gBAAgB,OAAO,EAAE,CAAC;OAC1B,gBAAgB,iBAAiB;QAChC,SAAS;QACT,QAAQ;QACR,qBAAqB;QACrB,CAAC;OACF,gBAAgB,OAAO,EAAE,CAAC;OAC1B;MACD,CAAC;KACF,WAAW,IAAI,8DAA8D,UAAU,QAAQ,CAAC,GAAG,QAAQ,SAAS,KAAK,IAAI,CAAC;wBAC3G;KACnB;;GAEF,CAAC;EACF"}
1
+ {"version":3,"file":"display.mjs","names":[],"sources":["../../../../../plugin-help/dist/components/display.mjs"],"sourcesContent":["import { createComponent, createIntrinsic, memo } from \"@alloy-js/core/jsx-runtime\";\nimport { For, Show, code, computed } from \"@alloy-js/core\";\nimport { formatDescription, formatShortDescription, getAppBin, getAppTitle, getDynamicPathSegmentName, isDynamicPathSegment, sortOptions } from \"@shell-shock/core/plugin-utils\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { CommandParameterKinds } from \"@shell-shock/core\";\nimport { useTheme } from \"@shell-shock/plugin-theme/contexts/theme\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { snakeCase } from \"@stryke/string-format/snake-case\";\n\n//#region src/components/display.tsx\n/**\n* A component that generates the usage display for a command.\n*/\nfunction HelpUsageDisplay(props) {\n\tconst { command, indent = 2 } = props;\n\tconst context = usePowerlines();\n\tconst theme = useTheme();\n\treturn [createComponent(For, {\n\t\tget each() {\n\t\t\treturn Object.keys(context.config.bin);\n\t\t},\n\t\thardline: true,\n\t\tchildren: (bin) => [memo(() => code`\n writeLine(\n colors.text.body.secondary(\\`\\${colors.text.usage.bin(\"$_ ${bin}\")}${command.segments.length > 0 ? ` ${command.segments.map((segment) => `\\${colors.text.usage.${isDynamicPathSegment(segment) ? \"dynamic\" : \"command\"}(\"${isDynamicPathSegment(segment) ? `[${snakeCase(getDynamicPathSegmentName(segment))}]` : segment}\")}`).join(\" \")}` : \"\"}${Object.values(command.children).length > 0 ? ` \\${colors.text.usage.dynamic(\"[command]\")}` : \"\"}${command.args.length > 0 ? ` ${command.args.map((arg) => `\\${colors.text.usage.args(\"<${snakeCase((arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.choices && arg.choices.length > 0 ? arg.choices.join(\"|\") : arg.kind === CommandParameterKinds.string && arg.format ? arg.format : arg.name)}${(arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.variadic ? \"...\" : \"\"}>\")}`).join(\" \")}` : \"\"} \\${colors.text.usage.options(\"[options]\")}\\`), { padding: ${theme.padding.app * indent} }\n );`), createIntrinsic(\"hbr\", {})]\n\t}), createComponent(Show, {\n\t\tget when() {\n\t\t\treturn command.args.length > 0;\n\t\t},\n\t\tget children() {\n\t\t\treturn [createIntrinsic(\"hbr\", {}), createComponent(For, {\n\t\t\t\tget each() {\n\t\t\t\t\treturn Object.keys(context.config.bin);\n\t\t\t\t},\n\t\t\t\thardline: true,\n\t\t\t\tchildren: (bin) => [memo(() => code`\n writeLine(\n colors.text.body.secondary(\\`\\${colors.text.usage.bin(\"$_ ${bin}\")}${command.segments.length > 0 ? ` ${command.segments.map((segment) => `\\${colors.text.usage.${isDynamicPathSegment(segment) ? \"dynamic\" : \"command\"}(\"${isDynamicPathSegment(segment) ? `[${snakeCase(getDynamicPathSegmentName(segment))}]` : segment}\")}`).join(\" \")}` : \"\"}${Object.values(command.children).length > 0 ? ` \\${colors.text.usage.dynamic(\"[command]\")}` : \"\"} \\${colors.text.usage.options(\"[options]\")}${command.args.length > 0 ? ` ${command.args.map((arg) => `\\${colors.text.usage.args(\"<${snakeCase((arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.choices && arg.choices.length > 0 ? arg.choices.join(\"|\") : arg.kind === CommandParameterKinds.string && arg.format ? arg.format : arg.name)}${(arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.variadic ? \"...\" : \"\"}>\")}`).join(\" \")}` : \"\"}\\`), { padding: ${theme.padding.app * indent} }\n );`), createIntrinsic(\"hbr\", {})]\n\t\t\t})];\n\t\t}\n\t})];\n}\n/**\n* A component that generates the options table display for a command.\n*/\nfunction HelpOptionsDisplay(props) {\n\tconst { options } = props;\n\tconst context = usePowerlines();\n\treturn [\n\t\tcode`table([ `,\n\t\tcreateIntrinsic(\"hbr\", {}),\n\t\tcreateComponent(For, {\n\t\t\tget each() {\n\t\t\t\treturn sortOptions(options);\n\t\t\t},\n\t\t\thardline: true,\n\t\t\tchildren: (option) => {\n\t\t\t\tconst flags = [];\n\t\t\t\tconst names = [];\n\t\t\t\tif (option.name.length === 1) flags.push(`-${option.name}`);\n\t\t\t\telse names.push(`--${kebabCase(option.name)}`);\n\t\t\t\toption.alias.forEach((alias) => {\n\t\t\t\t\tif (alias.length === 1) flags.push(`-${alias}`);\n\t\t\t\t\telse names.push(`--${kebabCase(alias)}`);\n\t\t\t\t});\n\t\t\t\treturn code`[{ value: colors.text.body.primary(\"${flags.length > 0 ? `${flags.sort().join(\", \")}${names.length > 0 ? \", \" : \"\"}` : \"\"}${names.length > 0 ? names.sort().join(\", \") : \"\"}${option.kind === CommandParameterKinds.string ? ` <${snakeCase(option.choices && option.choices.length > 0 ? option.choices.join(\"|\") : option.format ? option.format : option.name)}${option.variadic ? \"...\" : \"\"}>` : option.kind === CommandParameterKinds.number ? ` <${snakeCase(option.choices && option.choices.length > 0 ? option.choices.join(\"|\") : option.name)}${option.variadic ? \"...\" : \"\"}>` : \"\"}\"), align: \"right\", border: \"none\", maxWidth: \"1/3\" }, { value: colors.text.body.tertiary(\\`${formatShortDescription(option.description).replace(/\\.+$/, \"\").trim()}${option.env || option.default !== void 0 ? ` (${option.env ? `env: ${context.config.appSpecificEnvPrefix}_${option.env}${option.default !== void 0 ? \", \" : \"\"}` : \"\"}${option.default !== void 0 ? `default: ${JSON.stringify(option.default).replace(/\"/g, \"\\\\\\\"\")}` : \"\"})` : \"\"}.\\`), align: \"left\", border: \"none\" }], `;\n\t\t\t}\n\t\t}),\n\t\tcreateIntrinsic(\"hbr\", {}),\n\t\tcode` ]); `\n\t];\n}\n/**\n* A component that generates the commands table display for a command.\n*/\nfunction HelpCommandsDisplay(props) {\n\tconst { commands } = props;\n\treturn [\n\t\tcode`table([ `,\n\t\tcreateIntrinsic(\"hbr\", {}),\n\t\tcreateComponent(For, {\n\t\t\tget each() {\n\t\t\t\treturn Object.values(commands);\n\t\t\t},\n\t\t\thardline: true,\n\t\t\tchildren: (child) => code`[{ value: colors.text.body.primary(\"${child.name}\"), align: \"right\", border: \"none\" }, { value: colors.text.body.tertiary(\\`${formatShortDescription(child.description).replace(/\\.+$/, \"\").trim()}.\\`), align: \"left\", border: \"none\" }], `\n\t\t}),\n\t\tcreateIntrinsic(\"hbr\", {}),\n\t\tcode` ]); `\n\t];\n}\n/**\n* A component that generates the `help` function declaration for a command.\n*/\nfunction BaseHelpDisplay(props) {\n\tconst { command, indent = 1, filterGlobalOptions = false } = props;\n\tconst theme = useTheme();\n\tconst context = usePowerlines();\n\tconst options = computed(() => filterGlobalOptions ? Object.values(command.options).filter((option) => !context.options.some((globalOption) => globalOption.name === option.name || option.alias.includes(globalOption.name) || globalOption.alias?.includes(option.name) || globalOption.alias?.some((alias) => option.alias.includes(alias)))) : Object.values(command.options));\n\treturn [\n\t\tmemo(() => code`writeLine(colors.bold(colors.text.heading.secondary(\"Usage:\"))${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : \"\"});`),\n\t\tcreateIntrinsic(\"hbr\", {}),\n\t\tcreateComponent(HelpUsageDisplay, {\n\t\t\tcommand,\n\t\t\tindent\n\t\t}),\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(Show, {\n\t\t\tget when() {\n\t\t\t\treturn options.value.length > 0;\n\t\t\t},\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tmemo(() => code`writeLine(\"\");\n writeLine(colors.bold(colors.text.heading.secondary(\"Options:\"))${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : \"\"});`),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(HelpOptionsDisplay, { get options() {\n\t\t\t\t\t\treturn options.value;\n\t\t\t\t\t} }),\n\t\t\t\t\tcreateComponent(Spacing, {})\n\t\t\t\t];\n\t\t\t}\n\t\t}),\n\t\tcreateComponent(Show, {\n\t\t\tget when() {\n\t\t\t\treturn Object.keys(command.children).length > 0;\n\t\t\t},\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tmemo(() => code`writeLine(\"\");\n writeLine(colors.bold(colors.text.heading.secondary(\"Commands:\"))${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : \"\"});`),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(HelpCommandsDisplay, { get commands() {\n\t\t\t\t\t\treturn command.children;\n\t\t\t\t\t} }),\n\t\t\t\t\tcreateComponent(Spacing, {})\n\t\t\t\t];\n\t\t\t}\n\t\t}),\n\t\tcreateComponent(Show, {\n\t\t\tget when() {\n\t\t\t\treturn isSetString(command.reference);\n\t\t\t},\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tmemo(() => code`writeLine(\"\");\n writeLine(colors.text.heading.tertiary(\\`More information about this command can be found in the reference documentation at \\${link(\"${command.reference}\")}\\`)${indent > 1 ? `, { padding: ${theme.padding.app * indent} }` : \"\"});`),\n\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\tcreateComponent(Spacing, {})\n\t\t\t\t];\n\t\t\t}\n\t\t})\n\t];\n}\nfunction sortCommands(commands) {\n\treturn Object.values(commands).sort((a, b) => {\n\t\tif (a.tags.some((tag) => tag.toLowerCase() === \"deprecated\") && !b.tags.some((tag) => tag.toLowerCase() === \"deprecated\")) return 1;\n\t\telse if (!a.tags.some((tag) => tag.toLowerCase() === \"deprecated\") && b.tags.some((tag) => tag.toLowerCase() === \"deprecated\")) return -1;\n\t\telse if (a.tags.some((tag) => tag.toLowerCase() === \"experimental\") && !b.tags.some((tag) => tag.toLowerCase() === \"experimental\")) return 1;\n\t\telse if (!a.tags.some((tag) => tag.toLowerCase() === \"experimental\") && b.tags.some((tag) => tag.toLowerCase() === \"experimental\")) return -1;\n\t\telse if (a.tags.some((tag) => tag.toLowerCase() === \"utility\") && !b.tags.some((tag) => tag.toLowerCase() === \"utility\")) return 1;\n\t\telse if (!a.tags.some((tag) => tag.toLowerCase() === \"utility\") && b.tags.some((tag) => tag.toLowerCase() === \"utility\")) return -1;\n\t\treturn a.name.localeCompare(b.name);\n\t});\n}\n/**\n* A component that generates the invocation of the `help` function for a command.\n*/\nfunction VirtualCommandHelpDisplay(props) {\n\tconst { options, segments, commands } = props;\n\tconst context = usePowerlines();\n\treturn [\n\t\tcreateIntrinsic(\"hbr\", {}),\n\t\tcode`writeLine(colors.bold(colors.text.heading.secondary(\"Global Options:\")));`,\n\t\tcreateIntrinsic(\"hbr\", {}),\n\t\tcreateComponent(HelpOptionsDisplay, { options }),\n\t\tcode`writeLine(\"\"); `,\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(Show, {\n\t\t\tget when() {\n\t\t\t\treturn Object.keys(commands).length > 0;\n\t\t\t},\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tmemo(() => code`writeLine(colors.text.body.secondary(\"The following commands are available through the ${getAppTitle(context, true)} command-line interface:\"));\n writeLine(\"\"); `),\n\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\tcreateComponent(For, {\n\t\t\t\t\t\tget each() {\n\t\t\t\t\t\t\treturn sortCommands(commands);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdoubleHardline: true,\n\t\t\t\t\t\tjoiner: code`writeLine(\"\"); `,\n\t\t\t\t\t\tender: code`writeLine(\"\"); `,\n\t\t\t\t\t\tchildren: (child) => [\n\t\t\t\t\t\t\tmemo(() => code`\n writeLine(colors.text.heading.primary(${child.icon ? `(isUnicodeSupported ? \" ${child.icon} \" : \"\") + ` : \"\"}\\`${child.title} ${child.isVirtual ? \"\" : \"Command\"}${child.tags?.length > 0 ? ` - ${child.tags.map((tag) => `\\${colors.text.tags.${camelCase(tag)} ? colors.text.tags.${camelCase(tag)}(colors.inverse(\" ${tag} \")) : colors.text.tags.$default(colors.inverse(\" ${tag} \"))}`).join(\" \")}` : \"\"}\\`);\n writeLine(\"\");\n writeLine(colors.text.body.tertiary(splitText(\\`${formatDescription(child.description).replace(/\\.+$/, \"\").trim()}.\\`)));\n writeLine(\"\");\n `),\n\t\t\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\t\t\tcreateComponent(BaseHelpDisplay, {\n\t\t\t\t\t\t\t\tcommand: child,\n\t\t\t\t\t\t\t\tindent: 2,\n\t\t\t\t\t\t\t\tfilterGlobalOptions: true\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tcreateIntrinsic(\"hbr\", {})\n\t\t\t\t\t\t]\n\t\t\t\t\t}),\n\t\t\t\t\tmemo(() => code`help(\"Running a specific command with the help flag (via: '${getAppBin(context)}${segments && segments.length > 0 ? ` ${segments.join(\" \")}` : \"\"} <specific command> --help') will provide additional information that is specific to that command.\");\n writeLine(\"\");`)\n\t\t\t\t];\n\t\t\t}\n\t\t})\n\t];\n}\n/**\n* A component that generates the invocation of the `help` function for a command.\n*/\nfunction CommandHelpDisplay(props) {\n\tconst { command } = props;\n\tconst context = usePowerlines();\n\treturn [\n\t\tcode`writeLine(\"\"); `,\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(BaseHelpDisplay, {\n\t\t\tcommand,\n\t\t\tfilterGlobalOptions: false\n\t\t}),\n\t\tcode`writeLine(\"\"); `,\n\t\tcreateComponent(Spacing, {}),\n\t\tcreateComponent(Show, {\n\t\t\tget when() {\n\t\t\t\treturn Object.keys(command.children).length > 0;\n\t\t\t},\n\t\t\tget children() {\n\t\t\t\treturn [\n\t\t\t\t\tcode`writeLine(colors.text.body.secondary(\"The following sub-commands are available:\"));\n writeLine(\"\"); `,\n\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\tcreateComponent(For, {\n\t\t\t\t\t\tget each() {\n\t\t\t\t\t\t\treturn sortCommands(command.children);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdoubleHardline: true,\n\t\t\t\t\t\tjoiner: code`writeLine(\"\"); `,\n\t\t\t\t\t\tender: code`writeLine(\"\"); `,\n\t\t\t\t\t\tchildren: (child) => [\n\t\t\t\t\t\t\tmemo(() => code`\n writeLine(colors.text.heading.primary(${child.icon ? `(isUnicodeSupported ? \" ${child.icon} \" : \"\") + ` : \"\"}\\`${child.title} ${child.isVirtual ? \"\" : \"Command\"}${child.tags?.length > 0 ? ` - ${child.tags.map((tag) => `\\${colors.text.tags.${camelCase(tag)} ? colors.text.tags.${camelCase(tag)}(colors.inverse(\" ${tag} \")) : colors.text.tags.$default(colors.inverse(\" ${tag} \"))}`).join(\" \")}` : \"\"}\\`);\n writeLine(\"\");\n writeLine(colors.text.body.tertiary(splitText(\\`${formatDescription(child.description).replace(/\\.+$/, \"\").trim()}.\\`)));\n writeLine(\"\");\n `),\n\t\t\t\t\t\t\tcreateIntrinsic(\"hbr\", {}),\n\t\t\t\t\t\t\tcreateComponent(BaseHelpDisplay, {\n\t\t\t\t\t\t\t\tcommand: child,\n\t\t\t\t\t\t\t\tindent: 2,\n\t\t\t\t\t\t\t\tfilterGlobalOptions: true\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tcreateIntrinsic(\"hbr\", {})\n\t\t\t\t\t\t]\n\t\t\t\t\t}),\n\t\t\t\t\tmemo(() => code`help(\"Running a specific command with the help flag (via: '${getAppBin(context)} ${command.segments.join(\" \")} <specific command> --help') will provide additional information that is specific to that command.\");\n writeLine(\"\");`)\n\t\t\t\t];\n\t\t\t}\n\t\t})\n\t];\n}\n\n//#endregion\nexport { BaseHelpDisplay, CommandHelpDisplay, HelpCommandsDisplay, HelpOptionsDisplay, HelpUsageDisplay, VirtualCommandHelpDisplay };\n//# sourceMappingURL=display.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAgBA,SAAS,iBAAiB,OAAO;CAChC,MAAM,EAAE,SAAS,SAAS,MAAM;CAChC,MAAM,UAAU,eAAe;CAC/B,MAAM,QAAQ,UAAU;AACxB,QAAO,CAAC,gBAAgB,KAAK;EAC5B,IAAI,OAAO;AACV,UAAO,OAAO,KAAK,QAAQ,OAAO,IAAI;;EAEvC,UAAU;EACV,WAAW,QAAQ,CAAC,WAAW,IAAI;;oEAE+B,IAAI,KAAK,QAAQ,SAAS,SAAS,IAAI,IAAI,QAAQ,SAAS,KAAK,YAAY,wBAAwB,qBAAqB,QAAQ,GAAG,YAAY,UAAU,IAAI,qBAAqB,QAAQ,GAAG,IAAI,UAAU,0BAA0B,QAAQ,CAAC,CAAC,KAAK,QAAQ,KAAK,CAAC,KAAK,IAAI,KAAK,KAAK,OAAO,OAAO,QAAQ,SAAS,CAAC,SAAS,IAAI,gDAAgD,KAAK,QAAQ,KAAK,SAAS,IAAI,IAAI,QAAQ,KAAK,KAAK,QAAQ,+BAA+B,WAAW,IAAI,SAAS,sBAAsB,UAAU,IAAI,SAAS,sBAAsB,WAAW,IAAI,WAAW,IAAI,QAAQ,SAAS,IAAI,IAAI,QAAQ,KAAK,IAAI,GAAG,I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EAAE,CAAC;KAC5B,gBAAgB,KAAK;MACpB,IAAI,OAAO;AACV,cAAO,aAAa,QAAQ,SAAS;;MAEtC,gBAAgB;MAChB,QAAQ,IAAI;MACZ,OAAO,IAAI;MACX,WAAW,UAAU;OACpB,WAAW,IAAI;wDACkC,MAAM,OAAO,2BAA2B,MAAM,KAAK,gBAAgB,GAAG,IAAI,MAAM,MAAM,GAAG,MAAM,YAAY,KAAK,YAAY,MAAM,MAAM,SAAS,IAAI,MAAM,MAAM,KAAK,KAAK,QAAQ,uBAAuB,UAAU,IAAI,CAAC,sBAAsB,UAAU,IAAI,CAAC,oBAAoB,IAAI,oDAAoD,IAAI,OAAO,CAAC,KAAK,IAAI,KAAK,GAAG;;kEAE7V,kBAAkB,MAAM,YAAY,CAAC,QAAQ,QAAQ,GAAG,CAAC,MAAM,CAAC;;kBAEhH;OACX,gBAAgB,OAAO,EAAE,CAAC;OAC1B,gBAAgB,iBAAiB;QAChC,SAAS;QACT,QAAQ;QACR,qBAAqB;QACrB,CAAC;OACF,gBAAgB,OAAO,EAAE,CAAC;OAC1B;MACD,CAAC;KACF,WAAW,IAAI,8DAA8D,UAAU,QAAQ,CAAC,GAAG,QAAQ,SAAS,KAAK,IAAI,CAAC;wBAC3G;KACnB;;GAEF,CAAC;EACF"}
@@ -4,13 +4,13 @@ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
4
4
  let _alloy_js_core = require("@alloy-js/core");
5
5
  let _alloy_js_typescript = require("@alloy-js/typescript");
6
6
  let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
7
- let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
8
7
  let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
9
- let _powerlines_plugin_alloy_typescript_components_builtin_file = require("@powerlines/plugin-alloy/typescript/components/builtin-file");
10
- let _stryke_path = require("@stryke/path");
8
+ let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
11
9
  let defu = require("defu");
12
10
  defu = require_runtime.__toESM(defu);
13
11
  let _powerlines_plugin_alloy_typescript = require("@powerlines/plugin-alloy/typescript");
12
+ let _powerlines_plugin_alloy_typescript_components_builtin_file = require("@powerlines/plugin-alloy/typescript/components/builtin-file");
13
+ let _stryke_path = require("@stryke/path");
14
14
 
15
15
  //#region ../plugin-help/dist/components/help-builtin.mjs
16
16
  /**
@@ -35,7 +35,8 @@ function HelpBuiltin(props) {
35
35
  "writeLine",
36
36
  "colors",
37
37
  "help",
38
- "table"
38
+ "table",
39
+ "link"
39
40
  ]
40
41
  });
41
42
  },
@@ -3,12 +3,12 @@ import { createComponent, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
3
3
  import { Show, code, splitProps } from "@alloy-js/core";
4
4
  import { FunctionDeclaration, IfStatement } from "@alloy-js/typescript";
5
5
  import { getAppTitle, isDynamicPathSegment } from "@shell-shock/core/plugin-utils";
6
- import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
7
6
  import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
8
- import { BuiltinFile } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
9
- import { joinPaths } from "@stryke/path";
7
+ import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
10
8
  import defu from "defu";
11
9
  import "@powerlines/plugin-alloy/typescript";
10
+ import { BuiltinFile } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
11
+ import { joinPaths } from "@stryke/path";
12
12
 
13
13
  //#region ../plugin-help/dist/components/help-builtin.mjs
14
14
  /**
@@ -33,7 +33,8 @@ function HelpBuiltin(props) {
33
33
  "writeLine",
34
34
  "colors",
35
35
  "help",
36
- "table"
36
+ "table",
37
+ "link"
37
38
  ]
38
39
  });
39
40
  },
@@ -1 +1 @@
1
- {"version":3,"file":"help-builtin.mjs","names":[],"sources":["../../../../../plugin-help/dist/components/help-builtin.mjs"],"sourcesContent":["import { CommandHelpDisplay, VirtualCommandHelpDisplay } from \"./display.mjs\";\nimport { createComponent, memo, mergeProps } from \"@alloy-js/core/jsx-runtime\";\nimport { Show, code, splitProps } from \"@alloy-js/core\";\nimport { getAppTitle, isDynamicPathSegment } from \"@shell-shock/core/plugin-utils\";\nimport defu from \"defu\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { FunctionDeclaration, IfStatement } from \"@alloy-js/typescript\";\nimport { TSDoc, TSDocRemarks, TSDocReturns } from \"@powerlines/plugin-alloy/typescript\";\nimport { BuiltinFile } from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport { joinPaths } from \"@stryke/path\";\n\n//#region src/components/help-builtin.tsx\n/**\n* The `updateVersionCheckFile` handler function declaration code for the Shell Shock project.\n*/\nfunction HelpFunctionDeclaration() {\n\treturn [createComponent(TSDoc, {\n\t\theading: \"A helper function that updates the version check file.\",\n\t\tget children() {\n\t\t\treturn [\n\t\t\t\tcreateComponent(TSDocRemarks, { children: `This function is used to update the version check file with the current timestamp. It can be used in the CLI upgrade command to record the last time a check for updates was performed. The function writes a \"version-check.json\" file in the data directory, which contains a timestamp of the last check for updates.` }),\n\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\tcreateComponent(TSDocReturns, { children: `A promise that resolves to a boolean indicating whether a check for updates is required.` })\n\t\t\t];\n\t\t}\n\t}), createComponent(FunctionDeclaration, {\n\t\t\"export\": true,\n\t\tasync: true,\n\t\tname: \"updateVersionCheckFile\",\n\t\treturnType: \"void\",\n\t\tget children() {\n\t\t\treturn [createComponent(IfStatement, {\n\t\t\t\tcondition: code`!existsSync(paths.data)`,\n\t\t\t\tchildren: code`await mkdir(paths.data, { recursive: true }); `\n\t\t\t}), code`await writeFile(join(paths.data, \"version-check.json\"), JSON.stringify({ timestamp: new Date().getTime() }), \"utf8\"); `];\n\t\t}\n\t})];\n}\n/**\n* A built-in help module for Shell Shock.\n*/\nfunction HelpBuiltin(props) {\n\tconst [{ command, children }, rest] = splitProps(props, [\"command\", \"children\"]);\n\tconst context = usePowerlines();\n\treturn createComponent(BuiltinFile, mergeProps({\n\t\tget id() {\n\t\t\treturn joinPaths(\"help\", ...command.segments.filter((segment) => !isDynamicPathSegment(segment)));\n\t\t},\n\t\tget description() {\n\t\t\treturn memo(() => !!command.path)() ? `A collection of utility functions that assist in displaying help information for the ${command.title} command.` : `A collection of utility functions that assist in displaying help information for the ${getAppTitle(context, true)} command-line interface application.`;\n\t\t}\n\t}, rest, {\n\t\tget builtinImports() {\n\t\t\treturn defu(rest.builtinImports ?? {}, {\n\t\t\t\tutils: [\"isUnicodeSupported\"],\n\t\t\t\tconsole: [\n\t\t\t\t\t\"splitText\",\n\t\t\t\t\t\"writeLine\",\n\t\t\t\t\t\"colors\",\n\t\t\t\t\t\"help\",\n\t\t\t\t\t\"table\"\n\t\t\t\t]\n\t\t\t});\n\t\t},\n\t\tget children() {\n\t\t\treturn [\n\t\t\t\tcreateComponent(FunctionDeclaration, {\n\t\t\t\t\t\"export\": true,\n\t\t\t\t\tname: \"showHelp\",\n\t\t\t\t\tget doc() {\n\t\t\t\t\t\treturn `Display help information for the ${command.path ? `${command.title} command` : `${getAppTitle(context, true)} application`}.`;\n\t\t\t\t\t},\n\t\t\t\t\tparameters: [],\n\t\t\t\t\tget children() {\n\t\t\t\t\t\treturn createComponent(Show, {\n\t\t\t\t\t\t\tget when() {\n\t\t\t\t\t\t\t\treturn !command.isVirtual;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tget fallback() {\n\t\t\t\t\t\t\t\treturn createComponent(VirtualCommandHelpDisplay, {\n\t\t\t\t\t\t\t\t\tget options() {\n\t\t\t\t\t\t\t\t\t\treturn Object.values(command.options);\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tget commands() {\n\t\t\t\t\t\t\t\t\t\treturn command.children ?? {};\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tget children() {\n\t\t\t\t\t\t\t\treturn createComponent(CommandHelpDisplay, { command });\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\tcreateComponent(Show, {\n\t\t\t\t\tget when() {\n\t\t\t\t\t\treturn Boolean(children);\n\t\t\t\t\t},\n\t\t\t\t\tchildren\n\t\t\t\t})\n\t\t\t];\n\t\t}\n\t}));\n}\n\n//#endregion\nexport { HelpBuiltin, HelpFunctionDeclaration };\n//# sourceMappingURL=help-builtin.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AA0CA,SAAS,YAAY,OAAO;CAC3B,MAAM,CAAC,EAAE,SAAS,YAAY,QAAQ,WAAW,OAAO,CAAC,WAAW,WAAW,CAAC;CAChF,MAAM,UAAU,eAAe;AAC/B,QAAO,gBAAgB,aAAa,WAAW;EAC9C,IAAI,KAAK;AACR,UAAO,UAAU,QAAQ,GAAG,QAAQ,SAAS,QAAQ,YAAY,CAAC,qBAAqB,QAAQ,CAAC,CAAC;;EAElG,IAAI,cAAc;AACjB,UAAO,WAAW,CAAC,CAAC,QAAQ,KAAK,EAAE,GAAG,wFAAwF,QAAQ,MAAM,aAAa,wFAAwF,YAAY,SAAS,KAAK,CAAC;;EAE7Q,EAAE,MAAM;EACR,IAAI,iBAAiB;AACpB,UAAO,KAAK,KAAK,kBAAkB,EAAE,EAAE;IACtC,OAAO,CAAC,qBAAqB;IAC7B,SAAS;KACR;KACA;KACA;KACA;KACA;KACA;IACD,CAAC;;EAEH,IAAI,WAAW;AACd,UAAO;IACN,gBAAgB,qBAAqB;KACpC,UAAU;KACV,MAAM;KACN,IAAI,MAAM;AACT,aAAO,oCAAoC,QAAQ,OAAO,GAAG,QAAQ,MAAM,YAAY,GAAG,YAAY,SAAS,KAAK,CAAC,cAAc;;KAEpI,YAAY,EAAE;KACd,IAAI,WAAW;AACd,aAAO,gBAAgB,MAAM;OAC5B,IAAI,OAAO;AACV,eAAO,CAAC,QAAQ;;OAEjB,IAAI,WAAW;AACd,eAAO,gBAAgB,2BAA2B;SACjD,IAAI,UAAU;AACb,iBAAO,OAAO,OAAO,QAAQ,QAAQ;;SAEtC,IAAI,WAAW;AACd,iBAAO,QAAQ,YAAY,EAAE;;SAE9B,CAAC;;OAEH,IAAI,WAAW;AACd,eAAO,gBAAgB,oBAAoB,EAAE,SAAS,CAAC;;OAExD,CAAC;;KAEH,CAAC;IACF,gBAAgB,SAAS,EAAE,CAAC;IAC5B,gBAAgB,MAAM;KACrB,IAAI,OAAO;AACV,aAAO,QAAQ,SAAS;;KAEzB;KACA,CAAC;IACF;;EAEF,CAAC,CAAC"}
1
+ {"version":3,"file":"help-builtin.mjs","names":[],"sources":["../../../../../plugin-help/dist/components/help-builtin.mjs"],"sourcesContent":["import { CommandHelpDisplay, VirtualCommandHelpDisplay } from \"./display.mjs\";\nimport { createComponent, memo, mergeProps } from \"@alloy-js/core/jsx-runtime\";\nimport { Show, code, splitProps } from \"@alloy-js/core\";\nimport { getAppTitle, isDynamicPathSegment } from \"@shell-shock/core/plugin-utils\";\nimport defu from \"defu\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { FunctionDeclaration, IfStatement } from \"@alloy-js/typescript\";\nimport { TSDoc, TSDocRemarks, TSDocReturns } from \"@powerlines/plugin-alloy/typescript\";\nimport { BuiltinFile } from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport { joinPaths } from \"@stryke/path\";\n\n//#region src/components/help-builtin.tsx\n/**\n* The `updateVersionCheckFile` handler function declaration code for the Shell Shock project.\n*/\nfunction HelpFunctionDeclaration() {\n\treturn [createComponent(TSDoc, {\n\t\theading: \"A helper function that updates the version check file.\",\n\t\tget children() {\n\t\t\treturn [\n\t\t\t\tcreateComponent(TSDocRemarks, { children: `This function is used to update the version check file with the current timestamp. It can be used in the CLI upgrade command to record the last time a check for updates was performed. The function writes a \"version-check.json\" file in the data directory, which contains a timestamp of the last check for updates.` }),\n\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\tcreateComponent(TSDocReturns, { children: `A promise that resolves to a boolean indicating whether a check for updates is required.` })\n\t\t\t];\n\t\t}\n\t}), createComponent(FunctionDeclaration, {\n\t\t\"export\": true,\n\t\tasync: true,\n\t\tname: \"updateVersionCheckFile\",\n\t\treturnType: \"void\",\n\t\tget children() {\n\t\t\treturn [createComponent(IfStatement, {\n\t\t\t\tcondition: code`!existsSync(paths.data)`,\n\t\t\t\tchildren: code`await mkdir(paths.data, { recursive: true }); `\n\t\t\t}), code`await writeFile(join(paths.data, \"version-check.json\"), JSON.stringify({ timestamp: new Date().getTime() }), \"utf8\"); `];\n\t\t}\n\t})];\n}\n/**\n* A built-in help module for Shell Shock.\n*/\nfunction HelpBuiltin(props) {\n\tconst [{ command, children }, rest] = splitProps(props, [\"command\", \"children\"]);\n\tconst context = usePowerlines();\n\treturn createComponent(BuiltinFile, mergeProps({\n\t\tget id() {\n\t\t\treturn joinPaths(\"help\", ...command.segments.filter((segment) => !isDynamicPathSegment(segment)));\n\t\t},\n\t\tget description() {\n\t\t\treturn memo(() => !!command.path)() ? `A collection of utility functions that assist in displaying help information for the ${command.title} command.` : `A collection of utility functions that assist in displaying help information for the ${getAppTitle(context, true)} command-line interface application.`;\n\t\t}\n\t}, rest, {\n\t\tget builtinImports() {\n\t\t\treturn defu(rest.builtinImports ?? {}, {\n\t\t\t\tutils: [\"isUnicodeSupported\"],\n\t\t\t\tconsole: [\n\t\t\t\t\t\"splitText\",\n\t\t\t\t\t\"writeLine\",\n\t\t\t\t\t\"colors\",\n\t\t\t\t\t\"help\",\n\t\t\t\t\t\"table\",\n\t\t\t\t\t\"link\"\n\t\t\t\t]\n\t\t\t});\n\t\t},\n\t\tget children() {\n\t\t\treturn [\n\t\t\t\tcreateComponent(FunctionDeclaration, {\n\t\t\t\t\t\"export\": true,\n\t\t\t\t\tname: \"showHelp\",\n\t\t\t\t\tget doc() {\n\t\t\t\t\t\treturn `Display help information for the ${command.path ? `${command.title} command` : `${getAppTitle(context, true)} application`}.`;\n\t\t\t\t\t},\n\t\t\t\t\tparameters: [],\n\t\t\t\t\tget children() {\n\t\t\t\t\t\treturn createComponent(Show, {\n\t\t\t\t\t\t\tget when() {\n\t\t\t\t\t\t\t\treturn !command.isVirtual;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tget fallback() {\n\t\t\t\t\t\t\t\treturn createComponent(VirtualCommandHelpDisplay, {\n\t\t\t\t\t\t\t\t\tget options() {\n\t\t\t\t\t\t\t\t\t\treturn Object.values(command.options);\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tget commands() {\n\t\t\t\t\t\t\t\t\t\treturn command.children ?? {};\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tget children() {\n\t\t\t\t\t\t\t\treturn createComponent(CommandHelpDisplay, { command });\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\tcreateComponent(Show, {\n\t\t\t\t\tget when() {\n\t\t\t\t\t\treturn Boolean(children);\n\t\t\t\t\t},\n\t\t\t\t\tchildren\n\t\t\t\t})\n\t\t\t];\n\t\t}\n\t}));\n}\n\n//#endregion\nexport { HelpBuiltin, HelpFunctionDeclaration };\n//# sourceMappingURL=help-builtin.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AA0CA,SAAS,YAAY,OAAO;CAC3B,MAAM,CAAC,EAAE,SAAS,YAAY,QAAQ,WAAW,OAAO,CAAC,WAAW,WAAW,CAAC;CAChF,MAAM,UAAU,eAAe;AAC/B,QAAO,gBAAgB,aAAa,WAAW;EAC9C,IAAI,KAAK;AACR,UAAO,UAAU,QAAQ,GAAG,QAAQ,SAAS,QAAQ,YAAY,CAAC,qBAAqB,QAAQ,CAAC,CAAC;;EAElG,IAAI,cAAc;AACjB,UAAO,WAAW,CAAC,CAAC,QAAQ,KAAK,EAAE,GAAG,wFAAwF,QAAQ,MAAM,aAAa,wFAAwF,YAAY,SAAS,KAAK,CAAC;;EAE7Q,EAAE,MAAM;EACR,IAAI,iBAAiB;AACpB,UAAO,KAAK,KAAK,kBAAkB,EAAE,EAAE;IACtC,OAAO,CAAC,qBAAqB;IAC7B,SAAS;KACR;KACA;KACA;KACA;KACA;KACA;KACA;IACD,CAAC;;EAEH,IAAI,WAAW;AACd,UAAO;IACN,gBAAgB,qBAAqB;KACpC,UAAU;KACV,MAAM;KACN,IAAI,MAAM;AACT,aAAO,oCAAoC,QAAQ,OAAO,GAAG,QAAQ,MAAM,YAAY,GAAG,YAAY,SAAS,KAAK,CAAC,cAAc;;KAEpI,YAAY,EAAE;KACd,IAAI,WAAW;AACd,aAAO,gBAAgB,MAAM;OAC5B,IAAI,OAAO;AACV,eAAO,CAAC,QAAQ;;OAEjB,IAAI,WAAW;AACd,eAAO,gBAAgB,2BAA2B;SACjD,IAAI,UAAU;AACb,iBAAO,OAAO,OAAO,QAAQ,QAAQ;;SAEtC,IAAI,WAAW;AACd,iBAAO,QAAQ,YAAY,EAAE;;SAE9B,CAAC;;OAEH,IAAI,WAAW;AACd,eAAO,gBAAgB,oBAAoB,EAAE,SAAS,CAAC;;OAExD,CAAC;;KAEH,CAAC;IACF,gBAAgB,SAAS,EAAE,CAAC;IAC5B,gBAAgB,MAAM;KACrB,IAAI,OAAO;AACV,aAAO,QAAQ,SAAS;;KAEzB;KACA,CAAC;IACF;;EAEF,CAAC,CAAC"}
@@ -3,8 +3,8 @@ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
3
3
  let _alloy_js_core = require("@alloy-js/core");
4
4
  let _alloy_js_typescript = require("@alloy-js/typescript");
5
5
  let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
6
- let _stryke_path = require("@stryke/path");
7
6
  let _powerlines_plugin_alloy_typescript = require("@powerlines/plugin-alloy/typescript");
7
+ let _stryke_path = require("@stryke/path");
8
8
  let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
9
9
  let _powerlines_plugin_alloy_core = require("@powerlines/plugin-alloy/core");
10
10
  let _powerlines_plugin_alloy_typescript_components_tsdoc = require("@powerlines/plugin-alloy/typescript/components/tsdoc");
@@ -2,8 +2,8 @@ import { createComponent } from "@alloy-js/core/jsx-runtime";
2
2
  import { code } from "@alloy-js/core";
3
3
  import { FunctionDeclaration, InterfaceDeclaration } from "@alloy-js/typescript";
4
4
  import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
5
- import { joinPaths } from "@stryke/path";
6
5
  import { InterfaceMember, TypescriptFile } from "@powerlines/plugin-alloy/typescript";
6
+ import { joinPaths } from "@stryke/path";
7
7
  import { ReflectionKind } from "@powerlines/deepkit/vendor/type";
8
8
  import { Spacing } from "@powerlines/plugin-alloy/core";
9
9
  import { TSDoc, TSDocDefaultValue, TSDocRemarks } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
@@ -7,14 +7,14 @@ let _alloy_js_core = require("@alloy-js/core");
7
7
  let _powerlines_plugin_alloy_core_components = require("@powerlines/plugin-alloy/core/components");
8
8
  let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
9
9
  let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
10
- let defu = require("defu");
11
- defu = require_runtime.__toESM(defu);
12
10
  let _shell_shock_plugin_console = require("@shell-shock/plugin-console");
13
11
  _shell_shock_plugin_console = require_runtime.__toESM(_shell_shock_plugin_console);
12
+ let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
13
+ let defu = require("defu");
14
+ defu = require_runtime.__toESM(defu);
14
15
  let _shell_shock_plugin_theme = require("@shell-shock/plugin-theme");
15
16
  _shell_shock_plugin_theme = require_runtime.__toESM(_shell_shock_plugin_theme);
16
17
  let _stryke_path_join = require("@stryke/path/join");
17
- let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
18
18
 
19
19
  //#region ../plugin-help/dist/index.mjs
20
20
  /**