@vrtmrz/livesync-commonlib 0.3.0 → 0.3.2
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 +27 -4
- package/dist/API/DirectFileManipulatorV2.d.ts +1 -0
- package/dist/API/DirectFileManipulatorV2.js +6 -12
- package/dist/API/processSetting.d.ts +1 -0
- package/dist/common/models/setting.const.defaults.js +1 -0
- package/dist/common/models/setting.const.qr.js +1 -0
- package/dist/common/models/setting.policy.d.ts +4 -0
- package/dist/common/models/setting.policy.js +1 -0
- package/dist/common/models/setting.type.d.ts +2 -0
- package/dist/common/models/tweak.definition.d.ts +1 -0
- package/dist/common/pathNamespace.d.ts +4 -0
- package/dist/common/pathNamespace.js +10 -0
- package/dist/common/settingConstants.d.ts +1 -0
- package/dist/common/settingConstants.js +4 -0
- package/dist/platform/AmbiguousNormalisedPathError.d.ts +16 -0
- package/dist/platform/AmbiguousNormalisedPathError.js +21 -0
- package/dist/platform/StoragePathResolver.d.ts +15 -0
- package/dist/platform/StoragePathResolver.js +113 -0
- package/dist/platform/browser/UnicodeResolvingFileSystemAccessStorageAdapter.d.ts +74 -0
- package/dist/platform/browser/UnicodeResolvingFileSystemAccessStorageAdapter.js +169 -0
- package/dist/platform/browser/index.d.ts +1 -0
- package/dist/platform/browser/index.js +2 -0
- package/dist/platform/browser/storage.d.ts +23 -0
- package/dist/platform/browser/storage.js +138 -0
- package/dist/platform/node/UnicodeResolvingNodeStorageAdapter.d.ts +79 -0
- package/dist/platform/node/UnicodeResolvingNodeStorageAdapter.js +218 -0
- package/dist/platform/node/index.d.ts +1 -0
- package/dist/platform/node/index.js +2 -0
- package/dist/platform/node/storage.d.ts +30 -1
- package/dist/platform/node/storage.js +88 -0
- package/dist/platform/pathComparison.d.ts +53 -0
- package/dist/platform/pathComparison.js +39 -0
- package/dist/platform/pathTypes.d.ts +154 -0
- package/dist/platform/pathTypes.js +0 -0
- package/dist/platform/storagePathResolution.d.ts +13 -0
- package/dist/platform/storagePathResolution.js +9 -0
- package/dist/replication/SyncParamsHandler.d.ts +1 -0
- package/dist/replication/SyncParamsHandler.js +5 -1
- package/dist/replication/couchdb/LiveSyncReplicator.js +5 -3
- package/dist/replication/journal/JournalReceiveFailure.d.ts +7 -0
- package/dist/replication/journal/JournalReceiveFailure.js +16 -0
- package/dist/replication/journal/JournalSyncCore.d.ts +22 -3
- package/dist/replication/journal/JournalSyncCore.js +288 -166
- package/dist/replication/journal/JournalSyncTypes.d.ts +13 -0
- package/dist/replication/journal/LiveSyncJournalReplicator.d.ts +6 -1
- package/dist/replication/journal/LiveSyncJournalReplicator.js +31 -44
- package/dist/replication/journal/journalCompatibility.d.ts +9 -0
- package/dist/replication/journal/journalCompatibility.js +58 -0
- package/dist/replication/journal/journalReceive.d.ts +23 -0
- package/dist/replication/journal/journalReceive.js +44 -0
- package/dist/replication/journal/journalRecords.d.ts +10 -0
- package/dist/replication/journal/journalRecords.js +96 -0
- package/dist/replication/trystero/TrysteroReplicator.d.ts +2 -0
- package/dist/serviceModules/Rebuilder.js +2 -1
- package/dist/services/base/FileProcessingService.d.ts +2 -2
- package/dist/services/base/RemoteConnection.d.ts +2 -0
- package/dist/services/base/RemoteService.d.ts +1 -1
- package/dist/services/base/RemoteService.js +13 -5
- package/dist/services/implements/injectable/InjectableVaultService.d.ts +1 -1
- package/dist/services/lib/couchdbHttpCache.d.ts +5 -0
- package/dist/services/lib/couchdbHttpCache.js +36 -0
- package/dist/storage.d.ts +4 -0
- package/dist/storage.js +19 -0
- package/dist/string_and_binary/path.js +4 -7
- package/dist/worker/bgWorker.js +1 -1
- package/docs/adr/2026_11_shared_storage_path_resolution.md +75 -0
- package/docs/design_docs/storage_path_resolution.md +306 -0
- package/docs/development.md +11 -1
- package/docs/journal-receive-recovery.md +66 -0
- package/docs/platform-storage.md +61 -0
- package/docs/releasing.md +25 -0
- package/docs/unicode-path-identity.md +49 -17
- package/package.json +9 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
date: 2026-10-19
|
|
3
3
|
commonlib-version: "0.1.42"
|
|
4
4
|
self-hosted-livesync-version: "1.0.38"
|
|
5
|
-
status:
|
|
5
|
+
status: published
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Unicode path identity
|
|
@@ -14,8 +14,11 @@ does not alter the Metadata path or require physical files to be renamed.
|
|
|
14
14
|
Unsupported values are rejected.
|
|
15
15
|
|
|
16
16
|
NFC identity shipped in Commonlib `0.1.42` and Self-hosted LiveSync `1.0.38`.
|
|
17
|
-
The Journal and P2P extension
|
|
18
|
-
|
|
17
|
+
The Journal and P2P extension is published in
|
|
18
|
+
[Commonlib 0.3.0](https://www.npmjs.com/package/@vrtmrz/livesync-commonlib/v/0.3.0).
|
|
19
|
+
The original date and reviewed versions above retain the CouchDB baseline.
|
|
20
|
+
CLI and Obsidian host adoption is pending in
|
|
21
|
+
[Self-hosted LiveSync #1309](https://github.com/vrtmrz/obsidian-livesync/pull/1309).
|
|
19
22
|
|
|
20
23
|
## Package contract
|
|
21
24
|
|
|
@@ -29,10 +32,11 @@ to its existing physical entry.
|
|
|
29
32
|
## Initial host settings
|
|
30
33
|
|
|
31
34
|
Commonlib's shared new-Vault and stored-setting defaults retain version `0`.
|
|
32
|
-
The maintained CLI and Obsidian
|
|
33
|
-
synchronisation settings
|
|
34
|
-
|
|
35
|
-
NFC for WebApp or WebPeer, and does not migrate
|
|
35
|
+
The maintained CLI and Obsidian host extension uses version `1` for newly
|
|
36
|
+
created synchronisation settings, while retaining `0` for old settings and
|
|
37
|
+
Setup URIs which omit the field. Its application adoption is tracked above.
|
|
38
|
+
This policy does not enable NFC for WebApp or WebPeer, and does not migrate
|
|
39
|
+
existing databases.
|
|
36
40
|
|
|
37
41
|
The focused replication entry exports `inspectDatabasePathIdentity` and
|
|
38
42
|
`PathIdentityInspection`. The existing `RemoteConnectionProbe` may expose
|
|
@@ -97,13 +101,37 @@ does not itself perform the required reconstruction.
|
|
|
97
101
|
|
|
98
102
|
## Supported hosts
|
|
99
103
|
|
|
100
|
-
The
|
|
101
|
-
and P2P
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
The published Commonlib `0.3.0` package includes NFC protocol support for
|
|
105
|
+
Journal and P2P. The matching Self-hosted LiveSync CLI and Obsidian host
|
|
106
|
+
adoption remains an unreleased candidate tracked by
|
|
107
|
+
[pull request #1309](https://github.com/vrtmrz/obsidian-livesync/pull/1309);
|
|
108
|
+
the package protocol support alone does not mean those host integrations have
|
|
109
|
+
shipped.
|
|
110
|
+
|
|
111
|
+
The shared `/storage` resolver, Node and File System Access adapters, and
|
|
112
|
+
explicit `DirectFileManipulator` path-version option are published in
|
|
113
|
+
[Commonlib 0.3.1](https://www.npmjs.com/package/@vrtmrz/livesync-commonlib/v/0.3.1),
|
|
114
|
+
as described in the [shared storage path design](design_docs/storage_path_resolution.md).
|
|
115
|
+
They are absent from the registry artefact `0.3.0`; select the new immutable
|
|
116
|
+
version rather than a source checkout carrying an older version label. Shared
|
|
117
|
+
path adoption remains in [LiveSync #1315](https://github.com/vrtmrz/obsidian-livesync/pull/1315)
|
|
118
|
+
and [Bridge #92](https://github.com/vrtmrz/livesync-bridge/pull/92).
|
|
119
|
+
|
|
120
|
+
| Consumer surface | Published baseline | Current candidate status |
|
|
121
|
+
| --- | --- | --- |
|
|
122
|
+
| CLI and Obsidian with CouchDB | NFC identity is released in Commonlib `0.1.42` and Self-hosted LiveSync `1.0.38`. | The unreleased LiveSync candidate adds the shared Node resolver in the CLI and shared namespace/comparison helpers in Obsidian. |
|
|
123
|
+
| CLI and Obsidian with Journal or P2P | Commonlib `0.3.0` publishes the NFC protocol support. | Matching host adoption remains unreleased pending [LiveSync #1309](https://github.com/vrtmrz/obsidian-livesync/pull/1309). |
|
|
124
|
+
| Bridge | Legacy version `0` remains the default baseline. | The Bridge candidate enables version `1` only by explicit peer opt-in; every peer in a group must use the same path version. Its ordinary case-mismatch check remains separate from the required version check. |
|
|
125
|
+
| WebApp | Legacy version `0` only. | WebApp remains Legacy-only; an explicit version `1` is rejected at startup. The browser storage primitive alone does not enable application support. |
|
|
126
|
+
| WebPeer | A vaultless P2P utility. | It is not an NFC filesystem host. |
|
|
127
|
+
| `DirectFileManipulator` | Commonlib `0.3.1` supports explicit version `1`; omitted or `0` retains Legacy identity. A populated database in the opposite mode is rejected. | The caller still owns physical path handling and coordinated migration. |
|
|
128
|
+
|
|
129
|
+
`PathService` owns logical ID derivation. In the unreleased LiveSync host
|
|
130
|
+
candidate, the CLI resolves NFC-equivalent names against directory entries
|
|
131
|
+
while preserving the actual entry spelling; its generic Node storage contract
|
|
132
|
+
remains exact-path access. Obsidian supplies its normalised storage paths and
|
|
133
|
+
preserves an existing physical spelling when it is NFC-equivalent to the
|
|
134
|
+
received path.
|
|
107
135
|
|
|
108
136
|
Journal uses compatibility range `4` for NFC identity, independently of
|
|
109
137
|
encryption and path obfuscation. Legacy ranges remain unchanged. The existing
|
|
@@ -146,9 +174,13 @@ checkpoints; the P2P source mark and target checkpoint handle database
|
|
|
146
174
|
replacement. These operations do not rewrite IDs or merge histories in place.
|
|
147
175
|
P2P retains its existing source selection during Fetch.
|
|
148
176
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
177
|
+
Commonlib 0.3.1 `DirectFileManipulator` exposes explicit
|
|
178
|
+
`pathNormalizationVersion` options, defaulting to `0`: missing or `0` retains
|
|
179
|
+
Legacy and rejects an NFC database; `1` accepts NFC and rejects a populated
|
|
180
|
+
Legacy database before feature negotiation can change its declaration. A
|
|
181
|
+
confirmed empty database follows the existing first-write feature contract.
|
|
182
|
+
Direct integrations must establish physical path resolution before offering
|
|
183
|
+
this setting; database admission alone does not provide that host behaviour. The regression tests cover ASCII,
|
|
152
184
|
NFC, NFD, and mixed paths through in-memory PouchDB Metadata lookup, with and
|
|
153
185
|
without path obfuscation, plus database admission, reconstruction ordering,
|
|
154
186
|
collisions, and physical path handling. These tests do not establish native
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vrtmrz/livesync-commonlib",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Shared data, storage, and replication primitives for Self-hosted LiveSync clients.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -92,6 +92,11 @@
|
|
|
92
92
|
"import": "./dist/settings.js",
|
|
93
93
|
"default": "./dist/settings.js"
|
|
94
94
|
},
|
|
95
|
+
"./storage": {
|
|
96
|
+
"types": "./dist/storage.d.ts",
|
|
97
|
+
"import": "./dist/storage.js",
|
|
98
|
+
"default": "./dist/storage.js"
|
|
99
|
+
},
|
|
95
100
|
"./setup-uri": {
|
|
96
101
|
"types": "./dist/setupUri.d.ts",
|
|
97
102
|
"import": "./dist/setupUri.js",
|
|
@@ -675,6 +680,9 @@
|
|
|
675
680
|
"settings": [
|
|
676
681
|
"dist/settings.d.ts"
|
|
677
682
|
],
|
|
683
|
+
"storage": [
|
|
684
|
+
"dist/storage.d.ts"
|
|
685
|
+
],
|
|
678
686
|
"setup-uri": [
|
|
679
687
|
"dist/setupUri.d.ts"
|
|
680
688
|
],
|