padrone 1.0.0 → 1.2.0
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.
- package/CHANGELOG.md +51 -0
- package/LICENSE +1 -1
- package/README.md +92 -49
- package/dist/args-CKNh7Dm9.mjs +175 -0
- package/dist/args-CKNh7Dm9.mjs.map +1 -0
- package/dist/chunk-y_GBKt04.mjs +5 -0
- package/dist/codegen/index.d.mts +305 -0
- package/dist/codegen/index.d.mts.map +1 -0
- package/dist/codegen/index.mjs +1348 -0
- package/dist/codegen/index.mjs.map +1 -0
- package/dist/completion.d.mts +64 -0
- package/dist/completion.d.mts.map +1 -0
- package/dist/completion.mjs +417 -0
- package/dist/completion.mjs.map +1 -0
- package/dist/docs/index.d.mts +34 -0
- package/dist/docs/index.d.mts.map +1 -0
- package/dist/docs/index.mjs +404 -0
- package/dist/docs/index.mjs.map +1 -0
- package/dist/formatter-Dvx7jFXr.d.mts +82 -0
- package/dist/formatter-Dvx7jFXr.d.mts.map +1 -0
- package/dist/help-mUIX0T0V.mjs +1195 -0
- package/dist/help-mUIX0T0V.mjs.map +1 -0
- package/dist/index.d.mts +122 -438
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1240 -1161
- package/dist/index.mjs.map +1 -1
- package/dist/test.d.mts +112 -0
- package/dist/test.d.mts.map +1 -0
- package/dist/test.mjs +138 -0
- package/dist/test.mjs.map +1 -0
- package/dist/types-qrtt0135.d.mts +1037 -0
- package/dist/types-qrtt0135.d.mts.map +1 -0
- package/dist/update-check-EbNDkzyV.mjs +146 -0
- package/dist/update-check-EbNDkzyV.mjs.map +1 -0
- package/package.json +61 -20
- package/src/args.ts +365 -0
- package/src/cli/completions.ts +29 -0
- package/src/cli/docs.ts +86 -0
- package/src/cli/doctor.ts +312 -0
- package/src/cli/index.ts +159 -0
- package/src/cli/init.ts +135 -0
- package/src/cli/link.ts +320 -0
- package/src/cli/wrap.ts +152 -0
- package/src/codegen/README.md +118 -0
- package/src/codegen/code-builder.ts +226 -0
- package/src/codegen/discovery.ts +232 -0
- package/src/codegen/file-emitter.ts +73 -0
- package/src/codegen/generators/barrel-file.ts +16 -0
- package/src/codegen/generators/command-file.ts +184 -0
- package/src/codegen/generators/command-tree.ts +124 -0
- package/src/codegen/index.ts +33 -0
- package/src/codegen/parsers/fish.ts +163 -0
- package/src/codegen/parsers/help.ts +378 -0
- package/src/codegen/parsers/merge.ts +158 -0
- package/src/codegen/parsers/zsh.ts +221 -0
- package/src/codegen/schema-to-code.ts +199 -0
- package/src/codegen/template.ts +69 -0
- package/src/codegen/types.ts +143 -0
- package/src/colorizer.ts +2 -2
- package/src/command-utils.ts +501 -0
- package/src/completion.ts +110 -97
- package/src/create.ts +1044 -284
- package/src/docs/index.ts +607 -0
- package/src/errors.ts +131 -0
- package/src/formatter.ts +149 -63
- package/src/help.ts +151 -55
- package/src/index.ts +13 -15
- package/src/interactive.ts +169 -0
- package/src/parse.ts +31 -16
- package/src/repl-loop.ts +317 -0
- package/src/runtime.ts +304 -0
- package/src/shell-utils.ts +83 -0
- package/src/test.ts +285 -0
- package/src/type-helpers.ts +12 -12
- package/src/type-utils.ts +124 -14
- package/src/types.ts +803 -144
- package/src/update-check.ts +244 -0
- package/src/wrap.ts +185 -0
- package/src/zod.d.ts +2 -2
- package/src/options.ts +0 -180
package/dist/index.d.mts
CHANGED
|
@@ -1,476 +1,160 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { _ as PossibleCommands, a as PadroneActionContext, b as PadroneRuntime, c as PadroneCommandResult, d as PadroneProgram, f as PadroneSchema, g as PickCommandByName, h as UpdateCheckConfig, i as AsyncPadroneSchema, l as PadroneParseResult, m as WrapResult, n as AnyPadroneCommand, o as PadroneBuilder, p as WrapConfig, r as AnyPadroneProgram, s as PadroneCommand, t as AnyPadroneBuilder, u as PadronePlugin, v as InteractiveMode, x as REPL_SIGINT, y as InteractivePromptConfig } from "./types-qrtt0135.mjs";
|
|
2
|
+
import { r as HelpInfo } from "./formatter-Dvx7jFXr.mjs";
|
|
3
3
|
|
|
4
|
-
//#region src/
|
|
5
|
-
type HelpFormat = 'text' | 'ansi' | 'console' | 'markdown' | 'html' | 'json';
|
|
6
|
-
type HelpDetail = 'minimal' | 'standard' | 'full';
|
|
4
|
+
//#region src/command-utils.d.ts
|
|
7
5
|
/**
|
|
8
|
-
*
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
name: string;
|
|
12
|
-
description?: string;
|
|
13
|
-
optional: boolean;
|
|
14
|
-
default?: unknown;
|
|
15
|
-
type?: string;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Information about a single option/flag.
|
|
19
|
-
*/
|
|
20
|
-
type HelpOptionInfo = {
|
|
21
|
-
name: string;
|
|
22
|
-
description?: string;
|
|
23
|
-
optional: boolean;
|
|
24
|
-
default?: unknown;
|
|
25
|
-
type?: string;
|
|
26
|
-
enum?: string[];
|
|
27
|
-
aliases?: string[];
|
|
28
|
-
deprecated?: boolean | string;
|
|
29
|
-
hidden?: boolean;
|
|
30
|
-
examples?: unknown[]; /** Environment variable(s) this option can be set from */
|
|
31
|
-
env?: string | string[]; /** Whether this option is an array type (shown as <type...>) */
|
|
32
|
-
variadic?: boolean; /** Whether this option is a boolean (shown as --[no-]option) */
|
|
33
|
-
negatable?: boolean; /** Config file key that maps to this option */
|
|
34
|
-
configKey?: string;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Information about a subcommand (minimal info for listing).
|
|
38
|
-
*/
|
|
39
|
-
type HelpSubcommandInfo = {
|
|
40
|
-
name: string;
|
|
41
|
-
title?: string;
|
|
42
|
-
description?: string;
|
|
43
|
-
aliases?: string[];
|
|
44
|
-
deprecated?: boolean | string;
|
|
45
|
-
hidden?: boolean;
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* Comprehensive JSON structure for help information.
|
|
49
|
-
* This is the single source of truth that all formatters use.
|
|
50
|
-
*/
|
|
51
|
-
type HelpInfo = {
|
|
52
|
-
/** The full command name (e.g., "cli serve" or "<root>") */name: string; /** Short title for the command */
|
|
53
|
-
title?: string; /** Command description */
|
|
54
|
-
description?: string; /** Alternative names/aliases for this command */
|
|
55
|
-
aliases?: string[]; /** Whether the command is deprecated */
|
|
56
|
-
deprecated?: boolean | string; /** Whether the command is hidden */
|
|
57
|
-
hidden?: boolean; /** Usage string parts for flexible formatting */
|
|
58
|
-
usage: {
|
|
59
|
-
command: string;
|
|
60
|
-
hasSubcommands: boolean;
|
|
61
|
-
hasArguments: boolean;
|
|
62
|
-
hasOptions: boolean;
|
|
63
|
-
}; /** List of subcommands */
|
|
64
|
-
subcommands?: HelpSubcommandInfo[]; /** Positional arguments */
|
|
65
|
-
arguments?: HelpArgumentInfo[]; /** Options/flags (only visible ones, hidden filtered out) */
|
|
66
|
-
options?: HelpOptionInfo[]; /** Full help info for nested commands (used in 'full' detail mode) */
|
|
67
|
-
nestedCommands?: HelpInfo[];
|
|
68
|
-
};
|
|
69
|
-
//#endregion
|
|
70
|
-
//#region src/help.d.ts
|
|
71
|
-
type HelpOptions = {
|
|
72
|
-
format?: HelpFormat | 'auto';
|
|
73
|
-
detail?: HelpDetail;
|
|
74
|
-
};
|
|
75
|
-
//#endregion
|
|
76
|
-
//#region src/options.d.ts
|
|
77
|
-
interface PadroneOptionsMeta {
|
|
78
|
-
description?: string;
|
|
79
|
-
alias?: string[] | string;
|
|
80
|
-
deprecated?: boolean | string;
|
|
81
|
-
hidden?: boolean;
|
|
82
|
-
examples?: unknown[];
|
|
83
|
-
}
|
|
84
|
-
type PositionalArgs<TObj> = TObj extends Record<string, any> ? { [K in keyof TObj]: TObj[K] extends Array<any> ? `...${K & string}` : K & string }[keyof TObj] : string;
|
|
85
|
-
/**
|
|
86
|
-
* Meta configuration for options including positional arguments.
|
|
87
|
-
* The `positional` array defines which options are positional arguments and their order.
|
|
88
|
-
* Use '...name' prefix to indicate variadic (rest) arguments, matching JS/TS rest syntax.
|
|
6
|
+
* Brands a schema as async, signaling that its `validate()` may return a Promise.
|
|
7
|
+
* When an async-branded schema is passed to `.arguments()`, `.configFile()`, or `.env()`,
|
|
8
|
+
* the command's `parse()` and `cli()` will return Promises.
|
|
89
9
|
*
|
|
90
10
|
* @example
|
|
91
11
|
* ```ts
|
|
92
|
-
* .
|
|
93
|
-
*
|
|
94
|
-
* })
|
|
12
|
+
* const schema = asyncSchema(z.object({
|
|
13
|
+
* name: z.string(),
|
|
14
|
+
* }).check(async (data) => {
|
|
15
|
+
* // async validation logic
|
|
16
|
+
* }));
|
|
17
|
+
*
|
|
18
|
+
* const program = createPadrone('app')
|
|
19
|
+
* .command('greet', (c) => c.arguments(schema).action((args) => args.name));
|
|
20
|
+
*
|
|
21
|
+
* // parse() now returns Promise<PadroneParseResult>
|
|
22
|
+
* const result = await program.parse('greet --name world');
|
|
95
23
|
* ```
|
|
96
24
|
*/
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
* Array of option names that should be treated as positional arguments.
|
|
100
|
-
* Order in array determines position. Use '...name' prefix for variadic args.
|
|
101
|
-
* @example ['source', '...files', 'dest'] - 'files' captures multiple values
|
|
102
|
-
*/
|
|
103
|
-
positional?: PositionalArgs<TObj>[];
|
|
104
|
-
/**
|
|
105
|
-
* Per-option metadata.
|
|
106
|
-
*/
|
|
107
|
-
options?: { [K in keyof TObj]?: PadroneOptionsMeta };
|
|
108
|
-
}
|
|
109
|
-
//#endregion
|
|
110
|
-
//#region src/type-utils.d.ts
|
|
111
|
-
type SafeString = string & {};
|
|
112
|
-
type IsUnknown<T> = unknown extends T ? true : false;
|
|
113
|
-
type IsAny<T> = any extends T ? true : false;
|
|
114
|
-
type IsNever<T> = [T] extends [never] ? true : false;
|
|
115
|
-
type IsGeneric<T> = IsAny<T> extends true ? true : IsUnknown<T> extends true ? true : IsNever<T> extends true ? true : false;
|
|
116
|
-
type SplitString<TName extends string, TSplitBy extends string = ' '> = TName extends `${infer FirstPart}${TSplitBy}${infer RestParts}` ? [FirstPart, ...SplitString<RestParts, TSplitBy>] : [TName];
|
|
117
|
-
type JoinString<TParts extends string[], TJoinBy extends string = ' '> = TParts extends [infer FirstPart extends string, ...infer RestParts extends string[]] ? RestParts extends [] ? FirstPart : `${FirstPart}${TJoinBy}${JoinString<RestParts, TJoinBy>}` : TParts extends [] ? '' : TParts[number];
|
|
118
|
-
type SplitLastSpace<S extends string> = SplitString<S> extends [...infer Init extends string[], infer Last extends string] ? Init extends [] ? [S, never] : [JoinString<Init>, Last] : [S, never];
|
|
119
|
-
type AnyPartExtends<U, T> = [U] extends [never] ? false : U extends any ? (U extends T ? true : never) : never extends true ? true : false;
|
|
120
|
-
type FullCommandName<TName extends string, TParentName extends string = ''> = TParentName extends '' ? TName : `${TParentName} ${TName}`;
|
|
121
|
-
/**
|
|
122
|
-
* Generate full alias paths by combining parent path with each alias.
|
|
123
|
-
*/
|
|
124
|
-
type FullAliasPaths<TAliases extends string[], TParentName extends string = ''> = TAliases extends [infer First extends string, ...infer Rest extends string[]] ? FullCommandName<First, TParentName> | FullAliasPaths<Rest, TParentName> : never;
|
|
125
|
-
/**
|
|
126
|
-
* Get all paths for a command including its primary path and all alias paths.
|
|
127
|
-
*/
|
|
128
|
-
type GetCommandPathsAndAliases<TCommand extends AnyPadroneCommand> = TCommand['~types']['path'] extends infer Path extends string ? TCommand['~types']['aliases'] extends infer Aliases extends string[] ? TCommand['~types']['parentName'] extends infer ParentName extends string ? Path | FullAliasPaths<Aliases, ParentName> : Path : Path : never;
|
|
129
|
-
type PickCommandByName<TCommands extends AnyPadroneCommand[], TName extends string | AnyPadroneCommand> = TName extends AnyPadroneCommand ? TName : FlattenCommands<TCommands> extends infer Cmd extends AnyPadroneCommand ? Cmd extends AnyPadroneCommand ? TName extends GetCommandPathsAndAliases<Cmd> ? Cmd : never : never : never;
|
|
130
|
-
type FlattenCommands<TCommands extends AnyPadroneCommand[]> = TCommands extends [] ? never : TCommands extends [infer FirstCommand, ...infer RestCommands] ? (RestCommands extends AnyPadroneCommand[] ? FlattenCommands<RestCommands> : never) | (FirstCommand extends AnyPadroneCommand ? FlattenCommands<FirstCommand['~types']['commands']> | FirstCommand : never) : IsAny<TCommands[number]> extends true ? never : TCommands[number];
|
|
131
|
-
/**
|
|
132
|
-
* Get all command paths including alias paths for all commands.
|
|
133
|
-
*/
|
|
134
|
-
type GetCommandPathsOrAliases<TCommands extends AnyPadroneCommand[]> = GetCommandPathsAndAliases<FlattenCommands<TCommands>>;
|
|
135
|
-
/**
|
|
136
|
-
* Find all the commands that are prefixed with a command name or alias.
|
|
137
|
-
* This is needed to avoid matching other commands when followed by a space and another word.
|
|
138
|
-
* For example, let's say `level1` and `level1 level2` are commands.
|
|
139
|
-
* Then `level1 ${string}` would also match `level1 level2`,
|
|
140
|
-
* and it would cause `level1 level2` to not show up in the autocomplete.
|
|
141
|
-
* By excluding those cases, we can ensure autocomplete works correctly.
|
|
142
|
-
*/
|
|
143
|
-
type PrefixedCommands<TCommands extends AnyPadroneCommand[]> = GetCommandPathsOrAliases<TCommands> extends infer CommandNames ? CommandNames extends string ? AnyPartExtends<GetCommandPathsOrAliases<TCommands>, `${CommandNames} ${string}`> extends true ? never : `${CommandNames} ${string}` : never : never;
|
|
144
|
-
/**
|
|
145
|
-
* The possible commands are the commands that can be parsed by the program.
|
|
146
|
-
* This includes the string that are exact matches to a command name or alias, and strings that are prefixed with a command name or alias.
|
|
147
|
-
*/
|
|
148
|
-
type PossibleCommands<TCommands extends AnyPadroneCommand[], TWithPrefixed extends boolean = false, TWithObjects extends boolean = false, TWithFallback extends boolean = true> = GetCommandPathsOrAliases<TCommands> | (TWithPrefixed extends true ? PrefixedCommands<TCommands> : never) | (TWithObjects extends true ? FlattenCommands<TCommands> : never) | (TWithFallback extends true ? SafeString : never);
|
|
149
|
-
type CommandIsUnknownable<TCommand> = IsGeneric<TCommand> extends true ? true : string extends TCommand ? true : SafeString extends TCommand ? true : false;
|
|
150
|
-
/**
|
|
151
|
-
* Match a string to a command by the possible commands.
|
|
152
|
-
* This is done by recursively splitting the string by the last space, and then checking if the prefix is a valid command name or alias.
|
|
153
|
-
* This is needed to avoid matching the top-level command when there are nested commands.
|
|
154
|
-
*/
|
|
155
|
-
type PickCommandByPossibleCommands<TCommands extends AnyPadroneCommand[], TCommand extends PossibleCommands<TCommands, true, true> | SafeString> = CommandIsUnknownable<TCommand> extends true ? FlattenCommands<TCommands> : TCommand extends AnyPadroneCommand ? TCommand : TCommand extends string ? TCommand extends GetCommandPathsOrAliases<TCommands> ? PickCommandByName<TCommands, TCommand> : SplitLastSpace<TCommand> extends [infer Prefix extends string, infer Rest] ? IsNever<Rest> extends true ? PickCommandByName<TCommands, Prefix> : PickCommandByPossibleCommands<TCommands, Prefix> : never : never;
|
|
156
|
-
//#endregion
|
|
157
|
-
//#region src/types.d.ts
|
|
158
|
-
type UnknownRecord = Record<string, unknown>;
|
|
159
|
-
type EmptyRecord = Record<string, never>;
|
|
160
|
-
type DefaultOpts = UnknownRecord | void;
|
|
161
|
-
/**
|
|
162
|
-
* A schema that supports both validation (StandardSchemaV1) and JSON schema generation (StandardJSONSchemaV1).
|
|
163
|
-
* This is the type required for command arguments and options in Padrone.
|
|
164
|
-
*/
|
|
165
|
-
type PadroneSchema<Input = unknown, Output = Input> = StandardSchemaV1<Input, Output> & StandardJSONSchemaV1<Input, Output>;
|
|
166
|
-
/**
|
|
167
|
-
* Helper type to set aliases on a command type.
|
|
168
|
-
* Uses intersection to override just the aliases while preserving all other type information.
|
|
169
|
-
*/
|
|
170
|
-
type WithAliases<TCommand extends AnyPadroneCommand, TAliases extends string[]> = Omit<TCommand, 'aliases' | '~types'> & {
|
|
171
|
-
aliases?: TAliases;
|
|
172
|
-
'~types': Omit<TCommand['~types'], 'aliases'> & {
|
|
173
|
-
aliases: TAliases;
|
|
174
|
-
};
|
|
175
|
-
};
|
|
176
|
-
type PadroneCommand<TName extends string = string, TParentName extends string = '', TOpts extends PadroneSchema = PadroneSchema<DefaultOpts>, TRes = void, TCommands extends [...AnyPadroneCommand[]] = [], TAliases extends string[] = string[], TConfig extends PadroneSchema<unknown, StandardSchemaV1.InferInput<TOpts>> = PadroneSchema<void>, TEnv extends PadroneSchema<unknown, StandardSchemaV1.InferInput<TOpts>> = PadroneSchema<void>> = {
|
|
177
|
-
name: TName;
|
|
178
|
-
path: FullCommandName<TName, TParentName>;
|
|
179
|
-
title?: string;
|
|
180
|
-
description?: string;
|
|
181
|
-
version?: string; /** Alternative names that can be used to invoke this command. Derived from the names passed to command(). */
|
|
182
|
-
aliases?: TAliases;
|
|
183
|
-
deprecated?: boolean | string;
|
|
184
|
-
hidden?: boolean;
|
|
185
|
-
needsApproval?: boolean | ((options: TOpts) => Promise<boolean> | boolean);
|
|
186
|
-
options?: TOpts;
|
|
187
|
-
config?: TConfig;
|
|
188
|
-
envSchema?: TEnv;
|
|
189
|
-
meta?: GetMeta<TOpts>;
|
|
190
|
-
handler?: (options: StandardSchemaV1.InferOutput<TOpts>) => TRes; /** List of possible config file names to search for. */
|
|
191
|
-
configFiles?: string[];
|
|
192
|
-
parent?: AnyPadroneCommand;
|
|
193
|
-
commands?: TCommands; /** @deprecated Internal use only */
|
|
194
|
-
'~types': {
|
|
195
|
-
name: TName;
|
|
196
|
-
parentName: TParentName;
|
|
197
|
-
path: FullCommandName<TName, TParentName>;
|
|
198
|
-
aliases: TAliases;
|
|
199
|
-
optionsInput: StandardSchemaV1.InferInput<TOpts>;
|
|
200
|
-
optionsOutput: StandardSchemaV1.InferOutput<TOpts>;
|
|
201
|
-
result: TRes;
|
|
202
|
-
commands: TCommands;
|
|
203
|
-
};
|
|
25
|
+
declare function asyncSchema<T extends PadroneSchema>(schema: T): T & {
|
|
26
|
+
'~async': true;
|
|
204
27
|
};
|
|
205
|
-
type AnyPadroneCommand = PadroneCommand<string, any, any, any, [...AnyPadroneCommand[]], string[]>;
|
|
206
28
|
/**
|
|
207
|
-
*
|
|
208
|
-
*
|
|
29
|
+
* Builds a completer function for the REPL from the command tree.
|
|
30
|
+
* Completes command names, subcommand names, option names (--foo), and aliases (-f).
|
|
31
|
+
* Also includes dot-prefixed built-in REPL commands (.exit, .clear, .scope, .help, .history).
|
|
209
32
|
*/
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
};
|
|
214
|
-
};
|
|
215
|
-
/**
|
|
216
|
-
* Configuration options for a command.
|
|
217
|
-
*/
|
|
218
|
-
type PadroneCommandConfig = {
|
|
219
|
-
/** A short title for the command, displayed in help. */title?: string; /** A longer description of what the command does. */
|
|
220
|
-
description?: string; /** The version of the command. */
|
|
221
|
-
version?: string; /** Whether the command is deprecated, or a message explaining the deprecation. */
|
|
222
|
-
deprecated?: boolean | string; /** Whether the command should be hidden from help output. */
|
|
223
|
-
hidden?: boolean;
|
|
224
|
-
};
|
|
225
|
-
/**
|
|
226
|
-
* Conditional type that returns either PadroneBuilder or PadroneProgram based on TReturn.
|
|
227
|
-
* Used to avoid repetition in PadroneBuilderMethods return types.
|
|
228
|
-
*/
|
|
229
|
-
type BuilderOrProgram<TReturn extends 'builder' | 'program', TProgramName extends string, TName extends string, TParentName extends string, TOpts extends PadroneSchema, TRes, TCommands extends [...AnyPadroneCommand[]], TParentOpts extends PadroneSchema, TConfig extends PadroneSchema<unknown, StandardSchemaV1.InferInput<TOpts>>, TEnv extends PadroneSchema<unknown, StandardSchemaV1.InferInput<TOpts>>> = TReturn extends 'builder' ? PadroneBuilder<TProgramName, TName, TParentName, TOpts, TRes, TCommands, TParentOpts, TConfig, TEnv> : PadroneProgram<TProgramName, TName, TParentName, TOpts, TRes, TCommands, TParentOpts, TConfig, TEnv>;
|
|
230
|
-
/**
|
|
231
|
-
* Base builder methods shared between PadroneBuilder and PadroneProgram.
|
|
232
|
-
* These methods are used for defining command structure (options, config, env, action, subcommands).
|
|
233
|
-
*/
|
|
234
|
-
type PadroneBuilderMethods<TProgramName extends string, TName extends string, TParentName extends string, TOpts extends PadroneSchema, TRes, TCommands extends [...AnyPadroneCommand[]], TParentOpts extends PadroneSchema, TConfig extends PadroneSchema<unknown, StandardSchemaV1.InferInput<TOpts>>, TEnv extends PadroneSchema<unknown, StandardSchemaV1.InferInput<TOpts>>, /** The return type for builder methods - either PadroneBuilder or PadroneProgram */TReturn extends 'builder' | 'program'> = {
|
|
235
|
-
/**
|
|
236
|
-
* Configures command properties like title, description, version, deprecated, and hidden.
|
|
237
|
-
* @example
|
|
238
|
-
* ```ts
|
|
239
|
-
* .configure({
|
|
240
|
-
* title: 'Build Project',
|
|
241
|
-
* description: 'Compiles the project',
|
|
242
|
-
* deprecated: 'Use "compile" instead',
|
|
243
|
-
* })
|
|
244
|
-
* ```
|
|
245
|
-
*/
|
|
246
|
-
configure: (config: PadroneCommandConfig) => BuilderOrProgram<TReturn, TProgramName, TName, TParentName, TOpts, TRes, TCommands, TParentOpts, TConfig, TEnv>;
|
|
247
|
-
/**
|
|
248
|
-
* Defines the options schema for the command, including positional arguments.
|
|
249
|
-
* Can accept either a schema directly or a function that takes parent options as a base and returns a schema.
|
|
250
|
-
* Use the `positional` array in meta to specify which options are positional args.
|
|
251
|
-
* Use '...name' prefix for variadic (rest) arguments, matching JS/TS rest syntax.
|
|
252
|
-
*
|
|
253
|
-
* @example
|
|
254
|
-
* ```ts
|
|
255
|
-
* // Direct schema
|
|
256
|
-
* .options(z.object({
|
|
257
|
-
* source: z.string(),
|
|
258
|
-
* files: z.string().array(),
|
|
259
|
-
* dest: z.string(),
|
|
260
|
-
* recursive: z.boolean().default(false),
|
|
261
|
-
* }), {
|
|
262
|
-
* positional: ['source', '...files', 'dest'],
|
|
263
|
-
* })
|
|
264
|
-
* ```
|
|
265
|
-
*
|
|
266
|
-
* @example
|
|
267
|
-
* ```ts
|
|
268
|
-
* // Function-based schema extending parent options
|
|
269
|
-
* .options((parentOpts) => {
|
|
270
|
-
* return z.object({
|
|
271
|
-
* ...parentOpts.shape,
|
|
272
|
-
* verbose: z.boolean().default(false),
|
|
273
|
-
* });
|
|
274
|
-
* })
|
|
275
|
-
* ```
|
|
276
|
-
*/
|
|
277
|
-
options: <TNewOpts extends PadroneSchema = PadroneSchema<void>>(options?: TNewOpts | ((parentOptions: TParentOpts) => TNewOpts), meta?: GetMeta<TNewOpts>) => BuilderOrProgram<TReturn, TProgramName, TName, TParentName, TNewOpts, TRes, TCommands, TParentOpts, TConfig, TEnv>;
|
|
278
|
-
/**
|
|
279
|
-
* Configures config file path(s) and schema for parsing config files.
|
|
280
|
-
* @example
|
|
281
|
-
* ```ts
|
|
282
|
-
* .configFile('config.json', z.object({ port: z.number() }))
|
|
283
|
-
* ```
|
|
284
|
-
*/
|
|
285
|
-
configFile: <TNewConfig extends PadroneSchema<unknown, StandardSchemaV1.InferInput<TOpts>> = TOpts>(file: string | string[] | undefined, schema?: TNewConfig | ((optionsSchema: TOpts) => TNewConfig)) => BuilderOrProgram<TReturn, TProgramName, TName, TParentName, TOpts, TRes, TCommands, TParentOpts, TNewConfig, TEnv>;
|
|
286
|
-
/**
|
|
287
|
-
* Configures environment variable schema for parsing env vars into options.
|
|
288
|
-
* The schema should transform environment variables (typically SCREAMING_SNAKE_CASE)
|
|
289
|
-
* into the option names used by the command.
|
|
290
|
-
* @example
|
|
291
|
-
* ```ts
|
|
292
|
-
* .env(z.object({ MY_APP_PORT: z.coerce.number() }).transform(e => ({ port: e.MY_APP_PORT })))
|
|
293
|
-
* ```
|
|
294
|
-
*/
|
|
295
|
-
env: <TNewEnv extends PadroneSchema<unknown, StandardSchemaV1.InferInput<TOpts>> = TOpts>(schema: TNewEnv | ((optionsSchema: TOpts) => TNewEnv)) => BuilderOrProgram<TReturn, TProgramName, TName, TParentName, TOpts, TRes, TCommands, TParentOpts, TConfig, TNewEnv>;
|
|
296
|
-
/**
|
|
297
|
-
* Defines the handler function to be executed when the command is run.
|
|
298
|
-
*/
|
|
299
|
-
action: <TNewRes>(handler?: (options: StandardSchemaV1.InferOutput<TOpts>) => TNewRes) => BuilderOrProgram<TReturn, TProgramName, TName, TParentName, TOpts, TNewRes, TCommands, TParentOpts, TConfig, TEnv>;
|
|
300
|
-
/**
|
|
301
|
-
* Creates a nested command within the current command with the given name and builder function.
|
|
302
|
-
* The name can be a single string or a tuple of [name, ...aliases] where additional strings are aliases.
|
|
303
|
-
* @example
|
|
304
|
-
* ```ts
|
|
305
|
-
* // Single name
|
|
306
|
-
* .command('list', (c) => c.action(() => 'list'))
|
|
307
|
-
*
|
|
308
|
-
* // Name with aliases
|
|
309
|
-
* .command(['list', 'ls', 'l'], (c) => c.action(() => 'list'))
|
|
310
|
-
* ```
|
|
311
|
-
*/
|
|
312
|
-
command: <TNameNested extends string, TAliases extends string[] = [], TBuilder extends CommandTypesBase = PadroneBuilder<TProgramName, TNameNested, FullCommandName<TName, TParentName>, any, void, [], TOpts, any, any>>(name: TNameNested | readonly [TNameNested, ...TAliases], builderFn?: (builder: PadroneBuilder<TProgramName, TNameNested, FullCommandName<TName, TParentName>, PadroneSchema<void>, void, [], TOpts, PadroneSchema<void>, PadroneSchema<void>>) => TBuilder) => BuilderOrProgram<TReturn, TProgramName, TName, TParentName, TOpts, TRes, TCommands extends [] ? [WithAliases<TBuilder['~types']['command'], TAliases>] : AnyPadroneCommand[] extends TCommands ? [WithAliases<TBuilder['~types']['command'], TAliases>] : [...TCommands, WithAliases<TBuilder['~types']['command'], TAliases>], TParentOpts, TConfig, TEnv>; /** @deprecated Internal use only */
|
|
313
|
-
'~types': {
|
|
314
|
-
programName: TProgramName;
|
|
315
|
-
name: TName;
|
|
316
|
-
parentName: TParentName;
|
|
317
|
-
path: FullCommandName<TName, TParentName>;
|
|
318
|
-
aliases: [];
|
|
319
|
-
options: TOpts;
|
|
320
|
-
result: TRes;
|
|
321
|
-
commands: TCommands;
|
|
322
|
-
command: PadroneCommand<TName, TParentName, TOpts, TRes, TCommands, []>;
|
|
323
|
-
};
|
|
324
|
-
};
|
|
325
|
-
type PadroneBuilder<TProgramName extends string = '', TName extends string = string, TParentName extends string = '', TOpts extends PadroneSchema = PadroneSchema<DefaultOpts>, TRes = void, TCommands extends [...AnyPadroneCommand[]] = [], TParentOpts extends PadroneSchema = PadroneSchema<void>, TConfig extends PadroneSchema<unknown, StandardSchemaV1.InferInput<TOpts>> = PadroneSchema<void>, TEnv extends PadroneSchema<unknown, StandardSchemaV1.InferInput<TOpts>> = PadroneSchema<void>> = PadroneBuilderMethods<TProgramName, TName, TParentName, TOpts, TRes, TCommands, TParentOpts, TConfig, TEnv, 'builder'>;
|
|
326
|
-
type PadroneProgram<TProgramName extends string = '', TName extends string = string, TParentName extends string = '', TOpts extends PadroneSchema = PadroneSchema<DefaultOpts>, TRes = void, TCommands extends [...AnyPadroneCommand[]] = [], TParentOpts extends PadroneSchema = PadroneSchema<void>, TConfig extends PadroneSchema<unknown, StandardSchemaV1.InferInput<TOpts>> = PadroneSchema<void>, TEnv extends PadroneSchema<unknown, StandardSchemaV1.InferInput<TOpts>> = PadroneSchema<void>> = PadroneBuilderMethods<TProgramName, TName, TParentName, TOpts, TRes, TCommands, TParentOpts, TConfig, TEnv, 'program'> & {
|
|
327
|
-
/**
|
|
328
|
-
* Runs a command programmatically by name with provided options (including positional args).
|
|
329
|
-
*/
|
|
330
|
-
run: <const TCommand extends PossibleCommands<[PadroneCommand<'', '', TOpts, TRes, TCommands>], true, true>>(name: TCommand | SafeString, options: NoInfer<GetOptions<'in', PickCommandByName<[PadroneCommand<'', '', TOpts, TRes, TCommands>], TCommand>>>) => PadroneCommandResult<PickCommandByName<[PadroneCommand<'', '', TOpts, TRes, TCommands>], TCommand>>;
|
|
331
|
-
/**
|
|
332
|
-
* Runs the program as a CLI application, parsing `process.argv` or provided input.
|
|
333
|
-
*/
|
|
334
|
-
cli: <const TCommand extends PossibleCommands<[PadroneCommand<'', '', TOpts, TRes, TCommands>], true, true>>(input?: TCommand | SafeString, options?: PadroneParseOptions) => PadroneCommandResult<PickCommandByPossibleCommands<[PadroneCommand<'', '', TOpts, TRes, TCommands>], TCommand>>;
|
|
335
|
-
/**
|
|
336
|
-
* Parses CLI input (or the provided input string) into command, args, and options without executing anything.
|
|
337
|
-
*/
|
|
338
|
-
parse: <const TCommand extends PossibleCommands<[PadroneCommand<'', '', TOpts, TRes, TCommands>], true, false>>(input?: TCommand | SafeString, options?: PadroneParseOptions) => PadroneParseResult<PickCommandByPossibleCommands<[PadroneCommand<'', '', TOpts, TRes, TCommands>], TCommand>>;
|
|
339
|
-
/**
|
|
340
|
-
* Converts command and options back into a CLI string.
|
|
341
|
-
*/
|
|
342
|
-
stringify: <const TCommand extends PossibleCommands<[PadroneCommand<'', '', TOpts, TRes, TCommands>], false, true>>(command?: TCommand | SafeString, options?: GetOptions<'out', PickCommandByPossibleCommands<[PadroneCommand<'', '', TOpts, TRes, TCommands>], TCommand>>) => string;
|
|
343
|
-
/**
|
|
344
|
-
* Finds a command by name, returning `undefined` if not found.
|
|
345
|
-
*/
|
|
346
|
-
find: <const TFind extends PossibleCommands<[PadroneCommand<'', '', TOpts, TRes, TCommands>], false, true>>(command: TFind | SafeString) => PickCommandByPossibleCommands<[PadroneCommand<'', '', TOpts, TRes, TCommands>], TFind> | undefined;
|
|
347
|
-
/**
|
|
348
|
-
* Generates a type-safe API for invoking commands programmatically.
|
|
349
|
-
*/
|
|
350
|
-
api: () => PadroneAPI<PadroneCommand<'', '', TOpts, TRes, TCommands>>;
|
|
351
|
-
/**
|
|
352
|
-
* Starts an interactive prompt to run commands.
|
|
353
|
-
*/
|
|
354
|
-
/**
|
|
355
|
-
* Starts a REPL (Read-Eval-Print Loop) for running commands interactively.
|
|
356
|
-
*/
|
|
357
|
-
/**
|
|
358
|
-
* Returns a tool definition that can be passed to AI SDK.
|
|
359
|
-
*/
|
|
360
|
-
tool: () => Tool<{
|
|
361
|
-
command: string;
|
|
362
|
-
}>;
|
|
363
|
-
/**
|
|
364
|
-
* Returns the help information for the program or a specific command.
|
|
365
|
-
*/
|
|
366
|
-
help: <const TCommand extends PossibleCommands<[PadroneCommand<'', '', TOpts, TRes, TCommands>], false, true>>(command?: TCommand, options?: HelpOptions) => string;
|
|
367
|
-
/**
|
|
368
|
-
* Generates and returns a shell completion script.
|
|
369
|
-
* If shell is not specified, automatically detects the current shell and provides instructions.
|
|
370
|
-
* @param shell - The shell type (bash, zsh, fish, powershell). If not provided, auto-detects.
|
|
371
|
-
* @returns The shell completion script as a string.
|
|
372
|
-
* @example
|
|
373
|
-
* ```ts
|
|
374
|
-
* // Get bash completion script
|
|
375
|
-
* const bashScript = program.completion('bash');
|
|
376
|
-
*
|
|
377
|
-
* // Auto-detect shell and get completion script with instructions
|
|
378
|
-
* const script = program.completion();
|
|
379
|
-
* ```
|
|
380
|
-
*/
|
|
381
|
-
completion: (shell?: 'bash' | 'zsh' | 'fish' | 'powershell') => string;
|
|
382
|
-
};
|
|
383
|
-
type AnyPadroneProgram = PadroneProgram<string, string, string, any, any, [...AnyPadroneCommand[]]>;
|
|
384
|
-
type PadroneCommandResult<TCommand extends AnyPadroneCommand = AnyPadroneCommand> = PadroneParseResult<TCommand> & {
|
|
385
|
-
result: GetResults<TCommand>;
|
|
386
|
-
};
|
|
387
|
-
/**
|
|
388
|
-
* Options for parsing CLI input.
|
|
389
|
-
*/
|
|
390
|
-
type PadroneParseOptions = {
|
|
391
|
-
/**
|
|
392
|
-
* Raw environment variables to use for env schema validation.
|
|
393
|
-
* If not provided, process.env will be used.
|
|
394
|
-
*/
|
|
395
|
-
env?: Record<string, string | undefined>;
|
|
396
|
-
/**
|
|
397
|
-
* Pre-parsed environment data to use directly (bypasses env schema validation).
|
|
398
|
-
* Keys should match option names.
|
|
399
|
-
*/
|
|
400
|
-
envData?: Record<string, unknown>;
|
|
401
|
-
/**
|
|
402
|
-
* Config file data to use for config binding.
|
|
403
|
-
* This should be the parsed content of a config file (JSON, YAML, etc.).
|
|
404
|
-
*/
|
|
405
|
-
configData?: Record<string, unknown>;
|
|
406
|
-
};
|
|
407
|
-
type PadroneParseResult<TCommand extends AnyPadroneCommand = AnyPadroneCommand> = {
|
|
408
|
-
command: TCommand;
|
|
409
|
-
options?: GetOptions<'out', TCommand>;
|
|
410
|
-
optionsResult?: StandardSchemaV1.Result<GetOptions<'out', TCommand>>;
|
|
411
|
-
};
|
|
412
|
-
type PadroneAPI<TCommand extends AnyPadroneCommand> = PadroneAPICommand<TCommand> & { [K in TCommand['~types']['commands'][number] as K['name']]: PadroneAPI<K> };
|
|
413
|
-
type PadroneAPICommand<TCommand extends AnyPadroneCommand> = (options: GetOptions<'in', TCommand>) => GetResults<TCommand>;
|
|
414
|
-
type NormalizeOptions<TOptions> = IsGeneric<TOptions> extends true ? void | EmptyRecord : TOptions;
|
|
415
|
-
type GetOptions<TDir extends 'in' | 'out', TCommand extends AnyPadroneCommand> = TDir extends 'in' ? NormalizeOptions<TCommand['~types']['optionsInput']> : NormalizeOptions<TCommand['~types']['optionsOutput']>;
|
|
416
|
-
type GetResults<TCommand extends AnyPadroneCommand> = ReturnType<NonNullable<TCommand['handler']>>;
|
|
417
|
-
type GetMeta<TOpts extends PadroneSchema> = PadroneMeta<NonNullable<StandardSchemaV1.InferInput<TOpts>>>;
|
|
33
|
+
declare function buildReplCompleter(rootCommand: AnyPadroneCommand, builtins: {
|
|
34
|
+
inScope?: boolean;
|
|
35
|
+
}): (line: string) => [string[], string];
|
|
418
36
|
//#endregion
|
|
419
37
|
//#region src/create.d.ts
|
|
420
38
|
declare function createPadrone<TProgramName extends string>(name: TProgramName): PadroneProgram<TProgramName, '', ''>;
|
|
421
39
|
//#endregion
|
|
422
|
-
//#region src/
|
|
40
|
+
//#region src/errors.d.ts
|
|
41
|
+
/**
|
|
42
|
+
* Structured error hierarchy for Padrone CLI framework.
|
|
43
|
+
*
|
|
44
|
+
* All Padrone errors extend `PadroneError`, which carries an exit code,
|
|
45
|
+
* optional suggestions, and context about which command/phase produced the error.
|
|
46
|
+
* This allows callers to distinguish user errors (bad input) from bugs (unexpected throws)
|
|
47
|
+
* and to present formatted, actionable error messages.
|
|
48
|
+
*/
|
|
49
|
+
type PadroneErrorOptions = {
|
|
50
|
+
/** Process exit code. Defaults to 1. */exitCode?: number; /** Actionable suggestions shown to the user (e.g. "Use --env production"). */
|
|
51
|
+
suggestions?: string[]; /** The command path that produced the error (e.g. "deploy staging"). */
|
|
52
|
+
command?: string; /** The phase where the error occurred. */
|
|
53
|
+
phase?: 'parse' | 'validate' | 'execute' | 'config'; /** Original cause for error chaining. */
|
|
54
|
+
cause?: unknown;
|
|
55
|
+
};
|
|
423
56
|
/**
|
|
424
|
-
*
|
|
57
|
+
* Base error class for all Padrone errors.
|
|
58
|
+
* Carries structured metadata for user-friendly formatting and programmatic handling.
|
|
59
|
+
*
|
|
425
60
|
* @example
|
|
426
61
|
* ```ts
|
|
427
|
-
*
|
|
62
|
+
* throw new PadroneError('Something went wrong', {
|
|
63
|
+
* exitCode: 1,
|
|
64
|
+
* suggestions: ['Try --help for usage information'],
|
|
65
|
+
* });
|
|
428
66
|
* ```
|
|
429
67
|
*/
|
|
430
|
-
|
|
68
|
+
declare class PadroneError extends Error {
|
|
69
|
+
readonly exitCode: number;
|
|
70
|
+
readonly suggestions: string[];
|
|
71
|
+
readonly command?: string;
|
|
72
|
+
readonly phase?: 'parse' | 'validate' | 'execute' | 'config';
|
|
73
|
+
constructor(message: string, options?: PadroneErrorOptions);
|
|
74
|
+
/**
|
|
75
|
+
* Returns a serializable representation of the error,
|
|
76
|
+
* suitable for non-terminal runtimes (web UIs, APIs, etc.).
|
|
77
|
+
*/
|
|
78
|
+
toJSON(): {
|
|
79
|
+
name: string;
|
|
80
|
+
message: string;
|
|
81
|
+
exitCode: number;
|
|
82
|
+
suggestions: string[];
|
|
83
|
+
command?: string;
|
|
84
|
+
phase?: string;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
431
87
|
/**
|
|
432
|
-
*
|
|
433
|
-
* @example
|
|
434
|
-
* ```ts
|
|
435
|
-
* type Options = InferOptionsOutput<typeof myCommand>;
|
|
436
|
-
* ```
|
|
88
|
+
* Thrown when command routing fails — unknown command, unexpected arguments, etc.
|
|
437
89
|
*/
|
|
438
|
-
|
|
90
|
+
declare class RoutingError extends PadroneError {
|
|
91
|
+
constructor(message: string, options?: PadroneErrorOptions);
|
|
92
|
+
}
|
|
439
93
|
/**
|
|
440
|
-
*
|
|
441
|
-
*
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
94
|
+
* Thrown when argument or schema validation fails.
|
|
95
|
+
* Carries the structured issues from the schema validator.
|
|
96
|
+
*/
|
|
97
|
+
declare class ValidationError extends PadroneError {
|
|
98
|
+
readonly issues: readonly {
|
|
99
|
+
path?: PropertyKey[];
|
|
100
|
+
message: string;
|
|
101
|
+
}[];
|
|
102
|
+
constructor(message: string, issues: readonly {
|
|
103
|
+
path?: PropertyKey[];
|
|
104
|
+
message: string;
|
|
105
|
+
}[], options?: PadroneErrorOptions);
|
|
106
|
+
toJSON(): {
|
|
107
|
+
issues: {
|
|
108
|
+
path: string[] | undefined;
|
|
109
|
+
message: string;
|
|
110
|
+
}[];
|
|
111
|
+
name: string;
|
|
112
|
+
message: string;
|
|
113
|
+
exitCode: number;
|
|
114
|
+
suggestions: string[];
|
|
115
|
+
command?: string;
|
|
116
|
+
phase?: string;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Thrown when config file loading or validation fails.
|
|
445
121
|
*/
|
|
446
|
-
|
|
122
|
+
declare class ConfigError extends PadroneError {
|
|
123
|
+
constructor(message: string, options?: PadroneErrorOptions);
|
|
124
|
+
}
|
|
447
125
|
/**
|
|
448
|
-
*
|
|
449
|
-
* This is the
|
|
126
|
+
* Thrown from user action handlers to surface structured errors with exit codes and suggestions.
|
|
127
|
+
* This is the primary error class users should throw from their command actions.
|
|
128
|
+
*
|
|
450
129
|
* @example
|
|
451
130
|
* ```ts
|
|
452
|
-
*
|
|
131
|
+
* throw new ActionError('Missing environment', {
|
|
132
|
+
* exitCode: 1,
|
|
133
|
+
* suggestions: ['Use --env production or --env staging'],
|
|
134
|
+
* });
|
|
453
135
|
* ```
|
|
454
136
|
*/
|
|
455
|
-
|
|
137
|
+
declare class ActionError extends PadroneError {
|
|
138
|
+
constructor(message: string, options?: PadroneErrorOptions);
|
|
139
|
+
}
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region src/type-helpers.d.ts
|
|
456
142
|
/**
|
|
457
|
-
* Extracts the input type of the
|
|
458
|
-
* This represents the raw environment variables shape (e.g., { PORT: string }).
|
|
143
|
+
* Extracts the input type of the arguments schema from a command.
|
|
459
144
|
* @example
|
|
460
145
|
* ```ts
|
|
461
|
-
* type
|
|
146
|
+
* type Args = InferArgsInput<typeof myCommand>;
|
|
462
147
|
* ```
|
|
463
148
|
*/
|
|
464
|
-
type
|
|
149
|
+
type InferArgsInput<T extends AnyPadroneCommand> = T['~types']['argsInput'];
|
|
465
150
|
/**
|
|
466
|
-
* Extracts the output type of the
|
|
467
|
-
* This is the type after transformation, which should match the options shape.
|
|
151
|
+
* Extracts the output type of the arguments schema from a command.
|
|
468
152
|
* @example
|
|
469
153
|
* ```ts
|
|
470
|
-
* type
|
|
154
|
+
* type Args = InferArgsOutput<typeof myCommand>;
|
|
471
155
|
* ```
|
|
472
156
|
*/
|
|
473
|
-
type
|
|
157
|
+
type InferArgsOutput<T extends AnyPadroneCommand> = T['~types']['argsOutput'];
|
|
474
158
|
/**
|
|
475
159
|
* Gets a command type by its path from a program or command tree.
|
|
476
160
|
* Supports both full paths (e.g., "config set") and alias paths.
|
|
@@ -478,8 +162,8 @@ type InferEnvOutput<T extends AnyPadroneCommand> = T['envSchema'] extends Padron
|
|
|
478
162
|
* ```ts
|
|
479
163
|
* const program = createPadrone('cli')
|
|
480
164
|
* .command('config', c => c
|
|
481
|
-
* .command('set', c => c.
|
|
482
|
-
* .command('get', c => c.
|
|
165
|
+
* .command('set', c => c.arguments(...).action(...))
|
|
166
|
+
* .command('get', c => c.arguments(...).action(...))
|
|
483
167
|
* );
|
|
484
168
|
*
|
|
485
169
|
* type SetCommand = InferCommand<typeof program, 'config set'>;
|
|
@@ -488,5 +172,5 @@ type InferEnvOutput<T extends AnyPadroneCommand> = T['envSchema'] extends Padron
|
|
|
488
172
|
*/
|
|
489
173
|
type InferCommand<T extends AnyPadroneCommand | AnyPadroneProgram, TPath extends PossibleCommands<T extends AnyPadroneCommand ? [T] : T['~types']['commands'], true, true>> = T extends AnyPadroneProgram ? PickCommandByName<[PadroneCommand<'', '', any, any, T['~types']['commands']>], TPath> : T extends AnyPadroneCommand ? PickCommandByName<[T], TPath> : never;
|
|
490
174
|
//#endregion
|
|
491
|
-
export { type
|
|
175
|
+
export { ActionError, type AnyPadroneBuilder, type AnyPadroneCommand, type AnyPadroneProgram, type AsyncPadroneSchema, ConfigError, type HelpInfo, type InferArgsInput, type InferArgsOutput, type InferCommand, type InteractiveMode, type InteractivePromptConfig, type PadroneActionContext, type PadroneBuilder, type PadroneCommand, type PadroneCommandResult, PadroneError, type PadroneErrorOptions, type PadroneParseResult, type PadronePlugin, type PadroneProgram, type PadroneRuntime, type PadroneSchema, REPL_SIGINT, RoutingError, type UpdateCheckConfig, ValidationError, type WrapConfig, type WrapResult, asyncSchema, buildReplCompleter, createPadrone };
|
|
492
176
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/formatter.ts","../src/help.ts","../src/options.ts","../src/type-utils.ts","../src/types.ts","../src/create.ts","../src/type-helpers.ts"],"mappings":";;;;KAEY,UAAA;AAAA,KACA,UAAA;;;AADZ;KAUY,gBAAA;EACV,IAAA;EACA,WAAA;EACA,QAAA;EACA,OAAA;EACA,IAAA;AAAA;;;AALF;KAWY,cAAA;EACV,IAAA;EACA,WAAA;EACA,QAAA;EACA,OAAA;EACA,IAAA;EACA,IAAA;EACA,OAAA;EACA,UAAA;EACA,MAAA;EACA,QAAA,cAVwB;EAYxB,GAAA,sBAZwB;EAcxB,QAAA,YAZA;EAcA,SAAA,YAZA;EAcA,SAAA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