@trapi/metadata 0.4.0 → 1.0.0-alpha.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/README.md +36 -72
- package/dist/cache/driver.d.ts +6 -6
- package/dist/cache/driver.d.ts.map +1 -1
- package/dist/cache/driver.js +27 -45
- package/dist/cache/driver.js.map +1 -1
- package/dist/cache/type.d.ts +31 -32
- package/dist/cache/type.d.ts.map +1 -1
- package/dist/cache/utils.d.ts +3 -3
- package/dist/cache/utils.d.ts.map +1 -1
- package/dist/cache/utils.js +29 -24
- package/dist/cache/utils.js.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.js +1 -1
- package/dist/config/type.d.ts +37 -0
- package/dist/config/type.d.ts.map +1 -0
- package/dist/config/type.js +9 -0
- package/dist/config/type.js.map +1 -0
- package/dist/decorator/constants.d.ts +40 -0
- package/dist/decorator/constants.d.ts.map +1 -0
- package/dist/decorator/constants.js +52 -0
- package/dist/decorator/constants.js.map +1 -0
- package/dist/decorator/index.d.ts +7 -0
- package/dist/decorator/index.d.ts.map +1 -0
- package/dist/decorator/index.js +29 -0
- package/dist/decorator/index.js.map +1 -0
- package/dist/decorator/preset/index.d.ts +3 -0
- package/dist/decorator/preset/index.d.ts.map +1 -0
- package/dist/decorator/preset/index.js +25 -0
- package/dist/decorator/preset/index.js.map +1 -0
- package/dist/decorator/preset/type.d.ts +6 -0
- package/dist/decorator/preset/type.d.ts.map +1 -0
- package/dist/decorator/preset/type.js +9 -0
- package/dist/decorator/preset/type.js.map +1 -0
- package/dist/decorator/preset/utils/check.d.ts +3 -0
- package/dist/decorator/preset/utils/check.d.ts.map +1 -0
- package/dist/decorator/preset/utils/check.js +18 -0
- package/dist/decorator/preset/utils/check.js.map +1 -0
- package/dist/decorator/preset/utils/index.d.ts +4 -0
- package/dist/decorator/preset/utils/index.d.ts.map +1 -0
- package/dist/decorator/preset/utils/index.js +26 -0
- package/dist/decorator/preset/utils/index.js.map +1 -0
- package/dist/decorator/preset/utils/load.d.ts +3 -0
- package/dist/decorator/preset/utils/load.d.ts.map +1 -0
- package/dist/decorator/preset/utils/load.js +48 -0
- package/dist/decorator/preset/utils/load.js.map +1 -0
- package/dist/decorator/preset/utils/normalize.d.ts +2 -0
- package/dist/decorator/preset/utils/normalize.d.ts.map +1 -0
- package/dist/decorator/preset/utils/normalize.js +27 -0
- package/dist/decorator/preset/utils/normalize.js.map +1 -0
- package/dist/decorator/property-manager/index.d.ts +3 -0
- package/dist/decorator/property-manager/index.d.ts.map +1 -0
- package/dist/decorator/property-manager/index.js +25 -0
- package/dist/decorator/property-manager/index.js.map +1 -0
- package/dist/decorator/property-manager/module.d.ts +19 -0
- package/dist/decorator/property-manager/module.d.ts.map +1 -0
- package/dist/decorator/property-manager/module.js +65 -0
- package/dist/decorator/property-manager/module.js.map +1 -0
- package/dist/decorator/property-manager/utils.d.ts +7 -0
- package/dist/decorator/property-manager/utils.d.ts.map +1 -0
- package/dist/decorator/property-manager/utils.js +121 -0
- package/dist/decorator/property-manager/utils.js.map +1 -0
- package/dist/decorator/resolver/index.d.ts +3 -0
- package/dist/decorator/resolver/index.d.ts.map +1 -0
- package/dist/decorator/resolver/index.js +25 -0
- package/dist/decorator/resolver/index.js.map +1 -0
- package/dist/decorator/resolver/module.d.ts +27 -0
- package/dist/decorator/resolver/module.d.ts.map +1 -0
- package/dist/decorator/resolver/module.js +72 -0
- package/dist/decorator/resolver/module.js.map +1 -0
- package/dist/decorator/resolver/type.d.ts +10 -0
- package/dist/decorator/resolver/type.d.ts.map +1 -0
- package/dist/decorator/resolver/type.js +3 -0
- package/dist/decorator/resolver/type.js.map +1 -0
- package/dist/decorator/sets/class.d.ts +7 -0
- package/dist/decorator/sets/class.d.ts.map +1 -0
- package/dist/decorator/sets/class.js +9 -0
- package/dist/decorator/sets/class.js.map +1 -0
- package/dist/decorator/sets/index.d.ts +8 -0
- package/dist/decorator/sets/index.d.ts.map +1 -0
- package/dist/decorator/sets/index.js +29 -0
- package/dist/decorator/sets/index.js.map +1 -0
- package/dist/decorator/sets/method.d.ts +14 -0
- package/dist/decorator/sets/method.d.ts.map +1 -0
- package/dist/decorator/sets/method.js +9 -0
- package/dist/decorator/sets/method.js.map +1 -0
- package/dist/decorator/sets/mixed.d.ts +8 -0
- package/dist/decorator/sets/mixed.d.ts.map +1 -0
- package/dist/decorator/sets/mixed.js +9 -0
- package/dist/decorator/sets/mixed.js.map +1 -0
- package/dist/decorator/sets/parameter.d.ts +21 -0
- package/dist/decorator/sets/parameter.d.ts.map +1 -0
- package/dist/decorator/sets/parameter.js +9 -0
- package/dist/decorator/sets/parameter.js.map +1 -0
- package/dist/decorator/sets/request.d.ts +6 -0
- package/dist/decorator/sets/request.d.ts.map +1 -0
- package/dist/decorator/sets/request.js +9 -0
- package/dist/decorator/sets/request.js.map +1 -0
- package/dist/decorator/sets/response.d.ts +16 -0
- package/dist/decorator/sets/response.d.ts.map +1 -0
- package/dist/decorator/sets/response.js +9 -0
- package/dist/decorator/sets/response.js.map +1 -0
- package/dist/decorator/sets/type.d.ts +4 -0
- package/dist/decorator/sets/type.d.ts.map +1 -0
- package/dist/decorator/sets/type.js +3 -0
- package/dist/decorator/sets/type.js.map +1 -0
- package/dist/decorator/type.d.ts +39 -0
- package/dist/decorator/type.d.ts.map +1 -0
- package/dist/decorator/type.js +9 -0
- package/dist/decorator/type.js.map +1 -0
- package/dist/error/base.d.ts +3 -0
- package/dist/error/base.d.ts.map +1 -0
- package/dist/error/base.js +13 -0
- package/dist/error/base.js.map +1 -0
- package/dist/error/index.d.ts +3 -0
- package/dist/error/index.d.ts.map +1 -0
- package/dist/{errors → error}/index.js +1 -0
- package/dist/error/index.js.map +1 -0
- package/dist/error/parameter-invalid.d.ts +4 -0
- package/dist/error/parameter-invalid.d.ts.map +1 -0
- package/dist/{errors → error}/parameter-invalid.js +2 -1
- package/dist/error/parameter-invalid.js.map +1 -0
- package/dist/generator/{endpoint.d.ts → abstract.d.ts} +9 -8
- package/dist/generator/abstract.d.ts.map +1 -0
- package/dist/generator/{endpoint.js → abstract.js} +26 -25
- package/dist/generator/abstract.js.map +1 -0
- package/dist/generator/controller/index.d.ts +3 -0
- package/dist/generator/controller/index.d.ts.map +1 -0
- package/dist/generator/controller/index.js +25 -0
- package/dist/generator/controller/index.js.map +1 -0
- package/dist/generator/controller/module.d.ts +13 -0
- package/dist/generator/controller/module.d.ts.map +1 -0
- package/dist/generator/{controller.js → controller/module.js} +7 -6
- package/dist/generator/controller/module.js.map +1 -0
- package/dist/generator/controller/type.d.ts +42 -0
- package/dist/generator/controller/type.d.ts.map +1 -0
- package/dist/generator/controller/type.js +3 -0
- package/dist/generator/controller/type.js.map +1 -0
- package/dist/generator/index.d.ts +3 -3
- package/dist/generator/index.d.ts.map +1 -1
- package/dist/generator/index.js +3 -3
- package/dist/generator/index.js.map +1 -1
- package/dist/generator/metadata/index.d.ts +3 -0
- package/dist/generator/metadata/index.d.ts.map +1 -0
- package/dist/generator/metadata/index.js +25 -0
- package/dist/generator/metadata/index.js.map +1 -0
- package/dist/generator/{module.d.ts → metadata/module.d.ts} +10 -9
- package/dist/generator/metadata/module.d.ts.map +1 -0
- package/dist/generator/{module.js → metadata/module.js} +22 -39
- package/dist/generator/metadata/module.js.map +1 -0
- package/dist/generator/metadata/type.d.ts +25 -0
- package/dist/generator/metadata/type.d.ts.map +1 -0
- package/dist/generator/metadata/type.js +3 -0
- package/dist/generator/metadata/type.js.map +1 -0
- package/dist/generator/method/constants.d.ts +11 -0
- package/dist/generator/method/constants.d.ts.map +1 -0
- package/dist/generator/method/constants.js +21 -0
- package/dist/generator/method/constants.js.map +1 -0
- package/dist/generator/method/index.d.ts +4 -0
- package/dist/generator/method/index.d.ts.map +1 -0
- package/dist/generator/method/index.js +26 -0
- package/dist/generator/method/index.js.map +1 -0
- package/dist/generator/{method.d.ts → method/module.d.ts} +6 -7
- package/dist/generator/method/module.d.ts.map +1 -0
- package/dist/generator/{method.js → method/module.js} +69 -44
- package/dist/generator/method/module.js.map +1 -0
- package/dist/generator/method/type.d.ts +30 -0
- package/dist/generator/method/type.d.ts.map +1 -0
- package/dist/generator/method/type.js +9 -0
- package/dist/generator/method/type.js.map +1 -0
- package/dist/generator/parameter/index.d.ts +4 -0
- package/dist/generator/parameter/index.d.ts.map +1 -0
- package/dist/generator/parameter/index.js +26 -0
- package/dist/generator/parameter/index.js.map +1 -0
- package/dist/generator/{parameter.d.ts → parameter/module.d.ts} +4 -4
- package/dist/generator/parameter/module.d.ts.map +1 -0
- package/dist/generator/{parameter.js → parameter/module.js} +70 -63
- package/dist/generator/parameter/module.js.map +1 -0
- package/dist/generator/parameter/type.d.ts +22 -0
- package/dist/generator/parameter/type.d.ts.map +1 -0
- package/dist/generator/parameter/type.js +9 -0
- package/dist/generator/parameter/type.js.map +1 -0
- package/dist/generator/parameter/validator.d.ts +4 -0
- package/dist/generator/parameter/validator.d.ts.map +1 -0
- package/dist/generator/parameter/validator.js +130 -0
- package/dist/generator/parameter/validator.js.map +1 -0
- package/dist/generator/type.d.ts +16 -0
- package/dist/generator/type.d.ts.map +1 -0
- package/dist/generator/type.js +9 -0
- package/dist/generator/type.js.map +1 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/module.d.ts +4 -3
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +20 -2
- package/dist/module.js.map +1 -1
- package/dist/resolver/error.d.ts +8 -0
- package/dist/resolver/error.d.ts.map +1 -0
- package/dist/resolver/error.js +41 -0
- package/dist/resolver/error.js.map +1 -0
- package/dist/resolver/index.d.ts +4 -0
- package/dist/resolver/index.d.ts.map +1 -0
- package/dist/resolver/index.js +26 -0
- package/dist/resolver/index.js.map +1 -0
- package/dist/resolver/module.d.ts +51 -0
- package/dist/resolver/module.d.ts.map +1 -0
- package/dist/resolver/module.js +1081 -0
- package/dist/resolver/module.js.map +1 -0
- package/dist/resolver/type.d.ts +126 -0
- package/dist/resolver/type.d.ts.map +1 -0
- package/dist/resolver/type.js +54 -0
- package/dist/resolver/type.js.map +1 -0
- package/dist/type.d.ts +0 -149
- package/dist/type.d.ts.map +1 -1
- package/dist/type.js +0 -6
- package/dist/type.js.map +1 -1
- package/dist/utils/index.d.ts +6 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +6 -2
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/initializer.d.ts +5 -0
- package/dist/utils/initializer.d.ts.map +1 -0
- package/dist/utils/initializer.js +131 -0
- package/dist/utils/initializer.js.map +1 -0
- package/dist/utils/js-doc.d.ts +8 -0
- package/dist/utils/js-doc.d.ts.map +1 -0
- package/dist/utils/js-doc.js +101 -0
- package/dist/utils/js-doc.js.map +1 -0
- package/dist/utils/node/index.d.ts +3 -0
- package/dist/utils/node/index.d.ts.map +1 -0
- package/dist/utils/node/index.js +25 -0
- package/dist/utils/node/index.js.map +1 -0
- package/dist/utils/node/module.d.ts +10 -0
- package/dist/utils/node/module.d.ts.map +1 -0
- package/dist/utils/node/module.js +52 -0
- package/dist/utils/node/module.js.map +1 -0
- package/dist/utils/node/type.d.ts +6 -0
- package/dist/utils/node/type.d.ts.map +1 -0
- package/dist/utils/node/type.js +9 -0
- package/dist/utils/node/type.js.map +1 -0
- package/dist/utils/{path.d.ts → path-normalize.d.ts} +1 -1
- package/dist/utils/path-normalize.d.ts.map +1 -0
- package/dist/utils/{path.js → path-normalize.js} +1 -1
- package/dist/utils/path-normalize.js.map +1 -0
- package/dist/utils/source-files.d.ts +3 -0
- package/dist/utils/source-files.d.ts.map +1 -0
- package/dist/utils/source-files.js +32 -0
- package/dist/utils/source-files.js.map +1 -0
- package/dist/utils/tsconfig/index.d.ts +3 -0
- package/dist/utils/tsconfig/index.d.ts.map +1 -0
- package/dist/utils/tsconfig/index.js +25 -0
- package/dist/utils/tsconfig/index.js.map +1 -0
- package/dist/utils/tsconfig/module.d.ts +4 -0
- package/dist/utils/tsconfig/module.d.ts.map +1 -0
- package/dist/utils/tsconfig/module.js +54 -0
- package/dist/utils/tsconfig/module.js.map +1 -0
- package/dist/utils/tsconfig/type.d.ts +10 -0
- package/dist/utils/tsconfig/type.d.ts.map +1 -0
- package/dist/utils/tsconfig/type.js +9 -0
- package/dist/utils/tsconfig/type.js.map +1 -0
- package/package.json +11 -12
- package/dist/config/path.d.ts +0 -3
- package/dist/config/path.d.ts.map +0 -1
- package/dist/config/path.js +0 -32
- package/dist/config/path.js.map +0 -1
- package/dist/errors/index.d.ts +0 -2
- package/dist/errors/index.d.ts.map +0 -1
- package/dist/errors/index.js.map +0 -1
- package/dist/errors/parameter-invalid.d.ts +0 -3
- package/dist/errors/parameter-invalid.d.ts.map +0 -1
- package/dist/errors/parameter-invalid.js.map +0 -1
- package/dist/generator/controller.d.ts +0 -13
- package/dist/generator/controller.d.ts.map +0 -1
- package/dist/generator/controller.js.map +0 -1
- package/dist/generator/endpoint.d.ts.map +0 -1
- package/dist/generator/endpoint.js.map +0 -1
- package/dist/generator/method.d.ts.map +0 -1
- package/dist/generator/method.js.map +0 -1
- package/dist/generator/module.d.ts.map +0 -1
- package/dist/generator/module.js.map +0 -1
- package/dist/generator/parameter.d.ts.map +0 -1
- package/dist/generator/parameter.js.map +0 -1
- package/dist/generator/utils.d.ts +0 -5
- package/dist/generator/utils.d.ts.map +0 -1
- package/dist/generator/utils.js +0 -18
- package/dist/generator/utils.js.map +0 -1
- package/dist/utils/path.d.ts.map +0 -1
- package/dist/utils/path.js.map +0 -1
- package/dist/utils/typescript.d.ts +0 -8
- package/dist/utils/typescript.d.ts.map +0 -1
- package/dist/utils/typescript.js +0 -41
- package/dist/utils/typescript.js.map +0 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2023.
|
|
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("./module"), exports);
|
|
24
|
+
__exportStar(require("./type"), exports);
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorator/resolver/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,2CAAyB;AACzB,yCAAuB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Node } from 'typescript';
|
|
2
|
+
import { DecoratorPropertyManager } from '../property-manager';
|
|
3
|
+
import type { DecoratorID } from '../constants';
|
|
4
|
+
import type { DecoratorConfig } from '../type';
|
|
5
|
+
import type { NodeDecorator } from '../../utils';
|
|
6
|
+
import type { DecoratorResolverMap } from './type';
|
|
7
|
+
export declare class DecoratorResolver {
|
|
8
|
+
protected items: DecoratorConfig[];
|
|
9
|
+
protected map: DecoratorResolverMap;
|
|
10
|
+
constructor();
|
|
11
|
+
/**
|
|
12
|
+
* Try to find a matching representation for a given decorator type and decorators or node.
|
|
13
|
+
*
|
|
14
|
+
* @param id
|
|
15
|
+
* @param data
|
|
16
|
+
*/
|
|
17
|
+
match<T extends `${DecoratorID}`>(id: T, data: NodeDecorator[] | Node): DecoratorPropertyManager<T> | undefined;
|
|
18
|
+
apply(items: DecoratorConfig[]): void;
|
|
19
|
+
applyPreset(name: string): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Aggregate/group different annotation sources.
|
|
22
|
+
*
|
|
23
|
+
* @private
|
|
24
|
+
*/
|
|
25
|
+
private aggregate;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../src/decorator/resolver/module.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EACR,eAAe,EAClB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAEnD,qBAAa,iBAAiB;IAC1B,SAAS,CAAC,KAAK,EAAG,eAAe,EAAE,CAAC;IAEpC,SAAS,CAAC,GAAG,EAAE,oBAAoB,CAAC;;IAWpC;;;;;OAKG;IACI,KAAK,CAAC,CAAC,SAAS,GAAG,WAAW,EAAE,EACnC,EAAE,EAAE,CAAC,EACL,IAAI,EAAE,aAAa,EAAE,GAAG,IAAI,GAC5B,wBAAwB,CAAC,CAAC,CAAC,GAAG,SAAS;IA4B3C,KAAK,CAAC,KAAK,EAAE,eAAe,EAAE;IAMxB,WAAW,CAAC,IAAI,EAAE,MAAM;IAO9B;;;;OAIG;IACH,OAAO,CAAC,SAAS;CAcpB"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2022-2023.
|
|
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.DecoratorResolver = void 0;
|
|
10
|
+
const property_manager_1 = require("../property-manager");
|
|
11
|
+
const preset_1 = require("../preset");
|
|
12
|
+
const utils_1 = require("../../utils");
|
|
13
|
+
class DecoratorResolver {
|
|
14
|
+
// -------------------------------------------
|
|
15
|
+
constructor() {
|
|
16
|
+
this.items = [];
|
|
17
|
+
this.map = {};
|
|
18
|
+
}
|
|
19
|
+
// -------------------------------------------
|
|
20
|
+
/**
|
|
21
|
+
* Try to find a matching representation for a given decorator type and decorators or node.
|
|
22
|
+
*
|
|
23
|
+
* @param id
|
|
24
|
+
* @param data
|
|
25
|
+
*/
|
|
26
|
+
match(id, data) {
|
|
27
|
+
if (!(0, utils_1.hasOwnProperty)(this.map, id)) {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
const decorators = Array.isArray(data) ?
|
|
31
|
+
data :
|
|
32
|
+
(0, utils_1.getNodeDecorators)(data);
|
|
33
|
+
if (!(0, utils_1.hasOwnProperty)(this.map, id)) {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
for (let i = 0; i < this.map[id].length; i++) {
|
|
37
|
+
const items = decorators.filter((decorator) => decorator.text === this.map[id][i].name);
|
|
38
|
+
if (items.length > 0) {
|
|
39
|
+
return new property_manager_1.DecoratorPropertyManager(this.map[id][i], items);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
// -------------------------------------------
|
|
45
|
+
apply(items) {
|
|
46
|
+
this.items.push(...items);
|
|
47
|
+
this.aggregate();
|
|
48
|
+
}
|
|
49
|
+
async applyPreset(name) {
|
|
50
|
+
const items = await (0, preset_1.loadPreset)(name);
|
|
51
|
+
this.items.push(...items);
|
|
52
|
+
this.aggregate();
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Aggregate/group different annotation sources.
|
|
56
|
+
*
|
|
57
|
+
* @private
|
|
58
|
+
*/
|
|
59
|
+
aggregate() {
|
|
60
|
+
const result = {};
|
|
61
|
+
for (let i = 0; i < this.items.length; i++) {
|
|
62
|
+
const mapping = this.items[i];
|
|
63
|
+
if (!Object.prototype.hasOwnProperty.call(result, mapping.id)) {
|
|
64
|
+
result[mapping.id] = [];
|
|
65
|
+
}
|
|
66
|
+
result[mapping.id].push(mapping);
|
|
67
|
+
}
|
|
68
|
+
this.map = result;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.DecoratorResolver = DecoratorResolver;
|
|
72
|
+
//# sourceMappingURL=module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../src/decorator/resolver/module.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,0DAA+D;AAE/D,sCAAuC;AAKvC,uCAAgE;AAGhE,MAAa,iBAAiB;IAK1B,8CAA8C;IAE9C;QACI,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;IAClB,CAAC;IAED,8CAA8C;IAE9C;;;;;OAKG;IACI,KAAK,CACR,EAAK,EACL,IAA4B;QAE5B,IAAI,CAAC,IAAA,sBAAc,EAAC,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE;YAC/B,OAAO,SAAS,CAAC;SACpB;QAED,MAAM,UAAU,GAAoB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YACrD,IAAI,CAAC,CAAC;YACN,IAAA,yBAAiB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KAAK,CAAC,CAAC,CAAC,CAAC;YAC9B,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,EAAE;gBAC3D,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC;aAC3B;YAEA,MAAM,CAAC,OAAO,CAAC,EAAE,CAAuB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SAC3D;QAED,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC;IACtB,CAAC;CACJ;AAnFD,8CAmFC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DecoratorID } from '../constants';
|
|
2
|
+
import type { DecoratorConfig } from '../type';
|
|
3
|
+
export type DecoratorResolverMap = {
|
|
4
|
+
[T in `${DecoratorID}`]?: DecoratorConfig<T>[];
|
|
5
|
+
};
|
|
6
|
+
export type DecoratorResolverContext = {
|
|
7
|
+
preset?: string;
|
|
8
|
+
decorators?: DecoratorConfig[];
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/decorator/resolver/type.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,MAAM,oBAAoB,GAAG;KAC9B,CAAC,IAAI,GAAG,WAAW,EAAE,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE;CACjD,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,eAAe,EAAE,CAAA;CACjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../../src/decorator/resolver/type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DecoratorID } from '../constants';
|
|
2
|
+
import type { DecoratorPropertyValueSchema } from './type';
|
|
3
|
+
export type DecoratorSwaggerTagsProperties = DecoratorPropertyValueSchema<string[]>;
|
|
4
|
+
export type DecoratorClassPathProperties = DecoratorPropertyValueSchema<string>;
|
|
5
|
+
export type DecoratorClassSetID = `${DecoratorID.SWAGGER_TAGS}` | `${DecoratorID.CLASS_PATH}`;
|
|
6
|
+
export type DecoratorClassSetProperties<T extends DecoratorClassSetID> = T extends `${DecoratorID.SWAGGER_TAGS}` ? DecoratorSwaggerTagsProperties : T extends `${DecoratorID.CLASS_PATH}` ? DecoratorClassPathProperties : never;
|
|
7
|
+
//# sourceMappingURL=class.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class.d.ts","sourceRoot":"","sources":["../../../src/decorator/sets/class.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAE3D,MAAM,MAAM,8BAA8B,GAAG,4BAA4B,CAAC,MAAM,EAAE,CAAC,CAAC;AACpF,MAAM,MAAM,4BAA4B,GAAG,4BAA4B,CAAC,MAAM,CAAC,CAAC;AAEhF,MAAM,MAAM,mBAAmB,GAAG,GAAG,WAAW,CAAC,YAAY,EAAE,GAAG,GAAG,WAAW,CAAC,UAAU,EAAE,CAAC;AAC9F,MAAM,MAAM,2BAA2B,CAAC,CAAC,SAAS,mBAAmB,IACjE,CAAC,SAAS,GAAG,WAAW,CAAC,YAAY,EAAE,GACnC,8BAA8B,GAC9B,CAAC,SAAS,GAAG,WAAW,CAAC,UAAU,EAAE,GACjC,4BAA4B,GAC5B,KAAK,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2023.
|
|
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
|
+
//# sourceMappingURL=class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class.js","sourceRoot":"","sources":["../../../src/decorator/sets/class.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/decorator/sets/index.ts"],"names":[],"mappings":"AAOA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2023.
|
|
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("./class"), exports);
|
|
24
|
+
__exportStar(require("./method"), exports);
|
|
25
|
+
__exportStar(require("./mixed"), exports);
|
|
26
|
+
__exportStar(require("./parameter"), exports);
|
|
27
|
+
__exportStar(require("./request"), exports);
|
|
28
|
+
__exportStar(require("./response"), exports);
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorator/sets/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,4CAA0B;AAC1B,6CAA2B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DecoratorID } from '../constants';
|
|
2
|
+
import type { DecoratorPropertyValueSchema } from './type';
|
|
3
|
+
export type DecoratorMethodPathProperties = DecoratorPropertyValueSchema<string | undefined>;
|
|
4
|
+
export type DecoratorAllProperties = DecoratorPropertyValueSchema<string | undefined>;
|
|
5
|
+
export type DecoratorDeleteProperties = DecoratorPropertyValueSchema<string | undefined>;
|
|
6
|
+
export type DecoratorHeadProperties = DecoratorPropertyValueSchema<string | undefined>;
|
|
7
|
+
export type DecoratorOptionsProperties = DecoratorPropertyValueSchema<string | undefined>;
|
|
8
|
+
export type DecoratorGetProperties = DecoratorPropertyValueSchema<string | undefined>;
|
|
9
|
+
export type DecoratorPostProperties = DecoratorPropertyValueSchema<string | undefined>;
|
|
10
|
+
export type DecoratorPutProperties = DecoratorPropertyValueSchema<string | undefined>;
|
|
11
|
+
export type DecoratorPatchProperties = DecoratorPropertyValueSchema<string | undefined>;
|
|
12
|
+
export type DecoratorMethodSetID = `${DecoratorID.ALL}` | `${DecoratorID.DELETE}` | `${DecoratorID.HEAD}` | `${DecoratorID.PATCH}` | `${DecoratorID.METHOD_PATH}` | `${DecoratorID.POST}` | `${DecoratorID.PUT}` | `${DecoratorID.OPTIONS}`;
|
|
13
|
+
export type DecoratorMethodSetProperties<T extends DecoratorMethodSetID> = T extends `${DecoratorID.ALL}` ? DecoratorAllProperties : T extends `${DecoratorID.DELETE}` ? DecoratorDeleteProperties : T extends `${DecoratorID.GET}` ? DecoratorGetProperties : T extends `${DecoratorID.HEAD}` ? DecoratorHeadProperties : T extends `${DecoratorID.OPTIONS}` ? DecoratorOptionsProperties : T extends `${DecoratorID.PATCH}` ? DecoratorPatchProperties : T extends `${DecoratorID.METHOD_PATH}` ? DecoratorMethodPathProperties : T extends `${DecoratorID.POST}` ? DecoratorPostProperties : T extends `${DecoratorID.PUT}` ? DecoratorPutProperties : never;
|
|
14
|
+
//# sourceMappingURL=method.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"method.d.ts","sourceRoot":"","sources":["../../../src/decorator/sets/method.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAE3D,MAAM,MAAM,6BAA6B,GAAG,4BAA4B,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;AAC7F,MAAM,MAAM,sBAAsB,GAAG,4BAA4B,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;AACtF,MAAM,MAAM,yBAAyB,GAAG,4BAA4B,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;AACzF,MAAM,MAAM,uBAAuB,GAAG,4BAA4B,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;AACvF,MAAM,MAAM,0BAA0B,GAAG,4BAA4B,CAAC,MAAM,GA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AAS,GAAG,WAAW,CAAC,GAAG,EAAE,GAC1B,sBAAsB,GACtB,KAAK,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2023.
|
|
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
|
+
//# sourceMappingURL=method.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"method.js","sourceRoot":"","sources":["../../../src/decorator/sets/method.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DecoratorID } from '../constants';
|
|
2
|
+
export type DecoratorExtensionProperties = {
|
|
3
|
+
key: string;
|
|
4
|
+
value: unknown | unknown[];
|
|
5
|
+
};
|
|
6
|
+
export type DecoratorMixedSetID = `${DecoratorID.DEPRECATED}` | `${DecoratorID.HIDDEN}` | `${DecoratorID.EXTENSION}`;
|
|
7
|
+
export type DecoratorMixedSetProperties<T extends DecoratorMixedSetID> = T extends `${DecoratorID.EXTENSION}` ? DecoratorExtensionProperties : never;
|
|
8
|
+
//# sourceMappingURL=mixed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mixed.d.ts","sourceRoot":"","sources":["../../../src/decorator/sets/mixed.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,MAAM,4BAA4B,GAAG;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,CAAA;CAC7B,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,GAAG,WAAW,CAAC,UAAU,EAAE,GACzD,GAAG,WAAW,CAAC,MAAM,EAAE,GACvB,GAAG,WAAW,CAAC,SAAS,EAAE,CAAC;AAE/B,MAAM,MAAM,2BAA2B,CAAC,CAAC,SAAS,mBAAmB,IAC7D,CAAC,SAAS,GAAG,WAAW,CAAC,SAAS,EAAE,GAChC,4BAA4B,GAC5B,KAAK,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2023.
|
|
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
|
+
//# sourceMappingURL=mixed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mixed.js","sourceRoot":"","sources":["../../../src/decorator/sets/mixed.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { DecoratorID } from '../constants';
|
|
2
|
+
import type { DecoratorPropertyValueSchema } from './type';
|
|
3
|
+
export type DecoratorParamProperties = DecoratorPropertyValueSchema<string>;
|
|
4
|
+
export type DecoratorParamsProperties = DecoratorPropertyValueSchema<string | undefined>;
|
|
5
|
+
export type DecoratorQueryProperties = {
|
|
6
|
+
value?: string;
|
|
7
|
+
options?: Record<string, any>;
|
|
8
|
+
};
|
|
9
|
+
export type DecoratorFormProperties = DecoratorPropertyValueSchema<string>;
|
|
10
|
+
export type DecoratorBodyProperties = DecoratorPropertyValueSchema<string | undefined>;
|
|
11
|
+
export type DecoratorHeaderProperties = DecoratorPropertyValueSchema<string>;
|
|
12
|
+
export type DecoratorHeadersProperties = DecoratorPropertyValueSchema<string | undefined>;
|
|
13
|
+
export type DecoratorCookieProperties = DecoratorPropertyValueSchema<string>;
|
|
14
|
+
export type DecoratorCookiesProperties = DecoratorPropertyValueSchema<string | undefined>;
|
|
15
|
+
export type DecoratorPathParamProperties = DecoratorPropertyValueSchema<string>;
|
|
16
|
+
export type DecoratorPathParamsProperties = DecoratorPropertyValueSchema<string | undefined>;
|
|
17
|
+
export type DecoratorFileProperties = DecoratorPropertyValueSchema<string>;
|
|
18
|
+
export type DecoratorFilesParamProperties = DecoratorPropertyValueSchema<string | undefined>;
|
|
19
|
+
export type DecoratorParameterSetID = `${DecoratorID.IS_INT}` | `${DecoratorID.IS_LONG}` | `${DecoratorID.IS_FLOAT}` | `${DecoratorID.IS_DOUBLE}` | `${DecoratorID.PARAM}` | `${DecoratorID.PARAMS}` | `${DecoratorID.QUERY}` | `${DecoratorID.FORM}` | `${DecoratorID.BODY}` | `${DecoratorID.HEADER}` | `${DecoratorID.HEADERS}` | `${DecoratorID.COOKIE}` | `${DecoratorID.COOKIES}` | `${DecoratorID.PATH_PARAM}` | `${DecoratorID.PATH_PARAMS}` | `${DecoratorID.FILE_PARAM}` | `${DecoratorID.FILES_PARAM}`;
|
|
20
|
+
export type DecoratorParameterSetProperties<T extends `${DecoratorID}`> = T extends `${DecoratorID.PARAM}` ? DecoratorParamProperties : T extends `${DecoratorID.PARAMS}` ? DecoratorParamsProperties : T extends `${DecoratorID.QUERY}` ? DecoratorQueryProperties : T extends `${DecoratorID.FORM}` ? DecoratorFormProperties : T extends `${DecoratorID.BODY}` ? DecoratorBodyProperties : T extends `${DecoratorID.HEADER}` ? DecoratorHeaderProperties : T extends `${DecoratorID.HEADERS}` ? DecoratorHeadersProperties : T extends `${DecoratorID.COOKIE}` ? DecoratorCookieProperties : T extends `${DecoratorID.COOKIES}` ? DecoratorCookiesProperties : T extends `${DecoratorID.PATH_PARAM}` ? DecoratorPathParamProperties : T extends `${DecoratorID.PATH_PARAMS}` ? DecoratorPathParamsProperties : T extends `${DecoratorID.FILE_PARAM}` ? DecoratorFileProperties : T extends `${DecoratorID.FILES_PARAM}` ? DecoratorFilesParamProperties : never;
|
|
21
|
+
//# sourceMappingURL=parameter.d.ts.map
|
|
@@ -0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SAAS,GAAG,WAAW,CAAC,OAAO,EAAE,GAC9B,0BAA0B,GAC1B,CAAC,SAAS,GAAG,WAAW,CAAC,UAAU,EAAE,GACjC,4BAA4B,GAC5B,CAAC,SAAS,GAAG,WAAW,CAAC,WAAW,EAAE,GAClC,6BAA6B,GAC7B,CAAC,SAAS,GAAG,WAAW,CAAC,UAAU,EAAE,GACjC,uBAAuB,GACvB,CAAC,SAAS,GAAG,WAAW,CAAC,WAAW,EAAE,GAClC,6BAA6B,GAC7B,KAAK,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2023.
|
|
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
|
+
//# sourceMappingURL=parameter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parameter.js","sourceRoot":"","sources":["../../../src/decorator/sets/parameter.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DecoratorID } from '../constants';
|
|
2
|
+
import type { DecoratorPropertyValueSchema } from './type';
|
|
3
|
+
export type DecoratorRequestConsumesProperties = DecoratorPropertyValueSchema<string[]>;
|
|
4
|
+
export type DecoratorRequestSetID = `${DecoratorID.REQUEST_ACCEPT}` | `${DecoratorID.REQUEST_CONSUMES}`;
|
|
5
|
+
export type DecoratorRequestSetProperties<T extends DecoratorRequestSetID> = T extends `${DecoratorID.REQUEST_ACCEPT}` ? never : T extends `${DecoratorID.REQUEST_CONSUMES}` ? DecoratorRequestConsumesProperties : never;
|
|
6
|
+
//# sourceMappingURL=request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/decorator/sets/request.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAE3D,MAAM,MAAM,kCAAkC,GAAG,4BAA4B,CAAC,MAAM,EAAE,CAAC,CAAC;AAExF,MAAM,MAAM,qBAAqB,GAAG,GAAG,WAAW,CAAC,cAAc,EAAE,GAC/D,GAAG,WAAW,CAAC,gBAAgB,EAAE,CAAC;AAEtC,MAAM,MAAM,6BAA6B,CAAC,CAAC,SAAS,qBAAqB,IACrE,CAAC,SAAS,GAAG,WAAW,CAAC,cAAc,EAAE,GACrC,KAAK,GACL,CAAC,SAAS,GAAG,WAAW,CAAC,gBAAgB,EAAE,GACvC,kCAAkC,GAClC,KAAK,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2023.
|
|
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
|
+
//# sourceMappingURL=request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/decorator/sets/request.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DecoratorID } from '../constants';
|
|
2
|
+
import type { DecoratorPropertyValueSchema } from './type';
|
|
3
|
+
export type DecoratorResponseDescriptionProperties = {
|
|
4
|
+
type: unknown;
|
|
5
|
+
statusCode: number | string;
|
|
6
|
+
description: string;
|
|
7
|
+
payload: unknown | unknown[];
|
|
8
|
+
};
|
|
9
|
+
export type DecoratorResponseExampleProperties = {
|
|
10
|
+
type: unknown;
|
|
11
|
+
payload: unknown | unknown[];
|
|
12
|
+
};
|
|
13
|
+
export type DecoratorResponseProducesProperties = DecoratorPropertyValueSchema<string[]>;
|
|
14
|
+
export type DecoratorResponseSetID = `${DecoratorID.RESPONSE_DESCRIPTION}` | `${DecoratorID.RESPONSE_EXAMPLE}` | `${DecoratorID.RESPONSE_PRODUCES}`;
|
|
15
|
+
export type DecoratorResponseSetProperties<T extends DecoratorResponseSetID> = T extends `${DecoratorID.RESPONSE_DESCRIPTION}` ? DecoratorResponseDescriptionProperties : T extends `${DecoratorID.RESPONSE_EXAMPLE}` ? DecoratorResponseExampleProperties : T extends `${DecoratorID.RESPONSE_PRODUCES}` ? DecoratorResponseProducesProperties : never;
|
|
16
|
+
//# sourceMappingURL=response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../src/decorator/sets/response.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAE3D,MAAM,MAAM,sCAAsC,GAAG;IACjD,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,GAAG,OAAO,EAAE,CAAA;CAC/B,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG;IAC7C,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,OAAO,GAAG,OAAO,EAAE,CAAA;CAC/B,CAAC;AACF,MAAM,MAAM,mCAAmC,GAAG,4BAA4B,CAAC,MAAM,EAAE,CAAC,CAAC;AAEzF,MAAM,MAAM,sBAAsB,GAAG,GAAG,WAAW,CAAC,oBAAoB,EAAE,GACtE,GAAG,WAAW,CAAC,gBAAgB,EAAE,GACjC,GAAG,WAAW,CAAC,iBAAiB,EAAE,CAAC;AACvC,MAAM,MAAM,8BAA8B,CAAC,CAAC,SAAS,sBAAsB,IACvE,CAAC,SAAS,GAAG,WAAW,CAAC,oBAAoB,EAAE,GAC3C,sCAAsC,GACtC,CAAC,SAAS,GAAG,WAAW,CAAC,gBAAgB,EAAE,GACvC,kCAAkC,GAClC,CAAC,SAAS,GAAG,WAAW,CAAC,iBAAiB,EAAE,GACxC,mCAAmC,GACnC,KAAK,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2023.
|
|
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
|
+
//# sourceMappingURL=response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/decorator/sets/response.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/decorator/sets/type.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,4BAA4B,CAAC,CAAC,IAAI;IAC1C,KAAK,EAAE,CAAC,CAAA;CACX,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../../src/decorator/sets/type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { DecoratorID } from './constants';
|
|
2
|
+
import type { DecoratorClassSetID, DecoratorClassSetProperties, DecoratorMethodSetID, DecoratorMethodSetProperties, DecoratorMixedSetID, DecoratorMixedSetProperties, DecoratorParameterSetID, DecoratorParameterSetProperties, DecoratorRequestSetID, DecoratorRequestSetProperties, DecoratorResponseSetID, DecoratorResponseSetProperties } from './sets';
|
|
3
|
+
export type DecoratorProperties<T extends `${DecoratorID}`> = T extends DecoratorClassSetID ? DecoratorClassSetProperties<T> : T extends DecoratorMethodSetID ? DecoratorMethodSetProperties<T> : T extends DecoratorMixedSetID ? DecoratorMixedSetProperties<T> : T extends DecoratorParameterSetID ? DecoratorParameterSetProperties<T> : T extends DecoratorRequestSetID ? DecoratorRequestSetProperties<T> : T extends DecoratorResponseSetID ? DecoratorResponseSetProperties<T> : never;
|
|
4
|
+
export type DecoratorPropertyStrategy = 'merge' | 'none' | ((...items: unknown[] | unknown[][]) => unknown | unknown[]);
|
|
5
|
+
export type DecoratorPropertyConfig = {
|
|
6
|
+
/**
|
|
7
|
+
* Default: 'element'
|
|
8
|
+
*/
|
|
9
|
+
type?: 'element' | 'array';
|
|
10
|
+
/**
|
|
11
|
+
* Default: false
|
|
12
|
+
*/
|
|
13
|
+
isType?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Default: 'argument'
|
|
16
|
+
*/
|
|
17
|
+
srcArgumentType?: 'argument' | 'typeArgument';
|
|
18
|
+
/**
|
|
19
|
+
* Default: 0
|
|
20
|
+
*/
|
|
21
|
+
srcPosition?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Default: undefined
|
|
24
|
+
*/
|
|
25
|
+
srcAmount?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Default: 'none'
|
|
28
|
+
*/
|
|
29
|
+
srcStrategy?: DecoratorPropertyStrategy;
|
|
30
|
+
};
|
|
31
|
+
export type DecoratorPropertiesConfig<P extends Record<string, any>> = {
|
|
32
|
+
[K in keyof P]: DecoratorPropertyConfig;
|
|
33
|
+
};
|
|
34
|
+
export type DecoratorConfig<T extends `${DecoratorID}` = `${DecoratorID}`> = {
|
|
35
|
+
id: T;
|
|
36
|
+
name: string;
|
|
37
|
+
properties?: DecoratorPropertiesConfig<DecoratorProperties<T>>;
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
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AC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,CAAC,EAAE,yBAAyB,CAAA;CAC1C,CAAC;AAEF,MAAM,MAAM,yBAAyB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI;KAClE,CAAC,IAAI,MAAM,CAAC,GAAG,uBAAuB;CAC1C,CAAC;AAIF,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,GAAG,WAAW,EAAE,GAAG,GAAG,WAAW,EAAE,IAAI;IACzE,EAAE,EAAE,CAAC,CAAC;IACN,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,yBAAyB,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAA;CACjE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
//# sourceMappingURL=type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../src/decorator/type.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/error/base.ts"],"names":[],"mappings":"AAOA,qBAAa,SAAU,SAAQ,KAAK;CAEnC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2023.
|
|
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.BaseError = void 0;
|
|
10
|
+
class BaseError extends Error {
|
|
11
|
+
}
|
|
12
|
+
exports.BaseError = BaseError;
|
|
13
|
+
//# sourceMappingURL=base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/error/base.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,MAAa,SAAU,SAAQ,KAAK;CAEnC;AAFD,8BAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/error/index.ts"],"names":[],"mappings":"AAOA,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC"}
|
|
@@ -20,5 +20,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
20
20
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
__exportStar(require("./base"), exports);
|
|
23
24
|
__exportStar(require("./parameter-invalid"), exports);
|
|
24
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/error/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,yCAAuB;AACvB,sDAAoC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parameter-invalid.d.ts","sourceRoot":"","sources":["../../src/error/parameter-invalid.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,qBAAa,yBAA0B,SAAQ,SAAS;CACvD"}
|
|
@@ -7,7 +7,8 @@ exports.InvalidParameterException = void 0;
|
|
|
7
7
|
* For the full copyright and license information,
|
|
8
8
|
* view the LICENSE file that was distributed with this source code.
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
const base_1 = require("./base");
|
|
11
|
+
class InvalidParameterException extends base_1.BaseError {
|
|
11
12
|
}
|
|
12
13
|
exports.InvalidParameterException = InvalidParameterException;
|
|
13
14
|
//# sourceMappingURL=parameter-invalid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parameter-invalid.js","sourceRoot":"","sources":["../../src/error/parameter-invalid.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,iCAAmC;AAEnC,MAAa,yBAA0B,SAAQ,gBAAS;CACvD;AADD,8DACC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Response } from '
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type { ArrayLiteralExpression, Node } from 'typescript';
|
|
2
|
+
import { DecoratorID } from '../decorator';
|
|
3
|
+
import type { Response } from './type';
|
|
4
|
+
import type { MetadataGenerator } from './metadata';
|
|
5
|
+
export declare abstract class AbstractGenerator<T extends Node> {
|
|
6
|
+
protected current: MetadataGenerator;
|
|
6
7
|
protected path: string | undefined;
|
|
7
8
|
protected node: T;
|
|
8
|
-
protected constructor(node: T, current:
|
|
9
|
-
protected generatePath(key:
|
|
9
|
+
protected constructor(node: T, current: MetadataGenerator);
|
|
10
|
+
protected generatePath(key: `${DecoratorID.CLASS_PATH}` | `${DecoratorID.METHOD_PATH}`): void;
|
|
10
11
|
protected getDecoratorValues(decoratorName: string, acceptMultiple?: boolean): any[];
|
|
11
12
|
protected getSecurity(): {
|
|
12
13
|
name: any;
|
|
@@ -22,4 +23,4 @@ export declare abstract class EndpointGenerator<T extends Node> {
|
|
|
22
23
|
isHidden(node: Node): boolean;
|
|
23
24
|
isDeprecated(node: Node): boolean;
|
|
24
25
|
}
|
|
25
|
-
//# sourceMappingURL=
|
|
26
|
+
//# sourceMappingURL=abstract.d.ts.map
|
|
@@ -0,0 +1 @@
|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