diff --git a/CHANGELOG.md b/CHANGELOG.md index 971b5cd1294..d1fc00f8234 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ -### 16.0.0-beta.3 (27 November 2024) +### 16.0.0-beta.4 (28 November 2024) 🚀 **RxDB v16 is released** diff --git a/dist/cjs/plugins/dev-mode/error-messages.js b/dist/cjs/plugins/dev-mode/error-messages.js index 504e380f5db..cd43112c3f4 100644 --- a/dist/cjs/plugins/dev-mode/error-messages.js +++ b/dist/cjs/plugins/dev-mode/error-messages.js @@ -229,6 +229,7 @@ var ERROR_MESSAGES = exports.ERROR_MESSAGES = { CRDT2: 'RxDocument.incrementalModify() cannot be used when CRDTs are activated.', CRDT3: 'To use CRDTs you MUST NOT set a conflictHandler because the default CRDT conflict handler must be used', // plugins/storage-dexie/ + DXE1: 'non-required index fields are not possible with the dexie.js RxStorage: https://github.com/pubkey/rxdb/pull/6643#issuecomment-2505310082', // removed in 15.0.0, added boolean index support to dexie storage - DXE1: 'The dexie.js RxStorage does not support boolean indexes, see https://rxdb.info/rx-storage-dexie.html#boolean-index', /** diff --git a/dist/cjs/plugins/dev-mode/error-messages.js.map b/dist/cjs/plugins/dev-mode/error-messages.js.map index f95e3791da2..0b6286e8f51 100644 --- a/dist/cjs/plugins/dev-mode/error-messages.js.map +++ b/dist/cjs/plugins/dev-mode/error-messages.js.map @@ -1 +1 @@ -{"version":3,"file":"error-messages.js","names":["ERROR_MESSAGES","exports","UT1","UT2","UT3","UT4","UT5","UT6","UT7","PL1","PL3","P2","QU1","QU4","QU5","QU6","QU9","QU10","QU11","QU12","QU13","QU14","QU15","QU16","QU17","QU18","MQ1","MQ2","MQ3","MQ4","MQ5","MQ6","MQ7","MQ8","DB1","DB2","DB3","DB4","DB5","DB6","DB8","DB9","DB11","DB12","DB13","DB14","COL1","COL2","COL3","COL4","COL5","COL6","COL7","COL8","COL9","COL10","COL11","COL12","COL13","COL14","COL15","COL16","COL17","COL18","COL20","COL21","CONFLICT","COL22","DOC1","DOC2","DOC3","DOC4","DOC5","DOC6","DOC7","DOC8","DOC9","DOC10","DOC11","DOC13","DOC14","DOC15","DOC16","DOC17","DOC18","DOC19","DOC20","DOC21","DOC22","DOC23","DOC24","DM1","DM2","DM3","DM4","DM5","AT1","EN1","EN2","EN3","EN4","JD1","JD2","JD3","LD1","LD2","LD3","LD4","LD5","LD6","LD7","LD8","RC1","RC2","RC4","RC5","RC6","RC7","RC_PULL","RC_STREAM","RC_PUSH","RC_PUSH_NO_AR","RC_WEBRTC_PEER","RC_COUCHDB_1","RC_COUCHDB_2","RC_OUTDATED","RC_UNAUTHORIZED","RC_FORBIDDEN","SC1","SC2","SC3","SC4","SC6","SC7","SC8","SC10","SC11","SC13","SC14","SC15","SC16","SC17","SC18","SC19","SC20","SC21","SC22","SC23","SC24","SC25","SC26","SC28","SC29","SC30","SC32","SC33","SC34","SC35","SC36","SC37","SC38","SC39","SC40","SC41","DVM1","VD1","VD2","S1","GQL1","GQL3","CRDT1","CRDT2","CRDT3","SNH"],"sources":["../../../../src/plugins/dev-mode/error-messages.ts"],"sourcesContent":["/**\n * this plugin adds the error-messages\n * without it, only error-codes will be shown\n * This is mainly because error-string are hard to compress and we need a smaller build\n */\n\n\nexport const ERROR_MESSAGES = {\n // util.js / config\n UT1: 'given name is no string or empty',\n UT2: `collection- and database-names must match the regex to be compatible with couchdb databases.\n See https://neighbourhood.ie/blog/2020/10/13/everything-you-need-to-know-about-couchdb-database-names/\n info: if your database-name specifies a folder, the name must contain the slash-char '/' or '\\\\'`,\n UT3: 'replication-direction must either be push or pull or both. But not none',\n UT4: 'given leveldown is no valid adapter',\n UT5: 'keyCompression is set to true in the schema but no key-compression handler is used in the storage',\n UT6: 'schema contains encrypted fields but no encryption handler is used in the storage',\n UT7: 'attachments.compression is enabled but no attachment-compression plugin is used',\n\n // plugins\n PL1: 'Given plugin is not RxDB plugin.',\n // removed in 14.0.0 - PouchDB RxStorage was removed - PL2: 'You tried importing a RxDB plugin to pouchdb. Use addRxPlugin() instead.',\n PL3: 'A plugin with the same name was already added but it was not the exact same JavaScript object',\n\n // pouch-db.js\n // removed in 12.0.0 - P1: 'PouchDB.getBatch: limit must be > 2',\n P2: 'bulkWrite() cannot be called with an empty array',\n // removed in 12.0.0 - P3: 'bulkAddRevisions cannot be called with an empty array',\n\n // rx-query\n QU1: 'RxQuery._execOverDatabase(): op not known',\n // removed in 9.0.0 - QU2: 'limit() must get a number',\n // removed in 9.0.0 - QU3: 'skip() must get a number',\n QU4: 'RxQuery.regex(): You cannot use .regex() on the primary field',\n QU5: 'RxQuery.sort(): does not work because key is not defined in the schema',\n QU6: 'RxQuery.limit(): cannot be called on .findOne()',\n // removed in 12.0.0 (should by ensured by the typings) - QU7: 'query must be an object',\n // removed in 12.0.0 (should by ensured by the typings) - QU8: 'query cannot be an array',\n QU9: 'throwIfMissing can only be used in findOne queries',\n QU10: 'result empty and throwIfMissing: true',\n QU11: 'RxQuery: no valid query params given',\n QU12: 'Given index is not in schema',\n QU13: 'A top level field of the query is not included in the schema',\n QU14: 'Running a count() query in slow mode is now allowed. Either run a count() query with a selector that fully matches an index ' +\n 'or set allowSlowCount=true when calling the createRxDatabase',\n QU15: 'For count queries it is not allowed to use skip or limit',\n QU16: '$regex queries must be defined by a string, not an RegExp instance. ' +\n 'This is because RegExp objects cannot be JSON stringified and also they are mutable which would be dangerous',\n QU17: 'Chained queries cannot be used on findByIds() RxQuery instances',\n QU18: 'Malformated query result data. This likely happens because you create a OPFS-storage RxDatabase inside of a worker but did not set the usesRxDatabaseInWorker setting. https://rxdb.info/rx-storage-opfs.html#setting-usesrxdatabaseinworker-when-a-rxdatabase-is-also-used-inside-of-the-worker ',\n\n // mquery.js\n MQ1: 'path must be a string or object',\n MQ2: 'Invalid argument',\n MQ3: 'Invalid sort() argument. Must be a string, object, or array',\n MQ4: 'Invalid argument. Expected instanceof mquery or plain object',\n MQ5: 'method must be used after where() when called with these arguments',\n MQ6: 'Can\\'t mix sort syntaxes. Use either array or object | .sort([[\\'field\\', 1], [\\'test\\', -1]]) | .sort({ field: 1, test: -1 })',\n MQ7: 'Invalid sort value',\n MQ8: 'Can\\'t mix sort syntaxes. Use either array or object',\n\n // rx-database\n DB1: 'RxDocument.prepare(): another instance on this adapter has a different password',\n DB2: 'RxDatabase.addCollections(): collection-names cannot start with underscore _',\n DB3: 'RxDatabase.addCollections(): collection already exists. use myDatabase[collectionName] to get it',\n DB4: 'RxDatabase.addCollections(): schema is missing',\n DB5: 'RxDatabase.addCollections(): collection-name not allowed',\n DB6: 'RxDatabase.addCollections(): another instance created this collection with a different schema. Read this https://rxdb.info/questions-answers.html?console=qa#cant-change-the-schema ',\n // removed in 13.0.0 (now part of the encryption plugin) DB7: 'RxDatabase.addCollections(): schema encrypted but no password given',\n DB8: 'createRxDatabase(): A RxDatabase with the same name and adapter already exists.\\n' +\n 'Make sure to use this combination only once or set ignoreDuplicate to true if you do this intentional-\\n' +\n 'This often happens in react projects with hot reload that reloads the code without reloading the process.',\n DB9: 'ignoreDuplicate is only allowed in dev-mode and must never be used in production',\n // removed in 14.0.0 - PouchDB RxStorage is removed - DB9: 'createRxDatabase(): Adapter not added. Use addPouchPlugin(require(\\'pouchdb-adapter-[adaptername]\\'));',\n // removed in 14.0.0 - PouchDB RxStorage is removed DB10: 'createRxDatabase(): To use leveldown-adapters, you have to add the leveldb-plugin. Use addPouchPlugin(require(\\'pouchdb-adapter-leveldb\\'));',\n DB11: 'createRxDatabase(): Invalid db-name, folder-paths must not have an ending slash',\n DB12: 'RxDatabase.addCollections(): could not write to internal store',\n DB13: 'createRxDatabase(): Invalid db-name or collection name, name contains the dollar sign',\n DB14: 'no custom reactivity factory added on database creation',\n\n // rx-collection\n COL1: 'RxDocument.insert() You cannot insert an existing document',\n COL2: 'RxCollection.insert() fieldName ._id can only be used as primaryKey',\n COL3: 'RxCollection.upsert() does not work without primary',\n COL4: 'RxCollection.incrementalUpsert() does not work without primary',\n COL5: 'RxCollection.find() if you want to search by _id, use .findOne(_id)',\n COL6: 'RxCollection.findOne() needs a queryObject or string. Notice that in RxDB, primary keys must be strings and cannot be numbers.',\n COL7: 'hook must be a function',\n COL8: 'hooks-when not known',\n COL9: 'RxCollection.addHook() hook-name not known',\n COL10: 'RxCollection .postCreate-hooks cannot be async',\n COL11: 'migrationStrategies must be an object',\n COL12: 'A migrationStrategy is missing or too much',\n COL13: 'migrationStrategy must be a function',\n COL14: 'given static method-name is not a string',\n COL15: 'static method-names cannot start with underscore _',\n COL16: 'given static method is not a function',\n COL17: 'RxCollection.ORM: statics-name not allowed',\n COL18: 'collection-method not allowed because fieldname is in the schema',\n // removed in 14.0.0, use CONFLICT instead - COL19: 'Document update conflict. When changing a document you must work on the previous revision',\n COL20: 'Storage write error',\n COL21: 'The RxCollection is closed or removed already, either from this JavaScript realm or from another, like a browser tab',\n CONFLICT: 'Document update conflict. When changing a document you must work on the previous revision',\n COL22: '.bulkInsert() and .bulkUpsert() cannot be run with multiple documents that have the same primary key',\n\n // rx-document.js\n DOC1: 'RxDocument.get$ cannot get observable of in-array fields because order cannot be guessed',\n DOC2: 'cannot observe primary path',\n DOC3: 'final fields cannot be observed',\n DOC4: 'RxDocument.get$ cannot observe a non-existed field',\n DOC5: 'RxDocument.populate() cannot populate a non-existed field',\n DOC6: 'RxDocument.populate() cannot populate because path has no ref',\n DOC7: 'RxDocument.populate() ref-collection not in database',\n DOC8: 'RxDocument.set(): primary-key cannot be modified',\n DOC9: 'final fields cannot be modified',\n DOC10: 'RxDocument.set(): cannot set childpath when rootPath not selected',\n DOC11: 'RxDocument.save(): can\\'t save deleted document',\n // removed in 10.0.0 DOC12: 'RxDocument.save(): error',\n DOC13: 'RxDocument.remove(): Document is already deleted',\n DOC14: 'RxDocument.close() does not exist',\n DOC15: 'query cannot be an array',\n DOC16: 'Since version 8.0.0 RxDocument.set() can only be called on temporary RxDocuments',\n DOC17: 'Since version 8.0.0 RxDocument.save() can only be called on non-temporary documents',\n DOC18: 'Document property for composed primary key is missing',\n DOC19: 'Value of primary key(s) cannot be changed',\n DOC20: 'PrimaryKey missing',\n DOC21: 'PrimaryKey must be equal to PrimaryKey.trim(). It cannot start or end with a whitespace',\n DOC22: 'PrimaryKey must not contain a linebreak',\n DOC23: 'PrimaryKey must not contain a double-quote [\"]',\n DOC24: 'Given document data could not be structured cloned. This happens if you pass non-plain-json data into it, like a Date() object or a Function. ' +\n 'In vue.js this happens if you use ref() on the document data which transforms it into a Proxy object.',\n\n // data-migrator.js\n DM1: 'migrate() Migration has already run',\n DM2: 'migration of document failed final document does not match final schema',\n DM3: 'migration already running',\n DM4: 'Migration errored',\n DM5: 'Cannot open database state with newer RxDB version. You have to migrate your database state first. See https://rxdb.info/migration-storage.html?console=storage ',\n\n // plugins/attachments.js\n AT1: 'to use attachments, please define this in your schema',\n\n // plugins/encryption-crypto-js.js\n EN1: 'password is not valid',\n EN2: 'validatePassword: min-length of password not complied',\n EN3: 'Schema contains encrypted properties but no password is given',\n EN4: 'Password not valid',\n\n // plugins/json-dump.js\n JD1: 'You must create the collections before you can import their data',\n JD2: 'RxCollection.importJSON(): the imported json relies on a different schema',\n JD3: 'RxCollection.importJSON(): json.passwordHash does not match the own',\n\n // plugins/leader-election.js\n\n // plugins/local-documents.js\n LD1: 'RxDocument.allAttachments$ can\\'t use attachments on local documents',\n LD2: 'RxDocument.get(): objPath must be a string',\n LD3: 'RxDocument.get$ cannot get observable of in-array fields because order cannot be guessed',\n LD4: 'cannot observe primary path',\n LD5: 'RxDocument.set() id cannot be modified',\n LD6: 'LocalDocument: Function is not usable on local documents',\n LD7: 'Local document already exists',\n LD8: 'localDocuments not activated. Set localDocuments=true on creation, when you want to store local documents on the RxDatabase or RxCollection.',\n\n // plugins/replication.js\n RC1: 'Replication: already added',\n RC2: 'replicateCouchDB() query must be from the same RxCollection',\n // removed in 14.0.0 - PouchDB RxStorage is removed RC3: 'RxCollection.syncCouchDB() Do not use a collection\\'s pouchdb as remote, use the collection instead',\n RC4: 'RxCouchDBReplicationState.awaitInitialReplication() cannot await initial replication when live: true',\n RC5: 'RxCouchDBReplicationState.awaitInitialReplication() cannot await initial replication if multiInstance because the replication might run on another instance',\n RC6: 'syncFirestore() serverTimestampField MUST NOT be part of the collections schema and MUST NOT be nested.',\n RC7: 'SimplePeer requires to have process.nextTick() polyfilled, see https://rxdb.info/replication-webrtc.html?console=webrtc ',\n RC_PULL: 'RxReplication pull handler threw an error - see .errors for more details',\n RC_STREAM: 'RxReplication pull stream$ threw an error - see .errors for more details',\n RC_PUSH: 'RxReplication push handler threw an error - see .errors for more details',\n RC_PUSH_NO_AR: 'RxReplication push handler did not return an array with the conflicts',\n RC_WEBRTC_PEER: 'RxReplication WebRTC Peer has error',\n RC_COUCHDB_1: 'replicateCouchDB() url must end with a slash like \\'https://example.com/mydatabase/\\'',\n RC_COUCHDB_2: 'replicateCouchDB() did not get valid result with rows.',\n RC_OUTDATED: 'Outdated client, update required. Replication was canceled',\n RC_UNAUTHORIZED: 'Unauthorized client, update the replicationState.headers to set correct auth data',\n RC_FORBIDDEN: 'Client behaves wrong so the replication was canceled. Mostly happens if the client tries to write data that it is not allowed to',\n\n // plugins/dev-mode/check-schema.js\n SC1: 'fieldnames do not match the regex',\n SC2: 'SchemaCheck: name \\'item\\' reserved for array-fields',\n SC3: 'SchemaCheck: fieldname has a ref-array but items-type is not string',\n SC4: 'SchemaCheck: fieldname has a ref but is not type string, [string,null] or array',\n SC6: 'SchemaCheck: primary can only be defined at top-level',\n SC7: 'SchemaCheck: default-values can only be defined at top-level',\n SC8: 'SchemaCheck: first level-fields cannot start with underscore _',\n SC10: 'SchemaCheck: schema defines ._rev, this will be done automatically',\n SC11: 'SchemaCheck: schema needs a number >=0 as version',\n // removed in 10.0.0 - SC12: 'SchemaCheck: primary can only be defined once',\n SC13: 'SchemaCheck: primary is always index, do not declare it as index',\n SC14: 'SchemaCheck: primary is always unique, do not declare it as index',\n SC15: 'SchemaCheck: primary cannot be encrypted',\n SC16: 'SchemaCheck: primary must have type: string',\n SC17: 'SchemaCheck: top-level fieldname is not allowed',\n SC18: 'SchemaCheck: indexes must be an array',\n SC19: 'SchemaCheck: indexes must contain strings or arrays of strings',\n SC20: 'SchemaCheck: indexes.array must contain strings',\n SC21: 'SchemaCheck: given index is not defined in schema',\n SC22: 'SchemaCheck: given indexKey is not type:string',\n SC23: 'SchemaCheck: fieldname is not allowed',\n SC24: 'SchemaCheck: required fields must be set via array. See https://spacetelescope.github.io/understanding-json-schema/reference/object.html#required',\n SC25: 'SchemaCheck: compoundIndexes needs to be specified in the indexes field',\n SC26: 'SchemaCheck: indexes needs to be specified at collection schema level',\n // removed in 16.0.0 - SC27: 'SchemaCheck: encrypted fields need to be specified at collection schema level',\n SC28: 'SchemaCheck: encrypted fields is not defined in the schema',\n SC29: 'SchemaCheck: missing object key \\'properties\\'',\n SC30: 'SchemaCheck: primaryKey is required',\n SC32: 'SchemaCheck: primary field must have the type string/number/integer',\n SC33: 'SchemaCheck: used primary key is not a property in the schema',\n SC34: 'Fields of type string that are used in an index, must have set the maxLength attribute in the schema',\n SC35: 'Fields of type number/integer that are used in an index, must have set the multipleOf attribute in the schema',\n SC36: 'A field of this type cannot be used as index',\n SC37: 'Fields of type number that are used in an index, must have set the minimum and maximum attribute in the schema',\n SC38: 'Fields of type boolean that are used in an index, must be required in the schema',\n SC39: 'The primary key must have the maxLength attribute set',\n SC40: '$ref fields in the schema are not allowed. RxDB cannot resolve related schemas because it would have a negative performance impact.' +\n 'It would have to run http requests on runtime. $ref fields should be resolved during build time.',\n SC41: 'minimum, maximum and maxLength values for indexes must be real numbers, not Infinity or -Infinity',\n\n // plugins/dev-mode\n // removed in 13.9.0, use PL3 instead - DEV1: 'dev-mode added multiple times',\n DVM1: 'When dev-mode is enabled, your storage must use one of the schema validators at the top level. This is because most problems people have with RxDB is because they store data that is not valid to the schema which causes strange bugs and problems.',\n\n // plugins/validate.js\n VD1: 'Sub-schema not found, does the schemaPath exists in your schema?',\n VD2: 'object does not match schema',\n\n // plugins/in-memory.js\n // removed in 14.0.0 - PouchDB RxStorage is removed IM1: 'InMemory: Memory-Adapter must be added. Use addPouchPlugin(require(\\'pouchdb-adapter-memory\\'));',\n // removed in 14.0.0 - PouchDB RxStorage is removed IM2: 'inMemoryCollection.sync(): Do not replicate with the in-memory instance. Replicate with the parent instead',\n\n // plugins/server.js\n S1: 'You cannot create collections after calling RxDatabase.server()',\n\n // plugins/replication-graphql.js\n GQL1: 'GraphQL replication: cannot find sub schema by key',\n // removed in 13.0.0, use RC_PULL instead - GQL2: 'GraphQL replication: unknown errors occurred in replication pull - see innerErrors for more details',\n GQL3: 'GraphQL replication: pull returns more documents then batchSize',\n // removed in 13.0.0, use RC_PUSH instead - GQL4: 'GraphQL replication: unknown errors occurred in replication push - see innerErrors for more details',\n\n // plugins/crdt/\n CRDT1: 'CRDT operations cannot be used because the crdt options are not set in the schema.',\n CRDT2: 'RxDocument.incrementalModify() cannot be used when CRDTs are activated.',\n CRDT3: 'To use CRDTs you MUST NOT set a conflictHandler because the default CRDT conflict handler must be used',\n\n // plugins/storage-dexie/\n // removed in 15.0.0, added boolean index support to dexie storage - DXE1: 'The dexie.js RxStorage does not support boolean indexes, see https://rxdb.info/rx-storage-dexie.html#boolean-index',\n\n /**\n * Should never be thrown, use this for\n * null checks etc. so you do not have to increase the\n * build size with error message strings.\n */\n SNH: 'This should never happen'\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;;AAGO,IAAMA,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG;EAC1B;EACAE,GAAG,EAAE,kCAAkC;EACvCC,GAAG,kTAE8F;EACjGC,GAAG,EAAE,yEAAyE;EAC9EC,GAAG,EAAE,qCAAqC;EAC1CC,GAAG,EAAE,mGAAmG;EACxGC,GAAG,EAAE,mFAAmF;EACxFC,GAAG,EAAE,iFAAiF;EAEtF;EACAC,GAAG,EAAE,kCAAkC;EACvC;EACAC,GAAG,EAAE,+FAA+F;EAEpG;EACA;EACAC,EAAE,EAAE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"error-messages.js","names":["ERROR_MESSAGES","exports","UT1","UT2","UT3","UT4","UT5","UT6","UT7","PL1","PL3","P2","QU1","QU4","QU5","QU6","QU9","QU10","QU11","QU12","QU13","QU14","QU15","QU16","QU17","QU18","MQ1","MQ2","MQ3","MQ4","MQ5","MQ6","MQ7","MQ8","DB1","DB2","DB3","DB4","DB5","DB6","DB8","DB9","DB11","DB12","DB13","DB14","COL1","COL2","COL3","COL4","COL5","COL6","COL7","COL8","COL9","COL10","COL11","COL12","COL13","COL14","COL15","COL16","COL17","COL18","COL20","COL21","CONFLICT","COL22","DOC1","DOC2","DOC3","DOC4","DOC5","DOC6","DOC7","DOC8","DOC9","DOC10","DOC11","DOC13","DOC14","DOC15","DOC16","DOC17","DOC18","DOC19","DOC20","DOC21","DOC22","DOC23","DOC24","DM1","DM2","DM3","DM4","DM5","AT1","EN1","EN2","EN3","EN4","JD1","JD2","JD3","LD1","LD2","LD3","LD4","LD5","LD6","LD7","LD8","RC1","RC2","RC4","RC5","RC6","RC7","RC_PULL","RC_STREAM","RC_PUSH","RC_PUSH_NO_AR","RC_WEBRTC_PEER","RC_COUCHDB_1","RC_COUCHDB_2","RC_OUTDATED","RC_UNAUTHORIZED","RC_FORBIDDEN","SC1","SC2","SC3","SC4","SC6","SC7","SC8","SC10","SC11","SC13","SC14","SC15","SC16","SC17","SC18","SC19","SC20","SC21","SC22","SC23","SC24","SC25","SC26","SC28","SC29","SC30","SC32","SC33","SC34","SC35","SC36","SC37","SC38","SC39","SC40","SC41","DVM1","VD1","VD2","S1","GQL1","GQL3","CRDT1","CRDT2","CRDT3","DXE1","SNH"],"sources":["../../../../src/plugins/dev-mode/error-messages.ts"],"sourcesContent":["/**\n * this plugin adds the error-messages\n * without it, only error-codes will be shown\n * This is mainly because error-string are hard to compress and we need a smaller build\n */\n\n\nexport const ERROR_MESSAGES = {\n // util.js / config\n UT1: 'given name is no string or empty',\n UT2: `collection- and database-names must match the regex to be compatible with couchdb databases.\n See https://neighbourhood.ie/blog/2020/10/13/everything-you-need-to-know-about-couchdb-database-names/\n info: if your database-name specifies a folder, the name must contain the slash-char '/' or '\\\\'`,\n UT3: 'replication-direction must either be push or pull or both. But not none',\n UT4: 'given leveldown is no valid adapter',\n UT5: 'keyCompression is set to true in the schema but no key-compression handler is used in the storage',\n UT6: 'schema contains encrypted fields but no encryption handler is used in the storage',\n UT7: 'attachments.compression is enabled but no attachment-compression plugin is used',\n\n // plugins\n PL1: 'Given plugin is not RxDB plugin.',\n // removed in 14.0.0 - PouchDB RxStorage was removed - PL2: 'You tried importing a RxDB plugin to pouchdb. Use addRxPlugin() instead.',\n PL3: 'A plugin with the same name was already added but it was not the exact same JavaScript object',\n\n // pouch-db.js\n // removed in 12.0.0 - P1: 'PouchDB.getBatch: limit must be > 2',\n P2: 'bulkWrite() cannot be called with an empty array',\n // removed in 12.0.0 - P3: 'bulkAddRevisions cannot be called with an empty array',\n\n // rx-query\n QU1: 'RxQuery._execOverDatabase(): op not known',\n // removed in 9.0.0 - QU2: 'limit() must get a number',\n // removed in 9.0.0 - QU3: 'skip() must get a number',\n QU4: 'RxQuery.regex(): You cannot use .regex() on the primary field',\n QU5: 'RxQuery.sort(): does not work because key is not defined in the schema',\n QU6: 'RxQuery.limit(): cannot be called on .findOne()',\n // removed in 12.0.0 (should by ensured by the typings) - QU7: 'query must be an object',\n // removed in 12.0.0 (should by ensured by the typings) - QU8: 'query cannot be an array',\n QU9: 'throwIfMissing can only be used in findOne queries',\n QU10: 'result empty and throwIfMissing: true',\n QU11: 'RxQuery: no valid query params given',\n QU12: 'Given index is not in schema',\n QU13: 'A top level field of the query is not included in the schema',\n QU14: 'Running a count() query in slow mode is now allowed. Either run a count() query with a selector that fully matches an index ' +\n 'or set allowSlowCount=true when calling the createRxDatabase',\n QU15: 'For count queries it is not allowed to use skip or limit',\n QU16: '$regex queries must be defined by a string, not an RegExp instance. ' +\n 'This is because RegExp objects cannot be JSON stringified and also they are mutable which would be dangerous',\n QU17: 'Chained queries cannot be used on findByIds() RxQuery instances',\n QU18: 'Malformated query result data. This likely happens because you create a OPFS-storage RxDatabase inside of a worker but did not set the usesRxDatabaseInWorker setting. https://rxdb.info/rx-storage-opfs.html#setting-usesrxdatabaseinworker-when-a-rxdatabase-is-also-used-inside-of-the-worker ',\n\n // mquery.js\n MQ1: 'path must be a string or object',\n MQ2: 'Invalid argument',\n MQ3: 'Invalid sort() argument. Must be a string, object, or array',\n MQ4: 'Invalid argument. Expected instanceof mquery or plain object',\n MQ5: 'method must be used after where() when called with these arguments',\n MQ6: 'Can\\'t mix sort syntaxes. Use either array or object | .sort([[\\'field\\', 1], [\\'test\\', -1]]) | .sort({ field: 1, test: -1 })',\n MQ7: 'Invalid sort value',\n MQ8: 'Can\\'t mix sort syntaxes. Use either array or object',\n\n // rx-database\n DB1: 'RxDocument.prepare(): another instance on this adapter has a different password',\n DB2: 'RxDatabase.addCollections(): collection-names cannot start with underscore _',\n DB3: 'RxDatabase.addCollections(): collection already exists. use myDatabase[collectionName] to get it',\n DB4: 'RxDatabase.addCollections(): schema is missing',\n DB5: 'RxDatabase.addCollections(): collection-name not allowed',\n DB6: 'RxDatabase.addCollections(): another instance created this collection with a different schema. Read this https://rxdb.info/questions-answers.html?console=qa#cant-change-the-schema ',\n // removed in 13.0.0 (now part of the encryption plugin) DB7: 'RxDatabase.addCollections(): schema encrypted but no password given',\n DB8: 'createRxDatabase(): A RxDatabase with the same name and adapter already exists.\\n' +\n 'Make sure to use this combination only once or set ignoreDuplicate to true if you do this intentional-\\n' +\n 'This often happens in react projects with hot reload that reloads the code without reloading the process.',\n DB9: 'ignoreDuplicate is only allowed in dev-mode and must never be used in production',\n // removed in 14.0.0 - PouchDB RxStorage is removed - DB9: 'createRxDatabase(): Adapter not added. Use addPouchPlugin(require(\\'pouchdb-adapter-[adaptername]\\'));',\n // removed in 14.0.0 - PouchDB RxStorage is removed DB10: 'createRxDatabase(): To use leveldown-adapters, you have to add the leveldb-plugin. Use addPouchPlugin(require(\\'pouchdb-adapter-leveldb\\'));',\n DB11: 'createRxDatabase(): Invalid db-name, folder-paths must not have an ending slash',\n DB12: 'RxDatabase.addCollections(): could not write to internal store',\n DB13: 'createRxDatabase(): Invalid db-name or collection name, name contains the dollar sign',\n DB14: 'no custom reactivity factory added on database creation',\n\n // rx-collection\n COL1: 'RxDocument.insert() You cannot insert an existing document',\n COL2: 'RxCollection.insert() fieldName ._id can only be used as primaryKey',\n COL3: 'RxCollection.upsert() does not work without primary',\n COL4: 'RxCollection.incrementalUpsert() does not work without primary',\n COL5: 'RxCollection.find() if you want to search by _id, use .findOne(_id)',\n COL6: 'RxCollection.findOne() needs a queryObject or string. Notice that in RxDB, primary keys must be strings and cannot be numbers.',\n COL7: 'hook must be a function',\n COL8: 'hooks-when not known',\n COL9: 'RxCollection.addHook() hook-name not known',\n COL10: 'RxCollection .postCreate-hooks cannot be async',\n COL11: 'migrationStrategies must be an object',\n COL12: 'A migrationStrategy is missing or too much',\n COL13: 'migrationStrategy must be a function',\n COL14: 'given static method-name is not a string',\n COL15: 'static method-names cannot start with underscore _',\n COL16: 'given static method is not a function',\n COL17: 'RxCollection.ORM: statics-name not allowed',\n COL18: 'collection-method not allowed because fieldname is in the schema',\n // removed in 14.0.0, use CONFLICT instead - COL19: 'Document update conflict. When changing a document you must work on the previous revision',\n COL20: 'Storage write error',\n COL21: 'The RxCollection is closed or removed already, either from this JavaScript realm or from another, like a browser tab',\n CONFLICT: 'Document update conflict. When changing a document you must work on the previous revision',\n COL22: '.bulkInsert() and .bulkUpsert() cannot be run with multiple documents that have the same primary key',\n\n // rx-document.js\n DOC1: 'RxDocument.get$ cannot get observable of in-array fields because order cannot be guessed',\n DOC2: 'cannot observe primary path',\n DOC3: 'final fields cannot be observed',\n DOC4: 'RxDocument.get$ cannot observe a non-existed field',\n DOC5: 'RxDocument.populate() cannot populate a non-existed field',\n DOC6: 'RxDocument.populate() cannot populate because path has no ref',\n DOC7: 'RxDocument.populate() ref-collection not in database',\n DOC8: 'RxDocument.set(): primary-key cannot be modified',\n DOC9: 'final fields cannot be modified',\n DOC10: 'RxDocument.set(): cannot set childpath when rootPath not selected',\n DOC11: 'RxDocument.save(): can\\'t save deleted document',\n // removed in 10.0.0 DOC12: 'RxDocument.save(): error',\n DOC13: 'RxDocument.remove(): Document is already deleted',\n DOC14: 'RxDocument.close() does not exist',\n DOC15: 'query cannot be an array',\n DOC16: 'Since version 8.0.0 RxDocument.set() can only be called on temporary RxDocuments',\n DOC17: 'Since version 8.0.0 RxDocument.save() can only be called on non-temporary documents',\n DOC18: 'Document property for composed primary key is missing',\n DOC19: 'Value of primary key(s) cannot be changed',\n DOC20: 'PrimaryKey missing',\n DOC21: 'PrimaryKey must be equal to PrimaryKey.trim(). It cannot start or end with a whitespace',\n DOC22: 'PrimaryKey must not contain a linebreak',\n DOC23: 'PrimaryKey must not contain a double-quote [\"]',\n DOC24: 'Given document data could not be structured cloned. This happens if you pass non-plain-json data into it, like a Date() object or a Function. ' +\n 'In vue.js this happens if you use ref() on the document data which transforms it into a Proxy object.',\n\n // data-migrator.js\n DM1: 'migrate() Migration has already run',\n DM2: 'migration of document failed final document does not match final schema',\n DM3: 'migration already running',\n DM4: 'Migration errored',\n DM5: 'Cannot open database state with newer RxDB version. You have to migrate your database state first. See https://rxdb.info/migration-storage.html?console=storage ',\n\n // plugins/attachments.js\n AT1: 'to use attachments, please define this in your schema',\n\n // plugins/encryption-crypto-js.js\n EN1: 'password is not valid',\n EN2: 'validatePassword: min-length of password not complied',\n EN3: 'Schema contains encrypted properties but no password is given',\n EN4: 'Password not valid',\n\n // plugins/json-dump.js\n JD1: 'You must create the collections before you can import their data',\n JD2: 'RxCollection.importJSON(): the imported json relies on a different schema',\n JD3: 'RxCollection.importJSON(): json.passwordHash does not match the own',\n\n // plugins/leader-election.js\n\n // plugins/local-documents.js\n LD1: 'RxDocument.allAttachments$ can\\'t use attachments on local documents',\n LD2: 'RxDocument.get(): objPath must be a string',\n LD3: 'RxDocument.get$ cannot get observable of in-array fields because order cannot be guessed',\n LD4: 'cannot observe primary path',\n LD5: 'RxDocument.set() id cannot be modified',\n LD6: 'LocalDocument: Function is not usable on local documents',\n LD7: 'Local document already exists',\n LD8: 'localDocuments not activated. Set localDocuments=true on creation, when you want to store local documents on the RxDatabase or RxCollection.',\n\n // plugins/replication.js\n RC1: 'Replication: already added',\n RC2: 'replicateCouchDB() query must be from the same RxCollection',\n // removed in 14.0.0 - PouchDB RxStorage is removed RC3: 'RxCollection.syncCouchDB() Do not use a collection\\'s pouchdb as remote, use the collection instead',\n RC4: 'RxCouchDBReplicationState.awaitInitialReplication() cannot await initial replication when live: true',\n RC5: 'RxCouchDBReplicationState.awaitInitialReplication() cannot await initial replication if multiInstance because the replication might run on another instance',\n RC6: 'syncFirestore() serverTimestampField MUST NOT be part of the collections schema and MUST NOT be nested.',\n RC7: 'SimplePeer requires to have process.nextTick() polyfilled, see https://rxdb.info/replication-webrtc.html?console=webrtc ',\n RC_PULL: 'RxReplication pull handler threw an error - see .errors for more details',\n RC_STREAM: 'RxReplication pull stream$ threw an error - see .errors for more details',\n RC_PUSH: 'RxReplication push handler threw an error - see .errors for more details',\n RC_PUSH_NO_AR: 'RxReplication push handler did not return an array with the conflicts',\n RC_WEBRTC_PEER: 'RxReplication WebRTC Peer has error',\n RC_COUCHDB_1: 'replicateCouchDB() url must end with a slash like \\'https://example.com/mydatabase/\\'',\n RC_COUCHDB_2: 'replicateCouchDB() did not get valid result with rows.',\n RC_OUTDATED: 'Outdated client, update required. Replication was canceled',\n RC_UNAUTHORIZED: 'Unauthorized client, update the replicationState.headers to set correct auth data',\n RC_FORBIDDEN: 'Client behaves wrong so the replication was canceled. Mostly happens if the client tries to write data that it is not allowed to',\n\n // plugins/dev-mode/check-schema.js\n SC1: 'fieldnames do not match the regex',\n SC2: 'SchemaCheck: name \\'item\\' reserved for array-fields',\n SC3: 'SchemaCheck: fieldname has a ref-array but items-type is not string',\n SC4: 'SchemaCheck: fieldname has a ref but is not type string, [string,null] or array',\n SC6: 'SchemaCheck: primary can only be defined at top-level',\n SC7: 'SchemaCheck: default-values can only be defined at top-level',\n SC8: 'SchemaCheck: first level-fields cannot start with underscore _',\n SC10: 'SchemaCheck: schema defines ._rev, this will be done automatically',\n SC11: 'SchemaCheck: schema needs a number >=0 as version',\n // removed in 10.0.0 - SC12: 'SchemaCheck: primary can only be defined once',\n SC13: 'SchemaCheck: primary is always index, do not declare it as index',\n SC14: 'SchemaCheck: primary is always unique, do not declare it as index',\n SC15: 'SchemaCheck: primary cannot be encrypted',\n SC16: 'SchemaCheck: primary must have type: string',\n SC17: 'SchemaCheck: top-level fieldname is not allowed',\n SC18: 'SchemaCheck: indexes must be an array',\n SC19: 'SchemaCheck: indexes must contain strings or arrays of strings',\n SC20: 'SchemaCheck: indexes.array must contain strings',\n SC21: 'SchemaCheck: given index is not defined in schema',\n SC22: 'SchemaCheck: given indexKey is not type:string',\n SC23: 'SchemaCheck: fieldname is not allowed',\n SC24: 'SchemaCheck: required fields must be set via array. See https://spacetelescope.github.io/understanding-json-schema/reference/object.html#required',\n SC25: 'SchemaCheck: compoundIndexes needs to be specified in the indexes field',\n SC26: 'SchemaCheck: indexes needs to be specified at collection schema level',\n // removed in 16.0.0 - SC27: 'SchemaCheck: encrypted fields need to be specified at collection schema level',\n SC28: 'SchemaCheck: encrypted fields is not defined in the schema',\n SC29: 'SchemaCheck: missing object key \\'properties\\'',\n SC30: 'SchemaCheck: primaryKey is required',\n SC32: 'SchemaCheck: primary field must have the type string/number/integer',\n SC33: 'SchemaCheck: used primary key is not a property in the schema',\n SC34: 'Fields of type string that are used in an index, must have set the maxLength attribute in the schema',\n SC35: 'Fields of type number/integer that are used in an index, must have set the multipleOf attribute in the schema',\n SC36: 'A field of this type cannot be used as index',\n SC37: 'Fields of type number that are used in an index, must have set the minimum and maximum attribute in the schema',\n SC38: 'Fields of type boolean that are used in an index, must be required in the schema',\n SC39: 'The primary key must have the maxLength attribute set',\n SC40: '$ref fields in the schema are not allowed. RxDB cannot resolve related schemas because it would have a negative performance impact.' +\n 'It would have to run http requests on runtime. $ref fields should be resolved during build time.',\n SC41: 'minimum, maximum and maxLength values for indexes must be real numbers, not Infinity or -Infinity',\n\n // plugins/dev-mode\n // removed in 13.9.0, use PL3 instead - DEV1: 'dev-mode added multiple times',\n DVM1: 'When dev-mode is enabled, your storage must use one of the schema validators at the top level. This is because most problems people have with RxDB is because they store data that is not valid to the schema which causes strange bugs and problems.',\n\n // plugins/validate.js\n VD1: 'Sub-schema not found, does the schemaPath exists in your schema?',\n VD2: 'object does not match schema',\n\n // plugins/in-memory.js\n // removed in 14.0.0 - PouchDB RxStorage is removed IM1: 'InMemory: Memory-Adapter must be added. Use addPouchPlugin(require(\\'pouchdb-adapter-memory\\'));',\n // removed in 14.0.0 - PouchDB RxStorage is removed IM2: 'inMemoryCollection.sync(): Do not replicate with the in-memory instance. Replicate with the parent instead',\n\n // plugins/server.js\n S1: 'You cannot create collections after calling RxDatabase.server()',\n\n // plugins/replication-graphql.js\n GQL1: 'GraphQL replication: cannot find sub schema by key',\n // removed in 13.0.0, use RC_PULL instead - GQL2: 'GraphQL replication: unknown errors occurred in replication pull - see innerErrors for more details',\n GQL3: 'GraphQL replication: pull returns more documents then batchSize',\n // removed in 13.0.0, use RC_PUSH instead - GQL4: 'GraphQL replication: unknown errors occurred in replication push - see innerErrors for more details',\n\n // plugins/crdt/\n CRDT1: 'CRDT operations cannot be used because the crdt options are not set in the schema.',\n CRDT2: 'RxDocument.incrementalModify() cannot be used when CRDTs are activated.',\n CRDT3: 'To use CRDTs you MUST NOT set a conflictHandler because the default CRDT conflict handler must be used',\n\n // plugins/storage-dexie/\n DXE1: 'non-required index fields are not possible with the dexie.js RxStorage: https://github.com/pubkey/rxdb/pull/6643#issuecomment-2505310082',\n // removed in 15.0.0, added boolean index support to dexie storage - DXE1: 'The dexie.js RxStorage does not support boolean indexes, see https://rxdb.info/rx-storage-dexie.html#boolean-index',\n\n /**\n * Should never be thrown, use this for\n * null checks etc. so you do not have to increase the\n * build size with error message strings.\n */\n SNH: 'This should never happen'\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;;AAGO,IAAMA,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG;EAC1B;EACAE,GAAG,EAAE,kCAAkC;EACvCC,GAAG,kTAE8F;EACjGC,GAAG,EAAE,yEAAyE;EAC9EC,GAAG,EAAE,qCAAqC;EAC1CC,GAAG,EAAE,mGAAmG;EACxGC,GAAG,EAAE,mFAAmF;EACxFC,GAAG,EAAE,iFAAiF;EAEtF;EACAC,GAAG,EAAE,kCAAkC;EACvC;EACAC,GAAG,EAAE,+FAA+F;EAEpG;EACA;EACAC,EAAE,EAAE,kDAAkD;EACtD;;EAEA;EACAC,GAAG,EAAE,2CAA2C;EAChD;EACA;EACAC,GAAG,EAAE,+DAA+D;EACpEC,GAAG,EAAE,wEAAwE;EAC7EC,GAAG,EAAE,iDAAiD;EACtD;EACA;EACAC,GAAG,EAAE,oDAAoD;EACzDC,IAAI,EAAE,uCAAuC;EAC7CC,IAAI,EAAE,sCAAsC;EAC5CC,IAAI,EAAE,8BAA8B;EACpCC,IAAI,EAAE,8DAA8D;EACpEC,IAAI,EAAE,8HAA8H,GAChI,8DAA8D;EAClEC,IAAI,EAAE,0DAA0D;EAChEC,IAAI,EAAE,sEAAsE,GACxE,8GAA8G;EAClHC,IAAI,EAAE,iEAAiE;EACvEC,IAAI,EAAE,mSAAmS;EAEzS;EACAC,GAAG,EAAE,iCAAiC;EACtCC,GAAG,EAAE,kBAAkB;EACvBC,GAAG,EAAE,6DAA6D;EAClEC,GAAG,EAAE,8DAA8D;EACnEC,GAAG,EAAE,oEAAoE;EACzEC,GAAG,EAAE,gIAAgI;EACrIC,GAAG,EAAE,oBAAoB;EACzBC,GAAG,EAAE,sDAAsD;EAE3D;EACAC,GAAG,EAAE,iFAAiF;EACtFC,GAAG,EAAE,8EAA8E;EACnFC,GAAG,EAAE,kGAAkG;EACvGC,GAAG,E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tGC,IAAI,EAAE,mGAAmG;EAEzG;EACA;EACAC,IAAI,EAAE,uPAAuP;EAE7P;EACAC,GAAG,EAAE,kEAAkE;EACvEC,GAAG,EAAE,8BAA8B;EAEnC;EACA;EACA;;EAEA;EACAC,EAAE,EAAE,iEAAiE;EAErE;EACAC,IAAI,EAAE,oDAAoD;EAC1D;EACAC,IAAI,EAAE,iEAAiE;EACvE;;EAEA;EACAC,KAAK,EAAE,oFAAoF;EAC3FC,KAAK,EAAE,yEAAyE;EAChFC,KAAK,EAAE,wGAAwG;EAE/G;EACAC,IAAI,EAAE,0IAA0I;EAChJ;;EAEA;AACJ;AACA;AACA;AACA;EACIC,GAAG,EAAE;AACT,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/dist/cjs/plugins/storage-dexie/rx-storage-dexie.js b/dist/cjs/plugins/storage-dexie/rx-storage-dexie.js index bca662a5e69..de5a88c7249 100644 --- a/dist/cjs/plugins/storage-dexie/rx-storage-dexie.js +++ b/dist/cjs/plugins/storage-dexie/rx-storage-dexie.js @@ -9,6 +9,7 @@ var _dexieHelper = require("./dexie-helper.js"); var _rxStorageInstanceDexie = require("./rx-storage-instance-dexie.js"); var _rxStorageHelper = require("../../rx-storage-helper.js"); var _utilsRxdbVersion = require("../utils/utils-rxdb-version.js"); +var _rxError = require("../../rx-error.js"); var RxStorageDexie = exports.RxStorageDexie = /*#__PURE__*/function () { function RxStorageDexie(settings) { this.name = _dexieHelper.RX_STORAGE_NAME_DEXIE; @@ -18,6 +19,22 @@ var RxStorageDexie = exports.RxStorageDexie = /*#__PURE__*/function () { var _proto = RxStorageDexie.prototype; _proto.createStorageInstance = function createStorageInstance(params) { (0, _rxStorageHelper.ensureRxStorageInstanceParamsAreCorrect)(params); + + /** + * Dexie does not support non-required indexes and must throw if that is used. + * @link https://github.com/pubkey/rxdb/pull/6643#issuecomment-2505310082 + */ + if (params.schema.indexes) { + var indexFields = params.schema.indexes.flat(); + indexFields.filter(indexField => !indexField.includes('.')).forEach(indexField => { + if (!params.schema.required || !params.schema.required.includes(indexField)) { + throw (0, _rxError.newRxError)('DXE1', { + field: indexField, + schema: params.schema + }); + } + }); + } return (0, _rxStorageInstanceDexie.createDexieStorageInstance)(this, params, this.settings); }; return RxStorageDexie; diff --git a/dist/cjs/plugins/storage-dexie/rx-storage-dexie.js.map b/dist/cjs/plugins/storage-dexie/rx-storage-dexie.js.map index 280d2924ee7..ee8483d403b 100644 --- a/dist/cjs/plugins/storage-dexie/rx-storage-dexie.js.map +++ b/dist/cjs/plugins/storage-dexie/rx-storage-dexie.js.map @@ -1 +1 @@ -{"version":3,"file":"rx-storage-dexie.js","names":["_dexieHelper","require","_rxStorageInstanceDexie","_rxStorageHelper","_utilsRxdbVersion","RxStorageDexie","exports","settings","name","RX_STORAGE_NAME_DEXIE","rxdbVersion","RXDB_VERSION","_proto","prototype","createStorageInstance","params","ensureRxStorageInstanceParamsAreCorrect","createDexieStorageInstance","getRxStorageDexie","storage"],"sources":["../../../../src/plugins/storage-dexie/rx-storage-dexie.ts"],"sourcesContent":["import type {\n RxStorage,\n RxStorageInstanceCreationParams\n} from '../../types/index.d.ts';\nimport {\n RX_STORAGE_NAME_DEXIE\n} from './dexie-helper.ts';\nimport type {\n DexieSettings,\n DexieStorageInternals\n} from '../../types/plugins/dexie.d.ts';\nimport {\n createDexieStorageInstance,\n RxStorageInstanceDexie\n} from './rx-storage-instance-dexie.ts';\nimport { ensureRxStorageInstanceParamsAreCorrect } from '../../rx-storage-helper.ts';\nimport { RXDB_VERSION } from '../utils/utils-rxdb-version.ts';\n\n\n\nexport class RxStorageDexie implements RxStorage {\n public name = RX_STORAGE_NAME_DEXIE;\n public readonly rxdbVersion = RXDB_VERSION;\n constructor(\n public settings: DexieSettings\n ) { }\n\n public createStorageInstance(\n params: RxStorageInstanceCreationParams\n ): Promise> {\n ensureRxStorageInstanceParamsAreCorrect(params);\n return createDexieStorageInstance(this, params, this.settings);\n }\n}\n\n\nexport function getRxStorageDexie(\n settings: DexieSettings = {}\n): RxStorageDexie {\n const storage = new RxStorageDexie(settings);\n return storage;\n}\n"],"mappings":";;;;;;;AAIA,IAAAA,YAAA,GAAAC,OAAA;AAOA,IAAAC,uBAAA,GAAAD,OAAA;AAIA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAA8D,IAIjDI,cAAc,GAAAC,OAAA,CAAAD,cAAA;EAGvB,SAAAA,eACWE,QAAuB,EAChC;IAAA,KAJKC,IAAI,GAAGC,kCAAqB;IAAA,KACnBC,WAAW,GAAGC,8BAAY;IAAA,KAE/BJ,QAAuB,GAAvBA,QAAuB;EAC9B;EAAC,IAAAK,MAAA,GAAAP,cAAA,CAAAQ,SAAA;EAAAD,MAAA,CAEEE,qBAAqB,GAA5B,SAAOA,qBAAqBA,CACxBC,MAAiE,EACvB;IAC1C,IAAAC,wDAAuC,EAACD,MAAM,CAAC;IAC/C,OAAO,IAAAE,kDAA0B,EAAC,IAAI,EAAEF,MAAM,EAAE,IAAI,CAACR,QAAQ,CAAC;EAClE,CAAC;EAAA,OAAAF,cAAA;AAAA;AAIE,SAASa,iBAAiBA,CAC7BX,QAAuB,GAAG,CAAC,CAAC,EACd;EACd,IAAMY,OAAO,GAAG,IAAId,cAAc,CAACE,QAAQ,CAAC;EAC5C,OAAOY,OAAO;AAClB","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"rx-storage-dexie.js","names":["_dexieHelper","require","_rxStorageInstanceDexie","_rxStorageHelper","_utilsRxdbVersion","_rxError","RxStorageDexie","exports","settings","name","RX_STORAGE_NAME_DEXIE","rxdbVersion","RXDB_VERSION","_proto","prototype","createStorageInstance","params","ensureRxStorageInstanceParamsAreCorrect","schema","indexes","indexFields","flat","filter","indexField","includes","forEach","required","newRxError","field","createDexieStorageInstance","getRxStorageDexie","storage"],"sources":["../../../../src/plugins/storage-dexie/rx-storage-dexie.ts"],"sourcesContent":["import type {\n RxStorage,\n RxStorageInstanceCreationParams\n} from '../../types/index.d.ts';\nimport {\n RX_STORAGE_NAME_DEXIE\n} from './dexie-helper.ts';\nimport type {\n DexieSettings,\n DexieStorageInternals\n} from '../../types/plugins/dexie.d.ts';\nimport {\n createDexieStorageInstance,\n RxStorageInstanceDexie\n} from './rx-storage-instance-dexie.ts';\nimport { ensureRxStorageInstanceParamsAreCorrect } from '../../rx-storage-helper.ts';\nimport { RXDB_VERSION } from '../utils/utils-rxdb-version.ts';\nimport { getSchemaByObjectPath } from '../../rx-schema-helper.ts';\nimport { newRxError } from '../../rx-error.ts';\n\n\n\nexport class RxStorageDexie implements RxStorage {\n public name = RX_STORAGE_NAME_DEXIE;\n public readonly rxdbVersion = RXDB_VERSION;\n constructor(\n public settings: DexieSettings\n ) { }\n\n public createStorageInstance(\n params: RxStorageInstanceCreationParams\n ): Promise> {\n ensureRxStorageInstanceParamsAreCorrect(params);\n\n /**\n * Dexie does not support non-required indexes and must throw if that is used.\n * @link https://github.com/pubkey/rxdb/pull/6643#issuecomment-2505310082\n */\n if (params.schema.indexes) {\n const indexFields = params.schema.indexes.flat();\n indexFields\n .filter(indexField => !indexField.includes('.'))\n .forEach(indexField => {\n if (!params.schema.required || !params.schema.required.includes(indexField as any)) {\n throw newRxError('DXE1', {\n field: indexField,\n schema: params.schema,\n });\n }\n });\n }\n\n return createDexieStorageInstance(this, params, this.settings);\n }\n}\n\n\nexport function getRxStorageDexie(\n settings: DexieSettings = {}\n): RxStorageDexie {\n const storage = new RxStorageDexie(settings);\n return storage;\n}\n"],"mappings":";;;;;;;AAIA,IAAAA,YAAA,GAAAC,OAAA;AAOA,IAAAC,uBAAA,GAAAD,OAAA;AAIA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAEA,IAAAI,QAAA,GAAAJ,OAAA;AAA+C,IAIlCK,cAAc,GAAAC,OAAA,CAAAD,cAAA;EAGvB,SAAAA,eACWE,QAAuB,EAChC;IAAA,KAJKC,IAAI,GAAGC,kCAAqB;IAAA,KACnBC,WAAW,GAAGC,8BAAY;IAAA,KAE/BJ,QAAuB,GAAvBA,QAAuB;EAC9B;EAAC,IAAAK,MAAA,GAAAP,cAAA,CAAAQ,SAAA;EAAAD,MAAA,CAEEE,qBAAqB,GAA5B,SAAOA,qBAAqBA,CACxBC,MAAiE,EACvB;IAC1C,IAAAC,wDAAuC,EAACD,MAAM,CAAC;;IAE/C;AACR;AACA;AACA;IACQ,IAAIA,MAAM,CAACE,MAAM,CAACC,OAAO,EAAE;MACvB,IAAMC,WAAW,GAAGJ,MAAM,CAACE,MAAM,CAACC,OAAO,CAACE,IAAI,CAAC,CAAC;MAChDD,WAAW,CACNE,MAAM,CAACC,UAAU,IAAI,CAACA,UAAU,CAACC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAC/CC,OAAO,CAACF,UAAU,IAAI;QACnB,IAAI,CAACP,MAAM,CAACE,MAAM,CAACQ,QAAQ,IAAI,CAACV,MAAM,CAACE,MAAM,CAACQ,QAAQ,CAACF,QAAQ,CAACD,UAAiB,CAAC,EAAE;UAChF,MAAM,IAAAI,mBAAU,EAAC,MAAM,EAAE;YACrBC,KAAK,EAAEL,UAAU;YACjBL,MAAM,EAAEF,MAAM,CAACE;UACnB,CAAC,CAAC;QACN;MACJ,CAAC,CAAC;IACV;IAEA,OAAO,IAAAW,kDAA0B,EAAC,IAAI,EAAEb,MAAM,EAAE,IAAI,CAACR,QAAQ,CAAC;EAClE,CAAC;EAAA,OAAAF,cAAA;AAAA;AAIE,SAASwB,iBAAiBA,CAC7BtB,QAAuB,GAAG,CAAC,CAAC,EACd;EACd,IAAMuB,OAAO,GAAG,IAAIzB,cAAc,CAACE,QAAQ,CAAC;EAC5C,OAAOuB,OAAO;AAClB","ignoreList":[]} \ No newline at end of file diff --git a/dist/cjs/plugins/test-utils/schema-objects.js b/dist/cjs/plugins/test-utils/schema-objects.js index 266882ca945..fa656397102 100644 --- a/dist/cjs/plugins/test-utils/schema-objects.js +++ b/dist/cjs/plugins/test-utils/schema-objects.js @@ -160,7 +160,7 @@ function bigHumanDocumentType() { } function heroArrayData() { return { - name: randomStringWithSpecialChars(4, 6), + name: randomStringWithSpecialChars(6, 8), skills: new Array(3).fill(0).map(() => { return { name: randomStringWithSpecialChars(4, 6), @@ -171,7 +171,7 @@ function heroArrayData() { } function simpleHeroArray(partial = {}) { var defaultObj = { - name: randomStringWithSpecialChars(3, 6), + name: randomStringWithSpecialChars(6, 8), skills: new Array(3).fill(0).map(() => randomStringWithSpecialChars(3, 6)) }; return Object.assign(defaultObj, partial); diff --git a/dist/cjs/plugins/test-utils/schema-objects.js.map b/dist/cjs/plugins/test-utils/schema-objects.js.map index d5a531b16d3..65c9ec5bef5 100644 --- a/dist/cjs/plugins/test-utils/schema-objects.js.map +++ b/dist/cjs/plugins/test-utils/schema-objects.js.map @@ -1 +1 @@ -{"version":3,"file":"schema-objects.js","names":["_asyncTestUtil","require","schemas","_interopRequireWildcard","_index","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","TEST_DATA_CHARSET","exports","TEST_DATA_CHARSET_LAST_SORTED","ensureNotFalsy","lastOfArray","split","sort","someEmojisArr","baseChars","allChars","slice","appendToArray","randomStringWithSpecialChars","minLength","maxLength","text","Error","length","randomNumber","Math","floor","random","humanData","passportId","age","firstName","lastName","simpleHumanData","simpleHumanV3Data","partial","defaultObj","assign","simpleHumanAge","humanWithSubOther","other","NoIndexHuman","nestedHumanData","mainSkill","name","level","deepNestedHumanData","attack","good","count","bigHumanDocumentType","dnaHash","heroArrayData","skills","Array","fill","map","damage","simpleHeroArray","encryptedHumanData","secret","encryptedObjectHumanData","subname","encryptedDeepHumanDocumentType","firstLevelPassword","secretData","pw","deepSecret","darkhole","nestedSecret","compoundIndexData","passportCountry","compoundIndexNoStringData","nostringIndex","refHumanData","bestFriend","refHumanNestedData","foo","humanWithTimestampData","givenData","ret","id","updatedAt","Date","now","averageSchemaForFieldLength","averageSchema","averageSchemaData","properties","var1","var2","maximum","deep","deep1","deep2","deeper","deepNr","list","pointData","x","y","humanWithIdAndAgeIndexDocumentType","humanWithCompositePrimary","info"],"sources":["../../../../src/plugins/test-utils/schema-objects.ts"],"sourcesContent":["/**\n * this file contains objects which match the schemas in schemas.js\n */\n\nimport {\n randomNumber\n} from 'async-test-util';\nimport { HumanDocumentType } from './schemas.ts';\nimport * as schemas from './schemas.ts';\nimport { appendToArray, ensureNotFalsy, lastOfArray } from '../utils/index.ts';\n\n\n/**\n * Some storages had problems with umlauts and other special chars.\n * So we add these to all test strings.\n */\nexport const TEST_DATA_CHARSET = '0987654321ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzäöüÖÄßÜ[]{}\\'';\nexport const TEST_DATA_CHARSET_LAST_SORTED = ensureNotFalsy(lastOfArray(TEST_DATA_CHARSET.split('').sort()));\nconst someEmojisArr = ['😊', '💩', '👵', '🍌', '🏳️‍🌈', '😃'];\n\nconst baseChars = TEST_DATA_CHARSET.split('');\nconst allChars = baseChars.slice(0);\nappendToArray(allChars, someEmojisArr);\n\nexport function randomStringWithSpecialChars(\n minLength: number,\n /**\n * It has shown that alternating string lengths\n * can reproduce various problems. So by having variable\n * lengths we ensure that this fully works.\n */\n maxLength: number\n) {\n let text = '';\n\n if (!minLength || !maxLength || minLength > maxLength) {\n throw new Error('invalid length given ' + minLength + ' ' + maxLength);\n }\n\n const length = randomNumber(minLength, maxLength);\n\n while (text.length < length) {\n if (text.length === 0) {\n /**\n * TODO foundationdb does not work correctly when an index string starts\n * with an emoji. This can likely be fixed by upgrading foundationdb to the\n * latest version.\n */\n text += baseChars[Math.floor(Math.random() * baseChars.length)];\n } else {\n text += allChars[Math.floor(Math.random() * allChars.length)];\n }\n }\n\n /**\n * Because emojis can have a string.length of 2,\n * we can sometimes end up with strings that are longer\n * than the provided length. In that cases we have to rerun.\n */\n if (text.length > length) {\n return randomStringWithSpecialChars(minLength, maxLength);\n }\n\n return text;\n}\n\nexport interface SimpleHumanDocumentType {\n passportId: string;\n firstName: string;\n lastName: string;\n}\n\nexport function humanData(\n passportId: string = randomStringWithSpecialChars(8, 12),\n age: number = randomNumber(10, 50),\n firstName: string = randomStringWithSpecialChars(8, 12)\n): HumanDocumentType {\n return {\n passportId: passportId,\n firstName,\n lastName: randomStringWithSpecialChars(8, 12),\n age\n };\n}\n\nexport function simpleHumanData(): SimpleHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n lastName: randomStringWithSpecialChars(8, 12)\n };\n}\n\nexport interface SimpleHumanV3DocumentType {\n passportId: string;\n age: number;\n oneOptional?: string;\n}\nexport function simpleHumanV3Data(partial: Partial = {}): SimpleHumanV3DocumentType {\n const defaultObj = {\n passportId: randomStringWithSpecialChars(8, 12),\n age: randomNumber(10, 50)\n };\n return Object.assign(\n defaultObj,\n partial\n );\n}\n\nexport interface SimpleHumanAgeDocumentType {\n passportId: string;\n age: string;\n}\nexport function simpleHumanAge(partial: Partial = {}): SimpleHumanAgeDocumentType {\n const defaultObj = {\n passportId: randomStringWithSpecialChars(8, 12),\n age: randomNumber(10, 50) + ''\n };\n return Object.assign(\n defaultObj,\n partial\n );\n}\n\nexport interface HumanWithSubOtherDocumentType {\n passportId: string;\n other: {\n age: number;\n };\n}\nexport function humanWithSubOther(): HumanWithSubOtherDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n other: {\n age: randomNumber(10, 50)\n }\n };\n}\n\nexport interface NoIndexHumanDocumentType {\n firstName: string;\n lastName: string;\n}\nexport function NoIndexHuman(): NoIndexHumanDocumentType {\n return {\n firstName: randomStringWithSpecialChars(8, 12),\n lastName: randomStringWithSpecialChars(8, 12)\n };\n}\n\nexport interface NestedHumanDocumentType {\n passportId: string;\n firstName: string;\n mainSkill: {\n name: string;\n level: number;\n };\n}\nexport function nestedHumanData(partial: Partial = {}): NestedHumanDocumentType {\n const defaultObj = {\n passportId: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n mainSkill: {\n name: randomStringWithSpecialChars(4, 6),\n level: 5\n }\n };\n return Object.assign(\n defaultObj,\n partial\n );\n}\n\nexport interface DeepNestedHumanDocumentType {\n passportId: string;\n mainSkill: {\n name: string;\n attack: {\n good: boolean;\n count: number;\n };\n };\n}\nexport function deepNestedHumanData(): DeepNestedHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n mainSkill: {\n name: randomStringWithSpecialChars(4, 6),\n attack: {\n good: false,\n count: 5\n }\n }\n };\n}\n\nexport interface BigHumanDocumentType {\n passportId: string;\n dnaHash: string;\n firstName: string;\n lastName: string;\n age: number;\n}\nexport function bigHumanDocumentType(): BigHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n dnaHash: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n lastName: randomStringWithSpecialChars(8, 12),\n age: randomNumber(10, 50)\n };\n}\n\nexport interface HeroArrayDocumentType {\n name: string;\n skills: {\n name: string;\n damage: number;\n }[];\n}\nexport function heroArrayData(): HeroArrayDocumentType {\n return {\n name: randomStringWithSpecialChars(4, 6),\n skills: new Array(3).fill(0).map(() => {\n return {\n name: randomStringWithSpecialChars(4, 6),\n damage: randomNumber(10, 50)\n };\n })\n };\n}\n\nexport interface SimpleHeroArrayDocumentType {\n name: string;\n skills: string[];\n}\nexport function simpleHeroArray(partial: Partial = {}): SimpleHeroArrayDocumentType {\n const defaultObj = {\n name: randomStringWithSpecialChars(3, 6),\n skills: new Array(3).fill(0).map(() => randomStringWithSpecialChars(3, 6))\n };\n return Object.assign(\n defaultObj,\n partial\n );\n}\n\nexport interface EncryptedHumanDocumentType {\n passportId: string;\n firstName: string;\n secret: string;\n}\nexport function encryptedHumanData(secret = randomStringWithSpecialChars(8, 12)): EncryptedHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n secret\n };\n}\n\nexport interface EncryptedObjectHumanDocumentType {\n passportId: string;\n firstName: string;\n secret: {\n name: string;\n subname: string;\n };\n}\nexport function encryptedObjectHumanData(): EncryptedObjectHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n secret: {\n name: randomStringWithSpecialChars(8, 12),\n subname: randomStringWithSpecialChars(8, 12)\n }\n };\n}\n\nexport interface EncryptedDeepHumanDocumentType {\n passportId: string;\n firstName: string;\n firstLevelPassword: string;\n secretData: {\n pw: string;\n };\n deepSecret: {\n darkhole: {\n pw: string;\n };\n };\n nestedSecret: {\n darkhole: {\n pw: string;\n };\n };\n}\nexport function encryptedDeepHumanDocumentType(): EncryptedDeepHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n firstLevelPassword: randomStringWithSpecialChars(8, 12),\n secretData: {\n pw: randomStringWithSpecialChars(8, 12)\n },\n deepSecret: {\n darkhole: {\n pw: randomStringWithSpecialChars(8, 12)\n }\n },\n nestedSecret: {\n darkhole: {\n pw: randomStringWithSpecialChars(8, 12)\n }\n }\n };\n}\n\nexport interface CompoundIndexDocumentType {\n passportId: string;\n passportCountry: string;\n age: number;\n}\nexport function compoundIndexData(): CompoundIndexDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n passportCountry: randomStringWithSpecialChars(8, 12),\n age: randomNumber(10, 50)\n };\n}\n\nexport interface CompoundIndexNoStringDocumentType {\n passportId: string;\n passportCountry: { [prop: string]: string; };\n age: number;\n}\nexport function compoundIndexNoStringData(): CompoundIndexNoStringDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n passportCountry: { [randomStringWithSpecialChars(8, 12)]: randomStringWithSpecialChars(8, 12) },\n age: randomNumber(10, 50)\n };\n}\n\nexport interface NostringIndexDocumentType {\n passportId: {};\n firstName: string;\n}\nexport function nostringIndex(): NostringIndexDocumentType {\n return {\n passportId: {},\n firstName: randomStringWithSpecialChars(8, 12)\n };\n}\n\nexport interface RefHumanDocumentType {\n name: string;\n bestFriend: string;\n}\nexport function refHumanData(bestFriend?: string): RefHumanDocumentType {\n return {\n name: randomStringWithSpecialChars(8, 12),\n bestFriend\n } as any;\n}\n\nexport interface RefHumanNestedDocumentType {\n name: string;\n foo: {\n bestFriend: string;\n };\n}\nexport function refHumanNestedData(bestFriend?: string): RefHumanNestedDocumentType {\n return {\n name: randomStringWithSpecialChars(8, 12),\n foo: {\n bestFriend\n } as any\n };\n}\nexport interface HumanWithTimestampNestedDocumentType extends HumanWithTimestampDocumentType {\n address?: {\n street: string;\n suite: string;\n city: string;\n zipcode: string;\n geo: {\n lat: string;\n lng: string;\n };\n }\n}\n\nexport interface HumanWithTimestampDocumentType {\n id: string;\n name: string;\n age: number;\n updatedAt: number;\n deletedAt?: number;\n}\nexport function humanWithTimestampData(givenData: Partial = {}): HumanWithTimestampDocumentType {\n let ret = {\n id: randomStringWithSpecialChars(8, 12),\n name: randomStringWithSpecialChars(8, 12),\n age: randomNumber(1, 100),\n // use some time in the past week\n updatedAt: Date.now()\n };\n ret = Object.assign({}, ret, givenData);\n return ret;\n}\n\nexport interface AverageSchemaDocumentType {\n id: string;\n var1: string;\n var2: number;\n deep: {\n deep1: string;\n deep2: string;\n deeper: {\n deepNr: number;\n };\n };\n list: {\n deep1: string;\n deep2: string;\n }[];\n}\n\n\nconst averageSchemaForFieldLength = schemas.averageSchema() as any;\nexport function averageSchemaData(\n partial: Partial = {}\n): AverageSchemaDocumentType {\n return Object.assign(\n {},\n {\n id: randomStringWithSpecialChars(ensureNotFalsy(averageSchemaForFieldLength.properties.id.maxLength - 3), ensureNotFalsy(averageSchemaForFieldLength.properties.id.maxLength)),\n var1: randomStringWithSpecialChars(ensureNotFalsy(averageSchemaForFieldLength.properties.var1.maxLength) - 3, ensureNotFalsy(averageSchemaForFieldLength.properties.var1.maxLength)),\n var2: randomNumber(100, ensureNotFalsy(averageSchemaForFieldLength.properties.var2.maximum)),\n deep: {\n deep1: randomStringWithSpecialChars(ensureNotFalsy(averageSchemaForFieldLength.properties.deep.properties.deep1.maxLength) - 3, ensureNotFalsy(averageSchemaForFieldLength.properties.deep.properties.deep1.maxLength)),\n deep2: randomStringWithSpecialChars(ensureNotFalsy(averageSchemaForFieldLength.properties.deep.properties.deep2.maxLength) - 3, ensureNotFalsy(averageSchemaForFieldLength.properties.deep.properties.deep2.maxLength)),\n deeper: {\n deepNr: randomNumber(0, 10)\n }\n },\n list: new Array(5).fill(0).map(() => ({\n deep1: randomStringWithSpecialChars(2, 5),\n deep2: randomStringWithSpecialChars(5, 8)\n }))\n },\n partial\n );\n}\n\nexport interface PointDocumentType {\n id: string;\n x: number;\n y: number;\n}\nexport function pointData(): PointDocumentType {\n return {\n id: randomStringWithSpecialChars(8, 12),\n x: randomNumber(1, 100),\n y: randomNumber(1, 100)\n };\n}\n\nexport interface HumanWithIdAndAgeIndexDocumentType {\n id: string;\n name: string;\n age: number;\n}\nexport function humanWithIdAndAgeIndexDocumentType(\n age: number = randomNumber(1, 100)\n): HumanWithIdAndAgeIndexDocumentType {\n return {\n id: randomStringWithSpecialChars(8, 12),\n name: randomStringWithSpecialChars(8, 12),\n age\n };\n}\n\nexport type HumanWithCompositePrimary = {\n // optional because it might be created by RxDB and not known before\n id?: string;\n firstName: string;\n lastName: string;\n info: {\n age: number;\n };\n};\nexport function humanWithCompositePrimary(partial: Partial = {}): HumanWithCompositePrimary {\n const defaultObj = {\n firstName: randomStringWithSpecialChars(8, 12),\n lastName: randomStringWithSpecialChars(8, 12),\n info: {\n age: randomNumber(10, 50)\n }\n };\n return Object.assign(\n defaultObj,\n partial\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAAA,cAAA,GAAAC,OAAA;AAIA,IAAAC,OAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAA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;IACDyE,IAAI,EAAE,IAAI3C,KAAK,CAAC,CAAC,CAAC,CAACC,IAAI,CAAC,CAAC,CAAC,CAACC,GAAG,CAAC,OAAO;MAClCqC,KAAK,EAAE3E,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC;MACzC4E,KAAK,EAAE5E,4BAA4B,CAAC,CAAC,EAAE,CAAC;IAC5C,CAAC,CAAC;EACN,CAAC,EACDiB,OACJ,CAAC;AACL;AAOO,SAAS+D,SAASA,CAAA,EAAsB;EAC3C,OAAO;IACHjB,EAAE,EAAE/D,4BAA4B,CAAC,CAAC,EAAE,EAAE,CAAC;IACvCiF,CAAC,EAAE,IAAA3E,2BAAY,EAAC,CAAC,EAAE,GAAG,CAAC;IACvB4E,CAAC,EAAE,IAAA5E,2BAAY,EAAC,CAAC,EAAE,GAAG;EAC1B,CAAC;AACL;AAOO,SAAS6E,kCAAkCA,CAC9CvE,GAAW,GAAG,IAAAN,2BAAY,EAAC,CAAC,EAAE,GAAG,CAAC,EACA;EAClC,OAAO;IACHyD,EAAE,EAAE/D,4BAA4B,CAAC,CAAC,EAAE,EAAE,CAAC;IACvC0B,IAAI,EAAE1B,4BAA4B,CAAC,CAAC,EAAE,EAAE,CAAC;IACzCY;EACJ,CAAC;AACL;AAWO,SAASwE,yBAAyBA,CAACnE,OAA2C,GAAG,CAAC,CAAC,EAA6B;EACnH,IAAMC,UAAU,GAAG;IACfL,SAAS,EAAEb,4BAA4B,CAAC,CAAC,EAAE,EAAE,CAAC;IAC9Cc,QAAQ,EAAEd,4BAA4B,CAAC,CAAC,EAAE,EAAE,CAAC;IAC7CqF,IAAI,EAAE;MACFzE,GAAG,EAAE,IAAAN,2BAAY,EAAC,EAAE,EAAE,EAAE;IAC5B;EACJ,CAAC;EACD,OAAO1B,MAAM,CAACuC,MAAM,CAChBD,UAAU,EACVD,OACJ,CAAC;AACL","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"schema-objects.js","names":["_asyncTestUtil","require","schemas","_interopRequireWildcard","_index","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","TEST_DATA_CHARSET","exports","TEST_DATA_CHARSET_LAST_SORTED","ensureNotFalsy","lastOfArray","split","sort","someEmojisArr","baseChars","allChars","slice","appendToArray","randomStringWithSpecialChars","minLength","maxLength","text","Error","length","randomNumber","Math","floor","random","humanData","passportId","age","firstName","lastName","simpleHumanData","simpleHumanV3Data","partial","defaultObj","assign","simpleHumanAge","humanWithSubOther","other","NoIndexHuman","nestedHumanData","mainSkill","name","level","deepNestedHumanData","attack","good","count","bigHumanDocumentType","dnaHash","heroArrayData","skills","Array","fill","map","damage","simpleHeroArray","encryptedHumanData","secret","encryptedObjectHumanData","subname","encryptedDeepHumanDocumentType","firstLevelPassword","secretData","pw","deepSecret","darkhole","nestedSecret","compoundIndexData","passportCountry","compoundIndexNoStringData","nostringIndex","refHumanData","bestFriend","refHumanNestedData","foo","humanWithTimestampData","givenData","ret","id","updatedAt","Date","now","averageSchemaForFieldLength","averageSchema","averageSchemaData","properties","var1","var2","maximum","deep","deep1","deep2","deeper","deepNr","list","pointData","x","y","humanWithIdAndAgeIndexDocumentType","humanWithCompositePrimary","info"],"sources":["../../../../src/plugins/test-utils/schema-objects.ts"],"sourcesContent":["/**\n * this file contains objects which match the schemas in schemas.js\n */\n\nimport {\n randomNumber\n} from 'async-test-util';\nimport { HumanDocumentType } from './schemas.ts';\nimport * as schemas from './schemas.ts';\nimport { appendToArray, ensureNotFalsy, lastOfArray } from '../utils/index.ts';\n\n\n/**\n * Some storages had problems with umlauts and other special chars.\n * So we add these to all test strings.\n */\nexport const TEST_DATA_CHARSET = '0987654321ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzäöüÖÄßÜ[]{}\\'';\nexport const TEST_DATA_CHARSET_LAST_SORTED = ensureNotFalsy(lastOfArray(TEST_DATA_CHARSET.split('').sort()));\nconst someEmojisArr = ['😊', '💩', '👵', '🍌', '🏳️‍🌈', '😃'];\n\nconst baseChars = TEST_DATA_CHARSET.split('');\nconst allChars = baseChars.slice(0);\nappendToArray(allChars, someEmojisArr);\n\nexport function randomStringWithSpecialChars(\n minLength: number,\n /**\n * It has shown that alternating string lengths\n * can reproduce various problems. So by having variable\n * lengths we ensure that this fully works.\n */\n maxLength: number\n) {\n let text = '';\n\n if (!minLength || !maxLength || minLength > maxLength) {\n throw new Error('invalid length given ' + minLength + ' ' + maxLength);\n }\n\n const length = randomNumber(minLength, maxLength);\n\n while (text.length < length) {\n if (text.length === 0) {\n /**\n * TODO foundationdb does not work correctly when an index string starts\n * with an emoji. This can likely be fixed by upgrading foundationdb to the\n * latest version.\n */\n text += baseChars[Math.floor(Math.random() * baseChars.length)];\n } else {\n text += allChars[Math.floor(Math.random() * allChars.length)];\n }\n }\n\n /**\n * Because emojis can have a string.length of 2,\n * we can sometimes end up with strings that are longer\n * than the provided length. In that cases we have to rerun.\n */\n if (text.length > length) {\n return randomStringWithSpecialChars(minLength, maxLength);\n }\n\n return text;\n}\n\nexport interface SimpleHumanDocumentType {\n passportId: string;\n firstName: string;\n lastName: string;\n}\n\nexport function humanData(\n passportId: string = randomStringWithSpecialChars(8, 12),\n age: number = randomNumber(10, 50),\n firstName: string = randomStringWithSpecialChars(8, 12)\n): HumanDocumentType {\n return {\n passportId: passportId,\n firstName,\n lastName: randomStringWithSpecialChars(8, 12),\n age\n };\n}\n\nexport function simpleHumanData(): SimpleHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n lastName: randomStringWithSpecialChars(8, 12)\n };\n}\n\nexport interface SimpleHumanV3DocumentType {\n passportId: string;\n age: number;\n oneOptional?: string;\n}\nexport function simpleHumanV3Data(partial: Partial = {}): SimpleHumanV3DocumentType {\n const defaultObj = {\n passportId: randomStringWithSpecialChars(8, 12),\n age: randomNumber(10, 50)\n };\n return Object.assign(\n defaultObj,\n partial\n );\n}\n\nexport interface SimpleHumanAgeDocumentType {\n passportId: string;\n age: string;\n}\nexport function simpleHumanAge(partial: Partial = {}): SimpleHumanAgeDocumentType {\n const defaultObj = {\n passportId: randomStringWithSpecialChars(8, 12),\n age: randomNumber(10, 50) + ''\n };\n return Object.assign(\n defaultObj,\n partial\n );\n}\n\nexport interface HumanWithSubOtherDocumentType {\n passportId: string;\n other: {\n age: number;\n };\n}\nexport function humanWithSubOther(): HumanWithSubOtherDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n other: {\n age: randomNumber(10, 50)\n }\n };\n}\n\nexport interface NoIndexHumanDocumentType {\n firstName: string;\n lastName: string;\n}\nexport function NoIndexHuman(): NoIndexHumanDocumentType {\n return {\n firstName: randomStringWithSpecialChars(8, 12),\n lastName: randomStringWithSpecialChars(8, 12)\n };\n}\n\nexport interface NestedHumanDocumentType {\n passportId: string;\n firstName: string;\n mainSkill: {\n name: string;\n level: number;\n };\n}\nexport function nestedHumanData(partial: Partial = {}): NestedHumanDocumentType {\n const defaultObj = {\n passportId: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n mainSkill: {\n name: randomStringWithSpecialChars(4, 6),\n level: 5\n }\n };\n return Object.assign(\n defaultObj,\n partial\n );\n}\n\nexport interface DeepNestedHumanDocumentType {\n passportId: string;\n mainSkill: {\n name: string;\n attack: {\n good: boolean;\n count: number;\n };\n };\n}\nexport function deepNestedHumanData(): DeepNestedHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n mainSkill: {\n name: randomStringWithSpecialChars(4, 6),\n attack: {\n good: false,\n count: 5\n }\n }\n };\n}\n\nexport interface BigHumanDocumentType {\n passportId: string;\n dnaHash: string;\n firstName: string;\n lastName: string;\n age: number;\n}\nexport function bigHumanDocumentType(): BigHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n dnaHash: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n lastName: randomStringWithSpecialChars(8, 12),\n age: randomNumber(10, 50)\n };\n}\n\nexport interface HeroArrayDocumentType {\n name: string;\n skills: {\n name: string;\n damage: number;\n }[];\n}\nexport function heroArrayData(): HeroArrayDocumentType {\n return {\n name: randomStringWithSpecialChars(6, 8),\n skills: new Array(3).fill(0).map(() => {\n return {\n name: randomStringWithSpecialChars(4, 6),\n damage: randomNumber(10, 50)\n };\n })\n };\n}\n\nexport interface SimpleHeroArrayDocumentType {\n name: string;\n skills: string[];\n}\nexport function simpleHeroArray(partial: Partial = {}): SimpleHeroArrayDocumentType {\n const defaultObj = {\n name: randomStringWithSpecialChars(6, 8),\n skills: new Array(3).fill(0).map(() => randomStringWithSpecialChars(3, 6))\n };\n return Object.assign(\n defaultObj,\n partial\n );\n}\n\nexport interface EncryptedHumanDocumentType {\n passportId: string;\n firstName: string;\n secret: string;\n}\nexport function encryptedHumanData(secret = randomStringWithSpecialChars(8, 12)): EncryptedHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n secret\n };\n}\n\nexport interface EncryptedObjectHumanDocumentType {\n passportId: string;\n firstName: string;\n secret: {\n name: string;\n subname: string;\n };\n}\nexport function encryptedObjectHumanData(): EncryptedObjectHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n secret: {\n name: randomStringWithSpecialChars(8, 12),\n subname: randomStringWithSpecialChars(8, 12)\n }\n };\n}\n\nexport interface EncryptedDeepHumanDocumentType {\n passportId: string;\n firstName: string;\n firstLevelPassword: string;\n secretData: {\n pw: string;\n };\n deepSecret: {\n darkhole: {\n pw: string;\n };\n };\n nestedSecret: {\n darkhole: {\n pw: string;\n };\n };\n}\nexport function encryptedDeepHumanDocumentType(): EncryptedDeepHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n firstLevelPassword: randomStringWithSpecialChars(8, 12),\n secretData: {\n pw: randomStringWithSpecialChars(8, 12)\n },\n deepSecret: {\n darkhole: {\n pw: randomStringWithSpecialChars(8, 12)\n }\n },\n nestedSecret: {\n darkhole: {\n pw: randomStringWithSpecialChars(8, 12)\n }\n }\n };\n}\n\nexport interface CompoundIndexDocumentType {\n passportId: string;\n passportCountry: string;\n age: number;\n}\nexport function compoundIndexData(): CompoundIndexDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n passportCountry: randomStringWithSpecialChars(8, 12),\n age: randomNumber(10, 50)\n };\n}\n\nexport interface CompoundIndexNoStringDocumentType {\n passportId: string;\n passportCountry: { [prop: string]: string; };\n age: number;\n}\nexport function compoundIndexNoStringData(): CompoundIndexNoStringDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n passportCountry: { [randomStringWithSpecialChars(8, 12)]: randomStringWithSpecialChars(8, 12) },\n age: randomNumber(10, 50)\n };\n}\n\nexport interface NostringIndexDocumentType {\n passportId: {};\n firstName: string;\n}\nexport function nostringIndex(): NostringIndexDocumentType {\n return {\n passportId: {},\n firstName: randomStringWithSpecialChars(8, 12)\n };\n}\n\nexport interface RefHumanDocumentType {\n name: string;\n bestFriend: string;\n}\nexport function refHumanData(bestFriend?: string): RefHumanDocumentType {\n return {\n name: randomStringWithSpecialChars(8, 12),\n bestFriend\n } as any;\n}\n\nexport interface RefHumanNestedDocumentType {\n name: string;\n foo: {\n bestFriend: string;\n };\n}\nexport function refHumanNestedData(bestFriend?: string): RefHumanNestedDocumentType {\n return {\n name: randomStringWithSpecialChars(8, 12),\n foo: {\n bestFriend\n } as any\n };\n}\nexport interface HumanWithTimestampNestedDocumentType extends HumanWithTimestampDocumentType {\n address?: {\n street: string;\n suite: string;\n city: string;\n zipcode: string;\n geo: {\n lat: string;\n lng: string;\n };\n }\n}\n\nexport interface HumanWithTimestampDocumentType {\n id: string;\n name: string;\n age: number;\n updatedAt: number;\n deletedAt?: number;\n}\nexport function humanWithTimestampData(givenData: Partial = {}): HumanWithTimestampDocumentType {\n let ret = {\n id: randomStringWithSpecialChars(8, 12),\n name: randomStringWithSpecialChars(8, 12),\n age: randomNumber(1, 100),\n // use some time in the past week\n updatedAt: Date.now()\n };\n ret = Object.assign({}, ret, givenData);\n return ret;\n}\n\nexport interface AverageSchemaDocumentType {\n id: string;\n var1: string;\n var2: number;\n deep: {\n deep1: string;\n deep2: string;\n deeper: {\n deepNr: number;\n };\n };\n list: {\n deep1: string;\n deep2: string;\n }[];\n}\n\n\nconst averageSchemaForFieldLength = schemas.averageSchema() as any;\nexport function averageSchemaData(\n partial: Partial = {}\n): AverageSchemaDocumentType {\n return Object.assign(\n {},\n {\n id: randomStringWithSpecialChars(ensureNotFalsy(averageSchemaForFieldLength.properties.id.maxLength - 3), ensureNotFalsy(averageSchemaForFieldLength.properties.id.maxLength)),\n var1: randomStringWithSpecialChars(ensureNotFalsy(averageSchemaForFieldLength.properties.var1.maxLength) - 3, ensureNotFalsy(averageSchemaForFieldLength.properties.var1.maxLength)),\n var2: randomNumber(100, ensureNotFalsy(averageSchemaForFieldLength.properties.var2.maximum)),\n deep: {\n deep1: randomStringWithSpecialChars(ensureNotFalsy(averageSchemaForFieldLength.properties.deep.properties.deep1.maxLength) - 3, ensureNotFalsy(averageSchemaForFieldLength.properties.deep.properties.deep1.maxLength)),\n deep2: randomStringWithSpecialChars(ensureNotFalsy(averageSchemaForFieldLength.properties.deep.properties.deep2.maxLength) - 3, ensureNotFalsy(averageSchemaForFieldLength.properties.deep.properties.deep2.maxLength)),\n deeper: {\n deepNr: randomNumber(0, 10)\n }\n },\n list: new Array(5).fill(0).map(() => ({\n deep1: randomStringWithSpecialChars(2, 5),\n deep2: randomStringWithSpecialChars(5, 8)\n }))\n },\n partial\n );\n}\n\nexport interface PointDocumentType {\n id: string;\n x: number;\n y: number;\n}\nexport function pointData(): PointDocumentType {\n return {\n id: randomStringWithSpecialChars(8, 12),\n x: randomNumber(1, 100),\n y: randomNumber(1, 100)\n };\n}\n\nexport interface HumanWithIdAndAgeIndexDocumentType {\n id: string;\n name: string;\n age: number;\n}\nexport function humanWithIdAndAgeIndexDocumentType(\n age: number = randomNumber(1, 100)\n): HumanWithIdAndAgeIndexDocumentType {\n return {\n id: randomStringWithSpecialChars(8, 12),\n name: randomStringWithSpecialChars(8, 12),\n age\n };\n}\n\nexport type HumanWithCompositePrimary = {\n // optional because it might be created by RxDB and not known before\n id?: string;\n firstName: string;\n lastName: string;\n info: {\n age: number;\n };\n};\nexport function humanWithCompositePrimary(partial: Partial = {}): HumanWithCompositePrimary {\n const defaultObj = {\n firstName: randomStringWithSpecialChars(8, 12),\n lastName: randomStringWithSpecialChars(8, 12),\n info: {\n age: randomNumber(10, 50)\n }\n };\n return Object.assign(\n defaultObj,\n partial\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAAA,cAAA,GAAAC,OAAA;AAIA,IAAAC,OAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAA+E,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,M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GAAG,IAAAN,2BAAY,EAAC,CAAC,EAAE,GAAG,CAAC,EACA;EAClC,OAAO;IACHyD,EAAE,EAAE/D,4BAA4B,CAAC,CAAC,EAAE,EAAE,CAAC;IACvC0B,IAAI,EAAE1B,4BAA4B,CAAC,CAAC,EAAE,EAAE,CAAC;IACzCY;EACJ,CAAC;AACL;AAWO,SAASwE,yBAAyBA,CAACnE,OAA2C,GAAG,CAAC,CAAC,EAA6B;EACnH,IAAMC,UAAU,GAAG;IACfL,SAAS,EAAEb,4BAA4B,CAAC,CAAC,EAAE,EAAE,CAAC;IAC9Cc,QAAQ,EAAEd,4BAA4B,CAAC,CAAC,EAAE,EAAE,CAAC;IAC7CqF,IAAI,EAAE;MACFzE,GAAG,EAAE,IAAAN,2BAAY,EAAC,EAAE,EAAE,EAAE;IAC5B;EACJ,CAAC;EACD,OAAO1B,MAAM,CAACuC,MAAM,CAChBD,UAAU,EACVD,OACJ,CAAC;AACL","ignoreList":[]} \ No newline at end of file diff --git a/dist/cjs/plugins/test-utils/schemas.js b/dist/cjs/plugins/test-utils/schemas.js index b245f428f2e..1a3e31c6354 100644 --- a/dist/cjs/plugins/test-utils/schemas.js +++ b/dist/cjs/plugins/test-utils/schemas.js @@ -904,7 +904,7 @@ function averageSchema() { } } }, - required: ['id'], + required: ['id', 'var1', 'var2'], indexes: ['var1', 'var2', 'deep.deep1', // one compound index ['var2', 'var1']], diff --git a/dist/cjs/plugins/test-utils/schemas.js.map b/dist/cjs/plugins/test-utils/schemas.js.map index 8df4d038b07..0dd86209e9d 100644 --- a/dist/cjs/plugins/test-utils/schemas.js.map +++ b/dist/cjs/plugins/test-utils/schemas.js.map @@ -1 +1 @@ -{"version":3,"file":"schemas.js","names":["_asyncTestUtil","_interopRequireDefault","require","_overwritable","_rxSchema","_index","humanSchemaLiteral","exports","overwritable","deepFreezeWhenDevMode","title","description","version","keyCompression","primaryKey","type","properties","passportId","maxLength","firstName","lastName","age","minimum","maximum","multipleOf","required","indexes","humanSchemaTyped","toTypedRxJsonSchema","human","humanDefault","default","humanFinal","final","simpleHuman","oneOptional","simpleHumanV3","humanAgeIndex","humanSubIndex","other","humanWithAllIndex","nestedHuman","mainSkill","name","level","additionalProperties","deepNestedHuman","attack","good","count","noIndexHuman","noStringIndex","bigHuman","dnaHash","encryptedHuman","secret","encrypted","encryptedObjectHuman","subname","encryptedDeepHuman","firstLevelPassword","secretData","pw","deepSecret","darkhole","nestedSecret","notExistingIndex","address","street","compoundIndex","passportCountry","compoundIndexNoString","empty","id","heroArray","skills","maxItems","uniqueItems","items","damage","simpleArrayHero","primaryHumanLiteral","minLength","primaryHumanTypedSchema","primaryHuman","humanNormalizeSchema1Literal","humanNormalizeSchema1Typed","humanNormalizeSchema1","humanNormalizeSchema2","refHuman","bestFriend","ref","humanCompositePrimary","key","fields","separator","info","humanCompositePrimarySchemaLiteral","readonlyProps","allOf","anyOf","oneOf","dependencies","someDep","enum","humanCompositePrimarySchemaTyped","refHumanNested","foo","averageSchema","ret","AsyncTestUtil","randomString","var1","var2","deep","deep1","deep2","list","sharding","shards","mode","point","x","y","humanMinimal","humanMinimalBroken","broken","humanWithTimestamp","updatedAt","deletedAt","humanWithTimestampNested","suite","city","zipcode","geo","lat","lng","humanWithTimestampAllIndex","humanWithSimpleAndCompoundIndexes","createdAt","humanWithDeepNestedIndexes","job","manager","fullName","previousJobs","humanIdAndAgeIndex","enableKeyCompression","schema","flatClone"],"sources":["../../../../src/plugins/test-utils/schemas.ts"],"sourcesContent":["import AsyncTestUtil from 'async-test-util';\n\nimport {\n SimpleHumanV3DocumentType,\n HumanWithSubOtherDocumentType,\n NestedHumanDocumentType,\n DeepNestedHumanDocumentType,\n EncryptedHumanDocumentType,\n EncryptedObjectHumanDocumentType,\n EncryptedDeepHumanDocumentType,\n CompoundIndexDocumentType,\n CompoundIndexNoStringDocumentType,\n HeroArrayDocumentType,\n SimpleHeroArrayDocumentType,\n RefHumanDocumentType,\n RefHumanNestedDocumentType,\n AverageSchemaDocumentType,\n PointDocumentType,\n HumanWithTimestampDocumentType,\n BigHumanDocumentType,\n NostringIndexDocumentType,\n NoIndexHumanDocumentType,\n HumanWithCompositePrimary,\n HumanWithTimestampNestedDocumentType\n} from './schema-objects.ts';\nimport { overwritable } from '../../overwritable.ts';\nimport { toTypedRxJsonSchema } from '../../rx-schema.ts';\nimport type {\n ExtractDocumentTypeFromTypedRxJsonSchema,\n RxJsonSchema\n} from '../../types/rx-schema';\nimport { flatClone } from '../utils/index.ts';\n\n\nexport const humanSchemaLiteral = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string',\n maxLength: 100\n },\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: ['firstName', 'lastName', 'passportId'],\n indexes: ['firstName']\n} as const);\nconst humanSchemaTyped = toTypedRxJsonSchema(humanSchemaLiteral);\nexport type HumanDocumentType = ExtractDocumentTypeFromTypedRxJsonSchema;\nexport const human: RxJsonSchema = humanSchemaLiteral;\n\n\nexport const humanDefault: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n description: 'describes a human being',\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string',\n maxLength: 100\n },\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n default: 20\n }\n },\n indexes: [],\n required: ['passportId']\n});\n\nexport const humanFinal: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema with age set final',\n version: 0,\n keyCompression: false,\n type: 'object',\n primaryKey: 'passportId',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n },\n lastName: {\n type: 'string'\n },\n age: {\n type: 'integer',\n minimum: 0,\n maximum: 150,\n final: true\n }\n },\n required: [\n 'passportId'\n ]\n});\n\nexport const simpleHuman: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n keyCompression: false,\n description: 'describes a simple human being',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'string',\n maxLength: 100\n },\n oneOptional: {\n type: 'string'\n }\n },\n indexes: ['age'],\n required: ['passportId', 'age']\n});\n\nexport const simpleHumanV3: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 3,\n keyCompression: false,\n description: 'describes a simple human being',\n type: 'object',\n primaryKey: 'passportId',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'number',\n minimum: 0,\n maximum: 1000,\n multipleOf: 1\n },\n oneOptional: {\n type: 'string'\n }\n },\n indexes: ['age'],\n required: ['passportId', 'age']\n});\n\nexport const humanAgeIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n keyCompression: false,\n description: 'describes a human being',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n },\n lastName: {\n type: 'string'\n },\n age: {\n description: 'Age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: ['firstName', 'lastName', 'age'],\n indexes: ['age']\n});\n\nexport const humanSubIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n description: 'describes a human being where other.age is index',\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n other: {\n type: 'object',\n properties: {\n age: {\n description: 'Age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n }\n }\n },\n required: [\n 'passportId'\n ],\n indexes: ['other.age']\n});\n\n/**\n * each field is an index,\n * use this to slow down inserts in tests\n */\nexport const humanWithAllIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string',\n maxLength: 100\n },\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n indexes: ['firstName', 'lastName', 'age'],\n required: ['firstName', 'lastName']\n});\n\nexport const nestedHuman: RxJsonSchema = {\n title: 'human nested',\n version: 0,\n description: 'describes a human being with a nested field',\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n mainSkill: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 10\n },\n level: {\n type: 'number',\n minimum: 0,\n maximum: 10,\n multipleOf: 1\n }\n },\n required: ['name', 'level'],\n additionalProperties: false\n }\n },\n required: ['firstName'],\n indexes: []\n};\n\nexport const deepNestedHuman: RxJsonSchema = {\n title: 'deep human nested',\n version: 0,\n keyCompression: false,\n description: 'describes a human being with a nested field',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n mainSkill: {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n },\n attack: {\n type: 'object',\n properties: {\n good: {\n type: 'boolean'\n },\n count: {\n type: 'number'\n }\n }\n }\n },\n required: ['name']\n }\n },\n indexes: [],\n required: ['mainSkill']\n};\n\nexport const noIndexHuman: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n description: 'this schema has no index',\n keyCompression: false,\n primaryKey: 'firstName',\n type: 'object',\n properties: {\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string'\n }\n },\n required: ['lastName']\n});\n\nexport const noStringIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n description: 'the index has no type:string',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'object',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n }\n },\n required: ['firstName', 'passportId'],\n indexes: []\n});\n\n\nexport const bigHuman: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n description: 'describes a human being with 2 indexes',\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n dnaHash: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string'\n },\n age: {\n description: 'Age in years',\n type: 'integer',\n minimum: 0\n }\n },\n required: ['firstName', 'lastName'],\n indexes: ['firstName', 'dnaHash']\n});\n\nexport const encryptedHuman: RxJsonSchema = {\n title: 'human encrypted',\n version: 0,\n description: 'uses an encrypted field',\n primaryKey: 'passportId',\n type: 'object',\n keyCompression: false,\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n },\n secret: {\n type: 'string'\n }\n },\n indexes: [],\n required: ['firstName', 'secret'],\n encrypted: ['secret']\n};\n\nexport const encryptedObjectHuman: RxJsonSchema = {\n title: 'human encrypted',\n version: 0,\n keyCompression: false,\n description: 'uses an encrypted field',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n },\n secret: {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n },\n subname: {\n type: 'string'\n }\n }\n }\n },\n indexes: [],\n required: ['firstName', 'secret'],\n encrypted: ['secret']\n};\n\nexport const encryptedDeepHuman: RxJsonSchema = {\n title: 'human encrypted',\n version: 0,\n keyCompression: false,\n description: 'uses an encrypted field',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n },\n firstLevelPassword: {\n type: 'string',\n },\n secretData: {\n type: 'object',\n properties: {\n pw: {\n type: 'string'\n }\n }\n },\n deepSecret: {\n type: 'object',\n properties: {\n darkhole: {\n type: 'object',\n properties: {\n pw: {\n type: 'string'\n }\n }\n }\n }\n },\n nestedSecret: {\n type: 'object',\n properties: {\n darkhole: {\n type: 'object',\n properties: {\n pw: {\n type: 'string'\n }\n }\n }\n }\n }\n\n },\n indexes: [],\n required: ['firstName', 'secretData'],\n encrypted: [\n 'firstLevelPassword',\n 'secretData',\n 'deepSecret.darkhole.pw',\n 'nestedSecret.darkhole.pw'\n ]\n};\n\nexport const notExistingIndex: RxJsonSchema<{ passportId: string; address: { street: string; }; }> = {\n title: 'index',\n version: 0,\n description: 'this schema has a specified index which does not exists',\n primaryKey: 'passportId',\n type: 'object',\n keyCompression: false,\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n address: {\n type: 'object',\n properties: {\n street: { type: 'string' }\n }\n }\n },\n required: [\n 'passportId'\n ],\n indexes: ['address.apartment']\n};\n\nexport const compoundIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'compound index',\n version: 0,\n description: 'this schema has a compoundIndex',\n primaryKey: 'passportId',\n type: 'object',\n keyCompression: false,\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n passportCountry: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: [\n 'passportId'\n ],\n indexes: [\n ['age', 'passportCountry']\n ]\n});\n\nexport const compoundIndexNoString: RxJsonSchema = {\n title: 'compound index',\n version: 0,\n description: 'this schema has a compoundIndex',\n primaryKey: 'passportId',\n keyCompression: false,\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n passportCountry: {\n type: 'object'\n },\n age: {\n type: 'integer'\n }\n },\n indexes: [\n [10, 'passportCountry']\n ]\n} as RxJsonSchema;\n\nexport const empty: RxJsonSchema = {\n title: 'empty schema',\n version: 0,\n type: 'object',\n primaryKey: 'id',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n }\n },\n required: ['id']\n};\n\nexport const heroArray: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'hero schema',\n version: 0,\n keyCompression: false,\n description: 'describes a hero with an array-field',\n primaryKey: 'name',\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n },\n skills: {\n type: 'array',\n maxItems: 5,\n uniqueItems: true,\n items: {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n },\n damage: {\n type: 'number'\n }\n }\n }\n }\n },\n required: [\n 'name'\n ]\n});\n\nexport const simpleArrayHero: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'hero schema',\n version: 0,\n description: 'describes a hero with a string-array-field',\n keyCompression: false,\n primaryKey: 'name',\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n },\n skills: {\n type: 'array',\n maxItems: 5,\n uniqueItems: true,\n items: {\n type: 'string',\n }\n }\n },\n required: [\n 'name'\n ]\n});\n\nexport const primaryHumanLiteral = overwritable.deepFreezeWhenDevMode({\n title: 'human schema with primary',\n version: 0,\n description: 'describes a human being with passportID as primary',\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n minLength: 4,\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string',\n maxLength: 500\n },\n age: {\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: ['passportId', 'firstName', 'lastName']\n} as const);\nconst primaryHumanTypedSchema = toTypedRxJsonSchema(primaryHumanLiteral);\nexport type PrimaryHumanDocType = ExtractDocumentTypeFromTypedRxJsonSchema;\nexport const primaryHuman: RxJsonSchema = primaryHumanLiteral;\n\nexport const humanNormalizeSchema1Literal = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n keyCompression: false,\n description: 'describes a human being',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n minLength: 4,\n maxLength: 100\n },\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: ['age', 'passportId']\n} as const);\nconst humanNormalizeSchema1Typed = toTypedRxJsonSchema(humanNormalizeSchema1Literal);\nexport type AgeHumanDocumentType = ExtractDocumentTypeFromTypedRxJsonSchema;\nexport const humanNormalizeSchema1: RxJsonSchema = humanNormalizeSchema1Literal;\n\nexport const humanNormalizeSchema2: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n minLength: 4,\n maxLength: 100\n },\n age: {\n minimum: 0,\n type: 'integer',\n description: 'age in years',\n maximum: 150,\n multipleOf: 1\n }\n },\n description: 'describes a human being',\n required: ['age', 'passportId']\n});\n\nexport const refHuman: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human related to other human',\n version: 0,\n keyCompression: false,\n primaryKey: 'name',\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n },\n bestFriend: {\n ref: 'human',\n type: 'string'\n }\n },\n required: [\n 'name'\n ]\n});\n\nexport const humanCompositePrimary: RxJsonSchema = {\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: {\n key: 'id',\n fields: [\n 'firstName',\n 'info.age'\n ],\n separator: '|'\n },\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string'\n },\n info: {\n type: 'object',\n properties: {\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150\n }\n },\n required: ['age']\n }\n },\n required: [\n 'id',\n 'firstName',\n 'lastName',\n 'info'\n ],\n indexes: ['firstName']\n};\n\nexport const humanCompositePrimarySchemaLiteral = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: {\n key: 'id',\n fields: [\n 'firstName',\n 'info.age'\n ],\n separator: '|'\n },\n encrypted: [],\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string'\n },\n info: {\n type: 'object',\n properties: {\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150\n }\n },\n required: ['age']\n },\n readonlyProps: {\n allOf: [],\n anyOf: [],\n oneOf: [],\n type: [],\n dependencies: {\n someDep: ['asd'],\n },\n items: [],\n required: [],\n enum: [],\n }\n },\n required: [\n 'id',\n 'firstName',\n 'lastName',\n 'info'\n ],\n indexes: ['firstName']\n} as const);\n\nconst humanCompositePrimarySchemaTyped = toTypedRxJsonSchema(humanCompositePrimarySchemaLiteral);\nexport type HumanCompositePrimaryDocType = ExtractDocumentTypeFromTypedRxJsonSchema;\n\nexport const refHumanNested: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human related to other human',\n version: 0,\n keyCompression: false,\n primaryKey: 'name',\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n },\n foo: {\n type: 'object',\n properties: {\n bestFriend: {\n ref: 'human',\n type: 'string'\n }\n }\n }\n },\n required: [\n 'name'\n ]\n});\n\n/**\n * an average schema used in performance-tests\n */\nexport function averageSchema(): RxJsonSchema {\n const ret: RxJsonSchema = {\n title: 'averageSchema_' + AsyncTestUtil.randomString(5), // randomisation used so hash differs\n version: 0,\n primaryKey: 'id',\n type: 'object',\n keyCompression: false,\n properties: {\n id: {\n description: 'id',\n type: 'string',\n maxLength: 12\n },\n var1: {\n description: 'var1',\n type: 'string',\n maxLength: 12\n },\n var2: {\n description: 'var2',\n type: 'number',\n minimum: 0,\n maximum: 50000,\n multipleOf: 1\n },\n deep: {\n type: 'object',\n properties: {\n deep1: {\n type: 'string',\n maxLength: 10\n },\n deep2: {\n type: 'string',\n maxLength: 10\n }\n }\n },\n list: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n deep1: {\n type: 'string'\n },\n deep2: {\n type: 'string'\n }\n }\n }\n }\n },\n required: [\n 'id'\n ],\n indexes: [\n 'var1',\n 'var2',\n 'deep.deep1',\n // one compound index\n [\n 'var2',\n 'var1'\n ]\n ],\n sharding: {\n shards: 6,\n mode: 'collection'\n }\n };\n return ret;\n}\n\nexport const point: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'point schema',\n version: 0,\n description: 'describes coordinates in 2d space',\n primaryKey: 'id',\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n x: {\n type: 'number'\n },\n y: {\n type: 'number'\n }\n },\n required: ['x', 'y']\n});\n\nexport const humanMinimal: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'integer'\n },\n oneOptional: {\n type: 'string'\n }\n },\n indexes: [],\n required: ['passportId', 'age']\n});\n\nexport const humanMinimalBroken: RxJsonSchema<{ passportId: string; broken: number; }> = {\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n broken: {\n type: 'integer'\n }\n },\n indexes: [],\n required: ['passportId', 'broken']\n} as unknown as RxJsonSchema;\n\n\n/**\n * used in the graphql-test\n * contains timestamp\n */\nexport const humanWithTimestamp: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n version: 0,\n type: 'object',\n primaryKey: 'id',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string',\n maxLength: 1000\n },\n age: {\n type: 'number'\n },\n updatedAt: {\n type: 'number',\n minimum: 0,\n maximum: 10000000000000000,\n multipleOf: 1\n\n },\n deletedAt: {\n type: 'number'\n }\n },\n indexes: ['updatedAt'],\n required: ['id', 'name', 'age', 'updatedAt']\n});\n\nexport const humanWithTimestampNested: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n version: 0,\n type: 'object',\n primaryKey: 'id',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string',\n maxLength: 1000\n },\n age: {\n type: 'number'\n },\n updatedAt: {\n type: 'number',\n minimum: 0,\n maximum: 10000000000000000,\n multipleOf: 1\n\n },\n deletedAt: {\n type: 'number'\n },\n address: {\n type: 'object',\n properties: {\n street: {\n type: 'string',\n },\n suite: {\n type: 'string',\n },\n city: {\n type: 'string',\n },\n zipcode: {\n type: 'string',\n },\n geo: {\n type: 'object',\n properties: {\n lat: {\n type: 'string',\n },\n lng: {\n type: 'string',\n },\n },\n },\n },\n },\n },\n indexes: ['updatedAt'],\n required: ['id', 'name', 'age', 'updatedAt']\n});\n\n\n/**\n * each field is an index,\n * use this to slow down inserts in tests\n */\nexport const humanWithTimestampAllIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n version: 0,\n type: 'object',\n primaryKey: 'id',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'number',\n minimum: 0,\n maximum: 1500,\n multipleOf: 1\n },\n updatedAt: {\n type: 'number',\n minimum: 0,\n maximum: 10000000000000000,\n multipleOf: 1\n },\n deletedAt: {\n type: 'number'\n }\n },\n indexes: ['name', 'age', 'updatedAt'],\n required: ['id', 'name', 'age', 'updatedAt']\n});\n\nexport const humanWithSimpleAndCompoundIndexes: RxJsonSchema<{\n id: string;\n name: string;\n age: number;\n createdAt: number;\n updatedAt: number;\n}> = overwritable.deepFreezeWhenDevMode({\n version: 0,\n primaryKey: 'id',\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'number',\n minimum: 0,\n maximum: 1500,\n multipleOf: 1\n },\n createdAt: {\n type: 'number',\n minimum: 0,\n maximum: 10000000000000000,\n multipleOf: 1\n },\n updatedAt: {\n type: 'number',\n minimum: 0,\n maximum: 10000000000000000,\n multipleOf: 1\n }\n },\n indexes: [\n ['name', 'id'],\n ['age', 'id'],\n ['createdAt', 'updatedAt', 'id']\n ],\n required: ['id', 'name', 'age', 'updatedAt']\n});\n\nexport const humanWithDeepNestedIndexes: RxJsonSchema<{ id: string; name: string; job: any; }> = overwritable.deepFreezeWhenDevMode({\n version: 0,\n primaryKey: 'id',\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string',\n maxLength: 100\n },\n job: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n },\n manager: {\n type: 'object',\n properties: {\n fullName: {\n type: 'string',\n maxLength: 100\n },\n previousJobs: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n }\n }\n }\n }\n }\n }\n }\n }\n },\n required: [\n 'id'\n ],\n indexes: [\n 'name',\n 'job.name',\n 'job.manager.fullName'\n ]\n});\n\nexport const humanIdAndAgeIndex: RxJsonSchema<{ id: string; name: string; age: number; }> = overwritable.deepFreezeWhenDevMode({\n version: 0,\n description: 'uses a compound index with id as lowest level',\n primaryKey: 'id',\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string'\n },\n age: {\n description: 'Age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: ['id', 'name', 'age'],\n indexes: [\n ['age', 'id']\n ]\n});\n\n\nexport function enableKeyCompression(\n schema: RxJsonSchema\n): RxJsonSchema {\n const ret = flatClone(schema);\n ret.keyCompression = true;\n return ret;\n}\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAyBA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AAGO,IAAMI,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAAGE,0BAAY,CAACC,qBAAqB,CAAC;EACjEC,KAAK,EAAE,cAAc;EACrBC,WAAW,EAAE,yBAAyB;EACtCC,OAAO,EAAE,CAAC;EACVC,cAAc,EAAE,KAAK;EACrBC,UAAU,EAAE,YAAY;EACxBC,IAAI,EAAE,QAAQ;EACdC,UAAU,EAAE;IACRC,UAAU,EAAE;MACRF,IAAI,EAAE,QAAQ;MACdG,SAAS,EAAE;IACf,CAAC;IACDC,SAAS,EAAE;MACPJ,IAAI,EAAE,QAAQ;MACdG,SAAS,EAAE;IACf,CAAC;IACDE,QAAQ,EAAE;MACNL,IAAI,EAAE,QAAQ;MACdG,SAAS,EAAE;IACf,CAAC;IACDG,GAAG,EAAE;MACDV,WAAW,EAAE,cAAc;MAC3BI,IAAI,EAAE,SAAS;MACfO,OAAO,EAAE,CAAC;MACVC,OAAO,EAAE,GAAG;MACZC,UAAU,EAAE;IAChB;EACJ,CAAC;EACDC,QAAQ,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,YAAY,CAAC;EACjDC,OAAO,EAAE,CAAC,WAAW;AACzB,CAAU,CAAC;AACX,IAAMC,gBAAgB,GAAG,IAAAC,6BAAmB,EAACtB,kBAAkB,CAAC;AAEzD,IAAMuB,KAAsC,GAAAtB,OAAA,CAAAsB,KAAA,GAAGvB,kBAAkB;AAGjE,IAAMwB,YAA6C,GAAAvB,OAAA,CAAAuB,YAAA,GAAGtB,0BAAY,CAACC,qBAAqB,CAAC;EAC5FC,KAAK,EA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CAAC;IACDM,GAAG,EAAE;MACDV,WAAW,EAAE,cAAc;MAC3BI,IAAI,EAAE,SAAS;MACfO,OAAO,EAAE,CAAC;MACVC,OAAO,EAAE,GAAG;MACZC,UAAU,EAAE;IAChB;EACJ,CAAC;EACDC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC;EAC/BC,OAAO,EAAE,CACL,CAAC,KAAK,EAAE,IAAI,CAAC;AAErB,CAAC,CAAC;AAGK,SAASwH,oBAAoBA,CAChCC,MAA+B,EACR;EACvB,IAAMtC,GAAG,GAAG,IAAAuC,gBAAS,EAACD,MAAM,CAAC;EAC7BtC,GAAG,CAAChG,cAAc,GAAG,IAAI;EACzB,OAAOgG,GAAG;AACd","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"schemas.js","names":["_asyncTestUtil","_interopRequireDefault","require","_overwritable","_rxSchema","_index","humanSchemaLiteral","exports","overwritable","deepFreezeWhenDevMode","title","description","version","keyCompression","primaryKey","type","properties","passportId","maxLength","firstName","lastName","age","minimum","maximum","multipleOf","required","indexes","humanSchemaTyped","toTypedRxJsonSchema","human","humanDefault","default","humanFinal","final","simpleHuman","oneOptional","simpleHumanV3","humanAgeIndex","humanSubIndex","other","humanWithAllIndex","nestedHuman","mainSkill","name","level","additionalProperties","deepNestedHuman","attack","good","count","noIndexHuman","noStringIndex","bigHuman","dnaHash","encryptedHuman","secret","encrypted","encryptedObjectHuman","subname","encryptedDeepHuman","firstLevelPassword","secretData","pw","deepSecret","darkhole","nestedSecret","notExistingIndex","address","street","compoundIndex","passportCountry","compoundIndexNoString","empty","id","heroArray","skills","maxItems","uniqueItems","items","damage","simpleArrayHero","primaryHumanLiteral","minLength","primaryHumanTypedSchema","primaryHuman","humanNormalizeSchema1Literal","humanNormalizeSchema1Typed","humanNormalizeSchema1","humanNormalizeSchema2","refHuman","bestFriend","ref","humanCompositePrimary","key","fields","separator","info","humanCompositePrimarySchemaLiteral","readonlyProps","allOf","anyOf","oneOf","dependencies","someDep","enum","humanCompositePrimarySchemaTyped","refHumanNested","foo","averageSchema","ret","AsyncTestUtil","randomString","var1","var2","deep","deep1","deep2","list","sharding","shards","mode","point","x","y","humanMinimal","humanMinimalBroken","broken","humanWithTimestamp","updatedAt","deletedAt","humanWithTimestampNested","suite","city","zipcode","geo","lat","lng","humanWithTimestampAllIndex","humanWithSimpleAndCompoundIndexes","createdAt","humanWithDeepNestedIndexes","job","manager","fullName","previousJobs","humanIdAndAgeIndex","enableKeyCompression","schema","flatClone"],"sources":["../../../../src/plugins/test-utils/schemas.ts"],"sourcesContent":["import AsyncTestUtil from 'async-test-util';\n\nimport {\n SimpleHumanV3DocumentType,\n HumanWithSubOtherDocumentType,\n NestedHumanDocumentType,\n DeepNestedHumanDocumentType,\n EncryptedHumanDocumentType,\n EncryptedObjectHumanDocumentType,\n EncryptedDeepHumanDocumentType,\n CompoundIndexDocumentType,\n CompoundIndexNoStringDocumentType,\n HeroArrayDocumentType,\n SimpleHeroArrayDocumentType,\n RefHumanDocumentType,\n RefHumanNestedDocumentType,\n AverageSchemaDocumentType,\n PointDocumentType,\n HumanWithTimestampDocumentType,\n BigHumanDocumentType,\n NostringIndexDocumentType,\n NoIndexHumanDocumentType,\n HumanWithCompositePrimary,\n HumanWithTimestampNestedDocumentType\n} from './schema-objects.ts';\nimport { overwritable } from '../../overwritable.ts';\nimport { toTypedRxJsonSchema } from '../../rx-schema.ts';\nimport type {\n ExtractDocumentTypeFromTypedRxJsonSchema,\n RxJsonSchema\n} from '../../types/rx-schema';\nimport { flatClone } from '../utils/index.ts';\n\n\nexport const humanSchemaLiteral = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string',\n maxLength: 100\n },\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: ['firstName', 'lastName', 'passportId'],\n indexes: ['firstName']\n} as const);\nconst humanSchemaTyped = toTypedRxJsonSchema(humanSchemaLiteral);\nexport type HumanDocumentType = ExtractDocumentTypeFromTypedRxJsonSchema;\nexport const human: RxJsonSchema = humanSchemaLiteral;\n\n\nexport const humanDefault: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n description: 'describes a human being',\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string',\n maxLength: 100\n },\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n default: 20\n }\n },\n indexes: [],\n required: ['passportId']\n});\n\nexport const humanFinal: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema with age set final',\n version: 0,\n keyCompression: false,\n type: 'object',\n primaryKey: 'passportId',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n },\n lastName: {\n type: 'string'\n },\n age: {\n type: 'integer',\n minimum: 0,\n maximum: 150,\n final: true\n }\n },\n required: [\n 'passportId'\n ]\n});\n\nexport const simpleHuman: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n keyCompression: false,\n description: 'describes a simple human being',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'string',\n maxLength: 100\n },\n oneOptional: {\n type: 'string'\n }\n },\n indexes: ['age'],\n required: ['passportId', 'age']\n});\n\nexport const simpleHumanV3: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 3,\n keyCompression: false,\n description: 'describes a simple human being',\n type: 'object',\n primaryKey: 'passportId',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'number',\n minimum: 0,\n maximum: 1000,\n multipleOf: 1\n },\n oneOptional: {\n type: 'string'\n }\n },\n indexes: ['age'],\n required: ['passportId', 'age']\n});\n\nexport const humanAgeIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n keyCompression: false,\n description: 'describes a human being',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n },\n lastName: {\n type: 'string'\n },\n age: {\n description: 'Age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: ['firstName', 'lastName', 'age'],\n indexes: ['age']\n});\n\nexport const humanSubIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n description: 'describes a human being where other.age is index',\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n other: {\n type: 'object',\n properties: {\n age: {\n description: 'Age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n }\n }\n },\n required: [\n 'passportId'\n ],\n indexes: ['other.age']\n});\n\n/**\n * each field is an index,\n * use this to slow down inserts in tests\n */\nexport const humanWithAllIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string',\n maxLength: 100\n },\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n indexes: ['firstName', 'lastName', 'age'],\n required: ['firstName', 'lastName']\n});\n\nexport const nestedHuman: RxJsonSchema = {\n title: 'human nested',\n version: 0,\n description: 'describes a human being with a nested field',\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n mainSkill: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 10\n },\n level: {\n type: 'number',\n minimum: 0,\n maximum: 10,\n multipleOf: 1\n }\n },\n required: ['name', 'level'],\n additionalProperties: false\n }\n },\n required: ['firstName'],\n indexes: []\n};\n\nexport const deepNestedHuman: RxJsonSchema = {\n title: 'deep human nested',\n version: 0,\n keyCompression: false,\n description: 'describes a human being with a nested field',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n mainSkill: {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n },\n attack: {\n type: 'object',\n properties: {\n good: {\n type: 'boolean'\n },\n count: {\n type: 'number'\n }\n }\n }\n },\n required: ['name']\n }\n },\n indexes: [],\n required: ['mainSkill']\n};\n\nexport const noIndexHuman: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n description: 'this schema has no index',\n keyCompression: false,\n primaryKey: 'firstName',\n type: 'object',\n properties: {\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string'\n }\n },\n required: ['lastName']\n});\n\nexport const noStringIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n description: 'the index has no type:string',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'object',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n }\n },\n required: ['firstName', 'passportId'],\n indexes: []\n});\n\n\nexport const bigHuman: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n description: 'describes a human being with 2 indexes',\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n dnaHash: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string'\n },\n age: {\n description: 'Age in years',\n type: 'integer',\n minimum: 0\n }\n },\n required: ['firstName', 'lastName'],\n indexes: ['firstName', 'dnaHash']\n});\n\nexport const encryptedHuman: RxJsonSchema = {\n title: 'human encrypted',\n version: 0,\n description: 'uses an encrypted field',\n primaryKey: 'passportId',\n type: 'object',\n keyCompression: false,\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n },\n secret: {\n type: 'string'\n }\n },\n indexes: [],\n required: ['firstName', 'secret'],\n encrypted: ['secret']\n};\n\nexport const encryptedObjectHuman: RxJsonSchema = {\n title: 'human encrypted',\n version: 0,\n keyCompression: false,\n description: 'uses an encrypted field',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n },\n secret: {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n },\n subname: {\n type: 'string'\n }\n }\n }\n },\n indexes: [],\n required: ['firstName', 'secret'],\n encrypted: ['secret']\n};\n\nexport const encryptedDeepHuman: RxJsonSchema = {\n title: 'human encrypted',\n version: 0,\n keyCompression: false,\n description: 'uses an encrypted field',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n },\n firstLevelPassword: {\n type: 'string',\n },\n secretData: {\n type: 'object',\n properties: {\n pw: {\n type: 'string'\n }\n }\n },\n deepSecret: {\n type: 'object',\n properties: {\n darkhole: {\n type: 'object',\n properties: {\n pw: {\n type: 'string'\n }\n }\n }\n }\n },\n nestedSecret: {\n type: 'object',\n properties: {\n darkhole: {\n type: 'object',\n properties: {\n pw: {\n type: 'string'\n }\n }\n }\n }\n }\n\n },\n indexes: [],\n required: ['firstName', 'secretData'],\n encrypted: [\n 'firstLevelPassword',\n 'secretData',\n 'deepSecret.darkhole.pw',\n 'nestedSecret.darkhole.pw'\n ]\n};\n\nexport const notExistingIndex: RxJsonSchema<{ passportId: string; address: { street: string; }; }> = {\n title: 'index',\n version: 0,\n description: 'this schema has a specified index which does not exists',\n primaryKey: 'passportId',\n type: 'object',\n keyCompression: false,\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n address: {\n type: 'object',\n properties: {\n street: { type: 'string' }\n }\n }\n },\n required: [\n 'passportId'\n ],\n indexes: ['address.apartment']\n};\n\nexport const compoundIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'compound index',\n version: 0,\n description: 'this schema has a compoundIndex',\n primaryKey: 'passportId',\n type: 'object',\n keyCompression: false,\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n passportCountry: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: [\n 'passportId'\n ],\n indexes: [\n ['age', 'passportCountry']\n ]\n});\n\nexport const compoundIndexNoString: RxJsonSchema = {\n title: 'compound index',\n version: 0,\n description: 'this schema has a compoundIndex',\n primaryKey: 'passportId',\n keyCompression: false,\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n passportCountry: {\n type: 'object'\n },\n age: {\n type: 'integer'\n }\n },\n indexes: [\n [10, 'passportCountry']\n ]\n} as RxJsonSchema;\n\nexport const empty: RxJsonSchema = {\n title: 'empty schema',\n version: 0,\n type: 'object',\n primaryKey: 'id',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n }\n },\n required: ['id']\n};\n\nexport const heroArray: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'hero schema',\n version: 0,\n keyCompression: false,\n description: 'describes a hero with an array-field',\n primaryKey: 'name',\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n },\n skills: {\n type: 'array',\n maxItems: 5,\n uniqueItems: true,\n items: {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n },\n damage: {\n type: 'number'\n }\n }\n }\n }\n },\n required: [\n 'name'\n ]\n});\n\nexport const simpleArrayHero: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'hero schema',\n version: 0,\n description: 'describes a hero with a string-array-field',\n keyCompression: false,\n primaryKey: 'name',\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n },\n skills: {\n type: 'array',\n maxItems: 5,\n uniqueItems: true,\n items: {\n type: 'string',\n }\n }\n },\n required: [\n 'name'\n ]\n});\n\nexport const primaryHumanLiteral = overwritable.deepFreezeWhenDevMode({\n title: 'human schema with primary',\n version: 0,\n description: 'describes a human being with passportID as primary',\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n minLength: 4,\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string',\n maxLength: 500\n },\n age: {\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: ['passportId', 'firstName', 'lastName']\n} as const);\nconst primaryHumanTypedSchema = toTypedRxJsonSchema(primaryHumanLiteral);\nexport type PrimaryHumanDocType = ExtractDocumentTypeFromTypedRxJsonSchema;\nexport const primaryHuman: RxJsonSchema = primaryHumanLiteral;\n\nexport const humanNormalizeSchema1Literal = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n keyCompression: false,\n description: 'describes a human being',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n minLength: 4,\n maxLength: 100\n },\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: ['age', 'passportId']\n} as const);\nconst humanNormalizeSchema1Typed = toTypedRxJsonSchema(humanNormalizeSchema1Literal);\nexport type AgeHumanDocumentType = ExtractDocumentTypeFromTypedRxJsonSchema;\nexport const humanNormalizeSchema1: RxJsonSchema = humanNormalizeSchema1Literal;\n\nexport const humanNormalizeSchema2: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n minLength: 4,\n maxLength: 100\n },\n age: {\n minimum: 0,\n type: 'integer',\n description: 'age in years',\n maximum: 150,\n multipleOf: 1\n }\n },\n description: 'describes a human being',\n required: ['age', 'passportId']\n});\n\nexport const refHuman: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human related to other human',\n version: 0,\n keyCompression: false,\n primaryKey: 'name',\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n },\n bestFriend: {\n ref: 'human',\n type: 'string'\n }\n },\n required: [\n 'name'\n ]\n});\n\nexport const humanCompositePrimary: RxJsonSchema = {\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: {\n key: 'id',\n fields: [\n 'firstName',\n 'info.age'\n ],\n separator: '|'\n },\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string'\n },\n info: {\n type: 'object',\n properties: {\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150\n }\n },\n required: ['age']\n }\n },\n required: [\n 'id',\n 'firstName',\n 'lastName',\n 'info'\n ],\n indexes: ['firstName']\n};\n\nexport const humanCompositePrimarySchemaLiteral = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: {\n key: 'id',\n fields: [\n 'firstName',\n 'info.age'\n ],\n separator: '|'\n },\n encrypted: [],\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string'\n },\n info: {\n type: 'object',\n properties: {\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150\n }\n },\n required: ['age']\n },\n readonlyProps: {\n allOf: [],\n anyOf: [],\n oneOf: [],\n type: [],\n dependencies: {\n someDep: ['asd'],\n },\n items: [],\n required: [],\n enum: [],\n }\n },\n required: [\n 'id',\n 'firstName',\n 'lastName',\n 'info'\n ],\n indexes: ['firstName']\n} as const);\n\nconst humanCompositePrimarySchemaTyped = toTypedRxJsonSchema(humanCompositePrimarySchemaLiteral);\nexport type HumanCompositePrimaryDocType = ExtractDocumentTypeFromTypedRxJsonSchema;\n\nexport const refHumanNested: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human related to other human',\n version: 0,\n keyCompression: false,\n primaryKey: 'name',\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n },\n foo: {\n type: 'object',\n properties: {\n bestFriend: {\n ref: 'human',\n type: 'string'\n }\n }\n }\n },\n required: [\n 'name'\n ]\n});\n\n/**\n * an average schema used in performance-tests\n */\nexport function averageSchema(): RxJsonSchema {\n const ret: RxJsonSchema = {\n title: 'averageSchema_' + AsyncTestUtil.randomString(5), // randomisation used so hash differs\n version: 0,\n primaryKey: 'id',\n type: 'object',\n keyCompression: false,\n properties: {\n id: {\n description: 'id',\n type: 'string',\n maxLength: 12\n },\n var1: {\n description: 'var1',\n type: 'string',\n maxLength: 12\n },\n var2: {\n description: 'var2',\n type: 'number',\n minimum: 0,\n maximum: 50000,\n multipleOf: 1\n },\n deep: {\n type: 'object',\n properties: {\n deep1: {\n type: 'string',\n maxLength: 10\n },\n deep2: {\n type: 'string',\n maxLength: 10\n }\n }\n },\n list: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n deep1: {\n type: 'string'\n },\n deep2: {\n type: 'string'\n }\n }\n }\n }\n },\n required: [\n 'id',\n 'var1',\n 'var2'\n ],\n indexes: [\n 'var1',\n 'var2',\n 'deep.deep1',\n // one compound index\n [\n 'var2',\n 'var1'\n ]\n ],\n sharding: {\n shards: 6,\n mode: 'collection'\n }\n };\n return ret;\n}\n\nexport const point: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'point schema',\n version: 0,\n description: 'describes coordinates in 2d space',\n primaryKey: 'id',\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n x: {\n type: 'number'\n },\n y: {\n type: 'number'\n }\n },\n required: ['x', 'y']\n});\n\nexport const humanMinimal: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'integer'\n },\n oneOptional: {\n type: 'string'\n }\n },\n indexes: [],\n required: ['passportId', 'age']\n});\n\nexport const humanMinimalBroken: RxJsonSchema<{ passportId: string; broken: number; }> = {\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n broken: {\n type: 'integer'\n }\n },\n indexes: [],\n required: ['passportId', 'broken']\n} as unknown as RxJsonSchema;\n\n\n/**\n * used in the graphql-test\n * contains timestamp\n */\nexport const humanWithTimestamp: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n version: 0,\n type: 'object',\n primaryKey: 'id',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string',\n maxLength: 1000\n },\n age: {\n type: 'number'\n },\n updatedAt: {\n type: 'number',\n minimum: 0,\n maximum: 10000000000000000,\n multipleOf: 1\n\n },\n deletedAt: {\n type: 'number'\n }\n },\n indexes: ['updatedAt'],\n required: ['id', 'name', 'age', 'updatedAt']\n});\n\nexport const humanWithTimestampNested: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n version: 0,\n type: 'object',\n primaryKey: 'id',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string',\n maxLength: 1000\n },\n age: {\n type: 'number'\n },\n updatedAt: {\n type: 'number',\n minimum: 0,\n maximum: 10000000000000000,\n multipleOf: 1\n\n },\n deletedAt: {\n type: 'number'\n },\n address: {\n type: 'object',\n properties: {\n street: {\n type: 'string',\n },\n suite: {\n type: 'string',\n },\n city: {\n type: 'string',\n },\n zipcode: {\n type: 'string',\n },\n geo: {\n type: 'object',\n properties: {\n lat: {\n type: 'string',\n },\n lng: {\n type: 'string',\n },\n },\n },\n },\n },\n },\n indexes: ['updatedAt'],\n required: ['id', 'name', 'age', 'updatedAt']\n});\n\n\n/**\n * each field is an index,\n * use this to slow down inserts in tests\n */\nexport const humanWithTimestampAllIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n version: 0,\n type: 'object',\n primaryKey: 'id',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'number',\n minimum: 0,\n maximum: 1500,\n multipleOf: 1\n },\n updatedAt: {\n type: 'number',\n minimum: 0,\n maximum: 10000000000000000,\n multipleOf: 1\n },\n deletedAt: {\n type: 'number'\n }\n },\n indexes: ['name', 'age', 'updatedAt'],\n required: ['id', 'name', 'age', 'updatedAt']\n});\n\nexport const humanWithSimpleAndCompoundIndexes: RxJsonSchema<{\n id: string;\n name: string;\n age: number;\n createdAt: number;\n updatedAt: number;\n}> = overwritable.deepFreezeWhenDevMode({\n version: 0,\n primaryKey: 'id',\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'number',\n minimum: 0,\n maximum: 1500,\n multipleOf: 1\n },\n createdAt: {\n type: 'number',\n minimum: 0,\n maximum: 10000000000000000,\n multipleOf: 1\n },\n updatedAt: {\n type: 'number',\n minimum: 0,\n maximum: 10000000000000000,\n multipleOf: 1\n }\n },\n indexes: [\n ['name', 'id'],\n ['age', 'id'],\n ['createdAt', 'updatedAt', 'id']\n ],\n required: ['id', 'name', 'age', 'updatedAt']\n});\n\nexport const humanWithDeepNestedIndexes: RxJsonSchema<{ id: string; name: string; job: any; }> = overwritable.deepFreezeWhenDevMode({\n version: 0,\n primaryKey: 'id',\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string',\n maxLength: 100\n },\n job: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n },\n manager: {\n type: 'object',\n properties: {\n fullName: {\n type: 'string',\n maxLength: 100\n },\n previousJobs: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n }\n }\n }\n }\n }\n }\n }\n }\n },\n required: [\n 'id'\n ],\n indexes: [\n 'name',\n 'job.name',\n 'job.manager.fullName'\n ]\n});\n\nexport const humanIdAndAgeIndex: RxJsonSchema<{ id: string; name: string; age: number; }> = overwritable.deepFreezeWhenDevMode({\n version: 0,\n description: 'uses a compound index with id as lowest level',\n primaryKey: 'id',\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string'\n },\n age: {\n description: 'Age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: ['id', 'name', 'age'],\n indexes: [\n ['age', 'id']\n ]\n});\n\n\nexport function enableKeyCompression(\n schema: RxJsonSchema\n): RxJsonSchema {\n const ret = flatClone(schema);\n ret.keyCompression = true;\n return ret;\n}\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAyBA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AAGO,IAAMI,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAAGE,0BAAY,CAACC,qBAAqB,CAAC;EACjEC,KAAK,EAAE,cAAc;EACrBC,WAAW,EAAE,yBAAyB;EACtCC,OAAO,EAAE,CAAC;EACVC,cAAc,EAAE,KAAK;EACrBC,UAAU,EAAE,YAAY;EACxBC,IAAI,EAAE,QAAQ;EACdC,UAAU,EAAE;IACRC,UAAU,EAAE;MACRF,IAA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version.js b/dist/cjs/plugins/utils/utils-rxdb-version.js index 1bc4bccde07..5b9261e54cf 100644 --- a/dist/cjs/plugins/utils/utils-rxdb-version.js +++ b/dist/cjs/plugins/utils/utils-rxdb-version.js @@ -7,5 +7,5 @@ exports.RXDB_VERSION = void 0; /** * This file is replaced in the 'npm run build:version' script. */ -var RXDB_VERSION = exports.RXDB_VERSION = '16.0.0-beta.3'; +var RXDB_VERSION = exports.RXDB_VERSION = '16.0.0-beta.4'; //# sourceMappingURL=utils-rxdb-version.js.map \ No newline at end of file diff --git a/dist/cjs/plugins/utils/utils-rxdb-version.js.map b/dist/cjs/plugins/utils/utils-rxdb-version.js.map index 5cc25325bb4..684f5b5392e 100644 --- a/dist/cjs/plugins/utils/utils-rxdb-version.js.map +++ b/dist/cjs/plugins/utils/utils-rxdb-version.js.map @@ -1 +1 @@ -{"version":3,"file":"utils-rxdb-version.js","names":["RXDB_VERSION","exports"],"sources":["../../../../src/plugins/utils/utils-rxdb-version.ts"],"sourcesContent":["/**\n * This file is replaced in the 'npm run build:version' script.\n */\nexport const RXDB_VERSION = '16.0.0-beta.3';\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACO,IAAMA,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,eAAe","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"utils-rxdb-version.js","names":["RXDB_VERSION","exports"],"sources":["../../../../src/plugins/utils/utils-rxdb-version.ts"],"sourcesContent":["/**\n * This file is replaced in the 'npm run build:version' script.\n */\nexport const RXDB_VERSION = '16.0.0-beta.4';\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACO,IAAMA,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,eAAe","ignoreList":[]} \ No newline at end of file diff --git a/dist/cjs/rx-schema-helper.js.map b/dist/cjs/rx-schema-helper.js.map index 0d03e4b1376..de794e782de 100644 --- a/dist/cjs/rx-schema-helper.js.map +++ b/dist/cjs/rx-schema-helper.js.map @@ -1 +1 @@ -{"version":3,"file":"rx-schema-helper.js","names":["_rxError","require","_index","getPseudoSchemaForVersion","version","primaryKey","pseudoSchema","fillWithDefaultSettings","type","properties","maxLength","value","indexes","required","getSchemaByObjectPath","rxJsonSchema","path","usePath","replace","REGEX_ALL_DOTS","trimDots","ret","getProperty","fillPrimaryKey","primaryPath","jsonSchema","documentData","newPrimary","getComposedPrimaryKeyOfDocumentData","existingPrimary","newRxError","args","schema","getPrimaryFieldOfPrimaryKey","key","getLengthOfPrimaryKey","schemaPart","ensureNotFalsy","compositePrimary","fields","map","field","join","separator","normalizeRxJsonSchema","normalizedSchema","sortObject","getDefaultIndex","schemaObj","flatClone","additionalProperties","Object","prototype","hasOwnProperty","call","keyCompression","slice","encrypted","_rev","minLength","_attachments","_deleted","_meta","RX_META_SCHEMA","push","finalFields","getFinalFields","appendToArray","filter","includes","elem","pos","arr","indexOf","useIndexes","index","arIndex","isMaybeReadonlyArray","unshift","length","internalIndexes","idx","hasIndex","Set","indexStr","has","add","exports","lwt","minimum","RX_META_LWT_MINIMUM","maximum","multipleOf","keys","final","forEach","fillObjectWithDefaults","rxSchema","obj","defaultKeys","defaultValues","i","DEFAULT_CHECKPOINT_SCHEMA","id"],"sources":["../../src/rx-schema-helper.ts"],"sourcesContent":["import { newRxError } from './rx-error.ts';\nimport type {\n CompositePrimaryKey,\n DeepReadonly,\n JsonSchema,\n PrimaryKey,\n RxDocumentData,\n RxJsonSchema,\n RxStorageDefaultCheckpoint,\n StringKeys\n} from './types/index.d.ts';\nimport {\n appendToArray,\n ensureNotFalsy,\n flatClone,\n getProperty,\n isMaybeReadonlyArray,\n REGEX_ALL_DOTS,\n RX_META_LWT_MINIMUM,\n sortObject,\n trimDots\n} from './plugins/utils/index.ts';\nimport type { RxSchema } from './rx-schema.ts';\n\n/**\n * Helper function to create a valid RxJsonSchema\n * with a given version.\n */\nexport function getPseudoSchemaForVersion(\n version: number,\n primaryKey: StringKeys\n): RxJsonSchema> {\n const pseudoSchema: RxJsonSchema> = fillWithDefaultSettings({\n version,\n type: 'object',\n primaryKey: primaryKey as any,\n properties: {\n [primaryKey]: {\n type: 'string',\n maxLength: 100\n },\n value: {\n type: 'string'\n }\n } as any,\n indexes: [\n [primaryKey]\n ],\n required: [primaryKey]\n });\n return pseudoSchema;\n}\n\n/**\n * Returns the sub-schema for a given path\n */\nexport function getSchemaByObjectPath(\n rxJsonSchema: RxJsonSchema,\n path: keyof T | string\n): JsonSchema {\n let usePath: string = path as string;\n usePath = usePath.replace(REGEX_ALL_DOTS, '.properties.');\n usePath = 'properties.' + usePath;\n usePath = trimDots(usePath);\n\n const ret = getProperty(rxJsonSchema, usePath);\n return ret;\n}\n\nexport function fillPrimaryKey(\n primaryPath: keyof T,\n jsonSchema: RxJsonSchema,\n documentData: RxDocumentData\n): RxDocumentData {\n // optimization shortcut.\n if (typeof jsonSchema.primaryKey === 'string') {\n return documentData;\n }\n\n const newPrimary = getComposedPrimaryKeyOfDocumentData(\n jsonSchema,\n documentData\n );\n const existingPrimary: string | undefined = documentData[primaryPath] as any;\n if (\n existingPrimary &&\n existingPrimary !== newPrimary\n ) {\n throw newRxError(\n 'DOC19',\n {\n args: {\n documentData,\n existingPrimary,\n newPrimary,\n },\n schema: jsonSchema\n });\n }\n\n (documentData as any)[primaryPath] = newPrimary;\n return documentData;\n}\n\nexport function getPrimaryFieldOfPrimaryKey(\n primaryKey: PrimaryKey\n): StringKeys {\n if (typeof primaryKey === 'string') {\n return primaryKey as any;\n } else {\n return (primaryKey as CompositePrimaryKey).key;\n }\n}\n\nexport function getLengthOfPrimaryKey(\n schema: RxJsonSchema>\n): number {\n const primaryPath = getPrimaryFieldOfPrimaryKey(schema.primaryKey);\n const schemaPart = getSchemaByObjectPath(schema, primaryPath);\n return ensureNotFalsy(schemaPart.maxLength);\n}\n\n/**\n * Returns the composed primaryKey of a document by its data.\n */\nexport function getComposedPrimaryKeyOfDocumentData(\n jsonSchema: RxJsonSchema | RxJsonSchema>,\n documentData: Partial\n): string {\n if (typeof jsonSchema.primaryKey === 'string') {\n return (documentData as any)[jsonSchema.primaryKey];\n }\n\n const compositePrimary: CompositePrimaryKey = jsonSchema.primaryKey as any;\n return compositePrimary.fields.map(field => {\n const value = getProperty(documentData as any, field as string);\n if (typeof value === 'undefined') {\n throw newRxError('DOC18', { args: { field, documentData } });\n }\n return value;\n }).join(compositePrimary.separator);\n}\n\n\n/**\n * Normalize the RxJsonSchema.\n * We need this to ensure everything is set up properly\n * and we have the same hash on schemas that represent the same value but\n * have different json.\n *\n * - Orders the schemas attributes by alphabetical order\n * - Adds the primaryKey to all indexes that do not contain the primaryKey\n * - We need this for deterministic sort order on all queries, which is required for event-reduce to work.\n *\n * @return RxJsonSchema - ordered and filled\n */\nexport function normalizeRxJsonSchema(jsonSchema: RxJsonSchema): RxJsonSchema {\n const normalizedSchema: RxJsonSchema = sortObject(jsonSchema, true);\n return normalizedSchema;\n}\n\n/**\n * If the schema does not specify any index,\n * we add this index so we at least can run RxQuery()\n * and only select non-deleted fields.\n */\nexport function getDefaultIndex(primaryPath: string) {\n return ['_deleted', primaryPath];\n}\n\n/**\n * fills the schema-json with default-settings\n * @return cloned schemaObj\n */\nexport function fillWithDefaultSettings(\n schemaObj: RxJsonSchema\n): RxJsonSchema> {\n schemaObj = flatClone(schemaObj);\n const primaryPath: string = getPrimaryFieldOfPrimaryKey(schemaObj.primaryKey);\n schemaObj.properties = flatClone(schemaObj.properties);\n\n // additionalProperties is always false\n schemaObj.additionalProperties = false;\n\n // fill with key-compression-state ()\n if (!Object.prototype.hasOwnProperty.call(schemaObj, 'keyCompression')) {\n schemaObj.keyCompression = false;\n }\n\n // indexes must be array\n schemaObj.indexes = schemaObj.indexes ? schemaObj.indexes.slice(0) : [];\n\n // required must be array\n schemaObj.required = schemaObj.required ? schemaObj.required.slice(0) : [];\n\n // encrypted must be array\n schemaObj.encrypted = schemaObj.encrypted ? schemaObj.encrypted.slice(0) : [];\n\n // add _rev\n (schemaObj.properties as any)._rev = {\n type: 'string',\n minLength: 1\n };\n\n // add attachments\n (schemaObj.properties as any)._attachments = {\n type: 'object'\n };\n\n // add deleted flag\n (schemaObj.properties as any)._deleted = {\n type: 'boolean'\n };\n\n // add meta property\n (schemaObj.properties as any)._meta = RX_META_SCHEMA;\n\n /**\n * meta fields are all required\n */\n schemaObj.required = schemaObj.required ? schemaObj.required.slice(0) : [];\n (schemaObj.required as string[]).push('_deleted');\n (schemaObj.required as string[]).push('_rev');\n (schemaObj.required as string[]).push('_meta');\n (schemaObj.required as string[]).push('_attachments');\n\n // final fields are always required\n const finalFields = getFinalFields(schemaObj);\n appendToArray(schemaObj.required as any, finalFields);\n schemaObj.required = schemaObj.required\n .filter((field: string) => !field.includes('.'))\n .filter((elem: any, pos: any, arr: any) => arr.indexOf(elem) === pos); // unique;\n\n // version is 0 by default\n schemaObj.version = schemaObj.version || 0;\n\n const useIndexes: string[][] = schemaObj.indexes.map(index => {\n const arIndex = isMaybeReadonlyArray(index) ? index.slice(0) : [index];\n /**\n * Append primary key to indexes that do not contain the primaryKey.\n * All indexes must have the primaryKey to ensure a deterministic sort order.\n */\n if (!arIndex.includes(primaryPath)) {\n arIndex.push(primaryPath);\n }\n\n // add _deleted flag to all indexes so we can query only non-deleted fields\n // in RxDB itself\n if (arIndex[0] !== '_deleted') {\n arIndex.unshift('_deleted');\n }\n\n return arIndex;\n });\n\n if (useIndexes.length === 0) {\n useIndexes.push(getDefaultIndex(primaryPath));\n }\n\n // we need this index for the getChangedDocumentsSince() method\n useIndexes.push(['_meta.lwt', primaryPath]);\n\n // also add the internalIndexes\n if (schemaObj.internalIndexes) {\n schemaObj.internalIndexes.map(idx => {\n useIndexes.push(idx);\n });\n }\n\n // make indexes unique\n const hasIndex = new Set();\n useIndexes.filter(index => {\n const indexStr = index.join(',');\n if (hasIndex.has(indexStr)) {\n return false;\n } else {\n hasIndex.add(indexStr);\n return true;\n }\n });\n\n schemaObj.indexes = useIndexes;\n\n return schemaObj as any;\n}\n\n\nexport const RX_META_SCHEMA: JsonSchema = {\n type: 'object',\n properties: {\n /**\n * The last-write time.\n * Unix time in milliseconds.\n */\n lwt: {\n type: 'number',\n /**\n * We use 1 as minimum so that the value is never falsy.\n */\n minimum: RX_META_LWT_MINIMUM,\n maximum: 1000000000000000,\n multipleOf: 0.01\n }\n },\n /**\n * Additional properties are allowed\n * and can be used by plugins to set various flags.\n */\n additionalProperties: true as any,\n required: [\n 'lwt'\n ]\n};\n\n\n/**\n * returns the final-fields of the schema\n * @return field-names of the final-fields\n */\nexport function getFinalFields(\n jsonSchema: RxJsonSchema\n): string[] {\n const ret = Object.keys(jsonSchema.properties)\n .filter(key => (jsonSchema as any).properties[key].final);\n\n // primary is also final\n const primaryPath = getPrimaryFieldOfPrimaryKey(jsonSchema.primaryKey);\n ret.push(primaryPath);\n\n // fields of composite primary are final\n if (typeof jsonSchema.primaryKey !== 'string') {\n (jsonSchema.primaryKey as CompositePrimaryKey).fields\n .forEach(field => ret.push(field as string));\n }\n\n return ret;\n}\n\n/**\n * fills all unset fields with default-values if set\n * @hotPath\n */\nexport function fillObjectWithDefaults(rxSchema: RxSchema, obj: any): any {\n const defaultKeys = Object.keys(rxSchema.defaultValues);\n for (let i = 0; i < defaultKeys.length; ++i) {\n const key = defaultKeys[i];\n if (!Object.prototype.hasOwnProperty.call(obj, key) || typeof obj[key] === 'undefined') {\n obj[key] = rxSchema.defaultValues[key];\n }\n }\n return obj;\n}\n\nexport const DEFAULT_CHECKPOINT_SCHEMA: DeepReadonly> = {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n lwt: {\n type: 'number'\n }\n },\n required: [\n 'id',\n 'lwt'\n ],\n additionalProperties: false\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAWA,IAAAC,MAAA,GAAAD,OAAA;AAaA;AACA;AACA;AACA;AACO,SAASE,yBAAyBA,CACrCC,OAAe,EACfC,UAAyB,EACM;EAC/B,IAAMC,YAA6C,GAAGC,uBAAuB,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C,KAAK,WAAW,EAAE;MACpFgE,GAAG,CAAChE,GAAG,CAAC,GAAG+D,QAAQ,CAACG,aAAa,CAAClE,GAAG,CAAC;IAC1C;EACJ;EACA,OAAOgE,GAAG;AACd;AAEO,IAAMI,yBAA+E,GAAAf,OAAA,CAAAe,yBAAA,GAAG;EAC3F9F,IAAI,EAAE,QAAQ;EACdC,UAAU,EAAE;IACR8F,EAAE,EAAE;MACA/F,IAAI,EAAE;IACV,CAAC;IACDgF,GAAG,EAAE;MACDhF,IAAI,EAAE;IACV;EACJ,CAAC;EACDK,QAAQ,EAAE,CACN,IAAI,EACJ,KAAK,CACR;EACDqC,oBAAoB,EAAE;AAC1B,CAAU","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"rx-schema-helper.js","names":["_rxError","require","_index","getPseudoSchemaForVersion","version","primaryKey","pseudoSchema","fillWithDefaultSettings","type","properties","maxLength","value","indexes","required","getSchemaByObjectPath","rxJsonSchema","path","usePath","replace","REGEX_ALL_DOTS","trimDots","ret","getProperty","fillPrimaryKey","primaryPath","jsonSchema","documentData","newPrimary","getComposedPrimaryKeyOfDocumentData","existingPrimary","newRxError","args","schema","getPrimaryFieldOfPrimaryKey","key","getLengthOfPrimaryKey","schemaPart","ensureNotFalsy","compositePrimary","fields","map","field","join","separator","normalizeRxJsonSchema","normalizedSchema","sortObject","getDefaultIndex","schemaObj","flatClone","additionalProperties","Object","prototype","hasOwnProperty","call","keyCompression","slice","encrypted","_rev","minLength","_attachments","_deleted","_meta","RX_META_SCHEMA","push","finalFields","getFinalFields","appendToArray","filter","includes","elem","pos","arr","indexOf","useIndexes","index","arIndex","isMaybeReadonlyArray","unshift","length","internalIndexes","idx","hasIndex","Set","indexStr","has","add","exports","lwt","minimum","RX_META_LWT_MINIMUM","maximum","multipleOf","keys","final","forEach","fillObjectWithDefaults","rxSchema","obj","defaultKeys","defaultValues","i","DEFAULT_CHECKPOINT_SCHEMA","id"],"sources":["../../src/rx-schema-helper.ts"],"sourcesContent":["import { newRxError } from './rx-error.ts';\nimport type {\n CompositePrimaryKey,\n DeepReadonly,\n JsonSchema,\n PrimaryKey,\n RxDocumentData,\n RxJsonSchema,\n RxStorageDefaultCheckpoint,\n StringKeys\n} from './types/index.d.ts';\nimport {\n appendToArray,\n ensureNotFalsy,\n flatClone,\n getProperty,\n isMaybeReadonlyArray,\n REGEX_ALL_DOTS,\n RX_META_LWT_MINIMUM,\n sortObject,\n trimDots\n} from './plugins/utils/index.ts';\nimport type { RxSchema } from './rx-schema.ts';\n\n/**\n * Helper function to create a valid RxJsonSchema\n * with a given version.\n */\nexport function getPseudoSchemaForVersion(\n version: number,\n primaryKey: StringKeys\n): RxJsonSchema> {\n const pseudoSchema: RxJsonSchema> = fillWithDefaultSettings({\n version,\n type: 'object',\n primaryKey: primaryKey as any,\n properties: {\n [primaryKey]: {\n type: 'string',\n maxLength: 100\n },\n value: {\n type: 'string'\n }\n } as any,\n indexes: [\n [primaryKey]\n ],\n required: [primaryKey]\n });\n return pseudoSchema;\n}\n\n/**\n * Returns the sub-schema for a given path\n */\nexport function getSchemaByObjectPath(\n rxJsonSchema: RxJsonSchema,\n path: keyof T | string\n): JsonSchema {\n let usePath: string = path as string;\n usePath = usePath.replace(REGEX_ALL_DOTS, '.properties.');\n usePath = 'properties.' + usePath;\n usePath = trimDots(usePath);\n\n const ret = getProperty(rxJsonSchema, usePath);\n return ret;\n}\n\nexport function fillPrimaryKey(\n primaryPath: keyof T,\n jsonSchema: RxJsonSchema,\n documentData: RxDocumentData\n): RxDocumentData {\n // optimization shortcut.\n if (typeof jsonSchema.primaryKey === 'string') {\n return documentData;\n }\n\n const newPrimary = getComposedPrimaryKeyOfDocumentData(\n jsonSchema,\n documentData\n );\n const existingPrimary: string | undefined = documentData[primaryPath] as any;\n if (\n existingPrimary &&\n existingPrimary !== newPrimary\n ) {\n throw newRxError(\n 'DOC19',\n {\n args: {\n documentData,\n existingPrimary,\n newPrimary,\n },\n schema: jsonSchema\n });\n }\n\n (documentData as any)[primaryPath] = newPrimary;\n return documentData;\n}\n\nexport function getPrimaryFieldOfPrimaryKey(\n primaryKey: PrimaryKey\n): StringKeys {\n if (typeof primaryKey === 'string') {\n return primaryKey as any;\n } else {\n return (primaryKey as CompositePrimaryKey).key;\n }\n}\n\nexport function getLengthOfPrimaryKey(\n schema: RxJsonSchema>\n): number {\n const primaryPath = getPrimaryFieldOfPrimaryKey(schema.primaryKey);\n const schemaPart = getSchemaByObjectPath(schema, primaryPath);\n return ensureNotFalsy(schemaPart.maxLength);\n}\n\n/**\n * Returns the composed primaryKey of a document by its data.\n */\nexport function getComposedPrimaryKeyOfDocumentData(\n jsonSchema: RxJsonSchema | RxJsonSchema>,\n documentData: Partial\n): string {\n if (typeof jsonSchema.primaryKey === 'string') {\n return (documentData as any)[jsonSchema.primaryKey];\n }\n\n const compositePrimary: CompositePrimaryKey = jsonSchema.primaryKey as any;\n return compositePrimary.fields.map(field => {\n const value = getProperty(documentData as any, field as string);\n if (typeof value === 'undefined') {\n throw newRxError('DOC18', { args: { field, documentData } });\n }\n return value;\n }).join(compositePrimary.separator);\n}\n\n\n/**\n * Normalize the RxJsonSchema.\n * We need this to ensure everything is set up properly\n * and we have the same hash on schemas that represent the same value but\n * have different json.\n *\n * - Orders the schemas attributes by alphabetical order\n * - Adds the primaryKey to all indexes that do not contain the primaryKey\n * - We need this for deterministic sort order on all queries, which is required for event-reduce to work.\n *\n * @return RxJsonSchema - ordered and filled\n */\nexport function normalizeRxJsonSchema(jsonSchema: RxJsonSchema): RxJsonSchema {\n const normalizedSchema: RxJsonSchema = sortObject(jsonSchema, true);\n return normalizedSchema;\n}\n\n/**\n * If the schema does not specify any index,\n * we add this index so we at least can run RxQuery()\n * and only select non-deleted fields.\n */\nexport function getDefaultIndex(primaryPath: string) {\n return ['_deleted', primaryPath];\n}\n\n/**\n * fills the schema-json with default-settings\n * @return cloned schemaObj\n */\nexport function fillWithDefaultSettings(\n schemaObj: RxJsonSchema\n): RxJsonSchema> {\n schemaObj = flatClone(schemaObj);\n const primaryPath: string = getPrimaryFieldOfPrimaryKey(schemaObj.primaryKey);\n schemaObj.properties = flatClone(schemaObj.properties);\n\n // additionalProperties is always false\n schemaObj.additionalProperties = false;\n\n // fill with key-compression-state ()\n if (!Object.prototype.hasOwnProperty.call(schemaObj, 'keyCompression')) {\n schemaObj.keyCompression = false;\n }\n\n // indexes must be array\n schemaObj.indexes = schemaObj.indexes ? schemaObj.indexes.slice(0) : [];\n\n // required must be array\n schemaObj.required = schemaObj.required ? schemaObj.required.slice(0) : [];\n\n // encrypted must be array\n schemaObj.encrypted = schemaObj.encrypted ? schemaObj.encrypted.slice(0) : [];\n\n // add _rev\n (schemaObj.properties as any)._rev = {\n type: 'string',\n minLength: 1\n };\n\n // add attachments\n (schemaObj.properties as any)._attachments = {\n type: 'object'\n };\n\n // add deleted flag\n (schemaObj.properties as any)._deleted = {\n type: 'boolean'\n };\n\n // add meta property\n (schemaObj.properties as any)._meta = RX_META_SCHEMA;\n\n /**\n * meta fields are all required\n */\n schemaObj.required = schemaObj.required ? schemaObj.required.slice(0) : [];\n (schemaObj.required as string[]).push('_deleted');\n (schemaObj.required as string[]).push('_rev');\n (schemaObj.required as string[]).push('_meta');\n (schemaObj.required as string[]).push('_attachments');\n\n // final fields are always required\n const finalFields = getFinalFields(schemaObj);\n appendToArray(schemaObj.required as any, finalFields);\n schemaObj.required = schemaObj.required\n .filter((field: string) => !field.includes('.'))\n .filter((elem: any, pos: any, arr: any) => arr.indexOf(elem) === pos); // unique;\n\n\n // version is 0 by default\n schemaObj.version = schemaObj.version || 0;\n\n const useIndexes: string[][] = schemaObj.indexes.map(index => {\n const arIndex = isMaybeReadonlyArray(index) ? index.slice(0) : [index];\n /**\n * Append primary key to indexes that do not contain the primaryKey.\n * All indexes must have the primaryKey to ensure a deterministic sort order.\n */\n if (!arIndex.includes(primaryPath)) {\n arIndex.push(primaryPath);\n }\n\n // add _deleted flag to all indexes so we can query only non-deleted fields\n // in RxDB itself\n if (arIndex[0] !== '_deleted') {\n arIndex.unshift('_deleted');\n }\n\n return arIndex;\n });\n\n if (useIndexes.length === 0) {\n useIndexes.push(getDefaultIndex(primaryPath));\n }\n\n // we need this index for the getChangedDocumentsSince() method\n useIndexes.push(['_meta.lwt', primaryPath]);\n\n // also add the internalIndexes\n if (schemaObj.internalIndexes) {\n schemaObj.internalIndexes.map(idx => {\n useIndexes.push(idx);\n });\n }\n\n // make indexes unique\n const hasIndex = new Set();\n useIndexes.filter(index => {\n const indexStr = index.join(',');\n if (hasIndex.has(indexStr)) {\n return false;\n } else {\n hasIndex.add(indexStr);\n return true;\n }\n });\n\n schemaObj.indexes = useIndexes;\n\n return schemaObj as any;\n}\n\n\nexport const RX_META_SCHEMA: JsonSchema = {\n type: 'object',\n properties: {\n /**\n * The last-write time.\n * Unix time in milliseconds.\n */\n lwt: {\n type: 'number',\n /**\n * We use 1 as minimum so that the value is never falsy.\n */\n minimum: RX_META_LWT_MINIMUM,\n maximum: 1000000000000000,\n multipleOf: 0.01\n }\n },\n /**\n * Additional properties are allowed\n * and can be used by plugins to set various flags.\n */\n additionalProperties: true as any,\n required: [\n 'lwt'\n ]\n};\n\n\n/**\n * returns the final-fields of the schema\n * @return field-names of the final-fields\n */\nexport function getFinalFields(\n jsonSchema: RxJsonSchema\n): string[] {\n const ret = Object.keys(jsonSchema.properties)\n .filter(key => (jsonSchema as any).properties[key].final);\n\n // primary is also final\n const primaryPath = getPrimaryFieldOfPrimaryKey(jsonSchema.primaryKey);\n ret.push(primaryPath);\n\n // fields of composite primary are final\n if (typeof jsonSchema.primaryKey !== 'string') {\n (jsonSchema.primaryKey as CompositePrimaryKey).fields\n .forEach(field => ret.push(field as string));\n }\n\n return ret;\n}\n\n/**\n * fills all unset fields with default-values if set\n * @hotPath\n */\nexport function fillObjectWithDefaults(rxSchema: RxSchema, obj: any): any {\n const defaultKeys = Object.keys(rxSchema.defaultValues);\n for (let i = 0; i < defaultKeys.length; ++i) {\n const key = defaultKeys[i];\n if (!Object.prototype.hasOwnProperty.call(obj, key) || typeof obj[key] === 'undefined') {\n obj[key] = rxSchema.defaultValues[key];\n }\n }\n return obj;\n}\n\nexport const DEFAULT_CHECKPOINT_SCHEMA: DeepReadonly> = {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n lwt: {\n type: 'number'\n }\n },\n required: [\n 'id',\n 'lwt'\n ],\n additionalProperties: false\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAWA,IAAAC,MAAA,GAAAD,OAAA;AAaA;AACA;AACA;AACA;AACO,SAASE,yBAAyBA,CACrCC,OAAe,EACfC,UAAyB,EACM;EAC/B,IAAMC,YAA6C,GAAGC,uBAAuB,CAAC;IAC1EH,OAAO;IACPI,IAAI,EAAE,QAAQ;IACdH,UAAU,EAAEA,UAAiB;IAC7BI,UAAU,EAAE;MACR,CAACJ,UAAU,GAAG;QACVG,IAAI,EAAE,QAAQ;QACdE,SAAS,EAAE;MACf,CAAC;MACDC,KAAK,EAAE;QACHH,IAAI,EAAE;MACV;IACJ,CAAQ;IACRI,OAAO,EAAE,CACL,CAACP,UAAU,CAAC,CACf;IACDQ,QAAQ,EAAE,CAACR,UAAU;EACzB,CAAC,CAAC;EACF,OAAOC,YAAY;AACvB;;AAEA;AACA;AACA;AACO,SAASQ,qBAAqBA,CACjCC,YAA6B,EAC7BC,IAAsB,EACZ;EACV,IAAIC,OAAe,GAAGD,IAAc;EACpCC,OAAO,GAAGA,OAAO,CAACC,OAAO,CAACC,qBAAc,EAAE,cAAc,CAAC;EACzDF,OAAO,GAAG,aAAa,GAAGA,OAAO;EACjCA,OAAO,GAAG,IAAAG,eAAQ,EAACH,OAAO,CAAC;EAE3B,IAAMI,GAAG,GAAG,IAAAC,kBAAW,EAACP,YAAY,EAAEE,OAAO,CAAC;EAC9C,OAAOI,GAAG;AACd;AAEO,SAASE,cAAcA,CAC1BC,WAAoB,EACpBC,UAA2B,EAC3BC,YAA+B,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AG;AACd;;AAEA;AACA;AACA;AACA;AACO,SAAS2E,sBAAsBA,CAACC,QAAuB,EAAEC,GAAQ,EAAO;EAC3E,IAAMC,WAAW,GAAGhD,MAAM,CAAC0C,IAAI,CAACI,QAAQ,CAACG,aAAa,CAAC;EACvD,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,WAAW,CAACpB,MAAM,EAAE,EAAEsB,CAAC,EAAE;IACzC,IAAMnE,GAAG,GAAGiE,WAAW,CAACE,CAAC,CAAC;IAC1B,IAAI,CAAClD,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAAC4C,GAAG,EAAEhE,GAAG,CAAC,IAAI,OAAOgE,GAAG,CAAChE,GAAG,CAAC,KAAK,WAAW,EAAE;MACpFgE,GAAG,CAAChE,GAAG,CAAC,GAAG+D,QAAQ,CAACG,aAAa,CAAClE,GAAG,CAAC;IAC1C;EACJ;EACA,OAAOgE,GAAG;AACd;AAEO,IAAMI,yBAA+E,GAAAf,OAAA,CAAAe,yBAAA,GAAG;EAC3F9F,IAAI,EAAE,QAAQ;EACdC,UAAU,EAAE;IACR8F,EAAE,EAAE;MACA/F,IAAI,EAAE;IACV,CAAC;IACDgF,GAAG,EAAE;MACDhF,IAAI,EAAE;IACV;EACJ,CAAC;EACDK,QAAQ,EAAE,CACN,IAAI,EACJ,KAAK,CACR;EACDqC,oBAAoB,EAAE;AAC1B,CAAU","ignoreList":[]} \ No newline at end of file diff --git a/dist/esm/plugins/dev-mode/error-messages.js b/dist/esm/plugins/dev-mode/error-messages.js index 25d1d0f88bd..c83c62e54f2 100644 --- a/dist/esm/plugins/dev-mode/error-messages.js +++ b/dist/esm/plugins/dev-mode/error-messages.js @@ -223,6 +223,7 @@ export var ERROR_MESSAGES = { CRDT2: 'RxDocument.incrementalModify() cannot be used when CRDTs are activated.', CRDT3: 'To use CRDTs you MUST NOT set a conflictHandler because the default CRDT conflict handler must be used', // plugins/storage-dexie/ + DXE1: 'non-required index fields are not possible with the dexie.js RxStorage: https://github.com/pubkey/rxdb/pull/6643#issuecomment-2505310082', // removed in 15.0.0, added boolean index support to dexie storage - DXE1: 'The dexie.js RxStorage does not support boolean indexes, see https://rxdb.info/rx-storage-dexie.html#boolean-index', /** diff --git a/dist/esm/plugins/dev-mode/error-messages.js.map b/dist/esm/plugins/dev-mode/error-messages.js.map index f7bc9e8df6d..6d5026e7edc 100644 --- a/dist/esm/plugins/dev-mode/error-messages.js.map +++ b/dist/esm/plugins/dev-mode/error-messages.js.map @@ -1 +1 @@ -{"version":3,"file":"error-messages.js","names":["ERROR_MESSAGES","UT1","UT2","UT3","UT4","UT5","UT6","UT7","PL1","PL3","P2","QU1","QU4","QU5","QU6","QU9","QU10","QU11","QU12","QU13","QU14","QU15","QU16","QU17","QU18","MQ1","MQ2","MQ3","MQ4","MQ5","MQ6","MQ7","MQ8","DB1","DB2","DB3","DB4","DB5","DB6","DB8","DB9","DB11","DB12","DB13","DB14","COL1","COL2","COL3","COL4","COL5","COL6","COL7","COL8","COL9","COL10","COL11","COL12","COL13","COL14","COL15","COL16","COL17","COL18","COL20","COL21","CONFLICT","COL22","DOC1","DOC2","DOC3","DOC4","DOC5","DOC6","DOC7","DOC8","DOC9","DOC10","DOC11","DOC13","DOC14","DOC15","DOC16","DOC17","DOC18","DOC19","DOC20","DOC21","DOC22","DOC23","DOC24","DM1","DM2","DM3","DM4","DM5","AT1","EN1","EN2","EN3","EN4","JD1","JD2","JD3","LD1","LD2","LD3","LD4","LD5","LD6","LD7","LD8","RC1","RC2","RC4","RC5","RC6","RC7","RC_PULL","RC_STREAM","RC_PUSH","RC_PUSH_NO_AR","RC_WEBRTC_PEER","RC_COUCHDB_1","RC_COUCHDB_2","RC_OUTDATED","RC_UNAUTHORIZED","RC_FORBIDDEN","SC1","SC2","SC3","SC4","SC6","SC7","SC8","SC10","SC11","SC13","SC14","SC15","SC16","SC17","SC18","SC19","SC20","SC21","SC22","SC23","SC24","SC25","SC26","SC28","SC29","SC30","SC32","SC33","SC34","SC35","SC36","SC37","SC38","SC39","SC40","SC41","DVM1","VD1","VD2","S1","GQL1","GQL3","CRDT1","CRDT2","CRDT3","SNH"],"sources":["../../../../src/plugins/dev-mode/error-messages.ts"],"sourcesContent":["/**\n * this plugin adds the error-messages\n * without it, only error-codes will be shown\n * This is mainly because error-string are hard to compress and we need a smaller build\n */\n\n\nexport const ERROR_MESSAGES = {\n // util.js / config\n UT1: 'given name is no string or empty',\n UT2: `collection- and database-names must match the regex to be compatible with couchdb databases.\n See https://neighbourhood.ie/blog/2020/10/13/everything-you-need-to-know-about-couchdb-database-names/\n info: if your database-name specifies a folder, the name must contain the slash-char '/' or '\\\\'`,\n UT3: 'replication-direction must either be push or pull or both. But not none',\n UT4: 'given leveldown is no valid adapter',\n UT5: 'keyCompression is set to true in the schema but no key-compression handler is used in the storage',\n UT6: 'schema contains encrypted fields but no encryption handler is used in the storage',\n UT7: 'attachments.compression is enabled but no attachment-compression plugin is used',\n\n // plugins\n PL1: 'Given plugin is not RxDB plugin.',\n // removed in 14.0.0 - PouchDB RxStorage was removed - PL2: 'You tried importing a RxDB plugin to pouchdb. Use addRxPlugin() instead.',\n PL3: 'A plugin with the same name was already added but it was not the exact same JavaScript object',\n\n // pouch-db.js\n // removed in 12.0.0 - P1: 'PouchDB.getBatch: limit must be > 2',\n P2: 'bulkWrite() cannot be called with an empty array',\n // removed in 12.0.0 - P3: 'bulkAddRevisions cannot be called with an empty array',\n\n // rx-query\n QU1: 'RxQuery._execOverDatabase(): op not known',\n // removed in 9.0.0 - QU2: 'limit() must get a number',\n // removed in 9.0.0 - QU3: 'skip() must get a number',\n QU4: 'RxQuery.regex(): You cannot use .regex() on the primary field',\n QU5: 'RxQuery.sort(): does not work because key is not defined in the schema',\n QU6: 'RxQuery.limit(): cannot be called on .findOne()',\n // removed in 12.0.0 (should by ensured by the typings) - QU7: 'query must be an object',\n // removed in 12.0.0 (should by ensured by the typings) - QU8: 'query cannot be an array',\n QU9: 'throwIfMissing can only be used in findOne queries',\n QU10: 'result empty and throwIfMissing: true',\n QU11: 'RxQuery: no valid query params given',\n QU12: 'Given index is not in schema',\n QU13: 'A top level field of the query is not included in the schema',\n QU14: 'Running a count() query in slow mode is now allowed. Either run a count() query with a selector that fully matches an index ' +\n 'or set allowSlowCount=true when calling the createRxDatabase',\n QU15: 'For count queries it is not allowed to use skip or limit',\n QU16: '$regex queries must be defined by a string, not an RegExp instance. ' +\n 'This is because RegExp objects cannot be JSON stringified and also they are mutable which would be dangerous',\n QU17: 'Chained queries cannot be used on findByIds() RxQuery instances',\n QU18: 'Malformated query result data. This likely happens because you create a OPFS-storage RxDatabase inside of a worker but did not set the usesRxDatabaseInWorker setting. https://rxdb.info/rx-storage-opfs.html#setting-usesrxdatabaseinworker-when-a-rxdatabase-is-also-used-inside-of-the-worker ',\n\n // mquery.js\n MQ1: 'path must be a string or object',\n MQ2: 'Invalid argument',\n MQ3: 'Invalid sort() argument. Must be a string, object, or array',\n MQ4: 'Invalid argument. Expected instanceof mquery or plain object',\n MQ5: 'method must be used after where() when called with these arguments',\n MQ6: 'Can\\'t mix sort syntaxes. Use either array or object | .sort([[\\'field\\', 1], [\\'test\\', -1]]) | .sort({ field: 1, test: -1 })',\n MQ7: 'Invalid sort value',\n MQ8: 'Can\\'t mix sort syntaxes. Use either array or object',\n\n // rx-database\n DB1: 'RxDocument.prepare(): another instance on this adapter has a different password',\n DB2: 'RxDatabase.addCollections(): collection-names cannot start with underscore _',\n DB3: 'RxDatabase.addCollections(): collection already exists. use myDatabase[collectionName] to get it',\n DB4: 'RxDatabase.addCollections(): schema is missing',\n DB5: 'RxDatabase.addCollections(): collection-name not allowed',\n DB6: 'RxDatabase.addCollections(): another instance created this collection with a different schema. Read this https://rxdb.info/questions-answers.html?console=qa#cant-change-the-schema ',\n // removed in 13.0.0 (now part of the encryption plugin) DB7: 'RxDatabase.addCollections(): schema encrypted but no password given',\n DB8: 'createRxDatabase(): A RxDatabase with the same name and adapter already exists.\\n' +\n 'Make sure to use this combination only once or set ignoreDuplicate to true if you do this intentional-\\n' +\n 'This often happens in react projects with hot reload that reloads the code without reloading the process.',\n DB9: 'ignoreDuplicate is only allowed in dev-mode and must never be used in production',\n // removed in 14.0.0 - PouchDB RxStorage is removed - DB9: 'createRxDatabase(): Adapter not added. Use addPouchPlugin(require(\\'pouchdb-adapter-[adaptername]\\'));',\n // removed in 14.0.0 - PouchDB RxStorage is removed DB10: 'createRxDatabase(): To use leveldown-adapters, you have to add the leveldb-plugin. Use addPouchPlugin(require(\\'pouchdb-adapter-leveldb\\'));',\n DB11: 'createRxDatabase(): Invalid db-name, folder-paths must not have an ending slash',\n DB12: 'RxDatabase.addCollections(): could not write to internal store',\n DB13: 'createRxDatabase(): Invalid db-name or collection name, name contains the dollar sign',\n DB14: 'no custom reactivity factory added on database creation',\n\n // rx-collection\n COL1: 'RxDocument.insert() You cannot insert an existing document',\n COL2: 'RxCollection.insert() fieldName ._id can only be used as primaryKey',\n COL3: 'RxCollection.upsert() does not work without primary',\n COL4: 'RxCollection.incrementalUpsert() does not work without primary',\n COL5: 'RxCollection.find() if you want to search by _id, use .findOne(_id)',\n COL6: 'RxCollection.findOne() needs a queryObject or string. Notice that in RxDB, primary keys must be strings and cannot be numbers.',\n COL7: 'hook must be a function',\n COL8: 'hooks-when not known',\n COL9: 'RxCollection.addHook() hook-name not known',\n COL10: 'RxCollection .postCreate-hooks cannot be async',\n COL11: 'migrationStrategies must be an object',\n COL12: 'A migrationStrategy is missing or too much',\n COL13: 'migrationStrategy must be a function',\n COL14: 'given static method-name is not a string',\n COL15: 'static method-names cannot start with underscore _',\n COL16: 'given static method is not a function',\n COL17: 'RxCollection.ORM: statics-name not allowed',\n COL18: 'collection-method not allowed because fieldname is in the schema',\n // removed in 14.0.0, use CONFLICT instead - COL19: 'Document update conflict. When changing a document you must work on the previous revision',\n COL20: 'Storage write error',\n COL21: 'The RxCollection is closed or removed already, either from this JavaScript realm or from another, like a browser tab',\n CONFLICT: 'Document update conflict. When changing a document you must work on the previous revision',\n COL22: '.bulkInsert() and .bulkUpsert() cannot be run with multiple documents that have the same primary key',\n\n // rx-document.js\n DOC1: 'RxDocument.get$ cannot get observable of in-array fields because order cannot be guessed',\n DOC2: 'cannot observe primary path',\n DOC3: 'final fields cannot be observed',\n DOC4: 'RxDocument.get$ cannot observe a non-existed field',\n DOC5: 'RxDocument.populate() cannot populate a non-existed field',\n DOC6: 'RxDocument.populate() cannot populate because path has no ref',\n DOC7: 'RxDocument.populate() ref-collection not in database',\n DOC8: 'RxDocument.set(): primary-key cannot be modified',\n DOC9: 'final fields cannot be modified',\n DOC10: 'RxDocument.set(): cannot set childpath when rootPath not selected',\n DOC11: 'RxDocument.save(): can\\'t save deleted document',\n // removed in 10.0.0 DOC12: 'RxDocument.save(): error',\n DOC13: 'RxDocument.remove(): Document is already deleted',\n DOC14: 'RxDocument.close() does not exist',\n DOC15: 'query cannot be an array',\n DOC16: 'Since version 8.0.0 RxDocument.set() can only be called on temporary RxDocuments',\n DOC17: 'Since version 8.0.0 RxDocument.save() can only be called on non-temporary documents',\n DOC18: 'Document property for composed primary key is missing',\n DOC19: 'Value of primary key(s) cannot be changed',\n DOC20: 'PrimaryKey missing',\n DOC21: 'PrimaryKey must be equal to PrimaryKey.trim(). It cannot start or end with a whitespace',\n DOC22: 'PrimaryKey must not contain a linebreak',\n DOC23: 'PrimaryKey must not contain a double-quote [\"]',\n DOC24: 'Given document data could not be structured cloned. This happens if you pass non-plain-json data into it, like a Date() object or a Function. ' +\n 'In vue.js this happens if you use ref() on the document data which transforms it into a Proxy object.',\n\n // data-migrator.js\n DM1: 'migrate() Migration has already run',\n DM2: 'migration of document failed final document does not match final schema',\n DM3: 'migration already running',\n DM4: 'Migration errored',\n DM5: 'Cannot open database state with newer RxDB version. You have to migrate your database state first. See https://rxdb.info/migration-storage.html?console=storage ',\n\n // plugins/attachments.js\n AT1: 'to use attachments, please define this in your schema',\n\n // plugins/encryption-crypto-js.js\n EN1: 'password is not valid',\n EN2: 'validatePassword: min-length of password not complied',\n EN3: 'Schema contains encrypted properties but no password is given',\n EN4: 'Password not valid',\n\n // plugins/json-dump.js\n JD1: 'You must create the collections before you can import their data',\n JD2: 'RxCollection.importJSON(): the imported json relies on a different schema',\n JD3: 'RxCollection.importJSON(): json.passwordHash does not match the own',\n\n // plugins/leader-election.js\n\n // plugins/local-documents.js\n LD1: 'RxDocument.allAttachments$ can\\'t use attachments on local documents',\n LD2: 'RxDocument.get(): objPath must be a string',\n LD3: 'RxDocument.get$ cannot get observable of in-array fields because order cannot be guessed',\n LD4: 'cannot observe primary path',\n LD5: 'RxDocument.set() id cannot be modified',\n LD6: 'LocalDocument: Function is not usable on local documents',\n LD7: 'Local document already exists',\n LD8: 'localDocuments not activated. Set localDocuments=true on creation, when you want to store local documents on the RxDatabase or RxCollection.',\n\n // plugins/replication.js\n RC1: 'Replication: already added',\n RC2: 'replicateCouchDB() query must be from the same RxCollection',\n // removed in 14.0.0 - PouchDB RxStorage is removed RC3: 'RxCollection.syncCouchDB() Do not use a collection\\'s pouchdb as remote, use the collection instead',\n RC4: 'RxCouchDBReplicationState.awaitInitialReplication() cannot await initial replication when live: true',\n RC5: 'RxCouchDBReplicationState.awaitInitialReplication() cannot await initial replication if multiInstance because the replication might run on another instance',\n RC6: 'syncFirestore() serverTimestampField MUST NOT be part of the collections schema and MUST NOT be nested.',\n RC7: 'SimplePeer requires to have process.nextTick() polyfilled, see https://rxdb.info/replication-webrtc.html?console=webrtc ',\n RC_PULL: 'RxReplication pull handler threw an error - see .errors for more details',\n RC_STREAM: 'RxReplication pull stream$ threw an error - see .errors for more details',\n RC_PUSH: 'RxReplication push handler threw an error - see .errors for more details',\n RC_PUSH_NO_AR: 'RxReplication push handler did not return an array with the conflicts',\n RC_WEBRTC_PEER: 'RxReplication WebRTC Peer has error',\n RC_COUCHDB_1: 'replicateCouchDB() url must end with a slash like \\'https://example.com/mydatabase/\\'',\n RC_COUCHDB_2: 'replicateCouchDB() did not get valid result with rows.',\n RC_OUTDATED: 'Outdated client, update required. Replication was canceled',\n RC_UNAUTHORIZED: 'Unauthorized client, update the replicationState.headers to set correct auth data',\n RC_FORBIDDEN: 'Client behaves wrong so the replication was canceled. Mostly happens if the client tries to write data that it is not allowed to',\n\n // plugins/dev-mode/check-schema.js\n SC1: 'fieldnames do not match the regex',\n SC2: 'SchemaCheck: name \\'item\\' reserved for array-fields',\n SC3: 'SchemaCheck: fieldname has a ref-array but items-type is not string',\n SC4: 'SchemaCheck: fieldname has a ref but is not type string, [string,null] or array',\n SC6: 'SchemaCheck: primary can only be defined at top-level',\n SC7: 'SchemaCheck: default-values can only be defined at top-level',\n SC8: 'SchemaCheck: first level-fields cannot start with underscore _',\n SC10: 'SchemaCheck: schema defines ._rev, this will be done automatically',\n SC11: 'SchemaCheck: schema needs a number >=0 as version',\n // removed in 10.0.0 - SC12: 'SchemaCheck: primary can only be defined once',\n SC13: 'SchemaCheck: primary is always index, do not declare it as index',\n SC14: 'SchemaCheck: primary is always unique, do not declare it as index',\n SC15: 'SchemaCheck: primary cannot be encrypted',\n SC16: 'SchemaCheck: primary must have type: string',\n SC17: 'SchemaCheck: top-level fieldname is not allowed',\n SC18: 'SchemaCheck: indexes must be an array',\n SC19: 'SchemaCheck: indexes must contain strings or arrays of strings',\n SC20: 'SchemaCheck: indexes.array must contain strings',\n SC21: 'SchemaCheck: given index is not defined in schema',\n SC22: 'SchemaCheck: given indexKey is not type:string',\n SC23: 'SchemaCheck: fieldname is not allowed',\n SC24: 'SchemaCheck: required fields must be set via array. See https://spacetelescope.github.io/understanding-json-schema/reference/object.html#required',\n SC25: 'SchemaCheck: compoundIndexes needs to be specified in the indexes field',\n SC26: 'SchemaCheck: indexes needs to be specified at collection schema level',\n // removed in 16.0.0 - SC27: 'SchemaCheck: encrypted fields need to be specified at collection schema level',\n SC28: 'SchemaCheck: encrypted fields is not defined in the schema',\n SC29: 'SchemaCheck: missing object key \\'properties\\'',\n SC30: 'SchemaCheck: primaryKey is required',\n SC32: 'SchemaCheck: primary field must have the type string/number/integer',\n SC33: 'SchemaCheck: used primary key is not a property in the schema',\n SC34: 'Fields of type string that are used in an index, must have set the maxLength attribute in the schema',\n SC35: 'Fields of type number/integer that are used in an index, must have set the multipleOf attribute in the schema',\n SC36: 'A field of this type cannot be used as index',\n SC37: 'Fields of type number that are used in an index, must have set the minimum and maximum attribute in the schema',\n SC38: 'Fields of type boolean that are used in an index, must be required in the schema',\n SC39: 'The primary key must have the maxLength attribute set',\n SC40: '$ref fields in the schema are not allowed. RxDB cannot resolve related schemas because it would have a negative performance impact.' +\n 'It would have to run http requests on runtime. $ref fields should be resolved during build time.',\n SC41: 'minimum, maximum and maxLength values for indexes must be real numbers, not Infinity or -Infinity',\n\n // plugins/dev-mode\n // removed in 13.9.0, use PL3 instead - DEV1: 'dev-mode added multiple times',\n DVM1: 'When dev-mode is enabled, your storage must use one of the schema validators at the top level. This is because most problems people have with RxDB is because they store data that is not valid to the schema which causes strange bugs and problems.',\n\n // plugins/validate.js\n VD1: 'Sub-schema not found, does the schemaPath exists in your schema?',\n VD2: 'object does not match schema',\n\n // plugins/in-memory.js\n // removed in 14.0.0 - PouchDB RxStorage is removed IM1: 'InMemory: Memory-Adapter must be added. Use addPouchPlugin(require(\\'pouchdb-adapter-memory\\'));',\n // removed in 14.0.0 - PouchDB RxStorage is removed IM2: 'inMemoryCollection.sync(): Do not replicate with the in-memory instance. Replicate with the parent instead',\n\n // plugins/server.js\n S1: 'You cannot create collections after calling RxDatabase.server()',\n\n // plugins/replication-graphql.js\n GQL1: 'GraphQL replication: cannot find sub schema by key',\n // removed in 13.0.0, use RC_PULL instead - GQL2: 'GraphQL replication: unknown errors occurred in replication pull - see innerErrors for more details',\n GQL3: 'GraphQL replication: pull returns more documents then batchSize',\n // removed in 13.0.0, use RC_PUSH instead - GQL4: 'GraphQL replication: unknown errors occurred in replication push - see innerErrors for more details',\n\n // plugins/crdt/\n CRDT1: 'CRDT operations cannot be used because the crdt options are not set in the schema.',\n CRDT2: 'RxDocument.incrementalModify() cannot be used when CRDTs are activated.',\n CRDT3: 'To use CRDTs you MUST NOT set a conflictHandler because the default CRDT conflict handler must be used',\n\n // plugins/storage-dexie/\n // removed in 15.0.0, added boolean index support to dexie storage - DXE1: 'The dexie.js RxStorage does not support boolean indexes, see https://rxdb.info/rx-storage-dexie.html#boolean-index',\n\n /**\n * Should never be thrown, use this for\n * null checks etc. so you do not have to increase the\n * build size with error message strings.\n */\n SNH: 'This should never happen'\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAGA,OAAO,IAAMA,cAAc,GAAG;EAC1B;EACAC,GAAG,EAAE,kCAAkC;EACvCC,GAAG,kTAE8F;EACjGC,GAAG,EAAE,yEAAyE;EAC9EC,GAAG,EAAE,qCAAqC;EAC1CC,GAAG,EAAE,mGAAmG;EACxGC,GAAG,EAAE,mFAAmF;EACxFC,GAAG,EAAE,iFAAiF;EAEtF;EACAC,GAAG,EAAE,kCAAkC;EACvC;EACAC,GAAG,EAAE,+FAA+F;EAEpG;EACA;EACAC,EAAE,EAAE,kDAAkD;EACtD;;EAEA;EACAC,GAAG,EAAE,2CAA2C;EAChD;EACA;EACAC,GAAG,EAAE,+DAA+D;EACpEC,GAAG,EAAE,wEAAwE;EAC7EC,GAAG,EAAE,iDAAiD;EACtD;EACA;EACAC,GAAG,EAAE,oDAAoD;EACzDC,IAAI,EAAE,uCAAuC;EAC7CC,IAAI,EAAE,sCAAsC;EAC5CC,IAAI,EAAE,8BAA8B;EACpCC,IAAI,EAAE,8DAA8D;EACpEC,IAAI,EAAE,8HAA8H,GAChI,8DAA8D;EAClEC,IAAI,EAAE,0DAA0D;EAChEC,IAAI,EAAE,sEAAsE,GACxE,8GAA8G;EAClHC,IAAI,EAAE,iEAAiE;EACvEC,IAAI,EAAE,mSAAmS;EAEzS;EACAC,GAAG,EAAE,iCAAiC;EACtCC,GAAG,EAAE,kBAAkB;EACvBC,GAAG,EAAE,6DAA6D;EAClEC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C,IAAI,EAAE,+DAA+D;EACrEC,IAAI,EAAE,sGAAsG;EAC5GC,IAAI,EAAE,+GAA+G;EACrHC,IAAI,EAAE,8CAA8C;EACpDC,IAAI,EAAE,gHAAgH;EACtHC,IAAI,EAAE,kFAAkF;EACxFC,IAAI,EAAE,uDAAuD;EAC7DC,IAAI,EAAE,qIAAqI,GACvI,kGAAkG;EACtGC,IAAI,EAAE,mGAAmG;EAEzG;EACA;EACAC,IAAI,EAAE,uPAAuP;EAE7P;EACAC,GAAG,EAAE,kEAAkE;EACvEC,GAAG,EAAE,8BAA8B;EAEnC;EACA;EACA;;EAEA;EACAC,EAAE,EAAE,iEAAiE;EAErE;EACAC,IAAI,EAAE,oDAAoD;EAC1D;EACAC,IAAI,EAAE,iEAAiE;EACvE;;EAEA;EACAC,KAAK,EAAE,oFAAoF;EAC3FC,KAAK,EAAE,yEAAyE;EAChFC,KAAK,EAAE,wGAAwG;EAE/G;EACA;;EAEA;AACJ;AACA;AACA;AACA;EACIC,GAAG,EAAE;AACT,CAAC","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"error-messages.js","names":["ERROR_MESSAGES","UT1","UT2","UT3","UT4","UT5","UT6","UT7","PL1","PL3","P2","QU1","QU4","QU5","QU6","QU9","QU10","QU11","QU12","QU13","QU14","QU15","QU16","QU17","QU18","MQ1","MQ2","MQ3","MQ4","MQ5","MQ6","MQ7","MQ8","DB1","DB2","DB3","DB4","DB5","DB6","DB8","DB9","DB11","DB12","DB13","DB14","COL1","COL2","COL3","COL4","COL5","COL6","COL7","COL8","COL9","COL10","COL11","COL12","COL13","COL14","COL15","COL16","COL17","COL18","COL20","COL21","CONFLICT","COL22","DOC1","DOC2","DOC3","DOC4","DOC5","DOC6","DOC7","DOC8","DOC9","DOC10","DOC11","DOC13","DOC14","DOC15","DOC16","DOC17","DOC18","DOC19","DOC20","DOC21","DOC22","DOC23","DOC24","DM1","DM2","DM3","DM4","DM5","AT1","EN1","EN2","EN3","EN4","JD1","JD2","JD3","LD1","LD2","LD3","LD4","LD5","LD6","LD7","LD8","RC1","RC2","RC4","RC5","RC6","RC7","RC_PULL","RC_STREAM","RC_PUSH","RC_PUSH_NO_AR","RC_WEBRTC_PEER","RC_COUCHDB_1","RC_COUCHDB_2","RC_OUTDATED","RC_UNAUTHORIZED","RC_FORBIDDEN","SC1","SC2","SC3","SC4","SC6","SC7","SC8","SC10","SC11","SC13","SC14","SC15","SC16","SC17","SC18","SC19","SC20","SC21","SC22","SC23","SC24","SC25","SC26","SC28","SC29","SC30","SC32","SC33","SC34","SC35","SC36","SC37","SC38","SC39","SC40","SC41","DVM1","VD1","VD2","S1","GQL1","GQL3","CRDT1","CRDT2","CRDT3","DXE1","SNH"],"sources":["../../../../src/plugins/dev-mode/error-messages.ts"],"sourcesContent":["/**\n * this plugin adds the error-messages\n * without it, only error-codes will be shown\n * This is mainly because error-string are hard to compress and we need a smaller build\n */\n\n\nexport const ERROR_MESSAGES = {\n // util.js / config\n UT1: 'given name is no string or empty',\n UT2: `collection- and database-names must match the regex to be compatible with couchdb databases.\n See https://neighbourhood.ie/blog/2020/10/13/everything-you-need-to-know-about-couchdb-database-names/\n info: if your database-name specifies a folder, the name must contain the slash-char '/' or '\\\\'`,\n UT3: 'replication-direction must either be push or pull or both. But not none',\n UT4: 'given leveldown is no valid adapter',\n UT5: 'keyCompression is set to true in the schema but no key-compression handler is used in the storage',\n UT6: 'schema contains encrypted fields but no encryption handler is used in the storage',\n UT7: 'attachments.compression is enabled but no attachment-compression plugin is used',\n\n // plugins\n PL1: 'Given plugin is not RxDB plugin.',\n // removed in 14.0.0 - PouchDB RxStorage was removed - PL2: 'You tried importing a RxDB plugin to pouchdb. Use addRxPlugin() instead.',\n PL3: 'A plugin with the same name was already added but it was not the exact same JavaScript object',\n\n // pouch-db.js\n // removed in 12.0.0 - P1: 'PouchDB.getBatch: limit must be > 2',\n P2: 'bulkWrite() cannot be called with an empty array',\n // removed in 12.0.0 - P3: 'bulkAddRevisions cannot be called with an empty array',\n\n // rx-query\n QU1: 'RxQuery._execOverDatabase(): op not known',\n // removed in 9.0.0 - QU2: 'limit() must get a number',\n // removed in 9.0.0 - QU3: 'skip() must get a number',\n QU4: 'RxQuery.regex(): You cannot use .regex() on the primary field',\n QU5: 'RxQuery.sort(): does not work because key is not defined in the schema',\n QU6: 'RxQuery.limit(): cannot be called on .findOne()',\n // removed in 12.0.0 (should by ensured by the typings) - QU7: 'query must be an object',\n // removed in 12.0.0 (should by ensured by the typings) - QU8: 'query cannot be an array',\n QU9: 'throwIfMissing can only be used in findOne queries',\n QU10: 'result empty and throwIfMissing: true',\n QU11: 'RxQuery: no valid query params given',\n QU12: 'Given index is not in schema',\n QU13: 'A top level field of the query is not included in the schema',\n QU14: 'Running a count() query in slow mode is now allowed. Either run a count() query with a selector that fully matches an index ' +\n 'or set allowSlowCount=true when calling the createRxDatabase',\n QU15: 'For count queries it is not allowed to use skip or limit',\n QU16: '$regex queries must be defined by a string, not an RegExp instance. ' +\n 'This is because RegExp objects cannot be JSON stringified and also they are mutable which would be dangerous',\n QU17: 'Chained queries cannot be used on findByIds() RxQuery instances',\n QU18: 'Malformated query result data. This likely happens because you create a OPFS-storage RxDatabase inside of a worker but did not set the usesRxDatabaseInWorker setting. https://rxdb.info/rx-storage-opfs.html#setting-usesrxdatabaseinworker-when-a-rxdatabase-is-also-used-inside-of-the-worker ',\n\n // mquery.js\n MQ1: 'path must be a string or object',\n MQ2: 'Invalid argument',\n MQ3: 'Invalid sort() argument. Must be a string, object, or array',\n MQ4: 'Invalid argument. Expected instanceof mquery or plain object',\n MQ5: 'method must be used after where() when called with these arguments',\n MQ6: 'Can\\'t mix sort syntaxes. Use either array or object | .sort([[\\'field\\', 1], [\\'test\\', -1]]) | .sort({ field: 1, test: -1 })',\n MQ7: 'Invalid sort value',\n MQ8: 'Can\\'t mix sort syntaxes. Use either array or object',\n\n // rx-database\n DB1: 'RxDocument.prepare(): another instance on this adapter has a different password',\n DB2: 'RxDatabase.addCollections(): collection-names cannot start with underscore _',\n DB3: 'RxDatabase.addCollections(): collection already exists. use myDatabase[collectionName] to get it',\n DB4: 'RxDatabase.addCollections(): schema is missing',\n DB5: 'RxDatabase.addCollections(): collection-name not allowed',\n DB6: 'RxDatabase.addCollections(): another instance created this collection with a different schema. Read this https://rxdb.info/questions-answers.html?console=qa#cant-change-the-schema ',\n // removed in 13.0.0 (now part of the encryption plugin) DB7: 'RxDatabase.addCollections(): schema encrypted but no password given',\n DB8: 'createRxDatabase(): A RxDatabase with the same name and adapter already exists.\\n' +\n 'Make sure to use this combination only once or set ignoreDuplicate to true if you do this intentional-\\n' +\n 'This often happens in react projects with hot reload that reloads the code without reloading the process.',\n DB9: 'ignoreDuplicate is only allowed in dev-mode and must never be used in production',\n // removed in 14.0.0 - PouchDB RxStorage is removed - DB9: 'createRxDatabase(): Adapter not added. Use addPouchPlugin(require(\\'pouchdb-adapter-[adaptername]\\'));',\n // removed in 14.0.0 - PouchDB RxStorage is removed DB10: 'createRxDatabase(): To use leveldown-adapters, you have to add the leveldb-plugin. Use addPouchPlugin(require(\\'pouchdb-adapter-leveldb\\'));',\n DB11: 'createRxDatabase(): Invalid db-name, folder-paths must not have an ending slash',\n DB12: 'RxDatabase.addCollections(): could not write to internal store',\n DB13: 'createRxDatabase(): Invalid db-name or collection name, name contains the dollar sign',\n DB14: 'no custom reactivity factory added on database creation',\n\n // rx-collection\n COL1: 'RxDocument.insert() You cannot insert an existing document',\n COL2: 'RxCollection.insert() fieldName ._id can only be used as primaryKey',\n COL3: 'RxCollection.upsert() does not work without primary',\n COL4: 'RxCollection.incrementalUpsert() does not work without primary',\n COL5: 'RxCollection.find() if you want to search by _id, use .findOne(_id)',\n COL6: 'RxCollection.findOne() needs a queryObject or string. Notice that in RxDB, primary keys must be strings and cannot be numbers.',\n COL7: 'hook must be a function',\n COL8: 'hooks-when not known',\n COL9: 'RxCollection.addHook() hook-name not known',\n COL10: 'RxCollection .postCreate-hooks cannot be async',\n COL11: 'migrationStrategies must be an object',\n COL12: 'A migrationStrategy is missing or too much',\n COL13: 'migrationStrategy must be a function',\n COL14: 'given static method-name is not a string',\n COL15: 'static method-names cannot start with underscore _',\n COL16: 'given static method is not a function',\n COL17: 'RxCollection.ORM: statics-name not allowed',\n COL18: 'collection-method not allowed because fieldname is in the schema',\n // removed in 14.0.0, use CONFLICT instead - COL19: 'Document update conflict. When changing a document you must work on the previous revision',\n COL20: 'Storage write error',\n COL21: 'The RxCollection is closed or removed already, either from this JavaScript realm or from another, like a browser tab',\n CONFLICT: 'Document update conflict. When changing a document you must work on the previous revision',\n COL22: '.bulkInsert() and .bulkUpsert() cannot be run with multiple documents that have the same primary key',\n\n // rx-document.js\n DOC1: 'RxDocument.get$ cannot get observable of in-array fields because order cannot be guessed',\n DOC2: 'cannot observe primary path',\n DOC3: 'final fields cannot be observed',\n DOC4: 'RxDocument.get$ cannot observe a non-existed field',\n DOC5: 'RxDocument.populate() cannot populate a non-existed field',\n DOC6: 'RxDocument.populate() cannot populate because path has no ref',\n DOC7: 'RxDocument.populate() ref-collection not in database',\n DOC8: 'RxDocument.set(): primary-key cannot be modified',\n DOC9: 'final fields cannot be modified',\n DOC10: 'RxDocument.set(): cannot set childpath when rootPath not selected',\n DOC11: 'RxDocument.save(): can\\'t save deleted document',\n // removed in 10.0.0 DOC12: 'RxDocument.save(): error',\n DOC13: 'RxDocument.remove(): Document is already deleted',\n DOC14: 'RxDocument.close() does not exist',\n DOC15: 'query cannot be an array',\n DOC16: 'Since version 8.0.0 RxDocument.set() can only be called on temporary RxDocuments',\n DOC17: 'Since version 8.0.0 RxDocument.save() can only be called on non-temporary documents',\n DOC18: 'Document property for composed primary key is missing',\n DOC19: 'Value of primary key(s) cannot be changed',\n DOC20: 'PrimaryKey missing',\n DOC21: 'PrimaryKey must be equal to PrimaryKey.trim(). It cannot start or end with a whitespace',\n DOC22: 'PrimaryKey must not contain a linebreak',\n DOC23: 'PrimaryKey must not contain a double-quote [\"]',\n DOC24: 'Given document data could not be structured cloned. This happens if you pass non-plain-json data into it, like a Date() object or a Function. ' +\n 'In vue.js this happens if you use ref() on the document data which transforms it into a Proxy object.',\n\n // data-migrator.js\n DM1: 'migrate() Migration has already run',\n DM2: 'migration of document failed final document does not match final schema',\n DM3: 'migration already running',\n DM4: 'Migration errored',\n DM5: 'Cannot open database state with newer RxDB version. You have to migrate your database state first. See https://rxdb.info/migration-storage.html?console=storage ',\n\n // plugins/attachments.js\n AT1: 'to use attachments, please define this in your schema',\n\n // plugins/encryption-crypto-js.js\n EN1: 'password is not valid',\n EN2: 'validatePassword: min-length of password not complied',\n EN3: 'Schema contains encrypted properties but no password is given',\n EN4: 'Password not valid',\n\n // plugins/json-dump.js\n JD1: 'You must create the collections before you can import their data',\n JD2: 'RxCollection.importJSON(): the imported json relies on a different schema',\n JD3: 'RxCollection.importJSON(): json.passwordHash does not match the own',\n\n // plugins/leader-election.js\n\n // plugins/local-documents.js\n LD1: 'RxDocument.allAttachments$ can\\'t use attachments on local documents',\n LD2: 'RxDocument.get(): objPath must be a string',\n LD3: 'RxDocument.get$ cannot get observable of in-array fields because order cannot be guessed',\n LD4: 'cannot observe primary path',\n LD5: 'RxDocument.set() id cannot be modified',\n LD6: 'LocalDocument: Function is not usable on local documents',\n LD7: 'Local document already exists',\n LD8: 'localDocuments not activated. Set localDocuments=true on creation, when you want to store local documents on the RxDatabase or RxCollection.',\n\n // plugins/replication.js\n RC1: 'Replication: already added',\n RC2: 'replicateCouchDB() query must be from the same RxCollection',\n // removed in 14.0.0 - PouchDB RxStorage is removed RC3: 'RxCollection.syncCouchDB() Do not use a collection\\'s pouchdb as remote, use the collection instead',\n RC4: 'RxCouchDBReplicationState.awaitInitialReplication() cannot await initial replication when live: true',\n RC5: 'RxCouchDBReplicationState.awaitInitialReplication() cannot await initial replication if multiInstance because the replication might run on another instance',\n RC6: 'syncFirestore() serverTimestampField MUST NOT be part of the collections schema and MUST NOT be nested.',\n RC7: 'SimplePeer requires to have process.nextTick() polyfilled, see https://rxdb.info/replication-webrtc.html?console=webrtc ',\n RC_PULL: 'RxReplication pull handler threw an error - see .errors for more details',\n RC_STREAM: 'RxReplication pull stream$ threw an error - see .errors for more details',\n RC_PUSH: 'RxReplication push handler threw an error - see .errors for more details',\n RC_PUSH_NO_AR: 'RxReplication push handler did not return an array with the conflicts',\n RC_WEBRTC_PEER: 'RxReplication WebRTC Peer has error',\n RC_COUCHDB_1: 'replicateCouchDB() url must end with a slash like \\'https://example.com/mydatabase/\\'',\n RC_COUCHDB_2: 'replicateCouchDB() did not get valid result with rows.',\n RC_OUTDATED: 'Outdated client, update required. Replication was canceled',\n RC_UNAUTHORIZED: 'Unauthorized client, update the replicationState.headers to set correct auth data',\n RC_FORBIDDEN: 'Client behaves wrong so the replication was canceled. Mostly happens if the client tries to write data that it is not allowed to',\n\n // plugins/dev-mode/check-schema.js\n SC1: 'fieldnames do not match the regex',\n SC2: 'SchemaCheck: name \\'item\\' reserved for array-fields',\n SC3: 'SchemaCheck: fieldname has a ref-array but items-type is not string',\n SC4: 'SchemaCheck: fieldname has a ref but is not type string, [string,null] or array',\n SC6: 'SchemaCheck: primary can only be defined at top-level',\n SC7: 'SchemaCheck: default-values can only be defined at top-level',\n SC8: 'SchemaCheck: first level-fields cannot start with underscore _',\n SC10: 'SchemaCheck: schema defines ._rev, this will be done automatically',\n SC11: 'SchemaCheck: schema needs a number >=0 as version',\n // removed in 10.0.0 - SC12: 'SchemaCheck: primary can only be defined once',\n SC13: 'SchemaCheck: primary is always index, do not declare it as index',\n SC14: 'SchemaCheck: primary is always unique, do not declare it as index',\n SC15: 'SchemaCheck: primary cannot be encrypted',\n SC16: 'SchemaCheck: primary must have type: string',\n SC17: 'SchemaCheck: top-level fieldname is not allowed',\n SC18: 'SchemaCheck: indexes must be an array',\n SC19: 'SchemaCheck: indexes must contain strings or arrays of strings',\n SC20: 'SchemaCheck: indexes.array must contain strings',\n SC21: 'SchemaCheck: given index is not defined in schema',\n SC22: 'SchemaCheck: given indexKey is not type:string',\n SC23: 'SchemaCheck: fieldname is not allowed',\n SC24: 'SchemaCheck: required fields must be set via array. See https://spacetelescope.github.io/understanding-json-schema/reference/object.html#required',\n SC25: 'SchemaCheck: compoundIndexes needs to be specified in the indexes field',\n SC26: 'SchemaCheck: indexes needs to be specified at collection schema level',\n // removed in 16.0.0 - SC27: 'SchemaCheck: encrypted fields need to be specified at collection schema level',\n SC28: 'SchemaCheck: encrypted fields is not defined in the schema',\n SC29: 'SchemaCheck: missing object key \\'properties\\'',\n SC30: 'SchemaCheck: primaryKey is required',\n SC32: 'SchemaCheck: primary field must have the type string/number/integer',\n SC33: 'SchemaCheck: used primary key is not a property in the schema',\n SC34: 'Fields of type string that are used in an index, must have set the maxLength attribute in the schema',\n SC35: 'Fields of type number/integer that are used in an index, must have set the multipleOf attribute in the schema',\n SC36: 'A field of this type cannot be used as index',\n SC37: 'Fields of type number that are used in an index, must have set the minimum and maximum attribute in the schema',\n SC38: 'Fields of type boolean that are used in an index, must be required in the schema',\n SC39: 'The primary key must have the maxLength attribute set',\n SC40: '$ref fields in the schema are not allowed. RxDB cannot resolve related schemas because it would have a negative performance impact.' +\n 'It would have to run http requests on runtime. $ref fields should be resolved during build time.',\n SC41: 'minimum, maximum and maxLength values for indexes must be real numbers, not Infinity or -Infinity',\n\n // plugins/dev-mode\n // removed in 13.9.0, use PL3 instead - DEV1: 'dev-mode added multiple times',\n DVM1: 'When dev-mode is enabled, your storage must use one of the schema validators at the top level. This is because most problems people have with RxDB is because they store data that is not valid to the schema which causes strange bugs and problems.',\n\n // plugins/validate.js\n VD1: 'Sub-schema not found, does the schemaPath exists in your schema?',\n VD2: 'object does not match schema',\n\n // plugins/in-memory.js\n // removed in 14.0.0 - PouchDB RxStorage is removed IM1: 'InMemory: Memory-Adapter must be added. Use addPouchPlugin(require(\\'pouchdb-adapter-memory\\'));',\n // removed in 14.0.0 - PouchDB RxStorage is removed IM2: 'inMemoryCollection.sync(): Do not replicate with the in-memory instance. Replicate with the parent instead',\n\n // plugins/server.js\n S1: 'You cannot create collections after calling RxDatabase.server()',\n\n // plugins/replication-graphql.js\n GQL1: 'GraphQL replication: cannot find sub schema by key',\n // removed in 13.0.0, use RC_PULL instead - GQL2: 'GraphQL replication: unknown errors occurred in replication pull - see innerErrors for more details',\n GQL3: 'GraphQL replication: pull returns more documents then batchSize',\n // removed in 13.0.0, use RC_PUSH instead - GQL4: 'GraphQL replication: unknown errors occurred in replication push - see innerErrors for more details',\n\n // plugins/crdt/\n CRDT1: 'CRDT operations cannot be used because the crdt options are not set in the schema.',\n CRDT2: 'RxDocument.incrementalModify() cannot be used when CRDTs are activated.',\n CRDT3: 'To use CRDTs you MUST NOT set a conflictHandler because the default CRDT conflict handler must be used',\n\n // plugins/storage-dexie/\n DXE1: 'non-required index fields are not possible with the dexie.js RxStorage: https://github.com/pubkey/rxdb/pull/6643#issuecomment-2505310082',\n // removed in 15.0.0, added boolean index support to dexie storage - DXE1: 'The dexie.js RxStorage does not support boolean indexes, see https://rxdb.info/rx-storage-dexie.html#boolean-index',\n\n /**\n * Should never be thrown, use this for\n * null checks etc. so you do not have to increase the\n * build size with error message strings.\n */\n SNH: 'This should never happen'\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAGA,OAAO,IAAMA,cAAc,GAAG;EAC1B;EACAC,GAAG,EAAE,kCAAkC;EACvCC,GAAG,kTAE8F;EACjGC,GAAG,EAAE,yEAAyE;EAC9EC,GAAG,EAAE,qCAAqC;EAC1CC,GAAG,EAAE,mGAAmG;EACxGC,GAAG,EAAE,mFAAmF;EACxFC,GAAG,EAAE,iFAAiF;EAEtF;EACAC,GAAG,EAAE,kCAAkC;EACvC;EACAC,GAAG,EAAE,+FAA+F;EAEpG;EACA;EACAC,EAAE,EAAE,kDAAkD;EACtD;;EAEA;EACAC,GAAG,EAAE,2CAA2C;EAChD;EACA;EACAC,GAAG,EAAE,+DAA+D;EACpEC,GAAG,EAAE,wEAAwE;EAC7EC,GAAG,EAAE,iDAAiD;EAC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A6C;EACnDC,IAAI,EAAE,iDAAiD;EACvDC,IAAI,EAAE,uCAAuC;EAC7CC,IAAI,EAAE,gEAAgE;EACtEC,IAAI,EAAE,iDAAiD;EACvDC,IAAI,EAAE,mDAAmD;EACzDC,IAAI,EAAE,gDAAgD;EACtDC,IAAI,EAAE,uCAAuC;EAC7CC,IAAI,EAAE,mJAAmJ;EACzJC,IAAI,EAAE,yEAAyE;EAC/EC,IAAI,EAAE,uEAAuE;EAC7E;EACAC,IAAI,EAAE,4DAA4D;EAClEC,IAAI,EAAE,gDAAgD;EACtDC,IAAI,EAAE,qCAAqC;EAC3CC,IAAI,EAAE,qEAAqE;EAC3EC,IAAI,EAAE,+DAA+D;EACrEC,IAAI,EAAE,sGAAsG;EAC5GC,IAAI,EAAE,+GAA+G;EACrHC,IAAI,EAAE,8CAA8C;EACpDC,IAAI,EAAE,gHAAgH;EACtHC,IAAI,EAAE,kFAAkF;EACxFC,IAAI,EAAE,uDAAuD;EAC7DC,IAAI,EAAE,qIAAqI,GACvI,kGAAkG;EACtGC,IAAI,EAAE,mGAAmG;EAEzG;EACA;EACAC,IAAI,EAAE,uPAAuP;EAE7P;EACAC,GAAG,EAAE,kEAAkE;EACvEC,GAAG,EAAE,8BAA8B;EAEnC;EACA;EACA;;EAEA;EACAC,EAAE,EAAE,iEAAiE;EAErE;EACAC,IAAI,EAAE,oDAAoD;EAC1D;EACAC,IAAI,EAAE,iEAAiE;EACvE;;EAEA;EACAC,KAAK,EAAE,oFAAoF;EAC3FC,KAAK,EAAE,yEAAyE;EAChFC,KAAK,EAAE,wGAAwG;EAE/G;EACAC,IAAI,EAAE,0IAA0I;EAChJ;;EAEA;AACJ;AACA;AACA;AACA;EACIC,GAAG,EAAE;AACT,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/dist/esm/plugins/storage-dexie/rx-storage-dexie.js b/dist/esm/plugins/storage-dexie/rx-storage-dexie.js index 57b8e1d1018..ae7e6b8d84d 100644 --- a/dist/esm/plugins/storage-dexie/rx-storage-dexie.js +++ b/dist/esm/plugins/storage-dexie/rx-storage-dexie.js @@ -2,6 +2,7 @@ import { RX_STORAGE_NAME_DEXIE } from "./dexie-helper.js"; import { createDexieStorageInstance } from "./rx-storage-instance-dexie.js"; import { ensureRxStorageInstanceParamsAreCorrect } from "../../rx-storage-helper.js"; import { RXDB_VERSION } from "../utils/utils-rxdb-version.js"; +import { newRxError } from "../../rx-error.js"; export var RxStorageDexie = /*#__PURE__*/function () { function RxStorageDexie(settings) { this.name = RX_STORAGE_NAME_DEXIE; @@ -11,6 +12,22 @@ export var RxStorageDexie = /*#__PURE__*/function () { var _proto = RxStorageDexie.prototype; _proto.createStorageInstance = function createStorageInstance(params) { ensureRxStorageInstanceParamsAreCorrect(params); + + /** + * Dexie does not support non-required indexes and must throw if that is used. + * @link https://github.com/pubkey/rxdb/pull/6643#issuecomment-2505310082 + */ + if (params.schema.indexes) { + var indexFields = params.schema.indexes.flat(); + indexFields.filter(indexField => !indexField.includes('.')).forEach(indexField => { + if (!params.schema.required || !params.schema.required.includes(indexField)) { + throw newRxError('DXE1', { + field: indexField, + schema: params.schema + }); + } + }); + } return createDexieStorageInstance(this, params, this.settings); }; return RxStorageDexie; diff --git a/dist/esm/plugins/storage-dexie/rx-storage-dexie.js.map b/dist/esm/plugins/storage-dexie/rx-storage-dexie.js.map index f75dd47cae0..8095938fad9 100644 --- a/dist/esm/plugins/storage-dexie/rx-storage-dexie.js.map +++ b/dist/esm/plugins/storage-dexie/rx-storage-dexie.js.map @@ -1 +1 @@ -{"version":3,"file":"rx-storage-dexie.js","names":["RX_STORAGE_NAME_DEXIE","createDexieStorageInstance","ensureRxStorageInstanceParamsAreCorrect","RXDB_VERSION","RxStorageDexie","settings","name","rxdbVersion","_proto","prototype","createStorageInstance","params","getRxStorageDexie","storage"],"sources":["../../../../src/plugins/storage-dexie/rx-storage-dexie.ts"],"sourcesContent":["import type {\n RxStorage,\n RxStorageInstanceCreationParams\n} from '../../types/index.d.ts';\nimport {\n RX_STORAGE_NAME_DEXIE\n} from './dexie-helper.ts';\nimport type {\n DexieSettings,\n DexieStorageInternals\n} from '../../types/plugins/dexie.d.ts';\nimport {\n createDexieStorageInstance,\n RxStorageInstanceDexie\n} from './rx-storage-instance-dexie.ts';\nimport { ensureRxStorageInstanceParamsAreCorrect } from '../../rx-storage-helper.ts';\nimport { RXDB_VERSION } from '../utils/utils-rxdb-version.ts';\n\n\n\nexport class RxStorageDexie implements RxStorage {\n public name = RX_STORAGE_NAME_DEXIE;\n public readonly rxdbVersion = RXDB_VERSION;\n constructor(\n public settings: DexieSettings\n ) { }\n\n public createStorageInstance(\n params: RxStorageInstanceCreationParams\n ): Promise> {\n ensureRxStorageInstanceParamsAreCorrect(params);\n return createDexieStorageInstance(this, params, this.settings);\n }\n}\n\n\nexport function getRxStorageDexie(\n settings: DexieSettings = {}\n): RxStorageDexie {\n const storage = new RxStorageDexie(settings);\n return storage;\n}\n"],"mappings":"AAIA,SACIA,qBAAqB,QAClB,mBAAmB;AAK1B,SACIC,0BAA0B,QAEvB,gCAAgC;AACvC,SAASC,uCAAuC,QAAQ,4BAA4B;AACpF,SAASC,YAAY,QAAQ,gCAAgC;AAI7D,WAAaC,cAAc;EAGvB,SAAAA,eACWC,QAAuB,EAChC;IAAA,KAJKC,IAAI,GAAGN,qBAAqB;IAAA,KACnBO,WAAW,GAAGJ,YAAY;IAAA,KAE/BE,QAAuB,GAAvBA,QAAuB;EAC9B;EAAC,IAAAG,MAAA,GAAAJ,cAAA,CAAAK,SAAA;EAAAD,MAAA,CAEEE,qBAAqB,GAA5B,SAAOA,qBAAqBA,CACxBC,MAAiE,EACvB;IAC1CT,uCAAuC,CAACS,MAAM,CAAC;IAC/C,OAAOV,0BAA0B,CAAC,IAAI,EAAEU,MAAM,EAAE,IAAI,CAACN,QAAQ,CAAC;EAClE,CAAC;EAAA,OAAAD,cAAA;AAAA;AAIL,OAAO,SAASQ,iBAAiBA,CAC7BP,QAAuB,GAAG,CAAC,CAAC,EACd;EACd,IAAMQ,OAAO,GAAG,IAAIT,cAAc,CAACC,QAAQ,CAAC;EAC5C,OAAOQ,OAAO;AAClB","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"rx-storage-dexie.js","names":["RX_STORAGE_NAME_DEXIE","createDexieStorageInstance","ensureRxStorageInstanceParamsAreCorrect","RXDB_VERSION","newRxError","RxStorageDexie","settings","name","rxdbVersion","_proto","prototype","createStorageInstance","params","schema","indexes","indexFields","flat","filter","indexField","includes","forEach","required","field","getRxStorageDexie","storage"],"sources":["../../../../src/plugins/storage-dexie/rx-storage-dexie.ts"],"sourcesContent":["import type {\n RxStorage,\n RxStorageInstanceCreationParams\n} from '../../types/index.d.ts';\nimport {\n RX_STORAGE_NAME_DEXIE\n} from './dexie-helper.ts';\nimport type {\n DexieSettings,\n DexieStorageInternals\n} from '../../types/plugins/dexie.d.ts';\nimport {\n createDexieStorageInstance,\n RxStorageInstanceDexie\n} from './rx-storage-instance-dexie.ts';\nimport { ensureRxStorageInstanceParamsAreCorrect } from '../../rx-storage-helper.ts';\nimport { RXDB_VERSION } from '../utils/utils-rxdb-version.ts';\nimport { getSchemaByObjectPath } from '../../rx-schema-helper.ts';\nimport { newRxError } from '../../rx-error.ts';\n\n\n\nexport class RxStorageDexie implements RxStorage {\n public name = RX_STORAGE_NAME_DEXIE;\n public readonly rxdbVersion = RXDB_VERSION;\n constructor(\n public settings: DexieSettings\n ) { }\n\n public createStorageInstance(\n params: RxStorageInstanceCreationParams\n ): Promise> {\n ensureRxStorageInstanceParamsAreCorrect(params);\n\n /**\n * Dexie does not support non-required indexes and must throw if that is used.\n * @link https://github.com/pubkey/rxdb/pull/6643#issuecomment-2505310082\n */\n if (params.schema.indexes) {\n const indexFields = params.schema.indexes.flat();\n indexFields\n .filter(indexField => !indexField.includes('.'))\n .forEach(indexField => {\n if (!params.schema.required || !params.schema.required.includes(indexField as any)) {\n throw newRxError('DXE1', {\n field: indexField,\n schema: params.schema,\n });\n }\n });\n }\n\n return createDexieStorageInstance(this, params, this.settings);\n }\n}\n\n\nexport function getRxStorageDexie(\n settings: DexieSettings = {}\n): RxStorageDexie {\n const storage = new RxStorageDexie(settings);\n return storage;\n}\n"],"mappings":"AAIA,SACIA,qBAAqB,QAClB,mBAAmB;AAK1B,SACIC,0BAA0B,QAEvB,gCAAgC;AACvC,SAASC,uCAAuC,QAAQ,4BAA4B;AACpF,SAASC,YAAY,QAAQ,gCAAgC;AAE7D,SAASC,UAAU,QAAQ,mBAAmB;AAI9C,WAAaC,cAAc;EAGvB,SAAAA,eACWC,QAAuB,EAChC;IAAA,KAJKC,IAAI,GAAGP,qBAAqB;IAAA,KACnBQ,WAAW,GAAGL,YAAY;IAAA,KAE/BG,QAAuB,GAAvBA,QAAuB;EAC9B;EAAC,IAAAG,MAAA,GAAAJ,cAAA,CAAAK,SAAA;EAAAD,MAAA,CAEEE,qBAAqB,GAA5B,SAAOA,qBAAqBA,CACxBC,MAAiE,EACvB;IAC1CV,uCAAuC,CAACU,MAAM,CAAC;;IAE/C;AACR;AACA;AACA;IACQ,IAAIA,MAAM,CAACC,MAAM,CAACC,OAAO,EAAE;MACvB,IAAMC,WAAW,GAAGH,MAAM,CAACC,MAAM,CAACC,OAAO,CAACE,IAAI,CAAC,CAAC;MAChDD,WAAW,CACNE,MAAM,CAACC,UAAU,IAAI,CAACA,UAAU,CAACC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAC/CC,OAAO,CAACF,UAAU,IAAI;QACnB,IAAI,CAACN,MAAM,CAACC,MAAM,CAACQ,QAAQ,IAAI,CAACT,MAAM,CAACC,MAAM,CAACQ,QAAQ,CAACF,QAAQ,CAACD,UAAiB,CAAC,EAAE;UAChF,MAAMd,UAAU,CAAC,MAAM,EAAE;YACrBkB,KAAK,EAAEJ,UAAU;YACjBL,MAAM,EAAED,MAAM,CAACC;UACnB,CAAC,CAAC;QACN;MACJ,CAAC,CAAC;IACV;IAEA,OAAOZ,0BAA0B,CAAC,IAAI,EAAEW,MAAM,EAAE,IAAI,CAACN,QAAQ,CAAC;EAClE,CAAC;EAAA,OAAAD,cAAA;AAAA;AAIL,OAAO,SAASkB,iBAAiBA,CAC7BjB,QAAuB,GAAG,CAAC,CAAC,EACd;EACd,IAAMkB,OAAO,GAAG,IAAInB,cAAc,CAACC,QAAQ,CAAC;EAC5C,OAAOkB,OAAO;AAClB","ignoreList":[]} \ No newline at end of file diff --git a/dist/esm/plugins/test-utils/schema-objects.js b/dist/esm/plugins/test-utils/schema-objects.js index c4d8c4c0b4b..52c09c78e0f 100644 --- a/dist/esm/plugins/test-utils/schema-objects.js +++ b/dist/esm/plugins/test-utils/schema-objects.js @@ -128,7 +128,7 @@ export function bigHumanDocumentType() { } export function heroArrayData() { return { - name: randomStringWithSpecialChars(4, 6), + name: randomStringWithSpecialChars(6, 8), skills: new Array(3).fill(0).map(() => { return { name: randomStringWithSpecialChars(4, 6), @@ -139,7 +139,7 @@ export function heroArrayData() { } export function simpleHeroArray(partial = {}) { var defaultObj = { - name: randomStringWithSpecialChars(3, 6), + name: randomStringWithSpecialChars(6, 8), skills: new Array(3).fill(0).map(() => randomStringWithSpecialChars(3, 6)) }; return Object.assign(defaultObj, partial); diff --git a/dist/esm/plugins/test-utils/schema-objects.js.map b/dist/esm/plugins/test-utils/schema-objects.js.map index 9e5997926df..6d7bc533c53 100644 --- a/dist/esm/plugins/test-utils/schema-objects.js.map +++ b/dist/esm/plugins/test-utils/schema-objects.js.map @@ -1 +1 @@ -{"version":3,"file":"schema-objects.js","names":["randomNumber","schemas","appendToArray","ensureNotFalsy","lastOfArray","TEST_DATA_CHARSET","TEST_DATA_CHARSET_LAST_SORTED","split","sort","someEmojisArr","baseChars","allChars","slice","randomStringWithSpecialChars","minLength","maxLength","text","Error","length","Math","floor","random","humanData","passportId","age","firstName","lastName","simpleHumanData","simpleHumanV3Data","partial","defaultObj","Object","assign","simpleHumanAge","humanWithSubOther","other","NoIndexHuman","nestedHumanData","mainSkill","name","level","deepNestedHumanData","attack","good","count","bigHumanDocumentType","dnaHash","heroArrayData","skills","Array","fill","map","damage","simpleHeroArray","encryptedHumanData","secret","encryptedObjectHumanData","subname","encryptedDeepHumanDocumentType","firstLevelPassword","secretData","pw","deepSecret","darkhole","nestedSecret","compoundIndexData","passportCountry","compoundIndexNoStringData","nostringIndex","refHumanData","bestFriend","refHumanNestedData","foo","humanWithTimestampData","givenData","ret","id","updatedAt","Date","now","averageSchemaForFieldLength","averageSchema","averageSchemaData","properties","var1","var2","maximum","deep","deep1","deep2","deeper","deepNr","list","pointData","x","y","humanWithIdAndAgeIndexDocumentType","humanWithCompositePrimary","info"],"sources":["../../../../src/plugins/test-utils/schema-objects.ts"],"sourcesContent":["/**\n * this file contains objects which match the schemas in schemas.js\n */\n\nimport {\n randomNumber\n} from 'async-test-util';\nimport { HumanDocumentType } from './schemas.ts';\nimport * as schemas from './schemas.ts';\nimport { appendToArray, ensureNotFalsy, lastOfArray } from '../utils/index.ts';\n\n\n/**\n * Some storages had problems with umlauts and other special chars.\n * So we add these to all test strings.\n */\nexport const TEST_DATA_CHARSET = '0987654321ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzäöüÖÄßÜ[]{}\\'';\nexport const TEST_DATA_CHARSET_LAST_SORTED = ensureNotFalsy(lastOfArray(TEST_DATA_CHARSET.split('').sort()));\nconst someEmojisArr = ['😊', '💩', '👵', '🍌', '🏳️‍🌈', '😃'];\n\nconst baseChars = TEST_DATA_CHARSET.split('');\nconst allChars = baseChars.slice(0);\nappendToArray(allChars, someEmojisArr);\n\nexport function randomStringWithSpecialChars(\n minLength: number,\n /**\n * It has shown that alternating string lengths\n * can reproduce various problems. So by having variable\n * lengths we ensure that this fully works.\n */\n maxLength: number\n) {\n let text = '';\n\n if (!minLength || !maxLength || minLength > maxLength) {\n throw new Error('invalid length given ' + minLength + ' ' + maxLength);\n }\n\n const length = randomNumber(minLength, maxLength);\n\n while (text.length < length) {\n if (text.length === 0) {\n /**\n * TODO foundationdb does not work correctly when an index string starts\n * with an emoji. This can likely be fixed by upgrading foundationdb to the\n * latest version.\n */\n text += baseChars[Math.floor(Math.random() * baseChars.length)];\n } else {\n text += allChars[Math.floor(Math.random() * allChars.length)];\n }\n }\n\n /**\n * Because emojis can have a string.length of 2,\n * we can sometimes end up with strings that are longer\n * than the provided length. In that cases we have to rerun.\n */\n if (text.length > length) {\n return randomStringWithSpecialChars(minLength, maxLength);\n }\n\n return text;\n}\n\nexport interface SimpleHumanDocumentType {\n passportId: string;\n firstName: string;\n lastName: string;\n}\n\nexport function humanData(\n passportId: string = randomStringWithSpecialChars(8, 12),\n age: number = randomNumber(10, 50),\n firstName: string = randomStringWithSpecialChars(8, 12)\n): HumanDocumentType {\n return {\n passportId: passportId,\n firstName,\n lastName: randomStringWithSpecialChars(8, 12),\n age\n };\n}\n\nexport function simpleHumanData(): SimpleHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n lastName: randomStringWithSpecialChars(8, 12)\n };\n}\n\nexport interface SimpleHumanV3DocumentType {\n passportId: string;\n age: number;\n oneOptional?: string;\n}\nexport function simpleHumanV3Data(partial: Partial = {}): SimpleHumanV3DocumentType {\n const defaultObj = {\n passportId: randomStringWithSpecialChars(8, 12),\n age: randomNumber(10, 50)\n };\n return Object.assign(\n defaultObj,\n partial\n );\n}\n\nexport interface SimpleHumanAgeDocumentType {\n passportId: string;\n age: string;\n}\nexport function simpleHumanAge(partial: Partial = {}): SimpleHumanAgeDocumentType {\n const defaultObj = {\n passportId: randomStringWithSpecialChars(8, 12),\n age: randomNumber(10, 50) + ''\n };\n return Object.assign(\n defaultObj,\n partial\n );\n}\n\nexport interface HumanWithSubOtherDocumentType {\n passportId: string;\n other: {\n age: number;\n };\n}\nexport function humanWithSubOther(): HumanWithSubOtherDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n other: {\n age: randomNumber(10, 50)\n }\n };\n}\n\nexport interface NoIndexHumanDocumentType {\n firstName: string;\n lastName: string;\n}\nexport function NoIndexHuman(): NoIndexHumanDocumentType {\n return {\n firstName: randomStringWithSpecialChars(8, 12),\n lastName: randomStringWithSpecialChars(8, 12)\n };\n}\n\nexport interface NestedHumanDocumentType {\n passportId: string;\n firstName: string;\n mainSkill: {\n name: string;\n level: number;\n };\n}\nexport function nestedHumanData(partial: Partial = {}): NestedHumanDocumentType {\n const defaultObj = {\n passportId: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n mainSkill: {\n name: randomStringWithSpecialChars(4, 6),\n level: 5\n }\n };\n return Object.assign(\n defaultObj,\n partial\n );\n}\n\nexport interface DeepNestedHumanDocumentType {\n passportId: string;\n mainSkill: {\n name: string;\n attack: {\n good: boolean;\n count: number;\n };\n };\n}\nexport function deepNestedHumanData(): DeepNestedHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n mainSkill: {\n name: randomStringWithSpecialChars(4, 6),\n attack: {\n good: false,\n count: 5\n }\n }\n };\n}\n\nexport interface BigHumanDocumentType {\n passportId: string;\n dnaHash: string;\n firstName: string;\n lastName: string;\n age: number;\n}\nexport function bigHumanDocumentType(): BigHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n dnaHash: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n lastName: randomStringWithSpecialChars(8, 12),\n age: randomNumber(10, 50)\n };\n}\n\nexport interface HeroArrayDocumentType {\n name: string;\n skills: {\n name: string;\n damage: number;\n }[];\n}\nexport function heroArrayData(): HeroArrayDocumentType {\n return {\n name: randomStringWithSpecialChars(4, 6),\n skills: new Array(3).fill(0).map(() => {\n return {\n name: randomStringWithSpecialChars(4, 6),\n damage: randomNumber(10, 50)\n };\n })\n };\n}\n\nexport interface SimpleHeroArrayDocumentType {\n name: string;\n skills: string[];\n}\nexport function simpleHeroArray(partial: Partial = {}): SimpleHeroArrayDocumentType {\n const defaultObj = {\n name: randomStringWithSpecialChars(3, 6),\n skills: new Array(3).fill(0).map(() => randomStringWithSpecialChars(3, 6))\n };\n return Object.assign(\n defaultObj,\n partial\n );\n}\n\nexport interface EncryptedHumanDocumentType {\n passportId: string;\n firstName: string;\n secret: string;\n}\nexport function encryptedHumanData(secret = randomStringWithSpecialChars(8, 12)): EncryptedHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n secret\n };\n}\n\nexport interface EncryptedObjectHumanDocumentType {\n passportId: string;\n firstName: string;\n secret: {\n name: string;\n subname: string;\n };\n}\nexport function encryptedObjectHumanData(): EncryptedObjectHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n secret: {\n name: randomStringWithSpecialChars(8, 12),\n subname: randomStringWithSpecialChars(8, 12)\n }\n };\n}\n\nexport interface EncryptedDeepHumanDocumentType {\n passportId: string;\n firstName: string;\n firstLevelPassword: string;\n secretData: {\n pw: string;\n };\n deepSecret: {\n darkhole: {\n pw: string;\n };\n };\n nestedSecret: {\n darkhole: {\n pw: string;\n };\n };\n}\nexport function encryptedDeepHumanDocumentType(): EncryptedDeepHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n firstLevelPassword: randomStringWithSpecialChars(8, 12),\n secretData: {\n pw: randomStringWithSpecialChars(8, 12)\n },\n deepSecret: {\n darkhole: {\n pw: randomStringWithSpecialChars(8, 12)\n }\n },\n nestedSecret: {\n darkhole: {\n pw: randomStringWithSpecialChars(8, 12)\n }\n }\n };\n}\n\nexport interface CompoundIndexDocumentType {\n passportId: string;\n passportCountry: string;\n age: number;\n}\nexport function compoundIndexData(): CompoundIndexDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n passportCountry: randomStringWithSpecialChars(8, 12),\n age: randomNumber(10, 50)\n };\n}\n\nexport interface CompoundIndexNoStringDocumentType {\n passportId: string;\n passportCountry: { [prop: string]: string; };\n age: number;\n}\nexport function compoundIndexNoStringData(): CompoundIndexNoStringDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n passportCountry: { [randomStringWithSpecialChars(8, 12)]: randomStringWithSpecialChars(8, 12) },\n age: randomNumber(10, 50)\n };\n}\n\nexport interface NostringIndexDocumentType {\n passportId: {};\n firstName: string;\n}\nexport function nostringIndex(): NostringIndexDocumentType {\n return {\n passportId: {},\n firstName: randomStringWithSpecialChars(8, 12)\n };\n}\n\nexport interface RefHumanDocumentType {\n name: string;\n bestFriend: string;\n}\nexport function refHumanData(bestFriend?: string): RefHumanDocumentType {\n return {\n name: randomStringWithSpecialChars(8, 12),\n bestFriend\n } as any;\n}\n\nexport interface RefHumanNestedDocumentType {\n name: string;\n foo: {\n bestFriend: string;\n };\n}\nexport function refHumanNestedData(bestFriend?: string): RefHumanNestedDocumentType {\n return {\n name: randomStringWithSpecialChars(8, 12),\n foo: {\n bestFriend\n } as any\n };\n}\nexport interface HumanWithTimestampNestedDocumentType extends HumanWithTimestampDocumentType {\n address?: {\n street: string;\n suite: string;\n city: string;\n zipcode: string;\n geo: {\n lat: string;\n lng: string;\n };\n }\n}\n\nexport interface HumanWithTimestampDocumentType {\n id: string;\n name: string;\n age: number;\n updatedAt: number;\n deletedAt?: number;\n}\nexport function humanWithTimestampData(givenData: Partial = {}): HumanWithTimestampDocumentType {\n let ret = {\n id: randomStringWithSpecialChars(8, 12),\n name: randomStringWithSpecialChars(8, 12),\n age: randomNumber(1, 100),\n // use some time in the past week\n updatedAt: Date.now()\n };\n ret = Object.assign({}, ret, givenData);\n return ret;\n}\n\nexport interface AverageSchemaDocumentType {\n id: string;\n var1: string;\n var2: number;\n deep: {\n deep1: string;\n deep2: string;\n deeper: {\n deepNr: number;\n };\n };\n list: {\n deep1: string;\n deep2: string;\n }[];\n}\n\n\nconst averageSchemaForFieldLength = schemas.averageSchema() as any;\nexport function averageSchemaData(\n partial: Partial = {}\n): AverageSchemaDocumentType {\n return Object.assign(\n {},\n {\n id: randomStringWithSpecialChars(ensureNotFalsy(averageSchemaForFieldLength.properties.id.maxLength - 3), ensureNotFalsy(averageSchemaForFieldLength.properties.id.maxLength)),\n var1: randomStringWithSpecialChars(ensureNotFalsy(averageSchemaForFieldLength.properties.var1.maxLength) - 3, ensureNotFalsy(averageSchemaForFieldLength.properties.var1.maxLength)),\n var2: randomNumber(100, ensureNotFalsy(averageSchemaForFieldLength.properties.var2.maximum)),\n deep: {\n deep1: randomStringWithSpecialChars(ensureNotFalsy(averageSchemaForFieldLength.properties.deep.properties.deep1.maxLength) - 3, ensureNotFalsy(averageSchemaForFieldLength.properties.deep.properties.deep1.maxLength)),\n deep2: randomStringWithSpecialChars(ensureNotFalsy(averageSchemaForFieldLength.properties.deep.properties.deep2.maxLength) - 3, ensureNotFalsy(averageSchemaForFieldLength.properties.deep.properties.deep2.maxLength)),\n deeper: {\n deepNr: randomNumber(0, 10)\n }\n },\n list: new Array(5).fill(0).map(() => ({\n deep1: randomStringWithSpecialChars(2, 5),\n deep2: randomStringWithSpecialChars(5, 8)\n }))\n },\n partial\n );\n}\n\nexport interface PointDocumentType {\n id: string;\n x: number;\n y: number;\n}\nexport function pointData(): PointDocumentType {\n return {\n id: randomStringWithSpecialChars(8, 12),\n x: randomNumber(1, 100),\n y: randomNumber(1, 100)\n };\n}\n\nexport interface HumanWithIdAndAgeIndexDocumentType {\n id: string;\n name: string;\n age: number;\n}\nexport function humanWithIdAndAgeIndexDocumentType(\n age: number = randomNumber(1, 100)\n): HumanWithIdAndAgeIndexDocumentType {\n return {\n id: randomStringWithSpecialChars(8, 12),\n name: randomStringWithSpecialChars(8, 12),\n age\n };\n}\n\nexport type HumanWithCompositePrimary = {\n // optional because it might be created by RxDB and not known before\n id?: string;\n firstName: string;\n lastName: string;\n info: {\n age: number;\n };\n};\nexport function humanWithCompositePrimary(partial: Partial = {}): HumanWithCompositePrimary {\n const defaultObj = {\n firstName: randomStringWithSpecialChars(8, 12),\n lastName: randomStringWithSpecialChars(8, 12),\n info: {\n age: randomNumber(10, 50)\n }\n };\n return Object.assign(\n defaultObj,\n partial\n );\n}\n"],"mappings":"AAAA;AACA;AACA;;AAEA,SACIA,YAAY,QACT,iBAAiB;AAExB,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,SAASC,aAAa,EAAEC,cAAc,EAAEC,WAAW,QAAQ,mBAAmB;;AAG9E;AACA;AACA;AACA;AACA,OAAO,IAAMC,iBAAiB,GAAG,6EAA6E;AAC9G,OAAO,IAAMC,6BAA6B,GAAGH,cAAc,CAACC,WAAW,CAACC,iBAAiB,CAACE,KAAK,CAAC,EAAE,CAAC,CAACC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC5G,IAAMC,aAAa,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC;AAE9D,IAAMC,SAAS,GAAGL,iBAAiB,CAACE,KAAK,CAAC,EAAE,CAAC;AAC7C,IAAMI,QAAQ,GAAGD,SAAS,CAACE,KAAK,CAAC,CAAC,CAAC;AACnCV,aAAa,CAACS,QAAQ,EAAEF,aAAa,CAAC;AAEtC,OAAO,SAASI,4BAA4BA,CACxCC,SAAiB;AACjB;AACJ;AACA;AACA;AACA;AACIC,SAAiB,EACnB;EACE,IAAIC,IAAI,GAAG,EAAE;EAEb,IAAI,CAACF,SAAS,IAAI,CAACC,SAAS,IAAID,SAAS,GAAGC,SAAS,EAAE;IACnD,MAAM,IAAIE,KAAK,CAAC,uBAAuB,GAAGH,SAAS,GAAG,GAAG,GAAGC,SAAS,CAAC;EAC1E;EAEA,IAAMG,MAAM,GAAGlB,YAAY,CAACc,SAAS,EAAEC,SAAS,CAAC;EAEjD,OAAOC,IAAI,CAACE,MAAM,GAAGA,MAAM,EAAE;IACzB,IAAIF,IAAI,CAACE,MAAM,KAAK,CAAC,EAAE;MACnB;AACZ;AACA;AACA;AACA;MACYF,IAAI,IAA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AAC;IAC9Ca,QAAQ,EAAEb,4BAA4B,CAAC,CAAC,EAAE,EAAE,CAAC;IAC7CqF,IAAI,EAAE;MACF1E,GAAG,EAAExB,YAAY,CAAC,EAAE,EAAE,EAAE;IAC5B;EACJ,CAAC;EACD,OAAO+B,MAAM,CAACC,MAAM,CAChBF,UAAU,EACVD,OACJ,CAAC;AACL","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"schema-objects.js","names":["randomNumber","schemas","appendToArray","ensureNotFalsy","lastOfArray","TEST_DATA_CHARSET","TEST_DATA_CHARSET_LAST_SORTED","split","sort","someEmojisArr","baseChars","allChars","slice","randomStringWithSpecialChars","minLength","maxLength","text","Error","length","Math","floor","random","humanData","passportId","age","firstName","lastName","simpleHumanData","simpleHumanV3Data","partial","defaultObj","Object","assign","simpleHumanAge","humanWithSubOther","other","NoIndexHuman","nestedHumanData","mainSkill","name","level","deepNestedHumanData","attack","good","count","bigHumanDocumentType","dnaHash","heroArrayData","skills","Array","fill","map","damage","simpleHeroArray","encryptedHumanData","secret","encryptedObjectHumanData","subname","encryptedDeepHumanDocumentType","firstLevelPassword","secretData","pw","deepSecret","darkhole","nestedSecret","compoundIndexData","passportCountry","compoundIndexNoStringData","nostringIndex","refHumanData","bestFriend","refHumanNestedData","foo","humanWithTimestampData","givenData","ret","id","updatedAt","Date","now","averageSchemaForFieldLength","averageSchema","averageSchemaData","properties","var1","var2","maximum","deep","deep1","deep2","deeper","deepNr","list","pointData","x","y","humanWithIdAndAgeIndexDocumentType","humanWithCompositePrimary","info"],"sources":["../../../../src/plugins/test-utils/schema-objects.ts"],"sourcesContent":["/**\n * this file contains objects which match the schemas in schemas.js\n */\n\nimport {\n randomNumber\n} from 'async-test-util';\nimport { HumanDocumentType } from './schemas.ts';\nimport * as schemas from './schemas.ts';\nimport { appendToArray, ensureNotFalsy, lastOfArray } from '../utils/index.ts';\n\n\n/**\n * Some storages had problems with umlauts and other special chars.\n * So we add these to all test strings.\n */\nexport const TEST_DATA_CHARSET = '0987654321ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzäöüÖÄßÜ[]{}\\'';\nexport const TEST_DATA_CHARSET_LAST_SORTED = ensureNotFalsy(lastOfArray(TEST_DATA_CHARSET.split('').sort()));\nconst someEmojisArr = ['😊', '💩', '👵', '🍌', '🏳️‍🌈', '😃'];\n\nconst baseChars = TEST_DATA_CHARSET.split('');\nconst allChars = baseChars.slice(0);\nappendToArray(allChars, someEmojisArr);\n\nexport function randomStringWithSpecialChars(\n minLength: number,\n /**\n * It has shown that alternating string lengths\n * can reproduce various problems. So by having variable\n * lengths we ensure that this fully works.\n */\n maxLength: number\n) {\n let text = '';\n\n if (!minLength || !maxLength || minLength > maxLength) {\n throw new Error('invalid length given ' + minLength + ' ' + maxLength);\n }\n\n const length = randomNumber(minLength, maxLength);\n\n while (text.length < length) {\n if (text.length === 0) {\n /**\n * TODO foundationdb does not work correctly when an index string starts\n * with an emoji. This can likely be fixed by upgrading foundationdb to the\n * latest version.\n */\n text += baseChars[Math.floor(Math.random() * baseChars.length)];\n } else {\n text += allChars[Math.floor(Math.random() * allChars.length)];\n }\n }\n\n /**\n * Because emojis can have a string.length of 2,\n * we can sometimes end up with strings that are longer\n * than the provided length. In that cases we have to rerun.\n */\n if (text.length > length) {\n return randomStringWithSpecialChars(minLength, maxLength);\n }\n\n return text;\n}\n\nexport interface SimpleHumanDocumentType {\n passportId: string;\n firstName: string;\n lastName: string;\n}\n\nexport function humanData(\n passportId: string = randomStringWithSpecialChars(8, 12),\n age: number = randomNumber(10, 50),\n firstName: string = randomStringWithSpecialChars(8, 12)\n): HumanDocumentType {\n return {\n passportId: passportId,\n firstName,\n lastName: randomStringWithSpecialChars(8, 12),\n age\n };\n}\n\nexport function simpleHumanData(): SimpleHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n lastName: randomStringWithSpecialChars(8, 12)\n };\n}\n\nexport interface SimpleHumanV3DocumentType {\n passportId: string;\n age: number;\n oneOptional?: string;\n}\nexport function simpleHumanV3Data(partial: Partial = {}): SimpleHumanV3DocumentType {\n const defaultObj = {\n passportId: randomStringWithSpecialChars(8, 12),\n age: randomNumber(10, 50)\n };\n return Object.assign(\n defaultObj,\n partial\n );\n}\n\nexport interface SimpleHumanAgeDocumentType {\n passportId: string;\n age: string;\n}\nexport function simpleHumanAge(partial: Partial = {}): SimpleHumanAgeDocumentType {\n const defaultObj = {\n passportId: randomStringWithSpecialChars(8, 12),\n age: randomNumber(10, 50) + ''\n };\n return Object.assign(\n defaultObj,\n partial\n );\n}\n\nexport interface HumanWithSubOtherDocumentType {\n passportId: string;\n other: {\n age: number;\n };\n}\nexport function humanWithSubOther(): HumanWithSubOtherDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n other: {\n age: randomNumber(10, 50)\n }\n };\n}\n\nexport interface NoIndexHumanDocumentType {\n firstName: string;\n lastName: string;\n}\nexport function NoIndexHuman(): NoIndexHumanDocumentType {\n return {\n firstName: randomStringWithSpecialChars(8, 12),\n lastName: randomStringWithSpecialChars(8, 12)\n };\n}\n\nexport interface NestedHumanDocumentType {\n passportId: string;\n firstName: string;\n mainSkill: {\n name: string;\n level: number;\n };\n}\nexport function nestedHumanData(partial: Partial = {}): NestedHumanDocumentType {\n const defaultObj = {\n passportId: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n mainSkill: {\n name: randomStringWithSpecialChars(4, 6),\n level: 5\n }\n };\n return Object.assign(\n defaultObj,\n partial\n );\n}\n\nexport interface DeepNestedHumanDocumentType {\n passportId: string;\n mainSkill: {\n name: string;\n attack: {\n good: boolean;\n count: number;\n };\n };\n}\nexport function deepNestedHumanData(): DeepNestedHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n mainSkill: {\n name: randomStringWithSpecialChars(4, 6),\n attack: {\n good: false,\n count: 5\n }\n }\n };\n}\n\nexport interface BigHumanDocumentType {\n passportId: string;\n dnaHash: string;\n firstName: string;\n lastName: string;\n age: number;\n}\nexport function bigHumanDocumentType(): BigHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n dnaHash: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n lastName: randomStringWithSpecialChars(8, 12),\n age: randomNumber(10, 50)\n };\n}\n\nexport interface HeroArrayDocumentType {\n name: string;\n skills: {\n name: string;\n damage: number;\n }[];\n}\nexport function heroArrayData(): HeroArrayDocumentType {\n return {\n name: randomStringWithSpecialChars(6, 8),\n skills: new Array(3).fill(0).map(() => {\n return {\n name: randomStringWithSpecialChars(4, 6),\n damage: randomNumber(10, 50)\n };\n })\n };\n}\n\nexport interface SimpleHeroArrayDocumentType {\n name: string;\n skills: string[];\n}\nexport function simpleHeroArray(partial: Partial = {}): SimpleHeroArrayDocumentType {\n const defaultObj = {\n name: randomStringWithSpecialChars(6, 8),\n skills: new Array(3).fill(0).map(() => randomStringWithSpecialChars(3, 6))\n };\n return Object.assign(\n defaultObj,\n partial\n );\n}\n\nexport interface EncryptedHumanDocumentType {\n passportId: string;\n firstName: string;\n secret: string;\n}\nexport function encryptedHumanData(secret = randomStringWithSpecialChars(8, 12)): EncryptedHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n secret\n };\n}\n\nexport interface EncryptedObjectHumanDocumentType {\n passportId: string;\n firstName: string;\n secret: {\n name: string;\n subname: string;\n };\n}\nexport function encryptedObjectHumanData(): EncryptedObjectHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n secret: {\n name: randomStringWithSpecialChars(8, 12),\n subname: randomStringWithSpecialChars(8, 12)\n }\n };\n}\n\nexport interface EncryptedDeepHumanDocumentType {\n passportId: string;\n firstName: string;\n firstLevelPassword: string;\n secretData: {\n pw: string;\n };\n deepSecret: {\n darkhole: {\n pw: string;\n };\n };\n nestedSecret: {\n darkhole: {\n pw: string;\n };\n };\n}\nexport function encryptedDeepHumanDocumentType(): EncryptedDeepHumanDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n firstName: randomStringWithSpecialChars(8, 12),\n firstLevelPassword: randomStringWithSpecialChars(8, 12),\n secretData: {\n pw: randomStringWithSpecialChars(8, 12)\n },\n deepSecret: {\n darkhole: {\n pw: randomStringWithSpecialChars(8, 12)\n }\n },\n nestedSecret: {\n darkhole: {\n pw: randomStringWithSpecialChars(8, 12)\n }\n }\n };\n}\n\nexport interface CompoundIndexDocumentType {\n passportId: string;\n passportCountry: string;\n age: number;\n}\nexport function compoundIndexData(): CompoundIndexDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n passportCountry: randomStringWithSpecialChars(8, 12),\n age: randomNumber(10, 50)\n };\n}\n\nexport interface CompoundIndexNoStringDocumentType {\n passportId: string;\n passportCountry: { [prop: string]: string; };\n age: number;\n}\nexport function compoundIndexNoStringData(): CompoundIndexNoStringDocumentType {\n return {\n passportId: randomStringWithSpecialChars(8, 12),\n passportCountry: { [randomStringWithSpecialChars(8, 12)]: randomStringWithSpecialChars(8, 12) },\n age: randomNumber(10, 50)\n };\n}\n\nexport interface NostringIndexDocumentType {\n passportId: {};\n firstName: string;\n}\nexport function nostringIndex(): NostringIndexDocumentType {\n return {\n passportId: {},\n firstName: randomStringWithSpecialChars(8, 12)\n };\n}\n\nexport interface RefHumanDocumentType {\n name: string;\n bestFriend: string;\n}\nexport function refHumanData(bestFriend?: string): RefHumanDocumentType {\n return {\n name: randomStringWithSpecialChars(8, 12),\n bestFriend\n } as any;\n}\n\nexport interface RefHumanNestedDocumentType {\n name: string;\n foo: {\n bestFriend: string;\n };\n}\nexport function refHumanNestedData(bestFriend?: string): RefHumanNestedDocumentType {\n return {\n name: randomStringWithSpecialChars(8, 12),\n foo: {\n bestFriend\n } as any\n };\n}\nexport interface HumanWithTimestampNestedDocumentType extends HumanWithTimestampDocumentType {\n address?: {\n street: string;\n suite: string;\n city: string;\n zipcode: string;\n geo: {\n lat: string;\n lng: string;\n };\n }\n}\n\nexport interface HumanWithTimestampDocumentType {\n id: string;\n name: string;\n age: number;\n updatedAt: number;\n deletedAt?: number;\n}\nexport function humanWithTimestampData(givenData: Partial = {}): HumanWithTimestampDocumentType {\n let ret = {\n id: randomStringWithSpecialChars(8, 12),\n name: randomStringWithSpecialChars(8, 12),\n age: randomNumber(1, 100),\n // use some time in the past week\n updatedAt: Date.now()\n };\n ret = Object.assign({}, ret, givenData);\n return ret;\n}\n\nexport interface AverageSchemaDocumentType {\n id: string;\n var1: string;\n var2: number;\n deep: {\n deep1: string;\n deep2: string;\n deeper: {\n deepNr: number;\n };\n };\n list: {\n deep1: string;\n deep2: string;\n }[];\n}\n\n\nconst averageSchemaForFieldLength = schemas.averageSchema() as any;\nexport function averageSchemaData(\n partial: Partial = {}\n): AverageSchemaDocumentType {\n return Object.assign(\n {},\n {\n id: randomStringWithSpecialChars(ensureNotFalsy(averageSchemaForFieldLength.properties.id.maxLength - 3), ensureNotFalsy(averageSchemaForFieldLength.properties.id.maxLength)),\n var1: randomStringWithSpecialChars(ensureNotFalsy(averageSchemaForFieldLength.properties.var1.maxLength) - 3, ensureNotFalsy(averageSchemaForFieldLength.properties.var1.maxLength)),\n var2: randomNumber(100, ensureNotFalsy(averageSchemaForFieldLength.properties.var2.maximum)),\n deep: {\n deep1: randomStringWithSpecialChars(ensureNotFalsy(averageSchemaForFieldLength.properties.deep.properties.deep1.maxLength) - 3, ensureNotFalsy(averageSchemaForFieldLength.properties.deep.properties.deep1.maxLength)),\n deep2: randomStringWithSpecialChars(ensureNotFalsy(averageSchemaForFieldLength.properties.deep.properties.deep2.maxLength) - 3, ensureNotFalsy(averageSchemaForFieldLength.properties.deep.properties.deep2.maxLength)),\n deeper: {\n deepNr: randomNumber(0, 10)\n }\n },\n list: new Array(5).fill(0).map(() => ({\n deep1: randomStringWithSpecialChars(2, 5),\n deep2: randomStringWithSpecialChars(5, 8)\n }))\n },\n partial\n );\n}\n\nexport interface PointDocumentType {\n id: string;\n x: number;\n y: number;\n}\nexport function pointData(): PointDocumentType {\n return {\n id: randomStringWithSpecialChars(8, 12),\n x: randomNumber(1, 100),\n y: randomNumber(1, 100)\n };\n}\n\nexport interface HumanWithIdAndAgeIndexDocumentType {\n id: string;\n name: string;\n age: number;\n}\nexport function humanWithIdAndAgeIndexDocumentType(\n age: number = randomNumber(1, 100)\n): HumanWithIdAndAgeIndexDocumentType {\n return {\n id: randomStringWithSpecialChars(8, 12),\n name: randomStringWithSpecialChars(8, 12),\n age\n };\n}\n\nexport type HumanWithCompositePrimary = {\n // optional because it might be created by RxDB and not known before\n id?: string;\n firstName: string;\n lastName: string;\n info: {\n age: number;\n };\n};\nexport function humanWithCompositePrimary(partial: Partial = {}): HumanWithCompositePrimary {\n const defaultObj = {\n firstName: randomStringWithSpecialChars(8, 12),\n lastName: randomStringWithSpecialChars(8, 12),\n info: {\n age: randomNumber(10, 50)\n }\n };\n return Object.assign(\n defaultObj,\n partial\n );\n}\n"],"mappings":"AAAA;AACA;AACA;;AAEA,SACIA,YAAY,QACT,iBAAiB;AAExB,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,SAASC,aAAa,EAAEC,cAAc,EAAEC,WAAW,QAAQ,mBAAmB;;AAG9E;AACA;AACA;AACA;AACA,OAAO,IAAMC,iBAAiB,GAAG,6EAA6E;AAC9G,OAAO,IAAMC,6BAA6B,GAAGH,cAAc,CAACC,WAAW,CAACC,iBAAiB,CAACE,KAAK,CAAC,EAAE,CAAC,CAACC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC5G,IAAMC,aAAa,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC;AAE9D,IAAMC,SAAS,GAAGL,iBAAiB,CAACE,KAAK,CAAC,EAAE,CAAC;AAC7C,IAAMI,QAAQ,GAAGD,SAAS,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4BAA4B,CAAC,CAAC,EAAE,EAAE,CAAC;IACvCiF,CAAC,EAAE9F,YAAY,CAAC,CAAC,EAAE,GAAG,CAAC;IACvB+F,CAAC,EAAE/F,YAAY,CAAC,CAAC,EAAE,GAAG;EAC1B,CAAC;AACL;AAOA,OAAO,SAASgG,kCAAkCA,CAC9CxE,GAAW,GAAGxB,YAAY,CAAC,CAAC,EAAE,GAAG,CAAC,EACA;EAClC,OAAO;IACH4E,EAAE,EAAE/D,4BAA4B,CAAC,CAAC,EAAE,EAAE,CAAC;IACvC0B,IAAI,EAAE1B,4BAA4B,CAAC,CAAC,EAAE,EAAE,CAAC;IACzCW;EACJ,CAAC;AACL;AAWA,OAAO,SAASyE,yBAAyBA,CAACpE,OAA2C,GAAG,CAAC,CAAC,EAA6B;EACnH,IAAMC,UAAU,GAAG;IACfL,SAAS,EAAEZ,4BAA4B,CAAC,CAAC,EAAE,EAAE,CAAC;IAC9Ca,QAAQ,EAAEb,4BAA4B,CAAC,CAAC,EAAE,EAAE,CAAC;IAC7CqF,IAAI,EAAE;MACF1E,GAAG,EAAExB,YAAY,CAAC,EAAE,EAAE,EAAE;IAC5B;EACJ,CAAC;EACD,OAAO+B,MAAM,CAACC,MAAM,CAChBF,UAAU,EACVD,OACJ,CAAC;AACL","ignoreList":[]} \ No newline at end of file diff --git a/dist/esm/plugins/test-utils/schemas.js b/dist/esm/plugins/test-utils/schemas.js index 27d20a72786..1f12ad1a7a8 100644 --- a/dist/esm/plugins/test-utils/schemas.js +++ b/dist/esm/plugins/test-utils/schemas.js @@ -894,7 +894,7 @@ export function averageSchema() { } } }, - required: ['id'], + required: ['id', 'var1', 'var2'], indexes: ['var1', 'var2', 'deep.deep1', // one compound index ['var2', 'var1']], diff --git a/dist/esm/plugins/test-utils/schemas.js.map b/dist/esm/plugins/test-utils/schemas.js.map index 80774b60d05..deb9ee3e7eb 100644 --- a/dist/esm/plugins/test-utils/schemas.js.map +++ b/dist/esm/plugins/test-utils/schemas.js.map @@ -1 +1 @@ -{"version":3,"file":"schemas.js","names":["AsyncTestUtil","overwritable","toTypedRxJsonSchema","flatClone","humanSchemaLiteral","deepFreezeWhenDevMode","title","description","version","keyCompression","primaryKey","type","properties","passportId","maxLength","firstName","lastName","age","minimum","maximum","multipleOf","required","indexes","humanSchemaTyped","human","humanDefault","default","humanFinal","final","simpleHuman","oneOptional","simpleHumanV3","humanAgeIndex","humanSubIndex","other","humanWithAllIndex","nestedHuman","mainSkill","name","level","additionalProperties","deepNestedHuman","attack","good","count","noIndexHuman","noStringIndex","bigHuman","dnaHash","encryptedHuman","secret","encrypted","encryptedObjectHuman","subname","encryptedDeepHuman","firstLevelPassword","secretData","pw","deepSecret","darkhole","nestedSecret","notExistingIndex","address","street","compoundIndex","passportCountry","compoundIndexNoString","empty","id","heroArray","skills","maxItems","uniqueItems","items","damage","simpleArrayHero","primaryHumanLiteral","minLength","primaryHumanTypedSchema","primaryHuman","humanNormalizeSchema1Literal","humanNormalizeSchema1Typed","humanNormalizeSchema1","humanNormalizeSchema2","refHuman","bestFriend","ref","humanCompositePrimary","key","fields","separator","info","humanCompositePrimarySchemaLiteral","readonlyProps","allOf","anyOf","oneOf","dependencies","someDep","enum","humanCompositePrimarySchemaTyped","refHumanNested","foo","averageSchema","ret","randomString","var1","var2","deep","deep1","deep2","list","sharding","shards","mode","point","x","y","humanMinimal","humanMinimalBroken","broken","humanWithTimestamp","updatedAt","deletedAt","humanWithTimestampNested","suite","city","zipcode","geo","lat","lng","humanWithTimestampAllIndex","humanWithSimpleAndCompoundIndexes","createdAt","humanWithDeepNestedIndexes","job","manager","fullName","previousJobs","humanIdAndAgeIndex","enableKeyCompression","schema"],"sources":["../../../../src/plugins/test-utils/schemas.ts"],"sourcesContent":["import AsyncTestUtil from 'async-test-util';\n\nimport {\n SimpleHumanV3DocumentType,\n HumanWithSubOtherDocumentType,\n NestedHumanDocumentType,\n DeepNestedHumanDocumentType,\n EncryptedHumanDocumentType,\n EncryptedObjectHumanDocumentType,\n EncryptedDeepHumanDocumentType,\n CompoundIndexDocumentType,\n CompoundIndexNoStringDocumentType,\n HeroArrayDocumentType,\n SimpleHeroArrayDocumentType,\n RefHumanDocumentType,\n RefHumanNestedDocumentType,\n AverageSchemaDocumentType,\n PointDocumentType,\n HumanWithTimestampDocumentType,\n BigHumanDocumentType,\n NostringIndexDocumentType,\n NoIndexHumanDocumentType,\n HumanWithCompositePrimary,\n HumanWithTimestampNestedDocumentType\n} from './schema-objects.ts';\nimport { overwritable } from '../../overwritable.ts';\nimport { toTypedRxJsonSchema } from '../../rx-schema.ts';\nimport type {\n ExtractDocumentTypeFromTypedRxJsonSchema,\n RxJsonSchema\n} from '../../types/rx-schema';\nimport { flatClone } from '../utils/index.ts';\n\n\nexport const humanSchemaLiteral = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string',\n maxLength: 100\n },\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: ['firstName', 'lastName', 'passportId'],\n indexes: ['firstName']\n} as const);\nconst humanSchemaTyped = toTypedRxJsonSchema(humanSchemaLiteral);\nexport type HumanDocumentType = ExtractDocumentTypeFromTypedRxJsonSchema;\nexport const human: RxJsonSchema = humanSchemaLiteral;\n\n\nexport const humanDefault: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n description: 'describes a human being',\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string',\n maxLength: 100\n },\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n default: 20\n }\n },\n indexes: [],\n required: ['passportId']\n});\n\nexport const humanFinal: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema with age set final',\n version: 0,\n keyCompression: false,\n type: 'object',\n primaryKey: 'passportId',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n },\n lastName: {\n type: 'string'\n },\n age: {\n type: 'integer',\n minimum: 0,\n maximum: 150,\n final: true\n }\n },\n required: [\n 'passportId'\n ]\n});\n\nexport const simpleHuman: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n keyCompression: false,\n description: 'describes a simple human being',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'string',\n maxLength: 100\n },\n oneOptional: {\n type: 'string'\n }\n },\n indexes: ['age'],\n required: ['passportId', 'age']\n});\n\nexport const simpleHumanV3: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 3,\n keyCompression: false,\n description: 'describes a simple human being',\n type: 'object',\n primaryKey: 'passportId',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'number',\n minimum: 0,\n maximum: 1000,\n multipleOf: 1\n },\n oneOptional: {\n type: 'string'\n }\n },\n indexes: ['age'],\n required: ['passportId', 'age']\n});\n\nexport const humanAgeIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n keyCompression: false,\n description: 'describes a human being',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n },\n lastName: {\n type: 'string'\n },\n age: {\n description: 'Age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: ['firstName', 'lastName', 'age'],\n indexes: ['age']\n});\n\nexport const humanSubIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n description: 'describes a human being where other.age is index',\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n other: {\n type: 'object',\n properties: {\n age: {\n description: 'Age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n }\n }\n },\n required: [\n 'passportId'\n ],\n indexes: ['other.age']\n});\n\n/**\n * each field is an index,\n * use this to slow down inserts in tests\n */\nexport const humanWithAllIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string',\n maxLength: 100\n },\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n indexes: ['firstName', 'lastName', 'age'],\n required: ['firstName', 'lastName']\n});\n\nexport const nestedHuman: RxJsonSchema = {\n title: 'human nested',\n version: 0,\n description: 'describes a human being with a nested field',\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n mainSkill: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 10\n },\n level: {\n type: 'number',\n minimum: 0,\n maximum: 10,\n multipleOf: 1\n }\n },\n required: ['name', 'level'],\n additionalProperties: false\n }\n },\n required: ['firstName'],\n indexes: []\n};\n\nexport const deepNestedHuman: RxJsonSchema = {\n title: 'deep human nested',\n version: 0,\n keyCompression: false,\n description: 'describes a human being with a nested field',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n mainSkill: {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n },\n attack: {\n type: 'object',\n properties: {\n good: {\n type: 'boolean'\n },\n count: {\n type: 'number'\n }\n }\n }\n },\n required: ['name']\n }\n },\n indexes: [],\n required: ['mainSkill']\n};\n\nexport const noIndexHuman: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n description: 'this schema has no index',\n keyCompression: false,\n primaryKey: 'firstName',\n type: 'object',\n properties: {\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string'\n }\n },\n required: ['lastName']\n});\n\nexport const noStringIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n description: 'the index has no type:string',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'object',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n }\n },\n required: ['firstName', 'passportId'],\n indexes: []\n});\n\n\nexport const bigHuman: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n description: 'describes a human being with 2 indexes',\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n dnaHash: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string'\n },\n age: {\n description: 'Age in years',\n type: 'integer',\n minimum: 0\n }\n },\n required: ['firstName', 'lastName'],\n indexes: ['firstName', 'dnaHash']\n});\n\nexport const encryptedHuman: RxJsonSchema = {\n title: 'human encrypted',\n version: 0,\n description: 'uses an encrypted field',\n primaryKey: 'passportId',\n type: 'object',\n keyCompression: false,\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n },\n secret: {\n type: 'string'\n }\n },\n indexes: [],\n required: ['firstName', 'secret'],\n encrypted: ['secret']\n};\n\nexport const encryptedObjectHuman: RxJsonSchema = {\n title: 'human encrypted',\n version: 0,\n keyCompression: false,\n description: 'uses an encrypted field',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n },\n secret: {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n },\n subname: {\n type: 'string'\n }\n }\n }\n },\n indexes: [],\n required: ['firstName', 'secret'],\n encrypted: ['secret']\n};\n\nexport const encryptedDeepHuman: RxJsonSchema = {\n title: 'human encrypted',\n version: 0,\n keyCompression: false,\n description: 'uses an encrypted field',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n },\n firstLevelPassword: {\n type: 'string',\n },\n secretData: {\n type: 'object',\n properties: {\n pw: {\n type: 'string'\n }\n }\n },\n deepSecret: {\n type: 'object',\n properties: {\n darkhole: {\n type: 'object',\n properties: {\n pw: {\n type: 'string'\n }\n }\n }\n }\n },\n nestedSecret: {\n type: 'object',\n properties: {\n darkhole: {\n type: 'object',\n properties: {\n pw: {\n type: 'string'\n }\n }\n }\n }\n }\n\n },\n indexes: [],\n required: ['firstName', 'secretData'],\n encrypted: [\n 'firstLevelPassword',\n 'secretData',\n 'deepSecret.darkhole.pw',\n 'nestedSecret.darkhole.pw'\n ]\n};\n\nexport const notExistingIndex: RxJsonSchema<{ passportId: string; address: { street: string; }; }> = {\n title: 'index',\n version: 0,\n description: 'this schema has a specified index which does not exists',\n primaryKey: 'passportId',\n type: 'object',\n keyCompression: false,\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n address: {\n type: 'object',\n properties: {\n street: { type: 'string' }\n }\n }\n },\n required: [\n 'passportId'\n ],\n indexes: ['address.apartment']\n};\n\nexport const compoundIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'compound index',\n version: 0,\n description: 'this schema has a compoundIndex',\n primaryKey: 'passportId',\n type: 'object',\n keyCompression: false,\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n passportCountry: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: [\n 'passportId'\n ],\n indexes: [\n ['age', 'passportCountry']\n ]\n});\n\nexport const compoundIndexNoString: RxJsonSchema = {\n title: 'compound index',\n version: 0,\n description: 'this schema has a compoundIndex',\n primaryKey: 'passportId',\n keyCompression: false,\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n passportCountry: {\n type: 'object'\n },\n age: {\n type: 'integer'\n }\n },\n indexes: [\n [10, 'passportCountry']\n ]\n} as RxJsonSchema;\n\nexport const empty: RxJsonSchema = {\n title: 'empty schema',\n version: 0,\n type: 'object',\n primaryKey: 'id',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n }\n },\n required: ['id']\n};\n\nexport const heroArray: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'hero schema',\n version: 0,\n keyCompression: false,\n description: 'describes a hero with an array-field',\n primaryKey: 'name',\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n },\n skills: {\n type: 'array',\n maxItems: 5,\n uniqueItems: true,\n items: {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n },\n damage: {\n type: 'number'\n }\n }\n }\n }\n },\n required: [\n 'name'\n ]\n});\n\nexport const simpleArrayHero: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'hero schema',\n version: 0,\n description: 'describes a hero with a string-array-field',\n keyCompression: false,\n primaryKey: 'name',\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n },\n skills: {\n type: 'array',\n maxItems: 5,\n uniqueItems: true,\n items: {\n type: 'string',\n }\n }\n },\n required: [\n 'name'\n ]\n});\n\nexport const primaryHumanLiteral = overwritable.deepFreezeWhenDevMode({\n title: 'human schema with primary',\n version: 0,\n description: 'describes a human being with passportID as primary',\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n minLength: 4,\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string',\n maxLength: 500\n },\n age: {\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: ['passportId', 'firstName', 'lastName']\n} as const);\nconst primaryHumanTypedSchema = toTypedRxJsonSchema(primaryHumanLiteral);\nexport type PrimaryHumanDocType = ExtractDocumentTypeFromTypedRxJsonSchema;\nexport const primaryHuman: RxJsonSchema = primaryHumanLiteral;\n\nexport const humanNormalizeSchema1Literal = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n keyCompression: false,\n description: 'describes a human being',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n minLength: 4,\n maxLength: 100\n },\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: ['age', 'passportId']\n} as const);\nconst humanNormalizeSchema1Typed = toTypedRxJsonSchema(humanNormalizeSchema1Literal);\nexport type AgeHumanDocumentType = ExtractDocumentTypeFromTypedRxJsonSchema;\nexport const humanNormalizeSchema1: RxJsonSchema = humanNormalizeSchema1Literal;\n\nexport const humanNormalizeSchema2: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n minLength: 4,\n maxLength: 100\n },\n age: {\n minimum: 0,\n type: 'integer',\n description: 'age in years',\n maximum: 150,\n multipleOf: 1\n }\n },\n description: 'describes a human being',\n required: ['age', 'passportId']\n});\n\nexport const refHuman: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human related to other human',\n version: 0,\n keyCompression: false,\n primaryKey: 'name',\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n },\n bestFriend: {\n ref: 'human',\n type: 'string'\n }\n },\n required: [\n 'name'\n ]\n});\n\nexport const humanCompositePrimary: RxJsonSchema = {\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: {\n key: 'id',\n fields: [\n 'firstName',\n 'info.age'\n ],\n separator: '|'\n },\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string'\n },\n info: {\n type: 'object',\n properties: {\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150\n }\n },\n required: ['age']\n }\n },\n required: [\n 'id',\n 'firstName',\n 'lastName',\n 'info'\n ],\n indexes: ['firstName']\n};\n\nexport const humanCompositePrimarySchemaLiteral = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: {\n key: 'id',\n fields: [\n 'firstName',\n 'info.age'\n ],\n separator: '|'\n },\n encrypted: [],\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string'\n },\n info: {\n type: 'object',\n properties: {\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150\n }\n },\n required: ['age']\n },\n readonlyProps: {\n allOf: [],\n anyOf: [],\n oneOf: [],\n type: [],\n dependencies: {\n someDep: ['asd'],\n },\n items: [],\n required: [],\n enum: [],\n }\n },\n required: [\n 'id',\n 'firstName',\n 'lastName',\n 'info'\n ],\n indexes: ['firstName']\n} as const);\n\nconst humanCompositePrimarySchemaTyped = toTypedRxJsonSchema(humanCompositePrimarySchemaLiteral);\nexport type HumanCompositePrimaryDocType = ExtractDocumentTypeFromTypedRxJsonSchema;\n\nexport const refHumanNested: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human related to other human',\n version: 0,\n keyCompression: false,\n primaryKey: 'name',\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n },\n foo: {\n type: 'object',\n properties: {\n bestFriend: {\n ref: 'human',\n type: 'string'\n }\n }\n }\n },\n required: [\n 'name'\n ]\n});\n\n/**\n * an average schema used in performance-tests\n */\nexport function averageSchema(): RxJsonSchema {\n const ret: RxJsonSchema = {\n title: 'averageSchema_' + AsyncTestUtil.randomString(5), // randomisation used so hash differs\n version: 0,\n primaryKey: 'id',\n type: 'object',\n keyCompression: false,\n properties: {\n id: {\n description: 'id',\n type: 'string',\n maxLength: 12\n },\n var1: {\n description: 'var1',\n type: 'string',\n maxLength: 12\n },\n var2: {\n description: 'var2',\n type: 'number',\n minimum: 0,\n maximum: 50000,\n multipleOf: 1\n },\n deep: {\n type: 'object',\n properties: {\n deep1: {\n type: 'string',\n maxLength: 10\n },\n deep2: {\n type: 'string',\n maxLength: 10\n }\n }\n },\n list: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n deep1: {\n type: 'string'\n },\n deep2: {\n type: 'string'\n }\n }\n }\n }\n },\n required: [\n 'id'\n ],\n indexes: [\n 'var1',\n 'var2',\n 'deep.deep1',\n // one compound index\n [\n 'var2',\n 'var1'\n ]\n ],\n sharding: {\n shards: 6,\n mode: 'collection'\n }\n };\n return ret;\n}\n\nexport const point: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'point schema',\n version: 0,\n description: 'describes coordinates in 2d space',\n primaryKey: 'id',\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n x: {\n type: 'number'\n },\n y: {\n type: 'number'\n }\n },\n required: ['x', 'y']\n});\n\nexport const humanMinimal: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'integer'\n },\n oneOptional: {\n type: 'string'\n }\n },\n indexes: [],\n required: ['passportId', 'age']\n});\n\nexport const humanMinimalBroken: RxJsonSchema<{ passportId: string; broken: number; }> = {\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n broken: {\n type: 'integer'\n }\n },\n indexes: [],\n required: ['passportId', 'broken']\n} as unknown as RxJsonSchema;\n\n\n/**\n * used in the graphql-test\n * contains timestamp\n */\nexport const humanWithTimestamp: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n version: 0,\n type: 'object',\n primaryKey: 'id',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string',\n maxLength: 1000\n },\n age: {\n type: 'number'\n },\n updatedAt: {\n type: 'number',\n minimum: 0,\n maximum: 10000000000000000,\n multipleOf: 1\n\n },\n deletedAt: {\n type: 'number'\n }\n },\n indexes: ['updatedAt'],\n required: ['id', 'name', 'age', 'updatedAt']\n});\n\nexport const humanWithTimestampNested: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n version: 0,\n type: 'object',\n primaryKey: 'id',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string',\n maxLength: 1000\n },\n age: {\n type: 'number'\n },\n updatedAt: {\n type: 'number',\n minimum: 0,\n maximum: 10000000000000000,\n multipleOf: 1\n\n },\n deletedAt: {\n type: 'number'\n },\n address: {\n type: 'object',\n properties: {\n street: {\n type: 'string',\n },\n suite: {\n type: 'string',\n },\n city: {\n type: 'string',\n },\n zipcode: {\n type: 'string',\n },\n geo: {\n type: 'object',\n properties: {\n lat: {\n type: 'string',\n },\n lng: {\n type: 'string',\n },\n },\n },\n },\n },\n },\n indexes: ['updatedAt'],\n required: ['id', 'name', 'age', 'updatedAt']\n});\n\n\n/**\n * each field is an index,\n * use this to slow down inserts in tests\n */\nexport const humanWithTimestampAllIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n version: 0,\n type: 'object',\n primaryKey: 'id',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'number',\n minimum: 0,\n maximum: 1500,\n multipleOf: 1\n },\n updatedAt: {\n type: 'number',\n minimum: 0,\n maximum: 10000000000000000,\n multipleOf: 1\n },\n deletedAt: {\n type: 'number'\n }\n },\n indexes: ['name', 'age', 'updatedAt'],\n required: ['id', 'name', 'age', 'updatedAt']\n});\n\nexport const humanWithSimpleAndCompoundIndexes: RxJsonSchema<{\n id: string;\n name: string;\n age: number;\n createdAt: number;\n updatedAt: number;\n}> = overwritable.deepFreezeWhenDevMode({\n version: 0,\n primaryKey: 'id',\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'number',\n minimum: 0,\n maximum: 1500,\n multipleOf: 1\n },\n createdAt: {\n type: 'number',\n minimum: 0,\n maximum: 10000000000000000,\n multipleOf: 1\n },\n updatedAt: {\n type: 'number',\n minimum: 0,\n maximum: 10000000000000000,\n multipleOf: 1\n }\n },\n indexes: [\n ['name', 'id'],\n ['age', 'id'],\n ['createdAt', 'updatedAt', 'id']\n ],\n required: ['id', 'name', 'age', 'updatedAt']\n});\n\nexport const humanWithDeepNestedIndexes: RxJsonSchema<{ id: string; name: string; job: any; }> = overwritable.deepFreezeWhenDevMode({\n version: 0,\n primaryKey: 'id',\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string',\n maxLength: 100\n },\n job: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n },\n manager: {\n type: 'object',\n properties: {\n fullName: {\n type: 'string',\n maxLength: 100\n },\n previousJobs: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n }\n }\n }\n }\n }\n }\n }\n }\n },\n required: [\n 'id'\n ],\n indexes: [\n 'name',\n 'job.name',\n 'job.manager.fullName'\n ]\n});\n\nexport const humanIdAndAgeIndex: RxJsonSchema<{ id: string; name: string; age: number; }> = overwritable.deepFreezeWhenDevMode({\n version: 0,\n description: 'uses a compound index with id as lowest level',\n primaryKey: 'id',\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string'\n },\n age: {\n description: 'Age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: ['id', 'name', 'age'],\n indexes: [\n ['age', 'id']\n ]\n});\n\n\nexport function enableKeyCompression(\n schema: RxJsonSchema\n): RxJsonSchema {\n const ret = flatClone(schema);\n ret.keyCompression = true;\n return ret;\n}\n"],"mappings":"AAAA,OAAOA,aAAa,MAAM,iBAAiB;AAyB3C,SAASC,YAAY,QAAQ,uBAAuB;AACpD,SAASC,mBAAmB,QAAQ,oBAAoB;AAKxD,SAASC,SAAS,QAAQ,mBAAmB;AAG7C,OAAO,IAAMC,kBAAkB,GAAGH,YAAY,CAACI,qBAAqB,CAAC;EACjEC,KAAK,EAAE,cAAc;EACrBC,WAAW,EAAE,yBAAyB;EACtCC,OAAO,EAAE,CAAC;EACVC,cAAc,EAAE,KAAK;EACrBC,UAAU,EAAE,YAAY;EACxBC,IAAI,EAAE,QAAQ;EACdC,UAAU,EAAE;IACRC,UAAU,EAAE;MACRF,IAAI,EAAE,QAAQ;MACdG,SAAS,EAAE;IACf,CAAC;IACDC,SAAS,EAAE;MACPJ,IAAI,EAAE,QAAQ;MACdG,SAAS,EAAE;IACf,CAAC;IACDE,QAAQ,EAAE;MACNL,IAAI,EAAE,QAAQ;MACdG,SAAS,EAAE;IACf,CAAC;IACDG,GAAG,EAAE;MACDV,WAAW,EAAE,cAAc;MAC3BI,IAAI,EAAE,SAAS;MACfO,OAAO,EAAE,CAAC;MACVC,OAAO,EAAE,GAAG;MACZC,UAAU,EAAE;IAChB;EACJ,CAAC;EACDC,QAAQ,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,YAAY,CAAC;EACjDC,OAAO,EAAE,CAAC,WAAW;AACzB,CAAU,CAAC;AACX,IAAMC,gBAAgB,GAAGrB,mBAAmB,CAACE,kBAAkB,CAAC;AAEhE,OAAO,IAAMoB,KAAsC,GAAGpB,kBAAkB;AAGxE,OAAO,IAAM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E,CACL,MAAM,EACN,UAAU,EACV,sBAAsB;AAE9B,CAAC,CAAC;AAEF,OAAO,IAAMqH,kBAA4E,GAAG1I,YAAY,CAACI,qBAAqB,CAAC;EAC3HG,OAAO,EAAE,CAAC;EACVD,WAAW,EAAE,+CAA+C;EAC5DG,UAAU,EAAE,IAAI;EAChBC,IAAI,EAAE,QAAQ;EACdC,UAAU,EAAE;IACRwD,EAAE,EAAE;MACAzD,IAAI,EAAE,QAAQ;MACdG,SAAS,EAAE;IACf,CAAC;IACDwB,IAAI,EAAE;MACF3B,IAAI,EAAE;IACV,CAAC;IACDM,GAAG,EAAE;MACDV,WAAW,EAAE,cAAc;MAC3BI,IAAI,EAAE,SAAS;MACfO,OAAO,EAAE,CAAC;MACVC,OAAO,EAAE,GAAG;MACZC,UAAU,EAAE;IAChB;EACJ,CAAC;EACDC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC;EAC/BC,OAAO,EAAE,CACL,CAAC,KAAK,EAAE,IAAI,CAAC;AAErB,CAAC,CAAC;AAGF,OAAO,SAASsH,oBAAoBA,CAChCC,MAA+B,EACR;EACvB,IAAMrC,GAAG,GAAGrG,SAAS,CAAC0I,MAAM,CAAC;EAC7BrC,GAAG,CAAC/F,cAAc,GAAG,IAAI;EACzB,OAAO+F,GAAG;AACd","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"schemas.js","names":["AsyncTestUtil","overwritable","toTypedRxJsonSchema","flatClone","humanSchemaLiteral","deepFreezeWhenDevMode","title","description","version","keyCompression","primaryKey","type","properties","passportId","maxLength","firstName","lastName","age","minimum","maximum","multipleOf","required","indexes","humanSchemaTyped","human","humanDefault","default","humanFinal","final","simpleHuman","oneOptional","simpleHumanV3","humanAgeIndex","humanSubIndex","other","humanWithAllIndex","nestedHuman","mainSkill","name","level","additionalProperties","deepNestedHuman","attack","good","count","noIndexHuman","noStringIndex","bigHuman","dnaHash","encryptedHuman","secret","encrypted","encryptedObjectHuman","subname","encryptedDeepHuman","firstLevelPassword","secretData","pw","deepSecret","darkhole","nestedSecret","notExistingIndex","address","street","compoundIndex","passportCountry","compoundIndexNoString","empty","id","heroArray","skills","maxItems","uniqueItems","items","damage","simpleArrayHero","primaryHumanLiteral","minLength","primaryHumanTypedSchema","primaryHuman","humanNormalizeSchema1Literal","humanNormalizeSchema1Typed","humanNormalizeSchema1","humanNormalizeSchema2","refHuman","bestFriend","ref","humanCompositePrimary","key","fields","separator","info","humanCompositePrimarySchemaLiteral","readonlyProps","allOf","anyOf","oneOf","dependencies","someDep","enum","humanCompositePrimarySchemaTyped","refHumanNested","foo","averageSchema","ret","randomString","var1","var2","deep","deep1","deep2","list","sharding","shards","mode","point","x","y","humanMinimal","humanMinimalBroken","broken","humanWithTimestamp","updatedAt","deletedAt","humanWithTimestampNested","suite","city","zipcode","geo","lat","lng","humanWithTimestampAllIndex","humanWithSimpleAndCompoundIndexes","createdAt","humanWithDeepNestedIndexes","job","manager","fullName","previousJobs","humanIdAndAgeIndex","enableKeyCompression","schema"],"sources":["../../../../src/plugins/test-utils/schemas.ts"],"sourcesContent":["import AsyncTestUtil from 'async-test-util';\n\nimport {\n SimpleHumanV3DocumentType,\n HumanWithSubOtherDocumentType,\n NestedHumanDocumentType,\n DeepNestedHumanDocumentType,\n EncryptedHumanDocumentType,\n EncryptedObjectHumanDocumentType,\n EncryptedDeepHumanDocumentType,\n CompoundIndexDocumentType,\n CompoundIndexNoStringDocumentType,\n HeroArrayDocumentType,\n SimpleHeroArrayDocumentType,\n RefHumanDocumentType,\n RefHumanNestedDocumentType,\n AverageSchemaDocumentType,\n PointDocumentType,\n HumanWithTimestampDocumentType,\n BigHumanDocumentType,\n NostringIndexDocumentType,\n NoIndexHumanDocumentType,\n HumanWithCompositePrimary,\n HumanWithTimestampNestedDocumentType\n} from './schema-objects.ts';\nimport { overwritable } from '../../overwritable.ts';\nimport { toTypedRxJsonSchema } from '../../rx-schema.ts';\nimport type {\n ExtractDocumentTypeFromTypedRxJsonSchema,\n RxJsonSchema\n} from '../../types/rx-schema';\nimport { flatClone } from '../utils/index.ts';\n\n\nexport const humanSchemaLiteral = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string',\n maxLength: 100\n },\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: ['firstName', 'lastName', 'passportId'],\n indexes: ['firstName']\n} as const);\nconst humanSchemaTyped = toTypedRxJsonSchema(humanSchemaLiteral);\nexport type HumanDocumentType = ExtractDocumentTypeFromTypedRxJsonSchema;\nexport const human: RxJsonSchema = humanSchemaLiteral;\n\n\nexport const humanDefault: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n description: 'describes a human being',\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string',\n maxLength: 100\n },\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n default: 20\n }\n },\n indexes: [],\n required: ['passportId']\n});\n\nexport const humanFinal: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema with age set final',\n version: 0,\n keyCompression: false,\n type: 'object',\n primaryKey: 'passportId',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n },\n lastName: {\n type: 'string'\n },\n age: {\n type: 'integer',\n minimum: 0,\n maximum: 150,\n final: true\n }\n },\n required: [\n 'passportId'\n ]\n});\n\nexport const simpleHuman: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n keyCompression: false,\n description: 'describes a simple human being',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'string',\n maxLength: 100\n },\n oneOptional: {\n type: 'string'\n }\n },\n indexes: ['age'],\n required: ['passportId', 'age']\n});\n\nexport const simpleHumanV3: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 3,\n keyCompression: false,\n description: 'describes a simple human being',\n type: 'object',\n primaryKey: 'passportId',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'number',\n minimum: 0,\n maximum: 1000,\n multipleOf: 1\n },\n oneOptional: {\n type: 'string'\n }\n },\n indexes: ['age'],\n required: ['passportId', 'age']\n});\n\nexport const humanAgeIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n keyCompression: false,\n description: 'describes a human being',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n },\n lastName: {\n type: 'string'\n },\n age: {\n description: 'Age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: ['firstName', 'lastName', 'age'],\n indexes: ['age']\n});\n\nexport const humanSubIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n description: 'describes a human being where other.age is index',\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n other: {\n type: 'object',\n properties: {\n age: {\n description: 'Age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n }\n }\n },\n required: [\n 'passportId'\n ],\n indexes: ['other.age']\n});\n\n/**\n * each field is an index,\n * use this to slow down inserts in tests\n */\nexport const humanWithAllIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string',\n maxLength: 100\n },\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n indexes: ['firstName', 'lastName', 'age'],\n required: ['firstName', 'lastName']\n});\n\nexport const nestedHuman: RxJsonSchema = {\n title: 'human nested',\n version: 0,\n description: 'describes a human being with a nested field',\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n mainSkill: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 10\n },\n level: {\n type: 'number',\n minimum: 0,\n maximum: 10,\n multipleOf: 1\n }\n },\n required: ['name', 'level'],\n additionalProperties: false\n }\n },\n required: ['firstName'],\n indexes: []\n};\n\nexport const deepNestedHuman: RxJsonSchema = {\n title: 'deep human nested',\n version: 0,\n keyCompression: false,\n description: 'describes a human being with a nested field',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n mainSkill: {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n },\n attack: {\n type: 'object',\n properties: {\n good: {\n type: 'boolean'\n },\n count: {\n type: 'number'\n }\n }\n }\n },\n required: ['name']\n }\n },\n indexes: [],\n required: ['mainSkill']\n};\n\nexport const noIndexHuman: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n description: 'this schema has no index',\n keyCompression: false,\n primaryKey: 'firstName',\n type: 'object',\n properties: {\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string'\n }\n },\n required: ['lastName']\n});\n\nexport const noStringIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n description: 'the index has no type:string',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'object',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n }\n },\n required: ['firstName', 'passportId'],\n indexes: []\n});\n\n\nexport const bigHuman: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n description: 'describes a human being with 2 indexes',\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n dnaHash: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string'\n },\n age: {\n description: 'Age in years',\n type: 'integer',\n minimum: 0\n }\n },\n required: ['firstName', 'lastName'],\n indexes: ['firstName', 'dnaHash']\n});\n\nexport const encryptedHuman: RxJsonSchema = {\n title: 'human encrypted',\n version: 0,\n description: 'uses an encrypted field',\n primaryKey: 'passportId',\n type: 'object',\n keyCompression: false,\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n },\n secret: {\n type: 'string'\n }\n },\n indexes: [],\n required: ['firstName', 'secret'],\n encrypted: ['secret']\n};\n\nexport const encryptedObjectHuman: RxJsonSchema = {\n title: 'human encrypted',\n version: 0,\n keyCompression: false,\n description: 'uses an encrypted field',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n },\n secret: {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n },\n subname: {\n type: 'string'\n }\n }\n }\n },\n indexes: [],\n required: ['firstName', 'secret'],\n encrypted: ['secret']\n};\n\nexport const encryptedDeepHuman: RxJsonSchema = {\n title: 'human encrypted',\n version: 0,\n keyCompression: false,\n description: 'uses an encrypted field',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string'\n },\n firstLevelPassword: {\n type: 'string',\n },\n secretData: {\n type: 'object',\n properties: {\n pw: {\n type: 'string'\n }\n }\n },\n deepSecret: {\n type: 'object',\n properties: {\n darkhole: {\n type: 'object',\n properties: {\n pw: {\n type: 'string'\n }\n }\n }\n }\n },\n nestedSecret: {\n type: 'object',\n properties: {\n darkhole: {\n type: 'object',\n properties: {\n pw: {\n type: 'string'\n }\n }\n }\n }\n }\n\n },\n indexes: [],\n required: ['firstName', 'secretData'],\n encrypted: [\n 'firstLevelPassword',\n 'secretData',\n 'deepSecret.darkhole.pw',\n 'nestedSecret.darkhole.pw'\n ]\n};\n\nexport const notExistingIndex: RxJsonSchema<{ passportId: string; address: { street: string; }; }> = {\n title: 'index',\n version: 0,\n description: 'this schema has a specified index which does not exists',\n primaryKey: 'passportId',\n type: 'object',\n keyCompression: false,\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n address: {\n type: 'object',\n properties: {\n street: { type: 'string' }\n }\n }\n },\n required: [\n 'passportId'\n ],\n indexes: ['address.apartment']\n};\n\nexport const compoundIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'compound index',\n version: 0,\n description: 'this schema has a compoundIndex',\n primaryKey: 'passportId',\n type: 'object',\n keyCompression: false,\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n passportCountry: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: [\n 'passportId'\n ],\n indexes: [\n ['age', 'passportCountry']\n ]\n});\n\nexport const compoundIndexNoString: RxJsonSchema = {\n title: 'compound index',\n version: 0,\n description: 'this schema has a compoundIndex',\n primaryKey: 'passportId',\n keyCompression: false,\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n passportCountry: {\n type: 'object'\n },\n age: {\n type: 'integer'\n }\n },\n indexes: [\n [10, 'passportCountry']\n ]\n} as RxJsonSchema;\n\nexport const empty: RxJsonSchema = {\n title: 'empty schema',\n version: 0,\n type: 'object',\n primaryKey: 'id',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n }\n },\n required: ['id']\n};\n\nexport const heroArray: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'hero schema',\n version: 0,\n keyCompression: false,\n description: 'describes a hero with an array-field',\n primaryKey: 'name',\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n },\n skills: {\n type: 'array',\n maxItems: 5,\n uniqueItems: true,\n items: {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n },\n damage: {\n type: 'number'\n }\n }\n }\n }\n },\n required: [\n 'name'\n ]\n});\n\nexport const simpleArrayHero: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'hero schema',\n version: 0,\n description: 'describes a hero with a string-array-field',\n keyCompression: false,\n primaryKey: 'name',\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n },\n skills: {\n type: 'array',\n maxItems: 5,\n uniqueItems: true,\n items: {\n type: 'string',\n }\n }\n },\n required: [\n 'name'\n ]\n});\n\nexport const primaryHumanLiteral = overwritable.deepFreezeWhenDevMode({\n title: 'human schema with primary',\n version: 0,\n description: 'describes a human being with passportID as primary',\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n minLength: 4,\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string',\n maxLength: 500\n },\n age: {\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: ['passportId', 'firstName', 'lastName']\n} as const);\nconst primaryHumanTypedSchema = toTypedRxJsonSchema(primaryHumanLiteral);\nexport type PrimaryHumanDocType = ExtractDocumentTypeFromTypedRxJsonSchema;\nexport const primaryHuman: RxJsonSchema = primaryHumanLiteral;\n\nexport const humanNormalizeSchema1Literal = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n keyCompression: false,\n description: 'describes a human being',\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n minLength: 4,\n maxLength: 100\n },\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: ['age', 'passportId']\n} as const);\nconst humanNormalizeSchema1Typed = toTypedRxJsonSchema(humanNormalizeSchema1Literal);\nexport type AgeHumanDocumentType = ExtractDocumentTypeFromTypedRxJsonSchema;\nexport const humanNormalizeSchema1: RxJsonSchema = humanNormalizeSchema1Literal;\n\nexport const humanNormalizeSchema2: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n minLength: 4,\n maxLength: 100\n },\n age: {\n minimum: 0,\n type: 'integer',\n description: 'age in years',\n maximum: 150,\n multipleOf: 1\n }\n },\n description: 'describes a human being',\n required: ['age', 'passportId']\n});\n\nexport const refHuman: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human related to other human',\n version: 0,\n keyCompression: false,\n primaryKey: 'name',\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n },\n bestFriend: {\n ref: 'human',\n type: 'string'\n }\n },\n required: [\n 'name'\n ]\n});\n\nexport const humanCompositePrimary: RxJsonSchema = {\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: {\n key: 'id',\n fields: [\n 'firstName',\n 'info.age'\n ],\n separator: '|'\n },\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string'\n },\n info: {\n type: 'object',\n properties: {\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150\n }\n },\n required: ['age']\n }\n },\n required: [\n 'id',\n 'firstName',\n 'lastName',\n 'info'\n ],\n indexes: ['firstName']\n};\n\nexport const humanCompositePrimarySchemaLiteral = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: {\n key: 'id',\n fields: [\n 'firstName',\n 'info.age'\n ],\n separator: '|'\n },\n encrypted: [],\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n firstName: {\n type: 'string',\n maxLength: 100\n },\n lastName: {\n type: 'string'\n },\n info: {\n type: 'object',\n properties: {\n age: {\n description: 'age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150\n }\n },\n required: ['age']\n },\n readonlyProps: {\n allOf: [],\n anyOf: [],\n oneOf: [],\n type: [],\n dependencies: {\n someDep: ['asd'],\n },\n items: [],\n required: [],\n enum: [],\n }\n },\n required: [\n 'id',\n 'firstName',\n 'lastName',\n 'info'\n ],\n indexes: ['firstName']\n} as const);\n\nconst humanCompositePrimarySchemaTyped = toTypedRxJsonSchema(humanCompositePrimarySchemaLiteral);\nexport type HumanCompositePrimaryDocType = ExtractDocumentTypeFromTypedRxJsonSchema;\n\nexport const refHumanNested: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human related to other human',\n version: 0,\n keyCompression: false,\n primaryKey: 'name',\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n },\n foo: {\n type: 'object',\n properties: {\n bestFriend: {\n ref: 'human',\n type: 'string'\n }\n }\n }\n },\n required: [\n 'name'\n ]\n});\n\n/**\n * an average schema used in performance-tests\n */\nexport function averageSchema(): RxJsonSchema {\n const ret: RxJsonSchema = {\n title: 'averageSchema_' + AsyncTestUtil.randomString(5), // randomisation used so hash differs\n version: 0,\n primaryKey: 'id',\n type: 'object',\n keyCompression: false,\n properties: {\n id: {\n description: 'id',\n type: 'string',\n maxLength: 12\n },\n var1: {\n description: 'var1',\n type: 'string',\n maxLength: 12\n },\n var2: {\n description: 'var2',\n type: 'number',\n minimum: 0,\n maximum: 50000,\n multipleOf: 1\n },\n deep: {\n type: 'object',\n properties: {\n deep1: {\n type: 'string',\n maxLength: 10\n },\n deep2: {\n type: 'string',\n maxLength: 10\n }\n }\n },\n list: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n deep1: {\n type: 'string'\n },\n deep2: {\n type: 'string'\n }\n }\n }\n }\n },\n required: [\n 'id',\n 'var1',\n 'var2'\n ],\n indexes: [\n 'var1',\n 'var2',\n 'deep.deep1',\n // one compound index\n [\n 'var2',\n 'var1'\n ]\n ],\n sharding: {\n shards: 6,\n mode: 'collection'\n }\n };\n return ret;\n}\n\nexport const point: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'point schema',\n version: 0,\n description: 'describes coordinates in 2d space',\n primaryKey: 'id',\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n x: {\n type: 'number'\n },\n y: {\n type: 'number'\n }\n },\n required: ['x', 'y']\n});\n\nexport const humanMinimal: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'integer'\n },\n oneOptional: {\n type: 'string'\n }\n },\n indexes: [],\n required: ['passportId', 'age']\n});\n\nexport const humanMinimalBroken: RxJsonSchema<{ passportId: string; broken: number; }> = {\n title: 'human schema',\n description: 'describes a human being',\n version: 0,\n keyCompression: false,\n primaryKey: 'passportId',\n type: 'object',\n properties: {\n passportId: {\n type: 'string',\n maxLength: 100\n },\n broken: {\n type: 'integer'\n }\n },\n indexes: [],\n required: ['passportId', 'broken']\n} as unknown as RxJsonSchema;\n\n\n/**\n * used in the graphql-test\n * contains timestamp\n */\nexport const humanWithTimestamp: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n version: 0,\n type: 'object',\n primaryKey: 'id',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string',\n maxLength: 1000\n },\n age: {\n type: 'number'\n },\n updatedAt: {\n type: 'number',\n minimum: 0,\n maximum: 10000000000000000,\n multipleOf: 1\n\n },\n deletedAt: {\n type: 'number'\n }\n },\n indexes: ['updatedAt'],\n required: ['id', 'name', 'age', 'updatedAt']\n});\n\nexport const humanWithTimestampNested: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n version: 0,\n type: 'object',\n primaryKey: 'id',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string',\n maxLength: 1000\n },\n age: {\n type: 'number'\n },\n updatedAt: {\n type: 'number',\n minimum: 0,\n maximum: 10000000000000000,\n multipleOf: 1\n\n },\n deletedAt: {\n type: 'number'\n },\n address: {\n type: 'object',\n properties: {\n street: {\n type: 'string',\n },\n suite: {\n type: 'string',\n },\n city: {\n type: 'string',\n },\n zipcode: {\n type: 'string',\n },\n geo: {\n type: 'object',\n properties: {\n lat: {\n type: 'string',\n },\n lng: {\n type: 'string',\n },\n },\n },\n },\n },\n },\n indexes: ['updatedAt'],\n required: ['id', 'name', 'age', 'updatedAt']\n});\n\n\n/**\n * each field is an index,\n * use this to slow down inserts in tests\n */\nexport const humanWithTimestampAllIndex: RxJsonSchema = overwritable.deepFreezeWhenDevMode({\n version: 0,\n type: 'object',\n primaryKey: 'id',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'number',\n minimum: 0,\n maximum: 1500,\n multipleOf: 1\n },\n updatedAt: {\n type: 'number',\n minimum: 0,\n maximum: 10000000000000000,\n multipleOf: 1\n },\n deletedAt: {\n type: 'number'\n }\n },\n indexes: ['name', 'age', 'updatedAt'],\n required: ['id', 'name', 'age', 'updatedAt']\n});\n\nexport const humanWithSimpleAndCompoundIndexes: RxJsonSchema<{\n id: string;\n name: string;\n age: number;\n createdAt: number;\n updatedAt: number;\n}> = overwritable.deepFreezeWhenDevMode({\n version: 0,\n primaryKey: 'id',\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string',\n maxLength: 100\n },\n age: {\n type: 'number',\n minimum: 0,\n maximum: 1500,\n multipleOf: 1\n },\n createdAt: {\n type: 'number',\n minimum: 0,\n maximum: 10000000000000000,\n multipleOf: 1\n },\n updatedAt: {\n type: 'number',\n minimum: 0,\n maximum: 10000000000000000,\n multipleOf: 1\n }\n },\n indexes: [\n ['name', 'id'],\n ['age', 'id'],\n ['createdAt', 'updatedAt', 'id']\n ],\n required: ['id', 'name', 'age', 'updatedAt']\n});\n\nexport const humanWithDeepNestedIndexes: RxJsonSchema<{ id: string; name: string; job: any; }> = overwritable.deepFreezeWhenDevMode({\n version: 0,\n primaryKey: 'id',\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string',\n maxLength: 100\n },\n job: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n },\n manager: {\n type: 'object',\n properties: {\n fullName: {\n type: 'string',\n maxLength: 100\n },\n previousJobs: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n maxLength: 100\n }\n }\n }\n }\n }\n }\n }\n }\n },\n required: [\n 'id'\n ],\n indexes: [\n 'name',\n 'job.name',\n 'job.manager.fullName'\n ]\n});\n\nexport const humanIdAndAgeIndex: RxJsonSchema<{ id: string; name: string; age: number; }> = overwritable.deepFreezeWhenDevMode({\n version: 0,\n description: 'uses a compound index with id as lowest level',\n primaryKey: 'id',\n type: 'object',\n properties: {\n id: {\n type: 'string',\n maxLength: 100\n },\n name: {\n type: 'string'\n },\n age: {\n description: 'Age in years',\n type: 'integer',\n minimum: 0,\n maximum: 150,\n multipleOf: 1\n }\n },\n required: ['id', 'name', 'age'],\n indexes: [\n ['age', 'id']\n ]\n});\n\n\nexport function enableKeyCompression(\n schema: RxJsonSchema\n): RxJsonSchema {\n const ret = flatClone(schema);\n ret.keyCompression = true;\n return ret;\n}\n"],"mappings":"AAAA,OAAOA,aAAa,MAAM,iBAAiB;AAyB3C,SAASC,YAAY,QAAQ,uBAAuB;AACpD,SAASC,mBAAmB,QAAQ,oBAAoB;AAKxD,SAASC,SAAS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AE;IACV,CAAC;IACDM,GAAG,EAAE;MACDV,WAAW,EAAE,cAAc;MAC3BI,IAAI,EAAE,SAAS;MACfO,OAAO,EAAE,CAAC;MACVC,OAAO,EAAE,GAAG;MACZC,UAAU,EAAE;IAChB;EACJ,CAAC;EACDC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC;EAC/BC,OAAO,EAAE,CACL,CAAC,KAAK,EAAE,IAAI,CAAC;AAErB,CAAC,CAAC;AAGF,OAAO,SAASsH,oBAAoBA,CAChCC,MAA+B,EACR;EACvB,IAAMrC,GAAG,GAAGrG,SAAS,CAAC0I,MAAM,CAAC;EAC7BrC,GAAG,CAAC/F,cAAc,GAAG,IAAI;EACzB,OAAO+F,GAAG;AACd","ignoreList":[]} \ No newline at end of file diff --git a/dist/esm/plugins/utils/utils-rxdb-version.js b/dist/esm/plugins/utils/utils-rxdb-version.js index a9d4a3c987b..cf21cd87021 100644 --- a/dist/esm/plugins/utils/utils-rxdb-version.js +++ b/dist/esm/plugins/utils/utils-rxdb-version.js @@ -1,5 +1,5 @@ /** * This file is replaced in the 'npm run build:version' script. */ -export var RXDB_VERSION = '16.0.0-beta.3'; +export var RXDB_VERSION = '16.0.0-beta.4'; //# sourceMappingURL=utils-rxdb-version.js.map \ No newline at end of file diff --git a/dist/esm/plugins/utils/utils-rxdb-version.js.map b/dist/esm/plugins/utils/utils-rxdb-version.js.map index 179cc67baee..38226c66be1 100644 --- a/dist/esm/plugins/utils/utils-rxdb-version.js.map +++ b/dist/esm/plugins/utils/utils-rxdb-version.js.map @@ -1 +1 @@ -{"version":3,"file":"utils-rxdb-version.js","names":["RXDB_VERSION"],"sources":["../../../../src/plugins/utils/utils-rxdb-version.ts"],"sourcesContent":["/**\n * This file is replaced in the 'npm run build:version' script.\n */\nexport const RXDB_VERSION = '16.0.0-beta.3';\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,IAAMA,YAAY,GAAG,eAAe","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"utils-rxdb-version.js","names":["RXDB_VERSION"],"sources":["../../../../src/plugins/utils/utils-rxdb-version.ts"],"sourcesContent":["/**\n * This file is replaced in the 'npm run build:version' script.\n */\nexport const RXDB_VERSION = '16.0.0-beta.4';\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,IAAMA,YAAY,GAAG,eAAe","ignoreList":[]} \ No newline at end of file diff --git a/dist/esm/rx-schema-helper.js.map b/dist/esm/rx-schema-helper.js.map index 4f954a43c7a..26c84b9d6b7 100644 --- a/dist/esm/rx-schema-helper.js.map +++ b/dist/esm/rx-schema-helper.js.map @@ -1 +1 @@ -{"version":3,"file":"rx-schema-helper.js","names":["newRxError","appendToArray","ensureNotFalsy","flatClone","getProperty","isMaybeReadonlyArray","REGEX_ALL_DOTS","RX_META_LWT_MINIMUM","sortObject","trimDots","getPseudoSchemaForVersion","version","primaryKey","pseudoSchema","fillWithDefaultSettings","type","properties","maxLength","value","indexes","required","getSchemaByObjectPath","rxJsonSchema","path","usePath","replace","ret","fillPrimaryKey","primaryPath","jsonSchema","documentData","newPrimary","getComposedPrimaryKeyOfDocumentData","existingPrimary","args","schema","getPrimaryFieldOfPrimaryKey","key","getLengthOfPrimaryKey","schemaPart","compositePrimary","fields","map","field","join","separator","normalizeRxJsonSchema","normalizedSchema","getDefaultIndex","schemaObj","additionalProperties","Object","prototype","hasOwnProperty","call","keyCompression","slice","encrypted","_rev","minLength","_attachments","_deleted","_meta","RX_META_SCHEMA","push","finalFields","getFinalFields","filter","includes","elem","pos","arr","indexOf","useIndexes","index","arIndex","unshift","length","internalIndexes","idx","hasIndex","Set","indexStr","has","add","lwt","minimum","maximum","multipleOf","keys","final","forEach","fillObjectWithDefaults","rxSchema","obj","defaultKeys","defaultValues","i","DEFAULT_CHECKPOINT_SCHEMA","id"],"sources":["../../src/rx-schema-helper.ts"],"sourcesContent":["import { newRxError } from './rx-error.ts';\nimport type {\n CompositePrimaryKey,\n DeepReadonly,\n JsonSchema,\n PrimaryKey,\n RxDocumentData,\n RxJsonSchema,\n RxStorageDefaultCheckpoint,\n StringKeys\n} from './types/index.d.ts';\nimport {\n appendToArray,\n ensureNotFalsy,\n flatClone,\n getProperty,\n isMaybeReadonlyArray,\n REGEX_ALL_DOTS,\n RX_META_LWT_MINIMUM,\n sortObject,\n trimDots\n} from './plugins/utils/index.ts';\nimport type { RxSchema } from './rx-schema.ts';\n\n/**\n * Helper function to create a valid RxJsonSchema\n * with a given version.\n */\nexport function getPseudoSchemaForVersion(\n version: number,\n primaryKey: StringKeys\n): RxJsonSchema> {\n const pseudoSchema: RxJsonSchema> = fillWithDefaultSettings({\n version,\n type: 'object',\n primaryKey: primaryKey as any,\n properties: {\n [primaryKey]: {\n type: 'string',\n maxLength: 100\n },\n value: {\n type: 'string'\n }\n } as any,\n indexes: [\n [primaryKey]\n ],\n required: [primaryKey]\n });\n return pseudoSchema;\n}\n\n/**\n * Returns the sub-schema for a given path\n */\nexport function getSchemaByObjectPath(\n rxJsonSchema: RxJsonSchema,\n path: keyof T | string\n): JsonSchema {\n let usePath: string = path as string;\n usePath = usePath.replace(REGEX_ALL_DOTS, '.properties.');\n usePath = 'properties.' + usePath;\n usePath = trimDots(usePath);\n\n const ret = getProperty(rxJsonSchema, usePath);\n return ret;\n}\n\nexport function fillPrimaryKey(\n primaryPath: keyof T,\n jsonSchema: RxJsonSchema,\n documentData: RxDocumentData\n): RxDocumentData {\n // optimization shortcut.\n if (typeof jsonSchema.primaryKey === 'string') {\n return documentData;\n }\n\n const newPrimary = getComposedPrimaryKeyOfDocumentData(\n jsonSchema,\n documentData\n );\n const existingPrimary: string | undefined = documentData[primaryPath] as any;\n if (\n existingPrimary &&\n existingPrimary !== newPrimary\n ) {\n throw newRxError(\n 'DOC19',\n {\n args: {\n documentData,\n existingPrimary,\n newPrimary,\n },\n schema: jsonSchema\n });\n }\n\n (documentData as any)[primaryPath] = newPrimary;\n return documentData;\n}\n\nexport function getPrimaryFieldOfPrimaryKey(\n primaryKey: PrimaryKey\n): StringKeys {\n if (typeof primaryKey === 'string') {\n return primaryKey as any;\n } else {\n return (primaryKey as CompositePrimaryKey).key;\n }\n}\n\nexport function getLengthOfPrimaryKey(\n schema: RxJsonSchema>\n): number {\n const primaryPath = getPrimaryFieldOfPrimaryKey(schema.primaryKey);\n const schemaPart = getSchemaByObjectPath(schema, primaryPath);\n return ensureNotFalsy(schemaPart.maxLength);\n}\n\n/**\n * Returns the composed primaryKey of a document by its data.\n */\nexport function getComposedPrimaryKeyOfDocumentData(\n jsonSchema: RxJsonSchema | RxJsonSchema>,\n documentData: Partial\n): string {\n if (typeof jsonSchema.primaryKey === 'string') {\n return (documentData as any)[jsonSchema.primaryKey];\n }\n\n const compositePrimary: CompositePrimaryKey = jsonSchema.primaryKey as any;\n return compositePrimary.fields.map(field => {\n const value = getProperty(documentData as any, field as string);\n if (typeof value === 'undefined') {\n throw newRxError('DOC18', { args: { field, documentData } });\n }\n return value;\n }).join(compositePrimary.separator);\n}\n\n\n/**\n * Normalize the RxJsonSchema.\n * We need this to ensure everything is set up properly\n * and we have the same hash on schemas that represent the same value but\n * have different json.\n *\n * - Orders the schemas attributes by alphabetical order\n * - Adds the primaryKey to all indexes that do not contain the primaryKey\n * - We need this for deterministic sort order on all queries, which is required for event-reduce to work.\n *\n * @return RxJsonSchema - ordered and filled\n */\nexport function normalizeRxJsonSchema(jsonSchema: RxJsonSchema): RxJsonSchema {\n const normalizedSchema: RxJsonSchema = sortObject(jsonSchema, true);\n return normalizedSchema;\n}\n\n/**\n * If the schema does not specify any index,\n * we add this index so we at least can run RxQuery()\n * and only select non-deleted fields.\n */\nexport function getDefaultIndex(primaryPath: string) {\n return ['_deleted', primaryPath];\n}\n\n/**\n * fills the schema-json with default-settings\n * @return cloned schemaObj\n */\nexport function fillWithDefaultSettings(\n schemaObj: RxJsonSchema\n): RxJsonSchema> {\n schemaObj = flatClone(schemaObj);\n const primaryPath: string = getPrimaryFieldOfPrimaryKey(schemaObj.primaryKey);\n schemaObj.properties = flatClone(schemaObj.properties);\n\n // additionalProperties is always false\n schemaObj.additionalProperties = false;\n\n // fill with key-compression-state ()\n if (!Object.prototype.hasOwnProperty.call(schemaObj, 'keyCompression')) {\n schemaObj.keyCompression = false;\n }\n\n // indexes must be array\n schemaObj.indexes = schemaObj.indexes ? schemaObj.indexes.slice(0) : [];\n\n // required must be array\n schemaObj.required = schemaObj.required ? schemaObj.required.slice(0) : [];\n\n // encrypted must be array\n schemaObj.encrypted = schemaObj.encrypted ? schemaObj.encrypted.slice(0) : [];\n\n // add _rev\n (schemaObj.properties as any)._rev = {\n type: 'string',\n minLength: 1\n };\n\n // add attachments\n (schemaObj.properties as any)._attachments = {\n type: 'object'\n };\n\n // add deleted flag\n (schemaObj.properties as any)._deleted = {\n type: 'boolean'\n };\n\n // add meta property\n (schemaObj.properties as any)._meta = RX_META_SCHEMA;\n\n /**\n * meta fields are all required\n */\n schemaObj.required = schemaObj.required ? schemaObj.required.slice(0) : [];\n (schemaObj.required as string[]).push('_deleted');\n (schemaObj.required as string[]).push('_rev');\n (schemaObj.required as string[]).push('_meta');\n (schemaObj.required as string[]).push('_attachments');\n\n // final fields are always required\n const finalFields = getFinalFields(schemaObj);\n appendToArray(schemaObj.required as any, finalFields);\n schemaObj.required = schemaObj.required\n .filter((field: string) => !field.includes('.'))\n .filter((elem: any, pos: any, arr: any) => arr.indexOf(elem) === pos); // unique;\n\n // version is 0 by default\n schemaObj.version = schemaObj.version || 0;\n\n const useIndexes: string[][] = schemaObj.indexes.map(index => {\n const arIndex = isMaybeReadonlyArray(index) ? index.slice(0) : [index];\n /**\n * Append primary key to indexes that do not contain the primaryKey.\n * All indexes must have the primaryKey to ensure a deterministic sort order.\n */\n if (!arIndex.includes(primaryPath)) {\n arIndex.push(primaryPath);\n }\n\n // add _deleted flag to all indexes so we can query only non-deleted fields\n // in RxDB itself\n if (arIndex[0] !== '_deleted') {\n arIndex.unshift('_deleted');\n }\n\n return arIndex;\n });\n\n if (useIndexes.length === 0) {\n useIndexes.push(getDefaultIndex(primaryPath));\n }\n\n // we need this index for the getChangedDocumentsSince() method\n useIndexes.push(['_meta.lwt', primaryPath]);\n\n // also add the internalIndexes\n if (schemaObj.internalIndexes) {\n schemaObj.internalIndexes.map(idx => {\n useIndexes.push(idx);\n });\n }\n\n // make indexes unique\n const hasIndex = new Set();\n useIndexes.filter(index => {\n const indexStr = index.join(',');\n if (hasIndex.has(indexStr)) {\n return false;\n } else {\n hasIndex.add(indexStr);\n return true;\n }\n });\n\n schemaObj.indexes = useIndexes;\n\n return schemaObj as any;\n}\n\n\nexport const RX_META_SCHEMA: JsonSchema = {\n type: 'object',\n properties: {\n /**\n * The last-write time.\n * Unix time in milliseconds.\n */\n lwt: {\n type: 'number',\n /**\n * We use 1 as minimum so that the value is never falsy.\n */\n minimum: RX_META_LWT_MINIMUM,\n maximum: 1000000000000000,\n multipleOf: 0.01\n }\n },\n /**\n * Additional properties are allowed\n * and can be used by plugins to set various flags.\n */\n additionalProperties: true as any,\n required: [\n 'lwt'\n ]\n};\n\n\n/**\n * returns the final-fields of the schema\n * @return field-names of the final-fields\n */\nexport function getFinalFields(\n jsonSchema: RxJsonSchema\n): string[] {\n const ret = Object.keys(jsonSchema.properties)\n .filter(key => (jsonSchema as any).properties[key].final);\n\n // primary is also final\n const primaryPath = getPrimaryFieldOfPrimaryKey(jsonSchema.primaryKey);\n ret.push(primaryPath);\n\n // fields of composite primary are final\n if (typeof jsonSchema.primaryKey !== 'string') {\n (jsonSchema.primaryKey as CompositePrimaryKey).fields\n .forEach(field => ret.push(field as string));\n }\n\n return ret;\n}\n\n/**\n * fills all unset fields with default-values if set\n * @hotPath\n */\nexport function fillObjectWithDefaults(rxSchema: RxSchema, obj: any): any {\n const defaultKeys = Object.keys(rxSchema.defaultValues);\n for (let i = 0; i < defaultKeys.length; ++i) {\n const key = defaultKeys[i];\n if (!Object.prototype.hasOwnProperty.call(obj, key) || typeof obj[key] === 'undefined') {\n obj[key] = rxSchema.defaultValues[key];\n }\n }\n return obj;\n}\n\nexport const DEFAULT_CHECKPOINT_SCHEMA: DeepReadonly> = {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n lwt: {\n type: 'number'\n }\n },\n required: [\n 'id',\n 'lwt'\n ],\n additionalProperties: false\n} as const;\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,eAAe;AAW1C,SACIC,aAAa,EACbC,cAAc,EACdC,SAAS,EACTC,WAAW,EACXC,oBAAoB,EACpBC,cAAc,EACdC,mBAAmB,EACnBC,UAAU,EACVC,QAAQ,QACL,0BAA0B;AAGjC;AACA;AACA;AACA;AACA,OAAO,SAASC,yBAAyBA,CACrCC,OAAe,EACfC,UAAyB,EACM;EAC/B,IAAMC,YAA6C,GAAGC,uBAAuB,CAAC;IAC1EH,OAAO;IACPI,IAAI,EAAE,QAAQ;IACdH,UAAU,EAAEA,UAAiB;IAC7BI,UAAU,EAAE;MACR,CAACJ,UAAU,GAAG;QACVG,IAAI,EAAE,QAAQ;QACdE,SAAS,EAAE;MACf,CAAC;MACDC,KAAK,EAAE;QACHH,IAAI,EAAE;MACV;IACJ,CAAQ;IACRI,OAAO,EAAE,CACL,CAACP,UAAU,CAAC,CACf;IACDQ,QAAQ,EAAE,CAACR,UAAU;EACzB,CAAC,CAAC;EACF,OAAOC,YAAY;AACvB;;AAEA;AACA;AACA;AACA,OAAO,SAASQ,qBAAqBA,CACjCC,YAA6B,EAC7BC,IAAsB,EACZ;EACV,IAAIC,OAAe,GAAGD,IAAc;EACpCC,OAAO,GAAGA,OAAO,CAACC,OAAO,CAACnB,cAAc,EAAE,cAAc,CAAC;EACzDkB,OAAO,GAAG,aAAa,GAAGA,OAAO;EACjCA,OAAO,GAAGf,QAAQ,CAACe,OAAO,CAAC;EAE3B,IAAME,GAAG,GAAGtB,WAAW,CAACkB,YAAY,EAAEE,OAAO,CAAC;EAC9C,OAAOE,GAAG;AACd;AAEA,OAAO,SAASC,cAAcA,CAC1BC,WAAoB,EACpBC,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,OAAOjB,GAAG;AACd;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASkE,sBAAsBA,CAACC,QAAuB,EAAEC,GAAQ,EAAO;EAC3E,IAAMC,WAAW,GAAG5C,MAAM,CAACsC,IAAI,CAACI,QAAQ,CAACG,aAAa,CAAC;EACvD,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,WAAW,CAAClB,MAAM,EAAE,EAAEoB,CAAC,EAAE;IACzC,IAAM5D,GAAG,GAAG0D,WAAW,CAACE,CAAC,CAAC;IAC1B,IAAI,CAAC9C,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACwC,GAAG,EAAEzD,GAAG,CAAC,IAAI,OAAOyD,GAAG,CAACzD,GAAG,CAAC,KAAK,WAAW,EAAE;MACpFyD,GAAG,CAACzD,GAAG,CAAC,GAAGwD,QAAQ,CAACG,aAAa,CAAC3D,GAAG,CAAC;IAC1C;EACJ;EACA,OAAOyD,GAAG;AACd;AAEA,OAAO,IAAMI,yBAA+E,GAAG;EAC3FnF,IAAI,EAAE,QAAQ;EACdC,UAAU,EAAE;IACRmF,EAAE,EAAE;MACApF,IAAI,EAAE;IACV,CAAC;IACDsE,GAAG,EAAE;MACDtE,IAAI,EAAE;IACV;EACJ,CAAC;EACDK,QAAQ,EAAE,CACN,IAAI,EACJ,KAAK,CACR;EACD8B,oBAAoB,EAAE;AAC1B,CAAU","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"rx-schema-helper.js","names":["newRxError","appendToArray","ensureNotFalsy","flatClone","getProperty","isMaybeReadonlyArray","REGEX_ALL_DOTS","RX_META_LWT_MINIMUM","sortObject","trimDots","getPseudoSchemaForVersion","version","primaryKey","pseudoSchema","fillWithDefaultSettings","type","properties","maxLength","value","indexes","required","getSchemaByObjectPath","rxJsonSchema","path","usePath","replace","ret","fillPrimaryKey","primaryPath","jsonSchema","documentData","newPrimary","getComposedPrimaryKeyOfDocumentData","existingPrimary","args","schema","getPrimaryFieldOfPrimaryKey","key","getLengthOfPrimaryKey","schemaPart","compositePrimary","fields","map","field","join","separator","normalizeRxJsonSchema","normalizedSchema","getDefaultIndex","schemaObj","additionalProperties","Object","prototype","hasOwnProperty","call","keyCompression","slice","encrypted","_rev","minLength","_attachments","_deleted","_meta","RX_META_SCHEMA","push","finalFields","getFinalFields","filter","includes","elem","pos","arr","indexOf","useIndexes","index","arIndex","unshift","length","internalIndexes","idx","hasIndex","Set","indexStr","has","add","lwt","minimum","maximum","multipleOf","keys","final","forEach","fillObjectWithDefaults","rxSchema","obj","defaultKeys","defaultValues","i","DEFAULT_CHECKPOINT_SCHEMA","id"],"sources":["../../src/rx-schema-helper.ts"],"sourcesContent":["import { newRxError } from './rx-error.ts';\nimport type {\n CompositePrimaryKey,\n DeepReadonly,\n JsonSchema,\n PrimaryKey,\n RxDocumentData,\n RxJsonSchema,\n RxStorageDefaultCheckpoint,\n StringKeys\n} from './types/index.d.ts';\nimport {\n appendToArray,\n ensureNotFalsy,\n flatClone,\n getProperty,\n isMaybeReadonlyArray,\n REGEX_ALL_DOTS,\n RX_META_LWT_MINIMUM,\n sortObject,\n trimDots\n} from './plugins/utils/index.ts';\nimport type { RxSchema } from './rx-schema.ts';\n\n/**\n * Helper function to create a valid RxJsonSchema\n * with a given version.\n */\nexport function getPseudoSchemaForVersion(\n version: number,\n primaryKey: StringKeys\n): RxJsonSchema> {\n const pseudoSchema: RxJsonSchema> = fillWithDefaultSettings({\n version,\n type: 'object',\n primaryKey: primaryKey as any,\n properties: {\n [primaryKey]: {\n type: 'string',\n maxLength: 100\n },\n value: {\n type: 'string'\n }\n } as any,\n indexes: [\n [primaryKey]\n ],\n required: [primaryKey]\n });\n return pseudoSchema;\n}\n\n/**\n * Returns the sub-schema for a given path\n */\nexport function getSchemaByObjectPath(\n rxJsonSchema: RxJsonSchema,\n path: keyof T | string\n): JsonSchema {\n let usePath: string = path as string;\n usePath = usePath.replace(REGEX_ALL_DOTS, '.properties.');\n usePath = 'properties.' + usePath;\n usePath = trimDots(usePath);\n\n const ret = getProperty(rxJsonSchema, usePath);\n return ret;\n}\n\nexport function fillPrimaryKey(\n primaryPath: keyof T,\n jsonSchema: RxJsonSchema,\n documentData: RxDocumentData\n): RxDocumentData {\n // optimization shortcut.\n if (typeof jsonSchema.primaryKey === 'string') {\n return documentData;\n }\n\n const newPrimary = getComposedPrimaryKeyOfDocumentData(\n jsonSchema,\n documentData\n );\n const existingPrimary: string | undefined = documentData[primaryPath] as any;\n if (\n existingPrimary &&\n existingPrimary !== newPrimary\n ) {\n throw newRxError(\n 'DOC19',\n {\n args: {\n documentData,\n existingPrimary,\n newPrimary,\n },\n schema: jsonSchema\n });\n }\n\n (documentData as any)[primaryPath] = newPrimary;\n return documentData;\n}\n\nexport function getPrimaryFieldOfPrimaryKey(\n primaryKey: PrimaryKey\n): StringKeys {\n if (typeof primaryKey === 'string') {\n return primaryKey as any;\n } else {\n return (primaryKey as CompositePrimaryKey).key;\n }\n}\n\nexport function getLengthOfPrimaryKey(\n schema: RxJsonSchema>\n): number {\n const primaryPath = getPrimaryFieldOfPrimaryKey(schema.primaryKey);\n const schemaPart = getSchemaByObjectPath(schema, primaryPath);\n return ensureNotFalsy(schemaPart.maxLength);\n}\n\n/**\n * Returns the composed primaryKey of a document by its data.\n */\nexport function getComposedPrimaryKeyOfDocumentData(\n jsonSchema: RxJsonSchema | RxJsonSchema>,\n documentData: Partial\n): string {\n if (typeof jsonSchema.primaryKey === 'string') {\n return (documentData as any)[jsonSchema.primaryKey];\n }\n\n const compositePrimary: CompositePrimaryKey = jsonSchema.primaryKey as any;\n return compositePrimary.fields.map(field => {\n const value = getProperty(documentData as any, field as string);\n if (typeof value === 'undefined') {\n throw newRxError('DOC18', { args: { field, documentData } });\n }\n return value;\n }).join(compositePrimary.separator);\n}\n\n\n/**\n * Normalize the RxJsonSchema.\n * We need this to ensure everything is set up properly\n * and we have the same hash on schemas that represent the same value but\n * have different json.\n *\n * - Orders the schemas attributes by alphabetical order\n * - Adds the primaryKey to all indexes that do not contain the primaryKey\n * - We need this for deterministic sort order on all queries, which is required for event-reduce to work.\n *\n * @return RxJsonSchema - ordered and filled\n */\nexport function normalizeRxJsonSchema(jsonSchema: RxJsonSchema): RxJsonSchema {\n const normalizedSchema: RxJsonSchema = sortObject(jsonSchema, true);\n return normalizedSchema;\n}\n\n/**\n * If the schema does not specify any index,\n * we add this index so we at least can run RxQuery()\n * and only select non-deleted fields.\n */\nexport function getDefaultIndex(primaryPath: string) {\n return ['_deleted', primaryPath];\n}\n\n/**\n * fills the schema-json with default-settings\n * @return cloned schemaObj\n */\nexport function fillWithDefaultSettings(\n schemaObj: RxJsonSchema\n): RxJsonSchema> {\n schemaObj = flatClone(schemaObj);\n const primaryPath: string = getPrimaryFieldOfPrimaryKey(schemaObj.primaryKey);\n schemaObj.properties = flatClone(schemaObj.properties);\n\n // additionalProperties is always false\n schemaObj.additionalProperties = false;\n\n // fill with key-compression-state ()\n if (!Object.prototype.hasOwnProperty.call(schemaObj, 'keyCompression')) {\n schemaObj.keyCompression = false;\n }\n\n // indexes must be array\n schemaObj.indexes = schemaObj.indexes ? schemaObj.indexes.slice(0) : [];\n\n // required must be array\n schemaObj.required = schemaObj.required ? schemaObj.required.slice(0) : [];\n\n // encrypted must be array\n schemaObj.encrypted = schemaObj.encrypted ? schemaObj.encrypted.slice(0) : [];\n\n // add _rev\n (schemaObj.properties as any)._rev = {\n type: 'string',\n minLength: 1\n };\n\n // add attachments\n (schemaObj.properties as any)._attachments = {\n type: 'object'\n };\n\n // add deleted flag\n (schemaObj.properties as any)._deleted = {\n type: 'boolean'\n };\n\n // add meta property\n (schemaObj.properties as any)._meta = RX_META_SCHEMA;\n\n /**\n * meta fields are all required\n */\n schemaObj.required = schemaObj.required ? schemaObj.required.slice(0) : [];\n (schemaObj.required as string[]).push('_deleted');\n (schemaObj.required as string[]).push('_rev');\n (schemaObj.required as string[]).push('_meta');\n (schemaObj.required as string[]).push('_attachments');\n\n // final fields are always required\n const finalFields = getFinalFields(schemaObj);\n appendToArray(schemaObj.required as any, finalFields);\n schemaObj.required = schemaObj.required\n .filter((field: string) => !field.includes('.'))\n .filter((elem: any, pos: any, arr: any) => arr.indexOf(elem) === pos); // unique;\n\n\n // version is 0 by default\n schemaObj.version = schemaObj.version || 0;\n\n const useIndexes: string[][] = schemaObj.indexes.map(index => {\n const arIndex = isMaybeReadonlyArray(index) ? index.slice(0) : [index];\n /**\n * Append primary key to indexes that do not contain the primaryKey.\n * All indexes must have the primaryKey to ensure a deterministic sort order.\n */\n if (!arIndex.includes(primaryPath)) {\n arIndex.push(primaryPath);\n }\n\n // add _deleted flag to all indexes so we can query only non-deleted fields\n // in RxDB itself\n if (arIndex[0] !== '_deleted') {\n arIndex.unshift('_deleted');\n }\n\n return arIndex;\n });\n\n if (useIndexes.length === 0) {\n useIndexes.push(getDefaultIndex(primaryPath));\n }\n\n // we need this index for the getChangedDocumentsSince() method\n useIndexes.push(['_meta.lwt', primaryPath]);\n\n // also add the internalIndexes\n if (schemaObj.internalIndexes) {\n schemaObj.internalIndexes.map(idx => {\n useIndexes.push(idx);\n });\n }\n\n // make indexes unique\n const hasIndex = new Set();\n useIndexes.filter(index => {\n const indexStr = index.join(',');\n if (hasIndex.has(indexStr)) {\n return false;\n } else {\n hasIndex.add(indexStr);\n return true;\n }\n });\n\n schemaObj.indexes = useIndexes;\n\n return schemaObj as any;\n}\n\n\nexport const RX_META_SCHEMA: JsonSchema = {\n type: 'object',\n properties: {\n /**\n * The last-write time.\n * Unix time in milliseconds.\n */\n lwt: {\n type: 'number',\n /**\n * We use 1 as minimum so that the value is never falsy.\n */\n minimum: RX_META_LWT_MINIMUM,\n maximum: 1000000000000000,\n multipleOf: 0.01\n }\n },\n /**\n * Additional properties are allowed\n * and can be used by plugins to set various flags.\n */\n additionalProperties: true as any,\n required: [\n 'lwt'\n ]\n};\n\n\n/**\n * returns the final-fields of the schema\n * @return field-names of the final-fields\n */\nexport function getFinalFields(\n jsonSchema: RxJsonSchema\n): string[] {\n const ret = Object.keys(jsonSchema.properties)\n .filter(key => (jsonSchema as any).properties[key].final);\n\n // primary is also final\n const primaryPath = getPrimaryFieldOfPrimaryKey(jsonSchema.primaryKey);\n ret.push(primaryPath);\n\n // fields of composite primary are final\n if (typeof jsonSchema.primaryKey !== 'string') {\n (jsonSchema.primaryKey as CompositePrimaryKey).fields\n .forEach(field => ret.push(field as string));\n }\n\n return ret;\n}\n\n/**\n * fills all unset fields with default-values if set\n * @hotPath\n */\nexport function fillObjectWithDefaults(rxSchema: RxSchema, obj: any): any {\n const defaultKeys = Object.keys(rxSchema.defaultValues);\n for (let i = 0; i < defaultKeys.length; ++i) {\n const key = defaultKeys[i];\n if (!Object.prototype.hasOwnProperty.call(obj, key) || typeof obj[key] === 'undefined') {\n obj[key] = rxSchema.defaultValues[key];\n }\n }\n return obj;\n}\n\nexport const DEFAULT_CHECKPOINT_SCHEMA: DeepReadonly> = {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n lwt: {\n type: 'number'\n }\n },\n required: [\n 'id',\n 'lwt'\n ],\n additionalProperties: false\n} as const;\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,eAAe;AAW1C,SACIC,aAAa,EACbC,cAAc,EACdC,SAAS,EACTC,WAAW,EACXC,oBAAoB,EACpBC,cAAc,EACdC,mBAAmB,EACnBC,UAAU,EACVC,QAAQ,QACL,0BAA0B;AAGjC;AACA;AACA;AACA;AACA,OAAO,SAASC,yBAAyBA,CACrCC,OAAe,EACfC,UAAyB,EACM;EAC/B,IAAMC,YAA6C,GAAGC,uBAAuB,CAAC;IAC1EH,OAAO;IACPI,IAAI,EAAE,QAAQ;IACdH,UAAU,EAAEA,UAAiB;IAC7BI,UAAU,EAAE;MACR,CAACJ,UAAU,GAAG;QACVG,IAAI,EAAE,QAAQ;QACdE,SAAS,EAAE;MACf,CAAC;MACDC,KAAK,EAAE;QACHH,IAAI,EAAE;MACV;IACJ,CAAQ;IACRI,OAAO,EAAE,CAC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EAAE;IACV,CAAC;IACDsE,GAAG,EAAE;MACDtE,IAAI,EAAE;IACV;EACJ,CAAC;EACDK,QAAQ,EAAE,CACN,IAAI,EACJ,KAAK,CACR;EACD8B,oBAAoB,EAAE;AAC1B,CAAU","ignoreList":[]} \ No newline at end of file diff --git a/dist/types/plugins/dev-mode/error-messages.d.ts b/dist/types/plugins/dev-mode/error-messages.d.ts index 52fea094908..4f7cbf1e6f4 100644 --- a/dist/types/plugins/dev-mode/error-messages.d.ts +++ b/dist/types/plugins/dev-mode/error-messages.d.ts @@ -175,6 +175,7 @@ export declare const ERROR_MESSAGES: { CRDT1: string; CRDT2: string; CRDT3: string; + DXE1: string; /** * Should never be thrown, use this for * null checks etc. so you do not have to increase the diff --git a/dist/types/plugins/storage-denokv/index.d.ts b/dist/types/plugins/storage-denokv/index.d.ts index 58418508182..2ded36188a2 100644 --- a/dist/types/plugins/storage-denokv/index.d.ts +++ b/dist/types/plugins/storage-denokv/index.d.ts @@ -4,7 +4,7 @@ import { RxStorageInstanceDenoKV } from "./rx-storage-instance-denokv.ts"; export declare class RxStorageDenoKV implements RxStorage, DenoKVSettings> { settings: DenoKVSettings; name: string; - readonly rxdbVersion = "16.0.0-beta.3"; + readonly rxdbVersion = "16.0.0-beta.4"; constructor(settings: DenoKVSettings); createStorageInstance(params: RxStorageInstanceCreationParams): Promise>; } diff --git a/dist/types/plugins/storage-dexie/rx-storage-dexie.d.ts b/dist/types/plugins/storage-dexie/rx-storage-dexie.d.ts index c1d82afbc1f..efb8203db75 100644 --- a/dist/types/plugins/storage-dexie/rx-storage-dexie.d.ts +++ b/dist/types/plugins/storage-dexie/rx-storage-dexie.d.ts @@ -4,7 +4,7 @@ import { RxStorageInstanceDexie } from './rx-storage-instance-dexie.ts'; export declare class RxStorageDexie implements RxStorage { settings: DexieSettings; name: string; - readonly rxdbVersion = "16.0.0-beta.3"; + readonly rxdbVersion = "16.0.0-beta.4"; constructor(settings: DexieSettings); createStorageInstance(params: RxStorageInstanceCreationParams): Promise>; } diff --git a/dist/types/plugins/storage-mongodb/rx-storage-mongodb.d.ts b/dist/types/plugins/storage-mongodb/rx-storage-mongodb.d.ts index 90890af10a5..b862d120cc1 100644 --- a/dist/types/plugins/storage-mongodb/rx-storage-mongodb.d.ts +++ b/dist/types/plugins/storage-mongodb/rx-storage-mongodb.d.ts @@ -4,7 +4,7 @@ import { RxStorageInstanceMongoDB } from './rx-storage-instance-mongodb.ts'; export declare class RxStorageMongoDB implements RxStorage { databaseSettings: MongoDBDatabaseSettings; name: string; - readonly rxdbVersion = "16.0.0-beta.3"; + readonly rxdbVersion = "16.0.0-beta.4"; constructor(databaseSettings: MongoDBDatabaseSettings); createStorageInstance(params: RxStorageInstanceCreationParams): Promise>; } diff --git a/dist/types/plugins/storage-remote/rx-storage-remote.d.ts b/dist/types/plugins/storage-remote/rx-storage-remote.d.ts index d4b2b28946d..7a7286d12e4 100644 --- a/dist/types/plugins/storage-remote/rx-storage-remote.d.ts +++ b/dist/types/plugins/storage-remote/rx-storage-remote.d.ts @@ -4,7 +4,7 @@ import type { MessageFromRemote, RemoteMessageChannel, RxStorageRemoteInternals, export declare class RxStorageRemote implements RxStorage { readonly settings: RxStorageRemoteSettings; readonly name: string; - readonly rxdbVersion = "16.0.0-beta.3"; + readonly rxdbVersion = "16.0.0-beta.4"; private seed; private lastRequestId; messageChannelIfOneMode?: Promise; diff --git a/dist/types/plugins/utils/utils-rxdb-version.d.ts b/dist/types/plugins/utils/utils-rxdb-version.d.ts index 14458272b1d..7a6ceef0639 100644 --- a/dist/types/plugins/utils/utils-rxdb-version.d.ts +++ b/dist/types/plugins/utils/utils-rxdb-version.d.ts @@ -1,4 +1,4 @@ /** * This file is replaced in the 'npm run build:version' script. */ -export declare const RXDB_VERSION = "16.0.0-beta.3"; +export declare const RXDB_VERSION = "16.0.0-beta.4"; diff --git a/dist/types/rx-database.d.ts b/dist/types/rx-database.d.ts index aac1c8c7402..d706796cc3e 100644 --- a/dist/types/rx-database.d.ts +++ b/dist/types/rx-database.d.ts @@ -28,7 +28,7 @@ export declare class RxDatabaseBase | undefined; readonly idleQueue: IdleQueue; - readonly rxdbVersion = "16.0.0-beta.3"; + readonly rxdbVersion = "16.0.0-beta.4"; /** * Contains all known non-closed storage instances * that belong to this database. diff --git a/package.json b/package.json index cc37b638f76..d7e02e92cfe 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "rxdb", "description": "A local-first realtime NoSQL Database for JavaScript applications - https://rxdb.info/", - "version": "16.0.0-beta.3", + "version": "16.0.0-beta.4", "author": "pubkey", "repository": { "type": "git", diff --git a/src/plugins/utils/utils-rxdb-version.ts b/src/plugins/utils/utils-rxdb-version.ts index 18244a4f673..c13a34f414c 100644 --- a/src/plugins/utils/utils-rxdb-version.ts +++ b/src/plugins/utils/utils-rxdb-version.ts @@ -1,4 +1,4 @@ /** * This file is replaced in the 'npm run build:version' script. */ -export const RXDB_VERSION = '16.0.0-beta.3'; +export const RXDB_VERSION = '16.0.0-beta.4';