@arkyn/server 3.0.1-beta.142 → 3.0.1-beta.144
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/dist/bundle.js +90 -323
- package/dist/http/badResponses/badGateway.d.ts +12 -19
- package/dist/http/badResponses/badGateway.d.ts.map +1 -1
- package/dist/http/badResponses/badGateway.js +12 -19
- package/dist/http/badResponses/badRequest.d.ts +10 -19
- package/dist/http/badResponses/badRequest.d.ts.map +1 -1
- package/dist/http/badResponses/badRequest.js +10 -19
- package/dist/http/badResponses/conflict.d.ts +10 -19
- package/dist/http/badResponses/conflict.d.ts.map +1 -1
- package/dist/http/badResponses/conflict.js +10 -19
- package/dist/http/badResponses/forbidden.d.ts +10 -19
- package/dist/http/badResponses/forbidden.d.ts.map +1 -1
- package/dist/http/badResponses/forbidden.js +10 -19
- package/dist/http/badResponses/notFound.d.ts +10 -19
- package/dist/http/badResponses/notFound.d.ts.map +1 -1
- package/dist/http/badResponses/notFound.js +10 -19
- package/dist/http/badResponses/notImplemented.d.ts +10 -19
- package/dist/http/badResponses/notImplemented.d.ts.map +1 -1
- package/dist/http/badResponses/notImplemented.js +10 -19
- package/dist/http/badResponses/serverError.d.ts +10 -19
- package/dist/http/badResponses/serverError.d.ts.map +1 -1
- package/dist/http/badResponses/serverError.js +10 -19
- package/dist/http/badResponses/unauthorized.d.ts +10 -19
- package/dist/http/badResponses/unauthorized.d.ts.map +1 -1
- package/dist/http/badResponses/unauthorized.js +10 -19
- package/dist/http/badResponses/unprocessableEntity.d.ts +17 -22
- package/dist/http/badResponses/unprocessableEntity.d.ts.map +1 -1
- package/dist/http/badResponses/unprocessableEntity.js +17 -22
- package/dist/http/successResponses/created.d.ts +10 -14
- package/dist/http/successResponses/created.d.ts.map +1 -1
- package/dist/http/successResponses/created.js +10 -14
- package/dist/http/successResponses/found.d.ts +10 -14
- package/dist/http/successResponses/found.d.ts.map +1 -1
- package/dist/http/successResponses/found.js +10 -14
- package/dist/http/successResponses/noContent.d.ts +9 -7
- package/dist/http/successResponses/noContent.d.ts.map +1 -1
- package/dist/http/successResponses/noContent.js +9 -7
- package/dist/http/successResponses/success.d.ts +10 -14
- package/dist/http/successResponses/success.d.ts.map +1 -1
- package/dist/http/successResponses/success.js +10 -14
- package/dist/http/successResponses/updated.d.ts +11 -14
- package/dist/http/successResponses/updated.d.ts.map +1 -1
- package/dist/http/successResponses/updated.js +11 -14
- package/dist/services/apiService.d.ts +20 -0
- package/dist/services/apiService.d.ts.map +1 -1
- package/dist/services/apiService.js +16 -0
- package/dist/services/debugService.d.ts +10 -42
- package/dist/services/debugService.d.ts.map +1 -1
- package/dist/services/debugService.js +10 -42
- package/dist/services/logService.d.ts +5 -10
- package/dist/services/logService.d.ts.map +1 -1
- package/dist/services/logService.js +5 -10
- package/dist/utilities/decodeRequestBody.d.ts +11 -9
- package/dist/utilities/decodeRequestBody.d.ts.map +1 -1
- package/dist/utilities/decodeRequestBody.js +11 -9
- package/dist/utilities/decodeRequestErrorMessage.d.ts +12 -10
- package/dist/utilities/decodeRequestErrorMessage.d.ts.map +1 -1
- package/dist/utilities/decodeRequestErrorMessage.js +12 -10
- package/dist/utilities/errorHandler.d.ts +13 -38
- package/dist/utilities/errorHandler.d.ts.map +1 -1
- package/dist/utilities/errorHandler.js +13 -38
- package/dist/utilities/flushDebugLogs.d.ts +6 -28
- package/dist/utilities/flushDebugLogs.d.ts.map +1 -1
- package/dist/utilities/flushDebugLogs.js +6 -28
- package/dist/utilities/formAsyncParse.d.ts +7 -28
- package/dist/utilities/formAsyncParse.d.ts.map +1 -1
- package/dist/utilities/formAsyncParse.js +7 -28
- package/dist/utilities/formParse.d.ts +7 -28
- package/dist/utilities/formParse.d.ts.map +1 -1
- package/dist/utilities/formParse.js +7 -28
- package/dist/utilities/getScopedParams.d.ts +11 -19
- package/dist/utilities/getScopedParams.d.ts.map +1 -1
- package/dist/utilities/getScopedParams.js +11 -19
- package/dist/utilities/schemaValidator.d.ts +31 -102
- package/dist/utilities/schemaValidator.d.ts.map +1 -1
- package/dist/utilities/schemaValidator.js +31 -102
- package/dist/validations/validateCep.d.ts +2 -2
- package/dist/validations/validateCep.js +2 -2
- package/dist/validations/validateCnpj.d.ts +2 -2
- package/dist/validations/validateCnpj.js +2 -2
- package/dist/validations/validateCpf.d.ts +4 -11
- package/dist/validations/validateCpf.d.ts.map +1 -1
- package/dist/validations/validateCpf.js +4 -11
- package/dist/validations/validateDate.d.ts +7 -11
- package/dist/validations/validateDate.d.ts.map +1 -1
- package/dist/validations/validateDate.js +7 -11
- package/dist/validations/validateEmail.d.ts +2 -2
- package/dist/validations/validateEmail.js +2 -2
- package/dist/validations/validatePassword.d.ts +2 -2
- package/dist/validations/validatePassword.js +2 -2
- package/dist/validations/validatePhone.d.ts +6 -18
- package/dist/validations/validatePhone.d.ts.map +1 -1
- package/dist/validations/validatePhone.js +6 -18
- package/dist/validations/validateRg.d.ts +2 -2
- package/dist/validations/validateRg.js +2 -2
- package/package.json +1 -1
|
@@ -13,49 +13,24 @@ import { NoContent } from "../http/successResponses/noContent";
|
|
|
13
13
|
import { Success } from "../http/successResponses/success";
|
|
14
14
|
import { Updated } from "../http/successResponses/updated";
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Converts any thrown value into a `Response`. Recognizes all `@arkyn/server` success and error
|
|
17
|
+
* response classes, native `Response` objects, and falls back to a 500 `ServerError` for anything else.
|
|
17
18
|
*
|
|
18
|
-
*
|
|
19
|
-
* response types (both success and error responses) and converts them into HTTP Response
|
|
20
|
-
* objects. If the error is not recognized, it defaults to returning a ServerError response.
|
|
19
|
+
* Intended to be used as the catch handler of a route action or loader:
|
|
21
20
|
*
|
|
22
|
-
* @param
|
|
23
|
-
*
|
|
24
|
-
* - A success response instance (Found, Created, Updated, Success, NoContent)
|
|
25
|
-
* - An error response instance (BadGateway, BadRequest, Conflict, Forbidden, NotFound, NotImplemented, ServerError, Unauthorized, UnprocessableEntity)
|
|
26
|
-
* - Any other error object (will be wrapped in ServerError)
|
|
27
|
-
*
|
|
28
|
-
* @returns {Response} A standard HTTP Response object with appropriate status code, headers, and body
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```typescript
|
|
32
|
-
* // Handling a success response
|
|
33
|
-
* try {
|
|
34
|
-
* const result = await someOperation();
|
|
35
|
-
* throw new Success("Operation successful", result);
|
|
36
|
-
* } catch (error) {
|
|
37
|
-
* return errorHandler(error);
|
|
38
|
-
* }
|
|
39
|
-
* ```
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```typescript
|
|
43
|
-
* // Handling an error response
|
|
44
|
-
* try {
|
|
45
|
-
* const user = await findUser(id);
|
|
46
|
-
* if (!user) throw new NotFound("User not found");
|
|
47
|
-
* } catch (error) {
|
|
48
|
-
* return errorHandler(error);
|
|
49
|
-
* }
|
|
50
|
-
* ```
|
|
21
|
+
* @param error - The thrown value to convert.
|
|
22
|
+
* @returns A `Response` with the appropriate HTTP status, headers, and JSON body.
|
|
51
23
|
*
|
|
52
24
|
* @example
|
|
53
25
|
* ```typescript
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
26
|
+
* export async function action({ request }: ActionFunctionArgs) {
|
|
27
|
+
* try {
|
|
28
|
+
* const user = await findUser(id);
|
|
29
|
+
* if (!user) throw new NotFound("User not found");
|
|
30
|
+
* return new Success("User retrieved", { user }).toJson();
|
|
31
|
+
* } catch (error) {
|
|
32
|
+
* return errorHandler(error);
|
|
33
|
+
* }
|
|
59
34
|
* }
|
|
60
35
|
* ```
|
|
61
36
|
*/
|
|
@@ -1,39 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Writes colored `[name] message` lines to the console, but only when
|
|
3
|
+
* `NODE_ENV === "development"` or `DEBUG_MODE === "true"`. No-op in production.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
* the
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @param {object} props - Configuration object for debug logging.
|
|
9
|
-
* @param {string} props.name - The name/label to display before each log entry (e.g., "API", "Database").
|
|
10
|
-
* @param {"yellow" | "cyan" | "red" | "green"} props.scheme - The color scheme for the name tag:
|
|
11
|
-
* - "yellow": Warning-level logs
|
|
12
|
-
* - "cyan": Info-level logs
|
|
13
|
-
* - "red": Error-level logs
|
|
14
|
-
* - "green": Success-level logs
|
|
15
|
-
* @param {string[]} props.debugs - Array of debug messages to be logged.
|
|
16
|
-
*
|
|
17
|
-
* @returns {void}
|
|
5
|
+
* @param props.name - Label shown before each line (e.g. `"API"`, `"Auth"`).
|
|
6
|
+
* @param props.scheme - Color of the label tag: `"cyan"` info, `"green"` success, `"yellow"` warning, `"red"` error.
|
|
7
|
+
* @param props.debugs - Lines of text to print, one per console entry.
|
|
18
8
|
*
|
|
19
9
|
* @example
|
|
20
10
|
* ```typescript
|
|
21
|
-
* // Log API request information
|
|
22
11
|
* flushDebugLogs({
|
|
23
12
|
* name: "API",
|
|
24
13
|
* scheme: "cyan",
|
|
25
|
-
* debugs: ["POST /api/users", "Status: 201",
|
|
26
|
-
* });
|
|
27
|
-
* // Output:
|
|
28
|
-
* // [API] POST /api/users
|
|
29
|
-
* // [API] Status: 201
|
|
30
|
-
* // [API] Response time: 45ms
|
|
31
|
-
*
|
|
32
|
-
* // Log error messages
|
|
33
|
-
* flushDebugLogs({
|
|
34
|
-
* name: "ERROR",
|
|
35
|
-
* scheme: "red",
|
|
36
|
-
* debugs: ["Database connection failed", "Retrying in 5s..."]
|
|
14
|
+
* debugs: ["POST /api/users", "Status: 201"],
|
|
37
15
|
* });
|
|
38
16
|
* ```
|
|
39
17
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flushDebugLogs.d.ts","sourceRoot":"","sources":["../../src/utilities/flushDebugLogs.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"flushDebugLogs.d.ts","sourceRoot":"","sources":["../../src/utilities/flushDebugLogs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,iBAAS,cAAc,CAAC,KAAK,EAAE;IAC7B,MAAM,EAAE,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,GAAG,IAAI,CAyBP;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,39 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Writes colored `[name] message` lines to the console, but only when
|
|
3
|
+
* `NODE_ENV === "development"` or `DEBUG_MODE === "true"`. No-op in production.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
* the
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @param {object} props - Configuration object for debug logging.
|
|
9
|
-
* @param {string} props.name - The name/label to display before each log entry (e.g., "API", "Database").
|
|
10
|
-
* @param {"yellow" | "cyan" | "red" | "green"} props.scheme - The color scheme for the name tag:
|
|
11
|
-
* - "yellow": Warning-level logs
|
|
12
|
-
* - "cyan": Info-level logs
|
|
13
|
-
* - "red": Error-level logs
|
|
14
|
-
* - "green": Success-level logs
|
|
15
|
-
* @param {string[]} props.debugs - Array of debug messages to be logged.
|
|
16
|
-
*
|
|
17
|
-
* @returns {void}
|
|
5
|
+
* @param props.name - Label shown before each line (e.g. `"API"`, `"Auth"`).
|
|
6
|
+
* @param props.scheme - Color of the label tag: `"cyan"` info, `"green"` success, `"yellow"` warning, `"red"` error.
|
|
7
|
+
* @param props.debugs - Lines of text to print, one per console entry.
|
|
18
8
|
*
|
|
19
9
|
* @example
|
|
20
10
|
* ```typescript
|
|
21
|
-
* // Log API request information
|
|
22
11
|
* flushDebugLogs({
|
|
23
12
|
* name: "API",
|
|
24
13
|
* scheme: "cyan",
|
|
25
|
-
* debugs: ["POST /api/users", "Status: 201",
|
|
26
|
-
* });
|
|
27
|
-
* // Output:
|
|
28
|
-
* // [API] POST /api/users
|
|
29
|
-
* // [API] Status: 201
|
|
30
|
-
* // [API] Response time: 45ms
|
|
31
|
-
*
|
|
32
|
-
* // Log error messages
|
|
33
|
-
* flushDebugLogs({
|
|
34
|
-
* name: "ERROR",
|
|
35
|
-
* scheme: "red",
|
|
36
|
-
* debugs: ["Database connection failed", "Retrying in 5s..."]
|
|
14
|
+
* debugs: ["POST /api/users", "Status: 201"],
|
|
37
15
|
* });
|
|
38
16
|
* ```
|
|
39
17
|
*/
|
|
@@ -17,40 +17,19 @@ type FormParseProps = [formData: {
|
|
|
17
17
|
}, schema: ZodType];
|
|
18
18
|
type FormParseReturnType<T extends FormParseProps> = SuccessResponse<T> | ErrorResponse;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Async variant of `formParse` — uses `safeParseAsync` to support Zod schemas with async refinements.
|
|
21
|
+
* Returns `{ success: true, data }` on success or `{ success: false, fieldErrors, fields }` on failure.
|
|
21
22
|
*
|
|
22
|
-
* @
|
|
23
|
-
*
|
|
24
|
-
* @param {T} props - An array containing the form data and the Zod schema.
|
|
25
|
-
* @param {T[0]} formData[0] - The form data to be validated.
|
|
26
|
-
* @param {T[1]} schema[1] - The Zod schema used for validation.
|
|
27
|
-
*
|
|
28
|
-
* @returns {Promise<FormParseReturnType<T>>} A promise that resolves to an object containing the validation result.
|
|
29
|
-
* - If validation fails, it includes:
|
|
30
|
-
* - `success`: A boolean indicating the validation status (false).
|
|
31
|
-
* - `fieldErrors`: An object mapping field names to their respective error messages.
|
|
32
|
-
* - `fields`: The original form data.
|
|
33
|
-
* - If validation succeeds, it includes:
|
|
34
|
-
* - `success`: A boolean indicating the validation status (true).
|
|
35
|
-
* - `data`: The parsed and validated data.
|
|
23
|
+
* @param formData - The raw form data object to validate.
|
|
24
|
+
* @param schema - The Zod schema to validate against.
|
|
36
25
|
*
|
|
37
26
|
* @example
|
|
38
27
|
* ```typescript
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* const schema = z.object({
|
|
42
|
-
* name: z.string().min(1, "Name is required"),
|
|
43
|
-
* age: z.number().min(18, "Must be at least 18"),
|
|
44
|
-
* });
|
|
45
|
-
*
|
|
46
|
-
* const formData = { name: "", age: 17 };
|
|
47
|
-
*
|
|
48
|
-
* const result = await formAsyncParse([formData, schema]);
|
|
28
|
+
* const schema = z.object({ email: z.string().email() });
|
|
29
|
+
* const result = await formAsyncParse([{ email: "bad" }, schema]);
|
|
49
30
|
*
|
|
50
31
|
* if (!result.success) {
|
|
51
|
-
* console.log(result.fieldErrors); // {
|
|
52
|
-
* } else {
|
|
53
|
-
* console.log(result.data); // Parsed data
|
|
32
|
+
* console.log(result.fieldErrors); // { email: "Invalid email" }
|
|
54
33
|
* }
|
|
55
34
|
* ```
|
|
56
35
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formAsyncParse.d.ts","sourceRoot":"","sources":["../../src/utilities/formAsyncParse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAEnC,KAAK,eAAe,CAAC,CAAC,SAAS,cAAc,IAAI;IAC/C,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;CACjD,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,OAAO,EAAE,KAAK,CAAC;IACf,MAAM,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAChC,WAAW,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACtC,CAAC;AAEF,KAAK,cAAc,GAAG,CAAC,QAAQ,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAExE,KAAK,mBAAmB,CAAC,CAAC,SAAS,cAAc,IAC7C,eAAe,CAAC,CAAC,CAAC,GAClB,aAAa,CAAC;AAElB
|
|
1
|
+
{"version":3,"file":"formAsyncParse.d.ts","sourceRoot":"","sources":["../../src/utilities/formAsyncParse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAEnC,KAAK,eAAe,CAAC,CAAC,SAAS,cAAc,IAAI;IAC/C,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;CACjD,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,OAAO,EAAE,KAAK,CAAC;IACf,MAAM,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAChC,WAAW,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACtC,CAAC;AAEF,KAAK,cAAc,GAAG,CAAC,QAAQ,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAExE,KAAK,mBAAmB,CAAC,CAAC,SAAS,cAAc,IAC7C,eAAe,CAAC,CAAC,CAAC,GAClB,aAAa,CAAC;AAElB;;;;;;;;;;;;;;;;GAgBG;AAEH,iBAAe,cAAc,CAAC,CAAC,SAAS,cAAc,EAAE,CACtD,QAAQ,EACR,MAAM,EACP,EAAE,CAAC,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAqBrC;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,38 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Async variant of `formParse` — uses `safeParseAsync` to support Zod schemas with async refinements.
|
|
3
|
+
* Returns `{ success: true, data }` on success or `{ success: false, fieldErrors, fields }` on failure.
|
|
3
4
|
*
|
|
4
|
-
* @
|
|
5
|
-
*
|
|
6
|
-
* @param {T} props - An array containing the form data and the Zod schema.
|
|
7
|
-
* @param {T[0]} formData[0] - The form data to be validated.
|
|
8
|
-
* @param {T[1]} schema[1] - The Zod schema used for validation.
|
|
9
|
-
*
|
|
10
|
-
* @returns {Promise<FormParseReturnType<T>>} A promise that resolves to an object containing the validation result.
|
|
11
|
-
* - If validation fails, it includes:
|
|
12
|
-
* - `success`: A boolean indicating the validation status (false).
|
|
13
|
-
* - `fieldErrors`: An object mapping field names to their respective error messages.
|
|
14
|
-
* - `fields`: The original form data.
|
|
15
|
-
* - If validation succeeds, it includes:
|
|
16
|
-
* - `success`: A boolean indicating the validation status (true).
|
|
17
|
-
* - `data`: The parsed and validated data.
|
|
5
|
+
* @param formData - The raw form data object to validate.
|
|
6
|
+
* @param schema - The Zod schema to validate against.
|
|
18
7
|
*
|
|
19
8
|
* @example
|
|
20
9
|
* ```typescript
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* const schema = z.object({
|
|
24
|
-
* name: z.string().min(1, "Name is required"),
|
|
25
|
-
* age: z.number().min(18, "Must be at least 18"),
|
|
26
|
-
* });
|
|
27
|
-
*
|
|
28
|
-
* const formData = { name: "", age: 17 };
|
|
29
|
-
*
|
|
30
|
-
* const result = await formAsyncParse([formData, schema]);
|
|
10
|
+
* const schema = z.object({ email: z.string().email() });
|
|
11
|
+
* const result = await formAsyncParse([{ email: "bad" }, schema]);
|
|
31
12
|
*
|
|
32
13
|
* if (!result.success) {
|
|
33
|
-
* console.log(result.fieldErrors); // {
|
|
34
|
-
* } else {
|
|
35
|
-
* console.log(result.data); // Parsed data
|
|
14
|
+
* console.log(result.fieldErrors); // { email: "Invalid email" }
|
|
36
15
|
* }
|
|
37
16
|
* ```
|
|
38
17
|
*/
|
|
@@ -17,40 +17,19 @@ type FormParseProps = [formData: {
|
|
|
17
17
|
}, schema: ZodType];
|
|
18
18
|
type FormParseReturnType<T extends FormParseProps> = SuccessResponse<T> | ErrorResponse;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Validates form data against a Zod schema synchronously.
|
|
21
|
+
* Returns `{ success: true, data }` on success or `{ success: false, fieldErrors, fields }` on failure.
|
|
21
22
|
*
|
|
22
|
-
* @
|
|
23
|
-
*
|
|
24
|
-
* @param {T} props - An array containing the form data and the Zod schema.
|
|
25
|
-
* @param {T[0]} formData[0] - The form data to be validated.
|
|
26
|
-
* @param {T[1]} schema[1] - The Zod schema used for validation.
|
|
27
|
-
*
|
|
28
|
-
* @returns {FormParseReturnType<T>} An object containing the validation result.
|
|
29
|
-
* - If validation fails, it includes:
|
|
30
|
-
* - `success`: A boolean indicating the validation status (false).
|
|
31
|
-
* - `fieldErrors`: An object mapping field names to their respective error messages.
|
|
32
|
-
* - `fields`: The original form data.
|
|
33
|
-
* - If validation succeeds, it includes:
|
|
34
|
-
* - `success`: A boolean indicating the validation status (true).
|
|
35
|
-
* - `data`: The parsed and validated data.
|
|
23
|
+
* @param formData - The raw form data object to validate.
|
|
24
|
+
* @param schema - The Zod schema to validate against.
|
|
36
25
|
*
|
|
37
26
|
* @example
|
|
38
27
|
* ```typescript
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* const schema = z.object({
|
|
42
|
-
* name: z.string().min(1, "Name is required"),
|
|
43
|
-
* age: z.number().min(18, "Must be at least 18"),
|
|
44
|
-
* });
|
|
45
|
-
*
|
|
46
|
-
* const formData = { name: "", age: 17 };
|
|
47
|
-
*
|
|
48
|
-
* const result = formParse([formData, schema]);
|
|
28
|
+
* const schema = z.object({ name: z.string().min(1, "Required"), age: z.number().min(18) });
|
|
29
|
+
* const result = formParse([{ name: "", age: 15 }, schema]);
|
|
49
30
|
*
|
|
50
31
|
* if (!result.success) {
|
|
51
|
-
* console.log(result.fieldErrors); // { name: "
|
|
52
|
-
* } else {
|
|
53
|
-
* console.log(result.data); // Parsed data
|
|
32
|
+
* console.log(result.fieldErrors); // { name: "Required", age: "..." }
|
|
54
33
|
* }
|
|
55
34
|
* ```
|
|
56
35
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formParse.d.ts","sourceRoot":"","sources":["../../src/utilities/formParse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAEnC,KAAK,eAAe,CAAC,CAAC,SAAS,cAAc,IAAI;IAC/C,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;CACjD,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,OAAO,EAAE,KAAK,CAAC;IACf,MAAM,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAChC,WAAW,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACtC,CAAC;AAEF,KAAK,cAAc,GAAG,CAAC,QAAQ,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAExE,KAAK,mBAAmB,CAAC,CAAC,SAAS,cAAc,IAC7C,eAAe,CAAC,CAAC,CAAC,GAClB,aAAa,CAAC;AAElB
|
|
1
|
+
{"version":3,"file":"formParse.d.ts","sourceRoot":"","sources":["../../src/utilities/formParse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAEnC,KAAK,eAAe,CAAC,CAAC,SAAS,cAAc,IAAI;IAC/C,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;CACjD,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,OAAO,EAAE,KAAK,CAAC;IACf,MAAM,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAChC,WAAW,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACtC,CAAC;AAEF,KAAK,cAAc,GAAG,CAAC,QAAQ,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAExE,KAAK,mBAAmB,CAAC,CAAC,SAAS,cAAc,IAC7C,eAAe,CAAC,CAAC,CAAC,GAClB,aAAa,CAAC;AAElB;;;;;;;;;;;;;;;;GAgBG;AAEH,iBAAS,SAAS,CAAC,CAAC,SAAS,cAAc,EAAE,CAC3C,QAAQ,EACR,MAAM,EACP,EAAE,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAqB5B;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1,38 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Validates form data against a Zod schema synchronously.
|
|
3
|
+
* Returns `{ success: true, data }` on success or `{ success: false, fieldErrors, fields }` on failure.
|
|
3
4
|
*
|
|
4
|
-
* @
|
|
5
|
-
*
|
|
6
|
-
* @param {T} props - An array containing the form data and the Zod schema.
|
|
7
|
-
* @param {T[0]} formData[0] - The form data to be validated.
|
|
8
|
-
* @param {T[1]} schema[1] - The Zod schema used for validation.
|
|
9
|
-
*
|
|
10
|
-
* @returns {FormParseReturnType<T>} An object containing the validation result.
|
|
11
|
-
* - If validation fails, it includes:
|
|
12
|
-
* - `success`: A boolean indicating the validation status (false).
|
|
13
|
-
* - `fieldErrors`: An object mapping field names to their respective error messages.
|
|
14
|
-
* - `fields`: The original form data.
|
|
15
|
-
* - If validation succeeds, it includes:
|
|
16
|
-
* - `success`: A boolean indicating the validation status (true).
|
|
17
|
-
* - `data`: The parsed and validated data.
|
|
5
|
+
* @param formData - The raw form data object to validate.
|
|
6
|
+
* @param schema - The Zod schema to validate against.
|
|
18
7
|
*
|
|
19
8
|
* @example
|
|
20
9
|
* ```typescript
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* const schema = z.object({
|
|
24
|
-
* name: z.string().min(1, "Name is required"),
|
|
25
|
-
* age: z.number().min(18, "Must be at least 18"),
|
|
26
|
-
* });
|
|
27
|
-
*
|
|
28
|
-
* const formData = { name: "", age: 17 };
|
|
29
|
-
*
|
|
30
|
-
* const result = formParse([formData, schema]);
|
|
10
|
+
* const schema = z.object({ name: z.string().min(1, "Required"), age: z.number().min(18) });
|
|
11
|
+
* const result = formParse([{ name: "", age: 15 }, schema]);
|
|
31
12
|
*
|
|
32
13
|
* if (!result.success) {
|
|
33
|
-
* console.log(result.fieldErrors); // { name: "
|
|
34
|
-
* } else {
|
|
35
|
-
* console.log(result.data); // Parsed data
|
|
14
|
+
* console.log(result.fieldErrors); // { name: "Required", age: "..." }
|
|
36
15
|
* }
|
|
37
16
|
* ```
|
|
38
17
|
*/
|
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Extracts
|
|
2
|
+
* Extracts URL search parameters from a request, optionally filtered by a namespace prefix
|
|
3
|
+
* (e.g. `scope:key` → `key`). Without a scope, returns all search params as-is.
|
|
3
4
|
*
|
|
4
|
-
* @param
|
|
5
|
-
* @param
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @returns A `URLSearchParams` object containing the scoped query parameters.
|
|
9
|
-
* If a scope is provided, only parameters with keys starting with the scope
|
|
10
|
-
* (e.g., `scope:key`) are included, and the scope prefix is removed from the keys.
|
|
11
|
-
* If no scope is provided, all query parameters are returned as-is.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* // Example 1: No scope provided
|
|
15
|
-
* const request = { url: "https://example.com?key1=value1&key2=value2" };
|
|
16
|
-
* const params = getScopedParams(request);
|
|
17
|
-
* console.log(params.toString()); // Output: "key1=value1&key2=value2"
|
|
5
|
+
* @param request - The incoming request whose URL will be parsed.
|
|
6
|
+
* @param scope - Namespace prefix to filter by (e.g. `"table"` matches `table:page`, `table:sort`).
|
|
7
|
+
* @returns A `URLSearchParams` object with the matching params, stripped of the scope prefix.
|
|
18
8
|
*
|
|
19
9
|
* @example
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* const params = getScopedParams(request, "
|
|
23
|
-
*
|
|
10
|
+
* ```typescript
|
|
11
|
+
* // URL: /products?table:page=2&table:sort=asc&other=1
|
|
12
|
+
* const params = getScopedParams(request, "table");
|
|
13
|
+
* params.get("page"); // "2"
|
|
14
|
+
* params.get("sort"); // "asc"
|
|
15
|
+
* ```
|
|
24
16
|
*/
|
|
25
17
|
declare function getScopedParams(request: Request, scope?: string): URLSearchParams;
|
|
26
18
|
export { getScopedParams };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getScopedParams.d.ts","sourceRoot":"","sources":["../../src/utilities/getScopedParams.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"getScopedParams.d.ts","sourceRoot":"","sources":["../../src/utilities/getScopedParams.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,iBAAS,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,GAAE,MAAW,mBAW5D;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Extracts
|
|
2
|
+
* Extracts URL search parameters from a request, optionally filtered by a namespace prefix
|
|
3
|
+
* (e.g. `scope:key` → `key`). Without a scope, returns all search params as-is.
|
|
3
4
|
*
|
|
4
|
-
* @param
|
|
5
|
-
* @param
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @returns A `URLSearchParams` object containing the scoped query parameters.
|
|
9
|
-
* If a scope is provided, only parameters with keys starting with the scope
|
|
10
|
-
* (e.g., `scope:key`) are included, and the scope prefix is removed from the keys.
|
|
11
|
-
* If no scope is provided, all query parameters are returned as-is.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* // Example 1: No scope provided
|
|
15
|
-
* const request = { url: "https://example.com?key1=value1&key2=value2" };
|
|
16
|
-
* const params = getScopedParams(request);
|
|
17
|
-
* console.log(params.toString()); // Output: "key1=value1&key2=value2"
|
|
5
|
+
* @param request - The incoming request whose URL will be parsed.
|
|
6
|
+
* @param scope - Namespace prefix to filter by (e.g. `"table"` matches `table:page`, `table:sort`).
|
|
7
|
+
* @returns A `URLSearchParams` object with the matching params, stripped of the scope prefix.
|
|
18
8
|
*
|
|
19
9
|
* @example
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* const params = getScopedParams(request, "
|
|
23
|
-
*
|
|
10
|
+
* ```typescript
|
|
11
|
+
* // URL: /products?table:page=2&table:sort=asc&other=1
|
|
12
|
+
* const params = getScopedParams(request, "table");
|
|
13
|
+
* params.get("page"); // "2"
|
|
14
|
+
* params.get("sort"); // "asc"
|
|
15
|
+
* ```
|
|
24
16
|
*/
|
|
25
17
|
function getScopedParams(request, scope = "") {
|
|
26
18
|
const url = new URL(request.url);
|
|
@@ -1,143 +1,72 @@
|
|
|
1
1
|
import type { ZodType, z } from "zod";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Wraps a Zod schema with convenience validation methods suited for server-side use:
|
|
4
|
+
* - `isValid` — boolean check, no throws
|
|
5
|
+
* - `safeValidate` — raw Zod result, no throws
|
|
6
|
+
* - `validate` — throws `ServerError` on failure (for trusted/internal data)
|
|
7
|
+
* - `formValidate` / `formAsyncValidate` — throws `UnprocessableEntity` on failure (for user-submitted forms)
|
|
4
8
|
*
|
|
5
9
|
* @example
|
|
6
10
|
* ```typescript
|
|
7
|
-
*
|
|
11
|
+
* const validator = new SchemaValidator(z.object({ email: z.string().email() }));
|
|
8
12
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* email: z.string().email("Invalid email"),
|
|
12
|
-
* age: z.number().min(18, "Must be at least 18")
|
|
13
|
-
* });
|
|
14
|
-
*
|
|
15
|
-
* const validator = new SchemaValidator(userSchema);
|
|
16
|
-
*
|
|
17
|
-
* // Check if data is valid without throwing
|
|
18
|
-
* const isValid = validator.isValid({ name: "John", email: "john@example.com", age: 25 });
|
|
19
|
-
*
|
|
20
|
-
* // Validate and throw ServerError on failure
|
|
21
|
-
* try {
|
|
22
|
-
* const validData = validator.validate({ name: "John", email: "john@example.com", age: 25 });
|
|
23
|
-
* } catch (error) {
|
|
24
|
-
* console.error(error.message);
|
|
25
|
-
* }
|
|
26
|
-
*
|
|
27
|
-
* // Form validation with UnprocessableEntity error
|
|
28
|
-
* try {
|
|
29
|
-
* const formData = validator.formValidate(requestBody);
|
|
30
|
-
* } catch (error) {
|
|
31
|
-
* // Returns structured error with fieldErrors for forms
|
|
32
|
-
* }
|
|
13
|
+
* // Inside a Remix action:
|
|
14
|
+
* const body = validator.formValidate(await decodeRequestBody(request));
|
|
33
15
|
* ```
|
|
34
16
|
*/
|
|
35
17
|
declare class SchemaValidator<T extends ZodType> {
|
|
36
18
|
readonly schema: T;
|
|
37
19
|
/**
|
|
38
|
-
*
|
|
39
|
-
* @param {T} schema - The Zod schema to use for validation.
|
|
20
|
+
* @param schema - The Zod schema used for all validation methods on this instance.
|
|
40
21
|
*/
|
|
41
22
|
constructor(schema: T);
|
|
42
23
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* @param {any} data - The data to validate.
|
|
46
|
-
*
|
|
47
|
-
* @returns {boolean} True if the data is valid, false otherwise.
|
|
24
|
+
* Returns `true` if the data satisfies the schema, `false` otherwise. Never throws.
|
|
48
25
|
*
|
|
49
|
-
* @
|
|
50
|
-
* ```typescript
|
|
51
|
-
* const validator = new SchemaValidator(userSchema);
|
|
52
|
-
* const isValid = validator.isValid({ name: "John", email: "invalid-email" });
|
|
53
|
-
* console.log(isValid); // false
|
|
54
|
-
* ```
|
|
26
|
+
* @param data - The value to check.
|
|
55
27
|
*/
|
|
56
28
|
isValid(data: any): boolean;
|
|
57
29
|
/**
|
|
58
|
-
*
|
|
30
|
+
* Validates data and returns the raw Zod `safeParseResult` without throwing.
|
|
31
|
+
* Useful when you need access to the full error details.
|
|
59
32
|
*
|
|
60
|
-
* @param
|
|
61
|
-
* @returns {z.ZodSafeParseResult<z.infer<T>>} The Zod safe parse result containing success status and data or error.
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```typescript
|
|
65
|
-
* const validator = new SchemaValidator(userSchema);
|
|
66
|
-
* const result = validator.safeValidate({ name: "", email: "john@example.com" });
|
|
67
|
-
*
|
|
68
|
-
* if (result.success) {
|
|
69
|
-
* console.log(result.data); // Validated data
|
|
70
|
-
* } else {
|
|
71
|
-
* console.log(result.error.issues); // Validation errors
|
|
72
|
-
* }
|
|
73
|
-
* ```
|
|
33
|
+
* @param data - The value to validate.
|
|
74
34
|
*/
|
|
75
35
|
safeValidate(data: any): z.ZodSafeParseResult<z.infer<T>>;
|
|
76
36
|
/**
|
|
77
|
-
* Validates data and returns the
|
|
78
|
-
*
|
|
79
|
-
* @param {any} data - The data to validate.
|
|
80
|
-
* @throws {ServerError} When validation fails, with a formatted error message.
|
|
81
|
-
* @returns {z.infer<T>} The validated and parsed data.
|
|
82
|
-
*
|
|
83
|
-
* @example
|
|
84
|
-
* ```typescript
|
|
85
|
-
* const validator = new SchemaValidator(userSchema);
|
|
37
|
+
* Validates data and returns the typed result, throwing `ServerError` on failure.
|
|
38
|
+
* Use for validating internal/trusted data (e.g. env vars, config objects).
|
|
86
39
|
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
* console.log(validUser); // { name: "John", email: "john@example.com", age: 25 }
|
|
90
|
-
* } catch (error) {
|
|
91
|
-
* console.error(error.message); // "Error validating:\n-> name: String must contain at least 1 character(s)"
|
|
92
|
-
* }
|
|
93
|
-
* ```
|
|
40
|
+
* @param data - The value to validate.
|
|
41
|
+
* @throws `ServerError` with a formatted field-by-field error message.
|
|
94
42
|
*/
|
|
95
43
|
validate(data: any): z.infer<T>;
|
|
96
44
|
/**
|
|
97
|
-
* Validates form data and returns the
|
|
98
|
-
*
|
|
45
|
+
* Validates form data and returns the typed result, throwing `UnprocessableEntity` on failure.
|
|
46
|
+
* The error includes `fieldErrors`, `fields`, and `data.scrollTo` (first failing field name).
|
|
99
47
|
*
|
|
100
|
-
* @param
|
|
101
|
-
* @param
|
|
102
|
-
* @throws
|
|
103
|
-
* @returns {z.infer<T>} The validated and parsed form data.
|
|
48
|
+
* @param data - The raw form data to validate.
|
|
49
|
+
* @param message - Optional human-readable error message for the 422 response.
|
|
50
|
+
* @throws `UnprocessableEntity` with structured field errors for client-side form handling.
|
|
104
51
|
*
|
|
105
52
|
* @example
|
|
106
53
|
* ```typescript
|
|
107
|
-
* const validator = new SchemaValidator(
|
|
108
|
-
*
|
|
109
|
-
* try {
|
|
110
|
-
* const validFormData = validator.formValidate(requestBody, "User data is invalid");
|
|
111
|
-
* console.log(validFormData);
|
|
112
|
-
* } catch (error) {
|
|
113
|
-
* // UnprocessableEntity with fieldErrors, fields, and scrollTo data
|
|
114
|
-
* console.log(error.fieldErrors); // { name: "Name is required", email: "Invalid email" }
|
|
115
|
-
* console.log(error.data.scrollTo); // "name" (first error field)
|
|
116
|
-
* }
|
|
54
|
+
* const validator = new SchemaValidator(registerSchema);
|
|
55
|
+
* const body = validator.formValidate(await decodeRequestBody(request));
|
|
117
56
|
* ```
|
|
118
57
|
*/
|
|
119
58
|
formValidate(data: any, message?: string): z.infer<T>;
|
|
120
59
|
/**
|
|
121
|
-
*
|
|
122
|
-
* This method is the async version of formValidate, designed for form validation with async schemas.
|
|
60
|
+
* Async version of `formValidate` for schemas with async refinements (e.g. uniqueness checks).
|
|
123
61
|
*
|
|
124
|
-
* @param
|
|
125
|
-
* @param
|
|
126
|
-
* @throws
|
|
127
|
-
* @returns {Promise<z.infer<T>>} A promise that resolves to the validated and parsed form data.
|
|
62
|
+
* @param data - The raw form data to validate.
|
|
63
|
+
* @param message - Optional human-readable error message for the 422 response.
|
|
64
|
+
* @throws `UnprocessableEntity` with structured field errors for client-side form handling.
|
|
128
65
|
*
|
|
129
66
|
* @example
|
|
130
67
|
* ```typescript
|
|
131
|
-
* const validator = new SchemaValidator(
|
|
132
|
-
*
|
|
133
|
-
* try {
|
|
134
|
-
* const validFormData = await validator.formAsyncValidate(requestBody, "User data is invalid");
|
|
135
|
-
* console.log(validFormData);
|
|
136
|
-
* } catch (error) {
|
|
137
|
-
* // UnprocessableEntity with fieldErrors, fields, and scrollTo data
|
|
138
|
-
* console.log(error.fieldErrors); // { name: "Name is required", email: "Invalid email" }
|
|
139
|
-
* console.log(error.data.scrollTo); // "name" (first error field)
|
|
140
|
-
* }
|
|
68
|
+
* const validator = new SchemaValidator(registerSchema);
|
|
69
|
+
* const body = await validator.formAsyncValidate(await decodeRequestBody(request));
|
|
141
70
|
* ```
|
|
142
71
|
*/
|
|
143
72
|
formAsyncValidate(data: any, message?: string): Promise<z.infer<T>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemaValidator.d.ts","sourceRoot":"","sources":["../../src/utilities/schemaValidator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBtC
|
|
1
|
+
{"version":3,"file":"schemaValidator.d.ts","sourceRoot":"","sources":["../../src/utilities/schemaValidator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBtC;;;;;;;;;;;;;;GAcG;AACH,cAAM,eAAe,CAAC,CAAC,SAAS,OAAO;IAIzB,QAAQ,CAAC,MAAM,EAAE,CAAC;IAH9B;;OAEG;gBACkB,MAAM,EAAE,CAAC;IAE9B;;;;OAIG;IACH,OAAO,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO;IAI3B;;;;;OAKG;IACH,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAIzD;;;;;;OAMG;IACH,QAAQ,CAAC,IAAI,EAAE,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IAQ/B;;;;;;;;;;;;;OAaG;IACH,YAAY,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IAiBrD;;;;;;;;;;;;OAYG;IACG,iBAAiB,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;CAgB1E;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|