core-3nweb-client-lib 0.27.3 → 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 (102) hide show
  1. package/build/api-defs/files.d.ts +92 -29
  2. package/build/core/asmail/config/index.d.ts +2 -2
  3. package/build/core/asmail/config/index.js +2 -2
  4. package/build/core/asmail/config/invitations-anon.d.ts +10 -24
  5. package/build/core/asmail/config/invitations-anon.js +43 -31
  6. package/build/core/asmail/config/published-intro-key.d.ts +11 -22
  7. package/build/core/asmail/config/published-intro-key.js +47 -38
  8. package/build/core/asmail/delivery/per-recipient-wip.js +2 -2
  9. package/build/core/asmail/inbox/inbox-events.js +10 -5
  10. package/build/core/asmail/inbox/index.d.ts +3 -2
  11. package/build/core/asmail/inbox/index.js +15 -11
  12. package/build/core/asmail/inbox/msg-indexing.d.ts +17 -64
  13. package/build/core/asmail/inbox/msg-indexing.js +440 -311
  14. package/build/core/asmail/inbox/msg-on-disk.js +2 -1
  15. package/build/core/asmail/index.d.ts +1 -1
  16. package/build/core/asmail/index.js +5 -4
  17. package/build/core/asmail/keyring/correspondent-keys.d.ts +2 -2
  18. package/build/core/asmail/keyring/correspondent-keys.js +4 -2
  19. package/build/core/asmail/keyring/index.d.ts +10 -33
  20. package/build/core/asmail/keyring/index.js +88 -75
  21. package/build/core/asmail/msg/opener.js +4 -3
  22. package/build/core/asmail/msg/packer.d.ts +1 -0
  23. package/build/core/asmail/msg/packer.js +8 -4
  24. package/build/core/index.js +3 -5
  25. package/build/core/sign-in.js +1 -1
  26. package/build/core/storage/local/obj-files.js +2 -1
  27. package/build/core/storage/synced/obj-files.d.ts +2 -0
  28. package/build/core/storage/synced/obj-files.js +18 -1
  29. package/build/core/storage/synced/obj-status.d.ts +1 -0
  30. package/build/core/storage/synced/obj-status.js +10 -0
  31. package/build/core/storage/synced/storage.js +7 -23
  32. package/build/core/storage/synced/upload-header-file.js +4 -2
  33. package/build/core/storage/synced/upsyncer.js +3 -5
  34. package/build/ipc-via-protobuf/asmail-cap.js +14 -15
  35. package/build/ipc-via-protobuf/bytes.js +42 -18
  36. package/build/ipc-via-protobuf/file.d.ts +7 -0
  37. package/build/ipc-via-protobuf/file.js +103 -66
  38. package/build/ipc-via-protobuf/fs.js +127 -105
  39. package/build/ipc-via-protobuf/mailerid.js +2 -2
  40. package/build/ipc-via-protobuf/protobuf-msg.d.ts +1 -0
  41. package/build/ipc-via-protobuf/protobuf-msg.js +5 -1
  42. package/build/ipc-via-protobuf/startup-cap.js +8 -8
  43. package/build/ipc-via-protobuf/storage-cap.js +4 -4
  44. package/build/lib-client/3nstorage/xsp-fs/common.js +2 -0
  45. package/build/lib-client/3nstorage/xsp-fs/file-node.d.ts +5 -10
  46. package/build/lib-client/3nstorage/xsp-fs/file-node.js +26 -45
  47. package/build/lib-client/3nstorage/xsp-fs/file.d.ts +8 -7
  48. package/build/lib-client/3nstorage/xsp-fs/file.js +12 -18
  49. package/build/lib-client/3nstorage/xsp-fs/folder-node.d.ts +6 -1
  50. package/build/lib-client/3nstorage/xsp-fs/folder-node.js +20 -8
  51. package/build/lib-client/3nstorage/xsp-fs/fs.d.ts +19 -18
  52. package/build/lib-client/3nstorage/xsp-fs/fs.js +18 -19
  53. package/build/lib-client/3nstorage/xsp-fs/node-in-fs.d.ts +13 -4
  54. package/build/lib-client/3nstorage/xsp-fs/node-in-fs.js +63 -8
  55. package/build/lib-client/3nstorage/xsp-fs/node-persistence.d.ts +1 -0
  56. package/build/lib-client/3nstorage/xsp-fs/node-persistence.js +7 -5
  57. package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v1.js +3 -4
  58. package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v2.js +20 -15
  59. package/build/lib-client/cryptor/cryptor-in-worker.js +37 -47
  60. package/build/lib-client/cryptor/cryptor-wasm.js +1 -1
  61. package/build/lib-client/cryptor/cryptor.wasm +0 -0
  62. package/build/lib-client/cryptor/in-proc-js.js +15 -12
  63. package/build/lib-client/cryptor/in-proc-wasm.js +11 -8
  64. package/build/lib-client/cryptor/serialization-for-wasm.d.ts +36 -0
  65. package/build/lib-client/cryptor/serialization-for-wasm.js +58 -0
  66. package/build/lib-client/cryptor-work-labels.d.ts +26 -0
  67. package/build/lib-client/cryptor-work-labels.js +152 -0
  68. package/build/lib-client/fs-sync-utils.d.ts +7 -1
  69. package/build/lib-client/fs-sync-utils.js +18 -7
  70. package/build/lib-client/local-files/dev-file-src.d.ts +2 -1
  71. package/build/lib-client/local-files/dev-file-src.js +5 -1
  72. package/build/lib-client/local-files/device-fs.js +2 -1
  73. package/build/lib-client/objs-on-disk/obj-on-disk.d.ts +5 -2
  74. package/build/lib-client/objs-on-disk/obj-on-disk.js +21 -2
  75. package/build/lib-client/request-utils.js +14 -14
  76. package/build/lib-common/async-cryptor-wrap.d.ts +9 -9
  77. package/build/lib-common/async-cryptor-wrap.js +13 -13
  78. package/build/lib-common/byte-streaming/pipe.d.ts +1 -1
  79. package/build/lib-common/byte-streaming/pipe.js +3 -3
  80. package/build/lib-common/byte-streaming/wrapping.js +4 -2
  81. package/build/lib-common/json-utils.js +0 -3
  82. package/build/lib-common/objs-on-disk/file-layout.js +1 -1
  83. package/build/lib-common/processes/synced.js +0 -184
  84. package/build/lib-sqlite-on-3nstorage/index.d.ts +32 -0
  85. package/build/lib-sqlite-on-3nstorage/index.js +117 -0
  86. package/build/lib-sqlite-on-3nstorage/sqljs.d.ts +279 -0
  87. package/build/lib-sqlite-on-3nstorage/sqljs.js +223 -0
  88. package/build/protos/asmail.proto.js +10145 -5923
  89. package/build/protos/bytes.proto.js +731 -204
  90. package/build/protos/common.proto.js +192 -44
  91. package/build/protos/cryptor.proto.js +184 -61
  92. package/build/protos/file.proto.js +2388 -502
  93. package/build/protos/fs.proto.js +9894 -6046
  94. package/build/protos/ipc.proto.js +244 -61
  95. package/build/protos/logger.proto.js +219 -53
  96. package/build/protos/mailerid.proto.js +230 -50
  97. package/build/protos/startup.proto.js +341 -77
  98. package/build/protos/storage.proto.js +276 -62
  99. package/package.json +8 -7
  100. package/protos/bytes.proto +13 -4
  101. package/protos/file.proto +27 -8
  102. package/protos/fs.proto +31 -14
@@ -110,9 +110,10 @@ $root.storage = (function() {
110
110
  while (reader.pos < end) {
111
111
  var tag = reader.uint32();
112
112
  switch (tag >>> 3) {
113
- case 1:
114
- message.appName = $root.common.StringValue.decode(reader, reader.uint32());
115
- break;
113
+ case 1: {
114
+ message.appName = $root.common.StringValue.decode(reader, reader.uint32());
115
+ break;
116
+ }
116
117
  default:
117
118
  reader.skipType(tag & 7);
118
119
  break;
@@ -207,6 +208,21 @@ $root.storage = (function() {
207
208
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
208
209
  };
209
210
 
211
+ /**
212
+ * Gets the default type url for GetAppLocalFSRequestBody
213
+ * @function getTypeUrl
214
+ * @memberof storage.GetAppLocalFSRequestBody
215
+ * @static
216
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
217
+ * @returns {string} The default type url
218
+ */
219
+ GetAppLocalFSRequestBody.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
220
+ if (typeUrlPrefix === undefined) {
221
+ typeUrlPrefix = "type.googleapis.com";
222
+ }
223
+ return typeUrlPrefix + "/storage.GetAppLocalFSRequestBody";
224
+ };
225
+
210
226
  return GetAppLocalFSRequestBody;
211
227
  })();
212
228
 
@@ -302,9 +318,10 @@ $root.storage = (function() {
302
318
  while (reader.pos < end) {
303
319
  var tag = reader.uint32();
304
320
  switch (tag >>> 3) {
305
- case 1:
306
- message.appName = $root.common.StringValue.decode(reader, reader.uint32());
307
- break;
321
+ case 1: {
322
+ message.appName = $root.common.StringValue.decode(reader, reader.uint32());
323
+ break;
324
+ }
308
325
  default:
309
326
  reader.skipType(tag & 7);
310
327
  break;
@@ -399,6 +416,21 @@ $root.storage = (function() {
399
416
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
400
417
  };
401
418
 
419
+ /**
420
+ * Gets the default type url for GetAppSyncedFSRequestBody
421
+ * @function getTypeUrl
422
+ * @memberof storage.GetAppSyncedFSRequestBody
423
+ * @static
424
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
425
+ * @returns {string} The default type url
426
+ */
427
+ GetAppSyncedFSRequestBody.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
428
+ if (typeUrlPrefix === undefined) {
429
+ typeUrlPrefix = "type.googleapis.com";
430
+ }
431
+ return typeUrlPrefix + "/storage.GetAppSyncedFSRequestBody";
432
+ };
433
+
402
434
  return GetAppSyncedFSRequestBody;
403
435
  })();
404
436
 
@@ -505,12 +537,14 @@ $root.storage = (function() {
505
537
  while (reader.pos < end) {
506
538
  var tag = reader.uint32();
507
539
  switch (tag >>> 3) {
508
- case 1:
509
- message.type = reader.string();
510
- break;
511
- case 2:
512
- message.path = $root.common.StringValue.decode(reader, reader.uint32());
513
- break;
540
+ case 1: {
541
+ message.type = reader.string();
542
+ break;
543
+ }
544
+ case 2: {
545
+ message.path = $root.common.StringValue.decode(reader, reader.uint32());
546
+ break;
547
+ }
514
548
  default:
515
549
  reader.skipType(tag & 7);
516
550
  break;
@@ -614,6 +648,21 @@ $root.storage = (function() {
614
648
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
615
649
  };
616
650
 
651
+ /**
652
+ * Gets the default type url for GetUserFSRequestBody
653
+ * @function getTypeUrl
654
+ * @memberof storage.GetUserFSRequestBody
655
+ * @static
656
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
657
+ * @returns {string} The default type url
658
+ */
659
+ GetUserFSRequestBody.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
660
+ if (typeUrlPrefix === undefined) {
661
+ typeUrlPrefix = "type.googleapis.com";
662
+ }
663
+ return typeUrlPrefix + "/storage.GetUserFSRequestBody";
664
+ };
665
+
617
666
  return GetUserFSRequestBody;
618
667
  })();
619
668
 
@@ -720,12 +769,14 @@ $root.storage = (function() {
720
769
  while (reader.pos < end) {
721
770
  var tag = reader.uint32();
722
771
  switch (tag >>> 3) {
723
- case 1:
724
- message.type = reader.string();
725
- break;
726
- case 2:
727
- message.path = $root.common.StringValue.decode(reader, reader.uint32());
728
- break;
772
+ case 1: {
773
+ message.type = reader.string();
774
+ break;
775
+ }
776
+ case 2: {
777
+ message.path = $root.common.StringValue.decode(reader, reader.uint32());
778
+ break;
779
+ }
729
780
  default:
730
781
  reader.skipType(tag & 7);
731
782
  break;
@@ -829,6 +880,21 @@ $root.storage = (function() {
829
880
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
830
881
  };
831
882
 
883
+ /**
884
+ * Gets the default type url for GetSysFSRequestBody
885
+ * @function getTypeUrl
886
+ * @memberof storage.GetSysFSRequestBody
887
+ * @static
888
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
889
+ * @returns {string} The default type url
890
+ */
891
+ GetSysFSRequestBody.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
892
+ if (typeUrlPrefix === undefined) {
893
+ typeUrlPrefix = "type.googleapis.com";
894
+ }
895
+ return typeUrlPrefix + "/storage.GetSysFSRequestBody";
896
+ };
897
+
832
898
  return GetSysFSRequestBody;
833
899
  })();
834
900
 
@@ -949,14 +1015,16 @@ $root.common = (function() {
949
1015
  while (reader.pos < end) {
950
1016
  var tag = reader.uint32();
951
1017
  switch (tag >>> 3) {
952
- case 1:
953
- message.objType = reader.string();
954
- break;
955
- case 2:
956
- if (!(message.path && message.path.length))
957
- message.path = [];
958
- message.path.push(reader.string());
959
- break;
1018
+ case 1: {
1019
+ message.objType = reader.string();
1020
+ break;
1021
+ }
1022
+ case 2: {
1023
+ if (!(message.path && message.path.length))
1024
+ message.path = [];
1025
+ message.path.push(reader.string());
1026
+ break;
1027
+ }
960
1028
  default:
961
1029
  reader.skipType(tag & 7);
962
1030
  break;
@@ -1067,6 +1135,21 @@ $root.common = (function() {
1067
1135
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1068
1136
  };
1069
1137
 
1138
+ /**
1139
+ * Gets the default type url for ObjectReference
1140
+ * @function getTypeUrl
1141
+ * @memberof common.ObjectReference
1142
+ * @static
1143
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1144
+ * @returns {string} The default type url
1145
+ */
1146
+ ObjectReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1147
+ if (typeUrlPrefix === undefined) {
1148
+ typeUrlPrefix = "type.googleapis.com";
1149
+ }
1150
+ return typeUrlPrefix + "/common.ObjectReference";
1151
+ };
1152
+
1070
1153
  return ObjectReference;
1071
1154
  })();
1072
1155
 
@@ -1162,9 +1245,10 @@ $root.common = (function() {
1162
1245
  while (reader.pos < end) {
1163
1246
  var tag = reader.uint32();
1164
1247
  switch (tag >>> 3) {
1165
- case 1:
1166
- message.value = reader.bool();
1167
- break;
1248
+ case 1: {
1249
+ message.value = reader.bool();
1250
+ break;
1251
+ }
1168
1252
  default:
1169
1253
  reader.skipType(tag & 7);
1170
1254
  break;
@@ -1254,6 +1338,21 @@ $root.common = (function() {
1254
1338
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1255
1339
  };
1256
1340
 
1341
+ /**
1342
+ * Gets the default type url for BooleanValue
1343
+ * @function getTypeUrl
1344
+ * @memberof common.BooleanValue
1345
+ * @static
1346
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1347
+ * @returns {string} The default type url
1348
+ */
1349
+ BooleanValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1350
+ if (typeUrlPrefix === undefined) {
1351
+ typeUrlPrefix = "type.googleapis.com";
1352
+ }
1353
+ return typeUrlPrefix + "/common.BooleanValue";
1354
+ };
1355
+
1257
1356
  return BooleanValue;
1258
1357
  })();
1259
1358
 
@@ -1351,11 +1450,12 @@ $root.common = (function() {
1351
1450
  while (reader.pos < end) {
1352
1451
  var tag = reader.uint32();
1353
1452
  switch (tag >>> 3) {
1354
- case 1:
1355
- if (!(message.values && message.values.length))
1356
- message.values = [];
1357
- message.values.push(reader.string());
1358
- break;
1453
+ case 1: {
1454
+ if (!(message.values && message.values.length))
1455
+ message.values = [];
1456
+ message.values.push(reader.string());
1457
+ break;
1458
+ }
1359
1459
  default:
1360
1460
  reader.skipType(tag & 7);
1361
1461
  break;
@@ -1457,6 +1557,21 @@ $root.common = (function() {
1457
1557
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1458
1558
  };
1459
1559
 
1560
+ /**
1561
+ * Gets the default type url for StringArrayValue
1562
+ * @function getTypeUrl
1563
+ * @memberof common.StringArrayValue
1564
+ * @static
1565
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1566
+ * @returns {string} The default type url
1567
+ */
1568
+ StringArrayValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1569
+ if (typeUrlPrefix === undefined) {
1570
+ typeUrlPrefix = "type.googleapis.com";
1571
+ }
1572
+ return typeUrlPrefix + "/common.StringArrayValue";
1573
+ };
1574
+
1460
1575
  return StringArrayValue;
1461
1576
  })();
1462
1577
 
@@ -1552,9 +1667,10 @@ $root.common = (function() {
1552
1667
  while (reader.pos < end) {
1553
1668
  var tag = reader.uint32();
1554
1669
  switch (tag >>> 3) {
1555
- case 1:
1556
- message.value = reader.uint64();
1557
- break;
1670
+ case 1: {
1671
+ message.value = reader.uint64();
1672
+ break;
1673
+ }
1558
1674
  default:
1559
1675
  reader.skipType(tag & 7);
1560
1676
  break;
@@ -1658,6 +1774,21 @@ $root.common = (function() {
1658
1774
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1659
1775
  };
1660
1776
 
1777
+ /**
1778
+ * Gets the default type url for UInt64Value
1779
+ * @function getTypeUrl
1780
+ * @memberof common.UInt64Value
1781
+ * @static
1782
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1783
+ * @returns {string} The default type url
1784
+ */
1785
+ UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1786
+ if (typeUrlPrefix === undefined) {
1787
+ typeUrlPrefix = "type.googleapis.com";
1788
+ }
1789
+ return typeUrlPrefix + "/common.UInt64Value";
1790
+ };
1791
+
1661
1792
  return UInt64Value;
1662
1793
  })();
1663
1794
 
@@ -1753,9 +1884,10 @@ $root.common = (function() {
1753
1884
  while (reader.pos < end) {
1754
1885
  var tag = reader.uint32();
1755
1886
  switch (tag >>> 3) {
1756
- case 1:
1757
- message.value = reader.uint32();
1758
- break;
1887
+ case 1: {
1888
+ message.value = reader.uint32();
1889
+ break;
1890
+ }
1759
1891
  default:
1760
1892
  reader.skipType(tag & 7);
1761
1893
  break;
@@ -1845,6 +1977,21 @@ $root.common = (function() {
1845
1977
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1846
1978
  };
1847
1979
 
1980
+ /**
1981
+ * Gets the default type url for UInt32Value
1982
+ * @function getTypeUrl
1983
+ * @memberof common.UInt32Value
1984
+ * @static
1985
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1986
+ * @returns {string} The default type url
1987
+ */
1988
+ UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1989
+ if (typeUrlPrefix === undefined) {
1990
+ typeUrlPrefix = "type.googleapis.com";
1991
+ }
1992
+ return typeUrlPrefix + "/common.UInt32Value";
1993
+ };
1994
+
1848
1995
  return UInt32Value;
1849
1996
  })();
1850
1997
 
@@ -1940,9 +2087,10 @@ $root.common = (function() {
1940
2087
  while (reader.pos < end) {
1941
2088
  var tag = reader.uint32();
1942
2089
  switch (tag >>> 3) {
1943
- case 1:
1944
- message.value = reader.string();
1945
- break;
2090
+ case 1: {
2091
+ message.value = reader.string();
2092
+ break;
2093
+ }
1946
2094
  default:
1947
2095
  reader.skipType(tag & 7);
1948
2096
  break;
@@ -2032,6 +2180,21 @@ $root.common = (function() {
2032
2180
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2033
2181
  };
2034
2182
 
2183
+ /**
2184
+ * Gets the default type url for StringValue
2185
+ * @function getTypeUrl
2186
+ * @memberof common.StringValue
2187
+ * @static
2188
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
2189
+ * @returns {string} The default type url
2190
+ */
2191
+ StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
2192
+ if (typeUrlPrefix === undefined) {
2193
+ typeUrlPrefix = "type.googleapis.com";
2194
+ }
2195
+ return typeUrlPrefix + "/common.StringValue";
2196
+ };
2197
+
2035
2198
  return StringValue;
2036
2199
  })();
2037
2200
 
@@ -2127,9 +2290,10 @@ $root.common = (function() {
2127
2290
  while (reader.pos < end) {
2128
2291
  var tag = reader.uint32();
2129
2292
  switch (tag >>> 3) {
2130
- case 1:
2131
- message.value = reader.bytes();
2132
- break;
2293
+ case 1: {
2294
+ message.value = reader.bytes();
2295
+ break;
2296
+ }
2133
2297
  default:
2134
2298
  reader.skipType(tag & 7);
2135
2299
  break;
@@ -2186,7 +2350,7 @@ $root.common = (function() {
2186
2350
  if (object.value != null)
2187
2351
  if (typeof object.value === "string")
2188
2352
  $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0);
2189
- else if (object.value.length)
2353
+ else if (object.value.length >= 0)
2190
2354
  message.value = object.value;
2191
2355
  return message;
2192
2356
  };
@@ -2228,6 +2392,21 @@ $root.common = (function() {
2228
2392
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2229
2393
  };
2230
2394
 
2395
+ /**
2396
+ * Gets the default type url for BytesValue
2397
+ * @function getTypeUrl
2398
+ * @memberof common.BytesValue
2399
+ * @static
2400
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
2401
+ * @returns {string} The default type url
2402
+ */
2403
+ BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
2404
+ if (typeUrlPrefix === undefined) {
2405
+ typeUrlPrefix = "type.googleapis.com";
2406
+ }
2407
+ return typeUrlPrefix + "/common.BytesValue";
2408
+ };
2409
+
2231
2410
  return BytesValue;
2232
2411
  })();
2233
2412
 
@@ -2334,12 +2513,14 @@ $root.common = (function() {
2334
2513
  while (reader.pos < end) {
2335
2514
  var tag = reader.uint32();
2336
2515
  switch (tag >>> 3) {
2337
- case 1:
2338
- message.runtimeExcJson = reader.string();
2339
- break;
2340
- case 2:
2341
- message.err = reader.string();
2342
- break;
2516
+ case 1: {
2517
+ message.runtimeExcJson = reader.string();
2518
+ break;
2519
+ }
2520
+ case 2: {
2521
+ message.err = reader.string();
2522
+ break;
2523
+ }
2343
2524
  default:
2344
2525
  reader.skipType(tag & 7);
2345
2526
  break;
@@ -2438,6 +2619,21 @@ $root.common = (function() {
2438
2619
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2439
2620
  };
2440
2621
 
2622
+ /**
2623
+ * Gets the default type url for ErrorValue
2624
+ * @function getTypeUrl
2625
+ * @memberof common.ErrorValue
2626
+ * @static
2627
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
2628
+ * @returns {string} The default type url
2629
+ */
2630
+ ErrorValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
2631
+ if (typeUrlPrefix === undefined) {
2632
+ typeUrlPrefix = "type.googleapis.com";
2633
+ }
2634
+ return typeUrlPrefix + "/common.ErrorValue";
2635
+ };
2636
+
2441
2637
  return ErrorValue;
2442
2638
  })();
2443
2639
 
@@ -2555,15 +2751,18 @@ $root.common = (function() {
2555
2751
  while (reader.pos < end) {
2556
2752
  var tag = reader.uint32();
2557
2753
  switch (tag >>> 3) {
2558
- case 1:
2559
- message.type = reader.string();
2560
- break;
2561
- case 2:
2562
- message.json = $root.common.StringValue.decode(reader, reader.uint32());
2563
- break;
2564
- case 3:
2565
- message.bytes = $root.common.BytesValue.decode(reader, reader.uint32());
2566
- break;
2754
+ case 1: {
2755
+ message.type = reader.string();
2756
+ break;
2757
+ }
2758
+ case 2: {
2759
+ message.json = $root.common.StringValue.decode(reader, reader.uint32());
2760
+ break;
2761
+ }
2762
+ case 3: {
2763
+ message.bytes = $root.common.BytesValue.decode(reader, reader.uint32());
2764
+ break;
2765
+ }
2567
2766
  default:
2568
2767
  reader.skipType(tag & 7);
2569
2768
  break;
@@ -2680,6 +2879,21 @@ $root.common = (function() {
2680
2879
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2681
2880
  };
2682
2881
 
2882
+ /**
2883
+ * Gets the default type url for AnyValue
2884
+ * @function getTypeUrl
2885
+ * @memberof common.AnyValue
2886
+ * @static
2887
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
2888
+ * @returns {string} The default type url
2889
+ */
2890
+ AnyValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
2891
+ if (typeUrlPrefix === undefined) {
2892
+ typeUrlPrefix = "type.googleapis.com";
2893
+ }
2894
+ return typeUrlPrefix + "/common.AnyValue";
2895
+ };
2896
+
2683
2897
  return AnyValue;
2684
2898
  })();
2685
2899
 
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "core-3nweb-client-lib",
3
- "version": "0.27.3",
3
+ "version": "0.27.5",
4
4
  "description": "3NWeb client core library, embeddable into different environments",
5
5
  "main": "build/lib-index.js",
6
6
  "types": "build/lib-index.d.ts",
7
7
  "scripts": {
8
- "build": "bash packing/protos-to-node-module.sh && tsc -p ts-code && bash packing/copy-api.sh && bash packing/build-wasm-cryptor.sh",
9
- "build-only-ts": "tsc -p ts-code",
8
+ "build-only-ts": "tsc -p ts-code && bash -c 'cp -rf ts-code/lib-sqlite-on-3nstorage/sqljs.* build/lib-sqlite-on-3nstorage/' ",
9
+ "build": "bash packing/protos-to-node-module.sh && npm run build-only-ts && bash packing/copy-api.sh && bash packing/build-wasm-cryptor.sh",
10
10
  "test": "node build/tests/jasmine.js"
11
11
  },
12
12
  "repository": {
@@ -28,19 +28,20 @@
28
28
  "license": "GPL-3.0-or-later",
29
29
  "dependencies": {
30
30
  "ecma-nacl": "^2.5.1",
31
- "protobufjs": "^6.11.3",
31
+ "protobufjs": "^7.0.1",
32
32
  "punycode": "^2.1.1",
33
- "rxjs": "^6.5.2",
34
- "tsuml2": "^0.6.1",
33
+ "rxjs": "^7.5.7",
35
34
  "ws": "^7.4.6",
36
- "xsp-files": "^4.0.0"
35
+ "xsp-files": "^4.2.1"
37
36
  },
38
37
  "devDependencies": {
39
38
  "@types/jasmine": "^3.9.1",
40
39
  "@types/node": "^16.11.7",
41
40
  "@types/ws": "^7.4.7",
42
41
  "jasmine": "^3.9.0",
42
+ "protobufjs-cli": "^1.0.2",
43
43
  "spec-3nweb-server": "^1.6.3",
44
+ "tsuml2": "^0.6.1",
44
45
  "typescript": "^4.7.4"
45
46
  }
46
47
  }
@@ -47,14 +47,23 @@ message DoneRequestBody {
47
47
 
48
48
  // ==== FileByteSource referable object ====
49
49
 
50
- // --- FileByteSource.read ---
51
- message ReadRequestBody {
52
- common.UInt64Value len = 1;
53
- }
54
50
  message ReadReplyBody {
55
51
  common.BytesValue bytes = 1;
56
52
  }
57
53
 
54
+ // --- FileByteSource.readNext ---
55
+ // Reply body is ReadReplyBody
56
+ message ReadNextRequestBody {
57
+ common.UInt64Value len = 1;
58
+ }
59
+
60
+ // --- FileByteSource.readAt ---
61
+ // Reply body is ReadReplyBody
62
+ message ReadAtRequestBody {
63
+ uint64 pos = 1;
64
+ common.UInt64Value len = 2;
65
+ }
66
+
58
67
  // --- FileByteSource.getSize ---
59
68
  // Request body is empty
60
69
  // Reply body is common.UInt64Value
package/protos/file.proto CHANGED
@@ -102,8 +102,20 @@ message FileEventMsg {
102
102
 
103
103
  // ==== ReadonlyFileVersionedAPI referable object ====
104
104
 
105
+ message VersionedReadFlags {
106
+ common.UInt64Value archived_version = 1;
107
+ common.UInt64Value remote_version = 2;
108
+ }
109
+
110
+ message RequestWithVersionedReadFlags {
111
+ VersionedReadFlags flags = 1;
112
+ }
113
+
105
114
  // --- ReadonlyFileVersionedAPI.getXAttr ---
106
- // Request body is GetXAttrRequestBody
115
+ message VersionedGetXAttrRequestBody {
116
+ string xa_name = 1;
117
+ VersionedReadFlags flags = 2;
118
+ }
107
119
  message VersionedGetXAttrReplyBody {
108
120
  uint64 version = 1;
109
121
  common.StringValue str = 2;
@@ -112,35 +124,39 @@ message VersionedGetXAttrReplyBody {
112
124
  }
113
125
 
114
126
  // --- ReadonlyFileVersionedAPI.listXAttrs ---
115
- // Request body is empty
127
+ // Request body is RequestWithVersionedReadFlags
116
128
  message VersionedListXAttrsReplyBody {
117
129
  uint64 version = 1;
118
130
  repeated string xa_names = 2;
119
131
  }
120
132
 
121
133
  // --- ReadonlyFileVersionedAPI.readBytes ---
122
- // Request body is ReadBytesRequestBody
134
+ message VersionedReadBytesRequestBody {
135
+ common.UInt64Value start = 1;
136
+ common.UInt64Value end = 2;
137
+ VersionedReadFlags flags = 10;
138
+ }
123
139
  message VersionedReadBytesReplyBody {
124
140
  uint64 version = 1;
125
141
  common.BytesValue bytes = 2;
126
142
  }
127
143
 
128
144
  // --- ReadonlyFileVersionedAPI.readTxt ---
129
- // Request body is empty
145
+ // Request body is RequestWithVersionedReadFlags
130
146
  message VersionedReadTxtReplyBody {
131
147
  uint64 version = 1;
132
148
  string txt = 2;
133
149
  }
134
150
 
135
151
  // --- ReadonlyFileVersionedAPI.readJSON ---
136
- // Request body is empty
152
+ // Request body is RequestWithVersionedReadFlags
137
153
  message VersionedReadJsonReplyBody {
138
154
  uint64 version = 1;
139
155
  string json = 2;
140
156
  }
141
157
 
142
158
  // --- ReadonlyFileVersionedAPI.getByteSource ---
143
- // Request body is empty
159
+ // Request body is RequestWithVersionedReadFlags
144
160
  message VersionedGetByteSourceReplyBody {
145
161
  uint64 version = 1;
146
162
  // src is a reference to FileByteSource
@@ -148,7 +164,7 @@ message VersionedGetByteSourceReplyBody {
148
164
  }
149
165
 
150
166
  // --- ReadonlyFileVersionedAPI.listVersions ---
151
- // Request body is empty
167
+ // Request body is RequestWithVersionedReadFlags
152
168
  message ListVersionsReplyBody {
153
169
  common.UInt64Value current = 1;
154
170
  repeated uint64 archived = 2;
@@ -286,10 +302,13 @@ message OptionsToAdopteRemote {
286
302
  // ==== WritableFileSyncAPI referable object ====
287
303
 
288
304
  // --- WritableFileSyncAPI.upload ---
289
- // Reply has only status and body is empty
305
+ // Reply body is common.UInt64Value
290
306
  message FileSyncUploadRequestBody {
291
307
  OptionsToUploadLocal opts = 1;
292
308
  }
309
+ message FileSyncUploadReplyBody {
310
+ common.UInt64Value uploaded_version = 1;
311
+ }
293
312
 
294
313
  message OptionsToUploadLocal {
295
314
  common.UInt64Value local_version = 1;