core-3nweb-client-lib 0.29.1 → 0.30.0
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/startup.d.ts +6 -1
- package/build/core/asmail/inbox/index.js +1 -1
- package/build/core/asmail/inbox/msg-indexing/sql-indexing.js +1 -1
- package/build/core/asmail/index.js +1 -1
- package/build/core/startup/sign-up.js +2 -0
- package/build/core/startup/startup-cap.js +21 -0
- package/build/core/storage/index.js +48 -14
- package/build/core/storage/system-folders/index.js +1 -1
- package/build/lib-client/3nstorage/xsp-fs/file-node.d.ts +1 -1
- package/build/lib-client/3nstorage/xsp-fs/file.d.ts +1 -1
- package/build/lib-client/3nstorage/xsp-fs/file.js +1 -1
- package/build/lib-client/3nstorage/xsp-fs/folder-node.d.ts +1 -1
- package/build/lib-client/3nstorage/xsp-fs/fs.d.ts +1 -1
- package/build/lib-client/3nstorage/xsp-fs/fs.js +2 -2
- package/build/lib-client/3nstorage/xsp-fs/link-node.d.ts +1 -1
- package/build/lib-client/cryptor/cryptor-wasm.js +1 -1
- package/build/lib-client/cryptor/cryptor.wasm +0 -0
- package/build/lib-client/{fs-collection.js → fs-utils/fs-collection.js} +1 -1
- package/build/lib-client/{fs-sync-utils.js → fs-utils/fs-sync-utils.js} +1 -1
- package/build/lib-client/local-files/device-fs.d.ts +1 -1
- package/build/lib-client/local-files/device-fs.js +2 -2
- package/build/lib-common/async-iter.d.ts +1 -1
- package/build/lib-common/async-iter.js +2 -1
- package/build/protos/startup.proto.js +203 -0
- package/package.json +1 -1
- package/protos/startup.proto +4 -0
- /package/build/lib-client/{files-select.d.ts → fs-utils/files-select.d.ts} +0 -0
- /package/build/lib-client/{files-select.js → fs-utils/files-select.js} +0 -0
- /package/build/lib-client/{files.d.ts → fs-utils/files.d.ts} +0 -0
- /package/build/lib-client/{files.js → fs-utils/files.js} +0 -0
- /package/build/lib-client/{fs-collection.d.ts → fs-utils/fs-collection.d.ts} +0 -0
- /package/build/lib-client/{fs-sync-utils.d.ts → fs-utils/fs-sync-utils.d.ts} +0 -0
- /package/build/lib-client/{fs-view.d.ts → fs-utils/fs-view.d.ts} +0 -0
- /package/build/lib-client/{fs-view.js → fs-utils/fs-view.js} +0 -0
|
Binary file
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
19
|
exports.makeFSCollection = exports.readonlyWrapFSCollection = void 0;
|
|
20
20
|
const rxjs_1 = require("rxjs");
|
|
21
|
-
const utils_for_observables_1 = require("
|
|
21
|
+
const utils_for_observables_1 = require("../../lib-common/utils-for-observables");
|
|
22
22
|
class FSItemsCollection {
|
|
23
23
|
constructor() {
|
|
24
24
|
this.items = new Map();
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
19
|
exports.observableFromTreeEvents = exports.uploadFolderChangesIfAny = exports.getOrMakeAndUploadFolderIn = exports.getRemoteFolderChanges = void 0;
|
|
20
20
|
const rxjs_1 = require("rxjs");
|
|
21
|
-
const exceptions_1 = require("
|
|
21
|
+
const exceptions_1 = require("../3nstorage/exceptions");
|
|
22
22
|
async function getRemoteFolderChanges(fs, forceServerCheck = false) {
|
|
23
23
|
if (forceServerCheck) {
|
|
24
24
|
await fs.v.sync.updateStatusInfo('');
|
|
@@ -22,8 +22,8 @@ const pathMod = require("path");
|
|
|
22
22
|
const fs_1 = require("fs");
|
|
23
23
|
const file_1 = require("../../lib-common/exceptions/file");
|
|
24
24
|
const buffer_utils_1 = require("../../lib-common/buffer-utils");
|
|
25
|
-
const files_1 = require("../files");
|
|
26
|
-
const files_select_1 = require("../files-select");
|
|
25
|
+
const files_1 = require("../fs-utils/files");
|
|
26
|
+
const files_select_1 = require("../fs-utils/files-select");
|
|
27
27
|
const buffer_utils_2 = require("../../lib-common/buffer-utils");
|
|
28
28
|
const pipe_1 = require("../../lib-common/byte-streaming/pipe");
|
|
29
29
|
const dev_file_src_1 = require("./dev-file-src");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare function asyncIteration<T>(iter: web3n.AsyncIterator<T>, func: (v: T) => Promise<void>): Promise<void>;
|
|
2
|
-
export declare function asyncFind<T>(iter: web3n.AsyncIterator<T>, predicate: (v: T) => Promise<boolean>): Promise<T | undefined>;
|
|
2
|
+
export declare function asyncFind<T>(iter: web3n.AsyncIterator<T>, predicate: (v: T) => boolean | Promise<boolean>): Promise<T | undefined>;
|
|
@@ -34,7 +34,8 @@ async function asyncFind(iter, predicate) {
|
|
|
34
34
|
if (item.done) {
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
const check = predicate(item.value);
|
|
38
|
+
if ((typeof check === 'boolean') ? check : await check) {
|
|
38
39
|
return item.value;
|
|
39
40
|
}
|
|
40
41
|
} while (true);
|
|
@@ -18,6 +18,209 @@ $root.startup = (function() {
|
|
|
18
18
|
*/
|
|
19
19
|
var startup = {};
|
|
20
20
|
|
|
21
|
+
startup.SetSignUpServerRequestBody = (function() {
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Properties of a SetSignUpServerRequestBody.
|
|
25
|
+
* @memberof startup
|
|
26
|
+
* @interface ISetSignUpServerRequestBody
|
|
27
|
+
* @property {string|null} [serviceUrl] SetSignUpServerRequestBody serviceUrl
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Constructs a new SetSignUpServerRequestBody.
|
|
32
|
+
* @memberof startup
|
|
33
|
+
* @classdesc Represents a SetSignUpServerRequestBody.
|
|
34
|
+
* @implements ISetSignUpServerRequestBody
|
|
35
|
+
* @constructor
|
|
36
|
+
* @param {startup.ISetSignUpServerRequestBody=} [properties] Properties to set
|
|
37
|
+
*/
|
|
38
|
+
function SetSignUpServerRequestBody(properties) {
|
|
39
|
+
if (properties)
|
|
40
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
41
|
+
if (properties[keys[i]] != null)
|
|
42
|
+
this[keys[i]] = properties[keys[i]];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* SetSignUpServerRequestBody serviceUrl.
|
|
47
|
+
* @member {string} serviceUrl
|
|
48
|
+
* @memberof startup.SetSignUpServerRequestBody
|
|
49
|
+
* @instance
|
|
50
|
+
*/
|
|
51
|
+
SetSignUpServerRequestBody.prototype.serviceUrl = "";
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Creates a new SetSignUpServerRequestBody instance using the specified properties.
|
|
55
|
+
* @function create
|
|
56
|
+
* @memberof startup.SetSignUpServerRequestBody
|
|
57
|
+
* @static
|
|
58
|
+
* @param {startup.ISetSignUpServerRequestBody=} [properties] Properties to set
|
|
59
|
+
* @returns {startup.SetSignUpServerRequestBody} SetSignUpServerRequestBody instance
|
|
60
|
+
*/
|
|
61
|
+
SetSignUpServerRequestBody.create = function create(properties) {
|
|
62
|
+
return new SetSignUpServerRequestBody(properties);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Encodes the specified SetSignUpServerRequestBody message. Does not implicitly {@link startup.SetSignUpServerRequestBody.verify|verify} messages.
|
|
67
|
+
* @function encode
|
|
68
|
+
* @memberof startup.SetSignUpServerRequestBody
|
|
69
|
+
* @static
|
|
70
|
+
* @param {startup.ISetSignUpServerRequestBody} message SetSignUpServerRequestBody message or plain object to encode
|
|
71
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
72
|
+
* @returns {$protobuf.Writer} Writer
|
|
73
|
+
*/
|
|
74
|
+
SetSignUpServerRequestBody.encode = function encode(message, writer) {
|
|
75
|
+
if (!writer)
|
|
76
|
+
writer = $Writer.create();
|
|
77
|
+
if (message.serviceUrl != null && Object.hasOwnProperty.call(message, "serviceUrl"))
|
|
78
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceUrl);
|
|
79
|
+
return writer;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Encodes the specified SetSignUpServerRequestBody message, length delimited. Does not implicitly {@link startup.SetSignUpServerRequestBody.verify|verify} messages.
|
|
84
|
+
* @function encodeDelimited
|
|
85
|
+
* @memberof startup.SetSignUpServerRequestBody
|
|
86
|
+
* @static
|
|
87
|
+
* @param {startup.ISetSignUpServerRequestBody} message SetSignUpServerRequestBody message or plain object to encode
|
|
88
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
89
|
+
* @returns {$protobuf.Writer} Writer
|
|
90
|
+
*/
|
|
91
|
+
SetSignUpServerRequestBody.encodeDelimited = function encodeDelimited(message, writer) {
|
|
92
|
+
return this.encode(message, writer).ldelim();
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Decodes a SetSignUpServerRequestBody message from the specified reader or buffer.
|
|
97
|
+
* @function decode
|
|
98
|
+
* @memberof startup.SetSignUpServerRequestBody
|
|
99
|
+
* @static
|
|
100
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
101
|
+
* @param {number} [length] Message length if known beforehand
|
|
102
|
+
* @returns {startup.SetSignUpServerRequestBody} SetSignUpServerRequestBody
|
|
103
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
104
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
105
|
+
*/
|
|
106
|
+
SetSignUpServerRequestBody.decode = function decode(reader, length) {
|
|
107
|
+
if (!(reader instanceof $Reader))
|
|
108
|
+
reader = $Reader.create(reader);
|
|
109
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.startup.SetSignUpServerRequestBody();
|
|
110
|
+
while (reader.pos < end) {
|
|
111
|
+
var tag = reader.uint32();
|
|
112
|
+
switch (tag >>> 3) {
|
|
113
|
+
case 1: {
|
|
114
|
+
message.serviceUrl = reader.string();
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
default:
|
|
118
|
+
reader.skipType(tag & 7);
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return message;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Decodes a SetSignUpServerRequestBody message from the specified reader or buffer, length delimited.
|
|
127
|
+
* @function decodeDelimited
|
|
128
|
+
* @memberof startup.SetSignUpServerRequestBody
|
|
129
|
+
* @static
|
|
130
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
131
|
+
* @returns {startup.SetSignUpServerRequestBody} SetSignUpServerRequestBody
|
|
132
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
133
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
134
|
+
*/
|
|
135
|
+
SetSignUpServerRequestBody.decodeDelimited = function decodeDelimited(reader) {
|
|
136
|
+
if (!(reader instanceof $Reader))
|
|
137
|
+
reader = new $Reader(reader);
|
|
138
|
+
return this.decode(reader, reader.uint32());
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Verifies a SetSignUpServerRequestBody message.
|
|
143
|
+
* @function verify
|
|
144
|
+
* @memberof startup.SetSignUpServerRequestBody
|
|
145
|
+
* @static
|
|
146
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
147
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
148
|
+
*/
|
|
149
|
+
SetSignUpServerRequestBody.verify = function verify(message) {
|
|
150
|
+
if (typeof message !== "object" || message === null)
|
|
151
|
+
return "object expected";
|
|
152
|
+
if (message.serviceUrl != null && message.hasOwnProperty("serviceUrl"))
|
|
153
|
+
if (!$util.isString(message.serviceUrl))
|
|
154
|
+
return "serviceUrl: string expected";
|
|
155
|
+
return null;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Creates a SetSignUpServerRequestBody message from a plain object. Also converts values to their respective internal types.
|
|
160
|
+
* @function fromObject
|
|
161
|
+
* @memberof startup.SetSignUpServerRequestBody
|
|
162
|
+
* @static
|
|
163
|
+
* @param {Object.<string,*>} object Plain object
|
|
164
|
+
* @returns {startup.SetSignUpServerRequestBody} SetSignUpServerRequestBody
|
|
165
|
+
*/
|
|
166
|
+
SetSignUpServerRequestBody.fromObject = function fromObject(object) {
|
|
167
|
+
if (object instanceof $root.startup.SetSignUpServerRequestBody)
|
|
168
|
+
return object;
|
|
169
|
+
var message = new $root.startup.SetSignUpServerRequestBody();
|
|
170
|
+
if (object.serviceUrl != null)
|
|
171
|
+
message.serviceUrl = String(object.serviceUrl);
|
|
172
|
+
return message;
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Creates a plain object from a SetSignUpServerRequestBody message. Also converts values to other types if specified.
|
|
177
|
+
* @function toObject
|
|
178
|
+
* @memberof startup.SetSignUpServerRequestBody
|
|
179
|
+
* @static
|
|
180
|
+
* @param {startup.SetSignUpServerRequestBody} message SetSignUpServerRequestBody
|
|
181
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
182
|
+
* @returns {Object.<string,*>} Plain object
|
|
183
|
+
*/
|
|
184
|
+
SetSignUpServerRequestBody.toObject = function toObject(message, options) {
|
|
185
|
+
if (!options)
|
|
186
|
+
options = {};
|
|
187
|
+
var object = {};
|
|
188
|
+
if (options.defaults)
|
|
189
|
+
object.serviceUrl = "";
|
|
190
|
+
if (message.serviceUrl != null && message.hasOwnProperty("serviceUrl"))
|
|
191
|
+
object.serviceUrl = message.serviceUrl;
|
|
192
|
+
return object;
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Converts this SetSignUpServerRequestBody to JSON.
|
|
197
|
+
* @function toJSON
|
|
198
|
+
* @memberof startup.SetSignUpServerRequestBody
|
|
199
|
+
* @instance
|
|
200
|
+
* @returns {Object.<string,*>} JSON object
|
|
201
|
+
*/
|
|
202
|
+
SetSignUpServerRequestBody.prototype.toJSON = function toJSON() {
|
|
203
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Gets the default type url for SetSignUpServerRequestBody
|
|
208
|
+
* @function getTypeUrl
|
|
209
|
+
* @memberof startup.SetSignUpServerRequestBody
|
|
210
|
+
* @static
|
|
211
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
212
|
+
* @returns {string} The default type url
|
|
213
|
+
*/
|
|
214
|
+
SetSignUpServerRequestBody.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
215
|
+
if (typeUrlPrefix === undefined) {
|
|
216
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
217
|
+
}
|
|
218
|
+
return typeUrlPrefix + "/startup.SetSignUpServerRequestBody";
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
return SetSignUpServerRequestBody;
|
|
222
|
+
})();
|
|
223
|
+
|
|
21
224
|
startup.GetAvailableAddressesRequestBody = (function() {
|
|
22
225
|
|
|
23
226
|
/**
|
package/package.json
CHANGED
package/protos/startup.proto
CHANGED
|
@@ -7,6 +7,10 @@ package startup;
|
|
|
7
7
|
|
|
8
8
|
// ==== signUp capability ====
|
|
9
9
|
|
|
10
|
+
message SetSignUpServerRequestBody {
|
|
11
|
+
string service_url = 1;
|
|
12
|
+
}
|
|
13
|
+
|
|
10
14
|
// --- signUp.getAvailableAddresses ---
|
|
11
15
|
// Reply body is common.StringArrayValue
|
|
12
16
|
message GetAvailableAddressesRequestBody {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|