simplex-chat 0.3.0 → 6.5.0-beta.10
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 +107 -22
- package/binding.gyp +50 -0
- package/cpp/simplex.cc +426 -0
- package/cpp/simplex.h +46 -0
- package/dist/api.d.ts +423 -0
- package/dist/api.js +857 -0
- package/dist/api.js.map +1 -0
- package/dist/bot.d.ts +29 -0
- package/dist/bot.js +189 -0
- package/dist/bot.js.map +1 -0
- package/dist/core.d.ts +128 -0
- package/dist/core.js +121 -0
- package/dist/core.js.map +1 -0
- package/dist/index.d.ts +19 -2
- package/dist/index.js +20 -4
- package/dist/index.js.map +1 -1
- package/dist/simplex.d.ts +10 -0
- package/dist/simplex.js +1 -0
- package/dist/util.d.ts +15 -0
- package/dist/util.js +91 -0
- package/dist/util.js.map +1 -0
- package/docs/Namespace.api.md +33 -0
- package/docs/Namespace.bot.md +23 -0
- package/docs/Namespace.core.md +48 -0
- package/docs/Namespace.util.md +25 -0
- package/docs/README.md +12 -0
- package/docs/api.Class.ChatApi.md +1752 -0
- package/docs/api.Class.ChatCommandError.md +205 -0
- package/docs/api.Enumeration.ConnReqType.md +27 -0
- package/docs/api.Interface.BotAddressSettings.md +60 -0
- package/docs/api.TypeAlias.DbConfig.md +64 -0
- package/docs/api.TypeAlias.EventSubscriberFunc.md +27 -0
- package/docs/api.TypeAlias.EventSubscribers.md +11 -0
- package/docs/api.Variable.defaultBotAddressSettings.md +11 -0
- package/docs/bot.Function.run.md +21 -0
- package/docs/bot.Interface.BotConfig.md +75 -0
- package/docs/bot.Interface.BotOptions.md +81 -0
- package/docs/bot.TypeAlias.BotDbOpts.md +17 -0
- package/docs/core.Class.ChatAPIError.md +205 -0
- package/docs/core.Class.ChatInitError.md +205 -0
- package/docs/core.DBMigrationError.Interface.ErrorMigration.md +41 -0
- package/docs/core.DBMigrationError.Interface.ErrorNotADatabase.md +33 -0
- package/docs/core.DBMigrationError.Interface.ErrorSQL.md +41 -0
- package/docs/core.DBMigrationError.Interface.InvalidConfirmation.md +25 -0
- package/docs/core.DBMigrationError.TypeAlias.Tag.md +11 -0
- package/docs/core.Enumeration.MigrationConfirmation.md +43 -0
- package/docs/core.Function.chatCloseStore.md +23 -0
- package/docs/core.Function.chatDecryptFile.md +31 -0
- package/docs/core.Function.chatEncryptFile.md +31 -0
- package/docs/core.Function.chatMigrateInit.md +31 -0
- package/docs/core.Function.chatReadFile.md +27 -0
- package/docs/core.Function.chatRecvMsgWait.md +27 -0
- package/docs/core.Function.chatSendCmd.md +27 -0
- package/docs/core.Function.chatWriteFile.md +31 -0
- package/docs/core.Interface.APIResult.md +31 -0
- package/docs/core.Interface.CryptoArgs.md +27 -0
- package/docs/core.Interface.UpMigration.md +25 -0
- package/docs/core.MTRError.Interface.MTREDifferent.md +33 -0
- package/docs/core.MTRError.Interface.MTRENoDown.md +33 -0
- package/docs/core.MTRError.TypeAlias.Tag.md +11 -0
- package/docs/core.MigrationError.Interface.MEDowngrade.md +33 -0
- package/docs/core.MigrationError.Interface.MEUpgrade.md +33 -0
- package/docs/core.MigrationError.Interface.MigrationError.md +33 -0
- package/docs/core.MigrationError.TypeAlias.Tag.md +11 -0
- package/docs/core.Namespace.DBMigrationError.md +18 -0
- package/docs/core.Namespace.MTRError.md +16 -0
- package/docs/core.Namespace.MigrationError.md +17 -0
- package/docs/core.TypeAlias.DBMigrationError.md +11 -0
- package/docs/core.TypeAlias.MTRError.md +11 -0
- package/docs/core.TypeAlias.MigrationError.md +11 -0
- package/docs/util.Function.botAddressSettings.md +21 -0
- package/docs/util.Function.chatInfoName.md +21 -0
- package/docs/util.Function.chatInfoRef.md +21 -0
- package/docs/util.Function.ciBotCommand.md +21 -0
- package/docs/util.Function.ciContentText.md +21 -0
- package/docs/util.Function.contactAddressStr.md +21 -0
- package/docs/util.Function.fromLocalProfile.md +21 -0
- package/docs/util.Function.reactionText.md +21 -0
- package/docs/util.Function.senderName.md +25 -0
- package/docs/util.Interface.BotCommand.md +25 -0
- package/examples/squaring-bot-pg.js +21 -0
- package/examples/squaring-bot-readme.js +17 -0
- package/examples/squaring-bot.ts +42 -0
- package/package.json +36 -48
- package/src/api.ts +939 -0
- package/src/bot.ts +214 -0
- package/src/core.ts +210 -0
- package/src/download-libs.js +239 -0
- package/src/index.ts +22 -0
- package/src/simplex.d.ts +10 -0
- package/src/simplex.js +1 -0
- package/src/util.ts +92 -0
- package/tsconfig.json +23 -0
- package/dist/client.d.ts +0 -61
- package/dist/client.js +0 -271
- package/dist/client.js.map +0 -1
- package/dist/command.d.ts +0 -408
- package/dist/command.js +0 -184
- package/dist/command.js.map +0 -1
- package/dist/index-web.d.ts +0 -1
- package/dist/index-web.js +0 -6
- package/dist/index-web.js.map +0 -1
- package/dist/index.bundle.js +0 -11
- package/dist/queue.d.ts +0 -24
- package/dist/queue.js +0 -77
- package/dist/queue.js.map +0 -1
- package/dist/response.d.ts +0 -754
- package/dist/response.js +0 -21
- package/dist/response.js.map +0 -1
- package/dist/test.html +0 -7
- package/dist/transport.d.ts +0 -54
- package/dist/transport.js +0 -131
- package/dist/transport.js.map +0 -1
- package/dist/websocket.d.ts +0 -8
- package/dist/websocket.js +0 -4
- package/dist/websocket.js.map +0 -1
package/dist/response.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ciContentText = exports.ChatInfoType = void 0;
|
|
4
|
-
var ChatInfoType;
|
|
5
|
-
(function (ChatInfoType) {
|
|
6
|
-
ChatInfoType["Direct"] = "direct";
|
|
7
|
-
ChatInfoType["Group"] = "group";
|
|
8
|
-
ChatInfoType["ContactRequest"] = "contactRequest";
|
|
9
|
-
})(ChatInfoType = exports.ChatInfoType || (exports.ChatInfoType = {}));
|
|
10
|
-
function ciContentText(content) {
|
|
11
|
-
switch (content.type) {
|
|
12
|
-
case "sndMsgContent":
|
|
13
|
-
return content.msgContent.text;
|
|
14
|
-
case "rcvMsgContent":
|
|
15
|
-
return content.msgContent.text;
|
|
16
|
-
default:
|
|
17
|
-
return undefined;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.ciContentText = ciContentText;
|
|
21
|
-
//# sourceMappingURL=response.js.map
|
package/dist/response.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"response.js","sourceRoot":"","sources":["../src/response.ts"],"names":[],"mappings":";;;AAuwBA,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,iCAAiB,CAAA;IACjB,+BAAe,CAAA;IACf,iDAAiC,CAAA;AACnC,CAAC,EAJW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAIvB;AA4KD,SAAgB,aAAa,CAAC,OAAkB;IAC9C,QAAQ,OAAO,CAAC,IAAI,EAAE;QACpB,KAAK,eAAe;YAClB,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAA;QAChC,KAAK,eAAe;YAClB,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAA;QAChC;YACE,OAAO,SAAS,CAAA;KACnB;AACH,CAAC;AATD,sCASC"}
|
package/dist/test.html
DELETED
package/dist/transport.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { ABQueue, NextIter } from "./queue";
|
|
2
|
-
import { ChatResponse, ChatEvent } from "@simplex-chat/types";
|
|
3
|
-
export declare class TransportError extends Error {
|
|
4
|
-
}
|
|
5
|
-
export declare abstract class Transport<W, R> {
|
|
6
|
-
readonly queue: ABQueue<R>;
|
|
7
|
-
protected constructor(qSize: number);
|
|
8
|
-
[Symbol.asyncIterator](): Transport<W, R>;
|
|
9
|
-
abstract close(): Promise<void>;
|
|
10
|
-
abstract write(bytes: W): Promise<void>;
|
|
11
|
-
read(): Promise<R>;
|
|
12
|
-
next(): Promise<NextIter<R>>;
|
|
13
|
-
}
|
|
14
|
-
type WSData = Uint8Array | string;
|
|
15
|
-
export declare class WSTransport extends Transport<WSData, WSData> {
|
|
16
|
-
private readonly sock;
|
|
17
|
-
readonly timeout: number;
|
|
18
|
-
private constructor();
|
|
19
|
-
static connect(url: string, timeout: number, qSize: number): Promise<WSTransport>;
|
|
20
|
-
close(): Promise<void>;
|
|
21
|
-
write(data: WSData): Promise<void>;
|
|
22
|
-
readBinary(size: number): Promise<Uint8Array>;
|
|
23
|
-
}
|
|
24
|
-
export interface ChatServer {
|
|
25
|
-
readonly host: string;
|
|
26
|
-
readonly port?: string;
|
|
27
|
-
}
|
|
28
|
-
export declare const localServer: ChatServer;
|
|
29
|
-
export interface ChatSrvRequest {
|
|
30
|
-
corrId: string;
|
|
31
|
-
cmd: string;
|
|
32
|
-
}
|
|
33
|
-
export interface ChatSrvResponse {
|
|
34
|
-
corrId: string;
|
|
35
|
-
resp: ChatResponse;
|
|
36
|
-
}
|
|
37
|
-
export interface ChatSrvEvent {
|
|
38
|
-
resp: ChatEvent;
|
|
39
|
-
}
|
|
40
|
-
export declare class ChatResponseError extends Error {
|
|
41
|
-
message: string;
|
|
42
|
-
data?: string | undefined;
|
|
43
|
-
constructor(message: string, data?: string | undefined);
|
|
44
|
-
}
|
|
45
|
-
export declare class ChatTransport extends Transport<ChatSrvRequest, ChatSrvResponse | ChatSrvEvent | ChatResponseError> {
|
|
46
|
-
private readonly ws;
|
|
47
|
-
readonly timeout: number;
|
|
48
|
-
private constructor();
|
|
49
|
-
static connect(srv: ChatServer | string, timeout: number, qSize: number): Promise<ChatTransport>;
|
|
50
|
-
close(): Promise<void>;
|
|
51
|
-
write(cmd: ChatSrvRequest): Promise<void>;
|
|
52
|
-
}
|
|
53
|
-
export declare function noop(): void;
|
|
54
|
-
export {};
|
package/dist/transport.js
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.noop = exports.ChatTransport = exports.ChatResponseError = exports.localServer = exports.WSTransport = exports.Transport = exports.TransportError = void 0;
|
|
4
|
-
const queue_1 = require("./queue");
|
|
5
|
-
class TransportError extends Error {
|
|
6
|
-
}
|
|
7
|
-
exports.TransportError = TransportError;
|
|
8
|
-
class Transport {
|
|
9
|
-
constructor(qSize) {
|
|
10
|
-
this.queue = new queue_1.ABQueue(qSize);
|
|
11
|
-
}
|
|
12
|
-
[Symbol.asyncIterator]() {
|
|
13
|
-
return this;
|
|
14
|
-
}
|
|
15
|
-
async read() {
|
|
16
|
-
return this.queue.dequeue();
|
|
17
|
-
}
|
|
18
|
-
async next() {
|
|
19
|
-
return this.queue.next();
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.Transport = Transport;
|
|
23
|
-
class WSTransport extends Transport {
|
|
24
|
-
constructor(sock, timeout, qSize) {
|
|
25
|
-
super(qSize);
|
|
26
|
-
this.sock = sock;
|
|
27
|
-
this.timeout = timeout;
|
|
28
|
-
}
|
|
29
|
-
static connect(url, timeout, qSize) {
|
|
30
|
-
const sock = new WebSocket(url);
|
|
31
|
-
const t = new WSTransport(sock, timeout, qSize);
|
|
32
|
-
sock.onmessage = async ({ data }) => await t.queue.enqueue(data);
|
|
33
|
-
sock.onclose = async () => await t.queue.close();
|
|
34
|
-
sock.onerror = () => sock.close();
|
|
35
|
-
return withTimeout(timeout, () => new Promise((r) => (sock.onopen = () => r(t))));
|
|
36
|
-
}
|
|
37
|
-
close() {
|
|
38
|
-
this.sock.close();
|
|
39
|
-
return Promise.resolve();
|
|
40
|
-
}
|
|
41
|
-
write(data) {
|
|
42
|
-
const buffered = this.sock.bufferedAmount;
|
|
43
|
-
this.sock.send(data);
|
|
44
|
-
return withTimeout(this.timeout, async () => {
|
|
45
|
-
while (this.sock.bufferedAmount > buffered)
|
|
46
|
-
await delay();
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
async readBinary(size) {
|
|
50
|
-
const data = await this.read();
|
|
51
|
-
if (typeof data == "string")
|
|
52
|
-
throw new TransportError("invalid text block: expected binary");
|
|
53
|
-
if (data.byteLength !== size)
|
|
54
|
-
throw new TransportError("invalid block size");
|
|
55
|
-
return data;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
exports.WSTransport = WSTransport;
|
|
59
|
-
function withTimeout(ms, action) {
|
|
60
|
-
return Promise.race([
|
|
61
|
-
action(),
|
|
62
|
-
(async () => {
|
|
63
|
-
await delay(ms);
|
|
64
|
-
throw new Error("timeout");
|
|
65
|
-
})(),
|
|
66
|
-
]);
|
|
67
|
-
}
|
|
68
|
-
exports.localServer = {
|
|
69
|
-
host: "localhost",
|
|
70
|
-
port: "5225",
|
|
71
|
-
};
|
|
72
|
-
class ChatResponseError extends Error {
|
|
73
|
-
constructor(message, data) {
|
|
74
|
-
super(message);
|
|
75
|
-
this.message = message;
|
|
76
|
-
this.data = data;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
exports.ChatResponseError = ChatResponseError;
|
|
80
|
-
class ChatTransport extends Transport {
|
|
81
|
-
constructor(ws, timeout, qSize) {
|
|
82
|
-
super(qSize);
|
|
83
|
-
this.ws = ws;
|
|
84
|
-
this.timeout = timeout;
|
|
85
|
-
}
|
|
86
|
-
static async connect(srv, timeout, qSize) {
|
|
87
|
-
const uri = typeof srv == "string" ? srv : `ws://${srv.host}:${srv.port || "5225"}`;
|
|
88
|
-
const ws = await WSTransport.connect(uri, timeout, qSize);
|
|
89
|
-
const c = new ChatTransport(ws, timeout, qSize);
|
|
90
|
-
processWSQueue(c, ws).then(noop, noop);
|
|
91
|
-
return c;
|
|
92
|
-
}
|
|
93
|
-
async close() {
|
|
94
|
-
await this.ws.close();
|
|
95
|
-
}
|
|
96
|
-
async write(cmd) {
|
|
97
|
-
return this.ws.write(JSON.stringify(cmd));
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
exports.ChatTransport = ChatTransport;
|
|
101
|
-
function noop() { }
|
|
102
|
-
exports.noop = noop;
|
|
103
|
-
async function processWSQueue(c, ws) {
|
|
104
|
-
var _a;
|
|
105
|
-
for await (const data of ws) {
|
|
106
|
-
const str = (data instanceof Promise ? await data : data);
|
|
107
|
-
if (typeof str != "string") {
|
|
108
|
-
await c.queue.enqueue(new ChatResponseError("websocket data is not a string"));
|
|
109
|
-
continue;
|
|
110
|
-
}
|
|
111
|
-
let resp;
|
|
112
|
-
try {
|
|
113
|
-
const json = JSON.parse(str);
|
|
114
|
-
if (typeof ((_a = json === null || json === void 0 ? void 0 : json.resp) === null || _a === void 0 ? void 0 : _a.type) == "string") {
|
|
115
|
-
resp = json;
|
|
116
|
-
}
|
|
117
|
-
else {
|
|
118
|
-
resp = new ChatResponseError("invalid response format", str);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
catch (err) {
|
|
122
|
-
resp = new ChatResponseError(err.message, str);
|
|
123
|
-
}
|
|
124
|
-
await c.queue.enqueue(resp);
|
|
125
|
-
}
|
|
126
|
-
await c.queue.close();
|
|
127
|
-
}
|
|
128
|
-
function delay(ms) {
|
|
129
|
-
return new Promise((r) => setTimeout(r, ms));
|
|
130
|
-
}
|
|
131
|
-
//# sourceMappingURL=transport.js.map
|
package/dist/transport.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":";;;AAAA,mCAAyC;AAGzC,MAAa,cAAe,SAAQ,KAAK;CAAG;AAA5C,wCAA4C;AAE5C,MAAsB,SAAS;IAG7B,YAAsB,KAAa;QACjC,IAAI,CAAC,KAAK,GAAG,IAAI,eAAO,CAAC,KAAK,CAAC,CAAA;IACjC,CAAC;IAED,CAAC,MAAM,CAAC,aAAa,CAAC;QACpB,OAAO,IAAI,CAAA;IACb,CAAC;IAMD,KAAK,CAAC,IAAI;QACR,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAA;IAC7B,CAAC;IAED,KAAK,CAAC,IAAI;QACR,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAA;IAC1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;QACD,IAAI,IAAyC,CAAA;QAC7C,IAAI;YACF,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAsC,CAAA;YACjE,IAAI,OAAO,CAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,0CAAE,IAAI,CAAA,IAAI,QAAQ,EAAE;gBACvC,IAAI,GAAG,IAAuB,CAAA;aAC/B;iBAAM;gBACL,IAAI,GAAG,IAAI,iBAAiB,CAAC,yBAAyB,EAAE,GAAG,CAAC,CAAA;aAC7D;SACF;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,GAAG,IAAI,iBAAiB,CAAE,GAAa,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;SAC1D;QACD,MAAM,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;KAC5B;IACD,MAAM,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;AACvB,CAAC;AAED,SAAS,KAAK,CAAC,EAAW;IACxB,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;AAC9C,CAAC"}
|
package/dist/websocket.d.ts
DELETED
package/dist/websocket.js
DELETED
package/dist/websocket.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"websocket.js","sourceRoot":"","sources":["../src/websocket.ts"],"names":[],"mappings":";AAAA,MAAM,EAAE,GAAG,OAAO,CAAC,eAAe,CAAqB,CAAA;AAEvD,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,EAAC,KAAK,EAAE,EAAE,EAAC,CAAC,CAAA"}
|