viell-effect-schema-http 0.2.0 → 0.3.0
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/README.md +7 -6
- package/dist/concurrency/Interaction.d.ts +7 -1
- package/dist/concurrency/Interaction.d.ts.map +1 -1
- package/dist/concurrency/Interaction.js.map +1 -1
- package/dist/http/Body.d.ts +2 -0
- package/dist/http/Body.d.ts.map +1 -1
- package/dist/http/Body.js.map +1 -1
- package/dist/http/Operation.d.ts +6 -0
- package/dist/http/Operation.d.ts.map +1 -1
- package/dist/http/Operation.js.map +1 -1
- package/dist/http/Policy.d.ts +25 -0
- package/dist/http/Policy.d.ts.map +1 -1
- package/dist/http/Policy.js +25 -0
- package/dist/http/Policy.js.map +1 -1
- package/dist/http/Request.d.ts +58 -15
- package/dist/http/Request.d.ts.map +1 -1
- package/dist/http/Request.js +54 -19
- package/dist/http/Request.js.map +1 -1
- package/dist/http/Response.d.ts +11 -1
- package/dist/http/Response.d.ts.map +1 -1
- package/dist/http/Response.js.map +1 -1
- package/dist/http/UrlEncoding.d.ts +2 -1
- package/dist/http/UrlEncoding.d.ts.map +1 -1
- package/dist/http/UrlEncoding.js.map +1 -1
- package/dist/http/internal/excess.d.ts +44 -0
- package/dist/http/internal/excess.d.ts.map +1 -0
- package/dist/http/internal/excess.js +231 -0
- package/dist/http/internal/excess.js.map +1 -0
- package/dist/http/internal/input.d.ts +36 -5
- package/dist/http/internal/input.d.ts.map +1 -1
- package/dist/http/internal/input.js +72 -19
- package/dist/http/internal/input.js.map +1 -1
- package/dist/http/internal/shape.d.ts +19 -0
- package/dist/http/internal/shape.d.ts.map +1 -1
- package/dist/http/internal/shape.js +58 -12
- package/dist/http/internal/shape.js.map +1 -1
- package/package.json +3 -2
- package/src/concurrency/Interaction.ts +7 -1
- package/src/http/Body.ts +2 -0
- package/src/http/Operation.ts +6 -0
- package/src/http/Policy.ts +27 -0
- package/src/http/Request.ts +122 -23
- package/src/http/Response.ts +11 -1
- package/src/http/UrlEncoding.ts +2 -1
- package/src/http/internal/excess.ts +333 -0
- package/src/http/internal/input.ts +133 -28
- package/src/http/internal/shape.ts +92 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shape.js","sourceRoot":"","sources":["../../../src/http/internal/shape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAuBnD,MAAM,cAAc,GAAG,CAAC,GAAkB,EAAW,EAAE,CACrD,GAAG,CAAC,IAAI,KAAK,WAAW;IACxB,GAAG,CAAC,IAAI,KAAK,MAAM;IACnB,CAAC,GAAG,CAAC,IAAI,KAAK,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;AAE3D,MAAM,WAAW,GAAG,CAAC,GAAsB,EAAW,EAAE;IACtD,MAAM,MAAM,GAAG,GAAG,CAAC,kBAAkB,CAAC,GAAG,CACvC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,CAAU,CAClD,CAAC;IACF,OAAO;QACL,MAAM,EAAE,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC7D,IAAI,EAAE,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC;QACjD,IAAI,EAAE,GAAG,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC;QACpC,QAAQ,EAAE,IAAI,GAAG,CACf,MAAM;aACH,MAAM,CACL,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI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AI,MAAM;YACvB,CAAC,CAAC,CAAC,GAAI,MAAuC,EAAE,GAAG,KAAK,CAAC;YACzD,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;QAC/B,MAAM,OAAO,GAAG,CAAC,OAAgC,EAAE,EAAE,CACnD,MAAM,CAAC,OAAO,CACZ,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,EACtB,CAAC,OAAO,EAAE,EAAE,CACV,MAAM,CAAC,OAAO,EAAE,OAAO,CAAyC,CACnE,CAAC;QACJ,OAAO,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAC/D,OAAO,EAAE,CACV,CAAC;IACJ,CAAC,CAAC;IACF,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AAClC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "viell-effect-schema-http",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Consumer-owned HTTP contracts composed with Effect",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -81,8 +81,9 @@
|
|
|
81
81
|
"lint:mdrefine": "mdrefine lint",
|
|
82
82
|
"test": "vitest run",
|
|
83
83
|
"test:package": "node scripts/check-package.mjs",
|
|
84
|
-
"test:release": "node --test scripts/release.test.mjs scripts/registry.test.mjs",
|
|
84
|
+
"test:release": "node --test scripts/release.test.mjs scripts/registry.test.mjs scripts/live.test.mjs",
|
|
85
85
|
"release:prepare": "node scripts/prepare-release.mjs",
|
|
86
|
+
"check-live": "node scripts/check-live.mjs",
|
|
86
87
|
"test:watch": "vitest",
|
|
87
88
|
"docs:dev": "vitepress dev docs",
|
|
88
89
|
"docs:build": "vitepress build docs && node scripts/check-doc-links.mjs",
|
|
@@ -50,7 +50,13 @@ export interface Interaction<in I, out A, out E = never> {
|
|
|
50
50
|
export interface Options<I, A> {
|
|
51
51
|
/** Defaults to `Equal.equals`, which compares plain objects and arrays structurally. */
|
|
52
52
|
readonly equivalence?: Equivalence.Equivalence<I> | undefined;
|
|
53
|
-
/**
|
|
53
|
+
/**
|
|
54
|
+
* Whether to retain a success. Defaults to retaining; the result is returned either way.
|
|
55
|
+
*
|
|
56
|
+
* @remarks
|
|
57
|
+
* Rejecting a result also drops an earlier retained success for equal input, which it replaces.
|
|
58
|
+
* Another input's retained success stays.
|
|
59
|
+
*/
|
|
54
60
|
readonly retain?: ((value: A, input: I) => boolean) | undefined;
|
|
55
61
|
}
|
|
56
62
|
|
package/src/http/Body.ts
CHANGED
|
@@ -15,6 +15,7 @@ import * as Inputs from "./internal/input.js";
|
|
|
15
15
|
*/
|
|
16
16
|
export interface Encoder<in A, out E = never, out R = never>
|
|
17
17
|
extends Pipeable.Pipeable {
|
|
18
|
+
/** Turn a value into an outgoing body. */
|
|
18
19
|
readonly encode: (value: A) => Effect.Effect<HttpBody.HttpBody, E, R>;
|
|
19
20
|
}
|
|
20
21
|
|
|
@@ -27,6 +28,7 @@ export interface Encoder<in A, out E = never, out R = never>
|
|
|
27
28
|
*/
|
|
28
29
|
export interface Decoder<out A, out E = never, out R = never>
|
|
29
30
|
extends Pipeable.Pipeable {
|
|
31
|
+
/** Read a response's body into a value. */
|
|
30
32
|
readonly decode: (
|
|
31
33
|
response: HttpClientResponse.HttpClientResponse,
|
|
32
34
|
) => Effect.Effect<A, E, R>;
|
package/src/http/Operation.ts
CHANGED
|
@@ -42,6 +42,7 @@ export interface Operation<
|
|
|
42
42
|
out P = unknown,
|
|
43
43
|
>
|
|
44
44
|
extends Pipeable.Pipeable {
|
|
45
|
+
/** Describe one evaluation for this input. Nothing runs until the Effect does. */
|
|
45
46
|
readonly execute: (input: I) => Effect.Effect<A, E, R>;
|
|
46
47
|
/** What the operation was built from. A value from {@link fromEffect} has no parts. */
|
|
47
48
|
readonly parts?: P;
|
|
@@ -338,6 +339,7 @@ export const execute: {
|
|
|
338
339
|
* it was written for is what the response still produces, so neither is repeated here.
|
|
339
340
|
*/
|
|
340
341
|
export interface Step<out E = never, out R = never> {
|
|
342
|
+
/** Convert the operation's result. */
|
|
341
343
|
readonly run: (value: never) => Effect.Effect<unknown, E, R>;
|
|
342
344
|
}
|
|
343
345
|
|
|
@@ -356,9 +358,13 @@ export interface Step<out E = never, out R = never> {
|
|
|
356
358
|
* `execute` itself, and keep it.
|
|
357
359
|
*/
|
|
358
360
|
export interface Parts<out Q, in out S, out O, out T = undefined> {
|
|
361
|
+
/** The request it was built from. */
|
|
359
362
|
readonly request: Q;
|
|
363
|
+
/** The response contract it was built from. */
|
|
360
364
|
readonly response: S;
|
|
365
|
+
/** The options it was built with, or `undefined` for none. */
|
|
361
366
|
readonly options: O | undefined;
|
|
367
|
+
/** The recorded {@link Step}, or `undefined` for none. */
|
|
362
368
|
readonly step: T;
|
|
363
369
|
}
|
|
364
370
|
|
package/src/http/Policy.ts
CHANGED
|
@@ -59,6 +59,10 @@ const isTransientError = (error: unknown): boolean =>
|
|
|
59
59
|
* The statuses are 408, 429, 500, 502, 503 and 504, matching Effect's transient classification.
|
|
60
60
|
* A declared response with one of these statuses is eligible even when decoding succeeded.
|
|
61
61
|
* This does not check the method or whether repeating a remote action is safe.
|
|
62
|
+
*
|
|
63
|
+
* It reads what the client reports, and clients differ. A body cut off after its headers is a
|
|
64
|
+
* decoding failure through `fetch`, which is not eligible, and a transport failure through a client
|
|
65
|
+
* that reads the whole response first, which is.
|
|
62
66
|
*/
|
|
63
67
|
export const transient = (reason: Reason): boolean => {
|
|
64
68
|
if (
|
|
@@ -107,9 +111,32 @@ export const make = <Out, E = never, R = never>(
|
|
|
107
111
|
|
|
108
112
|
/**
|
|
109
113
|
* One attempt, with no retry and no library-imposed timeout.
|
|
114
|
+
*
|
|
115
|
+
* @remarks
|
|
116
|
+
* This is one attempt by the library, not one send. A client can send a request again by itself, as
|
|
117
|
+
* Chromium does, a POST included, when a reused connection ends with no response.
|
|
110
118
|
*/
|
|
111
119
|
export const none: Policy = make(Schedule.recurs(0));
|
|
112
120
|
|
|
121
|
+
/**
|
|
122
|
+
* One attempt with a timeout, and no retry.
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* ```ts
|
|
126
|
+
* import { Policy } from "viell-effect-schema-http";
|
|
127
|
+
* const oneQuickAttempt = Policy.timeout("2 seconds");
|
|
128
|
+
* // One attempt, given up after two seconds.
|
|
129
|
+
* ```
|
|
130
|
+
*
|
|
131
|
+
* @remarks
|
|
132
|
+
* This is {@link none} with the `attemptTimeout` of {@link make}, so a timed-out attempt ends the
|
|
133
|
+
* operation. The timeout covers client execution and decoding. It excludes request preparation and
|
|
134
|
+
* result mapping, so a slow base URL Effect or `Operation.mapEffect` step is outside it. Apply
|
|
135
|
+
* `Effect.timeout` around the operation for a limit on all of that.
|
|
136
|
+
*/
|
|
137
|
+
export const timeout = (duration: Duration.Input): Policy =>
|
|
138
|
+
make(Schedule.recurs(0), { attemptTimeout: duration });
|
|
139
|
+
|
|
113
140
|
/**
|
|
114
141
|
* Read the minimum retry delay requested by a response's `Retry-After` header.
|
|
115
142
|
*
|
package/src/http/Request.ts
CHANGED
|
@@ -16,8 +16,9 @@ import * as UrlEncoding from "./UrlEncoding.js";
|
|
|
16
16
|
* Request preparation failed before dispatch.
|
|
17
17
|
*
|
|
18
18
|
* @remarks
|
|
19
|
-
* Covers computed-field failures, URL-rendering
|
|
20
|
-
*
|
|
19
|
+
* Covers computed-field failures, URL-rendering and {@link mapBaseUrl} exceptions, a path value
|
|
20
|
+
* that does not encode to one value, and fields that do not fit the schemas bound to their group.
|
|
21
|
+
* Schema failures of the caller's input remain separate `SchemaError` values.
|
|
21
22
|
* A failed check of a group names its fields and leaves out their values, which may be credentials.
|
|
22
23
|
*/
|
|
23
24
|
export class InvalidRequest extends Data.TaggedError("InvalidRequest")<{
|
|
@@ -79,7 +80,17 @@ export type QueryFields = Readonly<
|
|
|
79
80
|
* A value that fits the decoded side is read as decoded. Under a schema whose two sides share a
|
|
80
81
|
* type, such as one from text to text, an already encoded value fits the decoded side, so it is
|
|
81
82
|
* encoded again, with no error. A mix is one level deep in the type. Renamed fields take their
|
|
82
|
-
* encoded names only when the whole value is on the encoded side
|
|
83
|
+
* encoded names only when the whole value is on the encoded side, and a value on that side stays
|
|
84
|
+
* there, even if it would fit the decoded side by losing them.
|
|
85
|
+
*
|
|
86
|
+
* Under a union, a member that keeps every field wins over an earlier one that would strip one, on
|
|
87
|
+
* both sides and at any depth. A field no member can keep beside the others is a `SchemaError` that
|
|
88
|
+
* names it, because the types allow that value and any member would lose a field the schema states.
|
|
89
|
+
* A key no member states is stripped, as a struct strips it, and so is a key the tag has ruled out.
|
|
90
|
+
* A key set to `undefined` is no field, and an accessor on a class is one, as it is to a struct. In a
|
|
91
|
+
* header or query group, a field a schema stacked with the union takes is not lost. Inside text given
|
|
92
|
+
* as text, a `Schema.Map`, a `Schema.Option` or a declaration with no struct behind it, the schema's
|
|
93
|
+
* own reading applies.
|
|
83
94
|
*/
|
|
84
95
|
export type Input<S extends Schema.Top> = Inputs.Input<S>;
|
|
85
96
|
|
|
@@ -121,7 +132,9 @@ export type InputOf<R> =
|
|
|
121
132
|
* This is a low-level extension type. Prefer {@link make} and the request combinators.
|
|
122
133
|
*/
|
|
123
134
|
export interface Declaration {
|
|
135
|
+
/** The HTTP method, passed on as written. */
|
|
124
136
|
readonly method: string;
|
|
137
|
+
/** The constructor's path or URL, without its query and fragment. */
|
|
125
138
|
readonly url: string;
|
|
126
139
|
/** The fragment written in the constructor, without its `#`. */
|
|
127
140
|
readonly hash: string | undefined;
|
|
@@ -130,7 +143,9 @@ export interface Declaration {
|
|
|
130
143
|
* and service types carry what that Effect needs. {@link mapBaseUrl} always leaves an Effect.
|
|
131
144
|
*/
|
|
132
145
|
readonly baseUrl: string | Effect.Effect<string, unknown, unknown>;
|
|
146
|
+
/** The raw header declarations, in order. */
|
|
133
147
|
readonly headers: Fields.Fields;
|
|
148
|
+
/** The raw query declarations, in order, including entries written in the constructor. */
|
|
134
149
|
readonly query: Fields.Fields<string | null>;
|
|
135
150
|
/** The constructor wrote a `?` with nothing after it, which holds no entries. */
|
|
136
151
|
readonly emptyQuery: boolean;
|
|
@@ -148,14 +163,24 @@ export interface Declaration {
|
|
|
148
163
|
|
|
149
164
|
/**
|
|
150
165
|
* What one header or query schema says about its group: the names it allows, whether it allows
|
|
151
|
-
* others,
|
|
166
|
+
* others, the names it always writes, and whether a union in it can lose a field.
|
|
152
167
|
*
|
|
153
168
|
* @remarks
|
|
154
|
-
* This is a low-level extension type, read from the schema's encoded side
|
|
155
|
-
* names are lowercase.
|
|
169
|
+
* This is a low-level extension type, read from the schema's encoded side and its fields' own
|
|
170
|
+
* encodings when it is bound. Header names are lowercase.
|
|
156
171
|
*/
|
|
157
172
|
export type Shape = Shapes.Shape;
|
|
158
173
|
|
|
174
|
+
/**
|
|
175
|
+
* What the schemas stacked on a group have told each other during preparation.
|
|
176
|
+
*
|
|
177
|
+
* @remarks
|
|
178
|
+
* This is a low-level extension type. A field a union would lose is not lost if another schema in
|
|
179
|
+
* the group took it, and `settled` is never an answer to that: a schema can allow a name it did not
|
|
180
|
+
* take.
|
|
181
|
+
*/
|
|
182
|
+
export type Taken = Shapes.Taken;
|
|
183
|
+
|
|
159
184
|
/** A part of a request that a binding can supply, and that {@link unbind} can clear. */
|
|
160
185
|
export type Group = "path" | "query" | "headers" | "body";
|
|
161
186
|
|
|
@@ -193,6 +218,14 @@ export interface Draft {
|
|
|
193
218
|
readonly removedHeaders: ReadonlySet<string>;
|
|
194
219
|
/** The groups a later {@link unbind} cleared, so their earlier bindings skip themselves. */
|
|
195
220
|
readonly unbound: ReadonlySet<Group>;
|
|
221
|
+
/**
|
|
222
|
+
* What the schemas stacked on the query group took from the caller, and which raw values are
|
|
223
|
+
* theirs to settle. `undefined` where the group needs no record, because no stacked schema can lose
|
|
224
|
+
* a field.
|
|
225
|
+
*/
|
|
226
|
+
readonly takenQuery: Taken | undefined;
|
|
227
|
+
/** The same for the header group, as in {@link takenQuery}. */
|
|
228
|
+
readonly takenHeaders: Taken | undefined;
|
|
196
229
|
}
|
|
197
230
|
|
|
198
231
|
/**
|
|
@@ -205,7 +238,9 @@ export interface Draft {
|
|
|
205
238
|
*/
|
|
206
239
|
export interface Request<in I, out E = never, out R = never>
|
|
207
240
|
extends Pipeable.Pipeable {
|
|
241
|
+
/** What preparation starts from. */
|
|
208
242
|
readonly declaration: Declaration;
|
|
243
|
+
/** Apply the request's bindings and transforms to a draft, with the call's input. */
|
|
209
244
|
readonly prepare: (input: I, draft: Draft) => Effect.Effect<Draft, E, R>;
|
|
210
245
|
}
|
|
211
246
|
|
|
@@ -725,10 +760,12 @@ const applyDeclaredBodyFields = (
|
|
|
725
760
|
* case.
|
|
726
761
|
*
|
|
727
762
|
* Under a union, the defaults and what the schema wrote have to fit one member together. A field
|
|
728
|
-
* that would be lost otherwise is an {@link InvalidRequest}, which names that field.
|
|
763
|
+
* that would be lost otherwise is an {@link InvalidRequest}, which names that field. The caller's
|
|
764
|
+
* own value is read before that, as {@link Input} describes.
|
|
729
765
|
*
|
|
730
|
-
* Header schemas stack: a second one adds its fields, and together they state the shape.
|
|
731
|
-
* {@link unbind} to
|
|
766
|
+
* Header schemas stack: a second one adds its fields, and together they state the shape. A field
|
|
767
|
+
* one of them takes stays with it, whatever a union beside it leaves out. Use {@link unbind} to
|
|
768
|
+
* start again.
|
|
732
769
|
*
|
|
733
770
|
* A field the schema produces wins over an automatic `Accept`, `Content-Type` or `Content-Length`,
|
|
734
771
|
* whether the schema is bound before or after the body, and so does a default. An optional field
|
|
@@ -743,8 +780,8 @@ export const headers = <
|
|
|
743
780
|
>(
|
|
744
781
|
contract: S,
|
|
745
782
|
) => {
|
|
746
|
-
const
|
|
747
|
-
const { shape, settle } = Shapes.bind(contract, foldHeader);
|
|
783
|
+
const read = Inputs.reader(contract, Schema.encodeEffect(contract));
|
|
784
|
+
const { shape, settle, taken } = Shapes.bind(contract, foldHeader);
|
|
748
785
|
return <I, E, R>(
|
|
749
786
|
self: Request<I, E, R>,
|
|
750
787
|
): Request<
|
|
@@ -763,12 +800,34 @@ export const headers = <
|
|
|
763
800
|
) {
|
|
764
801
|
if (draft.unbound.has("headers"))
|
|
765
802
|
return yield* self.prepare(input, draft);
|
|
766
|
-
const output = yield*
|
|
767
|
-
const
|
|
803
|
+
const { output, lost: lostFromInput } = yield* read(input.headers);
|
|
804
|
+
const own =
|
|
805
|
+
draft.takenHeaders && taken(input.headers, output, lostFromInput);
|
|
806
|
+
const prepared = yield* self.prepare(
|
|
807
|
+
input,
|
|
808
|
+
own === undefined
|
|
809
|
+
? draft
|
|
810
|
+
: {
|
|
811
|
+
...draft,
|
|
812
|
+
takenHeaders: Shapes.taking(draft.takenHeaders, own),
|
|
813
|
+
},
|
|
814
|
+
);
|
|
815
|
+
if (lostFromInput.length > 0)
|
|
816
|
+
yield* Inputs.refuseLost(
|
|
817
|
+
contract,
|
|
818
|
+
lostFromInput,
|
|
819
|
+
prepared.takenHeaders?.fields,
|
|
820
|
+
);
|
|
768
821
|
const names = Shapes.written(output, foldHeader);
|
|
822
|
+
const elsewhere = Shapes.others(
|
|
823
|
+
shape,
|
|
824
|
+
prepared.takenHeaders,
|
|
825
|
+
foldHeader,
|
|
826
|
+
);
|
|
769
827
|
const defaults = prepared.headerLines.filter(
|
|
770
828
|
([name]) =>
|
|
771
829
|
!names.has(foldHeader(name)) &&
|
|
830
|
+
!elsewhere.has(foldHeader(name)) &&
|
|
772
831
|
Shapes.allows(shape, foldHeader(name)),
|
|
773
832
|
);
|
|
774
833
|
const settled = yield* Effect.mapError(settle(output, defaults), () =>
|
|
@@ -831,7 +890,8 @@ export const headers = <
|
|
|
831
890
|
* of pairs allows any name.
|
|
832
891
|
*
|
|
833
892
|
* Under a union, the defaults and what the schema wrote have to fit one member together. A field
|
|
834
|
-
* that would be lost otherwise is an {@link InvalidRequest}, which names that field.
|
|
893
|
+
* that would be lost otherwise is an {@link InvalidRequest}, which names that field. The caller's
|
|
894
|
+
* own value is read before that, as {@link Input} describes.
|
|
835
895
|
*
|
|
836
896
|
* A field can encode to a `Date`, which is written as ISO text. Text under a field that encodes to
|
|
837
897
|
* a number, boolean, bigint or `Date` is read as one first, and a single value under a list field
|
|
@@ -839,8 +899,9 @@ export const headers = <
|
|
|
839
899
|
* schema. A `?` in a base URL or path output is text in the URL, not a field, so it is outside this
|
|
840
900
|
* check.
|
|
841
901
|
*
|
|
842
|
-
* Query schemas stack: a second one adds its fields, and together they state the shape.
|
|
843
|
-
*
|
|
902
|
+
* Query schemas stack: a second one adds its fields, and together they state the shape. A field one
|
|
903
|
+
* of them takes stays with it, whatever a union beside it leaves out. Use {@link unbind} to start
|
|
904
|
+
* again, and {@link mapInput} to supply a required field's value.
|
|
844
905
|
*/
|
|
845
906
|
export const query = <
|
|
846
907
|
S extends Schema.Top &
|
|
@@ -848,8 +909,8 @@ export const query = <
|
|
|
848
909
|
>(
|
|
849
910
|
contract: S,
|
|
850
911
|
) => {
|
|
851
|
-
const
|
|
852
|
-
const { shape, settle } = Shapes.bind(contract, foldQuery);
|
|
912
|
+
const read = Inputs.reader(contract, Schema.encodeEffect(contract));
|
|
913
|
+
const { shape, settle, taken } = Shapes.bind(contract, foldQuery);
|
|
853
914
|
return <I, E, R>(
|
|
854
915
|
self: Request<I, E, R>,
|
|
855
916
|
): Request<
|
|
@@ -868,15 +929,33 @@ export const query = <
|
|
|
868
929
|
) {
|
|
869
930
|
if (draft.unbound.has("query"))
|
|
870
931
|
return yield* self.prepare(input, draft);
|
|
871
|
-
const output = yield*
|
|
872
|
-
const
|
|
932
|
+
const { output, lost: lostFromInput } = yield* read(input.query);
|
|
933
|
+
const own =
|
|
934
|
+
draft.takenQuery && taken(input.query, output, lostFromInput);
|
|
935
|
+
const prepared = yield* self.prepare(
|
|
936
|
+
input,
|
|
937
|
+
own === undefined
|
|
938
|
+
? draft
|
|
939
|
+
: {
|
|
940
|
+
...draft,
|
|
941
|
+
takenQuery: Shapes.taking(draft.takenQuery, own),
|
|
942
|
+
},
|
|
943
|
+
);
|
|
944
|
+
if (lostFromInput.length > 0)
|
|
945
|
+
yield* Inputs.refuseLost(
|
|
946
|
+
contract,
|
|
947
|
+
lostFromInput,
|
|
948
|
+
prepared.takenQuery?.fields,
|
|
949
|
+
);
|
|
873
950
|
const names = Shapes.written(output, foldQuery);
|
|
951
|
+
const elsewhere = Shapes.others(shape, prepared.takenQuery, foldQuery);
|
|
874
952
|
const defaults = prepared.request.urlParams.params
|
|
875
953
|
.filter(
|
|
876
954
|
(param) =>
|
|
877
955
|
prepared.declaredQuery.has(param) &&
|
|
878
956
|
!isEmptySegment(prepared, param) &&
|
|
879
957
|
!names.has(param[0]) &&
|
|
958
|
+
!elsewhere.has(param[0]) &&
|
|
880
959
|
Shapes.allows(shape, param[0]),
|
|
881
960
|
)
|
|
882
961
|
.map((param) => [param[0], queryValue(prepared, param)] as const);
|
|
@@ -959,7 +1038,9 @@ export interface PathValue<
|
|
|
959
1038
|
K extends string = string,
|
|
960
1039
|
S extends PathSchema = PathSchema,
|
|
961
1040
|
> {
|
|
1041
|
+
/** The value's field under `path` in the input. */
|
|
962
1042
|
readonly name: K;
|
|
1043
|
+
/** What checks and encodes the value. */
|
|
963
1044
|
readonly schema: S;
|
|
964
1045
|
}
|
|
965
1046
|
|
|
@@ -1249,9 +1330,10 @@ export type Unbound<I, K extends Group> = K extends keyof I
|
|
|
1249
1330
|
* stay too. For `"path"`, the text of earlier {@link path} calls goes with their values, and
|
|
1250
1331
|
* {@link setPath} is what changes the constructor's path.
|
|
1251
1332
|
*
|
|
1252
|
-
* Other steps stay as well. A {@link mapEffect}
|
|
1253
|
-
*
|
|
1254
|
-
*
|
|
1333
|
+
* Other steps stay as well. A {@link mapEffect} finds the removed property `undefined`, and where
|
|
1334
|
+
* no other input is left the whole input is `undefined`, so reading the property there is a defect.
|
|
1335
|
+
* After {@link mapInput}, the binding is skipped, but the mapped input keeps whatever the mapping
|
|
1336
|
+
* requires. The request's error and service types keep what the removed bindings added.
|
|
1255
1337
|
*/
|
|
1256
1338
|
export const unbind =
|
|
1257
1339
|
<K extends Group>(group: K) =>
|
|
@@ -1326,12 +1408,27 @@ export const mapEffect =
|
|
|
1326
1408
|
* `request.url` holds the joined URL and its query. A fragment is in `request.hash`, as written.
|
|
1327
1409
|
*/
|
|
1328
1410
|
export interface Compiled {
|
|
1411
|
+
/** The native request, with its URL and query joined. */
|
|
1329
1412
|
readonly request: HttpClientRequest.HttpClientRequest;
|
|
1413
|
+
/** The header lines, in the spelling they were written with. */
|
|
1330
1414
|
readonly headerLines: Transport.Lines;
|
|
1331
1415
|
/** Lowercase header names the request removed, so the library adds no automatic value. */
|
|
1332
1416
|
readonly removedHeaders: ReadonlySet<string>;
|
|
1333
1417
|
}
|
|
1334
1418
|
|
|
1419
|
+
/** A record to start from where a schema in the group can lose a field to another one. */
|
|
1420
|
+
const takenRecord = (shapes: ReadonlyArray<Shape>): Taken | undefined =>
|
|
1421
|
+
shapes.length > 1 && shapes.some(({ chooses }) => chooses)
|
|
1422
|
+
? {
|
|
1423
|
+
fields: new Set(),
|
|
1424
|
+
settled: new Set(
|
|
1425
|
+
shapes.flatMap(({ chooses, names }) =>
|
|
1426
|
+
chooses ? [] : Array.from(names),
|
|
1427
|
+
),
|
|
1428
|
+
),
|
|
1429
|
+
}
|
|
1430
|
+
: undefined;
|
|
1431
|
+
|
|
1335
1432
|
const initialDraft = (declaration: Declaration): Draft => {
|
|
1336
1433
|
// Custom method strings pass through at runtime; the method union is narrower than the transport.
|
|
1337
1434
|
const native = HttpClientRequest.make(
|
|
@@ -1353,6 +1450,8 @@ const initialDraft = (declaration: Declaration): Draft => {
|
|
|
1353
1450
|
declaredQuery: new Set(),
|
|
1354
1451
|
removedHeaders: declaration.removedHeaders,
|
|
1355
1452
|
unbound: new Set(),
|
|
1453
|
+
takenQuery: takenRecord(declaration.queryShapes),
|
|
1454
|
+
takenHeaders: takenRecord(declaration.headerShapes),
|
|
1356
1455
|
},
|
|
1357
1456
|
declaration.query.flatMap((field) =>
|
|
1358
1457
|
Fields.resolve([field]).map(
|
package/src/http/Response.ts
CHANGED
|
@@ -13,11 +13,14 @@ import * as Transport from "./Transport.js";
|
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
15
|
* Contains no body. Header and cookie visibility depends on the HTTP provider and browser.
|
|
16
|
-
* `headerLines` is
|
|
16
|
+
* `headerLines` is `None` unless a provider attached its observed lines.
|
|
17
17
|
*/
|
|
18
18
|
export interface Metadata {
|
|
19
|
+
/** The HTTP status code. */
|
|
19
20
|
readonly status: number;
|
|
21
|
+
/** The normalized headers: lowercase names, with repeated lines joined. */
|
|
20
22
|
readonly headers: Headers.Headers;
|
|
23
|
+
/** The cookies the response set, as far as the provider shows them. */
|
|
21
24
|
readonly cookies: Cookies.Cookies;
|
|
22
25
|
/** Provider-observed lines, when the provider supplied them. Normalized headers are always available. */
|
|
23
26
|
readonly headerLines: Option.Option<Transport.Lines>;
|
|
@@ -63,6 +66,7 @@ export interface Response<
|
|
|
63
66
|
out C extends AnyCase = AnyCase,
|
|
64
67
|
>
|
|
65
68
|
extends Pipeable.Pipeable {
|
|
69
|
+
/** The decoder of the first case that matches, if any case does. */
|
|
66
70
|
readonly select: (metadata: Metadata) => Option.Option<Body.Decoder<A, E, R>>;
|
|
67
71
|
/** Media types contributed to the automatic `Accept` header, in declaration order. */
|
|
68
72
|
readonly accepts: ReadonlyArray<string>;
|
|
@@ -79,8 +83,11 @@ export interface Response<
|
|
|
79
83
|
* and can repeat.
|
|
80
84
|
*/
|
|
81
85
|
export interface Case<out K, out A, out E, out R> {
|
|
86
|
+
/** What addresses this case in {@link replace} and {@link remove}. */
|
|
82
87
|
readonly key: K;
|
|
88
|
+
/** Whether this case applies, from the metadata alone. */
|
|
83
89
|
readonly matches: (metadata: Metadata) => boolean;
|
|
90
|
+
/** What reads the body when this case is selected. */
|
|
84
91
|
readonly decoder: Body.Decoder<A, E, R>;
|
|
85
92
|
}
|
|
86
93
|
|
|
@@ -345,8 +352,11 @@ export const remove =
|
|
|
345
352
|
* Checking `_tag` narrows the value type when several tagged outcomes form a union.
|
|
346
353
|
*/
|
|
347
354
|
export interface Tagged<Tag extends string, A> {
|
|
355
|
+
/** The case name given to {@link tag}. */
|
|
348
356
|
readonly _tag: Tag;
|
|
357
|
+
/** The decoded value. */
|
|
349
358
|
readonly value: A;
|
|
359
|
+
/** The metadata of the response it came from. */
|
|
350
360
|
readonly metadata: Metadata;
|
|
351
361
|
}
|
|
352
362
|
|
package/src/http/UrlEncoding.ts
CHANGED
|
@@ -87,7 +87,8 @@ export interface Service {
|
|
|
87
87
|
* Combine the base origin/prefix and the request's rendered path or absolute URL.
|
|
88
88
|
*
|
|
89
89
|
* @remarks
|
|
90
|
-
* Both arrive without a fragment. A fragment in the result
|
|
90
|
+
* Both arrive without a fragment. A fragment in the result moves to the request's `hash`, so the
|
|
91
|
+
* query goes before it, unless a fragment from the request or the base wins.
|
|
91
92
|
*/
|
|
92
93
|
readonly join: (base: string, path: string) => string;
|
|
93
94
|
}
|