@nestia/core 3.15.0-dev.20240926 → 3.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/decorators/EncryptedRoute.d.ts +1 -1
- package/lib/decorators/EncryptedRoute.js +1 -1
- package/lib/decorators/EncryptedRoute.js.map +1 -1
- package/lib/decorators/TypedRoute.d.ts +3 -3
- package/lib/decorators/TypedRoute.js +1 -1
- package/lib/decorators/TypedRoute.js.map +1 -1
- package/lib/decorators/internal/get_path_and_stringify.js +4 -4
- package/lib/decorators/internal/get_path_and_stringify.js.map +1 -1
- package/lib/programmers/TypedRouteProgrammer.js +33 -9
- package/lib/programmers/TypedRouteProgrammer.js.map +1 -1
- package/package.json +6 -6
- package/src/decorators/EncryptedRoute.ts +4 -4
- package/src/decorators/TypedRoute.ts +4 -4
- package/src/decorators/internal/get_path_and_stringify.ts +6 -6
- package/src/programmers/TypedRouteProgrammer.ts +38 -19
|
@@ -92,6 +92,6 @@ export declare namespace EncryptedRoute {
|
|
|
92
92
|
* @param func Logger function
|
|
93
93
|
* @default console.log
|
|
94
94
|
*/
|
|
95
|
-
function setValidateErrorLogger(func: (
|
|
95
|
+
function setValidateErrorLogger(func: (log: IValidateErrorLog) => void): void;
|
|
96
96
|
export import IValidateErrorLog = TypedRoute.IValidateErrorLog;
|
|
97
97
|
}
|
|
@@ -96,7 +96,7 @@ var EncryptedRoute;
|
|
|
96
96
|
*/
|
|
97
97
|
function Generator(method) {
|
|
98
98
|
function route(...args) {
|
|
99
|
-
const [path, stringify] = (0, get_path_and_stringify_1.get_path_and_stringify)(TypedRoute_1.TypedRoute.__logger)(`EncryptedRoute.${method}`)(...args);
|
|
99
|
+
const [path, stringify] = (0, get_path_and_stringify_1.get_path_and_stringify)(() => TypedRoute_1.TypedRoute.__logger)(`EncryptedRoute.${method}`)(...args);
|
|
100
100
|
return (0, common_1.applyDecorators)(ROUTERS[method](path), (0, common_1.UseInterceptors)(new EncryptedRouteInterceptor(method, stringify)));
|
|
101
101
|
}
|
|
102
102
|
return route;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EncryptedRoute.js","sourceRoot":"","sources":["../../src/decorators/EncryptedRoute.ts"],"names":[],"mappings":";;;;;;AAAA,2DAAwD;AAExD,2CAWwB;AAGxB,8CAAiD;AACjD,kDAA0B;AAG1B,kDAA+C;AAC/C,6CAA0C;AAC1C,oEAAuE;AACvE,8EAA2E;AAC3E,oEAAiE;AACjE,wDAAqD;AAErD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,IAAiB,cAAc,CAyF9B;AAzFD,WAAiB,cAAc;IAC7B;;;;;OAKG;IACU,kBAAG,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IAEpC;;;;;OAKG;IACU,mBAAI,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;IAEtC;;;;;OAKG;IACU,oBAAK,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;IAExC;;;;;OAKG;IACU,kBAAG,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IAEpC;;;;;OAKG;IACU,qBAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;IAE1C;;;;;;;;;;;;;;;OAeG;IACH,SAAgB,sBAAsB,CACpC,IAAsC;QAEtC,uBAAU,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;IAJe,qCAAsB,yBAIrC,CAAA;IAID;;OAEG;IACH,SAAS,SAAS,CAAC,MAAmD;QAUpE,SAAS,KAAK,CAAC,GAAG,IAAW;YAC3B,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,IAAA,+CAAsB,
|
|
1
|
+
{"version":3,"file":"EncryptedRoute.js","sourceRoot":"","sources":["../../src/decorators/EncryptedRoute.ts"],"names":[],"mappings":";;;;;;AAAA,2DAAwD;AAExD,2CAWwB;AAGxB,8CAAiD;AACjD,kDAA0B;AAG1B,kDAA+C;AAC/C,6CAA0C;AAC1C,oE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AU;gBACzB,CAAC,CAAC,KAAK,CAAC;oBACJ,OAAO,EAAE,OAAO,CAAC,GAAG,EAAE;oBACtB,IAAI;oBACJ,SAAS,EAAE,QAAQ;iBACpB,CAAC;gBACJ,CAAC,CAAC,KAAK,CAAC;YAEZ,IAAI,IAAI,KAAK,SAAS;gBAAE,OAAO,IAAI,CAAC;YACpC,OAAO,mBAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC3D,CAAC,CAAC,EACF,IAAA,sBAAU,EAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,yBAAW,EAAC,IAAI,CAAC,UAAU,EAAE,EAAE,GAAG,CAAC,CAAC,CACzD,CAAC;IACJ,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,GAAG;IACd,GAAG,EAAH,YAAG;IACH,IAAI,EAAJ,aAAI;IACJ,GAAG,EAAH,YAAG;IACH,KAAK,EAAL,cAAK;IACL,MAAM,EAAN,eAAM;CACP,CAAC"}
|
|
@@ -87,7 +87,7 @@ export declare namespace TypedRoute {
|
|
|
87
87
|
* @param func Logger function
|
|
88
88
|
* @default console.log
|
|
89
89
|
*/
|
|
90
|
-
function setValidateErrorLogger(func: (
|
|
90
|
+
function setValidateErrorLogger(func: (log: IValidateErrorLog) => void): void;
|
|
91
91
|
/**
|
|
92
92
|
* Error log information of the response validation failure.
|
|
93
93
|
*
|
|
@@ -112,8 +112,8 @@ export declare namespace TypedRoute {
|
|
|
112
112
|
*/
|
|
113
113
|
path: string;
|
|
114
114
|
/**
|
|
115
|
-
* Validation error
|
|
115
|
+
* Validation error informations with detailed reasons.
|
|
116
116
|
*/
|
|
117
|
-
|
|
117
|
+
errors: IValidation.IError[];
|
|
118
118
|
}
|
|
119
119
|
}
|
|
@@ -90,7 +90,7 @@ var TypedRoute;
|
|
|
90
90
|
*/
|
|
91
91
|
function Generator(method) {
|
|
92
92
|
function route(...args) {
|
|
93
|
-
const [path, stringify] = (0, get_path_and_stringify_1.get_path_and_stringify)(TypedRoute.__logger)(`TypedRoute.${method}`)(...args);
|
|
93
|
+
const [path, stringify] = (0, get_path_and_stringify_1.get_path_and_stringify)(() => TypedRoute.__logger)(`TypedRoute.${method}`)(...args);
|
|
94
94
|
return (0, common_1.applyDecorators)(ROUTERS[method](path), (0, common_1.UseInterceptors)(new TypedRouteInterceptor(stringify)));
|
|
95
95
|
}
|
|
96
96
|
return route;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypedRoute.js","sourceRoot":"","sources":["../../src/decorators/TypedRoute.ts"],"names":[],"mappings":";;;;;;AAAA,2CAWwB;AAGxB,8CAAiD;AACjD,kDAA2C;AAG3C,8EAA2E;AAC3E,wDAAqD;AAErD;;;;;;;;;;;;;;GAcG;AACH,IAAiB,UAAU,CAyH1B;AAzHD,WAAiB,UAAU;IACzB;;;;;OAKG;IACU,cAAG,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IAEpC;;;;;OAKG;IACU,eAAI,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;IAEtC;;;;;OAKG;IACU,gBAAK,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;IAExC;;;;;OAKG;IACU,cAAG,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IAEpC;;;;;OAKG;IACU,iBAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;IAE1C;;;;;;;;;;;;;;;OAeG;IACH,SAAgB,sBAAsB,CACpC,IAAsC;QAEtC,WAAA,QAAQ,GAAG,IAAI,CAAC;IAClB,CAAC;IAJe,iCAAsB,yBAIrC,CAAA;IAiCD;;OAEG;IACQ,mBAAQ,GAAqC,OAAO,CAAC,GAAG,CAAC;IAEpE;;OAEG;IACH,SAAS,SAAS,CAAC,MAAmD;QAQpE,SAAS,KAAK,CAAC,GAAG,IAAW;YAC3B,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,IAAA,+C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J,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,GAAG;IACd,GAAG,EAAH,YAAG;IACH,IAAI,EAAJ,aAAI;IACJ,KAAK,EAAL,cAAK;IACL,GAAG,EAAH,YAAG;IACH,MAAM,EAAN,eAAM;CACP,CAAC"}
|
|
@@ -40,7 +40,7 @@ const take = (logger) => (method) => (functor) => {
|
|
|
40
40
|
return validate(functor.validate);
|
|
41
41
|
else if (functor.type === "validate.log" ||
|
|
42
42
|
functor.type === "validateEquals.log")
|
|
43
|
-
return validateLog(functor.validate)
|
|
43
|
+
return validateLog(logger)(functor.validate);
|
|
44
44
|
throw new Error(`Error on nestia.core.${method}(): invalid typed stringify function.`);
|
|
45
45
|
};
|
|
46
46
|
/**
|
|
@@ -83,11 +83,11 @@ const validate = (closure) => (data, _method, _path) => {
|
|
|
83
83
|
});
|
|
84
84
|
return result.data;
|
|
85
85
|
};
|
|
86
|
-
const validateLog = (
|
|
86
|
+
const validateLog = (logger) => (closure) => (data, method, path) => {
|
|
87
87
|
const result = closure(data);
|
|
88
88
|
if (result.success === false)
|
|
89
|
-
logger({
|
|
90
|
-
|
|
89
|
+
logger()({
|
|
90
|
+
errors: result.errors,
|
|
91
91
|
method,
|
|
92
92
|
path,
|
|
93
93
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_path_and_stringify.js","sourceRoot":"","sources":["../../../src/decorators/internal/get_path_and_stringify.ts"],"names":[],"mappings":";;;;;;AAAA,2CAA8D;AAC9D,kDAA2D;AAG3D,oFAAiF;AAGjF;;GAEG;AACI,MAAM,sBAAsB,GACjC,CAAC,
|
|
1
|
+
{"version":3,"file":"get_path_and_stringify.js","sourceRoot":"","sources":["../../../src/decorators/internal/get_path_and_stringify.ts"],"names":[],"mappings":";;;;;;AAAA,2CAA8D;AAC9D,kDAA2D;AAG3D,oFAAiF;AAGjF;;GAEG;AACI,MAAM,sBAAsB,GACjC,CAAC,MAAyD,EAAE,EAAE,CAC9D,CAAC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AC;AAChB,CAAC,CAAC;AAEJ;;GAEG;AACH,MAAM,QAAQ,GACZ,CAAI,OAAyC,EAAE,EAAE,CACjD,CAAC,IAAO,EAAE,OAAe,EAAE,KAAa,EAAU,EAAE;IAClD,MAAM,MAAM,GAAwB,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,IAAI,MAAM,CAAC,OAAO,KAAK,KAAK;QAC1B,MAAM,IAAI,qCAA4B,CAAC;YACrC,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,OAAO,EAAE,OAAO;SACjB,CAAC,CAAC;IACL,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC,CAAC;AAEJ,MAAM,WAAW,GACf,CAAC,MAAyD,EAAE,EAAE,CAC9D,CAAI,OAAsC,EAAE,EAAE,CAC9C,CAAC,IAAO,EAAE,MAAc,EAAE,IAAY,EAAU,EAAE;IAChD,MAAM,MAAM,GAAqB,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,IAAI,MAAM,CAAC,OAAO,KAAK,KAAK;QAC1B,MAAM,EAAE,CAAC;YACP,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,MAAM;YACN,IAAI;SACL,CAAC,CAAC;IACL,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC,CAAC;AAEJ;;GAEG;AACH,MAAM,OAAO,GAAG,wDAAwD,CAAC"}
|
|
@@ -14,25 +14,49 @@ var TypedRouteProgrammer;
|
|
|
14
14
|
(function (TypedRouteProgrammer) {
|
|
15
15
|
TypedRouteProgrammer.generate = (project) => (modulo) => (type) => {
|
|
16
16
|
// GENERATE STRINGIFY PLAN
|
|
17
|
-
const parameter = (
|
|
18
|
-
typescript_1.default.factory.createPropertyAssignment(typescript_1.default.factory.createIdentifier("type"), typescript_1.default.factory.createStringLiteral(
|
|
19
|
-
typescript_1.default.factory.createPropertyAssignment(typescript_1.default.factory.createIdentifier(key), programmer(Object.assign(Object.assign({}, project), { options: {} }))(modulo)(type)),
|
|
17
|
+
const parameter = (props) => typescript_1.default.factory.createObjectLiteralExpression([
|
|
18
|
+
typescript_1.default.factory.createPropertyAssignment(typescript_1.default.factory.createIdentifier("type"), typescript_1.default.factory.createStringLiteral(props.type)),
|
|
19
|
+
typescript_1.default.factory.createPropertyAssignment(typescript_1.default.factory.createIdentifier(props.key), props.programmer(Object.assign(Object.assign({}, project), { options: {} }))(modulo)(type)),
|
|
20
20
|
]);
|
|
21
21
|
// RETURNS
|
|
22
22
|
if (project.options.stringify === "is")
|
|
23
|
-
return parameter(
|
|
23
|
+
return parameter({
|
|
24
|
+
type: "is",
|
|
25
|
+
key: "is",
|
|
26
|
+
programmer: JsonIsStringifyProgrammer_1.JsonIsStringifyProgrammer.write,
|
|
27
|
+
});
|
|
24
28
|
else if (project.options.stringify === "validate")
|
|
25
|
-
return parameter(
|
|
29
|
+
return parameter({
|
|
30
|
+
type: "validate",
|
|
31
|
+
key: "validate",
|
|
32
|
+
programmer: JsonValidateStringifyProgrammer_1.JsonValidateStringifyProgrammer.write,
|
|
33
|
+
});
|
|
26
34
|
else if (project.options.stringify === "stringify")
|
|
27
|
-
return parameter(
|
|
35
|
+
return parameter({
|
|
36
|
+
type: "stringify",
|
|
37
|
+
key: "stringify",
|
|
38
|
+
programmer: JsonStringifyProgrammer_1.JsonStringifyProgrammer.write,
|
|
39
|
+
});
|
|
28
40
|
else if (project.options.stringify === "validate.log")
|
|
29
|
-
return parameter(
|
|
41
|
+
return parameter({
|
|
42
|
+
type: "validate.log",
|
|
43
|
+
key: "validate",
|
|
44
|
+
programmer: (project) => (modulo) => ValidateProgrammer_1.ValidateProgrammer.write(project)(modulo)(false),
|
|
45
|
+
});
|
|
30
46
|
else if (project.options.stringify === "validateEquals.log")
|
|
31
|
-
return parameter(
|
|
47
|
+
return parameter({
|
|
48
|
+
type: "validateEquals.log",
|
|
49
|
+
key: "validate",
|
|
50
|
+
programmer: (project) => (modulo) => ValidateProgrammer_1.ValidateProgrammer.write(project)(modulo)(true),
|
|
51
|
+
});
|
|
32
52
|
else if (project.options.stringify === null)
|
|
33
53
|
return typescript_1.default.factory.createNull();
|
|
34
54
|
// ASSERT IS DEFAULT
|
|
35
|
-
return parameter(
|
|
55
|
+
return parameter({
|
|
56
|
+
type: "assert",
|
|
57
|
+
key: "assert",
|
|
58
|
+
programmer: JsonAssertStringifyProgrammer_1.JsonAssertStringifyProgrammer.write,
|
|
59
|
+
});
|
|
36
60
|
};
|
|
37
61
|
})(TypedRouteProgrammer || (exports.TypedRouteProgrammer = TypedRouteProgrammer = {}));
|
|
38
62
|
//# sourceMappingURL=TypedRouteProgrammer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypedRouteProgrammer.js","sourceRoot":"","sources":["../../src/programmers/TypedRouteProgrammer.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA4B;AAC5B,iFAA8E;AAC9E,4GAAyG;AACzG,oGAAiG;AACjG,gGAA6F;AAC7F,gHAA6G;AAK7G,IAAiB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"TypedRouteProgrammer.js","sourceRoot":"","sources":["../../src/programmers/TypedRouteProgrammer.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA4B;AAC5B,iFAA8E;AAC9E,4GAAyG;AACzG,oGAAiG;AACjG,gGAA6F;AAC7F,gHAA6G;AAK7G,IAAiB,oBAAoB,CAwEpC;AAxED,WAAiB,oBAAoB;IACtB,6BAAQ,GACnB,CAAC,OAAgC,EAAE,EAAE,CACrC,CAAC,MAAiC,EAAE,EAAE,CACtC,CAAC,IAAa,EAAiB,EAAE;QAC/B,0BAA0B;QAC1B,MAAM,SAAS,GAAG,CAAC,KAQlB,EAAE,EAAE,CACH,oBAAE,CAAC,OAAO,CAAC,6BAA6B,CAAC;YACvC,oBAAE,CAAC,OAAO,CAAC,wBAAwB,CACjC,oBAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,EACnC,oBAAE,CAAC,OAAO,CAAC,mB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,oBAAoB;gBAC1B,GAAG,EAAE,UAAU;gBACf,UAAU,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAClC,uCAAkB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;aAClD,CAAC,CAAC;aACA,IAAI,OAAO,CAAC,OAAO,CAAC,SAAS,KAAK,IAAI;YACzC,OAAO,oBAAE,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QAEjC,oBAAoB;QACpB,OAAO,SAAS,CAAC;YACf,IAAI,EAAE,QAAQ;YACd,GAAG,EAAE,QAAQ;YACb,UAAU,EAAE,6DAA6B,CAAC,KAAK;SAChD,CAAC,CAAC;IACL,CAAC,CAAC;AACN,CAAC,EAxEgB,oBAAoB,oCAApB,oBAAoB,QAwEpC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestia/core",
|
|
3
|
-
"version": "3.15.0
|
|
3
|
+
"version": "3.15.0",
|
|
4
4
|
"description": "Super-fast validation decorators of NestJS",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
},
|
|
37
37
|
"homepage": "https://nestia.io",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@nestia/fetcher": "^3.15.0
|
|
39
|
+
"@nestia/fetcher": "^3.15.0",
|
|
40
40
|
"@nestjs/common": ">=7.0.1",
|
|
41
41
|
"@nestjs/core": ">=7.0.1",
|
|
42
|
-
"@samchon/openapi": "^1.0
|
|
42
|
+
"@samchon/openapi": "^1.1.0",
|
|
43
43
|
"detect-ts-node": "^1.0.5",
|
|
44
44
|
"get-function-location": "^2.0.0",
|
|
45
45
|
"glob": "^7.2.0",
|
|
@@ -49,16 +49,16 @@
|
|
|
49
49
|
"reflect-metadata": ">=0.1.12",
|
|
50
50
|
"rxjs": ">=6.0.3",
|
|
51
51
|
"tgrid": "^1.0.0",
|
|
52
|
-
"typia": "^6.
|
|
52
|
+
"typia": "^6.11.0",
|
|
53
53
|
"ws": "^7.5.3"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@nestia/fetcher": ">=3.15.0
|
|
56
|
+
"@nestia/fetcher": ">=3.15.0",
|
|
57
57
|
"@nestjs/common": ">=7.0.1",
|
|
58
58
|
"@nestjs/core": ">=7.0.1",
|
|
59
59
|
"reflect-metadata": ">=0.1.12",
|
|
60
60
|
"rxjs": ">=6.0.3",
|
|
61
|
-
"typia": ">=6.
|
|
61
|
+
"typia": ">=6.11.0 <7.0.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@fastify/multipart": "^8.1.0",
|
|
@@ -103,7 +103,7 @@ export namespace EncryptedRoute {
|
|
|
103
103
|
* @default console.log
|
|
104
104
|
*/
|
|
105
105
|
export function setValidateErrorLogger(
|
|
106
|
-
func: (
|
|
106
|
+
func: (log: IValidateErrorLog) => void,
|
|
107
107
|
): void {
|
|
108
108
|
TypedRoute.setValidateErrorLogger(func);
|
|
109
109
|
}
|
|
@@ -124,9 +124,9 @@ export namespace EncryptedRoute {
|
|
|
124
124
|
): MethodDecorator;
|
|
125
125
|
|
|
126
126
|
function route(...args: any[]): MethodDecorator {
|
|
127
|
-
const [path, stringify] = get_path_and_stringify(
|
|
128
|
-
|
|
129
|
-
)(...args);
|
|
127
|
+
const [path, stringify] = get_path_and_stringify(
|
|
128
|
+
() => TypedRoute.__logger,
|
|
129
|
+
)(`EncryptedRoute.${method}`)(...args);
|
|
130
130
|
return applyDecorators(
|
|
131
131
|
ROUTERS[method](path),
|
|
132
132
|
UseInterceptors(new EncryptedRouteInterceptor(method, stringify)),
|
|
@@ -92,7 +92,7 @@ export namespace TypedRoute {
|
|
|
92
92
|
* @default console.log
|
|
93
93
|
*/
|
|
94
94
|
export function setValidateErrorLogger(
|
|
95
|
-
func: (
|
|
95
|
+
func: (log: IValidateErrorLog) => void,
|
|
96
96
|
): void {
|
|
97
97
|
__logger = func;
|
|
98
98
|
}
|
|
@@ -123,9 +123,9 @@ export namespace TypedRoute {
|
|
|
123
123
|
path: string;
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
|
-
* Validation error
|
|
126
|
+
* Validation error informations with detailed reasons.
|
|
127
127
|
*/
|
|
128
|
-
|
|
128
|
+
errors: IValidation.IError[];
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
/**
|
|
@@ -145,7 +145,7 @@ export namespace TypedRoute {
|
|
|
145
145
|
): MethodDecorator;
|
|
146
146
|
|
|
147
147
|
function route(...args: any[]): MethodDecorator {
|
|
148
|
-
const [path, stringify] = get_path_and_stringify(__logger)(
|
|
148
|
+
const [path, stringify] = get_path_and_stringify(() => __logger)(
|
|
149
149
|
`TypedRoute.${method}`,
|
|
150
150
|
)(...args);
|
|
151
151
|
return applyDecorators(
|
|
@@ -9,7 +9,7 @@ import { TypedRoute } from "../TypedRoute";
|
|
|
9
9
|
* @internal
|
|
10
10
|
*/
|
|
11
11
|
export const get_path_and_stringify =
|
|
12
|
-
(logger: (log: TypedRoute.IValidateErrorLog) => void) =>
|
|
12
|
+
(logger: () => (log: TypedRoute.IValidateErrorLog) => void) =>
|
|
13
13
|
(method: string) =>
|
|
14
14
|
(
|
|
15
15
|
...args: any[]
|
|
@@ -32,7 +32,7 @@ export const get_path_and_stringify =
|
|
|
32
32
|
* @internal
|
|
33
33
|
*/
|
|
34
34
|
const take =
|
|
35
|
-
(logger: (log: TypedRoute.IValidateErrorLog) => void) =>
|
|
35
|
+
(logger: () => (log: TypedRoute.IValidateErrorLog) => void) =>
|
|
36
36
|
(method: string) =>
|
|
37
37
|
<T>(functor?: IResponseBodyStringifier<T> | null) => {
|
|
38
38
|
if (functor === undefined) {
|
|
@@ -50,7 +50,7 @@ const take =
|
|
|
50
50
|
functor.type === "validate.log" ||
|
|
51
51
|
functor.type === "validateEquals.log"
|
|
52
52
|
)
|
|
53
|
-
return validateLog(functor.validate)
|
|
53
|
+
return validateLog(logger)(functor.validate);
|
|
54
54
|
throw new Error(
|
|
55
55
|
`Error on nestia.core.${method}(): invalid typed stringify function.`,
|
|
56
56
|
);
|
|
@@ -104,13 +104,13 @@ const validate =
|
|
|
104
104
|
};
|
|
105
105
|
|
|
106
106
|
const validateLog =
|
|
107
|
+
(logger: () => (log: TypedRoute.IValidateErrorLog) => void) =>
|
|
107
108
|
<T>(closure: (data: T) => IValidation<any>) =>
|
|
108
|
-
(logger: (log: TypedRoute.IValidateErrorLog) => void) =>
|
|
109
109
|
(data: T, method: string, path: string): string => {
|
|
110
110
|
const result: IValidation<any> = closure(data);
|
|
111
111
|
if (result.success === false)
|
|
112
|
-
logger({
|
|
113
|
-
|
|
112
|
+
logger()({
|
|
113
|
+
errors: result.errors,
|
|
114
114
|
method,
|
|
115
115
|
path,
|
|
116
116
|
});
|
|
@@ -14,22 +14,23 @@ export namespace TypedRouteProgrammer {
|
|
|
14
14
|
(modulo: ts.LeftHandSideExpression) =>
|
|
15
15
|
(type: ts.Type): ts.Expression => {
|
|
16
16
|
// GENERATE STRINGIFY PLAN
|
|
17
|
-
const parameter = (
|
|
18
|
-
|
|
17
|
+
const parameter = (props: {
|
|
18
|
+
type: string;
|
|
19
|
+
key: string;
|
|
19
20
|
programmer: (
|
|
20
21
|
project: IProject,
|
|
21
22
|
) => (
|
|
22
23
|
modulo: ts.LeftHandSideExpression,
|
|
23
|
-
) => (type: ts.Type) => ts.Expression
|
|
24
|
-
) =>
|
|
24
|
+
) => (type: ts.Type) => ts.Expression;
|
|
25
|
+
}) =>
|
|
25
26
|
ts.factory.createObjectLiteralExpression([
|
|
26
27
|
ts.factory.createPropertyAssignment(
|
|
27
28
|
ts.factory.createIdentifier("type"),
|
|
28
|
-
ts.factory.createStringLiteral(
|
|
29
|
+
ts.factory.createStringLiteral(props.type),
|
|
29
30
|
),
|
|
30
31
|
ts.factory.createPropertyAssignment(
|
|
31
|
-
ts.factory.createIdentifier(key),
|
|
32
|
-
programmer({
|
|
32
|
+
ts.factory.createIdentifier(props.key),
|
|
33
|
+
props.programmer({
|
|
33
34
|
...project,
|
|
34
35
|
options: {}, // use default option
|
|
35
36
|
})(modulo)(type),
|
|
@@ -38,27 +39,45 @@ export namespace TypedRouteProgrammer {
|
|
|
38
39
|
|
|
39
40
|
// RETURNS
|
|
40
41
|
if (project.options.stringify === "is")
|
|
41
|
-
return parameter(
|
|
42
|
+
return parameter({
|
|
43
|
+
type: "is",
|
|
44
|
+
key: "is",
|
|
45
|
+
programmer: JsonIsStringifyProgrammer.write,
|
|
46
|
+
});
|
|
42
47
|
else if (project.options.stringify === "validate")
|
|
43
|
-
return parameter(
|
|
48
|
+
return parameter({
|
|
49
|
+
type: "validate",
|
|
50
|
+
key: "validate",
|
|
51
|
+
programmer: JsonValidateStringifyProgrammer.write,
|
|
52
|
+
});
|
|
44
53
|
else if (project.options.stringify === "stringify")
|
|
45
|
-
return parameter(
|
|
54
|
+
return parameter({
|
|
55
|
+
type: "stringify",
|
|
56
|
+
key: "stringify",
|
|
57
|
+
programmer: JsonStringifyProgrammer.write,
|
|
58
|
+
});
|
|
46
59
|
else if (project.options.stringify === "validate.log")
|
|
47
|
-
return parameter(
|
|
48
|
-
"validate.log",
|
|
49
|
-
|
|
60
|
+
return parameter({
|
|
61
|
+
type: "validate.log",
|
|
62
|
+
key: "validate",
|
|
63
|
+
programmer: (project) => (modulo) =>
|
|
50
64
|
ValidateProgrammer.write(project)(modulo)(false),
|
|
51
|
-
);
|
|
65
|
+
});
|
|
52
66
|
else if (project.options.stringify === "validateEquals.log")
|
|
53
|
-
return parameter(
|
|
54
|
-
"validateEquals.log",
|
|
55
|
-
|
|
67
|
+
return parameter({
|
|
68
|
+
type: "validateEquals.log",
|
|
69
|
+
key: "validate",
|
|
70
|
+
programmer: (project) => (modulo) =>
|
|
56
71
|
ValidateProgrammer.write(project)(modulo)(true),
|
|
57
|
-
);
|
|
72
|
+
});
|
|
58
73
|
else if (project.options.stringify === null)
|
|
59
74
|
return ts.factory.createNull();
|
|
60
75
|
|
|
61
76
|
// ASSERT IS DEFAULT
|
|
62
|
-
return parameter(
|
|
77
|
+
return parameter({
|
|
78
|
+
type: "assert",
|
|
79
|
+
key: "assert",
|
|
80
|
+
programmer: JsonAssertStringifyProgrammer.write,
|
|
81
|
+
});
|
|
63
82
|
};
|
|
64
83
|
}
|