@vrtmrz/livesync-commonlib 0.3.0 → 0.3.1
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 +17 -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/couchdb/LiveSyncReplicator.js +5 -3
- 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 +73 -0
- package/docs/design_docs/storage_path_resolution.md +305 -0
- package/docs/development.md +11 -1
- package/docs/platform-storage.md +61 -0
- package/docs/releasing.md +25 -0
- package/docs/unicode-path-identity.md +48 -17
- package/package.json +9 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { splitPathNamespace } from "../common/pathNamespace.js";
|
|
1
2
|
import { Minimatch } from "minimatch";
|
|
2
3
|
import { getWebCrypto } from "../mods.js";
|
|
3
4
|
import {
|
|
@@ -13,7 +14,7 @@ import {
|
|
|
13
14
|
import { memorizeFuncWithLRUCache } from "../common/utils.js";
|
|
14
15
|
import { uint8ArrayToHexString, writeString } from "./convert.js";
|
|
15
16
|
import { unique } from "octagonal-wheels/collection.js";
|
|
16
|
-
import { CHeader
|
|
17
|
+
import { CHeader } from "../common/models/fileaccess.const.js";
|
|
17
18
|
import { computeKeyedId } from "../common/idDerivation.js";
|
|
18
19
|
function isValidFilenameInWidows(filename) {
|
|
19
20
|
const regex = /[\u0000-\u001f]|[\\":?<>|*#]/g;
|
|
@@ -45,12 +46,8 @@ function addPrefix(path, prefix) {
|
|
|
45
46
|
return `${prefix ?? ""}${path}`;
|
|
46
47
|
}
|
|
47
48
|
function expandFilePathPrefix(path) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return [prefix, path.substring(prefix.length)];
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return ["", path];
|
|
49
|
+
const [prefix, body] = splitPathNamespace(path);
|
|
50
|
+
return [prefix, body];
|
|
54
51
|
}
|
|
55
52
|
function expandDocumentIDPrefix(id) {
|
|
56
53
|
for (const prefix of [CHeader, PREFIX_OBFUSCATED]) {
|