@kjanat/dreamcli 3.0.0-rc.9 → 3.0.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/CHANGELOG.md +246 -1
- package/README.md +30 -13
- package/dist/core/cli/dispatch.mjs +0 -11
- package/dist/core/cli/index.d.mts +133 -9
- package/dist/core/cli/index.mjs +108 -21
- package/dist/core/cli/planner.mjs +7 -1
- package/dist/core/cli/root-help.mjs +5 -0
- package/dist/core/cli/runtime-preflight.d.mts +4 -0
- package/dist/core/cli/runtime-preflight.mjs +5 -3
- package/dist/core/completion/shells/shared.mjs +1 -0
- package/dist/core/config/index.d.mts +43 -12
- package/dist/core/config/index.mjs +55 -16
- package/dist/core/config/package-json.d.mts +1 -0
- package/dist/core/errors/index.d.mts +2 -2
- package/dist/core/execution/index.mjs +6 -2
- package/dist/core/help/ansi.d.mts +11 -5
- package/dist/core/help/ansi.mjs +14 -16
- package/dist/core/help/index.d.mts +22 -0
- package/dist/core/help/index.mjs +75 -25
- package/dist/core/json-schema/index.d.mts +7 -8
- package/dist/core/json-schema/index.mjs +271 -88
- package/dist/core/json-schema/meta-descriptions.generated.d.mts +40 -40
- package/dist/core/output/contracts.d.mts +5 -5
- package/dist/core/output/contracts.mjs +1 -1
- package/dist/core/output/index.d.mts +38 -1
- package/dist/core/output/index.mjs +37 -2
- package/dist/core/parse/index.mjs +9 -6
- package/dist/core/resolve/contracts.d.mts +7 -2
- package/dist/core/resolve/flags.d.mts +3 -1
- package/dist/core/resolve/flags.mjs +29 -12
- package/dist/core/resolve/index.mjs +6 -1
- package/dist/core/resolve/property.d.mts +1 -1
- package/dist/core/resolve/standard.d.mts +24 -0
- package/dist/core/resolve/standard.mjs +114 -0
- package/dist/core/schema/arg.d.mts +37 -2
- package/dist/core/schema/arg.mjs +5 -2
- package/dist/core/schema/command.d.mts +49 -7
- package/dist/core/schema/command.mjs +15 -5
- package/dist/core/schema/flag.d.mts +77 -9
- package/dist/core/schema/flag.mjs +7 -3
- package/dist/core/schema/index.d.mts +3 -2
- package/dist/core/schema/prompt.d.mts +1 -1
- package/dist/core/schema/run.d.mts +7 -0
- package/dist/core/schema/standard.d.mts +100 -0
- package/dist/core/schema/standard.mjs +15 -0
- package/dist/core/testkit/index.d.mts +7 -5
- package/dist/core/testkit/index.mjs +12 -7
- package/dist/index.d.mts +5 -4
- package/dist/index.mjs +4 -4
- package/dist/runtime/adapter.d.mts +33 -0
- package/dist/runtime/adapter.mjs +6 -1
- package/dist/runtime/deno.d.mts +4 -0
- package/dist/runtime/deno.mjs +4 -1
- package/dist/runtime/node.mjs +9 -1
- package/dist/version.mjs +2 -2
- package/dreamcli.schema.json +82 -0
- package/examples/basic.ts +2 -2
- package/examples/flag-types.ts +79 -0
- package/examples/gh/node_modules/typescript/LICENSE +55 -0
- package/examples/gh/node_modules/typescript/NOTICE.txt +436 -0
- package/examples/gh/node_modules/typescript/README.md +49 -0
- package/examples/gh/node_modules/typescript/bin/tsc +2 -0
- package/examples/gh/node_modules/typescript/dist/api/async/api.d.ts +529 -0
- package/examples/gh/node_modules/typescript/dist/api/async/api.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/async/api.js +1657 -0
- package/examples/gh/node_modules/typescript/dist/api/async/api.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/async/client.d.ts +39 -0
- package/examples/gh/node_modules/typescript/dist/api/async/client.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/async/client.js +211 -0
- package/examples/gh/node_modules/typescript/dist/api/async/client.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/async/types.d.ts +310 -0
- package/examples/gh/node_modules/typescript/dist/api/async/types.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/async/types.js +2 -0
- package/examples/gh/node_modules/typescript/dist/api/async/types.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/compilerOptions.d.ts +109 -0
- package/examples/gh/node_modules/typescript/dist/api/compilerOptions.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/compilerOptions.js +2 -0
- package/examples/gh/node_modules/typescript/dist/api/compilerOptions.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/fs.d.ts +23 -0
- package/examples/gh/node_modules/typescript/dist/api/fs.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/fs.js +109 -0
- package/examples/gh/node_modules/typescript/dist/api/fs.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/node/encoder.d.ts +15 -0
- package/examples/gh/node_modules/typescript/dist/api/node/encoder.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.d.ts +5 -0
- package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.js +74 -0
- package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/node/encoder.js +287 -0
- package/examples/gh/node_modules/typescript/dist/api/node/encoder.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/node/msgpack.d.ts +32 -0
- package/examples/gh/node_modules/typescript/dist/api/node/msgpack.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/node/msgpack.js +213 -0
- package/examples/gh/node_modules/typescript/dist/api/node/msgpack.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/node/node.d.ts +76 -0
- package/examples/gh/node_modules/typescript/dist/api/node/node.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/node/node.generated.d.ts +182 -0
- package/examples/gh/node_modules/typescript/dist/api/node/node.generated.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/node/node.generated.js +835 -0
- package/examples/gh/node_modules/typescript/dist/api/node/node.generated.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.d.ts +62 -0
- package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.js +122 -0
- package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/node/node.js +298 -0
- package/examples/gh/node_modules/typescript/dist/api/node/node.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/node/protocol.d.ts +29 -0
- package/examples/gh/node_modules/typescript/dist/api/node/protocol.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.d.ts +4 -0
- package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.js +241 -0
- package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/node/protocol.js +30 -0
- package/examples/gh/node_modules/typescript/dist/api/node/protocol.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/node/wtf8.d.ts +6 -0
- package/examples/gh/node_modules/typescript/dist/api/node/wtf8.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/node/wtf8.js +61 -0
- package/examples/gh/node_modules/typescript/dist/api/node/wtf8.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/options.d.ts +32 -0
- package/examples/gh/node_modules/typescript/dist/api/options.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/options.js +11 -0
- package/examples/gh/node_modules/typescript/dist/api/options.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/path.d.ts +110 -0
- package/examples/gh/node_modules/typescript/dist/api/path.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/path.js +508 -0
- package/examples/gh/node_modules/typescript/dist/api/path.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/proto.d.ts +239 -0
- package/examples/gh/node_modules/typescript/dist/api/proto.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/proto.js +37 -0
- package/examples/gh/node_modules/typescript/dist/api/proto.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.d.ts +79 -0
- package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.js +169 -0
- package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/sync/api.d.ts +529 -0
- package/examples/gh/node_modules/typescript/dist/api/sync/api.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/sync/api.js +1665 -0
- package/examples/gh/node_modules/typescript/dist/api/sync/api.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/sync/client.d.ts +30 -0
- package/examples/gh/node_modules/typescript/dist/api/sync/client.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/sync/client.js +124 -0
- package/examples/gh/node_modules/typescript/dist/api/sync/client.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/sync/types.d.ts +310 -0
- package/examples/gh/node_modules/typescript/dist/api/sync/types.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/sync/types.js +2 -0
- package/examples/gh/node_modules/typescript/dist/api/sync/types.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/syncChannel.d.ts +114 -0
- package/examples/gh/node_modules/typescript/dist/api/syncChannel.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/syncChannel.js +508 -0
- package/examples/gh/node_modules/typescript/dist/api/syncChannel.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/timing.d.ts +175 -0
- package/examples/gh/node_modules/typescript/dist/api/timing.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/api/timing.js +149 -0
- package/examples/gh/node_modules/typescript/dist/api/timing.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/ast.d.ts +100 -0
- package/examples/gh/node_modules/typescript/dist/ast/ast.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/ast.generated.d.ts +1161 -0
- package/examples/gh/node_modules/typescript/dist/ast/ast.generated.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/ast.generated.js +4 -0
- package/examples/gh/node_modules/typescript/dist/ast/ast.generated.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/ast.js +7 -0
- package/examples/gh/node_modules/typescript/dist/ast/ast.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/astnav.d.ts +19 -0
- package/examples/gh/node_modules/typescript/dist/ast/astnav.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/astnav.js +596 -0
- package/examples/gh/node_modules/typescript/dist/ast/astnav.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/clone.d.ts +16 -0
- package/examples/gh/node_modules/typescript/dist/ast/clone.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/clone.js +104 -0
- package/examples/gh/node_modules/typescript/dist/ast/clone.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/factory.generated.d.ts +520 -0
- package/examples/gh/node_modules/typescript/dist/ast/factory.generated.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/factory.generated.js +3057 -0
- package/examples/gh/node_modules/typescript/dist/ast/factory.generated.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/index.d.ts +20 -0
- package/examples/gh/node_modules/typescript/dist/ast/index.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/index.js +20 -0
- package/examples/gh/node_modules/typescript/dist/ast/index.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/is.d.ts +35 -0
- package/examples/gh/node_modules/typescript/dist/ast/is.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/is.generated.d.ts +329 -0
- package/examples/gh/node_modules/typescript/dist/ast/is.generated.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/is.generated.js +1103 -0
- package/examples/gh/node_modules/typescript/dist/ast/is.generated.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/is.js +233 -0
- package/examples/gh/node_modules/typescript/dist/ast/is.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/jsdoc.d.ts +11 -0
- package/examples/gh/node_modules/typescript/dist/ast/jsdoc.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/jsdoc.js +202 -0
- package/examples/gh/node_modules/typescript/dist/ast/jsdoc.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/scanner.d.ts +97 -0
- package/examples/gh/node_modules/typescript/dist/ast/scanner.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/scanner.js +2230 -0
- package/examples/gh/node_modules/typescript/dist/ast/scanner.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/utils.d.ts +17 -0
- package/examples/gh/node_modules/typescript/dist/ast/utils.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/utils.js +67 -0
- package/examples/gh/node_modules/typescript/dist/ast/utils.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/visitor.d.ts +14 -0
- package/examples/gh/node_modules/typescript/dist/ast/visitor.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.d.ts +50 -0
- package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.js +978 -0
- package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/ast/visitor.js +47 -0
- package/examples/gh/node_modules/typescript/dist/ast/visitor.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/characterCodes.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/characterCodes.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.d.ts +129 -0
- package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.js +132 -0
- package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/characterCodes.js +130 -0
- package/examples/gh/node_modules/typescript/dist/enums/characterCodes.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts +5 -0
- package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.js +6 -0
- package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.js +6 -0
- package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts +28 -0
- package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.js +30 -0
- package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.js +30 -0
- package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts +7 -0
- package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.js +9 -0
- package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.js +9 -0
- package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/elementFlags.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/elementFlags.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.d.ts +12 -0
- package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.js +14 -0
- package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/elementFlags.js +14 -0
- package/examples/gh/node_modules/typescript/dist/enums/elementFlags.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts +23 -0
- package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.js +25 -0
- package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.js +25 -0
- package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts +9 -0
- package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.js +11 -0
- package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.js +11 -0
- package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/languageVariant.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/languageVariant.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.d.ts +5 -0
- package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.js +6 -0
- package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/languageVariant.js +6 -0
- package/examples/gh/node_modules/typescript/dist/enums/languageVariant.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts +42 -0
- package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.js +44 -0
- package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.js +44 -0
- package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts +7 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js +9 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.js +9 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleKind.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleKind.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.d.ts +17 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.js +19 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleKind.js +19 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleKind.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts +9 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js +11 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.js +11 -0
- package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/newLineKind.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/newLineKind.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.d.ts +6 -0
- package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.js +8 -0
- package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/newLineKind.js +8 -0
- package/examples/gh/node_modules/typescript/dist/enums/newLineKind.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts +36 -0
- package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js +38 -0
- package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.js +38 -0
- package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts +44 -0
- package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.js +46 -0
- package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.js +46 -0
- package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/objectFlags.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/objectFlags.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.d.ts +50 -0
- package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.js +52 -0
- package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/objectFlags.js +52 -0
- package/examples/gh/node_modules/typescript/dist/enums/objectFlags.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts +16 -0
- package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js +18 -0
- package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.js +18 -0
- package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts +13 -0
- package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js +14 -0
- package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.js +14 -0
- package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/scriptKind.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/scriptKind.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.d.ts +11 -0
- package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.js +12 -0
- package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/scriptKind.js +12 -0
- package/examples/gh/node_modules/typescript/dist/enums/scriptKind.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts +17 -0
- package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.js +18 -0
- package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.js +18 -0
- package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts +15 -0
- package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.js +17 -0
- package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.js +17 -0
- package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/signatureKind.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/signatureKind.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.d.ts +5 -0
- package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.js +7 -0
- package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/signatureKind.js +7 -0
- package/examples/gh/node_modules/typescript/dist/enums/signatureKind.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts +71 -0
- package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.js +73 -0
- package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.js +73 -0
- package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts +389 -0
- package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.js +391 -0
- package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.js +391 -0
- package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts +30 -0
- package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.js +32 -0
- package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.js +32 -0
- package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/typeFlags.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/typeFlags.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.d.ts +76 -0
- package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.js +78 -0
- package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/typeFlags.js +78 -0
- package/examples/gh/node_modules/typescript/dist/enums/typeFlags.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.d.ts +2 -0
- package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts +7 -0
- package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.js +9 -0
- package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.js +9 -0
- package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.js.map +1 -0
- package/examples/gh/node_modules/typescript/dist/internal/utils.d.ts +23 -0
- package/examples/gh/node_modules/typescript/dist/internal/utils.d.ts.map +1 -0
- package/examples/gh/node_modules/typescript/dist/internal/utils.js +25 -0
- package/examples/gh/node_modules/typescript/dist/internal/utils.js.map +1 -0
- package/examples/gh/node_modules/typescript/lib/getExePath.d.ts +2 -0
- package/examples/gh/node_modules/typescript/lib/getExePath.js +70 -0
- package/examples/gh/node_modules/typescript/lib/tsc.js +28 -0
- package/examples/gh/node_modules/typescript/lib/version.cjs +3 -0
- package/examples/gh/node_modules/typescript/lib/version.d.cts +2 -0
- package/examples/gh/node_modules/typescript/package.json +87 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/License.txt +11 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/README.md +54 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.d.ts +17 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.js +83 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.d.ts +22 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.js +210 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.d.ts +14 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.js +87 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.d.ts +32 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.js +132 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.d.ts +367 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.js +1271 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.d.ts +9 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.js +16 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.d.ts +52 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.js +70 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.d.ts +39 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.js +135 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.d.ts +7 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.js +34 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.d.ts +55 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.js +412 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.d.ts +18 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.js +155 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.d.ts +77 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.js +246 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.d.ts +60 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.js +157 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.d.ts +369 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.js +436 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.d.ts +74 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.js +23 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.d.ts +10 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.js +74 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts +15 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +77 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.d.ts +58 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.js +289 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.d.ts +12 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.js +163 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/package.json +54 -0
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/typings/thenable.d.ts +5 -0
- package/examples/gh/package.json +11 -5
- package/examples/gh/src/main.ts +10 -4
- package/examples/help-config.ts +43 -0
- package/examples/json-mode.ts +8 -4
- package/examples/middleware.ts +1 -1
- package/examples/output-extras.ts +46 -0
- package/examples/parser-control.ts +40 -0
- package/examples/pwsh-demo/package.json +1 -1
- package/examples/pwsh-demo/src/main.ts +1 -1
- package/examples/standard-schema.ts +45 -0
- package/examples/transport-launcher.ts +10 -10
- package/package.json +25 -31
- package/dist/core/schema-dsl/runtime.d.mts +0 -144
- package/dist/core/schema-dsl/runtime.mjs +0 -271
- package/dist/core/schema-dsl/to-json-schema.d.mts +0 -29
- package/dist/core/schema-dsl/to-json-schema.mjs +0 -74
|
@@ -112,6 +112,13 @@ interface Out {
|
|
|
112
112
|
log(message: string): void;
|
|
113
113
|
/** Informational (may be suppressed in quiet mode). */
|
|
114
114
|
info(message: string): void;
|
|
115
|
+
/**
|
|
116
|
+
* Status line to stderr, suppressed in quiet mode.
|
|
117
|
+
*
|
|
118
|
+
* Keeps stdout clean for piping; for success and progress notes like
|
|
119
|
+
* `Wrote <path>` that scripts silence with `--quiet`.
|
|
120
|
+
*/
|
|
121
|
+
status(message: string): void;
|
|
115
122
|
/** Warning to stderr. */
|
|
116
123
|
warn(message: string): void;
|
|
117
124
|
/** Error to stderr. */
|
|
@@ -169,6 +176,15 @@ interface Out {
|
|
|
169
176
|
* ```
|
|
170
177
|
*/
|
|
171
178
|
readonly color: Colors;
|
|
179
|
+
/**
|
|
180
|
+
* Whether OSC 8 terminal hyperlinks should be emitted.
|
|
181
|
+
*
|
|
182
|
+
* Honors `NO_HYPERLINKS`/`FORCE_HYPERLINKS` and the
|
|
183
|
+
* `--no-hyperlinks`/`--hyperlinks` argv flags, falling back to `isTTY`.
|
|
184
|
+
* Handlers rendering their own `out.color.link(...)` output can gate on
|
|
185
|
+
* this to keep OSC 8 escapes out of piped or opted-out contexts.
|
|
186
|
+
*/
|
|
187
|
+
readonly isHyperlinkSupported: boolean;
|
|
172
188
|
/**
|
|
173
189
|
* Render tabular data.
|
|
174
190
|
*
|
|
@@ -362,13 +378,33 @@ type ExecutionStep = {
|
|
|
362
378
|
readonly kind: 'middleware';
|
|
363
379
|
readonly handler: ErasedMiddlewareHandler;
|
|
364
380
|
};
|
|
381
|
+
/**
|
|
382
|
+
* Program metadata passed to a function-form example, resolved at render time.
|
|
383
|
+
*
|
|
384
|
+
* `name` is the actually-invoked program name (`options.help.binName`, falling
|
|
385
|
+
* back to the command name) so examples stay truthful under symlinks,
|
|
386
|
+
* `inheritName`, and `npx x` vs a global install. `version` is the program
|
|
387
|
+
* version, or `undefined` when none is configured.
|
|
388
|
+
*/
|
|
389
|
+
interface ExampleMeta {
|
|
390
|
+
readonly name: string;
|
|
391
|
+
readonly version: string | undefined;
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* An example command line: a literal string, or a function resolved at render
|
|
395
|
+
* time with the program {@link ExampleMeta} (so the program name need not be
|
|
396
|
+
* hardcoded).
|
|
397
|
+
*/
|
|
398
|
+
type ExampleCommand = string | ((meta: ExampleMeta) => string);
|
|
365
399
|
/** A single usage example shown in help text. */
|
|
366
400
|
interface CommandExample {
|
|
367
401
|
/** The command invocation (e.g. `'deploy production --force'`). */
|
|
368
|
-
readonly command:
|
|
402
|
+
readonly command: ExampleCommand;
|
|
369
403
|
/** Optional description of what this example does. */
|
|
370
404
|
readonly description?: string;
|
|
371
405
|
}
|
|
406
|
+
/** Resolve an {@link ExampleCommand} to its string form for the given meta. */
|
|
407
|
+
declare function resolveExampleCommand(command: ExampleCommand, meta: ExampleMeta): string;
|
|
372
408
|
/**
|
|
373
409
|
* Runtime descriptor produced by {@link CommandBuilder}.
|
|
374
410
|
*
|
|
@@ -764,7 +800,13 @@ declare class CommandBuilder<F extends Record<string, FlagBuilder<FlagConfig>> =
|
|
|
764
800
|
* Call multiple times to add several examples. Each example shows a
|
|
765
801
|
* shell invocation, optionally with a description.
|
|
766
802
|
*
|
|
767
|
-
*
|
|
803
|
+
* `cmd` may be a literal string or a function receiving the program
|
|
804
|
+
* {@link ExampleMeta} (`name`, `version`), resolved at render time. Use the
|
|
805
|
+
* function form to reference the invoked program name instead of hardcoding
|
|
806
|
+
* it, so examples stay truthful under symlinks, `inheritName`, and
|
|
807
|
+
* `npx x` vs a global install.
|
|
808
|
+
*
|
|
809
|
+
* @param cmd - The example command line, or a `(meta) => string` builder.
|
|
768
810
|
* @param description - Optional one-line explanation of what the example does.
|
|
769
811
|
*
|
|
770
812
|
* @example
|
|
@@ -773,19 +815,19 @@ declare class CommandBuilder<F extends Record<string, FlagBuilder<FlagConfig>> =
|
|
|
773
815
|
* .arg('target', arg.string())
|
|
774
816
|
* .flag('force', flag.boolean().alias('f'))
|
|
775
817
|
* .example('deploy production', 'Deploy to production')
|
|
776
|
-
* .example(
|
|
818
|
+
* .example((m) => `${m.name} deploy staging -f`, 'Force deploy to staging')
|
|
777
819
|
* .action(({ args, flags }) => { ... });
|
|
778
820
|
*
|
|
779
821
|
* // $ mycli deploy --help
|
|
780
822
|
* // ...
|
|
781
823
|
* // Examples:
|
|
782
|
-
* // deploy production
|
|
783
|
-
* // deploy staging -f
|
|
824
|
+
* // deploy production Deploy to production
|
|
825
|
+
* // mycli deploy staging -f Force deploy to staging
|
|
784
826
|
* ```
|
|
785
827
|
*
|
|
786
828
|
* @returns The builder (for chaining).
|
|
787
829
|
*/
|
|
788
|
-
example(cmd:
|
|
830
|
+
example(cmd: ExampleCommand, description?: string): CommandBuilder<F, A, C>;
|
|
789
831
|
/**
|
|
790
832
|
* Register a named flag on this command.
|
|
791
833
|
*
|
|
@@ -987,4 +1029,4 @@ declare function command(name: string): CommandBuilder;
|
|
|
987
1029
|
*/
|
|
988
1030
|
declare function group(name: string): CommandBuilder;
|
|
989
1031
|
//#endregion
|
|
990
|
-
export { type ActionHandler, type ActionParams, type AnyCommandBuilder, type CommandArgEntry, CommandBuilder, type CommandConfig, type CommandExample, type CommandMeta, type CommandSchema, type DeriveHandler, type DeriveParams, type ErasedActionHandler, type ErasedCommand, type ErasedDeriveHandler, type ErasedInteractiveResolver, type InteractiveParams, type InteractiveResolver, type InteractiveResult, type Out, type RunnableCommand, type WidenContext, type WidenDerivedContext, command, group };
|
|
1032
|
+
export { type ActionHandler, type ActionParams, type AnyCommandBuilder, type CommandArgEntry, CommandBuilder, type CommandConfig, type CommandExample, type CommandMeta, type CommandSchema, type DeriveHandler, type DeriveParams, type ErasedActionHandler, type ErasedCommand, type ErasedDeriveHandler, type ErasedInteractiveResolver, type ExampleCommand, type ExampleMeta, type InteractiveParams, type InteractiveResolver, type InteractiveResult, type Out, type RunnableCommand, type WidenContext, type WidenDerivedContext, command, group, resolveExampleCommand };
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { CLIError } from "../errors/index.mjs";
|
|
2
2
|
import { getFlagNegatedName } from "./flag.mjs";
|
|
3
3
|
//#region src/core/schema/command.ts
|
|
4
|
+
/** Resolve an {@link ExampleCommand} to its string form for the given meta. */
|
|
5
|
+
function resolveExampleCommand(command, meta) {
|
|
6
|
+
return typeof command === "function" ? command(meta) : command;
|
|
7
|
+
}
|
|
4
8
|
/**
|
|
5
9
|
* Validate a new arg entry against invariants before adding it to the command.
|
|
6
10
|
*
|
|
@@ -430,7 +434,13 @@ var CommandBuilder = class CommandBuilder {
|
|
|
430
434
|
* Call multiple times to add several examples. Each example shows a
|
|
431
435
|
* shell invocation, optionally with a description.
|
|
432
436
|
*
|
|
433
|
-
*
|
|
437
|
+
* `cmd` may be a literal string or a function receiving the program
|
|
438
|
+
* {@link ExampleMeta} (`name`, `version`), resolved at render time. Use the
|
|
439
|
+
* function form to reference the invoked program name instead of hardcoding
|
|
440
|
+
* it, so examples stay truthful under symlinks, `inheritName`, and
|
|
441
|
+
* `npx x` vs a global install.
|
|
442
|
+
*
|
|
443
|
+
* @param cmd - The example command line, or a `(meta) => string` builder.
|
|
434
444
|
* @param description - Optional one-line explanation of what the example does.
|
|
435
445
|
*
|
|
436
446
|
* @example
|
|
@@ -439,14 +449,14 @@ var CommandBuilder = class CommandBuilder {
|
|
|
439
449
|
* .arg('target', arg.string())
|
|
440
450
|
* .flag('force', flag.boolean().alias('f'))
|
|
441
451
|
* .example('deploy production', 'Deploy to production')
|
|
442
|
-
* .example(
|
|
452
|
+
* .example((m) => `${m.name} deploy staging -f`, 'Force deploy to staging')
|
|
443
453
|
* .action(({ args, flags }) => { ... });
|
|
444
454
|
*
|
|
445
455
|
* // $ mycli deploy --help
|
|
446
456
|
* // ...
|
|
447
457
|
* // Examples:
|
|
448
|
-
* // deploy production
|
|
449
|
-
* // deploy staging -f
|
|
458
|
+
* // deploy production Deploy to production
|
|
459
|
+
* // mycli deploy staging -f Force deploy to staging
|
|
450
460
|
* ```
|
|
451
461
|
*
|
|
452
462
|
* @returns The builder (for chaining).
|
|
@@ -723,4 +733,4 @@ function group(name) {
|
|
|
723
733
|
return command(name);
|
|
724
734
|
}
|
|
725
735
|
//#endregion
|
|
726
|
-
export { CommandBuilder, command, group };
|
|
736
|
+
export { CommandBuilder, command, group, resolveExampleCommand };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { NumberConstraints } from "./number-constraints.mjs";
|
|
2
|
+
import { InferStandardOutput, StandardSchemaV1 } from "./standard.mjs";
|
|
2
3
|
import { ConfirmPromptConfig, InputPromptConfig, MultiselectPromptConfig, PROMPT_KINDS, PromptConfig, PromptConfigBase, PromptKind, PromptResult, SelectChoice, SelectPromptConfig } from "./prompt.mjs";
|
|
3
4
|
import { StringConstraintViolation, StringConstraints } from "./string-constraints.mjs";
|
|
4
5
|
import { DateFlagOptions, UrlFlagOptions } from "./value-parsers.mjs";
|
|
5
6
|
//#region src/core/schema/flag.d.ts
|
|
6
7
|
/** All flag presence states as a runtime array. */
|
|
7
|
-
declare const FLAG_PRESENCES: readonly [
|
|
8
|
+
declare const FLAG_PRESENCES: readonly ["optional", "required", "defaulted"];
|
|
8
9
|
/**
|
|
9
10
|
* Presence describes whether a flag value is guaranteed to exist when the
|
|
10
11
|
* action handler runs:
|
|
@@ -109,9 +110,10 @@ type PromptConfigByFlagKind = {
|
|
|
109
110
|
readonly count: never;
|
|
110
111
|
readonly keyValue: never;
|
|
111
112
|
};
|
|
113
|
+
/** Prompt configuration compatible with the kind carried by a {@link FlagConfig}. */
|
|
112
114
|
type AllowedPromptConfig<C extends FlagConfig> = PromptConfigByFlagKind[C['flagKind']];
|
|
113
115
|
/** All flag kind discriminators as a runtime array. */
|
|
114
|
-
declare const FLAG_KINDS: readonly [
|
|
116
|
+
declare const FLAG_KINDS: readonly ["string", "number", "boolean", "enum", "array", "custom", "count", "keyValue"];
|
|
115
117
|
/** Discriminator for the kind of value a flag accepts. */
|
|
116
118
|
type FlagKind = (typeof FLAG_KINDS)[number];
|
|
117
119
|
/**
|
|
@@ -121,19 +123,45 @@ type FlagKind = (typeof FLAG_KINDS)[number];
|
|
|
121
123
|
* value from config files. Narrow inside the function as needed.
|
|
122
124
|
*/
|
|
123
125
|
type FlagParseFn<T> = (raw: unknown) => T;
|
|
124
|
-
/** Options accepted by `flag.path()
|
|
125
|
-
interface
|
|
126
|
+
/** Options accepted by `flag.path()` for any-kind or file paths. */
|
|
127
|
+
interface FilePathFlagOptions {
|
|
126
128
|
/**
|
|
127
129
|
* Reject the value if nothing exists at the path.
|
|
128
130
|
* @defaultValue `false` (`true` when `type` is set)
|
|
129
131
|
*/
|
|
130
132
|
readonly mustExist?: boolean;
|
|
131
133
|
/**
|
|
132
|
-
* Require the path to be a file or a directory. Implies existence
|
|
134
|
+
* Require the path to be a file or a directory. Implies existence
|
|
135
|
+
* unless `mustExist` is explicitly `false`, in which case a missing
|
|
136
|
+
* path passes and only an existing path is type-checked.
|
|
133
137
|
* @defaultValue `undefined` (any kind)
|
|
134
138
|
*/
|
|
135
|
-
readonly type?: 'file'
|
|
139
|
+
readonly type?: 'file';
|
|
140
|
+
/** Directory creation is only available with `type: 'directory'`. */
|
|
141
|
+
readonly create?: never;
|
|
136
142
|
}
|
|
143
|
+
/** Options accepted by `flag.path()` for directory paths. */
|
|
144
|
+
interface DirectoryPathFlagOptions {
|
|
145
|
+
/**
|
|
146
|
+
* Reject the value if nothing exists at the path.
|
|
147
|
+
* @defaultValue `false` (`true` when `type` is set)
|
|
148
|
+
*/
|
|
149
|
+
readonly mustExist?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Require the path to be a directory. Implies existence unless
|
|
152
|
+
* `mustExist` is explicitly `false`, in which case a missing path
|
|
153
|
+
* passes and only an existing path is type-checked.
|
|
154
|
+
*/
|
|
155
|
+
readonly type: 'directory';
|
|
156
|
+
/**
|
|
157
|
+
* Create the directory (recursively) when nothing exists at the path.
|
|
158
|
+
* An existing non-directory path still fails the type check.
|
|
159
|
+
* @defaultValue `false`
|
|
160
|
+
*/
|
|
161
|
+
readonly create?: boolean;
|
|
162
|
+
}
|
|
163
|
+
/** Options accepted by `flag.path()`. */
|
|
164
|
+
type PathFlagOptions = FilePathFlagOptions | DirectoryPathFlagOptions;
|
|
137
165
|
/**
|
|
138
166
|
* Filesystem expectations attached by `flag.path()`.
|
|
139
167
|
*
|
|
@@ -146,9 +174,11 @@ interface PathChecks {
|
|
|
146
174
|
readonly mustExist: boolean;
|
|
147
175
|
/**
|
|
148
176
|
* Require the existing path to be a file or a directory. Implies
|
|
149
|
-
* existence when set
|
|
177
|
+
* existence when set, unless `mustExist` is `false`.
|
|
150
178
|
*/
|
|
151
179
|
readonly type: 'file' | 'directory' | undefined;
|
|
180
|
+
/** Create the directory (recursively) when nothing exists at the path. */
|
|
181
|
+
readonly create: boolean;
|
|
152
182
|
}
|
|
153
183
|
/** Runtime descriptor for a flag alias. */
|
|
154
184
|
interface FlagAlias {
|
|
@@ -260,6 +290,15 @@ interface FlagSchema {
|
|
|
260
290
|
readonly prompt: PromptConfig | undefined;
|
|
261
291
|
/** Custom parse function (only when `kind === 'custom'`). */
|
|
262
292
|
readonly parseFn: FlagParseFn<unknown> | undefined;
|
|
293
|
+
/**
|
|
294
|
+
* Standard Schema v1 validator applied to the resolved value.
|
|
295
|
+
*
|
|
296
|
+
* When set, the value from any source (CLI, env, config, prompt, default)
|
|
297
|
+
* is validated after resolution via `~standard.validate`. Sync and async
|
|
298
|
+
* validators are both awaited; issues surface as a `CONSTRAINT_VIOLATED`
|
|
299
|
+
* {@link ValidationError}. Only meaningful when `kind === 'custom'`.
|
|
300
|
+
*/
|
|
301
|
+
readonly standard: StandardSchemaV1 | undefined;
|
|
263
302
|
/**
|
|
264
303
|
* Deprecation marker.
|
|
265
304
|
*
|
|
@@ -877,6 +916,31 @@ interface FlagFactory {
|
|
|
877
916
|
readonly flagKind: 'array';
|
|
878
917
|
readonly elementEligible: false;
|
|
879
918
|
}>;
|
|
919
|
+
/**
|
|
920
|
+
* Custom flag validated by a Standard Schema v1 validator (zod, valibot,
|
|
921
|
+
* arktype, …). The resolved value from any source is validated after
|
|
922
|
+
* resolution; the flag's value type is the validator's output type.
|
|
923
|
+
*
|
|
924
|
+
* Sync and async validators are both supported. Validation issues surface
|
|
925
|
+
* as a `CONSTRAINT_VIOLATED` error naming the flag.
|
|
926
|
+
*
|
|
927
|
+
* @example
|
|
928
|
+
* ```ts
|
|
929
|
+
* import { z } from 'zod';
|
|
930
|
+
* flag.custom(z.string().url())
|
|
931
|
+
* // inferred type: string | undefined
|
|
932
|
+
* ```
|
|
933
|
+
*
|
|
934
|
+
* @param schema - A Standard Schema v1 validator.
|
|
935
|
+
* @returns A {@link FlagBuilder} whose value type is the validator's output.
|
|
936
|
+
*/
|
|
937
|
+
custom<S extends StandardSchemaV1>(schema: S): FlagBuilder<{
|
|
938
|
+
readonly valueType: InferStandardOutput<S>;
|
|
939
|
+
readonly presence: 'optional';
|
|
940
|
+
readonly optionalFallback: 'undefined';
|
|
941
|
+
readonly flagKind: 'custom';
|
|
942
|
+
readonly elementEligible: true;
|
|
943
|
+
}>;
|
|
880
944
|
/**
|
|
881
945
|
* Custom-parsed flag. The parse function receives the raw value and must
|
|
882
946
|
* return a value of type `T`. The return type is inferred from `parseFn`.
|
|
@@ -939,7 +1003,7 @@ interface FlagFactory {
|
|
|
939
1003
|
* env, and config values are validated identically.
|
|
940
1004
|
*
|
|
941
1005
|
* @param options - Optional existence/type checks. `type` implies
|
|
942
|
-
* existence
|
|
1006
|
+
* existence unless `mustExist` is explicitly `false`.
|
|
943
1007
|
* @returns A {@link FlagBuilder} for path strings.
|
|
944
1008
|
*
|
|
945
1009
|
* @example
|
|
@@ -947,6 +1011,10 @@ interface FlagFactory {
|
|
|
947
1011
|
* flag.path() // any string, help shows <path>
|
|
948
1012
|
* flag.path({ mustExist: true }) // rejects missing paths
|
|
949
1013
|
* flag.path({ type: 'directory' }) // must exist and be a directory
|
|
1014
|
+
* flag.path({ type: 'directory', mustExist: false })
|
|
1015
|
+
* // missing passes; existing must be a directory
|
|
1016
|
+
* flag.path({ type: 'directory', create: true })
|
|
1017
|
+
* // created recursively when missing
|
|
950
1018
|
* ```
|
|
951
1019
|
*/
|
|
952
1020
|
path(options?: PathFlagOptions): FlagBuilder<{
|
|
@@ -1074,4 +1142,4 @@ interface FlagFactory {
|
|
|
1074
1142
|
*/
|
|
1075
1143
|
declare const flag: FlagFactory;
|
|
1076
1144
|
//#endregion
|
|
1077
|
-
export { type AllowedPromptConfig, type ConfirmPromptConfig, type DateFlagOptions, type DuplicatePolicy, FLAG_KINDS, FLAG_PRESENCES, type FlagAlias, FlagBuilder, type FlagConfig, type FlagFactory, type FlagKind, type FlagNegation, type FlagParseFn, type FlagPresence, type FlagSchema, type FlagSchemaOverrides, type InferFlag, type InferFlags, type InputPromptConfig, type MultiselectPromptConfig, type OptionalFallback, PROMPT_KINDS, type PathChecks, type PathFlagOptions, type PromptConfig, type PromptConfigBase, type PromptKind, type PromptResult, type ResolvedValue, type SelectChoice, type SelectPromptConfig, type StringConstraintViolation, type StringConstraints, type UrlFlagOptions, type WithPresence, createSchema, flag, getFlagAliasNames, getFlagNegatedName, normalizeFlagAlias, normalizeFlagAliases };
|
|
1145
|
+
export { type AllowedPromptConfig, type ConfirmPromptConfig, type DateFlagOptions, type DuplicatePolicy, FLAG_KINDS, FLAG_PRESENCES, type FlagAlias, FlagBuilder, type FlagConfig, type FlagFactory, type FlagKind, type FlagNegation, type FlagParseFn, type FlagPresence, type FlagSchema, type FlagSchemaOverrides, type InferFlag, type InferFlags, type InputPromptConfig, type MultiselectPromptConfig, type OptionalFallback, PROMPT_KINDS, type PathChecks, type PathFlagOptions, type PromptConfig, type PromptConfigBase, type PromptConfigByFlagKind, type PromptKind, type PromptResult, type ResolvedValue, type SelectChoice, type SelectPromptConfig, type StringConstraintViolation, type StringConstraints, type UrlFlagOptions, type WithPresence, type WithoutElementEligibility, createSchema, flag, getFlagAliasNames, getFlagNegatedName, normalizeFlagAlias, normalizeFlagAliases };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { assertNumberConstraints } from "./number-constraints.mjs";
|
|
2
|
+
import { isStandardSchemaV1 } from "./standard.mjs";
|
|
2
3
|
import { assertStringConstraints } from "./string-constraints.mjs";
|
|
3
4
|
import { parseBytesValue, parseDateValue, parseDurationValue, parseUrlValue } from "./value-parsers.mjs";
|
|
4
5
|
//#region src/core/schema/flag.ts
|
|
@@ -112,6 +113,7 @@ function createSchema(kind, overrides) {
|
|
|
112
113
|
valueHint: void 0,
|
|
113
114
|
prompt: void 0,
|
|
114
115
|
parseFn: void 0,
|
|
116
|
+
standard: void 0,
|
|
115
117
|
deprecated: void 0,
|
|
116
118
|
propagate: false,
|
|
117
119
|
negation: void 0,
|
|
@@ -655,8 +657,9 @@ const flag = {
|
|
|
655
657
|
array(element) {
|
|
656
658
|
return new FlagBuilder(createSchema("array", { elementSchema: element.schema }));
|
|
657
659
|
},
|
|
658
|
-
custom(
|
|
659
|
-
return new FlagBuilder(createSchema("custom", {
|
|
660
|
+
custom(parseFnOrSchema) {
|
|
661
|
+
if (isStandardSchemaV1(parseFnOrSchema)) return new FlagBuilder(createSchema("custom", { standard: parseFnOrSchema }));
|
|
662
|
+
return new FlagBuilder(createSchema("custom", { parseFn: parseFnOrSchema }));
|
|
660
663
|
},
|
|
661
664
|
url(options) {
|
|
662
665
|
return new FlagBuilder(createSchema("custom", {
|
|
@@ -668,7 +671,8 @@ const flag = {
|
|
|
668
671
|
return new FlagBuilder(createSchema("string", {
|
|
669
672
|
pathChecks: options?.mustExist === true || options?.type !== void 0 ? {
|
|
670
673
|
mustExist: options.mustExist ?? true,
|
|
671
|
-
type: options.type
|
|
674
|
+
type: options.type,
|
|
675
|
+
create: options.type === "directory" && options.create === true
|
|
672
676
|
} : void 0,
|
|
673
677
|
valueHint: "path"
|
|
674
678
|
}));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ActivityEvent, Fallback, ProgressHandle, ProgressOptions, SpinnerHandle, SpinnerOptions, TableColumn, TableFormat, TableOptions, TableStream } from "./activity.mjs";
|
|
2
2
|
import { NumberConstraintViolation, NumberConstraints, describeNumberConstraintViolation, validateNumberConstraints } from "./number-constraints.mjs";
|
|
3
|
+
import { InferStandardInput, InferStandardOutput, StandardSchemaV1, StandardSchemaV1FailureResult, StandardSchemaV1Issue, StandardSchemaV1Options, StandardSchemaV1PathSegment, StandardSchemaV1Props, StandardSchemaV1Result, StandardSchemaV1SuccessResult, StandardSchemaV1Types } from "./standard.mjs";
|
|
3
4
|
import { ARG_KINDS, ARG_PRESENCES, ArgBuilder, ArgConfig, ArgFactory, ArgKind, ArgParseFn, ArgPresence, ArgSchema, InferArg, InferArgs, ResolvedArgValue, WithArgPresence, WithVariadic, arg, createArgSchema } from "./arg.mjs";
|
|
4
5
|
import { ConfirmPromptConfig, InputPromptConfig, MultiselectPromptConfig, PROMPT_KINDS, PromptConfig, PromptConfigBase, PromptKind, PromptResult, SelectChoice, SelectPromptConfig } from "./prompt.mjs";
|
|
5
6
|
import { StringConstraintViolation, StringConstraints, describeStringConstraintViolation, validateStringConstraints } from "./string-constraints.mjs";
|
|
@@ -7,5 +8,5 @@ import { DateFlagOptions, UrlFlagOptions } from "./value-parsers.mjs";
|
|
|
7
8
|
import { DuplicatePolicy, FLAG_KINDS, FLAG_PRESENCES, FlagAlias, FlagBuilder, FlagConfig, FlagFactory, FlagKind, FlagNegation, FlagParseFn, FlagPresence, FlagSchema, FlagSchemaOverrides, InferFlag, InferFlags, PathChecks, PathFlagOptions, ResolvedValue, WithPresence, createSchema, flag, getFlagNegatedName } from "./flag.mjs";
|
|
8
9
|
import { ErasedMiddlewareHandler, Middleware, MiddlewareHandler, MiddlewareParams, middleware } from "./middleware.mjs";
|
|
9
10
|
import { RunOptions, RunResult } from "./run.mjs";
|
|
10
|
-
import { ActionHandler, ActionParams, AnyCommandBuilder, CommandArgEntry, CommandBuilder, CommandConfig, CommandExample, CommandMeta, CommandSchema, DeriveHandler, DeriveParams, ErasedCommand, ErasedDeriveHandler, ErasedInteractiveResolver, InteractiveParams, InteractiveResolver, InteractiveResult, Out, command, group } from "./command.mjs";
|
|
11
|
-
export { ARG_KINDS, ARG_PRESENCES, type ActionHandler, type ActionParams, type ActivityEvent, type AnyCommandBuilder, ArgBuilder, type ArgConfig, type ArgFactory, type ArgKind, type ArgParseFn, type ArgPresence, type ArgSchema, type CommandArgEntry, CommandBuilder, type CommandConfig, type CommandExample, type CommandMeta, type CommandSchema, type ConfirmPromptConfig, type DateFlagOptions, type DeriveHandler, type DeriveParams, type DuplicatePolicy, type ErasedCommand, type ErasedDeriveHandler, type ErasedInteractiveResolver, type ErasedMiddlewareHandler, FLAG_KINDS, FLAG_PRESENCES, type Fallback, type FlagAlias, FlagBuilder, type FlagConfig, type FlagFactory, type FlagKind, type FlagNegation, type FlagParseFn, type FlagPresence, type FlagSchema, type FlagSchemaOverrides, type InferArg, type InferArgs, type InferFlag, type InferFlags, type InputPromptConfig, type InteractiveParams, type InteractiveResolver, type InteractiveResult, type Middleware, type MiddlewareHandler, type MiddlewareParams, type MultiselectPromptConfig, type NumberConstraintViolation, type NumberConstraints, type Out, PROMPT_KINDS, type PathChecks, type PathFlagOptions, type ProgressHandle, type ProgressOptions, type PromptConfig, type PromptConfigBase, type PromptKind, type PromptResult, type ResolvedArgValue, type ResolvedValue, type RunOptions, type RunResult, type SelectChoice, type SelectPromptConfig, type SpinnerHandle, type SpinnerOptions, type StringConstraintViolation, type StringConstraints, type TableColumn, type TableFormat, type TableOptions, type TableStream, type UrlFlagOptions, type WithArgPresence, type WithPresence, type WithVariadic, arg, command, createArgSchema, createSchema, describeNumberConstraintViolation, describeStringConstraintViolation, flag, getFlagNegatedName, group, middleware, validateNumberConstraints, validateStringConstraints };
|
|
11
|
+
import { ActionHandler, ActionParams, AnyCommandBuilder, CommandArgEntry, CommandBuilder, CommandConfig, CommandExample, CommandMeta, CommandSchema, DeriveHandler, DeriveParams, ErasedCommand, ErasedDeriveHandler, ErasedInteractiveResolver, ExampleCommand, ExampleMeta, InteractiveParams, InteractiveResolver, InteractiveResult, Out, command, group, resolveExampleCommand } from "./command.mjs";
|
|
12
|
+
export { ARG_KINDS, ARG_PRESENCES, type ActionHandler, type ActionParams, type ActivityEvent, type AnyCommandBuilder, ArgBuilder, type ArgConfig, type ArgFactory, type ArgKind, type ArgParseFn, type ArgPresence, type ArgSchema, type CommandArgEntry, CommandBuilder, type CommandConfig, type CommandExample, type CommandMeta, type CommandSchema, type ConfirmPromptConfig, type DateFlagOptions, type DeriveHandler, type DeriveParams, type DuplicatePolicy, type ErasedCommand, type ErasedDeriveHandler, type ErasedInteractiveResolver, type ErasedMiddlewareHandler, type ExampleCommand, type ExampleMeta, FLAG_KINDS, FLAG_PRESENCES, type Fallback, type FlagAlias, FlagBuilder, type FlagConfig, type FlagFactory, type FlagKind, type FlagNegation, type FlagParseFn, type FlagPresence, type FlagSchema, type FlagSchemaOverrides, type InferArg, type InferArgs, type InferFlag, type InferFlags, type InferStandardInput, type InferStandardOutput, type InputPromptConfig, type InteractiveParams, type InteractiveResolver, type InteractiveResult, type Middleware, type MiddlewareHandler, type MiddlewareParams, type MultiselectPromptConfig, type NumberConstraintViolation, type NumberConstraints, type Out, PROMPT_KINDS, type PathChecks, type PathFlagOptions, type ProgressHandle, type ProgressOptions, type PromptConfig, type PromptConfigBase, type PromptKind, type PromptResult, type ResolvedArgValue, type ResolvedValue, type RunOptions, type RunResult, type SelectChoice, type SelectPromptConfig, type SpinnerHandle, type SpinnerOptions, type StandardSchemaV1, type StandardSchemaV1FailureResult, type StandardSchemaV1Issue, type StandardSchemaV1Options, type StandardSchemaV1PathSegment, type StandardSchemaV1Props, type StandardSchemaV1Result, type StandardSchemaV1SuccessResult, type StandardSchemaV1Types, type StringConstraintViolation, type StringConstraints, type TableColumn, type TableFormat, type TableOptions, type TableStream, type UrlFlagOptions, type WithArgPresence, type WithPresence, type WithVariadic, arg, command, createArgSchema, createSchema, describeNumberConstraintViolation, describeStringConstraintViolation, flag, getFlagNegatedName, group, middleware, resolveExampleCommand, validateNumberConstraints, validateStringConstraints };
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* @module dreamcli/core/schema/prompt
|
|
11
11
|
*/
|
|
12
12
|
/** All prompt kind discriminators as a runtime array. */
|
|
13
|
-
declare const PROMPT_KINDS: readonly [
|
|
13
|
+
declare const PROMPT_KINDS: readonly ["confirm", "input", "select", "multiselect"];
|
|
14
14
|
/**
|
|
15
15
|
* The kind of interactive prompt to present.
|
|
16
16
|
*
|
|
@@ -68,6 +68,13 @@ interface RunOptions {
|
|
|
68
68
|
* override), path checks are skipped.
|
|
69
69
|
*/
|
|
70
70
|
readonly stat?: (path: string) => Promise<'file' | 'directory' | null>;
|
|
71
|
+
/**
|
|
72
|
+
* Recursive directory creation for `flag.path()` `create` checks.
|
|
73
|
+
*
|
|
74
|
+
* `CLIBuilder.run()` supplies the runtime adapter's implementation
|
|
75
|
+
* automatically. When absent, missing paths are not created.
|
|
76
|
+
*/
|
|
77
|
+
readonly mkdir?: (path: string) => Promise<void>;
|
|
71
78
|
/**
|
|
72
79
|
* Verbosity level for the output channel.
|
|
73
80
|
* @defaultValue `'normal'`
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
//#region src/core/schema/standard.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* The Standard Schema v1 interface, vendored as types only.
|
|
4
|
+
*
|
|
5
|
+
* Mirrors the specification at https://standardschema.dev so validators from
|
|
6
|
+
* zod, valibot, arktype, and any other conforming library can be passed to
|
|
7
|
+
* `flag.custom()` / `arg.custom()` without adding a runtime dependency.
|
|
8
|
+
*
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
/** A schema that conforms to the Standard Schema v1 specification. */
|
|
12
|
+
interface StandardSchemaV1<Input = unknown, Output = Input> {
|
|
13
|
+
/** The Standard Schema properties, namespaced under a well-known key. */
|
|
14
|
+
readonly '~standard': StandardSchemaV1.Props<Input, Output>;
|
|
15
|
+
}
|
|
16
|
+
/** Types copied from the Standard Schema v1 specification. */
|
|
17
|
+
declare namespace StandardSchemaV1 {
|
|
18
|
+
/** The properties exposed under a validator's `~standard` key. */
|
|
19
|
+
interface Props<Input = unknown, Output = Input> {
|
|
20
|
+
/** The version number of the specification. */
|
|
21
|
+
readonly version: 1;
|
|
22
|
+
/** The vendor name of the schema library. */
|
|
23
|
+
readonly vendor: string;
|
|
24
|
+
/** Validate an unknown value, returning its output or the issues found. */
|
|
25
|
+
readonly validate: (value: unknown, options?: Options | undefined) => Result<Output> | Promise<Result<Output>>;
|
|
26
|
+
/** Inferred input and output types, present only at the type level. */
|
|
27
|
+
readonly types?: Types<Input, Output> | undefined;
|
|
28
|
+
}
|
|
29
|
+
/** Optional parameters passed to a validator. */
|
|
30
|
+
interface Options {
|
|
31
|
+
/** Explicit support for vendor-specific validation parameters. */
|
|
32
|
+
readonly libraryOptions?: Record<string, unknown> | undefined;
|
|
33
|
+
}
|
|
34
|
+
/** The result of validating a value: either its output or a list of issues. */
|
|
35
|
+
type Result<Output> = SuccessResult<Output> | FailureResult;
|
|
36
|
+
/** A successful validation carrying the parsed output value. */
|
|
37
|
+
interface SuccessResult<Output> {
|
|
38
|
+
/** The validated (and possibly transformed) value. */
|
|
39
|
+
readonly value: Output;
|
|
40
|
+
/** Absent on success. */
|
|
41
|
+
readonly issues?: undefined;
|
|
42
|
+
}
|
|
43
|
+
/** A failed validation carrying validation issues. */
|
|
44
|
+
interface FailureResult {
|
|
45
|
+
/** The issues that caused validation to fail. */
|
|
46
|
+
readonly issues: ReadonlyArray<Issue>;
|
|
47
|
+
}
|
|
48
|
+
/** A single validation issue. */
|
|
49
|
+
interface Issue {
|
|
50
|
+
/** The human-readable error message. */
|
|
51
|
+
readonly message: string;
|
|
52
|
+
/** The path to the offending value, when the validator reports one. */
|
|
53
|
+
readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
|
|
54
|
+
}
|
|
55
|
+
/** One segment of an issue path. */
|
|
56
|
+
interface PathSegment {
|
|
57
|
+
/** The key of this path segment. */
|
|
58
|
+
readonly key: PropertyKey;
|
|
59
|
+
}
|
|
60
|
+
/** The type-level input and output carried by a validator. */
|
|
61
|
+
interface Types<Input = unknown, Output = Input> {
|
|
62
|
+
/** The input type accepted by the validator. */
|
|
63
|
+
readonly input: Input;
|
|
64
|
+
/** The output type produced by the validator. */
|
|
65
|
+
readonly output: Output;
|
|
66
|
+
}
|
|
67
|
+
/** Infer the input type of a Standard Schema validator. */
|
|
68
|
+
type InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema['~standard']['types']>['input'];
|
|
69
|
+
/** Infer the output type of a Standard Schema validator. */
|
|
70
|
+
type InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema['~standard']['types']>['output'];
|
|
71
|
+
}
|
|
72
|
+
/** Backward-compatible flat alias for {@link StandardSchemaV1.Props}. */
|
|
73
|
+
type StandardSchemaV1Props<Input = unknown, Output = Input> = StandardSchemaV1.Props<Input, Output>;
|
|
74
|
+
/** Flat alias for {@link StandardSchemaV1.Options}. */
|
|
75
|
+
type StandardSchemaV1Options = StandardSchemaV1.Options;
|
|
76
|
+
/** Flat alias for {@link StandardSchemaV1.Result}. */
|
|
77
|
+
type StandardSchemaV1Result<Output> = StandardSchemaV1.Result<Output>;
|
|
78
|
+
/** Flat alias for {@link StandardSchemaV1.SuccessResult}. */
|
|
79
|
+
type StandardSchemaV1SuccessResult<Output> = StandardSchemaV1.SuccessResult<Output>;
|
|
80
|
+
/** Flat alias for {@link StandardSchemaV1.FailureResult}. */
|
|
81
|
+
type StandardSchemaV1FailureResult = StandardSchemaV1.FailureResult;
|
|
82
|
+
/** Flat alias for {@link StandardSchemaV1.Issue}. */
|
|
83
|
+
type StandardSchemaV1Issue = StandardSchemaV1.Issue;
|
|
84
|
+
/** Flat alias for {@link StandardSchemaV1.PathSegment}. */
|
|
85
|
+
type StandardSchemaV1PathSegment = StandardSchemaV1.PathSegment;
|
|
86
|
+
/** Backward-compatible flat alias for {@link StandardSchemaV1.Types}. */
|
|
87
|
+
type StandardSchemaV1Types<Input = unknown, Output = Input> = StandardSchemaV1.Types<Input, Output>;
|
|
88
|
+
/** Flat alias for {@link StandardSchemaV1.InferInput}. */
|
|
89
|
+
type InferStandardInput<Schema extends StandardSchemaV1> = StandardSchemaV1.InferInput<Schema>;
|
|
90
|
+
/** Flat alias for {@link StandardSchemaV1.InferOutput}. */
|
|
91
|
+
type InferStandardOutput<Schema extends StandardSchemaV1> = StandardSchemaV1.InferOutput<Schema>;
|
|
92
|
+
/**
|
|
93
|
+
* Detect a Standard Schema validator without assuming validators are plain
|
|
94
|
+
* objects. Some conforming libraries expose callable schema values.
|
|
95
|
+
*
|
|
96
|
+
* @internal
|
|
97
|
+
*/
|
|
98
|
+
declare function isStandardSchemaV1(value: unknown): value is StandardSchemaV1;
|
|
99
|
+
//#endregion
|
|
100
|
+
export { InferStandardInput, InferStandardOutput, StandardSchemaV1, StandardSchemaV1FailureResult, StandardSchemaV1Issue, StandardSchemaV1Options, StandardSchemaV1PathSegment, StandardSchemaV1Props, StandardSchemaV1Result, StandardSchemaV1SuccessResult, StandardSchemaV1Types, isStandardSchemaV1 };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/core/schema/standard.ts
|
|
2
|
+
/**
|
|
3
|
+
* Detect a Standard Schema validator without assuming validators are plain
|
|
4
|
+
* objects. Some conforming libraries expose callable schema values.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
function isStandardSchemaV1(value) {
|
|
9
|
+
if (value === null || typeof value !== "object" && typeof value !== "function") return false;
|
|
10
|
+
if (!("~standard" in value)) return false;
|
|
11
|
+
const properties = value["~standard"];
|
|
12
|
+
return properties !== null && typeof properties === "object" && "version" in properties && properties.version === 1 && "validate" in properties && typeof properties.validate === "function";
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { isStandardSchemaV1 };
|
|
@@ -5,7 +5,8 @@ import { RunnableCommand } from "../schema/command.mjs";
|
|
|
5
5
|
* Run a command builder against the given argv with injected options.
|
|
6
6
|
*
|
|
7
7
|
* This is the testkit wrapper around the shared executor:
|
|
8
|
-
* 1. Apply the CLI root-flag layer (detect/strip `--json`) so
|
|
8
|
+
* 1. Apply the CLI root-flag layer (detect/strip `--json` and `--quiet`/`-q`) so
|
|
9
|
+
* copied real argv works
|
|
9
10
|
* 2. Create or reuse capture output
|
|
10
11
|
* 3. Build standalone schema/meta defaults when CLI dispatch did not
|
|
11
12
|
* 4. Delegate parse -> resolve -> execute to the shared executor
|
|
@@ -15,10 +16,11 @@ import { RunnableCommand } from "../schema/command.mjs";
|
|
|
15
16
|
* with appropriate exit codes. The function never throws.
|
|
16
17
|
*
|
|
17
18
|
* @param cmd - The command builder (must have an action handler)
|
|
18
|
-
* @param argv - Raw argv strings (NOT including the command name itself).
|
|
19
|
-
* CLI-level `--json` before the `--` separator
|
|
20
|
-
* just like the real CLI root — so `['--json']` enables
|
|
21
|
-
*
|
|
19
|
+
* @param argv - Raw argv strings (NOT including the command name itself).
|
|
20
|
+
* CLI-level `--json` and `--quiet`/`-q` before the `--` separator are honored
|
|
21
|
+
* and stripped here, just like the real CLI root — so `['--json']` enables
|
|
22
|
+
* JSON mode and `['--quiet']` sets quiet verbosity rather than failing as
|
|
23
|
+
* unknown flags. Equivalent to `{ jsonMode: true }` / `{ verbosity: 'quiet' }`.
|
|
22
24
|
* @param options - Injectable runtime state
|
|
23
25
|
* @returns Structured run result with exit code and captured output
|
|
24
26
|
*/
|
|
@@ -21,7 +21,8 @@ import { buildRunResult, executeCommand } from "../execution/index.mjs";
|
|
|
21
21
|
* Run a command builder against the given argv with injected options.
|
|
22
22
|
*
|
|
23
23
|
* This is the testkit wrapper around the shared executor:
|
|
24
|
-
* 1. Apply the CLI root-flag layer (detect/strip `--json`) so
|
|
24
|
+
* 1. Apply the CLI root-flag layer (detect/strip `--json` and `--quiet`/`-q`) so
|
|
25
|
+
* copied real argv works
|
|
25
26
|
* 2. Create or reuse capture output
|
|
26
27
|
* 3. Build standalone schema/meta defaults when CLI dispatch did not
|
|
27
28
|
* 4. Delegate parse -> resolve -> execute to the shared executor
|
|
@@ -31,17 +32,21 @@ import { buildRunResult, executeCommand } from "../execution/index.mjs";
|
|
|
31
32
|
* with appropriate exit codes. The function never throws.
|
|
32
33
|
*
|
|
33
34
|
* @param cmd - The command builder (must have an action handler)
|
|
34
|
-
* @param argv - Raw argv strings (NOT including the command name itself).
|
|
35
|
-
* CLI-level `--json` before the `--` separator
|
|
36
|
-
* just like the real CLI root — so `['--json']` enables
|
|
37
|
-
*
|
|
35
|
+
* @param argv - Raw argv strings (NOT including the command name itself).
|
|
36
|
+
* CLI-level `--json` and `--quiet`/`-q` before the `--` separator are honored
|
|
37
|
+
* and stripped here, just like the real CLI root — so `['--json']` enables
|
|
38
|
+
* JSON mode and `['--quiet']` sets quiet verbosity rather than failing as
|
|
39
|
+
* unknown flags. Equivalent to `{ jsonMode: true }` / `{ verbosity: 'quiet' }`.
|
|
38
40
|
* @param options - Injectable runtime state
|
|
39
41
|
* @returns Structured run result with exit code and captured output
|
|
40
42
|
*/
|
|
41
43
|
async function runCommand(cmd, argv, options) {
|
|
42
44
|
const hasJsonFlag = includesBeforeSeparator(argv, "--json");
|
|
43
45
|
const jsonMode = hasJsonFlag || options?.jsonMode === true;
|
|
44
|
-
const
|
|
46
|
+
const hasQuietFlag = includesBeforeSeparator(argv, "--quiet") || includesBeforeSeparator(argv, "-q");
|
|
47
|
+
const verbosity = hasQuietFlag ? "quiet" : options?.verbosity;
|
|
48
|
+
let effectiveArgv = hasJsonFlag ? stripBeforeSeparator(argv, "--json") : argv;
|
|
49
|
+
if (hasQuietFlag) effectiveArgv = stripBeforeSeparator(stripBeforeSeparator(effectiveArgv, "--quiet"), "-q");
|
|
45
50
|
let out;
|
|
46
51
|
let captured;
|
|
47
52
|
if (options?.out !== void 0) {
|
|
@@ -53,7 +58,7 @@ async function runCommand(cmd, argv, options) {
|
|
|
53
58
|
};
|
|
54
59
|
} else {
|
|
55
60
|
const captureOptions = {
|
|
56
|
-
...
|
|
61
|
+
...verbosity !== void 0 ? { verbosity } : {},
|
|
57
62
|
...jsonMode ? { jsonMode } : {},
|
|
58
63
|
...options?.isTTY !== void 0 ? { isTTY: options.isTTY } : {}
|
|
59
64
|
};
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ActivityEvent, Fallback, ProgressHandle, ProgressOptions, SpinnerHandle, SpinnerOptions, TableColumn, TableFormat, TableOptions, TableStream } from "./core/schema/activity.mjs";
|
|
2
2
|
import { NumberConstraintViolation, NumberConstraints } from "./core/schema/number-constraints.mjs";
|
|
3
|
+
import { InferStandardInput, InferStandardOutput, StandardSchemaV1, StandardSchemaV1FailureResult, StandardSchemaV1Issue, StandardSchemaV1Options, StandardSchemaV1PathSegment, StandardSchemaV1Props, StandardSchemaV1Result, StandardSchemaV1SuccessResult, StandardSchemaV1Types } from "./core/schema/standard.mjs";
|
|
3
4
|
import { ArgBuilder, ArgConfig, ArgFactory, ArgKind, ArgParseFn, ArgPresence, ArgSchema, InferArg, InferArgs, ResolvedArgValue, WithArgPresence, WithVariadic, arg, createArgSchema } from "./core/schema/arg.mjs";
|
|
4
5
|
import { ConfirmPromptConfig, InputPromptConfig, MultiselectPromptConfig, PromptConfig, PromptConfigBase, PromptKind, PromptResult, SelectChoice, SelectPromptConfig } from "./core/schema/prompt.mjs";
|
|
5
6
|
import { StringConstraintViolation, StringConstraints } from "./core/schema/string-constraints.mjs";
|
|
@@ -18,9 +19,9 @@ import { HelpTheme, HelpThemeFactory } from "./core/help/theme.mjs";
|
|
|
18
19
|
import { osc8, visibleWidth } from "./core/help/ansi.mjs";
|
|
19
20
|
import { HelpOptions, formatHelp } from "./core/help/index.mjs";
|
|
20
21
|
import { RunResult } from "./core/schema/run.mjs";
|
|
21
|
-
import { ActionHandler, ActionParams, AnyCommandBuilder, CommandArgEntry, CommandBuilder, CommandConfig, CommandExample, CommandMeta, CommandSchema, DeriveHandler, DeriveParams, InteractiveParams, InteractiveResolver, InteractiveResult, Out, command, group } from "./core/schema/command.mjs";
|
|
22
|
+
import { ActionHandler, ActionParams, AnyCommandBuilder, CommandArgEntry, CommandBuilder, CommandConfig, CommandExample, CommandMeta, CommandSchema, DeriveHandler, DeriveParams, ExampleCommand, ExampleMeta, InteractiveParams, InteractiveResolver, InteractiveResult, Out, command, group, resolveExampleCommand } from "./core/schema/command.mjs";
|
|
22
23
|
import "./core/schema/index.mjs";
|
|
23
|
-
import { ParseOptions, ParseResult, Token, parse, tokenize } from "./core/parse/index.mjs";
|
|
24
|
+
import { ParseOptions, ParseResult, Token, includesBeforeSeparator, parse, stripBeforeSeparator, tokenize } from "./core/parse/index.mjs";
|
|
24
25
|
import { ManifestDiscoveryOptions, PackageJsonAdapter, PackageJsonData, PackageRepository, PackageRepositoryUrlOptions, discoverManifest, discoverPackageJson, inferCliName, packageRepositoryUrl } from "./core/config/package-json.mjs";
|
|
25
26
|
import { HelpLinks } from "./core/cli/help-links.mjs";
|
|
26
27
|
import { CompletionOptions } from "./core/completion/shells/shared.mjs";
|
|
@@ -30,7 +31,7 @@ import { generatePowerShellCompletion } from "./core/completion/shells/powershel
|
|
|
30
31
|
import { generateZshCompletion } from "./core/completion/shells/zsh.mjs";
|
|
31
32
|
import { SHELLS, Shell, generateCompletion } from "./core/completion/index.mjs";
|
|
32
33
|
import { ConfigAdapter, ConfigDiscoveryOptions, ConfigDiscoveryResult, ConfigFound, ConfigNotFound, FormatLoader, buildConfigSearchPaths, configFormat, discoverConfig } from "./core/config/index.mjs";
|
|
33
|
-
import { CLIBuilder, CLIOptions, CLIRunOptions, CLISchema, ConfigSettings, DefaultCommandOptions, InferNameOption, ManifestPresetSettings, ManifestSettings, PackageJsonSettings, ResolvedManifestSettings, cli } from "./core/cli/index.mjs";
|
|
34
|
+
import { CLIBuilder, CLIOptions, CLIRunOptions, CLISchema, ConfigSettings, DefaultCommandOptions, InferNameOption, ManifestPresetSettings, ManifestSettings, PackageJsonSettings, RenderContext, RenderContextOptions, ResolvedManifestSettings, cli, isMainModule, resolveRenderContext } from "./core/cli/index.mjs";
|
|
34
35
|
import { JsonSchemaOptions, definitionMetaSchema, generateCommandSchema, generateInputSchema, generateSchema } from "./core/json-schema/index.mjs";
|
|
35
36
|
import { Colors } from "ansispeck";
|
|
36
|
-
export { type ActionHandler, type ActionParams, type ActivityEvent, type AnyCommandBuilder, ArgBuilder, type ArgConfig, type ArgFactory, type ArgKind, type ArgParseFn, type ArgPresence, type ArgSchema, type BeforeParseParams, CLIBuilder, CLIError, type CLIErrorJSON, type CLIErrorOptions, type CLIOptions, type CLIPlugin, type CLIPluginHooks, type CLIRunOptions, type CLISchema, type Colors, type CommandArgEntry, CommandBuilder, type CommandConfig, type CommandExample, type CommandMeta, type CommandSchema, type CompletionOptions, type ConfigAdapter, type ConfigDiscoveryOptions, type ConfigDiscoveryResult, type ConfigFound, type ConfigNotFound, type ConfigSettings, type ConfirmPromptConfig, type DateFlagOptions, type DefaultCommandOptions, type DeprecationWarning, type DeriveHandler, type DeriveParams, type DuplicatePolicy, type ErrorCode, type Fallback, FlagBuilder, type FlagConfig, type FlagFactory, type FlagKind, type FlagNegation, type FlagParseFn, type FlagPresence, type FlagSchema, type FormatLoader, type HelpLinks, type HelpOptions, type HelpTheme, type HelpThemeFactory, type InferArg, type InferArgs, type InferFlag, type InferFlags, type InferNameOption, type InputPromptConfig, type InteractiveParams, type InteractiveResolver, type InteractiveResult, type JsonSchemaOptions, type ManifestDiscoveryOptions, type ManifestPresetSettings, type ManifestSettings, type Middleware, type MiddlewareHandler, type MiddlewareParams, type MultiselectPromptConfig, type NumberConstraintViolation, type NumberConstraints, type Out, type OutputOptions, type PackageJsonAdapter, type PackageJsonData, type PackageJsonSettings, type PackageRepository, type PackageRepositoryUrlOptions, ParseError, type ParseErrorCode, type ParseErrorOptions, type ParseOptions, type ParseResult, type PathChecks, type PathFlagOptions, type PluginCommandContext, type ProgressHandle, type ProgressOptions, type PromptConfig, type PromptConfigBase, type PromptEngine, type PromptKind, type PromptResult, type ReadFn, type ResolveOptions, type ResolveResult, type ResolvedArgValue, type ResolvedCommandParams, type ResolvedManifestSettings, type ResolvedMultiselectPromptConfig, type ResolvedPromptConfig, type ResolvedSelectPromptConfig, type ResolvedValue, type RunResult, SHELLS, type SelectChoice, type SelectPromptConfig, type Shell, type SpinnerHandle, type SpinnerOptions, type StringConstraintViolation, type StringConstraints, type TableColumn, type TableFormat, type TableOptions, type TableStream, type Token, type UrlFlagOptions, ValidationError, type ValidationErrorCode, type ValidationErrorOptions, type Verbosity, type WithArgPresence, type WithPresence, type WithVariadic, type WriteFn, arg, buildConfigSearchPaths, cli, command, configFormat, createArgSchema, createOutput, createSchema, createTerminalPrompter, definitionMetaSchema, discoverConfig, discoverManifest, discoverPackageJson, flag, formatHelp, generateBashCompletion, generateCommandSchema, generateCompletion, generateFishCompletion, generateInputSchema, generatePowerShellCompletion, generateSchema, generateZshCompletion, getFlagNegatedName, group, inferCliName, isCLIError, isParseError, isValidationError, middleware, osc8, packageRepositoryUrl, parse, plugin, resolve, resolvePromptConfig, tokenize, visibleWidth };
|
|
37
|
+
export { type ActionHandler, type ActionParams, type ActivityEvent, type AnyCommandBuilder, ArgBuilder, type ArgConfig, type ArgFactory, type ArgKind, type ArgParseFn, type ArgPresence, type ArgSchema, type BeforeParseParams, CLIBuilder, CLIError, type CLIErrorJSON, type CLIErrorOptions, type CLIOptions, type CLIPlugin, type CLIPluginHooks, type CLIRunOptions, type CLISchema, type Colors, type CommandArgEntry, CommandBuilder, type CommandConfig, type CommandExample, type CommandMeta, type CommandSchema, type CompletionOptions, type ConfigAdapter, type ConfigDiscoveryOptions, type ConfigDiscoveryResult, type ConfigFound, type ConfigNotFound, type ConfigSettings, type ConfirmPromptConfig, type DateFlagOptions, type DefaultCommandOptions, type DeprecationWarning, type DeriveHandler, type DeriveParams, type DuplicatePolicy, type ErrorCode, type ExampleCommand, type ExampleMeta, type Fallback, FlagBuilder, type FlagConfig, type FlagFactory, type FlagKind, type FlagNegation, type FlagParseFn, type FlagPresence, type FlagSchema, type FormatLoader, type HelpLinks, type HelpOptions, type HelpTheme, type HelpThemeFactory, type InferArg, type InferArgs, type InferFlag, type InferFlags, type InferNameOption, type InferStandardInput, type InferStandardOutput, type InputPromptConfig, type InteractiveParams, type InteractiveResolver, type InteractiveResult, type JsonSchemaOptions, type ManifestDiscoveryOptions, type ManifestPresetSettings, type ManifestSettings, type Middleware, type MiddlewareHandler, type MiddlewareParams, type MultiselectPromptConfig, type NumberConstraintViolation, type NumberConstraints, type Out, type OutputOptions, type PackageJsonAdapter, type PackageJsonData, type PackageJsonSettings, type PackageRepository, type PackageRepositoryUrlOptions, ParseError, type ParseErrorCode, type ParseErrorOptions, type ParseOptions, type ParseResult, type PathChecks, type PathFlagOptions, type PluginCommandContext, type ProgressHandle, type ProgressOptions, type PromptConfig, type PromptConfigBase, type PromptEngine, type PromptKind, type PromptResult, type ReadFn, type RenderContext, type RenderContextOptions, type ResolveOptions, type ResolveResult, type ResolvedArgValue, type ResolvedCommandParams, type ResolvedManifestSettings, type ResolvedMultiselectPromptConfig, type ResolvedPromptConfig, type ResolvedSelectPromptConfig, type ResolvedValue, type RunResult, SHELLS, type SelectChoice, type SelectPromptConfig, type Shell, type SpinnerHandle, type SpinnerOptions, type StandardSchemaV1, type StandardSchemaV1FailureResult, type StandardSchemaV1Issue, type StandardSchemaV1Options, type StandardSchemaV1PathSegment, type StandardSchemaV1Props, type StandardSchemaV1Result, type StandardSchemaV1SuccessResult, type StandardSchemaV1Types, type StringConstraintViolation, type StringConstraints, type TableColumn, type TableFormat, type TableOptions, type TableStream, type Token, type UrlFlagOptions, ValidationError, type ValidationErrorCode, type ValidationErrorOptions, type Verbosity, type WithArgPresence, type WithPresence, type WithVariadic, type WriteFn, arg, buildConfigSearchPaths, cli, command, configFormat, createArgSchema, createOutput, createSchema, createTerminalPrompter, definitionMetaSchema, discoverConfig, discoverManifest, discoverPackageJson, flag, formatHelp, generateBashCompletion, generateCommandSchema, generateCompletion, generateFishCompletion, generateInputSchema, generatePowerShellCompletion, generateSchema, generateZshCompletion, getFlagNegatedName, group, includesBeforeSeparator, inferCliName, isCLIError, isMainModule, isParseError, isValidationError, middleware, osc8, packageRepositoryUrl, parse, plugin, resolve, resolveExampleCommand, resolvePromptConfig, resolveRenderContext, stripBeforeSeparator, tokenize, visibleWidth };
|