@prisma/orm-target-mongo 8.0.0-rc.14-dev.29 → 8.0.0-rc.14-dev.31
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__control.d.mts +1 -17
- package/dist/adapter__control.d.mts.map +1 -1
- package/dist/adapter__control.mjs +19 -67
- package/dist/adapter__control.mjs.map +1 -1
- package/dist/adapter__runtime.mjs +2 -2
- package/dist/{codecs-DHo_Ei21-DHvEom71.mjs → codecs-Cerz_j1e-DXkrV2OC.mjs} +26 -49
- package/dist/{codecs-DHo_Ei21-DHvEom71.mjs.map → codecs-Cerz_j1e-DXkrV2OC.mjs.map} +1 -1
- package/dist/{codecs-CwHW-tx-.d.mts → codecs-ZeuEqozq.d.mts} +2 -2
- package/dist/{codecs-CwHW-tx-.d.mts.map → codecs-ZeuEqozq.d.mts.map} +1 -1
- package/dist/{control-CxB8dW_m.mjs → control-D7f8sjEI.mjs} +4 -4
- package/dist/{control-CxB8dW_m.mjs.map → control-D7f8sjEI.mjs.map} +1 -1
- package/dist/data-types-CcyIYfyC.d.mts +23 -0
- package/dist/data-types-CcyIYfyC.d.mts.map +1 -0
- package/dist/data-types-D7u1m_Jl-C5XUZspA.mjs +47 -0
- package/dist/data-types-D7u1m_Jl-C5XUZspA.mjs.map +1 -0
- package/dist/{descriptor-meta-DqlqWWFC-ei2sStOs.mjs → descriptor-meta-BvJe0wgx-DG_DuBRV.mjs} +4 -7
- package/dist/descriptor-meta-BvJe0wgx-DG_DuBRV.mjs.map +1 -0
- package/dist/{descriptor-meta-runtime-DAabvKNm-CXYTUnQP.mjs → descriptor-meta-runtime-BaUg63-r-DLJMtO0p.mjs} +4 -4
- package/dist/{descriptor-meta-runtime-DAabvKNm-CXYTUnQP.mjs.map → descriptor-meta-runtime-BaUg63-r-DLJMtO0p.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-BW-kRaXm-C3Sw9U9G.mjs → mongo-adapter-BW-kRaXm-DW9VUNEe.mjs} +2 -2
- package/dist/{mongo-adapter-BW-kRaXm-C3Sw9U9G.mjs.map → mongo-adapter-BW-kRaXm-DW9VUNEe.mjs.map} +1 -1
- package/dist/{mongo-driver-DjKJfdSD-BxW_sFJP.mjs → mongo-driver-BqjavuGo-3eG7H_9a.mjs} +3 -3
- package/dist/{mongo-driver-DjKJfdSD-BxW_sFJP.mjs.map → mongo-driver-BqjavuGo-3eG7H_9a.mjs.map} +1 -1
- package/dist/{pack-C5evxnAs.d.mts → pack-4m3yVTQB.d.mts} +1 -4
- package/dist/pack-4m3yVTQB.d.mts.map +1 -0
- package/dist/{prisma6-binding-CzV_iWP8.mjs → prisma6-binding-DxomEFzp.mjs} +2 -2
- package/dist/{prisma6-binding-CzV_iWP8.mjs.map → prisma6-binding-DxomEFzp.mjs.map} +1 -1
- package/dist/target.d.mts +4 -4
- package/dist/target.mjs +5 -5
- package/dist/target__codecs.d.mts +1 -1
- package/dist/target__codecs.mjs +1 -1
- package/dist/target__control.mjs +1 -1
- package/dist/target__data-types.d.mts +2 -2
- package/dist/target__data-types.mjs +2 -2
- package/dist/target__pack.d.mts +1 -1
- package/dist/target__pack.mjs +1 -1
- package/dist/target__pack.mjs.map +1 -1
- package/dist/target__prisma6-binding.mjs +1 -1
- package/dist/target__runtime.mjs +1 -1
- package/dist/target__runtime.mjs.map +1 -1
- package/package.json +9 -9
- package/dist/data-types-CX8zNsum.d.mts +0 -19
- package/dist/data-types-CX8zNsum.d.mts.map +0 -1
- package/dist/data-types-qKwvSozp-De9Y09D3.mjs +0 -37
- package/dist/data-types-qKwvSozp-De9Y09D3.mjs.map +0 -1
- package/dist/descriptor-meta-DqlqWWFC-ei2sStOs.mjs.map +0 -1
- package/dist/pack-C5evxnAs.d.mts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-types-D7u1m_Jl-C5XUZspA.mjs","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/data-types-D7u1m_Jl.mjs"],"sourcesContent":["import { mongoDataType } from \"@internal/mongo-contract/data-type\";\nimport { type } from \"arktype\";\n//#region src/core/data-types.ts\n/** The vector's dimension, which only the TypeScript type `Vector<n>` reads. */\nconst mongoVectorParams = type({ \"length?\": \"number.integer >= 1\" });\nconst mongoObjectId = mongoDataType(\"mongo/objectid\", { bsonTypes: [\"objectId\"] });\nconst mongoString = mongoDataType(\"mongo/string\", { bsonTypes: [\"string\"] });\nconst mongoDouble = mongoDataType(\"mongo/double\", { bsonTypes: [\"double\"] });\nconst mongoInt32 = mongoDataType(\"mongo/int32\", { bsonTypes: [\"int\"] });\nconst mongoBool = mongoDataType(\"mongo/bool\", { bsonTypes: [\"bool\"] });\nconst mongoDate = mongoDataType(\"mongo/date\", { bsonTypes: [\"date\"] });\nconst mongoVector = mongoDataType(\"mongo/vector\", {\n\tbsonTypes: [\"vector\"],\n\tparams: mongoVectorParams\n});\nconst mongoInt64 = mongoDataType(\"mongo/int64\", { bsonTypes: [\"long\"] });\nconst mongoDecimal128 = mongoDataType(\"mongo/decimal128\", { bsonTypes: [\"decimal\"] });\nconst mongoBinary = mongoDataType(\"mongo/binary\", { bsonTypes: [\"binData\"] });\nconst mongoJson = mongoDataType(\"mongo/json\", { bsonTypes: [\n\t\"object\",\n\t\"array\",\n\t\"string\",\n\t\"double\",\n\t\"int\",\n\t\"long\",\n\t\"bool\",\n\t\"null\"\n] });\nconst mongoBson = mongoDataType(\"mongo/bson\", { bsonTypes: [] });\nconst mongoDataTypes = [\n\tmongoObjectId,\n\tmongoString,\n\tmongoDouble,\n\tmongoInt32,\n\tmongoBool,\n\tmongoDate,\n\tmongoVector,\n\tmongoInt64,\n\tmongoDecimal128,\n\tmongoBinary,\n\tmongoJson,\n\tmongoBson\n];\n//#endregion\nexport { mongoDate as a, mongoInt32 as c, mongoObjectId as d, mongoString as f, mongoDataTypes as i, mongoInt64 as l, mongoVectorParams as m, mongoBool as n, mongoDecimal128 as o, mongoVector as p, mongoBson as r, mongoDouble as s, mongoBinary as t, mongoJson as u };\n\n//# sourceMappingURL=data-types-D7u1m_Jl.mjs.map"],"mappings":";;;;AAIA,MAAM,oBAAoB,KAAK,EAAE,WAAW,sBAAsB,CAAC;AACnE,MAAM,gBAAgB,cAAc,kBAAkB,EAAE,WAAW,CAAC,UAAU,EAAE,CAAC;AACjF,MAAM,cAAc,cAAc,gBAAgB,EAAE,WAAW,CAAC,QAAQ,EAAE,CAAC;AAC3E,MAAM,cAAc,cAAc,gBAAgB,EAAE,WAAW,CAAC,QAAQ,EAAE,CAAC;AAC3E,MAAM,aAAa,cAAc,eAAe,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC;AACtE,MAAM,YAAY,cAAc,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC;AACrE,MAAM,YAAY,cAAc,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC;AACrE,MAAM,cAAc,cAAc,gBAAgB;CACjD,WAAW,CAAC,QAAQ;CACpB,QAAQ;AACT,CAAC;AACD,MAAM,aAAa,cAAc,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC;AACvE,MAAM,kBAAkB,cAAc,oBAAoB,EAAE,WAAW,CAAC,SAAS,EAAE,CAAC;AACpF,MAAM,cAAc,cAAc,gBAAgB,EAAE,WAAW,CAAC,SAAS,EAAE,CAAC;AAC5E,MAAM,YAAY,cAAc,cAAc,EAAE,WAAW;CAC1D;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,EAAE,CAAC;AACH,MAAM,YAAY,cAAc,cAAc,EAAE,WAAW,CAAC,EAAE,CAAC;AAC/D,MAAM,iBAAiB;CACtB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD"}
|
package/dist/{descriptor-meta-DqlqWWFC-ei2sStOs.mjs → descriptor-meta-BvJe0wgx-DG_DuBRV.mjs}
RENAMED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { i as MONGO_DATE_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-BaUg63-r-DLJMtO0p.mjs";
|
|
3
3
|
import { timestampNowControlDescriptor } from "@prisma/orm-framework/components/control";
|
|
4
4
|
import { temporalAuthoringPresets, temporalCodecPreset } from "@prisma/orm-framework/components/authoring";
|
|
5
|
-
//#region ../../../3-mongo-target/1-mongo-target/dist/descriptor-meta-
|
|
6
|
-
const mongoDateStorage = {
|
|
7
|
-
codecId: MONGO_DATE_CODEC_ID,
|
|
8
|
-
nativeType: "date"
|
|
9
|
-
};
|
|
5
|
+
//#region ../../../3-mongo-target/1-mongo-target/dist/descriptor-meta-BvJe0wgx.mjs
|
|
6
|
+
const mongoDateStorage = { codecId: MONGO_DATE_CODEC_ID };
|
|
10
7
|
const mongoAuthoringFieldPresets = { temporal: {
|
|
11
8
|
...temporalAuthoringPresets(mongoDateStorage),
|
|
12
9
|
timestamp: temporalCodecPreset(mongoDateStorage)
|
|
@@ -22,4 +19,4 @@ const mongoTargetDescriptorMeta = {
|
|
|
22
19
|
//#endregion
|
|
23
20
|
export { mongoTargetDescriptorMeta as t };
|
|
24
21
|
|
|
25
|
-
//# sourceMappingURL=descriptor-meta-
|
|
22
|
+
//# sourceMappingURL=descriptor-meta-BvJe0wgx-DG_DuBRV.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptor-meta-BvJe0wgx-DG_DuBRV.mjs","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/descriptor-meta-BvJe0wgx.mjs"],"sourcesContent":["import { i as MONGO_DATE_CODEC_ID } from \"./codec-ids-WdrumsYA.mjs\";\nimport { t as mongoTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-BaUg63-r.mjs\";\nimport { timestampNowControlDescriptor } from \"@internal/framework-components/control\";\nimport { temporalAuthoringPresets, temporalCodecPreset } from \"@internal/framework-components/authoring\";\n//#region src/core/authoring.ts\nconst mongoDateStorage = { codecId: MONGO_DATE_CODEC_ID };\nconst mongoAuthoringFieldPresets = { temporal: {\n\t...temporalAuthoringPresets(mongoDateStorage),\n\ttimestamp: temporalCodecPreset(mongoDateStorage)\n} };\nconst mongoTargetDescriptorMeta = {\n\t...mongoTargetDescriptorMetaRuntime,\n\tauthoring: { field: mongoAuthoringFieldPresets },\n\tcontrolMutationDefaults: {\n\t\tdefaultFunctionRegistry: /* @__PURE__ */ new Map(),\n\t\tgeneratorDescriptors: [timestampNowControlDescriptor()]\n\t}\n};\n//#endregion\nexport { mongoTargetDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-BvJe0wgx.mjs.map"],"mappings":";;;;;AAKA,MAAM,mBAAmB,EAAE,SAAS,oBAAoB;AACxD,MAAM,6BAA6B,EAAE,UAAU;CAC9C,GAAG,yBAAyB,gBAAgB;CAC5C,WAAW,oBAAoB,gBAAgB;AAChD,EAAE;AACF,MAAM,4BAA4B;CACjC,GAAG;CACH,WAAW,EAAE,OAAO,2BAA2B;CAC/C,yBAAyB;EACxB,yCAAyC,IAAI,IAAI;EACjD,sBAAsB,CAAC,8BAA8B,CAAC;CACvD;AACD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as mongoDataTypes } from "./data-types-
|
|
2
|
-
import { n as mongoCodecDescriptors } from "./codecs-
|
|
1
|
+
import { i as mongoDataTypes } from "./data-types-D7u1m_Jl-C5XUZspA.mjs";
|
|
2
|
+
import { n as mongoCodecDescriptors } from "./codecs-Cerz_j1e-DXkrV2OC.mjs";
|
|
3
3
|
import { UNBOUND_NAMESPACE_ID } from "@prisma/orm-framework/components/ir";
|
|
4
|
-
//#region ../../../3-mongo-target/1-mongo-target/dist/descriptor-meta-runtime-
|
|
4
|
+
//#region ../../../3-mongo-target/1-mongo-target/dist/descriptor-meta-runtime-BaUg63-r.mjs
|
|
5
5
|
const mongoTargetDescriptorMetaRuntime = {
|
|
6
6
|
kind: "target",
|
|
7
7
|
familyId: "mongo",
|
|
@@ -17,4 +17,4 @@ const mongoTargetDescriptorMetaRuntime = {
|
|
|
17
17
|
//#endregion
|
|
18
18
|
export { mongoTargetDescriptorMetaRuntime as t };
|
|
19
19
|
|
|
20
|
-
//# sourceMappingURL=descriptor-meta-runtime-
|
|
20
|
+
//# sourceMappingURL=descriptor-meta-runtime-BaUg63-r-DLJMtO0p.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descriptor-meta-runtime-
|
|
1
|
+
{"version":3,"file":"descriptor-meta-runtime-BaUg63-r-DLJMtO0p.mjs","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/descriptor-meta-runtime-BaUg63-r.mjs"],"sourcesContent":["import { n as mongoCodecDescriptors } from \"./codecs-Cerz_j1e.mjs\";\nimport { i as mongoDataTypes } from \"./data-types-D7u1m_Jl.mjs\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nconst mongoTargetDescriptorMetaRuntime = {\n\tkind: \"target\",\n\tfamilyId: \"mongo\",\n\ttargetId: \"mongo\",\n\tid: \"mongo\",\n\tversion: \"0.0.1\",\n\tcapabilities: {},\n\tdefaultNamespaceId: UNBOUND_NAMESPACE_ID,\n\tsupportsNamespaces: true,\n\tdataTypes: mongoDataTypes,\n\ttypes: { codecTypes: { codecDescriptors: mongoCodecDescriptors } }\n};\n//#endregion\nexport { mongoTargetDescriptorMetaRuntime as t };\n\n//# sourceMappingURL=descriptor-meta-runtime-BaUg63-r.mjs.map"],"mappings":";;;;AAGA,MAAM,mCAAmC;CACxC,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc,CAAC;CACf,oBAAoB;CACpB,oBAAoB;CACpB,WAAW;CACX,OAAO,EAAE,YAAY,EAAE,kBAAkB,sBAAsB,EAAE;AAClE"}
|
package/dist/driver.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as MongoDriverImpl, r as createMongoDriver } from "./mongo-driver-
|
|
1
|
+
import { n as MongoDriverImpl, r as createMongoDriver } from "./mongo-driver-BqjavuGo-3eG7H_9a.mjs";
|
|
2
2
|
export { MongoDriverImpl, createMongoDriver };
|
package/dist/driver__control.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as MongoDriverImpl, t as DRIVER_INFO } from "./mongo-driver-
|
|
1
|
+
import { n as MongoDriverImpl, t as DRIVER_INFO } from "./mongo-driver-BqjavuGo-3eG7H_9a.mjs";
|
|
2
2
|
import { errorRuntime } from "@prisma/orm-framework/errors/execution";
|
|
3
3
|
import { MongoClient } from "mongodb";
|
|
4
4
|
import { redactDatabaseUrl } from "@prisma/orm-framework/utils/redact-db-url";
|
|
@@ -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-BqjavuGo.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,4 +1,4 @@
|
|
|
1
|
-
import { t as buildStandardCodecRegistry } from "./codecs-
|
|
1
|
+
import { t as buildStandardCodecRegistry } from "./codecs-Cerz_j1e-DXkrV2OC.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";
|
|
@@ -821,4 +821,4 @@ function createMongoAdapter() {
|
|
|
821
821
|
//#endregion
|
|
822
822
|
export { lowerStage as a, lowerPipeline as i, lowerAggExpr as n, lowerFilter as r, createMongoAdapter as t };
|
|
823
823
|
|
|
824
|
-
//# sourceMappingURL=mongo-adapter-BW-kRaXm-
|
|
824
|
+
//# sourceMappingURL=mongo-adapter-BW-kRaXm-DW9VUNEe.mjs.map
|
package/dist/{mongo-adapter-BW-kRaXm-C3Sw9U9G.mjs.map → mongo-adapter-BW-kRaXm-DW9VUNEe.mjs.map}
RENAMED
|
@@ -1 +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;CAC1B,MAAM,SAAS,IAAI;CACnB,IAAI,iBAAiB,eAAe;EACnC,IAAI,MAAM,SAAS;GAClB,MAAM,QAAQ,OAAO,IAAI,MAAM,OAAO;GACtC,IAAI,OAAO,QAAQ,IAAI;IACtB,OAAO,MAAM,iBAAiB,MAAM,OAAO,MAAM,OAAO,GAAG,GAAG,QAAQ,QAAQ;GAC/E,SAAS,OAAO;IACf,kBAAkB,OAAO,OAAO,MAAM,EAAE;GACzC;EACD;EACA,OAAO,MAAM;CACd;CACA,IAAI,UAAU,QAAQ,OAAO,UAAU,YAAY,aAAa,KAAK,GAAG,OAAO;CAC/E,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,iBAAiB,QAAQ,IAAI,MAAM,KAAK,MAAM,aAAa,GA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O,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
|
+
{"version":3,"file":"mongo-adapter-BW-kRaXm-DW9VUNEe.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;;;;;;;;;;;;;;;;;;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KAAK,iBAAiB,OAAO,IAAI,sBAAsB,MAAM,YAAY,MAAM,QAAQ,MAAM,MAAM;GACnG,KAAK,gBAAgB,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-BqjavuGo.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.31"
|
|
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-BqjavuGo-3eG7H_9a.mjs.map
|
package/dist/{mongo-driver-DjKJfdSD-BxW_sFJP.mjs.map → mongo-driver-BqjavuGo-3eG7H_9a.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mongo-driver-DjKJfdSD-BxW_sFJP.mjs","names":[],"sources":["../../../../3-mongo-target/3-mongo-driver/dist/mongo-driver-DjKJfdSD.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.29\"\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-DjKJfdSD.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,KAA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ACzD,GAAG,iCAAiC,KAAK,IAAI,EAAE,6BAA6B,IAAI,CAAC;EAClF,CAAC;CACF;AACD;AACA,eAAe,kBAAkB,KAAK,QAAQ;CAC7C,OAAO,gBAAgB,eAAe,KAAK,MAAM;AAClD"}
|
|
1
|
+
{"version":3,"file":"mongo-driver-BqjavuGo-3eG7H_9a.mjs","names":[],"sources":["../../../../3-mongo-target/3-mongo-driver/dist/mongo-driver-BqjavuGo.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.31\"\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-BqjavuGo.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;GAC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BAAgB,eAAe,KAAK,MAAM;AAClD"}
|
|
@@ -20,7 +20,6 @@ declare const mongoAuthoringFieldPresets: {
|
|
|
20
20
|
}];
|
|
21
21
|
readonly output: {
|
|
22
22
|
readonly codecId: "mongo/date@1";
|
|
23
|
-
readonly nativeType: "date";
|
|
24
23
|
} & {
|
|
25
24
|
readonly executionDefaults: {
|
|
26
25
|
readonly onCreate: {
|
|
@@ -50,7 +49,6 @@ declare const mongoAuthoringFieldPresets: {
|
|
|
50
49
|
readonly kind: "fieldPreset";
|
|
51
50
|
readonly output: Omit<{
|
|
52
51
|
readonly codecId: "mongo/date@1";
|
|
53
|
-
readonly nativeType: "date";
|
|
54
52
|
} & {
|
|
55
53
|
readonly generatorId?: "timestampNow";
|
|
56
54
|
}, "generatorId"> & {
|
|
@@ -66,7 +64,6 @@ declare const mongoAuthoringFieldPresets: {
|
|
|
66
64
|
readonly kind: "fieldPreset";
|
|
67
65
|
readonly output: Omit<{
|
|
68
66
|
readonly codecId: "mongo/date@1";
|
|
69
|
-
readonly nativeType: "date";
|
|
70
67
|
} & {
|
|
71
68
|
readonly generatorId?: "timestampNow";
|
|
72
69
|
}, "generatorId"> & {
|
|
@@ -107,4 +104,4 @@ declare const mongoTargetPack: {
|
|
|
107
104
|
};
|
|
108
105
|
//#endregion
|
|
109
106
|
export { mongoTargetPack as t };
|
|
110
|
-
//# sourceMappingURL=pack-
|
|
107
|
+
//# sourceMappingURL=pack-4m3yVTQB.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pack-4m3yVTQB.d.mts","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/pack.d.mts"],"mappings":";;;;;cAIc;WACH;aACE;eACE;eACA;iBACE;iBACA;iBACA;iBACA;;iBAEA;iBACA;iBACA;iBACA;;eAEF;iBACE;;iBAEA;mBACE;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;;;;mBAIN;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;;;;;;;aAOZ;eACE;eACA,QAAQ;iBACN;;iBAEA;;iBAEA;mBACE;qBACE;qBACA;;;;;aAKR;eACE;eACA,QAAQ;iBACN;;iBAEA;;iBAEA;mBACE;qBACE;qBACA;;mBAEF;qBACE;qBACA;;;;;;;;;cASP;WACH;WACA;WACA;WACA;WACA;WACA,cAAc;WACd;WACA;aACE;eACE,kBAAkB,cAAc;;;WAGpC;aACE,cAAc;;WAEhB,yBAAyB;WACzB,eAAe"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as MONGO_DECIMAL128_CODEC_ID, c as MONGO_INT64_CODEC_ID, d as MONGO_OBJECTID_CODEC_ID, f as MONGO_STRING_CODEC_ID, i as MONGO_DATE_CODEC_ID, l as MONGO_INT64_NUMBER_CODEC_ID, n as MONGO_BOOLEAN_CODEC_ID, o as MONGO_DOUBLE_CODEC_ID, s as MONGO_INT32_CODEC_ID, t as MONGO_BINARY_CODEC_ID, u as MONGO_JSON_CODEC_ID } from "./codec-ids-WdrumsYA-BkQfspmL.mjs";
|
|
2
|
-
import { t as mongoTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-
|
|
2
|
+
import { t as mongoTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-BaUg63-r-DLJMtO0p.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-DxomEFzp.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prisma6-binding-
|
|
1
|
+
{"version":3,"file":"prisma6-binding-DxomEFzp.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-BaUg63-r.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.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { a as MONGO_DECIMAL128_CODEC_ID, c as MONGO_INT64_CODEC_ID, d as MONGO_OBJECTID_CODEC_ID, f as MONGO_STRING_CODEC_ID, i as MONGO_DATE_CODEC_ID, l as MONGO_INT64_NUMBER_CODEC_ID, n as MONGO_BOOLEAN_CODEC_ID, o as MONGO_DOUBLE_CODEC_ID, p as MONGO_VECTOR_CODEC_ID, r as MONGO_BSON_CODEC_ID, s as MONGO_INT32_CODEC_ID, t as MONGO_BINARY_CODEC_ID, u as MONGO_JSON_CODEC_ID } from "./codec-ids-PSU05uwH.mjs";
|
|
2
2
|
import { a as Vector, i as CodecTypes, n as BsonScalar, r as BsonValue, t as BsonInputValue } from "./codec-types-wuAXIXjV.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-ZeuEqozq.mjs";
|
|
4
4
|
import { a as DropCollectionCall, c as schemaCollectionToCreateCollectionOptions, i as CreateIndexCall, l as schemaIndexToCreateIndexOptions, n as CollModMeta, o as DropIndexCall, r as CreateCollectionCall, s as OpFactoryCall$1, t as CollModCall } from "./op-factory-call-bbkNqNr4-GITke_FQ.mjs";
|
|
5
5
|
import { _ as renderOps, a as MongoTargetContract, c as MongoTargetSchemaVerifier, d as PlannerProducedMongoMigration, f as RenderMigrationMeta, g as renderCallsToTypeScript, h as mongoTargetDescriptor, i as MongoMigrationRunnerExecuteOptions, l as MongoTargetUnboundDatabase, m as deserializeMongoOps, n as MongoMigrationPlanner, o as MongoTargetContractSerializer, p as deserializeMongoOp, r as MongoMigrationRunner, s as MongoTargetDatabase, t as FilterEvaluator, u as PlanCallsResult, v as serializeMongoOps } from "./control-B4_aOJ9c.mjs";
|
|
6
|
-
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-
|
|
6
|
+
import { a as mongoDate, c as mongoInt32, d as mongoObjectId, f as mongoString, i as mongoDataTypes, l as mongoInt64, m as mongoVectorParams, n as mongoBool, o as mongoDecimal128, p as mongoVector, r as mongoBson, s as mongoDouble, t as mongoBinary, u as mongoJson } from "./data-types-CcyIYfyC.mjs";
|
|
7
7
|
import { a as createIndex, c as dropIndex, d as validatedCollection, i as createCollection, l as placeholder, n as MigrationCLI, o as dataTransform, r as collMod, s as dropCollection, t as Migration, u as setValidation } from "./migration-DKlTqb10.mjs";
|
|
8
|
-
import "./pack-
|
|
8
|
+
import "./pack-4m3yVTQB.mjs";
|
|
9
9
|
import { t as prisma6MongoBinding } from "./prisma6-binding-DppqC9Jo.mjs";
|
|
10
10
|
import { t as MongoRuntimeTargetInstance } from "./runtime-B9_-kjBX.mjs";
|
|
11
|
-
export { type BsonInputValue, type BsonScalar, type BsonValue, CodecTypes, CollModCall, type CollModMeta, CreateCollectionCall, CreateIndexCall, DropCollectionCall, DropIndexCall, FilterEvaluator, MONGO_BINARY_CODEC_ID, MONGO_BOOLEAN_CODEC_ID, MONGO_BSON_CODEC_ID, MONGO_DATE_CODEC_ID, MONGO_DECIMAL128_CODEC_ID, MONGO_DOUBLE_CODEC_ID, MONGO_INT32_CODEC_ID, MONGO_INT64_CODEC_ID, MONGO_INT64_NUMBER_CODEC_ID, MONGO_JSON_CODEC_ID, MONGO_OBJECTID_CODEC_ID, MONGO_STRING_CODEC_ID, MONGO_VECTOR_CODEC_ID, Migration, MigrationCLI, MongoMigrationPlanner, MongoMigrationRunner, type MongoMigrationRunnerExecuteOptions, MongoRuntimeTargetInstance, type MongoTargetContract, MongoTargetContractSerializer, MongoTargetDatabase, MongoTargetSchemaVerifier, MongoTargetUnboundDatabase, type OpFactoryCall$1 as OpFactoryCall, type PlanCallsResult, PlannerProducedMongoMigration, type RenderMigrationMeta, Vector, buildStandardCodecRegistry, collMod, createCollection, createIndex, dataTransform, deserializeMongoOp, deserializeMongoOps, dropCollection, dropIndex, mongoBinary, mongoBool, mongoBson, mongoCodecDescriptors, mongoDataTypes, mongoDate, mongoDecimal128, mongoDescriptorById, mongoDouble, mongoInt32, mongoInt64, mongoJson, mongoObjectId, mongoStandardCodecs, mongoString, mongoTargetDescriptor, mongoVector, placeholder, prisma6MongoBinding, renderCallsToTypeScript, renderOps, schemaCollectionToCreateCollectionOptions, schemaIndexToCreateIndexOptions, serializeMongoOps, setValidation, validatedCollection };
|
|
11
|
+
export { type BsonInputValue, type BsonScalar, type BsonValue, CodecTypes, CollModCall, type CollModMeta, CreateCollectionCall, CreateIndexCall, DropCollectionCall, DropIndexCall, FilterEvaluator, MONGO_BINARY_CODEC_ID, MONGO_BOOLEAN_CODEC_ID, MONGO_BSON_CODEC_ID, MONGO_DATE_CODEC_ID, MONGO_DECIMAL128_CODEC_ID, MONGO_DOUBLE_CODEC_ID, MONGO_INT32_CODEC_ID, MONGO_INT64_CODEC_ID, MONGO_INT64_NUMBER_CODEC_ID, MONGO_JSON_CODEC_ID, MONGO_OBJECTID_CODEC_ID, MONGO_STRING_CODEC_ID, MONGO_VECTOR_CODEC_ID, Migration, MigrationCLI, MongoMigrationPlanner, MongoMigrationRunner, type MongoMigrationRunnerExecuteOptions, MongoRuntimeTargetInstance, type MongoTargetContract, MongoTargetContractSerializer, MongoTargetDatabase, MongoTargetSchemaVerifier, MongoTargetUnboundDatabase, type OpFactoryCall$1 as OpFactoryCall, type PlanCallsResult, PlannerProducedMongoMigration, type RenderMigrationMeta, Vector, buildStandardCodecRegistry, collMod, createCollection, createIndex, dataTransform, deserializeMongoOp, deserializeMongoOps, dropCollection, dropIndex, mongoBinary, mongoBool, mongoBson, mongoCodecDescriptors, mongoDataTypes, mongoDate, mongoDecimal128, mongoDescriptorById, mongoDouble, mongoInt32, mongoInt64, mongoJson, mongoObjectId, mongoStandardCodecs, mongoString, mongoTargetDescriptor, mongoVector, mongoVectorParams, placeholder, prisma6MongoBinding, renderCallsToTypeScript, renderOps, schemaCollectionToCreateCollectionOptions, schemaIndexToCreateIndexOptions, serializeMongoOps, setValidation, validatedCollection };
|