@politty/zod 0.1.1 → 0.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.
Files changed (59) hide show
  1. package/README.md +31 -0
  2. package/dist/{arg-registry-B8QvBM_Q.d.ts → arg-registry-Be4GJADw.d.ts} +15 -1
  3. package/dist/augment.d.ts +1 -1
  4. package/dist/augment.js +1 -1
  5. package/dist/cli-main-C8D_mKfv.js +2 -0
  6. package/dist/cli-main-ClQaGXB3.js +1 -0
  7. package/dist/cli-run-BFXIag27.js +1 -0
  8. package/dist/cli.js +1 -15
  9. package/dist/command-Mbdt0bmN.js +1 -0
  10. package/dist/compile-cache-VuUbFWIo.js +1 -0
  11. package/dist/compile-cache.js +1 -3
  12. package/dist/completion-D8DMrPqg.js +116 -0
  13. package/dist/completion-DUMcvXkT.js +1 -0
  14. package/dist/completion.d.ts +87 -7
  15. package/dist/completion.js +1 -4
  16. package/dist/docs.d.ts +1 -1
  17. package/dist/docs.js +84 -3045
  18. package/dist/dynamic-CMtee4tD.js +1 -0
  19. package/dist/dynamic-CrnlveHj.js +6 -0
  20. package/dist/field-meta-COGya7xp.js +1 -0
  21. package/dist/index.d.ts +20 -16
  22. package/dist/index.js +1 -27
  23. package/dist/log-collector-hiFa3sNm.js +1 -0
  24. package/dist/logger-CJsyJ8sb.js +1 -0
  25. package/dist/prompt-CqmGq1_N.js +1 -0
  26. package/dist/prompt-clack.d.ts +1 -1
  27. package/dist/prompt-clack.js +1 -32
  28. package/dist/prompt-inquirer.d.ts +1 -1
  29. package/dist/prompt-inquirer.js +1 -47
  30. package/dist/prompt.d.ts +1 -1
  31. package/dist/prompt.js +1 -4
  32. package/dist/register-C1WbbeYH.js +1 -0
  33. package/dist/runner-C_wCXh6X.js +1 -0
  34. package/dist/runner-uPmkI9Gb.js +29 -0
  35. package/dist/schema-BiUP_KyV.js +1 -0
  36. package/dist/schema-extractor-DU0Vuhbd.js +1 -0
  37. package/dist/skill.d.ts +1 -1
  38. package/dist/skill.js +2 -1835
  39. package/dist/subcommand-router-D8GTMXYL.js +1 -0
  40. package/dist/with-completion-command-DDohm8U6.js +3 -0
  41. package/dist/{index-CMb2xLiJ.d.ts → with-completion-command-xaVZtAga.d.ts} +3 -74
  42. package/package.json +3 -3
  43. package/dist/cli-main-BQfutJEX.js +0 -3
  44. package/dist/cli-main-D4kkrRfX.js +0 -314
  45. package/dist/cli-run-wxd6kPPf.js +0 -8
  46. package/dist/command-k-4yAz4J.js +0 -42
  47. package/dist/compile-cache-BC65o7MH.js +0 -103
  48. package/dist/completion-DW5qVc3l.js +0 -5613
  49. package/dist/field-meta-DMy5BcRr.js +0 -146
  50. package/dist/log-collector-CoUkLVJB.js +0 -114
  51. package/dist/logger-i_bb-Jhc.js +0 -133
  52. package/dist/prompt-BjIZThsH.js +0 -169
  53. package/dist/register-DlGnMLIY.js +0 -440
  54. package/dist/runner-DAGvxV2P.js +0 -2980
  55. package/dist/runner-MMjpKeEa.js +0 -3
  56. package/dist/schema-extractor-DMSozq40.js +0 -250
  57. package/dist/src-CLogLsbS.js +0 -12
  58. package/dist/src-bYH2XCQ4.js +0 -6
  59. package/dist/subcommand-router-Cskpofdk.js +0 -134
@@ -1,5 +1,31 @@
1
- import { C as Command, X 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-B8QvBM_Q.js";
2
- import { C as CompletionResult, D as InternalArgsSchema, E as InferInternalArgs, S as CompletionOptions, T as ValueCompletion, _ as CompletablePositional, a as detectShell, b as CompletionGenerator, c as withCompletionCommand, d as bundledWorkerShellExtension, f as defaultBundledWorkerOutputPath, g as CompletableOption, h as BundledWorkerOptions, i as createRefreshCompletionCommand, l as GenerateBundledCompletionWorkerOptions, m as validateBundledWorkerFile, n as createCompletionCommand, o as generateCompletion, p as generateBundledCompletionWorker, r as createCompletionWorkerPathCommand, s as getSupportedShells, t as WithCompletionOptions, u as GenerateBundledCompletionWorkerResult, v as CompletableSubcommand, w as ShellType, x as CompletionMode, y as CompletionData } from "./index-CMb2xLiJ.js";
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-Be4GJADw.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-xaVZtAga.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/complete-command.d.ts
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
- 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, WithCompletionOptions, bundledWorkerShellExtension, createCompletionCommand, createCompletionWorkerPathCommand, createDynamicCompleteCommand, createRefreshCompletionCommand, defaultBundledWorkerOutputPath, detectShell, extractCompletionData, extractPositionals, formatForShell, generateBundledCompletionWorker, generateCandidates, generateCompletion, getSupportedShells, hasCompleteCommand, parseCompletionContext, resolveValueCompletion, validateBundledWorkerFile, withCompletionCommand };
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 };
@@ -1,4 +1 @@
1
- import "./register-DlGnMLIY.js";
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-DW5qVc3l.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, U as SubCommandValue, X as ResolvedFieldMeta, Y as ExtractedFields, b as ArgsSchema, tt as SchemaLike, v as AnyCommand } from "./arg-registry-B8QvBM_Q.js";
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-Be4GJADw.js";
2
2
  import * as fs from "node:fs";
3
3
  //#region ../core/src/executor/subcommand-router.d.ts
4
4
  /**