@kithinji/orca 1.0.3 → 1.0.4
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/browser/index.iife.js +9 -2
- package/dist/browser/index.iife.js.map +2 -2
- package/dist/browser/index.mjs +9 -2
- package/dist/browser/index.mjs.map +2 -2
- package/dist/node/index.cjs +9 -1
- package/dist/node/index.cjs.map +2 -2
- package/dist/node/index.mjs +9 -1
- package/dist/node/index.mjs.map +2 -2
- package/dist/types/browser/dom/dom.d.ts.map +1 -1
- package/dist/types/shared/dom/osc.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1810,6 +1810,7 @@ var kithinjiorca = (() => {
|
|
|
1810
1810
|
const module = await import(path);
|
|
1811
1811
|
const ComponentClass = module[name];
|
|
1812
1812
|
const params = Reflect.getMetadata(DESIGN_PARAMTYPES, ComponentClass) || [];
|
|
1813
|
+
const deps = Reflect.getMetadata(COMPONENT_DEPS, ComponentClass) || [];
|
|
1813
1814
|
const injector = getCurrentInjector();
|
|
1814
1815
|
if (injector == null) {
|
|
1815
1816
|
throw new Error(`Couldn't find an injector`);
|
|
@@ -1822,7 +1823,14 @@ var kithinjiorca = (() => {
|
|
|
1822
1823
|
useClass: ComponentClass,
|
|
1823
1824
|
scope: "transient"
|
|
1824
1825
|
});
|
|
1825
|
-
|
|
1826
|
+
deps.forEach(
|
|
1827
|
+
(depClass) => injector.addProvider({
|
|
1828
|
+
provide: depClass,
|
|
1829
|
+
useClass: depClass,
|
|
1830
|
+
scope: "transient"
|
|
1831
|
+
})
|
|
1832
|
+
);
|
|
1833
|
+
params.forEach((p) => injector.addProvider(p));
|
|
1826
1834
|
const cleanProps = { ...props };
|
|
1827
1835
|
delete cleanProps.__clientComponent;
|
|
1828
1836
|
const componentInstance = injector.resolve(ComponentClass);
|
|
@@ -2025,7 +2033,6 @@ var kithinjiorca = (() => {
|
|
|
2025
2033
|
try {
|
|
2026
2034
|
instance = injector.resolve(ComponentClass);
|
|
2027
2035
|
} catch (e) {
|
|
2028
|
-
console.log(e);
|
|
2029
2036
|
throw new Error(e.message);
|
|
2030
2037
|
}
|
|
2031
2038
|
const localProviders = Reflect.getMetadata(COMPONENT_PROVIDERS, ComponentClass) || [];
|