@sdflc/backend-helpers 1.0.36 → 1.0.37

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.
package/build/BaseCore.js CHANGED
@@ -752,6 +752,9 @@ var BaseCore = /** @class */ (function () {
752
752
  switch (_a.label) {
753
753
  case 0:
754
754
  context = this.config.context;
755
+ if (context.space) {
756
+ return [2 /*return*/, [true, context.space]];
757
+ }
755
758
  space = null;
756
759
  if (!context.spaceGw) return [3 /*break*/, 2];
757
760
  if (!context.spaceId) {
@@ -160,11 +160,21 @@ var createContextDefault = function (args) { return __awaiter(void 0, void 0, vo
160
160
  requestId: requestId,
161
161
  extendContext: function (_a) {
162
162
  var context = _a.context, req = _a.req;
163
- context.db = db;
164
- Object.assign(context, sharedContext);
165
- if (typeof extendContext === 'function') {
166
- extendContext({ context: context, req: req });
167
- }
163
+ return __awaiter(void 0, void 0, void 0, function () {
164
+ return __generator(this, function (_b) {
165
+ switch (_b.label) {
166
+ case 0:
167
+ context.db = db;
168
+ Object.assign(context, sharedContext);
169
+ if (!(typeof extendContext === 'function')) return [3 /*break*/, 2];
170
+ return [4 /*yield*/, extendContext({ context: context, req: req })];
171
+ case 1:
172
+ _b.sent();
173
+ _b.label = 2;
174
+ case 2: return [2 /*return*/];
175
+ }
176
+ });
177
+ });
168
178
  },
169
179
  getCoreContext: function (args) { return __awaiter(void 0, void 0, void 0, function () {
170
180
  var extendCoreConext;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdflc/backend-helpers",
3
- "version": "1.0.36",
3
+ "version": "1.0.37",
4
4
  "description": "Set of helper functions and classes to simplify building backend apps within @sdflc ecosystem",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",