@shell-shock/plugin-help 0.2.35 → 0.2.37

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.
@@ -21,23 +21,6 @@ function HelpUsageDisplay(props) {
21
21
  (0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`writeLine(
22
22
  textColors.body.secondary(\`\${textColors.usage.bin(">_ ${(0, _shell_shock_core_plugin_utils.getAppBin)(context)}")}${command.segments.length > 0 ? ` ${command.segments.map((segment) => `\${textColors.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 ? ` \${textColors.usage.dynamic("<command>")}` : ""}${command.args.length > 0 ? ` ${command.args.map((arg) => `\${textColors.usage.args("<${(arg.type === "string" || arg.type === "number") && arg.choices && arg.choices.length > 0 ? arg.choices.map((choice) => (0, _stryke_string_format_snake_case.snakeCase)(String(choice))).join("|") : arg.type === "string" && arg.format ? (0, _stryke_string_format_snake_case.snakeCase)(arg.format) : (0, _stryke_string_format_snake_case.snakeCase)(arg.name)}${(arg.type === "string" || arg.type === "number") && arg.variadic ? "..." : ""}>")}`).join(" ")}` : ""} \${textColors.usage.options("[options]")}\`), { padding: ${(theme.padding.app ?? 1) * indent} }
23
23
  );`),
24
- (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
25
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
26
- get when() {
27
- return command.alias.length > 0;
28
- },
29
- get children() {
30
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
31
- get each() {
32
- return command.alias;
33
- },
34
- hardline: true,
35
- children: (alias) => _alloy_js_core.code`writeLine(
36
- textColors.body.secondary(\`\${textColors.usage.bin(">_ ${(0, _shell_shock_core_plugin_utils.getAppBin)(context)}")}${command.segments.length > 1 ? ` ${command.segments.slice(0, -1).map((segment) => `\${textColors.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(" ")}` : ""} \${textColors.usage.command("${alias}")}${Object.values(command.children).length > 0 ? ` \${textColors.usage.dynamic("<command>")}` : ""}${command.args.length > 0 ? ` ${command.args.map((arg) => `\${textColors.usage.args("<${(arg.type === "string" || arg.type === "number") && arg.choices && arg.choices.length > 0 ? arg.choices.map((choice) => (0, _stryke_string_format_snake_case.snakeCase)(String(choice))).join("|") : arg.type === "string" && arg.format ? (0, _stryke_string_format_snake_case.snakeCase)(arg.format) : (0, _stryke_string_format_snake_case.snakeCase)(arg.name)}${(arg.type === "string" || arg.type === "number") && arg.variadic ? "..." : ""}>")}`).join(" ")}` : ""} \${textColors.usage.options("[options]")}\`), { padding: ${(theme.padding.app ?? 1) * indent} }
37
- );`
38
- });
39
- }
40
- }),
41
24
  (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
42
25
  (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
43
26
  get when() {
@@ -53,7 +36,38 @@ function HelpUsageDisplay(props) {
53
36
  (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
54
37
  ];
55
38
  }
56
- })
39
+ }),
40
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
41
+ get when() {
42
+ return command.alias.length > 0;
43
+ },
44
+ get children() {
45
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
46
+ get each() {
47
+ return command.alias;
48
+ },
49
+ hardline: true,
50
+ children: (alias) => [(0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`writeLine(
51
+ textColors.body.secondary(\`\${textColors.usage.bin(">_ ${(0, _shell_shock_core_plugin_utils.getAppBin)(context)}")}${command.segments.length > 1 ? ` ${command.segments.slice(0, -1).map((segment) => `\${textColors.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(" ")}` : ""} \${textColors.usage.command("${alias}")}${Object.values(command.children).length > 0 ? ` \${textColors.usage.dynamic("<command>")}` : ""}${command.args.length > 0 ? ` ${command.args.map((arg) => `\${textColors.usage.args("<${(arg.type === "string" || arg.type === "number") && arg.choices && arg.choices.length > 0 ? arg.choices.map((choice) => (0, _stryke_string_format_snake_case.snakeCase)(String(choice))).join("|") : arg.type === "string" && arg.format ? (0, _stryke_string_format_snake_case.snakeCase)(arg.format) : (0, _stryke_string_format_snake_case.snakeCase)(arg.name)}${(arg.type === "string" || arg.type === "number") && arg.variadic ? "..." : ""}>")}`).join(" ")}` : ""} \${textColors.usage.options("[options]")}\`), { padding: ${(theme.padding.app ?? 1) * indent} }
52
+ );`), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
53
+ get when() {
54
+ return command.args.length > 0;
55
+ },
56
+ get children() {
57
+ return [
58
+ (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
59
+ (0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`
60
+ writeLine(
61
+ textColors.body.secondary(\`\${textColors.usage.bin(">_ ${(0, _shell_shock_core_plugin_utils.getAppBin)(context)}")}${command.segments.length > 1 ? ` ${command.segments.slice(0, -1).map((segment) => `\${textColors.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(" ")}` : ""} \${textColors.usage.command("${alias}")}${Object.values(command.children).length > 0 ? ` \${textColors.usage.dynamic("<command>")}` : ""} \${textColors.usage.options("[options]")}${command.args.length > 0 ? ` ${command.args.map((arg) => `\${textColors.usage.args("<${(arg.type === "string" || arg.type === "number") && arg.choices && arg.choices.length > 0 ? arg.choices.map((choice) => (0, _stryke_string_format_snake_case.snakeCase)(String(choice))).join("|") : arg.type === "string" && arg.format ? (0, _stryke_string_format_snake_case.snakeCase)(arg.format) : (0, _stryke_string_format_snake_case.snakeCase)(arg.name)}${(arg.type === "string" || arg.type === "number") && arg.variadic ? "..." : ""}>")}`).join(" ")}` : ""}\`), { padding: ${(theme.padding.app ?? 1) * indent} }
62
+ );`),
63
+ (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
64
+ ];
65
+ }
66
+ })]
67
+ });
68
+ }
69
+ }),
70
+ (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
57
71
  ];
58
72
  }
59
73
  /**
@@ -67,7 +81,7 @@ function HelpOptionsDisplay(props) {
67
81
  (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
68
82
  (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
69
83
  get each() {
70
- return (0, _shell_shock_core_plugin_utils.sortOptions)(options);
84
+ return (0, _shell_shock_core_plugin_utils.sortOptions)(options, false);
71
85
  },
72
86
  hardline: true,
73
87
  children: (option) => {
@@ -1 +1 @@
1
- {"version":3,"file":"display.d.cts","names":[],"sources":["../../src/components/display.tsx"],"mappings":";;;UAqCiB,qBAAA;;AAAjB;;EAIE,OAAA,EAAS,WAAW;EAAA;;;;;AAUd;AAMR;;EANE,MAAA;AAAA;;;;iBAMc,gBAAA,CAAiB,KAAA,EAAO,qBAAqB,4BAAA,QAAA;AAAA,UA0K5C,uBAAA;EAAA;;;EAIf,OAAA,EAAS,aAAa;AAAA;AAMxB;;;AAAA,iBAAgB,kBAAA,CAAmB,KAAA,EAAO,uBAAuB,4BAAA,QAAA;AAAA,UAoFhD,wBAAA;EApFkB;;;EAwFjC,QAAA,EAAU,MAAM,SAAS,WAAA;AAAA;;;;iBAMX,mBAAA,CAAoB,KAAA,EAAO,wBAAwB,4BAAA,QAAA;AAAA,UA+BlD,oBAAA;EArCU;;AAAW;EAyCpC,OAAA,EAAS,WAAW;EAnCa;;;;;;;AAAgC;EA6CjE,mBAAA;EAdmC;;;;;;;;EAwBnC,MAAA;AAAA;;;;iBAMc,eAAA,CAAgB,KAAA,EAAO,oBAAoB,4BAAA,QAAA;AAAA,UA0D1C,8BAAA;EA1D0C;;AAAA;EA8DzD,OAAA,EAAS,aAAA;EAJoC;;;EAS7C,QAAA,EAAU,MAAA,SAAe,WAAA;EAAf;;;;;;EAQV,QAAA;AAAA;;;AAAQ;iBA4CM,yBAAA,CACd,KAAA,EAAO,8BAA8B,4BAAA,QAAA;AAAA,UA8DtB,uBAAA;;;;EAIf,OAAA,EAAS,WAAW;AAAA;;AAlEiB;AA8DvC;iBAUgB,kBAAA,CAAmB,KAAA,EAAO,uBAAuB,4BAAA,QAAA"}
1
+ {"version":3,"file":"display.d.cts","names":[],"sources":["../../src/components/display.tsx"],"mappings":";;;UAqCiB,qBAAA;;AAAjB;;EAIE,OAAA,EAAS,WAAW;EAAA;;;;;AAUd;AAMR;;EANE,MAAA;AAAA;;;;iBAMc,gBAAA,CAAiB,KAAA,EAAO,qBAAqB,4BAAA,QAAA;AAAA,UAkO5C,uBAAA;EAAA;;;EAIf,OAAA,EAAS,aAAa;AAAA;AAMxB;;;AAAA,iBAAgB,kBAAA,CAAmB,KAAA,EAAO,uBAAuB,4BAAA,QAAA;AAAA,UAoFhD,wBAAA;EApFkB;;;EAwFjC,QAAA,EAAU,MAAM,SAAS,WAAA;AAAA;;;;iBAMX,mBAAA,CAAoB,KAAA,EAAO,wBAAwB,4BAAA,QAAA;AAAA,UA+BlD,oBAAA;EArCU;;AAAW;EAyCpC,OAAA,EAAS,WAAW;EAnCa;;;;;;;AAAgC;EA6CjE,mBAAA;EAdmC;;;;;;;;EAwBnC,MAAA;AAAA;;;;iBAMc,eAAA,CAAgB,KAAA,EAAO,oBAAoB,4BAAA,QAAA;AAAA,UA0D1C,8BAAA;EA1D0C;;AAAA;EA8DzD,OAAA,EAAS,aAAA;EAJoC;;;EAS7C,QAAA,EAAU,MAAA,SAAe,WAAA;EAAf;;;;;;EAQV,QAAA;AAAA;;;AAAQ;iBA4CM,yBAAA,CACd,KAAA,EAAO,8BAA8B,4BAAA,QAAA;AAAA,UA8DtB,uBAAA;;;;EAIf,OAAA,EAAS,WAAW;AAAA;;AAlEiB;AA8DvC;iBAUgB,kBAAA,CAAmB,KAAA,EAAO,uBAAuB,4BAAA,QAAA"}
@@ -20,23 +20,6 @@ function HelpUsageDisplay(props) {
20
20
  memo(() => code`writeLine(
21
21
  textColors.body.secondary(\`\${textColors.usage.bin(">_ ${getAppBin(context)}")}${command.segments.length > 0 ? ` ${command.segments.map((segment) => `\${textColors.usage.${isDynamicPathSegment(segment) ? "dynamic" : "command"}("${isDynamicPathSegment(segment) ? `[${snakeCase(getDynamicPathSegmentName(segment))}]` : segment}")}`).join(" ")}` : ""}${Object.values(command.children).length > 0 ? ` \${textColors.usage.dynamic("<command>")}` : ""}${command.args.length > 0 ? ` ${command.args.map((arg) => `\${textColors.usage.args("<${(arg.type === "string" || arg.type === "number") && arg.choices && arg.choices.length > 0 ? arg.choices.map((choice) => snakeCase(String(choice))).join("|") : arg.type === "string" && arg.format ? snakeCase(arg.format) : snakeCase(arg.name)}${(arg.type === "string" || arg.type === "number") && arg.variadic ? "..." : ""}>")}`).join(" ")}` : ""} \${textColors.usage.options("[options]")}\`), { padding: ${(theme.padding.app ?? 1) * indent} }
22
22
  );`),
23
- createIntrinsic("hbr", {}),
24
- createComponent(Show, {
25
- get when() {
26
- return command.alias.length > 0;
27
- },
28
- get children() {
29
- return createComponent(For, {
30
- get each() {
31
- return command.alias;
32
- },
33
- hardline: true,
34
- children: (alias) => code`writeLine(
35
- textColors.body.secondary(\`\${textColors.usage.bin(">_ ${getAppBin(context)}")}${command.segments.length > 1 ? ` ${command.segments.slice(0, -1).map((segment) => `\${textColors.usage.${isDynamicPathSegment(segment) ? "dynamic" : "command"}("${isDynamicPathSegment(segment) ? `[${snakeCase(getDynamicPathSegmentName(segment))}]` : segment}")}`).join(" ")}` : ""} \${textColors.usage.command("${alias}")}${Object.values(command.children).length > 0 ? ` \${textColors.usage.dynamic("<command>")}` : ""}${command.args.length > 0 ? ` ${command.args.map((arg) => `\${textColors.usage.args("<${(arg.type === "string" || arg.type === "number") && arg.choices && arg.choices.length > 0 ? arg.choices.map((choice) => snakeCase(String(choice))).join("|") : arg.type === "string" && arg.format ? snakeCase(arg.format) : snakeCase(arg.name)}${(arg.type === "string" || arg.type === "number") && arg.variadic ? "..." : ""}>")}`).join(" ")}` : ""} \${textColors.usage.options("[options]")}\`), { padding: ${(theme.padding.app ?? 1) * indent} }
36
- );`
37
- });
38
- }
39
- }),
40
23
  createIntrinsic("hbr", {}),
41
24
  createComponent(Show, {
42
25
  get when() {
@@ -52,7 +35,38 @@ function HelpUsageDisplay(props) {
52
35
  createIntrinsic("hbr", {})
53
36
  ];
54
37
  }
55
- })
38
+ }),
39
+ createComponent(Show, {
40
+ get when() {
41
+ return command.alias.length > 0;
42
+ },
43
+ get children() {
44
+ return createComponent(For, {
45
+ get each() {
46
+ return command.alias;
47
+ },
48
+ hardline: true,
49
+ children: (alias) => [memo(() => code`writeLine(
50
+ textColors.body.secondary(\`\${textColors.usage.bin(">_ ${getAppBin(context)}")}${command.segments.length > 1 ? ` ${command.segments.slice(0, -1).map((segment) => `\${textColors.usage.${isDynamicPathSegment(segment) ? "dynamic" : "command"}("${isDynamicPathSegment(segment) ? `[${snakeCase(getDynamicPathSegmentName(segment))}]` : segment}")}`).join(" ")}` : ""} \${textColors.usage.command("${alias}")}${Object.values(command.children).length > 0 ? ` \${textColors.usage.dynamic("<command>")}` : ""}${command.args.length > 0 ? ` ${command.args.map((arg) => `\${textColors.usage.args("<${(arg.type === "string" || arg.type === "number") && arg.choices && arg.choices.length > 0 ? arg.choices.map((choice) => snakeCase(String(choice))).join("|") : arg.type === "string" && arg.format ? snakeCase(arg.format) : snakeCase(arg.name)}${(arg.type === "string" || arg.type === "number") && arg.variadic ? "..." : ""}>")}`).join(" ")}` : ""} \${textColors.usage.options("[options]")}\`), { padding: ${(theme.padding.app ?? 1) * indent} }
51
+ );`), createComponent(Show, {
52
+ get when() {
53
+ return command.args.length > 0;
54
+ },
55
+ get children() {
56
+ return [
57
+ createIntrinsic("hbr", {}),
58
+ memo(() => code`
59
+ writeLine(
60
+ textColors.body.secondary(\`\${textColors.usage.bin(">_ ${getAppBin(context)}")}${command.segments.length > 1 ? ` ${command.segments.slice(0, -1).map((segment) => `\${textColors.usage.${isDynamicPathSegment(segment) ? "dynamic" : "command"}("${isDynamicPathSegment(segment) ? `[${snakeCase(getDynamicPathSegmentName(segment))}]` : segment}")}`).join(" ")}` : ""} \${textColors.usage.command("${alias}")}${Object.values(command.children).length > 0 ? ` \${textColors.usage.dynamic("<command>")}` : ""} \${textColors.usage.options("[options]")}${command.args.length > 0 ? ` ${command.args.map((arg) => `\${textColors.usage.args("<${(arg.type === "string" || arg.type === "number") && arg.choices && arg.choices.length > 0 ? arg.choices.map((choice) => snakeCase(String(choice))).join("|") : arg.type === "string" && arg.format ? snakeCase(arg.format) : snakeCase(arg.name)}${(arg.type === "string" || arg.type === "number") && arg.variadic ? "..." : ""}>")}`).join(" ")}` : ""}\`), { padding: ${(theme.padding.app ?? 1) * indent} }
61
+ );`),
62
+ createIntrinsic("hbr", {})
63
+ ];
64
+ }
65
+ })]
66
+ });
67
+ }
68
+ }),
69
+ createIntrinsic("hbr", {})
56
70
  ];
57
71
  }
58
72
  /**
@@ -66,7 +80,7 @@ function HelpOptionsDisplay(props) {
66
80
  createIntrinsic("hbr", {}),
67
81
  createComponent(For, {
68
82
  get each() {
69
- return sortOptions(options);
83
+ return sortOptions(options, false);
70
84
  },
71
85
  hardline: true,
72
86
  children: (option) => {
@@ -109,7 +109,7 @@ function HelpBuiltin(props) {
109
109
  return Object.keys(command.children).length > 0;
110
110
  },
111
111
  get children() {
112
- return _alloy_js_core.code`help(\`Running a specific command with the help flag (via: \${inlineCode("${(0, _shell_shock_core_plugin_utils.getAppBin)(context)}${command.segments && command.segments.length > 0 ? ` ${command.segments.join(" ")}` : ""} <specific command> --help")}) or the help command with the specific command as arguments (via: \${inlineCode("${(0, _shell_shock_core_plugin_utils.getAppBin)(context)} ${command.segments && command.segments.length > 0 ? ` ${command.segments.join(" ")}` : ""} help <specific command>")}) will provide additional information that is specific to that command.\`);
112
+ return _alloy_js_core.code`help(\`Running a specific command with the help flag (via: \${inlineCode("${(0, _shell_shock_core_plugin_utils.getAppBin)(context)}${command.segments && command.segments.length > 0 ? ` ${command.segments.join(" ")}` : ""} <specific command> --help")}) or the help command with the specific command as arguments (via: \${inlineCode("${(0, _shell_shock_core_plugin_utils.getAppBin)(context)}${command.segments && command.segments.length > 0 ? ` ${command.segments.join(" ")}` : ""} help <specific command>")}) will provide additional information that is specific to that command.\`);
113
113
  writeLine("");`;
114
114
  }
115
115
  })
@@ -106,7 +106,7 @@ function HelpBuiltin(props) {
106
106
  return Object.keys(command.children).length > 0;
107
107
  },
108
108
  get children() {
109
- return code`help(\`Running a specific command with the help flag (via: \${inlineCode("${getAppBin(context)}${command.segments && command.segments.length > 0 ? ` ${command.segments.join(" ")}` : ""} <specific command> --help")}) or the help command with the specific command as arguments (via: \${inlineCode("${getAppBin(context)} ${command.segments && command.segments.length > 0 ? ` ${command.segments.join(" ")}` : ""} help <specific command>")}) will provide additional information that is specific to that command.\`);
109
+ return code`help(\`Running a specific command with the help flag (via: \${inlineCode("${getAppBin(context)}${command.segments && command.segments.length > 0 ? ` ${command.segments.join(" ")}` : ""} <specific command> --help")}) or the help command with the specific command as arguments (via: \${inlineCode("${getAppBin(context)}${command.segments && command.segments.length > 0 ? ` ${command.segments.join(" ")}` : ""} help <specific command>")}) will provide additional information that is specific to that command.\`);
110
110
  writeLine("");`;
111
111
  }
112
112
  })
@@ -27,8 +27,8 @@ function TemporaryHelpCommand() {
27
27
  heading: "Display command usage details and other useful information to the user.",
28
28
  get children() {
29
29
  return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocParam, {
30
- name: "segments",
31
- children: `The command segments for the command to show help for. This is used to determine which command's help information to display. If no segments are provided, general help information about the CLI application will be displayed.`
30
+ name: "commands",
31
+ children: `The command segments for the command to show help for. This is used to determine which command's help information to display. If no commands are provided, general help information about the CLI application will be displayed.`
32
32
  });
33
33
  }
34
34
  }),
@@ -38,7 +38,7 @@ function TemporaryHelpCommand() {
38
38
  async: true,
39
39
  name: "handler",
40
40
  parameters: [{
41
- name: "segments",
41
+ name: "commands",
42
42
  type: "string[]",
43
43
  default: "[]"
44
44
  }]
@@ -52,10 +52,10 @@ function TemporaryHelpCommand() {
52
52
  */
53
53
  function HelpCommand(props) {
54
54
  const context = (0, _powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
55
- const helpImports = (0, _alloy_js_core.computed)(() => props.commands ? props.commands.reduce((ret, segments) => {
56
- ret[(0, _stryke_path.joinPaths)("help", ...segments)] = [{
55
+ const helpImports = (0, _alloy_js_core.computed)(() => props.commands ? props.commands.reduce((ret, commands) => {
56
+ ret[(0, _stryke_path.joinPaths)("help", ...commands)] = [{
57
57
  name: "showHelp",
58
- alias: `showHelp${segments.map((segment) => (0, _stryke_string_format_pascal_case.pascalCase)(segment.replace(/-/g, ""))).join("")}`
58
+ alias: `showHelp${commands.map((command) => (0, _stryke_string_format_pascal_case.pascalCase)(command.replace(/-/g, ""))).join("")}`
59
59
  }];
60
60
  return ret;
61
61
  }, {}) : {});
@@ -91,8 +91,8 @@ function HelpCommand(props) {
91
91
  heading: "Display command usage details and other useful information to the user.",
92
92
  get children() {
93
93
  return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocParam, {
94
- name: "segments",
95
- children: `The command segments for the command to show help for. This is used to determine which command's help information to display. If no segments are provided, general help information about the CLI application will be displayed.`
94
+ name: "commands",
95
+ children: `The command segments for the command to show help for. This is used to determine which command's help information to display. If no commands are provided, general help information about the CLI application will be displayed.`
96
96
  });
97
97
  }
98
98
  }), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
@@ -101,7 +101,7 @@ function HelpCommand(props) {
101
101
  async: true,
102
102
  name: "handler",
103
103
  parameters: [{
104
- name: "segments",
104
+ name: "commands",
105
105
  type: "string[]",
106
106
  default: "[]"
107
107
  }],
@@ -115,25 +115,25 @@ function HelpCommand(props) {
115
115
  return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
116
116
  each: commandSegmentsList,
117
117
  doubleHardline: true,
118
- children: (segments, index) => (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
118
+ children: (commands, index) => (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
119
119
  when: index > 0,
120
120
  get fallback() {
121
121
  return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
122
122
  get condition() {
123
- return _alloy_js_core.code`segments.join("/").toLowerCase() === "${segments.join("/").toLowerCase()}"`;
123
+ return _alloy_js_core.code`commands.join("/").toLowerCase() === "${commands.join("/").toLowerCase()}"`;
124
124
  },
125
125
  get children() {
126
- return _alloy_js_core.code` showHelp${segments.map((segment) => (0, _stryke_string_format_pascal_case.pascalCase)(segment)).join("")}(); `;
126
+ return _alloy_js_core.code` showHelp${commands.map((command) => (0, _stryke_string_format_pascal_case.pascalCase)(command)).join("")}(); `;
127
127
  }
128
128
  });
129
129
  },
130
130
  get children() {
131
131
  return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseIfClause, {
132
132
  get condition() {
133
- return _alloy_js_core.code`segments.join("/").toLowerCase() === "${segments.join("/").toLowerCase()}"`;
133
+ return _alloy_js_core.code`commands.join("/").toLowerCase() === "${commands.join("/").toLowerCase()}"`;
134
134
  },
135
135
  get children() {
136
- return _alloy_js_core.code` showHelp${segments.map((segment) => (0, _stryke_string_format_pascal_case.pascalCase)(segment)).join("")}(); `;
136
+ return _alloy_js_core.code` showHelp${commands.map((command) => (0, _stryke_string_format_pascal_case.pascalCase)(command)).join("")}(); `;
137
137
  }
138
138
  });
139
139
  }
@@ -26,8 +26,8 @@ function TemporaryHelpCommand() {
26
26
  heading: "Display command usage details and other useful information to the user.",
27
27
  get children() {
28
28
  return createComponent(TSDocParam, {
29
- name: "segments",
30
- children: `The command segments for the command to show help for. This is used to determine which command's help information to display. If no segments are provided, general help information about the CLI application will be displayed.`
29
+ name: "commands",
30
+ children: `The command segments for the command to show help for. This is used to determine which command's help information to display. If no commands are provided, general help information about the CLI application will be displayed.`
31
31
  });
32
32
  }
33
33
  }),
@@ -37,7 +37,7 @@ function TemporaryHelpCommand() {
37
37
  async: true,
38
38
  name: "handler",
39
39
  parameters: [{
40
- name: "segments",
40
+ name: "commands",
41
41
  type: "string[]",
42
42
  default: "[]"
43
43
  }]
@@ -51,10 +51,10 @@ function TemporaryHelpCommand() {
51
51
  */
52
52
  function HelpCommand(props) {
53
53
  const context = usePowerlines();
54
- const helpImports = computed(() => props.commands ? props.commands.reduce((ret, segments) => {
55
- ret[joinPaths("help", ...segments)] = [{
54
+ const helpImports = computed(() => props.commands ? props.commands.reduce((ret, commands) => {
55
+ ret[joinPaths("help", ...commands)] = [{
56
56
  name: "showHelp",
57
- alias: `showHelp${segments.map((segment) => pascalCase(segment.replace(/-/g, ""))).join("")}`
57
+ alias: `showHelp${commands.map((command) => pascalCase(command.replace(/-/g, ""))).join("")}`
58
58
  }];
59
59
  return ret;
60
60
  }, {}) : {});
@@ -90,8 +90,8 @@ function HelpCommand(props) {
90
90
  heading: "Display command usage details and other useful information to the user.",
91
91
  get children() {
92
92
  return createComponent(TSDocParam, {
93
- name: "segments",
94
- children: `The command segments for the command to show help for. This is used to determine which command's help information to display. If no segments are provided, general help information about the CLI application will be displayed.`
93
+ name: "commands",
94
+ children: `The command segments for the command to show help for. This is used to determine which command's help information to display. If no commands are provided, general help information about the CLI application will be displayed.`
95
95
  });
96
96
  }
97
97
  }), createComponent(FunctionDeclaration, {
@@ -100,7 +100,7 @@ function HelpCommand(props) {
100
100
  async: true,
101
101
  name: "handler",
102
102
  parameters: [{
103
- name: "segments",
103
+ name: "commands",
104
104
  type: "string[]",
105
105
  default: "[]"
106
106
  }],
@@ -114,25 +114,25 @@ function HelpCommand(props) {
114
114
  return [createComponent(For, {
115
115
  each: commandSegmentsList,
116
116
  doubleHardline: true,
117
- children: (segments, index) => createComponent(Show, {
117
+ children: (commands, index) => createComponent(Show, {
118
118
  when: index > 0,
119
119
  get fallback() {
120
120
  return createComponent(IfStatement, {
121
121
  get condition() {
122
- return code`segments.join("/").toLowerCase() === "${segments.join("/").toLowerCase()}"`;
122
+ return code`commands.join("/").toLowerCase() === "${commands.join("/").toLowerCase()}"`;
123
123
  },
124
124
  get children() {
125
- return code` showHelp${segments.map((segment) => pascalCase(segment)).join("")}(); `;
125
+ return code` showHelp${commands.map((command) => pascalCase(command)).join("")}(); `;
126
126
  }
127
127
  });
128
128
  },
129
129
  get children() {
130
130
  return createComponent(ElseIfClause, {
131
131
  get condition() {
132
- return code`segments.join("/").toLowerCase() === "${segments.join("/").toLowerCase()}"`;
132
+ return code`commands.join("/").toLowerCase() === "${commands.join("/").toLowerCase()}"`;
133
133
  },
134
134
  get children() {
135
- return code` showHelp${segments.map((segment) => pascalCase(segment)).join("")}(); `;
135
+ return code` showHelp${commands.map((command) => pascalCase(command)).join("")}(); `;
136
136
  }
137
137
  });
138
138
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shell-shock/plugin-help",
3
- "version": "0.2.35",
3
+ "version": "0.2.37",
4
4
  "private": false,
5
5
  "description": "A package containing a Shell Shock plugin to provide help and documentation for the local application's commands.",
6
6
  "keywords": [
@@ -156,9 +156,9 @@
156
156
  "@powerlines/deepkit": "^0.9.81",
157
157
  "@powerlines/plugin-alloy": "^0.26.220",
158
158
  "@powerlines/plugin-plugin": "^0.12.539",
159
- "@shell-shock/core": "0.17.17",
160
- "@shell-shock/plugin-console": "0.2.21",
161
- "@shell-shock/plugin-theme": "0.4.30",
159
+ "@shell-shock/core": "0.17.19",
160
+ "@shell-shock/plugin-console": "0.2.23",
161
+ "@shell-shock/plugin-theme": "0.4.32",
162
162
  "@stryke/helpers": "^0.10.24",
163
163
  "@stryke/path": "^0.29.11",
164
164
  "@stryke/string-format": "^0.17.26",
@@ -172,5 +172,5 @@
172
172
  "@types/node": "^25.9.2"
173
173
  },
174
174
  "publishConfig": { "access": "public" },
175
- "gitHead": "8c9f000d243ed0b6ac67b2be112429ddeccd0617"
175
+ "gitHead": "f65ed318b22c10407fc4f3770b3f1f742d02ab35"
176
176
  }