feat: add layered CLI help registry
This commit is contained in:
1 parent
a5c0146c8d
commit
34983e1c07
4 files changed
+76
-3
No files matched your search
+3
-1
@@ -2,6 +2,7 @@ import { writeFileSync } from "node:fs";
|
||||
import { VERSION } from "../version.js";
|
||||
import type { OutputOptions } from "./types.js";
|
||||
import { PayloadTooLargeError } from "./errors.js";
|
||||
import { renderScopedHelp } from "./help.js";
|
||||
|
||||
export const DEFAULT_OUTPUT_BYTES_LIMIT = 200_000;
|
||||
|
||||
@@ -111,7 +112,8 @@ export function printTable(
|
||||
return [headerLine, separatorLine, ...dataLines].map((l) => ` ${l}`).join("\n");
|
||||
}
|
||||
|
||||
export function printHelp(): string {
|
||||
export function printHelp(target: string[] = []): string {
|
||||
if (target.length) return renderScopedHelp(target);
|
||||
return `
|
||||
合思/易快报企业级 CLI 工具 (hose-use) v${VERSION}
|
||||
|
||||
|
||||
Reference in new issue
Block a user