@zenofolio/hyper-decor 1.0.49 → 1.0.52

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.
@@ -75,6 +75,16 @@ function prepareApplication(options, Target, app, log) {
75
75
  const data = getData(Target);
76
76
  const prefix = (_a = options.prefix) !== null && _a !== void 0 ? _a : "/";
77
77
  const imports = (_b = options.imports) !== null && _b !== void 0 ? _b : [];
78
+ {
79
+ // initialize servies stored
80
+ for (const service of service_store_1.serviceStore) {
81
+ const instance = tsyringe_1.container.resolve(service);
82
+ if (instance.onInit)
83
+ yield instance.onInit();
84
+ }
85
+ // clean up the service store
86
+ service_store_1.serviceStore.clear();
87
+ }
78
88
  yield (0, imports_helper_1.prepareImports)(Target, imports);
79
89
  if (data.middlewares.length) {
80
90
  app.use(...data.middlewares);
@@ -109,16 +119,6 @@ function prepareApplication(options, Target, app, log) {
109
119
  routers.forEach(({ router, path }) => {
110
120
  app.use((0, path_util_1.join)(prefix, path), router);
111
121
  });
112
- {
113
- // initialize servies stored
114
- for (const service of service_store_1.serviceStore) {
115
- const instance = tsyringe_1.container.resolve(service);
116
- if (instance.onInit)
117
- yield instance.onInit();
118
- }
119
- // clean up the service store
120
- service_store_1.serviceStore.clear();
121
- }
122
122
  });
123
123
  }
124
124
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenofolio/hyper-decor",
3
- "version": "1.0.49",
3
+ "version": "1.0.52",
4
4
  "description": "Project core with utilities and features",
5
5
  "main": "dist/index.js",
6
6
  "author": "zenozaga",