@trapi/metadata 0.1.8 → 0.2.1
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/LICENSE +1 -1
- package/README.md +14 -44
- package/dist/generator/controller.d.ts +2 -2
- package/dist/generator/controller.d.ts.map +1 -1
- package/dist/generator/controller.js.map +1 -1
- package/dist/generator/endpoint.d.ts +4 -5
- package/dist/generator/endpoint.d.ts.map +1 -1
- package/dist/generator/endpoint.js +6 -8
- package/dist/generator/endpoint.js.map +1 -1
- package/dist/generator/index.d.ts +1 -0
- package/dist/generator/index.d.ts.map +1 -1
- package/dist/generator/index.js +1 -0
- package/dist/generator/index.js.map +1 -1
- package/dist/generator/method.d.ts +2 -2
- package/dist/generator/method.d.ts.map +1 -1
- package/dist/generator/method.js +11 -13
- package/dist/generator/method.js.map +1 -1
- package/dist/generator/module.d.ts +6 -7
- package/dist/generator/module.d.ts.map +1 -1
- package/dist/generator/module.js +10 -8
- package/dist/generator/module.js.map +1 -1
- package/dist/generator/parameter.d.ts +2 -2
- package/dist/generator/parameter.d.ts.map +1 -1
- package/dist/generator/parameter.js +10 -7
- package/dist/generator/parameter.js.map +1 -1
- package/dist/generator/utils.d.ts +5 -0
- package/dist/generator/utils.d.ts.map +1 -0
- package/dist/generator/utils.js +18 -0
- package/dist/generator/utils.js.map +1 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/module.d.ts +4 -0
- package/dist/module.d.ts.map +1 -0
- package/dist/module.js +16 -0
- package/dist/module.js.map +1 -0
- package/dist/type.d.ts +8 -23
- package/dist/type.d.ts.map +1 -1
- package/dist/utils/index.d.ts +3 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +3 -2
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/object.d.ts +2 -0
- package/dist/utils/object.d.ts.map +1 -0
- package/dist/utils/object.js +14 -0
- package/dist/utils/object.js.map +1 -0
- package/dist/utils/path.d.ts +2 -0
- package/dist/utils/path.d.ts.map +1 -0
- package/dist/utils/path.js +17 -0
- package/dist/utils/path.js.map +1 -0
- package/dist/utils/typescript.d.ts +8 -0
- package/dist/utils/typescript.d.ts.map +1 -0
- package/dist/utils/typescript.js +41 -0
- package/dist/utils/typescript.js.map +1 -0
- package/dist/utils/validator.d.ts.map +1 -1
- package/dist/utils/validator.js +2 -2
- package/dist/utils/validator.js.map +1 -1
- package/package.json +18 -9
- package/dist/decorator/functions.d.ts +0 -99
- package/dist/decorator/functions.d.ts.map +0 -1
- package/dist/decorator/functions.js +0 -140
- package/dist/decorator/functions.js.map +0 -1
- package/dist/decorator/index.d.ts +0 -7
- package/dist/decorator/index.d.ts.map +0 -1
- package/dist/decorator/index.js +0 -29
- package/dist/decorator/index.js.map +0 -1
- package/dist/decorator/mapper/index.d.ts +0 -25
- package/dist/decorator/mapper/index.d.ts.map +0 -1
- package/dist/decorator/mapper/index.js +0 -115
- package/dist/decorator/mapper/index.js.map +0 -1
- package/dist/decorator/mapper/maps/decorators-express.d.ts +0 -4
- package/dist/decorator/mapper/maps/decorators-express.d.ts.map +0 -1
- package/dist/decorator/mapper/maps/decorators-express.js +0 -115
- package/dist/decorator/mapper/maps/decorators-express.js.map +0 -1
- package/dist/decorator/mapper/maps/internal.d.ts +0 -4
- package/dist/decorator/mapper/maps/internal.d.ts.map +0 -1
- package/dist/decorator/mapper/maps/internal.js +0 -94
- package/dist/decorator/mapper/maps/internal.js.map +0 -1
- package/dist/decorator/mapper/maps/typescript-rest.d.ts +0 -4
- package/dist/decorator/mapper/maps/typescript-rest.d.ts.map +0 -1
- package/dist/decorator/mapper/maps/typescript-rest.js +0 -145
- package/dist/decorator/mapper/maps/typescript-rest.js.map +0 -1
- package/dist/decorator/mapper/utils.d.ts +0 -17
- package/dist/decorator/mapper/utils.d.ts.map +0 -1
- package/dist/decorator/mapper/utils.js +0 -73
- package/dist/decorator/mapper/utils.js.map +0 -1
- package/dist/decorator/representation/index.d.ts +0 -17
- package/dist/decorator/representation/index.d.ts.map +0 -1
- package/dist/decorator/representation/index.js +0 -61
- package/dist/decorator/representation/index.js.map +0 -1
- package/dist/decorator/representation/property/utils.d.ts +0 -6
- package/dist/decorator/representation/property/utils.d.ts.map +0 -1
- package/dist/decorator/representation/property/utils.js +0 -120
- package/dist/decorator/representation/property/utils.js.map +0 -1
- package/dist/decorator/type.d.ts +0 -178
- package/dist/decorator/type.d.ts.map +0 -1
- package/dist/decorator/type.js +0 -9
- package/dist/decorator/type.js.map +0 -1
- package/dist/decorator/utils/index.d.ts +0 -3
- package/dist/decorator/utils/index.d.ts.map +0 -1
- package/dist/decorator/utils/index.js +0 -25
- package/dist/decorator/utils/index.js.map +0 -1
- package/dist/decorator/utils/node.d.ts +0 -10
- package/dist/decorator/utils/node.d.ts.map +0 -1
- package/dist/decorator/utils/node.js +0 -49
- package/dist/decorator/utils/node.js.map +0 -1
- package/dist/decorator/utils/validator.d.ts +0 -4
- package/dist/decorator/utils/validator.d.ts.map +0 -1
- package/dist/decorator/utils/validator.js +0 -86
- package/dist/decorator/utils/validator.js.map +0 -1
- package/dist/resolver/error.d.ts +0 -7
- package/dist/resolver/error.d.ts.map +0 -1
- package/dist/resolver/error.js +0 -40
- package/dist/resolver/error.js.map +0 -1
- package/dist/resolver/index.d.ts +0 -5
- package/dist/resolver/index.d.ts.map +0 -1
- package/dist/resolver/index.js +0 -27
- package/dist/resolver/index.js.map +0 -1
- package/dist/resolver/type-node.d.ts +0 -53
- package/dist/resolver/type-node.d.ts.map +0 -1
- package/dist/resolver/type-node.js +0 -1045
- package/dist/resolver/type-node.js.map +0 -1
- package/dist/resolver/type.d.ts +0 -118
- package/dist/resolver/type.d.ts.map +0 -1
- package/dist/resolver/type.js +0 -57
- package/dist/resolver/type.js.map +0 -1
- package/dist/resolver/utils/index.d.ts +0 -3
- package/dist/resolver/utils/index.d.ts.map +0 -1
- package/dist/resolver/utils/index.js +0 -25
- package/dist/resolver/utils/index.js.map +0 -1
- package/dist/resolver/utils/initializer.d.ts +0 -5
- package/dist/resolver/utils/initializer.d.ts.map +0 -1
- package/dist/resolver/utils/initializer.js +0 -97
- package/dist/resolver/utils/initializer.js.map +0 -1
- package/dist/resolver/utils/validator.d.ts +0 -4
- package/dist/resolver/utils/validator.d.ts.map +0 -1
- package/dist/resolver/utils/validator.js +0 -131
- package/dist/resolver/utils/validator.js.map +0 -1
- package/dist/utils/generator.d.ts +0 -6
- package/dist/utils/generator.d.ts.map +0 -1
- package/dist/utils/generator.js +0 -33
- package/dist/utils/generator.js.map +0 -1
- package/dist/utils/js-doc.d.ts +0 -8
- package/dist/utils/js-doc.d.ts.map +0 -1
- package/dist/utils/js-doc.js +0 -102
- package/dist/utils/js-doc.js.map +0 -1
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2021.
|
|
4
|
-
* Author Peter Placzek (tada5hi)
|
|
5
|
-
* For the full copyright and license information,
|
|
6
|
-
* view the LICENSE file that was distributed with this source code.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.IsDouble = exports.IsFloat = exports.IsLong = exports.IsInt = exports.SwaggerDeprecated = exports.SwaggerHidden = exports.SwaggerTags = exports.ResponseProduces = exports.ResponseExample = exports.ResponseDescription = exports.RequestFileParam = exports.RequestConsumes = void 0;
|
|
10
|
-
/**
|
|
11
|
-
* Document the method or class comsumes property in generated swagger docs
|
|
12
|
-
*/
|
|
13
|
-
function RequestConsumes(...values) {
|
|
14
|
-
return () => { };
|
|
15
|
-
}
|
|
16
|
-
exports.RequestConsumes = RequestConsumes;
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* @param key
|
|
22
|
-
* @constructor
|
|
23
|
-
*/
|
|
24
|
-
function RequestFileParam(key) {
|
|
25
|
-
return () => { };
|
|
26
|
-
}
|
|
27
|
-
exports.RequestFileParam = RequestFileParam;
|
|
28
|
-
/**
|
|
29
|
-
* A decorator to document the responses that a given service method can return. It is used to generate
|
|
30
|
-
* documentation for the REST service.
|
|
31
|
-
* ```typescript
|
|
32
|
-
* interface MyError {
|
|
33
|
-
* message: string
|
|
34
|
-
* }
|
|
35
|
-
* @ Path('people')
|
|
36
|
-
* class PeopleService {
|
|
37
|
-
* @ ResponseDescription<string>(200, 'Retrieve a list of people.')
|
|
38
|
-
* @ ResponseDescription<MyError>(401, 'The user is unauthorized.', {message: 'The user is not authorized to access this operation.'})
|
|
39
|
-
* @ GET
|
|
40
|
-
* getPeople(@ Param('name') name: string) {
|
|
41
|
-
* // ...
|
|
42
|
-
* }
|
|
43
|
-
* }
|
|
44
|
-
* ```
|
|
45
|
-
* A Default response is created in swagger documentation from the method return analisys. So any response declared
|
|
46
|
-
* through this decorator is an additional response created.
|
|
47
|
-
* @param name
|
|
48
|
-
* @param description A description for this response
|
|
49
|
-
* @param example An optional example of response to be added to method documentation.
|
|
50
|
-
*/
|
|
51
|
-
function ResponseDescription(name, description, example) {
|
|
52
|
-
return () => { };
|
|
53
|
-
}
|
|
54
|
-
exports.ResponseDescription = ResponseDescription;
|
|
55
|
-
/**
|
|
56
|
-
* Used to provide an example of method return to be added into the method response section of the
|
|
57
|
-
* generated documentation for this method.
|
|
58
|
-
* ```typescript
|
|
59
|
-
* @ Path('people')
|
|
60
|
-
* class PeopleService {
|
|
61
|
-
* @ ResponseExample<Array<Person>>([{
|
|
62
|
-
* name: 'Joe'
|
|
63
|
-
* }])
|
|
64
|
-
* @ GET
|
|
65
|
-
* getPeople(@ Param('name') name: string): Person[] {
|
|
66
|
-
* // ...
|
|
67
|
-
* }
|
|
68
|
-
* }
|
|
69
|
-
* ```
|
|
70
|
-
* @param example The example returned object
|
|
71
|
-
*/
|
|
72
|
-
function ResponseExample(example) {
|
|
73
|
-
return () => { };
|
|
74
|
-
}
|
|
75
|
-
exports.ResponseExample = ResponseExample;
|
|
76
|
-
/**
|
|
77
|
-
* Document the method or class produces property in generated swagger docs
|
|
78
|
-
*/
|
|
79
|
-
function ResponseProduces(...values) {
|
|
80
|
-
return () => { };
|
|
81
|
-
}
|
|
82
|
-
exports.ResponseProduces = ResponseProduces;
|
|
83
|
-
/**
|
|
84
|
-
* Add tags for a given method on generated swagger documentation.
|
|
85
|
-
* ```typescript
|
|
86
|
-
* @ Path('people')
|
|
87
|
-
* class PeopleService {
|
|
88
|
-
* @ SwaggerTags('adiministrative', 'department1')
|
|
89
|
-
* @ GET
|
|
90
|
-
* getPeople(@ Param('name') name: string) {
|
|
91
|
-
* // ...
|
|
92
|
-
* }
|
|
93
|
-
* }
|
|
94
|
-
* ```
|
|
95
|
-
* @param values a list of tags
|
|
96
|
-
*/
|
|
97
|
-
function SwaggerTags(...values) {
|
|
98
|
-
return () => { };
|
|
99
|
-
}
|
|
100
|
-
exports.SwaggerTags = SwaggerTags;
|
|
101
|
-
/**
|
|
102
|
-
* Document the method or class produces property in generated swagger docs.
|
|
103
|
-
*/
|
|
104
|
-
function SwaggerHidden() {
|
|
105
|
-
return () => { };
|
|
106
|
-
}
|
|
107
|
-
exports.SwaggerHidden = SwaggerHidden;
|
|
108
|
-
/**
|
|
109
|
-
* Document the method or collection of method paths are deprecated and should not be used.
|
|
110
|
-
*/
|
|
111
|
-
function SwaggerDeprecated() {
|
|
112
|
-
return () => { };
|
|
113
|
-
}
|
|
114
|
-
exports.SwaggerDeprecated = SwaggerDeprecated;
|
|
115
|
-
/**
|
|
116
|
-
* Document the type of a property or parameter as `integer ($int32)` in generated swagger docs
|
|
117
|
-
*/
|
|
118
|
-
function IsInt(target, propertyKey, parameterIndex) {
|
|
119
|
-
}
|
|
120
|
-
exports.IsInt = IsInt;
|
|
121
|
-
/**
|
|
122
|
-
* Document the type of a property or parameter as `integer ($int64)` in generated swagger docs
|
|
123
|
-
*/
|
|
124
|
-
function IsLong(target, propertyKey, parameterIndex) {
|
|
125
|
-
}
|
|
126
|
-
exports.IsLong = IsLong;
|
|
127
|
-
/**
|
|
128
|
-
* Document the type of a property or parameter as `number ($float)` in generated swagger docs
|
|
129
|
-
*/
|
|
130
|
-
function IsFloat(target, propertyKey, parameterIndex) {
|
|
131
|
-
}
|
|
132
|
-
exports.IsFloat = IsFloat;
|
|
133
|
-
/**
|
|
134
|
-
* Document the type of a property or parameter as `number ($double)` in generated swagger docs.
|
|
135
|
-
* This is the default for `number` types without a specifying decorator.
|
|
136
|
-
*/
|
|
137
|
-
function IsDouble(target, propertyKey, parameterIndex) {
|
|
138
|
-
}
|
|
139
|
-
exports.IsDouble = IsDouble;
|
|
140
|
-
//# sourceMappingURL=functions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../src/decorator/functions.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH;;GAEG;AACH,SAAgB,eAAe,CAAC,GAAG,MAAgC;IAC/D,OAAO,GAAG,EAAE,GAAG,CAAC,CAAC;AACrB,CAAC;AAFD,0CAEC;AAED;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAAC,GAAW;IACxC,OAAO,GAAG,EAAE,GAAG,CAAC,CAAC;AACrB,CAAC;AAFD,4CAEC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,SAAgB,mBAAmB,CAAI,IAAqB,EAAE,WAAoB,EAAE,OAAW;IAC3F,OAAO,GAAG,EAAE,GAAG,CAAC,CAAC;AACrB,CAAC;AAFD,kDAEC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,eAAe,CAAI,OAAU;IACzC,OAAO,GAAG,EAAE,GAAG,CAAC,CAAC;AACrB,CAAC;AAFD,0CAEC;AAED;;GAEG;AACH,SAAgB,gBAAgB,CAAC,GAAG,MAAgB;IAChD,OAAO,GAAG,EAAE,GAAG,CAAC,CAAC;AACrB,CAAC;AAFD,4CAEC;AAED;;;;;;;;;;;;;GAaG;AACH,SAAgB,WAAW,CAAC,GAAG,MAAgB;IAC3C,OAAO,GAAG,EAAE,GAAG,CAAC,CAAC;AACrB,CAAC;AAFD,kCAEC;AAED;;GAEG;AACH,SAAgB,aAAa;IACzB,OAAO,GAAG,EAAE,GAAG,CAAC,CAAC;AACrB,CAAC;AAFD,sCAEC;AAED;;GAEG;AACH,SAAgB,iBAAiB;IAC7B,OAAO,GAAG,EAAE,GAAG,CAAC,CAAC;AACrB,CAAC;AAFD,8CAEC;AAED;;GAEG;AACH,SAAgB,KAAK,CAAC,MAAW,EAAE,WAAmB,EAAE,cAAuB;AAE/E,CAAC;AAFD,sBAEC;AAED;;GAEG;AACH,SAAgB,MAAM,CAAC,MAAW,EAAE,WAAmB,EAAE,cAAuB;AAEhF,CAAC;AAFD,wBAEC;AAED;;GAEG;AACH,SAAgB,OAAO,CAAC,MAAW,EAAE,WAAmB,EAAE,cAAuB;AAEjF,CAAC;AAFD,0BAEC;AAED;;;GAGG;AACH,SAAgB,QAAQ,CAAC,MAAW,EAAE,WAAmB,EAAE,cAAuB;AAElF,CAAC;AAFD,4BAEC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/decorator/index.ts"],"names":[],"mappings":"AAOA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
package/dist/decorator/index.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2021.
|
|
4
|
-
* Author Peter Placzek (tada5hi)
|
|
5
|
-
* For the full copyright and license information,
|
|
6
|
-
* view the LICENSE file that was distributed with this source code.
|
|
7
|
-
*/
|
|
8
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
-
}
|
|
14
|
-
Object.defineProperty(o, k2, desc);
|
|
15
|
-
}) : (function(o, m, k, k2) {
|
|
16
|
-
if (k2 === undefined) k2 = k;
|
|
17
|
-
o[k2] = m[k];
|
|
18
|
-
}));
|
|
19
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
20
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
21
|
-
};
|
|
22
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
__exportStar(require("./mapper"), exports);
|
|
24
|
-
__exportStar(require("./representation"), exports);
|
|
25
|
-
__exportStar(require("./utils"), exports);
|
|
26
|
-
__exportStar(require("./functions"), exports);
|
|
27
|
-
__exportStar(require("./type"), exports);
|
|
28
|
-
__exportStar(require("./utils"), exports);
|
|
29
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/decorator/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,2CAAyB;AACzB,mDAAiC;AACjC,0CAAwB;AACxB,8CAA4B;AAC5B,yCAAuB;AACvB,0CAAwB"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Node } from 'typescript';
|
|
2
|
-
import { RepresentationManager } from '../representation';
|
|
3
|
-
import { Decorator } from '../type';
|
|
4
|
-
export declare class DecoratorMapper {
|
|
5
|
-
protected config?: Decorator.Config;
|
|
6
|
-
protected mapping: Partial<Decorator.TypeRepresentationMap>;
|
|
7
|
-
constructor(config?: Decorator.Config);
|
|
8
|
-
setConfig(config?: Decorator.Config): void;
|
|
9
|
-
/**
|
|
10
|
-
* Try to find a matching representation for a given decorator type and decorators or node.
|
|
11
|
-
*
|
|
12
|
-
* @param type
|
|
13
|
-
* @param data
|
|
14
|
-
*/
|
|
15
|
-
match<T extends Decorator.Type>(type: T, data: Decorator.Data[] | Node): RepresentationManager<T>;
|
|
16
|
-
private aggregate;
|
|
17
|
-
/**
|
|
18
|
-
* Merge decorator type-representation mappings of different libraries together.
|
|
19
|
-
*
|
|
20
|
-
* @param mappings
|
|
21
|
-
* @private
|
|
22
|
-
*/
|
|
23
|
-
private merge;
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/decorator/mapper/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIpC,qBAAa,eAAe;IAIpB,SAAS,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,MAAM;IAHvC,SAAS,CAAC,OAAO,EAAG,OAAO,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAM;gBAGpD,MAAM,CAAC,EAAE,SAAS,CAAC,MAAM;IAKhC,SAAS,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,MAAM;IAK1C;;;;;OAKG;IACI,KAAK,CAAC,CAAC,SAAS,SAAS,CAAC,IAAI,EACjC,IAAI,EAAE,CAAC,EACP,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,GAAG,IAAI;IAwBjC,OAAO,CAAC,SAAS;IA+CjB;;;;;OAKG;IACH,OAAO,CAAC,KAAK;CAmChB"}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2021.
|
|
4
|
-
* Author Peter Placzek (tada5hi)
|
|
5
|
-
* For the full copyright and license information,
|
|
6
|
-
* view the LICENSE file that was distributed with this source code.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.DecoratorMapper = void 0;
|
|
10
|
-
const metadata_utils_1 = require("@trapi/metadata-utils");
|
|
11
|
-
const representation_1 = require("../representation");
|
|
12
|
-
const utils_1 = require("./utils");
|
|
13
|
-
const utils_2 = require("../utils");
|
|
14
|
-
class DecoratorMapper {
|
|
15
|
-
constructor(config) {
|
|
16
|
-
this.config = config;
|
|
17
|
-
this.mapping = {};
|
|
18
|
-
this.aggregate();
|
|
19
|
-
}
|
|
20
|
-
setConfig(config) {
|
|
21
|
-
this.config = config;
|
|
22
|
-
this.aggregate();
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Try to find a matching representation for a given decorator type and decorators or node.
|
|
26
|
-
*
|
|
27
|
-
* @param type
|
|
28
|
-
* @param data
|
|
29
|
-
*/
|
|
30
|
-
match(type, data) {
|
|
31
|
-
if (!(0, metadata_utils_1.hasOwnProperty)(this.mapping, type)) {
|
|
32
|
-
return undefined;
|
|
33
|
-
}
|
|
34
|
-
const decorators = Array.isArray(data) ? data : (0, utils_2.getNodeDecorators)(data);
|
|
35
|
-
const representations = (Array.isArray(this.mapping[type]) ? this.mapping[type] : [this.mapping[type]]);
|
|
36
|
-
for (let i = 0; i < representations.length; i++) {
|
|
37
|
-
const items = decorators.filter((decorator) => decorator.text === representations[i].id);
|
|
38
|
-
if (items.length > 0) {
|
|
39
|
-
return new representation_1.RepresentationManager(representations[i], items);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return undefined;
|
|
43
|
-
}
|
|
44
|
-
// -------------------------------------------
|
|
45
|
-
aggregate() {
|
|
46
|
-
if (typeof this.config === 'undefined') {
|
|
47
|
-
this.mapping = {};
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
const items = [];
|
|
51
|
-
// mapping - internal
|
|
52
|
-
const internalMap = (0, utils_1.getDecoratorMap)('internal');
|
|
53
|
-
items.push(typeof this.config.internal === 'undefined' ?
|
|
54
|
-
internalMap :
|
|
55
|
-
(0, utils_1.reduceTypeRepresentationMapping)(internalMap, (type) => (0, utils_1.isMappingTypeIncluded)(type, this.config.internal)));
|
|
56
|
-
// mapping - extension
|
|
57
|
-
if (typeof this.config.map !== 'undefined') {
|
|
58
|
-
items.push(this.config.map);
|
|
59
|
-
}
|
|
60
|
-
// mapping - library
|
|
61
|
-
if (typeof this.config.library !== 'undefined') {
|
|
62
|
-
// check if string or string[]
|
|
63
|
-
if (typeof this.config.library === 'string' ||
|
|
64
|
-
Array.isArray(this.config.library)) {
|
|
65
|
-
const libraries = Array.isArray(this.config.library) ?
|
|
66
|
-
this.config.library :
|
|
67
|
-
[this.config.library];
|
|
68
|
-
items.push(...libraries.map((library) => (0, utils_1.getDecoratorMap)(library)));
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
// tslint:disable-next-line:forin
|
|
72
|
-
for (const key in this.config.library) {
|
|
73
|
-
items.push((0, utils_1.reduceTypeRepresentationMapping)((0, utils_1.getDecoratorMap)(key), (type) => (0, utils_1.isMappingTypeIncluded)(type, this.config.library[key])));
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
this.mapping = this.merge(...items);
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Merge decorator type-representation mappings of different libraries together.
|
|
81
|
-
*
|
|
82
|
-
* @param mappings
|
|
83
|
-
* @private
|
|
84
|
-
*/
|
|
85
|
-
merge(...mappings) {
|
|
86
|
-
const result = {};
|
|
87
|
-
// we need all available mapping keys :)
|
|
88
|
-
let keys = mappings
|
|
89
|
-
.map((mapping) => Object.keys(mapping))
|
|
90
|
-
.reduce(((previousValue, currentValue) => [...previousValue, ...currentValue]));
|
|
91
|
-
keys = Array.from(new Set(keys));
|
|
92
|
-
for (let i = 0; i < keys.length; i++) {
|
|
93
|
-
const representations = [];
|
|
94
|
-
for (let j = 0; j < mappings.length; j++) {
|
|
95
|
-
if ((0, metadata_utils_1.hasOwnProperty)(mappings[j], keys[i])) {
|
|
96
|
-
const value = mappings[j][keys[i]];
|
|
97
|
-
if (typeof value === 'undefined') {
|
|
98
|
-
continue;
|
|
99
|
-
}
|
|
100
|
-
if (Array.isArray(value)) {
|
|
101
|
-
representations.push(...value);
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
representations.push(value);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
// @ts-ignore
|
|
109
|
-
result[keys[i]] = representations;
|
|
110
|
-
}
|
|
111
|
-
return result;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
exports.DecoratorMapper = DecoratorMapper;
|
|
115
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorator/mapper/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,0DAAuD;AACvD,sDAA0D;AAE1D,mCAAkG;AAClG,oCAA6C;AAE7C,MAAa,eAAe;IAGxB,YACc,MAAyB;QAAzB,WAAM,GAAN,MAAM,CAAmB;QAH7B,YAAO,GAA8C,EAAE,CAAC;QAK9D,IAAI,CAAC,SAAS,EAAE,CAAC;IACrB,CAAC;IAEM,SAAS,CAAC,MAAyB;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,SAAS,EAAE,CAAC;IACrB,CAAC;IAED;;;;;OAKG;IACI,KAAK,CACR,IAAO,EACP,IAA6B;QAE7B,IAAI,CAAC,IAAA,+BAAc,EAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE;YACrC,OAAO,SAAS,CAAC;SACpB;QAED,MAAM,UAAU,GAAsB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC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|
1
|
-
{"version":3,"file":"decorators-express.d.ts","sourceRoot":"","sources":["../../../../src/decorator/mapper/maps/decorators-express.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;;AAEvC,wBA2G8C"}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2021.
|
|
4
|
-
* Author Peter Placzek (tada5hi)
|
|
5
|
-
* For the full copyright and license information,
|
|
6
|
-
* view the LICENSE file that was distributed with this source code.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.default = {
|
|
10
|
-
// Class
|
|
11
|
-
CLASS_PATH: {
|
|
12
|
-
id: 'Controller',
|
|
13
|
-
properties: {
|
|
14
|
-
DEFAULT: {},
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
// Method
|
|
18
|
-
METHOD_PATH: [
|
|
19
|
-
{
|
|
20
|
-
id: 'All',
|
|
21
|
-
properties: {
|
|
22
|
-
DEFAULT: {},
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
id: 'Get',
|
|
27
|
-
properties: {
|
|
28
|
-
DEFAULT: {},
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
id: 'Post',
|
|
33
|
-
properties: {
|
|
34
|
-
DEFAULT: {},
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
id: 'Put',
|
|
39
|
-
properties: {
|
|
40
|
-
DEFAULT: {},
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
id: 'Delete',
|
|
45
|
-
properties: {
|
|
46
|
-
DEFAULT: {},
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
id: 'Patch',
|
|
51
|
-
properties: {
|
|
52
|
-
DEFAULT: {},
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
id: 'Options',
|
|
57
|
-
properties: {
|
|
58
|
-
DEFAULT: {},
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
id: 'Head',
|
|
63
|
-
properties: {
|
|
64
|
-
DEFAULT: {},
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
// Parameter
|
|
69
|
-
SERVER_CONTEXT: [
|
|
70
|
-
{
|
|
71
|
-
id: 'Request',
|
|
72
|
-
properties: {},
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
id: 'Response',
|
|
76
|
-
properties: {},
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
id: 'Next',
|
|
80
|
-
properties: {},
|
|
81
|
-
},
|
|
82
|
-
],
|
|
83
|
-
SERVER_QUERY: {
|
|
84
|
-
id: 'Query',
|
|
85
|
-
properties: {
|
|
86
|
-
DEFAULT: {},
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
SERVER_FORM: undefined,
|
|
90
|
-
SERVER_BODY: {
|
|
91
|
-
id: 'Body',
|
|
92
|
-
properties: {
|
|
93
|
-
DEFAULT: {},
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
SERVER_HEADERS: {
|
|
97
|
-
id: 'Headers',
|
|
98
|
-
properties: {
|
|
99
|
-
DEFAULT: {},
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
SERVER_COOKIES: {
|
|
103
|
-
id: 'Cookies',
|
|
104
|
-
properties: {
|
|
105
|
-
DEFAULT: {},
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
SERVER_PATH_PARAMS: {
|
|
109
|
-
id: 'Params',
|
|
110
|
-
properties: {
|
|
111
|
-
DEFAULT: {},
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
};
|
|
115
|
-
//# sourceMappingURL=decorators-express.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"decorators-express.js","sourceRoot":"","sources":["../../../../src/decorator/mapper/maps/decorators-express.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAIH,kBAAe;IACX,QAAQ;IACR,UAAU,EAAE;QACR,EAAE,EAAE,YAAY;QAChB,UAAU,EAAE;YACR,OAAO,EAAE,EAAE;SACd;KACJ;IAED,SAAS;IACT,WAAW,EAAE;QACT;YACI,EAAE,EAAE,KAAK;YACT,UAAU,EAAE;gBACR,OAAO,EAAE,EAAE;aACd;SACJ;QACD;YACI,EAAE,EAAE,KAAK;YACT,UAAU,EAAE;gBACR,OAAO,EAAE,EAAE;aACd;SACJ;QACD;YACI,EAAE,EAAE,MAAM;YACV,UAAU,EAAE;gBACR,OAAO,EAAE,EAAE;aACd;SACJ;QACD;YACI,EAAE,EAAE,KAAK;YACT,UAAU,EAAE;gBACR,OAAO,EAAE,EAAE;aACd;SACJ;QACD;YACI,EAAE,EAAE,QAAQ;YACZ,UAAU,EAAE;gBACR,OAAO,EAAE,EAAE;aACd;SACJ;QACD;YACI,EAAE,EAAE,OAAO;YACX,UAAU,EAAE;gBACR,OAAO,EAAE,EAAE;aACd;SACJ;QACD;YACI,EAAE,EAAE,SAAS;YACb,UAAU,EAAE;gBACR,OAAO,EAAE,EAAE;aACd;SACJ;QACD;YACI,EAAE,EAAE,MAAM;YACV,UAAU,EAAE;gBACR,OAAO,EAAE,EAAE;aACd;SACJ;KACJ;IAED,YAAY;IACZ,cAAc,EAAE;QACZ;YACI,EAAE,EAAE,SAAS;YACb,UAAU,EAAE,EAAE;SACjB;QACD;YACI,EAAE,EAAE,UAAU;YACd,UAAU,EAAE,EAAE;SACjB;QACD;YACI,EAAE,EAAE,MAAM;YACV,UAAU,EAAE,EAAE;SACjB;KACJ;IACD,YAAY,EAAE;QACV,EAAE,EAAE,OAAO;QACX,UAAU,EAAE;YACR,OAAO,EAAE,EAAE;SACd;KACJ;IACD,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE;QACT,EAAE,EAAE,MAAM;QACV,UAAU,EAAE;YACR,OAAO,EAAE,EAAE;SACd;KACJ;IACD,cAAc,EAAE;QACZ,EAAE,EAAE,SAAS;QACb,UAAU,EAAE;YACR,OAAO,EAAE,EAAE;SACd;KACJ;IACD,cAAc,EAAE;QACZ,EAAE,EAAE,SAAS;QACb,UAAU,EAAE;YACR,OAAO,EAAE,EAAE;SACd;KACJ;IACD,kBAAkB,EAAE;QAChB,EAAE,EAAE,QAAQ;QACZ,UAAU,EAAE;YACR,OAAO,EAAE,EAAE;SACd;KACJ;CACwC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../src/decorator/mapper/maps/internal.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;;AAEvC,wBAyF8C"}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2021.
|
|
4
|
-
* Author Peter Placzek (tada5hi)
|
|
5
|
-
* For the full copyright and license information,
|
|
6
|
-
* view the LICENSE file that was distributed with this source code.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.default = {
|
|
10
|
-
EXTENSION: {
|
|
11
|
-
id: 'Extension',
|
|
12
|
-
properties: {
|
|
13
|
-
KEY: { type: 'element', srcArgumentType: 'argument', srcPosition: 0 },
|
|
14
|
-
VALUE: { type: 'element', srcArgumentType: 'argument', srcPosition: 1 },
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
// Class
|
|
18
|
-
SWAGGER_TAGS: {
|
|
19
|
-
id: 'SwaggerTags',
|
|
20
|
-
properties: {
|
|
21
|
-
DEFAULT: { type: 'array', srcArgumentType: 'argument' },
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
// Class + Method
|
|
25
|
-
RESPONSE_EXAMPLE: {
|
|
26
|
-
id: 'ResponseExample',
|
|
27
|
-
properties: {
|
|
28
|
-
TYPE: { isType: true, srcArgumentType: 'typeArgument' },
|
|
29
|
-
PAYLOAD: { type: 'element', srcArgumentType: 'argument', srcPosition: 0 },
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
RESPONSE_DESCRIPTION: {
|
|
33
|
-
id: 'ResponseDescription',
|
|
34
|
-
properties: {
|
|
35
|
-
TYPE: { isType: true, srcArgumentType: 'typeArgument' },
|
|
36
|
-
STATUS_CODE: { type: 'element', srcArgumentType: 'argument', srcPosition: 0 },
|
|
37
|
-
DESCRIPTION: { type: 'element', srcArgumentType: 'argument', srcPosition: 1 },
|
|
38
|
-
PAYLOAD: { type: 'element', srcArgumentType: 'argument', srcPosition: 2 },
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
REQUEST_CONSUMES: {
|
|
42
|
-
id: 'RequestConsumes',
|
|
43
|
-
properties: {
|
|
44
|
-
DEFAULT: {
|
|
45
|
-
type: 'array', srcArgumentType: 'argument', srcAmount: -1, srcStrategy: 'merge',
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
RESPONSE_PRODUCES: {
|
|
50
|
-
id: 'ResponseProduces',
|
|
51
|
-
properties: {
|
|
52
|
-
DEFAULT: {
|
|
53
|
-
type: 'array', srcArgumentType: 'argument', srcAmount: -1, srcStrategy: 'merge',
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
HIDDEN: {
|
|
58
|
-
id: 'SwaggerHidden',
|
|
59
|
-
properties: [],
|
|
60
|
-
},
|
|
61
|
-
DEPRECATED: {
|
|
62
|
-
id: 'SwaggerDeprecated',
|
|
63
|
-
properties: undefined,
|
|
64
|
-
},
|
|
65
|
-
IS_INT: {
|
|
66
|
-
id: 'IsInt',
|
|
67
|
-
properties: undefined,
|
|
68
|
-
},
|
|
69
|
-
IS_LONG: {
|
|
70
|
-
id: 'IsLong',
|
|
71
|
-
properties: undefined,
|
|
72
|
-
},
|
|
73
|
-
IS_FlOAT: {
|
|
74
|
-
id: 'IsFloat',
|
|
75
|
-
properties: undefined,
|
|
76
|
-
},
|
|
77
|
-
IS_DOUBLE: {
|
|
78
|
-
id: 'IsDouble',
|
|
79
|
-
properties: undefined,
|
|
80
|
-
},
|
|
81
|
-
SERVER_FILES_PARAM: {
|
|
82
|
-
id: 'RequestFileParam',
|
|
83
|
-
properties: {
|
|
84
|
-
DEFAULT: {},
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
SERVER_FILE_PARAM: {
|
|
88
|
-
id: 'RequestFileParam',
|
|
89
|
-
properties: {
|
|
90
|
-
DEFAULT: {},
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
};
|
|
94
|
-
//# sourceMappingURL=internal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../../src/decorator/mapper/maps/internal.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAIH,kBAAe;IACX,SAAS,EAAE;QACP,EAAE,EAAE,WAAW;QACf,UAAU,EAAE;YACR,GAAG,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC,EAAE;YACrE,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC,EAAE;SAC1E;KACJ;IAED,QAAQ;IACR,YAAY,EAAE;QACV,EAAE,EAAE,aAAa;QACjB,UAAU,EAAE;YACR,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE;SAC1D;KACJ;IAED,iBAAiB;IACjB,gBAAgB,EAAE;QACd,EAAE,EAAE,iBAAiB;QACrB,UAAU,EAAE;YACR,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,cAAc,EAAE;YACvD,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AAQ,EAAE;QACN,EAAE,EAAE,SAAS;QACb,UAAU,EAAE,SAAS;KACxB;IACD,SAAS,EAAE;QACP,EAAE,EAAE,UAAU;QACd,UAAU,EAAE,SAAS;KACxB;IAED,kBAAkB,EAAE;QAChB,EAAE,EAAE,kBAAkB;QACtB,UAAU,EAAE;YACR,OAAO,EAAE,EAAE;SACd;KACJ;IACD,iBAAiB,EAAE;QACf,EAAE,EAAE,kBAAkB;QACtB,UAAU,EAAE;YACR,OAAO,EAAE,EAAE;SACd;KACJ;CACwC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-rest.d.ts","sourceRoot":"","sources":["../../../../src/decorator/mapper/maps/typescript-rest.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;;AAEvC,wBA2I8C"}
|