core-3nweb-client-lib 0.30.3 → 0.30.4
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/asmail.d.ts +9 -6
- package/build/core/app-files.d.ts +4 -4
- package/build/core/app-files.js +2 -2
- package/build/core/asmail/asmail-cap-ipc.d.ts +1 -1
- package/build/core/asmail/asmail-cap-ipc.js +2 -3
- package/build/core/asmail/config/common.d.ts +2 -2
- package/build/core/asmail/config/index.d.ts +1 -1
- package/build/core/asmail/config/invitations-anon.d.ts +1 -1
- package/build/core/asmail/config/invitations-anon.js +1 -2
- package/build/core/asmail/config/published-intro-key.d.ts +2 -2
- package/build/core/asmail/config/published-intro-key.js +1 -2
- package/build/core/asmail/delivery/common.d.ts +6 -6
- package/build/core/asmail/delivery/common.js +3 -3
- package/build/core/asmail/delivery/index.d.ts +4 -4
- package/build/core/asmail/delivery/msg.d.ts +4 -4
- package/build/core/asmail/delivery/msg.js +3 -3
- package/build/core/asmail/inbox/attachments/fs.d.ts +1 -1
- package/build/core/asmail/inbox/attachments/fs.js +1 -2
- package/build/core/asmail/inbox/inbox-events.d.ts +4 -3
- package/build/core/asmail/inbox/inbox-events.js +1 -1
- package/build/core/asmail/inbox/index.d.ts +2 -2
- package/build/core/asmail/inbox/index.js +7 -4
- package/build/core/asmail/inbox/msg-indexing/index.d.ts +2 -2
- package/build/core/asmail/inbox/msg-indexing/logs-n-entries.d.ts +3 -3
- package/build/core/asmail/inbox/msg-indexing/logs-n-entries.js +2 -2
- package/build/core/asmail/inbox/msg-indexing/sql-indexing.d.ts +1 -1
- package/build/core/asmail/inbox/msg-indexing/sql-indexing.js +1 -2
- package/build/core/asmail/inbox/msg-on-disk.d.ts +2 -2
- package/build/core/asmail/inbox/msg-on-disk.js +3 -3
- package/build/core/asmail/index.d.ts +3 -3
- package/build/core/asmail/key-verification.js +2 -3
- package/build/core/asmail/keyring/common.d.ts +1 -1
- package/build/core/asmail/keyring/common.js +7 -7
- package/build/core/asmail/keyring/correspondent-keys.d.ts +1 -1
- package/build/core/asmail/keyring/correspondent-keys.js +5 -5
- package/build/core/asmail/keyring/index.d.ts +3 -3
- package/build/core/asmail/keyring/index.js +2 -2
- package/build/core/asmail/keyring/keyring-storage.d.ts +1 -1
- package/build/core/asmail/keyring/keyring-storage.js +1 -2
- package/build/core/asmail/msg/attachments-container.d.ts +3 -3
- package/build/core/asmail/msg/attachments-container.js +7 -8
- package/build/core/asmail/msg/opener.js +2 -2
- package/build/core/asmail/msg/packer.d.ts +2 -2
- package/build/core/asmail/sending-params/index.d.ts +3 -3
- package/build/core/asmail/sending-params/own-params.d.ts +3 -3
- package/build/core/asmail/sending-params/params-from-others.d.ts +3 -3
- package/build/core/id-manager/index.d.ts +4 -4
- package/build/core/id-manager/key-storage.d.ts +1 -1
- package/build/core/id-manager/mailerid-cap-ipc.d.ts +1 -1
- package/build/core/id-manager/mailerid-cap-ipc.js +2 -3
- package/build/core/index.d.ts +3 -3
- package/build/core/startup/sign-in.d.ts +6 -6
- package/build/core/startup/sign-in.js +2 -2
- package/build/core/startup/sign-up.d.ts +1 -1
- package/build/core/startup/sign-up.js +6 -6
- package/build/core/startup/startup-cap.d.ts +2 -2
- package/build/core/startup/startup-cap.js +4 -5
- package/build/core/storage/common/obj-info-file.js +12 -13
- package/build/core/storage/common/utils.js +2 -3
- package/build/core/storage/index.d.ts +5 -5
- package/build/core/storage/index.js +2 -2
- package/build/core/storage/local/storage.d.ts +3 -3
- package/build/core/storage/storage-cap-ipc.d.ts +1 -1
- package/build/core/storage/storage-cap-ipc.js +3 -4
- package/build/core/storage/synced/obj-files.d.ts +1 -1
- package/build/core/storage/synced/obj-status.d.ts +2 -2
- package/build/core/storage/synced/obj-status.js +2 -2
- package/build/core/storage/synced/storage.d.ts +4 -4
- package/build/core/storage/synced/upload-header-file.js +3 -3
- package/build/core/storage/synced/upsyncer.d.ts +1 -1
- package/build/core/storage/system-folders/apps-data.d.ts +1 -1
- package/build/core/storage/system-folders/index.d.ts +2 -2
- package/build/core/storage/system-folders/index.js +4 -4
- package/build/core-ipc/bytes.d.ts +2 -2
- package/build/core-ipc/bytes.js +4 -5
- package/build/core-ipc/common-caps.d.ts +1 -1
- package/build/core-ipc/common-caps.js +3 -4
- package/build/core-ipc/file.d.ts +13 -14
- package/build/core-ipc/file.js +31 -31
- package/build/core-ipc/fs.d.ts +3 -3
- package/build/core-ipc/fs.js +6 -6
- package/build/core-ipc/generic.d.ts +4 -4
- package/build/core-ipc/generic.js +3 -4
- package/build/core-ipc/log-cap.d.ts +1 -1
- package/build/core-ipc/log-cap.js +2 -3
- package/build/core-ipc/startup-caps.d.ts +1 -1
- package/build/core-ipc/startup-caps.js +2 -3
- package/build/ipc-via-protobuf/connector.d.ts +6 -7
- package/build/ipc-via-protobuf/connector.js +3 -3
- package/build/ipc-via-protobuf/protobuf-msg.d.ts +1 -2
- package/build/ipc-via-protobuf/protobuf-msg.js +20 -20
- package/build/lib-client/3nstorage/exceptions.d.ts +1 -1
- package/build/lib-client/3nstorage/exceptions.js +9 -10
- package/build/lib-client/3nstorage/service.d.ts +2 -2
- package/build/lib-client/3nstorage/util/file-based-json.d.ts +3 -3
- package/build/lib-client/3nstorage/util/for-arrays.js +1 -2
- package/build/lib-client/3nstorage/xsp-fs/attrs.d.ts +1 -2
- package/build/lib-client/3nstorage/xsp-fs/common.d.ts +12 -12
- package/build/lib-client/3nstorage/xsp-fs/common.js +5 -5
- package/build/lib-client/3nstorage/xsp-fs/file-node.d.ts +4 -4
- package/build/lib-client/3nstorage/xsp-fs/file.d.ts +15 -15
- package/build/lib-client/3nstorage/xsp-fs/folder-node-serialization.js +2 -3
- package/build/lib-client/3nstorage/xsp-fs/folder-node.d.ts +7 -7
- package/build/lib-client/3nstorage/xsp-fs/fs.d.ts +27 -27
- package/build/lib-client/3nstorage/xsp-fs/link-node.d.ts +2 -2
- package/build/lib-client/3nstorage/xsp-fs/node-in-fs.d.ts +7 -7
- package/build/lib-client/3nstorage/xsp-fs/node-in-fs.js +11 -11
- package/build/lib-client/3nstorage/xsp-fs/node-persistence.d.ts +2 -2
- package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v1.js +1 -2
- package/build/lib-client/3nstorage/xsp-fs/xsp-payload-v2.js +3 -4
- package/build/lib-client/3nweb-signup.js +4 -5
- package/build/lib-client/asmail/recipient.d.ts +1 -1
- package/build/lib-client/asmail/recipient.js +4 -4
- package/build/lib-client/asmail/sender.d.ts +3 -3
- package/build/lib-client/asmail/sender.js +9 -9
- package/build/lib-client/cryptor/cryptor-in-worker.d.ts +2 -2
- package/build/lib-client/cryptor/cryptor.d.ts +2 -2
- package/build/lib-client/cryptor/cryptor.js +3 -3
- package/build/lib-client/cryptor/in-proc-js.js +1 -2
- package/build/lib-client/cryptor/in-proc-wasm.js +1 -2
- package/build/lib-client/cryptor/serialization-for-wasm.d.ts +1 -2
- package/build/lib-client/cryptor/serialization-for-wasm.js +6 -7
- package/build/lib-client/cryptor/wasm-mp1-modules.js +1 -2
- package/build/lib-client/cryptor-work-labels.js +1 -1
- package/build/lib-client/fs-utils/files-select.d.ts +3 -3
- package/build/lib-client/fs-utils/files-select.js +1 -2
- package/build/lib-client/fs-utils/files.d.ts +7 -7
- package/build/lib-client/fs-utils/files.js +7 -8
- package/build/lib-client/fs-utils/fs-collection.d.ts +1 -1
- package/build/lib-client/fs-utils/fs-collection.js +2 -3
- package/build/lib-client/fs-utils/fs-sync-utils.d.ts +5 -5
- package/build/lib-client/fs-utils/fs-sync-utils.js +4 -5
- package/build/lib-client/fs-utils/fs-view.d.ts +4 -4
- package/build/lib-client/fs-utils/fs-view.js +1 -2
- package/build/lib-client/key-derivation.js +3 -4
- package/build/lib-client/local-files/dev-file-sink.d.ts +2 -3
- package/build/lib-client/local-files/dev-file-src.d.ts +0 -1
- package/build/lib-client/local-files/device-fs.d.ts +18 -18
- package/build/lib-client/logging/log-to-file.d.ts +5 -5
- package/build/lib-client/logging/log-to-file.js +2 -2
- package/build/lib-client/mailer-id/login.js +2 -3
- package/build/lib-client/objs-on-disk/file-writing-proc.d.ts +1 -1
- package/build/lib-client/objs-on-disk/obj-folders.d.ts +1 -1
- package/build/lib-client/objs-on-disk/obj-folders.js +3 -3
- package/build/lib-client/objs-on-disk/obj-on-disk.d.ts +1 -1
- package/build/lib-client/protobuf-type.d.ts +0 -1
- package/build/lib-client/request-utils.d.ts +2 -4
- package/build/lib-client/request-utils.js +6 -6
- package/build/lib-client/service-locator.d.ts +3 -4
- package/build/lib-client/service-locator.js +5 -6
- package/build/lib-client/user-with-mid-session.d.ts +1 -1
- package/build/lib-client/user-with-mid-session.js +17 -17
- package/build/lib-client/user-with-pkl-session.js +16 -16
- package/build/lib-client/ws-utils.js +1 -2
- package/build/lib-common/assert.js +1 -2
- package/build/lib-common/async-cryptor-wrap.js +4 -5
- package/build/lib-common/async-fs-node.d.ts +0 -3
- package/build/lib-common/async-fs-node.js +35 -35
- package/build/lib-common/async-iter.js +2 -3
- package/build/lib-common/big-endian.d.ts +0 -1
- package/build/lib-common/big-endian.js +10 -11
- package/build/lib-common/binding.js +1 -2
- package/build/lib-common/buffer-utils.d.ts +0 -1
- package/build/lib-common/buffer-utils.js +9 -9
- package/build/lib-common/byte-streaming/bytes-fifo-buffer.js +5 -5
- package/build/lib-common/byte-streaming/pipe.d.ts +2 -2
- package/build/lib-common/byte-streaming/pipe.js +1 -2
- package/build/lib-common/byte-streaming/wrapping.d.ts +2 -2
- package/build/lib-common/byte-streaming/wrapping.js +3 -4
- package/build/lib-common/bytes-equal.js +1 -2
- package/build/lib-common/canonical-address.js +3 -4
- package/build/lib-common/exceptions/error.js +3 -4
- package/build/lib-common/exceptions/file.d.ts +2 -2
- package/build/lib-common/exceptions/file.js +7 -7
- package/build/lib-common/exceptions/http.js +2 -3
- package/build/lib-common/exceptions/runtime.js +1 -2
- package/build/lib-common/ipc/generic-ipc.d.ts +3 -3
- package/build/lib-common/ipc/generic-ipc.js +11 -11
- package/build/lib-common/ipc/ws-ipc.js +2 -2
- package/build/lib-common/json-utils.js +4 -5
- package/build/lib-common/jwkeys.d.ts +1 -1
- package/build/lib-common/jwkeys.js +13 -13
- package/build/lib-common/mid-sigs-NaCl-Ed.d.ts +3 -3
- package/build/lib-common/mid-sigs-NaCl-Ed.js +5 -5
- package/build/lib-common/obj-streaming/sink-utils.d.ts +2 -2
- package/build/lib-common/obj-streaming/sink-utils.js +2 -3
- package/build/lib-common/obj-streaming/wrapping.js +1 -2
- package/build/lib-common/objs-on-disk/file-layout.d.ts +4 -5
- package/build/lib-common/objs-on-disk/obj-file.d.ts +0 -1
- package/build/lib-common/objs-on-disk/utils.d.ts +3 -5
- package/build/lib-common/objs-on-disk/utils.js +5 -6
- package/build/lib-common/objs-on-disk/v1-obj-file-format.d.ts +0 -1
- package/build/lib-common/objs-on-disk/v1-obj-file-format.js +1 -1
- package/build/lib-common/processes/deferred.js +1 -2
- package/build/lib-common/processes/sleep.js +1 -2
- package/build/lib-common/processes/synced.d.ts +1 -1
- package/build/lib-common/processes/synced.js +2 -2
- package/build/lib-common/processes/timeout.js +1 -2
- package/build/lib-common/random-node.js +10 -11
- package/build/lib-common/service-api/3nstorage/owner.js +19 -19
- package/build/lib-common/service-api/asmail/config.js +3 -3
- package/build/lib-common/service-api/asmail/delivery.js +8 -8
- package/build/lib-common/service-api/asmail/retrieval.js +11 -11
- package/build/lib-common/service-api/mailer-id/login.js +2 -2
- package/build/lib-common/service-api/mailer-id/provisioning.js +2 -2
- package/build/lib-common/service-api/pub-key-login.js +2 -2
- package/build/lib-common/service-api/web-socket-base.d.ts +1 -1
- package/build/lib-common/service-api/web-socket-base.js +3 -3
- package/build/lib-common/session-encryptor.js +1 -2
- package/build/lib-common/timed-cache.js +1 -2
- package/build/lib-common/user-admin-api/signup.js +4 -4
- package/build/lib-common/utils-for-observables.js +5 -5
- package/build/lib-sqlite-on-3nstorage/deferred.js +1 -2
- package/build/lib-sqlite-on-3nstorage/index.d.ts +5 -5
- package/build/lib-sqlite-on-3nstorage/index.js +2 -2
- package/build/lib-sqlite-on-3nstorage/synced.d.ts +1 -1
- package/build/lib-sqlite-on-3nstorage/synced.js +2 -2
- package/build/raw-3nweb-clients.d.ts +7 -7
- package/build/raw-3nweb-clients.js +2 -2
- package/package.json +2 -2
|
@@ -41,7 +41,7 @@ export declare class ObjFiles {
|
|
|
41
41
|
findObjsToRemoveOnRemote(): Observable<ObjId>;
|
|
42
42
|
scheduleGC(obj: SyncedObj): void;
|
|
43
43
|
}
|
|
44
|
-
export
|
|
44
|
+
export type SynchronizerOnObjId = <T>(objId: ObjId, action: () => Promise<T>) => Promise<T>;
|
|
45
45
|
export declare class SyncedObj {
|
|
46
46
|
readonly objId: ObjId;
|
|
47
47
|
readonly objFolder: string;
|
|
@@ -4,7 +4,7 @@ import { LogError } from '../../../lib-client/logging/log-to-file';
|
|
|
4
4
|
import { DiffInfo, ObjStatus as RemoteObjStatus } from '../../../lib-common/service-api/3nstorage/owner';
|
|
5
5
|
import { FiniteChunk } from '../../../lib-common/objs-on-disk/file-layout';
|
|
6
6
|
import { UploadStatusRecorder } from './upsyncer';
|
|
7
|
-
|
|
7
|
+
type SyncStatus = web3n.files.SyncStatus;
|
|
8
8
|
/**
|
|
9
9
|
* This is status information of an object in synced storage.
|
|
10
10
|
* Local references versions that haven't been synced/uploaded.
|
|
@@ -32,7 +32,7 @@ export interface SyncMarker {
|
|
|
32
32
|
export interface VersionsOnServer extends VersionsInfo {
|
|
33
33
|
isArchived?: boolean;
|
|
34
34
|
}
|
|
35
|
-
export
|
|
35
|
+
export type UploadInfo = NewVersionUpload | RemovalUpload;
|
|
36
36
|
export interface NewVersionUpload {
|
|
37
37
|
type: 'new-version';
|
|
38
38
|
localVersion: number;
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.
|
|
19
|
+
exports.ObjStatus = exports.STATUS_FILE_NAME = void 0;
|
|
20
|
+
exports.readAndCheckStatus = readAndCheckStatus;
|
|
20
21
|
const path_1 = require("path");
|
|
21
22
|
const exceptions_1 = require("../../../lib-client/3nstorage/exceptions");
|
|
22
23
|
const json_saving_1 = require("../common/json-saving");
|
|
@@ -583,7 +584,6 @@ async function readAndCheckStatus(objFolder, objId) {
|
|
|
583
584
|
}
|
|
584
585
|
return status;
|
|
585
586
|
}
|
|
586
|
-
exports.readAndCheckStatus = readAndCheckStatus;
|
|
587
587
|
function localVersionFromStatus(tagged) {
|
|
588
588
|
return (tagged ? {
|
|
589
589
|
latest: tagged.current,
|
|
@@ -6,10 +6,10 @@ import { AsyncSBoxCryptor, Subscribe, ObjSource } from 'xsp-files';
|
|
|
6
6
|
import { NetClient } from '../../../lib-client/request-utils';
|
|
7
7
|
import { Observable } from 'rxjs';
|
|
8
8
|
import { UploadHeaderChange } from '../../../lib-client/3nstorage/xsp-fs/common';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
type FolderEvent = web3n.files.FolderEvent;
|
|
10
|
+
type FileEvent = web3n.files.FileEvent;
|
|
11
|
+
type SyncStatus = web3n.files.SyncStatus;
|
|
12
|
+
type OptionsToAdopteRemote = web3n.files.OptionsToAdopteRemote;
|
|
13
13
|
export declare class SyncedStore implements ISyncedStorage {
|
|
14
14
|
private readonly files;
|
|
15
15
|
private readonly remoteStorage;
|
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.
|
|
19
|
+
exports.UPLOAD_HEADER_FILE_NAME_EXT = void 0;
|
|
20
|
+
exports.saveUploadHeaderFile = saveUploadHeaderFile;
|
|
21
|
+
exports.readUploadHeaderFromFile = readUploadHeaderFromFile;
|
|
20
22
|
const path_1 = require("path");
|
|
21
23
|
const async_fs_node_1 = require("../../../lib-common/async-fs-node");
|
|
22
24
|
const file_1 = require("../../../lib-common/exceptions/file");
|
|
@@ -28,7 +30,6 @@ async function saveUploadHeaderFile(objFolder, headers) {
|
|
|
28
30
|
const upFile = uploadHeaderFilePath(objFolder, headers.uploadVersion);
|
|
29
31
|
await (0, async_fs_node_1.writeFile)(upFile, bytes);
|
|
30
32
|
}
|
|
31
|
-
exports.saveUploadHeaderFile = saveUploadHeaderFile;
|
|
32
33
|
async function readUploadHeaderFromFile(objFolder, uploadVersion) {
|
|
33
34
|
try {
|
|
34
35
|
const upFile = uploadHeaderFilePath(objFolder, uploadVersion);
|
|
@@ -41,7 +42,6 @@ async function readUploadHeaderFromFile(objFolder, uploadVersion) {
|
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
|
-
exports.readUploadHeaderFromFile = readUploadHeaderFromFile;
|
|
45
45
|
function uploadHeaderFilePath(objFolder, uploadVersion) {
|
|
46
46
|
return (0, path_1.join)(objFolder, `${uploadVersion}.${exports.UPLOAD_HEADER_FILE_NAME_EXT}`);
|
|
47
47
|
}
|
|
@@ -4,7 +4,7 @@ import { MonoTypeOperatorFunction } from "rxjs";
|
|
|
4
4
|
import { FileWrite } from "../../../lib-client/objs-on-disk/file-writing-proc";
|
|
5
5
|
import { LogError } from "../../../lib-client/logging/log-to-file";
|
|
6
6
|
import { NewVersionUpload } from "./obj-status";
|
|
7
|
-
export
|
|
7
|
+
export type FileWriteTapOperator = MonoTypeOperatorFunction<FileWrite[]>;
|
|
8
8
|
export declare class UpSyncer {
|
|
9
9
|
private readonly remoteStorage;
|
|
10
10
|
private readonly logError;
|
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.
|
|
19
|
+
exports.sysFolders = void 0;
|
|
20
|
+
exports.initSysFolders = initSysFolders;
|
|
21
|
+
exports.userFilesOnDevice = userFilesOnDevice;
|
|
22
|
+
exports.sysFilesOnDevice = sysFilesOnDevice;
|
|
20
23
|
const fs_collection_1 = require("../../../lib-client/fs-utils/fs-collection");
|
|
21
24
|
const lib_index_1 = require("../../../lib-index");
|
|
22
25
|
exports.sysFolders = {
|
|
@@ -46,7 +49,6 @@ async function initSysFolders(root) {
|
|
|
46
49
|
await root.v.sync.upload('.');
|
|
47
50
|
}
|
|
48
51
|
}
|
|
49
|
-
exports.initSysFolders = initSysFolders;
|
|
50
52
|
async function userFilesOnDevice() {
|
|
51
53
|
if (process.platform === 'win32') {
|
|
52
54
|
return lib_index_1.DeviceFS.makeWritable(process.env.USERPROFILE);
|
|
@@ -55,7 +57,6 @@ async function userFilesOnDevice() {
|
|
|
55
57
|
return lib_index_1.DeviceFS.makeWritable(process.env.HOME);
|
|
56
58
|
}
|
|
57
59
|
}
|
|
58
|
-
exports.userFilesOnDevice = userFilesOnDevice;
|
|
59
60
|
async function sysFilesOnDevice() {
|
|
60
61
|
const c = (0, fs_collection_1.makeFSCollection)();
|
|
61
62
|
if (process.platform === 'win32') {
|
|
@@ -73,5 +74,4 @@ async function sysFilesOnDevice() {
|
|
|
73
74
|
}
|
|
74
75
|
return { isCollection: true, item: c };
|
|
75
76
|
}
|
|
76
|
-
exports.sysFilesOnDevice = sysFilesOnDevice;
|
|
77
77
|
Object.freeze(exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ObjectReference } from '../ipc-via-protobuf/protobuf-msg';
|
|
2
2
|
import { ExposedServices, Caller } from '../ipc-via-protobuf/connector';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type FileByteSink = web3n.files.FileByteSink;
|
|
4
|
+
type FileByteSource = web3n.files.FileByteSource;
|
|
5
5
|
export declare function makeSinkCaller(caller: Caller, ref: ObjectReference<'FileByteSink'>): FileByteSink;
|
|
6
6
|
export declare function exposeSinkService(sink: FileByteSink, expServices: ExposedServices): ObjectReference<'FileByteSink'>;
|
|
7
7
|
export declare function makeSrcCaller(caller: Caller, ref: ObjectReference<'FileByteSource'>): FileByteSource;
|
package/build/core-ipc/bytes.js
CHANGED
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.
|
|
19
|
+
exports.makeSinkCaller = makeSinkCaller;
|
|
20
|
+
exports.exposeSinkService = exposeSinkService;
|
|
21
|
+
exports.makeSrcCaller = makeSrcCaller;
|
|
22
|
+
exports.exposeSrcService = exposeSrcService;
|
|
20
23
|
const protobuf_msg_1 = require("../ipc-via-protobuf/protobuf-msg");
|
|
21
24
|
const protobuf_type_1 = require("../lib-client/protobuf-type");
|
|
22
25
|
const bytes_proto_1 = require("../protos/bytes.proto");
|
|
@@ -34,7 +37,6 @@ function makeSinkCaller(caller, ref) {
|
|
|
34
37
|
caller.registerClientDrop(sink, ref);
|
|
35
38
|
return sink;
|
|
36
39
|
}
|
|
37
|
-
exports.makeSinkCaller = makeSinkCaller;
|
|
38
40
|
function exposeSinkService(sink, expServices) {
|
|
39
41
|
const wrap = {
|
|
40
42
|
done: sinkDone.wrapService(sink.done),
|
|
@@ -46,7 +48,6 @@ function exposeSinkService(sink, expServices) {
|
|
|
46
48
|
const ref = expServices.exposeDroppableService('FileByteSink', wrap, sink);
|
|
47
49
|
return ref;
|
|
48
50
|
}
|
|
49
|
-
exports.exposeSinkService = exposeSinkService;
|
|
50
51
|
function makeSrcCaller(caller, ref) {
|
|
51
52
|
(0, connector_1.checkRefObjTypeIs)('FileByteSource', ref);
|
|
52
53
|
const objPath = ref.path;
|
|
@@ -60,7 +61,6 @@ function makeSrcCaller(caller, ref) {
|
|
|
60
61
|
caller.registerClientDrop(src, ref);
|
|
61
62
|
return src;
|
|
62
63
|
}
|
|
63
|
-
exports.makeSrcCaller = makeSrcCaller;
|
|
64
64
|
function exposeSrcService(src, expServices) {
|
|
65
65
|
const wrap = {
|
|
66
66
|
getPosition: srcGetPosition.wrapService(src.getPosition),
|
|
@@ -72,7 +72,6 @@ function exposeSrcService(src, expServices) {
|
|
|
72
72
|
const ref = expServices.exposeDroppableService('FileByteSource', wrap, src);
|
|
73
73
|
return ref;
|
|
74
74
|
}
|
|
75
|
-
exports.exposeSrcService = exposeSrcService;
|
|
76
75
|
var sinkGetSize;
|
|
77
76
|
(function (sinkGetSize) {
|
|
78
77
|
function wrapService(fn) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Caller, ExposedServices } from "../ipc-via-protobuf/connector";
|
|
2
2
|
import { ClientCAPsWraps, CAPsExposures, TypeDifference } from "./generic";
|
|
3
|
-
|
|
3
|
+
type W3N = web3n.caps.common.W3N;
|
|
4
4
|
export declare function exposeW3N<T extends W3N>(coreSide: ExposedServices, w3n: T, extraCAPs?: CAPsExposures<TypeDifference<T, W3N>>): void;
|
|
5
5
|
export declare function makeW3Nclient<T extends W3N>(clientSide: Caller, extraCAPs?: ClientCAPsWraps<TypeDifference<T, W3N>>): T;
|
|
6
6
|
export declare function promiseW3Nclient<T extends W3N>(clientSide: Caller, extraCAPs?: ClientCAPsWraps<TypeDifference<T, W3N>>): Promise<T>;
|
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.
|
|
19
|
+
exports.exposeW3N = exposeW3N;
|
|
20
|
+
exports.makeW3Nclient = makeW3Nclient;
|
|
21
|
+
exports.promiseW3Nclient = promiseW3Nclient;
|
|
20
22
|
const connector_1 = require("../ipc-via-protobuf/connector");
|
|
21
23
|
const log_cap_1 = require("./log-cap");
|
|
22
24
|
const asmail_cap_ipc_1 = require("../core/asmail/asmail-cap-ipc");
|
|
@@ -32,7 +34,6 @@ function exposeW3N(coreSide, w3n, extraCAPs) {
|
|
|
32
34
|
};
|
|
33
35
|
(0, generic_1.exposeCAPs)(coreSide, w3n, commonCAPsExposures, extraCAPs);
|
|
34
36
|
}
|
|
35
|
-
exports.exposeW3N = exposeW3N;
|
|
36
37
|
// This is not used, but it ensures that some require runs, providing function
|
|
37
38
|
// for protobuf-something.
|
|
38
39
|
const unused = connector_1.W3N_NAME;
|
|
@@ -45,7 +46,6 @@ function makeW3Nclient(clientSide, extraCAPs) {
|
|
|
45
46
|
};
|
|
46
47
|
return (0, generic_1.makeClientSide)(clientSide, mainCAPs, extraCAPs);
|
|
47
48
|
}
|
|
48
|
-
exports.makeW3Nclient = makeW3Nclient;
|
|
49
49
|
function promiseW3Nclient(clientSide, extraCAPs) {
|
|
50
50
|
const mainCAPs = {
|
|
51
51
|
log: log_cap_1.makeLogCaller,
|
|
@@ -55,5 +55,4 @@ function promiseW3Nclient(clientSide, extraCAPs) {
|
|
|
55
55
|
};
|
|
56
56
|
return (0, generic_1.promiseClientSide)(clientSide, mainCAPs, extraCAPs);
|
|
57
57
|
}
|
|
58
|
-
exports.promiseW3Nclient = promiseW3Nclient;
|
|
59
58
|
Object.freeze(exports);
|
package/build/core-ipc/file.d.ts
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { ObjectReference, Value } from "../ipc-via-protobuf/protobuf-msg";
|
|
3
2
|
import { ProtoType } from '../lib-client/protobuf-type';
|
|
4
3
|
import { ExposedFn, EnvelopeBody, Caller, ExposedServices } from "../ipc-via-protobuf/connector";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
type ReadonlyFile = web3n.files.ReadonlyFile;
|
|
5
|
+
type ReadonlyFileVersionedAPI = web3n.files.ReadonlyFileVersionedAPI;
|
|
6
|
+
type WritableFile = web3n.files.WritableFile;
|
|
7
|
+
type WritableFileVersionedAPI = web3n.files.WritableFileVersionedAPI;
|
|
8
|
+
type File = web3n.files.File;
|
|
9
|
+
type Stats = web3n.files.Stats;
|
|
10
|
+
type SyncStatus = web3n.files.SyncStatus;
|
|
11
|
+
type XAttrsChanges = web3n.files.XAttrsChanges;
|
|
12
|
+
type FileEvent = web3n.files.FileEvent;
|
|
13
|
+
type RemoteEvent = web3n.files.RemoteEvent;
|
|
14
|
+
type OptionsToAdopteRemote = web3n.files.OptionsToAdopteRemote;
|
|
15
|
+
type OptionsToUploadLocal = web3n.files.OptionsToUploadLocal;
|
|
16
|
+
type VersionedReadFlags = web3n.files.VersionedReadFlags;
|
|
18
17
|
export declare function makeFileCaller(caller: Caller, fileMsg: FileMsg): File;
|
|
19
18
|
export declare function exposeFileService(file: File, expServices: ExposedServices): FileMsg;
|
|
20
19
|
export interface FileMsg {
|
package/build/core-ipc/file.js
CHANGED
|
@@ -16,7 +16,27 @@
|
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.vListVersions = exports.
|
|
19
|
+
exports.vListVersions = exports.vGetByteSink = exports.updateXAttrs = exports.vGetByteSource = exports.vReadJSON = exports.vReadTxt = exports.vReadBytes = exports.vListXAttrs = exports.vGetXAttr = exports.readBytes = exports.fileMsgType = void 0;
|
|
20
|
+
exports.makeFileCaller = makeFileCaller;
|
|
21
|
+
exports.exposeFileService = exposeFileService;
|
|
22
|
+
exports.packStats = packStats;
|
|
23
|
+
exports.unpackStats = unpackStats;
|
|
24
|
+
exports.packSyncStatus = packSyncStatus;
|
|
25
|
+
exports.unpackSyncStatus = unpackSyncStatus;
|
|
26
|
+
exports.packXAttrValue = packXAttrValue;
|
|
27
|
+
exports.unpackXAttrValue = unpackXAttrValue;
|
|
28
|
+
exports.packJSON = packJSON;
|
|
29
|
+
exports.unpackJSON = unpackJSON;
|
|
30
|
+
exports.packFileEvent = packFileEvent;
|
|
31
|
+
exports.unpackFileEvent = unpackFileEvent;
|
|
32
|
+
exports.versionedReadFlagsFromMsg = versionedReadFlagsFromMsg;
|
|
33
|
+
exports.versionedReadFlagsToMsg = versionedReadFlagsToMsg;
|
|
34
|
+
exports.xattrToMsg = xattrToMsg;
|
|
35
|
+
exports.xattrFromMsg = xattrFromMsg;
|
|
36
|
+
exports.optionsToUploadLocalToMsg = optionsToUploadLocalToMsg;
|
|
37
|
+
exports.optionsToUploadLocalFromMsg = optionsToUploadLocalFromMsg;
|
|
38
|
+
exports.remoteAdoptionOptsToMsg = remoteAdoptionOptsToMsg;
|
|
39
|
+
exports.remoteAdoptionOptsFromMsg = remoteAdoptionOptsFromMsg;
|
|
20
40
|
const protobuf_msg_1 = require("../ipc-via-protobuf/protobuf-msg");
|
|
21
41
|
const protobuf_type_1 = require("../lib-client/protobuf-type");
|
|
22
42
|
const file_proto_1 = require("../protos/file.proto");
|
|
@@ -88,7 +108,6 @@ function makeFileCaller(caller, fileMsg) {
|
|
|
88
108
|
caller.registerClientDrop(file, fileMsg.impl);
|
|
89
109
|
return file;
|
|
90
110
|
}
|
|
91
|
-
exports.makeFileCaller = makeFileCaller;
|
|
92
111
|
function exposeFileService(file, expServices) {
|
|
93
112
|
const implExp = {
|
|
94
113
|
getByteSource: getByteSource.wrapService(file.getByteSource, expServices),
|
|
@@ -151,7 +170,6 @@ function exposeFileService(file, expServices) {
|
|
|
151
170
|
};
|
|
152
171
|
return fileMsg;
|
|
153
172
|
}
|
|
154
|
-
exports.exposeFileService = exposeFileService;
|
|
155
173
|
exports.fileMsgType = protobuf_type_1.ProtoType.for(file_proto_1.file.File);
|
|
156
174
|
const statsMsgType = protobuf_type_1.ProtoType.for(file_proto_1.file.StatsMsg);
|
|
157
175
|
function packStats(s) {
|
|
@@ -167,7 +185,6 @@ function packStats(s) {
|
|
|
167
185
|
};
|
|
168
186
|
return statsMsgType.pack(msg);
|
|
169
187
|
}
|
|
170
|
-
exports.packStats = packStats;
|
|
171
188
|
function unpackStats(buf) {
|
|
172
189
|
const m = statsMsgType.unpack(buf);
|
|
173
190
|
return {
|
|
@@ -181,7 +198,6 @@ function unpackStats(buf) {
|
|
|
181
198
|
mtime: (m.mtime ? new Date((0, protobuf_msg_1.valOfOptInt)(m.mtime)) : undefined),
|
|
182
199
|
};
|
|
183
200
|
}
|
|
184
|
-
exports.unpackStats = unpackStats;
|
|
185
201
|
function syncStatusToMsg(s) {
|
|
186
202
|
if (!s) {
|
|
187
203
|
return;
|
|
@@ -231,11 +247,9 @@ const syncStatusMsgType = protobuf_type_1.ProtoType.for(file_proto_1.file.SyncSt
|
|
|
231
247
|
function packSyncStatus(s) {
|
|
232
248
|
return syncStatusMsgType.pack(syncStatusToMsg(s));
|
|
233
249
|
}
|
|
234
|
-
exports.packSyncStatus = packSyncStatus;
|
|
235
250
|
function unpackSyncStatus(buf) {
|
|
236
251
|
return msgToSyncStatus(syncStatusMsgType.unpack(buf));
|
|
237
252
|
}
|
|
238
|
-
exports.unpackSyncStatus = unpackSyncStatus;
|
|
239
253
|
var stat;
|
|
240
254
|
(function (stat) {
|
|
241
255
|
function wrapService(fn) {
|
|
@@ -270,7 +284,6 @@ function packXAttrValue(val) {
|
|
|
270
284
|
return xattrValueType.pack({ json: (0, protobuf_msg_1.toOptJson)(val) });
|
|
271
285
|
}
|
|
272
286
|
}
|
|
273
|
-
exports.packXAttrValue = packXAttrValue;
|
|
274
287
|
function unpackXAttrValue(buf) {
|
|
275
288
|
const { json, str, bytes } = xattrValueType.unpack(buf);
|
|
276
289
|
if (bytes) {
|
|
@@ -283,7 +296,6 @@ function unpackXAttrValue(buf) {
|
|
|
283
296
|
return (0, protobuf_msg_1.valOfOptJson)(json);
|
|
284
297
|
}
|
|
285
298
|
}
|
|
286
|
-
exports.unpackXAttrValue = unpackXAttrValue;
|
|
287
299
|
var getXAttr;
|
|
288
300
|
(function (getXAttr) {
|
|
289
301
|
const requestType = protobuf_type_1.ProtoType.for(file_proto_1.file.GetXAttrRequestBody);
|
|
@@ -354,7 +366,7 @@ var readBytes;
|
|
|
354
366
|
.then(unpackReply);
|
|
355
367
|
}
|
|
356
368
|
readBytes.makeCaller = makeCaller;
|
|
357
|
-
})(readBytes
|
|
369
|
+
})(readBytes || (exports.readBytes = readBytes = {}));
|
|
358
370
|
Object.freeze(readBytes);
|
|
359
371
|
var readTxt;
|
|
360
372
|
(function (readTxt) {
|
|
@@ -378,7 +390,6 @@ Object.freeze(readTxt);
|
|
|
378
390
|
function packJSON(json) {
|
|
379
391
|
return (0, protobuf_msg_1.encodeToUtf8)(JSON.stringify(json));
|
|
380
392
|
}
|
|
381
|
-
exports.packJSON = packJSON;
|
|
382
393
|
function unpackJSON(buf) {
|
|
383
394
|
if (!buf) {
|
|
384
395
|
throw (0, connector_1.makeIPCException)({ missingBodyBytes: true });
|
|
@@ -390,7 +401,6 @@ function unpackJSON(buf) {
|
|
|
390
401
|
throw (0, error_1.errWithCause)(err, `Can't parse ipc reply as json`);
|
|
391
402
|
}
|
|
392
403
|
}
|
|
393
|
-
exports.unpackJSON = unpackJSON;
|
|
394
404
|
var readJSON;
|
|
395
405
|
(function (readJSON) {
|
|
396
406
|
function wrapService(fn) {
|
|
@@ -470,7 +480,6 @@ function packFileEvent(e) {
|
|
|
470
480
|
throw new Error(`Unknown event type ${type}`);
|
|
471
481
|
}
|
|
472
482
|
}
|
|
473
|
-
exports.packFileEvent = packFileEvent;
|
|
474
483
|
function unpackFileEvent(buf) {
|
|
475
484
|
const m = fileEventType.unpack(buf);
|
|
476
485
|
const { type, path } = m;
|
|
@@ -506,7 +515,6 @@ function unpackFileEvent(buf) {
|
|
|
506
515
|
throw new Error(`Unknown event type ${type}`);
|
|
507
516
|
}
|
|
508
517
|
}
|
|
509
|
-
exports.unpackFileEvent = unpackFileEvent;
|
|
510
518
|
var watch;
|
|
511
519
|
(function (watch) {
|
|
512
520
|
function wrapService(fn) {
|
|
@@ -541,7 +549,6 @@ function versionedReadFlagsFromMsg(msg) {
|
|
|
541
549
|
remoteVersion: (0, protobuf_msg_1.valOfOptInt)(msg.remoteVersion)
|
|
542
550
|
};
|
|
543
551
|
}
|
|
544
|
-
exports.versionedReadFlagsFromMsg = versionedReadFlagsFromMsg;
|
|
545
552
|
function versionedReadFlagsToMsg(flags) {
|
|
546
553
|
if (!flags) {
|
|
547
554
|
return;
|
|
@@ -551,7 +558,6 @@ function versionedReadFlagsToMsg(flags) {
|
|
|
551
558
|
remoteVersion: (0, protobuf_msg_1.toOptVal)(flags.remoteVersion)
|
|
552
559
|
};
|
|
553
560
|
}
|
|
554
|
-
exports.versionedReadFlagsToMsg = versionedReadFlagsToMsg;
|
|
555
561
|
var vGetXAttr;
|
|
556
562
|
(function (vGetXAttr) {
|
|
557
563
|
const requestType = protobuf_type_1.ProtoType.for(file_proto_1.file.VersionedGetXAttrRequestBody);
|
|
@@ -598,7 +604,7 @@ var vGetXAttr;
|
|
|
598
604
|
.then(unpackReply);
|
|
599
605
|
}
|
|
600
606
|
vGetXAttr.makeCaller = makeCaller;
|
|
601
|
-
})(vGetXAttr
|
|
607
|
+
})(vGetXAttr || (exports.vGetXAttr = vGetXAttr = {}));
|
|
602
608
|
Object.freeze(vGetXAttr);
|
|
603
609
|
const requestWithReadFlags = protobuf_type_1.ProtoType.for(file_proto_1.file.RequestWithVersionedReadFlags);
|
|
604
610
|
function packVersionedReadFlagsRequest(flags) {
|
|
@@ -631,7 +637,7 @@ var vListXAttrs;
|
|
|
631
637
|
});
|
|
632
638
|
}
|
|
633
639
|
vListXAttrs.makeCaller = makeCaller;
|
|
634
|
-
})(vListXAttrs
|
|
640
|
+
})(vListXAttrs || (exports.vListXAttrs = vListXAttrs = {}));
|
|
635
641
|
Object.freeze(vListXAttrs);
|
|
636
642
|
var vReadBytes;
|
|
637
643
|
(function (vReadBytes) {
|
|
@@ -667,7 +673,7 @@ var vReadBytes;
|
|
|
667
673
|
.then(unpackReply);
|
|
668
674
|
}
|
|
669
675
|
vReadBytes.makeCaller = makeCaller;
|
|
670
|
-
})(vReadBytes
|
|
676
|
+
})(vReadBytes || (exports.vReadBytes = vReadBytes = {}));
|
|
671
677
|
Object.freeze(vReadBytes);
|
|
672
678
|
var vReadTxt;
|
|
673
679
|
(function (vReadTxt) {
|
|
@@ -690,7 +696,7 @@ var vReadTxt;
|
|
|
690
696
|
});
|
|
691
697
|
}
|
|
692
698
|
vReadTxt.makeCaller = makeCaller;
|
|
693
|
-
})(vReadTxt
|
|
699
|
+
})(vReadTxt || (exports.vReadTxt = vReadTxt = {}));
|
|
694
700
|
Object.freeze(vReadTxt);
|
|
695
701
|
var vReadJSON;
|
|
696
702
|
(function (vReadJSON) {
|
|
@@ -720,7 +726,7 @@ var vReadJSON;
|
|
|
720
726
|
});
|
|
721
727
|
}
|
|
722
728
|
vReadJSON.makeCaller = makeCaller;
|
|
723
|
-
})(vReadJSON
|
|
729
|
+
})(vReadJSON || (exports.vReadJSON = vReadJSON = {}));
|
|
724
730
|
Object.freeze(vReadJSON);
|
|
725
731
|
var vGetByteSource;
|
|
726
732
|
(function (vGetByteSource) {
|
|
@@ -746,7 +752,7 @@ var vGetByteSource;
|
|
|
746
752
|
});
|
|
747
753
|
}
|
|
748
754
|
vGetByteSource.makeCaller = makeCaller;
|
|
749
|
-
})(vGetByteSource
|
|
755
|
+
})(vGetByteSource || (exports.vGetByteSource = vGetByteSource = {}));
|
|
750
756
|
Object.freeze(vGetByteSource);
|
|
751
757
|
function xattrToMsg(xaName, val) {
|
|
752
758
|
const msg = { xaName };
|
|
@@ -764,7 +770,6 @@ function xattrToMsg(xaName, val) {
|
|
|
764
770
|
}
|
|
765
771
|
return msg;
|
|
766
772
|
}
|
|
767
|
-
exports.xattrToMsg = xattrToMsg;
|
|
768
773
|
function xattrFromMsg(msg) {
|
|
769
774
|
const { xaName: name } = msg;
|
|
770
775
|
if (msg.bytes) {
|
|
@@ -777,7 +782,6 @@ function xattrFromMsg(msg) {
|
|
|
777
782
|
return { name, value: (0, protobuf_msg_1.valOfOptJson)(msg.json) };
|
|
778
783
|
}
|
|
779
784
|
}
|
|
780
|
-
exports.xattrFromMsg = xattrFromMsg;
|
|
781
785
|
var updateXAttrs;
|
|
782
786
|
(function (updateXAttrs) {
|
|
783
787
|
const requestType = protobuf_type_1.ProtoType.for(file_proto_1.file.UpdateXAttrsRequestBody);
|
|
@@ -833,7 +837,7 @@ var updateXAttrs;
|
|
|
833
837
|
};
|
|
834
838
|
}
|
|
835
839
|
updateXAttrs.makeCaller = makeCaller;
|
|
836
|
-
})(updateXAttrs
|
|
840
|
+
})(updateXAttrs || (exports.updateXAttrs = updateXAttrs = {}));
|
|
837
841
|
Object.freeze(updateXAttrs);
|
|
838
842
|
var writeBytes;
|
|
839
843
|
(function (writeBytes) {
|
|
@@ -1086,7 +1090,7 @@ var vGetByteSink;
|
|
|
1086
1090
|
});
|
|
1087
1091
|
}
|
|
1088
1092
|
vGetByteSink.makeCaller = makeCaller;
|
|
1089
|
-
})(vGetByteSink
|
|
1093
|
+
})(vGetByteSink || (exports.vGetByteSink = vGetByteSink = {}));
|
|
1090
1094
|
Object.freeze(vGetByteSink);
|
|
1091
1095
|
var vsStatus;
|
|
1092
1096
|
(function (vsStatus) {
|
|
@@ -1176,7 +1180,6 @@ function optionsToUploadLocalToMsg(opts) {
|
|
|
1176
1180
|
uploadVersion: (0, protobuf_msg_1.toOptVal)(opts.uploadVersion)
|
|
1177
1181
|
};
|
|
1178
1182
|
}
|
|
1179
|
-
exports.optionsToUploadLocalToMsg = optionsToUploadLocalToMsg;
|
|
1180
1183
|
function optionsToUploadLocalFromMsg(opts) {
|
|
1181
1184
|
if (!opts) {
|
|
1182
1185
|
return;
|
|
@@ -1186,7 +1189,6 @@ function optionsToUploadLocalFromMsg(opts) {
|
|
|
1186
1189
|
uploadVersion: (0, protobuf_msg_1.valOfOptInt)(opts.uploadVersion)
|
|
1187
1190
|
};
|
|
1188
1191
|
}
|
|
1189
|
-
exports.optionsToUploadLocalFromMsg = optionsToUploadLocalFromMsg;
|
|
1190
1192
|
var vsUpload;
|
|
1191
1193
|
(function (vsUpload) {
|
|
1192
1194
|
const requestType = protobuf_type_1.ProtoType.for(file_proto_1.file.FileSyncUploadRequestBody);
|
|
@@ -1222,7 +1224,6 @@ function remoteAdoptionOptsToMsg(opts) {
|
|
|
1222
1224
|
remoteVersion: (0, protobuf_msg_1.toOptVal)(opts.remoteVersion)
|
|
1223
1225
|
};
|
|
1224
1226
|
}
|
|
1225
|
-
exports.remoteAdoptionOptsToMsg = remoteAdoptionOptsToMsg;
|
|
1226
1227
|
function remoteAdoptionOptsFromMsg(msg) {
|
|
1227
1228
|
if (!msg) {
|
|
1228
1229
|
return;
|
|
@@ -1232,7 +1233,6 @@ function remoteAdoptionOptsFromMsg(msg) {
|
|
|
1232
1233
|
remoteVersion: (0, protobuf_msg_1.valOfOptInt)(msg.remoteVersion)
|
|
1233
1234
|
};
|
|
1234
1235
|
}
|
|
1235
|
-
exports.remoteAdoptionOptsFromMsg = remoteAdoptionOptsFromMsg;
|
|
1236
1236
|
var vsAdoptRemote;
|
|
1237
1237
|
(function (vsAdoptRemote) {
|
|
1238
1238
|
const requestType = protobuf_type_1.ProtoType.for(file_proto_1.file.AdoptRemoteRequestBody);
|
|
@@ -1288,7 +1288,7 @@ var vListVersions;
|
|
|
1288
1288
|
.then(unpackReply);
|
|
1289
1289
|
}
|
|
1290
1290
|
vListVersions.makeCaller = makeCaller;
|
|
1291
|
-
})(vListVersions
|
|
1291
|
+
})(vListVersions || (exports.vListVersions = vListVersions = {}));
|
|
1292
1292
|
Object.freeze(vListVersions);
|
|
1293
1293
|
var vArchiveCurrent;
|
|
1294
1294
|
(function (vArchiveCurrent) {
|
package/build/core-ipc/fs.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { ObjectReference, Value } from "../ipc-via-protobuf/protobuf-msg";
|
|
|
2
2
|
import { ProtoType } from '../lib-client/protobuf-type';
|
|
3
3
|
import { Caller, ExposedServices } from "../ipc-via-protobuf/connector";
|
|
4
4
|
import { FileMsg } from "./file";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
type FS = web3n.files.FS;
|
|
6
|
+
type FSItem = web3n.files.FSItem;
|
|
7
|
+
type OptionsToAdoptRemoteItem = web3n.files.OptionsToAdoptRemoteItem;
|
|
8
8
|
export declare function makeFSCaller(caller: Caller, fsMsg: FSMsg): FS;
|
|
9
9
|
export declare function exposeFSService(fs: FS, expServices: ExposedServices): FSMsg;
|
|
10
10
|
export interface FSMsg {
|
package/build/core-ipc/fs.js
CHANGED
|
@@ -16,7 +16,11 @@
|
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.
|
|
19
|
+
exports.fsItem = exports.fsMsgType = void 0;
|
|
20
|
+
exports.makeFSCaller = makeFSCaller;
|
|
21
|
+
exports.exposeFSService = exposeFSService;
|
|
22
|
+
exports.optionsToAdoptRemoteItemToMsg = optionsToAdoptRemoteItemToMsg;
|
|
23
|
+
exports.optionsToAdoptRemoteItemFromMsg = optionsToAdoptRemoteItemFromMsg;
|
|
20
24
|
const protobuf_msg_1 = require("../ipc-via-protobuf/protobuf-msg");
|
|
21
25
|
const protobuf_type_1 = require("../lib-client/protobuf-type");
|
|
22
26
|
const fs_proto_1 = require("../protos/fs.proto");
|
|
@@ -115,7 +119,6 @@ function makeFSCaller(caller, fsMsg) {
|
|
|
115
119
|
caller.registerClientDrop(fs, fsMsg.impl);
|
|
116
120
|
return fs;
|
|
117
121
|
}
|
|
118
|
-
exports.makeFSCaller = makeFSCaller;
|
|
119
122
|
function exposeFSService(fs, expServices) {
|
|
120
123
|
const implExp = {
|
|
121
124
|
checkFilePresence: checkPresence.wrapService(fs.checkFilePresence),
|
|
@@ -203,7 +206,6 @@ function exposeFSService(fs, expServices) {
|
|
|
203
206
|
};
|
|
204
207
|
return fsMsg;
|
|
205
208
|
}
|
|
206
|
-
exports.exposeFSService = exposeFSService;
|
|
207
209
|
exports.fsMsgType = protobuf_type_1.ProtoType.for(fs_proto_1.fs.FS);
|
|
208
210
|
var checkPresence;
|
|
209
211
|
(function (checkPresence) {
|
|
@@ -1167,7 +1169,7 @@ var fsItem;
|
|
|
1167
1169
|
return item;
|
|
1168
1170
|
}
|
|
1169
1171
|
fsItem.fsItemFromMsg = fsItemFromMsg;
|
|
1170
|
-
})(fsItem
|
|
1172
|
+
})(fsItem || (exports.fsItem = fsItem = {}));
|
|
1171
1173
|
Object.freeze(fsItem);
|
|
1172
1174
|
const reqWithPathAndFlagsType = protobuf_type_1.ProtoType.for(fs_proto_1.fs.PathAndFlagsRequestBody);
|
|
1173
1175
|
function packRequestWithPathAndFlags(path, flags) {
|
|
@@ -2001,7 +2003,6 @@ function optionsToAdoptRemoteItemToMsg(opts) {
|
|
|
2001
2003
|
remoteVersion: (0, protobuf_msg_1.toOptVal)(opts.remoteVersion)
|
|
2002
2004
|
};
|
|
2003
2005
|
}
|
|
2004
|
-
exports.optionsToAdoptRemoteItemToMsg = optionsToAdoptRemoteItemToMsg;
|
|
2005
2006
|
function optionsToAdoptRemoteItemFromMsg(msg) {
|
|
2006
2007
|
if (!msg) {
|
|
2007
2008
|
return;
|
|
@@ -2011,7 +2012,6 @@ function optionsToAdoptRemoteItemFromMsg(msg) {
|
|
|
2011
2012
|
remoteVersion: (0, protobuf_msg_1.valOfOptInt)(msg.remoteVersion)
|
|
2012
2013
|
};
|
|
2013
2014
|
}
|
|
2014
|
-
exports.optionsToAdoptRemoteItemFromMsg = optionsToAdoptRemoteItemFromMsg;
|
|
2015
2015
|
var vsAdoptRemoteFolderItem;
|
|
2016
2016
|
(function (vsAdoptRemoteFolderItem) {
|
|
2017
2017
|
const requestType = protobuf_type_1.ProtoType.for(fs_proto_1.fs.AdoptRemoteFolderItemRequestBody);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ExposedObj, ExposedFn, ExposedServices, Caller } from "../ipc-via-protobuf/connector";
|
|
2
|
-
export
|
|
2
|
+
export type CAPsExposures<T> = {
|
|
3
3
|
[cap in keyof Required<T>]: (cap: any, coreSide: ExposedServices) => ExposedObj<any> | ExposedFn;
|
|
4
4
|
};
|
|
5
|
-
export
|
|
5
|
+
export type TypeDifference<T extends TExc, TExc extends object> = {
|
|
6
6
|
[cap in Exclude<keyof T, keyof TExc>]: T[cap];
|
|
7
7
|
};
|
|
8
8
|
export declare function exposeCAPs<T extends W3N, W3N extends object>(coreSide: ExposedServices, w3n: T, mainCAPs: CAPsExposures<W3N>, extraCAPs: CAPsExposures<TypeDifference<T, W3N>> | undefined): void;
|
|
9
|
-
export
|
|
10
|
-
export
|
|
9
|
+
export type MakeCapClient = (clientSide: Caller, objPath: string[]) => any;
|
|
10
|
+
export type ClientCAPsWraps<T> = {
|
|
11
11
|
[cap in keyof Required<T>]: MakeCapClient;
|
|
12
12
|
};
|
|
13
13
|
export declare function makeClientSide<T extends W3N, W3N extends object>(clientSide: Caller, mainCAPs: ClientCAPsWraps<W3N>, extraCAPs: ClientCAPsWraps<TypeDifference<T, W3N>> | undefined): T;
|