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.
- package/build/api-defs/files.d.ts +92 -29
- package/build/core/asmail/config/index.d.ts +2 -2
- package/build/core/asmail/config/index.js +2 -2
- package/build/core/asmail/config/invitations-anon.d.ts +10 -24
- package/build/core/asmail/config/invitations-anon.js +43 -31
- package/build/core/asmail/config/published-intro-key.d.ts +11 -22
- package/build/core/asmail/config/published-intro-key.js +47 -38
- package/build/core/asmail/delivery/per-recipient-wip.js +2 -2
- package/build/core/asmail/inbox/inbox-events.js +10 -5
- package/build/core/asmail/inbox/index.d.ts +3 -2
- package/build/core/asmail/inbox/index.js +15 -11
- package/build/core/asmail/inbox/msg-indexing.d.ts +17 -64
- package/build/core/asmail/inbox/msg-indexing.js +440 -311
- package/build/core/asmail/inbox/msg-on-disk.js +2 -1
- package/build/core/asmail/index.d.ts +1 -1
- package/build/core/asmail/index.js +5 -4
- package/build/core/asmail/keyring/correspondent-keys.d.ts +2 -2
- package/build/core/asmail/keyring/correspondent-keys.js +4 -2
- package/build/core/asmail/keyring/index.d.ts +10 -33
- package/build/core/asmail/keyring/index.js +88 -75
- package/build/core/asmail/msg/opener.js +4 -3
- package/build/core/asmail/msg/packer.d.ts +1 -0
- package/build/core/asmail/msg/packer.js +8 -4
- package/build/core/index.js +3 -5
- package/build/core/sign-in.js +1 -1
- package/build/core/storage/local/obj-files.js +2 -1
- package/build/core/storage/synced/obj-files.d.ts +2 -0
- package/build/core/storage/synced/obj-files.js +18 -1
- package/build/core/storage/synced/obj-status.d.ts +1 -0
- package/build/core/storage/synced/obj-status.js +10 -0
- package/build/core/storage/synced/storage.js +7 -23
- package/build/core/storage/synced/upload-header-file.js +4 -2
- package/build/core/storage/synced/upsyncer.js +3 -5
- package/build/ipc-via-protobuf/asmail-cap.js +14 -15
- package/build/ipc-via-protobuf/bytes.js +42 -18
- package/build/ipc-via-protobuf/file.d.ts +7 -0
- package/build/ipc-via-protobuf/file.js +103 -66
- package/build/ipc-via-protobuf/fs.js +127 -105
- package/build/ipc-via-protobuf/mailerid.js +2 -2
- package/build/ipc-via-protobuf/protobuf-msg.d.ts +1 -0
- package/build/ipc-via-protobuf/protobuf-msg.js +5 -1
- package/build/ipc-via-protobuf/startup-cap.js +8 -8
- package/build/ipc-via-protobuf/storage-cap.js +4 -4
- package/build/lib-client/3nstorage/xsp-fs/common.js +2 -0
- package/build/lib-client/3nstorage/xsp-fs/file-node.d.ts +5 -10
- package/build/lib-client/3nstorage/xsp-fs/file-node.js +26 -45
- package/build/lib-client/3nstorage/xsp-fs/file.d.ts +8 -7
- package/build/lib-client/3nstorage/xsp-fs/file.js +12 -18
- package/build/lib-client/3nstorage/xsp-fs/folder-node.d.ts +6 -1
- package/build/lib-client/3nstorage/xsp-fs/folder-node.js +20 -8
- package/build/lib-client/3nstorage/xsp-fs/fs.d.ts +19 -18
- package/build/lib-client/3nstorage/xsp-fs/fs.js +18 -19
- package/build/lib-client/3nstorage/xsp-fs/node-in-fs.d.ts +13 -4
- package/build/lib-client/3nstorage/xsp-fs/node-in-fs.js +63 -8
- package/build/lib-client/3nstorage/xsp-fs/node-persistence.d.ts +1 -0
- package/build/lib-client/3nstorage/xsp-fs/node-persistence.js +7 -5
- package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v1.js +3 -4
- package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v2.js +20 -15
- package/build/lib-client/cryptor/cryptor-in-worker.js +37 -47
- package/build/lib-client/cryptor/cryptor-wasm.js +1 -1
- package/build/lib-client/cryptor/cryptor.wasm +0 -0
- package/build/lib-client/cryptor/in-proc-js.js +15 -12
- package/build/lib-client/cryptor/in-proc-wasm.js +11 -8
- package/build/lib-client/cryptor/serialization-for-wasm.d.ts +36 -0
- package/build/lib-client/cryptor/serialization-for-wasm.js +58 -0
- package/build/lib-client/cryptor-work-labels.d.ts +26 -0
- package/build/lib-client/cryptor-work-labels.js +152 -0
- package/build/lib-client/fs-sync-utils.d.ts +7 -1
- package/build/lib-client/fs-sync-utils.js +18 -7
- package/build/lib-client/local-files/dev-file-src.d.ts +2 -1
- package/build/lib-client/local-files/dev-file-src.js +5 -1
- package/build/lib-client/local-files/device-fs.js +2 -1
- package/build/lib-client/objs-on-disk/obj-on-disk.d.ts +5 -2
- package/build/lib-client/objs-on-disk/obj-on-disk.js +21 -2
- package/build/lib-client/request-utils.js +14 -14
- package/build/lib-common/async-cryptor-wrap.d.ts +9 -9
- package/build/lib-common/async-cryptor-wrap.js +13 -13
- package/build/lib-common/byte-streaming/pipe.d.ts +1 -1
- package/build/lib-common/byte-streaming/pipe.js +3 -3
- package/build/lib-common/byte-streaming/wrapping.js +4 -2
- package/build/lib-common/json-utils.js +0 -3
- package/build/lib-common/objs-on-disk/file-layout.js +1 -1
- package/build/lib-common/processes/synced.js +0 -184
- package/build/lib-sqlite-on-3nstorage/index.d.ts +32 -0
- package/build/lib-sqlite-on-3nstorage/index.js +117 -0
- package/build/lib-sqlite-on-3nstorage/sqljs.d.ts +279 -0
- package/build/lib-sqlite-on-3nstorage/sqljs.js +223 -0
- package/build/protos/asmail.proto.js +10145 -5923
- package/build/protos/bytes.proto.js +731 -204
- package/build/protos/common.proto.js +192 -44
- package/build/protos/cryptor.proto.js +184 -61
- package/build/protos/file.proto.js +2388 -502
- package/build/protos/fs.proto.js +9894 -6046
- package/build/protos/ipc.proto.js +244 -61
- package/build/protos/logger.proto.js +219 -53
- package/build/protos/mailerid.proto.js +230 -50
- package/build/protos/startup.proto.js +341 -77
- package/build/protos/storage.proto.js +276 -62
- package/package.json +8 -7
- package/protos/bytes.proto +13 -4
- package/protos/file.proto +27 -8
- package/protos/fs.proto +31 -14
|
@@ -76,7 +76,7 @@ function makeFSCaller(caller, fsMsg) {
|
|
|
76
76
|
fs.writeTxtFile = writeTxtFile.makeCaller(caller, objPath);
|
|
77
77
|
}
|
|
78
78
|
if (fsMsg.isVersioned) {
|
|
79
|
-
const vPath =
|
|
79
|
+
const vPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'v');
|
|
80
80
|
fs.v = {
|
|
81
81
|
getByteSource: vGetByteSource.makeCaller(caller, vPath),
|
|
82
82
|
getXAttr: vGetXAttr.makeCaller(caller, vPath),
|
|
@@ -96,7 +96,7 @@ function makeFSCaller(caller, fsMsg) {
|
|
|
96
96
|
fs.v.archiveCurrent = vArchiveCurrent.makeCaller(caller, vPath);
|
|
97
97
|
}
|
|
98
98
|
if (fsMsg.isSynced) {
|
|
99
|
-
const vsPath =
|
|
99
|
+
const vsPath = (0, protobuf_msg_1.methodPathFor)(vPath, 'sync');
|
|
100
100
|
fs.v.sync = {
|
|
101
101
|
status: vsStatus.makeCaller(caller, vsPath),
|
|
102
102
|
updateStatusInfo: vsUpdateStatusInfo.makeCaller(caller, vsPath),
|
|
@@ -225,15 +225,15 @@ var checkPresence;
|
|
|
225
225
|
.then(buf => protobuf_msg_1.boolValType.unpack(buf).value);
|
|
226
226
|
}
|
|
227
227
|
function makeFileCaller(caller, objPath) {
|
|
228
|
-
return makeCaller(caller,
|
|
228
|
+
return makeCaller(caller, (0, protobuf_msg_1.methodPathFor)(objPath, 'checkFilePresence'));
|
|
229
229
|
}
|
|
230
230
|
checkPresence.makeFileCaller = makeFileCaller;
|
|
231
231
|
function makeFolderCaller(caller, objPath) {
|
|
232
|
-
return makeCaller(caller,
|
|
232
|
+
return makeCaller(caller, (0, protobuf_msg_1.methodPathFor)(objPath, 'checkFolderPresence'));
|
|
233
233
|
}
|
|
234
234
|
checkPresence.makeFolderCaller = makeFolderCaller;
|
|
235
235
|
function makeLinkCaller(caller, objPath) {
|
|
236
|
-
return makeCaller(caller,
|
|
236
|
+
return makeCaller(caller, (0, protobuf_msg_1.methodPathFor)(objPath, 'checkLinkPresence'));
|
|
237
237
|
}
|
|
238
238
|
checkPresence.makeLinkCaller = makeLinkCaller;
|
|
239
239
|
})(checkPresence || (checkPresence = {}));
|
|
@@ -251,7 +251,7 @@ var stat;
|
|
|
251
251
|
}
|
|
252
252
|
stat.wrapService = wrapService;
|
|
253
253
|
function makeCaller(caller, objPath) {
|
|
254
|
-
const ipcPath =
|
|
254
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'stat');
|
|
255
255
|
return path => caller
|
|
256
256
|
.startPromiseCall(ipcPath, reqWithPathType.pack({ path }))
|
|
257
257
|
.then(file_1.unpackStats);
|
|
@@ -261,10 +261,10 @@ var stat;
|
|
|
261
261
|
Object.freeze(stat);
|
|
262
262
|
var getXAttr;
|
|
263
263
|
(function (getXAttr) {
|
|
264
|
-
|
|
264
|
+
const requestType = protobuf_type_1.ProtoType.for(fs_proto_1.fs.GetXAttrRequestBody);
|
|
265
265
|
function wrapService(fn) {
|
|
266
266
|
return buf => {
|
|
267
|
-
const { path, xaName } =
|
|
267
|
+
const { path, xaName } = requestType.unpack(buf);
|
|
268
268
|
const promise = fn(path, xaName)
|
|
269
269
|
.then(file_1.packXAttrValue);
|
|
270
270
|
return { promise };
|
|
@@ -272,9 +272,9 @@ var getXAttr;
|
|
|
272
272
|
}
|
|
273
273
|
getXAttr.wrapService = wrapService;
|
|
274
274
|
function makeCaller(caller, objPath) {
|
|
275
|
-
const ipcPath =
|
|
275
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'getXAttr');
|
|
276
276
|
return (path, xaName) => caller
|
|
277
|
-
.startPromiseCall(ipcPath,
|
|
277
|
+
.startPromiseCall(ipcPath, requestType.pack({ path, xaName }))
|
|
278
278
|
.then(file_1.unpackXAttrValue);
|
|
279
279
|
}
|
|
280
280
|
getXAttr.makeCaller = makeCaller;
|
|
@@ -292,7 +292,7 @@ var listXAttrs;
|
|
|
292
292
|
}
|
|
293
293
|
listXAttrs.wrapService = wrapService;
|
|
294
294
|
function makeCaller(caller, objPath) {
|
|
295
|
-
const ipcPath =
|
|
295
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'listXAttrs');
|
|
296
296
|
return path => caller
|
|
297
297
|
.startPromiseCall(ipcPath, reqWithPathType.pack({ path }))
|
|
298
298
|
.then(buf => (0, protobuf_msg_1.fixArray)(protobuf_msg_1.strArrValType.unpack(buf).values));
|
|
@@ -371,7 +371,7 @@ var readLink;
|
|
|
371
371
|
}
|
|
372
372
|
readLink.wrapService = wrapService;
|
|
373
373
|
function makeCaller(caller, objPath) {
|
|
374
|
-
const ipcPath =
|
|
374
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'readLink');
|
|
375
375
|
return path => caller
|
|
376
376
|
.startPromiseCall(ipcPath, reqWithPathType.pack({ path }))
|
|
377
377
|
.then(buf => {
|
|
@@ -551,12 +551,12 @@ var watch;
|
|
|
551
551
|
};
|
|
552
552
|
}
|
|
553
553
|
function makeFolderCaller(caller, objPath) {
|
|
554
|
-
const ipcPath =
|
|
554
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'watchFolder');
|
|
555
555
|
return makeCaller(caller, ipcPath, unpackFSEvent);
|
|
556
556
|
}
|
|
557
557
|
watch.makeFolderCaller = makeFolderCaller;
|
|
558
558
|
function makeFileCaller(caller, objPath) {
|
|
559
|
-
const ipcPath =
|
|
559
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'watchFile');
|
|
560
560
|
return makeCaller(caller, ipcPath, file_1.unpackFileEvent);
|
|
561
561
|
}
|
|
562
562
|
watch.makeFileCaller = makeFileCaller;
|
|
@@ -576,7 +576,7 @@ var watchTree;
|
|
|
576
576
|
}
|
|
577
577
|
watchTree.wrapService = wrapService;
|
|
578
578
|
function makeCaller(caller, objPath) {
|
|
579
|
-
const ipcPath =
|
|
579
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'watchTree');
|
|
580
580
|
return (path, depth, obs) => {
|
|
581
581
|
const s = new rxjs_1.Subject();
|
|
582
582
|
const unsub = caller.startObservableCall(ipcPath, requestType.pack({ path, depth: (0, protobuf_msg_1.toOptVal)(depth) }), s);
|
|
@@ -599,7 +599,7 @@ var close;
|
|
|
599
599
|
}
|
|
600
600
|
close.wrapService = wrapService;
|
|
601
601
|
function makeCaller(caller, objPath) {
|
|
602
|
-
const path =
|
|
602
|
+
const path = (0, protobuf_msg_1.methodPathFor)(objPath, 'close');
|
|
603
603
|
return () => caller
|
|
604
604
|
.startPromiseCall(path, undefined);
|
|
605
605
|
}
|
|
@@ -621,7 +621,7 @@ var readonlySubRoot;
|
|
|
621
621
|
}
|
|
622
622
|
readonlySubRoot.wrapService = wrapService;
|
|
623
623
|
function makeCaller(caller, objPath) {
|
|
624
|
-
const ipcPath =
|
|
624
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'readonlySubRoot');
|
|
625
625
|
return path => caller
|
|
626
626
|
.startPromiseCall(ipcPath, reqWithPathType.pack({ path }))
|
|
627
627
|
.then(buf => {
|
|
@@ -645,7 +645,7 @@ var listFolder;
|
|
|
645
645
|
}
|
|
646
646
|
listFolder.wrapService = wrapService;
|
|
647
647
|
function makeCaller(caller, objPath) {
|
|
648
|
-
const ipcPath =
|
|
648
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'listFolder');
|
|
649
649
|
return path => caller
|
|
650
650
|
.startPromiseCall(ipcPath, reqWithPathType.pack({ path }))
|
|
651
651
|
.then(buf => (0, protobuf_msg_1.fixArray)(requestType.unpack(buf).entries).map(lsEntryFromMsg));
|
|
@@ -665,7 +665,7 @@ var readJSONFile;
|
|
|
665
665
|
}
|
|
666
666
|
readJSONFile.wrapService = wrapService;
|
|
667
667
|
function makeCaller(caller, objPath) {
|
|
668
|
-
const ipcPath =
|
|
668
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'readJSONFile');
|
|
669
669
|
return path => caller
|
|
670
670
|
.startPromiseCall(ipcPath, reqWithPathType.pack({ path }))
|
|
671
671
|
.then(file_1.unpackJSON);
|
|
@@ -685,7 +685,7 @@ var readTxtFile;
|
|
|
685
685
|
}
|
|
686
686
|
readTxtFile.wrapService = wrapService;
|
|
687
687
|
function makeCaller(caller, objPath) {
|
|
688
|
-
const ipcPath =
|
|
688
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'readTxtFile');
|
|
689
689
|
return path => caller
|
|
690
690
|
.startPromiseCall(ipcPath, reqWithPathType.pack({ path }))
|
|
691
691
|
.then(buf => (buf ? (0, protobuf_msg_1.decodeFromUtf8)(buf) : ''));
|
|
@@ -695,10 +695,10 @@ var readTxtFile;
|
|
|
695
695
|
Object.freeze(readTxtFile);
|
|
696
696
|
var readBytes;
|
|
697
697
|
(function (readBytes) {
|
|
698
|
-
|
|
698
|
+
const requestType = protobuf_type_1.ProtoType.for(fs_proto_1.fs.ReadBytesRequestBody);
|
|
699
699
|
function wrapService(fn) {
|
|
700
700
|
return buf => {
|
|
701
|
-
const { path, start, end } =
|
|
701
|
+
const { path, start, end } = requestType.unpack(buf);
|
|
702
702
|
const promise = fn(path, (0, protobuf_msg_1.valOfOptInt)(start), (0, protobuf_msg_1.valOfOptInt)(end))
|
|
703
703
|
.then(file.readBytes.packReply);
|
|
704
704
|
return { promise };
|
|
@@ -706,9 +706,9 @@ var readBytes;
|
|
|
706
706
|
}
|
|
707
707
|
readBytes.wrapService = wrapService;
|
|
708
708
|
function makeCaller(caller, objPath) {
|
|
709
|
-
const ipcPath =
|
|
709
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'readBytes');
|
|
710
710
|
return (path, start, end) => caller
|
|
711
|
-
.startPromiseCall(ipcPath,
|
|
711
|
+
.startPromiseCall(ipcPath, requestType.pack({
|
|
712
712
|
path, start: (0, protobuf_msg_1.toOptVal)(start), end: (0, protobuf_msg_1.toOptVal)(end)
|
|
713
713
|
}))
|
|
714
714
|
.then(file.readBytes.unpackReply);
|
|
@@ -731,7 +731,7 @@ var getByteSource;
|
|
|
731
731
|
}
|
|
732
732
|
getByteSource.wrapService = wrapService;
|
|
733
733
|
function makeCaller(caller, objPath) {
|
|
734
|
-
const ipcPath =
|
|
734
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'getByteSource');
|
|
735
735
|
return path => caller
|
|
736
736
|
.startPromiseCall(ipcPath, reqWithPathType.pack({ path }))
|
|
737
737
|
.then(buf => {
|
|
@@ -757,7 +757,7 @@ var readonlyFile;
|
|
|
757
757
|
}
|
|
758
758
|
readonlyFile.wrapService = wrapService;
|
|
759
759
|
function makeCaller(caller, objPath) {
|
|
760
|
-
const ipcPath =
|
|
760
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'readonlyFile');
|
|
761
761
|
return path => caller
|
|
762
762
|
.startPromiseCall(ipcPath, reqWithPathType.pack({ path }))
|
|
763
763
|
.then(buf => {
|
|
@@ -830,7 +830,7 @@ var select;
|
|
|
830
830
|
}
|
|
831
831
|
select.wrapService = wrapService;
|
|
832
832
|
function makeCaller(caller, objPath) {
|
|
833
|
-
const ipcPath =
|
|
833
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'select');
|
|
834
834
|
return async (path, criteria) => {
|
|
835
835
|
const req = { path, criteria: criteriaToMsg(criteria) };
|
|
836
836
|
const s = new rxjs_1.Subject();
|
|
@@ -914,7 +914,7 @@ var fsCollection;
|
|
|
914
914
|
}
|
|
915
915
|
get.wrapService = wrapService;
|
|
916
916
|
function makeCaller(caller, objPath) {
|
|
917
|
-
const ipcPath =
|
|
917
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'get');
|
|
918
918
|
return name => caller
|
|
919
919
|
.startPromiseCall(ipcPath, requestType.pack({ name }))
|
|
920
920
|
.then(buf => {
|
|
@@ -945,7 +945,7 @@ var fsCollection;
|
|
|
945
945
|
}
|
|
946
946
|
getAll.wrapService = wrapService;
|
|
947
947
|
function makeCaller(caller, objPath) {
|
|
948
|
-
const ipcPath =
|
|
948
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'getAll');
|
|
949
949
|
return () => caller
|
|
950
950
|
.startPromiseCall(ipcPath, undefined)
|
|
951
951
|
.then(buf => {
|
|
@@ -1009,7 +1009,7 @@ var fsCollection;
|
|
|
1009
1009
|
};
|
|
1010
1010
|
}
|
|
1011
1011
|
function makeIterNextCaller(caller, objPath) {
|
|
1012
|
-
const ipcPath =
|
|
1012
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'next');
|
|
1013
1013
|
return () => caller
|
|
1014
1014
|
.startPromiseCall(ipcPath, undefined)
|
|
1015
1015
|
.then(buf => unpackIterRes(buf, caller));
|
|
@@ -1026,7 +1026,7 @@ var fsCollection;
|
|
|
1026
1026
|
}
|
|
1027
1027
|
entries.wrapService = wrapService;
|
|
1028
1028
|
function makeCaller(caller, objPath) {
|
|
1029
|
-
const ipcPath =
|
|
1029
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'entries');
|
|
1030
1030
|
return () => caller
|
|
1031
1031
|
.startPromiseCall(ipcPath, undefined)
|
|
1032
1032
|
.then(buf => {
|
|
@@ -1071,7 +1071,7 @@ var fsCollection;
|
|
|
1071
1071
|
return event;
|
|
1072
1072
|
}
|
|
1073
1073
|
function makeCaller(caller, objPath) {
|
|
1074
|
-
const path =
|
|
1074
|
+
const path = (0, protobuf_msg_1.methodPathFor)(objPath, 'watch');
|
|
1075
1075
|
return obs => {
|
|
1076
1076
|
const s = new rxjs_1.Subject();
|
|
1077
1077
|
const unsub = caller.startObservableCall(path, undefined, s);
|
|
@@ -1169,21 +1169,38 @@ var fsItem;
|
|
|
1169
1169
|
fsItem.fsItemFromMsg = fsItemFromMsg;
|
|
1170
1170
|
})(fsItem = exports.fsItem || (exports.fsItem = {}));
|
|
1171
1171
|
Object.freeze(fsItem);
|
|
1172
|
+
const reqWithPathAndFlagsType = protobuf_type_1.ProtoType.for(fs_proto_1.fs.PathAndFlagsRequestBody);
|
|
1173
|
+
function packRequestWithPathAndFlags(path, flags) {
|
|
1174
|
+
return reqWithPathAndFlagsType.pack({
|
|
1175
|
+
path,
|
|
1176
|
+
flags: file.versionedReadFlagsToMsg(flags)
|
|
1177
|
+
});
|
|
1178
|
+
}
|
|
1179
|
+
function unpackRequestWithPathAndFlags(buf) {
|
|
1180
|
+
const { path, flags } = reqWithPathAndFlagsType.unpack(buf);
|
|
1181
|
+
return {
|
|
1182
|
+
path,
|
|
1183
|
+
flags: file.versionedReadFlagsFromMsg(flags)
|
|
1184
|
+
};
|
|
1185
|
+
}
|
|
1172
1186
|
var vGetXAttr;
|
|
1173
1187
|
(function (vGetXAttr) {
|
|
1188
|
+
const requestType = protobuf_type_1.ProtoType.for(fs_proto_1.fs.VersionedGetXAttrRequestBody);
|
|
1174
1189
|
function wrapService(fn) {
|
|
1175
1190
|
return buf => {
|
|
1176
|
-
const { path, xaName } =
|
|
1177
|
-
const promise = fn(path, xaName)
|
|
1191
|
+
const { path, xaName, flags } = requestType.unpack(buf);
|
|
1192
|
+
const promise = fn(path, xaName, file.versionedReadFlagsFromMsg(flags))
|
|
1178
1193
|
.then(attrAndVer => file.vGetXAttr.replyType.pack(attrAndVer));
|
|
1179
1194
|
return { promise };
|
|
1180
1195
|
};
|
|
1181
1196
|
}
|
|
1182
1197
|
vGetXAttr.wrapService = wrapService;
|
|
1183
1198
|
function makeCaller(caller, objPath) {
|
|
1184
|
-
const ipcPath =
|
|
1185
|
-
return (path, xaName) => caller
|
|
1186
|
-
.startPromiseCall(ipcPath,
|
|
1199
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'getXAttr');
|
|
1200
|
+
return (path, xaName, flags) => caller
|
|
1201
|
+
.startPromiseCall(ipcPath, requestType.pack({
|
|
1202
|
+
path, xaName, flags: file.versionedReadFlagsToMsg(flags)
|
|
1203
|
+
}))
|
|
1187
1204
|
.then(file.vGetXAttr.unpackReply);
|
|
1188
1205
|
}
|
|
1189
1206
|
vGetXAttr.makeCaller = makeCaller;
|
|
@@ -1193,17 +1210,17 @@ var vListXAttrs;
|
|
|
1193
1210
|
(function (vListXAttrs) {
|
|
1194
1211
|
function wrapService(fn) {
|
|
1195
1212
|
return buf => {
|
|
1196
|
-
const { path } =
|
|
1197
|
-
const promise = fn(path)
|
|
1213
|
+
const { path, flags } = unpackRequestWithPathAndFlags(buf);
|
|
1214
|
+
const promise = fn(path, flags)
|
|
1198
1215
|
.then(({ version, lst }) => file.vListXAttrs.replyType.pack({ version, xaNames: lst }));
|
|
1199
1216
|
return { promise };
|
|
1200
1217
|
};
|
|
1201
1218
|
}
|
|
1202
1219
|
vListXAttrs.wrapService = wrapService;
|
|
1203
1220
|
function makeCaller(caller, objPath) {
|
|
1204
|
-
const ipcPath =
|
|
1205
|
-
return path => caller
|
|
1206
|
-
.startPromiseCall(ipcPath,
|
|
1221
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'listXAttrs');
|
|
1222
|
+
return (path, flags) => caller
|
|
1223
|
+
.startPromiseCall(ipcPath, packRequestWithPathAndFlags(path, flags))
|
|
1207
1224
|
.then(buf => {
|
|
1208
1225
|
const { version: v, xaNames } = file.vListXAttrs.replyType.unpack(buf);
|
|
1209
1226
|
return { version: (0, protobuf_msg_1.fixInt)(v), lst: (xaNames ? xaNames : []) };
|
|
@@ -1217,8 +1234,8 @@ var vListFolder;
|
|
|
1217
1234
|
const replyType = protobuf_type_1.ProtoType.for(fs_proto_1.fs.VersionedListFolderReplyBody);
|
|
1218
1235
|
function wrapService(fn) {
|
|
1219
1236
|
return buf => {
|
|
1220
|
-
const { path } =
|
|
1221
|
-
const promise = fn(path)
|
|
1237
|
+
const { path, flags } = unpackRequestWithPathAndFlags(buf);
|
|
1238
|
+
const promise = fn(path, flags)
|
|
1222
1239
|
.then(({ version, lst }) => replyType.pack({
|
|
1223
1240
|
version, entries: lst.map(lsEntryToMsg)
|
|
1224
1241
|
}));
|
|
@@ -1227,9 +1244,9 @@ var vListFolder;
|
|
|
1227
1244
|
}
|
|
1228
1245
|
vListFolder.wrapService = wrapService;
|
|
1229
1246
|
function makeCaller(caller, objPath) {
|
|
1230
|
-
const ipcPath =
|
|
1231
|
-
return path => caller
|
|
1232
|
-
.startPromiseCall(ipcPath,
|
|
1247
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'listFolder');
|
|
1248
|
+
return (path, flags) => caller
|
|
1249
|
+
.startPromiseCall(ipcPath, packRequestWithPathAndFlags(path, flags))
|
|
1233
1250
|
.then(buf => {
|
|
1234
1251
|
const { version: v, entries } = replyType.unpack(buf);
|
|
1235
1252
|
return {
|
|
@@ -1244,8 +1261,8 @@ var vReadJSONFile;
|
|
|
1244
1261
|
(function (vReadJSONFile) {
|
|
1245
1262
|
function wrapService(fn) {
|
|
1246
1263
|
return buf => {
|
|
1247
|
-
const { path } =
|
|
1248
|
-
const promise = fn(path)
|
|
1264
|
+
const { path, flags } = unpackRequestWithPathAndFlags(buf);
|
|
1265
|
+
const promise = fn(path, flags)
|
|
1249
1266
|
.then(({ version, json }) => {
|
|
1250
1267
|
return file.vReadJSON.replyType.pack({ version, json: JSON.stringify(json) });
|
|
1251
1268
|
});
|
|
@@ -1254,9 +1271,9 @@ var vReadJSONFile;
|
|
|
1254
1271
|
}
|
|
1255
1272
|
vReadJSONFile.wrapService = wrapService;
|
|
1256
1273
|
function makeCaller(caller, objPath) {
|
|
1257
|
-
const ipcPath =
|
|
1258
|
-
return path => caller
|
|
1259
|
-
.startPromiseCall(ipcPath,
|
|
1274
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'readJSONFile');
|
|
1275
|
+
return (path, flags) => caller
|
|
1276
|
+
.startPromiseCall(ipcPath, packRequestWithPathAndFlags(path, flags))
|
|
1260
1277
|
.then(buf => {
|
|
1261
1278
|
const { version: v, json } = file.vReadJSON.replyType.unpack(buf);
|
|
1262
1279
|
return { version: (0, protobuf_msg_1.fixInt)(v), json: JSON.parse(json) };
|
|
@@ -1269,17 +1286,17 @@ var vReadTxtFile;
|
|
|
1269
1286
|
(function (vReadTxtFile) {
|
|
1270
1287
|
function wrapService(fn) {
|
|
1271
1288
|
return buf => {
|
|
1272
|
-
const { path } =
|
|
1273
|
-
const promise = fn(path)
|
|
1289
|
+
const { path, flags } = unpackRequestWithPathAndFlags(buf);
|
|
1290
|
+
const promise = fn(path, flags)
|
|
1274
1291
|
.then(verAndTxt => file.vReadTxt.replyType.pack(verAndTxt));
|
|
1275
1292
|
return { promise };
|
|
1276
1293
|
};
|
|
1277
1294
|
}
|
|
1278
1295
|
vReadTxtFile.wrapService = wrapService;
|
|
1279
1296
|
function makeCaller(caller, objPath) {
|
|
1280
|
-
const ipcPath =
|
|
1281
|
-
return path => caller
|
|
1282
|
-
.startPromiseCall(ipcPath,
|
|
1297
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'readTxtFile');
|
|
1298
|
+
return (path, flags) => caller
|
|
1299
|
+
.startPromiseCall(ipcPath, packRequestWithPathAndFlags(path, flags))
|
|
1283
1300
|
.then(buf => {
|
|
1284
1301
|
const { version: v, txt } = file.vReadTxt.replyType.unpack(buf);
|
|
1285
1302
|
return { version: (0, protobuf_msg_1.fixInt)(v), txt };
|
|
@@ -1290,24 +1307,24 @@ var vReadTxtFile;
|
|
|
1290
1307
|
Object.freeze(vReadTxtFile);
|
|
1291
1308
|
var vReadBytes;
|
|
1292
1309
|
(function (vReadBytes) {
|
|
1310
|
+
const requestType = protobuf_type_1.ProtoType.for(fs_proto_1.fs.VersionedReadBytesRequestBody);
|
|
1293
1311
|
function wrapService(fn) {
|
|
1294
1312
|
return buf => {
|
|
1295
|
-
const { path, start, end } =
|
|
1296
|
-
const promise = fn(path, (0, protobuf_msg_1.valOfOptInt)(start), (0, protobuf_msg_1.valOfOptInt)(end))
|
|
1313
|
+
const { path, start, end, flags } = requestType.unpack(buf);
|
|
1314
|
+
const promise = fn(path, (0, protobuf_msg_1.valOfOptInt)(start), (0, protobuf_msg_1.valOfOptInt)(end), file.versionedReadFlagsFromMsg(flags))
|
|
1297
1315
|
.then(file.vReadBytes.packReply);
|
|
1298
1316
|
return { promise };
|
|
1299
1317
|
};
|
|
1300
1318
|
}
|
|
1301
1319
|
vReadBytes.wrapService = wrapService;
|
|
1302
1320
|
function makeCaller(caller, objPath) {
|
|
1303
|
-
const ipcPath =
|
|
1304
|
-
return (path, start, end) =>
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
};
|
|
1321
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'readBytes');
|
|
1322
|
+
return (path, start, end, flags) => caller
|
|
1323
|
+
.startPromiseCall(ipcPath, requestType.pack({
|
|
1324
|
+
path, start: (0, protobuf_msg_1.toOptVal)(start), end: (0, protobuf_msg_1.toOptVal)(end),
|
|
1325
|
+
flags: file.versionedReadFlagsToMsg(flags)
|
|
1326
|
+
}))
|
|
1327
|
+
.then(file.vReadBytes.unpackReply);
|
|
1311
1328
|
}
|
|
1312
1329
|
vReadBytes.makeCaller = makeCaller;
|
|
1313
1330
|
})(vReadBytes || (vReadBytes = {}));
|
|
@@ -1316,7 +1333,7 @@ var vGetByteSource;
|
|
|
1316
1333
|
(function (vGetByteSource) {
|
|
1317
1334
|
function wrapService(fn, expServices) {
|
|
1318
1335
|
return buf => {
|
|
1319
|
-
const { path } =
|
|
1336
|
+
const { path, flags } = unpackRequestWithPathAndFlags(buf);
|
|
1320
1337
|
const promise = fn(path)
|
|
1321
1338
|
.then(({ version, src }) => {
|
|
1322
1339
|
const ref = (0, bytes_1.exposeSrcService)(src, expServices);
|
|
@@ -1327,9 +1344,9 @@ var vGetByteSource;
|
|
|
1327
1344
|
}
|
|
1328
1345
|
vGetByteSource.wrapService = wrapService;
|
|
1329
1346
|
function makeCaller(caller, objPath) {
|
|
1330
|
-
const ipcPath =
|
|
1331
|
-
return path => caller
|
|
1332
|
-
.startPromiseCall(ipcPath,
|
|
1347
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'getByteSource');
|
|
1348
|
+
return (path, flags) => caller
|
|
1349
|
+
.startPromiseCall(ipcPath, packRequestWithPathAndFlags(path, flags))
|
|
1333
1350
|
.then(buf => {
|
|
1334
1351
|
const { version: v, src } = file.vGetByteSource.replyType.unpack(buf);
|
|
1335
1352
|
return { version: (0, protobuf_msg_1.fixInt)(v), src: (0, bytes_1.makeSrcCaller)(caller, src) };
|
|
@@ -1359,7 +1376,7 @@ var updateXAttrs;
|
|
|
1359
1376
|
}
|
|
1360
1377
|
updateXAttrs.wrapService = wrapService;
|
|
1361
1378
|
function makeCaller(caller, objPath) {
|
|
1362
|
-
const ipcPath =
|
|
1379
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'updateXAttrs');
|
|
1363
1380
|
return (path, changes) => caller
|
|
1364
1381
|
.startPromiseCall(ipcPath, packRequest(path, changes));
|
|
1365
1382
|
}
|
|
@@ -1378,7 +1395,7 @@ var makeFolder;
|
|
|
1378
1395
|
}
|
|
1379
1396
|
makeFolder.wrapService = wrapService;
|
|
1380
1397
|
function makeCaller(caller, objPath) {
|
|
1381
|
-
const ipcPath =
|
|
1398
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'makeFolder');
|
|
1382
1399
|
return (path, exclusive) => caller
|
|
1383
1400
|
.startPromiseCall(ipcPath, requestType.pack({
|
|
1384
1401
|
path, exclusive: (0, protobuf_msg_1.toOptVal)(exclusive)
|
|
@@ -1399,7 +1416,7 @@ var deleteFolder;
|
|
|
1399
1416
|
}
|
|
1400
1417
|
deleteFolder.wrapService = wrapService;
|
|
1401
1418
|
function makeCaller(caller, objPath) {
|
|
1402
|
-
const ipcPath =
|
|
1419
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'deleteFolder');
|
|
1403
1420
|
return (path, removeContent) => caller
|
|
1404
1421
|
.startPromiseCall(ipcPath, requestType.pack({
|
|
1405
1422
|
path, removeContent: (0, protobuf_msg_1.toOptVal)(removeContent)
|
|
@@ -1419,7 +1436,7 @@ var deleteFile;
|
|
|
1419
1436
|
}
|
|
1420
1437
|
deleteFile.wrapService = wrapService;
|
|
1421
1438
|
function makeCaller(caller, objPath) {
|
|
1422
|
-
const ipcPath =
|
|
1439
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'deleteFile');
|
|
1423
1440
|
return path => caller
|
|
1424
1441
|
.startPromiseCall(ipcPath, reqWithPathType.pack({ path }));
|
|
1425
1442
|
}
|
|
@@ -1437,7 +1454,7 @@ var deleteLink;
|
|
|
1437
1454
|
}
|
|
1438
1455
|
deleteLink.wrapService = wrapService;
|
|
1439
1456
|
function makeCaller(caller, objPath) {
|
|
1440
|
-
const ipcPath =
|
|
1457
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'deleteLink');
|
|
1441
1458
|
return path => caller
|
|
1442
1459
|
.startPromiseCall(ipcPath, reqWithPathType.pack({ path }));
|
|
1443
1460
|
}
|
|
@@ -1456,7 +1473,7 @@ var move;
|
|
|
1456
1473
|
}
|
|
1457
1474
|
move.wrapService = wrapService;
|
|
1458
1475
|
function makeCaller(caller, objPath) {
|
|
1459
|
-
const ipcPath =
|
|
1476
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'move');
|
|
1460
1477
|
return (src, dst) => caller
|
|
1461
1478
|
.startPromiseCall(ipcPath, requestType.pack({ src, dst }));
|
|
1462
1479
|
}
|
|
@@ -1475,7 +1492,7 @@ var copyFile;
|
|
|
1475
1492
|
}
|
|
1476
1493
|
copyFile.wrapService = wrapService;
|
|
1477
1494
|
function makeCaller(caller, objPath) {
|
|
1478
|
-
const ipcPath =
|
|
1495
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'copyFile');
|
|
1479
1496
|
return (src, dst, overwrite) => caller
|
|
1480
1497
|
.startPromiseCall(ipcPath, requestType.pack({
|
|
1481
1498
|
src, dst, overwrite: (0, protobuf_msg_1.toOptVal)(overwrite)
|
|
@@ -1496,7 +1513,7 @@ var copyFolder;
|
|
|
1496
1513
|
}
|
|
1497
1514
|
copyFolder.wrapService = wrapService;
|
|
1498
1515
|
function makeCaller(caller, objPath) {
|
|
1499
|
-
const ipcPath =
|
|
1516
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'copyFolder');
|
|
1500
1517
|
return (src, dst, mergeAndOverwrite) => caller
|
|
1501
1518
|
.startPromiseCall(ipcPath, requestType.pack({
|
|
1502
1519
|
src, dst, mergeAndOverwrite: (0, protobuf_msg_1.toOptVal)(mergeAndOverwrite)
|
|
@@ -1518,7 +1535,7 @@ var saveFile;
|
|
|
1518
1535
|
}
|
|
1519
1536
|
saveFile.wrapService = wrapService;
|
|
1520
1537
|
function makeCaller(caller, objPath) {
|
|
1521
|
-
const ipcPath =
|
|
1538
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'saveFile');
|
|
1522
1539
|
return (f, dst, overwrite) => caller
|
|
1523
1540
|
.startPromiseCall(ipcPath, requestType.pack({
|
|
1524
1541
|
file: caller.srvRefOf(f), dst, overwrite: (0, protobuf_msg_1.toOptVal)(overwrite)
|
|
@@ -1540,7 +1557,7 @@ var saveFolder;
|
|
|
1540
1557
|
}
|
|
1541
1558
|
saveFolder.wrapService = wrapService;
|
|
1542
1559
|
function makeCaller(caller, objPath) {
|
|
1543
|
-
const ipcPath =
|
|
1560
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'saveFolder');
|
|
1544
1561
|
return (f, dst, overwrite) => caller
|
|
1545
1562
|
.startPromiseCall(ipcPath, requestType.pack({
|
|
1546
1563
|
folder: caller.srvRefOf(f), dst, overwrite: (0, protobuf_msg_1.toOptVal)(overwrite)
|
|
@@ -1562,7 +1579,7 @@ var link;
|
|
|
1562
1579
|
}
|
|
1563
1580
|
link.wrapService = wrapService;
|
|
1564
1581
|
function makeCaller(caller, objPath) {
|
|
1565
|
-
const ipcPath =
|
|
1582
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'link');
|
|
1566
1583
|
return (path, f) => caller
|
|
1567
1584
|
.startPromiseCall(ipcPath, requestType.pack({ path, target: caller.srvRefOf(f) }));
|
|
1568
1585
|
}
|
|
@@ -1606,7 +1623,7 @@ var writableSubRoot;
|
|
|
1606
1623
|
}
|
|
1607
1624
|
writableSubRoot.wrapService = wrapService;
|
|
1608
1625
|
function makeCaller(caller, objPath) {
|
|
1609
|
-
const ipcPath =
|
|
1626
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'writableSubRoot');
|
|
1610
1627
|
return (path, flags) => caller
|
|
1611
1628
|
.startPromiseCall(ipcPath, packPathAndFlags(path, flags))
|
|
1612
1629
|
.then(buf => {
|
|
@@ -1632,7 +1649,7 @@ var writableFile;
|
|
|
1632
1649
|
}
|
|
1633
1650
|
writableFile.wrapService = wrapService;
|
|
1634
1651
|
function makeCaller(caller, objPath) {
|
|
1635
|
-
const ipcPath =
|
|
1652
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'writableFile');
|
|
1636
1653
|
return (path, flags) => caller
|
|
1637
1654
|
.startPromiseCall(ipcPath, packPathAndFlags(path, flags))
|
|
1638
1655
|
.then(buf => {
|
|
@@ -1655,7 +1672,7 @@ var writeJSONFile;
|
|
|
1655
1672
|
}
|
|
1656
1673
|
writeJSONFile.wrapService = wrapService;
|
|
1657
1674
|
function makeCaller(caller, objPath) {
|
|
1658
|
-
const ipcPath =
|
|
1675
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'writeJSONFile');
|
|
1659
1676
|
return (path, json, flags) => caller
|
|
1660
1677
|
.startPromiseCall(ipcPath, requestType.pack({
|
|
1661
1678
|
path, json: JSON.stringify(json), flags: optFlagsToMsg(flags)
|
|
@@ -1676,7 +1693,7 @@ var writeTxtFile;
|
|
|
1676
1693
|
}
|
|
1677
1694
|
writeTxtFile.wrapService = wrapService;
|
|
1678
1695
|
function makeCaller(caller, objPath) {
|
|
1679
|
-
const ipcPath =
|
|
1696
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'writeTxtFile');
|
|
1680
1697
|
return (path, txt, flags) => caller
|
|
1681
1698
|
.startPromiseCall(ipcPath, requestType.pack({
|
|
1682
1699
|
path, txt, flags: optFlagsToMsg(flags)
|
|
@@ -1697,7 +1714,7 @@ var writeBytes;
|
|
|
1697
1714
|
}
|
|
1698
1715
|
writeBytes.wrapService = wrapService;
|
|
1699
1716
|
function makeCaller(caller, objPath) {
|
|
1700
|
-
const ipcPath =
|
|
1717
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'writeBytes');
|
|
1701
1718
|
return (path, bytes, flags) => caller
|
|
1702
1719
|
.startPromiseCall(ipcPath, requestType.pack({
|
|
1703
1720
|
path, bytes: bytes, flags: optFlagsToMsg(flags)
|
|
@@ -1721,7 +1738,7 @@ var getByteSink;
|
|
|
1721
1738
|
}
|
|
1722
1739
|
getByteSink.wrapService = wrapService;
|
|
1723
1740
|
function makeCaller(caller, objPath) {
|
|
1724
|
-
const ipcPath =
|
|
1741
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'getByteSink');
|
|
1725
1742
|
return (path, flags) => caller
|
|
1726
1743
|
.startPromiseCall(ipcPath, packPathAndFlags(path, flags))
|
|
1727
1744
|
.then(buf => {
|
|
@@ -1744,7 +1761,7 @@ var vUpdateXAttrs;
|
|
|
1744
1761
|
}
|
|
1745
1762
|
vUpdateXAttrs.wrapService = wrapService;
|
|
1746
1763
|
function makeCaller(caller, objPath) {
|
|
1747
|
-
const ipcPath =
|
|
1764
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'updateXAttrs');
|
|
1748
1765
|
return (path, changes) => caller
|
|
1749
1766
|
.startPromiseCall(ipcPath, updateXAttrs.packRequest(path, changes))
|
|
1750
1767
|
.then(protobuf_msg_1.unpackInt);
|
|
@@ -1781,7 +1798,7 @@ var vWriteJSONFile;
|
|
|
1781
1798
|
}
|
|
1782
1799
|
vWriteJSONFile.wrapService = wrapService;
|
|
1783
1800
|
function makeCaller(caller, objPath) {
|
|
1784
|
-
const ipcPath =
|
|
1801
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'writeJSONFile');
|
|
1785
1802
|
return (path, json, flags) => caller
|
|
1786
1803
|
.startPromiseCall(ipcPath, requestType.pack({
|
|
1787
1804
|
path, json: JSON.stringify(json), flags: optVerFlagsToMsg(flags)
|
|
@@ -1804,7 +1821,7 @@ var vWriteTxtFile;
|
|
|
1804
1821
|
}
|
|
1805
1822
|
vWriteTxtFile.wrapService = wrapService;
|
|
1806
1823
|
function makeCaller(caller, objPath) {
|
|
1807
|
-
const ipcPath =
|
|
1824
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'writeTxtFile');
|
|
1808
1825
|
return (path, txt, flags) => caller
|
|
1809
1826
|
.startPromiseCall(ipcPath, requestType.pack({
|
|
1810
1827
|
path, txt, flags: optVerFlagsToMsg(flags)
|
|
@@ -1827,7 +1844,7 @@ var vWriteBytes;
|
|
|
1827
1844
|
}
|
|
1828
1845
|
vWriteBytes.wrapService = wrapService;
|
|
1829
1846
|
function makeCaller(caller, objPath) {
|
|
1830
|
-
const ipcPath =
|
|
1847
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'writeBytes');
|
|
1831
1848
|
return (path, bytes, flags) => caller
|
|
1832
1849
|
.startPromiseCall(ipcPath, requestType.pack({
|
|
1833
1850
|
path, bytes: bytes, flags: optVerFlagsToMsg(flags)
|
|
@@ -1853,7 +1870,7 @@ var vGetByteSink;
|
|
|
1853
1870
|
}
|
|
1854
1871
|
vGetByteSink.wrapService = wrapService;
|
|
1855
1872
|
function makeCaller(caller, objPath) {
|
|
1856
|
-
const ipcPath =
|
|
1873
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'getByteSink');
|
|
1857
1874
|
return (path, flags) => caller
|
|
1858
1875
|
.startPromiseCall(ipcPath, requestType.pack({
|
|
1859
1876
|
path, flags: optVerFlagsToMsg(flags)
|
|
@@ -1878,7 +1895,7 @@ var vsStatus;
|
|
|
1878
1895
|
}
|
|
1879
1896
|
vsStatus.wrapService = wrapService;
|
|
1880
1897
|
function makeCaller(caller, objPath) {
|
|
1881
|
-
const ipcPath =
|
|
1898
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'status');
|
|
1882
1899
|
return (path) => caller
|
|
1883
1900
|
.startPromiseCall(ipcPath, reqWithPathType.pack({ path }))
|
|
1884
1901
|
.then(file.unpackSyncStatus);
|
|
@@ -1898,7 +1915,7 @@ var vsUpdateStatusInfo;
|
|
|
1898
1915
|
}
|
|
1899
1916
|
vsUpdateStatusInfo.wrapService = wrapService;
|
|
1900
1917
|
function makeCaller(caller, objPath) {
|
|
1901
|
-
const ipcPath =
|
|
1918
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'updateStatusInfo');
|
|
1902
1919
|
return (path) => caller
|
|
1903
1920
|
.startPromiseCall(ipcPath, reqWithPathType.pack({ path }))
|
|
1904
1921
|
.then(file.unpackSyncStatus);
|
|
@@ -1920,7 +1937,7 @@ var vsIsRemoteVersionOnDisk;
|
|
|
1920
1937
|
}
|
|
1921
1938
|
vsIsRemoteVersionOnDisk.wrapService = wrapService;
|
|
1922
1939
|
function makeCaller(caller, objPath) {
|
|
1923
|
-
const ipcPath =
|
|
1940
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'isRemoteVersionOnDisk');
|
|
1924
1941
|
return (path, version) => caller
|
|
1925
1942
|
.startPromiseCall(ipcPath, requestType.pack({ path, version }))
|
|
1926
1943
|
.then(buf => replyType.unpack(buf).status);
|
|
@@ -1940,7 +1957,7 @@ var vsDownload;
|
|
|
1940
1957
|
}
|
|
1941
1958
|
vsDownload.wrapService = wrapService;
|
|
1942
1959
|
function makeCaller(caller, objPath) {
|
|
1943
|
-
const ipcPath =
|
|
1960
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'download');
|
|
1944
1961
|
return (path, version) => caller
|
|
1945
1962
|
.startPromiseCall(ipcPath, requestType.pack({
|
|
1946
1963
|
path, version
|
|
@@ -1952,20 +1969,25 @@ Object.freeze(vsDownload);
|
|
|
1952
1969
|
var vsUpload;
|
|
1953
1970
|
(function (vsUpload) {
|
|
1954
1971
|
const requestType = protobuf_type_1.ProtoType.for(fs_proto_1.fs.FSSyncUploadRequestBody);
|
|
1972
|
+
const replyType = protobuf_type_1.ProtoType.for(fs_proto_1.fs.FSSyncUploadReplyBody);
|
|
1955
1973
|
function wrapService(fn) {
|
|
1956
1974
|
return buf => {
|
|
1957
1975
|
const { path, opts } = requestType.unpack(buf);
|
|
1958
|
-
const promise = fn(path, file.optionsToUploadLocalFromMsg(opts))
|
|
1976
|
+
const promise = fn(path, file.optionsToUploadLocalFromMsg(opts))
|
|
1977
|
+
.then(uploadedVersion => replyType.pack({
|
|
1978
|
+
uploadedVersion: (0, protobuf_msg_1.toOptVal)(uploadedVersion)
|
|
1979
|
+
}));
|
|
1959
1980
|
return { promise };
|
|
1960
1981
|
};
|
|
1961
1982
|
}
|
|
1962
1983
|
vsUpload.wrapService = wrapService;
|
|
1963
1984
|
function makeCaller(caller, objPath) {
|
|
1964
|
-
const ipcPath =
|
|
1985
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'upload');
|
|
1965
1986
|
return (path, opts) => caller
|
|
1966
1987
|
.startPromiseCall(ipcPath, requestType.pack({
|
|
1967
1988
|
path, opts: file.optionsToUploadLocalToMsg(opts)
|
|
1968
|
-
}))
|
|
1989
|
+
}))
|
|
1990
|
+
.then(buf => (0, protobuf_msg_1.valOfOptInt)(replyType.unpack(buf).uploadedVersion));
|
|
1969
1991
|
}
|
|
1970
1992
|
vsUpload.makeCaller = makeCaller;
|
|
1971
1993
|
})(vsUpload || (vsUpload = {}));
|
|
@@ -2003,7 +2025,7 @@ var vsAdoptRemoteFolderItem;
|
|
|
2003
2025
|
}
|
|
2004
2026
|
vsAdoptRemoteFolderItem.wrapService = wrapService;
|
|
2005
2027
|
function makeCaller(caller, objPath) {
|
|
2006
|
-
const ipcPath =
|
|
2028
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'adoptRemoteFolderItem');
|
|
2007
2029
|
return (path, itemName, opts) => caller
|
|
2008
2030
|
.startPromiseCall(ipcPath, requestType.pack({
|
|
2009
2031
|
path, itemName, opts: optionsToAdoptRemoteItemToMsg(opts)
|
|
@@ -2025,7 +2047,7 @@ var vsAdoptRemote;
|
|
|
2025
2047
|
}
|
|
2026
2048
|
vsAdoptRemote.wrapService = wrapService;
|
|
2027
2049
|
function makeCaller(caller, objPath) {
|
|
2028
|
-
const ipcPath =
|
|
2050
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'adoptRemote');
|
|
2029
2051
|
return (path, opts) => caller
|
|
2030
2052
|
.startPromiseCall(ipcPath, requestType.pack({
|
|
2031
2053
|
path, opts: file.remoteAdoptionOptsToMsg(opts)
|
|
@@ -2046,7 +2068,7 @@ var vListVersions;
|
|
|
2046
2068
|
}
|
|
2047
2069
|
vListVersions.wrapService = wrapService;
|
|
2048
2070
|
function makeCaller(caller, objPath) {
|
|
2049
|
-
const ipcPath =
|
|
2071
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'listVersions');
|
|
2050
2072
|
return path => caller
|
|
2051
2073
|
.startPromiseCall(ipcPath, reqWithPathType.pack({ path }))
|
|
2052
2074
|
.then(file.vListVersions.unpackReply);
|
|
@@ -2067,7 +2089,7 @@ var vArchiveCurrent;
|
|
|
2067
2089
|
}
|
|
2068
2090
|
vArchiveCurrent.wrapService = wrapService;
|
|
2069
2091
|
function makeCaller(caller, objPath) {
|
|
2070
|
-
const ipcPath =
|
|
2092
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'archiveCurrent');
|
|
2071
2093
|
return (path, version) => caller
|
|
2072
2094
|
.startPromiseCall(ipcPath, requestType.pack({ path, version: (0, protobuf_msg_1.toOptVal)(version) }))
|
|
2073
2095
|
.then(protobuf_msg_1.unpackInt);
|
|
@@ -2151,7 +2173,7 @@ var vsDiffCurrentAndRemoteFolderVersions;
|
|
|
2151
2173
|
}
|
|
2152
2174
|
vsDiffCurrentAndRemoteFolderVersions.wrapService = wrapService;
|
|
2153
2175
|
function makeCaller(caller, objPath) {
|
|
2154
|
-
const ipcPath =
|
|
2176
|
+
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'diffCurrentAndRemoteFolderVersions');
|
|
2155
2177
|
return (path, remoteVersion) => caller
|
|
2156
2178
|
.startPromiseCall(ipcPath, requestType.pack({
|
|
2157
2179
|
path, remoteVersion: (0, protobuf_msg_1.toOptVal)(remoteVersion)
|