politty 0.5.0 → 0.6.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/README.md +47 -0
- package/dist/{arg-registry-6E0WHOh_.d.ts → arg-registry-BoqVZRFO.d.cts} +24 -22
- package/dist/arg-registry-BoqVZRFO.d.cts.map +1 -0
- package/dist/{arg-registry--NRaNFJM.d.cts → arg-registry-BoqVZRFO.d.ts} +24 -22
- package/dist/arg-registry-BoqVZRFO.d.ts.map +1 -0
- package/dist/augment.d.cts +1 -1
- package/dist/augment.d.ts +1 -1
- package/dist/cli.cjs +54 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/cli.d.cts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +55 -0
- package/dist/cli.js.map +1 -0
- package/dist/completion/index.cjs +6 -1
- package/dist/completion/index.d.cts +3 -3
- package/dist/completion/index.d.ts +3 -3
- package/dist/completion/index.js +2 -2
- package/dist/{completion-Cqs1Ja7C.cjs → completion-CLHO3Xaz.cjs} +1915 -315
- package/dist/completion-CLHO3Xaz.cjs.map +1 -0
- package/dist/{completion-BA5JMvVG.js → completion-DHnVx9Zk.js} +1889 -318
- package/dist/completion-DHnVx9Zk.js.map +1 -0
- package/dist/docs/index.cjs +3 -3
- package/dist/docs/index.cjs.map +1 -1
- package/dist/docs/index.d.cts +1 -1
- package/dist/docs/index.d.cts.map +1 -1
- package/dist/docs/index.d.ts +1 -1
- package/dist/docs/index.d.ts.map +1 -1
- package/dist/docs/index.js +3 -3
- package/dist/docs/index.js.map +1 -1
- package/dist/{index-DBMfKZ34.d.ts → index-Csk1VFou.d.ts} +120 -4
- package/dist/index-Csk1VFou.d.ts.map +1 -0
- package/dist/{index-DJp8k5Bq.d.cts → index-Ct48_myg.d.cts} +120 -4
- package/dist/index-Ct48_myg.d.cts.map +1 -0
- package/dist/index.cjs +4 -3
- package/dist/index.d.cts +3 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/{log-collector-Cu6MCtAx.js → log-collector-DK32-73m.js} +1 -1
- package/dist/{log-collector-Cu6MCtAx.js.map → log-collector-DK32-73m.js.map} +1 -1
- package/dist/{log-collector-Cd2_mv87.cjs → log-collector-DUqC427m.cjs} +1 -1
- package/dist/{log-collector-Cd2_mv87.cjs.map → log-collector-DUqC427m.cjs.map} +1 -1
- package/dist/prompt/clack/index.cjs +1 -2
- package/dist/prompt/clack/index.cjs.map +1 -1
- package/dist/prompt/clack/index.d.cts +1 -1
- package/dist/prompt/clack/index.d.ts +1 -1
- package/dist/prompt/clack/index.js +1 -1
- package/dist/prompt/index.cjs +1 -1
- package/dist/prompt/index.d.cts +1 -1
- package/dist/prompt/index.d.cts.map +1 -1
- package/dist/prompt/index.d.ts +1 -1
- package/dist/prompt/index.d.ts.map +1 -1
- package/dist/prompt/index.js +1 -1
- package/dist/prompt/inquirer/index.cjs +1 -2
- package/dist/prompt/inquirer/index.cjs.map +1 -1
- package/dist/prompt/inquirer/index.d.cts +1 -1
- package/dist/prompt/inquirer/index.d.ts +1 -1
- package/dist/prompt/inquirer/index.js +1 -1
- package/dist/{prompt-aXfSf27y.cjs → prompt-Bs9e-Em3.cjs} +1 -1
- package/dist/{prompt-aXfSf27y.cjs.map → prompt-Bs9e-Em3.cjs.map} +1 -1
- package/dist/{prompt-BKHqGrFw.js → prompt-Cc8Tfmdv.js} +1 -1
- package/dist/{prompt-BKHqGrFw.js.map → prompt-Cc8Tfmdv.js.map} +1 -1
- package/dist/{runner-BmSEiD9A.js → runner--Zn4KN9B.js} +3 -3
- package/dist/{runner-BmSEiD9A.js.map → runner--Zn4KN9B.js.map} +1 -1
- package/dist/{runner-CRZ_7Y9i.cjs → runner-BloFWJEB.cjs} +3 -3
- package/dist/{runner-CRZ_7Y9i.cjs.map → runner-BloFWJEB.cjs.map} +1 -1
- package/dist/{schema-extractor-SLPgBNgZ.cjs → schema-extractor-BxSRwLrx.cjs} +1 -2
- package/dist/schema-extractor-BxSRwLrx.cjs.map +1 -0
- package/dist/{schema-extractor-C50R-1re.js → schema-extractor-Dqe7_kyQ.js} +1 -1
- package/dist/schema-extractor-Dqe7_kyQ.js.map +1 -0
- package/package.json +14 -11
- package/dist/arg-registry--NRaNFJM.d.cts.map +0 -1
- package/dist/arg-registry-6E0WHOh_.d.ts.map +0 -1
- package/dist/completion-BA5JMvVG.js.map +0 -1
- package/dist/completion-Cqs1Ja7C.cjs.map +0 -1
- package/dist/index-DBMfKZ34.d.ts.map +0 -1
- package/dist/index-DJp8k5Bq.d.cts.map +0 -1
- package/dist/schema-extractor-C50R-1re.js.map +0 -1
- 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:
|
|
@@ -462,9 +462,9 @@ type RunResult<T = unknown> = RunResultSuccess<T> | RunResultFailure;
|
|
|
462
462
|
* A `resolve` callback registered on `arg(...)` receives parsed context
|
|
463
463
|
* (other arg values typed so far, previous values supplied to the same
|
|
464
464
|
* option, the current word being completed, target shell) and returns
|
|
465
|
-
* candidates. The callback runs inside the `__complete` command
|
|
466
|
-
* shell scripts
|
|
467
|
-
* `resolve`.
|
|
465
|
+
* candidates. The callback runs inside the `__complete` command. Dispatcher
|
|
466
|
+
* shell scripts call `__complete` for every completion request; static shell
|
|
467
|
+
* scripts delegate to it for any spec that uses `resolve`.
|
|
468
468
|
*
|
|
469
469
|
* Defined under `core/` (not `completion/`) so `arg-registry.ts` can
|
|
470
470
|
* reference the resolver type without crossing the lint-enforced
|
|
@@ -514,14 +514,15 @@ type DynamicCompletionResolver = (ctx: DynamicCompletionContext) => DynamicCompl
|
|
|
514
514
|
//#endregion
|
|
515
515
|
//#region src/core/expand-completion-types.d.ts
|
|
516
516
|
/**
|
|
517
|
-
* Types for "expand" completion — candidates that
|
|
518
|
-
*
|
|
517
|
+
* Types for "expand" completion — candidates that depend on sibling arg
|
|
518
|
+
* values.
|
|
519
519
|
*
|
|
520
520
|
* The user provides `dependsOn` (sibling arg names that must have static
|
|
521
|
-
* `choices` or an enum schema) and `enumerate(deps)`.
|
|
522
|
-
*
|
|
523
|
-
*
|
|
524
|
-
*
|
|
521
|
+
* `choices` or an enum schema) and `enumerate(deps)`. Dispatcher scripts call
|
|
522
|
+
* `enumerate` inside `__complete` for the dependency values already typed on
|
|
523
|
+
* the command line. Static scripts walk the cartesian product of the
|
|
524
|
+
* dependsOn values, call `enumerate` for each combination, and emit a shell
|
|
525
|
+
* lookup table.
|
|
525
526
|
*
|
|
526
527
|
* Defined under `core/` (not `completion/`) so `arg-registry.ts` can
|
|
527
528
|
* reference these types without crossing the lint-enforced
|
|
@@ -546,10 +547,11 @@ interface ResolvedExpandCandidate {
|
|
|
546
547
|
* order of `dependsOn` is the order in which `deps` keys are exposed to
|
|
547
548
|
* `enumerate`.
|
|
548
549
|
*
|
|
549
|
-
* `enumerate` runs
|
|
550
|
-
*
|
|
551
|
-
*
|
|
552
|
-
*
|
|
550
|
+
* In dispatcher mode, `enumerate` runs during `__complete` for the dependency
|
|
551
|
+
* values already typed by the user. In static mode, it runs once per
|
|
552
|
+
* cartesian-product combination at script-generation time (e.g. when the user
|
|
553
|
+
* runs `<program> completion zsh --static`). It must be a pure function of
|
|
554
|
+
* `deps`.
|
|
553
555
|
*/
|
|
554
556
|
interface ExpandCompletion {
|
|
555
557
|
dependsOn: readonly string[];
|
|
@@ -575,17 +577,17 @@ interface CustomCompletion {
|
|
|
575
577
|
/**
|
|
576
578
|
* In-process JS callback for dynamic completion. Receives parsed context
|
|
577
579
|
* (other arg values typed so far, previously supplied values for this same
|
|
578
|
-
* option) and returns candidates.
|
|
579
|
-
* `<program> __complete`
|
|
580
|
+
* option) and returns candidates. Dispatcher scripts call
|
|
581
|
+
* `<program> __complete` for every completion request; static scripts
|
|
582
|
+
* delegate to it whenever this is set.
|
|
580
583
|
*/
|
|
581
584
|
resolve?: DynamicCompletionResolver;
|
|
582
585
|
/**
|
|
583
|
-
*
|
|
584
|
-
*
|
|
585
|
-
*
|
|
586
|
-
* `dependsOn`
|
|
587
|
-
*
|
|
588
|
-
* those args — no Node process is spawned on TAB.
|
|
586
|
+
* Completion whose candidates depend on sibling arg values. Dispatcher
|
|
587
|
+
* scripts call `enumerate` inside `__complete` for the dependency values
|
|
588
|
+
* already typed on the command line. Static scripts pre-enumerate every
|
|
589
|
+
* combination of `dependsOn` values at script-generation time and dispatch
|
|
590
|
+
* via a shell lookup table.
|
|
589
591
|
*/
|
|
590
592
|
expand?: ExpandCompletion;
|
|
591
593
|
}
|
|
@@ -915,4 +917,4 @@ declare function arg<T extends z.ZodType>(schema: T): T;
|
|
|
915
917
|
declare function arg<T extends z.ZodType, M extends ArgMeta<z.output<T>>>(schema: T, meta: ValidateArgMeta<M, z.output<T>>): T;
|
|
916
918
|
//#endregion
|
|
917
919
|
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-
|
|
920
|
+
//# sourceMappingURL=arg-registry-BoqVZRFO.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arg-registry-BoqVZRFO.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,OAA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,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"}
|
|
@@ -462,9 +462,9 @@ type RunResult<T = unknown> = RunResultSuccess<T> | RunResultFailure;
|
|
|
462
462
|
* A `resolve` callback registered on `arg(...)` receives parsed context
|
|
463
463
|
* (other arg values typed so far, previous values supplied to the same
|
|
464
464
|
* option, the current word being completed, target shell) and returns
|
|
465
|
-
* candidates. The callback runs inside the `__complete` command
|
|
466
|
-
* shell scripts
|
|
467
|
-
* `resolve`.
|
|
465
|
+
* candidates. The callback runs inside the `__complete` command. Dispatcher
|
|
466
|
+
* shell scripts call `__complete` for every completion request; static shell
|
|
467
|
+
* scripts delegate to it for any spec that uses `resolve`.
|
|
468
468
|
*
|
|
469
469
|
* Defined under `core/` (not `completion/`) so `arg-registry.ts` can
|
|
470
470
|
* reference the resolver type without crossing the lint-enforced
|
|
@@ -514,14 +514,15 @@ type DynamicCompletionResolver = (ctx: DynamicCompletionContext) => DynamicCompl
|
|
|
514
514
|
//#endregion
|
|
515
515
|
//#region src/core/expand-completion-types.d.ts
|
|
516
516
|
/**
|
|
517
|
-
* Types for "expand" completion — candidates that
|
|
518
|
-
*
|
|
517
|
+
* Types for "expand" completion — candidates that depend on sibling arg
|
|
518
|
+
* values.
|
|
519
519
|
*
|
|
520
520
|
* The user provides `dependsOn` (sibling arg names that must have static
|
|
521
|
-
* `choices` or an enum schema) and `enumerate(deps)`.
|
|
522
|
-
*
|
|
523
|
-
*
|
|
524
|
-
*
|
|
521
|
+
* `choices` or an enum schema) and `enumerate(deps)`. Dispatcher scripts call
|
|
522
|
+
* `enumerate` inside `__complete` for the dependency values already typed on
|
|
523
|
+
* the command line. Static scripts walk the cartesian product of the
|
|
524
|
+
* dependsOn values, call `enumerate` for each combination, and emit a shell
|
|
525
|
+
* lookup table.
|
|
525
526
|
*
|
|
526
527
|
* Defined under `core/` (not `completion/`) so `arg-registry.ts` can
|
|
527
528
|
* reference these types without crossing the lint-enforced
|
|
@@ -546,10 +547,11 @@ interface ResolvedExpandCandidate {
|
|
|
546
547
|
* order of `dependsOn` is the order in which `deps` keys are exposed to
|
|
547
548
|
* `enumerate`.
|
|
548
549
|
*
|
|
549
|
-
* `enumerate` runs
|
|
550
|
-
*
|
|
551
|
-
*
|
|
552
|
-
*
|
|
550
|
+
* In dispatcher mode, `enumerate` runs during `__complete` for the dependency
|
|
551
|
+
* values already typed by the user. In static mode, it runs once per
|
|
552
|
+
* cartesian-product combination at script-generation time (e.g. when the user
|
|
553
|
+
* runs `<program> completion zsh --static`). It must be a pure function of
|
|
554
|
+
* `deps`.
|
|
553
555
|
*/
|
|
554
556
|
interface ExpandCompletion {
|
|
555
557
|
dependsOn: readonly string[];
|
|
@@ -575,17 +577,17 @@ interface CustomCompletion {
|
|
|
575
577
|
/**
|
|
576
578
|
* In-process JS callback for dynamic completion. Receives parsed context
|
|
577
579
|
* (other arg values typed so far, previously supplied values for this same
|
|
578
|
-
* option) and returns candidates.
|
|
579
|
-
* `<program> __complete`
|
|
580
|
+
* option) and returns candidates. Dispatcher scripts call
|
|
581
|
+
* `<program> __complete` for every completion request; static scripts
|
|
582
|
+
* delegate to it whenever this is set.
|
|
580
583
|
*/
|
|
581
584
|
resolve?: DynamicCompletionResolver;
|
|
582
585
|
/**
|
|
583
|
-
*
|
|
584
|
-
*
|
|
585
|
-
*
|
|
586
|
-
* `dependsOn`
|
|
587
|
-
*
|
|
588
|
-
* those args — no Node process is spawned on TAB.
|
|
586
|
+
* Completion whose candidates depend on sibling arg values. Dispatcher
|
|
587
|
+
* scripts call `enumerate` inside `__complete` for the dependency values
|
|
588
|
+
* already typed on the command line. Static scripts pre-enumerate every
|
|
589
|
+
* combination of `dependsOn` values at script-generation time and dispatch
|
|
590
|
+
* via a shell lookup table.
|
|
589
591
|
*/
|
|
590
592
|
expand?: ExpandCompletion;
|
|
591
593
|
}
|
|
@@ -915,4 +917,4 @@ declare function arg<T extends z.ZodType>(schema: T): T;
|
|
|
915
917
|
declare function arg<T extends z.ZodType, M extends ArgMeta<z.output<T>>>(schema: T, meta: ValidateArgMeta<M, z.output<T>>): T;
|
|
916
918
|
//#endregion
|
|
917
919
|
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
|
|
920
|
+
//# sourceMappingURL=arg-registry-BoqVZRFO.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arg-registry-BoqVZRFO.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","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AO,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"}
|
package/dist/augment.d.cts
CHANGED
package/dist/augment.d.ts
CHANGED
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-BloFWJEB.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
|
package/dist/cli.cjs.map
ADDED
|
@@ -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--Zn4KN9B.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
|
package/dist/cli.js.map
ADDED
|
@@ -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-
|
|
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
|
|
2
|
-
import { C as
|
|
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-BoqVZRFO.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-Ct48_myg.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-
|
|
2
|
-
import { C as
|
|
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-BoqVZRFO.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-Csk1VFou.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 };
|
package/dist/completion/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as
|
|
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 };
|