core-3nweb-client-lib 0.26.1 → 0.27.3
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/asmail.d.ts +1 -1
- package/build/api-defs/files.d.ts +281 -75
- package/build/core/app-files.js +7 -7
- package/build/core/asmail/config/common.js +2 -2
- package/build/core/asmail/config/index.js +2 -2
- package/build/core/asmail/config/published-intro-key.js +1 -1
- package/build/core/asmail/delivery/common.js +7 -7
- package/build/core/asmail/delivery/index.js +5 -5
- package/build/core/asmail/delivery/msg.js +4 -4
- package/build/core/asmail/delivery/per-recipient-wip.js +1 -1
- package/build/core/asmail/inbox/attachments/fs.d.ts +2 -1
- package/build/core/asmail/inbox/attachments/fs.js +9 -4
- package/build/core/asmail/inbox/cached-msgs.js +1 -1
- package/build/core/asmail/inbox/inbox-events.js +4 -4
- package/build/core/asmail/inbox/index.js +10 -10
- package/build/core/asmail/inbox/msg-downloader.js +1 -1
- package/build/core/asmail/inbox/msg-indexing.js +1 -1
- package/build/core/asmail/inbox/msg-on-disk.js +5 -5
- package/build/core/asmail/index.d.ts +3 -3
- package/build/core/asmail/index.js +13 -8
- package/build/core/asmail/key-verification.js +5 -5
- package/build/core/asmail/keyring/common.js +7 -6
- package/build/core/asmail/keyring/correspondent-keys.js +8 -7
- package/build/core/asmail/keyring/id-to-email-map.js +2 -1
- package/build/core/asmail/keyring/index.d.ts +7 -8
- package/build/core/asmail/keyring/index.js +15 -14
- package/build/core/asmail/keyring/keyring-storage.js +2 -1
- package/build/core/asmail/msg/opener.js +3 -3
- package/build/core/asmail/msg/packer.js +13 -13
- package/build/core/asmail/sending-params/own-params.js +2 -2
- package/build/core/asmail/sending-params/params-from-others.js +1 -1
- package/build/core/id-manager/index.d.ts +43 -0
- package/build/core/{id-manager.js → id-manager/index.js} +36 -114
- package/build/core/id-manager/key-storage.d.ts +21 -0
- package/build/core/id-manager/key-storage.js +96 -0
- package/build/core/index.d.ts +2 -1
- package/build/core/index.js +31 -33
- package/build/core/sign-in.d.ts +1 -2
- package/build/core/sign-in.js +8 -17
- package/build/core/sign-up.d.ts +2 -0
- package/build/core/sign-up.js +11 -10
- package/build/core/storage/common/json-saving.js +2 -2
- package/build/core/storage/common/obj-info-file.d.ts +12 -4
- package/build/core/storage/common/obj-info-file.js +66 -34
- package/build/core/storage/common/utils.d.ts +2 -0
- package/build/core/storage/common/utils.js +32 -0
- package/build/core/storage/index.d.ts +5 -17
- package/build/core/storage/index.js +78 -119
- package/build/core/storage/local/obj-files-gc.d.ts +2 -0
- package/build/core/storage/local/obj-files-gc.js +49 -37
- package/build/core/storage/local/obj-files.d.ts +4 -7
- package/build/core/storage/local/obj-files.js +7 -10
- package/build/core/storage/local/obj-status.d.ts +12 -6
- package/build/core/storage/local/obj-status.js +24 -9
- package/build/core/storage/local/storage.d.ts +10 -7
- package/build/core/storage/local/storage.js +29 -18
- package/build/core/storage/synced/downloader.js +1 -1
- package/build/core/storage/synced/obj-files-gc.d.ts +1 -0
- package/build/core/storage/synced/obj-files-gc.js +76 -39
- package/build/core/storage/synced/obj-files.d.ts +50 -36
- package/build/core/storage/synced/obj-files.js +201 -162
- package/build/core/storage/synced/obj-status.d.ts +99 -86
- package/build/core/storage/synced/obj-status.js +520 -251
- package/build/core/storage/synced/remote-events.d.ts +11 -12
- package/build/core/storage/synced/remote-events.js +73 -56
- package/build/core/storage/synced/storage.d.ts +24 -10
- package/build/core/storage/synced/storage.js +147 -47
- package/build/core/storage/synced/upload-header-file.d.ts +4 -0
- package/build/core/storage/synced/upload-header-file.js +64 -0
- package/build/core/storage/synced/upsyncer.d.ts +12 -7
- package/build/core/storage/synced/upsyncer.js +210 -280
- package/build/core/storage/system-folders/apps-data.d.ts +16 -0
- package/build/core/storage/system-folders/apps-data.js +110 -0
- package/build/core/storage/system-folders/index.d.ts +18 -0
- package/build/core/storage/system-folders/index.js +77 -0
- package/build/core-ipc/common-caps.js +3 -3
- package/build/core-ipc/generic.js +8 -8
- package/build/core-ipc/startup-caps.js +2 -2
- package/build/cryptors.js +6 -2
- package/build/ipc-via-protobuf/asmail-cap.js +58 -57
- package/build/ipc-via-protobuf/bytes.js +16 -17
- package/build/ipc-via-protobuf/connector-clients-side.d.ts +1 -0
- package/build/ipc-via-protobuf/connector-clients-side.js +14 -15
- package/build/ipc-via-protobuf/connector-services-side.js +10 -10
- package/build/ipc-via-protobuf/connector.js +4 -4
- package/build/ipc-via-protobuf/file.d.ts +48 -12
- package/build/ipc-via-protobuf/file.js +474 -126
- package/build/ipc-via-protobuf/fs.d.ts +8 -0
- package/build/ipc-via-protobuf/fs.js +577 -142
- package/build/ipc-via-protobuf/log-cap.js +2 -2
- package/build/ipc-via-protobuf/mailerid.js +3 -3
- package/build/ipc-via-protobuf/protobuf-msg.d.ts +1 -0
- package/build/ipc-via-protobuf/protobuf-msg.js +11 -7
- package/build/ipc-via-protobuf/startup-cap.js +21 -21
- package/build/ipc-via-protobuf/storage-cap.js +12 -12
- package/build/ipc.js +7 -2
- package/build/lib-client/3nstorage/exceptions.d.ts +16 -1
- package/build/lib-client/3nstorage/exceptions.js +21 -3
- package/build/lib-client/3nstorage/service.d.ts +21 -3
- package/build/lib-client/3nstorage/service.js +128 -46
- package/build/lib-client/3nstorage/util/file-based-json.d.ts +2 -1
- package/build/lib-client/3nstorage/util/file-based-json.js +3 -2
- package/build/lib-client/3nstorage/util/for-arrays.d.ts +1 -0
- package/build/lib-client/3nstorage/util/for-arrays.js +32 -0
- package/build/lib-client/3nstorage/xsp-fs/attrs.js +17 -17
- package/build/lib-client/3nstorage/xsp-fs/common.d.ts +44 -19
- package/build/lib-client/3nstorage/xsp-fs/common.js +30 -19
- package/build/lib-client/3nstorage/xsp-fs/file-node.d.ts +1 -0
- package/build/lib-client/3nstorage/xsp-fs/file-node.js +17 -13
- package/build/lib-client/3nstorage/xsp-fs/file.d.ts +31 -6
- package/build/lib-client/3nstorage/xsp-fs/file.js +73 -25
- package/build/lib-client/3nstorage/xsp-fs/folder-node-serialization.js +4 -4
- package/build/lib-client/3nstorage/xsp-fs/folder-node.d.ts +32 -13
- package/build/lib-client/3nstorage/xsp-fs/folder-node.js +752 -192
- package/build/lib-client/3nstorage/xsp-fs/fs.d.ts +35 -4
- package/build/lib-client/3nstorage/xsp-fs/fs.js +236 -119
- package/build/lib-client/3nstorage/xsp-fs/link-node.d.ts +1 -0
- package/build/lib-client/3nstorage/xsp-fs/link-node.js +7 -2
- package/build/lib-client/3nstorage/xsp-fs/node-in-fs.d.ts +30 -29
- package/build/lib-client/3nstorage/xsp-fs/node-in-fs.js +232 -127
- package/build/lib-client/3nstorage/xsp-fs/node-persistence.d.ts +1 -1
- package/build/lib-client/3nstorage/xsp-fs/node-persistence.js +17 -18
- package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v1.js +3 -3
- package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v2.js +53 -53
- package/build/lib-client/3nweb-signup.js +4 -4
- package/build/lib-client/asmail/recipient.js +15 -15
- package/build/lib-client/asmail/sender.js +22 -22
- package/build/lib-client/asmail/service-config.js +3 -3
- package/build/lib-client/cryptor/cryptor-in-worker.js +18 -16
- package/build/lib-client/cryptor/cryptor-wasm.js +1 -1
- package/build/lib-client/cryptor/cryptor.js +4 -2
- package/build/lib-client/cryptor/cryptor.wasm +0 -0
- package/build/lib-client/cryptor/in-proc-js.js +1 -1
- package/build/lib-client/cryptor/in-proc-wasm.js +6 -6
- package/build/lib-client/cryptor/worker-js.js +2 -2
- package/build/lib-client/cryptor/worker-wasm.js +2 -2
- package/build/lib-client/files-select.js +1 -1
- package/build/lib-client/files.d.ts +1 -1
- package/build/lib-client/files.js +71 -6
- package/build/lib-client/fs-collection.js +1 -1
- package/build/lib-client/fs-sync-utils.d.ts +5 -0
- package/build/lib-client/fs-sync-utils.js +61 -0
- package/build/lib-client/fs-view.d.ts +14 -0
- package/build/lib-client/fs-view.js +33 -0
- package/build/lib-client/key-derivation.js +1 -1
- package/build/lib-client/local-files/dev-file-sink.js +9 -9
- package/build/lib-client/local-files/dev-file-src.js +2 -2
- package/build/lib-client/local-files/device-fs.d.ts +1 -1
- package/build/lib-client/local-files/device-fs.js +56 -54
- package/build/lib-client/logging/log-to-file.d.ts +1 -1
- package/build/lib-client/logging/log-to-file.js +7 -7
- package/build/lib-client/mailer-id/login.js +7 -7
- package/build/lib-client/mailer-id/provisioner.js +12 -12
- package/build/lib-client/objs-on-disk/file-writing-proc.js +3 -3
- package/build/lib-client/objs-on-disk/obj-folders.js +31 -31
- package/build/lib-client/objs-on-disk/obj-on-disk.d.ts +13 -2
- package/build/lib-client/objs-on-disk/obj-on-disk.js +24 -9
- package/build/lib-client/request-utils.d.ts +1 -0
- package/build/lib-client/request-utils.js +13 -13
- package/build/lib-client/server-events.d.ts +3 -3
- package/build/lib-client/server-events.js +9 -8
- package/build/lib-client/service-locator.js +10 -10
- package/build/lib-client/user-with-mid-session.d.ts +2 -1
- package/build/lib-client/user-with-mid-session.js +14 -8
- package/build/lib-client/user-with-pkl-session.js +25 -25
- package/build/lib-client/ws-utils.js +2 -2
- package/build/lib-common/async-cryptor-wrap.js +4 -4
- package/build/lib-common/async-fs-node.d.ts +5 -3
- package/build/lib-common/async-fs-node.js +17 -17
- package/build/lib-common/byte-streaming/pipe.js +1 -1
- package/build/lib-common/byte-streaming/wrapping.js +13 -13
- package/build/lib-common/canonical-address.js +1 -1
- package/build/lib-common/exceptions/error.d.ts +1 -0
- package/build/lib-common/exceptions/error.js +7 -6
- package/build/lib-common/exceptions/file.d.ts +4 -2
- package/build/lib-common/exceptions/file.js +24 -54
- package/build/lib-common/ipc/generic-ipc.js +5 -4
- package/build/lib-common/ipc/ws-ipc.js +2 -2
- package/build/lib-common/mid-sigs-NaCl-Ed.js +14 -14
- package/build/lib-common/objs-on-disk/file-layout.d.ts +19 -0
- package/build/lib-common/objs-on-disk/file-layout.js +130 -12
- package/build/lib-common/objs-on-disk/obj-file.d.ts +13 -2
- package/build/lib-common/objs-on-disk/obj-file.js +96 -35
- package/build/lib-common/objs-on-disk/utils.d.ts +1 -0
- package/build/lib-common/objs-on-disk/utils.js +3 -3
- package/build/lib-common/objs-on-disk/v1-obj-file-format.js +14 -14
- package/build/lib-common/processes/labelled-exec-pools.d.ts +1 -1
- package/build/lib-common/processes/labelled-exec-pools.js +1 -1
- package/build/lib-common/processes/pressure.js +2 -2
- package/build/lib-common/processes/synced.js +1 -1
- package/build/lib-common/processes/timeout.js +2 -2
- package/build/lib-common/random-node.js +7 -7
- package/build/lib-common/service-api/3nstorage/owner.d.ts +101 -42
- package/build/lib-common/service-api/3nstorage/owner.js +83 -40
- package/build/lib-common/service-api/asmail/delivery.js +2 -2
- package/build/lib-common/service-api/asmail/retrieval.js +1 -1
- package/build/lib-common/timed-cache.d.ts +1 -0
- package/build/lib-common/timed-non-weak-cache.d.ts +1 -0
- package/build/lib-common/timed-non-weak-cache.js +11 -0
- package/build/lib-common/utils-for-observables.js +4 -4
- package/build/lib-common/weak-cache.d.ts +1 -0
- package/build/lib-common/weak-cache.js +12 -1
- package/build/lib-index.d.ts +2 -1
- package/build/lib-index.js +10 -7
- package/build/protos/asmail.proto.js +12955 -7496
- package/build/protos/file.proto.js +4867 -2744
- package/build/protos/fs.proto.js +9227 -3768
- package/package.json +7 -5
- package/protos/file.proto +91 -19
- package/protos/fs.proto +107 -8
- package/build/core/id-manager.d.ts +0 -46
|
@@ -46,15 +46,15 @@ function allowOnlySingleStart() {
|
|
|
46
46
|
throw new Error(`Attempt to subscribe, when process hasn't completed indicates that functional closure is captured and called somewhere else, not in accordance with expected rxjs processing.`);
|
|
47
47
|
}
|
|
48
48
|
if (okCompletion) {
|
|
49
|
-
return rxjs_1.of().subscribe(downstream);
|
|
49
|
+
return (0, rxjs_1.of)().subscribe(downstream);
|
|
50
50
|
}
|
|
51
51
|
else {
|
|
52
|
-
return rxjs_1.throwError(err).subscribe(downstream);
|
|
52
|
+
return (0, rxjs_1.throwError)(err).subscribe(downstream);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
else {
|
|
56
56
|
wasStarted = true;
|
|
57
|
-
return src.pipe(operators_1.tap({
|
|
57
|
+
return src.pipe((0, operators_1.tap)({
|
|
58
58
|
error: e => {
|
|
59
59
|
isComplete = true;
|
|
60
60
|
err = e;
|
|
@@ -113,7 +113,7 @@ function noop() { }
|
|
|
113
113
|
class Broadcast {
|
|
114
114
|
constructor() {
|
|
115
115
|
this.src = new rxjs_1.Subject();
|
|
116
|
-
this.event$ = this.src.asObservable().pipe(operators_1.share());
|
|
116
|
+
this.event$ = this.src.asObservable().pipe((0, operators_1.share)());
|
|
117
117
|
this.sub = this.event$.subscribe(toRxObserver({}));
|
|
118
118
|
Object.seal(this);
|
|
119
119
|
}
|
|
@@ -48,7 +48,7 @@ class WeakCache {
|
|
|
48
48
|
return (this.get(key) !== undefined);
|
|
49
49
|
}
|
|
50
50
|
set(key, val) {
|
|
51
|
-
const wRef = weakref_1.makeWeakRefFor(val);
|
|
51
|
+
const wRef = (0, weakref_1.makeWeakRefFor)(val);
|
|
52
52
|
wRef.addCallback(this.makeCB(key, wRef));
|
|
53
53
|
this.wRefs.set(key, wRef);
|
|
54
54
|
}
|
|
@@ -91,6 +91,7 @@ class WeakCacheWithMinLifeTime {
|
|
|
91
91
|
}
|
|
92
92
|
v = this.waiting.get(key);
|
|
93
93
|
if (v !== undefined) {
|
|
94
|
+
this.waiting.delete(key);
|
|
94
95
|
this.filling.set(key, v);
|
|
95
96
|
return v;
|
|
96
97
|
}
|
|
@@ -117,6 +118,16 @@ class WeakCacheWithMinLifeTime {
|
|
|
117
118
|
this.waiting.delete(key);
|
|
118
119
|
this.wCache.delete(key);
|
|
119
120
|
}
|
|
121
|
+
keys() {
|
|
122
|
+
const allKeys = [];
|
|
123
|
+
for (const key of this.filling.keys()) {
|
|
124
|
+
allKeys.push(key);
|
|
125
|
+
}
|
|
126
|
+
for (const key of this.waiting.keys()) {
|
|
127
|
+
allKeys.push(key);
|
|
128
|
+
}
|
|
129
|
+
return allKeys;
|
|
130
|
+
}
|
|
120
131
|
clear() {
|
|
121
132
|
this.filling.clear();
|
|
122
133
|
this.waiting.clear();
|
package/build/lib-index.d.ts
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
export * from "./core";
|
|
3
3
|
export { makeServiceLocator, ServiceLocatorMaker } from "./lib-client/service-locator";
|
|
4
4
|
export { makeNetClient } from "./lib-client/request-utils";
|
|
5
|
-
export {
|
|
5
|
+
export { FactoryOfFSs, PerAppStorage, reverseDomain } from "./core/storage";
|
|
6
|
+
export { sysFolders } from "./core/storage/system-folders";
|
|
6
7
|
export { DeviceFS } from './lib-client/local-files/device-fs';
|
|
7
8
|
export { appDirs } from './core/app-files';
|
|
8
9
|
export { makeLogger } from './lib-client/logging/log-to-file';
|
package/build/lib-index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
Copyright (C) 2020 -
|
|
3
|
+
Copyright (C) 2020 - 2022 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
|
|
@@ -17,27 +17,30 @@
|
|
|
17
17
|
*/
|
|
18
18
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
19
19
|
if (k2 === undefined) k2 = k;
|
|
20
|
-
Object.
|
|
20
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
21
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
22
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
23
|
+
}
|
|
24
|
+
Object.defineProperty(o, k2, desc);
|
|
21
25
|
}) : (function(o, m, k, k2) {
|
|
22
26
|
if (k2 === undefined) k2 = k;
|
|
23
27
|
o[k2] = m[k];
|
|
24
28
|
}));
|
|
25
29
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
-
for (var p in m) if (p !== "default" && !
|
|
30
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
31
|
};
|
|
28
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
exports.makeLogger = exports.appDirs = exports.DeviceFS = exports.sysFolders = exports.reverseDomain = exports.PerAppStorage = exports.makeNetClient = exports.makeServiceLocator = void 0;
|
|
29
34
|
__exportStar(require("./core"), exports);
|
|
30
35
|
var service_locator_1 = require("./lib-client/service-locator");
|
|
31
36
|
Object.defineProperty(exports, "makeServiceLocator", { enumerable: true, get: function () { return service_locator_1.makeServiceLocator; } });
|
|
32
37
|
var request_utils_1 = require("./lib-client/request-utils");
|
|
33
38
|
Object.defineProperty(exports, "makeNetClient", { enumerable: true, get: function () { return request_utils_1.makeNetClient; } });
|
|
34
39
|
var storage_1 = require("./core/storage");
|
|
35
|
-
Object.defineProperty(exports, "sysFolders", { enumerable: true, get: function () { return storage_1.sysFolders; } });
|
|
36
|
-
Object.defineProperty(exports, "initSysFolders", { enumerable: true, get: function () { return storage_1.initSysFolders; } });
|
|
37
40
|
Object.defineProperty(exports, "PerAppStorage", { enumerable: true, get: function () { return storage_1.PerAppStorage; } });
|
|
38
|
-
Object.defineProperty(exports, "sysFilesOnDevice", { enumerable: true, get: function () { return storage_1.sysFilesOnDevice; } });
|
|
39
|
-
Object.defineProperty(exports, "userFilesOnDevice", { enumerable: true, get: function () { return storage_1.userFilesOnDevice; } });
|
|
40
41
|
Object.defineProperty(exports, "reverseDomain", { enumerable: true, get: function () { return storage_1.reverseDomain; } });
|
|
42
|
+
var system_folders_1 = require("./core/storage/system-folders");
|
|
43
|
+
Object.defineProperty(exports, "sysFolders", { enumerable: true, get: function () { return system_folders_1.sysFolders; } });
|
|
41
44
|
var device_fs_1 = require("./lib-client/local-files/device-fs");
|
|
42
45
|
Object.defineProperty(exports, "DeviceFS", { enumerable: true, get: function () { return device_fs_1.DeviceFS; } });
|
|
43
46
|
var app_files_1 = require("./core/app-files");
|