core-3nweb-client-lib 0.30.3 → 0.30.5
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 +9 -6
- package/build/core/app-files.d.ts +4 -4
- package/build/core/app-files.js +2 -2
- package/build/core/asmail/asmail-cap-ipc.d.ts +1 -1
- package/build/core/asmail/asmail-cap-ipc.js +2 -3
- package/build/core/asmail/config/common.d.ts +2 -2
- package/build/core/asmail/config/index.d.ts +1 -1
- package/build/core/asmail/config/invitations-anon.d.ts +1 -1
- package/build/core/asmail/config/invitations-anon.js +1 -2
- package/build/core/asmail/config/published-intro-key.d.ts +2 -2
- package/build/core/asmail/config/published-intro-key.js +1 -2
- package/build/core/asmail/delivery/common.d.ts +6 -6
- package/build/core/asmail/delivery/common.js +3 -3
- package/build/core/asmail/delivery/index.d.ts +4 -4
- package/build/core/asmail/delivery/msg.d.ts +4 -4
- package/build/core/asmail/delivery/msg.js +3 -3
- package/build/core/asmail/inbox/attachments/fs.d.ts +1 -1
- package/build/core/asmail/inbox/attachments/fs.js +1 -2
- package/build/core/asmail/inbox/inbox-events.d.ts +4 -3
- package/build/core/asmail/inbox/inbox-events.js +1 -1
- package/build/core/asmail/inbox/index.d.ts +2 -2
- package/build/core/asmail/inbox/index.js +7 -4
- package/build/core/asmail/inbox/msg-indexing/index.d.ts +2 -2
- package/build/core/asmail/inbox/msg-indexing/logs-n-entries.d.ts +3 -3
- package/build/core/asmail/inbox/msg-indexing/logs-n-entries.js +2 -2
- package/build/core/asmail/inbox/msg-indexing/sql-indexing.d.ts +1 -1
- package/build/core/asmail/inbox/msg-indexing/sql-indexing.js +1 -2
- package/build/core/asmail/inbox/msg-on-disk.d.ts +2 -2
- package/build/core/asmail/inbox/msg-on-disk.js +3 -3
- package/build/core/asmail/index.d.ts +3 -3
- package/build/core/asmail/key-verification.js +2 -3
- package/build/core/asmail/keyring/common.d.ts +1 -1
- package/build/core/asmail/keyring/common.js +7 -7
- package/build/core/asmail/keyring/correspondent-keys.d.ts +1 -1
- package/build/core/asmail/keyring/correspondent-keys.js +5 -5
- package/build/core/asmail/keyring/index.d.ts +3 -3
- package/build/core/asmail/keyring/index.js +2 -2
- package/build/core/asmail/keyring/keyring-storage.d.ts +1 -1
- package/build/core/asmail/keyring/keyring-storage.js +1 -2
- package/build/core/asmail/msg/attachments-container.d.ts +3 -3
- package/build/core/asmail/msg/attachments-container.js +7 -8
- package/build/core/asmail/msg/opener.js +2 -2
- package/build/core/asmail/msg/packer.d.ts +2 -2
- package/build/core/asmail/sending-params/index.d.ts +3 -3
- package/build/core/asmail/sending-params/own-params.d.ts +3 -3
- package/build/core/asmail/sending-params/params-from-others.d.ts +3 -3
- package/build/core/id-manager/index.d.ts +4 -4
- package/build/core/id-manager/key-storage.d.ts +1 -1
- package/build/core/id-manager/mailerid-cap-ipc.d.ts +1 -1
- package/build/core/id-manager/mailerid-cap-ipc.js +2 -3
- package/build/core/index.d.ts +3 -3
- package/build/core/startup/sign-in.d.ts +6 -6
- package/build/core/startup/sign-in.js +2 -2
- package/build/core/startup/sign-up.d.ts +1 -1
- package/build/core/startup/sign-up.js +6 -6
- package/build/core/startup/startup-cap.d.ts +2 -2
- package/build/core/startup/startup-cap.js +4 -5
- package/build/core/storage/common/obj-info-file.js +12 -13
- package/build/core/storage/common/utils.js +2 -3
- package/build/core/storage/index.d.ts +5 -5
- package/build/core/storage/index.js +2 -2
- package/build/core/storage/local/storage.d.ts +3 -3
- package/build/core/storage/storage-cap-ipc.d.ts +1 -1
- package/build/core/storage/storage-cap-ipc.js +3 -4
- package/build/core/storage/synced/obj-files.d.ts +1 -1
- package/build/core/storage/synced/obj-status.d.ts +2 -2
- package/build/core/storage/synced/obj-status.js +2 -2
- package/build/core/storage/synced/storage.d.ts +4 -4
- package/build/core/storage/synced/upload-header-file.js +3 -3
- package/build/core/storage/synced/upsyncer.d.ts +1 -1
- package/build/core/storage/system-folders/apps-data.d.ts +1 -1
- package/build/core/storage/system-folders/index.d.ts +2 -2
- package/build/core/storage/system-folders/index.js +4 -4
- package/build/core-ipc/bytes.d.ts +2 -2
- package/build/core-ipc/bytes.js +4 -5
- package/build/core-ipc/common-caps.d.ts +1 -1
- package/build/core-ipc/common-caps.js +3 -4
- package/build/core-ipc/file.d.ts +13 -14
- package/build/core-ipc/file.js +31 -31
- package/build/core-ipc/fs.d.ts +3 -3
- package/build/core-ipc/fs.js +6 -6
- package/build/core-ipc/generic.d.ts +4 -4
- package/build/core-ipc/generic.js +3 -4
- package/build/core-ipc/log-cap.d.ts +1 -1
- package/build/core-ipc/log-cap.js +2 -3
- package/build/core-ipc/startup-caps.d.ts +1 -1
- package/build/core-ipc/startup-caps.js +2 -3
- package/build/ipc-via-protobuf/connector.d.ts +6 -7
- package/build/ipc-via-protobuf/connector.js +3 -3
- package/build/ipc-via-protobuf/protobuf-msg.d.ts +1 -2
- package/build/ipc-via-protobuf/protobuf-msg.js +20 -20
- package/build/lib-client/3nstorage/exceptions.d.ts +1 -1
- package/build/lib-client/3nstorage/exceptions.js +9 -10
- package/build/lib-client/3nstorage/service.d.ts +2 -2
- package/build/lib-client/3nstorage/util/file-based-json.d.ts +3 -3
- package/build/lib-client/3nstorage/util/for-arrays.js +1 -2
- package/build/lib-client/3nstorage/xsp-fs/attrs.d.ts +1 -2
- package/build/lib-client/3nstorage/xsp-fs/common.d.ts +12 -12
- package/build/lib-client/3nstorage/xsp-fs/common.js +5 -5
- package/build/lib-client/3nstorage/xsp-fs/file-node.d.ts +4 -4
- package/build/lib-client/3nstorage/xsp-fs/file.d.ts +15 -15
- package/build/lib-client/3nstorage/xsp-fs/folder-node-serialization.js +2 -3
- package/build/lib-client/3nstorage/xsp-fs/folder-node.d.ts +7 -7
- package/build/lib-client/3nstorage/xsp-fs/fs.d.ts +27 -27
- package/build/lib-client/3nstorage/xsp-fs/link-node.d.ts +2 -2
- package/build/lib-client/3nstorage/xsp-fs/node-in-fs.d.ts +7 -7
- package/build/lib-client/3nstorage/xsp-fs/node-in-fs.js +11 -11
- package/build/lib-client/3nstorage/xsp-fs/node-persistence.d.ts +2 -2
- package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v1.js +1 -2
- package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v2.js +3 -4
- package/build/lib-client/3nweb-signup.js +4 -5
- package/build/lib-client/asmail/recipient.d.ts +1 -1
- package/build/lib-client/asmail/recipient.js +4 -4
- package/build/lib-client/asmail/sender.d.ts +3 -3
- package/build/lib-client/asmail/sender.js +9 -9
- package/build/lib-client/cryptor/cryptor-in-worker.d.ts +2 -2
- package/build/lib-client/cryptor/cryptor-wasm.js +1 -1
- package/build/lib-client/cryptor/cryptor.d.ts +2 -2
- package/build/lib-client/cryptor/cryptor.js +3 -3
- package/build/lib-client/cryptor/cryptor.wasm +0 -0
- package/build/lib-client/cryptor/in-proc-js.js +1 -2
- package/build/lib-client/cryptor/in-proc-wasm.js +1 -2
- package/build/lib-client/cryptor/serialization-for-wasm.d.ts +1 -2
- package/build/lib-client/cryptor/serialization-for-wasm.js +6 -7
- package/build/lib-client/cryptor/wasm-mp1-modules.js +1 -2
- package/build/lib-client/cryptor-work-labels.js +1 -1
- package/build/lib-client/fs-utils/files-select.d.ts +3 -3
- package/build/lib-client/fs-utils/files-select.js +1 -2
- package/build/lib-client/fs-utils/files.d.ts +7 -7
- package/build/lib-client/fs-utils/files.js +7 -8
- package/build/lib-client/fs-utils/fs-collection.d.ts +1 -1
- package/build/lib-client/fs-utils/fs-collection.js +2 -3
- package/build/lib-client/fs-utils/fs-sync-utils.d.ts +5 -5
- package/build/lib-client/fs-utils/fs-sync-utils.js +4 -5
- package/build/lib-client/fs-utils/fs-view.d.ts +4 -4
- package/build/lib-client/fs-utils/fs-view.js +1 -2
- package/build/lib-client/key-derivation.js +3 -4
- package/build/lib-client/local-files/dev-file-sink.d.ts +2 -3
- package/build/lib-client/local-files/dev-file-src.d.ts +0 -1
- package/build/lib-client/local-files/device-fs.d.ts +18 -18
- package/build/lib-client/logging/log-to-file.d.ts +5 -5
- package/build/lib-client/logging/log-to-file.js +2 -2
- package/build/lib-client/mailer-id/login.js +2 -3
- package/build/lib-client/objs-on-disk/file-writing-proc.d.ts +1 -1
- package/build/lib-client/objs-on-disk/obj-folders.d.ts +1 -1
- package/build/lib-client/objs-on-disk/obj-folders.js +3 -3
- package/build/lib-client/objs-on-disk/obj-on-disk.d.ts +1 -1
- package/build/lib-client/protobuf-type.d.ts +0 -1
- package/build/lib-client/request-utils.d.ts +2 -4
- package/build/lib-client/request-utils.js +6 -6
- package/build/lib-client/service-locator.d.ts +3 -4
- package/build/lib-client/service-locator.js +5 -6
- package/build/lib-client/user-with-mid-session.d.ts +1 -1
- package/build/lib-client/user-with-mid-session.js +17 -17
- package/build/lib-client/user-with-pkl-session.js +16 -16
- package/build/lib-client/ws-utils.js +1 -2
- package/build/lib-common/assert.js +1 -2
- package/build/lib-common/async-cryptor-wrap.js +4 -5
- package/build/lib-common/async-fs-node.d.ts +0 -3
- package/build/lib-common/async-fs-node.js +35 -35
- package/build/lib-common/async-iter.js +2 -3
- package/build/lib-common/big-endian.d.ts +0 -1
- package/build/lib-common/big-endian.js +10 -11
- package/build/lib-common/binding.js +1 -2
- package/build/lib-common/buffer-utils.d.ts +0 -1
- package/build/lib-common/buffer-utils.js +9 -9
- package/build/lib-common/byte-streaming/bytes-fifo-buffer.js +5 -5
- package/build/lib-common/byte-streaming/pipe.d.ts +2 -2
- package/build/lib-common/byte-streaming/pipe.js +1 -2
- package/build/lib-common/byte-streaming/wrapping.d.ts +2 -2
- package/build/lib-common/byte-streaming/wrapping.js +3 -4
- package/build/lib-common/bytes-equal.js +1 -2
- package/build/lib-common/canonical-address.js +3 -4
- package/build/lib-common/exceptions/error.d.ts +6 -4
- package/build/lib-common/exceptions/error.js +15 -10
- package/build/lib-common/exceptions/file.d.ts +2 -2
- package/build/lib-common/exceptions/file.js +7 -7
- package/build/lib-common/exceptions/http.js +2 -3
- package/build/lib-common/exceptions/runtime.js +1 -2
- package/build/lib-common/ipc/generic-ipc.d.ts +3 -3
- package/build/lib-common/ipc/generic-ipc.js +14 -11
- package/build/lib-common/ipc/ws-ipc.js +2 -2
- package/build/lib-common/json-utils.js +4 -5
- package/build/lib-common/jwkeys.d.ts +1 -1
- package/build/lib-common/jwkeys.js +13 -13
- package/build/lib-common/mid-sigs-NaCl-Ed.d.ts +3 -3
- package/build/lib-common/mid-sigs-NaCl-Ed.js +5 -5
- package/build/lib-common/obj-streaming/sink-utils.d.ts +2 -2
- package/build/lib-common/obj-streaming/sink-utils.js +2 -3
- package/build/lib-common/obj-streaming/wrapping.js +1 -2
- package/build/lib-common/objs-on-disk/file-layout.d.ts +4 -5
- package/build/lib-common/objs-on-disk/obj-file.d.ts +0 -1
- package/build/lib-common/objs-on-disk/utils.d.ts +3 -5
- package/build/lib-common/objs-on-disk/utils.js +5 -6
- package/build/lib-common/objs-on-disk/v1-obj-file-format.d.ts +0 -1
- package/build/lib-common/objs-on-disk/v1-obj-file-format.js +1 -1
- package/build/lib-common/processes/deferred.js +1 -2
- package/build/lib-common/processes/sleep.js +1 -2
- package/build/lib-common/processes/synced.d.ts +1 -1
- package/build/lib-common/processes/synced.js +2 -2
- package/build/lib-common/processes/timeout.js +1 -2
- package/build/lib-common/random-node.js +10 -11
- package/build/lib-common/service-api/3nstorage/owner.js +19 -19
- package/build/lib-common/service-api/asmail/config.js +3 -3
- package/build/lib-common/service-api/asmail/delivery.js +8 -8
- package/build/lib-common/service-api/asmail/retrieval.js +11 -11
- package/build/lib-common/service-api/mailer-id/login.js +2 -2
- package/build/lib-common/service-api/mailer-id/provisioning.js +2 -2
- package/build/lib-common/service-api/pub-key-login.js +2 -2
- package/build/lib-common/service-api/web-socket-base.d.ts +1 -1
- package/build/lib-common/service-api/web-socket-base.js +3 -3
- package/build/lib-common/session-encryptor.js +1 -2
- package/build/lib-common/timed-cache.js +1 -2
- package/build/lib-common/user-admin-api/signup.js +4 -4
- package/build/lib-common/utils-for-observables.js +5 -5
- package/build/lib-sqlite-on-3nstorage/deferred.js +1 -2
- package/build/lib-sqlite-on-3nstorage/index.d.ts +5 -5
- package/build/lib-sqlite-on-3nstorage/index.js +2 -2
- package/build/lib-sqlite-on-3nstorage/synced.d.ts +1 -1
- package/build/lib-sqlite-on-3nstorage/synced.js +2 -2
- package/build/raw-3nweb-clients.d.ts +7 -7
- package/build/raw-3nweb-clients.js +2 -2
- package/package.json +2 -2
|
@@ -16,7 +16,16 @@
|
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.
|
|
19
|
+
exports.packUintTo2Bytes = packUintTo2Bytes;
|
|
20
|
+
exports.uintFrom2Bytes = uintFrom2Bytes;
|
|
21
|
+
exports.packUintTo3Bytes = packUintTo3Bytes;
|
|
22
|
+
exports.uintFrom3Bytes = uintFrom3Bytes;
|
|
23
|
+
exports.packUintTo4Bytes = packUintTo4Bytes;
|
|
24
|
+
exports.uintFrom4Bytes = uintFrom4Bytes;
|
|
25
|
+
exports.packUintTo6Bytes = packUintTo6Bytes;
|
|
26
|
+
exports.uintFrom6Bytes = uintFrom6Bytes;
|
|
27
|
+
exports.packUintTo8Bytes = packUintTo8Bytes;
|
|
28
|
+
exports.uintFrom8Bytes = uintFrom8Bytes;
|
|
20
29
|
/**
|
|
21
30
|
* @param u is an unsigned integer up to 16-bits to be stored big-endian way in
|
|
22
31
|
* 2 bytes.
|
|
@@ -31,7 +40,6 @@ function packUintTo2Bytes(u, b, i) {
|
|
|
31
40
|
b[i] = u >>> 8;
|
|
32
41
|
b[i + 1] = u;
|
|
33
42
|
}
|
|
34
|
-
exports.packUintTo2Bytes = packUintTo2Bytes;
|
|
35
43
|
/**
|
|
36
44
|
* @param x
|
|
37
45
|
* @param i
|
|
@@ -44,7 +52,6 @@ function uintFrom2Bytes(x, i = 0) {
|
|
|
44
52
|
}
|
|
45
53
|
return (x[i] << 8) | x[i + 1];
|
|
46
54
|
}
|
|
47
|
-
exports.uintFrom2Bytes = uintFrom2Bytes;
|
|
48
55
|
/**
|
|
49
56
|
* @param u is an unsigned integer up to 24-bits to be stored big-endian way in
|
|
50
57
|
* 3 bytes.
|
|
@@ -60,7 +67,6 @@ function packUintTo3Bytes(u, b, i) {
|
|
|
60
67
|
b[i + 1] = u >>> 8;
|
|
61
68
|
b[i + 2] = u;
|
|
62
69
|
}
|
|
63
|
-
exports.packUintTo3Bytes = packUintTo3Bytes;
|
|
64
70
|
/**
|
|
65
71
|
* @param x
|
|
66
72
|
* @param i
|
|
@@ -73,7 +79,6 @@ function uintFrom3Bytes(x, i = 0) {
|
|
|
73
79
|
}
|
|
74
80
|
return (x[i] << 16) | (x[i + 1] << 8) | x[i + 2];
|
|
75
81
|
}
|
|
76
|
-
exports.uintFrom3Bytes = uintFrom3Bytes;
|
|
77
82
|
/**
|
|
78
83
|
* @param u is an unsigned integer up to 32-bits to be stored big-endian way in
|
|
79
84
|
* 4 bytes.
|
|
@@ -90,7 +95,6 @@ function packUintTo4Bytes(u, b, i) {
|
|
|
90
95
|
b[i + 2] = u >>> 8;
|
|
91
96
|
b[i + 3] = u;
|
|
92
97
|
}
|
|
93
|
-
exports.packUintTo4Bytes = packUintTo4Bytes;
|
|
94
98
|
/**
|
|
95
99
|
* @param x
|
|
96
100
|
* @param i
|
|
@@ -106,7 +110,6 @@ function uintFrom4Bytes(x, i = 0) {
|
|
|
106
110
|
// float number. Hence, we need a bit different operation here.
|
|
107
111
|
return (x[i] * 0x1000000) + ((x[i + 1] << 16) | (x[i + 2] << 8) | x[i + 3]);
|
|
108
112
|
}
|
|
109
|
-
exports.uintFrom4Bytes = uintFrom4Bytes;
|
|
110
113
|
/**
|
|
111
114
|
* @param u is an unsigned integer up to 48-bits to be stored big-endian way in
|
|
112
115
|
* 6 bytes.
|
|
@@ -127,7 +130,6 @@ function packUintTo6Bytes(u, b, i) {
|
|
|
127
130
|
b[i + 4] = l >>> 8;
|
|
128
131
|
b[i + 5] = l;
|
|
129
132
|
}
|
|
130
|
-
exports.packUintTo6Bytes = packUintTo6Bytes;
|
|
131
133
|
/**
|
|
132
134
|
* @param x
|
|
133
135
|
* @param i
|
|
@@ -145,7 +147,6 @@ function uintFrom6Bytes(x, i = 0) {
|
|
|
145
147
|
const l = (x[i] * 0x1000000) + ((x[i + 3] << 16) | (x[i + 4] << 8) | x[i + 5]);
|
|
146
148
|
return (h * 0x100000000 + l);
|
|
147
149
|
}
|
|
148
|
-
exports.uintFrom6Bytes = uintFrom6Bytes;
|
|
149
150
|
/**
|
|
150
151
|
* @param u is an unsigned integer up to 53-bits to be stored big-endian way in
|
|
151
152
|
* 8 bytes.
|
|
@@ -168,7 +169,6 @@ function packUintTo8Bytes(u, b, i) {
|
|
|
168
169
|
b[i + 6] = l >>> 8;
|
|
169
170
|
b[i + 7] = l;
|
|
170
171
|
}
|
|
171
|
-
exports.packUintTo8Bytes = packUintTo8Bytes;
|
|
172
172
|
/**
|
|
173
173
|
* @param x
|
|
174
174
|
* @param i
|
|
@@ -186,5 +186,4 @@ function uintFrom8Bytes(x, i = 0) {
|
|
|
186
186
|
const l = (x[i + 4] * 0x1000000) + ((x[i + 5] << 16) | (x[i + 6] << 8) | x[i + 7]);
|
|
187
187
|
return (h * 0x100000000 + l);
|
|
188
188
|
}
|
|
189
|
-
exports.uintFrom8Bytes = uintFrom8Bytes;
|
|
190
189
|
Object.freeze(exports);
|
|
@@ -15,9 +15,8 @@
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.bind =
|
|
18
|
+
exports.bind = bind;
|
|
19
19
|
function bind(thisArg, func) {
|
|
20
20
|
return func.bind(thisArg);
|
|
21
21
|
}
|
|
22
|
-
exports.bind = bind;
|
|
23
22
|
Object.freeze(exports);
|
|
@@ -15,7 +15,12 @@
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
18
|
+
exports.utf8 = exports.base64urlSafe = exports.base64 = exports.EMPTY_BUFFER = void 0;
|
|
19
|
+
exports.toBuffer = toBuffer;
|
|
20
|
+
exports.bufFromJson = bufFromJson;
|
|
21
|
+
exports.joinByteArrs = joinByteArrs;
|
|
22
|
+
exports.byteLengthIn = byteLengthIn;
|
|
23
|
+
exports.makeUint8ArrayCopy = makeUint8ArrayCopy;
|
|
19
24
|
exports.EMPTY_BUFFER = Buffer.alloc(0);
|
|
20
25
|
/**
|
|
21
26
|
* Buffer and Uint8Array are intimately linked in Node, starting with some
|
|
@@ -35,7 +40,6 @@ function toBuffer(bytes) {
|
|
|
35
40
|
}
|
|
36
41
|
return Buffer.from(bytes.buffer, bytes.byteOffset, bytes.length);
|
|
37
42
|
}
|
|
38
|
-
exports.toBuffer = toBuffer;
|
|
39
43
|
/**
|
|
40
44
|
* Node's JSON.stringify turns Buffer into a particular json.
|
|
41
45
|
* This function turns this json back to Buffer.
|
|
@@ -48,7 +52,6 @@ function bufFromJson(json) {
|
|
|
48
52
|
}
|
|
49
53
|
return Buffer.from(json.data);
|
|
50
54
|
}
|
|
51
|
-
exports.bufFromJson = bufFromJson;
|
|
52
55
|
var base64;
|
|
53
56
|
(function (base64) {
|
|
54
57
|
function pack(bytes) {
|
|
@@ -60,7 +63,7 @@ var base64;
|
|
|
60
63
|
return Buffer.from(str, 'base64');
|
|
61
64
|
}
|
|
62
65
|
base64.open = open;
|
|
63
|
-
})(base64
|
|
66
|
+
})(base64 || (exports.base64 = base64 = {}));
|
|
64
67
|
Object.freeze(base64);
|
|
65
68
|
var base64urlSafe;
|
|
66
69
|
(function (base64urlSafe) {
|
|
@@ -78,7 +81,7 @@ var base64urlSafe;
|
|
|
78
81
|
return base64.open(str);
|
|
79
82
|
}
|
|
80
83
|
base64urlSafe.open = open;
|
|
81
|
-
})(base64urlSafe
|
|
84
|
+
})(base64urlSafe || (exports.base64urlSafe = base64urlSafe = {}));
|
|
82
85
|
Object.freeze(base64);
|
|
83
86
|
var utf8;
|
|
84
87
|
(function (utf8) {
|
|
@@ -91,7 +94,7 @@ var utf8;
|
|
|
91
94
|
return buf.toString('utf8');
|
|
92
95
|
}
|
|
93
96
|
utf8.open = open;
|
|
94
|
-
})(utf8
|
|
97
|
+
})(utf8 || (exports.utf8 = utf8 = {}));
|
|
95
98
|
Object.freeze(utf8);
|
|
96
99
|
function joinByteArrs(arrs) {
|
|
97
100
|
let totalLen = 0;
|
|
@@ -106,7 +109,6 @@ function joinByteArrs(arrs) {
|
|
|
106
109
|
}
|
|
107
110
|
return allBytes;
|
|
108
111
|
}
|
|
109
|
-
exports.joinByteArrs = joinByteArrs;
|
|
110
112
|
function byteLengthIn(arrs) {
|
|
111
113
|
let len = 0;
|
|
112
114
|
for (let i = 0; i < arrs.length; i += 1) {
|
|
@@ -114,11 +116,9 @@ function byteLengthIn(arrs) {
|
|
|
114
116
|
}
|
|
115
117
|
return len;
|
|
116
118
|
}
|
|
117
|
-
exports.byteLengthIn = byteLengthIn;
|
|
118
119
|
function makeUint8ArrayCopy(arr) {
|
|
119
120
|
const copy = new Uint8Array(arr.length);
|
|
120
121
|
copy.set(arr);
|
|
121
122
|
return copy;
|
|
122
123
|
}
|
|
123
|
-
exports.makeUint8ArrayCopy = makeUint8ArrayCopy;
|
|
124
124
|
Object.freeze(exports);
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.BytesFIFOBuffer = void 0;
|
|
19
19
|
class BytesFIFOBuffer {
|
|
20
|
-
constructor() {
|
|
21
|
-
this.queue = [];
|
|
22
|
-
this.bytesLen = 0;
|
|
23
|
-
Object.seal(this);
|
|
24
|
-
}
|
|
25
20
|
get length() {
|
|
26
21
|
return this.bytesLen;
|
|
27
22
|
}
|
|
28
23
|
get queueLength() {
|
|
29
24
|
return this.queue.length;
|
|
30
25
|
}
|
|
26
|
+
constructor() {
|
|
27
|
+
this.queue = [];
|
|
28
|
+
this.bytesLen = 0;
|
|
29
|
+
Object.seal(this);
|
|
30
|
+
}
|
|
31
31
|
clear() {
|
|
32
32
|
this.queue = [];
|
|
33
33
|
this.bytesLen = 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
type FileByteSource = web3n.files.FileByteSource;
|
|
2
|
+
type FileByteSink = web3n.files.FileByteSink;
|
|
3
3
|
/**
|
|
4
4
|
* This function pipes bytes from a given source to a given sink. Returned
|
|
5
5
|
* promise resolves to a total number of piped bytes.
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.pipe =
|
|
18
|
+
exports.pipe = pipe;
|
|
19
19
|
const sink_utils_1 = require("../obj-streaming/sink-utils");
|
|
20
20
|
/**
|
|
21
21
|
* This function pipes bytes from a given source to a given sink. Returned
|
|
@@ -53,5 +53,4 @@ async function pipe(src, sink, progressCB, closeSink = true, bufSize = 64 * 1024
|
|
|
53
53
|
throw err;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
exports.pipe = pipe;
|
|
57
56
|
Object.freeze(exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ByteSource } from "xsp-files";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type FileByteSource = web3n.files.FileByteSource;
|
|
3
|
+
type FileByteSink = web3n.files.FileByteSink;
|
|
4
4
|
export declare function wrapAndSyncFileSink(sink: FileByteSink): FileByteSink;
|
|
5
5
|
export declare function wrapAndSyncSource(src: ByteSource): ByteSource;
|
|
6
6
|
export declare function wrapAndSyncFileSource(src: FileByteSource): FileByteSource;
|
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.
|
|
19
|
+
exports.wrapAndSyncFileSink = wrapAndSyncFileSink;
|
|
20
|
+
exports.wrapAndSyncSource = wrapAndSyncSource;
|
|
21
|
+
exports.wrapAndSyncFileSource = wrapAndSyncFileSource;
|
|
20
22
|
const synced_1 = require("../processes/synced");
|
|
21
23
|
function wrapAndSyncFileSink(sink) {
|
|
22
24
|
const syncProc = new synced_1.SingleProc();
|
|
@@ -29,7 +31,6 @@ function wrapAndSyncFileSink(sink) {
|
|
|
29
31
|
};
|
|
30
32
|
return w;
|
|
31
33
|
}
|
|
32
|
-
exports.wrapAndSyncFileSink = wrapAndSyncFileSink;
|
|
33
34
|
function wrapAndSyncSource(src) {
|
|
34
35
|
const syncProc = new synced_1.SingleProc();
|
|
35
36
|
const w = {
|
|
@@ -41,7 +42,6 @@ function wrapAndSyncSource(src) {
|
|
|
41
42
|
};
|
|
42
43
|
return w;
|
|
43
44
|
}
|
|
44
|
-
exports.wrapAndSyncSource = wrapAndSyncSource;
|
|
45
45
|
function wrapAndSyncFileSource(src) {
|
|
46
46
|
const syncProc = new synced_1.SingleProc();
|
|
47
47
|
const w = {
|
|
@@ -53,5 +53,4 @@ function wrapAndSyncFileSource(src) {
|
|
|
53
53
|
};
|
|
54
54
|
return w;
|
|
55
55
|
}
|
|
56
|
-
exports.wrapAndSyncFileSource = wrapAndSyncFileSource;
|
|
57
56
|
Object.freeze(exports);
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.bytesEqual =
|
|
18
|
+
exports.bytesEqual = bytesEqual;
|
|
19
19
|
function bytesEqual(a, b) {
|
|
20
20
|
if (a.BYTES_PER_ELEMENT !== b.BYTES_PER_ELEMENT) {
|
|
21
21
|
return false;
|
|
@@ -30,4 +30,3 @@ function bytesEqual(a, b) {
|
|
|
30
30
|
}
|
|
31
31
|
return true;
|
|
32
32
|
}
|
|
33
|
-
exports.bytesEqual = bytesEqual;
|
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.
|
|
19
|
+
exports.toCanonicalAddress = toCanonicalAddress;
|
|
20
|
+
exports.areAddressesEqual = areAddressesEqual;
|
|
21
|
+
exports.checkAndTransformAddress = checkAndTransformAddress;
|
|
20
22
|
const punycode_1 = require("punycode");
|
|
21
23
|
/**
|
|
22
24
|
* @param address
|
|
@@ -38,7 +40,6 @@ function toCanonicalAddress(address) {
|
|
|
38
40
|
checkDomainString(domain, address);
|
|
39
41
|
return (user + '@' + domain).toLowerCase();
|
|
40
42
|
}
|
|
41
|
-
exports.toCanonicalAddress = toCanonicalAddress;
|
|
42
43
|
const whiteSpace = /\s/g;
|
|
43
44
|
const invalidInDomain = /[^a-zA-Z0-9\-\.]/;
|
|
44
45
|
function checkDomainString(d, addrForErrMsg) {
|
|
@@ -79,7 +80,6 @@ function areAddressesEqual(a, b) {
|
|
|
79
80
|
}
|
|
80
81
|
return (canonicalA === canonicalB);
|
|
81
82
|
}
|
|
82
|
-
exports.areAddressesEqual = areAddressesEqual;
|
|
83
83
|
/**
|
|
84
84
|
* @param address
|
|
85
85
|
* @return if given address is ok, its canonical form is returned.
|
|
@@ -91,5 +91,4 @@ function checkAndTransformAddress(address) {
|
|
|
91
91
|
}
|
|
92
92
|
catch (err) { }
|
|
93
93
|
}
|
|
94
|
-
exports.checkAndTransformAddress = checkAndTransformAddress;
|
|
95
94
|
Object.freeze(exports);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
type RuntimeException = web3n.RuntimeException;
|
|
2
|
+
export type ErrorWithCause = (Error & {
|
|
2
3
|
cause: any;
|
|
3
|
-
}
|
|
4
|
-
export declare function errWithCause(cause: any, message: string): ErrorWithCause;
|
|
5
|
-
export declare function recursiveErrJSONify(err:
|
|
4
|
+
}) | RuntimeException;
|
|
5
|
+
export declare function errWithCause(cause: any, message: string): ErrorWithCause | RuntimeException;
|
|
6
|
+
export declare function recursiveErrJSONify(err: RuntimeException): any;
|
|
6
7
|
export declare function stringifyErr(err: any): string;
|
|
8
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
Copyright (C) 2016 - 2017, 2020, 2022 3NSoft Inc.
|
|
3
|
+
Copyright (C) 2016 - 2017, 2020, 2022, 2024 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
|
|
@@ -15,16 +15,23 @@
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
18
|
+
exports.errWithCause = errWithCause;
|
|
19
|
+
exports.recursiveErrJSONify = recursiveErrJSONify;
|
|
20
|
+
exports.stringifyErr = stringifyErr;
|
|
21
|
+
const runtime_1 = require("./runtime");
|
|
19
22
|
function errWithCause(cause, message) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
if (cause.runtimeException) {
|
|
24
|
+
return (0, runtime_1.makeRuntimeException)('secondary', { message, cause }, {});
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
const err = new Error(message);
|
|
28
|
+
err.cause = cause;
|
|
29
|
+
if (cause.failedCipherVerification) {
|
|
30
|
+
err.failedCipherVerification = true;
|
|
31
|
+
}
|
|
32
|
+
return err;
|
|
24
33
|
}
|
|
25
|
-
return err;
|
|
26
34
|
}
|
|
27
|
-
exports.errWithCause = errWithCause;
|
|
28
35
|
function recursiveErrJSONify(err) {
|
|
29
36
|
if (!err || (typeof err !== 'object') || Array.isArray(err)) {
|
|
30
37
|
return err;
|
|
@@ -46,7 +53,6 @@ function recursiveErrJSONify(err) {
|
|
|
46
53
|
return jsonErr;
|
|
47
54
|
}
|
|
48
55
|
}
|
|
49
|
-
exports.recursiveErrJSONify = recursiveErrJSONify;
|
|
50
56
|
function stringifyErr(err) {
|
|
51
57
|
if (!err) {
|
|
52
58
|
return '';
|
|
@@ -80,5 +86,4 @@ function stringifyErr(err) {
|
|
|
80
86
|
}
|
|
81
87
|
return errStr.split('\\n').join('\n').split('\\\\').join('\\');
|
|
82
88
|
}
|
|
83
|
-
exports.stringifyErr = stringifyErr;
|
|
84
89
|
Object.freeze(exports);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type FileException = web3n.files.FileException;
|
|
2
|
+
export type FileExceptionFlag = web3n.files.FileExceptionFlag;
|
|
3
3
|
export declare const Code: web3n.files.exceptionCode;
|
|
4
4
|
export declare function makeFileExceptionFromCode(code: string | undefined, path: string, cause?: any): FileException;
|
|
5
5
|
export declare function makeFileException(flag: keyof FileExceptionFlag, path: string, cause?: any): FileException;
|
|
@@ -16,7 +16,13 @@
|
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.
|
|
19
|
+
exports.Code = void 0;
|
|
20
|
+
exports.makeFileExceptionFromCode = makeFileExceptionFromCode;
|
|
21
|
+
exports.makeFileException = makeFileException;
|
|
22
|
+
exports.maskPathInExc = maskPathInExc;
|
|
23
|
+
exports.ensureCorrectFS = ensureCorrectFS;
|
|
24
|
+
exports.makeNoAttrsExc = makeNoAttrsExc;
|
|
25
|
+
exports.makeVersionMismatchExc = makeVersionMismatchExc;
|
|
20
26
|
exports.Code = {
|
|
21
27
|
notFound: 'ENOENT',
|
|
22
28
|
alreadyExists: 'EEXIST',
|
|
@@ -51,7 +57,6 @@ function makeFileExceptionFromCode(code, path, cause) {
|
|
|
51
57
|
}
|
|
52
58
|
return err;
|
|
53
59
|
}
|
|
54
|
-
exports.makeFileExceptionFromCode = makeFileExceptionFromCode;
|
|
55
60
|
function makeFileException(flag, path, cause) {
|
|
56
61
|
const code = exports.Code[flag];
|
|
57
62
|
const err = {
|
|
@@ -64,7 +69,6 @@ function makeFileException(flag, path, cause) {
|
|
|
64
69
|
err[flag] = true;
|
|
65
70
|
return err;
|
|
66
71
|
}
|
|
67
|
-
exports.makeFileException = makeFileException;
|
|
68
72
|
function maskPathInExc(pathPrefixMaskLen, exc) {
|
|
69
73
|
if (!exc.runtimeException || !exc.code) {
|
|
70
74
|
return exc;
|
|
@@ -74,7 +78,6 @@ function maskPathInExc(pathPrefixMaskLen, exc) {
|
|
|
74
78
|
}
|
|
75
79
|
return exc;
|
|
76
80
|
}
|
|
77
|
-
exports.maskPathInExc = maskPathInExc;
|
|
78
81
|
function ensureCorrectFS(fs, type, writable) {
|
|
79
82
|
if (!fs) {
|
|
80
83
|
throw new Error("No file system given.");
|
|
@@ -86,7 +89,6 @@ function ensureCorrectFS(fs, type, writable) {
|
|
|
86
89
|
throw new Error(`Given file system is ${fs.writable ? '' : 'not'} writable, while it is expected to be ${writable ? '' : 'not'} writable`);
|
|
87
90
|
}
|
|
88
91
|
}
|
|
89
|
-
exports.ensureCorrectFS = ensureCorrectFS;
|
|
90
92
|
function makeNoAttrsExc(path) {
|
|
91
93
|
return {
|
|
92
94
|
runtimeException: true,
|
|
@@ -96,7 +98,6 @@ function makeNoAttrsExc(path) {
|
|
|
96
98
|
attrsNotEnabledInFS: true
|
|
97
99
|
};
|
|
98
100
|
}
|
|
99
|
-
exports.makeNoAttrsExc = makeNoAttrsExc;
|
|
100
101
|
function makeVersionMismatchExc(path) {
|
|
101
102
|
return {
|
|
102
103
|
runtimeException: true,
|
|
@@ -106,5 +107,4 @@ function makeVersionMismatchExc(path) {
|
|
|
106
107
|
versionMismatch: true
|
|
107
108
|
};
|
|
108
109
|
}
|
|
109
|
-
exports.makeVersionMismatchExc = makeVersionMismatchExc;
|
|
110
110
|
Object.freeze(exports);
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
18
|
+
exports.makeConnectionException = makeConnectionException;
|
|
19
|
+
exports.makeHTTPException = makeHTTPException;
|
|
19
20
|
function makeConnectionException(url, method, msg, cause) {
|
|
20
21
|
const exc = {
|
|
21
22
|
runtimeException: true,
|
|
@@ -29,7 +30,6 @@ function makeConnectionException(url, method, msg, cause) {
|
|
|
29
30
|
}
|
|
30
31
|
return exc;
|
|
31
32
|
}
|
|
32
|
-
exports.makeConnectionException = makeConnectionException;
|
|
33
33
|
function makeHTTPException(url, method, status, msg, cause) {
|
|
34
34
|
const exc = {
|
|
35
35
|
runtimeException: true,
|
|
@@ -44,5 +44,4 @@ function makeHTTPException(url, method, status, msg, cause) {
|
|
|
44
44
|
}
|
|
45
45
|
return exc;
|
|
46
46
|
}
|
|
47
|
-
exports.makeHTTPException = makeHTTPException;
|
|
48
47
|
Object.freeze(exports);
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.makeRuntimeException =
|
|
19
|
+
exports.makeRuntimeException = makeRuntimeException;
|
|
20
20
|
function makeRuntimeException(type, params, flags) {
|
|
21
21
|
const exc = {
|
|
22
22
|
runtimeException: true,
|
|
@@ -34,5 +34,4 @@ function makeRuntimeException(type, params, flags) {
|
|
|
34
34
|
}
|
|
35
35
|
return exc;
|
|
36
36
|
}
|
|
37
|
-
exports.makeRuntimeException = makeRuntimeException;
|
|
38
37
|
Object.freeze(exports);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Observer<T> = web3n.Observer<T>;
|
|
2
2
|
export interface RawDuplex<T> {
|
|
3
3
|
/**
|
|
4
4
|
* This function triggers sending of a given message to the other side.
|
|
@@ -37,7 +37,7 @@ interface EventEndEnvelope {
|
|
|
37
37
|
channel: string;
|
|
38
38
|
err?: any;
|
|
39
39
|
}
|
|
40
|
-
export
|
|
40
|
+
export type Envelope = RequestEnvelope<any> | ReplyEnvelope<any> | EventEnvelope<any> | EventEndEnvelope;
|
|
41
41
|
export interface RequestServer extends Closable {
|
|
42
42
|
/**
|
|
43
43
|
* @param reqName is a name of request, to be handled by a given handler
|
|
@@ -51,7 +51,7 @@ export interface RequestServer extends Closable {
|
|
|
51
51
|
*/
|
|
52
52
|
notifyOfProgressOnRequest<T>(env: RequestEnvelope<any>, rep: T): void;
|
|
53
53
|
}
|
|
54
|
-
export
|
|
54
|
+
export type RequestHandler<TReq, TRes> = (env: RequestEnvelope<TReq>) => Promise<TRes> | void;
|
|
55
55
|
export interface RequestingClient extends Closable {
|
|
56
56
|
/**
|
|
57
57
|
* This returns a promise, resolvable to a reply that other side sends back,
|
|
@@ -15,10 +15,17 @@
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.SingleObserverWrap = exports.MultiObserverWrap =
|
|
18
|
+
exports.SingleObserverWrap = exports.MultiObserverWrap = void 0;
|
|
19
|
+
exports.makeRequestingClient = makeRequestingClient;
|
|
20
|
+
exports.makeRequestServer = makeRequestServer;
|
|
21
|
+
exports.makeEventfulServer = makeEventfulServer;
|
|
22
|
+
exports.makeSubscribingClient = makeSubscribingClient;
|
|
19
23
|
const map_of_sets_1 = require("../map-of-sets");
|
|
20
24
|
const synced_1 = require("../processes/synced");
|
|
21
25
|
function toTransferrableError(e) {
|
|
26
|
+
if (e.runtimeException) {
|
|
27
|
+
return e;
|
|
28
|
+
}
|
|
22
29
|
const err = {
|
|
23
30
|
message: e.message,
|
|
24
31
|
name: e.name,
|
|
@@ -173,7 +180,6 @@ Object.freeze(RequestingSide);
|
|
|
173
180
|
function makeRequestingClient(channel, comm) {
|
|
174
181
|
return (new RequestingSide(channel, comm)).wrap();
|
|
175
182
|
}
|
|
176
|
-
exports.makeRequestingClient = makeRequestingClient;
|
|
177
183
|
class ReplyingSide extends MessageHandler {
|
|
178
184
|
constructor(channel, comm) {
|
|
179
185
|
super(channel, comm);
|
|
@@ -277,7 +283,6 @@ Object.freeze(ReplyingSide);
|
|
|
277
283
|
function makeRequestServer(channel, comm) {
|
|
278
284
|
return (new ReplyingSide(channel, comm)).wrap();
|
|
279
285
|
}
|
|
280
|
-
exports.makeRequestServer = makeRequestServer;
|
|
281
286
|
function makeUnknownEventException(message) {
|
|
282
287
|
return {
|
|
283
288
|
runtimeException: true,
|
|
@@ -391,7 +396,6 @@ Object.freeze(EventsSendingSide);
|
|
|
391
396
|
function makeEventfulServer(channel, comm) {
|
|
392
397
|
return (new EventsSendingSide(channel, comm)).wrap();
|
|
393
398
|
}
|
|
394
|
-
exports.makeEventfulServer = makeEventfulServer;
|
|
395
399
|
class EventListener {
|
|
396
400
|
constructor(channel, observer, detach) {
|
|
397
401
|
this.channel = channel;
|
|
@@ -590,16 +594,15 @@ Object.freeze(IpcEventChannels);
|
|
|
590
594
|
function makeSubscribingClient(channel, comm) {
|
|
591
595
|
return (new EventsReceivingSide(channel, comm)).wrap();
|
|
592
596
|
}
|
|
593
|
-
exports.makeSubscribingClient = makeSubscribingClient;
|
|
594
597
|
class MultiObserverWrap {
|
|
598
|
+
get done() {
|
|
599
|
+
return this.isDone;
|
|
600
|
+
}
|
|
595
601
|
constructor() {
|
|
596
602
|
this.isDone = false;
|
|
597
603
|
this.obs = new Set();
|
|
598
604
|
Object.seal(this);
|
|
599
605
|
}
|
|
600
|
-
get done() {
|
|
601
|
-
return this.isDone;
|
|
602
|
-
}
|
|
603
606
|
add(obs) {
|
|
604
607
|
if (this.isDone) {
|
|
605
608
|
throw new Error(`Cannot add observer, as this source is already done`);
|
|
@@ -651,15 +654,15 @@ exports.MultiObserverWrap = MultiObserverWrap;
|
|
|
651
654
|
Object.freeze(MultiObserverWrap.prototype);
|
|
652
655
|
Object.freeze(MultiObserverWrap);
|
|
653
656
|
class SingleObserverWrap {
|
|
657
|
+
get done() {
|
|
658
|
+
return this.isDone;
|
|
659
|
+
}
|
|
654
660
|
constructor() {
|
|
655
661
|
this.isDone = false;
|
|
656
662
|
this.obs = undefined;
|
|
657
663
|
this.detach = () => this.setDone();
|
|
658
664
|
Object.seal(this);
|
|
659
665
|
}
|
|
660
|
-
get done() {
|
|
661
|
-
return this.isDone;
|
|
662
|
-
}
|
|
663
666
|
set(obs) {
|
|
664
667
|
if (this.isDone) {
|
|
665
668
|
throw new Error(`Cannot add observer, as this source is already done`);
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
18
|
+
exports.makeEventfulServer = void 0;
|
|
19
|
+
exports.makeSubscriber = makeSubscriber;
|
|
19
20
|
const generic_ipc_1 = require("./generic-ipc");
|
|
20
21
|
var generic_ipc_2 = require("./generic-ipc");
|
|
21
22
|
Object.defineProperty(exports, "makeEventfulServer", { enumerable: true, get: function () { return generic_ipc_2.makeEventfulServer; } });
|
|
@@ -113,5 +114,4 @@ function makeSubscriber(ws, ipcChannel) {
|
|
|
113
114
|
const comm = makeJsonCommPoint(ws);
|
|
114
115
|
return (0, generic_ipc_1.makeSubscribingClient)(ipcChannel, comm);
|
|
115
116
|
}
|
|
116
|
-
exports.makeSubscriber = makeSubscriber;
|
|
117
117
|
Object.freeze(exports);
|
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.
|
|
19
|
+
exports.copy = copy;
|
|
20
|
+
exports.deepEqual = deepEqual;
|
|
21
|
+
exports.deepFind = deepFind;
|
|
22
|
+
exports.applyChangesToJSON = applyChangesToJSON;
|
|
20
23
|
/**
|
|
21
24
|
* This function creates a copy of json entity with a caveat that Buffer and
|
|
22
25
|
* byte arrays are shared between original and a copy.
|
|
@@ -62,7 +65,6 @@ function copy(orig, excludeTopFields) {
|
|
|
62
65
|
return c;
|
|
63
66
|
}
|
|
64
67
|
}
|
|
65
|
-
exports.copy = copy;
|
|
66
68
|
function deepEqual(a, b) {
|
|
67
69
|
const t = typeof a;
|
|
68
70
|
if (t !== typeof b) {
|
|
@@ -106,7 +108,6 @@ function deepEqual(a, b) {
|
|
|
106
108
|
}
|
|
107
109
|
return true;
|
|
108
110
|
}
|
|
109
|
-
exports.deepEqual = deepEqual;
|
|
110
111
|
function* deepFind(a, predicate) {
|
|
111
112
|
if ((typeof a !== 'object') || !a) {
|
|
112
113
|
if (predicate(a)) {
|
|
@@ -127,7 +128,6 @@ function* deepFind(a, predicate) {
|
|
|
127
128
|
}
|
|
128
129
|
}
|
|
129
130
|
}
|
|
130
|
-
exports.deepFind = deepFind;
|
|
131
131
|
/**
|
|
132
132
|
* This function applies given changes to object.
|
|
133
133
|
* @param json is an object that is being changed
|
|
@@ -145,5 +145,4 @@ function applyChangesToJSON(json, changes) {
|
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
-
exports.applyChangesToJSON = applyChangesToJSON;
|
|
149
148
|
Object.freeze(exports);
|
|
@@ -106,7 +106,7 @@ export declare function keyToJson(key: Key): JsonKey;
|
|
|
106
106
|
export declare function getKeyCert(signedCert: SignedLoad): KeyCert;
|
|
107
107
|
export declare function getPubKey(signedCert: SignedLoad): JsonKey;
|
|
108
108
|
export declare function getPrincipalAddress(signedCert: SignedLoad): string;
|
|
109
|
-
export declare
|
|
109
|
+
export declare namespace use {
|
|
110
110
|
const MID_PKLOGIN = "login-pub-key";
|
|
111
111
|
}
|
|
112
112
|
export interface MailerIdAssertionLoad {
|