@prisma/orm-target-mongo 8.0.0-rc.20-dev.14 → 8.0.0-rc.20-dev.15

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.
@@ -3,15 +3,10 @@ import { A as isBase64Text, B as mongoInt32, G as mongoTextDataTypes, H as mongo
3
3
  import { t as mongoTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-BaRbjvD7-D0786_Lv.mjs";
4
4
  import { structuredError } from "@prisma/orm-framework/utils/structured-error";
5
5
  import { createNumberClassifier, isoDateStringText, numeralText, parseJsonText, printJsonText, signedRange } from "@prisma/orm-framework/components/codec";
6
- import { TIMESTAMP_NOW_GENERATOR_ID, temporalAuthoringPresets, temporalCodecPreset, temporalTypeAliases } from "@prisma/orm-framework/components/authoring";
6
+ import { TIMESTAMP_NOW_GENERATOR_ID, temporalTypeAliases } from "@prisma/orm-framework/components/authoring";
7
7
  import { singleGeneratorBinding } from "@prisma/orm-framework/components/components";
8
- //#region ../../../3-targets/mongo/1-target/dist/descriptor-meta-DTj807jv.mjs
9
- const mongoDateStorage = { codecId: MONGO_DATE_CODEC_ID };
10
- const mongoAuthoringFieldPresets = { temporal: {
11
- ...temporalAuthoringPresets(mongoDateStorage),
12
- timestamp: temporalCodecPreset(mongoDateStorage)
13
- } };
14
- const mongoAuthoringTypes = { temporal: temporalTypeAliases(mongoDateStorage, "a JavaScript Date") };
8
+ //#region ../../../3-targets/mongo/1-target/dist/descriptor-meta-DU1EhCii.mjs
9
+ const mongoAuthoringTypes = { temporal: temporalTypeAliases({ codecId: MONGO_DATE_CODEC_ID }, "a JavaScript Date") };
15
10
  const classifyAsDecimal = createNumberClassifier({
16
11
  integers: [{
17
12
  type: mongoInt32.id,
@@ -123,7 +118,6 @@ const mongoTargetDescriptorMeta = {
123
118
  ...mongoTargetDescriptorMetaRuntime,
124
119
  authoring: {
125
120
  type: mongoAuthoringTypes,
126
- field: mongoAuthoringFieldPresets,
127
121
  dataTypes: mongoDataTypeEntries(),
128
122
  textDataTypes: mongoTextDataTypes
129
123
  },
@@ -143,4 +137,4 @@ const mongoTargetDescriptorMeta = {
143
137
  //#endregion
144
138
  export { mongoTargetDescriptorMeta as t };
145
139
 
146
- //# sourceMappingURL=descriptor-meta-DTj807jv-CjvK2XDD.mjs.map
140
+ //# sourceMappingURL=descriptor-meta-DU1EhCii-BJ2e8_WL.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"descriptor-meta-DU1EhCii-BJ2e8_WL.mjs","names":[],"sources":["../../../../3-targets/mongo/1-target/dist/descriptor-meta-DU1EhCii.mjs"],"sourcesContent":["import { i as MONGO_DATE_CODEC_ID } from \"./codec-ids-WdrumsYA.mjs\";\nimport { L as decimal128HoldsExactly, Y as isBase64Text, a as mongoDate, c as mongoInt32, f as mongoString, l as mongoInt64, n as mongoBool, o as mongoDecimal128, p as mongoTextDataTypes, s as mongoDouble, t as mongoBinary, u as mongoJson } from \"./data-types-hoKLBrYZ.mjs\";\nimport { t as mongoTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-BaRbjvD7.mjs\";\nimport { TIMESTAMP_NOW_GENERATOR_ID, temporalTypeAliases } from \"@internal/framework-components/authoring\";\nimport { singleGeneratorBinding } from \"@internal/framework-components/components\";\nimport { createNumberClassifier, isoDateStringText, numeralText, parseJsonText, printJsonText, signedRange } from \"@internal/framework-components/codec\";\nimport { structuredError } from \"@internal/utils/structured-error\";\n//#region src/core/authoring.ts\nconst mongoAuthoringTypes = { temporal: temporalTypeAliases({ codecId: MONGO_DATE_CODEC_ID }, \"a JavaScript Date\") };\n//#endregion\n//#region src/core/data-type-entries.ts\nconst classifyAsDecimal = createNumberClassifier({\n\tintegers: [{\n\t\ttype: mongoInt32.id,\n\t\tform: \"number\",\n\t\t...signedRange(32)\n\t}, {\n\t\ttype: mongoInt64.id,\n\t\tform: \"text\",\n\t\t...signedRange(64)\n\t}],\n\tlargerWhole: {\n\t\ttype: mongoDecimal128.id,\n\t\tform: \"text\"\n\t},\n\tfraction: {\n\t\ttype: mongoDecimal128.id,\n\t\tform: \"text\"\n\t},\n\twords: {\n\t\ttype: mongoDecimal128.id,\n\t\tform: \"text\"\n\t}\n});\n/** The type of a written number: a `decimal` only when a Decimal128 holds it exactly, else the `double` nearest it. */\nfunction classifyMongoNumber(text) {\n\tconst classified = classifyAsDecimal(text);\n\tif (classified?.type !== mongoDecimal128.id || decimal128HoldsExactly(String(classified.value))) return classified;\n\tconst double = Number(text);\n\treturn Number.isFinite(double) ? {\n\t\ttype: mongoDouble.id,\n\t\tvalue: double\n\t} : void 0;\n}\nfunction printNumber(value) {\n\treturn typeof value === \"number\" ? numeralText(value) : String(value);\n}\nfunction base64Text(text) {\n\tif (isBase64Text(text)) return text;\n\tthrow structuredError(\"CONTRACT.CAST_REFUSED\", `\"${text}\" is not base64 text: write the bytes in base64, as in binary\\`aGVsbG8=\\`.`, {\n\t\twhy: \"The binary tag reads bytes as base64, as MongoDB prints them.\",\n\t\tfix: \"Write the bytes in base64, as in binary`aGVsbG8=`.\"\n\t});\n}\nfunction mongoDataTypeEntries() {\n\treturn {\n\t\t[mongoString.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"plain\",\n\t\t\t\tsyntax: \"string\",\n\t\t\t\tparse: (text) => text\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"Text.\"\n\t\t},\n\t\t[mongoBool.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"plain\",\n\t\t\t\tsyntax: \"boolean\",\n\t\t\t\tparse: (text) => text === \"true\"\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"A boolean, written true or false.\"\n\t\t},\n\t\t[mongoDouble.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"plain\",\n\t\t\t\tsyntax: \"number\",\n\t\t\t\ttypes: [\n\t\t\t\t\tmongoInt32.id,\n\t\t\t\t\tmongoInt64.id,\n\t\t\t\t\tmongoDecimal128.id,\n\t\t\t\t\tmongoDouble.id\n\t\t\t\t],\n\t\t\t\tclassify: classifyMongoNumber\n\t\t\t},\n\t\t\tprint: printNumber,\n\t\t\tdocumentation: \"A number: an int in 32 bits, a long in 64, a decimal when a Decimal128 holds it exactly, NaN and the infinities included, and a double otherwise.\"\n\t\t},\n\t\t[mongoDate.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"tag\",\n\t\t\t\ttag: \"date\",\n\t\t\t\tparse: (text) => isoDateStringText(text, mongoDate.id)\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"An instant, as in date`2024-01-01T00:00:00Z`. Reads ISO 8601 with a UTC offset and stores the instant in UTC with three fraction digits, as Date.toISOString() writes it.\"\n\t\t},\n\t\t[mongoBinary.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"tag\",\n\t\t\t\ttag: \"binary\",\n\t\t\t\tparse: base64Text\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"Bytes, written in base64 as MongoDB prints them, as in binary`aGVsbG8=`.\"\n\t\t},\n\t\t[mongoJson.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"tag\",\n\t\t\t\ttag: \"json\",\n\t\t\t\tparse: parseJsonText\n\t\t\t},\n\t\t\tprint: printJsonText,\n\t\t\tdocumentation: \"Reads the text as a JSON document and stores it as the value.\"\n\t\t}\n\t};\n}\nconst mongoTargetDescriptorMeta = {\n\t...mongoTargetDescriptorMetaRuntime,\n\tauthoring: {\n\t\ttype: mongoAuthoringTypes,\n\t\tdataTypes: mongoDataTypeEntries(),\n\t\ttextDataTypes: mongoTextDataTypes\n\t},\n\tcontrolMutationDefaults: {\n\t\tdefaultFunctionRegistry: /* @__PURE__ */ new Map(),\n\t\tgeneratorDescriptors: [{ id: TIMESTAMP_NOW_GENERATOR_ID }]\n\t},\n\tgeneratorFunctions: [{\n\t\tname: \"now\",\n\t\tsignature: { documentation: \"Writes the current time.\" },\n\t\tbindings: [singleGeneratorBinding({\n\t\t\tcodecIds: [MONGO_DATE_CODEC_ID],\n\t\t\tgeneratorId: TIMESTAMP_NOW_GENERATOR_ID\n\t\t})]\n\t}]\n};\n//#endregion\nexport { mongoTargetDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-DU1EhCii.mjs.map"],"mappings":";;;;;;;;AAQA,MAAM,sBAAsB,EAAE,UAAU,oBAAoB,EAAE,SAAS,oBAAoB,GAAG,mBAAmB,EAAE;AAGnH,MAAM,oBAAoB,uBAAuB;CAChD,UAAU,CAAC;EACV,MAAM,WAAW;EACjB,MAAM;EACN,GAAG,YAAY,EAAE;CAClB,GAAG;EACF,MAAM,WAAW;EACjB,MAAM;EACN,GAAG,YAAY,EAAE;CAClB,CAAC;CACD,aAAa;EACZ,MAAM,gBAAgB;EACtB,MAAM;CACP;CACA,UAAU;EACT,MAAM,gBAAgB;EACtB,MAAM;CACP;CACA,OAAO;EACN,MAAM,gBAAgB;EACtB,MAAM;CACP;AACD,CAAC;;AAED,SAAS,oBAAoB,MAAM;CAClC,MAAM,aAAa,kBAAkB,IAAI;CACzC,IAAI,YAAY,SAAS,gBAAgB,MAAM,uBAAuB,OAAO,WAAW,KAAK,CAAC,GAAG,OAAO;CACxG,MAAM,SAAS,OAAO,IAAI;CAC1B,OAAO,OAAO,SAAS,MAAM,IAAI;EAChC,MAAM,YAAY;EAClB,OAAO;CACR,IAAI,KAAK;AACV;AACA,SAAS,YAAY,OAAO;CAC3B,OAAO,OAAO,UAAU,WAAW,YAAY,KAAK,IAAI,OAAO,KAAK;AACrE;AACA,SAAS,WAAW,MAAM;CACzB,IAAI,aAAa,IAAI,GAAG,OAAO;CAC/B,MAAM,gBAAgB,yBAAyB,IAAI,KAAK,6EAA6E;EACpI,KAAK;EACL,KAAK;CACN,CAAC;AACF;AACA,SAAS,uBAAuB;CAC/B,OAAO;GACL,YAAY,KAAK;GACjB,SAAS;IACR,MAAM;IACN,QAAQ;IACR,QAAQ,SAAS;GAClB;GACA,QAAQ,UAAU,OAAO,KAAK;GAC9B,eAAe;EAChB;GACC,UAAU,KAAK;GACf,SAAS;IACR,MAAM;IACN,QAAQ;IACR,QAAQ,SAAS,SAAS;GAC3B;GACA,QAAQ,UAAU,OAAO,KAAK;GAC9B,eAAe;EAChB;GACC,YAAY,KAAK;GACjB,SAAS;IACR,MAAM;IACN,QAAQ;IACR,OAAO;KACN,WAAW;KACX,WAAW;KACX,gBAAgB;KAChB,YAAY;IACb;IACA,UAAU;GACX;GACA,OAAO;GACP,eAAe;EAChB;GACC,UAAU,KAAK;GACf,SAAS;IACR,MAAM;IACN,KAAK;IACL,QAAQ,SAAS,kBAAkB,MAAM,UAAU,EAAE;GACtD;GACA,QAAQ,UAAU,OAAO,KAAK;GAC9B,eAAe;EAChB;GACC,YAAY,KAAK;GACjB,SAAS;IACR,MAAM;IACN,KAAK;IACL,OAAO;GACR;GACA,QAAQ,UAAU,OAAO,KAAK;GAC9B,eAAe;EAChB;GACC,UAAU,KAAK;GACf,SAAS;IACR,MAAM;IACN,KAAK;IACL,OAAO;GACR;GACA,OAAO;GACP,eAAe;EAChB;CACD;AACD;AACA,MAAM,4BAA4B;CACjC,GAAG;CACH,WAAW;EACV,MAAM;EACN,WAAW,qBAAqB;EAChC,eAAe;CAChB;CACA,yBAAyB;EACxB,yCAAyC,IAAI,IAAI;EACjD,sBAAsB,CAAC,EAAE,IAAI,2BAA2B,CAAC;CAC1D;CACA,oBAAoB,CAAC;EACpB,MAAM;EACN,WAAW,EAAE,eAAe,2BAA2B;EACvD,UAAU,CAAC,uBAAuB;GACjC,UAAU,CAAC,mBAAmB;GAC9B,aAAa;EACd,CAAC,CAAC;CACH,CAAC;AACF"}
package/dist/driver.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { n as MongoDriverImpl, r as createMongoDriver } from "./mongo-driver-gT2hm86N-BLmZZ-_j.mjs";
1
+ import { n as MongoDriverImpl, r as createMongoDriver } from "./mongo-driver-DvSP1rKR-DcX43NVg.mjs";
2
2
  export { MongoDriverImpl, createMongoDriver };
@@ -1,4 +1,4 @@
1
- import { n as MongoDriverImpl, t as DRIVER_INFO } from "./mongo-driver-gT2hm86N-BLmZZ-_j.mjs";
1
+ import { n as MongoDriverImpl, t as DRIVER_INFO } from "./mongo-driver-DvSP1rKR-DcX43NVg.mjs";
2
2
  import { MongoClient } from "mongodb";
3
3
  import { errorRuntime } from "@prisma/orm-framework/errors/execution";
4
4
  import { redactDatabaseUrl } from "@prisma/orm-framework/utils/redact-db-url";
@@ -1 +1 @@
1
- {"version":3,"file":"driver__control.mjs","names":[],"sources":["../../../../3-targets/mongo/3-driver/dist/control.mjs"],"sourcesContent":["import { r as DRIVER_INFO, t as MongoDriverImpl } from \"./mongo-driver-gT2hm86N.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
+ {"version":3,"file":"driver__control.mjs","names":[],"sources":["../../../../3-targets/mongo/3-driver/dist/control.mjs"],"sourcesContent":["import { r as DRIVER_INFO, t as MongoDriverImpl } from \"./mongo-driver-DvSP1rKR.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,9 +1,9 @@
1
1
  import { assertNever } from "@prisma/orm-framework/utils/internal-error";
2
2
  import { BSON, MongoClient } from "mongodb";
3
- //#region ../../../3-targets/mongo/3-driver/dist/mongo-driver-gT2hm86N.mjs
3
+ //#region ../../../3-targets/mongo/3-driver/dist/mongo-driver-DvSP1rKR.mjs
4
4
  const DRIVER_INFO = {
5
5
  name: "Prisma",
6
- version: "8.0.0-rc.20-dev.14"
6
+ version: "8.0.0-rc.20-dev.15"
7
7
  };
8
8
  /* v8 ignore start */
9
9
  function unreachableKind(value) {
@@ -184,4 +184,4 @@ async function createMongoDriver(uri, dbName) {
184
184
  //#endregion
185
185
  export { MongoDriverImpl as n, createMongoDriver as r, DRIVER_INFO as t };
186
186
 
187
- //# sourceMappingURL=mongo-driver-gT2hm86N-BLmZZ-_j.mjs.map
187
+ //# sourceMappingURL=mongo-driver-DvSP1rKR-DcX43NVg.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"mongo-driver-gT2hm86N-BLmZZ-_j.mjs","names":[],"sources":["../../../../3-targets/mongo/3-driver/dist/mongo-driver-gT2hm86N.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.20-dev.14\"\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 \"renameCollection\": return this.executeRenameCollectionCommand(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, {\n\t\t\tupsert: cmd.upsert,\n\t\t\t...cmd.bypassDocumentValidation ? { bypassDocumentValidation: true } : {}\n\t\t});\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 executeRenameCollectionCommand(cmd) {\n\t\tawait this.db.renameCollection(cmd.collection, cmd.to);\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-gT2hm86N.mjs.map"],"mappings":";;;AAIA,MAAM,cAAc;CACnB,MAAM;CACN,SAAS;AACV;;AAIA,SAAS,gBAAgB,OAAO;CAC/B,MAAM,YAAY;CAClB,IAAI,OAAO,cAAc,YAAY,cAAc,QAAQ,UAAU,aAAa,OAAO,UAAU,SAAS,UAAU,OAAO,UAAU;CACvI,OAAO;AACR;;AAEA,IAAI,kBAAkB,MAAM,gBAAgB;CAC3C;CACA;CACA,YAAY,IAAI,QAAQ;EACvB,KAAK,KAAK;EACV,KAAK,SAAS;CACf;CACA,aAAa,eAAe,KAAK,QAAQ;EACxC,MAAM,SAAS,IAAI,YAAY,KAAK,EAAE,YAAY,YAAY,CAAC;EAC/D,MAAM,OAAO,QAAQ;EACrB,OAAO,IAAI,gBAAgB,OAAO,GAAG,MAAM,GAAG,MAAM;CACrD;CACA,OAAO,OAAO,IAAI;EACjB,OAAO,IAAI,gBAAgB,IAAI,KAAK,CAAC;CACtC;CACA,QAAQ,aAAa;EACpB,QAAQ,YAAY,MAApB;GACC,KAAK,aAAa,OAAO,KAAK,wBAAwB,WAAW;GACjE,KAAK,aAAa,OAAO,KAAK,wBAAwB,WAAW;GACjE,KAAK,cAAc,OAAO,KAAK,yBAAyB,WAAW;GACnE,KAAK,cAAc,OAAO,KAAK,yBAAyB,WAAW;GACnE,KAAK,aAAa,OAAO,KAAK,wBAAwB,WAAW;GACjE,KAAK,cAAc,OAAO,KAAK,yBAAyB,WAAW;GACnE,KAAK,oBAAoB,OAAO,KAAK,+BAA+B,WAAW;GAC/E,KAAK,oBAAoB,OAAO,KAAK,+BAA+B,WAAW;GAC/E,KAAK,aAAa,OAAO,KAAK,wBAAwB,WAAW;;GAEjE,SAAS,OA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B,eAAe,KAAK,MAAM;AAClD"}
1
+ {"version":3,"file":"mongo-driver-DvSP1rKR-DcX43NVg.mjs","names":[],"sources":["../../../../3-targets/mongo/3-driver/dist/mongo-driver-DvSP1rKR.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.20-dev.15\"\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 \"renameCollection\": return this.executeRenameCollectionCommand(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, {\n\t\t\tupsert: cmd.upsert,\n\t\t\t...cmd.bypassDocumentValidation ? { bypassDocumentValidation: true } : {}\n\t\t});\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 executeRenameCollectionCommand(cmd) {\n\t\tawait this.db.renameCollection(cmd.collection, cmd.to);\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-DvSP1rKR.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,WA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AC3C,GAAG,oBAAoB,KAAK,IAAI,EAAE,gBAAgB,IAAI,CAAC;GACvD,GAAG,qBAAqB,KAAK,IAAI,EAAE,iBAAiB,IAAI,CAAC;GACzD,GAAG,iCAAiC,KAAK,IAAI,EAAE,6BAA6B,IAAI,CAAC;EAClF,CAAC;CACF;AACD;AACA,eAAe,kBAAkB,KAAK,QAAQ;CAC7C,OAAO,gBAAgB,eAAe,KAAK,MAAM;AAClD"}
@@ -0,0 +1,140 @@
1
+ import { a as ParameterizedOutputTypesForTypeParams, i as CodecTypes } from "./codec-types-oKxM85p-.mjs";
2
+ import { AnyCodecDescriptor } from "@prisma/orm-framework/components/codec";
3
+ import { ControlMutationDefaults } from "@prisma/orm-framework/components/control";
4
+ //#region ../../../3-targets/mongo/1-target/dist/pack.d.mts
5
+ //#region src/core/authoring.d.ts
6
+ declare const mongoAuthoringTypes: {
7
+ readonly temporal: {
8
+ readonly CreatedAt: {
9
+ readonly kind: "typeAlias";
10
+ readonly documentation: `A timestamp the client sets to now when a row is created. Its value is ${string}.`;
11
+ readonly output: {
12
+ readonly type: {
13
+ readonly codecId: "mongo/date@1";
14
+ };
15
+ readonly onCreate: {
16
+ readonly name: "now";
17
+ readonly args: {};
18
+ };
19
+ };
20
+ };
21
+ readonly UpdatedAt: {
22
+ readonly kind: "typeAlias";
23
+ readonly documentation: `A timestamp the client sets to now when a row is created and every time it is updated. Its value is ${string}.`;
24
+ readonly output: {
25
+ readonly type: {
26
+ readonly codecId: "mongo/date@1";
27
+ };
28
+ readonly onCreate: {
29
+ readonly name: "now";
30
+ readonly args: {};
31
+ };
32
+ readonly onUpdate: {
33
+ readonly name: "now";
34
+ readonly args: {};
35
+ };
36
+ };
37
+ };
38
+ };
39
+ };
40
+ //#endregion
41
+ //#region src/core/descriptor-meta.d.ts
42
+ declare const mongoTargetDescriptorMetaBase: {
43
+ readonly authoring: {
44
+ readonly type: {
45
+ readonly temporal: {
46
+ readonly CreatedAt: {
47
+ readonly kind: "typeAlias";
48
+ readonly documentation: `A timestamp the client sets to now when a row is created. Its value is ${string}.`;
49
+ readonly output: {
50
+ readonly type: {
51
+ readonly codecId: "mongo/date@1";
52
+ };
53
+ readonly onCreate: {
54
+ readonly name: "now";
55
+ readonly args: {};
56
+ };
57
+ };
58
+ };
59
+ readonly UpdatedAt: {
60
+ readonly kind: "typeAlias";
61
+ readonly documentation: `A timestamp the client sets to now when a row is created and every time it is updated. Its value is ${string}.`;
62
+ readonly output: {
63
+ readonly type: {
64
+ readonly codecId: "mongo/date@1";
65
+ };
66
+ readonly onCreate: {
67
+ readonly name: "now";
68
+ readonly args: {};
69
+ };
70
+ readonly onUpdate: {
71
+ readonly name: "now";
72
+ readonly args: {};
73
+ };
74
+ };
75
+ };
76
+ };
77
+ };
78
+ readonly dataTypes: Readonly<Record<string, import("@prisma/orm-framework/components/authoring").DataTypeAuthoringEntry>>;
79
+ readonly textDataTypes: readonly import("@prisma/orm-framework/components/codec").DataTypeId[];
80
+ };
81
+ readonly controlMutationDefaults: {
82
+ readonly defaultFunctionRegistry: Map<any, any>;
83
+ readonly generatorDescriptors: readonly [{
84
+ readonly id: "timestampNow";
85
+ }];
86
+ };
87
+ readonly generatorFunctions: readonly [{
88
+ readonly name: "now";
89
+ readonly signature: {
90
+ readonly documentation: "Writes the current time.";
91
+ };
92
+ readonly bindings: readonly [import("@prisma/orm-framework/components/components").GeneratorFunctionBinding];
93
+ }];
94
+ readonly kind: "target";
95
+ readonly familyId: "mongo";
96
+ readonly targetId: "mongo";
97
+ readonly id: "mongo";
98
+ readonly version: "0.0.1";
99
+ readonly capabilities: {};
100
+ readonly defaultNamespaceId: "__unbound__";
101
+ readonly supportsNamespaces: true;
102
+ readonly dataTypes: readonly import("@prisma/orm-framework/components/codec").DataType[];
103
+ readonly types: {
104
+ readonly codecTypes: {
105
+ readonly codecDescriptors: readonly import("@prisma/orm-framework/components/codec").CodecDescriptor<void>[];
106
+ };
107
+ };
108
+ readonly __codecTypes?: CodecTypes;
109
+ readonly __parameterizedOutputTypes?: ParameterizedOutputTypesForTypeParams;
110
+ };
111
+ declare const mongoTargetDescriptorMeta: typeof mongoTargetDescriptorMetaBase & {
112
+ readonly __codecTypes?: CodecTypes;
113
+ readonly __parameterizedOutputTypes?: ParameterizedOutputTypesForTypeParams;
114
+ };
115
+ //#endregion
116
+ //#region src/exports/pack.d.ts
117
+ declare const mongoTargetPack: {
118
+ readonly kind: 'target';
119
+ readonly familyId: 'mongo';
120
+ readonly targetId: 'mongo';
121
+ readonly id: 'mongo';
122
+ readonly version: '0.0.1';
123
+ readonly capabilities: Record<string, never>;
124
+ readonly defaultNamespaceId: '__unbound__';
125
+ readonly types: {
126
+ readonly codecTypes: {
127
+ readonly codecDescriptors: ReadonlyArray<AnyCodecDescriptor>;
128
+ };
129
+ };
130
+ readonly authoring: {
131
+ readonly type: typeof mongoAuthoringTypes;
132
+ };
133
+ readonly controlMutationDefaults: ControlMutationDefaults;
134
+ readonly generatorFunctions: typeof mongoTargetDescriptorMeta.generatorFunctions;
135
+ readonly __codecTypes?: CodecTypes;
136
+ readonly __parameterizedOutputTypes?: ParameterizedOutputTypesForTypeParams;
137
+ };
138
+ //#endregion
139
+ export { mongoTargetPack as t };
140
+ //# sourceMappingURL=pack-xD2XwjJr.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pack-xD2XwjJr.d.mts","names":[],"sources":["../../../../3-targets/mongo/1-target/dist/pack.d.mts"],"mappings":";;;;;cAIc;WACH;aACE;eACE;eACA;eACA;iBACE;mBACE;;iBAEF;mBACE;mBACA;;;;aAIN;eACE;eACA;eACA;iBACE;mBACE;;iBAEF;mBACE;mBACA;;iBAEF;mBACE;mBACA;;;;;;;;cAQL;WACH;aACE;eACE;iBACE;mBACE;mBACA;mBACA;qBACE;uBACE;;qBAEF;uBACE;uBACA;;;;iBAIN;mBACE;mBACA;mBACA;qBACE;uBACE;;qBAEF;uBACE;uBACA;;qBAEF;uBACE;uBACA;;;;;;aAMV,WAAW,SAAS,kEAAkE;aACtF,uEAAuE;;WAEzE;aACE,yBAAyB;aACzB;eACE;;;WAGJ;aACE;aACA;eACE;;aAEF,wEAAwE;;WAE1E;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,mEAAmE;WACnE;aACE;eACE,0EAA0E;;;WAG9E,eAAe;WACf,6BAA6B;;cAE1B,kCAAkC;WACrC,eAAe;WACf,6BAA6B;;;;cAI1B;WACH;WACA;WACA;WACA;WACA;WACA,cAAc;WACd;WACA;aACE;eACE,kBAAkB,cAAc;;;WAGpC;aACE,aAAa;;WAEf,yBAAyB;WACzB,2BAA2B,0BAA0B;WACrD,eAAe;WACf,6BAA6B"}
package/dist/target.d.mts CHANGED
@@ -5,7 +5,7 @@ import { a as DropCollectionCall, c as RenameCollectionCall, d as schemaCollecti
5
5
  import { _ as deserializeMongoOps, a as MongoMigrationRunnerExecuteOptions, b as renderOps, c as MongoTargetContract, d as MongoTargetSchemaVerifier, f as MongoTargetUnboundDatabase, g as deserializeMongoOp, h as RenderMigrationMeta, i as MongoMigrationRunnerErrorCode, l as MongoTargetContractSerializer, m as PlannerProducedMongoMigration, n as MongoMigrationPlanner, o as MongoMigrationRunnerFailure, p as PlanCallsResult, r as MongoMigrationRunner, s as MongoMigrationRunnerResult, t as FilterEvaluator, u as MongoTargetDatabase, v as mongoTargetDescriptor, x as serializeMongoOps, y as renderCallsToTypeScript } from "./control-CrFS8bqh.mjs";
6
6
  import { a as mongoDate, c as mongoInt32, d as mongoObjectId, f as mongoString, h as mongoVectorParams, i as mongoDataTypes, l as mongoInt64, m as mongoVector, n as mongoBool, o as mongoDecimal128, p as mongoTextDataTypes, r as mongoBson, s as mongoDouble, t as mongoBinary, u as mongoJson } from "./data-types-LShlnAUM.mjs";
7
7
  import { a as createIndex, c as dropIndex, d as renameField, f as setValidation, i as createCollection, l as placeholder, m as validatedCollection, n as MigrationCLI, o as dataTransform, p as unsetField, r as collMod, s as dropCollection, t as Migration, u as renameCollection } from "./migration-C4m4Uj8E.mjs";
8
- import "./pack-CIfujQmd.mjs";
8
+ import "./pack-xD2XwjJr.mjs";
9
9
  import { t as prisma6MongoBinding } from "./prisma6-binding-DhnqslLT.mjs";
10
10
  import { t as MongoRuntimeTargetInstance } from "./runtime-DbFgyDql.mjs";
11
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 MongoMigrationRunnerErrorCode, type MongoMigrationRunnerExecuteOptions, type MongoMigrationRunnerFailure, type MongoMigrationRunnerResult, MongoRuntimeTargetInstance, type MongoTargetContract, MongoTargetContractSerializer, MongoTargetDatabase, MongoTargetSchemaVerifier, MongoTargetUnboundDatabase, type OpFactoryCall$1 as OpFactoryCall, ParameterizedOutputTypesForTypeParams, type PlanCallsResult, PlannerProducedMongoMigration, RenameCollectionCall, RenameFieldCall, type RenderMigrationMeta, UnsetFieldCall, 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, mongoTextDataTypes, mongoVector, mongoVectorParams, placeholder, prisma6MongoBinding, renameCollection, renameField, renderCallsToTypeScript, renderOps, schemaCollectionToCreateCollectionOptions, schemaIndexToCreateIndexOptions, serializeMongoOps, setValidation, unsetField, validatedCollection };
package/dist/target.mjs CHANGED
@@ -2,7 +2,7 @@ import { a as MONGO_DECIMAL128_CODEC_ID, c as MONGO_INT64_CODEC_ID, d as MONGO_O
2
2
  import { B as mongoInt32, F as mongoBson, G as mongoTextDataTypes, H as mongoJson, I as mongoDataTypes, K as mongoVector, L as mongoDate, N as mongoBinary, P as mongoBool, R as mongoDecimal128, U as mongoObjectId, V as mongoInt64, W as mongoString, q as mongoVectorParams, z as mongoDouble } from "./data-types-hoKLBrYZ-h9cAgbOy.mjs";
3
3
  import { i as mongoStandardCodecs, n as mongoCodecDescriptors, r as mongoDescriptorById, t as buildStandardCodecRegistry } from "./codecs-B1ab7vfj-QL33tkm2.mjs";
4
4
  import { a as dropCollection, c as renameField, d as unsetField, f as validatedCollection, i as dataTransform, l as setValidation, n as createCollection, o as dropIndex, r as createIndex, s as renameCollection, t as collMod } from "./migration-factories-BqROEHRs-CfExMr9r.mjs";
5
- import { C as schemaIndexToCreateIndexOptions, S as schemaCollectionToCreateCollectionOptions, _ as deserializeMongoOp, a as DropIndexCall, b as renderCallsToTypeScript, c as MongoMigrationRunner, d as MongoTargetSchemaVerifier, f as MongoTargetUnboundDatabase, g as UnsetFieldCall, h as RenameFieldCall, i as DropCollectionCall, l as MongoTargetContractSerializer, m as RenameCollectionCall, n as CreateCollectionCall, o as FilterEvaluator, p as PlannerProducedMongoMigration, r as CreateIndexCall, s as MongoMigrationPlanner, t as CollModCall, u as MongoTargetDatabase, v as deserializeMongoOps, w as serializeMongoOps, x as renderOps, y as mongoTargetDescriptor } from "./control-BOMgFmdt.mjs";
5
+ import { C as schemaIndexToCreateIndexOptions, S as schemaCollectionToCreateCollectionOptions, _ as deserializeMongoOp, a as DropIndexCall, b as renderCallsToTypeScript, c as MongoMigrationRunner, d as MongoTargetSchemaVerifier, f as MongoTargetUnboundDatabase, g as UnsetFieldCall, h as RenameFieldCall, i as DropCollectionCall, l as MongoTargetContractSerializer, m as RenameCollectionCall, n as CreateCollectionCall, o as FilterEvaluator, p as PlannerProducedMongoMigration, r as CreateIndexCall, s as MongoMigrationPlanner, t as CollModCall, u as MongoTargetDatabase, v as deserializeMongoOps, w as serializeMongoOps, x as renderOps, y as mongoTargetDescriptor } from "./control-DqUpXeJr.mjs";
6
6
  import { n as MigrationCLI, r as placeholder, t as Migration } from "./migration-C-jfTsGU.mjs";
7
7
  import { t as prisma6MongoBinding } from "./prisma6-binding-vt4tbT-Z.mjs";
8
8
  export { CollModCall, CreateCollectionCall, CreateIndexCall, DropCollectionCall, DropIndexCall, FilterEvaluator, MONGO_BINARY_CODEC_ID, MONGO_BOOLEAN_CODEC_ID, MONGO_BSON_CODEC_ID, MONGO_DATE_CODEC_ID, MONGO_DECIMAL128_CODEC_ID, MONGO_DOUBLE_CODEC_ID, MONGO_INT32_CODEC_ID, MONGO_INT64_CODEC_ID, MONGO_INT64_NUMBER_CODEC_ID, MONGO_JSON_CODEC_ID, MONGO_OBJECTID_CODEC_ID, MONGO_STRING_CODEC_ID, MONGO_VECTOR_CODEC_ID, Migration, MigrationCLI, MongoMigrationPlanner, MongoMigrationRunner, MongoTargetContractSerializer, MongoTargetDatabase, MongoTargetSchemaVerifier, MongoTargetUnboundDatabase, PlannerProducedMongoMigration, RenameCollectionCall, RenameFieldCall, UnsetFieldCall, 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, mongoTextDataTypes, mongoVector, mongoVectorParams, placeholder, prisma6MongoBinding, renameCollection, renameField, renderCallsToTypeScript, renderOps, schemaCollectionToCreateCollectionOptions, schemaIndexToCreateIndexOptions, serializeMongoOps, setValidation, unsetField, validatedCollection };
@@ -1,2 +1,2 @@
1
- import { C as schemaIndexToCreateIndexOptions, S as schemaCollectionToCreateCollectionOptions, _ as deserializeMongoOp, a as DropIndexCall, b as renderCallsToTypeScript, c as MongoMigrationRunner, d as MongoTargetSchemaVerifier, f as MongoTargetUnboundDatabase, g as UnsetFieldCall, h as RenameFieldCall, i as DropCollectionCall, l as MongoTargetContractSerializer, m as RenameCollectionCall, n as CreateCollectionCall, o as FilterEvaluator, p as PlannerProducedMongoMigration, r as CreateIndexCall, s as MongoMigrationPlanner, t as CollModCall, u as MongoTargetDatabase, v as deserializeMongoOps, w as serializeMongoOps, x as renderOps, y as mongoTargetDescriptor } from "./control-BOMgFmdt.mjs";
1
+ import { C as schemaIndexToCreateIndexOptions, S as schemaCollectionToCreateCollectionOptions, _ as deserializeMongoOp, a as DropIndexCall, b as renderCallsToTypeScript, c as MongoMigrationRunner, d as MongoTargetSchemaVerifier, f as MongoTargetUnboundDatabase, g as UnsetFieldCall, h as RenameFieldCall, i as DropCollectionCall, l as MongoTargetContractSerializer, m as RenameCollectionCall, n as CreateCollectionCall, o as FilterEvaluator, p as PlannerProducedMongoMigration, r as CreateIndexCall, s as MongoMigrationPlanner, t as CollModCall, u as MongoTargetDatabase, v as deserializeMongoOps, w as serializeMongoOps, x as renderOps, y as mongoTargetDescriptor } from "./control-DqUpXeJr.mjs";
2
2
  export { CollModCall, CreateCollectionCall, CreateIndexCall, DropCollectionCall, DropIndexCall, FilterEvaluator, MongoMigrationPlanner, MongoMigrationRunner, MongoTargetContractSerializer, MongoTargetDatabase, MongoTargetSchemaVerifier, MongoTargetUnboundDatabase, PlannerProducedMongoMigration, RenameCollectionCall, RenameFieldCall, UnsetFieldCall, deserializeMongoOp, deserializeMongoOps, mongoTargetDescriptor, renderCallsToTypeScript, renderOps, schemaCollectionToCreateCollectionOptions, schemaIndexToCreateIndexOptions, serializeMongoOps };
@@ -1,3 +1,3 @@
1
1
  import { a as ParameterizedOutputTypesForTypeParams, i as CodecTypes, o as Vector } from "./codec-types-oKxM85p-.mjs";
2
- import { t as mongoTargetPack } from "./pack-CIfujQmd.mjs";
2
+ import { t as mongoTargetPack } from "./pack-xD2XwjJr.mjs";
3
3
  export { type CodecTypes, type ParameterizedOutputTypesForTypeParams, type Vector, mongoTargetPack as default };
@@ -1,4 +1,4 @@
1
- import { t as mongoTargetDescriptorMeta } from "./descriptor-meta-DTj807jv-CjvK2XDD.mjs";
1
+ import { t as mongoTargetDescriptorMeta } from "./descriptor-meta-DU1EhCii-BJ2e8_WL.mjs";
2
2
  //#region ../../../3-targets/mongo/1-target/dist/pack.mjs
3
3
  const mongoTargetPack = mongoTargetDescriptorMeta;
4
4
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"target__pack.mjs","names":[],"sources":["../../../../3-targets/mongo/1-target/dist/pack.mjs"],"sourcesContent":["import { t as mongoTargetDescriptorMeta } from \"./descriptor-meta-DTj807jv.mjs\";\n//#region src/exports/pack.ts\nconst mongoTargetPack = mongoTargetDescriptorMeta;\n//#endregion\nexport { mongoTargetPack as default };\n\n//# sourceMappingURL=pack.mjs.map"],"mappings":";;AAEA,MAAM,kBAAkB"}
1
+ {"version":3,"file":"target__pack.mjs","names":[],"sources":["../../../../3-targets/mongo/1-target/dist/pack.mjs"],"sourcesContent":["import { t as mongoTargetDescriptorMeta } from \"./descriptor-meta-DU1EhCii.mjs\";\n//#region src/exports/pack.ts\nconst mongoTargetPack = mongoTargetDescriptorMeta;\n//#endregion\nexport { mongoTargetPack as default };\n\n//# sourceMappingURL=pack.mjs.map"],"mappings":";;AAEA,MAAM,kBAAkB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/orm-target-mongo",
3
- "version": "8.0.0-rc.20-dev.14",
3
+ "version": "8.0.0-rc.20-dev.15",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -9,18 +9,18 @@
9
9
  "dist"
10
10
  ],
11
11
  "dependencies": {
12
- "@prisma/orm-family-mongo": "8.0.0-rc.20-dev.14",
13
- "@prisma/orm-framework": "8.0.0-rc.20-dev.14",
14
- "@prisma/orm-toolchain": "8.0.0-rc.20-dev.14",
12
+ "@prisma/orm-family-mongo": "8.0.0-rc.20-dev.15",
13
+ "@prisma/orm-framework": "8.0.0-rc.20-dev.15",
14
+ "@prisma/orm-toolchain": "8.0.0-rc.20-dev.15",
15
15
  "arktype": "^2.2.2",
16
16
  "bson": "^7.2.0"
17
17
  },
18
18
  "devDependencies": {
19
- "@internal/adapter-mongo": "8.0.0-rc.20-dev.14",
20
- "@internal/driver-mongo": "8.0.0-rc.20-dev.14",
21
- "@internal/target-mongo": "8.0.0-rc.20-dev.14",
22
- "@repo/tsconfig": "8.0.0-rc.20-dev.14",
23
- "@repo/tsdown": "8.0.0-rc.20-dev.14",
19
+ "@internal/adapter-mongo": "8.0.0-rc.20-dev.15",
20
+ "@internal/driver-mongo": "8.0.0-rc.20-dev.15",
21
+ "@internal/target-mongo": "8.0.0-rc.20-dev.15",
22
+ "@repo/tsconfig": "8.0.0-rc.20-dev.15",
23
+ "@repo/tsdown": "8.0.0-rc.20-dev.15",
24
24
  "tsdown": "0.22.14",
25
25
  "typescript": "5.9.3"
26
26
  },
@@ -1 +0,0 @@
1
- {"version":3,"file":"descriptor-meta-DTj807jv-CjvK2XDD.mjs","names":[],"sources":["../../../../3-targets/mongo/1-target/dist/descriptor-meta-DTj807jv.mjs"],"sourcesContent":["import { i as MONGO_DATE_CODEC_ID } from \"./codec-ids-WdrumsYA.mjs\";\nimport { L as decimal128HoldsExactly, Y as isBase64Text, a as mongoDate, c as mongoInt32, f as mongoString, l as mongoInt64, n as mongoBool, o as mongoDecimal128, p as mongoTextDataTypes, s as mongoDouble, t as mongoBinary, u as mongoJson } from \"./data-types-hoKLBrYZ.mjs\";\nimport { t as mongoTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-BaRbjvD7.mjs\";\nimport { TIMESTAMP_NOW_GENERATOR_ID, temporalAuthoringPresets, temporalCodecPreset, temporalTypeAliases } from \"@internal/framework-components/authoring\";\nimport { singleGeneratorBinding } from \"@internal/framework-components/components\";\nimport { createNumberClassifier, isoDateStringText, numeralText, parseJsonText, printJsonText, signedRange } from \"@internal/framework-components/codec\";\nimport { structuredError } from \"@internal/utils/structured-error\";\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 mongoAuthoringTypes = { temporal: temporalTypeAliases(mongoDateStorage, \"a JavaScript Date\") };\n//#endregion\n//#region src/core/data-type-entries.ts\nconst classifyAsDecimal = createNumberClassifier({\n\tintegers: [{\n\t\ttype: mongoInt32.id,\n\t\tform: \"number\",\n\t\t...signedRange(32)\n\t}, {\n\t\ttype: mongoInt64.id,\n\t\tform: \"text\",\n\t\t...signedRange(64)\n\t}],\n\tlargerWhole: {\n\t\ttype: mongoDecimal128.id,\n\t\tform: \"text\"\n\t},\n\tfraction: {\n\t\ttype: mongoDecimal128.id,\n\t\tform: \"text\"\n\t},\n\twords: {\n\t\ttype: mongoDecimal128.id,\n\t\tform: \"text\"\n\t}\n});\n/** The type of a written number: a `decimal` only when a Decimal128 holds it exactly, else the `double` nearest it. */\nfunction classifyMongoNumber(text) {\n\tconst classified = classifyAsDecimal(text);\n\tif (classified?.type !== mongoDecimal128.id || decimal128HoldsExactly(String(classified.value))) return classified;\n\tconst double = Number(text);\n\treturn Number.isFinite(double) ? {\n\t\ttype: mongoDouble.id,\n\t\tvalue: double\n\t} : void 0;\n}\nfunction printNumber(value) {\n\treturn typeof value === \"number\" ? numeralText(value) : String(value);\n}\nfunction base64Text(text) {\n\tif (isBase64Text(text)) return text;\n\tthrow structuredError(\"CONTRACT.CAST_REFUSED\", `\"${text}\" is not base64 text: write the bytes in base64, as in binary\\`aGVsbG8=\\`.`, {\n\t\twhy: \"The binary tag reads bytes as base64, as MongoDB prints them.\",\n\t\tfix: \"Write the bytes in base64, as in binary`aGVsbG8=`.\"\n\t});\n}\nfunction mongoDataTypeEntries() {\n\treturn {\n\t\t[mongoString.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"plain\",\n\t\t\t\tsyntax: \"string\",\n\t\t\t\tparse: (text) => text\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"Text.\"\n\t\t},\n\t\t[mongoBool.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"plain\",\n\t\t\t\tsyntax: \"boolean\",\n\t\t\t\tparse: (text) => text === \"true\"\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"A boolean, written true or false.\"\n\t\t},\n\t\t[mongoDouble.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"plain\",\n\t\t\t\tsyntax: \"number\",\n\t\t\t\ttypes: [\n\t\t\t\t\tmongoInt32.id,\n\t\t\t\t\tmongoInt64.id,\n\t\t\t\t\tmongoDecimal128.id,\n\t\t\t\t\tmongoDouble.id\n\t\t\t\t],\n\t\t\t\tclassify: classifyMongoNumber\n\t\t\t},\n\t\t\tprint: printNumber,\n\t\t\tdocumentation: \"A number: an int in 32 bits, a long in 64, a decimal when a Decimal128 holds it exactly, NaN and the infinities included, and a double otherwise.\"\n\t\t},\n\t\t[mongoDate.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"tag\",\n\t\t\t\ttag: \"date\",\n\t\t\t\tparse: (text) => isoDateStringText(text, mongoDate.id)\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"An instant, as in date`2024-01-01T00:00:00Z`. Reads ISO 8601 with a UTC offset and stores the instant in UTC with three fraction digits, as Date.toISOString() writes it.\"\n\t\t},\n\t\t[mongoBinary.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"tag\",\n\t\t\t\ttag: \"binary\",\n\t\t\t\tparse: base64Text\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"Bytes, written in base64 as MongoDB prints them, as in binary`aGVsbG8=`.\"\n\t\t},\n\t\t[mongoJson.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"tag\",\n\t\t\t\ttag: \"json\",\n\t\t\t\tparse: parseJsonText\n\t\t\t},\n\t\t\tprint: printJsonText,\n\t\t\tdocumentation: \"Reads the text as a JSON document and stores it as the value.\"\n\t\t}\n\t};\n}\nconst mongoTargetDescriptorMeta = {\n\t...mongoTargetDescriptorMetaRuntime,\n\tauthoring: {\n\t\ttype: mongoAuthoringTypes,\n\t\tfield: mongoAuthoringFieldPresets,\n\t\tdataTypes: mongoDataTypeEntries(),\n\t\ttextDataTypes: mongoTextDataTypes\n\t},\n\tcontrolMutationDefaults: {\n\t\tdefaultFunctionRegistry: /* @__PURE__ */ new Map(),\n\t\tgeneratorDescriptors: [{ id: TIMESTAMP_NOW_GENERATOR_ID }]\n\t},\n\tgeneratorFunctions: [{\n\t\tname: \"now\",\n\t\tsignature: { documentation: \"Writes the current time.\" },\n\t\tbindings: [singleGeneratorBinding({\n\t\t\tcodecIds: [MONGO_DATE_CODEC_ID],\n\t\t\tgeneratorId: TIMESTAMP_NOW_GENERATOR_ID\n\t\t})]\n\t}]\n};\n//#endregion\nexport { mongoTargetDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-DTj807jv.mjs.map"],"mappings":";;;;;;;;AAQA,MAAM,mBAAmB,EAAE,SAAS,oBAAoB;AACxD,MAAM,6BAA6B,EAAE,UAAU;CAC9C,GAAG,yBAAyB,gBAAgB;CAC5C,WAAW,oBAAoB,gBAAgB;AAChD,EAAE;AACF,MAAM,sBAAsB,EAAE,UAAU,oBAAoB,kBAAkB,mBAAmB,EAAE;AAGnG,MAAM,oBAAoB,uBAAuB;CAChD,UAAU,CAAC;EACV,MAAM,WAAW;EACjB,MAAM;EACN,GAAG,YAAY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