@prisma/orm-target-mongo 8.0.0-rc.14-dev.3 → 8.0.0-rc.14-dev.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter.mjs +2 -2
- package/dist/adapter__control.d.mts +8 -0
- package/dist/adapter__control.d.mts.map +1 -1
- package/dist/adapter__control.mjs +10 -2
- package/dist/adapter__control.mjs.map +1 -1
- package/dist/adapter__runtime.mjs +2 -2
- package/dist/{codec-ids-B_1c7Ed6.d.mts → codec-ids-PSU05uwH.d.mts} +3 -2
- package/dist/{codec-ids-B_1c7Ed6.d.mts.map → codec-ids-PSU05uwH.d.mts.map} +1 -1
- package/dist/{codec-ids-CuHXNFWL-BYExYC_z.mjs → codec-ids-WdrumsYA-BkQfspmL.mjs} +4 -3
- package/dist/codec-ids-WdrumsYA-BkQfspmL.mjs.map +1 -0
- package/dist/{codec-types-CxbyKvKL.d.mts → codec-types-wuAXIXjV.d.mts} +6 -1
- package/dist/{codec-types-CxbyKvKL.d.mts.map → codec-types-wuAXIXjV.d.mts.map} +1 -1
- package/dist/{codecs-8iNuBwPO.d.mts → codecs-CwHW-tx-.d.mts} +2 -2
- package/dist/codecs-CwHW-tx-.d.mts.map +1 -0
- package/dist/{codecs-CUY6H3CA-BuXwvtSA.mjs → codecs-Dt4Q55gF-DDdyWx8-.mjs} +62 -4
- package/dist/codecs-Dt4Q55gF-DDdyWx8-.mjs.map +1 -0
- package/dist/{control-BBuW6JsP.mjs → control-Bg7Jaq6_.mjs} +3 -3
- package/dist/{control-BBuW6JsP.mjs.map → control-Bg7Jaq6_.mjs.map} +1 -1
- package/dist/{descriptor-meta-BlNLaw2v-DEFzOiYx.mjs → descriptor-meta-DLXhalaq-mZXhO5bM.mjs} +4 -4
- package/dist/{descriptor-meta-BlNLaw2v-DEFzOiYx.mjs.map → descriptor-meta-DLXhalaq-mZXhO5bM.mjs.map} +1 -1
- package/dist/{descriptor-meta-runtime-Z8gDDekl-CpdMeIL6.mjs → descriptor-meta-runtime-C2pWx159-BLTObR45.mjs} +3 -3
- package/dist/{descriptor-meta-runtime-Z8gDDekl-CpdMeIL6.mjs.map → descriptor-meta-runtime-C2pWx159-BLTObR45.mjs.map} +1 -1
- package/dist/driver.mjs +1 -1
- package/dist/driver__control.mjs +1 -1
- package/dist/driver__control.mjs.map +1 -1
- package/dist/{mongo-adapter-BGuuu-r7-C7GzLW2H.mjs → mongo-adapter-BGuuu-r7-0OIt3FC4.mjs} +2 -2
- package/dist/{mongo-adapter-BGuuu-r7-C7GzLW2H.mjs.map → mongo-adapter-BGuuu-r7-0OIt3FC4.mjs.map} +1 -1
- package/dist/{mongo-driver-hMlvydK_-Cc0oYRgY.mjs → mongo-driver-CPIxAKDF-Bk-Rv8on.mjs} +3 -3
- package/dist/{mongo-driver-hMlvydK_-Cc0oYRgY.mjs.map → mongo-driver-CPIxAKDF-Bk-Rv8on.mjs.map} +1 -1
- package/dist/{pack-C3mtcx_t.d.mts → pack-C5evxnAs.d.mts} +2 -2
- package/dist/{pack-C3mtcx_t.d.mts.map → pack-C5evxnAs.d.mts.map} +1 -1
- package/dist/prisma6-binding-CekUr7j1.mjs +47 -0
- package/dist/prisma6-binding-CekUr7j1.mjs.map +1 -0
- package/dist/prisma6-binding-DppqC9Jo.d.mts +55 -0
- package/dist/prisma6-binding-DppqC9Jo.d.mts.map +1 -0
- package/dist/target.d.mts +6 -6
- package/dist/target.mjs +5 -5
- package/dist/target__codec-ids.d.mts +2 -2
- package/dist/target__codec-ids.mjs +2 -2
- package/dist/target__codec-types.d.mts +1 -1
- package/dist/target__codecs.d.mts +1 -1
- package/dist/target__codecs.mjs +1 -1
- package/dist/target__control.mjs +1 -1
- package/dist/target__pack.d.mts +1 -1
- package/dist/target__pack.mjs +1 -1
- package/dist/target__pack.mjs.map +1 -1
- package/dist/target__prisma6-binding.d.mts +1 -1
- package/dist/target__prisma6-binding.mjs +1 -1
- package/dist/target__runtime.mjs +1 -1
- package/dist/target__runtime.mjs.map +1 -1
- package/package.json +9 -9
- package/dist/codec-ids-CuHXNFWL-BYExYC_z.mjs.map +0 -1
- package/dist/codecs-8iNuBwPO.d.mts.map +0 -1
- package/dist/codecs-CUY6H3CA-BuXwvtSA.mjs.map +0 -1
- package/dist/prisma6-binding-CCK3MCQl.d.mts +0 -26
- package/dist/prisma6-binding-CCK3MCQl.d.mts.map +0 -1
- package/dist/prisma6-binding-Cwvq3v6M.mjs +0 -28
- package/dist/prisma6-binding-Cwvq3v6M.mjs.map +0 -1
package/dist/adapter.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as lowerStage, i as lowerPipeline, n as lowerAggExpr, r as lowerFilter, t as createMongoAdapter } from "./mongo-adapter-BGuuu-r7-
|
|
1
|
+
import { p as MONGO_VECTOR_CODEC_ID } from "./codec-ids-WdrumsYA-BkQfspmL.mjs";
|
|
2
|
+
import { a as lowerStage, i as lowerPipeline, n as lowerAggExpr, r as lowerFilter, t as createMongoAdapter } from "./mongo-adapter-BGuuu-r7-0OIt3FC4.mjs";
|
|
3
3
|
//#region ../../../3-mongo-target/2-mongo-adapter/dist/index.mjs
|
|
4
4
|
const mongoVectorNearOperation = Object.freeze({
|
|
5
5
|
self: { codecId: MONGO_VECTOR_CODEC_ID },
|
|
@@ -129,6 +129,14 @@ declare const mongoScalarAuthoringTypes: {
|
|
|
129
129
|
readonly nativeType: "long";
|
|
130
130
|
};
|
|
131
131
|
};
|
|
132
|
+
readonly Int64Number: {
|
|
133
|
+
readonly kind: "typeConstructor";
|
|
134
|
+
readonly documentation: "A signed 64-bit integer read as a JavaScript number within its safe integer range, stored as BSON long.";
|
|
135
|
+
readonly output: {
|
|
136
|
+
readonly codecId: "mongo/int64Number@1";
|
|
137
|
+
readonly nativeType: "long";
|
|
138
|
+
};
|
|
139
|
+
};
|
|
132
140
|
readonly Decimal128: {
|
|
133
141
|
readonly kind: "typeConstructor";
|
|
134
142
|
readonly documentation: "A 128-bit decimal read as decimal text without an exponent, stored as BSON decimal.";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter__control.d.mts","names":[],"sources":["../../../../3-mongo-target/2-mongo-adapter/dist/control.d.mts"],"mappings":";;;;;;;;;;;;;;;;cAec,mCAAmC,8BAA8B,QAAQ;mBACpE;EACjB,YAAY,IAAI;EAChB,YAAY,KAAK,qBAAqB,QAAQ;EAC9C,gBAAgB,MAAM,yBAAyB,QAAQ;;;;iBAIxC,iBAAiB,IAAI,KAAK,QAAQ;;;;;;;;;;;;cAYrC,mCAAmC;;WAEtC;WACA;EACT,WAAW,QAAQ,aAAa,SAAS,qBAAqB;EAC9D,WAAW,QAAQ,yCAAyC,gBAAgB,QAAQ;EACpF,eAAe,QAAQ,0CAA0C,QAAQ,oBAAoB;EAC7F,WAAW,QAAQ,yCAAyC,eAAe;aAChE;aACA;aACA;MACP;EACJ,aAAa,QAAQ,yCAAyC,eAAe,sBAAsB;aACxF;aACA;aACA;MACP;EACJ,iBAAiB,QAAQ,yCAAyC,eAAe;aACtE;aACA;aACA;aACA;aACA;aACA;MACP;EACJ,WAAW,QAAQ,yCAAyC,iBAAiB,iBAAiB;EAC9F,iBAAiB,QAAQ,0CAA0C,QAAQ;EAC3E,yBAAyB,QAAQ,0CAA0C;;;;iBAI5D,qBAAqB,QAAQ,yCAAyC,UAAU;iBAChF,UAAU,QAAQ,0CAA0C;;;;;;cAM/D;WACH;aACE;aACA;aACA;eACE;eACA;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;aAEF;eACE;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;aAEF;eACE;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;aAEF;eACE;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;aAEF;eACE;;;;cAID,wBAAwB"}
|
|
1
|
+
{"version":3,"file":"adapter__control.d.mts","names":[],"sources":["../../../../3-mongo-target/2-mongo-adapter/dist/control.d.mts"],"mappings":";;;;;;;;;;;;;;;;cAec,mCAAmC,8BAA8B,QAAQ;mBACpE;EACjB,YAAY,IAAI;EAChB,YAAY,KAAK,qBAAqB,QAAQ;EAC9C,gBAAgB,MAAM,yBAAyB,QAAQ;;;;iBAIxC,iBAAiB,IAAI,KAAK,QAAQ;;;;;;;;;;;;cAYrC,mCAAmC;;WAEtC;WACA;EACT,WAAW,QAAQ,aAAa,SAAS,qBAAqB;EAC9D,WAAW,QAAQ,yCAAyC,gBAAgB,QAAQ;EACpF,eAAe,QAAQ,0CAA0C,QAAQ,oBAAoB;EAC7F,WAAW,QAAQ,yCAAyC,eAAe;aAChE;aACA;aACA;MACP;EACJ,aAAa,QAAQ,yCAAyC,eAAe,sBAAsB;aACxF;aACA;aACA;MACP;EACJ,iBAAiB,QAAQ,yCAAyC,eAAe;aACtE;aACA;aACA;aACA;aACA;aACA;MACP;EACJ,WAAW,QAAQ,yCAAyC,iBAAiB,iBAAiB;EAC9F,iBAAiB,QAAQ,0CAA0C,QAAQ;EAC3E,yBAAyB,QAAQ,0CAA0C;;;;iBAI5D,qBAAqB,QAAQ,yCAAyC,UAAU;iBAChF,UAAU,QAAQ,0CAA0C;;;;;;cAM/D;WACH;aACE;aACA;aACA;eACE;eACA;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;aAEF;eACE;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;aAEF;eACE;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;aAEF;eACE;;;WAGJ;aACE;aACA;aACA;eACE;eACA;;aAEF;eACE;;;;cAID,wBAAwB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as MONGO_DECIMAL128_CODEC_ID, c as MONGO_INT64_CODEC_ID, d as MONGO_STRING_CODEC_ID, i as MONGO_DATE_CODEC_ID, l as
|
|
2
|
-
import { t as createMongoAdapter } from "./mongo-adapter-BGuuu-r7-
|
|
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, 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 { t as createMongoAdapter } from "./mongo-adapter-BGuuu-r7-0OIt3FC4.mjs";
|
|
3
3
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
4
4
|
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
5
5
|
import { expr, fn } from "@prisma/orm-family-mongo/query-builder";
|
|
@@ -422,6 +422,14 @@ const mongoScalarAuthoringTypes = {
|
|
|
422
422
|
nativeType: "long"
|
|
423
423
|
}
|
|
424
424
|
},
|
|
425
|
+
Int64Number: {
|
|
426
|
+
kind: "typeConstructor",
|
|
427
|
+
documentation: "A signed 64-bit integer read as a JavaScript number within its safe integer range, stored as BSON long.",
|
|
428
|
+
output: {
|
|
429
|
+
codecId: MONGO_INT64_NUMBER_CODEC_ID,
|
|
430
|
+
nativeType: "long"
|
|
431
|
+
}
|
|
432
|
+
},
|
|
425
433
|
Decimal128: {
|
|
426
434
|
kind: "typeConstructor",
|
|
427
435
|
documentation: "A 128-bit decimal read as decimal text without an exponent, stored as BSON decimal.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter__control.mjs","names":["#execute","#adapter","#markerLedgerCollection","#invariantMergeExpr"],"sources":["../../../../3-mongo-target/2-mongo-adapter/dist/control.mjs"],"sourcesContent":["import { t as createMongoAdapter } from \"./mongo-adapter-BGuuu-r7.mjs\";\nimport { 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_JSON_CODEC_ID, MONGO_OBJECTID_CODEC_ID, MONGO_STRING_CODEC_ID } from \"@internal/target-mongo/codec-ids\";\nimport { MongoAggFieldRef, MongoAggLiteral, MongoAggOperator } from \"@internal/mongo-query-ast/execution\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { MongoServerError } from \"mongodb\";\nimport { MongoSchemaCollection, MongoSchemaCollectionOptions, MongoSchemaIR, MongoSchemaIndex, MongoSchemaValidator } from \"@internal/mongo-schema-ir\";\nimport { parseMarkerRowSafely, withMarkerReadErrorHandling } from \"@internal/errors/execution\";\nimport { ledgerOriginFromStored } from \"@internal/migration-tools/ledger-origin\";\nimport { expr, fn } from \"@internal/mongo-query-builder\";\nimport { collection } from \"@internal/mongo-query-builder/contract-free\";\nimport { type } from \"arktype\";\n//#region src/core/inspection-executor.ts\n/**\n* Executes the read-only catalog inspections (`listCollections` / `listIndexes`)\n* that migration prechecks/postchecks and operation preview evaluate, directly\n* against `db`. Routing these checks through the adapter's lowering seam is\n* deferred to the `typed-migration-verification-queries` slice.\n*/\nvar MongoInspectionExecutor = class {\n\tdb;\n\tconstructor(db) {\n\t\tthis.db = db;\n\t}\n\tasync listIndexes(cmd) {\n\t\ttry {\n\t\t\treturn await this.db.collection(cmd.collection).listIndexes().toArray();\n\t\t} catch (error) {\n\t\t\tif (error instanceof MongoServerError && error.code === 26) return [];\n\t\t\tthrow error;\n\t\t}\n\t}\n\tasync listCollections(_cmd) {\n\t\treturn this.db.listCollections().toArray();\n\t}\n};\n//#endregion\n//#region src/core/introspect-schema.ts\nconst PRISMA_MIGRATIONS_COLLECTION = \"_prisma_migrations\";\nfunction parseIndexKeys(keySpec) {\n\tconst keys = [];\n\tfor (const [field, direction] of Object.entries(keySpec)) keys.push({\n\t\tfield,\n\t\tdirection\n\t});\n\treturn keys;\n}\n/**\n* Exported for unit tests to exercise the defensive `!key` guard; not part of\n* the public API. Callers in this package use it via the `introspectSchema`\n* pipeline only.\n*/\nfunction isDefaultIdIndex(doc) {\n\tconst key = doc[\"key\"];\n\tif (!key) return false;\n\tconst entries = Object.entries(key);\n\treturn entries.length === 1 && entries[0]?.[0] === \"_id\" && entries[0]?.[1] === 1;\n}\nfunction parseIndex(doc) {\n\tconst keySpec = doc[\"key\"];\n\treturn new MongoSchemaIndex({\n\t\tkeys: parseIndexKeys(keySpec),\n\t\tunique: doc[\"unique\"],\n\t\tsparse: doc[\"sparse\"],\n\t\texpireAfterSeconds: doc[\"expireAfterSeconds\"],\n\t\tpartialFilterExpression: doc[\"partialFilterExpression\"],\n\t\twildcardProjection: doc[\"wildcardProjection\"],\n\t\tcollation: doc[\"collation\"] ? blindCast(doc[\"collation\"]) : void 0,\n\t\tweights: doc[\"weights\"],\n\t\tdefault_language: doc[\"default_language\"],\n\t\tlanguage_override: doc[\"language_override\"]\n\t});\n}\nfunction parseValidator(options) {\n\tconst validator = options[\"validator\"];\n\tif (!validator) return void 0;\n\tconst jsonSchema = validator[\"$jsonSchema\"];\n\tif (!jsonSchema) return void 0;\n\treturn new MongoSchemaValidator({\n\t\tjsonSchema,\n\t\tvalidationLevel: options[\"validationLevel\"] ?? \"strict\",\n\t\tvalidationAction: options[\"validationAction\"] ?? \"error\"\n\t});\n}\nfunction parseCollectionOptions(info) {\n\tconst options = info[\"options\"];\n\tif (!options) return void 0;\n\tconst capped = options[\"capped\"];\n\tconst size = options[\"size\"];\n\tconst max = options[\"max\"];\n\tconst timeseries = options[\"timeseries\"];\n\tconst collation = options[\"collation\"] ? blindCast(options[\"collation\"]) : void 0;\n\tconst changeStreamPreAndPostImages = options[\"changeStreamPreAndPostImages\"];\n\tconst clusteredIndex = options[\"clusteredIndex\"];\n\tif (!(capped || timeseries || collation || changeStreamPreAndPostImages || clusteredIndex)) return void 0;\n\treturn new MongoSchemaCollectionOptions({\n\t\t...capped ? { capped: {\n\t\t\tsize: size ?? 0,\n\t\t\t...max != null ? { max } : {}\n\t\t} } : {},\n\t\t...timeseries ? { timeseries } : {},\n\t\t...collation ? { collation } : {},\n\t\t...changeStreamPreAndPostImages ? { changeStreamPreAndPostImages } : {},\n\t\t...clusteredIndex ? { clusteredIndex } : {}\n\t});\n}\nasync function introspectSchema(db) {\n\tconst collectionInfos = await db.listCollections().toArray();\n\tconst collections = [];\n\tfor (const info of collectionInfos) {\n\t\tconst name = info[\"name\"];\n\t\tconst type = info[\"type\"];\n\t\tif (name === PRISMA_MIGRATIONS_COLLECTION) continue;\n\t\tif (name.startsWith(\"system.\")) continue;\n\t\tif (type === \"view\") continue;\n\t\tconst indexes = (await db.collection(name).listIndexes().toArray()).filter((doc) => !isDefaultIdIndex(doc)).map(parseIndex);\n\t\tconst validator = parseValidator(\"options\" in info ? info[\"options\"] : {});\n\t\tconst options = parseCollectionOptions(info);\n\t\tcollections.push(new MongoSchemaCollection({\n\t\t\tname,\n\t\t\tindexes,\n\t\t\t...validator ? { validator } : {},\n\t\t\t...options ? { options } : {}\n\t\t}));\n\t}\n\treturn new MongoSchemaIR(collections);\n}\n//#endregion\n//#region src/core/errors.ts\nfunction mongoAdapterError(code, message, options) {\n\treturn structuredError(code, message, options);\n}\nfunction describeReceivedValue(value) {\n\tif (value === null) return \"null\";\n\tif (typeof value !== \"object\") return typeof value;\n\treturn `object with keys [${Object.keys(value).join(\", \")}]`;\n}\n//#endregion\n//#region src/core/marker-ledger.ts\nconst COLLECTION = \"_prisma_migrations\";\nconst MONGO_MARKER_COLLECTION = `_prisma_migrations marker documents in ${COLLECTION}`;\nconst MONGO_LEDGER_COLLECTION = `_prisma_migrations ledger documents in ${COLLECTION}`;\nconst MongoMarkerDocSchema = type({\n\tspace: \"string\",\n\tstorageHash: \"string\",\n\tprofileHash: \"string\",\n\t\"contractJson?\": \"unknown | null\",\n\t\"canonicalVersion?\": \"number | null\",\n\t\"updatedAt?\": \"Date\",\n\t\"appTag?\": \"string | null\",\n\t\"meta?\": type({ \"[string]\": \"unknown\" }).or(\"null\"),\n\t\"invariants?\": type(\"string\").array(),\n\t\"+\": \"delete\"\n});\nfunction parseMongoMarkerDoc(doc) {\n\tconst result = MongoMarkerDocSchema(doc);\n\tif (result instanceof type.errors) throw mongoAdapterError(\"CONTRACT.MARKER_ROW_CORRUPT\", `Invalid marker doc on ${COLLECTION}: ${result.summary}`, { meta: {\n\t\tcollection: COLLECTION,\n\t\tdetail: result.summary\n\t} });\n\treturn {\n\t\tstorageHash: result.storageHash,\n\t\tprofileHash: result.profileHash,\n\t\tcontractJson: result.contractJson ?? null,\n\t\tcanonicalVersion: result.canonicalVersion ?? null,\n\t\tupdatedAt: result.updatedAt ?? /* @__PURE__ */ new Date(),\n\t\tappTag: result.appTag ?? null,\n\t\tmeta: result.meta ?? {},\n\t\tinvariants: result.invariants ?? []\n\t};\n}\nfunction parseMongoMarkerDocSafely(doc, space) {\n\treturn parseMarkerRowSafely(doc, parseMongoMarkerDoc, {\n\t\tspace,\n\t\tmarkerLocation: MONGO_MARKER_COLLECTION\n\t});\n}\n//#endregion\n//#region src/core/marker-ledger-collection.ts\nconst MARKER_LEDGER_COLLECTION = \"_prisma_migrations\";\n//#endregion\n//#region src/core/mongo-control-driver.ts\nfunction isMongoControlDriver(driver) {\n\treturn driver.familyId === \"mongo\" && driver.targetId === \"mongo\" && \"execute\" in driver && typeof driver.execute === \"function\";\n}\nfunction requireMongoControlDriver(driver) {\n\tif (!isMongoControlDriver(driver)) throw mongoAdapterError(\"CONFIG.VALIDATION_FAILED\", \"Expected a Mongo control driver created by mongoControlDriver.create() from `@internal/driver-mongo/control`.\", { meta: { received: describeReceivedValue(driver) } });\n\treturn driver;\n}\nfunction extractDb(driver) {\n\treturn requireMongoControlDriver(driver).db;\n}\n//#endregion\n//#region src/core/mongo-control-adapter.ts\n/**\n* Mongo control adapter for control-plane operations like introspection\n* and marker-ledger CAS. Implements the family-level `MongoControlAdapter`\n* SPI. Every marker/ledger operation builds a canonical command inline via\n* the contract-free fluent builder and dispatches it through the family\n* adapter's lowering path (`createMongoAdapter().lower(plan, {})`) onto the\n* Mongo wire transport (`driver.execute(wireCommand)`) — the same route SQL\n* marker/ledger ops take through `adapter.lower()` → `driver.query()`.\n*/\nvar MongoControlAdapterImpl = class {\n\tfamilyId = \"mongo\";\n\ttargetId = \"mongo\";\n\t#adapter = createMongoAdapter();\n\t#markerLedgerCollection = collection(MARKER_LEDGER_COLLECTION);\n\tasync #execute(driver, command) {\n\t\tconst plan = {\n\t\t\tcollection: MARKER_LEDGER_COLLECTION,\n\t\t\tcommand,\n\t\t\tmeta: {\n\t\t\t\ttarget: \"mongo\",\n\t\t\t\ttargetFamily: \"mongo\",\n\t\t\t\tstorageHash: \"\",\n\t\t\t\tlane: \"control\"\n\t\t\t}\n\t\t};\n\t\tconst wireCommand = await this.#adapter.lower(plan, {});\n\t\tif (!isMongoControlDriver(driver)) throw mongoAdapterError(\"CONFIG.VALIDATION_FAILED\", \"Mongo control adapter requires a Mongo control driver with an execute() transport. Provide a MongoControlDriver from `@internal/driver-mongo/control`.\", { meta: { received: describeReceivedValue(driver) } });\n\t\tconst rows = [];\n\t\tfor await (const row of driver.execute(wireCommand)) rows.push(row);\n\t\treturn rows;\n\t}\n\tasync executeDdl(driver, command) {\n\t\tconst wire = await this.#adapter.lower({ command }, {});\n\t\tawait driver.run(wire);\n\t}\n\t/**\n\t* Server-side invariant-merge aggregation expression:\n\t* `$sortArray({ input: $setUnion([$ifNull('$invariants', []), incoming]), sortBy: 1 })`.\n\t*\n\t* Built through the typed agg-expr layer — `fn.setUnion` plus the generic\n\t* `MongoAggOperator` for `$ifNull` / `$sortArray` (neither has a named `fn`\n\t* helper). Returns a `MongoAggOperator` that is passed directly to\n\t* `f.stage.set({ invariants: ... })` in the update pipeline.\n\t*/\n\t#invariantMergeExpr(incoming) {\n\t\tconst existingOrEmpty = MongoAggOperator.of(\"$ifNull\", [MongoAggFieldRef.of(\"invariants\"), MongoAggLiteral.of([])]);\n\t\tconst merged = fn.setUnion({\n\t\t\t_field: {\n\t\t\t\tcodecId: \"mongo/array@1\",\n\t\t\t\tnullable: false\n\t\t\t},\n\t\t\tnode: existingOrEmpty\n\t\t}, {\n\t\t\t_field: {\n\t\t\t\tcodecId: \"mongo/array@1\",\n\t\t\t\tnullable: false\n\t\t\t},\n\t\t\tnode: MongoAggLiteral.of([...incoming])\n\t\t});\n\t\treturn MongoAggOperator.of(\"$sortArray\", {\n\t\t\tinput: merged.node,\n\t\t\tsortBy: MongoAggLiteral.of(1)\n\t\t});\n\t}\n\tasync readMarker(driver, space) {\n\t\tconst doc = (await withMarkerReadErrorHandling(() => this.#execute(driver, this.#markerLedgerCollection.aggregate().match((f) => f._id.eq(space)).match((f) => f.space.eq(space)).limit(1).build()), {\n\t\t\tspace,\n\t\t\tmarkerLocation: MONGO_MARKER_COLLECTION\n\t\t}))[0];\n\t\tif (!doc) return null;\n\t\treturn parseMongoMarkerDocSafely(doc, space);\n\t}\n\tasync readAllMarkers(driver) {\n\t\tconst docs = await withMarkerReadErrorHandling(() => this.#execute(driver, this.#markerLedgerCollection.aggregate().match((f) => f._id.type(\"string\")).match((f) => f.space.type(\"string\")).match((f) => expr(fn.eq(f._id, f.space))).build()), {\n\t\t\tspace: \"app\",\n\t\t\tmarkerLocation: MONGO_MARKER_COLLECTION\n\t\t});\n\t\tconst out = /* @__PURE__ */ new Map();\n\t\tfor (const doc of docs) {\n\t\t\tconst space = doc[\"space\"];\n\t\t\t/* v8 ignore next -- @preserve type-narrowing guard: the $match stage above filters on `space: { $type: 'string' }`, so this branch is unreachable at runtime. The check exists so the `out.set(space, ...)` call below can accept `string`. */\n\t\t\tif (typeof space !== \"string\") continue;\n\t\t\tout.set(space, parseMongoMarkerDocSafely(doc, space));\n\t\t}\n\t\treturn out;\n\t}\n\tasync initMarker(driver, space, destination) {\n\t\tconst document = {\n\t\t\t_id: space,\n\t\t\tspace,\n\t\t\tstorageHash: destination.storageHash,\n\t\t\tprofileHash: destination.profileHash,\n\t\t\tcontractJson: null,\n\t\t\tcanonicalVersion: null,\n\t\t\tupdatedAt: /* @__PURE__ */ new Date(),\n\t\t\tappTag: null,\n\t\t\tmeta: {},\n\t\t\tinvariants: [...destination.invariants ?? []]\n\t\t};\n\t\tawait this.#execute(driver, this.#markerLedgerCollection.insertOne(document));\n\t}\n\tasync updateMarker(driver, space, expectedFrom, destination) {\n\t\tconst { invariants } = destination;\n\t\treturn (await this.#execute(driver, this.#markerLedgerCollection.match((f) => f._id.eq(space)).match((f) => f.space.eq(space)).match((f) => f.storageHash.eq(expectedFrom)).findOneAndUpdate((f) => [f.stage.set(invariants === void 0 ? {\n\t\t\tstorageHash: MongoAggLiteral.of(destination.storageHash),\n\t\t\tprofileHash: MongoAggLiteral.of(destination.profileHash),\n\t\t\tupdatedAt: MongoAggLiteral.of(/* @__PURE__ */ new Date())\n\t\t} : {\n\t\t\tstorageHash: MongoAggLiteral.of(destination.storageHash),\n\t\t\tprofileHash: MongoAggLiteral.of(destination.profileHash),\n\t\t\tupdatedAt: MongoAggLiteral.of(/* @__PURE__ */ new Date()),\n\t\t\tinvariants: this.#invariantMergeExpr(invariants)\n\t\t})], { upsert: false }))).length > 0;\n\t}\n\tasync writeLedgerEntry(driver, space, entry) {\n\t\tconst document = {\n\t\t\ttype: \"ledger\",\n\t\t\tspace,\n\t\t\tedgeId: entry.edgeId,\n\t\t\tfrom: entry.from,\n\t\t\tto: entry.to,\n\t\t\tmigrationName: entry.migrationName,\n\t\t\tmigrationHash: entry.migrationHash,\n\t\t\toperations: blindCast(entry.operations),\n\t\t\tappliedAt: /* @__PURE__ */ new Date()\n\t\t};\n\t\tawait this.#execute(driver, this.#markerLedgerCollection.insertOne(document));\n\t}\n\tasync readLedger(driver, space) {\n\t\tconst ledgerContext = {\n\t\t\tspace: space ?? \"*\",\n\t\t\tmarkerLocation: MONGO_LEDGER_COLLECTION\n\t\t};\n\t\tconst chain = this.#markerLedgerCollection.aggregate().match((f) => f.type.eq(\"ledger\"));\n\t\tconst command = space === void 0 ? chain.sort({ _id: 1 }).build() : chain.match((f) => f.space.eq(space)).sort({ _id: 1 }).build();\n\t\tconst docs = await withMarkerReadErrorHandling(() => this.#execute(driver, command), ledgerContext);\n\t\tconst entries = [];\n\t\tfor (const doc of docs) {\n\t\t\tconst migrationName = doc[\"migrationName\"];\n\t\t\tconst migrationHash = doc[\"migrationHash\"];\n\t\t\tconst from = doc[\"from\"];\n\t\t\tconst to = doc[\"to\"];\n\t\t\tconst docSpace = doc[\"space\"];\n\t\t\tif (typeof migrationName !== \"string\" || typeof migrationHash !== \"string\") continue;\n\t\t\tif (typeof from !== \"string\" || typeof to !== \"string\") continue;\n\t\t\tif (typeof docSpace !== \"string\") continue;\n\t\t\tconst appliedAt = doc[\"appliedAt\"];\n\t\t\tconst appliedAtDate = appliedAt instanceof Date ? appliedAt : appliedAt !== void 0 ? new Date(String(appliedAt)) : /* @__PURE__ */ new Date();\n\t\t\tconst operations = doc[\"operations\"];\n\t\t\tconst opList = Array.isArray(operations) ? operations : [];\n\t\t\tentries.push({\n\t\t\t\tspace: docSpace,\n\t\t\t\tmigrationName,\n\t\t\t\tmigrationHash,\n\t\t\t\tfrom: ledgerOriginFromStored(from),\n\t\t\t\tto,\n\t\t\t\tappliedAt: appliedAtDate,\n\t\t\t\toperationCount: opList.length\n\t\t\t});\n\t\t}\n\t\treturn entries;\n\t}\n\tasync introspectSchema(driver) {\n\t\treturn introspectSchema(extractDb(driver));\n\t}\n\tcreateRunnerDependencies(driver) {\n\t\tconst controlDriver = requireMongoControlDriver(driver);\n\t\treturn {\n\t\t\tinspectionExecutor: new MongoInspectionExecutor(controlDriver.db),\n\t\t\tadapter: this.#adapter,\n\t\t\tdriver: controlDriver,\n\t\t\texecuteDdl: (command) => this.executeDdl(controlDriver, command),\n\t\t\tmarkerOps: {\n\t\t\t\treadMarker: (space) => this.readMarker(controlDriver, space),\n\t\t\t\tinitMarker: (space, destination) => this.initMarker(controlDriver, space, destination),\n\t\t\t\tupdateMarker: (space, expectedFrom, destination) => this.updateMarker(controlDriver, space, expectedFrom, destination),\n\t\t\t\twriteLedgerEntry: (space, entry) => this.writeLedgerEntry(controlDriver, space, entry)\n\t\t\t},\n\t\t\tintrospectSchema: () => this.introspectSchema(controlDriver)\n\t\t};\n\t}\n};\n//#endregion\n//#region src/exports/control.ts\n/**\n* The base PSL scalars as zero-arg type constructors in the unified authoring channel. For a codec with one BSON type, `nativeType` is that type (`codecLookup.targetTypesFor(codecId)[0]`). `Json` (several BSON types) and `Bson` (none) have a `nativeType` that names the codec instead; the validator reads the codec's `targetTypes` list, not this value.\n*/\nconst mongoScalarAuthoringTypes = {\n\tString: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Text, stored as BSON string.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_STRING_CODEC_ID,\n\t\t\tnativeType: \"string\"\n\t\t}\n\t},\n\tInt32: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A signed 32-bit integer, stored as BSON int.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_INT32_CODEC_ID,\n\t\t\tnativeType: \"int\"\n\t\t}\n\t},\n\tBool: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A true or false value, stored as BSON bool.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_BOOLEAN_CODEC_ID,\n\t\t\tnativeType: \"bool\"\n\t\t}\n\t},\n\tDate: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A date and time with millisecond precision, stored as BSON date.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_DATE_CODEC_ID,\n\t\t\tnativeType: \"date\"\n\t\t}\n\t},\n\tObjectId: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A 12-byte MongoDB identifier, stored as BSON objectId.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_OBJECTID_CODEC_ID,\n\t\t\tnativeType: \"objectId\"\n\t\t}\n\t},\n\tDouble: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A double-precision floating-point number, stored as BSON double.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_DOUBLE_CODEC_ID,\n\t\t\tnativeType: \"double\"\n\t\t}\n\t},\n\tInt64: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A signed 64-bit integer read as a bigint, stored as BSON long.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_INT64_CODEC_ID,\n\t\t\tnativeType: \"long\"\n\t\t}\n\t},\n\tDecimal128: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A 128-bit decimal read as decimal text without an exponent, stored as BSON decimal.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_DECIMAL128_CODEC_ID,\n\t\t\tnativeType: \"decimal\"\n\t\t}\n\t},\n\tBinary: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Bytes read as a Uint8Array, stored as BSON binData.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_BINARY_CODEC_ID,\n\t\t\tnativeType: \"binData\"\n\t\t}\n\t},\n\tJson: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A JSON value, stored as BSON object, array, string, double, int, long, bool or null; the collection validator admits only those types at the top level, and the codec refuses anything else at any depth.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_JSON_CODEC_ID,\n\t\t\tnativeType: \"json\"\n\t\t}\n\t},\n\tBson: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Any BSON value, read as BsonValue; the collection validator does not constrain it.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_BSON_CODEC_ID,\n\t\t\tnativeType: \"bson\"\n\t\t}\n\t},\n\tInt: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Deprecated: use Int32. A signed 32-bit integer, stored as BSON int.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_INT32_CODEC_ID,\n\t\t\tnativeType: \"int\"\n\t\t},\n\t\tdeprecated: { replacement: \"Int32\" }\n\t},\n\tFloat: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Deprecated: use Double. A double-precision floating-point number, stored as BSON double.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_DOUBLE_CODEC_ID,\n\t\t\tnativeType: \"double\"\n\t\t},\n\t\tdeprecated: { replacement: \"Double\" }\n\t},\n\tBoolean: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Deprecated: use Bool. A true or false value, stored as BSON bool.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_BOOLEAN_CODEC_ID,\n\t\t\tnativeType: \"bool\"\n\t\t},\n\t\tdeprecated: { replacement: \"Bool\" }\n\t},\n\tDateTime: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Deprecated: use Date. A date and time with millisecond precision, stored as BSON date.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_DATE_CODEC_ID,\n\t\t\tnativeType: \"date\"\n\t\t},\n\t\tdeprecated: { replacement: \"Date\" }\n\t}\n};\nconst mongoAdapterDescriptor = {\n\tkind: \"adapter\",\n\tid: \"mongo\",\n\tfamilyId: \"mongo\",\n\ttargetId: \"mongo\",\n\tversion: \"0.0.1\",\n\tauthoring: { type: mongoScalarAuthoringTypes },\n\ttypes: { codecTypes: {\n\t\timport: {\n\t\t\tpackage: \"@internal/target-mongo/codec-types\",\n\t\t\tnamed: \"CodecTypes\",\n\t\t\talias: \"MongoCodecTypes\"\n\t\t},\n\t\ttypeImports: [{\n\t\t\tpackage: \"@internal/target-mongo/codec-types\",\n\t\t\tnamed: \"Vector\",\n\t\t\talias: \"Vector\"\n\t\t}]\n\t} },\n\tcreate(_stack) {\n\t\treturn new MongoControlAdapterImpl();\n\t}\n};\n//#endregion\nexport { MongoControlAdapterImpl, MongoInspectionExecutor, createMongoAdapter, mongoAdapterDescriptor as default, mongoAdapterDescriptor, extractDb, introspectSchema, isMongoControlDriver, mongoScalarAuthoringTypes };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBA,IAAI,0BAA0B,MAAM;CACnC;CACA,YAAY,IAAI;EACf,KAAK,KAAK;CACX;CACA,MAAM,YAAY,KAAK;EACtB,IAAI;GACH,OAAO,MAAM,KAAK,GAAG,WAAW,IAAI,UAAU,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ;EACvE,SAAS,OAAO;GACf,IAAI,iBAAiB,oBAAoB,MAAM,SAAS,IAAI,OAAO,CAAC;GACpE,MAAM;EACP;CACD;CACA,MAAM,gBAAgB,MAAM;EAC3B,OAAO,KAAK,GAAG,gBAAgB,CAAC,CAAC,QAAQ;CAC1C;AACD;AAGA,MAAM,+BAA+B;AACrC,SAAS,eAAe,SAAS;CAChC,MAAM,OAAO,CAAC;CACd,KAAK,MAAM,CAAC,OAAO,cAA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O;EACN,MAAM;EACN,eAAe;EACf,QAAQ;GACP,SAAS;GACT,YAAY;EACb;EACA,YAAY,EAAE,aAAa,SAAS;CACrC;CACA,SAAS;EACR,MAAM;EACN,eAAe;EACf,QAAQ;GACP,SAAS;GACT,YAAY;EACb;EACA,YAAY,EAAE,aAAa,OAAO;CACnC;CACA,UAAU;EACT,MAAM;EACN,eAAe;EACf,QAAQ;GACP,SAAS;GACT,YAAY;EACb;EACA,YAAY,EAAE,aAAa,OAAO;CACnC;AACD;AACA,MAAM,yBAAyB;CAC9B,MAAM;CACN,IAAI;CACJ,UAAU;CACV,UAAU;CACV,SAAS;CACT,WAAW,EAAE,MAAM,0BAA0B;CAC7C,OAAO,EAAE,YAAY;EACpB,QAAQ;GACP,SAAS;GACT,OAAO;GACP,OAAO;EACR;EACA,aAAa,CAAC;GACb,SAAS;GACT,OAAO;GACP,OAAO;EACR,CAAC;CACF,EAAE;CACF,OAAO,QAAQ;EACd,OAAO,IAAI,wBAAwB;CACpC;AACD"}
|
|
1
|
+
{"version":3,"file":"adapter__control.mjs","names":["#execute","#adapter","#markerLedgerCollection","#invariantMergeExpr"],"sources":["../../../../3-mongo-target/2-mongo-adapter/dist/control.mjs"],"sourcesContent":["import { t as createMongoAdapter } from \"./mongo-adapter-BGuuu-r7.mjs\";\nimport { 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 } from \"@internal/target-mongo/codec-ids\";\nimport { MongoAggFieldRef, MongoAggLiteral, MongoAggOperator } from \"@internal/mongo-query-ast/execution\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { MongoServerError } from \"mongodb\";\nimport { MongoSchemaCollection, MongoSchemaCollectionOptions, MongoSchemaIR, MongoSchemaIndex, MongoSchemaValidator } from \"@internal/mongo-schema-ir\";\nimport { parseMarkerRowSafely, withMarkerReadErrorHandling } from \"@internal/errors/execution\";\nimport { ledgerOriginFromStored } from \"@internal/migration-tools/ledger-origin\";\nimport { expr, fn } from \"@internal/mongo-query-builder\";\nimport { collection } from \"@internal/mongo-query-builder/contract-free\";\nimport { type } from \"arktype\";\n//#region src/core/inspection-executor.ts\n/**\n* Executes the read-only catalog inspections (`listCollections` / `listIndexes`)\n* that migration prechecks/postchecks and operation preview evaluate, directly\n* against `db`. Routing these checks through the adapter's lowering seam is\n* deferred to the `typed-migration-verification-queries` slice.\n*/\nvar MongoInspectionExecutor = class {\n\tdb;\n\tconstructor(db) {\n\t\tthis.db = db;\n\t}\n\tasync listIndexes(cmd) {\n\t\ttry {\n\t\t\treturn await this.db.collection(cmd.collection).listIndexes().toArray();\n\t\t} catch (error) {\n\t\t\tif (error instanceof MongoServerError && error.code === 26) return [];\n\t\t\tthrow error;\n\t\t}\n\t}\n\tasync listCollections(_cmd) {\n\t\treturn this.db.listCollections().toArray();\n\t}\n};\n//#endregion\n//#region src/core/introspect-schema.ts\nconst PRISMA_MIGRATIONS_COLLECTION = \"_prisma_migrations\";\nfunction parseIndexKeys(keySpec) {\n\tconst keys = [];\n\tfor (const [field, direction] of Object.entries(keySpec)) keys.push({\n\t\tfield,\n\t\tdirection\n\t});\n\treturn keys;\n}\n/**\n* Exported for unit tests to exercise the defensive `!key` guard; not part of\n* the public API. Callers in this package use it via the `introspectSchema`\n* pipeline only.\n*/\nfunction isDefaultIdIndex(doc) {\n\tconst key = doc[\"key\"];\n\tif (!key) return false;\n\tconst entries = Object.entries(key);\n\treturn entries.length === 1 && entries[0]?.[0] === \"_id\" && entries[0]?.[1] === 1;\n}\nfunction parseIndex(doc) {\n\tconst keySpec = doc[\"key\"];\n\treturn new MongoSchemaIndex({\n\t\tkeys: parseIndexKeys(keySpec),\n\t\tunique: doc[\"unique\"],\n\t\tsparse: doc[\"sparse\"],\n\t\texpireAfterSeconds: doc[\"expireAfterSeconds\"],\n\t\tpartialFilterExpression: doc[\"partialFilterExpression\"],\n\t\twildcardProjection: doc[\"wildcardProjection\"],\n\t\tcollation: doc[\"collation\"] ? blindCast(doc[\"collation\"]) : void 0,\n\t\tweights: doc[\"weights\"],\n\t\tdefault_language: doc[\"default_language\"],\n\t\tlanguage_override: doc[\"language_override\"]\n\t});\n}\nfunction parseValidator(options) {\n\tconst validator = options[\"validator\"];\n\tif (!validator) return void 0;\n\tconst jsonSchema = validator[\"$jsonSchema\"];\n\tif (!jsonSchema) return void 0;\n\treturn new MongoSchemaValidator({\n\t\tjsonSchema,\n\t\tvalidationLevel: options[\"validationLevel\"] ?? \"strict\",\n\t\tvalidationAction: options[\"validationAction\"] ?? \"error\"\n\t});\n}\nfunction parseCollectionOptions(info) {\n\tconst options = info[\"options\"];\n\tif (!options) return void 0;\n\tconst capped = options[\"capped\"];\n\tconst size = options[\"size\"];\n\tconst max = options[\"max\"];\n\tconst timeseries = options[\"timeseries\"];\n\tconst collation = options[\"collation\"] ? blindCast(options[\"collation\"]) : void 0;\n\tconst changeStreamPreAndPostImages = options[\"changeStreamPreAndPostImages\"];\n\tconst clusteredIndex = options[\"clusteredIndex\"];\n\tif (!(capped || timeseries || collation || changeStreamPreAndPostImages || clusteredIndex)) return void 0;\n\treturn new MongoSchemaCollectionOptions({\n\t\t...capped ? { capped: {\n\t\t\tsize: size ?? 0,\n\t\t\t...max != null ? { max } : {}\n\t\t} } : {},\n\t\t...timeseries ? { timeseries } : {},\n\t\t...collation ? { collation } : {},\n\t\t...changeStreamPreAndPostImages ? { changeStreamPreAndPostImages } : {},\n\t\t...clusteredIndex ? { clusteredIndex } : {}\n\t});\n}\nasync function introspectSchema(db) {\n\tconst collectionInfos = await db.listCollections().toArray();\n\tconst collections = [];\n\tfor (const info of collectionInfos) {\n\t\tconst name = info[\"name\"];\n\t\tconst type = info[\"type\"];\n\t\tif (name === PRISMA_MIGRATIONS_COLLECTION) continue;\n\t\tif (name.startsWith(\"system.\")) continue;\n\t\tif (type === \"view\") continue;\n\t\tconst indexes = (await db.collection(name).listIndexes().toArray()).filter((doc) => !isDefaultIdIndex(doc)).map(parseIndex);\n\t\tconst validator = parseValidator(\"options\" in info ? info[\"options\"] : {});\n\t\tconst options = parseCollectionOptions(info);\n\t\tcollections.push(new MongoSchemaCollection({\n\t\t\tname,\n\t\t\tindexes,\n\t\t\t...validator ? { validator } : {},\n\t\t\t...options ? { options } : {}\n\t\t}));\n\t}\n\treturn new MongoSchemaIR(collections);\n}\n//#endregion\n//#region src/core/errors.ts\nfunction mongoAdapterError(code, message, options) {\n\treturn structuredError(code, message, options);\n}\nfunction describeReceivedValue(value) {\n\tif (value === null) return \"null\";\n\tif (typeof value !== \"object\") return typeof value;\n\treturn `object with keys [${Object.keys(value).join(\", \")}]`;\n}\n//#endregion\n//#region src/core/marker-ledger.ts\nconst COLLECTION = \"_prisma_migrations\";\nconst MONGO_MARKER_COLLECTION = `_prisma_migrations marker documents in ${COLLECTION}`;\nconst MONGO_LEDGER_COLLECTION = `_prisma_migrations ledger documents in ${COLLECTION}`;\nconst MongoMarkerDocSchema = type({\n\tspace: \"string\",\n\tstorageHash: \"string\",\n\tprofileHash: \"string\",\n\t\"contractJson?\": \"unknown | null\",\n\t\"canonicalVersion?\": \"number | null\",\n\t\"updatedAt?\": \"Date\",\n\t\"appTag?\": \"string | null\",\n\t\"meta?\": type({ \"[string]\": \"unknown\" }).or(\"null\"),\n\t\"invariants?\": type(\"string\").array(),\n\t\"+\": \"delete\"\n});\nfunction parseMongoMarkerDoc(doc) {\n\tconst result = MongoMarkerDocSchema(doc);\n\tif (result instanceof type.errors) throw mongoAdapterError(\"CONTRACT.MARKER_ROW_CORRUPT\", `Invalid marker doc on ${COLLECTION}: ${result.summary}`, { meta: {\n\t\tcollection: COLLECTION,\n\t\tdetail: result.summary\n\t} });\n\treturn {\n\t\tstorageHash: result.storageHash,\n\t\tprofileHash: result.profileHash,\n\t\tcontractJson: result.contractJson ?? null,\n\t\tcanonicalVersion: result.canonicalVersion ?? null,\n\t\tupdatedAt: result.updatedAt ?? /* @__PURE__ */ new Date(),\n\t\tappTag: result.appTag ?? null,\n\t\tmeta: result.meta ?? {},\n\t\tinvariants: result.invariants ?? []\n\t};\n}\nfunction parseMongoMarkerDocSafely(doc, space) {\n\treturn parseMarkerRowSafely(doc, parseMongoMarkerDoc, {\n\t\tspace,\n\t\tmarkerLocation: MONGO_MARKER_COLLECTION\n\t});\n}\n//#endregion\n//#region src/core/marker-ledger-collection.ts\nconst MARKER_LEDGER_COLLECTION = \"_prisma_migrations\";\n//#endregion\n//#region src/core/mongo-control-driver.ts\nfunction isMongoControlDriver(driver) {\n\treturn driver.familyId === \"mongo\" && driver.targetId === \"mongo\" && \"execute\" in driver && typeof driver.execute === \"function\";\n}\nfunction requireMongoControlDriver(driver) {\n\tif (!isMongoControlDriver(driver)) throw mongoAdapterError(\"CONFIG.VALIDATION_FAILED\", \"Expected a Mongo control driver created by mongoControlDriver.create() from `@internal/driver-mongo/control`.\", { meta: { received: describeReceivedValue(driver) } });\n\treturn driver;\n}\nfunction extractDb(driver) {\n\treturn requireMongoControlDriver(driver).db;\n}\n//#endregion\n//#region src/core/mongo-control-adapter.ts\n/**\n* Mongo control adapter for control-plane operations like introspection\n* and marker-ledger CAS. Implements the family-level `MongoControlAdapter`\n* SPI. Every marker/ledger operation builds a canonical command inline via\n* the contract-free fluent builder and dispatches it through the family\n* adapter's lowering path (`createMongoAdapter().lower(plan, {})`) onto the\n* Mongo wire transport (`driver.execute(wireCommand)`) — the same route SQL\n* marker/ledger ops take through `adapter.lower()` → `driver.query()`.\n*/\nvar MongoControlAdapterImpl = class {\n\tfamilyId = \"mongo\";\n\ttargetId = \"mongo\";\n\t#adapter = createMongoAdapter();\n\t#markerLedgerCollection = collection(MARKER_LEDGER_COLLECTION);\n\tasync #execute(driver, command) {\n\t\tconst plan = {\n\t\t\tcollection: MARKER_LEDGER_COLLECTION,\n\t\t\tcommand,\n\t\t\tmeta: {\n\t\t\t\ttarget: \"mongo\",\n\t\t\t\ttargetFamily: \"mongo\",\n\t\t\t\tstorageHash: \"\",\n\t\t\t\tlane: \"control\"\n\t\t\t}\n\t\t};\n\t\tconst wireCommand = await this.#adapter.lower(plan, {});\n\t\tif (!isMongoControlDriver(driver)) throw mongoAdapterError(\"CONFIG.VALIDATION_FAILED\", \"Mongo control adapter requires a Mongo control driver with an execute() transport. Provide a MongoControlDriver from `@internal/driver-mongo/control`.\", { meta: { received: describeReceivedValue(driver) } });\n\t\tconst rows = [];\n\t\tfor await (const row of driver.execute(wireCommand)) rows.push(row);\n\t\treturn rows;\n\t}\n\tasync executeDdl(driver, command) {\n\t\tconst wire = await this.#adapter.lower({ command }, {});\n\t\tawait driver.run(wire);\n\t}\n\t/**\n\t* Server-side invariant-merge aggregation expression:\n\t* `$sortArray({ input: $setUnion([$ifNull('$invariants', []), incoming]), sortBy: 1 })`.\n\t*\n\t* Built through the typed agg-expr layer — `fn.setUnion` plus the generic\n\t* `MongoAggOperator` for `$ifNull` / `$sortArray` (neither has a named `fn`\n\t* helper). Returns a `MongoAggOperator` that is passed directly to\n\t* `f.stage.set({ invariants: ... })` in the update pipeline.\n\t*/\n\t#invariantMergeExpr(incoming) {\n\t\tconst existingOrEmpty = MongoAggOperator.of(\"$ifNull\", [MongoAggFieldRef.of(\"invariants\"), MongoAggLiteral.of([])]);\n\t\tconst merged = fn.setUnion({\n\t\t\t_field: {\n\t\t\t\tcodecId: \"mongo/array@1\",\n\t\t\t\tnullable: false\n\t\t\t},\n\t\t\tnode: existingOrEmpty\n\t\t}, {\n\t\t\t_field: {\n\t\t\t\tcodecId: \"mongo/array@1\",\n\t\t\t\tnullable: false\n\t\t\t},\n\t\t\tnode: MongoAggLiteral.of([...incoming])\n\t\t});\n\t\treturn MongoAggOperator.of(\"$sortArray\", {\n\t\t\tinput: merged.node,\n\t\t\tsortBy: MongoAggLiteral.of(1)\n\t\t});\n\t}\n\tasync readMarker(driver, space) {\n\t\tconst doc = (await withMarkerReadErrorHandling(() => this.#execute(driver, this.#markerLedgerCollection.aggregate().match((f) => f._id.eq(space)).match((f) => f.space.eq(space)).limit(1).build()), {\n\t\t\tspace,\n\t\t\tmarkerLocation: MONGO_MARKER_COLLECTION\n\t\t}))[0];\n\t\tif (!doc) return null;\n\t\treturn parseMongoMarkerDocSafely(doc, space);\n\t}\n\tasync readAllMarkers(driver) {\n\t\tconst docs = await withMarkerReadErrorHandling(() => this.#execute(driver, this.#markerLedgerCollection.aggregate().match((f) => f._id.type(\"string\")).match((f) => f.space.type(\"string\")).match((f) => expr(fn.eq(f._id, f.space))).build()), {\n\t\t\tspace: \"app\",\n\t\t\tmarkerLocation: MONGO_MARKER_COLLECTION\n\t\t});\n\t\tconst out = /* @__PURE__ */ new Map();\n\t\tfor (const doc of docs) {\n\t\t\tconst space = doc[\"space\"];\n\t\t\t/* v8 ignore next -- @preserve type-narrowing guard: the $match stage above filters on `space: { $type: 'string' }`, so this branch is unreachable at runtime. The check exists so the `out.set(space, ...)` call below can accept `string`. */\n\t\t\tif (typeof space !== \"string\") continue;\n\t\t\tout.set(space, parseMongoMarkerDocSafely(doc, space));\n\t\t}\n\t\treturn out;\n\t}\n\tasync initMarker(driver, space, destination) {\n\t\tconst document = {\n\t\t\t_id: space,\n\t\t\tspace,\n\t\t\tstorageHash: destination.storageHash,\n\t\t\tprofileHash: destination.profileHash,\n\t\t\tcontractJson: null,\n\t\t\tcanonicalVersion: null,\n\t\t\tupdatedAt: /* @__PURE__ */ new Date(),\n\t\t\tappTag: null,\n\t\t\tmeta: {},\n\t\t\tinvariants: [...destination.invariants ?? []]\n\t\t};\n\t\tawait this.#execute(driver, this.#markerLedgerCollection.insertOne(document));\n\t}\n\tasync updateMarker(driver, space, expectedFrom, destination) {\n\t\tconst { invariants } = destination;\n\t\treturn (await this.#execute(driver, this.#markerLedgerCollection.match((f) => f._id.eq(space)).match((f) => f.space.eq(space)).match((f) => f.storageHash.eq(expectedFrom)).findOneAndUpdate((f) => [f.stage.set(invariants === void 0 ? {\n\t\t\tstorageHash: MongoAggLiteral.of(destination.storageHash),\n\t\t\tprofileHash: MongoAggLiteral.of(destination.profileHash),\n\t\t\tupdatedAt: MongoAggLiteral.of(/* @__PURE__ */ new Date())\n\t\t} : {\n\t\t\tstorageHash: MongoAggLiteral.of(destination.storageHash),\n\t\t\tprofileHash: MongoAggLiteral.of(destination.profileHash),\n\t\t\tupdatedAt: MongoAggLiteral.of(/* @__PURE__ */ new Date()),\n\t\t\tinvariants: this.#invariantMergeExpr(invariants)\n\t\t})], { upsert: false }))).length > 0;\n\t}\n\tasync writeLedgerEntry(driver, space, entry) {\n\t\tconst document = {\n\t\t\ttype: \"ledger\",\n\t\t\tspace,\n\t\t\tedgeId: entry.edgeId,\n\t\t\tfrom: entry.from,\n\t\t\tto: entry.to,\n\t\t\tmigrationName: entry.migrationName,\n\t\t\tmigrationHash: entry.migrationHash,\n\t\t\toperations: blindCast(entry.operations),\n\t\t\tappliedAt: /* @__PURE__ */ new Date()\n\t\t};\n\t\tawait this.#execute(driver, this.#markerLedgerCollection.insertOne(document));\n\t}\n\tasync readLedger(driver, space) {\n\t\tconst ledgerContext = {\n\t\t\tspace: space ?? \"*\",\n\t\t\tmarkerLocation: MONGO_LEDGER_COLLECTION\n\t\t};\n\t\tconst chain = this.#markerLedgerCollection.aggregate().match((f) => f.type.eq(\"ledger\"));\n\t\tconst command = space === void 0 ? chain.sort({ _id: 1 }).build() : chain.match((f) => f.space.eq(space)).sort({ _id: 1 }).build();\n\t\tconst docs = await withMarkerReadErrorHandling(() => this.#execute(driver, command), ledgerContext);\n\t\tconst entries = [];\n\t\tfor (const doc of docs) {\n\t\t\tconst migrationName = doc[\"migrationName\"];\n\t\t\tconst migrationHash = doc[\"migrationHash\"];\n\t\t\tconst from = doc[\"from\"];\n\t\t\tconst to = doc[\"to\"];\n\t\t\tconst docSpace = doc[\"space\"];\n\t\t\tif (typeof migrationName !== \"string\" || typeof migrationHash !== \"string\") continue;\n\t\t\tif (typeof from !== \"string\" || typeof to !== \"string\") continue;\n\t\t\tif (typeof docSpace !== \"string\") continue;\n\t\t\tconst appliedAt = doc[\"appliedAt\"];\n\t\t\tconst appliedAtDate = appliedAt instanceof Date ? appliedAt : appliedAt !== void 0 ? new Date(String(appliedAt)) : /* @__PURE__ */ new Date();\n\t\t\tconst operations = doc[\"operations\"];\n\t\t\tconst opList = Array.isArray(operations) ? operations : [];\n\t\t\tentries.push({\n\t\t\t\tspace: docSpace,\n\t\t\t\tmigrationName,\n\t\t\t\tmigrationHash,\n\t\t\t\tfrom: ledgerOriginFromStored(from),\n\t\t\t\tto,\n\t\t\t\tappliedAt: appliedAtDate,\n\t\t\t\toperationCount: opList.length\n\t\t\t});\n\t\t}\n\t\treturn entries;\n\t}\n\tasync introspectSchema(driver) {\n\t\treturn introspectSchema(extractDb(driver));\n\t}\n\tcreateRunnerDependencies(driver) {\n\t\tconst controlDriver = requireMongoControlDriver(driver);\n\t\treturn {\n\t\t\tinspectionExecutor: new MongoInspectionExecutor(controlDriver.db),\n\t\t\tadapter: this.#adapter,\n\t\t\tdriver: controlDriver,\n\t\t\texecuteDdl: (command) => this.executeDdl(controlDriver, command),\n\t\t\tmarkerOps: {\n\t\t\t\treadMarker: (space) => this.readMarker(controlDriver, space),\n\t\t\t\tinitMarker: (space, destination) => this.initMarker(controlDriver, space, destination),\n\t\t\t\tupdateMarker: (space, expectedFrom, destination) => this.updateMarker(controlDriver, space, expectedFrom, destination),\n\t\t\t\twriteLedgerEntry: (space, entry) => this.writeLedgerEntry(controlDriver, space, entry)\n\t\t\t},\n\t\t\tintrospectSchema: () => this.introspectSchema(controlDriver)\n\t\t};\n\t}\n};\n//#endregion\n//#region src/exports/control.ts\n/**\n* The base PSL scalars as zero-arg type constructors in the unified authoring channel. For a codec with one BSON type, `nativeType` is that type (`codecLookup.targetTypesFor(codecId)[0]`). `Json` (several BSON types) and `Bson` (none) have a `nativeType` that names the codec instead; the validator reads the codec's `targetTypes` list, not this value.\n*/\nconst mongoScalarAuthoringTypes = {\n\tString: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Text, stored as BSON string.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_STRING_CODEC_ID,\n\t\t\tnativeType: \"string\"\n\t\t}\n\t},\n\tInt32: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A signed 32-bit integer, stored as BSON int.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_INT32_CODEC_ID,\n\t\t\tnativeType: \"int\"\n\t\t}\n\t},\n\tBool: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A true or false value, stored as BSON bool.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_BOOLEAN_CODEC_ID,\n\t\t\tnativeType: \"bool\"\n\t\t}\n\t},\n\tDate: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A date and time with millisecond precision, stored as BSON date.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_DATE_CODEC_ID,\n\t\t\tnativeType: \"date\"\n\t\t}\n\t},\n\tObjectId: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A 12-byte MongoDB identifier, stored as BSON objectId.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_OBJECTID_CODEC_ID,\n\t\t\tnativeType: \"objectId\"\n\t\t}\n\t},\n\tDouble: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A double-precision floating-point number, stored as BSON double.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_DOUBLE_CODEC_ID,\n\t\t\tnativeType: \"double\"\n\t\t}\n\t},\n\tInt64: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A signed 64-bit integer read as a bigint, stored as BSON long.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_INT64_CODEC_ID,\n\t\t\tnativeType: \"long\"\n\t\t}\n\t},\n\tInt64Number: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A signed 64-bit integer read as a JavaScript number within its safe integer range, stored as BSON long.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_INT64_NUMBER_CODEC_ID,\n\t\t\tnativeType: \"long\"\n\t\t}\n\t},\n\tDecimal128: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A 128-bit decimal read as decimal text without an exponent, stored as BSON decimal.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_DECIMAL128_CODEC_ID,\n\t\t\tnativeType: \"decimal\"\n\t\t}\n\t},\n\tBinary: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Bytes read as a Uint8Array, stored as BSON binData.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_BINARY_CODEC_ID,\n\t\t\tnativeType: \"binData\"\n\t\t}\n\t},\n\tJson: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A JSON value, stored as BSON object, array, string, double, int, long, bool or null; the collection validator admits only those types at the top level, and the codec refuses anything else at any depth.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_JSON_CODEC_ID,\n\t\t\tnativeType: \"json\"\n\t\t}\n\t},\n\tBson: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Any BSON value, read as BsonValue; the collection validator does not constrain it.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_BSON_CODEC_ID,\n\t\t\tnativeType: \"bson\"\n\t\t}\n\t},\n\tInt: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Deprecated: use Int32. A signed 32-bit integer, stored as BSON int.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_INT32_CODEC_ID,\n\t\t\tnativeType: \"int\"\n\t\t},\n\t\tdeprecated: { replacement: \"Int32\" }\n\t},\n\tFloat: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Deprecated: use Double. A double-precision floating-point number, stored as BSON double.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_DOUBLE_CODEC_ID,\n\t\t\tnativeType: \"double\"\n\t\t},\n\t\tdeprecated: { replacement: \"Double\" }\n\t},\n\tBoolean: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Deprecated: use Bool. A true or false value, stored as BSON bool.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_BOOLEAN_CODEC_ID,\n\t\t\tnativeType: \"bool\"\n\t\t},\n\t\tdeprecated: { replacement: \"Bool\" }\n\t},\n\tDateTime: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Deprecated: use Date. A date and time with millisecond precision, stored as BSON date.\",\n\t\toutput: {\n\t\t\tcodecId: MONGO_DATE_CODEC_ID,\n\t\t\tnativeType: \"date\"\n\t\t},\n\t\tdeprecated: { replacement: \"Date\" }\n\t}\n};\nconst mongoAdapterDescriptor = {\n\tkind: \"adapter\",\n\tid: \"mongo\",\n\tfamilyId: \"mongo\",\n\ttargetId: \"mongo\",\n\tversion: \"0.0.1\",\n\tauthoring: { type: mongoScalarAuthoringTypes },\n\ttypes: { codecTypes: {\n\t\timport: {\n\t\t\tpackage: \"@internal/target-mongo/codec-types\",\n\t\t\tnamed: \"CodecTypes\",\n\t\t\talias: \"MongoCodecTypes\"\n\t\t},\n\t\ttypeImports: [{\n\t\t\tpackage: \"@internal/target-mongo/codec-types\",\n\t\t\tnamed: \"Vector\",\n\t\t\talias: \"Vector\"\n\t\t}]\n\t} },\n\tcreate(_stack) {\n\t\treturn new MongoControlAdapterImpl();\n\t}\n};\n//#endregion\nexport { MongoControlAdapterImpl, MongoInspectionExecutor, createMongoAdapter, mongoAdapterDescriptor as default, mongoAdapterDescriptor, extractDb, introspectSchema, isMongoControlDriver, mongoScalarAuthoringTypes };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBA,IAAI,0BAA0B,MAAM;CACnC;CACA,YAAY,IAA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;EACb;CACD;CACA,aAAa;EACZ,MAAM;EACN,eAAe;EACf,QAAQ;GACP,SAAS;GACT,YAAY;EACb;CACD;CACA,YAAY;EACX,MAAM;EACN,eAAe;EACf,QAAQ;GACP,SAAS;GACT,YAAY;EACb;CACD;CACA,QAAQ;EACP,MAAM;EACN,eAAe;EACf,QAAQ;GACP,SAAS;GACT,YAAY;EACb;CACD;CACA,MAAM;EACL,MAAM;EACN,eAAe;EACf,QAAQ;GACP,SAAS;GACT,YAAY;EACb;CACD;CACA,MAAM;EACL,MAAM;EACN,eAAe;EACf,QAAQ;GACP,SAAS;GACT,YAAY;EACb;CACD;CACA,KAAK;EACJ,MAAM;EACN,eAAe;EACf,QAAQ;GACP,SAAS;GACT,YAAY;EACb;EACA,YAAY,EAAE,aAAa,QAAQ;CACpC;CACA,OAAO;EACN,MAAM;EACN,eAAe;EACf,QAAQ;GACP,SAAS;GACT,YAAY;EACb;EACA,YAAY,EAAE,aAAa,SAAS;CACrC;CACA,SAAS;EACR,MAAM;EACN,eAAe;EACf,QAAQ;GACP,SAAS;GACT,YAAY;EACb;EACA,YAAY,EAAE,aAAa,OAAO;CACnC;CACA,UAAU;EACT,MAAM;EACN,eAAe;EACf,QAAQ;GACP,SAAS;GACT,YAAY;EACb;EACA,YAAY,EAAE,aAAa,OAAO;CACnC;AACD;AACA,MAAM,yBAAyB;CAC9B,MAAM;CACN,IAAI;CACJ,UAAU;CACV,UAAU;CACV,SAAS;CACT,WAAW,EAAE,MAAM,0BAA0B;CAC7C,OAAO,EAAE,YAAY;EACpB,QAAQ;GACP,SAAS;GACT,OAAO;GACP,OAAO;EACR;EACA,aAAa,CAAC;GACb,SAAS;GACT,OAAO;GACP,OAAO;EACR,CAAC;CACF,EAAE;CACF,OAAO,QAAQ;EACd,OAAO,IAAI,wBAAwB;CACpC;AACD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as buildStandardCodecRegistry } from "./codecs-
|
|
2
|
-
import { t as createMongoAdapter } from "./mongo-adapter-BGuuu-r7-
|
|
1
|
+
import { t as buildStandardCodecRegistry } from "./codecs-Dt4Q55gF-DDdyWx8-.mjs";
|
|
2
|
+
import { t as createMongoAdapter } from "./mongo-adapter-BGuuu-r7-0OIt3FC4.mjs";
|
|
3
3
|
import { timestampNowRuntimeGenerator } from "@prisma/orm-family-mongo/family/runtime";
|
|
4
4
|
//#region ../../../3-mongo-target/2-mongo-adapter/dist/runtime.mjs
|
|
5
5
|
const mongoRuntimeAdapterDescriptor = {
|
|
@@ -8,10 +8,11 @@ declare const MONGO_BOOLEAN_CODEC_ID: "mongo/bool@1";
|
|
|
8
8
|
declare const MONGO_DATE_CODEC_ID: "mongo/date@1";
|
|
9
9
|
declare const MONGO_VECTOR_CODEC_ID: "mongo/vector@1";
|
|
10
10
|
declare const MONGO_INT64_CODEC_ID: "mongo/int64@1";
|
|
11
|
+
declare const MONGO_INT64_NUMBER_CODEC_ID: "mongo/int64Number@1";
|
|
11
12
|
declare const MONGO_DECIMAL128_CODEC_ID: "mongo/decimal128@1";
|
|
12
13
|
declare const MONGO_BINARY_CODEC_ID: "mongo/binary@1";
|
|
13
14
|
declare const MONGO_JSON_CODEC_ID: "mongo/json@1";
|
|
14
15
|
declare const MONGO_BSON_CODEC_ID: "mongo/bson@1";
|
|
15
16
|
//#endregion
|
|
16
|
-
export { MONGO_DECIMAL128_CODEC_ID as a, MONGO_INT64_CODEC_ID as c,
|
|
17
|
-
//# sourceMappingURL=codec-ids-
|
|
17
|
+
export { MONGO_DECIMAL128_CODEC_ID as a, MONGO_INT64_CODEC_ID as c, MONGO_OBJECTID_CODEC_ID as d, MONGO_STRING_CODEC_ID as f, MONGO_DATE_CODEC_ID as i, MONGO_INT64_NUMBER_CODEC_ID as l, MONGO_BOOLEAN_CODEC_ID as n, MONGO_DOUBLE_CODEC_ID as o, MONGO_VECTOR_CODEC_ID as p, MONGO_BSON_CODEC_ID as r, MONGO_INT32_CODEC_ID as s, MONGO_BINARY_CODEC_ID as t, MONGO_JSON_CODEC_ID as u };
|
|
18
|
+
//# sourceMappingURL=codec-ids-PSU05uwH.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec-ids-
|
|
1
|
+
{"version":3,"file":"codec-ids-PSU05uwH.d.mts","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/codec-ids.d.mts"],"mappings":";;cACc;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../../3-mongo-target/1-mongo-target/dist/codec-ids-
|
|
1
|
+
//#region ../../../3-mongo-target/1-mongo-target/dist/codec-ids-WdrumsYA.mjs
|
|
2
2
|
const MONGO_OBJECTID_CODEC_ID = "mongo/objectId@1";
|
|
3
3
|
const MONGO_STRING_CODEC_ID = "mongo/string@1";
|
|
4
4
|
const MONGO_DOUBLE_CODEC_ID = "mongo/double@1";
|
|
@@ -7,11 +7,12 @@ const MONGO_BOOLEAN_CODEC_ID = "mongo/bool@1";
|
|
|
7
7
|
const MONGO_DATE_CODEC_ID = "mongo/date@1";
|
|
8
8
|
const MONGO_VECTOR_CODEC_ID = "mongo/vector@1";
|
|
9
9
|
const MONGO_INT64_CODEC_ID = "mongo/int64@1";
|
|
10
|
+
const MONGO_INT64_NUMBER_CODEC_ID = "mongo/int64Number@1";
|
|
10
11
|
const MONGO_DECIMAL128_CODEC_ID = "mongo/decimal128@1";
|
|
11
12
|
const MONGO_BINARY_CODEC_ID = "mongo/binary@1";
|
|
12
13
|
const MONGO_JSON_CODEC_ID = "mongo/json@1";
|
|
13
14
|
const MONGO_BSON_CODEC_ID = "mongo/bson@1";
|
|
14
15
|
//#endregion
|
|
15
|
-
export { MONGO_DECIMAL128_CODEC_ID as a, MONGO_INT64_CODEC_ID as c,
|
|
16
|
+
export { MONGO_DECIMAL128_CODEC_ID as a, MONGO_INT64_CODEC_ID as c, MONGO_OBJECTID_CODEC_ID as d, MONGO_STRING_CODEC_ID as f, MONGO_DATE_CODEC_ID as i, MONGO_INT64_NUMBER_CODEC_ID as l, MONGO_BOOLEAN_CODEC_ID as n, MONGO_DOUBLE_CODEC_ID as o, MONGO_VECTOR_CODEC_ID as p, MONGO_BSON_CODEC_ID as r, MONGO_INT32_CODEC_ID as s, MONGO_BINARY_CODEC_ID as t, MONGO_JSON_CODEC_ID as u };
|
|
16
17
|
|
|
17
|
-
//# sourceMappingURL=codec-ids-
|
|
18
|
+
//# sourceMappingURL=codec-ids-WdrumsYA-BkQfspmL.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codec-ids-WdrumsYA-BkQfspmL.mjs","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/codec-ids-WdrumsYA.mjs"],"sourcesContent":["//#region src/core/codec-ids.ts\nconst MONGO_OBJECTID_CODEC_ID = \"mongo/objectId@1\";\nconst MONGO_STRING_CODEC_ID = \"mongo/string@1\";\nconst MONGO_DOUBLE_CODEC_ID = \"mongo/double@1\";\nconst MONGO_INT32_CODEC_ID = \"mongo/int32@1\";\nconst MONGO_BOOLEAN_CODEC_ID = \"mongo/bool@1\";\nconst MONGO_DATE_CODEC_ID = \"mongo/date@1\";\nconst MONGO_VECTOR_CODEC_ID = \"mongo/vector@1\";\nconst MONGO_INT64_CODEC_ID = \"mongo/int64@1\";\nconst MONGO_INT64_NUMBER_CODEC_ID = \"mongo/int64Number@1\";\nconst MONGO_DECIMAL128_CODEC_ID = \"mongo/decimal128@1\";\nconst MONGO_BINARY_CODEC_ID = \"mongo/binary@1\";\nconst MONGO_JSON_CODEC_ID = \"mongo/json@1\";\nconst MONGO_BSON_CODEC_ID = \"mongo/bson@1\";\n//#endregion\nexport { MONGO_DECIMAL128_CODEC_ID as a, MONGO_INT64_CODEC_ID as c, MONGO_OBJECTID_CODEC_ID as d, MONGO_STRING_CODEC_ID as f, MONGO_DATE_CODEC_ID as i, MONGO_INT64_NUMBER_CODEC_ID as l, MONGO_BOOLEAN_CODEC_ID as n, MONGO_DOUBLE_CODEC_ID as o, MONGO_VECTOR_CODEC_ID as p, MONGO_BSON_CODEC_ID as r, MONGO_INT32_CODEC_ID as s, MONGO_BINARY_CODEC_ID as t, MONGO_JSON_CODEC_ID as u };\n\n//# sourceMappingURL=codec-ids-WdrumsYA.mjs.map"],"mappings":";AACA,MAAM,0BAA0B;AAChC,MAAM,wBAAwB;AAC9B,MAAM,wBAAwB;AAC9B,MAAM,uBAAuB;AAC7B,MAAM,yBAAyB;AAC/B,MAAM,sBAAsB;AAC5B,MAAM,wBAAwB;AAC9B,MAAM,uBAAuB;AAC7B,MAAM,8BAA8B;AACpC,MAAM,4BAA4B;AAClC,MAAM,wBAAwB;AAC9B,MAAM,sBAAsB;AAC5B,MAAM,sBAAsB"}
|
|
@@ -46,6 +46,11 @@ type CodecTypes = {
|
|
|
46
46
|
readonly output: bigint;
|
|
47
47
|
readonly traits: 'equality' | 'order' | 'numeric';
|
|
48
48
|
};
|
|
49
|
+
readonly 'mongo/int64Number@1': {
|
|
50
|
+
readonly input: number;
|
|
51
|
+
readonly output: number;
|
|
52
|
+
readonly traits: 'equality' | 'order' | 'numeric';
|
|
53
|
+
};
|
|
49
54
|
readonly 'mongo/decimal128@1': {
|
|
50
55
|
readonly input: string;
|
|
51
56
|
readonly output: string;
|
|
@@ -69,4 +74,4 @@ type CodecTypes = {
|
|
|
69
74
|
};
|
|
70
75
|
//#endregion
|
|
71
76
|
export { Vector as a, CodecTypes as i, BsonScalar as n, BsonValue$1 as r, BsonInputValue$1 as t };
|
|
72
|
-
//# sourceMappingURL=codec-types-
|
|
77
|
+
//# sourceMappingURL=codec-types-wuAXIXjV.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec-types-
|
|
1
|
+
{"version":3,"file":"codec-types-wuAXIXjV.d.mts","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/codec-types.d.mts"],"mappings":";;;;KAGK,OAAO;WACD,iBAAiB;;KAEvB;WACM;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE,OAAO;aACP,QAAQ;aACR;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE,OAAO;aACP,QAAQ;aACR;;WAEF;aACE,OAAO;aACP,QAAQ;aACR;;WAEF;aACE,OAAO;aACP,QAAQ;aACR"}
|
|
@@ -10,7 +10,7 @@ import { JsonValue } from "@prisma/orm-framework/contract/types";
|
|
|
10
10
|
*
|
|
11
11
|
* Single source of truth for both control- and runtime-plane adapter descriptors. Don't duplicate this list — import it.
|
|
12
12
|
*/
|
|
13
|
-
declare const mongoStandardCodecs: readonly [MongoCodec<"mongo/objectId@1", readonly [], ObjectId, string, string>, MongoCodec<"mongo/string@1", readonly [], string, string, string>, MongoCodec<"mongo/double@1", readonly [], number | Double, number, number>, MongoCodec<"mongo/int32@1", readonly [], number, number, number>, MongoCodec<"mongo/bool@1", readonly [], boolean, boolean, boolean>, MongoCodec<"mongo/date@1", readonly [], Date, Date, Date>, MongoCodec<"mongo/vector@1", readonly [], readonly number[], readonly number[], readonly number[]>, MongoCodec<"mongo/int64@1", readonly [], number | bigint | Long, bigint, bigint>, MongoCodec<"mongo/decimal128@1", readonly [], Decimal128, string, string>, MongoCodec<"mongo/binary@1", readonly [], Binary | Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, MongoCodec<"mongo/json@1", readonly [], string | number | boolean | {
|
|
13
|
+
declare const mongoStandardCodecs: readonly [MongoCodec<"mongo/objectId@1", readonly [], ObjectId, string, string>, MongoCodec<"mongo/string@1", readonly [], string, string, string>, MongoCodec<"mongo/double@1", readonly [], number | Double, number, number>, MongoCodec<"mongo/int32@1", readonly [], number, number, number>, MongoCodec<"mongo/bool@1", readonly [], boolean, boolean, boolean>, MongoCodec<"mongo/date@1", readonly [], Date, Date, Date>, MongoCodec<"mongo/vector@1", readonly [], readonly number[], readonly number[], readonly number[]>, MongoCodec<"mongo/int64@1", readonly [], number | bigint | Long, bigint, bigint>, MongoCodec<"mongo/int64Number@1", readonly [], number | bigint | Long, number, number>, MongoCodec<"mongo/decimal128@1", readonly [], Decimal128, string, string>, MongoCodec<"mongo/binary@1", readonly [], Binary | Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, MongoCodec<"mongo/json@1", readonly [], string | number | boolean | {
|
|
14
14
|
readonly [key: string]: JsonValue;
|
|
15
15
|
} | readonly JsonValue[] | null, string | number | boolean | {
|
|
16
16
|
readonly [key: string]: JsonValue;
|
|
@@ -33,4 +33,4 @@ declare function mongoDescriptorById(codecId: string): CodecDescriptor | undefin
|
|
|
33
33
|
declare function buildStandardCodecRegistry(): MongoCodecRegistry;
|
|
34
34
|
//#endregion
|
|
35
35
|
export { mongoStandardCodecs as i, mongoCodecDescriptors as n, mongoDescriptorById as r, buildStandardCodecRegistry as t };
|
|
36
|
-
//# sourceMappingURL=codecs-
|
|
36
|
+
//# sourceMappingURL=codecs-CwHW-tx-.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codecs-CwHW-tx-.d.mts","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/codecs.d.mts"],"mappings":";;;;;;;;;;;;cAWc,+BAA+B,4CAA4C,2BAA2B,mEAAmE,mDAAmD,yBAAyB,kEAAkE,oEAAoE,wCAAwC,MAAM,MAAM,OAAO,oGAAoG,2DAA2D,uBAAuB,iEAAiE,uBAAuB,8CAA8C,6BAA6B,0CAA0C,SAAS,WAAW,kBAAkB,WAAW,kBAAkB,WAAW,mBAAmB;YAC55B,cAAc;aACb;YACD,cAAc;aACb;YACD,cAAc;aACb,qBAAqB,wCAAwC,gBAAgB,gBAAgB;;;;cAI5F,uBAAuB,cAAc;;;;iBAIlC,oBAAoB,kBAAkB;;;;;;iBAMtC,8BAA8B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as MONGO_DECIMAL128_CODEC_ID, c as MONGO_INT64_CODEC_ID, d as
|
|
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
2
|
import { a as mongoDate, c as mongoInt32, d as mongoObjectId, f as mongoString, l as mongoInt64, n as mongoBool, o as mongoDecimal128, p as mongoVector, r as mongoBson, s as mongoDouble, t as mongoBinary, u as mongoJson } from "./data-types-qKwvSozp-De9Y09D3.mjs";
|
|
3
3
|
import { renderTsLiteral } from "@prisma/orm-framework/components/codec";
|
|
4
4
|
import { mongoCodec, newMongoCodecRegistry } from "@prisma/orm-family-mongo/codec";
|
|
@@ -6,7 +6,7 @@ import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
|
6
6
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
7
7
|
import { Binary, Code, Decimal128, Double, EJSON, Long, MinKey, ObjectId } from "bson";
|
|
8
8
|
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
9
|
-
//#region ../../../3-mongo-target/1-mongo-target/dist/codecs-
|
|
9
|
+
//#region ../../../3-mongo-target/1-mongo-target/dist/codecs-Dt4Q55gF.mjs
|
|
10
10
|
function where(path) {
|
|
11
11
|
return path === "" ? "the root" : path;
|
|
12
12
|
}
|
|
@@ -202,7 +202,8 @@ function encodeFailed(codecId, message, received) {
|
|
|
202
202
|
} });
|
|
203
203
|
}
|
|
204
204
|
function describeReceived(value) {
|
|
205
|
-
if (typeof value === "number"
|
|
205
|
+
if (typeof value === "number") return String(value);
|
|
206
|
+
if (typeof value === "bigint") return `${value}n`;
|
|
206
207
|
if (typeof value === "string") return `string ${JSON.stringify(value.slice(0, RECEIVED_PREVIEW_LIMIT))}`;
|
|
207
208
|
if (value === null) return "null";
|
|
208
209
|
if (value instanceof Date) return Number.isNaN(value.getTime()) ? "an invalid Date" : "a Date";
|
|
@@ -283,12 +284,19 @@ function int64Encode(codecId, value) {
|
|
|
283
284
|
return Long.fromBigInt(requireInt64(codecId, value));
|
|
284
285
|
}
|
|
285
286
|
/**
|
|
287
|
+
* 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.
|
|
288
|
+
*/
|
|
289
|
+
function refuseFractionalDouble(codecId, wire) {
|
|
290
|
+
return 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);
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
286
293
|
* 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.
|
|
287
294
|
*/
|
|
288
295
|
function int64Decode(codecId, wire) {
|
|
289
296
|
if (typeof wire === "bigint") return wire;
|
|
290
297
|
if (isLong(wire)) return wire.toBigInt();
|
|
291
298
|
if (typeof wire === "number" && Number.isSafeInteger(wire)) return BigInt(wire);
|
|
299
|
+
if (typeof wire === "number" && Number.isFinite(wire) && !Number.isInteger(wire)) return refuseFractionalDouble(codecId, wire);
|
|
292
300
|
return decodeFailed(codecId, "wire value must be a Long or a safe integer", wire);
|
|
293
301
|
}
|
|
294
302
|
/**
|
|
@@ -305,6 +313,35 @@ function int64DecodeJson(codecId, json) {
|
|
|
305
313
|
if (!isInt64(value)) return decodeFailed(codecId, "JSON value is outside the signed 64-bit range", json);
|
|
306
314
|
return value;
|
|
307
315
|
}
|
|
316
|
+
const SAFE_INTEGER_RANGE = `from ${Number.MIN_SAFE_INTEGER} to ${Number.MAX_SAFE_INTEGER}`;
|
|
317
|
+
function int64NumberEncode(codecId, value) {
|
|
318
|
+
if (!Number.isSafeInteger(value)) encodeFailed(codecId, `value must be an integer ${SAFE_INTEGER_RANGE}; received ${describeReceived(value)}`, value);
|
|
319
|
+
return Long.fromNumber(value);
|
|
320
|
+
}
|
|
321
|
+
function safeIntegerOf(codecId, subject, value) {
|
|
322
|
+
if (value < BigInt(Number.MIN_SAFE_INTEGER) || value > BigInt(Number.MAX_SAFE_INTEGER)) decodeFailed(codecId, `${subject} must be a whole number ${SAFE_INTEGER_RANGE}; received ${value}`, value);
|
|
323
|
+
return Number(value);
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* 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`.
|
|
327
|
+
*/
|
|
328
|
+
function int64NumberDecode(codecId, wire) {
|
|
329
|
+
if (typeof wire === "bigint") return safeIntegerOf(codecId, "wire value", wire);
|
|
330
|
+
if (isLong(wire)) return safeIntegerOf(codecId, "wire value", wire.toBigInt());
|
|
331
|
+
if (typeof wire === "number" && Number.isSafeInteger(wire)) return wire;
|
|
332
|
+
if (typeof wire === "number" && Number.isFinite(wire) && !Number.isInteger(wire)) return refuseFractionalDouble(codecId, wire);
|
|
333
|
+
return decodeFailed(codecId, `wire value must be a whole number ${SAFE_INTEGER_RANGE}; received ${describeReceived(wire)}`, wire);
|
|
334
|
+
}
|
|
335
|
+
function int64NumberEncodeJson(codecId, value) {
|
|
336
|
+
return int64NumberEncode(codecId, value).toString();
|
|
337
|
+
}
|
|
338
|
+
function int64NumberDecodeJson(codecId, json) {
|
|
339
|
+
if (typeof json !== "string" || !DECIMAL_INTEGER.test(json)) return decodeFailed(codecId, "JSON value must be decimal integer text", json);
|
|
340
|
+
return safeIntegerOf(codecId, "JSON value", BigInt(json));
|
|
341
|
+
}
|
|
342
|
+
function decimalTextNumberLiteral(value) {
|
|
343
|
+
return typeof value === "string" && DECIMAL_INTEGER.test(value) ? value : void 0;
|
|
344
|
+
}
|
|
308
345
|
function decimalTextBigintLiteral(value) {
|
|
309
346
|
return typeof value === "string" && DECIMAL_INTEGER.test(value) ? `${value}n` : void 0;
|
|
310
347
|
}
|
|
@@ -576,6 +613,16 @@ const mongoInt64Codec = mongoCodec({
|
|
|
576
613
|
decodeJson: (json) => int64DecodeJson(MONGO_INT64_CODEC_ID, json)
|
|
577
614
|
});
|
|
578
615
|
/**
|
|
616
|
+
* 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.
|
|
617
|
+
*/
|
|
618
|
+
const mongoInt64NumberCodec = mongoCodec({
|
|
619
|
+
typeId: MONGO_INT64_NUMBER_CODEC_ID,
|
|
620
|
+
decode: (wire) => int64NumberDecode(MONGO_INT64_NUMBER_CODEC_ID, wire),
|
|
621
|
+
encode: (value) => int64NumberEncode(MONGO_INT64_NUMBER_CODEC_ID, value),
|
|
622
|
+
encodeJson: (value) => int64NumberEncodeJson(MONGO_INT64_NUMBER_CODEC_ID, value),
|
|
623
|
+
decodeJson: (json) => int64NumberDecodeJson(MONGO_INT64_NUMBER_CODEC_ID, json)
|
|
624
|
+
});
|
|
625
|
+
/**
|
|
579
626
|
* A BSON `decimal`. The application value and its JSON form are the same decimal text, written without an exponent.
|
|
580
627
|
*/
|
|
581
628
|
const mongoDecimal128Codec = mongoCodec({
|
|
@@ -627,6 +674,7 @@ const mongoStandardCodecs = [
|
|
|
627
674
|
mongoDateCodec,
|
|
628
675
|
mongoVectorCodec,
|
|
629
676
|
mongoInt64Codec,
|
|
677
|
+
mongoInt64NumberCodec,
|
|
630
678
|
mongoDecimal128Codec,
|
|
631
679
|
mongoBinaryCodec,
|
|
632
680
|
mongoJsonCodec,
|
|
@@ -727,6 +775,16 @@ const mongoCodecDescriptors = [
|
|
|
727
775
|
targetTypes: ["long"],
|
|
728
776
|
renderValueLiteral: decimalTextBigintLiteral
|
|
729
777
|
}),
|
|
778
|
+
descriptorFor(mongoInt64NumberCodec, {
|
|
779
|
+
dataType: mongoInt64.id,
|
|
780
|
+
traits: [
|
|
781
|
+
"equality",
|
|
782
|
+
"order",
|
|
783
|
+
"numeric"
|
|
784
|
+
],
|
|
785
|
+
targetTypes: ["long"],
|
|
786
|
+
renderValueLiteral: decimalTextNumberLiteral
|
|
787
|
+
}),
|
|
730
788
|
descriptorFor(mongoDecimal128Codec, {
|
|
731
789
|
dataType: mongoDecimal128.id,
|
|
732
790
|
traits: [
|
|
@@ -780,4 +838,4 @@ function buildStandardCodecRegistry() {
|
|
|
780
838
|
//#endregion
|
|
781
839
|
export { mongoTargetError as a, mongoStandardCodecs as i, mongoCodecDescriptors as n, mongoDescriptorById as r, buildStandardCodecRegistry as t };
|
|
782
840
|
|
|
783
|
-
//# sourceMappingURL=codecs-
|
|
841
|
+
//# sourceMappingURL=codecs-Dt4Q55gF-DDdyWx8-.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codecs-Dt4Q55gF-DDdyWx8-.mjs","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/codecs-Dt4Q55gF.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 mongoDate, c as mongoInt32, d as mongoObjectId, f as mongoString, l as mongoInt64, n as mongoBool, o as mongoDecimal128, p as mongoVector, r as mongoBson, s as mongoDouble, t as mongoBinary, u as mongoJson } from \"./data-types-qKwvSozp.mjs\";\nimport { 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\";\nimport { Binary, Code, Decimal128, Double, EJSON, Long, MinKey, ObjectId } from \"bson\";\nimport { structuredError } from \"@internal/utils/structured-error\";\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/mongo-target-errors.ts\nfunction mongoTargetError(code, message, options) {\n\treturn structuredError(code, message, options);\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$1 = { DBRef: \"Write it as a { $ref, $id } document instead.\" };\nfunction encodeRefused$1(received, path) {\n\tconst fix = ENCODE_FIX_BY_RECEIVED$1[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$1(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$1(tag, path);\n\t\tif (!createdByBsonMajor(value)) encodeRefused$1(`${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$1(constructorName(value), path);\n\t\treturn;\n\t}\n\tif (ancestors.has(value)) encodeRefused$1(\"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$1(\"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$1(entries) {\n\treturn Object.fromEntries(entries.map(([key, entry]) => [key, decodeValue$1(entry)]));\n}\nfunction decodeValue$1(value) {\n\tif (typeof value !== \"object\" || value === null) return value;\n\tif (bsonClassTag(value) === \"DBRef\") return decodeEntries$1(dbRefEntries(value));\n\tif (Array.isArray(value)) {\n\t\tconst decoded = value.map(decodeValue$1);\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$1(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$1(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$1(wire));\n}\nconst INT32_MIN$1 = -(2 ** 31);\nconst INT32_MAX$1 = 2 ** 31 - 1;\nfunction asDriverWrites(value) {\n\tif (typeof value === \"number\") return Number.isInteger(value) && (value < INT32_MIN$1 || value > INT32_MAX$1) ? 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 encodeBsonJson(value) {\n\treturn blindCast(EJSON.serialize(asDriverWrites(value), { relaxed: false }));\n}\nfunction decodeBsonJson(json) {\n\treturn EJSON.deserialize(blindCast(json), { relaxed: false });\n}\n//#endregion\n//#region src/core/bson-scalar-helpers.ts\nconst DECIMAL_INTEGER = /^-?\\d+$/;\nconst CANONICAL_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_HEX = /^[0-9a-f]{24}$/i;\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_HEX.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}\nconst INT32_MIN = -(2 ** 31);\nconst INT32_MAX = 2 ** 31 - 1;\nfunction int32Encode(codecId, value) {\n\tif (typeof value !== \"number\" || !Number.isInteger(value) || value < INT32_MIN || value > INT32_MAX) encodeFailed(codecId, `value must be an integer from ${INT32_MIN} to ${INT32_MAX}; received ${describeReceived(value)}`, value);\n\treturn value;\n}\nconst INT64_MIN = -(2n ** 63n);\nconst INT64_MAX = 2n ** 63n - 1n;\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_MIN && value <= INT64_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 int64EncodeJson(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 int64DecodeJson(codecId, json) {\n\tif (typeof json !== \"string\" || !DECIMAL_INTEGER.test(json)) return decodeFailed(codecId, \"JSON value must be decimal integer text\", json);\n\tconst value = BigInt(json);\n\tif (!isInt64(value)) return decodeFailed(codecId, \"JSON value is outside the signed 64-bit range\", json);\n\treturn value;\n}\nconst SAFE_INTEGER_RANGE = `from ${Number.MIN_SAFE_INTEGER} to ${Number.MAX_SAFE_INTEGER}`;\nfunction int64NumberEncode(codecId, value) {\n\tif (!Number.isSafeInteger(value)) encodeFailed(codecId, `value must be an integer ${SAFE_INTEGER_RANGE}; received ${describeReceived(value)}`, value);\n\treturn Long.fromNumber(value);\n}\nfunction safeIntegerOf(codecId, subject, value) {\n\tif (value < BigInt(Number.MIN_SAFE_INTEGER) || value > BigInt(Number.MAX_SAFE_INTEGER)) decodeFailed(codecId, `${subject} must be a whole number ${SAFE_INTEGER_RANGE}; 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 value\", wire);\n\tif (isLong(wire)) return safeIntegerOf(codecId, \"wire value\", wire.toBigInt());\n\tif (typeof wire === \"number\" && Number.isSafeInteger(wire)) 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_INTEGER_RANGE}; received ${describeReceived(wire)}`, wire);\n}\nfunction int64NumberEncodeJson(codecId, value) {\n\treturn int64NumberEncode(codecId, value).toString();\n}\nfunction int64NumberDecodeJson(codecId, json) {\n\tif (typeof json !== \"string\" || !DECIMAL_INTEGER.test(json)) return decodeFailed(codecId, \"JSON value must be decimal integer text\", json);\n\treturn safeIntegerOf(codecId, \"JSON value\", BigInt(json));\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 canonicalDecimalText(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 requireCanonicalDecimalText(codecId, value) {\n\tif (typeof value !== \"string\" || !CANONICAL_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\trequireCanonicalDecimalText(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 = canonicalDecimalText(wire.toString());\n\tif (text === void 0) return decodeFailed(codecId, \"wire value is not decimal text\", wire);\n\treturn text;\n}\nfunction decimal128EncodeJson(codecId, value) {\n\treturn requireCanonicalDecimalText(codecId, value);\n}\n/**\n* The JSON form is what `encodeJson` writes, so it follows the encode rule: canonical decimal text (no exponent), or `NaN`, `Infinity` or `-Infinity`, that a Decimal128 holds exactly.\n*/\nfunction decimal128DecodeJson(codecId, json) {\n\tif (typeof json !== \"string\" || !CANONICAL_DECIMAL_TEXT.test(json)) return decodeFailed(codecId, \"JSON value must be decimal text without an exponent, or NaN, Infinity or -Infinity\", json);\n\ttry {\n\t\tDecimal128.fromString(json);\n\t} catch {\n\t\treturn decodeFailed(codecId, \"JSON value cannot be stored as a Decimal128 exactly\", json);\n\t}\n\treturn json;\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 binaryEncodeJson(value) {\n\treturn Buffer.from(value).toString(\"base64\");\n}\nfunction binaryDecodeJson(codecId, json) {\n\tif (typeof json !== \"string\" || !BASE64_TEXT.test(json)) return decodeFailed(codecId, \"JSON value must be base64 text\", json);\n\treturn new Uint8Array(Buffer.from(json, \"base64\"));\n}\n//#endregion\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\tdecode: (wire) => wire.toHexString(),\n\tencode: (value) => objectIdEncode(MONGO_OBJECTID_CODEC_ID, value)\n});\nconst mongoStringCodec = mongoCodec({\n\ttypeId: MONGO_STRING_CODEC_ID,\n\tdecode: (wire) => wire,\n\tencode: (value) => stringEncode(MONGO_STRING_CODEC_ID, value)\n});\nconst mongoDoubleCodec = mongoCodec({\n\ttypeId: MONGO_DOUBLE_CODEC_ID,\n\tdecode: (wire) => Number(wire),\n\tencode: (value) => doubleEncode(MONGO_DOUBLE_CODEC_ID, value)\n});\nconst mongoInt32Codec = mongoCodec({\n\ttypeId: MONGO_INT32_CODEC_ID,\n\tdecode: (wire) => wire,\n\tencode: (value) => int32Encode(MONGO_INT32_CODEC_ID, value)\n});\nconst mongoBooleanCodec = mongoCodec({\n\ttypeId: MONGO_BOOLEAN_CODEC_ID,\n\tdecode: (wire) => wire,\n\tencode: (value) => booleanEncode(MONGO_BOOLEAN_CODEC_ID, value)\n});\nconst mongoDateCodec = mongoCodec({\n\ttypeId: MONGO_DATE_CODEC_ID,\n\tdecode: (wire) => wire,\n\tencode: (value) => dateEncode(MONGO_DATE_CODEC_ID, value),\n\tencodeJson: (value) => value.toISOString(),\n\tdecodeJson: (json) => {\n\t\tif (typeof json !== \"string\") throw mongoTargetError(\"RUNTIME.DECODE_FAILED\", \"expected ISO date string\", { meta: {\n\t\t\tcodecId: MONGO_DATE_CODEC_ID,\n\t\t\treceived: typeof json\n\t\t} });\n\t\treturn new Date(json);\n\t}\n});\nconst mongoVectorCodec = mongoCodec({\n\ttypeId: MONGO_VECTOR_CODEC_ID,\n\tdecode: (wire) => wire,\n\tencode: (value) => vectorEncode(MONGO_VECTOR_CODEC_ID, value)\n});\n/**\n* A BSON `long`. The application value is a `bigint`, because a `number` cannot hold the full 64-bit range; its JSON form is decimal text.\n*/\nconst mongoInt64Codec = mongoCodec({\n\ttypeId: MONGO_INT64_CODEC_ID,\n\tdecode: (wire) => int64Decode(MONGO_INT64_CODEC_ID, wire),\n\tencode: (value) => int64Encode(MONGO_INT64_CODEC_ID, value),\n\tencodeJson: (value) => int64EncodeJson(MONGO_INT64_CODEC_ID, value),\n\tdecodeJson: (json) => int64DecodeJson(MONGO_INT64_CODEC_ID, json)\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\tdecode: (wire) => int64NumberDecode(MONGO_INT64_NUMBER_CODEC_ID, wire),\n\tencode: (value) => int64NumberEncode(MONGO_INT64_NUMBER_CODEC_ID, value),\n\tencodeJson: (value) => int64NumberEncodeJson(MONGO_INT64_NUMBER_CODEC_ID, value),\n\tdecodeJson: (json) => int64NumberDecodeJson(MONGO_INT64_NUMBER_CODEC_ID, json)\n});\n/**\n* A BSON `decimal`. The application value and its JSON form are the same decimal text, written without an exponent.\n*/\nconst mongoDecimal128Codec = mongoCodec({\n\ttypeId: MONGO_DECIMAL128_CODEC_ID,\n\tdecode: (wire) => decimal128Decode(MONGO_DECIMAL128_CODEC_ID, wire),\n\tencode: (value) => decimal128Encode(MONGO_DECIMAL128_CODEC_ID, value),\n\tencodeJson: (value) => decimal128EncodeJson(MONGO_DECIMAL128_CODEC_ID, value),\n\tdecodeJson: (json) => decimal128DecodeJson(MONGO_DECIMAL128_CODEC_ID, json)\n});\n/**\n* BSON `binData`. The application value is a `Uint8Array`; its JSON form is unwrapped base64.\n*/\nconst mongoBinaryCodec = mongoCodec({\n\ttypeId: MONGO_BINARY_CODEC_ID,\n\tdecode: (wire) => binaryDecode(MONGO_BINARY_CODEC_ID, wire),\n\tencode: (value) => binaryEncode(MONGO_BINARY_CODEC_ID, value),\n\tencodeJson: binaryEncodeJson,\n\tdecodeJson: (json) => binaryDecodeJson(MONGO_BINARY_CODEC_ID, json)\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\tdecode: (wire) => decodeJsonValue(wire),\n\tencode: (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 JSON 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\tdecode: (wire) => decodeBsonValue(wire),\n\tencode: (value) => encodeBsonValue(value),\n\tencodeJson: encodeBsonJson,\n\tdecodeJson: decodeBsonJson\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. 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\tconst renderOutputType = blindCast(metadata.renderOutputType);\n\treturn {\n\t\tcodecId: codec.id,\n\t\tdataType: metadata.dataType,\n\t\ttraits: metadata.traits,\n\t\ttargetTypes: metadata.targetTypes,\n\t\tparamsSchema: blindCast(void 0),\n\t\tisParameterized: false,\n\t\tfactory: blindCast(() => () => codec),\n\t\t...ifDefined(\"renderOutputType\", renderOutputType),\n\t\t...ifDefined(\"renderValueLiteral\", metadata.renderValueLiteral)\n\t};\n}\nconst renderVectorOutputType = (typeParams) => {\n\tconst length = typeParams[\"length\"];\n\tif (length === void 0) return void 0;\n\tif (typeof length !== \"number\" || !Number.isFinite(length) || !Number.isInteger(length) || length <= 0) throw mongoTargetError(\"RUNTIME.TYPE_PARAMS_INVALID\", \"renderOutputType: expected positive integer \\\"length\\\" for Vector\", { meta: {\n\t\tnativeType: \"Vector\",\n\t\tparam: \"length\",\n\t\treceived: length\n\t} });\n\treturn `Vector<${length}>`;\n};\n/**\n* Mongo wire-type codec descriptors. Static metadata for `traits`, `targetTypes`, and `renderOutputType` lives here (the descriptor shape) — `MongoCodec` itself is narrow and only carries the four conversion methods (TML-2357).\n*/\nconst mongoCodecDescriptors = [\n\tdescriptorFor(mongoObjectIdCodec, {\n\t\tdataType: mongoObjectId.id,\n\t\ttraits: [\"equality\"],\n\t\ttargetTypes: [\"objectId\"]\n\t}),\n\tdescriptorFor(mongoStringCodec, {\n\t\tdataType: mongoString.id,\n\t\ttraits: [\n\t\t\t\"equality\",\n\t\t\t\"order\",\n\t\t\t\"textual\"\n\t\t],\n\t\ttargetTypes: [\"string\"],\n\t\trenderValueLiteral: renderTsLiteral\n\t}),\n\tdescriptorFor(mongoDoubleCodec, {\n\t\tdataType: mongoDouble.id,\n\t\ttraits: [\n\t\t\t\"equality\",\n\t\t\t\"order\",\n\t\t\t\"numeric\"\n\t\t],\n\t\ttargetTypes: [\"double\"],\n\t\trenderValueLiteral: renderTsLiteral\n\t}),\n\tdescriptorFor(mongoInt32Codec, {\n\t\tdataType: mongoInt32.id,\n\t\ttraits: [\n\t\t\t\"equality\",\n\t\t\t\"order\",\n\t\t\t\"numeric\"\n\t\t],\n\t\ttargetTypes: [\"int\"],\n\t\trenderValueLiteral: renderTsLiteral\n\t}),\n\tdescriptorFor(mongoBooleanCodec, {\n\t\tdataType: mongoBool.id,\n\t\ttraits: [\"equality\", \"boolean\"],\n\t\ttargetTypes: [\"bool\"],\n\t\trenderValueLiteral: renderTsLiteral\n\t}),\n\tdescriptorFor(mongoDateCodec, {\n\t\tdataType: mongoDate.id,\n\t\ttraits: [\"equality\", \"order\"],\n\t\ttargetTypes: [\"date\"]\n\t}),\n\tdescriptorFor(mongoVectorCodec, {\n\t\tdataType: mongoVector.id,\n\t\ttraits: [\"equality\"],\n\t\ttargetTypes: [\"vector\"],\n\t\trenderOutputType: renderVectorOutputType\n\t}),\n\tdescriptorFor(mongoInt64Codec, {\n\t\tdataType: mongoInt64.id,\n\t\ttraits: [\n\t\t\t\"equality\",\n\t\t\t\"order\",\n\t\t\t\"numeric\"\n\t\t],\n\t\ttargetTypes: [\"long\"],\n\t\trenderValueLiteral: decimalTextBigintLiteral\n\t}),\n\tdescriptorFor(mongoInt64NumberCodec, {\n\t\tdataType: mongoInt64.id,\n\t\ttraits: [\n\t\t\t\"equality\",\n\t\t\t\"order\",\n\t\t\t\"numeric\"\n\t\t],\n\t\ttargetTypes: [\"long\"],\n\t\trenderValueLiteral: decimalTextNumberLiteral\n\t}),\n\tdescriptorFor(mongoDecimal128Codec, {\n\t\tdataType: mongoDecimal128.id,\n\t\ttraits: [\n\t\t\t\"equality\",\n\t\t\t\"order\",\n\t\t\t\"numeric\"\n\t\t],\n\t\ttargetTypes: [\"decimal\"]\n\t}),\n\tdescriptorFor(mongoBinaryCodec, {\n\t\tdataType: mongoBinary.id,\n\t\ttraits: [\"equality\"],\n\t\ttargetTypes: [\"binData\"]\n\t}),\n\tdescriptorFor(mongoJsonCodec, {\n\t\tdataType: mongoJson.id,\n\t\ttraits: [],\n\t\ttargetTypes: [\n\t\t\t\"object\",\n\t\t\t\"array\",\n\t\t\t\"string\",\n\t\t\t\"double\",\n\t\t\t\"int\",\n\t\t\t\"long\",\n\t\t\t\"bool\",\n\t\t\t\"null\"\n\t\t]\n\t}),\n\tdescriptorFor(mongoBsonCodec, {\n\t\tdataType: mongoBson.id,\n\t\ttraits: [],\n\t\ttargetTypes: []\n\t})\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 { mongoTargetError as a, mongoStandardCodecs as i, m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