@vrtmrz/livesync-commonlib 0.5.0 → 0.6.0
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/dist/common/LSError.d.ts +13 -0
- package/dist/common/LSError.js +19 -1
- package/dist/diagnostics/local.d.ts +7 -2
- package/dist/interfaces/DatabaseFileAccess.d.ts +20 -4
- package/dist/interfaces/FileHandler.d.ts +67 -1
- package/dist/interfaces/FileHandler.js +16 -0
- package/dist/interfaces/StorageEventManager.d.ts +7 -0
- package/dist/managers/ChunkFetcher.d.ts +16 -0
- package/dist/managers/ChunkFetcher.js +190 -112
- package/dist/managers/EntryManager/EntryManager.d.ts +7 -0
- package/dist/managers/EntryManager/EntryManager.js +6 -0
- package/dist/managers/EntryManager/EntryManagerImpls.d.ts +9 -5
- package/dist/managers/EntryManager/EntryManagerImpls.js +103 -76
- package/dist/managers/LayeredChunkManager/ArrivalWaitLayer.d.ts +7 -3
- package/dist/managers/LayeredChunkManager/ArrivalWaitLayer.js +83 -16
- package/dist/managers/LayeredChunkManager/DatabaseReadLayer.d.ts +3 -2
- package/dist/managers/LayeredChunkManager/DatabaseReadLayer.js +38 -36
- package/dist/managers/LayeredChunkManager/types.d.ts +15 -1
- package/dist/managers/LayeredChunkManager.d.ts +4 -0
- package/dist/managers/LayeredChunkManager.js +19 -6
- package/dist/managers/LiveSyncManagers.d.ts +2 -0
- package/dist/managers/LiveSyncManagers.js +6 -0
- package/dist/managers/StorageEventManager.d.ts +22 -0
- package/dist/managers/StorageEventManager.js +48 -1
- package/dist/pouchdb/LiveSyncLocalDB.d.ts +32 -0
- package/dist/pouchdb/LiveSyncLocalDB.js +72 -18
- package/dist/pouchdb/LocalDatabaseReadScope.d.ts +24 -0
- package/dist/pouchdb/LocalDatabaseReadScope.js +62 -0
- package/dist/pouchdb/pathIdentityCompatibility.d.ts +6 -2
- package/dist/pouchdb/pathIdentityCompatibility.js +15 -10
- package/dist/replication/contentRead.d.ts +3 -0
- package/dist/replication/contentRead.js +4 -0
- package/dist/replication/couchdb/LiveSyncReplicator.d.ts +8 -1
- package/dist/replication/couchdb/LiveSyncReplicator.js +187 -119
- package/dist/replication/index.d.ts +5 -1
- package/dist/replication/index.js +18 -1
- package/dist/serviceFeatures/offlineScanner/files.d.ts +1 -1
- package/dist/serviceFeatures/offlineScanner/files.js +27 -7
- package/dist/serviceFeatures/offlineScanner/scan.d.ts +5 -1
- package/dist/serviceFeatures/offlineScanner/scan.js +2 -1
- package/dist/serviceFeatures/offlineScanner.d.ts +1 -1
- package/dist/serviceFeatures/offlineScanner.js +10 -2
- package/dist/serviceModules/ServiceDatabaseFileAccessBase.d.ts +13 -0
- package/dist/serviceModules/ServiceDatabaseFileAccessBase.js +190 -123
- package/dist/serviceModules/ServiceFileHandlerBase/deletion.js +17 -7
- package/dist/serviceModules/ServiceFileHandlerBase/events.d.ts +3 -2
- package/dist/serviceModules/ServiceFileHandlerBase/events.js +9 -9
- package/dist/serviceModules/ServiceFileHandlerBase/protection.js +24 -9
- package/dist/serviceModules/ServiceFileHandlerBase/provenance.d.ts +10 -0
- package/dist/serviceModules/ServiceFileHandlerBase/provenance.js +28 -4
- package/dist/serviceModules/ServiceFileHandlerBase/reflection.d.ts +11 -5
- package/dist/serviceModules/ServiceFileHandlerBase/reflection.js +144 -58
- package/dist/serviceModules/ServiceFileHandlerBase/saving.js +16 -2
- package/dist/serviceModules/ServiceFileHandlerBase/scanning.js +1 -0
- package/dist/serviceModules/ServiceFileHandlerBase.d.ts +7 -2
- package/dist/serviceModules/ServiceFileHandlerBase.js +13 -4
- package/dist/services/base/ControlService.js +1 -5
- package/dist/services/base/DatabaseEventService.d.ts +3 -0
- package/dist/services/base/DatabaseEventService.js +3 -0
- package/dist/services/base/DatabaseService.d.ts +15 -0
- package/dist/services/base/DatabaseService.js +85 -4
- package/dist/services/base/IService.d.ts +18 -1
- package/dist/services/base/KeyValueDBService.d.ts +5 -4
- package/dist/services/base/KeyValueDBService.js +46 -48
- package/dist/services/base/ReplicationService.d.ts +3 -1
- package/dist/services/base/ReplicationService.js +3 -1
- package/dist/services/base/VaultScanResult.d.ts +5 -0
- package/dist/services/lib/HandlerUtils.d.ts +40 -5
- package/dist/services/lib/HandlerUtils.js +52 -4
- package/docs/development.md +8 -0
- package/docs/offline-scanner.md +46 -0
- package/docs/releasing.md +42 -0
- package/package.json +1 -1
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export { CAPABILITY_NOT_APPLICABLE, CAPABILITY_NOT_IMPLEMENTED, CENTRAL_REMOTE_REPLICATION_READINESS, NO_INTERACTION, PEER_REPLICATION_READINESS, PROVIDER_OWNED_CENTRAL_REMOTE_REPLICATION_READINESS, REPLICATION_CANCELLED, REPLICATION_COMPLETED, REPLICATION_PROGRESS_PRESENTATIONS, USER_INITIATED_REPLICATION_AUTHORITY, defineReplicatorProviderDefinitions, isReplicationCompleted, outcomeFromContinuousOpenReplication, outcomeFromFiniteOpenReplication, replicationBlocked, replicationFailed, supportedOpenReplicationContinuous, supportedOpenReplicationOneShot, supportedOpenReplicationUnattended, supportedStopActiveTransfer, supportedCapability, } from "./ReplicatorProvider.js";
|
|
2
2
|
export type { ReplicatorInstance } from "./ReplicatorInstance.js";
|
|
3
|
-
export {
|
|
3
|
+
export { ContentReadError } from "./contentRead.js";
|
|
4
|
+
export type { ContentReadFailure, ContentReadResource } from "./contentRead.js";
|
|
5
|
+
export { FILE_REFLECTION_COMPLETED, FILE_REFLECTION_POLICY, FILE_REFLECTION_CANCELLED, isReflectionCompleted, isReflectionCancelled, } from "../interfaces/FileHandler.js";
|
|
6
|
+
export type { FileReflectionResult, ReflectionTarget, ReflectionOperationContext, } from "../interfaces/FileHandler.js";
|
|
7
|
+
export { isUnencryptedContentRejectedError, UnencryptedContentRejectedError, } from "./UnencryptedContentRejectedError.js";
|
|
4
8
|
export type { UnencryptedContentKind } from "./UnencryptedContentRejectedError.js";
|
|
5
9
|
export type { ActiveReplicatorContext, CapabilitySupport, ContinuousReplicationRequest, ContinuousReplicationTrigger, ContinuousRunner, InteractionAuthority, InteractionPermissions, NotApplicableCapability, NotImplementedCapability, NoInteraction, PermittedInteractionPermissions, ReplicationBlockReason, ReplicationAttemptFailure, ReplicationCancelled, ReplicationCompleted, ReplicationFailed, ReplicationInteraction, ReplicationOutcome, ReplicationProgressPresentation, ReplicationReadinessRequirements, ReplicationPartial, ReplicationFailureRequest, ReplicatorConfigurationIdentity, ReplicatorProviderDefinition, ReplicatorProviderDefinitionMap, StopActiveTransferRunner, SupportedCapability, UnattendedOneShotRequest, UnattendedReplicationTrigger, UnattendedOneShotRunner, UserInitiatedOneShotRequest, UserInitiatedReplicationAuthority, UserInitiatedOneShotRunner, } from "./ReplicatorProvider.js";
|
|
6
10
|
export { CAPABILITY_SUPPORT_KINDS, CAPABILITY_UNAVAILABLE_REASONS } from "./ProviderCapability.js";
|
|
@@ -21,7 +21,18 @@ import {
|
|
|
21
21
|
supportedStopActiveTransfer,
|
|
22
22
|
supportedCapability
|
|
23
23
|
} from "./ReplicatorProvider.js";
|
|
24
|
-
import {
|
|
24
|
+
import { ContentReadError } from "./contentRead.js";
|
|
25
|
+
import {
|
|
26
|
+
FILE_REFLECTION_COMPLETED,
|
|
27
|
+
FILE_REFLECTION_POLICY,
|
|
28
|
+
FILE_REFLECTION_CANCELLED,
|
|
29
|
+
isReflectionCompleted,
|
|
30
|
+
isReflectionCancelled
|
|
31
|
+
} from "../interfaces/FileHandler.js";
|
|
32
|
+
import {
|
|
33
|
+
isUnencryptedContentRejectedError,
|
|
34
|
+
UnencryptedContentRejectedError
|
|
35
|
+
} from "./UnencryptedContentRejectedError.js";
|
|
25
36
|
import { CAPABILITY_SUPPORT_KINDS, CAPABILITY_UNAVAILABLE_REASONS } from "./ProviderCapability.js";
|
|
26
37
|
import { NO_REMOTE_RESOURCE_CAPABILITIES, REMOTE_RESOURCE_KINDS } from "./RemoteResource.js";
|
|
27
38
|
import {
|
|
@@ -56,7 +67,11 @@ export {
|
|
|
56
67
|
CENTRAL_REMOTE_ADMINISTRATION_OBSERVATION_KINDS,
|
|
57
68
|
CENTRAL_REMOTE_ADMINISTRATION_RESULT_STATUSES,
|
|
58
69
|
CENTRAL_REMOTE_REPLICATION_READINESS,
|
|
70
|
+
ContentReadError,
|
|
59
71
|
ENCRYPTED_INTERNAL_METADATA_FEATURE,
|
|
72
|
+
FILE_REFLECTION_CANCELLED,
|
|
73
|
+
FILE_REFLECTION_COMPLETED,
|
|
74
|
+
FILE_REFLECTION_POLICY,
|
|
60
75
|
NFC_PATH_IDENTITY_FEATURE,
|
|
61
76
|
NO_INTERACTION,
|
|
62
77
|
NO_REMOTE_RESOURCE_CAPABILITIES,
|
|
@@ -77,6 +92,8 @@ export {
|
|
|
77
92
|
describeRemoteFeatureRejection,
|
|
78
93
|
inspectDatabasePathIdentity,
|
|
79
94
|
isCentralRemoteAdministrationVerified,
|
|
95
|
+
isReflectionCancelled,
|
|
96
|
+
isReflectionCompleted,
|
|
80
97
|
isReplicationCompleted,
|
|
81
98
|
isUnencryptedContentRejectedError,
|
|
82
99
|
milestoneSatisfiesCentralRemoteAdministration,
|
|
@@ -43,5 +43,5 @@ export declare function collectDatabaseFiles(host: NecessaryServices<"database"
|
|
|
43
43
|
quarantinedFileNamesLC: Set<FilePathWithPrefixLC>;
|
|
44
44
|
}>;
|
|
45
45
|
export declare function updateToDatabase(host: NecessaryServices<"vault", "fileHandler">, log: LogFunction, logLevel: LOG_LEVEL, file: UXFileInfoStub): Promise<FilePairProcessResult>;
|
|
46
|
-
export declare function updateToStorage(host: NecessaryServices<"vault" | "path", "fileHandler">, log: LogFunction, logLevel: LOG_LEVEL, w: MetaEntry): Promise<FilePairProcessResult>;
|
|
46
|
+
export declare function updateToStorage(host: NecessaryServices<"vault" | "path", "fileHandler">, log: LogFunction, logLevel: LOG_LEVEL, w: MetaEntry, scanOptions?: VaultScanOptions): Promise<FilePairProcessResult>;
|
|
47
47
|
export declare function syncStorageAndDatabase(host: NecessaryServices<"setting" | "vault" | "path", "storageAccess" | "fileHandler">, log: LogFunction, file: UXFileInfoStub, logLevel: LOG_LEVEL, doc: MetaEntry, scanOptions?: VaultScanOptions): Promise<FilePairProcessResult>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isReflectionCompleted } from "../../interfaces/FileHandler.js";
|
|
1
2
|
import {
|
|
2
3
|
LOG_LEVEL_DEBUG,
|
|
3
4
|
LOG_LEVEL_INFO,
|
|
@@ -10,6 +11,23 @@ import { shouldBeIgnored, stripAllPrefixes } from "../../string_and_binary/path.
|
|
|
10
11
|
import { inspectMetadataDocumentIdentity } from "./metadata.js";
|
|
11
12
|
import { getPathFromEntry, convertCase } from "./paths.js";
|
|
12
13
|
import { FilePairProcessResults, MetadataDocumentIdentityStatuses } from "./types.js";
|
|
14
|
+
async function reflectScannedEntry(host, entry, file, force, options) {
|
|
15
|
+
const target = entry._rev ? { documentId: entry._id, revision: entry._rev } : void 0;
|
|
16
|
+
try {
|
|
17
|
+
const result = await host.serviceModules.fileHandler.reflectDatabaseEntry(
|
|
18
|
+
entry,
|
|
19
|
+
file,
|
|
20
|
+
force,
|
|
21
|
+
options?.reflectionOperation ?? (target ? { target, source: "scan" } : void 0)
|
|
22
|
+
);
|
|
23
|
+
return isReflectionCompleted(result) ? FilePairProcessResults.COMPLETED : FilePairProcessResults.SKIPPED;
|
|
24
|
+
} catch (error) {
|
|
25
|
+
if (target && options?.onReflectionFailed) {
|
|
26
|
+
await options.onReflectionFailed(target, error);
|
|
27
|
+
}
|
|
28
|
+
return FilePairProcessResults.FAILED;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
13
31
|
async function syncFileBetweenDBandStorage(host, log, file, doc, scanOptions) {
|
|
14
32
|
const docPath = getPathFromEntry(host, doc);
|
|
15
33
|
if (!doc) {
|
|
@@ -31,16 +49,16 @@ async function syncFileBetweenDBandStorage(host, log, file, doc, scanOptions) {
|
|
|
31
49
|
case TARGET_IS_NEW:
|
|
32
50
|
if (!host.services.vault.isFileSizeTooLarge(doc.size)) {
|
|
33
51
|
log("STORAGE <- DB :" + docPath);
|
|
34
|
-
|
|
52
|
+
const reflection = await reflectScannedEntry(host, doc, stripAllPrefixes(docPath), false, scanOptions);
|
|
53
|
+
if (reflection === FilePairProcessResults.COMPLETED) {
|
|
35
54
|
host.services.context.events.emitEvent("event-file-changed", {
|
|
36
55
|
file: file.path,
|
|
37
56
|
automated: true
|
|
38
57
|
});
|
|
39
|
-
|
|
40
|
-
} else {
|
|
58
|
+
} else if (reflection === FilePairProcessResults.FAILED) {
|
|
41
59
|
log(`STORAGE <- DB : Cloud not read ${file.path}, possibly deleted`, LOG_LEVEL_NOTICE);
|
|
42
|
-
return FilePairProcessResults.FAILED;
|
|
43
60
|
}
|
|
61
|
+
return reflection;
|
|
44
62
|
} else {
|
|
45
63
|
log(
|
|
46
64
|
`STORAGE <- DB : ${file.path} has been skipped due to file size exceeding the limit`,
|
|
@@ -165,7 +183,7 @@ async function updateToDatabase(host, log, logLevel, file) {
|
|
|
165
183
|
return FilePairProcessResults.SKIPPED;
|
|
166
184
|
}
|
|
167
185
|
}
|
|
168
|
-
async function updateToStorage(host, log, logLevel, w) {
|
|
186
|
+
async function updateToStorage(host, log, logLevel, w, scanOptions) {
|
|
169
187
|
const path = getPathFromEntry(host, w);
|
|
170
188
|
if (w && !(w.deleted || w._deleted)) {
|
|
171
189
|
if (!host.services.vault.isFileSizeTooLarge(w.size)) {
|
|
@@ -173,8 +191,10 @@ async function updateToStorage(host, log, logLevel, w) {
|
|
|
173
191
|
log(`UPDATE STORAGE: ${path} has conflicts. skipped (x)`, LOG_LEVEL_INFO);
|
|
174
192
|
return FilePairProcessResults.SKIPPED;
|
|
175
193
|
}
|
|
176
|
-
const reflected = await host
|
|
177
|
-
if (
|
|
194
|
+
const reflected = await reflectScannedEntry(host, w, null, true, scanOptions);
|
|
195
|
+
if (reflected !== FilePairProcessResults.COMPLETED) {
|
|
196
|
+
return reflected;
|
|
197
|
+
}
|
|
178
198
|
host.services.context.events.emitEvent("event-file-changed", {
|
|
179
199
|
file: path,
|
|
180
200
|
automated: true
|
|
@@ -2,7 +2,7 @@ import type { NecessaryServices } from "../../interfaces/ServiceModule.js";
|
|
|
2
2
|
import type { LogFunction } from "../../services/lib/logUtils.js";
|
|
3
3
|
import type { UnresolvedErrorManager } from "../../services/base/UnresolvedErrorManager.js";
|
|
4
4
|
import { type VaultScanResult } from "../../services/base/VaultScanResult.js";
|
|
5
|
-
import { type FullScanOptions, type FilePair, type FilePairState, type FilePairAction } from "./types.js";
|
|
5
|
+
import { type FullScanOptions, type FilePair, type FilePairState, type FilePairAction, type FilePairProcessResult } from "./types.js";
|
|
6
6
|
/**
|
|
7
7
|
* Classify the storage and retained-Metadata observations of one pair.
|
|
8
8
|
* @param pair - Selected observations from the shared scan collection.
|
|
@@ -19,6 +19,10 @@ export declare function getFilePairState(pair: FilePair): FilePairState;
|
|
|
19
19
|
* this matrix retains its established explicit extra-file policies.
|
|
20
20
|
*/
|
|
21
21
|
export declare function resolveFilePairAction(state: FilePairState, options: FullScanOptions): FilePairAction;
|
|
22
|
+
/**
|
|
23
|
+
* Process a single file pair based on the determined action from the file pair state and scan options.
|
|
24
|
+
*/
|
|
25
|
+
export declare function processFilePair(host: NecessaryServices<"setting" | "vault" | "path" | "keyValueDB", "storageAccess" | "fileHandler">, log: LogFunction, pair: FilePair, options: FullScanOptions): Promise<FilePairProcessResult>;
|
|
22
26
|
/**
|
|
23
27
|
* Run one scan at a time for each backing-store owner.
|
|
24
28
|
* @param host - Borrowed scan services and file-operation capabilities.
|
|
@@ -128,7 +128,7 @@ async function processFilePair(host, log, pair, options) {
|
|
|
128
128
|
if (!doc) {
|
|
129
129
|
throw new Error(`Missing database entry for ${path}`);
|
|
130
130
|
}
|
|
131
|
-
const updateStorageResult = await updateToStorage(host, log, LOG_LEVEL_INFO, doc);
|
|
131
|
+
const updateStorageResult = await updateToStorage(host, log, LOG_LEVEL_INFO, doc, options);
|
|
132
132
|
if (updateStorageResult === FilePairProcessResults.COMPLETED) {
|
|
133
133
|
updateFileMTimeInMap(host, fileMapKey, doc.mtime);
|
|
134
134
|
}
|
|
@@ -353,6 +353,7 @@ async function synchroniseFilePairs(host, log, errorManager, options) {
|
|
|
353
353
|
}
|
|
354
354
|
export {
|
|
355
355
|
getFilePairState,
|
|
356
|
+
processFilePair,
|
|
356
357
|
resolveFilePairAction,
|
|
357
358
|
synchroniseAllFilesBetweenDBandStorage
|
|
358
359
|
};
|
|
@@ -11,7 +11,7 @@ export { getMetadataDocumentNamespace, inspectMetadataDocumentIdentity, inspectM
|
|
|
11
11
|
export { getPathFromEntry, convertCase } from "./offlineScanner/paths.js";
|
|
12
12
|
export { clearOfflineScannerLastSeen } from "./offlineScanner/fileStatus.js";
|
|
13
13
|
export { syncFileBetweenDBandStorage, collectFilesOnStorage, collectDatabaseFiles, updateToDatabase, updateToStorage, syncStorageAndDatabase, } from "./offlineScanner/files.js";
|
|
14
|
-
export { getFilePairState, resolveFilePairAction, synchroniseAllFilesBetweenDBandStorage } from "./offlineScanner/scan.js";
|
|
14
|
+
export { getFilePairState, resolveFilePairAction, processFilePair, synchroniseAllFilesBetweenDBandStorage, } from "./offlineScanner/scan.js";
|
|
15
15
|
/**
|
|
16
16
|
* Check configuration, suspension, and remediation policy before a full scan.
|
|
17
17
|
* @param host - Borrowed settings and store capabilities.
|
|
@@ -33,7 +33,12 @@ import {
|
|
|
33
33
|
updateToStorage,
|
|
34
34
|
syncStorageAndDatabase
|
|
35
35
|
} from "./offlineScanner/files.js";
|
|
36
|
-
import {
|
|
36
|
+
import {
|
|
37
|
+
getFilePairState,
|
|
38
|
+
resolveFilePairAction,
|
|
39
|
+
processFilePair,
|
|
40
|
+
synchroniseAllFilesBetweenDBandStorage as synchroniseAllFilesBetweenDBandStorage2
|
|
41
|
+
} from "./offlineScanner/scan.js";
|
|
37
42
|
function canProceedScan(host, errorManager, log, showingNotice = false, ignoreSuspending = false) {
|
|
38
43
|
const settings = host.services.setting.currentSettings();
|
|
39
44
|
const ERR_NOT_CONFIGURED = "LiveSync is not configured yet. Synchronising between the storage and the local database is now prevented.";
|
|
@@ -106,7 +111,9 @@ function useOfflineScanner(host) {
|
|
|
106
111
|
showingNotice,
|
|
107
112
|
ignoreSuspending,
|
|
108
113
|
continueOnFileFailure,
|
|
109
|
-
strictContentCheck: scanOptions?.strictContentCheck
|
|
114
|
+
strictContentCheck: scanOptions?.strictContentCheck,
|
|
115
|
+
onReflectionFailed: scanOptions?.onReflectionFailed,
|
|
116
|
+
reflectionOperation: scanOptions?.reflectionOperation
|
|
110
117
|
});
|
|
111
118
|
};
|
|
112
119
|
host.services.vault.scanVault.addHandler(handleScanVault);
|
|
@@ -134,6 +141,7 @@ export {
|
|
|
134
141
|
inspectMetadataDocumentIdentity,
|
|
135
142
|
normaliseFullScanOptions,
|
|
136
143
|
performFullScan,
|
|
144
|
+
processFilePair,
|
|
137
145
|
repairMetadataDocumentIdentity,
|
|
138
146
|
resolveFilePairAction,
|
|
139
147
|
syncFileBetweenDBandStorage,
|
|
@@ -42,6 +42,9 @@ export declare class ServiceDatabaseFileAccessBase extends ServiceModuleBase<Ser
|
|
|
42
42
|
storeDeletionWithBaseRevision(file: UXFileInfoStub | FilePathWithPrefix, baseRevision: string): Promise<string | false>;
|
|
43
43
|
storeContent(path: FilePathWithPrefix, content: string): Promise<boolean>;
|
|
44
44
|
private __store;
|
|
45
|
+
private prepareStoreEntry;
|
|
46
|
+
private shouldSkipStoreEntryWrite;
|
|
47
|
+
private writeStoreEntry;
|
|
45
48
|
/** Reconstruct the immediate parent ID from revision history, or return `false` if unavailable. */
|
|
46
49
|
private getParentRev;
|
|
47
50
|
/**
|
|
@@ -50,6 +53,8 @@ export declare class ServiceDatabaseFileAccessBase extends ServiceModuleBase<Ser
|
|
|
50
53
|
* Historical matches alone do not establish the origin of current storage content.
|
|
51
54
|
*/
|
|
52
55
|
private findContentRevisionsInternal;
|
|
56
|
+
private collectAvailableHistoryRevisions;
|
|
57
|
+
private matchRevisionContent;
|
|
53
58
|
/** Find matching content throughout available history, including non-leaf revisions. */
|
|
54
59
|
findContentRevisions(file: UXFileInfoStub | FilePathWithPrefix, content: string | string[] | Blob | ArrayBuffer, currentRev?: string): Promise<string[]>;
|
|
55
60
|
/**
|
|
@@ -60,11 +65,19 @@ export declare class ServiceDatabaseFileAccessBase extends ServiceModuleBase<Ser
|
|
|
60
65
|
* unique origin; this method does not mutate provenance or hold the revision tree stable.
|
|
61
66
|
*/
|
|
62
67
|
findLiveContentRevisions(file: UXFileInfoStub | FilePathWithPrefix, content: string | string[] | Blob | ArrayBuffer): Promise<string[]>;
|
|
68
|
+
/** Select current live leaves, independently of historical ancestor lookup. */
|
|
69
|
+
private selectLiveContentLeaves;
|
|
70
|
+
/** Compare selected leaves using local Chunks only; unreadable content rejects. */
|
|
71
|
+
readLiveContentRevisions(file: UXFileInfoStub | FilePathWithPrefix, content: string | string[] | Blob | ArrayBuffer): Promise<string[]>;
|
|
63
72
|
hasContentInRevisionHistory(file: UXFileInfoStub | FilePathWithPrefix, content: string | string[] | Blob | ArrayBuffer, currentRev?: string): Promise<boolean>;
|
|
64
73
|
getConflictedRevs(file: UXFileInfoStub | FilePathWithPrefix): Promise<string[]>;
|
|
74
|
+
readConflictedRevs(file: UXFileInfoStub | FilePathWithPrefix): Promise<string[]>;
|
|
65
75
|
fetch(file: UXFileInfoStub | FilePathWithPrefix, rev?: string, waitForReady?: boolean, skipCheck?: boolean): Promise<UXFileInfo | false>;
|
|
66
76
|
fetchEntryMeta(file: UXFileInfoStub | FilePathWithPrefix, rev?: string, skipCheck?: boolean): Promise<MetaEntry | false>;
|
|
77
|
+
readEntryMeta(file: UXFileInfoStub | FilePathWithPrefix, rev?: string, skipCheck?: boolean): Promise<MetaEntry | false>;
|
|
67
78
|
fetchEntryFromMeta(meta: MetaEntry, waitForReady?: boolean, skipCheck?: boolean, localOnly?: boolean): Promise<LoadedEntry | false>;
|
|
79
|
+
readEntryFromMeta(meta: MetaEntry, waitForReady?: boolean, skipCheck?: boolean, localOnly?: boolean): Promise<LoadedEntry | false>;
|
|
68
80
|
fetchEntry(file: UXFileInfoStub | FilePathWithPrefix, rev?: string, waitForReady?: boolean, skipCheck?: boolean, localOnly?: boolean): Promise<LoadedEntry | false>;
|
|
81
|
+
readEntry(file: UXFileInfoStub | FilePathWithPrefix, rev?: string, waitForReady?: boolean, skipCheck?: boolean, localOnly?: boolean): Promise<LoadedEntry | false>;
|
|
69
82
|
deleteFromDBbyPath(fullPath: FilePath | FilePathWithPrefix, rev?: string): Promise<boolean>;
|
|
70
83
|
}
|