remult 0.18.1-exp.35 → 0.18.1-exp.36
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/README.md +1 -0
- package/esm/server/JsonEntityFileStorage.js +1 -1
- package/package.json +1 -1
- package/server/JsonEntityFileStorage.js +1 -1
- package/esm/live-query/ably.d.ts +0 -13
- package/esm/live-query/ably.js +0 -28
- package/live-query/ably.d.ts +0 -13
- package/live-query/ably.js +0 -59
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.JsonFileDataProvider = exports.JsonEntityFileStorage = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var path = tslib_1.__importStar(require("path"));
|
|
6
|
-
var fs = tslib_1.__importStar(require("fs"));
|
|
6
|
+
var fs = tslib_1.__importStar(require("node:fs"));
|
|
7
7
|
var index_1 = require("../index");
|
|
8
8
|
var JsonEntityFileStorage = /** @class */ (function () {
|
|
9
9
|
function JsonEntityFileStorage(folderPath) {
|
package/esm/live-query/ably.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type * as Ably from 'ably';
|
|
2
|
-
import type { SubscriptionServer } from '../src/live-query/SubscriptionServer';
|
|
3
|
-
import type { SubscriptionClient, SubscriptionClientConnection } from '../src/live-query/SubscriptionChannel';
|
|
4
|
-
export declare class AblySubscriptionClient implements SubscriptionClient {
|
|
5
|
-
private ably;
|
|
6
|
-
constructor(ably: Ably.Types.RealtimePromise);
|
|
7
|
-
openConnection(onReconnect: VoidFunction): Promise<SubscriptionClientConnection>;
|
|
8
|
-
}
|
|
9
|
-
export declare class AblySubscriptionServer implements SubscriptionServer {
|
|
10
|
-
private ably;
|
|
11
|
-
constructor(ably: Ably.Types.RestPromise);
|
|
12
|
-
publishMessage<T>(channel: string, message: T): Promise<void>;
|
|
13
|
-
}
|
package/esm/live-query/ably.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export class AblySubscriptionClient {
|
|
2
|
-
constructor(ably) {
|
|
3
|
-
this.ably = ably;
|
|
4
|
-
}
|
|
5
|
-
async openConnection(onReconnect) {
|
|
6
|
-
return {
|
|
7
|
-
close: () => {
|
|
8
|
-
// Since we did not open the connection, we do not close it
|
|
9
|
-
},
|
|
10
|
-
subscribe: async (channel, handler) => {
|
|
11
|
-
let myHandler = (y) => handler(y.data);
|
|
12
|
-
await this.ably.channels.get(channel).subscribe(y => myHandler(y));
|
|
13
|
-
return () => {
|
|
14
|
-
myHandler = () => { };
|
|
15
|
-
this.ably.channels.get(channel).unsubscribe();
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
export class AblySubscriptionServer {
|
|
22
|
-
constructor(ably) {
|
|
23
|
-
this.ably = ably;
|
|
24
|
-
}
|
|
25
|
-
async publishMessage(channel, message) {
|
|
26
|
-
await this.ably.channels.get(channel).publish({ data: message });
|
|
27
|
-
}
|
|
28
|
-
}
|
package/live-query/ably.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type * as Ably from 'ably';
|
|
2
|
-
import type { SubscriptionServer } from '../src/live-query/SubscriptionServer';
|
|
3
|
-
import type { SubscriptionClient, SubscriptionClientConnection } from '../src/live-query/SubscriptionChannel';
|
|
4
|
-
export declare class AblySubscriptionClient implements SubscriptionClient {
|
|
5
|
-
private ably;
|
|
6
|
-
constructor(ably: Ably.Types.RealtimePromise);
|
|
7
|
-
openConnection(onReconnect: VoidFunction): Promise<SubscriptionClientConnection>;
|
|
8
|
-
}
|
|
9
|
-
export declare class AblySubscriptionServer implements SubscriptionServer {
|
|
10
|
-
private ably;
|
|
11
|
-
constructor(ably: Ably.Types.RestPromise);
|
|
12
|
-
publishMessage<T>(channel: string, message: T): Promise<void>;
|
|
13
|
-
}
|
package/live-query/ably.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AblySubscriptionServer = exports.AblySubscriptionClient = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var AblySubscriptionClient = /** @class */ (function () {
|
|
6
|
-
function AblySubscriptionClient(ably) {
|
|
7
|
-
this.ably = ably;
|
|
8
|
-
}
|
|
9
|
-
AblySubscriptionClient.prototype.openConnection = function (onReconnect) {
|
|
10
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
11
|
-
var _this = this;
|
|
12
|
-
return tslib_1.__generator(this, function (_a) {
|
|
13
|
-
return [2 /*return*/, {
|
|
14
|
-
close: function () {
|
|
15
|
-
// Since we did not open the connection, we do not close it
|
|
16
|
-
},
|
|
17
|
-
subscribe: function (channel, handler) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
18
|
-
var myHandler;
|
|
19
|
-
var _this = this;
|
|
20
|
-
return tslib_1.__generator(this, function (_a) {
|
|
21
|
-
switch (_a.label) {
|
|
22
|
-
case 0:
|
|
23
|
-
myHandler = function (y) { return handler(y.data); };
|
|
24
|
-
return [4 /*yield*/, this.ably.channels.get(channel).subscribe(function (y) { return myHandler(y); })];
|
|
25
|
-
case 1:
|
|
26
|
-
_a.sent();
|
|
27
|
-
return [2 /*return*/, function () {
|
|
28
|
-
myHandler = function () { };
|
|
29
|
-
_this.ably.channels.get(channel).unsubscribe();
|
|
30
|
-
}];
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
}); }
|
|
34
|
-
}];
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
return AblySubscriptionClient;
|
|
39
|
-
}());
|
|
40
|
-
exports.AblySubscriptionClient = AblySubscriptionClient;
|
|
41
|
-
var AblySubscriptionServer = /** @class */ (function () {
|
|
42
|
-
function AblySubscriptionServer(ably) {
|
|
43
|
-
this.ably = ably;
|
|
44
|
-
}
|
|
45
|
-
AblySubscriptionServer.prototype.publishMessage = function (channel, message) {
|
|
46
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
47
|
-
return tslib_1.__generator(this, function (_a) {
|
|
48
|
-
switch (_a.label) {
|
|
49
|
-
case 0: return [4 /*yield*/, this.ably.channels.get(channel).publish({ data: message })];
|
|
50
|
-
case 1:
|
|
51
|
-
_a.sent();
|
|
52
|
-
return [2 /*return*/];
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
return AblySubscriptionServer;
|
|
58
|
-
}());
|
|
59
|
-
exports.AblySubscriptionServer = AblySubscriptionServer;
|