mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-10-06 17:32:31 +00:00
Add independent ID key configuration and recovery
This commit is contained in:
Generated
+5
-5
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": "5",
|
||||
"specifiers": {
|
||||
"npm:@vrtmrz/livesync-commonlib@0.1.0-rc.4": "0.1.0-rc.4"
|
||||
"npm:@vrtmrz/livesync-commonlib@0.1.32": "0.1.32"
|
||||
},
|
||||
"npm": {
|
||||
"@aws-sdk/checksums@3.1000.18": {
|
||||
@@ -284,8 +284,8 @@
|
||||
"@trystero-p2p/core"
|
||||
]
|
||||
},
|
||||
"@vrtmrz/livesync-commonlib@0.1.0-rc.4": {
|
||||
"integrity": "sha512-u4FdbjnYg7lAf38z7eUv4eq4vxEdrl4rFMxiDZiJ7T701awKiflkXGIJQnaHdLaMa3zkRBU15qqEo7GtextmlA==",
|
||||
"@vrtmrz/livesync-commonlib@0.1.32": {
|
||||
"integrity": "sha512-gzjhd7bg+DKHhd/24WGxBM7557wsw3HJkc0YjKll1n8/8vuhqPnlLuZmM33fj+4bv9nGFUnDlnoVowpQrTns6w==",
|
||||
"dependencies": [
|
||||
"@aws-sdk/client-s3",
|
||||
"@smithy/fetch-http-handler",
|
||||
@@ -509,8 +509,8 @@
|
||||
"whatwg-url"
|
||||
]
|
||||
},
|
||||
"octagonal-wheels@0.1.51": {
|
||||
"integrity": "sha512-KTlfqKPjobHJg/t3A539srnFf+VHr1aXkHSmsNDDpiI5UFC7FamZ95dWpJfGE2EI/HULR5hveQDgkazmz8SAcg==",
|
||||
"octagonal-wheels@0.1.54": {
|
||||
"integrity": "sha512-Je3ancYhjKX7UY2K19T/qTjG8C9nK8YVrACr5naIf78mN4bbjQkYyWmlj+ooifV/moWVsQrp4fEWz/7mv6It3A==",
|
||||
"dependencies": [
|
||||
"idb"
|
||||
]
|
||||
|
||||
@@ -35,6 +35,13 @@ Deno.test("generates a current self-hosted Setup URI through the published Commo
|
||||
const decoded = await decodeSettingsFromSetupURI(setupURI, "setup-secret");
|
||||
assert(decoded, "Commonlib could not decode the generated Setup URI");
|
||||
const effectiveSettings = { ...DEFAULT_SETTINGS, ...decoded };
|
||||
const recoveryCode = stdout.match(/sls-id-v1:[0-9a-f]{64}/u)?.[0];
|
||||
assert(recoveryCode, "the generator did not print an ID recovery code");
|
||||
assert(
|
||||
(effectiveSettings as typeof effectiveSettings & { idDerivationKey?: string }).idDerivationKey ===
|
||||
recoveryCode.slice("sls-id-v1:".length),
|
||||
"the CouchDB Setup URI did not contain the generated ID key",
|
||||
);
|
||||
assert(
|
||||
effectiveSettings.isConfigured,
|
||||
"the CouchDB Setup URI left the imported device unconfigured",
|
||||
|
||||
Reference in New Issue
Block a user