core-3nweb-client-lib 0.26.0 → 0.27.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.
Files changed (199) hide show
  1. package/build/api-defs/asmail.d.ts +1 -1
  2. package/build/api-defs/files.d.ts +278 -69
  3. package/build/core/app-files.js +7 -7
  4. package/build/core/asmail/config/common.js +2 -2
  5. package/build/core/asmail/config/index.js +2 -2
  6. package/build/core/asmail/config/published-intro-key.js +1 -1
  7. package/build/core/asmail/delivery/common.js +7 -7
  8. package/build/core/asmail/delivery/index.js +5 -5
  9. package/build/core/asmail/delivery/msg.js +4 -4
  10. package/build/core/asmail/delivery/per-recipient-wip.js +1 -1
  11. package/build/core/asmail/inbox/attachments/fs.js +5 -1
  12. package/build/core/asmail/inbox/cached-msgs.js +1 -1
  13. package/build/core/asmail/inbox/inbox-events.js +4 -4
  14. package/build/core/asmail/inbox/index.js +10 -10
  15. package/build/core/asmail/inbox/msg-downloader.js +1 -1
  16. package/build/core/asmail/inbox/msg-indexing.js +1 -1
  17. package/build/core/asmail/inbox/msg-on-disk.js +5 -5
  18. package/build/core/asmail/index.d.ts +3 -3
  19. package/build/core/asmail/index.js +13 -8
  20. package/build/core/asmail/key-verification.js +5 -5
  21. package/build/core/asmail/keyring/common.js +7 -6
  22. package/build/core/asmail/keyring/correspondent-keys.js +8 -7
  23. package/build/core/asmail/keyring/id-to-email-map.js +2 -1
  24. package/build/core/asmail/keyring/index.d.ts +7 -8
  25. package/build/core/asmail/keyring/index.js +15 -14
  26. package/build/core/asmail/keyring/keyring-storage.js +2 -1
  27. package/build/core/asmail/msg/opener.js +3 -3
  28. package/build/core/asmail/msg/packer.js +13 -13
  29. package/build/core/asmail/sending-params/own-params.js +2 -2
  30. package/build/core/asmail/sending-params/params-from-others.js +1 -1
  31. package/build/core/id-manager.js +6 -3
  32. package/build/core/index.d.ts +2 -1
  33. package/build/core/index.js +14 -14
  34. package/build/core/sign-in.js +5 -5
  35. package/build/core/sign-up.js +9 -9
  36. package/build/core/storage/common/json-saving.js +2 -2
  37. package/build/core/storage/common/obj-info-file.d.ts +12 -4
  38. package/build/core/storage/common/obj-info-file.js +66 -34
  39. package/build/core/storage/common/utils.d.ts +2 -0
  40. package/build/core/storage/common/utils.js +32 -0
  41. package/build/core/storage/index.d.ts +3 -17
  42. package/build/core/storage/index.js +56 -76
  43. package/build/core/storage/local/obj-files-gc.d.ts +2 -0
  44. package/build/core/storage/local/obj-files-gc.js +49 -37
  45. package/build/core/storage/local/obj-files.d.ts +4 -7
  46. package/build/core/storage/local/obj-files.js +7 -10
  47. package/build/core/storage/local/obj-status.d.ts +12 -6
  48. package/build/core/storage/local/obj-status.js +24 -9
  49. package/build/core/storage/local/storage.d.ts +9 -6
  50. package/build/core/storage/local/storage.js +29 -18
  51. package/build/core/storage/synced/downloader.js +1 -1
  52. package/build/core/storage/synced/obj-files-gc.d.ts +5 -1
  53. package/build/core/storage/synced/obj-files-gc.js +91 -37
  54. package/build/core/storage/synced/obj-files.d.ts +42 -36
  55. package/build/core/storage/synced/obj-files.js +178 -147
  56. package/build/core/storage/synced/obj-status.d.ts +87 -85
  57. package/build/core/storage/synced/obj-status.js +463 -259
  58. package/build/core/storage/synced/remote-events.d.ts +11 -12
  59. package/build/core/storage/synced/remote-events.js +73 -56
  60. package/build/core/storage/synced/storage.d.ts +18 -9
  61. package/build/core/storage/synced/storage.js +108 -48
  62. package/build/core/storage/synced/upload-header-file.d.ts +4 -0
  63. package/build/core/storage/synced/upload-header-file.js +64 -0
  64. package/build/core/storage/synced/upsyncer.d.ts +12 -7
  65. package/build/core/storage/synced/upsyncer.js +204 -280
  66. package/build/core/storage/system-folders/apps-data.d.ts +16 -0
  67. package/build/core/storage/system-folders/apps-data.js +110 -0
  68. package/build/core/storage/system-folders/index.d.ts +18 -0
  69. package/build/core/storage/system-folders/index.js +77 -0
  70. package/build/core-ipc/common-caps.js +3 -3
  71. package/build/core-ipc/generic.js +8 -8
  72. package/build/core-ipc/startup-caps.js +2 -2
  73. package/build/cryptors.js +6 -2
  74. package/build/ipc-via-protobuf/asmail-cap.js +58 -57
  75. package/build/ipc-via-protobuf/bytes.js +16 -17
  76. package/build/ipc-via-protobuf/connector-clients-side.d.ts +3 -0
  77. package/build/ipc-via-protobuf/connector-clients-side.js +61 -24
  78. package/build/ipc-via-protobuf/connector-services-side.js +10 -10
  79. package/build/ipc-via-protobuf/connector.js +4 -4
  80. package/build/ipc-via-protobuf/file.d.ts +48 -12
  81. package/build/ipc-via-protobuf/file.js +474 -126
  82. package/build/ipc-via-protobuf/fs.d.ts +8 -0
  83. package/build/ipc-via-protobuf/fs.js +577 -142
  84. package/build/ipc-via-protobuf/log-cap.js +2 -2
  85. package/build/ipc-via-protobuf/mailerid.js +3 -3
  86. package/build/ipc-via-protobuf/protobuf-msg.d.ts +1 -0
  87. package/build/ipc-via-protobuf/protobuf-msg.js +11 -7
  88. package/build/ipc-via-protobuf/startup-cap.js +21 -21
  89. package/build/ipc-via-protobuf/storage-cap.js +12 -12
  90. package/build/ipc.js +7 -2
  91. package/build/lib-client/3nstorage/exceptions.d.ts +3 -0
  92. package/build/lib-client/3nstorage/exceptions.js +13 -1
  93. package/build/lib-client/3nstorage/service.d.ts +15 -2
  94. package/build/lib-client/3nstorage/service.js +104 -38
  95. package/build/lib-client/3nstorage/util/file-based-json.d.ts +2 -1
  96. package/build/lib-client/3nstorage/util/file-based-json.js +1 -1
  97. package/build/lib-client/3nstorage/xsp-fs/attrs.js +17 -17
  98. package/build/lib-client/3nstorage/xsp-fs/common.d.ts +42 -18
  99. package/build/lib-client/3nstorage/xsp-fs/common.js +29 -19
  100. package/build/lib-client/3nstorage/xsp-fs/file-node.d.ts +1 -0
  101. package/build/lib-client/3nstorage/xsp-fs/file-node.js +17 -13
  102. package/build/lib-client/3nstorage/xsp-fs/file.d.ts +31 -6
  103. package/build/lib-client/3nstorage/xsp-fs/file.js +73 -25
  104. package/build/lib-client/3nstorage/xsp-fs/folder-node-serialization.js +4 -4
  105. package/build/lib-client/3nstorage/xsp-fs/folder-node.d.ts +24 -11
  106. package/build/lib-client/3nstorage/xsp-fs/folder-node.js +575 -179
  107. package/build/lib-client/3nstorage/xsp-fs/fs.d.ts +35 -4
  108. package/build/lib-client/3nstorage/xsp-fs/fs.js +231 -110
  109. package/build/lib-client/3nstorage/xsp-fs/link-node.d.ts +1 -0
  110. package/build/lib-client/3nstorage/xsp-fs/link-node.js +7 -2
  111. package/build/lib-client/3nstorage/xsp-fs/node-in-fs.d.ts +30 -24
  112. package/build/lib-client/3nstorage/xsp-fs/node-in-fs.js +229 -123
  113. package/build/lib-client/3nstorage/xsp-fs/node-persistence.d.ts +1 -1
  114. package/build/lib-client/3nstorage/xsp-fs/node-persistence.js +17 -18
  115. package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v1.js +3 -3
  116. package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v2.js +53 -53
  117. package/build/lib-client/3nweb-signup.js +4 -4
  118. package/build/lib-client/asmail/recipient.js +15 -15
  119. package/build/lib-client/asmail/sender.js +22 -22
  120. package/build/lib-client/asmail/service-config.js +3 -3
  121. package/build/lib-client/cryptor/cryptor-in-worker.js +18 -16
  122. package/build/lib-client/cryptor/cryptor-wasm.js +1 -1
  123. package/build/lib-client/cryptor/cryptor.js +4 -2
  124. package/build/lib-client/cryptor/cryptor.wasm +0 -0
  125. package/build/lib-client/cryptor/in-proc-js.js +1 -1
  126. package/build/lib-client/cryptor/in-proc-wasm.js +6 -6
  127. package/build/lib-client/cryptor/worker-js.js +2 -2
  128. package/build/lib-client/cryptor/worker-wasm.js +2 -2
  129. package/build/lib-client/files-select.js +1 -1
  130. package/build/lib-client/files.d.ts +1 -1
  131. package/build/lib-client/files.js +71 -6
  132. package/build/lib-client/fs-collection.js +1 -1
  133. package/build/lib-client/fs-sync-utils.d.ts +5 -0
  134. package/build/lib-client/fs-sync-utils.js +61 -0
  135. package/build/lib-client/fs-view.d.ts +14 -0
  136. package/build/lib-client/fs-view.js +33 -0
  137. package/build/lib-client/key-derivation.js +1 -1
  138. package/build/lib-client/local-files/dev-file-sink.js +9 -9
  139. package/build/lib-client/local-files/dev-file-src.js +2 -2
  140. package/build/lib-client/local-files/device-fs.d.ts +1 -1
  141. package/build/lib-client/local-files/device-fs.js +56 -54
  142. package/build/lib-client/logging/log-to-file.d.ts +1 -1
  143. package/build/lib-client/logging/log-to-file.js +7 -7
  144. package/build/lib-client/mailer-id/login.js +7 -7
  145. package/build/lib-client/mailer-id/provisioner.js +12 -12
  146. package/build/lib-client/objs-on-disk/file-writing-proc.js +3 -3
  147. package/build/lib-client/objs-on-disk/obj-folders.js +31 -31
  148. package/build/lib-client/objs-on-disk/obj-on-disk.d.ts +13 -2
  149. package/build/lib-client/objs-on-disk/obj-on-disk.js +24 -9
  150. package/build/lib-client/request-utils.d.ts +1 -0
  151. package/build/lib-client/request-utils.js +13 -13
  152. package/build/lib-client/server-events.d.ts +3 -3
  153. package/build/lib-client/server-events.js +9 -8
  154. package/build/lib-client/service-locator.js +10 -10
  155. package/build/lib-client/user-with-mid-session.js +7 -7
  156. package/build/lib-client/user-with-pkl-session.js +25 -25
  157. package/build/lib-client/ws-utils.js +2 -2
  158. package/build/lib-common/async-cryptor-wrap.js +4 -4
  159. package/build/lib-common/async-fs-node.d.ts +5 -3
  160. package/build/lib-common/async-fs-node.js +16 -16
  161. package/build/lib-common/byte-streaming/pipe.js +1 -1
  162. package/build/lib-common/byte-streaming/wrapping.js +13 -13
  163. package/build/lib-common/canonical-address.js +1 -1
  164. package/build/lib-common/exceptions/error.d.ts +1 -0
  165. package/build/lib-common/exceptions/error.js +7 -6
  166. package/build/lib-common/exceptions/file.js +4 -0
  167. package/build/lib-common/ipc/ws-ipc.js +2 -2
  168. package/build/lib-common/mid-sigs-NaCl-Ed.js +14 -14
  169. package/build/lib-common/objs-on-disk/file-layout.d.ts +19 -0
  170. package/build/lib-common/objs-on-disk/file-layout.js +130 -12
  171. package/build/lib-common/objs-on-disk/obj-file.d.ts +13 -2
  172. package/build/lib-common/objs-on-disk/obj-file.js +96 -35
  173. package/build/lib-common/objs-on-disk/utils.d.ts +1 -0
  174. package/build/lib-common/objs-on-disk/utils.js +3 -3
  175. package/build/lib-common/objs-on-disk/v1-obj-file-format.js +14 -14
  176. package/build/lib-common/processes/labelled-exec-pools.d.ts +1 -1
  177. package/build/lib-common/processes/labelled-exec-pools.js +1 -1
  178. package/build/lib-common/processes/pressure.js +2 -2
  179. package/build/lib-common/processes/synced.js +1 -1
  180. package/build/lib-common/processes/timeout.js +2 -2
  181. package/build/lib-common/random-node.js +7 -7
  182. package/build/lib-common/service-api/3nstorage/owner.d.ts +95 -39
  183. package/build/lib-common/service-api/3nstorage/owner.js +82 -40
  184. package/build/lib-common/service-api/asmail/delivery.js +2 -2
  185. package/build/lib-common/service-api/asmail/retrieval.js +1 -1
  186. package/build/lib-common/timed-cache.d.ts +1 -0
  187. package/build/lib-common/timed-non-weak-cache.d.ts +1 -0
  188. package/build/lib-common/timed-non-weak-cache.js +11 -0
  189. package/build/lib-common/utils-for-observables.js +4 -4
  190. package/build/lib-common/weak-cache.d.ts +1 -0
  191. package/build/lib-common/weak-cache.js +12 -1
  192. package/build/lib-index.d.ts +2 -1
  193. package/build/lib-index.js +10 -7
  194. package/build/protos/asmail.proto.js +12955 -7496
  195. package/build/protos/file.proto.js +4867 -2744
  196. package/build/protos/fs.proto.js +9227 -3768
  197. package/package.json +6 -5
  198. package/protos/file.proto +91 -19
  199. package/protos/fs.proto +107 -8
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ /*
3
+ Copyright (C) 2022 3NSoft Inc.
4
+
5
+ This program is free software: you can redistribute it and/or modify it under
6
+ the terms of the GNU General Public License as published by the Free Software
7
+ Foundation, either version 3 of the License, or (at your option) any later
8
+ version.
9
+
10
+ This program is distributed in the hope that it will be useful, but
11
+ WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
+ See the GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License along with
16
+ this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.AppDataFolders = void 0;
20
+ const rxjs_1 = require("rxjs");
21
+ const operators_1 = require("rxjs/operators");
22
+ const _1 = require(".");
23
+ const assert_1 = require("../../../lib-common/assert");
24
+ const synced_1 = require("../../../lib-common/processes/synced");
25
+ class AppDataFolders {
26
+ constructor(fs) {
27
+ var _a;
28
+ this.fs = fs;
29
+ this.writingSync = undefined;
30
+ (0, assert_1.assert)(!!((_a = this.fs.v) === null || _a === void 0 ? void 0 : _a.sync));
31
+ this.startSyncProc();
32
+ Object.seal(this);
33
+ }
34
+ static async make(rootFS) {
35
+ const fs = await rootFS.writableSubRoot(_1.sysFolders.appData, { create: false });
36
+ return new AppDataFolders(fs);
37
+ }
38
+ async getOrMake(folder) {
39
+ var _a;
40
+ if ((_a = this.fs.v) === null || _a === void 0 ? void 0 : _a.sync) {
41
+ try {
42
+ return await this.fs.writableSubRoot(folder, { create: false });
43
+ }
44
+ catch (exc) {
45
+ if ((exc.type === 'file')
46
+ && exc.notFound) {
47
+ return this.makeSyncedFolder(folder);
48
+ }
49
+ else {
50
+ throw exc;
51
+ }
52
+ }
53
+ }
54
+ else {
55
+ return await this.fs.writableSubRoot(folder);
56
+ }
57
+ }
58
+ syncP() {
59
+ if (!this.writingSync) {
60
+ this.writingSync = new synced_1.SingleProc();
61
+ }
62
+ return this.writingSync;
63
+ }
64
+ makeSyncedFolder(folder) {
65
+ return this.syncP().startOrChain(async () => {
66
+ await this.syncBeforeChange();
67
+ try {
68
+ await this.fs.makeFolder(folder, true);
69
+ }
70
+ catch (exc) {
71
+ if ((exc.type === 'file')
72
+ && exc.alreadyExists) {
73
+ return this.fs.writableSubRoot(folder, { create: false });
74
+ }
75
+ else {
76
+ throw exc;
77
+ }
78
+ }
79
+ const fs = await this.fs.writableSubRoot(folder, { create: false });
80
+ await this.uploadAfterCreationOf(folder);
81
+ return fs;
82
+ });
83
+ }
84
+ async syncBeforeChange() {
85
+ const { state } = await this.fs.v.sync.updateStatusInfo('');
86
+ if (state === 'behind') {
87
+ await this.fs.v.sync.adoptRemote('');
88
+ }
89
+ }
90
+ async uploadAfterCreationOf(folder) {
91
+ // XXX must add work with not-online condition
92
+ await this.fs.v.sync.upload(folder);
93
+ await this.fs.v.sync.upload('');
94
+ }
95
+ startSyncProc() {
96
+ this.syncFolderProc = (new rxjs_1.Observable((obs) => this.fs.watchFolder('', obs)))
97
+ .pipe((0, operators_1.filter)(ev => (ev.type === 'remote-change')), (0, operators_1.mergeMap)(() => this.syncP().startOrChain(() => this.fs.v.sync.adoptRemote('')), 1))
98
+ .subscribe();
99
+ }
100
+ stopSync() {
101
+ if (this.syncFolderProc) {
102
+ this.syncFolderProc.unsubscribe();
103
+ this.syncFolderProc = undefined;
104
+ }
105
+ }
106
+ }
107
+ exports.AppDataFolders = AppDataFolders;
108
+ Object.freeze(AppDataFolders.prototype);
109
+ Object.freeze(AppDataFolders);
110
+ Object.freeze(exports);
@@ -0,0 +1,18 @@
1
+ declare type WritableFS = web3n.files.WritableFS;
2
+ declare type FSItem = web3n.files.FSItem;
3
+ export declare const sysFolders: {
4
+ appData: string;
5
+ apps: string;
6
+ packages: string;
7
+ sharedLibs: string;
8
+ userFiles: string;
9
+ };
10
+ /**
11
+ * This function creates system folder structure in a given root.
12
+ * Folder objects are uploaded, if it is a synced root.
13
+ * @param root
14
+ */
15
+ export declare function initSysFolders(root: WritableFS): Promise<void>;
16
+ export declare function userFilesOnDevice(): Promise<WritableFS>;
17
+ export declare function sysFilesOnDevice(): Promise<FSItem>;
18
+ export {};
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ /*
3
+ Copyright (C) 2022 3NSoft Inc.
4
+
5
+ This program is free software: you can redistribute it and/or modify it under
6
+ the terms of the GNU General Public License as published by the Free Software
7
+ Foundation, either version 3 of the License, or (at your option) any later
8
+ version.
9
+
10
+ This program is distributed in the hope that it will be useful, but
11
+ WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
+ See the GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License along with
16
+ this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.sysFilesOnDevice = exports.userFilesOnDevice = exports.initSysFolders = exports.sysFolders = void 0;
20
+ const fs_collection_1 = require("../../../lib-client/fs-collection");
21
+ const lib_index_1 = require("../../../lib-index");
22
+ exports.sysFolders = {
23
+ appData: 'Apps Data',
24
+ apps: 'Apps Code',
25
+ packages: 'App&Lib Packs',
26
+ sharedLibs: 'Shared Libs',
27
+ userFiles: 'User Files'
28
+ };
29
+ Object.freeze(exports.sysFolders);
30
+ /**
31
+ * This function creates system folder structure in a given root.
32
+ * Folder objects are uploaded, if it is a synced root.
33
+ * @param root
34
+ */
35
+ async function initSysFolders(root) {
36
+ var _a, _b;
37
+ for (const sysFolder of Object.values(exports.sysFolders)) {
38
+ await root.makeFolder(sysFolder);
39
+ if ((_a = root.v) === null || _a === void 0 ? void 0 : _a.sync) {
40
+ // XXX must add work with not-online condition
41
+ await root.v.sync.upload(sysFolder);
42
+ }
43
+ }
44
+ if ((_b = root.v) === null || _b === void 0 ? void 0 : _b.sync) {
45
+ // XXX must add work with not-online condition
46
+ await root.v.sync.upload('.');
47
+ }
48
+ }
49
+ exports.initSysFolders = initSysFolders;
50
+ async function userFilesOnDevice() {
51
+ if (process.platform === 'win32') {
52
+ return lib_index_1.DeviceFS.makeWritable(process.env.USERPROFILE);
53
+ }
54
+ else {
55
+ return lib_index_1.DeviceFS.makeWritable(process.env.HOME);
56
+ }
57
+ }
58
+ exports.userFilesOnDevice = userFilesOnDevice;
59
+ async function sysFilesOnDevice() {
60
+ const c = (0, fs_collection_1.makeFSCollection)();
61
+ if (process.platform === 'win32') {
62
+ const sysDrive = process.env.SystemDrive;
63
+ await c.set(sysDrive, {
64
+ isFolder: true,
65
+ item: await lib_index_1.DeviceFS.makeWritable(sysDrive)
66
+ });
67
+ }
68
+ else {
69
+ await c.set('', {
70
+ isFolder: true,
71
+ item: await lib_index_1.DeviceFS.makeWritable('/')
72
+ });
73
+ }
74
+ return { isCollection: true, item: c };
75
+ }
76
+ exports.sysFilesOnDevice = sysFilesOnDevice;
77
+ Object.freeze(exports);
@@ -30,7 +30,7 @@ function exposeW3N(coreSide, w3n, extraCAPs) {
30
30
  mailerid: mailerid_1.exposeMailerIdCAP,
31
31
  storage: storage_cap_1.exposeStorageCAP,
32
32
  };
33
- generic_1.exposeCAPs(coreSide, w3n, commonCAPsExposures, extraCAPs);
33
+ (0, generic_1.exposeCAPs)(coreSide, w3n, commonCAPsExposures, extraCAPs);
34
34
  }
35
35
  exports.exposeW3N = exposeW3N;
36
36
  // This is not used, but it ensures that some require runs, providing function
@@ -43,7 +43,7 @@ function makeW3Nclient(clientSide, extraCAPs) {
43
43
  mailerid: mailerid_1.makeMailerIdCaller,
44
44
  storage: storage_cap_1.makeStorageCaller,
45
45
  };
46
- return generic_1.makeClientSide(clientSide, mainCAPs, extraCAPs);
46
+ return (0, generic_1.makeClientSide)(clientSide, mainCAPs, extraCAPs);
47
47
  }
48
48
  exports.makeW3Nclient = makeW3Nclient;
49
49
  function promiseW3Nclient(clientSide, extraCAPs) {
@@ -53,7 +53,7 @@ function promiseW3Nclient(clientSide, extraCAPs) {
53
53
  mailerid: mailerid_1.makeMailerIdCaller,
54
54
  storage: storage_cap_1.promiseStorageCaller,
55
55
  };
56
- return generic_1.promiseClientSide(clientSide, mainCAPs, extraCAPs);
56
+ return (0, generic_1.promiseClientSide)(clientSide, mainCAPs, extraCAPs);
57
57
  }
58
58
  exports.promiseW3Nclient = promiseW3Nclient;
59
59
  Object.freeze(exports);
@@ -31,8 +31,8 @@ exports.exposeCAPs = exposeCAPs;
31
31
  function addCAPsInExposure(expW3N, coreSide, w3n, capExposures) {
32
32
  for (const capName in capExposures) {
33
33
  const expose = capExposures[capName];
34
- assert_1.assert(typeof expose === 'function');
35
- assert_1.assert(!expW3N[capName], `Capability ${capName} is already exposed, and we specifically have no shadowing.`);
34
+ (0, assert_1.assert)(typeof expose === 'function');
35
+ (0, assert_1.assert)(!expW3N[capName], `Capability ${capName} is already exposed, and we specifically have no shadowing.`);
36
36
  const cap = w3n[capName];
37
37
  if (cap) {
38
38
  expW3N[capName] = expose(cap, coreSide);
@@ -40,7 +40,7 @@ function addCAPsInExposure(expW3N, coreSide, w3n, capExposures) {
40
40
  }
41
41
  }
42
42
  function makeClientSide(clientSide, mainCAPs, extraCAPs) {
43
- assert_1.assert(!!clientSide.listObj);
43
+ (0, assert_1.assert)(!!clientSide.listObj);
44
44
  const objPath = [connector_1.W3N_NAME];
45
45
  const lstOfCAPs = clientSide.listObj(objPath);
46
46
  const w3n = {};
@@ -48,12 +48,12 @@ function makeClientSide(clientSide, mainCAPs, extraCAPs) {
48
48
  const capObjPath = objPath.concat(cap);
49
49
  if (mainCAPs[cap]) {
50
50
  const makeCap = mainCAPs[cap];
51
- assert_1.assert(typeof makeCap === 'function');
51
+ (0, assert_1.assert)(typeof makeCap === 'function');
52
52
  w3n[cap] = makeCap(clientSide, capObjPath);
53
53
  }
54
54
  else if (extraCAPs) {
55
55
  const makeCap = extraCAPs[cap];
56
- assert_1.assert(typeof makeCap === 'function');
56
+ (0, assert_1.assert)(typeof makeCap === 'function');
57
57
  w3n[cap] = makeCap(clientSide, capObjPath);
58
58
  }
59
59
  }
@@ -61,7 +61,7 @@ function makeClientSide(clientSide, mainCAPs, extraCAPs) {
61
61
  }
62
62
  exports.makeClientSide = makeClientSide;
63
63
  async function promiseClientSide(clientSide, mainCAPs, extraCAPs) {
64
- assert_1.assert(!!clientSide.listObjAsync);
64
+ (0, assert_1.assert)(!!clientSide.listObjAsync);
65
65
  const objPath = [connector_1.W3N_NAME];
66
66
  const lstOfCAPs = (await clientSide.listObjAsync(objPath));
67
67
  const w3n = {};
@@ -69,12 +69,12 @@ async function promiseClientSide(clientSide, mainCAPs, extraCAPs) {
69
69
  const capObjPath = objPath.concat(cap);
70
70
  if (mainCAPs[cap]) {
71
71
  const makeCap = mainCAPs[cap];
72
- assert_1.assert(typeof makeCap === 'function');
72
+ (0, assert_1.assert)(typeof makeCap === 'function');
73
73
  w3n[cap] = await makeCap(clientSide, capObjPath);
74
74
  }
75
75
  else if (extraCAPs) {
76
76
  const makeCap = extraCAPs[cap];
77
- assert_1.assert(typeof makeCap === 'function');
77
+ (0, assert_1.assert)(typeof makeCap === 'function');
78
78
  w3n[cap] = await makeCap(clientSide, capObjPath);
79
79
  }
80
80
  }
@@ -25,7 +25,7 @@ function exposeStartupW3N(coreSide, w3n, extraCAPs) {
25
25
  signIn: startup_cap_1.wrapSignInCAP,
26
26
  signUp: startup_cap_1.wrapSignUpCAP,
27
27
  };
28
- generic_1.exposeCAPs(coreSide, w3n, startupCAPsExposures, extraCAPs);
28
+ (0, generic_1.exposeCAPs)(coreSide, w3n, startupCAPsExposures, extraCAPs);
29
29
  }
30
30
  exports.exposeStartupW3N = exposeStartupW3N;
31
31
  // This is not used, but it ensures that some require runs, providing function
@@ -36,7 +36,7 @@ function makeStartupW3Nclient(clientSide, extraCAPs) {
36
36
  signIn: startup_cap_1.makeSignInCaller,
37
37
  signUp: startup_cap_1.makeSignUpCaller,
38
38
  };
39
- return generic_1.makeClientSide(clientSide, mainCAPs, extraCAPs);
39
+ return (0, generic_1.makeClientSide)(clientSide, mainCAPs, extraCAPs);
40
40
  }
41
41
  exports.makeStartupW3Nclient = makeStartupW3Nclient;
42
42
  Object.freeze(exports);
package/build/cryptors.js CHANGED
@@ -17,13 +17,17 @@
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.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
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" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
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 });
29
33
  __exportStar(require("./lib-client/cryptor/cryptor"), exports);
@@ -51,6 +51,7 @@ exports.exposeASMailCAP = exposeASMailCAP;
51
51
  function makeASMailCaller(caller, objPath) {
52
52
  const delivPath = objPath.concat('delivery');
53
53
  const inboxPath = objPath.concat('inbox');
54
+ const connectPath = objPath.concat('connect');
54
55
  return {
55
56
  getUserId: getUserId.makeCaller(caller, objPath),
56
57
  delivery: {
@@ -67,7 +68,7 @@ function makeASMailCaller(caller, objPath) {
67
68
  listMsgs: inboxListMsgs.makeCaller(caller, inboxPath),
68
69
  removeMsg: removeMsg.makeCaller(caller, inboxPath),
69
70
  subscribe: inboxSubscribe.makeCaller(caller, inboxPath)
70
- }
71
+ },
71
72
  };
72
73
  }
73
74
  exports.makeASMailCaller = makeASMailCaller;
@@ -76,7 +77,7 @@ var getUserId;
76
77
  function wrapService(fn) {
77
78
  return () => {
78
79
  const promise = fn()
79
- .then(userId => protobuf_msg_1.encodeToUtf8(userId));
80
+ .then(userId => (0, protobuf_msg_1.encodeToUtf8)(userId));
80
81
  return { promise };
81
82
  };
82
83
  }
@@ -86,9 +87,9 @@ var getUserId;
86
87
  return () => caller.startPromiseCall(path, undefined)
87
88
  .then(buf => {
88
89
  if (!buf) {
89
- throw connector_1.makeIPCException({ missingBodyBytes: true });
90
+ throw (0, connector_1.makeIPCException)({ missingBodyBytes: true });
90
91
  }
91
- return protobuf_msg_1.decodeFromUtf8(buf);
92
+ return (0, protobuf_msg_1.decodeFromUtf8)(buf);
92
93
  });
93
94
  }
94
95
  getUserId.makeCaller = makeCaller;
@@ -99,16 +100,16 @@ var inboxListMsgs;
99
100
  const requestType = protobuf_type_1.ProtoType.for(asmail_proto_1.asmail.ListMsgsRequestBody);
100
101
  const replyType = protobuf_type_1.ProtoType.for(asmail_proto_1.asmail.ListMsgsInboxReplyBody);
101
102
  function unpackMsgInfos(buf) {
102
- const msgs = protobuf_msg_1.fixArray(replyType.unpack(buf).infos);
103
+ const msgs = (0, protobuf_msg_1.fixArray)(replyType.unpack(buf).infos);
103
104
  for (const msg of msgs) {
104
- msg.deliveryTS = protobuf_msg_1.fixInt(msg.deliveryTS);
105
+ msg.deliveryTS = (0, protobuf_msg_1.fixInt)(msg.deliveryTS);
105
106
  }
106
107
  return msgs;
107
108
  }
108
109
  function wrapService(fn) {
109
110
  return (reqBody) => {
110
111
  const { fromTS } = requestType.unpack(reqBody);
111
- const promise = fn(protobuf_msg_1.valOfOptInt(fromTS))
112
+ const promise = fn((0, protobuf_msg_1.valOfOptInt)(fromTS))
112
113
  .then(infos => replyType.pack({ infos }));
113
114
  return { promise };
114
115
  };
@@ -117,7 +118,7 @@ var inboxListMsgs;
117
118
  function makeCaller(caller, objPath) {
118
119
  const path = objPath.concat('listMsgs');
119
120
  return fromTS => {
120
- const req = (fromTS ? { fromTS: protobuf_msg_1.toVal(fromTS) } : {});
121
+ const req = (fromTS ? { fromTS: (0, protobuf_msg_1.toVal)(fromTS) } : {});
121
122
  return caller
122
123
  .startPromiseCall(path, requestType.pack(req))
123
124
  .then(unpackMsgInfos);
@@ -175,14 +176,14 @@ function packIncomingMessage(m, expServices) {
175
176
  deliveryTS: m.deliveryTS,
176
177
  sender: m.sender,
177
178
  establishedSenderKeyChain: m.establishedSenderKeyChain,
178
- subject: protobuf_msg_1.toOptVal(m.subject),
179
- plainTxtBody: protobuf_msg_1.toOptVal(m.plainTxtBody),
180
- htmlTxtBody: protobuf_msg_1.toOptVal(m.htmlTxtBody),
181
- jsonBody: protobuf_msg_1.toOptJson(m.jsonBody),
179
+ subject: (0, protobuf_msg_1.toOptVal)(m.subject),
180
+ plainTxtBody: (0, protobuf_msg_1.toOptVal)(m.plainTxtBody),
181
+ htmlTxtBody: (0, protobuf_msg_1.toOptVal)(m.htmlTxtBody),
182
+ jsonBody: (0, protobuf_msg_1.toOptJson)(m.jsonBody),
182
183
  carbonCopy: m.carbonCopy,
183
184
  recipients: m.recipients,
184
185
  attachments: (m.attachments ?
185
- fs_1.exposeFSService(m.attachments, expServices) : undefined)
186
+ (0, fs_1.exposeFSService)(m.attachments, expServices) : undefined)
186
187
  };
187
188
  return incomingMessageType.pack(ipcMsg);
188
189
  }
@@ -191,17 +192,17 @@ function unpackIncomingMessage(buf, caller) {
191
192
  const msg = {
192
193
  msgType: ipcMsg.msgType,
193
194
  msgId: ipcMsg.msgId,
194
- deliveryTS: protobuf_msg_1.fixInt(ipcMsg.deliveryTS),
195
+ deliveryTS: (0, protobuf_msg_1.fixInt)(ipcMsg.deliveryTS),
195
196
  sender: ipcMsg.sender,
196
197
  establishedSenderKeyChain: ipcMsg.establishedSenderKeyChain,
197
- subject: protobuf_msg_1.valOfOpt(ipcMsg.subject),
198
- plainTxtBody: protobuf_msg_1.valOfOpt(ipcMsg.plainTxtBody),
199
- htmlTxtBody: protobuf_msg_1.valOfOpt(ipcMsg.htmlTxtBody),
200
- jsonBody: protobuf_msg_1.valOfOptJson(ipcMsg.jsonBody),
198
+ subject: (0, protobuf_msg_1.valOfOpt)(ipcMsg.subject),
199
+ plainTxtBody: (0, protobuf_msg_1.valOfOpt)(ipcMsg.plainTxtBody),
200
+ htmlTxtBody: (0, protobuf_msg_1.valOfOpt)(ipcMsg.htmlTxtBody),
201
+ jsonBody: (0, protobuf_msg_1.valOfOptJson)(ipcMsg.jsonBody),
201
202
  carbonCopy: ipcMsg.carbonCopy,
202
203
  recipients: ipcMsg.recipients,
203
204
  attachments: (ipcMsg.attachments ?
204
- fs_1.makeFSCaller(caller, ipcMsg.attachments) : undefined)
205
+ (0, fs_1.makeFSCaller)(caller, ipcMsg.attachments) : undefined)
205
206
  };
206
207
  return msg;
207
208
  }
@@ -212,7 +213,7 @@ var inboxSubscribe;
212
213
  return buf => {
213
214
  const { event } = requestType.unpack(buf);
214
215
  const s = new rxjs_1.Subject();
215
- const obs = s.asObservable().pipe(operators_1.map(msg => packIncomingMessage(msg, expServices)));
216
+ const obs = s.asObservable().pipe((0, operators_1.map)(msg => packIncomingMessage(msg, expServices)));
216
217
  const onCancel = fn(event, s);
217
218
  return { obs, onCancel };
218
219
  };
@@ -224,8 +225,8 @@ var inboxSubscribe;
224
225
  const s = new rxjs_1.Subject();
225
226
  const unsub = caller.startObservableCall(path, requestType.pack({ event }), s);
226
227
  s.asObservable()
227
- .pipe(operators_1.map(buf => unpackIncomingMessage(buf, caller)))
228
- .subscribe(utils_for_observables_1.toRxObserver(obs));
228
+ .pipe((0, operators_1.map)(buf => unpackIncomingMessage(buf, caller)))
229
+ .subscribe((0, utils_for_observables_1.toRxObserver)(obs));
229
230
  return unsub;
230
231
  };
231
232
  }
@@ -259,13 +260,13 @@ var addMsg;
259
260
  function packMsg(m, caller) {
260
261
  const ipcMsg = {
261
262
  msgType: m.msgType,
262
- htmlTxtBody: protobuf_msg_1.toOptVal(m.htmlTxtBody),
263
- jsonBody: protobuf_msg_1.toOptJson(m.jsonBody),
264
- msgId: protobuf_msg_1.toOptVal(m.msgType),
265
- plainTxtBody: protobuf_msg_1.toOptVal(m.plainTxtBody),
263
+ htmlTxtBody: (0, protobuf_msg_1.toOptVal)(m.htmlTxtBody),
264
+ jsonBody: (0, protobuf_msg_1.toOptJson)(m.jsonBody),
265
+ msgId: (0, protobuf_msg_1.toOptVal)(m.msgType),
266
+ plainTxtBody: (0, protobuf_msg_1.toOptVal)(m.plainTxtBody),
266
267
  recipients: m.recipients,
267
268
  carbonCopy: m.carbonCopy,
268
- subject: protobuf_msg_1.toOptVal(m.subject)
269
+ subject: (0, protobuf_msg_1.toOptVal)(m.subject)
269
270
  };
270
271
  if (m.attachments) {
271
272
  const attachments = {};
@@ -298,13 +299,13 @@ var addMsg;
298
299
  function unpackMsg(ipcMsg, expServices) {
299
300
  const msg = {
300
301
  msgType: ipcMsg.msgType,
301
- htmlTxtBody: protobuf_msg_1.valOfOpt(ipcMsg.htmlTxtBody),
302
- jsonBody: protobuf_msg_1.valOfOptJson(ipcMsg.jsonBody),
303
- msgId: protobuf_msg_1.valOfOpt(ipcMsg.msgId),
304
- plainTxtBody: protobuf_msg_1.valOfOpt(ipcMsg.plainTxtBody),
302
+ htmlTxtBody: (0, protobuf_msg_1.valOfOpt)(ipcMsg.htmlTxtBody),
303
+ jsonBody: (0, protobuf_msg_1.valOfOptJson)(ipcMsg.jsonBody),
304
+ msgId: (0, protobuf_msg_1.valOfOpt)(ipcMsg.msgId),
305
+ plainTxtBody: (0, protobuf_msg_1.valOfOpt)(ipcMsg.plainTxtBody),
305
306
  recipients: ipcMsg.recipients,
306
307
  carbonCopy: ipcMsg.carbonCopy,
307
- subject: protobuf_msg_1.valOfOpt(ipcMsg.subject)
308
+ subject: (0, protobuf_msg_1.valOfOpt)(ipcMsg.subject)
308
309
  };
309
310
  if (ipcMsg.attachments) {
310
311
  const attachments = {};
@@ -331,9 +332,9 @@ var addMsg;
331
332
  function wrapService(fn, expServices) {
332
333
  return (reqBody) => {
333
334
  const { id, recipients, msg, localMeta, sendImmediately } = requestType.unpack(reqBody);
334
- const promise = fn(protobuf_msg_1.fixArray(recipients), unpackMsg(msg, expServices), id, {
335
- localMeta: protobuf_msg_1.valOfOptAny(localMeta),
336
- sendImmediately: protobuf_msg_1.valOfOpt(sendImmediately)
335
+ const promise = fn((0, protobuf_msg_1.fixArray)(recipients), unpackMsg(msg, expServices), id, {
336
+ localMeta: (0, protobuf_msg_1.valOfOptAny)(localMeta),
337
+ sendImmediately: (0, protobuf_msg_1.valOfOpt)(sendImmediately)
337
338
  });
338
339
  return { promise };
339
340
  };
@@ -344,8 +345,8 @@ var addMsg;
344
345
  return async (recipients, msg, id, opts) => {
345
346
  const req = { id, msg: packMsg(msg, caller), recipients };
346
347
  if (opts) {
347
- req.sendImmediately = protobuf_msg_1.toOptVal(opts.sendImmediately);
348
- req.localMeta = protobuf_msg_1.toOptAny(opts.localMeta);
348
+ req.sendImmediately = (0, protobuf_msg_1.toOptVal)(opts.sendImmediately);
349
+ req.localMeta = (0, protobuf_msg_1.toOptAny)(opts.localMeta);
349
350
  }
350
351
  await caller.startPromiseCall(path, requestType.pack(req));
351
352
  };
@@ -372,7 +373,7 @@ var delivListMsgs;
372
373
  return () => caller
373
374
  .startPromiseCall(path, undefined)
374
375
  .then(buf => {
375
- const msgs = protobuf_msg_1.fixArray(replyType.unpack(buf).msgs);
376
+ const msgs = (0, protobuf_msg_1.fixArray)(replyType.unpack(buf).msgs);
376
377
  return msgs.map(({ id, info }) => ({ id, info: unpackDeliveryProgress(info) }));
377
378
  });
378
379
  }
@@ -382,10 +383,10 @@ Object.freeze(delivListMsgs);
382
383
  const deliveryProgressMsgType = protobuf_type_1.ProtoType.for(asmail_proto_1.asmail.DeliveryProgressMsg);
383
384
  function packDeliveryProgress(p) {
384
385
  const m = {
385
- notConnected: protobuf_msg_1.toOptVal(p.notConnected),
386
+ notConnected: (0, protobuf_msg_1.toOptVal)(p.notConnected),
386
387
  allDone: p.allDone,
387
388
  msgSize: p.msgSize,
388
- localMeta: protobuf_msg_1.toOptAny(p.localMeta),
389
+ localMeta: (0, protobuf_msg_1.toOptAny)(p.localMeta),
389
390
  recipients: []
390
391
  };
391
392
  for (const [address, info] of Object.entries(p.recipients)) {
@@ -393,9 +394,9 @@ function packDeliveryProgress(p) {
393
394
  address,
394
395
  info: {
395
396
  done: info.done,
396
- idOnDelivery: protobuf_msg_1.toOptVal(info.idOnDelivery),
397
+ idOnDelivery: (0, protobuf_msg_1.toOptVal)(info.idOnDelivery),
397
398
  bytesSent: info.bytesSent,
398
- err: (info.err ? protobuf_msg_1.errToMsg(info.err) : undefined)
399
+ err: (info.err ? (0, protobuf_msg_1.errToMsg)(info.err) : undefined)
399
400
  }
400
401
  });
401
402
  }
@@ -404,17 +405,17 @@ function packDeliveryProgress(p) {
404
405
  function unpackDeliveryProgress(m) {
405
406
  const p = {
406
407
  allDone: m.allDone,
407
- msgSize: protobuf_msg_1.fixInt(m.msgSize),
408
- notConnected: protobuf_msg_1.valOfOpt(m.notConnected),
409
- localMeta: protobuf_msg_1.valOfOptAny(m.localMeta),
408
+ msgSize: (0, protobuf_msg_1.fixInt)(m.msgSize),
409
+ notConnected: (0, protobuf_msg_1.valOfOpt)(m.notConnected),
410
+ localMeta: (0, protobuf_msg_1.valOfOptAny)(m.localMeta),
410
411
  recipients: {}
411
412
  };
412
- for (const { address, info } of protobuf_msg_1.fixArray(m.recipients)) {
413
+ for (const { address, info } of (0, protobuf_msg_1.fixArray)(m.recipients)) {
413
414
  p.recipients[address] = {
414
415
  done: info.done,
415
- idOnDelivery: protobuf_msg_1.valOfOpt(info.idOnDelivery),
416
- bytesSent: protobuf_msg_1.fixInt(info.bytesSent),
417
- err: (info.err ? protobuf_msg_1.errFromMsg(info.err) : undefined)
416
+ idOnDelivery: (0, protobuf_msg_1.valOfOpt)(info.idOnDelivery),
417
+ bytesSent: (0, protobuf_msg_1.fixInt)(info.bytesSent),
418
+ err: (info.err ? (0, protobuf_msg_1.errFromMsg)(info.err) : undefined)
418
419
  };
419
420
  }
420
421
  return p;
@@ -456,7 +457,7 @@ var rmMsg;
456
457
  function wrapService(fn) {
457
458
  return (reqBody) => {
458
459
  const { id, cancelSending } = requestType.unpack(reqBody);
459
- const promise = fn(id, protobuf_msg_1.valOfOpt(cancelSending));
460
+ const promise = fn(id, (0, protobuf_msg_1.valOfOpt)(cancelSending));
460
461
  return { promise };
461
462
  };
462
463
  }
@@ -465,7 +466,7 @@ var rmMsg;
465
466
  const path = objPath.concat('rmMsg');
466
467
  return (id, cancelSending) => caller
467
468
  .startPromiseCall(path, requestType.pack({
468
- id, cancelSending: protobuf_msg_1.toOptVal(cancelSending)
469
+ id, cancelSending: (0, protobuf_msg_1.toOptVal)(cancelSending)
469
470
  }));
470
471
  }
471
472
  rmMsg.makeCaller = makeCaller;
@@ -477,7 +478,7 @@ var observeAllDeliveries;
477
478
  function wrapService(fn) {
478
479
  return () => {
479
480
  const s = new rxjs_1.Subject();
480
- const obs = s.asObservable().pipe(operators_1.map(({ id, progress }) => notifType.pack({
481
+ const obs = s.asObservable().pipe((0, operators_1.map)(({ id, progress }) => notifType.pack({
481
482
  id,
482
483
  progress: packDeliveryProgress(progress)
483
484
  })));
@@ -492,13 +493,13 @@ var observeAllDeliveries;
492
493
  const s = new rxjs_1.Subject();
493
494
  const unsub = caller.startObservableCall(path, undefined, s);
494
495
  s.asObservable()
495
- .pipe(operators_1.map(buf => {
496
+ .pipe((0, operators_1.map)(buf => {
496
497
  const { id, progress } = notifType.unpack(buf);
497
498
  return {
498
499
  id, progress: unpackDeliveryProgress(progress)
499
500
  };
500
501
  }))
501
- .subscribe(utils_for_observables_1.toRxObserver(obs));
502
+ .subscribe((0, utils_for_observables_1.toRxObserver)(obs));
502
503
  return unsub;
503
504
  };
504
505
  }
@@ -512,7 +513,7 @@ var observeDelivery;
512
513
  return buf => {
513
514
  const { id } = requestType.unpack(buf);
514
515
  const s = new rxjs_1.Subject();
515
- const obs = s.asObservable().pipe(operators_1.map(p => deliveryProgressMsgType.pack(packDeliveryProgress(p))));
516
+ const obs = s.asObservable().pipe((0, operators_1.map)(p => deliveryProgressMsgType.pack(packDeliveryProgress(p))));
516
517
  const onCancel = fn(id, s);
517
518
  return { obs, onCancel };
518
519
  };
@@ -524,8 +525,8 @@ var observeDelivery;
524
525
  const s = new rxjs_1.Subject();
525
526
  const unsub = caller.startObservableCall(path, requestType.pack({ id }), s);
526
527
  s.asObservable()
527
- .pipe(operators_1.map(buf => unpackDeliveryProgress(deliveryProgressMsgType.unpack(buf))))
528
- .subscribe(utils_for_observables_1.toRxObserver(obs));
528
+ .pipe((0, operators_1.map)(buf => unpackDeliveryProgress(deliveryProgressMsgType.unpack(buf))))
529
+ .subscribe((0, utils_for_observables_1.toRxObserver)(obs));
529
530
  return unsub;
530
531
  };
531
532
  }