@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,271 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* For some RxStorage implementations,
|
|
3
|
+
* we need to use our custom crafted indexes
|
|
4
|
+
* so we can easily iterate over them. And sort plain arrays of document data.
|
|
5
|
+
*
|
|
6
|
+
* We really often have to craft an index string for a given document.
|
|
7
|
+
* Performance of everything in this file is very important
|
|
8
|
+
* which is why the code sometimes looks strange.
|
|
9
|
+
* Run performance tests before and after you touch anything here!
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { getSchemaByObjectPath } from "./rx-schema-helper.js";
|
|
13
|
+
import { ensureNotFalsy, objectPathMonad } from "./plugins/utils/index.js";
|
|
14
|
+
import { INDEX_MAX, INDEX_MIN } from "./query-planner.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Prepare all relevant information
|
|
18
|
+
* outside of the returned function
|
|
19
|
+
* from getIndexableStringMonad()
|
|
20
|
+
* to save performance when the returned
|
|
21
|
+
* function is called many times.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
export function getIndexMeta(schema, index) {
|
|
25
|
+
var fieldNameProperties = index.map(fieldName => {
|
|
26
|
+
var schemaPart = getSchemaByObjectPath(schema, fieldName);
|
|
27
|
+
if (!schemaPart) {
|
|
28
|
+
throw new Error('not in schema: ' + fieldName);
|
|
29
|
+
}
|
|
30
|
+
var type = schemaPart.type;
|
|
31
|
+
var parsedLengths;
|
|
32
|
+
if (type === 'number' || type === 'integer') {
|
|
33
|
+
parsedLengths = getStringLengthOfIndexNumber(schemaPart);
|
|
34
|
+
}
|
|
35
|
+
var getValue = objectPathMonad(fieldName);
|
|
36
|
+
var maxLength = schemaPart.maxLength ? schemaPart.maxLength : 0;
|
|
37
|
+
var getIndexStringPart;
|
|
38
|
+
if (type === 'string') {
|
|
39
|
+
getIndexStringPart = docData => {
|
|
40
|
+
var fieldValue = getValue(docData);
|
|
41
|
+
if (!fieldValue) {
|
|
42
|
+
fieldValue = '';
|
|
43
|
+
}
|
|
44
|
+
return fieldValue.padEnd(maxLength, ' ');
|
|
45
|
+
};
|
|
46
|
+
} else if (type === 'boolean') {
|
|
47
|
+
getIndexStringPart = docData => {
|
|
48
|
+
var fieldValue = getValue(docData);
|
|
49
|
+
return fieldValue ? '1' : '0';
|
|
50
|
+
};
|
|
51
|
+
} else {
|
|
52
|
+
// number
|
|
53
|
+
getIndexStringPart = docData => {
|
|
54
|
+
var fieldValue = getValue(docData);
|
|
55
|
+
return getNumberIndexString(parsedLengths, fieldValue);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
var ret = {
|
|
59
|
+
fieldName,
|
|
60
|
+
schemaPart,
|
|
61
|
+
parsedLengths,
|
|
62
|
+
getValue,
|
|
63
|
+
getIndexStringPart
|
|
64
|
+
};
|
|
65
|
+
return ret;
|
|
66
|
+
});
|
|
67
|
+
return fieldNameProperties;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Crafts an indexable string that can be used
|
|
72
|
+
* to check if a document would be sorted below or above
|
|
73
|
+
* another documents, dependent on the index values.
|
|
74
|
+
* @monad for better performance
|
|
75
|
+
*
|
|
76
|
+
* IMPORTANT: Performance is really important here
|
|
77
|
+
* which is why we code so 'strange'.
|
|
78
|
+
* Always run performance tests when you want to
|
|
79
|
+
* change something in this method.
|
|
80
|
+
*/
|
|
81
|
+
export function getIndexableStringMonad(schema, index) {
|
|
82
|
+
var fieldNameProperties = getIndexMeta(schema, index);
|
|
83
|
+
var fieldNamePropertiesAmount = fieldNameProperties.length;
|
|
84
|
+
var indexPartsFunctions = fieldNameProperties.map(r => r.getIndexStringPart);
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @hotPath Performance of this function is very critical!
|
|
88
|
+
*/
|
|
89
|
+
var ret = function (docData) {
|
|
90
|
+
var str = '';
|
|
91
|
+
for (var i = 0; i < fieldNamePropertiesAmount; ++i) {
|
|
92
|
+
str += indexPartsFunctions[i](docData);
|
|
93
|
+
}
|
|
94
|
+
return str;
|
|
95
|
+
};
|
|
96
|
+
return ret;
|
|
97
|
+
}
|
|
98
|
+
export function getStringLengthOfIndexNumber(schemaPart) {
|
|
99
|
+
var minimum = Math.floor(schemaPart.minimum);
|
|
100
|
+
var maximum = Math.ceil(schemaPart.maximum);
|
|
101
|
+
var multipleOf = schemaPart.multipleOf;
|
|
102
|
+
var valueSpan = maximum - minimum;
|
|
103
|
+
var nonDecimals = valueSpan.toString().length;
|
|
104
|
+
var multipleOfParts = multipleOf.toString().split('.');
|
|
105
|
+
var decimals = 0;
|
|
106
|
+
if (multipleOfParts.length > 1) {
|
|
107
|
+
decimals = multipleOfParts[1].length;
|
|
108
|
+
}
|
|
109
|
+
return {
|
|
110
|
+
minimum,
|
|
111
|
+
maximum,
|
|
112
|
+
nonDecimals,
|
|
113
|
+
decimals,
|
|
114
|
+
roundedMinimum: minimum
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
export function getIndexStringLength(schema, index) {
|
|
118
|
+
var fieldNameProperties = getIndexMeta(schema, index);
|
|
119
|
+
var length = 0;
|
|
120
|
+
fieldNameProperties.forEach(props => {
|
|
121
|
+
var schemaPart = props.schemaPart;
|
|
122
|
+
var type = schemaPart.type;
|
|
123
|
+
if (type === 'string') {
|
|
124
|
+
length += schemaPart.maxLength;
|
|
125
|
+
} else if (type === 'boolean') {
|
|
126
|
+
length += 1;
|
|
127
|
+
} else {
|
|
128
|
+
var parsedLengths = props.parsedLengths;
|
|
129
|
+
length = length + parsedLengths.nonDecimals + parsedLengths.decimals;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
return length;
|
|
133
|
+
}
|
|
134
|
+
export function getPrimaryKeyFromIndexableString(indexableString, primaryKeyLength) {
|
|
135
|
+
var paddedPrimaryKey = indexableString.slice(primaryKeyLength * -1);
|
|
136
|
+
// we can safely trim here because the primary key is not allowed to start or end with a space char.
|
|
137
|
+
var primaryKey = paddedPrimaryKey.trim();
|
|
138
|
+
return primaryKey;
|
|
139
|
+
}
|
|
140
|
+
export function getNumberIndexString(parsedLengths, fieldValue) {
|
|
141
|
+
/**
|
|
142
|
+
* Ensure that the given value is in the boundaries
|
|
143
|
+
* of the schema, otherwise it would create a broken index string.
|
|
144
|
+
* This can happen for example if you have a minimum of 0
|
|
145
|
+
* and run a query like
|
|
146
|
+
* selector {
|
|
147
|
+
* numField: { $gt: -1000 }
|
|
148
|
+
* }
|
|
149
|
+
*/
|
|
150
|
+
if (typeof fieldValue === 'undefined') {
|
|
151
|
+
fieldValue = 0;
|
|
152
|
+
}
|
|
153
|
+
if (fieldValue < parsedLengths.minimum) {
|
|
154
|
+
fieldValue = parsedLengths.minimum;
|
|
155
|
+
}
|
|
156
|
+
if (fieldValue > parsedLengths.maximum) {
|
|
157
|
+
fieldValue = parsedLengths.maximum;
|
|
158
|
+
}
|
|
159
|
+
var nonDecimalsValueAsString = (Math.floor(fieldValue) - parsedLengths.roundedMinimum).toString();
|
|
160
|
+
var str = nonDecimalsValueAsString.padStart(parsedLengths.nonDecimals, '0');
|
|
161
|
+
if (parsedLengths.decimals > 0) {
|
|
162
|
+
var splitByDecimalPoint = fieldValue.toString().split('.');
|
|
163
|
+
var decimalValueAsString = splitByDecimalPoint.length > 1 ? splitByDecimalPoint[1] : '0';
|
|
164
|
+
str += decimalValueAsString.padEnd(parsedLengths.decimals, '0');
|
|
165
|
+
}
|
|
166
|
+
return str;
|
|
167
|
+
}
|
|
168
|
+
export function getStartIndexStringFromLowerBound(schema, index, lowerBound) {
|
|
169
|
+
var str = '';
|
|
170
|
+
index.forEach((fieldName, idx) => {
|
|
171
|
+
var schemaPart = getSchemaByObjectPath(schema, fieldName);
|
|
172
|
+
var bound = lowerBound[idx];
|
|
173
|
+
var type = schemaPart.type;
|
|
174
|
+
switch (type) {
|
|
175
|
+
case 'string':
|
|
176
|
+
var maxLength = ensureNotFalsy(schemaPart.maxLength, 'maxLength not set');
|
|
177
|
+
if (typeof bound === 'string') {
|
|
178
|
+
str += bound.padEnd(maxLength, ' ');
|
|
179
|
+
} else {
|
|
180
|
+
// str += ''.padStart(maxLength, inclusiveStart ? ' ' : INDEX_MAX);
|
|
181
|
+
str += ''.padEnd(maxLength, ' ');
|
|
182
|
+
}
|
|
183
|
+
break;
|
|
184
|
+
case 'boolean':
|
|
185
|
+
if (bound === null) {
|
|
186
|
+
str += '0';
|
|
187
|
+
} else if (bound === INDEX_MIN) {
|
|
188
|
+
str += '0';
|
|
189
|
+
} else if (bound === INDEX_MAX) {
|
|
190
|
+
str += '1';
|
|
191
|
+
} else {
|
|
192
|
+
var boolToStr = bound ? '1' : '0';
|
|
193
|
+
str += boolToStr;
|
|
194
|
+
}
|
|
195
|
+
break;
|
|
196
|
+
case 'number':
|
|
197
|
+
case 'integer':
|
|
198
|
+
var parsedLengths = getStringLengthOfIndexNumber(schemaPart);
|
|
199
|
+
if (bound === null || bound === INDEX_MIN) {
|
|
200
|
+
var fillChar = '0';
|
|
201
|
+
str += fillChar.repeat(parsedLengths.nonDecimals + parsedLengths.decimals);
|
|
202
|
+
} else if (bound === INDEX_MAX) {
|
|
203
|
+
str += getNumberIndexString(parsedLengths, parsedLengths.maximum);
|
|
204
|
+
} else {
|
|
205
|
+
var add = getNumberIndexString(parsedLengths, bound);
|
|
206
|
+
str += add;
|
|
207
|
+
}
|
|
208
|
+
break;
|
|
209
|
+
default:
|
|
210
|
+
throw new Error('unknown index type ' + type);
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
return str;
|
|
214
|
+
}
|
|
215
|
+
export function getStartIndexStringFromUpperBound(schema, index, upperBound) {
|
|
216
|
+
var str = '';
|
|
217
|
+
index.forEach((fieldName, idx) => {
|
|
218
|
+
var schemaPart = getSchemaByObjectPath(schema, fieldName);
|
|
219
|
+
var bound = upperBound[idx];
|
|
220
|
+
var type = schemaPart.type;
|
|
221
|
+
switch (type) {
|
|
222
|
+
case 'string':
|
|
223
|
+
var maxLength = ensureNotFalsy(schemaPart.maxLength, 'maxLength not set');
|
|
224
|
+
if (typeof bound === 'string' && bound !== INDEX_MAX) {
|
|
225
|
+
str += bound.padEnd(maxLength, ' ');
|
|
226
|
+
} else if (bound === INDEX_MIN) {
|
|
227
|
+
str += ''.padEnd(maxLength, ' ');
|
|
228
|
+
} else {
|
|
229
|
+
str += ''.padEnd(maxLength, INDEX_MAX);
|
|
230
|
+
}
|
|
231
|
+
break;
|
|
232
|
+
case 'boolean':
|
|
233
|
+
if (bound === null) {
|
|
234
|
+
str += '1';
|
|
235
|
+
} else {
|
|
236
|
+
var boolToStr = bound ? '1' : '0';
|
|
237
|
+
str += boolToStr;
|
|
238
|
+
}
|
|
239
|
+
break;
|
|
240
|
+
case 'number':
|
|
241
|
+
case 'integer':
|
|
242
|
+
var parsedLengths = getStringLengthOfIndexNumber(schemaPart);
|
|
243
|
+
if (bound === null || bound === INDEX_MAX) {
|
|
244
|
+
var fillChar = '9';
|
|
245
|
+
str += fillChar.repeat(parsedLengths.nonDecimals + parsedLengths.decimals);
|
|
246
|
+
} else if (bound === INDEX_MIN) {
|
|
247
|
+
var _fillChar = '0';
|
|
248
|
+
str += _fillChar.repeat(parsedLengths.nonDecimals + parsedLengths.decimals);
|
|
249
|
+
} else {
|
|
250
|
+
str += getNumberIndexString(parsedLengths, bound);
|
|
251
|
+
}
|
|
252
|
+
break;
|
|
253
|
+
default:
|
|
254
|
+
throw new Error('unknown index type ' + type);
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
return str;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Used in storages where it is not possible
|
|
262
|
+
* to define inclusiveEnd/inclusiveStart
|
|
263
|
+
*/
|
|
264
|
+
export function changeIndexableStringByOneQuantum(str, direction) {
|
|
265
|
+
var lastChar = str.slice(-1);
|
|
266
|
+
var charCode = lastChar.charCodeAt(0);
|
|
267
|
+
charCode = charCode + direction;
|
|
268
|
+
var withoutLastChar = str.slice(0, -1);
|
|
269
|
+
return withoutLastChar + String.fromCharCode(charCode);
|
|
270
|
+
}
|
|
271
|
+
//# sourceMappingURL=custom-index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-index.js","names":["getSchemaByObjectPath","ensureNotFalsy","objectPathMonad","INDEX_MAX","INDEX_MIN","getIndexMeta","schema","index","fieldNameProperties","map","fieldName","schemaPart","Error","type","parsedLengths","getStringLengthOfIndexNumber","getValue","maxLength","getIndexStringPart","docData","fieldValue","padEnd","getNumberIndexString","ret","getIndexableStringMonad","fieldNamePropertiesAmount","length","indexPartsFunctions","r","str","i","minimum","Math","floor","maximum","ceil","multipleOf","valueSpan","nonDecimals","toString","multipleOfParts","split","decimals","roundedMinimum","getIndexStringLength","forEach","props","getPrimaryKeyFromIndexableString","indexableString","primaryKeyLength","paddedPrimaryKey","slice","primaryKey","trim","nonDecimalsValueAsString","padStart","splitByDecimalPoint","decimalValueAsString","getStartIndexStringFromLowerBound","lowerBound","idx","bound","boolToStr","fillChar","repeat","add","getStartIndexStringFromUpperBound","upperBound","changeIndexableStringByOneQuantum","direction","lastChar","charCode","charCodeAt","withoutLastChar","String","fromCharCode"],"sources":["../../src/custom-index.ts"],"sourcesContent":["/**\r\n * For some RxStorage implementations,\r\n * we need to use our custom crafted indexes\r\n * so we can easily iterate over them. And sort plain arrays of document data.\r\n *\r\n * We really often have to craft an index string for a given document.\r\n * Performance of everything in this file is very important\r\n * which is why the code sometimes looks strange.\r\n * Run performance tests before and after you touch anything here!\r\n */\r\n\r\nimport {\r\n getSchemaByObjectPath\r\n} from './rx-schema-helper.ts';\r\nimport type {\r\n JsonSchema,\r\n RxDocumentData,\r\n RxJsonSchema\r\n} from './types/index.d.ts';\r\nimport {\r\n ensureNotFalsy,\r\n objectPathMonad,\r\n ObjectPathMonadFunction\r\n} from './plugins/utils/index.ts';\r\nimport {\r\n INDEX_MAX,\r\n INDEX_MIN\r\n} from './query-planner.ts';\r\n\r\n\r\n/**\r\n * Prepare all relevant information\r\n * outside of the returned function\r\n * from getIndexableStringMonad()\r\n * to save performance when the returned\r\n * function is called many times.\r\n */\r\ntype IndexMetaField<RxDocType> = {\r\n fieldName: string;\r\n schemaPart: JsonSchema;\r\n /*\r\n * Only in number fields.\r\n */\r\n parsedLengths?: ParsedLengths;\r\n getValue: ObjectPathMonadFunction<RxDocType>;\r\n getIndexStringPart: (docData: RxDocumentData<RxDocType>) => string;\r\n};\r\n\r\nexport function getIndexMeta<RxDocType>(\r\n schema: RxJsonSchema<RxDocumentData<RxDocType>>,\r\n index: string[]\r\n): IndexMetaField<RxDocType>[] {\r\n const fieldNameProperties: IndexMetaField<RxDocType>[] = index.map(fieldName => {\r\n const schemaPart = getSchemaByObjectPath(\r\n schema,\r\n fieldName\r\n );\r\n if (!schemaPart) {\r\n throw new Error('not in schema: ' + fieldName);\r\n }\r\n const type = schemaPart.type;\r\n let parsedLengths: ParsedLengths | undefined;\r\n if (type === 'number' || type === 'integer') {\r\n parsedLengths = getStringLengthOfIndexNumber(\r\n schemaPart\r\n );\r\n }\r\n\r\n const getValue = objectPathMonad(fieldName);\r\n const maxLength = schemaPart.maxLength ? schemaPart.maxLength : 0;\r\n\r\n let getIndexStringPart: (docData: RxDocumentData<RxDocType>) => string;\r\n if (type === 'string') {\r\n getIndexStringPart = docData => {\r\n let fieldValue = getValue(docData);\r\n if (!fieldValue) {\r\n fieldValue = '';\r\n }\r\n return fieldValue.padEnd(maxLength, ' ');\r\n };\r\n } else if (type === 'boolean') {\r\n getIndexStringPart = docData => {\r\n const fieldValue = getValue(docData);\r\n return fieldValue ? '1' : '0';\r\n };\r\n } else { // number\r\n getIndexStringPart = docData => {\r\n const fieldValue = getValue(docData);\r\n return getNumberIndexString(\r\n parsedLengths as any,\r\n fieldValue\r\n );\r\n };\r\n }\r\n\r\n const ret: IndexMetaField<RxDocType> = {\r\n fieldName,\r\n schemaPart,\r\n parsedLengths,\r\n getValue,\r\n getIndexStringPart\r\n };\r\n return ret;\r\n });\r\n return fieldNameProperties;\r\n}\r\n\r\n\r\n/**\r\n * Crafts an indexable string that can be used\r\n * to check if a document would be sorted below or above\r\n * another documents, dependent on the index values.\r\n * @monad for better performance\r\n *\r\n * IMPORTANT: Performance is really important here\r\n * which is why we code so 'strange'.\r\n * Always run performance tests when you want to\r\n * change something in this method.\r\n */\r\nexport function getIndexableStringMonad<RxDocType>(\r\n schema: RxJsonSchema<RxDocumentData<RxDocType>>,\r\n index: string[]\r\n): (docData: RxDocumentData<RxDocType>) => string {\r\n const fieldNameProperties = getIndexMeta(schema, index);\r\n const fieldNamePropertiesAmount = fieldNameProperties.length;\r\n const indexPartsFunctions = fieldNameProperties.map(r => r.getIndexStringPart);\r\n\r\n\r\n /**\r\n * @hotPath Performance of this function is very critical!\r\n */\r\n const ret = function (docData: RxDocumentData<RxDocType>): string {\r\n let str = '';\r\n for (let i = 0; i < fieldNamePropertiesAmount; ++i) {\r\n str += indexPartsFunctions[i](docData);\r\n }\r\n return str;\r\n };\r\n return ret;\r\n}\r\n\r\n\r\ndeclare type ParsedLengths = {\r\n minimum: number;\r\n maximum: number;\r\n nonDecimals: number;\r\n decimals: number;\r\n roundedMinimum: number;\r\n};\r\nexport function getStringLengthOfIndexNumber(\r\n schemaPart: JsonSchema\r\n): ParsedLengths {\r\n const minimum = Math.floor(schemaPart.minimum as number);\r\n const maximum = Math.ceil(schemaPart.maximum as number);\r\n const multipleOf: number = schemaPart.multipleOf as number;\r\n\r\n const valueSpan = maximum - minimum;\r\n const nonDecimals = valueSpan.toString().length;\r\n\r\n const multipleOfParts = multipleOf.toString().split('.');\r\n let decimals = 0;\r\n if (multipleOfParts.length > 1) {\r\n decimals = multipleOfParts[1].length;\r\n }\r\n return {\r\n minimum,\r\n maximum,\r\n nonDecimals,\r\n decimals,\r\n roundedMinimum: minimum\r\n };\r\n}\r\n\r\nexport function getIndexStringLength<RxDocType>(\r\n schema: RxJsonSchema<RxDocumentData<RxDocType>>,\r\n index: string[]\r\n): number {\r\n const fieldNameProperties = getIndexMeta(schema, index);\r\n let length = 0;\r\n fieldNameProperties.forEach(props => {\r\n const schemaPart = props.schemaPart;\r\n const type = schemaPart.type;\r\n\r\n if (type === 'string') {\r\n length += schemaPart.maxLength as number;\r\n } else if (type === 'boolean') {\r\n length += 1;\r\n } else {\r\n const parsedLengths = props.parsedLengths as ParsedLengths;\r\n length = length + parsedLengths.nonDecimals + parsedLengths.decimals;\r\n }\r\n\r\n });\r\n return length;\r\n}\r\n\r\n\r\nexport function getPrimaryKeyFromIndexableString(\r\n indexableString: string,\r\n primaryKeyLength: number\r\n): string {\r\n const paddedPrimaryKey = indexableString.slice(primaryKeyLength * -1);\r\n // we can safely trim here because the primary key is not allowed to start or end with a space char.\r\n const primaryKey = paddedPrimaryKey.trim();\r\n return primaryKey;\r\n}\r\n\r\n\r\nexport function getNumberIndexString(\r\n parsedLengths: ParsedLengths,\r\n fieldValue: number\r\n): string {\r\n /**\r\n * Ensure that the given value is in the boundaries\r\n * of the schema, otherwise it would create a broken index string.\r\n * This can happen for example if you have a minimum of 0\r\n * and run a query like\r\n * selector {\r\n * numField: { $gt: -1000 }\r\n * }\r\n */\r\n if (typeof fieldValue === 'undefined') {\r\n fieldValue = 0;\r\n }\r\n if (fieldValue < parsedLengths.minimum) {\r\n fieldValue = parsedLengths.minimum;\r\n }\r\n if (fieldValue > parsedLengths.maximum) {\r\n fieldValue = parsedLengths.maximum;\r\n }\r\n\r\n const nonDecimalsValueAsString = (Math.floor(fieldValue) - parsedLengths.roundedMinimum).toString();\r\n let str = nonDecimalsValueAsString.padStart(parsedLengths.nonDecimals, '0');\r\n\r\n if (parsedLengths.decimals > 0) {\r\n const splitByDecimalPoint = fieldValue.toString().split('.');\r\n const decimalValueAsString = splitByDecimalPoint.length > 1 ? splitByDecimalPoint[1] : '0';\r\n str += decimalValueAsString.padEnd(parsedLengths.decimals, '0');\r\n }\r\n return str;\r\n}\r\n\r\nexport function getStartIndexStringFromLowerBound(\r\n schema: RxJsonSchema<any>,\r\n index: string[],\r\n lowerBound: (string | boolean | number | null | undefined)[]\r\n): string {\r\n let str = '';\r\n index.forEach((fieldName, idx) => {\r\n const schemaPart = getSchemaByObjectPath(\r\n schema,\r\n fieldName\r\n );\r\n const bound = lowerBound[idx];\r\n const type = schemaPart.type;\r\n\r\n switch (type) {\r\n case 'string':\r\n const maxLength = ensureNotFalsy(schemaPart.maxLength, 'maxLength not set');\r\n if (typeof bound === 'string') {\r\n str += (bound as string).padEnd(maxLength, ' ');\r\n } else {\r\n // str += ''.padStart(maxLength, inclusiveStart ? ' ' : INDEX_MAX);\r\n str += ''.padEnd(maxLength, ' ');\r\n }\r\n break;\r\n case 'boolean':\r\n if (bound === null) {\r\n str += '0';\r\n } else if (bound === INDEX_MIN) {\r\n str += '0';\r\n } else if (bound === INDEX_MAX) {\r\n str += '1';\r\n } else {\r\n const boolToStr = bound ? '1' : '0';\r\n str += boolToStr;\r\n }\r\n break;\r\n case 'number':\r\n case 'integer':\r\n const parsedLengths = getStringLengthOfIndexNumber(\r\n schemaPart\r\n );\r\n if (bound === null || bound === INDEX_MIN) {\r\n const fillChar = '0';\r\n str += fillChar.repeat(parsedLengths.nonDecimals + parsedLengths.decimals);\r\n } else if (bound === INDEX_MAX) {\r\n str += getNumberIndexString(\r\n parsedLengths,\r\n parsedLengths.maximum\r\n );\r\n } else {\r\n const add = getNumberIndexString(\r\n parsedLengths,\r\n bound as number\r\n );\r\n str += add;\r\n }\r\n break;\r\n default:\r\n throw new Error('unknown index type ' + type);\r\n }\r\n });\r\n return str;\r\n}\r\n\r\n\r\nexport function getStartIndexStringFromUpperBound(\r\n schema: RxJsonSchema<any>,\r\n index: string[],\r\n upperBound: (string | boolean | number | null | undefined)[]\r\n): string {\r\n let str = '';\r\n index.forEach((fieldName, idx) => {\r\n const schemaPart = getSchemaByObjectPath(\r\n schema,\r\n fieldName\r\n );\r\n const bound = upperBound[idx];\r\n const type = schemaPart.type;\r\n\r\n switch (type) {\r\n case 'string':\r\n const maxLength = ensureNotFalsy(schemaPart.maxLength, 'maxLength not set');\r\n if (typeof bound === 'string' && bound !== INDEX_MAX) {\r\n str += (bound as string).padEnd(maxLength, ' ');\r\n } else if (bound === INDEX_MIN) {\r\n str += ''.padEnd(maxLength, ' ');\r\n } else {\r\n str += ''.padEnd(maxLength, INDEX_MAX);\r\n }\r\n break;\r\n case 'boolean':\r\n if (bound === null) {\r\n str += '1';\r\n } else {\r\n const boolToStr = bound ? '1' : '0';\r\n str += boolToStr;\r\n }\r\n break;\r\n case 'number':\r\n case 'integer':\r\n const parsedLengths = getStringLengthOfIndexNumber(\r\n schemaPart\r\n );\r\n if (bound === null || bound === INDEX_MAX) {\r\n const fillChar = '9';\r\n str += fillChar.repeat(parsedLengths.nonDecimals + parsedLengths.decimals);\r\n } else if (bound === INDEX_MIN) {\r\n const fillChar = '0';\r\n str += fillChar.repeat(parsedLengths.nonDecimals + parsedLengths.decimals);\r\n } else {\r\n str += getNumberIndexString(\r\n parsedLengths,\r\n bound as number\r\n );\r\n }\r\n break;\r\n default:\r\n throw new Error('unknown index type ' + type);\r\n }\r\n });\r\n return str;\r\n}\r\n\r\n/**\r\n * Used in storages where it is not possible\r\n * to define inclusiveEnd/inclusiveStart\r\n */\r\nexport function changeIndexableStringByOneQuantum(str: string, direction: 1 | -1): string {\r\n const lastChar = str.slice(-1);\r\n let charCode = lastChar.charCodeAt(0);\r\n charCode = charCode + direction;\r\n const withoutLastChar = str.slice(0, -1);\r\n return withoutLastChar + String.fromCharCode(charCode);\r\n}\r\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACIA,qBAAqB,QAClB,uBAAuB;AAM9B,SACIC,cAAc,EACdC,eAAe,QAEZ,0BAA0B;AACjC,SACIC,SAAS,EACTC,SAAS,QACN,oBAAoB;;AAG3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA,OAAO,SAASC,YAAYA,CACxBC,MAA+C,EAC/CC,KAAe,EACY;EAC3B,IAAMC,mBAAgD,GAAGD,KAAK,CAACE,GAAG,CAACC,SAAS,IAAI;IAC5E,IAAMC,UAAU,GAAGX,qBAAqB,CACpCM,MAAM,EACNI,SACJ,CAAC;IACD,IAAI,CAACC,UAAU,EAAE;MACb,MAAM,IAAIC,KAAK,CAAC,iBAAiB,GAAGF,SAAS,CAAC;IAClD;IACA,IAAMG,IAAI,GAAGF,UAAU,CAACE,IAAI;IAC5B,IAAIC,aAAwC;IAC5C,IAAID,IAAI,KAAK,QAAQ,IAAIA,IAAI,KAAK,SAAS,EAAE;MACzCC,aAAa,GAAGC,4BAA4B,CACxCJ,UACJ,CAAC;IACL;IAEA,IAAMK,QAAQ,GAAGd,eAAe,CAACQ,SAAS,CAAC;IAC3C,IAAMO,SAAS,GAAGN,UAAU,CAACM,SAAS,GAAGN,UAAU,CAACM,SAAS,GAAG,CAAC;IAEjE,IAAIC,kBAAkE;IACtE,IAAIL,IAAI,KAAK,QAAQ,EAAE;MACnBK,kBAAkB,GAAGC,OAAO,IAAI;QAC5B,IAAIC,UAAU,GAAGJ,QAAQ,CAACG,OAAO,CAAC;QAClC,IAAI,CAACC,UAAU,EAAE;UACbA,UAAU,GAAG,EAAE;QACnB;QACA,OAAOA,UAAU,CAACC,MAAM,CAACJ,SAAS,EAAE,GAAG,CAAC;MAC5C,CAAC;IACL,CAAC,MAAM,IAAIJ,IAAI,KAAK,SAAS,EAAE;M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SAAS;EAC/B,IAAMI,eAAe,GAAG5C,GAAG,CAACsB,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;EACxC,OAAOsB,eAAe,GAAGC,MAAM,CAACC,YAAY,CAACJ,QAAQ,CAAC;AAC1D","ignoreList":[]}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
2
|
+
import { getFromMapOrThrow, getHeightOfRevision, overwriteGetterForCaching, requestIdlePromiseNoQueue } from "./plugins/utils/index.js";
|
|
3
|
+
import { overwritable } from "./overwritable.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Because we have to create many cache items,
|
|
7
|
+
* we use an array instead of an object with properties
|
|
8
|
+
* for better performance and less memory usage.
|
|
9
|
+
* @link https://stackoverflow.com/questions/17295056/array-vs-object-efficiency-in-javascript
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The DocumentCache stores RxDocument objects
|
|
18
|
+
* by their primary key and revision.
|
|
19
|
+
* This is useful on client side applications where
|
|
20
|
+
* it is not known how much memory can be used, so
|
|
21
|
+
* we de-duplicate RxDocument states to save memory.
|
|
22
|
+
* To not fill up the memory with old document states, the DocumentCache
|
|
23
|
+
* only contains weak references to the RxDocuments themself.
|
|
24
|
+
* @link https://caniuse.com/?search=weakref
|
|
25
|
+
*/
|
|
26
|
+
export var DocumentCache = /*#__PURE__*/function () {
|
|
27
|
+
/**
|
|
28
|
+
* Process stuff lazy to not block the CPU
|
|
29
|
+
* on critical paths.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Some JavaScript runtimes like QuickJS,
|
|
34
|
+
* so not have a FinalizationRegistry or WeakRef.
|
|
35
|
+
* Therefore we need a workaround which might waste a lot of memory,
|
|
36
|
+
* but at least works.
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
function DocumentCache(primaryPath, changes$,
|
|
40
|
+
/**
|
|
41
|
+
* A method that can create a RxDocument by the given document data.
|
|
42
|
+
*/
|
|
43
|
+
documentCreator) {
|
|
44
|
+
this.cacheItemByDocId = new Map();
|
|
45
|
+
this.tasks = new Set();
|
|
46
|
+
this.registry = typeof FinalizationRegistry === 'function' ? new FinalizationRegistry(docMeta => {
|
|
47
|
+
var docId = docMeta.docId;
|
|
48
|
+
var cacheItem = this.cacheItemByDocId.get(docId);
|
|
49
|
+
if (cacheItem) {
|
|
50
|
+
cacheItem[0].delete(docMeta.revisionHeight + docMeta.lwt + '');
|
|
51
|
+
if (cacheItem[0].size === 0) {
|
|
52
|
+
/**
|
|
53
|
+
* No state of the document is cached anymore,
|
|
54
|
+
* so we can clean up.
|
|
55
|
+
*/
|
|
56
|
+
this.cacheItemByDocId.delete(docId);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}) : undefined;
|
|
60
|
+
this.primaryPath = primaryPath;
|
|
61
|
+
this.changes$ = changes$;
|
|
62
|
+
this.documentCreator = documentCreator;
|
|
63
|
+
changes$.subscribe(events => {
|
|
64
|
+
this.tasks.add(() => {
|
|
65
|
+
var cacheItemByDocId = this.cacheItemByDocId;
|
|
66
|
+
for (var index = 0; index < events.length; index++) {
|
|
67
|
+
var event = events[index];
|
|
68
|
+
var cacheItem = cacheItemByDocId.get(event.documentId);
|
|
69
|
+
if (cacheItem) {
|
|
70
|
+
var documentData = event.documentData;
|
|
71
|
+
if (!documentData) {
|
|
72
|
+
documentData = event.previousDocumentData;
|
|
73
|
+
}
|
|
74
|
+
cacheItem[1] = documentData;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
if (this.tasks.size <= 1) {
|
|
79
|
+
requestIdlePromiseNoQueue().then(() => {
|
|
80
|
+
this.processTasks();
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
var _proto = DocumentCache.prototype;
|
|
86
|
+
_proto.processTasks = function processTasks() {
|
|
87
|
+
if (this.tasks.size === 0) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
var tasks = Array.from(this.tasks);
|
|
91
|
+
tasks.forEach(task => task());
|
|
92
|
+
this.tasks.clear();
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Get the RxDocument from the cache
|
|
97
|
+
* and create a new one if not exits before.
|
|
98
|
+
* @overwrites itself with the actual function
|
|
99
|
+
* because this is @performance relevant.
|
|
100
|
+
* It is called on each document row for each write and read.
|
|
101
|
+
*/;
|
|
102
|
+
/**
|
|
103
|
+
* Throws if not exists
|
|
104
|
+
*/
|
|
105
|
+
_proto.getLatestDocumentData = function getLatestDocumentData(docId) {
|
|
106
|
+
this.processTasks();
|
|
107
|
+
var cacheItem = getFromMapOrThrow(this.cacheItemByDocId, docId);
|
|
108
|
+
return cacheItem[1];
|
|
109
|
+
};
|
|
110
|
+
_proto.getLatestDocumentDataIfExists = function getLatestDocumentDataIfExists(docId) {
|
|
111
|
+
this.processTasks();
|
|
112
|
+
var cacheItem = this.cacheItemByDocId.get(docId);
|
|
113
|
+
if (cacheItem) {
|
|
114
|
+
return cacheItem[1];
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
return _createClass(DocumentCache, [{
|
|
118
|
+
key: "getCachedRxDocuments",
|
|
119
|
+
get: function () {
|
|
120
|
+
var fn = getCachedRxDocumentMonad(this);
|
|
121
|
+
return overwriteGetterForCaching(this, 'getCachedRxDocuments', fn);
|
|
122
|
+
}
|
|
123
|
+
}, {
|
|
124
|
+
key: "getCachedRxDocument",
|
|
125
|
+
get: function () {
|
|
126
|
+
var fn = getCachedRxDocumentMonad(this);
|
|
127
|
+
return overwriteGetterForCaching(this, 'getCachedRxDocument', doc => fn([doc])[0]);
|
|
128
|
+
}
|
|
129
|
+
}]);
|
|
130
|
+
}();
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* This function is called very very often.
|
|
134
|
+
* @hotPath This is one of the most important methods for performance.
|
|
135
|
+
* It is used in many places to transform the raw document data into RxDocuments.
|
|
136
|
+
*/
|
|
137
|
+
function getCachedRxDocumentMonad(docCache) {
|
|
138
|
+
var primaryPath = docCache.primaryPath;
|
|
139
|
+
var cacheItemByDocId = docCache.cacheItemByDocId;
|
|
140
|
+
var registry = docCache.registry;
|
|
141
|
+
var deepFreezeWhenDevMode = overwritable.deepFreezeWhenDevMode;
|
|
142
|
+
var documentCreator = docCache.documentCreator;
|
|
143
|
+
var fn = docsData => {
|
|
144
|
+
var ret = new Array(docsData.length);
|
|
145
|
+
var registryTasks = [];
|
|
146
|
+
for (var index = 0; index < docsData.length; index++) {
|
|
147
|
+
var docData = docsData[index];
|
|
148
|
+
var docId = docData[primaryPath];
|
|
149
|
+
var revisionHeight = getHeightOfRevision(docData._rev);
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* @performance
|
|
153
|
+
* Compute the byRev cache key once and reuse it
|
|
154
|
+
* for both the Map.get() and Map.set() calls.
|
|
155
|
+
*/
|
|
156
|
+
var cacheKey = revisionHeight + docData._meta.lwt + '';
|
|
157
|
+
var byRev = void 0;
|
|
158
|
+
var cachedRxDocumentWeakRef = void 0;
|
|
159
|
+
var cacheItem = cacheItemByDocId.get(docId);
|
|
160
|
+
if (!cacheItem) {
|
|
161
|
+
byRev = new Map();
|
|
162
|
+
cacheItem = [byRev, docData];
|
|
163
|
+
cacheItemByDocId.set(docId, cacheItem);
|
|
164
|
+
} else {
|
|
165
|
+
byRev = cacheItem[0];
|
|
166
|
+
cachedRxDocumentWeakRef = byRev.get(cacheKey);
|
|
167
|
+
}
|
|
168
|
+
var cachedRxDocument = cachedRxDocumentWeakRef ? cachedRxDocumentWeakRef.deref() : undefined;
|
|
169
|
+
if (!cachedRxDocument) {
|
|
170
|
+
docData = deepFreezeWhenDevMode(docData);
|
|
171
|
+
cachedRxDocument = documentCreator(docData);
|
|
172
|
+
byRev.set(cacheKey, createWeakRefWithFallback(cachedRxDocument));
|
|
173
|
+
if (registry) {
|
|
174
|
+
registryTasks.push(cachedRxDocument);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
ret[index] = cachedRxDocument;
|
|
178
|
+
}
|
|
179
|
+
if (registryTasks.length > 0 && registry) {
|
|
180
|
+
/**
|
|
181
|
+
* Calling registry.register() has shown to have
|
|
182
|
+
* really bad performance. So we add the cached documents
|
|
183
|
+
* lazily.
|
|
184
|
+
*/
|
|
185
|
+
docCache.tasks.add(() => {
|
|
186
|
+
for (var _index = 0; _index < registryTasks.length; _index++) {
|
|
187
|
+
var doc = registryTasks[_index];
|
|
188
|
+
registry.register(doc, {
|
|
189
|
+
docId: doc.primary,
|
|
190
|
+
revisionHeight: getHeightOfRevision(doc.revision),
|
|
191
|
+
lwt: doc._data._meta.lwt
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
if (docCache.tasks.size <= 1) {
|
|
196
|
+
requestIdlePromiseNoQueue().then(() => {
|
|
197
|
+
docCache.processTasks();
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return ret;
|
|
202
|
+
};
|
|
203
|
+
return fn;
|
|
204
|
+
}
|
|
205
|
+
export function mapDocumentsDataToCacheDocs(docCache, docsData) {
|
|
206
|
+
var getCachedRxDocuments = docCache.getCachedRxDocuments;
|
|
207
|
+
return getCachedRxDocuments(docsData);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Fallback for JavaScript runtimes that do not support WeakRef.
|
|
212
|
+
* The fallback will keep the items in cache forever,
|
|
213
|
+
* but at least works.
|
|
214
|
+
*/
|
|
215
|
+
var HAS_WEAK_REF = typeof WeakRef === 'function';
|
|
216
|
+
var createWeakRefWithFallback = HAS_WEAK_REF ? createWeakRef : createWeakRefFallback;
|
|
217
|
+
function createWeakRef(obj) {
|
|
218
|
+
return new WeakRef(obj);
|
|
219
|
+
}
|
|
220
|
+
function createWeakRefFallback(obj) {
|
|
221
|
+
return {
|
|
222
|
+
deref() {
|
|
223
|
+
return obj;
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
//# sourceMappingURL=doc-cache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doc-cache.js","names":["getFromMapOrThrow","getHeightOfRevision","overwriteGetterForCaching","requestIdlePromiseNoQueue","overwritable","DocumentCache","primaryPath","changes$","documentCreator","cacheItemByDocId","Map","tasks","Set","registry","FinalizationRegistry","docMeta","docId","cacheItem","get","delete","revisionHeight","lwt","size","undefined","subscribe","events","add","index","length","event","documentId","documentData","previousDocumentData","then","processTasks","_proto","prototype","Array","from","forEach","task","clear","getLatestDocumentData","getLatestDocumentDataIfExists","_createClass","key","fn","getCachedRxDocumentMonad","doc","docCache","deepFreezeWhenDevMode","docsData","ret","registryTasks","docData","_rev","cacheKey","_meta","byRev","cachedRxDocumentWeakRef","set","cachedRxDocument","deref","createWeakRefWithFallback","push","register","primary","revision","_data","mapDocumentsDataToCacheDocs","getCachedRxDocuments","HAS_WEAK_REF","WeakRef","createWeakRef","createWeakRefFallback","obj"],"sources":["../../src/doc-cache.ts"],"sourcesContent":["import type {\r\n RxDocument,\r\n RxDocumentData,\r\n RxStorageChangeEvent,\r\n WeakRef,\r\n FinalizationRegistry\r\n} from './types/index.d.ts';\r\nimport {\r\n getFromMapOrThrow,\r\n getHeightOfRevision,\r\n overwriteGetterForCaching,\r\n requestIdlePromiseNoQueue\r\n} from './plugins/utils/index.ts';\r\nimport {\r\n overwritable\r\n} from './overwritable.ts';\r\nimport { Observable } from 'rxjs';\r\n\r\n/**\r\n * Because we have to create many cache items,\r\n * we use an array instead of an object with properties\r\n * for better performance and less memory usage.\r\n * @link https://stackoverflow.com/questions/17295056/array-vs-object-efficiency-in-javascript\r\n */\r\ndeclare type CacheItem<RxDocType, OrmMethods> = [\r\n /**\r\n * Store the different document states of time\r\n * based on their [revisionHeight+_meta.lwt] .\r\n * We store WeakRefs so that we can later clean up\r\n * document states that are no longer needed.\r\n *\r\n * Notice that we can not only rely on the revisionHeight\r\n * because when cleanup is used, two document states can end up with\r\n * the same revision but different _meta.lwt.\r\n */\r\n Map<string, WeakRef<RxDocument<RxDocType, OrmMethods>>>,\r\n\r\n /**\r\n * Store the latest known document state.\r\n * As long as any state of the document is in the cache,\r\n * we observe the changestream and update the latestDoc accordingly.\r\n * This makes it easier to optimize performance on other parts\r\n * because for each known document we can always get the current state\r\n * in the storage.\r\n * Also it makes it possible to call RxDocument.latest() in a non-async way\r\n * to retrieve the latest document state or to observe$ some property.\r\n *\r\n * To not prevent the whole cacheItem from being garbage collected,\r\n * we store only the document data here, but not the RxDocument.\r\n */\r\n RxDocumentData<RxDocType>\r\n];\r\n\r\n\r\n/**\r\n * @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\r\n */\r\ndeclare type FinalizationRegistryValue = {\r\n docId: string;\r\n revisionHeight: number;\r\n lwt: number;\r\n};\r\n\r\n/**\r\n * The DocumentCache stores RxDocument objects\r\n * by their primary key and revision.\r\n * This is useful on client side applications where\r\n * it is not known how much memory can be used, so\r\n * we de-duplicate RxDocument states to save memory.\r\n * To not fill up the memory with old document states, the DocumentCache\r\n * only contains weak references to the RxDocuments themself.\r\n * @link https://caniuse.com/?search=weakref\r\n */\r\nexport class DocumentCache<RxDocType, OrmMethods> {\r\n public readonly cacheItemByDocId = new Map<string, CacheItem<RxDocType, OrmMethods>>();\r\n\r\n /**\r\n * Process stuff lazy to not block the CPU\r\n * on critical paths.\r\n */\r\n public readonly tasks = new Set<Function>();\r\n\r\n /**\r\n * Some JavaScript runtimes like QuickJS,\r\n * so not have a FinalizationRegistry or WeakRef.\r\n * Therefore we need a workaround which might waste a lot of memory,\r\n * but at least works.\r\n */\r\n public readonly registry?: FinalizationRegistry<FinalizationRegistryValue> = typeof FinalizationRegistry === 'function' ?\r\n new FinalizationRegistry<FinalizationRegistryValue>(docMeta => {\r\n const docId = docMeta.docId;\r\n const cacheItem = this.cacheItemByDocId.get(docId);\r\n if (cacheItem) {\r\n cacheItem[0].delete(docMeta.revisionHeight + docMeta.lwt + '');\r\n if (cacheItem[0].size === 0) {\r\n /**\r\n * No state of the document is cached anymore,\r\n * so we can clean up.\r\n */\r\n this.cacheItemByDocId.delete(docId);\r\n }\r\n }\r\n }) as any :\r\n undefined;\r\n\r\n constructor(\r\n public readonly primaryPath: string,\r\n public readonly changes$: Observable<RxStorageChangeEvent<RxDocType>[]>,\r\n /**\r\n * A method that can create a RxDocument by the given document data.\r\n */\r\n public documentCreator: (docData: RxDocumentData<RxDocType>) => RxDocument<RxDocType, OrmMethods>\r\n ) {\r\n changes$.subscribe((events: RxStorageChangeEvent<RxDocType>[]) => {\r\n this.tasks.add(() => {\r\n const cacheItemByDocId = this.cacheItemByDocId;\r\n for (let index = 0; index < events.length; index++) {\r\n const event = events[index];\r\n const cacheItem = cacheItemByDocId.get(event.documentId);\r\n if (cacheItem) {\r\n let documentData = event.documentData;\r\n if (!documentData) {\r\n documentData = event.previousDocumentData as any;\r\n }\r\n cacheItem[1] = documentData;\r\n }\r\n }\r\n });\r\n if (this.tasks.size <= 1) {\r\n requestIdlePromiseNoQueue().then(() => {\r\n this.processTasks();\r\n });\r\n }\r\n });\r\n }\r\n\r\n public processTasks() {\r\n if (this.tasks.size === 0) {\r\n return;\r\n }\r\n const tasks = Array.from(this.tasks);\r\n tasks.forEach(task => task());\r\n this.tasks.clear();\r\n }\r\n\r\n /**\r\n * Get the RxDocument from the cache\r\n * and create a new one if not exits before.\r\n * @overwrites itself with the actual function\r\n * because this is @performance relevant.\r\n * It is called on each document row for each write and read.\r\n */\r\n get getCachedRxDocuments(): (docsData: RxDocumentData<RxDocType>[]) => RxDocument<RxDocType, OrmMethods>[] {\r\n const fn = getCachedRxDocumentMonad(this);\r\n return overwriteGetterForCaching(\r\n this,\r\n 'getCachedRxDocuments',\r\n fn\r\n );\r\n }\r\n\r\n get getCachedRxDocument(): (docData: RxDocumentData<RxDocType>) => RxDocument<RxDocType, OrmMethods> {\r\n const fn = getCachedRxDocumentMonad(this);\r\n return overwriteGetterForCaching(\r\n this,\r\n 'getCachedRxDocument',\r\n doc => fn([doc])[0]\r\n );\r\n }\r\n\r\n /**\r\n * Throws if not exists\r\n */\r\n public getLatestDocumentData(docId: string): RxDocumentData<RxDocType> {\r\n this.processTasks();\r\n const cacheItem = getFromMapOrThrow(this.cacheItemByDocId, docId);\r\n return cacheItem[1];\r\n }\r\n\r\n public getLatestDocumentDataIfExists(docId: string): RxDocumentData<RxDocType> | undefined {\r\n this.processTasks();\r\n const cacheItem = this.cacheItemByDocId.get(docId);\r\n if (cacheItem) {\r\n return cacheItem[1];\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * This function is called very very often.\r\n * @hotPath This is one of the most important methods for performance.\r\n * It is used in many places to transform the raw document data into RxDocuments.\r\n */\r\nfunction getCachedRxDocumentMonad<RxDocType, OrmMethods>(\r\n docCache: DocumentCache<RxDocType, OrmMethods>\r\n): (docsData: RxDocumentData<RxDocType>[]) => RxDocument<RxDocType, OrmMethods>[] {\r\n const primaryPath = docCache.primaryPath;\r\n const cacheItemByDocId = docCache.cacheItemByDocId;\r\n const registry = docCache.registry;\r\n const deepFreezeWhenDevMode = overwritable.deepFreezeWhenDevMode;\r\n const documentCreator = docCache.documentCreator;\r\n const fn: (docsData: RxDocumentData<RxDocType>[]) => RxDocument<RxDocType, OrmMethods>[] = (docsData: RxDocumentData<RxDocType>[]) => {\r\n const ret: RxDocument<RxDocType, OrmMethods>[] = new Array(docsData.length);\r\n const registryTasks: RxDocument<RxDocType, OrmMethods>[] = [];\r\n for (let index = 0; index < docsData.length; index++) {\r\n let docData = docsData[index];\r\n const docId: string = (docData as any)[primaryPath];\r\n\r\n const revisionHeight = getHeightOfRevision(docData._rev);\r\n\r\n /**\r\n * @performance\r\n * Compute the byRev cache key once and reuse it\r\n * for both the Map.get() and Map.set() calls.\r\n */\r\n const cacheKey = revisionHeight + docData._meta.lwt + '';\r\n\r\n let byRev: Map<string, WeakRef<RxDocument<RxDocType, OrmMethods>>>;\r\n let cachedRxDocumentWeakRef: WeakRef<RxDocument<RxDocType, OrmMethods>> | undefined;\r\n let cacheItem = cacheItemByDocId.get(docId);\r\n if (!cacheItem) {\r\n byRev = new Map();\r\n cacheItem = [\r\n byRev,\r\n docData\r\n ];\r\n cacheItemByDocId.set(docId, cacheItem);\r\n } else {\r\n byRev = cacheItem[0];\r\n cachedRxDocumentWeakRef = byRev.get(cacheKey);\r\n }\r\n let cachedRxDocument = cachedRxDocumentWeakRef ? cachedRxDocumentWeakRef.deref() : undefined;\r\n if (!cachedRxDocument) {\r\n docData = deepFreezeWhenDevMode(docData) as any;\r\n cachedRxDocument = documentCreator(docData) as RxDocument<RxDocType, OrmMethods>;\r\n byRev.set(cacheKey, createWeakRefWithFallback(cachedRxDocument));\r\n if (registry) {\r\n registryTasks.push(cachedRxDocument);\r\n }\r\n }\r\n ret[index] = cachedRxDocument;\r\n }\r\n if (registryTasks.length > 0 && registry) {\r\n /**\r\n * Calling registry.register() has shown to have\r\n * really bad performance. So we add the cached documents\r\n * lazily.\r\n */\r\n docCache.tasks.add(() => {\r\n for (let index = 0; index < registryTasks.length; index++) {\r\n const doc = registryTasks[index];\r\n registry.register(doc, {\r\n docId: doc.primary,\r\n revisionHeight: getHeightOfRevision(doc.revision),\r\n lwt: doc._data._meta.lwt\r\n });\r\n }\r\n });\r\n if (docCache.tasks.size <= 1) {\r\n requestIdlePromiseNoQueue().then(() => {\r\n docCache.processTasks();\r\n });\r\n }\r\n }\r\n return ret;\r\n };\r\n return fn;\r\n}\r\n\r\nexport function mapDocumentsDataToCacheDocs<RxDocType, OrmMethods>(\r\n docCache: DocumentCache<RxDocType, OrmMethods>,\r\n docsData: RxDocumentData<RxDocType>[]\r\n) {\r\n const getCachedRxDocuments = docCache.getCachedRxDocuments;\r\n return getCachedRxDocuments(docsData);\r\n}\r\n\r\n/**\r\n * Fallback for JavaScript runtimes that do not support WeakRef.\r\n * The fallback will keep the items in cache forever,\r\n * but at least works.\r\n */\r\nconst HAS_WEAK_REF = typeof WeakRef === 'function';\r\nconst createWeakRefWithFallback = HAS_WEAK_REF ? createWeakRef : createWeakRefFallback;\r\nfunction createWeakRef<T extends object>(obj: T): WeakRef<T> {\r\n return new WeakRef(obj) as any;\r\n}\r\nfunction createWeakRefFallback<T extends object>(obj: T): WeakRef<T> {\r\n return {\r\n deref() {\r\n return obj;\r\n }\r\n } as any;\r\n}\r\n"],"mappings":";AAOA,SACIA,iBAAiB,EACjBC,mBAAmB,EACnBC,yBAAyB,EACzBC,yBAAyB,QACtB,0BAA0B;AACjC,SACIC,YAAY,QACT,mBAAmB;;AAG1B;AACA;AACA;AACA;AACA;AACA;;AA+BA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAaC,aAAa;EAGtB;AACJ;AACA;AACA;;EAGI;AACJ;AACA;AACA;AACA;AACA;;EAkBI,SAAAA,cACoBC,WAAmB,EACnBC,QAAuD;EACvE;AACR;AACA;EACeC,eAA0F,EACnG;IAAA,KAtCcC,gBAAgB,GAAG,IAAIC,GAAG,CAA2C,CAAC;IAAA,KAMtEC,KAAK,GAAG,IAAIC,GAAG,CAAW,CAAC;IAAA,KAQ3BC,QAAQ,GAAqD,OAAOC,oBAAoB,KAAK,UAAU,GACnH,IAAIA,oBAAoB,CAA4BC,OAAO,IAAI;MAC3D,IAAMC,KAAK,GAAGD,OAAO,CAACC,KAAK;MAC3B,IAAMC,SAAS,GAAG,IAAI,CAACR,gBAAgB,CAACS,GAAG,CAACF,KAAK,CAAC;MAClD,IAAIC,SAAS,EAAE;QACXA,SAAS,CAAC,CAAC,CAAC,CAACE,MAAM,CAACJ,OAAO,CAACK,cAA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