@shell-shock/preset-cli 0.9.7 → 0.9.9

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 (52) hide show
  1. package/dist/components/banner-builtin.cjs +2 -2
  2. package/dist/components/banner-builtin.d.cts.map +1 -1
  3. package/dist/components/banner-builtin.d.mts.map +1 -1
  4. package/dist/components/banner-builtin.mjs +2 -2
  5. package/dist/components/banner-builtin.mjs.map +1 -1
  6. package/dist/components/command-entry.cjs +32 -23
  7. package/dist/components/command-entry.mjs +31 -22
  8. package/dist/components/command-entry.mjs.map +1 -1
  9. package/dist/components/command-router.cjs +3 -3
  10. package/dist/components/command-router.mjs +3 -3
  11. package/dist/components/command-router.mjs.map +1 -1
  12. package/dist/components/upgrade-builtin.cjs +8 -9
  13. package/dist/components/upgrade-builtin.mjs +8 -9
  14. package/dist/components/upgrade-builtin.mjs.map +1 -1
  15. package/dist/components/virtual-command-entry.cjs +13 -6
  16. package/dist/components/virtual-command-entry.mjs +13 -6
  17. package/dist/components/virtual-command-entry.mjs.map +1 -1
  18. package/dist/helpers/{get-default-options.cjs → get-global-options.cjs} +5 -5
  19. package/dist/helpers/{get-default-options.mjs → get-global-options.mjs} +6 -6
  20. package/dist/helpers/get-global-options.mjs.map +1 -0
  21. package/dist/index.cjs +9 -9
  22. package/dist/index.d.cts.map +1 -1
  23. package/dist/index.d.mts.map +1 -1
  24. package/dist/index.mjs +9 -9
  25. package/dist/index.mjs.map +1 -1
  26. package/dist/node_modules/.pnpm/@stryke_types@0.11.3/node_modules/@stryke/types/dist/base.d.cts +17 -0
  27. package/dist/node_modules/.pnpm/@stryke_types@0.11.3/node_modules/@stryke/types/dist/base.d.cts.map +1 -0
  28. package/dist/node_modules/.pnpm/@stryke_types@0.11.3/node_modules/@stryke/types/dist/base.d.mts +17 -0
  29. package/dist/node_modules/.pnpm/@stryke_types@0.11.3/node_modules/@stryke/types/dist/base.d.mts.map +1 -0
  30. package/dist/packages/plugin-changelog/dist/components/changelog-command.mjs +130 -0
  31. package/dist/packages/plugin-changelog/dist/components/changelog-command.mjs.map +1 -0
  32. package/dist/packages/plugin-changelog/dist/components/index.mjs +3 -0
  33. package/dist/packages/plugin-changelog/dist/index.d.cts +2 -0
  34. package/dist/packages/plugin-changelog/dist/index.d.mts +2 -0
  35. package/dist/packages/plugin-changelog/dist/index.mjs +52 -0
  36. package/dist/packages/plugin-changelog/dist/index.mjs.map +1 -0
  37. package/dist/packages/plugin-changelog/dist/types/plugin.d.cts +43 -0
  38. package/dist/packages/plugin-changelog/dist/types/plugin.d.cts.map +1 -0
  39. package/dist/packages/plugin-changelog/dist/types/plugin.d.mts +43 -0
  40. package/dist/packages/plugin-changelog/dist/types/plugin.d.mts.map +1 -0
  41. package/dist/packages/unified/dist/markdown/index.mjs +6 -0
  42. package/dist/packages/unified/dist/markdown/index.mjs.map +1 -0
  43. package/dist/plugin-changelog/dist/components/changelog-command.cjs +130 -0
  44. package/dist/plugin-changelog/dist/components/index.cjs +1 -0
  45. package/dist/plugin-changelog/dist/index.cjs +53 -0
  46. package/dist/types/plugin.d.cts +11 -6
  47. package/dist/types/plugin.d.cts.map +1 -1
  48. package/dist/types/plugin.d.mts +11 -6
  49. package/dist/types/plugin.d.mts.map +1 -1
  50. package/dist/unified/dist/markdown/index.cjs +6 -0
  51. package/package.json +21 -20
  52. package/dist/helpers/get-default-options.mjs.map +0 -1
@@ -3,8 +3,8 @@ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
3
  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 _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
6
- let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
7
6
  let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
7
+ let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
8
8
  let _shell_shock_plugin_banner_components_banner_builtin = require("@shell-shock/plugin-banner/components/banner-builtin");
9
9
  let _shell_shock_plugin_banner_components_banner_function_declaration = require("@shell-shock/plugin-banner/components/banner-function-declaration");
10
10
  let _shell_shock_plugin_theme_contexts_theme = require("@shell-shock/plugin-theme/contexts/theme");
@@ -59,7 +59,7 @@ function BannerFunctionBodyDeclaration(props) {
59
59
  splitText(title,
60
60
  Math.max(process.stdout.columns - ${totalPadding.value}, 20)
61
61
  ).forEach((line) => {
62
- 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} });
62
+ writeLine(borderColors.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)) + borderColors.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].right}"), { consoleFn: console.${consoleFnName} });
63
63
  }); `;
64
64
  }
65
65
  });
@@ -1 +1 @@
1
- {"version":3,"file":"banner-builtin.d.cts","names":[],"sources":["../../src/components/banner-builtin.tsx"],"mappings":";;;;;;;;;iBAqCgB,6BAAA,CACd,KAAA,EAAO,IAAA,CACL,kCAAA,yCADS,iBAAA,CAGV,QAAA;AAAA,KAyFS,kBAAA,GAAqB,IAAA,CAC/B,gBAAA;;;;EAMA,OAAA,EAAS,WAAA;AAAA;;;;iBAMK,aAAA,CAAc,KAAA,EAAO,kBAAA,GAAkB,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"banner-builtin.d.cts","names":[],"sources":["../../src/components/banner-builtin.tsx"],"mappings":";;;;;;;;;iBAqCgB,6BAAA,CACd,KAAA,EAAO,IAAA,CACL,kCAAA,yCADS,iBAAA,CAGV,QAAA;AAAA,KAqFS,kBAAA,GAAqB,IAAA,CAC/B,gBAAA;;;;EAMA,OAAA,EAAS,WAAA;AAAA;;;;iBAMK,aAAA,CAAc,KAAA,EAAO,kBAAA,GAAkB,iBAAA,CAAA,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"banner-builtin.d.mts","names":[],"sources":["../../src/components/banner-builtin.tsx"],"mappings":";;;;;;;;;iBAqCgB,6BAAA,CACd,KAAA,EAAO,IAAA,CACL,kCAAA,yCADS,iBAAA,CAGV,QAAA;AAAA,KAyFS,kBAAA,GAAqB,IAAA,CAC/B,gBAAA;;;;EAMA,OAAA,EAAS,WAAA;AAAA;;;;iBAMK,aAAA,CAAc,KAAA,EAAO,kBAAA,GAAkB,iBAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"banner-builtin.d.mts","names":[],"sources":["../../src/components/banner-builtin.tsx"],"mappings":";;;;;;;;;iBAqCgB,6BAAA,CACd,KAAA,EAAO,IAAA,CACL,kCAAA,yCADS,iBAAA,CAGV,QAAA;AAAA,KAqFS,kBAAA,GAAqB,IAAA,CAC/B,gBAAA;;;;EAMA,OAAA,EAAS,WAAA;AAAA;;;;iBAMK,aAAA,CAAc,KAAA,EAAO,kBAAA,GAAkB,iBAAA,CAAA,QAAA"}
@@ -1,8 +1,8 @@
1
1
  import { createComponent, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
2
2
  import { Show, code, computed, splitProps } from "@alloy-js/core";
3
3
  import { getAppDescription, getAppTitle } from "@shell-shock/core/plugin-utils";
4
- import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
5
4
  import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
5
+ import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
6
6
  import { BannerBuiltin as BannerBuiltin$1 } from "@shell-shock/plugin-banner/components/banner-builtin";
7
7
  import { BannerFunctionBodyDeclaration as BannerFunctionBodyDeclaration$1, BannerFunctionDeclarationWrapper } from "@shell-shock/plugin-banner/components/banner-function-declaration";
8
8
  import { useTheme } from "@shell-shock/plugin-theme/contexts/theme";
@@ -57,7 +57,7 @@ function BannerFunctionBodyDeclaration(props) {
57
57
  splitText(title,
58
58
  Math.max(process.stdout.columns - ${totalPadding.value}, 20)
59
59
  ).forEach((line) => {
60
- 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} });
60
+ writeLine(borderColors.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)) + borderColors.banner.outline.${variant}("${theme.borderStyles.banner.outline[variant].right}"), { consoleFn: console.${consoleFnName} });
61
61
  }); `;
62
62
  }
63
63
  });
@@ -1 +1 @@
1
- {"version":3,"file":"banner-builtin.mjs","names":[],"sources":["../../src/components/banner-builtin.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, computed, Show, splitProps } from \"@alloy-js/core\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport type { BuiltinFileProps } from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport type { CommandTree } from \"@shell-shock/core\";\nimport { getAppDescription, getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { BannerBuiltin as BaseBannerBuiltin } from \"@shell-shock/plugin-banner/components/banner-builtin\";\nimport type { BannerFunctionBodyDeclarationProps } from \"@shell-shock/plugin-banner/components/banner-function-declaration\";\nimport {\n BannerFunctionDeclarationWrapper,\n BannerFunctionBodyDeclaration as BaseBannerFunctionBodyDeclaration\n} from \"@shell-shock/plugin-banner/components/banner-function-declaration\";\nimport { useTheme } from \"@shell-shock/plugin-theme/contexts/theme\";\nimport { render } from \"cfonts\";\nimport type { CLIPresetContext } from \"../types/plugin\";\n\n/**\n * A component to generate the `banner` function in the `shell-shock:console` builtin module.\n */\nexport function BannerFunctionBodyDeclaration(\n props: Omit<\n BannerFunctionBodyDeclarationProps,\n \"header\" | \"description\" | \"footer\"\n >\n) {\n const { consoleFnName = \"log\", variant = \"primary\", command } = props;\n\n const theme = useTheme();\n const context = usePowerlines<CLIPresetContext>();\n\n const header = computed(\n () =>\n `${theme.labels.banner.header[variant] || getAppTitle(context)} v${\n context.packageJson.version || \"1.0.0\"\n }`\n );\n const footer = computed(() => theme.labels.banner.footer[variant]);\n const title = computed(() =>\n getAppTitle(context, true).replace(\n `v${context.packageJson.version || \"1.0.0\"}`,\n \"\"\n )\n );\n const description = computed(\n () => command?.description || getAppDescription(context)\n );\n\n const titleLines = computed(() => {\n // if (isSetString(context.config.banner.title)) {\n // return context.config.banner.title.split(\"\\n\");\n // }\n\n const result = render(getAppTitle(context, true), {\n font: \"tiny\",\n align: \"left\",\n background: \"transparent\",\n letterSpacing: 1,\n lineHeight: 1,\n gradient: false,\n transitionGradient: false,\n env: \"node\"\n });\n if (!result) {\n return [`${getAppTitle(context, true)} Command-Line Interface`];\n }\n\n return result.array;\n });\n\n const bannerPadding = computed(\n () =>\n Math.max(theme.padding.app, 0) * 2 +\n (theme.borderStyles.banner.outline[variant]?.left.length ?? 0) +\n (theme.borderStyles.banner.outline[variant]?.right.length ?? 0)\n );\n const totalPadding = computed(\n () => Math.max(theme.padding.banner, 0) * 2 + bannerPadding.value\n );\n\n return (\n <BaseBannerFunctionBodyDeclaration\n header={header.value}\n description={description.value}\n footer={footer.value}\n variant={variant}\n consoleFnName={consoleFnName}\n command={command}\n insertNewlineAfterDescription>\n {code`const titleLines = [${titleLines.value\n .map(line => JSON.stringify(line.trim()))\n .join(\", \")}];\n const title = Math.max(...titleLines.map(line => stripAnsi(line).length)) > Math.max(process.stdout.columns + ${\n totalPadding.value\n }, 20) ? \"${title.value}\" : \\`\\\\n\\${titleLines.join(\"\\\\n\")}\\\\n\\`;\n\n splitText(title,\n Math.max(process.stdout.columns - ${totalPadding.value}, 20)\n ).forEach((line) => {\n writeLine(colors.border.banner.outline.${variant}(\"${\n theme.borderStyles.banner.outline[variant].left\n }\") + \" \".repeat(Math.max(Math.floor((process.stdout.columns - (stripAnsi(line).length + ${\n bannerPadding.value\n })) / 2), 0)) + colors.bold(colors.text.banner.title.${variant}(line)) + \" \".repeat(Math.max(Math.ceil((process.stdout.columns - (stripAnsi(line).length + ${\n bannerPadding.value\n })) / 2), 0)) + colors.border.banner.outline.${variant}(\"${\n theme.borderStyles.banner.outline[variant].right\n }\"), { consoleFn: console.${consoleFnName} });\n }); `}\n </BaseBannerFunctionBodyDeclaration>\n );\n}\n\nexport type BannerBuiltinProps = Omit<\n BuiltinFileProps,\n \"id\" | \"description\"\n> & {\n /**\n * The command to generate the `banner` function declaration for.\n */\n command: CommandTree;\n};\n\n/**\n * A built-in banner module for Shell Shock.\n */\nexport function BannerBuiltin(props: BannerBuiltinProps) {\n const [{ command, children }, rest] = splitProps(props, [\n \"command\",\n \"children\"\n ]);\n\n return (\n <BaseBannerBuiltin {...rest} command={command}>\n <BannerFunctionDeclarationWrapper command={command}>\n <BannerFunctionBodyDeclaration command={command} />\n <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </BannerFunctionDeclarationWrapper>\n </BaseBannerBuiltin>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAmCA,SAAe,8BAAyB,OAAoD;CAC1F,MAAA,EACF,gBAAgB,OACd,UAAW,WACT,YACC;CACH,MAAA,QAAA,UAAA;CACA,MAAA,UAAA,eAAA;CACA,MAAM,SAAE,eAAsB,GAAC,MAAQ,OAAG,OAAU,OAAQ,YAAS,YAAA,QAAA,CAAA,IAAA,QAAA,YAAA,WAAA,UAAA;;CAErE,MAAM,QAAQ,eAAU,YAAA,SAAA,KAAA,CAAA,QAAA,IAAA,QAAA,YAAA,WAAA,WAAA,GAAA,CAAA;CACxB,MAAM,cAAU,eAAc,SAAA,eAAmB,kBAAA,QAAA,CAAA;;EAM/C,MAAG,SAAA,OAAA,YAAA,SAAA,KAAA,EAAA;GACJ,MAAA;GACD,OAAM;GACN,YAAc;GACZ,eAAY;GACV,YAAY;GACZ,UAAC;GACH,oBAAA;GACD,KAAA;GACD,CAAA;AACE,MAAI,CAAC,OACN,QAAA,CAAA,GAAA,YAAA,SAAA,KAAA,CAAA,yBAAA;AAED,SAAM,OAAU;GACd;CACF,MAAM,gBAAgB,eAAc,KAAM,IAAA,MAAU,QAAC,KAAA,EAAA,GAAA,KAAA,MAAA,aAAA,OAAA,QAAA,UAAA,KAAA,UAAA,MAAA,MAAA,aAAA,OAAA,QAAA,UAAA,MAAA,UAAA,GAAA;CACrD,MAAK,eAAA,eAAA,KAAA,IAAA,MAAA,QAAA,QAAA,EAAA,GAAA,IAAA,cAAA,MAAA;;EAEH,IAAA,SAAa;AACX,UAAO,OAAK;;EAEd,IAAE,cAAa;AACb,UAAA,YAAgB;;EAElB,IAAE,SAAU;AACV,UAAA,OAAA;;EAEA;EACW;EACJ;EACT,+BAAA;;AAEA,UAAO,IAAM,uBAAM,WAAA,MAAA,KAAA,SAAA,KAAA,UAAA,KAAA,MAAA,CAAA,CAAA,CAAA,KAAA,KAAA,CAAA;sHACnB,aAAA,MAAA,WAAA,MAAA,MAAA;;;4CAGI,aAAA,MAAA;;iDAEyC,QAAO,IAAA,MAAW,aAAE,OAAA,QAAA,SAAA,KAAA,0FAAA,cAAA,MAAA,sDAAA,QAAA,8FAAA,cAAA,MAAA,8CAAA,QAAA,IAAA,MAAA,aAAA,OAAA,QAAA,SAAA,MAAA,2BAAA,cAAA;;;EAGnE,CAAA;;;;;AAYF,SAAM,cAAA,OAA6B;CACjC,MAAK,CAAA,EACH,SACA,YACC,QAAO,WAAY,OAAO,CAAC,WAAW,WAAW,CAAC;AACrD,QAAM,gBAAa,iBAAA,WAAA,MAAA;EACR;;AAEP,UAAA,gBAAe,kCAAA;IACJ;IACT,IAAA,WAAe;AACf,YAAS;MAAC,gBAAc,+BAA4B,EAC5C,SACL,CAAC;MAAE,gBAAgB,SAAS,EAAA,CAAK;MAAE,gBAAe,MAAS;OAC5D,IAAA,OAAa;AACT,eAAO,QAAG,SAAY;;OAEd;OACZ,CAAA;MAAA;;IAEH,CAAC;;EAEL,CAAA,CAAA"}
1
+ {"version":3,"file":"banner-builtin.mjs","names":[],"sources":["../../src/components/banner-builtin.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, computed, Show, splitProps } from \"@alloy-js/core\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport type { BuiltinFileProps } from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport type { CommandTree } from \"@shell-shock/core\";\nimport { getAppDescription, getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { BannerBuiltin as BaseBannerBuiltin } from \"@shell-shock/plugin-banner/components/banner-builtin\";\nimport type { BannerFunctionBodyDeclarationProps } from \"@shell-shock/plugin-banner/components/banner-function-declaration\";\nimport {\n BannerFunctionDeclarationWrapper,\n BannerFunctionBodyDeclaration as BaseBannerFunctionBodyDeclaration\n} from \"@shell-shock/plugin-banner/components/banner-function-declaration\";\nimport { useTheme } from \"@shell-shock/plugin-theme/contexts/theme\";\nimport { render } from \"cfonts\";\nimport type { CLIPresetContext } from \"../types/plugin\";\n\n/**\n * A component to generate the `banner` function in the `shell-shock:console` builtin module.\n */\nexport function BannerFunctionBodyDeclaration(\n props: Omit<\n BannerFunctionBodyDeclarationProps,\n \"header\" | \"description\" | \"footer\"\n >\n) {\n const { consoleFnName = \"log\", variant = \"primary\", command } = props;\n\n const theme = useTheme();\n const context = usePowerlines<CLIPresetContext>();\n\n const header = computed(\n () =>\n `${theme.labels.banner.header[variant] || getAppTitle(context)} v${\n context.packageJson.version || \"1.0.0\"\n }`\n );\n const footer = computed(() => theme.labels.banner.footer[variant]);\n const title = computed(() =>\n getAppTitle(context, true).replace(\n `v${context.packageJson.version || \"1.0.0\"}`,\n \"\"\n )\n );\n const description = computed(\n () => command?.description || getAppDescription(context)\n );\n\n const titleLines = computed(() => {\n const result = render(getAppTitle(context, true), {\n font: \"tiny\",\n align: \"left\",\n background: \"transparent\",\n letterSpacing: 1,\n lineHeight: 1,\n gradient: false,\n transitionGradient: false,\n env: \"node\"\n });\n if (!result) {\n return [`${getAppTitle(context, true)} Command-Line Interface`];\n }\n\n return result.array;\n });\n\n const bannerPadding = computed(\n () =>\n Math.max(theme.padding.app, 0) * 2 +\n (theme.borderStyles.banner.outline[variant]?.left.length ?? 0) +\n (theme.borderStyles.banner.outline[variant]?.right.length ?? 0)\n );\n const totalPadding = computed(\n () => Math.max(theme.padding.banner, 0) * 2 + bannerPadding.value\n );\n\n return (\n <BaseBannerFunctionBodyDeclaration\n header={header.value}\n description={description.value}\n footer={footer.value}\n variant={variant}\n consoleFnName={consoleFnName}\n command={command}\n insertNewlineAfterDescription>\n {code`const titleLines = [${titleLines.value\n .map(line => JSON.stringify(line.trim()))\n .join(\", \")}];\n const title = Math.max(...titleLines.map(line => stripAnsi(line).length)) > Math.max(process.stdout.columns + ${\n totalPadding.value\n }, 20) ? \"${title.value}\" : \\`\\\\n\\${titleLines.join(\"\\\\n\")}\\\\n\\`;\n\n splitText(title,\n Math.max(process.stdout.columns - ${totalPadding.value}, 20)\n ).forEach((line) => {\n writeLine(borderColors.banner.outline.${variant}(\"${\n theme.borderStyles.banner.outline[variant].left\n }\") + \" \".repeat(Math.max(Math.floor((process.stdout.columns - (stripAnsi(line).length + ${\n bannerPadding.value\n })) / 2), 0)) + colors.bold(colors.text.banner.title.${variant}(line)) + \" \".repeat(Math.max(Math.ceil((process.stdout.columns - (stripAnsi(line).length + ${\n bannerPadding.value\n })) / 2), 0)) + borderColors.banner.outline.${variant}(\"${\n theme.borderStyles.banner.outline[variant].right\n }\"), { consoleFn: console.${consoleFnName} });\n }); `}\n </BaseBannerFunctionBodyDeclaration>\n );\n}\n\nexport type BannerBuiltinProps = Omit<\n BuiltinFileProps,\n \"id\" | \"description\"\n> & {\n /**\n * The command to generate the `banner` function declaration for.\n */\n command: CommandTree;\n};\n\n/**\n * A built-in banner module for Shell Shock.\n */\nexport function BannerBuiltin(props: BannerBuiltinProps) {\n const [{ command, children }, rest] = splitProps(props, [\n \"command\",\n \"children\"\n ]);\n\n return (\n <BaseBannerBuiltin {...rest} command={command}>\n <BannerFunctionDeclarationWrapper command={command}>\n <BannerFunctionBodyDeclaration command={command} />\n <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </BannerFunctionDeclarationWrapper>\n </BaseBannerBuiltin>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAmCA,SAAe,8BAAyB,OAAoD;CAC1F,MAAA,EACF,gBAAgB,OACd,UAAW,WACT,YACC;CACH,MAAA,QAAA,UAAA;CACA,MAAA,UAAA,eAAA;CACA,MAAM,SAAE,eAAsB,GAAC,MAAQ,OAAG,OAAU,OAAQ,YAAS,YAAA,QAAA,CAAA,IAAA,QAAA,YAAA,WAAA,UAAA;;CAErE,MAAM,QAAQ,eAAU,YAAA,SAAA,KAAA,CAAA,QAAA,IAAA,QAAA,YAAA,WAAA,WAAA,GAAA,CAAA;CACxB,MAAM,cAAU,eAAc,SAAA,eAAmB,kBAAA,QAAA,CAAA;;EAEjD,MAAM,SAAS,OAAQ,YAAA,SAAA,KAAA,EAAA;GACnB,MAAE;GACF,OAAG;GACH,YAAU;GACV,eAAC;GACJ,YAAA;GACD,UAAc;GACd,oBAAwB;GACtB,KAAA;GACC,CAAC;AACF,MAAG,CAAA,OACH,QAAA,CAAA,GAAA,YAAA,SAAA,KAAA,CAAA,yBAAA;AAEF,SAAM,OAAA;GACJ;CACF,MAAC,gBAAA,eAAA,KAAA,IAAA,MAAA,QAAA,KAAA,EAAA,GAAA,KAAA,MAAA,aAAA,OAAA,QAAA,UAAA,KAAA,UAAA,MAAA,MAAA,aAAA,OAAA,QAAA,UAAA,MAAA,UAAA,GAAA;;AAED,QAAM,gBAAa,iCAAe;EAChC,IAAA,SAAa;AACX,UAAO,OAAK;;EAEd,IAAE,cAAa;AACb,UAAA,YAAgB;;EAElB,IAAE,SAAU;AACV,UAAA,OAAA;;EAEA;EACW;EACJ;EACT,+BAAA;;AAEA,UAAO,IAAM,uBAAM,WAAA,MAAA,KAAA,SAAA,KAAA,UAAA,KAAA,MAAA,CAAA,CAAA,CAAA,KAAA,KAAA,CAAA;sHACnB,aAAA,MAAA,WAAA,MAAA,MAAA;;;4CAGI,aAAA,MAAA;;gDAEwC,QAAQ,IAAA,MAAU,aAAG,OAAA,QAAA,SAAA,KAAA,0FAAA,cAAA,MAAA,sDAAA,QAAA,8FAAA,cAAA,MAAA,6CAAA,QAAA,IAAA,MAAA,aAAA,OAAA,QAAA,SAAA,MAAA,2BAAA,cAAA;;;EAGnE,CAAA;;;;;AAYF,SAAM,cAAA,OAA6B;CACjC,MAAK,CAAA,EACH,SACA,YACC,QAAO,WAAY,OAAO,CAAC,WAAW,WAAW,CAAC;AACrD,QAAM,gBAAa,iBAAA,WAAA,MAAA;EACR;;AAEP,UAAA,gBAAe,kCAAA;IACJ;IACT,IAAA,WAAe;AACf,YAAS;MAAC,gBAAa,+BAA4B,EAC3C,SACL,CAAC;MAAE,gBAAgB,SAAS,EAAA,CAAK;MAAE,gBAAe,MAAS;OAC5D,IAAA,OAAa;AACT,eAAO,QAAG,SAAY;;OAEd;OACZ,CAAA;MAAA;;IAEH,CAAC;;EAEL,CAAA,CAAA"}
@@ -5,19 +5,19 @@ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
5
5
  let _alloy_js_core = require("@alloy-js/core");
6
6
  let _alloy_js_typescript = require("@alloy-js/typescript");
7
7
  let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
8
- let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
9
8
  let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
9
+ let _stryke_path_join = require("@stryke/path/join");
10
+ let defu = require("defu");
11
+ defu = require_runtime.__toESM(defu);
12
+ let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
10
13
  let _powerlines_plugin_alloy_typescript_components_entry_file = require("@powerlines/plugin-alloy/typescript/components/entry-file");
11
14
  let _shell_shock_core = require("@shell-shock/core");
12
15
  let _shell_shock_core_components_command_validation_logic = require("@shell-shock/core/components/command-validation-logic");
13
16
  let _shell_shock_preset_script_components_command_entry = require("@shell-shock/preset-script/components/command-entry");
14
17
  let _stryke_path_find = require("@stryke/path/find");
15
- let _stryke_path_join = require("@stryke/path/join");
16
18
  let _stryke_path_replace = require("@stryke/path/replace");
17
19
  let _stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
18
20
  let _stryke_string_format_pascal_case = require("@stryke/string-format/pascal-case");
19
- let defu = require("defu");
20
- defu = require_runtime.__toESM(defu);
21
21
 
22
22
  //#region src/components/command-entry.tsx
23
23
  /**
@@ -57,23 +57,30 @@ function CommandEntry(props) {
57
57
  "warn",
58
58
  "error",
59
59
  "table",
60
- "colors",
60
+ "italic",
61
61
  "cursor",
62
62
  "stripAnsi",
63
63
  "writeLine",
64
64
  "splitText",
65
+ "textColors",
65
66
  "createSpinner"
66
67
  ],
67
68
  utils: [
68
69
  "sleep",
69
- "useApp",
70
- "useArgs",
71
- "hasFlag",
72
70
  "isMinimal",
73
71
  "isInteractive",
72
+ "isUnicodeSupported"
73
+ ],
74
+ state: [
75
+ "useGlobal",
76
+ "withCommand",
77
+ "useArgs",
78
+ "hasFlag",
74
79
  "isHelp",
75
- "isUnicodeSupported",
76
- "internal_commandContext"
80
+ {
81
+ name: "GlobalOptions",
82
+ type: true
83
+ }
77
84
  ],
78
85
  prompts: [
79
86
  "text",
@@ -107,7 +114,7 @@ function CommandEntry(props) {
107
114
  get children() {
108
115
  return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseIfClause, {
109
116
  get condition() {
110
- return _alloy_js_core.code`!isHelp && (${Object.values(command.options ?? {}).filter((option) => !option.optional).map((option) => (option.kind === _shell_shock_core.CommandParameterKinds.string || option.kind === _shell_shock_core.CommandParameterKinds.number) && option.variadic ? `(!options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`} || options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}.length === 0)` : `options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`} === undefined`).join(" || ")}${Object.values(command.options ?? {}).filter((option) => !option.optional).length > 0 && Object.values(command.args ?? {}).filter((arg) => !arg.optional).length > 0 ? " || " : ""}${Object.values(command.args ?? {}).filter((arg) => !arg.optional).map((arg) => (arg.kind === _shell_shock_core.CommandParameterKinds.string || arg.kind === _shell_shock_core.CommandParameterKinds.number) && arg.variadic ? `(!${(0, _stryke_string_format_camel_case.camelCase)(arg.name)} || ${(0, _stryke_string_format_camel_case.camelCase)(arg.name)}.length === 0)` : `${(0, _stryke_string_format_camel_case.camelCase)(arg.name)} === undefined`).join(" || ")}) `;
117
+ return _alloy_js_core.code`!isHelp() && (${Object.values(command.options ?? {}).filter((option) => !option.optional).map((option) => (option.kind === _shell_shock_core.CommandParameterKinds.string || option.kind === _shell_shock_core.CommandParameterKinds.number) && option.variadic ? `(!options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`} || options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}.length === 0)` : `options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`} === undefined`).join(" || ")}${Object.values(command.options ?? {}).filter((option) => !option.optional).length > 0 && Object.values(command.args ?? {}).filter((arg) => !arg.optional).length > 0 ? " || " : ""}${Object.values(command.args ?? {}).filter((arg) => !arg.optional).map((arg) => (arg.kind === _shell_shock_core.CommandParameterKinds.string || arg.kind === _shell_shock_core.CommandParameterKinds.number) && arg.variadic ? `(!${(0, _stryke_string_format_camel_case.camelCase)(arg.name)} || ${(0, _stryke_string_format_camel_case.camelCase)(arg.name)}.length === 0)` : `${(0, _stryke_string_format_camel_case.camelCase)(arg.name)} === undefined`).join(" || ")}) `;
111
118
  },
112
119
  get children() {
113
120
  return [
@@ -134,7 +141,7 @@ function CommandEntry(props) {
134
141
  },
135
142
  get fallback() {
136
143
  return _alloy_js_core.code`const value = await select({
137
- message: \`Please select a value for the \${colors.italic("${option.name}")} option\`, ${option.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatDescription)(option.description)}\`,
144
+ message: \`Please select a value for the \${italic("${option.name}")} option\`, ${option.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatDescription)(option.description)}\`,
138
145
  ` : ""}options: [ ${option.choices?.map((choice) => `{ value: ${JSON.stringify(choice)}, label: "${choice}", ${option.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatShortDescription)(option.description)}\`` : ""} }`).join(", ")} ]
139
146
  });
140
147
  if (isCancel(value)) {
@@ -154,7 +161,7 @@ function CommandEntry(props) {
154
161
  get children() {
155
162
  return _alloy_js_core.code`
156
163
  const value = await text({
157
- message: \`Please provide a value for the \${colors.italic("${option.name}")} option\`,
164
+ message: \`Please provide a value for the \${italic("${option.name}")} option\`,
158
165
  ${option.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatDescription)(option.description)}\`,
159
166
  ` : ""}validate(val) {
160
167
  if (!val || val.trim() === "") {
@@ -179,7 +186,7 @@ function CommandEntry(props) {
179
186
  get children() {
180
187
  return _alloy_js_core.code`
181
188
  const value = await numeric({
182
- message: \`Please provide a numeric value for the \${colors.italic("${option.name}")} option\`,
189
+ message: \`Please provide a numeric value for the \${italic("${option.name}")} option\`,
183
190
  ${option.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatDescription)(option.description)}\`,
184
191
  ` : ""}
185
192
  });
@@ -198,7 +205,7 @@ function CommandEntry(props) {
198
205
  get children() {
199
206
  return _alloy_js_core.code`
200
207
  const value = await toggle({
201
- message: \`Please select a value for the \${colors.italic("${option.name}")} option\`,
208
+ message: \`Please select a value for the \${italic("${option.name}")} option\`,
202
209
  ${option.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatDescription)(option.description)}\`,
203
210
  ` : ""}
204
211
  });
@@ -227,7 +234,7 @@ function CommandEntry(props) {
227
234
  get children() {
228
235
  return _alloy_js_core.code`
229
236
  const value = await text({
230
- message: \`Please provide one or more${option.kind === _shell_shock_core.CommandParameterKinds.number ? " numeric" : ""} values for the \${colors.italic("${option.name}")} option (values are separated by a \\",\\" character)\`,
237
+ message: \`Please provide one or more${option.kind === _shell_shock_core.CommandParameterKinds.number ? " numeric" : ""} values for the \${italic("${option.name}")} option (values are separated by a \\",\\" character)\`,
231
238
  ${option.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatDescription)(option.description)}\`,
232
239
  ` : ""}validate(val) {
233
240
  if (!val || val.trim() === "") {
@@ -278,7 +285,7 @@ function CommandEntry(props) {
278
285
  },
279
286
  get fallback() {
280
287
  return _alloy_js_core.code`const value = await select({
281
- message: \`Please select a value for the \${colors.italic("${arg.name}")} argument\`,${arg.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatDescription)(arg.description)}\`,
288
+ message: \`Please select a value for the \${italic("${arg.name}")} argument\`,${arg.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatDescription)(arg.description)}\`,
282
289
  ` : ""}
283
290
  options: [ ${arg.choices?.map((choice) => `{ value: ${JSON.stringify(choice)}, label: "${choice}", ${arg.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatShortDescription)(arg.description)}\`` : ""} }`).join(", ")} ]
284
291
  });
@@ -299,7 +306,7 @@ function CommandEntry(props) {
299
306
  get children() {
300
307
  return _alloy_js_core.code`
301
308
  const value = await text({
302
- message: \`Please provide a value for the \${colors.italic("${arg.name}")} argument\`,
309
+ message: \`Please provide a value for the \${italic("${arg.name}")} argument\`,
303
310
  ${arg.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatShortDescription)(arg.description)}\`,
304
311
  ` : ""}validate(val) {
305
312
  if (!val || val.trim() === "") {
@@ -324,7 +331,7 @@ function CommandEntry(props) {
324
331
  get children() {
325
332
  return _alloy_js_core.code`
326
333
  const value = await numeric({
327
- message: \`Please provide a numeric value for the \${colors.italic("${arg.name}")} argument\`,
334
+ message: \`Please provide a numeric value for the \${italic("${arg.name}")} argument\`,
328
335
  ${arg.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatShortDescription)(arg.description)}\`,
329
336
  ` : ""}
330
337
  });
@@ -343,7 +350,7 @@ function CommandEntry(props) {
343
350
  get children() {
344
351
  return _alloy_js_core.code`
345
352
  const value = await toggle({
346
- message: \`Please select a value for the \${colors.italic("${arg.name}")} argument\`,
353
+ message: \`Please select a value for the \${italic("${arg.name}")} argument\`,
347
354
  ${arg.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatShortDescription)(arg.description)}\`,
348
355
  ` : ""}
349
356
  });
@@ -372,7 +379,7 @@ function CommandEntry(props) {
372
379
  get children() {
373
380
  return _alloy_js_core.code`
374
381
  const value = await text({
375
- message: \`Please provide one or more${arg.kind === _shell_shock_core.CommandParameterKinds.number ? " numeric" : ""} values for the \${colors.italic("${arg.name}")} argument (values are separated by a \\",\\" character)\`,
382
+ message: \`Please provide one or more${arg.kind === _shell_shock_core.CommandParameterKinds.number ? " numeric" : ""} values for the \${italic("${arg.name}")} argument (values are separated by a \\",\\" character)\`,
376
383
  ${arg.description ? `description: \`${(0, _shell_shock_core_plugin_utils.formatShortDescription)(arg.description)}\`,
377
384
  ` : ""}validate(val) {
378
385
  if (!val || val.trim() === "") {
@@ -407,8 +414,10 @@ function CommandEntry(props) {
407
414
  (0, _alloy_js_core_jsx_runtime.createComponent)(_shell_shock_core_components_command_validation_logic.CommandValidationLogic, { command }),
408
415
  (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
409
416
  condition: _alloy_js_core.code`failures.length > 0`,
410
- children: _alloy_js_core.code`error("The following validation failures were found while processing the user provided input, and must be corrected before the command-line process can be executed: \\n\\n" + failures.map(failure => " - " + failure).join("\\n"));
411
- options.help = true; `
417
+ get children() {
418
+ return _alloy_js_core.code`error(\`The following validation failures were found while processing the user provided input, and must be corrected before the \${italic("${command.title}")} command can be executed: \\n\\n\${failures.map(failure => " - " + failure).join("\\n")}\`);
419
+ options.help = true; `;
420
+ }
412
421
  })
413
422
  ];
414
423
  }
@@ -3,18 +3,18 @@ import { createComponent, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
3
3
  import { For, Match, Show, Switch, code, computed } from "@alloy-js/core";
4
4
  import { ElseIfClause, IfStatement } from "@alloy-js/typescript";
5
5
  import { formatDescription, formatShortDescription, isDynamicPathSegment } from "@shell-shock/core/plugin-utils";
6
- import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
7
6
  import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
7
+ import { joinPaths } from "@stryke/path/join";
8
+ import defu from "defu";
9
+ import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
8
10
  import { EntryFile } from "@powerlines/plugin-alloy/typescript/components/entry-file";
9
11
  import { CommandParameterKinds } from "@shell-shock/core";
10
12
  import { CommandValidationLogic } from "@shell-shock/core/components/command-validation-logic";
11
13
  import { CommandHandlerDeclaration } from "@shell-shock/preset-script/components/command-entry";
12
14
  import { findFilePath, relativePath } from "@stryke/path/find";
13
- import { joinPaths } from "@stryke/path/join";
14
15
  import { replaceExtension } from "@stryke/path/replace";
15
16
  import { camelCase } from "@stryke/string-format/camel-case";
16
17
  import { pascalCase } from "@stryke/string-format/pascal-case";
17
- import defu from "defu";
18
18
 
19
19
  //#region src/components/command-entry.tsx
20
20
  /**
@@ -54,23 +54,30 @@ function CommandEntry(props) {
54
54
  "warn",
55
55
  "error",
56
56
  "table",
57
- "colors",
57
+ "italic",
58
58
  "cursor",
59
59
  "stripAnsi",
60
60
  "writeLine",
61
61
  "splitText",
62
+ "textColors",
62
63
  "createSpinner"
63
64
  ],
64
65
  utils: [
65
66
  "sleep",
66
- "useApp",
67
- "useArgs",
68
- "hasFlag",
69
67
  "isMinimal",
70
68
  "isInteractive",
69
+ "isUnicodeSupported"
70
+ ],
71
+ state: [
72
+ "useGlobal",
73
+ "withCommand",
74
+ "useArgs",
75
+ "hasFlag",
71
76
  "isHelp",
72
- "isUnicodeSupported",
73
- "internal_commandContext"
77
+ {
78
+ name: "GlobalOptions",
79
+ type: true
80
+ }
74
81
  ],
75
82
  prompts: [
76
83
  "text",
@@ -104,7 +111,7 @@ function CommandEntry(props) {
104
111
  get children() {
105
112
  return createComponent(ElseIfClause, {
106
113
  get condition() {
107
- return code`!isHelp && (${Object.values(command.options ?? {}).filter((option) => !option.optional).map((option) => (option.kind === CommandParameterKinds.string || option.kind === CommandParameterKinds.number) && option.variadic ? `(!options${option.name.includes("?") ? `["${option.name}"]` : `.${camelCase(option.name)}`} || options${option.name.includes("?") ? `["${option.name}"]` : `.${camelCase(option.name)}`}.length === 0)` : `options${option.name.includes("?") ? `["${option.name}"]` : `.${camelCase(option.name)}`} === undefined`).join(" || ")}${Object.values(command.options ?? {}).filter((option) => !option.optional).length > 0 && Object.values(command.args ?? {}).filter((arg) => !arg.optional).length > 0 ? " || " : ""}${Object.values(command.args ?? {}).filter((arg) => !arg.optional).map((arg) => (arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.variadic ? `(!${camelCase(arg.name)} || ${camelCase(arg.name)}.length === 0)` : `${camelCase(arg.name)} === undefined`).join(" || ")}) `;
114
+ return code`!isHelp() && (${Object.values(command.options ?? {}).filter((option) => !option.optional).map((option) => (option.kind === CommandParameterKinds.string || option.kind === CommandParameterKinds.number) && option.variadic ? `(!options${option.name.includes("?") ? `["${option.name}"]` : `.${camelCase(option.name)}`} || options${option.name.includes("?") ? `["${option.name}"]` : `.${camelCase(option.name)}`}.length === 0)` : `options${option.name.includes("?") ? `["${option.name}"]` : `.${camelCase(option.name)}`} === undefined`).join(" || ")}${Object.values(command.options ?? {}).filter((option) => !option.optional).length > 0 && Object.values(command.args ?? {}).filter((arg) => !arg.optional).length > 0 ? " || " : ""}${Object.values(command.args ?? {}).filter((arg) => !arg.optional).map((arg) => (arg.kind === CommandParameterKinds.string || arg.kind === CommandParameterKinds.number) && arg.variadic ? `(!${camelCase(arg.name)} || ${camelCase(arg.name)}.length === 0)` : `${camelCase(arg.name)} === undefined`).join(" || ")}) `;
108
115
  },
109
116
  get children() {
110
117
  return [
@@ -131,7 +138,7 @@ function CommandEntry(props) {
131
138
  },
132
139
  get fallback() {
133
140
  return code`const value = await select({
134
- message: \`Please select a value for the \${colors.italic("${option.name}")} option\`, ${option.description ? `description: \`${formatDescription(option.description)}\`,
141
+ message: \`Please select a value for the \${italic("${option.name}")} option\`, ${option.description ? `description: \`${formatDescription(option.description)}\`,
135
142
  ` : ""}options: [ ${option.choices?.map((choice) => `{ value: ${JSON.stringify(choice)}, label: "${choice}", ${option.description ? `description: \`${formatShortDescription(option.description)}\`` : ""} }`).join(", ")} ]
136
143
  });
137
144
  if (isCancel(value)) {
@@ -151,7 +158,7 @@ function CommandEntry(props) {
151
158
  get children() {
152
159
  return code`
153
160
  const value = await text({
154
- message: \`Please provide a value for the \${colors.italic("${option.name}")} option\`,
161
+ message: \`Please provide a value for the \${italic("${option.name}")} option\`,
155
162
  ${option.description ? `description: \`${formatDescription(option.description)}\`,
156
163
  ` : ""}validate(val) {
157
164
  if (!val || val.trim() === "") {
@@ -176,7 +183,7 @@ function CommandEntry(props) {
176
183
  get children() {
177
184
  return code`
178
185
  const value = await numeric({
179
- message: \`Please provide a numeric value for the \${colors.italic("${option.name}")} option\`,
186
+ message: \`Please provide a numeric value for the \${italic("${option.name}")} option\`,
180
187
  ${option.description ? `description: \`${formatDescription(option.description)}\`,
181
188
  ` : ""}
182
189
  });
@@ -195,7 +202,7 @@ function CommandEntry(props) {
195
202
  get children() {
196
203
  return code`
197
204
  const value = await toggle({
198
- message: \`Please select a value for the \${colors.italic("${option.name}")} option\`,
205
+ message: \`Please select a value for the \${italic("${option.name}")} option\`,
199
206
  ${option.description ? `description: \`${formatDescription(option.description)}\`,
200
207
  ` : ""}
201
208
  });
@@ -224,7 +231,7 @@ function CommandEntry(props) {
224
231
  get children() {
225
232
  return code`
226
233
  const value = await text({
227
- message: \`Please provide one or more${option.kind === CommandParameterKinds.number ? " numeric" : ""} values for the \${colors.italic("${option.name}")} option (values are separated by a \\",\\" character)\`,
234
+ message: \`Please provide one or more${option.kind === CommandParameterKinds.number ? " numeric" : ""} values for the \${italic("${option.name}")} option (values are separated by a \\",\\" character)\`,
228
235
  ${option.description ? `description: \`${formatDescription(option.description)}\`,
229
236
  ` : ""}validate(val) {
230
237
  if (!val || val.trim() === "") {
@@ -275,7 +282,7 @@ function CommandEntry(props) {
275
282
  },
276
283
  get fallback() {
277
284
  return code`const value = await select({
278
- message: \`Please select a value for the \${colors.italic("${arg.name}")} argument\`,${arg.description ? `description: \`${formatDescription(arg.description)}\`,
285
+ message: \`Please select a value for the \${italic("${arg.name}")} argument\`,${arg.description ? `description: \`${formatDescription(arg.description)}\`,
279
286
  ` : ""}
280
287
  options: [ ${arg.choices?.map((choice) => `{ value: ${JSON.stringify(choice)}, label: "${choice}", ${arg.description ? `description: \`${formatShortDescription(arg.description)}\`` : ""} }`).join(", ")} ]
281
288
  });
@@ -296,7 +303,7 @@ function CommandEntry(props) {
296
303
  get children() {
297
304
  return code`
298
305
  const value = await text({
299
- message: \`Please provide a value for the \${colors.italic("${arg.name}")} argument\`,
306
+ message: \`Please provide a value for the \${italic("${arg.name}")} argument\`,
300
307
  ${arg.description ? `description: \`${formatShortDescription(arg.description)}\`,
301
308
  ` : ""}validate(val) {
302
309
  if (!val || val.trim() === "") {
@@ -321,7 +328,7 @@ function CommandEntry(props) {
321
328
  get children() {
322
329
  return code`
323
330
  const value = await numeric({
324
- message: \`Please provide a numeric value for the \${colors.italic("${arg.name}")} argument\`,
331
+ message: \`Please provide a numeric value for the \${italic("${arg.name}")} argument\`,
325
332
  ${arg.description ? `description: \`${formatShortDescription(arg.description)}\`,
326
333
  ` : ""}
327
334
  });
@@ -340,7 +347,7 @@ function CommandEntry(props) {
340
347
  get children() {
341
348
  return code`
342
349
  const value = await toggle({
343
- message: \`Please select a value for the \${colors.italic("${arg.name}")} argument\`,
350
+ message: \`Please select a value for the \${italic("${arg.name}")} argument\`,
344
351
  ${arg.description ? `description: \`${formatShortDescription(arg.description)}\`,
345
352
  ` : ""}
346
353
  });
@@ -369,7 +376,7 @@ function CommandEntry(props) {
369
376
  get children() {
370
377
  return code`
371
378
  const value = await text({
372
- message: \`Please provide one or more${arg.kind === CommandParameterKinds.number ? " numeric" : ""} values for the \${colors.italic("${arg.name}")} argument (values are separated by a \\",\\" character)\`,
379
+ message: \`Please provide one or more${arg.kind === CommandParameterKinds.number ? " numeric" : ""} values for the \${italic("${arg.name}")} argument (values are separated by a \\",\\" character)\`,
373
380
  ${arg.description ? `description: \`${formatShortDescription(arg.description)}\`,
374
381
  ` : ""}validate(val) {
375
382
  if (!val || val.trim() === "") {
@@ -404,8 +411,10 @@ function CommandEntry(props) {
404
411
  createComponent(CommandValidationLogic, { command }),
405
412
  createComponent(IfStatement, {
406
413
  condition: code`failures.length > 0`,
407
- children: code`error("The following validation failures were found while processing the user provided input, and must be corrected before the command-line process can be executed: \\n\\n" + failures.map(failure => " - " + failure).join("\\n"));
408
- options.help = true; `
414
+ get children() {
415
+ return code`error(\`The following validation failures were found while processing the user provided input, and must be corrected before the \${italic("${command.title}")} command can be executed: \\n\\n\${failures.map(failure => " - " + failure).join("\\n")}\`);
416
+ options.help = true; `;
417
+ }
409
418
  })
410
419
  ];
411
420
  }