@code-yeongyu/senpi 2026.7.10 → 2026.7.13
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 +79 -0
- package/README.md +4 -2
- package/dist/core/agent-session.d.ts +9 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +56 -15
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/builtin/bash-timeout/timeout.js +2 -2
- package/dist/core/extensions/builtin/bash-timeout/timeout.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.js +10 -1
- package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
- package/dist/core/extensions/builtin/goal/store.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/store.js +88 -3
- package/dist/core/extensions/builtin/goal/store.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js +134 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/presets.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/presets.js +6 -0
- package/dist/core/extensions/builtin/prompt-preset/presets.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/settings.d.ts +1 -1
- package/dist/core/extensions/builtin/prompt-preset/settings.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/settings.js +1 -0
- package/dist/core/extensions/builtin/prompt-preset/settings.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/notify.d.ts +3 -3
- package/dist/core/extensions/builtin/terminal/notify.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/notify.js +7 -4
- package/dist/core/extensions/builtin/terminal/notify.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/runtime-session.d.ts +5 -3
- package/dist/core/extensions/builtin/terminal/runtime-session.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/runtime-session.js +32 -16
- package/dist/core/extensions/builtin/terminal/runtime-session.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/tools/bash-output.d.ts +1 -1
- package/dist/core/extensions/builtin/terminal/tools/bash-output.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/tools/bash-output.js +10 -4
- package/dist/core/extensions/builtin/terminal/tools/bash-output.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todowrite.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todowrite.js +5 -8
- package/dist/core/extensions/builtin/todotools/tools/todowrite.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +1 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +5 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +5 -8
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/extensions/wrapper.d.ts.map +1 -1
- package/dist/core/extensions/wrapper.js +22 -3
- package/dist/core/extensions/wrapper.js.map +1 -1
- package/dist/core/keybindings.d.ts +8 -3
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +7 -3
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/model-registry.d.ts +1 -6
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +19 -6
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/resource-loader.d.ts +1 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +20 -2
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/settings-manager.d.ts +4 -3
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +2 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/compaction-queue-transfer.d.ts +22 -0
- package/dist/modes/interactive/compaction-queue-transfer.d.ts.map +1 -0
- package/dist/modes/interactive/compaction-queue-transfer.js +82 -0
- package/dist/modes/interactive/compaction-queue-transfer.js.map +1 -0
- package/dist/modes/interactive/components/custom-editor.js +1 -1
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +4 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +9 -2
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +1 -1
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +1 -1
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution-fallback.d.ts +6 -0
- package/dist/modes/interactive/components/tool-execution-fallback.d.ts.map +1 -0
- package/dist/modes/interactive/components/tool-execution-fallback.js +40 -0
- package/dist/modes/interactive/components/tool-execution-fallback.js.map +1 -0
- package/dist/modes/interactive/components/tool-execution-images.d.ts +23 -0
- package/dist/modes/interactive/components/tool-execution-images.d.ts.map +1 -0
- package/dist/modes/interactive/components/tool-execution-images.js +104 -0
- package/dist/modes/interactive/components/tool-execution-images.js.map +1 -0
- package/dist/modes/interactive/components/tool-execution-renderer.d.ts +28 -0
- package/dist/modes/interactive/components/tool-execution-renderer.d.ts.map +1 -0
- package/dist/modes/interactive/components/tool-execution-renderer.js +135 -0
- package/dist/modes/interactive/components/tool-execution-renderer.js.map +1 -0
- package/dist/modes/interactive/components/tool-execution-types.d.ts +23 -0
- package/dist/modes/interactive/components/tool-execution-types.d.ts.map +1 -0
- package/dist/modes/interactive/components/tool-execution-types.js +2 -0
- package/dist/modes/interactive/components/tool-execution-types.js.map +1 -0
- package/dist/modes/interactive/components/tool-execution.d.ts +13 -39
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +51 -294
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tool-renderer-boundary.d.ts +17 -0
- package/dist/modes/interactive/components/tool-renderer-boundary.d.ts.map +1 -0
- package/dist/modes/interactive/components/tool-renderer-boundary.js +75 -0
- package/dist/modes/interactive/components/tool-renderer-boundary.js.map +1 -0
- package/dist/modes/interactive/components/tree-selector.d.ts +5 -0
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +50 -17
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +5 -2
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +127 -109
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/dark.json +1 -0
- package/dist/modes/interactive/theme/light.json +1 -0
- package/dist/modes/interactive/theme/theme-schema.json +6 -2
- package/dist/modes/interactive/theme/theme.d.ts +3 -2
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +11 -4
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/utils/clipboard-native.d.ts +1 -0
- package/dist/utils/clipboard-native.d.ts.map +1 -1
- package/dist/utils/clipboard-native.js.map +1 -1
- package/dist/utils/clipboard.d.ts +2 -0
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +13 -0
- package/dist/utils/clipboard.js.map +1 -1
- package/docs/custom-provider.md +4 -3
- package/docs/extensions.md +140 -1
- package/docs/keybindings.md +1 -0
- package/docs/models.md +45 -4
- package/docs/providers.md +3 -0
- package/docs/quickstart.md +1 -1
- package/docs/rpc.md +2 -2
- package/docs/sdk.md +1 -1
- package/docs/settings.md +3 -3
- package/docs/themes.md +5 -3
- package/docs/tui.md +1 -1
- package/docs/usage.md +2 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/node_modules/@babel/helper-string-parser/LICENSE +22 -0
- package/node_modules/@babel/helper-string-parser/README.md +19 -0
- package/node_modules/@babel/helper-string-parser/lib/index.js +295 -0
- package/node_modules/@babel/helper-string-parser/lib/index.js.map +1 -0
- package/node_modules/@babel/helper-string-parser/package.json +31 -0
- package/node_modules/@babel/helper-validator-identifier/LICENSE +22 -0
- package/node_modules/@babel/helper-validator-identifier/README.md +19 -0
- package/node_modules/@babel/helper-validator-identifier/lib/identifier.js +70 -0
- package/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map +1 -0
- package/node_modules/@babel/helper-validator-identifier/lib/index.js +57 -0
- package/node_modules/@babel/helper-validator-identifier/lib/index.js.map +1 -0
- package/node_modules/@babel/helper-validator-identifier/lib/keyword.js +35 -0
- package/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map +1 -0
- package/node_modules/@babel/helper-validator-identifier/package.json +31 -0
- package/node_modules/@babel/parser/LICENSE +19 -0
- package/node_modules/@babel/parser/README.md +19 -0
- package/node_modules/@babel/parser/bin/babel-parser.js +15 -0
- package/node_modules/@babel/parser/lib/index.js +14599 -0
- package/node_modules/@babel/parser/lib/index.js.map +1 -0
- package/node_modules/@babel/parser/package.json +50 -0
- package/node_modules/@babel/parser/typings/babel-parser.d.ts +262 -0
- package/node_modules/@babel/types/LICENSE +22 -0
- package/node_modules/@babel/types/README.md +19 -0
- package/node_modules/@babel/types/lib/asserts/assertNode.js +16 -0
- package/node_modules/@babel/types/lib/asserts/assertNode.js.map +1 -0
- package/node_modules/@babel/types/lib/asserts/generated/index.js +1251 -0
- package/node_modules/@babel/types/lib/asserts/generated/index.js.map +1 -0
- package/node_modules/@babel/types/lib/ast-types/generated/index.js +3 -0
- package/node_modules/@babel/types/lib/ast-types/generated/index.js.map +1 -0
- package/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js +18 -0
- package/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js.map +1 -0
- package/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js +31 -0
- package/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js.map +1 -0
- package/node_modules/@babel/types/lib/builders/generated/index.js +29 -0
- package/node_modules/@babel/types/lib/builders/generated/index.js.map +1 -0
- package/node_modules/@babel/types/lib/builders/generated/lowercase.js +2902 -0
- package/node_modules/@babel/types/lib/builders/generated/lowercase.js.map +1 -0
- package/node_modules/@babel/types/lib/builders/generated/uppercase.js +272 -0
- package/node_modules/@babel/types/lib/builders/generated/uppercase.js.map +1 -0
- package/node_modules/@babel/types/lib/builders/productions.js +12 -0
- package/node_modules/@babel/types/lib/builders/productions.js.map +1 -0
- package/node_modules/@babel/types/lib/builders/react/buildChildren.js +24 -0
- package/node_modules/@babel/types/lib/builders/react/buildChildren.js.map +1 -0
- package/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js +22 -0
- package/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js.map +1 -0
- package/node_modules/@babel/types/lib/builders/validateNode.js +21 -0
- package/node_modules/@babel/types/lib/builders/validateNode.js.map +1 -0
- package/node_modules/@babel/types/lib/clone/clone.js +12 -0
- package/node_modules/@babel/types/lib/clone/clone.js.map +1 -0
- package/node_modules/@babel/types/lib/clone/cloneDeep.js +12 -0
- package/node_modules/@babel/types/lib/clone/cloneDeep.js.map +1 -0
- package/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js +12 -0
- package/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js.map +1 -0
- package/node_modules/@babel/types/lib/clone/cloneNode.js +107 -0
- package/node_modules/@babel/types/lib/clone/cloneNode.js.map +1 -0
- package/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js +12 -0
- package/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js.map +1 -0
- package/node_modules/@babel/types/lib/comments/addComment.js +15 -0
- package/node_modules/@babel/types/lib/comments/addComment.js.map +1 -0
- package/node_modules/@babel/types/lib/comments/addComments.js +22 -0
- package/node_modules/@babel/types/lib/comments/addComments.js.map +1 -0
- package/node_modules/@babel/types/lib/comments/inheritInnerComments.js +12 -0
- package/node_modules/@babel/types/lib/comments/inheritInnerComments.js.map +1 -0
- package/node_modules/@babel/types/lib/comments/inheritLeadingComments.js +12 -0
- package/node_modules/@babel/types/lib/comments/inheritLeadingComments.js.map +1 -0
- package/node_modules/@babel/types/lib/comments/inheritTrailingComments.js +12 -0
- package/node_modules/@babel/types/lib/comments/inheritTrailingComments.js.map +1 -0
- package/node_modules/@babel/types/lib/comments/inheritsComments.js +17 -0
- package/node_modules/@babel/types/lib/comments/inheritsComments.js.map +1 -0
- package/node_modules/@babel/types/lib/comments/removeComments.js +15 -0
- package/node_modules/@babel/types/lib/comments/removeComments.js.map +1 -0
- package/node_modules/@babel/types/lib/constants/generated/index.js +60 -0
- package/node_modules/@babel/types/lib/constants/generated/index.js.map +1 -0
- package/node_modules/@babel/types/lib/constants/index.js +31 -0
- package/node_modules/@babel/types/lib/constants/index.js.map +1 -0
- package/node_modules/@babel/types/lib/converters/ensureBlock.js +14 -0
- package/node_modules/@babel/types/lib/converters/ensureBlock.js.map +1 -0
- package/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js +65 -0
- package/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js.map +1 -0
- package/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js +14 -0
- package/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js.map +1 -0
- package/node_modules/@babel/types/lib/converters/toBlock.js +29 -0
- package/node_modules/@babel/types/lib/converters/toBlock.js.map +1 -0
- package/node_modules/@babel/types/lib/converters/toComputedKey.js +14 -0
- package/node_modules/@babel/types/lib/converters/toComputedKey.js.map +1 -0
- package/node_modules/@babel/types/lib/converters/toExpression.js +28 -0
- package/node_modules/@babel/types/lib/converters/toExpression.js.map +1 -0
- package/node_modules/@babel/types/lib/converters/toIdentifier.js +25 -0
- package/node_modules/@babel/types/lib/converters/toIdentifier.js.map +1 -0
- package/node_modules/@babel/types/lib/converters/toKeyAlias.js +38 -0
- package/node_modules/@babel/types/lib/converters/toKeyAlias.js.map +1 -0
- package/node_modules/@babel/types/lib/converters/toSequenceExpression.js +19 -0
- package/node_modules/@babel/types/lib/converters/toSequenceExpression.js.map +1 -0
- package/node_modules/@babel/types/lib/converters/toStatement.js +39 -0
- package/node_modules/@babel/types/lib/converters/toStatement.js.map +1 -0
- package/node_modules/@babel/types/lib/converters/valueToNode.js +89 -0
- package/node_modules/@babel/types/lib/converters/valueToNode.js.map +1 -0
- package/node_modules/@babel/types/lib/definitions/core.js +1725 -0
- package/node_modules/@babel/types/lib/definitions/core.js.map +1 -0
- package/node_modules/@babel/types/lib/definitions/deprecated-aliases.js +11 -0
- package/node_modules/@babel/types/lib/definitions/deprecated-aliases.js.map +1 -0
- package/node_modules/@babel/types/lib/definitions/experimental.js +124 -0
- package/node_modules/@babel/types/lib/definitions/experimental.js.map +1 -0
- package/node_modules/@babel/types/lib/definitions/flow.js +495 -0
- package/node_modules/@babel/types/lib/definitions/flow.js.map +1 -0
- package/node_modules/@babel/types/lib/definitions/index.js +106 -0
- package/node_modules/@babel/types/lib/definitions/index.js.map +1 -0
- package/node_modules/@babel/types/lib/definitions/jsx.js +157 -0
- package/node_modules/@babel/types/lib/definitions/jsx.js.map +1 -0
- package/node_modules/@babel/types/lib/definitions/misc.js +31 -0
- package/node_modules/@babel/types/lib/definitions/misc.js.map +1 -0
- package/node_modules/@babel/types/lib/definitions/placeholders.js +27 -0
- package/node_modules/@babel/types/lib/definitions/placeholders.js.map +1 -0
- package/node_modules/@babel/types/lib/definitions/typescript.js +528 -0
- package/node_modules/@babel/types/lib/definitions/typescript.js.map +1 -0
- package/node_modules/@babel/types/lib/definitions/utils.js +296 -0
- package/node_modules/@babel/types/lib/definitions/utils.js.map +1 -0
- package/node_modules/@babel/types/lib/index-legacy.d.ts +2797 -0
- package/node_modules/@babel/types/lib/index.d.ts +3617 -0
- package/node_modules/@babel/types/lib/index.js +582 -0
- package/node_modules/@babel/types/lib/index.js.flow +2650 -0
- package/node_modules/@babel/types/lib/index.js.map +1 -0
- package/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js +15 -0
- package/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js.map +1 -0
- package/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js +65 -0
- package/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js.map +1 -0
- package/node_modules/@babel/types/lib/modifications/inherits.js +28 -0
- package/node_modules/@babel/types/lib/modifications/inherits.js.map +1 -0
- package/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js +17 -0
- package/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map +1 -0
- package/node_modules/@babel/types/lib/modifications/removeProperties.js +24 -0
- package/node_modules/@babel/types/lib/modifications/removeProperties.js.map +1 -0
- package/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js +14 -0
- package/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js.map +1 -0
- package/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js +66 -0
- package/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js.map +1 -0
- package/node_modules/@babel/types/lib/retrievers/getAssignmentIdentifiers.js +48 -0
- package/node_modules/@babel/types/lib/retrievers/getAssignmentIdentifiers.js.map +1 -0
- package/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js +102 -0
- package/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js.map +1 -0
- package/node_modules/@babel/types/lib/retrievers/getFunctionName.js +63 -0
- package/node_modules/@babel/types/lib/retrievers/getFunctionName.js.map +1 -0
- package/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js +13 -0
- package/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js.map +1 -0
- package/node_modules/@babel/types/lib/traverse/traverse.js +50 -0
- package/node_modules/@babel/types/lib/traverse/traverse.js.map +1 -0
- package/node_modules/@babel/types/lib/traverse/traverseFast.js +40 -0
- package/node_modules/@babel/types/lib/traverse/traverseFast.js.map +1 -0
- package/node_modules/@babel/types/lib/utils/deprecationWarning.js +44 -0
- package/node_modules/@babel/types/lib/utils/deprecationWarning.js.map +1 -0
- package/node_modules/@babel/types/lib/utils/inherit.js +13 -0
- package/node_modules/@babel/types/lib/utils/inherit.js.map +1 -0
- package/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js +40 -0
- package/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js.map +1 -0
- package/node_modules/@babel/types/lib/utils/shallowEqual.js +17 -0
- package/node_modules/@babel/types/lib/utils/shallowEqual.js.map +1 -0
- package/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js +13 -0
- package/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js.map +1 -0
- package/node_modules/@babel/types/lib/validators/generated/index.js +2797 -0
- package/node_modules/@babel/types/lib/validators/generated/index.js.map +1 -0
- package/node_modules/@babel/types/lib/validators/is.js +27 -0
- package/node_modules/@babel/types/lib/validators/is.js.map +1 -0
- package/node_modules/@babel/types/lib/validators/isBinding.js +27 -0
- package/node_modules/@babel/types/lib/validators/isBinding.js.map +1 -0
- package/node_modules/@babel/types/lib/validators/isBlockScoped.js +13 -0
- package/node_modules/@babel/types/lib/validators/isBlockScoped.js.map +1 -0
- package/node_modules/@babel/types/lib/validators/isImmutable.js +21 -0
- package/node_modules/@babel/types/lib/validators/isImmutable.js.map +1 -0
- package/node_modules/@babel/types/lib/validators/isLet.js +13 -0
- package/node_modules/@babel/types/lib/validators/isLet.js.map +1 -0
- package/node_modules/@babel/types/lib/validators/isNode.js +12 -0
- package/node_modules/@babel/types/lib/validators/isNode.js.map +1 -0
- package/node_modules/@babel/types/lib/validators/isNodesEquivalent.js +57 -0
- package/node_modules/@babel/types/lib/validators/isNodesEquivalent.js.map +1 -0
- package/node_modules/@babel/types/lib/validators/isPlaceholderType.js +15 -0
- package/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map +1 -0
- package/node_modules/@babel/types/lib/validators/isReferenced.js +96 -0
- package/node_modules/@babel/types/lib/validators/isReferenced.js.map +1 -0
- package/node_modules/@babel/types/lib/validators/isScope.js +18 -0
- package/node_modules/@babel/types/lib/validators/isScope.js.map +1 -0
- package/node_modules/@babel/types/lib/validators/isSpecifierDefault.js +14 -0
- package/node_modules/@babel/types/lib/validators/isSpecifierDefault.js.map +1 -0
- package/node_modules/@babel/types/lib/validators/isType.js +17 -0
- package/node_modules/@babel/types/lib/validators/isType.js.map +1 -0
- package/node_modules/@babel/types/lib/validators/isValidES3Identifier.js +13 -0
- package/node_modules/@babel/types/lib/validators/isValidES3Identifier.js.map +1 -0
- package/node_modules/@babel/types/lib/validators/isValidIdentifier.js +18 -0
- package/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map +1 -0
- package/node_modules/@babel/types/lib/validators/isVar.js +15 -0
- package/node_modules/@babel/types/lib/validators/isVar.js.map +1 -0
- package/node_modules/@babel/types/lib/validators/matchesPattern.js +44 -0
- package/node_modules/@babel/types/lib/validators/matchesPattern.js.map +1 -0
- package/node_modules/@babel/types/lib/validators/react/isCompatTag.js +11 -0
- package/node_modules/@babel/types/lib/validators/react/isCompatTag.js.map +1 -0
- package/node_modules/@babel/types/lib/validators/react/isReactComponent.js +11 -0
- package/node_modules/@babel/types/lib/validators/react/isReactComponent.js.map +1 -0
- package/node_modules/@babel/types/lib/validators/validate.js +42 -0
- package/node_modules/@babel/types/lib/validators/validate.js.map +1 -0
- package/node_modules/@babel/types/package.json +39 -0
- package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +13 -2
- package/node_modules/@code-yeongyu/senpi-codemode/README.md +128 -78
- package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -3
- package/node_modules/@code-yeongyu/senpi-codemode/src/bridge/protocol.ts +22 -9
- package/node_modules/@code-yeongyu/senpi-codemode/src/bridge/reserved.ts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/bridges/agent-bridge.ts +197 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/bridges/output-bridge.ts +96 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/bridges/schema-injection.ts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/completion/handler.ts +95 -26
- package/node_modules/@code-yeongyu/senpi-codemode/src/completion/tool-bridge.ts +14 -2
- package/node_modules/@code-yeongyu/senpi-codemode/src/config/settings.ts +96 -8
- package/node_modules/@code-yeongyu/senpi-codemode/src/extension/session-manager.ts +92 -10
- package/node_modules/@code-yeongyu/senpi-codemode/src/index.ts +187 -27
- package/node_modules/@code-yeongyu/senpi-codemode/src/interpreters/detect.ts +1 -1
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/jl/prelude.jl +252 -48
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/jl/runner.jl +263 -83
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/js/context-manager.ts +198 -149
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/js/inline-worker-entry.js +23 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/js/inline-worker.ts +4 -175
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/js/kernel-contract.ts +38 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/js/local-module-loader.ts +108 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/js/prelude.ts +8 -6
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/js/rewrite-imports.ts +164 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/js/run-queue.ts +82 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/js/worker-core.js +13 -4
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/js/worker-host.ts +117 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/js/worker-runtime.js +307 -41
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/py/kernel-contract.ts +32 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/py/kernel.ts +232 -199
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/py/prelude.py +792 -79
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/py/process.ts +119 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/py/transport.ts +237 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/rb/prelude.rb +234 -21
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/rb/runner.rb +154 -51
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/shared/subprocess-contract.ts +22 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/shared/subprocess-kernel.ts +214 -189
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/shared/subprocess-process.ts +174 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/shared/subprocess-queue.ts +101 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/shared/subprocess-run.ts +98 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/output/output-meta.ts +89 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/output/streaming-output.ts +296 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/prompt/eval-prompt.ts +107 -30
- package/node_modules/@code-yeongyu/senpi-codemode/src/timeouts/bridge-timeout.ts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/timeouts/idle-timeout.ts +8 -19
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/cell-handler.ts +267 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool.ts +226 -211
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/image.ts +274 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/json-tree.ts +247 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/render.ts +828 -35
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/status-events.ts +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/types.ts +30 -1
- package/node_modules/@earendil-works/pi-agent-core/README.md +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +2 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +4 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
- package/node_modules/@earendil-works/pi-ai/README.md +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +89 -40
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +7 -7
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +10 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +5 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.d.ts +3 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +35 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +7 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +8 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/transform-messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/transform-messages.js +4 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/transform-messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/compat.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/compat.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/compat.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +483 -61
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.js +13 -4
- package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +5 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.d.ts +62 -5
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.js +32 -20
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.d.ts +11 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.js +6 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.d.ts +7 -8
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.js +20 -21
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.d.ts +11 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.js +6 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-auth.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-auth.js +9 -6
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-auth.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/deepseek.models.d.ts +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/deepseek.models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/deepseek.models.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/deepseek.models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.d.ts +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.d.ts +100 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.js +64 -5
- package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.models.d.ts +56 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.models.js +20 -9
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai.models.d.ts +77 -8
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai.models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai.models.js +37 -24
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai.models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.d.ts +3 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.js +3 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.d.ts +80 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.js +64 -8
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.d.ts +25 -22
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.js +68 -83
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.d.ts +45 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.js +49 -13
- package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai-coding-cn.models.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai-coding-cn.models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai-coding-cn.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai-coding-cn.models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai.models.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai.models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai.models.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai.models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +30 -7
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/deferred-tools.d.ts +9 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/deferred-tools.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/deferred-tools.js +36 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/deferred-tools.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/estimate.d.ts +3 -3
- package/node_modules/@earendil-works/pi-ai/dist/utils/estimate.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/estimate.js +35 -14
- package/node_modules/@earendil-works/pi-ai/dist/utils/estimate.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +2 -2
- package/node_modules/@earendil-works/pi-pty/package.json +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js +2 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +2 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js +2 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keys.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keys.js +6 -5
- package/node_modules/@earendil-works/pi-tui/dist/keys.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +0 -9
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-text.d.ts +4 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal-text.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal-text.js +18 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal-text.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/package.json +2 -2
- package/package.json +6 -6
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.allExpandedTypes = exports.VISITOR_KEYS = exports.NODE_UNION_SHAPES__PRIVATE = exports.NODE_PARENT_VALIDATIONS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.ALIAS_KEYS = void 0;
|
|
7
|
+
exports.arrayOf = arrayOf;
|
|
8
|
+
exports.arrayOfType = arrayOfType;
|
|
9
|
+
exports.assertEach = assertEach;
|
|
10
|
+
exports.assertNodeOrValueType = assertNodeOrValueType;
|
|
11
|
+
exports.assertNodeType = assertNodeType;
|
|
12
|
+
exports.assertOneOf = assertOneOf;
|
|
13
|
+
exports.assertOptionalChainStart = assertOptionalChainStart;
|
|
14
|
+
exports.assertShape = assertShape;
|
|
15
|
+
exports.assertValueType = assertValueType;
|
|
16
|
+
exports.chain = chain;
|
|
17
|
+
exports.default = defineType;
|
|
18
|
+
exports.defineAliasedType = defineAliasedType;
|
|
19
|
+
exports.validate = validate;
|
|
20
|
+
exports.validateArrayOfType = validateArrayOfType;
|
|
21
|
+
exports.validateOptional = validateOptional;
|
|
22
|
+
exports.validateOptionalType = validateOptionalType;
|
|
23
|
+
exports.validateType = validateType;
|
|
24
|
+
var _is = require("../validators/is.js");
|
|
25
|
+
var _validate = require("../validators/validate.js");
|
|
26
|
+
const VISITOR_KEYS = exports.VISITOR_KEYS = {};
|
|
27
|
+
const ALIAS_KEYS = exports.ALIAS_KEYS = {};
|
|
28
|
+
const FLIPPED_ALIAS_KEYS = exports.FLIPPED_ALIAS_KEYS = {};
|
|
29
|
+
const NODE_FIELDS = exports.NODE_FIELDS = {};
|
|
30
|
+
const BUILDER_KEYS = exports.BUILDER_KEYS = {};
|
|
31
|
+
const DEPRECATED_KEYS = exports.DEPRECATED_KEYS = {};
|
|
32
|
+
const NODE_PARENT_VALIDATIONS = exports.NODE_PARENT_VALIDATIONS = {};
|
|
33
|
+
const NODE_UNION_SHAPES__PRIVATE = exports.NODE_UNION_SHAPES__PRIVATE = {};
|
|
34
|
+
function getType(val) {
|
|
35
|
+
if (Array.isArray(val)) {
|
|
36
|
+
return "array";
|
|
37
|
+
} else if (val === null) {
|
|
38
|
+
return "null";
|
|
39
|
+
} else {
|
|
40
|
+
return typeof val;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function validate(validate) {
|
|
44
|
+
return {
|
|
45
|
+
validate
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function validateType(...typeNames) {
|
|
49
|
+
return validate(assertNodeType(...typeNames));
|
|
50
|
+
}
|
|
51
|
+
function validateOptional(validate) {
|
|
52
|
+
return {
|
|
53
|
+
validate,
|
|
54
|
+
optional: true
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function validateOptionalType(...typeNames) {
|
|
58
|
+
return {
|
|
59
|
+
validate: assertNodeType(...typeNames),
|
|
60
|
+
optional: true
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function arrayOf(elementType) {
|
|
64
|
+
return chain(assertValueType("array"), assertEach(elementType));
|
|
65
|
+
}
|
|
66
|
+
function arrayOfType(...typeNames) {
|
|
67
|
+
return arrayOf(assertNodeType(...typeNames));
|
|
68
|
+
}
|
|
69
|
+
function validateArrayOfType(...typeNames) {
|
|
70
|
+
return validate(arrayOfType(...typeNames));
|
|
71
|
+
}
|
|
72
|
+
function assertEach(callback) {
|
|
73
|
+
const childValidator = process.env.BABEL_TYPES_8_BREAKING ? _validate.validateChild : () => {};
|
|
74
|
+
function validator(node, key, val) {
|
|
75
|
+
if (!Array.isArray(val)) return;
|
|
76
|
+
let i = 0;
|
|
77
|
+
const subKey = {
|
|
78
|
+
toString() {
|
|
79
|
+
return `${key}[${i}]`;
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
for (; i < val.length; i++) {
|
|
83
|
+
const v = val[i];
|
|
84
|
+
callback(node, subKey, v);
|
|
85
|
+
childValidator(node, subKey, v);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
validator.each = callback;
|
|
89
|
+
return validator;
|
|
90
|
+
}
|
|
91
|
+
function assertOneOf(...values) {
|
|
92
|
+
function validate(node, key, val) {
|
|
93
|
+
if (!values.includes(val)) {
|
|
94
|
+
throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
validate.oneOf = values;
|
|
98
|
+
return validate;
|
|
99
|
+
}
|
|
100
|
+
const allExpandedTypes = exports.allExpandedTypes = [];
|
|
101
|
+
function assertNodeType(...types) {
|
|
102
|
+
const expandedTypes = new Set();
|
|
103
|
+
allExpandedTypes.push({
|
|
104
|
+
types,
|
|
105
|
+
set: expandedTypes
|
|
106
|
+
});
|
|
107
|
+
function validate(node, key, val) {
|
|
108
|
+
const valType = val == null ? void 0 : val.type;
|
|
109
|
+
if (valType != null) {
|
|
110
|
+
if (expandedTypes.has(valType)) {
|
|
111
|
+
(0, _validate.validateChild)(node, key, val);
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
if (valType === "Placeholder") {
|
|
115
|
+
for (const type of types) {
|
|
116
|
+
if ((0, _is.default)(type, val)) {
|
|
117
|
+
(0, _validate.validateChild)(node, key, val);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(valType)}`);
|
|
124
|
+
}
|
|
125
|
+
validate.oneOfNodeTypes = types;
|
|
126
|
+
return validate;
|
|
127
|
+
}
|
|
128
|
+
function assertNodeOrValueType(...types) {
|
|
129
|
+
function validate(node, key, val) {
|
|
130
|
+
const primitiveType = getType(val);
|
|
131
|
+
for (const type of types) {
|
|
132
|
+
if (primitiveType === type || (0, _is.default)(type, val)) {
|
|
133
|
+
(0, _validate.validateChild)(node, key, val);
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
|
|
138
|
+
}
|
|
139
|
+
validate.oneOfNodeOrValueTypes = types;
|
|
140
|
+
return validate;
|
|
141
|
+
}
|
|
142
|
+
function assertValueType(type) {
|
|
143
|
+
function validate(node, key, val) {
|
|
144
|
+
if (getType(val) === type) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`);
|
|
148
|
+
}
|
|
149
|
+
validate.type = type;
|
|
150
|
+
return validate;
|
|
151
|
+
}
|
|
152
|
+
function assertShape(shape) {
|
|
153
|
+
const keys = Object.keys(shape);
|
|
154
|
+
function validate(node, key, val) {
|
|
155
|
+
const errors = [];
|
|
156
|
+
for (const property of keys) {
|
|
157
|
+
try {
|
|
158
|
+
(0, _validate.validateField)(node, property, val[property], shape[property]);
|
|
159
|
+
} catch (error) {
|
|
160
|
+
if (error instanceof TypeError) {
|
|
161
|
+
errors.push(error.message);
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
throw error;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
if (errors.length) {
|
|
168
|
+
throw new TypeError(`Property ${key} of ${node.type} expected to have the following:\n${errors.join("\n")}`);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
validate.shapeOf = shape;
|
|
172
|
+
return validate;
|
|
173
|
+
}
|
|
174
|
+
function assertOptionalChainStart() {
|
|
175
|
+
function validate(node) {
|
|
176
|
+
var _current;
|
|
177
|
+
let current = node;
|
|
178
|
+
while (node) {
|
|
179
|
+
const {
|
|
180
|
+
type
|
|
181
|
+
} = current;
|
|
182
|
+
if (type === "OptionalCallExpression") {
|
|
183
|
+
if (current.optional) return;
|
|
184
|
+
current = current.callee;
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
if (type === "OptionalMemberExpression") {
|
|
188
|
+
if (current.optional) return;
|
|
189
|
+
current = current.object;
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current) == null ? void 0 : _current.type}`);
|
|
195
|
+
}
|
|
196
|
+
return validate;
|
|
197
|
+
}
|
|
198
|
+
function chain(...fns) {
|
|
199
|
+
function validate(...args) {
|
|
200
|
+
for (const fn of fns) {
|
|
201
|
+
fn(...args);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
validate.chainOf = fns;
|
|
205
|
+
if (fns.length >= 2 && "type" in fns[0] && fns[0].type === "array" && !("each" in fns[1])) {
|
|
206
|
+
throw new Error(`An assertValueType("array") validator can only be followed by an assertEach(...) validator.`);
|
|
207
|
+
}
|
|
208
|
+
return validate;
|
|
209
|
+
}
|
|
210
|
+
const validTypeOpts = new Set(["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate", "unionShape"]);
|
|
211
|
+
const validFieldKeys = new Set(["default", "optional", "deprecated", "validate"]);
|
|
212
|
+
const store = {};
|
|
213
|
+
function defineAliasedType(...aliases) {
|
|
214
|
+
return (type, opts = {}) => {
|
|
215
|
+
let defined = opts.aliases;
|
|
216
|
+
if (!defined) {
|
|
217
|
+
var _store$opts$inherits$;
|
|
218
|
+
if (opts.inherits) defined = (_store$opts$inherits$ = store[opts.inherits].aliases) == null ? void 0 : _store$opts$inherits$.slice();
|
|
219
|
+
defined != null ? defined : defined = [];
|
|
220
|
+
opts.aliases = defined;
|
|
221
|
+
}
|
|
222
|
+
const additional = aliases.filter(a => !defined.includes(a));
|
|
223
|
+
defined.unshift(...additional);
|
|
224
|
+
defineType(type, opts);
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
function defineType(type, opts = {}) {
|
|
228
|
+
const inherits = opts.inherits && store[opts.inherits] || {};
|
|
229
|
+
let fields = opts.fields;
|
|
230
|
+
if (!fields) {
|
|
231
|
+
fields = {};
|
|
232
|
+
if (inherits.fields) {
|
|
233
|
+
const keys = Object.getOwnPropertyNames(inherits.fields);
|
|
234
|
+
for (const key of keys) {
|
|
235
|
+
const field = inherits.fields[key];
|
|
236
|
+
const def = field.default;
|
|
237
|
+
if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") {
|
|
238
|
+
throw new Error("field defaults can only be primitives or empty arrays currently");
|
|
239
|
+
}
|
|
240
|
+
fields[key] = {
|
|
241
|
+
default: Array.isArray(def) ? [] : def,
|
|
242
|
+
optional: field.optional,
|
|
243
|
+
deprecated: field.deprecated,
|
|
244
|
+
validate: field.validate
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
const visitor = opts.visitor || inherits.visitor || [];
|
|
250
|
+
const aliases = opts.aliases || inherits.aliases || [];
|
|
251
|
+
const builder = opts.builder || inherits.builder || opts.visitor || [];
|
|
252
|
+
for (const k of Object.keys(opts)) {
|
|
253
|
+
if (!validTypeOpts.has(k)) {
|
|
254
|
+
throw new Error(`Unknown type option "${k}" on ${type}`);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
if (opts.deprecatedAlias) {
|
|
258
|
+
DEPRECATED_KEYS[opts.deprecatedAlias] = type;
|
|
259
|
+
}
|
|
260
|
+
for (const key of visitor.concat(builder)) {
|
|
261
|
+
fields[key] = fields[key] || {};
|
|
262
|
+
}
|
|
263
|
+
for (const key of Object.keys(fields)) {
|
|
264
|
+
const field = fields[key];
|
|
265
|
+
if (field.default !== undefined && !builder.includes(key)) {
|
|
266
|
+
field.optional = true;
|
|
267
|
+
}
|
|
268
|
+
if (field.default === undefined) {
|
|
269
|
+
field.default = null;
|
|
270
|
+
} else if (!field.validate && field.default != null) {
|
|
271
|
+
field.validate = assertValueType(getType(field.default));
|
|
272
|
+
}
|
|
273
|
+
for (const k of Object.keys(field)) {
|
|
274
|
+
if (!validFieldKeys.has(k)) {
|
|
275
|
+
throw new Error(`Unknown field key "${k}" on ${type}.${key}`);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
VISITOR_KEYS[type] = opts.visitor = visitor;
|
|
280
|
+
BUILDER_KEYS[type] = opts.builder = builder;
|
|
281
|
+
NODE_FIELDS[type] = opts.fields = fields;
|
|
282
|
+
ALIAS_KEYS[type] = opts.aliases = aliases;
|
|
283
|
+
aliases.forEach(alias => {
|
|
284
|
+
FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];
|
|
285
|
+
FLIPPED_ALIAS_KEYS[alias].push(type);
|
|
286
|
+
});
|
|
287
|
+
if (opts.validate) {
|
|
288
|
+
NODE_PARENT_VALIDATIONS[type] = opts.validate;
|
|
289
|
+
}
|
|
290
|
+
if (opts.unionShape) {
|
|
291
|
+
NODE_UNION_SHAPES__PRIVATE[type] = opts.unionShape;
|
|
292
|
+
}
|
|
293
|
+
store[type] = opts;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_is","require","_validate","VISITOR_KEYS","exports","ALIAS_KEYS","FLIPPED_ALIAS_KEYS","NODE_FIELDS","BUILDER_KEYS","DEPRECATED_KEYS","NODE_PARENT_VALIDATIONS","NODE_UNION_SHAPES__PRIVATE","getType","val","Array","isArray","validate","validateType","typeNames","assertNodeType","validateOptional","optional","validateOptionalType","arrayOf","elementType","chain","assertValueType","assertEach","arrayOfType","validateArrayOfType","callback","childValidator","process","env","BABEL_TYPES_8_BREAKING","validateChild","validator","node","key","i","subKey","toString","length","v","each","assertOneOf","values","includes","TypeError","JSON","stringify","oneOf","allExpandedTypes","types","expandedTypes","Set","push","set","valType","type","has","is","oneOfNodeTypes","assertNodeOrValueType","primitiveType","oneOfNodeOrValueTypes","assertShape","shape","keys","Object","errors","property","validateField","error","message","join","shapeOf","assertOptionalChainStart","_current","current","callee","object","fns","args","fn","chainOf","Error","validTypeOpts","validFieldKeys","store","defineAliasedType","aliases","opts","defined","_store$opts$inherits$","inherits","slice","additional","filter","a","unshift","defineType","fields","getOwnPropertyNames","field","def","default","deprecated","visitor","builder","k","deprecatedAlias","concat","undefined","forEach","alias","unionShape"],"sources":["../../src/definitions/utils.ts"],"sourcesContent":["import is from \"../validators/is.ts\";\nimport { validateField, validateChild } from \"../validators/validate.ts\";\nimport type * as t from \"../index.ts\";\n\nexport const VISITOR_KEYS: Record<string, string[]> = {};\nexport const ALIAS_KEYS: Partial<Record<NodeTypesWithoutComment, string[]>> =\n {};\nexport const FLIPPED_ALIAS_KEYS: Record<string, NodeTypesWithoutComment[]> = {};\nexport const NODE_FIELDS: Record<string, FieldDefinitions> = {};\nexport const BUILDER_KEYS: Record<string, string[]> = {};\nexport const DEPRECATED_KEYS: Record<string, NodeTypesWithoutComment> = {};\nexport const NODE_PARENT_VALIDATIONS: Record<string, Validator> = {};\nexport const NODE_UNION_SHAPES__PRIVATE: Record<string, UnionShape> = {};\n\nfunction getType(val: any) {\n if (Array.isArray(val)) {\n return \"array\";\n } else if (val === null) {\n return \"null\";\n } else {\n return typeof val;\n }\n}\n\ntype NodeTypesWithoutComment = t.Node[\"type\"] | keyof t.Aliases;\n\ntype NodeTypes = NodeTypesWithoutComment | t.Comment[\"type\"];\n\ntype PrimitiveTypes = ReturnType<typeof getType>;\n\ntype FieldDefinitions = Record<string, FieldOptions>;\n\ntype UnionShape = {\n discriminator: string;\n shapes: {\n name: string;\n value: any[];\n properties: Record<string, FieldOptions>;\n }[];\n};\n\ntype DefineTypeOpts = {\n fields?: FieldDefinitions;\n visitor?: string[];\n aliases?: string[];\n builder?: string[];\n inherits?: NodeTypes;\n deprecatedAlias?: string;\n validate?: Validator;\n unionShape?: UnionShape;\n};\n\nexport type ValidatorImpl = (\n node?: t.Node,\n key?: string | { toString(): string },\n val?: any,\n) => void;\n\nexport type ValidatorType = { type: PrimitiveTypes } & ValidatorImpl;\nexport type ValidatorEach = { each: Validator } & ValidatorImpl;\nexport type ValidatorChainOf = {\n chainOf: readonly Validator[];\n} & ValidatorImpl;\nexport type ValidatorOneOf = { oneOf: readonly any[] } & ValidatorImpl;\nexport type ValidatorOneOfNodeTypes = {\n oneOfNodeTypes: readonly NodeTypes[];\n} & ValidatorImpl;\nexport type ValidatorOneOfNodeOrValueTypes = {\n oneOfNodeOrValueTypes: readonly (NodeTypes | PrimitiveTypes)[];\n} & ValidatorImpl;\nexport type ValidatorShapeOf = {\n shapeOf: Record<string, FieldOptions>;\n} & ValidatorImpl;\n\nexport type Validator =\n | ValidatorType\n | ValidatorEach\n | ValidatorChainOf\n | ValidatorOneOf\n | ValidatorOneOfNodeTypes\n | ValidatorOneOfNodeOrValueTypes\n | ValidatorShapeOf\n | ValidatorImpl;\n\nexport type FieldOptions = {\n default?: string | number | boolean | [];\n optional?: boolean;\n deprecated?: boolean;\n validate?: Validator;\n};\n\nexport function validate(validate: Validator): FieldOptions {\n return { validate };\n}\n\nexport function validateType(...typeNames: NodeTypes[]) {\n return validate(assertNodeType(...typeNames));\n}\n\nexport function validateOptional(validate: Validator): FieldOptions {\n return { validate, optional: true };\n}\n\nexport function validateOptionalType(...typeNames: NodeTypes[]): FieldOptions {\n return { validate: assertNodeType(...typeNames), optional: true };\n}\n\nexport function arrayOf(elementType: Validator): Validator {\n return chain(assertValueType(\"array\"), assertEach(elementType));\n}\n\nexport function arrayOfType(...typeNames: NodeTypes[]) {\n return arrayOf(assertNodeType(...typeNames));\n}\n\nexport function validateArrayOfType(...typeNames: NodeTypes[]) {\n return validate(arrayOfType(...typeNames));\n}\n\nexport function assertEach(callback: Validator): Validator {\n const childValidator =\n process.env.BABEL_8_BREAKING || process.env.BABEL_TYPES_8_BREAKING\n ? validateChild\n : () => {};\n\n function validator(node: t.Node, key: string, val: any) {\n if (!Array.isArray(val)) return;\n\n let i = 0;\n // We lazily concatenate strings here for performance reasons.\n // Concatenating the strings is expensive because we are actually concatenating a string and a number,\n // so V8 cannot just create a \"rope string\" but has to allocate memory for the string resulting from the number\n // This string is very rarely used, only in error paths, so we can skip the concatenation cost in most cases\n const subKey = {\n toString() {\n return `${key}[${i}]`;\n },\n };\n\n for (; i < val.length; i++) {\n const v = val[i];\n callback(node, subKey, v);\n childValidator(node, subKey, v);\n }\n }\n validator.each = callback;\n return validator;\n}\n\nexport function assertOneOf(...values: any[]): Validator {\n function validate(node: any, key: string, val: any) {\n if (!values.includes(val)) {\n throw new TypeError(\n `Property ${key} expected value to be one of ${JSON.stringify(\n values,\n )} but got ${JSON.stringify(val)}`,\n );\n }\n }\n\n validate.oneOf = values;\n\n return validate;\n}\n\nexport const allExpandedTypes: {\n types: NodeTypes[];\n set: Set<string>;\n}[] = [];\n\nexport function assertNodeType(...types: NodeTypes[]): Validator {\n const expandedTypes = new Set<string>();\n\n allExpandedTypes.push({ types, set: expandedTypes });\n\n function validate(node: t.Node, key: string, val: any) {\n const valType = val?.type;\n if (valType != null) {\n if (expandedTypes.has(valType)) {\n validateChild(node, key, val);\n return;\n }\n if (valType === \"Placeholder\") {\n for (const type of types) {\n if (is(type, val)) {\n validateChild(node, key, val);\n return;\n }\n }\n }\n }\n\n throw new TypeError(\n `Property ${key} of ${\n node.type\n } expected node to be of a type ${JSON.stringify(\n types,\n )} but instead got ${JSON.stringify(valType)}`,\n );\n }\n\n validate.oneOfNodeTypes = types;\n\n return validate;\n}\n\nexport function assertNodeOrValueType(\n ...types: (NodeTypes | PrimitiveTypes)[]\n): Validator {\n function validate(node: t.Node, key: string, val: any) {\n const primitiveType = getType(val);\n for (const type of types) {\n if (primitiveType === type || is(type, val)) {\n validateChild(node, key, val);\n return;\n }\n }\n\n throw new TypeError(\n `Property ${key} of ${\n node.type\n } expected node to be of a type ${JSON.stringify(\n types,\n )} but instead got ${JSON.stringify(val?.type)}`,\n );\n }\n\n validate.oneOfNodeOrValueTypes = types;\n\n return validate;\n}\n\nexport function assertValueType(type: PrimitiveTypes): Validator {\n function validate(node: t.Node, key: string, val: any) {\n if (getType(val) === type) {\n return;\n }\n\n throw new TypeError(\n `Property ${key} expected type of ${type} but got ${getType(val)}`,\n );\n }\n\n validate.type = type;\n\n return validate;\n}\n\nexport function assertShape(shape: Record<string, FieldOptions>): Validator {\n const keys = Object.keys(shape);\n function validate(node: t.Node, key: string, val: any) {\n const errors = [];\n for (const property of keys) {\n try {\n validateField(node, property, val[property], shape[property]);\n } catch (error) {\n if (error instanceof TypeError) {\n errors.push(error.message);\n continue;\n }\n throw error;\n }\n }\n if (errors.length) {\n throw new TypeError(\n `Property ${key} of ${\n node.type\n } expected to have the following:\\n${errors.join(\"\\n\")}`,\n );\n }\n }\n\n validate.shapeOf = shape;\n\n return validate;\n}\n\nexport function assertOptionalChainStart(): Validator {\n function validate(node: t.Node) {\n let current = node;\n while (node) {\n const { type } = current;\n if (type === \"OptionalCallExpression\") {\n if (current.optional) return;\n current = current.callee;\n continue;\n }\n\n if (type === \"OptionalMemberExpression\") {\n if (current.optional) return;\n current = current.object;\n continue;\n }\n\n break;\n }\n\n throw new TypeError(\n `Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${current?.type}`,\n );\n }\n\n return validate;\n}\n\nexport function chain(...fns: Validator[]): Validator {\n function validate(...args: Parameters<Validator>) {\n for (const fn of fns) {\n fn(...args);\n }\n }\n validate.chainOf = fns;\n\n if (\n fns.length >= 2 &&\n \"type\" in fns[0] &&\n fns[0].type === \"array\" &&\n !(\"each\" in fns[1])\n ) {\n throw new Error(\n `An assertValueType(\"array\") validator can only be followed by an assertEach(...) validator.`,\n );\n }\n\n return validate;\n}\n\nconst validTypeOpts = new Set([\n \"aliases\",\n \"builder\",\n \"deprecatedAlias\",\n \"fields\",\n \"inherits\",\n \"visitor\",\n \"validate\",\n \"unionShape\",\n]);\nconst validFieldKeys = new Set([\n \"default\",\n \"optional\",\n \"deprecated\",\n \"validate\",\n]);\n\nconst store = {} as Record<string, DefineTypeOpts>;\n\n// Wraps defineType to ensure these aliases are included.\nexport function defineAliasedType(...aliases: string[]) {\n return (type: string, opts: DefineTypeOpts = {}) => {\n let defined = opts.aliases;\n if (!defined) {\n if (opts.inherits) defined = store[opts.inherits].aliases?.slice();\n defined ??= [];\n opts.aliases = defined;\n }\n const additional = aliases.filter(a => !defined.includes(a));\n defined.unshift(...additional);\n defineType(type, opts);\n };\n}\n\nexport default function defineType(type: string, opts: DefineTypeOpts = {}) {\n const inherits = (opts.inherits && store[opts.inherits]) || {};\n\n let fields = opts.fields;\n if (!fields) {\n fields = {};\n if (inherits.fields) {\n const keys = Object.getOwnPropertyNames(inherits.fields);\n for (const key of keys) {\n const field = inherits.fields[key];\n const def = field.default;\n if (\n Array.isArray(def) ? def.length > 0 : def && typeof def === \"object\"\n ) {\n throw new Error(\n \"field defaults can only be primitives or empty arrays currently\",\n );\n }\n fields[key] = {\n default: Array.isArray(def) ? [] : def,\n optional: field.optional,\n deprecated: field.deprecated,\n validate: field.validate,\n };\n }\n }\n }\n\n const visitor: string[] = opts.visitor || inherits.visitor || [];\n const aliases: string[] = opts.aliases || inherits.aliases || [];\n const builder: string[] =\n opts.builder || inherits.builder || opts.visitor || [];\n\n for (const k of Object.keys(opts)) {\n if (!validTypeOpts.has(k)) {\n throw new Error(`Unknown type option \"${k}\" on ${type}`);\n }\n }\n\n if (opts.deprecatedAlias) {\n DEPRECATED_KEYS[opts.deprecatedAlias] = type as NodeTypesWithoutComment;\n }\n\n // ensure all field keys are represented in `fields`\n for (const key of visitor.concat(builder)) {\n fields[key] = fields[key] || {};\n }\n\n for (const key of Object.keys(fields)) {\n const field = fields[key];\n\n if (field.default !== undefined && !builder.includes(key)) {\n field.optional = true;\n }\n if (field.default === undefined) {\n field.default = null;\n } else if (!field.validate && field.default != null) {\n field.validate = assertValueType(getType(field.default));\n }\n\n for (const k of Object.keys(field)) {\n if (!validFieldKeys.has(k)) {\n throw new Error(`Unknown field key \"${k}\" on ${type}.${key}`);\n }\n }\n }\n\n VISITOR_KEYS[type] = opts.visitor = visitor;\n BUILDER_KEYS[type] = opts.builder = builder;\n NODE_FIELDS[type] = opts.fields = fields;\n ALIAS_KEYS[type as NodeTypesWithoutComment] = opts.aliases = aliases;\n aliases.forEach(alias => {\n FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];\n FLIPPED_ALIAS_KEYS[alias].push(type as NodeTypesWithoutComment);\n });\n\n if (opts.validate) {\n NODE_PARENT_VALIDATIONS[type] = opts.validate;\n }\n if (opts.unionShape) {\n NODE_UNION_SHAPES__PRIVATE[type] = opts.unionShape;\n }\n\n store[type] = opts;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,GAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAGO,MAAME,YAAsC,GAAAC,OAAA,CAAAD,YAAA,GAAG,CAAC,CAAC;AACjD,MAAME,UAA8D,GAAAD,OAAA,CAAAC,UAAA,GACzE,CAAC,CAAC;AACG,MAAMC,kBAA6D,GAAAF,OAAA,CAAAE,kBAAA,GAAG,CAAC,CAAC;AACxE,MAAMC,WAA6C,GAAAH,OAAA,CAAAG,WAAA,GAAG,CAAC,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