@imolko/ultra-v8n 1.0.16 → 1.0.17
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-browser/errors/builtin-codes.d.ts +68 -17
- package/dist-browser/errors/builtin-codes.d.ts.map +1 -1
- package/dist-browser/errors/builtin-codes.js +39 -36
- package/dist-browser/errors/builtin-codes.js.map +1 -1
- package/dist-browser/errors/builtin.errors.d.ts +25 -16
- package/dist-browser/errors/builtin.errors.d.ts.map +1 -1
- package/dist-browser/errors/builtin.errors.js.map +1 -1
- package/dist-browser/errors/v8n-parse-base-error.d.ts +0 -3
- package/dist-browser/errors/v8n-parse-base-error.d.ts.map +1 -1
- package/dist-browser/errors/v8n-parse-base-error.js +11 -11
- package/dist-browser/errors/v8n-parse-base-error.js.map +1 -1
- package/dist-browser/utils/convert-zod-issue-to-v8n-error.d.ts +3 -4
- package/dist-browser/utils/convert-zod-issue-to-v8n-error.d.ts.map +1 -1
- package/dist-browser/utils/convert-zod-issue-to-v8n-error.js +7 -6
- package/dist-browser/utils/convert-zod-issue-to-v8n-error.js.map +1 -1
- package/dist-browser/utils/message-template.d.ts.map +1 -1
- package/dist-browser/utils/message-template.js +1 -1
- package/dist-browser/utils/message-template.js.map +1 -1
- package/dist-browser/utils/zod-switch-example/conditions.d.ts +70 -0
- package/dist-browser/utils/zod-switch-example/conditions.d.ts.map +1 -0
- package/dist-browser/utils/zod-switch-example/conditions.js +52 -0
- package/dist-browser/utils/zod-switch-example/conditions.js.map +1 -0
- package/dist-browser/utils/zod-switch.d.ts +4 -10
- package/dist-browser/utils/zod-switch.d.ts.map +1 -1
- package/dist-browser/utils/zod-switch.js +22 -43
- package/dist-browser/utils/zod-switch.js.map +1 -1
- package/dist-browser/utils/zod-wrapper.js +1 -1
- package/dist-browser/utils/zod-wrapper.js.map +1 -1
- package/dist-browser/validate-zod-schema.d.ts +3 -3
- package/dist-browser/validate-zod-schema.d.ts.map +1 -1
- package/dist-browser/validate-zod-schema.js +1 -1
- package/dist-browser/validate-zod-schema.js.map +1 -1
- package/dist-node/errors/builtin-codes.d.ts +68 -17
- package/dist-node/errors/builtin-codes.d.ts.map +1 -1
- package/dist-node/errors/builtin-codes.js +39 -36
- package/dist-node/errors/builtin-codes.js.map +1 -1
- package/dist-node/errors/builtin.errors.d.ts +25 -16
- package/dist-node/errors/builtin.errors.d.ts.map +1 -1
- package/dist-node/errors/builtin.errors.js.map +1 -1
- package/dist-node/errors/v8n-parse-base-error.d.ts +0 -3
- package/dist-node/errors/v8n-parse-base-error.d.ts.map +1 -1
- package/dist-node/errors/v8n-parse-base-error.js +11 -11
- package/dist-node/errors/v8n-parse-base-error.js.map +1 -1
- package/dist-node/utils/convert-zod-issue-to-v8n-error.d.ts +3 -4
- package/dist-node/utils/convert-zod-issue-to-v8n-error.d.ts.map +1 -1
- package/dist-node/utils/convert-zod-issue-to-v8n-error.js +7 -6
- package/dist-node/utils/convert-zod-issue-to-v8n-error.js.map +1 -1
- package/dist-node/utils/message-template.d.ts.map +1 -1
- package/dist-node/utils/message-template.js +1 -1
- package/dist-node/utils/message-template.js.map +1 -1
- package/dist-node/utils/zod-switch-example/conditions.d.ts +70 -0
- package/dist-node/utils/zod-switch-example/conditions.d.ts.map +1 -0
- package/dist-node/utils/zod-switch-example/conditions.js +58 -0
- package/dist-node/utils/zod-switch-example/conditions.js.map +1 -0
- package/dist-node/utils/zod-switch.d.ts +4 -10
- package/dist-node/utils/zod-switch.d.ts.map +1 -1
- package/dist-node/utils/zod-switch.js +21 -43
- package/dist-node/utils/zod-switch.js.map +1 -1
- package/dist-node/utils/zod-wrapper.js +2 -2
- package/dist-node/utils/zod-wrapper.js.map +1 -1
- package/dist-node/validate-zod-schema.d.ts +3 -3
- package/dist-node/validate-zod-schema.d.ts.map +1 -1
- package/dist-node/validate-zod-schema.js +1 -1
- package/dist-node/validate-zod-schema.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
export declare enum StrategyEnum {
|
|
3
|
+
Ordered = "Ordered",
|
|
4
|
+
Unordered = "Unordered",
|
|
5
|
+
AtLeast = "AtLeast",
|
|
6
|
+
Timely = "Timely"
|
|
7
|
+
}
|
|
8
|
+
export declare const OrderedRules: z.ZodObject<{
|
|
9
|
+
type: z.ZodLiteral<StrategyEnum.Ordered>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const UnorderedRules: z.ZodObject<{
|
|
12
|
+
type: z.ZodLiteral<StrategyEnum.Unordered>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export declare const TimelyRules: z.ZodObject<{
|
|
15
|
+
type: z.ZodLiteral<StrategyEnum.Timely>;
|
|
16
|
+
maxDuration: z.ZodString;
|
|
17
|
+
min: z.ZodNumber;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export declare const SwitchConditions: z.ZodPipe<z.ZodType<{
|
|
20
|
+
type: StrategyEnum.AtLeast;
|
|
21
|
+
min: number;
|
|
22
|
+
} | {
|
|
23
|
+
type: StrategyEnum.Ordered;
|
|
24
|
+
} | {
|
|
25
|
+
type: StrategyEnum.Unordered;
|
|
26
|
+
} | {
|
|
27
|
+
type: StrategyEnum.Timely;
|
|
28
|
+
maxDuration: string;
|
|
29
|
+
min: number;
|
|
30
|
+
}, {
|
|
31
|
+
type: StrategyEnum;
|
|
32
|
+
}, z.core.$ZodTypeInternals<{
|
|
33
|
+
type: StrategyEnum.AtLeast;
|
|
34
|
+
min: number;
|
|
35
|
+
} | {
|
|
36
|
+
type: StrategyEnum.Ordered;
|
|
37
|
+
} | {
|
|
38
|
+
type: StrategyEnum.Unordered;
|
|
39
|
+
} | {
|
|
40
|
+
type: StrategyEnum.Timely;
|
|
41
|
+
maxDuration: string;
|
|
42
|
+
min: number;
|
|
43
|
+
}, {
|
|
44
|
+
type: StrategyEnum;
|
|
45
|
+
}>>, z.ZodTransform<{
|
|
46
|
+
strategy: {
|
|
47
|
+
type: StrategyEnum.AtLeast;
|
|
48
|
+
min: number;
|
|
49
|
+
} | {
|
|
50
|
+
type: StrategyEnum.Ordered;
|
|
51
|
+
} | {
|
|
52
|
+
type: StrategyEnum.Unordered;
|
|
53
|
+
} | {
|
|
54
|
+
type: StrategyEnum.Timely;
|
|
55
|
+
maxDuration: string;
|
|
56
|
+
min: number;
|
|
57
|
+
};
|
|
58
|
+
}, {
|
|
59
|
+
type: StrategyEnum.AtLeast;
|
|
60
|
+
min: number;
|
|
61
|
+
} | {
|
|
62
|
+
type: StrategyEnum.Ordered;
|
|
63
|
+
} | {
|
|
64
|
+
type: StrategyEnum.Unordered;
|
|
65
|
+
} | {
|
|
66
|
+
type: StrategyEnum.Timely;
|
|
67
|
+
maxDuration: string;
|
|
68
|
+
min: number;
|
|
69
|
+
}>>;
|
|
70
|
+
//# sourceMappingURL=conditions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conditions.d.ts","sourceRoot":"","sources":["../../../src/utils/zod-switch-example/conditions.ts"],"names":[],"mappings":"AAAA,OAAO,CAAgB,MAAM,KAAK,CAAC;AAInC,oBAAY,YAAY;IAEtB,OAAO,YAAY;IAEnB,SAAS,cAAc;IAEvB,OAAO,YAAY;IAEnB,MAAM,WAAW;CAClB;AAgBD,eAAO,MAAM,YAAY;;iBAEvB,CAAC;AAEH,eAAO,MAAM,cAAc;;iBAEzB,CAAC;AAEH,eAAO,MAAM,WAAW;;;;iBAItB,CAAC;AAiBH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAGY,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
import { ZodSwitch } from "../zod-switch";
|
|
3
|
+
export var StrategyEnum;
|
|
4
|
+
(function (StrategyEnum) {
|
|
5
|
+
// Todos los eventos se deben dar en el orden especificado
|
|
6
|
+
StrategyEnum["Ordered"] = "Ordered";
|
|
7
|
+
// Todos los eventos se deben dar en cualquier orden
|
|
8
|
+
StrategyEnum["Unordered"] = "Unordered";
|
|
9
|
+
// Al menos el numero de eventos especificados en la configuracion se deben dar
|
|
10
|
+
StrategyEnum["AtLeast"] = "AtLeast";
|
|
11
|
+
// Deben darse un numero minimo de eventos en un periodo de tiempo
|
|
12
|
+
StrategyEnum["Timely"] = "Timely";
|
|
13
|
+
})(StrategyEnum || (StrategyEnum = {}));
|
|
14
|
+
const DurationTimeRules = z
|
|
15
|
+
.string()
|
|
16
|
+
.trim()
|
|
17
|
+
.min(2)
|
|
18
|
+
.max(9);
|
|
19
|
+
const discriminatorRules = z.object({
|
|
20
|
+
type: z.enum(StrategyEnum),
|
|
21
|
+
});
|
|
22
|
+
const AtLeastRules = z.object({
|
|
23
|
+
type: z.literal(StrategyEnum.AtLeast),
|
|
24
|
+
min: z.number(),
|
|
25
|
+
});
|
|
26
|
+
export const OrderedRules = z.object({
|
|
27
|
+
type: z.literal(StrategyEnum.Ordered),
|
|
28
|
+
});
|
|
29
|
+
export const UnorderedRules = z.object({
|
|
30
|
+
type: z.literal(StrategyEnum.Unordered),
|
|
31
|
+
});
|
|
32
|
+
export const TimelyRules = z.object({
|
|
33
|
+
type: z.literal(StrategyEnum.Timely),
|
|
34
|
+
maxDuration: DurationTimeRules,
|
|
35
|
+
min: z.number(),
|
|
36
|
+
});
|
|
37
|
+
const discriminator = (payload) => {
|
|
38
|
+
switch (payload.type) {
|
|
39
|
+
case StrategyEnum.AtLeast:
|
|
40
|
+
return AtLeastRules;
|
|
41
|
+
case StrategyEnum.Ordered:
|
|
42
|
+
return OrderedRules;
|
|
43
|
+
case StrategyEnum.Unordered:
|
|
44
|
+
return UnorderedRules;
|
|
45
|
+
case StrategyEnum.Timely:
|
|
46
|
+
return TimelyRules;
|
|
47
|
+
default:
|
|
48
|
+
return z.never();
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
export const SwitchConditions = ZodSwitch.create(discriminatorRules, discriminator).transform((strategy) => ({ strategy }));
|
|
52
|
+
//# sourceMappingURL=conditions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conditions.js","sourceRoot":"","sources":["../../../src/utils/zod-switch-example/conditions.ts"],"names":[],"mappings":"AAAA,OAAO,CAAgB,MAAM,KAAK,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,MAAM,CAAN,IAAY,YASX;AATD,WAAY,YAAY;IACtB,0DAA0D;IAC1D,mCAAmB,CAAA;IACnB,oDAAoD;IACpD,uCAAuB,CAAA;IACvB,+EAA+E;IAC/E,mCAAmB,CAAA;IACnB,mEAAmE;IACnE,iCAAiB,CAAA;AACnB,CAAC,EATW,YAAY,KAAZ,YAAY,QASvB;AAED,MAAM,iBAAiB,GAAG,CAAC;KACxB,MAAM,EAAE;KACR,IAAI,EAAE;KACN,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,CAAC,CAAC,CAAC;AAEV,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC;CAC3B,CAAC,CAAC;AACH,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5B,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC;IACrC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC;CACtC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC;CACxC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC;IACpC,WAAW,EAAE,iBAAiB;IAC9B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,CAAC,OAA+B,EAAE,EAAE;IACxD,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;QACrB,KAAK,YAAY,CAAC,OAAO;YACvB,OAAO,YAAY,CAAC;QACtB,KAAK,YAAY,CAAC,OAAO;YACvB,OAAO,YAAY,CAAC;QACtB,KAAK,YAAY,CAAC,SAAS;YACzB,OAAO,cAAc,CAAC;QACxB,KAAK,YAAY,CAAC,MAAM;YACtB,OAAO,WAAW,CAAC;QACrB;YACE,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,SAAS,CAAC,MAAM,CAC9C,kBAAkB,EAClB,aAAa,CACd,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC"}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
getSchema: (value: B[
|
|
4
|
-
|
|
5
|
-
typeName: 'ZodSwitch';
|
|
6
|
-
}
|
|
7
|
-
export declare class ZodSwitch<T extends ZodTypeAny, B extends ZodTypeAny> extends ZodType<T['_output'], ZodSwitchDef<T, B>, T['_input']> {
|
|
8
|
-
_parse(input: z.ParseInput): z.ParseReturnType<any>;
|
|
9
|
-
static create<T extends ZodTypeAny, B extends ZodTypeAny>(base: B, getSchema: (value: B['_output']) => T): ZodSwitch<T, B>;
|
|
10
|
-
}
|
|
1
|
+
import { ZodType } from 'zod';
|
|
2
|
+
export declare const ZodSwitch: {
|
|
3
|
+
create: <B extends ZodType, T extends ZodType>(base: B, getSchema: (value: B["_output"]) => T) => ZodType<T["_output"], B["_input"]>;
|
|
4
|
+
};
|
|
11
5
|
//# sourceMappingURL=zod-switch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zod-switch.d.ts","sourceRoot":"","sources":["../../src/utils/zod-switch.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"zod-switch.d.ts","sourceRoot":"","sources":["../../src/utils/zod-switch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAK,OAAO,EAAE,MAAM,KAAK,CAAC;AAEjC,eAAO,MAAM,SAAS;aAElB,CAAC,SAAS,OAAO,EACjB,CAAC,SAAS,OAAO,QAEX,CAAC,aACI,CAAC,KAAK,EAAE,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,KACpC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC;CAwBtC,CAAC"}
|
|
@@ -1,45 +1,24 @@
|
|
|
1
|
-
import { z
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
return
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
const inResult = this._def.base._parseSync({
|
|
24
|
-
data: ctx.data,
|
|
25
|
-
path: ctx.path,
|
|
26
|
-
parent: ctx,
|
|
27
|
-
});
|
|
28
|
-
if (inResult.status !== 'valid')
|
|
29
|
-
return z.INVALID;
|
|
30
|
-
return this._def.getSchema(inResult.value)._parseSync({
|
|
31
|
-
data: inResult.value,
|
|
32
|
-
path: ctx.path,
|
|
33
|
-
parent: ctx,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
static create(base, getSchema) {
|
|
38
|
-
return new ZodSwitch({
|
|
39
|
-
base,
|
|
40
|
-
getSchema,
|
|
41
|
-
typeName: 'ZodSwitch',
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const ZodSwitch = {
|
|
3
|
+
create: (base, getSchema) => {
|
|
4
|
+
return z.unknown().transform((val, ctx) => {
|
|
5
|
+
const baseResult = base.safeParse(val);
|
|
6
|
+
if (!baseResult.success) {
|
|
7
|
+
for (const issue of baseResult.error.issues) {
|
|
8
|
+
ctx.addIssue(issue);
|
|
9
|
+
}
|
|
10
|
+
return z.NEVER;
|
|
11
|
+
}
|
|
12
|
+
const schema = getSchema(baseResult.data);
|
|
13
|
+
const result = schema.safeParse(val);
|
|
14
|
+
if (!result.success) {
|
|
15
|
+
for (const issue of result.error.issues) {
|
|
16
|
+
ctx.addIssue(issue);
|
|
17
|
+
}
|
|
18
|
+
return z.NEVER;
|
|
19
|
+
}
|
|
20
|
+
return result.data;
|
|
42
21
|
});
|
|
43
|
-
}
|
|
44
|
-
}
|
|
22
|
+
},
|
|
23
|
+
};
|
|
45
24
|
//# sourceMappingURL=zod-switch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zod-switch.js","sourceRoot":"","sources":["../../src/utils/zod-switch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"zod-switch.js","sourceRoot":"","sources":["../../src/utils/zod-switch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAW,MAAM,KAAK,CAAC;AAEjC,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,MAAM,EAAE,CAIN,IAAO,EACP,SAAqC,EACD,EAAE;QACtC,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;YACxC,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YAEvC,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;gBACxB,KAAK,MAAM,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;oBAC5C,GAAG,CAAC,QAAQ,CAAC,KAAoC,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,CAAC,CAAC,KAAK,CAAC;YACjB,CAAC;YAED,MAAM,MAAM,GAAG,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YAC1C,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YAErC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBACpB,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;oBACxC,GAAG,CAAC,QAAQ,CAAC,KAAoC,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,CAAC,CAAC,KAAK,CAAC;YACjB,CAAC;YAED,OAAO,MAAM,CAAC,IAAI,CAAC;QACrB,CAAC,CAAuC,CAAC;IAC3C,CAAC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zod-wrapper.js","sourceRoot":"","sources":["../../src/utils/zod-wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"zod-wrapper.js","sourceRoot":"","sources":["../../src/utils/zod-wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,eAAe,GAAG,CAAC,IAAY,EAAU,EAAE;IAC/C,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,C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K,CAAC,CAAC;QACzC,GAAG,CAAC,QAAQ,CAAC,KAAoC,CAAC,CAAC;QACpD,OAAO,CAAC,CAAC,KAAK,CAAC;IAChB,CAAC;AACH,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ZodType } from 'zod';
|
|
2
2
|
import { Validation } from '@imolko/ultra-result';
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
4
|
* Dado un zodSchema y un contenido, se encarga
|
|
5
5
|
* de parsear el contenido con el zodSchema
|
|
6
6
|
* y devuelve un Validation.
|
|
@@ -21,5 +21,5 @@ import { Validation } from '@imolko/ultra-result';
|
|
|
21
21
|
* @param content: contenido que se quiere parsear
|
|
22
22
|
* @returns Validation<ErrorType, ReturnType>
|
|
23
23
|
*/
|
|
24
|
-
export declare const validateZodSchema: <ErrorType, ReturnType, ContentPayload = unknown>(zSchema:
|
|
24
|
+
export declare const validateZodSchema: <ErrorType, ReturnType, ContentPayload = unknown>(zSchema: ZodType<ReturnType, ContentPayload>, content: ContentPayload) => Validation<ErrorType, ReturnType>;
|
|
25
25
|
//# sourceMappingURL=validate-zod-schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-zod-schema.d.ts","sourceRoot":"","sources":["../src/validate-zod-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,
|
|
1
|
+
{"version":3,"file":"validate-zod-schema.d.ts","sourceRoot":"","sources":["../src/validate-zod-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,OAAO,EAAE,MAAM,KAAK,CAAC;AACxC,OAAO,EAAa,UAAU,EAAkB,MAAM,sBAAsB,CAAC;AAI7E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,iBAAiB,GAC5B,SAAS,EACT,UAAU,EACV,cAAc,GAAG,OAAO,EAExB,SAAS,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC,EAC5C,SAAS,cAAc,KACtB,UAAU,CAAC,SAAS,EAAE,UAAU,CAYlC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ZodError } from 'zod';
|
|
2
2
|
import { invalid, valid } from '@imolko/ultra-result';
|
|
3
3
|
import { convertZodIssueToV8nError } from './utils/convert-zod-issue-to-v8n-error';
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
5
|
* Dado un zodSchema y un contenido, se encarga
|
|
6
6
|
* de parsear el contenido con el zodSchema
|
|
7
7
|
* y devuelve un Validation.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-zod-schema.js","sourceRoot":"","sources":["../src/validate-zod-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"validate-zod-schema.js","sourceRoot":"","sources":["../src/validate-zod-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAW,MAAM,KAAK,CAAC;AACxC,OAAO,EAAyB,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAEnF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAK/B,OAA4C,EAC5C,OAAuB,EACY,EAAE;IACrC,IAAI,CAAC;QACF,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACvC,OAAO,KAAK,CAAa,MAAoB,CAAC,CAAC;IACjD,CAAC;IAAC,OAAO,QAAQ,EAAE,CAAC;QAClB,+DAA+D;QAC/D,IAAI,CAAC,CAAC,QAAQ,YAAY,QAAQ,CAAC,EAAE,CAAC;YACpC,MAAM,QAAQ,CAAC;QACjB,CAAC;QACD,MAAM,MAAM,GAAmC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAA;QAC7F,OAAO,OAAO,CAAY,MAAgC,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
/**
|
|
2
3
|
* Constante que contiene los codigos de error de v8n built-in.
|
|
3
4
|
*/
|
|
4
5
|
export declare const V8nBuiltInErrorCode: {
|
|
5
|
-
invalid_type: "invalid_type";
|
|
6
|
-
invalid_literal: "invalid_literal";
|
|
7
|
-
custom: "custom";
|
|
8
|
-
invalid_union: "invalid_union";
|
|
9
|
-
invalid_union_discriminator: "invalid_union_discriminator";
|
|
10
|
-
invalid_enum_value: "invalid_enum_value";
|
|
11
|
-
unrecognized_keys: "unrecognized_keys";
|
|
12
|
-
invalid_arguments: "invalid_arguments";
|
|
13
|
-
invalid_return_type: "invalid_return_type";
|
|
14
|
-
invalid_date: "invalid_date";
|
|
15
|
-
invalid_string: "invalid_string";
|
|
16
|
-
too_small: "too_small";
|
|
17
|
-
too_big: "too_big";
|
|
18
|
-
invalid_intersection_types: "invalid_intersection_types";
|
|
19
|
-
not_multiple_of: "not_multiple_of";
|
|
20
|
-
not_finite: "not_finite";
|
|
6
|
+
readonly invalid_type: "invalid_type";
|
|
7
|
+
readonly invalid_literal: "invalid_literal";
|
|
8
|
+
readonly custom: "custom";
|
|
9
|
+
readonly invalid_union: "invalid_union";
|
|
10
|
+
readonly invalid_union_discriminator: "invalid_union_discriminator";
|
|
11
|
+
readonly invalid_enum_value: "invalid_enum_value";
|
|
12
|
+
readonly unrecognized_keys: "unrecognized_keys";
|
|
13
|
+
readonly invalid_arguments: "invalid_arguments";
|
|
14
|
+
readonly invalid_return_type: "invalid_return_type";
|
|
15
|
+
readonly invalid_date: "invalid_date";
|
|
16
|
+
readonly invalid_string: "invalid_string";
|
|
17
|
+
readonly too_small: "too_small";
|
|
18
|
+
readonly too_big: "too_big";
|
|
19
|
+
readonly invalid_intersection_types: "invalid_intersection_types";
|
|
20
|
+
readonly not_multiple_of: "not_multiple_of";
|
|
21
|
+
readonly not_finite: "not_finite";
|
|
21
22
|
};
|
|
22
23
|
/**
|
|
23
24
|
* Los BuiltInErrors son errores que se generan y del cual se provees un tratamiento ya predefino por parte de zod.
|
|
@@ -47,5 +48,55 @@ export type V8nErrorCode = V8nBuiltInErrorCode | V8nCustomErrorCode;
|
|
|
47
48
|
/**
|
|
48
49
|
* Relacion entre los codigos de error de zod y los codigos de error de v8n.
|
|
49
50
|
*/
|
|
50
|
-
export declare const ZodIssueToV8nError: Map<"invalid_type" | "
|
|
51
|
+
export declare const ZodIssueToV8nError: Map<"invalid_type" | "custom" | "invalid_union" | "unrecognized_keys" | "too_small" | "too_big" | "not_multiple_of" | "invalid_format" | "invalid_key" | "invalid_element" | "invalid_value", "invalid_type" | "invalid_literal" | "custom" | "invalid_union" | "invalid_union_discriminator" | "invalid_enum_value" | "unrecognized_keys" | "invalid_arguments" | "invalid_return_type" | "invalid_date" | "invalid_string" | "too_small" | "too_big" | "invalid_intersection_types" | "not_multiple_of" | "not_finite">;
|
|
52
|
+
declare module 'zod' {
|
|
53
|
+
type ZodInvalidTypeIssue = Extract<z.core.$ZodIssue, {
|
|
54
|
+
code: "invalid_type";
|
|
55
|
+
}>;
|
|
56
|
+
type ZodInvalidArgumentsIssue = Extract<z.core.$ZodIssue, {
|
|
57
|
+
code: "invalid_arguments";
|
|
58
|
+
}>;
|
|
59
|
+
type ZodInvalidEnumValueIssue = Extract<z.core.$ZodIssue, {
|
|
60
|
+
code: "invalid_enum_value";
|
|
61
|
+
}>;
|
|
62
|
+
type ZodUnrecognizedKeysIssue = Extract<z.core.$ZodIssue, {
|
|
63
|
+
code: "unrecognized_keys";
|
|
64
|
+
}>;
|
|
65
|
+
type ZodInvalidUnionIssue = Extract<z.core.$ZodIssue, {
|
|
66
|
+
code: "invalid_union";
|
|
67
|
+
}>;
|
|
68
|
+
type ZodInvalidUnionDiscriminatorIssue = Extract<z.core.$ZodIssue, {
|
|
69
|
+
code: "invalid_union_discriminator";
|
|
70
|
+
}>;
|
|
71
|
+
type ZodInvalidLiteralIssue = Extract<z.core.$ZodIssue, {
|
|
72
|
+
code: "invalid_literal";
|
|
73
|
+
}>;
|
|
74
|
+
type ZodInvalidReturnTypeIssue = Extract<z.core.$ZodIssue, {
|
|
75
|
+
code: "invalid_return_type";
|
|
76
|
+
}>;
|
|
77
|
+
type ZodInvalidDateIssue = Extract<z.core.$ZodIssue, {
|
|
78
|
+
code: "invalid_date";
|
|
79
|
+
}>;
|
|
80
|
+
type ZodInvalidStringIssue = Extract<z.core.$ZodIssue, {
|
|
81
|
+
code: "invalid_string";
|
|
82
|
+
}>;
|
|
83
|
+
type ZodTooSmallIssue = Extract<z.core.$ZodIssue, {
|
|
84
|
+
code: "too_small";
|
|
85
|
+
}>;
|
|
86
|
+
type ZodTooBigIssue = Extract<z.core.$ZodIssue, {
|
|
87
|
+
code: "too_big";
|
|
88
|
+
}>;
|
|
89
|
+
type ZodInvalidIntersectionTypesIssue = Extract<z.core.$ZodIssue, {
|
|
90
|
+
code: "invalid_intersection_types";
|
|
91
|
+
}>;
|
|
92
|
+
type ZodNotMultipleOfIssue = Extract<z.core.$ZodIssue, {
|
|
93
|
+
code: "not_multiple_of";
|
|
94
|
+
}>;
|
|
95
|
+
type ZodNotFiniteIssue = Extract<z.core.$ZodIssue, {
|
|
96
|
+
code: "not_finite";
|
|
97
|
+
}>;
|
|
98
|
+
type ZodCustomIssue = Extract<z.core.$ZodIssue, {
|
|
99
|
+
code: "custom";
|
|
100
|
+
}>;
|
|
101
|
+
}
|
|
51
102
|
//# sourceMappingURL=builtin-codes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtin-codes.d.ts","sourceRoot":"","sources":["../../src/errors/builtin-codes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"builtin-codes.d.ts","sourceRoot":"","sources":["../../src/errors/builtin-codes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB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AC,IAAI,CAAC,SAAS,EAAE;QAAE,IAAI,EAAE,QAAQ,CAAA;KAAE,CAAC,CAAC;CAC5E"}
|
|
@@ -3,35 +3,34 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ZodIssueToV8nError = exports.V8nBuiltInErrorCode = void 0;
|
|
4
4
|
exports.isOfTypeV8nBuiltInErrorCode = isOfTypeV8nBuiltInErrorCode;
|
|
5
5
|
exports.isOfTypeV8nCustomErrorCode = isOfTypeV8nCustomErrorCode;
|
|
6
|
-
const zod_1 = require("zod");
|
|
7
6
|
/**
|
|
8
7
|
* Constante que contiene los codigos de error de v8n built-in.
|
|
9
8
|
*/
|
|
10
|
-
exports.V8nBuiltInErrorCode =
|
|
11
|
-
"invalid_type",
|
|
12
|
-
"invalid_literal",
|
|
13
|
-
"custom",
|
|
14
|
-
"invalid_union",
|
|
15
|
-
"invalid_union_discriminator",
|
|
16
|
-
"invalid_enum_value",
|
|
17
|
-
"unrecognized_keys",
|
|
18
|
-
"invalid_arguments",
|
|
19
|
-
"invalid_return_type",
|
|
20
|
-
"invalid_date",
|
|
21
|
-
"invalid_string",
|
|
22
|
-
"too_small",
|
|
23
|
-
"too_big",
|
|
24
|
-
"invalid_intersection_types",
|
|
25
|
-
"not_multiple_of",
|
|
26
|
-
"not_finite"
|
|
27
|
-
|
|
9
|
+
exports.V8nBuiltInErrorCode = {
|
|
10
|
+
invalid_type: "invalid_type",
|
|
11
|
+
invalid_literal: "invalid_literal",
|
|
12
|
+
custom: "custom",
|
|
13
|
+
invalid_union: "invalid_union",
|
|
14
|
+
invalid_union_discriminator: "invalid_union_discriminator",
|
|
15
|
+
invalid_enum_value: "invalid_enum_value",
|
|
16
|
+
unrecognized_keys: "unrecognized_keys",
|
|
17
|
+
invalid_arguments: "invalid_arguments",
|
|
18
|
+
invalid_return_type: "invalid_return_type",
|
|
19
|
+
invalid_date: "invalid_date",
|
|
20
|
+
invalid_string: "invalid_string",
|
|
21
|
+
too_small: "too_small",
|
|
22
|
+
too_big: "too_big",
|
|
23
|
+
invalid_intersection_types: "invalid_intersection_types",
|
|
24
|
+
not_multiple_of: "not_multiple_of",
|
|
25
|
+
not_finite: "not_finite"
|
|
26
|
+
};
|
|
28
27
|
/**
|
|
29
28
|
* Evalua si el codigo de error es un codigo de error built-in.
|
|
30
29
|
* @param code El codigo de error a evaluar.
|
|
31
30
|
* @returns Si el codigo de error es un codigo de error built-in.
|
|
32
31
|
*/
|
|
33
32
|
function isOfTypeV8nBuiltInErrorCode(code) {
|
|
34
|
-
return exports.V8nBuiltInErrorCode
|
|
33
|
+
return code in exports.V8nBuiltInErrorCode;
|
|
35
34
|
}
|
|
36
35
|
/**
|
|
37
36
|
* Evalua si el codigo de error es un codigo de error custom.
|
|
@@ -45,21 +44,25 @@ function isOfTypeV8nCustomErrorCode(code) {
|
|
|
45
44
|
* Relacion entre los codigos de error de zod y los codigos de error de v8n.
|
|
46
45
|
*/
|
|
47
46
|
exports.ZodIssueToV8nError = new Map([
|
|
48
|
-
[
|
|
49
|
-
[
|
|
50
|
-
[
|
|
51
|
-
[
|
|
52
|
-
[
|
|
53
|
-
[
|
|
54
|
-
[
|
|
55
|
-
[
|
|
56
|
-
[
|
|
57
|
-
[
|
|
58
|
-
[
|
|
59
|
-
[
|
|
60
|
-
[
|
|
61
|
-
[
|
|
62
|
-
[
|
|
63
|
-
[
|
|
47
|
+
["invalid_type", exports.V8nBuiltInErrorCode.invalid_type],
|
|
48
|
+
["invalid_literal", exports.V8nBuiltInErrorCode.invalid_literal],
|
|
49
|
+
["custom", exports.V8nBuiltInErrorCode.custom],
|
|
50
|
+
["invalid_union", exports.V8nBuiltInErrorCode.invalid_union],
|
|
51
|
+
["invalid_union_discriminator", exports.V8nBuiltInErrorCode.invalid_union_discriminator],
|
|
52
|
+
["invalid_enum_value", exports.V8nBuiltInErrorCode.invalid_enum_value],
|
|
53
|
+
["unrecognized_keys", exports.V8nBuiltInErrorCode.unrecognized_keys],
|
|
54
|
+
["invalid_arguments", exports.V8nBuiltInErrorCode.invalid_arguments],
|
|
55
|
+
["invalid_return_type", exports.V8nBuiltInErrorCode.invalid_return_type],
|
|
56
|
+
["invalid_date", exports.V8nBuiltInErrorCode.invalid_date],
|
|
57
|
+
["invalid_string", exports.V8nBuiltInErrorCode.invalid_string],
|
|
58
|
+
["too_small", exports.V8nBuiltInErrorCode.too_small],
|
|
59
|
+
["too_big", exports.V8nBuiltInErrorCode.too_big],
|
|
60
|
+
["invalid_intersection_types", exports.V8nBuiltInErrorCode.invalid_intersection_types],
|
|
61
|
+
["not_multiple_of", exports.V8nBuiltInErrorCode.not_multiple_of],
|
|
62
|
+
["not_finite", exports.V8nBuiltInErrorCode.not_finite],
|
|
63
|
+
["invalid_format", exports.V8nBuiltInErrorCode.invalid_string],
|
|
64
|
+
["invalid_key", exports.V8nBuiltInErrorCode.invalid_type],
|
|
65
|
+
["invalid_element", exports.V8nBuiltInErrorCode.invalid_type],
|
|
66
|
+
["invalid_value", exports.V8nBuiltInErrorCode.invalid_type]
|
|
64
67
|
]);
|
|
65
68
|
//# sourceMappingURL=builtin-codes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtin-codes.js","sourceRoot":"","sources":["../../src/errors/builtin-codes.ts"],"names":[],"mappings":";;;AAmCA,kEAEC;AAYD,gEAEC;
|
|
1
|
+
{"version":3,"file":"builtin-codes.js","sourceRoot":"","sources":["../../src/errors/builtin-codes.ts"],"names":[],"mappings":";;;AAmCA,kEAEC;AAYD,gEAEC;AAjDD;;GAEG;AACU,QAAA,mBAAmB,GAAG;IACjC,YAAY,EAAE,cAAc;IAC5B,eAAe,EAAE,iBAAiB;IAClC,MAAM,EAAE,QAAQ;IAChB,aAAa,EAAE,eAAe;IAC9B,2BAA2B,EAAE,6BAA6B;IAC1D,kBAAkB,EAAE,oBAAoB;IACxC,iBAAiB,EAAE,mBAAmB;IACtC,iBAAiB,EAAE,mBAAmB;IACtC,mBAAmB,EAAE,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