brass-runtime 1.19.2 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/dist/{chunk-QAHW7S3Q.cjs → chunk-62IBGQOU.cjs} +6 -6
- package/dist/{chunk-6AGAZD32.js → chunk-6LF3M4JC.js} +2 -2
- package/dist/{chunk-5X3MPWTR.mjs → chunk-6NXQL3IC.mjs} +370 -10
- package/dist/{chunk-TWEHIAUE.cjs → chunk-BDTBIYAM.cjs} +13 -13
- package/dist/{chunk-IA6BDGXW.mjs → chunk-D53GY2SZ.mjs} +2 -2
- package/dist/{chunk-UOKXJQAI.cjs → chunk-LA2PAO7J.cjs} +378 -18
- package/dist/{chunk-ZXXOXB3T.mjs → chunk-OS4F5HZE.mjs} +1 -1
- package/dist/{chunk-HKLZJ5UK.js → chunk-POH2WZBI.js} +370 -10
- package/dist/{chunk-BHX4MD35.js → chunk-VXZIP3IU.js} +1 -1
- package/dist/{defaultClient-hyVSNzSJ.d.ts → defaultClient-DLOa3gdw.d.ts} +101 -3
- package/dist/http/index.cjs +69 -33
- package/dist/http/index.d.ts +67 -4
- package/dist/http/index.js +37 -1
- package/dist/http/index.mjs +37 -1
- package/dist/http/testing.cjs +4 -4
- package/dist/http/testing.d.ts +1 -1
- package/dist/http/testing.js +1 -1
- package/dist/http/testing.mjs +1 -1
- package/dist/observability/index.cjs +3 -3
- package/dist/observability/index.d.ts +3 -3
- package/dist/observability/index.js +2 -2
- package/dist/observability/index.mjs +2 -2
- package/dist/perf/cli.cjs +18 -18
- package/dist/perf/cli.js +3 -3
- package/dist/perf/cli.mjs +3 -3
- package/dist/perf/index.cjs +5 -5
- package/dist/perf/index.js +3 -3
- package/dist/perf/index.mjs +3 -3
- package/dist/{server-BKKuzAW9.d.ts → server-BGXOabjo.d.ts} +1 -1
- package/package.json +1 -1
package/dist/http/index.cjs
CHANGED
|
@@ -105,7 +105,25 @@ require('../chunk-VXNWVAIG.cjs');
|
|
|
105
105
|
|
|
106
106
|
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
var _chunkLA2PAO7Jcjs = require('../chunk-LA2PAO7J.cjs');
|
|
109
127
|
|
|
110
128
|
|
|
111
129
|
var _chunkL6VB5N7Qcjs = require('../chunk-L6VB5N7Q.cjs');
|
|
@@ -180,7 +198,7 @@ function runNodeRequest(context, config, httpAgent, httpsAgent) {
|
|
|
180
198
|
return;
|
|
181
199
|
}
|
|
182
200
|
if (signal.aborted) {
|
|
183
|
-
cb({ _tag: "Failure", cause: _chunkMVGUEJ5Zcjs.Cause.fail(
|
|
201
|
+
cb({ _tag: "Failure", cause: _chunkMVGUEJ5Zcjs.Cause.fail(_chunkLA2PAO7Jcjs.abortErrorForSignal.call(void 0, signal)) });
|
|
184
202
|
return;
|
|
185
203
|
}
|
|
186
204
|
const started = nowMs();
|
|
@@ -197,12 +215,12 @@ function runNodeRequest(context, config, httpAgent, httpsAgent) {
|
|
|
197
215
|
const fail = (error) => {
|
|
198
216
|
finish({
|
|
199
217
|
_tag: "Failure",
|
|
200
|
-
cause: _chunkMVGUEJ5Zcjs.Cause.fail(
|
|
218
|
+
cause: _chunkMVGUEJ5Zcjs.Cause.fail(_chunkLA2PAO7Jcjs.normalizeHttpError.call(void 0, error, { signal }))
|
|
201
219
|
});
|
|
202
220
|
};
|
|
203
221
|
const options = {
|
|
204
222
|
method: request.method,
|
|
205
|
-
headers:
|
|
223
|
+
headers: _chunkLA2PAO7Jcjs.Request.headers.get(request),
|
|
206
224
|
agent: isHttps ? httpsAgent : httpAgent,
|
|
207
225
|
signal
|
|
208
226
|
};
|
|
@@ -218,7 +236,7 @@ function runNodeRequest(context, config, httpAgent, httpsAgent) {
|
|
|
218
236
|
value: {
|
|
219
237
|
status: _nullishCoalesce(response.statusCode, () => ( 0)),
|
|
220
238
|
statusText: _nullishCoalesce(response.statusMessage, () => ( "")),
|
|
221
|
-
headers:
|
|
239
|
+
headers: _chunkLA2PAO7Jcjs.normalizeHttpHeaders.call(void 0, response.headers),
|
|
222
240
|
bodyText: Buffer.concat(chunks, byteLength).toString("utf8"),
|
|
223
241
|
ms: Math.round(nowMs() - started)
|
|
224
242
|
}
|
|
@@ -228,7 +246,7 @@ function runNodeRequest(context, config, httpAgent, httpsAgent) {
|
|
|
228
246
|
});
|
|
229
247
|
abort = () => {
|
|
230
248
|
nodeRequest.destroy(isError(signal.reason) ? signal.reason : void 0);
|
|
231
|
-
finish({ _tag: "Failure", cause: _chunkMVGUEJ5Zcjs.Cause.fail(
|
|
249
|
+
finish({ _tag: "Failure", cause: _chunkMVGUEJ5Zcjs.Cause.fail(_chunkLA2PAO7Jcjs.abortErrorForSignal.call(void 0, signal)) });
|
|
232
250
|
};
|
|
233
251
|
signal.addEventListener("abort", abort, { once: true });
|
|
234
252
|
nodeRequest.on("error", fail);
|
|
@@ -274,7 +292,7 @@ function makeNodeHttpProxyClient(config = {}) {
|
|
|
274
292
|
nodeTransport,
|
|
275
293
|
...clientConfig
|
|
276
294
|
} = config;
|
|
277
|
-
return
|
|
295
|
+
return _chunkLA2PAO7Jcjs.makeDefaultHttpClient.call(void 0, {
|
|
278
296
|
...clientConfig,
|
|
279
297
|
preset,
|
|
280
298
|
transport: _nullishCoalesce(transport, () => ( makeNodeHttpTransport(nodeTransport)))
|
|
@@ -290,7 +308,7 @@ var resolveFinalUrl = (baseUrl, url) => {
|
|
|
290
308
|
}
|
|
291
309
|
};
|
|
292
310
|
var createHttpCore = (cfg = {}) => {
|
|
293
|
-
const wire =
|
|
311
|
+
const wire = _chunkLA2PAO7Jcjs.makeHttp.call(void 0, cfg);
|
|
294
312
|
const withPromise = (eff) => _chunkMVGUEJ5Zcjs.withAsyncPromise.call(void 0, (e, env) => _chunkJKHBEWQAcjs.toPromise.call(void 0, e, env))(eff);
|
|
295
313
|
const requestRaw = (req) => wire(req);
|
|
296
314
|
const toResponse = (w, body) => ({
|
|
@@ -300,7 +318,7 @@ var createHttpCore = (cfg = {}) => {
|
|
|
300
318
|
body
|
|
301
319
|
});
|
|
302
320
|
const decodeResponse = (w, validator, schemaName) => _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
303
|
-
|
|
321
|
+
_chunkLA2PAO7Jcjs.decodeJsonBodyEffect.call(void 0, w.bodyText, validator, { schemaName }),
|
|
304
322
|
(body) => _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, toResponse(w, body))
|
|
305
323
|
);
|
|
306
324
|
return {
|
|
@@ -308,7 +326,7 @@ var createHttpCore = (cfg = {}) => {
|
|
|
308
326
|
wire,
|
|
309
327
|
withPromise,
|
|
310
328
|
requestRaw,
|
|
311
|
-
buildReq:
|
|
329
|
+
buildReq: _chunkLA2PAO7Jcjs.buildHttpRequest,
|
|
312
330
|
toResponse,
|
|
313
331
|
decodeResponse
|
|
314
332
|
};
|
|
@@ -326,17 +344,17 @@ function httpClient(cfg = {}) {
|
|
|
326
344
|
};
|
|
327
345
|
const getJson = ((url, init) => {
|
|
328
346
|
const base = core.buildReq("GET", url, init);
|
|
329
|
-
const req =
|
|
347
|
+
const req = _chunkLA2PAO7Jcjs.setHeaderIfMissing.call(void 0, "accept", "application/json")(base);
|
|
330
348
|
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
349
|
});
|
|
332
350
|
const postJson = ((url, bodyObj, init) => {
|
|
333
351
|
return core.withPromise(
|
|
334
352
|
_chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
335
|
-
|
|
353
|
+
_chunkLA2PAO7Jcjs.encodeJsonBodyEffect.call(void 0, bodyObj, _optionalChain([init, 'optionalAccess', _3 => _3.bodySchema]), { schemaName: _optionalChain([init, 'optionalAccess', _4 => _4.bodySchemaName]) }),
|
|
336
354
|
(bodyText) => {
|
|
337
355
|
const base = core.buildReq("POST", url, init, bodyText);
|
|
338
|
-
const req =
|
|
339
|
-
|
|
356
|
+
const req = _chunkLA2PAO7Jcjs.setHeaderIfMissing.call(void 0, "content-type", "application/json")(
|
|
357
|
+
_chunkLA2PAO7Jcjs.setHeaderIfMissing.call(void 0, "accept", "application/json")(base)
|
|
340
358
|
);
|
|
341
359
|
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
360
|
}
|
|
@@ -351,7 +369,7 @@ function httpClient(cfg = {}) {
|
|
|
351
369
|
getJson,
|
|
352
370
|
postJson,
|
|
353
371
|
with: (mw) => make(wire.with(mw)),
|
|
354
|
-
withRetry: (p) => make(wire.with(
|
|
372
|
+
withRetry: (p) => make(wire.with(_chunkLA2PAO7Jcjs.withRetry.call(void 0, p))),
|
|
355
373
|
wire,
|
|
356
374
|
stats: () => wire.stats()
|
|
357
375
|
};
|
|
@@ -387,11 +405,11 @@ function httpClientWithMeta(cfg = {}) {
|
|
|
387
405
|
const startedAt = Date.now();
|
|
388
406
|
return core.withPromise(
|
|
389
407
|
_chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
390
|
-
|
|
408
|
+
_chunkLA2PAO7Jcjs.encodeJsonBodyEffect.call(void 0, bodyObj, _optionalChain([init, 'optionalAccess', _7 => _7.bodySchema]), { schemaName: _optionalChain([init, 'optionalAccess', _8 => _8.bodySchemaName]) }),
|
|
391
409
|
(bodyText) => {
|
|
392
410
|
const base = core.buildReq("POST", url, init, bodyText);
|
|
393
|
-
const req =
|
|
394
|
-
|
|
411
|
+
const req = _chunkLA2PAO7Jcjs.setHeaderIfMissing.call(void 0, "content-type", "application/json")(
|
|
412
|
+
_chunkLA2PAO7Jcjs.setHeaderIfMissing.call(void 0, "accept", "application/json")(base)
|
|
395
413
|
);
|
|
396
414
|
return _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
397
415
|
core.requestRaw(req),
|
|
@@ -421,7 +439,7 @@ function httpClientWithMeta(cfg = {}) {
|
|
|
421
439
|
};
|
|
422
440
|
const getJson = (url, init) => {
|
|
423
441
|
const base = core.buildReq("GET", url, init);
|
|
424
|
-
const req =
|
|
442
|
+
const req = _chunkLA2PAO7Jcjs.setHeaderIfMissing.call(void 0, "accept", "application/json")(base);
|
|
425
443
|
const startedAt = Date.now();
|
|
426
444
|
return core.withPromise(
|
|
427
445
|
_chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
@@ -453,13 +471,13 @@ function httpClientWithMeta(cfg = {}) {
|
|
|
453
471
|
};
|
|
454
472
|
}
|
|
455
473
|
function httpClientStream(cfg = {}) {
|
|
456
|
-
const wire =
|
|
474
|
+
const wire = _chunkLA2PAO7Jcjs.makeHttpStream.call(void 0, cfg);
|
|
457
475
|
const make = (w) => {
|
|
458
476
|
const withPromise = (eff) => _chunkMVGUEJ5Zcjs.withAsyncPromise.call(void 0, (e, env) => _chunkJKHBEWQAcjs.toPromise.call(void 0, e, env))(eff);
|
|
459
477
|
const request = (req) => withPromise(w(req));
|
|
460
478
|
const getStream = (url, init) => {
|
|
461
479
|
const base = { method: "GET", url, init };
|
|
462
|
-
const req =
|
|
480
|
+
const req = _chunkLA2PAO7Jcjs.setHeaderIfMissing.call(void 0, "accept", "*/*")(base);
|
|
463
481
|
return request(req);
|
|
464
482
|
};
|
|
465
483
|
return {
|
|
@@ -467,7 +485,7 @@ function httpClientStream(cfg = {}) {
|
|
|
467
485
|
getStream,
|
|
468
486
|
get: getStream,
|
|
469
487
|
with: (mw) => make(mw(w)),
|
|
470
|
-
withRetry: (p) => make(
|
|
488
|
+
withRetry: (p) => make(_chunkLA2PAO7Jcjs.withRetryStream.call(void 0, p)(w)),
|
|
471
489
|
wire: w,
|
|
472
490
|
stats: () => w.stats()
|
|
473
491
|
};
|
|
@@ -565,7 +583,7 @@ function resolveAdaptiveLimiter(config, next) {
|
|
|
565
583
|
function resolveAdaptiveLimiterKey(config, limiter, req) {
|
|
566
584
|
if (!limiter) return void 0;
|
|
567
585
|
if (config.adaptiveLimiterKey) return config.adaptiveLimiterKey(req);
|
|
568
|
-
const poolKey =
|
|
586
|
+
const poolKey = _chunkLA2PAO7Jcjs.getHttpRequestPolicy.call(void 0, req).poolKey;
|
|
569
587
|
if (poolKey) return poolKey;
|
|
570
588
|
if (limiter.keyResolver === "global") return "global";
|
|
571
589
|
try {
|
|
@@ -616,11 +634,11 @@ function withLogging(logger) {
|
|
|
616
634
|
logger({ phase: "request", req });
|
|
617
635
|
} catch (e5) {
|
|
618
636
|
}
|
|
619
|
-
const startedAt =
|
|
637
|
+
const startedAt = _chunkLA2PAO7Jcjs.now.call(void 0, );
|
|
620
638
|
return _chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
621
639
|
next(req),
|
|
622
640
|
(error) => {
|
|
623
|
-
const durationMs = Math.round(
|
|
641
|
+
const durationMs = Math.round(_chunkLA2PAO7Jcjs.now.call(void 0, ) - startedAt);
|
|
624
642
|
try {
|
|
625
643
|
logger({ phase: "error", req, error, durationMs });
|
|
626
644
|
} catch (e6) {
|
|
@@ -628,7 +646,7 @@ function withLogging(logger) {
|
|
|
628
646
|
return _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, error);
|
|
629
647
|
},
|
|
630
648
|
(res) => {
|
|
631
|
-
const durationMs = Math.round(
|
|
649
|
+
const durationMs = Math.round(_chunkLA2PAO7Jcjs.now.call(void 0, ) - startedAt);
|
|
632
650
|
try {
|
|
633
651
|
logger({ phase: "response", req, res, durationMs });
|
|
634
652
|
} catch (e7) {
|
|
@@ -1092,10 +1110,10 @@ function makeBuilder(config) {
|
|
|
1092
1110
|
prewarm: (layer = {}) => setLayer("prewarm", layer),
|
|
1093
1111
|
noPrewarm: () => setLayer("prewarm", false),
|
|
1094
1112
|
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",
|
|
1113
|
+
adaptiveLimiterPreset: (preset, overrides = {}) => setLayer("adaptiveLimiter", _chunkLA2PAO7Jcjs.makeAdaptiveLimiterConfig.call(void 0, preset, overrides)),
|
|
1114
|
+
conservativeLimiter: (overrides = {}) => setLayer("adaptiveLimiter", _chunkLA2PAO7Jcjs.makeAdaptiveLimiterConfig.call(void 0, "conservative", overrides)),
|
|
1115
|
+
balancedLimiter: (overrides = {}) => setLayer("adaptiveLimiter", _chunkLA2PAO7Jcjs.makeAdaptiveLimiterConfig.call(void 0, "balanced", overrides)),
|
|
1116
|
+
aggressiveLimiter: (overrides = {}) => setLayer("adaptiveLimiter", _chunkLA2PAO7Jcjs.makeAdaptiveLimiterConfig.call(void 0, "aggressive", overrides)),
|
|
1099
1117
|
noAdaptiveLimiter: () => setLayer("adaptiveLimiter", false),
|
|
1100
1118
|
pool: (layer = {}) => setLayer("pool", layer),
|
|
1101
1119
|
noPool: () => setLayer("pool", false),
|
|
@@ -1104,8 +1122,8 @@ function makeBuilder(config) {
|
|
|
1104
1122
|
middleware,
|
|
1105
1123
|
use: middleware,
|
|
1106
1124
|
configure: (next) => makeBuilder(mergeConfig(config, next)),
|
|
1107
|
-
build: () =>
|
|
1108
|
-
buildWire: () =>
|
|
1125
|
+
build: () => _chunkLA2PAO7Jcjs.makeDefaultHttpClient.call(void 0, freezeConfig(config)),
|
|
1126
|
+
buildWire: () => _chunkLA2PAO7Jcjs.makeDefaultHttpClient.call(void 0, freezeConfig(config)).wire
|
|
1109
1127
|
});
|
|
1110
1128
|
}
|
|
1111
1129
|
function httpClientBuilder(config = {}) {
|
|
@@ -1843,4 +1861,22 @@ function escapeRegExp(value) {
|
|
|
1843
1861
|
|
|
1844
1862
|
|
|
1845
1863
|
|
|
1846
|
-
|
|
1864
|
+
|
|
1865
|
+
|
|
1866
|
+
|
|
1867
|
+
|
|
1868
|
+
|
|
1869
|
+
|
|
1870
|
+
|
|
1871
|
+
|
|
1872
|
+
|
|
1873
|
+
|
|
1874
|
+
|
|
1875
|
+
|
|
1876
|
+
|
|
1877
|
+
|
|
1878
|
+
|
|
1879
|
+
|
|
1880
|
+
|
|
1881
|
+
|
|
1882
|
+
exports.AdaptiveLimiter = _chunkLA2PAO7Jcjs.AdaptiveLimiter; exports.ConfigValidationError = _chunkKPOL2YEOcjs.ConfigValidationError; exports.DEFAULT_CACHE_RELEVANT_HEADERS = _chunkLA2PAO7Jcjs.DEFAULT_CACHE_RELEVANT_HEADERS; exports.EmaComputer = _chunkLA2PAO7Jcjs.EmaComputer; exports.HttpClientService = _chunkLA2PAO7Jcjs.HttpClientService; exports.HttpConcurrencyPool = _chunkLA2PAO7Jcjs.HttpConcurrencyPool; exports.HttpServer = HttpServer; exports.LRUCache = _chunkLA2PAO7Jcjs.LRUCache; exports.LatencyWindow = _chunkLA2PAO7Jcjs.LatencyWindow; exports.LifecycleStatsTracker = _chunkLA2PAO7Jcjs.LifecycleStatsTracker; exports.PriorityQueue = _chunkLA2PAO7Jcjs.PriorityQueue; exports.SEPARATOR = _chunkLA2PAO7Jcjs.SEPARATOR; exports.SUPPORTED_ENCODINGS = _chunkLA2PAO7Jcjs.SUPPORTED_ENCODINGS; exports.Schema = _chunkKPOL2YEOcjs.Schema; exports.SchemaValidationException = _chunkKPOL2YEOcjs.SchemaValidationException; exports.abortErrorForSignal = _chunkLA2PAO7Jcjs.abortErrorForSignal; exports.adaptiveLimiterPresets = _chunkLA2PAO7Jcjs.adaptiveLimiterPresets; exports.backoffDelayMs = _chunkLA2PAO7Jcjs.backoffDelayMs; exports.clampPriority = _chunkLA2PAO7Jcjs.clampPriority; exports.computeCacheKey = _chunkLA2PAO7Jcjs.computeCacheKey; exports.computeGradient = _chunkLA2PAO7Jcjs.computeGradient; exports.computeNewLimit = _chunkLA2PAO7Jcjs.computeNewLimit; exports.decodeJsonBody = _chunkLA2PAO7Jcjs.decodeJsonBody; exports.decodeJsonBodyEffect = _chunkLA2PAO7Jcjs.decodeJsonBodyEffect; exports.decorate = _chunkLA2PAO7Jcjs.decorate; exports.decorateStream = _chunkLA2PAO7Jcjs.decorateStream; exports.defaultHttpClientPreset = _chunkLA2PAO7Jcjs.defaultHttpClientPreset; exports.defaultRetryOnError = _chunkLA2PAO7Jcjs.defaultRetryOnError; exports.defaultRetryOnStatus = _chunkLA2PAO7Jcjs.defaultRetryOnStatus; exports.defaultRetryableMethods = _chunkLA2PAO7Jcjs.defaultRetryableMethods; exports.defineHttpPolicyPresets = _chunkLA2PAO7Jcjs.defineHttpPolicyPresets; exports.detectPlatform = _chunkLA2PAO7Jcjs.detectPlatform; exports.empty = empty; exports.encodeJsonBodyEffect = _chunkLA2PAO7Jcjs.encodeJsonBodyEffect; exports.executeProbe = _chunkLA2PAO7Jcjs.executeProbe; exports.fetchLabel = _chunkLA2PAO7Jcjs.fetchLabel; exports.formatConfigError = _chunkKPOL2YEOcjs.formatConfigError; exports.formatHttpError = _chunkLA2PAO7Jcjs.formatHttpError; exports.formatIssues = _chunkKPOL2YEOcjs.formatIssues; exports.getHttpRequestPolicy = _chunkLA2PAO7Jcjs.getHttpRequestPolicy; exports.headersOf = _chunkLA2PAO7Jcjs.headersOf; exports.httpBuilder = httpBuilder; exports.httpClient = httpClient; exports.httpClientBuilder = httpClientBuilder; exports.httpClientStream = httpClientStream; exports.httpClientWithMeta = httpClientWithMeta; exports.httpErrorStatus = _chunkLA2PAO7Jcjs.httpErrorStatus; exports.httpPolicy = _chunkLA2PAO7Jcjs.httpPolicy; exports.httpRoute = httpRoute; exports.isAbortError = _chunkLA2PAO7Jcjs.isAbortError; exports.isAbortHttpError = _chunkLA2PAO7Jcjs.isAbortHttpError; exports.isCircuitBreakerOpen = _chunkLA2PAO7Jcjs.isCircuitBreakerOpen; exports.isConfigValidationError = _chunkKPOL2YEOcjs.isConfigValidationError; exports.isExternalAbortError = _chunkLA2PAO7Jcjs.isExternalAbortError; exports.isExternalTimeoutError = _chunkLA2PAO7Jcjs.isExternalTimeoutError; exports.isFetchHttpError = _chunkLA2PAO7Jcjs.isFetchHttpError; exports.isHttpError = _chunkLA2PAO7Jcjs.isHttpError; exports.isKnownHttpError = _chunkLA2PAO7Jcjs.isKnownHttpError; exports.isPromiseTransportDirect = _chunkLA2PAO7Jcjs.isPromiseTransportDirect; exports.isRetryableHttpError = _chunkLA2PAO7Jcjs.isRetryableHttpError; exports.isRetryableHttpStatus = _chunkLA2PAO7Jcjs.isRetryableHttpStatus; exports.isSchema = _chunkKPOL2YEOcjs.isSchema; exports.isTaggedHttpError = _chunkLA2PAO7Jcjs.isTaggedHttpError; exports.isTimeoutHttpError = _chunkLA2PAO7Jcjs.isTimeoutHttpError; exports.isValidationError = _chunkLA2PAO7Jcjs.isValidationError; exports.json = json; exports.linkAbortSignals = _chunkLA2PAO7Jcjs.linkAbortSignals; exports.makeAdaptiveLimiter = _chunkLA2PAO7Jcjs.makeAdaptiveLimiter; exports.makeAdaptiveLimiterConfig = _chunkLA2PAO7Jcjs.makeAdaptiveLimiterConfig; exports.makeBareMetalHttp = _chunkLA2PAO7Jcjs.makeBareMetalHttp; exports.makeBareMetalHttpStream = _chunkLA2PAO7Jcjs.makeBareMetalHttpStream; exports.makeBudgetSemaphore = _chunkLA2PAO7Jcjs.makeBudgetSemaphore; exports.makeCompressionMiddleware = _chunkLA2PAO7Jcjs.makeCompressionMiddleware; exports.makeConnectionStateMap = _chunkLA2PAO7Jcjs.makeConnectionStateMap; exports.makeDefaultHttpClient = _chunkLA2PAO7Jcjs.makeDefaultHttpClient; exports.makeDefaultHttpClientLayer = _chunkLA2PAO7Jcjs.makeDefaultHttpClientLayer; exports.makeFetchStreamTransport = _chunkLA2PAO7Jcjs.makeFetchStreamTransport; exports.makeFetchTransport = _chunkLA2PAO7Jcjs.makeFetchTransport; exports.makeHttp = _chunkLA2PAO7Jcjs.makeHttp; exports.makeHttpClient = _chunkLA2PAO7Jcjs.makeHttpClient; exports.makeHttpClientBuilder = makeHttpClientBuilder; exports.makeHttpRouter = makeHttpRouter; exports.makeHttpServerResource = makeHttpServerResource; exports.makeHttpStats = _chunkLA2PAO7Jcjs.makeHttpStats; exports.makeHttpStream = _chunkLA2PAO7Jcjs.makeHttpStream; exports.makeJsonParseValidationError = _chunkLA2PAO7Jcjs.makeJsonParseValidationError; exports.makeLifecycleClient = _chunkLA2PAO7Jcjs.makeLifecycleClient; exports.makeNodeHttpProxyClient = makeNodeHttpProxyClient; exports.makeNodeHttpServer = makeNodeHttpServer; exports.makeNodeHttpServerResource = makeNodeHttpServerResource; exports.makeNodeHttpTransport = makeNodeHttpTransport; exports.makePool = _chunkLA2PAO7Jcjs.makePool; exports.makePrewarmManager = _chunkLA2PAO7Jcjs.makePrewarmManager; exports.makePromiseHttpTransport = _chunkLA2PAO7Jcjs.makePromiseHttpTransport; exports.makeRequestCompressionMiddleware = _chunkLA2PAO7Jcjs.makeRequestCompressionMiddleware; exports.makeResponseCompressionMiddleware = _chunkLA2PAO7Jcjs.makeResponseCompressionMiddleware; exports.makeRuntimeHealthRoute = makeRuntimeHealthRoute; exports.makeRuntimeReadinessRoute = makeRuntimeReadinessRoute; exports.makeSchemaIssue = _chunkKPOL2YEOcjs.makeSchemaIssue; exports.matchHttpError = _chunkLA2PAO7Jcjs.matchHttpError; exports.nodeHttpServerResource = nodeHttpServerResource; exports.noopSignal = _chunkLA2PAO7Jcjs.noopSignal; exports.normalizeHeadersInit = _chunkLA2PAO7Jcjs.normalizeHeadersInit; exports.normalizeHttpError = _chunkLA2PAO7Jcjs.normalizeHttpError; exports.normalizeHttpHeaders = _chunkLA2PAO7Jcjs.normalizeHttpHeaders; exports.normalizeRequest = _chunkLA2PAO7Jcjs.normalizeRequest; exports.normalizeRetryBudget = _chunkLA2PAO7Jcjs.normalizeRetryBudget; exports.parseCacheKey = _chunkLA2PAO7Jcjs.parseCacheKey; exports.parseConfig = _chunkKPOL2YEOcjs.parseConfig; exports.prewarmConnections = prewarmConnections; exports.prewarmHttpConnections = prewarmHttpConnections; exports.promiseHttpTransport = _chunkLA2PAO7Jcjs.promiseHttpTransport; exports.releaseFailure = _chunkLA2PAO7Jcjs.releaseFailure; exports.releaseSuccess = _chunkLA2PAO7Jcjs.releaseSuccess; exports.requestPriority = _chunkLA2PAO7Jcjs.requestPriority; exports.resolveConfig = _chunkLA2PAO7Jcjs.resolveConfig; exports.resolveHttpPoolKey = _chunkLA2PAO7Jcjs.resolveHttpPoolKey; exports.resolveHttpRequestPolicyPresets = _chunkLA2PAO7Jcjs.resolveHttpRequestPolicyPresets; exports.resolvePositiveTimeout = _chunkLA2PAO7Jcjs.resolvePositiveTimeout; exports.resolveRequestUrl = _chunkLA2PAO7Jcjs.resolveRequestUrl; exports.retryAfterMs = _chunkLA2PAO7Jcjs.retryAfterMs; exports.route = route; exports.runDirectTransport = _chunkLA2PAO7Jcjs.runDirectTransport; exports.runPoolTransport = _chunkLA2PAO7Jcjs.runPoolTransport; exports.runTransportEffect = _chunkLA2PAO7Jcjs.runTransportEffect; exports.runtimeHealthRoute = runtimeHealthRoute; exports.runtimeReadinessRoute = runtimeReadinessRoute; exports.s = _chunkKPOL2YEOcjs.s; exports.schema = _chunkKPOL2YEOcjs.schema; exports.text = text; exports.timeoutReason = _chunkLA2PAO7Jcjs.timeoutReason; exports.toHttpError = _chunkLA2PAO7Jcjs.toHttpError; exports.validateBareMetalConfig = _chunkLA2PAO7Jcjs.validateBareMetalConfig; exports.validateConfig = _chunkLA2PAO7Jcjs.validateConfig; exports.validateFetchAvailable = _chunkLA2PAO7Jcjs.validateFetchAvailable; exports.validateOrigin = _chunkLA2PAO7Jcjs.validateOrigin; exports.validateValue = _chunkKPOL2YEOcjs.validateValue; exports.validatedJson = _chunkLA2PAO7Jcjs.validatedJson; exports.validatedJsonResponse = _chunkLA2PAO7Jcjs.validatedJsonResponse; exports.withAuth = withAuth; exports.withBatch = _chunkLA2PAO7Jcjs.withBatch; exports.withCache = _chunkLA2PAO7Jcjs.withCache; exports.withCircuitBreaker = withCircuitBreaker; exports.withConnectionPrewarming = withConnectionPrewarming; exports.withDedup = _chunkLA2PAO7Jcjs.withDedup; exports.withHttpPolicyPresets = _chunkLA2PAO7Jcjs.withHttpPolicyPresets; exports.withHttpRequestPolicy = _chunkLA2PAO7Jcjs.withHttpRequestPolicy; exports.withLogging = withLogging; exports.withMiddleware = _chunkLA2PAO7Jcjs.withMiddleware; exports.withPriority = _chunkLA2PAO7Jcjs.withPriority; exports.withRequestBatching = withRequestBatching; exports.withResponseHeader = withResponseHeader; exports.withResponseTransform = withResponseTransform; exports.withRetry = _chunkLA2PAO7Jcjs.withRetry; exports.withRetryStream = _chunkLA2PAO7Jcjs.withRetryStream; exports.withTracing = withTracing;
|
package/dist/http/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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
|
|
2
|
-
export {
|
|
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 HttpStreamTransport, u as HttpPoolConfig, v as AdaptiveLimiterConfig, a as HttpClient, w as HttpClientStream, x as DefaultHttpClientPreset, y as DedupConfig$1, B as BatchConfig, z as CacheConfig$1, E as PriorityConfig$1, F as RetryPolicy, G as PrewarmLifecycleConfig, I as AdaptiveLimiterPreset } from '../defaultClient-DLOa3gdw.js';
|
|
2
|
+
export { J as AdaptiveAcquireOptions, K as AdaptiveBaselineStrategy, M as AdaptiveHeadroomContext, N as AdaptiveHeadroomMode, O as AdaptiveHeadroomStrategy, Q as AdaptiveLease, S as AdaptiveLimiterDiagnostics, T as AdaptiveLimiterKeySnapshot, A as AdaptiveLimiterStats, U as AdaptiveQueueLoadShedding, V as AdaptiveQueueStrategy, W as AdaptiveReleaseInfo, X as BatchFunction, Y as CachePolicyResult, Z as CompressionStats, _ as DecompressResult, $ as Decompressor, a0 as DefaultGetJson, a1 as DefaultHttpClientFeatures, a2 as DefaultPostJson, a3 as Dx, a4 as HttpBody, a5 as HttpClientStreamFn, a6 as HttpConcurrencyPool, a7 as HttpErrorHandlers, a8 as HttpInit, a9 as HttpJsonInit, aa as HttpMeta, ab as HttpPolicyPreset, ac as HttpPolicyPresets, ad as HttpPoolKeyResolver, ae as HttpPoolKeyStats, af as HttpPoolLease, ag as HttpPoolStats, ah as HttpPostJsonBodyInit, ai as HttpPostJsonInit, aj as HttpPostJsonSchemaBodyInit, ak as HttpRequestPolicy, al as HttpRequestPolicyRef, am as HttpRequestRetryOverride, an as HttpResponse, ao as HttpResponseWithMeta, ap as HttpRetryScheduleInput, 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 decorateStream, b6 as defaultHttpClientPreset, b7 as defaultRetryOnError, b8 as defaultRetryOnStatus, b9 as defaultRetryableMethods, ba as defineHttpPolicyPresets, bb as encodeJsonBodyEffect, bc as fetchLabel, bd as formatHttpError, be as getHttpRequestPolicy, bf as headersOf, bg as httpClient, bh as httpClientStream, bi as httpClientWithMeta, bj as httpErrorStatus, bk as httpPolicy, bl as isAbortError, bm as isAbortHttpError, bn as isCircuitBreakerOpen, bo as isExternalAbortError, bp as isExternalTimeoutError, bq as isFetchHttpError, br as isHttpError, bs as isKnownHttpError, bt as isPromiseTransportDirect, bu as isRetryableHttpError, bv as isRetryableHttpStatus, bw as isTaggedHttpError, bx as isTimeoutHttpError, by as isValidationError, bz as linkAbortSignals, bA as makeAdaptiveLimiter, bB as makeAdaptiveLimiterConfig, bC as makeDefaultHttpClient, bD as makeFetchStreamTransport, bE as makeFetchTransport, bF as makeHttp, bG as makeHttpStats, bH as makeHttpStream, bI as makeJsonParseValidationError, bJ as makePool, bK as makePromiseHttpTransport, bL as matchHttpError, bM as noopSignal, bN as normalizeHeadersInit, bO as normalizeHttpError, bP as normalizeHttpHeaders, bQ as normalizeRequest, bR as normalizeRetryBudget, bS as promiseHttpTransport, bT as releaseFailure, bU as releaseSuccess, bV as requestPriority, bW as resolveConfig, bX as resolveHttpPoolKey, bY as resolveHttpRequestPolicyPresets, bZ as resolvePositiveTimeout, b_ as resolveRequestUrl, b$ as retryAfterMs, c0 as runDirectTransport, c1 as runPoolTransport, c2 as runTransportEffect, c3 as timeoutReason, c4 as toHttpError, c5 as validateConfig, c6 as validatedJson, c7 as validatedJsonResponse, c8 as withBatch, c9 as withHttpPolicyPresets, ca as withHttpRequestPolicy, cb as withMiddleware, cc as withRetry, cd as withRetryStream } from '../defaultClient-DLOa3gdw.js';
|
|
3
3
|
import { Agent, Server } from 'node:http';
|
|
4
4
|
import { Agent as Agent$1 } from 'node:https';
|
|
5
5
|
import { c as CircuitBreakerConfig, l as Schedule, a as LayerContext, S as ServiceTag, L as Layer } from '../layer-CsNGeVee.js';
|
|
6
6
|
import { T as Tracer, R as Resource } from '../tracing-DIAUf2x8.js';
|
|
7
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-BGXOabjo.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
12
|
import '../stream-B8c_UKZq.js';
|
|
@@ -1417,6 +1417,69 @@ declare function prewarmConnections(config?: ConnectionPrewarmConfig): Async<unk
|
|
|
1417
1417
|
declare const prewarmHttpConnections: typeof prewarmConnections;
|
|
1418
1418
|
declare function withConnectionPrewarming(config?: ConnectionPrewarmingMiddlewareConfig): HttpMiddleware;
|
|
1419
1419
|
|
|
1420
|
+
/**
|
|
1421
|
+
* Event emitted by the bare-metal client. Intentionally minimal — only
|
|
1422
|
+
* construction-time warnings and lifecycle signals are emitted.
|
|
1423
|
+
*/
|
|
1424
|
+
type BareMetalHttpEvent = {
|
|
1425
|
+
readonly type: "warning";
|
|
1426
|
+
readonly message: string;
|
|
1427
|
+
};
|
|
1428
|
+
/**
|
|
1429
|
+
* Configuration for the bare-metal HTTP client factories.
|
|
1430
|
+
*
|
|
1431
|
+
* Contains only wire-level options — no lifecycle/middleware config.
|
|
1432
|
+
* All fields are optional; sensible defaults (fetch transport, no pool,
|
|
1433
|
+
* no timeout) are applied when omitted.
|
|
1434
|
+
*/
|
|
1435
|
+
interface BareMetalHttpConfig {
|
|
1436
|
+
/** Base URL prepended to relative request paths. */
|
|
1437
|
+
readonly baseUrl?: string;
|
|
1438
|
+
/** Default headers merged under per-request headers. */
|
|
1439
|
+
readonly headers?: Record<string, string>;
|
|
1440
|
+
/** Request timeout in milliseconds (≥ 1). Disabled when omitted. */
|
|
1441
|
+
readonly timeoutMs?: number;
|
|
1442
|
+
/** Effect-based transport. Defaults to fetch when omitted. */
|
|
1443
|
+
readonly transport?: HttpTransport;
|
|
1444
|
+
/** Effect-based streaming transport. Defaults to fetch streaming when omitted. */
|
|
1445
|
+
readonly streamTransport?: HttpStreamTransport;
|
|
1446
|
+
/** Connection pool config. Set `false` to explicitly disable. */
|
|
1447
|
+
readonly pool?: false | HttpPoolConfig;
|
|
1448
|
+
/** Adaptive concurrency limiter config. Set `false` to explicitly disable. */
|
|
1449
|
+
readonly adaptiveLimiter?: false | AdaptiveLimiterConfig;
|
|
1450
|
+
/** Optional event callback for construction-time warnings. */
|
|
1451
|
+
readonly onEvent?: (event: BareMetalHttpEvent) => void;
|
|
1452
|
+
}
|
|
1453
|
+
/**
|
|
1454
|
+
* Validates a `BareMetalHttpConfig` object at construction time.
|
|
1455
|
+
* Throws `ConfigValidationError` with field-path issues on invalid input.
|
|
1456
|
+
*/
|
|
1457
|
+
declare function validateBareMetalConfig(config: BareMetalHttpConfig): void;
|
|
1458
|
+
/**
|
|
1459
|
+
* Creates a bare-metal HTTP client with zero middleware overhead.
|
|
1460
|
+
*
|
|
1461
|
+
* The returned client delegates directly to `runDirectTransport` or
|
|
1462
|
+
* `runPoolTransport` — no lifecycle stack (retry, dedup, cache, batch,
|
|
1463
|
+
* priority scheduling), no compression, no prewarm.
|
|
1464
|
+
*
|
|
1465
|
+
* Typed errors, cancellation, pool/adaptive-limiter, and stats are preserved.
|
|
1466
|
+
*/
|
|
1467
|
+
declare function makeBareMetalHttp(cfg?: BareMetalHttpConfig): HttpClient;
|
|
1468
|
+
/**
|
|
1469
|
+
* Creates a bare-metal streaming HTTP client with zero middleware overhead.
|
|
1470
|
+
*
|
|
1471
|
+
* Mirrors `makeBareMetalHttp` but uses `streamTransport` and returns an
|
|
1472
|
+
* `HttpClientStream` conforming to `HttpClientStreamFn`.
|
|
1473
|
+
*
|
|
1474
|
+
* Pool leases are acquired before the stream transport and released upon
|
|
1475
|
+
* receiving response headers — body stream consumption is independent of
|
|
1476
|
+
* pool capacity.
|
|
1477
|
+
*
|
|
1478
|
+
* No lifecycle stack (retry, dedup, cache, batch, priority scheduling),
|
|
1479
|
+
* no compression, no prewarm.
|
|
1480
|
+
*/
|
|
1481
|
+
declare function makeBareMetalHttpStream(cfg?: BareMetalHttpConfig): HttpClientStream;
|
|
1482
|
+
|
|
1420
1483
|
type HttpClientBuilder = {
|
|
1421
1484
|
readonly config: () => DefaultHttpClientConfig;
|
|
1422
1485
|
readonly baseUrl: (baseUrl: string) => HttpClientBuilder;
|
|
@@ -1616,4 +1679,4 @@ type DefaultHttpClientLayerOptions = {
|
|
|
1616
1679
|
};
|
|
1617
1680
|
declare function makeDefaultHttpClientLayer(config?: DefaultHttpClientLayerConfig, options?: DefaultHttpClientLayerOptions): Layer<LayerContext, unknown, LayerContext>;
|
|
1618
1681
|
|
|
1619
|
-
export { AdaptiveLimiter, AdaptiveLimiterConfig, AdaptiveLimiterPreset, AnyJsonSchemaLike, BatchConfig, type BudgetSemaphore, CacheConfig$1 as CacheConfig, type CacheKeyComponents, CompressionConfig, CompressionMiddlewareResult, type ConnectionPrewarmAttempt, type ConnectionPrewarmConfig, type ConnectionPrewarmEvent, type ConnectionPrewarmResult, type ConnectionPrewarmingMiddlewareConfig, type ConnectionStateMap, DEFAULT_CACHE_RELEVANT_HEADERS, DedupConfig$1 as DedupConfig, DefaultHttpClient, DefaultHttpClientConfig, type DefaultHttpClientLayerConfig, type DefaultHttpClientLayerOptions, DefaultHttpClientPreset, EmaComputer, type HttpCircuitBreakerConfig, type HttpClientBuilder, HttpClientFn, HttpClientService, HttpClientStats, HttpError, HttpMethod, HttpMiddleware, HttpPoolConfig, HttpRequest, type HttpRouteMatch, type HttpRouteOptions, type HttpRouteSchemas, type HttpRouter, type HttpRouterOptions, type HttpRuntimeHealthRouteOptions, HttpServer, type HttpServerBody, type HttpServerContext, type HttpServerHandler, type HttpServerHeaders, type HttpServerMethod, type HttpServerMiddleware, type HttpServerParams, type HttpServerQuery, type HttpServerRequest, type HttpServerResponse, type HttpServerRoute, HttpTransport, HttpWireResponse, InferJsonSchema, type InferServerPart, LRUCache, type LRUCacheConfig, LatencyWindow, LifecycleClient, LifecycleClientConfig, LifecycleEvent, LifecycleEventType, LifecycleStats, LifecycleStatsTracker, type LogEvent, type NodeHttpProxyClientConfig, type NodeHttpServerError, type NodeHttpServerHandle, type NodeHttpServerOptions, type NodeHttpServerShutdownState, type NodeHttpTransport, type NodeHttpTransportConfig, PrewarmConfig, PrewarmLifecycleConfig, type PrewarmManager, PrewarmOriginState, PrewarmResult, PrewarmStatusSnapshot, PriorityConfig$1 as PriorityConfig, PriorityQueue, type PriorityQueueEntry, type ProbeOutcome, type RequestBatchingConfig, type RequestBatchingEvent, RequestCompressionConfig, RequestCompressionMiddlewareResult, RetryPolicy, type RoutePathParamNames, type RoutePathParams, SEPARATOR, clampPriority, computeCacheKey, computeGradient, computeNewLimit, detectPlatform, empty, executeProbe, httpBuilder, httpClientBuilder, httpRoute, json, makeBudgetSemaphore, makeCompressionMiddleware, makeConnectionStateMap, makeDefaultHttpClientLayer, makeHttpClient, makeHttpClientBuilder, makeHttpRouter, makeHttpServerResource, makeLifecycleClient, makeNodeHttpProxyClient, makeNodeHttpServer, makeNodeHttpServerResource, makeNodeHttpTransport, makePrewarmManager, makeRequestCompressionMiddleware, makeResponseCompressionMiddleware, makeRuntimeHealthRoute, makeRuntimeReadinessRoute, nodeHttpServerResource, parseCacheKey, prewarmConnections, prewarmHttpConnections, route, runtimeHealthRoute, runtimeReadinessRoute, text, validateFetchAvailable, validateOrigin, withAuth, withCache, withCircuitBreaker, withConnectionPrewarming, withDedup, withLogging, withPriority, withRequestBatching, withResponseHeader, withResponseTransform, withTracing };
|
|
1682
|
+
export { AdaptiveLimiter, AdaptiveLimiterConfig, AdaptiveLimiterPreset, AnyJsonSchemaLike, type BareMetalHttpConfig, type BareMetalHttpEvent, BatchConfig, type BudgetSemaphore, CacheConfig$1 as CacheConfig, type CacheKeyComponents, CompressionConfig, CompressionMiddlewareResult, type ConnectionPrewarmAttempt, type ConnectionPrewarmConfig, type ConnectionPrewarmEvent, type ConnectionPrewarmResult, type ConnectionPrewarmingMiddlewareConfig, type ConnectionStateMap, DEFAULT_CACHE_RELEVANT_HEADERS, DedupConfig$1 as DedupConfig, DefaultHttpClient, DefaultHttpClientConfig, type DefaultHttpClientLayerConfig, type DefaultHttpClientLayerOptions, DefaultHttpClientPreset, EmaComputer, type HttpCircuitBreakerConfig, HttpClient, type HttpClientBuilder, HttpClientFn, HttpClientService, HttpClientStats, HttpClientStream, HttpError, HttpMethod, HttpMiddleware, HttpPoolConfig, HttpRequest, type HttpRouteMatch, type HttpRouteOptions, type HttpRouteSchemas, type HttpRouter, type HttpRouterOptions, type HttpRuntimeHealthRouteOptions, HttpServer, type HttpServerBody, type HttpServerContext, type HttpServerHandler, type HttpServerHeaders, type HttpServerMethod, type HttpServerMiddleware, type HttpServerParams, type HttpServerQuery, type HttpServerRequest, type HttpServerResponse, type HttpServerRoute, HttpStreamTransport, HttpTransport, HttpWireResponse, InferJsonSchema, type InferServerPart, LRUCache, type LRUCacheConfig, LatencyWindow, LifecycleClient, LifecycleClientConfig, LifecycleEvent, LifecycleEventType, LifecycleStats, LifecycleStatsTracker, type LogEvent, type NodeHttpProxyClientConfig, type NodeHttpServerError, type NodeHttpServerHandle, type NodeHttpServerOptions, type NodeHttpServerShutdownState, type NodeHttpTransport, type NodeHttpTransportConfig, PrewarmConfig, PrewarmLifecycleConfig, type PrewarmManager, PrewarmOriginState, PrewarmResult, PrewarmStatusSnapshot, PriorityConfig$1 as PriorityConfig, PriorityQueue, type PriorityQueueEntry, type ProbeOutcome, type RequestBatchingConfig, type RequestBatchingEvent, RequestCompressionConfig, RequestCompressionMiddlewareResult, RetryPolicy, type RoutePathParamNames, type RoutePathParams, SEPARATOR, clampPriority, computeCacheKey, computeGradient, computeNewLimit, detectPlatform, empty, executeProbe, httpBuilder, httpClientBuilder, httpRoute, json, makeBareMetalHttp, makeBareMetalHttpStream, makeBudgetSemaphore, makeCompressionMiddleware, makeConnectionStateMap, makeDefaultHttpClientLayer, makeHttpClient, makeHttpClientBuilder, makeHttpRouter, makeHttpServerResource, makeLifecycleClient, makeNodeHttpProxyClient, makeNodeHttpServer, makeNodeHttpServerResource, makeNodeHttpTransport, makePrewarmManager, makeRequestCompressionMiddleware, makeResponseCompressionMiddleware, makeRuntimeHealthRoute, makeRuntimeReadinessRoute, nodeHttpServerResource, parseCacheKey, prewarmConnections, prewarmHttpConnections, route, runtimeHealthRoute, runtimeReadinessRoute, text, validateBareMetalConfig, validateFetchAvailable, validateOrigin, withAuth, withCache, withCircuitBreaker, withConnectionPrewarming, withDedup, withLogging, withPriority, withRequestBatching, withResponseHeader, withResponseTransform, withTracing };
|
package/dist/http/index.js
CHANGED
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
decodeJsonBody,
|
|
32
32
|
decodeJsonBodyEffect,
|
|
33
33
|
decorate,
|
|
34
|
+
decorateStream,
|
|
34
35
|
defaultHttpClientPreset,
|
|
35
36
|
defaultRetryOnError,
|
|
36
37
|
defaultRetryOnStatus,
|
|
@@ -39,6 +40,7 @@ import {
|
|
|
39
40
|
detectPlatform,
|
|
40
41
|
encodeJsonBodyEffect,
|
|
41
42
|
executeProbe,
|
|
43
|
+
fetchLabel,
|
|
42
44
|
formatHttpError,
|
|
43
45
|
getHttpRequestPolicy,
|
|
44
46
|
headersOf,
|
|
@@ -59,7 +61,10 @@ import {
|
|
|
59
61
|
isTimeoutHttpError,
|
|
60
62
|
isValidationError,
|
|
61
63
|
linkAbortSignals,
|
|
64
|
+
makeAdaptiveLimiter,
|
|
62
65
|
makeAdaptiveLimiterConfig,
|
|
66
|
+
makeBareMetalHttp,
|
|
67
|
+
makeBareMetalHttpStream,
|
|
63
68
|
makeBudgetSemaphore,
|
|
64
69
|
makeCompressionMiddleware,
|
|
65
70
|
makeConnectionStateMap,
|
|
@@ -69,9 +74,11 @@ import {
|
|
|
69
74
|
makeFetchTransport,
|
|
70
75
|
makeHttp,
|
|
71
76
|
makeHttpClient,
|
|
77
|
+
makeHttpStats,
|
|
72
78
|
makeHttpStream,
|
|
73
79
|
makeJsonParseValidationError,
|
|
74
80
|
makeLifecycleClient,
|
|
81
|
+
makePool,
|
|
75
82
|
makePrewarmManager,
|
|
76
83
|
makePromiseHttpTransport,
|
|
77
84
|
makeRequestCompressionMiddleware,
|
|
@@ -81,16 +88,27 @@ import {
|
|
|
81
88
|
normalizeHeadersInit,
|
|
82
89
|
normalizeHttpError,
|
|
83
90
|
normalizeHttpHeaders,
|
|
91
|
+
normalizeRequest,
|
|
84
92
|
normalizeRetryBudget,
|
|
85
93
|
now,
|
|
86
94
|
parseCacheKey,
|
|
87
95
|
promiseHttpTransport,
|
|
96
|
+
releaseFailure,
|
|
97
|
+
releaseSuccess,
|
|
98
|
+
requestPriority,
|
|
88
99
|
resolveConfig,
|
|
89
100
|
resolveHttpPoolKey,
|
|
90
101
|
resolveHttpRequestPolicyPresets,
|
|
102
|
+
resolvePositiveTimeout,
|
|
103
|
+
resolveRequestUrl,
|
|
91
104
|
retryAfterMs,
|
|
105
|
+
runDirectTransport,
|
|
106
|
+
runPoolTransport,
|
|
107
|
+
runTransportEffect,
|
|
92
108
|
setHeaderIfMissing,
|
|
109
|
+
timeoutReason,
|
|
93
110
|
toHttpError,
|
|
111
|
+
validateBareMetalConfig,
|
|
94
112
|
validateConfig,
|
|
95
113
|
validateFetchAvailable,
|
|
96
114
|
validateOrigin,
|
|
@@ -105,7 +123,7 @@ import {
|
|
|
105
123
|
withPriority,
|
|
106
124
|
withRetry,
|
|
107
125
|
withRetryStream
|
|
108
|
-
} from "../chunk-
|
|
126
|
+
} from "../chunk-POH2WZBI.js";
|
|
109
127
|
import {
|
|
110
128
|
registerHttpEffect
|
|
111
129
|
} from "../chunk-TRM4JUZQ.js";
|
|
@@ -1730,6 +1748,7 @@ export {
|
|
|
1730
1748
|
decodeJsonBody,
|
|
1731
1749
|
decodeJsonBodyEffect,
|
|
1732
1750
|
decorate,
|
|
1751
|
+
decorateStream,
|
|
1733
1752
|
defaultHttpClientPreset,
|
|
1734
1753
|
defaultRetryOnError,
|
|
1735
1754
|
defaultRetryOnStatus,
|
|
@@ -1739,6 +1758,7 @@ export {
|
|
|
1739
1758
|
empty,
|
|
1740
1759
|
encodeJsonBodyEffect,
|
|
1741
1760
|
executeProbe,
|
|
1761
|
+
fetchLabel,
|
|
1742
1762
|
formatConfigError,
|
|
1743
1763
|
formatHttpError,
|
|
1744
1764
|
formatIssues,
|
|
@@ -1770,7 +1790,10 @@ export {
|
|
|
1770
1790
|
isValidationError,
|
|
1771
1791
|
json,
|
|
1772
1792
|
linkAbortSignals,
|
|
1793
|
+
makeAdaptiveLimiter,
|
|
1773
1794
|
makeAdaptiveLimiterConfig,
|
|
1795
|
+
makeBareMetalHttp,
|
|
1796
|
+
makeBareMetalHttpStream,
|
|
1774
1797
|
makeBudgetSemaphore,
|
|
1775
1798
|
makeCompressionMiddleware,
|
|
1776
1799
|
makeConnectionStateMap,
|
|
@@ -1783,6 +1806,7 @@ export {
|
|
|
1783
1806
|
makeHttpClientBuilder,
|
|
1784
1807
|
makeHttpRouter,
|
|
1785
1808
|
makeHttpServerResource,
|
|
1809
|
+
makeHttpStats,
|
|
1786
1810
|
makeHttpStream,
|
|
1787
1811
|
makeJsonParseValidationError,
|
|
1788
1812
|
makeLifecycleClient,
|
|
@@ -1790,6 +1814,7 @@ export {
|
|
|
1790
1814
|
makeNodeHttpServer,
|
|
1791
1815
|
makeNodeHttpServerResource,
|
|
1792
1816
|
makeNodeHttpTransport,
|
|
1817
|
+
makePool,
|
|
1793
1818
|
makePrewarmManager,
|
|
1794
1819
|
makePromiseHttpTransport,
|
|
1795
1820
|
makeRequestCompressionMiddleware,
|
|
@@ -1803,23 +1828,34 @@ export {
|
|
|
1803
1828
|
normalizeHeadersInit,
|
|
1804
1829
|
normalizeHttpError,
|
|
1805
1830
|
normalizeHttpHeaders,
|
|
1831
|
+
normalizeRequest,
|
|
1806
1832
|
normalizeRetryBudget,
|
|
1807
1833
|
parseCacheKey,
|
|
1808
1834
|
parseConfig,
|
|
1809
1835
|
prewarmConnections,
|
|
1810
1836
|
prewarmHttpConnections,
|
|
1811
1837
|
promiseHttpTransport,
|
|
1838
|
+
releaseFailure,
|
|
1839
|
+
releaseSuccess,
|
|
1840
|
+
requestPriority,
|
|
1812
1841
|
resolveConfig,
|
|
1813
1842
|
resolveHttpPoolKey,
|
|
1814
1843
|
resolveHttpRequestPolicyPresets,
|
|
1844
|
+
resolvePositiveTimeout,
|
|
1845
|
+
resolveRequestUrl,
|
|
1815
1846
|
retryAfterMs,
|
|
1816
1847
|
route,
|
|
1848
|
+
runDirectTransport,
|
|
1849
|
+
runPoolTransport,
|
|
1850
|
+
runTransportEffect,
|
|
1817
1851
|
runtimeHealthRoute,
|
|
1818
1852
|
runtimeReadinessRoute,
|
|
1819
1853
|
s,
|
|
1820
1854
|
schema,
|
|
1821
1855
|
text,
|
|
1856
|
+
timeoutReason,
|
|
1822
1857
|
toHttpError,
|
|
1858
|
+
validateBareMetalConfig,
|
|
1823
1859
|
validateConfig,
|
|
1824
1860
|
validateFetchAvailable,
|
|
1825
1861
|
validateOrigin,
|