@dereekb/dbx-cli 13.11.1 → 13.11.2

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.
@@ -1,5 +1,22 @@
1
1
  import { type CommandModule } from 'yargs';
2
2
  import { type CliApiManifest } from './types';
3
+ /**
4
+ * Controls which sections of an action's `--help` epilogue are rendered.
5
+ *
6
+ * - `action` (just the action explainer): only the action description JSDoc.
7
+ * Useful when you already know the params shape and want to remember what
8
+ * the command does.
9
+ * - `params` (just the params explainer): only the params interface
10
+ * description, per-field descriptions, schema, result, and source. Useful
11
+ * when you already know what the command does and need to remember the
12
+ * input shape.
13
+ * - `both` (default): both sections together.
14
+ */
15
+ export type ManifestHelpMode = 'action' | 'params' | 'both';
16
+ /**
17
+ * Default help mode when no override is supplied.
18
+ */
19
+ export declare const DEFAULT_MANIFEST_HELP_MODE: ManifestHelpMode;
3
20
  /**
4
21
  * Format used for the `Params Schema` section of a manifest command's `--help`
5
22
  * epilogue.
@@ -33,6 +50,14 @@ export interface BuildManifestCommandsOptions {
33
50
  * {@link DEFAULT_MANIFEST_HELP_DATA_FORMAT}.
34
51
  */
35
52
  readonly dataHelpFormat?: ManifestHelpDataFormat;
53
+ /**
54
+ * Which sections of the help epilogue to render.
55
+ *
56
+ * When omitted, the configured argv is scanned for `--help-mode=<mode>` (or
57
+ * `--help-mode <mode>`). Falls back to {@link DEFAULT_MANIFEST_HELP_MODE}
58
+ * (`both`).
59
+ */
60
+ readonly helpMode?: ManifestHelpMode;
36
61
  /**
37
62
  * Whether to hide unrelated global options (like `--verbose`, `--dump-dir`,
38
63
  * `--pick`, …) from `--help` when the user passed `--data-help`. Defaults
@@ -92,3 +117,16 @@ export declare function buildManifestCommands(manifest: CliApiManifest, options?
92
117
  * @returns The detected format, or {@link DEFAULT_MANIFEST_HELP_DATA_FORMAT}.
93
118
  */
94
119
  export declare function detectDataHelpFormat(argv?: readonly string[]): ManifestHelpDataFormat;
120
+ /**
121
+ * Inspects an argv array for `--help-mode=<mode>` or `--help-mode <mode>` and
122
+ * returns the requested {@link ManifestHelpMode}. Unrecognized values fall
123
+ * back to {@link DEFAULT_MANIFEST_HELP_MODE}.
124
+ *
125
+ * Implemented as a raw argv scan (rather than going through yargs) because the
126
+ * value is needed when each command's builder runs — which is before yargs
127
+ * parses argv.
128
+ *
129
+ * @param argv - argv to inspect (defaults to `process.argv`).
130
+ * @returns The detected mode, or {@link DEFAULT_MANIFEST_HELP_MODE}.
131
+ */
132
+ export declare function detectHelpMode(argv?: readonly string[]): ManifestHelpMode;
@@ -14,7 +14,27 @@ export interface CliApiManifestEntry {
14
14
  readonly resultTypeName?: string;
15
15
  readonly groupName: string;
16
16
  readonly sourceFile: string;
17
+ /**
18
+ * Per-action description, rendered as the command's `describe` in `--help`.
19
+ */
17
20
  readonly description?: string;
21
+ /**
22
+ * Description from the params interface's own JSDoc (e.g. on `ResetProfilePasswordParams`).
23
+ * Rendered in the `--help` epilogue under the params section.
24
+ */
25
+ readonly paramsTypeDescription?: string;
26
+ /**
27
+ * Per-field params descriptions read from the params interface's property JSDocs.
28
+ */
18
29
  readonly paramsFields?: readonly CliApiManifestField[];
30
+ /**
31
+ * Description from the result interface's own JSDoc (e.g. on `DownloadProfileArchiveResult`).
32
+ * Surfaces the same way `paramsTypeDescription` does, but for the response side.
33
+ */
34
+ readonly resultTypeDescription?: string;
35
+ /**
36
+ * Per-field result descriptions read from the result interface's property JSDocs.
37
+ */
38
+ readonly resultFields?: readonly CliApiManifestField[];
19
39
  }
20
40
  export type CliApiManifest = readonly CliApiManifestEntry[];