@trapi/metadata 1.2.3 → 2.0.0-beta.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 +63 -16
- package/dist/index.d.mts +1718 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +3310 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +27 -15
- package/dist/cache/client.d.ts +0 -15
- package/dist/cache/client.d.ts.map +0 -1
- package/dist/cache/client.js +0 -98
- package/dist/cache/client.js.map +0 -1
- package/dist/cache/index.d.ts +0 -4
- package/dist/cache/index.d.ts.map +0 -1
- package/dist/cache/index.js +0 -26
- package/dist/cache/index.js.map +0 -1
- package/dist/cache/type.d.ts +0 -33
- package/dist/cache/type.d.ts.map +0 -1
- package/dist/cache/type.js +0 -9
- package/dist/cache/type.js.map +0 -1
- package/dist/cache/utils.d.ts +0 -4
- package/dist/cache/utils.d.ts.map +0 -1
- package/dist/cache/utils.js +0 -53
- package/dist/cache/utils.js.map +0 -1
- package/dist/config/index.d.ts +0 -2
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -24
- package/dist/config/index.js.map +0 -1
- package/dist/config/type.d.ts +0 -37
- package/dist/config/type.d.ts.map +0 -1
- package/dist/config/type.js +0 -9
- package/dist/config/type.js.map +0 -1
- package/dist/decorator/constants.d.ts +0 -41
- package/dist/decorator/constants.d.ts.map +0 -1
- package/dist/decorator/constants.js +0 -53
- package/dist/decorator/constants.js.map +0 -1
- package/dist/decorator/index.d.ts +0 -7
- package/dist/decorator/index.d.ts.map +0 -1
- package/dist/decorator/index.js +0 -29
- package/dist/decorator/index.js.map +0 -1
- package/dist/decorator/preset/index.d.ts +0 -3
- package/dist/decorator/preset/index.d.ts.map +0 -1
- package/dist/decorator/preset/index.js +0 -25
- package/dist/decorator/preset/index.js.map +0 -1
- package/dist/decorator/preset/type.d.ts +0 -6
- package/dist/decorator/preset/type.d.ts.map +0 -1
- package/dist/decorator/preset/type.js +0 -9
- package/dist/decorator/preset/type.js.map +0 -1
- package/dist/decorator/preset/utils/check.d.ts +0 -3
- package/dist/decorator/preset/utils/check.d.ts.map +0 -1
- package/dist/decorator/preset/utils/check.js +0 -18
- package/dist/decorator/preset/utils/check.js.map +0 -1
- package/dist/decorator/preset/utils/index.d.ts +0 -4
- package/dist/decorator/preset/utils/index.d.ts.map +0 -1
- package/dist/decorator/preset/utils/index.js +0 -26
- package/dist/decorator/preset/utils/index.js.map +0 -1
- package/dist/decorator/preset/utils/load.d.ts +0 -3
- package/dist/decorator/preset/utils/load.d.ts.map +0 -1
- package/dist/decorator/preset/utils/load.js +0 -51
- package/dist/decorator/preset/utils/load.js.map +0 -1
- package/dist/decorator/preset/utils/normalize.d.ts +0 -2
- package/dist/decorator/preset/utils/normalize.d.ts.map +0 -1
- package/dist/decorator/preset/utils/normalize.js +0 -27
- package/dist/decorator/preset/utils/normalize.js.map +0 -1
- package/dist/decorator/property-manager/index.d.ts +0 -3
- package/dist/decorator/property-manager/index.d.ts.map +0 -1
- package/dist/decorator/property-manager/index.js +0 -25
- package/dist/decorator/property-manager/index.js.map +0 -1
- package/dist/decorator/property-manager/module.d.ts +0 -17
- package/dist/decorator/property-manager/module.d.ts.map +0 -1
- package/dist/decorator/property-manager/module.js +0 -59
- package/dist/decorator/property-manager/module.js.map +0 -1
- package/dist/decorator/property-manager/utils.d.ts +0 -6
- package/dist/decorator/property-manager/utils.d.ts.map +0 -1
- package/dist/decorator/property-manager/utils.js +0 -92
- package/dist/decorator/property-manager/utils.js.map +0 -1
- package/dist/decorator/resolver/index.d.ts +0 -3
- package/dist/decorator/resolver/index.d.ts.map +0 -1
- package/dist/decorator/resolver/index.js +0 -25
- package/dist/decorator/resolver/index.js.map +0 -1
- package/dist/decorator/resolver/module.d.ts +0 -27
- package/dist/decorator/resolver/module.d.ts.map +0 -1
- package/dist/decorator/resolver/module.js +0 -72
- package/dist/decorator/resolver/module.js.map +0 -1
- package/dist/decorator/resolver/type.d.ts +0 -10
- package/dist/decorator/resolver/type.d.ts.map +0 -1
- package/dist/decorator/resolver/type.js +0 -3
- package/dist/decorator/resolver/type.js.map +0 -1
- package/dist/decorator/sets/class.d.ts +0 -7
- package/dist/decorator/sets/class.d.ts.map +0 -1
- package/dist/decorator/sets/class.js +0 -9
- package/dist/decorator/sets/class.js.map +0 -1
- package/dist/decorator/sets/index.d.ts +0 -8
- package/dist/decorator/sets/index.d.ts.map +0 -1
- package/dist/decorator/sets/index.js +0 -29
- package/dist/decorator/sets/index.js.map +0 -1
- package/dist/decorator/sets/method.d.ts +0 -14
- package/dist/decorator/sets/method.d.ts.map +0 -1
- package/dist/decorator/sets/method.js +0 -9
- package/dist/decorator/sets/method.js.map +0 -1
- package/dist/decorator/sets/mixed.d.ts +0 -12
- package/dist/decorator/sets/mixed.d.ts.map +0 -1
- package/dist/decorator/sets/mixed.js +0 -9
- package/dist/decorator/sets/mixed.js.map +0 -1
- package/dist/decorator/sets/parameter.d.ts +0 -21
- package/dist/decorator/sets/parameter.d.ts.map +0 -1
- package/dist/decorator/sets/parameter.js +0 -9
- package/dist/decorator/sets/parameter.js.map +0 -1
- package/dist/decorator/sets/request.d.ts +0 -6
- package/dist/decorator/sets/request.d.ts.map +0 -1
- package/dist/decorator/sets/request.js +0 -9
- package/dist/decorator/sets/request.js.map +0 -1
- package/dist/decorator/sets/response.d.ts +0 -17
- package/dist/decorator/sets/response.d.ts.map +0 -1
- package/dist/decorator/sets/response.js +0 -9
- package/dist/decorator/sets/response.js.map +0 -1
- package/dist/decorator/sets/type.d.ts +0 -4
- package/dist/decorator/sets/type.d.ts.map +0 -1
- package/dist/decorator/sets/type.js +0 -3
- package/dist/decorator/sets/type.js.map +0 -1
- package/dist/decorator/type.d.ts +0 -32
- package/dist/decorator/type.d.ts.map +0 -1
- package/dist/decorator/type.js +0 -9
- package/dist/decorator/type.js.map +0 -1
- package/dist/error/base.d.ts +0 -3
- package/dist/error/base.d.ts.map +0 -1
- package/dist/error/base.js +0 -13
- package/dist/error/base.js.map +0 -1
- package/dist/error/index.d.ts +0 -2
- package/dist/error/index.d.ts.map +0 -1
- package/dist/error/index.js +0 -24
- package/dist/error/index.js.map +0 -1
- package/dist/generator/abstract.d.ts +0 -19
- package/dist/generator/abstract.d.ts.map +0 -1
- package/dist/generator/abstract.js +0 -151
- package/dist/generator/abstract.js.map +0 -1
- package/dist/generator/controller/index.d.ts +0 -3
- package/dist/generator/controller/index.d.ts.map +0 -1
- package/dist/generator/controller/index.js +0 -25
- package/dist/generator/controller/index.js.map +0 -1
- package/dist/generator/controller/module.d.ts +0 -13
- package/dist/generator/controller/module.d.ts.map +0 -1
- package/dist/generator/controller/module.js +0 -68
- package/dist/generator/controller/module.js.map +0 -1
- package/dist/generator/controller/type.d.ts +0 -47
- package/dist/generator/controller/type.d.ts.map +0 -1
- package/dist/generator/controller/type.js +0 -3
- package/dist/generator/controller/type.js.map +0 -1
- package/dist/generator/index.d.ts +0 -7
- package/dist/generator/index.d.ts.map +0 -1
- package/dist/generator/index.js +0 -29
- package/dist/generator/index.js.map +0 -1
- package/dist/generator/metadata/index.d.ts +0 -4
- package/dist/generator/metadata/index.d.ts.map +0 -1
- package/dist/generator/metadata/index.js +0 -26
- package/dist/generator/metadata/index.js.map +0 -1
- package/dist/generator/metadata/module.d.ts +0 -39
- package/dist/generator/metadata/module.d.ts.map +0 -1
- package/dist/generator/metadata/module.js +0 -140
- package/dist/generator/metadata/module.js.map +0 -1
- package/dist/generator/metadata/type.d.ts +0 -25
- package/dist/generator/metadata/type.d.ts.map +0 -1
- package/dist/generator/metadata/type.js +0 -3
- package/dist/generator/metadata/type.js.map +0 -1
- package/dist/generator/metadata/utils.d.ts +0 -3
- package/dist/generator/metadata/utils.d.ts.map +0 -1
- package/dist/generator/metadata/utils.js +0 -19
- package/dist/generator/metadata/utils.js.map +0 -1
- package/dist/generator/method/constants.d.ts +0 -11
- package/dist/generator/method/constants.d.ts.map +0 -1
- package/dist/generator/method/constants.js +0 -21
- package/dist/generator/method/constants.js.map +0 -1
- package/dist/generator/method/index.d.ts +0 -4
- package/dist/generator/method/index.d.ts.map +0 -1
- package/dist/generator/method/index.js +0 -26
- package/dist/generator/method/index.js.map +0 -1
- package/dist/generator/method/module.d.ts +0 -19
- package/dist/generator/method/module.d.ts.map +0 -1
- package/dist/generator/method/module.js +0 -188
- package/dist/generator/method/module.js.map +0 -1
- package/dist/generator/method/type.d.ts +0 -23
- package/dist/generator/method/type.d.ts.map +0 -1
- package/dist/generator/method/type.js +0 -9
- package/dist/generator/method/type.js.map +0 -1
- package/dist/generator/parameter/constants.d.ts +0 -19
- package/dist/generator/parameter/constants.d.ts.map +0 -1
- package/dist/generator/parameter/constants.js +0 -30
- package/dist/generator/parameter/constants.js.map +0 -1
- package/dist/generator/parameter/error.d.ts +0 -35
- package/dist/generator/parameter/error.d.ts.map +0 -1
- package/dist/generator/parameter/error.js +0 -68
- package/dist/generator/parameter/error.js.map +0 -1
- package/dist/generator/parameter/index.d.ts +0 -5
- package/dist/generator/parameter/index.d.ts.map +0 -1
- package/dist/generator/parameter/index.js +0 -27
- package/dist/generator/parameter/index.js.map +0 -1
- package/dist/generator/parameter/module.d.ts +0 -29
- package/dist/generator/parameter/module.d.ts.map +0 -1
- package/dist/generator/parameter/module.js +0 -556
- package/dist/generator/parameter/module.js.map +0 -1
- package/dist/generator/parameter/type.d.ts +0 -25
- package/dist/generator/parameter/type.d.ts.map +0 -1
- package/dist/generator/parameter/type.js +0 -9
- package/dist/generator/parameter/type.js.map +0 -1
- package/dist/generator/type.d.ts +0 -20
- package/dist/generator/type.d.ts.map +0 -1
- package/dist/generator/type.js +0 -9
- package/dist/generator/type.js.map +0 -1
- package/dist/index.d.ts +0 -10
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -32
- package/dist/index.js.map +0 -1
- package/dist/module.d.ts +0 -5
- package/dist/module.d.ts.map +0 -1
- package/dist/module.js +0 -41
- package/dist/module.js.map +0 -1
- package/dist/resolver/constants.d.ts +0 -36
- package/dist/resolver/constants.d.ts.map +0 -1
- package/dist/resolver/constants.js +0 -47
- package/dist/resolver/constants.js.map +0 -1
- package/dist/resolver/error.d.ts +0 -8
- package/dist/resolver/error.d.ts.map +0 -1
- package/dist/resolver/error.js +0 -41
- package/dist/resolver/error.js.map +0 -1
- package/dist/resolver/extension/index.d.ts +0 -3
- package/dist/resolver/extension/index.d.ts.map +0 -1
- package/dist/resolver/extension/index.js +0 -25
- package/dist/resolver/extension/index.js.map +0 -1
- package/dist/resolver/extension/module.d.ts +0 -5
- package/dist/resolver/extension/module.d.ts.map +0 -1
- package/dist/resolver/extension/module.js +0 -27
- package/dist/resolver/extension/module.js.map +0 -1
- package/dist/resolver/extension/type.d.ts +0 -8
- package/dist/resolver/extension/type.d.ts.map +0 -1
- package/dist/resolver/extension/type.js +0 -9
- package/dist/resolver/extension/type.js.map +0 -1
- package/dist/resolver/index.d.ts +0 -6
- package/dist/resolver/index.d.ts.map +0 -1
- package/dist/resolver/index.js +0 -28
- package/dist/resolver/index.js.map +0 -1
- package/dist/resolver/module.d.ts +0 -57
- package/dist/resolver/module.d.ts.map +0 -1
- package/dist/resolver/module.js +0 -1109
- package/dist/resolver/module.js.map +0 -1
- package/dist/resolver/type.d.ts +0 -139
- package/dist/resolver/type.d.ts.map +0 -1
- package/dist/resolver/type.js +0 -130
- package/dist/resolver/type.js.map +0 -1
- package/dist/type.d.ts +0 -2
- package/dist/type.d.ts.map +0 -1
- package/dist/type.js +0 -9
- package/dist/type.js.map +0 -1
- package/dist/utils/array.d.ts +0 -2
- package/dist/utils/array.d.ts.map +0 -1
- package/dist/utils/array.js +0 -22
- package/dist/utils/array.js.map +0 -1
- package/dist/utils/index.d.ts +0 -10
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -32
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/initializer.d.ts +0 -5
- package/dist/utils/initializer.d.ts.map +0 -1
- package/dist/utils/initializer.js +0 -131
- package/dist/utils/initializer.js.map +0 -1
- package/dist/utils/js-doc/constants.d.ts +0 -19
- package/dist/utils/js-doc/constants.d.ts.map +0 -1
- package/dist/utils/js-doc/constants.js +0 -30
- package/dist/utils/js-doc/constants.js.map +0 -1
- package/dist/utils/js-doc/index.d.ts +0 -4
- package/dist/utils/js-doc/index.d.ts.map +0 -1
- package/dist/utils/js-doc/index.js +0 -26
- package/dist/utils/js-doc/index.js.map +0 -1
- package/dist/utils/js-doc/module.d.ts +0 -9
- package/dist/utils/js-doc/module.d.ts.map +0 -1
- package/dist/utils/js-doc/module.js +0 -98
- package/dist/utils/js-doc/module.js.map +0 -1
- package/dist/utils/js-doc/utils.d.ts +0 -3
- package/dist/utils/js-doc/utils.d.ts.map +0 -1
- package/dist/utils/js-doc/utils.js +0 -29
- package/dist/utils/js-doc/utils.js.map +0 -1
- package/dist/utils/node/index.d.ts +0 -3
- package/dist/utils/node/index.d.ts.map +0 -1
- package/dist/utils/node/index.js +0 -25
- package/dist/utils/node/index.js.map +0 -1
- package/dist/utils/node/module.d.ts +0 -10
- package/dist/utils/node/module.d.ts.map +0 -1
- package/dist/utils/node/module.js +0 -52
- package/dist/utils/node/module.js.map +0 -1
- package/dist/utils/node/type.d.ts +0 -6
- package/dist/utils/node/type.d.ts.map +0 -1
- package/dist/utils/node/type.js +0 -9
- package/dist/utils/node/type.js.map +0 -1
- package/dist/utils/object.d.ts +0 -2
- package/dist/utils/object.d.ts.map +0 -1
- package/dist/utils/object.js +0 -15
- package/dist/utils/object.js.map +0 -1
- package/dist/utils/path-normalize.d.ts +0 -2
- package/dist/utils/path-normalize.d.ts.map +0 -1
- package/dist/utils/path-normalize.js +0 -17
- package/dist/utils/path-normalize.js.map +0 -1
- package/dist/utils/source-files.d.ts +0 -3
- package/dist/utils/source-files.d.ts.map +0 -1
- package/dist/utils/source-files.js +0 -32
- package/dist/utils/source-files.js.map +0 -1
- package/dist/utils/tsconfig/index.d.ts +0 -3
- package/dist/utils/tsconfig/index.d.ts.map +0 -1
- package/dist/utils/tsconfig/index.js +0 -25
- package/dist/utils/tsconfig/index.js.map +0 -1
- package/dist/utils/tsconfig/module.d.ts +0 -4
- package/dist/utils/tsconfig/module.d.ts.map +0 -1
- package/dist/utils/tsconfig/module.js +0 -54
- package/dist/utils/tsconfig/module.js.map +0 -1
- package/dist/utils/tsconfig/type.d.ts +0 -11
- package/dist/utils/tsconfig/type.d.ts.map +0 -1
- package/dist/utils/tsconfig/type.js +0 -9
- package/dist/utils/tsconfig/type.js.map +0 -1
- package/dist/utils/validator/constants.d.ts +0 -13
- package/dist/utils/validator/constants.d.ts.map +0 -1
- package/dist/utils/validator/constants.js +0 -23
- package/dist/utils/validator/constants.js.map +0 -1
- package/dist/utils/validator/index.d.ts +0 -4
- package/dist/utils/validator/index.d.ts.map +0 -1
- package/dist/utils/validator/index.js +0 -26
- package/dist/utils/validator/index.js.map +0 -1
- package/dist/utils/validator/module.d.ts +0 -4
- package/dist/utils/validator/module.d.ts.map +0 -1
- package/dist/utils/validator/module.js +0 -142
- package/dist/utils/validator/module.js.map +0 -1
- package/dist/utils/validator/type.d.ts +0 -6
- package/dist/utils/validator/type.d.ts.map +0 -1
- package/dist/utils/validator/type.js +0 -9
- package/dist/utils/validator/type.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/decorator/preset/type.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,MAAM,YAAY,GAAG;IACvB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,EAAE,eAAe,EAAE,CAAA;CAC3B,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
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=type.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../../src/decorator/preset/type.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../../../src/decorator/preset/utils/check.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAI,KAAK,IAAI,YAAY,CAKrE"}
|
|
@@ -1,18 +0,0 @@
|
|
|
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.isPresetSchema = void 0;
|
|
10
|
-
const locter_1 = require("locter");
|
|
11
|
-
function isPresetSchema(input) {
|
|
12
|
-
return (0, locter_1.isObject)(input) &&
|
|
13
|
-
(0, locter_1.hasOwnProperty)(input, 'items') &&
|
|
14
|
-
Array.isArray(input.items) &&
|
|
15
|
-
(!(0, locter_1.hasOwnProperty)(input, 'extends') || Array.isArray(input.extends));
|
|
16
|
-
}
|
|
17
|
-
exports.isPresetSchema = isPresetSchema;
|
|
18
|
-
//# sourceMappingURL=check.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../../../src/decorator/preset/utils/check.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,mCAAkD;AAGlD,SAAgB,cAAc,CAAC,KAAc;IACzC,OAAO,IAAA,iBAAQ,EAAC,KAAK,CAAC;QAClB,IAAA,uBAAc,EAAC,KAAK,EAAE,OAAO,CAAC;QAC9B,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;QAC1B,CAAC,CAAC,IAAA,uBAAc,EAAC,KAAK,EAAE,SAAS,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AAC5E,CAAC;AALD,wCAKC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/decorator/preset/utils/index.ts"],"names":[],"mappings":"AAOA,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
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("./check"), exports);
|
|
24
|
-
__exportStar(require("./load"), exports);
|
|
25
|
-
__exportStar(require("./normalize"), exports);
|
|
26
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/decorator/preset/utils/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,0CAAwB;AACxB,yCAAuB;AACvB,8CAA4B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../../../src/decorator/preset/utils/load.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAIlD,wBAAsB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAI,OAAO,CAAC,eAAe,EAAE,CAAC,CA4C3E"}
|
|
@@ -1,51 +0,0 @@
|
|
|
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.loadPreset = void 0;
|
|
10
|
-
const locter_1 = require("locter");
|
|
11
|
-
const check_1 = require("./check");
|
|
12
|
-
const normalize_1 = require("./normalize");
|
|
13
|
-
async function loadPreset(input) {
|
|
14
|
-
const items = [];
|
|
15
|
-
const lookupPaths = (0, normalize_1.generatePresetLookupPaths)(input);
|
|
16
|
-
let allFailed = true;
|
|
17
|
-
for (let i = 0; i < lookupPaths.length; i++) {
|
|
18
|
-
try {
|
|
19
|
-
let moduleExport = await (0, locter_1.load)(lookupPaths[i]);
|
|
20
|
-
if (!(0, check_1.isPresetSchema)(moduleExport)) {
|
|
21
|
-
if ((0, check_1.isPresetSchema)(moduleExport.default)) {
|
|
22
|
-
moduleExport = moduleExport.default;
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
continue;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
items.push(...moduleExport.items);
|
|
29
|
-
const extendsPromises = [];
|
|
30
|
-
if (moduleExport.extends) {
|
|
31
|
-
for (let j = 0; j < moduleExport.extends.length; j++) {
|
|
32
|
-
extendsPromises.push(loadPreset(moduleExport.extends[j]));
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
const output = await Promise.all(extendsPromises);
|
|
36
|
-
for (let j = 0; j < output.length; j++) {
|
|
37
|
-
items.push(...output[j]);
|
|
38
|
-
}
|
|
39
|
-
allFailed = false;
|
|
40
|
-
}
|
|
41
|
-
catch (e) {
|
|
42
|
-
// do nothing ...
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
if (allFailed) {
|
|
46
|
-
throw new Error(`The preset ${input} could not be resolved.`);
|
|
47
|
-
}
|
|
48
|
-
return items;
|
|
49
|
-
}
|
|
50
|
-
exports.loadPreset = loadPreset;
|
|
51
|
-
//# sourceMappingURL=load.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"load.js","sourceRoot":"","sources":["../../../../src/decorator/preset/utils/load.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,mCAA8B;AAE9B,mCAAyC;AACzC,2CAAwD;AAEjD,KAAK,UAAU,UAAU,CAAC,KAAa;IAC1C,MAAM,KAAK,GAAuB,EAAE,CAAC;IAErC,MAAM,WAAW,GAAG,IAAA,qCAAyB,EAAC,KAAK,CAAC,CAAC;IACrD,IAAI,SAAS,GAAG,IAAI,CAAC;IAErB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC1C,IAAI,CAAC;YACD,IAAI,YAAY,GAAG,MAAM,IAA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"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../../src/decorator/preset/utils/normalize.ts"],"names":[],"mappings":"AASA,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAI,MAAM,EAAE,CAclE"}
|
|
@@ -1,27 +0,0 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.generatePresetLookupPaths = void 0;
|
|
13
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
14
|
-
function generatePresetLookupPaths(input) {
|
|
15
|
-
if (node_path_1.default.isAbsolute(input) || input.startsWith('./')) {
|
|
16
|
-
return [input];
|
|
17
|
-
}
|
|
18
|
-
if (input.startsWith('module:')) {
|
|
19
|
-
return [input.substring(0, 'module:'.length)];
|
|
20
|
-
}
|
|
21
|
-
if (!input.startsWith('@')) {
|
|
22
|
-
return [input, `@trapi/${input}`];
|
|
23
|
-
}
|
|
24
|
-
return [input];
|
|
25
|
-
}
|
|
26
|
-
exports.generatePresetLookupPaths = generatePresetLookupPaths;
|
|
27
|
-
//# sourceMappingURL=normalize.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalize.js","sourceRoot":"","sources":["../../../../src/decorator/preset/utils/normalize.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAEH,0DAA6B;AAE7B,SAAgB,yBAAyB,CAAC,KAAa;IACnD,IAAI,mBAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACnD,OAAO,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IAED,IAAI,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC9B,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IAClD,CAAC;IAED,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACzB,OAAO,CAAC,KAAK,EAAE,UAAU,KAAK,EAAE,CAAC,CAAC;IACtC,CAAC;IAED,OAAO,CAAC,KAAK,CAAC,CAAC;AACnB,CAAC;AAdD,8DAcC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/decorator/property-manager/index.ts"],"names":[],"mappings":"AAOA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2021.
|
|
4
|
-
* Author Peter Placzek (tada5hi)
|
|
5
|
-
* For the full copyright and license information,
|
|
6
|
-
* view the LICENSE file that was distributed with this source code.
|
|
7
|
-
*/
|
|
8
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
-
}
|
|
14
|
-
Object.defineProperty(o, k2, desc);
|
|
15
|
-
}) : (function(o, m, k, k2) {
|
|
16
|
-
if (k2 === undefined) k2 = k;
|
|
17
|
-
o[k2] = m[k];
|
|
18
|
-
}));
|
|
19
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
20
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
21
|
-
};
|
|
22
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
__exportStar(require("./module"), exports);
|
|
24
|
-
__exportStar(require("./utils"), exports);
|
|
25
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorator/property-manager/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,2CAAyB;AACzB,0CAAwB"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { DecoratorConfig, DecoratorID, DecoratorProperties, DecoratorPropertyConfig } from '../index';
|
|
2
|
-
import type { NodeDecorator } from '../../utils';
|
|
3
|
-
export declare class DecoratorPropertyManager<T extends `${DecoratorID}`> {
|
|
4
|
-
readonly representation: DecoratorConfig<T>;
|
|
5
|
-
readonly decorators: NodeDecorator[];
|
|
6
|
-
protected properties: Record<string, DecoratorPropertyConfig>;
|
|
7
|
-
constructor(representation: DecoratorConfig<T>, decorators: NodeDecorator[]);
|
|
8
|
-
/**
|
|
9
|
-
* Get one or more specific value(s) of the decorator arguments or typeArguments.
|
|
10
|
-
*
|
|
11
|
-
* @param type
|
|
12
|
-
* @param decoratorOrIndex
|
|
13
|
-
*/
|
|
14
|
-
get<P extends keyof DecoratorProperties<T>>(type: P, decoratorOrIndex?: number | NodeDecorator): DecoratorProperties<T>[P] | undefined;
|
|
15
|
-
protected build(): void;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=module.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../src/decorator/property-manager/module.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACR,eAAe,EACf,WAAW,EACX,mBAAmB,EACnB,uBAAuB,EAC1B,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,qBAAa,wBAAwB,CAAC,CAAC,SAAS,GAAG,WAAW,EAAE;IAC5D,SAAgB,cAAc,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAEnD,SAAgB,UAAU,EAAE,aAAa,EAAE,CAAC;IAE5C,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;gBAG1D,cAAc,EAAE,eAAe,CAAC,CAAC,CAAC,EAClC,UAAU,EAAE,aAAa,EAAE;IAW/B;;;;;OAKG;IACI,GAAG,CAAC,CAAC,SAAS,MAAM,mBAAmB,CAAC,CAAC,CAAC,EAC7C,IAAI,EAAE,CAAC,EACP,gBAAgB,CAAC,EAAE,MAAM,GAAG,aAAa,GAC1C,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS;IA4BxC,SAAS,CAAC,KAAK;CAalB"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2022.
|
|
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.DecoratorPropertyManager = void 0;
|
|
10
|
-
const utils_1 = require("../../utils");
|
|
11
|
-
const utils_2 = require("./utils");
|
|
12
|
-
class DecoratorPropertyManager {
|
|
13
|
-
constructor(representation, decorators) {
|
|
14
|
-
this.representation = representation;
|
|
15
|
-
this.decorators = decorators;
|
|
16
|
-
this.properties = {};
|
|
17
|
-
this.build();
|
|
18
|
-
}
|
|
19
|
-
// -------------------------------------------
|
|
20
|
-
/**
|
|
21
|
-
* Get one or more specific value(s) of the decorator arguments or typeArguments.
|
|
22
|
-
*
|
|
23
|
-
* @param type
|
|
24
|
-
* @param decoratorOrIndex
|
|
25
|
-
*/
|
|
26
|
-
get(type, decoratorOrIndex) {
|
|
27
|
-
if (!(0, utils_1.hasOwnProperty)(this.properties, type)) {
|
|
28
|
-
return undefined;
|
|
29
|
-
}
|
|
30
|
-
const config = this.properties[type];
|
|
31
|
-
let decorator;
|
|
32
|
-
if (typeof decoratorOrIndex === 'number' ||
|
|
33
|
-
typeof decoratorOrIndex === 'undefined') {
|
|
34
|
-
decoratorOrIndex = decoratorOrIndex ?? 0;
|
|
35
|
-
if (decoratorOrIndex < 0 || decoratorOrIndex >= this.decorators.length) {
|
|
36
|
-
return undefined;
|
|
37
|
-
}
|
|
38
|
-
decorator = this.decorators[decoratorOrIndex];
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
decorator = decoratorOrIndex;
|
|
42
|
-
}
|
|
43
|
-
return (0, utils_2.extractPropertyFromDecorator)(decorator, config);
|
|
44
|
-
}
|
|
45
|
-
// -------------------------------------------
|
|
46
|
-
build() {
|
|
47
|
-
if (!this.representation.properties) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
const keys = Object.keys(this.representation.properties);
|
|
51
|
-
const output = {};
|
|
52
|
-
for (let i = 0; i < keys.length; i++) {
|
|
53
|
-
output[keys[i]] = (0, utils_2.buildDecoratorPropertyConfig)(this.representation.properties[keys[i]]);
|
|
54
|
-
}
|
|
55
|
-
this.properties = output;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
exports.DecoratorPropertyManager = DecoratorPropertyManager;
|
|
59
|
-
//# sourceMappingURL=module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../src/decorator/property-manager/module.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AASH,uCAA6C;AAC7C,mCAAqF;AAErF,MAAa,wBAAwB;IAOjC,YACI,cAAkC,EAClC,UAA2B;QAE3B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC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AAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,IAAA,oCAA4B,EAAC,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5F,CAAC;QAED,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;IAC7B,CAAC;CACJ;AAtED,4DAsEC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { NodeDecorator } from '../../utils';
|
|
2
|
-
import type { DecoratorPropertyConfig, DecoratorPropertyConfigInput } from '../type';
|
|
3
|
-
export declare function buildDecoratorPropertyConfig(property: DecoratorPropertyConfigInput): DecoratorPropertyConfig;
|
|
4
|
-
export declare function extractPropertyFromDecorator(decorator: NodeDecorator, config: DecoratorPropertyConfig): unknown | undefined;
|
|
5
|
-
export declare function mergeArguments(data: unknown[]): any[] | Record<string, any>;
|
|
6
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/decorator/property-manager/utils.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAErF,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,4BAA4B,GAAG,uBAAuB,CAO5G;AAED,wBAAgB,4BAA4B,CACxC,SAAS,EAAE,aAAa,EACxB,MAAM,EAAE,uBAAuB,GAChC,OAAO,GAAG,SAAS,CAoCrB;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,+BAmC7C"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2021-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.mergeArguments = exports.extractPropertyFromDecorator = exports.buildDecoratorPropertyConfig = void 0;
|
|
10
|
-
const locter_1 = require("locter");
|
|
11
|
-
const utils_1 = require("../../utils");
|
|
12
|
-
function buildDecoratorPropertyConfig(property) {
|
|
13
|
-
return {
|
|
14
|
-
...property,
|
|
15
|
-
isType: property.isType ?? false,
|
|
16
|
-
index: property.index ?? 0,
|
|
17
|
-
amount: property.amount ?? 1,
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
exports.buildDecoratorPropertyConfig = buildDecoratorPropertyConfig;
|
|
21
|
-
function extractPropertyFromDecorator(decorator, config) {
|
|
22
|
-
const items = config.isType ?
|
|
23
|
-
decorator.typeArguments :
|
|
24
|
-
extractValueFromArgumentType(decorator.arguments);
|
|
25
|
-
if (items.length <= config.index) {
|
|
26
|
-
return undefined;
|
|
27
|
-
}
|
|
28
|
-
const data = (config.amount >= 1 ?
|
|
29
|
-
items.slice(config.index, config.index + config.amount) :
|
|
30
|
-
items.slice(config.index));
|
|
31
|
-
if (data.length === 0) {
|
|
32
|
-
return undefined;
|
|
33
|
-
}
|
|
34
|
-
if (config.strategy) {
|
|
35
|
-
if (config.strategy === 'merge') {
|
|
36
|
-
return mergeArguments(data);
|
|
37
|
-
}
|
|
38
|
-
return config.strategy(data);
|
|
39
|
-
}
|
|
40
|
-
if (config.amount === 1) {
|
|
41
|
-
if (data.length > 0) {
|
|
42
|
-
return data[0];
|
|
43
|
-
}
|
|
44
|
-
return undefined;
|
|
45
|
-
}
|
|
46
|
-
return data;
|
|
47
|
-
}
|
|
48
|
-
exports.extractPropertyFromDecorator = extractPropertyFromDecorator;
|
|
49
|
-
function mergeArguments(data) {
|
|
50
|
-
if (data.length === 0) {
|
|
51
|
-
return undefined;
|
|
52
|
-
}
|
|
53
|
-
// we are merging object properties
|
|
54
|
-
if ((0, locter_1.isObject)(data[0])) {
|
|
55
|
-
const element = data[0];
|
|
56
|
-
if (data.length === 1) {
|
|
57
|
-
return element;
|
|
58
|
-
}
|
|
59
|
-
for (let i = 1; i < data.length; i++) {
|
|
60
|
-
if ((0, locter_1.isObject)(data[i])) {
|
|
61
|
-
Object.assign(element, data[i]);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
return element;
|
|
65
|
-
}
|
|
66
|
-
const output = Array.isArray(data[0]) ? data[0] : [data[0]];
|
|
67
|
-
if (data.length === 1) {
|
|
68
|
-
return output;
|
|
69
|
-
}
|
|
70
|
-
for (let i = 1; i < data.length; i++) {
|
|
71
|
-
if (Array.isArray(data[i])) {
|
|
72
|
-
output.push(...data[i]);
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
output.push(data[i]);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return output;
|
|
79
|
-
}
|
|
80
|
-
exports.mergeArguments = mergeArguments;
|
|
81
|
-
function extractValueFromArgumentType(argument) {
|
|
82
|
-
const values = [];
|
|
83
|
-
for (let i = 0; i < argument.length; i++) {
|
|
84
|
-
if (!(0, utils_1.hasOwnProperty)(argument[i], 'kind')) {
|
|
85
|
-
values.push(argument[i]);
|
|
86
|
-
continue;
|
|
87
|
-
}
|
|
88
|
-
values.push((0, utils_1.getInitializerValue)(argument[i]));
|
|
89
|
-
}
|
|
90
|
-
return values;
|
|
91
|
-
}
|
|
92
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/decorator/property-manager/utils.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,mCAAkC;AAGlC,uCAAkE;AAGlE,SAAgB,4BAA4B,CAAC,QAAsC;IAC/E,OAAO;QACH,GAAG,QAAQ;QACX,MAAM,EAAE,QAAQ,CAAC,MAAM,IAAI,KAAK;QAChC,KAAK,EAAE,QAAQ,CAAC,KAAK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AC,CAAC,CAAC;QACzB,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC;AAnCD,wCAmCC;AAED,SAAS,4BAA4B,CAAC,QAAmB;IACrD,MAAM,MAAM,GAAe,EAAE,CAAC;IAE9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACvC,IAAI,CAAC,IAAA,sBAAc,EAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC;YACvC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;YACzB,SAAS;QACb,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,IAAA,2BAAmB,EAAC,QAAQ,CAAC,CAAC,CAAe,CAAC,CAAC,CAAC;IAChE,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/decorator/resolver/index.ts"],"names":[],"mappings":"AAOA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorator/resolver/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,2CAAyB;AACzB,yCAAuB"}
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,72 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,CAAC;YAChC,OAAO,SAAS,CAAC;QACrB,CAAC;QAED,MAAM,UAAU,GAAoB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YACrD,IAAI,CAAC,CAAC;YACN,IAAA,yBAAiB,EAAC,IAAI,CAAC,CAAC;QAE5B,IAAI,CAAC,IAAA,sBAAc,EAAC,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC;YAChC,OAAO,SAAS,CAAC;QACrB,CAAC;QAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC3C,MAAM,KAAK,GA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uB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5D,CAAC;QAED,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC;IACtB,CAAC;CACJ;AAnFD,8CAmFC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../../src/decorator/resolver/type.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +0,0 @@
|
|
|
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.TAGS}` | `${DecoratorID.CONTROLLER}`;
|
|
6
|
-
export type DecoratorClassSetProperties<T extends DecoratorClassSetID> = T extends `${DecoratorID.TAGS}` ? DecoratorSwaggerTagsProperties : T extends `${DecoratorID.CONTROLLER}` ? DecoratorClassPathProperties : never;
|
|
7
|
-
//# sourceMappingURL=class.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,IAAI,EAAE,GAAG,GAAG,WAAW,CAAC,UAAU,EAAE,CAAC;AACtF,MAAM,MAAM,2BAA2B,CAAC,CAAC,SAAS,mBAAmB,IACjE,CAAC,SAAS,GAAG,WAAW,CAAC,IAAI,EAAE,GAC3B,8BAA8B,GAC9B,CAAC,SAAS,GAAG,WAAW,CAAC,UAAU,EAAE,GACjC,4BAA4B,GAC5B,KAAK,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
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
|