oak-backend-base 4.0.3 → 4.1.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 +9 -2
  2. package/package.json +3 -3
package/lib/AppLoader.js CHANGED
@@ -43,7 +43,13 @@ class AppLoader extends types_1.AppLoader {
43
43
  async makeContext(cxtStr, headers) {
44
44
  const context = this.contextBuilder(this.dbStore);
45
45
  await context.begin();
46
- await context.initialize(cxtStr ? JSON.parse(cxtStr) : undefined);
46
+ try {
47
+ await context.initialize(cxtStr ? JSON.parse(cxtStr) : undefined);
48
+ }
49
+ catch (err) {
50
+ await context.rollback();
51
+ throw err;
52
+ }
47
53
  context.headers = headers;
48
54
  return context;
49
55
  }
@@ -104,7 +110,8 @@ class AppLoader extends types_1.AppLoader {
104
110
  const triggers = this.requireSth('lib/triggers/index');
105
111
  const checkers = this.requireSth('lib/checkers/index');
106
112
  const { actionDefDict } = require(`${this.path}/lib/oak-app-domain/ActionDefDict`);
107
- const { triggers: adTriggers, checkers: adCheckers } = (0, IntrinsicLogics_1.makeIntrinsicLogics)(this.dbStore.getSchema(), actionDefDict);
113
+ const attrUpdateMatrix = this.requireSth('lib/configuration/attrUpdateMatrix');
114
+ const { triggers: adTriggers, checkers: adCheckers } = (0, IntrinsicLogics_1.makeIntrinsicLogics)(this.dbStore.getSchema(), actionDefDict, attrUpdateMatrix);
108
115
  triggers.forEach((trigger) => this.registerTrigger(trigger));
109
116
  adTriggers.forEach((trigger) => this.registerTrigger(trigger));
110
117
  checkers.forEach((checker) => this.dbStore.registerChecker(checker));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oak-backend-base",
3
- "version": "4.0.3",
3
+ "version": "4.1.0",
4
4
  "description": "oak-backend-base",
5
5
  "main": "lib/index",
6
6
  "author": {
@@ -22,8 +22,8 @@
22
22
  "node-schedule": "^2.1.0",
23
23
  "oak-common-aspect": "~3.0.0",
24
24
  "oak-db": "~3.3.0",
25
- "oak-domain": "~5.0.5",
26
- "oak-frontend-base": "~5.0.5",
25
+ "oak-domain": "~5.0.8",
26
+ "oak-frontend-base": "~5.1.0",
27
27
  "socket.io": "^4.7.2",
28
28
  "socket.io-client": "^4.7.2",
29
29
  "uuid": "^8.3.2"