moost 0.5.6 → 0.5.8
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/index.cjs +5 -5
- package/dist/index.mjs +5 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -116,8 +116,8 @@ function getNewMoostInfact() {
|
|
|
116
116
|
case 'new-instance': {
|
|
117
117
|
const scope = getMoostMate().read(targetClass)?.injectable || 'SINGLETON';
|
|
118
118
|
if (loggingOptions.newInstance === false ||
|
|
119
|
-
loggingOptions.newInstance === scope ||
|
|
120
|
-
|
|
119
|
+
!(loggingOptions.newInstance === scope ||
|
|
120
|
+
(loggingOptions.newInstance === 'SINGLETON' && scope === true))) {
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
123
|
break;
|
|
@@ -691,10 +691,10 @@ function InjectEventLogger(topic) {
|
|
|
691
691
|
return Resolve(() => eventCore.useEventLogger(topic));
|
|
692
692
|
}
|
|
693
693
|
function InjectMoostLogger(topic) {
|
|
694
|
-
return Resolve(async () => {
|
|
695
|
-
const { instantiate
|
|
694
|
+
return Resolve(async (metas) => {
|
|
695
|
+
const { instantiate } = useControllerContext();
|
|
696
696
|
const moostApp = await instantiate(Moost);
|
|
697
|
-
const meta =
|
|
697
|
+
const meta = metas.classMeta;
|
|
698
698
|
return moostApp.getLogger(meta?.loggerTopic || topic || meta?.id);
|
|
699
699
|
});
|
|
700
700
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -118,8 +118,8 @@ function getNewMoostInfact() {
|
|
|
118
118
|
case 'new-instance': {
|
|
119
119
|
const scope = getMoostMate().read(targetClass)?.injectable || 'SINGLETON';
|
|
120
120
|
if (loggingOptions.newInstance === false ||
|
|
121
|
-
loggingOptions.newInstance === scope ||
|
|
122
|
-
|
|
121
|
+
!(loggingOptions.newInstance === scope ||
|
|
122
|
+
(loggingOptions.newInstance === 'SINGLETON' && scope === true))) {
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
125
125
|
break;
|
|
@@ -693,10 +693,10 @@ function InjectEventLogger(topic) {
|
|
|
693
693
|
return Resolve(() => useEventLogger(topic));
|
|
694
694
|
}
|
|
695
695
|
function InjectMoostLogger(topic) {
|
|
696
|
-
return Resolve(async () => {
|
|
697
|
-
const { instantiate
|
|
696
|
+
return Resolve(async (metas) => {
|
|
697
|
+
const { instantiate } = useControllerContext();
|
|
698
698
|
const moostApp = await instantiate(Moost);
|
|
699
|
-
const meta =
|
|
699
|
+
const meta = metas.classMeta;
|
|
700
700
|
return moostApp.getLogger(meta?.loggerTopic || topic || meta?.id);
|
|
701
701
|
});
|
|
702
702
|
}
|