core-3nweb-client-lib 0.27.4 → 0.27.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.
Files changed (84) hide show
  1. package/build/api-defs/files.d.ts +40 -10
  2. package/build/core/asmail/delivery/per-recipient-wip.js +2 -2
  3. package/build/core/asmail/inbox/inbox-events.js +10 -5
  4. package/build/core/asmail/inbox/index.d.ts +3 -2
  5. package/build/core/asmail/inbox/index.js +14 -10
  6. package/build/core/asmail/inbox/msg-indexing.d.ts +17 -64
  7. package/build/core/asmail/inbox/msg-indexing.js +440 -311
  8. package/build/core/asmail/inbox/msg-on-disk.js +2 -1
  9. package/build/core/asmail/index.js +3 -2
  10. package/build/core/asmail/keyring/correspondent-keys.js +3 -1
  11. package/build/core/asmail/keyring/index.d.ts +1 -4
  12. package/build/core/asmail/keyring/index.js +6 -6
  13. package/build/core/asmail/msg/opener.js +4 -3
  14. package/build/core/asmail/msg/packer.d.ts +1 -0
  15. package/build/core/asmail/msg/packer.js +8 -4
  16. package/build/core/index.js +2 -3
  17. package/build/core/storage/local/obj-files.js +2 -1
  18. package/build/core/storage/synced/storage.js +3 -2
  19. package/build/core/storage/synced/upload-header-file.js +4 -2
  20. package/build/core/storage/synced/upsyncer.js +3 -5
  21. package/build/ipc-via-protobuf/asmail-cap.js +14 -15
  22. package/build/ipc-via-protobuf/bytes.js +42 -18
  23. package/build/ipc-via-protobuf/file.js +43 -39
  24. package/build/ipc-via-protobuf/fs.js +72 -67
  25. package/build/ipc-via-protobuf/mailerid.js +2 -2
  26. package/build/ipc-via-protobuf/protobuf-msg.d.ts +1 -0
  27. package/build/ipc-via-protobuf/protobuf-msg.js +5 -1
  28. package/build/ipc-via-protobuf/startup-cap.js +8 -8
  29. package/build/ipc-via-protobuf/storage-cap.js +4 -4
  30. package/build/lib-client/3nstorage/xsp-fs/common.js +2 -0
  31. package/build/lib-client/3nstorage/xsp-fs/file-node.js +0 -17
  32. package/build/lib-client/3nstorage/xsp-fs/file.d.ts +1 -1
  33. package/build/lib-client/3nstorage/xsp-fs/folder-node.d.ts +1 -1
  34. package/build/lib-client/3nstorage/xsp-fs/folder-node.js +13 -7
  35. package/build/lib-client/3nstorage/xsp-fs/fs.d.ts +1 -1
  36. package/build/lib-client/3nstorage/xsp-fs/fs.js +1 -1
  37. package/build/lib-client/3nstorage/xsp-fs/node-in-fs.d.ts +2 -2
  38. package/build/lib-client/3nstorage/xsp-fs/node-in-fs.js +7 -3
  39. package/build/lib-client/3nstorage/xsp-fs/node-persistence.d.ts +1 -0
  40. package/build/lib-client/3nstorage/xsp-fs/node-persistence.js +7 -5
  41. package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v1.js +3 -4
  42. package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v2.js +20 -15
  43. package/build/lib-client/cryptor/cryptor-in-worker.js +37 -47
  44. package/build/lib-client/cryptor/cryptor-wasm.js +1 -1
  45. package/build/lib-client/cryptor/cryptor.wasm +0 -0
  46. package/build/lib-client/cryptor/in-proc-js.js +15 -12
  47. package/build/lib-client/cryptor/in-proc-wasm.js +11 -8
  48. package/build/lib-client/cryptor/serialization-for-wasm.d.ts +36 -0
  49. package/build/lib-client/cryptor/serialization-for-wasm.js +58 -0
  50. package/build/lib-client/cryptor-work-labels.d.ts +26 -0
  51. package/build/lib-client/cryptor-work-labels.js +152 -0
  52. package/build/lib-client/fs-sync-utils.d.ts +7 -1
  53. package/build/lib-client/fs-sync-utils.js +18 -7
  54. package/build/lib-client/local-files/dev-file-src.d.ts +2 -1
  55. package/build/lib-client/local-files/dev-file-src.js +5 -1
  56. package/build/lib-client/local-files/device-fs.js +2 -1
  57. package/build/lib-client/objs-on-disk/obj-on-disk.js +5 -1
  58. package/build/lib-client/request-utils.js +14 -14
  59. package/build/lib-common/async-cryptor-wrap.d.ts +9 -9
  60. package/build/lib-common/async-cryptor-wrap.js +13 -13
  61. package/build/lib-common/byte-streaming/pipe.d.ts +1 -1
  62. package/build/lib-common/byte-streaming/pipe.js +3 -3
  63. package/build/lib-common/byte-streaming/wrapping.js +4 -2
  64. package/build/lib-common/json-utils.js +0 -3
  65. package/build/lib-common/processes/synced.js +0 -184
  66. package/build/lib-sqlite-on-3nstorage/index.d.ts +32 -0
  67. package/build/lib-sqlite-on-3nstorage/index.js +117 -0
  68. package/build/lib-sqlite-on-3nstorage/sqljs.d.ts +279 -0
  69. package/build/lib-sqlite-on-3nstorage/sqljs.js +223 -0
  70. package/build/protos/asmail.proto.js +3748 -1121
  71. package/build/protos/bytes.proto.js +731 -204
  72. package/build/protos/common.proto.js +192 -44
  73. package/build/protos/cryptor.proto.js +184 -61
  74. package/build/protos/file.proto.js +1336 -324
  75. package/build/protos/fs.proto.js +3099 -846
  76. package/build/protos/ipc.proto.js +244 -61
  77. package/build/protos/logger.proto.js +219 -53
  78. package/build/protos/mailerid.proto.js +230 -50
  79. package/build/protos/startup.proto.js +341 -77
  80. package/build/protos/storage.proto.js +276 -62
  81. package/package.json +8 -7
  82. package/protos/bytes.proto +13 -4
  83. package/protos/file.proto +4 -1
  84. package/protos/fs.proto +4 -1
@@ -134,17 +134,20 @@ $root.ipc = (function() {
134
134
  while (reader.pos < end) {
135
135
  var tag = reader.uint32();
136
136
  switch (tag >>> 3) {
137
- case 1:
138
- message.msgType = reader.string();
139
- break;
140
- case 2:
141
- message.fnCallNum = $root.common.UInt64Value.decode(reader, reader.uint32());
142
- break;
143
- case 3:
144
- if (!(message.path && message.path.length))
145
- message.path = [];
146
- message.path.push(reader.string());
147
- break;
137
+ case 1: {
138
+ message.msgType = reader.string();
139
+ break;
140
+ }
141
+ case 2: {
142
+ message.fnCallNum = $root.common.UInt64Value.decode(reader, reader.uint32());
143
+ break;
144
+ }
145
+ case 3: {
146
+ if (!(message.path && message.path.length))
147
+ message.path = [];
148
+ message.path.push(reader.string());
149
+ break;
150
+ }
148
151
  default:
149
152
  reader.skipType(tag & 7);
150
153
  break;
@@ -269,6 +272,21 @@ $root.ipc = (function() {
269
272
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
270
273
  };
271
274
 
275
+ /**
276
+ * Gets the default type url for EnvelopeHeaders
277
+ * @function getTypeUrl
278
+ * @memberof ipc.EnvelopeHeaders
279
+ * @static
280
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
281
+ * @returns {string} The default type url
282
+ */
283
+ EnvelopeHeaders.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
284
+ if (typeUrlPrefix === undefined) {
285
+ typeUrlPrefix = "type.googleapis.com";
286
+ }
287
+ return typeUrlPrefix + "/ipc.EnvelopeHeaders";
288
+ };
289
+
272
290
  return EnvelopeHeaders;
273
291
  })();
274
292
 
@@ -375,12 +393,14 @@ $root.ipc = (function() {
375
393
  while (reader.pos < end) {
376
394
  var tag = reader.uint32();
377
395
  switch (tag >>> 3) {
378
- case 1:
379
- message.headers = $root.ipc.EnvelopeHeaders.decode(reader, reader.uint32());
380
- break;
381
- case 2:
382
- message.body = $root.common.BytesValue.decode(reader, reader.uint32());
383
- break;
396
+ case 1: {
397
+ message.headers = $root.ipc.EnvelopeHeaders.decode(reader, reader.uint32());
398
+ break;
399
+ }
400
+ case 2: {
401
+ message.body = $root.common.BytesValue.decode(reader, reader.uint32());
402
+ break;
403
+ }
384
404
  default:
385
405
  reader.skipType(tag & 7);
386
406
  break;
@@ -489,6 +509,21 @@ $root.ipc = (function() {
489
509
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
490
510
  };
491
511
 
512
+ /**
513
+ * Gets the default type url for Envelope
514
+ * @function getTypeUrl
515
+ * @memberof ipc.Envelope
516
+ * @static
517
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
518
+ * @returns {string} The default type url
519
+ */
520
+ Envelope.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
521
+ if (typeUrlPrefix === undefined) {
522
+ typeUrlPrefix = "type.googleapis.com";
523
+ }
524
+ return typeUrlPrefix + "/ipc.Envelope";
525
+ };
526
+
492
527
  return Envelope;
493
528
  })();
494
529
 
@@ -609,14 +644,16 @@ $root.common = (function() {
609
644
  while (reader.pos < end) {
610
645
  var tag = reader.uint32();
611
646
  switch (tag >>> 3) {
612
- case 1:
613
- message.objType = reader.string();
614
- break;
615
- case 2:
616
- if (!(message.path && message.path.length))
617
- message.path = [];
618
- message.path.push(reader.string());
619
- break;
647
+ case 1: {
648
+ message.objType = reader.string();
649
+ break;
650
+ }
651
+ case 2: {
652
+ if (!(message.path && message.path.length))
653
+ message.path = [];
654
+ message.path.push(reader.string());
655
+ break;
656
+ }
620
657
  default:
621
658
  reader.skipType(tag & 7);
622
659
  break;
@@ -727,6 +764,21 @@ $root.common = (function() {
727
764
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
728
765
  };
729
766
 
767
+ /**
768
+ * Gets the default type url for ObjectReference
769
+ * @function getTypeUrl
770
+ * @memberof common.ObjectReference
771
+ * @static
772
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
773
+ * @returns {string} The default type url
774
+ */
775
+ ObjectReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
776
+ if (typeUrlPrefix === undefined) {
777
+ typeUrlPrefix = "type.googleapis.com";
778
+ }
779
+ return typeUrlPrefix + "/common.ObjectReference";
780
+ };
781
+
730
782
  return ObjectReference;
731
783
  })();
732
784
 
@@ -822,9 +874,10 @@ $root.common = (function() {
822
874
  while (reader.pos < end) {
823
875
  var tag = reader.uint32();
824
876
  switch (tag >>> 3) {
825
- case 1:
826
- message.value = reader.bool();
827
- break;
877
+ case 1: {
878
+ message.value = reader.bool();
879
+ break;
880
+ }
828
881
  default:
829
882
  reader.skipType(tag & 7);
830
883
  break;
@@ -914,6 +967,21 @@ $root.common = (function() {
914
967
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
915
968
  };
916
969
 
970
+ /**
971
+ * Gets the default type url for BooleanValue
972
+ * @function getTypeUrl
973
+ * @memberof common.BooleanValue
974
+ * @static
975
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
976
+ * @returns {string} The default type url
977
+ */
978
+ BooleanValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
979
+ if (typeUrlPrefix === undefined) {
980
+ typeUrlPrefix = "type.googleapis.com";
981
+ }
982
+ return typeUrlPrefix + "/common.BooleanValue";
983
+ };
984
+
917
985
  return BooleanValue;
918
986
  })();
919
987
 
@@ -1011,11 +1079,12 @@ $root.common = (function() {
1011
1079
  while (reader.pos < end) {
1012
1080
  var tag = reader.uint32();
1013
1081
  switch (tag >>> 3) {
1014
- case 1:
1015
- if (!(message.values && message.values.length))
1016
- message.values = [];
1017
- message.values.push(reader.string());
1018
- break;
1082
+ case 1: {
1083
+ if (!(message.values && message.values.length))
1084
+ message.values = [];
1085
+ message.values.push(reader.string());
1086
+ break;
1087
+ }
1019
1088
  default:
1020
1089
  reader.skipType(tag & 7);
1021
1090
  break;
@@ -1117,6 +1186,21 @@ $root.common = (function() {
1117
1186
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1118
1187
  };
1119
1188
 
1189
+ /**
1190
+ * Gets the default type url for StringArrayValue
1191
+ * @function getTypeUrl
1192
+ * @memberof common.StringArrayValue
1193
+ * @static
1194
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1195
+ * @returns {string} The default type url
1196
+ */
1197
+ StringArrayValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1198
+ if (typeUrlPrefix === undefined) {
1199
+ typeUrlPrefix = "type.googleapis.com";
1200
+ }
1201
+ return typeUrlPrefix + "/common.StringArrayValue";
1202
+ };
1203
+
1120
1204
  return StringArrayValue;
1121
1205
  })();
1122
1206
 
@@ -1212,9 +1296,10 @@ $root.common = (function() {
1212
1296
  while (reader.pos < end) {
1213
1297
  var tag = reader.uint32();
1214
1298
  switch (tag >>> 3) {
1215
- case 1:
1216
- message.value = reader.uint64();
1217
- break;
1299
+ case 1: {
1300
+ message.value = reader.uint64();
1301
+ break;
1302
+ }
1218
1303
  default:
1219
1304
  reader.skipType(tag & 7);
1220
1305
  break;
@@ -1318,6 +1403,21 @@ $root.common = (function() {
1318
1403
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1319
1404
  };
1320
1405
 
1406
+ /**
1407
+ * Gets the default type url for UInt64Value
1408
+ * @function getTypeUrl
1409
+ * @memberof common.UInt64Value
1410
+ * @static
1411
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1412
+ * @returns {string} The default type url
1413
+ */
1414
+ UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1415
+ if (typeUrlPrefix === undefined) {
1416
+ typeUrlPrefix = "type.googleapis.com";
1417
+ }
1418
+ return typeUrlPrefix + "/common.UInt64Value";
1419
+ };
1420
+
1321
1421
  return UInt64Value;
1322
1422
  })();
1323
1423
 
@@ -1413,9 +1513,10 @@ $root.common = (function() {
1413
1513
  while (reader.pos < end) {
1414
1514
  var tag = reader.uint32();
1415
1515
  switch (tag >>> 3) {
1416
- case 1:
1417
- message.value = reader.uint32();
1418
- break;
1516
+ case 1: {
1517
+ message.value = reader.uint32();
1518
+ break;
1519
+ }
1419
1520
  default:
1420
1521
  reader.skipType(tag & 7);
1421
1522
  break;
@@ -1505,6 +1606,21 @@ $root.common = (function() {
1505
1606
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1506
1607
  };
1507
1608
 
1609
+ /**
1610
+ * Gets the default type url for UInt32Value
1611
+ * @function getTypeUrl
1612
+ * @memberof common.UInt32Value
1613
+ * @static
1614
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1615
+ * @returns {string} The default type url
1616
+ */
1617
+ UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1618
+ if (typeUrlPrefix === undefined) {
1619
+ typeUrlPrefix = "type.googleapis.com";
1620
+ }
1621
+ return typeUrlPrefix + "/common.UInt32Value";
1622
+ };
1623
+
1508
1624
  return UInt32Value;
1509
1625
  })();
1510
1626
 
@@ -1600,9 +1716,10 @@ $root.common = (function() {
1600
1716
  while (reader.pos < end) {
1601
1717
  var tag = reader.uint32();
1602
1718
  switch (tag >>> 3) {
1603
- case 1:
1604
- message.value = reader.string();
1605
- break;
1719
+ case 1: {
1720
+ message.value = reader.string();
1721
+ break;
1722
+ }
1606
1723
  default:
1607
1724
  reader.skipType(tag & 7);
1608
1725
  break;
@@ -1692,6 +1809,21 @@ $root.common = (function() {
1692
1809
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1693
1810
  };
1694
1811
 
1812
+ /**
1813
+ * Gets the default type url for StringValue
1814
+ * @function getTypeUrl
1815
+ * @memberof common.StringValue
1816
+ * @static
1817
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1818
+ * @returns {string} The default type url
1819
+ */
1820
+ StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1821
+ if (typeUrlPrefix === undefined) {
1822
+ typeUrlPrefix = "type.googleapis.com";
1823
+ }
1824
+ return typeUrlPrefix + "/common.StringValue";
1825
+ };
1826
+
1695
1827
  return StringValue;
1696
1828
  })();
1697
1829
 
@@ -1787,9 +1919,10 @@ $root.common = (function() {
1787
1919
  while (reader.pos < end) {
1788
1920
  var tag = reader.uint32();
1789
1921
  switch (tag >>> 3) {
1790
- case 1:
1791
- message.value = reader.bytes();
1792
- break;
1922
+ case 1: {
1923
+ message.value = reader.bytes();
1924
+ break;
1925
+ }
1793
1926
  default:
1794
1927
  reader.skipType(tag & 7);
1795
1928
  break;
@@ -1846,7 +1979,7 @@ $root.common = (function() {
1846
1979
  if (object.value != null)
1847
1980
  if (typeof object.value === "string")
1848
1981
  $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0);
1849
- else if (object.value.length)
1982
+ else if (object.value.length >= 0)
1850
1983
  message.value = object.value;
1851
1984
  return message;
1852
1985
  };
@@ -1888,6 +2021,21 @@ $root.common = (function() {
1888
2021
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1889
2022
  };
1890
2023
 
2024
+ /**
2025
+ * Gets the default type url for BytesValue
2026
+ * @function getTypeUrl
2027
+ * @memberof common.BytesValue
2028
+ * @static
2029
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
2030
+ * @returns {string} The default type url
2031
+ */
2032
+ BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
2033
+ if (typeUrlPrefix === undefined) {
2034
+ typeUrlPrefix = "type.googleapis.com";
2035
+ }
2036
+ return typeUrlPrefix + "/common.BytesValue";
2037
+ };
2038
+
1891
2039
  return BytesValue;
1892
2040
  })();
1893
2041
 
@@ -1994,12 +2142,14 @@ $root.common = (function() {
1994
2142
  while (reader.pos < end) {
1995
2143
  var tag = reader.uint32();
1996
2144
  switch (tag >>> 3) {
1997
- case 1:
1998
- message.runtimeExcJson = reader.string();
1999
- break;
2000
- case 2:
2001
- message.err = reader.string();
2002
- break;
2145
+ case 1: {
2146
+ message.runtimeExcJson = reader.string();
2147
+ break;
2148
+ }
2149
+ case 2: {
2150
+ message.err = reader.string();
2151
+ break;
2152
+ }
2003
2153
  default:
2004
2154
  reader.skipType(tag & 7);
2005
2155
  break;
@@ -2098,6 +2248,21 @@ $root.common = (function() {
2098
2248
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2099
2249
  };
2100
2250
 
2251
+ /**
2252
+ * Gets the default type url for ErrorValue
2253
+ * @function getTypeUrl
2254
+ * @memberof common.ErrorValue
2255
+ * @static
2256
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
2257
+ * @returns {string} The default type url
2258
+ */
2259
+ ErrorValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
2260
+ if (typeUrlPrefix === undefined) {
2261
+ typeUrlPrefix = "type.googleapis.com";
2262
+ }
2263
+ return typeUrlPrefix + "/common.ErrorValue";
2264
+ };
2265
+
2101
2266
  return ErrorValue;
2102
2267
  })();
2103
2268
 
@@ -2215,15 +2380,18 @@ $root.common = (function() {
2215
2380
  while (reader.pos < end) {
2216
2381
  var tag = reader.uint32();
2217
2382
  switch (tag >>> 3) {
2218
- case 1:
2219
- message.type = reader.string();
2220
- break;
2221
- case 2:
2222
- message.json = $root.common.StringValue.decode(reader, reader.uint32());
2223
- break;
2224
- case 3:
2225
- message.bytes = $root.common.BytesValue.decode(reader, reader.uint32());
2226
- break;
2383
+ case 1: {
2384
+ message.type = reader.string();
2385
+ break;
2386
+ }
2387
+ case 2: {
2388
+ message.json = $root.common.StringValue.decode(reader, reader.uint32());
2389
+ break;
2390
+ }
2391
+ case 3: {
2392
+ message.bytes = $root.common.BytesValue.decode(reader, reader.uint32());
2393
+ break;
2394
+ }
2227
2395
  default:
2228
2396
  reader.skipType(tag & 7);
2229
2397
  break;
@@ -2340,6 +2508,21 @@ $root.common = (function() {
2340
2508
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2341
2509
  };
2342
2510
 
2511
+ /**
2512
+ * Gets the default type url for AnyValue
2513
+ * @function getTypeUrl
2514
+ * @memberof common.AnyValue
2515
+ * @static
2516
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
2517
+ * @returns {string} The default type url
2518
+ */
2519
+ AnyValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
2520
+ if (typeUrlPrefix === undefined) {
2521
+ typeUrlPrefix = "type.googleapis.com";
2522
+ }
2523
+ return typeUrlPrefix + "/common.AnyValue";
2524
+ };
2525
+
2343
2526
  return AnyValue;
2344
2527
  })();
2345
2528