moost 0.5.11 → 0.5.14
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 +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -693,8 +693,9 @@ function InjectEventLogger(topic) {
|
|
|
693
693
|
}
|
|
694
694
|
function InjectMoostLogger(topic) {
|
|
695
695
|
return Resolve(async (metas) => {
|
|
696
|
-
const { instantiate } = useControllerContext();
|
|
697
|
-
const
|
|
696
|
+
const { instantiate, getController } = useControllerContext();
|
|
697
|
+
const controller = getController();
|
|
698
|
+
const moostApp = controller instanceof Moost ? controller : await instantiate(Moost);
|
|
698
699
|
const meta = metas.classMeta;
|
|
699
700
|
return moostApp.getLogger(meta?.loggerTopic || topic || meta?.id);
|
|
700
701
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -695,8 +695,9 @@ function InjectEventLogger(topic) {
|
|
|
695
695
|
}
|
|
696
696
|
function InjectMoostLogger(topic) {
|
|
697
697
|
return Resolve(async (metas) => {
|
|
698
|
-
const { instantiate } = useControllerContext();
|
|
699
|
-
const
|
|
698
|
+
const { instantiate, getController } = useControllerContext();
|
|
699
|
+
const controller = getController();
|
|
700
|
+
const moostApp = controller instanceof Moost ? controller : await instantiate(Moost);
|
|
700
701
|
const meta = metas.classMeta;
|
|
701
702
|
return moostApp.getLogger(meta?.loggerTopic || topic || meta?.id);
|
|
702
703
|
});
|