@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
|
@@ -91,8 +91,8 @@ type PromptDefinitionFragmentV1 = {
|
|
|
91
91
|
* mode, and the trimming without a reader having to know the builder's defaults.
|
|
92
92
|
*/
|
|
93
93
|
type StdinBindingFragmentV1 = {
|
|
94
|
-
readonly when:
|
|
95
|
-
readonly consume:
|
|
94
|
+
readonly when: 'dash' | 'missing' | 'dash-or-missing';
|
|
95
|
+
readonly consume: 'exclusive' | 'broadcast';
|
|
96
96
|
readonly trim: boolean;
|
|
97
97
|
};
|
|
98
98
|
/**
|
|
@@ -101,14 +101,14 @@ type StdinBindingFragmentV1 = {
|
|
|
101
101
|
* A delimiter carries its own literal; every other format is named alone.
|
|
102
102
|
*/
|
|
103
103
|
type SplitPolicyFragmentV1 = {
|
|
104
|
-
readonly format:
|
|
104
|
+
readonly format: 'whole';
|
|
105
105
|
} | {
|
|
106
|
-
readonly format:
|
|
106
|
+
readonly format: 'delimiter';
|
|
107
107
|
readonly delimiter: string;
|
|
108
108
|
} | {
|
|
109
|
-
readonly format:
|
|
109
|
+
readonly format: 'lines';
|
|
110
110
|
} | {
|
|
111
|
-
readonly format:
|
|
111
|
+
readonly format: 'json';
|
|
112
112
|
};
|
|
113
113
|
/**
|
|
114
114
|
* Non-CLI split policies of a collection fragment.
|
|
@@ -141,7 +141,7 @@ type FlagStringConstraintsFragmentV1 = {
|
|
|
141
141
|
/** Filesystem expectations of a flag or arg fragment. */
|
|
142
142
|
type FlagPathChecksFragmentV1 = {
|
|
143
143
|
readonly mustExist: boolean;
|
|
144
|
-
readonly type?:
|
|
144
|
+
readonly type?: 'file' | 'directory';
|
|
145
145
|
readonly create?: true;
|
|
146
146
|
};
|
|
147
147
|
/**
|
|
@@ -183,9 +183,9 @@ type FlagDefinitionFragmentV1 = {
|
|
|
183
183
|
* another key-value layer.
|
|
184
184
|
*/
|
|
185
185
|
type ArgElementFragmentV1 = {
|
|
186
|
-
readonly kind: Exclude<ArgKind,
|
|
186
|
+
readonly kind: Exclude<ArgKind, 'keyValue'>;
|
|
187
187
|
/** Entry values are required once their containing key-value argument is present. */
|
|
188
|
-
readonly presence:
|
|
188
|
+
readonly presence: 'required';
|
|
189
189
|
readonly enumValues?: readonly string[];
|
|
190
190
|
readonly numberConstraints?: NumberConstraints;
|
|
191
191
|
readonly stringConstraints?: FlagStringConstraintsFragmentV1;
|
|
@@ -278,7 +278,7 @@ type CommandDefinitionDocument = CommandDefinitionDocumentV1;
|
|
|
278
278
|
type InputSchemaProperty = Readonly<Record<string, unknown>>;
|
|
279
279
|
/** The JSON Schema object describing one command's flags and args. */
|
|
280
280
|
type InputSchemaBranch = {
|
|
281
|
-
readonly type:
|
|
281
|
+
readonly type: 'object';
|
|
282
282
|
readonly properties: Readonly<Record<string, InputSchemaProperty>>;
|
|
283
283
|
readonly additionalProperties: false;
|
|
284
284
|
readonly required?: readonly string[];
|
|
@@ -297,7 +297,7 @@ type InputSchemaDocument = ({
|
|
|
297
297
|
readonly oneOf: readonly InputSchemaBranch[];
|
|
298
298
|
} | {
|
|
299
299
|
readonly $schema: string;
|
|
300
|
-
readonly type:
|
|
300
|
+
readonly type: 'object';
|
|
301
301
|
};
|
|
302
302
|
/**
|
|
303
303
|
* Generate a definition metadata document describing the CLI's structure.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DUPLICATE_KEYS } from "../schema/cardinality.mjs";
|
|
2
2
|
import { getFlagAliasNames } from "../schema/flag.mjs";
|
|
3
3
|
import { resolveExampleCommand } from "../schema/command.mjs";
|
|
4
|
+
import { resolvePlainHelpDescription } from "../help/theme.mjs";
|
|
4
5
|
import { definitionMetaSchemaDescriptions } from "./meta-descriptions.generated.mjs";
|
|
5
6
|
//#region src/core/json-schema/index.ts
|
|
6
7
|
/**
|
|
@@ -67,7 +68,7 @@ function generateSchema(schema, options, meta) {
|
|
|
67
68
|
schemaVersion: 1,
|
|
68
69
|
name: schema.name,
|
|
69
70
|
...schema.version !== void 0 ? { version: schema.version } : {},
|
|
70
|
-
...schema.description !== void 0 ? { description: schema.description } : {},
|
|
71
|
+
...schema.description !== void 0 ? { description: resolvePlainHelpDescription(schema.description) } : {},
|
|
71
72
|
...defaultCommand !== void 0 ? { defaultCommand } : {},
|
|
72
73
|
commands: schema.commands.filter((cmd) => opts.includeHidden || !cmd.hidden).map((cmd) => serializeCommand(cmd, opts, resolvedMeta))
|
|
73
74
|
};
|
|
@@ -111,7 +112,7 @@ function serializeCommand(schema, opts, meta) {
|
|
|
111
112
|
for (const [name, flagDef] of Object.entries(schema.flags)) flags[name] = serializeFlag(flagDef, opts);
|
|
112
113
|
return {
|
|
113
114
|
name: schema.name,
|
|
114
|
-
...schema.description !== void 0 ? { description: schema.description } : {},
|
|
115
|
+
...schema.description !== void 0 ? { description: resolvePlainHelpDescription(schema.description) } : {},
|
|
115
116
|
...schema.aliases.length > 0 ? { aliases: [...schema.aliases] } : {},
|
|
116
117
|
...schema.hidden ? { hidden: true } : {},
|
|
117
118
|
...schema.examples.length > 0 ? { examples: schema.examples.map((example) => serializeExample(example, meta)) } : {},
|
|
@@ -140,7 +141,7 @@ function serializeFlag(schema, opts) {
|
|
|
140
141
|
...schema.stdin !== void 0 ? { stdin: serializeStdin(schema.stdin) } : {},
|
|
141
142
|
...schema.envVar !== void 0 ? { envVar: schema.envVar } : {},
|
|
142
143
|
...schema.configPath !== void 0 ? { configPath: schema.configPath } : {},
|
|
143
|
-
...schema.description !== void 0 ? { description: schema.description } : {},
|
|
144
|
+
...schema.description !== void 0 ? { description: resolvePlainHelpDescription(schema.description) } : {},
|
|
144
145
|
...schema.enumValues !== void 0 ? { enumValues: [...schema.enumValues] } : {},
|
|
145
146
|
...schema.numberConstraints !== void 0 ? { numberConstraints: { ...schema.numberConstraints } } : {},
|
|
146
147
|
...stringConstraints !== void 0 ? { stringConstraints: serializeStringConstraints(stringConstraints) } : {},
|
|
@@ -222,7 +223,7 @@ function serializeArgValue(schema, opts) {
|
|
|
222
223
|
...schema.variadic ? { variadic: true } : {},
|
|
223
224
|
...schema.stdin !== void 0 ? { stdin: serializeStdin(schema.stdin) } : {},
|
|
224
225
|
...isJsonSerializable(schema.defaultValue) ? { defaultValue: schema.defaultValue } : {},
|
|
225
|
-
...schema.description !== void 0 ? { description: schema.description } : {},
|
|
226
|
+
...schema.description !== void 0 ? { description: resolvePlainHelpDescription(schema.description) } : {},
|
|
226
227
|
...schema.envVar !== void 0 ? { envVar: schema.envVar } : {},
|
|
227
228
|
...schema.configPath !== void 0 ? { configPath: schema.configPath } : {},
|
|
228
229
|
...schema.enumValues !== void 0 ? { enumValues: [...schema.enumValues] } : {},
|
|
@@ -504,7 +505,7 @@ function flagToJsonSchemaType(schema) {
|
|
|
504
505
|
result.type = "object";
|
|
505
506
|
result.additionalProperties = schema.elementSchema === void 0 ? { type: "string" } : flagToJsonSchemaType(schema.elementSchema);
|
|
506
507
|
}
|
|
507
|
-
if (schema.description !== void 0) result.description = schema.description;
|
|
508
|
+
if (schema.description !== void 0) result.description = resolvePlainHelpDescription(schema.description);
|
|
508
509
|
if (isJsonSerializable(schema.defaultValue)) result.default = schema.defaultValue;
|
|
509
510
|
if (schema.deprecated !== void 0) result.deprecated = schema.deprecated;
|
|
510
511
|
return result;
|
|
@@ -515,7 +516,7 @@ function argToJsonSchemaType(schema) {
|
|
|
515
516
|
type: "array",
|
|
516
517
|
items: kind
|
|
517
518
|
} : { ...kind };
|
|
518
|
-
if (schema.description !== void 0) result.description = schema.description;
|
|
519
|
+
if (schema.description !== void 0) result.description = resolvePlainHelpDescription(schema.description);
|
|
519
520
|
if (isJsonSerializable(schema.defaultValue)) result.default = schema.defaultValue;
|
|
520
521
|
if (schema.deprecated !== void 0) result.deprecated = schema.deprecated;
|
|
521
522
|
return result;
|
|
@@ -1 +1,193 @@
|
|
|
1
|
-
|
|
1
|
+
import { ActivityEvent, ProgressHandle, ProgressOptions, SpinnerHandle } from "../schema/activity.mjs";
|
|
2
|
+
import { WriteFn } from "./writer.mjs";
|
|
3
|
+
//#region src/core/output/activity.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Noop spinner handle singleton.
|
|
6
|
+
*
|
|
7
|
+
* All methods are no-ops. Used when spinners should produce no output
|
|
8
|
+
* at all — `jsonMode`, or non-TTY with `fallback: 'silent'` (default).
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
declare const noopSpinnerHandle: SpinnerHandle;
|
|
13
|
+
/**
|
|
14
|
+
* Noop progress handle singleton.
|
|
15
|
+
*
|
|
16
|
+
* All methods are no-ops. Used when progress bars should produce no
|
|
17
|
+
* output at all — `jsonMode`, or non-TTY with `fallback: 'silent'`.
|
|
18
|
+
*
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
declare const noopProgressHandle: ProgressHandle;
|
|
22
|
+
/**
|
|
23
|
+
* Static spinner handle — emits plain text at lifecycle boundaries.
|
|
24
|
+
*
|
|
25
|
+
* Used in non-TTY environments with `fallback: 'static'`. No animation,
|
|
26
|
+
* no ANSI codes. Emits text on start and terminal events only.
|
|
27
|
+
*
|
|
28
|
+
* Terminal methods are idempotent — calling after stop is a no-op.
|
|
29
|
+
*
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
declare class StaticSpinnerHandle implements SpinnerHandle {
|
|
33
|
+
private readonly write;
|
|
34
|
+
/** Whether the handle has been stopped (terminal state reached). */
|
|
35
|
+
private stopped;
|
|
36
|
+
constructor(text: string, write: WriteFn);
|
|
37
|
+
update(_text: string): void;
|
|
38
|
+
succeed(text?: string): void;
|
|
39
|
+
fail(text?: string): void;
|
|
40
|
+
stop(): void;
|
|
41
|
+
wrap<T>(promise: Promise<T>, options?: {
|
|
42
|
+
readonly succeed?: string;
|
|
43
|
+
readonly fail?: string;
|
|
44
|
+
}): Promise<T>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Static progress handle — emits plain text at lifecycle boundaries.
|
|
48
|
+
*
|
|
49
|
+
* Used in non-TTY environments with `fallback: 'static'`. No animation,
|
|
50
|
+
* no progress bar rendering. Emits label on start, text on done/fail.
|
|
51
|
+
*
|
|
52
|
+
* Terminal methods are idempotent — calling after stop is a no-op.
|
|
53
|
+
*
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
declare class StaticProgressHandle implements ProgressHandle {
|
|
57
|
+
private readonly write;
|
|
58
|
+
/** Whether the handle has been stopped (terminal state reached). */
|
|
59
|
+
private stopped;
|
|
60
|
+
constructor(label: string | undefined, write: WriteFn);
|
|
61
|
+
increment(_n?: number): void;
|
|
62
|
+
update(_value: number): void;
|
|
63
|
+
done(text?: string): void;
|
|
64
|
+
fail(text?: string): void;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* TTY spinner handle — animated braille frames with ANSI line overwrite.
|
|
68
|
+
*
|
|
69
|
+
* Used in TTY environments (non-JSON mode). Renders a spinning indicator
|
|
70
|
+
* with configurable text, using `\r` + erase-line to overwrite in place.
|
|
71
|
+
* Hides the cursor during animation and restores it on any terminal method.
|
|
72
|
+
*
|
|
73
|
+
* Terminal methods (`succeed`, `fail`, `stop`) are idempotent — calling any
|
|
74
|
+
* of them after the handle is already stopped is a no-op.
|
|
75
|
+
*
|
|
76
|
+
* **Note:** If the process exits abnormally (e.g. `SIGKILL`) while a spinner
|
|
77
|
+
* is active, the cursor may remain hidden. Use {@link SpinnerHandle.wrap} to
|
|
78
|
+
* ensure cleanup on both success and failure paths.
|
|
79
|
+
*
|
|
80
|
+
* @internal
|
|
81
|
+
*/
|
|
82
|
+
declare class TTYSpinnerHandle implements SpinnerHandle {
|
|
83
|
+
private readonly write;
|
|
84
|
+
/** Whether the handle has been stopped (terminal state reached). */
|
|
85
|
+
private stopped;
|
|
86
|
+
/** Animation timer handle — cleared on any terminal method. */
|
|
87
|
+
private timer;
|
|
88
|
+
/** Current position in the braille frame sequence. */
|
|
89
|
+
private frameIndex;
|
|
90
|
+
/** Current spinner text (mutable via `update()`). */
|
|
91
|
+
private text;
|
|
92
|
+
constructor(text: string, write: WriteFn);
|
|
93
|
+
/** Render the current frame + text, overwriting the current line. */
|
|
94
|
+
private render;
|
|
95
|
+
/** Clear the animation timer, erase the line, and restore the cursor. */
|
|
96
|
+
private cleanup;
|
|
97
|
+
update(text: string): void;
|
|
98
|
+
succeed(text?: string): void;
|
|
99
|
+
fail(text?: string): void;
|
|
100
|
+
stop(): void;
|
|
101
|
+
wrap<T>(promise: Promise<T>, options?: {
|
|
102
|
+
readonly succeed?: string;
|
|
103
|
+
readonly fail?: string;
|
|
104
|
+
}): Promise<T>;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* TTY progress handle — bar rendering with ANSI line overwrite.
|
|
108
|
+
*
|
|
109
|
+
* Supports two modes:
|
|
110
|
+
* - **Determinate** (`total` provided) — renders `[████░░░░░░] 40% label`,
|
|
111
|
+
* re-rendered on each `increment()` / `update()` call. No timer.
|
|
112
|
+
* - **Indeterminate** (`total` omitted) — renders a pulsing highlight that
|
|
113
|
+
* bounces across the bar via `setInterval`.
|
|
114
|
+
*
|
|
115
|
+
* Terminal methods (`done`, `fail`) are idempotent — calling any of them
|
|
116
|
+
* after the handle is already stopped is a no-op.
|
|
117
|
+
*
|
|
118
|
+
* @internal
|
|
119
|
+
*/
|
|
120
|
+
declare class TTYProgressHandle implements ProgressHandle {
|
|
121
|
+
private readonly write;
|
|
122
|
+
/** Whether the handle has been stopped (terminal state reached). */
|
|
123
|
+
private stopped;
|
|
124
|
+
/** Animation timer for indeterminate mode — `undefined` in determinate mode. */
|
|
125
|
+
private timer;
|
|
126
|
+
/** Current progress value (units completed). */
|
|
127
|
+
private current;
|
|
128
|
+
/** Total units of work (`undefined` = indeterminate mode). */
|
|
129
|
+
private readonly total;
|
|
130
|
+
/** Label displayed alongside the bar. */
|
|
131
|
+
private readonly label;
|
|
132
|
+
/** Pulse position for indeterminate animation (bouncing highlight). */
|
|
133
|
+
private pulsePos;
|
|
134
|
+
/** Pulse direction: 1 = forward, -1 = backward (for bounce). */
|
|
135
|
+
private pulseDir;
|
|
136
|
+
constructor(opts: ProgressOptions, write: WriteFn);
|
|
137
|
+
/** Advance the indeterminate pulse position with bounce logic. */
|
|
138
|
+
private advancePulse;
|
|
139
|
+
/** Render the progress bar, overwriting the current line. */
|
|
140
|
+
private render;
|
|
141
|
+
/** Render a determinate bar: `[████░░░░░░] 40%`. */
|
|
142
|
+
private renderDeterminate;
|
|
143
|
+
/** Render an indeterminate bar: pulsing highlight bouncing across empty segments. */
|
|
144
|
+
private renderIndeterminate;
|
|
145
|
+
/** Clear the animation timer, erase the line, and restore the cursor. */
|
|
146
|
+
private cleanup;
|
|
147
|
+
increment(n?: number): void;
|
|
148
|
+
update(value: number): void;
|
|
149
|
+
done(text?: string): void;
|
|
150
|
+
fail(text?: string): void;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Spinner handle that records lifecycle events to a shared `ActivityEvent[]`.
|
|
154
|
+
*
|
|
155
|
+
* Used by `createCaptureOutput()` so testkit can assert on spinner behaviour
|
|
156
|
+
* without polluting stdout/stderr arrays. Terminal methods are idempotent.
|
|
157
|
+
*
|
|
158
|
+
* @internal
|
|
159
|
+
*/
|
|
160
|
+
declare class CaptureSpinnerHandle implements SpinnerHandle {
|
|
161
|
+
private readonly events;
|
|
162
|
+
/** Whether the handle has been stopped (terminal state reached). */
|
|
163
|
+
private stopped;
|
|
164
|
+
constructor(text: string, events: ActivityEvent[]);
|
|
165
|
+
update(text: string): void;
|
|
166
|
+
succeed(text?: string): void;
|
|
167
|
+
fail(text?: string): void;
|
|
168
|
+
stop(): void;
|
|
169
|
+
wrap<T>(promise: Promise<T>, options?: {
|
|
170
|
+
readonly succeed?: string;
|
|
171
|
+
readonly fail?: string;
|
|
172
|
+
}): Promise<T>;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Progress handle that records lifecycle events to a shared `ActivityEvent[]`.
|
|
176
|
+
*
|
|
177
|
+
* Used by `createCaptureOutput()` so testkit can assert on progress behaviour
|
|
178
|
+
* without polluting stdout/stderr arrays. Terminal methods are idempotent.
|
|
179
|
+
*
|
|
180
|
+
* @internal
|
|
181
|
+
*/
|
|
182
|
+
declare class CaptureProgressHandle implements ProgressHandle {
|
|
183
|
+
private readonly events;
|
|
184
|
+
/** Whether the handle has been stopped (terminal state reached). */
|
|
185
|
+
private stopped;
|
|
186
|
+
constructor(opts: ProgressOptions, events: ActivityEvent[]);
|
|
187
|
+
increment(n?: number): void;
|
|
188
|
+
update(value: number): void;
|
|
189
|
+
done(text?: string): void;
|
|
190
|
+
fail(text?: string): void;
|
|
191
|
+
}
|
|
192
|
+
//#endregion
|
|
193
|
+
export { CaptureProgressHandle, CaptureSpinnerHandle, StaticProgressHandle, StaticSpinnerHandle, TTYProgressHandle, TTYSpinnerHandle, noopProgressHandle, noopSpinnerHandle };
|
|
@@ -1 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/core/output/bind.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Method-binding helper for value objects handed to consumers.
|
|
4
|
+
*
|
|
5
|
+
* Output value objects — the `Out` channel and the spinner/progress handles
|
|
6
|
+
* — expose methods that read instance state via `this`. Consumers naturally
|
|
7
|
+
* detach those methods, either by destructuring
|
|
8
|
+
* (`const { log } = out` / `const { succeed, fail } = spinner`) or by passing
|
|
9
|
+
* them as callbacks (`promise.finally(spinner.stop)`). Detached, an unbound
|
|
10
|
+
* prototype method loses its `this` and crashes on the first field access.
|
|
11
|
+
*
|
|
12
|
+
* {@linkcode bindMethods} eliminates that footgun by installing instance-bound
|
|
13
|
+
* copies of every method, so the ergonomic usage is also the correct one.
|
|
14
|
+
*
|
|
15
|
+
* @module dreamcli/core/output/bind
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Bind every method on an instance's prototype chain to the instance.
|
|
20
|
+
*
|
|
21
|
+
* Walks the prototype chain up to (but excluding) `Object.prototype`, binding
|
|
22
|
+
* each method name exactly once — the most-derived definition wins, so subclass
|
|
23
|
+
* overrides (e.g. `CaptureOutputChannel.spinner`) are preserved rather than
|
|
24
|
+
* clobbered by a base-class version. Bound methods are installed as
|
|
25
|
+
* non-enumerable own properties, mirroring the enumerability of the prototype
|
|
26
|
+
* methods they shadow. Getters and non-function members are left untouched.
|
|
27
|
+
*
|
|
28
|
+
* Call this once, last, in a class constructor. Because it reads the live
|
|
29
|
+
* prototype rather than a hand-maintained name list, methods added later are
|
|
30
|
+
* bound automatically — the binding can't silently fall out of date.
|
|
31
|
+
*
|
|
32
|
+
* @param instance - The object whose methods should be bound to it.
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
declare function bindMethods(instance: object): void;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { bindMethods };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Fallback, TableOptions } from "../schema/activity.mjs";
|
|
1
2
|
//#region src/core/output/contracts.d.ts
|
|
2
3
|
/** Ordered output verbosity levels owned by the output policy layer. */
|
|
3
4
|
declare const OUTPUT_VERBOSITY_LEVELS: readonly ["normal", "quiet"];
|
|
@@ -36,9 +37,9 @@ interface ResolveOutputPolicyOptions {
|
|
|
36
37
|
/** Concrete activity policy chosen for spinner/progress creation. */
|
|
37
38
|
interface ActivityPolicy {
|
|
38
39
|
/** Render strategy for the activity indicator (never `'capture'` here). */
|
|
39
|
-
readonly mode: Exclude<ActivityRenderMode,
|
|
40
|
+
readonly mode: Exclude<ActivityRenderMode, 'capture'>;
|
|
40
41
|
/** Activity output always targets stderr to avoid polluting structured stdout. */
|
|
41
|
-
readonly stream:
|
|
42
|
+
readonly stream: 'stderr';
|
|
42
43
|
/** Cleanup action the output layer must run when the handle is discarded. */
|
|
43
44
|
readonly cleanup: ActivityCleanupKind;
|
|
44
45
|
}
|
|
@@ -68,11 +69,11 @@ declare function resolveTextStream(policy: OutputPolicy): OutputStream;
|
|
|
68
69
|
/** Whether `info()`/`status()` messages should be emitted under the current policy. */
|
|
69
70
|
declare function shouldEmitInfo(policy: OutputPolicy): boolean;
|
|
70
71
|
/** Resolve the concrete table format under the current policy. */
|
|
71
|
-
declare function resolveTableFormat(policy: OutputPolicy, options?: TableOptions):
|
|
72
|
+
declare function resolveTableFormat(policy: OutputPolicy, options?: TableOptions): 'text' | 'json';
|
|
72
73
|
/** Resolve the text-table stream after table-format selection. */
|
|
73
74
|
declare function resolveTableTextStream(policy: OutputPolicy, options?: TableOptions): OutputStream;
|
|
74
75
|
/** Resolve the non-capture activity mode shared by spinner and progress. */
|
|
75
|
-
declare function resolveActivityRenderMode(policy: OutputPolicy, fallback: Fallback): ActivityPolicy[
|
|
76
|
+
declare function resolveActivityRenderMode(policy: OutputPolicy, fallback: Fallback): ActivityPolicy['mode'];
|
|
76
77
|
/** Resolve spinner activity policy including cleanup ownership. */
|
|
77
78
|
declare function resolveSpinnerPolicy(policy: OutputPolicy, fallback: Fallback): ActivityPolicy;
|
|
78
79
|
/** Resolve progress activity policy including cleanup ownership. */
|
|
@@ -1 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/core/output/display-value.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Shared runtime-value formatting for human-readable output.
|
|
4
|
+
*
|
|
5
|
+
* Used by help text and table rendering so default values and structured cells
|
|
6
|
+
* stringify consistently across the CLI surface.
|
|
7
|
+
*
|
|
8
|
+
* @module dreamcli/core/output/display-value
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Format an unknown runtime value for human-readable output.
|
|
13
|
+
*
|
|
14
|
+
* @param value - The value to format (any type).
|
|
15
|
+
* @returns A string representation suitable for table cells and help text.
|
|
16
|
+
*/
|
|
17
|
+
declare function formatDisplayValue(value: unknown): string;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { formatDisplayValue };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Out } from "../schema/command.mjs";
|
|
1
|
+
import { ActivityEvent, ProgressHandle, ProgressOptions, SpinnerHandle, SpinnerOptions, TableColumn, TableOptions } from "../schema/activity.mjs";
|
|
2
|
+
import { OutputPolicy, Verbosity } from "./contracts.mjs";
|
|
3
|
+
import { Out, outBrand } from "../schema/command.mjs";
|
|
4
4
|
import { WriteFn, writeLine } from "./writer.mjs";
|
|
5
|
+
import { Colors } from "ansispeck";
|
|
5
6
|
//#region src/core/output/index.d.ts
|
|
6
7
|
/**
|
|
7
8
|
* Configuration for creating an output channel.
|
|
@@ -67,9 +68,25 @@ interface OutputOptions {
|
|
|
67
68
|
*/
|
|
68
69
|
readonly hyperlinks?: boolean;
|
|
69
70
|
}
|
|
71
|
+
/** Fully resolved output options with no optional fields. */
|
|
72
|
+
interface ResolvedOutputOptions {
|
|
73
|
+
readonly stdout: WriteFn;
|
|
74
|
+
readonly stderr: WriteFn;
|
|
75
|
+
readonly isTTY: boolean;
|
|
76
|
+
readonly verbosity: Verbosity;
|
|
77
|
+
readonly jsonMode: boolean;
|
|
78
|
+
readonly color: boolean;
|
|
79
|
+
readonly isHyperlinkSupported: boolean;
|
|
80
|
+
}
|
|
81
|
+
/** Store the exit code requested through an output channel. @internal */
|
|
82
|
+
declare function setRequestedExitCode(out: Out, code: number): void;
|
|
83
|
+
/** Read the exit code requested through an output channel. @internal */
|
|
84
|
+
declare function getRequestedExitCode(out: Out): number | undefined;
|
|
85
|
+
/** Clear a previously requested exit code from an output channel. @internal */
|
|
86
|
+
declare function clearRequestedExitCode(out: Out): void;
|
|
70
87
|
/**
|
|
71
|
-
* Forced hyperlink decision from `
|
|
72
|
-
*
|
|
88
|
+
* Forced hyperlink decision from the `--no-hyperlinks`/`--hyperlinks` argv
|
|
89
|
+
* flags, then `NO_HYPERLINKS`, then `FORCE_HYPERLINKS`; `undefined` when unset.
|
|
73
90
|
*
|
|
74
91
|
* Pure over its inputs — callers pass the adapter's `env`/`argv` so the
|
|
75
92
|
* output layer never touches `process` directly.
|
|
@@ -77,6 +94,173 @@ interface OutputOptions {
|
|
|
77
94
|
* @see https://no-hyperlinks.org/
|
|
78
95
|
*/
|
|
79
96
|
declare function resolveHyperlinkOverride(env: Readonly<Record<string, string | undefined>>, argv: readonly string[]): boolean | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* Concrete implementation of the {@linkcode Out} interface.
|
|
99
|
+
*
|
|
100
|
+
* Routes messages to the appropriate writer (stdout vs stderr) and
|
|
101
|
+
* respects the configured verbosity level.
|
|
102
|
+
*
|
|
103
|
+
* Handlers interact with this via the {@linkcode Out} interface — they never see
|
|
104
|
+
* {@linkcode OutputChannel} directly, which keeps the coupling minimal.
|
|
105
|
+
* Prefer {@link createOutput} unless you are extending the output layer.
|
|
106
|
+
*
|
|
107
|
+
* @internal
|
|
108
|
+
*/
|
|
109
|
+
declare class OutputChannel implements Out {
|
|
110
|
+
readonly [outBrand]: never;
|
|
111
|
+
/** @internal Resolved configuration. */
|
|
112
|
+
readonly options: ResolvedOutputOptions;
|
|
113
|
+
/** Semantic output policy snapshot shared by routing helpers. */
|
|
114
|
+
readonly policy: OutputPolicy;
|
|
115
|
+
/** Whether JSON output mode is active. */
|
|
116
|
+
readonly jsonMode: boolean;
|
|
117
|
+
/** Active verbosity level for informational output and activity rendering. */
|
|
118
|
+
readonly verbosity: Verbosity;
|
|
119
|
+
/**
|
|
120
|
+
* Whether stdout is connected to a TTY.
|
|
121
|
+
*
|
|
122
|
+
* When `jsonMode` is active, this reflects the underlying TTY status
|
|
123
|
+
* but decorative output should still be suppressed (jsonMode takes
|
|
124
|
+
* precedence).
|
|
125
|
+
*/
|
|
126
|
+
readonly isTTY: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Context-aware ANSI color palette.
|
|
129
|
+
*
|
|
130
|
+
* Enabled per the resolved `color` option — identity functions when
|
|
131
|
+
* colors are off, so handlers can style unconditionally.
|
|
132
|
+
*/
|
|
133
|
+
readonly color: Colors;
|
|
134
|
+
/**
|
|
135
|
+
* Whether OSC 8 hyperlinks should be emitted for this channel.
|
|
136
|
+
*
|
|
137
|
+
* Honors `NO_HYPERLINKS`/`FORCE_HYPERLINKS` and the
|
|
138
|
+
* `--no-hyperlinks`/`--hyperlinks` argv flags, falling back to `isTTY`.
|
|
139
|
+
*/
|
|
140
|
+
readonly isHyperlinkSupported: boolean;
|
|
141
|
+
constructor(options: ResolvedOutputOptions);
|
|
142
|
+
/**
|
|
143
|
+
* Write to stdout (normal output). Always emitted.
|
|
144
|
+
*
|
|
145
|
+
* In JSON mode, redirected to stderr so stdout is reserved for
|
|
146
|
+
* structured `json()` output only.
|
|
147
|
+
*/
|
|
148
|
+
log(message: string): void;
|
|
149
|
+
/**
|
|
150
|
+
* Informational message to stdout.
|
|
151
|
+
* Suppressed when verbosity is `'quiet'`.
|
|
152
|
+
*
|
|
153
|
+
* In JSON mode, redirected to stderr.
|
|
154
|
+
*/
|
|
155
|
+
info(message: string): void;
|
|
156
|
+
/**
|
|
157
|
+
* Status line to stderr (stdout stays clean for piping).
|
|
158
|
+
* Suppressed when verbosity is `'quiet'`.
|
|
159
|
+
*/
|
|
160
|
+
status(message: string): void;
|
|
161
|
+
/** Warning to stderr. Always emitted. */
|
|
162
|
+
warn(message: string): void;
|
|
163
|
+
/** Error to stderr. Always emitted. */
|
|
164
|
+
error(message: string): void;
|
|
165
|
+
/** Request a successful-process exit code without writing error output. */
|
|
166
|
+
setExitCode(code: number): void;
|
|
167
|
+
/**
|
|
168
|
+
* Emit a structured JSON value to stdout.
|
|
169
|
+
*
|
|
170
|
+
* Serialises `value` with `JSON.stringify` and writes to stdout
|
|
171
|
+
* regardless of JSON mode — `json()` always targets stdout.
|
|
172
|
+
*/
|
|
173
|
+
json(value: unknown): void;
|
|
174
|
+
/**
|
|
175
|
+
* Render tabular data.
|
|
176
|
+
*
|
|
177
|
+
* Default behavior matches the current output mode:
|
|
178
|
+
* - normal mode → text table to stdout
|
|
179
|
+
* - jsonMode → JSON array to stdout
|
|
180
|
+
*
|
|
181
|
+
* Per-call options can force text/json rendering and route text tables to
|
|
182
|
+
* stdout or stderr.
|
|
183
|
+
*/
|
|
184
|
+
table<T extends Record<string, unknown>>(rows: readonly T[], options: TableOptions): void;
|
|
185
|
+
table<T extends Record<string, unknown>>(rows: readonly T[], columns?: readonly TableColumn<T>[], options?: TableOptions): void;
|
|
186
|
+
/**
|
|
187
|
+
* Cleanup callback for the currently active spinner/progress handle.
|
|
188
|
+
*
|
|
189
|
+
* Set to `undefined` when no handle is active. The callback calls the
|
|
190
|
+
* appropriate terminal method (`.stop()` for spinners, `.done()` for
|
|
191
|
+
* progress) on the previous handle.
|
|
192
|
+
*
|
|
193
|
+
* @internal
|
|
194
|
+
*/
|
|
195
|
+
private activeCleanup;
|
|
196
|
+
/**
|
|
197
|
+
* Stop the currently active spinner/progress handle (if any).
|
|
198
|
+
*
|
|
199
|
+
* Called internally before creating a new handle to prevent overlap,
|
|
200
|
+
* and externally after handler execution to clean up leaked timers.
|
|
201
|
+
* Idempotent (safe to call when no handle is active).
|
|
202
|
+
*/
|
|
203
|
+
stopActive(): void;
|
|
204
|
+
/**
|
|
205
|
+
* Create a spinner handle.
|
|
206
|
+
*
|
|
207
|
+
* Mode dispatch:
|
|
208
|
+
* - quiet or `jsonMode` → noop (informational activity suppressed)
|
|
209
|
+
* - `isTTY` → animated TTY spinner (braille frames, ANSI overwrite)
|
|
210
|
+
* - `!isTTY && fallback: 'static'` → plain text at lifecycle boundaries
|
|
211
|
+
* - `!isTTY && fallback: 'silent'` (default) → noop
|
|
212
|
+
*
|
|
213
|
+
* All activity output (transient frames, terminal messages) routes to
|
|
214
|
+
* stderr so stdout remains clean for structured data and piping.
|
|
215
|
+
*
|
|
216
|
+
* If another spinner or progress handle is active, it is implicitly
|
|
217
|
+
* stopped before the new one starts.
|
|
218
|
+
*
|
|
219
|
+
* @virtual
|
|
220
|
+
*/
|
|
221
|
+
spinner(text: string, options?: SpinnerOptions): SpinnerHandle;
|
|
222
|
+
/**
|
|
223
|
+
* Create a progress handle.
|
|
224
|
+
*
|
|
225
|
+
* Mode dispatch:
|
|
226
|
+
* - quiet or `jsonMode` → noop (informational activity suppressed)
|
|
227
|
+
* - `isTTY` → animated TTY progress bar (determinate or indeterminate)
|
|
228
|
+
* - `!isTTY && fallback: 'static'` → plain text at lifecycle boundaries
|
|
229
|
+
* - `!isTTY && fallback: 'silent'` (default) → noop
|
|
230
|
+
*
|
|
231
|
+
* All activity output (transient frames, terminal messages) routes to
|
|
232
|
+
* stderr so stdout remains clean for structured data and piping.
|
|
233
|
+
*
|
|
234
|
+
* If another spinner or progress handle is active, it is implicitly
|
|
235
|
+
* stopped before the new one starts.
|
|
236
|
+
*
|
|
237
|
+
* @virtual
|
|
238
|
+
*/
|
|
239
|
+
progress(opts: ProgressOptions): ProgressHandle;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Output channel variant that returns capture handles for spinner/progress.
|
|
243
|
+
*
|
|
244
|
+
* Extends {@linkcode OutputChannel} to override `spinner()` and `progress()`, routing
|
|
245
|
+
* activity events into a shared {@linkcode ActivityEvent | ActivityEvent[]} for testkit assertion.
|
|
246
|
+
* Text output (log/info/warn/error) is handled by the parent class.
|
|
247
|
+
*
|
|
248
|
+
* @internal
|
|
249
|
+
*/
|
|
250
|
+
declare class CaptureOutputChannel extends OutputChannel {
|
|
251
|
+
private readonly activity;
|
|
252
|
+
constructor(options: ResolvedOutputOptions, activity: ActivityEvent[]);
|
|
253
|
+
/**
|
|
254
|
+
* Return a {@link CaptureSpinnerHandle} that records events into the activity log.
|
|
255
|
+
* @override
|
|
256
|
+
*/
|
|
257
|
+
spinner(text: string, _options?: SpinnerOptions): SpinnerHandle;
|
|
258
|
+
/**
|
|
259
|
+
* Return a {@link CaptureProgressHandle} that records events into the activity log.
|
|
260
|
+
* @override
|
|
261
|
+
*/
|
|
262
|
+
progress(opts: ProgressOptions): ProgressHandle;
|
|
263
|
+
}
|
|
80
264
|
/**
|
|
81
265
|
* Create an output channel.
|
|
82
266
|
*
|
|
@@ -155,6 +339,6 @@ interface CapturedOutput {
|
|
|
155
339
|
* expect(captured.stderr).toEqual(['danger\n']);
|
|
156
340
|
* ```
|
|
157
341
|
*/
|
|
158
|
-
declare function createCaptureOutput(options?: Omit<OutputOptions,
|
|
342
|
+
declare function createCaptureOutput(options?: Omit<OutputOptions, 'stdout' | 'stderr'>): [out: Out, captured: CapturedOutput];
|
|
159
343
|
//#endregion
|
|
160
|
-
export { type CapturedOutput, type OutputOptions, type Verbosity, type WriteFn, createCaptureOutput, createOutput, resolveHyperlinkOverride, writeLine };
|
|
344
|
+
export { CaptureOutputChannel, type CapturedOutput, OutputChannel, type OutputOptions, type Verbosity, type WriteFn, clearRequestedExitCode, createCaptureOutput, createOutput, getRequestedExitCode, resolveHyperlinkOverride, setRequestedExitCode, writeLine };
|
|
@@ -42,8 +42,8 @@ function clearRequestedExitCode(out) {
|
|
|
42
42
|
requestedExitCodes.delete(out);
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
|
-
* Forced hyperlink decision from `
|
|
46
|
-
*
|
|
45
|
+
* Forced hyperlink decision from the `--no-hyperlinks`/`--hyperlinks` argv
|
|
46
|
+
* flags, then `NO_HYPERLINKS`, then `FORCE_HYPERLINKS`; `undefined` when unset.
|
|
47
47
|
*
|
|
48
48
|
* Pure over its inputs — callers pass the adapter's `env`/`argv` so the
|
|
49
49
|
* output layer never touches `process` directly.
|
|
@@ -53,8 +53,10 @@ function clearRequestedExitCode(out) {
|
|
|
53
53
|
function resolveHyperlinkOverride(env, argv) {
|
|
54
54
|
const separator = argv.indexOf("--");
|
|
55
55
|
const flags = separator === -1 ? argv : argv.slice(0, separator);
|
|
56
|
-
if (
|
|
57
|
-
if (
|
|
56
|
+
if (flags.includes("--no-hyperlinks")) return false;
|
|
57
|
+
if (flags.includes("--hyperlinks")) return true;
|
|
58
|
+
if (env.NO_HYPERLINKS) return false;
|
|
59
|
+
if (env.FORCE_HYPERLINKS) return true;
|
|
58
60
|
}
|
|
59
61
|
/** Merge user-supplied options with defaults. */
|
|
60
62
|
function resolveOptions(options) {
|