core-3nweb-client-lib 0.43.8 → 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 (34) hide show
  1. package/build/api-defs/files.d.ts +68 -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 +23 -4
  11. package/build/core-ipc/file.js +56 -80
  12. package/build/core-ipc/fs.js +46 -132
  13. package/build/lib-client/fs-utils/files.js +2 -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.js +9 -22
  19. package/build/lib-client/xsp-fs/file.d.ts +4 -0
  20. package/build/lib-client/xsp-fs/file.js +18 -1
  21. package/build/lib-client/xsp-fs/folder-node.d.ts +5 -1
  22. package/build/lib-client/xsp-fs/folder-node.js +15 -27
  23. package/build/lib-client/xsp-fs/fs.d.ts +4 -0
  24. package/build/lib-client/xsp-fs/fs.js +25 -1
  25. package/build/lib-client/xsp-fs/link-node.js +3 -19
  26. package/build/lib-client/xsp-fs/node-in-fs.d.ts +18 -5
  27. package/build/lib-client/xsp-fs/node-in-fs.js +70 -12
  28. package/build/lib-common/processes/labelled-exec-pools.js +1 -3
  29. package/build/protos/asmail.proto.js +1436 -1437
  30. package/build/protos/file.proto.js +1077 -387
  31. package/build/protos/fs.proto.js +1395 -1396
  32. package/package.json +4 -4
  33. package/protos/file.proto +24 -12
  34. package/protos/fs.proto +8 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core-3nweb-client-lib",
3
- "version": "0.43.8",
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
@@ -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 ====
@@ -309,7 +301,6 @@ message OptionsToAdopteRemote {
309
301
  // ==== WritableFileSyncAPI referable object ====
310
302
 
311
303
  // --- WritableFileSyncAPI.upload ---
312
- // Reply body is common.UInt64Value
313
304
  message FileSyncUploadRequestBody {
314
305
  OptionsToUploadLocal opts = 1;
315
306
  }
@@ -317,7 +308,28 @@ message FileSyncUploadReplyBody {
317
308
  common.UInt64Value uploaded_version = 1;
318
309
  }
319
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
+
320
321
  message OptionsToUploadLocal {
321
322
  common.UInt64Value local_version = 1;
322
323
  common.UInt64Value upload_version = 2;
323
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
@@ -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;
@@ -530,14 +516,15 @@ message FolderDiff {
530
516
  // ==== WritableFSSyncAPI referable object ====
531
517
 
532
518
  // --- WritableFSSyncAPI.upload ---
533
- // Reply body is common.UInt64Value
519
+ // Reply body is file.FileSyncUploadReplyBody
534
520
  message FSSyncUploadRequestBody {
535
521
  string path = 1;
536
522
  file.OptionsToUploadLocal opts = 2;
537
523
  }
538
- message FSSyncUploadReplyBody {
539
- common.UInt64Value uploaded_version = 1;
540
- }
524
+
525
+ // --- WritableFSSyncAPI.startUpload ---
526
+ // Request body is FSSyncUploadRequestBody
527
+ // Reply body is file.FileSyncStartUploadReplyBody
541
528
 
542
529
  // --- WritableFSSyncAPI.adoptRemoteFolderItem ---
543
530
  message AdoptRemoteFolderItemRequestBody {