oak-backend-base 2.2.1 → 2.3.0

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.
Files changed (2) hide show
  1. package/lib/AppLoader.js +5 -2
  2. package/package.json +4 -4
package/lib/AppLoader.js CHANGED
@@ -9,7 +9,7 @@ const triggers_1 = require("oak-domain/lib/triggers");
9
9
  const uuid_1 = require("oak-domain/lib/utils/uuid");
10
10
  const types_1 = require("oak-domain/lib/types");
11
11
  const DbStore_1 = require("./DbStore");
12
- const index_1 = tslib_1.__importDefault(require("oak-common-aspect/lib/index"));
12
+ const index_1 = tslib_1.__importStar(require("oak-common-aspect/lib/index"));
13
13
  function initTriggers(dbStore, path) {
14
14
  const triggers = require(`${path}/lib/triggers/index`).default;
15
15
  const checkers = require(`${path}/lib/checkers/index`).default;
@@ -94,9 +94,12 @@ class AppLoader extends types_1.AppLoader {
94
94
  if (!initialize) {
95
95
  initTriggers(this.dbStore, path);
96
96
  }
97
+ const { importations, exportations } = require(`${path}/lib/ports/index`);
98
+ (0, index_1.registerPorts)(importations || [], exportations || []);
97
99
  this.dbStore.connect();
98
100
  }
99
101
  async unmount() {
102
+ (0, index_1.clearPorts)();
100
103
  this.dbStore.disconnect();
101
104
  }
102
105
  async execAspect(name, context, params) {
@@ -136,7 +139,7 @@ class AppLoader extends types_1.AppLoader {
136
139
  startWatchers(this.dbStore, this.path, this.contextBuilder);
137
140
  }
138
141
  startTimers() {
139
- const timers = require(`${this.path}/lib/timer/index`).default;
142
+ const timers = require(`${this.path}/lib/timers/index`).default;
140
143
  for (const timer of timers) {
141
144
  const { cron, fn, name } = timer;
142
145
  (0, node_schedule_1.scheduleJob)(name, cron, async (date) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oak-backend-base",
3
- "version": "2.2.1",
3
+ "version": "2.3.0",
4
4
  "description": "oak-backend-base",
5
5
  "main": "lib/index",
6
6
  "author": {
@@ -20,9 +20,9 @@
20
20
  "mysql": "^2.18.1",
21
21
  "mysql2": "^2.3.3",
22
22
  "node-schedule": "^2.1.0",
23
- "oak-common-aspect": "^2.1.1",
24
- "oak-db": "^2.1.1",
25
- "oak-domain": "^2.2.0",
23
+ "oak-common-aspect": "^2.1.3",
24
+ "oak-db": "^2.2.0",
25
+ "oak-domain": "^2.3.0",
26
26
  "uuid": "^8.3.2"
27
27
  },
28
28
  "license": "ISC",