effect 4.0.0-beta.103 → 4.0.0-beta.105
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/AGENTS.md +381 -0
- package/CLAUDE.md +381 -0
- package/ai-docs/README.md +44 -0
- package/ai-docs/package.json +36 -0
- package/ai-docs/src/01_effect/01_basics/01_effect-gen.ts +30 -0
- package/ai-docs/src/01_effect/01_basics/02_effect-fn.ts +39 -0
- package/ai-docs/src/01_effect/01_basics/10_creating-effects.ts +74 -0
- package/ai-docs/src/01_effect/01_basics/index.md +5 -0
- package/ai-docs/src/01_effect/02_schema/10_schema-basics.ts +43 -0
- package/ai-docs/src/01_effect/02_schema/index.md +7 -0
- package/ai-docs/src/01_effect/03_services/01_service.ts +45 -0
- package/ai-docs/src/01_effect/03_services/10_reference.ts +10 -0
- package/ai-docs/src/01_effect/03_services/20_layer-composition.ts +70 -0
- package/ai-docs/src/01_effect/03_services/20_layer-unwrap.ts +66 -0
- package/ai-docs/src/01_effect/03_services/index.md +5 -0
- package/ai-docs/src/01_effect/04_errors/01_error-handling.ts +30 -0
- package/ai-docs/src/01_effect/04_errors/10_catch-tags.ts +24 -0
- package/ai-docs/src/01_effect/04_errors/20_reason-errors.ts +64 -0
- package/ai-docs/src/01_effect/04_errors/index.md +1 -0
- package/ai-docs/src/01_effect/05_resources/10_acquire-release.ts +105 -0
- package/ai-docs/src/01_effect/05_resources/20_layer-side-effects.ts +31 -0
- package/ai-docs/src/01_effect/05_resources/30_layer-map.ts +86 -0
- package/ai-docs/src/01_effect/05_resources/index.md +3 -0
- package/ai-docs/src/01_effect/06_running/10_run-main.ts +30 -0
- package/ai-docs/src/01_effect/06_running/20_layer-launch.ts +27 -0
- package/ai-docs/src/01_effect/06_running/index.md +1 -0
- package/ai-docs/src/01_effect/07_pubsub/10_pubsub.ts +56 -0
- package/ai-docs/src/01_effect/07_pubsub/index.md +3 -0
- package/ai-docs/src/03_stream/10_creating-streams.ts +103 -0
- package/ai-docs/src/03_stream/20_consuming-streams.ts +137 -0
- package/ai-docs/src/03_stream/30_encoding.ts +165 -0
- package/ai-docs/src/03_stream/index.md +4 -0
- package/ai-docs/src/04_integration/10_managed-runtime.ts +129 -0
- package/ai-docs/src/04_integration/index.md +5 -0
- package/ai-docs/src/05_batching/10_request-resolver.ts +89 -0
- package/ai-docs/src/05_batching/index.md +3 -0
- package/ai-docs/src/06_schedule/10_schedules.ts +110 -0
- package/ai-docs/src/06_schedule/index.md +3 -0
- package/ai-docs/src/07_datetime/10_creating-and-formatting.ts +30 -0
- package/ai-docs/src/07_datetime/20_time-zones.ts +44 -0
- package/ai-docs/src/07_datetime/index.md +5 -0
- package/ai-docs/src/08_observability/10_logging.ts +66 -0
- package/ai-docs/src/08_observability/20_otlp-tracing.ts +95 -0
- package/ai-docs/src/08_observability/index.md +7 -0
- package/ai-docs/src/09_testing/10_effect-tests.ts +55 -0
- package/ai-docs/src/09_testing/20_layer-tests.ts +138 -0
- package/ai-docs/src/09_testing/index.md +1 -0
- package/ai-docs/src/10_predicate/01_basics.ts +14 -0
- package/ai-docs/src/10_predicate/index.md +9 -0
- package/ai-docs/src/50_http-client/10_basics.ts +102 -0
- package/ai-docs/src/50_http-client/index.md +3 -0
- package/ai-docs/src/51_http-server/10_basics.ts +116 -0
- package/ai-docs/src/51_http-server/fixtures/api/Api.ts +14 -0
- package/ai-docs/src/51_http-server/fixtures/api/Authorization.ts +36 -0
- package/ai-docs/src/51_http-server/fixtures/api/System.ts +10 -0
- package/ai-docs/src/51_http-server/fixtures/api/Users.ts +91 -0
- package/ai-docs/src/51_http-server/fixtures/domain/User.ts +12 -0
- package/ai-docs/src/51_http-server/fixtures/domain/UserErrors.ts +22 -0
- package/ai-docs/src/51_http-server/fixtures/server/Authorization.ts +36 -0
- package/ai-docs/src/51_http-server/fixtures/server/Users/http.ts +71 -0
- package/ai-docs/src/51_http-server/fixtures/server/Users.ts +62 -0
- package/ai-docs/src/51_http-server/index.md +3 -0
- package/ai-docs/src/60_child-process/10_working-with-child-processes.ts +117 -0
- package/ai-docs/src/60_child-process/index.md +3 -0
- package/ai-docs/src/70_cli/10_basics.ts +136 -0
- package/ai-docs/src/70_cli/index.md +5 -0
- package/ai-docs/src/71_ai/10_language-model.ts +156 -0
- package/ai-docs/src/71_ai/20_tools.ts +226 -0
- package/ai-docs/src/71_ai/30_chat.ts +158 -0
- package/ai-docs/src/71_ai/fixtures/domain/LaunchPlan.ts +9 -0
- package/ai-docs/src/71_ai/index.md +5 -0
- package/ai-docs/src/80_cluster/10_entities.ts +97 -0
- package/ai-docs/src/80_cluster/index.md +4 -0
- package/ai-docs/src/index.md +10 -0
- package/ai-docs/tsconfig.json +24 -0
- package/dist/Brand.d.ts +3 -3
- package/dist/Brand.d.ts.map +1 -1
- package/dist/Brand.js +4 -3
- package/dist/Brand.js.map +1 -1
- package/dist/Cache.js +1 -1
- package/dist/Cache.js.map +1 -1
- package/dist/Channel.d.ts +1 -1
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js.map +1 -1
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +30 -8
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +2 -1
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Context.d.ts +2 -3
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js +1 -22
- package/dist/Context.js.map +1 -1
- package/dist/Cron.d.ts +31 -0
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +58 -2
- package/dist/Cron.js.map +1 -1
- package/dist/Crypto.d.ts.map +1 -1
- package/dist/Crypto.js +13 -5
- package/dist/Crypto.js.map +1 -1
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +12 -1
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +132 -14
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +38 -0
- package/dist/Effect.js.map +1 -1
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +10 -2
- package/dist/Equal.js.map +1 -1
- package/dist/ExecutionPlan.d.ts +73 -0
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +1 -1
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/FiberSet.js +1 -1
- package/dist/FileSystem.d.ts +2 -2
- package/dist/Function.d.ts +4 -3
- package/dist/Function.d.ts.map +1 -1
- package/dist/Function.js +5 -5
- package/dist/Function.js.map +1 -1
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +11 -10
- package/dist/Iterable.js.map +1 -1
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +7 -5
- package/dist/Layer.js.map +1 -1
- package/dist/Optic.d.ts +35 -21
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +33 -34
- package/dist/Optic.js.map +1 -1
- package/dist/Schedule.d.ts +8 -8
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +4 -4
- package/dist/Schedule.js.map +1 -1
- package/dist/Schema.d.ts +105 -57
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +105 -67
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +33 -3
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +87 -63
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaError.d.ts +8 -8
- package/dist/SchemaError.d.ts.map +1 -1
- package/dist/SchemaError.js +7 -6
- package/dist/SchemaError.js.map +1 -1
- package/dist/SchemaGetter.d.ts +8 -5
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +41 -37
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.d.ts +195 -38
- package/dist/SchemaIssue.d.ts.map +1 -1
- package/dist/SchemaIssue.js +243 -68
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.d.ts +30 -0
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +74 -62
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +2 -2
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +26 -26
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/ScopedCache.js +1 -1
- package/dist/ScopedCache.js.map +1 -1
- package/dist/Sink.d.ts +1 -1
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Stdio.d.ts +17 -4
- package/dist/Stdio.d.ts.map +1 -1
- package/dist/Stdio.js +6 -3
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +27 -4
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +27 -2
- package/dist/Stream.js.map +1 -1
- package/dist/SynchronizedRef.js +1 -1
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Terminal.js +1 -1
- package/dist/Terminal.js.map +1 -1
- package/dist/Tuple.d.ts +6 -4
- package/dist/Tuple.d.ts.map +1 -1
- package/dist/Tuple.js.map +1 -1
- package/dist/TxReentrantLock.d.ts +0 -56
- package/dist/TxReentrantLock.d.ts.map +1 -1
- package/dist/TxReentrantLock.js +8 -8
- package/dist/TxReentrantLock.js.map +1 -1
- package/dist/internal/dateTime.js +1 -1
- package/dist/internal/dateTime.js.map +1 -1
- package/dist/internal/executionPlan.js +51 -3
- package/dist/internal/executionPlan.js.map +1 -1
- package/dist/internal/hashMap.js +12 -8
- package/dist/internal/hashMap.js.map +1 -1
- package/dist/internal/matcher.js +1 -1
- package/dist/internal/matcher.js.map +1 -1
- package/dist/internal/schedule.js.map +1 -1
- package/dist/internal/schema/annotations.js +2 -0
- package/dist/internal/schema/annotations.js.map +1 -1
- package/dist/internal/schema/schema.js +1 -9
- package/dist/internal/schema/schema.js.map +1 -1
- package/dist/internal/schema/toArbitrary.js +1 -1
- package/dist/internal/schema/toArbitrary.js.map +1 -1
- package/dist/internal/trie.js +13 -3
- package/dist/internal/trie.js.map +1 -1
- package/dist/testing/TestClock.d.ts.map +1 -1
- package/dist/testing/TestClock.js +11 -1
- package/dist/testing/TestClock.js.map +1 -1
- package/dist/testing/TestSchema.d.ts +2 -2
- package/dist/testing/TestSchema.d.ts.map +1 -1
- package/dist/testing/TestSchema.js +8 -7
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/unstable/ai/AiError.js +19 -19
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/Chat.js +1 -1
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +4 -2
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +132 -132
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +8 -8
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.js +1 -1
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Prompt.d.ts +15 -3
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Prompt.js +10 -7
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/cli/CliError.d.ts +3 -3
- package/dist/unstable/cli/CliError.js +11 -11
- package/dist/unstable/cli/CliError.js.map +1 -1
- package/dist/unstable/cli/Command.d.ts +9 -9
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +8 -6
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Param.d.ts +7 -5
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +15 -11
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Primitive.d.ts.map +1 -1
- package/dist/unstable/cli/Primitive.js +31 -24
- package/dist/unstable/cli/Primitive.js.map +1 -1
- package/dist/unstable/cli/Prompt.d.ts.map +1 -1
- package/dist/unstable/cli/Prompt.js +31 -17
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/internal/ansi.js +2 -2
- package/dist/unstable/cli/internal/ansi.js.map +1 -1
- package/dist/unstable/cli/internal/command.d.ts +2 -2
- package/dist/unstable/cli/internal/command.d.ts.map +1 -1
- package/dist/unstable/cli/internal/command.js +10 -9
- package/dist/unstable/cli/internal/command.js.map +1 -1
- package/dist/unstable/cli/internal/completions/bash.js +69 -9
- package/dist/unstable/cli/internal/completions/bash.js.map +1 -1
- package/dist/unstable/cli/internal/completions/descriptor.js +24 -18
- package/dist/unstable/cli/internal/completions/descriptor.js.map +1 -1
- package/dist/unstable/cli/internal/completions/fish.js +5 -5
- package/dist/unstable/cli/internal/completions/fish.js.map +1 -1
- package/dist/unstable/cli/internal/help.d.ts.map +1 -1
- package/dist/unstable/cli/internal/help.js +4 -2
- package/dist/unstable/cli/internal/help.js.map +1 -1
- package/dist/unstable/cli/internal/parser.js +3 -3
- package/dist/unstable/cli/internal/parser.js.map +1 -1
- package/dist/unstable/cli/internal/wizard.js +2 -2
- package/dist/unstable/cli/internal/wizard.js.map +1 -1
- package/dist/unstable/cluster/ClusterError.js +7 -7
- package/dist/unstable/cluster/ClusterError.js.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.js +8 -1
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts +8 -0
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js +16 -4
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerServer.js +4 -2
- package/dist/unstable/cluster/RunnerServer.js.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.d.ts +1 -2
- package/dist/unstable/cluster/RunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.js +7 -6
- package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
- package/dist/unstable/cluster/Sharding.js +22 -4
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/internal/entityManager.js +1 -1
- package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
- package/dist/unstable/cluster/internal/resourceMap.js +2 -2
- package/dist/unstable/cluster/internal/resourceMap.js.map +1 -1
- package/dist/unstable/cluster/internal/resourceRef.js +17 -0
- package/dist/unstable/cluster/internal/resourceRef.js.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.js +7 -2
- package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
- package/dist/unstable/encoding/Ini.d.ts +20 -0
- package/dist/unstable/encoding/Ini.d.ts.map +1 -0
- package/dist/unstable/encoding/Ini.js +153 -0
- package/dist/unstable/encoding/Ini.js.map +1 -0
- package/dist/unstable/encoding/Msgpack.d.ts +2 -1
- package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
- package/dist/unstable/encoding/Msgpack.js +27 -13
- package/dist/unstable/encoding/Msgpack.js.map +1 -1
- package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
- package/dist/unstable/encoding/Ndjson.js +7 -1
- package/dist/unstable/encoding/Ndjson.js.map +1 -1
- package/dist/unstable/encoding/Sse.d.ts.map +1 -1
- package/dist/unstable/encoding/Sse.js +14 -23
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/encoding/Toml.d.ts +19 -0
- package/dist/unstable/encoding/Toml.d.ts.map +1 -0
- package/dist/unstable/encoding/Toml.js +434 -0
- package/dist/unstable/encoding/Toml.js.map +1 -0
- package/dist/unstable/encoding/Yaml.d.ts +19 -0
- package/dist/unstable/encoding/Yaml.d.ts.map +1 -0
- package/dist/unstable/encoding/Yaml.js +461 -0
- package/dist/unstable/encoding/Yaml.js.map +1 -0
- package/dist/unstable/encoding/index.d.ts +12 -0
- package/dist/unstable/encoding/index.d.ts.map +1 -1
- package/dist/unstable/encoding/index.js +12 -0
- package/dist/unstable/encoding/index.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventJournal.js +13 -5
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.js +1 -1
- package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.js +1 -4
- package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
- package/dist/unstable/http/FindMyWay/internal/queryString.d.ts +11 -0
- package/dist/unstable/http/FindMyWay/internal/queryString.d.ts.map +1 -0
- package/dist/unstable/http/FindMyWay/internal/queryString.js +259 -0
- package/dist/unstable/http/FindMyWay/internal/queryString.js.map +1 -0
- package/dist/unstable/http/FindMyWay/internal/router.d.ts +2 -0
- package/dist/unstable/http/FindMyWay/internal/router.d.ts.map +1 -0
- package/dist/unstable/http/FindMyWay/internal/router.js +665 -0
- package/dist/unstable/http/FindMyWay/internal/router.js.map +1 -0
- package/dist/unstable/http/FindMyWay.d.ts +33 -8
- package/dist/unstable/http/FindMyWay.d.ts.map +1 -1
- package/dist/unstable/http/FindMyWay.js +4 -7
- package/dist/unstable/http/FindMyWay.js.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts +59 -3
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js +33 -19
- package/dist/unstable/http/HttpClient.js.map +1 -1
- package/dist/unstable/http/HttpClientError.js +1 -1
- package/dist/unstable/http/HttpClientError.js.map +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +2 -14
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpClientResponse.js +1 -16
- package/dist/unstable/http/HttpClientResponse.js.map +1 -1
- package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
- package/dist/unstable/http/HttpPlatform.js +21 -3
- package/dist/unstable/http/HttpPlatform.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRequest.js +7 -6
- package/dist/unstable/http/HttpServerRequest.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +8 -6
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/Multipart.d.ts +1 -1
- package/dist/unstable/http/Multipart.d.ts.map +1 -1
- package/dist/unstable/http/Multipart.js +9 -2
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/http/MultipartParser/HeadersParser.d.ts +53 -0
- package/dist/unstable/http/MultipartParser/HeadersParser.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/HeadersParser.js +14 -0
- package/dist/unstable/http/MultipartParser/HeadersParser.js.map +1 -0
- package/dist/unstable/http/MultipartParser/Search.d.ts +11 -0
- package/dist/unstable/http/MultipartParser/Search.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/Search.js +14 -0
- package/dist/unstable/http/MultipartParser/Search.js.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/contentType.d.ts +5 -0
- package/dist/unstable/http/MultipartParser/internal/contentType.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/contentType.js +82 -0
- package/dist/unstable/http/MultipartParser/internal/contentType.js.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/headers.d.ts +3 -0
- package/dist/unstable/http/MultipartParser/internal/headers.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/headers.js +194 -0
- package/dist/unstable/http/MultipartParser/internal/headers.js.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/multipart.d.ts +8 -0
- package/dist/unstable/http/MultipartParser/internal/multipart.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/multipart.js +226 -0
- package/dist/unstable/http/MultipartParser/internal/multipart.js.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/search.d.ts +5 -0
- package/dist/unstable/http/MultipartParser/internal/search.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/search.js +120 -0
- package/dist/unstable/http/MultipartParser/internal/search.js.map +1 -0
- package/dist/unstable/http/MultipartParser.d.ts +98 -0
- package/dist/unstable/http/MultipartParser.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser.js +23 -0
- package/dist/unstable/http/MultipartParser.js.map +1 -0
- package/dist/unstable/http/Template.d.ts.map +1 -1
- package/dist/unstable/http/Template.js +2 -2
- package/dist/unstable/http/Template.js.map +1 -1
- package/dist/unstable/http/index.d.ts +1 -1
- package/dist/unstable/http/index.d.ts.map +1 -1
- package/dist/unstable/http/index.js +1 -1
- package/dist/unstable/http/index.js.map +1 -1
- package/dist/unstable/http/internal/httpBody.d.ts +2 -0
- package/dist/unstable/http/internal/httpBody.d.ts.map +1 -0
- package/dist/unstable/http/internal/httpBody.js +10 -0
- package/dist/unstable/http/internal/httpBody.js.map +1 -0
- package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js +5 -5
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +73 -20
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js +74 -34
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +6 -4
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.js +73 -16
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +5 -5
- package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.js +17 -17
- package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +219 -0
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js +170 -0
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts +8 -0
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +45 -18
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/observability/OtlpExporter.d.ts +1 -1
- package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.js +2 -1
- package/dist/unstable/observability/OtlpExporter.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpLogger.js +2 -2
- package/dist/unstable/observability/OtlpLogger.js.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.d.ts +2 -2
- package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.js +28 -15
- package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
- package/dist/unstable/observability/OtlpTracer.js +1 -1
- package/dist/unstable/observability/OtlpTracer.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js +9 -9
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistence.js +17 -7
- package/dist/unstable/persistence/Persistence.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +22 -12
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +15 -42
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/persistence/Redis.js +1 -1
- package/dist/unstable/persistence/Redis.js.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.js +4 -4
- package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +26 -11
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +9 -22
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts +14 -0
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +21 -10
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcClientError.js +2 -2
- package/dist/unstable/rpc/RpcClientError.js.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +3 -1
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js +3 -2
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/schema/Model.d.ts +1 -1
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +5 -5
- package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
- package/dist/unstable/schema/VariantSchema.js +17 -9
- package/dist/unstable/schema/VariantSchema.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +28 -12
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlClient.js +7 -3
- package/dist/unstable/sql/SqlClient.js.map +1 -1
- package/dist/unstable/sql/SqlError.js +13 -13
- package/dist/unstable/sql/SqlError.js.map +1 -1
- package/dist/unstable/sql/SqlResolver.js +8 -6
- package/dist/unstable/sql/SqlResolver.js.map +1 -1
- package/dist/unstable/sql/Statement.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.js +8 -6
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/workers/WorkerError.js +5 -5
- package/dist/unstable/workers/WorkerError.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +2 -2
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +3 -3
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/package.json +6 -9
- package/src/Brand.ts +4 -4
- package/src/Cache.ts +1 -1
- package/src/Channel.ts +1 -1
- package/src/Config.ts +31 -8
- package/src/ConfigProvider.ts +4 -1
- package/src/Context.ts +6 -28
- package/src/Cron.ts +65 -2
- package/src/Crypto.ts +17 -8
- package/src/Duration.ts +16 -2
- package/src/Effect.ts +141 -17
- package/src/Equal.ts +10 -2
- package/src/ExecutionPlan.ts +78 -1
- package/src/FiberSet.ts +1 -1
- package/src/FileSystem.ts +2 -2
- package/src/Function.ts +6 -6
- package/src/Iterable.ts +11 -10
- package/src/Layer.ts +7 -5
- package/src/Optic.ts +59 -58
- package/src/Schedule.ts +13 -13
- package/src/Schema.ts +195 -112
- package/src/SchemaAST.ts +154 -85
- package/src/SchemaError.ts +9 -9
- package/src/SchemaGetter.ts +89 -30
- package/src/SchemaIssue.ts +285 -80
- package/src/SchemaParser.ts +126 -86
- package/src/SchemaTransformation.ts +66 -18
- package/src/ScopedCache.ts +1 -1
- package/src/Sink.ts +1 -1
- package/src/Stdio.ts +23 -4
- package/src/Stream.ts +77 -10
- package/src/SynchronizedRef.ts +1 -1
- package/src/Terminal.ts +1 -1
- package/src/Tuple.ts +7 -4
- package/src/TxReentrantLock.ts +39 -35
- package/src/internal/dateTime.ts +1 -1
- package/src/internal/executionPlan.ts +105 -10
- package/src/internal/hashMap.ts +20 -14
- package/src/internal/matcher.ts +2 -2
- package/src/internal/schedule.ts +4 -4
- package/src/internal/schema/annotations.ts +3 -0
- package/src/internal/schema/schema.ts +1 -17
- package/src/internal/schema/toArbitrary.ts +3 -1
- package/src/internal/trie.ts +12 -2
- package/src/testing/TestClock.ts +13 -1
- package/src/testing/TestSchema.ts +9 -9
- package/src/unstable/ai/AiError.ts +19 -19
- package/src/unstable/ai/Chat.ts +1 -1
- package/src/unstable/ai/LanguageModel.ts +4 -2
- package/src/unstable/ai/McpSchema.ts +17 -16
- package/src/unstable/ai/McpServer.ts +1 -1
- package/src/unstable/ai/Prompt.ts +35 -10
- package/src/unstable/cli/CliError.ts +12 -12
- package/src/unstable/cli/Command.ts +12 -10
- package/src/unstable/cli/Param.ts +41 -19
- package/src/unstable/cli/Primitive.ts +11 -5
- package/src/unstable/cli/Prompt.ts +36 -20
- package/src/unstable/cli/internal/ansi.ts +2 -2
- package/src/unstable/cli/internal/command.ts +15 -10
- package/src/unstable/cli/internal/completions/bash.ts +59 -9
- package/src/unstable/cli/internal/completions/descriptor.ts +14 -20
- package/src/unstable/cli/internal/completions/fish.ts +5 -7
- package/src/unstable/cli/internal/help.ts +4 -2
- package/src/unstable/cli/internal/parser.ts +3 -3
- package/src/unstable/cli/internal/wizard.ts +2 -2
- package/src/unstable/cluster/ClusterError.ts +7 -7
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +4 -1
- package/src/unstable/cluster/MessageStorage.ts +9 -5
- package/src/unstable/cluster/Reply.ts +25 -4
- package/src/unstable/cluster/RunnerServer.ts +4 -10
- package/src/unstable/cluster/RunnerStorage.ts +9 -7
- package/src/unstable/cluster/Sharding.ts +35 -7
- package/src/unstable/cluster/internal/entityManager.ts +1 -1
- package/src/unstable/cluster/internal/resourceMap.ts +5 -2
- package/src/unstable/cluster/internal/resourceRef.ts +27 -5
- package/src/unstable/devtools/DevToolsClient.ts +3 -2
- package/src/unstable/encoding/Ini.ts +174 -0
- package/src/unstable/encoding/Msgpack.ts +59 -36
- package/src/unstable/encoding/Ndjson.ts +9 -1
- package/src/unstable/encoding/Sse.ts +11 -21
- package/src/unstable/encoding/Toml.ts +504 -0
- package/src/unstable/encoding/Yaml.ts +541 -0
- package/src/unstable/encoding/index.ts +15 -0
- package/src/unstable/eventlog/EventJournal.ts +14 -6
- package/src/unstable/eventlog/EventLogMessage.ts +1 -1
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +1 -1
- package/src/unstable/eventlog/SqlEventJournal.ts +6 -4
- package/src/unstable/http/FindMyWay/internal/queryString.ts +420 -0
- package/src/unstable/http/FindMyWay/internal/router.ts +950 -0
- package/src/unstable/http/FindMyWay.ts +65 -6
- package/src/unstable/http/HttpClient.ts +132 -23
- package/src/unstable/http/HttpClientError.ts +1 -1
- package/src/unstable/http/HttpClientRequest.ts +2 -14
- package/src/unstable/http/HttpClientResponse.ts +1 -17
- package/src/unstable/http/HttpPlatform.ts +34 -6
- package/src/unstable/http/HttpServerRequest.ts +14 -6
- package/src/unstable/http/HttpServerResponse.ts +9 -7
- package/src/unstable/http/Multipart.ts +9 -2
- package/src/unstable/http/MultipartParser/HeadersParser.ts +68 -0
- package/src/unstable/http/MultipartParser/Search.ts +17 -0
- package/src/unstable/http/MultipartParser/internal/contentType.ts +103 -0
- package/src/unstable/http/MultipartParser/internal/headers.ts +615 -0
- package/src/unstable/http/MultipartParser/internal/multipart.ts +262 -0
- package/src/unstable/http/MultipartParser/internal/search.ts +167 -0
- package/src/unstable/http/MultipartParser.ts +115 -0
- package/src/unstable/http/Template.ts +6 -5
- package/src/unstable/http/index.ts +1 -1
- package/src/unstable/http/internal/httpBody.ts +15 -0
- package/src/unstable/httpapi/HttpApi.ts +6 -7
- package/src/unstable/httpapi/HttpApiBuilder.ts +142 -25
- package/src/unstable/httpapi/HttpApiClient.ts +130 -49
- package/src/unstable/httpapi/HttpApiEndpoint.ts +117 -29
- package/src/unstable/httpapi/HttpApiError.ts +33 -39
- package/src/unstable/httpapi/HttpApiMiddleware.ts +1 -1
- package/src/unstable/httpapi/HttpApiSchema.ts +353 -0
- package/src/unstable/httpapi/OpenApi.ts +70 -20
- package/src/unstable/observability/OtlpExporter.ts +4 -2
- package/src/unstable/observability/OtlpLogger.ts +3 -1
- package/src/unstable/observability/OtlpMetrics.ts +32 -18
- package/src/unstable/observability/OtlpTracer.ts +1 -1
- package/src/unstable/persistence/PersistedQueue.ts +12 -9
- package/src/unstable/persistence/Persistence.ts +27 -7
- package/src/unstable/persistence/RateLimiter.ts +54 -31
- package/src/unstable/persistence/Redis.ts +1 -1
- package/src/unstable/reactivity/AsyncResult.ts +11 -6
- package/src/unstable/reactivity/Atom.ts +44 -25
- package/src/unstable/rpc/RpcClient.ts +42 -13
- package/src/unstable/rpc/RpcClientError.ts +2 -2
- package/src/unstable/rpc/RpcSerialization.ts +1 -1
- package/src/unstable/rpc/RpcServer.ts +4 -2
- package/src/unstable/schema/VariantSchema.ts +36 -18
- package/src/unstable/socket/Socket.ts +24 -14
- package/src/unstable/sql/SqlClient.ts +65 -56
- package/src/unstable/sql/SqlError.ts +13 -13
- package/src/unstable/sql/SqlResolver.ts +8 -6
- package/src/unstable/sql/Statement.ts +13 -8
- package/src/unstable/workers/WorkerError.ts +5 -5
- package/src/unstable/workflow/Workflow.ts +2 -5
- package/src/unstable/workflow/WorkflowEngine.ts +8 -3
- package/dist/unstable/http/Multipasta/HeadersParser.d.ts +0 -14
- package/dist/unstable/http/Multipasta/HeadersParser.d.ts.map +0 -1
- package/dist/unstable/http/Multipasta/HeadersParser.js +0 -14
- package/dist/unstable/http/Multipasta/HeadersParser.js.map +0 -1
- package/dist/unstable/http/Multipasta/Node.d.ts +0 -14
- package/dist/unstable/http/Multipasta/Node.d.ts.map +0 -1
- package/dist/unstable/http/Multipasta/Node.js +0 -14
- package/dist/unstable/http/Multipasta/Node.js.map +0 -1
- package/dist/unstable/http/Multipasta/Search.d.ts +0 -14
- package/dist/unstable/http/Multipasta/Search.d.ts.map +0 -1
- package/dist/unstable/http/Multipasta/Search.js +0 -14
- package/dist/unstable/http/Multipasta/Search.js.map +0 -1
- package/dist/unstable/http/Multipasta/Web.d.ts +0 -14
- package/dist/unstable/http/Multipasta/Web.d.ts.map +0 -1
- package/dist/unstable/http/Multipasta/Web.js +0 -14
- package/dist/unstable/http/Multipasta/Web.js.map +0 -1
- package/dist/unstable/http/Multipasta.d.ts +0 -15
- package/dist/unstable/http/Multipasta.d.ts.map +0 -1
- package/dist/unstable/http/Multipasta.js +0 -15
- package/dist/unstable/http/Multipasta.js.map +0 -1
- package/src/unstable/http/Multipasta/HeadersParser.ts +0 -14
- package/src/unstable/http/Multipasta/Node.ts +0 -14
- package/src/unstable/http/Multipasta/Search.ts +0 -14
- package/src/unstable/http/Multipasta/Web.ts +0 -14
- package/src/unstable/http/Multipasta.ts +0 -15
package/dist/SchemaIssue.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as Arr from "./Array.js";
|
|
2
|
-
import { formatPath } from "./Formatter.js";
|
|
2
|
+
import { format, formatPath } from "./Formatter.js";
|
|
3
3
|
import * as InternalAnnotations from "./internal/schema/annotations.js";
|
|
4
|
+
import * as InternalParser from "./internal/schema/parser.js";
|
|
4
5
|
import { hasProperty } from "./Predicate.js";
|
|
5
6
|
const TypeId = "~effect/SchemaIssue/Issue";
|
|
6
7
|
/**
|
|
@@ -34,10 +35,44 @@ const TypeId = "~effect/SchemaIssue/Issue";
|
|
|
34
35
|
export function isIssue(u) {
|
|
35
36
|
return hasProperty(u, TypeId) && u[TypeId] === TypeId;
|
|
36
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Returns `true` when an issue contains an input reported by the schema parser.
|
|
40
|
+
*
|
|
41
|
+
* **When to use**
|
|
42
|
+
*
|
|
43
|
+
* Use when reading `Issue.input`, especially when `undefined` is a valid input
|
|
44
|
+
* value.
|
|
45
|
+
*
|
|
46
|
+
* **Details**
|
|
47
|
+
*
|
|
48
|
+
* Reported input is stored as an own property. This guard checks for that
|
|
49
|
+
* property and narrows `input` from optional to required.
|
|
50
|
+
*
|
|
51
|
+
* **Example** (Reading a reported input)
|
|
52
|
+
*
|
|
53
|
+
* ```ts import.meta.vitest
|
|
54
|
+
* import { Result, Schema, SchemaIssue } from "effect"
|
|
55
|
+
*
|
|
56
|
+
* const result = Schema.decodeUnknownResult(Schema.String)(1, { reportInput: true })
|
|
57
|
+
* if (Result.isFailure(result) && SchemaIssue.hasInput(result.failure.issue)) {
|
|
58
|
+
* result.failure.issue.input // => 1
|
|
59
|
+
* }
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* @see {@link Issue} for the complete issue model
|
|
63
|
+
*
|
|
64
|
+
* @category guards
|
|
65
|
+
* @since 4.0.0
|
|
66
|
+
*/
|
|
67
|
+
export function hasInput(issue) {
|
|
68
|
+
return Object.hasOwn(issue, "input");
|
|
69
|
+
}
|
|
37
70
|
class Base {
|
|
38
71
|
[TypeId] = TypeId;
|
|
39
|
-
|
|
40
|
-
|
|
72
|
+
constructor(input, options) {
|
|
73
|
+
if (options?.reportInput === true && input !== InternalParser.missing) {
|
|
74
|
+
this.input = input;
|
|
75
|
+
}
|
|
41
76
|
}
|
|
42
77
|
}
|
|
43
78
|
/**
|
|
@@ -58,11 +93,13 @@ class Base {
|
|
|
58
93
|
* ```ts import.meta.vitest
|
|
59
94
|
* import { SchemaAST, SchemaIssue } from "effect"
|
|
60
95
|
*
|
|
96
|
+
* const formatIssue = SchemaIssue.makeFormatterDefault()
|
|
97
|
+
*
|
|
61
98
|
* function describe(issue: SchemaIssue.Issue): string {
|
|
62
99
|
* if (issue._tag === "Filter") {
|
|
63
|
-
* return `Filter failed: ${
|
|
100
|
+
* return `Filter failed: ${formatIssue(issue.issue)}`
|
|
64
101
|
* }
|
|
65
|
-
* return
|
|
102
|
+
* return formatIssue(issue)
|
|
66
103
|
* }
|
|
67
104
|
*
|
|
68
105
|
* const issue = new SchemaIssue.Filter(
|
|
@@ -96,8 +133,17 @@ export class Filter extends Base {
|
|
|
96
133
|
/**
|
|
97
134
|
* The issue that occurred.
|
|
98
135
|
*/
|
|
99
|
-
issue
|
|
100
|
-
|
|
136
|
+
issue,
|
|
137
|
+
/**
|
|
138
|
+
* The present input associated with the issue. It is retained only when
|
|
139
|
+
* `options.reportInput` is `true`.
|
|
140
|
+
*/
|
|
141
|
+
input,
|
|
142
|
+
/**
|
|
143
|
+
* The effective parse options controlling input retention.
|
|
144
|
+
*/
|
|
145
|
+
options) {
|
|
146
|
+
super(input, options);
|
|
101
147
|
this.filter = filter;
|
|
102
148
|
this.issue = issue;
|
|
103
149
|
}
|
|
@@ -139,8 +185,17 @@ export class Encoding extends Base {
|
|
|
139
185
|
/**
|
|
140
186
|
* The issue that occurred.
|
|
141
187
|
*/
|
|
142
|
-
issue
|
|
143
|
-
|
|
188
|
+
issue,
|
|
189
|
+
/**
|
|
190
|
+
* The present input associated with the issue. It is retained only when
|
|
191
|
+
* `options.reportInput` is `true`.
|
|
192
|
+
*/
|
|
193
|
+
input,
|
|
194
|
+
/**
|
|
195
|
+
* The effective parse options controlling input retention.
|
|
196
|
+
*/
|
|
197
|
+
options) {
|
|
198
|
+
super(input, options);
|
|
144
199
|
this.ast = ast;
|
|
145
200
|
this.issue = issue;
|
|
146
201
|
}
|
|
@@ -234,7 +289,8 @@ export class MissingKey extends Base {
|
|
|
234
289
|
*
|
|
235
290
|
* - `ast` is the schema that was being validated against.
|
|
236
291
|
* - `annotations` on `ast` may contain a custom `messageUnexpectedKey`.
|
|
237
|
-
* - The default formatter renders this as `"Expected no excess property"
|
|
292
|
+
* - The default formatter renders this as `"Expected no excess property"`, or
|
|
293
|
+
* `"Unexpected key with value <input>"` when the issue reports an input.
|
|
238
294
|
*
|
|
239
295
|
* @see {@link MissingKey} — the opposite case (required key absent)
|
|
240
296
|
* @see {@link Pointer} — wraps this issue with the unexpected key's path
|
|
@@ -252,8 +308,17 @@ export class UnexpectedKey extends Base {
|
|
|
252
308
|
/**
|
|
253
309
|
* The schema that caused the issue.
|
|
254
310
|
*/
|
|
255
|
-
ast
|
|
256
|
-
|
|
311
|
+
ast,
|
|
312
|
+
/**
|
|
313
|
+
* The present input associated with the issue. It is retained only when
|
|
314
|
+
* `options.reportInput` is `true`.
|
|
315
|
+
*/
|
|
316
|
+
input,
|
|
317
|
+
/**
|
|
318
|
+
* The effective parse options controlling input retention.
|
|
319
|
+
*/
|
|
320
|
+
options) {
|
|
321
|
+
super(input, options);
|
|
257
322
|
this.ast = ast;
|
|
258
323
|
}
|
|
259
324
|
}
|
|
@@ -294,8 +359,17 @@ export class Composite extends Base {
|
|
|
294
359
|
/**
|
|
295
360
|
* The issues that occurred.
|
|
296
361
|
*/
|
|
297
|
-
issues
|
|
298
|
-
|
|
362
|
+
issues,
|
|
363
|
+
/**
|
|
364
|
+
* The present input associated with the issue. It is retained only when
|
|
365
|
+
* `options.reportInput` is `true`.
|
|
366
|
+
*/
|
|
367
|
+
input,
|
|
368
|
+
/**
|
|
369
|
+
* The effective parse options controlling input retention.
|
|
370
|
+
*/
|
|
371
|
+
options) {
|
|
372
|
+
super(input, options);
|
|
299
373
|
this.ast = ast;
|
|
300
374
|
this.issues = issues;
|
|
301
375
|
}
|
|
@@ -312,15 +386,17 @@ export class Composite extends Base {
|
|
|
312
386
|
* **Details**
|
|
313
387
|
*
|
|
314
388
|
* - `ast` is the schema node that expected a different type.
|
|
315
|
-
* - The default formatter renders this as `"Expected <type>"
|
|
389
|
+
* - The default formatter renders this as `"Expected <type>"`, adding
|
|
390
|
+
* `", got <input>"` when the issue reports an input.
|
|
316
391
|
*
|
|
317
392
|
* **Example** (Formatting a type mismatch)
|
|
318
393
|
*
|
|
319
394
|
* ```ts import.meta.vitest
|
|
320
395
|
* import { Schema, SchemaIssue } from "effect"
|
|
321
396
|
*
|
|
397
|
+
* const formatIssue = SchemaIssue.makeFormatterDefault()
|
|
322
398
|
* const issue = new SchemaIssue.InvalidType(Schema.String.ast)
|
|
323
|
-
*
|
|
399
|
+
* formatIssue(issue) // => "Expected string"
|
|
324
400
|
* ```
|
|
325
401
|
*
|
|
326
402
|
* @see {@link InvalidValue} — the input has the right type but fails a value constraint
|
|
@@ -338,8 +414,17 @@ export class InvalidType extends Base {
|
|
|
338
414
|
/**
|
|
339
415
|
* The schema that caused the issue.
|
|
340
416
|
*/
|
|
341
|
-
ast
|
|
342
|
-
|
|
417
|
+
ast,
|
|
418
|
+
/**
|
|
419
|
+
* The present input associated with the issue. It is retained only when
|
|
420
|
+
* `options.reportInput` is `true`.
|
|
421
|
+
*/
|
|
422
|
+
input,
|
|
423
|
+
/**
|
|
424
|
+
* The effective parse options controlling input retention.
|
|
425
|
+
*/
|
|
426
|
+
options) {
|
|
427
|
+
super(input, options);
|
|
343
428
|
this.ast = ast;
|
|
344
429
|
}
|
|
345
430
|
}
|
|
@@ -354,17 +439,22 @@ export class InvalidType extends Base {
|
|
|
354
439
|
*
|
|
355
440
|
* **Details**
|
|
356
441
|
*
|
|
357
|
-
* - `
|
|
358
|
-
*
|
|
359
|
-
*
|
|
442
|
+
* - A `message` annotation is returned unchanged and takes precedence over all
|
|
443
|
+
* other default formatting.
|
|
444
|
+
* - Without `message`, an `expected` annotation is formatted as
|
|
445
|
+
* `"Expected <expected>"`, adding `", got <input>"` when input is reported.
|
|
446
|
+
* - Without either annotation, the default formatter renders
|
|
447
|
+
* `"Expected a valid value"`, or `"Invalid data <input>"` when input is
|
|
448
|
+
* reported.
|
|
360
449
|
*
|
|
361
450
|
* **Example** (Returning InvalidValue from a custom filter)
|
|
362
451
|
*
|
|
363
452
|
* ```ts import.meta.vitest
|
|
364
453
|
* import { SchemaIssue } from "effect"
|
|
365
454
|
*
|
|
455
|
+
* const formatIssue = SchemaIssue.makeFormatterDefault()
|
|
366
456
|
* const issue = new SchemaIssue.InvalidValue({ message: "must not be empty" })
|
|
367
|
-
*
|
|
457
|
+
* formatIssue(issue) // => "must not be empty"
|
|
368
458
|
* ```
|
|
369
459
|
*
|
|
370
460
|
* @see {@link InvalidType} — the input has the wrong type entirely
|
|
@@ -379,11 +469,28 @@ export class InvalidValue extends Base {
|
|
|
379
469
|
* The metadata for the issue.
|
|
380
470
|
*/
|
|
381
471
|
annotations;
|
|
382
|
-
constructor(
|
|
383
|
-
|
|
472
|
+
constructor(
|
|
473
|
+
/**
|
|
474
|
+
* The metadata for the issue.
|
|
475
|
+
*/
|
|
476
|
+
annotations,
|
|
477
|
+
/**
|
|
478
|
+
* The present input associated with the issue. It is retained only when
|
|
479
|
+
* `options.reportInput` is `true`.
|
|
480
|
+
*/
|
|
481
|
+
input,
|
|
482
|
+
/**
|
|
483
|
+
* The effective parse options controlling input retention.
|
|
484
|
+
*/
|
|
485
|
+
options) {
|
|
486
|
+
super(input, options);
|
|
384
487
|
this.annotations = annotations;
|
|
385
488
|
}
|
|
386
489
|
}
|
|
490
|
+
/** @internal */
|
|
491
|
+
export function makeCompositeAtKey(compositeAst, pointerKey, pointerIssue, compositeInput, parseOptions) {
|
|
492
|
+
return new Composite(compositeAst, [new Pointer([pointerKey], pointerIssue)], compositeInput, parseOptions);
|
|
493
|
+
}
|
|
387
494
|
/**
|
|
388
495
|
* Represents a schema issue produced when a forbidden operation is encountered during parsing,
|
|
389
496
|
* such as an asynchronous Effect running inside `Schema.decodeUnknownSync`.
|
|
@@ -403,10 +510,11 @@ export class InvalidValue extends Base {
|
|
|
403
510
|
* ```ts import.meta.vitest
|
|
404
511
|
* import { SchemaIssue } from "effect"
|
|
405
512
|
*
|
|
513
|
+
* const formatIssue = SchemaIssue.makeFormatterDefault()
|
|
406
514
|
* const issue = new SchemaIssue.Forbidden(
|
|
407
515
|
* { message: "async operation not allowed in sync context" }
|
|
408
516
|
* )
|
|
409
|
-
*
|
|
517
|
+
* formatIssue(issue) // => "async operation not allowed in sync context"
|
|
410
518
|
* ```
|
|
411
519
|
*
|
|
412
520
|
* @see {@link InvalidValue} — for value-constraint failures (not operation failures)
|
|
@@ -424,8 +532,17 @@ export class Forbidden extends Base {
|
|
|
424
532
|
/**
|
|
425
533
|
* The metadata for the issue.
|
|
426
534
|
*/
|
|
427
|
-
annotations
|
|
428
|
-
|
|
535
|
+
annotations,
|
|
536
|
+
/**
|
|
537
|
+
* The present input associated with the issue. It is retained only when
|
|
538
|
+
* `options.reportInput` is `true`.
|
|
539
|
+
*/
|
|
540
|
+
input,
|
|
541
|
+
/**
|
|
542
|
+
* The effective parse options controlling input retention.
|
|
543
|
+
*/
|
|
544
|
+
options) {
|
|
545
|
+
super(input, options);
|
|
429
546
|
this.annotations = annotations;
|
|
430
547
|
}
|
|
431
548
|
}
|
|
@@ -445,7 +562,8 @@ export class Forbidden extends Base {
|
|
|
445
562
|
* **Gotchas**
|
|
446
563
|
*
|
|
447
564
|
* `issues` is empty when no union member was applicable. In that case, the
|
|
448
|
-
* default formatter reports the expected type for the union
|
|
565
|
+
* default formatter reports the expected type for the union and appends
|
|
566
|
+
* `", got <input>"` when input is reported.
|
|
449
567
|
*
|
|
450
568
|
* @see {@link OneOf} — the opposite: *too many* members matched
|
|
451
569
|
* @see {@link Composite} — groups multiple issues under a non-union schema
|
|
@@ -471,8 +589,17 @@ export class AnyOf extends Base {
|
|
|
471
589
|
/**
|
|
472
590
|
* The issues that occurred.
|
|
473
591
|
*/
|
|
474
|
-
issues
|
|
475
|
-
|
|
592
|
+
issues,
|
|
593
|
+
/**
|
|
594
|
+
* The present input associated with the issue. It is retained only when
|
|
595
|
+
* `options.reportInput` is `true`.
|
|
596
|
+
*/
|
|
597
|
+
input,
|
|
598
|
+
/**
|
|
599
|
+
* The effective parse options controlling input retention.
|
|
600
|
+
*/
|
|
601
|
+
options) {
|
|
602
|
+
super(input, options);
|
|
476
603
|
this.ast = ast;
|
|
477
604
|
this.issues = issues;
|
|
478
605
|
}
|
|
@@ -491,7 +618,9 @@ export class AnyOf extends Base {
|
|
|
491
618
|
* - `ast` is the `Union` AST node.
|
|
492
619
|
* - `successes` lists the AST nodes of each member that accepted the input.
|
|
493
620
|
* - The default formatter renders this as
|
|
494
|
-
* `"Expected exactly one member to match"
|
|
621
|
+
* `"Expected exactly one member to match"`, or
|
|
622
|
+
* `"Expected exactly one member to match the input <input>"` when input is
|
|
623
|
+
* reported.
|
|
495
624
|
*
|
|
496
625
|
* @see {@link AnyOf} — the opposite: *no* members matched
|
|
497
626
|
*
|
|
@@ -516,45 +645,54 @@ export class OneOf extends Base {
|
|
|
516
645
|
/**
|
|
517
646
|
* The schemas that were successful.
|
|
518
647
|
*/
|
|
519
|
-
successes
|
|
520
|
-
|
|
648
|
+
successes,
|
|
649
|
+
/**
|
|
650
|
+
* The present input associated with the issue. It is retained only when
|
|
651
|
+
* `options.reportInput` is `true`.
|
|
652
|
+
*/
|
|
653
|
+
input,
|
|
654
|
+
/**
|
|
655
|
+
* The effective parse options controlling input retention.
|
|
656
|
+
*/
|
|
657
|
+
options) {
|
|
658
|
+
super(input, options);
|
|
521
659
|
this.ast = ast;
|
|
522
660
|
this.successes = successes;
|
|
523
661
|
}
|
|
524
662
|
}
|
|
525
|
-
function makeFilterIssue(entry) {
|
|
663
|
+
function makeFilterIssue(entry, input, options) {
|
|
526
664
|
if (isIssue(entry)) {
|
|
527
665
|
return entry;
|
|
528
666
|
}
|
|
529
667
|
if (typeof entry === "string") {
|
|
530
668
|
return new InvalidValue({
|
|
531
669
|
message: entry
|
|
532
|
-
});
|
|
670
|
+
}, input, options);
|
|
533
671
|
}
|
|
534
672
|
const inner = typeof entry.issue === "string" ? new InvalidValue({
|
|
535
673
|
message: entry.issue
|
|
536
|
-
}) : entry.issue;
|
|
674
|
+
}, input, options) : entry.issue;
|
|
537
675
|
return new Pointer(entry.path, inner);
|
|
538
676
|
}
|
|
539
677
|
/** @internal */
|
|
540
|
-
export function makeSingle(out) {
|
|
678
|
+
export function makeSingle(out, input, options) {
|
|
541
679
|
if (out === undefined) {
|
|
542
680
|
return undefined;
|
|
543
681
|
}
|
|
544
682
|
if (typeof out === "boolean") {
|
|
545
|
-
return out ? undefined : new InvalidValue();
|
|
683
|
+
return out ? undefined : new InvalidValue(undefined, input, options);
|
|
546
684
|
}
|
|
547
|
-
return makeFilterIssue(out);
|
|
685
|
+
return makeFilterIssue(out, input, options);
|
|
548
686
|
}
|
|
549
687
|
/** @internal */
|
|
550
|
-
export function normalizeFilterOutput(ast, out) {
|
|
688
|
+
export function normalizeFilterOutput(ast, out, input, options) {
|
|
551
689
|
if (Array.isArray(out)) {
|
|
552
690
|
if (!Arr.isReadonlyArrayNonEmpty(out)) {
|
|
553
691
|
return undefined;
|
|
554
692
|
}
|
|
555
|
-
return out.length === 1 ? makeFilterIssue(out[0]) : new Composite(ast, Arr.map(out, makeFilterIssue));
|
|
693
|
+
return out.length === 1 ? makeFilterIssue(out[0], input, options) : new Composite(ast, Arr.map(out, entry => makeFilterIssue(entry, input, options)), input, options);
|
|
556
694
|
}
|
|
557
|
-
return makeSingle(out);
|
|
695
|
+
return makeSingle(out, input, options);
|
|
558
696
|
}
|
|
559
697
|
/**
|
|
560
698
|
* Returns the built-in {@link LeafHook} used by default formatters.
|
|
@@ -566,13 +704,18 @@ export function normalizeFilterOutput(ast, out) {
|
|
|
566
704
|
* **Details**
|
|
567
705
|
*
|
|
568
706
|
* - Checks for a `message` annotation first; returns it if present.
|
|
569
|
-
* -
|
|
570
|
-
*
|
|
571
|
-
*
|
|
707
|
+
* - For `InvalidValue`, an `expected` annotation uses the standard expected
|
|
708
|
+
* value message and includes reported input when available.
|
|
709
|
+
* - Otherwise generates a default message per `_tag`. When the issue reports
|
|
710
|
+
* input, the message includes its formatted value where applicable:
|
|
711
|
+
* - `InvalidType` → `"Expected <type>"` or `"Expected <type>, got <input>"`
|
|
712
|
+
* - `InvalidValue` → `"Expected a valid value"` or `"Invalid data <input>"`
|
|
572
713
|
* - `MissingKey` → `"Missing key"`
|
|
573
|
-
* - `UnexpectedKey` → `"Expected no excess property"`
|
|
714
|
+
* - `UnexpectedKey` → `"Expected no excess property"` or
|
|
715
|
+
* `"Unexpected key with value <input>"`
|
|
574
716
|
* - `Forbidden` → `"Forbidden operation"`
|
|
575
|
-
* - `OneOf` → `"Expected exactly one member to match"`
|
|
717
|
+
* - `OneOf` → `"Expected exactly one member to match"` or
|
|
718
|
+
* `"Expected exactly one member to match the input <input>"`
|
|
576
719
|
*
|
|
577
720
|
* **Example** (Formatting Standard Schema issues with defaultLeafHook)
|
|
578
721
|
*
|
|
@@ -596,17 +739,28 @@ export const defaultLeafHook = issue => {
|
|
|
596
739
|
if (message !== undefined) return message;
|
|
597
740
|
switch (issue._tag) {
|
|
598
741
|
case "InvalidType":
|
|
599
|
-
return getExpectedMessage(InternalAnnotations.getExpected(issue.ast));
|
|
742
|
+
return getExpectedMessage(InternalAnnotations.getExpected(issue.ast), issue);
|
|
600
743
|
case "InvalidValue":
|
|
601
|
-
|
|
744
|
+
{
|
|
745
|
+
const expected = findExpected(issue);
|
|
746
|
+
if (expected !== undefined) return getExpectedMessage(expected, issue);
|
|
747
|
+
const input = formatInput(issue);
|
|
748
|
+
return input === undefined ? "Expected a valid value" : `Invalid data ${input}`;
|
|
749
|
+
}
|
|
602
750
|
case "MissingKey":
|
|
603
751
|
return "Missing key";
|
|
604
752
|
case "UnexpectedKey":
|
|
605
|
-
|
|
753
|
+
{
|
|
754
|
+
const input = formatInput(issue);
|
|
755
|
+
return input === undefined ? "Expected no excess property" : `Unexpected key with value ${input}`;
|
|
756
|
+
}
|
|
606
757
|
case "Forbidden":
|
|
607
758
|
return "Forbidden operation";
|
|
608
759
|
case "OneOf":
|
|
609
|
-
|
|
760
|
+
{
|
|
761
|
+
const input = formatInput(issue);
|
|
762
|
+
return input === undefined ? "Expected exactly one member to match" : `Expected exactly one member to match the input ${input}`;
|
|
763
|
+
}
|
|
610
764
|
}
|
|
611
765
|
};
|
|
612
766
|
/**
|
|
@@ -621,7 +775,8 @@ export const defaultLeafHook = issue => {
|
|
|
621
775
|
* - Looks for a `message` annotation on the inner issue first, then on the
|
|
622
776
|
* filter itself.
|
|
623
777
|
* - Returns `undefined` when no annotation is found, causing the formatter to
|
|
624
|
-
* fall back to `"Expected <filter>"
|
|
778
|
+
* fall back to `"Expected <filter>"` or, when the filter reports input,
|
|
779
|
+
* `"Expected <filter>, got <input>"`.
|
|
625
780
|
*
|
|
626
781
|
* @see {@link CheckHook}
|
|
627
782
|
* @see {@link makeFormatterStandardSchemaV1}
|
|
@@ -629,9 +784,7 @@ export const defaultLeafHook = issue => {
|
|
|
629
784
|
* @category formatting
|
|
630
785
|
* @since 4.0.0
|
|
631
786
|
*/
|
|
632
|
-
export const defaultCheckHook = issue =>
|
|
633
|
-
return findMessage(issue.issue) ?? findMessage(issue);
|
|
634
|
-
};
|
|
787
|
+
export const defaultCheckHook = issue => findMessage(issue.issue) ?? findMessage(issue);
|
|
635
788
|
/**
|
|
636
789
|
* Creates a {@link Formatter} that produces a `StandardSchemaV1.FailureResult`.
|
|
637
790
|
*
|
|
@@ -648,6 +801,15 @@ export const defaultCheckHook = issue => {
|
|
|
648
801
|
* - `Pointer` paths are accumulated to produce full property paths.
|
|
649
802
|
* - Falls back to {@link defaultLeafHook} / {@link defaultCheckHook} when no
|
|
650
803
|
* hooks are provided.
|
|
804
|
+
* - Default messages include reported input when the issue that produces the
|
|
805
|
+
* message has an `input` field. The returned Standard Schema issues do not
|
|
806
|
+
* receive an `input` field.
|
|
807
|
+
*
|
|
808
|
+
* **Gotchas**
|
|
809
|
+
*
|
|
810
|
+
* Reported input can appear inside the Standard Schema `message` string even
|
|
811
|
+
* though it is not exposed as a separate property. Custom hooks control their
|
|
812
|
+
* complete message and are not modified.
|
|
651
813
|
*
|
|
652
814
|
* **Example** (Creating a Standard Schema V1 formatter)
|
|
653
815
|
*
|
|
@@ -670,8 +832,16 @@ export function makeFormatterStandardSchemaV1(options) {
|
|
|
670
832
|
issues: toDefaultIssues(issue, [], options?.leafHook ?? defaultLeafHook, options?.checkHook ?? defaultCheckHook)
|
|
671
833
|
});
|
|
672
834
|
}
|
|
673
|
-
function
|
|
674
|
-
return
|
|
835
|
+
function formatInput(issue) {
|
|
836
|
+
return hasInput(issue) ? format(issue.input) : undefined;
|
|
837
|
+
}
|
|
838
|
+
function findExpected(issue) {
|
|
839
|
+
const expected = issue.annotations?.expected;
|
|
840
|
+
return typeof expected === "string" ? expected : undefined;
|
|
841
|
+
}
|
|
842
|
+
function getExpectedMessage(expected, issue) {
|
|
843
|
+
const input = formatInput(issue);
|
|
844
|
+
return input === undefined ? `Expected ${expected}` : `Expected ${expected}, got ${input}`;
|
|
675
845
|
}
|
|
676
846
|
function toDefaultIssues(issue, path, leafHook, checkHook) {
|
|
677
847
|
switch (issue._tag) {
|
|
@@ -684,15 +854,14 @@ function toDefaultIssues(issue, path, leafHook, checkHook) {
|
|
|
684
854
|
message
|
|
685
855
|
}];
|
|
686
856
|
}
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
return [{
|
|
690
|
-
path,
|
|
691
|
-
message: getExpectedMessage(formatCheck(issue.filter))
|
|
692
|
-
}];
|
|
693
|
-
default:
|
|
694
|
-
return toDefaultIssues(issue.issue, path, leafHook, checkHook);
|
|
857
|
+
if (issue.issue._tag !== "InvalidValue") {
|
|
858
|
+
return toDefaultIssues(issue.issue, path, leafHook, checkHook);
|
|
695
859
|
}
|
|
860
|
+
const expected = findExpected(issue.issue);
|
|
861
|
+
return [{
|
|
862
|
+
path,
|
|
863
|
+
message: expected === undefined ? getExpectedMessage(formatCheck(issue.filter), issue) : getExpectedMessage(expected, issue.issue)
|
|
864
|
+
}];
|
|
696
865
|
}
|
|
697
866
|
case "Encoding":
|
|
698
867
|
return toDefaultIssues(issue.issue, path, leafHook, checkHook);
|
|
@@ -705,7 +874,7 @@ function toDefaultIssues(issue, path, leafHook, checkHook) {
|
|
|
705
874
|
if (issue.issues.length === 0) {
|
|
706
875
|
return [{
|
|
707
876
|
path,
|
|
708
|
-
message: findMessage(issue) ?? getExpectedMessage(InternalAnnotations.getExpected(issue.ast))
|
|
877
|
+
message: findMessage(issue) ?? getExpectedMessage(InternalAnnotations.getExpected(issue.ast), issue)
|
|
709
878
|
}];
|
|
710
879
|
}
|
|
711
880
|
return issue.issues.flatMap(issue => toDefaultIssues(issue, path, leafHook, checkHook));
|
|
@@ -738,13 +907,19 @@ function formatCheck(check) {
|
|
|
738
907
|
*
|
|
739
908
|
* **Details**
|
|
740
909
|
*
|
|
741
|
-
* This is the default formatter used by `SchemaIssue.toString()`.
|
|
742
|
-
*
|
|
743
910
|
* - Flattens the issue tree into `{ message, path }` entries using
|
|
744
911
|
* {@link defaultLeafHook} and {@link defaultCheckHook}.
|
|
912
|
+
* - Includes reported input in default messages when the node producing the
|
|
913
|
+
* message has an `input` field.
|
|
745
914
|
* - Each entry is rendered as `"<message>"` or `"<message>\n at <path>"`.
|
|
746
915
|
* - Multiple entries are joined with newlines.
|
|
747
916
|
*
|
|
917
|
+
* **Gotchas**
|
|
918
|
+
*
|
|
919
|
+
* Formatting an issue can disclose input retained with `reportInput: true`.
|
|
920
|
+
* Wrapper inputs are not inherited by child messages, and custom messages are
|
|
921
|
+
* returned unchanged.
|
|
922
|
+
*
|
|
748
923
|
* **Example** (Formatting an issue as a string)
|
|
749
924
|
*
|
|
750
925
|
* ```ts import.meta.vitest
|
package/dist/SchemaIssue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaIssue.js","names":[],"sources":["../src/SchemaIssue.ts"],"sourcesContent":[null],"mappings":"AAYA,OAAO,KAAK,GAAG,MAAM,YAAY;AACjC,SAAS,UAAU,QAAsC,gBAAgB;
|
|
1
|
+
{"version":3,"file":"SchemaIssue.js","names":[],"sources":["../src/SchemaIssue.ts"],"sourcesContent":[null],"mappings":"AAYA,OAAO,KAAK,GAAG,MAAM,YAAY;AACjC,SAAS,MAAM,EAAE,UAAU,QAAsC,gBAAgB;AACjF,OAAO,KAAK,mBAAmB,MAAM,kCAAkC;AACvE,OAAO,KAAK,cAAc,MAAM,6BAA6B;AAC7D,SAAS,WAAW,QAAQ,gBAAgB;AAI5C,MAAM,MAAM,GAAG,2BAA2B;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,OAAM,SAAU,OAAO,CAAC,CAAU;EAChC,OAAO,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,MAAM;AACvD;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,OAAM,SAAU,QAAQ,CAAC,KAAY;EACnC,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC;AACtC;AAiEA,MAAM,IAAI;EACC,CAAC,MAAM,IAAI,MAAM;EAM1B,YAAY,KAAe,EAAE,OAAgC;IAC3D,IAAI,OAAO,EAAE,WAAW,KAAK,IAAI,IAAI,KAAK,KAAK,cAAc,CAAC,OAAO,EAAE;MACrE,IAAI,CAAC,KAAK,GAAG,KAAK;IACpB;EACF;;AAGF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,OAAM,MAAO,MAAO,SAAQ,IAAI;EACrB,IAAI,GAAG,QAAQ;EACxB;;;EAGS,MAAM;EACf;;;EAGS,KAAK;EAEd;EACE;;;EAGA,MAA6B;EAC7B;;;EAGA,KAAY;EACZ;;;;EAIA,KAAe;EACf;;;EAGA,OAAgC;IAEhC,KAAK,CA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