brass-runtime 1.19.0 → 1.19.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/dist/agent/cli/main.cjs +30 -30
- package/dist/agent/cli/main.js +2 -2
- package/dist/agent/cli/main.mjs +2 -2
- package/dist/agent/index.cjs +3 -3
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +2 -2
- package/dist/agent/index.mjs +2 -2
- package/dist/{chunk-GOEO763K.cjs → chunk-2XXQ3NVT.cjs} +19 -19
- package/dist/{chunk-5RVHSBJ6.mjs → chunk-5X3MPWTR.mjs} +275 -39
- package/dist/{chunk-2R3RVNS2.js → chunk-6AGAZD32.js} +6 -6
- package/dist/{chunk-BLXBZ6RE.mjs → chunk-6BNZS2A4.mjs} +1 -1
- package/dist/{chunk-EXBGIC66.js → chunk-6W5DC3TX.js} +1 -1
- package/dist/{chunk-MUMBUXU6.mjs → chunk-BFNBU47C.mjs} +22 -6
- package/dist/{chunk-JWFOWPMB.js → chunk-BHX4MD35.js} +5 -5
- package/dist/{chunk-OO7BGCC3.cjs → chunk-CXWJII2N.cjs} +13 -13
- package/dist/{chunk-Z2YIDHRI.cjs → chunk-ENMKEX3N.cjs} +5 -5
- package/dist/{chunk-RZGB3DXR.js → chunk-HKLZJ5UK.js} +275 -39
- package/dist/{chunk-HW2CLRJ3.mjs → chunk-IA6BDGXW.mjs} +6 -6
- package/dist/{chunk-MA74OYCI.cjs → chunk-IHY2EJTT.cjs} +6 -6
- package/dist/{chunk-AQQQFNYD.mjs → chunk-IWAQQDYE.mjs} +1 -1
- package/dist/{chunk-C3CWI42G.js → chunk-J4F5KC3U.js} +1 -1
- package/dist/{chunk-ZDZNV6NA.cjs → chunk-JKHBEWQA.cjs} +23 -7
- package/dist/{chunk-5UBJT4RW.mjs → chunk-JM7WMSRR.mjs} +3 -3
- package/dist/{chunk-YQWZ7FZX.cjs → chunk-JQCQWO47.cjs} +5 -5
- package/dist/{chunk-B2VXVNIS.js → chunk-LI7WUVJN.js} +1 -1
- package/dist/{chunk-FC5N5QHJ.js → chunk-NWONRWBT.js} +2 -2
- package/dist/{chunk-H4ZRUQZL.js → chunk-PG6CHG34.js} +3 -3
- package/dist/{chunk-NQW3YUFN.cjs → chunk-QAHW7S3Q.cjs} +18 -18
- package/dist/{chunk-GXOIUBKE.js → chunk-RZQK32C6.js} +2 -2
- package/dist/{chunk-EKLEDIVJ.mjs → chunk-S6KSHYAT.mjs} +2 -2
- package/dist/{chunk-URVS2OE2.mjs → chunk-SCHM2MDA.mjs} +2 -2
- package/dist/{chunk-A6EG5WRL.js → chunk-TAPB4NN5.js} +2 -2
- package/dist/{chunk-APQBU7TM.js → chunk-TN2P7RNK.js} +22 -6
- package/dist/{chunk-QBVS3UYN.cjs → chunk-TWEHIAUE.cjs} +54 -54
- package/dist/{chunk-7FZUTJM3.cjs → chunk-UOKXJQAI.cjs} +380 -144
- package/dist/{chunk-FYWWU3Z7.cjs → chunk-VXNWVAIG.cjs} +2 -2
- package/dist/{chunk-KAPZHDO4.mjs → chunk-WA65XP2P.mjs} +1 -1
- package/dist/{chunk-4PKBNG2H.js → chunk-XO3TDAJE.js} +1 -1
- package/dist/{chunk-KDXNWGPB.mjs → chunk-XRRC5BBM.mjs} +1 -1
- package/dist/{chunk-DV644N7P.cjs → chunk-ZJC3JZIE.cjs} +16 -16
- package/dist/{chunk-3NKXUX4T.mjs → chunk-ZXLETUGQ.mjs} +2 -2
- package/dist/{chunk-OX6MF7SZ.mjs → chunk-ZXXOXB3T.mjs} +5 -5
- package/dist/{chunk-6STX4PS3.cjs → chunk-ZZ2CMYJL.cjs} +13 -13
- package/dist/core/index.cjs +9 -7
- package/dist/core/index.d.ts +6 -6
- package/dist/core/index.js +8 -6
- package/dist/core/index.mjs +8 -6
- package/dist/{defaultClient-Cid0JoUR.d.ts → defaultClient-hyVSNzSJ.d.ts} +3 -3
- package/dist/{effect-DnGUuhw6.d.ts → effect-DbEMiMvv.d.ts} +8 -1
- package/dist/http/index.cjs +48 -48
- package/dist/http/index.d.ts +8 -8
- package/dist/http/index.js +6 -6
- package/dist/http/index.mjs +6 -6
- package/dist/http/testing.cjs +8 -8
- package/dist/http/testing.d.ts +4 -4
- package/dist/http/testing.js +4 -4
- package/dist/http/testing.mjs +4 -4
- package/dist/index.cjs +87 -85
- package/dist/index.d.ts +7 -7
- package/dist/index.js +9 -7
- package/dist/index.mjs +9 -7
- package/dist/{layer-D2LFcBVx.d.ts → layer-CsNGeVee.d.ts} +1 -1
- package/dist/observability/index.cjs +9 -9
- package/dist/observability/index.d.ts +7 -7
- package/dist/observability/index.js +8 -8
- package/dist/observability/index.mjs +8 -8
- package/dist/perf/cli.cjs +25 -25
- package/dist/perf/cli.js +10 -10
- package/dist/perf/cli.mjs +10 -10
- package/dist/perf/index.cjs +12 -12
- package/dist/perf/index.js +10 -10
- package/dist/perf/index.mjs +10 -10
- package/dist/{server-Bf1zNYZk.d.ts → server-BKKuzAW9.d.ts} +4 -4
- package/dist/{stream-I7bkvF7a.d.ts → stream-B8c_UKZq.d.ts} +1 -1
- package/dist/{tracer-DF83nLn6.d.ts → tracer-CS3yOXZx.d.ts} +2 -2
- package/dist/{tracing-CWV4gT0u.d.ts → tracing-DIAUf2x8.d.ts} +1 -1
- package/package.json +1 -1
package/dist/http/index.cjs
CHANGED
|
@@ -5,8 +5,8 @@ var _chunk7TKI527Dcjs = require('../chunk-7TKI527D.cjs');
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
require('../chunk-
|
|
8
|
+
var _chunkZJC3JZIEcjs = require('../chunk-ZJC3JZIE.cjs');
|
|
9
|
+
require('../chunk-VXNWVAIG.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -105,23 +105,23 @@ require('../chunk-FYWWU3Z7.cjs');
|
|
|
105
105
|
|
|
106
106
|
|
|
107
107
|
|
|
108
|
-
var
|
|
108
|
+
var _chunkUOKXJQAIcjs = require('../chunk-UOKXJQAI.cjs');
|
|
109
109
|
|
|
110
110
|
|
|
111
111
|
var _chunkL6VB5N7Qcjs = require('../chunk-L6VB5N7Q.cjs');
|
|
112
|
-
require('../chunk-
|
|
112
|
+
require('../chunk-CXWJII2N.cjs');
|
|
113
113
|
require('../chunk-SA6HUJVI.cjs');
|
|
114
114
|
|
|
115
115
|
|
|
116
116
|
|
|
117
117
|
|
|
118
118
|
|
|
119
|
-
var
|
|
119
|
+
var _chunkZZ2CMYJLcjs = require('../chunk-ZZ2CMYJL.cjs');
|
|
120
120
|
|
|
121
121
|
|
|
122
122
|
|
|
123
123
|
|
|
124
|
-
var
|
|
124
|
+
var _chunkJKHBEWQAcjs = require('../chunk-JKHBEWQA.cjs');
|
|
125
125
|
|
|
126
126
|
|
|
127
127
|
|
|
@@ -180,7 +180,7 @@ function runNodeRequest(context, config, httpAgent, httpsAgent) {
|
|
|
180
180
|
return;
|
|
181
181
|
}
|
|
182
182
|
if (signal.aborted) {
|
|
183
|
-
cb({ _tag: "Failure", cause: _chunkMVGUEJ5Zcjs.Cause.fail(
|
|
183
|
+
cb({ _tag: "Failure", cause: _chunkMVGUEJ5Zcjs.Cause.fail(_chunkUOKXJQAIcjs.abortErrorForSignal.call(void 0, signal)) });
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
186
|
const started = nowMs();
|
|
@@ -197,12 +197,12 @@ function runNodeRequest(context, config, httpAgent, httpsAgent) {
|
|
|
197
197
|
const fail = (error) => {
|
|
198
198
|
finish({
|
|
199
199
|
_tag: "Failure",
|
|
200
|
-
cause: _chunkMVGUEJ5Zcjs.Cause.fail(
|
|
200
|
+
cause: _chunkMVGUEJ5Zcjs.Cause.fail(_chunkUOKXJQAIcjs.normalizeHttpError.call(void 0, error, { signal }))
|
|
201
201
|
});
|
|
202
202
|
};
|
|
203
203
|
const options = {
|
|
204
204
|
method: request.method,
|
|
205
|
-
headers:
|
|
205
|
+
headers: _chunkUOKXJQAIcjs.Request.headers.get(request),
|
|
206
206
|
agent: isHttps ? httpsAgent : httpAgent,
|
|
207
207
|
signal
|
|
208
208
|
};
|
|
@@ -218,7 +218,7 @@ function runNodeRequest(context, config, httpAgent, httpsAgent) {
|
|
|
218
218
|
value: {
|
|
219
219
|
status: _nullishCoalesce(response.statusCode, () => ( 0)),
|
|
220
220
|
statusText: _nullishCoalesce(response.statusMessage, () => ( "")),
|
|
221
|
-
headers:
|
|
221
|
+
headers: _chunkUOKXJQAIcjs.normalizeHttpHeaders.call(void 0, response.headers),
|
|
222
222
|
bodyText: Buffer.concat(chunks, byteLength).toString("utf8"),
|
|
223
223
|
ms: Math.round(nowMs() - started)
|
|
224
224
|
}
|
|
@@ -228,7 +228,7 @@ function runNodeRequest(context, config, httpAgent, httpsAgent) {
|
|
|
228
228
|
});
|
|
229
229
|
abort = () => {
|
|
230
230
|
nodeRequest.destroy(isError(signal.reason) ? signal.reason : void 0);
|
|
231
|
-
finish({ _tag: "Failure", cause: _chunkMVGUEJ5Zcjs.Cause.fail(
|
|
231
|
+
finish({ _tag: "Failure", cause: _chunkMVGUEJ5Zcjs.Cause.fail(_chunkUOKXJQAIcjs.abortErrorForSignal.call(void 0, signal)) });
|
|
232
232
|
};
|
|
233
233
|
signal.addEventListener("abort", abort, { once: true });
|
|
234
234
|
nodeRequest.on("error", fail);
|
|
@@ -274,7 +274,7 @@ function makeNodeHttpProxyClient(config = {}) {
|
|
|
274
274
|
nodeTransport,
|
|
275
275
|
...clientConfig
|
|
276
276
|
} = config;
|
|
277
|
-
return
|
|
277
|
+
return _chunkUOKXJQAIcjs.makeDefaultHttpClient.call(void 0, {
|
|
278
278
|
...clientConfig,
|
|
279
279
|
preset,
|
|
280
280
|
transport: _nullishCoalesce(transport, () => ( makeNodeHttpTransport(nodeTransport)))
|
|
@@ -290,8 +290,8 @@ var resolveFinalUrl = (baseUrl, url) => {
|
|
|
290
290
|
}
|
|
291
291
|
};
|
|
292
292
|
var createHttpCore = (cfg = {}) => {
|
|
293
|
-
const wire =
|
|
294
|
-
const withPromise = (eff) => _chunkMVGUEJ5Zcjs.withAsyncPromise.call(void 0, (e, env) =>
|
|
293
|
+
const wire = _chunkUOKXJQAIcjs.makeHttp.call(void 0, cfg);
|
|
294
|
+
const withPromise = (eff) => _chunkMVGUEJ5Zcjs.withAsyncPromise.call(void 0, (e, env) => _chunkJKHBEWQAcjs.toPromise.call(void 0, e, env))(eff);
|
|
295
295
|
const requestRaw = (req) => wire(req);
|
|
296
296
|
const toResponse = (w, body) => ({
|
|
297
297
|
status: w.status,
|
|
@@ -300,7 +300,7 @@ var createHttpCore = (cfg = {}) => {
|
|
|
300
300
|
body
|
|
301
301
|
});
|
|
302
302
|
const decodeResponse = (w, validator, schemaName) => _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
303
|
-
|
|
303
|
+
_chunkUOKXJQAIcjs.decodeJsonBodyEffect.call(void 0, w.bodyText, validator, { schemaName }),
|
|
304
304
|
(body) => _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, toResponse(w, body))
|
|
305
305
|
);
|
|
306
306
|
return {
|
|
@@ -308,7 +308,7 @@ var createHttpCore = (cfg = {}) => {
|
|
|
308
308
|
wire,
|
|
309
309
|
withPromise,
|
|
310
310
|
requestRaw,
|
|
311
|
-
buildReq:
|
|
311
|
+
buildReq: _chunkUOKXJQAIcjs.buildHttpRequest,
|
|
312
312
|
toResponse,
|
|
313
313
|
decodeResponse
|
|
314
314
|
};
|
|
@@ -326,17 +326,17 @@ function httpClient(cfg = {}) {
|
|
|
326
326
|
};
|
|
327
327
|
const getJson = ((url, init) => {
|
|
328
328
|
const base = core.buildReq("GET", url, init);
|
|
329
|
-
const req =
|
|
329
|
+
const req = _chunkUOKXJQAIcjs.setHeaderIfMissing.call(void 0, "accept", "application/json")(base);
|
|
330
330
|
return core.withPromise(_chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0, requestRaw(req), (w) => core.decodeResponse(w, _optionalChain([init, 'optionalAccess', _ => _.schema]), _optionalChain([init, 'optionalAccess', _2 => _2.schemaName]))));
|
|
331
331
|
});
|
|
332
332
|
const postJson = ((url, bodyObj, init) => {
|
|
333
333
|
return core.withPromise(
|
|
334
334
|
_chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
335
|
-
|
|
335
|
+
_chunkUOKXJQAIcjs.encodeJsonBodyEffect.call(void 0, bodyObj, _optionalChain([init, 'optionalAccess', _3 => _3.bodySchema]), { schemaName: _optionalChain([init, 'optionalAccess', _4 => _4.bodySchemaName]) }),
|
|
336
336
|
(bodyText) => {
|
|
337
337
|
const base = core.buildReq("POST", url, init, bodyText);
|
|
338
|
-
const req =
|
|
339
|
-
|
|
338
|
+
const req = _chunkUOKXJQAIcjs.setHeaderIfMissing.call(void 0, "content-type", "application/json")(
|
|
339
|
+
_chunkUOKXJQAIcjs.setHeaderIfMissing.call(void 0, "accept", "application/json")(base)
|
|
340
340
|
);
|
|
341
341
|
return _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0, requestRaw(req), (w) => core.decodeResponse(w, _optionalChain([init, 'optionalAccess', _5 => _5.schema]), _optionalChain([init, 'optionalAccess', _6 => _6.schemaName])));
|
|
342
342
|
}
|
|
@@ -351,7 +351,7 @@ function httpClient(cfg = {}) {
|
|
|
351
351
|
getJson,
|
|
352
352
|
postJson,
|
|
353
353
|
with: (mw) => make(wire.with(mw)),
|
|
354
|
-
withRetry: (p) => make(wire.with(
|
|
354
|
+
withRetry: (p) => make(wire.with(_chunkUOKXJQAIcjs.withRetry.call(void 0, p))),
|
|
355
355
|
wire,
|
|
356
356
|
stats: () => wire.stats()
|
|
357
357
|
};
|
|
@@ -387,11 +387,11 @@ function httpClientWithMeta(cfg = {}) {
|
|
|
387
387
|
const startedAt = Date.now();
|
|
388
388
|
return core.withPromise(
|
|
389
389
|
_chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
390
|
-
|
|
390
|
+
_chunkUOKXJQAIcjs.encodeJsonBodyEffect.call(void 0, bodyObj, _optionalChain([init, 'optionalAccess', _7 => _7.bodySchema]), { schemaName: _optionalChain([init, 'optionalAccess', _8 => _8.bodySchemaName]) }),
|
|
391
391
|
(bodyText) => {
|
|
392
392
|
const base = core.buildReq("POST", url, init, bodyText);
|
|
393
|
-
const req =
|
|
394
|
-
|
|
393
|
+
const req = _chunkUOKXJQAIcjs.setHeaderIfMissing.call(void 0, "content-type", "application/json")(
|
|
394
|
+
_chunkUOKXJQAIcjs.setHeaderIfMissing.call(void 0, "accept", "application/json")(base)
|
|
395
395
|
);
|
|
396
396
|
return _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
397
397
|
core.requestRaw(req),
|
|
@@ -421,7 +421,7 @@ function httpClientWithMeta(cfg = {}) {
|
|
|
421
421
|
};
|
|
422
422
|
const getJson = (url, init) => {
|
|
423
423
|
const base = core.buildReq("GET", url, init);
|
|
424
|
-
const req =
|
|
424
|
+
const req = _chunkUOKXJQAIcjs.setHeaderIfMissing.call(void 0, "accept", "application/json")(base);
|
|
425
425
|
const startedAt = Date.now();
|
|
426
426
|
return core.withPromise(
|
|
427
427
|
_chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
@@ -453,13 +453,13 @@ function httpClientWithMeta(cfg = {}) {
|
|
|
453
453
|
};
|
|
454
454
|
}
|
|
455
455
|
function httpClientStream(cfg = {}) {
|
|
456
|
-
const wire =
|
|
456
|
+
const wire = _chunkUOKXJQAIcjs.makeHttpStream.call(void 0, cfg);
|
|
457
457
|
const make = (w) => {
|
|
458
|
-
const withPromise = (eff) => _chunkMVGUEJ5Zcjs.withAsyncPromise.call(void 0, (e, env) =>
|
|
458
|
+
const withPromise = (eff) => _chunkMVGUEJ5Zcjs.withAsyncPromise.call(void 0, (e, env) => _chunkJKHBEWQAcjs.toPromise.call(void 0, e, env))(eff);
|
|
459
459
|
const request = (req) => withPromise(w(req));
|
|
460
460
|
const getStream = (url, init) => {
|
|
461
461
|
const base = { method: "GET", url, init };
|
|
462
|
-
const req =
|
|
462
|
+
const req = _chunkUOKXJQAIcjs.setHeaderIfMissing.call(void 0, "accept", "*/*")(base);
|
|
463
463
|
return request(req);
|
|
464
464
|
};
|
|
465
465
|
return {
|
|
@@ -467,7 +467,7 @@ function httpClientStream(cfg = {}) {
|
|
|
467
467
|
getStream,
|
|
468
468
|
get: getStream,
|
|
469
469
|
with: (mw) => make(mw(w)),
|
|
470
|
-
withRetry: (p) => make(
|
|
470
|
+
withRetry: (p) => make(_chunkUOKXJQAIcjs.withRetryStream.call(void 0, p)(w)),
|
|
471
471
|
wire: w,
|
|
472
472
|
stats: () => w.stats()
|
|
473
473
|
};
|
|
@@ -565,7 +565,7 @@ function resolveAdaptiveLimiter(config, next) {
|
|
|
565
565
|
function resolveAdaptiveLimiterKey(config, limiter, req) {
|
|
566
566
|
if (!limiter) return void 0;
|
|
567
567
|
if (config.adaptiveLimiterKey) return config.adaptiveLimiterKey(req);
|
|
568
|
-
const poolKey =
|
|
568
|
+
const poolKey = _chunkUOKXJQAIcjs.getHttpRequestPolicy.call(void 0, req).poolKey;
|
|
569
569
|
if (poolKey) return poolKey;
|
|
570
570
|
if (limiter.keyResolver === "global") return "global";
|
|
571
571
|
try {
|
|
@@ -616,11 +616,11 @@ function withLogging(logger) {
|
|
|
616
616
|
logger({ phase: "request", req });
|
|
617
617
|
} catch (e5) {
|
|
618
618
|
}
|
|
619
|
-
const startedAt =
|
|
619
|
+
const startedAt = _chunkUOKXJQAIcjs.now.call(void 0, );
|
|
620
620
|
return _chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
621
621
|
next(req),
|
|
622
622
|
(error) => {
|
|
623
|
-
const durationMs = Math.round(
|
|
623
|
+
const durationMs = Math.round(_chunkUOKXJQAIcjs.now.call(void 0, ) - startedAt);
|
|
624
624
|
try {
|
|
625
625
|
logger({ phase: "error", req, error, durationMs });
|
|
626
626
|
} catch (e6) {
|
|
@@ -628,7 +628,7 @@ function withLogging(logger) {
|
|
|
628
628
|
return _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, error);
|
|
629
629
|
},
|
|
630
630
|
(res) => {
|
|
631
|
-
const durationMs = Math.round(
|
|
631
|
+
const durationMs = Math.round(_chunkUOKXJQAIcjs.now.call(void 0, ) - startedAt);
|
|
632
632
|
try {
|
|
633
633
|
logger({ phase: "response", req, res, durationMs });
|
|
634
634
|
} catch (e7) {
|
|
@@ -884,7 +884,7 @@ function prewarmConnections(config = {}) {
|
|
|
884
884
|
const fetchImpl = _nullishCoalesce(config.fetchImpl, () => ( globalThis.fetch));
|
|
885
885
|
const method = _nullishCoalesce(config.method, () => ( "HEAD"));
|
|
886
886
|
const targets = resolveTargets(config);
|
|
887
|
-
return
|
|
887
|
+
return _chunkJKHBEWQAcjs.fromPromiseAbortable.call(void 0,
|
|
888
888
|
async (signal) => {
|
|
889
889
|
if (typeof fetchImpl !== "function" || targets.length === 0) {
|
|
890
890
|
return { attempted: 0, warmed: 0, failed: 0, skipped: targets.length, attempts: [] };
|
|
@@ -1092,10 +1092,10 @@ function makeBuilder(config) {
|
|
|
1092
1092
|
prewarm: (layer = {}) => setLayer("prewarm", layer),
|
|
1093
1093
|
noPrewarm: () => setLayer("prewarm", false),
|
|
1094
1094
|
adaptiveLimiter: (layer = {}) => setLayer("adaptiveLimiter", layer),
|
|
1095
|
-
adaptiveLimiterPreset: (preset, overrides = {}) => setLayer("adaptiveLimiter",
|
|
1096
|
-
conservativeLimiter: (overrides = {}) => setLayer("adaptiveLimiter",
|
|
1097
|
-
balancedLimiter: (overrides = {}) => setLayer("adaptiveLimiter",
|
|
1098
|
-
aggressiveLimiter: (overrides = {}) => setLayer("adaptiveLimiter",
|
|
1095
|
+
adaptiveLimiterPreset: (preset, overrides = {}) => setLayer("adaptiveLimiter", _chunkUOKXJQAIcjs.makeAdaptiveLimiterConfig.call(void 0, preset, overrides)),
|
|
1096
|
+
conservativeLimiter: (overrides = {}) => setLayer("adaptiveLimiter", _chunkUOKXJQAIcjs.makeAdaptiveLimiterConfig.call(void 0, "conservative", overrides)),
|
|
1097
|
+
balancedLimiter: (overrides = {}) => setLayer("adaptiveLimiter", _chunkUOKXJQAIcjs.makeAdaptiveLimiterConfig.call(void 0, "balanced", overrides)),
|
|
1098
|
+
aggressiveLimiter: (overrides = {}) => setLayer("adaptiveLimiter", _chunkUOKXJQAIcjs.makeAdaptiveLimiterConfig.call(void 0, "aggressive", overrides)),
|
|
1099
1099
|
noAdaptiveLimiter: () => setLayer("adaptiveLimiter", false),
|
|
1100
1100
|
pool: (layer = {}) => setLayer("pool", layer),
|
|
1101
1101
|
noPool: () => setLayer("pool", false),
|
|
@@ -1104,8 +1104,8 @@ function makeBuilder(config) {
|
|
|
1104
1104
|
middleware,
|
|
1105
1105
|
use: middleware,
|
|
1106
1106
|
configure: (next) => makeBuilder(mergeConfig(config, next)),
|
|
1107
|
-
build: () =>
|
|
1108
|
-
buildWire: () =>
|
|
1107
|
+
build: () => _chunkUOKXJQAIcjs.makeDefaultHttpClient.call(void 0, freezeConfig(config)),
|
|
1108
|
+
buildWire: () => _chunkUOKXJQAIcjs.makeDefaultHttpClient.call(void 0, freezeConfig(config)).wire
|
|
1109
1109
|
});
|
|
1110
1110
|
}
|
|
1111
1111
|
function httpClientBuilder(config = {}) {
|
|
@@ -1173,7 +1173,7 @@ function makeRuntimeHealthRoute(options = {}) {
|
|
|
1173
1173
|
"GET",
|
|
1174
1174
|
path,
|
|
1175
1175
|
() => _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
1176
|
-
|
|
1176
|
+
_chunkZJC3JZIEcjs.makeRuntimeHealth.call(void 0, healthOptions),
|
|
1177
1177
|
(report) => _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, healthReportToServerResponse(report))
|
|
1178
1178
|
)
|
|
1179
1179
|
);
|
|
@@ -1196,7 +1196,7 @@ function withResponseHeader(name, value) {
|
|
|
1196
1196
|
);
|
|
1197
1197
|
}
|
|
1198
1198
|
function healthReportToServerResponse(report) {
|
|
1199
|
-
return healthHttpResponseToServerResponse(
|
|
1199
|
+
return healthHttpResponseToServerResponse(_chunkZJC3JZIEcjs.healthToHttpResponse.call(void 0, report));
|
|
1200
1200
|
}
|
|
1201
1201
|
function healthHttpResponseToServerResponse(response) {
|
|
1202
1202
|
return {
|
|
@@ -1259,7 +1259,7 @@ function makeNodeHttpServer(options) {
|
|
|
1259
1259
|
});
|
|
1260
1260
|
}
|
|
1261
1261
|
function nodeHttpServerResource(options) {
|
|
1262
|
-
return
|
|
1262
|
+
return _chunkZZ2CMYJLcjs.resource.call(void 0,
|
|
1263
1263
|
makeNodeHttpServer(options),
|
|
1264
1264
|
(handle) => _chunkMVGUEJ5Zcjs.asyncEffect.call(void 0, (_env, cb) => {
|
|
1265
1265
|
handle.close().then(() => cb({ _tag: "Success", value: void 0 })).catch(() => cb({ _tag: "Success", value: void 0 }));
|
|
@@ -1440,7 +1440,7 @@ async function handleNodeRequest(req, res, router, options) {
|
|
|
1440
1440
|
target: serverRequest.target,
|
|
1441
1441
|
headers: serverRequest.headers
|
|
1442
1442
|
};
|
|
1443
|
-
const response = options.observability ? (await
|
|
1443
|
+
const response = options.observability ? (await _chunkZJC3JZIEcjs.runObservedHttpServerEffect.call(void 0,
|
|
1444
1444
|
options.observability,
|
|
1445
1445
|
observedInput,
|
|
1446
1446
|
effect,
|
|
@@ -1450,7 +1450,7 @@ async function handleNodeRequest(req, res, router, options) {
|
|
|
1450
1450
|
},
|
|
1451
1451
|
options.env,
|
|
1452
1452
|
options.runtimeOptions
|
|
1453
|
-
)).value : await (_nullishCoalesce(options.runtime, () => ( new (0,
|
|
1453
|
+
)).value : await (_nullishCoalesce(options.runtime, () => ( new (0, _chunkJKHBEWQAcjs.Runtime)({
|
|
1454
1454
|
env: _nullishCoalesce(options.env, () => ( {})),
|
|
1455
1455
|
..._nullishCoalesce(options.runtimeOptions, () => ( {}))
|
|
1456
1456
|
})))).toPromise(effect);
|
|
@@ -1536,7 +1536,7 @@ function closeNodeServer(server, options) {
|
|
|
1536
1536
|
return new Promise((resolve, reject) => {
|
|
1537
1537
|
const startedAt = Date.now();
|
|
1538
1538
|
const schedule = _nullishCoalesce(options.shutdownPollSchedule, () => ( defaultShutdownPollSchedule(_nullishCoalesce(options.gracefulShutdownMs, () => ( 5e3)))));
|
|
1539
|
-
const driver =
|
|
1539
|
+
const driver = _chunkZZ2CMYJLcjs.makeScheduleDriver.call(void 0, schedule, { name: _nullishCoalesce(schedule.name, () => ( "http.server.shutdown")), startedAtMs: startedAt });
|
|
1540
1540
|
let finished = false;
|
|
1541
1541
|
const done = (error) => {
|
|
1542
1542
|
if (finished) return;
|
|
@@ -1570,7 +1570,7 @@ function closeNodeServer(server, options) {
|
|
|
1570
1570
|
}
|
|
1571
1571
|
function defaultShutdownPollSchedule(maxMs) {
|
|
1572
1572
|
const intervalMs = 25;
|
|
1573
|
-
return
|
|
1573
|
+
return _chunkZZ2CMYJLcjs.take.call(void 0, _chunkZZ2CMYJLcjs.fixed.call(void 0, intervalMs), Math.max(1, Math.ceil(Math.max(0, maxMs) / intervalMs)));
|
|
1574
1574
|
}
|
|
1575
1575
|
function matchRoute(routes, method, path) {
|
|
1576
1576
|
const requestedMethod = method.toUpperCase();
|
|
@@ -1843,4 +1843,4 @@ function escapeRegExp(value) {
|
|
|
1843
1843
|
|
|
1844
1844
|
|
|
1845
1845
|
|
|
1846
|
-
exports.AdaptiveLimiter =
|
|
1846
|
+
exports.AdaptiveLimiter = _chunkUOKXJQAIcjs.AdaptiveLimiter; exports.ConfigValidationError = _chunkKPOL2YEOcjs.ConfigValidationError; exports.DEFAULT_CACHE_RELEVANT_HEADERS = _chunkUOKXJQAIcjs.DEFAULT_CACHE_RELEVANT_HEADERS; exports.EmaComputer = _chunkUOKXJQAIcjs.EmaComputer; exports.HttpClientService = _chunkUOKXJQAIcjs.HttpClientService; exports.HttpConcurrencyPool = _chunkUOKXJQAIcjs.HttpConcurrencyPool; exports.HttpServer = HttpServer; exports.LRUCache = _chunkUOKXJQAIcjs.LRUCache; exports.LatencyWindow = _chunkUOKXJQAIcjs.LatencyWindow; exports.LifecycleStatsTracker = _chunkUOKXJQAIcjs.LifecycleStatsTracker; exports.PriorityQueue = _chunkUOKXJQAIcjs.PriorityQueue; exports.SEPARATOR = _chunkUOKXJQAIcjs.SEPARATOR; exports.SUPPORTED_ENCODINGS = _chunkUOKXJQAIcjs.SUPPORTED_ENCODINGS; exports.Schema = _chunkKPOL2YEOcjs.Schema; exports.SchemaValidationException = _chunkKPOL2YEOcjs.SchemaValidationException; exports.abortErrorForSignal = _chunkUOKXJQAIcjs.abortErrorForSignal; exports.adaptiveLimiterPresets = _chunkUOKXJQAIcjs.adaptiveLimiterPresets; exports.backoffDelayMs = _chunkUOKXJQAIcjs.backoffDelayMs; exports.clampPriority = _chunkUOKXJQAIcjs.clampPriority; exports.computeCacheKey = _chunkUOKXJQAIcjs.computeCacheKey; exports.computeGradient = _chunkUOKXJQAIcjs.computeGradient; exports.computeNewLimit = _chunkUOKXJQAIcjs.computeNewLimit; exports.decodeJsonBody = _chunkUOKXJQAIcjs.decodeJsonBody; exports.decodeJsonBodyEffect = _chunkUOKXJQAIcjs.decodeJsonBodyEffect; exports.decorate = _chunkUOKXJQAIcjs.decorate; exports.defaultHttpClientPreset = _chunkUOKXJQAIcjs.defaultHttpClientPreset; exports.defaultRetryOnError = _chunkUOKXJQAIcjs.defaultRetryOnError; exports.defaultRetryOnStatus = _chunkUOKXJQAIcjs.defaultRetryOnStatus; exports.defaultRetryableMethods = _chunkUOKXJQAIcjs.defaultRetryableMethods; exports.defineHttpPolicyPresets = _chunkUOKXJQAIcjs.defineHttpPolicyPresets; exports.detectPlatform = _chunkUOKXJQAIcjs.detectPlatform; exports.empty = empty; exports.encodeJsonBodyEffect = _chunkUOKXJQAIcjs.encodeJsonBodyEffect; exports.executeProbe = _chunkUOKXJQAIcjs.executeProbe; exports.formatConfigError = _chunkKPOL2YEOcjs.formatConfigError; exports.formatHttpError = _chunkUOKXJQAIcjs.formatHttpError; exports.formatIssues = _chunkKPOL2YEOcjs.formatIssues; exports.getHttpRequestPolicy = _chunkUOKXJQAIcjs.getHttpRequestPolicy; exports.headersOf = _chunkUOKXJQAIcjs.headersOf; exports.httpBuilder = httpBuilder; exports.httpClient = httpClient; exports.httpClientBuilder = httpClientBuilder; exports.httpClientStream = httpClientStream; exports.httpClientWithMeta = httpClientWithMeta; exports.httpErrorStatus = _chunkUOKXJQAIcjs.httpErrorStatus; exports.httpPolicy = _chunkUOKXJQAIcjs.httpPolicy; exports.httpRoute = httpRoute; exports.isAbortError = _chunkUOKXJQAIcjs.isAbortError; exports.isAbortHttpError = _chunkUOKXJQAIcjs.isAbortHttpError; exports.isCircuitBreakerOpen = _chunkUOKXJQAIcjs.isCircuitBreakerOpen; exports.isConfigValidationError = _chunkKPOL2YEOcjs.isConfigValidationError; exports.isExternalAbortError = _chunkUOKXJQAIcjs.isExternalAbortError; exports.isExternalTimeoutError = _chunkUOKXJQAIcjs.isExternalTimeoutError; exports.isFetchHttpError = _chunkUOKXJQAIcjs.isFetchHttpError; exports.isHttpError = _chunkUOKXJQAIcjs.isHttpError; exports.isKnownHttpError = _chunkUOKXJQAIcjs.isKnownHttpError; exports.isPromiseTransportDirect = _chunkUOKXJQAIcjs.isPromiseTransportDirect; exports.isRetryableHttpError = _chunkUOKXJQAIcjs.isRetryableHttpError; exports.isRetryableHttpStatus = _chunkUOKXJQAIcjs.isRetryableHttpStatus; exports.isSchema = _chunkKPOL2YEOcjs.isSchema; exports.isTaggedHttpError = _chunkUOKXJQAIcjs.isTaggedHttpError; exports.isTimeoutHttpError = _chunkUOKXJQAIcjs.isTimeoutHttpError; exports.isValidationError = _chunkUOKXJQAIcjs.isValidationError; exports.json = json; exports.linkAbortSignals = _chunkUOKXJQAIcjs.linkAbortSignals; exports.makeAdaptiveLimiterConfig = _chunkUOKXJQAIcjs.makeAdaptiveLimiterConfig; exports.makeBudgetSemaphore = _chunkUOKXJQAIcjs.makeBudgetSemaphore; exports.makeCompressionMiddleware = _chunkUOKXJQAIcjs.makeCompressionMiddleware; exports.makeConnectionStateMap = _chunkUOKXJQAIcjs.makeConnectionStateMap; exports.makeDefaultHttpClient = _chunkUOKXJQAIcjs.makeDefaultHttpClient; exports.makeDefaultHttpClientLayer = _chunkUOKXJQAIcjs.makeDefaultHttpClientLayer; exports.makeFetchStreamTransport = _chunkUOKXJQAIcjs.makeFetchStreamTransport; exports.makeFetchTransport = _chunkUOKXJQAIcjs.makeFetchTransport; exports.makeHttp = _chunkUOKXJQAIcjs.makeHttp; exports.makeHttpClient = _chunkUOKXJQAIcjs.makeHttpClient; exports.makeHttpClientBuilder = makeHttpClientBuilder; exports.makeHttpRouter = makeHttpRouter; exports.makeHttpServerResource = makeHttpServerResource; exports.makeHttpStream = _chunkUOKXJQAIcjs.makeHttpStream; exports.makeJsonParseValidationError = _chunkUOKXJQAIcjs.makeJsonParseValidationError; exports.makeLifecycleClient = _chunkUOKXJQAIcjs.makeLifecycleClient; exports.makeNodeHttpProxyClient = makeNodeHttpProxyClient; exports.makeNodeHttpServer = makeNodeHttpServer; exports.makeNodeHttpServerResource = makeNodeHttpServerResource; exports.makeNodeHttpTransport = makeNodeHttpTransport; exports.makePrewarmManager = _chunkUOKXJQAIcjs.makePrewarmManager; exports.makePromiseHttpTransport = _chunkUOKXJQAIcjs.makePromiseHttpTransport; exports.makeRequestCompressionMiddleware = _chunkUOKXJQAIcjs.makeRequestCompressionMiddleware; exports.makeResponseCompressionMiddleware = _chunkUOKXJQAIcjs.makeResponseCompressionMiddleware; exports.makeRuntimeHealthRoute = makeRuntimeHealthRoute; exports.makeRuntimeReadinessRoute = makeRuntimeReadinessRoute; exports.makeSchemaIssue = _chunkKPOL2YEOcjs.makeSchemaIssue; exports.matchHttpError = _chunkUOKXJQAIcjs.matchHttpError; exports.nodeHttpServerResource = nodeHttpServerResource; exports.noopSignal = _chunkUOKXJQAIcjs.noopSignal; exports.normalizeHeadersInit = _chunkUOKXJQAIcjs.normalizeHeadersInit; exports.normalizeHttpError = _chunkUOKXJQAIcjs.normalizeHttpError; exports.normalizeHttpHeaders = _chunkUOKXJQAIcjs.normalizeHttpHeaders; exports.normalizeRetryBudget = _chunkUOKXJQAIcjs.normalizeRetryBudget; exports.parseCacheKey = _chunkUOKXJQAIcjs.parseCacheKey; exports.parseConfig = _chunkKPOL2YEOcjs.parseConfig; exports.prewarmConnections = prewarmConnections; exports.prewarmHttpConnections = prewarmHttpConnections; exports.promiseHttpTransport = _chunkUOKXJQAIcjs.promiseHttpTransport; exports.resolveConfig = _chunkUOKXJQAIcjs.resolveConfig; exports.resolveHttpPoolKey = _chunkUOKXJQAIcjs.resolveHttpPoolKey; exports.resolveHttpRequestPolicyPresets = _chunkUOKXJQAIcjs.resolveHttpRequestPolicyPresets; exports.retryAfterMs = _chunkUOKXJQAIcjs.retryAfterMs; exports.route = route; exports.runtimeHealthRoute = runtimeHealthRoute; exports.runtimeReadinessRoute = runtimeReadinessRoute; exports.s = _chunkKPOL2YEOcjs.s; exports.schema = _chunkKPOL2YEOcjs.schema; exports.text = text; exports.toHttpError = _chunkUOKXJQAIcjs.toHttpError; exports.validateConfig = _chunkUOKXJQAIcjs.validateConfig; exports.validateFetchAvailable = _chunkUOKXJQAIcjs.validateFetchAvailable; exports.validateOrigin = _chunkUOKXJQAIcjs.validateOrigin; exports.validateValue = _chunkKPOL2YEOcjs.validateValue; exports.validatedJson = _chunkUOKXJQAIcjs.validatedJson; exports.validatedJsonResponse = _chunkUOKXJQAIcjs.validatedJsonResponse; exports.withAuth = withAuth; exports.withBatch = _chunkUOKXJQAIcjs.withBatch; exports.withCache = _chunkUOKXJQAIcjs.withCache; exports.withCircuitBreaker = withCircuitBreaker; exports.withConnectionPrewarming = withConnectionPrewarming; exports.withDedup = _chunkUOKXJQAIcjs.withDedup; exports.withHttpPolicyPresets = _chunkUOKXJQAIcjs.withHttpPolicyPresets; exports.withHttpRequestPolicy = _chunkUOKXJQAIcjs.withHttpRequestPolicy; exports.withLogging = withLogging; exports.withMiddleware = _chunkUOKXJQAIcjs.withMiddleware; exports.withPriority = _chunkUOKXJQAIcjs.withPriority; exports.withRequestBatching = withRequestBatching; exports.withResponseHeader = withResponseHeader; exports.withResponseTransform = withResponseTransform; exports.withRetry = _chunkUOKXJQAIcjs.withRetry; exports.withRetryStream = _chunkUOKXJQAIcjs.withRetryStream; exports.withTracing = withTracing;
|
package/dist/http/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { C as CompressionConfig, f as CompressionMiddlewareResult, R as RequestCompressionConfig, g as RequestCompressionMiddlewareResult, e as DefaultHttpClientConfig, h as HttpTransport, D as DefaultHttpClient, i as AdaptiveLimiter, H as HttpRequest, d as HttpMiddleware, L as LifecycleClientConfig, j as LifecycleClient, b as HttpWireResponse, c as HttpError, k as LifecycleEvent, l as HttpClientStats, m as LifecycleEventType, n as LifecycleStats, P as PrewarmResult, o as PrewarmStatusSnapshot, p as PrewarmConfig, q as HttpClientFn, r as PrewarmOriginState, s as HttpMethod, t as DefaultHttpClientPreset, u as DedupConfig$1, B as BatchConfig, v as CacheConfig$1, w as PriorityConfig$1, x as RetryPolicy, y as PrewarmLifecycleConfig, z as AdaptiveLimiterConfig, E as AdaptiveLimiterPreset, F as HttpPoolConfig } from '../defaultClient-
|
|
2
|
-
export { G as AdaptiveAcquireOptions, I as AdaptiveBaselineStrategy, J as AdaptiveHeadroomContext, K as AdaptiveHeadroomMode, M as AdaptiveHeadroomStrategy, N as AdaptiveLease, O as AdaptiveLimiterDiagnostics, Q as AdaptiveLimiterKeySnapshot, A as AdaptiveLimiterStats, S as AdaptiveQueueLoadShedding, T as AdaptiveQueueStrategy, U as AdaptiveReleaseInfo, V as BatchFunction, W as CachePolicyResult, X as CompressionStats, Y as DecompressResult, Z as Decompressor, _ as DefaultGetJson, $ as DefaultHttpClientFeatures, a0 as DefaultPostJson, a1 as Dx, a2 as HttpBody, a as HttpClient, a3 as HttpClientStream, a4 as HttpClientStreamFn, a5 as HttpConcurrencyPool, a6 as HttpErrorHandlers, a7 as HttpInit, a8 as HttpJsonInit, a9 as HttpMeta, aa as HttpPolicyPreset, ab as HttpPolicyPresets, ac as HttpPoolKeyResolver, ad as HttpPoolKeyStats, ae as HttpPoolLease, af as HttpPoolStats, ag as HttpPostJsonBodyInit, ah as HttpPostJsonInit, ai as HttpPostJsonSchemaBodyInit, aj as HttpRequestPolicy, ak as HttpRequestPolicyRef, al as HttpRequestRetryOverride, am as HttpResponse, an as HttpResponseWithMeta, ao as HttpRetryScheduleInput, ap as HttpStreamTransport, aq as HttpTransportContext, ar as HttpTransportTiming, as as HttpWireResponseStream, at as HttpWireWithMeta, au as JsonDecodeResult, av as KnownHttpError, aw as KnownHttpErrorTag, ax as LifecycleRequestOptions, ay as LimitChangeEvent, az as MakeHttpConfig, aA as PerRequestRetryOverride, aB as PrewarmEvent, aC as PrewarmEventType, aD as PrewarmOriginStatus, aE as PrewarmResultStatus, aF as PromiseHttpTransportBodyBuilder, aG as PromiseHttpTransportBodySelector, aH as PromiseHttpTransportConfig, aI as PromiseHttpTransportConfigWithSignal, aJ as PromiseHttpTransportFluentResponseBuilder, aK as PromiseHttpTransportRequestConfigBuilder, aL as PromiseHttpTransportRequestConfigContext, aM as PromiseHttpTransportRequestConfigMapper, aN as PromiseHttpTransportResponse, aO as PromiseHttpTransportResponseInfo, aP as PromiseHttpTransportResponseInfoMapper, aQ as PromiseHttpTransportStartBuilder, aR as RequestCompressionStats, aS as ResolveHttpRequestPolicyOptions, aT as ResolvedConfig, aU as RetryEvent, aV as RetryScheduleInput, aW as RetryableHttpErrorOptions, aX as SUPPORTED_ENCODINGS, aY as SupportedEncoding, aZ as ToHttpErrorOptions, a_ as ValidationError, a$ as abortErrorForSignal, b0 as adaptiveLimiterPresets, b1 as backoffDelayMs, b2 as decodeJsonBody, b3 as decodeJsonBodyEffect, b4 as decorate, b5 as defaultHttpClientPreset, b6 as defaultRetryOnError, b7 as defaultRetryOnStatus, b8 as defaultRetryableMethods, b9 as defineHttpPolicyPresets, ba as encodeJsonBodyEffect, bb as formatHttpError, bc as getHttpRequestPolicy, bd as headersOf, be as httpClient, bf as httpClientStream, bg as httpClientWithMeta, bh as httpErrorStatus, bi as httpPolicy, bj as isAbortError, bk as isAbortHttpError, bl as isCircuitBreakerOpen, bm as isExternalAbortError, bn as isExternalTimeoutError, bo as isFetchHttpError, bp as isHttpError, bq as isKnownHttpError, br as isPromiseTransportDirect, bs as isRetryableHttpError, bt as isRetryableHttpStatus, bu as isTaggedHttpError, bv as isTimeoutHttpError, bw as isValidationError, bx as linkAbortSignals, by as makeAdaptiveLimiterConfig, bz as makeDefaultHttpClient, bA as makeFetchStreamTransport, bB as makeFetchTransport, bC as makeHttp, bD as makeHttpStream, bE as makeJsonParseValidationError, bF as makePromiseHttpTransport, bG as matchHttpError, bH as noopSignal, bI as normalizeHeadersInit, bJ as normalizeHttpError, bK as normalizeHttpHeaders, bL as normalizeRetryBudget, bM as promiseHttpTransport, bN as resolveConfig, bO as resolveHttpPoolKey, bP as resolveHttpRequestPolicyPresets, bQ as retryAfterMs, bR as toHttpError, bS as validateConfig, bT as validatedJson, bU as validatedJsonResponse, bV as withBatch, bW as withHttpPolicyPresets, bX as withHttpRequestPolicy, bY as withMiddleware, bZ as withRetry, b_ as withRetryStream } from '../defaultClient-
|
|
1
|
+
import { C as CompressionConfig, f as CompressionMiddlewareResult, R as RequestCompressionConfig, g as RequestCompressionMiddlewareResult, e as DefaultHttpClientConfig, h as HttpTransport, D as DefaultHttpClient, i as AdaptiveLimiter, H as HttpRequest, d as HttpMiddleware, L as LifecycleClientConfig, j as LifecycleClient, b as HttpWireResponse, c as HttpError, k as LifecycleEvent, l as HttpClientStats, m as LifecycleEventType, n as LifecycleStats, P as PrewarmResult, o as PrewarmStatusSnapshot, p as PrewarmConfig, q as HttpClientFn, r as PrewarmOriginState, s as HttpMethod, t as DefaultHttpClientPreset, u as DedupConfig$1, B as BatchConfig, v as CacheConfig$1, w as PriorityConfig$1, x as RetryPolicy, y as PrewarmLifecycleConfig, z as AdaptiveLimiterConfig, E as AdaptiveLimiterPreset, F as HttpPoolConfig } from '../defaultClient-hyVSNzSJ.js';
|
|
2
|
+
export { G as AdaptiveAcquireOptions, I as AdaptiveBaselineStrategy, J as AdaptiveHeadroomContext, K as AdaptiveHeadroomMode, M as AdaptiveHeadroomStrategy, N as AdaptiveLease, O as AdaptiveLimiterDiagnostics, Q as AdaptiveLimiterKeySnapshot, A as AdaptiveLimiterStats, S as AdaptiveQueueLoadShedding, T as AdaptiveQueueStrategy, U as AdaptiveReleaseInfo, V as BatchFunction, W as CachePolicyResult, X as CompressionStats, Y as DecompressResult, Z as Decompressor, _ as DefaultGetJson, $ as DefaultHttpClientFeatures, a0 as DefaultPostJson, a1 as Dx, a2 as HttpBody, a as HttpClient, a3 as HttpClientStream, a4 as HttpClientStreamFn, a5 as HttpConcurrencyPool, a6 as HttpErrorHandlers, a7 as HttpInit, a8 as HttpJsonInit, a9 as HttpMeta, aa as HttpPolicyPreset, ab as HttpPolicyPresets, ac as HttpPoolKeyResolver, ad as HttpPoolKeyStats, ae as HttpPoolLease, af as HttpPoolStats, ag as HttpPostJsonBodyInit, ah as HttpPostJsonInit, ai as HttpPostJsonSchemaBodyInit, aj as HttpRequestPolicy, ak as HttpRequestPolicyRef, al as HttpRequestRetryOverride, am as HttpResponse, an as HttpResponseWithMeta, ao as HttpRetryScheduleInput, ap as HttpStreamTransport, aq as HttpTransportContext, ar as HttpTransportTiming, as as HttpWireResponseStream, at as HttpWireWithMeta, au as JsonDecodeResult, av as KnownHttpError, aw as KnownHttpErrorTag, ax as LifecycleRequestOptions, ay as LimitChangeEvent, az as MakeHttpConfig, aA as PerRequestRetryOverride, aB as PrewarmEvent, aC as PrewarmEventType, aD as PrewarmOriginStatus, aE as PrewarmResultStatus, aF as PromiseHttpTransportBodyBuilder, aG as PromiseHttpTransportBodySelector, aH as PromiseHttpTransportConfig, aI as PromiseHttpTransportConfigWithSignal, aJ as PromiseHttpTransportFluentResponseBuilder, aK as PromiseHttpTransportRequestConfigBuilder, aL as PromiseHttpTransportRequestConfigContext, aM as PromiseHttpTransportRequestConfigMapper, aN as PromiseHttpTransportResponse, aO as PromiseHttpTransportResponseInfo, aP as PromiseHttpTransportResponseInfoMapper, aQ as PromiseHttpTransportStartBuilder, aR as RequestCompressionStats, aS as ResolveHttpRequestPolicyOptions, aT as ResolvedConfig, aU as RetryEvent, aV as RetryScheduleInput, aW as RetryableHttpErrorOptions, aX as SUPPORTED_ENCODINGS, aY as SupportedEncoding, aZ as ToHttpErrorOptions, a_ as ValidationError, a$ as abortErrorForSignal, b0 as adaptiveLimiterPresets, b1 as backoffDelayMs, b2 as decodeJsonBody, b3 as decodeJsonBodyEffect, b4 as decorate, b5 as defaultHttpClientPreset, b6 as defaultRetryOnError, b7 as defaultRetryOnStatus, b8 as defaultRetryableMethods, b9 as defineHttpPolicyPresets, ba as encodeJsonBodyEffect, bb as formatHttpError, bc as getHttpRequestPolicy, bd as headersOf, be as httpClient, bf as httpClientStream, bg as httpClientWithMeta, bh as httpErrorStatus, bi as httpPolicy, bj as isAbortError, bk as isAbortHttpError, bl as isCircuitBreakerOpen, bm as isExternalAbortError, bn as isExternalTimeoutError, bo as isFetchHttpError, bp as isHttpError, bq as isKnownHttpError, br as isPromiseTransportDirect, bs as isRetryableHttpError, bt as isRetryableHttpStatus, bu as isTaggedHttpError, bv as isTimeoutHttpError, bw as isValidationError, bx as linkAbortSignals, by as makeAdaptiveLimiterConfig, bz as makeDefaultHttpClient, bA as makeFetchStreamTransport, bB as makeFetchTransport, bC as makeHttp, bD as makeHttpStream, bE as makeJsonParseValidationError, bF as makePromiseHttpTransport, bG as matchHttpError, bH as noopSignal, bI as normalizeHeadersInit, bJ as normalizeHttpError, bK as normalizeHttpHeaders, bL as normalizeRetryBudget, bM as promiseHttpTransport, bN as resolveConfig, bO as resolveHttpPoolKey, bP as resolveHttpRequestPolicyPresets, bQ as retryAfterMs, bR as toHttpError, bS as validateConfig, bT as validatedJson, bU as validatedJsonResponse, bV as withBatch, bW as withHttpPolicyPresets, bX as withHttpRequestPolicy, bY as withMiddleware, bZ as withRetry, b_ as withRetryStream } from '../defaultClient-hyVSNzSJ.js';
|
|
3
3
|
import { Agent, Server } from 'node:http';
|
|
4
4
|
import { Agent as Agent$1 } from 'node:https';
|
|
5
|
-
import { c as CircuitBreakerConfig, l as Schedule, a as LayerContext, S as ServiceTag, L as Layer } from '../layer-
|
|
6
|
-
import { T as Tracer, R as Resource } from '../tracing-
|
|
7
|
-
import { A as Async, b as Runtime, a as RuntimeOptions } from '../effect-
|
|
5
|
+
import { c as CircuitBreakerConfig, l as Schedule, a as LayerContext, S as ServiceTag, L as Layer } from '../layer-CsNGeVee.js';
|
|
6
|
+
import { T as Tracer, R as Resource } from '../tracing-DIAUf2x8.js';
|
|
7
|
+
import { A as Async, b as Runtime, a as RuntimeOptions } from '../effect-DbEMiMvv.js';
|
|
8
8
|
import { AddressInfo } from 'node:net';
|
|
9
|
-
import { O as Observability, q as HttpServerObservabilityOptions, $ as RuntimeHealthOptions } from '../server-
|
|
9
|
+
import { O as Observability, q as HttpServerObservabilityOptions, $ as RuntimeHealthOptions } from '../server-BKKuzAW9.js';
|
|
10
10
|
import { AnyJsonSchemaLike, InferJsonSchema } from '../schema/index.js';
|
|
11
11
|
export { AnySchema, ConfigValidationError, InferObject, InferSchema, JsonSchemaLike, JsonValidator, JsonValidatorResult, NumberSchemaOptions, ObjectSchemaOptions, Schema, SchemaIssue, SchemaPathPart, SchemaResult, SchemaShape, SchemaValidationException, StringSchemaOptions, formatConfigError, formatIssues, isConfigValidationError, isSchema, makeSchemaIssue, parseConfig, s, schema, validateValue } from '../schema/index.js';
|
|
12
|
-
import '../stream-
|
|
13
|
-
import '../tracer-
|
|
12
|
+
import '../stream-B8c_UKZq.js';
|
|
13
|
+
import '../tracer-CS3yOXZx.js';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* A fixed-size circular buffer that stores latency samples and supports
|
package/dist/http/index.js
CHANGED
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
healthToHttpResponse,
|
|
6
6
|
makeRuntimeHealth,
|
|
7
7
|
runObservedHttpServerEffect
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-TAPB4NN5.js";
|
|
9
|
+
import "../chunk-LI7WUVJN.js";
|
|
10
10
|
import {
|
|
11
11
|
AdaptiveLimiter,
|
|
12
12
|
DEFAULT_CACHE_RELEVANT_HEADERS,
|
|
@@ -105,23 +105,23 @@ import {
|
|
|
105
105
|
withPriority,
|
|
106
106
|
withRetry,
|
|
107
107
|
withRetryStream
|
|
108
|
-
} from "../chunk-
|
|
108
|
+
} from "../chunk-HKLZJ5UK.js";
|
|
109
109
|
import {
|
|
110
110
|
registerHttpEffect
|
|
111
111
|
} from "../chunk-TRM4JUZQ.js";
|
|
112
|
-
import "../chunk-
|
|
112
|
+
import "../chunk-XO3TDAJE.js";
|
|
113
113
|
import "../chunk-UCUBNWM2.js";
|
|
114
114
|
import {
|
|
115
115
|
fixed,
|
|
116
116
|
makeScheduleDriver,
|
|
117
117
|
resource,
|
|
118
118
|
take
|
|
119
|
-
} from "../chunk-
|
|
119
|
+
} from "../chunk-6W5DC3TX.js";
|
|
120
120
|
import {
|
|
121
121
|
Runtime,
|
|
122
122
|
fromPromiseAbortable,
|
|
123
123
|
toPromise
|
|
124
|
-
} from "../chunk-
|
|
124
|
+
} from "../chunk-TN2P7RNK.js";
|
|
125
125
|
import {
|
|
126
126
|
Cause,
|
|
127
127
|
asyncEffect,
|
package/dist/http/index.mjs
CHANGED
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
healthToHttpResponse,
|
|
6
6
|
makeRuntimeHealth,
|
|
7
7
|
runObservedHttpServerEffect
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-SCHM2MDA.mjs";
|
|
9
|
+
import "../chunk-WA65XP2P.mjs";
|
|
10
10
|
import {
|
|
11
11
|
AdaptiveLimiter,
|
|
12
12
|
DEFAULT_CACHE_RELEVANT_HEADERS,
|
|
@@ -105,23 +105,23 @@ import {
|
|
|
105
105
|
withPriority,
|
|
106
106
|
withRetry,
|
|
107
107
|
withRetryStream
|
|
108
|
-
} from "../chunk-
|
|
108
|
+
} from "../chunk-5X3MPWTR.mjs";
|
|
109
109
|
import {
|
|
110
110
|
registerHttpEffect
|
|
111
111
|
} from "../chunk-MOO4L7F4.mjs";
|
|
112
|
-
import "../chunk-
|
|
112
|
+
import "../chunk-IWAQQDYE.mjs";
|
|
113
113
|
import "../chunk-B5JD23U7.mjs";
|
|
114
114
|
import {
|
|
115
115
|
fixed,
|
|
116
116
|
makeScheduleDriver,
|
|
117
117
|
resource,
|
|
118
118
|
take
|
|
119
|
-
} from "../chunk-
|
|
119
|
+
} from "../chunk-XRRC5BBM.mjs";
|
|
120
120
|
import {
|
|
121
121
|
Runtime,
|
|
122
122
|
fromPromiseAbortable,
|
|
123
123
|
toPromise
|
|
124
|
-
} from "../chunk-
|
|
124
|
+
} from "../chunk-BFNBU47C.mjs";
|
|
125
125
|
import {
|
|
126
126
|
Cause,
|
|
127
127
|
asyncEffect,
|
package/dist/http/testing.cjs
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkUOKXJQAIcjs = require('../chunk-UOKXJQAI.cjs');
|
|
6
6
|
require('../chunk-L6VB5N7Q.cjs');
|
|
7
|
-
require('../chunk-
|
|
7
|
+
require('../chunk-CXWJII2N.cjs');
|
|
8
8
|
require('../chunk-SA6HUJVI.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkZZ2CMYJLcjs = require('../chunk-ZZ2CMYJL.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkJKHBEWQAcjs = require('../chunk-JKHBEWQA.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -66,7 +66,7 @@ function makeMockHttpClient(handler = () => makeHttpResponse()) {
|
|
|
66
66
|
return _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, toHttpError(error));
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
|
-
return Object.assign(
|
|
69
|
+
return Object.assign(_chunkUOKXJQAIcjs.decorate.call(void 0, run, () => ({ ...stats })), {
|
|
70
70
|
calls: () => [...calls],
|
|
71
71
|
calledTimes: () => calls.length,
|
|
72
72
|
lastRequest: () => calls.at(-1),
|
|
@@ -89,7 +89,7 @@ function makeSequenceHttpClient(responses, fallback = makeHttpResponse()) {
|
|
|
89
89
|
}
|
|
90
90
|
function makeMockDefaultHttpClient(handler = () => makeHttpResponse()) {
|
|
91
91
|
const wire = makeMockHttpClient(handler);
|
|
92
|
-
const client =
|
|
92
|
+
const client = _chunkUOKXJQAIcjs.makeDefaultHttpClient.call(void 0, {
|
|
93
93
|
baseUrl: "http://brass.test",
|
|
94
94
|
preset: "minimal",
|
|
95
95
|
transport: ({ request }) => wire(request)
|
|
@@ -102,10 +102,10 @@ function makeMockDefaultHttpClient(handler = () => makeHttpResponse()) {
|
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
function makeMockDefaultHttpClientLayer(handler = () => makeHttpResponse(), options = {}) {
|
|
105
|
-
return
|
|
105
|
+
return _chunkZZ2CMYJLcjs.layerValue.call(void 0, _nullishCoalesce(options.tag, () => ( _chunkUOKXJQAIcjs.HttpClientService)), makeMockDefaultHttpClient(handler));
|
|
106
106
|
}
|
|
107
107
|
function runHttpEffect(effect, env = {}) {
|
|
108
|
-
return
|
|
108
|
+
return _chunkJKHBEWQAcjs.toPromise.call(void 0, effect, env);
|
|
109
109
|
}
|
|
110
110
|
function makeFetchResponse(body = null, init = {}) {
|
|
111
111
|
assertResponseAvailable();
|
package/dist/http/testing.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as ServiceTag, L as Layer, a as LayerContext } from '../layer-
|
|
2
|
-
import { A as Async } from '../effect-
|
|
3
|
-
import { D as DefaultHttpClient, H as HttpRequest, a as HttpClient, b as HttpWireResponse, c as HttpError } from '../defaultClient-
|
|
4
|
-
import '../stream-
|
|
1
|
+
import { S as ServiceTag, L as Layer, a as LayerContext } from '../layer-CsNGeVee.js';
|
|
2
|
+
import { A as Async } from '../effect-DbEMiMvv.js';
|
|
3
|
+
import { D as DefaultHttpClient, H as HttpRequest, a as HttpClient, b as HttpWireResponse, c as HttpError } from '../defaultClient-hyVSNzSJ.js';
|
|
4
|
+
import '../stream-B8c_UKZq.js';
|
|
5
5
|
import '../schema/index.js';
|
|
6
6
|
|
|
7
7
|
type HttpTestResponseInit = {
|
package/dist/http/testing.js
CHANGED
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
HttpClientService,
|
|
3
3
|
decorate,
|
|
4
4
|
makeDefaultHttpClient
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-HKLZJ5UK.js";
|
|
6
6
|
import "../chunk-TRM4JUZQ.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-XO3TDAJE.js";
|
|
8
8
|
import "../chunk-UCUBNWM2.js";
|
|
9
9
|
import {
|
|
10
10
|
layerValue
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-6W5DC3TX.js";
|
|
12
12
|
import {
|
|
13
13
|
toPromise
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-TN2P7RNK.js";
|
|
15
15
|
import {
|
|
16
16
|
asyncFail,
|
|
17
17
|
asyncSucceed
|
package/dist/http/testing.mjs
CHANGED
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
HttpClientService,
|
|
3
3
|
decorate,
|
|
4
4
|
makeDefaultHttpClient
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-5X3MPWTR.mjs";
|
|
6
6
|
import "../chunk-MOO4L7F4.mjs";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-IWAQQDYE.mjs";
|
|
8
8
|
import "../chunk-B5JD23U7.mjs";
|
|
9
9
|
import {
|
|
10
10
|
layerValue
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-XRRC5BBM.mjs";
|
|
12
12
|
import {
|
|
13
13
|
toPromise
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-BFNBU47C.mjs";
|
|
15
15
|
import {
|
|
16
16
|
asyncFail,
|
|
17
17
|
asyncSucceed
|