@trapi/metadata 0.1.6 → 0.2.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/README.md +7 -13
- package/dist/cache/driver.d.ts +1 -1
- package/dist/cache/driver.d.ts.map +1 -1
- package/dist/cache/driver.js +8 -6
- package/dist/cache/driver.js.map +1 -1
- package/dist/cache/index.js +5 -1
- package/dist/cache/index.js.map +1 -1
- package/dist/cache/type.d.ts +1 -1
- package/dist/cache/type.d.ts.map +1 -1
- package/dist/cache/utils.d.ts +1 -1
- package/dist/cache/utils.d.ts.map +1 -1
- package/dist/cache/utils.js +3 -3
- package/dist/cache/utils.js.map +1 -1
- package/dist/config/index.js +5 -1
- package/dist/config/index.js.map +1 -1
- package/dist/config/path.js.map +1 -1
- package/dist/decorator/functions.d.ts.map +1 -1
- package/dist/decorator/functions.js +9 -13
- package/dist/decorator/functions.js.map +1 -1
- package/dist/decorator/index.d.ts +1 -1
- package/dist/decorator/index.js +5 -1
- package/dist/decorator/index.js.map +1 -1
- package/dist/decorator/mapper/index.d.ts +3 -3
- package/dist/decorator/mapper/index.d.ts.map +1 -1
- package/dist/decorator/mapper/index.js +5 -9
- package/dist/decorator/mapper/index.js.map +1 -1
- package/dist/decorator/mapper/maps/decorators-express.d.ts +1 -1
- package/dist/decorator/mapper/maps/decorators-express.d.ts.map +1 -1
- package/dist/decorator/mapper/maps/decorators-express.js +33 -33
- package/dist/decorator/mapper/maps/internal.d.ts +1 -1
- package/dist/decorator/mapper/maps/internal.d.ts.map +1 -1
- package/dist/decorator/mapper/maps/internal.js +31 -27
- package/dist/decorator/mapper/maps/internal.js.map +1 -1
- package/dist/decorator/mapper/maps/typescript-rest.d.ts +1 -1
- package/dist/decorator/mapper/maps/typescript-rest.d.ts.map +1 -1
- package/dist/decorator/mapper/maps/typescript-rest.js +38 -38
- package/dist/decorator/mapper/maps/typescript-rest.js.map +1 -1
- package/dist/decorator/mapper/utils.d.ts +1 -1
- package/dist/decorator/mapper/utils.d.ts.map +1 -1
- package/dist/decorator/mapper/utils.js +1 -1
- package/dist/decorator/mapper/utils.js.map +1 -1
- package/dist/decorator/representation/index.d.ts +1 -1
- package/dist/decorator/representation/index.d.ts.map +1 -1
- package/dist/decorator/representation/index.js.map +1 -1
- package/dist/decorator/representation/property/utils.d.ts +1 -1
- package/dist/decorator/representation/property/utils.d.ts.map +1 -1
- package/dist/decorator/representation/property/utils.js +3 -3
- package/dist/decorator/representation/property/utils.js.map +1 -1
- package/dist/decorator/type.d.ts.map +1 -1
- package/dist/decorator/utils/index.js +5 -1
- package/dist/decorator/utils/index.js.map +1 -1
- package/dist/decorator/utils/node.d.ts +1 -1
- package/dist/decorator/utils/node.d.ts.map +1 -1
- package/dist/decorator/utils/node.js +4 -6
- package/dist/decorator/utils/node.js.map +1 -1
- package/dist/decorator/utils/validator.d.ts +2 -2
- package/dist/decorator/utils/validator.d.ts.map +1 -1
- package/dist/decorator/utils/validator.js +8 -8
- package/dist/decorator/utils/validator.js.map +1 -1
- package/dist/generator/controller.d.ts +1 -1
- package/dist/generator/controller.d.ts.map +1 -1
- package/dist/generator/controller.js.map +1 -1
- package/dist/generator/endpoint.d.ts +2 -2
- package/dist/generator/endpoint.d.ts.map +1 -1
- package/dist/generator/endpoint.js +14 -16
- package/dist/generator/endpoint.js.map +1 -1
- package/dist/generator/index.js +5 -1
- package/dist/generator/index.js.map +1 -1
- package/dist/generator/method.d.ts +1 -1
- package/dist/generator/method.d.ts.map +1 -1
- package/dist/generator/method.js +15 -11
- package/dist/generator/method.js.map +1 -1
- package/dist/generator/module.d.ts +3 -3
- package/dist/generator/module.d.ts.map +1 -1
- package/dist/generator/module.js +16 -16
- package/dist/generator/module.js.map +1 -1
- package/dist/generator/parameter.d.ts +1 -1
- package/dist/generator/parameter.d.ts.map +1 -1
- package/dist/generator/parameter.js +31 -28
- package/dist/generator/parameter.js.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/resolver/index.js +5 -1
- package/dist/resolver/index.js.map +1 -1
- package/dist/resolver/type-node.d.ts +1 -1
- package/dist/resolver/type-node.d.ts.map +1 -1
- package/dist/resolver/type-node.js +111 -139
- package/dist/resolver/type-node.js.map +1 -1
- package/dist/resolver/type.d.ts +1 -1
- package/dist/resolver/type.d.ts.map +1 -1
- package/dist/resolver/utils/index.js +5 -1
- package/dist/resolver/utils/index.js.map +1 -1
- package/dist/resolver/utils/initializer.d.ts +1 -1
- package/dist/resolver/utils/initializer.d.ts.map +1 -1
- package/dist/resolver/utils/initializer.js +16 -14
- package/dist/resolver/utils/initializer.js.map +1 -1
- package/dist/resolver/utils/validator.d.ts +1 -1
- package/dist/resolver/utils/validator.d.ts.map +1 -1
- package/dist/resolver/utils/validator.js +6 -10
- package/dist/resolver/utils/validator.js.map +1 -1
- package/dist/type.d.ts +5 -3
- package/dist/type.d.ts.map +1 -1
- package/dist/utils/generator.d.ts +2 -2
- package/dist/utils/generator.d.ts.map +1 -1
- package/dist/utils/generator.js +1 -1
- package/dist/utils/generator.js.map +1 -1
- package/dist/utils/index.js +5 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/js-doc.d.ts.map +1 -1
- package/dist/utils/js-doc.js +6 -10
- package/dist/utils/js-doc.js.map +1 -1
- package/dist/utils/validator.d.ts +2 -2
- 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 +17 -13
package/README.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# @trapi/metadata 📚
|
|
2
2
|
|
|
3
|
-
[](https://github.com/Tada5hi/trapi/actions/workflows/main.yml)
|
|
4
|
+
[](https://codecov.io/gh/Tada5hi/trapi)
|
|
5
|
+
[](https://snyk.io/test/github/Tada5hi/trapi)
|
|
6
6
|
[](https://badge.fury.io/js/@trapi%2Fmetadata)
|
|
7
7
|
|
|
8
|
-
This is
|
|
9
|
-
|
|
8
|
+
This package is responsible for generating metadata information by analyzing TypeScript REST decorators (self defined or third-party libraries).
|
|
9
|
+
The metadata can than be used for generating a documentation according to the OpenAPI Specification or to create route schema/handling for libraries like: express, koa, etc.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Inspect the `CHANGELOG.md` in the repository for breaking changes.
|
|
12
12
|
|
|
13
13
|
**Table of Contents**
|
|
14
14
|
|
|
@@ -16,9 +16,8 @@ Please read the `CHANGELOG.md` in the repository for breaking changes.
|
|
|
16
16
|
- [Configuration](#configuration)
|
|
17
17
|
- [Limitations](#limitations)
|
|
18
18
|
- [Usage](#usage)
|
|
19
|
-
- [Decorator(s)](#decorator)
|
|
20
|
-
- [Generator](#generator)
|
|
21
19
|
- [Structure](#structure)
|
|
20
|
+
|
|
22
21
|
## Installation
|
|
23
22
|
|
|
24
23
|
```bash
|
|
@@ -172,8 +171,3 @@ console.log(metadata);
|
|
|
172
171
|
## Structure
|
|
173
172
|
|
|
174
173
|
**coming soon**
|
|
175
|
-
|
|
176
|
-
## Credits
|
|
177
|
-
Parts of this package **@trapi/metadata** code rest on a continued fork repository ([typescript-swagger](https://github.com/Tada5hi/typescript-swagger)) of the
|
|
178
|
-
[typescript-rest-swagger](https://github.com/thiagobustamante/typescript-rest-swagger) library of [thiagobustamante](https://github.com/thiagobustamante)
|
|
179
|
-
and was also inspired by the [tsoa](https://github.com/lukeautry/tsoa) library of [lukeatury](https://github.com/lukeautry).
|
package/dist/cache/driver.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../src/cache/driver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../src/cache/driver.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE/B,qBAAa,WAAW;IACpB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;gBAE1B,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC;IAMrD,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,GAAG,MAAM,GAAG,SAAS;IAY1C,GAAG,CAAC,eAAe,EAAE,MAAM,GAAG,KAAK,CAAC,IAAI,GAAG,SAAS;IA8B3D;;OAEG;IAGI,KAAK,IAAI,IAAI;IAgBpB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,aAAa;CAMxB"}
|
package/dist/cache/driver.js
CHANGED
|
@@ -7,7 +7,11 @@
|
|
|
7
7
|
*/
|
|
8
8
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
9
|
if (k2 === undefined) k2 = k;
|
|
10
|
-
Object.
|
|
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);
|
|
11
15
|
}) : (function(o, m, k, k2) {
|
|
12
16
|
if (k2 === undefined) k2 = k;
|
|
13
17
|
o[k2] = m[k];
|
|
@@ -29,10 +33,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
29
33
|
};
|
|
30
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
35
|
exports.CacheDriver = void 0;
|
|
32
|
-
const utils_1 = require("./utils");
|
|
33
36
|
const fs_1 = __importDefault(require("fs"));
|
|
34
37
|
const glob = __importStar(require("glob"));
|
|
35
38
|
const path_1 = __importDefault(require("path"));
|
|
39
|
+
const utils_1 = require("./utils");
|
|
36
40
|
class CacheDriver {
|
|
37
41
|
constructor(config) {
|
|
38
42
|
this.config = (0, utils_1.buildCacheConfig)(config);
|
|
@@ -81,7 +85,7 @@ class CacheDriver {
|
|
|
81
85
|
return;
|
|
82
86
|
}
|
|
83
87
|
const files = glob.sync(this.buildFilePath('**'));
|
|
84
|
-
files.map(file => fs_1.default.unlinkSync(file));
|
|
88
|
+
files.map((file) => fs_1.default.unlinkSync(file));
|
|
85
89
|
}
|
|
86
90
|
// -------------------------------------------------------------------------
|
|
87
91
|
buildFilePath(hash, sourceFilesSize) {
|
|
@@ -91,9 +95,7 @@ class CacheDriver {
|
|
|
91
95
|
if (typeof this.config.fileName === 'string') {
|
|
92
96
|
return this.config.fileName;
|
|
93
97
|
}
|
|
94
|
-
|
|
95
|
-
return `.swagger-${hash !== null && hash !== void 0 ? hash : (0, utils_1.buildFileHash)(sourceFilesSize)}.json`;
|
|
96
|
-
}
|
|
98
|
+
return `.swagger-${hash !== null && hash !== void 0 ? hash : (0, utils_1.buildFileHash)(sourceFilesSize)}.json`;
|
|
97
99
|
}
|
|
98
100
|
}
|
|
99
101
|
exports.CacheDriver = CacheDriver;
|
package/dist/cache/driver.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.js","sourceRoot":"","sources":["../../src/cache/driver.ts"],"names":[],"mappings":";AAAA;;;;;GAKG
|
|
1
|
+
{"version":3,"file":"driver.js","sourceRoot":"","sources":["../../src/cache/driver.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4CAAoB;AACpB,2CAA6B;AAC7B,gDAAwB;AACxB,mCAA0D;AAG1D,MAAa,WAAW;IAGpB,YAAY,MAAgD;QACxD,IAAI,CAAC,MAAM,GAAG,IAAA,wBAAgB,EAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;IAED,4EAA4E;IAErE,IAAI,CAAC,IAAgB;QACxB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;YACtB,OAAO,SAAS,CAAC;SACpB;QAED,MAAM,QAAQ,GAAW,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QAE7E,YAAE,CAAC,aAAa,CAAC,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IAAI,EAAE,EAAE,CAAC,YAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7C,CAAC;IAED,4EAA4E;IAEpE,aAAa,CAAC,IAAa,EAAE,eAAwB;QACzD,OAAO,cAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC;IAC3F,CAAC;IAEO,aAAa,CAAC,IAAa,EAAE,eAAwB;QACzD,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,KAAK,QAAQ,EAAE;YAC1C,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;SAC/B;QACD,OAAO,YAAY,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,IAAA,qBAAa,EAAC,eAAe,CAAC,OAAO,CAAC;IACrE,CAAC;CACJ;AAlFD,kCAkFC"}
|
package/dist/cache/index.js
CHANGED
|
@@ -7,7 +7,11 @@
|
|
|
7
7
|
*/
|
|
8
8
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
9
|
if (k2 === undefined) k2 = k;
|
|
10
|
-
Object.
|
|
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);
|
|
11
15
|
}) : (function(o, m, k, k2) {
|
|
12
16
|
if (k2 === undefined) k2 = k;
|
|
13
17
|
o[k2] = m[k];
|
package/dist/cache/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cache/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cache/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,2CAAyB;AACzB,yCAAuB;AACvB,0CAAwB"}
|
package/dist/cache/type.d.ts
CHANGED
package/dist/cache/type.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/cache/type.ts"],"names":[],"mappings":"AAOA,OAAO,
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/cache/type.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,yBAAiB,KAAK,CAAC;IACnB,UAAiB,MAAM;QACnB;;;;aAIK;QACL,OAAO,EAAE,OAAO,CAAC;QACjB;;;;WAIG;QACH,aAAa,EAAE,MAAM,CAAC;QACtB;;;;WAIG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;QAElB;;;;;WAKG;QACH,aAAa,EAAE,OAAO,CAAA;KACzB;IAED,KAAY,IAAI,GAAG;QACf,eAAe,EAAE,MAAM,CAAC;KAC3B,GAAG,eAAe,CAAC;CACvB"}
|
package/dist/cache/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cache } from
|
|
1
|
+
import { Cache } from './type';
|
|
2
2
|
export declare function buildCacheConfig(config?: string | boolean | Partial<Cache.Config>): Cache.Config;
|
|
3
3
|
export declare function buildFileHash(sourceFilesSize?: number): string;
|
|
4
4
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/cache/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/cache/utils.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE/B,wBAAgB,gBAAgB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAI,KAAK,CAAC,MAAM,CA2BjG;AAED,wBAAgB,aAAa,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,CAQ9D"}
|
package/dist/cache/utils.js
CHANGED
|
@@ -17,12 +17,12 @@ function buildCacheConfig(config) {
|
|
|
17
17
|
if (typeof config === 'string') {
|
|
18
18
|
config = {
|
|
19
19
|
enabled: true,
|
|
20
|
-
directoryPath: config
|
|
20
|
+
directoryPath: config,
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
if (typeof config === 'boolean') {
|
|
24
24
|
config = {
|
|
25
|
-
enabled: config
|
|
25
|
+
enabled: config,
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
config !== null && config !== void 0 ? config : (config = {});
|
|
@@ -34,7 +34,7 @@ function buildCacheConfig(config) {
|
|
|
34
34
|
path_1.default.isAbsolute(config.directoryPath) ? config.directoryPath : path_1.default.join(process.cwd(), config.directoryPath) :
|
|
35
35
|
process.cwd(),
|
|
36
36
|
enabled: (_a = config.enabled) !== null && _a !== void 0 ? _a : false,
|
|
37
|
-
clearAtRandom: (_b = config.clearAtRandom) !== null && _b !== void 0 ? _b : !isTestEnvironment
|
|
37
|
+
clearAtRandom: (_b = config.clearAtRandom) !== null && _b !== void 0 ? _b : !isTestEnvironment,
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
exports.buildCacheConfig = buildCacheConfig;
|
package/dist/cache/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/cache/utils.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/cache/utils.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAEH,gDAAwB;AACxB,oDAA4B;AAG5B,SAAgB,gBAAgB,CAAC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CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC;AARD,sCAQC"}
|
package/dist/config/index.js
CHANGED
|
@@ -7,7 +7,11 @@
|
|
|
7
7
|
*/
|
|
8
8
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
9
|
if (k2 === undefined) k2 = k;
|
|
10
|
-
Object.
|
|
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);
|
|
11
15
|
}) : (function(o, m, k, k2) {
|
|
12
16
|
if (k2 === undefined) k2 = k;
|
|
13
17
|
o[k2] = m[k];
|
package/dist/config/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,yCAAuB"}
|
package/dist/config/path.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../src/config/path.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAEH,gDAAwB;AAExB,IAAI,eAAoC,CAAC;AACzC,IAAI,WAAgC,CAAC;AAErC,SAAgB,kBAAkB;IAC9B,
|
|
1
|
+
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../src/config/path.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAEH,gDAAwB;AAExB,IAAI,eAAoC,CAAC;AACzC,IAAI,WAAgC,CAAC;AAErC,SAAgB,kBAAkB;IAC9B,IAAI,OAAO,eAAe,KAAK,WAAW,EAAE;QACxC,OAAO,eAAe,CAAC;KAC1B;IAED,eAAe,GAAG,cAAI,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,YAAY,CAAC,CAAC;IAC5D,OAAO,eAAe,CAAC;AAC3B,CAAC;AAPD,gDAOC;AAED,SAAgB,cAAc;IAC1B,IAAI,OAAO,WAAW,KAAK,WAAW,EAAE;QACpC,OAAO,WAAW,CAAC;KACtB;IAED,WAAW,GAAG,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAChD,OAAO,WAAW,CAAC;AACvB,CAAC;AAPD,wCAOC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/decorator/functions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/decorator/functions.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG,GAAG,CAExE;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAI,GAAG,CAElD;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,GAAG,GAAG,CAEpG;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,GAAG,CAElD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,CAEzD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,GAAG,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,CAEpD;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,GAAG,CAEnC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAK,GAAG,CAExC;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,QAE9E;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,QAE/E;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,QAEhF;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,QAEjF"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/*
|
|
2
3
|
* Copyright (c) 2021.
|
|
3
4
|
* Author Peter Placzek (tada5hi)
|
|
4
5
|
* For the full copyright and license information,
|
|
5
6
|
* view the LICENSE file that was distributed with this source code.
|
|
6
7
|
*/
|
|
7
|
-
'use strict';
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
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
10
|
/**
|
|
11
11
|
* Document the method or class comsumes property in generated swagger docs
|
|
12
12
|
*/
|
|
13
13
|
function RequestConsumes(...values) {
|
|
14
|
-
return () => {
|
|
14
|
+
return () => { };
|
|
15
15
|
}
|
|
16
16
|
exports.RequestConsumes = RequestConsumes;
|
|
17
17
|
/**
|
|
@@ -22,7 +22,7 @@ exports.RequestConsumes = RequestConsumes;
|
|
|
22
22
|
* @constructor
|
|
23
23
|
*/
|
|
24
24
|
function RequestFileParam(key) {
|
|
25
|
-
return () => {
|
|
25
|
+
return () => { };
|
|
26
26
|
}
|
|
27
27
|
exports.RequestFileParam = RequestFileParam;
|
|
28
28
|
/**
|
|
@@ -49,7 +49,7 @@ exports.RequestFileParam = RequestFileParam;
|
|
|
49
49
|
* @param example An optional example of response to be added to method documentation.
|
|
50
50
|
*/
|
|
51
51
|
function ResponseDescription(name, description, example) {
|
|
52
|
-
return () => {
|
|
52
|
+
return () => { };
|
|
53
53
|
}
|
|
54
54
|
exports.ResponseDescription = ResponseDescription;
|
|
55
55
|
/**
|
|
@@ -70,14 +70,14 @@ exports.ResponseDescription = ResponseDescription;
|
|
|
70
70
|
* @param example The example returned object
|
|
71
71
|
*/
|
|
72
72
|
function ResponseExample(example) {
|
|
73
|
-
return () => {
|
|
73
|
+
return () => { };
|
|
74
74
|
}
|
|
75
75
|
exports.ResponseExample = ResponseExample;
|
|
76
76
|
/**
|
|
77
77
|
* Document the method or class produces property in generated swagger docs
|
|
78
78
|
*/
|
|
79
79
|
function ResponseProduces(...values) {
|
|
80
|
-
return () => {
|
|
80
|
+
return () => { };
|
|
81
81
|
}
|
|
82
82
|
exports.ResponseProduces = ResponseProduces;
|
|
83
83
|
/**
|
|
@@ -95,42 +95,39 @@ exports.ResponseProduces = ResponseProduces;
|
|
|
95
95
|
* @param values a list of tags
|
|
96
96
|
*/
|
|
97
97
|
function SwaggerTags(...values) {
|
|
98
|
-
return () => {
|
|
98
|
+
return () => { };
|
|
99
99
|
}
|
|
100
100
|
exports.SwaggerTags = SwaggerTags;
|
|
101
101
|
/**
|
|
102
102
|
* Document the method or class produces property in generated swagger docs.
|
|
103
103
|
*/
|
|
104
104
|
function SwaggerHidden() {
|
|
105
|
-
return () => {
|
|
105
|
+
return () => { };
|
|
106
106
|
}
|
|
107
107
|
exports.SwaggerHidden = SwaggerHidden;
|
|
108
108
|
/**
|
|
109
109
|
* Document the method or collection of method paths are deprecated and should not be used.
|
|
110
110
|
*/
|
|
111
111
|
function SwaggerDeprecated() {
|
|
112
|
-
return () => {
|
|
112
|
+
return () => { };
|
|
113
113
|
}
|
|
114
114
|
exports.SwaggerDeprecated = SwaggerDeprecated;
|
|
115
115
|
/**
|
|
116
116
|
* Document the type of a property or parameter as `integer ($int32)` in generated swagger docs
|
|
117
117
|
*/
|
|
118
118
|
function IsInt(target, propertyKey, parameterIndex) {
|
|
119
|
-
return;
|
|
120
119
|
}
|
|
121
120
|
exports.IsInt = IsInt;
|
|
122
121
|
/**
|
|
123
122
|
* Document the type of a property or parameter as `integer ($int64)` in generated swagger docs
|
|
124
123
|
*/
|
|
125
124
|
function IsLong(target, propertyKey, parameterIndex) {
|
|
126
|
-
return;
|
|
127
125
|
}
|
|
128
126
|
exports.IsLong = IsLong;
|
|
129
127
|
/**
|
|
130
128
|
* Document the type of a property or parameter as `number ($float)` in generated swagger docs
|
|
131
129
|
*/
|
|
132
130
|
function IsFloat(target, propertyKey, parameterIndex) {
|
|
133
|
-
return;
|
|
134
131
|
}
|
|
135
132
|
exports.IsFloat = IsFloat;
|
|
136
133
|
/**
|
|
@@ -138,7 +135,6 @@ exports.IsFloat = IsFloat;
|
|
|
138
135
|
* This is the default for `number` types without a specifying decorator.
|
|
139
136
|
*/
|
|
140
137
|
function IsDouble(target, propertyKey, parameterIndex) {
|
|
141
|
-
return;
|
|
142
138
|
}
|
|
143
139
|
exports.IsDouble = IsDouble;
|
|
144
140
|
//# sourceMappingURL=functions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../src/decorator/functions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG
|
|
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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,QAAQ,CAAC,MAAW,EAAE,WAAmB,EAAE,cAAuB;AAElF,CAAC;AAFD,4BAEC"}
|
package/dist/decorator/index.js
CHANGED
|
@@ -7,7 +7,11 @@
|
|
|
7
7
|
*/
|
|
8
8
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
9
|
if (k2 === undefined) k2 = k;
|
|
10
|
-
Object.
|
|
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);
|
|
11
15
|
}) : (function(o, m, k, k2) {
|
|
12
16
|
if (k2 === undefined) k2 = k;
|
|
13
17
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/decorator/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG
|
|
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,6 +1,6 @@
|
|
|
1
|
-
import { Node } from
|
|
2
|
-
import { RepresentationManager } from
|
|
3
|
-
import { Decorator } from
|
|
1
|
+
import { Node } from 'typescript';
|
|
2
|
+
import { RepresentationManager } from '../representation';
|
|
3
|
+
import { Decorator } from '../type';
|
|
4
4
|
export declare class DecoratorMapper {
|
|
5
5
|
protected config?: Decorator.Config;
|
|
6
6
|
protected mapping: Partial<Decorator.TypeRepresentationMap>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/decorator/mapper/index.ts"],"names":[],"mappings":"AAOA,OAAO,
|
|
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"}
|
|
@@ -34,7 +34,7 @@ class DecoratorMapper {
|
|
|
34
34
|
const decorators = Array.isArray(data) ? data : (0, utils_2.getNodeDecorators)(data);
|
|
35
35
|
const representations = (Array.isArray(this.mapping[type]) ? this.mapping[type] : [this.mapping[type]]);
|
|
36
36
|
for (let i = 0; i < representations.length; i++) {
|
|
37
|
-
const items = decorators.filter(decorator => decorator.text === representations[i].id);
|
|
37
|
+
const items = decorators.filter((decorator) => decorator.text === representations[i].id);
|
|
38
38
|
if (items.length > 0) {
|
|
39
39
|
return new representation_1.RepresentationManager(representations[i], items);
|
|
40
40
|
}
|
|
@@ -52,9 +52,7 @@ class DecoratorMapper {
|
|
|
52
52
|
const internalMap = (0, utils_1.getDecoratorMap)('internal');
|
|
53
53
|
items.push(typeof this.config.internal === 'undefined' ?
|
|
54
54
|
internalMap :
|
|
55
|
-
(0, utils_1.reduceTypeRepresentationMapping)(internalMap, (type) =>
|
|
56
|
-
return (0, utils_1.isMappingTypeIncluded)(type, this.config.internal);
|
|
57
|
-
}));
|
|
55
|
+
(0, utils_1.reduceTypeRepresentationMapping)(internalMap, (type) => (0, utils_1.isMappingTypeIncluded)(type, this.config.internal)));
|
|
58
56
|
// mapping - extension
|
|
59
57
|
if (typeof this.config.map !== 'undefined') {
|
|
60
58
|
items.push(this.config.map);
|
|
@@ -67,14 +65,12 @@ class DecoratorMapper {
|
|
|
67
65
|
const libraries = Array.isArray(this.config.library) ?
|
|
68
66
|
this.config.library :
|
|
69
67
|
[this.config.library];
|
|
70
|
-
items.push(...libraries.map(library => (0, utils_1.getDecoratorMap)(library)));
|
|
68
|
+
items.push(...libraries.map((library) => (0, utils_1.getDecoratorMap)(library)));
|
|
71
69
|
}
|
|
72
70
|
else {
|
|
73
71
|
// tslint:disable-next-line:forin
|
|
74
72
|
for (const key in this.config.library) {
|
|
75
|
-
items.push((0, utils_1.reduceTypeRepresentationMapping)((0, utils_1.getDecoratorMap)(key), (type) =>
|
|
76
|
-
return (0, utils_1.isMappingTypeIncluded)(type, this.config.library[key]);
|
|
77
|
-
}));
|
|
73
|
+
items.push((0, utils_1.reduceTypeRepresentationMapping)((0, utils_1.getDecoratorMap)(key), (type) => (0, utils_1.isMappingTypeIncluded)(type, this.config.library[key])));
|
|
78
74
|
}
|
|
79
75
|
}
|
|
80
76
|
}
|
|
@@ -90,7 +86,7 @@ class DecoratorMapper {
|
|
|
90
86
|
const result = {};
|
|
91
87
|
// we need all available mapping keys :)
|
|
92
88
|
let keys = mappings
|
|
93
|
-
.map(mapping => Object.keys(mapping))
|
|
89
|
+
.map((mapping) => Object.keys(mapping))
|
|
94
90
|
.reduce(((previousValue, currentValue) => [...previousValue, ...currentValue]));
|
|
95
91
|
keys = Array.from(new Set(keys));
|
|
96
92
|
for (let i = 0; i < keys.length; i++) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorator/mapper/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,
|
|
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,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAA,yBAAiB,EAAC,IAAI,CAAC,CAAC;QAE3F,MAAM,eAAe,GAAwC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAuC,CAAC;QACnL,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,eAAe,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC7C,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,EAA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E,EAAE;YAClC,MAAM,eAAe,GAA0C,EAAE,CAAC;YAElE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACtC,IAAI,IAAA,+BAAc,EAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;oBACtC,MAAM,KAAK,GAA0E,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;oBAE1G,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;wBAC9B,SAAS;qBACZ;oBAED,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;wBACtB,eAAe,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;qBAClC;yBAAM;wBACH,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;qBAC/B;iBACJ;aACJ;YAED,aAAa;YACb,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC;SACrC;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AAtID,0CAsIC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators-express.d.ts","sourceRoot":"","sources":["../../../../src/decorator/mapper/maps/decorators-express.ts"],"names":[],"mappings":"AAOA,OAAO,
|
|
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"}
|
|
@@ -11,105 +11,105 @@ exports.default = {
|
|
|
11
11
|
CLASS_PATH: {
|
|
12
12
|
id: 'Controller',
|
|
13
13
|
properties: {
|
|
14
|
-
DEFAULT: {}
|
|
15
|
-
}
|
|
14
|
+
DEFAULT: {},
|
|
15
|
+
},
|
|
16
16
|
},
|
|
17
17
|
// Method
|
|
18
18
|
METHOD_PATH: [
|
|
19
19
|
{
|
|
20
20
|
id: 'All',
|
|
21
21
|
properties: {
|
|
22
|
-
DEFAULT: {}
|
|
23
|
-
}
|
|
22
|
+
DEFAULT: {},
|
|
23
|
+
},
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
id: 'Get',
|
|
27
27
|
properties: {
|
|
28
|
-
DEFAULT: {}
|
|
29
|
-
}
|
|
28
|
+
DEFAULT: {},
|
|
29
|
+
},
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
id: 'Post',
|
|
33
33
|
properties: {
|
|
34
|
-
DEFAULT: {}
|
|
35
|
-
}
|
|
34
|
+
DEFAULT: {},
|
|
35
|
+
},
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
id: 'Put',
|
|
39
39
|
properties: {
|
|
40
|
-
DEFAULT: {}
|
|
41
|
-
}
|
|
40
|
+
DEFAULT: {},
|
|
41
|
+
},
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
id: 'Delete',
|
|
45
45
|
properties: {
|
|
46
|
-
DEFAULT: {}
|
|
47
|
-
}
|
|
46
|
+
DEFAULT: {},
|
|
47
|
+
},
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
id: 'Patch',
|
|
51
51
|
properties: {
|
|
52
|
-
DEFAULT: {}
|
|
53
|
-
}
|
|
52
|
+
DEFAULT: {},
|
|
53
|
+
},
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
id: 'Options',
|
|
57
57
|
properties: {
|
|
58
|
-
DEFAULT: {}
|
|
59
|
-
}
|
|
58
|
+
DEFAULT: {},
|
|
59
|
+
},
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
id: 'Head',
|
|
63
63
|
properties: {
|
|
64
|
-
DEFAULT: {}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
64
|
+
DEFAULT: {},
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
67
|
],
|
|
68
68
|
// Parameter
|
|
69
69
|
SERVER_CONTEXT: [
|
|
70
70
|
{
|
|
71
71
|
id: 'Request',
|
|
72
|
-
properties: {}
|
|
72
|
+
properties: {},
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
id: 'Response',
|
|
76
|
-
properties: {}
|
|
76
|
+
properties: {},
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
id: 'Next',
|
|
80
|
-
properties: {}
|
|
80
|
+
properties: {},
|
|
81
81
|
},
|
|
82
82
|
],
|
|
83
83
|
SERVER_QUERY: {
|
|
84
84
|
id: 'Query',
|
|
85
85
|
properties: {
|
|
86
|
-
DEFAULT: {}
|
|
87
|
-
}
|
|
86
|
+
DEFAULT: {},
|
|
87
|
+
},
|
|
88
88
|
},
|
|
89
89
|
SERVER_FORM: undefined,
|
|
90
90
|
SERVER_BODY: {
|
|
91
91
|
id: 'Body',
|
|
92
92
|
properties: {
|
|
93
|
-
DEFAULT: {}
|
|
94
|
-
}
|
|
93
|
+
DEFAULT: {},
|
|
94
|
+
},
|
|
95
95
|
},
|
|
96
96
|
SERVER_HEADERS: {
|
|
97
97
|
id: 'Headers',
|
|
98
98
|
properties: {
|
|
99
|
-
DEFAULT: {}
|
|
100
|
-
}
|
|
99
|
+
DEFAULT: {},
|
|
100
|
+
},
|
|
101
101
|
},
|
|
102
102
|
SERVER_COOKIES: {
|
|
103
103
|
id: 'Cookies',
|
|
104
104
|
properties: {
|
|
105
|
-
DEFAULT: {}
|
|
106
|
-
}
|
|
105
|
+
DEFAULT: {},
|
|
106
|
+
},
|
|
107
107
|
},
|
|
108
108
|
SERVER_PATH_PARAMS: {
|
|
109
109
|
id: 'Params',
|
|
110
110
|
properties: {
|
|
111
|
-
DEFAULT: {}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
111
|
+
DEFAULT: {},
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
114
|
};
|
|
115
115
|
//# sourceMappingURL=decorators-express.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../src/decorator/mapper/maps/internal.ts"],"names":[],"mappings":"AAOA,OAAO,
|
|
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"}
|