zova-core 5.1.21 → 5.1.23
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/core/sys/resource.d.ts +0 -1
- package/dist/core/sys/resource.d.ts.map +1 -1
- package/dist/decorator/class/use.d.ts.map +1 -1
- package/dist/index.js +10 -8
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/core/sys/resource.ts +9 -8
- package/src/decorator/class/use.ts +1 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-core",
|
|
3
|
-
"version": "5.1.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "5.1.23",
|
|
4
|
+
"gitHead": "31f5f5712ea26eaebb2eae9990e6a089c1f087ca",
|
|
5
5
|
"description": "A vue3 framework with ioc",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"ioc",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@cabloy/compose": "^2.1.4",
|
|
45
45
|
"@cabloy/extend": "^3.2.3",
|
|
46
|
-
"@cabloy/json5": "^1.1.
|
|
46
|
+
"@cabloy/json5": "^1.1.6",
|
|
47
47
|
"@cabloy/localeutil": "^2.1.3",
|
|
48
48
|
"@cabloy/logger": "^1.1.9",
|
|
49
49
|
"@cabloy/module-info": "^2.0.0",
|
package/src/core/sys/resource.ts
CHANGED
|
@@ -121,19 +121,13 @@ export class AppResource {
|
|
|
121
121
|
return this.beans[fullName] as IDecoratorBeanOptionsBase<T>;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
_fixClassName(className: string) {
|
|
125
|
-
while (className.endsWith('2')) {
|
|
126
|
-
className = className.substring(0, className.length - 1);
|
|
127
|
-
}
|
|
128
|
-
return className;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
124
|
_parseSceneAndBeanName<T>(beanClass: Constructable<T>, scene?: string, name?: string): { scene: string; name: string } {
|
|
132
125
|
if (scene && name) {
|
|
133
126
|
return { scene, name };
|
|
134
127
|
}
|
|
135
128
|
// bean class name
|
|
136
|
-
let beanClassName = this._fixClassName(beanClass.name);
|
|
129
|
+
// let beanClassName = this._fixClassName(beanClass.name);
|
|
130
|
+
let beanClassName = beanClass.name;
|
|
137
131
|
// skip prefix: Bean
|
|
138
132
|
if (beanClassName.toLowerCase().startsWith('bean')) {
|
|
139
133
|
beanClassName = beanClassName.substring('bean'.length);
|
|
@@ -196,6 +190,13 @@ export class AppResource {
|
|
|
196
190
|
return deepExtend({}, options, optionsConfig);
|
|
197
191
|
}
|
|
198
192
|
}
|
|
193
|
+
|
|
194
|
+
// _fixClassName(className: string) {
|
|
195
|
+
// while (className.endsWith('2')) {
|
|
196
|
+
// className = className.substring(0, className.length - 1);
|
|
197
|
+
// }
|
|
198
|
+
// return className;
|
|
199
|
+
// }
|
|
199
200
|
}
|
|
200
201
|
|
|
201
202
|
export const appResource = new AppResource();
|
|
@@ -39,9 +39,7 @@ export function Use(options?: IDecoratorUseOptions | string): PropertyDecorator
|
|
|
39
39
|
window.setTimeout(() => {
|
|
40
40
|
const moduleTarget = appResource._getModuleName(target.constructor as any);
|
|
41
41
|
if (moduleSource !== moduleTarget) {
|
|
42
|
-
console.error(
|
|
43
|
-
`inject class should be imported by type, such as: import type { ${appResource._fixClassName(beanClass.name)} } from 'zova-module-xxx-xxx'`,
|
|
44
|
-
);
|
|
42
|
+
console.error(`inject class should be imported by type, such as: import type { ${beanClass.name} } from 'zova-module-xxx-xxx'`);
|
|
45
43
|
}
|
|
46
44
|
}, 0);
|
|
47
45
|
}
|