@prisma/orm-family-mongo 8.0.0-rc.12-dev.21 → 8.0.0-rc.13
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/{authoring-entity-types-DkFfee0x-DzGu9hUw.mjs → authoring-entity-types-CZX-S_hY-w2tu7EVk.mjs} +19 -6
- package/dist/authoring-entity-types-CZX-S_hY-w2tu7EVk.mjs.map +1 -0
- package/dist/codec.d.mts +1 -1
- package/dist/codec.mjs +1 -1
- package/dist/{contract-builder-DUX8KLUR.d.mts → contract-builder-CCmw_x_e.d.mts} +10 -1
- package/dist/contract-builder-CCmw_x_e.d.mts.map +1 -0
- package/dist/{contract-builder-ckSdJi66.mjs → contract-builder-DpMMVErz.mjs} +4 -1
- package/dist/contract-builder-DpMMVErz.mjs.map +1 -0
- package/dist/contract-prisma6__provider.mjs +1 -1
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__provider.mjs +1 -1
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.d.mts +1 -1
- package/dist/contract-ts.mjs +1 -1
- package/dist/contract-ts__contract-builder.d.mts +1 -1
- package/dist/contract-ts__contract-builder.mjs +1 -1
- package/dist/{control-DNe7Gps7.d.mts → control-BKLGhv19.d.mts} +2 -2
- package/dist/{control-DNe7Gps7.d.mts.map → control-BKLGhv19.d.mts.map} +1 -1
- package/dist/{control-1yLRoWrD.mjs → control-DRB8P8fy.mjs} +3 -3
- package/dist/{control-1yLRoWrD.mjs.map → control-DRB8P8fy.mjs.map} +1 -1
- package/dist/{control-BqovaVpo.d.mts → control-DVqprwua.d.mts} +2 -2
- package/dist/{control-BqovaVpo.d.mts.map → control-DVqprwua.d.mts.map} +1 -1
- package/dist/{control-adapter-Bh_ZraGM-0OJf8f1R.d.mts → control-adapter-Bh_ZraGM-wsAkUbsg.d.mts} +3 -3
- package/dist/{control-adapter-Bh_ZraGM-0OJf8f1R.d.mts.map → control-adapter-Bh_ZraGM-wsAkUbsg.d.mts.map} +1 -1
- package/dist/control-adapter-DnXw3tmo.d.mts +1 -0
- package/dist/{dist-C7Ykq48Q.mjs → dist-CO2arS1K.mjs} +3 -1
- package/dist/dist-CO2arS1K.mjs.map +1 -0
- package/dist/{dist-Czwqx_i3.mjs → dist-CqUoKyeL.mjs} +1 -10
- package/dist/dist-CqUoKyeL.mjs.map +1 -0
- package/dist/{execution-CKnUiOfm.d.mts → execution-BRC7ECq8.d.mts} +2 -2
- package/dist/{execution-CKnUiOfm.d.mts.map → execution-BRC7ECq8.d.mts.map} +1 -1
- package/dist/family.d.mts +4 -4
- package/dist/family.mjs +2 -2
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control.d.mts +1 -1
- package/dist/family__control.mjs +1 -1
- package/dist/family__migration.d.mts +1 -1
- package/dist/family__pack.mjs +2 -2
- package/dist/family__pack.mjs.map +1 -1
- package/dist/{field-accessor-DHsAPiW3-DpQqiFg4.d.mts → field-accessor-DHsAPiW3-mPtxx6Gz.d.mts} +4 -4
- package/dist/{field-accessor-DHsAPiW3-DpQqiFg4.d.mts.map → field-accessor-DHsAPiW3-mPtxx6Gz.d.mts.map} +1 -1
- package/dist/{index-Dv2PNMiG.d.mts → index--ynTw_5M.d.mts} +15 -5
- package/dist/index--ynTw_5M.d.mts.map +1 -0
- package/dist/index-9DDQlC5U.d.mts +87 -0
- package/dist/index-9DDQlC5U.d.mts.map +1 -0
- package/dist/{index-BOnCg-qJ.d.mts → index-BfTXOq5S.d.mts} +4 -4
- package/dist/{index-BOnCg-qJ.d.mts.map → index-BfTXOq5S.d.mts.map} +1 -1
- package/dist/{index-CrO8iljZ.d.mts → index-RT8HbGQG.d.mts} +5 -5
- package/dist/{index-CrO8iljZ.d.mts.map → index-RT8HbGQG.d.mts.map} +1 -1
- package/dist/{interpreter-lsgY0F-Q-BNJcdxhl.mjs → interpreter-EqDVFiIr-C-rDel_u.mjs} +20 -14
- package/dist/interpreter-EqDVFiIr-C-rDel_u.mjs.map +1 -0
- package/dist/lowering.d.mts +1 -1
- package/dist/{migration-CR6iaRZH.d.mts → migration-DAPtRIp2.d.mts} +2 -2
- package/dist/{migration-CR6iaRZH.d.mts.map → migration-DAPtRIp2.d.mts.map} +1 -1
- package/dist/orm.d.mts +3 -3
- package/dist/orm.mjs +37 -17
- package/dist/orm.mjs.map +1 -1
- package/dist/pack-BUb_cutQ.d.mts.map +1 -1
- package/dist/query-ast.d.mts +3 -3
- package/dist/query-ast__control.d.mts +2 -2
- package/dist/query-ast__execution.d.mts +2 -2
- package/dist/query-builder.d.mts +4 -4
- package/dist/query-builder__contract-free.d.mts +5 -5
- package/dist/{query-plan-C0-Yu8hf-DdilEdW6.d.mts → query-plan-C0-Yu8hf-BnYfzKMn.d.mts} +2 -2
- package/dist/{query-plan-C0-Yu8hf-DdilEdW6.d.mts.map → query-plan-C0-Yu8hf-BnYfzKMn.d.mts.map} +1 -1
- package/dist/runtime.d.mts +6 -6
- package/dist/runtime.mjs +7 -8
- package/dist/runtime.mjs.map +1 -1
- package/dist/value.d.mts +2 -2
- package/dist/value.mjs +1 -1
- package/dist/wire.d.mts +2 -2
- package/package.json +20 -20
- package/dist/authoring-entity-types-DkFfee0x-DzGu9hUw.mjs.map +0 -1
- package/dist/contract-builder-DUX8KLUR.d.mts.map +0 -1
- package/dist/contract-builder-ckSdJi66.mjs.map +0 -1
- package/dist/control-adapter-BAu56y_q.d.mts +0 -1
- package/dist/dist-C7Ykq48Q.mjs.map +0 -1
- package/dist/dist-Czwqx_i3.mjs.map +0 -1
- package/dist/index-Dv2PNMiG.d.mts.map +0 -1
- package/dist/index-wKMm41HC.d.mts +0 -30
- package/dist/index-wKMm41HC.d.mts.map +0 -1
- package/dist/interpreter-lsgY0F-Q-BNJcdxhl.mjs.map +0 -1
package/dist/{control-adapter-Bh_ZraGM-0OJf8f1R.d.mts → control-adapter-Bh_ZraGM-wsAkUbsg.d.mts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as MongoSchemaIR } from "./index-CaoieUeB.mjs";
|
|
2
|
-
import { _ as MongoInspectionCommandVisitor, t as AnyMongoDdlCommand } from "./control-
|
|
3
|
-
import { i as MongoDriver, t as MongoAdapter } from "./index-
|
|
2
|
+
import { _ as MongoInspectionCommandVisitor, t as AnyMongoDdlCommand } from "./control-BKLGhv19.mjs";
|
|
3
|
+
import { i as MongoDriver, t as MongoAdapter } from "./index-RT8HbGQG.mjs";
|
|
4
4
|
import { ContractMarkerRecord, LedgerEntryRecord } from "@prisma/orm-framework/contract/types";
|
|
5
5
|
import { ControlAdapterDescriptor, ControlAdapterInstance, ControlDriverInstance } from "@prisma/orm-framework/components/control";
|
|
6
6
|
//#region ../../../2-mongo-family/9-family/dist/control-adapter-Bh_ZraGM.d.mts
|
|
@@ -124,4 +124,4 @@ interface MongoControlAdapter<TTarget extends string = string> extends ControlAd
|
|
|
124
124
|
interface MongoControlAdapterDescriptor<TTarget extends string = string> extends ControlAdapterDescriptor<'mongo', TTarget, MongoControlAdapter<TTarget>> {}
|
|
125
125
|
//#endregion
|
|
126
126
|
export { MongoRunnerDependencies as i, MongoControlAdapter as n, MongoControlAdapterDescriptor as r, MarkerOperations as t };
|
|
127
|
-
//# sourceMappingURL=control-adapter-Bh_ZraGM-
|
|
127
|
+
//# sourceMappingURL=control-adapter-Bh_ZraGM-wsAkUbsg.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-adapter-Bh_ZraGM-
|
|
1
|
+
{"version":3,"file":"control-adapter-Bh_ZraGM-wsAkUbsg.d.mts","names":[],"sources":["../../../../2-mongo-family/9-family/dist/control-adapter-Bh_ZraGM.d.mts"],"mappings":";;;;;;;;;;;;;UAYU;EACR,WAAW,gBAAgB,QAAQ;EACnC,WAAW,eAAe;aACf;aACA;aACA;MACP;EACJ,aAAa,eAAe,sBAAsB;aACvC;aACA;aACA;MACP;EACJ,iBAAiB,eAAe;aACrB;aACA;aACA;aACA;aACA;aACA;MACP;;;;;UAKI;WACC,oBAAoB,8BAA8B,QAAQ;WAC1D,SAAS;WACT,QAAQ;WACR,aAAa,SAAS,uBAAuB;WAC7C,WAAW;WACX,wBAAwB,QAAQ;;;;;;;;;;;;;;;UAejC,oBAAoB,yCAAyC,gCAAgC;;;;;;;EAOrG,WAAW,QAAQ,+BAA+B,UAAU,gBAAgB,QAAQ;;;;;;;EAOpF,eAAe,QAAQ,+BAA+B,WAAW,QAAQ,oBAAoB;;;;EAI7F,WAAW,QAAQ,+BAA+B,UAAU,eAAe;aAChE;aACA;aACA;MACP;;;;;;EAMJ,aAAa,QAAQ,+BAA+B,UAAU,eAAe,sBAAsB;aACxF;aACA;aACA;MACP;;;;;;EAMJ,iBAAiB,QAAQ,+BAA+B,UAAU,eAAe;aACtE;aACA;aACA;aACA;aACA;aACA;MACP;;;;;EAKJ,WAAW,QAAQ,+BAA+B,UAAU,iBAAiB,iBAAiB;;;;EAI9F,iBAAiB,QAAQ,+BAA+B,WAAW,QAAQ;;;;EAI3E,yBAAyB,QAAQ,+BAA+B,WAAW;;;;;;;UAOnE,8BAA8B,yCAAyC,kCAAkC,SAAS,oBAAoB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./control-adapter-Bh_ZraGM-wsAkUbsg.mjs";
|
|
@@ -3,10 +3,12 @@ var MongoParamRef = class MongoParamRef {
|
|
|
3
3
|
value;
|
|
4
4
|
name;
|
|
5
5
|
codecId;
|
|
6
|
+
collection;
|
|
6
7
|
constructor(value, options) {
|
|
7
8
|
this.value = value;
|
|
8
9
|
this.name = options?.name;
|
|
9
10
|
this.codecId = options?.codecId;
|
|
11
|
+
this.collection = options?.collection;
|
|
10
12
|
Object.freeze(this);
|
|
11
13
|
}
|
|
12
14
|
static of(value, options) {
|
|
@@ -16,4 +18,4 @@ var MongoParamRef = class MongoParamRef {
|
|
|
16
18
|
//#endregion
|
|
17
19
|
export { MongoParamRef as t };
|
|
18
20
|
|
|
19
|
-
//# sourceMappingURL=dist-
|
|
21
|
+
//# sourceMappingURL=dist-CO2arS1K.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dist-CO2arS1K.mjs","names":[],"sources":["../../../../2-mongo-family/1-foundation/mongo-value/dist/index.mjs"],"sourcesContent":["//#region src/param-ref.ts\nvar MongoParamRef = class MongoParamRef {\n\tvalue;\n\tname;\n\tcodecId;\n\tcollection;\n\tconstructor(value, options) {\n\t\tthis.value = value;\n\t\tthis.name = options?.name;\n\t\tthis.codecId = options?.codecId;\n\t\tthis.collection = options?.collection;\n\t\tObject.freeze(this);\n\t}\n\tstatic of(value, options) {\n\t\treturn new MongoParamRef(value, options);\n\t}\n};\n//#endregion\nexport { MongoParamRef };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";AACA,IAAI,gBAAgB,MAAM,cAAc;CACvC;CACA;CACA;CACA;CACA,YAAY,OAAO,SAAS;EAC3B,KAAK,QAAQ;EACb,KAAK,OAAO,SAAS;EACrB,KAAK,UAAU,SAAS;EACxB,KAAK,aAAa,SAAS;EAC3B,OAAO,OAAO,IAAI;CACnB;CACA,OAAO,GAAG,OAAO,SAAS;EACzB,OAAO,IAAI,cAAc,OAAO,OAAO;CACxC;AACD"}
|
|
@@ -18,15 +18,6 @@ function newMongoCodecRegistry() {
|
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Construct a Mongo codec from author functions.
|
|
23
|
-
*
|
|
24
|
-
* Author `encode` and `decode` as sync or async functions; the factory produces a {@link MongoCodec} whose query-time methods follow the boundary contract documented on the framework {@link BaseCodec}. Authors receive a second `ctx` options argument carrying the per-call context; ignore it if you don't need it.
|
|
25
|
-
*
|
|
26
|
-
* Both `encode` and `decode` are required so `TInput` and `TWire` are always covered by an explicit author function — the factory installs no identity fallback. `encodeJson` and `decodeJson` default to identity **only when `TInput` is assignable to `JsonValue`**; otherwise both are required so the contract artifact stays JSON-safe.
|
|
27
|
-
*
|
|
28
|
-
* Codec-id-keyed static metadata (`traits`, `targetTypes`, `renderOutputType`) lives on the unified `CodecDescriptor` rather than on the codec instance itself (TML-2357).
|
|
29
|
-
*/
|
|
30
21
|
function mongoCodec(config) {
|
|
31
22
|
const identity = (v) => v;
|
|
32
23
|
const userEncode = config.encode;
|
|
@@ -55,4 +46,4 @@ function mongoCodec(config) {
|
|
|
55
46
|
//#endregion
|
|
56
47
|
export { newMongoCodecRegistry as n, mongoCodec as t };
|
|
57
48
|
|
|
58
|
-
//# sourceMappingURL=dist-
|
|
49
|
+
//# sourceMappingURL=dist-CqUoKyeL.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dist-CqUoKyeL.mjs","names":[],"sources":["../../../../2-mongo-family/1-foundation/mongo-codec/dist/index.mjs"],"sourcesContent":["import { structuredError } from \"@internal/utils/structured-error\";\n//#region src/codec-registry.ts\n/**\n* Create a new Mongo codec registry. Inline object literal — no class implementation; the registry is just a private `Map` with the documented surface methods.\n*/\nfunction newMongoCodecRegistry() {\n\tconst byId = /* @__PURE__ */ new Map();\n\treturn {\n\t\tget: (id) => byId.get(id),\n\t\thas: (id) => byId.has(id),\n\t\tregister: (codec) => {\n\t\t\tif (byId.has(codec.id)) throw structuredError(\"RUNTIME.DUPLICATE_CODEC\", `Codec with ID '${codec.id}' is already registered`);\n\t\t\tbyId.set(codec.id, codec);\n\t\t},\n\t\tvalues: () => byId.values(),\n\t\t[Symbol.iterator]: function* () {\n\t\t\tyield* byId.values();\n\t\t}\n\t};\n}\n//#endregion\n//#region src/codecs.ts\nfunction mongoCodec(config) {\n\tconst identity = (v) => v;\n\tconst userEncode = config.encode;\n\tconst userDecode = config.decode;\n\tconst widenedConfig = config;\n\treturn {\n\t\tid: config.typeId,\n\t\tencode: (value, ctx) => {\n\t\t\ttry {\n\t\t\t\treturn Promise.resolve(userEncode(value, ctx));\n\t\t\t} catch (error) {\n\t\t\t\treturn Promise.reject(error);\n\t\t\t}\n\t\t},\n\t\tdecode: (wire, ctx) => {\n\t\t\ttry {\n\t\t\t\treturn Promise.resolve(userDecode(wire, ctx));\n\t\t\t} catch (error) {\n\t\t\t\treturn Promise.reject(error);\n\t\t\t}\n\t\t},\n\t\tencodeJson: widenedConfig.encodeJson ?? identity,\n\t\tdecodeJson: widenedConfig.decodeJson ?? identity\n\t};\n}\n//#endregion\nexport { mongoCodec, newMongoCodecRegistry };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;AAKA,SAAS,wBAAwB;CAChC,MAAM,uBAAuB,IAAI,IAAI;CACrC,OAAO;EACN,MAAM,OAAO,KAAK,IAAI,EAAE;EACxB,MAAM,OAAO,KAAK,IAAI,EAAE;EACxB,WAAW,UAAU;GACpB,IAAI,KAAK,IAAI,MAAM,EAAE,GAAG,MAAM,gBAAgB,2BAA2B,kBAAkB,MAAM,GAAG,wBAAwB;GAC5H,KAAK,IAAI,MAAM,IAAI,KAAK;EACzB;EACA,cAAc,KAAK,OAAO;EAC1B,CAAC,OAAO,WAAW,aAAa;GAC/B,OAAO,KAAK,OAAO;EACpB;CACD;AACD;AAGA,SAAS,WAAW,QAAQ;CAC3B,MAAM,YAAY,MAAM;CACxB,MAAM,aAAa,OAAO;CAC1B,MAAM,aAAa,OAAO;CAC1B,MAAM,gBAAgB;CACtB,OAAO;EACN,IAAI,OAAO;EACX,SAAS,OAAO,QAAQ;GACvB,IAAI;IACH,OAAO,QAAQ,QAAQ,WAAW,OAAO,GAAG,CAAC;GAC9C,SAAS,OAAO;IACf,OAAO,QAAQ,OAAO,KAAK;GAC5B;EACD;EACA,SAAS,MAAM,QAAQ;GACtB,IAAI;IACH,OAAO,QAAQ,QAAQ,WAAW,MAAM,GAAG,CAAC;GAC7C,SAAS,OAAO;IACf,OAAO,QAAQ,OAAO,KAAK;GAC5B;EACD;EACA,YAAY,cAAc,cAAc;EACxC,YAAY,cAAc,cAAc;CACzC;AACD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./query-plan-C0-Yu8hf-
|
|
1
|
+
import "./query-plan-C0-Yu8hf-BnYfzKMn.mjs";
|
|
2
2
|
//#region ../../../2-mongo-family/4-query/query-ast/dist/exports/execution.d.mts
|
|
3
3
|
//#region src/result-types.d.ts
|
|
4
4
|
/**
|
|
@@ -45,4 +45,4 @@ type DeleteOneResult = DeleteResult;
|
|
|
45
45
|
type DeleteManyResult = DeleteResult;
|
|
46
46
|
//#endregion
|
|
47
47
|
export { InsertOneResult as a, UpdateResult as c, InsertManyResult as i, DeleteOneResult as n, UpdateManyResult as o, DeleteResult as r, UpdateOneResult as s, DeleteManyResult as t };
|
|
48
|
-
//# sourceMappingURL=execution-
|
|
48
|
+
//# sourceMappingURL=execution-BRC7ECq8.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-
|
|
1
|
+
{"version":3,"file":"execution-BRC7ECq8.d.mts","names":[],"sources":["../../../../2-mongo-family/4-query/query-ast/dist/exports/execution.d.mts"],"mappings":";;;;;;;;;;;;UAWU;WACC;;UAED;WACC,aAAa;WACb;;;;;;;;UAQD;WACC;WACA;WACA;WACA;;;KAGN,kBAAkB;;KAElB,mBAAmB;;;;UAId;WACC;;;KAGN,kBAAkB;;KAElB,mBAAmB"}
|
package/dist/family.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { E as defaultMongoStorageNamespaceId, T as defaultMongoDomainNamespaceId } from "./index-CLPkwReD.mjs";
|
|
2
|
-
import { i as MongoRunnerDependencies, n as MongoControlAdapter, r as MongoControlAdapterDescriptor, t as MarkerOperations } from "./control-adapter-Bh_ZraGM-
|
|
3
|
-
import { a as contractToMongoSchemaIR, c as formatMongoOperations, i as canonicalizeSchemasForVerification, l as mongoFamilyDescriptor, n as MongoControlFamilyInstance, o as createMongoFamilyInstance, r as MongoControlTargetDescriptor, s as diffMongoSchemas, t as MongoControlExtensionDescriptor, u as mongoOperationsToPreview } from "./control-
|
|
4
|
-
import "./control-adapter-
|
|
2
|
+
import { i as MongoRunnerDependencies, n as MongoControlAdapter, r as MongoControlAdapterDescriptor, t as MarkerOperations } from "./control-adapter-Bh_ZraGM-wsAkUbsg.mjs";
|
|
3
|
+
import { a as contractToMongoSchemaIR, c as formatMongoOperations, i as canonicalizeSchemasForVerification, l as mongoFamilyDescriptor, n as MongoControlFamilyInstance, o as createMongoFamilyInstance, r as MongoControlTargetDescriptor, s as diffMongoSchemas, t as MongoControlExtensionDescriptor, u as mongoOperationsToPreview } from "./control-DVqprwua.mjs";
|
|
4
|
+
import "./control-adapter-DnXw3tmo.mjs";
|
|
5
5
|
import { t as MongoContractView$1 } from "./mongo-contract-view-AnejqfrQ-CY4pMjqf.mjs";
|
|
6
6
|
import { n as MongoContractSerializerBase, r as MongoSchemaVerifierBase, t as MongoContractSerializer } from "./ir-B_vYXaaA.mjs";
|
|
7
|
-
import { t as MongoMigration } from "./migration-
|
|
7
|
+
import { t as MongoMigration } from "./migration-DAPtRIp2.mjs";
|
|
8
8
|
import { r as mongoFamilyPslBlockDescriptors, t as mongoFamilyEntityTypes } from "./pack-BUb_cutQ.mjs";
|
|
9
9
|
import { t as timestampNowRuntimeGenerator } from "./runtime-DO8ho7sX.mjs";
|
|
10
10
|
import { n as verifyMongoSchema, t as VerifyMongoSchemaOptions } from "./schema-verify-BA6qcG_p.mjs";
|
package/dist/family.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { d as defaultMongoStorageNamespaceId, u as defaultMongoDomainNamespaceId } from "./dist-Dvr-nVtl.mjs";
|
|
2
2
|
import { i as verifyMongoSchema, n as contractToMongoSchemaIR, r as diffMongoSchemas, t as canonicalizeSchemasForVerification } from "./verify-mongo-schema-B0bMHQW0-BuK0Jv5S.mjs";
|
|
3
|
-
import { n as mongoFamilyPslBlockDescriptors, t as mongoFamilyEntityTypes } from "./authoring-entity-types-
|
|
3
|
+
import { n as mongoFamilyPslBlockDescriptors, t as mongoFamilyEntityTypes } from "./authoring-entity-types-CZX-S_hY-w2tu7EVk.mjs";
|
|
4
4
|
import { n as MongoContractSerializerBase, t as MongoContractSerializer } from "./mongo-contract-serializer-DC_DM9_Y-BCyJeFBM.mjs";
|
|
5
|
-
import { i as mongoOperationsToPreview, n as formatMongoOperations, r as mongoFamilyDescriptor, t as createMongoFamilyInstance } from "./control-
|
|
5
|
+
import { i as mongoOperationsToPreview, n as formatMongoOperations, r as mongoFamilyDescriptor, t as createMongoFamilyInstance } from "./control-DRB8P8fy.mjs";
|
|
6
6
|
import { t as MongoContractView$1 } from "./mongo-contract-view-JZOa0Ry--Dm8a36wf.mjs";
|
|
7
7
|
import { t as MongoSchemaVerifierBase } from "./ir-vZWjElPY.mjs";
|
|
8
8
|
import { t as MongoMigration } from "./migration-DkhV-MNn.mjs";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as MongoRunnerDependencies, n as MongoControlAdapter, r as MongoControlAdapterDescriptor, t as MarkerOperations } from "./control-adapter-Bh_ZraGM-
|
|
2
|
-
import "./control-adapter-
|
|
1
|
+
import { i as MongoRunnerDependencies, n as MongoControlAdapter, r as MongoControlAdapterDescriptor, t as MarkerOperations } from "./control-adapter-Bh_ZraGM-wsAkUbsg.mjs";
|
|
2
|
+
import "./control-adapter-DnXw3tmo.mjs";
|
|
3
3
|
export type { MarkerOperations, MongoControlAdapter, MongoControlAdapterDescriptor, MongoRunnerDependencies };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as contractToMongoSchemaIR, c as formatMongoOperations, i as canonicalizeSchemasForVerification, l as mongoFamilyDescriptor, n as MongoControlFamilyInstance, o as createMongoFamilyInstance, r as MongoControlTargetDescriptor, s as diffMongoSchemas, t as MongoControlExtensionDescriptor, u as mongoOperationsToPreview } from "./control-
|
|
1
|
+
import { a as contractToMongoSchemaIR, c as formatMongoOperations, i as canonicalizeSchemasForVerification, l as mongoFamilyDescriptor, n as MongoControlFamilyInstance, o as createMongoFamilyInstance, r as MongoControlTargetDescriptor, s as diffMongoSchemas, t as MongoControlExtensionDescriptor, u as mongoOperationsToPreview } from "./control-DVqprwua.mjs";
|
|
2
2
|
export { type MongoControlExtensionDescriptor, type MongoControlFamilyInstance, type MongoControlTargetDescriptor, canonicalizeSchemasForVerification, contractToMongoSchemaIR, createMongoFamilyInstance, diffMongoSchemas, formatMongoOperations, mongoFamilyDescriptor, mongoOperationsToPreview };
|
package/dist/family__control.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as contractToMongoSchemaIR, r as diffMongoSchemas, t as canonicalizeSchemasForVerification } from "./verify-mongo-schema-B0bMHQW0-BuK0Jv5S.mjs";
|
|
2
|
-
import { i as mongoOperationsToPreview, n as formatMongoOperations, r as mongoFamilyDescriptor, t as createMongoFamilyInstance } from "./control-
|
|
2
|
+
import { i as mongoOperationsToPreview, n as formatMongoOperations, r as mongoFamilyDescriptor, t as createMongoFamilyInstance } from "./control-DRB8P8fy.mjs";
|
|
3
3
|
export { canonicalizeSchemasForVerification, contractToMongoSchemaIR, createMongoFamilyInstance, diffMongoSchemas, formatMongoOperations, mongoFamilyDescriptor, mongoOperationsToPreview };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as MongoMigration } from "./migration-
|
|
1
|
+
import { t as MongoMigration } from "./migration-DAPtRIp2.mjs";
|
|
2
2
|
export { MongoMigration as Migration };
|
package/dist/family__pack.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as mongoAttributeSpecs } from "./interpreter-
|
|
2
|
-
import { n as mongoFamilyPslBlockDescriptors, t as mongoFamilyEntityTypes } from "./authoring-entity-types-
|
|
1
|
+
import { i as mongoAttributeSpecs } from "./interpreter-EqDVFiIr-C-rDel_u.mjs";
|
|
2
|
+
import { n as mongoFamilyPslBlockDescriptors, t as mongoFamilyEntityTypes } from "./authoring-entity-types-CZX-S_hY-w2tu7EVk.mjs";
|
|
3
3
|
//#region ../../../2-mongo-family/9-family/dist/pack.mjs
|
|
4
4
|
const mongoFamilyPack = {
|
|
5
5
|
kind: "family",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"family__pack.mjs","names":[],"sources":["../../../../2-mongo-family/9-family/dist/pack.mjs"],"sourcesContent":["import { n as mongoFamilyPslBlockDescriptors, t as mongoFamilyEntityTypes } from \"./authoring-entity-types-
|
|
1
|
+
{"version":3,"file":"family__pack.mjs","names":[],"sources":["../../../../2-mongo-family/9-family/dist/pack.mjs"],"sourcesContent":["import { n as mongoFamilyPslBlockDescriptors, t as mongoFamilyEntityTypes } from \"./authoring-entity-types-CZX-S_hY.mjs\";\nimport { mongoAttributeSpecs } from \"@internal/mongo-contract-psl\";\n//#region src/exports/pack.ts\nconst mongoFamilyPack = {\n\tkind: \"family\",\n\tid: \"mongo\",\n\tfamilyId: \"mongo\",\n\tversion: \"0.0.1\",\n\tauthoring: {\n\t\tentityTypes: mongoFamilyEntityTypes,\n\t\tpslBlockDescriptors: mongoFamilyPslBlockDescriptors,\n\t\tattributeSpecs: mongoAttributeSpecs\n\t}\n};\n//#endregion\nexport { mongoFamilyPack as default, mongoFamilyEntityTypes, mongoFamilyPslBlockDescriptors };\n\n//# sourceMappingURL=pack.mjs.map"],"mappings":";;;AAGA,MAAM,kBAAkB;CACvB,MAAM;CACN,IAAI;CACJ,UAAU;CACV,SAAS;CACT,WAAW;EACV,aAAa;EACb,qBAAqB;EACrB,gBAAgB;CACjB;AACD"}
|
package/dist/{field-accessor-DHsAPiW3-DpQqiFg4.d.mts → field-accessor-DHsAPiW3-mPtxx6Gz.d.mts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { C as MongoContract, V as MongoModelsMap, a as ExtractMongoTypeMaps, o as InferModelRow, t as AnyMongoTypeMaps, w as MongoContractWithTypeMaps } from "./mongo-value-set-BngSUlOh-BhDGXjM_.mjs";
|
|
2
2
|
import "./index-CLPkwReD.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { B as MongoFilterExpr, d as MongoAggAccumulator, m as MongoAggExpr, vt as MongoUpdatePipelineStage } from "./query-plan-C0-Yu8hf-
|
|
5
|
-
import "./execution-
|
|
3
|
+
import { f as MongoValue } from "./index-9DDQlC5U.mjs";
|
|
4
|
+
import { B as MongoFilterExpr, d as MongoAggAccumulator, m as MongoAggExpr, vt as MongoUpdatePipelineStage } from "./query-plan-C0-Yu8hf-BnYfzKMn.mjs";
|
|
5
|
+
import "./execution-BRC7ECq8.mjs";
|
|
6
6
|
import { ContractValueObjectDefinitions } from "@prisma/orm-framework/contract/types";
|
|
7
7
|
//#region ../../../2-mongo-family/5-query-builders/query-builder/dist/field-accessor-DHsAPiW3.d.mts
|
|
8
8
|
//#region src/types.d.ts
|
|
@@ -585,4 +585,4 @@ declare function expr(predicate: TypedAggExpr<DocField>): MongoFilterExpr;
|
|
|
585
585
|
declare function createFieldAccessor<S extends DocShape, N extends NestedDocShape = Record<string, never>>(): FieldAccessor<S, N>;
|
|
586
586
|
//#endregion
|
|
587
587
|
export { TypedUpdateOp as A, ProjectedShape as C, StringField as D, SortSpec as E, expr as F, UpdaterResult as M, ValidPaths as N, TypedAccumulatorExpr as O, createFieldAccessor as P, PathCompletions as S, ResolveRow as T, NullableDocField as _, DocShape as a, ObjectExpression as b, FieldAccessor as c, LeafExpression as d, LiteralValue as f, NestedDocShape as g, ModelToDocShape as h, DocField as i, UnwoundShape as j, TypedAggExpr as k, GroupSpec as l, ModelNestedShape as m, BooleanField as n, Expression as o, ModelArrayField as p, DateField as r, ExtractDocShape as s, ArrayField as t, GroupedDocShape as u, NullableNumericField as v, ResolvePath as w, ObjectField as x, NumericField as y };
|
|
588
|
-
//# sourceMappingURL=field-accessor-DHsAPiW3-
|
|
588
|
+
//# sourceMappingURL=field-accessor-DHsAPiW3-mPtxx6Gz.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-accessor-DHsAPiW3-
|
|
1
|
+
{"version":3,"file":"field-accessor-DHsAPiW3-mPtxx6Gz.d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CodecTrait;
|
|
|
6
6
|
/**
|
|
7
7
|
* A codec for the Mongo target. Translates between an application value and the BSON-shaped wire form the Mongo driver exchanges, and between an application value and the JSON form stored in contract artifacts.
|
|
8
8
|
*
|
|
9
|
-
* Same shape as the framework codec base — see `Codec` in `@internal/framework-components/codec` for the contract. Codec-id-keyed static metadata (`traits`, `targetTypes`, `renderOutputType`) lives on the unified {@link import('@prisma/orm-framework/components/codec').CodecDescriptor}; Mongo's full migration to descriptor-side registration is tracked under TML-2324.
|
|
9
|
+
* Same shape as the framework codec base — see `Codec` in `@internal/framework-components/codec` for the contract — except that `decode` returns `TOutput`, which defaults to `TInput`, so a codec can read back a narrower type than it accepts on write. Codec-id-keyed static metadata (`traits`, `targetTypes`, `renderOutputType`) lives on the unified {@link import('@prisma/orm-framework/components/codec').CodecDescriptor}; Mongo's full migration to descriptor-side registration is tracked under TML-2324.
|
|
10
10
|
*/
|
|
11
|
-
interface MongoCodec<Id extends string = string, TTraits extends readonly MongoCodecTrait[] = readonly MongoCodecTrait[], TWire = unknown, TInput = unknown> extends Codec<Id, TTraits, TWire, TInput> {
|
|
11
|
+
interface MongoCodec<Id extends string = string, TTraits extends readonly MongoCodecTrait[] = readonly MongoCodecTrait[], TWire = unknown, TInput = unknown, TOutput = TInput> extends Omit<Codec<Id, TTraits, TWire, TInput>, 'decode'> {
|
|
12
|
+
decode(wire: TWire, ctx: CodecCallContext): Promise<TOutput>;
|
|
13
|
+
}
|
|
12
14
|
/**
|
|
13
15
|
* Conditional bundle for `encodeJson`/`decodeJson`: when `TInput` is structurally assignable to `JsonValue` the identity defaults are sound and both fields are optional; otherwise both fields are required so an author cannot silently produce a non-JSON-safe contract artifact.
|
|
14
16
|
*/
|
|
@@ -33,8 +35,16 @@ declare function mongoCodec<Id extends string, const TTraits extends readonly Mo
|
|
|
33
35
|
encode: (value: TInput, ctx: CodecCallContext) => TWire | Promise<TWire>;
|
|
34
36
|
decode: (wire: TWire, ctx: CodecCallContext) => TInput | Promise<TInput>;
|
|
35
37
|
} & JsonRoundTripConfig<TInput>): MongoCodec<Id, TTraits, TWire, TInput>;
|
|
36
|
-
/**
|
|
37
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Construct a Mongo codec whose `decode` returns `TOutput`, a type narrower than the `TInput` its `encode` takes. Pass all five type arguments.
|
|
40
|
+
*/
|
|
41
|
+
declare function mongoCodec<Id extends string, const TTraits extends readonly MongoCodecTrait[], TWire, TInput, TOutput extends TInput>(config: {
|
|
42
|
+
typeId: Id;
|
|
43
|
+
encode: (value: TInput, ctx: CodecCallContext) => TWire | Promise<TWire>;
|
|
44
|
+
decode: (wire: TWire, ctx: CodecCallContext) => TOutput | Promise<TOutput>;
|
|
45
|
+
} & JsonRoundTripConfig<TInput>): MongoCodec<Id, TTraits, TWire, TInput, TOutput>;
|
|
46
|
+
/** Extract the JS application type a Mongo codec's `encode` takes. `decode` returns the same type unless the codec declares a separate `TOutput`. */
|
|
47
|
+
type MongoCodecInput<T> = T extends MongoCodec<string, readonly MongoCodecTrait[], unknown, infer TInput, unknown> ? TInput : never;
|
|
38
48
|
//#endregion
|
|
39
49
|
//#region src/codec-registry.d.ts
|
|
40
50
|
interface MongoCodecRegistry {
|
|
@@ -50,4 +60,4 @@ interface MongoCodecRegistry {
|
|
|
50
60
|
declare function newMongoCodecRegistry(): MongoCodecRegistry;
|
|
51
61
|
//#endregion
|
|
52
62
|
export { mongoCodec as a, MongoCodecTrait as i, MongoCodecInput as n, newMongoCodecRegistry as o, MongoCodecRegistry as r, MongoCodec as t };
|
|
53
|
-
//# sourceMappingURL=index
|
|
63
|
+
//# sourceMappingURL=index--ynTw_5M.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index--ynTw_5M.d.mts","names":[],"sources":["../../../../2-mongo-family/1-foundation/mongo-codec/dist/index.d.mts"],"mappings":";;;;KAGK,kBAAkB;;;;;;UAMb,WAAW,4BAA4B,yBAAyB,6BAA6B,mBAAmB,iBAAiB,kBAAkB,UAAU,gBAAgB,KAAK,MAAM,IAAI,SAAS,OAAO;EACpN,OAAO,MAAM,OAAO,KAAK,mBAAmB,QAAQ;;;;;KAKjD,oBAAoB,WAAW,iBAAiB;EACnD,cAAc,OAAO,WAAW;EAChC,cAAc,MAAM,cAAc;;EAElC,aAAa,OAAO,WAAW;EAC/B,aAAa,MAAM,cAAc;;;;;;;;;;;iBAWlB,WAAW,yBAAyB,yBAAyB,iCAAiC,iBAAiB,kBAAkB;EAChJ,QAAQ;EACR,SAAS,OAAO,QAAQ,KAAK,qBAAqB,QAAQ,QAAQ;EAClE,SAAS,MAAM,OAAO,KAAK,qBAAqB,SAAS,QAAQ;IAC/D,oBAAoB,UAAU,WAAW,IAAI,SAAS,OAAO;;;;iBAIhD,WAAW,yBAAyB,yBAAyB,mBAAmB,OAAO,QAAQ,gBAAgB,QAAQ;EACtI,QAAQ;EACR,SAAS,OAAO,QAAQ,KAAK,qBAAqB,QAAQ,QAAQ;EAClE,SAAS,MAAM,OAAO,KAAK,qBAAqB,UAAU,QAAQ;IAChE,oBAAoB,UAAU,WAAW,IAAI,SAAS,OAAO,QAAQ;;KAEpE,gBAAgB,KAAK,UAAU,4BAA4B,kCAAkC,mBAAmB;;;UAG3G;EACR,IAAI,aAAa;EACjB,IAAI;EACJ,SAAS,OAAO;GACf,OAAO,aAAa,SAAS;EAC9B,UAAU,iBAAiB;;;;;iBAKZ,yBAAyB"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
//#region ../../../2-mongo-family/1-foundation/mongo-value/dist/index.d.mts
|
|
2
|
+
//#region src/bson-value.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* A BSON scalar as the driver reads it. Structural, because values come from the driver's own copy of `bson`, not the classes this package could import.
|
|
5
|
+
*/
|
|
6
|
+
type BsonScalar = string | number | boolean | null | Date | RegExp | {
|
|
7
|
+
readonly _bsontype: 'ObjectId';
|
|
8
|
+
toHexString(): string;
|
|
9
|
+
} | {
|
|
10
|
+
readonly _bsontype: 'Long';
|
|
11
|
+
toBigInt(): bigint;
|
|
12
|
+
} | {
|
|
13
|
+
readonly _bsontype: 'Decimal128';
|
|
14
|
+
toString(): string;
|
|
15
|
+
} | {
|
|
16
|
+
readonly _bsontype: 'Binary';
|
|
17
|
+
value(): Uint8Array;
|
|
18
|
+
readonly sub_type: number;
|
|
19
|
+
} | {
|
|
20
|
+
readonly _bsontype: 'BSONRegExp';
|
|
21
|
+
readonly pattern: string;
|
|
22
|
+
readonly options: string;
|
|
23
|
+
} | {
|
|
24
|
+
readonly _bsontype: 'Timestamp';
|
|
25
|
+
toBigInt(): bigint;
|
|
26
|
+
} | {
|
|
27
|
+
readonly _bsontype: 'Int32';
|
|
28
|
+
valueOf(): number;
|
|
29
|
+
} | {
|
|
30
|
+
readonly _bsontype: 'Double';
|
|
31
|
+
valueOf(): number;
|
|
32
|
+
} | {
|
|
33
|
+
readonly _bsontype: 'Code';
|
|
34
|
+
readonly code: string;
|
|
35
|
+
readonly scope?: {
|
|
36
|
+
readonly [key: string]: BsonValue;
|
|
37
|
+
} | null;
|
|
38
|
+
} | {
|
|
39
|
+
readonly _bsontype: 'MinKey';
|
|
40
|
+
} | {
|
|
41
|
+
readonly _bsontype: 'MaxKey';
|
|
42
|
+
} | {
|
|
43
|
+
readonly _bsontype: 'BSONSymbol';
|
|
44
|
+
valueOf(): string;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Any BSON value: a scalar, an array of values, or a document of values.
|
|
48
|
+
*/
|
|
49
|
+
type BsonValue = BsonScalar | ReadonlyArray<BsonValue> | {
|
|
50
|
+
readonly [key: string]: BsonValue;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* What a `Bson` field accepts on write: any `BsonValue`, and also a `Uint8Array` or `Buffer` at any depth, which the driver writes as binData subtype 0 and reads back as `Binary`.
|
|
54
|
+
*/
|
|
55
|
+
type BsonInputValue = BsonScalar | Uint8Array | ReadonlyArray<BsonInputValue> | {
|
|
56
|
+
readonly [key: string]: BsonInputValue;
|
|
57
|
+
};
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/param-ref.d.ts
|
|
60
|
+
interface MongoParamRefOptions {
|
|
61
|
+
readonly name?: string;
|
|
62
|
+
readonly codecId?: string;
|
|
63
|
+
readonly collection?: string;
|
|
64
|
+
}
|
|
65
|
+
declare class MongoParamRef {
|
|
66
|
+
readonly value: unknown;
|
|
67
|
+
readonly name: string | undefined;
|
|
68
|
+
readonly codecId: string | undefined;
|
|
69
|
+
readonly collection: string | undefined;
|
|
70
|
+
constructor(value: unknown, options?: MongoParamRefOptions);
|
|
71
|
+
static of(value: unknown, options?: MongoParamRefOptions): MongoParamRef;
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/values.d.ts
|
|
75
|
+
type LiteralValue = string | number | boolean | null | Date;
|
|
76
|
+
type MongoValue = MongoParamRef | LiteralValue | MongoDocument | MongoArray;
|
|
77
|
+
interface MongoDocument {
|
|
78
|
+
readonly [key: string]: MongoValue;
|
|
79
|
+
}
|
|
80
|
+
interface MongoArray extends ReadonlyArray<MongoValue> {}
|
|
81
|
+
type MongoExpr = MongoDocument;
|
|
82
|
+
type MongoUpdateDocument = Record<string, MongoValue>;
|
|
83
|
+
type RawPipeline = ReadonlyArray<Record<string, unknown>>;
|
|
84
|
+
type Document = Record<string, unknown>;
|
|
85
|
+
//#endregion
|
|
86
|
+
export { LiteralValue as a, MongoExpr as c, MongoUpdateDocument as d, MongoValue as f, Document as i, MongoParamRef as l, BsonScalar as n, MongoArray as o, RawPipeline as p, BsonValue as r, MongoDocument as s, BsonInputValue as t, MongoParamRefOptions as u };
|
|
87
|
+
//# sourceMappingURL=index-9DDQlC5U.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-9DDQlC5U.d.mts","names":[],"sources":["../../../../2-mongo-family/1-foundation/mongo-value/dist/index.d.mts"],"mappings":";;;;;KAIK,gDAAgD,OAAO;WACjD;EACT;;WAES;EACT;;WAES;EACT;;WAES;EACT,SAAS;WACA;;WAEA;WACA;WACA;;WAEA;EACT;;WAES;EACT;;WAES;EACT;;WAES;WACA;WACA;cACG,cAAc;;;WAGjB;;WAEA;;WAEA;EACT;;;;;KAKG,YAAY,aAAa,cAAc;YAChC,cAAc;;;;;KAKrB,iBAAiB,aAAa,aAAa,cAAc;YAClD,cAAc;;;;UAIhB;WACC;WACA;WACA;;cAEG;WACH;WACA;WACA;WACA;EACT,YAAY,gBAAgB,UAAU;SAC/B,GAAG,gBAAgB,UAAU,uBAAuB;;;;KAIxD,kDAAkD;KAClD,aAAa,gBAAgB,eAAe,gBAAgB;UACvD;YACE,cAAc;;UAEhB,mBAAmB,cAAc;KACtC,YAAY;KACZ,sBAAsB,eAAe;KACrC,cAAc,cAAc;KAC5B,WAAW"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as CreateCollectionOptions, r as CreateIndexesOptions, t as CollationOptions } from "./mongodb-types-B4HmhF1S.mjs";
|
|
2
2
|
import { j as MongoIndexKeyDirection } from "./mongo-value-set-BngSUlOh-BhDGXjM_.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { a as CollModOptions, l as CreateIndexOptions, s as CreateCollectionOptions$1 } from "./control-
|
|
5
|
-
import "./execution-
|
|
3
|
+
import { i as Document, p as RawPipeline } from "./index-9DDQlC5U.mjs";
|
|
4
|
+
import { a as CollModOptions, l as CreateIndexOptions, s as CreateCollectionOptions$1 } from "./control-BKLGhv19.mjs";
|
|
5
|
+
import "./execution-BRC7ECq8.mjs";
|
|
6
6
|
//#region ../../../2-mongo-family/6-transport/mongo-wire/dist/index.d.mts
|
|
7
7
|
//#region src/wire-commands.d.ts
|
|
8
8
|
declare abstract class MongoWireCommand {
|
|
@@ -133,4 +133,4 @@ type AnyMongoWireCommand = AnyMongoDmlWireCommand | AnyMongoDdlWireCommand;
|
|
|
133
133
|
declare function isDdlWireCommand(cmd: AnyMongoWireCommand): cmd is AnyMongoDdlWireCommand;
|
|
134
134
|
//#endregion
|
|
135
135
|
export { UpdateOneWireCommand as _, CollModWireCommand as a, DeleteManyWireCommand as c, DropIndexWireCommand as d, FindOneAndDeleteWireCommand as f, UpdateManyWireCommand as g, InsertOneWireCommand as h, AnyMongoWireCommand as i, DeleteOneWireCommand as l, InsertManyWireCommand as m, AnyMongoDdlWireCommand as n, CreateCollectionWireCommand as o, FindOneAndUpdateWireCommand as p, AnyMongoDmlWireCommand as r, CreateIndexWireCommand as s, AggregateWireCommand as t, DropCollectionWireCommand as u, isDdlWireCommand as v };
|
|
136
|
-
//# sourceMappingURL=index-
|
|
136
|
+
//# sourceMappingURL=index-BfTXOq5S.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-BfTXOq5S.d.mts","names":[],"sources":["../../../../2-mongo-family/6-transport/mongo-wire/dist/index.d.mts"],"mappings":";;;;;;;uBAKuB;oBACH;WACT;YACC,YAAY;YACZ;;cAEE,6BAA6B;WAChC;WACA,UAAU;EACnB,YAAY,oBAAoB,UAAU;;cAE9B,6BAA6B;WAChC;WACA,QAAQ;WACR,QAAQ,WAAW,cAAc;WACjC;EACT,YAAY,oBAAoB,QAAQ,UAAU,QAAQ,WAAW,cAAc,WAAW;;cAElF,6BAA6B;WAChC;WACA,QAAQ;EACjB,YAAY,oBAAoB,QAAQ;;cAE5B,8BAA8B;WACjC;WACA,WAAW,cAAc;EAClC,YAAY,oBAAoB,WAAW,cAAc;;cAE7C,8BAA8B;WACjC;WACA,QAAQ;WACR,QAAQ,WAAW,cAAc;WACjC;EACT,YAAY,oBAAoB,QAAQ,UAAU,QAAQ,WAAW,cAAc,WAAW;;cAElF,8BAA8B;WACjC;WACA,QAAQ;EACjB,YAAY,oBAAoB,QAAQ;;cAE5B,oCAAoC;WACvC;WACA,QAAQ;WACR,QAAQ,WAAW,cAAc;WACjC;WACA,MAAM;;;;;WAKN;EACT,YAAY,oBAAoB,QAAQ,UAAU,QAAQ,WAAW,cAAc,WAAW,kBAAkB,OAAO,wBAAwB;;cAEnI,oCAAoC;WACvC;WACA,QAAQ;WACR,MAAM;EACf,YAAY,oBAAoB,QAAQ,UAAU,OAAO;;cAE7C,6BAA6B;WAChC;WACA,UAAU;EACnB,YAAY,oBAAoB,UAAU;;cAE9B,oCAAoC,4BAA4B;WACnE;WACA,YAAY;WACZ;WACA;WACA;WACA;WACA;WACA;IACP;IACA;IACA;;WAEO,YAAY;WACZ;IACP;;WAEO;IACP,KAAK;IACL;IACA;;EAEF,YAAY,oBAAoB,SAAS;;cAE7B,+BAA+B,4BAA4B;WAC9D;WACA,KAAK,eAAe;WACpB;WACA;WACA;WACA,0BAA0B;WAC1B;WACA,qBAAqB;WACrB,YAAY;WACZ,UAAU;WACV;WACA;EACT,YAAY,oBAAoB,KAAK,eAAe,yBAAyB,SAAS;;cAE1E,kCAAkC;WACrC;EACT,YAAY;;cAEA,6BAA6B;WAChC;WACA;EACT,YAAY,oBAAoB;;cAEpB,2BAA2B;WAC9B;WACA,YAAY;WACZ;WACA;WACA;IACP;;EAEF,YAAY,oBAAoB,SAAS;;KAEtC,yBAAyB,uBAAuB,wBAAwB,uBAAuB,wBAAwB,uBAAuB,wBAAwB,8BAA8B,8BAA8B;KAClO,yBAAyB,8BAA8B,yBAAyB,4BAA4B,uBAAuB;KACnI,sBAAsB,yBAAyB;iBACnC,iBAAiB,KAAK,sBAAsB,OAAO"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { rt as MongoQueryPlan } from "./query-plan-C0-Yu8hf-
|
|
2
|
-
import { t as AnyMongoDdlCommand } from "./control-
|
|
3
|
-
import "./execution-
|
|
4
|
-
import { i as AnyMongoWireCommand, n as AnyMongoDdlWireCommand, r as AnyMongoDmlWireCommand } from "./index-
|
|
1
|
+
import { rt as MongoQueryPlan } from "./query-plan-C0-Yu8hf-BnYfzKMn.mjs";
|
|
2
|
+
import { t as AnyMongoDdlCommand } from "./control-BKLGhv19.mjs";
|
|
3
|
+
import "./execution-BRC7ECq8.mjs";
|
|
4
|
+
import { i as AnyMongoWireCommand, n as AnyMongoDdlWireCommand, r as AnyMongoDmlWireCommand } from "./index-BfTXOq5S.mjs";
|
|
5
5
|
import { ControlDriverInstance } from "@prisma/orm-framework/components/control";
|
|
6
6
|
import { CodecCallContext } from "@prisma/orm-framework/components/codec";
|
|
7
7
|
import { Db } from "mongodb";
|
|
@@ -148,4 +148,4 @@ interface MongoControlDriverInstance extends ControlDriverInstance<'mongo', 'mon
|
|
|
148
148
|
}
|
|
149
149
|
//#endregion
|
|
150
150
|
export { MongoLoweredDraft as a, MongoDriver as i, MongoControlDriverInstance as n, MongoDdlPlan as r, MongoAdapter as t };
|
|
151
|
-
//# sourceMappingURL=index-
|
|
151
|
+
//# sourceMappingURL=index-RT8HbGQG.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-RT8HbGQG.d.mts","names":[],"sources":["../../../../2-mongo-family/6-transport/mongo-lowering/dist/index.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;KAkBK;WACM;WACA;WACA,UAAU;;WAEV;WACA;WACA,WAAW,cAAc;;WAEzB;WACA;WACA,QAAQ;WACR,QAAQ,0BAA0B,cAAc;WAChD;;WAEA;WACA;WACA,QAAQ;WACR,QAAQ,0BAA0B,cAAc;WAChD;;WAEA;WACA;WACA,QAAQ;;WAER;WACA;WACA,QAAQ;;WAER;WACA;WACA,QAAQ;WACR,QAAQ,0BAA0B,cAAc;WAChD;WACA,MAAM;WACN;;WAEA;WACA;WACA,QAAQ;WACR,MAAM;;WAEN;WACA;WACA,UAAU,cAAc;;WAExB;WACA;WACA,UAAU;;WAEV;WACA;WACA,WAAW,cAAc;;WAEzB;WACA;WACA,QAAQ;WACR,QAAQ,0BAA0B,cAAc;;WAEhD;WACA;WACA,QAAQ;WACR,QAAQ,0BAA0B,cAAc;;WAEhD;WACA;WACA,QAAQ;;WAER;WACA;WACA,QAAQ;;WAER;WACA;WACA,QAAQ;WACR,QAAQ,0BAA0B,cAAc;WAChD;WACA,MAAM;WACN;;WAEA;WACA;WACA,QAAQ;WACR,MAAM;;WAEN;WACA;WACA,UAAU,cAAc;;;UAGzB;WACC,SAAS;;UAEV;EACR,MAAM,MAAM,cAAc,KAAK,mBAAmB,QAAQ;EAC1D,MAAM,MAAM,gBAAgB,KAAK,mBAAmB,QAAQ;EAC5D,MAAM,MAAM,iBAAiB,cAAc,KAAK,mBAAmB,QAAQ;;;;;;;;;;;EAW3E,gBAAgB,MAAM,iBAAiB;;;;;;;;;EASvC,cAAc,OAAO,mBAAmB,KAAK,mBAAmB,QAAQ;;;;UAIhE;EACR,QAAQ,KAAK,aAAa,yBAAyB,cAAc;EACjE,IAAI,aAAa,yBAAyB;EAC1C,SAAS;;UAED,mCAAmC,yCAAyC;WAC3E,IAAI"}
|
|
@@ -11,23 +11,29 @@ import { bool, createBinder, createPslDiagnosticCollector, diagnosticSource, ent
|
|
|
11
11
|
import { claimedBlockKeywords, consumeInvalidFkPairing, enumMemberAttributeDiagnostics, fkRelationPairKey, instantiatePslFieldPreset, reportUncomposedNamespace, reportUnknownFieldPreset, requiredOneToOneBackrelationDiagnostic, unsupportedBlockDiagnostic } from "@prisma/orm-framework/psl-parser/interpret";
|
|
12
12
|
import { assertDefined } from "@prisma/orm-framework/utils/assertions";
|
|
13
13
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
14
|
-
//#region ../../../2-mongo-family/2-authoring/contract-psl/dist/interpreter-
|
|
14
|
+
//#region ../../../2-mongo-family/2-authoring/contract-psl/dist/interpreter-EqDVFiIr.mjs
|
|
15
15
|
/**
|
|
16
|
-
* `
|
|
16
|
+
* The `bsonType` keyword for a list of BSON type names: the name itself for one entry, the list for several.
|
|
17
17
|
*/
|
|
18
|
-
function
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
function bsonTypeKeyword(bsonTypes) {
|
|
19
|
+
const [only, ...rest] = bsonTypes;
|
|
20
|
+
return only !== void 0 && rest.length === 0 ? only : [...bsonTypes];
|
|
21
|
+
}
|
|
22
|
+
function withNull(bsonTypes) {
|
|
23
|
+
return bsonTypes.includes("null") ? bsonTypes : ["null", ...bsonTypes];
|
|
24
|
+
}
|
|
25
|
+
function anyValueSchema(field) {
|
|
26
|
+
return "many" in field && field.many ? {
|
|
27
|
+
bsonType: "array",
|
|
28
|
+
items: {}
|
|
29
|
+
} : {};
|
|
22
30
|
}
|
|
23
31
|
function fieldToBsonSchema(field, valueObjects, codecLookup, valueSets) {
|
|
24
32
|
if (field.type.kind === "scalar") {
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
27
|
-
if (
|
|
28
|
-
|
|
29
|
-
items: {}
|
|
30
|
-
} : {};
|
|
33
|
+
const bsonTypes = codecLookup?.targetTypesFor(field.type.codecId);
|
|
34
|
+
if (bsonTypes === void 0) return void 0;
|
|
35
|
+
if (bsonTypes.length === 0) return anyValueSchema(field);
|
|
36
|
+
const bsonType = bsonTypeKeyword(bsonTypes);
|
|
31
37
|
const enumValues = field.valueSet !== void 0 ? valueSets?.[field.valueSet.entityName]?.values ?? null : null;
|
|
32
38
|
if ("many" in field && field.many) {
|
|
33
39
|
const items = { bsonType };
|
|
@@ -38,7 +44,7 @@ function fieldToBsonSchema(field, valueObjects, codecLookup, valueSets) {
|
|
|
38
44
|
};
|
|
39
45
|
}
|
|
40
46
|
if (field.nullable) {
|
|
41
|
-
const s = { bsonType:
|
|
47
|
+
const s = { bsonType: bsonTypeKeyword(withNull(bsonTypes)) };
|
|
42
48
|
if (enumValues) s["enum"] = [...enumValues, null];
|
|
43
49
|
return s;
|
|
44
50
|
}
|
|
@@ -1690,4 +1696,4 @@ function interpretPslDocumentToMongoContract(input) {
|
|
|
1690
1696
|
//#endregion
|
|
1691
1697
|
export { pairMongoBackRelations as a, mongoAttributeSpecs as i, derivePolymorphicJsonSchema as n, interpretPslDocumentToMongoContract as r, deriveJsonSchema as t };
|
|
1692
1698
|
|
|
1693
|
-
//# sourceMappingURL=interpreter-
|
|
1699
|
+
//# sourceMappingURL=interpreter-EqDVFiIr-C-rDel_u.mjs.map
|