@zap-studio/fetch 0.5.4 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +2 -4
- package/dist/constants.d.mts +10 -11
- package/dist/constants.d.mts.map +1 -1
- package/dist/constants.mjs.map +1 -1
- package/dist/errors.d.mts +27 -27
- package/dist/errors.d.mts.map +1 -1
- package/dist/errors.mjs.map +1 -1
- package/dist/headers.d.mts +20 -20
- package/dist/headers.d.mts.map +1 -1
- package/dist/headers.mjs +5 -5
- package/dist/headers.mjs.map +1 -1
- package/dist/index.d.mts +94 -95
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/dist/internal.d.mts +25 -26
- package/dist/internal.d.mts.map +1 -1
- package/dist/internal.mjs +35 -36
- package/dist/internal.mjs.map +1 -1
- package/dist/methods.d.mts +16 -17
- package/dist/methods.d.mts.map +1 -1
- package/dist/methods.mjs +8 -8
- package/dist/methods.mjs.map +1 -1
- package/dist/request.d.mts +18 -19
- package/dist/request.d.mts.map +1 -1
- package/dist/request.mjs +13 -10
- package/dist/request.mjs.map +1 -1
- package/dist/types.d.mts +105 -106
- package/dist/types.d.mts.map +1 -1
- package/dist/url.d.mts +20 -21
- package/dist/url.d.mts.map +1 -1
- package/dist/url.mjs +35 -36
- package/dist/url.mjs.map +1 -1
- package/package.json +11 -12
package/dist/internal.mjs
CHANGED
|
@@ -5,6 +5,35 @@ import { resolveRequestUrl } from "./url.mjs";
|
|
|
5
5
|
import { standardValidate } from "@zap-studio/validation";
|
|
6
6
|
//#region src/internal.ts
|
|
7
7
|
/**
|
|
8
|
+
* Normalizes request-level options into a final RequestInit payload and runtime flags.
|
|
9
|
+
*
|
|
10
|
+
* @param options - Request-level options.
|
|
11
|
+
* @param defaults - Client-level defaults.
|
|
12
|
+
* @returns Fully merged request init payload and effective runtime flags.
|
|
13
|
+
*/
|
|
14
|
+
const prepareRequestInit = (options, defaults) => {
|
|
15
|
+
const { headers, json, searchParams, throwOnFetchError = defaults.throwOnFetchError, throwOnValidationError = defaults.throwOnValidationError, ...rest } = options;
|
|
16
|
+
const init = { ...rest };
|
|
17
|
+
const mergedHeaders = mergeHeaders(defaults.headers, headers);
|
|
18
|
+
if (mergedHeaders !== void 0) init.headers = mergedHeaders;
|
|
19
|
+
if (json !== void 0) {
|
|
20
|
+
if (init.body !== void 0 && init.body !== null) throw new TypeError("Cannot provide both `body` and `json`.");
|
|
21
|
+
init.body = JSON.stringify(json);
|
|
22
|
+
if (init.headers === void 0) init.headers = new Headers({ "Content-Type": "application/json" });
|
|
23
|
+
else {
|
|
24
|
+
const requestHeaders = new Headers(init.headers);
|
|
25
|
+
if (!requestHeaders.has("Content-Type")) requestHeaders.set("Content-Type", "application/json");
|
|
26
|
+
init.headers = requestHeaders;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
init,
|
|
31
|
+
searchParams,
|
|
32
|
+
throwOnFetchError,
|
|
33
|
+
throwOnValidationError
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
8
37
|
* Internal fetch implementation used by both $fetch and createFetch.
|
|
9
38
|
*
|
|
10
39
|
* This function normalizes request input, resolves final URL + query params,
|
|
@@ -27,49 +56,19 @@ import { standardValidate } from "@zap-studio/validation";
|
|
|
27
56
|
* as an `AbortError` DOMException.
|
|
28
57
|
* @throws {SyntaxError} When a schema is provided and `response.json()` cannot parse the
|
|
29
58
|
* response body.
|
|
30
|
-
* @throws Any error thrown or rejected by the provided Standard Schema validator.
|
|
59
|
+
* @throws {unknown} Any error thrown or rejected by the provided Standard Schema validator.
|
|
31
60
|
*/
|
|
32
|
-
async
|
|
61
|
+
const fetchInternal = async (input, schema, options, defaults) => {
|
|
33
62
|
const request = normalizeRequest(input, options);
|
|
34
63
|
const { init, searchParams, throwOnFetchError, throwOnValidationError } = prepareRequestInit(request.options, defaults);
|
|
35
64
|
const url = resolveRequestUrl(request.url, defaults, searchParams);
|
|
36
65
|
const response = request.request ? await fetch(new Request(url, request.request), init) : await fetch(url, init);
|
|
37
66
|
if (throwOnFetchError && !response.ok) throw new FetchError(`HTTP ${response.status}: ${response.statusText}`, response);
|
|
38
|
-
if (
|
|
67
|
+
if (schema === void 0) return response;
|
|
39
68
|
const raw = await response.json();
|
|
40
|
-
if (throwOnValidationError) return standardValidate(schema, raw, { throwOnError: true });
|
|
41
|
-
return standardValidate(schema, raw, { throwOnError: false });
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Normalizes request-level options into a final RequestInit payload and runtime flags.
|
|
45
|
-
*
|
|
46
|
-
* @param options - Request-level options.
|
|
47
|
-
* @param defaults - Client-level defaults.
|
|
48
|
-
* @returns Fully merged request init payload and effective runtime flags.
|
|
49
|
-
*/
|
|
50
|
-
function prepareRequestInit(options, defaults) {
|
|
51
|
-
const { headers, json, searchParams, throwOnFetchError = defaults.throwOnFetchError, throwOnValidationError = defaults.throwOnValidationError, ...rest } = options;
|
|
52
|
-
const init = {
|
|
53
|
-
...rest,
|
|
54
|
-
headers: mergeHeaders(defaults.headers, headers)
|
|
55
|
-
};
|
|
56
|
-
if (json !== void 0) {
|
|
57
|
-
if (init.body != null) throw new TypeError("Cannot provide both `body` and `json`.");
|
|
58
|
-
init.body = JSON.stringify(json);
|
|
59
|
-
if (!init.headers) init.headers = new Headers({ "Content-Type": "application/json" });
|
|
60
|
-
else {
|
|
61
|
-
const headers = new Headers(init.headers);
|
|
62
|
-
if (!headers.has("Content-Type")) headers.set("Content-Type", "application/json");
|
|
63
|
-
init.headers = headers;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
return {
|
|
67
|
-
init,
|
|
68
|
-
searchParams,
|
|
69
|
-
throwOnFetchError,
|
|
70
|
-
throwOnValidationError
|
|
71
|
-
};
|
|
72
|
-
}
|
|
69
|
+
if (throwOnValidationError) return await standardValidate(schema, raw, { throwOnError: true });
|
|
70
|
+
return await standardValidate(schema, raw, { throwOnError: false });
|
|
71
|
+
};
|
|
73
72
|
//#endregion
|
|
74
73
|
export { fetchInternal };
|
|
75
74
|
|
package/dist/internal.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.mjs","names":[],"sources":["../src/internal.ts"],"sourcesContent":["/**\n * Internal request execution and option preparation utilities.\n *\n * @module @zap-studio/fetch/internal\n */\n\nimport type { StandardSchemaV1 } from \"@zap-studio/validation\";\nimport { standardValidate } from \"@zap-studio/validation\";\n\nimport { FetchError } from \"./errors.js\";\nimport { mergeHeaders } from \"./headers.js\";\nimport { normalizeRequest } from \"./request.js\";\nimport type {
|
|
1
|
+
{"version":3,"file":"internal.mjs","names":[],"sources":["../src/internal.ts"],"sourcesContent":["/**\n * Internal request execution and option preparation utilities.\n *\n * @module @zap-studio/fetch/internal\n */\n\nimport type { StandardSchemaV1 } from \"@zap-studio/validation\";\nimport { standardValidate } from \"@zap-studio/validation\";\n\nimport { FetchError } from \"./errors.js\";\nimport { mergeHeaders } from \"./headers.js\";\nimport { normalizeRequest } from \"./request.js\";\nimport type {\n ExtendedRequestInit,\n FetchDefaults,\n FetchInput,\n} from \"./types.js\";\nimport { resolveRequestUrl } from \"./url.js\";\n\n/**\n * Normalizes request-level options into a final RequestInit payload and runtime flags.\n *\n * @param options - Request-level options.\n * @param defaults - Client-level defaults.\n * @returns Fully merged request init payload and effective runtime flags.\n */\nconst prepareRequestInit = (\n options: ExtendedRequestInit,\n defaults: FetchDefaults\n): {\n init: RequestInit;\n searchParams: ExtendedRequestInit[\"searchParams\"] | undefined;\n throwOnFetchError: boolean;\n throwOnValidationError: boolean;\n} => {\n const {\n headers,\n json,\n searchParams,\n throwOnFetchError = defaults.throwOnFetchError,\n throwOnValidationError = defaults.throwOnValidationError,\n ...rest\n } = options;\n\n const init: RequestInit = { ...rest };\n const mergedHeaders = mergeHeaders(defaults.headers, headers);\n if (mergedHeaders !== undefined) {\n init.headers = mergedHeaders;\n }\n\n if (json !== undefined) {\n if (init.body !== undefined && init.body !== null) {\n throw new TypeError(\"Cannot provide both `body` and `json`.\");\n }\n\n init.body = JSON.stringify(json);\n if (init.headers === undefined) {\n init.headers = new Headers({ \"Content-Type\": \"application/json\" });\n } else {\n const requestHeaders = new Headers(init.headers);\n if (!requestHeaders.has(\"Content-Type\")) {\n requestHeaders.set(\"Content-Type\", \"application/json\");\n }\n init.headers = requestHeaders;\n }\n }\n\n return {\n init,\n searchParams,\n throwOnFetchError,\n throwOnValidationError,\n };\n};\n\n/**\n * Internal fetch implementation used by both $fetch and createFetch.\n *\n * This function normalizes request input, resolves final URL + query params,\n * executes `fetch`, optionally throws `FetchError`, and optionally validates\n * JSON response payloads using Standard Schema.\n *\n * @param input - Request URL, path, or Request object.\n * @param schema - Optional Standard Schema for response validation.\n * @param options - Optional request options and package-specific flags.\n * @param defaults - Effective client defaults.\n * @returns Raw `Response` when no schema is provided; otherwise validated output.\n * @throws {FetchError} When `throwOnFetchError` is `true` and the response is not ok.\n * @throws {ValidationError} When a schema is provided, validation returns issues, and\n * `throwOnValidationError` is `true`.\n * @throws {TypeError} When both `body` and `json` are provided, when JSON request\n * serialization fails, when request construction fails, when headers/search params are\n * invalid, when `response.json()` cannot read the body, or when the runtime `fetch`\n * implementation rejects network-level failures as `TypeError`.\n * @throws {DOMException} When the runtime rejects an aborted request or response body read\n * as an `AbortError` DOMException.\n * @throws {SyntaxError} When a schema is provided and `response.json()` cannot parse the\n * response body.\n * @throws {unknown} Any error thrown or rejected by the provided Standard Schema validator.\n */\nexport const fetchInternal = async (\n input: FetchInput,\n schema: StandardSchemaV1 | undefined,\n options: ExtendedRequestInit | undefined,\n defaults: FetchDefaults\n): Promise<unknown> => {\n const request = normalizeRequest(input, options);\n const { init, searchParams, throwOnFetchError, throwOnValidationError } =\n prepareRequestInit(request.options, defaults);\n const url = resolveRequestUrl(request.url, defaults, searchParams);\n const response = request.request\n ? await fetch(new Request(url, request.request), init)\n : await fetch(url, init);\n\n if (throwOnFetchError && !response.ok) {\n throw new FetchError(\n `HTTP ${response.status}: ${response.statusText}`,\n response\n );\n }\n\n if (schema === undefined) {\n return response;\n }\n\n const raw: unknown = await response.json();\n if (throwOnValidationError) {\n return await standardValidate(schema, raw, { throwOnError: true });\n }\n return await standardValidate(schema, raw, { throwOnError: false });\n};\n"],"mappings":";;;;;;;;;;;;;AA0BA,MAAM,sBACJ,SACA,aAMG;CACH,MAAM,EACJ,SACA,MACA,cACA,oBAAoB,SAAS,mBAC7B,yBAAyB,SAAS,wBAClC,GAAG,SACD;CAEJ,MAAM,OAAoB,EAAE,GAAG,KAAK;CACpC,MAAM,gBAAgB,aAAa,SAAS,SAAS,OAAO;CAC5D,IAAI,kBAAkB,KAAA,GACpB,KAAK,UAAU;CAGjB,IAAI,SAAS,KAAA,GAAW;EACtB,IAAI,KAAK,SAAS,KAAA,KAAa,KAAK,SAAS,MAC3C,MAAM,IAAI,UAAU,wCAAwC;EAG9D,KAAK,OAAO,KAAK,UAAU,IAAI;EAC/B,IAAI,KAAK,YAAY,KAAA,GACnB,KAAK,UAAU,IAAI,QAAQ,EAAE,gBAAgB,mBAAmB,CAAC;OAC5D;GACL,MAAM,iBAAiB,IAAI,QAAQ,KAAK,OAAO;GAC/C,IAAI,CAAC,eAAe,IAAI,cAAc,GACpC,eAAe,IAAI,gBAAgB,kBAAkB;GAEvD,KAAK,UAAU;EACjB;CACF;CAEA,OAAO;EACL;EACA;EACA;EACA;CACF;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,MAAa,gBAAgB,OAC3B,OACA,QACA,SACA,aACqB;CACrB,MAAM,UAAU,iBAAiB,OAAO,OAAO;CAC/C,MAAM,EAAE,MAAM,cAAc,mBAAmB,2BAC7C,mBAAmB,QAAQ,SAAS,QAAQ;CAC9C,MAAM,MAAM,kBAAkB,QAAQ,KAAK,UAAU,YAAY;CACjE,MAAM,WAAW,QAAQ,UACrB,MAAM,MAAM,IAAI,QAAQ,KAAK,QAAQ,OAAO,GAAG,IAAI,IACnD,MAAM,MAAM,KAAK,IAAI;CAEzB,IAAI,qBAAqB,CAAC,SAAS,IACjC,MAAM,IAAI,WACR,QAAQ,SAAS,OAAO,IAAI,SAAS,cACrC,QACF;CAGF,IAAI,WAAW,KAAA,GACb,OAAO;CAGT,MAAM,MAAe,MAAM,SAAS,KAAK;CACzC,IAAI,wBACF,OAAO,MAAM,iBAAiB,QAAQ,KAAK,EAAE,cAAc,KAAK,CAAC;CAEnE,OAAO,MAAM,iBAAiB,QAAQ,KAAK,EAAE,cAAc,MAAM,CAAC;AACpE"}
|
package/dist/methods.d.mts
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import { $Fetch } from "./types.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/methods.d.ts
|
|
4
3
|
/**
|
|
5
|
-
* Creates an HTTP method helper bound to a fetch function.
|
|
6
|
-
*
|
|
7
|
-
* The returned function mirrors `$Fetch` overloads but forces the provided
|
|
8
|
-
* HTTP method (`GET`, `POST`, etc.) into request options.
|
|
9
|
-
*
|
|
10
|
-
* @param fetchFn - Fetch function to wrap.
|
|
11
|
-
* @param method - HTTP method to enforce.
|
|
12
|
-
* @returns Method-bound fetch function.
|
|
13
|
-
* @throws Any error thrown or rejected by `fetchFn` when the returned method-bound
|
|
14
|
-
* fetch function is called.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* const get = createMethod($fetch, "GET");
|
|
18
|
-
* const user = await get("/users/1", UserSchema);
|
|
19
|
-
*/
|
|
20
|
-
declare
|
|
4
|
+
* Creates an HTTP method helper bound to a fetch function.
|
|
5
|
+
*
|
|
6
|
+
* The returned function mirrors `$Fetch` overloads but forces the provided
|
|
7
|
+
* HTTP method (`GET`, `POST`, etc.) into request options.
|
|
8
|
+
*
|
|
9
|
+
* @param fetchFn - Fetch function to wrap.
|
|
10
|
+
* @param method - HTTP method to enforce.
|
|
11
|
+
* @returns Method-bound fetch function.
|
|
12
|
+
* @throws {unknown} Any error thrown or rejected by `fetchFn` when the returned method-bound
|
|
13
|
+
* fetch function is called.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const get = createMethod($fetch, "GET");
|
|
17
|
+
* const user = await get("/users/1", UserSchema);
|
|
18
|
+
*/
|
|
19
|
+
declare const createMethod: (fetchFn: $Fetch, method: string) => $Fetch;
|
|
21
20
|
//#endregion
|
|
22
21
|
export { createMethod };
|
|
23
22
|
//# sourceMappingURL=methods.d.mts.map
|
package/dist/methods.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"methods.d.mts","names":[],"sources":["../src/methods.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"methods.d.mts","names":[],"sources":["../src/methods.ts"],"mappings":";;;;;;;;;;;;;;;;;;cA2Ba,eAAgB,SAAS,QAAQ,mBAAiB"}
|
package/dist/methods.mjs
CHANGED
|
@@ -14,44 +14,44 @@ import { isStandardSchema } from "@zap-studio/validation";
|
|
|
14
14
|
* @param fetchFn - Fetch function to wrap.
|
|
15
15
|
* @param method - HTTP method to enforce.
|
|
16
16
|
* @returns Method-bound fetch function.
|
|
17
|
-
* @throws Any error thrown or rejected by `fetchFn` when the returned method-bound
|
|
17
|
+
* @throws {unknown} Any error thrown or rejected by `fetchFn` when the returned method-bound
|
|
18
18
|
* fetch function is called.
|
|
19
19
|
*
|
|
20
20
|
* @example
|
|
21
21
|
* const get = createMethod($fetch, "GET");
|
|
22
22
|
* const user = await get("/users/1", UserSchema);
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
const createMethod = (fetchFn, method) => {
|
|
25
25
|
/**
|
|
26
26
|
* Method-bound `$Fetch` implementation.
|
|
27
27
|
*
|
|
28
28
|
* Resolves schema/option overloads and injects the configured HTTP method.
|
|
29
29
|
*/
|
|
30
|
-
function methodFetch(input, schemaOrOptions, optionsOrUndefined) {
|
|
30
|
+
async function methodFetch(input, schemaOrOptions, optionsOrUndefined) {
|
|
31
31
|
if (isStandardSchema(schemaOrOptions)) {
|
|
32
|
-
if (optionsOrUndefined?.throwOnValidationError === false) return fetchFn(input, schemaOrOptions, {
|
|
32
|
+
if (optionsOrUndefined?.throwOnValidationError === false) return await fetchFn(input, schemaOrOptions, {
|
|
33
33
|
...optionsOrUndefined,
|
|
34
34
|
method,
|
|
35
35
|
throwOnValidationError: false
|
|
36
36
|
});
|
|
37
37
|
const { throwOnValidationError, ...restOptions } = optionsOrUndefined ?? {};
|
|
38
|
-
if (throwOnValidationError === true) return fetchFn(input, schemaOrOptions, {
|
|
38
|
+
if (throwOnValidationError === true) return await fetchFn(input, schemaOrOptions, {
|
|
39
39
|
...restOptions,
|
|
40
40
|
method,
|
|
41
41
|
throwOnValidationError: true
|
|
42
42
|
});
|
|
43
|
-
return fetchFn(input, schemaOrOptions, {
|
|
43
|
+
return await fetchFn(input, schemaOrOptions, {
|
|
44
44
|
...restOptions,
|
|
45
45
|
method
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
return fetchFn(input, {
|
|
48
|
+
return await fetchFn(input, {
|
|
49
49
|
...schemaOrOptions,
|
|
50
50
|
method
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
return methodFetch;
|
|
54
|
-
}
|
|
54
|
+
};
|
|
55
55
|
//#endregion
|
|
56
56
|
export { createMethod };
|
|
57
57
|
|
package/dist/methods.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"methods.mjs","names":[],"sources":["../src/methods.ts"],"sourcesContent":["/**\n * Method helper factories used to build verb-specific fetch functions.\n *\n * @module @zap-studio/fetch/methods\n */\n\nimport { isStandardSchema
|
|
1
|
+
{"version":3,"file":"methods.mjs","names":[],"sources":["../src/methods.ts"],"sourcesContent":["/**\n * Method helper factories used to build verb-specific fetch functions.\n *\n * @module @zap-studio/fetch/methods\n */\n\nimport { isStandardSchema } from \"@zap-studio/validation\";\nimport type { StandardSchemaV1 } from \"@zap-studio/validation\";\n\nimport type { $Fetch, ExtendedRequestInit, FetchInput } from \"./types.js\";\n\n/**\n * Creates an HTTP method helper bound to a fetch function.\n *\n * The returned function mirrors `$Fetch` overloads but forces the provided\n * HTTP method (`GET`, `POST`, etc.) into request options.\n *\n * @param fetchFn - Fetch function to wrap.\n * @param method - HTTP method to enforce.\n * @returns Method-bound fetch function.\n * @throws {unknown} Any error thrown or rejected by `fetchFn` when the returned method-bound\n * fetch function is called.\n *\n * @example\n * const get = createMethod($fetch, \"GET\");\n * const user = await get(\"/users/1\", UserSchema);\n */\nexport const createMethod = (fetchFn: $Fetch, method: string): $Fetch => {\n function methodFetch<TSchema extends StandardSchemaV1>(\n input: FetchInput,\n schema: TSchema,\n options: ExtendedRequestInit & {\n throwOnValidationError: false;\n }\n ): Promise<StandardSchemaV1.Result<StandardSchemaV1.InferOutput<TSchema>>>;\n\n function methodFetch<TSchema extends StandardSchemaV1>(\n input: FetchInput,\n schema: TSchema,\n options?: ExtendedRequestInit & {\n throwOnValidationError?: true;\n }\n ): Promise<StandardSchemaV1.InferOutput<TSchema>>;\n\n function methodFetch(\n input: FetchInput,\n options?: ExtendedRequestInit\n ): Promise<Response>;\n\n /**\n * Method-bound `$Fetch` implementation.\n *\n * Resolves schema/option overloads and injects the configured HTTP method.\n */\n async function methodFetch(\n input: FetchInput,\n schemaOrOptions?: StandardSchemaV1 | ExtendedRequestInit,\n optionsOrUndefined?: ExtendedRequestInit\n ): Promise<unknown> {\n if (isStandardSchema(schemaOrOptions)) {\n if (optionsOrUndefined?.throwOnValidationError === false) {\n return await fetchFn(input, schemaOrOptions, {\n ...optionsOrUndefined,\n method,\n throwOnValidationError: false,\n });\n }\n\n const { throwOnValidationError, ...restOptions } =\n optionsOrUndefined ?? {};\n\n if (throwOnValidationError === true) {\n return await fetchFn(input, schemaOrOptions, {\n ...restOptions,\n method,\n throwOnValidationError: true,\n });\n }\n\n return await fetchFn(input, schemaOrOptions, {\n ...restOptions,\n method,\n });\n }\n\n return await fetchFn(input, {\n ...schemaOrOptions,\n method,\n });\n }\n\n return methodFetch;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA2BA,MAAa,gBAAgB,SAAiB,WAA2B;;;;;;CA2BvE,eAAe,YACb,OACA,iBACA,oBACkB;EAClB,IAAI,iBAAiB,eAAe,GAAG;GACrC,IAAI,oBAAoB,2BAA2B,OACjD,OAAO,MAAM,QAAQ,OAAO,iBAAiB;IAC3C,GAAG;IACH;IACA,wBAAwB;GAC1B,CAAC;GAGH,MAAM,EAAE,wBAAwB,GAAG,gBACjC,sBAAsB,CAAC;GAEzB,IAAI,2BAA2B,MAC7B,OAAO,MAAM,QAAQ,OAAO,iBAAiB;IAC3C,GAAG;IACH;IACA,wBAAwB;GAC1B,CAAC;GAGH,OAAO,MAAM,QAAQ,OAAO,iBAAiB;IAC3C,GAAG;IACH;GACF,CAAC;EACH;EAEA,OAAO,MAAM,QAAQ,OAAO;GAC1B,GAAG;GACH;EACF,CAAC;CACH;CAEA,OAAO;AACT"}
|
package/dist/request.d.mts
CHANGED
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
import { ExtendedRequestInit, FetchInput } from "./types.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/request.d.ts
|
|
4
3
|
/**
|
|
5
|
-
* Normalized representation used by internal request execution.
|
|
6
|
-
*
|
|
7
|
-
* - `url`: resolved string URL from the input (string or `URL`; `Request` uses `request.url`)
|
|
8
|
-
* - `request`: original Request clone when input is a Request
|
|
9
|
-
* - `options`: normalized request options merged with Request headers
|
|
10
|
-
*/
|
|
4
|
+
* Normalized representation used by internal request execution.
|
|
5
|
+
*
|
|
6
|
+
* - `url`: resolved string URL from the input (string or `URL`; `Request` uses `request.url`)
|
|
7
|
+
* - `request`: original Request clone when input is a Request
|
|
8
|
+
* - `options`: normalized request options merged with Request headers
|
|
9
|
+
*/
|
|
11
10
|
interface NormalizedRequest {
|
|
12
11
|
url: string;
|
|
13
12
|
request?: Request;
|
|
14
13
|
options: ExtendedRequestInit;
|
|
15
14
|
}
|
|
16
15
|
/**
|
|
17
|
-
* Normalizes fetch `input` and request-level options into a consistent internal shape.
|
|
18
|
-
*
|
|
19
|
-
* @param input - Request URL/path or Request instance.
|
|
20
|
-
* @param options - Optional request options.
|
|
21
|
-
* @returns A normalized request structure for internal processing.
|
|
22
|
-
* @throws {TypeError} When cloning a `Request` fails or the merged headers are invalid.
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* const normalized = normalizeRequest("/users", { method: "GET" });
|
|
26
|
-
* console.log(normalized.url); // "/users"
|
|
27
|
-
*/
|
|
28
|
-
declare
|
|
16
|
+
* Normalizes fetch `input` and request-level options into a consistent internal shape.
|
|
17
|
+
*
|
|
18
|
+
* @param input - Request URL/path or Request instance.
|
|
19
|
+
* @param options - Optional request options.
|
|
20
|
+
* @returns A normalized request structure for internal processing.
|
|
21
|
+
* @throws {TypeError} When cloning a `Request` fails or the merged headers are invalid.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* const normalized = normalizeRequest("/users", { method: "GET" });
|
|
25
|
+
* console.log(normalized.url); // "/users"
|
|
26
|
+
*/
|
|
27
|
+
declare const normalizeRequest: (input: FetchInput, options?: ExtendedRequestInit) => NormalizedRequest;
|
|
29
28
|
//#endregion
|
|
30
29
|
export { NormalizedRequest, normalizeRequest };
|
|
31
30
|
//# sourceMappingURL=request.d.mts.map
|
package/dist/request.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.mts","names":[],"sources":["../src/request.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"request.d.mts","names":[],"sources":["../src/request.ts"],"mappings":";;;;;;;;;UAkBiB;EACf;EACA,UAAU;EACV,SAAS;;;;;;;;;;;;;;cAeE,mBACX,OAAO,YACP,UAAU,wBACT"}
|
package/dist/request.mjs
CHANGED
|
@@ -18,22 +18,25 @@ const EMPTY_OPTIONS = {};
|
|
|
18
18
|
* const normalized = normalizeRequest("/users", { method: "GET" });
|
|
19
19
|
* console.log(normalized.url); // "/users"
|
|
20
20
|
*/
|
|
21
|
-
|
|
22
|
-
if (!(input instanceof Request))
|
|
23
|
-
url
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
const normalizeRequest = (input, options) => {
|
|
22
|
+
if (!(input instanceof Request)) {
|
|
23
|
+
const url = input instanceof URL ? input.href : input;
|
|
24
|
+
return {
|
|
25
|
+
options: options ?? EMPTY_OPTIONS,
|
|
26
|
+
url
|
|
27
|
+
};
|
|
28
|
+
}
|
|
26
29
|
const request = new Request(input);
|
|
27
|
-
const { headers, ...rest } = options
|
|
30
|
+
const { headers, ...rest } = options ?? {};
|
|
28
31
|
const mergedHeaders = mergeHeaders(request.headers, headers);
|
|
29
32
|
const normalizedOptions = { ...rest };
|
|
30
|
-
if (mergedHeaders) normalizedOptions.headers = mergedHeaders;
|
|
33
|
+
if (mergedHeaders !== void 0) normalizedOptions.headers = mergedHeaders;
|
|
31
34
|
return {
|
|
32
|
-
|
|
35
|
+
options: normalizedOptions,
|
|
33
36
|
request,
|
|
34
|
-
|
|
37
|
+
url: request.url
|
|
35
38
|
};
|
|
36
|
-
}
|
|
39
|
+
};
|
|
37
40
|
//#endregion
|
|
38
41
|
export { normalizeRequest };
|
|
39
42
|
|
package/dist/request.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.mjs","names":[],"sources":["../src/request.ts"],"sourcesContent":["/**\n * Request normalization helpers for fetch `input` values.\n *\n * @module @zap-studio/fetch/request\n */\n\nimport { mergeHeaders } from \"./headers.js\";\nimport type { ExtendedRequestInit, FetchInput } from \"./types.js\";\n\nconst EMPTY_OPTIONS = {} as ExtendedRequestInit;\n\n/**\n * Normalized representation used by internal request execution.\n *\n * - `url`: resolved string URL from the input (string or `URL`; `Request` uses `request.url`)\n * - `request`: original Request clone when input is a Request\n * - `options`: normalized request options merged with Request headers\n */\nexport interface NormalizedRequest {\n url: string;\n request?: Request;\n options: ExtendedRequestInit;\n}\n\n/**\n * Normalizes fetch `input` and request-level options into a consistent internal shape.\n *\n * @param input - Request URL/path or Request instance.\n * @param options - Optional request options.\n * @returns A normalized request structure for internal processing.\n * @throws {TypeError} When cloning a `Request` fails or the merged headers are invalid.\n *\n * @example\n * const normalized = normalizeRequest(\"/users\", { method: \"GET\" });\n * console.log(normalized.url); // \"/users\"\n */\nexport
|
|
1
|
+
{"version":3,"file":"request.mjs","names":[],"sources":["../src/request.ts"],"sourcesContent":["/**\n * Request normalization helpers for fetch `input` values.\n *\n * @module @zap-studio/fetch/request\n */\n\nimport { mergeHeaders } from \"./headers.js\";\nimport type { ExtendedRequestInit, FetchInput } from \"./types.js\";\n\nconst EMPTY_OPTIONS = {} as ExtendedRequestInit;\n\n/**\n * Normalized representation used by internal request execution.\n *\n * - `url`: resolved string URL from the input (string or `URL`; `Request` uses `request.url`)\n * - `request`: original Request clone when input is a Request\n * - `options`: normalized request options merged with Request headers\n */\nexport interface NormalizedRequest {\n url: string;\n request?: Request;\n options: ExtendedRequestInit;\n}\n\n/**\n * Normalizes fetch `input` and request-level options into a consistent internal shape.\n *\n * @param input - Request URL/path or Request instance.\n * @param options - Optional request options.\n * @returns A normalized request structure for internal processing.\n * @throws {TypeError} When cloning a `Request` fails or the merged headers are invalid.\n *\n * @example\n * const normalized = normalizeRequest(\"/users\", { method: \"GET\" });\n * console.log(normalized.url); // \"/users\"\n */\nexport const normalizeRequest = (\n input: FetchInput,\n options?: ExtendedRequestInit\n): NormalizedRequest => {\n if (!(input instanceof Request)) {\n const url = input instanceof URL ? input.href : input;\n return {\n options: options ?? EMPTY_OPTIONS,\n url,\n };\n }\n\n const request = new Request(input);\n const { headers, ...rest } = options ?? {};\n const mergedHeaders = mergeHeaders(request.headers, headers);\n const normalizedOptions = { ...rest } as ExtendedRequestInit;\n\n if (mergedHeaders !== undefined) {\n normalizedOptions.headers = mergedHeaders;\n }\n\n return {\n options: normalizedOptions,\n request,\n url: request.url,\n };\n};\n"],"mappings":";;;;;;;AASA,MAAM,gBAAgB,CAAC;;;;;;;;;;;;;AA2BvB,MAAa,oBACX,OACA,YACsB;CACtB,IAAI,EAAE,iBAAiB,UAAU;EAC/B,MAAM,MAAM,iBAAiB,MAAM,MAAM,OAAO;EAChD,OAAO;GACL,SAAS,WAAW;GACpB;EACF;CACF;CAEA,MAAM,UAAU,IAAI,QAAQ,KAAK;CACjC,MAAM,EAAE,SAAS,GAAG,SAAS,WAAW,CAAC;CACzC,MAAM,gBAAgB,aAAa,QAAQ,SAAS,OAAO;CAC3D,MAAM,oBAAoB,EAAE,GAAG,KAAK;CAEpC,IAAI,kBAAkB,KAAA,GACpB,kBAAkB,UAAU;CAG9B,OAAO;EACL,SAAS;EACT;EACA,KAAK,QAAQ;CACf;AACF"}
|
package/dist/types.d.mts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { StandardSchemaV1 } from "@zap-studio/validation";
|
|
2
|
-
|
|
3
2
|
//#region src/types.d.ts
|
|
4
3
|
/**
|
|
5
|
-
* Accepted `fetch` input type (`string`, `URL`, or `Request`).
|
|
6
|
-
*/
|
|
4
|
+
* Accepted `fetch` input type (`string`, `URL`, or `Request`).
|
|
5
|
+
*/
|
|
7
6
|
type FetchInput = Parameters<typeof fetch>[0];
|
|
8
7
|
type URLSearchParamsInput = ConstructorParameters<typeof URLSearchParams>[0];
|
|
9
8
|
type RequestBodyInit = RequestInit & {
|
|
@@ -11,157 +10,157 @@ type RequestBodyInit = RequestInit & {
|
|
|
11
10
|
};
|
|
12
11
|
type JsonBodyInit = Omit<RequestInit, "body"> & {
|
|
13
12
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
* JSON body convenience. When provided, this is JSON-stringified into `body`.
|
|
14
|
+
* @default undefined
|
|
15
|
+
*/
|
|
17
16
|
json: unknown;
|
|
18
17
|
body?: never;
|
|
19
18
|
};
|
|
20
|
-
|
|
19
|
+
interface CustomRequestInit {
|
|
21
20
|
/**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
* Per-request query/search params
|
|
22
|
+
* @default undefined
|
|
23
|
+
*/
|
|
25
24
|
searchParams?: URLSearchParamsInput;
|
|
26
25
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
* Whether to throw a FetchError on HTTP errors (non-2xx responses)
|
|
27
|
+
* @default true
|
|
28
|
+
*/
|
|
30
29
|
throwOnFetchError?: boolean;
|
|
31
30
|
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
* Whether to throw a ValidationError on validation errors
|
|
32
|
+
* @default true
|
|
33
|
+
*/
|
|
35
34
|
throwOnValidationError?: boolean;
|
|
36
|
-
}
|
|
35
|
+
}
|
|
37
36
|
/**
|
|
38
|
-
* Extended RequestInit type to include custom fetch options
|
|
39
|
-
*
|
|
40
|
-
* @example
|
|
41
|
-
* const options: ExtendedRequestInit = {
|
|
42
|
-
* method: "POST",
|
|
43
|
-
* json: { name: "Ada" },
|
|
44
|
-
* throwOnFetchError: true,
|
|
45
|
-
* };
|
|
46
|
-
*/
|
|
37
|
+
* Extended RequestInit type to include custom fetch options
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* const options: ExtendedRequestInit = {
|
|
41
|
+
* method: "POST",
|
|
42
|
+
* json: { name: "Ada" },
|
|
43
|
+
* throwOnFetchError: true,
|
|
44
|
+
* };
|
|
45
|
+
*/
|
|
47
46
|
type ExtendedRequestInit = (RequestBodyInit | JsonBodyInit) & CustomRequestInit;
|
|
48
47
|
/**
|
|
49
|
-
* Internal defaults used by fetchInternal
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* const defaults: FetchDefaults = {
|
|
53
|
-
* baseURL: "https://api.example.com",
|
|
54
|
-
* throwOnFetchError: true,
|
|
55
|
-
* throwOnValidationError: true,
|
|
56
|
-
* };
|
|
57
|
-
*/
|
|
48
|
+
* Internal defaults used by fetchInternal
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* const defaults: FetchDefaults = {
|
|
52
|
+
* baseURL: "https://api.example.com",
|
|
53
|
+
* throwOnFetchError: true,
|
|
54
|
+
* throwOnValidationError: true,
|
|
55
|
+
* };
|
|
56
|
+
*/
|
|
58
57
|
interface FetchDefaults {
|
|
59
58
|
/**
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
* Base URL to prepend to all requests
|
|
60
|
+
* @default ""
|
|
61
|
+
*/
|
|
63
62
|
baseURL: string;
|
|
64
63
|
/**
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
* Default headers to include in all requests (can be overridden per request)
|
|
65
|
+
* @default undefined
|
|
66
|
+
*/
|
|
68
67
|
headers?: HeadersInit;
|
|
69
68
|
/**
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
* Default query/search params applied to every request (can be overridden per request)
|
|
70
|
+
* @default undefined
|
|
71
|
+
*/
|
|
73
72
|
searchParams?: URLSearchParamsInput;
|
|
74
73
|
/**
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
* Whether to throw a `FetchError` on HTTP errors (non-2xx responses)
|
|
75
|
+
* @default true
|
|
76
|
+
*/
|
|
78
77
|
throwOnFetchError: boolean;
|
|
79
78
|
/**
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
* Whether to throw a `ValidationError` on validation errors
|
|
80
|
+
* @default true
|
|
81
|
+
*/
|
|
83
82
|
throwOnValidationError: boolean;
|
|
84
83
|
}
|
|
85
84
|
/**
|
|
86
|
-
* Type-safe fetch function with Standard Schema validation support
|
|
87
|
-
*/
|
|
85
|
+
* Type-safe fetch function with Standard Schema validation support
|
|
86
|
+
*/
|
|
88
87
|
interface $Fetch {
|
|
89
88
|
/**
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
89
|
+
* Fetch with schema validation and throwOnValidationError: false
|
|
90
|
+
* @param input - URL or path to fetch
|
|
91
|
+
* @param schema - Standard Schema for response validation
|
|
92
|
+
* @param options - Extended request options with throwOnValidationError: false
|
|
93
|
+
* @returns Standard Schema Result object with value or issues
|
|
94
|
+
* @throws {FetchError} When `throwOnFetchError` is `true` and the response is not ok.
|
|
95
|
+
* @throws {TypeError} When request construction, JSON request serialization, headers,
|
|
96
|
+
* search params, native `fetch`, or `response.json()` body reading fail with a
|
|
97
|
+
* `TypeError`.
|
|
98
|
+
* @throws {DOMException} When native `fetch` or `response.json()` rejects an aborted
|
|
99
|
+
* request/body read as an `AbortError` DOMException.
|
|
100
|
+
* @throws {SyntaxError} When `response.json()` cannot parse the response body.
|
|
101
|
+
* @throws {unknown} Any error thrown or rejected by the provided Standard Schema validator.
|
|
102
|
+
*/
|
|
104
103
|
<TSchema extends StandardSchemaV1>(input: FetchInput, schema: TSchema, options: ExtendedRequestInit & {
|
|
105
104
|
throwOnValidationError: false;
|
|
106
105
|
}): Promise<StandardSchemaV1.Result<StandardSchemaV1.InferOutput<TSchema>>>;
|
|
107
106
|
/**
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
107
|
+
* Fetch with schema validation and throwOnValidationError: true or undefined (default)
|
|
108
|
+
* @param input - URL or path to fetch
|
|
109
|
+
* @param schema - Standard Schema for response validation
|
|
110
|
+
* @param options - Extended request options
|
|
111
|
+
* @returns Validated data of type TSchema
|
|
112
|
+
* @throws {FetchError} When `throwOnFetchError` is `true` and the response is not ok.
|
|
113
|
+
* @throws {ValidationError} When validation returns issues.
|
|
114
|
+
* @throws {TypeError} When request construction, JSON request serialization, headers,
|
|
115
|
+
* search params, native `fetch`, or `response.json()` body reading fail with a
|
|
116
|
+
* `TypeError`.
|
|
117
|
+
* @throws {DOMException} When native `fetch` or `response.json()` rejects an aborted
|
|
118
|
+
* request/body read as an `AbortError` DOMException.
|
|
119
|
+
* @throws {SyntaxError} When `response.json()` cannot parse the response body.
|
|
120
|
+
* @throws {unknown} Any error thrown or rejected by the provided Standard Schema validator.
|
|
121
|
+
*/
|
|
123
122
|
<TSchema extends StandardSchemaV1>(input: FetchInput, schema: TSchema, options?: ExtendedRequestInit & {
|
|
124
123
|
throwOnValidationError?: true;
|
|
125
124
|
}): Promise<StandardSchemaV1.InferOutput<TSchema>>;
|
|
126
125
|
/**
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
126
|
+
* Fetch without schema validation
|
|
127
|
+
* @param input - URL or path to fetch
|
|
128
|
+
* @param options - Extended request options
|
|
129
|
+
* @returns Raw Response object
|
|
130
|
+
* @throws {FetchError} When `throwOnFetchError` is `true` and the response is not ok.
|
|
131
|
+
* @throws {TypeError} When request construction, JSON request serialization, headers,
|
|
132
|
+
* search params, or native `fetch` fail with a `TypeError`.
|
|
133
|
+
* @throws {DOMException} When native `fetch` rejects an aborted request as an
|
|
134
|
+
* `AbortError` DOMException.
|
|
135
|
+
*/
|
|
137
136
|
(input: FetchInput, options?: ExtendedRequestInit): Promise<Response>;
|
|
138
137
|
}
|
|
139
138
|
/**
|
|
140
|
-
* API HTTP method-specific fetch functions
|
|
141
|
-
*
|
|
142
|
-
* @example
|
|
143
|
-
* const user = await api.get("/users/1", UserSchema);
|
|
144
|
-
*/
|
|
139
|
+
* API HTTP method-specific fetch functions
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* const user = await api.get("/users/1", UserSchema);
|
|
143
|
+
*/
|
|
145
144
|
interface ApiMethods {
|
|
146
145
|
/**
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
* DELETE method fetch function
|
|
147
|
+
*/
|
|
149
148
|
delete: $Fetch;
|
|
150
149
|
/**
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
* GET method fetch function
|
|
151
|
+
*/
|
|
153
152
|
get: $Fetch;
|
|
154
153
|
/**
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
* PATCH method fetch function
|
|
155
|
+
*/
|
|
157
156
|
patch: $Fetch;
|
|
158
157
|
/**
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
* POST method fetch function
|
|
159
|
+
*/
|
|
161
160
|
post: $Fetch;
|
|
162
161
|
/**
|
|
163
|
-
|
|
164
|
-
|
|
162
|
+
* PUT method fetch function
|
|
163
|
+
*/
|
|
165
164
|
put: $Fetch;
|
|
166
165
|
}
|
|
167
166
|
//#endregion
|
package/dist/types.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","names":[],"sources":["../src/types.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"types.d.mts","names":[],"sources":["../src/types.ts"],"mappings":";;;;;KAWY,aAAa,kBAAkB;KAEtC,uBAAuB,6BAA6B;KAEpD,kBAAkB;EACrB;;KAGG,eAAe,KAAK;;;;;EAKvB;EACA;;UAGQ;;;;;EAKR,eAAe;;;;;EAKf;;;;;EAKA;;;;;;;;;;;;KAaU,uBAAuB,kBAAkB,gBACnD;;;;;;;;;;;UAYe;;;;;EAKf;;;;;EAKA,UAAU;;;;;EAKV,eAAe;;;;;EAKf;;;;;EAKA;;;;;UAMe;;;;;;;;;;;;;;;;GAgBd,gBAAgB,kBACf,OAAO,YACP,QAAQ,SACR,SAAS;IAAwB;MAChC,QAAQ,iBAAiB,OAAO,iBAAiB,YAAY;;;;;;;;;;;;;;;;;GAkB/D,gBAAgB,kBACf,OAAO,YACP,QAAQ,SACR,UAAU;IACR;MAED,QAAQ,iBAAiB,YAAY;;;;;;;;;;;;GAavC,OAAO,YAAY,UAAU,sBAAsB,QAAQ;;;;;;;;UAS7C;;;;EAIf,QAAQ;;;;EAIR,KAAK;;;;EAIL,OAAO;;;;EAIP,MAAM;;;;EAIN,KAAK"}
|