@politty/zod 0.1.2 → 0.2.1
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/README.md +31 -0
- package/dist/{arg-registry-Be4GJADw.d.ts → arg-registry-BzQ-y-e0.d.ts} +2 -2
- package/dist/augment.d.ts +1 -1
- package/dist/augment.js +1 -1
- package/dist/cli-main-B4FX3h4J.js +1 -0
- package/dist/cli-main-CjYk6tAX.js +2 -0
- package/dist/cli-run-DN55A0JZ.js +1 -0
- package/dist/cli.js +1 -15
- package/dist/command-Mbdt0bmN.js +1 -0
- package/dist/compile-cache-VuUbFWIo.js +1 -0
- package/dist/compile-cache.js +1 -3
- package/dist/completion-D8DMrPqg.js +116 -0
- package/dist/completion-DUMcvXkT.js +1 -0
- package/dist/completion.d.ts +87 -7
- package/dist/completion.js +1 -4
- package/dist/docs.d.ts +1 -1
- package/dist/docs.js +84 -3063
- package/dist/dynamic-CMtee4tD.js +1 -0
- package/dist/dynamic-CrnlveHj.js +6 -0
- package/dist/field-meta-COGya7xp.js +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -27
- package/dist/log-collector-DICKib75.js +1 -0
- package/dist/logger-CJsyJ8sb.js +1 -0
- package/dist/prompt-CqmGq1_N.js +1 -0
- package/dist/prompt-clack.d.ts +1 -1
- package/dist/prompt-clack.js +1 -32
- package/dist/prompt-inquirer.d.ts +1 -1
- package/dist/prompt-inquirer.js +1 -47
- package/dist/prompt.d.ts +1 -1
- package/dist/prompt.js +1 -4
- package/dist/register-C1WbbeYH.js +1 -0
- package/dist/runner-BIdcntiz.js +29 -0
- package/dist/runner-Chaf_5lK.js +1 -0
- package/dist/schema-BiUP_KyV.js +1 -0
- package/dist/schema-extractor-DU0Vuhbd.js +1 -0
- package/dist/skill.d.ts +1 -1
- package/dist/skill.js +2 -1837
- package/dist/subcommand-router-D8GTMXYL.js +1 -0
- package/dist/{index-B4NylQOW.d.ts → with-completion-command-CmVdHFHX.d.ts} +3 -74
- package/dist/with-completion-command-DDohm8U6.js +3 -0
- package/package.json +3 -3
- package/dist/cli-main-CAa5KwCo.js +0 -314
- package/dist/cli-main-DIRMduj1.js +0 -3
- package/dist/cli-run-B--tZW_I.js +0 -8
- package/dist/command-k-4yAz4J.js +0 -42
- package/dist/compile-cache-BC65o7MH.js +0 -103
- package/dist/completion-Ot2qpNNw.js +0 -5616
- package/dist/field-meta-CO38jOvl.js +0 -148
- package/dist/log-collector-CoUkLVJB.js +0 -114
- package/dist/logger-i_bb-Jhc.js +0 -133
- package/dist/prompt-BjIZThsH.js +0 -169
- package/dist/register-DdcsbNwM.js +0 -440
- package/dist/runner-Bz3arOqh.js +0 -3051
- package/dist/runner-Cs-Mz9JN.js +0 -3
- package/dist/schema-extractor-CVNDs07l.js +0 -250
- package/dist/src-D4QGGgW1.js +0 -6
- package/dist/src-DhQVU2hG.js +0 -12
- package/dist/subcommand-router-Cskpofdk.js +0 -134
package/dist/completion.d.ts
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
|
-
import { C as Command, Z as ResolvedFieldMeta, _ as DynamicCompletionResult, b as ArgsSchema, d as ExpandCompletion, g as DynamicCompletionResolver, h as DynamicCompletionContext, m as DynamicCompletionCandidate, p as CompletionDirectiveMask, v as AnyCommand } from "./arg-registry-
|
|
2
|
-
import {
|
|
1
|
+
import { C as Command, Z as ResolvedFieldMeta, _ as DynamicCompletionResult, b as ArgsSchema, d as ExpandCompletion, g as DynamicCompletionResolver, h as DynamicCompletionContext, m as DynamicCompletionCandidate, p as CompletionDirectiveMask, v as AnyCommand } from "./arg-registry-BzQ-y-e0.js";
|
|
2
|
+
import { _ as CompletionResult, a as bundledWorkerShellExtension, b as InferInternalArgs, c as validateBundledWorkerFile, d as CompletablePositional, f as CompletableSubcommand, g as CompletionOptions, h as CompletionMode, i as GenerateBundledCompletionWorkerResult, l as BundledWorkerOptions, m as CompletionGenerator, n as withCompletionCommand, o as defaultBundledWorkerOutputPath, p as CompletionData, r as GenerateBundledCompletionWorkerOptions, s as generateBundledCompletionWorker, t as WithCompletionOptions, u as CompletableOption, v as ShellType, x as InternalArgsSchema, y as ValueCompletion } from "./with-completion-command-CmVdHFHX.js";
|
|
3
|
+
//#region ../core/src/completion/schemas.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Schema for the completion command arguments
|
|
6
|
+
*/
|
|
7
|
+
declare const completionArgsSchema: InternalArgsSchema<{
|
|
8
|
+
shell: "bash" | "fish" | "zsh" | undefined;
|
|
9
|
+
instructions: boolean;
|
|
10
|
+
loader: boolean;
|
|
11
|
+
install: boolean;
|
|
12
|
+
static: boolean;
|
|
13
|
+
dispatcher: boolean;
|
|
14
|
+
worker: boolean;
|
|
15
|
+
}>;
|
|
16
|
+
type CompletionArgs = InferInternalArgs<typeof completionArgsSchema>;
|
|
17
|
+
declare const refreshArgsSchema: InternalArgsSchema<{
|
|
18
|
+
shell: "bash" | "fish" | "zsh";
|
|
19
|
+
target: string | undefined;
|
|
20
|
+
static: boolean;
|
|
21
|
+
worker: boolean;
|
|
22
|
+
}>;
|
|
23
|
+
type RefreshArgs = InferInternalArgs<typeof refreshArgsSchema>;
|
|
24
|
+
declare const workerPathArgsSchema: InternalArgsSchema<{
|
|
25
|
+
shell: "bash" | "fish" | "zsh";
|
|
26
|
+
}>;
|
|
27
|
+
type WorkerPathArgs = InferInternalArgs<typeof workerPathArgsSchema>;
|
|
28
|
+
//#endregion
|
|
3
29
|
//#region ../core/src/completion/dynamic/context-parser.d.ts
|
|
4
30
|
/**
|
|
5
31
|
* Completion type indicates what kind of completion is expected
|
|
@@ -128,15 +154,14 @@ interface GenerateCandidatesOptions {
|
|
|
128
154
|
*/
|
|
129
155
|
declare function generateCandidates(context: CompletionContext, options: GenerateCandidatesOptions): Promise<CandidateResult>;
|
|
130
156
|
//#endregion
|
|
131
|
-
//#region ../core/src/completion/dynamic/
|
|
132
|
-
/**
|
|
133
|
-
* Schema for the __complete command
|
|
134
|
-
*/
|
|
157
|
+
//#region ../core/src/completion/dynamic/schema.d.ts
|
|
135
158
|
declare const completeArgsSchema: InternalArgsSchema<{
|
|
136
159
|
shell: "bash" | "fish" | "zsh";
|
|
137
160
|
args: string[];
|
|
138
161
|
}>;
|
|
139
162
|
type CompleteArgs = InferInternalArgs<typeof completeArgsSchema>;
|
|
163
|
+
//#endregion
|
|
164
|
+
//#region ../core/src/completion/dynamic/complete-command.d.ts
|
|
140
165
|
/**
|
|
141
166
|
* Create the dynamic completion command
|
|
142
167
|
*
|
|
@@ -239,4 +264,59 @@ interface ValueCompletionField {
|
|
|
239
264
|
*/
|
|
240
265
|
declare function resolveValueCompletion(field: ValueCompletionField): ValueCompletion | PendingExpandValueCompletion | undefined;
|
|
241
266
|
//#endregion
|
|
242
|
-
|
|
267
|
+
//#region ../core/src/completion/detect-shell.d.ts
|
|
268
|
+
/**
|
|
269
|
+
* Detect the current shell from environment.
|
|
270
|
+
*
|
|
271
|
+
* Split out from `index.ts` so `with-completion-command.ts` can detect the
|
|
272
|
+
* shell for the runMain background-refresh hook without statically pulling
|
|
273
|
+
* in the bash/zsh/fish generators.
|
|
274
|
+
*/
|
|
275
|
+
declare function detectShell(): ShellType | null;
|
|
276
|
+
//#endregion
|
|
277
|
+
//#region ../core/src/completion/index.d.ts
|
|
278
|
+
/**
|
|
279
|
+
* Generate completion script for the specified shell
|
|
280
|
+
*/
|
|
281
|
+
declare function generateCompletion(command: AnyCommand, options: CompletionOptions): CompletionResult;
|
|
282
|
+
/**
|
|
283
|
+
* Get the list of supported shells
|
|
284
|
+
*/
|
|
285
|
+
declare function getSupportedShells(): ShellType[];
|
|
286
|
+
/**
|
|
287
|
+
* Create a completion subcommand for your CLI
|
|
288
|
+
*
|
|
289
|
+
* This creates a ready-to-use subcommand that generates completion scripts.
|
|
290
|
+
*
|
|
291
|
+
* @example
|
|
292
|
+
* ```typescript
|
|
293
|
+
* const mainCommand = defineCommand({
|
|
294
|
+
* name: "mycli",
|
|
295
|
+
* subCommands: {
|
|
296
|
+
* completion: createCompletionCommand(mainCommand)
|
|
297
|
+
* }
|
|
298
|
+
* });
|
|
299
|
+
* ```
|
|
300
|
+
*/
|
|
301
|
+
declare function createCompletionCommand(rootCommand: AnyCommand, programName?: string, globalArgsSchema?: ArgsSchema, extra?: {
|
|
302
|
+
cacheDir?: string;
|
|
303
|
+
programVersion?: string;
|
|
304
|
+
bundledWorker?: BundledWorkerOptions;
|
|
305
|
+
}): Command<typeof completionArgsSchema, CompletionArgs, any>;
|
|
306
|
+
/**
|
|
307
|
+
* Hidden subcommand that the runMain background hook spawns. It does
|
|
308
|
+
* the same stat-compare + atomic rewrite as the rc loader, but in a
|
|
309
|
+
* detached child process so it's invisible to the user.
|
|
310
|
+
*/
|
|
311
|
+
declare function createRefreshCompletionCommand(rootCommand: AnyCommand, programName: string, extra?: {
|
|
312
|
+
cacheDir?: string;
|
|
313
|
+
programVersion?: string;
|
|
314
|
+
globalArgsSchema?: ArgsSchema;
|
|
315
|
+
bundledWorker?: BundledWorkerOptions;
|
|
316
|
+
}): Command<typeof refreshArgsSchema, RefreshArgs, any>;
|
|
317
|
+
declare function createCompletionWorkerPathCommand(programName: string, extra?: {
|
|
318
|
+
binPath?: string;
|
|
319
|
+
bundledWorker?: BundledWorkerOptions;
|
|
320
|
+
}): Command<typeof workerPathArgsSchema, WorkerPathArgs, any>;
|
|
321
|
+
//#endregion
|
|
322
|
+
export { type BundledWorkerOptions, type CandidateResult, type CompletableOption, type CompletableSubcommand, type CompletionCandidate, type CompletionContext, type CompletionData, CompletionDirective, type CompletionDirectiveMask, type CompletionGenerator, type CompletionMode, type CompletionOptions, type CompletionResult, type CompletionType, type DynamicCompletionCandidate, type DynamicCompletionContext, type DynamicCompletionResolver, type DynamicCompletionResult, type GenerateBundledCompletionWorkerOptions, type GenerateBundledCompletionWorkerResult, type ShellFormatOptions, type ShellType, type ValueCompletionField, type WithCompletionOptions, bundledWorkerShellExtension, createCompletionCommand, createCompletionWorkerPathCommand, createDynamicCompleteCommand, createRefreshCompletionCommand, defaultBundledWorkerOutputPath, detectShell, extractCompletionData, extractPositionals, formatForShell, generateBundledCompletionWorker, generateCandidates, generateCompletion, getSupportedShells, hasCompleteCommand, parseCompletionContext, resolveValueCompletion, validateBundledWorkerFile, withCompletionCommand };
|
package/dist/completion.js
CHANGED
|
@@ -1,4 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { _ as CompletionDirective, a as generateCompletion, b as resolveValueCompletion, c as createDynamicCompleteCommand, d as bundledWorkerShellExtension, f as defaultBundledWorkerOutputPath, g as extractPositionals, h as extractCompletionData, i as detectShell, l as hasCompleteCommand, m as validateBundledWorkerFile, n as createCompletionWorkerPathCommand, o as getSupportedShells, p as generateBundledCompletionWorker, r as createRefreshCompletionCommand, s as withCompletionCommand, t as createCompletionCommand, u as formatForShell, v as generateCandidates, y as parseCompletionContext } from "./completion-Ot2qpNNw.js";
|
|
3
|
-
|
|
4
|
-
export { CompletionDirective, bundledWorkerShellExtension, createCompletionCommand, createCompletionWorkerPathCommand, createDynamicCompleteCommand, createRefreshCompletionCommand, defaultBundledWorkerOutputPath, detectShell, extractCompletionData, extractPositionals, formatForShell, generateBundledCompletionWorker, generateCandidates, generateCompletion, getSupportedShells, hasCompleteCommand, parseCompletionContext, resolveValueCompletion, validateBundledWorkerFile, withCompletionCommand };
|
|
1
|
+
import"./register-C1WbbeYH.js";import{s as e,t}from"./with-completion-command-DDohm8U6.js";import{a as n,i as r,n as i,o as a,r as o,s,t as c}from"./dynamic-CrnlveHj.js";import{a as l,c as u,d,i as f,l as p,n as m,o as h,r as g,s as _,t as v,u as y}from"./completion-D8DMrPqg.js";export{r as CompletionDirective,h as bundledWorkerShellExtension,v as createCompletionCommand,m as createCompletionWorkerPathCommand,c as createDynamicCompleteCommand,g as createRefreshCompletionCommand,_ as defaultBundledWorkerOutputPath,e as detectShell,y as extractCompletionData,d as extractPositionals,o as formatForShell,u as generateBundledCompletionWorker,n as generateCandidates,f as generateCompletion,l as getSupportedShells,i as hasCompleteCommand,a as parseCompletionContext,s as resolveValueCompletion,p as validateBundledWorkerFile,t as withCompletionCommand};
|
package/dist/docs.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as Example, W as SubCommandValue, X as ExtractedFields, Z as ResolvedFieldMeta, b as ArgsSchema, nt as SchemaLike, v as AnyCommand } from "./arg-registry-
|
|
1
|
+
import { T as Example, W as SubCommandValue, X as ExtractedFields, Z as ResolvedFieldMeta, b as ArgsSchema, nt as SchemaLike, v as AnyCommand } from "./arg-registry-BzQ-y-e0.js";
|
|
2
2
|
import * as fs from "node:fs";
|
|
3
3
|
//#region ../core/src/executor/subcommand-router.d.ts
|
|
4
4
|
/**
|