@connecttomahdi/rxdb 17.0.0-beta.17
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/AGENTS.md +54 -0
- package/CHANGELOG.md +2469 -0
- package/CLAUDE.md +63 -0
- package/LICENSE.txt +201 -0
- package/README.md +263 -0
- package/babel.config.js +58 -0
- package/dist/cjs/change-event-buffer.js +146 -0
- package/dist/cjs/change-event-buffer.js.map +1 -0
- package/dist/cjs/custom-index.js +284 -0
- package/dist/cjs/custom-index.js.map +1 -0
- package/dist/cjs/doc-cache.js +231 -0
- package/dist/cjs/doc-cache.js.map +1 -0
- package/dist/cjs/event-reduce.js +102 -0
- package/dist/cjs/event-reduce.js.map +1 -0
- package/dist/cjs/hooks.js +131 -0
- package/dist/cjs/hooks.js.map +1 -0
- package/dist/cjs/incremental-write.js +169 -0
- package/dist/cjs/incremental-write.js.map +1 -0
- package/dist/cjs/index.js +270 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/overwritable.js +39 -0
- package/dist/cjs/overwritable.js.map +1 -0
- package/dist/cjs/plugin-helpers.js +223 -0
- package/dist/cjs/plugin-helpers.js.map +1 -0
- package/dist/cjs/plugin.js +94 -0
- package/dist/cjs/plugin.js.map +1 -0
- package/dist/cjs/plugins/attachments/attachments-utils.js +49 -0
- package/dist/cjs/plugins/attachments/attachments-utils.js.map +1 -0
- package/dist/cjs/plugins/attachments/index.js +237 -0
- package/dist/cjs/plugins/attachments/index.js.map +1 -0
- package/dist/cjs/plugins/attachments-compression/index.js +143 -0
- package/dist/cjs/plugins/attachments-compression/index.js.map +1 -0
- package/dist/cjs/plugins/backup/file-util.js +102 -0
- package/dist/cjs/plugins/backup/file-util.js.map +1 -0
- package/dist/cjs/plugins/backup/index.js +206 -0
- package/dist/cjs/plugins/backup/index.js.map +1 -0
- package/dist/cjs/plugins/cleanup/cleanup-helper.js +17 -0
- package/dist/cjs/plugins/cleanup/cleanup-helper.js.map +1 -0
- package/dist/cjs/plugins/cleanup/cleanup-state.js +83 -0
- package/dist/cjs/plugins/cleanup/cleanup-state.js.map +1 -0
- package/dist/cjs/plugins/cleanup/cleanup.js +116 -0
- package/dist/cjs/plugins/cleanup/cleanup.js.map +1 -0
- package/dist/cjs/plugins/cleanup/index.js +64 -0
- package/dist/cjs/plugins/cleanup/index.js.map +1 -0
- package/dist/cjs/plugins/crdt/index.js +392 -0
- package/dist/cjs/plugins/crdt/index.js.map +1 -0
- package/dist/cjs/plugins/dev-mode/check-document.js +158 -0
- package/dist/cjs/plugins/dev-mode/check-document.js.map +1 -0
- package/dist/cjs/plugins/dev-mode/check-migration-strategies.js +43 -0
- package/dist/cjs/plugins/dev-mode/check-migration-strategies.js.map +1 -0
- package/dist/cjs/plugins/dev-mode/check-orm.js +53 -0
- package/dist/cjs/plugins/dev-mode/check-orm.js.map +1 -0
- package/dist/cjs/plugins/dev-mode/check-query.js +183 -0
- package/dist/cjs/plugins/dev-mode/check-query.js.map +1 -0
- package/dist/cjs/plugins/dev-mode/check-schema.js +487 -0
- package/dist/cjs/plugins/dev-mode/check-schema.js.map +1 -0
- package/dist/cjs/plugins/dev-mode/dev-mode-tracking.js +93 -0
- package/dist/cjs/plugins/dev-mode/dev-mode-tracking.js.map +1 -0
- package/dist/cjs/plugins/dev-mode/entity-properties.js +56 -0
- package/dist/cjs/plugins/dev-mode/entity-properties.js.map +1 -0
- package/dist/cjs/plugins/dev-mode/error-messages.js +1295 -0
- package/dist/cjs/plugins/dev-mode/error-messages.js.map +1 -0
- package/dist/cjs/plugins/dev-mode/index.js +195 -0
- package/dist/cjs/plugins/dev-mode/index.js.map +1 -0
- package/dist/cjs/plugins/dev-mode/unallowed-properties.js +88 -0
- package/dist/cjs/plugins/dev-mode/unallowed-properties.js.map +1 -0
- package/dist/cjs/plugins/electron/electron-helper.js +9 -0
- package/dist/cjs/plugins/electron/electron-helper.js.map +1 -0
- package/dist/cjs/plugins/electron/index.js +39 -0
- package/dist/cjs/plugins/electron/index.js.map +1 -0
- package/dist/cjs/plugins/electron/rx-storage-ipc-main.js +45 -0
- package/dist/cjs/plugins/electron/rx-storage-ipc-main.js.map +1 -0
- package/dist/cjs/plugins/electron/rx-storage-ipc-renderer.js +37 -0
- package/dist/cjs/plugins/electron/rx-storage-ipc-renderer.js.map +1 -0
- package/dist/cjs/plugins/encryption-crypto-js/index.js +165 -0
- package/dist/cjs/plugins/encryption-crypto-js/index.js.map +1 -0
- package/dist/cjs/plugins/flutter/index.js +62 -0
- package/dist/cjs/plugins/flutter/index.js.map +1 -0
- package/dist/cjs/plugins/json-dump/index.js +94 -0
- package/dist/cjs/plugins/json-dump/index.js.map +1 -0
- package/dist/cjs/plugins/key-compression/index.js +136 -0
- package/dist/cjs/plugins/key-compression/index.js.map +1 -0
- package/dist/cjs/plugins/leader-election/index.js +107 -0
- package/dist/cjs/plugins/leader-election/index.js.map +1 -0
- package/dist/cjs/plugins/local-documents/index.js +109 -0
- package/dist/cjs/plugins/local-documents/index.js.map +1 -0
- package/dist/cjs/plugins/local-documents/local-documents-helper.js +78 -0
- package/dist/cjs/plugins/local-documents/local-documents-helper.js.map +1 -0
- package/dist/cjs/plugins/local-documents/local-documents.js +107 -0
- package/dist/cjs/plugins/local-documents/local-documents.js.map +1 -0
- package/dist/cjs/plugins/local-documents/rx-local-document.js +257 -0
- package/dist/cjs/plugins/local-documents/rx-local-document.js.map +1 -0
- package/dist/cjs/plugins/migration-schema/index.js +84 -0
- package/dist/cjs/plugins/migration-schema/index.js.map +1 -0
- package/dist/cjs/plugins/migration-schema/migration-helpers.js +116 -0
- package/dist/cjs/plugins/migration-schema/migration-helpers.js.map +1 -0
- package/dist/cjs/plugins/migration-schema/migration-types.js +2 -0
- package/dist/cjs/plugins/migration-schema/migration-types.js.map +1 -0
- package/dist/cjs/plugins/migration-schema/rx-migration-state.js +410 -0
- package/dist/cjs/plugins/migration-schema/rx-migration-state.js.map +1 -0
- package/dist/cjs/plugins/migration-storage/index.js +173 -0
- package/dist/cjs/plugins/migration-storage/index.js.map +1 -0
- package/dist/cjs/plugins/pipeline/flagged-functions.js +129 -0
- package/dist/cjs/plugins/pipeline/flagged-functions.js.map +1 -0
- package/dist/cjs/plugins/pipeline/index.js +43 -0
- package/dist/cjs/plugins/pipeline/index.js.map +1 -0
- package/dist/cjs/plugins/pipeline/rx-pipeline.js +219 -0
- package/dist/cjs/plugins/pipeline/rx-pipeline.js.map +1 -0
- package/dist/cjs/plugins/pipeline/types.js +2 -0
- package/dist/cjs/plugins/pipeline/types.js.map +1 -0
- package/dist/cjs/plugins/query-builder/index.js +70 -0
- package/dist/cjs/plugins/query-builder/index.js.map +1 -0
- package/dist/cjs/plugins/query-builder/mquery/mquery-utils.js +40 -0
- package/dist/cjs/plugins/query-builder/mquery/mquery-utils.js.map +1 -0
- package/dist/cjs/plugins/query-builder/mquery/nosql-query-builder.js +488 -0
- package/dist/cjs/plugins/query-builder/mquery/nosql-query-builder.js.map +1 -0
- package/dist/cjs/plugins/react/database-context.js +15 -0
- package/dist/cjs/plugins/react/database-context.js.map +1 -0
- package/dist/cjs/plugins/react/database-provider.js +41 -0
- package/dist/cjs/plugins/react/database-provider.js.map +1 -0
- package/dist/cjs/plugins/react/hooks/index.js +50 -0
- package/dist/cjs/plugins/react/hooks/index.js.map +1 -0
- package/dist/cjs/plugins/react/hooks/use-live-rx-query.js +27 -0
- package/dist/cjs/plugins/react/hooks/use-live-rx-query.js.map +1 -0
- package/dist/cjs/plugins/react/hooks/use-rx-collection.js +39 -0
- package/dist/cjs/plugins/react/hooks/use-rx-collection.js.map +1 -0
- package/dist/cjs/plugins/react/hooks/use-rx-database.js +24 -0
- package/dist/cjs/plugins/react/hooks/use-rx-database.js.map +1 -0
- package/dist/cjs/plugins/react/hooks/use-rx-query.js +99 -0
- package/dist/cjs/plugins/react/hooks/use-rx-query.js.map +1 -0
- package/dist/cjs/plugins/react/index.js +28 -0
- package/dist/cjs/plugins/react/index.js.map +1 -0
- package/dist/cjs/plugins/reactivity-angular/index.js +30 -0
- package/dist/cjs/plugins/reactivity-angular/index.js.map +1 -0
- package/dist/cjs/plugins/reactivity-preact-signals/index.js +67 -0
- package/dist/cjs/plugins/reactivity-preact-signals/index.js.map +1 -0
- package/dist/cjs/plugins/reactivity-vue/index.js +32 -0
- package/dist/cjs/plugins/reactivity-vue/index.js.map +1 -0
- package/dist/cjs/plugins/replication/index.js +487 -0
- package/dist/cjs/plugins/replication/index.js.map +1 -0
- package/dist/cjs/plugins/replication/replication-helper.js +97 -0
- package/dist/cjs/plugins/replication/replication-helper.js.map +1 -0
- package/dist/cjs/plugins/replication-appwrite/appwrite-helpers.js +33 -0
- package/dist/cjs/plugins/replication-appwrite/appwrite-helpers.js.map +1 -0
- package/dist/cjs/plugins/replication-appwrite/appwrite-types.js +2 -0
- package/dist/cjs/plugins/replication-appwrite/appwrite-types.js.map +1 -0
- package/dist/cjs/plugins/replication-appwrite/index.js +176 -0
- package/dist/cjs/plugins/replication-appwrite/index.js.map +1 -0
- package/dist/cjs/plugins/replication-couchdb/couchdb-helper.js +77 -0
- package/dist/cjs/plugins/replication-couchdb/couchdb-helper.js.map +1 -0
- package/dist/cjs/plugins/replication-couchdb/couchdb-types.js +2 -0
- package/dist/cjs/plugins/replication-couchdb/couchdb-types.js.map +1 -0
- package/dist/cjs/plugins/replication-couchdb/index.js +287 -0
- package/dist/cjs/plugins/replication-couchdb/index.js.map +1 -0
- package/dist/cjs/plugins/replication-firestore/firestore-helper.js +61 -0
- package/dist/cjs/plugins/replication-firestore/firestore-helper.js.map +1 -0
- package/dist/cjs/plugins/replication-firestore/firestore-types.js +2 -0
- package/dist/cjs/plugins/replication-firestore/firestore-types.js.map +1 -0
- package/dist/cjs/plugins/replication-firestore/index.js +266 -0
- package/dist/cjs/plugins/replication-firestore/index.js.map +1 -0
- package/dist/cjs/plugins/replication-google-drive/document-handling.js +150 -0
- package/dist/cjs/plugins/replication-google-drive/document-handling.js.map +1 -0
- package/dist/cjs/plugins/replication-google-drive/downstream.js +73 -0
- package/dist/cjs/plugins/replication-google-drive/downstream.js.map +1 -0
- package/dist/cjs/plugins/replication-google-drive/google-drive-helper.js +349 -0
- package/dist/cjs/plugins/replication-google-drive/google-drive-helper.js.map +1 -0
- package/dist/cjs/plugins/replication-google-drive/google-drive-types.js +2 -0
- package/dist/cjs/plugins/replication-google-drive/google-drive-types.js.map +1 -0
- package/dist/cjs/plugins/replication-google-drive/index.js +233 -0
- package/dist/cjs/plugins/replication-google-drive/index.js.map +1 -0
- package/dist/cjs/plugins/replication-google-drive/init.js +76 -0
- package/dist/cjs/plugins/replication-google-drive/init.js.map +1 -0
- package/dist/cjs/plugins/replication-google-drive/multipart.js +74 -0
- package/dist/cjs/plugins/replication-google-drive/multipart.js.map +1 -0
- package/dist/cjs/plugins/replication-google-drive/signaling.js +262 -0
- package/dist/cjs/plugins/replication-google-drive/signaling.js.map +1 -0
- package/dist/cjs/plugins/replication-google-drive/transaction.js +134 -0
- package/dist/cjs/plugins/replication-google-drive/transaction.js.map +1 -0
- package/dist/cjs/plugins/replication-google-drive/upstream.js +182 -0
- package/dist/cjs/plugins/replication-google-drive/upstream.js.map +1 -0
- package/dist/cjs/plugins/replication-graphql/graphql-schema-from-rx-schema.js +235 -0
- package/dist/cjs/plugins/replication-graphql/graphql-schema-from-rx-schema.js.map +1 -0
- package/dist/cjs/plugins/replication-graphql/graphql-websocket.js +43 -0
- package/dist/cjs/plugins/replication-graphql/graphql-websocket.js.map +1 -0
- package/dist/cjs/plugins/replication-graphql/helper.js +29 -0
- package/dist/cjs/plugins/replication-graphql/helper.js.map +1 -0
- package/dist/cjs/plugins/replication-graphql/index.js +215 -0
- package/dist/cjs/plugins/replication-graphql/index.js.map +1 -0
- package/dist/cjs/plugins/replication-graphql/query-builder-from-rx-schema.js +141 -0
- package/dist/cjs/plugins/replication-graphql/query-builder-from-rx-schema.js.map +1 -0
- package/dist/cjs/plugins/replication-microsoft-onedrive/document-handling.js +187 -0
- package/dist/cjs/plugins/replication-microsoft-onedrive/document-handling.js.map +1 -0
- package/dist/cjs/plugins/replication-microsoft-onedrive/downstream.js +78 -0
- package/dist/cjs/plugins/replication-microsoft-onedrive/downstream.js.map +1 -0
- package/dist/cjs/plugins/replication-microsoft-onedrive/index.js +222 -0
- package/dist/cjs/plugins/replication-microsoft-onedrive/index.js.map +1 -0
- package/dist/cjs/plugins/replication-microsoft-onedrive/init.js +76 -0
- package/dist/cjs/plugins/replication-microsoft-onedrive/init.js.map +1 -0
- package/dist/cjs/plugins/replication-microsoft-onedrive/microsoft-onedrive-helper.js +273 -0
- package/dist/cjs/plugins/replication-microsoft-onedrive/microsoft-onedrive-helper.js.map +1 -0
- package/dist/cjs/plugins/replication-microsoft-onedrive/microsoft-onedrive-types.js +2 -0
- package/dist/cjs/plugins/replication-microsoft-onedrive/microsoft-onedrive-types.js.map +1 -0
- package/dist/cjs/plugins/replication-microsoft-onedrive/signaling.js +235 -0
- package/dist/cjs/plugins/replication-microsoft-onedrive/signaling.js.map +1 -0
- package/dist/cjs/plugins/replication-microsoft-onedrive/transaction.js +138 -0
- package/dist/cjs/plugins/replication-microsoft-onedrive/transaction.js.map +1 -0
- package/dist/cjs/plugins/replication-microsoft-onedrive/upstream.js +190 -0
- package/dist/cjs/plugins/replication-microsoft-onedrive/upstream.js.map +1 -0
- package/dist/cjs/plugins/replication-mongodb/index.js +229 -0
- package/dist/cjs/plugins/replication-mongodb/index.js.map +1 -0
- package/dist/cjs/plugins/replication-mongodb/mongodb-checkpoint.js +140 -0
- package/dist/cjs/plugins/replication-mongodb/mongodb-checkpoint.js.map +1 -0
- package/dist/cjs/plugins/replication-mongodb/mongodb-helper.js +53 -0
- package/dist/cjs/plugins/replication-mongodb/mongodb-helper.js.map +1 -0
- package/dist/cjs/plugins/replication-mongodb/mongodb-types.js +2 -0
- package/dist/cjs/plugins/replication-mongodb/mongodb-types.js.map +1 -0
- package/dist/cjs/plugins/replication-nats/index.js +232 -0
- package/dist/cjs/plugins/replication-nats/index.js.map +1 -0
- package/dist/cjs/plugins/replication-nats/nats-helper.js +13 -0
- package/dist/cjs/plugins/replication-nats/nats-helper.js.map +1 -0
- package/dist/cjs/plugins/replication-nats/nats-types.js +2 -0
- package/dist/cjs/plugins/replication-nats/nats-types.js.map +1 -0
- package/dist/cjs/plugins/replication-supabase/helper.js +42 -0
- package/dist/cjs/plugins/replication-supabase/helper.js.map +1 -0
- package/dist/cjs/plugins/replication-supabase/index.js +239 -0
- package/dist/cjs/plugins/replication-supabase/index.js.map +1 -0
- package/dist/cjs/plugins/replication-supabase/types.js +2 -0
- package/dist/cjs/plugins/replication-supabase/types.js.map +1 -0
- package/dist/cjs/plugins/replication-webrtc/connection-handler-p2pcf.js +79 -0
- package/dist/cjs/plugins/replication-webrtc/connection-handler-p2pcf.js.map +1 -0
- package/dist/cjs/plugins/replication-webrtc/connection-handler-simple-peer.js +199 -0
- package/dist/cjs/plugins/replication-webrtc/connection-handler-simple-peer.js.map +1 -0
- package/dist/cjs/plugins/replication-webrtc/connection-handler-webtorrent.js +137 -0
- package/dist/cjs/plugins/replication-webrtc/connection-handler-webtorrent.js.map +1 -0
- package/dist/cjs/plugins/replication-webrtc/index.js +260 -0
- package/dist/cjs/plugins/replication-webrtc/index.js.map +1 -0
- package/dist/cjs/plugins/replication-webrtc/signaling-server.js +151 -0
- package/dist/cjs/plugins/replication-webrtc/signaling-server.js.map +1 -0
- package/dist/cjs/plugins/replication-webrtc/webrtc-helper.js +32 -0
- package/dist/cjs/plugins/replication-webrtc/webrtc-helper.js.map +1 -0
- package/dist/cjs/plugins/replication-webrtc/webrtc-types.js +2 -0
- package/dist/cjs/plugins/replication-webrtc/webrtc-types.js.map +1 -0
- package/dist/cjs/plugins/replication-websocket/index.js +39 -0
- package/dist/cjs/plugins/replication-websocket/index.js.map +1 -0
- package/dist/cjs/plugins/replication-websocket/websocket-client.js +133 -0
- package/dist/cjs/plugins/replication-websocket/websocket-client.js.map +1 -0
- package/dist/cjs/plugins/replication-websocket/websocket-server.js +108 -0
- package/dist/cjs/plugins/replication-websocket/websocket-server.js.map +1 -0
- package/dist/cjs/plugins/replication-websocket/websocket-types.js +2 -0
- package/dist/cjs/plugins/replication-websocket/websocket-types.js.map +1 -0
- package/dist/cjs/plugins/state/helpers.js +81 -0
- package/dist/cjs/plugins/state/helpers.js.map +1 -0
- package/dist/cjs/plugins/state/index.js +42 -0
- package/dist/cjs/plugins/state/index.js.map +1 -0
- package/dist/cjs/plugins/state/rx-state.js +293 -0
- package/dist/cjs/plugins/state/rx-state.js.map +1 -0
- package/dist/cjs/plugins/state/types.js +2 -0
- package/dist/cjs/plugins/state/types.js.map +1 -0
- package/dist/cjs/plugins/storage-denokv/denokv-helper.js +49 -0
- package/dist/cjs/plugins/storage-denokv/denokv-helper.js.map +1 -0
- package/dist/cjs/plugins/storage-denokv/denokv-query.js +99 -0
- package/dist/cjs/plugins/storage-denokv/denokv-query.js.map +1 -0
- package/dist/cjs/plugins/storage-denokv/denokv-types.js +2 -0
- package/dist/cjs/plugins/storage-denokv/denokv-types.js.map +1 -0
- package/dist/cjs/plugins/storage-denokv/index.js +31 -0
- package/dist/cjs/plugins/storage-denokv/index.js.map +1 -0
- package/dist/cjs/plugins/storage-denokv/rx-storage-instance-denokv.js +332 -0
- package/dist/cjs/plugins/storage-denokv/rx-storage-instance-denokv.js.map +1 -0
- package/dist/cjs/plugins/storage-dexie/dexie-helper.js +259 -0
- package/dist/cjs/plugins/storage-dexie/dexie-helper.js.map +1 -0
- package/dist/cjs/plugins/storage-dexie/dexie-query.js +178 -0
- package/dist/cjs/plugins/storage-dexie/dexie-query.js.map +1 -0
- package/dist/cjs/plugins/storage-dexie/index.js +50 -0
- package/dist/cjs/plugins/storage-dexie/index.js.map +1 -0
- package/dist/cjs/plugins/storage-dexie/rx-storage-dexie.js +46 -0
- package/dist/cjs/plugins/storage-dexie/rx-storage-dexie.js.map +1 -0
- package/dist/cjs/plugins/storage-dexie/rx-storage-instance-dexie.js +229 -0
- package/dist/cjs/plugins/storage-dexie/rx-storage-instance-dexie.js.map +1 -0
- package/dist/cjs/plugins/storage-foundationdb/foundationdb-helpers.js +13 -0
- package/dist/cjs/plugins/storage-foundationdb/foundationdb-helpers.js.map +1 -0
- package/dist/cjs/plugins/storage-foundationdb/foundationdb-query.js +96 -0
- package/dist/cjs/plugins/storage-foundationdb/foundationdb-query.js.map +1 -0
- package/dist/cjs/plugins/storage-foundationdb/foundationdb-types.js +2 -0
- package/dist/cjs/plugins/storage-foundationdb/foundationdb-types.js.map +1 -0
- package/dist/cjs/plugins/storage-foundationdb/index.js +62 -0
- package/dist/cjs/plugins/storage-foundationdb/index.js.map +1 -0
- package/dist/cjs/plugins/storage-foundationdb/rx-storage-instance-foundationdb.js +309 -0
- package/dist/cjs/plugins/storage-foundationdb/rx-storage-instance-foundationdb.js.map +1 -0
- package/dist/cjs/plugins/storage-localstorage/index.js +45 -0
- package/dist/cjs/plugins/storage-localstorage/index.js.map +1 -0
- package/dist/cjs/plugins/storage-localstorage/localstorage-mock.js +38 -0
- package/dist/cjs/plugins/storage-localstorage/localstorage-mock.js.map +1 -0
- package/dist/cjs/plugins/storage-localstorage/rx-storage-instance-localstorage.js +443 -0
- package/dist/cjs/plugins/storage-localstorage/rx-storage-instance-localstorage.js.map +1 -0
- package/dist/cjs/plugins/storage-memory/binary-search-bounds.js +113 -0
- package/dist/cjs/plugins/storage-memory/binary-search-bounds.js.map +1 -0
- package/dist/cjs/plugins/storage-memory/index.js +91 -0
- package/dist/cjs/plugins/storage-memory/index.js.map +1 -0
- package/dist/cjs/plugins/storage-memory/memory-helper.js +177 -0
- package/dist/cjs/plugins/storage-memory/memory-helper.js.map +1 -0
- package/dist/cjs/plugins/storage-memory/memory-indexes.js +28 -0
- package/dist/cjs/plugins/storage-memory/memory-indexes.js.map +1 -0
- package/dist/cjs/plugins/storage-memory/memory-types.js +2 -0
- package/dist/cjs/plugins/storage-memory/memory-types.js.map +1 -0
- package/dist/cjs/plugins/storage-memory/rx-storage-instance-memory.js +371 -0
- package/dist/cjs/plugins/storage-memory/rx-storage-instance-memory.js.map +1 -0
- package/dist/cjs/plugins/storage-mongodb/index.js +50 -0
- package/dist/cjs/plugins/storage-mongodb/index.js.map +1 -0
- package/dist/cjs/plugins/storage-mongodb/mongodb-helper.js +97 -0
- package/dist/cjs/plugins/storage-mongodb/mongodb-helper.js.map +1 -0
- package/dist/cjs/plugins/storage-mongodb/mongodb-types.js +2 -0
- package/dist/cjs/plugins/storage-mongodb/mongodb-types.js.map +1 -0
- package/dist/cjs/plugins/storage-mongodb/rx-storage-instance-mongodb.js +324 -0
- package/dist/cjs/plugins/storage-mongodb/rx-storage-instance-mongodb.js.map +1 -0
- package/dist/cjs/plugins/storage-mongodb/rx-storage-mongodb.js +29 -0
- package/dist/cjs/plugins/storage-mongodb/rx-storage-mongodb.js.map +1 -0
- package/dist/cjs/plugins/storage-remote/index.js +61 -0
- package/dist/cjs/plugins/storage-remote/index.js.map +1 -0
- package/dist/cjs/plugins/storage-remote/message-channel-cache.js +52 -0
- package/dist/cjs/plugins/storage-remote/message-channel-cache.js.map +1 -0
- package/dist/cjs/plugins/storage-remote/remote.js +217 -0
- package/dist/cjs/plugins/storage-remote/remote.js.map +1 -0
- package/dist/cjs/plugins/storage-remote/rx-storage-remote.js +199 -0
- package/dist/cjs/plugins/storage-remote/rx-storage-remote.js.map +1 -0
- package/dist/cjs/plugins/storage-remote/storage-remote-helpers.js +25 -0
- package/dist/cjs/plugins/storage-remote/storage-remote-helpers.js.map +1 -0
- package/dist/cjs/plugins/storage-remote/storage-remote-types.js +2 -0
- package/dist/cjs/plugins/storage-remote/storage-remote-types.js.map +1 -0
- package/dist/cjs/plugins/storage-remote-websocket/index.js +183 -0
- package/dist/cjs/plugins/storage-remote-websocket/index.js.map +1 -0
- package/dist/cjs/plugins/storage-remote-websocket/types.js +2 -0
- package/dist/cjs/plugins/storage-remote-websocket/types.js.map +1 -0
- package/dist/cjs/plugins/storage-sqlite/index.js +84 -0
- package/dist/cjs/plugins/storage-sqlite/index.js.map +1 -0
- package/dist/cjs/plugins/storage-sqlite/sqlite-basics-helpers.js +530 -0
- package/dist/cjs/plugins/storage-sqlite/sqlite-basics-helpers.js.map +1 -0
- package/dist/cjs/plugins/storage-sqlite/sqlite-helpers.js +203 -0
- package/dist/cjs/plugins/storage-sqlite/sqlite-helpers.js.map +1 -0
- package/dist/cjs/plugins/storage-sqlite/sqlite-storage-instance.js +291 -0
- package/dist/cjs/plugins/storage-sqlite/sqlite-storage-instance.js.map +1 -0
- package/dist/cjs/plugins/storage-sqlite/sqlite-types.js +2 -0
- package/dist/cjs/plugins/storage-sqlite/sqlite-types.js.map +1 -0
- package/dist/cjs/plugins/test-utils/config.js +120 -0
- package/dist/cjs/plugins/test-utils/config.js.map +1 -0
- package/dist/cjs/plugins/test-utils/humans-collection.js +420 -0
- package/dist/cjs/plugins/test-utils/humans-collection.js.map +1 -0
- package/dist/cjs/plugins/test-utils/index.js +130 -0
- package/dist/cjs/plugins/test-utils/index.js.map +1 -0
- package/dist/cjs/plugins/test-utils/performance.js +275 -0
- package/dist/cjs/plugins/test-utils/performance.js.map +1 -0
- package/dist/cjs/plugins/test-utils/replication-base-test-suite.js +179 -0
- package/dist/cjs/plugins/test-utils/replication-base-test-suite.js.map +1 -0
- package/dist/cjs/plugins/test-utils/replication.js +54 -0
- package/dist/cjs/plugins/test-utils/replication.js.map +1 -0
- package/dist/cjs/plugins/test-utils/revisions.js +11 -0
- package/dist/cjs/plugins/test-utils/revisions.js.map +1 -0
- package/dist/cjs/plugins/test-utils/schema-objects.js +315 -0
- package/dist/cjs/plugins/test-utils/schema-objects.js.map +1 -0
- package/dist/cjs/plugins/test-utils/schemas.js +1254 -0
- package/dist/cjs/plugins/test-utils/schemas.js.map +1 -0
- package/dist/cjs/plugins/test-utils/test-util.js +72 -0
- package/dist/cjs/plugins/test-utils/test-util.js.map +1 -0
- package/dist/cjs/plugins/update/index.js +45 -0
- package/dist/cjs/plugins/update/index.js.map +1 -0
- package/dist/cjs/plugins/update/mingo-updater.js +20 -0
- package/dist/cjs/plugins/update/mingo-updater.js.map +1 -0
- package/dist/cjs/plugins/utils/index.js +226 -0
- package/dist/cjs/plugins/utils/index.js.map +1 -0
- package/dist/cjs/plugins/utils/utils-array.js +150 -0
- package/dist/cjs/plugins/utils/utils-array.js.map +1 -0
- package/dist/cjs/plugins/utils/utils-base64.js +57 -0
- package/dist/cjs/plugins/utils/utils-base64.js.map +1 -0
- package/dist/cjs/plugins/utils/utils-blob.js +62 -0
- package/dist/cjs/plugins/utils/utils-blob.js.map +1 -0
- package/dist/cjs/plugins/utils/utils-document.js +100 -0
- package/dist/cjs/plugins/utils/utils-document.js.map +1 -0
- package/dist/cjs/plugins/utils/utils-error.js +42 -0
- package/dist/cjs/plugins/utils/utils-error.js.map +1 -0
- package/dist/cjs/plugins/utils/utils-global.js +12 -0
- package/dist/cjs/plugins/utils/utils-global.js.map +1 -0
- package/dist/cjs/plugins/utils/utils-hash.js +59 -0
- package/dist/cjs/plugins/utils/utils-hash.js.map +1 -0
- package/dist/cjs/plugins/utils/utils-map.js +25 -0
- package/dist/cjs/plugins/utils/utils-map.js.map +1 -0
- package/dist/cjs/plugins/utils/utils-number.js +16 -0
- package/dist/cjs/plugins/utils/utils-number.js.map +1 -0
- package/dist/cjs/plugins/utils/utils-object-deep-equal.js +42 -0
- package/dist/cjs/plugins/utils/utils-object-deep-equal.js.map +1 -0
- package/dist/cjs/plugins/utils/utils-object-dot-prop.js +306 -0
- package/dist/cjs/plugins/utils/utils-object-dot-prop.js.map +1 -0
- package/dist/cjs/plugins/utils/utils-object.js +245 -0
- package/dist/cjs/plugins/utils/utils-object.js.map +1 -0
- package/dist/cjs/plugins/utils/utils-other.js +69 -0
- package/dist/cjs/plugins/utils/utils-other.js.map +1 -0
- package/dist/cjs/plugins/utils/utils-premium.js +37 -0
- package/dist/cjs/plugins/utils/utils-premium.js.map +1 -0
- package/dist/cjs/plugins/utils/utils-promise.js +149 -0
- package/dist/cjs/plugins/utils/utils-promise.js.map +1 -0
- package/dist/cjs/plugins/utils/utils-regex.js +9 -0
- package/dist/cjs/plugins/utils/utils-regex.js.map +1 -0
- package/dist/cjs/plugins/utils/utils-revision.js +60 -0
- package/dist/cjs/plugins/utils/utils-revision.js.map +1 -0
- package/dist/cjs/plugins/utils/utils-rxdb-version.js +11 -0
- package/dist/cjs/plugins/utils/utils-rxdb-version.js.map +1 -0
- package/dist/cjs/plugins/utils/utils-rxdb-version.template.js +11 -0
- package/dist/cjs/plugins/utils/utils-rxdb-version.template.js.map +1 -0
- package/dist/cjs/plugins/utils/utils-string.js +97 -0
- package/dist/cjs/plugins/utils/utils-string.js.map +1 -0
- package/dist/cjs/plugins/utils/utils-time.js +42 -0
- package/dist/cjs/plugins/utils/utils-time.js.map +1 -0
- package/dist/cjs/plugins/validate-ajv/index.js +53 -0
- package/dist/cjs/plugins/validate-ajv/index.js.map +1 -0
- package/dist/cjs/plugins/validate-is-my-json-valid/index.js +29 -0
- package/dist/cjs/plugins/validate-is-my-json-valid/index.js.map +1 -0
- package/dist/cjs/plugins/validate-z-schema/index.js +58 -0
- package/dist/cjs/plugins/validate-z-schema/index.js.map +1 -0
- package/dist/cjs/plugins/vector/helper.js +2 -0
- package/dist/cjs/plugins/vector/helper.js.map +1 -0
- package/dist/cjs/plugins/vector/index.js +17 -0
- package/dist/cjs/plugins/vector/index.js.map +1 -0
- package/dist/cjs/plugins/vector/types.js +2 -0
- package/dist/cjs/plugins/vector/types.js.map +1 -0
- package/dist/cjs/plugins/vector/vector-distance.js +38 -0
- package/dist/cjs/plugins/vector/vector-distance.js.map +1 -0
- package/dist/cjs/plugins/webmcp/index.js +28 -0
- package/dist/cjs/plugins/webmcp/index.js.map +1 -0
- package/dist/cjs/plugins/webmcp/nosql-query-schema.js +360 -0
- package/dist/cjs/plugins/webmcp/nosql-query-schema.js.map +1 -0
- package/dist/cjs/plugins/webmcp/webmcp.js +315 -0
- package/dist/cjs/plugins/webmcp/webmcp.js.map +1 -0
- package/dist/cjs/query-cache.js +110 -0
- package/dist/cjs/query-cache.js.map +1 -0
- package/dist/cjs/query-planner.js +307 -0
- package/dist/cjs/query-planner.js.map +1 -0
- package/dist/cjs/replication-protocol/checkpoint.js +103 -0
- package/dist/cjs/replication-protocol/checkpoint.js.map +1 -0
- package/dist/cjs/replication-protocol/conflicts.js +36 -0
- package/dist/cjs/replication-protocol/conflicts.js.map +1 -0
- package/dist/cjs/replication-protocol/default-conflict-handler.js +39 -0
- package/dist/cjs/replication-protocol/default-conflict-handler.js.map +1 -0
- package/dist/cjs/replication-protocol/downstream.js +339 -0
- package/dist/cjs/replication-protocol/downstream.js.map +1 -0
- package/dist/cjs/replication-protocol/helper.js +58 -0
- package/dist/cjs/replication-protocol/helper.js.map +1 -0
- package/dist/cjs/replication-protocol/index.js +314 -0
- package/dist/cjs/replication-protocol/index.js.map +1 -0
- package/dist/cjs/replication-protocol/meta-instance.js +130 -0
- package/dist/cjs/replication-protocol/meta-instance.js.map +1 -0
- package/dist/cjs/replication-protocol/upstream.js +384 -0
- package/dist/cjs/replication-protocol/upstream.js.map +1 -0
- package/dist/cjs/rx-change-event.js +112 -0
- package/dist/cjs/rx-change-event.js.map +1 -0
- package/dist/cjs/rx-collection-helper.js +205 -0
- package/dist/cjs/rx-collection-helper.js.map +1 -0
- package/dist/cjs/rx-collection.js +931 -0
- package/dist/cjs/rx-collection.js.map +1 -0
- package/dist/cjs/rx-database-internal-store.js +283 -0
- package/dist/cjs/rx-database-internal-store.js.map +1 -0
- package/dist/cjs/rx-database.js +682 -0
- package/dist/cjs/rx-database.js.map +1 -0
- package/dist/cjs/rx-document-prototype-merge.js +87 -0
- package/dist/cjs/rx-document-prototype-merge.js.map +1 -0
- package/dist/cjs/rx-document.js +404 -0
- package/dist/cjs/rx-document.js.map +1 -0
- package/dist/cjs/rx-error.js +167 -0
- package/dist/cjs/rx-error.js.map +1 -0
- package/dist/cjs/rx-query-helper.js +277 -0
- package/dist/cjs/rx-query-helper.js.map +1 -0
- package/dist/cjs/rx-query-mingo.js +60 -0
- package/dist/cjs/rx-query-mingo.js.map +1 -0
- package/dist/cjs/rx-query-single-result.js +105 -0
- package/dist/cjs/rx-query-single-result.js.map +1 -0
- package/dist/cjs/rx-query.js +703 -0
- package/dist/cjs/rx-query.js.map +1 -0
- package/dist/cjs/rx-schema-helper.js +333 -0
- package/dist/cjs/rx-schema-helper.js.map +1 -0
- package/dist/cjs/rx-schema.js +189 -0
- package/dist/cjs/rx-schema.js.map +1 -0
- package/dist/cjs/rx-storage-helper.js +808 -0
- package/dist/cjs/rx-storage-helper.js.map +1 -0
- package/dist/cjs/rx-storage-multiinstance.js +121 -0
- package/dist/cjs/rx-storage-multiinstance.js.map +1 -0
- package/dist/cjs/types/conflict-handling.d.js +2 -0
- package/dist/cjs/types/conflict-handling.d.js.map +1 -0
- package/dist/cjs/types/couchdb.d.js +2 -0
- package/dist/cjs/types/couchdb.d.js.map +1 -0
- package/dist/cjs/types/index.d.js +2 -0
- package/dist/cjs/types/index.d.js.map +1 -0
- package/dist/cjs/types/modules/index.d.js +2 -0
- package/dist/cjs/types/modules/index.d.js.map +1 -0
- package/dist/cjs/types/modules/mocha.parallel.d.js +2 -0
- package/dist/cjs/types/modules/mocha.parallel.d.js.map +1 -0
- package/dist/cjs/types/plugins/backup.d.js +2 -0
- package/dist/cjs/types/plugins/backup.d.js.map +1 -0
- package/dist/cjs/types/plugins/cleanup.d.js +2 -0
- package/dist/cjs/types/plugins/cleanup.d.js.map +1 -0
- package/dist/cjs/types/plugins/crdt.d.js +2 -0
- package/dist/cjs/types/plugins/crdt.d.js.map +1 -0
- package/dist/cjs/types/plugins/dexie.d.js +2 -0
- package/dist/cjs/types/plugins/dexie.d.js.map +1 -0
- package/dist/cjs/types/plugins/local-documents.d.js +2 -0
- package/dist/cjs/types/plugins/local-documents.d.js.map +1 -0
- package/dist/cjs/types/plugins/migration.d.js +2 -0
- package/dist/cjs/types/plugins/migration.d.js.map +1 -0
- package/dist/cjs/types/plugins/reactivity.d.js +2 -0
- package/dist/cjs/types/plugins/reactivity.d.js.map +1 -0
- package/dist/cjs/types/plugins/replication-graphql.d.js +2 -0
- package/dist/cjs/types/plugins/replication-graphql.d.js.map +1 -0
- package/dist/cjs/types/plugins/replication.d.js +2 -0
- package/dist/cjs/types/plugins/replication.d.js.map +1 -0
- package/dist/cjs/types/plugins/state.d.js +2 -0
- package/dist/cjs/types/plugins/state.d.js.map +1 -0
- package/dist/cjs/types/plugins/update.d.js +2 -0
- package/dist/cjs/types/plugins/update.d.js.map +1 -0
- package/dist/cjs/types/plugins/webmcp.d.js +2 -0
- package/dist/cjs/types/plugins/webmcp.d.js.map +1 -0
- package/dist/cjs/types/query-planner.d.js +2 -0
- package/dist/cjs/types/query-planner.d.js.map +1 -0
- package/dist/cjs/types/replication-protocol.d.js +2 -0
- package/dist/cjs/types/replication-protocol.d.js.map +1 -0
- package/dist/cjs/types/rx-attachment.d.js +2 -0
- package/dist/cjs/types/rx-attachment.d.js.map +1 -0
- package/dist/cjs/types/rx-change-event.d.js +2 -0
- package/dist/cjs/types/rx-change-event.d.js.map +1 -0
- package/dist/cjs/types/rx-collection.d.js +2 -0
- package/dist/cjs/types/rx-collection.d.js.map +1 -0
- package/dist/cjs/types/rx-database-internal-store.d.js +2 -0
- package/dist/cjs/types/rx-database-internal-store.d.js.map +1 -0
- package/dist/cjs/types/rx-database.d.js +2 -0
- package/dist/cjs/types/rx-database.d.js.map +1 -0
- package/dist/cjs/types/rx-document.d.js +2 -0
- package/dist/cjs/types/rx-document.d.js.map +1 -0
- package/dist/cjs/types/rx-error.d.js +2 -0
- package/dist/cjs/types/rx-error.d.js.map +1 -0
- package/dist/cjs/types/rx-plugin.d.js +2 -0
- package/dist/cjs/types/rx-plugin.d.js.map +1 -0
- package/dist/cjs/types/rx-query.d.js +2 -0
- package/dist/cjs/types/rx-query.d.js.map +1 -0
- package/dist/cjs/types/rx-schema.d.js +2 -0
- package/dist/cjs/types/rx-schema.d.js.map +1 -0
- package/dist/cjs/types/rx-storage.d.js +2 -0
- package/dist/cjs/types/rx-storage.d.js.map +1 -0
- package/dist/cjs/types/rx-storage.interface.d.js +2 -0
- package/dist/cjs/types/rx-storage.interface.d.js.map +1 -0
- package/dist/cjs/types/util.d.js +2 -0
- package/dist/cjs/types/util.d.js.map +1 -0
- package/dist/esm/change-event-buffer.js +141 -0
- package/dist/esm/change-event-buffer.js.map +1 -0
- package/dist/esm/custom-index.js +271 -0
- package/dist/esm/custom-index.js.map +1 -0
- package/dist/esm/doc-cache.js +227 -0
- package/dist/esm/doc-cache.js.map +1 -0
- package/dist/esm/event-reduce.js +93 -0
- package/dist/esm/event-reduce.js.map +1 -0
- package/dist/esm/hooks.js +122 -0
- package/dist/esm/hooks.js.map +1 -0
- package/dist/esm/incremental-write.js +161 -0
- package/dist/esm/incremental-write.js.map +1 -0
- package/dist/esm/index.js +30 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/overwritable.js +33 -0
- package/dist/esm/overwritable.js.map +1 -0
- package/dist/esm/package.json +1 -0
- package/dist/esm/plugin-helpers.js +217 -0
- package/dist/esm/plugin-helpers.js.map +1 -0
- package/dist/esm/plugin.js +88 -0
- package/dist/esm/plugin.js.map +1 -0
- package/dist/esm/plugins/attachments/attachments-utils.js +41 -0
- package/dist/esm/plugins/attachments/attachments-utils.js.map +1 -0
- package/dist/esm/plugins/attachments/index.js +202 -0
- package/dist/esm/plugins/attachments/index.js.map +1 -0
- package/dist/esm/plugins/attachments-compression/index.js +134 -0
- package/dist/esm/plugins/attachments-compression/index.js.map +1 -0
- package/dist/esm/plugins/backup/file-util.js +87 -0
- package/dist/esm/plugins/backup/file-util.js.map +1 -0
- package/dist/esm/plugins/backup/index.js +183 -0
- package/dist/esm/plugins/backup/index.js.map +1 -0
- package/dist/esm/plugins/cleanup/cleanup-helper.js +11 -0
- package/dist/esm/plugins/cleanup/cleanup-helper.js.map +1 -0
- package/dist/esm/plugins/cleanup/cleanup-state.js +75 -0
- package/dist/esm/plugins/cleanup/cleanup-state.js.map +1 -0
- package/dist/esm/plugins/cleanup/cleanup.js +108 -0
- package/dist/esm/plugins/cleanup/cleanup.js.map +1 -0
- package/dist/esm/plugins/cleanup/index.js +35 -0
- package/dist/esm/plugins/cleanup/index.js.map +1 -0
- package/dist/esm/plugins/crdt/index.js +378 -0
- package/dist/esm/plugins/crdt/index.js.map +1 -0
- package/dist/esm/plugins/dev-mode/check-document.js +150 -0
- package/dist/esm/plugins/dev-mode/check-document.js.map +1 -0
- package/dist/esm/plugins/dev-mode/check-migration-strategies.js +38 -0
- package/dist/esm/plugins/dev-mode/check-migration-strategies.js.map +1 -0
- package/dist/esm/plugins/dev-mode/check-orm.js +47 -0
- package/dist/esm/plugins/dev-mode/check-orm.js.map +1 -0
- package/dist/esm/plugins/dev-mode/check-query.js +174 -0
- package/dist/esm/plugins/dev-mode/check-query.js.map +1 -0
- package/dist/esm/plugins/dev-mode/check-schema.js +478 -0
- package/dist/esm/plugins/dev-mode/check-schema.js.map +1 -0
- package/dist/esm/plugins/dev-mode/dev-mode-tracking.js +87 -0
- package/dist/esm/plugins/dev-mode/dev-mode-tracking.js.map +1 -0
- package/dist/esm/plugins/dev-mode/entity-properties.js +49 -0
- package/dist/esm/plugins/dev-mode/entity-properties.js.map +1 -0
- package/dist/esm/plugins/dev-mode/error-messages.js +1289 -0
- package/dist/esm/plugins/dev-mode/error-messages.js.map +1 -0
- package/dist/esm/plugins/dev-mode/index.js +151 -0
- package/dist/esm/plugins/dev-mode/index.js.map +1 -0
- package/dist/esm/plugins/dev-mode/unallowed-properties.js +81 -0
- package/dist/esm/plugins/dev-mode/unallowed-properties.js.map +1 -0
- package/dist/esm/plugins/electron/electron-helper.js +3 -0
- package/dist/esm/plugins/electron/electron-helper.js.map +1 -0
- package/dist/esm/plugins/electron/index.js +4 -0
- package/dist/esm/plugins/electron/index.js.map +1 -0
- package/dist/esm/plugins/electron/rx-storage-ipc-main.js +39 -0
- package/dist/esm/plugins/electron/rx-storage-ipc-main.js.map +1 -0
- package/dist/esm/plugins/electron/rx-storage-ipc-renderer.js +31 -0
- package/dist/esm/plugins/electron/rx-storage-ipc-renderer.js.map +1 -0
- package/dist/esm/plugins/encryption-crypto-js/index.js +154 -0
- package/dist/esm/plugins/encryption-crypto-js/index.js.map +1 -0
- package/dist/esm/plugins/flutter/index.js +55 -0
- package/dist/esm/plugins/flutter/index.js.map +1 -0
- package/dist/esm/plugins/json-dump/index.js +87 -0
- package/dist/esm/plugins/json-dump/index.js.map +1 -0
- package/dist/esm/plugins/key-compression/index.js +127 -0
- package/dist/esm/plugins/key-compression/index.js.map +1 -0
- package/dist/esm/plugins/leader-election/index.js +95 -0
- package/dist/esm/plugins/leader-election/index.js.map +1 -0
- package/dist/esm/plugins/local-documents/index.js +70 -0
- package/dist/esm/plugins/local-documents/index.js.map +1 -0
- package/dist/esm/plugins/local-documents/local-documents-helper.js +67 -0
- package/dist/esm/plugins/local-documents/local-documents-helper.js.map +1 -0
- package/dist/esm/plugins/local-documents/local-documents.js +99 -0
- package/dist/esm/plugins/local-documents/local-documents.js.map +1 -0
- package/dist/esm/plugins/local-documents/rx-local-document.js +248 -0
- package/dist/esm/plugins/local-documents/rx-local-document.js.map +1 -0
- package/dist/esm/plugins/migration-schema/index.js +42 -0
- package/dist/esm/plugins/migration-schema/index.js.map +1 -0
- package/dist/esm/plugins/migration-schema/migration-helpers.js +103 -0
- package/dist/esm/plugins/migration-schema/migration-helpers.js.map +1 -0
- package/dist/esm/plugins/migration-schema/migration-types.js +3 -0
- package/dist/esm/plugins/migration-schema/migration-types.js.map +1 -0
- package/dist/esm/plugins/migration-schema/rx-migration-state.js +404 -0
- package/dist/esm/plugins/migration-schema/rx-migration-state.js.map +1 -0
- package/dist/esm/plugins/migration-storage/index.js +166 -0
- package/dist/esm/plugins/migration-storage/index.js.map +1 -0
- package/dist/esm/plugins/pipeline/flagged-functions.js +122 -0
- package/dist/esm/plugins/pipeline/flagged-functions.js.map +1 -0
- package/dist/esm/plugins/pipeline/index.js +13 -0
- package/dist/esm/plugins/pipeline/index.js.map +1 -0
- package/dist/esm/plugins/pipeline/rx-pipeline.js +210 -0
- package/dist/esm/plugins/pipeline/rx-pipeline.js.map +1 -0
- package/dist/esm/plugins/pipeline/types.js +3 -0
- package/dist/esm/plugins/pipeline/types.js.map +1 -0
- package/dist/esm/plugins/query-builder/index.js +48 -0
- package/dist/esm/plugins/query-builder/index.js.map +1 -0
- package/dist/esm/plugins/query-builder/mquery/mquery-utils.js +33 -0
- package/dist/esm/plugins/query-builder/mquery/mquery-utils.js.map +1 -0
- package/dist/esm/plugins/query-builder/mquery/nosql-query-builder.js +478 -0
- package/dist/esm/plugins/query-builder/mquery/nosql-query-builder.js.map +1 -0
- package/dist/esm/plugins/react/database-context.js +8 -0
- package/dist/esm/plugins/react/database-context.js.map +1 -0
- package/dist/esm/plugins/react/database-provider.js +34 -0
- package/dist/esm/plugins/react/database-provider.js.map +1 -0
- package/dist/esm/plugins/react/hooks/index.js +5 -0
- package/dist/esm/plugins/react/hooks/index.js.map +1 -0
- package/dist/esm/plugins/react/hooks/use-live-rx-query.js +22 -0
- package/dist/esm/plugins/react/hooks/use-live-rx-query.js.map +1 -0
- package/dist/esm/plugins/react/hooks/use-rx-collection.js +34 -0
- package/dist/esm/plugins/react/hooks/use-rx-collection.js.map +1 -0
- package/dist/esm/plugins/react/hooks/use-rx-database.js +19 -0
- package/dist/esm/plugins/react/hooks/use-rx-database.js.map +1 -0
- package/dist/esm/plugins/react/hooks/use-rx-query.js +92 -0
- package/dist/esm/plugins/react/hooks/use-rx-query.js.map +1 -0
- package/dist/esm/plugins/react/index.js +3 -0
- package/dist/esm/plugins/react/index.js.map +1 -0
- package/dist/esm/plugins/reactivity-angular/index.js +25 -0
- package/dist/esm/plugins/reactivity-angular/index.js.map +1 -0
- package/dist/esm/plugins/reactivity-preact-signals/index.js +62 -0
- package/dist/esm/plugins/reactivity-preact-signals/index.js.map +1 -0
- package/dist/esm/plugins/reactivity-vue/index.js +27 -0
- package/dist/esm/plugins/reactivity-vue/index.js.map +1 -0
- package/dist/esm/plugins/replication/index.js +479 -0
- package/dist/esm/plugins/replication/index.js.map +1 -0
- package/dist/esm/plugins/replication/replication-helper.js +86 -0
- package/dist/esm/plugins/replication/replication-helper.js.map +1 -0
- package/dist/esm/plugins/replication-appwrite/appwrite-helpers.js +26 -0
- package/dist/esm/plugins/replication-appwrite/appwrite-helpers.js.map +1 -0
- package/dist/esm/plugins/replication-appwrite/appwrite-types.js +3 -0
- package/dist/esm/plugins/replication-appwrite/appwrite-types.js.map +1 -0
- package/dist/esm/plugins/replication-appwrite/index.js +168 -0
- package/dist/esm/plugins/replication-appwrite/index.js.map +1 -0
- package/dist/esm/plugins/replication-couchdb/couchdb-helper.js +65 -0
- package/dist/esm/plugins/replication-couchdb/couchdb-helper.js.map +1 -0
- package/dist/esm/plugins/replication-couchdb/couchdb-types.js +3 -0
- package/dist/esm/plugins/replication-couchdb/couchdb-types.js.map +1 -0
- package/dist/esm/plugins/replication-couchdb/index.js +254 -0
- package/dist/esm/plugins/replication-couchdb/index.js.map +1 -0
- package/dist/esm/plugins/replication-firestore/firestore-helper.js +49 -0
- package/dist/esm/plugins/replication-firestore/firestore-helper.js.map +1 -0
- package/dist/esm/plugins/replication-firestore/firestore-types.js +3 -0
- package/dist/esm/plugins/replication-firestore/firestore-types.js.map +1 -0
- package/dist/esm/plugins/replication-firestore/index.js +233 -0
- package/dist/esm/plugins/replication-firestore/index.js.map +1 -0
- package/dist/esm/plugins/replication-google-drive/document-handling.js +140 -0
- package/dist/esm/plugins/replication-google-drive/document-handling.js.map +1 -0
- package/dist/esm/plugins/replication-google-drive/downstream.js +66 -0
- package/dist/esm/plugins/replication-google-drive/downstream.js.map +1 -0
- package/dist/esm/plugins/replication-google-drive/google-drive-helper.js +331 -0
- package/dist/esm/plugins/replication-google-drive/google-drive-helper.js.map +1 -0
- package/dist/esm/plugins/replication-google-drive/google-drive-types.js +3 -0
- package/dist/esm/plugins/replication-google-drive/google-drive-types.js.map +1 -0
- package/dist/esm/plugins/replication-google-drive/index.js +126 -0
- package/dist/esm/plugins/replication-google-drive/index.js.map +1 -0
- package/dist/esm/plugins/replication-google-drive/init.js +70 -0
- package/dist/esm/plugins/replication-google-drive/init.js.map +1 -0
- package/dist/esm/plugins/replication-google-drive/multipart.js +67 -0
- package/dist/esm/plugins/replication-google-drive/multipart.js.map +1 -0
- package/dist/esm/plugins/replication-google-drive/signaling.js +253 -0
- package/dist/esm/plugins/replication-google-drive/signaling.js.map +1 -0
- package/dist/esm/plugins/replication-google-drive/transaction.js +123 -0
- package/dist/esm/plugins/replication-google-drive/transaction.js.map +1 -0
- package/dist/esm/plugins/replication-google-drive/upstream.js +171 -0
- package/dist/esm/plugins/replication-google-drive/upstream.js.map +1 -0
- package/dist/esm/plugins/replication-graphql/graphql-schema-from-rx-schema.js +228 -0
- package/dist/esm/plugins/replication-graphql/graphql-schema-from-rx-schema.js.map +1 -0
- package/dist/esm/plugins/replication-graphql/graphql-websocket.js +35 -0
- package/dist/esm/plugins/replication-graphql/graphql-websocket.js.map +1 -0
- package/dist/esm/plugins/replication-graphql/helper.js +21 -0
- package/dist/esm/plugins/replication-graphql/helper.js.map +1 -0
- package/dist/esm/plugins/replication-graphql/index.js +161 -0
- package/dist/esm/plugins/replication-graphql/index.js.map +1 -0
- package/dist/esm/plugins/replication-graphql/query-builder-from-rx-schema.js +133 -0
- package/dist/esm/plugins/replication-graphql/query-builder-from-rx-schema.js.map +1 -0
- package/dist/esm/plugins/replication-microsoft-onedrive/document-handling.js +178 -0
- package/dist/esm/plugins/replication-microsoft-onedrive/document-handling.js.map +1 -0
- package/dist/esm/plugins/replication-microsoft-onedrive/downstream.js +71 -0
- package/dist/esm/plugins/replication-microsoft-onedrive/downstream.js.map +1 -0
- package/dist/esm/plugins/replication-microsoft-onedrive/index.js +126 -0
- package/dist/esm/plugins/replication-microsoft-onedrive/index.js.map +1 -0
- package/dist/esm/plugins/replication-microsoft-onedrive/init.js +70 -0
- package/dist/esm/plugins/replication-microsoft-onedrive/init.js.map +1 -0
- package/dist/esm/plugins/replication-microsoft-onedrive/microsoft-onedrive-helper.js +258 -0
- package/dist/esm/plugins/replication-microsoft-onedrive/microsoft-onedrive-helper.js.map +1 -0
- package/dist/esm/plugins/replication-microsoft-onedrive/microsoft-onedrive-types.js +3 -0
- package/dist/esm/plugins/replication-microsoft-onedrive/microsoft-onedrive-types.js.map +1 -0
- package/dist/esm/plugins/replication-microsoft-onedrive/signaling.js +226 -0
- package/dist/esm/plugins/replication-microsoft-onedrive/signaling.js.map +1 -0
- package/dist/esm/plugins/replication-microsoft-onedrive/transaction.js +127 -0
- package/dist/esm/plugins/replication-microsoft-onedrive/transaction.js.map +1 -0
- package/dist/esm/plugins/replication-microsoft-onedrive/upstream.js +179 -0
- package/dist/esm/plugins/replication-microsoft-onedrive/upstream.js.map +1 -0
- package/dist/esm/plugins/replication-mongodb/index.js +197 -0
- package/dist/esm/plugins/replication-mongodb/index.js.map +1 -0
- package/dist/esm/plugins/replication-mongodb/mongodb-checkpoint.js +131 -0
- package/dist/esm/plugins/replication-mongodb/mongodb-checkpoint.js.map +1 -0
- package/dist/esm/plugins/replication-mongodb/mongodb-helper.js +45 -0
- package/dist/esm/plugins/replication-mongodb/mongodb-helper.js.map +1 -0
- package/dist/esm/plugins/replication-mongodb/mongodb-types.js +3 -0
- package/dist/esm/plugins/replication-mongodb/mongodb-types.js.map +1 -0
- package/dist/esm/plugins/replication-nats/index.js +199 -0
- package/dist/esm/plugins/replication-nats/index.js.map +1 -0
- package/dist/esm/plugins/replication-nats/nats-helper.js +7 -0
- package/dist/esm/plugins/replication-nats/nats-helper.js.map +1 -0
- package/dist/esm/plugins/replication-nats/nats-types.js +3 -0
- package/dist/esm/plugins/replication-nats/nats-types.js.map +1 -0
- package/dist/esm/plugins/replication-supabase/helper.js +35 -0
- package/dist/esm/plugins/replication-supabase/helper.js.map +1 -0
- package/dist/esm/plugins/replication-supabase/index.js +231 -0
- package/dist/esm/plugins/replication-supabase/index.js.map +1 -0
- package/dist/esm/plugins/replication-supabase/types.js +3 -0
- package/dist/esm/plugins/replication-supabase/types.js.map +1 -0
- package/dist/esm/plugins/replication-webrtc/connection-handler-p2pcf.js +78 -0
- package/dist/esm/plugins/replication-webrtc/connection-handler-p2pcf.js.map +1 -0
- package/dist/esm/plugins/replication-webrtc/connection-handler-simple-peer.js +192 -0
- package/dist/esm/plugins/replication-webrtc/connection-handler-simple-peer.js.map +1 -0
- package/dist/esm/plugins/replication-webrtc/connection-handler-webtorrent.js +136 -0
- package/dist/esm/plugins/replication-webrtc/connection-handler-webtorrent.js.map +1 -0
- package/dist/esm/plugins/replication-webrtc/index.js +207 -0
- package/dist/esm/plugins/replication-webrtc/index.js.map +1 -0
- package/dist/esm/plugins/replication-webrtc/signaling-server.js +144 -0
- package/dist/esm/plugins/replication-webrtc/signaling-server.js.map +1 -0
- package/dist/esm/plugins/replication-webrtc/webrtc-helper.js +26 -0
- package/dist/esm/plugins/replication-webrtc/webrtc-helper.js.map +1 -0
- package/dist/esm/plugins/replication-webrtc/webrtc-types.js +3 -0
- package/dist/esm/plugins/replication-webrtc/webrtc-types.js.map +1 -0
- package/dist/esm/plugins/replication-websocket/index.js +4 -0
- package/dist/esm/plugins/replication-websocket/index.js.map +1 -0
- package/dist/esm/plugins/replication-websocket/websocket-client.js +125 -0
- package/dist/esm/plugins/replication-websocket/websocket-client.js.map +1 -0
- package/dist/esm/plugins/replication-websocket/websocket-server.js +100 -0
- package/dist/esm/plugins/replication-websocket/websocket-server.js.map +1 -0
- package/dist/esm/plugins/replication-websocket/websocket-types.js +3 -0
- package/dist/esm/plugins/replication-websocket/websocket-types.js.map +1 -0
- package/dist/esm/plugins/state/helpers.js +73 -0
- package/dist/esm/plugins/state/helpers.js.map +1 -0
- package/dist/esm/plugins/state/index.js +20 -0
- package/dist/esm/plugins/state/index.js.map +1 -0
- package/dist/esm/plugins/state/rx-state.js +285 -0
- package/dist/esm/plugins/state/rx-state.js.map +1 -0
- package/dist/esm/plugins/state/types.js +3 -0
- package/dist/esm/plugins/state/types.js.map +1 -0
- package/dist/esm/plugins/storage-denokv/denokv-helper.js +40 -0
- package/dist/esm/plugins/storage-denokv/denokv-helper.js.map +1 -0
- package/dist/esm/plugins/storage-denokv/denokv-query.js +93 -0
- package/dist/esm/plugins/storage-denokv/denokv-query.js.map +1 -0
- package/dist/esm/plugins/storage-denokv/denokv-types.js +3 -0
- package/dist/esm/plugins/storage-denokv/denokv-types.js.map +1 -0
- package/dist/esm/plugins/storage-denokv/index.js +24 -0
- package/dist/esm/plugins/storage-denokv/index.js.map +1 -0
- package/dist/esm/plugins/storage-denokv/rx-storage-instance-denokv.js +325 -0
- package/dist/esm/plugins/storage-denokv/rx-storage-instance-denokv.js.map +1 -0
- package/dist/esm/plugins/storage-dexie/dexie-helper.js +241 -0
- package/dist/esm/plugins/storage-dexie/dexie-helper.js.map +1 -0
- package/dist/esm/plugins/storage-dexie/dexie-query.js +169 -0
- package/dist/esm/plugins/storage-dexie/dexie-query.js.map +1 -0
- package/dist/esm/plugins/storage-dexie/index.js +5 -0
- package/dist/esm/plugins/storage-dexie/index.js.map +1 -0
- package/dist/esm/plugins/storage-dexie/rx-storage-dexie.js +39 -0
- package/dist/esm/plugins/storage-dexie/rx-storage-dexie.js.map +1 -0
- package/dist/esm/plugins/storage-dexie/rx-storage-instance-dexie.js +222 -0
- package/dist/esm/plugins/storage-dexie/rx-storage-instance-dexie.js.map +1 -0
- package/dist/esm/plugins/storage-foundationdb/foundationdb-helpers.js +6 -0
- package/dist/esm/plugins/storage-foundationdb/foundationdb-helpers.js.map +1 -0
- package/dist/esm/plugins/storage-foundationdb/foundationdb-query.js +90 -0
- package/dist/esm/plugins/storage-foundationdb/foundationdb-query.js.map +1 -0
- package/dist/esm/plugins/storage-foundationdb/foundationdb-types.js +3 -0
- package/dist/esm/plugins/storage-foundationdb/foundationdb-types.js.map +1 -0
- package/dist/esm/plugins/storage-foundationdb/index.js +31 -0
- package/dist/esm/plugins/storage-foundationdb/index.js.map +1 -0
- package/dist/esm/plugins/storage-foundationdb/rx-storage-instance-foundationdb.js +302 -0
- package/dist/esm/plugins/storage-foundationdb/rx-storage-instance-foundationdb.js.map +1 -0
- package/dist/esm/plugins/storage-localstorage/index.js +23 -0
- package/dist/esm/plugins/storage-localstorage/index.js.map +1 -0
- package/dist/esm/plugins/storage-localstorage/localstorage-mock.js +33 -0
- package/dist/esm/plugins/storage-localstorage/localstorage-mock.js.map +1 -0
- package/dist/esm/plugins/storage-localstorage/rx-storage-instance-localstorage.js +432 -0
- package/dist/esm/plugins/storage-localstorage/rx-storage-instance-localstorage.js.map +1 -0
- package/dist/esm/plugins/storage-memory/binary-search-bounds.js +103 -0
- package/dist/esm/plugins/storage-memory/binary-search-bounds.js.map +1 -0
- package/dist/esm/plugins/storage-memory/index.js +29 -0
- package/dist/esm/plugins/storage-memory/index.js.map +1 -0
- package/dist/esm/plugins/storage-memory/memory-helper.js +165 -0
- package/dist/esm/plugins/storage-memory/memory-helper.js.map +1 -0
- package/dist/esm/plugins/storage-memory/memory-indexes.js +21 -0
- package/dist/esm/plugins/storage-memory/memory-indexes.js.map +1 -0
- package/dist/esm/plugins/storage-memory/memory-types.js +3 -0
- package/dist/esm/plugins/storage-memory/memory-types.js.map +1 -0
- package/dist/esm/plugins/storage-memory/rx-storage-instance-memory.js +364 -0
- package/dist/esm/plugins/storage-memory/rx-storage-instance-memory.js.map +1 -0
- package/dist/esm/plugins/storage-mongodb/index.js +5 -0
- package/dist/esm/plugins/storage-mongodb/index.js.map +1 -0
- package/dist/esm/plugins/storage-mongodb/mongodb-helper.js +85 -0
- package/dist/esm/plugins/storage-mongodb/mongodb-helper.js.map +1 -0
- package/dist/esm/plugins/storage-mongodb/mongodb-types.js +3 -0
- package/dist/esm/plugins/storage-mongodb/mongodb-types.js.map +1 -0
- package/dist/esm/plugins/storage-mongodb/rx-storage-instance-mongodb.js +316 -0
- package/dist/esm/plugins/storage-mongodb/rx-storage-instance-mongodb.js.map +1 -0
- package/dist/esm/plugins/storage-mongodb/rx-storage-mongodb.js +22 -0
- package/dist/esm/plugins/storage-mongodb/rx-storage-mongodb.js.map +1 -0
- package/dist/esm/plugins/storage-remote/index.js +6 -0
- package/dist/esm/plugins/storage-remote/index.js.map +1 -0
- package/dist/esm/plugins/storage-remote/message-channel-cache.js +44 -0
- package/dist/esm/plugins/storage-remote/message-channel-cache.js.map +1 -0
- package/dist/esm/plugins/storage-remote/remote.js +212 -0
- package/dist/esm/plugins/storage-remote/remote.js.map +1 -0
- package/dist/esm/plugins/storage-remote/rx-storage-remote.js +193 -0
- package/dist/esm/plugins/storage-remote/rx-storage-remote.js.map +1 -0
- package/dist/esm/plugins/storage-remote/storage-remote-helpers.js +18 -0
- package/dist/esm/plugins/storage-remote/storage-remote-helpers.js.map +1 -0
- package/dist/esm/plugins/storage-remote/storage-remote-types.js +3 -0
- package/dist/esm/plugins/storage-remote/storage-remote-types.js.map +1 -0
- package/dist/esm/plugins/storage-remote-websocket/index.js +161 -0
- package/dist/esm/plugins/storage-remote-websocket/index.js.map +1 -0
- package/dist/esm/plugins/storage-remote-websocket/types.js +3 -0
- package/dist/esm/plugins/storage-remote-websocket/types.js.map +1 -0
- package/dist/esm/plugins/storage-sqlite/index.js +31 -0
- package/dist/esm/plugins/storage-sqlite/index.js.map +1 -0
- package/dist/esm/plugins/storage-sqlite/sqlite-basics-helpers.js +510 -0
- package/dist/esm/plugins/storage-sqlite/sqlite-basics-helpers.js.map +1 -0
- package/dist/esm/plugins/storage-sqlite/sqlite-helpers.js +187 -0
- package/dist/esm/plugins/storage-sqlite/sqlite-helpers.js.map +1 -0
- package/dist/esm/plugins/storage-sqlite/sqlite-storage-instance.js +283 -0
- package/dist/esm/plugins/storage-sqlite/sqlite-storage-instance.js.map +1 -0
- package/dist/esm/plugins/storage-sqlite/sqlite-types.js +3 -0
- package/dist/esm/plugins/storage-sqlite/sqlite-types.js.map +1 -0
- package/dist/esm/plugins/test-utils/config.js +104 -0
- package/dist/esm/plugins/test-utils/config.js.map +1 -0
- package/dist/esm/plugins/test-utils/humans-collection.js +397 -0
- package/dist/esm/plugins/test-utils/humans-collection.js.map +1 -0
- package/dist/esm/plugins/test-utils/index.js +22 -0
- package/dist/esm/plugins/test-utils/index.js.map +1 -0
- package/dist/esm/plugins/test-utils/performance.js +267 -0
- package/dist/esm/plugins/test-utils/performance.js.map +1 -0
- package/dist/esm/plugins/test-utils/replication-base-test-suite.js +170 -0
- package/dist/esm/plugins/test-utils/replication-base-test-suite.js.map +1 -0
- package/dist/esm/plugins/test-utils/replication.js +46 -0
- package/dist/esm/plugins/test-utils/replication.js.map +1 -0
- package/dist/esm/plugins/test-utils/revisions.js +5 -0
- package/dist/esm/plugins/test-utils/revisions.js.map +1 -0
- package/dist/esm/plugins/test-utils/schema-objects.js +283 -0
- package/dist/esm/plugins/test-utils/schema-objects.js.map +1 -0
- package/dist/esm/plugins/test-utils/schemas.js +1244 -0
- package/dist/esm/plugins/test-utils/schemas.js.map +1 -0
- package/dist/esm/plugins/test-utils/test-util.js +62 -0
- package/dist/esm/plugins/test-utils/test-util.js.map +1 -0
- package/dist/esm/plugins/update/index.js +35 -0
- package/dist/esm/plugins/update/index.js.map +1 -0
- package/dist/esm/plugins/update/mingo-updater.js +13 -0
- package/dist/esm/plugins/update/mingo-updater.js.map +1 -0
- package/dist/esm/plugins/utils/index.js +21 -0
- package/dist/esm/plugins/utils/index.js.map +1 -0
- package/dist/esm/plugins/utils/utils-array.js +130 -0
- package/dist/esm/plugins/utils/utils-array.js.map +1 -0
- package/dist/esm/plugins/utils/utils-base64.js +48 -0
- package/dist/esm/plugins/utils/utils-base64.js.map +1 -0
- package/dist/esm/plugins/utils/utils-blob.js +54 -0
- package/dist/esm/plugins/utils/utils-blob.js.map +1 -0
- package/dist/esm/plugins/utils/utils-document.js +87 -0
- package/dist/esm/plugins/utils/utils-document.js.map +1 -0
- package/dist/esm/plugins/utils/utils-error.js +36 -0
- package/dist/esm/plugins/utils/utils-error.js.map +1 -0
- package/dist/esm/plugins/utils/utils-global.js +6 -0
- package/dist/esm/plugins/utils/utils-global.js.map +1 -0
- package/dist/esm/plugins/utils/utils-hash.js +51 -0
- package/dist/esm/plugins/utils/utils-hash.js.map +1 -0
- package/dist/esm/plugins/utils/utils-map.js +18 -0
- package/dist/esm/plugins/utils/utils-map.js.map +1 -0
- package/dist/esm/plugins/utils/utils-number.js +10 -0
- package/dist/esm/plugins/utils/utils-number.js.map +1 -0
- package/dist/esm/plugins/utils/utils-object-deep-equal.js +36 -0
- package/dist/esm/plugins/utils/utils-object-deep-equal.js.map +1 -0
- package/dist/esm/plugins/utils/utils-object-dot-prop.js +296 -0
- package/dist/esm/plugins/utils/utils-object-dot-prop.js.map +1 -0
- package/dist/esm/plugins/utils/utils-object.js +228 -0
- package/dist/esm/plugins/utils/utils-object.js.map +1 -0
- package/dist/esm/plugins/utils/utils-other.js +58 -0
- package/dist/esm/plugins/utils/utils-other.js.map +1 -0
- package/dist/esm/plugins/utils/utils-premium.js +30 -0
- package/dist/esm/plugins/utils/utils-premium.js.map +1 -0
- package/dist/esm/plugins/utils/utils-promise.js +134 -0
- package/dist/esm/plugins/utils/utils-promise.js.map +1 -0
- package/dist/esm/plugins/utils/utils-regex.js +3 -0
- package/dist/esm/plugins/utils/utils-regex.js.map +1 -0
- package/dist/esm/plugins/utils/utils-revision.js +53 -0
- package/dist/esm/plugins/utils/utils-revision.js.map +1 -0
- package/dist/esm/plugins/utils/utils-rxdb-version.js +5 -0
- package/dist/esm/plugins/utils/utils-rxdb-version.js.map +1 -0
- package/dist/esm/plugins/utils/utils-rxdb-version.template.js +5 -0
- package/dist/esm/plugins/utils/utils-rxdb-version.template.js.map +1 -0
- package/dist/esm/plugins/utils/utils-string.js +83 -0
- package/dist/esm/plugins/utils/utils-string.js.map +1 -0
- package/dist/esm/plugins/utils/utils-time.js +36 -0
- package/dist/esm/plugins/utils/utils-time.js.map +1 -0
- package/dist/esm/plugins/validate-ajv/index.js +43 -0
- package/dist/esm/plugins/validate-ajv/index.js.map +1 -0
- package/dist/esm/plugins/validate-is-my-json-valid/index.js +20 -0
- package/dist/esm/plugins/validate-is-my-json-valid/index.js.map +1 -0
- package/dist/esm/plugins/validate-z-schema/index.js +47 -0
- package/dist/esm/plugins/validate-z-schema/index.js.map +1 -0
- package/dist/esm/plugins/vector/helper.js +2 -0
- package/dist/esm/plugins/vector/helper.js.map +1 -0
- package/dist/esm/plugins/vector/index.js +2 -0
- package/dist/esm/plugins/vector/index.js.map +1 -0
- package/dist/esm/plugins/vector/types.js +3 -0
- package/dist/esm/plugins/vector/types.js.map +1 -0
- package/dist/esm/plugins/vector/vector-distance.js +29 -0
- package/dist/esm/plugins/vector/vector-distance.js.map +1 -0
- package/dist/esm/plugins/webmcp/index.js +3 -0
- package/dist/esm/plugins/webmcp/index.js.map +1 -0
- package/dist/esm/plugins/webmcp/nosql-query-schema.js +354 -0
- package/dist/esm/plugins/webmcp/nosql-query-schema.js.map +1 -0
- package/dist/esm/plugins/webmcp/webmcp.js +307 -0
- package/dist/esm/plugins/webmcp/webmcp.js.map +1 -0
- package/dist/esm/query-cache.js +99 -0
- package/dist/esm/query-cache.js.map +1 -0
- package/dist/esm/query-planner.js +297 -0
- package/dist/esm/query-planner.js.map +1 -0
- package/dist/esm/replication-protocol/checkpoint.js +95 -0
- package/dist/esm/replication-protocol/checkpoint.js.map +1 -0
- package/dist/esm/replication-protocol/conflicts.js +31 -0
- package/dist/esm/replication-protocol/conflicts.js.map +1 -0
- package/dist/esm/replication-protocol/default-conflict-handler.js +33 -0
- package/dist/esm/replication-protocol/default-conflict-handler.js.map +1 -0
- package/dist/esm/replication-protocol/downstream.js +334 -0
- package/dist/esm/replication-protocol/downstream.js.map +1 -0
- package/dist/esm/replication-protocol/helper.js +49 -0
- package/dist/esm/replication-protocol/helper.js.map +1 -0
- package/dist/esm/replication-protocol/index.js +221 -0
- package/dist/esm/replication-protocol/index.js.map +1 -0
- package/dist/esm/replication-protocol/meta-instance.js +121 -0
- package/dist/esm/replication-protocol/meta-instance.js.map +1 -0
- package/dist/esm/replication-protocol/upstream.js +379 -0
- package/dist/esm/replication-protocol/upstream.js.map +1 -0
- package/dist/esm/rx-change-event.js +103 -0
- package/dist/esm/rx-change-event.js.map +1 -0
- package/dist/esm/rx-collection-helper.js +196 -0
- package/dist/esm/rx-collection-helper.js.map +1 -0
- package/dist/esm/rx-collection.js +923 -0
- package/dist/esm/rx-collection.js.map +1 -0
- package/dist/esm/rx-database-internal-store.js +270 -0
- package/dist/esm/rx-database-internal-store.js.map +1 -0
- package/dist/esm/rx-database.js +670 -0
- package/dist/esm/rx-database.js.map +1 -0
- package/dist/esm/rx-document-prototype-merge.js +78 -0
- package/dist/esm/rx-document-prototype-merge.js.map +1 -0
- package/dist/esm/rx-document.js +394 -0
- package/dist/esm/rx-document.js.map +1 -0
- package/dist/esm/rx-error.js +153 -0
- package/dist/esm/rx-error.js.map +1 -0
- package/dist/esm/rx-query-helper.js +268 -0
- package/dist/esm/rx-query-helper.js.map +1 -0
- package/dist/esm/rx-query-mingo.js +54 -0
- package/dist/esm/rx-query-mingo.js.map +1 -0
- package/dist/esm/rx-query-single-result.js +98 -0
- package/dist/esm/rx-query-single-result.js.map +1 -0
- package/dist/esm/rx-query.js +690 -0
- package/dist/esm/rx-query.js.map +1 -0
- package/dist/esm/rx-schema-helper.js +316 -0
- package/dist/esm/rx-schema-helper.js.map +1 -0
- package/dist/esm/rx-schema.js +177 -0
- package/dist/esm/rx-schema.js.map +1 -0
- package/dist/esm/rx-storage-helper.js +785 -0
- package/dist/esm/rx-storage-helper.js.map +1 -0
- package/dist/esm/rx-storage-multiinstance.js +113 -0
- package/dist/esm/rx-storage-multiinstance.js.map +1 -0
- package/dist/esm/types/conflict-handling.d.js +3 -0
- package/dist/esm/types/conflict-handling.d.js.map +1 -0
- package/dist/esm/types/couchdb.d.js +3 -0
- package/dist/esm/types/couchdb.d.js.map +1 -0
- package/dist/esm/types/index.d.js +2 -0
- package/dist/esm/types/index.d.js.map +1 -0
- package/dist/esm/types/modules/index.d.js +2 -0
- package/dist/esm/types/modules/index.d.js.map +1 -0
- package/dist/esm/types/modules/mocha.parallel.d.js +2 -0
- package/dist/esm/types/modules/mocha.parallel.d.js.map +1 -0
- package/dist/esm/types/plugins/backup.d.js +3 -0
- package/dist/esm/types/plugins/backup.d.js.map +1 -0
- package/dist/esm/types/plugins/cleanup.d.js +3 -0
- package/dist/esm/types/plugins/cleanup.d.js.map +1 -0
- package/dist/esm/types/plugins/crdt.d.js +3 -0
- package/dist/esm/types/plugins/crdt.d.js.map +1 -0
- package/dist/esm/types/plugins/dexie.d.js +3 -0
- package/dist/esm/types/plugins/dexie.d.js.map +1 -0
- package/dist/esm/types/plugins/local-documents.d.js +3 -0
- package/dist/esm/types/plugins/local-documents.d.js.map +1 -0
- package/dist/esm/types/plugins/migration.d.js +3 -0
- package/dist/esm/types/plugins/migration.d.js.map +1 -0
- package/dist/esm/types/plugins/reactivity.d.js +3 -0
- package/dist/esm/types/plugins/reactivity.d.js.map +1 -0
- package/dist/esm/types/plugins/replication-graphql.d.js +3 -0
- package/dist/esm/types/plugins/replication-graphql.d.js.map +1 -0
- package/dist/esm/types/plugins/replication.d.js +3 -0
- package/dist/esm/types/plugins/replication.d.js.map +1 -0
- package/dist/esm/types/plugins/state.d.js +3 -0
- package/dist/esm/types/plugins/state.d.js.map +1 -0
- package/dist/esm/types/plugins/update.d.js +3 -0
- package/dist/esm/types/plugins/update.d.js.map +1 -0
- package/dist/esm/types/plugins/webmcp.d.js +3 -0
- package/dist/esm/types/plugins/webmcp.d.js.map +1 -0
- package/dist/esm/types/query-planner.d.js +3 -0
- package/dist/esm/types/query-planner.d.js.map +1 -0
- package/dist/esm/types/replication-protocol.d.js +3 -0
- package/dist/esm/types/replication-protocol.d.js.map +1 -0
- package/dist/esm/types/rx-attachment.d.js +3 -0
- package/dist/esm/types/rx-attachment.d.js.map +1 -0
- package/dist/esm/types/rx-change-event.d.js +3 -0
- package/dist/esm/types/rx-change-event.d.js.map +1 -0
- package/dist/esm/types/rx-collection.d.js +3 -0
- package/dist/esm/types/rx-collection.d.js.map +1 -0
- package/dist/esm/types/rx-database-internal-store.d.js +3 -0
- package/dist/esm/types/rx-database-internal-store.d.js.map +1 -0
- package/dist/esm/types/rx-database.d.js +3 -0
- package/dist/esm/types/rx-database.d.js.map +1 -0
- package/dist/esm/types/rx-document.d.js +3 -0
- package/dist/esm/types/rx-document.d.js.map +1 -0
- package/dist/esm/types/rx-error.d.js +3 -0
- package/dist/esm/types/rx-error.d.js.map +1 -0
- package/dist/esm/types/rx-plugin.d.js +3 -0
- package/dist/esm/types/rx-plugin.d.js.map +1 -0
- package/dist/esm/types/rx-query.d.js +3 -0
- package/dist/esm/types/rx-query.d.js.map +1 -0
- package/dist/esm/types/rx-schema.d.js +3 -0
- package/dist/esm/types/rx-schema.d.js.map +1 -0
- package/dist/esm/types/rx-storage.d.js +3 -0
- package/dist/esm/types/rx-storage.d.js.map +1 -0
- package/dist/esm/types/rx-storage.interface.d.js +3 -0
- package/dist/esm/types/rx-storage.interface.d.js.map +1 -0
- package/dist/esm/types/util.d.js +3 -0
- package/dist/esm/types/util.d.js.map +1 -0
- package/dist/types/change-event-buffer.d.ts +50 -0
- package/dist/types/custom-index.d.ts +58 -0
- package/dist/types/doc-cache.d.ts +96 -0
- package/dist/types/event-reduce.d.ts +15 -0
- package/dist/types/hooks.d.ts +109 -0
- package/dist/types/incremental-write.d.ts +29 -0
- package/dist/types/index.d.ts +30 -0
- package/dist/types/overwritable.d.ts +26 -0
- package/dist/types/plugin-helpers.d.ts +30 -0
- package/dist/types/plugin.d.ts +6 -0
- package/dist/types/plugins/attachments/attachments-utils.d.ts +10 -0
- package/dist/types/plugins/attachments/index.d.ts +42 -0
- package/dist/types/plugins/attachments-compression/index.d.ts +38 -0
- package/dist/types/plugins/backup/file-util.d.ts +17 -0
- package/dist/types/plugins/backup/index.d.ts +37 -0
- package/dist/types/plugins/cleanup/cleanup-helper.d.ts +2 -0
- package/dist/types/plugins/cleanup/cleanup-state.d.ts +7 -0
- package/dist/types/plugins/cleanup/cleanup.d.ts +8 -0
- package/dist/types/plugins/cleanup/index.d.ts +4 -0
- package/dist/types/plugins/crdt/index.d.ts +12 -0
- package/dist/types/plugins/dev-mode/check-document.d.ts +9 -0
- package/dist/types/plugins/dev-mode/check-migration-strategies.d.ts +6 -0
- package/dist/types/plugins/dev-mode/check-orm.d.ts +7 -0
- package/dist/types/plugins/dev-mode/check-query.d.ts +21 -0
- package/dist/types/plugins/dev-mode/check-schema.d.ts +18 -0
- package/dist/types/plugins/dev-mode/dev-mode-tracking.d.ts +4 -0
- package/dist/types/plugins/dev-mode/entity-properties.d.ts +3 -0
- package/dist/types/plugins/dev-mode/error-messages.d.ts +1230 -0
- package/dist/types/plugins/dev-mode/index.d.ts +19 -0
- package/dist/types/plugins/dev-mode/unallowed-properties.d.ts +20 -0
- package/dist/types/plugins/electron/electron-helper.d.ts +2 -0
- package/dist/types/plugins/electron/index.d.ts +3 -0
- package/dist/types/plugins/electron/rx-storage-ipc-main.d.ts +10 -0
- package/dist/types/plugins/electron/rx-storage-ipc-renderer.d.ts +13 -0
- package/dist/types/plugins/encryption-crypto-js/index.d.ts +10 -0
- package/dist/types/plugins/flutter/index.d.ts +11 -0
- package/dist/types/plugins/json-dump/index.d.ts +2 -0
- package/dist/types/plugins/key-compression/index.d.ts +18 -0
- package/dist/types/plugins/leader-election/index.d.ts +25 -0
- package/dist/types/plugins/local-documents/index.d.ts +6 -0
- package/dist/types/plugins/local-documents/local-documents-helper.d.ts +9 -0
- package/dist/types/plugins/local-documents/local-documents.d.ts +14 -0
- package/dist/types/plugins/local-documents/rx-local-document.d.ts +11 -0
- package/dist/types/plugins/migration-schema/index.d.ts +8 -0
- package/dist/types/plugins/migration-schema/migration-helpers.d.ts +29 -0
- package/dist/types/plugins/migration-schema/migration-types.d.ts +33 -0
- package/dist/types/plugins/migration-schema/rx-migration-state.d.ts +50 -0
- package/dist/types/plugins/migration-storage/index.d.ts +32 -0
- package/dist/types/plugins/pipeline/flagged-functions.d.ts +69 -0
- package/dist/types/plugins/pipeline/index.d.ts +5 -0
- package/dist/types/plugins/pipeline/rx-pipeline.d.ts +37 -0
- package/dist/types/plugins/pipeline/types.d.ts +17 -0
- package/dist/types/plugins/query-builder/index.d.ts +5 -0
- package/dist/types/plugins/query-builder/mquery/mquery-utils.d.ts +12 -0
- package/dist/types/plugins/query-builder/mquery/nosql-query-builder.d.ts +165 -0
- package/dist/types/plugins/react/database-context.d.ts +4 -0
- package/dist/types/plugins/react/database-provider.d.ts +24 -0
- package/dist/types/plugins/react/hooks/index.d.ts +4 -0
- package/dist/types/plugins/react/hooks/use-live-rx-query.d.ts +11 -0
- package/dist/types/plugins/react/hooks/use-rx-collection.d.ts +10 -0
- package/dist/types/plugins/react/hooks/use-rx-database.d.ts +9 -0
- package/dist/types/plugins/react/hooks/use-rx-query.d.ts +24 -0
- package/dist/types/plugins/react/index.d.ts +2 -0
- package/dist/types/plugins/reactivity-angular/index.d.ts +16 -0
- package/dist/types/plugins/reactivity-preact-signals/index.d.ts +27 -0
- package/dist/types/plugins/reactivity-vue/index.d.ts +17 -0
- package/dist/types/plugins/replication/index.d.ts +84 -0
- package/dist/types/plugins/replication/replication-helper.d.ts +23 -0
- package/dist/types/plugins/replication-appwrite/appwrite-helpers.d.ts +3 -0
- package/dist/types/plugins/replication-appwrite/appwrite-types.d.ts +16 -0
- package/dist/types/plugins/replication-appwrite/index.d.ts +14 -0
- package/dist/types/plugins/replication-couchdb/couchdb-helper.d.ts +19 -0
- package/dist/types/plugins/replication-couchdb/couchdb-types.d.ts +22 -0
- package/dist/types/plugins/replication-couchdb/index.d.ts +18 -0
- package/dist/types/plugins/replication-firestore/firestore-helper.d.ts +10 -0
- package/dist/types/plugins/replication-firestore/firestore-types.d.ts +46 -0
- package/dist/types/plugins/replication-firestore/index.d.ts +17 -0
- package/dist/types/plugins/replication-google-drive/document-handling.d.ts +13 -0
- package/dist/types/plugins/replication-google-drive/downstream.d.ts +10 -0
- package/dist/types/plugins/replication-google-drive/google-drive-helper.d.ts +35 -0
- package/dist/types/plugins/replication-google-drive/google-drive-types.d.ts +67 -0
- package/dist/types/plugins/replication-google-drive/index.d.ts +39 -0
- package/dist/types/plugins/replication-google-drive/init.d.ts +29 -0
- package/dist/types/plugins/replication-google-drive/multipart.d.ts +10 -0
- package/dist/types/plugins/replication-google-drive/signaling.d.ts +41 -0
- package/dist/types/plugins/replication-google-drive/transaction.d.ts +22 -0
- package/dist/types/plugins/replication-google-drive/upstream.d.ts +24 -0
- package/dist/types/plugins/replication-graphql/graphql-schema-from-rx-schema.d.ts +51 -0
- package/dist/types/plugins/replication-graphql/graphql-websocket.d.ts +12 -0
- package/dist/types/plugins/replication-graphql/helper.d.ts +15 -0
- package/dist/types/plugins/replication-graphql/index.d.ts +26 -0
- package/dist/types/plugins/replication-graphql/query-builder-from-rx-schema.d.ts +5 -0
- package/dist/types/plugins/replication-microsoft-onedrive/document-handling.d.ts +14 -0
- package/dist/types/plugins/replication-microsoft-onedrive/downstream.d.ts +10 -0
- package/dist/types/plugins/replication-microsoft-onedrive/index.d.ts +38 -0
- package/dist/types/plugins/replication-microsoft-onedrive/init.d.ts +29 -0
- package/dist/types/plugins/replication-microsoft-onedrive/microsoft-onedrive-helper.d.ts +30 -0
- package/dist/types/plugins/replication-microsoft-onedrive/microsoft-onedrive-types.d.ts +71 -0
- package/dist/types/plugins/replication-microsoft-onedrive/signaling.d.ts +41 -0
- package/dist/types/plugins/replication-microsoft-onedrive/transaction.d.ts +22 -0
- package/dist/types/plugins/replication-microsoft-onedrive/upstream.d.ts +25 -0
- package/dist/types/plugins/replication-mongodb/index.d.ts +22 -0
- package/dist/types/plugins/replication-mongodb/mongodb-checkpoint.d.ts +15 -0
- package/dist/types/plugins/replication-mongodb/mongodb-helper.d.ts +13 -0
- package/dist/types/plugins/replication-mongodb/mongodb-types.d.ts +33 -0
- package/dist/types/plugins/replication-nats/index.d.ts +16 -0
- package/dist/types/plugins/replication-nats/nats-helper.d.ts +2 -0
- package/dist/types/plugins/replication-nats/nats-types.d.ts +21 -0
- package/dist/types/plugins/replication-supabase/helper.d.ts +5 -0
- package/dist/types/plugins/replication-supabase/index.d.ts +14 -0
- package/dist/types/plugins/replication-supabase/types.d.ts +28 -0
- package/dist/types/plugins/replication-webrtc/connection-handler-p2pcf.d.ts +0 -0
- package/dist/types/plugins/replication-webrtc/connection-handler-simple-peer.d.ts +57 -0
- package/dist/types/plugins/replication-webrtc/connection-handler-webtorrent.d.ts +0 -0
- package/dist/types/plugins/replication-webrtc/index.d.ts +27 -0
- package/dist/types/plugins/replication-webrtc/signaling-server.d.ts +17 -0
- package/dist/types/plugins/replication-webrtc/webrtc-helper.d.ts +16 -0
- package/dist/types/plugins/replication-webrtc/webrtc-types.d.ts +51 -0
- package/dist/types/plugins/replication-websocket/index.d.ts +3 -0
- package/dist/types/plugins/replication-websocket/websocket-client.d.ts +13 -0
- package/dist/types/plugins/replication-websocket/websocket-server.d.ts +6 -0
- package/dist/types/plugins/replication-websocket/websocket-types.d.ts +32 -0
- package/dist/types/plugins/state/helpers.d.ts +10 -0
- package/dist/types/plugins/state/index.d.ts +4 -0
- package/dist/types/plugins/state/rx-state.d.ts +46 -0
- package/dist/types/plugins/state/types.d.ts +28 -0
- package/dist/types/plugins/storage-denokv/denokv-helper.d.ts +16 -0
- package/dist/types/plugins/storage-denokv/denokv-query.d.ts +3 -0
- package/dist/types/plugins/storage-denokv/denokv-types.d.ts +17 -0
- package/dist/types/plugins/storage-denokv/index.d.ts +11 -0
- package/dist/types/plugins/storage-denokv/rx-storage-instance-denokv.d.ts +41 -0
- package/dist/types/plugins/storage-dexie/dexie-helper.d.ts +40 -0
- package/dist/types/plugins/storage-dexie/dexie-query.d.ts +9 -0
- package/dist/types/plugins/storage-dexie/index.d.ts +4 -0
- package/dist/types/plugins/storage-dexie/rx-storage-dexie.d.ts +11 -0
- package/dist/types/plugins/storage-dexie/rx-storage-instance-dexie.d.ts +29 -0
- package/dist/types/plugins/storage-foundationdb/foundationdb-helpers.d.ts +3 -0
- package/dist/types/plugins/storage-foundationdb/foundationdb-query.d.ts +3 -0
- package/dist/types/plugins/storage-foundationdb/foundationdb-types.d.ts +46 -0
- package/dist/types/plugins/storage-foundationdb/index.d.ts +4 -0
- package/dist/types/plugins/storage-foundationdb/rx-storage-instance-foundationdb.d.ts +26 -0
- package/dist/types/plugins/storage-localstorage/index.d.ts +11 -0
- package/dist/types/plugins/storage-localstorage/localstorage-mock.d.ts +1 -0
- package/dist/types/plugins/storage-localstorage/rx-storage-instance-localstorage.d.ts +84 -0
- package/dist/types/plugins/storage-memory/binary-search-bounds.d.ts +14 -0
- package/dist/types/plugins/storage-memory/index.d.ts +7 -0
- package/dist/types/plugins/storage-memory/memory-helper.d.ts +22 -0
- package/dist/types/plugins/storage-memory/memory-indexes.d.ts +4 -0
- package/dist/types/plugins/storage-memory/memory-types.d.ts +72 -0
- package/dist/types/plugins/storage-memory/rx-storage-instance-memory.d.ts +47 -0
- package/dist/types/plugins/storage-mongodb/index.d.ts +4 -0
- package/dist/types/plugins/storage-mongodb/mongodb-helper.d.ts +22 -0
- package/dist/types/plugins/storage-mongodb/mongodb-types.d.ts +21 -0
- package/dist/types/plugins/storage-mongodb/rx-storage-instance-mongodb.d.ts +52 -0
- package/dist/types/plugins/storage-mongodb/rx-storage-mongodb.d.ts +11 -0
- package/dist/types/plugins/storage-remote/index.d.ts +5 -0
- package/dist/types/plugins/storage-remote/message-channel-cache.d.ts +13 -0
- package/dist/types/plugins/storage-remote/remote.d.ts +6 -0
- package/dist/types/plugins/storage-remote/rx-storage-remote.d.ts +43 -0
- package/dist/types/plugins/storage-remote/storage-remote-helpers.d.ts +4 -0
- package/dist/types/plugins/storage-remote/storage-remote-types.d.ts +88 -0
- package/dist/types/plugins/storage-remote-websocket/index.d.ts +4 -0
- package/dist/types/plugins/storage-remote-websocket/types.d.ts +24 -0
- package/dist/types/plugins/storage-sqlite/index.d.ts +15 -0
- package/dist/types/plugins/storage-sqlite/sqlite-basics-helpers.d.ts +53 -0
- package/dist/types/plugins/storage-sqlite/sqlite-helpers.d.ts +48 -0
- package/dist/types/plugins/storage-sqlite/sqlite-storage-instance.d.ts +38 -0
- package/dist/types/plugins/storage-sqlite/sqlite-types.d.ts +116 -0
- package/dist/types/plugins/test-utils/config.d.ts +16 -0
- package/dist/types/plugins/test-utils/humans-collection.d.ts +26 -0
- package/dist/types/plugins/test-utils/index.d.ts +20 -0
- package/dist/types/plugins/test-utils/performance.d.ts +68 -0
- package/dist/types/plugins/test-utils/replication-base-test-suite.d.ts +66 -0
- package/dist/types/plugins/test-utils/replication.d.ts +10 -0
- package/dist/types/plugins/test-utils/revisions.d.ts +4 -0
- package/dist/types/plugins/test-utils/schema-objects.d.ts +219 -0
- package/dist/types/plugins/test-utils/schemas.d.ts +356 -0
- package/dist/types/plugins/test-utils/test-util.d.ts +10 -0
- package/dist/types/plugins/update/index.d.ts +5 -0
- package/dist/types/plugins/update/mingo-updater.d.ts +2 -0
- package/dist/types/plugins/utils/index.d.ts +20 -0
- package/dist/types/plugins/utils/utils-array.d.ts +40 -0
- package/dist/types/plugins/utils/utils-base64.d.ts +15 -0
- package/dist/types/plugins/utils/utils-blob.d.ts +12 -0
- package/dist/types/plugins/utils/utils-document.d.ts +26 -0
- package/dist/types/plugins/utils/utils-error.d.ts +8 -0
- package/dist/types/plugins/utils/utils-global.d.ts +5 -0
- package/dist/types/plugins/utils/utils-hash.d.ts +4 -0
- package/dist/types/plugins/utils/utils-map.d.ts +2 -0
- package/dist/types/plugins/utils/utils-number.d.ts +7 -0
- package/dist/types/plugins/utils/utils-object-deep-equal.d.ts +7 -0
- package/dist/types/plugins/utils/utils-object-dot-prop.d.ts +14 -0
- package/dist/types/plugins/utils/utils-object.d.ts +61 -0
- package/dist/types/plugins/utils/utils-other.d.ts +20 -0
- package/dist/types/plugins/utils/utils-premium.d.ts +10 -0
- package/dist/types/plugins/utils/utils-promise.d.ts +43 -0
- package/dist/types/plugins/utils/utils-regex.d.ts +2 -0
- package/dist/types/plugins/utils/utils-revision.d.ts +22 -0
- package/dist/types/plugins/utils/utils-rxdb-version.d.ts +4 -0
- package/dist/types/plugins/utils/utils-rxdb-version.template.d.ts +4 -0
- package/dist/types/plugins/utils/utils-string.d.ts +35 -0
- package/dist/types/plugins/utils/utils-time.d.ts +5 -0
- package/dist/types/plugins/validate-ajv/index.d.ts +13 -0
- package/dist/types/plugins/validate-is-my-json-valid/index.d.ts +5 -0
- package/dist/types/plugins/validate-z-schema/index.d.ts +13 -0
- package/dist/types/plugins/vector/helper.d.ts +0 -0
- package/dist/types/plugins/vector/index.d.ts +2 -0
- package/dist/types/plugins/vector/types.d.ts +1 -0
- package/dist/types/plugins/vector/vector-distance.d.ts +13 -0
- package/dist/types/plugins/webmcp/index.d.ts +2 -0
- package/dist/types/plugins/webmcp/nosql-query-schema.d.ts +549 -0
- package/dist/types/plugins/webmcp/webmcp.d.ts +12 -0
- package/dist/types/query-cache.d.ts +35 -0
- package/dist/types/query-planner.d.ts +30 -0
- package/dist/types/replication-protocol/checkpoint.d.ts +8 -0
- package/dist/types/replication-protocol/conflicts.d.ts +10 -0
- package/dist/types/replication-protocol/default-conflict-handler.d.ts +2 -0
- package/dist/types/replication-protocol/downstream.d.ts +10 -0
- package/dist/types/replication-protocol/helper.d.ts +5 -0
- package/dist/types/replication-protocol/index.d.ts +30 -0
- package/dist/types/replication-protocol/meta-instance.d.ts +12 -0
- package/dist/types/replication-protocol/upstream.d.ts +10 -0
- package/dist/types/rx-change-event.d.ts +20 -0
- package/dist/types/rx-collection-helper.d.ts +41 -0
- package/dist/types/rx-collection.d.ts +185 -0
- package/dist/types/rx-database-internal-store.d.ts +37 -0
- package/dist/types/rx-database.d.ts +213 -0
- package/dist/types/rx-document-prototype-merge.d.ts +24 -0
- package/dist/types/rx-document.d.ts +274 -0
- package/dist/types/rx-error.d.ts +37 -0
- package/dist/types/rx-query-helper.d.ts +31 -0
- package/dist/types/rx-query-mingo.d.ts +10 -0
- package/dist/types/rx-query-single-result.d.ts +31 -0
- package/dist/types/rx-query.d.ts +153 -0
- package/dist/types/rx-schema-helper.d.ts +57 -0
- package/dist/types/rx-schema.d.ts +43 -0
- package/dist/types/rx-storage-helper.d.ts +111 -0
- package/dist/types/rx-storage-multiinstance.d.ts +51 -0
- package/dist/types/types/conflict-handling.d.ts +48 -0
- package/dist/types/types/couchdb.d.ts +293 -0
- package/dist/types/types/index.d.ts +32 -0
- package/dist/types/types/modules/index.d.ts +0 -0
- package/dist/types/types/modules/mocha.parallel.d.ts +1 -0
- package/dist/types/types/plugins/backup.d.ts +35 -0
- package/dist/types/types/plugins/cleanup.d.ts +38 -0
- package/dist/types/types/plugins/crdt.d.ts +76 -0
- package/dist/types/types/plugins/dexie.d.ts +30 -0
- package/dist/types/types/plugins/local-documents.d.ts +49 -0
- package/dist/types/types/plugins/migration.d.ts +14 -0
- package/dist/types/types/plugins/reactivity.d.ts +40 -0
- package/dist/types/types/plugins/replication-graphql.d.ts +98 -0
- package/dist/types/types/plugins/replication.d.ts +175 -0
- package/dist/types/types/plugins/state.d.ts +4 -0
- package/dist/types/types/plugins/update.d.ts +23 -0
- package/dist/types/types/plugins/webmcp.d.ts +40 -0
- package/dist/types/types/query-planner.d.ts +47 -0
- package/dist/types/types/replication-protocol.d.ts +296 -0
- package/dist/types/types/rx-attachment.d.ts +46 -0
- package/dist/types/types/rx-change-event.d.ts +85 -0
- package/dist/types/types/rx-collection.d.ts +117 -0
- package/dist/types/types/rx-database-internal-store.d.ts +54 -0
- package/dist/types/types/rx-database.d.ts +124 -0
- package/dist/types/types/rx-document.d.ts +160 -0
- package/dist/types/types/rx-error.d.ts +222 -0
- package/dist/types/types/rx-plugin.d.ts +167 -0
- package/dist/types/types/rx-query.d.ts +144 -0
- package/dist/types/types/rx-schema.d.ts +209 -0
- package/dist/types/types/rx-storage.d.ts +347 -0
- package/dist/types/types/rx-storage.interface.d.ts +312 -0
- package/dist/types/types/util.d.ts +180 -0
- package/eslint.config.mjs +514 -0
- package/package.json +729 -0
- package/plugins/attachments/index.cjs +2 -0
- package/plugins/attachments/index.d.cts +1 -0
- package/plugins/attachments/index.d.mts +1 -0
- package/plugins/attachments/index.mjs +1 -0
- package/plugins/attachments/index.ts +1 -0
- package/plugins/attachments/package.json +18 -0
- package/plugins/attachments-compression/index.cjs +2 -0
- package/plugins/attachments-compression/index.d.cts +1 -0
- package/plugins/attachments-compression/index.d.mts +1 -0
- package/plugins/attachments-compression/index.mjs +1 -0
- package/plugins/attachments-compression/index.ts +1 -0
- package/plugins/attachments-compression/package.json +18 -0
- package/plugins/backup/index.cjs +2 -0
- package/plugins/backup/index.d.cts +1 -0
- package/plugins/backup/index.d.mts +1 -0
- package/plugins/backup/index.mjs +1 -0
- package/plugins/backup/index.ts +1 -0
- package/plugins/backup/package.json +18 -0
- package/plugins/cleanup/index.cjs +2 -0
- package/plugins/cleanup/index.d.cts +1 -0
- package/plugins/cleanup/index.d.mts +1 -0
- package/plugins/cleanup/index.mjs +1 -0
- package/plugins/cleanup/index.ts +1 -0
- package/plugins/cleanup/package.json +18 -0
- package/plugins/core/index.cjs +2 -0
- package/plugins/core/index.d.cts +1 -0
- package/plugins/core/index.d.mts +1 -0
- package/plugins/core/index.mjs +1 -0
- package/plugins/core/index.ts +1 -0
- package/plugins/core/package.json +18 -0
- package/plugins/crdt/index.cjs +2 -0
- package/plugins/crdt/index.d.cts +1 -0
- package/plugins/crdt/index.d.mts +1 -0
- package/plugins/crdt/index.mjs +1 -0
- package/plugins/crdt/index.ts +1 -0
- package/plugins/crdt/package.json +18 -0
- package/plugins/dev-mode/index.cjs +2 -0
- package/plugins/dev-mode/index.d.cts +1 -0
- package/plugins/dev-mode/index.d.mts +1 -0
- package/plugins/dev-mode/index.mjs +1 -0
- package/plugins/dev-mode/index.ts +1 -0
- package/plugins/dev-mode/package.json +18 -0
- package/plugins/electron/index.cjs +2 -0
- package/plugins/electron/index.d.cts +1 -0
- package/plugins/electron/index.d.mts +1 -0
- package/plugins/electron/index.mjs +1 -0
- package/plugins/electron/index.ts +1 -0
- package/plugins/electron/package.json +18 -0
- package/plugins/encryption-crypto-js/index.cjs +2 -0
- package/plugins/encryption-crypto-js/index.d.cts +1 -0
- package/plugins/encryption-crypto-js/index.d.mts +1 -0
- package/plugins/encryption-crypto-js/index.mjs +1 -0
- package/plugins/encryption-crypto-js/index.ts +1 -0
- package/plugins/encryption-crypto-js/package.json +18 -0
- package/plugins/flutter/index.cjs +2 -0
- package/plugins/flutter/index.d.cts +1 -0
- package/plugins/flutter/index.d.mts +1 -0
- package/plugins/flutter/index.mjs +1 -0
- package/plugins/flutter/index.ts +1 -0
- package/plugins/flutter/package.json +18 -0
- package/plugins/json-dump/index.cjs +2 -0
- package/plugins/json-dump/index.d.cts +1 -0
- package/plugins/json-dump/index.d.mts +1 -0
- package/plugins/json-dump/index.mjs +1 -0
- package/plugins/json-dump/index.ts +1 -0
- package/plugins/json-dump/package.json +18 -0
- package/plugins/key-compression/index.cjs +2 -0
- package/plugins/key-compression/index.d.cts +1 -0
- package/plugins/key-compression/index.d.mts +1 -0
- package/plugins/key-compression/index.mjs +1 -0
- package/plugins/key-compression/index.ts +1 -0
- package/plugins/key-compression/package.json +18 -0
- package/plugins/leader-election/index.cjs +2 -0
- package/plugins/leader-election/index.d.cts +1 -0
- package/plugins/leader-election/index.d.mts +1 -0
- package/plugins/leader-election/index.mjs +1 -0
- package/plugins/leader-election/index.ts +1 -0
- package/plugins/leader-election/package.json +18 -0
- package/plugins/local-documents/index.cjs +2 -0
- package/plugins/local-documents/index.d.cts +1 -0
- package/plugins/local-documents/index.d.mts +1 -0
- package/plugins/local-documents/index.mjs +1 -0
- package/plugins/local-documents/index.ts +1 -0
- package/plugins/local-documents/package.json +18 -0
- package/plugins/migration-schema/index.cjs +2 -0
- package/plugins/migration-schema/index.d.cts +1 -0
- package/plugins/migration-schema/index.d.mts +1 -0
- package/plugins/migration-schema/index.mjs +1 -0
- package/plugins/migration-schema/index.ts +1 -0
- package/plugins/migration-schema/package.json +18 -0
- package/plugins/migration-storage/index.cjs +2 -0
- package/plugins/migration-storage/index.d.cts +1 -0
- package/plugins/migration-storage/index.d.mts +1 -0
- package/plugins/migration-storage/index.mjs +1 -0
- package/plugins/migration-storage/index.ts +1 -0
- package/plugins/migration-storage/package.json +18 -0
- package/plugins/pipeline/index.cjs +2 -0
- package/plugins/pipeline/index.d.cts +1 -0
- package/plugins/pipeline/index.d.mts +1 -0
- package/plugins/pipeline/index.mjs +1 -0
- package/plugins/pipeline/index.ts +1 -0
- package/plugins/pipeline/package.json +18 -0
- package/plugins/query-builder/index.cjs +2 -0
- package/plugins/query-builder/index.d.cts +1 -0
- package/plugins/query-builder/index.d.mts +1 -0
- package/plugins/query-builder/index.mjs +1 -0
- package/plugins/query-builder/index.ts +1 -0
- package/plugins/query-builder/package.json +18 -0
- package/plugins/react/index.cjs +2 -0
- package/plugins/react/index.d.cts +1 -0
- package/plugins/react/index.d.mts +1 -0
- package/plugins/react/index.mjs +1 -0
- package/plugins/react/index.ts +1 -0
- package/plugins/react/package.json +18 -0
- package/plugins/reactivity-angular/index.cjs +2 -0
- package/plugins/reactivity-angular/index.d.cts +1 -0
- package/plugins/reactivity-angular/index.d.mts +1 -0
- package/plugins/reactivity-angular/index.mjs +1 -0
- package/plugins/reactivity-angular/index.ts +1 -0
- package/plugins/reactivity-angular/package.json +18 -0
- package/plugins/reactivity-preact-signals/index.cjs +2 -0
- package/plugins/reactivity-preact-signals/index.d.cts +1 -0
- package/plugins/reactivity-preact-signals/index.d.mts +1 -0
- package/plugins/reactivity-preact-signals/index.mjs +1 -0
- package/plugins/reactivity-preact-signals/index.ts +1 -0
- package/plugins/reactivity-preact-signals/package.json +18 -0
- package/plugins/reactivity-vue/index.cjs +2 -0
- package/plugins/reactivity-vue/index.d.cts +1 -0
- package/plugins/reactivity-vue/index.d.mts +1 -0
- package/plugins/reactivity-vue/index.mjs +1 -0
- package/plugins/reactivity-vue/index.ts +1 -0
- package/plugins/reactivity-vue/package.json +18 -0
- package/plugins/replication/index.cjs +2 -0
- package/plugins/replication/index.d.cts +1 -0
- package/plugins/replication/index.d.mts +1 -0
- package/plugins/replication/index.mjs +1 -0
- package/plugins/replication/index.ts +1 -0
- package/plugins/replication/package.json +18 -0
- package/plugins/replication-appwrite/index.cjs +2 -0
- package/plugins/replication-appwrite/index.d.cts +1 -0
- package/plugins/replication-appwrite/index.d.mts +1 -0
- package/plugins/replication-appwrite/index.mjs +1 -0
- package/plugins/replication-appwrite/index.ts +1 -0
- package/plugins/replication-appwrite/package.json +18 -0
- package/plugins/replication-couchdb/index.cjs +2 -0
- package/plugins/replication-couchdb/index.d.cts +1 -0
- package/plugins/replication-couchdb/index.d.mts +1 -0
- package/plugins/replication-couchdb/index.mjs +1 -0
- package/plugins/replication-couchdb/index.ts +1 -0
- package/plugins/replication-couchdb/package.json +18 -0
- package/plugins/replication-firestore/index.cjs +2 -0
- package/plugins/replication-firestore/index.d.cts +1 -0
- package/plugins/replication-firestore/index.d.mts +1 -0
- package/plugins/replication-firestore/index.mjs +1 -0
- package/plugins/replication-firestore/index.ts +1 -0
- package/plugins/replication-firestore/package.json +18 -0
- package/plugins/replication-google-drive/index.cjs +2 -0
- package/plugins/replication-google-drive/index.d.cts +1 -0
- package/plugins/replication-google-drive/index.d.mts +1 -0
- package/plugins/replication-google-drive/index.mjs +1 -0
- package/plugins/replication-google-drive/index.ts +1 -0
- package/plugins/replication-google-drive/package.json +18 -0
- package/plugins/replication-graphql/index.cjs +2 -0
- package/plugins/replication-graphql/index.d.cts +1 -0
- package/plugins/replication-graphql/index.d.mts +1 -0
- package/plugins/replication-graphql/index.mjs +1 -0
- package/plugins/replication-graphql/index.ts +1 -0
- package/plugins/replication-graphql/package.json +18 -0
- package/plugins/replication-microsoft-onedrive/index.cjs +2 -0
- package/plugins/replication-microsoft-onedrive/index.d.cts +1 -0
- package/plugins/replication-microsoft-onedrive/index.d.mts +1 -0
- package/plugins/replication-microsoft-onedrive/index.mjs +1 -0
- package/plugins/replication-microsoft-onedrive/index.ts +1 -0
- package/plugins/replication-microsoft-onedrive/package.json +18 -0
- package/plugins/replication-mongodb/index.cjs +2 -0
- package/plugins/replication-mongodb/index.d.cts +1 -0
- package/plugins/replication-mongodb/index.d.mts +1 -0
- package/plugins/replication-mongodb/index.mjs +1 -0
- package/plugins/replication-mongodb/index.ts +1 -0
- package/plugins/replication-mongodb/package.json +18 -0
- package/plugins/replication-nats/index.cjs +2 -0
- package/plugins/replication-nats/index.d.cts +1 -0
- package/plugins/replication-nats/index.d.mts +1 -0
- package/plugins/replication-nats/index.mjs +1 -0
- package/plugins/replication-nats/index.ts +1 -0
- package/plugins/replication-nats/package.json +18 -0
- package/plugins/replication-supabase/index.cjs +2 -0
- package/plugins/replication-supabase/index.d.cts +1 -0
- package/plugins/replication-supabase/index.d.mts +1 -0
- package/plugins/replication-supabase/index.mjs +1 -0
- package/plugins/replication-supabase/index.ts +1 -0
- package/plugins/replication-supabase/package.json +18 -0
- package/plugins/replication-webrtc/index.cjs +2 -0
- package/plugins/replication-webrtc/index.d.cts +1 -0
- package/plugins/replication-webrtc/index.d.mts +1 -0
- package/plugins/replication-webrtc/index.mjs +1 -0
- package/plugins/replication-webrtc/index.ts +1 -0
- package/plugins/replication-webrtc/package.json +18 -0
- package/plugins/replication-websocket/index.cjs +2 -0
- package/plugins/replication-websocket/index.d.cts +1 -0
- package/plugins/replication-websocket/index.d.mts +1 -0
- package/plugins/replication-websocket/index.mjs +1 -0
- package/plugins/replication-websocket/index.ts +1 -0
- package/plugins/replication-websocket/package.json +18 -0
- package/plugins/state/index.cjs +2 -0
- package/plugins/state/index.d.cts +1 -0
- package/plugins/state/index.d.mts +1 -0
- package/plugins/state/index.mjs +1 -0
- package/plugins/state/index.ts +1 -0
- package/plugins/state/package.json +18 -0
- package/plugins/storage-denokv/index.cjs +2 -0
- package/plugins/storage-denokv/index.d.cts +1 -0
- package/plugins/storage-denokv/index.d.mts +1 -0
- package/plugins/storage-denokv/index.mjs +1 -0
- package/plugins/storage-denokv/index.ts +1 -0
- package/plugins/storage-denokv/package.json +18 -0
- package/plugins/storage-dexie/index.cjs +2 -0
- package/plugins/storage-dexie/index.d.cts +1 -0
- package/plugins/storage-dexie/index.d.mts +1 -0
- package/plugins/storage-dexie/index.mjs +1 -0
- package/plugins/storage-dexie/index.ts +1 -0
- package/plugins/storage-dexie/package.json +18 -0
- package/plugins/storage-foundationdb/index.cjs +2 -0
- package/plugins/storage-foundationdb/index.d.cts +1 -0
- package/plugins/storage-foundationdb/index.d.mts +1 -0
- package/plugins/storage-foundationdb/index.mjs +1 -0
- package/plugins/storage-foundationdb/index.ts +1 -0
- package/plugins/storage-foundationdb/package.json +18 -0
- package/plugins/storage-localstorage/index.cjs +2 -0
- package/plugins/storage-localstorage/index.d.cts +1 -0
- package/plugins/storage-localstorage/index.d.mts +1 -0
- package/plugins/storage-localstorage/index.mjs +1 -0
- package/plugins/storage-localstorage/index.ts +1 -0
- package/plugins/storage-localstorage/package.json +18 -0
- package/plugins/storage-memory/index.cjs +2 -0
- package/plugins/storage-memory/index.d.cts +1 -0
- package/plugins/storage-memory/index.d.mts +1 -0
- package/plugins/storage-memory/index.mjs +1 -0
- package/plugins/storage-memory/index.ts +1 -0
- package/plugins/storage-memory/package.json +18 -0
- package/plugins/storage-mongodb/index.cjs +2 -0
- package/plugins/storage-mongodb/index.d.cts +1 -0
- package/plugins/storage-mongodb/index.d.mts +1 -0
- package/plugins/storage-mongodb/index.mjs +1 -0
- package/plugins/storage-mongodb/index.ts +1 -0
- package/plugins/storage-mongodb/package.json +18 -0
- package/plugins/storage-remote/index.cjs +2 -0
- package/plugins/storage-remote/index.d.cts +1 -0
- package/plugins/storage-remote/index.d.mts +1 -0
- package/plugins/storage-remote/index.mjs +1 -0
- package/plugins/storage-remote/index.ts +1 -0
- package/plugins/storage-remote/package.json +18 -0
- package/plugins/storage-remote-websocket/index.cjs +2 -0
- package/plugins/storage-remote-websocket/index.d.cts +1 -0
- package/plugins/storage-remote-websocket/index.d.mts +1 -0
- package/plugins/storage-remote-websocket/index.mjs +1 -0
- package/plugins/storage-remote-websocket/index.ts +1 -0
- package/plugins/storage-remote-websocket/package.json +18 -0
- package/plugins/storage-sqlite/index.cjs +2 -0
- package/plugins/storage-sqlite/index.d.cts +1 -0
- package/plugins/storage-sqlite/index.d.mts +1 -0
- package/plugins/storage-sqlite/index.mjs +1 -0
- package/plugins/storage-sqlite/index.ts +1 -0
- package/plugins/storage-sqlite/package.json +18 -0
- package/plugins/test-utils/index.cjs +2 -0
- package/plugins/test-utils/index.d.cts +1 -0
- package/plugins/test-utils/index.d.mts +1 -0
- package/plugins/test-utils/index.mjs +1 -0
- package/plugins/test-utils/index.ts +1 -0
- package/plugins/test-utils/package.json +18 -0
- package/plugins/update/index.cjs +2 -0
- package/plugins/update/index.d.cts +1 -0
- package/plugins/update/index.d.mts +1 -0
- package/plugins/update/index.mjs +1 -0
- package/plugins/update/index.ts +1 -0
- package/plugins/update/package.json +18 -0
- package/plugins/utils/index.cjs +2 -0
- package/plugins/utils/index.d.cts +1 -0
- package/plugins/utils/index.d.mts +1 -0
- package/plugins/utils/index.mjs +1 -0
- package/plugins/utils/index.ts +1 -0
- package/plugins/utils/package.json +18 -0
- package/plugins/validate-ajv/index.cjs +2 -0
- package/plugins/validate-ajv/index.d.cts +1 -0
- package/plugins/validate-ajv/index.d.mts +1 -0
- package/plugins/validate-ajv/index.mjs +1 -0
- package/plugins/validate-ajv/index.ts +1 -0
- package/plugins/validate-ajv/package.json +18 -0
- package/plugins/validate-is-my-json-valid/index.cjs +2 -0
- package/plugins/validate-is-my-json-valid/index.d.cts +1 -0
- package/plugins/validate-is-my-json-valid/index.d.mts +1 -0
- package/plugins/validate-is-my-json-valid/index.mjs +1 -0
- package/plugins/validate-is-my-json-valid/index.ts +1 -0
- package/plugins/validate-is-my-json-valid/package.json +18 -0
- package/plugins/validate-z-schema/index.cjs +2 -0
- package/plugins/validate-z-schema/index.d.cts +1 -0
- package/plugins/validate-z-schema/index.d.mts +1 -0
- package/plugins/validate-z-schema/index.mjs +1 -0
- package/plugins/validate-z-schema/index.ts +1 -0
- package/plugins/validate-z-schema/package.json +18 -0
- package/plugins/vector/index.cjs +2 -0
- package/plugins/vector/index.d.cts +1 -0
- package/plugins/vector/index.d.mts +1 -0
- package/plugins/vector/index.mjs +1 -0
- package/plugins/vector/index.ts +1 -0
- package/plugins/vector/package.json +18 -0
- package/plugins/webmcp/index.cjs +2 -0
- package/plugins/webmcp/index.d.cts +1 -0
- package/plugins/webmcp/index.d.mts +1 -0
- package/plugins/webmcp/index.mjs +1 -0
- package/plugins/webmcp/index.ts +1 -0
- package/plugins/webmcp/package.json +18 -0
- package/scripts/acme-challenge/.gittouch +0 -0
- package/scripts/ai-context-generator.mjs +63 -0
- package/scripts/cloud-signaling-script.sh +6 -0
- package/scripts/docs-remove-time.mjs +55 -0
- package/scripts/fix-types.mjs +23 -0
- package/scripts/generate-all-headers.ts +102 -0
- package/scripts/generate-error-messages.mjs +41 -0
- package/scripts/generate-header.ts +226 -0
- package/scripts/generate-plugins-package-json.mjs +133 -0
- package/scripts/install-foundationdb.sh +14 -0
- package/scripts/module_package.json +1 -0
- package/scripts/module_package_no_side.json +1 -0
- package/scripts/postinstall.js +33 -0
- package/scripts/profile.mjs +31 -0
- package/scripts/set-version.mjs +162 -0
- package/scripts/start-cloud-signaling-server.mjs +120 -0
- package/scripts/transpile.mjs +229 -0
- package/scripts/update-version-variable.mjs +49 -0
- package/src/change-event-buffer.ts +171 -0
- package/src/custom-index.ts +376 -0
- package/src/doc-cache.ts +294 -0
- package/src/event-reduce.ts +159 -0
- package/src/hooks.ts +128 -0
- package/src/incremental-write.ts +227 -0
- package/src/index.ts +30 -0
- package/src/overwritable.ts +41 -0
- package/src/plugin-helpers.ts +319 -0
- package/src/plugin.ts +113 -0
- package/src/plugins/attachments/attachments-utils.ts +84 -0
- package/src/plugins/attachments/index.ts +316 -0
- package/src/plugins/attachments-compression/index.ts +221 -0
- package/src/plugins/backup/file-util.ts +132 -0
- package/src/plugins/backup/index.ts +281 -0
- package/src/plugins/cleanup/cleanup-helper.ts +11 -0
- package/src/plugins/cleanup/cleanup-state.ts +92 -0
- package/src/plugins/cleanup/cleanup.ts +140 -0
- package/src/plugins/cleanup/index.ts +45 -0
- package/src/plugins/crdt/index.ts +505 -0
- package/src/plugins/dev-mode/check-document.ts +176 -0
- package/src/plugins/dev-mode/check-migration-strategies.ts +53 -0
- package/src/plugins/dev-mode/check-orm.ts +65 -0
- package/src/plugins/dev-mode/check-query.ts +231 -0
- package/src/plugins/dev-mode/check-schema.ts +564 -0
- package/src/plugins/dev-mode/dev-mode-tracking.ts +125 -0
- package/src/plugins/dev-mode/entity-properties.ts +56 -0
- package/src/plugins/dev-mode/error-messages.ts +1331 -0
- package/src/plugins/dev-mode/index.ts +203 -0
- package/src/plugins/dev-mode/unallowed-properties.ts +96 -0
- package/src/plugins/electron/electron-helper.ts +2 -0
- package/src/plugins/electron/index.ts +3 -0
- package/src/plugins/electron/rx-storage-ipc-main.ts +58 -0
- package/src/plugins/electron/rx-storage-ipc-renderer.ts +62 -0
- package/src/plugins/encryption-crypto-js/index.ts +220 -0
- package/src/plugins/flutter/dart/analysis_options.yaml +30 -0
- package/src/plugins/flutter/dart/example/rxdb_example.dart +6 -0
- package/src/plugins/flutter/dart/lib/rxdb.dart +7 -0
- package/src/plugins/flutter/dart/lib/src/rxdb_base.dart +332 -0
- package/src/plugins/flutter/dart/pubspec.yaml +15 -0
- package/src/plugins/flutter/index.ts +65 -0
- package/src/plugins/json-dump/index.ts +146 -0
- package/src/plugins/key-compression/index.ts +238 -0
- package/src/plugins/leader-election/index.ts +129 -0
- package/src/plugins/local-documents/index.ts +95 -0
- package/src/plugins/local-documents/local-documents-helper.ts +103 -0
- package/src/plugins/local-documents/local-documents.ts +146 -0
- package/src/plugins/local-documents/rx-local-document.ts +388 -0
- package/src/plugins/migration-schema/index.ts +75 -0
- package/src/plugins/migration-schema/migration-helpers.ts +162 -0
- package/src/plugins/migration-schema/migration-types.ts +42 -0
- package/src/plugins/migration-schema/rx-migration-state.ts +632 -0
- package/src/plugins/migration-storage/index.ts +255 -0
- package/src/plugins/pipeline/flagged-functions.ts +131 -0
- package/src/plugins/pipeline/index.ts +18 -0
- package/src/plugins/pipeline/rx-pipeline.ts +303 -0
- package/src/plugins/pipeline/types.ts +28 -0
- package/src/plugins/query-builder/index.ts +81 -0
- package/src/plugins/query-builder/mquery/README.md +5 -0
- package/src/plugins/query-builder/mquery/mquery-utils.ts +37 -0
- package/src/plugins/query-builder/mquery/nosql-query-builder.ts +578 -0
- package/src/plugins/react/database-context.ts +10 -0
- package/src/plugins/react/database-provider.tsx +38 -0
- package/src/plugins/react/hooks/index.ts +4 -0
- package/src/plugins/react/hooks/use-live-rx-query.ts +34 -0
- package/src/plugins/react/hooks/use-rx-collection.ts +73 -0
- package/src/plugins/react/hooks/use-rx-database.ts +35 -0
- package/src/plugins/react/hooks/use-rx-query.ts +168 -0
- package/src/plugins/react/index.ts +2 -0
- package/src/plugins/reactivity-angular/index.ts +32 -0
- package/src/plugins/reactivity-preact-signals/index.ts +85 -0
- package/src/plugins/reactivity-vue/index.ts +43 -0
- package/src/plugins/replication/index.ts +668 -0
- package/src/plugins/replication/replication-helper.ts +122 -0
- package/src/plugins/replication-appwrite/appwrite-helpers.ts +38 -0
- package/src/plugins/replication-appwrite/appwrite-types.ts +31 -0
- package/src/plugins/replication-appwrite/index.ts +269 -0
- package/src/plugins/replication-couchdb/couchdb-helper.ts +100 -0
- package/src/plugins/replication-couchdb/couchdb-types.ts +34 -0
- package/src/plugins/replication-couchdb/index.ts +341 -0
- package/src/plugins/replication-firestore/firestore-helper.ts +79 -0
- package/src/plugins/replication-firestore/firestore-types.ts +72 -0
- package/src/plugins/replication-firestore/index.ts +387 -0
- package/src/plugins/replication-google-drive/AGENTS.md +5 -0
- package/src/plugins/replication-google-drive/document-handling.ts +203 -0
- package/src/plugins/replication-google-drive/download-specs.sh +49 -0
- package/src/plugins/replication-google-drive/downstream.ts +118 -0
- package/src/plugins/replication-google-drive/google-drive-helper.ts +467 -0
- package/src/plugins/replication-google-drive/google-drive-types.ts +84 -0
- package/src/plugins/replication-google-drive/index.ts +221 -0
- package/src/plugins/replication-google-drive/init.ts +108 -0
- package/src/plugins/replication-google-drive/multipart.ts +86 -0
- package/src/plugins/replication-google-drive/signaling.ts +399 -0
- package/src/plugins/replication-google-drive/transaction.ts +222 -0
- package/src/plugins/replication-google-drive/upstream.ts +279 -0
- package/src/plugins/replication-graphql/graphql-schema-from-rx-schema.ts +337 -0
- package/src/plugins/replication-graphql/graphql-websocket.ts +56 -0
- package/src/plugins/replication-graphql/helper.ts +52 -0
- package/src/plugins/replication-graphql/index.ts +255 -0
- package/src/plugins/replication-graphql/query-builder-from-rx-schema.ts +195 -0
- package/src/plugins/replication-microsoft-onedrive/document-handling.ts +216 -0
- package/src/plugins/replication-microsoft-onedrive/downstream.ts +121 -0
- package/src/plugins/replication-microsoft-onedrive/index.ts +220 -0
- package/src/plugins/replication-microsoft-onedrive/init.ts +107 -0
- package/src/plugins/replication-microsoft-onedrive/microsoft-onedrive-helper.ts +355 -0
- package/src/plugins/replication-microsoft-onedrive/microsoft-onedrive-types.ts +88 -0
- package/src/plugins/replication-microsoft-onedrive/signaling.ts +333 -0
- package/src/plugins/replication-microsoft-onedrive/transaction.ts +220 -0
- package/src/plugins/replication-microsoft-onedrive/upstream.ts +282 -0
- package/src/plugins/replication-mongodb/index.ts +275 -0
- package/src/plugins/replication-mongodb/mongodb-checkpoint.ts +184 -0
- package/src/plugins/replication-mongodb/mongodb-helper.ts +69 -0
- package/src/plugins/replication-mongodb/mongodb-types.ts +50 -0
- package/src/plugins/replication-nats/index.ts +289 -0
- package/src/plugins/replication-nats/nats-helper.ts +15 -0
- package/src/plugins/replication-nats/nats-types.ts +43 -0
- package/src/plugins/replication-supabase/helper.ts +63 -0
- package/src/plugins/replication-supabase/index.ts +308 -0
- package/src/plugins/replication-supabase/types.ts +47 -0
- package/src/plugins/replication-webrtc/connection-handler-p2pcf.ts +77 -0
- package/src/plugins/replication-webrtc/connection-handler-simple-peer.ts +302 -0
- package/src/plugins/replication-webrtc/connection-handler-webtorrent.ts +137 -0
- package/src/plugins/replication-webrtc/index.ts +307 -0
- package/src/plugins/replication-webrtc/signaling-server.ts +193 -0
- package/src/plugins/replication-webrtc/webrtc-helper.ts +55 -0
- package/src/plugins/replication-webrtc/webrtc-types.ts +91 -0
- package/src/plugins/replication-websocket/index.ts +3 -0
- package/src/plugins/replication-websocket/websocket-client.ts +187 -0
- package/src/plugins/replication-websocket/websocket-server.ts +135 -0
- package/src/plugins/replication-websocket/websocket-types.ts +47 -0
- package/src/plugins/state/helpers.ts +86 -0
- package/src/plugins/state/index.ts +40 -0
- package/src/plugins/state/rx-state.ts +386 -0
- package/src/plugins/state/types.ts +32 -0
- package/src/plugins/storage-denokv/denokv-helper.ts +46 -0
- package/src/plugins/storage-denokv/denokv-query.ts +135 -0
- package/src/plugins/storage-denokv/denokv-types.ts +19 -0
- package/src/plugins/storage-denokv/index.ts +37 -0
- package/src/plugins/storage-denokv/rx-storage-instance-denokv.ts +426 -0
- package/src/plugins/storage-dexie/dexie-helper.ts +302 -0
- package/src/plugins/storage-dexie/dexie-query.ts +252 -0
- package/src/plugins/storage-dexie/index.ts +4 -0
- package/src/plugins/storage-dexie/rx-storage-dexie.ts +62 -0
- package/src/plugins/storage-dexie/rx-storage-instance-dexie.ts +378 -0
- package/src/plugins/storage-foundationdb/foundationdb-helpers.ts +6 -0
- package/src/plugins/storage-foundationdb/foundationdb-query.ts +140 -0
- package/src/plugins/storage-foundationdb/foundationdb-types.ts +64 -0
- package/src/plugins/storage-foundationdb/index.ts +57 -0
- package/src/plugins/storage-foundationdb/rx-storage-instance-foundationdb.ts +449 -0
- package/src/plugins/storage-localstorage/index.ts +44 -0
- package/src/plugins/storage-localstorage/localstorage-mock.ts +32 -0
- package/src/plugins/storage-localstorage/rx-storage-instance-localstorage.ts +686 -0
- package/src/plugins/storage-memory/binary-search-bounds.ts +106 -0
- package/src/plugins/storage-memory/index.ts +52 -0
- package/src/plugins/storage-memory/memory-helper.ts +259 -0
- package/src/plugins/storage-memory/memory-indexes.ts +34 -0
- package/src/plugins/storage-memory/memory-types.ts +90 -0
- package/src/plugins/storage-memory/rx-storage-instance-memory.ts +609 -0
- package/src/plugins/storage-mongodb/index.ts +4 -0
- package/src/plugins/storage-mongodb/mongodb-helper.ts +119 -0
- package/src/plugins/storage-mongodb/mongodb-types.ts +32 -0
- package/src/plugins/storage-mongodb/rx-storage-instance-mongodb.ts +464 -0
- package/src/plugins/storage-mongodb/rx-storage-mongodb.ts +33 -0
- package/src/plugins/storage-remote/index.ts +5 -0
- package/src/plugins/storage-remote/message-channel-cache.ts +88 -0
- package/src/plugins/storage-remote/remote.ts +285 -0
- package/src/plugins/storage-remote/rx-storage-remote.ts +286 -0
- package/src/plugins/storage-remote/storage-remote-helpers.ts +33 -0
- package/src/plugins/storage-remote/storage-remote-types.ts +118 -0
- package/src/plugins/storage-remote-websocket/index.ts +218 -0
- package/src/plugins/storage-remote-websocket/types.ts +34 -0
- package/src/plugins/storage-sqlite/index.ts +64 -0
- package/src/plugins/storage-sqlite/sqlite-basics-helpers.ts +656 -0
- package/src/plugins/storage-sqlite/sqlite-helpers.ts +287 -0
- package/src/plugins/storage-sqlite/sqlite-storage-instance.ts +507 -0
- package/src/plugins/storage-sqlite/sqlite-types.ts +151 -0
- package/src/plugins/test-utils/config.ts +135 -0
- package/src/plugins/test-utils/humans-collection.ts +557 -0
- package/src/plugins/test-utils/index.ts +24 -0
- package/src/plugins/test-utils/performance.ts +344 -0
- package/src/plugins/test-utils/replication-base-test-suite.ts +236 -0
- package/src/plugins/test-utils/replication.ts +95 -0
- package/src/plugins/test-utils/revisions.ts +4 -0
- package/src/plugins/test-utils/schema-objects.ts +527 -0
- package/src/plugins/test-utils/schemas.ts +1391 -0
- package/src/plugins/test-utils/test-util.ts +85 -0
- package/src/plugins/update/index.ts +57 -0
- package/src/plugins/update/mingo-updater.ts +26 -0
- package/src/plugins/utils/index.ts +20 -0
- package/src/plugins/utils/utils-array.ts +152 -0
- package/src/plugins/utils/utils-base64.ts +49 -0
- package/src/plugins/utils/utils-blob.ts +65 -0
- package/src/plugins/utils/utils-document.ts +117 -0
- package/src/plugins/utils/utils-error.ts +53 -0
- package/src/plugins/utils/utils-global.ts +5 -0
- package/src/plugins/utils/utils-hash.ts +62 -0
- package/src/plugins/utils/utils-map.ts +23 -0
- package/src/plugins/utils/utils-number.ts +9 -0
- package/src/plugins/utils/utils-object-deep-equal.ts +46 -0
- package/src/plugins/utils/utils-object-dot-prop.ts +365 -0
- package/src/plugins/utils/utils-object.ts +272 -0
- package/src/plugins/utils/utils-other.ts +58 -0
- package/src/plugins/utils/utils-premium.ts +37 -0
- package/src/plugins/utils/utils-promise.ts +171 -0
- package/src/plugins/utils/utils-regex.ts +2 -0
- package/src/plugins/utils/utils-revision.ts +55 -0
- package/src/plugins/utils/utils-rxdb-version.template.ts +4 -0
- package/src/plugins/utils/utils-rxdb-version.ts +4 -0
- package/src/plugins/utils/utils-string.ts +91 -0
- package/src/plugins/utils/utils-time.ts +37 -0
- package/src/plugins/validate-ajv/index.ts +61 -0
- package/src/plugins/validate-is-my-json-valid/index.ts +30 -0
- package/src/plugins/validate-z-schema/index.ts +58 -0
- package/src/plugins/vector/helper.ts +0 -0
- package/src/plugins/vector/index.ts +2 -0
- package/src/plugins/vector/types.ts +1 -0
- package/src/plugins/vector/vector-distance.ts +34 -0
- package/src/plugins/webmcp/index.ts +2 -0
- package/src/plugins/webmcp/nosql-query-schema.ts +299 -0
- package/src/plugins/webmcp/webmcp.ts +319 -0
- package/src/query-cache.ts +139 -0
- package/src/query-planner.ts +386 -0
- package/src/replication-protocol/checkpoint.ts +154 -0
- package/src/replication-protocol/conflicts.ts +53 -0
- package/src/replication-protocol/default-conflict-handler.ts +43 -0
- package/src/replication-protocol/downstream.ts +550 -0
- package/src/replication-protocol/helper.ts +96 -0
- package/src/replication-protocol/index.ts +348 -0
- package/src/replication-protocol/meta-instance.ts +195 -0
- package/src/replication-protocol/upstream.ts +560 -0
- package/src/rx-change-event.ts +137 -0
- package/src/rx-collection-helper.ts +262 -0
- package/src/rx-collection.ts +1306 -0
- package/src/rx-database-internal-store.ts +402 -0
- package/src/rx-database.ts +919 -0
- package/src/rx-document-prototype-merge.ts +124 -0
- package/src/rx-document.ts +557 -0
- package/src/rx-error.ts +190 -0
- package/src/rx-query-helper.ts +317 -0
- package/src/rx-query-mingo.ts +87 -0
- package/src/rx-query-single-result.ts +110 -0
- package/src/rx-query.ts +887 -0
- package/src/rx-schema-helper.ts +391 -0
- package/src/rx-schema.ts +247 -0
- package/src/rx-storage-helper.ts +1050 -0
- package/src/rx-storage-multiinstance.ts +188 -0
- package/src/types/conflict-handling.d.ts +48 -0
- package/src/types/couchdb.d.ts +293 -0
- package/src/types/index.d.ts +32 -0
- package/src/types/modules/index.d.ts +0 -0
- package/src/types/modules/mocha.parallel.d.ts +1 -0
- package/src/types/plugins/backup.d.ts +35 -0
- package/src/types/plugins/cleanup.d.ts +38 -0
- package/src/types/plugins/crdt.d.ts +76 -0
- package/src/types/plugins/dexie.d.ts +30 -0
- package/src/types/plugins/local-documents.d.ts +49 -0
- package/src/types/plugins/migration.d.ts +14 -0
- package/src/types/plugins/reactivity.d.ts +40 -0
- package/src/types/plugins/replication-graphql.d.ts +98 -0
- package/src/types/plugins/replication.d.ts +175 -0
- package/src/types/plugins/state.d.ts +4 -0
- package/src/types/plugins/update.d.ts +23 -0
- package/src/types/plugins/webmcp.d.ts +40 -0
- package/src/types/query-planner.d.ts +47 -0
- package/src/types/replication-protocol.d.ts +296 -0
- package/src/types/rx-attachment.d.ts +46 -0
- package/src/types/rx-change-event.d.ts +85 -0
- package/src/types/rx-collection.d.ts +117 -0
- package/src/types/rx-database-internal-store.d.ts +54 -0
- package/src/types/rx-database.d.ts +124 -0
- package/src/types/rx-document.d.ts +160 -0
- package/src/types/rx-error.d.ts +222 -0
- package/src/types/rx-plugin.d.ts +167 -0
- package/src/types/rx-query.d.ts +144 -0
- package/src/types/rx-schema.d.ts +209 -0
- package/src/types/rx-storage.d.ts +347 -0
- package/src/types/rx-storage.interface.d.ts +312 -0
- package/src/types/util.d.ts +180 -0
- package/tsconfig.json +54 -0
- package/tsconfig.lint.json +18 -0
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
import _readOnlyError from "@babel/runtime/helpers/readOnlyError";
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import { PROMISE_RESOLVE_TRUE, PROMISE_RESOLVE_VOID, arrayBufferToBase64, ensureNotFalsy, now, toArray } from "../utils/index.js";
|
|
4
|
+
import { categorizeBulkWriteRows } from "../../rx-storage-helper.js";
|
|
5
|
+
import { getPrimaryFieldOfPrimaryKey } from "../../rx-schema-helper.js";
|
|
6
|
+
import { getQueryMatcher, getSortComparator } from "../../rx-query-helper.js";
|
|
7
|
+
import { newRxError } from "../../rx-error.js";
|
|
8
|
+
import { getIndexableStringMonad, getStartIndexStringFromLowerBound, getStartIndexStringFromUpperBound } from "../../custom-index.js";
|
|
9
|
+
import { pushAtSortPosition } from 'array-push-at-sort-position';
|
|
10
|
+
import { boundEQ, boundGE, boundGT, boundLE, boundLT } from "../storage-memory/binary-search-bounds.js";
|
|
11
|
+
export var RX_STORAGE_NAME_LOCALSTORAGE = 'localstorage';
|
|
12
|
+
|
|
13
|
+
// index-string to doc-id mapped
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* StorageEvents are not sent to the same
|
|
17
|
+
* browser tab where they were created.
|
|
18
|
+
* This makes it hard to write unit tests
|
|
19
|
+
* so we redistribute the events here instead.
|
|
20
|
+
*/
|
|
21
|
+
export var storageEventStream$ = new Subject();
|
|
22
|
+
var storageEventStreamObservable = storageEventStream$.asObservable();
|
|
23
|
+
var storageEventStreamSubscribed = false;
|
|
24
|
+
export function getStorageEventStream() {
|
|
25
|
+
if (!storageEventStreamSubscribed && typeof window !== 'undefined') {
|
|
26
|
+
storageEventStreamSubscribed = true;
|
|
27
|
+
window.addEventListener('storage', ev => {
|
|
28
|
+
if (!ev.key) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
storageEventStream$.next({
|
|
32
|
+
fromStorageEvent: true,
|
|
33
|
+
key: ev.key,
|
|
34
|
+
newValue: ev.newValue
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return storageEventStreamObservable;
|
|
39
|
+
}
|
|
40
|
+
var instanceId = 0;
|
|
41
|
+
export var RxStorageInstanceLocalstorage = /*#__PURE__*/function () {
|
|
42
|
+
/**
|
|
43
|
+
* Under this key the whole state
|
|
44
|
+
* will be stored as stringified json
|
|
45
|
+
* inside of the localstorage.
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
function RxStorageInstanceLocalstorage(storage, databaseName, collectionName, schema, internals, options, settings, multiInstance, databaseInstanceToken) {
|
|
49
|
+
this.changes$ = new Subject();
|
|
50
|
+
this.removed = false;
|
|
51
|
+
this.instanceId = instanceId++;
|
|
52
|
+
this.storage = storage;
|
|
53
|
+
this.databaseName = databaseName;
|
|
54
|
+
this.collectionName = collectionName;
|
|
55
|
+
this.schema = schema;
|
|
56
|
+
this.internals = internals;
|
|
57
|
+
this.options = options;
|
|
58
|
+
this.settings = settings;
|
|
59
|
+
this.multiInstance = multiInstance;
|
|
60
|
+
this.databaseInstanceToken = databaseInstanceToken;
|
|
61
|
+
this.localStorage = settings.localStorage ? settings.localStorage : typeof window !== 'undefined' ? window.localStorage : undefined;
|
|
62
|
+
this.primaryPath = getPrimaryFieldOfPrimaryKey(this.schema.primaryKey);
|
|
63
|
+
this.docsKey = 'RxDB-ls-doc-' + this.databaseName + '--' + this.collectionName + '--' + this.schema.version;
|
|
64
|
+
this.changestreamStorageKey = 'RxDB-ls-changes-' + this.databaseName + '--' + this.collectionName + '--' + this.schema.version;
|
|
65
|
+
this.indexesKey = 'RxDB-ls-idx-' + this.databaseName + '--' + this.collectionName + '--' + this.schema.version;
|
|
66
|
+
this.attachmentsKey = 'RxDB-ls-attachment-' + this.databaseName + '--' + this.collectionName + '--' + this.schema.version;
|
|
67
|
+
this.changeStreamSub = getStorageEventStream().subscribe(ev => {
|
|
68
|
+
if (ev.key !== this.changestreamStorageKey || !ev.newValue || ev.fromStorageEvent && ev.databaseInstanceToken === this.databaseInstanceToken) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
var latestChanges = JSON.parse(ev.newValue);
|
|
72
|
+
if (ev.fromStorageEvent && latestChanges.databaseInstanceToken === this.databaseInstanceToken) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
this.changes$.next(latestChanges.eventBulk);
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
var _proto = RxStorageInstanceLocalstorage.prototype;
|
|
79
|
+
_proto.getDoc = function getDoc(docId) {
|
|
80
|
+
var docString = this.localStorage.getItem(this.docsKey + '-' + docId);
|
|
81
|
+
if (docString) {
|
|
82
|
+
return JSON.parse(docString);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
_proto.setDoc = function setDoc(doc) {
|
|
86
|
+
var docId = doc[this.primaryPath];
|
|
87
|
+
this.localStorage.setItem(this.docsKey + '-' + docId, JSON.stringify(doc));
|
|
88
|
+
};
|
|
89
|
+
_proto.getIndex = function getIndex(index) {
|
|
90
|
+
var indexString = this.localStorage.getItem(this.indexesKey + getIndexName(index));
|
|
91
|
+
if (!indexString) {
|
|
92
|
+
return [];
|
|
93
|
+
} else {
|
|
94
|
+
return JSON.parse(indexString);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
_proto.setIndex = function setIndex(index, value) {
|
|
98
|
+
this.localStorage.setItem(this.indexesKey + getIndexName(index), JSON.stringify(value));
|
|
99
|
+
};
|
|
100
|
+
_proto.bulkWrite = async function bulkWrite(documentWrites, context) {
|
|
101
|
+
var ret = {
|
|
102
|
+
error: []
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Pre-convert all Blob attachment data to base64 BEFORE
|
|
107
|
+
* calling categorizeBulkWriteRows. localStorage has no transactions
|
|
108
|
+
* and is non-async, so all writes after the conflict check
|
|
109
|
+
* must be synchronous to avoid interleaving.
|
|
110
|
+
*/
|
|
111
|
+
var attachmentBase64Map = new Map();
|
|
112
|
+
await Promise.all(documentWrites.map(async row => {
|
|
113
|
+
if (row.document._attachments) {
|
|
114
|
+
await Promise.all(Object.values(row.document._attachments).map(async att => {
|
|
115
|
+
if (att.data instanceof Blob) {
|
|
116
|
+
var ab = await att.data.arrayBuffer();
|
|
117
|
+
attachmentBase64Map.set(att.data, arrayBufferToBase64(ab));
|
|
118
|
+
}
|
|
119
|
+
}));
|
|
120
|
+
}
|
|
121
|
+
}));
|
|
122
|
+
var docsInDb = new Map();
|
|
123
|
+
documentWrites.forEach(row => {
|
|
124
|
+
var docId = row.document[this.primaryPath];
|
|
125
|
+
var doc = this.getDoc(docId);
|
|
126
|
+
if (doc) {
|
|
127
|
+
docsInDb.set(docId, doc);
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
var categorized = categorizeBulkWriteRows(this, this.primaryPath, docsInDb, documentWrites, context);
|
|
131
|
+
ret.error = categorized.errors;
|
|
132
|
+
var indexValues = Object.values(this.internals.indexes).map(idx => {
|
|
133
|
+
return this.getIndex(idx.index);
|
|
134
|
+
});
|
|
135
|
+
[categorized.bulkInsertDocs, categorized.bulkUpdateDocs].forEach(rows => {
|
|
136
|
+
rows.forEach(row => {
|
|
137
|
+
// write new document data
|
|
138
|
+
this.setDoc(row.document);
|
|
139
|
+
|
|
140
|
+
// update the indexes
|
|
141
|
+
var docId = row.document[this.primaryPath];
|
|
142
|
+
Object.values(this.internals.indexes).forEach((idx, i) => {
|
|
143
|
+
var indexValue = indexValues[i];
|
|
144
|
+
var newIndexString = idx.getIndexableString(row.document);
|
|
145
|
+
var insertPosition = pushAtSortPosition(indexValue, [newIndexString, docId], sortByIndexStringComparator, 0);
|
|
146
|
+
if (row.previous) {
|
|
147
|
+
var previousIndexString = idx.getIndexableString(row.previous);
|
|
148
|
+
if (previousIndexString === newIndexString) {
|
|
149
|
+
/**
|
|
150
|
+
* Performance shortcut.
|
|
151
|
+
* If index was not changed -> The old doc must be before or after the new one.
|
|
152
|
+
*/
|
|
153
|
+
var prev = indexValue[insertPosition - 1];
|
|
154
|
+
if (prev && prev[1] === docId) {
|
|
155
|
+
indexValue.splice(insertPosition - 1, 1);
|
|
156
|
+
} else {
|
|
157
|
+
var next = indexValue[insertPosition + 1];
|
|
158
|
+
if (next[1] === docId) {
|
|
159
|
+
indexValue.splice(insertPosition + 1, 1);
|
|
160
|
+
} else {
|
|
161
|
+
throw newRxError('SNH', {
|
|
162
|
+
document: row.document,
|
|
163
|
+
args: {
|
|
164
|
+
insertPosition,
|
|
165
|
+
indexValue,
|
|
166
|
+
row,
|
|
167
|
+
idx
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
} else {
|
|
173
|
+
/**
|
|
174
|
+
* Index changed, we must search for the old one and remove it.
|
|
175
|
+
*/
|
|
176
|
+
var indexBefore = boundEQ(indexValue, [previousIndexString], compareDocsWithIndex);
|
|
177
|
+
indexValue.splice(indexBefore, 1);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
indexValues.forEach((indexValue, i) => {
|
|
184
|
+
var index = Object.values(this.internals.indexes);
|
|
185
|
+
this.setIndex(index[i].index, indexValue);
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
// attachments — use pre-converted base64 data (synchronous)
|
|
189
|
+
categorized.attachmentsAdd.forEach(attachment => {
|
|
190
|
+
var base64 = ensureNotFalsy(attachmentBase64Map.get(attachment.attachmentData.data));
|
|
191
|
+
var mimeType = attachment.attachmentData.type || 'application/octet-stream';
|
|
192
|
+
this.localStorage.setItem(this.attachmentsKey + '-' + attachment.documentId + '||' + attachment.attachmentId, 'data:' + mimeType + ';base64,' + base64);
|
|
193
|
+
});
|
|
194
|
+
categorized.attachmentsUpdate.forEach(attachment => {
|
|
195
|
+
var base64 = ensureNotFalsy(attachmentBase64Map.get(attachment.attachmentData.data));
|
|
196
|
+
var mimeType = attachment.attachmentData.type || 'application/octet-stream';
|
|
197
|
+
this.localStorage.setItem(this.attachmentsKey + '-' + attachment.documentId + '||' + attachment.attachmentId, 'data:' + mimeType + ';base64,' + base64);
|
|
198
|
+
});
|
|
199
|
+
categorized.attachmentsRemove.forEach(attachment => {
|
|
200
|
+
this.localStorage.removeItem(this.attachmentsKey + '-' + attachment.documentId + '||' + attachment.attachmentId);
|
|
201
|
+
});
|
|
202
|
+
if (categorized.eventBulk.events.length > 0) {
|
|
203
|
+
var lastState = ensureNotFalsy(categorized.newestRow).document;
|
|
204
|
+
categorized.eventBulk.checkpoint = {
|
|
205
|
+
id: lastState[this.primaryPath],
|
|
206
|
+
lwt: lastState._meta.lwt
|
|
207
|
+
};
|
|
208
|
+
var storageItemData = {
|
|
209
|
+
databaseInstanceToken: this.databaseInstanceToken,
|
|
210
|
+
eventBulk: categorized.eventBulk
|
|
211
|
+
};
|
|
212
|
+
var itemString = JSON.stringify(storageItemData);
|
|
213
|
+
this.localStorage.setItem(this.changestreamStorageKey, itemString);
|
|
214
|
+
storageEventStream$.next({
|
|
215
|
+
fromStorageEvent: false,
|
|
216
|
+
key: this.changestreamStorageKey,
|
|
217
|
+
newValue: itemString,
|
|
218
|
+
databaseInstanceToken: this.databaseInstanceToken
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
return Promise.resolve(ret);
|
|
222
|
+
};
|
|
223
|
+
_proto.findDocumentsById = async function findDocumentsById(docIds, withDeleted) {
|
|
224
|
+
var ret = [];
|
|
225
|
+
docIds.forEach(docId => {
|
|
226
|
+
var doc = this.getDoc(docId);
|
|
227
|
+
if (doc) {
|
|
228
|
+
if (withDeleted || !doc._deleted) {
|
|
229
|
+
ret.push(doc);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
return ret;
|
|
234
|
+
};
|
|
235
|
+
_proto.query = function query(preparedQuery) {
|
|
236
|
+
var queryPlan = preparedQuery.queryPlan;
|
|
237
|
+
var query = preparedQuery.query;
|
|
238
|
+
var skip = query.skip ? query.skip : 0;
|
|
239
|
+
var limit = query.limit ? query.limit : Infinity;
|
|
240
|
+
var skipPlusLimit = skip + limit;
|
|
241
|
+
var queryMatcher = false;
|
|
242
|
+
if (!queryPlan.selectorSatisfiedByIndex) {
|
|
243
|
+
queryMatcher = getQueryMatcher(this.schema, preparedQuery.query);
|
|
244
|
+
}
|
|
245
|
+
var queryPlanFields = queryPlan.index;
|
|
246
|
+
var mustManuallyResort = !queryPlan.sortSatisfiedByIndex;
|
|
247
|
+
var index = queryPlanFields;
|
|
248
|
+
var lowerBound = queryPlan.startKeys;
|
|
249
|
+
var lowerBoundString = getStartIndexStringFromLowerBound(this.schema, index, lowerBound);
|
|
250
|
+
var upperBound = queryPlan.endKeys;
|
|
251
|
+
upperBound = upperBound;
|
|
252
|
+
var upperBoundString = getStartIndexStringFromUpperBound(this.schema, index, upperBound);
|
|
253
|
+
var docsWithIndex = this.getIndex(index);
|
|
254
|
+
var indexOfLower = (queryPlan.inclusiveStart ? boundGE : boundGT)(docsWithIndex, [lowerBoundString], compareDocsWithIndex);
|
|
255
|
+
var indexOfUpper = (queryPlan.inclusiveEnd ? boundLE : boundLT)(docsWithIndex, [upperBoundString], compareDocsWithIndex);
|
|
256
|
+
var rows = [];
|
|
257
|
+
var done = false;
|
|
258
|
+
while (!done) {
|
|
259
|
+
var currentRow = docsWithIndex[indexOfLower];
|
|
260
|
+
if (!currentRow || indexOfLower > indexOfUpper) {
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
var docId = currentRow[1];
|
|
264
|
+
var currentDoc = ensureNotFalsy(this.getDoc(docId));
|
|
265
|
+
if (!queryMatcher || queryMatcher(currentDoc)) {
|
|
266
|
+
rows.push(currentDoc);
|
|
267
|
+
}
|
|
268
|
+
if (rows.length >= skipPlusLimit && !mustManuallyResort) {
|
|
269
|
+
done = true;
|
|
270
|
+
}
|
|
271
|
+
indexOfLower++;
|
|
272
|
+
}
|
|
273
|
+
if (mustManuallyResort) {
|
|
274
|
+
var sortComparator = getSortComparator(this.schema, preparedQuery.query);
|
|
275
|
+
rows = rows.sort(sortComparator);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// apply skip and limit boundaries.
|
|
279
|
+
rows = rows.slice(skip, skipPlusLimit);
|
|
280
|
+
return Promise.resolve({
|
|
281
|
+
documents: rows
|
|
282
|
+
});
|
|
283
|
+
};
|
|
284
|
+
_proto.count = async function count(preparedQuery) {
|
|
285
|
+
var result = await this.query(preparedQuery);
|
|
286
|
+
return {
|
|
287
|
+
count: result.documents.length,
|
|
288
|
+
mode: 'fast'
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
_proto.changeStream = function changeStream() {
|
|
292
|
+
return this.changes$.asObservable();
|
|
293
|
+
};
|
|
294
|
+
_proto.cleanup = function cleanup(minimumDeletedTime) {
|
|
295
|
+
var _this = this;
|
|
296
|
+
var maxDeletionTime = now() - minimumDeletedTime;
|
|
297
|
+
var indexValue = this.getIndex(CLEANUP_INDEX);
|
|
298
|
+
var lowerBoundString = getStartIndexStringFromLowerBound(this.schema, CLEANUP_INDEX, [true, 0, '']);
|
|
299
|
+
var indexOfLower = boundGT(indexValue, [lowerBoundString], compareDocsWithIndex);
|
|
300
|
+
var indexValues = Object.values(this.internals.indexes).map(idx => {
|
|
301
|
+
return this.getIndex(idx.index);
|
|
302
|
+
});
|
|
303
|
+
var done = false;
|
|
304
|
+
var _loop = function () {
|
|
305
|
+
var currentIndexRow = indexValue[indexOfLower];
|
|
306
|
+
if (!currentIndexRow) {
|
|
307
|
+
return 1; // break
|
|
308
|
+
}
|
|
309
|
+
var currentDocId = currentIndexRow[1];
|
|
310
|
+
var currentDoc = ensureNotFalsy(_this.getDoc(currentDocId));
|
|
311
|
+
if (currentDoc._meta.lwt > maxDeletionTime) {
|
|
312
|
+
done = true;
|
|
313
|
+
} else {
|
|
314
|
+
_this.localStorage.removeItem(_this.docsKey + '-' + currentDocId);
|
|
315
|
+
Object.values(_this.internals.indexes).forEach((idx, i) => {
|
|
316
|
+
var indexValue = indexValues[i];
|
|
317
|
+
var indexString = idx.getIndexableString(currentDoc);
|
|
318
|
+
var indexBefore = boundEQ(indexValue, [indexString], compareDocsWithIndex);
|
|
319
|
+
indexValue.splice(indexBefore, 1);
|
|
320
|
+
});
|
|
321
|
+
indexOfLower++;
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
while (!done) {
|
|
325
|
+
if (_loop()) break;
|
|
326
|
+
}
|
|
327
|
+
indexValues.forEach((indexValue, i) => {
|
|
328
|
+
var index = Object.values(this.internals.indexes);
|
|
329
|
+
this.setIndex(index[i].index, indexValue);
|
|
330
|
+
});
|
|
331
|
+
return PROMISE_RESOLVE_TRUE;
|
|
332
|
+
};
|
|
333
|
+
_proto.getAttachmentData = async function getAttachmentData(documentId, attachmentId) {
|
|
334
|
+
var stored = ensureNotFalsy(this.localStorage.getItem(this.attachmentsKey + '-' + documentId + '||' + attachmentId));
|
|
335
|
+
// Stored value is a data URL like "data:<mime>;base64,<payload>".
|
|
336
|
+
// Fall back to application/octet-stream for legacy bare base64 payloads.
|
|
337
|
+
var dataUrl = stored;
|
|
338
|
+
if (!stored.startsWith('data:')) {
|
|
339
|
+
dataUrl = 'data:application/octet-stream;base64,' + stored;
|
|
340
|
+
}
|
|
341
|
+
var response = await fetch(dataUrl);
|
|
342
|
+
return response.blob();
|
|
343
|
+
};
|
|
344
|
+
_proto.remove = function remove() {
|
|
345
|
+
ensureNotRemoved(this);
|
|
346
|
+
this.removed = true;
|
|
347
|
+
|
|
348
|
+
// delete changes
|
|
349
|
+
this.changeStreamSub.unsubscribe();
|
|
350
|
+
this.localStorage.removeItem(this.changestreamStorageKey);
|
|
351
|
+
|
|
352
|
+
// delete documents
|
|
353
|
+
var firstIndex = Object.values(this.internals.indexes)[0];
|
|
354
|
+
var indexedDocs = this.getIndex(firstIndex.index);
|
|
355
|
+
indexedDocs.forEach(row => {
|
|
356
|
+
var docId = row[1];
|
|
357
|
+
this.localStorage.removeItem(this.docsKey + '-' + docId);
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
// delete indexes
|
|
361
|
+
Object.values(this.internals.indexes).forEach(idx => {
|
|
362
|
+
this.localStorage.removeItem(this.indexesKey + idx.indexName);
|
|
363
|
+
});
|
|
364
|
+
return PROMISE_RESOLVE_VOID;
|
|
365
|
+
};
|
|
366
|
+
_proto.close = function close() {
|
|
367
|
+
this.changeStreamSub.unsubscribe();
|
|
368
|
+
this.removed = true;
|
|
369
|
+
if (this.closed) {
|
|
370
|
+
return this.closed;
|
|
371
|
+
}
|
|
372
|
+
this.closed = (async () => {
|
|
373
|
+
this.changes$.complete();
|
|
374
|
+
this.localStorage.removeItem(this.changestreamStorageKey);
|
|
375
|
+
})();
|
|
376
|
+
return this.closed;
|
|
377
|
+
};
|
|
378
|
+
return RxStorageInstanceLocalstorage;
|
|
379
|
+
}();
|
|
380
|
+
export async function createLocalstorageStorageInstance(storage, params, settings) {
|
|
381
|
+
var primaryPath = getPrimaryFieldOfPrimaryKey(params.schema.primaryKey);
|
|
382
|
+
var useIndexes = params.schema.indexes ? params.schema.indexes.slice(0) : [];
|
|
383
|
+
useIndexes.push([primaryPath]);
|
|
384
|
+
var useIndexesFinal = useIndexes.map(index => {
|
|
385
|
+
var indexAr = toArray(index);
|
|
386
|
+
return indexAr;
|
|
387
|
+
});
|
|
388
|
+
useIndexesFinal.push(CLEANUP_INDEX);
|
|
389
|
+
var indexes = {};
|
|
390
|
+
useIndexesFinal.forEach((indexAr, indexId) => {
|
|
391
|
+
var indexName = getIndexName(indexAr);
|
|
392
|
+
indexes[indexName] = {
|
|
393
|
+
indexId: '|' + indexId + '|',
|
|
394
|
+
indexName,
|
|
395
|
+
getIndexableString: getIndexableStringMonad(params.schema, indexAr),
|
|
396
|
+
index: indexAr
|
|
397
|
+
};
|
|
398
|
+
});
|
|
399
|
+
var internals = {
|
|
400
|
+
indexes
|
|
401
|
+
};
|
|
402
|
+
var instance = new RxStorageInstanceLocalstorage(storage, params.databaseName, params.collectionName, params.schema, internals, params.options, settings, params.multiInstance, params.databaseInstanceToken);
|
|
403
|
+
return instance;
|
|
404
|
+
}
|
|
405
|
+
export function getIndexName(index) {
|
|
406
|
+
return index.join('|');
|
|
407
|
+
}
|
|
408
|
+
export var CLEANUP_INDEX = ['_deleted', '_meta.lwt'];
|
|
409
|
+
function sortByIndexStringComparator(a, b) {
|
|
410
|
+
if (a[0] < b[0]) {
|
|
411
|
+
return -1;
|
|
412
|
+
} else {
|
|
413
|
+
return 1;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
function compareDocsWithIndex(a, b) {
|
|
417
|
+
var indexStringA = a[0];
|
|
418
|
+
var indexStringB = b[0];
|
|
419
|
+
if (indexStringA < indexStringB) {
|
|
420
|
+
return -1;
|
|
421
|
+
} else if (indexStringA === indexStringB) {
|
|
422
|
+
return 0;
|
|
423
|
+
} else {
|
|
424
|
+
return 1;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
function ensureNotRemoved(instance) {
|
|
428
|
+
if (instance.removed) {
|
|
429
|
+
throw new Error('removed');
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
//# sourceMappingURL=rx-storage-instance-localstorage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rx-storage-instance-localstorage.js","names":["Subject","PROMISE_RESOLVE_TRUE","PROMISE_RESOLVE_VOID","arrayBufferToBase64","ensureNotFalsy","now","toArray","categorizeBulkWriteRows","getPrimaryFieldOfPrimaryKey","getQueryMatcher","getSortComparator","newRxError","getIndexableStringMonad","getStartIndexStringFromLowerBound","getStartIndexStringFromUpperBound","pushAtSortPosition","boundEQ","boundGE","boundGT","boundLE","boundLT","RX_STORAGE_NAME_LOCALSTORAGE","storageEventStream$","storageEventStreamObservable","asObservable","storageEventStreamSubscribed","getStorageEventStream","window","addEventListener","ev","key","next","fromStorageEvent","newValue","instanceId","RxStorageInstanceLocalstorage","storage","databaseName","collectionName","schema","internals","options","settings","multiInstance","databaseInstanceToken","changes$","removed","localStorage","undefined","primaryPath","primaryKey","docsKey","version","changestreamStorageKey","indexesKey","attachmentsKey","changeStreamSub","subscribe","latestChanges","JSON","parse","eventBulk","_proto","prototype","getDoc","docId","docString","getItem","setDoc","doc","setItem","stringify","getIndex","index","indexString","getIndexName","setIndex","value","bulkWrite","documentWrites","context","ret","error","attachmentBase64Map","Map","Promise","all","map","row","document","_attachments","Object","values","att","data","Blob","ab","arrayBuffer","set","docsInDb","forEach","categorized","errors","indexValues","indexes","idx","bulkInsertDocs","bulkUpdateDocs","rows","i","indexValue","newIndexString","getIndexableString","insertPosition","sortByIndexStringComparator","previous","previousIndexString","prev","splice","args","indexBefore","compareDocsWithIndex","attachmentsAdd","attachment","base64","get","attachmentData","mimeType","type","documentId","attachmentId","attachmentsUpdate","attachmentsRemove","removeItem","events","length","lastState","newestRow","checkpoint","id","lwt","_meta","storageItemData","itemString","resolve","findDocumentsById","docIds","withDeleted","_deleted","push","query","preparedQuery","queryPlan","skip","limit","Infinity","skipPlusLimit","queryMatcher","selectorSatisfiedByIndex","queryPlanFields","mustManuallyResort","sortSatisfiedByIndex","lowerBound","startKeys","lowerBoundString","upperBound","endKeys","upperBoundString","docsWithIndex","indexOfLower","inclusiveStart","indexOfUpper","inclusiveEnd","done","currentRow","currentDoc","sortComparator","sort","slice","documents","count","result","mode","changeStream","cleanup","minimumDeletedTime","_this","maxDeletionTime","CLEANUP_INDEX","_loop","currentIndexRow","currentDocId","getAttachmentData","stored","dataUrl","startsWith","response","fetch","blob","remove","ensureNotRemoved","unsubscribe","firstIndex","indexedDocs","indexName","close","closed","complete","createLocalstorageStorageInstance","params","useIndexes","useIndexesFinal","indexAr","indexId","instance","join","a","b","indexStringA","indexStringB","Error"],"sources":["../../../../src/plugins/storage-localstorage/rx-storage-instance-localstorage.ts"],"sourcesContent":["import { Observable, Subject, Subscription } from 'rxjs';\r\nimport {\r\n PROMISE_RESOLVE_TRUE,\r\n PROMISE_RESOLVE_VOID,\r\n arrayBufferToBase64,\r\n ensureNotFalsy,\r\n now,\r\n toArray\r\n} from '../utils/index.ts';\r\nimport type {\r\n BulkWriteRow,\r\n ById,\r\n EventBulk,\r\n PreparedQuery,\r\n QueryMatcher,\r\n RxDocumentData,\r\n RxDocumentWriteData,\r\n RxJsonSchema,\r\n RxStorageBulkWriteResponse,\r\n RxStorageChangeEvent,\r\n RxStorageCountResult,\r\n RxStorageDefaultCheckpoint,\r\n RxStorageInstance,\r\n RxStorageInstanceCreationParams,\r\n RxStorageQueryResult,\r\n StringKeys\r\n} from '../../types/index';\r\nimport {\r\n categorizeBulkWriteRows\r\n} from '../../rx-storage-helper.ts';\r\nimport { getPrimaryFieldOfPrimaryKey } from '../../rx-schema-helper.ts';\r\nimport { getQueryMatcher, getSortComparator } from '../../rx-query-helper.ts';\r\nimport { newRxError } from '../../rx-error.ts';\r\nimport type { RxStorageLocalstorage } from './index.ts';\r\nimport {\r\n getIndexableStringMonad,\r\n getStartIndexStringFromLowerBound,\r\n getStartIndexStringFromUpperBound\r\n} from '../../custom-index.ts';\r\nimport { pushAtSortPosition } from 'array-push-at-sort-position';\r\nimport { boundEQ, boundGE, boundGT, boundLE, boundLT } from '../storage-memory/binary-search-bounds.ts';\r\n\r\nexport const RX_STORAGE_NAME_LOCALSTORAGE = 'localstorage';\r\n\r\n\r\nexport type LocalstorageStorageInternals<RxDocType = any> = {\r\n indexes: ById<IndexMeta<RxDocType>>;\r\n};\r\n\r\nexport type LocalstorageInstanceCreationOptions = {};\r\n\r\nexport type LocalstorageStorageSettings = {\r\n localStorage?: typeof localStorage\r\n};\r\n\r\n// index-string to doc-id mapped\r\nexport type LocalstorageIndex = string[][];\r\n\r\nexport type ChangeStreamStoredData<RxDocType> = {\r\n databaseInstanceToken: string;\r\n eventBulk: EventBulk<RxStorageChangeEvent<RxDocumentData<RxDocType>>, any>;\r\n}\r\n\r\n\r\n/**\r\n * StorageEvents are not sent to the same\r\n * browser tab where they were created.\r\n * This makes it hard to write unit tests\r\n * so we redistribute the events here instead.\r\n */\r\nexport const storageEventStream$: Subject<{\r\n fromStorageEvent: boolean;\r\n key: string;\r\n newValue: string | null;\r\n databaseInstanceToken?: string;\r\n}> = new Subject();\r\nconst storageEventStreamObservable = storageEventStream$.asObservable();\r\nlet storageEventStreamSubscribed = false;\r\nexport function getStorageEventStream() {\r\n if (!storageEventStreamSubscribed && typeof window !== 'undefined') {\r\n storageEventStreamSubscribed = true;\r\n window.addEventListener('storage', (ev: StorageEvent) => {\r\n if (!ev.key) {\r\n return;\r\n }\r\n storageEventStream$.next({\r\n fromStorageEvent: true,\r\n key: ev.key,\r\n newValue: ev.newValue\r\n });\r\n });\r\n }\r\n return storageEventStreamObservable;\r\n}\r\n\r\nlet instanceId = 0;\r\nexport class RxStorageInstanceLocalstorage<RxDocType> implements RxStorageInstance<\r\n RxDocType,\r\n LocalstorageStorageInternals,\r\n LocalstorageInstanceCreationOptions,\r\n RxStorageDefaultCheckpoint\r\n> {\r\n public readonly primaryPath: StringKeys<RxDocType>;\r\n\r\n /**\r\n * Under this key the whole state\r\n * will be stored as stringified json\r\n * inside of the localstorage.\r\n */\r\n public readonly docsKey: string;\r\n public readonly attachmentsKey: string;\r\n public readonly changestreamStorageKey: string;\r\n public readonly indexesKey: string;\r\n private changeStreamSub: Subscription;\r\n\r\n private changes$: Subject<EventBulk<RxStorageChangeEvent<RxDocumentData<RxDocType>>, RxStorageDefaultCheckpoint>> = new Subject();\r\n public closed?: Promise<void>;\r\n public readonly localStorage: typeof localStorage;\r\n public removed: boolean = false;\r\n public readonly instanceId = instanceId++;\r\n\r\n constructor(\r\n public readonly storage: RxStorageLocalstorage,\r\n public readonly databaseName: string,\r\n public readonly collectionName: string,\r\n public readonly schema: Readonly<RxJsonSchema<RxDocumentData<RxDocType>>>,\r\n public readonly internals: LocalstorageStorageInternals,\r\n public readonly options: Readonly<LocalstorageInstanceCreationOptions>,\r\n public readonly settings: LocalstorageStorageSettings,\r\n public readonly multiInstance: boolean,\r\n public readonly databaseInstanceToken: string\r\n ) {\r\n this.localStorage = settings.localStorage ? settings.localStorage : (typeof window !== 'undefined' ? window.localStorage : undefined as any);\r\n this.primaryPath = getPrimaryFieldOfPrimaryKey(this.schema.primaryKey) as any;\r\n this.docsKey = 'RxDB-ls-doc-' + this.databaseName + '--' + this.collectionName + '--' + this.schema.version;\r\n this.changestreamStorageKey = 'RxDB-ls-changes-' + this.databaseName + '--' + this.collectionName + '--' + this.schema.version;\r\n this.indexesKey = 'RxDB-ls-idx-' + this.databaseName + '--' + this.collectionName + '--' + this.schema.version;\r\n this.attachmentsKey = 'RxDB-ls-attachment-' + this.databaseName + '--' + this.collectionName + '--' + this.schema.version;\r\n\r\n this.changeStreamSub = getStorageEventStream().subscribe((ev: {\r\n fromStorageEvent: boolean;\r\n key: string;\r\n newValue: string | null;\r\n databaseInstanceToken?: string;\r\n }) => {\r\n if (\r\n ev.key !== this.changestreamStorageKey ||\r\n !ev.newValue ||\r\n (\r\n ev.fromStorageEvent &&\r\n ev.databaseInstanceToken === this.databaseInstanceToken\r\n )\r\n ) {\r\n return;\r\n }\r\n\r\n const latestChanges: ChangeStreamStoredData<RxDocType> = JSON.parse(ev.newValue);\r\n if (\r\n ev.fromStorageEvent &&\r\n latestChanges.databaseInstanceToken === this.databaseInstanceToken\r\n ) {\r\n return;\r\n }\r\n this.changes$.next(latestChanges.eventBulk);\r\n });\r\n }\r\n\r\n getDoc(docId: string | RxDocumentWriteData<RxDocType>[StringKeys<RxDocType>]): RxDocumentData<RxDocType> | undefined {\r\n const docString = this.localStorage.getItem(this.docsKey + '-' + docId as string);\r\n if (docString) {\r\n return JSON.parse(docString);\r\n }\r\n }\r\n setDoc(doc: RxDocumentData<RxDocType>) {\r\n const docId = doc[this.primaryPath];\r\n this.localStorage.setItem(this.docsKey + '-' + docId, JSON.stringify(doc));\r\n }\r\n getIndex(index: string[]): LocalstorageIndex {\r\n const indexString = this.localStorage.getItem(this.indexesKey + getIndexName(index));\r\n if (!indexString) {\r\n return [];\r\n } else {\r\n return JSON.parse(indexString);\r\n }\r\n }\r\n setIndex(index: string[], value: LocalstorageIndex) {\r\n this.localStorage.setItem(this.indexesKey + getIndexName(index), JSON.stringify(value));\r\n }\r\n\r\n\r\n async bulkWrite(\r\n documentWrites: BulkWriteRow<RxDocType>[],\r\n context: string\r\n ): Promise<RxStorageBulkWriteResponse<RxDocType>> {\r\n const ret: RxStorageBulkWriteResponse<RxDocType> = {\r\n error: []\r\n };\r\n\r\n /**\r\n * Pre-convert all Blob attachment data to base64 BEFORE\r\n * calling categorizeBulkWriteRows. localStorage has no transactions\r\n * and is non-async, so all writes after the conflict check\r\n * must be synchronous to avoid interleaving.\r\n */\r\n const attachmentBase64Map = new Map<Blob, string>();\r\n await Promise.all(\r\n documentWrites.map(async (row) => {\r\n if (row.document._attachments) {\r\n await Promise.all(\r\n Object.values(row.document._attachments).map(async (att: any) => {\r\n if (att.data instanceof Blob) {\r\n const ab = await att.data.arrayBuffer();\r\n attachmentBase64Map.set(att.data, arrayBufferToBase64(ab));\r\n }\r\n })\r\n );\r\n }\r\n })\r\n );\r\n\r\n const docsInDb = new Map<RxDocumentData<RxDocType>[StringKeys<RxDocType>] | string, RxDocumentData<RxDocType>>();\r\n documentWrites.forEach(row => {\r\n const docId = row.document[this.primaryPath];\r\n const doc = this.getDoc(docId);\r\n if (doc) {\r\n docsInDb.set(docId, doc);\r\n }\r\n });\r\n\r\n const categorized = categorizeBulkWriteRows<RxDocType>(\r\n this,\r\n this.primaryPath,\r\n docsInDb,\r\n documentWrites,\r\n context\r\n );\r\n ret.error = categorized.errors;\r\n\r\n\r\n const indexValues = Object.values(this.internals.indexes).map(idx => {\r\n return this.getIndex(idx.index);\r\n });\r\n\r\n [\r\n categorized.bulkInsertDocs,\r\n categorized.bulkUpdateDocs\r\n ].forEach(rows => {\r\n rows.forEach(row => {\r\n // write new document data\r\n this.setDoc(row.document);\r\n\r\n // update the indexes\r\n const docId = row.document[this.primaryPath] as string;\r\n Object.values(this.internals.indexes).forEach((idx, i) => {\r\n const indexValue = indexValues[i];\r\n const newIndexString = idx.getIndexableString(row.document);\r\n const insertPosition = pushAtSortPosition<string[]>(\r\n indexValue,\r\n [\r\n newIndexString,\r\n docId,\r\n ],\r\n sortByIndexStringComparator,\r\n 0\r\n );\r\n if (row.previous) {\r\n const previousIndexString = idx.getIndexableString(row.previous);\r\n if (previousIndexString === newIndexString) {\r\n /**\r\n * Performance shortcut.\r\n * If index was not changed -> The old doc must be before or after the new one.\r\n */\r\n const prev = indexValue[insertPosition - 1];\r\n if (prev && prev[1] === docId) {\r\n indexValue.splice(insertPosition - 1, 1);\r\n } else {\r\n const next = indexValue[insertPosition + 1];\r\n if (next[1] === docId) {\r\n indexValue.splice(insertPosition + 1, 1);\r\n } else {\r\n throw newRxError('SNH', {\r\n document: row.document,\r\n args: {\r\n insertPosition,\r\n indexValue,\r\n row,\r\n idx\r\n }\r\n });\r\n }\r\n }\r\n } else {\r\n /**\r\n * Index changed, we must search for the old one and remove it.\r\n */\r\n const indexBefore = boundEQ(\r\n indexValue,\r\n [\r\n previousIndexString\r\n ] as any,\r\n compareDocsWithIndex\r\n );\r\n indexValue.splice(indexBefore, 1);\r\n }\r\n }\r\n });\r\n\r\n });\r\n });\r\n\r\n indexValues.forEach((indexValue, i) => {\r\n const index = Object.values(this.internals.indexes);\r\n this.setIndex(index[i].index, indexValue);\r\n });\r\n\r\n // attachments — use pre-converted base64 data (synchronous)\r\n categorized.attachmentsAdd.forEach(attachment => {\r\n const base64 = ensureNotFalsy(attachmentBase64Map.get(attachment.attachmentData.data));\r\n const mimeType = attachment.attachmentData.type || 'application/octet-stream';\r\n this.localStorage.setItem(\r\n this.attachmentsKey +\r\n '-' + attachment.documentId +\r\n '||' + attachment.attachmentId,\r\n 'data:' + mimeType + ';base64,' + base64\r\n );\r\n });\r\n categorized.attachmentsUpdate.forEach(attachment => {\r\n const base64 = ensureNotFalsy(attachmentBase64Map.get(attachment.attachmentData.data));\r\n const mimeType = attachment.attachmentData.type || 'application/octet-stream';\r\n this.localStorage.setItem(\r\n this.attachmentsKey +\r\n '-' + attachment.documentId +\r\n '||' + attachment.attachmentId,\r\n 'data:' + mimeType + ';base64,' + base64\r\n );\r\n });\r\n categorized.attachmentsRemove.forEach(attachment => {\r\n this.localStorage.removeItem(\r\n this.attachmentsKey +\r\n '-' + attachment.documentId +\r\n '||' + attachment.attachmentId\r\n );\r\n });\r\n\r\n if (categorized.eventBulk.events.length > 0) {\r\n const lastState = ensureNotFalsy(categorized.newestRow).document;\r\n categorized.eventBulk.checkpoint = {\r\n id: lastState[this.primaryPath],\r\n lwt: lastState._meta.lwt\r\n };\r\n const storageItemData: ChangeStreamStoredData<RxDocType> = {\r\n databaseInstanceToken: this.databaseInstanceToken,\r\n eventBulk: categorized.eventBulk\r\n };\r\n const itemString = JSON.stringify(storageItemData);\r\n this.localStorage.setItem(\r\n this.changestreamStorageKey,\r\n itemString\r\n );\r\n storageEventStream$.next({\r\n fromStorageEvent: false,\r\n key: this.changestreamStorageKey,\r\n newValue: itemString,\r\n databaseInstanceToken: this.databaseInstanceToken\r\n });\r\n }\r\n return Promise.resolve(ret);\r\n }\r\n\r\n async findDocumentsById(\r\n docIds: string[],\r\n withDeleted: boolean\r\n ): Promise<RxDocumentData<RxDocType>[]> {\r\n const ret: RxDocumentData<RxDocType>[] = [];\r\n docIds.forEach(docId => {\r\n const doc = this.getDoc(docId);\r\n if (doc) {\r\n if (withDeleted || !doc._deleted) {\r\n ret.push(doc);\r\n }\r\n }\r\n });\r\n return ret;\r\n }\r\n\r\n query(\r\n preparedQuery: PreparedQuery<RxDocType>\r\n ): Promise<RxStorageQueryResult<RxDocType>> {\r\n const queryPlan = preparedQuery.queryPlan;\r\n const query = preparedQuery.query;\r\n\r\n const skip = query.skip ? query.skip : 0;\r\n const limit = query.limit ? query.limit : Infinity;\r\n const skipPlusLimit = skip + limit;\r\n\r\n let queryMatcher: QueryMatcher<RxDocumentData<RxDocType>> | false = false;\r\n if (!queryPlan.selectorSatisfiedByIndex) {\r\n queryMatcher = getQueryMatcher(\r\n this.schema,\r\n preparedQuery.query\r\n );\r\n }\r\n\r\n const queryPlanFields: string[] = queryPlan.index;\r\n const mustManuallyResort = !queryPlan.sortSatisfiedByIndex;\r\n const index: string[] | undefined = queryPlanFields;\r\n const lowerBound: any[] = queryPlan.startKeys;\r\n const lowerBoundString = getStartIndexStringFromLowerBound(\r\n this.schema,\r\n index,\r\n lowerBound\r\n );\r\n\r\n let upperBound: any[] = queryPlan.endKeys;\r\n upperBound = upperBound;\r\n const upperBoundString = getStartIndexStringFromUpperBound(\r\n this.schema,\r\n index,\r\n upperBound\r\n );\r\n const docsWithIndex = this.getIndex(index);\r\n let indexOfLower = (queryPlan.inclusiveStart ? boundGE : boundGT)(\r\n docsWithIndex,\r\n [\r\n lowerBoundString\r\n ] as any,\r\n compareDocsWithIndex\r\n );\r\n\r\n const indexOfUpper = (queryPlan.inclusiveEnd ? boundLE : boundLT)(\r\n docsWithIndex,\r\n [\r\n upperBoundString\r\n ] as any,\r\n compareDocsWithIndex\r\n );\r\n\r\n let rows: RxDocumentData<RxDocType>[] = [];\r\n let done = false;\r\n while (!done) {\r\n const currentRow = docsWithIndex[indexOfLower];\r\n if (\r\n !currentRow ||\r\n indexOfLower > indexOfUpper\r\n ) {\r\n break;\r\n }\r\n const docId = currentRow[1];\r\n const currentDoc = ensureNotFalsy(this.getDoc(docId));\r\n\r\n if (!queryMatcher || queryMatcher(currentDoc)) {\r\n rows.push(currentDoc);\r\n }\r\n\r\n if (\r\n (rows.length >= skipPlusLimit && !mustManuallyResort)\r\n ) {\r\n done = true;\r\n }\r\n\r\n indexOfLower++;\r\n }\r\n\r\n if (mustManuallyResort) {\r\n const sortComparator = getSortComparator(this.schema, preparedQuery.query);\r\n rows = rows.sort(sortComparator);\r\n }\r\n\r\n // apply skip and limit boundaries.\r\n rows = rows.slice(skip, skipPlusLimit);\r\n return Promise.resolve({\r\n documents: rows\r\n });\r\n }\r\n\r\n async count(\r\n preparedQuery: PreparedQuery<RxDocType>\r\n ): Promise<RxStorageCountResult> {\r\n const result = await this.query(preparedQuery);\r\n return {\r\n count: result.documents.length,\r\n mode: 'fast'\r\n };\r\n }\r\n\r\n changeStream(): Observable<EventBulk<RxStorageChangeEvent<RxDocumentData<RxDocType>>, RxStorageDefaultCheckpoint>> {\r\n return this.changes$.asObservable();\r\n }\r\n cleanup(minimumDeletedTime: number): Promise<boolean> {\r\n const maxDeletionTime = now() - minimumDeletedTime;\r\n const indexValue = this.getIndex(CLEANUP_INDEX);\r\n const lowerBoundString = getStartIndexStringFromLowerBound(\r\n this.schema,\r\n CLEANUP_INDEX,\r\n [\r\n true,\r\n 0,\r\n ''\r\n ]\r\n );\r\n let indexOfLower = boundGT(\r\n indexValue,\r\n [\r\n lowerBoundString\r\n ] as any,\r\n compareDocsWithIndex\r\n );\r\n\r\n const indexValues = Object.values(this.internals.indexes).map(idx => {\r\n return this.getIndex(idx.index);\r\n });\r\n\r\n let done = false;\r\n while (!done) {\r\n const currentIndexRow = indexValue[indexOfLower];\r\n if (!currentIndexRow) {\r\n break;\r\n }\r\n const currentDocId = currentIndexRow[1];\r\n const currentDoc = ensureNotFalsy(this.getDoc(currentDocId));\r\n if (currentDoc._meta.lwt > maxDeletionTime) {\r\n done = true;\r\n } else {\r\n this.localStorage.removeItem(this.docsKey + '-' + currentDocId);\r\n Object.values(this.internals.indexes).forEach((idx, i) => {\r\n const indexValue = indexValues[i];\r\n const indexString = idx.getIndexableString(currentDoc);\r\n const indexBefore = boundEQ(\r\n indexValue,\r\n [\r\n indexString\r\n ] as any,\r\n compareDocsWithIndex\r\n );\r\n indexValue.splice(indexBefore, 1);\r\n });\r\n indexOfLower++;\r\n }\r\n }\r\n\r\n indexValues.forEach((indexValue, i) => {\r\n const index = Object.values(this.internals.indexes);\r\n this.setIndex(index[i].index, indexValue);\r\n });\r\n\r\n return PROMISE_RESOLVE_TRUE;\r\n }\r\n\r\n async getAttachmentData(documentId: string, attachmentId: string): Promise<Blob> {\r\n const stored = ensureNotFalsy(\r\n this.localStorage.getItem(this.attachmentsKey + '-' + documentId + '||' + attachmentId)\r\n );\r\n // Stored value is a data URL like \"data:<mime>;base64,<payload>\".\r\n // Fall back to application/octet-stream for legacy bare base64 payloads.\r\n let dataUrl = stored;\r\n if (!stored.startsWith('data:')) {\r\n dataUrl = 'data:application/octet-stream;base64,' + stored;\r\n }\r\n const response = await fetch(dataUrl);\r\n return response.blob();\r\n }\r\n\r\n remove(): Promise<void> {\r\n ensureNotRemoved(this);\r\n this.removed = true;\r\n\r\n // delete changes\r\n this.changeStreamSub.unsubscribe();\r\n this.localStorage.removeItem(this.changestreamStorageKey);\r\n\r\n // delete documents\r\n const firstIndex = Object.values(this.internals.indexes)[0];\r\n const indexedDocs = this.getIndex(firstIndex.index);\r\n indexedDocs.forEach(row => {\r\n const docId = row[1];\r\n this.localStorage.removeItem(this.docsKey + '-' + docId);\r\n });\r\n\r\n // delete indexes\r\n Object.values(this.internals.indexes).forEach(idx => {\r\n this.localStorage.removeItem(this.indexesKey + idx.indexName);\r\n });\r\n\r\n return PROMISE_RESOLVE_VOID;\r\n }\r\n\r\n close(): Promise<void> {\r\n this.changeStreamSub.unsubscribe();\r\n this.removed = true;\r\n\r\n if (this.closed) {\r\n return this.closed;\r\n }\r\n this.closed = (async () => {\r\n this.changes$.complete();\r\n this.localStorage.removeItem(this.changestreamStorageKey);\r\n })();\r\n return this.closed;\r\n }\r\n}\r\n\r\nexport async function createLocalstorageStorageInstance<RxDocType>(\r\n storage: RxStorageLocalstorage,\r\n params: RxStorageInstanceCreationParams<RxDocType, LocalstorageInstanceCreationOptions>,\r\n settings: LocalstorageStorageSettings\r\n): Promise<RxStorageInstanceLocalstorage<RxDocType>> {\r\n const primaryPath = getPrimaryFieldOfPrimaryKey(params.schema.primaryKey);\r\n\r\n const useIndexes = params.schema.indexes ? params.schema.indexes.slice(0) : [];\r\n useIndexes.push([primaryPath]);\r\n const useIndexesFinal = useIndexes.map(index => {\r\n const indexAr = toArray(index);\r\n return indexAr;\r\n });\r\n useIndexesFinal.push(CLEANUP_INDEX);\r\n const indexes: ById<IndexMeta<RxDocType>> = {};\r\n useIndexesFinal.forEach((indexAr, indexId) => {\r\n const indexName = getIndexName(indexAr);\r\n indexes[indexName] = {\r\n indexId: '|' + indexId + '|',\r\n indexName,\r\n getIndexableString: getIndexableStringMonad(params.schema, indexAr),\r\n index: indexAr\r\n };\r\n });\r\n\r\n const internals: LocalstorageStorageInternals<RxDocType> = {\r\n indexes\r\n };\r\n\r\n const instance = new RxStorageInstanceLocalstorage(\r\n storage,\r\n params.databaseName,\r\n params.collectionName,\r\n params.schema,\r\n internals,\r\n params.options,\r\n settings,\r\n params.multiInstance,\r\n params.databaseInstanceToken\r\n );\r\n return instance;\r\n}\r\n\r\n\r\nexport function getIndexName(index: string[]): string {\r\n return index.join('|');\r\n}\r\nexport const CLEANUP_INDEX: string[] = ['_deleted', '_meta.lwt'];\r\nexport type IndexMeta<RxDocType> = {\r\n indexId: string;\r\n indexName: string;\r\n index: string[];\r\n getIndexableString: (doc: RxDocumentData<RxDocType>) => string;\r\n};\r\n\r\nfunction sortByIndexStringComparator(a: [string, string], b: [string, string]) {\r\n if (a[0] < b[0]) {\r\n return -1;\r\n } else {\r\n return 1;\r\n }\r\n}\r\n\r\nfunction compareDocsWithIndex<RxDocType>(\r\n a: [string, string],\r\n b: [string, string]\r\n): 1 | 0 | -1 {\r\n const indexStringA = a[0];\r\n const indexStringB = b[0];\r\n if (indexStringA < indexStringB) {\r\n return -1;\r\n } else if (indexStringA === indexStringB) {\r\n return 0;\r\n } else {\r\n return 1;\r\n }\r\n}\r\n\r\nfunction ensureNotRemoved(\r\n instance: RxStorageInstanceLocalstorage<any>\r\n) {\r\n if (instance.removed) {\r\n throw new Error('removed');\r\n }\r\n}\r\n"],"mappings":";AAAA,SAAqBA,OAAO,QAAsB,MAAM;AACxD,SACIC,oBAAoB,EACpBC,oBAAoB,EACpBC,mBAAmB,EACnBC,cAAc,EACdC,GAAG,EACHC,OAAO,QACJ,mBAAmB;AAmB1B,SACIC,uBAAuB,QACpB,4BAA4B;AACnC,SAASC,2BAA2B,QAAQ,2BAA2B;AACvE,SAASC,eAAe,EAAEC,iBAAiB,QAAQ,0BAA0B;AAC7E,SAASC,UAAU,QAAQ,mBAAmB;AAE9C,SACIC,uBAAuB,EACvBC,iCAAiC,EACjCC,iCAAiC,QAC9B,uBAAuB;AAC9B,SAASC,kBAAkB,QAAQ,6BAA6B;AAChE,SAASC,OAAO,EAAEC,OAAO,EAAEC,OAAO,EAAEC,OAAO,EAAEC,OAAO,QAAQ,2CAA2C;AAEvG,OAAO,IAAMC,4BAA4B,GAAG,cAAc;;AAa1D;;AASA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,mBAKX,GAAG,IAAItB,OAAO,CAAC,CAAC;AAClB,IAAMuB,4BAA4B,GAAGD,mBAAmB,CAACE,YAAY,CAAC,CAAC;AACvE,IAAIC,4BAA4B,GAAG,KAAK;AACxC,OAAO,SAASC,qBAAqBA,CAAA,EAAG;EACpC,IAAI,CAACD,4BAA4B,IAAI,OAAOE,MAAM,KAAK,WAAW,EAAE;IAChEF,4BAA4B,GAAG,IAAI;IACnCE,MAAM,CAACC,gBAAgB,CAAC,SAAS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AAC1K,MAAM,EACbC,SAAS,EACTyK,MAAM,CAACxK,OAAO,EACdC,QAAQ,EACRuK,MAAM,CAACtK,aAAa,EACpBsK,MAAM,CAACrK,qBACX,CAAC;EACD,OAAO0K,QAAQ;AACnB;AAGA,OAAO,SAAS3I,YAAYA,CAACF,KAAe,EAAU;EAClD,OAAOA,KAAK,CAAC8I,IAAI,CAAC,GAAG,CAAC;AAC1B;AACA,OAAO,IAAM3B,aAAuB,GAAG,CAAC,UAAU,EAAE,WAAW,CAAC;AAQhE,SAAS1E,2BAA2BA,CAACsG,CAAmB,EAAEC,CAAmB,EAAE;EAC3E,IAAID,CAAC,CAAC,CAAC,CAAC,GAAGC,CAAC,CAAC,CAAC,CAAC,EAAE;IACb,OAAO,CAAC,CAAC;EACb,CAAC,MAAM;IACH,OAAO,CAAC;EACZ;AACJ;AAEA,SAAShG,oBAAoBA,CACzB+F,CAAmB,EACnBC,CAAmB,EACT;EACV,IAAMC,YAAY,GAAGF,CAAC,CAAC,CAAC,CAAC;EACzB,IAAMG,YAAY,GAAGF,CAAC,CAAC,CAAC,CAAC;EACzB,IAAIC,YAAY,GAAGC,YAAY,EAAE;IAC7B,OAAO,CAAC,CAAC;EACb,CAAC,MAAM,IAAID,YAAY,KAAKC,YAAY,EAAE;IACtC,OAAO,CAAC;EACZ,CAAC,MAAM;IACH,OAAO,CAAC;EACZ;AACJ;AAEA,SAASnB,gBAAgBA,CACrBc,QAA4C,EAC9C;EACE,IAAIA,QAAQ,CAACxK,OAAO,EAAE;IAClB,MAAM,IAAI8K,KAAK,CAAC,SAAS,CAAC;EAC9B;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Everything in this file was copied and adapted from
|
|
3
|
+
* @link https://github.com/mikolalysenko/binary-search-bounds
|
|
4
|
+
*
|
|
5
|
+
* We should use the original npm module instead when this bug is fixed:
|
|
6
|
+
* @link https://github.com/mikolalysenko/binary-search-bounds/pull/14
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
function ge(a, y, c, l, h) {
|
|
10
|
+
var i = h + 1;
|
|
11
|
+
while (l <= h) {
|
|
12
|
+
var m = l + h >>> 1;
|
|
13
|
+
var x = a[m];
|
|
14
|
+
var p = c !== undefined ? c(x, y) : x - y;
|
|
15
|
+
if (p >= 0) {
|
|
16
|
+
i = m;
|
|
17
|
+
h = m - 1;
|
|
18
|
+
} else {
|
|
19
|
+
l = m + 1;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return i;
|
|
23
|
+
}
|
|
24
|
+
function gt(a, y, c, l, h) {
|
|
25
|
+
var i = h + 1;
|
|
26
|
+
while (l <= h) {
|
|
27
|
+
var m = l + h >>> 1;
|
|
28
|
+
var x = a[m];
|
|
29
|
+
var p = c !== undefined ? c(x, y) : x - y;
|
|
30
|
+
if (p > 0) {
|
|
31
|
+
i = m;
|
|
32
|
+
h = m - 1;
|
|
33
|
+
} else {
|
|
34
|
+
l = m + 1;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return i;
|
|
38
|
+
}
|
|
39
|
+
function lt(a, y, c, l, h) {
|
|
40
|
+
var i = l - 1;
|
|
41
|
+
while (l <= h) {
|
|
42
|
+
var m = l + h >>> 1,
|
|
43
|
+
x = a[m];
|
|
44
|
+
var p = c !== undefined ? c(x, y) : x - y;
|
|
45
|
+
if (p < 0) {
|
|
46
|
+
i = m;
|
|
47
|
+
l = m + 1;
|
|
48
|
+
} else {
|
|
49
|
+
h = m - 1;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return i;
|
|
53
|
+
}
|
|
54
|
+
function le(a, y, c, l, h) {
|
|
55
|
+
var i = l - 1;
|
|
56
|
+
while (l <= h) {
|
|
57
|
+
var m = l + h >>> 1,
|
|
58
|
+
x = a[m];
|
|
59
|
+
var p = c !== undefined ? c(x, y) : x - y;
|
|
60
|
+
if (p <= 0) {
|
|
61
|
+
i = m;
|
|
62
|
+
l = m + 1;
|
|
63
|
+
} else {
|
|
64
|
+
h = m - 1;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return i;
|
|
68
|
+
}
|
|
69
|
+
function eq(a, y, c, l, h) {
|
|
70
|
+
while (l <= h) {
|
|
71
|
+
var m = l + h >>> 1,
|
|
72
|
+
x = a[m];
|
|
73
|
+
var p = c !== undefined ? c(x, y) : x - y;
|
|
74
|
+
if (p === 0) {
|
|
75
|
+
return m;
|
|
76
|
+
}
|
|
77
|
+
if (p <= 0) {
|
|
78
|
+
l = m + 1;
|
|
79
|
+
} else {
|
|
80
|
+
h = m - 1;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return -1;
|
|
84
|
+
}
|
|
85
|
+
function norm(a, y, c, l, h, f) {
|
|
86
|
+
return f(a, y, c, l === undefined ? 0 : l | 0, h === undefined ? a.length - 1 : h | 0);
|
|
87
|
+
}
|
|
88
|
+
export function boundGE(a, y, c, l, h) {
|
|
89
|
+
return norm(a, y, c, l, h, ge);
|
|
90
|
+
}
|
|
91
|
+
export function boundGT(a, y, c, l, h) {
|
|
92
|
+
return norm(a, y, c, l, h, gt);
|
|
93
|
+
}
|
|
94
|
+
export function boundLT(a, y, c, l, h) {
|
|
95
|
+
return norm(a, y, c, l, h, lt);
|
|
96
|
+
}
|
|
97
|
+
export function boundLE(a, y, c, l, h) {
|
|
98
|
+
return norm(a, y, c, l, h, le);
|
|
99
|
+
}
|
|
100
|
+
export function boundEQ(a, y, c, l, h) {
|
|
101
|
+
return norm(a, y, c, l, h, eq);
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=binary-search-bounds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binary-search-bounds.js","names":["ge","a","y","c","l","h","i","m","x","p","undefined","gt","lt","le","eq","norm","f","length","boundGE","boundGT","boundLT","boundLE","boundEQ"],"sources":["../../../../src/plugins/storage-memory/binary-search-bounds.ts"],"sourcesContent":["/**\r\n * Everything in this file was copied and adapted from\r\n * @link https://github.com/mikolalysenko/binary-search-bounds\r\n *\r\n * We should use the original npm module instead when this bug is fixed:\r\n * @link https://github.com/mikolalysenko/binary-search-bounds/pull/14\r\n */\r\n\r\n\r\n\r\ntype Compare<T> = ((a: T, b: T) => number | null | undefined);\r\n\r\nfunction ge<T>(a: T[], y: T, c: Compare<T>, l?: any, h?: any): number {\r\n let i: number = h + 1;\r\n while (l <= h) {\r\n const m = (l + h) >>> 1;\r\n const x: any = a[m];\r\n const p: any = (c !== undefined) ? c(x, y) : (x - (y as any));\r\n if (p >= 0) {\r\n i = m; h = m - 1;\r\n } else {\r\n l = m + 1;\r\n }\r\n }\r\n return i;\r\n}\r\n\r\nfunction gt<T>(a: T[], y: T, c: Compare<T>, l?: any, h?: any): number {\r\n let i = h + 1;\r\n while (l <= h) {\r\n const m = (l + h) >>> 1;\r\n const x = a[m];\r\n const p: any = (c !== undefined) ? c(x, y) : ((x as any) - (y as any));\r\n if (p > 0) {\r\n i = m; h = m - 1;\r\n } else {\r\n l = m + 1;\r\n }\r\n }\r\n return i;\r\n}\r\n\r\nfunction lt<T>(a: T[], y: T, c: Compare<T>, l?: any, h?: any): number {\r\n let i = l - 1;\r\n while (l <= h) {\r\n const m = (l + h) >>> 1, x = a[m];\r\n const p: any = (c !== undefined) ? c(x, y) : ((x as any) - (y as any));\r\n if (p < 0) {\r\n i = m; l = m + 1;\r\n } else {\r\n h = m - 1;\r\n }\r\n }\r\n return i;\r\n}\r\n\r\nfunction le<T>(a: T[], y: T, c: Compare<T>, l?: any, h?: any): number {\r\n let i = l - 1;\r\n while (l <= h) {\r\n const m = (l + h) >>> 1, x = a[m];\r\n const p: any = (c !== undefined) ? c(x, y) : ((x as any) - (y as any));\r\n if (p <= 0) {\r\n i = m; l = m + 1;\r\n } else {\r\n h = m - 1;\r\n }\r\n }\r\n return i;\r\n}\r\n\r\nfunction eq<T>(a: T[], y: T, c: Compare<T>, l?: any, h?: any): number {\r\n while (l <= h) {\r\n const m = (l + h) >>> 1, x = a[m];\r\n const p: any = (c !== undefined) ? c(x, y) : ((x as any) - (y as any));\r\n if (p === 0) {\r\n return m;\r\n }\r\n if (p <= 0) {\r\n l = m + 1;\r\n } else {\r\n h = m - 1;\r\n }\r\n }\r\n return -1;\r\n}\r\n\r\nfunction norm<T>(a: T[], y: T, c: Compare<T>, l: any, h: any, f: any) {\r\n return f(a, y, c, (l === undefined) ? 0 : l | 0, (h === undefined) ? a.length - 1 : h | 0);\r\n}\r\n\r\n\r\nexport function boundGE<T>(a: T[], y: T, c: Compare<T>, l?: any, h?: any) {\r\n return norm(a, y, c, l, h, ge);\r\n}\r\nexport function boundGT<T>(a: T[], y: T, c: Compare<T>, l?: any, h?: any) {\r\n return norm(a, y, c, l, h, gt);\r\n}\r\nexport function boundLT<T>(a: T[], y: T, c: Compare<T>, l?: any, h?: any) {\r\n return norm(a, y, c, l, h, lt);\r\n}\r\nexport function boundLE<T>(a: T[], y: T, c: Compare<T>, l?: any, h?: any) {\r\n return norm(a, y, c, l, h, le);\r\n}\r\nexport function boundEQ<T>(a: T[], y: T, c: Compare<T>, l?: any, h?: any) {\r\n return norm(a, y, c, l, h, eq);\r\n}\r\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA,SAASA,EAAEA,CAAIC,CAAM,EAAEC,CAAI,EAAEC,CAAa,EAAEC,CAAO,EAAEC,CAAO,EAAU;EAClE,IAAIC,CAAS,GAAGD,CAAC,GAAG,CAAC;EACrB,OAAOD,CAAC,IAAIC,CAAC,EAAE;IACX,IAAME,CAAC,GAAIH,CAAC,GAAGC,CAAC,KAAM,CAAC;IACvB,IAAMG,CAAM,GAAGP,CAAC,CAACM,CAAC,CAAC;IACnB,IAAME,CAAM,GAAIN,CAAC,KAAKO,SAAS,GAAIP,CAAC,CAACK,CAAC,EAAEN,CAAC,CAAC,GAAIM,CAAC,GAAIN,CAAU;IAC7D,IAAIO,CAAC,IAAI,CAAC,EAAE;MACRH,CAAC,GAAG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