vona-core 5.0.29 → 5.0.31
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.
|
@@ -39,8 +39,6 @@ export class BeanContainer {
|
|
|
39
39
|
async dispose() {
|
|
40
40
|
const beanInstances = this[SymbolBeanContainerInstances];
|
|
41
41
|
for (const prop in beanInstances) {
|
|
42
|
-
if (prop.startsWith('$$'))
|
|
43
|
-
continue;
|
|
44
42
|
const beanInstance = cast(beanInstances[prop]);
|
|
45
43
|
if (beanInstance && !(beanInstance instanceof BeanAopBase) && beanInstance.__dispose__) {
|
|
46
44
|
await beanInstance.__dispose__();
|
|
@@ -340,7 +338,7 @@ export class BeanContainer {
|
|
|
340
338
|
let chains = [];
|
|
341
339
|
// aop
|
|
342
340
|
if (!proxyDisable && beanOptions && cast(beanOptions.scene) !== 'aop') {
|
|
343
|
-
const beanAop = this.app.bean._getBean('a-
|
|
341
|
+
const beanAop = this.app.bean._getBean('a-aspectutils.service.aop');
|
|
344
342
|
const aops = beanAop.findAopsMatched(beanOptions.beanFullName);
|
|
345
343
|
if (aops) {
|
|
346
344
|
chains = chains.concat(aops);
|
|
@@ -348,7 +346,7 @@ export class BeanContainer {
|
|
|
348
346
|
}
|
|
349
347
|
// aop method
|
|
350
348
|
if (!proxyDisable && beanOptions) {
|
|
351
|
-
const beanAop = this.app.bean._getBean('a-
|
|
349
|
+
const beanAop = this.app.bean._getBean('a-aspectutils.service.aop');
|
|
352
350
|
if (beanAop.hasAopMethods(beanOptions?.beanFullName)) {
|
|
353
351
|
chains.push(SymbolProxyAopMethod);
|
|
354
352
|
}
|
|
@@ -451,7 +449,7 @@ export class BeanContainer {
|
|
|
451
449
|
return result;
|
|
452
450
|
}
|
|
453
451
|
_getAopChainsProp_aopMethods(chains, aopKey, beanFullName, methodType, prop) {
|
|
454
|
-
const beanAop = this.app.bean._getBean('a-
|
|
452
|
+
const beanAop = this.app.bean._getBean('a-aspectutils.service.aop');
|
|
455
453
|
const aopMethods = beanAop.findAopMethodsMatched(beanFullName, prop);
|
|
456
454
|
for (const aopMethod of aopMethods) {
|
|
457
455
|
let fn;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { toLowerCaseFirstChar } from '@cabloy/word-utils';
|
|
2
|
-
import chalk from 'chalk';
|
|
3
2
|
import { cast } from "../../types/utils/cast.js";
|
|
4
3
|
import { BeanSimple } from "../bean/beanSimple.js";
|
|
5
4
|
import { useApp } from "../framework/useApp.js";
|
|
@@ -18,11 +17,6 @@ export class AppResource extends BeanSimple {
|
|
|
18
17
|
registerMappedClassMetadataKey(target, SymbolDecoratorUse);
|
|
19
18
|
const uses = appMetadata.getOwnMetadataMap(true, SymbolDecoratorUse, target);
|
|
20
19
|
uses[options.prop] = options;
|
|
21
|
-
if (process.env.NODE_ENV === 'development') {
|
|
22
|
-
if (typeof options.prop === 'string' && !options.prop.startsWith('$$')) {
|
|
23
|
-
console.error(chalk.red(`inject prop name should start with $$: ${options.prop}`));
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
20
|
}
|
|
27
21
|
getUses(target) {
|
|
28
22
|
return appMetadata.getMetadata(SymbolDecoratorUse, target);
|