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.
Files changed (211) hide show
  1. package/build/api-defs/asmail.d.ts +1 -1
  2. package/build/api-defs/files.d.ts +281 -75
  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.d.ts +2 -1
  12. package/build/core/asmail/inbox/attachments/fs.js +9 -4
  13. package/build/core/asmail/inbox/cached-msgs.js +1 -1
  14. package/build/core/asmail/inbox/inbox-events.js +4 -4
  15. package/build/core/asmail/inbox/index.js +10 -10
  16. package/build/core/asmail/inbox/msg-downloader.js +1 -1
  17. package/build/core/asmail/inbox/msg-indexing.js +1 -1
  18. package/build/core/asmail/inbox/msg-on-disk.js +5 -5
  19. package/build/core/asmail/index.d.ts +3 -3
  20. package/build/core/asmail/index.js +13 -8
  21. package/build/core/asmail/key-verification.js +5 -5
  22. package/build/core/asmail/keyring/common.js +7 -6
  23. package/build/core/asmail/keyring/correspondent-keys.js +8 -7
  24. package/build/core/asmail/keyring/id-to-email-map.js +2 -1
  25. package/build/core/asmail/keyring/index.d.ts +7 -8
  26. package/build/core/asmail/keyring/index.js +15 -14
  27. package/build/core/asmail/keyring/keyring-storage.js +2 -1
  28. package/build/core/asmail/msg/opener.js +3 -3
  29. package/build/core/asmail/msg/packer.js +13 -13
  30. package/build/core/asmail/sending-params/own-params.js +2 -2
  31. package/build/core/asmail/sending-params/params-from-others.js +1 -1
  32. package/build/core/id-manager/index.d.ts +43 -0
  33. package/build/core/{id-manager.js → id-manager/index.js} +36 -114
  34. package/build/core/id-manager/key-storage.d.ts +21 -0
  35. package/build/core/id-manager/key-storage.js +96 -0
  36. package/build/core/index.d.ts +2 -1
  37. package/build/core/index.js +31 -33
  38. package/build/core/sign-in.d.ts +1 -2
  39. package/build/core/sign-in.js +8 -17
  40. package/build/core/sign-up.d.ts +2 -0
  41. package/build/core/sign-up.js +11 -10
  42. package/build/core/storage/common/json-saving.js +2 -2
  43. package/build/core/storage/common/obj-info-file.d.ts +12 -4
  44. package/build/core/storage/common/obj-info-file.js +66 -34
  45. package/build/core/storage/common/utils.d.ts +2 -0
  46. package/build/core/storage/common/utils.js +32 -0
  47. package/build/core/storage/index.d.ts +5 -17
  48. package/build/core/storage/index.js +78 -119
  49. package/build/core/storage/local/obj-files-gc.d.ts +2 -0
  50. package/build/core/storage/local/obj-files-gc.js +49 -37
  51. package/build/core/storage/local/obj-files.d.ts +4 -7
  52. package/build/core/storage/local/obj-files.js +7 -10
  53. package/build/core/storage/local/obj-status.d.ts +12 -6
  54. package/build/core/storage/local/obj-status.js +24 -9
  55. package/build/core/storage/local/storage.d.ts +10 -7
  56. package/build/core/storage/local/storage.js +29 -18
  57. package/build/core/storage/synced/downloader.js +1 -1
  58. package/build/core/storage/synced/obj-files-gc.d.ts +1 -0
  59. package/build/core/storage/synced/obj-files-gc.js +76 -39
  60. package/build/core/storage/synced/obj-files.d.ts +50 -36
  61. package/build/core/storage/synced/obj-files.js +201 -162
  62. package/build/core/storage/synced/obj-status.d.ts +99 -86
  63. package/build/core/storage/synced/obj-status.js +520 -251
  64. package/build/core/storage/synced/remote-events.d.ts +11 -12
  65. package/build/core/storage/synced/remote-events.js +73 -56
  66. package/build/core/storage/synced/storage.d.ts +24 -10
  67. package/build/core/storage/synced/storage.js +147 -47
  68. package/build/core/storage/synced/upload-header-file.d.ts +4 -0
  69. package/build/core/storage/synced/upload-header-file.js +64 -0
  70. package/build/core/storage/synced/upsyncer.d.ts +12 -7
  71. package/build/core/storage/synced/upsyncer.js +210 -280
  72. package/build/core/storage/system-folders/apps-data.d.ts +16 -0
  73. package/build/core/storage/system-folders/apps-data.js +110 -0
  74. package/build/core/storage/system-folders/index.d.ts +18 -0
  75. package/build/core/storage/system-folders/index.js +77 -0
  76. package/build/core-ipc/common-caps.js +3 -3
  77. package/build/core-ipc/generic.js +8 -8
  78. package/build/core-ipc/startup-caps.js +2 -2
  79. package/build/cryptors.js +6 -2
  80. package/build/ipc-via-protobuf/asmail-cap.js +58 -57
  81. package/build/ipc-via-protobuf/bytes.js +16 -17
  82. package/build/ipc-via-protobuf/connector-clients-side.d.ts +1 -0
  83. package/build/ipc-via-protobuf/connector-clients-side.js +14 -15
  84. package/build/ipc-via-protobuf/connector-services-side.js +10 -10
  85. package/build/ipc-via-protobuf/connector.js +4 -4
  86. package/build/ipc-via-protobuf/file.d.ts +48 -12
  87. package/build/ipc-via-protobuf/file.js +474 -126
  88. package/build/ipc-via-protobuf/fs.d.ts +8 -0
  89. package/build/ipc-via-protobuf/fs.js +577 -142
  90. package/build/ipc-via-protobuf/log-cap.js +2 -2
  91. package/build/ipc-via-protobuf/mailerid.js +3 -3
  92. package/build/ipc-via-protobuf/protobuf-msg.d.ts +1 -0
  93. package/build/ipc-via-protobuf/protobuf-msg.js +11 -7
  94. package/build/ipc-via-protobuf/startup-cap.js +21 -21
  95. package/build/ipc-via-protobuf/storage-cap.js +12 -12
  96. package/build/ipc.js +7 -2
  97. package/build/lib-client/3nstorage/exceptions.d.ts +16 -1
  98. package/build/lib-client/3nstorage/exceptions.js +21 -3
  99. package/build/lib-client/3nstorage/service.d.ts +21 -3
  100. package/build/lib-client/3nstorage/service.js +128 -46
  101. package/build/lib-client/3nstorage/util/file-based-json.d.ts +2 -1
  102. package/build/lib-client/3nstorage/util/file-based-json.js +3 -2
  103. package/build/lib-client/3nstorage/util/for-arrays.d.ts +1 -0
  104. package/build/lib-client/3nstorage/util/for-arrays.js +32 -0
  105. package/build/lib-client/3nstorage/xsp-fs/attrs.js +17 -17
  106. package/build/lib-client/3nstorage/xsp-fs/common.d.ts +44 -19
  107. package/build/lib-client/3nstorage/xsp-fs/common.js +30 -19
  108. package/build/lib-client/3nstorage/xsp-fs/file-node.d.ts +1 -0
  109. package/build/lib-client/3nstorage/xsp-fs/file-node.js +17 -13
  110. package/build/lib-client/3nstorage/xsp-fs/file.d.ts +31 -6
  111. package/build/lib-client/3nstorage/xsp-fs/file.js +73 -25
  112. package/build/lib-client/3nstorage/xsp-fs/folder-node-serialization.js +4 -4
  113. package/build/lib-client/3nstorage/xsp-fs/folder-node.d.ts +32 -13
  114. package/build/lib-client/3nstorage/xsp-fs/folder-node.js +752 -192
  115. package/build/lib-client/3nstorage/xsp-fs/fs.d.ts +35 -4
  116. package/build/lib-client/3nstorage/xsp-fs/fs.js +236 -119
  117. package/build/lib-client/3nstorage/xsp-fs/link-node.d.ts +1 -0
  118. package/build/lib-client/3nstorage/xsp-fs/link-node.js +7 -2
  119. package/build/lib-client/3nstorage/xsp-fs/node-in-fs.d.ts +30 -29
  120. package/build/lib-client/3nstorage/xsp-fs/node-in-fs.js +232 -127
  121. package/build/lib-client/3nstorage/xsp-fs/node-persistence.d.ts +1 -1
  122. package/build/lib-client/3nstorage/xsp-fs/node-persistence.js +17 -18
  123. package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v1.js +3 -3
  124. package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v2.js +53 -53
  125. package/build/lib-client/3nweb-signup.js +4 -4
  126. package/build/lib-client/asmail/recipient.js +15 -15
  127. package/build/lib-client/asmail/sender.js +22 -22
  128. package/build/lib-client/asmail/service-config.js +3 -3
  129. package/build/lib-client/cryptor/cryptor-in-worker.js +18 -16
  130. package/build/lib-client/cryptor/cryptor-wasm.js +1 -1
  131. package/build/lib-client/cryptor/cryptor.js +4 -2
  132. package/build/lib-client/cryptor/cryptor.wasm +0 -0
  133. package/build/lib-client/cryptor/in-proc-js.js +1 -1
  134. package/build/lib-client/cryptor/in-proc-wasm.js +6 -6
  135. package/build/lib-client/cryptor/worker-js.js +2 -2
  136. package/build/lib-client/cryptor/worker-wasm.js +2 -2
  137. package/build/lib-client/files-select.js +1 -1
  138. package/build/lib-client/files.d.ts +1 -1
  139. package/build/lib-client/files.js +71 -6
  140. package/build/lib-client/fs-collection.js +1 -1
  141. package/build/lib-client/fs-sync-utils.d.ts +5 -0
  142. package/build/lib-client/fs-sync-utils.js +61 -0
  143. package/build/lib-client/fs-view.d.ts +14 -0
  144. package/build/lib-client/fs-view.js +33 -0
  145. package/build/lib-client/key-derivation.js +1 -1
  146. package/build/lib-client/local-files/dev-file-sink.js +9 -9
  147. package/build/lib-client/local-files/dev-file-src.js +2 -2
  148. package/build/lib-client/local-files/device-fs.d.ts +1 -1
  149. package/build/lib-client/local-files/device-fs.js +56 -54
  150. package/build/lib-client/logging/log-to-file.d.ts +1 -1
  151. package/build/lib-client/logging/log-to-file.js +7 -7
  152. package/build/lib-client/mailer-id/login.js +7 -7
  153. package/build/lib-client/mailer-id/provisioner.js +12 -12
  154. package/build/lib-client/objs-on-disk/file-writing-proc.js +3 -3
  155. package/build/lib-client/objs-on-disk/obj-folders.js +31 -31
  156. package/build/lib-client/objs-on-disk/obj-on-disk.d.ts +13 -2
  157. package/build/lib-client/objs-on-disk/obj-on-disk.js +24 -9
  158. package/build/lib-client/request-utils.d.ts +1 -0
  159. package/build/lib-client/request-utils.js +13 -13
  160. package/build/lib-client/server-events.d.ts +3 -3
  161. package/build/lib-client/server-events.js +9 -8
  162. package/build/lib-client/service-locator.js +10 -10
  163. package/build/lib-client/user-with-mid-session.d.ts +2 -1
  164. package/build/lib-client/user-with-mid-session.js +14 -8
  165. package/build/lib-client/user-with-pkl-session.js +25 -25
  166. package/build/lib-client/ws-utils.js +2 -2
  167. package/build/lib-common/async-cryptor-wrap.js +4 -4
  168. package/build/lib-common/async-fs-node.d.ts +5 -3
  169. package/build/lib-common/async-fs-node.js +17 -17
  170. package/build/lib-common/byte-streaming/pipe.js +1 -1
  171. package/build/lib-common/byte-streaming/wrapping.js +13 -13
  172. package/build/lib-common/canonical-address.js +1 -1
  173. package/build/lib-common/exceptions/error.d.ts +1 -0
  174. package/build/lib-common/exceptions/error.js +7 -6
  175. package/build/lib-common/exceptions/file.d.ts +4 -2
  176. package/build/lib-common/exceptions/file.js +24 -54
  177. package/build/lib-common/ipc/generic-ipc.js +5 -4
  178. package/build/lib-common/ipc/ws-ipc.js +2 -2
  179. package/build/lib-common/mid-sigs-NaCl-Ed.js +14 -14
  180. package/build/lib-common/objs-on-disk/file-layout.d.ts +19 -0
  181. package/build/lib-common/objs-on-disk/file-layout.js +130 -12
  182. package/build/lib-common/objs-on-disk/obj-file.d.ts +13 -2
  183. package/build/lib-common/objs-on-disk/obj-file.js +96 -35
  184. package/build/lib-common/objs-on-disk/utils.d.ts +1 -0
  185. package/build/lib-common/objs-on-disk/utils.js +3 -3
  186. package/build/lib-common/objs-on-disk/v1-obj-file-format.js +14 -14
  187. package/build/lib-common/processes/labelled-exec-pools.d.ts +1 -1
  188. package/build/lib-common/processes/labelled-exec-pools.js +1 -1
  189. package/build/lib-common/processes/pressure.js +2 -2
  190. package/build/lib-common/processes/synced.js +1 -1
  191. package/build/lib-common/processes/timeout.js +2 -2
  192. package/build/lib-common/random-node.js +7 -7
  193. package/build/lib-common/service-api/3nstorage/owner.d.ts +101 -42
  194. package/build/lib-common/service-api/3nstorage/owner.js +83 -40
  195. package/build/lib-common/service-api/asmail/delivery.js +2 -2
  196. package/build/lib-common/service-api/asmail/retrieval.js +1 -1
  197. package/build/lib-common/timed-cache.d.ts +1 -0
  198. package/build/lib-common/timed-non-weak-cache.d.ts +1 -0
  199. package/build/lib-common/timed-non-weak-cache.js +11 -0
  200. package/build/lib-common/utils-for-observables.js +4 -4
  201. package/build/lib-common/weak-cache.d.ts +1 -0
  202. package/build/lib-common/weak-cache.js +12 -1
  203. package/build/lib-index.d.ts +2 -1
  204. package/build/lib-index.js +10 -7
  205. package/build/protos/asmail.proto.js +12955 -7496
  206. package/build/protos/file.proto.js +4867 -2744
  207. package/build/protos/fs.proto.js +9227 -3768
  208. package/package.json +7 -5
  209. package/protos/file.proto +91 -19
  210. package/protos/fs.proto +107 -8
  211. package/build/core/id-manager.d.ts +0 -46
@@ -28,7 +28,6 @@ const random = require("../../../lib-common/random-node");
28
28
  const pv1 = require("./xsp-payload-v1");
29
29
  const pv2 = require("./xsp-payload-v2");
30
30
  const SEG_SIZE = 16; // in 256-byte blocks = 4K in bytes
31
- const EMPTY_BYTE_ARR = new Uint8Array(0);
32
31
  /**
33
32
  * This does reading and writing, keeping keys. This and extending objects are
34
33
  * used in file system nodes as thematic place with persistence functionality.
@@ -38,14 +37,6 @@ class NodePersistance {
38
37
  this.zerothHeaderNonce = zerothHeaderNonce;
39
38
  this.key = key;
40
39
  this.cryptor = cryptor;
41
- this.reencryptHeader = async (initHeader, newVersion) => {
42
- if (!this.key) {
43
- throw new Error("Cannot use wiped object.");
44
- }
45
- const headerContent = await this.cryptor.formatWN.open(initHeader, this.key);
46
- const n = xsp_files_1.calculateNonce(this.zerothHeaderNonce, newVersion);
47
- return this.cryptor.formatWN.pack(headerContent, n, this.key);
48
- };
49
40
  }
50
41
  wipe() {
51
42
  if (this.key) {
@@ -57,7 +48,7 @@ class NodePersistance {
57
48
  }
58
49
  compareKey(keyB64) {
59
50
  const k = buffer_utils_1.base64.open(keyB64);
60
- return xsp_files_1.compareVectors(k, this.key);
51
+ return (0, xsp_files_1.compareVectors)(k, this.key);
61
52
  }
62
53
  fileKeyInBase64() {
63
54
  if (!this.key) {
@@ -69,13 +60,13 @@ class NodePersistance {
69
60
  if (!this.key) {
70
61
  throw new Error("Cannot use wiped object.");
71
62
  }
72
- return xsp_files_1.makeSegmentsWriter(this.key, this.zerothHeaderNonce, version, { type: 'new', segSize: SEG_SIZE, payloadFormat: 2 }, random.bytes, this.cryptor);
63
+ return (0, xsp_files_1.makeSegmentsWriter)(this.key, this.zerothHeaderNonce, version, { type: 'new', segSize: SEG_SIZE, payloadFormat: 2 }, random.bytes, this.cryptor);
73
64
  }
74
65
  async segWriterWithBase(newVersion, base) {
75
66
  if (!this.key) {
76
67
  throw new Error("Cannot use wiped object.");
77
68
  }
78
- return xsp_files_1.makeSegmentsWriter(this.key, this.zerothHeaderNonce, newVersion, { type: 'update', base, payloadFormat: 2 }, random.bytes, this.cryptor);
69
+ return (0, xsp_files_1.makeSegmentsWriter)(this.key, this.zerothHeaderNonce, newVersion, { type: 'update', base, payloadFormat: 2 }, random.bytes, this.cryptor);
79
70
  }
80
71
  async decryptedByteSrc(src) {
81
72
  if (!this.key) {
@@ -83,10 +74,10 @@ class NodePersistance {
83
74
  }
84
75
  const version = src.version;
85
76
  const header = await src.readHeader();
86
- const segReader = await xsp_files_1.makeSegmentsReader(this.key, this.zerothHeaderNonce, version, header, this.cryptor);
77
+ const segReader = await (0, xsp_files_1.makeSegmentsReader)(this.key, this.zerothHeaderNonce, version, header, this.cryptor);
87
78
  return {
88
79
  version,
89
- byteSrc: xsp_files_1.makeDecryptedByteSource(src.segSrc, segReader),
80
+ byteSrc: (0, xsp_files_1.makeDecryptedByteSource)(src.segSrc, segReader),
90
81
  payloadFormat: segReader.payloadFormat
91
82
  };
92
83
  }
@@ -123,7 +114,7 @@ class NodePersistance {
123
114
  async writeWhole(content, newVersion, attrs, xattrs) {
124
115
  const bytes = (Array.isArray(content) ? content : [content]);
125
116
  const segWriter = await this.segWriter(newVersion);
126
- const { sink, sub } = xsp_files_1.makeEncryptingByteSink(segWriter);
117
+ const { sink, sub } = (0, xsp_files_1.makeEncryptingByteSink)(segWriter);
127
118
  return (obs, backpressure) => {
128
119
  // sub must be called before payload creation that uses sink
129
120
  const unsub = sub(obs, backpressure);
@@ -134,7 +125,7 @@ class NodePersistance {
134
125
  }
135
126
  async writeXAttrs(xattrs, newVersion, base) {
136
127
  const segWriter = await this.segWriterWithBase(newVersion, base);
137
- const { sink, sub } = xsp_files_1.makeEncryptingByteSink(segWriter);
128
+ const { sink, sub } = (0, xsp_files_1.makeEncryptingByteSink)(segWriter);
138
129
  return (obs, backpressure) => {
139
130
  // sub must be called before payload creation that uses sink
140
131
  const unsub = sub(obs, backpressure);
@@ -147,8 +138,8 @@ class NodePersistance {
147
138
  const segWriter = await (base ?
148
139
  this.segWriterWithBase(newVersion, base) :
149
140
  this.segWriter(newVersion));
150
- const { sink, sub } = xsp_files_1.makeEncryptingByteSink(segWriter);
151
- const defSink = deferred_1.defer();
141
+ const { sink, sub } = (0, xsp_files_1.makeEncryptingByteSink)(segWriter);
142
+ const defSink = (0, deferred_1.defer)();
152
143
  return {
153
144
  sinkPromise: defSink.promise,
154
145
  sub: (obs, backpressure) => {
@@ -174,6 +165,14 @@ class NodePersistance {
174
165
  }
175
166
  };
176
167
  }
168
+ async reencryptHeader(initHeader, newVersion) {
169
+ if (!this.key) {
170
+ throw new Error("Cannot use wiped object.");
171
+ }
172
+ const headerContent = await this.cryptor.formatWN.open(initHeader, this.key);
173
+ const n = (0, xsp_files_1.calculateNonce)(this.zerothHeaderNonce, newVersion);
174
+ return this.cryptor.formatWN.pack(headerContent, n, this.key);
175
+ }
177
176
  }
178
177
  exports.NodePersistance = NodePersistance;
179
178
  Object.freeze(NodePersistance.prototype);
@@ -61,8 +61,8 @@ class ReadonlyPayloadV1 {
61
61
  if (this.isEndless) {
62
62
  throw makeEndlessException();
63
63
  }
64
- assert_1.assert(Number.isInteger(start) && (start >= 0) && (start <= this.size));
65
- assert_1.assert(Number.isInteger(end) && (end >= start) && (end <= this.size));
64
+ (0, assert_1.assert)(Number.isInteger(start) && (start >= 0) && (start <= this.size));
65
+ (0, assert_1.assert)(Number.isInteger(end) && (end >= start) && (end <= this.size));
66
66
  if (end === start) {
67
67
  return;
68
68
  }
@@ -82,6 +82,6 @@ class ReadonlyPayloadV1 {
82
82
  Object.freeze(ReadonlyPayloadV1.prototype);
83
83
  Object.freeze(ReadonlyPayloadV1);
84
84
  function makeEndlessException() {
85
- return file_1.makeFileException(file_1.Code.isEndless, '');
85
+ return (0, file_1.makeFileException)('isEndless', '');
86
86
  }
87
87
  Object.freeze(exports);
@@ -85,11 +85,11 @@ class ReadonlyPayloadV2 {
85
85
  return this.readSomeContentBytes(0, this.size);
86
86
  }
87
87
  async readSomeContentBytes(start, end) {
88
- assert_1.assert(Number.isInteger(start) && (start >= 0));
88
+ (0, assert_1.assert)(Number.isInteger(start) && (start >= 0));
89
89
  if (start > this.size) {
90
90
  start = this.size;
91
91
  }
92
- assert_1.assert(Number.isInteger(end) && (end >= start));
92
+ (0, assert_1.assert)(Number.isInteger(end) && (end >= start));
93
93
  if (end > this.size) {
94
94
  end = this.size;
95
95
  }
@@ -100,7 +100,7 @@ class ReadonlyPayloadV2 {
100
100
  .findIndex(s => (s.ofs <= start));
101
101
  const endSecInd = this.contentSections
102
102
  .findIndex(s => ((s.ofs + s.len) >= end));
103
- assert_1.assert((startSecInd >= 0) && (endSecInd >= 0) &&
103
+ (0, assert_1.assert)((startSecInd >= 0) && (endSecInd >= 0) &&
104
104
  (startSecInd <= endSecInd));
105
105
  return await this.syncProc.startOrChain((startSecInd === endSecInd) ?
106
106
  async () => {
@@ -140,9 +140,9 @@ class ReadonlyPayloadV2 {
140
140
  }
141
141
  makeFileByteSource() {
142
142
  let pos = 0;
143
- return wrapping_1.wrapAndSyncFileSource({
143
+ return (0, wrapping_1.wrapAndSyncFileSource)({
144
144
  seek: async (ofs) => {
145
- assert_1.assert(Number.isInteger(ofs) && (ofs >= 0) && (ofs <= this.size), `Offset must be an integer from 0 to size value, inclusive`);
145
+ (0, assert_1.assert)(Number.isInteger(ofs) && (ofs >= 0) && (ofs <= this.size), `Offset must be an integer from 0 to size value, inclusive`);
146
146
  pos = ofs;
147
147
  },
148
148
  getSize: async () => this.size,
@@ -249,7 +249,7 @@ class WritablePayloadV2 {
249
249
  this.xattrsSections = xattrsSections;
250
250
  this.syncProc = new synced_1.SingleProc();
251
251
  this.completionErr = undefined;
252
- assert_1.assert(!!this.sink);
252
+ (0, assert_1.assert)(!!this.sink);
253
253
  if ((this.contentSections.length + this.xattrsSections.length) === 0) {
254
254
  this.sectionsInSink = [];
255
255
  this.cutonlyAreaEnd = 0;
@@ -319,8 +319,8 @@ class WritablePayloadV2 {
319
319
  this.completionErr : Error(`Payload has already completed`));
320
320
  }
321
321
  async spliceContent(contentOfs, del, ins) {
322
- assert_1.assert(Number.isInteger(contentOfs) && (contentOfs >= 0), `Content offset should be a non-negative integer`);
323
- assert_1.assert(Number.isInteger(del) && (del >= 0), `Number of bytes to delete should be a non-negative integer`);
322
+ (0, assert_1.assert)(Number.isInteger(contentOfs) && (contentOfs >= 0), `Content offset should be a non-negative integer`);
323
+ (0, assert_1.assert)(Number.isInteger(del) && (del >= 0), `Number of bytes to delete should be a non-negative integer`);
324
324
  if (!this.sink) {
325
325
  this.throwOnNoSink();
326
326
  }
@@ -408,10 +408,10 @@ class WritablePayloadV2 {
408
408
  this.contentSections.push(s);
409
409
  const lastInSink = lastIn(this.sectionsInSink);
410
410
  if (lastInSink) {
411
- assert_1.assert((lastInSink.ofsInSrc + lastInSink.len) === s.ofsInSrc);
411
+ (0, assert_1.assert)((lastInSink.ofsInSrc + lastInSink.len) === s.ofsInSrc);
412
412
  }
413
413
  else {
414
- assert_1.assert(s.ofsInSrc === 0);
414
+ (0, assert_1.assert)(s.ofsInSrc === 0);
415
415
  }
416
416
  this.sectionsInSink.push(s);
417
417
  }
@@ -425,7 +425,7 @@ class WritablePayloadV2 {
425
425
  this.contentSections.push({ type: 'empty', ofs, len });
426
426
  }
427
427
  else {
428
- assert_1.assert(last.type === 'empty');
428
+ (0, assert_1.assert)(last.type === 'empty');
429
429
  last.len += len;
430
430
  }
431
431
  }
@@ -457,7 +457,7 @@ class WritablePayloadV2 {
457
457
  c.len = lenBefore;
458
458
  }
459
459
  else {
460
- assert_1.assert(c.type === 'content');
460
+ (0, assert_1.assert)(c.type === 'content');
461
461
  after = {
462
462
  type: 'content',
463
463
  len: c.len - lenBefore,
@@ -466,8 +466,8 @@ class WritablePayloadV2 {
466
466
  };
467
467
  c.len = lenBefore;
468
468
  const beforeIndInSink = this.sectionsInSink.indexOf(c);
469
- assert_1.assert(beforeIndInSink >= 0);
470
- this.sectionsInSink.splice(beforeIndInSink, 0, after);
469
+ (0, assert_1.assert)(beforeIndInSink >= 0);
470
+ this.sectionsInSink.splice(beforeIndInSink + 1, 0, after);
471
471
  }
472
472
  before = c;
473
473
  indToSplice = i + 1;
@@ -475,7 +475,7 @@ class WritablePayloadV2 {
475
475
  break;
476
476
  }
477
477
  }
478
- assert_1.assert(indToSplice !== undefined, `When there is no section after given one, it should've been appended with other method`);
478
+ (0, assert_1.assert)(indToSplice !== undefined, `When there is no section after given one, it should've been appended with other method`);
479
479
  // either merge s with before, or splice it in
480
480
  if (before && (before.type === s.type)
481
481
  && ((before.ofs + before.len) === s.ofs)
@@ -486,10 +486,10 @@ class WritablePayloadV2 {
486
486
  this.contentSections.splice(indToSplice, 0, s);
487
487
  const lastInSink = lastIn(this.sectionsInSink);
488
488
  if (lastInSink) {
489
- assert_1.assert((lastInSink.ofsInSrc + lastInSink.len) === s.ofsInSrc);
489
+ (0, assert_1.assert)((lastInSink.ofsInSrc + lastInSink.len) === s.ofsInSrc);
490
490
  }
491
491
  else {
492
- assert_1.assert(s.ofsInSrc === 0);
492
+ (0, assert_1.assert)(s.ofsInSrc === 0);
493
493
  }
494
494
  this.sectionsInSink.push(s);
495
495
  }
@@ -502,7 +502,7 @@ class WritablePayloadV2 {
502
502
  this.splitContentSectionsAt(contentOfs);
503
503
  const fstInd = this.contentSections
504
504
  .findIndex(s => (s.ofs === contentOfs));
505
- assert_1.assert(fstInd >= 0);
505
+ (0, assert_1.assert)(fstInd >= 0);
506
506
  this.splitContentSectionsAt(contentOfs + del);
507
507
  let lastInd = this.contentSections
508
508
  .findIndex(s => (s.ofs === (contentOfs + del)));
@@ -533,7 +533,7 @@ class WritablePayloadV2 {
533
533
  }
534
534
  }
535
535
  else {
536
- assert_1.assert(s.type === 'empty');
536
+ (0, assert_1.assert)(s.type === 'empty');
537
537
  }
538
538
  }
539
539
  if (attemptJoinAtCut && (fstInd > 0)
@@ -543,7 +543,7 @@ class WritablePayloadV2 {
543
543
  if ((before.type === 'content') && (after.type === 'content')) {
544
544
  if ((before.ofsInSrc + before.len) === after.ofsInSrc) {
545
545
  const indInSink = this.sectionsInSink.indexOf(after);
546
- assert_1.assert(this.sectionsInSink[indInSink - 1] === before);
546
+ (0, assert_1.assert)(this.sectionsInSink[indInSink - 1] === before);
547
547
  before.len += after.len;
548
548
  this.contentSections.splice(fstInd, 1);
549
549
  this.sectionsInSink.splice(indInSink, 1);
@@ -579,11 +579,11 @@ class WritablePayloadV2 {
579
579
  };
580
580
  this.contentSections.splice(ind + 1, 0, tail);
581
581
  const indInSink = this.sectionsInSink.indexOf(s);
582
- assert_1.assert(indInSink >= 0);
582
+ (0, assert_1.assert)(indInSink >= 0);
583
583
  this.sectionsInSink.splice(indInSink + 1, 0, tail);
584
584
  }
585
585
  else {
586
- assert_1.assert(s.type === 'empty');
586
+ (0, assert_1.assert)(s.type === 'empty');
587
587
  const tail = {
588
588
  type: 'empty',
589
589
  ofs: cutOfs,
@@ -625,9 +625,9 @@ class WritablePayloadV2 {
625
625
  * area, where cut is allowed.
626
626
  */
627
627
  removeSectionInSink(p) {
628
- assert_1.assert(p.ofsInSrc < this.cutonlyAreaEnd);
628
+ (0, assert_1.assert)(p.ofsInSrc < this.cutonlyAreaEnd);
629
629
  const i = this.sectionsInSink.indexOf(p);
630
- assert_1.assert(i >= 0);
630
+ (0, assert_1.assert)(i >= 0);
631
631
  this.sectionsInSink.splice(i, 1);
632
632
  for (let k = i; k < this.sectionsInSink.length; k += 1) {
633
633
  const s = this.sectionsInSink[k];
@@ -656,7 +656,7 @@ class WritablePayloadV2 {
656
656
  return;
657
657
  }
658
658
  const packedXAttrs = xattrs.pack();
659
- const len = buffer_utils_1.byteLengthIn(packedXAttrs);
659
+ const len = (0, buffer_utils_1.byteLengthIn)(packedXAttrs);
660
660
  if (len > 0) {
661
661
  await this.sink.spliceLayout(this.writePos, 0, len);
662
662
  const s = {
@@ -709,7 +709,7 @@ class WritablePayloadV2 {
709
709
  if (xattrs) {
710
710
  await this.replaceXAttrs(xattrs);
711
711
  }
712
- const len = buffer_utils_1.byteLengthIn(bytes);
712
+ const len = (0, buffer_utils_1.byteLengthIn)(bytes);
713
713
  if (len > 0) {
714
714
  await this.sink.spliceLayout(this.writePos, 0, len);
715
715
  const s = {
@@ -761,7 +761,7 @@ class WritablePayloadV2 {
761
761
  }),
762
762
  splice: (pos, del, bytes) => this.syncProc.startOrChain(() => this.spliceContent(pos, del, bytes)),
763
763
  truncate: size => this.syncProc.startOrChain(async () => {
764
- assert_1.assert(Number.isInteger(size) && (size >= 0), `Size should be a non-negative integer`);
764
+ (0, assert_1.assert)(Number.isInteger(size) && (size >= 0), `Size should be a non-negative integer`);
765
765
  const currentSize = this.contentLen;
766
766
  if (size > currentSize) {
767
767
  this.appendEmptySection(size - currentSize);
@@ -786,7 +786,7 @@ function payloadLayoutException(msg, cause) {
786
786
  async function sureReadOfBytesFrom(src, ofs, len) {
787
787
  await src.seek(ofs);
788
788
  const bytes = await src.read(len);
789
- assert_1.assert(!!bytes && (bytes.length === len));
789
+ (0, assert_1.assert)(!!bytes && (bytes.length === len));
790
790
  return bytes;
791
791
  }
792
792
  function noop() { }
@@ -826,7 +826,7 @@ var payloadV2;
826
826
  throw payloadLayoutException(`Byte source is too short for smallest payload v2`);
827
827
  }
828
828
  // - read layout length from last 4 bytes
829
- const layoutLen = big_endian_1.uintFrom4Bytes(await sureReadOfBytesFrom(src, srcLen - 4, 4));
829
+ const layoutLen = (0, big_endian_1.uintFrom4Bytes)(await sureReadOfBytesFrom(src, srcLen - 4, 4));
830
830
  const sectionsEnd = srcLen - (layoutLen + 4);
831
831
  if (sectionsEnd < 0) {
832
832
  throw payloadLayoutException(`Layout length value in payload v2 is out of bound`);
@@ -865,42 +865,42 @@ var payloadV2;
865
865
  break;
866
866
  case 0x11:
867
867
  checkLen(bytes, i, 9);
868
- ofsInSrc = big_endian_1.uintFrom4Bytes(bytes, i + 1);
868
+ ofsInSrc = (0, big_endian_1.uintFrom4Bytes)(bytes, i + 1);
869
869
  len = nonZeroLengthFrom4Bytes(bytes, i + 5);
870
870
  contentSections.push({ type: CONTENT_SECTION, len, ofs, ofsInSrc });
871
871
  i += 9;
872
872
  break;
873
873
  case 0x12:
874
874
  checkLen(bytes, i, 13);
875
- ofsInSrc = big_endian_1.uintFrom8Bytes(bytes, i + 1);
875
+ ofsInSrc = (0, big_endian_1.uintFrom8Bytes)(bytes, i + 1);
876
876
  len = nonZeroLengthFrom4Bytes(bytes, i + 9);
877
877
  contentSections.push({ type: CONTENT_SECTION, len, ofs, ofsInSrc });
878
878
  i += 13;
879
879
  break;
880
880
  case 0x13:
881
881
  checkLen(bytes, i, 13);
882
- ofsInSrc = big_endian_1.uintFrom4Bytes(bytes, i + 1);
882
+ ofsInSrc = (0, big_endian_1.uintFrom4Bytes)(bytes, i + 1);
883
883
  len = nonZeroLengthFrom8Bytes(bytes, i + 5);
884
884
  contentSections.push({ type: CONTENT_SECTION, len, ofs, ofsInSrc });
885
885
  i += 13;
886
886
  break;
887
887
  case 0x14:
888
888
  checkLen(bytes, i, 17);
889
- ofsInSrc = big_endian_1.uintFrom8Bytes(bytes, i + 1);
889
+ ofsInSrc = (0, big_endian_1.uintFrom8Bytes)(bytes, i + 1);
890
890
  len = nonZeroLengthFrom8Bytes(bytes, i + 9);
891
891
  contentSections.push({ type: CONTENT_SECTION, len, ofs, ofsInSrc });
892
892
  i += 17;
893
893
  break;
894
894
  case 0x21:
895
895
  checkLen(bytes, i, 9);
896
- ofsInSrc = big_endian_1.uintFrom4Bytes(bytes, i + 1);
896
+ ofsInSrc = (0, big_endian_1.uintFrom4Bytes)(bytes, i + 1);
897
897
  len = nonZeroLengthFrom4Bytes(bytes, i + 5);
898
898
  xattrsSections.push({ type: XATTRS_SECTION, ofsInSrc, len });
899
899
  i += 9;
900
900
  continue; // xattrs section doesn't advance ofs below
901
901
  case 0x22:
902
902
  checkLen(bytes, i, 13);
903
- ofsInSrc = big_endian_1.uintFrom8Bytes(bytes, i + 1);
903
+ ofsInSrc = (0, big_endian_1.uintFrom8Bytes)(bytes, i + 1);
904
904
  len = nonZeroLengthFrom4Bytes(bytes, i + 9);
905
905
  xattrsSections.push({ type: XATTRS_SECTION, ofsInSrc, len });
906
906
  i += 13;
@@ -918,14 +918,14 @@ var payloadV2;
918
918
  }
919
919
  }
920
920
  function nonZeroLengthFrom4Bytes(bytes, i) {
921
- const len = big_endian_1.uintFrom4Bytes(bytes, i);
921
+ const len = (0, big_endian_1.uintFrom4Bytes)(bytes, i);
922
922
  if (len === 0) {
923
923
  throw payloadLayoutException(`Section with zero length in payload version 2`);
924
924
  }
925
925
  return len;
926
926
  }
927
927
  function nonZeroLengthFrom8Bytes(bytes, i) {
928
- const len = big_endian_1.uintFrom8Bytes(bytes, i);
928
+ const len = (0, big_endian_1.uintFrom8Bytes)(bytes, i);
929
929
  if (len === 0) {
930
930
  throw payloadLayoutException(`Section with zero length in payload version 2`);
931
931
  }
@@ -945,9 +945,9 @@ var payloadV2;
945
945
  bytes.push(packContentSection(section));
946
946
  }
947
947
  }
948
- const layoutLen = buffer_utils_1.byteLengthIn(bytes);
948
+ const layoutLen = (0, buffer_utils_1.byteLengthIn)(bytes);
949
949
  const lastBytes = Buffer.allocUnsafe(4);
950
- big_endian_1.packUintTo4Bytes(layoutLen, lastBytes, 0);
950
+ (0, big_endian_1.packUintTo4Bytes)(layoutLen, lastBytes, 0);
951
951
  bytes.push(lastBytes);
952
952
  const packLen = layoutLen + 4;
953
953
  return { bytes, packLen };
@@ -957,13 +957,13 @@ var payloadV2;
957
957
  if (section.len < 0x100000000) {
958
958
  const bytes = Buffer.allocUnsafe(5);
959
959
  bytes[0] = 0x01;
960
- big_endian_1.packUintTo4Bytes(section.len, bytes, 1);
960
+ (0, big_endian_1.packUintTo4Bytes)(section.len, bytes, 1);
961
961
  return bytes;
962
962
  }
963
963
  else {
964
964
  const bytes = Buffer.allocUnsafe(9);
965
965
  bytes[0] = 0x02;
966
- big_endian_1.packUintTo8Bytes(section.len, bytes, 1);
966
+ (0, big_endian_1.packUintTo8Bytes)(section.len, bytes, 1);
967
967
  return bytes;
968
968
  }
969
969
  }
@@ -972,15 +972,15 @@ var payloadV2;
972
972
  if (section.len < 0x100000000) {
973
973
  const bytes = Buffer.allocUnsafe(9);
974
974
  bytes[0] = 0x11;
975
- big_endian_1.packUintTo4Bytes(section.ofsInSrc, bytes, 1);
976
- big_endian_1.packUintTo4Bytes(section.len, bytes, 5);
975
+ (0, big_endian_1.packUintTo4Bytes)(section.ofsInSrc, bytes, 1);
976
+ (0, big_endian_1.packUintTo4Bytes)(section.len, bytes, 5);
977
977
  return bytes;
978
978
  }
979
979
  else {
980
980
  const bytes = Buffer.allocUnsafe(13);
981
981
  bytes[0] = 0x13;
982
- big_endian_1.packUintTo4Bytes(section.ofsInSrc, bytes, 1);
983
- big_endian_1.packUintTo8Bytes(section.len, bytes, 5);
982
+ (0, big_endian_1.packUintTo4Bytes)(section.ofsInSrc, bytes, 1);
983
+ (0, big_endian_1.packUintTo8Bytes)(section.len, bytes, 5);
984
984
  return bytes;
985
985
  }
986
986
  }
@@ -988,15 +988,15 @@ var payloadV2;
988
988
  if (section.len < 0x100000000) {
989
989
  const bytes = Buffer.allocUnsafe(13);
990
990
  bytes[0] = 0x12;
991
- big_endian_1.packUintTo8Bytes(section.ofsInSrc, bytes, 1);
992
- big_endian_1.packUintTo4Bytes(section.len, bytes, 9);
991
+ (0, big_endian_1.packUintTo8Bytes)(section.ofsInSrc, bytes, 1);
992
+ (0, big_endian_1.packUintTo4Bytes)(section.len, bytes, 9);
993
993
  return bytes;
994
994
  }
995
995
  else {
996
996
  const bytes = Buffer.allocUnsafe(17);
997
997
  bytes[0] = 0x14;
998
- big_endian_1.packUintTo8Bytes(section.ofsInSrc, bytes, 1);
999
- big_endian_1.packUintTo8Bytes(section.len, bytes, 8);
998
+ (0, big_endian_1.packUintTo8Bytes)(section.ofsInSrc, bytes, 1);
999
+ (0, big_endian_1.packUintTo8Bytes)(section.len, bytes, 8);
1000
1000
  return bytes;
1001
1001
  }
1002
1002
  }
@@ -1005,15 +1005,15 @@ var payloadV2;
1005
1005
  if (section.ofsInSrc < 0x100000000) {
1006
1006
  const bytes = Buffer.allocUnsafe(9);
1007
1007
  bytes[0] = 0x21;
1008
- big_endian_1.packUintTo4Bytes(section.ofsInSrc, bytes, 1);
1009
- big_endian_1.packUintTo4Bytes(section.len, bytes, 5);
1008
+ (0, big_endian_1.packUintTo4Bytes)(section.ofsInSrc, bytes, 1);
1009
+ (0, big_endian_1.packUintTo4Bytes)(section.len, bytes, 5);
1010
1010
  return bytes;
1011
1011
  }
1012
1012
  else {
1013
1013
  const bytes = Buffer.allocUnsafe(13);
1014
1014
  bytes[0] = 0x22;
1015
- big_endian_1.packUintTo8Bytes(section.ofsInSrc, bytes, 1);
1016
- big_endian_1.packUintTo4Bytes(section.len, bytes, 9);
1015
+ (0, big_endian_1.packUintTo8Bytes)(section.ofsInSrc, bytes, 1);
1016
+ (0, big_endian_1.packUintTo4Bytes)(section.len, bytes, 9);
1017
1017
  return bytes;
1018
1018
  }
1019
1019
  }
@@ -33,11 +33,11 @@ async function checkAvailableAddressesForName(client, serviceUrl, name, signupTo
33
33
  return rep.data;
34
34
  }
35
35
  else {
36
- throw request_utils_1.makeException(rep, 'Reply is malformed');
36
+ throw (0, request_utils_1.makeException)(rep, 'Reply is malformed');
37
37
  }
38
38
  }
39
39
  else {
40
- throw request_utils_1.makeException(rep, 'Unexpected status');
40
+ throw (0, request_utils_1.makeException)(rep, 'Unexpected status');
41
41
  }
42
42
  }
43
43
  exports.checkAvailableAddressesForName = checkAvailableAddressesForName;
@@ -55,7 +55,7 @@ async function addUser(client, serviceUrl, userParams) {
55
55
  return false;
56
56
  }
57
57
  else {
58
- throw request_utils_1.makeException(rep, 'Unexpected status');
58
+ throw (0, request_utils_1.makeException)(rep, 'Unexpected status');
59
59
  }
60
60
  }
61
61
  exports.addUser = addUser;
@@ -75,7 +75,7 @@ async function sendActivationCheckRequest(client, serviceUrl, userId) {
75
75
  return false;
76
76
  }
77
77
  else {
78
- throw request_utils_1.makeException(rep, 'Unexpected status');
78
+ throw (0, request_utils_1.makeException)(rep, 'Unexpected status');
79
79
  }
80
80
  }
81
81
  exports.sendActivationCheckRequest = sendActivationCheckRequest;
@@ -63,7 +63,7 @@ class MailRecipient extends user_with_mid_session_1.ServiceUser {
63
63
  canBeRedirected: true
64
64
  }, getSigner, async () => {
65
65
  const serviceUrl = await mainUrlGetter();
66
- const info = await service_locator_1.asmailInfoAt(this.net, serviceUrl);
66
+ const info = await (0, service_locator_1.asmailInfoAt)(this.net, serviceUrl);
67
67
  if (!info.retrieval) {
68
68
  throw new Error(`Missing retrieval service url in ASMail information at ${serviceUrl}`);
69
69
  }
@@ -83,12 +83,12 @@ class MailRecipient extends user_with_mid_session_1.ServiceUser {
83
83
  });
84
84
  if (rep.status === api.listMsgs.SC.ok) {
85
85
  if (!Array.isArray(rep.data)) {
86
- throw request_utils_1.makeException(rep, 'Malformed response');
86
+ throw (0, request_utils_1.makeException)(rep, 'Malformed response');
87
87
  }
88
88
  return rep.data;
89
89
  }
90
90
  else {
91
- throw request_utils_1.makeException(rep, 'Unexpected status');
91
+ throw (0, request_utils_1.makeException)(rep, 'Unexpected status');
92
92
  }
93
93
  }
94
94
  async getMsgMeta(msgId) {
@@ -100,7 +100,7 @@ class MailRecipient extends user_with_mid_session_1.ServiceUser {
100
100
  if (rep.status === api.msgMetadata.SC.ok) {
101
101
  const meta = api.sanitizedMeta(rep.data);
102
102
  if (!meta) {
103
- throw request_utils_1.makeException(rep, 'Malformed response');
103
+ throw (0, request_utils_1.makeException)(rep, 'Malformed response');
104
104
  }
105
105
  return meta;
106
106
  }
@@ -108,7 +108,7 @@ class MailRecipient extends user_with_mid_session_1.ServiceUser {
108
108
  throw makeMsgNotFoundException(msgId);
109
109
  }
110
110
  else {
111
- throw request_utils_1.makeException(rep, 'Unexpected status');
111
+ throw (0, request_utils_1.makeException)(rep, 'Unexpected status');
112
112
  }
113
113
  }
114
114
  /**
@@ -133,12 +133,12 @@ class MailRecipient extends user_with_mid_session_1.ServiceUser {
133
133
  });
134
134
  if (rep.status === api.msgObj.SC.ok) {
135
135
  if (!(rep.data instanceof Uint8Array)) {
136
- throw request_utils_1.makeException(rep, `Malformed response: body is not binary`);
136
+ throw (0, request_utils_1.makeException)(rep, `Malformed response: body is not binary`);
137
137
  }
138
- const segsTotalLen = request_utils_1.extractIntHeader(rep, api.HTTP_HEADER.objSegmentsLength);
139
- const headerLen = request_utils_1.extractIntHeader(rep, api.HTTP_HEADER.objHeaderLength);
138
+ const segsTotalLen = (0, request_utils_1.extractIntHeader)(rep, api.HTTP_HEADER.objSegmentsLength);
139
+ const headerLen = (0, request_utils_1.extractIntHeader)(rep, api.HTTP_HEADER.objHeaderLength);
140
140
  if (rep.data.length > (headerLen + segsTotalLen)) {
141
- throw request_utils_1.makeException(rep, `Malformed response: body is too long`);
141
+ throw (0, request_utils_1.makeException)(rep, `Malformed response: body is too long`);
142
142
  }
143
143
  return {
144
144
  segsTotalLen,
@@ -150,7 +150,7 @@ class MailRecipient extends user_with_mid_session_1.ServiceUser {
150
150
  throw makeObjNotFoundException(msgId, objId);
151
151
  }
152
152
  else {
153
- throw request_utils_1.makeException(rep, 'Unexpected status');
153
+ throw (0, request_utils_1.makeException)(rep, 'Unexpected status');
154
154
  }
155
155
  }
156
156
  /**
@@ -174,7 +174,7 @@ class MailRecipient extends user_with_mid_session_1.ServiceUser {
174
174
  });
175
175
  if (rep.status === api.msgObj.SC.ok) {
176
176
  if (!(rep.data instanceof Uint8Array)) {
177
- throw request_utils_1.makeException(rep, `Malformed response: body is not binary`);
177
+ throw (0, request_utils_1.makeException)(rep, `Malformed response: body is not binary`);
178
178
  }
179
179
  return rep.data;
180
180
  }
@@ -182,7 +182,7 @@ class MailRecipient extends user_with_mid_session_1.ServiceUser {
182
182
  throw makeObjNotFoundException(msgId, objId);
183
183
  }
184
184
  else {
185
- throw request_utils_1.makeException(rep, 'Unexpected status');
185
+ throw (0, request_utils_1.makeException)(rep, 'Unexpected status');
186
186
  }
187
187
  }
188
188
  async removeMsg(msgId) {
@@ -197,16 +197,16 @@ class MailRecipient extends user_with_mid_session_1.ServiceUser {
197
197
  throw makeMsgNotFoundException(msgId);
198
198
  }
199
199
  else {
200
- throw request_utils_1.makeException(rep, 'Unexpected status');
200
+ throw (0, request_utils_1.makeException)(rep, 'Unexpected status');
201
201
  }
202
202
  }
203
203
  async openEventSource() {
204
204
  const rep = await this.openWS(api.wsEventChannel.URL_END);
205
205
  if (rep.status === api.wsEventChannel.SC.ok) {
206
- return ws_ipc_1.makeSubscriber(rep.data, undefined);
206
+ return (0, ws_ipc_1.makeSubscriber)(rep.data, undefined);
207
207
  }
208
208
  else {
209
- throw request_utils_1.makeException(rep, 'Unexpected status');
209
+ throw (0, request_utils_1.makeException)(rep, 'Unexpected status');
210
210
  }
211
211
  }
212
212
  }