@trapi/metadata 1.0.0-alpha.2 → 1.0.0-alpha.3
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/dist/cache/driver.js.map +1 -1
- package/dist/decorator/constants.d.ts +13 -12
- package/dist/decorator/constants.d.ts.map +1 -1
- package/dist/decorator/constants.js +13 -12
- package/dist/decorator/constants.js.map +1 -1
- package/dist/decorator/preset/utils/load.d.ts.map +1 -1
- package/dist/decorator/preset/utils/load.js +1 -4
- package/dist/decorator/preset/utils/load.js.map +1 -1
- package/dist/decorator/property-manager/module.d.ts +6 -8
- package/dist/decorator/property-manager/module.d.ts.map +1 -1
- package/dist/decorator/property-manager/module.js +14 -20
- package/dist/decorator/property-manager/module.js.map +1 -1
- package/dist/decorator/property-manager/utils.d.ts +4 -5
- package/dist/decorator/property-manager/utils.d.ts.map +1 -1
- package/dist/decorator/property-manager/utils.js +55 -84
- package/dist/decorator/property-manager/utils.js.map +1 -1
- package/dist/decorator/sets/class.d.ts +2 -2
- package/dist/decorator/sets/class.d.ts.map +1 -1
- package/dist/decorator/sets/method.d.ts +2 -2
- package/dist/decorator/sets/method.d.ts.map +1 -1
- package/dist/decorator/sets/mixed.d.ts +6 -2
- package/dist/decorator/sets/mixed.d.ts.map +1 -1
- package/dist/decorator/sets/parameter.d.ts +2 -2
- package/dist/decorator/sets/parameter.d.ts.map +1 -1
- package/dist/decorator/sets/request.d.ts +2 -2
- package/dist/decorator/sets/request.d.ts.map +1 -1
- package/dist/decorator/sets/response.d.ts +3 -2
- package/dist/decorator/sets/response.d.ts.map +1 -1
- package/dist/decorator/type.d.ts +8 -15
- package/dist/decorator/type.d.ts.map +1 -1
- package/dist/error/index.d.ts +0 -1
- package/dist/error/index.d.ts.map +1 -1
- package/dist/error/index.js +0 -1
- package/dist/error/index.js.map +1 -1
- package/dist/generator/abstract.d.ts +6 -13
- package/dist/generator/abstract.d.ts.map +1 -1
- package/dist/generator/abstract.js +48 -56
- package/dist/generator/abstract.js.map +1 -1
- package/dist/generator/controller/module.d.ts +2 -2
- package/dist/generator/controller/module.d.ts.map +1 -1
- package/dist/generator/controller/module.js +24 -19
- package/dist/generator/controller/module.js.map +1 -1
- package/dist/generator/controller/type.d.ts +12 -7
- package/dist/generator/controller/type.d.ts.map +1 -1
- package/dist/generator/metadata/index.d.ts +1 -0
- package/dist/generator/metadata/index.d.ts.map +1 -1
- package/dist/generator/metadata/index.js +1 -0
- package/dist/generator/metadata/index.js.map +1 -1
- package/dist/generator/metadata/module.d.ts +0 -2
- package/dist/generator/metadata/module.d.ts.map +1 -1
- package/dist/generator/metadata/module.js +13 -33
- package/dist/generator/metadata/module.js.map +1 -1
- package/dist/generator/metadata/utils.d.ts +3 -0
- package/dist/generator/metadata/utils.d.ts.map +1 -0
- package/dist/generator/metadata/utils.js +19 -0
- package/dist/generator/metadata/utils.js.map +1 -0
- package/dist/generator/method/module.d.ts +8 -9
- package/dist/generator/method/module.d.ts.map +1 -1
- package/dist/generator/method/module.js +53 -72
- package/dist/generator/method/module.js.map +1 -1
- package/dist/generator/parameter/constants.d.ts +19 -0
- package/dist/generator/parameter/constants.d.ts.map +1 -0
- package/dist/generator/parameter/constants.js +30 -0
- package/dist/generator/parameter/constants.js.map +1 -0
- package/dist/generator/parameter/error.d.ts +35 -0
- package/dist/generator/parameter/error.d.ts.map +1 -0
- package/dist/generator/parameter/error.js +68 -0
- package/dist/generator/parameter/error.js.map +1 -0
- package/dist/generator/parameter/index.d.ts +2 -0
- package/dist/generator/parameter/index.d.ts.map +1 -1
- package/dist/generator/parameter/index.js +2 -0
- package/dist/generator/parameter/index.js.map +1 -1
- package/dist/generator/parameter/module.d.ts +7 -6
- package/dist/generator/parameter/module.d.ts.map +1 -1
- package/dist/generator/parameter/module.js +362 -196
- package/dist/generator/parameter/module.js.map +1 -1
- package/dist/generator/parameter/type.d.ts +8 -5
- package/dist/generator/parameter/type.d.ts.map +1 -1
- package/dist/generator/parameter/validator.d.ts.map +1 -1
- package/dist/generator/parameter/validator.js +15 -9
- package/dist/generator/parameter/validator.js.map +1 -1
- package/dist/generator/type.d.ts +8 -5
- package/dist/generator/type.d.ts.map +1 -1
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +10 -3
- package/dist/module.js.map +1 -1
- package/dist/resolver/module.d.ts +1 -1
- package/dist/resolver/module.d.ts.map +1 -1
- package/dist/resolver/module.js +7 -7
- package/dist/resolver/module.js.map +1 -1
- package/dist/utils/js-doc/index.d.ts +1 -0
- package/dist/utils/js-doc/index.d.ts.map +1 -1
- package/dist/utils/js-doc/index.js +1 -0
- package/dist/utils/js-doc/index.js.map +1 -1
- package/dist/utils/js-doc/module.d.ts.map +1 -1
- package/dist/utils/js-doc/module.js +2 -7
- package/dist/utils/js-doc/module.js.map +1 -1
- package/dist/utils/js-doc/utils.d.ts +3 -0
- package/dist/utils/js-doc/utils.d.ts.map +1 -0
- package/dist/utils/js-doc/utils.js +29 -0
- package/dist/utils/js-doc/utils.js.map +1 -0
- package/dist/utils/object.d.ts.map +1 -1
- package/dist/utils/object.js +1 -0
- package/dist/utils/object.js.map +1 -1
- package/package.json +5 -4
- package/dist/error/parameter-invalid.d.ts +0 -4
- package/dist/error/parameter-invalid.d.ts.map +0 -1
- package/dist/error/parameter-invalid.js +0 -14
- package/dist/error/parameter-invalid.js.map +0 -1
package/dist/cache/driver.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.js","sourceRoot":"","sources":["../../src/cache/driver.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAEH,mCAAmD;AACnD,sDAAyB;AACzB,0DAA6B;AAC7B,mCAA8D;AAG9D,MAAa,WAAW;IAGpB,YAAY,KAA4C;QACpD,IAAI,CAAC,OAAO,GAAG,IAAA,yBAAiB,EAAC,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED,4EAA4E;IAE5E,KAAK,CAAC,IAAI,CAAC,IAAe;QACtB,IAAI,CAAC,IA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AAwB;QACzD,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE;YAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;SAChC;QACD,OAAO,YAAY,IAAI,IAAI,IAAA,wBAAgB,EAAC,eAAe,CAAC,OAAO,CAAC;IACxE,CAAC;CACJ;AAxFD,kCAwFC"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
export declare enum DecoratorID {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
REQUEST_CONSUMES = "requestConsumes",
|
|
2
|
+
CONTROLLER = "controller",
|
|
3
|
+
DESCRIPTION = "description",
|
|
4
|
+
EXAMPLE = "example",
|
|
5
|
+
PRODUCES = "produces",
|
|
6
|
+
ACCEPT = "accept",
|
|
7
|
+
CONSUMES = "consumes",
|
|
9
8
|
DEPRECATED = "deprecated",
|
|
10
9
|
EXTENSION = "extension",
|
|
11
10
|
HIDDEN = "hidden",
|
|
12
|
-
|
|
11
|
+
SECURITY = "security",
|
|
12
|
+
TAGS = "tags",
|
|
13
|
+
MOUNT = "mount",
|
|
13
14
|
ALL = "all",
|
|
14
15
|
GET = "get",
|
|
15
16
|
POST = "post",
|
|
@@ -32,9 +33,9 @@ export declare enum DecoratorID {
|
|
|
32
33
|
HEADERS = "headers",
|
|
33
34
|
COOKIE = "cookie",
|
|
34
35
|
COOKIES = "cookies",
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
PATH = "path",
|
|
37
|
+
PATHS = "paths",
|
|
38
|
+
FILE = "file",
|
|
39
|
+
FILES = "files"
|
|
39
40
|
}
|
|
40
41
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/decorator/constants.ts"],"names":[],"mappings":"AAOA,oBAAY,WAAW;IACnB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/decorator/constants.ts"],"names":[],"mappings":"AAOA,oBAAY,WAAW;IACnB,UAAU,eAAe;IAEzB,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,QAAQ,aAAa;IAErB,MAAM,WAAW;IACjB,QAAQ,aAAa;IAErB,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,IAAI,SAAS;IAEb,KAAK,UAAU;IAEf,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,IAAI,SAAS;IAGb,MAAM,UAAU;IAChB,OAAO,WAAW;IAClB,QAAQ,YAAY;IACpB,SAAS,aAAa;IAGtB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;IACb,KAAK,UAAU;CAClB"}
|
|
@@ -9,17 +9,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.DecoratorID = void 0;
|
|
10
10
|
var DecoratorID;
|
|
11
11
|
(function (DecoratorID) {
|
|
12
|
-
DecoratorID["
|
|
13
|
-
DecoratorID["
|
|
14
|
-
DecoratorID["
|
|
15
|
-
DecoratorID["
|
|
16
|
-
DecoratorID["
|
|
17
|
-
DecoratorID["
|
|
18
|
-
DecoratorID["REQUEST_CONSUMES"] = "requestConsumes";
|
|
12
|
+
DecoratorID["CONTROLLER"] = "controller";
|
|
13
|
+
DecoratorID["DESCRIPTION"] = "description";
|
|
14
|
+
DecoratorID["EXAMPLE"] = "example";
|
|
15
|
+
DecoratorID["PRODUCES"] = "produces";
|
|
16
|
+
DecoratorID["ACCEPT"] = "accept";
|
|
17
|
+
DecoratorID["CONSUMES"] = "consumes";
|
|
19
18
|
DecoratorID["DEPRECATED"] = "deprecated";
|
|
20
19
|
DecoratorID["EXTENSION"] = "extension";
|
|
21
20
|
DecoratorID["HIDDEN"] = "hidden";
|
|
22
|
-
DecoratorID["
|
|
21
|
+
DecoratorID["SECURITY"] = "security";
|
|
22
|
+
DecoratorID["TAGS"] = "tags";
|
|
23
|
+
DecoratorID["MOUNT"] = "mount";
|
|
23
24
|
DecoratorID["ALL"] = "all";
|
|
24
25
|
DecoratorID["GET"] = "get";
|
|
25
26
|
DecoratorID["POST"] = "post";
|
|
@@ -44,9 +45,9 @@ var DecoratorID;
|
|
|
44
45
|
DecoratorID["HEADERS"] = "headers";
|
|
45
46
|
DecoratorID["COOKIE"] = "cookie";
|
|
46
47
|
DecoratorID["COOKIES"] = "cookies";
|
|
47
|
-
DecoratorID["
|
|
48
|
-
DecoratorID["
|
|
49
|
-
DecoratorID["
|
|
50
|
-
DecoratorID["
|
|
48
|
+
DecoratorID["PATH"] = "path";
|
|
49
|
+
DecoratorID["PATHS"] = "paths";
|
|
50
|
+
DecoratorID["FILE"] = "file";
|
|
51
|
+
DecoratorID["FILES"] = "files";
|
|
51
52
|
})(DecoratorID = exports.DecoratorID || (exports.DecoratorID = {}));
|
|
52
53
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/decorator/constants.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,IAAY,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/decorator/constants.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,IAAY,WAgDX;AAhDD,WAAY,WAAW;IACnB,wCAAyB,CAAA;IAEzB,0CAA2B,CAAA;IAC3B,kCAAmB,CAAA;IACnB,oCAAqB,CAAA;IAErB,gCAAiB,CAAA;IACjB,oCAAqB,CAAA;IAErB,wCAAyB,CAAA;IACzB,sCAAuB,CAAA;IACvB,gCAAiB,CAAA;IACjB,oCAAqB,CAAA;IACrB,4BAAa,CAAA;IAEb,8BAAe,CAAA;IAEf,0BAAW,CAAA;IACX,0BAAW,CAAA;IACX,4BAAa,CAAA;IACb,0BAAW,CAAA;IACX,gCAAiB,CAAA;IACjB,8BAAe,CAAA;IACf,kCAAmB,CAAA;IACnB,4BAAa,CAAA;IAEb,YAAY;IACZ,+BAAgB,CAAA;IAChB,iCAAkB,CAAA;IAClB,mCAAoB,CAAA;IACpB,qCAAsB,CAAA;IAEtB,mBAAmB;IACnB,kCAAmB,CAAA;IACnB,8BAAe,CAAA;IACf,gCAAiB,CAAA;IACjB,8BAAe,CAAA;IACf,4BAAa,CAAA;IACb,4BAAa,CAAA;IACb,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;IACnB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,4BAAa,CAAA;IACb,8BAAe,CAAA;AACnB,CAAC,EAhDW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAgDtB"}
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,CAsC3E"}
|
|
@@ -16,10 +16,7 @@ async function loadPreset(input) {
|
|
|
16
16
|
let allFailed = true;
|
|
17
17
|
for (let i = 0; i < lookupPaths.length; i++) {
|
|
18
18
|
try {
|
|
19
|
-
|
|
20
|
-
if ((0, locter_1.hasOwnProperty)(content, 'default')) {
|
|
21
|
-
content = content.default;
|
|
22
|
-
}
|
|
19
|
+
const { value: content } = (0, locter_1.getModuleExport)(await (0, locter_1.load)(lookupPaths[i]));
|
|
23
20
|
if ((0, check_1.isPresetSchema)(content)) {
|
|
24
21
|
items.push(...content.items);
|
|
25
22
|
const extendsPromises = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load.js","sourceRoot":"","sources":["../../../../src/decorator/preset/utils/load.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"load.js","sourceRoot":"","sources":["../../../../src/decorator/preset/utils/load.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,mCAA+C;AAE/C,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;QACzC,IAAI;YACA,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,IAAA,wBAAe,EAAC,MAAM,IAAA,aAAI,EAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAEvE,IAAI,IAAA,sBAAc,EAAC,OAAO,CAAC,EAAE;gBACzB,KAAK,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;gBAE7B,MAAM,eAAe,GAAkC,EAAE,CAAC;gBAE1D,IAAI,OAAO,CAAC,OAAO,EAAE;oBACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;wBAC7C,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;qBACxD;iBACJ;gBAED,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;gBAClD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;oBACpC,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;iBAC5B;aACJ;YAED,SAAS,GAAG,KAAK,CAAC;SACrB;QAAC,OAAO,CAAC,EAAE;YACR,iBAAiB;SACpB;KACJ;IAED,IAAI,SAAS,EAAE;QACX,MAAM,IAAI,KAAK,CAAC,cAAc,KAAK,yBAAyB,CAAC,CAAC;KACjE;IAED,OAAO,KAAK,CAAC;AACjB,CAAC;AAtCD,gCAsCC"}
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import type { DecoratorConfig, DecoratorID, DecoratorProperties,
|
|
1
|
+
import type { DecoratorConfig, DecoratorID, DecoratorProperties, DecoratorPropertyConfig } from '../index';
|
|
2
2
|
import type { NodeDecorator } from '../../utils';
|
|
3
3
|
export declare class DecoratorPropertyManager<T extends `${DecoratorID}`> {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
readonly representation: DecoratorConfig<T>;
|
|
5
|
+
readonly decorators: NodeDecorator[];
|
|
6
|
+
protected properties: Record<string, DecoratorPropertyConfig>;
|
|
7
7
|
constructor(representation: DecoratorConfig<T>, decorators: NodeDecorator[]);
|
|
8
|
-
get key(): T;
|
|
9
8
|
/**
|
|
10
9
|
* Get one or more specific value(s) of the decorator arguments or typeArguments.
|
|
11
10
|
*
|
|
12
11
|
* @param type
|
|
13
12
|
* @param decoratorOrIndex
|
|
14
13
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
protected extendProperty<P extends keyof DecoratorProperties<T>>(type: P): DecoratorPropertyConfig;
|
|
14
|
+
get<P extends keyof DecoratorProperties<T>>(type: P, decoratorOrIndex?: number | NodeDecorator): DecoratorProperties<T>[P] | undefined;
|
|
15
|
+
protected build(): void;
|
|
18
16
|
}
|
|
19
17
|
//# sourceMappingURL=module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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"}
|
|
@@ -11,12 +11,10 @@ const utils_1 = require("../../utils");
|
|
|
11
11
|
const utils_2 = require("./utils");
|
|
12
12
|
class DecoratorPropertyManager {
|
|
13
13
|
constructor(representation, decorators) {
|
|
14
|
-
this.extendedProperties = {};
|
|
15
14
|
this.representation = representation;
|
|
16
15
|
this.decorators = decorators;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return this.representation.id;
|
|
16
|
+
this.properties = {};
|
|
17
|
+
this.build();
|
|
20
18
|
}
|
|
21
19
|
// -------------------------------------------
|
|
22
20
|
/**
|
|
@@ -25,11 +23,11 @@ class DecoratorPropertyManager {
|
|
|
25
23
|
* @param type
|
|
26
24
|
* @param decoratorOrIndex
|
|
27
25
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
if (typeof config === 'undefined') {
|
|
26
|
+
get(type, decoratorOrIndex) {
|
|
27
|
+
if (!(0, utils_1.hasOwnProperty)(this.properties, type)) {
|
|
31
28
|
return undefined;
|
|
32
29
|
}
|
|
30
|
+
const config = this.properties[type];
|
|
33
31
|
let decorator;
|
|
34
32
|
if (typeof decoratorOrIndex === 'number' ||
|
|
35
33
|
typeof decoratorOrIndex === 'undefined') {
|
|
@@ -42,23 +40,19 @@ class DecoratorPropertyManager {
|
|
|
42
40
|
else {
|
|
43
41
|
decorator = decoratorOrIndex;
|
|
44
42
|
}
|
|
45
|
-
return (0, utils_2.
|
|
43
|
+
return (0, utils_2.extractPropertyFromDecorator)(decorator, config);
|
|
46
44
|
}
|
|
47
45
|
// -------------------------------------------
|
|
48
|
-
|
|
49
|
-
if (!
|
|
50
|
-
return
|
|
46
|
+
build() {
|
|
47
|
+
if (!this.representation.properties) {
|
|
48
|
+
return;
|
|
51
49
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
if ((0, utils_1.hasOwnProperty)(this.extendedProperties, type)) {
|
|
57
|
-
return this.extendedProperties[type];
|
|
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]]);
|
|
58
54
|
}
|
|
59
|
-
|
|
60
|
-
this.extendedProperties[type] = (0, utils_2.extendRepresentationPropertyConfig)(property);
|
|
61
|
-
return this.extendedProperties[type];
|
|
55
|
+
this.properties = output;
|
|
62
56
|
}
|
|
63
57
|
}
|
|
64
58
|
exports.DecoratorPropertyManager = DecoratorPropertyManager;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../src/decorator/property-manager/module.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;
|
|
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;QACrC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QAErB,IAAI,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC;IAED,8CAA8C;IAE9C;;;;;OAKG;IACI,GAAG,CACN,IAAO,EACP,gBAAyC;QAEzC,IAAI,CAAC,IAAA,sBAAc,EAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,EAAE;YACxC,OAAO,SAAS,CAAC;SACpB;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAErC,IAAI,SAAwB,CAAC;QAE7B,IACI,OAAO,gBAAgB,KAAK,QAAQ;YACpC,OAAO,gBAAgB,KAAK,WAAW,EACzC;YACE,gBAAgB,GAAG,gBAAgB,IAAI,CAAC,CAAC;YACzC,IAAI,gBAAgB,GAAG,CAAC,IAAI,gBAAgB,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBACpE,OAAO,SAAS,CAAC;aACpB;YAED,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;SACjD;aAAM;YACH,SAAS,GAAG,gBAAgB,CAAC;SAChC;QAED,OAAO,IAAA,oCAA4B,EAAC,SAAS,EAAE,MAAM,CAA8B,CAAC;IACxF,CAAC;IAED,8CAA8C;IAEpC,KAAK;QACX,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE;YACjC,OAAO;SACV;QAED,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QACzD,MAAM,MAAM,GAA6C,EAAE,CAAC;QAC5D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAClC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,IAAA,oCAA4B,EAAC,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAC3F;QAED,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;IAC7B,CAAC;CACJ;AAtED,4DAsEC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { DecoratorPropertyConfig } from '../type';
|
|
2
1
|
import type { NodeDecorator } from '../../utils';
|
|
3
|
-
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
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[]): Record<string, any>;
|
|
7
6
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/decorator/property-manager/utils.ts"],"names":[],"mappings":"
|
|
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,uBAmC7C"}
|
|
@@ -6,107 +6,78 @@
|
|
|
6
6
|
* view the LICENSE file that was distributed with this source code.
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.
|
|
9
|
+
exports.mergeArguments = exports.extractPropertyFromDecorator = exports.buildDecoratorPropertyConfig = void 0;
|
|
10
|
+
const locter_1 = require("locter");
|
|
10
11
|
const utils_1 = require("../../utils");
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
property
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
property.
|
|
17
|
-
}
|
|
18
|
-
if (typeof property.srcArgumentType === 'undefined') {
|
|
19
|
-
property.srcArgumentType = 'argument';
|
|
20
|
-
}
|
|
21
|
-
if (property.type === 'element' &&
|
|
22
|
-
typeof property.srcPosition === 'undefined') {
|
|
23
|
-
property.srcPosition = 0;
|
|
24
|
-
}
|
|
25
|
-
return property;
|
|
12
|
+
function buildDecoratorPropertyConfig(property) {
|
|
13
|
+
return {
|
|
14
|
+
...property,
|
|
15
|
+
isType: property.isType ?? false,
|
|
16
|
+
index: property.index ?? 0,
|
|
17
|
+
amount: property.amount ?? 1,
|
|
18
|
+
};
|
|
26
19
|
}
|
|
27
|
-
exports.
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
case 'argument':
|
|
35
|
-
items = decorator.arguments;
|
|
36
|
-
break;
|
|
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;
|
|
37
27
|
}
|
|
38
|
-
|
|
39
|
-
items
|
|
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;
|
|
40
33
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
switch (config.type) {
|
|
45
|
-
case 'element':
|
|
46
|
-
return undefined;
|
|
47
|
-
case 'array':
|
|
48
|
-
return [];
|
|
34
|
+
if (config.strategy) {
|
|
35
|
+
if (config.strategy === 'merge') {
|
|
36
|
+
return mergeArguments(data);
|
|
49
37
|
}
|
|
38
|
+
return config.strategy(data);
|
|
50
39
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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) {
|
|
54
50
|
if (data.length === 0) {
|
|
55
|
-
return
|
|
51
|
+
return undefined;
|
|
56
52
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
case 'none':
|
|
68
|
-
// if we don't have any merge strategy, we just return the first argument.
|
|
69
|
-
switch (config.type) {
|
|
70
|
-
case 'array': {
|
|
71
|
-
const arr = Array.isArray(data[0]) ? data[0] : [data[0]];
|
|
72
|
-
return arr;
|
|
73
|
-
}
|
|
74
|
-
case 'element':
|
|
75
|
-
default:
|
|
76
|
-
return data[0];
|
|
77
|
-
}
|
|
78
|
-
default:
|
|
79
|
-
if (typeof config.srcStrategy === 'function') {
|
|
80
|
-
return config.srcStrategy(data);
|
|
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]);
|
|
81
62
|
}
|
|
82
|
-
return (config.type === 'array' ? [] : undefined);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
exports.extractRepresentationPropertyValue = extractRepresentationPropertyValue;
|
|
86
|
-
function mergeObjectArguments(data) {
|
|
87
|
-
let output = {};
|
|
88
|
-
for (let i = 0; i < data.length; i++) {
|
|
89
|
-
const prototype = Object.prototype.toString.call(data[i]);
|
|
90
|
-
if (prototype === '[object Object]') {
|
|
91
|
-
output = Object.assign(output, data[i]);
|
|
92
63
|
}
|
|
64
|
+
return element;
|
|
93
65
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
let
|
|
99
|
-
for (let i = 0; i < data.length; i++) {
|
|
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++) {
|
|
100
71
|
if (Array.isArray(data[i])) {
|
|
101
|
-
|
|
72
|
+
output.push(...data[i]);
|
|
102
73
|
}
|
|
103
74
|
else {
|
|
104
|
-
|
|
75
|
+
output.push(data[i]);
|
|
105
76
|
}
|
|
106
77
|
}
|
|
107
|
-
return
|
|
78
|
+
return output;
|
|
108
79
|
}
|
|
109
|
-
exports.
|
|
80
|
+
exports.mergeArguments = mergeArguments;
|
|
110
81
|
function extractValueFromArgumentType(argument) {
|
|
111
82
|
const values = [];
|
|
112
83
|
for (let i = 0; i < argument.length; i++) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/decorator/property-manager/utils.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;
|
|
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,IAAI,CAAC;QAC1B,MAAM,EAAE,QAAQ,CAAC,MAAM,IAAI,CAAC;KAC/B,CAAC;AACN,CAAC;AAPD,oEAOC;AAED,SAAgB,4BAA4B,CACxC,SAAwB,EACxB,MAA+B;IAE/B,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QACzB,SAAS,CAAC,aAAa,CAAC,CAAC;QACzB,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ACZ;QAED,MAAM,CAAC,IAAI,CAAC,IAAA,2BAAmB,EAAC,QAAQ,CAAC,CAAC,CAAe,CAAC,CAAC,CAAC;KAC/D;IAED,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -2,6 +2,6 @@ import type { DecoratorID } from '../constants';
|
|
|
2
2
|
import type { DecoratorPropertyValueSchema } from './type';
|
|
3
3
|
export type DecoratorSwaggerTagsProperties = DecoratorPropertyValueSchema<string[]>;
|
|
4
4
|
export type DecoratorClassPathProperties = DecoratorPropertyValueSchema<string>;
|
|
5
|
-
export type DecoratorClassSetID = `${DecoratorID.
|
|
6
|
-
export type DecoratorClassSetProperties<T extends DecoratorClassSetID> = T extends `${DecoratorID.
|
|
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
7
|
//# sourceMappingURL=class.d.ts.map
|
|
@@ -1 +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,
|
|
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"}
|
|
@@ -9,6 +9,6 @@ export type DecoratorGetProperties = DecoratorPropertyValueSchema<string | undef
|
|
|
9
9
|
export type DecoratorPostProperties = DecoratorPropertyValueSchema<string | undefined>;
|
|
10
10
|
export type DecoratorPutProperties = DecoratorPropertyValueSchema<string | undefined>;
|
|
11
11
|
export type DecoratorPatchProperties = DecoratorPropertyValueSchema<string | undefined>;
|
|
12
|
-
export type DecoratorMethodSetID = `${DecoratorID.ALL}` | `${DecoratorID.DELETE}` | `${DecoratorID.HEAD}` | `${DecoratorID.PATCH}` | `${DecoratorID.
|
|
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.
|
|
12
|
+
export type DecoratorMethodSetID = `${DecoratorID.ALL}` | `${DecoratorID.DELETE}` | `${DecoratorID.HEAD}` | `${DecoratorID.PATCH}` | `${DecoratorID.MOUNT}` | `${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.MOUNT}` ? DecoratorMethodPathProperties : T extends `${DecoratorID.POST}` ? DecoratorPostProperties : T extends `${DecoratorID.PUT}` ? DecoratorPutProperties : never;
|
|
14
14
|
//# sourceMappingURL=method.d.ts.map
|
|
@@ -1 +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,GAAG,SAAS,CAAC,CAAC;AAC1F,MAAM,MAAM,sBAAsB,GAAG,4BAA4B,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;AACtF,MAAM,M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F,MAAM,MAAM,wBAAwB,GAAG,4BAA4B,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;AAExF,MAAM,MAAM,oBAAoB,GAAG,GAAG,WAAW,CAAC,GAAG,EAAE,GACnD,GAAG,WAAW,CAAC,MAAM,EAAE,GACvB,GAAG,WAAW,CAAC,IAAI,EAAE,GACrB,GAAG,WAAW,CAAC,KAAK,EAAE,GACtB,GAAG,WAAW,CAAC,KAAK,EAAE,GACtB,GAAG,WAAW,CAAC,IAAI,EAAE,GACrB,GAAG,WAAW,CAAC,GAAG,EAAE,GACpB,GAAG,WAAW,CAAC,OAAO,EAAE,CAAC;AAE7B,MAAM,MAAM,4BAA4B,CAAC,CAAC,SAAS,oBAAoB,IACnE,CAAC,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE,GAC1B,sBAAsB,GACtB,CAAC,SAAS,GAAG,WAAW,CAAC,MAAM,EAAE,GAC7B,yBAAyB,GACzB,CAAC,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE,GAC1B,sBAAsB,GACtB,CAAC,SAAS,GAAG,WAAW,CAAC,IAAI,EAAE,GAC3B,uBAAuB,GACvB,CAAC,SAAS,GAAG,WAAW,CAAC,OAAO,EAAE,GAC9B,0BAA0B,GAC1B,CAAC,SAAS,GAAG,WAAW,CAAC,KAAK,EAAE,GAC5B,wBAAwB,GACxB,CAAC,SAAS,GAAG,WAAW,CAAC,KAAK,EAAE,GAC5B,6BAA6B,GAC7B,CAAC,SAAS,GAAG,WAAW,CAAC,IAAI,EAAE,GAC3B,uBAAuB,GACvB,CAAC,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE,GAC1B,sBAAsB,GACtB,KAAK,CAAC"}
|
|
@@ -3,6 +3,10 @@ export type DecoratorExtensionProperties = {
|
|
|
3
3
|
key: string;
|
|
4
4
|
value: unknown | unknown[];
|
|
5
5
|
};
|
|
6
|
-
export type
|
|
7
|
-
|
|
6
|
+
export type DecoratorSecurityProperties = {
|
|
7
|
+
key: string | Record<string, string[]>;
|
|
8
|
+
value?: unknown[];
|
|
9
|
+
};
|
|
10
|
+
export type DecoratorMixedSetID = `${DecoratorID.DEPRECATED}` | `${DecoratorID.HIDDEN}` | `${DecoratorID.EXTENSION}` | `${DecoratorID.SECURITY}`;
|
|
11
|
+
export type DecoratorMixedSetProperties<T extends DecoratorMixedSetID> = T extends `${DecoratorID.EXTENSION}` ? DecoratorExtensionProperties : T extends `${DecoratorID.SECURITY}` ? DecoratorSecurityProperties : never;
|
|
8
12
|
//# sourceMappingURL=mixed.d.ts.map
|
|
@@ -1 +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;
|
|
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;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACtC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACvC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAA;CACpB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,GAAG,WAAW,CAAC,UAAU,EAAE,GACzD,GAAG,WAAW,CAAC,MAAM,EAAE,GACvB,GAAG,WAAW,CAAC,SAAS,EAAE,GAC1B,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC;AAE9B,MAAM,MAAM,2BAA2B,CAAC,CAAC,SAAS,mBAAmB,IAC7D,CAAC,SAAS,GAAG,WAAW,CAAC,SAAS,EAAE,GAChC,4BAA4B,GAC5B,CAAC,SAAS,GAAG,WAAW,CAAC,QAAQ,EAAE,GAC/B,2BAA2B,GAC3B,KAAK,CAAC"}
|
|
@@ -16,6 +16,6 @@ export type DecoratorPathParamProperties = DecoratorPropertyValueSchema<string>;
|
|
|
16
16
|
export type DecoratorPathParamsProperties = DecoratorPropertyValueSchema<string | undefined>;
|
|
17
17
|
export type DecoratorFileProperties = DecoratorPropertyValueSchema<string>;
|
|
18
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.
|
|
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.
|
|
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}` | `${DecoratorID.PATHS}` | `${DecoratorID.FILE}` | `${DecoratorID.FILES}`;
|
|
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}` ? DecoratorPathParamProperties : T extends `${DecoratorID.PATHS}` ? DecoratorPathParamsProperties : T extends `${DecoratorID.FILE}` ? DecoratorFileProperties : T extends `${DecoratorID.FILES}` ? DecoratorFilesParamProperties : never;
|
|
21
21
|
//# sourceMappingURL=parameter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameter.d.ts","sourceRoot":"","sources":["../../../src/decorator/sets/parameter.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAE3D,MAAM,MAAM,wBAAwB,GAAG,4BAA4B,CAAC,MAAM,CAAC,CAAC;AAC5E,MAAM,MAAM,yBAAyB,GAAG,4B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AG,WAAW,CAAC,MAAM,EAAE,GAC7B,yBAAyB,GACzB,CAAC,SAAS,GAAG,WAAW,CAAC,OAAO,EAAE,GAC9B,0BAA0B,GAC1B,CAAC,SAAS,GAAG,WAAW,CAAC,MAAM,EAAE,GAC7B,yBAAyB,GACzB,CAAC,SAAS,GAAG,WAAW,CAAC,OAAO,EAAE,GAC9B,0BAA0B,GAC1B,CAAC,SAAS,GAAG,WAAW,CAAC,IAAI,EAAE,GAC3B,4BAA4B,GAC5B,CAAC,SAAS,GAAG,WAAW,CAAC,KAAK,EAAE,GAC5B,6BAA6B,GAC7B,CAAC,SAAS,GAAG,WAAW,CAAC,IAAI,EAAE,GAC3B,uBAAuB,GACvB,CAAC,SAAS,GAAG,WAAW,CAAC,KAAK,EAAE,GAC5B,6BAA6B,GAC7B,KAAK,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DecoratorID } from '../constants';
|
|
2
2
|
import type { DecoratorPropertyValueSchema } from './type';
|
|
3
3
|
export type DecoratorRequestConsumesProperties = DecoratorPropertyValueSchema<string[]>;
|
|
4
|
-
export type DecoratorRequestSetID = `${DecoratorID.
|
|
5
|
-
export type DecoratorRequestSetProperties<T extends DecoratorRequestSetID> = T extends `${DecoratorID.
|
|
4
|
+
export type DecoratorRequestSetID = `${DecoratorID.ACCEPT}` | `${DecoratorID.CONSUMES}`;
|
|
5
|
+
export type DecoratorRequestSetProperties<T extends DecoratorRequestSetID> = T extends `${DecoratorID.ACCEPT}` ? never : T extends `${DecoratorID.CONSUMES}` ? DecoratorRequestConsumesProperties : never;
|
|
6
6
|
//# sourceMappingURL=request.d.ts.map
|
|
@@ -1 +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,
|
|
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,MAAM,EAAE,GACvD,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC;AAE9B,MAAM,MAAM,6BAA6B,CAAC,CAAC,SAAS,qBAAqB,IACrE,CAAC,SAAS,GAAG,WAAW,CAAC,MAAM,EAAE,GAC7B,KAAK,GACL,CAAC,SAAS,GAAG,WAAW,CAAC,QAAQ,EAAE,GAC/B,kCAAkC,GAClC,KAAK,CAAC"}
|
|
@@ -9,8 +9,9 @@ export type DecoratorResponseDescriptionProperties = {
|
|
|
9
9
|
export type DecoratorResponseExampleProperties = {
|
|
10
10
|
type: unknown;
|
|
11
11
|
payload: unknown | unknown[];
|
|
12
|
+
label?: string;
|
|
12
13
|
};
|
|
13
14
|
export type DecoratorResponseProducesProperties = DecoratorPropertyValueSchema<string[]>;
|
|
14
|
-
export type DecoratorResponseSetID = `${DecoratorID.
|
|
15
|
-
export type DecoratorResponseSetProperties<T extends DecoratorResponseSetID> = T extends `${DecoratorID.
|
|
15
|
+
export type DecoratorResponseSetID = `${DecoratorID.DESCRIPTION}` | `${DecoratorID.EXAMPLE}` | `${DecoratorID.PRODUCES}`;
|
|
16
|
+
export type DecoratorResponseSetProperties<T extends DecoratorResponseSetID> = T extends `${DecoratorID.DESCRIPTION}` ? DecoratorResponseDescriptionProperties : T extends `${DecoratorID.EXAMPLE}` ? DecoratorResponseExampleProperties : T extends `${DecoratorID.PRODUCES}` ? DecoratorResponseProducesProperties : never;
|
|
16
17
|
//# sourceMappingURL=response.d.ts.map
|
|
@@ -1 +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;
|
|
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,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;CACjB,CAAC;AACF,MAAM,MAAM,mCAAmC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