@trapi/metadata 0.1.1 → 0.1.5

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.
Files changed (93) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cache/driver.js +1 -2
  3. package/dist/cache/driver.js.map +1 -1
  4. package/dist/cache/utils.d.ts.map +1 -1
  5. package/dist/cache/utils.js +12 -12
  6. package/dist/cache/utils.js.map +1 -1
  7. package/dist/decorator/mapper/index.js +1 -2
  8. package/dist/decorator/mapper/index.js.map +1 -1
  9. package/dist/decorator/representation/index.js +2 -4
  10. package/dist/decorator/representation/index.js.map +1 -1
  11. package/dist/decorator/representation/property/utils.js +4 -3
  12. package/dist/decorator/representation/property/utils.js.map +1 -1
  13. package/dist/generator/controller.js +1 -1
  14. package/dist/generator/controller.js.map +1 -1
  15. package/dist/generator/endpoint.js +0 -3
  16. package/dist/generator/endpoint.js.map +1 -1
  17. package/dist/generator/index.js +3 -9
  18. package/dist/generator/index.js.map +1 -1
  19. package/dist/generator/method.js +0 -2
  20. package/dist/generator/method.js.map +1 -1
  21. package/dist/generator/parameter.js +1 -9
  22. package/dist/generator/parameter.js.map +1 -1
  23. package/dist/resolver/type-node.js +28 -61
  24. package/dist/resolver/type-node.js.map +1 -1
  25. package/dist/resolver/utils/initializer.d.ts.map +1 -1
  26. package/dist/resolver/utils/initializer.js +2 -1
  27. package/dist/resolver/utils/initializer.js.map +1 -1
  28. package/dist/resolver/utils/validator.js +2 -1
  29. package/dist/resolver/utils/validator.js.map +1 -1
  30. package/dist/utils/generator.js +1 -1
  31. package/dist/utils/generator.js.map +1 -1
  32. package/dist/utils/js-doc.js +1 -1
  33. package/dist/utils/js-doc.js.map +1 -1
  34. package/package.json +18 -12
  35. package/src/cache/driver.ts +0 -97
  36. package/src/cache/index.ts +0 -10
  37. package/src/cache/type.ts +0 -43
  38. package/src/cache/utils.ts +0 -51
  39. package/src/config/index.ts +0 -8
  40. package/src/config/path.ts +0 -29
  41. package/src/decorator/functions.ts +0 -142
  42. package/src/decorator/index.ts +0 -13
  43. package/src/decorator/mapper/index.ts +0 -153
  44. package/src/decorator/mapper/maps/decorators-express.ts +0 -117
  45. package/src/decorator/mapper/maps/internal.ts +0 -95
  46. package/src/decorator/mapper/maps/typescript-rest.ts +0 -150
  47. package/src/decorator/mapper/utils.ts +0 -88
  48. package/src/decorator/representation/index.ts +0 -82
  49. package/src/decorator/representation/property/utils.ts +0 -146
  50. package/src/decorator/type.ts +0 -235
  51. package/src/decorator/utils/index.ts +0 -9
  52. package/src/decorator/utils/node.ts +0 -59
  53. package/src/decorator/utils/validator.ts +0 -104
  54. package/src/generator/controller.ts +0 -65
  55. package/src/generator/endpoint.ts +0 -212
  56. package/src/generator/index.ts +0 -219
  57. package/src/generator/method.ts +0 -198
  58. package/src/generator/parameter.ts +0 -392
  59. package/src/index.ts +0 -13
  60. package/src/resolver/error.ts +0 -38
  61. package/src/resolver/index.ts +0 -11
  62. package/src/resolver/type-node.ts +0 -1287
  63. package/src/resolver/type.ts +0 -257
  64. package/src/resolver/utils/index.ts +0 -9
  65. package/src/resolver/utils/initializer.ts +0 -81
  66. package/src/resolver/utils/validator.ts +0 -144
  67. package/src/type.ts +0 -185
  68. package/src/utils/generator.ts +0 -42
  69. package/src/utils/index.ts +0 -10
  70. package/src/utils/js-doc.ts +0 -125
  71. package/src/utils/validator.ts +0 -43
  72. package/test/data/library/@decorators-express/decorators.ts +0 -7
  73. package/test/data/library/self/api.ts +0 -37
  74. package/test/data/library/type.ts +0 -138
  75. package/test/data/library/typescript-rest/api.ts +0 -366
  76. package/test/data/library/typescript-rest/decorators/index.ts +0 -10
  77. package/test/data/library/typescript-rest/decorators/methods.ts +0 -34
  78. package/test/data/library/typescript-rest/decorators/parameters.ts +0 -62
  79. package/test/data/library/typescript-rest/decorators/services.ts +0 -47
  80. package/test/data/library/typescript-rest/return-types.ts +0 -94
  81. package/test/data/library/utils.ts +0 -7
  82. package/test/jest.config.js +0 -49
  83. package/test/unit/cache.spec.ts +0 -48
  84. package/test/unit/decorator/mapper/index.spec.ts +0 -83
  85. package/test/unit/decorator/representation/index.spec.ts +0 -102
  86. package/test/unit/decorator/utils/node.spec.ts +0 -47
  87. package/test/unit/library/typescript-rest.spec.ts +0 -342
  88. package/test/unit/resolver/type.spec.ts +0 -134
  89. package/test/unit/utils/generator.spec.ts +0 -41
  90. package/test/unit/utils/js-doc.spec.ts +0 -95
  91. package/tsconfig.build.json +0 -11
  92. package/tsconfig.json +0 -9
  93. package/writable/.gitignore +0 -3
@@ -1,97 +0,0 @@
1
- /*
2
- * Copyright (c) 2021.
3
- * Author Peter Placzek (tada5hi)
4
- * For the full copyright and license information,
5
- * view the LICENSE file that was distributed with this source code.
6
- */
7
-
8
- import {Cache} from "./type";
9
- import {buildCacheConfig, buildFileHash} from "./utils";
10
- import fs from "fs";
11
- import * as glob from "glob";
12
- import path from "path";
13
-
14
- export class CacheDriver {
15
- private readonly config: Cache.Config;
16
-
17
- constructor(config: string | boolean | Partial<Cache.Config>) {
18
- this.config = buildCacheConfig(config);
19
- }
20
-
21
- // -------------------------------------------------------------------------
22
-
23
- public save(data: Cache.Data): string | undefined {
24
- if (!this.config.enabled) {
25
- return undefined;
26
- }
27
-
28
- const filePath: string = this.buildFilePath(undefined, data.sourceFilesSize);
29
-
30
- fs.writeFileSync(filePath, JSON.stringify(data));
31
-
32
- return filePath;
33
- }
34
-
35
- public get(sourceFilesSize: number): Cache.Data | undefined {
36
- if (!this.config.enabled) {
37
- return undefined;
38
- }
39
-
40
- this.clear();
41
-
42
- const filePath: string = this.buildFilePath(undefined, sourceFilesSize);
43
-
44
- try {
45
- const buffer: Buffer = fs.readFileSync(filePath);
46
-
47
- const content: string = buffer.toString('utf-8');
48
-
49
- // todo: maybe add shape validation here :)
50
- const cache: Cache.Data | undefined = JSON.parse(content) as Cache.Data;
51
-
52
- if (typeof cache === 'undefined' || cache.sourceFilesSize !== sourceFilesSize) {
53
- return undefined;
54
- }
55
-
56
- return cache;
57
- } catch (e) {
58
- /* istanbul ignore next */
59
- return undefined;
60
- }
61
- }
62
-
63
- // -------------------------------------------------------------------------
64
-
65
- /**
66
- * At a 10% chance, clear all cache files :)
67
- */
68
-
69
- /* istanbul ignore next */
70
- public clear(): void {
71
- if (!this.config.enabled || !this.config.clearAtRandom) {
72
- return;
73
- }
74
-
75
- const rand: number = Math.floor(Math.random() * 100) + 1;
76
- if (rand > 10) {
77
- return;
78
- }
79
-
80
- const files: string[] = glob.sync(this.buildFilePath('**'));
81
- files.map(file => fs.unlinkSync(file));
82
- }
83
-
84
- // -------------------------------------------------------------------------
85
-
86
- private buildFilePath(hash?: string, sourceFilesSize?: number): string {
87
- return path.join(this.config.directoryPath, this.buildFileName(hash, sourceFilesSize));
88
- }
89
-
90
- private buildFileName(hash?: string, sourceFilesSize?: number): string {
91
- if (typeof this.config.fileName === 'string') {
92
- return this.config.fileName;
93
- } else {
94
- return `.swagger-${hash ?? buildFileHash(sourceFilesSize)}.json`;
95
- }
96
- }
97
- }
@@ -1,10 +0,0 @@
1
- /*
2
- * Copyright (c) 2021.
3
- * Author Peter Placzek (tada5hi)
4
- * For the full copyright and license information,
5
- * view the LICENSE file that was distributed with this source code.
6
- */
7
-
8
- export * from './driver';
9
- export * from './type';
10
- export * from './utils';
package/src/cache/type.ts DELETED
@@ -1,43 +0,0 @@
1
- /*
2
- * Copyright (c) 2021.
3
- * Author Peter Placzek (tada5hi)
4
- * For the full copyright and license information,
5
- * view the LICENSE file that was distributed with this source code.
6
- */
7
-
8
- import {GeneratorOutput} from "../type";
9
-
10
- export namespace Cache {
11
- export interface Config {
12
- /**
13
- * Specify if the cache driver should be enabled.
14
- *
15
- * Default: false
16
- * */
17
- enabled: boolean,
18
- /**
19
- * Directory relative or absolute path.
20
- *
21
- * Default: process.cwd()
22
- */
23
- directoryPath: string,
24
- /**
25
- * Specify the cache file name.
26
- *
27
- * Default: metadata-{hash}.json
28
- */
29
- fileName?: string,
30
-
31
- /**
32
- * The cache file(s) will be cleared at a 10% percent change
33
- * each time.
34
- *
35
- * Default: true
36
- */
37
- clearAtRandom: boolean
38
- }
39
-
40
- export type Data = {
41
- sourceFilesSize: number;
42
- } & GeneratorOutput;
43
- }
@@ -1,51 +0,0 @@
1
- /*
2
- * Copyright (c) 2021.
3
- * Author Peter Placzek (tada5hi)
4
- * For the full copyright and license information,
5
- * view the LICENSE file that was distributed with this source code.
6
- */
7
-
8
- import {Cache} from "./type";
9
- import path from "path";
10
- import crypto from "crypto";
11
-
12
- export function buildCacheConfig(config?: string | boolean | Partial<Cache.Config>) : Cache.Config {
13
- if(typeof config === 'string') {
14
- config = {
15
- enabled: true,
16
- directoryPath: config
17
- }
18
- }
19
-
20
- if(typeof config === 'boolean') {
21
- config = {
22
- enabled: config
23
- }
24
- }
25
-
26
- config ??= {};
27
-
28
- let data : Cache.Config = {
29
- directoryPath: "",
30
- enabled: false,
31
- clearAtRandom: config.clearAtRandom ?? true
32
- };
33
-
34
- data.enabled = config.enabled ?? false;
35
- data.fileName = config.fileName;
36
- data.directoryPath = typeof config.directoryPath === 'string' ?
37
- path.isAbsolute(config.directoryPath) ? config.directoryPath : path.join(process.cwd(), config.directoryPath) :
38
- process.cwd();
39
-
40
- return data;
41
- }
42
-
43
- export function buildFileHash(sourceFilesSize?: number): string {
44
- const hash = crypto.createHash('sha256');
45
-
46
- const strSize: string = (sourceFilesSize ?? 0).toString();
47
-
48
- hash.update(strSize);
49
-
50
- return hash.digest('hex');
51
- }
@@ -1,8 +0,0 @@
1
- /*
2
- * Copyright (c) 2021.
3
- * Author Peter Placzek (tada5hi)
4
- * For the full copyright and license information,
5
- * view the LICENSE file that was distributed with this source code.
6
- */
7
-
8
- export * from './path';
@@ -1,29 +0,0 @@
1
- /*
2
- * Copyright (c) 2021.
3
- * Author Peter Placzek (tada5hi)
4
- * For the full copyright and license information,
5
- * view the LICENSE file that was distributed with this source code.
6
- */
7
-
8
- import path from "path";
9
-
10
- let writableDirPath : string | undefined;
11
- let rootDirPath : string | undefined;
12
-
13
- export function getWritableDirPath() {
14
- if(typeof writableDirPath !== 'undefined') {
15
- return writableDirPath;
16
- }
17
-
18
- writableDirPath = path.join(getRootDirPath(), './writable');
19
- return writableDirPath;
20
- }
21
-
22
- export function getRootDirPath() {
23
- if(typeof rootDirPath !== 'undefined') {
24
- return rootDirPath;
25
- }
26
-
27
- rootDirPath = path.resolve(__dirname, '../../');
28
- return rootDirPath;
29
- }
@@ -1,142 +0,0 @@
1
- /*
2
- * Copyright (c) 2021.
3
- * Author Peter Placzek (tada5hi)
4
- * For the full copyright and license information,
5
- * view the LICENSE file that was distributed with this source code.
6
- */
7
-
8
- 'use strict';
9
-
10
- /**
11
- * Document the method or class comsumes property in generated swagger docs
12
- */
13
- export function RequestConsumes(...values: Array<string | string[]>): any {
14
- return () => { return; };
15
- }
16
-
17
- /**
18
- *
19
- *
20
- *
21
- * @param key
22
- * @constructor
23
- */
24
- export function RequestFileParam(key: string) : any {
25
- return () => { return; };
26
- }
27
-
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
- export function ResponseDescription<T>(name: string | number, description?: string, example?: T): any {
52
- return () => { return; };
53
- }
54
-
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
- export function ResponseExample<T>(example: T): any {
73
- return () => { return; };
74
- }
75
-
76
- /**
77
- * Document the method or class produces property in generated swagger docs
78
- */
79
- export function ResponseProduces(...values: string[]): any {
80
- return () => { return; };
81
- }
82
-
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
- export function SwaggerTags(...values: string[]): any {
98
- return () => { return; };
99
- }
100
-
101
- /**
102
- * Document the method or class produces property in generated swagger docs.
103
- */
104
- export function SwaggerHidden(): any {
105
- return () => { return; };
106
- }
107
-
108
- /**
109
- * Document the method or collection of method paths are deprecated and should not be used.
110
- */
111
- export function SwaggerDeprecated() : any {
112
- return () => { return; };
113
- }
114
-
115
- /**
116
- * Document the type of a property or parameter as `integer ($int32)` in generated swagger docs
117
- */
118
- export function IsInt(target: any, propertyKey: string, parameterIndex?: number) {
119
- return;
120
- }
121
-
122
- /**
123
- * Document the type of a property or parameter as `integer ($int64)` in generated swagger docs
124
- */
125
- export function IsLong(target: any, propertyKey: string, parameterIndex?: number) {
126
- return;
127
- }
128
-
129
- /**
130
- * Document the type of a property or parameter as `number ($float)` in generated swagger docs
131
- */
132
- export function IsFloat(target: any, propertyKey: string, parameterIndex?: number) {
133
- return;
134
- }
135
-
136
- /**
137
- * Document the type of a property or parameter as `number ($double)` in generated swagger docs.
138
- * This is the default for `number` types without a specifying decorator.
139
- */
140
- export function IsDouble(target: any, propertyKey: string, parameterIndex?: number) {
141
- return;
142
- }
@@ -1,13 +0,0 @@
1
- /*
2
- * Copyright (c) 2021.
3
- * Author Peter Placzek (tada5hi)
4
- * For the full copyright and license information,
5
- * view the LICENSE file that was distributed with this source code.
6
- */
7
-
8
- export * from './mapper';
9
- export * from './representation';
10
- export * from './utils';
11
- export * from './functions';
12
- export * from './type';
13
- export {getNodeDecorators} from "./utils/node";
@@ -1,153 +0,0 @@
1
- /*
2
- * Copyright (c) 2021.
3
- * Author Peter Placzek (tada5hi)
4
- * For the full copyright and license information,
5
- * view the LICENSE file that was distributed with this source code.
6
- */
7
-
8
- import {Node} from "typescript";
9
- import {hasOwnProperty} from "@trapi/metadata-utils";
10
- import {RepresentationManager} from "../representation";
11
- import {Decorator} from "../type";
12
- import {getDecoratorMap, isMappingTypeIncluded, reduceTypeRepresentationMapping} from "./utils";
13
- import {getNodeDecorators} from "../utils";
14
-
15
- export class DecoratorMapper {
16
- protected mapping : Partial<Decorator.TypeRepresentationMap> = {};
17
-
18
- constructor(
19
- protected config?: Decorator.Config
20
- ) {
21
- this.aggregate();
22
- }
23
-
24
- public setConfig(config?: Decorator.Config) {
25
- this.config = config;
26
- this.aggregate();
27
- }
28
-
29
- /**
30
- * Try to find a matching representation for a given decorator type and decorators or node.
31
- *
32
- * @param type
33
- * @param data
34
- */
35
- public match<T extends Decorator.Type>(
36
- type: T,
37
- data: Decorator.Data[] | Node
38
- ) {
39
- if(!hasOwnProperty(this.mapping, type)) {
40
- return undefined;
41
- }
42
-
43
- const decorators : Decorator.Data[] = Array.isArray(data) ? data : getNodeDecorators(data);
44
-
45
- const representations : Array<Decorator.Representation<T>> = (Array.isArray(this.mapping[type]) ? this.mapping[type] : [this.mapping[type]]) as Array<Decorator.Representation<T>>;
46
- for(let i=0; i<representations.length; i++) {
47
- const items = decorators.filter(decorator => decorator.text === representations[i].id);
48
- if(items.length > 0) {
49
- return new RepresentationManager<T>(
50
- representations[i],
51
- items
52
- );
53
- }
54
- }
55
-
56
- return undefined;
57
- }
58
-
59
- // -------------------------------------------
60
-
61
- private aggregate() : void {
62
- if(typeof this.config === 'undefined') {
63
- this.mapping = {};
64
- return;
65
- }
66
-
67
- const items : Array<Partial<Decorator.TypeRepresentationMap>> = [];
68
-
69
- // mapping - internal
70
- const internalMap = getDecoratorMap('internal');
71
- items.push(
72
- typeof this.config.internal === 'undefined' ?
73
- internalMap :
74
- reduceTypeRepresentationMapping(internalMap, (type) => {
75
- return isMappingTypeIncluded(type, this.config.internal);
76
- })
77
- );
78
-
79
- // mapping - extension
80
- if(typeof this.config.map !== 'undefined') {
81
- items.push(this.config.map);
82
- }
83
-
84
- // mapping - library
85
- if(typeof this.config.library !== 'undefined') {
86
- // check if string or string[]
87
-
88
- if(
89
- typeof this.config.library === 'string' ||
90
- Array.isArray(this.config.library)
91
- ) {
92
- const libraries : string[] = Array.isArray(this.config.library) ?
93
- this.config.library :
94
- [this.config.library];
95
-
96
- items.push(...libraries.map(library => getDecoratorMap(library)));
97
- } else {
98
- // tslint:disable-next-line:forin
99
- for(const key in this.config.library) {
100
- items.push(
101
- reduceTypeRepresentationMapping(getDecoratorMap(key), (type) => {
102
- return isMappingTypeIncluded(type, this.config.library[key]);
103
- })
104
- );
105
- }
106
- }
107
- }
108
-
109
- this.mapping = this.merge(...items);
110
- }
111
-
112
- /**
113
- * Merge decorator type-representation mappings of different libraries together.
114
- *
115
- * @param mappings
116
- * @private
117
- */
118
- private merge(...mappings: Array<Partial<Decorator.TypeRepresentationMap>>) : Partial<Decorator.TypeRepresentationMap> {
119
- const result : Partial<Decorator.TypeRepresentationMap> = {};
120
-
121
- // we need all available mapping keys :)
122
- let keys : Decorator.Type[] = mappings
123
- .map(mapping => Object.keys(mapping))
124
- .reduce(((previousValue, currentValue) => [...previousValue, ...currentValue])) as Decorator.Type[];
125
-
126
- keys = Array.from(new Set(keys));
127
-
128
- for(let i=0; i<keys.length; i++) {
129
- const representations : Array<Decorator.Representation<any>> = [];
130
-
131
- for(let j=0; j<mappings.length; j++) {
132
- if(hasOwnProperty(mappings[j], keys[i])) {
133
- const value : Decorator.Representation<any> | Array<Decorator.Representation<any>> = mappings[j][keys[i]];
134
-
135
- if(typeof value === 'undefined') {
136
- continue;
137
- }
138
-
139
- if(Array.isArray(value)) {
140
- representations.push(...value);
141
- } else {
142
- representations.push(value);
143
- }
144
- }
145
- }
146
-
147
- // @ts-ignore
148
- result[keys[i]] = representations;
149
- }
150
-
151
- return result;
152
- }
153
- }
@@ -1,117 +0,0 @@
1
- /*
2
- * Copyright (c) 2021.
3
- * Author Peter Placzek (tada5hi)
4
- * For the full copyright and license information,
5
- * view the LICENSE file that was distributed with this source code.
6
- */
7
-
8
- import {Decorator} from "../../type";
9
-
10
- export default {
11
- // Class
12
- CLASS_PATH: {
13
- id: 'Controller',
14
- properties: {
15
- DEFAULT: {}
16
- }
17
- },
18
-
19
- // Method
20
- METHOD_PATH: [
21
- {
22
- id: 'All',
23
- properties: {
24
- DEFAULT: {}
25
- }
26
- },
27
- {
28
- id: 'Get',
29
- properties: {
30
- DEFAULT: {}
31
- }
32
- },
33
- {
34
- id: 'Post',
35
- properties: {
36
- DEFAULT: {}
37
- }
38
- },
39
- {
40
- id: 'Put',
41
- properties: {
42
- DEFAULT: {}
43
- }
44
- },
45
- {
46
- id: 'Delete',
47
- properties: {
48
- DEFAULT: {}
49
- }
50
- },
51
- {
52
- id: 'Patch',
53
- properties: {
54
- DEFAULT: {}
55
- }
56
- },
57
- {
58
- id: 'Options',
59
- properties: {
60
- DEFAULT: {}
61
- }
62
- },
63
- {
64
- id: 'Head',
65
- properties: {
66
- DEFAULT: {}
67
- }
68
- }
69
- ],
70
-
71
- // Parameter
72
- SERVER_CONTEXT: [
73
- {
74
- id: 'Request',
75
- properties: {}
76
- },
77
- {
78
- id: 'Response',
79
- properties: {}
80
- },
81
- {
82
- id: 'Next',
83
- properties: {}
84
- },
85
- ],
86
- SERVER_QUERY: {
87
- id: 'Query',
88
- properties: {
89
- DEFAULT: {}
90
- }
91
- },
92
- SERVER_FORM: undefined,
93
- SERVER_BODY: {
94
- id: 'Body',
95
- properties: {
96
- DEFAULT: {}
97
- }
98
- },
99
- SERVER_HEADERS: {
100
- id: 'Headers',
101
- properties: {
102
- DEFAULT: {}
103
- }
104
- },
105
- SERVER_COOKIES: {
106
- id: 'Cookies',
107
- properties: {
108
- DEFAULT: {}
109
- }
110
- },
111
- SERVER_PATH_PARAMS: {
112
- id: 'Params',
113
- properties: {
114
- DEFAULT: {}
115
- }
116
- }
117
- } as Partial<Decorator.TypeRepresentationMap>;