@distilled.cloud/core 1.0.0-rc.14 → 1.0.0-rc.16
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/lib/api.d.ts +118 -13
- package/lib/api.d.ts.map +1 -1
- package/lib/api.js +755 -147
- package/lib/api.js.map +1 -1
- package/lib/category.d.ts.map +1 -1
- package/lib/category.js +146 -146
- package/lib/category.js.map +1 -1
- package/lib/chunks.d.ts +3 -0
- package/lib/chunks.d.ts.map +1 -0
- package/lib/chunks.js +11 -0
- package/lib/chunks.js.map +1 -0
- package/lib/codegen/boolean-string-enums.js +36 -36
- package/lib/codegen/chunk.d.ts +7 -0
- package/lib/codegen/chunk.d.ts.map +1 -0
- package/lib/codegen/chunk.js +139 -0
- package/lib/codegen/chunk.js.map +1 -0
- package/lib/codegen/cli.d.ts.map +1 -1
- package/lib/codegen/cli.js +28 -14
- package/lib/codegen/cli.js.map +1 -1
- package/lib/codegen/datafy.d.ts +14 -0
- package/lib/codegen/datafy.d.ts.map +1 -0
- package/lib/codegen/datafy.js +853 -0
- package/lib/codegen/datafy.js.map +1 -0
- package/lib/codegen/dedupe.d.ts +5 -0
- package/lib/codegen/dedupe.d.ts.map +1 -0
- package/lib/codegen/dedupe.js +153 -0
- package/lib/codegen/dedupe.js.map +1 -0
- package/lib/codegen/emit.js +56 -56
- package/lib/codegen/format.js +18 -18
- package/lib/codegen/generated-at.js +29 -29
- package/lib/codegen/generator.d.ts.map +1 -1
- package/lib/codegen/generator.js +92 -84
- package/lib/codegen/generator.js.map +1 -1
- package/lib/codegen/graph.js +36 -36
- package/lib/codegen/graphql-client.d.ts +2 -0
- package/lib/codegen/graphql-client.d.ts.map +1 -1
- package/lib/codegen/graphql-client.js +55 -26
- package/lib/codegen/graphql-client.js.map +1 -1
- package/lib/codegen/graphql.js +113 -113
- package/lib/codegen/latin1.d.ts +3 -0
- package/lib/codegen/latin1.d.ts.map +1 -0
- package/lib/codegen/latin1.js +126 -0
- package/lib/codegen/latin1.js.map +1 -0
- package/lib/codegen/members.d.ts +7 -0
- package/lib/codegen/members.d.ts.map +1 -1
- package/lib/codegen/members.js +26 -19
- package/lib/codegen/members.js.map +1 -1
- package/lib/codegen/model-diff.js +6 -6
- package/lib/codegen/naming.js +19 -19
- package/lib/codegen/openapi-cli.js +15 -15
- package/lib/codegen/openapi.d.ts +17 -0
- package/lib/codegen/openapi.d.ts.map +1 -1
- package/lib/codegen/openapi.js +323 -169
- package/lib/codegen/openapi.js.map +1 -1
- package/lib/codegen/operations.js +14 -14
- package/lib/codegen/pagination.js +11 -11
- package/lib/codegen/patch-audit.js +57 -57
- package/lib/codegen/patches.js +79 -79
- package/lib/codegen/prelude.js +19 -19
- package/lib/codegen/privatize.d.ts +21 -0
- package/lib/codegen/privatize.d.ts.map +1 -0
- package/lib/codegen/privatize.js +176 -0
- package/lib/codegen/privatize.js.map +1 -0
- package/lib/codegen/proto.js +25 -25
- package/lib/codegen/pure.d.ts +6 -0
- package/lib/codegen/pure.d.ts.map +1 -0
- package/lib/codegen/pure.js +91 -0
- package/lib/codegen/pure.js.map +1 -0
- package/lib/codegen/rewrite-operation-ids.js +108 -108
- package/lib/codegen/spec-path.js +57 -57
- package/lib/codegen/table.d.ts +5 -0
- package/lib/codegen/table.d.ts.map +1 -0
- package/lib/codegen/table.js +249 -0
- package/lib/codegen/table.js.map +1 -0
- package/lib/config.d.ts +27 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +161 -0
- package/lib/config.js.map +1 -0
- package/lib/crypto.d.ts +76 -0
- package/lib/crypto.d.ts.map +1 -0
- package/lib/crypto.js +130 -0
- package/lib/crypto.js.map +1 -0
- package/lib/debug.d.ts +2 -0
- package/lib/debug.d.ts.map +1 -0
- package/lib/debug.js +8 -0
- package/lib/debug.js.map +1 -0
- package/lib/error-category.d.ts +1 -1
- package/lib/error-category.d.ts.map +1 -1
- package/lib/error-category.js +7 -6
- package/lib/error-category.js.map +1 -1
- package/lib/errors.d.ts +62 -62
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +117 -114
- package/lib/errors.js.map +1 -1
- package/lib/graphql.d.ts +31 -20
- package/lib/graphql.d.ts.map +1 -1
- package/lib/graphql.js +150 -119
- package/lib/graphql.js.map +1 -1
- package/lib/graphql.types.js +4 -3
- package/lib/graphql.types.js.map +1 -1
- package/lib/index.d.ts +3 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +15 -14
- package/lib/index.js.map +1 -1
- package/lib/json-patch.d.ts +2 -2
- package/lib/json-patch.js +28 -28
- package/lib/pagination.d.ts +9 -25
- package/lib/pagination.d.ts.map +1 -1
- package/lib/pagination.js +95 -90
- package/lib/pagination.js.map +1 -1
- package/lib/plain-values.d.ts +10 -0
- package/lib/plain-values.d.ts.map +1 -0
- package/lib/plain-values.js +40 -0
- package/lib/plain-values.js.map +1 -0
- package/lib/protocol-http.d.ts +50 -14
- package/lib/protocol-http.d.ts.map +1 -1
- package/lib/protocol-http.js +351 -178
- package/lib/protocol-http.js.map +1 -1
- package/lib/protocol-rest.d.ts +38 -25
- package/lib/protocol-rest.d.ts.map +1 -1
- package/lib/protocol-rest.js +238 -130
- package/lib/protocol-rest.js.map +1 -1
- package/lib/query.js +16 -16
- package/lib/response-validation-strict.d.ts +48 -0
- package/lib/response-validation-strict.d.ts.map +1 -0
- package/lib/response-validation-strict.js +284 -0
- package/lib/response-validation-strict.js.map +1 -0
- package/lib/response-validation.d.ts +43 -25
- package/lib/response-validation.d.ts.map +1 -1
- package/lib/response-validation.js +112 -70
- package/lib/response-validation.js.map +1 -1
- package/lib/retry-after.d.ts +3 -3
- package/lib/retry-after.js +49 -49
- package/lib/retry.d.ts +48 -29
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +142 -154
- package/lib/retry.js.map +1 -1
- package/lib/schema-lite-impl.d.ts +158 -0
- package/lib/schema-lite-impl.d.ts.map +1 -0
- package/lib/schema-lite-impl.js +341 -0
- package/lib/schema-lite-impl.js.map +1 -0
- package/lib/schema-lite-typed.d.ts +41 -0
- package/lib/schema-lite-typed.d.ts.map +1 -0
- package/lib/schema-lite-typed.js +27 -0
- package/lib/schema-lite-typed.js.map +1 -0
- package/lib/schema-lite.d.ts +40 -0
- package/lib/schema-lite.d.ts.map +1 -0
- package/lib/schema-lite.js +31 -0
- package/lib/schema-lite.js.map +1 -0
- package/lib/schema.d.ts +20 -6
- package/lib/schema.d.ts.map +1 -1
- package/lib/schema.js +202 -30
- package/lib/schema.js.map +1 -1
- package/lib/testing.d.ts +3 -2
- package/lib/testing.d.ts.map +1 -1
- package/lib/testing.js +22 -21
- package/lib/testing.js.map +1 -1
- package/lib/trait.d.ts +13 -13
- package/lib/trait.d.ts.map +1 -1
- package/lib/trait.js +80 -80
- package/lib/trait.js.map +1 -1
- package/lib/xml.d.ts +1 -1
- package/lib/xml.d.ts.map +1 -1
- package/lib/xml.js +38 -26
- package/lib/xml.js.map +1 -1
- package/package.json +9 -7
- package/src/api.ts +1079 -180
- package/src/category.ts +33 -33
- package/src/chunks.ts +30 -0
- package/src/codegen/chunk.ts +147 -0
- package/src/codegen/cli.ts +27 -1
- package/src/codegen/datafy.ts +874 -0
- package/src/codegen/dedupe.ts +173 -0
- package/src/codegen/generator.ts +10 -3
- package/src/codegen/graphql-client.ts +49 -15
- package/src/codegen/latin1.ts +131 -0
- package/src/codegen/members.ts +8 -0
- package/src/codegen/openapi.ts +194 -3
- package/src/codegen/privatize.ts +200 -0
- package/src/codegen/pure.ts +94 -0
- package/src/codegen/table.ts +254 -0
- package/src/config.ts +216 -0
- package/src/crypto.ts +202 -0
- package/src/debug.ts +8 -0
- package/src/error-category.ts +2 -1
- package/src/errors.ts +65 -56
- package/src/graphql.ts +109 -62
- package/src/graphql.types.ts +9 -7
- package/src/index.ts +3 -2
- package/src/json-patch.ts +2 -2
- package/src/pagination.ts +37 -18
- package/src/plain-values.ts +41 -0
- package/src/protocol-http.ts +378 -145
- package/src/protocol-rest.ts +337 -169
- package/src/response-validation-strict.ts +327 -0
- package/src/response-validation.ts +101 -50
- package/src/retry-after.ts +3 -3
- package/src/retry.ts +94 -93
- package/src/schema-lite-impl.ts +550 -0
- package/src/schema-lite-typed.ts +44 -0
- package/src/schema-lite.ts +44 -0
- package/src/schema.ts +258 -14
- package/src/testing.ts +4 -2
- package/src/trait.ts +36 -28
- package/src/xml.ts +31 -17
- package/lib/codegen/boolean-string-enums.test.d.ts +0 -2
- package/lib/codegen/boolean-string-enums.test.d.ts.map +0 -1
- package/lib/codegen/boolean-string-enums.test.js +0 -275
- package/lib/codegen/boolean-string-enums.test.js.map +0 -1
- package/lib/codegen/defer-naming.test.d.ts +0 -2
- package/lib/codegen/defer-naming.test.d.ts.map +0 -1
- package/lib/codegen/defer-naming.test.js +0 -105
- package/lib/codegen/defer-naming.test.js.map +0 -1
- package/lib/codegen/generated-at.test.d.ts +0 -2
- package/lib/codegen/generated-at.test.d.ts.map +0 -1
- package/lib/codegen/generated-at.test.js +0 -81
- package/lib/codegen/generated-at.test.js.map +0 -1
- package/lib/codegen/generator.test.d.ts +0 -2
- package/lib/codegen/generator.test.d.ts.map +0 -1
- package/lib/codegen/generator.test.js +0 -121
- package/lib/codegen/generator.test.js.map +0 -1
- package/lib/codegen/graphql-client.test.d.ts +0 -2
- package/lib/codegen/graphql-client.test.d.ts.map +0 -1
- package/lib/codegen/graphql-client.test.js +0 -171
- package/lib/codegen/graphql-client.test.js.map +0 -1
- package/lib/codegen/openapi-binary.test.d.ts +0 -2
- package/lib/codegen/openapi-binary.test.d.ts.map +0 -1
- package/lib/codegen/openapi-binary.test.js +0 -67
- package/lib/codegen/openapi-binary.test.js.map +0 -1
- package/lib/codegen/patch-audit.test.d.ts +0 -2
- package/lib/codegen/patch-audit.test.d.ts.map +0 -1
- package/lib/codegen/patch-audit.test.js +0 -141
- package/lib/codegen/patch-audit.test.js.map +0 -1
- package/lib/codegen/patches.test.d.ts +0 -2
- package/lib/codegen/patches.test.d.ts.map +0 -1
- package/lib/codegen/patches.test.js +0 -155
- package/lib/codegen/patches.test.js.map +0 -1
- package/lib/codegen/protocol-imports.test.d.ts +0 -2
- package/lib/codegen/protocol-imports.test.d.ts.map +0 -1
- package/lib/codegen/protocol-imports.test.js +0 -36
- package/lib/codegen/protocol-imports.test.js.map +0 -1
- package/lib/codegen/rewrite-operation-ids.test.d.ts +0 -2
- package/lib/codegen/rewrite-operation-ids.test.d.ts.map +0 -1
- package/lib/codegen/rewrite-operation-ids.test.js +0 -451
- package/lib/codegen/rewrite-operation-ids.test.js.map +0 -1
- package/lib/codegen/untagged-unions.test.d.ts +0 -2
- package/lib/codegen/untagged-unions.test.d.ts.map +0 -1
- package/lib/codegen/untagged-unions.test.js +0 -80
- package/lib/codegen/untagged-unions.test.js.map +0 -1
- package/lib/fixtures/xml/upstream-validator.json +0 -397
- package/lib/graphql.test.d.ts +0 -2
- package/lib/graphql.test.d.ts.map +0 -1
- package/lib/graphql.test.js +0 -151
- package/lib/graphql.test.js.map +0 -1
- package/lib/json-patch.test.d.ts +0 -2
- package/lib/json-patch.test.d.ts.map +0 -1
- package/lib/json-patch.test.js +0 -65
- package/lib/json-patch.test.js.map +0 -1
- package/lib/pagination.test.d.ts +0 -2
- package/lib/pagination.test.d.ts.map +0 -1
- package/lib/pagination.test.js +0 -131
- package/lib/pagination.test.js.map +0 -1
- package/lib/protocol-http.test.d.ts +0 -2
- package/lib/protocol-http.test.d.ts.map +0 -1
- package/lib/protocol-http.test.js +0 -228
- package/lib/protocol-http.test.js.map +0 -1
- package/lib/protocol-rest.test.d.ts +0 -2
- package/lib/protocol-rest.test.d.ts.map +0 -1
- package/lib/protocol-rest.test.js +0 -498
- package/lib/protocol-rest.test.js.map +0 -1
- package/lib/response-validation.test.d.ts +0 -2
- package/lib/response-validation.test.d.ts.map +0 -1
- package/lib/response-validation.test.js +0 -72
- package/lib/response-validation.test.js.map +0 -1
- package/lib/retry-after.test.d.ts +0 -2
- package/lib/retry-after.test.d.ts.map +0 -1
- package/lib/retry-after.test.js +0 -204
- package/lib/retry-after.test.js.map +0 -1
- package/lib/retry.test.d.ts +0 -2
- package/lib/retry.test.d.ts.map +0 -1
- package/lib/retry.test.js +0 -407
- package/lib/retry.test.js.map +0 -1
- package/lib/sdks.test.d.ts +0 -2
- package/lib/sdks.test.d.ts.map +0 -1
- package/lib/sdks.test.js +0 -76
- package/lib/sdks.test.js.map +0 -1
- package/lib/xml.test.d.ts +0 -2
- package/lib/xml.test.d.ts.map +0 -1
- package/lib/xml.test.js +0 -210
- package/lib/xml.test.js.map +0 -1
- package/src/codegen/boolean-string-enums.test.ts +0 -299
- package/src/codegen/defer-naming.test.ts +0 -113
- package/src/codegen/generated-at.test.ts +0 -89
- package/src/codegen/generator.test.ts +0 -137
- package/src/codegen/graphql-client.test.ts +0 -189
- package/src/codegen/openapi-binary.test.ts +0 -91
- package/src/codegen/patch-audit.test.ts +0 -160
- package/src/codegen/patches.test.ts +0 -188
- package/src/codegen/protocol-imports.test.ts +0 -39
- package/src/codegen/rewrite-operation-ids.test.ts +0 -472
- package/src/codegen/untagged-unions.test.ts +0 -85
- package/src/fixtures/xml/upstream-validator.json +0 -397
- package/src/graphql.test.ts +0 -198
- package/src/json-patch.test.ts +0 -77
- package/src/pagination.test.ts +0 -169
- package/src/protocol-http.test.ts +0 -276
- package/src/protocol-rest.test.ts +0 -703
- package/src/response-validation.test.ts +0 -89
- package/src/retry-after.test.ts +0 -267
- package/src/retry.test.ts +0 -566
- package/src/sdks.test.ts +0 -87
- package/src/xml.test.ts +0 -251
package/lib/retry-after.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
17
|
import * as Duration from "effect/Duration";
|
|
18
18
|
import { RETRYABLE_HTTP_STATUSES } from "./errors.js";
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
27
|
export const parseRetryAfter = (headers) => {
|
|
28
28
|
const raw = headers?.["retry-after"];
|
|
29
29
|
if (!raw)
|
|
@@ -51,18 +51,18 @@ export const parseRetryAfter = (headers) => {
|
|
|
51
51
|
}
|
|
52
52
|
return undefined;
|
|
53
53
|
};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
66
|
export const parseRatelimit = (headers) => {
|
|
67
67
|
const raw = headers?.["ratelimit"];
|
|
68
68
|
if (!raw)
|
|
@@ -90,20 +90,20 @@ export const parseRatelimit = (headers) => {
|
|
|
90
90
|
return undefined;
|
|
91
91
|
return Duration.seconds(reset);
|
|
92
92
|
};
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
97
|
export const parseServerRetryHint = (headers) => parseRetryAfter(headers) ?? parseRatelimit(headers);
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
107
|
export const parseRetryAfterForStatus = (status, headers) => {
|
|
108
108
|
if (!RETRYABLE_HTTP_STATUSES.has(status))
|
|
109
109
|
return undefined;
|
package/lib/retry.d.ts
CHANGED
|
@@ -1,11 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Retry Policy System
|
|
3
|
+
*
|
|
4
|
+
* Provides configurable retry policies for API operations.
|
|
5
|
+
* Each SDK creates its own `Retry` Context.Service tag (via
|
|
6
|
+
* `makeRetryService`) and threads it into `makeAPI({ retry: <SDK>.Retry })`
|
|
7
|
+
* so that callers can install a blanket retry policy at the layer level
|
|
8
|
+
* for that SDK without wrapping every call with `Effect.retry`.
|
|
9
|
+
*/
|
|
1
10
|
import * as Context from "effect/Context";
|
|
2
11
|
import * as Duration from "effect/Duration";
|
|
12
|
+
import * as Effect from "effect/Effect";
|
|
3
13
|
import * as Layer from "effect/Layer";
|
|
4
14
|
import * as Ref from "effect/Ref";
|
|
5
15
|
import * as Schedule from "effect/Schedule";
|
|
6
16
|
/**
|
|
7
17
|
* Retry policy options that match the Effect.retry contract.
|
|
8
18
|
*/
|
|
19
|
+
/**
|
|
20
|
+
* Capped exponential backoff, as plain data: the built-in policies use this
|
|
21
|
+
* instead of an Effect `Schedule`, so bundles do not carry the Schedule
|
|
22
|
+
* machinery unless a caller supplies a schedule of their own.
|
|
23
|
+
*
|
|
24
|
+
* Delay before retry `n` (0-based): `min(baseMs * factor^n, capMs)`; a
|
|
25
|
+
* server `retryAfter` hint replaces it when `serverHint` is set (capped by
|
|
26
|
+
* {@link ServerRetryHintCapMs}); otherwise throttling errors wait at least
|
|
27
|
+
* `minThrottleMs`. Then up to `jitterMs` of random jitter is added.
|
|
28
|
+
*/
|
|
29
|
+
export interface Backoff {
|
|
30
|
+
readonly baseMs: number;
|
|
31
|
+
readonly factor: number;
|
|
32
|
+
readonly capMs: number;
|
|
33
|
+
/** Stop after this many retries; unlimited when absent. */
|
|
34
|
+
readonly maxRetries?: number;
|
|
35
|
+
readonly jitterMs?: number;
|
|
36
|
+
readonly minThrottleMs?: number;
|
|
37
|
+
readonly serverHint?: boolean;
|
|
38
|
+
}
|
|
9
39
|
export interface Options {
|
|
10
40
|
/**
|
|
11
41
|
* Predicate to determine if an error should trigger a retry.
|
|
@@ -15,6 +45,8 @@ export interface Options {
|
|
|
15
45
|
* The schedule to use for retrying.
|
|
16
46
|
*/
|
|
17
47
|
readonly schedule?: Schedule.Schedule<unknown>;
|
|
48
|
+
/** Used when no `schedule` is given. */
|
|
49
|
+
readonly backoff?: Backoff;
|
|
18
50
|
}
|
|
19
51
|
/**
|
|
20
52
|
* A factory function that creates retry policy options with access to the last error ref.
|
|
@@ -74,11 +106,22 @@ export declare const serverRetryHintCapLayer: (capMs: number) => Layer.Layer<num
|
|
|
74
106
|
* Effective cap when neither {@link ServerRetryHintCapMs} nor
|
|
75
107
|
* `DISTILLED_SERVER_RETRY_HINT_CAP_MS` is set: {@link DEFAULT_SERVER_RETRY_HINT_CAP_MS}.
|
|
76
108
|
*
|
|
77
|
-
* Reads the `DISTILLED_SERVER_RETRY_HINT_CAP_MS` environment variable
|
|
78
|
-
*
|
|
79
|
-
*
|
|
109
|
+
* Reads the `DISTILLED_SERVER_RETRY_HINT_CAP_MS` environment variable (must
|
|
110
|
+
* be a non-negative finite number; invalid values fall back to the default).
|
|
111
|
+
* It reads `process.env` directly: Effect's `Config` would add about 5 KB
|
|
112
|
+
* gzip to every bundle for this one optional knob. Use
|
|
113
|
+
* {@link ServerRetryHintCapMs} to set the cap from code.
|
|
80
114
|
*/
|
|
81
115
|
export declare const readServerRetryHintCapMsFromEnv: () => number;
|
|
116
|
+
export declare const resolveServerRetryHintCapMs: () => Effect.Effect<number, never, never>;
|
|
117
|
+
/**
|
|
118
|
+
* Extract a server-provided retry hint (in milliseconds) from an error's
|
|
119
|
+
* optional `retryAfter` field, capped by the effective server-hint cap
|
|
120
|
+
* (see {@link ServerRetryHintCapMs} and {@link readServerRetryHintCapMsFromEnv}).
|
|
121
|
+
*
|
|
122
|
+
* Returns `undefined` when the error doesn't carry a hint.
|
|
123
|
+
*/
|
|
124
|
+
export declare const serverHintMillis: (error: unknown, capMs: number) => number | undefined;
|
|
82
125
|
/**
|
|
83
126
|
* Creates the default retry policy.
|
|
84
127
|
*
|
|
@@ -98,35 +141,11 @@ export declare const readServerRetryHintCapMsFromEnv: () => number;
|
|
|
98
141
|
* high request concurrency routinely outlast a short 5-attempt/3s policy
|
|
99
142
|
* while a genuinely broken credential still fails within seconds.
|
|
100
143
|
*/
|
|
144
|
+
/** The policy used when the context provides none. */
|
|
145
|
+
export declare const defaultOptions: Options;
|
|
101
146
|
export declare const makeDefault: Factory;
|
|
102
|
-
/**
|
|
103
|
-
* Factory for the throttling-only retry policy. Honors server hints when
|
|
104
|
-
* present so callers using `<SDK>.Retry.throttling` get correct backoff.
|
|
105
|
-
*/
|
|
106
147
|
export declare const throttlingFactory: Factory;
|
|
107
|
-
/**
|
|
108
|
-
* Retry options that retries all throttling errors indefinitely.
|
|
109
|
-
*
|
|
110
|
-
* Note: prefer {@link throttlingFactory} when you want server-hint honoring.
|
|
111
|
-
* This static `Options` form does not have access to `lastError` and so
|
|
112
|
-
* cannot read `error.retryAfter`.
|
|
113
|
-
*/
|
|
114
148
|
export declare const throttlingOptions: Options;
|
|
115
|
-
/**
|
|
116
|
-
* Factory for the transient retry policy. Honors server hints when present
|
|
117
|
-
* so callers using `<SDK>.Retry.transient` get correct backoff.
|
|
118
|
-
*/
|
|
119
149
|
export declare const transientFactory: Factory;
|
|
120
|
-
/**
|
|
121
|
-
* Retry options that retries all transient errors indefinitely.
|
|
122
|
-
*
|
|
123
|
-
* This includes:
|
|
124
|
-
* 1. Throttling errors
|
|
125
|
-
* 2. Server errors
|
|
126
|
-
* 3. Network errors
|
|
127
|
-
* 4. Locked errors (423)
|
|
128
|
-
*
|
|
129
|
-
* Note: prefer {@link transientFactory} when you want server-hint honoring.
|
|
130
|
-
*/
|
|
131
150
|
export declare const transientOptions: Options;
|
|
132
151
|
//# sourceMappingURL=retry.d.ts.map
|
package/lib/retry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,KAAK,GAAG,MAAM,YAAY,CAAC;AAClC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAO5C;;GAEG;AACH;;;;;;;;;GASG;AACH,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,2DAA2D;IAC3D,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE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AAMzE,eAAO,MAAM,iBAAiB,EAAE,OAG/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,OAAuC,CAAC;AAGvE,eAAO,MAAM,gBAAgB,EAAE,OAAiE,CAAC"}
|
package/lib/retry.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import * as Config from "effect/Config";
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
11
10
|
import * as Context from "effect/Context";
|
|
12
11
|
import * as Duration from "effect/Duration";
|
|
13
12
|
import * as Effect from "effect/Effect";
|
|
@@ -20,103 +19,116 @@ import { isThrottling, isTransientError } from "./category.js";
|
|
|
20
19
|
// ============================================================================
|
|
21
20
|
// Retry Service Factory
|
|
22
21
|
// ============================================================================
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
35
34
|
export const makeRetryService = (name) => Context.Service()(name);
|
|
36
35
|
// ============================================================================
|
|
37
36
|
// Retry Schedule Utilities
|
|
38
37
|
// ============================================================================
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
export const jittered = Schedule.addDelay(() => Effect.succeed(Duration.millis(Math.random() * 50)));
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
export const jittered = /*@__PURE__*/ Schedule.addDelay(() => Effect.succeed(Duration.millis(Math.random() * 50)));
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
47
46
|
export const capped = (max) => Schedule.modifyDelay(({ duration }) => Effect.succeed(Duration.isGreaterThan(duration, max) ? max : duration));
|
|
48
47
|
// ============================================================================
|
|
49
48
|
// Server Hint Helpers
|
|
50
49
|
// ============================================================================
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
56
55
|
export const DEFAULT_SERVER_RETRY_HINT_CAP_MS = 60_000;
|
|
57
56
|
const ENV_SERVER_RETRY_HINT_CAP_MS = "DISTILLED_SERVER_RETRY_HINT_CAP_MS";
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
export const ServerRetryHintCapMs = Context.Service("@distilled.cloud/core/ServerRetryHintCapMs");
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
export const ServerRetryHintCapMs = /*@__PURE__*/ Context.Service("@distilled.cloud/core/ServerRetryHintCapMs");
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
74
73
|
export const serverRetryHintCapLayer = (capMs) => Layer.succeed(ServerRetryHintCapMs, capMs);
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
export const readServerRetryHintCapMsFromEnv = () => parseCapMs(globalThis.process?.env?.[ENV_SERVER_RETRY_HINT_CAP_MS]);
|
|
85
|
+
const parseCapMs = (raw) => {
|
|
86
|
+
if (raw === undefined || raw === "")
|
|
77
87
|
return DEFAULT_SERVER_RETRY_HINT_CAP_MS;
|
|
78
88
|
const n = Number(raw);
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
* values fall back to the default).
|
|
90
|
-
*/
|
|
91
|
-
export const readServerRetryHintCapMsFromEnv = () => Effect.runSync(serverRetryHintCapMsConfig.pipe(Effect.orElseSucceed(() => DEFAULT_SERVER_RETRY_HINT_CAP_MS)));
|
|
92
|
-
const resolveServerRetryHintCapMs = () => Effect.gen(function* () {
|
|
89
|
+
return Number.isFinite(n) && n >= 0 ? Math.trunc(n) : DEFAULT_SERVER_RETRY_HINT_CAP_MS;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
const CONFIG_PROVIDER_KEY = "effect/ConfigProvider";
|
|
98
|
+
export const resolveServerRetryHintCapMs = () => Effect.gen(function* () {
|
|
93
99
|
const fromLayer = yield* Effect.serviceOption(ServerRetryHintCapMs);
|
|
94
100
|
if (Option.isSome(fromLayer)) {
|
|
95
101
|
const n = fromLayer.value;
|
|
96
102
|
if (Number.isFinite(n) && n >= 0)
|
|
97
103
|
return Math.trunc(n);
|
|
98
104
|
}
|
|
99
|
-
|
|
105
|
+
const provider = (yield* Effect.context()).mapUnsafe.get(CONFIG_PROVIDER_KEY);
|
|
106
|
+
if (!provider)
|
|
107
|
+
return readServerRetryHintCapMsFromEnv();
|
|
108
|
+
const node = yield* provider
|
|
109
|
+
.load([ENV_SERVER_RETRY_HINT_CAP_MS])
|
|
110
|
+
.pipe(Effect.orElseSucceed(() => undefined));
|
|
111
|
+
return parseCapMs(node?._tag === "Value" ? node.value : undefined);
|
|
100
112
|
});
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
const serverHintMillis = (error, capMs) => {
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
export const serverHintMillis = (error, capMs) => {
|
|
109
121
|
const hint = error?.retryAfter;
|
|
110
122
|
if (!Duration.isDuration(hint))
|
|
111
123
|
return undefined;
|
|
112
124
|
return Math.min(Duration.toMillis(hint), capMs);
|
|
113
125
|
};
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
120
132
|
const honorServerHint = (lastError, baseline) => Schedule.modifyDelay(Effect.fnUntraced(function* ({ duration }) {
|
|
121
133
|
const capMs = yield* resolveServerRetryHintCapMs();
|
|
122
134
|
const error = yield* Ref.get(lastError);
|
|
@@ -129,81 +141,57 @@ const honorServerHint = (lastError, baseline) => Schedule.modifyDelay(Effect.fnU
|
|
|
129
141
|
// ============================================================================
|
|
130
142
|
// Default Retry Policies
|
|
131
143
|
// ============================================================================
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
export const defaultOptions = {
|
|
152
165
|
while: (error) => isTransientError(error),
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
166
|
+
backoff: {
|
|
167
|
+
baseMs: 250,
|
|
168
|
+
factor: 2,
|
|
169
|
+
capMs: 5000,
|
|
170
|
+
maxRetries: 8,
|
|
171
|
+
jitterMs: 50,
|
|
172
|
+
minThrottleMs: 500,
|
|
173
|
+
serverHint: true,
|
|
174
|
+
},
|
|
175
|
+
};
|
|
176
|
+
export const makeDefault = () => defaultOptions;
|
|
177
|
+
const slowBackoff = {
|
|
178
|
+
baseMs: 1000,
|
|
179
|
+
factor: 2,
|
|
180
|
+
capMs: 5000,
|
|
181
|
+
jitterMs: 50,
|
|
182
|
+
serverHint: true,
|
|
183
|
+
};
|
|
184
|
+
const slowBackoffNoHint = { baseMs: 1000, factor: 2, capMs: 5000, jitterMs: 50 };
|
|
185
|
+
export const throttlingFactory = () => throttlingFactoryOptions;
|
|
186
|
+
const throttlingFactoryOptions = {
|
|
172
187
|
while: (error) => isThrottling(error),
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Retry options that retries all throttling errors indefinitely.
|
|
177
|
-
*
|
|
178
|
-
* Note: prefer {@link throttlingFactory} when you want server-hint honoring.
|
|
179
|
-
* This static `Options` form does not have access to `lastError` and so
|
|
180
|
-
* cannot read `error.retryAfter`.
|
|
181
|
-
*/
|
|
188
|
+
backoff: slowBackoff,
|
|
189
|
+
};
|
|
182
190
|
export const throttlingOptions = {
|
|
183
191
|
while: (error) => isThrottling(error),
|
|
184
|
-
|
|
185
|
-
};
|
|
186
|
-
/**
|
|
187
|
-
* Factory for the transient retry policy. Honors server hints when present
|
|
188
|
-
* so callers using `<SDK>.Retry.transient` get correct backoff.
|
|
189
|
-
*/
|
|
190
|
-
export const transientFactory = (lastError) => ({
|
|
191
|
-
while: isTransientError,
|
|
192
|
-
schedule: pipe(Schedule.exponential(1000, 2), capped(Duration.seconds(5)), honorServerHint(lastError), jittered),
|
|
193
|
-
});
|
|
194
|
-
/**
|
|
195
|
-
* Retry options that retries all transient errors indefinitely.
|
|
196
|
-
*
|
|
197
|
-
* This includes:
|
|
198
|
-
* 1. Throttling errors
|
|
199
|
-
* 2. Server errors
|
|
200
|
-
* 3. Network errors
|
|
201
|
-
* 4. Locked errors (423)
|
|
202
|
-
*
|
|
203
|
-
* Note: prefer {@link transientFactory} when you want server-hint honoring.
|
|
204
|
-
*/
|
|
205
|
-
export const transientOptions = {
|
|
206
|
-
while: isTransientError,
|
|
207
|
-
schedule: pipe(Schedule.exponential(1000, 2), capped(Duration.seconds(5)), jittered),
|
|
192
|
+
backoff: slowBackoffNoHint,
|
|
208
193
|
};
|
|
194
|
+
export const transientFactory = () => transientFactoryOptions;
|
|
195
|
+
const transientFactoryOptions = { while: isTransientError, backoff: slowBackoff };
|
|
196
|
+
export const transientOptions = { while: isTransientError, backoff: slowBackoffNoHint };
|
|
209
197
|
//# sourceMappingURL=retry.js.map
|
package/lib/retry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,O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