brass-runtime 1.17.0 → 1.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -3
- package/dist/agent/cli/main.cjs +31 -32
- package/dist/agent/cli/main.js +3 -4
- package/dist/agent/cli/main.mjs +3 -4
- package/dist/agent/index.cjs +4 -5
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +3 -4
- package/dist/agent/index.mjs +3 -4
- package/dist/{chunk-7X3K5RMS.js → chunk-22HZQG5F.js} +9 -11
- package/dist/{chunk-GLE2WY7Z.cjs → chunk-2JHJ4YHS.cjs} +417 -124
- package/dist/{chunk-Q2I37RP3.cjs → chunk-2OW6IFY2.cjs} +44 -323
- package/dist/{chunk-7ZPEZ57L.cjs → chunk-5LC7V2OZ.cjs} +18 -20
- package/dist/{chunk-AGR5B2BC.cjs → chunk-5RZ7YITF.cjs} +564 -12
- package/dist/{chunk-DNFJLJMW.mjs → chunk-6MLAZPBL.mjs} +48 -24
- package/dist/{chunk-EJ6BPYVR.mjs → chunk-6V2AWT4R.mjs} +1 -1
- package/dist/{chunk-3AYM6WPJ.js → chunk-7DU7IQHK.js} +20 -299
- package/dist/{chunk-SK7UZRNI.mjs → chunk-7GBJYOX7.mjs} +528 -23
- package/dist/chunk-7TKI527D.cjs +123 -0
- package/dist/{chunk-52OB2ROS.js → chunk-7VQLEN37.js} +2 -4
- package/dist/{chunk-KH4SYAOS.mjs → chunk-B5FKOLTB.mjs} +20 -299
- package/dist/{chunk-FHQGHPMO.mjs → chunk-BC6Q6BCO.mjs} +2 -4
- package/dist/{chunk-4P2HHGAX.mjs → chunk-COOW7BJX.mjs} +32 -11
- package/dist/{chunk-2HQTDLHF.mjs → chunk-EEN5OTCR.mjs} +555 -3
- package/dist/{chunk-KZJQ723N.cjs → chunk-EICAJDNX.cjs} +13 -15
- package/dist/chunk-ELIECDYN.cjs +33 -0
- package/dist/{chunk-GYM3LLGS.mjs → chunk-H626ZTDZ.mjs} +399 -106
- package/dist/{chunk-C3MDXTRZ.js → chunk-HCJ4S3YB.js} +48 -24
- package/dist/{chunk-7JIJOVCT.js → chunk-IPSMXUWA.js} +2 -4
- package/dist/{chunk-4ROBZFL6.cjs → chunk-J6DUHITE.cjs} +6 -8
- package/dist/{chunk-6RY2FFN4.mjs → chunk-JWIEMBE6.mjs} +9 -11
- package/dist/{chunk-PD4EJTQC.cjs → chunk-KNTJ7FQB.cjs} +5 -5
- package/dist/chunk-KTGDLBLD.mjs +123 -0
- package/dist/chunk-LSYQ3C2M.js +33 -0
- package/dist/{chunk-RKGKFN2A.js → chunk-OW5VHAOE.js} +1 -1
- package/dist/{chunk-EOC4UHBS.mjs → chunk-RBHNOKH4.mjs} +2 -2
- package/dist/{chunk-6IXXWIUM.js → chunk-S4HXADU4.js} +555 -3
- package/dist/{chunk-FH2X7BVP.js → chunk-TTSPIU3U.js} +399 -106
- package/dist/{chunk-5QC7LRZ3.js → chunk-UAKAF32U.js} +2 -2
- package/dist/{chunk-CZIVE6NT.cjs → chunk-UUMKZJRJ.cjs} +48 -24
- package/dist/{chunk-MBEJI5HF.mjs → chunk-WCBNXPN6.mjs} +2 -4
- package/dist/{chunk-52PPNNI4.cjs → chunk-WGE2FEZE.cjs} +2 -2
- package/dist/{chunk-WBGRHGBP.cjs → chunk-WI7GZF3B.cjs} +114 -93
- package/dist/chunk-WUDHOZIH.js +6234 -0
- package/dist/{chunk-F6XWZQY4.cjs → chunk-WVSZOPGQ.cjs} +583 -78
- package/dist/chunk-XPIMJQYS.cjs +6234 -0
- package/dist/{chunk-VWIPB6I5.js → chunk-YGR2IN4R.js} +528 -23
- package/dist/chunk-YM3EDNYD.js +123 -0
- package/dist/chunk-YWLLH27R.mjs +33 -0
- package/dist/{chunk-BKK77SBA.js → chunk-YZ5LQ32F.js} +32 -11
- package/dist/chunk-Z3ZZMQUZ.mjs +6234 -0
- package/dist/core/index.cjs +37 -9
- package/dist/core/index.d.ts +19 -152
- package/dist/core/index.js +86 -58
- package/dist/core/index.mjs +86 -58
- package/dist/defaultClient-Cid0JoUR.d.ts +1648 -0
- package/dist/{effect-DIUHZ9IN.d.ts → effect-DnGUuhw6.d.ts} +22 -1
- package/dist/http/index.cjs +206 -59
- package/dist/http/index.d.ts +55 -819
- package/dist/http/index.js +220 -73
- package/dist/http/index.mjs +220 -73
- package/dist/http/testing.cjs +31 -10
- package/dist/http/testing.d.ts +16 -5
- package/dist/http/testing.js +29 -8
- package/dist/http/testing.mjs +29 -8
- package/dist/index.cjs +116 -88
- package/dist/index.d.ts +9 -8
- package/dist/index.js +87 -59
- package/dist/index.mjs +87 -59
- package/dist/{schedule-CK3Ml_7p.d.ts → layer-D2LFcBVx.d.ts} +176 -2
- package/dist/observability/index.cjs +20 -7
- package/dist/observability/index.d.ts +32 -8
- package/dist/observability/index.js +19 -6
- package/dist/observability/index.mjs +19 -6
- package/dist/perf/cli.cjs +26 -28
- package/dist/perf/cli.js +11 -13
- package/dist/perf/cli.mjs +11 -13
- package/dist/perf/index.cjs +13 -15
- package/dist/perf/index.js +11 -13
- package/dist/perf/index.mjs +11 -13
- package/dist/schema/index.cjs +2 -2
- package/dist/schema/index.js +1 -1
- package/dist/schema/index.mjs +1 -1
- package/dist/{server-D6JZ15_e.d.ts → server-Bf1zNYZk.d.ts} +5 -5
- package/dist/{stream-B4oK9JFP.d.ts → stream-I7bkvF7a.d.ts} +1 -1
- package/dist/{tracer-Hwt1cl7h.d.ts → tracer-DF83nLn6.d.ts} +2 -2
- package/dist/{tracing-DqbTKGcf.d.ts → tracing-CWV4gT0u.d.ts} +1 -1
- package/docs/README.md +2 -0
- package/docs/ai/PUBLIC_API.md +28 -7
- package/docs/articles/brass-runtime-http-observability.md +467 -0
- package/docs/frameworks/angular.md +51 -0
- package/docs/frameworks/express.md +58 -0
- package/docs/frameworks/fastify.md +49 -0
- package/docs/frameworks/nestjs.md +53 -0
- package/docs/frameworks/nextjs.md +55 -0
- package/docs/frameworks/react.md +44 -0
- package/docs/frameworks/vanilla.md +56 -0
- package/docs/guides/layers.md +130 -0
- package/docs/http-recipes.md +31 -1
- package/docs/http.md +50 -1
- package/docs/observability.md +132 -0
- package/docs/performance-profiler.md +6 -2
- package/docs/recipes/layers.md +46 -2
- package/docs/recipes/testing.md +25 -0
- package/package.json +6 -2
- package/dist/chunk-3LOYJFRR.cjs +0 -300
- package/dist/chunk-3Y2RIUMM.js +0 -300
- package/dist/chunk-5EC274J5.cjs +0 -2874
- package/dist/chunk-5VRJNBLZ.mjs +0 -2874
- package/dist/chunk-62AZW6UT.cjs +0 -313
- package/dist/chunk-74ZTY6CP.js +0 -2871
- package/dist/chunk-7CMJS3QE.mjs +0 -2871
- package/dist/chunk-A2OM6NEH.mjs +0 -194
- package/dist/chunk-B33ICAKP.js +0 -313
- package/dist/chunk-JF5WGYJJ.cjs +0 -194
- package/dist/chunk-KN32XNTH.mjs +0 -313
- package/dist/chunk-KQLYONSE.cjs +0 -2871
- package/dist/chunk-L2SYFEBS.js +0 -194
- package/dist/chunk-MIIYDLGM.js +0 -2874
- package/dist/chunk-PWC3RBQE.mjs +0 -300
- package/dist/client-CZHU674n.d.ts +0 -820
package/dist/http/index.cjs
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
+
var _chunk7TKI527Dcjs = require('../chunk-7TKI527D.cjs');
|
|
3
4
|
|
|
4
|
-
var _chunk62AZW6UTcjs = require('../chunk-62AZW6UT.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
var _chunkWI7GZF3Bcjs = require('../chunk-WI7GZF3B.cjs');
|
|
9
|
+
require('../chunk-WGE2FEZE.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
8
12
|
|
|
9
13
|
|
|
10
14
|
|
|
@@ -37,7 +41,6 @@ var _chunk62AZW6UTcjs = require('../chunk-62AZW6UT.cjs');
|
|
|
37
41
|
|
|
38
42
|
|
|
39
43
|
|
|
40
|
-
var _chunkKQLYONSEcjs = require('../chunk-KQLYONSE.cjs');
|
|
41
44
|
|
|
42
45
|
|
|
43
46
|
|
|
@@ -75,24 +78,16 @@ var _chunkKQLYONSEcjs = require('../chunk-KQLYONSE.cjs');
|
|
|
75
78
|
|
|
76
79
|
|
|
77
80
|
|
|
78
|
-
var _chunk5EC274J5cjs = require('../chunk-5EC274J5.cjs');
|
|
79
81
|
|
|
80
82
|
|
|
81
|
-
var _chunkL6VB5N7Qcjs = require('../chunk-L6VB5N7Q.cjs');
|
|
82
|
-
require('../chunk-KZJQ723N.cjs');
|
|
83
|
-
require('../chunk-SA6HUJVI.cjs');
|
|
84
83
|
|
|
85
84
|
|
|
86
85
|
|
|
87
86
|
|
|
88
|
-
var _chunkAGR5B2BCcjs = require('../chunk-AGR5B2BC.cjs');
|
|
89
|
-
require('../chunk-JF5WGYJJ.cjs');
|
|
90
87
|
|
|
91
88
|
|
|
92
89
|
|
|
93
90
|
|
|
94
|
-
var _chunkWBGRHGBPcjs = require('../chunk-WBGRHGBP.cjs');
|
|
95
|
-
require('../chunk-52PPNNI4.cjs');
|
|
96
91
|
|
|
97
92
|
|
|
98
93
|
|
|
@@ -110,17 +105,23 @@ require('../chunk-52PPNNI4.cjs');
|
|
|
110
105
|
|
|
111
106
|
|
|
112
107
|
|
|
108
|
+
var _chunkXPIMJQYScjs = require('../chunk-XPIMJQYS.cjs');
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
var _chunkL6VB5N7Qcjs = require('../chunk-L6VB5N7Q.cjs');
|
|
112
|
+
require('../chunk-EICAJDNX.cjs');
|
|
113
|
+
require('../chunk-SA6HUJVI.cjs');
|
|
113
114
|
|
|
114
115
|
|
|
115
116
|
|
|
116
117
|
|
|
117
118
|
|
|
118
|
-
var
|
|
119
|
+
var _chunk5RZ7YITFcjs = require('../chunk-5RZ7YITF.cjs');
|
|
119
120
|
|
|
120
121
|
|
|
121
122
|
|
|
122
123
|
|
|
123
|
-
var
|
|
124
|
+
var _chunk2JHJ4YHScjs = require('../chunk-2JHJ4YHS.cjs');
|
|
124
125
|
|
|
125
126
|
|
|
126
127
|
|
|
@@ -144,9 +145,142 @@ var _chunkMVGUEJ5Zcjs = require('../chunk-MVGUEJ5Z.cjs');
|
|
|
144
145
|
|
|
145
146
|
|
|
146
147
|
|
|
147
|
-
var
|
|
148
|
+
var _chunkUUMKZJRJcjs = require('../chunk-UUMKZJRJ.cjs');
|
|
148
149
|
require('../chunk-OBGZSXTJ.cjs');
|
|
149
150
|
|
|
151
|
+
// src/http/nodeTransport.ts
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
var _http = require('http');
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
var _https = require('https');
|
|
160
|
+
var nowMs = () => typeof performance !== "undefined" && typeof performance.now === "function" ? performance.now() : Date.now();
|
|
161
|
+
var toAgentOptions = (config) => ({
|
|
162
|
+
keepAlive: _nullishCoalesce(config.keepAlive, () => ( true)),
|
|
163
|
+
...config.maxSockets !== void 0 ? { maxSockets: config.maxSockets } : {},
|
|
164
|
+
...config.maxFreeSockets !== void 0 ? { maxFreeSockets: config.maxFreeSockets } : {}
|
|
165
|
+
});
|
|
166
|
+
var isError = (value) => value instanceof Error;
|
|
167
|
+
function unsupportedProtocol(url) {
|
|
168
|
+
return {
|
|
169
|
+
_tag: "BadUrl",
|
|
170
|
+
message: `Unsupported URL protocol for node HTTP transport: ${url.protocol}`
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
function runNodeRequest(context, config, httpAgent, httpsAgent) {
|
|
174
|
+
return _chunkMVGUEJ5Zcjs.asyncEffect.call(void 0, (_env, cb) => {
|
|
175
|
+
const { request, url, signal } = context;
|
|
176
|
+
const isHttps = url.protocol === "https:";
|
|
177
|
+
const isHttp = url.protocol === "http:";
|
|
178
|
+
if (!isHttp && !isHttps) {
|
|
179
|
+
cb({ _tag: "Failure", cause: _chunkMVGUEJ5Zcjs.Cause.fail(unsupportedProtocol(url)) });
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
if (signal.aborted) {
|
|
183
|
+
cb({ _tag: "Failure", cause: _chunkMVGUEJ5Zcjs.Cause.fail(_chunkXPIMJQYScjs.abortErrorForSignal.call(void 0, signal)) });
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
const started = nowMs();
|
|
187
|
+
const chunks = [];
|
|
188
|
+
let byteLength = 0;
|
|
189
|
+
let done = false;
|
|
190
|
+
let abort = () => void 0;
|
|
191
|
+
const finish = (exit) => {
|
|
192
|
+
if (done) return;
|
|
193
|
+
done = true;
|
|
194
|
+
signal.removeEventListener("abort", abort);
|
|
195
|
+
cb(exit);
|
|
196
|
+
};
|
|
197
|
+
const fail = (error) => {
|
|
198
|
+
finish({
|
|
199
|
+
_tag: "Failure",
|
|
200
|
+
cause: _chunkMVGUEJ5Zcjs.Cause.fail(_chunkXPIMJQYScjs.normalizeHttpError.call(void 0, error, { signal }))
|
|
201
|
+
});
|
|
202
|
+
};
|
|
203
|
+
const options = {
|
|
204
|
+
method: request.method,
|
|
205
|
+
headers: _chunkXPIMJQYScjs.Request.headers.get(request),
|
|
206
|
+
agent: isHttps ? httpsAgent : httpAgent,
|
|
207
|
+
signal
|
|
208
|
+
};
|
|
209
|
+
const nodeRequest = (isHttps ? _https.request : (0, _http.request))(url, options, (response) => {
|
|
210
|
+
response.on("data", (chunk) => {
|
|
211
|
+
const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
212
|
+
chunks.push(buffer);
|
|
213
|
+
byteLength += buffer.length;
|
|
214
|
+
});
|
|
215
|
+
response.on("end", () => {
|
|
216
|
+
finish({
|
|
217
|
+
_tag: "Success",
|
|
218
|
+
value: {
|
|
219
|
+
status: _nullishCoalesce(response.statusCode, () => ( 0)),
|
|
220
|
+
statusText: _nullishCoalesce(response.statusMessage, () => ( "")),
|
|
221
|
+
headers: _chunkXPIMJQYScjs.normalizeHttpHeaders.call(void 0, response.headers),
|
|
222
|
+
bodyText: Buffer.concat(chunks, byteLength).toString("utf8"),
|
|
223
|
+
ms: Math.round(nowMs() - started)
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
response.on("error", fail);
|
|
228
|
+
});
|
|
229
|
+
abort = () => {
|
|
230
|
+
nodeRequest.destroy(isError(signal.reason) ? signal.reason : void 0);
|
|
231
|
+
finish({ _tag: "Failure", cause: _chunkMVGUEJ5Zcjs.Cause.fail(_chunkXPIMJQYScjs.abortErrorForSignal.call(void 0, signal)) });
|
|
232
|
+
};
|
|
233
|
+
signal.addEventListener("abort", abort, { once: true });
|
|
234
|
+
nodeRequest.on("error", fail);
|
|
235
|
+
if (config.socketTimeoutMs !== void 0 && config.socketTimeoutMs > 0) {
|
|
236
|
+
nodeRequest.setTimeout(config.socketTimeoutMs, () => {
|
|
237
|
+
nodeRequest.destroy(Object.assign(new Error("Node HTTP socket timed out"), {
|
|
238
|
+
code: "ETIMEDOUT"
|
|
239
|
+
}));
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
if (request.body !== void 0) {
|
|
243
|
+
nodeRequest.write(request.body);
|
|
244
|
+
}
|
|
245
|
+
nodeRequest.end();
|
|
246
|
+
return () => {
|
|
247
|
+
if (done) return;
|
|
248
|
+
nodeRequest.destroy(Object.assign(new Error("Node HTTP transport aborted"), {
|
|
249
|
+
name: "AbortError",
|
|
250
|
+
code: "ABORT_ERR"
|
|
251
|
+
}));
|
|
252
|
+
finish({ _tag: "Failure", cause: _chunkMVGUEJ5Zcjs.Cause.fail({ _tag: "Abort" }) });
|
|
253
|
+
};
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
function makeNodeHttpTransport(config = {}) {
|
|
257
|
+
const agentOptions = toAgentOptions(config);
|
|
258
|
+
const httpAgent = _nullishCoalesce(config.httpAgent, () => ( new (0, _http.Agent)(agentOptions)));
|
|
259
|
+
const httpsAgent = _nullishCoalesce(config.httpsAgent, () => ( new (0, _https.Agent)(agentOptions)));
|
|
260
|
+
const ownsHttpAgent = config.httpAgent === void 0;
|
|
261
|
+
const ownsHttpsAgent = config.httpsAgent === void 0;
|
|
262
|
+
const transport = (context) => runNodeRequest(context, config, httpAgent, httpsAgent);
|
|
263
|
+
return Object.assign(transport, {
|
|
264
|
+
destroy: () => {
|
|
265
|
+
if (ownsHttpAgent) httpAgent.destroy();
|
|
266
|
+
if (ownsHttpsAgent) httpsAgent.destroy();
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
function makeNodeHttpProxyClient(config = {}) {
|
|
271
|
+
const {
|
|
272
|
+
preset = "highThroughputProxy",
|
|
273
|
+
transport,
|
|
274
|
+
nodeTransport,
|
|
275
|
+
...clientConfig
|
|
276
|
+
} = config;
|
|
277
|
+
return _chunkXPIMJQYScjs.makeDefaultHttpClient.call(void 0, {
|
|
278
|
+
...clientConfig,
|
|
279
|
+
preset,
|
|
280
|
+
transport: _nullishCoalesce(transport, () => ( makeNodeHttpTransport(nodeTransport)))
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
|
|
150
284
|
// src/http/httpClient.ts
|
|
151
285
|
var resolveFinalUrl = (baseUrl, url) => {
|
|
152
286
|
try {
|
|
@@ -156,8 +290,8 @@ var resolveFinalUrl = (baseUrl, url) => {
|
|
|
156
290
|
}
|
|
157
291
|
};
|
|
158
292
|
var createHttpCore = (cfg = {}) => {
|
|
159
|
-
const wire =
|
|
160
|
-
const withPromise = (eff) => _chunkMVGUEJ5Zcjs.withAsyncPromise.call(void 0, (e, env) =>
|
|
293
|
+
const wire = _chunkXPIMJQYScjs.makeHttp.call(void 0, cfg);
|
|
294
|
+
const withPromise = (eff) => _chunkMVGUEJ5Zcjs.withAsyncPromise.call(void 0, (e, env) => _chunk2JHJ4YHScjs.toPromise.call(void 0, e, env))(eff);
|
|
161
295
|
const requestRaw = (req) => wire(req);
|
|
162
296
|
const toResponse = (w, body) => ({
|
|
163
297
|
status: w.status,
|
|
@@ -166,7 +300,7 @@ var createHttpCore = (cfg = {}) => {
|
|
|
166
300
|
body
|
|
167
301
|
});
|
|
168
302
|
const decodeResponse = (w, validator, schemaName) => _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
169
|
-
|
|
303
|
+
_chunkXPIMJQYScjs.decodeJsonBodyEffect.call(void 0, w.bodyText, validator, { schemaName }),
|
|
170
304
|
(body) => _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, toResponse(w, body))
|
|
171
305
|
);
|
|
172
306
|
return {
|
|
@@ -174,7 +308,7 @@ var createHttpCore = (cfg = {}) => {
|
|
|
174
308
|
wire,
|
|
175
309
|
withPromise,
|
|
176
310
|
requestRaw,
|
|
177
|
-
buildReq:
|
|
311
|
+
buildReq: _chunkXPIMJQYScjs.buildHttpRequest,
|
|
178
312
|
toResponse,
|
|
179
313
|
decodeResponse
|
|
180
314
|
};
|
|
@@ -192,17 +326,17 @@ function httpClient(cfg = {}) {
|
|
|
192
326
|
};
|
|
193
327
|
const getJson = ((url, init) => {
|
|
194
328
|
const base = core.buildReq("GET", url, init);
|
|
195
|
-
const req =
|
|
329
|
+
const req = _chunkXPIMJQYScjs.setHeaderIfMissing.call(void 0, "accept", "application/json")(base);
|
|
196
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]))));
|
|
197
331
|
});
|
|
198
332
|
const postJson = ((url, bodyObj, init) => {
|
|
199
333
|
return core.withPromise(
|
|
200
334
|
_chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
201
|
-
|
|
335
|
+
_chunkXPIMJQYScjs.encodeJsonBodyEffect.call(void 0, bodyObj, _optionalChain([init, 'optionalAccess', _3 => _3.bodySchema]), { schemaName: _optionalChain([init, 'optionalAccess', _4 => _4.bodySchemaName]) }),
|
|
202
336
|
(bodyText) => {
|
|
203
337
|
const base = core.buildReq("POST", url, init, bodyText);
|
|
204
|
-
const req =
|
|
205
|
-
|
|
338
|
+
const req = _chunkXPIMJQYScjs.setHeaderIfMissing.call(void 0, "content-type", "application/json")(
|
|
339
|
+
_chunkXPIMJQYScjs.setHeaderIfMissing.call(void 0, "accept", "application/json")(base)
|
|
206
340
|
);
|
|
207
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])));
|
|
208
342
|
}
|
|
@@ -217,7 +351,7 @@ function httpClient(cfg = {}) {
|
|
|
217
351
|
getJson,
|
|
218
352
|
postJson,
|
|
219
353
|
with: (mw) => make(wire.with(mw)),
|
|
220
|
-
withRetry: (p) => make(wire.with(
|
|
354
|
+
withRetry: (p) => make(wire.with(_chunkXPIMJQYScjs.withRetry.call(void 0, p))),
|
|
221
355
|
wire,
|
|
222
356
|
stats: () => wire.stats()
|
|
223
357
|
};
|
|
@@ -253,11 +387,11 @@ function httpClientWithMeta(cfg = {}) {
|
|
|
253
387
|
const startedAt = Date.now();
|
|
254
388
|
return core.withPromise(
|
|
255
389
|
_chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
256
|
-
|
|
390
|
+
_chunkXPIMJQYScjs.encodeJsonBodyEffect.call(void 0, bodyObj, _optionalChain([init, 'optionalAccess', _7 => _7.bodySchema]), { schemaName: _optionalChain([init, 'optionalAccess', _8 => _8.bodySchemaName]) }),
|
|
257
391
|
(bodyText) => {
|
|
258
392
|
const base = core.buildReq("POST", url, init, bodyText);
|
|
259
|
-
const req =
|
|
260
|
-
|
|
393
|
+
const req = _chunkXPIMJQYScjs.setHeaderIfMissing.call(void 0, "content-type", "application/json")(
|
|
394
|
+
_chunkXPIMJQYScjs.setHeaderIfMissing.call(void 0, "accept", "application/json")(base)
|
|
261
395
|
);
|
|
262
396
|
return _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
263
397
|
core.requestRaw(req),
|
|
@@ -287,7 +421,7 @@ function httpClientWithMeta(cfg = {}) {
|
|
|
287
421
|
};
|
|
288
422
|
const getJson = (url, init) => {
|
|
289
423
|
const base = core.buildReq("GET", url, init);
|
|
290
|
-
const req =
|
|
424
|
+
const req = _chunkXPIMJQYScjs.setHeaderIfMissing.call(void 0, "accept", "application/json")(base);
|
|
291
425
|
const startedAt = Date.now();
|
|
292
426
|
return core.withPromise(
|
|
293
427
|
_chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
@@ -319,13 +453,13 @@ function httpClientWithMeta(cfg = {}) {
|
|
|
319
453
|
};
|
|
320
454
|
}
|
|
321
455
|
function httpClientStream(cfg = {}) {
|
|
322
|
-
const wire =
|
|
456
|
+
const wire = _chunkXPIMJQYScjs.makeHttpStream.call(void 0, cfg);
|
|
323
457
|
const make = (w) => {
|
|
324
|
-
const withPromise = (eff) => _chunkMVGUEJ5Zcjs.withAsyncPromise.call(void 0, (e, env) =>
|
|
458
|
+
const withPromise = (eff) => _chunkMVGUEJ5Zcjs.withAsyncPromise.call(void 0, (e, env) => _chunk2JHJ4YHScjs.toPromise.call(void 0, e, env))(eff);
|
|
325
459
|
const request = (req) => withPromise(w(req));
|
|
326
460
|
const getStream = (url, init) => {
|
|
327
461
|
const base = { method: "GET", url, init };
|
|
328
|
-
const req =
|
|
462
|
+
const req = _chunkXPIMJQYScjs.setHeaderIfMissing.call(void 0, "accept", "*/*")(base);
|
|
329
463
|
return request(req);
|
|
330
464
|
};
|
|
331
465
|
return {
|
|
@@ -333,7 +467,7 @@ function httpClientStream(cfg = {}) {
|
|
|
333
467
|
getStream,
|
|
334
468
|
get: getStream,
|
|
335
469
|
with: (mw) => make(mw(w)),
|
|
336
|
-
withRetry: (p) => make(
|
|
470
|
+
withRetry: (p) => make(_chunkXPIMJQYScjs.withRetryStream.call(void 0, p)(w)),
|
|
337
471
|
wire: w,
|
|
338
472
|
stats: () => w.stats()
|
|
339
473
|
};
|
|
@@ -349,7 +483,7 @@ function withCircuitBreaker(config = {}) {
|
|
|
349
483
|
try {
|
|
350
484
|
const origin = new URL(url).origin;
|
|
351
485
|
if (!breakers.has(origin)) {
|
|
352
|
-
breakers.set(origin,
|
|
486
|
+
breakers.set(origin, _chunk7TKI527Dcjs.makeCircuitBreaker.call(void 0, {
|
|
353
487
|
...config,
|
|
354
488
|
onStateChange: (from, to) => {
|
|
355
489
|
_optionalChain([config, 'access', _13 => _13.onStateChange, 'optionalCall', _14 => _14(from, to)]);
|
|
@@ -360,7 +494,7 @@ function withCircuitBreaker(config = {}) {
|
|
|
360
494
|
return breakers.get(origin);
|
|
361
495
|
} catch (e3) {
|
|
362
496
|
if (!breakers.has("__global__")) {
|
|
363
|
-
breakers.set("__global__",
|
|
497
|
+
breakers.set("__global__", _chunk7TKI527Dcjs.makeCircuitBreaker.call(void 0, {
|
|
364
498
|
...config,
|
|
365
499
|
onStateChange: (from, to) => {
|
|
366
500
|
_optionalChain([config, 'access', _15 => _15.onStateChange, 'optionalCall', _16 => _16(from, to)]);
|
|
@@ -379,7 +513,7 @@ function withCircuitBreaker(config = {}) {
|
|
|
379
513
|
return protectLazy(breaker2, next, req, onOpen);
|
|
380
514
|
};
|
|
381
515
|
}
|
|
382
|
-
const breaker =
|
|
516
|
+
const breaker = _chunk7TKI527Dcjs.makeCircuitBreaker.call(void 0, {
|
|
383
517
|
...config,
|
|
384
518
|
onStateChange: (from, to) => {
|
|
385
519
|
_optionalChain([config, 'access', _19 => _19.onStateChange, 'optionalCall', _20 => _20(from, to)]);
|
|
@@ -431,7 +565,7 @@ function resolveAdaptiveLimiter(config, next) {
|
|
|
431
565
|
function resolveAdaptiveLimiterKey(config, limiter, req) {
|
|
432
566
|
if (!limiter) return void 0;
|
|
433
567
|
if (config.adaptiveLimiterKey) return config.adaptiveLimiterKey(req);
|
|
434
|
-
const poolKey =
|
|
568
|
+
const poolKey = _chunkXPIMJQYScjs.getHttpRequestPolicy.call(void 0, req).poolKey;
|
|
435
569
|
if (poolKey) return poolKey;
|
|
436
570
|
if (limiter.keyResolver === "global") return "global";
|
|
437
571
|
try {
|
|
@@ -482,11 +616,11 @@ function withLogging(logger) {
|
|
|
482
616
|
logger({ phase: "request", req });
|
|
483
617
|
} catch (e5) {
|
|
484
618
|
}
|
|
485
|
-
const startedAt =
|
|
619
|
+
const startedAt = _chunkXPIMJQYScjs.now.call(void 0, );
|
|
486
620
|
return _chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
|
|
487
621
|
next(req),
|
|
488
622
|
(error) => {
|
|
489
|
-
const durationMs = Math.round(
|
|
623
|
+
const durationMs = Math.round(_chunkXPIMJQYScjs.now.call(void 0, ) - startedAt);
|
|
490
624
|
try {
|
|
491
625
|
logger({ phase: "error", req, error, durationMs });
|
|
492
626
|
} catch (e6) {
|
|
@@ -494,7 +628,7 @@ function withLogging(logger) {
|
|
|
494
628
|
return _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, error);
|
|
495
629
|
},
|
|
496
630
|
(res) => {
|
|
497
|
-
const durationMs = Math.round(
|
|
631
|
+
const durationMs = Math.round(_chunkXPIMJQYScjs.now.call(void 0, ) - startedAt);
|
|
498
632
|
try {
|
|
499
633
|
logger({ phase: "response", req, res, durationMs });
|
|
500
634
|
} catch (e7) {
|
|
@@ -750,7 +884,7 @@ function prewarmConnections(config = {}) {
|
|
|
750
884
|
const fetchImpl = _nullishCoalesce(config.fetchImpl, () => ( globalThis.fetch));
|
|
751
885
|
const method = _nullishCoalesce(config.method, () => ( "HEAD"));
|
|
752
886
|
const targets = resolveTargets(config);
|
|
753
|
-
return
|
|
887
|
+
return _chunk2JHJ4YHScjs.fromPromiseAbortable.call(void 0,
|
|
754
888
|
async (signal) => {
|
|
755
889
|
if (typeof fetchImpl !== "function" || targets.length === 0) {
|
|
756
890
|
return { attempted: 0, warmed: 0, failed: 0, skipped: targets.length, attempts: [] };
|
|
@@ -941,6 +1075,7 @@ function makeBuilder(config) {
|
|
|
941
1075
|
transport: (transport) => replace({ transport }),
|
|
942
1076
|
preset: (preset) => replace({ preset }),
|
|
943
1077
|
minimal: () => replace({ preset: "minimal" }),
|
|
1078
|
+
proxy: () => replace({ preset: "proxy" }),
|
|
944
1079
|
balanced: () => replace({ preset: "balanced" }),
|
|
945
1080
|
defaultPreset: () => replace({ preset: "default" }),
|
|
946
1081
|
production: () => replace({ preset: "production" }),
|
|
@@ -957,10 +1092,10 @@ function makeBuilder(config) {
|
|
|
957
1092
|
prewarm: (layer = {}) => setLayer("prewarm", layer),
|
|
958
1093
|
noPrewarm: () => setLayer("prewarm", false),
|
|
959
1094
|
adaptiveLimiter: (layer = {}) => setLayer("adaptiveLimiter", layer),
|
|
960
|
-
adaptiveLimiterPreset: (preset, overrides = {}) => setLayer("adaptiveLimiter",
|
|
961
|
-
conservativeLimiter: (overrides = {}) => setLayer("adaptiveLimiter",
|
|
962
|
-
balancedLimiter: (overrides = {}) => setLayer("adaptiveLimiter",
|
|
963
|
-
aggressiveLimiter: (overrides = {}) => setLayer("adaptiveLimiter",
|
|
1095
|
+
adaptiveLimiterPreset: (preset, overrides = {}) => setLayer("adaptiveLimiter", _chunkXPIMJQYScjs.makeAdaptiveLimiterConfig.call(void 0, preset, overrides)),
|
|
1096
|
+
conservativeLimiter: (overrides = {}) => setLayer("adaptiveLimiter", _chunkXPIMJQYScjs.makeAdaptiveLimiterConfig.call(void 0, "conservative", overrides)),
|
|
1097
|
+
balancedLimiter: (overrides = {}) => setLayer("adaptiveLimiter", _chunkXPIMJQYScjs.makeAdaptiveLimiterConfig.call(void 0, "balanced", overrides)),
|
|
1098
|
+
aggressiveLimiter: (overrides = {}) => setLayer("adaptiveLimiter", _chunkXPIMJQYScjs.makeAdaptiveLimiterConfig.call(void 0, "aggressive", overrides)),
|
|
964
1099
|
noAdaptiveLimiter: () => setLayer("adaptiveLimiter", false),
|
|
965
1100
|
pool: (layer = {}) => setLayer("pool", layer),
|
|
966
1101
|
noPool: () => setLayer("pool", false),
|
|
@@ -969,8 +1104,8 @@ function makeBuilder(config) {
|
|
|
969
1104
|
middleware,
|
|
970
1105
|
use: middleware,
|
|
971
1106
|
configure: (next) => makeBuilder(mergeConfig(config, next)),
|
|
972
|
-
build: () =>
|
|
973
|
-
buildWire: () =>
|
|
1107
|
+
build: () => _chunkXPIMJQYScjs.makeDefaultHttpClient.call(void 0, freezeConfig(config)),
|
|
1108
|
+
buildWire: () => _chunkXPIMJQYScjs.makeDefaultHttpClient.call(void 0, freezeConfig(config)).wire
|
|
974
1109
|
});
|
|
975
1110
|
}
|
|
976
1111
|
function httpClientBuilder(config = {}) {
|
|
@@ -980,7 +1115,7 @@ var makeHttpClientBuilder = httpClientBuilder;
|
|
|
980
1115
|
var httpBuilder = httpClientBuilder;
|
|
981
1116
|
|
|
982
1117
|
// src/http/server.ts
|
|
983
|
-
|
|
1118
|
+
|
|
984
1119
|
var DEFAULT_MAX_BODY_BYTES = 1024 * 1024;
|
|
985
1120
|
function route(method, path, optionsOrHandler, maybeHandler) {
|
|
986
1121
|
const options = typeof optionsOrHandler === "function" ? {} : optionsOrHandler;
|
|
@@ -1038,7 +1173,7 @@ function makeRuntimeHealthRoute(options = {}) {
|
|
|
1038
1173
|
"GET",
|
|
1039
1174
|
path,
|
|
1040
1175
|
() => _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
|
|
1041
|
-
|
|
1176
|
+
_chunkWI7GZF3Bcjs.makeRuntimeHealth.call(void 0, healthOptions),
|
|
1042
1177
|
(report) => _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, healthReportToServerResponse(report))
|
|
1043
1178
|
)
|
|
1044
1179
|
);
|
|
@@ -1061,7 +1196,7 @@ function withResponseHeader(name, value) {
|
|
|
1061
1196
|
);
|
|
1062
1197
|
}
|
|
1063
1198
|
function healthReportToServerResponse(report) {
|
|
1064
|
-
return healthHttpResponseToServerResponse(
|
|
1199
|
+
return healthHttpResponseToServerResponse(_chunkWI7GZF3Bcjs.healthToHttpResponse.call(void 0, report));
|
|
1065
1200
|
}
|
|
1066
1201
|
function healthHttpResponseToServerResponse(response) {
|
|
1067
1202
|
return {
|
|
@@ -1124,7 +1259,7 @@ function makeNodeHttpServer(options) {
|
|
|
1124
1259
|
});
|
|
1125
1260
|
}
|
|
1126
1261
|
function nodeHttpServerResource(options) {
|
|
1127
|
-
return
|
|
1262
|
+
return _chunk5RZ7YITFcjs.resource.call(void 0,
|
|
1128
1263
|
makeNodeHttpServer(options),
|
|
1129
1264
|
(handle) => _chunkMVGUEJ5Zcjs.asyncEffect.call(void 0, (_env, cb) => {
|
|
1130
1265
|
handle.close().then(() => cb({ _tag: "Success", value: void 0 })).catch(() => cb({ _tag: "Success", value: void 0 }));
|
|
@@ -1203,7 +1338,7 @@ function prepareRouteContext(request, params, routeWithSchemas) {
|
|
|
1203
1338
|
body: request.bodyText,
|
|
1204
1339
|
phase: "request",
|
|
1205
1340
|
schema: _nullishCoalesce(routeWithSchemas.options.bodySchemaName, () => ( "body")),
|
|
1206
|
-
issues: [
|
|
1341
|
+
issues: [_chunkUUMKZJRJcjs.makeSchemaIssue.call(void 0, [], "valid JSON", request.bodyText, bodyInput.message)]
|
|
1207
1342
|
})
|
|
1208
1343
|
};
|
|
1209
1344
|
}
|
|
@@ -1227,12 +1362,12 @@ function prepareRouteContext(request, params, routeWithSchemas) {
|
|
|
1227
1362
|
function validateResponseBody(response, routeWithSchemas) {
|
|
1228
1363
|
const schema2 = routeWithSchemas.options.response;
|
|
1229
1364
|
if (!schema2) return { success: true };
|
|
1230
|
-
const result =
|
|
1365
|
+
const result = _chunkUUMKZJRJcjs.validateValue.call(void 0, response.body, schema2);
|
|
1231
1366
|
if (result.success) return { success: true };
|
|
1232
1367
|
return {
|
|
1233
1368
|
success: false,
|
|
1234
1369
|
error: makeValidationError({
|
|
1235
|
-
message: `HTTP response failed validation: ${
|
|
1370
|
+
message: `HTTP response failed validation: ${_chunkUUMKZJRJcjs.formatIssues.call(void 0, result.issues)}`,
|
|
1236
1371
|
body: previewJson(response.body),
|
|
1237
1372
|
phase: "response",
|
|
1238
1373
|
schema: _nullishCoalesce(routeWithSchemas.options.responseSchemaName, () => ( "response")),
|
|
@@ -1242,12 +1377,12 @@ function validateResponseBody(response, routeWithSchemas) {
|
|
|
1242
1377
|
}
|
|
1243
1378
|
function validatePart(input, schema2, options) {
|
|
1244
1379
|
if (!schema2) return { success: true, data: input };
|
|
1245
|
-
const result =
|
|
1380
|
+
const result = _chunkUUMKZJRJcjs.validateValue.call(void 0, input, schema2);
|
|
1246
1381
|
if (result.success) return { success: true, data: result.data };
|
|
1247
1382
|
return {
|
|
1248
1383
|
success: false,
|
|
1249
1384
|
error: makeValidationError({
|
|
1250
|
-
message: `HTTP ${options.schemaName} failed validation: ${
|
|
1385
|
+
message: `HTTP ${options.schemaName} failed validation: ${_chunkUUMKZJRJcjs.formatIssues.call(void 0, result.issues)}`,
|
|
1251
1386
|
body: options.body,
|
|
1252
1387
|
phase: options.phase,
|
|
1253
1388
|
schema: options.schemaName,
|
|
@@ -1305,7 +1440,7 @@ async function handleNodeRequest(req, res, router, options) {
|
|
|
1305
1440
|
target: serverRequest.target,
|
|
1306
1441
|
headers: serverRequest.headers
|
|
1307
1442
|
};
|
|
1308
|
-
const response = options.observability ? (await
|
|
1443
|
+
const response = options.observability ? (await _chunkWI7GZF3Bcjs.runObservedHttpServerEffect.call(void 0,
|
|
1309
1444
|
options.observability,
|
|
1310
1445
|
observedInput,
|
|
1311
1446
|
effect,
|
|
@@ -1315,7 +1450,7 @@ async function handleNodeRequest(req, res, router, options) {
|
|
|
1315
1450
|
},
|
|
1316
1451
|
options.env,
|
|
1317
1452
|
options.runtimeOptions
|
|
1318
|
-
)).value : await (_nullishCoalesce(options.runtime, () => ( new (0,
|
|
1453
|
+
)).value : await (_nullishCoalesce(options.runtime, () => ( new (0, _chunk2JHJ4YHScjs.Runtime)({
|
|
1319
1454
|
env: _nullishCoalesce(options.env, () => ( {})),
|
|
1320
1455
|
..._nullishCoalesce(options.runtimeOptions, () => ( {}))
|
|
1321
1456
|
})))).toPromise(effect);
|
|
@@ -1401,7 +1536,7 @@ function closeNodeServer(server, options) {
|
|
|
1401
1536
|
return new Promise((resolve, reject) => {
|
|
1402
1537
|
const startedAt = Date.now();
|
|
1403
1538
|
const schedule = _nullishCoalesce(options.shutdownPollSchedule, () => ( defaultShutdownPollSchedule(_nullishCoalesce(options.gracefulShutdownMs, () => ( 5e3)))));
|
|
1404
|
-
const driver =
|
|
1539
|
+
const driver = _chunk5RZ7YITFcjs.makeScheduleDriver.call(void 0, schedule, { name: _nullishCoalesce(schedule.name, () => ( "http.server.shutdown")), startedAtMs: startedAt });
|
|
1405
1540
|
let finished = false;
|
|
1406
1541
|
const done = (error) => {
|
|
1407
1542
|
if (finished) return;
|
|
@@ -1435,7 +1570,7 @@ function closeNodeServer(server, options) {
|
|
|
1435
1570
|
}
|
|
1436
1571
|
function defaultShutdownPollSchedule(maxMs) {
|
|
1437
1572
|
const intervalMs = 25;
|
|
1438
|
-
return
|
|
1573
|
+
return _chunk5RZ7YITFcjs.take.call(void 0, _chunk5RZ7YITFcjs.fixed.call(void 0, intervalMs), Math.max(1, Math.ceil(Math.max(0, maxMs) / intervalMs)));
|
|
1439
1574
|
}
|
|
1440
1575
|
function matchRoute(routes, method, path) {
|
|
1441
1576
|
const requestedMethod = method.toUpperCase();
|
|
@@ -1504,7 +1639,12 @@ function normalizeRouteMethod(method) {
|
|
|
1504
1639
|
function normalizeRoutePath(path) {
|
|
1505
1640
|
if (!path || path === "*") return "/";
|
|
1506
1641
|
const withSlash = path.startsWith("/") ? path : `/${path}`;
|
|
1507
|
-
|
|
1642
|
+
if (withSlash.length <= 1) return withSlash;
|
|
1643
|
+
let end = withSlash.length;
|
|
1644
|
+
while (end > 0 && withSlash.charCodeAt(end - 1) === 47) {
|
|
1645
|
+
end -= 1;
|
|
1646
|
+
}
|
|
1647
|
+
return withSlash.slice(0, end);
|
|
1508
1648
|
}
|
|
1509
1649
|
function parseRequestUrl(target, host) {
|
|
1510
1650
|
try {
|
|
@@ -1696,4 +1836,11 @@ function escapeRegExp(value) {
|
|
|
1696
1836
|
|
|
1697
1837
|
|
|
1698
1838
|
|
|
1699
|
-
|
|
1839
|
+
|
|
1840
|
+
|
|
1841
|
+
|
|
1842
|
+
|
|
1843
|
+
|
|
1844
|
+
|
|
1845
|
+
|
|
1846
|
+
exports.AdaptiveLimiter = _chunkXPIMJQYScjs.AdaptiveLimiter; exports.ConfigValidationError = _chunkUUMKZJRJcjs.ConfigValidationError; exports.DEFAULT_CACHE_RELEVANT_HEADERS = _chunkXPIMJQYScjs.DEFAULT_CACHE_RELEVANT_HEADERS; exports.EmaComputer = _chunkXPIMJQYScjs.EmaComputer; exports.HttpClientService = _chunkXPIMJQYScjs.HttpClientService; exports.HttpConcurrencyPool = _chunkXPIMJQYScjs.HttpConcurrencyPool; exports.HttpServer = HttpServer; exports.LRUCache = _chunkXPIMJQYScjs.LRUCache; exports.LatencyWindow = _chunkXPIMJQYScjs.LatencyWindow; exports.LifecycleStatsTracker = _chunkXPIMJQYScjs.LifecycleStatsTracker; exports.PriorityQueue = _chunkXPIMJQYScjs.PriorityQueue; exports.SEPARATOR = _chunkXPIMJQYScjs.SEPARATOR; exports.SUPPORTED_ENCODINGS = _chunkXPIMJQYScjs.SUPPORTED_ENCODINGS; exports.Schema = _chunkUUMKZJRJcjs.Schema; exports.SchemaValidationException = _chunkUUMKZJRJcjs.SchemaValidationException; exports.abortErrorForSignal = _chunkXPIMJQYScjs.abortErrorForSignal; exports.adaptiveLimiterPresets = _chunkXPIMJQYScjs.adaptiveLimiterPresets; exports.backoffDelayMs = _chunkXPIMJQYScjs.backoffDelayMs; exports.clampPriority = _chunkXPIMJQYScjs.clampPriority; exports.computeCacheKey = _chunkXPIMJQYScjs.computeCacheKey; exports.computeGradient = _chunkXPIMJQYScjs.computeGradient; exports.computeNewLimit = _chunkXPIMJQYScjs.computeNewLimit; exports.decodeJsonBody = _chunkXPIMJQYScjs.decodeJsonBody; exports.decodeJsonBodyEffect = _chunkXPIMJQYScjs.decodeJsonBodyEffect; exports.decorate = _chunkXPIMJQYScjs.decorate; exports.defaultHttpClientPreset = _chunkXPIMJQYScjs.defaultHttpClientPreset; exports.defaultRetryOnError = _chunkXPIMJQYScjs.defaultRetryOnError; exports.defaultRetryOnStatus = _chunkXPIMJQYScjs.defaultRetryOnStatus; exports.defaultRetryableMethods = _chunkXPIMJQYScjs.defaultRetryableMethods; exports.defineHttpPolicyPresets = _chunkXPIMJQYScjs.defineHttpPolicyPresets; exports.detectPlatform = _chunkXPIMJQYScjs.detectPlatform; exports.empty = empty; exports.encodeJsonBodyEffect = _chunkXPIMJQYScjs.encodeJsonBodyEffect; exports.executeProbe = _chunkXPIMJQYScjs.executeProbe; exports.formatConfigError = _chunkUUMKZJRJcjs.formatConfigError; exports.formatHttpError = _chunkXPIMJQYScjs.formatHttpError; exports.formatIssues = _chunkUUMKZJRJcjs.formatIssues; exports.getHttpRequestPolicy = _chunkXPIMJQYScjs.getHttpRequestPolicy; exports.headersOf = _chunkXPIMJQYScjs.headersOf; exports.httpBuilder = httpBuilder; exports.httpClient = httpClient; exports.httpClientBuilder = httpClientBuilder; exports.httpClientStream = httpClientStream; exports.httpClientWithMeta = httpClientWithMeta; exports.httpErrorStatus = _chunkXPIMJQYScjs.httpErrorStatus; exports.httpPolicy = _chunkXPIMJQYScjs.httpPolicy; exports.httpRoute = httpRoute; exports.isAbortError = _chunkXPIMJQYScjs.isAbortError; exports.isAbortHttpError = _chunkXPIMJQYScjs.isAbortHttpError; exports.isCircuitBreakerOpen = _chunkXPIMJQYScjs.isCircuitBreakerOpen; exports.isConfigValidationError = _chunkUUMKZJRJcjs.isConfigValidationError; exports.isExternalAbortError = _chunkXPIMJQYScjs.isExternalAbortError; exports.isExternalTimeoutError = _chunkXPIMJQYScjs.isExternalTimeoutError; exports.isFetchHttpError = _chunkXPIMJQYScjs.isFetchHttpError; exports.isHttpError = _chunkXPIMJQYScjs.isHttpError; exports.isKnownHttpError = _chunkXPIMJQYScjs.isKnownHttpError; exports.isPromiseTransportDirect = _chunkXPIMJQYScjs.isPromiseTransportDirect; exports.isRetryableHttpError = _chunkXPIMJQYScjs.isRetryableHttpError; exports.isRetryableHttpStatus = _chunkXPIMJQYScjs.isRetryableHttpStatus; exports.isSchema = _chunkUUMKZJRJcjs.isSchema; exports.isTaggedHttpError = _chunkXPIMJQYScjs.isTaggedHttpError; exports.isTimeoutHttpError = _chunkXPIMJQYScjs.isTimeoutHttpError; exports.isValidationError = _chunkXPIMJQYScjs.isValidationError; exports.json = json; exports.linkAbortSignals = _chunkXPIMJQYScjs.linkAbortSignals; exports.makeAdaptiveLimiterConfig = _chunkXPIMJQYScjs.makeAdaptiveLimiterConfig; exports.makeBudgetSemaphore = _chunkXPIMJQYScjs.makeBudgetSemaphore; exports.makeCompressionMiddleware = _chunkXPIMJQYScjs.makeCompressionMiddleware; exports.makeConnectionStateMap = _chunkXPIMJQYScjs.makeConnectionStateMap; exports.makeDefaultHttpClient = _chunkXPIMJQYScjs.makeDefaultHttpClient; exports.makeDefaultHttpClientLayer = _chunkXPIMJQYScjs.makeDefaultHttpClientLayer; exports.makeFetchStreamTransport = _chunkXPIMJQYScjs.makeFetchStreamTransport; exports.makeFetchTransport = _chunkXPIMJQYScjs.makeFetchTransport; exports.makeHttp = _chunkXPIMJQYScjs.makeHttp; exports.makeHttpClient = _chunkXPIMJQYScjs.makeHttpClient; exports.makeHttpClientBuilder = makeHttpClientBuilder; exports.makeHttpRouter = makeHttpRouter; exports.makeHttpServerResource = makeHttpServerResource; exports.makeHttpStream = _chunkXPIMJQYScjs.makeHttpStream; exports.makeJsonParseValidationError = _chunkXPIMJQYScjs.makeJsonParseValidationError; exports.makeLifecycleClient = _chunkXPIMJQYScjs.makeLifecycleClient; exports.makeNodeHttpProxyClient = makeNodeHttpProxyClient; exports.makeNodeHttpServer = makeNodeHttpServer; exports.makeNodeHttpServerResource = makeNodeHttpServerResource; exports.makeNodeHttpTransport = makeNodeHttpTransport; exports.makePrewarmManager = _chunkXPIMJQYScjs.makePrewarmManager; exports.makePromiseHttpTransport = _chunkXPIMJQYScjs.makePromiseHttpTransport; exports.makeRequestCompressionMiddleware = _chunkXPIMJQYScjs.makeRequestCompressionMiddleware; exports.makeResponseCompressionMiddleware = _chunkXPIMJQYScjs.makeResponseCompressionMiddleware; exports.makeRuntimeHealthRoute = makeRuntimeHealthRoute; exports.makeRuntimeReadinessRoute = makeRuntimeReadinessRoute; exports.makeSchemaIssue = _chunkUUMKZJRJcjs.makeSchemaIssue; exports.matchHttpError = _chunkXPIMJQYScjs.matchHttpError; exports.nodeHttpServerResource = nodeHttpServerResource; exports.noopSignal = _chunkXPIMJQYScjs.noopSignal; exports.normalizeHeadersInit = _chunkXPIMJQYScjs.normalizeHeadersInit; exports.normalizeHttpError = _chunkXPIMJQYScjs.normalizeHttpError; exports.normalizeHttpHeaders = _chunkXPIMJQYScjs.normalizeHttpHeaders; exports.normalizeRetryBudget = _chunkXPIMJQYScjs.normalizeRetryBudget; exports.parseCacheKey = _chunkXPIMJQYScjs.parseCacheKey; exports.parseConfig = _chunkUUMKZJRJcjs.parseConfig; exports.prewarmConnections = prewarmConnections; exports.prewarmHttpConnections = prewarmHttpConnections; exports.promiseHttpTransport = _chunkXPIMJQYScjs.promiseHttpTransport; exports.resolveConfig = _chunkXPIMJQYScjs.resolveConfig; exports.resolveHttpPoolKey = _chunkXPIMJQYScjs.resolveHttpPoolKey; exports.resolveHttpRequestPolicyPresets = _chunkXPIMJQYScjs.resolveHttpRequestPolicyPresets; exports.retryAfterMs = _chunkXPIMJQYScjs.retryAfterMs; exports.route = route; exports.runtimeHealthRoute = runtimeHealthRoute; exports.runtimeReadinessRoute = runtimeReadinessRoute; exports.s = _chunkUUMKZJRJcjs.s; exports.schema = _chunkUUMKZJRJcjs.schema; exports.text = text; exports.toHttpError = _chunkXPIMJQYScjs.toHttpError; exports.validateConfig = _chunkXPIMJQYScjs.validateConfig; exports.validateFetchAvailable = _chunkXPIMJQYScjs.validateFetchAvailable; exports.validateOrigin = _chunkXPIMJQYScjs.validateOrigin; exports.validateValue = _chunkUUMKZJRJcjs.validateValue; exports.validatedJson = _chunkXPIMJQYScjs.validatedJson; exports.validatedJsonResponse = _chunkXPIMJQYScjs.validatedJsonResponse; exports.withAuth = withAuth; exports.withBatch = _chunkXPIMJQYScjs.withBatch; exports.withCache = _chunkXPIMJQYScjs.withCache; exports.withCircuitBreaker = withCircuitBreaker; exports.withConnectionPrewarming = withConnectionPrewarming; exports.withDedup = _chunkXPIMJQYScjs.withDedup; exports.withHttpPolicyPresets = _chunkXPIMJQYScjs.withHttpPolicyPresets; exports.withHttpRequestPolicy = _chunkXPIMJQYScjs.withHttpRequestPolicy; exports.withLogging = withLogging; exports.withMiddleware = _chunkXPIMJQYScjs.withMiddleware; exports.withPriority = _chunkXPIMJQYScjs.withPriority; exports.withRequestBatching = withRequestBatching; exports.withResponseHeader = withResponseHeader; exports.withResponseTransform = withResponseTransform; exports.withRetry = _chunkXPIMJQYScjs.withRetry; exports.withRetryStream = _chunkXPIMJQYScjs.withRetryStream; exports.withTracing = withTracing;
|