@prisma/orm-target-mongo 8.0.0-rc.18-dev.32 → 8.0.0-rc.18-dev.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/adapter.mjs +1 -1
  2. package/dist/adapter__control.mjs +1 -1
  3. package/dist/adapter__runtime.mjs +2 -2
  4. package/dist/{codec-types-DHjpzMTv.d.mts → codec-types-Daq7xQEA.d.mts} +2 -1
  5. package/dist/{codec-types-DHjpzMTv.d.mts.map → codec-types-Daq7xQEA.d.mts.map} +1 -1
  6. package/dist/{codecs-BVrMDhha-DBl_TLS8.mjs → codecs-CylyDRI5-DdzCZHek.mjs} +15 -11
  7. package/dist/codecs-CylyDRI5-DdzCZHek.mjs.map +1 -0
  8. package/dist/{control-CfztdRLD.mjs → control-BkNtJldI.mjs} +2 -2
  9. package/dist/{control-CfztdRLD.mjs.map → control-BkNtJldI.mjs.map} +1 -1
  10. package/dist/{data-types-vptiHFHC-LUJwNRIq.mjs → data-types-BUNJnoE9-S7P2K-7r.mjs} +5 -11
  11. package/dist/data-types-BUNJnoE9-S7P2K-7r.mjs.map +1 -0
  12. package/dist/{descriptor-meta-BQBreSNF-CZ9uOPwO.mjs → descriptor-meta-DdeUSTJk-zJzD7C-n.mjs} +3 -3
  13. package/dist/{descriptor-meta-BQBreSNF-CZ9uOPwO.mjs.map → descriptor-meta-DdeUSTJk-zJzD7C-n.mjs.map} +1 -1
  14. package/dist/{descriptor-meta-runtime-D0YxXi85-CjeTEg7T.mjs → descriptor-meta-runtime-DeRjCidG-BzMW-qkN.mjs} +4 -4
  15. package/dist/{descriptor-meta-runtime-D0YxXi85-CjeTEg7T.mjs.map → descriptor-meta-runtime-DeRjCidG-BzMW-qkN.mjs.map} +1 -1
  16. package/dist/driver.mjs +1 -1
  17. package/dist/driver__control.mjs +1 -1
  18. package/dist/driver__control.mjs.map +1 -1
  19. package/dist/{mongo-adapter-Bo6ciURK-Cy0xnkRa.mjs → mongo-adapter-Bo6ciURK-Dvq-oZQ9.mjs} +2 -2
  20. package/dist/{mongo-adapter-Bo6ciURK-Cy0xnkRa.mjs.map → mongo-adapter-Bo6ciURK-Dvq-oZQ9.mjs.map} +1 -1
  21. package/dist/{mongo-driver-BqPkFjuV-Crm0Mhm6.mjs → mongo-driver-GbMQwUg3-Cx-f8nHb.mjs} +3 -3
  22. package/dist/{mongo-driver-BqPkFjuV-Crm0Mhm6.mjs.map → mongo-driver-GbMQwUg3-Cx-f8nHb.mjs.map} +1 -1
  23. package/dist/{pack-BuZ5LBMg.d.mts → pack-FxKc7yY0.d.mts} +2 -2
  24. package/dist/{pack-BuZ5LBMg.d.mts.map → pack-FxKc7yY0.d.mts.map} +1 -1
  25. package/dist/{prisma6-binding-DKZXqEL5.mjs → prisma6-binding-L_x2s5FV.mjs} +2 -2
  26. package/dist/{prisma6-binding-DKZXqEL5.mjs.map → prisma6-binding-L_x2s5FV.mjs.map} +1 -1
  27. package/dist/target.d.mts +2 -2
  28. package/dist/target.mjs +4 -4
  29. package/dist/target__codec-types.d.mts +1 -1
  30. package/dist/target__codecs.mjs +1 -1
  31. package/dist/target__control.mjs +1 -1
  32. package/dist/target__data-types.mjs +1 -1
  33. package/dist/target__pack.d.mts +2 -2
  34. package/dist/target__pack.mjs +1 -1
  35. package/dist/target__pack.mjs.map +1 -1
  36. package/dist/target__prisma6-binding.mjs +1 -1
  37. package/dist/target__runtime.mjs +1 -1
  38. package/dist/target__runtime.mjs.map +1 -1
  39. package/package.json +9 -9
  40. package/dist/codecs-BVrMDhha-DBl_TLS8.mjs.map +0 -1
  41. package/dist/data-types-vptiHFHC-LUJwNRIq.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"mongo-driver-BqPkFjuV-Crm0Mhm6.mjs","names":[],"sources":["../../../../3-mongo-target/3-mongo-driver/dist/mongo-driver-BqPkFjuV.mjs"],"sourcesContent":["import { assertNever } from \"@internal/utils/internal-error\";\nimport { BSON, MongoClient } from \"mongodb\";\n//#endregion\n//#region src/core/driver-info.ts\nconst DRIVER_INFO = {\n\tname: \"Prisma\",\n\tversion: \"8.0.0-rc.18-dev.32\"\n};\n//#endregion\n//#region src/mongo-driver.ts\n/* v8 ignore start */\nfunction unreachableKind(value) {\n\tconst candidate = value;\n\tif (typeof candidate === \"object\" && candidate !== null && \"kind\" in candidate && typeof candidate.kind === \"string\") return candidate.kind;\n\treturn \"unknown\";\n}\n/* v8 ignore stop */\nvar MongoDriverImpl = class MongoDriverImpl {\n\tdb;\n\tclient;\n\tconstructor(db, client) {\n\t\tthis.db = db;\n\t\tthis.client = client;\n\t}\n\tstatic async fromConnection(uri, dbName) {\n\t\tconst client = new MongoClient(uri, { driverInfo: DRIVER_INFO });\n\t\tawait client.connect();\n\t\treturn new MongoDriverImpl(client.db(dbName), client);\n\t}\n\tstatic fromDb(db) {\n\t\treturn new MongoDriverImpl(db, void 0);\n\t}\n\texecute(wireCommand) {\n\t\tswitch (wireCommand.kind) {\n\t\t\tcase \"insertOne\": return this.executeInsertOneCommand(wireCommand);\n\t\t\tcase \"updateOne\": return this.executeUpdateOneCommand(wireCommand);\n\t\t\tcase \"insertMany\": return this.executeInsertManyCommand(wireCommand);\n\t\t\tcase \"updateMany\": return this.executeUpdateManyCommand(wireCommand);\n\t\t\tcase \"deleteOne\": return this.executeDeleteOneCommand(wireCommand);\n\t\t\tcase \"deleteMany\": return this.executeDeleteManyCommand(wireCommand);\n\t\t\tcase \"findOneAndUpdate\": return this.executeFindOneAndUpdateCommand(wireCommand);\n\t\t\tcase \"findOneAndDelete\": return this.executeFindOneAndDeleteCommand(wireCommand);\n\t\t\tcase \"aggregate\": return this.executeAggregateCommand(wireCommand);\n\t\t\t// v8 ignore next 4\n\t\t\tdefault: return assertNever(wireCommand, `Unknown wire command kind: ${unreachableKind(wireCommand)}`);\n\t\t}\n\t}\n\tasync run(wireCommand) {\n\t\tswitch (wireCommand.kind) {\n\t\t\tcase \"createCollection\": return this.executeCreateCollectionCommand(wireCommand);\n\t\t\tcase \"createIndex\": return this.executeCreateIndexCommand(wireCommand);\n\t\t\tcase \"dropCollection\": return this.executeDropCollectionCommand(wireCommand);\n\t\t\tcase \"renameCollection\": return this.executeRenameCollectionCommand(wireCommand);\n\t\t\tcase \"dropIndex\": return this.executeDropIndexCommand(wireCommand);\n\t\t\tcase \"collMod\": return this.executeCollModCommand(wireCommand);\n\t\t\t// v8 ignore next 4\n\t\t\tdefault: return assertNever(wireCommand, `Unknown DDL wire command kind: ${unreachableKind(wireCommand)}`);\n\t\t}\n\t}\n\tasync close() {\n\t\tawait this.client?.close();\n\t}\n\tasync *executeInsertOneCommand(cmd) {\n\t\tconst result = await this.db.collection(cmd.collection).insertOne(cmd.document);\n\t\tyield {\n\t\t\tinsertedId: result.insertedId,\n\t\t\tdocument: this.asRead({\n\t\t\t\t_id: result.insertedId,\n\t\t\t\t...cmd.document\n\t\t\t})\n\t\t};\n\t}\n\t/**\n\t* The server stores an inserted document as the driver wrote it, apart from moving `_id` first, so writing it to BSON and reading it back with the client's options gives what a read returns, without a query.\n\t*/\n\tasRead(document) {\n\t\tconst { raw: _raw, ...options } = this.db.bsonOptions;\n\t\treturn BSON.deserialize(BSON.serialize(document, options), options);\n\t}\n\tasync *executeUpdateOneCommand(cmd) {\n\t\tconst result = await this.db.collection(cmd.collection).updateOne(cmd.filter, cmd.update, { upsert: cmd.upsert });\n\t\tyield {\n\t\t\tmatchedCount: result.matchedCount,\n\t\t\tmodifiedCount: result.modifiedCount,\n\t\t\tupsertedCount: result.upsertedCount,\n\t\t\tupsertedId: result.upsertedId ?? void 0\n\t\t};\n\t}\n\tasync *executeInsertManyCommand(cmd) {\n\t\tconst result = await this.db.collection(cmd.collection).insertMany(cmd.documents);\n\t\tconst insertedIds = Object.values(result.insertedIds);\n\t\tyield {\n\t\t\tinsertedIds,\n\t\t\tinsertedCount: result.insertedCount,\n\t\t\tdocuments: cmd.documents.map((document, index) => this.asRead({\n\t\t\t\t_id: insertedIds[index],\n\t\t\t\t...document\n\t\t\t}))\n\t\t};\n\t}\n\tasync *executeUpdateManyCommand(cmd) {\n\t\tconst result = await this.db.collection(cmd.collection).updateMany(cmd.filter, cmd.update, {\n\t\t\tupsert: cmd.upsert,\n\t\t\t...cmd.bypassDocumentValidation ? { bypassDocumentValidation: true } : {}\n\t\t});\n\t\tyield {\n\t\t\tmatchedCount: result.matchedCount,\n\t\t\tmodifiedCount: result.modifiedCount,\n\t\t\tupsertedCount: result.upsertedCount,\n\t\t\tupsertedId: result.upsertedId ?? void 0\n\t\t};\n\t}\n\tasync *executeDeleteOneCommand(cmd) {\n\t\tyield { deletedCount: (await this.db.collection(cmd.collection).deleteOne(cmd.filter)).deletedCount };\n\t}\n\tasync *executeDeleteManyCommand(cmd) {\n\t\tyield { deletedCount: (await this.db.collection(cmd.collection).deleteMany(cmd.filter)).deletedCount };\n\t}\n\tasync *executeFindOneAndUpdateCommand(cmd) {\n\t\tconst result = await this.db.collection(cmd.collection).findOneAndUpdate(cmd.filter, cmd.update, {\n\t\t\tupsert: cmd.upsert,\n\t\t\t...cmd.returnDocument != null ? { returnDocument: cmd.returnDocument } : {},\n\t\t\t...cmd.sort != null ? { sort: cmd.sort } : {}\n\t\t});\n\t\tif (result) yield result;\n\t}\n\tasync *executeFindOneAndDeleteCommand(cmd) {\n\t\tconst result = await this.db.collection(cmd.collection).findOneAndDelete(cmd.filter, { ...cmd.sort != null ? { sort: cmd.sort } : {} });\n\t\tif (result) yield result;\n\t}\n\tasync *executeAggregateCommand(cmd) {\n\t\tyield* this.db.collection(cmd.collection).aggregate(cmd.pipeline);\n\t}\n\tasync executeCreateCollectionCommand(cmd) {\n\t\tconst { validator, validationLevel, validationAction, capped, size, max, timeseries, collation, changeStreamPreAndPostImages, clusteredIndex } = cmd;\n\t\tawait this.db.createCollection(cmd.collection, {\n\t\t\t...validator !== void 0 ? { validator } : {},\n\t\t\t...validationLevel !== void 0 ? { validationLevel } : {},\n\t\t\t...validationAction !== void 0 ? { validationAction } : {},\n\t\t\t...capped !== void 0 ? { capped } : {},\n\t\t\t...size !== void 0 ? { size } : {},\n\t\t\t...max !== void 0 ? { max } : {},\n\t\t\t...timeseries !== void 0 ? { timeseries } : {},\n\t\t\t...collation !== void 0 ? { collation } : {},\n\t\t\t...changeStreamPreAndPostImages !== void 0 ? { changeStreamPreAndPostImages } : {},\n\t\t\t...clusteredIndex !== void 0 ? { clusteredIndex } : {}\n\t\t});\n\t}\n\tasync executeCreateIndexCommand(cmd) {\n\t\tconst { unique, sparse, expireAfterSeconds, partialFilterExpression, name, wildcardProjection, collation, weights, default_language, language_override } = cmd;\n\t\tawait this.db.collection(cmd.collection).createIndex(cmd.key, {\n\t\t\t...unique !== void 0 ? { unique } : {},\n\t\t\t...sparse !== void 0 ? { sparse } : {},\n\t\t\t...expireAfterSeconds !== void 0 ? { expireAfterSeconds } : {},\n\t\t\t...partialFilterExpression !== void 0 ? { partialFilterExpression } : {},\n\t\t\t...name !== void 0 ? { name } : {},\n\t\t\t...wildcardProjection !== void 0 ? { wildcardProjection } : {},\n\t\t\t...collation !== void 0 ? { collation } : {},\n\t\t\t...weights !== void 0 ? { weights } : {},\n\t\t\t...default_language !== void 0 ? { default_language } : {},\n\t\t\t...language_override !== void 0 ? { language_override } : {}\n\t\t});\n\t}\n\tasync executeDropCollectionCommand(cmd) {\n\t\tawait this.db.collection(cmd.collection).drop();\n\t}\n\tasync executeRenameCollectionCommand(cmd) {\n\t\tawait this.db.renameCollection(cmd.collection, cmd.to);\n\t}\n\tasync executeDropIndexCommand(cmd) {\n\t\tawait this.db.collection(cmd.collection).dropIndex(cmd.name);\n\t}\n\tasync executeCollModCommand(cmd) {\n\t\tconst { validator, validationLevel, validationAction, changeStreamPreAndPostImages } = cmd;\n\t\tawait this.db.command({\n\t\t\tcollMod: cmd.collection,\n\t\t\t...validator !== void 0 ? { validator } : {},\n\t\t\t...validationLevel !== void 0 ? { validationLevel } : {},\n\t\t\t...validationAction !== void 0 ? { validationAction } : {},\n\t\t\t...changeStreamPreAndPostImages !== void 0 ? { changeStreamPreAndPostImages } : {}\n\t\t});\n\t}\n};\nasync function createMongoDriver(uri, dbName) {\n\treturn MongoDriverImpl.fromConnection(uri, dbName);\n}\n//#endregion\nexport { createMongoDriver as n, DRIVER_INFO as r, MongoDriverImpl as t };\n\n//# sourceMappingURL=mongo-driver-BqPkFjuV.mjs.map"],"mappings":";;;AAIA,MAAM,cAAc;CACnB,MAAM;CACN,SAAS;AACV;;AAIA,SAAS,gBAAgB,OAAO;CAC/B,MAAM,YAAY;CAClB,IAAI,OAAO,cAAc,YAAY,cAAc,QAAQ,UAAU,aAAa,OAAO,UAAU,SAAS,UAAU,OAAO,UAAU;CACvI,OAAO;AACR;;AAEA,IAAI,kBAAkB,MAAM,gBAAgB;CAC3C;CACA;CACA,YAAY,IAAI,QAAQ;EACvB,KAAK,KAAK;EACV,KAAK,SAAS;CACf;CACA,aAAa,eAAe,KAAK,QAAQ;EACxC,MAAM,SAAS,IAAI,YAAY,KAAK,EAAE,YAAY,YAAY,CAAC;EAC/D,MAAM,OAAO,QAAQ;EACrB,OAAO,IAAI,gBAAgB,OAAO,GAAG,MAAM,GAAG,MAAM;CACrD;CACA,OAAO,OAAO,IAAI;EACjB,OAAO,IAAI,gBAAgB,IAAI,KAAK,CAAC;CACtC;CACA,QAAQ,aAAa;EACpB,QAAQ,YAAY,MAApB;GACC,KAAK,aAAa,OAAO,KAAK,wBAAwB,WAAW;GACjE,KAAK,aAAa,OAAO,KAAK,wBAAwB,WAAW;GACjE,KAAK,cAAc,OAAO,KAAK,yBAAyB,WAAW;GACnE,KAAK,cAAc,OAAO,KAAK,yBAAyB,WAAW;GACnE,KAAK,aAAa,OAAO,KAAK,wBAAwB,WAAW;GACjE,KAAK,cAAc,OAAO,KAAK,yBAAyB,WAAW;GACnE,KAAK,oBAAoB,OAAO,KAAK,+BAA+B,WAAW;GAC/E,KAAK,oBAAoB,OAAO,KAAK,+BAA+B,WAAW;GA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ACF;AACD;AACA,eAAe,kBAAkB,KAAK,QAAQ;CAC7C,OAAO,gBAAgB,eAAe,KAAK,MAAM;AAClD"}
1
+ {"version":3,"file":"mongo-driver-GbMQwUg3-Cx-f8nHb.mjs","names":[],"sources":["../../../../3-mongo-target/3-mongo-driver/dist/mongo-driver-GbMQwUg3.mjs"],"sourcesContent":["import { assertNever } from \"@internal/utils/internal-error\";\nimport { BSON, MongoClient } from \"mongodb\";\n//#endregion\n//#region src/core/driver-info.ts\nconst DRIVER_INFO = {\n\tname: \"Prisma\",\n\tversion: \"8.0.0-rc.18-dev.33\"\n};\n//#endregion\n//#region src/mongo-driver.ts\n/* v8 ignore start */\nfunction unreachableKind(value) {\n\tconst candidate = value;\n\tif (typeof candidate === \"object\" && candidate !== null && \"kind\" in candidate && typeof candidate.kind === \"string\") return candidate.kind;\n\treturn \"unknown\";\n}\n/* v8 ignore stop */\nvar MongoDriverImpl = class MongoDriverImpl {\n\tdb;\n\tclient;\n\tconstructor(db, client) {\n\t\tthis.db = db;\n\t\tthis.client = client;\n\t}\n\tstatic async fromConnection(uri, dbName) {\n\t\tconst client = new MongoClient(uri, { driverInfo: DRIVER_INFO });\n\t\tawait client.connect();\n\t\treturn new MongoDriverImpl(client.db(dbName), client);\n\t}\n\tstatic fromDb(db) {\n\t\treturn new MongoDriverImpl(db, void 0);\n\t}\n\texecute(wireCommand) {\n\t\tswitch (wireCommand.kind) {\n\t\t\tcase \"insertOne\": return this.executeInsertOneCommand(wireCommand);\n\t\t\tcase \"updateOne\": return this.executeUpdateOneCommand(wireCommand);\n\t\t\tcase \"insertMany\": return this.executeInsertManyCommand(wireCommand);\n\t\t\tcase \"updateMany\": return this.executeUpdateManyCommand(wireCommand);\n\t\t\tcase \"deleteOne\": return this.executeDeleteOneCommand(wireCommand);\n\t\t\tcase \"deleteMany\": return this.executeDeleteManyCommand(wireCommand);\n\t\t\tcase \"findOneAndUpdate\": return this.executeFindOneAndUpdateCommand(wireCommand);\n\t\t\tcase \"findOneAndDelete\": return this.executeFindOneAndDeleteCommand(wireCommand);\n\t\t\tcase \"aggregate\": return this.executeAggregateCommand(wireCommand);\n\t\t\t// v8 ignore next 4\n\t\t\tdefault: return assertNever(wireCommand, `Unknown wire command kind: ${unreachableKind(wireCommand)}`);\n\t\t}\n\t}\n\tasync run(wireCommand) {\n\t\tswitch (wireCommand.kind) {\n\t\t\tcase \"createCollection\": return this.executeCreateCollectionCommand(wireCommand);\n\t\t\tcase \"createIndex\": return this.executeCreateIndexCommand(wireCommand);\n\t\t\tcase \"dropCollection\": return this.executeDropCollectionCommand(wireCommand);\n\t\t\tcase \"renameCollection\": return this.executeRenameCollectionCommand(wireCommand);\n\t\t\tcase \"dropIndex\": return this.executeDropIndexCommand(wireCommand);\n\t\t\tcase \"collMod\": return this.executeCollModCommand(wireCommand);\n\t\t\t// v8 ignore next 4\n\t\t\tdefault: return assertNever(wireCommand, `Unknown DDL wire command kind: ${unreachableKind(wireCommand)}`);\n\t\t}\n\t}\n\tasync close() {\n\t\tawait this.client?.close();\n\t}\n\tasync *executeInsertOneCommand(cmd) {\n\t\tconst result = await this.db.collection(cmd.collection).insertOne(cmd.document);\n\t\tyield {\n\t\t\tinsertedId: result.insertedId,\n\t\t\tdocument: this.asRead({\n\t\t\t\t_id: result.insertedId,\n\t\t\t\t...cmd.document\n\t\t\t})\n\t\t};\n\t}\n\t/**\n\t* The server stores an inserted document as the driver wrote it, apart from moving `_id` first, so writing it to BSON and reading it back with the client's options gives what a read returns, without a query.\n\t*/\n\tasRead(document) {\n\t\tconst { raw: _raw, ...options } = this.db.bsonOptions;\n\t\treturn BSON.deserialize(BSON.serialize(document, options), options);\n\t}\n\tasync *executeUpdateOneCommand(cmd) {\n\t\tconst result = await this.db.collection(cmd.collection).updateOne(cmd.filter, cmd.update, { upsert: cmd.upsert });\n\t\tyield {\n\t\t\tmatchedCount: result.matchedCount,\n\t\t\tmodifiedCount: result.modifiedCount,\n\t\t\tupsertedCount: result.upsertedCount,\n\t\t\tupsertedId: result.upsertedId ?? void 0\n\t\t};\n\t}\n\tasync *executeInsertManyCommand(cmd) {\n\t\tconst result = await this.db.collection(cmd.collection).insertMany(cmd.documents);\n\t\tconst insertedIds = Object.values(result.insertedIds);\n\t\tyield {\n\t\t\tinsertedIds,\n\t\t\tinsertedCount: result.insertedCount,\n\t\t\tdocuments: cmd.documents.map((document, index) => this.asRead({\n\t\t\t\t_id: insertedIds[index],\n\t\t\t\t...document\n\t\t\t}))\n\t\t};\n\t}\n\tasync *executeUpdateManyCommand(cmd) {\n\t\tconst result = await this.db.collection(cmd.collection).updateMany(cmd.filter, cmd.update, {\n\t\t\tupsert: cmd.upsert,\n\t\t\t...cmd.bypassDocumentValidation ? { bypassDocumentValidation: true } : {}\n\t\t});\n\t\tyield {\n\t\t\tmatchedCount: result.matchedCount,\n\t\t\tmodifiedCount: result.modifiedCount,\n\t\t\tupsertedCount: result.upsertedCount,\n\t\t\tupsertedId: result.upsertedId ?? void 0\n\t\t};\n\t}\n\tasync *executeDeleteOneCommand(cmd) {\n\t\tyield { deletedCount: (await this.db.collection(cmd.collection).deleteOne(cmd.filter)).deletedCount };\n\t}\n\tasync *executeDeleteManyCommand(cmd) {\n\t\tyield { deletedCount: (await this.db.collection(cmd.collection).deleteMany(cmd.filter)).deletedCount };\n\t}\n\tasync *executeFindOneAndUpdateCommand(cmd) {\n\t\tconst result = await this.db.collection(cmd.collection).findOneAndUpdate(cmd.filter, cmd.update, {\n\t\t\tupsert: cmd.upsert,\n\t\t\t...cmd.returnDocument != null ? { returnDocument: cmd.returnDocument } : {},\n\t\t\t...cmd.sort != null ? { sort: cmd.sort } : {}\n\t\t});\n\t\tif (result) yield result;\n\t}\n\tasync *executeFindOneAndDeleteCommand(cmd) {\n\t\tconst result = await this.db.collection(cmd.collection).findOneAndDelete(cmd.filter, { ...cmd.sort != null ? { sort: cmd.sort } : {} });\n\t\tif (result) yield result;\n\t}\n\tasync *executeAggregateCommand(cmd) {\n\t\tyield* this.db.collection(cmd.collection).aggregate(cmd.pipeline);\n\t}\n\tasync executeCreateCollectionCommand(cmd) {\n\t\tconst { validator, validationLevel, validationAction, capped, size, max, timeseries, collation, changeStreamPreAndPostImages, clusteredIndex } = cmd;\n\t\tawait this.db.createCollection(cmd.collection, {\n\t\t\t...validator !== void 0 ? { validator } : {},\n\t\t\t...validationLevel !== void 0 ? { validationLevel } : {},\n\t\t\t...validationAction !== void 0 ? { validationAction } : {},\n\t\t\t...capped !== void 0 ? { capped } : {},\n\t\t\t...size !== void 0 ? { size } : {},\n\t\t\t...max !== void 0 ? { max } : {},\n\t\t\t...timeseries !== void 0 ? { timeseries } : {},\n\t\t\t...collation !== void 0 ? { collation } : {},\n\t\t\t...changeStreamPreAndPostImages !== void 0 ? { changeStreamPreAndPostImages } : {},\n\t\t\t...clusteredIndex !== void 0 ? { clusteredIndex } : {}\n\t\t});\n\t}\n\tasync executeCreateIndexCommand(cmd) {\n\t\tconst { unique, sparse, expireAfterSeconds, partialFilterExpression, name, wildcardProjection, collation, weights, default_language, language_override } = cmd;\n\t\tawait this.db.collection(cmd.collection).createIndex(cmd.key, {\n\t\t\t...unique !== void 0 ? { unique } : {},\n\t\t\t...sparse !== void 0 ? { sparse } : {},\n\t\t\t...expireAfterSeconds !== void 0 ? { expireAfterSeconds } : {},\n\t\t\t...partialFilterExpression !== void 0 ? { partialFilterExpression } : {},\n\t\t\t...name !== void 0 ? { name } : {},\n\t\t\t...wildcardProjection !== void 0 ? { wildcardProjection } : {},\n\t\t\t...collation !== void 0 ? { collation } : {},\n\t\t\t...weights !== void 0 ? { weights } : {},\n\t\t\t...default_language !== void 0 ? { default_language } : {},\n\t\t\t...language_override !== void 0 ? { language_override } : {}\n\t\t});\n\t}\n\tasync executeDropCollectionCommand(cmd) {\n\t\tawait this.db.collection(cmd.collection).drop();\n\t}\n\tasync executeRenameCollectionCommand(cmd) {\n\t\tawait this.db.renameCollection(cmd.collection, cmd.to);\n\t}\n\tasync executeDropIndexCommand(cmd) {\n\t\tawait this.db.collection(cmd.collection).dropIndex(cmd.name);\n\t}\n\tasync executeCollModCommand(cmd) {\n\t\tconst { validator, validationLevel, validationAction, changeStreamPreAndPostImages } = cmd;\n\t\tawait this.db.command({\n\t\t\tcollMod: cmd.collection,\n\t\t\t...validator !== void 0 ? { validator } : {},\n\t\t\t...validationLevel !== void 0 ? { validationLevel } : {},\n\t\t\t...validationAction !== void 0 ? { validationAction } : {},\n\t\t\t...changeStreamPreAndPostImages !== void 0 ? { changeStreamPreAndPostImages } : {}\n\t\t});\n\t}\n};\nasync function createMongoDriver(uri, dbName) {\n\treturn MongoDriverImpl.fromConnection(uri, dbName);\n}\n//#endregion\nexport { createMongoDriver as n, DRIVER_INFO as r, MongoDriverImpl as t };\n\n//# sourceMappingURL=mongo-driver-GbMQwUg3.mjs.map"],"mappings":";;;AAIA,MAAM,cAAc;CACnB,MAAM;CACN,SAAS;AACV;;AAIA,SAAS,gBAAgB,OAAO;CAC/B,MAAM,YAAY;CAClB,IAAI,OAAO,cAAc,YAAY,cAAc,QAAQ,UAAU,aAAa,OAAO,UAAU,SAAS,UAAU,OAAO,UAAU;CACvI,OAAO;AACR;;AAEA,IAAI,kBAAkB,MAAM,gBAAgB;CAC3C;CACA;CACA,YAAY,IAAI,QAAQ;EACvB,KAAK,KAAK;EACV,KAAK,SAAS;CACf;CACA,aAAa,eAAe,KAAK,QAAQ;EACxC,MAAM,SAAS,IAAI,YAAY,KAAK,EAAE,YAAY,YAAY,CAAC;EAC/D,MAAM,OAAO,QAAQ;EACrB,OAAO,IAAI,gBAAgB,OAAO,GAAG,MAAM,GAAG,MAAM;CACrD;CACA,OAAO,OAAO,IAAI;EACjB,OAAO,IAAI,gBAAgB,IAAI,KAAK,CAAC;CACtC;CACA,QAAQ,aAAa;EACpB,QAAQ,YAAY,MAApB;GACC,KAAK,aAAa,OAAO,KAAK,wBAAwB,WAAW;GACjE,KAAK,aAAa,OAAO,KAAK,wBAAwB,WAAW;GACjE,KAAK,cAAc,O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SAAS,IAAI;GACb,GAAG,cAAc,KAAK,IAAI,EAAE,UAAU,IAAI,CAAC;GAC3C,GAAG,oBAAoB,KAAK,IAAI,EAAE,gBAAgB,IAAI,CAAC;GACvD,GAAG,qBAAqB,KAAK,IAAI,EAAE,iBAAiB,IAAI,CAAC;GACzD,GAAG,iCAAiC,KAAK,IAAI,EAAE,6BAA6B,IAAI,CAAC;EAClF,CAAC;CACF;AACD;AACA,eAAe,kBAAkB,KAAK,QAAQ;CAC7C,OAAO,gBAAgB,eAAe,KAAK,MAAM;AAClD"}
@@ -1,4 +1,4 @@
1
- import { a as ParameterizedOutputTypesForTypeParams, i as CodecTypes } from "./codec-types-DHjpzMTv.mjs";
1
+ import { a as ParameterizedOutputTypesForTypeParams, i as CodecTypes } from "./codec-types-Daq7xQEA.mjs";
2
2
  import { AnyCodecDescriptor } from "@prisma/orm-framework/components/codec";
3
3
  import { ControlMutationDefaults } from "@prisma/orm-framework/components/control";
4
4
  //#region ../../../3-mongo-target/1-mongo-target/dist/pack.d.mts
@@ -227,4 +227,4 @@ declare const mongoTargetPack: {
227
227
  };
228
228
  //#endregion
229
229
  export { mongoTargetPack as t };
230
- //# sourceMappingURL=pack-BuZ5LBMg.d.mts.map
230
+ //# sourceMappingURL=pack-FxKc7yY0.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pack-BuZ5LBMg.d.mts","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/pack.d.mts"],"mappings":";;;;;cAIc;WACH;aACE;eACE;eACA;iBACE;iBACA;iBACA;iBACA;;iBAEA;iBACA;iBACA;iBACA;;eAEF,QAAQ;iBACN;;iBAEA;;iBAEA;mBACE;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;;;;mBAIN;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;;;;;;;aAOZ;eACE;eACA,QAAQ;iBACN;;iBAEA;;iBAEA;mBACE;qBACE;qBACA;;;;;aAKR;eACE;eACA,QAAQ;iBACN;;iBAEA;;iBAEA;mBACE;qBACE;qBACA;;mBAEF;qBACE;qBACA;;;;;;;;;cASP;WACH;aACE;eACE;iBACE;mBACE;mBACA;qBACE;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;;mBAEF,QAAQ;qBACN;;qBAEA;;qBAEA;uBACE;yBACE;yBACA;yBACA;2BACE;6BACE;6BACA;;;;uBAIN;yBACE;yBACA;yBACA;2BACE;6BACE;6BACA;;;;;;;iBAOZ;mBACE;mBACA,QAAQ;qBACN;;qBAEA;;qBAEA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA,QAAQ;qBACN;;qBAEA;;qBAEA;uBACE;yBACE;yBACA;;uBAEF;yBACE;yBACA;;;;;;;;WAQd;aACE,yBAAyB;aACzB;eACE;;;WAGJ;aACE;aACA;eACE;;aAEF,wEAAwE;;WAE1E;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,mEAAmE;WACnE;aACE;eACE,0EAA0E;;;WAG9E,eAAe;WACf,6BAA6B;;cAE1B,kCAAkC;WACrC,eAAe;WACf,6BAA6B;;;;cAI1B;WACH;WACA;WACA;WACA;WACA;WACA,cAAc;WACd;WACA;aACE;eACE,kBAAkB,cAAc;;;WAGpC;aACE,cAAc;;WAEhB,yBAAyB;WACzB,2BAA2B,0BAA0B;WACrD,eAAe;WACf,6BAA6B"}
1
+ {"version":3,"file":"pack-FxKc7yY0.d.mts","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/pack.d.mts"],"mappings":";;;;;cAIc;WACH;aACE;eACE;eACA;iBACE;iBACA;iBACA;iBACA;;iBAEA;iBACA;iBACA;iBACA;;eAEF,QAAQ;iBACN;;iBAEA;;iBAEA;mBACE;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;;;;mBAIN;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;;;;;;;aAOZ;eACE;eACA,QAAQ;iBACN;;iBAEA;;iBAEA;mBACE;qBACE;qBACA;;;;;aAKR;eACE;eACA,QAAQ;iBACN;;iBAEA;;iBAEA;mBACE;qBACE;qBACA;;mBAEF;qBACE;qBACA;;;;;;;;;cASP;WACH;aACE;eACE;iBACE;mBACE;mBACA;qBACE;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;;mBAEF,QAAQ;qBACN;;qBAEA;;qBAEA;uBACE;yBACE;yBACA;yBACA;2BACE;6BACE;6BACA;;;;uBAIN;yBACE;yBACA;yBACA;2BACE;6BACE;6BACA;;;;;;;iBAOZ;mBACE;mBACA,QAAQ;qBACN;;qBAEA;;qBAEA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA,QAAQ;qBACN;;qBAEA;;qBAEA;uBACE;yBACE;yBACA;;uBAEF;yBACE;yBACA;;;;;;;;WAQd;aACE,yBAAyB;aACzB;eACE;;;WAGJ;aACE;aACA;eACE;;aAEF,wEAAwE;;WAE1E;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,mEAAmE;WACnE;aACE;eACE,0EAA0E;;;WAG9E,eAAe;WACf,6BAA6B;;cAE1B,kCAAkC;WACrC,eAAe;WACf,6BAA6B;;;;cAI1B;WACH;WACA;WACA;WACA;WACA;WACA,cAAc;WACd;WACA;aACE;eACE,kBAAkB,cAAc;;;WAGpC;aACE,cAAc;;WAEhB,yBAAyB;WACzB,2BAA2B,0BAA0B;WACrD,eAAe;WACf,6BAA6B"}
@@ -1,5 +1,5 @@
1
1
  import { a as MONGO_DECIMAL128_CODEC_ID, c as MONGO_INT64_CODEC_ID, d as MONGO_OBJECTID_CODEC_ID, f as MONGO_STRING_CODEC_ID, i as MONGO_DATE_CODEC_ID, l as MONGO_INT64_NUMBER_CODEC_ID, n as MONGO_BOOLEAN_CODEC_ID, o as MONGO_DOUBLE_CODEC_ID, s as MONGO_INT32_CODEC_ID, t as MONGO_BINARY_CODEC_ID, u as MONGO_JSON_CODEC_ID } from "./codec-ids-WdrumsYA-BkQfspmL.mjs";
2
- import { t as mongoTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-D0YxXi85-CjeTEg7T.mjs";
2
+ import { t as mongoTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-DeRjCidG-BzMW-qkN.mjs";
3
3
  //#region ../../../3-mongo-target/1-mongo-target/dist/prisma6-binding.mjs
4
4
  /**
5
5
  * What the Mongo target supplies to the Prisma 6 schema reader: the datasource provider it reads, the codec each Prisma 6 scalar and native type maps to, the codec an `@id` must have, and the generator `now()` and `@updatedAt` lower to. Each codec is the one for the BSON type Prisma 6 stores (ADR 257), with the application type the Prisma 6 client presents: a plain `Int` is a BSON long read as a `number`.
@@ -42,4 +42,4 @@ const prisma6MongoBinding = {
42
42
  //#endregion
43
43
  export { prisma6MongoBinding as t };
44
44
 
45
- //# sourceMappingURL=prisma6-binding-DKZXqEL5.mjs.map
45
+ //# sourceMappingURL=prisma6-binding-L_x2s5FV.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"prisma6-binding-DKZXqEL5.mjs","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/prisma6-binding.mjs"],"sourcesContent":["import { a as MONGO_DECIMAL128_CODEC_ID, c as MONGO_INT64_CODEC_ID, d as MONGO_OBJECTID_CODEC_ID, f as MONGO_STRING_CODEC_ID, i as MONGO_DATE_CODEC_ID, l as MONGO_INT64_NUMBER_CODEC_ID, n as MONGO_BOOLEAN_CODEC_ID, o as MONGO_DOUBLE_CODEC_ID, s as MONGO_INT32_CODEC_ID, t as MONGO_BINARY_CODEC_ID, u as MONGO_JSON_CODEC_ID } from \"./codec-ids-WdrumsYA.mjs\";\nimport { t as mongoTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-D0YxXi85.mjs\";\n/**\n* What the Mongo target supplies to the Prisma 6 schema reader: the datasource provider it reads, the codec each Prisma 6 scalar and native type maps to, the codec an `@id` must have, and the generator `now()` and `@updatedAt` lower to. Each codec is the one for the BSON type Prisma 6 stores (ADR 257), with the application type the Prisma 6 client presents: a plain `Int` is a BSON long read as a `number`.\n*/\nconst prisma6MongoBinding = {\n\ttarget: mongoTargetDescriptorMetaRuntime,\n\tproviders: [\"mongodb\"],\n\tscalarCodecIds: {\n\t\tString: MONGO_STRING_CODEC_ID,\n\t\tInt: MONGO_INT64_NUMBER_CODEC_ID,\n\t\tFloat: MONGO_DOUBLE_CODEC_ID,\n\t\tBoolean: MONGO_BOOLEAN_CODEC_ID,\n\t\tDateTime: MONGO_DATE_CODEC_ID,\n\t\tBigInt: MONGO_INT64_CODEC_ID,\n\t\tDecimal: MONGO_DECIMAL128_CODEC_ID,\n\t\tBytes: MONGO_BINARY_CODEC_ID,\n\t\tJson: MONGO_JSON_CODEC_ID\n\t},\n\tnativeTypeCodecIds: {\n\t\tString: {\n\t\t\t\"db.String\": MONGO_STRING_CODEC_ID,\n\t\t\t\"db.ObjectId\": MONGO_OBJECTID_CODEC_ID\n\t\t},\n\t\tBoolean: { \"db.Bool\": MONGO_BOOLEAN_CODEC_ID },\n\t\tInt: {\n\t\t\t\"db.Int\": MONGO_INT32_CODEC_ID,\n\t\t\t\"db.Long\": MONGO_INT64_NUMBER_CODEC_ID\n\t\t},\n\t\tBigInt: { \"db.Long\": MONGO_INT64_CODEC_ID },\n\t\tFloat: { \"db.Double\": MONGO_DOUBLE_CODEC_ID },\n\t\tDateTime: { \"db.Date\": MONGO_DATE_CODEC_ID },\n\t\tBytes: {\n\t\t\t\"db.BinData\": MONGO_BINARY_CODEC_ID,\n\t\t\t\"db.ObjectId\": MONGO_OBJECTID_CODEC_ID\n\t\t},\n\t\tJson: { \"db.Json\": MONGO_JSON_CODEC_ID }\n\t},\n\tobjectIdCodecId: MONGO_OBJECTID_CODEC_ID\n};\n//#endregion\nexport { prisma6MongoBinding };\n\n//# sourceMappingURL=prisma6-binding.mjs.map"],"mappings":";;;;;;AAKA,MAAM,sBAAsB;CAC3B,QAAQ;CACR,WAAW,CAAC,SAAS;CACrB,gBAAgB;EACf,QAAQ;EACR,KAAK;EACL,OAAO;EACP,SAAS;EACT,UAAU;EACV,QAAQ;EACR,SAAS;EACT,OAAO;EACP,MAAM;CACP;CACA,oBAAoB;EACnB,QAAQ;GACP,aAAa;GACb,eAAe;EAChB;EACA,SAAS,EAAE,WAAW,uBAAuB;EAC7C,KAAK;GACJ,UAAU;GACV,WAAW;EACZ;EACA,QAAQ,EAAE,WAAW,qBAAqB;EAC1C,OAAO,EAAE,aAAa,sBAAsB;EAC5C,UAAU,EAAE,WAAW,oBAAoB;EAC3C,OAAO;GACN,cAAc;GACd,eAAe;EAChB;EACA,MAAM,EAAE,WAAW,oBAAoB;CACxC;CACA,iBAAiB;AAClB"}
1
+ {"version":3,"file":"prisma6-binding-L_x2s5FV.mjs","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/prisma6-binding.mjs"],"sourcesContent":["import { a as MONGO_DECIMAL128_CODEC_ID, c as MONGO_INT64_CODEC_ID, d as MONGO_OBJECTID_CODEC_ID, f as MONGO_STRING_CODEC_ID, i as MONGO_DATE_CODEC_ID, l as MONGO_INT64_NUMBER_CODEC_ID, n as MONGO_BOOLEAN_CODEC_ID, o as MONGO_DOUBLE_CODEC_ID, s as MONGO_INT32_CODEC_ID, t as MONGO_BINARY_CODEC_ID, u as MONGO_JSON_CODEC_ID } from \"./codec-ids-WdrumsYA.mjs\";\nimport { t as mongoTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-DeRjCidG.mjs\";\n/**\n* What the Mongo target supplies to the Prisma 6 schema reader: the datasource provider it reads, the codec each Prisma 6 scalar and native type maps to, the codec an `@id` must have, and the generator `now()` and `@updatedAt` lower to. Each codec is the one for the BSON type Prisma 6 stores (ADR 257), with the application type the Prisma 6 client presents: a plain `Int` is a BSON long read as a `number`.\n*/\nconst prisma6MongoBinding = {\n\ttarget: mongoTargetDescriptorMetaRuntime,\n\tproviders: [\"mongodb\"],\n\tscalarCodecIds: {\n\t\tString: MONGO_STRING_CODEC_ID,\n\t\tInt: MONGO_INT64_NUMBER_CODEC_ID,\n\t\tFloat: MONGO_DOUBLE_CODEC_ID,\n\t\tBoolean: MONGO_BOOLEAN_CODEC_ID,\n\t\tDateTime: MONGO_DATE_CODEC_ID,\n\t\tBigInt: MONGO_INT64_CODEC_ID,\n\t\tDecimal: MONGO_DECIMAL128_CODEC_ID,\n\t\tBytes: MONGO_BINARY_CODEC_ID,\n\t\tJson: MONGO_JSON_CODEC_ID\n\t},\n\tnativeTypeCodecIds: {\n\t\tString: {\n\t\t\t\"db.String\": MONGO_STRING_CODEC_ID,\n\t\t\t\"db.ObjectId\": MONGO_OBJECTID_CODEC_ID\n\t\t},\n\t\tBoolean: { \"db.Bool\": MONGO_BOOLEAN_CODEC_ID },\n\t\tInt: {\n\t\t\t\"db.Int\": MONGO_INT32_CODEC_ID,\n\t\t\t\"db.Long\": MONGO_INT64_NUMBER_CODEC_ID\n\t\t},\n\t\tBigInt: { \"db.Long\": MONGO_INT64_CODEC_ID },\n\t\tFloat: { \"db.Double\": MONGO_DOUBLE_CODEC_ID },\n\t\tDateTime: { \"db.Date\": MONGO_DATE_CODEC_ID },\n\t\tBytes: {\n\t\t\t\"db.BinData\": MONGO_BINARY_CODEC_ID,\n\t\t\t\"db.ObjectId\": MONGO_OBJECTID_CODEC_ID\n\t\t},\n\t\tJson: { \"db.Json\": MONGO_JSON_CODEC_ID }\n\t},\n\tobjectIdCodecId: MONGO_OBJECTID_CODEC_ID\n};\n//#endregion\nexport { prisma6MongoBinding };\n\n//# sourceMappingURL=prisma6-binding.mjs.map"],"mappings":";;;;;;AAKA,MAAM,sBAAsB;CAC3B,QAAQ;CACR,WAAW,CAAC,SAAS;CACrB,gBAAgB;EACf,QAAQ;EACR,KAAK;EACL,OAAO;EACP,SAAS;EACT,UAAU;EACV,QAAQ;EACR,SAAS;EACT,OAAO;EACP,MAAM;CACP;CACA,oBAAoB;EACnB,QAAQ;GACP,aAAa;GACb,eAAe;EAChB;EACA,SAAS,EAAE,WAAW,uBAAuB;EAC7C,KAAK;GACJ,UAAU;GACV,WAAW;EACZ;EACA,QAAQ,EAAE,WAAW,qBAAqB;EAC1C,OAAO,EAAE,aAAa,sBAAsB;EAC5C,UAAU,EAAE,WAAW,oBAAoB;EAC3C,OAAO;GACN,cAAc;GACd,eAAe;EAChB;EACA,MAAM,EAAE,WAAW,oBAAoB;CACxC;CACA,iBAAiB;AAClB"}
package/dist/target.d.mts CHANGED
@@ -1,11 +1,11 @@
1
1
  import { a as MONGO_DECIMAL128_CODEC_ID, c as MONGO_INT64_CODEC_ID, d as MONGO_OBJECTID_CODEC_ID, f as MONGO_STRING_CODEC_ID, i as MONGO_DATE_CODEC_ID, l as MONGO_INT64_NUMBER_CODEC_ID, n as MONGO_BOOLEAN_CODEC_ID, o as MONGO_DOUBLE_CODEC_ID, p as MONGO_VECTOR_CODEC_ID, r as MONGO_BSON_CODEC_ID, s as MONGO_INT32_CODEC_ID, t as MONGO_BINARY_CODEC_ID, u as MONGO_JSON_CODEC_ID } from "./codec-ids-PSU05uwH.mjs";
2
- import { a as ParameterizedOutputTypesForTypeParams, i as CodecTypes, n as BsonScalar, o as Vector, r as BsonValue, t as BsonInputValue } from "./codec-types-DHjpzMTv.mjs";
2
+ import { a as ParameterizedOutputTypesForTypeParams, i as CodecTypes, n as BsonScalar, o as Vector, r as BsonValue, t as BsonInputValue } from "./codec-types-Daq7xQEA.mjs";
3
3
  import { i as mongoStandardCodecs, n as mongoCodecDescriptors, r as mongoDescriptorById, t as buildStandardCodecRegistry } from "./codecs-DBvHcdHp.mjs";
4
4
  import { a as DropCollectionCall, c as RenameCollectionCall, d as schemaCollectionToCreateCollectionOptions, f as schemaIndexToCreateIndexOptions, i as CreateIndexCall, l as RenameFieldCall, n as CollModMeta, o as DropIndexCall, r as CreateCollectionCall, s as OpFactoryCall$1, t as CollModCall, u as UnsetFieldCall } from "./op-factory-call-BoYr7vvM-PXfT4zvm.mjs";
5
5
  import { _ as renderOps, a as MongoTargetContract, c as MongoTargetSchemaVerifier, d as PlannerProducedMongoMigration, f as RenderMigrationMeta, g as renderCallsToTypeScript, h as mongoTargetDescriptor, i as MongoMigrationRunnerExecuteOptions, l as MongoTargetUnboundDatabase, m as deserializeMongoOps, n as MongoMigrationPlanner, o as MongoTargetContractSerializer, p as deserializeMongoOp, r as MongoMigrationRunner, s as MongoTargetDatabase, t as FilterEvaluator, u as PlanCallsResult, v as serializeMongoOps } from "./control-DpeYOTlN.mjs";
6
6
  import { a as mongoDate, c as mongoInt32, d as mongoObjectId, f as mongoString, i as mongoDataTypes, l as mongoInt64, m as mongoVectorParams, n as mongoBool, o as mongoDecimal128, p as mongoVector, r as mongoBson, s as mongoDouble, t as mongoBinary, u as mongoJson } from "./data-types-BS2Wy4k-.mjs";
7
7
  import { a as createIndex, c as dropIndex, d as renameField, f as setValidation, i as createCollection, l as placeholder, m as validatedCollection, n as MigrationCLI, o as dataTransform, p as unsetField, r as collMod, s as dropCollection, t as Migration, u as renameCollection } from "./migration-DKoUk2CF.mjs";
8
- import "./pack-BuZ5LBMg.mjs";
8
+ import "./pack-FxKc7yY0.mjs";
9
9
  import { t as prisma6MongoBinding } from "./prisma6-binding-DRM8QnmA.mjs";
10
10
  import { t as MongoRuntimeTargetInstance } from "./runtime-B9_-kjBX.mjs";
11
11
  export { type BsonInputValue, type BsonScalar, type BsonValue, CodecTypes, CollModCall, type CollModMeta, CreateCollectionCall, CreateIndexCall, DropCollectionCall, DropIndexCall, FilterEvaluator, MONGO_BINARY_CODEC_ID, MONGO_BOOLEAN_CODEC_ID, MONGO_BSON_CODEC_ID, MONGO_DATE_CODEC_ID, MONGO_DECIMAL128_CODEC_ID, MONGO_DOUBLE_CODEC_ID, MONGO_INT32_CODEC_ID, MONGO_INT64_CODEC_ID, MONGO_INT64_NUMBER_CODEC_ID, MONGO_JSON_CODEC_ID, MONGO_OBJECTID_CODEC_ID, MONGO_STRING_CODEC_ID, MONGO_VECTOR_CODEC_ID, Migration, MigrationCLI, MongoMigrationPlanner, MongoMigrationRunner, type MongoMigrationRunnerExecuteOptions, MongoRuntimeTargetInstance, type MongoTargetContract, MongoTargetContractSerializer, MongoTargetDatabase, MongoTargetSchemaVerifier, MongoTargetUnboundDatabase, type OpFactoryCall$1 as OpFactoryCall, ParameterizedOutputTypesForTypeParams, type PlanCallsResult, PlannerProducedMongoMigration, RenameCollectionCall, RenameFieldCall, type RenderMigrationMeta, UnsetFieldCall, Vector, buildStandardCodecRegistry, collMod, createCollection, createIndex, dataTransform, deserializeMongoOp, deserializeMongoOps, dropCollection, dropIndex, mongoBinary, mongoBool, mongoBson, mongoCodecDescriptors, mongoDataTypes, mongoDate, mongoDecimal128, mongoDescriptorById, mongoDouble, mongoInt32, mongoInt64, mongoJson, mongoObjectId, mongoStandardCodecs, mongoString, mongoTargetDescriptor, mongoVector, mongoVectorParams, placeholder, prisma6MongoBinding, renameCollection, renameField, renderCallsToTypeScript, renderOps, schemaCollectionToCreateCollectionOptions, schemaIndexToCreateIndexOptions, serializeMongoOps, setValidation, unsetField, validatedCollection };
package/dist/target.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import { a as MONGO_DECIMAL128_CODEC_ID, c as MONGO_INT64_CODEC_ID, d as MONGO_OBJECTID_CODEC_ID, f as MONGO_STRING_CODEC_ID, i as MONGO_DATE_CODEC_ID, l as MONGO_INT64_NUMBER_CODEC_ID, n as MONGO_BOOLEAN_CODEC_ID, o as MONGO_DOUBLE_CODEC_ID, p as MONGO_VECTOR_CODEC_ID, r as MONGO_BSON_CODEC_ID, s as MONGO_INT32_CODEC_ID, t as MONGO_BINARY_CODEC_ID, u as MONGO_JSON_CODEC_ID } from "./codec-ids-WdrumsYA-BkQfspmL.mjs";
2
- import { B as mongoInt32, F as mongoBson, G as mongoVector, H as mongoJson, I as mongoDataTypes, K as mongoVectorParams, L as mongoDate, N as mongoBinary, P as mongoBool, R as mongoDecimal128, U as mongoObjectId, V as mongoInt64, W as mongoString, z as mongoDouble } from "./data-types-vptiHFHC-LUJwNRIq.mjs";
3
- import { i as mongoStandardCodecs, n as mongoCodecDescriptors, r as mongoDescriptorById, t as buildStandardCodecRegistry } from "./codecs-BVrMDhha-DBl_TLS8.mjs";
2
+ import { B as mongoJson, F as mongoDate, H as mongoString, I as mongoDecimal128, L as mongoDouble, M as mongoBool, N as mongoBson, P as mongoDataTypes, R as mongoInt32, U as mongoVector, V as mongoObjectId, W as mongoVectorParams, j as mongoBinary, z as mongoInt64 } from "./data-types-BUNJnoE9-S7P2K-7r.mjs";
3
+ import { i as mongoStandardCodecs, n as mongoCodecDescriptors, r as mongoDescriptorById, t as buildStandardCodecRegistry } from "./codecs-CylyDRI5-DdzCZHek.mjs";
4
4
  import { a as dropCollection, c as renameField, d as unsetField, f as validatedCollection, i as dataTransform, l as setValidation, n as createCollection, o as dropIndex, r as createIndex, s as renameCollection, t as collMod } from "./migration-factories-jwrORVMV-BGqJk_WT.mjs";
5
- import { C as schemaIndexToCreateIndexOptions, S as schemaCollectionToCreateCollectionOptions, _ as deserializeMongoOp, a as DropIndexCall, b as renderCallsToTypeScript, c as MongoMigrationRunner, d as MongoTargetSchemaVerifier, f as MongoTargetUnboundDatabase, g as UnsetFieldCall, h as RenameFieldCall, i as DropCollectionCall, l as MongoTargetContractSerializer, m as RenameCollectionCall, n as CreateCollectionCall, o as FilterEvaluator, p as PlannerProducedMongoMigration, r as CreateIndexCall, s as MongoMigrationPlanner, t as CollModCall, u as MongoTargetDatabase, v as deserializeMongoOps, w as serializeMongoOps, x as renderOps, y as mongoTargetDescriptor } from "./control-CfztdRLD.mjs";
5
+ import { C as schemaIndexToCreateIndexOptions, S as schemaCollectionToCreateCollectionOptions, _ as deserializeMongoOp, a as DropIndexCall, b as renderCallsToTypeScript, c as MongoMigrationRunner, d as MongoTargetSchemaVerifier, f as MongoTargetUnboundDatabase, g as UnsetFieldCall, h as RenameFieldCall, i as DropCollectionCall, l as MongoTargetContractSerializer, m as RenameCollectionCall, n as CreateCollectionCall, o as FilterEvaluator, p as PlannerProducedMongoMigration, r as CreateIndexCall, s as MongoMigrationPlanner, t as CollModCall, u as MongoTargetDatabase, v as deserializeMongoOps, w as serializeMongoOps, x as renderOps, y as mongoTargetDescriptor } from "./control-BkNtJldI.mjs";
6
6
  import { n as MigrationCLI, r as placeholder, t as Migration } from "./migration-C-jfTsGU.mjs";
7
- import { t as prisma6MongoBinding } from "./prisma6-binding-DKZXqEL5.mjs";
7
+ import { t as prisma6MongoBinding } from "./prisma6-binding-L_x2s5FV.mjs";
8
8
  export { CollModCall, CreateCollectionCall, CreateIndexCall, DropCollectionCall, DropIndexCall, FilterEvaluator, MONGO_BINARY_CODEC_ID, MONGO_BOOLEAN_CODEC_ID, MONGO_BSON_CODEC_ID, MONGO_DATE_CODEC_ID, MONGO_DECIMAL128_CODEC_ID, MONGO_DOUBLE_CODEC_ID, MONGO_INT32_CODEC_ID, MONGO_INT64_CODEC_ID, MONGO_INT64_NUMBER_CODEC_ID, MONGO_JSON_CODEC_ID, MONGO_OBJECTID_CODEC_ID, MONGO_STRING_CODEC_ID, MONGO_VECTOR_CODEC_ID, Migration, MigrationCLI, MongoMigrationPlanner, MongoMigrationRunner, MongoTargetContractSerializer, MongoTargetDatabase, MongoTargetSchemaVerifier, MongoTargetUnboundDatabase, PlannerProducedMongoMigration, RenameCollectionCall, RenameFieldCall, UnsetFieldCall, buildStandardCodecRegistry, collMod, createCollection, createIndex, dataTransform, deserializeMongoOp, deserializeMongoOps, dropCollection, dropIndex, mongoBinary, mongoBool, mongoBson, mongoCodecDescriptors, mongoDataTypes, mongoDate, mongoDecimal128, mongoDescriptorById, mongoDouble, mongoInt32, mongoInt64, mongoJson, mongoObjectId, mongoStandardCodecs, mongoString, mongoTargetDescriptor, mongoVector, mongoVectorParams, placeholder, prisma6MongoBinding, renameCollection, renameField, renderCallsToTypeScript, renderOps, schemaCollectionToCreateCollectionOptions, schemaIndexToCreateIndexOptions, serializeMongoOps, setValidation, unsetField, validatedCollection };
@@ -1,2 +1,2 @@
1
- import { a as ParameterizedOutputTypesForTypeParams, i as CodecTypes, n as BsonScalar, o as Vector, r as BsonValue, t as BsonInputValue } from "./codec-types-DHjpzMTv.mjs";
1
+ import { a as ParameterizedOutputTypesForTypeParams, i as CodecTypes, n as BsonScalar, o as Vector, r as BsonValue, t as BsonInputValue } from "./codec-types-Daq7xQEA.mjs";
2
2
  export { type BsonInputValue, type BsonScalar, type BsonValue, CodecTypes, ParameterizedOutputTypesForTypeParams, Vector };
@@ -1,2 +1,2 @@
1
- import { i as mongoStandardCodecs, n as mongoCodecDescriptors, r as mongoDescriptorById, t as buildStandardCodecRegistry } from "./codecs-BVrMDhha-DBl_TLS8.mjs";
1
+ import { i as mongoStandardCodecs, n as mongoCodecDescriptors, r as mongoDescriptorById, t as buildStandardCodecRegistry } from "./codecs-CylyDRI5-DdzCZHek.mjs";
2
2
  export { buildStandardCodecRegistry, mongoCodecDescriptors, mongoDescriptorById, mongoStandardCodecs };
@@ -1,2 +1,2 @@
1
- import { C as schemaIndexToCreateIndexOptions, S as schemaCollectionToCreateCollectionOptions, _ as deserializeMongoOp, a as DropIndexCall, b as renderCallsToTypeScript, c as MongoMigrationRunner, d as MongoTargetSchemaVerifier, f as MongoTargetUnboundDatabase, g as UnsetFieldCall, h as RenameFieldCall, i as DropCollectionCall, l as MongoTargetContractSerializer, m as RenameCollectionCall, n as CreateCollectionCall, o as FilterEvaluator, p as PlannerProducedMongoMigration, r as CreateIndexCall, s as MongoMigrationPlanner, t as CollModCall, u as MongoTargetDatabase, v as deserializeMongoOps, w as serializeMongoOps, x as renderOps, y as mongoTargetDescriptor } from "./control-CfztdRLD.mjs";
1
+ import { C as schemaIndexToCreateIndexOptions, S as schemaCollectionToCreateCollectionOptions, _ as deserializeMongoOp, a as DropIndexCall, b as renderCallsToTypeScript, c as MongoMigrationRunner, d as MongoTargetSchemaVerifier, f as MongoTargetUnboundDatabase, g as UnsetFieldCall, h as RenameFieldCall, i as DropCollectionCall, l as MongoTargetContractSerializer, m as RenameCollectionCall, n as CreateCollectionCall, o as FilterEvaluator, p as PlannerProducedMongoMigration, r as CreateIndexCall, s as MongoMigrationPlanner, t as CollModCall, u as MongoTargetDatabase, v as deserializeMongoOps, w as serializeMongoOps, x as renderOps, y as mongoTargetDescriptor } from "./control-BkNtJldI.mjs";
2
2
  export { CollModCall, CreateCollectionCall, CreateIndexCall, DropCollectionCall, DropIndexCall, FilterEvaluator, MongoMigrationPlanner, MongoMigrationRunner, MongoTargetContractSerializer, MongoTargetDatabase, MongoTargetSchemaVerifier, MongoTargetUnboundDatabase, PlannerProducedMongoMigration, RenameCollectionCall, RenameFieldCall, UnsetFieldCall, deserializeMongoOp, deserializeMongoOps, mongoTargetDescriptor, renderCallsToTypeScript, renderOps, schemaCollectionToCreateCollectionOptions, schemaIndexToCreateIndexOptions, serializeMongoOps };
@@ -1,2 +1,2 @@
1
- import { B as mongoInt32, F as mongoBson, G as mongoVector, H as mongoJson, I as mongoDataTypes, K as mongoVectorParams, L as mongoDate, N as mongoBinary, P as mongoBool, R as mongoDecimal128, U as mongoObjectId, V as mongoInt64, W as mongoString, z as mongoDouble } from "./data-types-vptiHFHC-LUJwNRIq.mjs";
1
+ import { B as mongoJson, F as mongoDate, H as mongoString, I as mongoDecimal128, L as mongoDouble, M as mongoBool, N as mongoBson, P as mongoDataTypes, R as mongoInt32, U as mongoVector, V as mongoObjectId, W as mongoVectorParams, j as mongoBinary, z as mongoInt64 } from "./data-types-BUNJnoE9-S7P2K-7r.mjs";
2
2
  export { mongoBinary, mongoBool, mongoBson, mongoDataTypes, mongoDate, mongoDecimal128, mongoDouble, mongoInt32, mongoInt64, mongoJson, mongoObjectId, mongoString, mongoVector, mongoVectorParams };
@@ -1,3 +1,3 @@
1
- import { a as ParameterizedOutputTypesForTypeParams, i as CodecTypes, o as Vector } from "./codec-types-DHjpzMTv.mjs";
2
- import { t as mongoTargetPack } from "./pack-BuZ5LBMg.mjs";
1
+ import { a as ParameterizedOutputTypesForTypeParams, i as CodecTypes, o as Vector } from "./codec-types-Daq7xQEA.mjs";
2
+ import { t as mongoTargetPack } from "./pack-FxKc7yY0.mjs";
3
3
  export { type CodecTypes, type ParameterizedOutputTypesForTypeParams, type Vector, mongoTargetPack as default };
@@ -1,4 +1,4 @@
1
- import { t as mongoTargetDescriptorMeta } from "./descriptor-meta-BQBreSNF-CZ9uOPwO.mjs";
1
+ import { t as mongoTargetDescriptorMeta } from "./descriptor-meta-DdeUSTJk-zJzD7C-n.mjs";
2
2
  //#region ../../../3-mongo-target/1-mongo-target/dist/pack.mjs
3
3
  const mongoTargetPack = mongoTargetDescriptorMeta;
4
4
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"target__pack.mjs","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/pack.mjs"],"sourcesContent":["import { t as mongoTargetDescriptorMeta } from \"./descriptor-meta-BQBreSNF.mjs\";\n//#region src/exports/pack.ts\nconst mongoTargetPack = mongoTargetDescriptorMeta;\n//#endregion\nexport { mongoTargetPack as default };\n\n//# sourceMappingURL=pack.mjs.map"],"mappings":";;AAEA,MAAM,kBAAkB"}
1
+ {"version":3,"file":"target__pack.mjs","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/pack.mjs"],"sourcesContent":["import { t as mongoTargetDescriptorMeta } from \"./descriptor-meta-DdeUSTJk.mjs\";\n//#region src/exports/pack.ts\nconst mongoTargetPack = mongoTargetDescriptorMeta;\n//#endregion\nexport { mongoTargetPack as default };\n\n//# sourceMappingURL=pack.mjs.map"],"mappings":";;AAEA,MAAM,kBAAkB"}
@@ -1,2 +1,2 @@
1
- import { t as prisma6MongoBinding } from "./prisma6-binding-DKZXqEL5.mjs";
1
+ import { t as prisma6MongoBinding } from "./prisma6-binding-L_x2s5FV.mjs";
2
2
  export { prisma6MongoBinding };
@@ -1,4 +1,4 @@
1
- import { t as mongoTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-D0YxXi85-CjeTEg7T.mjs";
1
+ import { t as mongoTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-DeRjCidG-BzMW-qkN.mjs";
2
2
  import { newMongoCodecRegistry } from "@prisma/orm-family-mongo/codec";
3
3
  //#region ../../../3-mongo-target/1-mongo-target/dist/runtime.mjs
4
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"target__runtime.mjs","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/runtime.mjs"],"sourcesContent":["import { t as mongoTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-D0YxXi85.mjs\";\nimport { newMongoCodecRegistry } from \"@internal/mongo-codec\";\n//#region src/exports/runtime.ts\n/**\n* Target-mongo deliberately does NOT import `MongoRuntimeTargetDescriptor` from `@internal/mongo-runtime`. The target package is a control-plane residence and must not pull the Mongo execution-plane package into its dependency closure. The runtime descriptor here is shaped to satisfy the framework's `RuntimeTargetDescriptor` plus the structural `MongoStaticContributions` (`codecs`) that `@internal/mongo-runtime`\n* consumers narrow to at composition time.\n*/\nconst mongoRuntimeTargetDescriptor = {\n\t...mongoTargetDescriptorMetaRuntime,\n\tcodecs: () => newMongoCodecRegistry(),\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"mongo\",\n\t\t\ttargetId: \"mongo\"\n\t\t};\n\t}\n};\n//#endregion\nexport { mongoRuntimeTargetDescriptor as default };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;AAOA,MAAM,+BAA+B;CACpC,GAAG;CACH,cAAc,sBAAsB;CACpC,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;AACD"}
1
+ {"version":3,"file":"target__runtime.mjs","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/runtime.mjs"],"sourcesContent":["import { t as mongoTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-DeRjCidG.mjs\";\nimport { newMongoCodecRegistry } from \"@internal/mongo-codec\";\n//#region src/exports/runtime.ts\n/**\n* Target-mongo deliberately does NOT import `MongoRuntimeTargetDescriptor` from `@internal/mongo-runtime`. The target package is a control-plane residence and must not pull the Mongo execution-plane package into its dependency closure. The runtime descriptor here is shaped to satisfy the framework's `RuntimeTargetDescriptor` plus the structural `MongoStaticContributions` (`codecs`) that `@internal/mongo-runtime`\n* consumers narrow to at composition time.\n*/\nconst mongoRuntimeTargetDescriptor = {\n\t...mongoTargetDescriptorMetaRuntime,\n\tcodecs: () => newMongoCodecRegistry(),\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"mongo\",\n\t\t\ttargetId: \"mongo\"\n\t\t};\n\t}\n};\n//#endregion\nexport { mongoRuntimeTargetDescriptor as default };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;AAOA,MAAM,+BAA+B;CACpC,GAAG;CACH,cAAc,sBAAsB;CACpC,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;AACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/orm-target-mongo",
3
- "version": "8.0.0-rc.18-dev.32",
3
+ "version": "8.0.0-rc.18-dev.33",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -9,18 +9,18 @@
9
9
  "dist"
10
10
  ],
11
11
  "dependencies": {
12
- "@prisma/orm-family-mongo": "8.0.0-rc.18-dev.32",
13
- "@prisma/orm-framework": "8.0.0-rc.18-dev.32",
14
- "@prisma/orm-toolchain": "8.0.0-rc.18-dev.32",
12
+ "@prisma/orm-family-mongo": "8.0.0-rc.18-dev.33",
13
+ "@prisma/orm-framework": "8.0.0-rc.18-dev.33",
14
+ "@prisma/orm-toolchain": "8.0.0-rc.18-dev.33",
15
15
  "arktype": "^2.2.2",
16
16
  "bson": "^7.2.0"
17
17
  },
18
18
  "devDependencies": {
19
- "@internal/adapter-mongo": "8.0.0-rc.18-dev.32",
20
- "@internal/driver-mongo": "8.0.0-rc.18-dev.32",
21
- "@internal/target-mongo": "8.0.0-rc.18-dev.32",
22
- "@repo/tsconfig": "8.0.0-rc.18-dev.32",
23
- "@repo/tsdown": "8.0.0-rc.18-dev.32",
19
+ "@internal/adapter-mongo": "8.0.0-rc.18-dev.33",
20
+ "@internal/driver-mongo": "8.0.0-rc.18-dev.33",
21
+ "@internal/target-mongo": "8.0.0-rc.18-dev.33",
22
+ "@repo/tsconfig": "8.0.0-rc.18-dev.33",
23
+ "@repo/tsdown": "8.0.0-rc.18-dev.33",
24
24
  "tsdown": "0.22.14",
25
25
  "typescript": "5.9.3"
26
26
  },
@@ -1 +0,0 @@
1
- {"version":3,"file":"codecs-BVrMDhha-DBl_TLS8.mjs","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/codecs-BVrMDhha.mjs"],"sourcesContent":["import { a as MONGO_DECIMAL128_CODEC_ID, c as MONGO_INT64_CODEC_ID, d as MONGO_OBJECTID_CODEC_ID, f as MONGO_STRING_CODEC_ID, i as MONGO_DATE_CODEC_ID, l as MONGO_INT64_NUMBER_CODEC_ID, n as MONGO_BOOLEAN_CODEC_ID, o as MONGO_DOUBLE_CODEC_ID, p as MONGO_VECTOR_CODEC_ID, r as MONGO_BSON_CODEC_ID, s as MONGO_INT32_CODEC_ID, t as MONGO_BINARY_CODEC_ID, u as MONGO_JSON_CODEC_ID } from \"./codec-ids-WdrumsYA.mjs\";\nimport { A as int64Decode, B as vectorEncode, C as decimal128Encode, D as doubleEncode, E as decimalTextNumberLiteral, F as int64NumberToJson, G as bsonClassTag, H as decodeBsonValue, I as int64ToJson, J as constructorName, K as bsonTypeTag, L as objectIdEncode, M as int64NumberDecode, N as int64NumberEncode, O as int32Encode, P as int64NumberFromDigits, Q as where, R as objectIdToJson, S as decimal128Decode, T as decimalTextBigintLiteral, U as encodeBsonValue, V as bsonToJson, W as readBsonJson, X as isPlainArray, Y as dbRefEntries, Z as isPlainObject, _ as binaryFromBase64, a as mongoDate, b as dateEncode, c as mongoInt32, d as mongoObjectId, f as mongoString, g as binaryEncode, h as binaryDecode, j as int64Encode, k as int32ToJson, l as mongoInt64, n as mongoBool, o as mongoDecimal128, p as mongoVector, q as child, r as mongoBson, s as mongoDouble, t as mongoBinary, u as mongoJson, v as binaryToBase64, w as decimal128ToJson, x as dateToJson, y as booleanEncode, z as stringEncode } from \"./data-types-vptiHFHC.mjs\";\nimport { t as mongoTargetError } from \"./mongo-target-errors-Btf3ML1w.mjs\";\nimport { floatToJson, readJsonFloat, renderTsLiteral } from \"@internal/framework-components/codec\";\nimport { mongoCodec, newMongoCodecRegistry } from \"@internal/mongo-codec\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\n//#region src/core/json-codec-helpers.ts\nconst BSON_TYPE_BY_TAG = {\n\tObjectId: \"objectId\",\n\tDecimal128: \"decimal\",\n\tBinary: \"binData\",\n\tBSONRegExp: \"regex\",\n\tTimestamp: \"timestamp\",\n\tBSONSymbol: \"symbol\",\n\tCode: \"javascript\",\n\tMinKey: \"minKey\",\n\tMaxKey: \"maxKey\"\n};\nconst NOT_FINITE_FIX = \"JSON has no NaN or Infinity; store null or a string, or declare the field Bson.\";\nconst BSON_FIX = \"Declare the field Bson to store BSON values.\";\nconst PLAIN_VALUE_FIX = \"Convert it to a plain object or array.\";\nconst ENCODE_FIX_BY_RECEIVED = {\n\tDate: \"Store the date as an ISO 8601 string, or declare the field Bson.\",\n\tbigint: \"Store it as a number in the safe-integer range or as decimal text, or declare the field Int64 or Bson.\",\n\tNaN: NOT_FINITE_FIX,\n\tInfinity: NOT_FINITE_FIX,\n\t\"-Infinity\": NOT_FINITE_FIX,\n\tundefined: \"Leave the key out, or store null.\",\n\tUint8Array: \"Store the bytes as a base64 string, or declare the field Binary or Bson.\",\n\tBuffer: \"Store the bytes as a base64 string, or declare the field Binary or Bson.\",\n\tBinary: \"Store the bytes as a base64 string, or declare the field Binary or Bson.\",\n\tObjectId: \"Store its hex string, or declare the field ObjectId or Bson.\",\n\tLong: \"Store a number in the safe-integer range or decimal text, or declare the field Int64 or Bson.\",\n\tDecimal128: \"Store the decimal text, or declare the field Decimal128 or Bson.\",\n\tInt32: \"Pass a plain number.\",\n\tDouble: \"Pass a plain number.\",\n\tRegExp: \"Store the pattern as a string, or declare the field Bson.\",\n\tBSONRegExp: \"Store the pattern as a string, or declare the field Bson.\",\n\tsymbol: \"Store a string instead.\",\n\tfunction: \"Store data, not a function.\",\n\t\"circular reference\": \"Remove the cycle; a JSON value is a tree.\",\n\t\"sparse array hole\": \"Fill the hole with null.\",\n\tDBRef: \"Write it as a { $ref, $id } document instead.\"\n};\nfunction encodeFix(received) {\n\treturn ENCODE_FIX_BY_RECEIVED[received] ?? (Object.hasOwn(BSON_TYPE_BY_TAG, received) ? BSON_FIX : PLAIN_VALUE_FIX);\n}\nfunction encodeRefused(received, path) {\n\tthrow mongoTargetError(\"RUNTIME.ENCODE_FAILED\", `${MONGO_JSON_CODEC_ID} value must be a JSON value; received ${received} at ${where(path)}. ${encodeFix(received)}`, { meta: {\n\t\tcodecId: MONGO_JSON_CODEC_ID,\n\t\treceived,\n\t\tvaluePath: path\n\t} });\n}\nfunction describeNonJson(value) {\n\tif (value === null || typeof value === \"string\" || typeof value === \"boolean\") return void 0;\n\tif (typeof value === \"number\") return Number.isFinite(value) ? void 0 : String(value);\n\tif (typeof value !== \"object\") return typeof value;\n\tconst tag = bsonTypeTag(value);\n\tif (tag !== void 0) return tag;\n\tif (value instanceof Date) return \"Date\";\n\tif (isPlainArray(value)) return void 0;\n\treturn isPlainObject(value) ? void 0 : constructorName(value);\n}\nfunction assertJsonValue(value, path, ancestors) {\n\tconst received = describeNonJson(value);\n\tif (received !== void 0) encodeRefused(received, path);\n\tif (typeof value !== \"object\" || value === null) return;\n\tif (ancestors.has(value)) encodeRefused(\"circular reference\", path);\n\tancestors.add(value);\n\tif (Array.isArray(value)) for (let index = 0; index < value.length; index++) {\n\t\tif (!(index in value)) encodeRefused(\"sparse array hole\", child(path, index));\n\t\tassertJsonValue(value[index], child(path, index), ancestors);\n\t}\n\telse for (const [key, entry] of Object.entries(value)) assertJsonValue(entry, child(path, key), ancestors);\n\tancestors.delete(value);\n}\n/**\n* Returns `value` unchanged when it is a plain JSON value at every depth, and throws `RUNTIME.ENCODE_FAILED` naming the first value that is not, with its path.\n*/\nfunction encodeJsonValue(value) {\n\tassertJsonValue(value, \"\", /* @__PURE__ */ new Set());\n\treturn value;\n}\nfunction decodeRefused(bsonType, path) {\n\tthrow mongoTargetError(\"RUNTIME.DECODE_FAILED\", `${MONGO_JSON_CODEC_ID} wire value contains a non-JSON BSON ${bsonType} at ${where(path)}`, { meta: {\n\t\tcodecId: MONGO_JSON_CODEC_ID,\n\t\treceived: bsonType,\n\t\tvaluePath: path\n\t} });\n}\nfunction safeLong(value, path) {\n\tconst number = Number(value);\n\treturn Number.isSafeInteger(number) && BigInt(number) === value ? number : decodeRefused(\"long\", path);\n}\nfunction finiteDouble(value, path) {\n\tif (Number.isFinite(value)) return value;\n\tconst received = String(value);\n\tthrow mongoTargetError(\"RUNTIME.DECODE_FAILED\", `${MONGO_JSON_CODEC_ID} wire value contains ${received} at ${where(path)}; a JSON number cannot be NaN or Infinity`, { meta: {\n\t\tcodecId: MONGO_JSON_CODEC_ID,\n\t\treceived,\n\t\tvaluePath: path\n\t} });\n}\nfunction decodeEntries(entries, path) {\n\treturn Object.fromEntries(entries.map(([key, entry]) => [key, decodeValue(entry, child(path, key))]));\n}\nfunction decodeTagged(value, tag, path) {\n\tswitch (tag) {\n\t\tcase \"DBRef\": return decodeEntries(dbRefEntries(value), path);\n\t\tcase \"Long\": return safeLong(blindCast(value).toBigInt(), path);\n\t\tcase \"Int32\":\n\t\tcase \"Double\": return finiteDouble(Number(value.valueOf()), path);\n\t}\n\treturn decodeRefused(BSON_TYPE_BY_TAG[tag] ?? tag, path);\n}\nfunction decodeValue(value, path) {\n\tif (value === null || typeof value === \"string\" || typeof value === \"boolean\") return value;\n\tif (typeof value === \"number\") return finiteDouble(value, path);\n\tif (typeof value === \"bigint\") return safeLong(value, path);\n\tif (typeof value === \"undefined\") return decodeRefused(\"undefined\", path);\n\tif (typeof value === \"symbol\") return decodeRefused(\"symbol\", path);\n\tif (typeof value === \"function\") return decodeRefused(\"javascript\", path);\n\tconst tag = bsonClassTag(value);\n\tif (tag !== void 0) return decodeTagged(value, tag, path);\n\tif (value instanceof Date) return decodeRefused(\"date\", path);\n\tif (value instanceof RegExp) return decodeRefused(\"regex\", path);\n\tif (value instanceof Uint8Array) return decodeRefused(\"binData\", path);\n\tif (Array.isArray(value)) {\n\t\tconst decoded = value.map((entry, index) => decodeValue(entry, child(path, index)));\n\t\treturn decoded.some((entry, index) => entry !== value[index]) ? decoded : value;\n\t}\n\tif (!isPlainObject(value)) return decodeRefused(constructorName(value), path);\n\tconst entries = Object.entries(value);\n\tconst decoded = decodeEntries(entries, path);\n\treturn entries.some(([key, entry]) => decoded[key] !== entry) ? decoded : blindCast(value);\n}\n/**\n* Decodes a wire value to the JSON value it holds: a `long` in the safe-integer range and the driver's `Int32` and `Double` wrappers become numbers. Only the objects and arrays around a converted value are copied; a wire value that is already JSON is returned as the same object. Throws `RUNTIME.DECODE_FAILED` naming the BSON type and path of the first value that is not JSON.\n*/\nfunction decodeJsonValue(wire) {\n\treturn decodeValue(wire, \"\");\n}\n//#endregion\n//#region src/core/codecs.ts\nconst mongoObjectIdCodec = mongoCodec({\n\ttypeId: MONGO_OBJECTID_CODEC_ID,\n\tdataType: mongoObjectId,\n\tfromWire: (wire) => wire.toHexString(),\n\ttoWire: (value) => objectIdEncode(MONGO_OBJECTID_CODEC_ID, value),\n\ttoDataTypeValue: (value) => mongoObjectId.valueFrom(objectIdToJson(MONGO_OBJECTID_CODEC_ID, value), {}),\n\tfromDataTypeValue: (value) => value.value\n});\nconst mongoStringCodec = mongoCodec({\n\ttypeId: MONGO_STRING_CODEC_ID,\n\tdataType: mongoString,\n\tfromWire: (wire) => wire,\n\ttoWire: (value) => stringEncode(MONGO_STRING_CODEC_ID, value),\n\tfromDataTypeValue: (value) => value.value\n});\nconst mongoDoubleCodec = mongoCodec({\n\ttypeId: MONGO_DOUBLE_CODEC_ID,\n\tdataType: mongoDouble,\n\tfromWire: (wire) => Number(wire),\n\ttoWire: (value) => doubleEncode(MONGO_DOUBLE_CODEC_ID, value),\n\ttoDataTypeValue: (value) => mongoDouble.valueFrom(floatToJson(value), {}),\n\tfromDataTypeValue: (value) => readJsonFloat(MONGO_DOUBLE_CODEC_ID, value.value)\n});\nconst mongoInt32Codec = mongoCodec({\n\ttypeId: MONGO_INT32_CODEC_ID,\n\tdataType: mongoInt32,\n\tfromWire: (wire) => wire,\n\ttoWire: (value) => int32Encode(MONGO_INT32_CODEC_ID, value),\n\ttoDataTypeValue: (value) => mongoInt32.valueFrom(int32ToJson(MONGO_INT32_CODEC_ID, value), {}),\n\tfromDataTypeValue: (value) => value.value\n});\nconst mongoBooleanCodec = mongoCodec({\n\ttypeId: MONGO_BOOLEAN_CODEC_ID,\n\tdataType: mongoBool,\n\tfromWire: (wire) => wire,\n\ttoWire: (value) => booleanEncode(MONGO_BOOLEAN_CODEC_ID, value),\n\tfromDataTypeValue: (value) => value.value\n});\nconst mongoDateCodec = mongoCodec({\n\ttypeId: MONGO_DATE_CODEC_ID,\n\tdataType: mongoDate,\n\tfromWire: (wire) => wire,\n\ttoWire: (value) => dateEncode(MONGO_DATE_CODEC_ID, value),\n\ttoDataTypeValue: (value) => mongoDate.valueFrom(dateToJson(MONGO_DATE_CODEC_ID, value), {}),\n\tfromDataTypeValue: (value) => new Date(value.value)\n});\n/** The vector codec for a column of `mongo/vector` with `params`. The dimension reaches only the TypeScript type `Vector<n>`. */\nfunction vectorCodec(params) {\n\treturn mongoCodec({\n\t\ttypeId: MONGO_VECTOR_CODEC_ID,\n\t\tdataType: mongoVector,\n\t\t...ifDefined(\"params\", params),\n\t\tfromWire: (wire) => wire,\n\t\ttoWire: (value) => vectorEncode(MONGO_VECTOR_CODEC_ID, value),\n\t\tfromDataTypeValue: (value) => value.value\n\t});\n}\nconst mongoVectorCodec = vectorCodec();\n/**\n* A BSON `long`. The application value is a `bigint`, because a `number` cannot hold the full 64-bit range; its stored form is decimal text.\n*/\nconst mongoInt64Codec = mongoCodec({\n\ttypeId: MONGO_INT64_CODEC_ID,\n\tdataType: mongoInt64,\n\tfromWire: (wire) => int64Decode(MONGO_INT64_CODEC_ID, wire),\n\ttoWire: (value) => int64Encode(MONGO_INT64_CODEC_ID, value),\n\ttoDataTypeValue: (value) => mongoInt64.valueFrom(int64ToJson(MONGO_INT64_CODEC_ID, value), {}),\n\tfromDataTypeValue: (value) => BigInt(value.value)\n});\n/**\n* A BSON `long` read and written as a `number` from -(2^53 - 1) to 2^53 - 1, the value a Prisma 6 `Int` presents. A value outside that range, or with a fraction, is refused rather than rounded.\n*/\nconst mongoInt64NumberCodec = mongoCodec({\n\ttypeId: MONGO_INT64_NUMBER_CODEC_ID,\n\tdataType: mongoInt64,\n\tfromWire: (wire) => int64NumberDecode(MONGO_INT64_NUMBER_CODEC_ID, wire),\n\ttoWire: (value) => int64NumberEncode(MONGO_INT64_NUMBER_CODEC_ID, value),\n\ttoDataTypeValue: (value) => mongoInt64.valueFrom(int64NumberToJson(MONGO_INT64_NUMBER_CODEC_ID, value), {}),\n\tfromDataTypeValue: (value) => int64NumberFromDigits(MONGO_INT64_NUMBER_CODEC_ID, value.value)\n});\n/**\n* A BSON `decimal`. The application value and its stored form are the same decimal text, written without an exponent.\n*/\nconst mongoDecimal128Codec = mongoCodec({\n\ttypeId: MONGO_DECIMAL128_CODEC_ID,\n\tdataType: mongoDecimal128,\n\tfromWire: (wire) => decimal128Decode(MONGO_DECIMAL128_CODEC_ID, wire),\n\ttoWire: (value) => decimal128Encode(MONGO_DECIMAL128_CODEC_ID, value),\n\ttoDataTypeValue: (value) => mongoDecimal128.valueFrom(decimal128ToJson(MONGO_DECIMAL128_CODEC_ID, value), {}),\n\tfromDataTypeValue: (value) => value.value\n});\n/**\n* BSON `binData`. The application value is a `Uint8Array`; its stored form is unwrapped base64.\n*/\nconst mongoBinaryCodec = mongoCodec({\n\ttypeId: MONGO_BINARY_CODEC_ID,\n\tdataType: mongoBinary,\n\tfromWire: (wire) => binaryDecode(MONGO_BINARY_CODEC_ID, wire),\n\ttoWire: (value) => binaryEncode(MONGO_BINARY_CODEC_ID, value),\n\ttoDataTypeValue: (value) => mongoBinary.valueFrom(binaryToBase64(value), {}),\n\tfromDataTypeValue: (value) => binaryFromBase64(value.value)\n});\n/**\n* A JSON value, stored as the BSON object, array, string, number, boolean or null it maps to. Encode and decode refuse any other value at any depth, naming its path.\n*/\nconst mongoJsonCodec = mongoCodec({\n\ttypeId: MONGO_JSON_CODEC_ID,\n\tdataType: mongoJson,\n\tfromWire: (wire) => decodeJsonValue(wire),\n\ttoWire: (value) => encodeJsonValue(value)\n});\n/**\n* Any BSON value, passed through unchanged except that decode turns a `DBRef` back into the `{ $ref, $id }` document it was stored as. Encode takes a `BsonInputValue` and decode returns a `BsonValue`. Its stored form is canonical MongoDB Extended JSON v2, written with each number and `Uint8Array` as the BSON type the driver stores, so a round trip keeps the BSON bytes but may return wrapper classes such as `Int32` and `Double`.\n*/\nconst mongoBsonCodec = mongoCodec({\n\ttypeId: MONGO_BSON_CODEC_ID,\n\tdataType: mongoBson,\n\tfromWire: (wire) => decodeBsonValue(wire),\n\ttoWire: (value) => encodeBsonValue(value),\n\ttoDataTypeValue: (value) => mongoBson.valueFrom(bsonToJson(value), {}),\n\tfromDataTypeValue: (value) => readBsonJson(MONGO_BSON_CODEC_ID, value.value)\n});\n/**\n* The canonical set of Mongo wire-type codecs.\n*\n* Single source of truth for both control- and runtime-plane adapter descriptors. Don't duplicate this list — import it.\n*/\nconst mongoStandardCodecs = [\n\tmongoObjectIdCodec,\n\tmongoStringCodec,\n\tmongoDoubleCodec,\n\tmongoInt32Codec,\n\tmongoBooleanCodec,\n\tmongoDateCodec,\n\tmongoVectorCodec,\n\tmongoInt64Codec,\n\tmongoInt64NumberCodec,\n\tmongoDecimal128Codec,\n\tmongoBinaryCodec,\n\tmongoJsonCodec,\n\tmongoBsonCodec\n];\n/**\n* Build a {@link CodecDescriptor} for a Mongo wire-type codec.\n*\n* Wraps an existing {@link MongoCodec} instance into a descriptor whose factory hands out the same shared codec, or, for a codec whose data type has parameters, one built for the column's parameters. Mongo's full migration to descriptor-first authoring is tracked under TML-2324; for now the descriptor view is composed from the existing `mongoCodec()` outputs.\n*/\nfunction descriptorFor(codec, metadata) {\n\treturn {\n\t\tcodecId: codec.id,\n\t\tdataType: codec.dataType.id,\n\t\ttraits: metadata.traits,\n\t\tparamsSchema: blindCast(codec.dataType.params),\n\t\tisParameterized: codec.dataType.params !== void 0,\n\t\tfactory: blindCast((params) => {\n\t\t\tconst built = metadata.withParams === void 0 || params === void 0 ? codec : metadata.withParams(params);\n\t\t\treturn () => built;\n\t\t}),\n\t\t...ifDefined(\"renderValueLiteral\", metadata.renderValueLiteral)\n\t};\n}\n/**\n* Mongo wire-type codec descriptors. Static metadata such as `traits` lives here (the descriptor shape) — `MongoCodec` itself carries its data type and the four conversion methods (TML-2357).\n*/\nconst mongoCodecDescriptors = [\n\tdescriptorFor(mongoObjectIdCodec, { traits: [\"equality\"] }),\n\tdescriptorFor(mongoStringCodec, {\n\t\ttraits: [\n\t\t\t\"equality\",\n\t\t\t\"order\",\n\t\t\t\"textual\"\n\t\t],\n\t\trenderValueLiteral: renderTsLiteral\n\t}),\n\tdescriptorFor(mongoDoubleCodec, {\n\t\ttraits: [\n\t\t\t\"equality\",\n\t\t\t\"order\",\n\t\t\t\"numeric\"\n\t\t],\n\t\trenderValueLiteral: (value) => typeof value === \"number\" ? String(value) : void 0\n\t}),\n\tdescriptorFor(mongoInt32Codec, {\n\t\ttraits: [\n\t\t\t\"equality\",\n\t\t\t\"order\",\n\t\t\t\"numeric\"\n\t\t],\n\t\trenderValueLiteral: renderTsLiteral\n\t}),\n\tdescriptorFor(mongoBooleanCodec, {\n\t\ttraits: [\"equality\", \"boolean\"],\n\t\trenderValueLiteral: renderTsLiteral\n\t}),\n\tdescriptorFor(mongoDateCodec, { traits: [\"equality\", \"order\"] }),\n\tdescriptorFor(mongoVectorCodec, {\n\t\ttraits: [\"equality\"],\n\t\twithParams: vectorCodec\n\t}),\n\tdescriptorFor(mongoInt64Codec, {\n\t\ttraits: [\n\t\t\t\"equality\",\n\t\t\t\"order\",\n\t\t\t\"numeric\"\n\t\t],\n\t\trenderValueLiteral: decimalTextBigintLiteral\n\t}),\n\tdescriptorFor(mongoInt64NumberCodec, {\n\t\ttraits: [\n\t\t\t\"equality\",\n\t\t\t\"order\",\n\t\t\t\"numeric\"\n\t\t],\n\t\trenderValueLiteral: decimalTextNumberLiteral\n\t}),\n\tdescriptorFor(mongoDecimal128Codec, { traits: [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t] }),\n\tdescriptorFor(mongoBinaryCodec, { traits: [\"equality\"] }),\n\tdescriptorFor(mongoJsonCodec, { traits: [] }),\n\tdescriptorFor(mongoBsonCodec, { traits: [] })\n];\n/**\n* Lookup descriptor metadata by codec id — used by tests and for descriptor-side reads of static metadata.\n*/\nfunction mongoDescriptorById(codecId) {\n\treturn mongoCodecDescriptors.find((d) => d.codecId === codecId);\n}\n/**\n* Build a {@link MongoCodecRegistry} preloaded with the standard Mongo wire-type codecs.\n*\n* Single point of truth for adapter-side codec construction: used by the legacy synchronous `createMongoAdapter()` factory and by the runtime adapter descriptor's `codecs()` getter. Userland code obtains a registry via the framework's execution-stack composition (see `createMongoExecutionContext`) instead of calling this directly.\n*/\nfunction buildStandardCodecRegistry() {\n\tconst registry = newMongoCodecRegistry();\n\tfor (const codec of mongoStandardCodecs) registry.register(codec);\n\treturn registry;\n}\n//#endregion\nexport { mongoStandardCodecs as i, mongoCodecDescriptors as n, mongoDescriptorById as r, buildStandardCodecRegistry as t };\n\n//# sourceMappingURL=codecs-BVrMDhha.mjs.map"],"mappings":";;;;;;;;AAQA,MAAM,mBAAmB;CACxB,UAAU;CACV,YAAY;CACZ,QAAQ;CACR,YAAY;CACZ,WAAW;CACX,YAAY;CACZ,MAAM;CACN,QAAQ;CACR,QAA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;EACA,oBAAoB;CACrB,CAAC;CACD,cAAc,kBAAkB;EAC/B,QAAQ;GACP;GACA;GACA;EACD;EACA,qBAAqB,UAAU,OAAO,UAAU,WAAW,OAAO,KAAK,IAAI,KAAK;CACjF,CAAC;CACD,cAAc,iBAAiB;EAC9B,QAAQ;GACP;GACA;GACA;EACD;EACA,oBAAoB;CACrB,CAAC;CACD,cAAc,mBAAmB;EAChC,QAAQ,CAAC,YAAY,SAAS;EAC9B,oBAAoB;CACrB,CAAC;CACD,cAAc,gBAAgB,EAAE,QAAQ,CAAC,YAAY,OAAO,EAAE,CAAC;CAC/D,cAAc,kBAAkB;EAC/B,QAAQ,CAAC,UAAU;EACnB,YAAY;CACb,CAAC;CACD,cAAc,iBAAiB;EAC9B,QAAQ;GACP;GACA;GACA;EACD;EACA,oBAAoB;CACrB,CAAC;CACD,cAAc,uBAAuB;EACpC,QAAQ;GACP;GACA;GACA;EACD;EACA,oBAAoB;CACrB,CAAC;CACD,cAAc,sBAAsB,EAAE,QAAQ;EAC7C;EACA;EACA;CACD,EAAE,CAAC;CACH,cAAc,kBAAkB,EAAE,QAAQ,CAAC,UAAU,EAAE,CAAC;CACxD,cAAc,gBAAgB,EAAE,QAAQ,CAAC,EAAE,CAAC;CAC5C,cAAc,gBAAgB,EAAE,QAAQ,CAAC,EAAE,CAAC;AAC7C;;;;AAIA,SAAS,oBAAoB,SAAS;CACrC,OAAO,sBAAsB,MAAM,MAAM,EAAE,YAAY,OAAO;AAC/D;;;;;;AAMA,SAAS,6BAA6B;CACrC,MAAM,WAAW,sBAAsB;CACvC,KAAK,MAAM,SAAS,qBAAqB,SAAS,SAAS,KAAK;CAChE,OAAO;AACR"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"data-types-vptiHFHC-LUJwNRIq.mjs","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/data-types-vptiHFHC.mjs"],"sourcesContent":["import { r as MONGO_BSON_CODEC_ID } from \"./codec-ids-WdrumsYA.mjs\";\nimport { t as mongoTargetError } from \"./mongo-target-errors-Btf3ML1w.mjs\";\nimport { INT32_RANGE, INT64_RANGE, SAFE_INTEGER_BIGINT_RANGE, SAFE_INTEGER_RANGE, isIntegerIn, readJsonBoolean, readJsonFloat, readJsonInteger, readJsonIntegerText, readJsonMatching, readJsonString, refuseJsonValue } from \"@internal/framework-components/codec\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { isDeepStrictEqual } from \"node:util\";\nimport { Binary, Code, Decimal128, Double, EJSON, Long, MinKey, ObjectId } from \"bson\";\nimport { counted } from \"@internal/utils/text\";\nimport { mongoDataType } from \"@internal/mongo-contract/data-type\";\nimport { type } from \"arktype\";\n//#region src/core/bson-walk.ts\nfunction where(path) {\n\treturn path === \"\" ? \"the root\" : path;\n}\nfunction child(path, key) {\n\treturn path === \"\" ? String(key) : `${path}.${key}`;\n}\nfunction isPlainObject(value) {\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === Object.prototype || prototype === null;\n}\nfunction isPlainArray(value) {\n\treturn Array.isArray(value) && Object.getPrototypeOf(value) === Array.prototype;\n}\nconst BSON_VERSION = Symbol.for(\"@@mdb.bson.version\");\n/** The major version of the `bson` this package loads, which every `bson` class instance it can serialise carries. */\nconst BSON_MAJOR = Reflect.get(new MinKey(), BSON_VERSION);\n/** Whether a `bson` class instance comes from the same major version of `bson`, rather than being a look-alike or from another version. */\nfunction createdByBsonMajor(value) {\n\treturn Reflect.get(value, BSON_VERSION) === BSON_MAJOR;\n}\nfunction bsonTypeTag(value) {\n\tconst tag = Reflect.get(value, \"_bsontype\");\n\treturn typeof tag === \"string\" ? tag : void 0;\n}\n/**\n* The `_bsontype` tag of a `bson` class instance. A stored subdocument is read as a plain object even when it has a `_bsontype` key, so a plain object has no tag.\n*/\nfunction bsonClassTag(value) {\n\treturn isPlainObject(value) ? void 0 : bsonTypeTag(value);\n}\nfunction constructorName(value) {\n\tconst name = Reflect.get(value, \"constructor\")?.name;\n\treturn typeof name === \"string\" && name !== \"\" ? name : \"object\";\n}\n/**\n* The `bson` library reads any subdocument with a string `$ref` and an `$id` as a `DBRef`. It was stored as a plain object; these are its entries in stored order, `$ref`, `$id`, `$db` when present, then the other fields.\n*/\nfunction dbRefEntries(value) {\n\tconst ref = blindCast(value);\n\tconst entries = [[\"$ref\", ref.collection], [\"$id\", ref.oid]];\n\tif (ref.db !== void 0) entries.push([\"$db\", ref.db]);\n\tentries.push(...Object.entries(ref.fields));\n\treturn entries;\n}\n//#endregion\n//#region src/core/bson-codec-helpers.ts\nconst BSON_VALUE_TAGS = /* @__PURE__ */ new Set([\n\t\"ObjectId\",\n\t\"Long\",\n\t\"Decimal128\",\n\t\"Binary\",\n\t\"BSONRegExp\",\n\t\"Timestamp\",\n\t\"Int32\",\n\t\"Double\",\n\t\"Code\",\n\t\"MinKey\",\n\t\"MaxKey\",\n\t\"BSONSymbol\"\n]);\nconst ENCODE_FIX_BY_RECEIVED = { DBRef: \"Write it as a { $ref, $id } document instead.\" };\nfunction encodeRefused(received, path) {\n\tconst fix = ENCODE_FIX_BY_RECEIVED[received];\n\tthrow mongoTargetError(\"RUNTIME.ENCODE_FAILED\", `${MONGO_BSON_CODEC_ID} value must be a BSON value; received ${received} at ${where(path)}${fix === void 0 ? \"\" : `. ${fix}`}`, { meta: {\n\t\tcodecId: MONGO_BSON_CODEC_ID,\n\t\treceived,\n\t\tvaluePath: path\n\t} });\n}\nfunction assertBsonValue(value, path, ancestors) {\n\tif (value === null || typeof value === \"string\" || typeof value === \"boolean\" || typeof value === \"number\") return;\n\tif (typeof value !== \"object\") {\n\t\tencodeRefused(typeof value, path);\n\t\treturn;\n\t}\n\tconst tag = bsonTypeTag(value);\n\tif (tag !== void 0) {\n\t\tif (!BSON_VALUE_TAGS.has(tag)) encodeRefused(tag, path);\n\t\tif (!createdByBsonMajor(value)) encodeRefused(`${tag} not created by bson ${String(BSON_MAJOR)}`, path);\n\t\treturn;\n\t}\n\tif (value instanceof Date || value instanceof RegExp || value instanceof Uint8Array) return;\n\tif (!isPlainArray(value) && !isPlainObject(value)) {\n\t\tencodeRefused(constructorName(value), path);\n\t\treturn;\n\t}\n\tif (ancestors.has(value)) encodeRefused(\"circular reference\", path);\n\tancestors.add(value);\n\tif (Array.isArray(value)) for (let index = 0; index < value.length; index++) {\n\t\tif (!(index in value)) encodeRefused(\"sparse array hole\", child(path, index));\n\t\tassertBsonValue(value[index], child(path, index), ancestors);\n\t}\n\telse for (const [key, entry] of Object.entries(value)) assertBsonValue(entry, child(path, key), ancestors);\n\tancestors.delete(value);\n}\n/**\n* Returns `value` unchanged when it is a BSON value at every depth, and throws `RUNTIME.ENCODE_FAILED` naming the first value that is not, with its path.\n*/\nfunction encodeBsonValue(value) {\n\tassertBsonValue(value, \"\", /* @__PURE__ */ new Set());\n\treturn value;\n}\n/**\n* A `Code` value with a scope, recognised by its tag: the driver reads with its own load of `bson`, so its `Code` is not an instance of the class imported here.\n*/\nfunction codeWithScope(value) {\n\tif (bsonClassTag(value) !== \"Code\") return void 0;\n\tconst code = Reflect.get(value, \"code\");\n\tconst scope = Reflect.get(value, \"scope\");\n\treturn typeof code === \"string\" && typeof scope === \"object\" && scope !== null ? {\n\t\tcode,\n\t\tscope\n\t} : void 0;\n}\nfunction decodeEntries(entries) {\n\treturn Object.fromEntries(entries.map(([key, entry]) => [key, decodeValue(entry)]));\n}\nfunction decodeValue(value) {\n\tif (typeof value !== \"object\" || value === null) return value;\n\tif (bsonClassTag(value) === \"DBRef\") return decodeEntries(dbRefEntries(value));\n\tif (Array.isArray(value)) {\n\t\tconst decoded = value.map(decodeValue);\n\t\treturn decoded.some((entry, index) => entry !== value[index]) ? decoded : value;\n\t}\n\tconst code = codeWithScope(value);\n\tif (code !== void 0) {\n\t\tconst scope = decodeValue(code.scope);\n\t\treturn scope === code.scope ? value : new Code(code.code, blindCast(scope));\n\t}\n\tif (!isPlainObject(value)) return value;\n\tconst entries = Object.entries(value);\n\tconst decoded = decodeEntries(entries);\n\treturn entries.some(([key, entry]) => decoded[key] !== entry) ? decoded : value;\n}\n/**\n* Returns the wire value as the driver produced it, except that a `DBRef` the `bson` library read from a `{ $ref, $id }` subdocument becomes that document again, `{ $ref, $id[, $db], ...fields }`, with its members' BSON types kept, at any depth and inside a `Code` scope. A value holding no `DBRef` is returned as the same object.\n*/\nfunction decodeBsonValue(wire) {\n\treturn blindCast(decodeValue(wire));\n}\nfunction asDriverWrites(value) {\n\tif (typeof value === \"number\") return Number.isInteger(value) && (value < INT32_RANGE.min || value > INT32_RANGE.max) ? new Double(value) : value;\n\tif (typeof value !== \"object\" || value === null) return value;\n\tif (value instanceof Uint8Array) return new Binary(value);\n\tif (Array.isArray(value)) return value.map(asDriverWrites);\n\tif (isPlainObject(value)) return Object.fromEntries(Object.entries(value).map(([key, entry]) => [key, asDriverWrites(entry)]));\n\tconst code = codeWithScope(value);\n\tif (code !== void 0) return new Code(code.code, blindCast(asDriverWrites(code.scope)));\n\treturn value;\n}\n/**\n* Canonical Extended JSON for a BSON value, recording each JavaScript number and `Uint8Array` as the BSON type the driver writes for it: an integer outside the int32 range as a `double`, and bytes as `binData`.\n*/\nfunction bsonToJson(value) {\n\treturn blindCast(EJSON.serialize(asDriverWrites(value), { relaxed: false }));\n}\n/**\n* Reads the canonical Extended JSON `bsonToJson` writes. The `bson` reader also takes forms that are not canonical, some of them silently wrong (`{ \"$numberInt\": \"abc\" }` reads as 0), so a value that does not write back to the same JSON is refused, naming `owner`.\n*/\nfunction readBsonJson(owner, json) {\n\tlet value;\n\ttry {\n\t\tvalue = EJSON.deserialize(blindCast(json), { relaxed: false });\n\t} catch {\n\t\treturn refuseJsonValue(owner, \"canonical Extended JSON\", json);\n\t}\n\tif (!isDeepStrictEqual(EJSON.serialize(value, { relaxed: false }), json)) return refuseJsonValue(owner, \"canonical Extended JSON\", json);\n\treturn value;\n}\n//#endregion\n//#region src/core/bson-scalar-helpers.ts\nconst DECIMAL_INTEGER = /^-?\\d+$/;\nconst STORED_DECIMAL_TEXT = /^(?:-?\\d+(?:\\.\\d+)?|NaN|-?Infinity)$/;\nconst DECIMAL128_TEXT = /^(-?)(\\d+)(?:\\.(\\d+))?(?:E([+-]\\d+))?$/;\nconst BASE64_TEXT = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;\n/**\n* Checks the BSON type tag rather than `instanceof`: the driver deserialises with its own load of `bson` (CommonJS, where this module may be loaded as ESM), so a value read from the database need not be an instance of the class imported here.\n*/\nfunction hasBsonTypeTag(value, tag) {\n\treturn typeof value === \"object\" && value !== null && \"_bsontype\" in value && value._bsontype === tag;\n}\nfunction isLong(value) {\n\treturn hasBsonTypeTag(value, \"Long\");\n}\nfunction isDecimal128(value) {\n\treturn hasBsonTypeTag(value, \"Decimal128\");\n}\nfunction isBinary(value) {\n\treturn hasBsonTypeTag(value, \"Binary\");\n}\nfunction decodeFailed(codecId, message, received) {\n\tthrow mongoTargetError(\"RUNTIME.DECODE_FAILED\", `${codecId} ${message}`, { meta: {\n\t\tcodecId,\n\t\treceived: typeof received\n\t} });\n}\nconst RECEIVED_PREVIEW_LIMIT = 100;\nfunction encodeFailed(codecId, message, received) {\n\tthrow mongoTargetError(\"RUNTIME.ENCODE_FAILED\", `${codecId} ${message}`, { meta: {\n\t\tcodecId,\n\t\treceived: String(received).slice(0, RECEIVED_PREVIEW_LIMIT)\n\t} });\n}\nfunction describeReceived(value) {\n\tif (typeof value === \"number\") return String(value);\n\tif (typeof value === \"bigint\") return `${value}n`;\n\tif (typeof value === \"string\") return `string ${JSON.stringify(value.slice(0, RECEIVED_PREVIEW_LIMIT))}`;\n\tif (value === null) return \"null\";\n\tif (value instanceof Date) return Number.isNaN(value.getTime()) ? \"an invalid Date\" : \"a Date\";\n\tif (Array.isArray(value)) return \"an array\";\n\treturn typeof value;\n}\nfunction refuseType(codecId, expected, value, received = describeReceived(value)) {\n\treturn encodeFailed(codecId, `value must be ${expected}; received ${received}`, value);\n}\nfunction stringEncode(codecId, value) {\n\tif (typeof value !== \"string\") refuseType(codecId, \"a string\", value);\n\treturn value;\n}\nfunction booleanEncode(codecId, value) {\n\tif (typeof value !== \"boolean\") refuseType(codecId, \"a boolean\", value);\n\treturn value;\n}\n/**\n* The driver writes an invalid `Date` as the epoch, so one is refused with any other non-`Date` value.\n*/\nfunction dateEncode(codecId, value) {\n\tif (!(value instanceof Date) || Number.isNaN(value.getTime())) refuseType(codecId, \"a valid Date\", value);\n\treturn value;\n}\nconst OBJECT_ID_TEXT = /^[0-9a-fA-F]{24}$/;\nfunction hexStringOf(value) {\n\tconst toHexString = Reflect.get(value, \"toHexString\");\n\tif (typeof toHexString !== \"function\") return void 0;\n\tconst hex = Reflect.apply(toHexString, value, []);\n\treturn typeof hex === \"string\" && OBJECT_ID_TEXT.test(hex) ? hex : void 0;\n}\n/**\n* `new ObjectId(...)` makes a fresh id from `null` or `undefined` and reads a number as a timestamp, so only a string, which the constructor accepts only as 24 hex digits, or an `ObjectId` is passed to it. An `ObjectId` is rebuilt from its hex string, so one from any major version of `bson` works.\n*/\nfunction objectIdEncode(codecId, value) {\n\tconst expected = \"a 24-digit hex string or an ObjectId\";\n\tif (typeof value === \"string\") try {\n\t\treturn new ObjectId(value);\n\t} catch {\n\t\treturn refuseType(codecId, expected, value);\n\t}\n\tif (typeof value !== \"object\" || value === null || !hasBsonTypeTag(value, \"ObjectId\")) return refuseType(codecId, expected, value);\n\tconst hex = hexStringOf(value);\n\tif (hex === void 0) return refuseType(codecId, expected, value, \"an object tagged ObjectId whose toHexString() does not return 24 hex digits\");\n\treturn new ObjectId(hex);\n}\nfunction vectorEncode(codecId, value) {\n\tif (!Array.isArray(value) || !value.every((element) => typeof element === \"number\")) refuseType(codecId, \"an array of numbers\", value);\n\treturn value;\n}\n/**\n* Wraps the number in the driver's `Double`, because the driver writes a whole JavaScript number in the int32 range as a BSON `int`, which a `double` validator refuses.\n*/\nfunction doubleEncode(codecId, value) {\n\tif (typeof value !== \"number\") encodeFailed(codecId, `value must be a number; received ${describeReceived(value)}`, value);\n\treturn new Double(value);\n}\nfunction int32Encode(codecId, value) {\n\tif (!isIntegerIn(value, INT32_RANGE)) encodeFailed(codecId, `value must be an integer from ${INT32_RANGE.min} to ${INT32_RANGE.max}; received ${describeReceived(value)}`, value);\n\treturn value;\n}\nfunction objectIdToJson(codecId, value) {\n\tif (typeof value !== \"string\" || !OBJECT_ID_TEXT.test(value)) encodeFailed(codecId, \"value must be 24 hexadecimal digits\", value);\n\treturn value;\n}\n/** Reads ObjectId hex in either case; {@link spellObjectIdJson} writes the lower case the type stores. */\nfunction readObjectIdJson(owner, json) {\n\treturn readJsonMatching(owner, json, OBJECT_ID_TEXT, \"24 hexadecimal digits\");\n}\n/** The ObjectId hex in lower case, as the driver's `toHexString` writes it. */\nfunction spellObjectIdJson(json) {\n\treturn typeof json === \"string\" ? json.toLowerCase() : json;\n}\nfunction int32ToJson(codecId, value) {\n\tif (!isIntegerIn(value, INT32_RANGE)) encodeFailed(codecId, `value must be an integer from ${INT32_RANGE.min} to ${INT32_RANGE.max}`, value);\n\treturn value;\n}\nfunction readInt32Json(owner, json) {\n\treturn readJsonInteger(owner, json, INT32_RANGE);\n}\nfunction dateToJson(codecId, value) {\n\tif (!(value instanceof Date) || Number.isNaN(value.getTime())) encodeFailed(codecId, \"value must be a valid Date\", value);\n\treturn value.toISOString();\n}\n/**\n* The JSON form is the text `Date.toISOString()` writes, so a string that does not read back to that same text is refused.\n*/\nfunction readDateJson(owner, json) {\n\tconst date = typeof json === \"string\" ? new Date(json) : void 0;\n\tif (date === void 0 || Number.isNaN(date.getTime()) || date.toISOString() !== json) return refuseJsonValue(owner, \"a date and time in UTC as Date.toISOString writes it\", json);\n\treturn json;\n}\n/** Reads an array of numbers, of exactly `length` numbers when the column sets one. */\nfunction readVectorJson(owner, json, length) {\n\tconst expected = length === void 0 ? \"an array of numbers\" : `an array of ${counted(length, \"number\")}`;\n\tif (!Array.isArray(json) || length !== void 0 && json.length !== length) return refuseJsonValue(owner, expected, json);\n\tconst numbers = [];\n\tfor (const element of json) {\n\t\tif (typeof element !== \"number\") return refuseJsonValue(owner, expected, element);\n\t\tnumbers.push(element);\n\t}\n\treturn numbers;\n}\n/**\n* `Long.fromBigInt` keeps the low 64 bits of any bigint, so an out-of-range value would be stored as a different number without error.\n*/\nfunction isInt64(value) {\n\treturn value >= INT64_RANGE.min && value <= INT64_RANGE.max;\n}\nfunction requireInt64(codecId, value) {\n\tif (!isInt64(value)) encodeFailed(codecId, \"value is outside the signed 64-bit range\", value);\n\treturn value;\n}\nfunction int64Encode(codecId, value) {\n\tif (typeof value !== \"bigint\") encodeFailed(codecId, \"value must be a bigint\", value);\n\treturn Long.fromBigInt(requireInt64(codecId, value));\n}\n/**\n* A stored double with a fraction, which a 64-bit integer codec cannot read. Such values were written through a Prisma 6 `Int` while its contract used the 32-bit codec, which took any number.\n*/\nfunction refuseFractionalDouble(codecId, wire) {\n\treturn decodeFailed(codecId, `wire value is the fractional double ${wire}, and a 64-bit integer holds whole numbers only. Rewrite each such stored value as a long, rounded or cut off ({ $toLong: { $round: [<value>, 0] } }, or $trunc in place of $round), mapping over the list when the value sits in one. The upgrade guide step prisma6-int-written-as-long has the queries for a plain field, a list and a list of composite values.`, wire);\n}\n/**\n* The driver promotes a stored `long` that fits in 53 bits to a `number`, and hands larger ones over as `Long`, so both arrive here.\n*/\nfunction int64Decode(codecId, wire) {\n\tif (typeof wire === \"bigint\") return wire;\n\tif (isLong(wire)) return wire.toBigInt();\n\tif (typeof wire === \"number\" && Number.isSafeInteger(wire)) return BigInt(wire);\n\tif (typeof wire === \"number\" && Number.isFinite(wire) && !Number.isInteger(wire)) return refuseFractionalDouble(codecId, wire);\n\treturn decodeFailed(codecId, \"wire value must be a Long or a safe integer\", wire);\n}\n/**\n* A schema-written default arrives as a `number`; one that is a safe integer names its value exactly, so it is accepted like `pg/int8@1` accepts it.\n*/\nfunction int64ToJson(codecId, value) {\n\tif (typeof value === \"bigint\") return requireInt64(codecId, value).toString();\n\tif (typeof value === \"number\" && Number.isSafeInteger(value)) return BigInt(value).toString();\n\treturn encodeFailed(codecId, \"value must be a bigint or a safe integer\", value);\n}\nfunction readInt64Json(owner, json) {\n\treadJsonIntegerText(owner, json, INT64_RANGE);\n\treturn json;\n}\nconst SAFE_INTEGERS = `from ${SAFE_INTEGER_RANGE.min} to ${SAFE_INTEGER_RANGE.max}`;\nfunction int64NumberEncode(codecId, value) {\n\tif (!isIntegerIn(value, SAFE_INTEGER_RANGE)) encodeFailed(codecId, `value must be an integer ${SAFE_INTEGERS}; received ${describeReceived(value)}`, value);\n\treturn Long.fromNumber(value);\n}\nfunction safeIntegerOf(codecId, value) {\n\tif (value < SAFE_INTEGER_BIGINT_RANGE.min || value > SAFE_INTEGER_BIGINT_RANGE.max) decodeFailed(codecId, `wire value must be a whole number ${SAFE_INTEGERS}; received ${value}`, value);\n\treturn Number(value);\n}\n/**\n* The driver hands a stored `long` over as a `number` when it fits in 53 bits (the default `promoteLongs`), as a `Long` otherwise or with `promoteLongs: false`, and as a `bigint` with `useBigInt64`.\n*/\nfunction int64NumberDecode(codecId, wire) {\n\tif (typeof wire === \"bigint\") return safeIntegerOf(codecId, wire);\n\tif (isLong(wire)) return safeIntegerOf(codecId, wire.toBigInt());\n\tif (isIntegerIn(wire, SAFE_INTEGER_RANGE)) return wire;\n\tif (typeof wire === \"number\" && Number.isFinite(wire) && !Number.isInteger(wire)) return refuseFractionalDouble(codecId, wire);\n\treturn decodeFailed(codecId, `wire value must be a whole number ${SAFE_INTEGERS}; received ${describeReceived(wire)}`, wire);\n}\nfunction int64NumberToJson(codecId, value) {\n\treturn int64NumberEncode(codecId, value).toString();\n}\n/** A `number` holds an integer exactly only within the safe integer range, so digit text past it is refused. */\nfunction int64NumberFromDigits(codecId, digits) {\n\treturn Number(readJsonIntegerText(codecId, digits, SAFE_INTEGER_BIGINT_RANGE));\n}\nfunction decimalTextNumberLiteral(value) {\n\treturn typeof value === \"string\" && DECIMAL_INTEGER.test(value) ? value : void 0;\n}\nfunction decimalTextBigintLiteral(value) {\n\treturn typeof value === \"string\" && DECIMAL_INTEGER.test(value) ? `${value}n` : void 0;\n}\n/**\n* `Decimal128.toString()` writes some values with an exponent (`1E+3`, `1.23E+40`). The application value is decimal text without one, as for Postgres `numeric`: the point moves to where the exponent puts it, trailing zeros stay, and the sign of zero goes.\n*/\nfunction decimalTextWithoutExponent(text) {\n\tif (text === \"NaN\" || text === \"Infinity\" || text === \"-Infinity\") return text;\n\tconst match = DECIMAL128_TEXT.exec(text);\n\tif (match === null) return void 0;\n\tconst [, sign = \"\", whole = \"\", fraction = \"\", exponent = \"0\"] = match;\n\tconst digits = `${whole}${fraction}`;\n\tconst point = whole.length + Number(exponent);\n\tlet integerPart;\n\tlet fractionPart;\n\tif (point <= 0) {\n\t\tintegerPart = \"0\";\n\t\tfractionPart = `${\"0\".repeat(-point)}${digits}`;\n\t} else if (point >= digits.length) {\n\t\tintegerPart = `${digits}${\"0\".repeat(point - digits.length)}`;\n\t\tfractionPart = \"\";\n\t} else {\n\t\tintegerPart = digits.slice(0, point);\n\t\tfractionPart = digits.slice(point);\n\t}\n\tconst trimmedInteger = integerPart.replace(/^0+(?=\\d)/, \"\");\n\tconst unsigned = fractionPart === \"\" ? trimmedInteger : `${trimmedInteger}.${fractionPart}`;\n\treturn /^[0.]+$/.test(unsigned) ? unsigned : `${sign}${unsigned}`;\n}\nfunction requireStoredDecimalText(codecId, value) {\n\tif (typeof value !== \"string\" || !STORED_DECIMAL_TEXT.test(value)) encodeFailed(codecId, \"value must be decimal text without an exponent, or NaN, Infinity or -Infinity\", value);\n\treturn value;\n}\nfunction decimal128Encode(codecId, value) {\n\trequireStoredDecimalText(codecId, value);\n\ttry {\n\t\treturn Decimal128.fromString(value);\n\t} catch (error) {\n\t\treturn encodeFailed(codecId, `value cannot be stored as a Decimal128 exactly: ${error instanceof Error ? error.message : String(error)}`, value);\n\t}\n}\nfunction decimal128Decode(codecId, wire) {\n\tif (!isDecimal128(wire)) return decodeFailed(codecId, \"wire value must be a Decimal128\", wire);\n\tconst text = decimalTextWithoutExponent(wire.toString());\n\tif (text === void 0) return decodeFailed(codecId, \"wire value is not decimal text\", wire);\n\treturn text;\n}\nfunction decimal128ToJson(codecId, value) {\n\treturn requireStoredDecimalText(codecId, value);\n}\n/**\n* The stored form is what the codec writes, so it follows the encode rule: decimal text without an exponent, or `NaN`, `Infinity` or `-Infinity`, that a Decimal128 holds exactly.\n*/\nfunction readDecimal128Json(owner, json) {\n\tconst expected = \"decimal text without an exponent that a Decimal128 holds exactly, or NaN, Infinity or -Infinity\";\n\tconst text = readJsonMatching(owner, json, STORED_DECIMAL_TEXT, expected);\n\ttry {\n\t\tDecimal128.fromString(text);\n\t} catch {\n\t\treturn refuseJsonValue(owner, expected, json);\n\t}\n\treturn text;\n}\nfunction binaryEncode(codecId, value) {\n\tif (!(value instanceof Uint8Array)) encodeFailed(codecId, \"value must be a Uint8Array\", value);\n\treturn new Binary(value);\n}\n/**\n* The driver reads binData as a `Binary`, or as a `Buffer` with `promoteBuffers: true`; either becomes a plain `Uint8Array` copy of the bytes.\n*/\nfunction binaryDecode(codecId, wire) {\n\tif (wire instanceof Uint8Array) return new Uint8Array(wire);\n\tif (!isBinary(wire)) return decodeFailed(codecId, \"wire value must be a Binary or a Uint8Array\", wire);\n\treturn new Uint8Array(wire.value());\n}\nfunction binaryToBase64(value) {\n\treturn Buffer.from(value).toString(\"base64\");\n}\n/** Reads base64 with or without padding bits set; {@link spellBase64Json} writes the base64 the type stores. */\nfunction readBinaryJson(owner, json) {\n\treturn readJsonMatching(owner, json, BASE64_TEXT, \"base64 text\");\n}\n/** The base64 of the same bytes with padding bits zero, as `Buffer` writes it. */\nfunction spellBase64Json(json) {\n\treturn typeof json === \"string\" ? Buffer.from(json, \"base64\").toString(\"base64\") : json;\n}\nfunction binaryFromBase64(base64) {\n\treturn new Uint8Array(Buffer.from(base64, \"base64\"));\n}\n//#endregion\n//#region src/core/data-types.ts\n/** The vector's dimension: the TypeScript type `Vector<n>` and the type's reader read it. */\nconst mongoVectorParams = type({ \"length?\": \"number.integer >= 1\" });\nconst mongoObjectId = mongoDataType(\"mongo/objectid\", {\n\tread: (json) => readObjectIdJson(\"mongo/objectid\", json),\n\tspell: spellObjectIdJson,\n\tbsonTypes: [\"objectId\"]\n});\nconst mongoString = mongoDataType(\"mongo/string\", {\n\tread: (json) => readJsonString(\"mongo/string\", json),\n\tbsonTypes: [\"string\"]\n});\nconst mongoDouble = mongoDataType(\"mongo/double\", {\n\tread: (json) => {\n\t\treadJsonFloat(\"mongo/double\", json);\n\t\treturn json;\n\t},\n\tbsonTypes: [\"double\"]\n});\nconst mongoInt32 = mongoDataType(\"mongo/int32\", {\n\tread: (json) => readInt32Json(\"mongo/int32\", json),\n\tbsonTypes: [\"int\"]\n});\nconst mongoBool = mongoDataType(\"mongo/bool\", {\n\tread: (json) => readJsonBoolean(\"mongo/bool\", json),\n\tbsonTypes: [\"bool\"]\n});\nconst mongoDate = mongoDataType(\"mongo/date\", {\n\tread: (json) => readDateJson(\"mongo/date\", json),\n\tbsonTypes: [\"date\"]\n});\nconst mongoVector = mongoDataType(\"mongo/vector\", {\n\tread: (json, params) => readVectorJson(\"mongo/vector\", json, typeof params[\"length\"] === \"number\" ? params[\"length\"] : void 0),\n\tbsonTypes: [\"array\"],\n\tparams: mongoVectorParams\n});\nconst mongoInt64 = mongoDataType(\"mongo/int64\", {\n\tread: (json) => readInt64Json(\"mongo/int64\", json),\n\tbsonTypes: [\"long\"]\n});\nconst mongoDecimal128 = mongoDataType(\"mongo/decimal128\", {\n\tread: (json) => readDecimal128Json(\"mongo/decimal128\", json),\n\tbsonTypes: [\"decimal\"]\n});\nconst mongoBinary = mongoDataType(\"mongo/binary\", {\n\tread: (json) => readBinaryJson(\"mongo/binary\", json),\n\tspell: spellBase64Json,\n\tbsonTypes: [\"binData\"]\n});\nconst mongoJson = mongoDataType(\"mongo/json\", {\n\tread: (json) => json,\n\tbsonTypes: [\n\t\t\"object\",\n\t\t\"array\",\n\t\t\"string\",\n\t\t\"double\",\n\t\t\"int\",\n\t\t\"long\",\n\t\t\"bool\",\n\t\t\"null\"\n\t]\n});\nconst mongoBson = mongoDataType(\"mongo/bson\", {\n\tread: (json) => {\n\t\treadBsonJson(\"mongo/bson\", json);\n\t\treturn json;\n\t},\n\tbsonTypes: []\n});\nconst mongoDataTypes = [\n\tmongoObjectId,\n\tmongoString,\n\tmongoDouble,\n\tmongoInt32,\n\tmongoBool,\n\tmongoDate,\n\tmongoVector,\n\tmongoInt64,\n\tmongoDecimal128,\n\tmongoBinary,\n\tmongoJson,\n\tmongoBson\n];\n//#endregion\nexport { int64Decode as A, vectorEncode as B, decimal128Encode as C, doubleEncode as D, decimalTextNumberLiteral as E, int64NumberToJson as F, bsonClassTag as G, decodeBsonValue as H, int64ToJson as I, constructorName as J, bsonTypeTag as K, objectIdEncode as L, int64NumberDecode as M, int64NumberEncode as N, int32Encode as O, int64NumberFromDigits as P, where as Q, objectIdToJson as R, decimal128Decode as S, decimalTextBigintLiteral as T, encodeBsonValue as U, bsonToJson as V, readBsonJson as W, isPlainArray as X, dbRefEntries as Y, isPlainObject as Z, binaryFromBase64 as _, mongoDate as a, dateEncode as b, mongoInt32 as c, mongoObjectId as d, mongoString as f, binaryEncode as g, binaryDecode as h, mongoDataTypes as i, int64Encode as j, int32ToJson as k, mongoInt64 as l, mongoVectorParams as m, mongoBool as n, mongoDecimal128 as o, mongoVector as p, child as q, mongoBson as r, mongoDouble as s, mongoBinary as t, mongoJson as u, binaryToBase64 as v, decimal128ToJson as w, dateToJson as x, booleanEncode as y, stringEncode as z };\n\n//# sourceMappingURL=data-types-vptiHFHC.mjs.map"],"mappings":";;;;;;;;;;AAUA,SAAS,MAAM,MAAM;CACpB,OAAO,SAAS,KAAK,aAAa;AACnC;AACA,SAAS,MAAM,MAAM,KAAK;CACzB,OAAO,SAAS,KAAK,OAAO,GAAG,IAAI,GAAG,KAAK,GAAG;AA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