remult 0.27.19-next.0 → 0.27.19

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.
@@ -87,6 +87,7 @@ export class SequentialRemultAsyncLocalStorageCore {
87
87
  currentValue;
88
88
  }
89
89
  export class StubRemultAsyncLocalStorageCore {
90
+ isStub = true;
90
91
  wasImplemented = 'yes';
91
92
  async run(store, callback) {
92
93
  this.currentValue = store;
@@ -39,7 +39,8 @@ export class RemultAsyncLocalStorage {
39
39
  const store = this.remultObjectStorage?.getStore();
40
40
  if (!store)
41
41
  return;
42
- store.inInitRequest = val;
42
+ if (val || this.remultObjectStorage?.isStub)
43
+ store.inInitRequest = val;
43
44
  }
44
45
  getStore() {
45
46
  if (!this.remultObjectStorage) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remult",
3
- "version": "0.27.19-next.0",
3
+ "version": "0.27.19",
4
4
  "description": "A CRUD framework for full-stack TypeScript",
5
5
  "homepage": "https://remult.dev",
6
6
  "repository": {
@@ -14,6 +14,7 @@ export declare class SequentialRemultAsyncLocalStorageCore<T> implements RemultA
14
14
  currentValue?: T;
15
15
  }
16
16
  export declare class StubRemultAsyncLocalStorageCore<T> implements RemultAsyncLocalStorageCore<T> {
17
+ isStub: boolean;
17
18
  wasImplemented: "yes";
18
19
  run<R>(store: T, callback: () => Promise<R>): Promise<R>;
19
20
  getStore(): T | undefined;
@@ -140,6 +140,7 @@ var SequentialRemultAsyncLocalStorageCore = /** @class */ (function () {
140
140
  exports.SequentialRemultAsyncLocalStorageCore = SequentialRemultAsyncLocalStorageCore;
141
141
  var StubRemultAsyncLocalStorageCore = /** @class */ (function () {
142
142
  function StubRemultAsyncLocalStorageCore() {
143
+ this.isStub = true;
143
144
  this.wasImplemented = 'yes';
144
145
  this.lastPromise = Promise.resolve(undefined);
145
146
  }
package/src/context.d.ts CHANGED
@@ -24,6 +24,7 @@ export type RemultAsyncLocalStorageCore<T> = {
24
24
  run<R>(store: T, callback: () => Promise<R>): Promise<R>;
25
25
  getStore(): T | undefined;
26
26
  wasImplemented: 'yes';
27
+ isStub?: boolean;
27
28
  };
28
29
  export declare function isBackend(): boolean;
29
30
  export declare class Remult {
package/src/context.js CHANGED
@@ -49,11 +49,12 @@ var RemultAsyncLocalStorage = /** @class */ (function () {
49
49
  return (_b = (_a = this.remultObjectStorage) === null || _a === void 0 ? void 0 : _a.getStore()) === null || _b === void 0 ? void 0 : _b.inInitRequest;
50
50
  };
51
51
  RemultAsyncLocalStorage.prototype.setInInitRequest = function (val) {
52
- var _a;
52
+ var _a, _b;
53
53
  var store = (_a = this.remultObjectStorage) === null || _a === void 0 ? void 0 : _a.getStore();
54
54
  if (!store)
55
55
  return;
56
- store.inInitRequest = val;
56
+ if (val || ((_b = this.remultObjectStorage) === null || _b === void 0 ? void 0 : _b.isStub))
57
+ store.inInitRequest = val;
57
58
  };
58
59
  RemultAsyncLocalStorage.prototype.getStore = function () {
59
60
  if (!this.remultObjectStorage) {