oak-backend-base 2.4.1 → 2.4.2

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.
@@ -21,4 +21,5 @@ export declare class AppLoader<ED extends EntityDict & BaseEntityDict, Cxt exten
21
21
  getEndpoints(): Record<string, Endpoint<ED, Cxt>>;
22
22
  startTimers(): void;
23
23
  execStartRoutines(): Promise<void>;
24
+ execRoutine(routine: (context: Cxt) => Promise<void>): Promise<void>;
24
25
  }
package/lib/AppLoader.js CHANGED
@@ -217,5 +217,9 @@ class AppLoader extends types_1.AppLoader {
217
217
  }
218
218
  }
219
219
  }
220
+ async execRoutine(routine) {
221
+ const context = await this.contextBuilder()(this.dbStore);
222
+ await routine(context);
223
+ }
220
224
  }
221
225
  exports.AppLoader = AppLoader;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oak-backend-base",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
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.5",
24
- "oak-db": "^2.2.6",
25
- "oak-domain": "^2.6.2",
23
+ "oak-common-aspect": "^2.1.9",
24
+ "oak-db": "^2.2.11",
25
+ "oak-domain": "^2.6.9",
26
26
  "uuid": "^8.3.2"
27
27
  },
28
28
  "license": "ISC",