core-3nweb-client-lib 0.44.0 → 0.44.2
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/api-defs/files.d.ts +8 -8
- package/build/core/index.d.ts +1 -0
- package/build/core/index.js +3 -2
- package/build/core/storage/index.d.ts +1 -0
- package/build/core/storage/index.js +4 -1
- package/build/core/storage/synced/storage.d.ts +1 -0
- package/build/core/storage/synced/storage.js +4 -1
- package/build/core-ipc/fs.js +31 -9
- package/build/lib-client/asmail/recipient.js +4 -2
- package/build/lib-client/cryptor/cryptor-wasm.js +1 -1
- package/build/lib-client/cryptor/cryptor.wasm +0 -0
- package/build/lib-client/ws-utils.js +2 -7
- package/build/lib-client/xsp-fs/common.d.ts +2 -0
- package/build/lib-client/xsp-fs/common.js +2 -1
- package/build/lib-client/xsp-fs/folder-node.js +39 -25
- package/build/lib-client/xsp-fs/fs.js +1 -16
- package/build/lib-common/ipc/generic-ipc.js +33 -28
- package/build/lib-common/ipc/ws-ipc.d.ts +2 -0
- package/build/lib-common/ipc/ws-ipc.js +35 -8
- package/build/lib-common/map-of-sets.d.ts +1 -0
- package/build/lib-common/map-of-sets.js +3 -0
- package/build/protos/asmail.proto.js +149 -378
- package/build/protos/fs.proto.js +149 -378
- package/package.json +1 -1
- package/protos/fs.proto +5 -9
|
@@ -1559,16 +1559,16 @@ declare namespace web3n.files {
|
|
|
1559
1559
|
interface FolderDiff extends CommonDiff {
|
|
1560
1560
|
|
|
1561
1561
|
/**
|
|
1562
|
-
* Items that were removed.
|
|
1562
|
+
* Items that were removed.
|
|
1563
1563
|
*
|
|
1564
1564
|
* Consider the following example.
|
|
1565
1565
|
* Item that is removed in local version is present in both remote and synced versions.
|
|
1566
1566
|
* Hence, difference between local and remote versions is due to removal in local branch.
|
|
1567
1567
|
*/
|
|
1568
1568
|
removed?: {
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
}
|
|
1569
|
+
inRemote?: string[];
|
|
1570
|
+
inLocal?: string[];
|
|
1571
|
+
};
|
|
1572
1572
|
|
|
1573
1573
|
/**
|
|
1574
1574
|
* Items that were renamed. Pointing to where renaming is done in remote (r), or local (l) branches.
|
|
@@ -1583,15 +1583,15 @@ declare namespace web3n.files {
|
|
|
1583
1583
|
}[];
|
|
1584
1584
|
|
|
1585
1585
|
/**
|
|
1586
|
-
* Items that were added.
|
|
1586
|
+
* Items that were added.
|
|
1587
1587
|
*
|
|
1588
1588
|
* When item added in remote branch, then it is present in remote version under the referenced name.
|
|
1589
1589
|
* Synced (older) state of folder doesn't have it, and neither does local.
|
|
1590
1590
|
*/
|
|
1591
1591
|
added?: {
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
}
|
|
1592
|
+
inRemote?: string[];
|
|
1593
|
+
inLocal?: string[];
|
|
1594
|
+
};
|
|
1595
1595
|
|
|
1596
1596
|
/**
|
|
1597
1597
|
* Items that reencrypted and now have different keys.
|
package/build/core/index.d.ts
CHANGED
|
@@ -55,6 +55,7 @@ export declare class Core {
|
|
|
55
55
|
onDeviceSystemResume(): Promise<void>;
|
|
56
56
|
get connectivityEvents(): {
|
|
57
57
|
inbox$: import("rxjs").Observable<import("./asmail/inbox/inbox-events").InboxConnectionStatus>;
|
|
58
|
+
storage$: import("rxjs").Observable<import("./storage/synced/remote-events").StorageConnectionStatus>;
|
|
58
59
|
};
|
|
59
60
|
}
|
|
60
61
|
export {};
|
package/build/core/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
Copyright (C) 2015 - 2022, 2025 3NSoft Inc.
|
|
3
|
+
Copyright (C) 2015 - 2022, 2025 - 2026 3NSoft Inc.
|
|
4
4
|
|
|
5
5
|
This program is free software: you can redistribute it and/or modify it under
|
|
6
6
|
the terms of the GNU General Public License as published by the Free Software
|
|
@@ -350,7 +350,8 @@ class Core {
|
|
|
350
350
|
}
|
|
351
351
|
get connectivityEvents() {
|
|
352
352
|
return {
|
|
353
|
-
inbox$: this.asmail.connectivityEvent
|
|
353
|
+
inbox$: this.asmail.connectivityEvent$,
|
|
354
|
+
storage$: this.storages.connectivityEvent$
|
|
354
355
|
};
|
|
355
356
|
}
|
|
356
357
|
}
|
|
@@ -51,6 +51,7 @@ export declare class Storages implements FactoryOfFSs {
|
|
|
51
51
|
migrateCoreAppDataOnFirstRun(type: StorageType, src: string, dst: string): Promise<void>;
|
|
52
52
|
suspendNetworkActivity(): void;
|
|
53
53
|
resumeNetworkActivity(): void;
|
|
54
|
+
get connectivityEvent$(): import("rxjs").Observable<import("./synced/remote-events").StorageConnectionStatus>;
|
|
54
55
|
}
|
|
55
56
|
export interface FactoryOfFSs {
|
|
56
57
|
makeSyncedFSForApp(appFolder: string): Promise<WritableFS>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
Copyright (C) 2015 - 2017, 2019 - 2022, 2025 3NSoft Inc.
|
|
3
|
+
Copyright (C) 2015 - 2017, 2019 - 2022, 2025 - 2026 3NSoft Inc.
|
|
4
4
|
|
|
5
5
|
This program is free software: you can redistribute it and/or modify it under
|
|
6
6
|
the terms of the GNU General Public License as published by the Free Software
|
|
@@ -421,6 +421,9 @@ class Storages {
|
|
|
421
421
|
var _a;
|
|
422
422
|
(_a = this.synced) === null || _a === void 0 ? void 0 : _a.storage.resumeNetworkActivity();
|
|
423
423
|
}
|
|
424
|
+
get connectivityEvent$() {
|
|
425
|
+
return this.synced.storage.connectionEvent$;
|
|
426
|
+
}
|
|
424
427
|
}
|
|
425
428
|
exports.Storages = Storages;
|
|
426
429
|
Object.freeze(Storages.prototype);
|
|
@@ -61,5 +61,6 @@ export declare class SyncedStore implements ISyncedStorage {
|
|
|
61
61
|
close(): Promise<void>;
|
|
62
62
|
suspendNetworkActivity(): void;
|
|
63
63
|
resumeNetworkActivity(): void;
|
|
64
|
+
get connectionEvent$(): Observable<import("./remote-events").StorageConnectionStatus>;
|
|
64
65
|
}
|
|
65
66
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
Copyright (C) 2015 - 2020, 2022, 2025 3NSoft Inc.
|
|
3
|
+
Copyright (C) 2015 - 2020, 2022, 2025 - 2026 3NSoft Inc.
|
|
4
4
|
|
|
5
5
|
This program is free software: you can redistribute it and/or modify it under
|
|
6
6
|
the terms of the GNU General Public License as published by the Free Software
|
|
@@ -245,6 +245,9 @@ class SyncedStore {
|
|
|
245
245
|
resumeNetworkActivity() {
|
|
246
246
|
this.remoteEvents.resumeNetworkActivity();
|
|
247
247
|
}
|
|
248
|
+
get connectionEvent$() {
|
|
249
|
+
return this.remoteEvents.connectionEvent$;
|
|
250
|
+
}
|
|
248
251
|
}
|
|
249
252
|
exports.SyncedStore = SyncedStore;
|
|
250
253
|
Object.freeze(SyncedStore.prototype);
|
package/build/core-ipc/fs.js
CHANGED
|
@@ -2213,10 +2213,8 @@ function folderDiffToMsg(diff) {
|
|
|
2213
2213
|
}
|
|
2214
2214
|
return {
|
|
2215
2215
|
...file.commonDiffToMsg(diff),
|
|
2216
|
-
added:
|
|
2217
|
-
|
|
2218
|
-
removed: (diff.removed && (diff.removed.length > 0) ?
|
|
2219
|
-
diff.removed.map(({ name, removedIn }) => ({ name, removedIn })) : undefined),
|
|
2216
|
+
added: diff.added,
|
|
2217
|
+
removed: diff.removed,
|
|
2220
2218
|
renamed: (diff.renamed && (diff.renamed.length > 0) ?
|
|
2221
2219
|
diff.renamed.map(({ local, remote, renamedIn }) => ({ local, remote, renamedIn })) : undefined),
|
|
2222
2220
|
rekeyed: (diff.rekeyed && (diff.rekeyed.length > 0) ?
|
|
@@ -2230,13 +2228,37 @@ function folderDiffFromMsg(msg) {
|
|
|
2230
2228
|
}
|
|
2231
2229
|
return {
|
|
2232
2230
|
...file.commonDiffFromMsg(msg),
|
|
2233
|
-
added: (msg.added
|
|
2234
|
-
removed: (msg.removed
|
|
2235
|
-
renamed: (msg.renamed
|
|
2236
|
-
rekeyed: (msg.rekeyed
|
|
2237
|
-
nameOverlaps: (msg.nameOverlaps
|
|
2231
|
+
added: reduceEmptyIn(msg.added),
|
|
2232
|
+
removed: reduceEmptyIn(msg.removed),
|
|
2233
|
+
renamed: reduceEmptyArr(msg.renamed),
|
|
2234
|
+
rekeyed: reduceEmptyArr(msg.rekeyed),
|
|
2235
|
+
nameOverlaps: reduceEmptyArr(msg.nameOverlaps),
|
|
2238
2236
|
};
|
|
2239
2237
|
}
|
|
2238
|
+
function reduceEmptyIn(c) {
|
|
2239
|
+
if (!c) {
|
|
2240
|
+
return;
|
|
2241
|
+
}
|
|
2242
|
+
if (c.inLocal && (c.inLocal.length > 0)) {
|
|
2243
|
+
if (c.inRemote && (c.inRemote.length > 0)) {
|
|
2244
|
+
return c;
|
|
2245
|
+
}
|
|
2246
|
+
else {
|
|
2247
|
+
return { inLocal: c.inLocal };
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2250
|
+
else {
|
|
2251
|
+
if (c.inRemote && (c.inRemote.length > 0)) {
|
|
2252
|
+
return { inRemote: c.inRemote };
|
|
2253
|
+
}
|
|
2254
|
+
else {
|
|
2255
|
+
return;
|
|
2256
|
+
}
|
|
2257
|
+
}
|
|
2258
|
+
}
|
|
2259
|
+
function reduceEmptyArr(arr) {
|
|
2260
|
+
return (arr && (arr.length > 0) ? arr : undefined);
|
|
2261
|
+
}
|
|
2240
2262
|
var vsDiffCurrentAndRemoteFolderVersions;
|
|
2241
2263
|
(function (vsDiffCurrentAndRemoteFolderVersions) {
|
|
2242
2264
|
const requestType = protobuf_type_1.ProtoType.for(fs_proto_1.fs.DiffCurrentAndRemoteFolderVersionsRequestBody);
|
|
@@ -163,8 +163,10 @@ class MailRecipient extends user_with_mid_session_1.ServiceUser {
|
|
|
163
163
|
appPath: api.msgObj.genUrlEnd(msgId, objId, opts),
|
|
164
164
|
method: 'GET',
|
|
165
165
|
responseType: 'arraybuffer',
|
|
166
|
-
responseHeaders: [
|
|
167
|
-
api.HTTP_HEADER.
|
|
166
|
+
responseHeaders: [
|
|
167
|
+
api.HTTP_HEADER.objSegmentsLength,
|
|
168
|
+
api.HTTP_HEADER.objHeaderLength
|
|
169
|
+
]
|
|
168
170
|
});
|
|
169
171
|
if (rep.status === api.msgObj.SC.ok) {
|
|
170
172
|
if (!(rep.data instanceof Uint8Array)) {
|