@kjanat/dreamcli 4.0.0-rc.1 → 4.0.0-rc.3
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 +516 -1842
- package/dist/core/cli/builtins.d.mts +74 -4
- package/dist/core/cli/compiled.d.mts +39 -2
- package/dist/core/cli/dispatch.d.mts +81 -4
- package/dist/core/cli/help-links.d.mts +13 -1
- package/dist/core/cli/index.d.mts +77 -12
- package/dist/core/cli/index.mjs +9 -3
- package/dist/core/cli/planner.d.mts +86 -8
- package/dist/core/cli/reserved-flags.d.mts +19 -1
- package/dist/core/cli/root-help.d.mts +53 -1
- package/dist/core/cli/root-help.mjs +1 -1
- package/dist/core/cli/root-output-flags.d.mts +74 -1
- package/dist/core/cli/root-surface.d.mts +64 -1
- package/dist/core/cli/runtime-preflight.d.mts +213 -1
- package/dist/core/completion/index.d.mts +2 -2
- package/dist/core/completion/shells/bash.d.mts +1 -0
- package/dist/core/completion/shells/bash.mjs +4 -1
- package/dist/core/completion/shells/fish.d.mts +1 -0
- package/dist/core/completion/shells/fish.mjs +2 -1
- package/dist/core/completion/shells/powershell.d.mts +1 -0
- package/dist/core/completion/shells/powershell.mjs +2 -1
- package/dist/core/completion/shells/shared.d.mts +118 -3
- package/dist/core/completion/shells/shared.mjs +1 -1
- package/dist/core/completion/shells/zsh.d.mts +1 -0
- package/dist/core/completion/shells/zsh.mjs +6 -2
- package/dist/core/config/index.d.mts +1 -1
- package/dist/core/config/package-json.d.mts +1 -1
- package/dist/core/errors/index.d.mts +17 -18
- package/dist/core/execution/index.d.mts +61 -1
- package/dist/core/help/ansi.d.mts +11 -0
- package/dist/core/help/index.d.mts +42 -3
- package/dist/core/help/index.mjs +14 -10
- package/dist/core/help/theme.d.mts +39 -1
- package/dist/core/help/theme.mjs +24 -1
- package/dist/core/json-schema/index.d.mts +11 -11
- package/dist/core/json-schema/index.mjs +7 -6
- package/dist/core/output/activity.d.mts +193 -1
- package/dist/core/output/bind.d.mts +37 -1
- package/dist/core/output/contracts.d.mts +5 -4
- package/dist/core/output/display-value.d.mts +19 -1
- package/dist/core/output/index.d.mts +191 -7
- package/dist/core/output/index.mjs +6 -4
- package/dist/core/output/renderers.d.mts +45 -1
- package/dist/core/parse/index.d.mts +4 -4
- package/dist/core/parse/occurrences.d.mts +9 -8
- package/dist/core/prompt/index.d.mts +3 -3
- package/dist/core/read-flags/index.d.mts +1 -1
- package/dist/core/resolve/coerce.d.mts +4 -4
- package/dist/core/resolve/config.d.mts +10 -1
- package/dist/core/resolve/contracts.d.mts +9 -8
- package/dist/core/resolve/flags.d.mts +28 -1
- package/dist/core/resolve/path-checks.d.mts +4 -3
- package/dist/core/resolve/redaction.d.mts +1 -0
- package/dist/core/resolve/stages.d.mts +7 -6
- package/dist/core/resolve/standard.d.mts +26 -1
- package/dist/core/schema/activity.d.mts +16 -16
- package/dist/core/schema/arg.d.mts +76 -66
- package/dist/core/schema/brand.d.mts +1 -1
- package/dist/core/schema/cardinality.d.mts +18 -17
- package/dist/core/schema/command.d.mts +40 -9
- package/dist/core/schema/flag.d.mts +98 -90
- package/dist/core/schema/index.d.mts +1 -1
- package/dist/core/schema/middleware.d.mts +4 -1
- package/dist/core/schema/number-constraints.d.mts +5 -5
- package/dist/core/schema/prompt.d.mts +4 -4
- package/dist/core/schema/provenance.d.mts +11 -11
- package/dist/core/schema/run.d.mts +58 -8
- package/dist/core/schema/source.d.mts +13 -12
- package/dist/core/schema/standard.d.mts +31 -24
- package/dist/core/schema/stdin.d.mts +12 -2
- package/dist/core/schema/string-constraints.d.mts +4 -4
- package/dist/core/schema/value-parsers.d.mts +3 -3
- package/dist/core/schema/value.d.mts +15 -14
- package/dist/core/testkit/index.d.mts +13 -4
- package/dist/index.d.mts +6 -6
- package/dist/runtime/adapter.d.mts +3 -3
- package/dist/runtime/deno.d.mts +3 -3
- package/dist/runtime/detect.d.mts +2 -2
- package/dist/runtime/node.d.mts +3 -3
- package/dist/runtime/paths.d.mts +31 -1
- package/dist/strings.d.mts +16 -1
- package/dist/version.d.mts +16 -4
- package/dist/version.mjs +2 -2
- package/package.json +15 -11
- package/skills/cli-creation/SKILL.md +1 -1
- package/examples/gh/node_modules/typescript/LICENSE +0 -55
- package/examples/gh/node_modules/typescript/NOTICE.txt +0 -436
- package/examples/gh/node_modules/typescript/README.md +0 -49
- package/examples/gh/node_modules/typescript/bin/tsc +0 -2
- package/examples/gh/node_modules/typescript/dist/api/async/api.d.ts +0 -529
- package/examples/gh/node_modules/typescript/dist/api/async/api.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/async/api.js +0 -1657
- package/examples/gh/node_modules/typescript/dist/api/async/api.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/async/client.d.ts +0 -39
- package/examples/gh/node_modules/typescript/dist/api/async/client.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/async/client.js +0 -211
- package/examples/gh/node_modules/typescript/dist/api/async/client.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/async/types.d.ts +0 -310
- package/examples/gh/node_modules/typescript/dist/api/async/types.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/async/types.js +0 -2
- package/examples/gh/node_modules/typescript/dist/api/async/types.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/compilerOptions.d.ts +0 -109
- package/examples/gh/node_modules/typescript/dist/api/compilerOptions.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/compilerOptions.js +0 -2
- package/examples/gh/node_modules/typescript/dist/api/compilerOptions.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/fs.d.ts +0 -23
- package/examples/gh/node_modules/typescript/dist/api/fs.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/fs.js +0 -109
- package/examples/gh/node_modules/typescript/dist/api/fs.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/node/encoder.d.ts +0 -15
- package/examples/gh/node_modules/typescript/dist/api/node/encoder.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.d.ts +0 -5
- package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.js +0 -74
- package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/node/encoder.js +0 -287
- package/examples/gh/node_modules/typescript/dist/api/node/encoder.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/node/msgpack.d.ts +0 -32
- package/examples/gh/node_modules/typescript/dist/api/node/msgpack.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/node/msgpack.js +0 -213
- package/examples/gh/node_modules/typescript/dist/api/node/msgpack.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/node/node.d.ts +0 -76
- package/examples/gh/node_modules/typescript/dist/api/node/node.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/node/node.generated.d.ts +0 -182
- package/examples/gh/node_modules/typescript/dist/api/node/node.generated.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/node/node.generated.js +0 -835
- package/examples/gh/node_modules/typescript/dist/api/node/node.generated.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.d.ts +0 -62
- package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.js +0 -122
- package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/node/node.js +0 -298
- package/examples/gh/node_modules/typescript/dist/api/node/node.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/node/protocol.d.ts +0 -29
- package/examples/gh/node_modules/typescript/dist/api/node/protocol.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.d.ts +0 -4
- package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.js +0 -241
- package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/node/protocol.js +0 -30
- package/examples/gh/node_modules/typescript/dist/api/node/protocol.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/node/wtf8.d.ts +0 -6
- package/examples/gh/node_modules/typescript/dist/api/node/wtf8.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/node/wtf8.js +0 -61
- package/examples/gh/node_modules/typescript/dist/api/node/wtf8.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/options.d.ts +0 -32
- package/examples/gh/node_modules/typescript/dist/api/options.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/options.js +0 -11
- package/examples/gh/node_modules/typescript/dist/api/options.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/path.d.ts +0 -110
- package/examples/gh/node_modules/typescript/dist/api/path.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/path.js +0 -508
- package/examples/gh/node_modules/typescript/dist/api/path.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/proto.d.ts +0 -239
- package/examples/gh/node_modules/typescript/dist/api/proto.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/proto.js +0 -37
- package/examples/gh/node_modules/typescript/dist/api/proto.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.d.ts +0 -79
- package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.js +0 -169
- package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/sync/api.d.ts +0 -529
- package/examples/gh/node_modules/typescript/dist/api/sync/api.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/sync/api.js +0 -1665
- package/examples/gh/node_modules/typescript/dist/api/sync/api.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/sync/client.d.ts +0 -30
- package/examples/gh/node_modules/typescript/dist/api/sync/client.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/sync/client.js +0 -124
- package/examples/gh/node_modules/typescript/dist/api/sync/client.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/sync/types.d.ts +0 -310
- package/examples/gh/node_modules/typescript/dist/api/sync/types.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/sync/types.js +0 -2
- package/examples/gh/node_modules/typescript/dist/api/sync/types.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/syncChannel.d.ts +0 -114
- package/examples/gh/node_modules/typescript/dist/api/syncChannel.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/syncChannel.js +0 -508
- package/examples/gh/node_modules/typescript/dist/api/syncChannel.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/timing.d.ts +0 -175
- package/examples/gh/node_modules/typescript/dist/api/timing.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/api/timing.js +0 -149
- package/examples/gh/node_modules/typescript/dist/api/timing.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/ast.d.ts +0 -100
- package/examples/gh/node_modules/typescript/dist/ast/ast.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/ast.generated.d.ts +0 -1161
- package/examples/gh/node_modules/typescript/dist/ast/ast.generated.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/ast.generated.js +0 -4
- package/examples/gh/node_modules/typescript/dist/ast/ast.generated.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/ast.js +0 -7
- package/examples/gh/node_modules/typescript/dist/ast/ast.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/astnav.d.ts +0 -19
- package/examples/gh/node_modules/typescript/dist/ast/astnav.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/astnav.js +0 -596
- package/examples/gh/node_modules/typescript/dist/ast/astnav.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/clone.d.ts +0 -16
- package/examples/gh/node_modules/typescript/dist/ast/clone.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/clone.js +0 -104
- package/examples/gh/node_modules/typescript/dist/ast/clone.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/factory.generated.d.ts +0 -520
- package/examples/gh/node_modules/typescript/dist/ast/factory.generated.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/factory.generated.js +0 -3057
- package/examples/gh/node_modules/typescript/dist/ast/factory.generated.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/index.d.ts +0 -20
- package/examples/gh/node_modules/typescript/dist/ast/index.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/index.js +0 -20
- package/examples/gh/node_modules/typescript/dist/ast/index.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/is.d.ts +0 -35
- package/examples/gh/node_modules/typescript/dist/ast/is.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/is.generated.d.ts +0 -329
- package/examples/gh/node_modules/typescript/dist/ast/is.generated.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/is.generated.js +0 -1103
- package/examples/gh/node_modules/typescript/dist/ast/is.generated.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/is.js +0 -233
- package/examples/gh/node_modules/typescript/dist/ast/is.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/jsdoc.d.ts +0 -11
- package/examples/gh/node_modules/typescript/dist/ast/jsdoc.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/jsdoc.js +0 -202
- package/examples/gh/node_modules/typescript/dist/ast/jsdoc.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/scanner.d.ts +0 -97
- package/examples/gh/node_modules/typescript/dist/ast/scanner.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/scanner.js +0 -2230
- package/examples/gh/node_modules/typescript/dist/ast/scanner.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/utils.d.ts +0 -17
- package/examples/gh/node_modules/typescript/dist/ast/utils.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/utils.js +0 -67
- package/examples/gh/node_modules/typescript/dist/ast/utils.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/visitor.d.ts +0 -14
- package/examples/gh/node_modules/typescript/dist/ast/visitor.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.d.ts +0 -50
- package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.js +0 -978
- package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/ast/visitor.js +0 -47
- package/examples/gh/node_modules/typescript/dist/ast/visitor.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/characterCodes.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/characterCodes.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.d.ts +0 -129
- package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.js +0 -132
- package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/characterCodes.js +0 -130
- package/examples/gh/node_modules/typescript/dist/enums/characterCodes.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts +0 -5
- package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.js +0 -6
- package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.js +0 -6
- package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts +0 -28
- package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.js +0 -30
- package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.js +0 -30
- package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts +0 -7
- package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.js +0 -9
- package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.js +0 -9
- package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/elementFlags.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/elementFlags.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.d.ts +0 -12
- package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.js +0 -14
- package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/elementFlags.js +0 -14
- package/examples/gh/node_modules/typescript/dist/enums/elementFlags.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts +0 -23
- package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.js +0 -25
- package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.js +0 -25
- package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts +0 -9
- package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.js +0 -11
- package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.js +0 -11
- package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/languageVariant.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/languageVariant.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.d.ts +0 -5
- package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.js +0 -6
- package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/languageVariant.js +0 -6
- package/examples/gh/node_modules/typescript/dist/enums/languageVariant.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts +0 -42
- package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.js +0 -44
- package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.js +0 -44
- package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts +0 -7
- package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js +0 -9
- package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.js +0 -9
- package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/moduleKind.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/moduleKind.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.d.ts +0 -17
- package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.js +0 -19
- package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/moduleKind.js +0 -19
- package/examples/gh/node_modules/typescript/dist/enums/moduleKind.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts +0 -9
- package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js +0 -11
- package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.js +0 -11
- package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/newLineKind.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/newLineKind.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.d.ts +0 -6
- package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.js +0 -8
- package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/newLineKind.js +0 -8
- package/examples/gh/node_modules/typescript/dist/enums/newLineKind.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts +0 -36
- package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js +0 -38
- package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.js +0 -38
- package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts +0 -44
- package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.js +0 -46
- package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.js +0 -46
- package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/objectFlags.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/objectFlags.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.d.ts +0 -50
- package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.js +0 -52
- package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/objectFlags.js +0 -52
- package/examples/gh/node_modules/typescript/dist/enums/objectFlags.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts +0 -16
- package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js +0 -18
- package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.js +0 -18
- package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts +0 -13
- package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js +0 -14
- package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.js +0 -14
- package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/scriptKind.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/scriptKind.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.d.ts +0 -11
- package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.js +0 -12
- package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/scriptKind.js +0 -12
- package/examples/gh/node_modules/typescript/dist/enums/scriptKind.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts +0 -17
- package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.js +0 -18
- package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.js +0 -18
- package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts +0 -15
- package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.js +0 -17
- package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.js +0 -17
- package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/signatureKind.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/signatureKind.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.d.ts +0 -5
- package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.js +0 -7
- package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/signatureKind.js +0 -7
- package/examples/gh/node_modules/typescript/dist/enums/signatureKind.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts +0 -71
- package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.js +0 -73
- package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.js +0 -73
- package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts +0 -389
- package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.js +0 -391
- package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.js +0 -391
- package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts +0 -30
- package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.js +0 -32
- package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.js +0 -32
- package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/typeFlags.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/typeFlags.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.d.ts +0 -76
- package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.js +0 -78
- package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/typeFlags.js +0 -78
- package/examples/gh/node_modules/typescript/dist/enums/typeFlags.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.d.ts +0 -2
- package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts +0 -7
- package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.js +0 -9
- package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.js +0 -9
- package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.js.map +0 -1
- package/examples/gh/node_modules/typescript/dist/internal/utils.d.ts +0 -23
- package/examples/gh/node_modules/typescript/dist/internal/utils.d.ts.map +0 -1
- package/examples/gh/node_modules/typescript/dist/internal/utils.js +0 -25
- package/examples/gh/node_modules/typescript/dist/internal/utils.js.map +0 -1
- package/examples/gh/node_modules/typescript/lib/getExePath.d.ts +0 -2
- package/examples/gh/node_modules/typescript/lib/getExePath.js +0 -70
- package/examples/gh/node_modules/typescript/lib/tsc.js +0 -28
- package/examples/gh/node_modules/typescript/lib/version.cjs +0 -3
- package/examples/gh/node_modules/typescript/lib/version.d.cts +0 -2
- package/examples/gh/node_modules/typescript/package.json +0 -87
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/License.txt +0 -11
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/README.md +0 -54
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.d.ts +0 -17
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.js +0 -83
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.d.ts +0 -22
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.js +0 -210
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.d.ts +0 -14
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.js +0 -87
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.d.ts +0 -32
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.js +0 -132
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.d.ts +0 -367
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.js +0 -1271
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.d.ts +0 -9
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.js +0 -16
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.d.ts +0 -52
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.js +0 -70
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.d.ts +0 -39
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.js +0 -135
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.d.ts +0 -7
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.js +0 -34
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.d.ts +0 -55
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.js +0 -412
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.d.ts +0 -18
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.js +0 -155
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.d.ts +0 -77
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.js +0 -246
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.d.ts +0 -60
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.js +0 -157
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.d.ts +0 -369
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.js +0 -436
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.d.ts +0 -74
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.js +0 -23
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.d.ts +0 -10
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.js +0 -74
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts +0 -15
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +0 -77
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.d.ts +0 -58
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.js +0 -289
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.d.ts +0 -12
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.js +0 -163
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/package.json +0 -54
- package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/typings/thenable.d.ts +0 -5
|
@@ -1 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
import { BuiltinsConfig } from "./builtins.mjs";
|
|
2
|
+
import { CommandSchema } from "../schema/command.mjs";
|
|
3
|
+
//#region src/core/cli/reserved-flags.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Reject command trees declaring a flag the CLI root already owns.
|
|
6
|
+
*
|
|
7
|
+
* @param version - The CLI's declared version; `undefined` leaves
|
|
8
|
+
* `--version`/`-V` available to commands.
|
|
9
|
+
* @param commands - Command trees to walk. `undefined` entries are skipped so
|
|
10
|
+
* callers can pass an absent default command directly.
|
|
11
|
+
* @param builtins - Built-in state; a released built-in reserves nothing.
|
|
12
|
+
* `undefined` keeps every built-in on.
|
|
13
|
+
* @throws {@linkcode CLIError} `RESERVED_FLAG` for the first collision found.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
declare function assertNoReservedFlagCollisions(version: string | undefined, commands: readonly (CommandSchema | undefined)[], builtins?: BuiltinsConfig): void;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { assertNoReservedFlagCollisions };
|
|
@@ -1 +1,53 @@
|
|
|
1
|
-
|
|
1
|
+
import { BuiltinsConfig } from "./builtins.mjs";
|
|
2
|
+
import { CommandSchema } from "../schema/command.mjs";
|
|
3
|
+
import { HelpOptions } from "../help/index.mjs";
|
|
4
|
+
//#region src/core/cli/root-help.d.ts
|
|
5
|
+
/** Structural subset of `CLISchema` — avoids circular imports through the barrel. */
|
|
6
|
+
interface CLISchemaLike {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly version: string | undefined;
|
|
9
|
+
readonly description: string | undefined;
|
|
10
|
+
readonly commands: readonly CommandSchema[];
|
|
11
|
+
readonly defaultCommand: CommandSchema | undefined;
|
|
12
|
+
/** Whether the default is also a named route — listed in `Commands:` when so. */
|
|
13
|
+
readonly defaultCommandRouted?: boolean | undefined;
|
|
14
|
+
readonly helpLinks?: {
|
|
15
|
+
readonly name: string | undefined;
|
|
16
|
+
readonly version: string | undefined;
|
|
17
|
+
} | undefined;
|
|
18
|
+
readonly completionsFlag?: {
|
|
19
|
+
readonly shells: readonly string[];
|
|
20
|
+
} | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Config discovery settings. Only its presence is read — defined means
|
|
23
|
+
* `.config()` enabled the built-in `--config <path>` flag, so root help
|
|
24
|
+
* advertises it in `Global options:`.
|
|
25
|
+
*/
|
|
26
|
+
readonly configSettings?: {
|
|
27
|
+
readonly appName: string;
|
|
28
|
+
} | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Built-in flag state. A built-in set to `'off'` belongs to the commands, so
|
|
31
|
+
* `Global options:` stops advertising it. Optional so hand-built schema-like
|
|
32
|
+
* objects keep every built-in.
|
|
33
|
+
*/
|
|
34
|
+
readonly builtins?: BuiltinsConfig | undefined;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Generate root-level help text for the CLI program.
|
|
38
|
+
*
|
|
39
|
+
* Shows program name, version, description, usage line, and available
|
|
40
|
+
* subcommands. The default command is the CLI's root *surface*: its arguments
|
|
41
|
+
* and flags are rendered inline (unless `inlineDefault` is `false`) and it is
|
|
42
|
+
* omitted from the `Commands:` list unless `showDefaultInCommands` is set. When
|
|
43
|
+
* `.completions({ as: 'flag' })` is active, the eager `--completions <shell>`
|
|
44
|
+
* flag is advertised in the `Flags:` section.
|
|
45
|
+
*
|
|
46
|
+
* A built-in released through `.builtins({ <name>: 'off' })` drops out of
|
|
47
|
+
* `Global options:`, and releasing `help` also drops the `--help` footer hint.
|
|
48
|
+
*
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
declare function formatRootHelp(schema: CLISchemaLike, options?: HelpOptions): string;
|
|
52
|
+
//#endregion
|
|
53
|
+
export { formatRootHelp };
|
|
@@ -2,8 +2,8 @@ import { createFlagSchema } from "../schema/flag.mjs";
|
|
|
2
2
|
import { command } from "../schema/command.mjs";
|
|
3
3
|
import { BUILTIN_NAMES, BUILTIN_SPECS, builtinEnabled, builtinFlagForms } from "./builtins.mjs";
|
|
4
4
|
import { resolveRootSurface } from "./root-surface.mjs";
|
|
5
|
-
import { osc8, padEnd, wrapText } from "../help/ansi.mjs";
|
|
6
5
|
import { resolveHelpTheme } from "../help/theme.mjs";
|
|
6
|
+
import { osc8, padEnd, wrapText } from "../help/ansi.mjs";
|
|
7
7
|
import { formatFlagEntriesBlock, formatHelpSections } from "../help/index.mjs";
|
|
8
8
|
//#region src/core/cli/root-help.ts
|
|
9
9
|
/**
|
|
@@ -1 +1,74 @@
|
|
|
1
|
-
|
|
1
|
+
import { BuiltinsConfig } from "./builtins.mjs";
|
|
2
|
+
import { ParseError } from "../errors/index.mjs";
|
|
3
|
+
import { Verbosity } from "../output/contracts.mjs";
|
|
4
|
+
//#region src/core/cli/root-output-flags.d.ts
|
|
5
|
+
/** Canonical name of a root output flag. @internal */
|
|
6
|
+
type RootOutputFlagName = 'json' | 'quiet';
|
|
7
|
+
/** What argv said about one root output flag. @internal */
|
|
8
|
+
type RootFlagSelection = 'absent' | 'on' | 'off';
|
|
9
|
+
/** Selections plus the argv the command layer should see. @internal */
|
|
10
|
+
interface RootOutputFlagSelections {
|
|
11
|
+
/** Selection for `--json`. */
|
|
12
|
+
readonly json: RootFlagSelection;
|
|
13
|
+
/** Selection for `--quiet`/`-q`. */
|
|
14
|
+
readonly quiet: RootFlagSelection;
|
|
15
|
+
/** Argv with the pre-separator root output flags removed. */
|
|
16
|
+
readonly argv: readonly string[];
|
|
17
|
+
}
|
|
18
|
+
/** Every root output flag token carried a valid value. @internal */
|
|
19
|
+
interface RootOutputFlagsOk extends RootOutputFlagSelections {
|
|
20
|
+
/** Discriminant. */
|
|
21
|
+
readonly kind: 'ok';
|
|
22
|
+
}
|
|
23
|
+
/** One token carried a value the boolean coercion rejected. @internal */
|
|
24
|
+
interface RootOutputFlagsFailed extends RootOutputFlagSelections {
|
|
25
|
+
/** Discriminant. */
|
|
26
|
+
readonly kind: 'failed';
|
|
27
|
+
/** Error from the first rejected token. */
|
|
28
|
+
readonly error: ParseError;
|
|
29
|
+
}
|
|
30
|
+
/** Result of reading the root output flags out of argv. @internal */
|
|
31
|
+
type RootOutputFlags = RootOutputFlagsOk | RootOutputFlagsFailed;
|
|
32
|
+
/**
|
|
33
|
+
* Read and strip the root output flags from argv.
|
|
34
|
+
*
|
|
35
|
+
* Only tokens before the `--` end-of-options separator are read or stripped, so
|
|
36
|
+
* a literal after `--` reaches the command unchanged (#28). Repeated
|
|
37
|
+
* occurrences follow the `'last'` duplicate policy `flag.boolean()` defaults to.
|
|
38
|
+
*
|
|
39
|
+
* A `'failed'` result still carries the selections and the stripped argv, so a
|
|
40
|
+
* valid `--json` governs how the failure renders and a help or version request
|
|
41
|
+
* can still be honoured ahead of it.
|
|
42
|
+
*
|
|
43
|
+
* @param argv - Raw argv tokens (excluding the binary/script path).
|
|
44
|
+
* @param builtins - Built-in state; a released built-in's tokens are left in
|
|
45
|
+
* argv untouched. `undefined` keeps both built-ins on.
|
|
46
|
+
* @returns The selections, the stripped argv, and the first invalid value's
|
|
47
|
+
* error when one occurred.
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
declare function readRootOutputFlags(argv: readonly string[], builtins?: BuiltinsConfig): RootOutputFlags;
|
|
51
|
+
/**
|
|
52
|
+
* Resolve JSON mode from the argv selection and an explicit override.
|
|
53
|
+
*
|
|
54
|
+
* An explicit `--json=false` wins over the override; the override applies when
|
|
55
|
+
* argv says nothing.
|
|
56
|
+
*
|
|
57
|
+
* @param flags - Result of {@linkcode readRootOutputFlags}.
|
|
58
|
+
* @param override - Caller-supplied `jsonMode`.
|
|
59
|
+
* @returns Whether the run renders JSON.
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
declare function resolveRootJsonMode(flags: RootOutputFlags, override: boolean | undefined): boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Resolve verbosity from the argv selection and an explicit override.
|
|
65
|
+
*
|
|
66
|
+
* @param flags - Result of {@linkcode readRootOutputFlags}.
|
|
67
|
+
* @param override - Caller-supplied verbosity.
|
|
68
|
+
* @returns `'quiet'` for `--quiet`, `'normal'` for `--quiet=false`, and the
|
|
69
|
+
* override when argv says nothing.
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
declare function resolveRootVerbosity(flags: RootOutputFlags, override: Verbosity | undefined): Verbosity | undefined;
|
|
73
|
+
//#endregion
|
|
74
|
+
export { type RootOutputFlagName, type RootOutputFlags, readRootOutputFlags, resolveRootJsonMode, resolveRootVerbosity };
|
|
@@ -1 +1,64 @@
|
|
|
1
|
-
|
|
1
|
+
import { CommandSchema } from "../schema/command.mjs";
|
|
2
|
+
//#region src/core/cli/root-surface.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Structural CLI shape needed for root-surface analysis.
|
|
5
|
+
*
|
|
6
|
+
* Uses structural typing to avoid importing the full `CLISchema` and
|
|
7
|
+
* creating unnecessary cross-module coupling.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
interface RootSurfaceSchemaLike {
|
|
12
|
+
readonly commands: readonly CommandSchema[];
|
|
13
|
+
readonly defaultCommand: CommandSchema | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Whether the default command is also exposed as a named route
|
|
16
|
+
* (`.default(cmd, { route: true })`). Optional so hand-built schema-like
|
|
17
|
+
* objects default to the surface-only behavior.
|
|
18
|
+
*/
|
|
19
|
+
readonly defaultCommandRouted?: boolean | undefined;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Normalized root shape shared by help and completion logic.
|
|
23
|
+
*
|
|
24
|
+
* Since v0.3 the default command is a distinct root *surface* rather than a
|
|
25
|
+
* named subcommand: `.default()` no longer registers it under
|
|
26
|
+
* {@link RootSurfaceSchemaLike.commands}. To stay robust against callers that
|
|
27
|
+
* still place the default in the command list (e.g. hand-built test schemas),
|
|
28
|
+
* {@link resolveRootSurface} always derives {@link RootSurface.visibleSubcommands}
|
|
29
|
+
* by excluding the default command from the visible command list.
|
|
30
|
+
*
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
interface RootSurface {
|
|
34
|
+
/** All visible top-level commands as declared in `schema.commands`. */
|
|
35
|
+
readonly visibleCommands: readonly CommandSchema[];
|
|
36
|
+
/** Visible real subcommands — `visibleCommands` minus the default command. */
|
|
37
|
+
readonly visibleSubcommands: readonly CommandSchema[];
|
|
38
|
+
/** The visible default command, or `undefined` when none exists or it is hidden. */
|
|
39
|
+
readonly visibleDefaultCommand: CommandSchema | undefined;
|
|
40
|
+
/** Whether a visible default command exists. */
|
|
41
|
+
readonly hasVisibleDefault: boolean;
|
|
42
|
+
/** Whether any visible real subcommands exist (the default does not count). */
|
|
43
|
+
readonly hasVisibleSubcommands: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Whether the visible default is also a named route (`.default(cmd, { route:
|
|
46
|
+
* true })`), meaning it should be listed in `Commands:` beside its siblings
|
|
47
|
+
* in addition to being rendered as the root surface.
|
|
48
|
+
*/
|
|
49
|
+
readonly defaultRouted: boolean;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Resolve the visible shape of the CLI root.
|
|
53
|
+
*
|
|
54
|
+
* Hidden commands are excluded from the visible command list. Hidden
|
|
55
|
+
* default commands remain executable, but are not surfaced through
|
|
56
|
+
* help or completions. The default command is reported separately from the
|
|
57
|
+
* real subcommands so help and completion can render it as the root surface
|
|
58
|
+
* instead of echoing it as a pseudo-subcommand.
|
|
59
|
+
*
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
declare function resolveRootSurface(schema: RootSurfaceSchemaLike): RootSurface;
|
|
63
|
+
//#endregion
|
|
64
|
+
export { type RootSurface, type RootSurfaceSchemaLike, resolveRootSurface };
|
|
@@ -1 +1,213 @@
|
|
|
1
|
-
|
|
1
|
+
import { BuiltinsConfig, BuiltinsDraft } from "./builtins.mjs";
|
|
2
|
+
import { HelpThemeFactory } from "../help/theme.mjs";
|
|
3
|
+
import { CLIError } from "../errors/index.mjs";
|
|
4
|
+
import { Verbosity } from "../output/contracts.mjs";
|
|
5
|
+
import { CommandSchema } from "../schema/command.mjs";
|
|
6
|
+
import "../help/index.mjs";
|
|
7
|
+
import "../output/index.mjs";
|
|
8
|
+
import { PromptEngine } from "../prompt/index.mjs";
|
|
9
|
+
import { ParseOptions } from "../parse/index.mjs";
|
|
10
|
+
import { CompiledCLI } from "./compiled.mjs";
|
|
11
|
+
import { RuntimeAdapter } from "../../runtime/adapter.mjs";
|
|
12
|
+
import { PackageJsonData } from "../config/package-json.mjs";
|
|
13
|
+
import { HelpLinks } from "./help-links.mjs";
|
|
14
|
+
import { CompletionOptions } from "../completion/shells/shared.mjs";
|
|
15
|
+
import { Shell } from "../completion/index.mjs";
|
|
16
|
+
import { FormatLoader } from "../config/index.mjs";
|
|
17
|
+
//#region src/core/cli/runtime-preflight.d.ts
|
|
18
|
+
/** Config discovery settings extracted from CLISchema for preflight use. @internal */
|
|
19
|
+
interface RuntimeConfigSettings {
|
|
20
|
+
/** Application name used to locate config files (e.g. `~/.config/<appName>/`). */
|
|
21
|
+
readonly appName: string;
|
|
22
|
+
/** Optional format loaders (JSON/YAML/TOML); `undefined` uses built-in JSON. */
|
|
23
|
+
readonly loaders: readonly FormatLoader[] | undefined;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Manifest discovery settings extracted from CLISchema for preflight use.
|
|
27
|
+
*
|
|
28
|
+
* Mirrors the public `ResolvedManifestSettings` shape (consumed structurally),
|
|
29
|
+
* named with the `Runtime` prefix to match its {@link RuntimeConfigSettings}
|
|
30
|
+
* sibling and avoid colliding with the exported public type.
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
interface RuntimeManifestSettings {
|
|
34
|
+
/** Whether to infer the CLI binary name from `bin` keys or `name`. */
|
|
35
|
+
readonly inferName: boolean;
|
|
36
|
+
/** Strip a leading `@scope/` from the inferred `name` fallback. */
|
|
37
|
+
readonly stripScope: boolean;
|
|
38
|
+
/** Explicit anchor (resolved path) for discovery; `undefined` falls back to `adapter.cwd`. */
|
|
39
|
+
readonly from: string | undefined;
|
|
40
|
+
/** Candidate manifest filenames in priority order. */
|
|
41
|
+
readonly files: readonly string[];
|
|
42
|
+
/** Pre-loaded data; when set, discovery is skipped entirely. */
|
|
43
|
+
readonly data: PackageJsonData | undefined;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Descriptive subset of CLISchema used by runtime preflight.
|
|
47
|
+
*
|
|
48
|
+
* Decouples adapter-driven sourcing (config, package.json, stdin) from the
|
|
49
|
+
* full CLIBuilder surface so preflight can be tested independently. Preflight
|
|
50
|
+
* rewrites fields of this shape and hands the result back; the executable half
|
|
51
|
+
* of the program travels beside it as a {@linkcode CompiledCLI}.
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
interface RuntimePreflightSchemaLike {
|
|
55
|
+
/** CLI program name; may be overridden by package.json discovery or inheritance. */
|
|
56
|
+
readonly name: string;
|
|
57
|
+
/** Whether this CLI inherits its name from a parent (nested CLI embedding). */
|
|
58
|
+
readonly inheritName: boolean;
|
|
59
|
+
/** Declared version; `undefined` means version will be inferred from package.json if available. */
|
|
60
|
+
readonly version: string | undefined;
|
|
61
|
+
/** Declared description; `undefined` allows package.json inference. */
|
|
62
|
+
readonly description: string | undefined;
|
|
63
|
+
/** Whether the default command is also exposed as a named top-level route. */
|
|
64
|
+
readonly defaultCommandRouted: boolean;
|
|
65
|
+
/** Config file discovery settings; `undefined` disables config loading. */
|
|
66
|
+
readonly configSettings: RuntimeConfigSettings | undefined;
|
|
67
|
+
/** Package.json discovery settings; `undefined` disables package.json inference. */
|
|
68
|
+
readonly packageJsonSettings: RuntimeManifestSettings | undefined;
|
|
69
|
+
/** Root-help header link targets; `undefined` fields may be derived from package.json. */
|
|
70
|
+
readonly helpLinks: HelpLinks | undefined;
|
|
71
|
+
/** Whether `.completions()` registered the built-in completions command/flag. */
|
|
72
|
+
readonly hasBuiltInCompletions: boolean;
|
|
73
|
+
/** Eager `--completions <shell>` flag config; `undefined` disables interception. */
|
|
74
|
+
readonly completionsFlag: {
|
|
75
|
+
readonly shells: readonly Shell[];
|
|
76
|
+
readonly options: CompletionOptions | undefined;
|
|
77
|
+
} | undefined;
|
|
78
|
+
/** Consumer-configured root-help defaults. */
|
|
79
|
+
readonly helpConfig: {
|
|
80
|
+
readonly inlineDefault?: boolean;
|
|
81
|
+
readonly showDefaultInCommands?: boolean;
|
|
82
|
+
readonly footer?: boolean;
|
|
83
|
+
readonly width?: number;
|
|
84
|
+
readonly hyperlinks?: boolean;
|
|
85
|
+
readonly theme?: HelpThemeFactory;
|
|
86
|
+
} | undefined;
|
|
87
|
+
/** Flag-parsing behavior settings (e.g. case parity). */
|
|
88
|
+
readonly flagSettings: ParseOptions | undefined;
|
|
89
|
+
/** Which built-in flags the root still owns; a released one is left in argv. */
|
|
90
|
+
readonly builtins: BuiltinsDraft;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Caller-supplied overrides for runtime preflight.
|
|
94
|
+
*
|
|
95
|
+
* When provided, these bypass adapter auto-detection (useful for testing
|
|
96
|
+
* and the `CLIRunOptions` public surface).
|
|
97
|
+
* @internal
|
|
98
|
+
*/
|
|
99
|
+
interface RuntimePreflightOptions {
|
|
100
|
+
/** Environment variables override; bypasses adapter env when set. */
|
|
101
|
+
readonly env?: Readonly<Record<string, string | undefined>>;
|
|
102
|
+
/** Pre-loaded config object; skips config file discovery when set. */
|
|
103
|
+
readonly config?: Readonly<Record<string, unknown>>;
|
|
104
|
+
/** Pre-read stdin data; `null` means stdin was explicitly empty. */
|
|
105
|
+
readonly stdinData?: string | null;
|
|
106
|
+
/** Custom prompt engine; bypasses terminal prompter auto-creation. */
|
|
107
|
+
readonly prompter?: PromptEngine;
|
|
108
|
+
/** Output verbosity level override. */
|
|
109
|
+
readonly verbosity?: Verbosity;
|
|
110
|
+
/** Force JSON output mode regardless of `--json` flag presence. */
|
|
111
|
+
readonly jsonMode?: boolean;
|
|
112
|
+
/** TTY detection override; bypasses adapter TTY check. */
|
|
113
|
+
readonly isTTY?: boolean;
|
|
114
|
+
/** Filesystem probe override for `flag.path()` checks; bypasses the adapter probe. */
|
|
115
|
+
readonly stat?: (path: string) => Promise<'file' | 'directory' | null>;
|
|
116
|
+
/** Directory creation override for `flag.path()` `create` checks; bypasses the adapter. */
|
|
117
|
+
readonly mkdir?: (path: string) => Promise<void>;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Fully resolved runtime inputs ready for the execution pipeline.
|
|
121
|
+
*
|
|
122
|
+
* All adapter vs. caller-override decisions are settled by the time this
|
|
123
|
+
* is constructed; the executor treats these as final truth.
|
|
124
|
+
* @internal
|
|
125
|
+
*/
|
|
126
|
+
interface RuntimeExecutionInputs {
|
|
127
|
+
/** Resolved environment variables (from adapter or caller override). */
|
|
128
|
+
readonly env: Readonly<Record<string, string | undefined>>;
|
|
129
|
+
/** Whether stdout is a TTY (controls color, spinners, interactive prompts). */
|
|
130
|
+
readonly isTTY: boolean;
|
|
131
|
+
/** Whether structured JSON output mode is active. */
|
|
132
|
+
readonly jsonMode: boolean;
|
|
133
|
+
/** Output verbosity level. */
|
|
134
|
+
readonly verbosity: Verbosity;
|
|
135
|
+
/** Pre-read stdin data if the invocation would select a stdin source. */
|
|
136
|
+
readonly stdinData?: string | null;
|
|
137
|
+
/** Prompt engine for interactive flag resolution; absent in non-TTY. */
|
|
138
|
+
readonly prompter?: PromptEngine;
|
|
139
|
+
/** Loaded config data for the config resolution step. */
|
|
140
|
+
readonly config?: Readonly<Record<string, unknown>>;
|
|
141
|
+
/** Filesystem probe (from the adapter) for `flag.path()` checks. */
|
|
142
|
+
readonly stat?: (path: string) => Promise<'file' | 'directory' | null>;
|
|
143
|
+
/** Directory creation (from the adapter) for `flag.path()` `create` checks. */
|
|
144
|
+
readonly mkdir?: (path: string) => Promise<void>;
|
|
145
|
+
}
|
|
146
|
+
/** Preflight succeeded — all runtime inputs are resolved and ready for execution. @internal */
|
|
147
|
+
interface ReadyRuntimePreflight {
|
|
148
|
+
/** Discriminant — preflight completed without errors. */
|
|
149
|
+
readonly kind: 'ready';
|
|
150
|
+
/** Schema after package.json discovery and name inheritance applied. */
|
|
151
|
+
readonly schema: RuntimePreflightSchemaLike;
|
|
152
|
+
/** Argv with valid runtime `--config` tokens stripped out. */
|
|
153
|
+
readonly filteredArgv: readonly string[];
|
|
154
|
+
/** Fully resolved runtime inputs for the execution pipeline. */
|
|
155
|
+
readonly inputs: RuntimeExecutionInputs;
|
|
156
|
+
}
|
|
157
|
+
/** Preflight failed before the CLI could start. @internal */
|
|
158
|
+
interface RuntimeStartupErrorPreflight {
|
|
159
|
+
/** Discriminant — a startup step produced a structured error. */
|
|
160
|
+
readonly kind: 'startup-error';
|
|
161
|
+
/** The startup error to render. */
|
|
162
|
+
readonly error: CLIError;
|
|
163
|
+
/** Whether JSON output was requested (needed to choose error rendering). */
|
|
164
|
+
readonly jsonMode: boolean;
|
|
165
|
+
}
|
|
166
|
+
/** Discriminated union of preflight outcomes — either ready or startup-error. @internal */
|
|
167
|
+
type RuntimePreflightResult = ReadyRuntimePreflight | RuntimeStartupErrorPreflight;
|
|
168
|
+
/** Options bag for {@linkcode prepareRuntimePreflight}. @internal */
|
|
169
|
+
interface PrepareRuntimePreflightOptions {
|
|
170
|
+
/** CLI schema subset driving preflight decisions. */
|
|
171
|
+
readonly schema: RuntimePreflightSchemaLike;
|
|
172
|
+
/** Compiled execution graph, forwarded to the planner for stdin detection. */
|
|
173
|
+
readonly compiled: CompiledCLI;
|
|
174
|
+
/** Runtime adapter providing argv, env, stdin, and filesystem access. */
|
|
175
|
+
readonly adapter: RuntimeAdapter;
|
|
176
|
+
/** Caller-supplied overrides; `undefined` means auto-detect everything. */
|
|
177
|
+
readonly options: RuntimePreflightOptions | undefined;
|
|
178
|
+
/** Name inherited from a parent CLI (nested embedding); `undefined` for standalone. */
|
|
179
|
+
readonly inheritedName: string | undefined;
|
|
180
|
+
}
|
|
181
|
+
/** Extract and strip valid runtime `--config` forms from argv, returning path + filtered tokens. @internal */
|
|
182
|
+
declare function extractConfigFlag(argv: readonly string[]): {
|
|
183
|
+
readonly configPath: string | undefined;
|
|
184
|
+
readonly filteredArgv: readonly string[];
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* Check whether this invocation will actually select a stdin source.
|
|
188
|
+
*
|
|
189
|
+
* A `'dash'` binding is eligible when its token is `-`. A `'missing'` binding is
|
|
190
|
+
* eligible when argv left the input absent; env, config, prompt, and default do
|
|
191
|
+
* not suppress the read, because the stdin fallback outranks all four.
|
|
192
|
+
*
|
|
193
|
+
* @param schema - The matched command's merged schema.
|
|
194
|
+
* @param argv - The command's own argv slice.
|
|
195
|
+
* @param flagSettings - Parser behavior settings.
|
|
196
|
+
* @param builtins - Which built-in flags the root still owns.
|
|
197
|
+
* @returns `true` when at least one input would read stdin.
|
|
198
|
+
* @internal
|
|
199
|
+
*/
|
|
200
|
+
declare function commandInvocationNeedsStdin(schema: CommandSchema, argv: readonly string[], flagSettings?: ParseOptions, builtins?: BuiltinsConfig): boolean;
|
|
201
|
+
/** Plan the invocation and check whether the matched command needs stdin data. @internal */
|
|
202
|
+
declare function invocationNeedsStdin(schema: RuntimePreflightSchemaLike, compiled: CompiledCLI, argv: readonly string[]): boolean;
|
|
203
|
+
/**
|
|
204
|
+
* Run all adapter-driven sourcing work before command execution.
|
|
205
|
+
*
|
|
206
|
+
* Discovers config files, reads package.json metadata, detects stdin needs,
|
|
207
|
+
* wires up the prompt engine, and resolves output policy overrides into a
|
|
208
|
+
* single {@linkcode RuntimePreflightResult}.
|
|
209
|
+
* @internal
|
|
210
|
+
*/
|
|
211
|
+
declare function prepareRuntimePreflight(options: PrepareRuntimePreflightOptions): Promise<RuntimePreflightResult>;
|
|
212
|
+
//#endregion
|
|
213
|
+
export { type PrepareRuntimePreflightOptions, type ReadyRuntimePreflight, type RuntimeExecutionInputs, type RuntimePreflightOptions, type RuntimePreflightResult, type RuntimePreflightSchemaLike, commandInvocationNeedsStdin, extractConfigFlag, invocationNeedsStdin, prepareRuntimePreflight };
|
|
@@ -10,7 +10,7 @@ import { CLISchema } from "../cli/index.mjs";
|
|
|
10
10
|
*
|
|
11
11
|
* `bash`, `zsh`, `fish`, and `powershell` are implemented today.
|
|
12
12
|
*/
|
|
13
|
-
type Shell =
|
|
13
|
+
type Shell = 'bash' | 'zsh' | 'fish' | 'powershell';
|
|
14
14
|
/**
|
|
15
15
|
* Implemented shell values as a frozen readonly non-empty tuple.
|
|
16
16
|
*
|
|
@@ -20,7 +20,7 @@ type Shell = "bash" | "zsh" | "fish" | "powershell";
|
|
|
20
20
|
*
|
|
21
21
|
* @see {@link Shell} for the union type matching these entries.
|
|
22
22
|
*/
|
|
23
|
-
declare const SHELLS: Readonly<readonly [
|
|
23
|
+
declare const SHELLS: Readonly<readonly ['bash', 'zsh', 'fish', 'powershell']>;
|
|
24
24
|
/**
|
|
25
25
|
* Normalize a raw shell token — a bare name (`zsh`), a `$SHELL` path
|
|
26
26
|
* (`/bin/zsh`), or a Windows executable (`…\pwsh.exe`) — to a supported
|
|
@@ -107,7 +107,10 @@ function generateBashCompletion(schema, options) {
|
|
|
107
107
|
lines.push(`\t# Root-level completions: visible root surface`);
|
|
108
108
|
lines.push(`\tCOMPREPLY=($(compgen -W '${completionWords}' -- "$cur"))`);
|
|
109
109
|
} else {
|
|
110
|
-
const globalFlags = collectFlagWords(
|
|
110
|
+
const globalFlags = collectFlagWords({
|
|
111
|
+
...rootSurface.rootFlags,
|
|
112
|
+
...rootSurface.includeDefaultFlags ? rootSurface.defaultFlags : {}
|
|
113
|
+
});
|
|
111
114
|
lines.push(`\tCOMPREPLY=($(compgen -W '${globalFlags}' -- "$cur"))`);
|
|
112
115
|
}
|
|
113
116
|
lines.push("}");
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getFlagAliasNames } from "../../schema/flag.mjs";
|
|
2
2
|
import { flagExpectsValue } from "../../parse/index.mjs";
|
|
3
3
|
import { getVisibleNegatedName, quoteShellArg, resolveRootCompletionSurface, sanitizeShellIdentifier, versionTag, walkCommandTree } from "./shared.mjs";
|
|
4
|
+
import { resolvePlainHelpDescription } from "../../help/theme.mjs";
|
|
4
5
|
//#region src/core/completion/shells/fish.ts
|
|
5
6
|
/**
|
|
6
7
|
* Generate a fish completion script for the CLI.
|
|
@@ -114,7 +115,7 @@ function appendFishFlagCompletions(lines, commandName, pathIsFuncName, path, fla
|
|
|
114
115
|
for (const alias of getFlagAliasNames(schema, { kind: "long" })) parts.push(`-l ${quoteShellArg(alias)}`);
|
|
115
116
|
const negated = getVisibleNegatedName(name, schema);
|
|
116
117
|
if (negated !== void 0) parts.push(`-l ${quoteShellArg(negated)}`);
|
|
117
|
-
parts.push(`-d ${quoteShellArg(schema.description
|
|
118
|
+
parts.push(`-d ${quoteShellArg(schema.description === void 0 ? name : resolvePlainHelpDescription(schema.description))}`);
|
|
118
119
|
if (flagExpectsValue(schema)) parts.push("-r", "-f");
|
|
119
120
|
if (schema.kind === "enum" && schema.enumValues !== void 0) {
|
|
120
121
|
for (const enumValue of schema.enumValues) lines.push([...parts, `-a ${quoteShellArg(enumValue)}`].join(" "));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getFlagAliasNames, getFlagNegatedName } from "../../schema/flag.mjs";
|
|
2
2
|
import { flagExpectsValue } from "../../parse/index.mjs";
|
|
3
3
|
import { getVisibleNegatedName, resolveRootCompletionSurface, sanitizeShellIdentifier, versionTag, walkCommandTree } from "./shared.mjs";
|
|
4
|
+
import { resolvePlainHelpDescription } from "../../help/theme.mjs";
|
|
4
5
|
//#region src/core/completion/shells/powershell.ts
|
|
5
6
|
/**
|
|
6
7
|
* Generate a PowerShell completion script for the CLI.
|
|
@@ -116,7 +117,7 @@ function appendPowerShellPathEntry(lines, path, commands, flags) {
|
|
|
116
117
|
lines.push(`\t\t\t\tForms = ${formatPowerShellArray(forms)}`);
|
|
117
118
|
lines.push(`\t\t\t\tParseForms = ${formatPowerShellArray(parseForms)}`);
|
|
118
119
|
lines.push(`\t\t\t\tRequiresValue = ${flagExpectsValue(schema) ? "$true" : "$false"}`);
|
|
119
|
-
lines.push(`\t\t\t\tDescription = ${quotePowerShellString(schema.description
|
|
120
|
+
lines.push(`\t\t\t\tDescription = ${quotePowerShellString(schema.description === void 0 ? name : resolvePlainHelpDescription(schema.description))}`);
|
|
120
121
|
lines.push(`\t\t\t\tEnumValues = ${formatPowerShellArray(schema.enumValues ?? [])}`);
|
|
121
122
|
lines.push(" }");
|
|
122
123
|
}
|