effect 4.0.0-beta.85 → 4.0.0-beta.86
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/dist/ChannelSchema.d.ts +8 -8
- package/dist/ChannelSchema.d.ts.map +1 -1
- package/dist/Config.d.ts +2 -2
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +10 -3
- package/dist/Config.js.map +1 -1
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +4 -0
- package/dist/Cron.js.map +1 -1
- package/dist/Schema.d.ts +745 -393
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +90 -64
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +20 -29
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaParser.d.ts +24 -24
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +43 -39
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +300 -300
- package/dist/internal/effect.js +6 -7
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/matcher.js +0 -2
- package/dist/internal/matcher.js.map +1 -1
- package/dist/internal/schema/representation.js +1 -5
- package/dist/internal/schema/representation.js.map +1 -1
- package/dist/internal/schema/schema.js.map +1 -1
- package/dist/testing/TestSchema.d.ts +9 -9
- package/dist/testing/TestSchema.d.ts.map +1 -1
- package/dist/testing/TestSchema.js +3 -2
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +2 -2
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Chat.d.ts +1 -1
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +4 -4
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +13 -6
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +4 -4
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +2 -2
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Response.d.ts +2 -2
- package/dist/unstable/ai/Response.d.ts.map +1 -1
- package/dist/unstable/ai/Response.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts +26 -26
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/cli/Argument.d.ts +8 -7
- package/dist/unstable/cli/Argument.d.ts.map +1 -1
- package/dist/unstable/cli/Argument.js.map +1 -1
- package/dist/unstable/cli/Flag.d.ts +8 -7
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.js.map +1 -1
- package/dist/unstable/cli/Param.d.ts +1806 -168
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +0 -70
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Primitive.d.ts +3 -4
- package/dist/unstable/cli/Primitive.d.ts.map +1 -1
- package/dist/unstable/cli/Primitive.js.map +1 -1
- package/dist/unstable/cli/internal/ansi.d.ts.map +1 -1
- package/dist/unstable/cli/internal/ansi.js +0 -22
- package/dist/unstable/cli/internal/ansi.js.map +1 -1
- package/dist/unstable/cli/internal/config.d.ts +48 -0
- package/dist/unstable/cli/internal/config.d.ts.map +1 -1
- package/dist/unstable/cli/internal/config.js +0 -6
- package/dist/unstable/cli/internal/config.js.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts +3 -3
- package/dist/unstable/cluster/Reply.d.ts +2 -2
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
- package/dist/unstable/encoding/Msgpack.d.ts +6 -6
- package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
- package/dist/unstable/encoding/Msgpack.js.map +1 -1
- package/dist/unstable/encoding/Ndjson.d.ts +8 -8
- package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
- package/dist/unstable/encoding/Sse.d.ts +1 -1
- package/dist/unstable/encoding/Sse.d.ts.map +1 -1
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.d.ts +22 -22
- package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +15 -15
- package/dist/unstable/http/HttpBody.d.ts +1 -1
- package/dist/unstable/http/HttpBody.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.d.ts +1 -1
- package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
- package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
- package/dist/unstable/http/HttpMiddleware.js +12 -3
- package/dist/unstable/http/HttpMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApi.d.ts +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts +2 -2
- package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +32 -32
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +13 -6
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js +0 -13
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/observability/internal/otlpProtobuf.js +0 -68
- package/dist/unstable/observability/internal/otlpProtobuf.js.map +1 -1
- package/dist/unstable/observability/internal/protobuf.js +0 -28
- package/dist/unstable/observability/internal/protobuf.js.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.d.ts +2 -2
- package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
- package/dist/unstable/persistence/Persistable.d.ts +6 -6
- package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts +3 -3
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/Persistence.d.ts +5 -5
- package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.d.ts +2 -2
- package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +1 -1
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +3 -4
- package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
- package/dist/unstable/rpc/Rpc.js +1 -1
- package/dist/unstable/rpc/Rpc.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +25 -4
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcMessage.d.ts +7 -0
- package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMessage.js +20 -0
- package/dist/unstable/rpc/RpcMessage.js.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts +2 -2
- package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +10 -3
- package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSchema.js.map +1 -1
- package/dist/unstable/rpc/RpcWorker.d.ts +3 -3
- package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
- package/dist/unstable/schema/Model.d.ts +2 -2
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +16 -2
- package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
- package/dist/unstable/schema/VariantSchema.js.map +1 -1
- package/dist/unstable/sql/SqlConnection.d.ts +1 -0
- package/dist/unstable/sql/SqlConnection.d.ts.map +1 -1
- package/dist/unstable/sql/SqlConnection.js.map +1 -1
- package/dist/unstable/sql/SqlModel.js.map +1 -1
- package/dist/unstable/sql/SqlResolver.d.ts +4 -4
- package/dist/unstable/sql/SqlResolver.d.ts.map +1 -1
- package/dist/unstable/sql/SqlResolver.js.map +1 -1
- package/dist/unstable/sql/SqlSchema.d.ts +5 -5
- package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.d.ts +1 -0
- package/dist/unstable/sql/Statement.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.js +3 -0
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/workflow/Activity.d.ts +2 -2
- package/dist/unstable/workflow/Activity.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts +18 -18
- package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +3 -3
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +3 -3
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ChannelSchema.ts +9 -9
- package/src/Config.ts +12 -5
- package/src/Cron.ts +4 -0
- package/src/Schema.ts +963 -688
- package/src/SchemaAST.ts +25 -35
- package/src/SchemaParser.ts +85 -77
- package/src/internal/effect.ts +6 -22
- package/src/internal/matcher.ts +0 -5
- package/src/internal/schema/arbitrary.ts +1 -1
- package/src/internal/schema/representation.ts +1 -5
- package/src/internal/schema/schema.ts +1 -1
- package/src/testing/TestSchema.ts +14 -13
- package/src/unstable/ai/AnthropicStructuredOutput.ts +2 -2
- package/src/unstable/ai/Chat.ts +1 -1
- package/src/unstable/ai/LanguageModel.ts +7 -7
- package/src/unstable/ai/McpSchema.ts +16 -14
- package/src/unstable/ai/McpServer.ts +7 -7
- package/src/unstable/ai/OpenAiStructuredOutput.ts +2 -2
- package/src/unstable/ai/Response.ts +9 -5
- package/src/unstable/ai/Tool.ts +49 -47
- package/src/unstable/cli/Argument.ts +9 -8
- package/src/unstable/cli/Flag.ts +9 -8
- package/src/unstable/cli/Param.ts +6 -146
- package/src/unstable/cli/Primitive.ts +5 -6
- package/src/unstable/cli/internal/ansi.ts +0 -33
- package/src/unstable/cli/internal/config.ts +0 -8
- package/src/unstable/cli/internal/parser.ts +2 -2
- package/src/unstable/cluster/MessageStorage.ts +1 -1
- package/src/unstable/cluster/Reply.ts +6 -2
- package/src/unstable/devtools/DevToolsSchema.ts +1 -1
- package/src/unstable/encoding/Msgpack.ts +9 -7
- package/src/unstable/encoding/Ndjson.ts +10 -10
- package/src/unstable/encoding/Sse.ts +1 -1
- package/src/unstable/eventlog/Event.ts +3 -3
- package/src/unstable/http/HttpBody.ts +1 -1
- package/src/unstable/http/HttpClientRequest.ts +1 -1
- package/src/unstable/http/HttpIncomingMessage.ts +1 -1
- package/src/unstable/http/HttpMiddleware.ts +12 -3
- package/src/unstable/httpapi/HttpApi.ts +1 -1
- package/src/unstable/httpapi/HttpApiBuilder.ts +9 -5
- package/src/unstable/httpapi/HttpApiClient.ts +10 -10
- package/src/unstable/httpapi/HttpApiEndpoint.ts +45 -33
- package/src/unstable/httpapi/HttpApiMiddleware.ts +2 -2
- package/src/unstable/httpapi/HttpApiSchema.ts +16 -43
- package/src/unstable/httpapi/OpenApi.ts +5 -5
- package/src/unstable/observability/internal/otlpProtobuf.ts +0 -75
- package/src/unstable/observability/internal/protobuf.ts +0 -42
- package/src/unstable/persistence/KeyValueStore.ts +2 -2
- package/src/unstable/persistence/Persistable.ts +7 -7
- package/src/unstable/persistence/PersistedQueue.ts +3 -3
- package/src/unstable/persistence/Persistence.ts +5 -5
- package/src/unstable/reactivity/AsyncResult.ts +4 -4
- package/src/unstable/reactivity/Atom.ts +1 -1
- package/src/unstable/reactivity/AtomHttpApi.ts +1 -1
- package/src/unstable/rpc/Rpc.ts +7 -8
- package/src/unstable/rpc/RpcClient.ts +26 -4
- package/src/unstable/rpc/RpcMessage.ts +19 -0
- package/src/unstable/rpc/RpcMiddleware.ts +2 -2
- package/src/unstable/rpc/RpcSchema.ts +12 -9
- package/src/unstable/rpc/RpcWorker.ts +3 -3
- package/src/unstable/schema/Model.ts +2 -2
- package/src/unstable/schema/VariantSchema.ts +19 -17
- package/src/unstable/sql/SqlConnection.ts +5 -0
- package/src/unstable/sql/SqlModel.ts +2 -2
- package/src/unstable/sql/SqlResolver.ts +6 -6
- package/src/unstable/sql/SqlSchema.ts +5 -5
- package/src/unstable/sql/Statement.ts +11 -0
- package/src/unstable/workflow/Activity.ts +6 -6
- package/src/unstable/workflow/DurableDeferred.ts +33 -33
- package/src/unstable/workflow/Workflow.ts +5 -5
- package/src/unstable/workflow/WorkflowEngine.ts +10 -10
- package/dist/internal/concurrency.d.ts +0 -2
- package/dist/internal/concurrency.d.ts.map +0 -1
- package/dist/internal/concurrency.js +0 -29
- package/dist/internal/concurrency.js.map +0 -1
- package/src/internal/concurrency.ts +0 -52
|
@@ -51,54 +51,21 @@ export const eraseLine = `${ESC}2K`
|
|
|
51
51
|
/** @internal */
|
|
52
52
|
export const beep = BEL
|
|
53
53
|
|
|
54
|
-
/** @internal */
|
|
55
|
-
export const black = `${ESC}30m`
|
|
56
|
-
|
|
57
54
|
/** @internal */
|
|
58
55
|
export const red = `${ESC}31m`
|
|
59
56
|
|
|
60
57
|
/** @internal */
|
|
61
58
|
export const green = `${ESC}32m`
|
|
62
59
|
|
|
63
|
-
/** @internal */
|
|
64
|
-
export const yellow = `${ESC}33m`
|
|
65
|
-
|
|
66
|
-
/** @internal */
|
|
67
|
-
export const blue = `${ESC}34m`
|
|
68
|
-
|
|
69
|
-
/** @internal */
|
|
70
|
-
export const magenta = `${ESC}35m`
|
|
71
|
-
|
|
72
|
-
/** @internal */
|
|
73
|
-
export const cyan = `${ESC}36m`
|
|
74
|
-
|
|
75
60
|
/** @internal */
|
|
76
61
|
export const white = `${ESC}37m`
|
|
77
62
|
|
|
78
63
|
/** @internal */
|
|
79
64
|
export const blackBright = `${ESC}90m`
|
|
80
65
|
|
|
81
|
-
/** @internal */
|
|
82
|
-
export const redBright = `${ESC}91m`
|
|
83
|
-
|
|
84
|
-
/** @internal */
|
|
85
|
-
export const greenBright = `${ESC}92m`
|
|
86
|
-
|
|
87
|
-
/** @internal */
|
|
88
|
-
export const yellowBright = `${ESC}93m`
|
|
89
|
-
|
|
90
|
-
/** @internal */
|
|
91
|
-
export const blueBright = `${ESC}94m`
|
|
92
|
-
|
|
93
|
-
/** @internal */
|
|
94
|
-
export const magentaBright = `${ESC}95m`
|
|
95
|
-
|
|
96
66
|
/** @internal */
|
|
97
67
|
export const cyanBright = `${ESC}96m`
|
|
98
68
|
|
|
99
|
-
/** @internal */
|
|
100
|
-
export const whiteBright = `${ESC}97m`
|
|
101
|
-
|
|
102
69
|
export const annotate = (text: string, ...styles: Array<string | Array<string>>) => {
|
|
103
70
|
const flat = styles.flat()
|
|
104
71
|
return `${flat.join("")}${text}${reset}`
|
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
* 1. Flat iteration over all params for parsing/validation
|
|
47
47
|
* 2. Reconstruction of original nested shape for handler input
|
|
48
48
|
*/
|
|
49
|
-
import * as Predicate from "../../../Predicate.ts"
|
|
50
49
|
import * as Param from "../Param.ts"
|
|
51
50
|
|
|
52
51
|
/* ========================================================================== */
|
|
@@ -105,13 +104,6 @@ export declare namespace ConfigInternal {
|
|
|
105
104
|
| { readonly _tag: "Nested"; readonly tree: Tree }
|
|
106
105
|
}
|
|
107
106
|
|
|
108
|
-
/* ========================================================================== */
|
|
109
|
-
/* Guards */
|
|
110
|
-
/* ========================================================================== */
|
|
111
|
-
|
|
112
|
-
/** @internal */
|
|
113
|
-
export const isConfigInternal = (u: unknown): u is ConfigInternal => Predicate.hasProperty(u, ConfigInternalTypeId)
|
|
114
|
-
|
|
115
107
|
/* ========================================================================== */
|
|
116
108
|
/* Parsing */
|
|
117
109
|
/* ========================================================================== */
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
import * as Effect from "../../../Effect.ts"
|
|
28
28
|
import * as Option from "../../../Option.ts"
|
|
29
29
|
import * as CliError from "../CliError.ts"
|
|
30
|
-
import type { Command, ParsedTokens } from "../Command.ts"
|
|
30
|
+
import type { Command, Environment, ParsedTokens } from "../Command.ts"
|
|
31
31
|
import * as Param from "../Param.ts"
|
|
32
32
|
import * as Primitive from "../Primitive.ts"
|
|
33
33
|
import { suggest } from "./auto-suggest.ts"
|
|
@@ -50,7 +50,7 @@ export const parseArgs = (
|
|
|
50
50
|
lexResult: LexResult,
|
|
51
51
|
command: Command.Any,
|
|
52
52
|
commandPath: ReadonlyArray<string> = []
|
|
53
|
-
): Effect.Effect<ParsedTokens, never,
|
|
53
|
+
): Effect.Effect<ParsedTokens, never, Environment> =>
|
|
54
54
|
Effect.gen(function*() {
|
|
55
55
|
const { tokens, trailingOperands: afterEndOfOptions } = lexResult
|
|
56
56
|
const newCommandPath = [...commandPath, command.name]
|
|
@@ -1061,7 +1061,7 @@ export const layerMemory: Layer.Layer<
|
|
|
1061
1061
|
|
|
1062
1062
|
const EnvelopeWithReply: Schema.Struct<
|
|
1063
1063
|
{
|
|
1064
|
-
readonly envelope: Schema.
|
|
1064
|
+
readonly envelope: Schema.ConstraintDecoder<Envelope.PartialRequest | Envelope.AckChunk | Envelope.Interrupt>
|
|
1065
1065
|
readonly lastSentReply: Schema.Option<Schema.Codec<Reply.Encoded>>
|
|
1066
1066
|
}
|
|
1067
1067
|
> = Schema.Struct({
|
|
@@ -234,7 +234,7 @@ export class Chunk<R extends Rpc.Any> extends Data.TaggedClass("Chunk")<{
|
|
|
234
234
|
*
|
|
235
235
|
* @since 4.0.0
|
|
236
236
|
*/
|
|
237
|
-
static schemaFrom<Success extends Schema.
|
|
237
|
+
static schemaFrom<Success extends Schema.Constraint>(
|
|
238
238
|
success: Success
|
|
239
239
|
): Schema.declareConstructor<Chunk<Rpc.Any>, Chunk<Rpc.Any>, readonly [Success]> {
|
|
240
240
|
// TODO: extract to a helper function
|
|
@@ -336,7 +336,11 @@ export class WithExit<R extends Rpc.Any> extends Data.TaggedClass("WithExit")<{
|
|
|
336
336
|
*
|
|
337
337
|
* @since 4.0.0
|
|
338
338
|
*/
|
|
339
|
-
static schemaFrom<
|
|
339
|
+
static schemaFrom<
|
|
340
|
+
Success extends Schema.Constraint,
|
|
341
|
+
Error extends Schema.Constraint,
|
|
342
|
+
Defect extends Schema.Constraint
|
|
343
|
+
>(
|
|
340
344
|
exitSchema: Schema.Exit<Success, Error, Defect>
|
|
341
345
|
): Schema.declareConstructor<
|
|
342
346
|
WithExit<Rpc.Any>,
|
|
@@ -261,7 +261,7 @@ export const MetricLabel = Schema.Struct({
|
|
|
261
261
|
*/
|
|
262
262
|
export type MetricLabel = Schema.Schema.Type<typeof MetricLabel>
|
|
263
263
|
|
|
264
|
-
const metric = <Type extends string, State extends Schema.
|
|
264
|
+
const metric = <Type extends string, State extends Schema.Constraint>(type: Type, state: State) =>
|
|
265
265
|
Schema.Struct({
|
|
266
266
|
id: Schema.String,
|
|
267
267
|
type: Schema.tag(type),
|
|
@@ -101,7 +101,7 @@ export const encode = <IE = never, Done = unknown>(): Channel.Channel<
|
|
|
101
101
|
* @category constructors
|
|
102
102
|
* @since 4.0.0
|
|
103
103
|
*/
|
|
104
|
-
export const encodeSchema = <S extends Schema.
|
|
104
|
+
export const encodeSchema = <S extends Schema.Constraint>(
|
|
105
105
|
schema: S
|
|
106
106
|
) =>
|
|
107
107
|
<IE = never, Done = unknown>(): Channel.Channel<
|
|
@@ -181,7 +181,7 @@ export const decode = <IE = never, Done = unknown>(): Channel.Channel<
|
|
|
181
181
|
* @category constructors
|
|
182
182
|
* @since 4.0.0
|
|
183
183
|
*/
|
|
184
|
-
export const decodeSchema = <S extends Schema.
|
|
184
|
+
export const decodeSchema = <S extends Schema.Constraint>(
|
|
185
185
|
schema: S
|
|
186
186
|
) =>
|
|
187
187
|
<IE = never, Done = unknown>(): Channel.Channel<
|
|
@@ -256,7 +256,7 @@ export const duplexSchema: {
|
|
|
256
256
|
* @category combinators
|
|
257
257
|
* @since 4.0.0
|
|
258
258
|
*/
|
|
259
|
-
<In extends Schema.
|
|
259
|
+
<In extends Schema.Constraint, Out extends Schema.Constraint>(
|
|
260
260
|
options: {
|
|
261
261
|
readonly inputSchema: In
|
|
262
262
|
readonly outputSchema: Out
|
|
@@ -293,7 +293,7 @@ export const duplexSchema: {
|
|
|
293
293
|
* @category combinators
|
|
294
294
|
* @since 4.0.0
|
|
295
295
|
*/
|
|
296
|
-
<Out extends Schema.
|
|
296
|
+
<Out extends Schema.Constraint, In extends Schema.Constraint, OutErr, OutDone, InErr, InDone, R>(
|
|
297
297
|
self: Channel.Channel<
|
|
298
298
|
Arr.NonEmptyReadonlyArray<Uint8Array<ArrayBuffer>>,
|
|
299
299
|
OutErr,
|
|
@@ -316,7 +316,7 @@ export const duplexSchema: {
|
|
|
316
316
|
InDone,
|
|
317
317
|
R | In["EncodingServices"] | Out["DecodingServices"]
|
|
318
318
|
>
|
|
319
|
-
} = dual(2, <Out extends Schema.
|
|
319
|
+
} = dual(2, <Out extends Schema.Constraint, In extends Schema.Constraint, OutErr, OutDone, InErr, InDone, R>(
|
|
320
320
|
self: Channel.Channel<
|
|
321
321
|
Arr.NonEmptyReadonlyArray<Uint8Array<ArrayBuffer>>,
|
|
322
322
|
OutErr,
|
|
@@ -351,7 +351,9 @@ export const duplexSchema: {
|
|
|
351
351
|
* @category schemas
|
|
352
352
|
* @since 4.0.0
|
|
353
353
|
*/
|
|
354
|
-
export interface schema<S extends Schema.
|
|
354
|
+
export interface schema<S extends Schema.Constraint>
|
|
355
|
+
extends Schema.decodeTo<S, Schema.instanceOf<Uint8Array<ArrayBuffer>>>
|
|
356
|
+
{}
|
|
355
357
|
|
|
356
358
|
/**
|
|
357
359
|
* Schema for decoding MessagePack bytes into values and encoding values back to
|
|
@@ -403,7 +405,7 @@ export const transformation: SchemaTransformation.Transformation<
|
|
|
403
405
|
* @category schemas
|
|
404
406
|
* @since 4.0.0
|
|
405
407
|
*/
|
|
406
|
-
export const schema = <S extends Schema.
|
|
408
|
+
export const schema = <S extends Schema.Constraint>(schema: S): schema<S> =>
|
|
407
409
|
(Schema.Uint8Array as Schema.instanceOf<Uint8Array<ArrayBuffer>>).pipe(
|
|
408
410
|
Schema.decodeTo(schema, transformation)
|
|
409
411
|
)
|
|
@@ -106,7 +106,7 @@ export const encode = <IE = never, Done = unknown>(): Channel.Channel<
|
|
|
106
106
|
* @category constructors
|
|
107
107
|
* @since 4.0.0
|
|
108
108
|
*/
|
|
109
|
-
export const encodeSchema = <S extends Schema.
|
|
109
|
+
export const encodeSchema = <S extends Schema.Constraint>(
|
|
110
110
|
schema: S
|
|
111
111
|
) =>
|
|
112
112
|
<IE = never, Done = unknown>(): Channel.Channel<
|
|
@@ -130,7 +130,7 @@ export const encodeSchema = <S extends Schema.Top>(
|
|
|
130
130
|
* @category constructors
|
|
131
131
|
* @since 4.0.0
|
|
132
132
|
*/
|
|
133
|
-
export const encodeSchemaString = <S extends Schema.
|
|
133
|
+
export const encodeSchemaString = <S extends Schema.Constraint>(
|
|
134
134
|
schema: S
|
|
135
135
|
) =>
|
|
136
136
|
<IE = never, Done = unknown>(): Channel.Channel<
|
|
@@ -222,7 +222,7 @@ export const decode = <IE = never, Done = unknown>(options?: {
|
|
|
222
222
|
* @category constructors
|
|
223
223
|
* @since 4.0.0
|
|
224
224
|
*/
|
|
225
|
-
export const decodeSchema = <S extends Schema.
|
|
225
|
+
export const decodeSchema = <S extends Schema.Constraint>(
|
|
226
226
|
schema: S
|
|
227
227
|
) =>
|
|
228
228
|
<IE = never, Done = unknown>(options?: {
|
|
@@ -248,7 +248,7 @@ export const decodeSchema = <S extends Schema.Top>(
|
|
|
248
248
|
* @category constructors
|
|
249
249
|
* @since 4.0.0
|
|
250
250
|
*/
|
|
251
|
-
export const decodeSchemaString = <S extends Schema.
|
|
251
|
+
export const decodeSchemaString = <S extends Schema.Constraint>(
|
|
252
252
|
schema: S
|
|
253
253
|
) =>
|
|
254
254
|
<IE = never, Done = unknown>(options?: {
|
|
@@ -500,7 +500,7 @@ export const duplexSchema: {
|
|
|
500
500
|
* @category combinators
|
|
501
501
|
* @since 4.0.0
|
|
502
502
|
*/
|
|
503
|
-
<In extends Schema.
|
|
503
|
+
<In extends Schema.Constraint, Out extends Schema.Constraint>(
|
|
504
504
|
options: {
|
|
505
505
|
readonly inputSchema: In
|
|
506
506
|
readonly outputSchema: Out
|
|
@@ -537,7 +537,7 @@ export const duplexSchema: {
|
|
|
537
537
|
* @category combinators
|
|
538
538
|
* @since 4.0.0
|
|
539
539
|
*/
|
|
540
|
-
<Out extends Schema.
|
|
540
|
+
<Out extends Schema.Constraint, In extends Schema.Constraint, OutErr, OutDone, InErr, InDone, R>(
|
|
541
541
|
self: Channel.Channel<
|
|
542
542
|
Arr.NonEmptyReadonlyArray<Uint8Array>,
|
|
543
543
|
OutErr,
|
|
@@ -561,7 +561,7 @@ export const duplexSchema: {
|
|
|
561
561
|
InDone,
|
|
562
562
|
R | In["EncodingServices"] | Out["DecodingServices"]
|
|
563
563
|
>
|
|
564
|
-
} = dual(2, <Out extends Schema.
|
|
564
|
+
} = dual(2, <Out extends Schema.Constraint, In extends Schema.Constraint, OutErr, OutDone, InErr, InDone, R>(
|
|
565
565
|
self: Channel.Channel<
|
|
566
566
|
Arr.NonEmptyReadonlyArray<Uint8Array>,
|
|
567
567
|
OutErr,
|
|
@@ -611,7 +611,7 @@ export const duplexSchemaString: {
|
|
|
611
611
|
* @category combinators
|
|
612
612
|
* @since 4.0.0
|
|
613
613
|
*/
|
|
614
|
-
<In extends Schema.
|
|
614
|
+
<In extends Schema.Constraint, Out extends Schema.Constraint>(
|
|
615
615
|
options: {
|
|
616
616
|
readonly inputSchema: In
|
|
617
617
|
readonly outputSchema: Out
|
|
@@ -648,7 +648,7 @@ export const duplexSchemaString: {
|
|
|
648
648
|
* @category combinators
|
|
649
649
|
* @since 4.0.0
|
|
650
650
|
*/
|
|
651
|
-
<Out extends Schema.
|
|
651
|
+
<Out extends Schema.Constraint, In extends Schema.Constraint, OutErr, OutDone, InErr, InDone, R>(
|
|
652
652
|
self: Channel.Channel<
|
|
653
653
|
Arr.NonEmptyReadonlyArray<string>,
|
|
654
654
|
OutErr,
|
|
@@ -672,7 +672,7 @@ export const duplexSchemaString: {
|
|
|
672
672
|
InDone,
|
|
673
673
|
R | In["EncodingServices"] | Out["DecodingServices"]
|
|
674
674
|
>
|
|
675
|
-
} = dual(2, <Out extends Schema.
|
|
675
|
+
} = dual(2, <Out extends Schema.Constraint, In extends Schema.Constraint, OutErr, OutDone, InErr, InDone, R>(
|
|
676
676
|
self: Channel.Channel<
|
|
677
677
|
Arr.NonEmptyReadonlyArray<string>,
|
|
678
678
|
OutErr,
|
|
@@ -137,7 +137,7 @@ export const decodeSchema = <
|
|
|
137
137
|
* @since 4.0.0
|
|
138
138
|
*/
|
|
139
139
|
export const decodeDataSchema = <Type, DecodingServices, IE, Done>(
|
|
140
|
-
schema: Schema.
|
|
140
|
+
schema: Schema.ConstraintDecoder<Type, DecodingServices>
|
|
141
141
|
): Channel.Channel<
|
|
142
142
|
NonEmptyReadonlyArray<{
|
|
143
143
|
readonly event: string
|
|
@@ -404,9 +404,9 @@ export function make<
|
|
|
404
404
|
export function make(options: {
|
|
405
405
|
readonly tag: string
|
|
406
406
|
readonly primaryKey: (payload: Schema.Schema.Type<Schema.Top>) => string
|
|
407
|
-
readonly payload?: Schema.
|
|
408
|
-
readonly success?: Schema.
|
|
409
|
-
readonly error?: Schema.
|
|
407
|
+
readonly payload?: Schema.Constraint | undefined
|
|
408
|
+
readonly success?: Schema.Constraint | undefined
|
|
409
|
+
readonly error?: Schema.Constraint | undefined
|
|
410
410
|
}): Event<string, Schema.Top, Schema.Top, typeof Schema.Never> {
|
|
411
411
|
const payload = options.payload ?? Schema.Void
|
|
412
412
|
const success = options.success ?? Schema.Void
|
|
@@ -317,7 +317,7 @@ export const json = (body: unknown, contentType?: string): Effect.Effect<Uint8Ar
|
|
|
317
317
|
* @category constructors
|
|
318
318
|
* @since 4.0.0
|
|
319
319
|
*/
|
|
320
|
-
export const jsonSchema = <S extends Schema.
|
|
320
|
+
export const jsonSchema = <S extends Schema.Constraint>(
|
|
321
321
|
schema: S,
|
|
322
322
|
options?: ParseOptions | undefined
|
|
323
323
|
) => {
|
|
@@ -974,7 +974,7 @@ export const bodyJsonUnsafe: {
|
|
|
974
974
|
* @category combinators
|
|
975
975
|
* @since 4.0.0
|
|
976
976
|
*/
|
|
977
|
-
export const schemaBodyJson = <S extends Schema.
|
|
977
|
+
export const schemaBodyJson = <S extends Schema.Constraint>(
|
|
978
978
|
schema: S,
|
|
979
979
|
options?: ParseOptions | undefined
|
|
980
980
|
): {
|
|
@@ -61,7 +61,7 @@ export interface HttpIncomingMessage<E = unknown> extends Inspectable.Inspectabl
|
|
|
61
61
|
* @category schemas
|
|
62
62
|
* @since 4.0.0
|
|
63
63
|
*/
|
|
64
|
-
export const schemaBodyJson = <S extends Schema.
|
|
64
|
+
export const schemaBodyJson = <S extends Schema.Constraint>(schema: S, options?: ParseOptions | undefined) => {
|
|
65
65
|
const decode = Schema.decodeEffect(Schema.toCodecJson(schema))
|
|
66
66
|
return <E>(
|
|
67
67
|
self: HttpIncomingMessage<E>
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
import { Clock } from "../../Clock.ts"
|
|
14
14
|
import * as Context from "../../Context.ts"
|
|
15
15
|
import * as Effect from "../../Effect.ts"
|
|
16
|
+
import * as Exit from "../../Exit.ts"
|
|
16
17
|
import { constant, constFalse } from "../../Function.ts"
|
|
17
18
|
import * as internalEffect from "../../internal/effect.ts"
|
|
18
19
|
import * as Layer from "../../Layer.ts"
|
|
@@ -22,7 +23,7 @@ import type { ReadonlyRecord } from "../../Record.ts"
|
|
|
22
23
|
import { TracerEnabled } from "../../References.ts"
|
|
23
24
|
import { ParentSpan } from "../../Tracer.ts"
|
|
24
25
|
import * as Headers from "./Headers.ts"
|
|
25
|
-
import { causeResponseStripped
|
|
26
|
+
import { causeResponseStripped } from "./HttpServerError.ts"
|
|
26
27
|
import { HttpServerRequest } from "./HttpServerRequest.ts"
|
|
27
28
|
import * as Request from "./HttpServerRequest.ts"
|
|
28
29
|
import * as Response from "./HttpServerResponse.ts"
|
|
@@ -218,13 +219,21 @@ export const tracer: <E, R>(
|
|
|
218
219
|
if (Option.isSome(request.remoteAddress)) {
|
|
219
220
|
span.attribute("client.address", request.remoteAddress.value)
|
|
220
221
|
}
|
|
221
|
-
|
|
222
|
+
let response: HttpServerResponse
|
|
223
|
+
let spanExit = exit
|
|
224
|
+
if (Exit.isFailure(exit)) {
|
|
225
|
+
const [failureResponse, cause] = causeResponseStripped(exit.cause)
|
|
226
|
+
response = failureResponse
|
|
227
|
+
spanExit = Option.isSome(cause) ? Exit.failCause(cause.value) : Exit.succeed(response)
|
|
228
|
+
} else {
|
|
229
|
+
response = exit.value
|
|
230
|
+
}
|
|
222
231
|
span.attribute("http.response.status_code", response.status)
|
|
223
232
|
const responseHeaders = Headers.redact(response.headers, redactedHeaderNames)
|
|
224
233
|
for (const name in responseHeaders) {
|
|
225
234
|
span.attribute(`http.response.header.${name}`, String(responseHeaders[name]))
|
|
226
235
|
}
|
|
227
|
-
span.end(endTime,
|
|
236
|
+
span.end(endTime, spanExit)
|
|
228
237
|
}, 0)
|
|
229
238
|
return undefined
|
|
230
239
|
}, true)
|
|
@@ -870,7 +870,7 @@ interface SseStreamEncoder {
|
|
|
870
870
|
readonly encodeCause: (input: unknown) => Effect.Effect<string, Schema.SchemaError, unknown>
|
|
871
871
|
}
|
|
872
872
|
|
|
873
|
-
function makeSseEncoder<Events extends Sse.EventCodec, Error extends Schema.
|
|
873
|
+
function makeSseEncoder<Events extends Sse.EventCodec, Error extends Schema.Constraint>(
|
|
874
874
|
streamSchema: HttpApiSchema.StreamSse<Events, Error, unknown>
|
|
875
875
|
): SseStreamEncoder {
|
|
876
876
|
const CauseSchema = Schema.toCodecJson(Schema.Cause(streamSchema.error, Schema.Defect()))
|
|
@@ -929,12 +929,16 @@ function makeSchemaError(issue: SchemaIssue.Issue): Schema.SchemaError {
|
|
|
929
929
|
const toResponseSuccessSchema = toResponseSchema(HttpApiSchema.getStatusSuccess)
|
|
930
930
|
const toResponseErrorSchema = toResponseSchema(HttpApiSchema.getStatusError)
|
|
931
931
|
|
|
932
|
-
function makeSuccessSchema(
|
|
932
|
+
function makeSuccessSchema(
|
|
933
|
+
endpoint: HttpApiEndpoint.AnyWithProps
|
|
934
|
+
): Schema.ConstraintEncoder<HttpServerResponse, unknown> {
|
|
933
935
|
const schemas = HttpApiEndpoint.getSuccessSchemas(endpoint).map(toResponseSuccessSchema)
|
|
934
936
|
return schemas.length === 1 ? schemas[0] : Schema.Union(schemas)
|
|
935
937
|
}
|
|
936
938
|
|
|
937
|
-
function makeErrorSchema(
|
|
939
|
+
function makeErrorSchema(
|
|
940
|
+
endpoint: HttpApiEndpoint.AnyWithProps
|
|
941
|
+
): Schema.ConstraintEncoder<HttpServerResponse, unknown> {
|
|
938
942
|
const schemas = HttpApiEndpoint.getErrorSchemas(endpoint).map(toResponseErrorSchema)
|
|
939
943
|
if (schemas.length === 0) return Schema.Never
|
|
940
944
|
return schemas.length === 1 ? schemas[0] : Schema.Union(schemas)
|
|
@@ -943,7 +947,7 @@ function makeErrorSchema(endpoint: HttpApiEndpoint.AnyWithProps): Schema.Encoder
|
|
|
943
947
|
function toResponseSchema(getStatus: (ast: SchemaAST.AST) => number) {
|
|
944
948
|
const cache = new WeakMap<SchemaAST.AST, Schema.Top>()
|
|
945
949
|
|
|
946
|
-
return (schema: Schema.
|
|
950
|
+
return (schema: Schema.Constraint): Schema.ConstraintEncoder<HttpServerResponse, unknown> => {
|
|
947
951
|
const cached = cache.get(schema.ast)
|
|
948
952
|
if (cached !== undefined) {
|
|
949
953
|
return cached as any
|
|
@@ -958,7 +962,7 @@ function toResponseSchema(getStatus: (ast: SchemaAST.AST) => number) {
|
|
|
958
962
|
|
|
959
963
|
function getResponseTransformation(
|
|
960
964
|
getStatus: (ast: SchemaAST.AST) => number,
|
|
961
|
-
schema: Schema.
|
|
965
|
+
schema: Schema.Constraint
|
|
962
966
|
): SchemaTransformation.Transformation<unknown, Response.HttpServerResponse> {
|
|
963
967
|
const ast = schema.ast
|
|
964
968
|
const encode = getResponseEncode(
|
|
@@ -80,7 +80,7 @@ type SuccessType<S> = S extends HttpApiSchema.StreamSse<
|
|
|
80
80
|
never
|
|
81
81
|
>
|
|
82
82
|
: S extends HttpApiSchema.StreamUint8Array ? Stream.Stream<Uint8Array, HttpClientError.HttpClientError, never>
|
|
83
|
-
: S extends Schema.
|
|
83
|
+
: S extends Schema.Constraint ? S["Type"]
|
|
84
84
|
: never
|
|
85
85
|
|
|
86
86
|
type SuccessDecodingServices<S> = S extends HttpApiSchema.StreamSse<
|
|
@@ -91,7 +91,7 @@ type SuccessDecodingServices<S> = S extends HttpApiSchema.StreamSse<
|
|
|
91
91
|
| _Events["DecodingServices"]
|
|
92
92
|
| _Error["DecodingServices"]
|
|
93
93
|
: S extends HttpApiSchema.StreamUint8Array ? never
|
|
94
|
-
: S extends Schema.
|
|
94
|
+
: S extends Schema.Constraint ? S["DecodingServices"]
|
|
95
95
|
: never
|
|
96
96
|
|
|
97
97
|
/**
|
|
@@ -636,10 +636,10 @@ export const urlBuilder = <Api extends HttpApi.Any>(api: Api, options?: {
|
|
|
636
636
|
const makeUrl = compilePath(endpoint.path)
|
|
637
637
|
const encodeParams = endpoint.params === undefined
|
|
638
638
|
? undefined
|
|
639
|
-
: Schema.encodeSync(endpoint.params as Schema.
|
|
639
|
+
: Schema.encodeSync(endpoint.params as Schema.Codec<unknown, unknown>)
|
|
640
640
|
const encodeQuery = endpoint.query === undefined
|
|
641
641
|
? undefined
|
|
642
|
-
: Schema.encodeSync(endpoint.query as Schema.
|
|
642
|
+
: Schema.encodeSync(endpoint.query as Schema.Codec<unknown, unknown>)
|
|
643
643
|
|
|
644
644
|
const endpointBuilder = (request?: {
|
|
645
645
|
readonly params?: unknown
|
|
@@ -687,7 +687,7 @@ const compilePath = (path: string) => {
|
|
|
687
687
|
}
|
|
688
688
|
}
|
|
689
689
|
|
|
690
|
-
function schemasToResponse(schemas: readonly [Schema.
|
|
690
|
+
function schemasToResponse(schemas: readonly [Schema.Constraint, ...Array<Schema.Constraint>]) {
|
|
691
691
|
const codec = toCodecArrayBuffer(schemas)
|
|
692
692
|
const decode = Schema.decodeEffect(codec)
|
|
693
693
|
return (response: HttpClientResponse.HttpClientResponse) => Effect.flatMap(response.arrayBuffer, decode)
|
|
@@ -795,7 +795,7 @@ function streamToResponse(streamSchema: HttpApiSchema.StreamSchema) {
|
|
|
795
795
|
|
|
796
796
|
function decodeSseStream(
|
|
797
797
|
stream: Stream.Stream<Uint8Array, HttpClientError.HttpClientError>,
|
|
798
|
-
declaration: HttpApiSchema.StreamSse<Sse.EventCodec, Schema.
|
|
798
|
+
declaration: HttpApiSchema.StreamSse<Sse.EventCodec, Schema.Constraint, unknown>
|
|
799
799
|
): Stream.Stream<unknown, unknown, unknown> {
|
|
800
800
|
const Event = Schema.Union([
|
|
801
801
|
declaration.events,
|
|
@@ -893,10 +893,10 @@ const UnknownFromArrayBuffer = StringFromArrayBuffer.pipe(Schema.decodeTo(
|
|
|
893
893
|
])
|
|
894
894
|
))
|
|
895
895
|
|
|
896
|
-
function toCodecArrayBuffer(schemas: readonly [Schema.
|
|
896
|
+
function toCodecArrayBuffer(schemas: readonly [Schema.Constraint, ...Array<Schema.Constraint>]): Schema.Top {
|
|
897
897
|
return Schema.Union(schemas.map(onSchema))
|
|
898
898
|
|
|
899
|
-
function onSchema(schema: Schema.
|
|
899
|
+
function onSchema(schema: Schema.Constraint) {
|
|
900
900
|
const encoding = HttpApiSchema.getResponseEncoding(schema.ast)
|
|
901
901
|
switch (encoding._tag) {
|
|
902
902
|
case "Json": {
|
|
@@ -938,7 +938,7 @@ const statusOrElse = (response: HttpClientResponse.HttpClientResponse) =>
|
|
|
938
938
|
const $HttpBody = Schema.declare(HttpBody.isHttpBody)
|
|
939
939
|
|
|
940
940
|
function getEncodePayloadSchema(
|
|
941
|
-
schemas: readonly [Schema.
|
|
941
|
+
schemas: readonly [Schema.Constraint, ...Array<Schema.Constraint>],
|
|
942
942
|
method: HttpMethod.HttpMethod
|
|
943
943
|
): Schema.Top {
|
|
944
944
|
return Schema.Union(schemas.map((s) => getEncodePayloadSchemaFromBody(s, method)))
|
|
@@ -947,7 +947,7 @@ function getEncodePayloadSchema(
|
|
|
947
947
|
const bodyFromPayloadCache = new WeakMap<SchemaAST.AST, Schema.Top>()
|
|
948
948
|
|
|
949
949
|
function getEncodePayloadSchemaFromBody(
|
|
950
|
-
schema: Schema.
|
|
950
|
+
schema: Schema.Constraint,
|
|
951
951
|
method: HttpMethod.HttpMethod
|
|
952
952
|
): Schema.Top {
|
|
953
953
|
const ast = schema.ast
|