@optique/core 0.10.0-dev.311 → 0.10.0-dev.312
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/facade.cjs +0 -14
- package/dist/facade.d.cts +2 -14
- package/dist/facade.d.ts +2 -14
- package/dist/facade.js +1 -13
- package/dist/index.cjs +0 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/facade.cjs
CHANGED
|
@@ -613,13 +613,6 @@ function runParserAsync(parser, programName, args, options) {
|
|
|
613
613
|
return Promise.resolve(result);
|
|
614
614
|
}
|
|
615
615
|
/**
|
|
616
|
-
* @deprecated Use `runParser()` instead. This export will be removed in
|
|
617
|
-
* a future major version. The name `run` conflicts with
|
|
618
|
-
* `@optique/run`'s `run()` function, causing IDE autocomplete
|
|
619
|
-
* confusion.
|
|
620
|
-
*/
|
|
621
|
-
const run = runParser;
|
|
622
|
-
/**
|
|
623
616
|
* An error class used to indicate that the command line arguments
|
|
624
617
|
* could not be parsed successfully.
|
|
625
618
|
*/
|
|
@@ -629,19 +622,12 @@ var RunParserError = class extends Error {
|
|
|
629
622
|
this.name = "RunParserError";
|
|
630
623
|
}
|
|
631
624
|
};
|
|
632
|
-
/**
|
|
633
|
-
* @deprecated Use `RunParserError` instead. This export will be removed in
|
|
634
|
-
* a future major version.
|
|
635
|
-
*/
|
|
636
|
-
const RunError = RunParserError;
|
|
637
625
|
function indentLines(text$1, indent) {
|
|
638
626
|
return text$1.split("\n").join("\n" + " ".repeat(indent));
|
|
639
627
|
}
|
|
640
628
|
|
|
641
629
|
//#endregion
|
|
642
|
-
exports.RunError = RunError;
|
|
643
630
|
exports.RunParserError = RunParserError;
|
|
644
|
-
exports.run = run;
|
|
645
631
|
exports.runParser = runParser;
|
|
646
632
|
exports.runParserAsync = runParserAsync;
|
|
647
633
|
exports.runParserSync = runParserSync;
|
package/dist/facade.d.cts
CHANGED
|
@@ -148,7 +148,7 @@ interface RunOptions<THelp, TError> {
|
|
|
148
148
|
*
|
|
149
149
|
* You usually want to pass `process.exit` on Node.js or Bun and `Deno.exit`
|
|
150
150
|
* on Deno to this option.
|
|
151
|
-
* @default Throws a {@link
|
|
151
|
+
* @default Throws a {@link RunParserError}.
|
|
152
152
|
*/
|
|
153
153
|
readonly onError?: (() => TError) | ((exitCode: number) => TError);
|
|
154
154
|
/**
|
|
@@ -253,13 +253,6 @@ declare function runParserSync<TParser extends Parser<"sync", unknown, unknown>,
|
|
|
253
253
|
* @since 0.9.0
|
|
254
254
|
*/
|
|
255
255
|
declare function runParserAsync<TParser extends Parser<Mode, unknown, unknown>, THelp = void, TError = never>(parser: TParser, programName: string, args: readonly string[], options?: RunOptions<THelp, TError>): Promise<InferValue<TParser>>;
|
|
256
|
-
/**
|
|
257
|
-
* @deprecated Use `runParser()` instead. This export will be removed in
|
|
258
|
-
* a future major version. The name `run` conflicts with
|
|
259
|
-
* `@optique/run`'s `run()` function, causing IDE autocomplete
|
|
260
|
-
* confusion.
|
|
261
|
-
*/
|
|
262
|
-
declare const run: typeof runParser;
|
|
263
256
|
/**
|
|
264
257
|
* An error class used to indicate that the command line arguments
|
|
265
258
|
* could not be parsed successfully.
|
|
@@ -267,10 +260,5 @@ declare const run: typeof runParser;
|
|
|
267
260
|
declare class RunParserError extends Error {
|
|
268
261
|
constructor(message: string);
|
|
269
262
|
}
|
|
270
|
-
/**
|
|
271
|
-
* @deprecated Use `RunParserError` instead. This export will be removed in
|
|
272
|
-
* a future major version.
|
|
273
|
-
*/
|
|
274
|
-
declare const RunError: typeof RunParserError;
|
|
275
263
|
//#endregion
|
|
276
|
-
export {
|
|
264
|
+
export { RunOptions, RunParserError, runParser, runParserAsync, runParserSync };
|
package/dist/facade.d.ts
CHANGED
|
@@ -148,7 +148,7 @@ interface RunOptions<THelp, TError> {
|
|
|
148
148
|
*
|
|
149
149
|
* You usually want to pass `process.exit` on Node.js or Bun and `Deno.exit`
|
|
150
150
|
* on Deno to this option.
|
|
151
|
-
* @default Throws a {@link
|
|
151
|
+
* @default Throws a {@link RunParserError}.
|
|
152
152
|
*/
|
|
153
153
|
readonly onError?: (() => TError) | ((exitCode: number) => TError);
|
|
154
154
|
/**
|
|
@@ -253,13 +253,6 @@ declare function runParserSync<TParser extends Parser<"sync", unknown, unknown>,
|
|
|
253
253
|
* @since 0.9.0
|
|
254
254
|
*/
|
|
255
255
|
declare function runParserAsync<TParser extends Parser<Mode, unknown, unknown>, THelp = void, TError = never>(parser: TParser, programName: string, args: readonly string[], options?: RunOptions<THelp, TError>): Promise<InferValue<TParser>>;
|
|
256
|
-
/**
|
|
257
|
-
* @deprecated Use `runParser()` instead. This export will be removed in
|
|
258
|
-
* a future major version. The name `run` conflicts with
|
|
259
|
-
* `@optique/run`'s `run()` function, causing IDE autocomplete
|
|
260
|
-
* confusion.
|
|
261
|
-
*/
|
|
262
|
-
declare const run: typeof runParser;
|
|
263
256
|
/**
|
|
264
257
|
* An error class used to indicate that the command line arguments
|
|
265
258
|
* could not be parsed successfully.
|
|
@@ -267,10 +260,5 @@ declare const run: typeof runParser;
|
|
|
267
260
|
declare class RunParserError extends Error {
|
|
268
261
|
constructor(message: string);
|
|
269
262
|
}
|
|
270
|
-
/**
|
|
271
|
-
* @deprecated Use `RunParserError` instead. This export will be removed in
|
|
272
|
-
* a future major version.
|
|
273
|
-
*/
|
|
274
|
-
declare const RunError: typeof RunParserError;
|
|
275
263
|
//#endregion
|
|
276
|
-
export {
|
|
264
|
+
export { RunOptions, RunParserError, runParser, runParserAsync, runParserSync };
|
package/dist/facade.js
CHANGED
|
@@ -613,13 +613,6 @@ function runParserAsync(parser, programName, args, options) {
|
|
|
613
613
|
return Promise.resolve(result);
|
|
614
614
|
}
|
|
615
615
|
/**
|
|
616
|
-
* @deprecated Use `runParser()` instead. This export will be removed in
|
|
617
|
-
* a future major version. The name `run` conflicts with
|
|
618
|
-
* `@optique/run`'s `run()` function, causing IDE autocomplete
|
|
619
|
-
* confusion.
|
|
620
|
-
*/
|
|
621
|
-
const run = runParser;
|
|
622
|
-
/**
|
|
623
616
|
* An error class used to indicate that the command line arguments
|
|
624
617
|
* could not be parsed successfully.
|
|
625
618
|
*/
|
|
@@ -629,14 +622,9 @@ var RunParserError = class extends Error {
|
|
|
629
622
|
this.name = "RunParserError";
|
|
630
623
|
}
|
|
631
624
|
};
|
|
632
|
-
/**
|
|
633
|
-
* @deprecated Use `RunParserError` instead. This export will be removed in
|
|
634
|
-
* a future major version.
|
|
635
|
-
*/
|
|
636
|
-
const RunError = RunParserError;
|
|
637
625
|
function indentLines(text$1, indent) {
|
|
638
626
|
return text$1.split("\n").join("\n" + " ".repeat(indent));
|
|
639
627
|
}
|
|
640
628
|
|
|
641
629
|
//#endregion
|
|
642
|
-
export {
|
|
630
|
+
export { RunParserError, runParser, runParserAsync, runParserSync };
|
package/dist/index.cjs
CHANGED
|
@@ -13,7 +13,6 @@ const require_facade = require('./facade.cjs');
|
|
|
13
13
|
|
|
14
14
|
exports.DependencyRegistry = require_dependency.DependencyRegistry;
|
|
15
15
|
exports.DuplicateOptionError = require_constructs.DuplicateOptionError;
|
|
16
|
-
exports.RunError = require_facade.RunError;
|
|
17
16
|
exports.RunParserError = require_facade.RunParserError;
|
|
18
17
|
exports.WithDefaultError = require_modifiers.WithDefaultError;
|
|
19
18
|
exports.argument = require_primitives.argument;
|
|
@@ -86,7 +85,6 @@ exports.parseWithDependency = require_dependency.parseWithDependency;
|
|
|
86
85
|
exports.passThrough = require_primitives.passThrough;
|
|
87
86
|
exports.pendingDependencySourceStateMarker = require_dependency.pendingDependencySourceStateMarker;
|
|
88
87
|
exports.pwsh = require_completion.pwsh;
|
|
89
|
-
exports.run = require_facade.run;
|
|
90
88
|
exports.runParser = require_facade.runParser;
|
|
91
89
|
exports.runParserAsync = require_facade.runParserAsync;
|
|
92
90
|
exports.runParserSync = require_facade.runParserSync;
|
package/dist/index.d.cts
CHANGED
|
@@ -9,5 +9,5 @@ import { AnyDependencySource, CombineMode, CombinedDependencyMode, DeferredParse
|
|
|
9
9
|
import { ArgumentErrorOptions, ArgumentOptions, CommandErrorOptions, CommandOptions, FlagErrorOptions, FlagOptions, OptionErrorOptions, OptionOptions, OptionState, PassThroughFormat, PassThroughOptions, argument, command, constant, flag, option, passThrough } from "./primitives.cjs";
|
|
10
10
|
import { CombineModes, DocState, InferMode, InferValue, Mode, ModeIterable, ModeValue, Parser, ParserContext, ParserResult, Result, Suggestion, getDocPage, getDocPageAsync, getDocPageSync, parse, parseAsync, parseSync, suggest, suggestAsync, suggestSync } from "./parser.cjs";
|
|
11
11
|
import { ShellCompletion, bash, fish, nu, pwsh, zsh } from "./completion.cjs";
|
|
12
|
-
import {
|
|
13
|
-
export { AnyDependencySource, ArgumentErrorOptions, ArgumentOptions, ChoiceOptions, ChoiceOptionsBase, ChoiceOptionsNumber, ChoiceOptionsString, CombineMode, CombineModes, CombinedDependencyMode, CommandErrorOptions, CommandOptions, ConditionalErrorOptions, ConditionalOptions, DeferredParseState, DependencyError, DependencyMode, DependencyRegistry, DependencySource, DependencySourceState, DependencyValue, DependencyValues, DeriveAsyncOptions, DeriveFromAsyncOptions, DeriveFromOptions, DeriveFromSyncOptions, DeriveOptions, DeriveSyncOptions, DerivedValueParser, DocEntry, DocFragment, DocFragments, DocPage, DocPageFormatOptions, DocSection, DocState, DuplicateOptionError, FlagErrorOptions, FlagOptions, FloatOptions, InferMode, InferValue, IntegerOptionsBigInt, IntegerOptionsNumber, LocaleOptions, LongestMatchErrorOptions, LongestMatchOptions, MergeOptions, Message, MessageFormatOptions, MessageTerm, Mode, ModeIterable, ModeValue, MultipleErrorOptions, MultipleOptions, NoMatchContext, NonEmptyString, ObjectErrorOptions, ObjectOptions, OptionErrorOptions, OptionName, OptionOptions, OptionState, OrErrorOptions, OrOptions, Parser, ParserContext, ParserResult, PassThroughFormat, PassThroughOptions, PendingDependencySourceState, ResolvedDependency, Result,
|
|
12
|
+
import { RunOptions, RunParserError, runParser, runParserAsync, runParserSync } from "./facade.cjs";
|
|
13
|
+
export { AnyDependencySource, ArgumentErrorOptions, ArgumentOptions, ChoiceOptions, ChoiceOptionsBase, ChoiceOptionsNumber, ChoiceOptionsString, CombineMode, CombineModes, CombinedDependencyMode, CommandErrorOptions, CommandOptions, ConditionalErrorOptions, ConditionalOptions, DeferredParseState, DependencyError, DependencyMode, DependencyRegistry, DependencySource, DependencySourceState, DependencyValue, DependencyValues, DeriveAsyncOptions, DeriveFromAsyncOptions, DeriveFromOptions, DeriveFromSyncOptions, DeriveOptions, DeriveSyncOptions, DerivedValueParser, DocEntry, DocFragment, DocFragments, DocPage, DocPageFormatOptions, DocSection, DocState, DuplicateOptionError, FlagErrorOptions, FlagOptions, FloatOptions, InferMode, InferValue, IntegerOptionsBigInt, IntegerOptionsNumber, LocaleOptions, LongestMatchErrorOptions, LongestMatchOptions, MergeOptions, Message, MessageFormatOptions, MessageTerm, Mode, ModeIterable, ModeValue, MultipleErrorOptions, MultipleOptions, NoMatchContext, NonEmptyString, ObjectErrorOptions, ObjectOptions, OptionErrorOptions, OptionName, OptionOptions, OptionState, OrErrorOptions, OrOptions, Parser, ParserContext, ParserResult, PassThroughFormat, PassThroughOptions, PendingDependencySourceState, ResolvedDependency, Result, RunOptions, RunParserError, ShellCompletion, ShowDefaultOptions, StringOptions, Suggestion, TupleOptions, UrlOptions, Usage, UsageFormatOptions, UsageTerm, UsageTermFormatOptions, Uuid, UuidOptions, ValueParser, ValueParserResult, ValueSetOptions, WithDefaultError, WithDefaultOptions, argument, bash, choice, command, commandLine, concat, conditional, constant, createDeferredParseState, createDependencySourceState, createPendingDependencySourceState, defaultValues, deferredParseMarker, dependency, dependencyId, dependencyIds, dependencySourceMarker, dependencySourceStateMarker, deriveFrom, deriveFromAsync, deriveFromSync, derivedValueParserMarker, ensureNonEmptyString, envVar, extractArgumentMetavars, extractCommandNames, extractOptionNames, fish, flag, float, formatDependencyError, formatDocPage, formatMessage, formatUsage, formatUsageTerm, getDocPage, getDocPageAsync, getDocPageSync, group, integer, isDeferredParseState, isDependencySource, isDependencySourceState, isDerivedValueParser, isNonEmptyString, isPendingDependencySourceState, isValueParser, isWrappedDependencySource, locale, longestMatch, map, merge, message, metavar, multiple, normalizeUsage, nu, object, option, optionName, optionNames, optional, or, parse, parseAsync, parseSync, parseWithDependency, passThrough, pendingDependencySourceStateMarker, pwsh, runParser, runParserAsync, runParserSync, string, suggest, suggestAsync, suggestSync, suggestWithDependency, text, transformsDependencyValue, transformsDependencyValueMarker, tuple, url, uuid, value, valueSet, values, withDefault, wrappedDependencySourceMarker, zsh };
|
package/dist/index.d.ts
CHANGED
|
@@ -9,5 +9,5 @@ import { AnyDependencySource, CombineMode, CombinedDependencyMode, DeferredParse
|
|
|
9
9
|
import { ArgumentErrorOptions, ArgumentOptions, CommandErrorOptions, CommandOptions, FlagErrorOptions, FlagOptions, OptionErrorOptions, OptionOptions, OptionState, PassThroughFormat, PassThroughOptions, argument, command, constant, flag, option, passThrough } from "./primitives.js";
|
|
10
10
|
import { CombineModes, DocState, InferMode, InferValue, Mode, ModeIterable, ModeValue, Parser, ParserContext, ParserResult, Result, Suggestion, getDocPage, getDocPageAsync, getDocPageSync, parse, parseAsync, parseSync, suggest, suggestAsync, suggestSync } from "./parser.js";
|
|
11
11
|
import { ShellCompletion, bash, fish, nu, pwsh, zsh } from "./completion.js";
|
|
12
|
-
import {
|
|
13
|
-
export { AnyDependencySource, ArgumentErrorOptions, ArgumentOptions, ChoiceOptions, ChoiceOptionsBase, ChoiceOptionsNumber, ChoiceOptionsString, CombineMode, CombineModes, CombinedDependencyMode, CommandErrorOptions, CommandOptions, ConditionalErrorOptions, ConditionalOptions, DeferredParseState, DependencyError, DependencyMode, DependencyRegistry, DependencySource, DependencySourceState, DependencyValue, DependencyValues, DeriveAsyncOptions, DeriveFromAsyncOptions, DeriveFromOptions, DeriveFromSyncOptions, DeriveOptions, DeriveSyncOptions, DerivedValueParser, DocEntry, DocFragment, DocFragments, DocPage, DocPageFormatOptions, DocSection, DocState, DuplicateOptionError, FlagErrorOptions, FlagOptions, FloatOptions, InferMode, InferValue, IntegerOptionsBigInt, IntegerOptionsNumber, LocaleOptions, LongestMatchErrorOptions, LongestMatchOptions, MergeOptions, Message, MessageFormatOptions, MessageTerm, Mode, ModeIterable, ModeValue, MultipleErrorOptions, MultipleOptions, NoMatchContext, NonEmptyString, ObjectErrorOptions, ObjectOptions, OptionErrorOptions, OptionName, OptionOptions, OptionState, OrErrorOptions, OrOptions, Parser, ParserContext, ParserResult, PassThroughFormat, PassThroughOptions, PendingDependencySourceState, ResolvedDependency, Result,
|
|
12
|
+
import { RunOptions, RunParserError, runParser, runParserAsync, runParserSync } from "./facade.js";
|
|
13
|
+
export { AnyDependencySource, ArgumentErrorOptions, ArgumentOptions, ChoiceOptions, ChoiceOptionsBase, ChoiceOptionsNumber, ChoiceOptionsString, CombineMode, CombineModes, CombinedDependencyMode, CommandErrorOptions, CommandOptions, ConditionalErrorOptions, ConditionalOptions, DeferredParseState, DependencyError, DependencyMode, DependencyRegistry, DependencySource, DependencySourceState, DependencyValue, DependencyValues, DeriveAsyncOptions, DeriveFromAsyncOptions, DeriveFromOptions, DeriveFromSyncOptions, DeriveOptions, DeriveSyncOptions, DerivedValueParser, DocEntry, DocFragment, DocFragments, DocPage, DocPageFormatOptions, DocSection, DocState, DuplicateOptionError, FlagErrorOptions, FlagOptions, FloatOptions, InferMode, InferValue, IntegerOptionsBigInt, IntegerOptionsNumber, LocaleOptions, LongestMatchErrorOptions, LongestMatchOptions, MergeOptions, Message, MessageFormatOptions, MessageTerm, Mode, ModeIterable, ModeValue, MultipleErrorOptions, MultipleOptions, NoMatchContext, NonEmptyString, ObjectErrorOptions, ObjectOptions, OptionErrorOptions, OptionName, OptionOptions, OptionState, OrErrorOptions, OrOptions, Parser, ParserContext, ParserResult, PassThroughFormat, PassThroughOptions, PendingDependencySourceState, ResolvedDependency, Result, RunOptions, RunParserError, ShellCompletion, ShowDefaultOptions, StringOptions, Suggestion, TupleOptions, UrlOptions, Usage, UsageFormatOptions, UsageTerm, UsageTermFormatOptions, Uuid, UuidOptions, ValueParser, ValueParserResult, ValueSetOptions, WithDefaultError, WithDefaultOptions, argument, bash, choice, command, commandLine, concat, conditional, constant, createDeferredParseState, createDependencySourceState, createPendingDependencySourceState, defaultValues, deferredParseMarker, dependency, dependencyId, dependencyIds, dependencySourceMarker, dependencySourceStateMarker, deriveFrom, deriveFromAsync, deriveFromSync, derivedValueParserMarker, ensureNonEmptyString, envVar, extractArgumentMetavars, extractCommandNames, extractOptionNames, fish, flag, float, formatDependencyError, formatDocPage, formatMessage, formatUsage, formatUsageTerm, getDocPage, getDocPageAsync, getDocPageSync, group, integer, isDeferredParseState, isDependencySource, isDependencySourceState, isDerivedValueParser, isNonEmptyString, isPendingDependencySourceState, isValueParser, isWrappedDependencySource, locale, longestMatch, map, merge, message, metavar, multiple, normalizeUsage, nu, object, option, optionName, optionNames, optional, or, parse, parseAsync, parseSync, parseWithDependency, passThrough, pendingDependencySourceStateMarker, pwsh, runParser, runParserAsync, runParserSync, string, suggest, suggestAsync, suggestSync, suggestWithDependency, text, transformsDependencyValue, transformsDependencyValueMarker, tuple, url, uuid, value, valueSet, values, withDefault, wrappedDependencySourceMarker, zsh };
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,6 @@ import { ensureNonEmptyString, isNonEmptyString } from "./nonempty.js";
|
|
|
9
9
|
import { choice, float, integer, isValueParser, locale, string, url, uuid } from "./valueparser.js";
|
|
10
10
|
import { argument, command, constant, flag, option, passThrough } from "./primitives.js";
|
|
11
11
|
import { getDocPage, getDocPageAsync, getDocPageSync, parse, parseAsync, parseSync, suggest, suggestAsync, suggestSync } from "./parser.js";
|
|
12
|
-
import {
|
|
12
|
+
import { RunParserError, runParser, runParserAsync, runParserSync } from "./facade.js";
|
|
13
13
|
|
|
14
|
-
export { DependencyRegistry, DuplicateOptionError,
|
|
14
|
+
export { DependencyRegistry, DuplicateOptionError, RunParserError, WithDefaultError, argument, bash, choice, command, commandLine, concat, conditional, constant, createDeferredParseState, createDependencySourceState, createPendingDependencySourceState, defaultValues, deferredParseMarker, dependency, dependencyId, dependencyIds, dependencySourceMarker, dependencySourceStateMarker, deriveFrom, deriveFromAsync, deriveFromSync, derivedValueParserMarker, ensureNonEmptyString, envVar, extractArgumentMetavars, extractCommandNames, extractOptionNames, fish, flag, float, formatDependencyError, formatDocPage, formatMessage, formatUsage, formatUsageTerm, getDocPage, getDocPageAsync, getDocPageSync, group, integer, isDeferredParseState, isDependencySource, isDependencySourceState, isDerivedValueParser, isNonEmptyString, isPendingDependencySourceState, isValueParser, isWrappedDependencySource, locale, longestMatch, map, merge, message, metavar, multiple, normalizeUsage, nu, object, option, optionName, optionNames, optional, or, parse, parseAsync, parseSync, parseWithDependency, passThrough, pendingDependencySourceStateMarker, pwsh, runParser, runParserAsync, runParserSync, string, suggest, suggestAsync, suggestSync, suggestWithDependency, text, transformsDependencyValue, transformsDependencyValueMarker, tuple, url, uuid, value, valueSet, values, withDefault, wrappedDependencySourceMarker, zsh };
|