brass-runtime 1.18.0 → 1.18.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 +54 -0
- package/dist/agent/cli/main.cjs +31 -31
- package/dist/agent/cli/main.js +3 -3
- package/dist/agent/cli/main.mjs +3 -3
- package/dist/agent/index.cjs +4 -4
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +3 -3
- package/dist/agent/index.mjs +3 -3
- package/dist/{chunk-PSEU65ND.js → chunk-2R3RVNS2.js} +6 -6
- package/dist/{chunk-ITZQ526U.mjs → chunk-3NKXUX4T.mjs} +2 -2
- package/dist/{chunk-JH4GI3DW.js → chunk-4PKBNG2H.js} +38 -18
- package/dist/{chunk-Z3PSSXP3.mjs → chunk-5RVHSBJ6.mjs} +292 -36
- package/dist/{chunk-QZ6QFJNM.mjs → chunk-5UBJT4RW.mjs} +4 -4
- package/dist/{chunk-7TXQJFZX.cjs → chunk-6STX4PS3.cjs} +13 -13
- package/dist/{chunk-VIFA4DPN.cjs → chunk-7FZUTJM3.cjs} +508 -252
- package/dist/{chunk-4YQHPIWJ.js → chunk-A6EG5WRL.js} +3 -3
- package/dist/{chunk-XSAHV5HQ.js → chunk-APQBU7TM.js} +264 -133
- package/dist/{chunk-RREBJX2S.mjs → chunk-AQQQFNYD.mjs} +38 -18
- package/dist/{chunk-AADFFVYS.js → chunk-B2VXVNIS.js} +1 -1
- package/dist/{chunk-R6WDSZA6.mjs → chunk-BLXBZ6RE.mjs} +1 -1
- package/dist/{chunk-ITG6I7ZS.js → chunk-C3CWI42G.js} +1 -1
- package/dist/{chunk-LXBU5E77.cjs → chunk-DV644N7P.cjs} +85 -85
- package/dist/{chunk-G5JTCFMI.mjs → chunk-EKLEDIVJ.mjs} +2 -2
- package/dist/{chunk-IBRHSH5H.js → chunk-EXBGIC66.js} +1 -1
- package/dist/{chunk-W6WR37HN.js → chunk-FC5N5QHJ.js} +2 -2
- package/dist/{chunk-6MLAZPBL.mjs → chunk-FNWOH2T2.js} +18 -6
- package/dist/{chunk-AJMKZXRB.cjs → chunk-FYWWU3Z7.cjs} +2 -2
- package/dist/{chunk-IFRBVMWJ.cjs → chunk-GOEO763K.cjs} +21 -21
- package/dist/{chunk-S4HHFUYP.js → chunk-GXOIUBKE.js} +2 -2
- package/dist/{chunk-BG5RNEA2.js → chunk-H4ZRUQZL.js} +4 -4
- package/dist/{chunk-OI4ESUMC.mjs → chunk-HW2CLRJ3.mjs} +6 -6
- package/dist/{chunk-3PHU7FWS.js → chunk-JWFOWPMB.js} +163 -155
- package/dist/{chunk-OT2TESZU.mjs → chunk-KAPZHDO4.mjs} +1 -1
- package/dist/{chunk-ELLF55ER.mjs → chunk-KDXNWGPB.mjs} +1 -1
- package/dist/{chunk-UUMKZJRJ.cjs → chunk-KPOL2YEO.cjs} +18 -6
- package/dist/{chunk-2SLT3X6G.cjs → chunk-MA74OYCI.cjs} +6 -6
- package/dist/{chunk-2QNREG6K.mjs → chunk-MUMBUXU6.mjs} +264 -133
- package/dist/{chunk-YTX2JYYP.cjs → chunk-NQW3YUFN.cjs} +18 -18
- package/dist/{chunk-3PFZGP23.cjs → chunk-OO7BGCC3.cjs} +54 -34
- package/dist/{chunk-QCOLAHU3.mjs → chunk-OX6MF7SZ.mjs} +163 -155
- package/dist/{chunk-KHACHFBQ.cjs → chunk-QBVS3UYN.cjs} +245 -237
- package/dist/{chunk-H5GYX7RZ.js → chunk-RZGB3DXR.js} +292 -36
- package/dist/{chunk-KRYP6CAE.mjs → chunk-URVS2OE2.mjs} +3 -3
- package/dist/{chunk-HCJ4S3YB.js → chunk-UZQ3BB6W.mjs} +18 -6
- package/dist/{chunk-N6QNSTWD.cjs → chunk-YQWZ7FZX.cjs} +5 -5
- package/dist/{chunk-5XADBMSU.cjs → chunk-Z2YIDHRI.cjs} +5 -5
- package/dist/{chunk-SSQJKDN3.cjs → chunk-ZDZNV6NA.cjs} +286 -155
- package/dist/core/index.cjs +14 -8
- package/dist/core/index.d.ts +6 -6
- package/dist/core/index.js +13 -7
- package/dist/core/index.mjs +13 -7
- package/dist/{defaultClient-DhpCQW9m.d.ts → defaultClient-Cid0JoUR.d.ts} +29 -4
- package/dist/{effect-CtUDl5M5.d.ts → effect-DnGUuhw6.d.ts} +22 -1
- package/dist/http/index.cjs +58 -54
- package/dist/http/index.d.ts +8 -8
- package/dist/http/index.js +11 -7
- package/dist/http/index.mjs +11 -7
- package/dist/http/testing.cjs +9 -9
- package/dist/http/testing.d.ts +4 -4
- package/dist/http/testing.js +5 -5
- package/dist/http/testing.mjs +5 -5
- package/dist/index.cjs +92 -86
- package/dist/index.d.ts +7 -7
- package/dist/index.js +14 -8
- package/dist/index.mjs +14 -8
- package/dist/{layer-BalPI6cN.d.ts → layer-D2LFcBVx.d.ts} +1 -1
- package/dist/observability/index.cjs +10 -10
- package/dist/observability/index.d.ts +7 -7
- package/dist/observability/index.js +9 -9
- package/dist/observability/index.mjs +9 -9
- package/dist/perf/cli.cjs +26 -26
- package/dist/perf/cli.js +11 -11
- package/dist/perf/cli.mjs +11 -11
- package/dist/perf/index.cjs +13 -13
- package/dist/perf/index.js +11 -11
- package/dist/perf/index.mjs +11 -11
- package/dist/schema/index.cjs +2 -2
- package/dist/schema/index.js +1 -1
- package/dist/schema/index.mjs +1 -1
- package/dist/{server-C1zVmqE6.d.ts → server-Bf1zNYZk.d.ts} +4 -4
- package/dist/{stream-Bb4FTejt.d.ts → stream-I7bkvF7a.d.ts} +1 -1
- package/dist/{tracer-DzfuE6um.d.ts → tracer-DF83nLn6.d.ts} +2 -2
- package/dist/{tracing-BABA5arE.d.ts → tracing-CWV4gT0u.d.ts} +1 -1
- package/package.json +3 -2
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 _chunkDV644N7Pcjs = require('../chunk-DV644N7P.cjs');
|
|
9
|
+
require('../chunk-FYWWU3Z7.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -103,23 +103,25 @@ require('../chunk-AJMKZXRB.cjs');
|
|
|
103
103
|
|
|
104
104
|
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
var _chunk7FZUTJM3cjs = require('../chunk-7FZUTJM3.cjs');
|
|
107
109
|
|
|
108
110
|
|
|
109
111
|
var _chunkL6VB5N7Qcjs = require('../chunk-L6VB5N7Q.cjs');
|
|
110
|
-
require('../chunk-
|
|
112
|
+
require('../chunk-OO7BGCC3.cjs');
|
|
111
113
|
require('../chunk-SA6HUJVI.cjs');
|
|
112
114
|
|
|
113
115
|
|
|
114
116
|
|
|
115
117
|
|
|
116
118
|
|
|
117
|
-
var
|
|
119
|
+
var _chunk6STX4PS3cjs = require('../chunk-6STX4PS3.cjs');
|
|
118
120
|
|
|
119
121
|
|
|
120
122
|
|
|
121
123
|
|
|
122
|
-
var
|
|
124
|
+
var _chunkZDZNV6NAcjs = require('../chunk-ZDZNV6NA.cjs');
|
|
123
125
|
|
|
124
126
|
|
|
125
127
|
|
|
@@ -143,7 +145,7 @@ var _chunkMVGUEJ5Zcjs = require('../chunk-MVGUEJ5Z.cjs');
|
|
|
143
145
|
|
|
144
146
|
|
|
145
147
|
|
|
146
|
-
var
|
|
148
|
+
var _chunkKPOL2YEOcjs = require('../chunk-KPOL2YEO.cjs');
|
|
147
149
|
require('../chunk-OBGZSXTJ.cjs');
|
|
148
150
|
|
|
149
151
|
// src/http/nodeTransport.ts
|
|
@@ -178,7 +180,7 @@ function runNodeRequest(context, config, httpAgent, httpsAgent) {
|
|
|
178
180
|
return;
|
|
179
181
|
}
|
|
180
182
|
if (signal.aborted) {
|
|
181
|
-
cb({ _tag: "Failure", cause: _chunkMVGUEJ5Zcjs.Cause.fail(
|
|
183
|
+
cb({ _tag: "Failure", cause: _chunkMVGUEJ5Zcjs.Cause.fail(_chunk7FZUTJM3cjs.abortErrorForSignal.call(void 0, signal)) });
|
|
182
184
|
return;
|
|
183
185
|
}
|
|
184
186
|
const started = nowMs();
|
|
@@ -195,12 +197,12 @@ function runNodeRequest(context, config, httpAgent, httpsAgent) {
|
|
|
195
197
|
const fail = (error) => {
|
|
196
198
|
finish({
|
|
197
199
|
_tag: "Failure",
|
|
198
|
-
cause: _chunkMVGUEJ5Zcjs.Cause.fail(
|
|
200
|
+
cause: _chunkMVGUEJ5Zcjs.Cause.fail(_chunk7FZUTJM3cjs.normalizeHttpError.call(void 0, error, { signal }))
|
|
199
201
|
});
|
|
200
202
|
};
|
|
201
203
|
const options = {
|
|
202
204
|
method: request.method,
|
|
203
|
-
headers:
|
|
205
|
+
headers: _chunk7FZUTJM3cjs.Request.headers.get(request),
|
|
204
206
|
agent: isHttps ? httpsAgent : httpAgent,
|
|
205
207
|
signal
|
|
206
208
|
};
|
|
@@ -216,7 +218,7 @@ function runNodeRequest(context, config, httpAgent, httpsAgent) {
|
|
|
216
218
|
value: {
|
|
217
219
|
status: _nullishCoalesce(response.statusCode, () => ( 0)),
|
|
218
220
|
statusText: _nullishCoalesce(response.statusMessage, () => ( "")),
|
|
219
|
-
headers:
|
|
221
|
+
headers: _chunk7FZUTJM3cjs.normalizeHttpHeaders.call(void 0, response.headers),
|
|
220
222
|
bodyText: Buffer.concat(chunks, byteLength).toString("utf8"),
|
|
221
223
|
ms: Math.round(nowMs() - started)
|
|
222
224
|
}
|
|
@@ -226,7 +228,7 @@ function runNodeRequest(context, config, httpAgent, httpsAgent) {
|
|
|
226
228
|
});
|
|
227
229
|
abort = () => {
|
|
228
230
|
nodeRequest.destroy(isError(signal.reason) ? signal.reason : void 0);
|
|
229
|
-
finish({ _tag: "Failure", cause: _chunkMVGUEJ5Zcjs.Cause.fail(
|
|
231
|
+
finish({ _tag: "Failure", cause: _chunkMVGUEJ5Zcjs.Cause.fail(_chunk7FZUTJM3cjs.abortErrorForSignal.call(void 0, signal)) });
|
|
230
232
|
};
|
|
231
233
|
signal.addEventListener("abort", abort, { once: true });
|
|
232
234
|
nodeRequest.on("error", fail);
|
|
@@ -272,7 +274,7 @@ function makeNodeHttpProxyClient(config = {}) {
|
|
|
272
274
|
nodeTransport,
|
|
273
275
|
...clientConfig
|
|
274
276
|
} = config;
|
|
275
|
-
return
|
|
277
|
+
return _chunk7FZUTJM3cjs.makeDefaultHttpClient.call(void 0, {
|
|
276
278
|
...clientConfig,
|
|
277
279
|
preset,
|
|
278
280
|
transport: _nullishCoalesce(transport, () => ( makeNodeHttpTransport(nodeTransport)))
|
|
@@ -288,8 +290,8 @@ var resolveFinalUrl = (baseUrl, url) => {
|
|
|
288
290
|
}
|
|
289
291
|
};
|
|
290
292
|
var createHttpCore = (cfg = {}) => {
|
|
291
|
-
const wire =
|
|
292
|
-
const withPromise = (eff) => _chunkMVGUEJ5Zcjs.withAsyncPromise.call(void 0, (e, env) =>
|
|
293
|
+
const wire = _chunk7FZUTJM3cjs.makeHttp.call(void 0, cfg);
|
|
294
|
+
const withPromise = (eff) => _chunkMVGUEJ5Zcjs.withAsyncPromise.call(void 0, (e, env) => _chunkZDZNV6NAcjs.toPromise.call(void 0, e, env))(eff);
|
|
293
295
|
const requestRaw = (req) => wire(req);
|
|
294
296
|
const toResponse = (w, body) => ({
|
|
295
297
|
status: w.status,
|
|
@@ -298,7 +300,7 @@ var createHttpCore = (cfg = {}) => {
|
|
|
298
300
|
body
|
|
299
301
|
});
|
|
300
302
|
const decodeResponse = (w, validator, schemaName) => _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
301
|
-
|
|
303
|
+
_chunk7FZUTJM3cjs.decodeJsonBodyEffect.call(void 0, w.bodyText, validator, { schemaName }),
|
|
302
304
|
(body) => _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, toResponse(w, body))
|
|
303
305
|
);
|
|
304
306
|
return {
|
|
@@ -306,7 +308,7 @@ var createHttpCore = (cfg = {}) => {
|
|
|
306
308
|
wire,
|
|
307
309
|
withPromise,
|
|
308
310
|
requestRaw,
|
|
309
|
-
buildReq:
|
|
311
|
+
buildReq: _chunk7FZUTJM3cjs.buildHttpRequest,
|
|
310
312
|
toResponse,
|
|
311
313
|
decodeResponse
|
|
312
314
|
};
|
|
@@ -324,17 +326,17 @@ function httpClient(cfg = {}) {
|
|
|
324
326
|
};
|
|
325
327
|
const getJson = ((url, init) => {
|
|
326
328
|
const base = core.buildReq("GET", url, init);
|
|
327
|
-
const req =
|
|
329
|
+
const req = _chunk7FZUTJM3cjs.setHeaderIfMissing.call(void 0, "accept", "application/json")(base);
|
|
328
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]))));
|
|
329
331
|
});
|
|
330
332
|
const postJson = ((url, bodyObj, init) => {
|
|
331
333
|
return core.withPromise(
|
|
332
334
|
_chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
333
|
-
|
|
335
|
+
_chunk7FZUTJM3cjs.encodeJsonBodyEffect.call(void 0, bodyObj, _optionalChain([init, 'optionalAccess', _3 => _3.bodySchema]), { schemaName: _optionalChain([init, 'optionalAccess', _4 => _4.bodySchemaName]) }),
|
|
334
336
|
(bodyText) => {
|
|
335
337
|
const base = core.buildReq("POST", url, init, bodyText);
|
|
336
|
-
const req =
|
|
337
|
-
|
|
338
|
+
const req = _chunk7FZUTJM3cjs.setHeaderIfMissing.call(void 0, "content-type", "application/json")(
|
|
339
|
+
_chunk7FZUTJM3cjs.setHeaderIfMissing.call(void 0, "accept", "application/json")(base)
|
|
338
340
|
);
|
|
339
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])));
|
|
340
342
|
}
|
|
@@ -349,7 +351,7 @@ function httpClient(cfg = {}) {
|
|
|
349
351
|
getJson,
|
|
350
352
|
postJson,
|
|
351
353
|
with: (mw) => make(wire.with(mw)),
|
|
352
|
-
withRetry: (p) => make(wire.with(
|
|
354
|
+
withRetry: (p) => make(wire.with(_chunk7FZUTJM3cjs.withRetry.call(void 0, p))),
|
|
353
355
|
wire,
|
|
354
356
|
stats: () => wire.stats()
|
|
355
357
|
};
|
|
@@ -385,11 +387,11 @@ function httpClientWithMeta(cfg = {}) {
|
|
|
385
387
|
const startedAt = Date.now();
|
|
386
388
|
return core.withPromise(
|
|
387
389
|
_chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
388
|
-
|
|
390
|
+
_chunk7FZUTJM3cjs.encodeJsonBodyEffect.call(void 0, bodyObj, _optionalChain([init, 'optionalAccess', _7 => _7.bodySchema]), { schemaName: _optionalChain([init, 'optionalAccess', _8 => _8.bodySchemaName]) }),
|
|
389
391
|
(bodyText) => {
|
|
390
392
|
const base = core.buildReq("POST", url, init, bodyText);
|
|
391
|
-
const req =
|
|
392
|
-
|
|
393
|
+
const req = _chunk7FZUTJM3cjs.setHeaderIfMissing.call(void 0, "content-type", "application/json")(
|
|
394
|
+
_chunk7FZUTJM3cjs.setHeaderIfMissing.call(void 0, "accept", "application/json")(base)
|
|
393
395
|
);
|
|
394
396
|
return _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
395
397
|
core.requestRaw(req),
|
|
@@ -419,7 +421,7 @@ function httpClientWithMeta(cfg = {}) {
|
|
|
419
421
|
};
|
|
420
422
|
const getJson = (url, init) => {
|
|
421
423
|
const base = core.buildReq("GET", url, init);
|
|
422
|
-
const req =
|
|
424
|
+
const req = _chunk7FZUTJM3cjs.setHeaderIfMissing.call(void 0, "accept", "application/json")(base);
|
|
423
425
|
const startedAt = Date.now();
|
|
424
426
|
return core.withPromise(
|
|
425
427
|
_chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
@@ -451,13 +453,13 @@ function httpClientWithMeta(cfg = {}) {
|
|
|
451
453
|
};
|
|
452
454
|
}
|
|
453
455
|
function httpClientStream(cfg = {}) {
|
|
454
|
-
const wire =
|
|
456
|
+
const wire = _chunk7FZUTJM3cjs.makeHttpStream.call(void 0, cfg);
|
|
455
457
|
const make = (w) => {
|
|
456
|
-
const withPromise = (eff) => _chunkMVGUEJ5Zcjs.withAsyncPromise.call(void 0, (e, env) =>
|
|
458
|
+
const withPromise = (eff) => _chunkMVGUEJ5Zcjs.withAsyncPromise.call(void 0, (e, env) => _chunkZDZNV6NAcjs.toPromise.call(void 0, e, env))(eff);
|
|
457
459
|
const request = (req) => withPromise(w(req));
|
|
458
460
|
const getStream = (url, init) => {
|
|
459
461
|
const base = { method: "GET", url, init };
|
|
460
|
-
const req =
|
|
462
|
+
const req = _chunk7FZUTJM3cjs.setHeaderIfMissing.call(void 0, "accept", "*/*")(base);
|
|
461
463
|
return request(req);
|
|
462
464
|
};
|
|
463
465
|
return {
|
|
@@ -465,7 +467,7 @@ function httpClientStream(cfg = {}) {
|
|
|
465
467
|
getStream,
|
|
466
468
|
get: getStream,
|
|
467
469
|
with: (mw) => make(mw(w)),
|
|
468
|
-
withRetry: (p) => make(
|
|
470
|
+
withRetry: (p) => make(_chunk7FZUTJM3cjs.withRetryStream.call(void 0, p)(w)),
|
|
469
471
|
wire: w,
|
|
470
472
|
stats: () => w.stats()
|
|
471
473
|
};
|
|
@@ -563,7 +565,7 @@ function resolveAdaptiveLimiter(config, next) {
|
|
|
563
565
|
function resolveAdaptiveLimiterKey(config, limiter, req) {
|
|
564
566
|
if (!limiter) return void 0;
|
|
565
567
|
if (config.adaptiveLimiterKey) return config.adaptiveLimiterKey(req);
|
|
566
|
-
const poolKey =
|
|
568
|
+
const poolKey = _chunk7FZUTJM3cjs.getHttpRequestPolicy.call(void 0, req).poolKey;
|
|
567
569
|
if (poolKey) return poolKey;
|
|
568
570
|
if (limiter.keyResolver === "global") return "global";
|
|
569
571
|
try {
|
|
@@ -614,11 +616,11 @@ function withLogging(logger) {
|
|
|
614
616
|
logger({ phase: "request", req });
|
|
615
617
|
} catch (e5) {
|
|
616
618
|
}
|
|
617
|
-
const startedAt =
|
|
619
|
+
const startedAt = _chunk7FZUTJM3cjs.now.call(void 0, );
|
|
618
620
|
return _chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
619
621
|
next(req),
|
|
620
622
|
(error) => {
|
|
621
|
-
const durationMs = Math.round(
|
|
623
|
+
const durationMs = Math.round(_chunk7FZUTJM3cjs.now.call(void 0, ) - startedAt);
|
|
622
624
|
try {
|
|
623
625
|
logger({ phase: "error", req, error, durationMs });
|
|
624
626
|
} catch (e6) {
|
|
@@ -626,7 +628,7 @@ function withLogging(logger) {
|
|
|
626
628
|
return _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, error);
|
|
627
629
|
},
|
|
628
630
|
(res) => {
|
|
629
|
-
const durationMs = Math.round(
|
|
631
|
+
const durationMs = Math.round(_chunk7FZUTJM3cjs.now.call(void 0, ) - startedAt);
|
|
630
632
|
try {
|
|
631
633
|
logger({ phase: "response", req, res, durationMs });
|
|
632
634
|
} catch (e7) {
|
|
@@ -882,7 +884,7 @@ function prewarmConnections(config = {}) {
|
|
|
882
884
|
const fetchImpl = _nullishCoalesce(config.fetchImpl, () => ( globalThis.fetch));
|
|
883
885
|
const method = _nullishCoalesce(config.method, () => ( "HEAD"));
|
|
884
886
|
const targets = resolveTargets(config);
|
|
885
|
-
return
|
|
887
|
+
return _chunkZDZNV6NAcjs.fromPromiseAbortable.call(void 0,
|
|
886
888
|
async (signal) => {
|
|
887
889
|
if (typeof fetchImpl !== "function" || targets.length === 0) {
|
|
888
890
|
return { attempted: 0, warmed: 0, failed: 0, skipped: targets.length, attempts: [] };
|
|
@@ -1090,10 +1092,10 @@ function makeBuilder(config) {
|
|
|
1090
1092
|
prewarm: (layer = {}) => setLayer("prewarm", layer),
|
|
1091
1093
|
noPrewarm: () => setLayer("prewarm", false),
|
|
1092
1094
|
adaptiveLimiter: (layer = {}) => setLayer("adaptiveLimiter", layer),
|
|
1093
|
-
adaptiveLimiterPreset: (preset, overrides = {}) => setLayer("adaptiveLimiter",
|
|
1094
|
-
conservativeLimiter: (overrides = {}) => setLayer("adaptiveLimiter",
|
|
1095
|
-
balancedLimiter: (overrides = {}) => setLayer("adaptiveLimiter",
|
|
1096
|
-
aggressiveLimiter: (overrides = {}) => setLayer("adaptiveLimiter",
|
|
1095
|
+
adaptiveLimiterPreset: (preset, overrides = {}) => setLayer("adaptiveLimiter", _chunk7FZUTJM3cjs.makeAdaptiveLimiterConfig.call(void 0, preset, overrides)),
|
|
1096
|
+
conservativeLimiter: (overrides = {}) => setLayer("adaptiveLimiter", _chunk7FZUTJM3cjs.makeAdaptiveLimiterConfig.call(void 0, "conservative", overrides)),
|
|
1097
|
+
balancedLimiter: (overrides = {}) => setLayer("adaptiveLimiter", _chunk7FZUTJM3cjs.makeAdaptiveLimiterConfig.call(void 0, "balanced", overrides)),
|
|
1098
|
+
aggressiveLimiter: (overrides = {}) => setLayer("adaptiveLimiter", _chunk7FZUTJM3cjs.makeAdaptiveLimiterConfig.call(void 0, "aggressive", overrides)),
|
|
1097
1099
|
noAdaptiveLimiter: () => setLayer("adaptiveLimiter", false),
|
|
1098
1100
|
pool: (layer = {}) => setLayer("pool", layer),
|
|
1099
1101
|
noPool: () => setLayer("pool", false),
|
|
@@ -1102,8 +1104,8 @@ function makeBuilder(config) {
|
|
|
1102
1104
|
middleware,
|
|
1103
1105
|
use: middleware,
|
|
1104
1106
|
configure: (next) => makeBuilder(mergeConfig(config, next)),
|
|
1105
|
-
build: () =>
|
|
1106
|
-
buildWire: () =>
|
|
1107
|
+
build: () => _chunk7FZUTJM3cjs.makeDefaultHttpClient.call(void 0, freezeConfig(config)),
|
|
1108
|
+
buildWire: () => _chunk7FZUTJM3cjs.makeDefaultHttpClient.call(void 0, freezeConfig(config)).wire
|
|
1107
1109
|
});
|
|
1108
1110
|
}
|
|
1109
1111
|
function httpClientBuilder(config = {}) {
|
|
@@ -1171,7 +1173,7 @@ function makeRuntimeHealthRoute(options = {}) {
|
|
|
1171
1173
|
"GET",
|
|
1172
1174
|
path,
|
|
1173
1175
|
() => _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
1174
|
-
|
|
1176
|
+
_chunkDV644N7Pcjs.makeRuntimeHealth.call(void 0, healthOptions),
|
|
1175
1177
|
(report) => _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, healthReportToServerResponse(report))
|
|
1176
1178
|
)
|
|
1177
1179
|
);
|
|
@@ -1194,7 +1196,7 @@ function withResponseHeader(name, value) {
|
|
|
1194
1196
|
);
|
|
1195
1197
|
}
|
|
1196
1198
|
function healthReportToServerResponse(report) {
|
|
1197
|
-
return healthHttpResponseToServerResponse(
|
|
1199
|
+
return healthHttpResponseToServerResponse(_chunkDV644N7Pcjs.healthToHttpResponse.call(void 0, report));
|
|
1198
1200
|
}
|
|
1199
1201
|
function healthHttpResponseToServerResponse(response) {
|
|
1200
1202
|
return {
|
|
@@ -1257,7 +1259,7 @@ function makeNodeHttpServer(options) {
|
|
|
1257
1259
|
});
|
|
1258
1260
|
}
|
|
1259
1261
|
function nodeHttpServerResource(options) {
|
|
1260
|
-
return
|
|
1262
|
+
return _chunk6STX4PS3cjs.resource.call(void 0,
|
|
1261
1263
|
makeNodeHttpServer(options),
|
|
1262
1264
|
(handle) => _chunkMVGUEJ5Zcjs.asyncEffect.call(void 0, (_env, cb) => {
|
|
1263
1265
|
handle.close().then(() => cb({ _tag: "Success", value: void 0 })).catch(() => cb({ _tag: "Success", value: void 0 }));
|
|
@@ -1336,7 +1338,7 @@ function prepareRouteContext(request, params, routeWithSchemas) {
|
|
|
1336
1338
|
body: request.bodyText,
|
|
1337
1339
|
phase: "request",
|
|
1338
1340
|
schema: _nullishCoalesce(routeWithSchemas.options.bodySchemaName, () => ( "body")),
|
|
1339
|
-
issues: [
|
|
1341
|
+
issues: [_chunkKPOL2YEOcjs.makeSchemaIssue.call(void 0, [], "valid JSON", request.bodyText, bodyInput.message)]
|
|
1340
1342
|
})
|
|
1341
1343
|
};
|
|
1342
1344
|
}
|
|
@@ -1360,12 +1362,12 @@ function prepareRouteContext(request, params, routeWithSchemas) {
|
|
|
1360
1362
|
function validateResponseBody(response, routeWithSchemas) {
|
|
1361
1363
|
const schema2 = routeWithSchemas.options.response;
|
|
1362
1364
|
if (!schema2) return { success: true };
|
|
1363
|
-
const result =
|
|
1365
|
+
const result = _chunkKPOL2YEOcjs.validateValue.call(void 0, response.body, schema2);
|
|
1364
1366
|
if (result.success) return { success: true };
|
|
1365
1367
|
return {
|
|
1366
1368
|
success: false,
|
|
1367
1369
|
error: makeValidationError({
|
|
1368
|
-
message: `HTTP response failed validation: ${
|
|
1370
|
+
message: `HTTP response failed validation: ${_chunkKPOL2YEOcjs.formatIssues.call(void 0, result.issues)}`,
|
|
1369
1371
|
body: previewJson(response.body),
|
|
1370
1372
|
phase: "response",
|
|
1371
1373
|
schema: _nullishCoalesce(routeWithSchemas.options.responseSchemaName, () => ( "response")),
|
|
@@ -1375,12 +1377,12 @@ function validateResponseBody(response, routeWithSchemas) {
|
|
|
1375
1377
|
}
|
|
1376
1378
|
function validatePart(input, schema2, options) {
|
|
1377
1379
|
if (!schema2) return { success: true, data: input };
|
|
1378
|
-
const result =
|
|
1380
|
+
const result = _chunkKPOL2YEOcjs.validateValue.call(void 0, input, schema2);
|
|
1379
1381
|
if (result.success) return { success: true, data: result.data };
|
|
1380
1382
|
return {
|
|
1381
1383
|
success: false,
|
|
1382
1384
|
error: makeValidationError({
|
|
1383
|
-
message: `HTTP ${options.schemaName} failed validation: ${
|
|
1385
|
+
message: `HTTP ${options.schemaName} failed validation: ${_chunkKPOL2YEOcjs.formatIssues.call(void 0, result.issues)}`,
|
|
1384
1386
|
body: options.body,
|
|
1385
1387
|
phase: options.phase,
|
|
1386
1388
|
schema: options.schemaName,
|
|
@@ -1438,7 +1440,7 @@ async function handleNodeRequest(req, res, router, options) {
|
|
|
1438
1440
|
target: serverRequest.target,
|
|
1439
1441
|
headers: serverRequest.headers
|
|
1440
1442
|
};
|
|
1441
|
-
const response = options.observability ? (await
|
|
1443
|
+
const response = options.observability ? (await _chunkDV644N7Pcjs.runObservedHttpServerEffect.call(void 0,
|
|
1442
1444
|
options.observability,
|
|
1443
1445
|
observedInput,
|
|
1444
1446
|
effect,
|
|
@@ -1448,7 +1450,7 @@ async function handleNodeRequest(req, res, router, options) {
|
|
|
1448
1450
|
},
|
|
1449
1451
|
options.env,
|
|
1450
1452
|
options.runtimeOptions
|
|
1451
|
-
)).value : await (_nullishCoalesce(options.runtime, () => ( new (0,
|
|
1453
|
+
)).value : await (_nullishCoalesce(options.runtime, () => ( new (0, _chunkZDZNV6NAcjs.Runtime)({
|
|
1452
1454
|
env: _nullishCoalesce(options.env, () => ( {})),
|
|
1453
1455
|
..._nullishCoalesce(options.runtimeOptions, () => ( {}))
|
|
1454
1456
|
})))).toPromise(effect);
|
|
@@ -1534,7 +1536,7 @@ function closeNodeServer(server, options) {
|
|
|
1534
1536
|
return new Promise((resolve, reject) => {
|
|
1535
1537
|
const startedAt = Date.now();
|
|
1536
1538
|
const schedule = _nullishCoalesce(options.shutdownPollSchedule, () => ( defaultShutdownPollSchedule(_nullishCoalesce(options.gracefulShutdownMs, () => ( 5e3)))));
|
|
1537
|
-
const driver =
|
|
1539
|
+
const driver = _chunk6STX4PS3cjs.makeScheduleDriver.call(void 0, schedule, { name: _nullishCoalesce(schedule.name, () => ( "http.server.shutdown")), startedAtMs: startedAt });
|
|
1538
1540
|
let finished = false;
|
|
1539
1541
|
const done = (error) => {
|
|
1540
1542
|
if (finished) return;
|
|
@@ -1568,7 +1570,7 @@ function closeNodeServer(server, options) {
|
|
|
1568
1570
|
}
|
|
1569
1571
|
function defaultShutdownPollSchedule(maxMs) {
|
|
1570
1572
|
const intervalMs = 25;
|
|
1571
|
-
return
|
|
1573
|
+
return _chunk6STX4PS3cjs.take.call(void 0, _chunk6STX4PS3cjs.fixed.call(void 0, intervalMs), Math.max(1, Math.ceil(Math.max(0, maxMs) / intervalMs)));
|
|
1572
1574
|
}
|
|
1573
1575
|
function matchRoute(routes, method, path) {
|
|
1574
1576
|
const requestedMethod = method.toUpperCase();
|
|
@@ -1839,4 +1841,6 @@ function escapeRegExp(value) {
|
|
|
1839
1841
|
|
|
1840
1842
|
|
|
1841
1843
|
|
|
1842
|
-
|
|
1844
|
+
|
|
1845
|
+
|
|
1846
|
+
exports.AdaptiveLimiter = _chunk7FZUTJM3cjs.AdaptiveLimiter; exports.ConfigValidationError = _chunkKPOL2YEOcjs.ConfigValidationError; exports.DEFAULT_CACHE_RELEVANT_HEADERS = _chunk7FZUTJM3cjs.DEFAULT_CACHE_RELEVANT_HEADERS; exports.EmaComputer = _chunk7FZUTJM3cjs.EmaComputer; exports.HttpClientService = _chunk7FZUTJM3cjs.HttpClientService; exports.HttpConcurrencyPool = _chunk7FZUTJM3cjs.HttpConcurrencyPool; exports.HttpServer = HttpServer; exports.LRUCache = _chunk7FZUTJM3cjs.LRUCache; exports.LatencyWindow = _chunk7FZUTJM3cjs.LatencyWindow; exports.LifecycleStatsTracker = _chunk7FZUTJM3cjs.LifecycleStatsTracker; exports.PriorityQueue = _chunk7FZUTJM3cjs.PriorityQueue; exports.SEPARATOR = _chunk7FZUTJM3cjs.SEPARATOR; exports.SUPPORTED_ENCODINGS = _chunk7FZUTJM3cjs.SUPPORTED_ENCODINGS; exports.Schema = _chunkKPOL2YEOcjs.Schema; exports.SchemaValidationException = _chunkKPOL2YEOcjs.SchemaValidationException; exports.abortErrorForSignal = _chunk7FZUTJM3cjs.abortErrorForSignal; exports.adaptiveLimiterPresets = _chunk7FZUTJM3cjs.adaptiveLimiterPresets; exports.backoffDelayMs = _chunk7FZUTJM3cjs.backoffDelayMs; exports.clampPriority = _chunk7FZUTJM3cjs.clampPriority; exports.computeCacheKey = _chunk7FZUTJM3cjs.computeCacheKey; exports.computeGradient = _chunk7FZUTJM3cjs.computeGradient; exports.computeNewLimit = _chunk7FZUTJM3cjs.computeNewLimit; exports.decodeJsonBody = _chunk7FZUTJM3cjs.decodeJsonBody; exports.decodeJsonBodyEffect = _chunk7FZUTJM3cjs.decodeJsonBodyEffect; exports.decorate = _chunk7FZUTJM3cjs.decorate; exports.defaultHttpClientPreset = _chunk7FZUTJM3cjs.defaultHttpClientPreset; exports.defaultRetryOnError = _chunk7FZUTJM3cjs.defaultRetryOnError; exports.defaultRetryOnStatus = _chunk7FZUTJM3cjs.defaultRetryOnStatus; exports.defaultRetryableMethods = _chunk7FZUTJM3cjs.defaultRetryableMethods; exports.defineHttpPolicyPresets = _chunk7FZUTJM3cjs.defineHttpPolicyPresets; exports.detectPlatform = _chunk7FZUTJM3cjs.detectPlatform; exports.empty = empty; exports.encodeJsonBodyEffect = _chunk7FZUTJM3cjs.encodeJsonBodyEffect; exports.executeProbe = _chunk7FZUTJM3cjs.executeProbe; exports.formatConfigError = _chunkKPOL2YEOcjs.formatConfigError; exports.formatHttpError = _chunk7FZUTJM3cjs.formatHttpError; exports.formatIssues = _chunkKPOL2YEOcjs.formatIssues; exports.getHttpRequestPolicy = _chunk7FZUTJM3cjs.getHttpRequestPolicy; exports.headersOf = _chunk7FZUTJM3cjs.headersOf; exports.httpBuilder = httpBuilder; exports.httpClient = httpClient; exports.httpClientBuilder = httpClientBuilder; exports.httpClientStream = httpClientStream; exports.httpClientWithMeta = httpClientWithMeta; exports.httpErrorStatus = _chunk7FZUTJM3cjs.httpErrorStatus; exports.httpPolicy = _chunk7FZUTJM3cjs.httpPolicy; exports.httpRoute = httpRoute; exports.isAbortError = _chunk7FZUTJM3cjs.isAbortError; exports.isAbortHttpError = _chunk7FZUTJM3cjs.isAbortHttpError; exports.isCircuitBreakerOpen = _chunk7FZUTJM3cjs.isCircuitBreakerOpen; exports.isConfigValidationError = _chunkKPOL2YEOcjs.isConfigValidationError; exports.isExternalAbortError = _chunk7FZUTJM3cjs.isExternalAbortError; exports.isExternalTimeoutError = _chunk7FZUTJM3cjs.isExternalTimeoutError; exports.isFetchHttpError = _chunk7FZUTJM3cjs.isFetchHttpError; exports.isHttpError = _chunk7FZUTJM3cjs.isHttpError; exports.isKnownHttpError = _chunk7FZUTJM3cjs.isKnownHttpError; exports.isPromiseTransportDirect = _chunk7FZUTJM3cjs.isPromiseTransportDirect; exports.isRetryableHttpError = _chunk7FZUTJM3cjs.isRetryableHttpError; exports.isRetryableHttpStatus = _chunk7FZUTJM3cjs.isRetryableHttpStatus; exports.isSchema = _chunkKPOL2YEOcjs.isSchema; exports.isTaggedHttpError = _chunk7FZUTJM3cjs.isTaggedHttpError; exports.isTimeoutHttpError = _chunk7FZUTJM3cjs.isTimeoutHttpError; exports.isValidationError = _chunk7FZUTJM3cjs.isValidationError; exports.json = json; exports.linkAbortSignals = _chunk7FZUTJM3cjs.linkAbortSignals; exports.makeAdaptiveLimiterConfig = _chunk7FZUTJM3cjs.makeAdaptiveLimiterConfig; exports.makeBudgetSemaphore = _chunk7FZUTJM3cjs.makeBudgetSemaphore; exports.makeCompressionMiddleware = _chunk7FZUTJM3cjs.makeCompressionMiddleware; exports.makeConnectionStateMap = _chunk7FZUTJM3cjs.makeConnectionStateMap; exports.makeDefaultHttpClient = _chunk7FZUTJM3cjs.makeDefaultHttpClient; exports.makeDefaultHttpClientLayer = _chunk7FZUTJM3cjs.makeDefaultHttpClientLayer; exports.makeFetchStreamTransport = _chunk7FZUTJM3cjs.makeFetchStreamTransport; exports.makeFetchTransport = _chunk7FZUTJM3cjs.makeFetchTransport; exports.makeHttp = _chunk7FZUTJM3cjs.makeHttp; exports.makeHttpClient = _chunk7FZUTJM3cjs.makeHttpClient; exports.makeHttpClientBuilder = makeHttpClientBuilder; exports.makeHttpRouter = makeHttpRouter; exports.makeHttpServerResource = makeHttpServerResource; exports.makeHttpStream = _chunk7FZUTJM3cjs.makeHttpStream; exports.makeJsonParseValidationError = _chunk7FZUTJM3cjs.makeJsonParseValidationError; exports.makeLifecycleClient = _chunk7FZUTJM3cjs.makeLifecycleClient; exports.makeNodeHttpProxyClient = makeNodeHttpProxyClient; exports.makeNodeHttpServer = makeNodeHttpServer; exports.makeNodeHttpServerResource = makeNodeHttpServerResource; exports.makeNodeHttpTransport = makeNodeHttpTransport; exports.makePrewarmManager = _chunk7FZUTJM3cjs.makePrewarmManager; exports.makePromiseHttpTransport = _chunk7FZUTJM3cjs.makePromiseHttpTransport; exports.makeRequestCompressionMiddleware = _chunk7FZUTJM3cjs.makeRequestCompressionMiddleware; exports.makeResponseCompressionMiddleware = _chunk7FZUTJM3cjs.makeResponseCompressionMiddleware; exports.makeRuntimeHealthRoute = makeRuntimeHealthRoute; exports.makeRuntimeReadinessRoute = makeRuntimeReadinessRoute; exports.makeSchemaIssue = _chunkKPOL2YEOcjs.makeSchemaIssue; exports.matchHttpError = _chunk7FZUTJM3cjs.matchHttpError; exports.nodeHttpServerResource = nodeHttpServerResource; exports.noopSignal = _chunk7FZUTJM3cjs.noopSignal; exports.normalizeHeadersInit = _chunk7FZUTJM3cjs.normalizeHeadersInit; exports.normalizeHttpError = _chunk7FZUTJM3cjs.normalizeHttpError; exports.normalizeHttpHeaders = _chunk7FZUTJM3cjs.normalizeHttpHeaders; exports.normalizeRetryBudget = _chunk7FZUTJM3cjs.normalizeRetryBudget; exports.parseCacheKey = _chunk7FZUTJM3cjs.parseCacheKey; exports.parseConfig = _chunkKPOL2YEOcjs.parseConfig; exports.prewarmConnections = prewarmConnections; exports.prewarmHttpConnections = prewarmHttpConnections; exports.promiseHttpTransport = _chunk7FZUTJM3cjs.promiseHttpTransport; exports.resolveConfig = _chunk7FZUTJM3cjs.resolveConfig; exports.resolveHttpPoolKey = _chunk7FZUTJM3cjs.resolveHttpPoolKey; exports.resolveHttpRequestPolicyPresets = _chunk7FZUTJM3cjs.resolveHttpRequestPolicyPresets; exports.retryAfterMs = _chunk7FZUTJM3cjs.retryAfterMs; exports.route = route; exports.runtimeHealthRoute = runtimeHealthRoute; exports.runtimeReadinessRoute = runtimeReadinessRoute; exports.s = _chunkKPOL2YEOcjs.s; exports.schema = _chunkKPOL2YEOcjs.schema; exports.text = text; exports.toHttpError = _chunk7FZUTJM3cjs.toHttpError; exports.validateConfig = _chunk7FZUTJM3cjs.validateConfig; exports.validateFetchAvailable = _chunk7FZUTJM3cjs.validateFetchAvailable; exports.validateOrigin = _chunk7FZUTJM3cjs.validateOrigin; exports.validateValue = _chunkKPOL2YEOcjs.validateValue; exports.validatedJson = _chunk7FZUTJM3cjs.validatedJson; exports.validatedJsonResponse = _chunk7FZUTJM3cjs.validatedJsonResponse; exports.withAuth = withAuth; exports.withBatch = _chunk7FZUTJM3cjs.withBatch; exports.withCache = _chunk7FZUTJM3cjs.withCache; exports.withCircuitBreaker = withCircuitBreaker; exports.withConnectionPrewarming = withConnectionPrewarming; exports.withDedup = _chunk7FZUTJM3cjs.withDedup; exports.withHttpPolicyPresets = _chunk7FZUTJM3cjs.withHttpPolicyPresets; exports.withHttpRequestPolicy = _chunk7FZUTJM3cjs.withHttpRequestPolicy; exports.withLogging = withLogging; exports.withMiddleware = _chunk7FZUTJM3cjs.withMiddleware; exports.withPriority = _chunk7FZUTJM3cjs.withPriority; exports.withRequestBatching = withRequestBatching; exports.withResponseHeader = withResponseHeader; exports.withResponseTransform = withResponseTransform; exports.withRetry = _chunk7FZUTJM3cjs.withRetry; exports.withRetryStream = _chunk7FZUTJM3cjs.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
|
|
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-Cid0JoUR.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-Cid0JoUR.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-D2LFcBVx.js';
|
|
6
|
+
import { T as Tracer, R as Resource } from '../tracing-CWV4gT0u.js';
|
|
7
|
+
import { A as Async, b as Runtime, a as RuntimeOptions } from '../effect-DnGUuhw6.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-Bf1zNYZk.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-I7bkvF7a.js';
|
|
13
|
+
import '../tracer-DF83nLn6.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-A6EG5WRL.js";
|
|
9
|
+
import "../chunk-B2VXVNIS.js";
|
|
10
10
|
import {
|
|
11
11
|
AdaptiveLimiter,
|
|
12
12
|
DEFAULT_CACHE_RELEVANT_HEADERS,
|
|
@@ -52,6 +52,7 @@ import {
|
|
|
52
52
|
isFetchHttpError,
|
|
53
53
|
isHttpError,
|
|
54
54
|
isKnownHttpError,
|
|
55
|
+
isPromiseTransportDirect,
|
|
55
56
|
isRetryableHttpError,
|
|
56
57
|
isRetryableHttpStatus,
|
|
57
58
|
isTaggedHttpError,
|
|
@@ -76,6 +77,7 @@ import {
|
|
|
76
77
|
makeRequestCompressionMiddleware,
|
|
77
78
|
makeResponseCompressionMiddleware,
|
|
78
79
|
matchHttpError,
|
|
80
|
+
noopSignal,
|
|
79
81
|
normalizeHeadersInit,
|
|
80
82
|
normalizeHttpError,
|
|
81
83
|
normalizeHttpHeaders,
|
|
@@ -103,23 +105,23 @@ import {
|
|
|
103
105
|
withPriority,
|
|
104
106
|
withRetry,
|
|
105
107
|
withRetryStream
|
|
106
|
-
} from "../chunk-
|
|
108
|
+
} from "../chunk-RZGB3DXR.js";
|
|
107
109
|
import {
|
|
108
110
|
registerHttpEffect
|
|
109
111
|
} from "../chunk-TRM4JUZQ.js";
|
|
110
|
-
import "../chunk-
|
|
112
|
+
import "../chunk-4PKBNG2H.js";
|
|
111
113
|
import "../chunk-UCUBNWM2.js";
|
|
112
114
|
import {
|
|
113
115
|
fixed,
|
|
114
116
|
makeScheduleDriver,
|
|
115
117
|
resource,
|
|
116
118
|
take
|
|
117
|
-
} from "../chunk-
|
|
119
|
+
} from "../chunk-EXBGIC66.js";
|
|
118
120
|
import {
|
|
119
121
|
Runtime,
|
|
120
122
|
fromPromiseAbortable,
|
|
121
123
|
toPromise
|
|
122
|
-
} from "../chunk-
|
|
124
|
+
} from "../chunk-APQBU7TM.js";
|
|
123
125
|
import {
|
|
124
126
|
Cause,
|
|
125
127
|
asyncEffect,
|
|
@@ -143,7 +145,7 @@ import {
|
|
|
143
145
|
s,
|
|
144
146
|
schema,
|
|
145
147
|
validateValue
|
|
146
|
-
} from "../chunk-
|
|
148
|
+
} from "../chunk-FNWOH2T2.js";
|
|
147
149
|
import "../chunk-3RG5ZIWI.js";
|
|
148
150
|
|
|
149
151
|
// src/http/nodeTransport.ts
|
|
@@ -1759,6 +1761,7 @@ export {
|
|
|
1759
1761
|
isFetchHttpError,
|
|
1760
1762
|
isHttpError,
|
|
1761
1763
|
isKnownHttpError,
|
|
1764
|
+
isPromiseTransportDirect,
|
|
1762
1765
|
isRetryableHttpError,
|
|
1763
1766
|
isRetryableHttpStatus,
|
|
1764
1767
|
isSchema,
|
|
@@ -1796,6 +1799,7 @@ export {
|
|
|
1796
1799
|
makeSchemaIssue,
|
|
1797
1800
|
matchHttpError,
|
|
1798
1801
|
nodeHttpServerResource,
|
|
1802
|
+
noopSignal,
|
|
1799
1803
|
normalizeHeadersInit,
|
|
1800
1804
|
normalizeHttpError,
|
|
1801
1805
|
normalizeHttpHeaders,
|
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-URVS2OE2.mjs";
|
|
9
|
+
import "../chunk-KAPZHDO4.mjs";
|
|
10
10
|
import {
|
|
11
11
|
AdaptiveLimiter,
|
|
12
12
|
DEFAULT_CACHE_RELEVANT_HEADERS,
|
|
@@ -52,6 +52,7 @@ import {
|
|
|
52
52
|
isFetchHttpError,
|
|
53
53
|
isHttpError,
|
|
54
54
|
isKnownHttpError,
|
|
55
|
+
isPromiseTransportDirect,
|
|
55
56
|
isRetryableHttpError,
|
|
56
57
|
isRetryableHttpStatus,
|
|
57
58
|
isTaggedHttpError,
|
|
@@ -76,6 +77,7 @@ import {
|
|
|
76
77
|
makeRequestCompressionMiddleware,
|
|
77
78
|
makeResponseCompressionMiddleware,
|
|
78
79
|
matchHttpError,
|
|
80
|
+
noopSignal,
|
|
79
81
|
normalizeHeadersInit,
|
|
80
82
|
normalizeHttpError,
|
|
81
83
|
normalizeHttpHeaders,
|
|
@@ -103,23 +105,23 @@ import {
|
|
|
103
105
|
withPriority,
|
|
104
106
|
withRetry,
|
|
105
107
|
withRetryStream
|
|
106
|
-
} from "../chunk-
|
|
108
|
+
} from "../chunk-5RVHSBJ6.mjs";
|
|
107
109
|
import {
|
|
108
110
|
registerHttpEffect
|
|
109
111
|
} from "../chunk-MOO4L7F4.mjs";
|
|
110
|
-
import "../chunk-
|
|
112
|
+
import "../chunk-AQQQFNYD.mjs";
|
|
111
113
|
import "../chunk-B5JD23U7.mjs";
|
|
112
114
|
import {
|
|
113
115
|
fixed,
|
|
114
116
|
makeScheduleDriver,
|
|
115
117
|
resource,
|
|
116
118
|
take
|
|
117
|
-
} from "../chunk-
|
|
119
|
+
} from "../chunk-KDXNWGPB.mjs";
|
|
118
120
|
import {
|
|
119
121
|
Runtime,
|
|
120
122
|
fromPromiseAbortable,
|
|
121
123
|
toPromise
|
|
122
|
-
} from "../chunk-
|
|
124
|
+
} from "../chunk-MUMBUXU6.mjs";
|
|
123
125
|
import {
|
|
124
126
|
Cause,
|
|
125
127
|
asyncEffect,
|
|
@@ -143,7 +145,7 @@ import {
|
|
|
143
145
|
s,
|
|
144
146
|
schema,
|
|
145
147
|
validateValue
|
|
146
|
-
} from "../chunk-
|
|
148
|
+
} from "../chunk-UZQ3BB6W.mjs";
|
|
147
149
|
import "../chunk-Y6FXYEAI.mjs";
|
|
148
150
|
|
|
149
151
|
// src/http/nodeTransport.ts
|
|
@@ -1759,6 +1761,7 @@ export {
|
|
|
1759
1761
|
isFetchHttpError,
|
|
1760
1762
|
isHttpError,
|
|
1761
1763
|
isKnownHttpError,
|
|
1764
|
+
isPromiseTransportDirect,
|
|
1762
1765
|
isRetryableHttpError,
|
|
1763
1766
|
isRetryableHttpStatus,
|
|
1764
1767
|
isSchema,
|
|
@@ -1796,6 +1799,7 @@ export {
|
|
|
1796
1799
|
makeSchemaIssue,
|
|
1797
1800
|
matchHttpError,
|
|
1798
1801
|
nodeHttpServerResource,
|
|
1802
|
+
noopSignal,
|
|
1799
1803
|
normalizeHeadersInit,
|
|
1800
1804
|
normalizeHttpError,
|
|
1801
1805
|
normalizeHttpHeaders,
|