@vertesia/api-fetch-client 1.3.0 → 1.4.0-dev.20260615.042033Z

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 (80) hide show
  1. package/README.md +25 -0
  2. package/lib/base.d.ts +135 -0
  3. package/lib/base.d.ts.map +1 -0
  4. package/lib/base.js +374 -0
  5. package/lib/base.js.map +1 -0
  6. package/lib/{types/client.d.ts → client.d.ts} +7 -8
  7. package/lib/client.d.ts.map +1 -0
  8. package/lib/{esm/client.js → client.js} +24 -11
  9. package/lib/client.js.map +1 -0
  10. package/lib/{types/errors.d.ts → errors.d.ts} +5 -5
  11. package/lib/errors.d.ts.map +1 -0
  12. package/lib/{esm/errors.js → errors.js} +22 -9
  13. package/lib/errors.js.map +1 -0
  14. package/lib/index.d.ts +5 -0
  15. package/lib/index.d.ts.map +1 -0
  16. package/lib/index.js +5 -0
  17. package/lib/index.js.map +1 -0
  18. package/lib/{types/sse → sse}/EventSourceParserStream.d.ts +4 -1
  19. package/lib/sse/EventSourceParserStream.d.ts.map +1 -0
  20. package/lib/{esm/sse → sse}/EventSourceParserStream.js +5 -4
  21. package/lib/sse/EventSourceParserStream.js.map +1 -0
  22. package/lib/sse/TextDecoderStream.d.ts.map +1 -0
  23. package/lib/{esm/sse → sse}/TextDecoderStream.js +2 -2
  24. package/lib/sse/TextDecoderStream.js.map +1 -0
  25. package/lib/{types/sse → sse}/index.d.ts +7 -2
  26. package/lib/sse/index.d.ts.map +1 -0
  27. package/lib/{esm/sse → sse}/index.js +3 -3
  28. package/lib/sse/index.js.map +1 -0
  29. package/lib/{types/utils.d.ts → utils.d.ts} +1 -1
  30. package/lib/utils.d.ts.map +1 -0
  31. package/lib/{esm/utils.js → utils.js} +3 -3
  32. package/lib/utils.js.map +1 -0
  33. package/package.json +21 -25
  34. package/src/base.ts +297 -79
  35. package/src/client.ts +46 -24
  36. package/src/errors.ts +28 -15
  37. package/src/index.ts +4 -4
  38. package/src/sse/EventSourceParserStream.ts +13 -10
  39. package/src/sse/TextDecoderStream.ts +16 -11
  40. package/src/sse/index.ts +14 -8
  41. package/src/utils.ts +5 -6
  42. package/lib/cjs/base.js +0 -240
  43. package/lib/cjs/base.js.map +0 -1
  44. package/lib/cjs/client.js +0 -115
  45. package/lib/cjs/client.js.map +0 -1
  46. package/lib/cjs/errors.js +0 -63
  47. package/lib/cjs/errors.js.map +0 -1
  48. package/lib/cjs/index.js +0 -21
  49. package/lib/cjs/index.js.map +0 -1
  50. package/lib/cjs/package.json +0 -3
  51. package/lib/cjs/sse/EventSourceParserStream.js +0 -41
  52. package/lib/cjs/sse/EventSourceParserStream.js.map +0 -1
  53. package/lib/cjs/sse/TextDecoderStream.js +0 -53
  54. package/lib/cjs/sse/TextDecoderStream.js.map +0 -1
  55. package/lib/cjs/sse/index.js +0 -27
  56. package/lib/cjs/sse/index.js.map +0 -1
  57. package/lib/cjs/utils.js +0 -38
  58. package/lib/cjs/utils.js.map +0 -1
  59. package/lib/esm/base.js +0 -235
  60. package/lib/esm/base.js.map +0 -1
  61. package/lib/esm/client.js.map +0 -1
  62. package/lib/esm/errors.js.map +0 -1
  63. package/lib/esm/index.js +0 -5
  64. package/lib/esm/index.js.map +0 -1
  65. package/lib/esm/sse/EventSourceParserStream.js.map +0 -1
  66. package/lib/esm/sse/TextDecoderStream.js.map +0 -1
  67. package/lib/esm/sse/index.js.map +0 -1
  68. package/lib/esm/utils.js.map +0 -1
  69. package/lib/tsconfig.tsbuildinfo +0 -1
  70. package/lib/types/base.d.ts +0 -83
  71. package/lib/types/base.d.ts.map +0 -1
  72. package/lib/types/client.d.ts.map +0 -1
  73. package/lib/types/errors.d.ts.map +0 -1
  74. package/lib/types/index.d.ts +0 -5
  75. package/lib/types/index.d.ts.map +0 -1
  76. package/lib/types/sse/EventSourceParserStream.d.ts.map +0 -1
  77. package/lib/types/sse/TextDecoderStream.d.ts.map +0 -1
  78. package/lib/types/sse/index.d.ts.map +0 -1
  79. package/lib/types/utils.d.ts.map +0 -1
  80. /package/lib/{types/sse → sse}/TextDecoderStream.d.ts +0 -0
package/lib/cjs/errors.js DELETED
@@ -1,63 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ConnectionError = exports.ServerError = exports.RequestError = void 0;
4
- function createMessage(message, request, status, payload, displayDetails) {
5
- let msg = message;
6
- if (displayDetails) {
7
- msg += '\nRequest: ' + request.method + ' ' + request.url + ' => ' + status;
8
- const details = payload?.details || payload?.error?.details;
9
- if (details) {
10
- const detailsType = typeof details;
11
- if (detailsType === 'string') {
12
- msg += '\nDetails: ' + details;
13
- }
14
- else if (detailsType === "object") {
15
- msg += '\nDetails: ' + JSON.stringify(details, undefined, 2);
16
- }
17
- }
18
- msg += '\nStack Trace: ';
19
- }
20
- return msg;
21
- }
22
- class RequestError extends Error {
23
- status;
24
- payload;
25
- request;
26
- request_info;
27
- displayDetails;
28
- original_message;
29
- constructor(message, request, status, payload, displayDetails = true) {
30
- super(createMessage(message, request, status, payload, displayDetails));
31
- this.original_message = message;
32
- this.request = request;
33
- this.status = status;
34
- this.payload = payload;
35
- this.request_info = request.method + ' ' + request.url + ' => ' + status;
36
- this.displayDetails = displayDetails;
37
- }
38
- get details() {
39
- return this.payload?.details || this.payload?.error?.details;
40
- }
41
- }
42
- exports.RequestError = RequestError;
43
- class ServerError extends RequestError {
44
- constructor(message, req, status, payload, displayDetails = true) {
45
- super(message, req, status, payload, displayDetails);
46
- }
47
- updateDetails(details) {
48
- if (details !== this.details) {
49
- return new ServerError(this.original_message, this.request, this.status, { ...this.payload, details }, this.displayDetails);
50
- }
51
- else {
52
- return this;
53
- }
54
- }
55
- }
56
- exports.ServerError = ServerError;
57
- class ConnectionError extends RequestError {
58
- constructor(req, err) {
59
- super("Failed to connect to server: " + err.message, req, 0, err);
60
- }
61
- }
62
- exports.ConnectionError = ConnectionError;
63
- //# sourceMappingURL=errors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":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(function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./base.js"), exports);
18
- __exportStar(require("./client.js"), exports);
19
- __exportStar(require("./errors.js"), exports);
20
- __exportStar(require("./sse/index.js"), exports);
21
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,8CAA4B;AAC5B,8CAA4B;AAC5B,iDAA+B"}
@@ -1,3 +0,0 @@
1
- {
2
- "type": "commonjs"
3
- }
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EventSourceParserStream = void 0;
4
- const eventsource_parser_1 = require("eventsource-parser");
5
- /**
6
- * We copied this file from the eventsource-parser/stream package and made it a part of our project.
7
- * because importing the eventsource-parser/stream breaks tsc build when building the commonjs version
8
- * see for a similar error:
9
- * https://stackoverflow.com/questions/77280140/why-typescript-dont-see-exports-of-package-with-module-commonjs-and-moduleres
10
- */
11
- /**
12
- * A TransformStream that ingests a stream of strings and produces a stream of ParsedEvents.
13
- *
14
- * @example
15
- * ```
16
- * const eventStream =
17
- * response.body
18
- * .pipeThrough(new TextDecoderStream())
19
- * .pipeThrough(new EventSourceParserStream())
20
- * ```
21
- * @public
22
- */
23
- class EventSourceParserStream extends TransformStream {
24
- constructor() {
25
- let parser;
26
- super({
27
- start(controller) {
28
- parser = (0, eventsource_parser_1.createParser)((event) => {
29
- if (event.type === 'event') {
30
- controller.enqueue(event);
31
- }
32
- });
33
- },
34
- transform(chunk) {
35
- parser.feed(chunk);
36
- },
37
- });
38
- }
39
- }
40
- exports.EventSourceParserStream = EventSourceParserStream;
41
- //# sourceMappingURL=EventSourceParserStream.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EventSourceParserStream.js","sourceRoot":"","sources":["../../../src/sse/EventSourceParserStream.ts"],"names":[],"mappings":";;;AAAA,2DAA8G;AAE9G;;;;;GAKG;AAEH;;;;;;;;;;;GAWG;AACH,MAAa,uBAAwB,SAAQ,eAAoC;IAC7E;QACI,IAAI,MAA0B,CAAA;QAE9B,KAAK,CAAC;YACF,KAAK,CAAC,UAAU;gBACZ,MAAM,GAAG,IAAA,iCAAY,EAAC,CAAC,KAAsC,EAAE,EAAE;oBAC7D,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;wBACzB,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;oBAC7B,CAAC;gBACL,CAAC,CAAC,CAAA;YACN,CAAC;YACD,SAAS,CAAC,KAAK;gBACX,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;YACtB,CAAC;SACJ,CAAC,CAAA;IACN,CAAC;CACJ;AAjBD,0DAiBC"}
@@ -1,53 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TextDecoderStream = void 0;
4
- /**
5
- * Decode a stream of bytes into a stream of characters.
6
- * Some javascript env like Bun.js doesn't supports the TextDecoderStream (as for jan 2024)
7
- * This is a polyfill for bunJS
8
- */
9
- let _TextDecoderStream;
10
- if (globalThis.TextDecoderStream && typeof globalThis.TextDecoderStream === 'function') {
11
- exports.TextDecoderStream = _TextDecoderStream = globalThis.TextDecoderStream;
12
- }
13
- else {
14
- class MyTextDecoderStream extends TransformStream {
15
- _options;
16
- constructor(encoding = "utf-8", { fatal = false, ignoreBOM = false } = {}) {
17
- super(new TextDecodeTransformer(new TextDecoder(encoding, { fatal, ignoreBOM })));
18
- this._options = { fatal, ignoreBOM, encoding };
19
- }
20
- get encoding() {
21
- return this._options.encoding;
22
- }
23
- get fatal() {
24
- return this._options.fatal;
25
- }
26
- get ignoreBOM() {
27
- return this._options.ignoreBOM;
28
- }
29
- }
30
- class TextDecodeTransformer {
31
- decoder;
32
- constructor(decoder) {
33
- this.decoder = decoder;
34
- }
35
- transform(chunk, controller) {
36
- if (!(chunk instanceof ArrayBuffer || ArrayBuffer.isView(chunk))) {
37
- throw new TypeError("Input must be a compatible with: ArrayBuffer | Uint8Array");
38
- }
39
- const text = this.decoder.decode(chunk, { stream: true });
40
- if (text.length !== 0) {
41
- controller.enqueue(text);
42
- }
43
- }
44
- flush(controller) {
45
- const text = this.decoder.decode();
46
- if (text.length !== 0) {
47
- controller.enqueue(text);
48
- }
49
- }
50
- }
51
- exports.TextDecoderStream = _TextDecoderStream = MyTextDecoderStream;
52
- }
53
- //# sourceMappingURL=TextDecoderStream.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextDecoderStream.js","sourceRoot":"","sources":["../../../src/sse/TextDecoderStream.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,IAAI,kBAA4C,CAAC;AACjD,IAAI,UAAU,CAAC,iBAAiB,IAAI,OAAO,UAAU,CAAC,iBAAiB,KAAK,UAAU,EAAE,CAAC;IACrF,4BAAA,kBAAkB,GAAG,UAAU,CAAC,iBAAiB,CAAC;AACtD,CAAC;KAAM,CAAC;IACJ,MAAM,mBAAoB,SAAQ,eAAiD;QACvE,QAAQ,CAIf;QACD,YAAY,QAAQ,GAAG,OAAO,EAAE,EAAE,KAAK,GAAG,KAAK,EAAE,SAAS,GAAG,KAAK,KAG9D,EAAE;YACF,KAAK,CAAC,IAAI,qBAAqB,CAAC,IAAI,WAAW,CAAC,QAAQ,EAAE,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1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TextDecoderStream = void 0;
4
- exports.sse = sse;
5
- const TextDecoderStream_js_1 = require("./TextDecoderStream.js");
6
- Object.defineProperty(exports, "TextDecoderStream", { enumerable: true, get: function () { return TextDecoderStream_js_1.TextDecoderStream; } });
7
- const EventSourceParserStream_js_1 = require("./EventSourceParserStream.js");
8
- /**
9
- * A SSE response reader.
10
- * Usage client.get('/path', {reader: sse}) or client.post('/path', {reader: sse})
11
- * where sse is this function
12
- * @param response
13
- * @returns
14
- */
15
- async function sse(response) {
16
- if (!response.ok) {
17
- const text = await response.text();
18
- const error = new Error("SSE error: " + response.status + ". Content:\n" + text);
19
- error.status = response.status;
20
- throw error;
21
- }
22
- if (!response.body) {
23
- throw new Error('No body in response');
24
- }
25
- return response.body.pipeThrough(new TextDecoderStream_js_1.TextDecoderStream()).pipeThrough(new EventSourceParserStream_js_1.EventSourceParserStream());
26
- }
27
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sse/index.ts"],"names":[],"mappings":";;;AAYA,kBAWC;AAvBD,iEAA2D;AA0BlD,kGA1BA,wCAAiB,OA0BA;AAzB1B,6EAAuE;AAIvE;;;;;;GAMG;AACI,KAAK,UAAU,GAAG,CAAC,QAAkB;IACxC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACf,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnC,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,aAAa,GAAG,QAAQ,CAAC,MAAM,GAAG,cAAc,GAAG,IAAI,CAAC,CAAC;QAChF,KAAa,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;QACxC,MAAM,KAAK,CAAC;IAChB,CAAC;IACD,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,wCAAiB,EAAE,CAAC,CAAC,WAAW,CAAC,IAAI,oDAAuB,EAAE,CAAC,CAAC;AACzG,CAAC"}
package/lib/cjs/utils.js DELETED
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buildQueryString = buildQueryString;
4
- exports.join = join;
5
- exports.removeTrailingSlash = removeTrailingSlash;
6
- function buildQueryString(query) {
7
- const parts = [];
8
- for (const key of Object.keys(query)) {
9
- const val = query[key];
10
- if (val != null) {
11
- parts.push(encodeURIComponent(key) + "=" + encodeURIComponent(String(val)));
12
- }
13
- }
14
- return parts.join("&");
15
- }
16
- function join(left, right) {
17
- if (left.endsWith('/')) {
18
- if (right.startsWith('/')) {
19
- return left + right.substring(1);
20
- }
21
- else {
22
- return left + right;
23
- }
24
- }
25
- else if (right.startsWith('/')) {
26
- return left + right;
27
- }
28
- else {
29
- return left + '/' + right;
30
- }
31
- }
32
- function removeTrailingSlash(path) {
33
- if (path[path.length - 1] === '/') {
34
- return path.slice(0, -1);
35
- }
36
- return path;
37
- }
38
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;AACA,4CASC;AAED,oBAYC;AACD,kDAKC;AA7BD,SAAgB,gBAAgB,CAAC,KAAU;IACvC,MAAM,KAAK,GAAG,EAAE,CAAC;IACjB,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACnC,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;QACvB,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YACd,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,kBAAkB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAChF,CAAC;IACL,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC;AAED,SAAgB,IAAI,CAAC,IAAY,EAAE,KAAa;IAC5C,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACrB,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YACxB,OAAO,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QACrC,CAAC;aAAM,CAAC;YACJ,OAAO,IAAI,GAAG,KAAK,CAAC;QACxB,CAAC;IACL,CAAC;SAAM,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/B,OAAO,IAAI,GAAG,KAAK,CAAC;IACxB,CAAC;SAAM,CAAC;QACJ,OAAO,IAAI,GAAG,GAAG,GAAG,KAAK,CAAC;IAC9B,CAAC;AACL,CAAC;AACD,SAAgB,mBAAmB,CAAC,IAAY;IAC5C,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC7B,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"}
package/lib/esm/base.js DELETED
@@ -1,235 +0,0 @@
1
- import { ConnectionError, ServerError } from "./errors.js";
2
- import { sse } from "./sse/index.js";
3
- import { buildQueryString, join, removeTrailingSlash } from "./utils.js";
4
- export function fetchPromise(fetchImpl) {
5
- if (fetchImpl) {
6
- return Promise.resolve(fetchImpl);
7
- }
8
- else if (typeof globalThis.fetch === 'function') {
9
- return Promise.resolve(globalThis.fetch);
10
- }
11
- else {
12
- // install an error impl
13
- return Promise.resolve(() => {
14
- throw new Error('No Fetch implementation found');
15
- });
16
- }
17
- }
18
- function isInvalidJsonPayload(payload) {
19
- return payload?.error === "Not a valid JSON payload" && typeof payload.text === "string";
20
- }
21
- export class ClientBase {
22
- _fetch;
23
- baseUrl;
24
- errorFactory = (err) => err;
25
- verboseErrors = true;
26
- constructor(baseUrl, fetchImpl) {
27
- this.baseUrl = removeTrailingSlash(baseUrl);
28
- this._fetch = fetchPromise(fetchImpl);
29
- }
30
- /**
31
- * Can be subclassed to map to custom errors
32
- * @param err
33
- */
34
- throwError(err) {
35
- throw this.errorFactory(err);
36
- }
37
- /**
38
- * Resolve a path to a full URL. If the path is already an absolute URL
39
- * (starts with http:// or https://), it is returned as-is.
40
- */
41
- getUrl(path) {
42
- if (path.startsWith('http://') || path.startsWith('https://')) {
43
- return removeTrailingSlash(path);
44
- }
45
- return removeTrailingSlash(join(this.baseUrl, path));
46
- }
47
- get(path, params) {
48
- return this.request('GET', path, params);
49
- }
50
- del(path, params) {
51
- return this.request('DELETE', path, params);
52
- }
53
- delete(path, params) {
54
- return this.request('DELETE', path, params);
55
- }
56
- post(path, params) {
57
- return this.request('POST', path, params);
58
- }
59
- put(path, params) {
60
- return this.request('PUT', path, params);
61
- }
62
- /**
63
- * You can customize the json parser by overriding this method
64
- * @param text
65
- * @returns
66
- */
67
- jsonParse(text) {
68
- return JSON.parse(text);
69
- }
70
- /**
71
- * Can be overridden to create the request
72
- * @param fetch
73
- * @param url
74
- * @param init
75
- * @returns
76
- */
77
- createRequest(url, init) {
78
- return Promise.resolve(new Request(url, init));
79
- }
80
- createServerError(req, res, payload) {
81
- const status = res.status;
82
- let message = 'Server Error: ' + status;
83
- if (payload) {
84
- if (isInvalidJsonPayload(payload)) {
85
- message += res.statusText ? ' ' + res.statusText : '';
86
- message += ': non-JSON response';
87
- }
88
- else if (payload.message) {
89
- message = String(payload.message);
90
- }
91
- else if (payload.error) {
92
- if (typeof payload.error === 'string') {
93
- message = String(payload.error);
94
- }
95
- else if (typeof payload.error.message === 'string') {
96
- message = String(payload.error.message);
97
- }
98
- }
99
- }
100
- return new ServerError(message, req, res.status, payload, this.verboseErrors);
101
- }
102
- async readJSONPayload(res) {
103
- return res.text().then(text => {
104
- if (!text) {
105
- return undefined;
106
- }
107
- else {
108
- try {
109
- return this.jsonParse(text);
110
- }
111
- catch (err) {
112
- return {
113
- status: res.status,
114
- error: "Not a valid JSON payload",
115
- message: err.message,
116
- text: text,
117
- };
118
- }
119
- }
120
- }).catch((err) => {
121
- return {
122
- status: res.status,
123
- error: "Unable to load response content",
124
- message: err.message,
125
- };
126
- });
127
- }
128
- /**
129
- * Subclasses You can override this to do something with the response
130
- * @param res
131
- */
132
- handleResponse(req, res, params) {
133
- if (params && params.reader) {
134
- if (params.reader === 'sse') {
135
- return sse(res);
136
- }
137
- else {
138
- return params.reader.call(this, res);
139
- }
140
- }
141
- else {
142
- return this.readJSONPayload(res).then((payload) => {
143
- if (res.ok) {
144
- return payload;
145
- }
146
- else {
147
- this.throwError(this.createServerError(req, res, payload));
148
- }
149
- });
150
- }
151
- }
152
- async request(method, path, params) {
153
- let url = this.getUrl(path);
154
- if (params?.query) {
155
- url += '?' + buildQueryString(params.query);
156
- }
157
- const headers = this.headers ? Object.assign({}, this.headers) : {};
158
- const paramsHeaders = params?.headers;
159
- if (paramsHeaders) {
160
- for (const key in paramsHeaders) {
161
- headers[key.toLowerCase()] = paramsHeaders[key];
162
- }
163
- }
164
- let body;
165
- const payload = params?.payload;
166
- if (payload) {
167
- if (params && params.jsonPayload === false) {
168
- body = payload;
169
- }
170
- else {
171
- body = (typeof payload !== 'string') ? JSON.stringify(payload) : payload;
172
- if (!('content-type' in headers)) {
173
- headers['content-type'] = 'application/json';
174
- }
175
- }
176
- }
177
- // When using SSE reader, ensure the Accept header requests event-stream
178
- if (params?.reader === 'sse' && !('accept' in headers)) {
179
- headers['accept'] = 'text/event-stream';
180
- }
181
- const init = {
182
- method: method,
183
- headers: headers,
184
- body: body,
185
- };
186
- const req = await this.createRequest(url, init);
187
- return this._fetch.then(fetch => fetch(req).catch(err => {
188
- console.error(`Failed to connect to ${url}`, err);
189
- this.throwError(new ConnectionError(req, err));
190
- }).then(res => {
191
- return this.handleResponse(req, res, params);
192
- }));
193
- }
194
- /**
195
- * Perform a request and consume the response as an SSE stream.
196
- * Calls `onEvent` for each parsed SSE event, then returns the last event.
197
- *
198
- * @param method HTTP method
199
- * @param path URL path (relative to baseUrl) or absolute URL (http:// or https://)
200
- * @param params Request parameters (payload, headers, query)
201
- * @param onEvent Callback for each SSE event
202
- * @returns The last SSE event received, or undefined if the stream was empty
203
- */
204
- async sseRequest(method, path, params, onEvent) {
205
- const stream = await this.request(method, path, {
206
- ...params,
207
- reader: 'sse',
208
- });
209
- const reader = stream.getReader();
210
- let lastEvent;
211
- try {
212
- while (true) {
213
- const { done, value } = await reader.read();
214
- if (done)
215
- break;
216
- lastEvent = value;
217
- onEvent(value);
218
- }
219
- }
220
- finally {
221
- reader.releaseLock();
222
- }
223
- return lastEvent;
224
- }
225
- /**
226
- * Expose the fetch method
227
- * @param input
228
- * @param init
229
- * @returns
230
- */
231
- fetch(input, init) {
232
- return this._fetch.then(fetch => fetch(input, init));
233
- }
234
- }
235
- //# sourceMappingURL=base.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAgB,WAAW,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,GAAG,EAAmB,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AA6BzE,MAAM,UAAU,YAAY,CAAC,SAAwC;IACjE,IAAI,SAAS,EAAE,CAAC;QACZ,OAAO,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACtC,CAAC;SAAM,IAAI,OAAO,UAAU,CAAC,KAAK,KAAK,UAAU,EAAE,CAAC;QAChD,OAAO,OAAO,CAAC,OAAO,CAAC,UA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0 @@
1
- export * from "./base.js";
2
- export * from "./client.js";
3
- export * from "./errors.js";
4
- export * from "./sse/index.js";
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"EventSourceParserStream.js","sourceRoot":"","sources":["../../../src/sse/EventSourceParserStream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA+D,MAAM,oBAAoB,CAAA;AAE9G;;;;;GAKG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,uBAAwB,SAAQ,eAAoC;IAC7E;QACI,IAAI,MAA0B,CAAA;QAE9B,KAAK,CAAC;YACF,KAAK,CAAC,UAAU;gBACZ,MAAM,GAAG,YAAY,CAAC,CAAC,KAAsC,EAAE,EAAE;oBAC7D,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;wBACzB,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;oBAC7B,CAAC;gBACL,CAAC,CAAC,CAAA;YACN,CAAC;YACD,SAAS,CAAC,KAAK;gBACX,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;YACtB,CAAC;SACJ,CAAC,CAAA;IACN,CAAC;CACJ"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextDecoderStream.js","sourceRoot":"","sources":["../../../src/sse/TextDecoderStream.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,IAAI,kBAA4C,CAAC;AACjD,IAAI,UAAU,CAAC,iBAAiB,IAAI,OAAO,UAAU,CAAC,iBAAiB,KAAK,UAAU,EAAE,CAAC;IACrF,kBAAkB,GAAG,UAAU,CAAC,iBAAiB,CAAC;AACtD,CAAC;KAAM,CAAC;IACJ,MAA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AAM,EAAE,CAAC;YACnC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACpB,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC7B,CAAC;QACL,CAAC;KACJ;IACD,kBAAkB,GAAG,mBAA0B,CAAC;AACpD,CAAC;AAED,OAAO,EAAE,kBAAkB,IAAI,iBAAiB,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sse/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAIvE;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,GAAG,CAAC,QAAkB;IACxC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACf,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnC,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,aAAa,GAAG,QAAQ,CAAC,MAAM,GAAG,cAAc,GAAG,IAAI,CAAC,CAAC;QAChF,KAAa,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;QACxC,MAAM,KAAK,CAAC;IAChB,CAAC;IACD,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,iBAAiB,EAAE,CAAC,CAAC,WAAW,CAAC,IAAI,uBAAuB,EAAE,CAAC,CAAC;AACzG,CAAC;AAED,0DAA0D;AAC1D,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,gBAAgB,CAA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modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.scripthost.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2024.full.d.ts","../src/errors.ts","../src/sse/TextDecoderStream.ts","../../../node_modules/.pnpm/eventsource-parser@1.1.2/node_modules/eventsource-parser/dist/index.d.ts","../src/sse/EventSourceParserStream.ts","../src/sse/index.ts","../src/utils.ts","../src/base.ts","../src/client.ts","../src/index.ts"],"fileIdsList":[[76,80,81],[76,82],[76,80,82,83],[78],[77,78,79]],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","impliedFormat":1},{"version":"8a15b4607d9a499e2dbeed9ec0d3c0d7372c850b2d5f1fb259e8f6d41d468a84","impliedFormat":1},{"version":"26e0fe14baee4e127f4365d1ae0b276f400562e45e19e35fd2d4c296684715e6","impliedFormat":1},{"version":"1e9332c23e9a907175e0ffc6a49e236f97b48838cc8aec9ce7e4cec21e544b65","impliedFormat":1},{"version":"3753fbc1113dc511214802a2342280a8b284ab9094f6420e7aa171e868679f91","impliedFormat":1},{"version":"d6b1eba8496bdd0eed6fc8a685768fe01b2da4a0388b5fe7df558290bffcf32f","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","impliedFormat":1},{"version":"2a2de5b9459b3fc44decd9ce6100b72f1b002ef523126c1d3d8b2a4a63d74d78","affectsGlobalScope":true,"impliedFormat":1},{"version":"f13f4b465c99041e912db5c44129a94588e1aafee35a50eab51044833f50b4ee","affectsGlobalScope":true,"impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","affectsGlobalScope":true,"impliedFormat":1},{"version":"db9709688f82c9e5f65a119c64d835f906efe5f559d08b11642d56eb85b79357","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b25b8c874acd1a4cf8444c3617e037d444d19080ac9f634b405583fd10ce1f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"37be57d7c90cf1f8112ee2636a068d8fd181289f82b744160ec56a7dc158a9f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"a917a49ac94cd26b754ab84e113369a75d1a47a710661d7cd25e961cc797065f","affectsGlobalScope":true,"impliedFormat":1},{"version":"6d3261badeb7843d157ef3e6f5d1427d0eeb0af0cf9df84a62cfd29fd47ac86e","affectsGlobalScope":true,"impliedFormat":1},{"version":"195daca651dde22f2167ac0d0a05e215308119a3100f5e6268e8317d05a92526","affectsGlobalScope":true,"impliedFormat":1},{"version":"8b11e4285cd2bb164a4dc09248bdec69e9842517db4ca47c1ba913011e44ff2f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0508571a52475e245b02bc50fa1394065a0a3d05277fbf5120c3784b85651799","affectsGlobalScope":true,"impliedFormat":1},{"version":"8f9af488f510c3015af3cc8c267a9e9d96c4dd38a1fdff0e11dc5a544711415b","affectsGlobalScope":true,"impliedFormat":1},{"version":"fc611fea8d30ea72c6bbfb599c9b4d393ce22e2f5bfef2172534781e7d138104","affectsGlobalScope":true,"impliedFormat":1},{"version":"0bd714129fca875f7d4c477a1a392200b0bcd13fb2e80928cd334b63830ea047","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2c9037ae6cd2c52d80ceef0b3c5ffdb488627d71529cf4f63776daf11161c9a","affectsGlobalScope":true,"impliedFormat":1},{"version":"135d5cf4d345f59f1a9caadfafcd858d3d9cc68290db616cc85797224448cccc","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc238c3f81c2984751932b6aab223cd5b830e0ac6cad76389e5e9d2ffc03287d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4a07f9b76d361f572620927e5735b77d6d2101c23cdd94383eb5b706e7b36357","affectsGlobalScope":true,"impliedFormat":1},{"version":"7c4e8dc6ab834cc6baa0227e030606d29e3e8449a9f67cdf5605ea5493c4db29","affectsGlobalScope":true,"impliedFormat":1},{"version":"de7ba0fd02e06cd9a5bd4ab441ed0e122735786e67dde1e849cced1cd8b46b78","affectsGlobalScope":true,"impliedFormat":1},{"version":"6148e4e88d720a06855071c3db02069434142a8332cf9c182cda551adedf3156","affectsGlobalScope":true,"impliedFormat":1},{"version":"d63dba625b108316a40c95a4425f8d4294e0deeccfd6c7e59d819efa19e23409","affectsGlobalScope":true,"impliedFormat":1},{"version":"0568d6befee03dd435bed4fc25c4e46865b24bdcb8c563fdc21f580a2c301904","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","affectsGlobalScope":true,"impliedFormat":1},{"version":"b9f65879de79a7647ad2e5b8089277c215911fa99d4b858d78014df6ba2852f3","impliedFormat":1},{"version":"3a9c0d57208303cff90b17a4e68a042eb00f3c6c7dae096ab0898a062c1a7e7e","signature":"06cbf01c04ea45a0b349dbb546c0250e4b5b2ccf166e1fd4a8849d62e0a34bfb","impliedFormat":99},{"version":"f2144e39a7bc9d8ed4de8c607516910173d50f41c26251952a2d2c98ff0b270c","signature":"62206b41a3c149fd3e91ecbcbb96e5407e4009cfacf007bbb461e355d90348e8","impliedFormat":99},{"version":"5900e3a151f31f3e1b2acef8acfb7f95600cbd3532b10dab5e633d0a40a3ae66","impliedFormat":99},{"version":"e95a569aee44c5de324c7a2de4fd7a4cb3c9290fdeb8cf2b279b5fafb68f8065","signature":"2c643c908afb72bfd1459fc39bc81087b5446bebd4270012efa061c109057c7a","impliedFormat":99},{"version":"d874797edd0627e2b45d1b1d563cfafb936f52dc234a4db6f2701162932cd42e","signature":"b6ae88a77ff7385482dada6c71f408b170a2c5ba80a330d9addc4ac35ce88195","impliedFormat":99},{"version":"04e653c720d7e3dfc0010dd92bf038c31899e65b45ba56d31a54f0a39afc1a36","signature":"f3221994e137eeb22ee0b8b83b701e20212b6904880cb6b45d96b21a3a9d5a1b","impliedFormat":99},{"version":"78c189767ceee5c286c124f6ce1c736bbac1228e4f5e143364e1d643e6715595","signature":"ffb52074ad32f86f48ed2b2c2d5359b3451abc197932706ac42099bfc188dfa7","impliedFormat":99},{"version":"0721d3ec357aa17be9f6b0a8a0df9ae427cc49f2f0ef9d33fe99b4ea9354ff01","signature":"6689c08d8dbe1b3b17e4b0b15194c6e65ffdd3b68037f3d0ba540744de814aca","impliedFormat":99},{"version":"fc8fc261cad7e7bdee28772430058e777f6adbde45efa1b8f61a661526d63b32","impliedFormat":99}],"root":[76,77,[79,84]],"options":{"composite":true,"declaration":true,"declarationDir":"./types","declarationMap":true,"esModuleInterop":true,"experimentalDecorators":true,"module":199,"outDir":"./esm","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":11},"referencedMap":[[82,1],[83,2],[84,3],[79,4],[80,5]],"latestChangedDtsFile":"./types/index.d.ts","version":"6.0.3"}