politty 0.5.1 → 0.7.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 (82) hide show
  1. package/README.md +47 -0
  2. package/dist/{arg-registry-6E0WHOh_.d.ts → arg-registry-DDJpsUea.d.cts} +47 -23
  3. package/dist/arg-registry-DDJpsUea.d.cts.map +1 -0
  4. package/dist/{arg-registry--NRaNFJM.d.cts → arg-registry-DDJpsUea.d.ts} +47 -23
  5. package/dist/arg-registry-DDJpsUea.d.ts.map +1 -0
  6. package/dist/augment.d.cts +1 -1
  7. package/dist/augment.d.ts +1 -1
  8. package/dist/cli.cjs +54 -0
  9. package/dist/cli.cjs.map +1 -0
  10. package/dist/cli.d.cts +1 -0
  11. package/dist/cli.d.ts +1 -0
  12. package/dist/cli.js +55 -0
  13. package/dist/cli.js.map +1 -0
  14. package/dist/completion/index.cjs +6 -1
  15. package/dist/completion/index.d.cts +3 -3
  16. package/dist/completion/index.d.ts +3 -3
  17. package/dist/completion/index.js +2 -2
  18. package/dist/{completion-BFOAOg95.cjs → completion-CLHO3Xaz.cjs} +1812 -337
  19. package/dist/completion-CLHO3Xaz.cjs.map +1 -0
  20. package/dist/{completion-K5LGh1hO.js → completion-DHnVx9Zk.js} +1786 -340
  21. package/dist/completion-DHnVx9Zk.js.map +1 -0
  22. package/dist/docs/index.cjs +3 -3
  23. package/dist/docs/index.cjs.map +1 -1
  24. package/dist/docs/index.d.cts +1 -1
  25. package/dist/docs/index.d.cts.map +1 -1
  26. package/dist/docs/index.d.ts +1 -1
  27. package/dist/docs/index.d.ts.map +1 -1
  28. package/dist/docs/index.js +3 -3
  29. package/dist/docs/index.js.map +1 -1
  30. package/dist/{index-Cg8qstsT.d.cts → index-DKGn3lIl.d.ts} +119 -4
  31. package/dist/index-DKGn3lIl.d.ts.map +1 -0
  32. package/dist/{index-O3yn97Ed.d.ts → index-WyViqW59.d.cts} +119 -4
  33. package/dist/index-WyViqW59.d.cts.map +1 -0
  34. package/dist/index.cjs +4 -3
  35. package/dist/index.d.cts +3 -3
  36. package/dist/index.d.cts.map +1 -1
  37. package/dist/index.d.ts +3 -3
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +4 -4
  40. package/dist/{log-collector-Cu6MCtAx.js → log-collector-DK32-73m.js} +1 -1
  41. package/dist/{log-collector-Cu6MCtAx.js.map → log-collector-DK32-73m.js.map} +1 -1
  42. package/dist/{log-collector-Cd2_mv87.cjs → log-collector-DUqC427m.cjs} +1 -1
  43. package/dist/{log-collector-Cd2_mv87.cjs.map → log-collector-DUqC427m.cjs.map} +1 -1
  44. package/dist/prompt/clack/index.cjs +1 -2
  45. package/dist/prompt/clack/index.cjs.map +1 -1
  46. package/dist/prompt/clack/index.d.cts +1 -1
  47. package/dist/prompt/clack/index.d.ts +1 -1
  48. package/dist/prompt/clack/index.js +1 -1
  49. package/dist/prompt/index.cjs +1 -1
  50. package/dist/prompt/index.d.cts +1 -1
  51. package/dist/prompt/index.d.cts.map +1 -1
  52. package/dist/prompt/index.d.ts +1 -1
  53. package/dist/prompt/index.d.ts.map +1 -1
  54. package/dist/prompt/index.js +1 -1
  55. package/dist/prompt/inquirer/index.cjs +1 -2
  56. package/dist/prompt/inquirer/index.cjs.map +1 -1
  57. package/dist/prompt/inquirer/index.d.cts +1 -1
  58. package/dist/prompt/inquirer/index.d.ts +1 -1
  59. package/dist/prompt/inquirer/index.js +1 -1
  60. package/dist/{prompt-aXfSf27y.cjs → prompt-Bs9e-Em3.cjs} +1 -1
  61. package/dist/{prompt-aXfSf27y.cjs.map → prompt-Bs9e-Em3.cjs.map} +1 -1
  62. package/dist/{prompt-BKHqGrFw.js → prompt-Cc8Tfmdv.js} +1 -1
  63. package/dist/{prompt-BKHqGrFw.js.map → prompt-Cc8Tfmdv.js.map} +1 -1
  64. package/dist/{runner-BmSEiD9A.js → runner-D43SkHt5.js} +121 -20
  65. package/dist/runner-D43SkHt5.js.map +1 -0
  66. package/dist/{runner-CRZ_7Y9i.cjs → runner-DvFvokV6.cjs} +121 -20
  67. package/dist/runner-DvFvokV6.cjs.map +1 -0
  68. package/dist/{schema-extractor-SLPgBNgZ.cjs → schema-extractor-BxSRwLrx.cjs} +1 -2
  69. package/dist/schema-extractor-BxSRwLrx.cjs.map +1 -0
  70. package/dist/{schema-extractor-C50R-1re.js → schema-extractor-Dqe7_kyQ.js} +1 -1
  71. package/dist/schema-extractor-Dqe7_kyQ.js.map +1 -0
  72. package/package.json +15 -12
  73. package/dist/arg-registry--NRaNFJM.d.cts.map +0 -1
  74. package/dist/arg-registry-6E0WHOh_.d.ts.map +0 -1
  75. package/dist/completion-BFOAOg95.cjs.map +0 -1
  76. package/dist/completion-K5LGh1hO.js.map +0 -1
  77. package/dist/index-Cg8qstsT.d.cts.map +0 -1
  78. package/dist/index-O3yn97Ed.d.ts.map +0 -1
  79. package/dist/runner-BmSEiD9A.js.map +0 -1
  80. package/dist/runner-CRZ_7Y9i.cjs.map +0 -1
  81. package/dist/schema-extractor-C50R-1re.js.map +0 -1
  82. package/dist/schema-extractor-SLPgBNgZ.cjs.map +0 -1
package/README.md CHANGED
@@ -297,6 +297,18 @@ Attach metadata to an argument.
297
297
  ## Shell Completion
298
298
 
299
299
  politty provides automatic shell completion generation for bash, zsh, and fish.
300
+ The default generated script is a small runtime dispatcher: when the user
301
+ presses TAB, it resolves the executable currently visible on `PATH` and uses a
302
+ bundled static worker from that executable's package when one is available. If
303
+ no package-relative bundled worker is found, it falls back to a per-binary
304
+ static worker cache and regenerates that cache from the hidden
305
+ `__refresh-completion` command when needed. Sourced workers are memoized for the
306
+ shell session, so warm completions call the worker function directly.
307
+ Completion fields that require runtime JavaScript still delegate to the
308
+ binary's hidden `__complete` command.
309
+ When `NODE_COMPILE_CACHE` is unset, the dispatcher sets it to a
310
+ program-specific cache directory before invoking `__complete`, letting Node.js
311
+ 22+ reuse V8 module compile cache across repeated completion requests.
300
312
 
301
313
  ### Quick Setup
302
314
 
@@ -331,6 +343,41 @@ eval "$(mycli completion zsh)"
331
343
  mycli completion fish | source
332
344
  ```
333
345
 
346
+ For project-local CLIs, put the local binary directory in `PATH` with your
347
+ environment manager, for example:
348
+
349
+ ```sh
350
+ # .envrc
351
+ PATH_add node_modules/.bin
352
+ ```
353
+
354
+ Completion then follows the same executable the shell would run.
355
+
356
+ Published CLIs can ship a fast worker artifact:
357
+
358
+ ```bash
359
+ politty generate-worker --bin dist/cli/index.mjs --program mycli --shell zsh --verify
360
+ ```
361
+
362
+ or call `generateBundledCompletionWorker()` from `politty/completion` in your
363
+ own build script. The default output path is
364
+ `dist/completion/<shell>-worker.<ext>`.
365
+
366
+ The dispatcher looks for common package-relative worker paths such as
367
+ `dist/completion/zsh-worker.zsh` from the visible binary. Use
368
+ `withCompletionCommand({ bundledWorker: { relativePaths: { zsh: [...] } } })`
369
+ to customize the package-relative lookup. For package layouts that cannot be
370
+ expressed with relative paths, `bundledWorker.queryCommand: true` lets the
371
+ dispatcher ask the binary's hidden `__completion-worker-path` command on the
372
+ miss path.
373
+
374
+ To generate the older static script with command metadata baked in, use:
375
+
376
+ ```bash
377
+ eval "$(mycli completion bash --static)"
378
+ eval "$(mycli completion zsh --static)"
379
+ ```
380
+
334
381
  ### Value Completion
335
382
 
336
383
  Define completion hints for arguments:
@@ -370,7 +370,29 @@ interface MainOptions {
370
370
  displayErrors?: boolean;
371
371
  /** Prompt resolver for interactive missing-arg prompts (e.g. from `politty/prompt/clack`). */
372
372
  prompt?: PromptResolver | undefined;
373
+ /**
374
+ * Fallback hook for CLI plugin dispatch, invoked when a positional is not a
375
+ * known subcommand at any level whose command exposes subcommands (e.g. exec
376
+ * an external `<cli>-<path...>-<name>` binary).
377
+ *
378
+ * Return a number to treat it as handled and exit with that code; return
379
+ * `undefined` (or omit) to fall back to the default unknown-subcommand/help
380
+ * behavior. Not invoked for internal `__*` subcommands.
381
+ */
382
+ onUnknownSubcommand?: UnknownSubcommandHandler | undefined;
373
383
  }
384
+ /**
385
+ * Handler for an unrecognized subcommand. See {@link MainOptions.onUnknownSubcommand}.
386
+ */
387
+ type UnknownSubcommandHandler = (context: {
388
+ /**
389
+ * Known subcommand names traversed before the unknown name (excludes the
390
+ * root command name). Empty at the root level.
391
+ */
392
+ commandPath: readonly string[]; /** The unrecognized subcommand name (first unmatched positional). */
393
+ name: string; /** Args following the name, forwarded verbatim to the plugin. */
394
+ args: readonly string[];
395
+ }) => number | undefined | Promise<number | undefined>;
374
396
  /**
375
397
  * Options for runCommand (programmatic/test usage)
376
398
  */
@@ -462,9 +484,9 @@ type RunResult<T = unknown> = RunResultSuccess<T> | RunResultFailure;
462
484
  * A `resolve` callback registered on `arg(...)` receives parsed context
463
485
  * (other arg values typed so far, previous values supplied to the same
464
486
  * option, the current word being completed, target shell) and returns
465
- * candidates. The callback runs inside the `__complete` command, so static
466
- * shell scripts delegate to `<program> __complete` for any spec that uses
467
- * `resolve`.
487
+ * candidates. The callback runs inside the `__complete` command. Dispatcher
488
+ * shell scripts call `__complete` for every completion request; static shell
489
+ * scripts delegate to it for any spec that uses `resolve`.
468
490
  *
469
491
  * Defined under `core/` (not `completion/`) so `arg-registry.ts` can
470
492
  * reference the resolver type without crossing the lint-enforced
@@ -514,14 +536,15 @@ type DynamicCompletionResolver = (ctx: DynamicCompletionContext) => DynamicCompl
514
536
  //#endregion
515
537
  //#region src/core/expand-completion-types.d.ts
516
538
  /**
517
- * Types for "expand" completion — candidates that are pre-enumerated at
518
- * script-generation time and inlined into the static shell script.
539
+ * Types for "expand" completion — candidates that depend on sibling arg
540
+ * values.
519
541
  *
520
542
  * The user provides `dependsOn` (sibling arg names that must have static
521
- * `choices` or an enum schema) and `enumerate(deps)`. politty walks the
522
- * cartesian product of the dependsOn values, calls `enumerate` for each
523
- * combination, and emits a case lookup keyed on the runtime values of those
524
- * args. No Node process is spawned on TAB.
543
+ * `choices` or an enum schema) and `enumerate(deps)`. Dispatcher scripts call
544
+ * `enumerate` inside `__complete` for the dependency values already typed on
545
+ * the command line. Static scripts walk the cartesian product of the
546
+ * dependsOn values, call `enumerate` for each combination, and emit a shell
547
+ * lookup table.
525
548
  *
526
549
  * Defined under `core/` (not `completion/`) so `arg-registry.ts` can
527
550
  * reference these types without crossing the lint-enforced
@@ -546,10 +569,11 @@ interface ResolvedExpandCandidate {
546
569
  * order of `dependsOn` is the order in which `deps` keys are exposed to
547
570
  * `enumerate`.
548
571
  *
549
- * `enumerate` runs once per cartesian-product combination at the time the
550
- * shell script is generated (e.g. when the user runs `<program> completion
551
- * zsh`). It must be a pure function of `deps`; politty does not retain it
552
- * for runtime use.
572
+ * In dispatcher mode, `enumerate` runs during `__complete` for the dependency
573
+ * values already typed by the user. In static mode, it runs once per
574
+ * cartesian-product combination at script-generation time (e.g. when the user
575
+ * runs `<program> completion zsh --static`). It must be a pure function of
576
+ * `deps`.
553
577
  */
554
578
  interface ExpandCompletion {
555
579
  dependsOn: readonly string[];
@@ -575,17 +599,17 @@ interface CustomCompletion {
575
599
  /**
576
600
  * In-process JS callback for dynamic completion. Receives parsed context
577
601
  * (other arg values typed so far, previously supplied values for this same
578
- * option) and returns candidates. Static shell scripts delegate to
579
- * `<program> __complete` whenever this is set.
602
+ * option) and returns candidates. Dispatcher scripts call
603
+ * `<program> __complete` for every completion request; static scripts
604
+ * delegate to it whenever this is set.
580
605
  */
581
606
  resolve?: DynamicCompletionResolver;
582
607
  /**
583
- * Pre-enumerated completion baked into the generated shell script. The
584
- * candidate list is computed at script-generation time by calling
585
- * `enumerate` for every combination of the sibling arg values listed in
586
- * `dependsOn` (each must have a static `choices` or enum schema). The
587
- * shell then dispatches via a case lookup keyed by the runtime values of
588
- * those args — no Node process is spawned on TAB.
608
+ * Completion whose candidates depend on sibling arg values. Dispatcher
609
+ * scripts call `enumerate` inside `__complete` for the dependency values
610
+ * already typed on the command line. Static scripts pre-enumerate every
611
+ * combination of `dependsOn` values at script-generation time and dispatch
612
+ * via a shell lookup table.
589
613
  */
590
614
  expand?: ExpandCompletion;
591
615
  }
@@ -914,5 +938,5 @@ type ValidateArgMeta<M, TValue = unknown> = M extends {
914
938
  declare function arg<T extends z.ZodType>(schema: T): T;
915
939
  declare function arg<T extends z.ZodType, M extends ArgMeta<z.output<T>>>(schema: T, meta: ValidateArgMeta<M, z.output<T>>): T;
916
940
  //#endregion
917
- export { LogStream as A, SetupContext as B, Example as C, IsEmpty as D, GlobalSetupContext as E, RunCommandOptions as F, lazy as G, SubCommandsRecord as H, RunResult as I, UnknownKeysMode as J, ExtractedFields as K, RunResultFailure as L, MainOptions as M, NonRunnableCommand as N, LogEntry as O, PromptResolver as P, toKebabCase as Q, RunResultSuccess as R, CommandBase as S, GlobalCleanupContext as T, LazyCommand as U, SubCommandValue as V, isLazyCommand as W, getUnknownKeysMode as X, extractFields as Y, toCamelCase as Z, AnyCommand as _, EffectContext as a, CollectedLogs as b, arg as c, ResolvedExpandCandidate as d, CompletionDirectiveMask as f, DynamicCompletionResult as g, DynamicCompletionResolver as h, CustomCompletion as i, Logger as j, LogLevel as k, ExpandCandidate as l, DynamicCompletionContext as m, CompletionMeta as n, PromptMeta as o, DynamicCompletionCandidate as p, ResolvedFieldMeta as q, CompletionType as r, PromptType as s, ArgMeta as t, ExpandCompletion as u, ArgsSchema as v, GlobalArgs as w, Command as x, CleanupContext as y, RunnableCommand as z };
918
- //# sourceMappingURL=arg-registry-6E0WHOh_.d.ts.map
941
+ export { toKebabCase as $, LogStream as A, SetupContext as B, Example as C, IsEmpty as D, GlobalSetupContext as E, RunCommandOptions as F, isLazyCommand as G, SubCommandsRecord as H, RunResult as I, ResolvedFieldMeta as J, lazy as K, RunResultFailure as L, MainOptions as M, NonRunnableCommand as N, LogEntry as O, PromptResolver as P, toCamelCase as Q, RunResultSuccess as R, CommandBase as S, GlobalCleanupContext as T, UnknownSubcommandHandler as U, SubCommandValue as V, LazyCommand as W, extractFields as X, UnknownKeysMode as Y, getUnknownKeysMode as Z, AnyCommand as _, EffectContext as a, CollectedLogs as b, arg as c, ResolvedExpandCandidate as d, CompletionDirectiveMask as f, DynamicCompletionResult as g, DynamicCompletionResolver as h, CustomCompletion as i, Logger as j, LogLevel as k, ExpandCandidate as l, DynamicCompletionContext as m, CompletionMeta as n, PromptMeta as o, DynamicCompletionCandidate as p, ExtractedFields as q, CompletionType as r, PromptType as s, ArgMeta as t, ExpandCompletion as u, ArgsSchema as v, GlobalArgs as w, Command as x, CleanupContext as y, RunnableCommand as z };
942
+ //# sourceMappingURL=arg-registry-DDJpsUea.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arg-registry-DDJpsUea.d.cts","names":[],"sources":["../src/core/schema-extractor.ts","../src/lazy.ts","../src/types.ts","../src/core/dynamic-completion-types.ts","../src/core/expand-completion-types.ts","../src/core/arg-registry.ts"],"mappings":";;;AA8CA;;;AAAA,UAAiB,iBAAA;EAwCF;EAtCb,IAAA;EAkEoC;EAhEpC,OAAA;EAgEwE;;;;;EA1DxE,KAAA;EAOA;;;;EAFA,WAAA;EAeA;EAbA,WAAA;EAiBA;EAfA,UAAA;EAeU;EAbV,WAAA;EAiBA;;;;EAZA,GAAA;EAgCA;EA9BA,QAAA;EAsCA;EApCA,YAAA;EAsCW;EApCX,IAAA;EAoC2B;EAlC3B,MAAA,EAAQ,CAAA,CAAE,OAAA;EAkC8D;EAhCxE,oBAAA;EAsCe;EApCf,UAAA;;EAEA,UAAA,GAAa,cAAA;EAsCL;EApCR,MAAA,GAAS,UAAA;EA0CE;;;;;;;;;;;;;;;EA1BX,QAAA;EA6BE;;;;;EAvBF,eAAA;EAmCgC;EAjChC,mBAAA;EA0CU;EAxCV,MAAA,KAAW,KAAA,WAAgB,OAAA,EAAS,aAAA,YAAyB,WAAA;AAAA;;AAwCpC;AA6C3B;UA/EiB,eAAA;;EAEf,MAAA,EAAQ,iBAAA;EA6EiC;EA3EzC,MAAA,EAAQ,UAAA;EA2EyB;EAzEjC,UAAA;EAyEoE;EAvEpE,aAAA;EA2Nc;EAzNd,QAAA,GAAW,KAAA;IACT,kBA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A,WAAc,CAAA,CAAE,OAAA,EAAS,MAAA,EAAQ,CAAA,GAAI,CAAA;AAAA,iBACrC,GAAA,WAAc,CAAA,CAAE,OAAA,YAAmB,OAAA,CAAQ,CAAA,CAAE,MAAA,CAAO,CAAA,IAClE,MAAA,EAAQ,CAAA,EACR,IAAA,EAAM,eAAA,CAAgB,CAAA,EAAG,CAAA,CAAE,MAAA,CAAO,CAAA,KACjC,CAAA"}
@@ -370,7 +370,29 @@ interface MainOptions {
370
370
  displayErrors?: boolean;
371
371
  /** Prompt resolver for interactive missing-arg prompts (e.g. from `politty/prompt/clack`). */
372
372
  prompt?: PromptResolver | undefined;
373
+ /**
374
+ * Fallback hook for CLI plugin dispatch, invoked when a positional is not a
375
+ * known subcommand at any level whose command exposes subcommands (e.g. exec
376
+ * an external `<cli>-<path...>-<name>` binary).
377
+ *
378
+ * Return a number to treat it as handled and exit with that code; return
379
+ * `undefined` (or omit) to fall back to the default unknown-subcommand/help
380
+ * behavior. Not invoked for internal `__*` subcommands.
381
+ */
382
+ onUnknownSubcommand?: UnknownSubcommandHandler | undefined;
373
383
  }
384
+ /**
385
+ * Handler for an unrecognized subcommand. See {@link MainOptions.onUnknownSubcommand}.
386
+ */
387
+ type UnknownSubcommandHandler = (context: {
388
+ /**
389
+ * Known subcommand names traversed before the unknown name (excludes the
390
+ * root command name). Empty at the root level.
391
+ */
392
+ commandPath: readonly string[]; /** The unrecognized subcommand name (first unmatched positional). */
393
+ name: string; /** Args following the name, forwarded verbatim to the plugin. */
394
+ args: readonly string[];
395
+ }) => number | undefined | Promise<number | undefined>;
374
396
  /**
375
397
  * Options for runCommand (programmatic/test usage)
376
398
  */
@@ -462,9 +484,9 @@ type RunResult<T = unknown> = RunResultSuccess<T> | RunResultFailure;
462
484
  * A `resolve` callback registered on `arg(...)` receives parsed context
463
485
  * (other arg values typed so far, previous values supplied to the same
464
486
  * option, the current word being completed, target shell) and returns
465
- * candidates. The callback runs inside the `__complete` command, so static
466
- * shell scripts delegate to `<program> __complete` for any spec that uses
467
- * `resolve`.
487
+ * candidates. The callback runs inside the `__complete` command. Dispatcher
488
+ * shell scripts call `__complete` for every completion request; static shell
489
+ * scripts delegate to it for any spec that uses `resolve`.
468
490
  *
469
491
  * Defined under `core/` (not `completion/`) so `arg-registry.ts` can
470
492
  * reference the resolver type without crossing the lint-enforced
@@ -514,14 +536,15 @@ type DynamicCompletionResolver = (ctx: DynamicCompletionContext) => DynamicCompl
514
536
  //#endregion
515
537
  //#region src/core/expand-completion-types.d.ts
516
538
  /**
517
- * Types for "expand" completion — candidates that are pre-enumerated at
518
- * script-generation time and inlined into the static shell script.
539
+ * Types for "expand" completion — candidates that depend on sibling arg
540
+ * values.
519
541
  *
520
542
  * The user provides `dependsOn` (sibling arg names that must have static
521
- * `choices` or an enum schema) and `enumerate(deps)`. politty walks the
522
- * cartesian product of the dependsOn values, calls `enumerate` for each
523
- * combination, and emits a case lookup keyed on the runtime values of those
524
- * args. No Node process is spawned on TAB.
543
+ * `choices` or an enum schema) and `enumerate(deps)`. Dispatcher scripts call
544
+ * `enumerate` inside `__complete` for the dependency values already typed on
545
+ * the command line. Static scripts walk the cartesian product of the
546
+ * dependsOn values, call `enumerate` for each combination, and emit a shell
547
+ * lookup table.
525
548
  *
526
549
  * Defined under `core/` (not `completion/`) so `arg-registry.ts` can
527
550
  * reference these types without crossing the lint-enforced
@@ -546,10 +569,11 @@ interface ResolvedExpandCandidate {
546
569
  * order of `dependsOn` is the order in which `deps` keys are exposed to
547
570
  * `enumerate`.
548
571
  *
549
- * `enumerate` runs once per cartesian-product combination at the time the
550
- * shell script is generated (e.g. when the user runs `<program> completion
551
- * zsh`). It must be a pure function of `deps`; politty does not retain it
552
- * for runtime use.
572
+ * In dispatcher mode, `enumerate` runs during `__complete` for the dependency
573
+ * values already typed by the user. In static mode, it runs once per
574
+ * cartesian-product combination at script-generation time (e.g. when the user
575
+ * runs `<program> completion zsh --static`). It must be a pure function of
576
+ * `deps`.
553
577
  */
554
578
  interface ExpandCompletion {
555
579
  dependsOn: readonly string[];
@@ -575,17 +599,17 @@ interface CustomCompletion {
575
599
  /**
576
600
  * In-process JS callback for dynamic completion. Receives parsed context
577
601
  * (other arg values typed so far, previously supplied values for this same
578
- * option) and returns candidates. Static shell scripts delegate to
579
- * `<program> __complete` whenever this is set.
602
+ * option) and returns candidates. Dispatcher scripts call
603
+ * `<program> __complete` for every completion request; static scripts
604
+ * delegate to it whenever this is set.
580
605
  */
581
606
  resolve?: DynamicCompletionResolver;
582
607
  /**
583
- * Pre-enumerated completion baked into the generated shell script. The
584
- * candidate list is computed at script-generation time by calling
585
- * `enumerate` for every combination of the sibling arg values listed in
586
- * `dependsOn` (each must have a static `choices` or enum schema). The
587
- * shell then dispatches via a case lookup keyed by the runtime values of
588
- * those args — no Node process is spawned on TAB.
608
+ * Completion whose candidates depend on sibling arg values. Dispatcher
609
+ * scripts call `enumerate` inside `__complete` for the dependency values
610
+ * already typed on the command line. Static scripts pre-enumerate every
611
+ * combination of `dependsOn` values at script-generation time and dispatch
612
+ * via a shell lookup table.
589
613
  */
590
614
  expand?: ExpandCompletion;
591
615
  }
@@ -914,5 +938,5 @@ type ValidateArgMeta<M, TValue = unknown> = M extends {
914
938
  declare function arg<T extends z.ZodType>(schema: T): T;
915
939
  declare function arg<T extends z.ZodType, M extends ArgMeta<z.output<T>>>(schema: T, meta: ValidateArgMeta<M, z.output<T>>): T;
916
940
  //#endregion
917
- export { LogStream as A, SetupContext as B, Example as C, IsEmpty as D, GlobalSetupContext as E, RunCommandOptions as F, lazy as G, SubCommandsRecord as H, RunResult as I, UnknownKeysMode as J, ExtractedFields as K, RunResultFailure as L, MainOptions as M, NonRunnableCommand as N, LogEntry as O, PromptResolver as P, toKebabCase as Q, RunResultSuccess as R, CommandBase as S, GlobalCleanupContext as T, LazyCommand as U, SubCommandValue as V, isLazyCommand as W, getUnknownKeysMode as X, extractFields as Y, toCamelCase as Z, AnyCommand as _, EffectContext as a, CollectedLogs as b, arg as c, ResolvedExpandCandidate as d, CompletionDirectiveMask as f, DynamicCompletionResult as g, DynamicCompletionResolver as h, CustomCompletion as i, Logger as j, LogLevel as k, ExpandCandidate as l, DynamicCompletionContext as m, CompletionMeta as n, PromptMeta as o, DynamicCompletionCandidate as p, ResolvedFieldMeta as q, CompletionType as r, PromptType as s, ArgMeta as t, ExpandCompletion as u, ArgsSchema as v, GlobalArgs as w, Command as x, CleanupContext as y, RunnableCommand as z };
918
- //# sourceMappingURL=arg-registry--NRaNFJM.d.cts.map
941
+ export { toKebabCase as $, LogStream as A, SetupContext as B, Example as C, IsEmpty as D, GlobalSetupContext as E, RunCommandOptions as F, isLazyCommand as G, SubCommandsRecord as H, RunResult as I, ResolvedFieldMeta as J, lazy as K, RunResultFailure as L, MainOptions as M, NonRunnableCommand as N, LogEntry as O, PromptResolver as P, toCamelCase as Q, RunResultSuccess as R, CommandBase as S, GlobalCleanupContext as T, UnknownSubcommandHandler as U, SubCommandValue as V, LazyCommand as W, extractFields as X, UnknownKeysMode as Y, getUnknownKeysMode as Z, AnyCommand as _, EffectContext as a, CollectedLogs as b, arg as c, ResolvedExpandCandidate as d, CompletionDirectiveMask as f, DynamicCompletionResult as g, DynamicCompletionResolver as h, CustomCompletion as i, Logger as j, LogLevel as k, ExpandCandidate as l, DynamicCompletionContext as m, CompletionMeta as n, PromptMeta as o, DynamicCompletionCandidate as p, ExtractedFields as q, CompletionType as r, PromptType as s, ArgMeta as t, ExpandCompletion as u, ArgsSchema as v, GlobalArgs as w, Command as x, CleanupContext as y, RunnableCommand as z };
942
+ //# sourceMappingURL=arg-registry-DDJpsUea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arg-registry-DDJpsUea.d.ts","names":[],"sources":["../src/core/schema-extractor.ts","../src/lazy.ts","../src/types.ts","../src/core/dynamic-completion-types.ts","../src/core/expand-completion-types.ts","../src/core/arg-registry.ts"],"mappings":";;;AA8CA;;;AAAA,UAAiB,iBAAA;EAwCF;EAtCb,IAAA;E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AAA;AAAA,IAAyB,CAAA;;;;;;;AHtMsB;AAAE;KGgNrF,cAAA,sBACa,WAAA,CAAY,CAAA,MAAO,WAAA,CAAY,CAAA;;;AHxMrC;AAAA;;;;AAOE;AAMd;KGsMK,WAAA,wBAAmC,CAAA,eAAgB,CAAA,qBAClC,CAAA,CAAE,CAAA;;;;;;KAUnB,gBAAA,cACH,WAAA,CAAY,CAAA,6BACR,cAAA,CAAe,MAAA,iBACb,CAAA,GACA,iBAAA,CAAkB,CAAA,IACpB,WAAA,CAAY,CAAA,wCACV,cAAA,CAAe,MAAA,iBACb,CAAA,GACA,iBAAA,CAAkB,CAAA,IACpB,CAAA;;;;;;;AH1NmE;KGmOtE,eAAA,wBAAuC,CAAA;EAAY,oBAAA;AAAA,IACpD,gBAAA,CAAiB,CAAA,EAAG,MAAA,IACpB,qBAAA,CAAsB,YAAA,CAAa,CAAA,kBACjC,sBAAA,CAAuB,CAAA,IACvB,qBAAA,CAAsB,kBAAA,CAAmB,CAAA,kBACvC,sBAAA,CAAuB,CAAA,IACvB,gBAAA,CAAiB,CAAA,EAAG,MAAA;AAAA,iBAEZ,GAAA,WAAc,CAAA,CAAE,OAAA,EAAS,MAAA,EAAQ,CAAA,GAAI,CAAA;AAAA,iBACrC,GAAA,WAAc,CAAA,CAAE,OAAA,YAAmB,OAAA,CAAQ,CAAA,CAAE,MAAA,CAAO,CAAA,IAClE,MAAA,EAAQ,CAAA,EACR,IAAA,EAAM,eAAA,CAAgB,CAAA,EAAG,CAAA,CAAE,MAAA,CAAO,CAAA,KACjC,CAAA"}
@@ -1,4 +1,4 @@
1
- import { t as ArgMeta } from "./arg-registry--NRaNFJM.cjs";
1
+ import { t as ArgMeta } from "./arg-registry-DDJpsUea.cjs";
2
2
 
3
3
  //#region src/augment.d.ts
4
4
  declare module "zod" {
package/dist/augment.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as ArgMeta } from "./arg-registry-6E0WHOh_.js";
1
+ import { t as ArgMeta } from "./arg-registry-DDJpsUea.js";
2
2
 
3
3
  //#region src/augment.d.ts
4
4
  declare module "zod" {
package/dist/cli.cjs ADDED
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env node
2
+ const require_schema_extractor = require('./schema-extractor-BxSRwLrx.cjs');
3
+ const require_completion = require('./completion-CLHO3Xaz.cjs');
4
+ const require_runner = require('./runner-DvFvokV6.cjs');
5
+ require('./index.cjs');
6
+ let zod = require("zod");
7
+
8
+ //#region src/cli.ts
9
+ require_runner.runMain(require_completion.defineCommand({
10
+ name: "politty",
11
+ description: "politty development utilities",
12
+ subCommands: { "generate-worker": require_completion.defineCommand({
13
+ name: "generate-worker",
14
+ description: "Generate and verify a bundled shell completion worker",
15
+ args: zod.z.object({
16
+ bin: require_schema_extractor.arg(zod.z.string(), {
17
+ description: "CLI binary or built JS entry file to invoke",
18
+ placeholder: "PATH"
19
+ }),
20
+ program: require_schema_extractor.arg(zod.z.string(), {
21
+ description: "Program name embedded in worker metadata",
22
+ placeholder: "NAME"
23
+ }),
24
+ shell: require_schema_extractor.arg(zod.z.enum([
25
+ "bash",
26
+ "zsh",
27
+ "fish"
28
+ ]), {
29
+ description: "Shell worker to generate",
30
+ placeholder: "SHELL"
31
+ }),
32
+ out: require_schema_extractor.arg(zod.z.string().optional(), {
33
+ description: "Output worker path (defaults to dist/completion/<shell>-worker.<ext>)",
34
+ placeholder: "PATH"
35
+ }),
36
+ verify: require_schema_extractor.arg(zod.z.boolean().default(false), { description: "Verify __completion-worker-path resolves to the generated worker" })
37
+ }),
38
+ async run(args) {
39
+ await require_completion.generateBundledCompletionWorker({
40
+ bin: args.bin,
41
+ programName: args.program,
42
+ shell: args.shell,
43
+ ...args.out !== void 0 && { outputPath: args.out },
44
+ verify: args.verify
45
+ });
46
+ }
47
+ }) }
48
+ })).catch((error) => {
49
+ console.error(error instanceof Error ? error.message : String(error));
50
+ process.exit(1);
51
+ });
52
+
53
+ //#endregion
54
+ //# sourceMappingURL=cli.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.cjs","names":["runMain","defineCommand","z","arg","generateBundledCompletionWorker"],"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { z } from \"zod\";\nimport { arg } from \"./core/arg-registry.js\";\nimport { defineCommand } from \"./core/command.js\";\nimport { runMain } from \"./core/runner.js\";\nimport { generateBundledCompletionWorker } from \"./index.js\";\n\nconst generateWorkerArgsSchema = z.object({\n bin: arg(z.string(), {\n description: \"CLI binary or built JS entry file to invoke\",\n placeholder: \"PATH\",\n }),\n program: arg(z.string(), {\n description: \"Program name embedded in worker metadata\",\n placeholder: \"NAME\",\n }),\n shell: arg(z.enum([\"bash\", \"zsh\", \"fish\"]), {\n description: \"Shell worker to generate\",\n placeholder: \"SHELL\",\n }),\n out: arg(z.string().optional(), {\n description: \"Output worker path (defaults to dist/completion/<shell>-worker.<ext>)\",\n placeholder: \"PATH\",\n }),\n verify: arg(z.boolean().default(false), {\n description: \"Verify __completion-worker-path resolves to the generated worker\",\n }),\n});\n\ntype GenerateWorkerArgs = z.infer<typeof generateWorkerArgsSchema>;\n\nconst generateWorkerCommand = defineCommand({\n name: \"generate-worker\",\n description: \"Generate and verify a bundled shell completion worker\",\n args: generateWorkerArgsSchema,\n async run(args: GenerateWorkerArgs) {\n await generateBundledCompletionWorker({\n bin: args.bin,\n programName: args.program,\n shell: args.shell,\n ...(args.out !== undefined && { outputPath: args.out }),\n verify: args.verify,\n });\n },\n});\n\nconst cli = defineCommand({\n name: \"politty\",\n description: \"politty development utilities\",\n subCommands: {\n \"generate-worker\": generateWorkerCommand,\n },\n});\n\nrunMain(cli).catch((error: unknown) => {\n console.error(error instanceof Error ? error.message : String(error));\n process.exit(1);\n});\n"],"mappings":";;;;;;;;AAuDAA,uBARYC,iCAAc;CACxB,MAAM;CACN,aAAa;CACb,aAAa,EACX,mBAnB0BA,iCAAc;EAC1C,MAAM;EACN,aAAa;EACb,MA3B+BC,MAAE,OAAO;GACxC,KAAKC,6BAAID,MAAE,OAAO,GAAG;IACnB,aAAa;IACb,aAAa;GACf,CAAC;GACD,SAASC,6BAAID,MAAE,OAAO,GAAG;IACvB,aAAa;IACb,aAAa;GACf,CAAC;GACD,OAAOC,6BAAID,MAAE,KAAK;IAAC;IAAQ;IAAO;GAAM,CAAC,GAAG;IAC1C,aAAa;IACb,aAAa;GACf,CAAC;GACD,KAAKC,6BAAID,MAAE,OAAO,CAAC,CAAC,SAAS,GAAG;IAC9B,aAAa;IACb,aAAa;GACf,CAAC;GACD,QAAQC,6BAAID,MAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,GAAG,EACtC,aAAa,mEACf,CAAC;EACH,CAO+B;EAC7B,MAAM,IAAI,MAA0B;GAClC,MAAME,mDAAgC;IACpC,KAAK,KAAK;IACV,aAAa,KAAK;IAClB,OAAO,KAAK;IACZ,GAAI,KAAK,QAAQ,UAAa,EAAE,YAAY,KAAK,IAAI;IACrD,QAAQ,KAAK;GACf,CAAC;EACH;CACF,CAM2C,EACzC;AACF,CAEU,CAAC,CAAC,CAAC,OAAO,UAAmB;CACrC,QAAQ,MAAM,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC;CACpE,QAAQ,KAAK,CAAC;AAChB,CAAC"}
package/dist/cli.d.cts ADDED
@@ -0,0 +1 @@
1
+ export { };
package/dist/cli.d.ts ADDED
@@ -0,0 +1 @@
1
+ export { };
package/dist/cli.js ADDED
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env node
2
+ import { n as runMain } from "./runner-D43SkHt5.js";
3
+ import { h as arg } from "./schema-extractor-Dqe7_kyQ.js";
4
+ import { S as defineCommand, p as generateBundledCompletionWorker } from "./completion-DHnVx9Zk.js";
5
+ import "./index.js";
6
+ import { z } from "zod";
7
+
8
+ //#region src/cli.ts
9
+ runMain(defineCommand({
10
+ name: "politty",
11
+ description: "politty development utilities",
12
+ subCommands: { "generate-worker": defineCommand({
13
+ name: "generate-worker",
14
+ description: "Generate and verify a bundled shell completion worker",
15
+ args: z.object({
16
+ bin: arg(z.string(), {
17
+ description: "CLI binary or built JS entry file to invoke",
18
+ placeholder: "PATH"
19
+ }),
20
+ program: arg(z.string(), {
21
+ description: "Program name embedded in worker metadata",
22
+ placeholder: "NAME"
23
+ }),
24
+ shell: arg(z.enum([
25
+ "bash",
26
+ "zsh",
27
+ "fish"
28
+ ]), {
29
+ description: "Shell worker to generate",
30
+ placeholder: "SHELL"
31
+ }),
32
+ out: arg(z.string().optional(), {
33
+ description: "Output worker path (defaults to dist/completion/<shell>-worker.<ext>)",
34
+ placeholder: "PATH"
35
+ }),
36
+ verify: arg(z.boolean().default(false), { description: "Verify __completion-worker-path resolves to the generated worker" })
37
+ }),
38
+ async run(args) {
39
+ await generateBundledCompletionWorker({
40
+ bin: args.bin,
41
+ programName: args.program,
42
+ shell: args.shell,
43
+ ...args.out !== void 0 && { outputPath: args.out },
44
+ verify: args.verify
45
+ });
46
+ }
47
+ }) }
48
+ })).catch((error) => {
49
+ console.error(error instanceof Error ? error.message : String(error));
50
+ process.exit(1);
51
+ });
52
+
53
+ //#endregion
54
+ export { };
55
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","names":[],"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { z } from \"zod\";\nimport { arg } from \"./core/arg-registry.js\";\nimport { defineCommand } from \"./core/command.js\";\nimport { runMain } from \"./core/runner.js\";\nimport { generateBundledCompletionWorker } from \"./index.js\";\n\nconst generateWorkerArgsSchema = z.object({\n bin: arg(z.string(), {\n description: \"CLI binary or built JS entry file to invoke\",\n placeholder: \"PATH\",\n }),\n program: arg(z.string(), {\n description: \"Program name embedded in worker metadata\",\n placeholder: \"NAME\",\n }),\n shell: arg(z.enum([\"bash\", \"zsh\", \"fish\"]), {\n description: \"Shell worker to generate\",\n placeholder: \"SHELL\",\n }),\n out: arg(z.string().optional(), {\n description: \"Output worker path (defaults to dist/completion/<shell>-worker.<ext>)\",\n placeholder: \"PATH\",\n }),\n verify: arg(z.boolean().default(false), {\n description: \"Verify __completion-worker-path resolves to the generated worker\",\n }),\n});\n\ntype GenerateWorkerArgs = z.infer<typeof generateWorkerArgsSchema>;\n\nconst generateWorkerCommand = defineCommand({\n name: \"generate-worker\",\n description: \"Generate and verify a bundled shell completion worker\",\n args: generateWorkerArgsSchema,\n async run(args: GenerateWorkerArgs) {\n await generateBundledCompletionWorker({\n bin: args.bin,\n programName: args.program,\n shell: args.shell,\n ...(args.out !== undefined && { outputPath: args.out }),\n verify: args.verify,\n });\n },\n});\n\nconst cli = defineCommand({\n name: \"politty\",\n description: \"politty development utilities\",\n subCommands: {\n \"generate-worker\": generateWorkerCommand,\n },\n});\n\nrunMain(cli).catch((error: unknown) => {\n console.error(error instanceof Error ? error.message : String(error));\n process.exit(1);\n});\n"],"mappings":";;;;;;;;AAuDA,QARY,cAAc;CACxB,MAAM;CACN,aAAa;CACb,aAAa,EACX,mBAnB0B,cAAc;EAC1C,MAAM;EACN,aAAa;EACb,MA3B+B,EAAE,OAAO;GACxC,KAAK,IAAI,EAAE,OAAO,GAAG;IACnB,aAAa;IACb,aAAa;GACf,CAAC;GACD,SAAS,IAAI,EAAE,OAAO,GAAG;IACvB,aAAa;IACb,aAAa;GACf,CAAC;GACD,OAAO,IAAI,EAAE,KAAK;IAAC;IAAQ;IAAO;GAAM,CAAC,GAAG;IAC1C,aAAa;IACb,aAAa;GACf,CAAC;GACD,KAAK,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,GAAG;IAC9B,aAAa;IACb,aAAa;GACf,CAAC;GACD,QAAQ,IAAI,EAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,GAAG,EACtC,aAAa,mEACf,CAAC;EACH,CAO+B;EAC7B,MAAM,IAAI,MAA0B;GAClC,MAAM,gCAAgC;IACpC,KAAK,KAAK;IACV,aAAa,KAAK;IAClB,OAAO,KAAK;IACZ,GAAI,KAAK,QAAQ,UAAa,EAAE,YAAY,KAAK,IAAI;IACrD,QAAQ,KAAK;GACf,CAAC;EACH;CACF,CAM2C,EACzC;AACF,CAEU,CAAC,CAAC,CAAC,OAAO,UAAmB;CACrC,QAAQ,MAAM,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC;CACpE,QAAQ,KAAK,CAAC;AAChB,CAAC"}
@@ -1,18 +1,23 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_completion = require('../completion-BFOAOg95.cjs');
2
+ const require_completion = require('../completion-CLHO3Xaz.cjs');
3
3
 
4
4
  exports.CompletionDirective = require_completion.CompletionDirective;
5
+ exports.bundledWorkerShellExtension = require_completion.bundledWorkerShellExtension;
5
6
  exports.createCompletionCommand = require_completion.createCompletionCommand;
7
+ exports.createCompletionWorkerPathCommand = require_completion.createCompletionWorkerPathCommand;
6
8
  exports.createDynamicCompleteCommand = require_completion.createDynamicCompleteCommand;
7
9
  exports.createRefreshCompletionCommand = require_completion.createRefreshCompletionCommand;
10
+ exports.defaultBundledWorkerOutputPath = require_completion.defaultBundledWorkerOutputPath;
8
11
  exports.detectShell = require_completion.detectShell;
9
12
  exports.extractCompletionData = require_completion.extractCompletionData;
10
13
  exports.extractPositionals = require_completion.extractPositionals;
11
14
  exports.formatForShell = require_completion.formatForShell;
15
+ exports.generateBundledCompletionWorker = require_completion.generateBundledCompletionWorker;
12
16
  exports.generateCandidates = require_completion.generateCandidates;
13
17
  exports.generateCompletion = require_completion.generateCompletion;
14
18
  exports.getSupportedShells = require_completion.getSupportedShells;
15
19
  exports.hasCompleteCommand = require_completion.hasCompleteCommand;
16
20
  exports.parseCompletionContext = require_completion.parseCompletionContext;
17
21
  exports.resolveValueCompletion = require_completion.resolveValueCompletion;
22
+ exports.validateBundledWorkerFile = require_completion.validateBundledWorkerFile;
18
23
  exports.withCompletionCommand = require_completion.withCompletionCommand;
@@ -1,3 +1,3 @@
1
- import { f as CompletionDirectiveMask, g as DynamicCompletionResult, h as DynamicCompletionResolver, m as DynamicCompletionContext, p as DynamicCompletionCandidate } from "../arg-registry--NRaNFJM.cjs";
2
- import { C as CompletableOption, D as CompletionOptions, E as CompletionGenerator, O as CompletionResult, S as parseCompletionContext, T as CompletionData, _ as CompletionCandidate, a as generateCompletion, b as CompletionContext, c as ValueCompletionField, d as extractPositionals, f as ShellFormatOptions, g as CandidateResult, h as hasCompleteCommand, i as detectShell, k as ShellType, l as resolveValueCompletion, m as createDynamicCompleteCommand, n as createCompletionCommand, o as getSupportedShells, p as formatForShell, r as createRefreshCompletionCommand, s as withCompletionCommand, t as WithCompletionOptions, u as extractCompletionData, v as CompletionDirective, w as CompletableSubcommand, x as CompletionType, y as generateCandidates } from "../index-Cg8qstsT.cjs";
3
- export { type CandidateResult, type CompletableOption, type CompletableSubcommand, type CompletionCandidate, type CompletionContext, type CompletionData, CompletionDirective, type CompletionDirectiveMask, type CompletionGenerator, type CompletionOptions, type CompletionResult, type CompletionType, type DynamicCompletionCandidate, type DynamicCompletionContext, type DynamicCompletionResolver, type DynamicCompletionResult, type ShellFormatOptions, type ShellType, type ValueCompletionField, WithCompletionOptions, createCompletionCommand, createDynamicCompleteCommand, createRefreshCompletionCommand, detectShell, extractCompletionData, extractPositionals, formatForShell, generateCandidates, generateCompletion, getSupportedShells, hasCompleteCommand, parseCompletionContext, resolveValueCompletion, withCompletionCommand };
1
+ import { f as CompletionDirectiveMask, g as DynamicCompletionResult, h as DynamicCompletionResolver, m as DynamicCompletionContext, p as DynamicCompletionCandidate } from "../arg-registry-DDJpsUea.cjs";
2
+ import { A as BundledWorkerOptions, C as CandidateResult, D as CompletionContext, E as generateCandidates, F as CompletionMode, I as CompletionOptions, L as CompletionResult, M as CompletableSubcommand, N as CompletionData, O as CompletionType, P as CompletionGenerator, R as ShellType, S as hasCompleteCommand, T as CompletionDirective, _ as extractCompletionData, a as detectShell, b as formatForShell, c as withCompletionCommand, d as GenerateBundledCompletionWorkerOptions, f as GenerateBundledCompletionWorkerResult, g as validateBundledWorkerFile, h as generateBundledCompletionWorker, i as createRefreshCompletionCommand, j as CompletableOption, k as parseCompletionContext, l as ValueCompletionField, m as defaultBundledWorkerOutputPath, n as createCompletionCommand, o as generateCompletion, p as bundledWorkerShellExtension, r as createCompletionWorkerPathCommand, s as getSupportedShells, t as WithCompletionOptions, u as resolveValueCompletion, v as extractPositionals, w as CompletionCandidate, x as createDynamicCompleteCommand, y as ShellFormatOptions } from "../index-WyViqW59.cjs";
3
+ 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 };
@@ -1,3 +1,3 @@
1
- import { f as CompletionDirectiveMask, g as DynamicCompletionResult, h as DynamicCompletionResolver, m as DynamicCompletionContext, p as DynamicCompletionCandidate } from "../arg-registry-6E0WHOh_.js";
2
- import { C as CompletableOption, D as CompletionOptions, E as CompletionGenerator, O as CompletionResult, S as parseCompletionContext, T as CompletionData, _ as CompletionCandidate, a as generateCompletion, b as CompletionContext, c as ValueCompletionField, d as extractPositionals, f as ShellFormatOptions, g as CandidateResult, h as hasCompleteCommand, i as detectShell, k as ShellType, l as resolveValueCompletion, m as createDynamicCompleteCommand, n as createCompletionCommand, o as getSupportedShells, p as formatForShell, r as createRefreshCompletionCommand, s as withCompletionCommand, t as WithCompletionOptions, u as extractCompletionData, v as CompletionDirective, w as CompletableSubcommand, x as CompletionType, y as generateCandidates } from "../index-O3yn97Ed.js";
3
- export { type CandidateResult, type CompletableOption, type CompletableSubcommand, type CompletionCandidate, type CompletionContext, type CompletionData, CompletionDirective, type CompletionDirectiveMask, type CompletionGenerator, type CompletionOptions, type CompletionResult, type CompletionType, type DynamicCompletionCandidate, type DynamicCompletionContext, type DynamicCompletionResolver, type DynamicCompletionResult, type ShellFormatOptions, type ShellType, type ValueCompletionField, WithCompletionOptions, createCompletionCommand, createDynamicCompleteCommand, createRefreshCompletionCommand, detectShell, extractCompletionData, extractPositionals, formatForShell, generateCandidates, generateCompletion, getSupportedShells, hasCompleteCommand, parseCompletionContext, resolveValueCompletion, withCompletionCommand };
1
+ import { f as CompletionDirectiveMask, g as DynamicCompletionResult, h as DynamicCompletionResolver, m as DynamicCompletionContext, p as DynamicCompletionCandidate } from "../arg-registry-DDJpsUea.js";
2
+ import { A as BundledWorkerOptions, C as CandidateResult, D as CompletionContext, E as generateCandidates, F as CompletionMode, I as CompletionOptions, L as CompletionResult, M as CompletableSubcommand, N as CompletionData, O as CompletionType, P as CompletionGenerator, R as ShellType, S as hasCompleteCommand, T as CompletionDirective, _ as extractCompletionData, a as detectShell, b as formatForShell, c as withCompletionCommand, d as GenerateBundledCompletionWorkerOptions, f as GenerateBundledCompletionWorkerResult, g as validateBundledWorkerFile, h as generateBundledCompletionWorker, i as createRefreshCompletionCommand, j as CompletableOption, k as parseCompletionContext, l as ValueCompletionField, m as defaultBundledWorkerOutputPath, n as createCompletionCommand, o as generateCompletion, p as bundledWorkerShellExtension, r as createCompletionWorkerPathCommand, s as getSupportedShells, t as WithCompletionOptions, u as resolveValueCompletion, v as extractPositionals, w as CompletionCandidate, x as createDynamicCompleteCommand, y as ShellFormatOptions } from "../index-DKGn3lIl.js";
3
+ 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 };
@@ -1,3 +1,3 @@
1
- import { a as getSupportedShells, c as hasCompleteCommand, d as extractPositionals, f as CompletionDirective, h as resolveValueCompletion, i as generateCompletion, l as formatForShell, m as parseCompletionContext, n as createRefreshCompletionCommand, o as withCompletionCommand, p as generateCandidates, r as detectShell, s as createDynamicCompleteCommand, t as createCompletionCommand, u as extractCompletionData } from "../completion-K5LGh1hO.js";
1
+ 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-DHnVx9Zk.js";
2
2
 
3
- export { CompletionDirective, createCompletionCommand, createDynamicCompleteCommand, createRefreshCompletionCommand, detectShell, extractCompletionData, extractPositionals, formatForShell, generateCandidates, generateCompletion, getSupportedShells, hasCompleteCommand, parseCompletionContext, resolveValueCompletion, withCompletionCommand };
3
+ export { CompletionDirective, bundledWorkerShellExtension, createCompletionCommand, createCompletionWorkerPathCommand, createDynamicCompleteCommand, createRefreshCompletionCommand, defaultBundledWorkerOutputPath, detectShell, extractCompletionData, extractPositionals, formatForShell, generateBundledCompletionWorker, generateCandidates, generateCompletion, getSupportedShells, hasCompleteCommand, parseCompletionContext, resolveValueCompletion, validateBundledWorkerFile, withCompletionCommand };