core-3nweb-client-lib 0.42.16 → 0.43.1
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 +9 -10
- package/build/core/id-manager/key-storage.js +3 -2
- package/build/core/storage/synced/remote-events.js +8 -6
- package/build/core/storage/system-folders/apps-data.js +1 -1
- package/build/core-ipc/file.js +5 -26
- package/build/core-ipc/fs.js +8 -31
- package/build/lib-client/fs-utils/files.js +1 -5
- package/build/lib-client/fs-utils/fs-sync-utils.d.ts +1 -1
- package/build/lib-client/fs-utils/fs-sync-utils.js +16 -12
- package/build/lib-client/xsp-fs/file.d.ts +1 -1
- package/build/lib-client/xsp-fs/file.js +3 -4
- package/build/lib-client/xsp-fs/fs.d.ts +1 -1
- package/build/lib-client/xsp-fs/fs.js +3 -4
- package/build/lib-common/ipc/generic-ipc.js +16 -5
- package/build/protos/asmail.proto.js +229 -0
- package/build/protos/fs.proto.js +229 -0
- package/package.json +1 -1
- package/protos/file.proto +1 -5
- package/protos/fs.proto +5 -6
|
@@ -574,12 +574,11 @@ declare namespace web3n.files {
|
|
|
574
574
|
interface ReadonlyFileSyncAPI {
|
|
575
575
|
|
|
576
576
|
/**
|
|
577
|
-
* Returns synchronization status of this object
|
|
578
|
-
*
|
|
577
|
+
* Returns synchronization status of this object.
|
|
578
|
+
* @param skipServerCheck is optional parameter to skip server check, that may be handy in offline
|
|
579
|
+
* situations. Default is false.
|
|
579
580
|
*/
|
|
580
|
-
status(): Promise<SyncStatus>;
|
|
581
|
-
|
|
582
|
-
updateStatusInfo(): Promise<SyncStatus>;
|
|
581
|
+
status(skipServerCheck?: boolean): Promise<SyncStatus>;
|
|
583
582
|
|
|
584
583
|
isRemoteVersionOnDisk(
|
|
585
584
|
version: number
|
|
@@ -1177,12 +1176,12 @@ declare namespace web3n.files {
|
|
|
1177
1176
|
interface ReadonlyFSSyncAPI {
|
|
1178
1177
|
|
|
1179
1178
|
/**
|
|
1180
|
-
* Returns synchronization status of
|
|
1181
|
-
*
|
|
1179
|
+
* Returns synchronization status of item at given path.
|
|
1180
|
+
* @param path
|
|
1181
|
+
* @param skipServerCheck is optional parameter to skip server check, that may be handy in offline
|
|
1182
|
+
* situations. Default is false.
|
|
1182
1183
|
*/
|
|
1183
|
-
status(path: string): Promise<SyncStatus>;
|
|
1184
|
-
|
|
1185
|
-
updateStatusInfo(path: string): Promise<SyncStatus>;
|
|
1184
|
+
status(path: string, skipServerCheck?: boolean): Promise<SyncStatus>;
|
|
1186
1185
|
|
|
1187
1186
|
isRemoteVersionOnDisk(
|
|
1188
1187
|
path: string, version: number
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
Copyright (C) 2022 3NSoft Inc.
|
|
3
|
+
Copyright (C) 2022, 2025 3NSoft Inc.
|
|
4
4
|
|
|
5
5
|
This program is free software: you can redistribute it and/or modify it under
|
|
6
6
|
the terms of the GNU General Public License as published by the Free Software
|
|
@@ -54,7 +54,8 @@ class IdKeysStorage {
|
|
|
54
54
|
if (!exc.notFound) {
|
|
55
55
|
throw exc;
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
// XXX this isn't a complete story, and needs proper implementation
|
|
58
|
+
await this.fs.v.sync.status('');
|
|
58
59
|
await this.fs.v.sync.adoptRemote('');
|
|
59
60
|
if (await this.fs.checkFilePresence(LOGIN_KEY_FILE_NAME)) {
|
|
60
61
|
return this.getSavedKey();
|
|
@@ -48,13 +48,15 @@ class RemoteEvents {
|
|
|
48
48
|
heartbeat.subscribe({
|
|
49
49
|
next: ev => this.connectionEvents.next(toStorageConnectionStatus(ev))
|
|
50
50
|
});
|
|
51
|
-
return
|
|
51
|
+
return [
|
|
52
|
+
this.absorbObjChange(client),
|
|
53
|
+
this.absorbObjRemoval(client),
|
|
54
|
+
// XXX commenting out these for now, as server hasn't implemented these
|
|
55
|
+
// this.absorbObjVersionArchival(client),
|
|
56
|
+
// this.absorbArchVersionRemoval(client)
|
|
57
|
+
];
|
|
52
58
|
}))
|
|
53
|
-
.pipe((0, operators_1.
|
|
54
|
-
// XXX commenting out to see if unknownEvent exception goes away
|
|
55
|
-
// Is server doesn't know it?
|
|
56
|
-
// this.absorbObjVersionArchival(client),
|
|
57
|
-
this.absorbArchVersionRemoval(client))), (0, operators_1.mergeMap)(event$ => event$))
|
|
59
|
+
.pipe((0, operators_1.mergeMap)(event$ => event$), (0, operators_1.mergeMap)(event$ => event$))
|
|
58
60
|
.subscribe({
|
|
59
61
|
next: noop,
|
|
60
62
|
error: async (err) => {
|
package/build/core-ipc/file.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
Copyright (C) 2020, 2022 3NSoft Inc.
|
|
3
|
+
Copyright (C) 2020, 2022, 2025 3NSoft Inc.
|
|
4
4
|
|
|
5
5
|
This program is free software: you can redistribute it and/or modify it under
|
|
6
6
|
the terms of the GNU General Public License as published by the Free Software
|
|
@@ -95,7 +95,6 @@ function makeFileCaller(caller, fileMsg) {
|
|
|
95
95
|
const vsPath = (0, protobuf_msg_1.methodPathFor)(vPath, 'sync');
|
|
96
96
|
file.v.sync = {
|
|
97
97
|
status: vsStatus.makeCaller(caller, vsPath),
|
|
98
|
-
updateStatusInfo: vsUpdateStatusInfo.makeCaller(caller, vsPath),
|
|
99
98
|
isRemoteVersionOnDisk: vsIsRemoteVersionOnDisk.makeCaller(caller, vsPath),
|
|
100
99
|
download: vsDownload.makeCaller(caller, vsPath),
|
|
101
100
|
adoptRemote: vsAdoptRemote.makeCaller(caller, vsPath),
|
|
@@ -149,7 +148,6 @@ function exposeFileService(file, expServices) {
|
|
|
149
148
|
if (file.v.sync) {
|
|
150
149
|
implExp.v.sync = {
|
|
151
150
|
status: vsStatus.wrapService(file.v.sync.status),
|
|
152
|
-
updateStatusInfo: vsUpdateStatusInfo.wrapService(file.v.sync.updateStatusInfo),
|
|
153
151
|
isRemoteVersionOnDisk: vsIsRemoteVersionOnDisk.wrapService(file.v.sync.isRemoteVersionOnDisk),
|
|
154
152
|
download: vsDownload.wrapService(file.v.sync.download),
|
|
155
153
|
adoptRemote: vsAdoptRemote.wrapService(file.v.sync.adoptRemote),
|
|
@@ -1095,8 +1093,8 @@ Object.freeze(vGetByteSink);
|
|
|
1095
1093
|
var vsStatus;
|
|
1096
1094
|
(function (vsStatus) {
|
|
1097
1095
|
function wrapService(fn) {
|
|
1098
|
-
return
|
|
1099
|
-
const promise = fn()
|
|
1096
|
+
return buf => {
|
|
1097
|
+
const promise = fn(protobuf_msg_1.boolValType.unpack(buf).value)
|
|
1100
1098
|
.then(packSyncStatus);
|
|
1101
1099
|
return { promise };
|
|
1102
1100
|
};
|
|
@@ -1104,32 +1102,13 @@ var vsStatus;
|
|
|
1104
1102
|
vsStatus.wrapService = wrapService;
|
|
1105
1103
|
function makeCaller(caller, objPath) {
|
|
1106
1104
|
const path = (0, protobuf_msg_1.methodPathFor)(objPath, 'status');
|
|
1107
|
-
return () => caller
|
|
1108
|
-
.startPromiseCall(path,
|
|
1105
|
+
return (skipServerCheck) => caller
|
|
1106
|
+
.startPromiseCall(path, protobuf_msg_1.boolValType.pack((0, protobuf_msg_1.toVal)(!!skipServerCheck)))
|
|
1109
1107
|
.then(unpackSyncStatus);
|
|
1110
1108
|
}
|
|
1111
1109
|
vsStatus.makeCaller = makeCaller;
|
|
1112
1110
|
})(vsStatus || (vsStatus = {}));
|
|
1113
1111
|
Object.freeze(vsStatus);
|
|
1114
|
-
var vsUpdateStatusInfo;
|
|
1115
|
-
(function (vsUpdateStatusInfo) {
|
|
1116
|
-
function wrapService(fn) {
|
|
1117
|
-
return () => {
|
|
1118
|
-
const promise = fn()
|
|
1119
|
-
.then(packSyncStatus);
|
|
1120
|
-
return { promise };
|
|
1121
|
-
};
|
|
1122
|
-
}
|
|
1123
|
-
vsUpdateStatusInfo.wrapService = wrapService;
|
|
1124
|
-
function makeCaller(caller, objPath) {
|
|
1125
|
-
const path = (0, protobuf_msg_1.methodPathFor)(objPath, 'updateStatusInfo');
|
|
1126
|
-
return () => caller
|
|
1127
|
-
.startPromiseCall(path, undefined)
|
|
1128
|
-
.then(unpackSyncStatus);
|
|
1129
|
-
}
|
|
1130
|
-
vsUpdateStatusInfo.makeCaller = makeCaller;
|
|
1131
|
-
})(vsUpdateStatusInfo || (vsUpdateStatusInfo = {}));
|
|
1132
|
-
Object.freeze(vsUpdateStatusInfo);
|
|
1133
1112
|
var vsIsRemoteVersionOnDisk;
|
|
1134
1113
|
(function (vsIsRemoteVersionOnDisk) {
|
|
1135
1114
|
const requestType = protobuf_type_1.ProtoType.for(file_proto_1.file.FileSyncIsOnDiskRequestBody);
|
package/build/core-ipc/fs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
Copyright (C) 2020, 2022 3NSoft Inc.
|
|
3
|
+
Copyright (C) 2020, 2022, 2025 3NSoft Inc.
|
|
4
4
|
|
|
5
5
|
This program is free software: you can redistribute it and/or modify it under
|
|
6
6
|
the terms of the GNU General Public License as published by the Free Software
|
|
@@ -103,7 +103,6 @@ function makeFSCaller(caller, fsMsg) {
|
|
|
103
103
|
const vsPath = (0, protobuf_msg_1.methodPathFor)(vPath, 'sync');
|
|
104
104
|
fs.v.sync = {
|
|
105
105
|
status: vsStatus.makeCaller(caller, vsPath),
|
|
106
|
-
updateStatusInfo: vsUpdateStatusInfo.makeCaller(caller, vsPath),
|
|
107
106
|
isRemoteVersionOnDisk: vsIsRemoteVersionOnDisk.makeCaller(caller, vsPath),
|
|
108
107
|
download: vsDownload.makeCaller(caller, vsPath),
|
|
109
108
|
adoptRemote: vsAdoptRemote.makeCaller(caller, vsPath),
|
|
@@ -111,8 +110,7 @@ function makeFSCaller(caller, fsMsg) {
|
|
|
111
110
|
};
|
|
112
111
|
if (fs.writable) {
|
|
113
112
|
fs.v.sync.upload = vsUpload.makeCaller(caller, vsPath);
|
|
114
|
-
fs.v.sync.adoptRemoteFolderItem =
|
|
115
|
-
vsAdoptRemoteFolderItem.makeCaller(caller, vsPath);
|
|
113
|
+
fs.v.sync.adoptRemoteFolderItem = vsAdoptRemoteFolderItem.makeCaller(caller, vsPath);
|
|
116
114
|
}
|
|
117
115
|
}
|
|
118
116
|
}
|
|
@@ -182,7 +180,6 @@ function exposeFSService(fs, expServices) {
|
|
|
182
180
|
if (fs.v.sync) {
|
|
183
181
|
implExp.v.sync = {
|
|
184
182
|
status: vsStatus.wrapService(fs.v.sync.status),
|
|
185
|
-
updateStatusInfo: vsUpdateStatusInfo.wrapService(fs.v.sync.updateStatusInfo),
|
|
186
183
|
isRemoteVersionOnDisk: vsIsRemoteVersionOnDisk.wrapService(fs.v.sync.isRemoteVersionOnDisk),
|
|
187
184
|
download: vsDownload.wrapService(fs.v.sync.download),
|
|
188
185
|
adoptRemote: vsAdoptRemote.wrapService(fs.v.sync.adoptRemote),
|
|
@@ -190,8 +187,7 @@ function exposeFSService(fs, expServices) {
|
|
|
190
187
|
};
|
|
191
188
|
if (fs.writable) {
|
|
192
189
|
implExp.v.sync.upload = vsUpload.wrapService(fs.v.sync.upload);
|
|
193
|
-
implExp.v.sync.adoptRemoteFolderItem =
|
|
194
|
-
vsAdoptRemoteFolderItem.wrapService(fs.v.sync.adoptRemoteFolderItem);
|
|
190
|
+
implExp.v.sync.adoptRemoteFolderItem = vsAdoptRemoteFolderItem.wrapService(fs.v.sync.adoptRemoteFolderItem);
|
|
195
191
|
}
|
|
196
192
|
}
|
|
197
193
|
}
|
|
@@ -1887,10 +1883,11 @@ var vGetByteSink;
|
|
|
1887
1883
|
Object.freeze(vGetByteSink);
|
|
1888
1884
|
var vsStatus;
|
|
1889
1885
|
(function (vsStatus) {
|
|
1886
|
+
const requestType = protobuf_type_1.ProtoType.for(fs_proto_1.fs.FSSyncStatusRequestBody);
|
|
1890
1887
|
function wrapService(fn) {
|
|
1891
1888
|
return buf => {
|
|
1892
|
-
const { path } =
|
|
1893
|
-
const promise = fn(path)
|
|
1889
|
+
const { path, skipServerCheck } = requestType.unpack(buf);
|
|
1890
|
+
const promise = fn(path, skipServerCheck)
|
|
1894
1891
|
.then(file.packSyncStatus);
|
|
1895
1892
|
return { promise };
|
|
1896
1893
|
};
|
|
@@ -1898,33 +1895,13 @@ var vsStatus;
|
|
|
1898
1895
|
vsStatus.wrapService = wrapService;
|
|
1899
1896
|
function makeCaller(caller, objPath) {
|
|
1900
1897
|
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'status');
|
|
1901
|
-
return (path) => caller
|
|
1902
|
-
.startPromiseCall(ipcPath,
|
|
1898
|
+
return (path, skipServerCheck) => caller
|
|
1899
|
+
.startPromiseCall(ipcPath, requestType.pack({ path, skipServerCheck: !!skipServerCheck }))
|
|
1903
1900
|
.then(file.unpackSyncStatus);
|
|
1904
1901
|
}
|
|
1905
1902
|
vsStatus.makeCaller = makeCaller;
|
|
1906
1903
|
})(vsStatus || (vsStatus = {}));
|
|
1907
1904
|
Object.freeze(vsStatus);
|
|
1908
|
-
var vsUpdateStatusInfo;
|
|
1909
|
-
(function (vsUpdateStatusInfo) {
|
|
1910
|
-
function wrapService(fn) {
|
|
1911
|
-
return buf => {
|
|
1912
|
-
const { path } = reqWithPathType.unpack(buf);
|
|
1913
|
-
const promise = fn(path)
|
|
1914
|
-
.then(file.packSyncStatus);
|
|
1915
|
-
return { promise };
|
|
1916
|
-
};
|
|
1917
|
-
}
|
|
1918
|
-
vsUpdateStatusInfo.wrapService = wrapService;
|
|
1919
|
-
function makeCaller(caller, objPath) {
|
|
1920
|
-
const ipcPath = (0, protobuf_msg_1.methodPathFor)(objPath, 'updateStatusInfo');
|
|
1921
|
-
return (path) => caller
|
|
1922
|
-
.startPromiseCall(ipcPath, reqWithPathType.pack({ path }))
|
|
1923
|
-
.then(file.unpackSyncStatus);
|
|
1924
|
-
}
|
|
1925
|
-
vsUpdateStatusInfo.makeCaller = makeCaller;
|
|
1926
|
-
})(vsUpdateStatusInfo || (vsUpdateStatusInfo = {}));
|
|
1927
|
-
Object.freeze(vsUpdateStatusInfo);
|
|
1928
1905
|
var vsIsRemoteVersionOnDisk;
|
|
1929
1906
|
(function (vsIsRemoteVersionOnDisk) {
|
|
1930
1907
|
const requestType = protobuf_type_1.ProtoType.for(fs_proto_1.fs.FSSyncIsOnDiskRequestBody);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
Copyright (C) 2016 - 2022 3NSoft Inc.
|
|
3
|
+
Copyright (C) 2016 - 2022, 2025 3NSoft Inc.
|
|
4
4
|
|
|
5
5
|
This program is free software: you can redistribute it and/or modify it under
|
|
6
6
|
the terms of the GNU General Public License as published by the Free Software
|
|
@@ -86,7 +86,6 @@ function wrapWritableFileSyncAPI(sImpl) {
|
|
|
86
86
|
}
|
|
87
87
|
const w = {
|
|
88
88
|
status: sImpl.status.bind(sImpl),
|
|
89
|
-
updateStatusInfo: sImpl.updateStatusInfo.bind(sImpl),
|
|
90
89
|
download: sImpl.download.bind(sImpl),
|
|
91
90
|
isRemoteVersionOnDisk: sImpl.isRemoteVersionOnDisk.bind(sImpl),
|
|
92
91
|
upload: sImpl.upload.bind(sImpl),
|
|
@@ -138,7 +137,6 @@ function wrapReadonlyFileSyncAPI(sImpl) {
|
|
|
138
137
|
}
|
|
139
138
|
const w = {
|
|
140
139
|
status: sImpl.status.bind(sImpl),
|
|
141
|
-
updateStatusInfo: sImpl.updateStatusInfo.bind(sImpl),
|
|
142
140
|
download: sImpl.download.bind(sImpl),
|
|
143
141
|
isRemoteVersionOnDisk: sImpl.isRemoteVersionOnDisk.bind(sImpl),
|
|
144
142
|
adoptRemote: sImpl.adoptRemote.bind(sImpl),
|
|
@@ -232,7 +230,6 @@ function wrapWritableFSSyncAPI(sImpl) {
|
|
|
232
230
|
}
|
|
233
231
|
const w = {
|
|
234
232
|
status: sImpl.status.bind(sImpl),
|
|
235
|
-
updateStatusInfo: sImpl.updateStatusInfo.bind(sImpl),
|
|
236
233
|
download: sImpl.download.bind(sImpl),
|
|
237
234
|
isRemoteVersionOnDisk: sImpl.isRemoteVersionOnDisk.bind(sImpl),
|
|
238
235
|
adoptRemote: sImpl.adoptRemote.bind(sImpl),
|
|
@@ -293,7 +290,6 @@ function wrapReadonlyFSSyncAPI(sImpl) {
|
|
|
293
290
|
}
|
|
294
291
|
const w = {
|
|
295
292
|
status: sImpl.status.bind(sImpl),
|
|
296
|
-
updateStatusInfo: sImpl.updateStatusInfo.bind(sImpl),
|
|
297
293
|
download: sImpl.download.bind(sImpl),
|
|
298
294
|
isRemoteVersionOnDisk: sImpl.isRemoteVersionOnDisk.bind(sImpl),
|
|
299
295
|
adoptRemote: sImpl.adoptRemote.bind(sImpl),
|
|
@@ -4,7 +4,7 @@ type ReadonlyFS = web3n.files.ReadonlyFS;
|
|
|
4
4
|
type RemoteEvent = web3n.files.RemoteEvent;
|
|
5
5
|
type FileEvent = web3n.files.FileEvent;
|
|
6
6
|
type FolderEvent = web3n.files.FolderEvent;
|
|
7
|
-
export declare function getRemoteFolderChanges(fs: WritableFS
|
|
7
|
+
export declare function getRemoteFolderChanges(fs: WritableFS): Promise<void>;
|
|
8
8
|
export declare function getOrMakeAndUploadFolderIn(fs: WritableFS, folder: string): Promise<WritableFS>;
|
|
9
9
|
export declare function uploadFolderChangesIfAny(fs: WritableFS): Promise<void>;
|
|
10
10
|
export declare function observableFromTreeEvents(fs: ReadonlyFS, rootPath: string): Observable<RemoteEvent | FileEvent | FolderEvent>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
Copyright (C) 2022 3NSoft Inc.
|
|
3
|
+
Copyright (C) 2022, 2025 3NSoft Inc.
|
|
4
4
|
|
|
5
5
|
This program is free software: you can redistribute it and/or modify it under
|
|
6
6
|
the terms of the GNU General Public License as published by the Free Software
|
|
@@ -22,15 +22,9 @@ exports.uploadFolderChangesIfAny = uploadFolderChangesIfAny;
|
|
|
22
22
|
exports.observableFromTreeEvents = observableFromTreeEvents;
|
|
23
23
|
const rxjs_1 = require("rxjs");
|
|
24
24
|
const exceptions_1 = require("../xsp-fs/exceptions");
|
|
25
|
-
async function getRemoteFolderChanges(fs
|
|
26
|
-
if (forceServerCheck) {
|
|
27
|
-
await fs.v.sync.updateStatusInfo('');
|
|
28
|
-
}
|
|
25
|
+
async function getRemoteFolderChanges(fs) {
|
|
29
26
|
let { state } = await fs.v.sync.status('');
|
|
30
27
|
if (state === 'behind') {
|
|
31
|
-
if (!forceServerCheck) {
|
|
32
|
-
await fs.v.sync.updateStatusInfo('');
|
|
33
|
-
}
|
|
34
28
|
await fs.v.sync.adoptRemote('');
|
|
35
29
|
}
|
|
36
30
|
else if (state === 'conflicting') {
|
|
@@ -58,11 +52,21 @@ async function getOrMakeAndUploadFolderIn(fs, folder) {
|
|
|
58
52
|
}
|
|
59
53
|
}
|
|
60
54
|
}
|
|
55
|
+
// XXX conflicts are app(let)-specific, hence, we can't have this "general" functionality.
|
|
61
56
|
async function uploadFolderChangesIfAny(fs) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
try {
|
|
58
|
+
const { state } = await fs.v.sync.status('');
|
|
59
|
+
if (state === 'unsynced') {
|
|
60
|
+
await fs.v.sync.upload('');
|
|
61
|
+
}
|
|
62
|
+
else if (state === 'conflicting') {
|
|
63
|
+
// XXX log conflicts error
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
catch (exc) {
|
|
67
|
+
if (exc.type !== 'connect') {
|
|
68
|
+
// XXX log generic error
|
|
69
|
+
}
|
|
66
70
|
}
|
|
67
71
|
}
|
|
68
72
|
function observableFromTreeEvents(fs, rootPath) {
|
|
@@ -98,7 +98,7 @@ declare class S implements WritableFileSyncAPI {
|
|
|
98
98
|
private readonly n;
|
|
99
99
|
constructor(n: N);
|
|
100
100
|
upload(opts?: OptionsToUploadLocal): Promise<number | undefined>;
|
|
101
|
-
status(): Promise<SyncStatus>;
|
|
101
|
+
status(skipServerCheck?: boolean): Promise<SyncStatus>;
|
|
102
102
|
updateStatusInfo(): Promise<SyncStatus>;
|
|
103
103
|
isRemoteVersionOnDisk(version: number): Promise<'complete' | 'partial' | 'none'>;
|
|
104
104
|
download(version: number): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
Copyright (C) 2016 - 2020, 2022 3NSoft Inc.
|
|
3
|
+
Copyright (C) 2016 - 2020, 2022, 2025 3NSoft Inc.
|
|
4
4
|
|
|
5
5
|
This program is free software: you can redistribute it and/or modify it under
|
|
6
6
|
the terms of the GNU General Public License as published by the Free Software
|
|
@@ -234,10 +234,9 @@ class S {
|
|
|
234
234
|
const uploadVersion = await node.upload(opts);
|
|
235
235
|
return uploadVersion;
|
|
236
236
|
}
|
|
237
|
-
async status() {
|
|
237
|
+
async status(skipServerCheck = false) {
|
|
238
238
|
const node = await this.n.getNode();
|
|
239
|
-
|
|
240
|
-
return status;
|
|
239
|
+
return await (skipServerCheck ? node.syncStatus() : node.updateStatusInfo());
|
|
241
240
|
}
|
|
242
241
|
async updateStatusInfo() {
|
|
243
242
|
const node = await this.n.getNode();
|
|
@@ -162,7 +162,7 @@ declare class S implements WritableFSSyncAPI {
|
|
|
162
162
|
private readonly n;
|
|
163
163
|
constructor(n: N);
|
|
164
164
|
upload(path: string, opts?: OptionsToUploadLocal): Promise<number | undefined>;
|
|
165
|
-
status(path: string): Promise<SyncStatus>;
|
|
165
|
+
status(path: string, skipServerCheck?: boolean): Promise<SyncStatus>;
|
|
166
166
|
updateStatusInfo(path: string): Promise<SyncStatus>;
|
|
167
167
|
isRemoteVersionOnDisk(path: string, version: number): Promise<'complete' | 'partial' | 'none'>;
|
|
168
168
|
download(path: string, version: number): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
Copyright (C) 2015 - 2020, 2022 3NSoft Inc.
|
|
3
|
+
Copyright (C) 2015 - 2020, 2022, 2025 3NSoft Inc.
|
|
4
4
|
|
|
5
5
|
This program is free software: you can redistribute it and/or modify it under
|
|
6
6
|
the terms of the GNU General Public License as published by the Free Software
|
|
@@ -734,11 +734,10 @@ class S {
|
|
|
734
734
|
}
|
|
735
735
|
;
|
|
736
736
|
}
|
|
737
|
-
async status(path) {
|
|
737
|
+
async status(path, skipServerCheck = false) {
|
|
738
738
|
const node = await this.n.get(path);
|
|
739
739
|
try {
|
|
740
|
-
|
|
741
|
-
return status;
|
|
740
|
+
return await (skipServerCheck ? node.syncStatus() : node.updateStatusInfo());
|
|
742
741
|
}
|
|
743
742
|
catch (exc) {
|
|
744
743
|
throw (0, common_1.setPathInExc)(exc, path);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
Copyright (C) 2016 - 2017 3NSoft Inc.
|
|
3
|
+
Copyright (C) 2016 - 2017, 2025 3NSoft Inc.
|
|
4
4
|
|
|
5
5
|
This program is free software: you can redistribute it and/or modify it under
|
|
6
6
|
the terms of the GNU General Public License as published by the Free Software
|
|
@@ -543,8 +543,19 @@ class EventsReceivingSide extends RequestingSide {
|
|
|
543
543
|
}
|
|
544
544
|
};
|
|
545
545
|
const listener = new EventListener(channel, observer, detach);
|
|
546
|
-
this.listeners.add(ipcChannel, listener)
|
|
547
|
-
|
|
546
|
+
this.channels.subscribeTo(ipcChannel).then(() => this.listeners.add(ipcChannel, listener), err => {
|
|
547
|
+
var _a;
|
|
548
|
+
if (observer.error) {
|
|
549
|
+
observer.error(makeEventException({
|
|
550
|
+
cause: err,
|
|
551
|
+
failToSubscribe: true,
|
|
552
|
+
channel: ipcChannel
|
|
553
|
+
}));
|
|
554
|
+
}
|
|
555
|
+
else {
|
|
556
|
+
(_a = observer.complete) === null || _a === void 0 ? void 0 : _a.call(observer);
|
|
557
|
+
}
|
|
558
|
+
});
|
|
548
559
|
return detach;
|
|
549
560
|
}
|
|
550
561
|
wrap() {
|
|
@@ -571,11 +582,11 @@ class IpcEventChannels {
|
|
|
571
582
|
this.subscriptionProcs = new synced_1.NamedProcs();
|
|
572
583
|
Object.freeze(this);
|
|
573
584
|
}
|
|
574
|
-
subscribeTo(ipcChannel) {
|
|
585
|
+
async subscribeTo(ipcChannel) {
|
|
575
586
|
if (this.subscribedIpcChannels.has(ipcChannel)) {
|
|
576
587
|
return;
|
|
577
588
|
}
|
|
578
|
-
this.subscriptionProcs.startOrChain(ipcChannel, async () => {
|
|
589
|
+
await this.subscriptionProcs.startOrChain(ipcChannel, async () => {
|
|
579
590
|
if (this.subscribedIpcChannels.has(ipcChannel)) {
|
|
580
591
|
return;
|
|
581
592
|
}
|
|
@@ -29487,6 +29487,235 @@ $root.fs = (function() {
|
|
|
29487
29487
|
return ArchiveCurrentRequestBody;
|
|
29488
29488
|
})();
|
|
29489
29489
|
|
|
29490
|
+
fs.FSSyncStatusRequestBody = (function() {
|
|
29491
|
+
|
|
29492
|
+
/**
|
|
29493
|
+
* Properties of a FSSyncStatusRequestBody.
|
|
29494
|
+
* @memberof fs
|
|
29495
|
+
* @interface IFSSyncStatusRequestBody
|
|
29496
|
+
* @property {string|null} [path] FSSyncStatusRequestBody path
|
|
29497
|
+
* @property {boolean|null} [skipServerCheck] FSSyncStatusRequestBody skipServerCheck
|
|
29498
|
+
*/
|
|
29499
|
+
|
|
29500
|
+
/**
|
|
29501
|
+
* Constructs a new FSSyncStatusRequestBody.
|
|
29502
|
+
* @memberof fs
|
|
29503
|
+
* @classdesc Represents a FSSyncStatusRequestBody.
|
|
29504
|
+
* @implements IFSSyncStatusRequestBody
|
|
29505
|
+
* @constructor
|
|
29506
|
+
* @param {fs.IFSSyncStatusRequestBody=} [properties] Properties to set
|
|
29507
|
+
*/
|
|
29508
|
+
function FSSyncStatusRequestBody(properties) {
|
|
29509
|
+
if (properties)
|
|
29510
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
29511
|
+
if (properties[keys[i]] != null)
|
|
29512
|
+
this[keys[i]] = properties[keys[i]];
|
|
29513
|
+
}
|
|
29514
|
+
|
|
29515
|
+
/**
|
|
29516
|
+
* FSSyncStatusRequestBody path.
|
|
29517
|
+
* @member {string} path
|
|
29518
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
29519
|
+
* @instance
|
|
29520
|
+
*/
|
|
29521
|
+
FSSyncStatusRequestBody.prototype.path = "";
|
|
29522
|
+
|
|
29523
|
+
/**
|
|
29524
|
+
* FSSyncStatusRequestBody skipServerCheck.
|
|
29525
|
+
* @member {boolean} skipServerCheck
|
|
29526
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
29527
|
+
* @instance
|
|
29528
|
+
*/
|
|
29529
|
+
FSSyncStatusRequestBody.prototype.skipServerCheck = false;
|
|
29530
|
+
|
|
29531
|
+
/**
|
|
29532
|
+
* Creates a new FSSyncStatusRequestBody instance using the specified properties.
|
|
29533
|
+
* @function create
|
|
29534
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
29535
|
+
* @static
|
|
29536
|
+
* @param {fs.IFSSyncStatusRequestBody=} [properties] Properties to set
|
|
29537
|
+
* @returns {fs.FSSyncStatusRequestBody} FSSyncStatusRequestBody instance
|
|
29538
|
+
*/
|
|
29539
|
+
FSSyncStatusRequestBody.create = function create(properties) {
|
|
29540
|
+
return new FSSyncStatusRequestBody(properties);
|
|
29541
|
+
};
|
|
29542
|
+
|
|
29543
|
+
/**
|
|
29544
|
+
* Encodes the specified FSSyncStatusRequestBody message. Does not implicitly {@link fs.FSSyncStatusRequestBody.verify|verify} messages.
|
|
29545
|
+
* @function encode
|
|
29546
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
29547
|
+
* @static
|
|
29548
|
+
* @param {fs.IFSSyncStatusRequestBody} message FSSyncStatusRequestBody message or plain object to encode
|
|
29549
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
29550
|
+
* @returns {$protobuf.Writer} Writer
|
|
29551
|
+
*/
|
|
29552
|
+
FSSyncStatusRequestBody.encode = function encode(message, writer) {
|
|
29553
|
+
if (!writer)
|
|
29554
|
+
writer = $Writer.create();
|
|
29555
|
+
if (message.path != null && Object.hasOwnProperty.call(message, "path"))
|
|
29556
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.path);
|
|
29557
|
+
if (message.skipServerCheck != null && Object.hasOwnProperty.call(message, "skipServerCheck"))
|
|
29558
|
+
writer.uint32(/* id 2, wireType 0 =*/16).bool(message.skipServerCheck);
|
|
29559
|
+
return writer;
|
|
29560
|
+
};
|
|
29561
|
+
|
|
29562
|
+
/**
|
|
29563
|
+
* Encodes the specified FSSyncStatusRequestBody message, length delimited. Does not implicitly {@link fs.FSSyncStatusRequestBody.verify|verify} messages.
|
|
29564
|
+
* @function encodeDelimited
|
|
29565
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
29566
|
+
* @static
|
|
29567
|
+
* @param {fs.IFSSyncStatusRequestBody} message FSSyncStatusRequestBody message or plain object to encode
|
|
29568
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
29569
|
+
* @returns {$protobuf.Writer} Writer
|
|
29570
|
+
*/
|
|
29571
|
+
FSSyncStatusRequestBody.encodeDelimited = function encodeDelimited(message, writer) {
|
|
29572
|
+
return this.encode(message, writer).ldelim();
|
|
29573
|
+
};
|
|
29574
|
+
|
|
29575
|
+
/**
|
|
29576
|
+
* Decodes a FSSyncStatusRequestBody message from the specified reader or buffer.
|
|
29577
|
+
* @function decode
|
|
29578
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
29579
|
+
* @static
|
|
29580
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
29581
|
+
* @param {number} [length] Message length if known beforehand
|
|
29582
|
+
* @returns {fs.FSSyncStatusRequestBody} FSSyncStatusRequestBody
|
|
29583
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
29584
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
29585
|
+
*/
|
|
29586
|
+
FSSyncStatusRequestBody.decode = function decode(reader, length, error) {
|
|
29587
|
+
if (!(reader instanceof $Reader))
|
|
29588
|
+
reader = $Reader.create(reader);
|
|
29589
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.fs.FSSyncStatusRequestBody();
|
|
29590
|
+
while (reader.pos < end) {
|
|
29591
|
+
var tag = reader.uint32();
|
|
29592
|
+
if (tag === error)
|
|
29593
|
+
break;
|
|
29594
|
+
switch (tag >>> 3) {
|
|
29595
|
+
case 1: {
|
|
29596
|
+
message.path = reader.string();
|
|
29597
|
+
break;
|
|
29598
|
+
}
|
|
29599
|
+
case 2: {
|
|
29600
|
+
message.skipServerCheck = reader.bool();
|
|
29601
|
+
break;
|
|
29602
|
+
}
|
|
29603
|
+
default:
|
|
29604
|
+
reader.skipType(tag & 7);
|
|
29605
|
+
break;
|
|
29606
|
+
}
|
|
29607
|
+
}
|
|
29608
|
+
return message;
|
|
29609
|
+
};
|
|
29610
|
+
|
|
29611
|
+
/**
|
|
29612
|
+
* Decodes a FSSyncStatusRequestBody message from the specified reader or buffer, length delimited.
|
|
29613
|
+
* @function decodeDelimited
|
|
29614
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
29615
|
+
* @static
|
|
29616
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
29617
|
+
* @returns {fs.FSSyncStatusRequestBody} FSSyncStatusRequestBody
|
|
29618
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
29619
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
29620
|
+
*/
|
|
29621
|
+
FSSyncStatusRequestBody.decodeDelimited = function decodeDelimited(reader) {
|
|
29622
|
+
if (!(reader instanceof $Reader))
|
|
29623
|
+
reader = new $Reader(reader);
|
|
29624
|
+
return this.decode(reader, reader.uint32());
|
|
29625
|
+
};
|
|
29626
|
+
|
|
29627
|
+
/**
|
|
29628
|
+
* Verifies a FSSyncStatusRequestBody message.
|
|
29629
|
+
* @function verify
|
|
29630
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
29631
|
+
* @static
|
|
29632
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
29633
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
29634
|
+
*/
|
|
29635
|
+
FSSyncStatusRequestBody.verify = function verify(message) {
|
|
29636
|
+
if (typeof message !== "object" || message === null)
|
|
29637
|
+
return "object expected";
|
|
29638
|
+
if (message.path != null && message.hasOwnProperty("path"))
|
|
29639
|
+
if (!$util.isString(message.path))
|
|
29640
|
+
return "path: string expected";
|
|
29641
|
+
if (message.skipServerCheck != null && message.hasOwnProperty("skipServerCheck"))
|
|
29642
|
+
if (typeof message.skipServerCheck !== "boolean")
|
|
29643
|
+
return "skipServerCheck: boolean expected";
|
|
29644
|
+
return null;
|
|
29645
|
+
};
|
|
29646
|
+
|
|
29647
|
+
/**
|
|
29648
|
+
* Creates a FSSyncStatusRequestBody message from a plain object. Also converts values to their respective internal types.
|
|
29649
|
+
* @function fromObject
|
|
29650
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
29651
|
+
* @static
|
|
29652
|
+
* @param {Object.<string,*>} object Plain object
|
|
29653
|
+
* @returns {fs.FSSyncStatusRequestBody} FSSyncStatusRequestBody
|
|
29654
|
+
*/
|
|
29655
|
+
FSSyncStatusRequestBody.fromObject = function fromObject(object) {
|
|
29656
|
+
if (object instanceof $root.fs.FSSyncStatusRequestBody)
|
|
29657
|
+
return object;
|
|
29658
|
+
var message = new $root.fs.FSSyncStatusRequestBody();
|
|
29659
|
+
if (object.path != null)
|
|
29660
|
+
message.path = String(object.path);
|
|
29661
|
+
if (object.skipServerCheck != null)
|
|
29662
|
+
message.skipServerCheck = Boolean(object.skipServerCheck);
|
|
29663
|
+
return message;
|
|
29664
|
+
};
|
|
29665
|
+
|
|
29666
|
+
/**
|
|
29667
|
+
* Creates a plain object from a FSSyncStatusRequestBody message. Also converts values to other types if specified.
|
|
29668
|
+
* @function toObject
|
|
29669
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
29670
|
+
* @static
|
|
29671
|
+
* @param {fs.FSSyncStatusRequestBody} message FSSyncStatusRequestBody
|
|
29672
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
29673
|
+
* @returns {Object.<string,*>} Plain object
|
|
29674
|
+
*/
|
|
29675
|
+
FSSyncStatusRequestBody.toObject = function toObject(message, options) {
|
|
29676
|
+
if (!options)
|
|
29677
|
+
options = {};
|
|
29678
|
+
var object = {};
|
|
29679
|
+
if (options.defaults) {
|
|
29680
|
+
object.path = "";
|
|
29681
|
+
object.skipServerCheck = false;
|
|
29682
|
+
}
|
|
29683
|
+
if (message.path != null && message.hasOwnProperty("path"))
|
|
29684
|
+
object.path = message.path;
|
|
29685
|
+
if (message.skipServerCheck != null && message.hasOwnProperty("skipServerCheck"))
|
|
29686
|
+
object.skipServerCheck = message.skipServerCheck;
|
|
29687
|
+
return object;
|
|
29688
|
+
};
|
|
29689
|
+
|
|
29690
|
+
/**
|
|
29691
|
+
* Converts this FSSyncStatusRequestBody to JSON.
|
|
29692
|
+
* @function toJSON
|
|
29693
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
29694
|
+
* @instance
|
|
29695
|
+
* @returns {Object.<string,*>} JSON object
|
|
29696
|
+
*/
|
|
29697
|
+
FSSyncStatusRequestBody.prototype.toJSON = function toJSON() {
|
|
29698
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
29699
|
+
};
|
|
29700
|
+
|
|
29701
|
+
/**
|
|
29702
|
+
* Gets the default type url for FSSyncStatusRequestBody
|
|
29703
|
+
* @function getTypeUrl
|
|
29704
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
29705
|
+
* @static
|
|
29706
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
29707
|
+
* @returns {string} The default type url
|
|
29708
|
+
*/
|
|
29709
|
+
FSSyncStatusRequestBody.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
29710
|
+
if (typeUrlPrefix === undefined) {
|
|
29711
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
29712
|
+
}
|
|
29713
|
+
return typeUrlPrefix + "/fs.FSSyncStatusRequestBody";
|
|
29714
|
+
};
|
|
29715
|
+
|
|
29716
|
+
return FSSyncStatusRequestBody;
|
|
29717
|
+
})();
|
|
29718
|
+
|
|
29490
29719
|
fs.FSSyncIsOnDiskRequestBody = (function() {
|
|
29491
29720
|
|
|
29492
29721
|
/**
|
package/build/protos/fs.proto.js
CHANGED
|
@@ -11972,6 +11972,235 @@ $root.fs = (function() {
|
|
|
11972
11972
|
return ArchiveCurrentRequestBody;
|
|
11973
11973
|
})();
|
|
11974
11974
|
|
|
11975
|
+
fs.FSSyncStatusRequestBody = (function() {
|
|
11976
|
+
|
|
11977
|
+
/**
|
|
11978
|
+
* Properties of a FSSyncStatusRequestBody.
|
|
11979
|
+
* @memberof fs
|
|
11980
|
+
* @interface IFSSyncStatusRequestBody
|
|
11981
|
+
* @property {string|null} [path] FSSyncStatusRequestBody path
|
|
11982
|
+
* @property {boolean|null} [skipServerCheck] FSSyncStatusRequestBody skipServerCheck
|
|
11983
|
+
*/
|
|
11984
|
+
|
|
11985
|
+
/**
|
|
11986
|
+
* Constructs a new FSSyncStatusRequestBody.
|
|
11987
|
+
* @memberof fs
|
|
11988
|
+
* @classdesc Represents a FSSyncStatusRequestBody.
|
|
11989
|
+
* @implements IFSSyncStatusRequestBody
|
|
11990
|
+
* @constructor
|
|
11991
|
+
* @param {fs.IFSSyncStatusRequestBody=} [properties] Properties to set
|
|
11992
|
+
*/
|
|
11993
|
+
function FSSyncStatusRequestBody(properties) {
|
|
11994
|
+
if (properties)
|
|
11995
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
11996
|
+
if (properties[keys[i]] != null)
|
|
11997
|
+
this[keys[i]] = properties[keys[i]];
|
|
11998
|
+
}
|
|
11999
|
+
|
|
12000
|
+
/**
|
|
12001
|
+
* FSSyncStatusRequestBody path.
|
|
12002
|
+
* @member {string} path
|
|
12003
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
12004
|
+
* @instance
|
|
12005
|
+
*/
|
|
12006
|
+
FSSyncStatusRequestBody.prototype.path = "";
|
|
12007
|
+
|
|
12008
|
+
/**
|
|
12009
|
+
* FSSyncStatusRequestBody skipServerCheck.
|
|
12010
|
+
* @member {boolean} skipServerCheck
|
|
12011
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
12012
|
+
* @instance
|
|
12013
|
+
*/
|
|
12014
|
+
FSSyncStatusRequestBody.prototype.skipServerCheck = false;
|
|
12015
|
+
|
|
12016
|
+
/**
|
|
12017
|
+
* Creates a new FSSyncStatusRequestBody instance using the specified properties.
|
|
12018
|
+
* @function create
|
|
12019
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
12020
|
+
* @static
|
|
12021
|
+
* @param {fs.IFSSyncStatusRequestBody=} [properties] Properties to set
|
|
12022
|
+
* @returns {fs.FSSyncStatusRequestBody} FSSyncStatusRequestBody instance
|
|
12023
|
+
*/
|
|
12024
|
+
FSSyncStatusRequestBody.create = function create(properties) {
|
|
12025
|
+
return new FSSyncStatusRequestBody(properties);
|
|
12026
|
+
};
|
|
12027
|
+
|
|
12028
|
+
/**
|
|
12029
|
+
* Encodes the specified FSSyncStatusRequestBody message. Does not implicitly {@link fs.FSSyncStatusRequestBody.verify|verify} messages.
|
|
12030
|
+
* @function encode
|
|
12031
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
12032
|
+
* @static
|
|
12033
|
+
* @param {fs.IFSSyncStatusRequestBody} message FSSyncStatusRequestBody message or plain object to encode
|
|
12034
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
12035
|
+
* @returns {$protobuf.Writer} Writer
|
|
12036
|
+
*/
|
|
12037
|
+
FSSyncStatusRequestBody.encode = function encode(message, writer) {
|
|
12038
|
+
if (!writer)
|
|
12039
|
+
writer = $Writer.create();
|
|
12040
|
+
if (message.path != null && Object.hasOwnProperty.call(message, "path"))
|
|
12041
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.path);
|
|
12042
|
+
if (message.skipServerCheck != null && Object.hasOwnProperty.call(message, "skipServerCheck"))
|
|
12043
|
+
writer.uint32(/* id 2, wireType 0 =*/16).bool(message.skipServerCheck);
|
|
12044
|
+
return writer;
|
|
12045
|
+
};
|
|
12046
|
+
|
|
12047
|
+
/**
|
|
12048
|
+
* Encodes the specified FSSyncStatusRequestBody message, length delimited. Does not implicitly {@link fs.FSSyncStatusRequestBody.verify|verify} messages.
|
|
12049
|
+
* @function encodeDelimited
|
|
12050
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
12051
|
+
* @static
|
|
12052
|
+
* @param {fs.IFSSyncStatusRequestBody} message FSSyncStatusRequestBody message or plain object to encode
|
|
12053
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
12054
|
+
* @returns {$protobuf.Writer} Writer
|
|
12055
|
+
*/
|
|
12056
|
+
FSSyncStatusRequestBody.encodeDelimited = function encodeDelimited(message, writer) {
|
|
12057
|
+
return this.encode(message, writer).ldelim();
|
|
12058
|
+
};
|
|
12059
|
+
|
|
12060
|
+
/**
|
|
12061
|
+
* Decodes a FSSyncStatusRequestBody message from the specified reader or buffer.
|
|
12062
|
+
* @function decode
|
|
12063
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
12064
|
+
* @static
|
|
12065
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
12066
|
+
* @param {number} [length] Message length if known beforehand
|
|
12067
|
+
* @returns {fs.FSSyncStatusRequestBody} FSSyncStatusRequestBody
|
|
12068
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
12069
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
12070
|
+
*/
|
|
12071
|
+
FSSyncStatusRequestBody.decode = function decode(reader, length, error) {
|
|
12072
|
+
if (!(reader instanceof $Reader))
|
|
12073
|
+
reader = $Reader.create(reader);
|
|
12074
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.fs.FSSyncStatusRequestBody();
|
|
12075
|
+
while (reader.pos < end) {
|
|
12076
|
+
var tag = reader.uint32();
|
|
12077
|
+
if (tag === error)
|
|
12078
|
+
break;
|
|
12079
|
+
switch (tag >>> 3) {
|
|
12080
|
+
case 1: {
|
|
12081
|
+
message.path = reader.string();
|
|
12082
|
+
break;
|
|
12083
|
+
}
|
|
12084
|
+
case 2: {
|
|
12085
|
+
message.skipServerCheck = reader.bool();
|
|
12086
|
+
break;
|
|
12087
|
+
}
|
|
12088
|
+
default:
|
|
12089
|
+
reader.skipType(tag & 7);
|
|
12090
|
+
break;
|
|
12091
|
+
}
|
|
12092
|
+
}
|
|
12093
|
+
return message;
|
|
12094
|
+
};
|
|
12095
|
+
|
|
12096
|
+
/**
|
|
12097
|
+
* Decodes a FSSyncStatusRequestBody message from the specified reader or buffer, length delimited.
|
|
12098
|
+
* @function decodeDelimited
|
|
12099
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
12100
|
+
* @static
|
|
12101
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
12102
|
+
* @returns {fs.FSSyncStatusRequestBody} FSSyncStatusRequestBody
|
|
12103
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
12104
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
12105
|
+
*/
|
|
12106
|
+
FSSyncStatusRequestBody.decodeDelimited = function decodeDelimited(reader) {
|
|
12107
|
+
if (!(reader instanceof $Reader))
|
|
12108
|
+
reader = new $Reader(reader);
|
|
12109
|
+
return this.decode(reader, reader.uint32());
|
|
12110
|
+
};
|
|
12111
|
+
|
|
12112
|
+
/**
|
|
12113
|
+
* Verifies a FSSyncStatusRequestBody message.
|
|
12114
|
+
* @function verify
|
|
12115
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
12116
|
+
* @static
|
|
12117
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
12118
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
12119
|
+
*/
|
|
12120
|
+
FSSyncStatusRequestBody.verify = function verify(message) {
|
|
12121
|
+
if (typeof message !== "object" || message === null)
|
|
12122
|
+
return "object expected";
|
|
12123
|
+
if (message.path != null && message.hasOwnProperty("path"))
|
|
12124
|
+
if (!$util.isString(message.path))
|
|
12125
|
+
return "path: string expected";
|
|
12126
|
+
if (message.skipServerCheck != null && message.hasOwnProperty("skipServerCheck"))
|
|
12127
|
+
if (typeof message.skipServerCheck !== "boolean")
|
|
12128
|
+
return "skipServerCheck: boolean expected";
|
|
12129
|
+
return null;
|
|
12130
|
+
};
|
|
12131
|
+
|
|
12132
|
+
/**
|
|
12133
|
+
* Creates a FSSyncStatusRequestBody message from a plain object. Also converts values to their respective internal types.
|
|
12134
|
+
* @function fromObject
|
|
12135
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
12136
|
+
* @static
|
|
12137
|
+
* @param {Object.<string,*>} object Plain object
|
|
12138
|
+
* @returns {fs.FSSyncStatusRequestBody} FSSyncStatusRequestBody
|
|
12139
|
+
*/
|
|
12140
|
+
FSSyncStatusRequestBody.fromObject = function fromObject(object) {
|
|
12141
|
+
if (object instanceof $root.fs.FSSyncStatusRequestBody)
|
|
12142
|
+
return object;
|
|
12143
|
+
var message = new $root.fs.FSSyncStatusRequestBody();
|
|
12144
|
+
if (object.path != null)
|
|
12145
|
+
message.path = String(object.path);
|
|
12146
|
+
if (object.skipServerCheck != null)
|
|
12147
|
+
message.skipServerCheck = Boolean(object.skipServerCheck);
|
|
12148
|
+
return message;
|
|
12149
|
+
};
|
|
12150
|
+
|
|
12151
|
+
/**
|
|
12152
|
+
* Creates a plain object from a FSSyncStatusRequestBody message. Also converts values to other types if specified.
|
|
12153
|
+
* @function toObject
|
|
12154
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
12155
|
+
* @static
|
|
12156
|
+
* @param {fs.FSSyncStatusRequestBody} message FSSyncStatusRequestBody
|
|
12157
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
12158
|
+
* @returns {Object.<string,*>} Plain object
|
|
12159
|
+
*/
|
|
12160
|
+
FSSyncStatusRequestBody.toObject = function toObject(message, options) {
|
|
12161
|
+
if (!options)
|
|
12162
|
+
options = {};
|
|
12163
|
+
var object = {};
|
|
12164
|
+
if (options.defaults) {
|
|
12165
|
+
object.path = "";
|
|
12166
|
+
object.skipServerCheck = false;
|
|
12167
|
+
}
|
|
12168
|
+
if (message.path != null && message.hasOwnProperty("path"))
|
|
12169
|
+
object.path = message.path;
|
|
12170
|
+
if (message.skipServerCheck != null && message.hasOwnProperty("skipServerCheck"))
|
|
12171
|
+
object.skipServerCheck = message.skipServerCheck;
|
|
12172
|
+
return object;
|
|
12173
|
+
};
|
|
12174
|
+
|
|
12175
|
+
/**
|
|
12176
|
+
* Converts this FSSyncStatusRequestBody to JSON.
|
|
12177
|
+
* @function toJSON
|
|
12178
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
12179
|
+
* @instance
|
|
12180
|
+
* @returns {Object.<string,*>} JSON object
|
|
12181
|
+
*/
|
|
12182
|
+
FSSyncStatusRequestBody.prototype.toJSON = function toJSON() {
|
|
12183
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
12184
|
+
};
|
|
12185
|
+
|
|
12186
|
+
/**
|
|
12187
|
+
* Gets the default type url for FSSyncStatusRequestBody
|
|
12188
|
+
* @function getTypeUrl
|
|
12189
|
+
* @memberof fs.FSSyncStatusRequestBody
|
|
12190
|
+
* @static
|
|
12191
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
12192
|
+
* @returns {string} The default type url
|
|
12193
|
+
*/
|
|
12194
|
+
FSSyncStatusRequestBody.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
12195
|
+
if (typeUrlPrefix === undefined) {
|
|
12196
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
12197
|
+
}
|
|
12198
|
+
return typeUrlPrefix + "/fs.FSSyncStatusRequestBody";
|
|
12199
|
+
};
|
|
12200
|
+
|
|
12201
|
+
return FSSyncStatusRequestBody;
|
|
12202
|
+
})();
|
|
12203
|
+
|
|
11975
12204
|
fs.FSSyncIsOnDiskRequestBody = (function() {
|
|
11976
12205
|
|
|
11977
12206
|
/**
|
package/package.json
CHANGED
package/protos/file.proto
CHANGED
|
@@ -266,13 +266,9 @@ message ArchiveCurrentRequestBody {
|
|
|
266
266
|
// ==== ReadonlyFileSyncAPI referable object ====
|
|
267
267
|
|
|
268
268
|
// --- ReadonlyFileSyncAPI.status ---
|
|
269
|
-
// Request body is
|
|
269
|
+
// Request body is common.BooleanValue
|
|
270
270
|
// Reply body is SyncStatusMsg
|
|
271
271
|
|
|
272
|
-
// --- ReadonlyFileSyncAPI.updateStatusInfo ---
|
|
273
|
-
// Request body is PathOnlyRequestBody
|
|
274
|
-
// Reply body is SyncState
|
|
275
|
-
|
|
276
272
|
// --- ReadonlyFileSyncAPI.isRemoteVersionOnDisk ---
|
|
277
273
|
message FileSyncIsOnDiskRequestBody {
|
|
278
274
|
uint64 version = 1;
|
package/protos/fs.proto
CHANGED
|
@@ -464,12 +464,11 @@ message ArchiveCurrentRequestBody {
|
|
|
464
464
|
// ==== ReadonlyFSSyncAPI referable object ====
|
|
465
465
|
|
|
466
466
|
// --- ReadonlyFSSyncAPI.status ---
|
|
467
|
-
//
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
// Reply body is file.SyncState
|
|
467
|
+
// Reply body is file.SyncStatusMsg
|
|
468
|
+
message FSSyncStatusRequestBody {
|
|
469
|
+
string path = 1;
|
|
470
|
+
bool skip_server_check = 2;
|
|
471
|
+
}
|
|
473
472
|
|
|
474
473
|
// --- ReadonlyFSSyncAPI.isRemoteVersionOnDisk ---
|
|
475
474
|
message FSSyncIsOnDiskRequestBody {
|