@prisma/orm-target-mongo 8.0.0-rc.13-dev.12 → 8.0.0-rc.14-dev.1
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 +1 -1
- package/dist/adapter.mjs.map +1 -1
- package/dist/adapter__control.mjs +1 -1
- package/dist/adapter__control.mjs.map +1 -1
- package/dist/adapter__runtime.mjs +2 -2
- package/dist/adapter__runtime.mjs.map +1 -1
- package/dist/{codec-types-BqPLybhD.d.mts → codec-types-CxbyKvKL.d.mts} +13 -1
- package/dist/codec-types-CxbyKvKL.d.mts.map +1 -0
- package/dist/{codecs-xffquj_O.d.mts → codecs-8iNuBwPO.d.mts} +3 -3
- package/dist/codecs-8iNuBwPO.d.mts.map +1 -0
- package/dist/{codecs-B0Szbq1k-DGXwjn9l.mjs → codecs-CUY6H3CA-BuXwvtSA.mjs} +142 -31
- package/dist/codecs-CUY6H3CA-BuXwvtSA.mjs.map +1 -0
- package/dist/{control-BsJepSbb.mjs → control-BBuW6JsP.mjs} +53 -6
- package/dist/control-BBuW6JsP.mjs.map +1 -0
- package/dist/{descriptor-meta-Bobm2m-Q-C9Bd4xUM.mjs → descriptor-meta-BlNLaw2v-DEFzOiYx.mjs} +3 -3
- package/dist/{descriptor-meta-Bobm2m-Q-C9Bd4xUM.mjs.map → descriptor-meta-BlNLaw2v-DEFzOiYx.mjs.map} +1 -1
- package/dist/{descriptor-meta-runtime-C5SUv3LG-Dv9IWBR2.mjs → descriptor-meta-runtime-Z8gDDekl-CpdMeIL6.mjs} +3 -3
- package/dist/{descriptor-meta-runtime-C5SUv3LG-Dv9IWBR2.mjs.map → descriptor-meta-runtime-Z8gDDekl-CpdMeIL6.mjs.map} +1 -1
- package/dist/driver.d.mts +1 -1
- package/dist/driver.mjs +1 -1
- package/dist/driver__control.d.mts +2 -1
- package/dist/driver__control.d.mts.map +1 -1
- package/dist/driver__control.mjs +4 -1
- package/dist/driver__control.mjs.map +1 -1
- package/dist/{mongo-adapter-Cm9V2ftE-B9vITX5a.mjs → mongo-adapter-BGuuu-r7-C7GzLW2H.mjs} +15 -8
- package/dist/mongo-adapter-BGuuu-r7-C7GzLW2H.mjs.map +1 -0
- package/dist/{mongo-driver-D1lEf5Kl-KPfGUVXK.d.mts → mongo-driver-BTjYMBKs-CN2niXFQ.d.mts} +7 -3
- package/dist/mongo-driver-BTjYMBKs-CN2niXFQ.d.mts.map +1 -0
- package/dist/{mongo-driver-DWHM65jW-BbJhtGzG.mjs → mongo-driver-DGJinGzx-BAdSWKcP.mjs} +26 -7
- package/dist/mongo-driver-DGJinGzx-BAdSWKcP.mjs.map +1 -0
- package/dist/{pack-8KElTm25.d.mts → pack-C3mtcx_t.d.mts} +2 -2
- package/dist/{pack-8KElTm25.d.mts.map → pack-C3mtcx_t.d.mts.map} +1 -1
- package/dist/{prisma6-binding-CbZetx23.mjs → prisma6-binding-Cwvq3v6M.mjs} +2 -2
- package/dist/{prisma6-binding-CbZetx23.mjs.map → prisma6-binding-Cwvq3v6M.mjs.map} +1 -1
- package/dist/target.d.mts +3 -3
- package/dist/target.mjs +3 -3
- 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.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-types-BqPLybhD.d.mts.map +0 -1
- package/dist/codecs-B0Szbq1k-DGXwjn9l.mjs.map +0 -1
- package/dist/codecs-xffquj_O.d.mts.map +0 -1
- package/dist/control-BsJepSbb.mjs.map +0 -1
- package/dist/mongo-adapter-Cm9V2ftE-B9vITX5a.mjs.map +0 -1
- package/dist/mongo-driver-D1lEf5Kl-KPfGUVXK.d.mts.map +0 -1
- package/dist/mongo-driver-DWHM65jW-BbJhtGzG.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codecs-B0Szbq1k-DGXwjn9l.mjs","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/codecs-B0Szbq1k.mjs"],"sourcesContent":["import { a as MONGO_DECIMAL128_CODEC_ID, c as MONGO_INT64_CODEC_ID, d as MONGO_STRING_CODEC_ID, f as MONGO_VECTOR_CODEC_ID, i as MONGO_DATE_CODEC_ID, l as MONGO_JSON_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_OBJECTID_CODEC_ID } from \"./codec-ids-CuHXNFWL.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}\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 BSON_VERSION = Symbol.for(\"@@mdb.bson.version\");\nconst BSON_MAJOR = Reflect.get(new MinKey(), BSON_VERSION);\nfunction encodeRefused$1(received, path) {\n\tthrow mongoTargetError(\"RUNTIME.ENCODE_FAILED\", `${MONGO_BSON_CODEC_ID} value must be a BSON value; received ${received} at ${where(path)}`, { 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 (Reflect.get(value, BSON_VERSION) !== BSON_MAJOR) 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 = -(2 ** 31);\nconst INT32_MAX = 2 ** 31 - 1;\nfunction asDriverWrites(value) {\n\tif (typeof value === \"number\") return Number.isInteger(value) && (value < INT32_MIN || value > INT32_MAX) ? new Double(value) : value;\n\tif (typeof value !== \"object\" || value === null) return value;\n\tif (value instanceof Uint8Array) return new Binary(value);\n\tif (Array.isArray(value)) return value.map(asDriverWrites);\n\tif (isPlainObject(value)) return Object.fromEntries(Object.entries(value).map(([key, entry]) => [key, asDriverWrites(entry)]));\n\tconst code = codeWithScope(value);\n\tif (code !== void 0) return new Code(code.code, blindCast(asDriverWrites(code.scope)));\n\treturn value;\n}\n/**\n* Canonical Extended JSON for a BSON value, recording each JavaScript number and `Uint8Array` as the BSON type the driver writes for it: an integer outside the int32 range as a `double`, and bytes as `binData`.\n*/\nfunction 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}\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* 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\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}\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}\nfunction binaryDecode(codecId, wire) {\n\tif (!isBinary(wire)) return decodeFailed(codecId, \"wire value must be a Binary\", 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\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)}`, { 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}\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};\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\treturn Number.isFinite(value) ? value : decodeRefused(\"double\", path);\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) => new ObjectId(value)\n});\nconst mongoStringCodec = mongoCodec({\n\ttypeId: MONGO_STRING_CODEC_ID,\n\tdecode: (wire) => wire,\n\tencode: (value) => value\n});\nconst mongoDoubleCodec = mongoCodec({\n\ttypeId: MONGO_DOUBLE_CODEC_ID,\n\tdecode: (wire) => wire,\n\tencode: (value) => value\n});\nconst mongoInt32Codec = mongoCodec({\n\ttypeId: MONGO_INT32_CODEC_ID,\n\tdecode: (wire) => wire,\n\tencode: (value) => value\n});\nconst mongoBooleanCodec = mongoCodec({\n\ttypeId: MONGO_BOOLEAN_CODEC_ID,\n\tdecode: (wire) => wire,\n\tencode: (value) => value\n});\nconst mongoDateCodec = mongoCodec({\n\ttypeId: MONGO_DATE_CODEC_ID,\n\tdecode: (wire) => wire,\n\tencode: (value) => 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) => 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 `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\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(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, mongoCodecDescriptors as n, mongoDescriptorById as r, buildStandardCodecRegistry as t };\n\n//# sourceMappingURL=codecs-B0Szbq1k.mjs.map"],"mappings":";;;;;;;;;AASA,SAAS,MAAM,MAAM;CACpB,OAAO,SAAS,KAAK,aAAa;AACnC;AACA,SAAS,MAAM,MAAM,KAAK;CACzB,OAAO,SAAS,KAAK,OAAO,GAAG,IAAI,GAAG,KAAK,GAAG;AAC/C;AACA,SAAS,cAAc,OAAO;CAC7B,MAAM,YAAY,OAAO,eAAe,KAAK;CAC7C,OAAO,cAAc,OAAO,aAAa,cAAc;AACxD;AACA,SAAS,aAAa,OAAO;CAC5B,OAAO,MAAM,QAAQ,KAAK,KAAK,OAAO,eAAe,KAAK,MAAM,MAAM;AACvE;AACA,SAAS,YAAY,OAAO;CAC3B,MAAM,MAAM,QAAQ,IAAI,OAAO,WAAW;CAC1C,OAAO,OAAO,QAAQ,WAAW,MAAM,KAAK;AAC7C;;;;AAI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BAAgB;EAC7B,UAAU,UAAU;EACpB,QAAQ,CAAC,YAAY,OAAO;EAC5B,aAAa,CAAC,MAAM;CACrB,CAAC;CACD,cAAc,kBAAkB;EAC/B,UAAU,YAAY;EACtB,QAAQ,CAAC,UAAU;EACnB,aAAa,CAAC,QAAQ;EACtB,kBAAkB;CACnB,CAAC;CACD,cAAc,iBAAiB;EAC9B,UAAU,WAAW;EACrB,QAAQ;GACP;GACA;GACA;EACD;EACA,aAAa,CAAC,MAAM;EACpB,oBAAoB;CACrB,CAAC;CACD,cAAc,sBAAsB;EACnC,UAAU,gBAAgB;EAC1B,QAAQ;GACP;GACA;GACA;EACD;EACA,aAAa,CAAC,SAAS;CACxB,CAAC;CACD,cAAc,kBAAkB;EAC/B,UAAU,YAAY;EACtB,QAAQ,CAAC,UAAU;EACnB,aAAa,CAAC,SAAS;CACxB,CAAC;CACD,cAAc,gBAAgB;EAC7B,UAAU,UAAU;EACpB,QAAQ,CAAC;EACT,aAAa;GACZ;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;CACD,CAAC;CACD,cAAc,gBAAgB;EAC7B,UAAU,UAAU;EACpB,QAAQ,CAAC;EACT,aAAa,CAAC;CACf,CAAC;AACF;;;;AAIA,SAAS,oBAAoB,SAAS;CACrC,OAAO,sBAAsB,MAAM,MAAM,EAAE,YAAY,OAAO;AAC/D;;;;;;AAMA,SAAS,6BAA6B;CACrC,MAAM,WAAW,sBAAsB;CACvC,KAAK,MAAM,SAAS,qBAAqB,SAAS,SAAS,KAAK;CAChE,OAAO;AACR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codecs-xffquj_O.d.mts","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/codecs.d.mts"],"mappings":";;;;;;;;;;;;cAWc,+BAA+B,4CAA4C,2BAA2B,mEAAmE,mEAAmE,kEAAkE,oEAAoE,wCAAwC,MAAM,MAAM,OAAO,oGAAoG,2DAA2D,uBAAuB,8CAA8C,6BAA6B,0CAA0C,QAAQ,WAAW,kBAAkB,WAAW,mBAAmB;YAC7xB,cAAc;aACb;YACD,cAAc;aACb;YACD,cAAc;aACb,qBAAqB,wCAAwC,gBAAgB,gBAAgB;;;;cAI5F,uBAAuB,cAAc;;;;iBAIlC,oBAAoB,kBAAkB;;;;;;iBAMtC,8BAA8B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"control-BsJepSbb.mjs","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/control.mjs"],"sourcesContent":["import { t as mongoTargetDescriptorMeta } from \"./descriptor-meta-Bobm2m-Q.mjs\";\nimport { a as mongoTargetError } from \"./codecs-B0Szbq1k.mjs\";\nimport { a as dropCollection, n as createCollection, o as dropIndex, r as createIndex, t as collMod } from \"./migration-factories-D9gdxskt.mjs\";\nimport { APP_SPACE_ID, contractSnapshotJsonSpecifier, contractSnapshotTypesSpecifier, issueOutcome } from \"@internal/framework-components/control\";\nimport { NamespaceBase, UNBOUND_NAMESPACE_ID, elementCoordinates, freezeNode, hydrateNamespaceEntities } from \"@internal/framework-components/ir\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { canonicalizeSchemasForVerification, contractToMongoSchemaIR, diffMongoSchemas } from \"@internal/family-mongo/control\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { MongoContractSerializerBase, MongoSchemaVerifierBase } from \"@internal/family-mongo/ir\";\nimport { MongoStorage } from \"@internal/mongo-contract\";\nimport { composeMongoEntityKinds } from \"@internal/mongo-contract/entity-kinds\";\nimport { canonicalize, deepEqual } from \"@internal/mongo-schema-ir\";\nimport { TsExpression, jsonToTsSource, renderImports } from \"@internal/ts-render\";\nimport { CollModCommand, CreateCollectionCommand, CreateIndexCommand, DropCollectionCommand, DropIndexCommand, ListCollectionsCommand, ListIndexesCommand, MongoAndExpr, MongoExistsExpr, MongoFieldFilter, MongoNotExpr, MongoOrExpr } from \"@internal/mongo-query-ast/control\";\nimport { Migration } from \"@internal/migration-tools/migration\";\nimport { resolveRequirementSpecifiers } from \"@internal/framework-components/emission\";\nimport { detectScaffoldRuntime, shebangLineFor } from \"@internal/migration-tools/migration-ts\";\nimport { errorRunnerFailed } from \"@internal/errors/execution\";\nimport { verifyMongoSchema } from \"@internal/family-mongo/schema-verify\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { AggregateCommand, MongoAddFieldsStage, MongoLimitStage, MongoLookupStage, MongoMatchStage, MongoMergeStage, MongoProjectStage, MongoSortStage, RawAggregateCommand, RawDeleteManyCommand, RawDeleteOneCommand, RawFindOneAndDeleteCommand, RawFindOneAndUpdateCommand, RawInsertManyCommand, RawInsertOneCommand, RawUpdateManyCommand, RawUpdateOneCommand } from \"@internal/mongo-query-ast/execution\";\nimport { type } from \"arktype\";\n//#region src/core/mongo-target-database.ts\n/**\n* Mongo target `Namespace` concretion. In Mongo the \"namespace\" concept\n* binds to the connection's `db` field — a `MongoTargetDatabase` instance\n* names the database the collections live under. `entries['collection']`\n* holds collection IR. The unbound singleton (below) is the late-bound\n* namespace whose binding the connection's `db` resolves at runtime rather\n* than at authoring time.\n*\n* Qualifier emission is the rendering seam: query / DDL emission asks the\n* namespace for its qualifier (e.g. `\"<db>.<collection>\"`) and consumes\n* the result polymorphically. The unbound singleton overrides these\n* methods to elide the prefix entirely — call sites stay polymorphic and\n* never branch on `id === UNBOUND_NAMESPACE_ID`.\n*/\nvar MongoTargetDatabase = class extends NamespaceBase {\n\tid;\n\tentries;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.id = input.id;\n\t\tconst rawEntries = {\n\t\t\tcollection: {},\n\t\t\t...input.entries\n\t\t};\n\t\tthis.entries = Object.freeze(blindCast(hydrateNamespaceEntities(rawEntries, composeMongoEntityKinds(), \"carry\")));\n\t\tObject.defineProperty(this, \"kind\", {\n\t\t\tvalue: \"database\",\n\t\t\twritable: false,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true\n\t\t});\n\t\tfreezeNode(this);\n\t}\n\tget collection() {\n\t\treturn this.entries.collection ?? Object.freeze({});\n\t}\n\t/**\n\t* The bare qualifier as it would appear in a rendered string. The\n\t* unbound-database singleton overrides this to return `''`.\n\t*/\n\tqualifier() {\n\t\treturn this.id;\n\t}\n\t/**\n\t* Qualify a collection name with the database prefix. The\n\t* unbound-database singleton overrides this to emit just the\n\t* collection name. Used by emission/introspection paths that need a\n\t* fully-qualified reference.\n\t*/\n\tqualifyCollection(collectionName) {\n\t\treturn `${this.id}.${collectionName}`;\n\t}\n};\n/**\n* Singleton subclass for the reserved sentinel namespace id\n* (`UNBOUND_NAMESPACE_ID`) — the late-bound namespace whose binding the\n* connection's `db` resolves at runtime. Overrides qualifier emission\n* to elide the database prefix; call sites that consume `qualifier()`\n* / `qualifyCollection()` get unqualified output without branching on\n* the namespace id.\n*\n* This is the target-side materialization of \"the framework provides\n* affordances; targets implement specifics\": the framework names the\n* sentinel; Mongo decides what late-bound means here (the collection\n* name, naked — the database is supplied by the live connection).\n*/\nvar MongoTargetUnboundDatabase = class MongoTargetUnboundDatabase extends MongoTargetDatabase {\n\tstatic instance = new MongoTargetUnboundDatabase();\n\tconstructor() {\n\t\tsuper({ id: UNBOUND_NAMESPACE_ID });\n\t}\n\tqualifier() {\n\t\treturn \"\";\n\t}\n\tqualifyCollection(collectionName) {\n\t\treturn collectionName;\n\t}\n};\n//#endregion\n//#region src/core/mongo-target-contract-serializer.ts\nvar MongoTargetContractSerializer = class extends MongoContractSerializerBase {\n\tconstructTargetContract(validated) {\n\t\tconst { storage, ...rest } = validated;\n\t\tconst namespaces = Object.fromEntries(Object.entries(storage.namespaces).map(([nsId, nsData]) => {\n\t\t\tconst collectionCount = Object.keys(nsData.entries.collection ?? {}).length;\n\t\t\tconst valueSetCount = Object.keys(nsData.entries[\"valueSet\"] ?? {}).length;\n\t\t\tif (nsId === UNBOUND_NAMESPACE_ID && collectionCount === 0 && valueSetCount === 0) return [nsId, MongoTargetUnboundDatabase.instance];\n\t\t\tconst dbInput = { id: nsData.id };\n\t\t\tif (nsData.entries[\"collection\"] !== void 0 || nsData.entries[\"valueSet\"] !== void 0) dbInput.entries = {\n\t\t\t\tcollection: blindCast(nsData.entries[\"collection\"] ?? {}),\n\t\t\t\t...ifDefined(\"valueSet\", blindCast(nsData.entries[\"valueSet\"]))\n\t\t\t};\n\t\t\treturn [nsId, new MongoTargetDatabase(dbInput)];\n\t\t}));\n\t\tconst targetStorage = new MongoStorage({\n\t\t\tstorageHash: storage.storageHash,\n\t\t\tnamespaces\n\t\t});\n\t\treturn {\n\t\t\t...rest,\n\t\t\tstorage: targetStorage\n\t\t};\n\t}\n\tserializeContract(contract) {\n\t\tconst { storage, ...rest } = contract;\n\t\tconst namespacesJson = {};\n\t\tfor (const [nsId, ns] of Object.entries(storage.namespaces)) {\n\t\t\tconst collectionsOut = {};\n\t\t\tfor (const [collName, coll] of Object.entries(ns.entries.collection ?? {})) collectionsOut[collName] = blindCast(JSON.parse(JSON.stringify(coll)));\n\t\t\tconst valueSetOut = {};\n\t\t\tfor (const [vsName, vs] of Object.entries(ns.entries.valueSet ?? {})) valueSetOut[vsName] = blindCast(JSON.parse(JSON.stringify(vs)));\n\t\t\tnamespacesJson[nsId] = {\n\t\t\t\tid: ns.id,\n\t\t\t\tkind: \"mongo-database\",\n\t\t\t\tentries: {\n\t\t\t\t\tcollection: collectionsOut,\n\t\t\t\t\t...ifDefined(\"valueSet\", Object.keys(valueSetOut).length > 0 ? valueSetOut : void 0)\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\treturn blindCast({\n\t\t\t...rest,\n\t\t\tstorage: {\n\t\t\t\tstorageHash: String(storage.storageHash),\n\t\t\t\tnamespaces: namespacesJson\n\t\t\t}\n\t\t});\n\t}\n};\n//#endregion\n//#region src/core/migrations/op-factory-call.ts\n/**\n* The single module a scaffolded Mongo `migration.ts` imports from: the\n* operation factories below, plus the `Migration` base and `MigrationCLI`\n* that `render-typescript.ts` adds. The authored name; `render-typescript.ts`\n* maps it to whatever the consuming application's import root calls it,\n* once over the whole assembled import list.\n*/\nconst TARGET_MIGRATION_MODULE = \"@internal/target-mongo/migration\";\nvar OpFactoryCallNode = class extends TsExpression {\n\timportRequirements() {\n\t\treturn [{\n\t\t\tmoduleSpecifier: TARGET_MIGRATION_MODULE,\n\t\t\tsymbol: this.factoryName\n\t\t}];\n\t}\n\tfreeze() {\n\t\tObject.freeze(this);\n\t}\n};\nfunction formatKeys(keys) {\n\treturn keys.map((k) => `${k.field}:${k.direction}`).join(\", \");\n}\nvar CreateIndexCall = class extends OpFactoryCallNode {\n\tfactoryName = \"createIndex\";\n\toperationClass = \"additive\";\n\tcollection;\n\tkeys;\n\toptions;\n\tlabel;\n\tconstructor(collection, keys, options) {\n\t\tsuper();\n\t\tthis.collection = collection;\n\t\tthis.keys = keys;\n\t\tthis.options = options;\n\t\tthis.label = `Create index on ${collection} (${formatKeys(keys)})`;\n\t\tthis.freeze();\n\t}\n\ttoOp() {\n\t\treturn createIndex(this.collection, this.keys, this.options);\n\t}\n\trenderTypeScript() {\n\t\treturn this.options ? `createIndex(${jsonToTsSource(this.collection)}, ${jsonToTsSource(this.keys)}, ${jsonToTsSource(this.options)})` : `createIndex(${jsonToTsSource(this.collection)}, ${jsonToTsSource(this.keys)})`;\n\t}\n};\nvar DropIndexCall = class extends OpFactoryCallNode {\n\tfactoryName = \"dropIndex\";\n\toperationClass = \"destructive\";\n\tcollection;\n\tkeys;\n\tlabel;\n\tconstructor(collection, keys) {\n\t\tsuper();\n\t\tthis.collection = collection;\n\t\tthis.keys = keys;\n\t\tthis.label = `Drop index on ${collection} (${formatKeys(keys)})`;\n\t\tthis.freeze();\n\t}\n\ttoOp() {\n\t\treturn dropIndex(this.collection, this.keys);\n\t}\n\trenderTypeScript() {\n\t\treturn `dropIndex(${jsonToTsSource(this.collection)}, ${jsonToTsSource(this.keys)})`;\n\t}\n};\nvar CreateCollectionCall = class extends OpFactoryCallNode {\n\tfactoryName = \"createCollection\";\n\toperationClass = \"additive\";\n\tcollection;\n\toptions;\n\tlabel;\n\tconstructor(collection, options) {\n\t\tsuper();\n\t\tthis.collection = collection;\n\t\tthis.options = options;\n\t\tthis.label = `Create collection ${collection}`;\n\t\tthis.freeze();\n\t}\n\ttoOp() {\n\t\treturn createCollection(this.collection, this.options);\n\t}\n\trenderTypeScript() {\n\t\treturn this.options ? `createCollection(${jsonToTsSource(this.collection)}, ${jsonToTsSource(this.options)})` : `createCollection(${jsonToTsSource(this.collection)})`;\n\t}\n};\nvar DropCollectionCall = class extends OpFactoryCallNode {\n\tfactoryName = \"dropCollection\";\n\toperationClass = \"destructive\";\n\tcollection;\n\tlabel;\n\tconstructor(collection) {\n\t\tsuper();\n\t\tthis.collection = collection;\n\t\tthis.label = `Drop collection ${collection}`;\n\t\tthis.freeze();\n\t}\n\ttoOp() {\n\t\treturn dropCollection(this.collection);\n\t}\n\trenderTypeScript() {\n\t\treturn `dropCollection(${jsonToTsSource(this.collection)})`;\n\t}\n};\nvar CollModCall = class extends OpFactoryCallNode {\n\tfactoryName = \"collMod\";\n\tcollection;\n\toptions;\n\tmeta;\n\toperationClass;\n\tlabel;\n\tconstructor(collection, options, meta) {\n\t\tsuper();\n\t\tthis.collection = collection;\n\t\tthis.options = options;\n\t\tthis.meta = meta;\n\t\tthis.operationClass = meta?.operationClass ?? \"destructive\";\n\t\tthis.label = meta?.label ?? `Modify collection ${collection}`;\n\t\tthis.freeze();\n\t}\n\ttoOp() {\n\t\treturn collMod(this.collection, this.options, this.meta);\n\t}\n\trenderTypeScript() {\n\t\treturn this.meta ? `collMod(${jsonToTsSource(this.collection)}, ${jsonToTsSource(this.options)}, ${jsonToTsSource(this.meta)})` : `collMod(${jsonToTsSource(this.collection)}, ${jsonToTsSource(this.options)})`;\n\t}\n};\nfunction schemaIndexToCreateIndexOptions(index) {\n\treturn {\n\t\t...index.unique ? { unique: true } : {},\n\t\t...ifDefined(\"sparse\", index.sparse),\n\t\t...ifDefined(\"expireAfterSeconds\", index.expireAfterSeconds),\n\t\t...ifDefined(\"partialFilterExpression\", index.partialFilterExpression),\n\t\t...ifDefined(\"wildcardProjection\", index.wildcardProjection),\n\t\t...ifDefined(\"collation\", index.collation),\n\t\t...ifDefined(\"weights\", index.weights),\n\t\t...ifDefined(\"default_language\", index.default_language),\n\t\t...ifDefined(\"language_override\", index.language_override)\n\t};\n}\nfunction schemaCollectionToCreateCollectionOptions(coll) {\n\tconst opts = coll.options;\n\tconst validator = coll.validator;\n\tif (!opts && !validator) return void 0;\n\treturn {\n\t\t...opts?.capped ? { capped: true } : {},\n\t\t...ifDefined(\"size\", opts?.capped?.size),\n\t\t...ifDefined(\"max\", opts?.capped?.max),\n\t\t...ifDefined(\"timeseries\", opts?.timeseries),\n\t\t...ifDefined(\"collation\", opts?.collation),\n\t\t...opts?.clusteredIndex ? { clusteredIndex: {\n\t\t\tkey: { _id: 1 },\n\t\t\tunique: true,\n\t\t\t...opts.clusteredIndex.name != null ? { name: opts.clusteredIndex.name } : {}\n\t\t} } : {},\n\t\t...validator ? { validator: { $jsonSchema: validator.jsonSchema } } : {},\n\t\t...ifDefined(\"validationLevel\", validator?.validationLevel),\n\t\t...ifDefined(\"validationAction\", validator?.validationAction),\n\t\t...ifDefined(\"changeStreamPreAndPostImages\", opts?.changeStreamPreAndPostImages)\n\t};\n}\n//#endregion\n//#region src/core/migrations/render-ops.ts\nfunction renderOps(calls) {\n\treturn calls.map((call) => call.toOp());\n}\n//#endregion\n//#region src/core/migrations/render-typescript.ts\n/**\n* Always-present base imports for the rendered scaffold, both from the\n* target's own `migration` entry:\n*\n* - `Migration` — the user-facing Mongo `Migration` base, forwarded from\n* `@internal/family-mongo`; subclasses don't need to redeclare\n* `targetId` or thread family/target generics.\n* - `MigrationCLI` — the migration-file CLI entrypoint that loads\n* `prisma.config.ts`, assembles a `ControlStack`, and instantiates\n* the migration class. The migration file owns this dependency directly:\n* pulling CLI machinery in at script run time is acceptable because the\n* script's whole purpose is to be invoked from the project that owns the\n* config.\n*\n* Naming one package rather than three is what lets an application that\n* installed only `@prisma/orm-mongo` run a scaffolded migration: emitted\n* code may name only a direct dependency (ADR 242), and the facade carries\n* the target's `migration` entry but neither the family base nor the CLI.\n*/\nconst BASE_IMPORTS = [{\n\tmoduleSpecifier: TARGET_MIGRATION_MODULE,\n\tsymbol: \"Migration\"\n}, {\n\tmoduleSpecifier: TARGET_MIGRATION_MODULE,\n\tsymbol: \"MigrationCLI\"\n}];\n/**\n* Render a list of Mongo `OpFactoryCall`s as a `migration.ts` source string.\n* The result is shebanged, imports the contract JSON from the shared\n* snapshot store (the destination contract, plus the source contract for a\n* non-baseline migration), extends `Migration<Start, End>` (or\n* `Migration<never, End>` for a baseline) from\n* `@internal/target-mongo/migration`,\n* assigns the JSON to `endContractJson` / `startContractJson`, and implements\n* `operations`. The `Migration` base derives `describe()` from those fields.\n*\n* The walk is polymorphic: each call node contributes its own\n* `renderTypeScript()` expression and declares its own `importRequirements()`.\n* The top-level renderer aggregates imports across all nodes and emits one\n* `import { … } from \"…\"` line per module. The `Migration` / `MigrationCLI`\n* base imports and the contract-JSON imports are always emitted, independent\n* of the call nodes.\n*/\nfunction renderCallsToTypeScript(calls, meta) {\n\tconst imports = buildImports(calls, meta);\n\tconst operationsBody = calls.map((c) => c.renderTypeScript()).join(\",\\n\");\n\tconst hasStart = meta.from !== null;\n\tconst startField = hasStart ? [\" override readonly startContractJson = startContract;\"] : [];\n\treturn [\n\t\tshebangLineFor(detectScaffoldRuntime()),\n\t\timports,\n\t\t\"\",\n\t\t`class M extends Migration<${hasStart ? \"Start\" : \"never\"}, End> {`,\n\t\t...startField,\n\t\t\" override readonly endContractJson = endContract;\",\n\t\t\"\",\n\t\t\" override get operations() {\",\n\t\t\" return [\",\n\t\tindent(operationsBody, 6),\n\t\t\" ];\",\n\t\t\" }\",\n\t\t\"}\",\n\t\t\"\",\n\t\t\"export default M;\",\n\t\t\"MigrationCLI.run(import.meta.url, M);\",\n\t\t\"\"\n\t].join(\"\\n\");\n}\nfunction buildImports(calls, meta) {\n\tconst requirements = [...BASE_IMPORTS, ...contractImports(meta)];\n\tfor (const call of calls) for (const req of call.importRequirements()) requirements.push(req);\n\treturn renderImports(resolveRequirementSpecifiers(requirements, meta.resolveImportSpecifier));\n}\n/**\n* The committed contract-JSON imports the scaffold reads its from/to identity\n* from, resolved to the deduplicated snapshot store under\n* `meta.snapshotsImportPath`. The end snapshot is always present; the start\n* snapshot is added only for a non-baseline migration (`meta.from !== null`).\n* The matching `Contract` type imports (aliased `Start`/`End`) feed the\n* `Migration<Start, End>` generics. Baseline emits `Migration<never, End>` with\n* no start imports — `never` is the honest \"no prior contract\" Start.\n*/\nfunction contractImports(meta) {\n\tconst reqs = [{\n\t\tmoduleSpecifier: contractSnapshotJsonSpecifier(meta.snapshotsImportPath, meta.to),\n\t\tsymbol: \"endContract\",\n\t\tkind: \"default\",\n\t\tattributes: { type: \"json\" }\n\t}, {\n\t\tmoduleSpecifier: contractSnapshotTypesSpecifier(meta.snapshotsImportPath, meta.to),\n\t\tsymbol: \"Contract\",\n\t\talias: \"End\",\n\t\ttypeOnly: true\n\t}];\n\tif (meta.from !== null) {\n\t\treqs.push({\n\t\t\tmoduleSpecifier: contractSnapshotJsonSpecifier(meta.snapshotsImportPath, meta.from),\n\t\t\tsymbol: \"startContract\",\n\t\t\tkind: \"default\",\n\t\t\tattributes: { type: \"json\" }\n\t\t});\n\t\treqs.push({\n\t\t\tmoduleSpecifier: contractSnapshotTypesSpecifier(meta.snapshotsImportPath, meta.from),\n\t\t\tsymbol: \"Contract\",\n\t\t\talias: \"Start\",\n\t\t\ttypeOnly: true\n\t\t});\n\t}\n\treturn reqs;\n}\nfunction indent(text, spaces) {\n\tconst pad = \" \".repeat(spaces);\n\treturn text.split(\"\\n\").map((line) => line.trim() ? `${pad}${line}` : line).join(\"\\n\");\n}\n//#endregion\n//#region src/core/migrations/planner-produced-migration.ts\n/**\n* Planner-produced Mongo migration, returned by `MongoMigrationPlanner.plan(...)`\n* and `MongoMigrationPlanner.emptyMigration(...)`.\n*\n* Unlike user-authored migrations (which extend `MongoMigration` from\n* `@internal/family-mongo`), this class lives inside the target and holds\n* the richer authoring IR (`OpFactoryCall[]`) needed to render itself back to\n* TypeScript source. It implements `MigrationPlanWithAuthoringSurface` so\n* that the CLI can uniformly ask any planner result to serialize itself to a\n* `migration.ts`.\n*\n* It extends the framework `Migration` base directly and declares its own\n* `targetId` rather than inheriting `MongoMigration`, whose added value is\n* the lazily-built contract views a planner result never reads.\n*/\nvar PlannerProducedMongoMigration = class extends Migration {\n\tcalls;\n\tmeta;\n\tsnapshotsImportPath;\n\ttargetId = \"mongo\";\n\tconstructor(calls, meta, snapshotsImportPath) {\n\t\tsuper();\n\t\tthis.calls = calls;\n\t\tthis.meta = meta;\n\t\tthis.snapshotsImportPath = snapshotsImportPath;\n\t}\n\tget operations() {\n\t\treturn renderOps(this.calls);\n\t}\n\tdescribe() {\n\t\treturn this.meta;\n\t}\n\trenderTypeScript(resolveImportSpecifier) {\n\t\treturn renderCallsToTypeScript(this.calls, {\n\t\t\tfrom: this.meta.from,\n\t\t\tto: this.meta.to,\n\t\t\tsnapshotsImportPath: this.snapshotsImportPath,\n\t\t\tresolveImportSpecifier\n\t\t});\n\t}\n};\n//#endregion\n//#region src/core/migrations/mongo-planner.ts\nfunction buildIndexLookupKey(index) {\n\tconst keys = index.keys.map((k) => `${k.field}:${k.direction}`).join(\",\");\n\tconst opts = [\n\t\tindex.unique ? \"unique\" : \"\",\n\t\tindex.sparse ? \"sparse\" : \"\",\n\t\tindex.expireAfterSeconds != null ? `ttl:${index.expireAfterSeconds}` : \"\",\n\t\tindex.partialFilterExpression ? `pfe:${canonicalize(index.partialFilterExpression)}` : \"\",\n\t\tindex.wildcardProjection ? `wp:${canonicalize(index.wildcardProjection)}` : \"\",\n\t\tindex.collation ? `col:${canonicalize(index.collation)}` : \"\",\n\t\tindex.weights ? `wt:${canonicalize(index.weights)}` : \"\",\n\t\tindex.default_language ? `dl:${index.default_language}` : \"\",\n\t\tindex.language_override ? `lo:${index.language_override}` : \"\"\n\t].filter(Boolean).join(\";\");\n\treturn opts ? `${keys}|${opts}` : keys;\n}\nfunction validatorsEqual(a, b) {\n\tif (!a && !b) return true;\n\tif (!a || !b) return false;\n\treturn a.validationLevel === b.validationLevel && a.validationAction === b.validationAction && canonicalize(a.jsonSchema) === canonicalize(b.jsonSchema);\n}\nfunction classifyValidatorUpdate(origin, dest) {\n\tif (origin.validationAction !== dest.validationAction && dest.validationAction === \"error\") return \"destructive\";\n\tif (origin.validationLevel !== dest.validationLevel && dest.validationLevel === \"strict\") return \"destructive\";\n\tif (canonicalize(origin.jsonSchema) === canonicalize(dest.jsonSchema)) return \"widening\";\n\treturn isWideningSchemaChange(origin.jsonSchema, dest.jsonSchema) ? \"widening\" : \"destructive\";\n}\nfunction isPlainObject(v) {\n\treturn typeof v === \"object\" && v !== null && !Array.isArray(v);\n}\n/**\n* Returns true when `dest` is a structural superset of `origin` for the common\n* additive case: adding non-required properties to a top-level object schema.\n* Anything uncertain falls through to the safe `destructive` default.\n*/\nfunction isWideningSchemaChange(origin, dest) {\n\tif (origin[\"bsonType\"] !== \"object\" || dest[\"bsonType\"] !== \"object\") return false;\n\tconst allKeys = /* @__PURE__ */ new Set([...Object.keys(origin), ...Object.keys(dest)]);\n\tfor (const key of allKeys) {\n\t\tif (key === \"required\" || key === \"properties\") continue;\n\t\tif (canonicalize(origin[key]) !== canonicalize(dest[key])) return false;\n\t}\n\tconst originRequired = new Set(Array.isArray(origin[\"required\"]) ? origin[\"required\"] : []);\n\tconst destRequired = Array.isArray(dest[\"required\"]) ? dest[\"required\"] : [];\n\tfor (const field of destRequired) if (!originRequired.has(field)) return false;\n\tconst originProps = isPlainObject(origin[\"properties\"]) ? origin[\"properties\"] : {};\n\tconst destProps = isPlainObject(dest[\"properties\"]) ? dest[\"properties\"] : {};\n\tfor (const field of Object.keys(originProps)) {\n\t\tif (!Object.hasOwn(destProps, field)) return false;\n\t\tif (canonicalize(originProps[field]) !== canonicalize(destProps[field])) return false;\n\t}\n\treturn true;\n}\nfunction hasImmutableOptionChange(origin, dest) {\n\tif (canonicalize(origin?.capped) !== canonicalize(dest?.capped)) return \"capped\";\n\tif (canonicalize(origin?.timeseries) !== canonicalize(dest?.timeseries)) return \"timeseries\";\n\tif (canonicalize(origin?.collation) !== canonicalize(dest?.collation)) return \"collation\";\n\tif (canonicalize(origin?.clusteredIndex) !== canonicalize(dest?.clusteredIndex)) return \"clusteredIndex\";\n}\nfunction collectionHasOptions(coll) {\n\treturn !!(coll.options || coll.validator);\n}\nvar MongoMigrationPlanner = class {\n\tplanCalls(options) {\n\t\tconst contract = blindCast(options.contract);\n\t\tconst originIR = blindCast(options.schema);\n\t\tconst destinationIR = contractToMongoSchemaIR(contract);\n\t\tconst collCreates = [];\n\t\tconst drops = [];\n\t\tconst creates = [];\n\t\tconst validatorOps = [];\n\t\tconst mutableOptionOps = [];\n\t\tconst collDrops = [];\n\t\tconst conflicts = [];\n\t\tconst allCollectionNames = /* @__PURE__ */ new Set([...originIR.collectionNames, ...destinationIR.collectionNames]);\n\t\tfor (const collName of [...allCollectionNames].sort()) {\n\t\t\tconst originColl = originIR.collection(collName);\n\t\t\tconst destColl = destinationIR.collection(collName);\n\t\t\tif (!originColl) {\n\t\t\t\tif (destColl && (collectionHasOptions(destColl) || destColl.indexes.length === 0)) {\n\t\t\t\t\tconst opts = collectionHasOptions(destColl) ? schemaCollectionToCreateCollectionOptions(destColl) : void 0;\n\t\t\t\t\tcollCreates.push(new CreateCollectionCall(collName, opts));\n\t\t\t\t}\n\t\t\t} else if (!destColl) collDrops.push(new DropCollectionCall(collName));\n\t\t\telse {\n\t\t\t\tconst immutableChange = hasImmutableOptionChange(originColl.options, destColl.options);\n\t\t\t\tif (immutableChange) conflicts.push({\n\t\t\t\t\tkind: \"policy-violation\",\n\t\t\t\t\tsummary: `Cannot change immutable collection option '${immutableChange}' on ${collName}`,\n\t\t\t\t\twhy: `MongoDB does not support modifying the '${immutableChange}' option after collection creation`\n\t\t\t\t});\n\t\t\t\tconst mutableCall = planMutableOptionsDiffCall(collName, originColl.options, destColl.options);\n\t\t\t\tif (mutableCall) mutableOptionOps.push(mutableCall);\n\t\t\t\tconst validatorCall = planValidatorDiffCall(collName, originColl.validator, destColl.validator);\n\t\t\t\tif (validatorCall) validatorOps.push(validatorCall);\n\t\t\t}\n\t\t\tconst originLookup = /* @__PURE__ */ new Map();\n\t\t\tif (originColl) for (const idx of originColl.indexes) originLookup.set(buildIndexLookupKey(idx), idx);\n\t\t\tconst destLookup = /* @__PURE__ */ new Map();\n\t\t\tif (destColl) for (const idx of destColl.indexes) destLookup.set(buildIndexLookupKey(idx), idx);\n\t\t\tfor (const [lookupKey, idx] of originLookup) if (!destLookup.has(lookupKey)) drops.push(new DropIndexCall(collName, idx.keys));\n\t\t\tfor (const [lookupKey, idx] of destLookup) if (!originLookup.has(lookupKey)) creates.push(new CreateIndexCall(collName, idx.keys, schemaIndexToCreateIndexOptions(idx)));\n\t\t}\n\t\tif (conflicts.length > 0) return {\n\t\t\tkind: \"failure\",\n\t\t\tconflicts\n\t\t};\n\t\tconst allCalls = [\n\t\t\t...collCreates,\n\t\t\t...drops,\n\t\t\t...creates,\n\t\t\t...validatorOps,\n\t\t\t...mutableOptionOps,\n\t\t\t...collDrops\n\t\t];\n\t\tfor (const call of allCalls) if (!options.policy.allowedOperationClasses.includes(call.operationClass)) conflicts.push({\n\t\t\tkind: \"policy-violation\",\n\t\t\tsummary: `${call.operationClass} operation disallowed: ${call.label}`,\n\t\t\twhy: `Policy does not allow '${call.operationClass}' operations`\n\t\t});\n\t\tif (conflicts.length > 0) return {\n\t\t\tkind: \"failure\",\n\t\t\tconflicts\n\t\t};\n\t\treturn {\n\t\t\tkind: \"success\",\n\t\t\tcalls: allCalls\n\t\t};\n\t}\n\tplan(options) {\n\t\tconst contract = blindCast(options.contract);\n\t\tconst result = this.planCalls(options);\n\t\tif (result.kind === \"failure\") return result;\n\t\treturn {\n\t\t\tkind: \"success\",\n\t\t\tplan: new PlannerProducedMongoMigration(result.calls, {\n\t\t\t\tfrom: options.fromContract?.storage.storageHash ?? null,\n\t\t\t\tto: contract.storage.storageHash\n\t\t\t}, options.snapshotsImportPath)\n\t\t};\n\t}\n\t/**\n\t* Produce an empty `migration.ts` authoring surface for `migration new`.\n\t*\n\t* The \"empty migration\" is a `PlannerProducedMongoMigration` with no\n\t* operations; `renderTypeScript()` emits a stub class with the correct\n\t* `from`/`to` metadata that the user then fills in with operations. The\n\t* contract path on the context is unused — Mongo's emitted source does\n\t* not import from the generated contract `.d.ts`.\n\t*/\n\temptyMigration(context) {\n\t\treturn new PlannerProducedMongoMigration([], {\n\t\t\tfrom: context.fromHash,\n\t\t\tto: context.toHash\n\t\t}, context.snapshotsImportPath);\n\t}\n};\nfunction planValidatorDiffCall(collName, originValidator, destValidator) {\n\tif (validatorsEqual(originValidator, destValidator)) return void 0;\n\tif (destValidator) {\n\t\tconst operationClass = originValidator ? classifyValidatorUpdate(originValidator, destValidator) : \"destructive\";\n\t\treturn new CollModCall(collName, {\n\t\t\tvalidator: { $jsonSchema: destValidator.jsonSchema },\n\t\t\tvalidationLevel: destValidator.validationLevel,\n\t\t\tvalidationAction: destValidator.validationAction\n\t\t}, {\n\t\t\tid: `validator.${collName}.${originValidator ? \"update\" : \"add\"}`,\n\t\t\tlabel: `${originValidator ? \"Update\" : \"Add\"} validator on ${collName}`,\n\t\t\toperationClass\n\t\t});\n\t}\n\treturn new CollModCall(collName, {\n\t\tvalidator: {},\n\t\tvalidationLevel: \"strict\",\n\t\tvalidationAction: \"error\"\n\t}, {\n\t\tid: `validator.${collName}.remove`,\n\t\tlabel: `Remove validator on ${collName}`,\n\t\toperationClass: \"widening\"\n\t});\n}\nfunction planMutableOptionsDiffCall(collName, origin, dest) {\n\tconst originCSPPI = origin?.changeStreamPreAndPostImages;\n\tconst destCSPPI = dest?.changeStreamPreAndPostImages;\n\tif (deepEqual(originCSPPI, destCSPPI)) return void 0;\n\tconst desiredCSPPI = destCSPPI ?? { enabled: false };\n\treturn new CollModCall(collName, { changeStreamPreAndPostImages: desiredCSPPI }, {\n\t\tid: `options.${collName}.update`,\n\t\tlabel: `Update mutable options on ${collName}`,\n\t\toperationClass: desiredCSPPI.enabled ? \"widening\" : \"destructive\"\n\t});\n}\n//#endregion\n//#region src/core/migrations/filter-evaluator.ts\nfunction isRecord(value) {\n\treturn value !== null && typeof value === \"object\";\n}\nfunction getNestedField(doc, path) {\n\tconst parts = path.split(\".\");\n\tlet current = doc;\n\tfor (const part of parts) {\n\t\tif (!isRecord(current)) return;\n\t\tconst record = current;\n\t\tif (!Object.hasOwn(record, part)) return;\n\t\tcurrent = record[part];\n\t}\n\treturn blindCast(current);\n}\nfunction evaluateFieldOp(op, actual, expected) {\n\tswitch (op) {\n\t\tcase \"$eq\": return deepEqual(actual, expected);\n\t\tcase \"$ne\": return !deepEqual(actual, expected);\n\t\tcase \"$gt\": return typeof actual === typeof expected && blindCast(actual) > blindCast(expected);\n\t\tcase \"$gte\": return typeof actual === typeof expected && blindCast(actual) >= blindCast(expected);\n\t\tcase \"$lt\": return typeof actual === typeof expected && blindCast(actual) < blindCast(expected);\n\t\tcase \"$lte\": return typeof actual === typeof expected && blindCast(actual) <= blindCast(expected);\n\t\tcase \"$in\": return Array.isArray(expected) && expected.some((v) => deepEqual(actual, v));\n\t\tdefault: throw mongoTargetError(\"MIGRATION.OPERATION_UNSUPPORTED\", `Unsupported filter operator in migration check: ${op}`, { meta: { operator: op } });\n\t}\n}\nvar FilterEvaluator = class {\n\tdoc = {};\n\tevaluate(filter, doc) {\n\t\tthis.doc = doc;\n\t\treturn filter.accept(this);\n\t}\n\tfield(expr) {\n\t\tconst value = getNestedField(this.doc, expr.field);\n\t\treturn evaluateFieldOp(expr.op, value, expr.value);\n\t}\n\tand(expr) {\n\t\treturn expr.exprs.every((child) => child.accept(this));\n\t}\n\tor(expr) {\n\t\treturn expr.exprs.some((child) => child.accept(this));\n\t}\n\tnot(expr) {\n\t\treturn !expr.expr.accept(this);\n\t}\n\texists(expr) {\n\t\tconst has = getNestedField(this.doc, expr.field) !== void 0;\n\t\treturn expr.exists ? has : !has;\n\t}\n\texpr(_expr) {\n\t\tthrow mongoTargetError(\"MIGRATION.OPERATION_UNSUPPORTED\", \"Aggregation expression filters are not supported in migration checks\", { meta: { operator: \"$expr\" } });\n\t}\n};\n//#endregion\n//#region src/core/migrations/mongo-ops-serializer.ts\nconst IndexKeyJson = type({\n\tfield: \"string\",\n\tdirection: type(\"1 | -1 | \\\"text\\\" | \\\"2dsphere\\\" | \\\"2d\\\" | \\\"hashed\\\"\")\n});\nconst CollationJson = type({\n\tlocale: \"string\",\n\t\"caseLevel?\": \"boolean\",\n\t\"caseFirst?\": \"string\",\n\t\"strength?\": \"number\",\n\t\"numericOrdering?\": \"boolean\",\n\t\"alternate?\": \"string\",\n\t\"maxVariable?\": \"string\",\n\t\"backwards?\": \"boolean\",\n\t\"normalization?\": \"boolean\"\n});\nconst CreateIndexJson = type({\n\tkind: \"\\\"createIndex\\\"\",\n\tcollection: \"string\",\n\tkeys: IndexKeyJson.array().atLeastLength(1),\n\t\"unique?\": \"boolean\",\n\t\"sparse?\": \"boolean\",\n\t\"expireAfterSeconds?\": \"number\",\n\t\"partialFilterExpression?\": \"Record<string, unknown>\",\n\t\"name?\": \"string\",\n\t\"wildcardProjection?\": \"Record<string, 0 | 1>\",\n\t\"collation?\": CollationJson,\n\t\"weights?\": \"Record<string, number>\",\n\t\"default_language?\": \"string\",\n\t\"language_override?\": \"string\"\n});\nconst DropIndexJson = type({\n\tkind: \"\\\"dropIndex\\\"\",\n\tcollection: \"string\",\n\tname: \"string\"\n});\nconst CreateCollectionJson = type({\n\tkind: \"\\\"createCollection\\\"\",\n\tcollection: \"string\",\n\t\"validator?\": \"Record<string, unknown>\",\n\t\"validationLevel?\": \"\\\"strict\\\" | \\\"moderate\\\"\",\n\t\"validationAction?\": \"\\\"error\\\" | \\\"warn\\\"\",\n\t\"capped?\": \"boolean\",\n\t\"size?\": \"number\",\n\t\"max?\": \"number\",\n\t\"timeseries?\": {\n\t\ttimeField: \"string\",\n\t\t\"metaField?\": \"string\",\n\t\t\"granularity?\": \"\\\"seconds\\\" | \\\"minutes\\\" | \\\"hours\\\"\"\n\t},\n\t\"collation?\": CollationJson,\n\t\"changeStreamPreAndPostImages?\": { enabled: \"boolean\" },\n\t\"clusteredIndex?\": {\n\t\tkey: \"Record<string, number>\",\n\t\tunique: \"boolean\",\n\t\t\"name?\": \"string\"\n\t}\n});\nconst DropCollectionJson = type({\n\tkind: \"\\\"dropCollection\\\"\",\n\tcollection: \"string\"\n});\nconst CollModJson = type({\n\tkind: \"\\\"collMod\\\"\",\n\tcollection: \"string\",\n\t\"validator?\": \"Record<string, unknown>\",\n\t\"validationLevel?\": \"\\\"strict\\\" | \\\"moderate\\\"\",\n\t\"validationAction?\": \"\\\"error\\\" | \\\"warn\\\"\",\n\t\"changeStreamPreAndPostImages?\": { enabled: \"boolean\" }\n});\nconst ListIndexesJson = type({\n\tkind: \"\\\"listIndexes\\\"\",\n\tcollection: \"string\"\n});\nconst ListCollectionsJson = type({ kind: \"\\\"listCollections\\\"\" });\nconst FieldFilterJson = type({\n\tkind: \"\\\"field\\\"\",\n\tfield: \"string\",\n\top: \"string\",\n\tvalue: \"unknown\"\n});\nconst AndFilterJson = type({\n\tkind: \"\\\"and\\\"\",\n\texprs: \"Record<string, unknown>[]\"\n});\nconst OrFilterJson = type({\n\tkind: \"\\\"or\\\"\",\n\texprs: \"Record<string, unknown>[]\"\n});\nconst NotFilterJson = type({\n\tkind: \"\\\"not\\\"\",\n\texpr: \"Record<string, unknown>\"\n});\nconst ExistsFilterJson = type({\n\tkind: \"\\\"exists\\\"\",\n\tfield: \"string\",\n\texists: \"boolean\"\n});\nconst RawInsertOneJson = type({\n\tkind: \"\\\"rawInsertOne\\\"\",\n\tcollection: \"string\",\n\tdocument: \"Record<string, unknown>\"\n});\nconst RawInsertManyJson = type({\n\tkind: \"\\\"rawInsertMany\\\"\",\n\tcollection: \"string\",\n\tdocuments: \"Record<string, unknown>[]\"\n});\nconst RawUpdateOneJson = type({\n\tkind: \"\\\"rawUpdateOne\\\"\",\n\tcollection: \"string\",\n\tfilter: \"Record<string, unknown>\",\n\tupdate: \"Record<string, unknown> | Record<string, unknown>[]\"\n});\nconst RawUpdateManyJson = type({\n\tkind: \"\\\"rawUpdateMany\\\"\",\n\tcollection: \"string\",\n\tfilter: \"Record<string, unknown>\",\n\tupdate: \"Record<string, unknown> | Record<string, unknown>[]\"\n});\nconst RawDeleteOneJson = type({\n\tkind: \"\\\"rawDeleteOne\\\"\",\n\tcollection: \"string\",\n\tfilter: \"Record<string, unknown>\"\n});\nconst RawDeleteManyJson = type({\n\tkind: \"\\\"rawDeleteMany\\\"\",\n\tcollection: \"string\",\n\tfilter: \"Record<string, unknown>\"\n});\nconst RawAggregateJson = type({\n\tkind: \"\\\"rawAggregate\\\"\",\n\tcollection: \"string\",\n\tpipeline: \"Record<string, unknown>[]\"\n});\nconst RawFindOneAndUpdateJson = type({\n\tkind: \"\\\"rawFindOneAndUpdate\\\"\",\n\tcollection: \"string\",\n\tfilter: \"Record<string, unknown>\",\n\tupdate: \"Record<string, unknown> | Record<string, unknown>[]\",\n\tupsert: \"boolean\"\n});\nconst RawFindOneAndDeleteJson = type({\n\tkind: \"\\\"rawFindOneAndDelete\\\"\",\n\tcollection: \"string\",\n\tfilter: \"Record<string, unknown>\"\n});\nconst TypedAggregateJson = type({\n\tkind: \"\\\"aggregate\\\"\",\n\tcollection: \"string\",\n\tpipeline: \"Record<string, unknown>[]\"\n});\nconst QueryPlanJson = type({\n\tcollection: \"string\",\n\tcommand: \"Record<string, unknown>\",\n\tmeta: type({\n\t\ttarget: \"string\",\n\t\tstorageHash: \"string\",\n\t\tlane: \"string\",\n\t\t\"targetFamily?\": \"string\",\n\t\t\"profileHash?\": \"string\",\n\t\t\"annotations?\": \"Record<string, unknown>\"\n\t})\n});\nconst MatchStageJson = type({\n\tkind: \"\\\"match\\\"\",\n\tfilter: \"Record<string, unknown>\"\n});\nconst LimitStageJson = type({\n\tkind: \"\\\"limit\\\"\",\n\tlimit: \"number\"\n});\nconst SortStageJson = type({\n\tkind: \"\\\"sort\\\"\",\n\tsort: \"Record<string, 1 | -1>\"\n});\nconst ProjectStageJson = type({\n\tkind: \"\\\"project\\\"\",\n\tprojection: \"Record<string, 0 | 1>\"\n});\nconst AddFieldsStageJson = type({\n\tkind: \"\\\"addFields\\\"\",\n\tfields: \"Record<string, unknown>\"\n});\nconst LookupStageJson = type({\n\tkind: \"\\\"lookup\\\"\",\n\tfrom: \"string\",\n\tas: \"string\",\n\t\"localField?\": \"string\",\n\t\"foreignField?\": \"string\",\n\t\"pipeline?\": \"Record<string, unknown>[]\",\n\t\"let_?\": \"Record<string, unknown>\"\n});\nconst CheckJson = type({\n\tdescription: \"string\",\n\tsource: \"Record<string, unknown>\",\n\tfilter: \"Record<string, unknown>\",\n\texpect: \"\\\"exists\\\" | \\\"notExists\\\"\"\n});\nconst StepJson = type({\n\tdescription: \"string\",\n\tcommand: \"Record<string, unknown>\"\n});\nconst DdlOperationJson = type({\n\tid: \"string\",\n\tlabel: \"string\",\n\toperationClass: \"\\\"additive\\\" | \\\"widening\\\" | \\\"destructive\\\"\",\n\tprecheck: \"Record<string, unknown>[]\",\n\texecute: \"Record<string, unknown>[]\",\n\tpostcheck: \"Record<string, unknown>[]\"\n});\nconst DataTransformCheckJson = type({\n\tdescription: \"string\",\n\tsource: \"Record<string, unknown>\",\n\tfilter: \"Record<string, unknown>\",\n\texpect: \"\\\"exists\\\" | \\\"notExists\\\"\"\n});\nconst DataTransformOperationJson = type({\n\tid: \"string\",\n\tlabel: \"string\",\n\toperationClass: \"\\\"data\\\"\",\n\tname: \"string\",\n\tprecheck: \"Record<string, unknown>[]\",\n\trun: \"Record<string, unknown>[]\",\n\tpostcheck: \"Record<string, unknown>[]\"\n});\nfunction recordValue(json, key, context) {\n\tif (json === null || typeof json !== \"object\") throw mongoTargetError(\"MIGRATION.INVALID_OPERATION_ENTRY\", `Invalid ${context}: expected object`, { meta: { context } });\n\treturn blindCast(Reflect.get(json, key));\n}\nfunction recordKind(json, context) {\n\tconst kind = recordValue(json, \"kind\", context);\n\treturn typeof kind === \"string\" ? kind : \"\";\n}\nfunction validate(schema, data, context) {\n\ttry {\n\t\treturn schema.assert(stripUndefinedDeep(data));\n\t} catch (error) {\n\t\t/* v8 ignore stop */\n\t\tthrow mongoTargetError(\"MIGRATION.INVALID_OPERATION_ENTRY\", `Invalid ${context}: ${error instanceof Error ? error.message : String(error)}`, {\n\t\t\tmeta: { context },\n\t\t\tcause: error\n\t\t});\n\t}\n}\n/**\n* Strip `undefined`-valued properties before they reach arktype's optional-key\n* assertions.\n*\n* Op IRs (e.g. `CreateCollectionCommand`) assign every optional field on\n* every instance — fields the caller did not provide land as\n* `undefined`-valued properties. arktype treats `{ foo?: 'boolean' }` as\n* \"key may be absent, but if present must be boolean\", so the bare instance\n* fails validation when it crosses the deserialize boundary in-process\n* (no JSON round-trip happens between planner → runner). This helper\n* recovers the JSON-round-tripped shape (undefined keys absent) without\n* forcing every caller to round-trip.\n*\n* Returns the original value reference whenever no change is needed.\n* That preserves prototype-bound payload values such as BSON wrappers\n* (`ObjectId`, `Decimal128`, `Binary`, …) which embed no `undefined`\n* own-enumerable properties and therefore never trigger a rebuild.\n* Top-level op IRs (class instances with `undefined` optional fields)\n* still get flattened to plain records as required by arktype.\n*/\nfunction stripUndefinedDeep(value) {\n\tif (Array.isArray(value)) {\n\t\tlet changed = false;\n\t\tconst next = value.map((item) => {\n\t\t\tconst stripped = stripUndefinedDeep(item);\n\t\t\tif (stripped !== item) changed = true;\n\t\t\treturn stripped;\n\t\t});\n\t\treturn changed ? next : value;\n\t}\n\tif (value === null || typeof value !== \"object\") return blindCast(value);\n\tconst entries = Object.entries(value);\n\tconst out = {};\n\tlet changed = false;\n\tfor (const [key, val] of entries) {\n\t\tif (val === void 0) {\n\t\t\tchanged = true;\n\t\t\tcontinue;\n\t\t}\n\t\tconst stripped = stripUndefinedDeep(val);\n\t\tif (stripped !== val) changed = true;\n\t\tout[key] = stripped;\n\t}\n\treturn changed ? out : blindCast(value);\n}\nfunction deserializeFilterExpr(json) {\n\tconst kind = recordKind(json, \"filter expression\");\n\tswitch (kind) {\n\t\tcase \"field\": {\n\t\t\tconst data = validate(FieldFilterJson, json, \"field filter\");\n\t\t\treturn MongoFieldFilter.of(data.field, data.op, blindCast(data.value));\n\t\t}\n\t\tcase \"and\": {\n\t\t\tconst data = validate(AndFilterJson, json, \"and filter\");\n\t\t\treturn MongoAndExpr.of(data.exprs.map(deserializeFilterExpr));\n\t\t}\n\t\tcase \"or\": {\n\t\t\tconst data = validate(OrFilterJson, json, \"or filter\");\n\t\t\treturn MongoOrExpr.of(data.exprs.map(deserializeFilterExpr));\n\t\t}\n\t\tcase \"not\": return new MongoNotExpr(deserializeFilterExpr(validate(NotFilterJson, json, \"not filter\").expr));\n\t\tcase \"exists\": {\n\t\t\tconst data = validate(ExistsFilterJson, json, \"exists filter\");\n\t\t\treturn new MongoExistsExpr(data.field, data.exists);\n\t\t}\n\t\tdefault: throw mongoTargetError(\"MIGRATION.INVALID_OPERATION_ENTRY\", `Unknown filter expression kind: ${kind}`, { meta: {\n\t\t\tcontext: \"filter expression\",\n\t\t\tkind\n\t\t} });\n\t}\n}\nfunction deserializePipelineStage(json) {\n\tconst kind = recordKind(json, \"pipeline stage\");\n\tswitch (kind) {\n\t\tcase \"match\": return new MongoMatchStage(deserializeFilterExpr(validate(MatchStageJson, json, \"match stage\").filter));\n\t\tcase \"limit\": return new MongoLimitStage(validate(LimitStageJson, json, \"limit stage\").limit);\n\t\tcase \"sort\": return new MongoSortStage(validate(SortStageJson, json, \"sort stage\").sort);\n\t\tcase \"project\": return new MongoProjectStage(validate(ProjectStageJson, json, \"project stage\").projection);\n\t\tcase \"addFields\": return new MongoAddFieldsStage(blindCast(validate(AddFieldsStageJson, json, \"addFields stage\").fields));\n\t\tcase \"lookup\": {\n\t\t\tconst data = validate(LookupStageJson, json, \"lookup stage\");\n\t\t\tconst opts = {\n\t\t\t\tfrom: data.from,\n\t\t\t\tas: data.as\n\t\t\t};\n\t\t\tif (data.localField !== void 0) opts.localField = data.localField;\n\t\t\tif (data.foreignField !== void 0) opts.foreignField = data.foreignField;\n\t\t\tif (data.pipeline !== void 0) opts.pipeline = data.pipeline.map(deserializePipelineStage);\n\t\t\tif (data.let_ !== void 0) opts.let_ = blindCast(data.let_);\n\t\t\treturn new MongoLookupStage(opts);\n\t\t}\n\t\tcase \"merge\": {\n\t\t\tconst whenMatched = recordValue(json, \"whenMatched\", \"merge stage\");\n\t\t\tconst opts = { into: blindCast(recordValue(json, \"into\", \"merge stage\")) };\n\t\t\tconst on = recordValue(json, \"on\", \"merge stage\");\n\t\t\tif (on !== void 0) opts.on = blindCast(on);\n\t\t\tif (whenMatched !== void 0) opts.whenMatched = typeof whenMatched === \"string\" ? whenMatched : blindCast(blindCast(whenMatched).map(deserializePipelineStage));\n\t\t\tconst whenNotMatched = recordValue(json, \"whenNotMatched\", \"merge stage\");\n\t\t\tif (whenNotMatched !== void 0) opts.whenNotMatched = blindCast(whenNotMatched);\n\t\t\treturn new MongoMergeStage(opts);\n\t\t}\n\t\tdefault: throw mongoTargetError(\"MIGRATION.INVALID_OPERATION_ENTRY\", `Unknown pipeline stage kind: ${kind}`, { meta: {\n\t\t\tcontext: \"pipeline stage\",\n\t\t\tkind\n\t\t} });\n\t}\n}\nfunction deserializeDmlCommand(json) {\n\tconst kind = recordKind(json, \"DML command\");\n\tswitch (kind) {\n\t\tcase \"rawInsertOne\": {\n\t\t\tconst data = validate(RawInsertOneJson, json, \"rawInsertOne command\");\n\t\t\treturn new RawInsertOneCommand(data.collection, data.document);\n\t\t}\n\t\tcase \"rawInsertMany\": {\n\t\t\tconst data = validate(RawInsertManyJson, json, \"rawInsertMany command\");\n\t\t\treturn new RawInsertManyCommand(data.collection, data.documents);\n\t\t}\n\t\tcase \"rawUpdateOne\": {\n\t\t\tconst data = validate(RawUpdateOneJson, json, \"rawUpdateOne command\");\n\t\t\treturn new RawUpdateOneCommand(data.collection, data.filter, data.update);\n\t\t}\n\t\tcase \"rawUpdateMany\": {\n\t\t\tconst data = validate(RawUpdateManyJson, json, \"rawUpdateMany command\");\n\t\t\treturn new RawUpdateManyCommand(data.collection, data.filter, data.update);\n\t\t}\n\t\tcase \"rawDeleteOne\": {\n\t\t\tconst data = validate(RawDeleteOneJson, json, \"rawDeleteOne command\");\n\t\t\treturn new RawDeleteOneCommand(data.collection, data.filter);\n\t\t}\n\t\tcase \"rawDeleteMany\": {\n\t\t\tconst data = validate(RawDeleteManyJson, json, \"rawDeleteMany command\");\n\t\t\treturn new RawDeleteManyCommand(data.collection, data.filter);\n\t\t}\n\t\tcase \"rawAggregate\": {\n\t\t\tconst data = validate(RawAggregateJson, json, \"rawAggregate command\");\n\t\t\treturn new RawAggregateCommand(data.collection, data.pipeline);\n\t\t}\n\t\tcase \"rawFindOneAndUpdate\": {\n\t\t\tconst data = validate(RawFindOneAndUpdateJson, json, \"rawFindOneAndUpdate command\");\n\t\t\treturn new RawFindOneAndUpdateCommand(data.collection, data.filter, data.update, data.upsert);\n\t\t}\n\t\tcase \"rawFindOneAndDelete\": {\n\t\t\tconst data = validate(RawFindOneAndDeleteJson, json, \"rawFindOneAndDelete command\");\n\t\t\treturn new RawFindOneAndDeleteCommand(data.collection, data.filter);\n\t\t}\n\t\tcase \"aggregate\": {\n\t\t\tconst data = validate(TypedAggregateJson, json, \"aggregate command\");\n\t\t\tconst pipeline = data.pipeline.map(deserializePipelineStage);\n\t\t\treturn new AggregateCommand(data.collection, pipeline);\n\t\t}\n\t\tdefault: throw mongoTargetError(\"MIGRATION.INVALID_OPERATION_ENTRY\", `Unknown DML command kind: ${kind}`, { meta: {\n\t\t\tcontext: \"DML command\",\n\t\t\tkind\n\t\t} });\n\t}\n}\nfunction deserializeMongoQueryPlan(json) {\n\tconst data = validate(QueryPlanJson, json, \"Mongo query plan\");\n\tconst command = deserializeDmlCommand(data.command);\n\tconst m = data.meta;\n\tconst meta = {\n\t\ttarget: m.target,\n\t\tstorageHash: m.storageHash,\n\t\tlane: m.lane,\n\t\t...ifDefined(\"targetFamily\", m.targetFamily),\n\t\t...ifDefined(\"profileHash\", m.profileHash),\n\t\t...ifDefined(\"annotations\", m.annotations)\n\t};\n\treturn {\n\t\tcollection: data.collection,\n\t\tcommand,\n\t\tmeta\n\t};\n}\nfunction deserializeDdlCommand(json) {\n\tconst kind = recordKind(json, \"DDL command\");\n\tswitch (kind) {\n\t\tcase \"createIndex\": {\n\t\t\tconst data = validate(CreateIndexJson, json, \"createIndex command\");\n\t\t\treturn new CreateIndexCommand(data.collection, data.keys, {\n\t\t\t\t...ifDefined(\"unique\", data.unique),\n\t\t\t\t...ifDefined(\"sparse\", data.sparse),\n\t\t\t\t...ifDefined(\"expireAfterSeconds\", data.expireAfterSeconds),\n\t\t\t\t...ifDefined(\"partialFilterExpression\", data.partialFilterExpression),\n\t\t\t\t...ifDefined(\"name\", data.name),\n\t\t\t\t...ifDefined(\"wildcardProjection\", data.wildcardProjection),\n\t\t\t\t...ifDefined(\"collation\", data.collation),\n\t\t\t\t...ifDefined(\"weights\", data.weights),\n\t\t\t\t...ifDefined(\"default_language\", data.default_language),\n\t\t\t\t...ifDefined(\"language_override\", data.language_override)\n\t\t\t});\n\t\t}\n\t\tcase \"dropIndex\": {\n\t\t\tconst data = validate(DropIndexJson, json, \"dropIndex command\");\n\t\t\treturn new DropIndexCommand(data.collection, data.name);\n\t\t}\n\t\tcase \"createCollection\": {\n\t\t\tconst data = validate(CreateCollectionJson, json, \"createCollection command\");\n\t\t\treturn new CreateCollectionCommand(data.collection, {\n\t\t\t\t...ifDefined(\"validator\", data.validator),\n\t\t\t\t...ifDefined(\"validationLevel\", data.validationLevel),\n\t\t\t\t...ifDefined(\"validationAction\", data.validationAction),\n\t\t\t\t...ifDefined(\"capped\", data.capped),\n\t\t\t\t...ifDefined(\"size\", data.size),\n\t\t\t\t...ifDefined(\"max\", data.max),\n\t\t\t\t...ifDefined(\"timeseries\", data.timeseries),\n\t\t\t\t...ifDefined(\"collation\", data.collation),\n\t\t\t\t...ifDefined(\"changeStreamPreAndPostImages\", data.changeStreamPreAndPostImages),\n\t\t\t\t...ifDefined(\"clusteredIndex\", data.clusteredIndex)\n\t\t\t});\n\t\t}\n\t\tcase \"dropCollection\": return new DropCollectionCommand(validate(DropCollectionJson, json, \"dropCollection command\").collection);\n\t\tcase \"collMod\": {\n\t\t\tconst data = validate(CollModJson, json, \"collMod command\");\n\t\t\treturn new CollModCommand(data.collection, {\n\t\t\t\t...ifDefined(\"validator\", data.validator),\n\t\t\t\t...ifDefined(\"validationLevel\", data.validationLevel),\n\t\t\t\t...ifDefined(\"validationAction\", data.validationAction),\n\t\t\t\t...ifDefined(\"changeStreamPreAndPostImages\", data.changeStreamPreAndPostImages)\n\t\t\t});\n\t\t}\n\t\tdefault: throw mongoTargetError(\"MIGRATION.INVALID_OPERATION_ENTRY\", `Unknown DDL command kind: ${kind}`, { meta: {\n\t\t\tcontext: \"DDL command\",\n\t\t\tkind\n\t\t} });\n\t}\n}\nfunction deserializeInspectionCommand(json) {\n\tconst kind = recordKind(json, \"inspection command\");\n\tswitch (kind) {\n\t\tcase \"listIndexes\": return new ListIndexesCommand(validate(ListIndexesJson, json, \"listIndexes command\").collection);\n\t\tcase \"listCollections\":\n\t\t\tvalidate(ListCollectionsJson, json, \"listCollections command\");\n\t\t\treturn new ListCollectionsCommand();\n\t\tdefault: throw mongoTargetError(\"MIGRATION.INVALID_OPERATION_ENTRY\", `Unknown inspection command kind: ${kind}`, { meta: {\n\t\t\tcontext: \"inspection command\",\n\t\t\tkind\n\t\t} });\n\t}\n}\nfunction deserializeCheck(json) {\n\tconst data = validate(CheckJson, json, \"migration check\");\n\treturn {\n\t\tdescription: data.description,\n\t\tsource: deserializeInspectionCommand(data.source),\n\t\tfilter: deserializeFilterExpr(data.filter),\n\t\texpect: data.expect\n\t};\n}\nfunction deserializeStep(json) {\n\tconst data = validate(StepJson, json, \"migration step\");\n\treturn {\n\t\tdescription: data.description,\n\t\tcommand: deserializeDdlCommand(data.command)\n\t};\n}\nfunction isDataTransformJson(json) {\n\treturn recordValue(json, \"operationClass\", \"migration operation\") === \"data\";\n}\nfunction deserializeDdlOp(json) {\n\tconst data = validate(DdlOperationJson, json, \"migration operation\");\n\treturn {\n\t\tid: data.id,\n\t\tlabel: data.label,\n\t\toperationClass: data.operationClass,\n\t\tprecheck: data.precheck.map(deserializeCheck),\n\t\texecute: data.execute.map(deserializeStep),\n\t\tpostcheck: data.postcheck.map(deserializeCheck)\n\t};\n}\nfunction deserializeDataTransformCheck(json) {\n\tconst data = validate(DataTransformCheckJson, json, \"data transform check\");\n\treturn {\n\t\tdescription: data.description,\n\t\tsource: deserializeMongoQueryPlan(data.source),\n\t\tfilter: deserializeFilterExpr(data.filter),\n\t\texpect: data.expect\n\t};\n}\nfunction deserializeDataTransformOp(json) {\n\tconst data = validate(DataTransformOperationJson, json, \"data transform operation\");\n\treturn {\n\t\tid: data.id,\n\t\tlabel: data.label,\n\t\toperationClass: \"data\",\n\t\tname: data.name,\n\t\tprecheck: data.precheck.map(deserializeDataTransformCheck),\n\t\trun: data.run.map(deserializeMongoQueryPlan),\n\t\tpostcheck: data.postcheck.map(deserializeDataTransformCheck)\n\t};\n}\nfunction deserializeMongoOp(json) {\n\tif (isDataTransformJson(json)) return deserializeDataTransformOp(json);\n\treturn deserializeDdlOp(json);\n}\nfunction deserializeMongoOps(json) {\n\treturn json.map(deserializeMongoOp);\n}\nfunction serializeMongoOps(ops) {\n\treturn JSON.stringify(ops, null, 2);\n}\n//#endregion\n//#region src/core/migrations/mongo-runner.ts\nconst READ_ONLY_CHECK_COMMAND_KINDS = /* @__PURE__ */ new Set([\"aggregate\", \"rawAggregate\"]);\nfunction runnerFailure(code, summary, opts) {\n\treturn notOk({\n\t\tcode,\n\t\tsummary,\n\t\t...opts\n\t});\n}\nvar MongoMigrationRunner = class {\n\tdeps;\n\tconstructor(deps) {\n\t\tthis.deps = deps;\n\t}\n\tasync execute(options) {\n\t\tconst { inspectionExecutor, adapter, driver, executeDdl, markerOps } = this.deps;\n\t\tconst operations = deserializeMongoOps(blindCast(options.plan.operations));\n\t\tconst space = options.plan.spaceId ?? APP_SPACE_ID;\n\t\tconst policyCheck = this.enforcePolicyCompatibility(options.policy, operations);\n\t\tif (policyCheck) return policyCheck;\n\t\tconst existingMarker = await markerOps.readMarker(space);\n\t\tconst markerCheck = this.ensureMarkerCompatibility(existingMarker, options.plan);\n\t\tif (markerCheck) return markerCheck;\n\t\tconst checks = options.executionChecks;\n\t\tconst runPrechecks = checks?.prechecks !== false;\n\t\tconst runPostchecks = checks?.postchecks !== false;\n\t\tconst runIdempotency = checks?.idempotencyChecks !== false;\n\t\tconst filterEvaluator = new FilterEvaluator();\n\t\tlet operationsExecuted = 0;\n\t\tfor (const operation of operations) {\n\t\t\toptions.callbacks?.onOperationStart?.(operation);\n\t\t\ttry {\n\t\t\t\tif (operation.operationClass === \"data\") {\n\t\t\t\t\tconst result = await this.executeDataTransform(blindCast(operation), adapter, driver, filterEvaluator, runIdempotency, runPrechecks, runPostchecks);\n\t\t\t\t\tif (result.failure) return result.failure;\n\t\t\t\t\tif (result.executed) operationsExecuted += 1;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst ddlOp = blindCast(operation);\n\t\t\t\tif (runPostchecks && runIdempotency) {\n\t\t\t\t\tif (await this.allChecksSatisfied(ddlOp.postcheck, inspectionExecutor, filterEvaluator)) continue;\n\t\t\t\t}\n\t\t\t\tif (runPrechecks) {\n\t\t\t\t\tif (!await this.evaluateChecks(ddlOp.precheck, inspectionExecutor, filterEvaluator)) return runnerFailure(\"MIGRATION.PRECHECK_FAILED\", `Operation ${operation.id} failed during precheck`, { meta: { operationId: operation.id } });\n\t\t\t\t}\n\t\t\t\tfor (const step of ddlOp.execute) await executeDdl(step.command);\n\t\t\t\tif (runPostchecks) {\n\t\t\t\t\tif (!await this.evaluateChecks(ddlOp.postcheck, inspectionExecutor, filterEvaluator)) return runnerFailure(\"MIGRATION.POSTCHECK_FAILED\", `Operation ${operation.id} failed during postcheck`, { meta: { operationId: operation.id } });\n\t\t\t\t}\n\t\t\t\toperationsExecuted += 1;\n\t\t\t} finally {\n\t\t\t\toptions.callbacks?.onOperationComplete?.(operation);\n\t\t\t}\n\t\t}\n\t\tconst destination = options.plan.destination;\n\t\tconst profileHash = options.destinationContract.profileHash ?? destination.storageHash;\n\t\tconst incomingInvariants = options.plan.providedInvariants ?? [];\n\t\tconst existingInvariantSet = new Set(existingMarker?.invariants ?? []);\n\t\tconst incomingIsSubsetOfExisting = incomingInvariants.every((id) => existingInvariantSet.has(id));\n\t\tconst markerAlreadyAtDestination = existingMarker !== null && existingMarker.storageHash === destination.storageHash && existingMarker.profileHash === profileHash;\n\t\tif (!(operationsExecuted === 0 && markerAlreadyAtDestination && incomingIsSubsetOfExisting)) {\n\t\t\tconst liveSchema = await this.deps.introspectSchema();\n\t\t\tconst rawVerifyResult = verifyMongoSchema({\n\t\t\t\tcontract: options.destinationContract,\n\t\t\t\tschema: liveSchema,\n\t\t\t\tstrict: options.strictVerification ?? true,\n\t\t\t\tframeworkComponents: options.frameworkComponents,\n\t\t\t\t...options.context ? { context: options.context } : {}\n\t\t\t});\n\t\t\tconst verifyResult = options.scopeVerifyResult ? options.scopeVerifyResult(rawVerifyResult) : rawVerifyResult;\n\t\t\tif (!verifyResult.ok) return runnerFailure(\"MIGRATION.SCHEMA_VERIFY_FAILED\", verifyResult.summary, {\n\t\t\t\twhy: \"The resulting database schema does not satisfy the destination contract.\",\n\t\t\t\tmeta: { issues: verifyResult.schema.issues }\n\t\t\t});\n\t\t\tif (existingMarker) {\n\t\t\t\tif (!await markerOps.updateMarker(space, existingMarker.storageHash, {\n\t\t\t\t\tstorageHash: destination.storageHash,\n\t\t\t\t\tprofileHash,\n\t\t\t\t\tinvariants: incomingInvariants\n\t\t\t\t})) return runnerFailure(\"MIGRATION.MARKER_CAS_FAILURE\", \"Marker was modified by another process during migration execution.\", { meta: {\n\t\t\t\t\tspace,\n\t\t\t\t\texpectedStorageHash: existingMarker.storageHash,\n\t\t\t\t\tdestinationStorageHash: destination.storageHash\n\t\t\t\t} });\n\t\t\t} else await markerOps.initMarker(space, {\n\t\t\t\tstorageHash: destination.storageHash,\n\t\t\t\tprofileHash,\n\t\t\t\tinvariants: incomingInvariants\n\t\t\t});\n\t\t\tawait this.recordLedgerEntries(markerOps, space, options);\n\t\t}\n\t\treturn ok({\n\t\t\toperationsPlanned: operations.length,\n\t\t\toperationsExecuted\n\t\t});\n\t}\n\tasync recordLedgerEntries(markerOps, space, options) {\n\t\tconst plan = options.plan;\n\t\tconst edges = options.migrationEdges;\n\t\tconst totalEdgeOps = edges.reduce((sum, edge) => sum + edge.operationCount, 0);\n\t\tif (totalEdgeOps !== plan.operations.length) throw new InternalError(`Ledger write: plan.operations length (${plan.operations.length}) does not match sum of migrationEdges operationCount (${totalEdgeOps})`);\n\t\tlet offset = 0;\n\t\tfor (const edge of edges) {\n\t\t\tconst edgeOps = plan.operations.slice(offset, offset + edge.operationCount);\n\t\t\toffset += edge.operationCount;\n\t\t\tawait markerOps.writeLedgerEntry(space, {\n\t\t\t\tedgeId: `${edge.from}->${edge.to}`,\n\t\t\t\tfrom: edge.from,\n\t\t\t\tto: edge.to,\n\t\t\t\tmigrationName: edge.dirName,\n\t\t\t\tmigrationHash: edge.migrationHash,\n\t\t\t\toperations: edgeOps\n\t\t\t});\n\t\t}\n\t}\n\tasync executeDataTransform(op, adapter, driver, filterEvaluator, runIdempotency, runPrechecks, runPostchecks) {\n\t\tif (runPostchecks && runIdempotency && op.postcheck.length > 0) {\n\t\t\tif (await this.evaluateDataTransformChecks(op.postcheck, adapter, driver, filterEvaluator)) return { executed: false };\n\t\t}\n\t\tif (runPrechecks && op.precheck.length > 0) {\n\t\t\tif (!await this.evaluateDataTransformChecks(op.precheck, adapter, driver, filterEvaluator)) return {\n\t\t\t\texecuted: false,\n\t\t\t\tfailure: runnerFailure(\"MIGRATION.PRECHECK_FAILED\", `Operation ${op.id} failed during precheck`, { meta: {\n\t\t\t\t\toperationId: op.id,\n\t\t\t\t\tname: op.name\n\t\t\t\t} })\n\t\t\t};\n\t\t}\n\t\tfor (const plan of op.run) {\n\t\t\tconst wireCommand = await adapter.lower(plan, {});\n\t\t\tfor await (const _ of driver.execute(wireCommand));\n\t\t}\n\t\tif (runPostchecks && op.postcheck.length > 0) {\n\t\t\tif (!await this.evaluateDataTransformChecks(op.postcheck, adapter, driver, filterEvaluator)) return {\n\t\t\t\texecuted: false,\n\t\t\t\tfailure: runnerFailure(\"MIGRATION.POSTCHECK_FAILED\", `Operation ${op.id} failed during postcheck`, { meta: {\n\t\t\t\t\toperationId: op.id,\n\t\t\t\t\tname: op.name\n\t\t\t\t} })\n\t\t\t};\n\t\t}\n\t\treturn { executed: true };\n\t}\n\tasync evaluateDataTransformChecks(checks, adapter, driver, filterEvaluator) {\n\t\tfor (const check of checks) {\n\t\t\tconst commandKind = check.source.command.kind;\n\t\t\tif (!READ_ONLY_CHECK_COMMAND_KINDS.has(commandKind)) throw errorRunnerFailed(`Data-transform check rejected: command kind \"${commandKind}\" is not read-only`, {\n\t\t\t\twhy: \"Data-transform checks must use aggregate or rawAggregate commands so the pre/postcheck path cannot mutate the database.\",\n\t\t\t\tfix: \"Author the check.source as an aggregate pipeline (or rawAggregate) rather than a DML write command.\",\n\t\t\t\tmeta: {\n\t\t\t\t\tcheckDescription: check.description,\n\t\t\t\t\tcommandKind,\n\t\t\t\t\tcollection: check.source.collection\n\t\t\t\t}\n\t\t\t});\n\t\t\tconst wireCommand = await adapter.lower(check.source, {});\n\t\t\tlet matchFound = false;\n\t\t\tfor await (const row of driver.execute(wireCommand)) if (filterEvaluator.evaluate(check.filter, row)) {\n\t\t\t\tmatchFound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (!(check.expect === \"exists\" ? matchFound : !matchFound)) return false;\n\t\t}\n\t\treturn true;\n\t}\n\tasync evaluateChecks(checks, inspectionExecutor, filterEvaluator) {\n\t\tfor (const check of checks) {\n\t\t\tconst matchFound = (await check.source.accept(inspectionExecutor)).some((doc) => filterEvaluator.evaluate(check.filter, doc));\n\t\t\tif (!(check.expect === \"exists\" ? matchFound : !matchFound)) return false;\n\t\t}\n\t\treturn true;\n\t}\n\tasync allChecksSatisfied(checks, inspectionExecutor, filterEvaluator) {\n\t\tif (checks.length === 0) return false;\n\t\treturn this.evaluateChecks(checks, inspectionExecutor, filterEvaluator);\n\t}\n\tenforcePolicyCompatibility(policy, operations) {\n\t\tconst allowedClasses = new Set(policy.allowedOperationClasses);\n\t\tfor (const operation of operations) if (!allowedClasses.has(operation.operationClass)) return runnerFailure(\"MIGRATION.POLICY_VIOLATION\", `Operation ${operation.id} has class \"${operation.operationClass}\" which is not allowed by policy.`, {\n\t\t\twhy: `Policy only allows: ${[...allowedClasses].join(\", \")}.`,\n\t\t\tmeta: {\n\t\t\t\toperationId: operation.id,\n\t\t\t\toperationClass: operation.operationClass\n\t\t\t}\n\t\t});\n\t}\n\tensureMarkerCompatibility(marker, plan) {\n\t\tconst origin = plan.origin ?? null;\n\t\tif (!origin) return;\n\t\tif (!marker) return runnerFailure(\"MIGRATION.MARKER_ORIGIN_MISMATCH\", `Missing contract marker: expected origin storage hash ${origin.storageHash}.`, { meta: { expectedOriginStorageHash: origin.storageHash } });\n\t\tif (marker.storageHash !== origin.storageHash) return runnerFailure(\"MIGRATION.MARKER_ORIGIN_MISMATCH\", `Existing contract marker (${marker.storageHash}) does not match plan origin (${origin.storageHash}).`, { meta: {\n\t\t\tmarkerStorageHash: marker.storageHash,\n\t\t\texpectedOriginStorageHash: origin.storageHash\n\t\t} });\n\t}\n};\n//#endregion\n//#region src/core/migrations/mongo-target-schema-verifier.ts\n/**\n* Mongo target `SchemaVerifier` concretion. Extends the family base's\n* namespace-walk scaffolding and contributes the per-namespace diff via\n* `verifyNamespace`; the diff body reuses the existing target-side\n* helpers (`contractToMongoSchemaIR`, `canonicalizeSchemasForVerification`,\n* `diffMongoSchemas`) so production verification behaviour is unchanged.\n*\n* Today's invariant: every Mongo contract carries exactly one\n* namespace (the unbound singleton, materialised as\n* `MongoTargetUnboundDatabase`), so the family-base namespace walk\n* dispatches exactly once and the per-namespace body runs the existing\n* whole-schema diff. Future per-collection namespace assignment will\n* have this hook project the diff to the namespace's owned collections.\n*\n* `verifyTargetExtensions` returns the empty list — Mongo has no\n* target-only kinds today.\n*\n* Strict diff mode is `false` for SPI-routed calls; production\n* verification today still goes through `verifyMongoSchema` which\n* receives strict from the CLI.\n*/\nvar MongoTargetSchemaVerifier = class extends MongoSchemaVerifierBase {\n\tverifyNamespace(options) {\n\t\tconst expectedIR = contractToMongoSchemaIR(options.contract);\n\t\tconst { live, expected } = canonicalizeSchemasForVerification(options.schema, expectedIR);\n\t\tconst collectionControlPolicy = (name) => this.collectionControlPolicyForName(options.contract, name);\n\t\tconst { failures, warnings } = diffMongoSchemas(live, expected, false, collectionControlPolicy);\n\t\treturn [...failures, ...warnings];\n\t}\n\tverifyTargetExtensions(_options) {\n\t\treturn [];\n\t}\n};\n//#endregion\n//#region src/core/migrations/scope-verify-result.ts\n/**\n* The bare entity names the given contracts declare, unioned. The Mongo runner\n* asks this of every OTHER contract space in a multi-space apply, so each\n* space's post-apply verify can drop the extras those siblings claim.\n*/\nfunction entityNamesDeclaredBy(contracts) {\n\tconst owned = /* @__PURE__ */ new Set();\n\tfor (const contract of contracts) for (const { entityName } of elementCoordinates(contract.storage)) owned.add(entityName);\n\treturn owned;\n}\n/**\n* True when an issue reports a whole collection present in the database but\n* declared by no contract (an extra) — its path is exactly the collection\n* name, never a deeper index/validator/options auxiliary.\n*/\nfunction extraCollectionName(issue) {\n\tif (issueOutcome(issue) !== \"not-expected\" || issue.path.length !== 1) return void 0;\n\treturn issue.path[0];\n}\n/**\n* Scope a per-space post-apply verify result to the contract space's own\n* elements: drop the `extra` findings for collections another contract space\n* claims. The runner verifies the destination contract against the full live\n* database, which holds sibling spaces' collections — without the scoping a\n* multi-space apply could never pass strict verify. Extras claimed by NO space\n* survive, so genuine drift still fails the runner's verdict.\n*\n* The result is issue-based, so the verdict recomputes directly from the\n* surviving list: `ok` holds exactly when it is empty.\n*/\nfunction scopeVerifyResultToSpace(result, ownedByOtherSpaces) {\n\tif (ownedByOtherSpaces.size === 0) return result;\n\tconst issues = result.schema.issues.filter((issue) => {\n\t\tconst name = extraCollectionName(issue);\n\t\treturn name === void 0 || !ownedByOtherSpaces.has(name);\n\t});\n\tif (issues.length === result.schema.issues.length) return result;\n\tconst ok = issues.length === 0;\n\tconst { code: staleCode, ...envelope } = result;\n\treturn {\n\t\t...envelope,\n\t\tok,\n\t\t...ok ? {} : { code: result.code ?? \"CONTRACT.MARKER_REQUIRED\" },\n\t\tsummary: ok ? \"Database schema satisfies contract\" : result.summary,\n\t\tschema: {\n\t\t\t...result.schema,\n\t\t\tissues\n\t\t}\n\t};\n}\n//#endregion\n//#region src/core/migrations/control-target.ts\n/**\n* `migration.ts` default-exports a `Migration` subclass whose `operations`\n* getter returns the ordered list of operations and whose `describe()`\n* returns the manifest identity metadata. `MongoMigrationPlanner.plan()`\n* returns a `MigrationPlanWithAuthoringSurface` that knows how to render\n* itself back to such a file; `MongoMigrationPlanner.emptyMigration()`\n* returns the same shape for `migration new`. Users run the scaffolded\n* `migration.ts` directly (via `node migration.ts`) to self-emit\n* `ops.json` and attest the `migrationHash`.\n*/\nconst mongoTargetDescriptor = {\n\t...mongoTargetDescriptorMeta,\n\tcontractSerializer: new MongoTargetContractSerializer(),\n\tschemaVerifier: new MongoTargetSchemaVerifier(),\n\tmigrations: {\n\t\tcreatePlanner(_adapter) {\n\t\t\treturn new MongoMigrationPlanner();\n\t\t},\n\t\tcreateRunner(family) {\n\t\t\tlet cachedDeps;\n\t\t\tconst runMongo = async (driver, runnerOptions) => {\n\t\t\t\tcachedDeps ??= family.createRunnerDependencies({ driver });\n\t\t\t\treturn new MongoMigrationRunner(cachedDeps).execute({\n\t\t\t\t\t...runnerOptions,\n\t\t\t\t\tdestinationContract: blindCast(runnerOptions.destinationContract)\n\t\t\t\t});\n\t\t\t};\n\t\t\treturn { async execute({ driver, perSpaceOptions }) {\n\t\t\t\tconst contracts = perSpaceOptions.map((opts) => blindCast(opts.destinationContract));\n\t\t\t\tconst perSpaceResults = [];\n\t\t\t\tfor (let i = 0; i < perSpaceOptions.length; i++) {\n\t\t\t\t\tconst spaceOptions = perSpaceOptions[i];\n\t\t\t\t\tif (!spaceOptions) continue;\n\t\t\t\t\tconst ownedByOtherSpaces = entityNamesDeclaredBy(contracts.filter((_, j) => j !== i));\n\t\t\t\t\tconst scopeVerifyResult = (result) => scopeVerifyResultToSpace(result, ownedByOtherSpaces);\n\t\t\t\t\tconst { space, ...runnerOptions } = spaceOptions;\n\t\t\t\t\tconst result = await runMongo(driver, {\n\t\t\t\t\t\t...runnerOptions,\n\t\t\t\t\t\tscopeVerifyResult\n\t\t\t\t\t});\n\t\t\t\t\tif (!result.ok) return notOk({\n\t\t\t\t\t\t...result.failure,\n\t\t\t\t\t\tfailingSpace: space\n\t\t\t\t\t});\n\t\t\t\t\tperSpaceResults.push({\n\t\t\t\t\t\tspace,\n\t\t\t\t\t\tvalue: result.value\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn ok({ perSpaceResults });\n\t\t\t} };\n\t\t},\n\t\tcontractToSchema(contract) {\n\t\t\treturn contractToMongoSchemaIR(blindCast(contract));\n\t\t}\n\t},\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"mongo\",\n\t\t\ttargetId: \"mongo\"\n\t\t};\n\t}\n};\n//#endregion\nexport { CollModCall, CreateCollectionCall, CreateIndexCall, DropCollectionCall, DropIndexCall, FilterEvaluator, MongoMigrationPlanner, MongoMigrationRunner, MongoTargetContractSerializer, MongoTargetDatabase, MongoTargetSchemaVerifier, MongoTargetUnboundDatabase, PlannerProducedMongoMigration, deserializeMongoOp, deserializeMongoOps, mongoTargetDescriptor, renderCallsToTypeScript, renderOps, schemaCollectionToCreateCollectionOptions, schemaIndexToCreateIndexOptions, serializeMongoOps };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,IAAI,sBAAsB,cAAc,cAAc;CACrD;CACA;CACA,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,KAAK,MAAM;EAChB,MAAM,aAAa;GAClB,YAAY,CAAC;GACb,GAAG,MAAM;EACV;EACA,KAAK,UAAU,OAAO,OAAO,UAAU,yBAAyB,YAAY,wBAAwB,GAAG,OAAO,CAAC,CAAC;EAChH,OAAO,eAAe,MAAM,QAAQ;GACnC,OAAO;GACP,UAAU;GACV,YAAY;GACZ,cAAc;EACf,CAAC;EACD,WAAW,IAAI;CAChB;CACA,IAAI,aAAa;EAChB,OAAO,KAAK,QAAQ,cAAc,OAAO,OAAO,CAAC,CAAC;CACnD;;;;;CAKA,YAAY;EACX,OAAO,KAAK;CACb;;;;;;;CAOA,kBAAkB,gBAAgB;EACjC,OAAO,GAAG,KAAK,GAAG,GAAG;CACtB;AACD;;;;;;;;;;;;;;AAcA,IAAI,6BAA6B,MAAM,mCAAmC,oBAAoB;CAC7F,OAAO,WAAW,IAAI,2BAA2B;CACjD,cAAc;EACb,MAAM,EAAE,IAAI,qBAAqB,CAAC;CACnC;CACA,YAAY;EACX,OAAO;CACR;CACA,kBAAkB,gBAAgB;EACjC,OAAO;CACR;AACD;AAGA,IAAI,gCAAgC,cAAc,4BAA4B;CAC7E,wBAAwB,WAAW;EAClC,MAAM,EAAE,SAAS,GAAG,SAAS;EAC7B,MAAM,aAAa,OAAO,YAAY,OAAO,QAAQ,QAAQ,UAAU,CAAC,CAAC,KAAK,CAAC,MAAM,Y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E-B9vITX5a.mjs","names":["#codecs"],"sources":["../../../../3-mongo-target/2-mongo-adapter/dist/mongo-adapter-Cm9V2ftE.mjs"],"sourcesContent":["import { isExprArray, isRecordArgs } from \"@internal/mongo-query-ast/execution\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError, assertNever } from \"@internal/utils/internal-error\";\nimport { checkAborted, raceAgainstAbort, runtimeError } from \"@internal/framework-components/runtime\";\nimport { MongoParamRef } from \"@internal/mongo-value\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { isStructuredError } from \"@internal/utils/structured-error\";\nimport { keysToKeySpec } from \"@internal/mongo-query-ast/control\";\nimport { AggregateWireCommand, CollModWireCommand, CreateCollectionWireCommand, CreateIndexWireCommand, DeleteManyWireCommand, DeleteOneWireCommand, DropCollectionWireCommand, DropIndexWireCommand, FindOneAndDeleteWireCommand, FindOneAndUpdateWireCommand, InsertManyWireCommand, InsertOneWireCommand, UpdateManyWireCommand, UpdateOneWireCommand } from \"@internal/mongo-wire\";\nimport { buildStandardCodecRegistry } from \"@internal/target-mongo/codecs\";\n//#region src/resolve-value.ts\n/**\n* Resolves a `MongoValue` (which may contain `MongoParamRef` leaves) into the\n* driver-ready wire shape. When a leaf has a `codecId` and the registry has a\n* codec for it, the codec's async `encode` is awaited so codecs may perform\n* asynchronous work (e.g. lookups, key derivations).\n*\n* Object/array nodes dispatch their child resolutions concurrently via\n* `Promise.all` so independent leaves encode in parallel.\n*\n* Codec encode failures are wrapped in a `RUNTIME.ENCODE_FAILED` envelope\n* (mirroring SQL's `wrapEncodeFailure` shape) with `{ label, codec }` details\n* and the original error attached on `cause`. A structured envelope (any error\n* with a dotted `code`, per `isStructuredError`) is re-thrown verbatim so\n* codec-raised envelopes and nested resolvers don't get double-wrapped.\n*\n* `ctx: CodecCallContext` is forwarded verbatim to every\n* `codec.encode(value, ctx)` call. The same `ctx` reference is also passed\n* to nested `resolveValue` invocations so codec authors observe **signal\n* identity** across the entire recursive walk for one `runtime.query()`.\n*\n* Abort observation (only when `ctx.signal` is provided):\n*\n* - **Already-aborted at entry** — every recursive call pre-checks\n* `ctx.signal.aborted` and short-circuits with\n* `RUNTIME.ABORTED { phase: 'encode' }` before any codec is invoked.\n* - **Mid-flight abort** — each per-level `Promise.all` races against the\n* signal via `raceAgainstAbort`. The runtime returns\n* `RUNTIME.ABORTED { phase: 'encode' }` promptly even if codec bodies\n* ignore the signal; in-flight bodies run to completion in the background\n* (cooperative cancellation, see ADR 204).\n* - `RUNTIME.ENCODE_FAILED` envelopes thrown by a codec body before the\n* runtime sees the abort pass through unchanged (AC-ERR4).\n*/\nasync function resolveValue(value, codecs, ctx) {\n\tcheckAborted(ctx, \"encode\");\n\tconst signal = ctx.signal;\n\tif (value instanceof MongoParamRef) {\n\t\tif (value.codecId) {\n\t\t\tconst codec = codecs.get(value.codecId);\n\t\t\tif (codec?.encode) try {\n\t\t\t\treturn await raceAgainstAbort(codec.encode(value.value, ctx), signal, \"encode\");\n\t\t\t} catch (error) {\n\t\t\t\twrapEncodeFailure(error, value, codec.id);\n\t\t\t}\n\t\t}\n\t\treturn value.value;\n\t}\n\tif (value === null || typeof value !== \"object\") return value;\n\tif (value instanceof Date) return value;\n\tif (Array.isArray(value)) return raceAgainstAbort(Promise.all(value.map((v) => resolveValue(v, codecs, ctx))), signal, \"encode\");\n\tconst entries = Object.entries(value);\n\tconst resolved = await raceAgainstAbort(Promise.all(entries.map(([, val]) => resolveValue(val, codecs, ctx))), signal, \"encode\");\n\tconst result = {};\n\tfor (let i = 0; i < entries.length; i++) {\n\t\tconst entry = entries[i];\n\t\tif (entry) result[entry[0]] = resolved[i];\n\t}\n\treturn result;\n}\n/**\n* Resolves a draft slot value — which may be `MongoParamRef`, a primitive, a\n* nested plain-object, or an array — into the corresponding wire value.\n* Mirrors `resolveValue`'s traversal strategy but accepts `unknown` so it can\n* handle pipeline stage documents whose field types cannot be narrowed to\n* `MongoValue` statically (e.g. `$geoNear.near: unknown`).\n*/\nasync function resolveDraftSlot(value, codecs, ctx) {\n\tif (value instanceof MongoParamRef) return resolveValue(value, codecs, ctx);\n\tif (value === null || typeof value !== \"object\") return value;\n\tif (value instanceof Date) return value;\n\tif (Array.isArray(value)) return raceAgainstAbort(Promise.all(value.map((v) => resolveDraftSlot(v, codecs, ctx))), ctx.signal, \"encode\");\n\treturn resolveDraftDoc(blindCast(value), codecs, ctx);\n}\n/**\n* Resolves a pipeline stage draft document by walking every entry and\n* forwarding to {@link resolveDraftSlot}. Used by `MongoAdapterImpl.resolveParams`\n* for aggregate pipeline stages, which carry `unknown`-typed fields (e.g.\n* `$geoNear.near`) alongside filter sub-documents that may contain\n* `MongoParamRef` leaves.\n*/\nasync function resolveDraftDoc(doc, codecs, ctx) {\n\tcheckAborted(ctx, \"encode\");\n\tconst entries = Object.entries(doc);\n\tconst resolved = await raceAgainstAbort(Promise.all(entries.map(([, val]) => resolveDraftSlot(val, codecs, ctx))), ctx.signal, \"encode\");\n\tconst result = {};\n\tfor (let i = 0; i < entries.length; i++) {\n\t\tconst entry = entries[i];\n\t\tif (entry) result[entry[0]] = resolved[i];\n\t}\n\treturn result;\n}\nfunction paramRefLabel(ref, codecId) {\n\treturn ref.name ?? codecId;\n}\n/**\n* Every encode failure names the parameter, or the field and collection when the ORM supplied them. A codec's own `RUNTIME.ENCODE_FAILED` keeps its code and details, with the label added; any other structured envelope passes through unchanged; everything else is wrapped in a `RUNTIME.ENCODE_FAILED` envelope. The original error is the `cause`.\n*/\nfunction wrapEncodeFailure(error, ref, codecId) {\n\tconst codecDetails = isStructuredError(error) ? error.meta : void 0;\n\tif (isStructuredError(error) && error.code !== \"RUNTIME.ENCODE_FAILED\") throw error;\n\tconst label = paramRefLabel(ref, codecId);\n\tconst message = error instanceof Error ? error.message : String(error);\n\tconst wrapped = runtimeError(\"RUNTIME.ENCODE_FAILED\", `Failed to encode ${ref.name !== void 0 && ref.collection !== void 0 ? `field ${ref.name} in collection '${ref.collection}'` : `parameter ${label}`} with codec '${codecId}': ${message}`, {\n\t\t...codecDetails,\n\t\tlabel,\n\t\t...ifDefined(\"collection\", ref.collection),\n\t\tcodec: codecId\n\t});\n\twrapped.cause = error;\n\tthrow wrapped;\n}\n//#endregion\n//#region src/lowering.ts\nconst THEN_KEY = \"then\";\nfunction condBranch(caseOrIf, thenExpr, elseExpr) {\n\tconst entries = [[elseExpr ? \"if\" : \"case\", lowerAggExpr(caseOrIf)], [THEN_KEY, lowerAggExpr(thenExpr)]];\n\tif (elseExpr) entries.push([\"else\", lowerAggExpr(elseExpr)]);\n\treturn Object.fromEntries(entries);\n}\nconst aggExprLoweringVisitor = {\n\tfieldRef(expr) {\n\t\treturn `$${expr.path}`;\n\t},\n\tliteral(expr) {\n\t\treturn needsLiteralWrap(expr.value) ? { $literal: expr.value } : expr.value;\n\t},\n\toperator(expr) {\n\t\tconst { args } = expr;\n\t\tlet loweredArgs;\n\t\tif (isExprArray(args)) loweredArgs = args.map((a) => lowerAggExpr(a));\n\t\telse if (isRecordArgs(args)) loweredArgs = lowerExprRecord(args);\n\t\telse loweredArgs = lowerAggExpr(args);\n\t\treturn { [expr.op]: loweredArgs };\n\t},\n\taccumulator(expr) {\n\t\tif (expr.arg === null) return { [expr.op]: {} };\n\t\tif (isRecordArgs(expr.arg)) return { [expr.op]: lowerExprRecord(expr.arg) };\n\t\treturn { [expr.op]: lowerAggExpr(expr.arg) };\n\t},\n\tcond(expr) {\n\t\treturn { $cond: condBranch(expr.condition, expr.then_, expr.else_) };\n\t},\n\tswitch_(expr) {\n\t\treturn { $switch: {\n\t\t\tbranches: expr.branches.map((b) => condBranch(b.case_, b.then_)),\n\t\t\tdefault: lowerAggExpr(expr.default_)\n\t\t} };\n\t},\n\tfilter(expr) {\n\t\treturn { $filter: {\n\t\t\tinput: lowerAggExpr(expr.input),\n\t\t\tcond: lowerAggExpr(expr.cond),\n\t\t\tas: expr.as\n\t\t} };\n\t},\n\tmap(expr) {\n\t\treturn { $map: {\n\t\t\tinput: lowerAggExpr(expr.input),\n\t\t\tin: lowerAggExpr(expr.in_),\n\t\t\tas: expr.as\n\t\t} };\n\t},\n\treduce(expr) {\n\t\treturn { $reduce: {\n\t\t\tinput: lowerAggExpr(expr.input),\n\t\t\tinitialValue: lowerAggExpr(expr.initialValue),\n\t\t\tin: lowerAggExpr(expr.in_)\n\t\t} };\n\t},\n\tlet_(expr) {\n\t\tconst vars = {};\n\t\tfor (const [key, val] of Object.entries(expr.vars)) vars[key] = lowerAggExpr(val);\n\t\treturn { $let: {\n\t\t\tvars,\n\t\t\tin: lowerAggExpr(expr.in_)\n\t\t} };\n\t},\n\tmergeObjects(expr) {\n\t\treturn { $mergeObjects: expr.exprs.map((e) => lowerAggExpr(e)) };\n\t}\n};\nfunction needsLiteralWrap(value) {\n\tif (typeof value === \"string\" && value.startsWith(\"$\")) return true;\n\tif (Array.isArray(value)) return value.some((v) => needsLiteralWrap(v));\n\tif (value !== null && typeof value === \"object\") return Object.entries(value).some(([k, v]) => k.startsWith(\"$\") || needsLiteralWrap(v));\n\treturn false;\n}\nfunction lowerAggExpr(expr) {\n\treturn expr.accept(aggExprLoweringVisitor);\n}\n/**\n* Structural phase of filter lowering: transforms the filter AST into a\n* plain object without resolving any `MongoParamRef` leaves. Field filter\n* values remain as `MongoValue` (which includes `MongoParamRef`), so the\n* returned document can be passed to `resolveDraftDoc` in the resolve phase.\n* Synchronous — no codec calls.\n*/\nfunction structuralLowerFilter(filter) {\n\tswitch (filter.kind) {\n\t\tcase \"field\": return { [filter.field]: { [filter.op]: filter.value } };\n\t\tcase \"and\": return { $and: filter.exprs.map((e) => structuralLowerFilter(e)) };\n\t\tcase \"or\": return { $or: filter.exprs.map((e) => structuralLowerFilter(e)) };\n\t\tcase \"not\": return { $nor: [structuralLowerFilter(filter.expr)] };\n\t\tcase \"exists\": return { [filter.field]: { $exists: filter.exists } };\n\t\tcase \"expr\": return { $expr: lowerAggExpr(filter.aggExpr) };\n\t\tdefault: {\n\t\t\tconst _exhaustive = filter;\n\t\t\treturn assertNever(_exhaustive, `Unhandled filter kind: ${blindCast(_exhaustive).kind}`);\n\t\t}\n\t}\n}\nasync function lowerFilter(filter, codecs, ctx) {\n\tswitch (filter.kind) {\n\t\tcase \"field\": return { [filter.field]: { [filter.op]: await resolveValue(filter.value, codecs, ctx) } };\n\t\tcase \"and\": return { $and: await Promise.all(filter.exprs.map((e) => lowerFilter(e, codecs, ctx))) };\n\t\tcase \"or\": return { $or: await Promise.all(filter.exprs.map((e) => lowerFilter(e, codecs, ctx))) };\n\t\tcase \"not\": return { $nor: [await lowerFilter(filter.expr, codecs, ctx)] };\n\t\tcase \"exists\": return { [filter.field]: { $exists: filter.exists } };\n\t\tcase \"expr\": return { $expr: lowerAggExpr(filter.aggExpr) };\n\t\tdefault: {\n\t\t\tconst _exhaustive = filter;\n\t\t\treturn assertNever(_exhaustive, `Unhandled filter kind: ${blindCast(_exhaustive).kind}`);\n\t\t}\n\t}\n}\nfunction isAggExprNode(value) {\n\treturn \"accept\" in value && typeof value.accept === \"function\";\n}\nfunction isAggExprArray(val) {\n\treturn Array.isArray(val);\n}\nfunction lowerGroupId(groupId) {\n\tif (groupId === null) return null;\n\tif (isAggExprNode(groupId)) return lowerAggExpr(groupId);\n\treturn lowerExprRecord(groupId);\n}\nfunction lowerExprRecord(fields) {\n\tconst result = {};\n\tfor (const [key, val] of Object.entries(fields)) if (isAggExprArray(val)) result[key] = val.map((v) => lowerAggExpr(v));\n\telse result[key] = lowerAggExpr(val);\n\treturn result;\n}\nfunction lowerProjectionValue(value) {\n\tif (typeof value === \"number\") return value;\n\treturn lowerAggExpr(value);\n}\nfunction lowerWindowField(wf) {\n\tconst lowered = lowerAggExpr(wf.operator);\n\tif (typeof lowered !== \"object\" || lowered === null) throw new InternalError(\"Window field operator must lower to an object\");\n\tconst result = { ...lowered };\n\tif (wf.window) result[\"window\"] = { ...wf.window };\n\treturn result;\n}\nasync function lowerStage(stage, codecs, ctx) {\n\tswitch (stage.kind) {\n\t\tcase \"match\": return { $match: await lowerFilter(stage.filter, codecs, ctx) };\n\t\tcase \"project\": {\n\t\t\tconst projection = {};\n\t\t\tfor (const [key, val] of Object.entries(stage.projection)) projection[key] = lowerProjectionValue(val);\n\t\t\treturn { $project: projection };\n\t\t}\n\t\tcase \"sort\": return { $sort: { ...stage.sort } };\n\t\tcase \"limit\": return { $limit: stage.limit };\n\t\tcase \"skip\": return { $skip: stage.skip };\n\t\tcase \"lookup\": {\n\t\t\tconst lookup = {\n\t\t\t\tfrom: stage.from,\n\t\t\t\tas: stage.as\n\t\t\t};\n\t\t\tif (stage.localField !== void 0) lookup[\"localField\"] = stage.localField;\n\t\t\tif (stage.foreignField !== void 0) lookup[\"foreignField\"] = stage.foreignField;\n\t\t\tif (stage.pipeline) lookup[\"pipeline\"] = await Promise.all(stage.pipeline.map((s) => lowerStage(s, codecs, ctx)));\n\t\t\tif (stage.let_) lookup[\"let\"] = lowerExprRecord(stage.let_);\n\t\t\treturn { $lookup: lookup };\n\t\t}\n\t\tcase \"unwind\": {\n\t\t\tconst unwind = {\n\t\t\t\tpath: stage.path,\n\t\t\t\tpreserveNullAndEmptyArrays: stage.preserveNullAndEmptyArrays\n\t\t\t};\n\t\t\tif (stage.includeArrayIndex !== void 0) unwind[\"includeArrayIndex\"] = stage.includeArrayIndex;\n\t\t\treturn { $unwind: unwind };\n\t\t}\n\t\tcase \"group\": {\n\t\t\tconst group = { _id: lowerGroupId(stage.groupId) };\n\t\t\tfor (const [key, acc] of Object.entries(stage.accumulators)) group[key] = lowerAggExpr(acc);\n\t\t\treturn { $group: group };\n\t\t}\n\t\tcase \"addFields\": return { $addFields: lowerExprRecord(stage.fields) };\n\t\tcase \"replaceRoot\": return { $replaceRoot: { newRoot: lowerAggExpr(stage.newRoot) } };\n\t\tcase \"count\": return { $count: stage.field };\n\t\tcase \"sortByCount\": return { $sortByCount: lowerAggExpr(stage.expr) };\n\t\tcase \"sample\": return { $sample: { size: stage.size } };\n\t\tcase \"redact\": return { $redact: lowerAggExpr(stage.expr) };\n\t\tcase \"out\": return { $out: stage.db ? {\n\t\t\tdb: stage.db,\n\t\t\tcoll: stage.collection\n\t\t} : stage.collection };\n\t\tcase \"unionWith\": {\n\t\t\tconst unionWith = { coll: stage.collection };\n\t\t\tif (stage.pipeline) unionWith[\"pipeline\"] = await Promise.all(stage.pipeline.map((s) => lowerStage(s, codecs, ctx)));\n\t\t\treturn { $unionWith: unionWith };\n\t\t}\n\t\tcase \"bucket\": {\n\t\t\tconst bucket = {\n\t\t\t\tgroupBy: lowerAggExpr(stage.groupBy),\n\t\t\t\tboundaries: [...stage.boundaries]\n\t\t\t};\n\t\t\tif (stage.default_ !== void 0) bucket[\"default\"] = stage.default_;\n\t\t\tif (stage.output) bucket[\"output\"] = lowerExprRecord(stage.output);\n\t\t\treturn { $bucket: bucket };\n\t\t}\n\t\tcase \"bucketAuto\": {\n\t\t\tconst bucketAuto = {\n\t\t\t\tgroupBy: lowerAggExpr(stage.groupBy),\n\t\t\t\tbuckets: stage.buckets\n\t\t\t};\n\t\t\tif (stage.output) bucketAuto[\"output\"] = lowerExprRecord(stage.output);\n\t\t\tif (stage.granularity !== void 0) bucketAuto[\"granularity\"] = stage.granularity;\n\t\t\treturn { $bucketAuto: bucketAuto };\n\t\t}\n\t\tcase \"geoNear\": {\n\t\t\tconst geoNear = {\n\t\t\t\tnear: stage.near,\n\t\t\t\tdistanceField: stage.distanceField\n\t\t\t};\n\t\t\tif (stage.spherical !== void 0) geoNear[\"spherical\"] = stage.spherical;\n\t\t\tif (stage.maxDistance !== void 0) geoNear[\"maxDistance\"] = stage.maxDistance;\n\t\t\tif (stage.minDistance !== void 0) geoNear[\"minDistance\"] = stage.minDistance;\n\t\t\tif (stage.query) geoNear[\"query\"] = await lowerFilter(stage.query, codecs, ctx);\n\t\t\tif (stage.key !== void 0) geoNear[\"key\"] = stage.key;\n\t\t\tif (stage.distanceMultiplier !== void 0) geoNear[\"distanceMultiplier\"] = stage.distanceMultiplier;\n\t\t\tif (stage.includeLocs !== void 0) geoNear[\"includeLocs\"] = stage.includeLocs;\n\t\t\treturn { $geoNear: geoNear };\n\t\t}\n\t\tcase \"facet\": {\n\t\t\tconst facetEntries = Object.entries(stage.facets);\n\t\t\tconst facetPipelines = await Promise.all(facetEntries.map(([, pipeline]) => Promise.all(pipeline.map((s) => lowerStage(s, codecs, ctx)))));\n\t\t\tconst facet = {};\n\t\t\tfor (let i = 0; i < facetEntries.length; i++) {\n\t\t\t\tconst entry = facetEntries[i];\n\t\t\t\tif (entry) facet[entry[0]] = facetPipelines[i];\n\t\t\t}\n\t\t\treturn { $facet: facet };\n\t\t}\n\t\tcase \"graphLookup\": {\n\t\t\tconst graphLookup = {\n\t\t\t\tfrom: stage.from,\n\t\t\t\tstartWith: lowerAggExpr(stage.startWith),\n\t\t\t\tconnectFromField: stage.connectFromField,\n\t\t\t\tconnectToField: stage.connectToField,\n\t\t\t\tas: stage.as\n\t\t\t};\n\t\t\tif (stage.maxDepth !== void 0) graphLookup[\"maxDepth\"] = stage.maxDepth;\n\t\t\tif (stage.depthField !== void 0) graphLookup[\"depthField\"] = stage.depthField;\n\t\t\tif (stage.restrictSearchWithMatch) graphLookup[\"restrictSearchWithMatch\"] = await lowerFilter(stage.restrictSearchWithMatch, codecs, ctx);\n\t\t\treturn { $graphLookup: graphLookup };\n\t\t}\n\t\tcase \"merge\": {\n\t\t\tconst merge = { into: stage.into };\n\t\t\tif (stage.on !== void 0) merge[\"on\"] = stage.on;\n\t\t\tif (stage.whenMatched !== void 0) merge[\"whenMatched\"] = Array.isArray(stage.whenMatched) ? await Promise.all(stage.whenMatched.map((s) => lowerStage(s, codecs, ctx))) : stage.whenMatched;\n\t\t\tif (stage.whenNotMatched !== void 0) merge[\"whenNotMatched\"] = stage.whenNotMatched;\n\t\t\treturn { $merge: merge };\n\t\t}\n\t\tcase \"setWindowFields\": {\n\t\t\tconst swf = {};\n\t\t\tif (stage.partitionBy) swf[\"partitionBy\"] = lowerAggExpr(stage.partitionBy);\n\t\t\tif (stage.sortBy) swf[\"sortBy\"] = { ...stage.sortBy };\n\t\t\tconst output = {};\n\t\t\tfor (const [key, wf] of Object.entries(stage.output)) output[key] = lowerWindowField(wf);\n\t\t\tswf[\"output\"] = output;\n\t\t\treturn { $setWindowFields: swf };\n\t\t}\n\t\tcase \"densify\": {\n\t\t\tconst densify = {\n\t\t\t\tfield: stage.field,\n\t\t\t\trange: { ...stage.range }\n\t\t\t};\n\t\t\tif (stage.partitionByFields) densify[\"partitionByFields\"] = [...stage.partitionByFields];\n\t\t\treturn { $densify: densify };\n\t\t}\n\t\tcase \"fill\": {\n\t\t\tconst fill = {};\n\t\t\tif (stage.partitionBy) fill[\"partitionBy\"] = lowerAggExpr(stage.partitionBy);\n\t\t\tif (stage.partitionByFields) fill[\"partitionByFields\"] = [...stage.partitionByFields];\n\t\t\tif (stage.sortBy) fill[\"sortBy\"] = { ...stage.sortBy };\n\t\t\tconst output = {};\n\t\t\tfor (const [key, fo] of Object.entries(stage.output)) {\n\t\t\t\tconst entry = {};\n\t\t\t\tif (fo.method !== void 0) entry[\"method\"] = fo.method;\n\t\t\t\tif (fo.value !== void 0) entry[\"value\"] = lowerAggExpr(fo.value);\n\t\t\t\toutput[key] = entry;\n\t\t\t}\n\t\t\tfill[\"output\"] = output;\n\t\t\treturn { $fill: fill };\n\t\t}\n\t\tcase \"search\": {\n\t\t\tconst search = { ...stage.config };\n\t\t\tif (stage.index !== void 0) search[\"index\"] = stage.index;\n\t\t\treturn { $search: search };\n\t\t}\n\t\tcase \"searchMeta\": {\n\t\t\tconst searchMeta = { ...stage.config };\n\t\t\tif (stage.index !== void 0) searchMeta[\"index\"] = stage.index;\n\t\t\treturn { $searchMeta: searchMeta };\n\t\t}\n\t\tcase \"vectorSearch\": {\n\t\t\tconst vs = {\n\t\t\t\tindex: stage.index,\n\t\t\t\tpath: stage.path,\n\t\t\t\tqueryVector: [...stage.queryVector],\n\t\t\t\tnumCandidates: stage.numCandidates,\n\t\t\t\tlimit: stage.limit\n\t\t\t};\n\t\t\tif (stage.filter) vs[\"filter\"] = { ...stage.filter };\n\t\t\treturn { $vectorSearch: vs };\n\t\t}\n\t\tdefault: {\n\t\t\tconst _exhaustive = stage;\n\t\t\treturn assertNever(_exhaustive, `Unhandled stage kind: ${blindCast(_exhaustive).kind}`);\n\t\t}\n\t}\n}\nasync function lowerPipeline(stages, codecs, ctx) {\n\treturn Promise.all(stages.map((s) => lowerStage(s, codecs, ctx)));\n}\n/**\n* Structural phase of stage lowering: mirrors `lowerStage` but defers all\n* `MongoParamRef` resolution. Filter sub-documents within stages (e.g.\n* `$match`, `$geoNear.query`, `$graphLookup.restrictSearchWithMatch`) are\n* produced by `structuralLowerFilter` and therefore retain `MongoParamRef`\n* leaves. Sub-pipelines (e.g. `$lookup.pipeline`, `$facet.*`) recurse via\n* `structuralLowerPipeline`. Synchronous — no codec calls.\n*/\nfunction structuralLowerStage(stage) {\n\tswitch (stage.kind) {\n\t\tcase \"match\": return { $match: structuralLowerFilter(stage.filter) };\n\t\tcase \"project\": {\n\t\t\tconst projection = {};\n\t\t\tfor (const [key, val] of Object.entries(stage.projection)) projection[key] = lowerProjectionValue(val);\n\t\t\treturn { $project: projection };\n\t\t}\n\t\tcase \"sort\": return { $sort: { ...stage.sort } };\n\t\tcase \"limit\": return { $limit: stage.limit };\n\t\tcase \"skip\": return { $skip: stage.skip };\n\t\tcase \"lookup\": {\n\t\t\tconst lookup = {\n\t\t\t\tfrom: stage.from,\n\t\t\t\tas: stage.as\n\t\t\t};\n\t\t\tif (stage.localField !== void 0) lookup[\"localField\"] = stage.localField;\n\t\t\tif (stage.foreignField !== void 0) lookup[\"foreignField\"] = stage.foreignField;\n\t\t\tif (stage.pipeline) lookup[\"pipeline\"] = structuralLowerPipeline(stage.pipeline);\n\t\t\tif (stage.let_) lookup[\"let\"] = lowerExprRecord(stage.let_);\n\t\t\treturn { $lookup: lookup };\n\t\t}\n\t\tcase \"unwind\": {\n\t\t\tconst unwind = {\n\t\t\t\tpath: stage.path,\n\t\t\t\tpreserveNullAndEmptyArrays: stage.preserveNullAndEmptyArrays\n\t\t\t};\n\t\t\tif (stage.includeArrayIndex !== void 0) unwind[\"includeArrayIndex\"] = stage.includeArrayIndex;\n\t\t\treturn { $unwind: unwind };\n\t\t}\n\t\tcase \"group\": {\n\t\t\tconst group = { _id: lowerGroupId(stage.groupId) };\n\t\t\tfor (const [key, acc] of Object.entries(stage.accumulators)) group[key] = lowerAggExpr(acc);\n\t\t\treturn { $group: group };\n\t\t}\n\t\tcase \"addFields\": return { $addFields: lowerExprRecord(stage.fields) };\n\t\tcase \"replaceRoot\": return { $replaceRoot: { newRoot: lowerAggExpr(stage.newRoot) } };\n\t\tcase \"count\": return { $count: stage.field };\n\t\tcase \"sortByCount\": return { $sortByCount: lowerAggExpr(stage.expr) };\n\t\tcase \"sample\": return { $sample: { size: stage.size } };\n\t\tcase \"redact\": return { $redact: lowerAggExpr(stage.expr) };\n\t\tcase \"out\": return { $out: stage.db ? {\n\t\t\tdb: stage.db,\n\t\t\tcoll: stage.collection\n\t\t} : stage.collection };\n\t\tcase \"unionWith\": {\n\t\t\tconst unionWith = { coll: stage.collection };\n\t\t\tif (stage.pipeline) unionWith[\"pipeline\"] = structuralLowerPipeline(stage.pipeline);\n\t\t\treturn { $unionWith: unionWith };\n\t\t}\n\t\tcase \"bucket\": {\n\t\t\tconst bucket = {\n\t\t\t\tgroupBy: lowerAggExpr(stage.groupBy),\n\t\t\t\tboundaries: [...stage.boundaries]\n\t\t\t};\n\t\t\tif (stage.default_ !== void 0) bucket[\"default\"] = stage.default_;\n\t\t\tif (stage.output) bucket[\"output\"] = lowerExprRecord(stage.output);\n\t\t\treturn { $bucket: bucket };\n\t\t}\n\t\tcase \"bucketAuto\": {\n\t\t\tconst bucketAuto = {\n\t\t\t\tgroupBy: lowerAggExpr(stage.groupBy),\n\t\t\t\tbuckets: stage.buckets\n\t\t\t};\n\t\t\tif (stage.output) bucketAuto[\"output\"] = lowerExprRecord(stage.output);\n\t\t\tif (stage.granularity !== void 0) bucketAuto[\"granularity\"] = stage.granularity;\n\t\t\treturn { $bucketAuto: bucketAuto };\n\t\t}\n\t\tcase \"geoNear\": {\n\t\t\tconst geoNear = {\n\t\t\t\tnear: stage.near,\n\t\t\t\tdistanceField: stage.distanceField\n\t\t\t};\n\t\t\tif (stage.spherical !== void 0) geoNear[\"spherical\"] = stage.spherical;\n\t\t\tif (stage.maxDistance !== void 0) geoNear[\"maxDistance\"] = stage.maxDistance;\n\t\t\tif (stage.minDistance !== void 0) geoNear[\"minDistance\"] = stage.minDistance;\n\t\t\tif (stage.query) geoNear[\"query\"] = structuralLowerFilter(stage.query);\n\t\t\tif (stage.key !== void 0) geoNear[\"key\"] = stage.key;\n\t\t\tif (stage.distanceMultiplier !== void 0) geoNear[\"distanceMultiplier\"] = stage.distanceMultiplier;\n\t\t\tif (stage.includeLocs !== void 0) geoNear[\"includeLocs\"] = stage.includeLocs;\n\t\t\treturn { $geoNear: geoNear };\n\t\t}\n\t\tcase \"facet\": {\n\t\t\tconst facet = {};\n\t\t\tfor (const [key, pipeline] of Object.entries(stage.facets)) facet[key] = structuralLowerPipeline(pipeline);\n\t\t\treturn { $facet: facet };\n\t\t}\n\t\tcase \"graphLookup\": {\n\t\t\tconst graphLookup = {\n\t\t\t\tfrom: stage.from,\n\t\t\t\tstartWith: lowerAggExpr(stage.startWith),\n\t\t\t\tconnectFromField: stage.connectFromField,\n\t\t\t\tconnectToField: stage.connectToField,\n\t\t\t\tas: stage.as\n\t\t\t};\n\t\t\tif (stage.maxDepth !== void 0) graphLookup[\"maxDepth\"] = stage.maxDepth;\n\t\t\tif (stage.depthField !== void 0) graphLookup[\"depthField\"] = stage.depthField;\n\t\t\tif (stage.restrictSearchWithMatch) graphLookup[\"restrictSearchWithMatch\"] = structuralLowerFilter(stage.restrictSearchWithMatch);\n\t\t\treturn { $graphLookup: graphLookup };\n\t\t}\n\t\tcase \"merge\": {\n\t\t\tconst merge = { into: stage.into };\n\t\t\tif (stage.on !== void 0) merge[\"on\"] = stage.on;\n\t\t\tif (stage.whenMatched !== void 0) merge[\"whenMatched\"] = Array.isArray(stage.whenMatched) ? structuralLowerPipeline(stage.whenMatched) : stage.whenMatched;\n\t\t\tif (stage.whenNotMatched !== void 0) merge[\"whenNotMatched\"] = stage.whenNotMatched;\n\t\t\treturn { $merge: merge };\n\t\t}\n\t\tcase \"setWindowFields\": {\n\t\t\tconst swf = {};\n\t\t\tif (stage.partitionBy) swf[\"partitionBy\"] = lowerAggExpr(stage.partitionBy);\n\t\t\tif (stage.sortBy) swf[\"sortBy\"] = { ...stage.sortBy };\n\t\t\tconst output = {};\n\t\t\tfor (const [key, wf] of Object.entries(stage.output)) output[key] = lowerWindowField(wf);\n\t\t\tswf[\"output\"] = output;\n\t\t\treturn { $setWindowFields: swf };\n\t\t}\n\t\tcase \"densify\": {\n\t\t\tconst densify = {\n\t\t\t\tfield: stage.field,\n\t\t\t\trange: { ...stage.range }\n\t\t\t};\n\t\t\tif (stage.partitionByFields) densify[\"partitionByFields\"] = [...stage.partitionByFields];\n\t\t\treturn { $densify: densify };\n\t\t}\n\t\tcase \"fill\": {\n\t\t\tconst fill = {};\n\t\t\tif (stage.partitionBy) fill[\"partitionBy\"] = lowerAggExpr(stage.partitionBy);\n\t\t\tif (stage.partitionByFields) fill[\"partitionByFields\"] = [...stage.partitionByFields];\n\t\t\tif (stage.sortBy) fill[\"sortBy\"] = { ...stage.sortBy };\n\t\t\tconst output = {};\n\t\t\tfor (const [key, fo] of Object.entries(stage.output)) {\n\t\t\t\tconst entry = {};\n\t\t\t\tif (fo.method !== void 0) entry[\"method\"] = fo.method;\n\t\t\t\tif (fo.value !== void 0) entry[\"value\"] = lowerAggExpr(fo.value);\n\t\t\t\toutput[key] = entry;\n\t\t\t}\n\t\t\tfill[\"output\"] = output;\n\t\t\treturn { $fill: fill };\n\t\t}\n\t\tcase \"search\": {\n\t\t\tconst search = { ...stage.config };\n\t\t\tif (stage.index !== void 0) search[\"index\"] = stage.index;\n\t\t\treturn { $search: search };\n\t\t}\n\t\tcase \"searchMeta\": {\n\t\t\tconst searchMeta = { ...stage.config };\n\t\t\tif (stage.index !== void 0) searchMeta[\"index\"] = stage.index;\n\t\t\treturn { $searchMeta: searchMeta };\n\t\t}\n\t\tcase \"vectorSearch\": {\n\t\t\tconst vs = {\n\t\t\t\tindex: stage.index,\n\t\t\t\tpath: stage.path,\n\t\t\t\tqueryVector: [...stage.queryVector],\n\t\t\t\tnumCandidates: stage.numCandidates,\n\t\t\t\tlimit: stage.limit\n\t\t\t};\n\t\t\tif (stage.filter) vs[\"filter\"] = { ...stage.filter };\n\t\t\treturn { $vectorSearch: vs };\n\t\t}\n\t\tdefault: {\n\t\t\tconst _exhaustive = stage;\n\t\t\treturn assertNever(_exhaustive, `Unhandled stage kind: ${blindCast(_exhaustive).kind}`);\n\t\t}\n\t}\n}\nfunction structuralLowerPipeline(stages) {\n\treturn stages.map((s) => structuralLowerStage(s));\n}\n//#endregion\n//#region src/mongo-adapter.ts\nfunction isUpdatePipeline(update) {\n\treturn Array.isArray(update);\n}\nfunction isDraftUpdatePipeline(update) {\n\treturn Array.isArray(update);\n}\nasync function resolveUpdate(update, codecs, ctx) {\n\tif (isDraftUpdatePipeline(update)) return Promise.all(update.map((stage) => resolveDraftDoc(stage, codecs, ctx)));\n\treturn resolveDraftDoc(update, codecs, ctx);\n}\nfunction lowerDdlCommand(command) {\n\tswitch (command.kind) {\n\t\tcase \"createCollection\": return new CreateCollectionWireCommand(command.collection, command);\n\t\tcase \"createIndex\": return new CreateIndexWireCommand(command.collection, keysToKeySpec(command.keys), command);\n\t\tcase \"dropCollection\": return new DropCollectionWireCommand(command.collection);\n\t\tcase \"dropIndex\": return new DropIndexWireCommand(command.collection, command.name);\n\t\tcase \"collMod\": return new CollModWireCommand(command.collection, command);\n\t\t// v8 ignore next 4\n\t\tdefault: {\n\t\t\tconst _exhaustive = command;\n\t\t\treturn assertNever(_exhaustive, `Unknown DDL command kind: ${blindCast(_exhaustive).kind}`);\n\t\t}\n\t}\n}\nvar MongoAdapterImpl = class {\n\t#codecs;\n\tconstructor(codecs) {\n\t\tthis.#codecs = codecs;\n\t}\n\tstructuralLower(plan) {\n\t\tconst { command } = plan;\n\t\tswitch (command.kind) {\n\t\t\tcase \"insertOne\": return {\n\t\t\t\tkind: \"insertOne\",\n\t\t\t\tcollection: command.collection,\n\t\t\t\tdocument: command.document\n\t\t\t};\n\t\t\tcase \"insertMany\": return {\n\t\t\t\tkind: \"insertMany\",\n\t\t\t\tcollection: command.collection,\n\t\t\t\tdocuments: command.documents\n\t\t\t};\n\t\t\tcase \"updateOne\": return {\n\t\t\t\tkind: \"updateOne\",\n\t\t\t\tcollection: command.collection,\n\t\t\t\tfilter: structuralLowerFilter(command.filter),\n\t\t\t\tupdate: isUpdatePipeline(command.update) ? structuralLowerPipeline(command.update) : command.update,\n\t\t\t\tupsert: command.upsert\n\t\t\t};\n\t\t\tcase \"updateMany\": return {\n\t\t\t\tkind: \"updateMany\",\n\t\t\t\tcollection: command.collection,\n\t\t\t\tfilter: structuralLowerFilter(command.filter),\n\t\t\t\tupdate: isUpdatePipeline(command.update) ? structuralLowerPipeline(command.update) : command.update,\n\t\t\t\tupsert: command.upsert\n\t\t\t};\n\t\t\tcase \"deleteOne\": return {\n\t\t\t\tkind: \"deleteOne\",\n\t\t\t\tcollection: command.collection,\n\t\t\t\tfilter: structuralLowerFilter(command.filter)\n\t\t\t};\n\t\t\tcase \"deleteMany\": return {\n\t\t\t\tkind: \"deleteMany\",\n\t\t\t\tcollection: command.collection,\n\t\t\t\tfilter: structuralLowerFilter(command.filter)\n\t\t\t};\n\t\t\tcase \"findOneAndUpdate\": return {\n\t\t\t\tkind: \"findOneAndUpdate\",\n\t\t\t\tcollection: command.collection,\n\t\t\t\tfilter: structuralLowerFilter(command.filter),\n\t\t\t\tupdate: isUpdatePipeline(command.update) ? structuralLowerPipeline(command.update) : command.update,\n\t\t\t\tupsert: command.upsert,\n\t\t\t\tsort: command.sort,\n\t\t\t\treturnDocument: command.returnDocument\n\t\t\t};\n\t\t\tcase \"findOneAndDelete\": return {\n\t\t\t\tkind: \"findOneAndDelete\",\n\t\t\t\tcollection: command.collection,\n\t\t\t\tfilter: structuralLowerFilter(command.filter),\n\t\t\t\tsort: command.sort\n\t\t\t};\n\t\t\tcase \"aggregate\": return {\n\t\t\t\tkind: \"aggregate\",\n\t\t\t\tcollection: command.collection,\n\t\t\t\tpipeline: structuralLowerPipeline(command.pipeline)\n\t\t\t};\n\t\t\tcase \"rawAggregate\": return {\n\t\t\t\tkind: \"rawAggregate\",\n\t\t\t\tcollection: command.collection,\n\t\t\t\tpipeline: command.pipeline\n\t\t\t};\n\t\t\tcase \"rawInsertOne\": return {\n\t\t\t\tkind: \"rawInsertOne\",\n\t\t\t\tcollection: command.collection,\n\t\t\t\tdocument: command.document\n\t\t\t};\n\t\t\tcase \"rawInsertMany\": return {\n\t\t\t\tkind: \"rawInsertMany\",\n\t\t\t\tcollection: command.collection,\n\t\t\t\tdocuments: command.documents\n\t\t\t};\n\t\t\tcase \"rawUpdateOne\": return {\n\t\t\t\tkind: \"rawUpdateOne\",\n\t\t\t\tcollection: command.collection,\n\t\t\t\tfilter: command.filter,\n\t\t\t\tupdate: command.update\n\t\t\t};\n\t\t\tcase \"rawUpdateMany\": return {\n\t\t\t\tkind: \"rawUpdateMany\",\n\t\t\t\tcollection: command.collection,\n\t\t\t\tfilter: command.filter,\n\t\t\t\tupdate: command.update\n\t\t\t};\n\t\t\tcase \"rawDeleteOne\": return {\n\t\t\t\tkind: \"rawDeleteOne\",\n\t\t\t\tcollection: command.collection,\n\t\t\t\tfilter: command.filter\n\t\t\t};\n\t\t\tcase \"rawDeleteMany\": return {\n\t\t\t\tkind: \"rawDeleteMany\",\n\t\t\t\tcollection: command.collection,\n\t\t\t\tfilter: command.filter\n\t\t\t};\n\t\t\tcase \"rawFindOneAndUpdate\": return {\n\t\t\t\tkind: \"rawFindOneAndUpdate\",\n\t\t\t\tcollection: command.collection,\n\t\t\t\tfilter: command.filter,\n\t\t\t\tupdate: command.update,\n\t\t\t\tupsert: command.upsert,\n\t\t\t\tsort: command.sort,\n\t\t\t\treturnDocument: command.returnDocument\n\t\t\t};\n\t\t\tcase \"rawFindOneAndDelete\": return {\n\t\t\t\tkind: \"rawFindOneAndDelete\",\n\t\t\t\tcollection: command.collection,\n\t\t\t\tfilter: command.filter,\n\t\t\t\tsort: command.sort\n\t\t\t};\n\t\t\t// v8 ignore next 4\n\t\t\tdefault: {\n\t\t\t\tconst _exhaustive = command;\n\t\t\t\treturn assertNever(_exhaustive, `Unknown command kind: ${blindCast(_exhaustive).kind}`);\n\t\t\t}\n\t\t}\n\t}\n\tasync resolveParams(draft, ctx) {\n\t\tswitch (draft.kind) {\n\t\t\tcase \"insertOne\": return new InsertOneWireCommand(draft.collection, await resolveDraftDoc(draft.document, this.#codecs, ctx));\n\t\t\tcase \"insertMany\": return new InsertManyWireCommand(draft.collection, await Promise.all(draft.documents.map((doc) => resolveDraftDoc(doc, this.#codecs, ctx))));\n\t\t\tcase \"updateOne\": {\n\t\t\t\tconst [filter, update] = await Promise.all([resolveDraftDoc(draft.filter, this.#codecs, ctx), resolveUpdate(draft.update, this.#codecs, ctx)]);\n\t\t\t\treturn new UpdateOneWireCommand(draft.collection, filter, update, draft.upsert);\n\t\t\t}\n\t\t\tcase \"updateMany\": {\n\t\t\t\tconst [filter, update] = await Promise.all([resolveDraftDoc(draft.filter, this.#codecs, ctx), resolveUpdate(draft.update, this.#codecs, ctx)]);\n\t\t\t\treturn new UpdateManyWireCommand(draft.collection, filter, update, draft.upsert);\n\t\t\t}\n\t\t\tcase \"deleteOne\": return new DeleteOneWireCommand(draft.collection, await resolveDraftDoc(draft.filter, this.#codecs, ctx));\n\t\t\tcase \"deleteMany\": return new DeleteManyWireCommand(draft.collection, await resolveDraftDoc(draft.filter, this.#codecs, ctx));\n\t\t\tcase \"findOneAndUpdate\": {\n\t\t\t\tconst [filter, update] = await Promise.all([resolveDraftDoc(draft.filter, this.#codecs, ctx), resolveUpdate(draft.update, this.#codecs, ctx)]);\n\t\t\t\treturn new FindOneAndUpdateWireCommand(draft.collection, filter, update, draft.upsert, draft.sort, draft.returnDocument);\n\t\t\t}\n\t\t\tcase \"findOneAndDelete\": return new FindOneAndDeleteWireCommand(draft.collection, await resolveDraftDoc(draft.filter, this.#codecs, ctx), draft.sort);\n\t\t\tcase \"aggregate\": return new AggregateWireCommand(draft.collection, await Promise.all(draft.pipeline.map((stage) => resolveDraftDoc(stage, this.#codecs, ctx))));\n\t\t\tcase \"rawAggregate\": return new AggregateWireCommand(draft.collection, draft.pipeline);\n\t\t\tcase \"rawInsertOne\": return new InsertOneWireCommand(draft.collection, draft.document);\n\t\t\tcase \"rawInsertMany\": return new InsertManyWireCommand(draft.collection, draft.documents);\n\t\t\tcase \"rawUpdateOne\": return new UpdateOneWireCommand(draft.collection, draft.filter, draft.update);\n\t\t\tcase \"rawUpdateMany\": return new UpdateManyWireCommand(draft.collection, draft.filter, draft.update);\n\t\t\tcase \"rawDeleteOne\": return new DeleteOneWireCommand(draft.collection, draft.filter);\n\t\t\tcase \"rawDeleteMany\": return new DeleteManyWireCommand(draft.collection, draft.filter);\n\t\t\tcase \"rawFindOneAndUpdate\": return new FindOneAndUpdateWireCommand(draft.collection, draft.filter, draft.update, draft.upsert, draft.sort, draft.returnDocument);\n\t\t\tcase \"rawFindOneAndDelete\": return new FindOneAndDeleteWireCommand(draft.collection, draft.filter, draft.sort);\n\t\t\t// v8 ignore next 4\n\t\t\tdefault: {\n\t\t\t\tconst _exhaustive = draft;\n\t\t\t\treturn assertNever(_exhaustive, `Unknown draft kind: ${blindCast(_exhaustive).kind}`);\n\t\t\t}\n\t\t}\n\t}\n\tlower(plan, ctx) {\n\t\tif (\"collection\" in plan) return this.resolveParams(this.structuralLower(plan), ctx);\n\t\treturn Promise.resolve(lowerDdlCommand(plan.command));\n\t}\n};\n/**\n* Construct a Mongo adapter with the standard wire-type codecs registered\n* for encode-side dispatch (`MongoParamRef.codecId` lookups).\n*\n* The runtime-side codec registry the runtime decodes against is composed\n* separately by `createMongoExecutionContext`. This factory exists for\n* direct adapter use (the runtime descriptor's `create(stack)` calls\n* through it). User code should compose a stack/context instead.\n*/\nfunction createMongoAdapter() {\n\treturn new MongoAdapterImpl(buildStandardCodecRegistry());\n}\n//#endregion\nexport { lowerStage as a, lowerPipeline as i, lowerAggExpr as n, lowerFilter as r, createMongoAdapter as t };\n\n//# sourceMappingURL=mongo-adapter-Cm9V2ftE.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,eAAe,aAAa,OAAO,QAAQ,KAAK;CAC/C,aAAa,KAAK,QAAQ;CAC1B,MAAM,SAAS,IAAI;CACnB,IAAI,iBAAiB,eAAe;EACnC,IAAI,MAAM,SAAS;GAClB,MAAM,QAAQ,OAAO,IAAI,MAAM,OAAO;GACtC,IAAI,OAAO,QAAQ,IAAI;IACtB,OAAO,MAAM,iBAAiB,MAAM,OAAO,MAAM,OAAO,GAAG,GAAG,QAAQ,QAAQ;GAC/E,SAAS,OAAO;IACf,kBAAkB,OAAO,OAAO,MAAM,EAAE;GACzC;EACD;EACA,OAAO,MAAM;CACd;CACA,IAAI,UAAU,QAAQ,OAAO,UAAU,UAAU,OAAO;CACxD,IAAI,iBAAiB,MAAM,OAAO;CAClC,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,iBAAiB,QAAQ,IAAI,MAAM,KAAK,MAAM,aAAa,GAAG,QAAQ,GAAG,CAAC,CAAC,GAAG,QAAQ,QAAQ;CAC/H,MAAM,UAAU,OAAO,QAAQ,KAAK;CACpC,MAAM,WAAW,MAAM,iBAAiB,QAAQ,IAAI,QAAQ,KAAK,GAAG,SAAS,aAAa,KAAK,QAAQ,GAAG,CAAC,CAAC,GAAG,QAAQ,QAAQ;CAC/H,MAAM,SAAS,CAAC;CAChB,KAAK,IAAI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mongo-driver-D1lEf5Kl.d.mts"],"mappings":";;;;;cAIc,2BAA2B;qBACpB,IAAI;qBACJ,QAAQ;YACjB,YAAY,IAAI,IAAI,QAAQ;SAC/B,eAAe,aAAa,iBAAiB,QAAQ;SACrD,OAAO,IAAI,KAAK;EACvB,QAAQ,MAAM,yBAAyB,aAAa,yBAAyB,cAAc;EAC3F,IAAI,aAAa,yBAAyB;EAC1C,SAAS;YACC,wBAAwB,KAAK,uBAAuB,cAAc;YAClE,wBAAwB,KAAK,uBAAuB,cAAc;YAClE,yBAAyB,KAAK,wBAAwB,cAAc;YACpE,yBAAyB,KAAK,wBAAwB,cAAc;YACpE,wBAAwB,KAAK,uBAAuB,cAAc;YAClE,yBAAyB,KAAK,wBAAwB,cAAc;YACpE,+BAA+B,KAAK,8BAA8B,cAAc;YAChF,+BAA+B,KAAK,8BAA8B,cAAc;YAChF,wBAAwB,KAAK,KAAK,uBAAuB,cAAc;YACvE,+BAA+B,KAAK,8BAA8B;YAClE,0BAA0B,KAAK,yBAAyB;YACxD,6BAA6B,KAAK,4BAA4B;YAC9D,wBAAwB,KAAK,uBAAuB;YACpD,sBAAsB,KAAK,qBAAqB;;iBAE3C,kBAAkB,aAAa,iBAAiB,QAAQ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mongo-driver-DWHM65jW-BbJhtGzG.mjs","names":[],"sources":["../../../../3-mongo-target/3-mongo-driver/dist/mongo-driver-DWHM65jW.mjs"],"sourcesContent":["import { assertNever } from \"@internal/utils/internal-error\";\nimport { MongoClient } from \"mongodb\";\n//#endregion\n//#region src/core/driver-info.ts\nconst DRIVER_INFO = {\n\tname: \"Prisma\",\n\tversion: \"8.0.0-rc.13-dev.12\"\n};\n//#endregion\n//#region src/mongo-driver.ts\n/* v8 ignore start */\nfunction unreachableKind(value) {\n\tconst candidate = value;\n\tif (typeof candidate === \"object\" && candidate !== null && \"kind\" in candidate && typeof candidate.kind === \"string\") return candidate.kind;\n\treturn \"unknown\";\n}\n/* v8 ignore stop */\nvar MongoDriverImpl = class MongoDriverImpl {\n\tdb;\n\tclient;\n\tconstructor(db, client) {\n\t\tthis.db = db;\n\t\tthis.client = client;\n\t}\n\tstatic async fromConnection(uri, dbName) {\n\t\tconst client = new MongoClient(uri, { driverInfo: DRIVER_INFO });\n\t\tawait client.connect();\n\t\treturn new MongoDriverImpl(client.db(dbName), client);\n\t}\n\tstatic fromDb(db) {\n\t\treturn new MongoDriverImpl(db, void 0);\n\t}\n\texecute(wireCommand) {\n\t\tswitch (wireCommand.kind) {\n\t\t\tcase \"insertOne\": return this.executeInsertOneCommand(wireCommand);\n\t\t\tcase \"updateOne\": return this.executeUpdateOneCommand(wireCommand);\n\t\t\tcase \"insertMany\": return this.executeInsertManyCommand(wireCommand);\n\t\t\tcase \"updateMany\": return this.executeUpdateManyCommand(wireCommand);\n\t\t\tcase \"deleteOne\": return this.executeDeleteOneCommand(wireCommand);\n\t\t\tcase \"deleteMany\": return this.executeDeleteManyCommand(wireCommand);\n\t\t\tcase \"findOneAndUpdate\": return this.executeFindOneAndUpdateCommand(wireCommand);\n\t\t\tcase \"findOneAndDelete\": return this.executeFindOneAndDeleteCommand(wireCommand);\n\t\t\tcase \"aggregate\": return this.executeAggregateCommand(wireCommand);\n\t\t\t// v8 ignore next 4\n\t\t\tdefault: return assertNever(wireCommand, `Unknown wire command kind: ${unreachableKind(wireCommand)}`);\n\t\t}\n\t}\n\tasync run(wireCommand) {\n\t\tswitch (wireCommand.kind) {\n\t\t\tcase \"createCollection\": return this.executeCreateCollectionCommand(wireCommand);\n\t\t\tcase \"createIndex\": return this.executeCreateIndexCommand(wireCommand);\n\t\t\tcase \"dropCollection\": return this.executeDropCollectionCommand(wireCommand);\n\t\t\tcase \"dropIndex\": return this.executeDropIndexCommand(wireCommand);\n\t\t\tcase \"collMod\": return this.executeCollModCommand(wireCommand);\n\t\t\t// v8 ignore next 4\n\t\t\tdefault: return assertNever(wireCommand, `Unknown DDL wire command kind: ${unreachableKind(wireCommand)}`);\n\t\t}\n\t}\n\tasync close() {\n\t\tawait this.client?.close();\n\t}\n\tasync *executeInsertOneCommand(cmd) {\n\t\tyield { insertedId: (await this.db.collection(cmd.collection).insertOne(cmd.document)).insertedId };\n\t}\n\tasync *executeUpdateOneCommand(cmd) {\n\t\tconst result = await this.db.collection(cmd.collection).updateOne(cmd.filter, cmd.update, { upsert: cmd.upsert });\n\t\tyield {\n\t\t\tmatchedCount: result.matchedCount,\n\t\t\tmodifiedCount: result.modifiedCount,\n\t\t\tupsertedCount: result.upsertedCount,\n\t\t\tupsertedId: result.upsertedId ?? void 0\n\t\t};\n\t}\n\tasync *executeInsertManyCommand(cmd) {\n\t\tconst result = await this.db.collection(cmd.collection).insertMany(cmd.documents);\n\t\tyield {\n\t\t\tinsertedIds: Object.values(result.insertedIds),\n\t\t\tinsertedCount: result.insertedCount\n\t\t};\n\t}\n\tasync *executeUpdateManyCommand(cmd) {\n\t\tconst result = await this.db.collection(cmd.collection).updateMany(cmd.filter, cmd.update, { upsert: cmd.upsert });\n\t\tyield {\n\t\t\tmatchedCount: result.matchedCount,\n\t\t\tmodifiedCount: result.modifiedCount,\n\t\t\tupsertedCount: result.upsertedCount,\n\t\t\tupsertedId: result.upsertedId ?? void 0\n\t\t};\n\t}\n\tasync *executeDeleteOneCommand(cmd) {\n\t\tyield { deletedCount: (await this.db.collection(cmd.collection).deleteOne(cmd.filter)).deletedCount };\n\t}\n\tasync *executeDeleteManyCommand(cmd) {\n\t\tyield { deletedCount: (await this.db.collection(cmd.collection).deleteMany(cmd.filter)).deletedCount };\n\t}\n\tasync *executeFindOneAndUpdateCommand(cmd) {\n\t\tconst result = await this.db.collection(cmd.collection).findOneAndUpdate(cmd.filter, cmd.update, {\n\t\t\tupsert: cmd.upsert,\n\t\t\t...cmd.returnDocument != null ? { returnDocument: cmd.returnDocument } : {},\n\t\t\t...cmd.sort != null ? { sort: cmd.sort } : {}\n\t\t});\n\t\tif (result) yield result;\n\t}\n\tasync *executeFindOneAndDeleteCommand(cmd) {\n\t\tconst result = await this.db.collection(cmd.collection).findOneAndDelete(cmd.filter, { ...cmd.sort != null ? { sort: cmd.sort } : {} });\n\t\tif (result) yield result;\n\t}\n\tasync *executeAggregateCommand(cmd) {\n\t\tyield* this.db.collection(cmd.collection).aggregate(cmd.pipeline);\n\t}\n\tasync executeCreateCollectionCommand(cmd) {\n\t\tconst { validator, validationLevel, validationAction, capped, size, max, timeseries, collation, changeStreamPreAndPostImages, clusteredIndex } = cmd;\n\t\tawait this.db.createCollection(cmd.collection, {\n\t\t\t...validator !== void 0 ? { validator } : {},\n\t\t\t...validationLevel !== void 0 ? { validationLevel } : {},\n\t\t\t...validationAction !== void 0 ? { validationAction } : {},\n\t\t\t...capped !== void 0 ? { capped } : {},\n\t\t\t...size !== void 0 ? { size } : {},\n\t\t\t...max !== void 0 ? { max } : {},\n\t\t\t...timeseries !== void 0 ? { timeseries } : {},\n\t\t\t...collation !== void 0 ? { collation } : {},\n\t\t\t...changeStreamPreAndPostImages !== void 0 ? { changeStreamPreAndPostImages } : {},\n\t\t\t...clusteredIndex !== void 0 ? { clusteredIndex } : {}\n\t\t});\n\t}\n\tasync executeCreateIndexCommand(cmd) {\n\t\tconst { unique, sparse, expireAfterSeconds, partialFilterExpression, name, wildcardProjection, collation, weights, default_language, language_override } = cmd;\n\t\tawait this.db.collection(cmd.collection).createIndex(cmd.key, {\n\t\t\t...unique !== void 0 ? { unique } : {},\n\t\t\t...sparse !== void 0 ? { sparse } : {},\n\t\t\t...expireAfterSeconds !== void 0 ? { expireAfterSeconds } : {},\n\t\t\t...partialFilterExpression !== void 0 ? { partialFilterExpression } : {},\n\t\t\t...name !== void 0 ? { name } : {},\n\t\t\t...wildcardProjection !== void 0 ? { wildcardProjection } : {},\n\t\t\t...collation !== void 0 ? { collation } : {},\n\t\t\t...weights !== void 0 ? { weights } : {},\n\t\t\t...default_language !== void 0 ? { default_language } : {},\n\t\t\t...language_override !== void 0 ? { language_override } : {}\n\t\t});\n\t}\n\tasync executeDropCollectionCommand(cmd) {\n\t\tawait this.db.collection(cmd.collection).drop();\n\t}\n\tasync executeDropIndexCommand(cmd) {\n\t\tawait this.db.collection(cmd.collection).dropIndex(cmd.name);\n\t}\n\tasync executeCollModCommand(cmd) {\n\t\tconst { validator, validationLevel, validationAction, changeStreamPreAndPostImages } = cmd;\n\t\tawait this.db.command({\n\t\t\tcollMod: cmd.collection,\n\t\t\t...validator !== void 0 ? { validator } : {},\n\t\t\t...validationLevel !== void 0 ? { validationLevel } : {},\n\t\t\t...validationAction !== void 0 ? { validationAction } : {},\n\t\t\t...changeStreamPreAndPostImages !== void 0 ? { changeStreamPreAndPostImages } : {}\n\t\t});\n\t}\n};\nasync function createMongoDriver(uri, dbName) {\n\treturn MongoDriverImpl.fromConnection(uri, dbName);\n}\n//#endregion\nexport { createMongoDriver as n, DRIVER_INFO as r, MongoDriverImpl as t };\n\n//# sourceMappingURL=mongo-driver-DWHM65jW.mjs.map"],"mappings":";;;AAIA,MAAM,cAAc;CACnB,MAAM;CACN,SAAS;AACV;;AAIA,SAAS,gBAAgB,OAAO;CAC/B,MAAM,YAAY;CAClB,IAAI,OAAO,cAAc,YAAY,cAAc,QAAQ,UAAU,aAAa,OAAO,UAAU,SAAS,UAAU,OAAO,UAAU;CACvI,OAAO;AACR;;AAEA,IAAI,kBAAkB,MAAM,gBAAgB;CAC3C;CACA;CACA,YAAY,IAAI,QAAQ;EACvB,KAAK,KAAK;EACV,KAAK,SAAS;CACf;CACA,aAAa,eAAe,KAAK,QAAQ;EACxC,MAAM,SAAS,IAAI,YAAY,KAAK,EAAE,YAAY,YAAY,CAAC;EAC/D,MAAM,OAAO,QAAQ;EACrB,OAAO,IAAI,gBAAgB,OAAO,GAAG,MAAM,GAAG,MAAM;CACrD;CACA,OAAO,OAAO,IAAI;EACjB,OAAO,IAAI,gBAAgB,IAAI,KAAK,CAAC;CACtC;CACA,QAAQ,aAAa;EACpB,QAAQ,YAAY,MAApB;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