politty 0.6.0 → 0.8.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/dist/{arg-registry-BoqVZRFO.d.ts → arg-registry-DDJpsUea.d.cts} +24 -2
- package/dist/arg-registry-DDJpsUea.d.cts.map +1 -0
- package/dist/{arg-registry-BoqVZRFO.d.cts → arg-registry-DDJpsUea.d.ts} +24 -2
- package/dist/arg-registry-DDJpsUea.d.ts.map +1 -0
- package/dist/augment.d.cts +1 -1
- package/dist/augment.d.ts +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/completion/index.d.cts +2 -2
- package/dist/completion/index.d.ts +2 -2
- package/dist/docs/index.cjs +827 -43
- package/dist/docs/index.cjs.map +1 -1
- package/dist/docs/index.d.cts +45 -3
- package/dist/docs/index.d.cts.map +1 -1
- package/dist/docs/index.d.ts +45 -3
- package/dist/docs/index.d.ts.map +1 -1
- package/dist/docs/index.js +827 -43
- package/dist/docs/index.js.map +1 -1
- package/dist/{index-Csk1VFou.d.ts → index-DKGn3lIl.d.ts} +2 -2
- package/dist/{index-Csk1VFou.d.ts.map → index-DKGn3lIl.d.ts.map} +1 -1
- package/dist/{index-Ct48_myg.d.cts → index-WyViqW59.d.cts} +2 -2
- package/dist/{index-Ct48_myg.d.cts.map → index-WyViqW59.d.cts.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/prompt/clack/index.d.cts +1 -1
- package/dist/prompt/clack/index.d.ts +1 -1
- package/dist/prompt/index.d.cts +1 -1
- package/dist/prompt/index.d.ts +1 -1
- package/dist/prompt/inquirer/index.d.cts +1 -1
- package/dist/prompt/inquirer/index.d.ts +1 -1
- package/dist/{runner--Zn4KN9B.js → runner-D43SkHt5.js} +119 -18
- package/dist/runner-D43SkHt5.js.map +1 -0
- package/dist/{runner-BloFWJEB.cjs → runner-DvFvokV6.cjs} +119 -18
- package/dist/runner-DvFvokV6.cjs.map +1 -0
- package/package.json +6 -6
- package/dist/arg-registry-BoqVZRFO.d.cts.map +0 -1
- package/dist/arg-registry-BoqVZRFO.d.ts.map +0 -1
- package/dist/runner--Zn4KN9B.js.map +0 -1
- package/dist/runner-BloFWJEB.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as AnyCommand, d as ResolvedExpandCandidate, h as DynamicCompletionResolver,
|
|
1
|
+
import { J as ResolvedFieldMeta, _ as AnyCommand, d as ResolvedExpandCandidate, h as DynamicCompletionResolver, u as ExpandCompletion, v as ArgsSchema, x as Command } from "./arg-registry-DDJpsUea.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/completion/types.d.ts
|
|
@@ -660,4 +660,4 @@ interface WithCompletionOptions {
|
|
|
660
660
|
declare function withCompletionCommand<T extends AnyCommand>(command: T, options?: string | WithCompletionOptions): T;
|
|
661
661
|
//#endregion
|
|
662
662
|
export { BundledWorkerOptions as A, CandidateResult as C, CompletionContext as D, generateCandidates as E, CompletionMode as F, CompletionOptions as I, CompletionResult as L, CompletableSubcommand as M, CompletionData as N, CompletionType as O, CompletionGenerator as P, ShellType as R, hasCompleteCommand as S, CompletionDirective as T, extractCompletionData as _, detectShell as a, formatForShell as b, withCompletionCommand as c, GenerateBundledCompletionWorkerOptions as d, GenerateBundledCompletionWorkerResult as f, validateBundledWorkerFile as g, generateBundledCompletionWorker as h, createRefreshCompletionCommand as i, CompletableOption as j, parseCompletionContext as k, ValueCompletionField as l, defaultBundledWorkerOutputPath as m, createCompletionCommand as n, generateCompletion as o, bundledWorkerShellExtension as p, createCompletionWorkerPathCommand as r, getSupportedShells as s, WithCompletionOptions as t, resolveValueCompletion as u, extractPositionals as v, CompletionCandidate as w, createDynamicCompleteCommand as x, ShellFormatOptions as y };
|
|
663
|
-
//# sourceMappingURL=index-
|
|
663
|
+
//# sourceMappingURL=index-DKGn3lIl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-DKGn3lIl.d.ts","names":[],"sources":["../src/completion/types.ts","../src/completion/dynamic/context-parser.ts","../src/completion/dynamic/candidate-generator.ts","../src/completion/dynamic/complete-command.ts","../src/completion/dynamic/shell-formatter.ts","../src/completion/extractor.ts","../src/completion/bundled-worker.ts","../src/completion/value-completion-resolver.ts","../src/completion/index.ts"],"mappings":";;;;;;;;;;AAkBuD;AAMvD;UARiB,gBAAA;EAAA,SACN,GAAA;EAAA,SACA,UAAA,WAAqB,uBAAuB;AAAA;AAgBvD;;;AAAA,KAVY,SAAA;AAUc;AAQ1B;;;;;;;AAR0B,KAAd,cAAA;;;;;;;UAQK,oBAAA;EAUH;EARZ,QAAA;EAcgC;EAZhC,aAAA,GAAgB,OAAA,CAAQ,MAAA,CAAO,SAAA;EAcxB;;;;;EARP,YAAA;AAAA;;;;UAMe,iBAAA;EAef;EAbA,KAAA,EAAO,SAAA;EAeP;EAbA,WAAA;EAkBA;EAhBA,kBAAA;EAwBA;EAtBA,mBAAA;EA2BiB;;;;AAEmB;AAYtC;EAlCE,IAAA,GAAO,cAAA;;EAEP,gBAAA,GAAmB,UAAA;EAuEC;;;;EAlEpB,OAAA;EAoFsB;EAlFtB,cAAA;EA8BI;;;;;EAxBJ,QAAA;EA+B+E;;;;EA1B/E,YAAA;IAAiB,cAAA;EAAA;EAqCb;EAnCJ,aAAA,GAAgB,oBAAA;AAAA;;;;;;;;;;KAYN,eAAA;EA4CN,sBAzCA,IAAA,yDAmDA;EAjDA,OAAA,aAmDQ;EAjDR,YAAA;EACA,OAAA;EACA,SAAA;EACA,KAAA;AAAA;EAEoD,UAAA;EAAuB,OAAA;AAAA;EAiD3E,wDA/C6D,OAAA;EACzD,UAAA;AAAA;EAgDC,qDA3CL,IAAA;EACA,OAAA,EAAS,yBAAA;EACT,OAAA;EACA,YAAA;EACA,UAAA;EACA,O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,OAAA,QAAe,oBAAA,EAAsB,cAAA;;;;UA0BvB,qBAAA;ERjSA;EQmSf,WAAA;;EAEA,gBAAA,GAAmB,UAAA;ERnSnB;;;;;;EQ0SA,QAAA;ER1QA;EQ4QA,cAAA;ERxQA;EQ0QA,aAAA,GAAgB,oBAAoB;AAAA;;;ARtQH;AAMnC;;;;;;;;;;;;;AAcmC;AAMnC;;;iBQmQgB,qBAAA,WAAgC,UAAA,EAC9C,OAAA,EAAS,CAAA,EACT,OAAA,YAAmB,qBAAA,GAClB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as AnyCommand, d as ResolvedExpandCandidate, h as DynamicCompletionResolver,
|
|
1
|
+
import { J as ResolvedFieldMeta, _ as AnyCommand, d as ResolvedExpandCandidate, h as DynamicCompletionResolver, u as ExpandCompletion, v as ArgsSchema, x as Command } from "./arg-registry-DDJpsUea.cjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/completion/types.d.ts
|
|
@@ -660,4 +660,4 @@ interface WithCompletionOptions {
|
|
|
660
660
|
declare function withCompletionCommand<T extends AnyCommand>(command: T, options?: string | WithCompletionOptions): T;
|
|
661
661
|
//#endregion
|
|
662
662
|
export { BundledWorkerOptions as A, CandidateResult as C, CompletionContext as D, generateCandidates as E, CompletionMode as F, CompletionOptions as I, CompletionResult as L, CompletableSubcommand as M, CompletionData as N, CompletionType as O, CompletionGenerator as P, ShellType as R, hasCompleteCommand as S, CompletionDirective as T, extractCompletionData as _, detectShell as a, formatForShell as b, withCompletionCommand as c, GenerateBundledCompletionWorkerOptions as d, GenerateBundledCompletionWorkerResult as f, validateBundledWorkerFile as g, generateBundledCompletionWorker as h, createRefreshCompletionCommand as i, CompletableOption as j, parseCompletionContext as k, ValueCompletionField as l, defaultBundledWorkerOutputPath as m, createCompletionCommand as n, generateCompletion as o, bundledWorkerShellExtension as p, createCompletionWorkerPathCommand as r, getSupportedShells as s, WithCompletionOptions as t, resolveValueCompletion as u, extractPositionals as v, CompletionCandidate as w, createDynamicCompleteCommand as x, ShellFormatOptions as y };
|
|
663
|
-
//# sourceMappingURL=index-
|
|
663
|
+
//# sourceMappingURL=index-WyViqW59.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-WyViqW59.d.cts","names":[],"sources":["../src/completion/types.ts","../src/completion/dynamic/context-parser.ts","../src/completion/dynamic/candidate-generator.ts","../src/completion/dynamic/complete-command.ts","../src/completion/dynamic/shell-formatter.ts","../src/completion/extractor.ts","../src/completion/bundled-worker.ts","../src/completion/value-completion-resolver.ts","../src/completion/index.ts"],"mappings":";;;;;;;;;;AAkBuD;AAMvD;UARiB,gBAAA;EAAA,SACN,GAAA;EAAA,SACA,UAAA,WAAqB,uBAAuB;AAAA;AAgBvD;;;AAAA,KAVY,SAAA;AAUc;AAQ1B;;;;;;;AAR0B,KAAd,cAAA;;;;;;;UAQK,oBAAA;EAUH;EARZ,QAAA;EAcgC;EAZhC,aAAA,GAAgB,OAAA,CAAQ,MAAA,CAAO,SAAA;EAcxB;;;;;EARP,YAAA;AAAA;;;;UAMe,iBAAA;EAef;EAbA,KAAA,EAAO,SAAA;EAeP;EAbA,WAAA;EAkBA;EAhBA,kBAAA;EAwBA;EAtBA,mBAAA;EA2BiB;;;;AAEmB;AAYtC;EAlCE,IAAA,GAAO,cAAA;;EAEP,gBAAA,GAAmB,UAAA;EAuEC;;;;EAlEpB,OAAA;EAoFsB;EAlFtB,cAAA;EA8BI;;;;;EAxBJ,QAAA;EA+B+E;;;;EA1B/E,YAAA;IAAiB,cAAA;EAAA;EAqCb;EAnCJ,aAAA,GAAgB,oBAAA;AAAA;;;;;;;;;;KAYN,eAAA;EA4CN,sBAzCA,IAAA,yDAmDA;EAjDA,OAAA,aAmDQ;EAjDR,YAAA;EACA,OAAA;EACA,SAAA;EACA,KAAA;AAAA;EAEoD,UAAA;EAAuB,OAAA;AAAA;EA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,QAAe,iBAAA,EAAmB,WAAA;AAAA,iBAsBrB,iCAAA,CACd,WAAA,UACA,KAAA;EAAS,OAAA;EAAkB,aAAA,GAAgB,oBAAA;AAAA,IAE1C,OAAA,QAAe,oBAAA,EAAsB,cAAA;;;;UA0BvB,qBAAA;ERjSA;EQmSf,WAAA;;EAEA,gBAAA,GAAmB,UAAA;ERnSnB;;;;;;EQ0SA,QAAA;ER1QA;EQ4QA,cAAA;ERxQA;EQ0QA,aAAA,GAAgB,oBAAoB;AAAA;;;ARtQH;AAMnC;;;;;;;;;;;;;AAcmC;AAMnC;;;iBQmQgB,qBAAA,WAAgC,UAAA,EAC9C,OAAA,EAAS,CAAA,EACT,OAAA,YAAmB,qBAAA,GAClB,CAAA"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_schema_extractor = require('./schema-extractor-BxSRwLrx.cjs');
|
|
3
3
|
const require_completion = require('./completion-CLHO3Xaz.cjs');
|
|
4
|
-
const require_runner = require('./runner-
|
|
4
|
+
const require_runner = require('./runner-DvFvokV6.cjs');
|
|
5
5
|
|
|
6
6
|
exports.CaseVariantCollisionError = require_runner.CaseVariantCollisionError;
|
|
7
7
|
exports.DuplicateAliasError = require_runner.DuplicateAliasError;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as LogStream, B as SetupContext, C as Example, D as IsEmpty, E as GlobalSetupContext, F as RunCommandOptions, G as
|
|
2
|
-
import { I as CompletionOptions, L as CompletionResult, c as withCompletionCommand, d as GenerateBundledCompletionWorkerOptions, f as GenerateBundledCompletionWorkerResult, h as generateBundledCompletionWorker, o as generateCompletion, t as WithCompletionOptions } from "./index-
|
|
1
|
+
import { $ as toKebabCase, A as LogStream, B as SetupContext, C as Example, D as IsEmpty, E as GlobalSetupContext, F as RunCommandOptions, G as isLazyCommand, H as SubCommandsRecord, I as RunResult, J as ResolvedFieldMeta, K as lazy, L as RunResultFailure, M as MainOptions, N as NonRunnableCommand, O as LogEntry, P as PromptResolver, Q as toCamelCase, R as RunResultSuccess, S as CommandBase, T as GlobalCleanupContext, U as UnknownSubcommandHandler, V as SubCommandValue, W as LazyCommand, X as extractFields, Y as UnknownKeysMode, Z as getUnknownKeysMode, _ as AnyCommand, a as EffectContext, b as CollectedLogs, c as arg, d as ResolvedExpandCandidate, f as CompletionDirectiveMask, g as DynamicCompletionResult, h as DynamicCompletionResolver, i as CustomCompletion, j as Logger, k as LogLevel, l as ExpandCandidate, m as DynamicCompletionContext, n as CompletionMeta, o as PromptMeta, p as DynamicCompletionCandidate, q as ExtractedFields, r as CompletionType, s as PromptType, t as ArgMeta, u as ExpandCompletion, v as ArgsSchema, w as GlobalArgs, x as Command, y as CleanupContext, z as RunnableCommand } from "./arg-registry-DDJpsUea.cjs";
|
|
2
|
+
import { I as CompletionOptions, L as CompletionResult, c as withCompletionCommand, d as GenerateBundledCompletionWorkerOptions, f as GenerateBundledCompletionWorkerResult, h as generateBundledCompletionWorker, o as generateCompletion, t as WithCompletionOptions } from "./index-WyViqW59.cjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/core/case-types.d.ts
|
|
@@ -681,5 +681,5 @@ type ValidationResult<T> = {
|
|
|
681
681
|
*/
|
|
682
682
|
declare function formatValidationErrors(errors: ValidationError[]): string;
|
|
683
683
|
//#endregion
|
|
684
|
-
export { type AnyCommand, type ArgMeta, type ArgsSchema, type BuiltinOptionDescriptions, type CamelCase, CaseVariantCollisionError, type CleanupContext, type CollectedLogs, type Command, type CommandBase, type CommandContext, type CommandValidationError, type CommandValidationResult, type CompletionDirectiveMask, type CompletionMeta, type CompletionOptions, type CompletionResult, type CompletionType, type CustomCompletion, DuplicateAliasError, DuplicateFieldError, DuplicateNegationError, type DynamicCompletionCandidate, type DynamicCompletionContext, type DynamicCompletionResolver, type DynamicCompletionResult, type EffectContext, type Example, type ExpandCandidate, type ExpandCompletion, type ExtractedFields, type GenerateBundledCompletionWorkerOptions, type GenerateBundledCompletionWorkerResult, type GlobalArgs, type GlobalCleanupContext, type GlobalSetupContext, type HelpOptions, type KebabCase, type LazyCommand, type LogEntry, type LogLevel, type LogStream, type Logger, type MainOptions, type MergedArgs, type NonRunnableCommand, type ParsedArgv, type ParserOptions, PositionalConfigError, type PromptMeta, type PromptResolver, type PromptType, ReservedAliasError, type ResolvedExpandCandidate, type ResolvedFieldMeta, type RunCommandOptions, type RunResult, type RunResultFailure, type RunResultSuccess, type RunnableCommand, type SetupContext, type SubCommandValue, type SubCommandsRecord, type UnknownKeysMode, type ValidationError, type ValidationResult, type WithCaseVariants, type WithCompletionOptions, arg, createDefineCommand, createDualCaseProxy, defineCommand, extractFields, formatCommandValidationErrors, formatValidationErrors, generateBundledCompletionWorker, generateCompletion, generateHelp, getUnknownKeysMode, isColorEnabled, isLazyCommand, lazy, logger, parseArgv, renderInline, renderMarkdown, runCommand, runMain, setColorEnabled, styles, symbols, toCamelCase, toKebabCase, validateCaseVariantCollisions, validateCommand, validateCrossSchemaCollisions, validateDuplicateAliases, validateDuplicateFields, validateDuplicateNegations, validatePositionalConfig, validateReservedAliases, withCompletionCommand };
|
|
684
|
+
export { type AnyCommand, type ArgMeta, type ArgsSchema, type BuiltinOptionDescriptions, type CamelCase, CaseVariantCollisionError, type CleanupContext, type CollectedLogs, type Command, type CommandBase, type CommandContext, type CommandValidationError, type CommandValidationResult, type CompletionDirectiveMask, type CompletionMeta, type CompletionOptions, type CompletionResult, type CompletionType, type CustomCompletion, DuplicateAliasError, DuplicateFieldError, DuplicateNegationError, type DynamicCompletionCandidate, type DynamicCompletionContext, type DynamicCompletionResolver, type DynamicCompletionResult, type EffectContext, type Example, type ExpandCandidate, type ExpandCompletion, type ExtractedFields, type GenerateBundledCompletionWorkerOptions, type GenerateBundledCompletionWorkerResult, type GlobalArgs, type GlobalCleanupContext, type GlobalSetupContext, type HelpOptions, type KebabCase, type LazyCommand, type LogEntry, type LogLevel, type LogStream, type Logger, type MainOptions, type MergedArgs, type NonRunnableCommand, type ParsedArgv, type ParserOptions, PositionalConfigError, type PromptMeta, type PromptResolver, type PromptType, ReservedAliasError, type ResolvedExpandCandidate, type ResolvedFieldMeta, type RunCommandOptions, type RunResult, type RunResultFailure, type RunResultSuccess, type RunnableCommand, type SetupContext, type SubCommandValue, type SubCommandsRecord, type UnknownKeysMode, type UnknownSubcommandHandler, type ValidationError, type ValidationResult, type WithCaseVariants, type WithCompletionOptions, arg, createDefineCommand, createDualCaseProxy, defineCommand, extractFields, formatCommandValidationErrors, formatValidationErrors, generateBundledCompletionWorker, generateCompletion, generateHelp, getUnknownKeysMode, isColorEnabled, isLazyCommand, lazy, logger, parseArgv, renderInline, renderMarkdown, runCommand, runMain, setColorEnabled, styles, symbols, toCamelCase, toKebabCase, validateCaseVariantCollisions, validateCommand, validateCrossSchemaCollisions, validateDuplicateAliases, validateDuplicateFields, validateDuplicateNegations, validatePositionalConfig, validateReservedAliases, withCompletionCommand };
|
|
685
685
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as LogStream, B as SetupContext, C as Example, D as IsEmpty, E as GlobalSetupContext, F as RunCommandOptions, G as
|
|
2
|
-
import { I as CompletionOptions, L as CompletionResult, c as withCompletionCommand, d as GenerateBundledCompletionWorkerOptions, f as GenerateBundledCompletionWorkerResult, h as generateBundledCompletionWorker, o as generateCompletion, t as WithCompletionOptions } from "./index-
|
|
1
|
+
import { $ as toKebabCase, A as LogStream, B as SetupContext, C as Example, D as IsEmpty, E as GlobalSetupContext, F as RunCommandOptions, G as isLazyCommand, H as SubCommandsRecord, I as RunResult, J as ResolvedFieldMeta, K as lazy, L as RunResultFailure, M as MainOptions, N as NonRunnableCommand, O as LogEntry, P as PromptResolver, Q as toCamelCase, R as RunResultSuccess, S as CommandBase, T as GlobalCleanupContext, U as UnknownSubcommandHandler, V as SubCommandValue, W as LazyCommand, X as extractFields, Y as UnknownKeysMode, Z as getUnknownKeysMode, _ as AnyCommand, a as EffectContext, b as CollectedLogs, c as arg, d as ResolvedExpandCandidate, f as CompletionDirectiveMask, g as DynamicCompletionResult, h as DynamicCompletionResolver, i as CustomCompletion, j as Logger, k as LogLevel, l as ExpandCandidate, m as DynamicCompletionContext, n as CompletionMeta, o as PromptMeta, p as DynamicCompletionCandidate, q as ExtractedFields, r as CompletionType, s as PromptType, t as ArgMeta, u as ExpandCompletion, v as ArgsSchema, w as GlobalArgs, x as Command, y as CleanupContext, z as RunnableCommand } from "./arg-registry-DDJpsUea.js";
|
|
2
|
+
import { I as CompletionOptions, L as CompletionResult, c as withCompletionCommand, d as GenerateBundledCompletionWorkerOptions, f as GenerateBundledCompletionWorkerResult, h as generateBundledCompletionWorker, o as generateCompletion, t as WithCompletionOptions } from "./index-DKGn3lIl.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/core/case-types.d.ts
|
|
@@ -681,5 +681,5 @@ type ValidationResult<T> = {
|
|
|
681
681
|
*/
|
|
682
682
|
declare function formatValidationErrors(errors: ValidationError[]): string;
|
|
683
683
|
//#endregion
|
|
684
|
-
export { type AnyCommand, type ArgMeta, type ArgsSchema, type BuiltinOptionDescriptions, type CamelCase, CaseVariantCollisionError, type CleanupContext, type CollectedLogs, type Command, type CommandBase, type CommandContext, type CommandValidationError, type CommandValidationResult, type CompletionDirectiveMask, type CompletionMeta, type CompletionOptions, type CompletionResult, type CompletionType, type CustomCompletion, DuplicateAliasError, DuplicateFieldError, DuplicateNegationError, type DynamicCompletionCandidate, type DynamicCompletionContext, type DynamicCompletionResolver, type DynamicCompletionResult, type EffectContext, type Example, type ExpandCandidate, type ExpandCompletion, type ExtractedFields, type GenerateBundledCompletionWorkerOptions, type GenerateBundledCompletionWorkerResult, type GlobalArgs, type GlobalCleanupContext, type GlobalSetupContext, type HelpOptions, type KebabCase, type LazyCommand, type LogEntry, type LogLevel, type LogStream, type Logger, type MainOptions, type MergedArgs, type NonRunnableCommand, type ParsedArgv, type ParserOptions, PositionalConfigError, type PromptMeta, type PromptResolver, type PromptType, ReservedAliasError, type ResolvedExpandCandidate, type ResolvedFieldMeta, type RunCommandOptions, type RunResult, type RunResultFailure, type RunResultSuccess, type RunnableCommand, type SetupContext, type SubCommandValue, type SubCommandsRecord, type UnknownKeysMode, type ValidationError, type ValidationResult, type WithCaseVariants, type WithCompletionOptions, arg, createDefineCommand, createDualCaseProxy, defineCommand, extractFields, formatCommandValidationErrors, formatValidationErrors, generateBundledCompletionWorker, generateCompletion, generateHelp, getUnknownKeysMode, isColorEnabled, isLazyCommand, lazy, logger, parseArgv, renderInline, renderMarkdown, runCommand, runMain, setColorEnabled, styles, symbols, toCamelCase, toKebabCase, validateCaseVariantCollisions, validateCommand, validateCrossSchemaCollisions, validateDuplicateAliases, validateDuplicateFields, validateDuplicateNegations, validatePositionalConfig, validateReservedAliases, withCompletionCommand };
|
|
684
|
+
export { type AnyCommand, type ArgMeta, type ArgsSchema, type BuiltinOptionDescriptions, type CamelCase, CaseVariantCollisionError, type CleanupContext, type CollectedLogs, type Command, type CommandBase, type CommandContext, type CommandValidationError, type CommandValidationResult, type CompletionDirectiveMask, type CompletionMeta, type CompletionOptions, type CompletionResult, type CompletionType, type CustomCompletion, DuplicateAliasError, DuplicateFieldError, DuplicateNegationError, type DynamicCompletionCandidate, type DynamicCompletionContext, type DynamicCompletionResolver, type DynamicCompletionResult, type EffectContext, type Example, type ExpandCandidate, type ExpandCompletion, type ExtractedFields, type GenerateBundledCompletionWorkerOptions, type GenerateBundledCompletionWorkerResult, type GlobalArgs, type GlobalCleanupContext, type GlobalSetupContext, type HelpOptions, type KebabCase, type LazyCommand, type LogEntry, type LogLevel, type LogStream, type Logger, type MainOptions, type MergedArgs, type NonRunnableCommand, type ParsedArgv, type ParserOptions, PositionalConfigError, type PromptMeta, type PromptResolver, type PromptType, ReservedAliasError, type ResolvedExpandCandidate, type ResolvedFieldMeta, type RunCommandOptions, type RunResult, type RunResultFailure, type RunResultSuccess, type RunnableCommand, type SetupContext, type SubCommandValue, type SubCommandsRecord, type UnknownKeysMode, type UnknownSubcommandHandler, type ValidationError, type ValidationResult, type WithCaseVariants, type WithCompletionOptions, arg, createDefineCommand, createDualCaseProxy, defineCommand, extractFields, formatCommandValidationErrors, formatValidationErrors, generateBundledCompletionWorker, generateCompletion, generateHelp, getUnknownKeysMode, isColorEnabled, isLazyCommand, lazy, logger, parseArgv, renderInline, renderMarkdown, runCommand, runMain, setColorEnabled, styles, symbols, toCamelCase, toKebabCase, validateCaseVariantCollisions, validateCommand, validateCrossSchemaCollisions, validateDuplicateAliases, validateDuplicateFields, validateDuplicateNegations, validatePositionalConfig, validateReservedAliases, withCompletionCommand };
|
|
685
685
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as renderMarkdown, D as styles, E as setColorEnabled, O as symbols, S as renderInline, T as logger, _ as DuplicateFieldError, a as parseArgv, b as ReservedAliasError, c as validateCommand, d as validateDuplicateFields, f as validateDuplicateNegations, g as DuplicateAliasError, h as CaseVariantCollisionError, i as formatValidationErrors, k as createDualCaseProxy, l as validateCrossSchemaCollisions, m as validateReservedAliases, n as runMain, o as formatCommandValidationErrors, p as validatePositionalConfig, s as validateCaseVariantCollisions, t as runCommand, u as validateDuplicateAliases, v as DuplicateNegationError, w as isColorEnabled, x as generateHelp, y as PositionalConfigError } from "./runner
|
|
1
|
+
import { C as renderMarkdown, D as styles, E as setColorEnabled, O as symbols, S as renderInline, T as logger, _ as DuplicateFieldError, a as parseArgv, b as ReservedAliasError, c as validateCommand, d as validateDuplicateFields, f as validateDuplicateNegations, g as DuplicateAliasError, h as CaseVariantCollisionError, i as formatValidationErrors, k as createDualCaseProxy, l as validateCrossSchemaCollisions, m as validateReservedAliases, n as runMain, o as formatCommandValidationErrors, p as validatePositionalConfig, s as validateCaseVariantCollisions, t as runCommand, u as validateDuplicateAliases, v as DuplicateNegationError, w as isColorEnabled, x as generateHelp, y as PositionalConfigError } from "./runner-D43SkHt5.js";
|
|
2
2
|
import { a as toCamelCase, f as isLazyCommand, h as arg, i as getUnknownKeysMode, o as toKebabCase, p as lazy, t as extractFields } from "./schema-extractor-Dqe7_kyQ.js";
|
|
3
3
|
import { S as defineCommand, a as generateCompletion, p as generateBundledCompletionWorker, s as withCompletionCommand, x as createDefineCommand } from "./completion-DHnVx9Zk.js";
|
|
4
4
|
|
package/dist/prompt/index.d.cts
CHANGED
package/dist/prompt/index.d.ts
CHANGED
|
@@ -1848,28 +1848,61 @@ const BUILTIN_FLAGS = new Set([
|
|
|
1848
1848
|
"--version"
|
|
1849
1849
|
]);
|
|
1850
1850
|
/**
|
|
1851
|
-
* Find the first positional argument in argv, properly skipping
|
|
1852
|
-
*
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1851
|
+
* Find the index of the first positional argument in argv, properly skipping
|
|
1852
|
+
* global flag values. Returns -1 when no positional is present.
|
|
1853
|
+
*
|
|
1854
|
+
* Mirrors `scanForSubcommand`'s conservative stop conditions: the scan stops
|
|
1855
|
+
* (returning -1) on a `--` terminator, a builtin flag (`--help`/`--version`),
|
|
1856
|
+
* an unknown long flag, or an unknown/combined short flag. Past such tokens we
|
|
1857
|
+
* can't tell a flag *value* from a positional, so continuing would misclassify
|
|
1858
|
+
* e.g. `--help plugin` or `--unknown value` and wrongly trip plugin dispatch.
|
|
1859
|
+
*
|
|
1860
|
+
* Without globalExtracted, no flag is global, so any leading flag halts the
|
|
1861
|
+
* scan and a positional is only found when it precedes every flag.
|
|
1862
|
+
*/
|
|
1863
|
+
function findFirstPositionalIndex(argv, globalExtracted) {
|
|
1864
|
+
const lookup = globalExtracted ? buildGlobalFlagLookup(globalExtracted) : {
|
|
1865
|
+
aliasMap: /* @__PURE__ */ new Map(),
|
|
1866
|
+
booleanFlags: /* @__PURE__ */ new Set(),
|
|
1867
|
+
flagNames: /* @__PURE__ */ new Set(),
|
|
1868
|
+
cliNames: /* @__PURE__ */ new Set(),
|
|
1869
|
+
aliases: /* @__PURE__ */ new Set(),
|
|
1870
|
+
negationMap: /* @__PURE__ */ new Map(),
|
|
1871
|
+
customNegatedFields: /* @__PURE__ */ new Set()
|
|
1872
|
+
};
|
|
1857
1873
|
for (let i = 0; i < argv.length; i++) {
|
|
1858
1874
|
const arg = argv[i];
|
|
1859
|
-
if (!arg.startsWith("-")) return
|
|
1860
|
-
if (arg === "--") return
|
|
1875
|
+
if (!arg.startsWith("-")) return i;
|
|
1876
|
+
if (arg === "--" || BUILTIN_FLAGS.has(arg)) return -1;
|
|
1861
1877
|
if (arg.startsWith("--")) {
|
|
1862
|
-
const { resolvedName, isNegated, isGlobal } = resolveGlobalLongOption(arg, lookup);
|
|
1863
|
-
if (isGlobal
|
|
1864
|
-
|
|
1878
|
+
const { resolvedName, isNegated, isGlobal, isSuppressedNegation } = resolveGlobalLongOption(arg, lookup);
|
|
1879
|
+
if (isGlobal) {
|
|
1880
|
+
if (shouldConsumeValue(arg, resolvedName, isNegated, argv[i + 1], lookup.booleanFlags)) i++;
|
|
1881
|
+
continue;
|
|
1882
|
+
}
|
|
1883
|
+
if (isSuppressedNegation) continue;
|
|
1884
|
+
return -1;
|
|
1865
1885
|
}
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1886
|
+
const withoutDash = arg.includes("=") ? arg.slice(1, arg.indexOf("=")) : arg.slice(1);
|
|
1887
|
+
if (withoutDash.length === 1) {
|
|
1888
|
+
const resolvedName = lookup.aliasMap.get(withoutDash) ?? withoutDash;
|
|
1889
|
+
if (lookup.aliases.has(withoutDash) || lookup.flagNames.has(resolvedName)) {
|
|
1890
|
+
if (shouldConsumeValue(arg, resolvedName, false, argv[i + 1], lookup.booleanFlags)) i++;
|
|
1891
|
+
continue;
|
|
1870
1892
|
}
|
|
1871
1893
|
}
|
|
1894
|
+
return -1;
|
|
1872
1895
|
}
|
|
1896
|
+
return -1;
|
|
1897
|
+
}
|
|
1898
|
+
/**
|
|
1899
|
+
* Find the first positional argument in argv, properly skipping global flag
|
|
1900
|
+
* values. Thin wrapper over {@link findFirstPositionalIndex} — see that
|
|
1901
|
+
* function for the scan and stop conditions. Returns `undefined` when none.
|
|
1902
|
+
*/
|
|
1903
|
+
function findFirstPositional(argv, globalExtracted) {
|
|
1904
|
+
const index = findFirstPositionalIndex(argv, globalExtracted);
|
|
1905
|
+
return index >= 0 ? argv[index] : void 0;
|
|
1873
1906
|
}
|
|
1874
1907
|
|
|
1875
1908
|
//#endregion
|
|
@@ -2331,6 +2364,25 @@ async function runMain(command, options = {}) {
|
|
|
2331
2364
|
effectiveOptions = rest;
|
|
2332
2365
|
}
|
|
2333
2366
|
const globalExtracted = extractAndValidateGlobal(effectiveOptions);
|
|
2367
|
+
if (effectiveOptions.onUnknownSubcommand && !isInternalSubcommandInvocation(command, argv, globalExtractedForBypass)) {
|
|
2368
|
+
const knownSubCommands = listSubCommandNamesWithAliases(command);
|
|
2369
|
+
if (knownSubCommands.size > 0) {
|
|
2370
|
+
const positionalIndex = findFirstPositionalIndex(argv, globalExtracted);
|
|
2371
|
+
const name = positionalIndex >= 0 ? argv[positionalIndex] : void 0;
|
|
2372
|
+
if (name && !knownSubCommands.has(name)) {
|
|
2373
|
+
const forwardArgs = argv.slice(positionalIndex + 1);
|
|
2374
|
+
const exitCode = await effectiveOptions.onUnknownSubcommand({
|
|
2375
|
+
commandPath: [],
|
|
2376
|
+
name,
|
|
2377
|
+
args: forwardArgs
|
|
2378
|
+
});
|
|
2379
|
+
if (typeof exitCode === "number") {
|
|
2380
|
+
await flushStandardStreams();
|
|
2381
|
+
return process.exit(exitCode);
|
|
2382
|
+
}
|
|
2383
|
+
}
|
|
2384
|
+
}
|
|
2385
|
+
}
|
|
2334
2386
|
if (effectiveOptions.setup) try {
|
|
2335
2387
|
await effectiveOptions.setup({});
|
|
2336
2388
|
} catch (e) {
|
|
@@ -2348,6 +2400,7 @@ async function runMain(command, options = {}) {
|
|
|
2348
2400
|
logger: effectiveOptions.logger,
|
|
2349
2401
|
globalArgs: effectiveOptions.globalArgs,
|
|
2350
2402
|
prompt: effectiveOptions.prompt,
|
|
2403
|
+
onUnknownSubcommand: effectiveOptions.onUnknownSubcommand,
|
|
2351
2404
|
_globalExtracted: globalExtracted,
|
|
2352
2405
|
_globalCleanup: effectiveOptions.cleanup,
|
|
2353
2406
|
_context: {
|
|
@@ -2364,11 +2417,22 @@ async function runMain(command, options = {}) {
|
|
|
2364
2417
|
await effectiveOptions.cleanup(cleanupCtx);
|
|
2365
2418
|
} catch {}
|
|
2366
2419
|
}
|
|
2367
|
-
|
|
2368
|
-
if (process.stderr.writableLength > 0) await new Promise((resolve) => process.stderr.once("drain", resolve));
|
|
2420
|
+
await flushStandardStreams();
|
|
2369
2421
|
process.exit(result.exitCode);
|
|
2370
2422
|
}
|
|
2371
2423
|
/**
|
|
2424
|
+
* Flush stdout/stderr before exit to prevent truncated output when piped
|
|
2425
|
+
* (pipe writes are buffered asynchronously, so exiting early loses data).
|
|
2426
|
+
*
|
|
2427
|
+
* We await a zero-byte write's callback rather than a `drain` event: `drain`
|
|
2428
|
+
* only fires after a `write()` returned `false` (backpressure), so buffered
|
|
2429
|
+
* writes that never tripped it would hang. The write callback is ordered after
|
|
2430
|
+
* all pending writes, so it resolves once the buffer is flushed.
|
|
2431
|
+
*/
|
|
2432
|
+
async function flushStandardStreams() {
|
|
2433
|
+
await Promise.all([process.stdout, process.stderr].map((stream) => stream.writableLength > 0 ? new Promise((resolve) => stream.write("", () => resolve())) : Promise.resolve()));
|
|
2434
|
+
}
|
|
2435
|
+
/**
|
|
2372
2436
|
* Internal implementation of command running
|
|
2373
2437
|
*/
|
|
2374
2438
|
async function runCommandInternal(command, argv, options = {}) {
|
|
@@ -2392,6 +2456,43 @@ async function runCommandInternal(command, argv, options = {}) {
|
|
|
2392
2456
|
...options._parsedGlobalArgs,
|
|
2393
2457
|
...parseResult.rawGlobalArgs
|
|
2394
2458
|
};
|
|
2459
|
+
const nestedCommandPath = context.commandPath ?? [];
|
|
2460
|
+
if (options.onUnknownSubcommand && nestedCommandPath.length > 0) {
|
|
2461
|
+
const knownSubCommands = listSubCommandNamesWithAliases(command);
|
|
2462
|
+
if (knownSubCommands.size > 0) {
|
|
2463
|
+
const positionalIndex = findFirstPositionalIndex(argv, options._globalExtracted);
|
|
2464
|
+
const name = positionalIndex >= 0 ? argv[positionalIndex] : void 0;
|
|
2465
|
+
if (name && !knownSubCommands.has(name)) {
|
|
2466
|
+
const forwardArgs = argv.slice(positionalIndex + 1);
|
|
2467
|
+
const exitCode = await options.onUnknownSubcommand({
|
|
2468
|
+
commandPath: nestedCommandPath,
|
|
2469
|
+
name,
|
|
2470
|
+
args: forwardArgs
|
|
2471
|
+
});
|
|
2472
|
+
if (typeof exitCode === "number") {
|
|
2473
|
+
collector?.stop();
|
|
2474
|
+
if (options.handleSignals) {
|
|
2475
|
+
if (options._globalCleanup) try {
|
|
2476
|
+
await options._globalCleanup({ error: void 0 });
|
|
2477
|
+
} catch {}
|
|
2478
|
+
await flushStandardStreams();
|
|
2479
|
+
process.exit(exitCode);
|
|
2480
|
+
}
|
|
2481
|
+
return exitCode === 0 ? {
|
|
2482
|
+
success: true,
|
|
2483
|
+
result: void 0,
|
|
2484
|
+
exitCode: 0,
|
|
2485
|
+
logs: getCurrentLogs()
|
|
2486
|
+
} : {
|
|
2487
|
+
success: false,
|
|
2488
|
+
error: /* @__PURE__ */ new Error(`Plugin "${[...nestedCommandPath, name].join(" ")}" exited with code ${exitCode}`),
|
|
2489
|
+
exitCode,
|
|
2490
|
+
logs: getCurrentLogs()
|
|
2491
|
+
};
|
|
2492
|
+
}
|
|
2493
|
+
}
|
|
2494
|
+
}
|
|
2495
|
+
}
|
|
2395
2496
|
if (parseResult.helpRequested || parseResult.helpAllRequested) {
|
|
2396
2497
|
let hasUnknownSubcommand = false;
|
|
2397
2498
|
const subCmdNames = listSubCommands(command);
|
|
@@ -2604,4 +2705,4 @@ function extractAndValidateGlobal(options) {
|
|
|
2604
2705
|
|
|
2605
2706
|
//#endregion
|
|
2606
2707
|
export { renderMarkdown as C, styles as D, setColorEnabled as E, symbols as O, renderInline as S, logger as T, DuplicateFieldError as _, parseArgv as a, ReservedAliasError as b, validateCommand as c, validateDuplicateFields as d, validateDuplicateNegations as f, DuplicateAliasError as g, CaseVariantCollisionError as h, formatValidationErrors as i, createDualCaseProxy as k, validateCrossSchemaCollisions as l, validateReservedAliases as m, runMain as n, formatCommandValidationErrors as o, validatePositionalConfig as p, runner_exports as r, validateCaseVariantCollisions as s, runCommand as t, validateDuplicateAliases as u, DuplicateNegationError as v, isColorEnabled as w, generateHelp as x, PositionalConfigError as y };
|
|
2607
|
-
//# sourceMappingURL=runner
|
|
2708
|
+
//# sourceMappingURL=runner-D43SkHt5.js.map
|