@eggjs/tegg-dynamic-inject 4.0.0-beta.7 → 4.0.0-beta.9
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.
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import { EggAbstractClazz, ImplDecorator, ImplTypeEnum, QualifierAttribute } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare class QualifierImplDecoratorUtil {
|
|
5
|
-
static generatorDecorator<T extends object, Enum extends ImplTypeEnum>(abstractClazz: EggAbstractClazz<T>, attribute: QualifierAttribute): ImplDecorator<T, Enum>;
|
|
1
|
+
import type { EggAbstractClazz, ImplDecorator, ImplTypeEnum, QualifierAttribute } from '@eggjs/tegg-types';
|
|
2
|
+
export declare class QualifierImplDecoratorUtil {
|
|
3
|
+
static generatorDecorator<T extends object, Enum extends ImplTypeEnum>(abstractClazz: EggAbstractClazz<T>, attribute: QualifierAttribute): ImplDecorator<T, Enum>;
|
|
6
4
|
}
|
|
7
|
-
//#endregion
|
|
8
|
-
export { QualifierImplDecoratorUtil };
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
+
import { QualifierUtil } from '@eggjs/core-decorator';
|
|
1
2
|
import { QualifierImplUtil } from "./QualifierImplUtil.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
//#endregion
|
|
17
|
-
export { QualifierImplDecoratorUtil };
|
|
3
|
+
export class QualifierImplDecoratorUtil {
|
|
4
|
+
static generatorDecorator(abstractClazz, attribute) {
|
|
5
|
+
return function (type) {
|
|
6
|
+
return function (clazz) {
|
|
7
|
+
QualifierImplUtil.addQualifierImpl(abstractClazz, type, clazz);
|
|
8
|
+
QualifierUtil.addProtoQualifier(clazz, attribute, type);
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUXVhbGlmaWVySW1wbERlY29yYXRvclV0aWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvUXVhbGlmaWVySW1wbERlY29yYXRvclV0aWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBRXRELE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBRTNELE1BQU0sT0FBTywwQkFBMEI7SUFDckMsTUFBTSxDQUFDLGtCQUFrQixDQUE4QyxhQUFrQyxFQUFFLFNBQTZCO1FBQ3RJLE9BQU8sVUFBUyxJQUFzQjtZQUNwQyxPQUFPLFVBQVMsS0FBMkI7Z0JBQ3pDLGlCQUFpQixDQUFDLGdCQUFnQixDQUFDLGFBQWEsRUFBRSxJQUFJLEVBQUUsS0FBSyxDQUFDLENBQUM7Z0JBQy9ELGFBQWEsQ0FBQyxpQkFBaUIsQ0FBQyxLQUFLLEVBQUUsU0FBUyxFQUFFLElBQUksQ0FBQyxDQUFDO1lBQzFELENBQUMsQ0FBQztRQUNKLENBQUMsQ0FBQztJQUNKLENBQUM7Q0FDRiJ9
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { EggAbstractClazz, EggProtoImplClass, QualifierValue } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
static getQualifierImp(abstractClazz: EggAbstractClazz, qualifierValue: QualifierValue): EggProtoImplClass | undefined;
|
|
7
|
-
static getQualifierImpMap(abstractClazz: EggAbstractClazz): Map<QualifierValue, EggProtoImplClass>;
|
|
1
|
+
import type { EggAbstractClazz, EggProtoImplClass, QualifierValue } from '@eggjs/tegg-types';
|
|
2
|
+
export declare class QualifierImplUtil {
|
|
3
|
+
static addQualifierImpl(abstractClazz: EggAbstractClazz, qualifierValue: QualifierValue, implClazz: EggProtoImplClass): void;
|
|
4
|
+
static getQualifierImp(abstractClazz: EggAbstractClazz, qualifierValue: QualifierValue): EggProtoImplClass | undefined;
|
|
5
|
+
static getQualifierImpMap(abstractClazz: EggAbstractClazz): Map<QualifierValue, EggProtoImplClass>;
|
|
8
6
|
}
|
|
9
|
-
//#endregion
|
|
10
|
-
export { QualifierImplUtil };
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { MetadataUtil } from
|
|
2
|
-
import { QUALIFIER_IMPL_MAP } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
//#
|
|
18
|
-
export { QualifierImplUtil };
|
|
1
|
+
import { MetadataUtil } from '@eggjs/core-decorator';
|
|
2
|
+
import { QUALIFIER_IMPL_MAP } from '@eggjs/tegg-types';
|
|
3
|
+
export class QualifierImplUtil {
|
|
4
|
+
static addQualifierImpl(abstractClazz, qualifierValue, implClazz) {
|
|
5
|
+
const implMap = MetadataUtil.initOwnMapMetaData(QUALIFIER_IMPL_MAP, abstractClazz, new Map());
|
|
6
|
+
implMap.set(qualifierValue, implClazz);
|
|
7
|
+
}
|
|
8
|
+
static getQualifierImp(abstractClazz, qualifierValue) {
|
|
9
|
+
const implMap = MetadataUtil.getMetaData(QUALIFIER_IMPL_MAP, abstractClazz);
|
|
10
|
+
return implMap?.get(qualifierValue);
|
|
11
|
+
}
|
|
12
|
+
static getQualifierImpMap(abstractClazz) {
|
|
13
|
+
const implMap = MetadataUtil.getMetaData(QUALIFIER_IMPL_MAP, abstractClazz);
|
|
14
|
+
return implMap || new Map();
|
|
15
|
+
}
|
|
16
|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sQ0FBQztDQUNGIn0=
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export * from
|
|
4
|
-
export { QualifierImplDecoratorUtil, QualifierImplUtil };
|
|
1
|
+
export * from '@eggjs/tegg-types/dynamic-inject';
|
|
2
|
+
export * from './QualifierImplUtil.ts';
|
|
3
|
+
export * from './QualifierImplDecoratorUtil.ts';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export { QualifierImplDecoratorUtil, QualifierImplUtil };
|
|
1
|
+
export * from '@eggjs/tegg-types/dynamic-inject';
|
|
2
|
+
export * from "./QualifierImplUtil.js";
|
|
3
|
+
export * from "./QualifierImplDecoratorUtil.js";
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxrQ0FBa0MsQ0FBQztBQUVqRCxjQUFjLHdCQUF3QixDQUFDO0FBQ3ZDLGNBQWMsaUNBQWlDLENBQUMifQ==
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eggjs/tegg-dynamic-inject",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.9",
|
|
4
4
|
"description": "tegg dynamic inject",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@eggjs/core-decorator": "4.0.0-beta.
|
|
38
|
-
"@eggjs/tegg-types": "4.0.0-beta.
|
|
37
|
+
"@eggjs/core-decorator": "4.0.0-beta.9",
|
|
38
|
+
"@eggjs/tegg-types": "4.0.0-beta.9"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "^22.10.5",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"types": "./dist/index.d.ts",
|
|
50
50
|
"scripts": {
|
|
51
51
|
"clean": "rimraf dist",
|
|
52
|
-
"build": "tsdown",
|
|
52
|
+
"build": "tsdown && rimraf dist && tsc -b --clean && tsc",
|
|
53
53
|
"typecheck": "tsc --noEmit"
|
|
54
54
|
}
|
|
55
55
|
}
|