core-3nweb-client-lib 0.44.9 → 0.44.11
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/core/startup/sign-up.js +2 -3
- package/build/core/storage/synced/obj-files.js +1 -1
- package/build/core/storage/synced/upload-header-file.js +2 -2
- package/build/lib-client/3nstorage/storage-owner.js +2 -3
- package/build/lib-client/asmail/sender.js +3 -4
- package/build/lib-client/cryptor/cryptor-wasm.js +1 -1
- package/build/lib-client/cryptor/cryptor.wasm +0 -0
- package/build/lib-client/local-files/dev-file-sink.js +2 -3
- package/build/lib-client/mailer-id/login.js +2 -3
- package/build/lib-client/mailer-id/provisioner.js +2 -3
- package/build/lib-client/objs-on-disk/obj-on-disk.d.ts +1 -1
- package/build/lib-client/objs-on-disk/obj-on-disk.js +2 -2
- package/build/lib-client/service-locator.js +7 -12
- package/build/lib-client/user-with-pkl-session.js +2 -3
- package/build/lib-client/xsp-fs/attrs.js +6 -6
- package/build/lib-common/async-fs-node.js +1 -1
- package/build/lib-common/canonical-address.js +2 -2
- package/build/lib-common/objs-on-disk/obj-version-file.d.ts +1 -1
- package/build/lib-common/objs-on-disk/obj-version-file.js +5 -6
- package/package.json +3 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
Copyright (C) 2015 - 2020, 2022 - 2023, 2025 3NSoft Inc.
|
|
3
|
+
Copyright (C) 2015 - 2020, 2022 - 2023, 2025 - 2026 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
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
19
|
exports.SignUp = void 0;
|
|
20
20
|
const _3nweb_signup_1 = require("../../lib-client/3nweb-signup");
|
|
21
|
-
const url_1 = require("url");
|
|
22
21
|
const jwkeys_1 = require("../../lib-common/jwkeys");
|
|
23
22
|
const buffer_utils_1 = require("../../lib-common/buffer-utils");
|
|
24
23
|
const canonical_address_1 = require("../../lib-common/canonical-address");
|
|
@@ -77,7 +76,7 @@ class SignUp {
|
|
|
77
76
|
Object.seal(this);
|
|
78
77
|
}
|
|
79
78
|
async setServiceURL(serviceURL) {
|
|
80
|
-
const url =
|
|
79
|
+
const url = new URL(serviceURL);
|
|
81
80
|
if (url.protocol !== 'https:') {
|
|
82
81
|
throw new Error("Url protocol must be https.");
|
|
83
82
|
}
|
|
@@ -307,7 +307,7 @@ class SyncedObj {
|
|
|
307
307
|
const objVer = await this.instanceOfLocalObjVer(version);
|
|
308
308
|
for (const localBase of localBases) {
|
|
309
309
|
await objVer.absorbImmediateBaseVersion(localBase, this.localVerPath(localBase));
|
|
310
|
-
this.status.absorbLocalVersionBase(version, localBase);
|
|
310
|
+
await this.status.absorbLocalVersionBase(version, localBase);
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
return syncedBase;
|
|
@@ -59,8 +59,8 @@ function unpackUploadHeaderChange(bytes) {
|
|
|
59
59
|
const uploadVersion = (0, big_endian_1.uintFrom8Bytes)(bytes, 8);
|
|
60
60
|
const headerLen = (bytes.length - 16) / 2;
|
|
61
61
|
(0, assert_1.assert)(Number.isInteger(headerLen));
|
|
62
|
-
const localHeader = bytes.
|
|
63
|
-
const uploadHeader = bytes.
|
|
62
|
+
const localHeader = bytes.subarray(16, 16 + headerLen);
|
|
63
|
+
const uploadHeader = bytes.subarray(16 + headerLen);
|
|
64
64
|
return { localHeader, localVersion, uploadHeader, uploadVersion };
|
|
65
65
|
}
|
|
66
66
|
Object.freeze(exports);
|
|
@@ -221,9 +221,7 @@ class StorageOwner extends user_with_mid_session_1.ServiceUser {
|
|
|
221
221
|
else if (followReq) {
|
|
222
222
|
const { ofs, trans, last } = followReq;
|
|
223
223
|
// XXX segs argument will introduce difference between these two
|
|
224
|
-
const reqOpts = {
|
|
225
|
-
ofs, trans, last
|
|
226
|
-
};
|
|
224
|
+
const reqOpts = { ofs, trans, last };
|
|
227
225
|
appPath = (objId ?
|
|
228
226
|
api.currentObj.secondPutReqUrlEnd(objId, reqOpts) :
|
|
229
227
|
api.currentRootObj.secondPutReqUrlEnd(reqOpts));
|
|
@@ -265,6 +263,7 @@ class StorageOwner extends user_with_mid_session_1.ServiceUser {
|
|
|
265
263
|
}
|
|
266
264
|
else if (rep.status === api.currentObj.SC.mismatchedObjVer) {
|
|
267
265
|
const curVer = rep.current_version;
|
|
266
|
+
// XXX is undefined expected, or, was that an error from server? Is it is a header?
|
|
268
267
|
if (!Number.isInteger(curVer)) {
|
|
269
268
|
throw new Error(`Got non-integer current object version value from a version mismatch reply ${curVer}`);
|
|
270
269
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
Copyright (C) 2015, 2017, 2020, 2025 3NSoft Inc.
|
|
3
|
+
Copyright (C) 2015, 2017, 2020, 2025 - 2026 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
|
|
@@ -18,7 +18,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
exports.MailSender = void 0;
|
|
19
19
|
const api = require("../../lib-common/service-api/asmail/delivery");
|
|
20
20
|
const service_locator_1 = require("../service-locator");
|
|
21
|
-
const url_1 = require("url");
|
|
22
21
|
const http_1 = require("../../lib-common/exceptions/http");
|
|
23
22
|
const LIMIT_ON_MAX_CHUNK = 1024 * 1024;
|
|
24
23
|
const TOO_EARLY_RESTART_PERIOD = 5 * 60 * 1000;
|
|
@@ -30,7 +29,7 @@ class MailSender {
|
|
|
30
29
|
return this.uri;
|
|
31
30
|
}
|
|
32
31
|
get serviceDomain() {
|
|
33
|
-
return (
|
|
32
|
+
return (new URL(this.uri)).hostname;
|
|
34
33
|
}
|
|
35
34
|
constructor(sender, recipient, invitation, net) {
|
|
36
35
|
this.sender = sender;
|
|
@@ -158,7 +157,7 @@ class MailSender {
|
|
|
158
157
|
prepareRedirectOrThrowUp(rep) {
|
|
159
158
|
if (("string" !== typeof rep.redirect) ||
|
|
160
159
|
(rep.redirect.length === 0) ||
|
|
161
|
-
((
|
|
160
|
+
((new URL(rep.redirect)).protocol !== 'https:')) {
|
|
162
161
|
throw this.badRedirectExc();
|
|
163
162
|
}
|
|
164
163
|
// refuse second redirect
|