mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-10-25 02:23:22 +00:00
Adopt Commonlib 0.2.0 with injected device storage
This commit is contained in:
1 parent
e56098eb57
commit
96ad2737a7
60 files changed
+1499
-541
No files matched your search
@@ -1,5 +1,5 @@
|
||||
// Keep CouchDB database-version negotiation isolated from Setup URI generation.
|
||||
// The exact release must match utils/livesync-commonlib-version.ts; the setup
|
||||
// tool suite checks every static specifier before release.
|
||||
export { checkRemoteVersion } from "npm:@vrtmrz/livesync-commonlib@0.1.34/compat/pouchdb/negotiation";
|
||||
export { PouchDB } from "npm:@vrtmrz/livesync-commonlib@0.1.34/compat/pouchdb/pouchdb-browser";
|
||||
export { checkRemoteVersion } from "npm:@vrtmrz/livesync-commonlib@0.2.0/compat/pouchdb/negotiation";
|
||||
export { PouchDB } from "npm:@vrtmrz/livesync-commonlib@0.2.0/compat/pouchdb/pouchdb-browser";
|
||||
Generated
+50
-7
@@ -1,9 +1,25 @@
|
||||
{
|
||||
"version": "5",
|
||||
"specifiers": {
|
||||
"npm:@vrtmrz/livesync-commonlib@0.1.34": "0.1.34"
|
||||
"npm:@vrtmrz/livesync-commonlib@0.2.0": "0.2.0"
|
||||
},
|
||||
"npm": {
|
||||
"@aws-crypto/sha256-js@5.2.0": {
|
||||
"integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==",
|
||||
"dependencies": [
|
||||
"@aws-crypto/util",
|
||||
"@aws-sdk/types",
|
||||
"tslib"
|
||||
]
|
||||
},
|
||||
"@aws-crypto/util@5.2.0": {
|
||||
"integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==",
|
||||
"dependencies": [
|
||||
"@aws-sdk/types",
|
||||
"@smithy/util-utf8",
|
||||
"tslib"
|
||||
]
|
||||
},
|
||||
"@aws-sdk/checksums@3.1000.18": {
|
||||
"integrity": "sha512-IImkbEyXdV6/uaF5r6Wkk+8718mQw1ll83j0a4a30R3JM/rHVFdWAiT4jtJpFjJiIwM/oJ6SxIxr0z2TaQUGqw==",
|
||||
"dependencies": [
|
||||
@@ -230,6 +246,12 @@
|
||||
"tslib"
|
||||
]
|
||||
},
|
||||
"@smithy/is-array-buffer@2.2.0": {
|
||||
"integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==",
|
||||
"dependencies": [
|
||||
"tslib"
|
||||
]
|
||||
},
|
||||
"@smithy/md5-js@4.4.10": {
|
||||
"integrity": "sha512-XI5xhWxRkWuiLNj0/Z30vLTPpZe9UQcg57Ox/n4vzGmFiHSrD+xAmx6ubEcWt6u69IOH+4LAucpaZk5AMxB8oQ==",
|
||||
"dependencies": [
|
||||
@@ -267,6 +289,13 @@
|
||||
"tslib"
|
||||
]
|
||||
},
|
||||
"@smithy/util-buffer-from@2.2.0": {
|
||||
"integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==",
|
||||
"dependencies": [
|
||||
"@smithy/is-array-buffer",
|
||||
"tslib"
|
||||
]
|
||||
},
|
||||
"@smithy/util-retry@4.5.10": {
|
||||
"integrity": "sha512-hYu5ieq8myuO29xCQV0IIhicRm1aO0lcNBeMcF1mVVAVQC0oylPGKFliMq5NbxtdOvRxJWCMuir2gwKI91f1lw==",
|
||||
"dependencies": [
|
||||
@@ -274,6 +303,13 @@
|
||||
"tslib"
|
||||
]
|
||||
},
|
||||
"@smithy/util-utf8@2.3.0": {
|
||||
"integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==",
|
||||
"dependencies": [
|
||||
"@smithy/util-buffer-from",
|
||||
"tslib"
|
||||
]
|
||||
},
|
||||
"@trystero-p2p/core@0.25.3": {
|
||||
"integrity": "sha512-lQKNq/ha+vF6kQZrpaXJGzlzxLF/Fhizoy5dwJUYQlkqRrbPup/Jov2EpPX/CPr2X+f79HxVzonkeni3MxmCuQ=="
|
||||
},
|
||||
@@ -284,9 +320,10 @@
|
||||
"@trystero-p2p/core"
|
||||
]
|
||||
},
|
||||
"@vrtmrz/livesync-commonlib@0.1.34": {
|
||||
"integrity": "sha512-EeVpeFg3W43cpN+x0BZvFj9fN+eQFil9vohvmLLV1z/8bCTT0Hsq/bfRV59oL0qFNggPetkwyCZUusdfjajNOw==",
|
||||
"@vrtmrz/livesync-commonlib@0.2.0": {
|
||||
"integrity": "sha512-K24Pkke+FTjZI7DjIV7qkZk+BmC9VebN3da+2cVD9SWOgoGl7OvDyXTHDafbrmmM4vi4ydaydAEh9glO1xHF6A==",
|
||||
"dependencies": [
|
||||
"@aws-crypto/sha256-js",
|
||||
"@aws-sdk/client-s3",
|
||||
"@smithy/fetch-http-handler",
|
||||
"@smithy/md5-js",
|
||||
@@ -294,6 +331,7 @@
|
||||
"@smithy/types",
|
||||
"@smithy/util-retry",
|
||||
"@trystero-p2p/nostr",
|
||||
"@vrtmrz/value-store",
|
||||
"diff-match-patch",
|
||||
"events",
|
||||
"fflate",
|
||||
@@ -305,9 +343,11 @@
|
||||
"pouchdb-adapter-idb",
|
||||
"pouchdb-adapter-indexeddb",
|
||||
"pouchdb-adapter-memory",
|
||||
"pouchdb-checkpointer",
|
||||
"pouchdb-core",
|
||||
"pouchdb-errors",
|
||||
"pouchdb-find",
|
||||
"pouchdb-generate-replication-id",
|
||||
"pouchdb-mapreduce",
|
||||
"pouchdb-merge",
|
||||
"pouchdb-replication",
|
||||
@@ -317,6 +357,9 @@
|
||||
"xxhash-wasm-102@npm:xxhash-wasm@1.1.0"
|
||||
]
|
||||
},
|
||||
"@vrtmrz/value-store@0.1.0": {
|
||||
"integrity": "sha512-M62f1j0bnJkqpgI5sYxnkXUAOSDEwQbYrLf+w58gCCm4sjIXDmFzDJd2duXabRbktBlACt9P99yjN/9gOAPxrA=="
|
||||
},
|
||||
"abstract-leveldown@2.7.2": {
|
||||
"integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==",
|
||||
"dependencies": [
|
||||
@@ -497,8 +540,8 @@
|
||||
],
|
||||
"deprecated": true
|
||||
},
|
||||
"minimatch@10.2.5": {
|
||||
"integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==",
|
||||
"minimatch@10.2.6": {
|
||||
"integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==",
|
||||
"dependencies": [
|
||||
"brace-expansion"
|
||||
]
|
||||
@@ -509,8 +552,8 @@
|
||||
"whatwg-url"
|
||||
]
|
||||
},
|
||||
"octagonal-wheels@0.1.54": {
|
||||
"integrity": "sha512-Je3ancYhjKX7UY2K19T/qTjG8C9nK8YVrACr5naIf78mN4bbjQkYyWmlj+ooifV/moWVsQrp4fEWz/7mv6It3A==",
|
||||
"octagonal-wheels@0.1.55": {
|
||||
"integrity": "sha512-mHsQv/h4Tw4ZGJCmTxXFlgeRvPuL9s47C0arD8Njqld+DKr3ppaWjVteEBP+9bWFSOpv/a1u2yY3LYNFGmuexg==",
|
||||
"dependencies": [
|
||||
"idb"
|
||||
]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import {
|
||||
decodeSettingsFromSetupURI,
|
||||
DEFAULT_SETTINGS,
|
||||
PREFERRED_SETTING_SELF_HOSTED,
|
||||
} from "../setup/livesync-commonlib.ts";
|
||||
|
||||
function assert(condition: unknown, message: string): asserts condition {
|
||||
@@ -38,7 +39,9 @@ Deno.test("generates a current self-hosted Setup URI through the published Commo
|
||||
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 ===
|
||||
(effectiveSettings as typeof effectiveSettings & {
|
||||
idDerivationKey?: string;
|
||||
}).idDerivationKey ===
|
||||
recoveryCode.slice("sls-id-v1:".length),
|
||||
"the CouchDB Setup URI did not contain the generated ID key",
|
||||
);
|
||||
@@ -47,8 +50,9 @@ Deno.test("generates a current self-hosted Setup URI through the published Commo
|
||||
"the CouchDB Setup URI left the imported device unconfigured",
|
||||
);
|
||||
assert(
|
||||
effectiveSettings.customChunkSize === 60,
|
||||
"the Setup URI did not use the current self-hosted chunk-size recommendation",
|
||||
effectiveSettings.customChunkSize ===
|
||||
PREFERRED_SETTING_SELF_HOSTED.customChunkSize,
|
||||
"the Setup URI did not use the self-hosted chunk-size preference from Commonlib",
|
||||
);
|
||||
assert(
|
||||
effectiveSettings.chunkSplitterVersion === "v3-rabin-karp",
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
// Commonlib registry release. Static npm specifiers cannot interpolate this
|
||||
// value, so livesync-commonlib-version.test.ts verifies the domain-specific
|
||||
// facades against it.
|
||||
export const LIVESYNC_COMMONLIB_VERSION = "0.1.34";
|
||||
export const LIVESYNC_COMMONLIB_VERSION = "0.2.0";
|
||||
@@ -1,6 +1,7 @@
|
||||
import {
|
||||
decodeSettingsFromSetupURI,
|
||||
DEFAULT_SETTINGS,
|
||||
PREFERRED_JOURNAL_SYNC,
|
||||
} from "./livesync-commonlib.ts";
|
||||
import { generateSetupURI } from "./generate_setup_uri.ts";
|
||||
|
||||
@@ -55,8 +56,8 @@ Deno.test("generates an Object Storage Setup URI with a selected S3 profile", as
|
||||
"the Setup URI left the imported device unconfigured",
|
||||
);
|
||||
assert(
|
||||
effective.customChunkSize === 10,
|
||||
"the journal chunk-size preset was not applied",
|
||||
effective.customChunkSize === PREFERRED_JOURNAL_SYNC.customChunkSize,
|
||||
"the Object Storage Setup URI did not use its Commonlib journal chunk-size preference",
|
||||
);
|
||||
assert(
|
||||
effective.liveSync,
|
||||
@@ -122,7 +123,7 @@ Deno.test("generates a random-room P2P Setup URI without copying a device identi
|
||||
);
|
||||
assert(
|
||||
effective.customChunkSize === 0,
|
||||
"the P2P profile inherited the self-hosted CouchDB chunk-size recommendation",
|
||||
"the P2P Setup URI did not retain its zero chunk-size value",
|
||||
);
|
||||
assert(
|
||||
effective.sendChunksBulkMaxSize === 1,
|
||||
|
||||
@@ -5,10 +5,10 @@ export {
|
||||
decodeSettingsFromSetupURI,
|
||||
encodeTimeBoundSetupURI,
|
||||
isTimeBoundSetupURIUsableNow,
|
||||
} from "npm:@vrtmrz/livesync-commonlib@0.1.34/setup-uri";
|
||||
export type { TimeBoundSetupURIMode } from "npm:@vrtmrz/livesync-commonlib@0.1.34/setup-uri";
|
||||
export { generateP2PRoomId } from "npm:@vrtmrz/livesync-commonlib@0.1.34/compat/common/utils";
|
||||
export { upsertRemoteConfigurationInPlace } from "npm:@vrtmrz/livesync-commonlib@0.1.34/remote-configurations";
|
||||
} from "npm:@vrtmrz/livesync-commonlib@0.2.0/setup-uri";
|
||||
export type { TimeBoundSetupURIMode } from "npm:@vrtmrz/livesync-commonlib@0.2.0/setup-uri";
|
||||
export { generateP2PRoomId } from "npm:@vrtmrz/livesync-commonlib@0.2.0/compat/common/utils";
|
||||
export { upsertRemoteConfigurationInPlace } from "npm:@vrtmrz/livesync-commonlib@0.2.0/remote-configurations";
|
||||
export {
|
||||
createNewVaultSettings,
|
||||
DEFAULT_SETTINGS,
|
||||
@@ -16,5 +16,5 @@ export {
|
||||
PREFERRED_BASE,
|
||||
PREFERRED_JOURNAL_SYNC,
|
||||
PREFERRED_SETTING_SELF_HOSTED,
|
||||
} from "npm:@vrtmrz/livesync-commonlib@0.1.34/settings";
|
||||
export type { ObsidianLiveSyncSettings } from "npm:@vrtmrz/livesync-commonlib@0.1.34/settings";
|
||||
} from "npm:@vrtmrz/livesync-commonlib@0.2.0/settings";
|
||||
export type { ObsidianLiveSyncSettings } from "npm:@vrtmrz/livesync-commonlib@0.2.0/settings";
|
||||
Reference in new issue
Block a user