@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.
@@ -2867,6 +2867,7 @@ var OSC = class {
2867
2867
  const module = await import(path);
2868
2868
  const ComponentClass = module[name];
2869
2869
  const params = Reflect.getMetadata(DESIGN_PARAMTYPES, ComponentClass) || [];
2870
+ const deps = Reflect.getMetadata(COMPONENT_DEPS, ComponentClass) || [];
2870
2871
  const injector = getCurrentInjector();
2871
2872
  if (injector == null) {
2872
2873
  throw new Error(`Couldn't find an injector`);
@@ -2879,7 +2880,14 @@ var OSC = class {
2879
2880
  useClass: ComponentClass,
2880
2881
  scope: "transient"
2881
2882
  });
2882
- [...params].forEach((p) => injector.addProvider(p));
2883
+ deps.forEach(
2884
+ (depClass) => injector.addProvider({
2885
+ provide: depClass,
2886
+ useClass: depClass,
2887
+ scope: "transient"
2888
+ })
2889
+ );
2890
+ params.forEach((p) => injector.addProvider(p));
2883
2891
  const cleanProps = { ...props };
2884
2892
  delete cleanProps.__clientComponent;
2885
2893
  const componentInstance = injector.resolve(ComponentClass);
@@ -3082,7 +3090,6 @@ function createComponent(ComponentClass, props = {}, parentComponent) {
3082
3090
  try {
3083
3091
  instance = injector.resolve(ComponentClass);
3084
3092
  } catch (e) {
3085
- console.log(e);
3086
3093
  throw new Error(e.message);
3087
3094
  }
3088
3095
  const localProviders = Reflect.getMetadata(COMPONENT_PROVIDERS, ComponentClass) || [];