@junando/core 0.11.0 → 0.12.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.
Files changed (44) hide show
  1. package/dist/index.d.ts +771 -1918
  2. package/dist/index.d.ts.map +1 -0
  3. package/dist/index.js +2190 -10364
  4. package/dist/index.js.map +1 -0
  5. package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
  6. package/dist/shared/metrics/index.d.ts +29 -0
  7. package/dist/shared/metrics/index.d.ts.map +1 -0
  8. package/dist/shared/metrics/index.js +131 -0
  9. package/dist/shared/metrics/index.js.map +1 -0
  10. package/package.json +11 -11
  11. package/dist/chunk-3OJNTHWB.js +0 -225
  12. package/dist/chunk-5LNMHOUT.js +0 -229
  13. package/dist/chunk-72FU6SG6.js +0 -236
  14. package/dist/chunk-7SYJ764U.js +0 -579
  15. package/dist/chunk-AZU6S4RC.js +0 -11
  16. package/dist/chunk-BGPI5BQ5.js +0 -27
  17. package/dist/chunk-DKQSWD3S.js +0 -46
  18. package/dist/chunk-H4ND7Z4R.js +0 -504
  19. package/dist/chunk-HVICRLMN.js +0 -742
  20. package/dist/chunk-ID7PWYSN.js +0 -12
  21. package/dist/chunk-KU245W3C.js +0 -16
  22. package/dist/chunk-L67CO4EG.js +0 -1038
  23. package/dist/chunk-MLKGABMK.js +0 -9
  24. package/dist/chunk-MQ4JUE6V.js +0 -447
  25. package/dist/chunk-N5AJP37P.js +0 -385
  26. package/dist/chunk-SIDCDO4Q.js +0 -1315
  27. package/dist/chunk-TDZF3WAT.js +0 -3824
  28. package/dist/chunk-VMBT3R2K.js +0 -0
  29. package/dist/chunk-WWHXKECU.js +0 -100
  30. package/dist/chunk-ZKH7AMP3.js +0 -42
  31. package/dist/chunk-ZOU3QHNL.js +0 -28
  32. package/dist/dist-es-CBFEDVZZ.js +0 -493
  33. package/dist/dist-es-ROXOWRKX.js +0 -22
  34. package/dist/dist-es-S3QCFNII.js +0 -327
  35. package/dist/dist-es-SQCUDQ4Y.js +0 -90
  36. package/dist/dist-es-UWOSB3KA.js +0 -72
  37. package/dist/dist-es-VXERFT35.js +0 -172
  38. package/dist/dist-es-Y44CAW7E.js +0 -385
  39. package/dist/event-streams-2IMLK3TK.js +0 -252
  40. package/dist/event-streams-NLZW3NHF.js +0 -1376
  41. package/dist/loadSso-T6VCDGCZ.js +0 -558
  42. package/dist/signin-BC6ZNJCV.js +0 -653
  43. package/dist/sso-oidc-PTS5E3NX.js +0 -793
  44. package/dist/sts-JSJ57UXB.js +0 -6108
@@ -1,504 +0,0 @@
1
- import {
2
- fromArrayBuffer,
3
- fromString,
4
- fromUtf8
5
- } from "./chunk-ZKH7AMP3.js";
6
- import {
7
- HttpResponse,
8
- buildQueryString
9
- } from "./chunk-5LNMHOUT.js";
10
-
11
- // ../../node_modules/.pnpm/@smithy+node-http-handler@4.7.1/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js
12
- import { Agent as hsAgent, request as hsRequest } from "https";
13
-
14
- // ../../node_modules/.pnpm/@smithy+node-http-handler@4.7.1/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js
15
- function buildAbortError(abortSignal) {
16
- const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal ? abortSignal.reason : void 0;
17
- if (reason) {
18
- if (reason instanceof Error) {
19
- const abortError3 = new Error("Request aborted");
20
- abortError3.name = "AbortError";
21
- abortError3.cause = reason;
22
- return abortError3;
23
- }
24
- const abortError2 = new Error(String(reason));
25
- abortError2.name = "AbortError";
26
- return abortError2;
27
- }
28
- const abortError = new Error("Request aborted");
29
- abortError.name = "AbortError";
30
- return abortError;
31
- }
32
-
33
- // ../../node_modules/.pnpm/@smithy+node-http-handler@4.7.1/node_modules/@smithy/node-http-handler/dist-es/constants.js
34
- var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"];
35
-
36
- // ../../node_modules/.pnpm/@smithy+node-http-handler@4.7.1/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js
37
- var getTransformedHeaders = (headers) => {
38
- const transformedHeaders = {};
39
- for (const name in headers) {
40
- const headerValues = headers[name];
41
- transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues;
42
- }
43
- return transformedHeaders;
44
- };
45
-
46
- // ../../node_modules/.pnpm/@smithy+node-http-handler@4.7.1/node_modules/@smithy/node-http-handler/dist-es/timing.js
47
- var timing = {
48
- setTimeout: (cb, ms) => setTimeout(cb, ms),
49
- clearTimeout: (timeoutId) => clearTimeout(timeoutId)
50
- };
51
-
52
- // ../../node_modules/.pnpm/@smithy+node-http-handler@4.7.1/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js
53
- var DEFER_EVENT_LISTENER_TIME = 1e3;
54
- var setConnectionTimeout = (request, reject, timeoutInMs = 0) => {
55
- if (!timeoutInMs) {
56
- return -1;
57
- }
58
- const registerTimeout = (offset) => {
59
- const timeoutId = timing.setTimeout(() => {
60
- request.destroy();
61
- reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${timeoutInMs} ms.`), {
62
- name: "TimeoutError"
63
- }));
64
- }, timeoutInMs - offset);
65
- const doWithSocket = (socket) => {
66
- if (socket?.connecting) {
67
- socket.on("connect", () => {
68
- timing.clearTimeout(timeoutId);
69
- });
70
- } else {
71
- timing.clearTimeout(timeoutId);
72
- }
73
- };
74
- if (request.socket) {
75
- doWithSocket(request.socket);
76
- } else {
77
- request.on("socket", doWithSocket);
78
- }
79
- };
80
- if (timeoutInMs < 2e3) {
81
- registerTimeout(0);
82
- return 0;
83
- }
84
- return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);
85
- };
86
-
87
- // ../../node_modules/.pnpm/@smithy+node-http-handler@4.7.1/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js
88
- var setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger2) => {
89
- if (timeoutInMs) {
90
- return timing.setTimeout(() => {
91
- let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? "ERROR" : "WARN"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`;
92
- if (throwOnRequestTimeout) {
93
- const error = Object.assign(new Error(msg), {
94
- name: "TimeoutError",
95
- code: "ETIMEDOUT"
96
- });
97
- req.destroy(error);
98
- reject(error);
99
- } else {
100
- msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`;
101
- logger2?.warn?.(msg);
102
- }
103
- }, timeoutInMs);
104
- }
105
- return -1;
106
- };
107
-
108
- // ../../node_modules/.pnpm/@smithy+node-http-handler@4.7.1/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js
109
- var DEFER_EVENT_LISTENER_TIME2 = 3e3;
110
- var setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME2) => {
111
- if (keepAlive !== true) {
112
- return -1;
113
- }
114
- const registerListener = () => {
115
- if (request.socket) {
116
- request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);
117
- } else {
118
- request.on("socket", (socket) => {
119
- socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);
120
- });
121
- }
122
- };
123
- if (deferTimeMs === 0) {
124
- registerListener();
125
- return 0;
126
- }
127
- return timing.setTimeout(registerListener, deferTimeMs);
128
- };
129
-
130
- // ../../node_modules/.pnpm/@smithy+node-http-handler@4.7.1/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js
131
- var DEFER_EVENT_LISTENER_TIME3 = 3e3;
132
- var setSocketTimeout = (request, reject, timeoutInMs = 0) => {
133
- const registerTimeout = (offset) => {
134
- const timeout = timeoutInMs - offset;
135
- const onTimeout = () => {
136
- request.destroy();
137
- reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: "TimeoutError" }));
138
- };
139
- if (request.socket) {
140
- request.socket.setTimeout(timeout, onTimeout);
141
- request.on("close", () => request.socket?.removeListener("timeout", onTimeout));
142
- } else {
143
- request.setTimeout(timeout, onTimeout);
144
- }
145
- };
146
- if (0 < timeoutInMs && timeoutInMs < 6e3) {
147
- registerTimeout(0);
148
- return 0;
149
- }
150
- return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME3), DEFER_EVENT_LISTENER_TIME3);
151
- };
152
-
153
- // ../../node_modules/.pnpm/@smithy+node-http-handler@4.7.1/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js
154
- import { Readable } from "stream";
155
- var MIN_WAIT_TIME = 6e3;
156
- async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) {
157
- const headers = request.headers;
158
- const expect = headers ? headers.Expect || headers.expect : void 0;
159
- let timeoutId = -1;
160
- let sendBody = true;
161
- if (!externalAgent && expect === "100-continue") {
162
- sendBody = await Promise.race([
163
- new Promise((resolve) => {
164
- timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));
165
- }),
166
- new Promise((resolve) => {
167
- httpRequest.on("continue", () => {
168
- timing.clearTimeout(timeoutId);
169
- resolve(true);
170
- });
171
- httpRequest.on("response", () => {
172
- timing.clearTimeout(timeoutId);
173
- resolve(false);
174
- });
175
- httpRequest.on("error", () => {
176
- timing.clearTimeout(timeoutId);
177
- resolve(false);
178
- });
179
- })
180
- ]);
181
- }
182
- if (sendBody) {
183
- writeBody(httpRequest, request.body);
184
- }
185
- }
186
- function writeBody(httpRequest, body) {
187
- if (body instanceof Readable) {
188
- body.pipe(httpRequest);
189
- return;
190
- }
191
- if (body) {
192
- const isBuffer = Buffer.isBuffer(body);
193
- const isString = typeof body === "string";
194
- if (isBuffer || isString) {
195
- if (isBuffer && body.byteLength === 0) {
196
- httpRequest.end();
197
- } else {
198
- httpRequest.end(body);
199
- }
200
- return;
201
- }
202
- const uint8 = body;
203
- if (typeof uint8 === "object" && uint8.buffer && typeof uint8.byteOffset === "number" && typeof uint8.byteLength === "number") {
204
- httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength));
205
- return;
206
- }
207
- httpRequest.end(Buffer.from(body));
208
- return;
209
- }
210
- httpRequest.end();
211
- }
212
-
213
- // ../../node_modules/.pnpm/@smithy+node-http-handler@4.7.1/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js
214
- var hAgent = void 0;
215
- var hRequest = void 0;
216
- var NodeHttpHandler = class _NodeHttpHandler {
217
- config;
218
- configProvider;
219
- socketWarningTimestamp = 0;
220
- externalAgent = false;
221
- metadata = { handlerProtocol: "http/1.1" };
222
- static create(instanceOrOptions) {
223
- if (typeof instanceOrOptions?.handle === "function") {
224
- return instanceOrOptions;
225
- }
226
- return new _NodeHttpHandler(instanceOrOptions);
227
- }
228
- static checkSocketUsage(agent, socketWarningTimestamp, logger2 = console) {
229
- const { sockets, requests, maxSockets } = agent;
230
- if (typeof maxSockets !== "number" || maxSockets === Infinity) {
231
- return socketWarningTimestamp;
232
- }
233
- const interval = 15e3;
234
- if (Date.now() - interval < socketWarningTimestamp) {
235
- return socketWarningTimestamp;
236
- }
237
- if (sockets && requests) {
238
- for (const origin in sockets) {
239
- const socketsInUse = sockets[origin]?.length ?? 0;
240
- const requestsEnqueued = requests[origin]?.length ?? 0;
241
- if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {
242
- logger2?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.
243
- See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
244
- or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`);
245
- return Date.now();
246
- }
247
- }
248
- }
249
- return socketWarningTimestamp;
250
- }
251
- constructor(options) {
252
- this.configProvider = new Promise((resolve, reject) => {
253
- if (typeof options === "function") {
254
- options().then((_options) => {
255
- resolve(this.resolveDefaultConfig(_options));
256
- }).catch(reject);
257
- } else {
258
- resolve(this.resolveDefaultConfig(options));
259
- }
260
- });
261
- }
262
- destroy() {
263
- this.config?.httpAgent?.destroy();
264
- this.config?.httpsAgent?.destroy();
265
- }
266
- async handle(request, { abortSignal, requestTimeout } = {}) {
267
- if (!this.config) {
268
- this.config = await this.configProvider;
269
- }
270
- const config = this.config;
271
- const isSSL = request.protocol === "https:";
272
- if (!isSSL && !this.config.httpAgent) {
273
- this.config.httpAgent = await this.config.httpAgentProvider();
274
- }
275
- return new Promise((_resolve, _reject) => {
276
- let writeRequestBodyPromise = void 0;
277
- let socketWarningTimeoutId = -1;
278
- let connectionTimeoutId = -1;
279
- let requestTimeoutId = -1;
280
- let socketTimeoutId = -1;
281
- let keepAliveTimeoutId = -1;
282
- const clearTimeouts = () => {
283
- timing.clearTimeout(socketWarningTimeoutId);
284
- timing.clearTimeout(connectionTimeoutId);
285
- timing.clearTimeout(requestTimeoutId);
286
- timing.clearTimeout(socketTimeoutId);
287
- timing.clearTimeout(keepAliveTimeoutId);
288
- };
289
- const resolve = async (arg) => {
290
- await writeRequestBodyPromise;
291
- clearTimeouts();
292
- _resolve(arg);
293
- };
294
- const reject = async (arg) => {
295
- await writeRequestBodyPromise;
296
- clearTimeouts();
297
- _reject(arg);
298
- };
299
- if (abortSignal?.aborted) {
300
- const abortError = buildAbortError(abortSignal);
301
- reject(abortError);
302
- return;
303
- }
304
- const headers = request.headers;
305
- const expectContinue = headers ? (headers.Expect ?? headers.expect) === "100-continue" : false;
306
- let agent = isSSL ? config.httpsAgent : config.httpAgent;
307
- if (expectContinue && !this.externalAgent) {
308
- agent = new (isSSL ? hsAgent : hAgent)({
309
- keepAlive: false,
310
- maxSockets: Infinity
311
- });
312
- }
313
- socketWarningTimeoutId = timing.setTimeout(() => {
314
- this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, config.logger);
315
- }, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2e3) + (config.connectionTimeout ?? 1e3));
316
- const queryString = request.query ? buildQueryString(request.query) : "";
317
- let auth = void 0;
318
- if (request.username != null || request.password != null) {
319
- const username = request.username ?? "";
320
- const password = request.password ?? "";
321
- auth = `${username}:${password}`;
322
- }
323
- let path = request.path;
324
- if (queryString) {
325
- path += `?${queryString}`;
326
- }
327
- if (request.fragment) {
328
- path += `#${request.fragment}`;
329
- }
330
- let hostname = request.hostname ?? "";
331
- if (hostname[0] === "[" && hostname.endsWith("]")) {
332
- hostname = request.hostname.slice(1, -1);
333
- } else {
334
- hostname = request.hostname;
335
- }
336
- const nodeHttpsOptions = {
337
- headers: request.headers,
338
- host: hostname,
339
- method: request.method,
340
- path,
341
- port: request.port,
342
- agent,
343
- auth
344
- };
345
- const requestFunc = isSSL ? hsRequest : hRequest;
346
- const req = requestFunc(nodeHttpsOptions, (res) => {
347
- const httpResponse = new HttpResponse({
348
- statusCode: res.statusCode || -1,
349
- reason: res.statusMessage,
350
- headers: getTransformedHeaders(res.headers),
351
- body: res
352
- });
353
- resolve({ response: httpResponse });
354
- });
355
- req.on("error", (err) => {
356
- if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {
357
- reject(Object.assign(err, { name: "TimeoutError" }));
358
- } else {
359
- reject(err);
360
- }
361
- });
362
- if (abortSignal) {
363
- const onAbort = () => {
364
- req.destroy();
365
- const abortError = buildAbortError(abortSignal);
366
- reject(abortError);
367
- };
368
- if (typeof abortSignal.addEventListener === "function") {
369
- const signal = abortSignal;
370
- signal.addEventListener("abort", onAbort, { once: true });
371
- req.once("close", () => signal.removeEventListener("abort", onAbort));
372
- } else {
373
- abortSignal.onabort = onAbort;
374
- }
375
- }
376
- const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout;
377
- connectionTimeoutId = setConnectionTimeout(req, reject, config.connectionTimeout);
378
- requestTimeoutId = setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, config.logger ?? console);
379
- socketTimeoutId = setSocketTimeout(req, reject, config.socketTimeout);
380
- const httpAgent = nodeHttpsOptions.agent;
381
- if (typeof httpAgent === "object" && "keepAlive" in httpAgent) {
382
- keepAliveTimeoutId = setSocketKeepAlive(req, {
383
- keepAlive: httpAgent.keepAlive,
384
- keepAliveMsecs: httpAgent.keepAliveMsecs
385
- });
386
- }
387
- writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout, this.externalAgent).catch((e) => {
388
- clearTimeouts();
389
- return _reject(e);
390
- });
391
- });
392
- }
393
- updateHttpClientConfig(key, value) {
394
- this.config = void 0;
395
- this.configProvider = this.configProvider.then((config) => {
396
- return {
397
- ...config,
398
- [key]: value
399
- };
400
- });
401
- }
402
- httpHandlerConfigs() {
403
- return this.config ?? {};
404
- }
405
- resolveDefaultConfig(options) {
406
- const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger: logger2 } = options || {};
407
- const keepAlive = true;
408
- const maxSockets = 50;
409
- return {
410
- connectionTimeout,
411
- requestTimeout,
412
- socketTimeout,
413
- socketAcquisitionWarningTimeout,
414
- throwOnRequestTimeout,
415
- httpAgentProvider: async () => {
416
- const { Agent, request } = await import("http");
417
- hRequest = request;
418
- hAgent = Agent;
419
- if (httpAgent instanceof hAgent || typeof httpAgent?.destroy === "function") {
420
- this.externalAgent = true;
421
- return httpAgent;
422
- }
423
- return new hAgent({ keepAlive, maxSockets, ...httpAgent });
424
- },
425
- httpsAgent: (() => {
426
- if (httpsAgent instanceof hsAgent || typeof httpsAgent?.destroy === "function") {
427
- this.externalAgent = true;
428
- return httpsAgent;
429
- }
430
- return new hsAgent({ keepAlive, maxSockets, ...httpsAgent });
431
- })(),
432
- logger: logger2
433
- };
434
- }
435
- };
436
-
437
- // ../../node_modules/.pnpm/@smithy+util-hex-encoding@4.2.2/node_modules/@smithy/util-hex-encoding/dist-es/index.js
438
- var SHORT_TO_HEX = {};
439
- var HEX_TO_SHORT = {};
440
- for (let i = 0; i < 256; i++) {
441
- let encodedByte = i.toString(16).toLowerCase();
442
- if (encodedByte.length === 1) {
443
- encodedByte = `0${encodedByte}`;
444
- }
445
- SHORT_TO_HEX[i] = encodedByte;
446
- HEX_TO_SHORT[encodedByte] = i;
447
- }
448
- function fromHex(encoded) {
449
- if (encoded.length % 2 !== 0) {
450
- throw new Error("Hex encoded strings must have an even number length");
451
- }
452
- const out = new Uint8Array(encoded.length / 2);
453
- for (let i = 0; i < encoded.length; i += 2) {
454
- const encodedByte = encoded.slice(i, i + 2).toLowerCase();
455
- if (encodedByte in HEX_TO_SHORT) {
456
- out[i / 2] = HEX_TO_SHORT[encodedByte];
457
- } else {
458
- throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);
459
- }
460
- }
461
- return out;
462
- }
463
- function toHex(bytes) {
464
- let out = "";
465
- for (let i = 0; i < bytes.byteLength; i++) {
466
- out += SHORT_TO_HEX[bytes[i]];
467
- }
468
- return out;
469
- }
470
-
471
- // ../../node_modules/.pnpm/@smithy+util-base64@4.3.2/node_modules/@smithy/util-base64/dist-es/toBase64.js
472
- var toBase64 = (_input) => {
473
- let input;
474
- if (typeof _input === "string") {
475
- input = fromUtf8(_input);
476
- } else {
477
- input = _input;
478
- }
479
- if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
480
- throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");
481
- }
482
- return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("base64");
483
- };
484
-
485
- // ../../node_modules/.pnpm/@smithy+util-base64@4.3.2/node_modules/@smithy/util-base64/dist-es/fromBase64.js
486
- var BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;
487
- var fromBase64 = (input) => {
488
- if (input.length * 3 % 4 !== 0) {
489
- throw new TypeError(`Incorrect padding on base64 string.`);
490
- }
491
- if (!BASE64_REGEX.exec(input)) {
492
- throw new TypeError(`Invalid base64 string.`);
493
- }
494
- const buffer = fromString(input, "base64");
495
- return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
496
- };
497
-
498
- export {
499
- fromHex,
500
- toHex,
501
- fromBase64,
502
- toBase64,
503
- NodeHttpHandler
504
- };