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.cryptor = (function() {
134
134
  while (reader.pos < end) {
135
135
  var tag = reader.uint32();
136
136
  switch (tag >>> 3) {
137
- case 1:
138
- message.func = reader.uint32();
139
- break;
140
- case 2:
141
- if (!(message.byteArgs && message.byteArgs.length))
142
- message.byteArgs = [];
143
- message.byteArgs.push($root.cryptor.BytesVal.decode(reader, reader.uint32()));
144
- break;
145
- case 3:
146
- message.scryptArgs = $root.cryptor.Request.ScryptArgs.decode(reader, reader.uint32());
147
- break;
137
+ case 1: {
138
+ message.func = reader.uint32();
139
+ break;
140
+ }
141
+ case 2: {
142
+ if (!(message.byteArgs && message.byteArgs.length))
143
+ message.byteArgs = [];
144
+ message.byteArgs.push($root.cryptor.BytesVal.decode(reader, reader.uint32()));
145
+ break;
146
+ }
147
+ case 3: {
148
+ message.scryptArgs = $root.cryptor.Request.ScryptArgs.decode(reader, reader.uint32());
149
+ break;
150
+ }
148
151
  default:
149
152
  reader.skipType(tag & 7);
150
153
  break;
@@ -274,6 +277,21 @@ $root.cryptor = (function() {
274
277
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
275
278
  };
276
279
 
280
+ /**
281
+ * Gets the default type url for Request
282
+ * @function getTypeUrl
283
+ * @memberof cryptor.Request
284
+ * @static
285
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
286
+ * @returns {string} The default type url
287
+ */
288
+ Request.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
289
+ if (typeUrlPrefix === undefined) {
290
+ typeUrlPrefix = "type.googleapis.com";
291
+ }
292
+ return typeUrlPrefix + "/cryptor.Request";
293
+ };
294
+
277
295
  Request.ScryptArgs = (function() {
278
296
 
279
297
  /**
@@ -421,24 +439,30 @@ $root.cryptor = (function() {
421
439
  while (reader.pos < end) {
422
440
  var tag = reader.uint32();
423
441
  switch (tag >>> 3) {
424
- case 1:
425
- message.passwd = reader.bytes();
426
- break;
427
- case 2:
428
- message.salt = reader.bytes();
429
- break;
430
- case 3:
431
- message.logN = reader.uint32();
432
- break;
433
- case 4:
434
- message.r = reader.uint32();
435
- break;
436
- case 5:
437
- message.p = reader.uint32();
438
- break;
439
- case 6:
440
- message.dkLen = reader.uint32();
441
- break;
442
+ case 1: {
443
+ message.passwd = reader.bytes();
444
+ break;
445
+ }
446
+ case 2: {
447
+ message.salt = reader.bytes();
448
+ break;
449
+ }
450
+ case 3: {
451
+ message.logN = reader.uint32();
452
+ break;
453
+ }
454
+ case 4: {
455
+ message.r = reader.uint32();
456
+ break;
457
+ }
458
+ case 5: {
459
+ message.p = reader.uint32();
460
+ break;
461
+ }
462
+ case 6: {
463
+ message.dkLen = reader.uint32();
464
+ break;
465
+ }
442
466
  default:
443
467
  reader.skipType(tag & 7);
444
468
  break;
@@ -510,12 +534,12 @@ $root.cryptor = (function() {
510
534
  if (object.passwd != null)
511
535
  if (typeof object.passwd === "string")
512
536
  $util.base64.decode(object.passwd, message.passwd = $util.newBuffer($util.base64.length(object.passwd)), 0);
513
- else if (object.passwd.length)
537
+ else if (object.passwd.length >= 0)
514
538
  message.passwd = object.passwd;
515
539
  if (object.salt != null)
516
540
  if (typeof object.salt === "string")
517
541
  $util.base64.decode(object.salt, message.salt = $util.newBuffer($util.base64.length(object.salt)), 0);
518
- else if (object.salt.length)
542
+ else if (object.salt.length >= 0)
519
543
  message.salt = object.salt;
520
544
  if (object.logN != null)
521
545
  message.logN = object.logN >>> 0;
@@ -587,6 +611,21 @@ $root.cryptor = (function() {
587
611
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
588
612
  };
589
613
 
614
+ /**
615
+ * Gets the default type url for ScryptArgs
616
+ * @function getTypeUrl
617
+ * @memberof cryptor.Request.ScryptArgs
618
+ * @static
619
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
620
+ * @returns {string} The default type url
621
+ */
622
+ ScryptArgs.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
623
+ if (typeUrlPrefix === undefined) {
624
+ typeUrlPrefix = "type.googleapis.com";
625
+ }
626
+ return typeUrlPrefix + "/cryptor.Request.ScryptArgs";
627
+ };
628
+
590
629
  return ScryptArgs;
591
630
  })();
592
631
 
@@ -685,9 +724,10 @@ $root.cryptor = (function() {
685
724
  while (reader.pos < end) {
686
725
  var tag = reader.uint32();
687
726
  switch (tag >>> 3) {
688
- case 1:
689
- message.val = reader.bytes();
690
- break;
727
+ case 1: {
728
+ message.val = reader.bytes();
729
+ break;
730
+ }
691
731
  default:
692
732
  reader.skipType(tag & 7);
693
733
  break;
@@ -744,7 +784,7 @@ $root.cryptor = (function() {
744
784
  if (object.val != null)
745
785
  if (typeof object.val === "string")
746
786
  $util.base64.decode(object.val, message.val = $util.newBuffer($util.base64.length(object.val)), 0);
747
- else if (object.val.length)
787
+ else if (object.val.length >= 0)
748
788
  message.val = object.val;
749
789
  return message;
750
790
  };
@@ -786,6 +826,21 @@ $root.cryptor = (function() {
786
826
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
787
827
  };
788
828
 
829
+ /**
830
+ * Gets the default type url for BytesVal
831
+ * @function getTypeUrl
832
+ * @memberof cryptor.BytesVal
833
+ * @static
834
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
835
+ * @returns {string} The default type url
836
+ */
837
+ BytesVal.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
838
+ if (typeUrlPrefix === undefined) {
839
+ typeUrlPrefix = "type.googleapis.com";
840
+ }
841
+ return typeUrlPrefix + "/cryptor.BytesVal";
842
+ };
843
+
789
844
  return BytesVal;
790
845
  })();
791
846
 
@@ -903,15 +958,18 @@ $root.cryptor = (function() {
903
958
  while (reader.pos < end) {
904
959
  var tag = reader.uint32();
905
960
  switch (tag >>> 3) {
906
- case 1:
907
- message.res = $root.cryptor.BytesVal.decode(reader, reader.uint32());
908
- break;
909
- case 2:
910
- message.interim = $root.cryptor.BytesVal.decode(reader, reader.uint32());
911
- break;
912
- case 3:
913
- message.err = $root.cryptor.Reply.Error.decode(reader, reader.uint32());
914
- break;
961
+ case 1: {
962
+ message.res = $root.cryptor.BytesVal.decode(reader, reader.uint32());
963
+ break;
964
+ }
965
+ case 2: {
966
+ message.interim = $root.cryptor.BytesVal.decode(reader, reader.uint32());
967
+ break;
968
+ }
969
+ case 3: {
970
+ message.err = $root.cryptor.Reply.Error.decode(reader, reader.uint32());
971
+ break;
972
+ }
915
973
  default:
916
974
  reader.skipType(tag & 7);
917
975
  break;
@@ -1033,6 +1091,21 @@ $root.cryptor = (function() {
1033
1091
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1034
1092
  };
1035
1093
 
1094
+ /**
1095
+ * Gets the default type url for Reply
1096
+ * @function getTypeUrl
1097
+ * @memberof cryptor.Reply
1098
+ * @static
1099
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1100
+ * @returns {string} The default type url
1101
+ */
1102
+ Reply.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1103
+ if (typeUrlPrefix === undefined) {
1104
+ typeUrlPrefix = "type.googleapis.com";
1105
+ }
1106
+ return typeUrlPrefix + "/cryptor.Reply";
1107
+ };
1108
+
1036
1109
  Reply.Error = (function() {
1037
1110
 
1038
1111
  /**
@@ -1136,12 +1209,14 @@ $root.cryptor = (function() {
1136
1209
  while (reader.pos < end) {
1137
1210
  var tag = reader.uint32();
1138
1211
  switch (tag >>> 3) {
1139
- case 1:
1140
- message.condition = reader.string();
1141
- break;
1142
- case 2:
1143
- message.message = reader.string();
1144
- break;
1212
+ case 1: {
1213
+ message.condition = reader.string();
1214
+ break;
1215
+ }
1216
+ case 2: {
1217
+ message.message = reader.string();
1218
+ break;
1219
+ }
1145
1220
  default:
1146
1221
  reader.skipType(tag & 7);
1147
1222
  break;
@@ -1240,6 +1315,21 @@ $root.cryptor = (function() {
1240
1315
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1241
1316
  };
1242
1317
 
1318
+ /**
1319
+ * Gets the default type url for Error
1320
+ * @function getTypeUrl
1321
+ * @memberof cryptor.Reply.Error
1322
+ * @static
1323
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1324
+ * @returns {string} The default type url
1325
+ */
1326
+ Error.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1327
+ if (typeUrlPrefix === undefined) {
1328
+ typeUrlPrefix = "type.googleapis.com";
1329
+ }
1330
+ return typeUrlPrefix + "/cryptor.Reply.Error";
1331
+ };
1332
+
1243
1333
  return Error;
1244
1334
  })();
1245
1335
 
@@ -1338,9 +1428,10 @@ $root.cryptor = (function() {
1338
1428
  while (reader.pos < end) {
1339
1429
  var tag = reader.uint32();
1340
1430
  switch (tag >>> 3) {
1341
- case 1:
1342
- message.val = reader.bool();
1343
- break;
1431
+ case 1: {
1432
+ message.val = reader.bool();
1433
+ break;
1434
+ }
1344
1435
  default:
1345
1436
  reader.skipType(tag & 7);
1346
1437
  break;
@@ -1430,6 +1521,21 @@ $root.cryptor = (function() {
1430
1521
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1431
1522
  };
1432
1523
 
1524
+ /**
1525
+ * Gets the default type url for BoolVal
1526
+ * @function getTypeUrl
1527
+ * @memberof cryptor.BoolVal
1528
+ * @static
1529
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1530
+ * @returns {string} The default type url
1531
+ */
1532
+ BoolVal.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1533
+ if (typeUrlPrefix === undefined) {
1534
+ typeUrlPrefix = "type.googleapis.com";
1535
+ }
1536
+ return typeUrlPrefix + "/cryptor.BoolVal";
1537
+ };
1538
+
1433
1539
  return BoolVal;
1434
1540
  })();
1435
1541
 
@@ -1536,12 +1642,14 @@ $root.cryptor = (function() {
1536
1642
  while (reader.pos < end) {
1537
1643
  var tag = reader.uint32();
1538
1644
  switch (tag >>> 3) {
1539
- case 1:
1540
- message.skey = reader.bytes();
1541
- break;
1542
- case 2:
1543
- message.pkey = reader.bytes();
1544
- break;
1645
+ case 1: {
1646
+ message.skey = reader.bytes();
1647
+ break;
1648
+ }
1649
+ case 2: {
1650
+ message.pkey = reader.bytes();
1651
+ break;
1652
+ }
1545
1653
  default:
1546
1654
  reader.skipType(tag & 7);
1547
1655
  break;
@@ -1601,12 +1709,12 @@ $root.cryptor = (function() {
1601
1709
  if (object.skey != null)
1602
1710
  if (typeof object.skey === "string")
1603
1711
  $util.base64.decode(object.skey, message.skey = $util.newBuffer($util.base64.length(object.skey)), 0);
1604
- else if (object.skey.length)
1712
+ else if (object.skey.length >= 0)
1605
1713
  message.skey = object.skey;
1606
1714
  if (object.pkey != null)
1607
1715
  if (typeof object.pkey === "string")
1608
1716
  $util.base64.decode(object.pkey, message.pkey = $util.newBuffer($util.base64.length(object.pkey)), 0);
1609
- else if (object.pkey.length)
1717
+ else if (object.pkey.length >= 0)
1610
1718
  message.pkey = object.pkey;
1611
1719
  return message;
1612
1720
  };
@@ -1658,6 +1766,21 @@ $root.cryptor = (function() {
1658
1766
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1659
1767
  };
1660
1768
 
1769
+ /**
1770
+ * Gets the default type url for Keypair
1771
+ * @function getTypeUrl
1772
+ * @memberof cryptor.Keypair
1773
+ * @static
1774
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1775
+ * @returns {string} The default type url
1776
+ */
1777
+ Keypair.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1778
+ if (typeUrlPrefix === undefined) {
1779
+ typeUrlPrefix = "type.googleapis.com";
1780
+ }
1781
+ return typeUrlPrefix + "/cryptor.Keypair";
1782
+ };
1783
+
1661
1784
  return Keypair;
1662
1785
  })();
1663
1786