@eggjs/core-decorator 4.0.2-beta.1 → 4.0.2-beta.2
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,7 +1,7 @@
|
|
|
1
1
|
import { PrototypeUtil } from "../util/PrototypeUtil.js";
|
|
2
2
|
import "../util/index.js";
|
|
3
3
|
import { AccessLevel, DEFAULT_PROTO_IMPL_TYPE, ObjectInitType } from "@eggjs/tegg-types";
|
|
4
|
-
import { StackUtil } from "@eggjs/tegg-common-util";
|
|
4
|
+
import { NameUtil, StackUtil } from "@eggjs/tegg-common-util";
|
|
5
5
|
|
|
6
6
|
//#region src/decorator/MultiInstanceProto.ts
|
|
7
7
|
const DEFAULT_PARAMS = {
|
|
@@ -16,14 +16,14 @@ function MultiInstanceProto(param) {
|
|
|
16
16
|
const property = {
|
|
17
17
|
...DEFAULT_PARAMS,
|
|
18
18
|
...param,
|
|
19
|
-
className: clazz.name
|
|
19
|
+
className: NameUtil.cleanName(clazz.name)
|
|
20
20
|
};
|
|
21
21
|
PrototypeUtil.setMultiInstanceStaticProperty(clazz, property);
|
|
22
22
|
} else if (param.getObjects) {
|
|
23
23
|
const property = {
|
|
24
24
|
...DEFAULT_PARAMS,
|
|
25
25
|
...param,
|
|
26
|
-
className: clazz.name
|
|
26
|
+
className: NameUtil.cleanName(clazz.name)
|
|
27
27
|
};
|
|
28
28
|
PrototypeUtil.setMultiInstanceCallbackProperty(clazz, property);
|
|
29
29
|
}
|
|
@@ -20,7 +20,7 @@ function Prototype(param) {
|
|
|
20
20
|
const property = {
|
|
21
21
|
...DEFAULT_PARAMS,
|
|
22
22
|
...param,
|
|
23
|
-
className: clazz.name
|
|
23
|
+
className: NameUtil.cleanName(clazz.name)
|
|
24
24
|
};
|
|
25
25
|
if (!property.name) property.name = NameUtil.getClassName(clazz);
|
|
26
26
|
PrototypeUtil.setProperty(clazz, property);
|
|
@@ -38,7 +38,7 @@ var QualifierUtil = class QualifierUtil {
|
|
|
38
38
|
return res;
|
|
39
39
|
}
|
|
40
40
|
static getQualifierValue(clazz, attribute) {
|
|
41
|
-
return MetadataUtil.
|
|
41
|
+
return MetadataUtil.getOwnMetaData(QUALIFIER_META_DATA, clazz)?.get(attribute);
|
|
42
42
|
}
|
|
43
43
|
static getProperQualifier(clazz, property, attribute) {
|
|
44
44
|
return (MetadataUtil.getMetaData(PROPERTY_QUALIFIER_META_DATA, clazz)?.get(property))?.get(attribute);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eggjs/core-decorator",
|
|
3
|
-
"version": "4.0.2-beta.
|
|
3
|
+
"version": "4.0.2-beta.2",
|
|
4
4
|
"description": "tegg core decorator",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"decorator",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@eggjs/tegg-common-util": "4.0.2-beta.
|
|
38
|
-
"@eggjs/tegg-types": "4.0.2-beta.
|
|
37
|
+
"@eggjs/tegg-common-util": "4.0.2-beta.2",
|
|
38
|
+
"@eggjs/tegg-types": "4.0.2-beta.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "^24.10.2",
|