@signalapp/libsignal-client 0.57.1 → 0.58.1
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/Native.d.ts +17 -14
- package/dist/Errors.d.ts +1 -0
- package/dist/Errors.js +3 -0
- package/dist/acknowledgments.md +589 -164
- package/dist/net.d.ts +2 -2
- package/dist/net.js +4 -4
- package/package.json +4 -3
- package/prebuilds/darwin-arm64/@signalapp+libsignal-client.node +0 -0
- package/prebuilds/darwin-x64/@signalapp+libsignal-client.node +0 -0
- package/prebuilds/linux-arm64/@signalapp+libsignal-client.node +0 -0
- package/prebuilds/linux-x64/@signalapp+libsignal-client.node +0 -0
- package/prebuilds/win32-arm64/@signalapp+libsignal-client.node +0 -0
- package/prebuilds/win32-x64/@signalapp+libsignal-client.node +0 -0
package/dist/net.d.ts
CHANGED
|
@@ -137,7 +137,7 @@ export type ChatService = {
|
|
|
137
137
|
*/
|
|
138
138
|
export declare class AuthenticatedChatService implements ChatService {
|
|
139
139
|
private readonly asyncContext;
|
|
140
|
-
readonly chatService: Wrapper<Native.
|
|
140
|
+
readonly chatService: Wrapper<Native.AuthChat>;
|
|
141
141
|
constructor(asyncContext: TokioAsyncContext, connectionManager: ConnectionManager, username: string, password: string, receiveStories: boolean, listener: ChatServiceListener);
|
|
142
142
|
disconnect(): Promise<void>;
|
|
143
143
|
connect(options?: {
|
|
@@ -155,7 +155,7 @@ export declare class AuthenticatedChatService implements ChatService {
|
|
|
155
155
|
*/
|
|
156
156
|
export declare class UnauthenticatedChatService implements ChatService {
|
|
157
157
|
private readonly asyncContext;
|
|
158
|
-
readonly chatService: Wrapper<Native.
|
|
158
|
+
readonly chatService: Wrapper<Native.UnauthChat>;
|
|
159
159
|
constructor(asyncContext: TokioAsyncContext, connectionManager: ConnectionManager, listener: ConnectionEventsListener);
|
|
160
160
|
disconnect(): Promise<void>;
|
|
161
161
|
connect(options?: {
|
package/dist/net.js
CHANGED
|
@@ -65,7 +65,7 @@ exports.ChatServerMessageAck = ChatServerMessageAck;
|
|
|
65
65
|
class AuthenticatedChatService {
|
|
66
66
|
constructor(asyncContext, connectionManager, username, password, receiveStories, listener) {
|
|
67
67
|
this.asyncContext = asyncContext;
|
|
68
|
-
this.chatService = newNativeHandle(Native.
|
|
68
|
+
this.chatService = newNativeHandle(Native.ChatService_new_auth(connectionManager, username, password, receiveStories));
|
|
69
69
|
const nativeChatListener = {
|
|
70
70
|
_incoming_message(envelope, timestamp, ack) {
|
|
71
71
|
listener.onIncomingMessage(envelope, timestamp, new ChatServerMessageAck(asyncContext, ack));
|
|
@@ -80,7 +80,7 @@ class AuthenticatedChatService {
|
|
|
80
80
|
Native.ChatService_SetListenerAuth(asyncContext, this.chatService, nativeChatListener);
|
|
81
81
|
}
|
|
82
82
|
disconnect() {
|
|
83
|
-
return Native.
|
|
83
|
+
return Native.ChatService_disconnect_auth(this.asyncContext, this.chatService);
|
|
84
84
|
}
|
|
85
85
|
connect(options) {
|
|
86
86
|
return this.asyncContext.makeCancellable(options?.abortSignal, Native.ChatService_connect_auth(this.asyncContext, this.chatService));
|
|
@@ -99,7 +99,7 @@ exports.AuthenticatedChatService = AuthenticatedChatService;
|
|
|
99
99
|
class UnauthenticatedChatService {
|
|
100
100
|
constructor(asyncContext, connectionManager, listener) {
|
|
101
101
|
this.asyncContext = asyncContext;
|
|
102
|
-
this.chatService = newNativeHandle(Native.
|
|
102
|
+
this.chatService = newNativeHandle(Native.ChatService_new_unauth(connectionManager));
|
|
103
103
|
const nativeChatListener = {
|
|
104
104
|
_incoming_message(_envelope, _timestamp, _ack) {
|
|
105
105
|
throw new Error('Event not supported on unauthenticated connection');
|
|
@@ -114,7 +114,7 @@ class UnauthenticatedChatService {
|
|
|
114
114
|
Native.ChatService_SetListenerUnauth(asyncContext, this.chatService, nativeChatListener);
|
|
115
115
|
}
|
|
116
116
|
disconnect() {
|
|
117
|
-
return Native.
|
|
117
|
+
return Native.ChatService_disconnect_unauth(this.asyncContext, this.chatService);
|
|
118
118
|
}
|
|
119
119
|
connect(options) {
|
|
120
120
|
return this.asyncContext.makeCancellable(options?.abortSignal, Native.ChatService_connect_unauth(this.asyncContext, this.chatService));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signalapp/libsignal-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.58.1",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"test": "mocha --recursive dist/test --require source-map-support/register",
|
|
26
26
|
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
|
|
27
27
|
"format": "p() { prettier ${@:- --write} '**/*.{css,js,json,md,scss,ts,tsx}' ../rust/bridge/node/bin/Native.d.ts.in; }; p",
|
|
28
|
+
"format-check": "p() { prettier ${@:- --check} '**/*.{css,js,json,md,scss,ts,tsx}' ../rust/bridge/node/bin/Native.d.ts.in; }; p",
|
|
28
29
|
"prepack": "cp ../acknowledgments/acknowledgments.md dist"
|
|
29
30
|
},
|
|
30
31
|
"dependencies": {
|
|
@@ -43,8 +44,8 @@
|
|
|
43
44
|
"@types/sinon": "^17.0.3",
|
|
44
45
|
"@types/sinon-chai": "^3.2.12",
|
|
45
46
|
"@types/uuid": "^8.3.0",
|
|
46
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
47
|
-
"@typescript-eslint/parser": "^
|
|
47
|
+
"@typescript-eslint/eslint-plugin": "^6.18.1",
|
|
48
|
+
"@typescript-eslint/parser": "^6.18.1",
|
|
48
49
|
"chai": "^4.2.0",
|
|
49
50
|
"chai-as-promised": "^7.1.1",
|
|
50
51
|
"chance": "^1.1.11",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|