@prisma/orm-target-mongo 8.0.0-rc.14-dev.5 → 8.0.0-rc.14-dev.7
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/{codecs-Dt4Q55gF-DDdyWx8-.mjs → codecs-DHo_Ei21-DHvEom71.mjs} +89 -50
- package/dist/codecs-DHo_Ei21-DHvEom71.mjs.map +1 -0
- package/dist/{control-Bg7Jaq6_.mjs → control-SXftFB8z.mjs} +3 -3
- package/dist/{control-Bg7Jaq6_.mjs.map → control-SXftFB8z.mjs.map} +1 -1
- package/dist/{descriptor-meta-DLXhalaq-mZXhO5bM.mjs → descriptor-meta-DqlqWWFC-ei2sStOs.mjs} +3 -3
- package/dist/{descriptor-meta-DLXhalaq-mZXhO5bM.mjs.map → descriptor-meta-DqlqWWFC-ei2sStOs.mjs.map} +1 -1
- package/dist/{descriptor-meta-runtime-C2pWx159-BLTObR45.mjs → descriptor-meta-runtime-DAabvKNm-CXYTUnQP.mjs} +3 -3
- package/dist/{descriptor-meta-runtime-C2pWx159-BLTObR45.mjs.map → descriptor-meta-runtime-DAabvKNm-CXYTUnQP.mjs.map} +1 -1
- package/dist/driver.mjs +1 -1
- package/dist/driver__control.mjs +1 -1
- package/dist/driver__control.mjs.map +1 -1
- package/dist/{mongo-adapter-BGuuu-r7-0OIt3FC4.mjs → mongo-adapter-BW-kRaXm-C3Sw9U9G.mjs} +8 -6
- package/dist/mongo-adapter-BW-kRaXm-C3Sw9U9G.mjs.map +1 -0
- package/dist/{mongo-driver-CPIxAKDF-Bk-Rv8on.mjs → mongo-driver-BtJ77prn-CI3a8jYk.mjs} +3 -3
- package/dist/{mongo-driver-CPIxAKDF-Bk-Rv8on.mjs.map → mongo-driver-BtJ77prn-CI3a8jYk.mjs.map} +1 -1
- package/dist/{prisma6-binding-CekUr7j1.mjs → prisma6-binding-CzV_iWP8.mjs} +2 -2
- package/dist/{prisma6-binding-CekUr7j1.mjs.map → prisma6-binding-CzV_iWP8.mjs.map} +1 -1
- package/dist/target.mjs +3 -3
- package/dist/target__codecs.mjs +1 -1
- package/dist/target__control.mjs +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/codecs-Dt4Q55gF-DDdyWx8-.mjs.map +0 -1
- package/dist/mongo-adapter-BGuuu-r7-0OIt3FC4.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver__control.mjs","names":[],"sources":["../../../../3-mongo-target/3-mongo-driver/dist/control.mjs"],"sourcesContent":["import { r as DRIVER_INFO, t as MongoDriverImpl } from \"./mongo-driver-
|
|
1
|
+
{"version":3,"file":"driver__control.mjs","names":[],"sources":["../../../../3-mongo-target/3-mongo-driver/dist/control.mjs"],"sourcesContent":["import { r as DRIVER_INFO, t as MongoDriverImpl } from \"./mongo-driver-BtJ77prn.mjs\";\nimport { MongoClient } from \"mongodb\";\nimport { errorRuntime } from \"@internal/errors/execution\";\nimport { redactDatabaseUrl } from \"@internal/utils/redact-db-url\";\n//#region src/exports/control.ts\nvar MongoControlDriver = class extends MongoDriverImpl {\n\tfamilyId = \"mongo\";\n\ttargetId = \"mongo\";\n\tdb;\n\tconstructor(db, mongoClient) {\n\t\tsuper(db, mongoClient);\n\t\tthis.db = db;\n\t}\n\tasync databaseName() {\n\t\treturn this.db.databaseName;\n\t}\n};\nconst mongoControlDriverDescriptor = {\n\tkind: \"driver\",\n\tfamilyId: \"mongo\",\n\ttargetId: \"mongo\",\n\tid: \"mongo\",\n\tversion: DRIVER_INFO.version,\n\tcapabilities: {},\n\tasync create(url) {\n\t\tconst client = new MongoClient(url, {\n\t\t\tserverSelectionTimeoutMS: 5e3,\n\t\t\tconnectTimeoutMS: 5e3,\n\t\t\tdriverInfo: DRIVER_INFO\n\t\t});\n\t\ttry {\n\t\t\tawait client.connect();\n\t\t\treturn new MongoControlDriver(client.db(), client);\n\t\t} catch (error) {\n\t\t\ttry {\n\t\t\t\tawait client.close();\n\t\t\t} catch {}\n\t\t\tthrow errorRuntime(\"DRIVER.CONNECTION_FAILED\", \"Database connection failed\", {\n\t\t\t\twhy: error instanceof Error ? error.message : String(error),\n\t\t\t\tfix: \"Verify the MongoDB URL, ensure the database is reachable, and confirm credentials/permissions\",\n\t\t\t\tmeta: { ...redactDatabaseUrl(url) },\n\t\t\t\tcause: error\n\t\t\t});\n\t\t}\n\t}\n};\n//#endregion\nexport { MongoControlDriver, mongoControlDriverDescriptor as default };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;AAKA,IAAI,qBAAqB,cAAc,gBAAgB;CACtD,WAAW;CACX,WAAW;CACX;CACA,YAAY,IAAI,aAAa;EAC5B,MAAM,IAAI,WAAW;EACrB,KAAK,KAAK;CACX;CACA,MAAM,eAAe;EACpB,OAAO,KAAK,GAAG;CAChB;AACD;AACA,MAAM,+BAA+B;CACpC,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS,YAAY;CACrB,cAAc,CAAC;CACf,MAAM,OAAO,KAAK;EACjB,MAAM,SAAS,IAAI,YAAY,KAAK;GACnC,0BAA0B;GAC1B,kBAAkB;GAClB,YAAY;EACb,CAAC;EACD,IAAI;GACH,MAAM,OAAO,QAAQ;GACrB,OAAO,IAAI,mBAAmB,OAAO,GAAG,GAAG,MAAM;EAClD,SAAS,OAAO;GACf,IAAI;IACH,MAAM,OAAO,MAAM;GACpB,QAAQ,CAAC;GACT,MAAM,aAAa,4BAA4B,8BAA8B;IAC5E,KAAK,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;IAC1D,KAAK;IACL,MAAM,EAAE,GAAG,kBAAkB,GAAG,EAAE;IAClC,OAAO;GACR,CAAC;EACF;CACD;AACD"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { t as buildStandardCodecRegistry } from "./codecs-
|
|
1
|
+
import { t as buildStandardCodecRegistry } from "./codecs-DHo_Ei21-DHvEom71.mjs";
|
|
2
2
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
3
3
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
4
4
|
import { isStructuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
5
5
|
import { keysToKeySpec } from "@prisma/orm-family-mongo/query-ast/control";
|
|
6
|
-
import { InternalError, assertNever } from "@prisma/orm-framework/utils/internal-error";
|
|
6
|
+
import { InternalError, assertNever, isInternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
7
7
|
import { isExprArray, isRecordArgs } from "@prisma/orm-family-mongo/query-ast/execution";
|
|
8
8
|
import { MongoParamRef } from "@prisma/orm-family-mongo/value";
|
|
9
9
|
import { checkAborted, raceAgainstAbort, runtimeError } from "@prisma/orm-framework/components/runtime";
|
|
10
10
|
import { AggregateWireCommand, CollModWireCommand, CreateCollectionWireCommand, CreateIndexWireCommand, DeleteManyWireCommand, DeleteOneWireCommand, DropCollectionWireCommand, DropIndexWireCommand, FindOneAndDeleteWireCommand, FindOneAndUpdateWireCommand, InsertManyWireCommand, InsertOneWireCommand, UpdateManyWireCommand, UpdateOneWireCommand } from "@prisma/orm-family-mongo/wire";
|
|
11
|
-
//#region ../../../3-mongo-target/2-mongo-adapter/dist/mongo-adapter-
|
|
11
|
+
//#region ../../../3-mongo-target/2-mongo-adapter/dist/mongo-adapter-BW-kRaXm.mjs
|
|
12
12
|
/**
|
|
13
13
|
* A value the driver serializes as one BSON value rather than a document: a `Date`, `RegExp` or `Uint8Array`, or an instance of a `bson` class, recognised by its `_bsontype` tag because the driver's classes come from its own load of `bson`. A plain object carrying a `_bsontype` key is a stored subdocument, not a class.
|
|
14
14
|
*/
|
|
@@ -30,7 +30,8 @@ function isWireScalar(value) {
|
|
|
30
30
|
* (mirroring SQL's `wrapEncodeFailure` shape) with `{ label, codec }` details
|
|
31
31
|
* and the original error attached on `cause`. A structured envelope (any error
|
|
32
32
|
* with a dotted `code`, per `isStructuredError`) is re-thrown verbatim so
|
|
33
|
-
* codec-raised envelopes and nested resolvers don't get double-wrapped
|
|
33
|
+
* codec-raised envelopes and nested resolvers don't get double-wrapped, and
|
|
34
|
+
* so is an `InternalError`.
|
|
34
35
|
*
|
|
35
36
|
* `ctx: CodecCallContext` is forwarded verbatim to every
|
|
36
37
|
* `codec.encode(value, ctx)` call. The same `ctx` reference is also passed
|
|
@@ -110,9 +111,10 @@ function paramRefLabel(ref, codecId) {
|
|
|
110
111
|
return ref.name ?? codecId;
|
|
111
112
|
}
|
|
112
113
|
/**
|
|
113
|
-
* 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
|
|
114
|
+
* 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 and an `InternalError` pass through unchanged; everything else is wrapped in a `RUNTIME.ENCODE_FAILED` envelope. The original error is the `cause`.
|
|
114
115
|
*/
|
|
115
116
|
function wrapEncodeFailure(error, ref, codecId) {
|
|
117
|
+
if (isInternalError(error)) throw error;
|
|
116
118
|
const codecDetails = isStructuredError(error) ? error.meta : void 0;
|
|
117
119
|
if (isStructuredError(error) && error.code !== "RUNTIME.ENCODE_FAILED") throw error;
|
|
118
120
|
const label = paramRefLabel(ref, codecId);
|
|
@@ -819,4 +821,4 @@ function createMongoAdapter() {
|
|
|
819
821
|
//#endregion
|
|
820
822
|
export { lowerStage as a, lowerPipeline as i, lowerAggExpr as n, lowerFilter as r, createMongoAdapter as t };
|
|
821
823
|
|
|
822
|
-
//# sourceMappingURL=mongo-adapter-
|
|
824
|
+
//# sourceMappingURL=mongo-adapter-BW-kRaXm-C3Sw9U9G.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mongo-adapter-BW-kRaXm-C3Sw9U9G.mjs","names":["#codecs"],"sources":["../../../../3-mongo-target/2-mongo-adapter/dist/mongo-adapter-BW-kRaXm.mjs"],"sourcesContent":["import { isExprArray, isRecordArgs } from \"@internal/mongo-query-ast/execution\";\nimport { MongoParamRef } from \"@internal/mongo-value\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError, assertNever, isInternalError } from \"@internal/utils/internal-error\";\nimport { checkAborted, raceAgainstAbort, runtimeError } from \"@internal/framework-components/runtime\";\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* A value the driver serializes as one BSON value rather than a document: a `Date`, `RegExp` or `Uint8Array`, or an instance of a `bson` class, recognised by its `_bsontype` tag because the driver's classes come from its own load of `bson`. A plain object carrying a `_bsontype` key is a stored subdocument, not a class.\n*/\nfunction isWireScalar(value) {\n\tif (value instanceof Date || value instanceof RegExp || value instanceof Uint8Array) return true;\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype !== Object.prototype && prototype !== null && typeof Reflect.get(value, \"_bsontype\") === \"string\";\n}\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, and\n* so is an `InternalError`.\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\" || isWireScalar(value)) 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\" || isWireScalar(value)) 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 and an `InternalError` pass 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\tif (isInternalError(error)) throw error;\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 (value instanceof MongoParamRef) return true;\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-BW-kRaXm.mjs.map"],"mappings":";;;;;;;;;;;;;;AAcA,SAAS,aAAa,OAAO;CAC5B,IAAI,iBAAiB,QAAQ,iBAAiB,UAAU,iBAAiB,YAAY,OAAO;CAC5F,MAAM,YAAY,OAAO,eAAe,KAAK;CAC7C,OAAO,cAAc,OAAO,aAAa,cAAc,QAAQ,OAAO,QAAQ,IAAI,OAAO,WAAW,MAAM;AAC3G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,eAAe,aAAa,OAAO,QAAQ,KAAK;CAC/C,aAAa,KAAK,QAAQ;C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AAgB,OAAO,IAAI,qBAAqB,MAAM,YAAY,MAAM,MAAM;GACnF,KAAK,iBAAiB,OAAO,IAAI,sBAAsB,MAAM,YAAY,MAAM,MAAM;GACrF,KAAK,uBAAuB,OAAO,IAAI,4BAA4B,MAAM,YAAY,MAAM,QAAQ,MAAM,QAAQ,MAAM,QAAQ,MAAM,MAAM,MAAM,cAAc;GAC/J,KAAK,uBAAuB,OAAO,IAAI,4BAA4B,MAAM,YAAY,MAAM,QAAQ,MAAM,IAAI;;GAE7G,SAAS;IACR,MAAM,cAAc;IACpB,OAAO,YAAY,aAAa,uBAAuB,UAAU,WAAW,CAAC,CAAC,MAAM;GACrF;EACD;CACD;CACA,MAAM,MAAM,KAAK;EAChB,IAAI,gBAAgB,MAAM,OAAO,KAAK,cAAc,KAAK,gBAAgB,IAAI,GAAG,GAAG;EACnF,OAAO,QAAQ,QAAQ,gBAAgB,KAAK,OAAO,CAAC;CACrD;AACD;;;;;;;;;;AAUA,SAAS,qBAAqB;CAC7B,OAAO,IAAI,iBAAiB,2BAA2B,CAAC;AACzD"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { assertNever } from "@prisma/orm-framework/utils/internal-error";
|
|
2
2
|
import { BSON, MongoClient } from "mongodb";
|
|
3
|
-
//#region ../../../3-mongo-target/3-mongo-driver/dist/mongo-driver-
|
|
3
|
+
//#region ../../../3-mongo-target/3-mongo-driver/dist/mongo-driver-BtJ77prn.mjs
|
|
4
4
|
const DRIVER_INFO = {
|
|
5
5
|
name: "Prisma",
|
|
6
|
-
version: "8.0.0-rc.14-dev.
|
|
6
|
+
version: "8.0.0-rc.14-dev.7"
|
|
7
7
|
};
|
|
8
8
|
/* v8 ignore start */
|
|
9
9
|
function unreachableKind(value) {
|
|
@@ -177,4 +177,4 @@ async function createMongoDriver(uri, dbName) {
|
|
|
177
177
|
//#endregion
|
|
178
178
|
export { MongoDriverImpl as n, createMongoDriver as r, DRIVER_INFO as t };
|
|
179
179
|
|
|
180
|
-
//# sourceMappingURL=mongo-driver-
|
|
180
|
+
//# sourceMappingURL=mongo-driver-BtJ77prn-CI3a8jYk.mjs.map
|
package/dist/{mongo-driver-CPIxAKDF-Bk-Rv8on.mjs.map → mongo-driver-BtJ77prn-CI3a8jYk.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mongo-driver-CPIxAKDF-Bk-Rv8on.mjs","names":[],"sources":["../../../../3-mongo-target/3-mongo-driver/dist/mongo-driver-CPIxAKDF.mjs"],"sourcesContent":["import { assertNever } from \"@internal/utils/internal-error\";\nimport { BSON, MongoClient } from \"mongodb\";\n//#endregion\n//#region src/core/driver-info.ts\nconst DRIVER_INFO = {\n\tname: \"Prisma\",\n\tversion: \"8.0.0-rc.14-dev.5\"\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\tconst result = await this.db.collection(cmd.collection).insertOne(cmd.document);\n\t\tyield {\n\t\t\tinsertedId: result.insertedId,\n\t\t\tdocument: this.asRead({\n\t\t\t\t_id: result.insertedId,\n\t\t\t\t...cmd.document\n\t\t\t})\n\t\t};\n\t}\n\t/**\n\t* The server stores an inserted document as the driver wrote it, apart from moving `_id` first, so writing it to BSON and reading it back with the client's options gives what a read returns, without a query.\n\t*/\n\tasRead(document) {\n\t\tconst { raw: _raw, ...options } = this.db.bsonOptions;\n\t\treturn BSON.deserialize(BSON.serialize(document, options), options);\n\t}\n\tasync *executeUpdateOneCommand(cmd) {\n\t\tconst result = await this.db.collection(cmd.collection).updateOne(cmd.filter, cmd.update, { upsert: cmd.upsert });\n\t\tyield {\n\t\t\tmatchedCount: result.matchedCount,\n\t\t\tmodifiedCount: result.modifiedCount,\n\t\t\tupsertedCount: result.upsertedCount,\n\t\t\tupsertedId: result.upsertedId ?? void 0\n\t\t};\n\t}\n\tasync *executeInsertManyCommand(cmd) {\n\t\tconst result = await this.db.collection(cmd.collection).insertMany(cmd.documents);\n\t\tconst insertedIds = Object.values(result.insertedIds);\n\t\tyield {\n\t\t\tinsertedIds,\n\t\t\tinsertedCount: result.insertedCount,\n\t\t\tdocuments: cmd.documents.map((document, index) => this.asRead({\n\t\t\t\t_id: insertedIds[index],\n\t\t\t\t...document\n\t\t\t}))\n\t\t};\n\t}\n\tasync *executeUpdateManyCommand(cmd) {\n\t\tconst result = await this.db.collection(cmd.collection).updateMany(cmd.filter, cmd.update, { 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-CPIxAKDF.mjs.map"],"mappings":";;;AAIA,MAAM,cAAc;CACnB,MAAM;CACN,SAAS;AACV;;AAIA,SAAS,gBAAgB,OAAO;CAC/B,MAAM,YAAY;CAClB,IAAI,OAAO,cAAc,YAAY,cAAc,QAAQ,UAAU,aAAa,OAAO,UAAU,SAAS,UAAU,OAAO,UAAU;CACvI,OAAO;AACR;;AAEA,IAAI,kBAAkB,MAAM,gBAAgB;CAC3C;CACA;CACA,YAAY,IAAI,QAAQ;EACvB,KAAK,KAAK;EACV,KAAK,SAAS;CACf;CACA,aAAa,eAAe,KAAK,QAAQ;EACxC,MAAM,SAAS,IAAI,YAAY,KAAK,EAAE,YAAY,YAAY,CAAC;EAC/D,MAAM,OAAO,QAAQ;EACrB,OAAO,IAAI,gBAAgB,OAAO,GAAG,MAAM,GAAG,MAAM;CACrD;CACA,OAAO,OAAO,IAAI;EACjB,OAAO,IAAI,gBAAgB,IAAI,KAAK,CAAC;CACtC;CACA,QAAQ,aAAa;EACpB,QAAQ,YAAY,MAApB;GACC,KAAK,aAAa,OAAO,KAAK,wBAAwB,WAAW;GACjE,KAAK,aAAa,OAAO,KAAK,wBAAwB,WAAW;GACjE,KAAK,cAAc,OAAO,KAAK,yBAAyB,WAAW;GACnE,KAAK,cAAc,OAAO,KAAK,yBAAyB,WAAW;GACnE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eAAe,kBAAkB,KAAK,QAAQ;CAC7C,OAAO,gBAAgB,eAAe,KAAK,MAAM;AAClD"}
|
|
1
|
+
{"version":3,"file":"mongo-driver-BtJ77prn-CI3a8jYk.mjs","names":[],"sources":["../../../../3-mongo-target/3-mongo-driver/dist/mongo-driver-BtJ77prn.mjs"],"sourcesContent":["import { assertNever } from \"@internal/utils/internal-error\";\nimport { BSON, MongoClient } from \"mongodb\";\n//#endregion\n//#region src/core/driver-info.ts\nconst DRIVER_INFO = {\n\tname: \"Prisma\",\n\tversion: \"8.0.0-rc.14-dev.7\"\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\tconst result = await this.db.collection(cmd.collection).insertOne(cmd.document);\n\t\tyield {\n\t\t\tinsertedId: result.insertedId,\n\t\t\tdocument: this.asRead({\n\t\t\t\t_id: result.insertedId,\n\t\t\t\t...cmd.document\n\t\t\t})\n\t\t};\n\t}\n\t/**\n\t* The server stores an inserted document as the driver wrote it, apart from moving `_id` first, so writing it to BSON and reading it back with the client's options gives what a read returns, without a query.\n\t*/\n\tasRead(document) {\n\t\tconst { raw: _raw, ...options } = this.db.bsonOptions;\n\t\treturn BSON.deserialize(BSON.serialize(document, options), options);\n\t}\n\tasync *executeUpdateOneCommand(cmd) {\n\t\tconst result = await this.db.collection(cmd.collection).updateOne(cmd.filter, cmd.update, { upsert: cmd.upsert });\n\t\tyield {\n\t\t\tmatchedCount: result.matchedCount,\n\t\t\tmodifiedCount: result.modifiedCount,\n\t\t\tupsertedCount: result.upsertedCount,\n\t\t\tupsertedId: result.upsertedId ?? void 0\n\t\t};\n\t}\n\tasync *executeInsertManyCommand(cmd) {\n\t\tconst result = await this.db.collection(cmd.collection).insertMany(cmd.documents);\n\t\tconst insertedIds = Object.values(result.insertedIds);\n\t\tyield {\n\t\t\tinsertedIds,\n\t\t\tinsertedCount: result.insertedCount,\n\t\t\tdocuments: cmd.documents.map((document, index) => this.asRead({\n\t\t\t\t_id: insertedIds[index],\n\t\t\t\t...document\n\t\t\t}))\n\t\t};\n\t}\n\tasync *executeUpdateManyCommand(cmd) {\n\t\tconst result = await this.db.collection(cmd.collection).updateMany(cmd.filter, cmd.update, { 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-BtJ77prn.mjs.map"],"mappings":";;;AAIA,MAAM,cAAc;CACnB,MAAM;CACN,SAAS;AACV;;AAIA,SAAS,gBAAgB,OAAO;CAC/B,MAAM,YAAY;CAClB,IAAI,OAAO,cAAc,YAAY,cAAc,QAAQ,UAAU,aAAa,OAAO,UAAU,SAAS,UAAU,OAAO,UAAU;CACvI,OAAO;AACR;;AAEA,IAAI,kBAAkB,MAAM,gBAAgB;CAC3C;CACA;CACA,YAAY,IAAI,QAAQ;EACvB,KAAK,KAAK;EACV,KAAK,SAAS;CACf;CACA,aAAa,eAAe,KAAK,QAAQ;EACxC,MAAM,SAAS,IAAI,YAAY,KAAK,EAAE,YAAY,YAAY,CAAC;EAC/D,MAAM,OAAO,QAAQ;EACrB,OAAO,IAAI,gBAAgB,OAAO,GAAG,MAAM,GAAG,MAAM;CACrD;CACA,OAAO,OAAO,IAAI;EACjB,OAAO,IAAI,gBAAgB,IAAI,KAAK,CAAC;CACtC;CACA,QAAQ,aAAa;EACpB,QAAQ,YAAY,MAApB;GACC,KAAK,aAAa,OAAO,KAAK,wBAAwB,WAAW;GACjE,KAAK,aAAa,OAAO,KAAK,wBAAwB,WAAW;GACjE,KAAK,cAAc,OAAO,KAAK,yBAAyB,WAAW;GACnE,KAAK,cAAc,OAAO,KAAK,yBAAyB,WAAW;GACnE,KAAK,aAAa,OAAO,KAAK,wBAAwB,WAAW;GACjE,KAAK,cAAc,OAAO,KAAK,yBAAyB,WAAW;GACnE,KAAK,oBAAoB,OAAO,KAAK,+BAA+B,W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ECIMAL128_CODEC_ID, c as MONGO_INT64_CODEC_ID, d as MONGO_OBJECTID_CODEC_ID, f as MONGO_STRING_CODEC_ID, i as MONGO_DATE_CODEC_ID, l as MONGO_INT64_NUMBER_CODEC_ID, n as MONGO_BOOLEAN_CODEC_ID, o as MONGO_DOUBLE_CODEC_ID, s as MONGO_INT32_CODEC_ID, t as MONGO_BINARY_CODEC_ID, u as MONGO_JSON_CODEC_ID } from "./codec-ids-WdrumsYA-BkQfspmL.mjs";
|
|
2
|
-
import { t as mongoTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-
|
|
2
|
+
import { t as mongoTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-DAabvKNm-CXYTUnQP.mjs";
|
|
3
3
|
import { TIMESTAMP_NOW_GENERATOR_ID } from "@prisma/orm-framework/components/authoring";
|
|
4
4
|
//#region ../../../3-mongo-target/1-mongo-target/dist/prisma6-binding.mjs
|
|
5
5
|
/**
|
|
@@ -44,4 +44,4 @@ const prisma6MongoBinding = {
|
|
|
44
44
|
//#endregion
|
|
45
45
|
export { prisma6MongoBinding as t };
|
|
46
46
|
|
|
47
|
-
//# sourceMappingURL=prisma6-binding-
|
|
47
|
+
//# sourceMappingURL=prisma6-binding-CzV_iWP8.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prisma6-binding-
|
|
1
|
+
{"version":3,"file":"prisma6-binding-CzV_iWP8.mjs","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/prisma6-binding.mjs"],"sourcesContent":["import { a as MONGO_DECIMAL128_CODEC_ID, c as MONGO_INT64_CODEC_ID, d as MONGO_OBJECTID_CODEC_ID, f as MONGO_STRING_CODEC_ID, i as MONGO_DATE_CODEC_ID, l as MONGO_INT64_NUMBER_CODEC_ID, n as MONGO_BOOLEAN_CODEC_ID, o as MONGO_DOUBLE_CODEC_ID, s as MONGO_INT32_CODEC_ID, t as MONGO_BINARY_CODEC_ID, u as MONGO_JSON_CODEC_ID } from \"./codec-ids-WdrumsYA.mjs\";\nimport { t as mongoTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-DAabvKNm.mjs\";\nimport { TIMESTAMP_NOW_GENERATOR_ID } from \"@internal/framework-components/authoring\";\n/**\n* What the Mongo target supplies to the Prisma 6 schema reader: the datasource provider it reads, the codec each Prisma 6 scalar and native type maps to, the codec an `@id` must have, and the generator `now()` and `@updatedAt` lower to. Each codec is the one for the BSON type Prisma 6 stores (ADR 257), with the application type the Prisma 6 client presents: a plain `Int` is a BSON long read as a `number`.\n*/\nconst prisma6MongoBinding = {\n\ttarget: mongoTargetDescriptorMetaRuntime,\n\tproviders: [\"mongodb\"],\n\tscalarCodecIds: {\n\t\tString: MONGO_STRING_CODEC_ID,\n\t\tInt: MONGO_INT64_NUMBER_CODEC_ID,\n\t\tFloat: MONGO_DOUBLE_CODEC_ID,\n\t\tBoolean: MONGO_BOOLEAN_CODEC_ID,\n\t\tDateTime: MONGO_DATE_CODEC_ID,\n\t\tBigInt: MONGO_INT64_CODEC_ID,\n\t\tDecimal: MONGO_DECIMAL128_CODEC_ID,\n\t\tBytes: MONGO_BINARY_CODEC_ID,\n\t\tJson: MONGO_JSON_CODEC_ID\n\t},\n\tnativeTypeCodecIds: {\n\t\tString: {\n\t\t\t\"db.String\": MONGO_STRING_CODEC_ID,\n\t\t\t\"db.ObjectId\": MONGO_OBJECTID_CODEC_ID\n\t\t},\n\t\tBoolean: { \"db.Bool\": MONGO_BOOLEAN_CODEC_ID },\n\t\tInt: {\n\t\t\t\"db.Int\": MONGO_INT32_CODEC_ID,\n\t\t\t\"db.Long\": MONGO_INT64_NUMBER_CODEC_ID\n\t\t},\n\t\tBigInt: { \"db.Long\": MONGO_INT64_CODEC_ID },\n\t\tFloat: { \"db.Double\": MONGO_DOUBLE_CODEC_ID },\n\t\tDateTime: { \"db.Date\": MONGO_DATE_CODEC_ID },\n\t\tBytes: {\n\t\t\t\"db.BinData\": MONGO_BINARY_CODEC_ID,\n\t\t\t\"db.ObjectId\": MONGO_OBJECTID_CODEC_ID\n\t\t},\n\t\tJson: { \"db.Json\": MONGO_JSON_CODEC_ID }\n\t},\n\tobjectIdCodecId: MONGO_OBJECTID_CODEC_ID,\n\ttimestampGeneratorId: TIMESTAMP_NOW_GENERATOR_ID\n};\n//#endregion\nexport { prisma6MongoBinding };\n\n//# sourceMappingURL=prisma6-binding.mjs.map"],"mappings":";;;;;;;AAMA,MAAM,sBAAsB;CAC3B,QAAQ;CACR,WAAW,CAAC,SAAS;CACrB,gBAAgB;EACf,QAAQ;EACR,KAAK;EACL,OAAO;EACP,SAAS;EACT,UAAU;EACV,QAAQ;EACR,SAAS;EACT,OAAO;EACP,MAAM;CACP;CACA,oBAAoB;EACnB,QAAQ;GACP,aAAa;GACb,eAAe;EAChB;EACA,SAAS,EAAE,WAAW,uBAAuB;EAC7C,KAAK;GACJ,UAAU;GACV,WAAW;EACZ;EACA,QAAQ,EAAE,WAAW,qBAAqB;EAC1C,OAAO,EAAE,aAAa,sBAAsB;EAC5C,UAAU,EAAE,WAAW,oBAAoB;EAC3C,OAAO;GACN,cAAc;GACd,eAAe;EAChB;EACA,MAAM,EAAE,WAAW,oBAAoB;CACxC;CACA,iBAAiB;CACjB,sBAAsB;AACvB"}
|
package/dist/target.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as MONGO_DECIMAL128_CODEC_ID, c as MONGO_INT64_CODEC_ID, d as MONGO_OBJECTID_CODEC_ID, f as MONGO_STRING_CODEC_ID, i as MONGO_DATE_CODEC_ID, l as MONGO_INT64_NUMBER_CODEC_ID, n as MONGO_BOOLEAN_CODEC_ID, o as MONGO_DOUBLE_CODEC_ID, p as MONGO_VECTOR_CODEC_ID, r as MONGO_BSON_CODEC_ID, s as MONGO_INT32_CODEC_ID, t as MONGO_BINARY_CODEC_ID, u as MONGO_JSON_CODEC_ID } from "./codec-ids-WdrumsYA-BkQfspmL.mjs";
|
|
2
2
|
import { a as mongoDate, c as mongoInt32, d as mongoObjectId, f as mongoString, i as mongoDataTypes, l as mongoInt64, n as mongoBool, o as mongoDecimal128, p as mongoVector, r as mongoBson, s as mongoDouble, t as mongoBinary, u as mongoJson } from "./data-types-qKwvSozp-De9Y09D3.mjs";
|
|
3
|
-
import { i as mongoStandardCodecs, n as mongoCodecDescriptors, r as mongoDescriptorById, t as buildStandardCodecRegistry } from "./codecs-
|
|
3
|
+
import { i as mongoStandardCodecs, n as mongoCodecDescriptors, r as mongoDescriptorById, t as buildStandardCodecRegistry } from "./codecs-DHo_Ei21-DHvEom71.mjs";
|
|
4
4
|
import { a as dropCollection, c as validatedCollection, i as dataTransform, n as createCollection, o as dropIndex, r as createIndex, s as setValidation, t as collMod } from "./migration-factories-D9gdxskt-B01b9zbg.mjs";
|
|
5
|
-
import { _ as renderCallsToTypeScript, a as DropIndexCall, b as schemaIndexToCreateIndexOptions, c as MongoMigrationRunner, d as MongoTargetSchemaVerifier, f as MongoTargetUnboundDatabase, g as mongoTargetDescriptor, h as deserializeMongoOps, i as DropCollectionCall, l as MongoTargetContractSerializer, m as deserializeMongoOp, n as CreateCollectionCall, o as FilterEvaluator, p as PlannerProducedMongoMigration, r as CreateIndexCall, s as MongoMigrationPlanner, t as CollModCall, u as MongoTargetDatabase, v as renderOps, x as serializeMongoOps, y as schemaCollectionToCreateCollectionOptions } from "./control-
|
|
5
|
+
import { _ as renderCallsToTypeScript, a as DropIndexCall, b as schemaIndexToCreateIndexOptions, c as MongoMigrationRunner, d as MongoTargetSchemaVerifier, f as MongoTargetUnboundDatabase, g as mongoTargetDescriptor, h as deserializeMongoOps, i as DropCollectionCall, l as MongoTargetContractSerializer, m as deserializeMongoOp, n as CreateCollectionCall, o as FilterEvaluator, p as PlannerProducedMongoMigration, r as CreateIndexCall, s as MongoMigrationPlanner, t as CollModCall, u as MongoTargetDatabase, v as renderOps, x as serializeMongoOps, y as schemaCollectionToCreateCollectionOptions } from "./control-SXftFB8z.mjs";
|
|
6
6
|
import { n as MigrationCLI, r as placeholder, t as Migration } from "./migration-C-jfTsGU.mjs";
|
|
7
|
-
import { t as prisma6MongoBinding } from "./prisma6-binding-
|
|
7
|
+
import { t as prisma6MongoBinding } from "./prisma6-binding-CzV_iWP8.mjs";
|
|
8
8
|
export { CollModCall, CreateCollectionCall, CreateIndexCall, DropCollectionCall, DropIndexCall, FilterEvaluator, MONGO_BINARY_CODEC_ID, MONGO_BOOLEAN_CODEC_ID, MONGO_BSON_CODEC_ID, MONGO_DATE_CODEC_ID, MONGO_DECIMAL128_CODEC_ID, MONGO_DOUBLE_CODEC_ID, MONGO_INT32_CODEC_ID, MONGO_INT64_CODEC_ID, MONGO_INT64_NUMBER_CODEC_ID, MONGO_JSON_CODEC_ID, MONGO_OBJECTID_CODEC_ID, MONGO_STRING_CODEC_ID, MONGO_VECTOR_CODEC_ID, Migration, MigrationCLI, MongoMigrationPlanner, MongoMigrationRunner, MongoTargetContractSerializer, MongoTargetDatabase, MongoTargetSchemaVerifier, MongoTargetUnboundDatabase, PlannerProducedMongoMigration, buildStandardCodecRegistry, collMod, createCollection, createIndex, dataTransform, deserializeMongoOp, deserializeMongoOps, dropCollection, dropIndex, mongoBinary, mongoBool, mongoBson, mongoCodecDescriptors, mongoDataTypes, mongoDate, mongoDecimal128, mongoDescriptorById, mongoDouble, mongoInt32, mongoInt64, mongoJson, mongoObjectId, mongoStandardCodecs, mongoString, mongoTargetDescriptor, mongoVector, placeholder, prisma6MongoBinding, renderCallsToTypeScript, renderOps, schemaCollectionToCreateCollectionOptions, schemaIndexToCreateIndexOptions, serializeMongoOps, setValidation, validatedCollection };
|
package/dist/target__codecs.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as mongoStandardCodecs, n as mongoCodecDescriptors, r as mongoDescriptorById, t as buildStandardCodecRegistry } from "./codecs-
|
|
1
|
+
import { i as mongoStandardCodecs, n as mongoCodecDescriptors, r as mongoDescriptorById, t as buildStandardCodecRegistry } from "./codecs-DHo_Ei21-DHvEom71.mjs";
|
|
2
2
|
export { buildStandardCodecRegistry, mongoCodecDescriptors, mongoDescriptorById, mongoStandardCodecs };
|
package/dist/target__control.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as renderCallsToTypeScript, a as DropIndexCall, b as schemaIndexToCreateIndexOptions, c as MongoMigrationRunner, d as MongoTargetSchemaVerifier, f as MongoTargetUnboundDatabase, g as mongoTargetDescriptor, h as deserializeMongoOps, i as DropCollectionCall, l as MongoTargetContractSerializer, m as deserializeMongoOp, n as CreateCollectionCall, o as FilterEvaluator, p as PlannerProducedMongoMigration, r as CreateIndexCall, s as MongoMigrationPlanner, t as CollModCall, u as MongoTargetDatabase, v as renderOps, x as serializeMongoOps, y as schemaCollectionToCreateCollectionOptions } from "./control-
|
|
1
|
+
import { _ as renderCallsToTypeScript, a as DropIndexCall, b as schemaIndexToCreateIndexOptions, c as MongoMigrationRunner, d as MongoTargetSchemaVerifier, f as MongoTargetUnboundDatabase, g as mongoTargetDescriptor, h as deserializeMongoOps, i as DropCollectionCall, l as MongoTargetContractSerializer, m as deserializeMongoOp, n as CreateCollectionCall, o as FilterEvaluator, p as PlannerProducedMongoMigration, r as CreateIndexCall, s as MongoMigrationPlanner, t as CollModCall, u as MongoTargetDatabase, v as renderOps, x as serializeMongoOps, y as schemaCollectionToCreateCollectionOptions } from "./control-SXftFB8z.mjs";
|
|
2
2
|
export { CollModCall, CreateCollectionCall, CreateIndexCall, DropCollectionCall, DropIndexCall, FilterEvaluator, MongoMigrationPlanner, MongoMigrationRunner, MongoTargetContractSerializer, MongoTargetDatabase, MongoTargetSchemaVerifier, MongoTargetUnboundDatabase, PlannerProducedMongoMigration, deserializeMongoOp, deserializeMongoOps, mongoTargetDescriptor, renderCallsToTypeScript, renderOps, schemaCollectionToCreateCollectionOptions, schemaIndexToCreateIndexOptions, serializeMongoOps };
|
package/dist/target__pack.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as mongoTargetDescriptorMeta } from "./descriptor-meta-
|
|
1
|
+
import { t as mongoTargetDescriptorMeta } from "./descriptor-meta-DqlqWWFC-ei2sStOs.mjs";
|
|
2
2
|
//#region ../../../3-mongo-target/1-mongo-target/dist/pack.mjs
|
|
3
3
|
const mongoTargetPack = mongoTargetDescriptorMeta;
|
|
4
4
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"target__pack.mjs","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/pack.mjs"],"sourcesContent":["import { t as mongoTargetDescriptorMeta } from \"./descriptor-meta-
|
|
1
|
+
{"version":3,"file":"target__pack.mjs","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/pack.mjs"],"sourcesContent":["import { t as mongoTargetDescriptorMeta } from \"./descriptor-meta-DqlqWWFC.mjs\";\n//#region src/exports/pack.ts\nconst mongoTargetPack = mongoTargetDescriptorMeta;\n//#endregion\nexport { mongoTargetPack as default };\n\n//# sourceMappingURL=pack.mjs.map"],"mappings":";;AAEA,MAAM,kBAAkB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as prisma6MongoBinding } from "./prisma6-binding-
|
|
1
|
+
import { t as prisma6MongoBinding } from "./prisma6-binding-CzV_iWP8.mjs";
|
|
2
2
|
export { prisma6MongoBinding };
|
package/dist/target__runtime.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as mongoTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-
|
|
1
|
+
import { t as mongoTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-DAabvKNm-CXYTUnQP.mjs";
|
|
2
2
|
import { newMongoCodecRegistry } from "@prisma/orm-family-mongo/codec";
|
|
3
3
|
//#region ../../../3-mongo-target/1-mongo-target/dist/runtime.mjs
|
|
4
4
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"target__runtime.mjs","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/runtime.mjs"],"sourcesContent":["import { t as mongoTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-
|
|
1
|
+
{"version":3,"file":"target__runtime.mjs","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/runtime.mjs"],"sourcesContent":["import { t as mongoTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-DAabvKNm.mjs\";\nimport { newMongoCodecRegistry } from \"@internal/mongo-codec\";\n//#region src/exports/runtime.ts\n/**\n* Target-mongo deliberately does NOT import `MongoRuntimeTargetDescriptor` from `@internal/mongo-runtime`. The target package is a control-plane residence and must not pull the Mongo execution-plane package into its dependency closure. The runtime descriptor here is shaped to satisfy the framework's `RuntimeTargetDescriptor` plus the structural `MongoStaticContributions` (`codecs`) that `@internal/mongo-runtime`\n* consumers narrow to at composition time.\n*/\nconst mongoRuntimeTargetDescriptor = {\n\t...mongoTargetDescriptorMetaRuntime,\n\tcodecs: () => newMongoCodecRegistry(),\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"mongo\",\n\t\t\ttargetId: \"mongo\"\n\t\t};\n\t}\n};\n//#endregion\nexport { mongoRuntimeTargetDescriptor as default };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;AAOA,MAAM,+BAA+B;CACpC,GAAG;CACH,cAAc,sBAAsB;CACpC,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;AACD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-target-mongo",
|
|
3
|
-
"version": "8.0.0-rc.14-dev.
|
|
3
|
+
"version": "8.0.0-rc.14-dev.7",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -9,18 +9,18 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@prisma/orm-family-mongo": "8.0.0-rc.14-dev.
|
|
13
|
-
"@prisma/orm-framework": "8.0.0-rc.14-dev.
|
|
14
|
-
"@prisma/orm-toolchain": "8.0.0-rc.14-dev.
|
|
12
|
+
"@prisma/orm-family-mongo": "8.0.0-rc.14-dev.7",
|
|
13
|
+
"@prisma/orm-framework": "8.0.0-rc.14-dev.7",
|
|
14
|
+
"@prisma/orm-toolchain": "8.0.0-rc.14-dev.7",
|
|
15
15
|
"arktype": "^2.2.2",
|
|
16
16
|
"bson": "^7.2.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@internal/adapter-mongo": "8.0.0-rc.14-dev.
|
|
20
|
-
"@internal/driver-mongo": "8.0.0-rc.14-dev.
|
|
21
|
-
"@internal/target-mongo": "8.0.0-rc.14-dev.
|
|
22
|
-
"@repo/tsconfig": "8.0.0-rc.14-dev.
|
|
23
|
-
"@repo/tsdown": "8.0.0-rc.14-dev.
|
|
19
|
+
"@internal/adapter-mongo": "8.0.0-rc.14-dev.7",
|
|
20
|
+
"@internal/driver-mongo": "8.0.0-rc.14-dev.7",
|
|
21
|
+
"@internal/target-mongo": "8.0.0-rc.14-dev.7",
|
|
22
|
+
"@repo/tsconfig": "8.0.0-rc.14-dev.7",
|
|
23
|
+
"@repo/tsdown": "8.0.0-rc.14-dev.7",
|
|
24
24
|
"tsdown": "0.22.14",
|
|
25
25
|
"typescript": "5.9.3"
|
|
26
26
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codecs-Dt4Q55gF-DDdyWx8-.mjs","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/codecs-Dt4Q55gF.mjs"],"sourcesContent":["import { a as MONGO_DECIMAL128_CODEC_ID, c as MONGO_INT64_CODEC_ID, d as MONGO_OBJECTID_CODEC_ID, f as MONGO_STRING_CODEC_ID, i as MONGO_DATE_CODEC_ID, l as MONGO_INT64_NUMBER_CODEC_ID, n as MONGO_BOOLEAN_CODEC_ID, o as MONGO_DOUBLE_CODEC_ID, p as MONGO_VECTOR_CODEC_ID, r as MONGO_BSON_CODEC_ID, s as MONGO_INT32_CODEC_ID, t as MONGO_BINARY_CODEC_ID, u as MONGO_JSON_CODEC_ID } from \"./codec-ids-WdrumsYA.mjs\";\nimport { a as mongoDate, c as mongoInt32, d as mongoObjectId, f as mongoString, l as mongoInt64, n as mongoBool, o as mongoDecimal128, p as mongoVector, r as mongoBson, s as mongoDouble, t as mongoBinary, u as mongoJson } from \"./data-types-qKwvSozp.mjs\";\nimport { renderTsLiteral } from \"@internal/framework-components/codec\";\nimport { mongoCodec, newMongoCodecRegistry } from \"@internal/mongo-codec\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { Binary, Code, Decimal128, Double, EJSON, Long, MinKey, ObjectId } from \"bson\";\nimport { structuredError } from \"@internal/utils/structured-error\";\n//#region src/core/bson-walk.ts\nfunction where(path) {\n\treturn path === \"\" ? \"the root\" : path;\n}\nfunction child(path, key) {\n\treturn path === \"\" ? String(key) : `${path}.${key}`;\n}\nfunction isPlainObject(value) {\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === Object.prototype || prototype === null;\n}\nfunction isPlainArray(value) {\n\treturn Array.isArray(value) && Object.getPrototypeOf(value) === Array.prototype;\n}\nconst BSON_VERSION = Symbol.for(\"@@mdb.bson.version\");\n/** The major version of the `bson` this package loads, which every `bson` class instance it can serialise carries. */\nconst BSON_MAJOR = Reflect.get(new MinKey(), BSON_VERSION);\n/** Whether a `bson` class instance comes from the same major version of `bson`, rather than being a look-alike or from another version. */\nfunction createdByBsonMajor(value) {\n\treturn Reflect.get(value, BSON_VERSION) === BSON_MAJOR;\n}\nfunction bsonTypeTag(value) {\n\tconst tag = Reflect.get(value, \"_bsontype\");\n\treturn typeof tag === \"string\" ? tag : void 0;\n}\n/**\n* The `_bsontype` tag of a `bson` class instance. A stored subdocument is read as a plain object even when it has a `_bsontype` key, so a plain object has no tag.\n*/\nfunction bsonClassTag(value) {\n\treturn isPlainObject(value) ? void 0 : bsonTypeTag(value);\n}\nfunction constructorName(value) {\n\tconst name = Reflect.get(value, \"constructor\")?.name;\n\treturn typeof name === \"string\" && name !== \"\" ? name : \"object\";\n}\n/**\n* The `bson` library reads any subdocument with a string `$ref` and an `$id` as a `DBRef`. It was stored as a plain object; these are its entries in stored order, `$ref`, `$id`, `$db` when present, then the other fields.\n*/\nfunction dbRefEntries(value) {\n\tconst ref = blindCast(value);\n\tconst entries = [[\"$ref\", ref.collection], [\"$id\", ref.oid]];\n\tif (ref.db !== void 0) entries.push([\"$db\", ref.db]);\n\tentries.push(...Object.entries(ref.fields));\n\treturn entries;\n}\n//#endregion\n//#region src/core/mongo-target-errors.ts\nfunction mongoTargetError(code, message, options) {\n\treturn structuredError(code, message, options);\n}\n//#endregion\n//#region src/core/bson-codec-helpers.ts\nconst BSON_VALUE_TAGS = /* @__PURE__ */ new Set([\n\t\"ObjectId\",\n\t\"Long\",\n\t\"Decimal128\",\n\t\"Binary\",\n\t\"BSONRegExp\",\n\t\"Timestamp\",\n\t\"Int32\",\n\t\"Double\",\n\t\"Code\",\n\t\"MinKey\",\n\t\"MaxKey\",\n\t\"BSONSymbol\"\n]);\nconst ENCODE_FIX_BY_RECEIVED$1 = { DBRef: \"Write it as a { $ref, $id } document instead.\" };\nfunction encodeRefused$1(received, path) {\n\tconst fix = ENCODE_FIX_BY_RECEIVED$1[received];\n\tthrow mongoTargetError(\"RUNTIME.ENCODE_FAILED\", `${MONGO_BSON_CODEC_ID} value must be a BSON value; received ${received} at ${where(path)}${fix === void 0 ? \"\" : `. ${fix}`}`, { meta: {\n\t\tcodecId: MONGO_BSON_CODEC_ID,\n\t\treceived,\n\t\tvaluePath: path\n\t} });\n}\nfunction assertBsonValue(value, path, ancestors) {\n\tif (value === null || typeof value === \"string\" || typeof value === \"boolean\" || typeof value === \"number\") return;\n\tif (typeof value !== \"object\") {\n\t\tencodeRefused$1(typeof value, path);\n\t\treturn;\n\t}\n\tconst tag = bsonTypeTag(value);\n\tif (tag !== void 0) {\n\t\tif (!BSON_VALUE_TAGS.has(tag)) encodeRefused$1(tag, path);\n\t\tif (!createdByBsonMajor(value)) encodeRefused$1(`${tag} not created by bson ${String(BSON_MAJOR)}`, path);\n\t\treturn;\n\t}\n\tif (value instanceof Date || value instanceof RegExp || value instanceof Uint8Array) return;\n\tif (!isPlainArray(value) && !isPlainObject(value)) {\n\t\tencodeRefused$1(constructorName(value), path);\n\t\treturn;\n\t}\n\tif (ancestors.has(value)) encodeRefused$1(\"circular reference\", path);\n\tancestors.add(value);\n\tif (Array.isArray(value)) for (let index = 0; index < value.length; index++) {\n\t\tif (!(index in value)) encodeRefused$1(\"sparse array hole\", child(path, index));\n\t\tassertBsonValue(value[index], child(path, index), ancestors);\n\t}\n\telse for (const [key, entry] of Object.entries(value)) assertBsonValue(entry, child(path, key), ancestors);\n\tancestors.delete(value);\n}\n/**\n* Returns `value` unchanged when it is a BSON value at every depth, and throws `RUNTIME.ENCODE_FAILED` naming the first value that is not, with its path.\n*/\nfunction encodeBsonValue(value) {\n\tassertBsonValue(value, \"\", /* @__PURE__ */ new Set());\n\treturn value;\n}\n/**\n* A `Code` value with a scope, recognised by its tag: the driver reads with its own load of `bson`, so its `Code` is not an instance of the class imported here.\n*/\nfunction codeWithScope(value) {\n\tif (bsonClassTag(value) !== \"Code\") return void 0;\n\tconst code = Reflect.get(value, \"code\");\n\tconst scope = Reflect.get(value, \"scope\");\n\treturn typeof code === \"string\" && typeof scope === \"object\" && scope !== null ? {\n\t\tcode,\n\t\tscope\n\t} : void 0;\n}\nfunction decodeEntries$1(entries) {\n\treturn Object.fromEntries(entries.map(([key, entry]) => [key, decodeValue$1(entry)]));\n}\nfunction decodeValue$1(value) {\n\tif (typeof value !== \"object\" || value === null) return value;\n\tif (bsonClassTag(value) === \"DBRef\") return decodeEntries$1(dbRefEntries(value));\n\tif (Array.isArray(value)) {\n\t\tconst decoded = value.map(decodeValue$1);\n\t\treturn decoded.some((entry, index) => entry !== value[index]) ? decoded : value;\n\t}\n\tconst code = codeWithScope(value);\n\tif (code !== void 0) {\n\t\tconst scope = decodeValue$1(code.scope);\n\t\treturn scope === code.scope ? value : new Code(code.code, blindCast(scope));\n\t}\n\tif (!isPlainObject(value)) return value;\n\tconst entries = Object.entries(value);\n\tconst decoded = decodeEntries$1(entries);\n\treturn entries.some(([key, entry]) => decoded[key] !== entry) ? decoded : value;\n}\n/**\n* Returns the wire value as the driver produced it, except that a `DBRef` the `bson` library read from a `{ $ref, $id }` subdocument becomes that document again, `{ $ref, $id[, $db], ...fields }`, with its members' BSON types kept, at any depth and inside a `Code` scope. A value holding no `DBRef` is returned as the same object.\n*/\nfunction decodeBsonValue(wire) {\n\treturn blindCast(decodeValue$1(wire));\n}\nconst INT32_MIN$1 = -(2 ** 31);\nconst INT32_MAX$1 = 2 ** 31 - 1;\nfunction asDriverWrites(value) {\n\tif (typeof value === \"number\") return Number.isInteger(value) && (value < INT32_MIN$1 || value > INT32_MAX$1) ? new Double(value) : value;\n\tif (typeof value !== \"object\" || value === null) return value;\n\tif (value instanceof Uint8Array) return new Binary(value);\n\tif (Array.isArray(value)) return value.map(asDriverWrites);\n\tif (isPlainObject(value)) return Object.fromEntries(Object.entries(value).map(([key, entry]) => [key, asDriverWrites(entry)]));\n\tconst code = codeWithScope(value);\n\tif (code !== void 0) return new Code(code.code, blindCast(asDriverWrites(code.scope)));\n\treturn value;\n}\n/**\n* Canonical Extended JSON for a BSON value, recording each JavaScript number and `Uint8Array` as the BSON type the driver writes for it: an integer outside the int32 range as a `double`, and bytes as `binData`.\n*/\nfunction encodeBsonJson(value) {\n\treturn blindCast(EJSON.serialize(asDriverWrites(value), { relaxed: false }));\n}\nfunction decodeBsonJson(json) {\n\treturn EJSON.deserialize(blindCast(json), { relaxed: false });\n}\n//#endregion\n//#region src/core/bson-scalar-helpers.ts\nconst DECIMAL_INTEGER = /^-?\\d+$/;\nconst CANONICAL_DECIMAL_TEXT = /^(?:-?\\d+(?:\\.\\d+)?|NaN|-?Infinity)$/;\nconst DECIMAL128_TEXT = /^(-?)(\\d+)(?:\\.(\\d+))?(?:E([+-]\\d+))?$/;\nconst BASE64_TEXT = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;\n/**\n* Checks the BSON type tag rather than `instanceof`: the driver deserialises with its own load of `bson` (CommonJS, where this module may be loaded as ESM), so a value read from the database need not be an instance of the class imported here.\n*/\nfunction hasBsonTypeTag(value, tag) {\n\treturn typeof value === \"object\" && value !== null && \"_bsontype\" in value && value._bsontype === tag;\n}\nfunction isLong(value) {\n\treturn hasBsonTypeTag(value, \"Long\");\n}\nfunction isDecimal128(value) {\n\treturn hasBsonTypeTag(value, \"Decimal128\");\n}\nfunction isBinary(value) {\n\treturn hasBsonTypeTag(value, \"Binary\");\n}\nfunction decodeFailed(codecId, message, received) {\n\tthrow mongoTargetError(\"RUNTIME.DECODE_FAILED\", `${codecId} ${message}`, { meta: {\n\t\tcodecId,\n\t\treceived: typeof received\n\t} });\n}\nconst RECEIVED_PREVIEW_LIMIT = 100;\nfunction encodeFailed(codecId, message, received) {\n\tthrow mongoTargetError(\"RUNTIME.ENCODE_FAILED\", `${codecId} ${message}`, { meta: {\n\t\tcodecId,\n\t\treceived: String(received).slice(0, RECEIVED_PREVIEW_LIMIT)\n\t} });\n}\nfunction describeReceived(value) {\n\tif (typeof value === \"number\") return String(value);\n\tif (typeof value === \"bigint\") return `${value}n`;\n\tif (typeof value === \"string\") return `string ${JSON.stringify(value.slice(0, RECEIVED_PREVIEW_LIMIT))}`;\n\tif (value === null) return \"null\";\n\tif (value instanceof Date) return Number.isNaN(value.getTime()) ? \"an invalid Date\" : \"a Date\";\n\tif (Array.isArray(value)) return \"an array\";\n\treturn typeof value;\n}\nfunction refuseType(codecId, expected, value, received = describeReceived(value)) {\n\treturn encodeFailed(codecId, `value must be ${expected}; received ${received}`, value);\n}\nfunction stringEncode(codecId, value) {\n\tif (typeof value !== \"string\") refuseType(codecId, \"a string\", value);\n\treturn value;\n}\nfunction booleanEncode(codecId, value) {\n\tif (typeof value !== \"boolean\") refuseType(codecId, \"a boolean\", value);\n\treturn value;\n}\n/**\n* The driver writes an invalid `Date` as the epoch, so one is refused with any other non-`Date` value.\n*/\nfunction dateEncode(codecId, value) {\n\tif (!(value instanceof Date) || Number.isNaN(value.getTime())) refuseType(codecId, \"a valid Date\", value);\n\treturn value;\n}\nconst OBJECT_ID_HEX = /^[0-9a-f]{24}$/i;\nfunction hexStringOf(value) {\n\tconst toHexString = Reflect.get(value, \"toHexString\");\n\tif (typeof toHexString !== \"function\") return void 0;\n\tconst hex = Reflect.apply(toHexString, value, []);\n\treturn typeof hex === \"string\" && OBJECT_ID_HEX.test(hex) ? hex : void 0;\n}\n/**\n* `new ObjectId(...)` makes a fresh id from `null` or `undefined` and reads a number as a timestamp, so only a string, which the constructor accepts only as 24 hex digits, or an `ObjectId` is passed to it. An `ObjectId` is rebuilt from its hex string, so one from any major version of `bson` works.\n*/\nfunction objectIdEncode(codecId, value) {\n\tconst expected = \"a 24-digit hex string or an ObjectId\";\n\tif (typeof value === \"string\") try {\n\t\treturn new ObjectId(value);\n\t} catch {\n\t\treturn refuseType(codecId, expected, value);\n\t}\n\tif (typeof value !== \"object\" || value === null || !hasBsonTypeTag(value, \"ObjectId\")) return refuseType(codecId, expected, value);\n\tconst hex = hexStringOf(value);\n\tif (hex === void 0) return refuseType(codecId, expected, value, \"an object tagged ObjectId whose toHexString() does not return 24 hex digits\");\n\treturn new ObjectId(hex);\n}\nfunction vectorEncode(codecId, value) {\n\tif (!Array.isArray(value) || !value.every((element) => typeof element === \"number\")) refuseType(codecId, \"an array of numbers\", value);\n\treturn value;\n}\n/**\n* Wraps the number in the driver's `Double`, because the driver writes a whole JavaScript number in the int32 range as a BSON `int`, which a `double` validator refuses.\n*/\nfunction doubleEncode(codecId, value) {\n\tif (typeof value !== \"number\") encodeFailed(codecId, `value must be a number; received ${describeReceived(value)}`, value);\n\treturn new Double(value);\n}\nconst INT32_MIN = -(2 ** 31);\nconst INT32_MAX = 2 ** 31 - 1;\nfunction int32Encode(codecId, value) {\n\tif (typeof value !== \"number\" || !Number.isInteger(value) || value < INT32_MIN || value > INT32_MAX) encodeFailed(codecId, `value must be an integer from ${INT32_MIN} to ${INT32_MAX}; received ${describeReceived(value)}`, value);\n\treturn value;\n}\nconst INT64_MIN = -(2n ** 63n);\nconst INT64_MAX = 2n ** 63n - 1n;\n/**\n* `Long.fromBigInt` keeps the low 64 bits of any bigint, so an out-of-range value would be stored as a different number without error.\n*/\nfunction isInt64(value) {\n\treturn value >= INT64_MIN && value <= INT64_MAX;\n}\nfunction requireInt64(codecId, value) {\n\tif (!isInt64(value)) encodeFailed(codecId, \"value is outside the signed 64-bit range\", value);\n\treturn value;\n}\nfunction int64Encode(codecId, value) {\n\tif (typeof value !== \"bigint\") encodeFailed(codecId, \"value must be a bigint\", value);\n\treturn Long.fromBigInt(requireInt64(codecId, value));\n}\n/**\n* A stored double with a fraction, which a 64-bit integer codec cannot read. Such values were written through a Prisma 6 `Int` while its contract used the 32-bit codec, which took any number.\n*/\nfunction refuseFractionalDouble(codecId, wire) {\n\treturn decodeFailed(codecId, `wire value is the fractional double ${wire}, and a 64-bit integer holds whole numbers only. Rewrite each such stored value as a long, rounded or cut off ({ $toLong: { $round: [<value>, 0] } }, or $trunc in place of $round), mapping over the list when the value sits in one. The upgrade guide step prisma6-int-written-as-long has the queries for a plain field, a list and a list of composite values.`, wire);\n}\n/**\n* The driver promotes a stored `long` that fits in 53 bits to a `number`, and hands larger ones over as `Long`, so both arrive here.\n*/\nfunction int64Decode(codecId, wire) {\n\tif (typeof wire === \"bigint\") return wire;\n\tif (isLong(wire)) return wire.toBigInt();\n\tif (typeof wire === \"number\" && Number.isSafeInteger(wire)) return BigInt(wire);\n\tif (typeof wire === \"number\" && Number.isFinite(wire) && !Number.isInteger(wire)) return refuseFractionalDouble(codecId, wire);\n\treturn decodeFailed(codecId, \"wire value must be a Long or a safe integer\", wire);\n}\n/**\n* A schema-written default arrives as a `number`; one that is a safe integer names its value exactly, so it is accepted like `pg/int8@1` accepts it.\n*/\nfunction int64EncodeJson(codecId, value) {\n\tif (typeof value === \"bigint\") return requireInt64(codecId, value).toString();\n\tif (typeof value === \"number\" && Number.isSafeInteger(value)) return BigInt(value).toString();\n\treturn encodeFailed(codecId, \"value must be a bigint or a safe integer\", value);\n}\nfunction int64DecodeJson(codecId, json) {\n\tif (typeof json !== \"string\" || !DECIMAL_INTEGER.test(json)) return decodeFailed(codecId, \"JSON value must be decimal integer text\", json);\n\tconst value = BigInt(json);\n\tif (!isInt64(value)) return decodeFailed(codecId, \"JSON value is outside the signed 64-bit range\", json);\n\treturn value;\n}\nconst SAFE_INTEGER_RANGE = `from ${Number.MIN_SAFE_INTEGER} to ${Number.MAX_SAFE_INTEGER}`;\nfunction int64NumberEncode(codecId, value) {\n\tif (!Number.isSafeInteger(value)) encodeFailed(codecId, `value must be an integer ${SAFE_INTEGER_RANGE}; received ${describeReceived(value)}`, value);\n\treturn Long.fromNumber(value);\n}\nfunction safeIntegerOf(codecId, subject, value) {\n\tif (value < BigInt(Number.MIN_SAFE_INTEGER) || value > BigInt(Number.MAX_SAFE_INTEGER)) decodeFailed(codecId, `${subject} must be a whole number ${SAFE_INTEGER_RANGE}; received ${value}`, value);\n\treturn Number(value);\n}\n/**\n* The driver hands a stored `long` over as a `number` when it fits in 53 bits (the default `promoteLongs`), as a `Long` otherwise or with `promoteLongs: false`, and as a `bigint` with `useBigInt64`.\n*/\nfunction int64NumberDecode(codecId, wire) {\n\tif (typeof wire === \"bigint\") return safeIntegerOf(codecId, \"wire value\", wire);\n\tif (isLong(wire)) return safeIntegerOf(codecId, \"wire value\", wire.toBigInt());\n\tif (typeof wire === \"number\" && Number.isSafeInteger(wire)) return wire;\n\tif (typeof wire === \"number\" && Number.isFinite(wire) && !Number.isInteger(wire)) return refuseFractionalDouble(codecId, wire);\n\treturn decodeFailed(codecId, `wire value must be a whole number ${SAFE_INTEGER_RANGE}; received ${describeReceived(wire)}`, wire);\n}\nfunction int64NumberEncodeJson(codecId, value) {\n\treturn int64NumberEncode(codecId, value).toString();\n}\nfunction int64NumberDecodeJson(codecId, json) {\n\tif (typeof json !== \"string\" || !DECIMAL_INTEGER.test(json)) return decodeFailed(codecId, \"JSON value must be decimal integer text\", json);\n\treturn safeIntegerOf(codecId, \"JSON value\", BigInt(json));\n}\nfunction decimalTextNumberLiteral(value) {\n\treturn typeof value === \"string\" && DECIMAL_INTEGER.test(value) ? value : void 0;\n}\nfunction decimalTextBigintLiteral(value) {\n\treturn typeof value === \"string\" && DECIMAL_INTEGER.test(value) ? `${value}n` : void 0;\n}\n/**\n* `Decimal128.toString()` writes some values with an exponent (`1E+3`, `1.23E+40`). The application value is decimal text without one, as for Postgres `numeric`: the point moves to where the exponent puts it, trailing zeros stay, and the sign of zero goes.\n*/\nfunction canonicalDecimalText(text) {\n\tif (text === \"NaN\" || text === \"Infinity\" || text === \"-Infinity\") return text;\n\tconst match = DECIMAL128_TEXT.exec(text);\n\tif (match === null) return void 0;\n\tconst [, sign = \"\", whole = \"\", fraction = \"\", exponent = \"0\"] = match;\n\tconst digits = `${whole}${fraction}`;\n\tconst point = whole.length + Number(exponent);\n\tlet integerPart;\n\tlet fractionPart;\n\tif (point <= 0) {\n\t\tintegerPart = \"0\";\n\t\tfractionPart = `${\"0\".repeat(-point)}${digits}`;\n\t} else if (point >= digits.length) {\n\t\tintegerPart = `${digits}${\"0\".repeat(point - digits.length)}`;\n\t\tfractionPart = \"\";\n\t} else {\n\t\tintegerPart = digits.slice(0, point);\n\t\tfractionPart = digits.slice(point);\n\t}\n\tconst trimmedInteger = integerPart.replace(/^0+(?=\\d)/, \"\");\n\tconst unsigned = fractionPart === \"\" ? trimmedInteger : `${trimmedInteger}.${fractionPart}`;\n\treturn /^[0.]+$/.test(unsigned) ? unsigned : `${sign}${unsigned}`;\n}\nfunction requireCanonicalDecimalText(codecId, value) {\n\tif (typeof value !== \"string\" || !CANONICAL_DECIMAL_TEXT.test(value)) encodeFailed(codecId, \"value must be decimal text without an exponent, or NaN, Infinity or -Infinity\", value);\n\treturn value;\n}\nfunction decimal128Encode(codecId, value) {\n\trequireCanonicalDecimalText(codecId, value);\n\ttry {\n\t\treturn Decimal128.fromString(value);\n\t} catch (error) {\n\t\treturn encodeFailed(codecId, `value cannot be stored as a Decimal128 exactly: ${error instanceof Error ? error.message : String(error)}`, value);\n\t}\n}\nfunction decimal128Decode(codecId, wire) {\n\tif (!isDecimal128(wire)) return decodeFailed(codecId, \"wire value must be a Decimal128\", wire);\n\tconst text = canonicalDecimalText(wire.toString());\n\tif (text === void 0) return decodeFailed(codecId, \"wire value is not decimal text\", wire);\n\treturn text;\n}\nfunction decimal128EncodeJson(codecId, value) {\n\treturn requireCanonicalDecimalText(codecId, value);\n}\n/**\n* The JSON form is what `encodeJson` writes, so it follows the encode rule: canonical decimal text (no exponent), or `NaN`, `Infinity` or `-Infinity`, that a Decimal128 holds exactly.\n*/\nfunction decimal128DecodeJson(codecId, json) {\n\tif (typeof json !== \"string\" || !CANONICAL_DECIMAL_TEXT.test(json)) return decodeFailed(codecId, \"JSON value must be decimal text without an exponent, or NaN, Infinity or -Infinity\", json);\n\ttry {\n\t\tDecimal128.fromString(json);\n\t} catch {\n\t\treturn decodeFailed(codecId, \"JSON value cannot be stored as a Decimal128 exactly\", json);\n\t}\n\treturn json;\n}\nfunction binaryEncode(codecId, value) {\n\tif (!(value instanceof Uint8Array)) encodeFailed(codecId, \"value must be a Uint8Array\", value);\n\treturn new Binary(value);\n}\n/**\n* The driver reads binData as a `Binary`, or as a `Buffer` with `promoteBuffers: true`; either becomes a plain `Uint8Array` copy of the bytes.\n*/\nfunction binaryDecode(codecId, wire) {\n\tif (wire instanceof Uint8Array) return new Uint8Array(wire);\n\tif (!isBinary(wire)) return decodeFailed(codecId, \"wire value must be a Binary or a Uint8Array\", wire);\n\treturn new Uint8Array(wire.value());\n}\nfunction binaryEncodeJson(value) {\n\treturn Buffer.from(value).toString(\"base64\");\n}\nfunction binaryDecodeJson(codecId, json) {\n\tif (typeof json !== \"string\" || !BASE64_TEXT.test(json)) return decodeFailed(codecId, \"JSON value must be base64 text\", json);\n\treturn new Uint8Array(Buffer.from(json, \"base64\"));\n}\n//#endregion\n//#region src/core/json-codec-helpers.ts\nconst BSON_TYPE_BY_TAG = {\n\tObjectId: \"objectId\",\n\tDecimal128: \"decimal\",\n\tBinary: \"binData\",\n\tBSONRegExp: \"regex\",\n\tTimestamp: \"timestamp\",\n\tBSONSymbol: \"symbol\",\n\tCode: \"javascript\",\n\tMinKey: \"minKey\",\n\tMaxKey: \"maxKey\"\n};\nconst NOT_FINITE_FIX = \"JSON has no NaN or Infinity; store null or a string, or declare the field Bson.\";\nconst BSON_FIX = \"Declare the field Bson to store BSON values.\";\nconst PLAIN_VALUE_FIX = \"Convert it to a plain object or array.\";\nconst ENCODE_FIX_BY_RECEIVED = {\n\tDate: \"Store the date as an ISO 8601 string, or declare the field Bson.\",\n\tbigint: \"Store it as a number in the safe-integer range or as decimal text, or declare the field Int64 or Bson.\",\n\tNaN: NOT_FINITE_FIX,\n\tInfinity: NOT_FINITE_FIX,\n\t\"-Infinity\": NOT_FINITE_FIX,\n\tundefined: \"Leave the key out, or store null.\",\n\tUint8Array: \"Store the bytes as a base64 string, or declare the field Binary or Bson.\",\n\tBuffer: \"Store the bytes as a base64 string, or declare the field Binary or Bson.\",\n\tBinary: \"Store the bytes as a base64 string, or declare the field Binary or Bson.\",\n\tObjectId: \"Store its hex string, or declare the field ObjectId or Bson.\",\n\tLong: \"Store a number in the safe-integer range or decimal text, or declare the field Int64 or Bson.\",\n\tDecimal128: \"Store the decimal text, or declare the field Decimal128 or Bson.\",\n\tInt32: \"Pass a plain number.\",\n\tDouble: \"Pass a plain number.\",\n\tRegExp: \"Store the pattern as a string, or declare the field Bson.\",\n\tBSONRegExp: \"Store the pattern as a string, or declare the field Bson.\",\n\tsymbol: \"Store a string instead.\",\n\tfunction: \"Store data, not a function.\",\n\t\"circular reference\": \"Remove the cycle; a JSON value is a tree.\",\n\t\"sparse array hole\": \"Fill the hole with null.\",\n\tDBRef: \"Write it as a { $ref, $id } document instead.\"\n};\nfunction encodeFix(received) {\n\treturn ENCODE_FIX_BY_RECEIVED[received] ?? (Object.hasOwn(BSON_TYPE_BY_TAG, received) ? BSON_FIX : PLAIN_VALUE_FIX);\n}\nfunction encodeRefused(received, path) {\n\tthrow mongoTargetError(\"RUNTIME.ENCODE_FAILED\", `${MONGO_JSON_CODEC_ID} value must be a JSON value; received ${received} at ${where(path)}. ${encodeFix(received)}`, { meta: {\n\t\tcodecId: MONGO_JSON_CODEC_ID,\n\t\treceived,\n\t\tvaluePath: path\n\t} });\n}\nfunction describeNonJson(value) {\n\tif (value === null || typeof value === \"string\" || typeof value === \"boolean\") return void 0;\n\tif (typeof value === \"number\") return Number.isFinite(value) ? void 0 : String(value);\n\tif (typeof value !== \"object\") return typeof value;\n\tconst tag = bsonTypeTag(value);\n\tif (tag !== void 0) return tag;\n\tif (value instanceof Date) return \"Date\";\n\tif (isPlainArray(value)) return void 0;\n\treturn isPlainObject(value) ? void 0 : constructorName(value);\n}\nfunction assertJsonValue(value, path, ancestors) {\n\tconst received = describeNonJson(value);\n\tif (received !== void 0) encodeRefused(received, path);\n\tif (typeof value !== \"object\" || value === null) return;\n\tif (ancestors.has(value)) encodeRefused(\"circular reference\", path);\n\tancestors.add(value);\n\tif (Array.isArray(value)) for (let index = 0; index < value.length; index++) {\n\t\tif (!(index in value)) encodeRefused(\"sparse array hole\", child(path, index));\n\t\tassertJsonValue(value[index], child(path, index), ancestors);\n\t}\n\telse for (const [key, entry] of Object.entries(value)) assertJsonValue(entry, child(path, key), ancestors);\n\tancestors.delete(value);\n}\n/**\n* Returns `value` unchanged when it is a plain JSON value at every depth, and throws `RUNTIME.ENCODE_FAILED` naming the first value that is not, with its path.\n*/\nfunction encodeJsonValue(value) {\n\tassertJsonValue(value, \"\", /* @__PURE__ */ new Set());\n\treturn value;\n}\nfunction decodeRefused(bsonType, path) {\n\tthrow mongoTargetError(\"RUNTIME.DECODE_FAILED\", `${MONGO_JSON_CODEC_ID} wire value contains a non-JSON BSON ${bsonType} at ${where(path)}`, { meta: {\n\t\tcodecId: MONGO_JSON_CODEC_ID,\n\t\treceived: bsonType,\n\t\tvaluePath: path\n\t} });\n}\nfunction safeLong(value, path) {\n\tconst number = Number(value);\n\treturn Number.isSafeInteger(number) && BigInt(number) === value ? number : decodeRefused(\"long\", path);\n}\nfunction finiteDouble(value, path) {\n\tif (Number.isFinite(value)) return value;\n\tconst received = String(value);\n\tthrow mongoTargetError(\"RUNTIME.DECODE_FAILED\", `${MONGO_JSON_CODEC_ID} wire value contains ${received} at ${where(path)}; a JSON number cannot be NaN or Infinity`, { meta: {\n\t\tcodecId: MONGO_JSON_CODEC_ID,\n\t\treceived,\n\t\tvaluePath: path\n\t} });\n}\nfunction decodeEntries(entries, path) {\n\treturn Object.fromEntries(entries.map(([key, entry]) => [key, decodeValue(entry, child(path, key))]));\n}\nfunction decodeTagged(value, tag, path) {\n\tswitch (tag) {\n\t\tcase \"DBRef\": return decodeEntries(dbRefEntries(value), path);\n\t\tcase \"Long\": return safeLong(blindCast(value).toBigInt(), path);\n\t\tcase \"Int32\":\n\t\tcase \"Double\": return finiteDouble(Number(value.valueOf()), path);\n\t}\n\treturn decodeRefused(BSON_TYPE_BY_TAG[tag] ?? tag, path);\n}\nfunction decodeValue(value, path) {\n\tif (value === null || typeof value === \"string\" || typeof value === \"boolean\") return value;\n\tif (typeof value === \"number\") return finiteDouble(value, path);\n\tif (typeof value === \"bigint\") return safeLong(value, path);\n\tif (typeof value === \"undefined\") return decodeRefused(\"undefined\", path);\n\tif (typeof value === \"symbol\") return decodeRefused(\"symbol\", path);\n\tif (typeof value === \"function\") return decodeRefused(\"javascript\", path);\n\tconst tag = bsonClassTag(value);\n\tif (tag !== void 0) return decodeTagged(value, tag, path);\n\tif (value instanceof Date) return decodeRefused(\"date\", path);\n\tif (value instanceof RegExp) return decodeRefused(\"regex\", path);\n\tif (value instanceof Uint8Array) return decodeRefused(\"binData\", path);\n\tif (Array.isArray(value)) {\n\t\tconst decoded = value.map((entry, index) => decodeValue(entry, child(path, index)));\n\t\treturn decoded.some((entry, index) => entry !== value[index]) ? decoded : value;\n\t}\n\tif (!isPlainObject(value)) return decodeRefused(constructorName(value), path);\n\tconst entries = Object.entries(value);\n\tconst decoded = decodeEntries(entries, path);\n\treturn entries.some(([key, entry]) => decoded[key] !== entry) ? decoded : blindCast(value);\n}\n/**\n* Decodes a wire value to the JSON value it holds: a `long` in the safe-integer range and the driver's `Int32` and `Double` wrappers become numbers. Only the objects and arrays around a converted value are copied; a wire value that is already JSON is returned as the same object. Throws `RUNTIME.DECODE_FAILED` naming the BSON type and path of the first value that is not JSON.\n*/\nfunction decodeJsonValue(wire) {\n\treturn decodeValue(wire, \"\");\n}\n//#endregion\n//#region src/core/codecs.ts\nconst mongoObjectIdCodec = mongoCodec({\n\ttypeId: MONGO_OBJECTID_CODEC_ID,\n\tdecode: (wire) => wire.toHexString(),\n\tencode: (value) => objectIdEncode(MONGO_OBJECTID_CODEC_ID, value)\n});\nconst mongoStringCodec = mongoCodec({\n\ttypeId: MONGO_STRING_CODEC_ID,\n\tdecode: (wire) => wire,\n\tencode: (value) => stringEncode(MONGO_STRING_CODEC_ID, value)\n});\nconst mongoDoubleCodec = mongoCodec({\n\ttypeId: MONGO_DOUBLE_CODEC_ID,\n\tdecode: (wire) => Number(wire),\n\tencode: (value) => doubleEncode(MONGO_DOUBLE_CODEC_ID, value)\n});\nconst mongoInt32Codec = mongoCodec({\n\ttypeId: MONGO_INT32_CODEC_ID,\n\tdecode: (wire) => wire,\n\tencode: (value) => int32Encode(MONGO_INT32_CODEC_ID, value)\n});\nconst mongoBooleanCodec = mongoCodec({\n\ttypeId: MONGO_BOOLEAN_CODEC_ID,\n\tdecode: (wire) => wire,\n\tencode: (value) => booleanEncode(MONGO_BOOLEAN_CODEC_ID, value)\n});\nconst mongoDateCodec = mongoCodec({\n\ttypeId: MONGO_DATE_CODEC_ID,\n\tdecode: (wire) => wire,\n\tencode: (value) => dateEncode(MONGO_DATE_CODEC_ID, value),\n\tencodeJson: (value) => value.toISOString(),\n\tdecodeJson: (json) => {\n\t\tif (typeof json !== \"string\") throw mongoTargetError(\"RUNTIME.DECODE_FAILED\", \"expected ISO date string\", { meta: {\n\t\t\tcodecId: MONGO_DATE_CODEC_ID,\n\t\t\treceived: typeof json\n\t\t} });\n\t\treturn new Date(json);\n\t}\n});\nconst mongoVectorCodec = mongoCodec({\n\ttypeId: MONGO_VECTOR_CODEC_ID,\n\tdecode: (wire) => wire,\n\tencode: (value) => vectorEncode(MONGO_VECTOR_CODEC_ID, value)\n});\n/**\n* A BSON `long`. The application value is a `bigint`, because a `number` cannot hold the full 64-bit range; its JSON form is decimal text.\n*/\nconst mongoInt64Codec = mongoCodec({\n\ttypeId: MONGO_INT64_CODEC_ID,\n\tdecode: (wire) => int64Decode(MONGO_INT64_CODEC_ID, wire),\n\tencode: (value) => int64Encode(MONGO_INT64_CODEC_ID, value),\n\tencodeJson: (value) => int64EncodeJson(MONGO_INT64_CODEC_ID, value),\n\tdecodeJson: (json) => int64DecodeJson(MONGO_INT64_CODEC_ID, json)\n});\n/**\n* A BSON `long` read and written as a `number` from -(2^53 - 1) to 2^53 - 1, the value a Prisma 6 `Int` presents. A value outside that range, or with a fraction, is refused rather than rounded.\n*/\nconst mongoInt64NumberCodec = mongoCodec({\n\ttypeId: MONGO_INT64_NUMBER_CODEC_ID,\n\tdecode: (wire) => int64NumberDecode(MONGO_INT64_NUMBER_CODEC_ID, wire),\n\tencode: (value) => int64NumberEncode(MONGO_INT64_NUMBER_CODEC_ID, value),\n\tencodeJson: (value) => int64NumberEncodeJson(MONGO_INT64_NUMBER_CODEC_ID, value),\n\tdecodeJson: (json) => int64NumberDecodeJson(MONGO_INT64_NUMBER_CODEC_ID, json)\n});\n/**\n* A BSON `decimal`. The application value and its JSON form are the same decimal text, written without an exponent.\n*/\nconst mongoDecimal128Codec = mongoCodec({\n\ttypeId: MONGO_DECIMAL128_CODEC_ID,\n\tdecode: (wire) => decimal128Decode(MONGO_DECIMAL128_CODEC_ID, wire),\n\tencode: (value) => decimal128Encode(MONGO_DECIMAL128_CODEC_ID, value),\n\tencodeJson: (value) => decimal128EncodeJson(MONGO_DECIMAL128_CODEC_ID, value),\n\tdecodeJson: (json) => decimal128DecodeJson(MONGO_DECIMAL128_CODEC_ID, json)\n});\n/**\n* BSON `binData`. The application value is a `Uint8Array`; its JSON form is unwrapped base64.\n*/\nconst mongoBinaryCodec = mongoCodec({\n\ttypeId: MONGO_BINARY_CODEC_ID,\n\tdecode: (wire) => binaryDecode(MONGO_BINARY_CODEC_ID, wire),\n\tencode: (value) => binaryEncode(MONGO_BINARY_CODEC_ID, value),\n\tencodeJson: binaryEncodeJson,\n\tdecodeJson: (json) => binaryDecodeJson(MONGO_BINARY_CODEC_ID, json)\n});\n/**\n* A JSON value, stored as the BSON object, array, string, number, boolean or null it maps to. Encode and decode refuse any other value at any depth, naming its path.\n*/\nconst mongoJsonCodec = mongoCodec({\n\ttypeId: MONGO_JSON_CODEC_ID,\n\tdecode: (wire) => decodeJsonValue(wire),\n\tencode: (value) => encodeJsonValue(value)\n});\n/**\n* Any BSON value, passed through unchanged except that decode turns a `DBRef` back into the `{ $ref, $id }` document it was stored as. Encode takes a `BsonInputValue` and decode returns a `BsonValue`. Its JSON form is canonical MongoDB Extended JSON v2, written with each number and `Uint8Array` as the BSON type the driver stores, so a round trip keeps the BSON bytes but may return wrapper classes such as `Int32` and `Double`.\n*/\nconst mongoBsonCodec = mongoCodec({\n\ttypeId: MONGO_BSON_CODEC_ID,\n\tdecode: (wire) => decodeBsonValue(wire),\n\tencode: (value) => encodeBsonValue(value),\n\tencodeJson: encodeBsonJson,\n\tdecodeJson: decodeBsonJson\n});\n/**\n* The canonical set of Mongo wire-type codecs.\n*\n* Single source of truth for both control- and runtime-plane adapter descriptors. Don't duplicate this list — import it.\n*/\nconst mongoStandardCodecs = [\n\tmongoObjectIdCodec,\n\tmongoStringCodec,\n\tmongoDoubleCodec,\n\tmongoInt32Codec,\n\tmongoBooleanCodec,\n\tmongoDateCodec,\n\tmongoVectorCodec,\n\tmongoInt64Codec,\n\tmongoInt64NumberCodec,\n\tmongoDecimal128Codec,\n\tmongoBinaryCodec,\n\tmongoJsonCodec,\n\tmongoBsonCodec\n];\n/**\n* Build a {@link CodecDescriptor} for a Mongo wire-type codec.\n*\n* Wraps an existing {@link MongoCodec} instance into a descriptor whose factory hands out the same shared codec. Mongo's full migration to descriptor-first authoring is tracked under TML-2324; for now the descriptor view is composed from the existing `mongoCodec()` outputs.\n*/\nfunction descriptorFor(codec, metadata) {\n\tconst renderOutputType = blindCast(metadata.renderOutputType);\n\treturn {\n\t\tcodecId: codec.id,\n\t\tdataType: metadata.dataType,\n\t\ttraits: metadata.traits,\n\t\ttargetTypes: metadata.targetTypes,\n\t\tparamsSchema: blindCast(void 0),\n\t\tisParameterized: false,\n\t\tfactory: blindCast(() => () => codec),\n\t\t...ifDefined(\"renderOutputType\", renderOutputType),\n\t\t...ifDefined(\"renderValueLiteral\", metadata.renderValueLiteral)\n\t};\n}\nconst renderVectorOutputType = (typeParams) => {\n\tconst length = typeParams[\"length\"];\n\tif (length === void 0) return void 0;\n\tif (typeof length !== \"number\" || !Number.isFinite(length) || !Number.isInteger(length) || length <= 0) throw mongoTargetError(\"RUNTIME.TYPE_PARAMS_INVALID\", \"renderOutputType: expected positive integer \\\"length\\\" for Vector\", { meta: {\n\t\tnativeType: \"Vector\",\n\t\tparam: \"length\",\n\t\treceived: length\n\t} });\n\treturn `Vector<${length}>`;\n};\n/**\n* Mongo wire-type codec descriptors. Static metadata for `traits`, `targetTypes`, and `renderOutputType` lives here (the descriptor shape) — `MongoCodec` itself is narrow and only carries the four conversion methods (TML-2357).\n*/\nconst mongoCodecDescriptors = [\n\tdescriptorFor(mongoObjectIdCodec, {\n\t\tdataType: mongoObjectId.id,\n\t\ttraits: [\"equality\"],\n\t\ttargetTypes: [\"objectId\"]\n\t}),\n\tdescriptorFor(mongoStringCodec, {\n\t\tdataType: mongoString.id,\n\t\ttraits: [\n\t\t\t\"equality\",\n\t\t\t\"order\",\n\t\t\t\"textual\"\n\t\t],\n\t\ttargetTypes: [\"string\"],\n\t\trenderValueLiteral: renderTsLiteral\n\t}),\n\tdescriptorFor(mongoDoubleCodec, {\n\t\tdataType: mongoDouble.id,\n\t\ttraits: [\n\t\t\t\"equality\",\n\t\t\t\"order\",\n\t\t\t\"numeric\"\n\t\t],\n\t\ttargetTypes: [\"double\"],\n\t\trenderValueLiteral: renderTsLiteral\n\t}),\n\tdescriptorFor(mongoInt32Codec, {\n\t\tdataType: mongoInt32.id,\n\t\ttraits: [\n\t\t\t\"equality\",\n\t\t\t\"order\",\n\t\t\t\"numeric\"\n\t\t],\n\t\ttargetTypes: [\"int\"],\n\t\trenderValueLiteral: renderTsLiteral\n\t}),\n\tdescriptorFor(mongoBooleanCodec, {\n\t\tdataType: mongoBool.id,\n\t\ttraits: [\"equality\", \"boolean\"],\n\t\ttargetTypes: [\"bool\"],\n\t\trenderValueLiteral: renderTsLiteral\n\t}),\n\tdescriptorFor(mongoDateCodec, {\n\t\tdataType: mongoDate.id,\n\t\ttraits: [\"equality\", \"order\"],\n\t\ttargetTypes: [\"date\"]\n\t}),\n\tdescriptorFor(mongoVectorCodec, {\n\t\tdataType: mongoVector.id,\n\t\ttraits: [\"equality\"],\n\t\ttargetTypes: [\"vector\"],\n\t\trenderOutputType: renderVectorOutputType\n\t}),\n\tdescriptorFor(mongoInt64Codec, {\n\t\tdataType: mongoInt64.id,\n\t\ttraits: [\n\t\t\t\"equality\",\n\t\t\t\"order\",\n\t\t\t\"numeric\"\n\t\t],\n\t\ttargetTypes: [\"long\"],\n\t\trenderValueLiteral: decimalTextBigintLiteral\n\t}),\n\tdescriptorFor(mongoInt64NumberCodec, {\n\t\tdataType: mongoInt64.id,\n\t\ttraits: [\n\t\t\t\"equality\",\n\t\t\t\"order\",\n\t\t\t\"numeric\"\n\t\t],\n\t\ttargetTypes: [\"long\"],\n\t\trenderValueLiteral: decimalTextNumberLiteral\n\t}),\n\tdescriptorFor(mongoDecimal128Codec, {\n\t\tdataType: mongoDecimal128.id,\n\t\ttraits: [\n\t\t\t\"equality\",\n\t\t\t\"order\",\n\t\t\t\"numeric\"\n\t\t],\n\t\ttargetTypes: [\"decimal\"]\n\t}),\n\tdescriptorFor(mongoBinaryCodec, {\n\t\tdataType: mongoBinary.id,\n\t\ttraits: [\"equality\"],\n\t\ttargetTypes: [\"binData\"]\n\t}),\n\tdescriptorFor(mongoJsonCodec, {\n\t\tdataType: mongoJson.id,\n\t\ttraits: [],\n\t\ttargetTypes: [\n\t\t\t\"object\",\n\t\t\t\"array\",\n\t\t\t\"string\",\n\t\t\t\"double\",\n\t\t\t\"int\",\n\t\t\t\"long\",\n\t\t\t\"bool\",\n\t\t\t\"null\"\n\t\t]\n\t}),\n\tdescriptorFor(mongoBsonCodec, {\n\t\tdataType: mongoBson.id,\n\t\ttraits: [],\n\t\ttargetTypes: []\n\t})\n];\n/**\n* Lookup descriptor metadata by codec id — used by tests and for descriptor-side reads of static metadata.\n*/\nfunction mongoDescriptorById(codecId) {\n\treturn mongoCodecDescriptors.find((d) => d.codecId === codecId);\n}\n/**\n* Build a {@link MongoCodecRegistry} preloaded with the standard Mongo wire-type codecs.\n*\n* Single point of truth for adapter-side codec construction: used by the legacy synchronous `createMongoAdapter()` factory and by the runtime adapter descriptor's `codecs()` getter. Userland code obtains a registry via the framework's execution-stack composition (see `createMongoExecutionContext`) instead of calling this directly.\n*/\nfunction buildStandardCodecRegistry() {\n\tconst registry = newMongoCodecRegistry();\n\tfor (const codec of mongoStandardCodecs) registry.register(codec);\n\treturn registry;\n}\n//#endregion\nexport { mongoTargetError as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