@arbidocs/sdk 0.4.69 → 0.4.71
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/README.md +1 -0
- package/dist/{browser-Dhk899kq.d.cts → browser-Bf2QdtQY.d.cts} +6 -0
- package/dist/{browser-Dhk899kq.d.ts → browser-Bf2QdtQY.d.ts} +6 -0
- package/dist/browser.cjs +10 -2
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +10 -2
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +10 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -6750,10 +6750,18 @@ var Arbi = class {
|
|
|
6750
6750
|
this.options = options;
|
|
6751
6751
|
}
|
|
6752
6752
|
// ── Lifecycle ───────────────────────────────────────────────────────────
|
|
6753
|
+
/**
|
|
6754
|
+
* The deployment domain the user's keys are derived for: `deploymentDomain` when given,
|
|
6755
|
+
* otherwise the hostname of `url`. Signing and password changes re-derive keys with it, so a
|
|
6756
|
+
* host that needs it (the document tools' e-signing) reads it here rather than recomputing it.
|
|
6757
|
+
*/
|
|
6758
|
+
getDeploymentDomain() {
|
|
6759
|
+
return this.options.deploymentDomain ?? new URL(this.options.url).hostname;
|
|
6760
|
+
}
|
|
6753
6761
|
/** Initialize the SDK client and sodium crypto. Called automatically by login(). */
|
|
6754
6762
|
async init() {
|
|
6755
6763
|
if (this.client) return this.client;
|
|
6756
|
-
const domain = this.
|
|
6764
|
+
const domain = this.getDeploymentDomain();
|
|
6757
6765
|
this.client = client.createArbiClient({
|
|
6758
6766
|
baseUrl: this.options.url,
|
|
6759
6767
|
deploymentDomain: domain,
|
|
@@ -7048,7 +7056,7 @@ var Arbi = class {
|
|
|
7048
7056
|
{ ...params, email, userExtId: lr2.userExtId },
|
|
7049
7057
|
{
|
|
7050
7058
|
fetchClient: client$1.fetch,
|
|
7051
|
-
deploymentDomain: this.
|
|
7059
|
+
deploymentDomain: this.getDeploymentDomain()
|
|
7052
7060
|
}
|
|
7053
7061
|
);
|
|
7054
7062
|
this.loginResult = { ...lr2, signingPrivateKey: result.newSigningPrivateKey };
|