remult 0.20.0-exp.16 → 0.20.0-exp.17
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.
|
@@ -44,7 +44,7 @@ export interface RemultServerOptions<RequestType> {
|
|
|
44
44
|
/** Used to store the context relevant info for re running a live query */
|
|
45
45
|
contextSerializer?: {
|
|
46
46
|
serialize(remult: Remult): Promise<any>;
|
|
47
|
-
deserialize(json: any,
|
|
47
|
+
deserialize(json: any, options: InitRequestOptions): Promise<void>;
|
|
48
48
|
};
|
|
49
49
|
/** Storage to use for backend methods that use queue */
|
|
50
50
|
queueStorage?: QueueStorage;
|
|
@@ -125,7 +125,15 @@ export class RemultServerImplementation {
|
|
|
125
125
|
await this.runWithRemult(async (remult) => {
|
|
126
126
|
remult.user = jsonContextData.user;
|
|
127
127
|
if (this.options.contextSerializer) {
|
|
128
|
-
await this.options.contextSerializer.deserialize(jsonContextData,
|
|
128
|
+
await this.options.contextSerializer.deserialize(jsonContextData, {
|
|
129
|
+
remult,
|
|
130
|
+
get liveQueryStorage() {
|
|
131
|
+
return remult.liveQueryStorage;
|
|
132
|
+
},
|
|
133
|
+
set liveQueryStorage(value) {
|
|
134
|
+
remult.liveQueryStorage = value;
|
|
135
|
+
}
|
|
136
|
+
});
|
|
129
137
|
}
|
|
130
138
|
await what(remult.repo(e));
|
|
131
139
|
});
|
package/package.json
CHANGED
|
@@ -44,7 +44,7 @@ export interface RemultServerOptions<RequestType> {
|
|
|
44
44
|
/** Used to store the context relevant info for re running a live query */
|
|
45
45
|
contextSerializer?: {
|
|
46
46
|
serialize(remult: Remult): Promise<any>;
|
|
47
|
-
deserialize(json: any,
|
|
47
|
+
deserialize(json: any, options: InitRequestOptions): Promise<void>;
|
|
48
48
|
};
|
|
49
49
|
/** Storage to use for backend methods that use queue */
|
|
50
50
|
queueStorage?: QueueStorage;
|
package/server/expressBridge.js
CHANGED
|
@@ -192,7 +192,15 @@ var RemultServerImplementation = /** @class */ (function () {
|
|
|
192
192
|
case 0:
|
|
193
193
|
remult.user = jsonContextData.user;
|
|
194
194
|
if (!this.options.contextSerializer) return [3 /*break*/, 2];
|
|
195
|
-
return [4 /*yield*/, this.options.contextSerializer.deserialize(jsonContextData,
|
|
195
|
+
return [4 /*yield*/, this.options.contextSerializer.deserialize(jsonContextData, {
|
|
196
|
+
remult: remult,
|
|
197
|
+
get liveQueryStorage() {
|
|
198
|
+
return remult.liveQueryStorage;
|
|
199
|
+
},
|
|
200
|
+
set liveQueryStorage(value) {
|
|
201
|
+
remult.liveQueryStorage = value;
|
|
202
|
+
}
|
|
203
|
+
})];
|
|
196
204
|
case 1:
|
|
197
205
|
_a.sent();
|
|
198
206
|
_a.label = 2;
|