@nestia/core 2.5.10 → 2.5.11-dev.20240224
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.
|
@@ -40,6 +40,13 @@ export declare namespace SwaggerCustomizer {
|
|
|
40
40
|
* Route data.
|
|
41
41
|
*/
|
|
42
42
|
route: ISwaggerRoute;
|
|
43
|
+
/**
|
|
44
|
+
* Get neighbor endpoint data through the controller method.
|
|
45
|
+
*
|
|
46
|
+
* @param func Controller method to find the neighbor endpoint
|
|
47
|
+
* @returns Neighbor endpoint data
|
|
48
|
+
*/
|
|
49
|
+
at(func: Function): ISwaggerEndpoint | undefined;
|
|
43
50
|
/**
|
|
44
51
|
* Get neighbor route data.
|
|
45
52
|
*
|
|
@@ -61,4 +68,13 @@ export declare namespace SwaggerCustomizer {
|
|
|
61
68
|
*/
|
|
62
69
|
method: string;
|
|
63
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Endpoint info of the route.
|
|
73
|
+
*/
|
|
74
|
+
interface ISwaggerEndpoint extends IAccessor {
|
|
75
|
+
/**
|
|
76
|
+
* Route data.
|
|
77
|
+
*/
|
|
78
|
+
route: ISwaggerRoute;
|
|
79
|
+
}
|
|
64
80
|
}
|
|
@@ -17,7 +17,14 @@ exports.SwaggerCustomizer = void 0;
|
|
|
17
17
|
*/
|
|
18
18
|
function SwaggerCustomizer(closure) {
|
|
19
19
|
return function SwaggerCustomizer(target, propertyKey, descriptor) {
|
|
20
|
-
|
|
20
|
+
var array = (function () {
|
|
21
|
+
if (Reflect.hasMetadata("nestia/SwaggerCustomizer", target, propertyKey))
|
|
22
|
+
return Reflect.getMetadata("nestia/SwaggerCustomizer", target, propertyKey);
|
|
23
|
+
var array = [];
|
|
24
|
+
Reflect.defineMetadata("nestia/SwaggerCustomizer", array, target, propertyKey);
|
|
25
|
+
return array;
|
|
26
|
+
})();
|
|
27
|
+
array.push(closure);
|
|
21
28
|
return descriptor;
|
|
22
29
|
};
|
|
23
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwaggerCustomizer.js","sourceRoot":"","sources":["../../src/decorators/SwaggerCustomizer.ts"],"names":[],"mappings":";;;AAGA;;;;;;;;;;;;;GAaG;AACH,SAAgB,iBAAiB,CAC/B,OAAqD;IAErD,OAAO,SAAS,iBAAiB,CAC/B,MAAc,EACd,WAA4B,EAC5B,UAAwC;QAExC,OAAO,CAAC,cAAc,CACpB,0BAA0B,EAC1B,
|
|
1
|
+
{"version":3,"file":"SwaggerCustomizer.js","sourceRoot":"","sources":["../../src/decorators/SwaggerCustomizer.ts"],"names":[],"mappings":";;;AAGA;;;;;;;;;;;;;GAaG;AACH,SAAgB,iBAAiB,CAC/B,OAAqD;IAErD,OAAO,SAAS,iBAAiB,CAC/B,MAAc,EACd,WAA4B,EAC5B,UAAwC;QAExC,IAAM,KAAK,GAAwD,CAAC;YAClE,IAAI,OAAO,CAAC,WAAW,CAAC,0BAA0B,EAAE,MAAM,EAAE,WAAW,CAAC;gBACtE,OAAO,OAAO,CAAC,WAAW,CACxB,0BAA0B,EAC1B,MAAM,EACN,WAAW,CACZ,CAAC;YACJ,IAAM,KAAK,GAAwD,EAAE,CAAC;YACtE,OAAO,CAAC,cAAc,CACpB,0BAA0B,EAC1B,KAAK,EACL,MAAM,EACN,WAAW,CACZ,CAAC;YACF,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,EAAE,CAAC;QACL,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpB,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AA3BD,8CA2BC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestia/core",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.11-dev.20240224",
|
|
4
4
|
"description": "Super-fast validation decorators of NestJS",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"homepage": "https://nestia.io",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@nestia/fetcher": "^2.5.
|
|
39
|
+
"@nestia/fetcher": "^2.5.11-dev.20240224",
|
|
40
40
|
"@nestjs/common": ">=7.0.1",
|
|
41
41
|
"@nestjs/core": ">=7.0.1",
|
|
42
42
|
"detect-ts-node": "^1.0.5",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"typia": "^5.4.12"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@nestia/fetcher": ">=2.5.
|
|
51
|
+
"@nestia/fetcher": ">=2.5.11-dev.20240224",
|
|
52
52
|
"@nestjs/common": ">=7.0.1",
|
|
53
53
|
"@nestjs/core": ">=7.0.1",
|
|
54
54
|
"reflect-metadata": ">=0.1.12",
|
|
@@ -23,12 +23,23 @@ export function SwaggerCustomizer(
|
|
|
23
23
|
propertyKey: string | symbol,
|
|
24
24
|
descriptor: TypedPropertyDescriptor<any>,
|
|
25
25
|
) {
|
|
26
|
-
|
|
27
|
-
"nestia/SwaggerCustomizer",
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
const array: Array<(props: SwaggerCustomizer.IProps) => unknown> = (() => {
|
|
27
|
+
if (Reflect.hasMetadata("nestia/SwaggerCustomizer", target, propertyKey))
|
|
28
|
+
return Reflect.getMetadata(
|
|
29
|
+
"nestia/SwaggerCustomizer",
|
|
30
|
+
target,
|
|
31
|
+
propertyKey,
|
|
32
|
+
);
|
|
33
|
+
const array: Array<(props: SwaggerCustomizer.IProps) => unknown> = [];
|
|
34
|
+
Reflect.defineMetadata(
|
|
35
|
+
"nestia/SwaggerCustomizer",
|
|
36
|
+
array,
|
|
37
|
+
target,
|
|
38
|
+
propertyKey,
|
|
39
|
+
);
|
|
40
|
+
return array;
|
|
41
|
+
})();
|
|
42
|
+
array.push(closure);
|
|
32
43
|
return descriptor;
|
|
33
44
|
};
|
|
34
45
|
}
|
|
@@ -61,6 +72,14 @@ export namespace SwaggerCustomizer {
|
|
|
61
72
|
*/
|
|
62
73
|
route: ISwaggerRoute;
|
|
63
74
|
|
|
75
|
+
/**
|
|
76
|
+
* Get neighbor endpoint data through the controller method.
|
|
77
|
+
*
|
|
78
|
+
* @param func Controller method to find the neighbor endpoint
|
|
79
|
+
* @returns Neighbor endpoint data
|
|
80
|
+
*/
|
|
81
|
+
at(func: Function): ISwaggerEndpoint | undefined;
|
|
82
|
+
|
|
64
83
|
/**
|
|
65
84
|
* Get neighbor route data.
|
|
66
85
|
*
|
|
@@ -84,4 +103,14 @@ export namespace SwaggerCustomizer {
|
|
|
84
103
|
*/
|
|
85
104
|
method: string;
|
|
86
105
|
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Endpoint info of the route.
|
|
109
|
+
*/
|
|
110
|
+
export interface ISwaggerEndpoint extends IAccessor {
|
|
111
|
+
/**
|
|
112
|
+
* Route data.
|
|
113
|
+
*/
|
|
114
|
+
route: ISwaggerRoute;
|
|
115
|
+
}
|
|
87
116
|
}
|