@vrtmrz/livesync-commonlib 0.1.0-rc.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/LICENSE +21 -0
- package/README.md +49 -0
- package/dist/API/DirectFileManipulator.d.ts +2 -0
- package/dist/API/DirectFileManipulator.js +4 -0
- package/dist/API/DirectFileManipulatorV2.d.ts +150 -0
- package/dist/API/DirectFileManipulatorV2.js +424 -0
- package/dist/API/processSetting.d.ts +41 -0
- package/dist/API/processSetting.js +140 -0
- package/dist/ContentSplitter/ContentSplitter.d.ts +28 -0
- package/dist/ContentSplitter/ContentSplitter.js +5 -0
- package/dist/ContentSplitter/ContentSplitterBase.d.ts +51 -0
- package/dist/ContentSplitter/ContentSplitterBase.js +83 -0
- package/dist/ContentSplitter/ContentSplitterRabinKarp.d.ts +9 -0
- package/dist/ContentSplitter/ContentSplitterRabinKarp.js +32 -0
- package/dist/ContentSplitter/ContentSplitterV1.d.ts +9 -0
- package/dist/ContentSplitter/ContentSplitterV1.js +34 -0
- package/dist/ContentSplitter/ContentSplitterV2.d.ts +9 -0
- package/dist/ContentSplitter/ContentSplitterV2.js +34 -0
- package/dist/ContentSplitter/ContentSplitters.d.ts +12 -0
- package/dist/ContentSplitter/ContentSplitters.js +29 -0
- package/dist/bureau/bureau.d.ts +7 -0
- package/dist/bureau/bureau.js +5 -0
- package/dist/common/ConnectionString.d.ts +30 -0
- package/dist/common/ConnectionString.js +179 -0
- package/dist/common/LSError.d.ts +48 -0
- package/dist/common/LSError.js +112 -0
- package/dist/common/configForDoc.d.ts +79 -0
- package/dist/common/configForDoc.js +312 -0
- package/dist/common/coreEnvFunctions.d.ts +21 -0
- package/dist/common/coreEnvFunctions.js +22 -0
- package/dist/common/coreEnvVars.d.ts +3 -0
- package/dist/common/coreEnvVars.js +6 -0
- package/dist/common/i18n.d.ts +18 -0
- package/dist/common/i18n.js +7193 -0
- package/dist/common/logger.d.ts +2 -0
- package/dist/common/logger.js +1 -0
- package/dist/common/messages/combinedMessages.dev.d.ts +7 -0
- package/dist/common/messages/combinedMessages.dev.js +44 -0
- package/dist/common/messages/combinedMessages.prod.d.ts +9264 -0
- package/dist/common/messages/combinedMessages.prod.js +9271 -0
- package/dist/common/messages/de.d.ts +297 -0
- package/dist/common/messages/de.js +7 -0
- package/dist/common/messages/def.d.ts +1119 -0
- package/dist/common/messages/def.js +7 -0
- package/dist/common/messages/es.d.ts +689 -0
- package/dist/common/messages/es.js +7 -0
- package/dist/common/messages/fr.d.ts +582 -0
- package/dist/common/messages/fr.js +7 -0
- package/dist/common/messages/he.d.ts +583 -0
- package/dist/common/messages/he.js +7 -0
- package/dist/common/messages/ja.d.ts +838 -0
- package/dist/common/messages/ja.js +7 -0
- package/dist/common/messages/ko.d.ts +800 -0
- package/dist/common/messages/ko.js +7 -0
- package/dist/common/messages/ru.d.ts +858 -0
- package/dist/common/messages/ru.js +7 -0
- package/dist/common/messages/zh-tw.d.ts +384 -0
- package/dist/common/messages/zh-tw.js +7 -0
- package/dist/common/messages/zh.d.ts +1093 -0
- package/dist/common/messages/zh.js +7 -0
- package/dist/common/messagesJson/de.json +295 -0
- package/dist/common/messagesJson/en.json +1117 -0
- package/dist/common/messagesJson/es.json +687 -0
- package/dist/common/messagesJson/fr.json +580 -0
- package/dist/common/messagesJson/he.json +581 -0
- package/dist/common/messagesJson/ja.json +836 -0
- package/dist/common/messagesJson/ko.json +798 -0
- package/dist/common/messagesJson/ru.json +856 -0
- package/dist/common/messagesJson/zh-tw.json +382 -0
- package/dist/common/messagesJson/zh.json +1091 -0
- package/dist/common/models/auth.type.d.ts +41 -0
- package/dist/common/models/auth.type.js +0 -0
- package/dist/common/models/db.const.d.ts +20 -0
- package/dist/common/models/db.const.js +28 -0
- package/dist/common/models/db.definition.d.ts +56 -0
- package/dist/common/models/db.definition.js +6 -0
- package/dist/common/models/db.type.d.ts +142 -0
- package/dist/common/models/db.type.js +0 -0
- package/dist/common/models/diff.definition.d.ts +16 -0
- package/dist/common/models/diff.definition.js +0 -0
- package/dist/common/models/fileaccess.const.d.ts +7 -0
- package/dist/common/models/fileaccess.const.js +16 -0
- package/dist/common/models/fileaccess.type.d.ts +72 -0
- package/dist/common/models/fileaccess.type.js +0 -0
- package/dist/common/models/redflag.const.d.ts +32 -0
- package/dist/common/models/redflag.const.js +27 -0
- package/dist/common/models/setting.const.d.ts +49 -0
- package/dist/common/models/setting.const.defaults.d.ts +3 -0
- package/dist/common/models/setting.const.defaults.js +185 -0
- package/dist/common/models/setting.const.js +68 -0
- package/dist/common/models/setting.const.preferred.d.ts +5 -0
- package/dist/common/models/setting.const.preferred.js +35 -0
- package/dist/common/models/setting.const.qr.d.ts +2 -0
- package/dist/common/models/setting.const.qr.js +174 -0
- package/dist/common/models/setting.type.d.ts +900 -0
- package/dist/common/models/setting.type.js +8 -0
- package/dist/common/models/shared.const.behabiour.d.ts +28 -0
- package/dist/common/models/shared.const.behabiour.js +36 -0
- package/dist/common/models/shared.const.d.ts +5 -0
- package/dist/common/models/shared.const.js +12 -0
- package/dist/common/models/shared.const.symbols.d.ts +9 -0
- package/dist/common/models/shared.const.symbols.js +20 -0
- package/dist/common/models/shared.definition.configNames.d.ts +36 -0
- package/dist/common/models/shared.definition.configNames.js +203 -0
- package/dist/common/models/shared.definition.d.ts +22 -0
- package/dist/common/models/shared.definition.js +24 -0
- package/dist/common/models/shared.type.util.d.ts +8 -0
- package/dist/common/models/shared.type.util.js +0 -0
- package/dist/common/models/sync.definition.d.ts +18 -0
- package/dist/common/models/sync.definition.js +20 -0
- package/dist/common/models/tweak.definition.d.ts +191 -0
- package/dist/common/models/tweak.definition.js +77 -0
- package/dist/common/rosetta.d.ts +42 -0
- package/dist/common/rosetta.js +57 -0
- package/dist/common/settingConstants.d.ts +216 -0
- package/dist/common/settingConstants.js +434 -0
- package/dist/common/typeUtils.d.ts +17 -0
- package/dist/common/typeUtils.js +51 -0
- package/dist/common/types.d.ts +107 -0
- package/dist/common/types.js +212 -0
- package/dist/common/utils.d.ts +129 -0
- package/dist/common/utils.doc.d.ts +11 -0
- package/dist/common/utils.doc.js +35 -0
- package/dist/common/utils.js +583 -0
- package/dist/common/utils.object.d.ts +2 -0
- package/dist/common/utils.object.js +14 -0
- package/dist/common/utils.patch.d.ts +8 -0
- package/dist/common/utils.patch.js +178 -0
- package/dist/common/utils.type.d.ts +1 -0
- package/dist/common/utils.type.js +0 -0
- package/dist/context.d.ts +8 -0
- package/dist/context.js +14 -0
- package/dist/databases/IndexedDBKeyValueDatabase.d.ts +26 -0
- package/dist/databases/IndexedDBKeyValueDatabase.js +130 -0
- package/dist/dataobject/StoredMap.d.ts +12 -0
- package/dist/dataobject/StoredMap.js +47 -0
- package/dist/dev/checks.d.ts +5 -0
- package/dist/dev/checks.js +38 -0
- package/dist/encryption/encryptHKDF.d.ts +3 -0
- package/dist/encryption/encryptHKDF.js +7 -0
- package/dist/encryption/stringEncryption.d.ts +27 -0
- package/dist/encryption/stringEncryption.js +59 -0
- package/dist/events/coreEvents.d.ts +54 -0
- package/dist/events/coreEvents.js +46 -0
- package/dist/hub/hub.d.ts +11 -0
- package/dist/hub/hub.js +7 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -0
- package/dist/interfaces/AsyncActivityRunner.d.ts +18 -0
- package/dist/interfaces/AsyncActivityRunner.js +7 -0
- package/dist/interfaces/Confirm.d.ts +17 -0
- package/dist/interfaces/Confirm.js +0 -0
- package/dist/interfaces/DatabaseFileAccess.d.ts +14 -0
- package/dist/interfaces/DatabaseFileAccess.js +0 -0
- package/dist/interfaces/DatabaseRebuilder.d.ts +13 -0
- package/dist/interfaces/DatabaseRebuilder.js +0 -0
- package/dist/interfaces/FileHandler.d.ts +13 -0
- package/dist/interfaces/FileHandler.js +0 -0
- package/dist/interfaces/KeyValueDatabase.d.ts +11 -0
- package/dist/interfaces/KeyValueDatabase.js +0 -0
- package/dist/interfaces/ServiceModule.d.ts +59 -0
- package/dist/interfaces/ServiceModule.js +19 -0
- package/dist/interfaces/StorageAccess.d.ts +44 -0
- package/dist/interfaces/StorageAccess.js +0 -0
- package/dist/interfaces/StorageEventManager.d.ts +16 -0
- package/dist/interfaces/StorageEventManager.js +5 -0
- package/dist/managers/ChangeManager.d.ts +61 -0
- package/dist/managers/ChangeManager.js +104 -0
- package/dist/managers/ChunkDeliveryCoordinator.d.ts +51 -0
- package/dist/managers/ChunkDeliveryCoordinator.js +136 -0
- package/dist/managers/ChunkFetcher.d.ts +44 -0
- package/dist/managers/ChunkFetcher.js +251 -0
- package/dist/managers/ChunkManager.d.ts +2 -0
- package/dist/managers/ChunkManager.js +4 -0
- package/dist/managers/ConflictManager.d.ts +37 -0
- package/dist/managers/ConflictManager.js +322 -0
- package/dist/managers/EntryManager/EntryManager.d.ts +37 -0
- package/dist/managers/EntryManager/EntryManager.js +73 -0
- package/dist/managers/EntryManager/EntryManagerImpls.d.ts +74 -0
- package/dist/managers/EntryManager/EntryManagerImpls.js +499 -0
- package/dist/managers/HashManager/HashManager.d.ts +60 -0
- package/dist/managers/HashManager/HashManager.js +97 -0
- package/dist/managers/HashManager/HashManagerCore.d.ts +114 -0
- package/dist/managers/HashManager/HashManagerCore.js +99 -0
- package/dist/managers/HashManager/PureJSHashManager.d.ts +77 -0
- package/dist/managers/HashManager/PureJSHashManager.js +84 -0
- package/dist/managers/HashManager/XXHashHashManager.d.ts +96 -0
- package/dist/managers/HashManager/XXHashHashManager.js +111 -0
- package/dist/managers/LayeredChunkManager/ArrivalWaitLayer.d.ts +30 -0
- package/dist/managers/LayeredChunkManager/ArrivalWaitLayer.js +115 -0
- package/dist/managers/LayeredChunkManager/CacheLayer.d.ts +59 -0
- package/dist/managers/LayeredChunkManager/CacheLayer.js +161 -0
- package/dist/managers/LayeredChunkManager/ChunkLayerInterfaces.d.ts +37 -0
- package/dist/managers/LayeredChunkManager/ChunkLayerInterfaces.js +0 -0
- package/dist/managers/LayeredChunkManager/DatabaseReadLayer.d.ts +14 -0
- package/dist/managers/LayeredChunkManager/DatabaseReadLayer.js +78 -0
- package/dist/managers/LayeredChunkManager/DatabaseWriteLayer.d.ts +11 -0
- package/dist/managers/LayeredChunkManager/DatabaseWriteLayer.js +43 -0
- package/dist/managers/LayeredChunkManager/HotPackLayer.d.ts +9 -0
- package/dist/managers/LayeredChunkManager/HotPackLayer.js +8 -0
- package/dist/managers/LayeredChunkManager/types.d.ts +39 -0
- package/dist/managers/LayeredChunkManager/types.js +0 -0
- package/dist/managers/LayeredChunkManager.d.ts +53 -0
- package/dist/managers/LayeredChunkManager.js +240 -0
- package/dist/managers/LiveSyncManagers.d.ts +48 -0
- package/dist/managers/LiveSyncManagers.js +136 -0
- package/dist/managers/StorageEventManager.d.ts +135 -0
- package/dist/managers/StorageEventManager.js +564 -0
- package/dist/managers/StorageProcessingManager.d.ts +14 -0
- package/dist/managers/StorageProcessingManager.js +48 -0
- package/dist/managers/adapters/IStorageEventConverterAdapter.d.ts +16 -0
- package/dist/managers/adapters/IStorageEventConverterAdapter.js +0 -0
- package/dist/managers/adapters/IStorageEventManagerAdapter.d.ts +18 -0
- package/dist/managers/adapters/IStorageEventManagerAdapter.js +0 -0
- package/dist/managers/adapters/IStorageEventPersistenceAdapter.d.ts +15 -0
- package/dist/managers/adapters/IStorageEventPersistenceAdapter.js +0 -0
- package/dist/managers/adapters/IStorageEventStatusAdapter.d.ts +13 -0
- package/dist/managers/adapters/IStorageEventStatusAdapter.js +0 -0
- package/dist/managers/adapters/IStorageEventTypeGuardAdapter.d.ts +16 -0
- package/dist/managers/adapters/IStorageEventTypeGuardAdapter.js +0 -0
- package/dist/managers/adapters/IStorageEventWatchAdapter.d.ts +21 -0
- package/dist/managers/adapters/IStorageEventWatchAdapter.js +0 -0
- package/dist/managers/adapters/index.d.ts +6 -0
- package/dist/managers/adapters/index.js +0 -0
- package/dist/mock_and_interop/stores.d.ts +21 -0
- package/dist/mock_and_interop/stores.js +15 -0
- package/dist/mock_and_interop/wrapper.d.ts +7 -0
- package/dist/mock_and_interop/wrapper.js +37 -0
- package/dist/mods.d.ts +1 -0
- package/dist/mods.js +18 -0
- package/dist/platform/browser/index.d.ts +1 -0
- package/dist/platform/browser/index.js +10 -0
- package/dist/platform/browser/storage.d.ts +35 -0
- package/dist/platform/browser/storage.js +139 -0
- package/dist/platform/node/index.d.ts +23 -0
- package/dist/platform/node/index.js +33 -0
- package/dist/platform/node/storage.d.ts +31 -0
- package/dist/platform/node/storage.js +104 -0
- package/dist/platform/storagePath.d.ts +7 -0
- package/dist/platform/storagePath.js +20 -0
- package/dist/pouchdb/LiveSyncDBFunctions.d.ts +14 -0
- package/dist/pouchdb/LiveSyncDBFunctions.js +129 -0
- package/dist/pouchdb/LiveSyncLocalDB.d.ts +196 -0
- package/dist/pouchdb/LiveSyncLocalDB.js +381 -0
- package/dist/pouchdb/PouchDBConstructor.d.ts +3 -0
- package/dist/pouchdb/PouchDBConstructor.js +0 -0
- package/dist/pouchdb/ReplicatorShim.d.ts +51 -0
- package/dist/pouchdb/ReplicatorShim.js +109 -0
- package/dist/pouchdb/StreamingFetch.d.ts +19 -0
- package/dist/pouchdb/StreamingFetch.js +263 -0
- package/dist/pouchdb/chunks.d.ts +38 -0
- package/dist/pouchdb/chunks.js +314 -0
- package/dist/pouchdb/compress.d.ts +11 -0
- package/dist/pouchdb/compress.js +99 -0
- package/dist/pouchdb/encryption.d.ts +20 -0
- package/dist/pouchdb/encryption.js +458 -0
- package/dist/pouchdb/negotiation.d.ts +9 -0
- package/dist/pouchdb/negotiation.js +109 -0
- package/dist/pouchdb/pouchdb-browser.d.ts +2 -0
- package/dist/pouchdb/pouchdb-browser.js +96 -0
- package/dist/pouchdb/pouchdb-http.d.ts +2 -0
- package/dist/pouchdb/pouchdb-http.js +94 -0
- package/dist/pouchdb/pouchdb-test.d.ts +2 -0
- package/dist/pouchdb/pouchdb-test.js +12 -0
- package/dist/pouchdb/utils_couchdb.d.ts +4 -0
- package/dist/pouchdb/utils_couchdb.js +38 -0
- package/dist/replication/LiveSyncAbstractReplicator.d.ts +69 -0
- package/dist/replication/LiveSyncAbstractReplicator.js +92 -0
- package/dist/replication/SyncParamsHandler.d.ts +35 -0
- package/dist/replication/SyncParamsHandler.js +118 -0
- package/dist/replication/couchdb/LiveSyncReplicator.d.ts +85 -0
- package/dist/replication/couchdb/LiveSyncReplicator.js +1132 -0
- package/dist/replication/httplib.d.ts +75 -0
- package/dist/replication/httplib.js +187 -0
- package/dist/replication/journal/JournalSyncCore.d.ts +70 -0
- package/dist/replication/journal/JournalSyncCore.js +737 -0
- package/dist/replication/journal/JournalSyncTypes.d.ts +9 -0
- package/dist/replication/journal/JournalSyncTypes.js +11 -0
- package/dist/replication/journal/LiveSyncJournalReplicator.d.ts +40 -0
- package/dist/replication/journal/LiveSyncJournalReplicator.js +294 -0
- package/dist/replication/journal/LiveSyncJournalReplicatorEnv.d.ts +3 -0
- package/dist/replication/journal/LiveSyncJournalReplicatorEnv.js +0 -0
- package/dist/replication/journal/objectstore/JournalStorageAdapter.d.ts +15 -0
- package/dist/replication/journal/objectstore/JournalStorageAdapter.js +0 -0
- package/dist/replication/journal/objectstore/MinioStorageAdapter.d.ts +21 -0
- package/dist/replication/journal/objectstore/MinioStorageAdapter.js +204 -0
- package/dist/replication/trystero/LiveSyncTrysteroReplicator.d.ts +90 -0
- package/dist/replication/trystero/LiveSyncTrysteroReplicator.js +380 -0
- package/dist/replication/trystero/P2PLogCollector.d.ts +8 -0
- package/dist/replication/trystero/P2PLogCollector.js +91 -0
- package/dist/replication/trystero/P2PReplicatorBase.d.ts +19 -0
- package/dist/replication/trystero/P2PReplicatorBase.js +0 -0
- package/dist/replication/trystero/P2PReplicatorCore.d.ts +12 -0
- package/dist/replication/trystero/P2PReplicatorCore.js +126 -0
- package/dist/replication/trystero/P2PReplicatorPaneCommon.d.ts +41 -0
- package/dist/replication/trystero/P2PReplicatorPaneCommon.js +20 -0
- package/dist/replication/trystero/ProxiedDB.d.ts +13 -0
- package/dist/replication/trystero/ProxiedDB.js +20 -0
- package/dist/replication/trystero/TrysteroReplicator.d.ts +152 -0
- package/dist/replication/trystero/TrysteroReplicator.js +683 -0
- package/dist/replication/trystero/TrysteroReplicatorP2PClient.d.ts +19 -0
- package/dist/replication/trystero/TrysteroReplicatorP2PClient.js +80 -0
- package/dist/replication/trystero/TrysteroReplicatorP2PConnection.d.ts +2 -0
- package/dist/replication/trystero/TrysteroReplicatorP2PConnection.js +4 -0
- package/dist/replication/trystero/TrysteroReplicatorP2PServer.d.ts +117 -0
- package/dist/replication/trystero/TrysteroReplicatorP2PServer.js +540 -0
- package/dist/replication/trystero/UseP2PReplicatorResult.d.ts +11 -0
- package/dist/replication/trystero/UseP2PReplicatorResult.js +0 -0
- package/dist/replication/trystero/addP2PEventHandlers.d.ts +35 -0
- package/dist/replication/trystero/addP2PEventHandlers.js +43 -0
- package/dist/replication/trystero/rpcCompat.d.ts +1 -0
- package/dist/replication/trystero/rpcCompat.js +9 -0
- package/dist/replication/trystero/types.d.ts +95 -0
- package/dist/replication/trystero/types.js +27 -0
- package/dist/replication/trystero/useP2PReplicatorCommands.d.ts +7 -0
- package/dist/replication/trystero/useP2PReplicatorCommands.js +25 -0
- package/dist/replication/trystero/useP2PReplicatorFeature.d.ts +17 -0
- package/dist/replication/trystero/useP2PReplicatorFeature.js +82 -0
- package/dist/rpc/RpcRoom.d.ts +24 -0
- package/dist/rpc/RpcRoom.js +300 -0
- package/dist/rpc/RpcSession.d.ts +9 -0
- package/dist/rpc/RpcSession.js +32 -0
- package/dist/rpc/chunking.d.ts +11 -0
- package/dist/rpc/chunking.js +58 -0
- package/dist/rpc/errors.d.ts +8 -0
- package/dist/rpc/errors.js +26 -0
- package/dist/rpc/index.d.ts +6 -0
- package/dist/rpc/index.js +12 -0
- package/dist/rpc/pouchdb/RpcPouchDBProxy.d.ts +75 -0
- package/dist/rpc/pouchdb/RpcPouchDBProxy.js +115 -0
- package/dist/rpc/pouchdb/RpcPouchDBServer.d.ts +16 -0
- package/dist/rpc/pouchdb/RpcPouchDBServer.js +55 -0
- package/dist/rpc/transports/DiagRTCPeerConnections.d.ts +24 -0
- package/dist/rpc/transports/DiagRTCPeerConnections.js +208 -0
- package/dist/rpc/transports/DiagRTCPeerConnections.types.d.ts +64 -0
- package/dist/rpc/transports/DiagRTCPeerConnections.types.js +12 -0
- package/dist/rpc/transports/DiagRTCPeerConnections.utils.d.ts +33 -0
- package/dist/rpc/transports/DiagRTCPeerConnections.utils.js +217 -0
- package/dist/rpc/transports/TrysteroTransport.d.ts +216 -0
- package/dist/rpc/transports/TrysteroTransport.js +134 -0
- package/dist/rpc/transports/trysteroUtils.d.ts +3 -0
- package/dist/rpc/transports/trysteroUtils.js +37 -0
- package/dist/rpc/types.d.ts +75 -0
- package/dist/rpc/types.js +6 -0
- package/dist/serviceFeatures/checkRemoteSize.d.ts +28 -0
- package/dist/serviceFeatures/checkRemoteSize.js +178 -0
- package/dist/serviceFeatures/offlineScanner.d.ts +128 -0
- package/dist/serviceFeatures/offlineScanner.js +553 -0
- package/dist/serviceFeatures/prepareDatabaseForUse.d.ts +20 -0
- package/dist/serviceFeatures/prepareDatabaseForUse.js +39 -0
- package/dist/serviceFeatures/remoteConfig.d.ts +46 -0
- package/dist/serviceFeatures/remoteConfig.js +247 -0
- package/dist/serviceFeatures/setupObsidian/qrCode.d.ts +4 -0
- package/dist/serviceFeatures/setupObsidian/qrCode.js +67 -0
- package/dist/serviceFeatures/setupObsidian/setupUri.d.ts +7 -0
- package/dist/serviceFeatures/setupObsidian/setupUri.js +70 -0
- package/dist/serviceFeatures/setupObsidian/types.d.ts +2 -0
- package/dist/serviceFeatures/setupObsidian/types.js +0 -0
- package/dist/serviceFeatures/targetFilter.d.ts +24 -0
- package/dist/serviceFeatures/targetFilter.js +178 -0
- package/dist/serviceModules/FileAccessBase.d.ts +93 -0
- package/dist/serviceModules/FileAccessBase.js +219 -0
- package/dist/serviceModules/Rebuilder.d.ts +92 -0
- package/dist/serviceModules/Rebuilder.js +449 -0
- package/dist/serviceModules/ServiceDatabaseFileAccessBase.d.ts +40 -0
- package/dist/serviceModules/ServiceDatabaseFileAccessBase.js +306 -0
- package/dist/serviceModules/ServiceFileAccessBase.d.ts +64 -0
- package/dist/serviceModules/ServiceFileAccessBase.js +312 -0
- package/dist/serviceModules/ServiceFileHandlerBase.d.ts +52 -0
- package/dist/serviceModules/ServiceFileHandlerBase.js +493 -0
- package/dist/serviceModules/ServiceModuleBase.d.ts +10 -0
- package/dist/serviceModules/ServiceModuleBase.js +13 -0
- package/dist/serviceModules/adapters/IConversionAdapter.d.ts +15 -0
- package/dist/serviceModules/adapters/IConversionAdapter.js +0 -0
- package/dist/serviceModules/adapters/IFileSystemAdapter.d.ts +47 -0
- package/dist/serviceModules/adapters/IFileSystemAdapter.js +0 -0
- package/dist/serviceModules/adapters/IPathAdapter.d.ts +15 -0
- package/dist/serviceModules/adapters/IPathAdapter.js +0 -0
- package/dist/serviceModules/adapters/IStorageAdapter.d.ts +56 -0
- package/dist/serviceModules/adapters/IStorageAdapter.js +0 -0
- package/dist/serviceModules/adapters/ITypeGuardAdapter.d.ts +14 -0
- package/dist/serviceModules/adapters/ITypeGuardAdapter.js +0 -0
- package/dist/serviceModules/adapters/IVaultAdapter.d.ts +51 -0
- package/dist/serviceModules/adapters/IVaultAdapter.js +0 -0
- package/dist/serviceModules/adapters/index.d.ts +6 -0
- package/dist/serviceModules/adapters/index.js +0 -0
- package/dist/services/BrowserServices.d.ts +36 -0
- package/dist/services/BrowserServices.js +123 -0
- package/dist/services/HeadlessServices.d.ts +14 -0
- package/dist/services/HeadlessServices.js +144 -0
- package/dist/services/InjectableServices.d.ts +1 -0
- package/dist/services/InjectableServices.js +4 -0
- package/dist/services/ServiceHub.d.ts +82 -0
- package/dist/services/ServiceHub.js +66 -0
- package/dist/services/base/APIService.d.ts +93 -0
- package/dist/services/base/APIService.js +44 -0
- package/dist/services/base/AppLifecycleService.d.ts +132 -0
- package/dist/services/base/AppLifecycleService.js +123 -0
- package/dist/services/base/ConfigService.d.ts +7 -0
- package/dist/services/base/ConfigService.js +6 -0
- package/dist/services/base/ConflictService.d.ts +54 -0
- package/dist/services/base/ConflictService.js +22 -0
- package/dist/services/base/ControlService.d.ts +54 -0
- package/dist/services/base/ControlService.js +103 -0
- package/dist/services/base/DatabaseEventService.d.ts +38 -0
- package/dist/services/base/DatabaseEventService.js +38 -0
- package/dist/services/base/DatabaseService.d.ts +40 -0
- package/dist/services/base/DatabaseService.js +79 -0
- package/dist/services/base/FileProcessingService.d.ts +25 -0
- package/dist/services/base/FileProcessingService.js +28 -0
- package/dist/services/base/IService.d.ts +284 -0
- package/dist/services/base/IService.js +1 -0
- package/dist/services/base/KeyValueDBService.d.ts +42 -0
- package/dist/services/base/KeyValueDBService.js +133 -0
- package/dist/services/base/MessageTranslator.d.ts +6 -0
- package/dist/services/base/MessageTranslator.js +4 -0
- package/dist/services/base/PathService.d.ts +38 -0
- package/dist/services/base/PathService.js +66 -0
- package/dist/services/base/RemoteService.d.ts +61 -0
- package/dist/services/base/RemoteService.js +212 -0
- package/dist/services/base/ReplicationService.d.ts +92 -0
- package/dist/services/base/ReplicationService.js +261 -0
- package/dist/services/base/ReplicatorService.d.ts +66 -0
- package/dist/services/base/ReplicatorService.js +164 -0
- package/dist/services/base/ServiceBase.d.ts +33 -0
- package/dist/services/base/ServiceBase.js +27 -0
- package/dist/services/base/SettingService.d.ts +112 -0
- package/dist/services/base/SettingService.js +543 -0
- package/dist/services/base/TestService.d.ts +28 -0
- package/dist/services/base/TestService.js +19 -0
- package/dist/services/base/TweakValueService.d.ts +40 -0
- package/dist/services/base/TweakValueService.js +6 -0
- package/dist/services/base/UnresolvedErrorManager.d.ts +15 -0
- package/dist/services/base/UnresolvedErrorManager.js +44 -0
- package/dist/services/base/VaultService.d.ts +69 -0
- package/dist/services/base/VaultService.js +70 -0
- package/dist/services/implements/base/SvelteDialog.d.ts +79 -0
- package/dist/services/implements/base/SvelteDialog.js +134 -0
- package/dist/services/implements/base/UIService.d.ts +24 -0
- package/dist/services/implements/base/UIService.js +37 -0
- package/dist/services/implements/browser/BrowserAPIService.d.ts +54 -0
- package/dist/services/implements/browser/BrowserAPIService.js +298 -0
- package/dist/services/implements/browser/BrowserDatabaseService.d.ts +7 -0
- package/dist/services/implements/browser/BrowserDatabaseService.js +10 -0
- package/dist/services/implements/browser/ConfigServiceBrowserCompat.d.ts +16 -0
- package/dist/services/implements/browser/ConfigServiceBrowserCompat.js +23 -0
- package/dist/services/implements/headless/HeadlessAPIService.d.ts +52 -0
- package/dist/services/implements/headless/HeadlessAPIService.js +127 -0
- package/dist/services/implements/headless/HeadlessDatabaseService.d.ts +7 -0
- package/dist/services/implements/headless/HeadlessDatabaseService.js +10 -0
- package/dist/services/implements/injectable/InjectableAPIService.d.ts +7 -0
- package/dist/services/implements/injectable/InjectableAPIService.js +18 -0
- package/dist/services/implements/injectable/InjectableAppLifecycleService.d.ts +11 -0
- package/dist/services/implements/injectable/InjectableAppLifecycleService.js +14 -0
- package/dist/services/implements/injectable/InjectableConflictService.d.ts +11 -0
- package/dist/services/implements/injectable/InjectableConflictService.js +14 -0
- package/dist/services/implements/injectable/InjectableDatabaseEventService.d.ts +4 -0
- package/dist/services/implements/injectable/InjectableDatabaseEventService.js +7 -0
- package/dist/services/implements/injectable/InjectableFileProcessingService.d.ts +4 -0
- package/dist/services/implements/injectable/InjectableFileProcessingService.js +6 -0
- package/dist/services/implements/injectable/InjectablePathService.d.ts +12 -0
- package/dist/services/implements/injectable/InjectablePathService.js +36 -0
- package/dist/services/implements/injectable/InjectableRemoteService.d.ts +4 -0
- package/dist/services/implements/injectable/InjectableRemoteService.js +7 -0
- package/dist/services/implements/injectable/InjectableReplicationService.d.ts +4 -0
- package/dist/services/implements/injectable/InjectableReplicationService.js +6 -0
- package/dist/services/implements/injectable/InjectableReplicatorService.d.ts +4 -0
- package/dist/services/implements/injectable/InjectableReplicatorService.js +7 -0
- package/dist/services/implements/injectable/InjectableServiceHub.d.ts +72 -0
- package/dist/services/implements/injectable/InjectableServiceHub.js +125 -0
- package/dist/services/implements/injectable/InjectableServices.d.ts +36 -0
- package/dist/services/implements/injectable/InjectableServices.js +1 -0
- package/dist/services/implements/injectable/InjectableSettingService.d.ts +11 -0
- package/dist/services/implements/injectable/InjectableSettingService.js +33 -0
- package/dist/services/implements/injectable/InjectableTestService.d.ts +5 -0
- package/dist/services/implements/injectable/InjectableTestService.js +8 -0
- package/dist/services/implements/injectable/InjectableTweakValueService.d.ts +15 -0
- package/dist/services/implements/injectable/InjectableTweakValueService.js +12 -0
- package/dist/services/implements/injectable/InjectableVaultService.d.ts +9 -0
- package/dist/services/implements/injectable/InjectableVaultService.js +20 -0
- package/dist/services/lib/HandlerUtils.d.ts +374 -0
- package/dist/services/lib/HandlerUtils.js +412 -0
- package/dist/services/lib/logUtils.d.ts +13 -0
- package/dist/services/lib/logUtils.js +28 -0
- package/dist/services/lib/remoteActivity.d.ts +13 -0
- package/dist/services/lib/remoteActivity.js +11 -0
- package/dist/string_and_binary/chunks.d.ts +10 -0
- package/dist/string_and_binary/chunks.js +561 -0
- package/dist/string_and_binary/convert.d.ts +8 -0
- package/dist/string_and_binary/convert.js +46 -0
- package/dist/string_and_binary/hash.d.ts +2 -0
- package/dist/string_and_binary/hash.js +1 -0
- package/dist/string_and_binary/path.d.ts +35 -0
- package/dist/string_and_binary/path.js +240 -0
- package/dist/worker/bg.common.d.ts +2 -0
- package/dist/worker/bg.common.js +6 -0
- package/dist/worker/bg.worker.d.ts +1 -0
- package/dist/worker/bg.worker.encryption.d.ts +7 -0
- package/dist/worker/bg.worker.encryption.js +30 -0
- package/dist/worker/bg.worker.js +14 -0
- package/dist/worker/bg.worker.splitting.d.ts +6 -0
- package/dist/worker/bg.worker.splitting.js +36 -0
- package/dist/worker/bgWorker.d.ts +25 -0
- package/dist/worker/bgWorker.direct.d.ts +40 -0
- package/dist/worker/bgWorker.direct.js +65 -0
- package/dist/worker/bgWorker.encryption.d.ts +22 -0
- package/dist/worker/bgWorker.encryption.js +40 -0
- package/dist/worker/bgWorker.js +348 -0
- package/dist/worker/bgWorker.splitting.d.ts +27 -0
- package/dist/worker/bgWorker.splitting.js +123 -0
- package/dist/worker/universalTypes.d.ts +63 -0
- package/dist/worker/universalTypes.js +4 -0
- package/docs/development.md +51 -0
- package/docs/platform-storage.md +60 -0
- package/docs/releasing.md +69 -0
- package/package.json +693 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MILESTONE_DOCID as MILESTONE_DOC_ID,
|
|
3
|
+
TweakValuesShouldMatchedTemplate,
|
|
4
|
+
TweakValuesTemplate,
|
|
5
|
+
DEVICE_ID_PREFERRED,
|
|
6
|
+
TweakValuesDefault
|
|
7
|
+
} from "../common/types.js";
|
|
8
|
+
import { extractObject, isObjectDifferent, resolveWithIgnoreKnownError } from "../common/utils.js";
|
|
9
|
+
async function ensureRemoteIsCompatible(infoSrc, setting, deviceNodeID, currentVersionRange, nodeDeviceInfo, updateCallback) {
|
|
10
|
+
const now = Date.now();
|
|
11
|
+
const baseMilestone = {
|
|
12
|
+
_id: MILESTONE_DOC_ID,
|
|
13
|
+
type: "milestoneinfo",
|
|
14
|
+
created: now,
|
|
15
|
+
locked: false,
|
|
16
|
+
accepted_nodes: [deviceNodeID],
|
|
17
|
+
node_chunk_info: { [deviceNodeID]: currentVersionRange },
|
|
18
|
+
node_info: {
|
|
19
|
+
[deviceNodeID]: {
|
|
20
|
+
...nodeDeviceInfo,
|
|
21
|
+
last_connected: 0,
|
|
22
|
+
progress: ""
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
tweak_values: {}
|
|
26
|
+
};
|
|
27
|
+
let remoteMilestone = infoSrc;
|
|
28
|
+
if (!remoteMilestone) remoteMilestone = baseMilestone;
|
|
29
|
+
const currentTweakValues = extractObject(TweakValuesTemplate, setting);
|
|
30
|
+
remoteMilestone.node_chunk_info = { ...baseMilestone.node_chunk_info, ...remoteMilestone.node_chunk_info };
|
|
31
|
+
let writeMilestone = remoteMilestone.node_chunk_info[deviceNodeID].min != currentVersionRange.min || remoteMilestone.node_chunk_info[deviceNodeID].max != currentVersionRange.max || isObjectDifferent(remoteMilestone.tweak_values?.[deviceNodeID], currentTweakValues) || typeof remoteMilestone._rev == "undefined" || !(DEVICE_ID_PREFERRED in remoteMilestone.tweak_values);
|
|
32
|
+
if (!remoteMilestone.node_info) {
|
|
33
|
+
remoteMilestone.node_info = {};
|
|
34
|
+
}
|
|
35
|
+
if (!(deviceNodeID in remoteMilestone.node_info)) {
|
|
36
|
+
remoteMilestone.node_info[deviceNodeID] = {
|
|
37
|
+
...nodeDeviceInfo,
|
|
38
|
+
last_connected: 0,
|
|
39
|
+
progress: ""
|
|
40
|
+
};
|
|
41
|
+
writeMilestone = true;
|
|
42
|
+
}
|
|
43
|
+
const info = remoteMilestone.node_info[deviceNodeID];
|
|
44
|
+
const keys = ["device_name", "app_version", "plugin_version", "vault_name", "progress"];
|
|
45
|
+
for (const key of keys) {
|
|
46
|
+
if (info[key] != nodeDeviceInfo[key]) {
|
|
47
|
+
remoteMilestone.node_info[deviceNodeID][key] = nodeDeviceInfo[key];
|
|
48
|
+
writeMilestone = true;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const diffLastConnected = now - (remoteMilestone.node_info[deviceNodeID].last_connected || 0);
|
|
52
|
+
if (diffLastConnected > 6e4) {
|
|
53
|
+
remoteMilestone.node_info[deviceNodeID].last_connected = now;
|
|
54
|
+
writeMilestone = true;
|
|
55
|
+
}
|
|
56
|
+
if (writeMilestone) {
|
|
57
|
+
remoteMilestone.node_chunk_info[deviceNodeID].min = currentVersionRange.min;
|
|
58
|
+
remoteMilestone.node_chunk_info[deviceNodeID].max = currentVersionRange.max;
|
|
59
|
+
remoteMilestone.tweak_values = { ...remoteMilestone.tweak_values ?? {}, [deviceNodeID]: currentTweakValues };
|
|
60
|
+
if (!(DEVICE_ID_PREFERRED in remoteMilestone.tweak_values)) {
|
|
61
|
+
remoteMilestone.tweak_values[DEVICE_ID_PREFERRED] = currentTweakValues;
|
|
62
|
+
}
|
|
63
|
+
await updateCallback(remoteMilestone);
|
|
64
|
+
}
|
|
65
|
+
let globalMin = currentVersionRange.min;
|
|
66
|
+
let globalMax = currentVersionRange.max;
|
|
67
|
+
for (const nodeId of remoteMilestone.accepted_nodes) {
|
|
68
|
+
if (nodeId == deviceNodeID) continue;
|
|
69
|
+
if (nodeId in remoteMilestone.node_chunk_info) {
|
|
70
|
+
const nodeInfo = remoteMilestone.node_chunk_info[nodeId];
|
|
71
|
+
globalMin = Math.max(nodeInfo.min, globalMin);
|
|
72
|
+
globalMax = Math.min(nodeInfo.max, globalMax);
|
|
73
|
+
} else {
|
|
74
|
+
globalMin = 0;
|
|
75
|
+
globalMax = 0;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (globalMax < globalMin) {
|
|
79
|
+
if (!setting.ignoreVersionCheck) {
|
|
80
|
+
return "INCOMPATIBLE";
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if (!setting.disableCheckingConfigMismatch) {
|
|
84
|
+
const preferred_tweak = remoteMilestone.tweak_values?.[DEVICE_ID_PREFERRED] ?? currentTweakValues;
|
|
85
|
+
const current_tweak = currentTweakValues;
|
|
86
|
+
const preferred_should_matched = extractObject(TweakValuesShouldMatchedTemplate, {
|
|
87
|
+
...TweakValuesDefault,
|
|
88
|
+
...preferred_tweak
|
|
89
|
+
});
|
|
90
|
+
const current_should_matched = extractObject(TweakValuesShouldMatchedTemplate, {
|
|
91
|
+
...TweakValuesDefault,
|
|
92
|
+
...current_tweak
|
|
93
|
+
});
|
|
94
|
+
if (isObjectDifferent(preferred_should_matched, current_should_matched, true)) {
|
|
95
|
+
return ["MISMATCHED", preferred_tweak];
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (remoteMilestone.locked) {
|
|
99
|
+
if (remoteMilestone.accepted_nodes.indexOf(deviceNodeID) == -1) {
|
|
100
|
+
if (remoteMilestone.cleaned) {
|
|
101
|
+
return "NODE_CLEANED";
|
|
102
|
+
}
|
|
103
|
+
return "NODE_LOCKED";
|
|
104
|
+
}
|
|
105
|
+
return "LOCKED";
|
|
106
|
+
}
|
|
107
|
+
return "OK";
|
|
108
|
+
}
|
|
109
|
+
async function ensureDatabaseIsCompatible(db, setting, deviceNodeID, currentVersionRange, nodeDeviceInfo) {
|
|
110
|
+
const remoteMilestone = await resolveWithIgnoreKnownError(
|
|
111
|
+
db.get(MILESTONE_DOC_ID),
|
|
112
|
+
false
|
|
113
|
+
);
|
|
114
|
+
const ret = await ensureRemoteIsCompatible(
|
|
115
|
+
remoteMilestone,
|
|
116
|
+
setting,
|
|
117
|
+
deviceNodeID,
|
|
118
|
+
currentVersionRange,
|
|
119
|
+
nodeDeviceInfo,
|
|
120
|
+
async (info) => {
|
|
121
|
+
await db.put(info);
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
return ret;
|
|
125
|
+
}
|
|
126
|
+
export {
|
|
127
|
+
ensureDatabaseIsCompatible,
|
|
128
|
+
ensureRemoteIsCompatible
|
|
129
|
+
};
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { type EntryDoc, type EntryLeaf, type Credential, type RemoteDBSettings, type DocumentID, type FilePathWithPrefix, type FilePath, type DatabaseEntry, type LoadedEntry, type MetaEntry, type SavingEntry, type diff_result_leaf } from "../common/types.js";
|
|
2
|
+
import type { LiveSyncEventHub } from "../hub/hub.js";
|
|
3
|
+
import { LiveSyncManagers } from "../managers/LiveSyncManagers.js";
|
|
4
|
+
import type { AutoMergeResult } from "../managers/ConflictManager.js";
|
|
5
|
+
import type { IServiceHub } from "../services/base/IService.js";
|
|
6
|
+
import type { ServiceContext } from "../services/base/ServiceBase.js";
|
|
7
|
+
import { type LogFunction } from "../services/lib/logUtils.js";
|
|
8
|
+
export declare const REMOTE_CHUNK_FETCHED = "remote-chunk-fetched";
|
|
9
|
+
export type REMOTE_CHUNK_FETCHED = typeof REMOTE_CHUNK_FETCHED;
|
|
10
|
+
declare global {
|
|
11
|
+
interface LSEvents {
|
|
12
|
+
[REMOTE_CHUNK_FETCHED]: EntryLeaf;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export type ChunkRetrievalResultSuccess = {
|
|
16
|
+
_id: DocumentID;
|
|
17
|
+
data: string;
|
|
18
|
+
type: "leaf";
|
|
19
|
+
};
|
|
20
|
+
export type ChunkRetrievalResultError = {
|
|
21
|
+
_id: DocumentID;
|
|
22
|
+
error: string;
|
|
23
|
+
};
|
|
24
|
+
export type ChunkRetrievalResult = ChunkRetrievalResultSuccess | ChunkRetrievalResultError;
|
|
25
|
+
export interface LiveSyncLocalDBEnv {
|
|
26
|
+
services: Pick<IServiceHub, "API" | "database" | "databaseEvents" | "replicator" | "setting" | "path"> & {
|
|
27
|
+
context: ServiceContext;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export declare function getNoFromRev(rev: string): number;
|
|
31
|
+
export type GeneratedChunk = {
|
|
32
|
+
isNew: boolean;
|
|
33
|
+
id: DocumentID;
|
|
34
|
+
piece: string;
|
|
35
|
+
};
|
|
36
|
+
export declare class LiveSyncLocalDB {
|
|
37
|
+
auth: Credential;
|
|
38
|
+
dbname: string;
|
|
39
|
+
settings: RemoteDBSettings;
|
|
40
|
+
localDatabase: PouchDB.Database<EntryDoc>;
|
|
41
|
+
_log: LogFunction;
|
|
42
|
+
private _managers?;
|
|
43
|
+
get managers(): LiveSyncManagers;
|
|
44
|
+
isReady: boolean;
|
|
45
|
+
needScanning: boolean;
|
|
46
|
+
env: LiveSyncLocalDBEnv;
|
|
47
|
+
clearCaches(): void;
|
|
48
|
+
_prepareHashFunctions(): Promise<void>;
|
|
49
|
+
onunload(): void;
|
|
50
|
+
refreshSettings(): void;
|
|
51
|
+
offRemoteChunkFetchedHandler?: ReturnType<LiveSyncEventHub["onEvent"]>;
|
|
52
|
+
constructor(dbname: string, env: LiveSyncLocalDBEnv);
|
|
53
|
+
close(): Promise<void>;
|
|
54
|
+
onNewLeaf(chunk: EntryLeaf): void;
|
|
55
|
+
initializeDatabase(): Promise<boolean>;
|
|
56
|
+
/**
|
|
57
|
+
* Retrieve all used and existing chunks in the database.
|
|
58
|
+
* @param includeDeleted include deleted chunks in the result.
|
|
59
|
+
* @returns {used: Set<string>, existing: Map<string, EntryLeaf>} used: Set of chunk ids that are used in the database. existing: Map of chunk id and EntryLeaf that are existing in the database.
|
|
60
|
+
*/
|
|
61
|
+
allChunks(includeDeleted?: boolean): Promise<{
|
|
62
|
+
used: Set<string>;
|
|
63
|
+
existing: Map<string, EntryLeaf>;
|
|
64
|
+
}>;
|
|
65
|
+
resetDatabase(): Promise<boolean>;
|
|
66
|
+
findEntries(startKey: string, endKey: string, opt: PouchDB.Core.AllDocsWithKeyOptions | PouchDB.Core.AllDocsOptions | PouchDB.Core.AllDocsWithKeysOptions | PouchDB.Core.AllDocsWithinRangeOptions): AsyncGenerator<(DatabaseEntry & import("../common/types.js").EntryBase & import("../common/types.js").EntryWithEden & {
|
|
67
|
+
path: FilePathWithPrefix;
|
|
68
|
+
children: string[];
|
|
69
|
+
type: import("../common/models/db.type.js").EntryTypes["NOTE_BINARY"];
|
|
70
|
+
} & PouchDB.Core.AllDocsMeta & PouchDB.Core.IdMeta & PouchDB.Core.RevisionIdMeta) | (DatabaseEntry & import("../common/types.js").EntryBase & import("../common/types.js").EntryWithEden & {
|
|
71
|
+
path: FilePathWithPrefix;
|
|
72
|
+
children: string[];
|
|
73
|
+
type: import("../common/models/db.type.js").EntryTypes["NOTE_PLAIN"];
|
|
74
|
+
} & PouchDB.Core.AllDocsMeta & PouchDB.Core.IdMeta & PouchDB.Core.RevisionIdMeta) | (DatabaseEntry & import("../common/types.js").EntryBase & import("../common/types.js").EntryWithEden & {
|
|
75
|
+
path: FilePathWithPrefix;
|
|
76
|
+
children: string[];
|
|
77
|
+
type: import("../common/models/db.type.js").EntryTypes["NOTE_BINARY"];
|
|
78
|
+
} & {
|
|
79
|
+
deleted?: boolean;
|
|
80
|
+
} & PouchDB.Core.AllDocsMeta & PouchDB.Core.IdMeta & PouchDB.Core.RevisionIdMeta) | (DatabaseEntry & import("../common/types.js").EntryBase & import("../common/types.js").EntryWithEden & {
|
|
81
|
+
path: FilePathWithPrefix;
|
|
82
|
+
children: string[];
|
|
83
|
+
type: import("../common/models/db.type.js").EntryTypes["NOTE_BINARY"];
|
|
84
|
+
} & {
|
|
85
|
+
data: string | string[];
|
|
86
|
+
datatype: import("../common/types.js").EntryTypeNotes;
|
|
87
|
+
} & PouchDB.Core.AllDocsMeta & PouchDB.Core.IdMeta & PouchDB.Core.RevisionIdMeta) | (DatabaseEntry & import("../common/types.js").EntryBase & import("../common/types.js").EntryWithEden & {
|
|
88
|
+
path: FilePathWithPrefix;
|
|
89
|
+
children: string[];
|
|
90
|
+
type: import("../common/models/db.type.js").EntryTypes["NOTE_PLAIN"];
|
|
91
|
+
} & {
|
|
92
|
+
data: string | string[];
|
|
93
|
+
datatype: import("../common/types.js").EntryTypeNotes;
|
|
94
|
+
} & PouchDB.Core.AllDocsMeta & PouchDB.Core.IdMeta & PouchDB.Core.RevisionIdMeta) | (DatabaseEntry & import("../common/types.js").EntryBase & import("../common/types.js").EntryWithEden & {
|
|
95
|
+
path: FilePathWithPrefix;
|
|
96
|
+
children: string[];
|
|
97
|
+
type: import("../common/models/db.type.js").EntryTypes["NOTE_BINARY"];
|
|
98
|
+
} & {
|
|
99
|
+
deleted?: boolean;
|
|
100
|
+
} & {
|
|
101
|
+
data: string | string[];
|
|
102
|
+
datatype: import("../common/types.js").EntryTypeNotes;
|
|
103
|
+
} & PouchDB.Core.AllDocsMeta & PouchDB.Core.IdMeta & PouchDB.Core.RevisionIdMeta), void, unknown>;
|
|
104
|
+
findAllDocs(opt?: PouchDB.Core.AllDocsWithKeyOptions | PouchDB.Core.AllDocsOptions | PouchDB.Core.AllDocsWithKeysOptions | PouchDB.Core.AllDocsWithinRangeOptions): AsyncGenerator<(DatabaseEntry & import("../common/types.js").EntryBase & import("../common/types.js").EntryWithEden & {
|
|
105
|
+
path: FilePathWithPrefix;
|
|
106
|
+
children: string[];
|
|
107
|
+
type: import("../common/models/db.type.js").EntryTypes["NOTE_BINARY"];
|
|
108
|
+
} & PouchDB.Core.AllDocsMeta & PouchDB.Core.IdMeta & PouchDB.Core.RevisionIdMeta) | (DatabaseEntry & import("../common/types.js").EntryBase & import("../common/types.js").EntryWithEden & {
|
|
109
|
+
path: FilePathWithPrefix;
|
|
110
|
+
children: string[];
|
|
111
|
+
type: import("../common/models/db.type.js").EntryTypes["NOTE_PLAIN"];
|
|
112
|
+
} & PouchDB.Core.AllDocsMeta & PouchDB.Core.IdMeta & PouchDB.Core.RevisionIdMeta) | (DatabaseEntry & import("../common/types.js").EntryBase & import("../common/types.js").EntryWithEden & {
|
|
113
|
+
path: FilePathWithPrefix;
|
|
114
|
+
children: string[];
|
|
115
|
+
type: import("../common/models/db.type.js").EntryTypes["NOTE_BINARY"];
|
|
116
|
+
} & {
|
|
117
|
+
deleted?: boolean;
|
|
118
|
+
} & PouchDB.Core.AllDocsMeta & PouchDB.Core.IdMeta & PouchDB.Core.RevisionIdMeta) | (DatabaseEntry & import("../common/types.js").EntryBase & import("../common/types.js").EntryWithEden & {
|
|
119
|
+
path: FilePathWithPrefix;
|
|
120
|
+
children: string[];
|
|
121
|
+
type: import("../common/models/db.type.js").EntryTypes["NOTE_BINARY"];
|
|
122
|
+
} & {
|
|
123
|
+
data: string | string[];
|
|
124
|
+
datatype: import("../common/types.js").EntryTypeNotes;
|
|
125
|
+
} & PouchDB.Core.AllDocsMeta & PouchDB.Core.IdMeta & PouchDB.Core.RevisionIdMeta) | (DatabaseEntry & import("../common/types.js").EntryBase & import("../common/types.js").EntryWithEden & {
|
|
126
|
+
path: FilePathWithPrefix;
|
|
127
|
+
children: string[];
|
|
128
|
+
type: import("../common/models/db.type.js").EntryTypes["NOTE_PLAIN"];
|
|
129
|
+
} & {
|
|
130
|
+
data: string | string[];
|
|
131
|
+
datatype: import("../common/types.js").EntryTypeNotes;
|
|
132
|
+
} & PouchDB.Core.AllDocsMeta & PouchDB.Core.IdMeta & PouchDB.Core.RevisionIdMeta) | (DatabaseEntry & import("../common/types.js").EntryBase & import("../common/types.js").EntryWithEden & {
|
|
133
|
+
path: FilePathWithPrefix;
|
|
134
|
+
children: string[];
|
|
135
|
+
type: import("../common/models/db.type.js").EntryTypes["NOTE_BINARY"];
|
|
136
|
+
} & {
|
|
137
|
+
deleted?: boolean;
|
|
138
|
+
} & {
|
|
139
|
+
data: string | string[];
|
|
140
|
+
datatype: import("../common/types.js").EntryTypeNotes;
|
|
141
|
+
} & PouchDB.Core.AllDocsMeta & PouchDB.Core.IdMeta & PouchDB.Core.RevisionIdMeta), void, unknown>;
|
|
142
|
+
findEntryNames(startKey: string, endKey: string, opt: PouchDB.Core.AllDocsWithKeyOptions | PouchDB.Core.AllDocsOptions | PouchDB.Core.AllDocsWithKeysOptions | PouchDB.Core.AllDocsWithinRangeOptions): AsyncGenerator<string, void, unknown>;
|
|
143
|
+
findAllDocNames(opt?: PouchDB.Core.AllDocsWithKeyOptions | PouchDB.Core.AllDocsOptions | PouchDB.Core.AllDocsWithKeysOptions | PouchDB.Core.AllDocsWithinRangeOptions): AsyncGenerator<string, void, unknown>;
|
|
144
|
+
findAllNormalDocs(opt?: PouchDB.Core.AllDocsWithKeyOptions | PouchDB.Core.AllDocsOptions | PouchDB.Core.AllDocsWithKeysOptions | PouchDB.Core.AllDocsWithinRangeOptions): AsyncGenerator<(DatabaseEntry & import("../common/types.js").EntryBase & import("../common/types.js").EntryWithEden & {
|
|
145
|
+
path: FilePathWithPrefix;
|
|
146
|
+
children: string[];
|
|
147
|
+
type: import("../common/models/db.type.js").EntryTypes["NOTE_BINARY"];
|
|
148
|
+
} & PouchDB.Core.AllDocsMeta & PouchDB.Core.IdMeta & PouchDB.Core.RevisionIdMeta) | (DatabaseEntry & import("../common/types.js").EntryBase & import("../common/types.js").EntryWithEden & {
|
|
149
|
+
path: FilePathWithPrefix;
|
|
150
|
+
children: string[];
|
|
151
|
+
type: import("../common/models/db.type.js").EntryTypes["NOTE_PLAIN"];
|
|
152
|
+
} & PouchDB.Core.AllDocsMeta & PouchDB.Core.IdMeta & PouchDB.Core.RevisionIdMeta) | (DatabaseEntry & import("../common/types.js").EntryBase & import("../common/types.js").EntryWithEden & {
|
|
153
|
+
path: FilePathWithPrefix;
|
|
154
|
+
children: string[];
|
|
155
|
+
type: import("../common/models/db.type.js").EntryTypes["NOTE_BINARY"];
|
|
156
|
+
} & {
|
|
157
|
+
deleted?: boolean;
|
|
158
|
+
} & PouchDB.Core.AllDocsMeta & PouchDB.Core.IdMeta & PouchDB.Core.RevisionIdMeta) | (DatabaseEntry & import("../common/types.js").EntryBase & import("../common/types.js").EntryWithEden & {
|
|
159
|
+
path: FilePathWithPrefix;
|
|
160
|
+
children: string[];
|
|
161
|
+
type: import("../common/models/db.type.js").EntryTypes["NOTE_BINARY"];
|
|
162
|
+
} & {
|
|
163
|
+
data: string | string[];
|
|
164
|
+
datatype: import("../common/types.js").EntryTypeNotes;
|
|
165
|
+
} & PouchDB.Core.AllDocsMeta & PouchDB.Core.IdMeta & PouchDB.Core.RevisionIdMeta) | (DatabaseEntry & import("../common/types.js").EntryBase & import("../common/types.js").EntryWithEden & {
|
|
166
|
+
path: FilePathWithPrefix;
|
|
167
|
+
children: string[];
|
|
168
|
+
type: import("../common/models/db.type.js").EntryTypes["NOTE_PLAIN"];
|
|
169
|
+
} & {
|
|
170
|
+
data: string | string[];
|
|
171
|
+
datatype: import("../common/types.js").EntryTypeNotes;
|
|
172
|
+
} & PouchDB.Core.AllDocsMeta & PouchDB.Core.IdMeta & PouchDB.Core.RevisionIdMeta) | (DatabaseEntry & import("../common/types.js").EntryBase & import("../common/types.js").EntryWithEden & {
|
|
173
|
+
path: FilePathWithPrefix;
|
|
174
|
+
children: string[];
|
|
175
|
+
type: import("../common/models/db.type.js").EntryTypes["NOTE_BINARY"];
|
|
176
|
+
} & {
|
|
177
|
+
deleted?: boolean;
|
|
178
|
+
} & {
|
|
179
|
+
data: string | string[];
|
|
180
|
+
datatype: import("../common/types.js").EntryTypeNotes;
|
|
181
|
+
} & PouchDB.Core.AllDocsMeta & PouchDB.Core.IdMeta & PouchDB.Core.RevisionIdMeta), void, unknown>;
|
|
182
|
+
removeRevision(docId: DocumentID, revision: string): Promise<boolean>;
|
|
183
|
+
getRaw<T extends EntryDoc>(docId: DocumentID, options?: PouchDB.Core.GetOptions): Promise<T & PouchDB.Core.IdMeta & PouchDB.Core.GetMeta>;
|
|
184
|
+
removeRaw(docId: DocumentID, revision: string, options?: PouchDB.Core.Options): Promise<PouchDB.Core.Response>;
|
|
185
|
+
putRaw<T extends EntryDoc>(doc: T, options?: PouchDB.Core.PutOptions): Promise<PouchDB.Core.Response>;
|
|
186
|
+
allDocsRaw<T extends EntryDoc | DatabaseEntry>(options?: PouchDB.Core.AllDocsWithKeyOptions | PouchDB.Core.AllDocsWithKeysOptions | PouchDB.Core.AllDocsWithinRangeOptions | PouchDB.Core.AllDocsOptions): Promise<PouchDB.Core.AllDocsResponse<T>>;
|
|
187
|
+
bulkDocsRaw<T extends EntryDoc>(docs: Array<PouchDB.Core.PutDocument<T>>, options?: PouchDB.Core.BulkDocsOptions): Promise<Array<PouchDB.Core.Response | PouchDB.Core.Error>>;
|
|
188
|
+
isTargetFile(filenameSrc: string): boolean;
|
|
189
|
+
getDBEntryMeta(path: FilePathWithPrefix | FilePath, opt?: PouchDB.Core.GetOptions, includeDeleted?: boolean): Promise<false | LoadedEntry>;
|
|
190
|
+
getDBEntry(path: FilePathWithPrefix | FilePath, opt?: PouchDB.Core.GetOptions, dump?: boolean, waitForReady?: boolean, includeDeleted?: boolean): Promise<false | LoadedEntry>;
|
|
191
|
+
getDBEntryFromMeta(meta: LoadedEntry | MetaEntry, dump?: boolean, waitForReady?: boolean): Promise<false | LoadedEntry>;
|
|
192
|
+
deleteDBEntry(path: FilePathWithPrefix | FilePath, opt?: PouchDB.Core.GetOptions): Promise<boolean>;
|
|
193
|
+
putDBEntry(note: SavingEntry, onlyChunks?: boolean, conflictBaseRev?: string): Promise<false | PouchDB.Core.Response>;
|
|
194
|
+
getConflictedDoc(path: FilePathWithPrefix, rev: string): Promise<false | diff_result_leaf>;
|
|
195
|
+
tryAutoMerge(path: FilePathWithPrefix, enableMarkdownAutoMerge: boolean): AutoMergeResult;
|
|
196
|
+
}
|