core-3nweb-client-lib 0.43.7 → 0.43.9

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 (39) hide show
  1. package/build/api-defs/files.d.ts +82 -4
  2. package/build/core/storage/synced/obj-files.d.ts +1 -0
  3. package/build/core/storage/synced/obj-files.js +16 -0
  4. package/build/core/storage/synced/obj-status.d.ts +1 -0
  5. package/build/core/storage/synced/obj-status.js +18 -0
  6. package/build/core/storage/synced/storage.d.ts +6 -2
  7. package/build/core/storage/synced/storage.js +12 -17
  8. package/build/core/storage/synced/upsyncer.d.ts +10 -1
  9. package/build/core/storage/synced/upsyncer.js +72 -9
  10. package/build/core-ipc/file.d.ts +27 -4
  11. package/build/core-ipc/file.js +90 -94
  12. package/build/core-ipc/fs.js +68 -132
  13. package/build/lib-client/fs-utils/files.js +6 -0
  14. package/build/lib-client/objs-on-disk/obj-on-disk.d.ts +1 -0
  15. package/build/lib-client/objs-on-disk/obj-on-disk.js +8 -1
  16. package/build/lib-client/xsp-fs/common.d.ts +13 -21
  17. package/build/lib-client/xsp-fs/common.js +4 -16
  18. package/build/lib-client/xsp-fs/file-node.d.ts +3 -2
  19. package/build/lib-client/xsp-fs/file-node.js +17 -11
  20. package/build/lib-client/xsp-fs/file.d.ts +5 -0
  21. package/build/lib-client/xsp-fs/file.js +26 -13
  22. package/build/lib-client/xsp-fs/folder-node.d.ts +7 -1
  23. package/build/lib-client/xsp-fs/folder-node.js +18 -10
  24. package/build/lib-client/xsp-fs/fs.d.ts +5 -0
  25. package/build/lib-client/xsp-fs/fs.js +33 -26
  26. package/build/lib-client/xsp-fs/link-node.d.ts +3 -0
  27. package/build/lib-client/xsp-fs/link-node.js +5 -1
  28. package/build/lib-client/xsp-fs/node-in-fs.d.ts +20 -6
  29. package/build/lib-client/xsp-fs/node-in-fs.js +69 -14
  30. package/build/lib-client/xsp-fs/node-persistence.d.ts +1 -0
  31. package/build/lib-client/xsp-fs/node-persistence.js +4 -0
  32. package/build/lib-common/big-endian.js +2 -2
  33. package/build/lib-common/processes/labelled-exec-pools.js +1 -3
  34. package/build/protos/asmail.proto.js +1614 -1588
  35. package/build/protos/file.proto.js +1258 -541
  36. package/build/protos/fs.proto.js +1459 -1433
  37. package/package.json +4 -4
  38. package/protos/file.proto +31 -15
  39. package/protos/fs.proto +13 -22
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core-3nweb-client-lib",
3
- "version": "0.43.7",
3
+ "version": "0.43.9",
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",
@@ -36,10 +36,10 @@
36
36
  "xsp-files": "^4.2.1"
37
37
  },
38
38
  "devDependencies": {
39
- "@types/jasmine": "^3.9.1",
40
- "@types/node": "^16.11.7",
39
+ "@types/jasmine": "^5.1.13",
40
+ "@types/node": "^22.13.14",
41
41
  "@types/ws": "^8.18.1",
42
- "jasmine": "^3.9.0",
42
+ "jasmine": "^5.13.0",
43
43
  "protobufjs-cli": "^1.0.2",
44
44
  "spec-3nweb-server": "^1.8.0",
45
45
  "tsuml2": "^0.17.1",
package/protos/file.proto CHANGED
@@ -33,9 +33,9 @@ message SyncVersionsBranchMsg {
33
33
  }
34
34
 
35
35
  message UploadingStateMsg {
36
- common.UInt64Value local_version = 1;
37
- common.UInt64Value remote_version = 2;
38
- common.UInt64Value bytes_left_to_upload = 3;
36
+ uint64 local_version = 1;
37
+ uint64 remote_version = 2;
38
+ uint64 bytes_left_to_upload = 3;
39
39
  bool upload_started = 4;
40
40
  }
41
41
 
@@ -53,7 +53,8 @@ message StatsMsg {
53
53
  common.UInt64Value mtime = 6;
54
54
  common.UInt64Value ctime = 7;
55
55
  common.UInt64Value version = 8;
56
- SyncStatusMsg sync = 9;
56
+ common.UInt64Value bytes_need_download = 9;
57
+ common.StringValue version_sync_branch = 10;
57
58
  }
58
59
 
59
60
  // --- ReadonlyFile.getXAttr ---
@@ -95,16 +96,7 @@ message ReadBytesReplyBody {
95
96
 
96
97
  // --- ReadonlyFile.watch ---
97
98
  // Its an observable call, and initial request is empty.
98
- // Observer expects FileEvent in next.
99
-
100
- message FileEventMsg {
101
- string type = 1;
102
- string path = 2;
103
- common.StringValue src = 3;
104
- common.UInt64Value new_version = 4;
105
- common.UInt64Value removed_arch_ver = 5;
106
- common.UInt64Value archived_version = 6;
107
- }
99
+ // Observer expects common.StringValue in next.
108
100
 
109
101
 
110
102
  // ==== ReadonlyFileVersionedAPI referable object ====
@@ -118,6 +110,10 @@ message RequestWithVersionedReadFlags {
118
110
  VersionedReadFlags flags = 1;
119
111
  }
120
112
 
113
+ // --- ReadonlyFileVersionedAPI.stat ---
114
+ // Request body is RequestWithVersionedReadFlags
115
+ // Reply body is StatsMsg
116
+
121
117
  // --- ReadonlyFileVersionedAPI.getXAttr ---
122
118
  message VersionedGetXAttrRequestBody {
123
119
  string xa_name = 1;
@@ -305,7 +301,6 @@ message OptionsToAdopteRemote {
305
301
  // ==== WritableFileSyncAPI referable object ====
306
302
 
307
303
  // --- WritableFileSyncAPI.upload ---
308
- // Reply body is common.UInt64Value
309
304
  message FileSyncUploadRequestBody {
310
305
  OptionsToUploadLocal opts = 1;
311
306
  }
@@ -313,7 +308,28 @@ message FileSyncUploadReplyBody {
313
308
  common.UInt64Value uploaded_version = 1;
314
309
  }
315
310
 
311
+ // --- WritableFileSyncAPI.startUpload ---
312
+ // Request body is FileSyncUploadRequestBody
313
+ message FileSyncStartUploadReplyBody {
314
+ message UploadInfo {
315
+ uint64 upload_version = 1;
316
+ uint64 upload_task_id = 2;
317
+ }
318
+ UploadInfo started_upload = 1;
319
+ }
320
+
316
321
  message OptionsToUploadLocal {
317
322
  common.UInt64Value local_version = 1;
318
323
  common.UInt64Value upload_version = 2;
319
324
  }
325
+
326
+ // --- WritableFileSyncAPI.watchUpload ---
327
+ message WatchUploadRequestBody {
328
+ uint64 upload_task_id = 1;
329
+ }
330
+ message UploadEventMsg {
331
+ string type = 1;
332
+ uint64 upload_task_id = 2;
333
+ uint64 local_version = 3;
334
+ uint64 upload_version = 4;
335
+ }
package/protos/fs.proto CHANGED
@@ -39,7 +39,7 @@ message CheckPresenceRequestBody {
39
39
 
40
40
  // --- ReadonlyFS.stat ---
41
41
  // Request body is PathOnlyRequestBody
42
- // Reply body is File.Stats
42
+ // Reply body is file.StatsMsg
43
43
 
44
44
  message PathOnlyRequestBody {
45
45
  string path = 1;
@@ -74,29 +74,15 @@ message SymLinkTargetReplyBody {
74
74
 
75
75
  // --- ReadonlyFS.watchFolder ---
76
76
  // Its an observable call, and initial request is PathOnlyRequestBody
77
- // Observer expects FSEventMsg in next.
78
-
79
- message FSEventMsg {
80
- string type = 1;
81
- string path = 2;
82
- common.StringValue src = 3;
83
- common.UInt64Value new_version = 4;
84
- common.StringValue name = 5;
85
- common.StringValue old_name = 6;
86
- common.StringValue new_name = 7;
87
- ListingEntryMsg entry = 8;
88
- common.UInt64Value move_label = 9;
89
- common.UInt64Value removed_arch_ver = 10;
90
- common.UInt64Value archived_version = 11;
91
- }
77
+ // Observer expects common.StringValue in next.
92
78
 
93
79
  // --- ReadonlyFS.watchFile ---
94
80
  // Its an observable call, and initial request is PathOnlyRequestBody
95
- // Observer expects FSEventMsg in next.
81
+ // Observer expects common.StringValue in next.
96
82
 
97
83
  // --- ReadonlyFS.watchTree ---
98
84
  // Its an observable call, and initial request is PathOnlyRequestBody
99
- // Observer expects FSEventMsg in next.
85
+ // Observer expects common.StringValue in next.
100
86
  message WatchTreeRequestBody {
101
87
  string path = 1;
102
88
  common.UInt32Value depth = 2;
@@ -230,6 +216,10 @@ message CollectionEvent {
230
216
 
231
217
  // ==== ReadonlyFSVersionedAPI referable object ====
232
218
 
219
+ // --- ReadonlyFSVersionedAPI.stat ---
220
+ // Request body is PathAndFlagsRequestBody
221
+ // Reply body is file.StatsMsg
222
+
233
223
  // --- ReadonlyFSVersionedAPI.getXAttr ---
234
224
  message VersionedGetXAttrRequestBody {
235
225
  string path = 1;
@@ -526,14 +516,15 @@ message FolderDiff {
526
516
  // ==== WritableFSSyncAPI referable object ====
527
517
 
528
518
  // --- WritableFSSyncAPI.upload ---
529
- // Reply body is common.UInt64Value
519
+ // Reply body is file.FileSyncUploadReplyBody
530
520
  message FSSyncUploadRequestBody {
531
521
  string path = 1;
532
522
  file.OptionsToUploadLocal opts = 2;
533
523
  }
534
- message FSSyncUploadReplyBody {
535
- common.UInt64Value uploaded_version = 1;
536
- }
524
+
525
+ // --- WritableFSSyncAPI.startUpload ---
526
+ // Request body is FSSyncUploadRequestBody
527
+ // Reply body is file.FileSyncStartUploadReplyBody
537
528
 
538
529
  // --- WritableFSSyncAPI.adoptRemoteFolderItem ---
539
530
  message AdoptRemoteFolderItemRequestBody {