core-3nweb-client-lib 0.41.11 → 0.41.12
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/build/core/asmail/inbox/inbox-events.js +1 -1
- package/build/core/storage/synced/remote-events.js +1 -1
- package/build/lib-client/3nstorage/storage-owner.d.ts +2 -1
- package/build/lib-client/3nstorage/storage-owner.js +2 -2
- package/build/lib-client/asmail/recipient.d.ts +2 -1
- package/build/lib-client/asmail/recipient.js +2 -2
- package/build/lib-client/cryptor/cryptor-wasm.js +1 -1
- package/build/lib-client/cryptor/cryptor.wasm +0 -0
- package/build/lib-common/ipc/generic-ipc.js +2 -0
- package/build/lib-common/ipc/ws-ipc.d.ts +2 -1
- package/build/lib-common/ipc/ws-ipc.js +53 -11
- package/package.json +1 -1
- package/test-data-1-1759430800070/util/logs/2025-10-02.log.txt +6 -0
- package/test-data-10-1759430836227/util/logs/2025-10-02.log.txt +11 -0
- package/test-data-11-1759430836227/util/logs/2025-10-02.log.txt +6 -0
- package/test-data-12-1759430839895/util/logs/2025-10-02.log.txt +6 -0
- package/test-data-13-1759430840691/util/logs/2025-10-02.log.txt +11 -0
- package/test-data-2-1759430800073/util/logs/2025-10-02.log.txt +6 -0
- package/test-data-3-1759430804613/util/logs/2025-10-02.log.txt +11 -0
- package/test-data-4-1759430810570/util/logs/2025-10-02.log.txt +11 -0
- package/test-data-5-1759430819813/util/logs/2025-10-02.log.txt +6 -0
- package/test-data-6-1759430821685/util/logs/2025-10-02.log.txt +6 -0
- package/test-data-7-1759430823627/util/logs/2025-10-02.log.txt +6 -0
- package/test-data-8-1759430832141/util/logs/2025-10-02.log.txt +6 -0
- package/test-data-9-1759430832943/util/logs/2025-10-02.log.txt +11 -0
|
@@ -33,7 +33,7 @@ const SERVER_EVENTS_RESTART_WAIT_SECS = 30;
|
|
|
33
33
|
*/
|
|
34
34
|
class InboxEvents {
|
|
35
35
|
constructor(msgReceiver, getMsg, logError) {
|
|
36
|
-
const serverEvents = new server_events_1.ServerEvents(() => msgReceiver.openEventSource(), SERVER_EVENTS_RESTART_WAIT_SECS, logError);
|
|
36
|
+
const serverEvents = new server_events_1.ServerEvents(() => msgReceiver.openEventSource(logError), SERVER_EVENTS_RESTART_WAIT_SECS, logError);
|
|
37
37
|
this.newMsg$ = serverEvents.observe(retrieval_1.msgRecievedCompletely.EVENT_NAME)
|
|
38
38
|
.pipe(
|
|
39
39
|
// XXX tap to log more details
|
|
@@ -36,7 +36,7 @@ class RemoteEvents {
|
|
|
36
36
|
Object.seal(this);
|
|
37
37
|
}
|
|
38
38
|
startAbsorbingRemoteEvents() {
|
|
39
|
-
const serverEvents = new server_events_1.ServerEvents(() => this.remoteStorage.openEventSource(), SERVER_EVENTS_RESTART_WAIT_SECS, this.logError);
|
|
39
|
+
const serverEvents = new server_events_1.ServerEvents(() => this.remoteStorage.openEventSource(this.logError), SERVER_EVENTS_RESTART_WAIT_SECS, this.logError);
|
|
40
40
|
this.absorbingRemoteEventsProc = (0, rxjs_1.merge)(this.absorbObjChange(serverEvents), this.absorbObjRemoval(serverEvents), this.absorbObjVersionArchival(serverEvents), this.absorbArchVersionRemoval(serverEvents))
|
|
41
41
|
.subscribe({
|
|
42
42
|
next: noop,
|
|
@@ -4,6 +4,7 @@ import { ServiceUser, IGetMailerIdSigner } from '../user-with-mid-session';
|
|
|
4
4
|
import * as keyGen from '../key-derivation';
|
|
5
5
|
import { SubscribingClient } from '../../lib-common/ipc/ws-ipc';
|
|
6
6
|
import { ObjId } from '../xsp-fs/common';
|
|
7
|
+
import { LogError } from '../logging/log-to-file';
|
|
7
8
|
export type FirstSaveReqOpts = api.PutObjFirstQueryOpts;
|
|
8
9
|
export type FollowingSaveReqOpts = api.PutObjSecondQueryOpts;
|
|
9
10
|
export declare class StorageOwner extends ServiceUser {
|
|
@@ -86,5 +87,5 @@ export declare class StorageOwner extends ServiceUser {
|
|
|
86
87
|
* @return a promise, resolvable, when an object is deleted.
|
|
87
88
|
*/
|
|
88
89
|
deleteObj(objId: string): Promise<void>;
|
|
89
|
-
openEventSource(): Promise<SubscribingClient>;
|
|
90
|
+
openEventSource(log: LogError): Promise<SubscribingClient>;
|
|
90
91
|
}
|
|
@@ -329,10 +329,10 @@ class StorageOwner extends user_with_mid_session_1.ServiceUser {
|
|
|
329
329
|
throw (0, request_utils_1.makeException)(rep, 'Unexpected status');
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
-
async openEventSource() {
|
|
332
|
+
async openEventSource(log) {
|
|
333
333
|
const rep = await this.openWS(api.wsEventChannel.URL_END);
|
|
334
334
|
if (rep.status === api.wsEventChannel.SC.ok) {
|
|
335
|
-
return (0, ws_ipc_1.makeSubscriber)(rep.data, undefined);
|
|
335
|
+
return (0, ws_ipc_1.makeSubscriber)(rep.data, undefined, log);
|
|
336
336
|
}
|
|
337
337
|
else {
|
|
338
338
|
throw (0, request_utils_1.makeException)(rep, 'Unexpected status');
|
|
@@ -2,6 +2,7 @@ import { NetClient } from '../request-utils';
|
|
|
2
2
|
import * as api from '../../lib-common/service-api/asmail/retrieval';
|
|
3
3
|
import { ServiceUser, IGetMailerIdSigner } from '../user-with-mid-session';
|
|
4
4
|
import { SubscribingClient } from '../../lib-common/ipc/ws-ipc';
|
|
5
|
+
import { LogError } from '../logging/log-to-file';
|
|
5
6
|
type InboxException = web3n.asmail.InboxException;
|
|
6
7
|
export declare function makeMsgNotFoundException(msgId: string): InboxException;
|
|
7
8
|
export declare function makeObjNotFoundException(msgId: string, objId: string): InboxException;
|
|
@@ -36,6 +37,6 @@ export declare class MailRecipient extends ServiceUser {
|
|
|
36
37
|
*/
|
|
37
38
|
getObjSegs(msgId: string, objId: string, start: number, end: number): Promise<Uint8Array>;
|
|
38
39
|
removeMsg(msgId: string): Promise<void>;
|
|
39
|
-
openEventSource(): Promise<SubscribingClient>;
|
|
40
|
+
openEventSource(log: LogError): Promise<SubscribingClient>;
|
|
40
41
|
}
|
|
41
42
|
export {};
|
|
@@ -192,10 +192,10 @@ class MailRecipient extends user_with_mid_session_1.ServiceUser {
|
|
|
192
192
|
throw (0, request_utils_1.makeException)(rep, 'Unexpected status');
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
async openEventSource() {
|
|
195
|
+
async openEventSource(log) {
|
|
196
196
|
const rep = await this.openWS(api.wsEventChannel.URL_END);
|
|
197
197
|
if (rep.status === api.wsEventChannel.SC.ok) {
|
|
198
|
-
return (0, ws_ipc_1.makeSubscriber)(rep.data, undefined);
|
|
198
|
+
return (0, ws_ipc_1.makeSubscriber)(rep.data, undefined, log);
|
|
199
199
|
}
|
|
200
200
|
else {
|
|
201
201
|
throw (0, request_utils_1.makeException)(rep, 'Unexpected status');
|