@prisma/orm-target-mongo 8.0.0-rc.18-dev.13 → 8.0.0-rc.18-dev.14

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.
Files changed (27) hide show
  1. package/dist/adapter__control.d.mts +1 -1
  2. package/dist/adapter__control.mjs +1 -1
  3. package/dist/{control-CFnCH6ol.mjs → control-L7CfVM6Q.mjs} +17 -21
  4. package/dist/control-L7CfVM6Q.mjs.map +1 -0
  5. package/dist/{control-PcpFueeY.d.mts → control-rl8nrKoA.d.mts} +3 -3
  6. package/dist/{control-PcpFueeY.d.mts.map → control-rl8nrKoA.d.mts.map} +1 -1
  7. package/dist/driver.mjs +1 -1
  8. package/dist/driver__control.mjs +1 -1
  9. package/dist/driver__control.mjs.map +1 -1
  10. package/dist/{migration-CPNxGxSK.d.mts → migration-D_hZnT_B.d.mts} +3 -2
  11. package/dist/migration-D_hZnT_B.d.mts.map +1 -0
  12. package/dist/{migration-factories-BmDfC5c5-BI-Wusuk.mjs → migration-factories-jwrORVMV-BGqJk_WT.mjs} +65 -7
  13. package/dist/migration-factories-jwrORVMV-BGqJk_WT.mjs.map +1 -0
  14. package/dist/{mongo-driver-Dfg5LMA4-BcbtIygl.mjs → mongo-driver-D_NSFhP4-vKRpKech.mjs} +3 -3
  15. package/dist/{mongo-driver-Dfg5LMA4-BcbtIygl.mjs.map → mongo-driver-D_NSFhP4-vKRpKech.mjs.map} +1 -1
  16. package/dist/{op-factory-call-BoYr7vvM-jFNdzIK6.d.mts → op-factory-call-BoYr7vvM-CNpt7COE.d.mts} +2 -2
  17. package/dist/{op-factory-call-BoYr7vvM-jFNdzIK6.d.mts.map → op-factory-call-BoYr7vvM-CNpt7COE.d.mts.map} +1 -1
  18. package/dist/target.d.mts +3 -3
  19. package/dist/target.mjs +2 -2
  20. package/dist/target__control.d.mts +2 -2
  21. package/dist/target__control.mjs +1 -1
  22. package/dist/target__migration.d.mts +1 -1
  23. package/dist/target__migration.mjs +1 -1
  24. package/package.json +9 -9
  25. package/dist/control-CFnCH6ol.mjs.map +0 -1
  26. package/dist/migration-CPNxGxSK.d.mts.map +0 -1
  27. package/dist/migration-factories-BmDfC5c5-BI-Wusuk.mjs.map +0 -1
@@ -1,11 +1,12 @@
1
1
  import { t as mongoTargetError } from "./mongo-target-errors-Btf3ML1w-B5EMYbz1.mjs";
2
2
  import { blindCast } from "@prisma/orm-framework/utils/casts";
3
3
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
4
- import { CollModCommand, DropCollectionCommand, DropIndexCommand, ListCollectionsCommand, ListIndexesCommand, MongoAndExpr, MongoExistsExpr, MongoFieldFilter, RenameCollectionCommand, buildIndexOpId, defaultMongoIndexName, keysToKeySpec } from "@prisma/orm-family-mongo/query-ast/control";
4
+ import { MONGO_INDEX_OPTION_KEYS } from "@prisma/orm-family-mongo/schema-ir";
5
+ import { CollModCommand, DropCollectionCommand, DropIndexCommand, ListCollectionsCommand, ListIndexesCommand, MongoAndExpr, MongoExistsExpr, MongoFieldFilter, MongoNotExpr, RenameCollectionCommand, buildIndexOpId, defaultMongoIndexName, keysToKeySpec } from "@prisma/orm-family-mongo/query-ast/control";
5
6
  import { RawAggregateCommand, RawUpdateManyCommand } from "@prisma/orm-family-mongo/query-ast/execution";
6
7
  import { createFieldAccessor } from "@prisma/orm-family-mongo/query-builder";
7
8
  import { collection } from "@prisma/orm-family-mongo/query-builder/contract-free";
8
- //#region ../../../3-mongo-target/1-mongo-target/dist/migration-factories-BmDfC5c5.mjs
9
+ //#region ../../../3-mongo-target/1-mongo-target/dist/migration-factories-jwrORVMV.mjs
9
10
  function isBuildable(value) {
10
11
  if (typeof value !== "object" || value === null || !("build" in value)) return false;
11
12
  return typeof Reflect.get(value, "build") === "function";
@@ -170,11 +171,59 @@ function keyFilter(keys) {
170
171
  const f = createFieldAccessor();
171
172
  return isTextIndex(keys) ? f.rawPath("key._fts").eq("text") : f.key.eq(blindCast(keysToKeySpec(keys)));
172
173
  }
174
+ function documentValue(document) {
175
+ return blindCast(document);
176
+ }
177
+ /** MongoDB stores a text index's text fields as `_fts` and `_ftsx` in the place of the first one. */
178
+ function textIndexKeySpec(keys) {
179
+ const spec = {};
180
+ for (const key of keys) if (key.direction !== "text") spec[key.field] = key.direction;
181
+ else if (!Object.hasOwn(spec, "_fts")) Object.assign(spec, {
182
+ _fts: "text",
183
+ _ftsx: 1
184
+ });
185
+ return spec;
186
+ }
187
+ /** MongoDB lists every text field's weight, 1 when none is given, ordered by field name. */
188
+ function textIndexWeights(keys, weights) {
189
+ const fields = keys.filter((key) => key.direction === "text").map((key) => key.field);
190
+ return Object.fromEntries(fields.sort().map((field) => [field, weights?.[field] ?? 1]));
191
+ }
192
+ function flagFilter(field, on) {
193
+ const set = MongoFieldFilter.eq(field, true);
194
+ return on ? set : new MongoNotExpr(set);
195
+ }
196
+ function optionFilter(field, value) {
197
+ return value === void 0 ? MongoExistsExpr.notExists(field) : MongoFieldFilter.eq(field, value);
198
+ }
199
+ /**
200
+ * MongoDB completes a collation with its defaults, so only the fields the call gives are compared, as
201
+ * the verifier does. An index with no collation must have none.
202
+ */
203
+ function collationFilters(collation) {
204
+ if (collation === void 0) return [MongoExistsExpr.notExists("collation")];
205
+ return Object.entries(collation).map(([option, value]) => MongoFieldFilter.eq(`collation.${option}`, blindCast(value)));
206
+ }
207
+ const textIndexOnly = (filter) => (options, keys) => isTextIndex(keys) ? filter(options, keys) : [];
208
+ const INDEX_OPTION_FILTERS = {
209
+ unique: (options) => [flagFilter("unique", options?.unique)],
210
+ sparse: (options) => [flagFilter("sparse", options?.sparse)],
211
+ expireAfterSeconds: (options) => [optionFilter("expireAfterSeconds", options?.expireAfterSeconds)],
212
+ partialFilterExpression: (options) => [optionFilter("partialFilterExpression", options?.partialFilterExpression && documentValue(options.partialFilterExpression))],
213
+ wildcardProjection: (options) => [optionFilter("wildcardProjection", options?.wildcardProjection && documentValue(options.wildcardProjection))],
214
+ collation: (options) => collationFilters(options?.collation),
215
+ weights: textIndexOnly((options, keys) => [MongoFieldFilter.eq("weights", documentValue(textIndexWeights(keys, options?.weights)))]),
216
+ default_language: textIndexOnly((options) => [MongoFieldFilter.eq("default_language", options?.default_language ?? TEXT_INDEX_DEFAULT_LANGUAGE)]),
217
+ language_override: textIndexOnly((options) => [MongoFieldFilter.eq("language_override", options?.language_override ?? TEXT_INDEX_DEFAULT_LANGUAGE_OVERRIDE)])
218
+ };
219
+ function indexDefinitionFilter(keys, options) {
220
+ return MongoAndExpr.of([isTextIndex(keys) ? MongoFieldFilter.eq("key", documentValue(textIndexKeySpec(keys))) : keyFilter(keys), ...MONGO_INDEX_OPTION_KEYS.flatMap((option) => INDEX_OPTION_FILTERS[option](options, keys))]);
221
+ }
222
+ const TEXT_INDEX_DEFAULT_LANGUAGE = "english";
223
+ const TEXT_INDEX_DEFAULT_LANGUAGE_OVERRIDE = "language";
173
224
  function createIndex(collectionName, keys, options) {
174
225
  const name = defaultMongoIndexName(keys);
175
- const f = createFieldAccessor();
176
226
  const filter = keyFilter(keys);
177
- const fullFilter = options?.unique ? filter.and(f.unique.eq(true)) : filter;
178
227
  return {
179
228
  id: buildIndexOpId("create", collectionName, keys),
180
229
  label: `Create index on ${collectionName} (${formatKeys(keys)})`,
@@ -195,7 +244,7 @@ function createIndex(collectionName, keys, options) {
195
244
  postcheck: [{
196
245
  description: `index exists on ${collectionName}`,
197
246
  source: new ListIndexesCommand(collectionName),
198
- filter: fullFilter,
247
+ filter: indexDefinitionFilter(keys, options),
199
248
  expect: "exists"
200
249
  }]
201
250
  };
@@ -295,6 +344,15 @@ function setValidation(collectionName, schema, options) {
295
344
  postcheck: []
296
345
  };
297
346
  }
347
+ /**
348
+ * Matches the collection's validator body. MongoDB returns the validator through `listCollections`
349
+ * with its keys in the order given, so the order-sensitive comparison holds once the collMod ran; a
350
+ * validator written by hand with another key order only makes the collMod run again.
351
+ */
352
+ function validatorBodyFilter(validator) {
353
+ const { $jsonSchema, ...rest } = validator;
354
+ return $jsonSchema !== void 0 && Object.keys(rest).length === 0 ? MongoFieldFilter.eq("options.validator.$jsonSchema", blindCast($jsonSchema)) : MongoFieldFilter.eq("options.validator", documentValue(validator));
355
+ }
298
356
  function collMod(collectionName, options, meta) {
299
357
  const hasValidator = options.validator != null && Object.keys(options.validator).length > 0;
300
358
  return {
@@ -318,7 +376,7 @@ function collMod(collectionName, options, meta) {
318
376
  MongoFieldFilter.eq("name", collectionName),
319
377
  ...options.validationLevel ? [MongoFieldFilter.eq("options.validationLevel", options.validationLevel)] : [],
320
378
  ...options.validationAction ? [MongoFieldFilter.eq("options.validationAction", options.validationAction)] : [],
321
- ...options.validator?.["$jsonSchema"] !== void 0 ? [MongoFieldFilter.eq("options.validator.$jsonSchema", blindCast(options.validator?.["$jsonSchema"]))] : []
379
+ validatorBodyFilter(options.validator ?? {})
322
380
  ]),
323
381
  expect: "exists"
324
382
  }] : []
@@ -334,4 +392,4 @@ function validatedCollection(name, schema, indexes) {
334
392
  //#endregion
335
393
  export { dropCollection as a, renameField as c, unsetField as d, validatedCollection as f, dataTransform as i, setValidation as l, createCollection as n, dropIndex as o, createIndex as r, renameCollection as s, collMod as t, unrewritableFieldNameReason as u };
336
394
 
337
- //# sourceMappingURL=migration-factories-BmDfC5c5-BI-Wusuk.mjs.map
395
+ //# sourceMappingURL=migration-factories-jwrORVMV-BGqJk_WT.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-factories-jwrORVMV-BGqJk_WT.mjs","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/migration-factories-jwrORVMV.mjs"],"sourcesContent":["import { t as mongoTargetError } from \"./mongo-target-errors-Btf3ML1w.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { MONGO_INDEX_OPTION_KEYS } from \"@internal/mongo-schema-ir\";\nimport { CollModCommand, DropCollectionCommand, DropIndexCommand, ListCollectionsCommand, ListIndexesCommand, MongoAndExpr, MongoExistsExpr, MongoFieldFilter, MongoNotExpr, RenameCollectionCommand, buildIndexOpId, defaultMongoIndexName, keysToKeySpec } from \"@internal/mongo-query-ast/control\";\nimport { RawAggregateCommand, RawUpdateManyCommand } from \"@internal/mongo-query-ast/execution\";\nimport { createFieldAccessor } from \"@internal/mongo-query-builder\";\nimport { collection } from \"@internal/mongo-query-builder/contract-free\";\n//#region src/core/migrations/migration-factories.ts\nfunction isBuildable(value) {\n\tif (typeof value !== \"object\" || value === null || !(\"build\" in value)) return false;\n\treturn typeof Reflect.get(value, \"build\") === \"function\";\n}\nfunction resolveQuery(value) {\n\treturn isBuildable(value) ? value.build() : value;\n}\nconst MATCH_ALL_FILTER = MongoExistsExpr.exists(\"_id\");\nfunction dataTransform(name, options) {\n\tlet precheck = [];\n\tlet postcheck = [];\n\tif (options.check) {\n\t\tconst source = resolveQuery(options.check.source());\n\t\tconst filter = options.check.filter ?? MATCH_ALL_FILTER;\n\t\tconst description = options.check.description ?? `Check for data transform: ${name}`;\n\t\tconst precheckExpect = options.check.expect ?? \"exists\";\n\t\tconst postcheckExpect = precheckExpect === \"exists\" ? \"notExists\" : \"exists\";\n\t\tprecheck = [{\n\t\t\tdescription,\n\t\t\tsource,\n\t\t\tfilter,\n\t\t\texpect: precheckExpect\n\t\t}];\n\t\tpostcheck = [{\n\t\t\tdescription,\n\t\t\tsource,\n\t\t\tfilter,\n\t\t\texpect: postcheckExpect\n\t\t}];\n\t}\n\tconst run = [resolveQuery(options.run())];\n\treturn {\n\t\tid: `data_transform.${name}`,\n\t\tlabel: `Data transform: ${name}`,\n\t\toperationClass: \"data\",\n\t\tname,\n\t\t...ifDefined(\"invariantId\", options.invariantId),\n\t\tprecheck,\n\t\trun,\n\t\tpostcheck\n\t};\n}\nconst REWRITE_PLAN_META = {\n\ttarget: \"mongo\",\n\tstorageHash: \"\",\n\tlane: \"mongo-raw\"\n};\nfunction documentsHolding(fields, filter) {\n\tconst conditions = [...filter === void 0 ? [] : [filter], ...fields.map((field) => ({ [field]: { $exists: true } }))];\n\tconst [only] = conditions;\n\treturn conditions.length === 1 && only !== void 0 ? only : { $and: conditions };\n}\nconst UNREWRITABLE_FIELD_NAMES = [\n\t{\n\t\tmatches: (field) => field === \"\",\n\t\treason: \"it is empty\"\n\t},\n\t{\n\t\tmatches: (field) => field === \"_id\",\n\t\treason: \"MongoDB does not let a document change its _id\"\n\t},\n\t{\n\t\tmatches: (field) => field.includes(\".\"),\n\t\treason: \"MongoDB reads a name containing \\\".\\\" as a path into embedded documents\"\n\t},\n\t{\n\t\tmatches: (field) => field.startsWith(\"$\"),\n\t\treason: \"MongoDB reads a name starting with \\\"$\\\" as an operator\"\n\t}\n];\n/** Why `renameField` and `unsetField` cannot rewrite a field of this name, if they cannot. */\nfunction unrewritableFieldNameReason(field) {\n\treturn UNREWRITABLE_FIELD_NAMES.find((rule) => rule.matches(field))?.reason;\n}\nfunction assertRewritableField(collectionName, field) {\n\tconst reason = unrewritableFieldNameReason(field);\n\tif (reason === void 0) return;\n\tthrow mongoTargetError(\"MIGRATION.FIELD_NAME_UNSUPPORTED\", `Field \"${field}\" in collection ${collectionName} cannot be rewritten: ${reason}.`, { meta: {\n\t\tcollection: collectionName,\n\t\tfield,\n\t\treason\n\t} });\n}\nfunction rewritePlan(collectionName, command) {\n\treturn {\n\t\tcollection: collectionName,\n\t\tcommand,\n\t\tmeta: { ...REWRITE_PLAN_META }\n\t};\n}\nfunction noDocumentHolds(collectionName, fields, filter) {\n\treturn {\n\t\tdescription: `no document in ${collectionName} holds ${fields.length === 1 ? fields[0] : `both ${fields.join(\" and \")}`}`,\n\t\tsource: rewritePlan(collectionName, new RawAggregateCommand(collectionName, [{ $match: documentsHolding(fields, filter) }, { $limit: 1 }])),\n\t\tfilter: MATCH_ALL_FILTER,\n\t\texpect: \"notExists\"\n\t};\n}\nfunction rewriteUpdate(collectionName, field, filter, update) {\n\treturn rewritePlan(collectionName, new RawUpdateManyCommand(collectionName, documentsHolding([field], filter), update, { bypassDocumentValidation: true }));\n}\nfunction idSuffix(filter) {\n\treturn filter === void 0 ? \"\" : `.where(${JSON.stringify(filter)})`;\n}\nfunction valueList(values) {\n\treturn values.map((value) => JSON.stringify(value)).join(\", \");\n}\n/** A field condition in words: `type is \"bug\"`, `type is not \"bug\"`, `type is none of \"bug\", \"task\"`. */\nfunction conditionInWords(field, condition) {\n\tconst excluded = typeof condition === \"object\" && condition !== null && !Array.isArray(condition) ? Reflect.get(condition, \"$nin\") : void 0;\n\tif (Array.isArray(excluded)) return excluded.length === 1 ? `${field} is not ${valueList(excluded)}` : `${field} is none of ${valueList(excluded)}`;\n\treturn typeof condition === \"object\" && condition !== null ? void 0 : `${field} is ${JSON.stringify(condition)}`;\n}\n/** The documents a filter selects, in words where the planner wrote it, for an operation's label. */\nfunction labelSuffix(filter) {\n\tif (filter === void 0) return \"\";\n\tconst words = Object.entries(filter).map(([field, condition]) => conditionInWords(field, condition));\n\treturn words.every((word) => word !== void 0) && words.length > 0 ? ` in documents whose ${words.join(\" and \")}` : ` in documents matching ${JSON.stringify(filter)}`;\n}\nfunction renameField(collectionName, from, to, options) {\n\tassertRewritableField(collectionName, from);\n\tassertRewritableField(collectionName, to);\n\tif (from === to) throw mongoTargetError(\"MIGRATION.INVALID_OPERATION_ENTRY\", `renameField renames field \"${from}\" in collection ${collectionName} to its own name.`, { meta: {\n\t\tcontext: \"renameField\",\n\t\tcollection: collectionName,\n\t\tfield: from,\n\t\treason: \"the new name is the old name\"\n\t} });\n\tconst filter = options?.filter;\n\tconst id = `field.${collectionName}.${from}.rename(${to})${idSuffix(filter)}`;\n\treturn {\n\t\tid,\n\t\tlabel: `Rename field ${from} to ${to} in collection ${collectionName}${labelSuffix(filter)}`,\n\t\toperationClass: \"widening\",\n\t\tname: id,\n\t\tprecheck: [noDocumentHolds(collectionName, [from, to], filter)],\n\t\trun: [rewriteUpdate(collectionName, from, filter, { $rename: { [from]: to } })],\n\t\tpostcheck: [noDocumentHolds(collectionName, [from], filter)]\n\t};\n}\nfunction unsetField(collectionName, field, options) {\n\tassertRewritableField(collectionName, field);\n\tconst filter = options?.filter;\n\tconst id = `field.${collectionName}.${field}.unset${idSuffix(filter)}`;\n\treturn {\n\t\tid,\n\t\tlabel: `Remove field ${field} from collection ${collectionName}${labelSuffix(filter)}`,\n\t\toperationClass: \"destructive\",\n\t\tname: id,\n\t\tprecheck: [],\n\t\trun: [rewriteUpdate(collectionName, field, filter, { $unset: { [field]: \"\" } })],\n\t\tpostcheck: [noDocumentHolds(collectionName, [field], filter)]\n\t};\n}\nfunction formatKeys(keys) {\n\treturn keys.map((k) => `${k.field}:${k.direction}`).join(\", \");\n}\nfunction isTextIndex(keys) {\n\treturn keys.some((k) => k.direction === \"text\");\n}\nfunction keyFilter(keys) {\n\tconst f = createFieldAccessor();\n\treturn isTextIndex(keys) ? f.rawPath(\"key._fts\").eq(\"text\") : f.key.eq(blindCast(keysToKeySpec(keys)));\n}\nfunction documentValue(document) {\n\treturn blindCast(document);\n}\n/** MongoDB stores a text index's text fields as `_fts` and `_ftsx` in the place of the first one. */\nfunction textIndexKeySpec(keys) {\n\tconst spec = {};\n\tfor (const key of keys) if (key.direction !== \"text\") spec[key.field] = key.direction;\n\telse if (!Object.hasOwn(spec, \"_fts\")) Object.assign(spec, {\n\t\t_fts: \"text\",\n\t\t_ftsx: 1\n\t});\n\treturn spec;\n}\n/** MongoDB lists every text field's weight, 1 when none is given, ordered by field name. */\nfunction textIndexWeights(keys, weights) {\n\tconst fields = keys.filter((key) => key.direction === \"text\").map((key) => key.field);\n\treturn Object.fromEntries(fields.sort().map((field) => [field, weights?.[field] ?? 1]));\n}\nfunction flagFilter(field, on) {\n\tconst set = MongoFieldFilter.eq(field, true);\n\treturn on ? set : new MongoNotExpr(set);\n}\nfunction optionFilter(field, value) {\n\treturn value === void 0 ? MongoExistsExpr.notExists(field) : MongoFieldFilter.eq(field, value);\n}\n/**\n* MongoDB completes a collation with its defaults, so only the fields the call gives are compared, as\n* the verifier does. An index with no collation must have none.\n*/\nfunction collationFilters(collation) {\n\tif (collation === void 0) return [MongoExistsExpr.notExists(\"collation\")];\n\treturn Object.entries(collation).map(([option, value]) => MongoFieldFilter.eq(`collation.${option}`, blindCast(value)));\n}\nconst textIndexOnly = (filter) => (options, keys) => isTextIndex(keys) ? filter(options, keys) : [];\nconst INDEX_OPTION_FILTERS = {\n\tunique: (options) => [flagFilter(\"unique\", options?.unique)],\n\tsparse: (options) => [flagFilter(\"sparse\", options?.sparse)],\n\texpireAfterSeconds: (options) => [optionFilter(\"expireAfterSeconds\", options?.expireAfterSeconds)],\n\tpartialFilterExpression: (options) => [optionFilter(\"partialFilterExpression\", options?.partialFilterExpression && documentValue(options.partialFilterExpression))],\n\twildcardProjection: (options) => [optionFilter(\"wildcardProjection\", options?.wildcardProjection && documentValue(options.wildcardProjection))],\n\tcollation: (options) => collationFilters(options?.collation),\n\tweights: textIndexOnly((options, keys) => [MongoFieldFilter.eq(\"weights\", documentValue(textIndexWeights(keys, options?.weights)))]),\n\tdefault_language: textIndexOnly((options) => [MongoFieldFilter.eq(\"default_language\", options?.default_language ?? TEXT_INDEX_DEFAULT_LANGUAGE)]),\n\tlanguage_override: textIndexOnly((options) => [MongoFieldFilter.eq(\"language_override\", options?.language_override ?? TEXT_INDEX_DEFAULT_LANGUAGE_OVERRIDE)])\n};\nfunction indexDefinitionFilter(keys, options) {\n\treturn MongoAndExpr.of([isTextIndex(keys) ? MongoFieldFilter.eq(\"key\", documentValue(textIndexKeySpec(keys))) : keyFilter(keys), ...MONGO_INDEX_OPTION_KEYS.flatMap((option) => INDEX_OPTION_FILTERS[option](options, keys))]);\n}\nconst TEXT_INDEX_DEFAULT_LANGUAGE = \"english\";\nconst TEXT_INDEX_DEFAULT_LANGUAGE_OVERRIDE = \"language\";\nfunction createIndex(collectionName, keys, options) {\n\tconst name = defaultMongoIndexName(keys);\n\tconst filter = keyFilter(keys);\n\treturn {\n\t\tid: buildIndexOpId(\"create\", collectionName, keys),\n\t\tlabel: `Create index on ${collectionName} (${formatKeys(keys)})`,\n\t\toperationClass: \"additive\",\n\t\tprecheck: [{\n\t\t\tdescription: `index does not already exist on ${collectionName}`,\n\t\t\tsource: new ListIndexesCommand(collectionName),\n\t\t\tfilter,\n\t\t\texpect: \"notExists\"\n\t\t}],\n\t\texecute: [{\n\t\t\tdescription: `create index on ${collectionName}`,\n\t\t\tcommand: collection(collectionName).createIndex(keys, {\n\t\t\t\t...options,\n\t\t\t\tname\n\t\t\t})\n\t\t}],\n\t\tpostcheck: [{\n\t\t\tdescription: `index exists on ${collectionName}`,\n\t\t\tsource: new ListIndexesCommand(collectionName),\n\t\t\tfilter: indexDefinitionFilter(keys, options),\n\t\t\texpect: \"exists\"\n\t\t}]\n\t};\n}\nfunction dropIndex(collectionName, keys) {\n\tconst indexName = defaultMongoIndexName(keys);\n\tconst filter = keyFilter(keys);\n\treturn {\n\t\tid: buildIndexOpId(\"drop\", collectionName, keys),\n\t\tlabel: `Drop index on ${collectionName} (${formatKeys(keys)})`,\n\t\toperationClass: \"widening\",\n\t\tprecheck: [{\n\t\t\tdescription: `index exists on ${collectionName}`,\n\t\t\tsource: new ListIndexesCommand(collectionName),\n\t\t\tfilter,\n\t\t\texpect: \"exists\"\n\t\t}],\n\t\texecute: [{\n\t\t\tdescription: `drop index on ${collectionName}`,\n\t\t\tcommand: new DropIndexCommand(collectionName, indexName)\n\t\t}],\n\t\tpostcheck: [{\n\t\t\tdescription: `index no longer exists on ${collectionName}`,\n\t\t\tsource: new ListIndexesCommand(collectionName),\n\t\t\tfilter,\n\t\t\texpect: \"notExists\"\n\t\t}]\n\t};\n}\nfunction createCollection(collectionName, options) {\n\tconst f = createFieldAccessor();\n\treturn {\n\t\tid: `collection.${collectionName}.create`,\n\t\tlabel: `Create collection ${collectionName}`,\n\t\toperationClass: \"additive\",\n\t\tprecheck: [{\n\t\t\tdescription: `collection ${collectionName} does not exist`,\n\t\t\tsource: new ListCollectionsCommand(),\n\t\t\tfilter: f.name.eq(collectionName),\n\t\t\texpect: \"notExists\"\n\t\t}],\n\t\texecute: [{\n\t\t\tdescription: `create collection ${collectionName}`,\n\t\t\tcommand: collection(collectionName).createCollection(options)\n\t\t}],\n\t\tpostcheck: []\n\t};\n}\nfunction dropCollection(collectionName) {\n\treturn {\n\t\tid: `collection.${collectionName}.drop`,\n\t\tlabel: `Drop collection ${collectionName}`,\n\t\toperationClass: \"destructive\",\n\t\tprecheck: [],\n\t\texecute: [{\n\t\t\tdescription: `drop collection ${collectionName}`,\n\t\t\tcommand: new DropCollectionCommand(collectionName)\n\t\t}],\n\t\tpostcheck: []\n\t};\n}\nfunction collectionCheck(name, expect) {\n\treturn {\n\t\tdescription: expect === \"exists\" ? `collection ${name} exists` : `collection ${name} does not exist`,\n\t\tsource: new ListCollectionsCommand(),\n\t\tfilter: MongoFieldFilter.eq(\"name\", name),\n\t\texpect\n\t};\n}\nfunction renameCollection(from, to) {\n\treturn {\n\t\tid: `collection.${from}.rename(${to})`,\n\t\tlabel: `Rename collection ${from} to ${to}`,\n\t\toperationClass: \"widening\",\n\t\tprecheck: [collectionCheck(from, \"exists\"), collectionCheck(to, \"notExists\")],\n\t\texecute: [{\n\t\t\tdescription: `rename collection ${from} to ${to}`,\n\t\t\tcommand: new RenameCollectionCommand(from, to)\n\t\t}],\n\t\tpostcheck: [collectionCheck(to, \"exists\"), collectionCheck(from, \"notExists\")]\n\t};\n}\nfunction setValidation(collectionName, schema, options) {\n\treturn {\n\t\tid: `collection.${collectionName}.setValidation`,\n\t\tlabel: `Set validation on ${collectionName}`,\n\t\toperationClass: \"widening\",\n\t\tprecheck: [],\n\t\texecute: [{\n\t\t\tdescription: `set validation on ${collectionName}`,\n\t\t\tcommand: new CollModCommand(collectionName, {\n\t\t\t\tvalidator: { $jsonSchema: schema },\n\t\t\t\t...ifDefined(\"validationLevel\", options?.validationLevel),\n\t\t\t\t...ifDefined(\"validationAction\", options?.validationAction)\n\t\t\t})\n\t\t}],\n\t\tpostcheck: []\n\t};\n}\n/**\n* Matches the collection's validator body. MongoDB returns the validator through `listCollections`\n* with its keys in the order given, so the order-sensitive comparison holds once the collMod ran; a\n* validator written by hand with another key order only makes the collMod run again.\n*/\nfunction validatorBodyFilter(validator) {\n\tconst { $jsonSchema, ...rest } = validator;\n\treturn $jsonSchema !== void 0 && Object.keys(rest).length === 0 ? MongoFieldFilter.eq(\"options.validator.$jsonSchema\", blindCast($jsonSchema)) : MongoFieldFilter.eq(\"options.validator\", documentValue(validator));\n}\nfunction collMod(collectionName, options, meta) {\n\tconst hasValidator = options.validator != null && Object.keys(options.validator).length > 0;\n\treturn {\n\t\tid: meta?.id ?? `collection.${collectionName}.collMod`,\n\t\tlabel: meta?.label ?? `Modify collection ${collectionName}`,\n\t\toperationClass: meta?.operationClass ?? \"widening\",\n\t\tprecheck: options.validator != null ? [{\n\t\t\tdescription: `collection ${collectionName} exists`,\n\t\t\tsource: new ListCollectionsCommand(),\n\t\t\tfilter: MongoFieldFilter.eq(\"name\", collectionName),\n\t\t\texpect: \"exists\"\n\t\t}] : [],\n\t\texecute: [{\n\t\t\tdescription: `modify ${collectionName}`,\n\t\t\tcommand: new CollModCommand(collectionName, options)\n\t\t}],\n\t\tpostcheck: hasValidator ? [{\n\t\t\tdescription: `validator applied on ${collectionName}`,\n\t\t\tsource: new ListCollectionsCommand(),\n\t\t\tfilter: MongoAndExpr.of([\n\t\t\t\tMongoFieldFilter.eq(\"name\", collectionName),\n\t\t\t\t...options.validationLevel ? [MongoFieldFilter.eq(\"options.validationLevel\", options.validationLevel)] : [],\n\t\t\t\t...options.validationAction ? [MongoFieldFilter.eq(\"options.validationAction\", options.validationAction)] : [],\n\t\t\t\tvalidatorBodyFilter(options.validator ?? {})\n\t\t\t]),\n\t\t\texpect: \"exists\"\n\t\t}] : []\n\t};\n}\nfunction validatedCollection(name, schema, indexes) {\n\treturn [createCollection(name, {\n\t\tvalidator: { $jsonSchema: schema },\n\t\tvalidationLevel: \"strict\",\n\t\tvalidationAction: \"error\"\n\t}), ...indexes.map((idx) => createIndex(name, idx.keys, idx.unique !== void 0 ? { unique: idx.unique } : void 0))];\n}\n//#endregion\nexport { dropCollection as a, renameField as c, unsetField as d, validatedCollection as f, dataTransform as i, setValidation as l, createCollection as n, dropIndex as o, createIndex as r, renameCollection as s, collMod as t, unrewritableFieldNameReason as u };\n\n//# sourceMappingURL=migration-factories-jwrORVMV.mjs.map"],"mappings":";;;;;;;;;AASA,SAAS,YAAY,OAAO;CAC3B,IAAI,OAAO,UAAU,YAAY,UAAU,QAAQ,EAAE,WAAW,QAAQ,OAAO;CAC/E,OAAO,OAAO,QAAQ,IAAI,OAAO,OAAO,MAAM;AAC/C;AACA,SAAS,aAAa,OAAO;CAC5B,OAAO,YAAY,KAAK,IAAI,MAAM,MAAM,IAAI;AAC7C;AACA,MAAM,mBAAmB,gBAAgB,OAAO,KAAK;AACrD,SAAS,cAAc,MAAM,SAAS;CACrC,IAAI,WAAW,CAAC;CAChB,IAAI,YAAY,CAAC;CACjB,IAAI,QAAQ,OAAO;EAClB,MAAM,SAAS,aAAa,QAAQ,MAAM,OAAO,CAAC;EAClD,MAAM,SAAS,QAAQ,MAAM,UAAU;EACvC,MAAM,cAAc,QAAQ,MAAM,eAAe,6BAA6B;EAC9E,MAAM,iBAAiB,QAAQ,MAAM,UAAU;EAC/C,MAAM,kBAAkB,mBAAmB,WAAW,cAAc;EACpE,WAAW,CAAC;GACX;GACA;GACA;GACA,QAAQ;EACT,CAAC;EACD,YAAY,CAAC;GACZ;GACA;GACA;GACA,QAAQ;EACT,CAAC;CACF;CACA,MAAM,MAAM,CAAC,aAAa,QAAQ,IAAI,CAAC,CAAC;CACxC,OAAO;EACN,IAAI,kBAAkB;EACtB,OAAO,mBAAmB;EAC1B,gBAAgB;EAChB;EACA,GAAG,UAAU,eAAe,QAAQ,WAAW;EAC/C;EACA;EACA;CACD;AACD;AACA,MAAM,oBAAoB;CACzB,QAAQ;CACR,aAAa;CACb,MAAM;AACP;AACA,SAAS,iBAAiB,QAAQ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nB,CAAC,GAAG,GAAG,QAAQ,KAAK,QAAQ,YAAY,MAAM,IAAI,MAAM,IAAI,WAAW,KAAK,IAAI,EAAE,QAAQ,IAAI,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC;AAClH"}
@@ -1,9 +1,9 @@
1
1
  import { assertNever } from "@prisma/orm-framework/utils/internal-error";
2
2
  import { BSON, MongoClient } from "mongodb";
3
- //#region ../../../3-mongo-target/3-mongo-driver/dist/mongo-driver-Dfg5LMA4.mjs
3
+ //#region ../../../3-mongo-target/3-mongo-driver/dist/mongo-driver-D_NSFhP4.mjs
4
4
  const DRIVER_INFO = {
5
5
  name: "Prisma",
6
- version: "8.0.0-rc.18-dev.13"
6
+ version: "8.0.0-rc.18-dev.14"
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-Dfg5LMA4-BcbtIygl.mjs.map
187
+ //# sourceMappingURL=mongo-driver-D_NSFhP4-vKRpKech.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"mongo-driver-Dfg5LMA4-BcbtIygl.mjs","names":[],"sources":["../../../../3-mongo-target/3-mongo-driver/dist/mongo-driver-Dfg5LMA4.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.18-dev.13\"\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-Dfg5LMA4.mjs.map"],"mappings":";;;AAIA,MAAM,cAAc;CACnB,MAAM;CACN,SAAS;AACV;;AAIA,SAAS,g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AAI,CAAC;GAC7D,GAAG,cAAc,KAAK,IAAI,EAAE,UAAU,IAAI,CAAC;GAC3C,GAAG,YAAY,KAAK,IAAI,EAAE,QAAQ,IAAI,CAAC;GACvC,GAAG,qBAAqB,KAAK,IAAI,EAAE,iBAAiB,IAAI,CAAC;GACzD,GAAG,sBAAsB,KAAK,IAAI,EAAE,kBAAkB,IAAI,CAAC;EAC5D,CAAC;CACF;CACA,MAAM,6BAA6B,KAAK;EACvC,MAAM,KAAK,GAAG,WAAW,IAAI,UAAU,CAAC,CAAC,KAAK;CAC/C;CACA,MAAM,+BAA+B,KAAK;EACzC,MAAM,KAAK,GAAG,iBAAiB,IAAI,YAAY,IAAI,EAAE;CACtD;CACA,MAAM,wBAAwB,KAAK;EAClC,MAAM,KAAK,GAAG,WAAW,IAAI,UAAU,CAAC,CAAC,UAAU,IAAI,IAAI;CAC5D;CACA,MAAM,sBAAsB,KAAK;EAChC,MAAM,EAAE,WAAW,iBAAiB,kBAAkB,iCAAiC;EACvF,MAAM,KAAK,GAAG,QAAQ;GACrB,SAAS,IAAI;GACb,GAAG,cAAc,KAAK,IAAI,EAAE,UAAU,IAAI,CAAC;GAC3C,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"}
1
+ {"version":3,"file":"mongo-driver-D_NSFhP4-vKRpKech.mjs","names":[],"sources":["../../../../3-mongo-target/3-mongo-driver/dist/mongo-driver-D_NSFhP4.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.18-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-D_NSFhP4.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,OAAO,YAA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,KAAK,MAAM;AAClD"}
@@ -1,6 +1,6 @@
1
1
  import { MigrationOperationClass, OpFactoryCall } from "@prisma/orm-framework/components/control";
2
- import { AnyMongoMigrationOperation, CollModOptions, CreateCollectionOptions, CreateIndexOptions, MongoIndexKey, MongoMigrationPlanOperation } from "@prisma/orm-family-mongo/query-ast/control";
3
2
  import { MongoSchemaCollection, MongoSchemaIndex } from "@prisma/orm-family-mongo/schema-ir";
3
+ import { AnyMongoMigrationOperation, CollModOptions, CreateCollectionOptions, CreateIndexOptions, MongoIndexKey, MongoMigrationPlanOperation } from "@prisma/orm-family-mongo/query-ast/control";
4
4
  import { ImportRequirement, TsExpression } from "@prisma/orm-framework/ts-render";
5
5
  import { Document } from "@prisma/orm-family-mongo/value";
6
6
  //#region ../../../3-mongo-target/1-mongo-target/dist/op-factory-call-BoYr7vvM.d.mts
@@ -107,4 +107,4 @@ declare function schemaIndexToCreateIndexOptions(index: MongoSchemaIndex): Creat
107
107
  declare function schemaCollectionToCreateCollectionOptions(coll: MongoSchemaCollection): CreateCollectionOptions | undefined;
108
108
  //#endregion
109
109
  export { DropCollectionCall as a, RenameCollectionCall as c, schemaCollectionToCreateCollectionOptions as d, schemaIndexToCreateIndexOptions as f, CreateIndexCall as i, RenameFieldCall as l, CollModMeta as n, DropIndexCall as o, CreateCollectionCall as r, OpFactoryCall$1 as s, CollModCall as t, UnsetFieldCall as u };
110
- //# sourceMappingURL=op-factory-call-BoYr7vvM-jFNdzIK6.d.mts.map
110
+ //# sourceMappingURL=op-factory-call-BoYr7vvM-CNpt7COE.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"op-factory-call-BoYr7vvM-jFNdzIK6.d.mts","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/op-factory-call-BoYr7vvM.d.mts"],"mappings":";;;;;;;UAMU;WACC;WACA;WACA,iBAAiB;;uBAEL,0BAA0B,wBAAwB;oBACrD;oBACA,gBAAgB;oBAChB;WACT,QAAQ;EACjB,+BAA+B;YACrB;;cAEE,wBAAwB;WAC3B;WACA;WACA;WACA,MAAM,cAAc;WACpB,SAAS;WACT;EACT,YAAY,oBAAoB,MAAM,cAAc,gBAAgB,UAAU;EAC9E,QAAQ;EACR;;cAEY,sBAAsB;WACzB;WACA;WACA;WACA,MAAM,cAAc;WACpB;EACT,YAAY,oBAAoB,MAAM,cAAc;EACpD,QAAQ;EACR;;cAEY,6BAA6B;WAChC;WACA;WACA;WACA,SAAS;WACT;EACT,YAAY,oBAAoB,UAAU;EAC1C,QAAQ;EACR;;cAEY,2BAA2B;WAC9B;WACA;WACA;WACA;EACT,YAAY;EACZ,QAAQ;EACR;;cAEY,6BAA6B;WAChC;WACA;WACA;WACA;WACA;EACT,YAAY,cAAc;EAC1B,QAAQ;EACR;;cAEY,wBAAwB;WAC3B;WACA;WACA;WACA;WACA;WACA,QAAQ;WACR;EACT,YAAY,oBAAoB,cAAc,YAAY,SAAS;EACnE,QAAQ;EACR;;cAEY,uBAAuB;WAC1B;WACA;WACA;WACA;WACA,QAAQ;WACR;EACT,YAAY,oBAAoB,eAAe,SAAS;EACxD,QAAQ;EACR;;cAEY,oBAAoB;WACvB;WACA;WACA,SAAS;WACT,MAAM;WACN,gBAAgB;WAChB;EACT,YAAY,oBAAoB,SAAS,gBAAgB,OAAO;EAChE,QAAQ;EACR;;KAEG,kBAAkB,kBAAkB,gBAAgB,uBAAuB,qBAAqB,uBAAuB,kBAAkB,iBAAiB;iBAC9I,gCAAgC,OAAO,mBAAmB;iBAC1D,0CAA0C,MAAM,wBAAwB"}
1
+ {"version":3,"file":"op-factory-call-BoYr7vvM-CNpt7COE.d.mts","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/op-factory-call-BoYr7vvM.d.mts"],"mappings":";;;;;;;UAMU;WACC;WACA;WACA,iBAAiB;;uBAEL,0BAA0B,wBAAwB;oBACrD;oBACA,gBAAgB;oBAChB;WACT,QAAQ;EACjB,+BAA+B;YACrB;;cAEE,wBAAwB;WAC3B;WACA;WACA;WACA,MAAM,cAAc;WACpB,SAAS;WACT;EACT,YAAY,oBAAoB,MAAM,cAAc,gBAAgB,UAAU;EAC9E,QAAQ;EACR;;cAEY,sBAAsB;WACzB;WACA;WACA;WACA,MAAM,cAAc;WACpB;EACT,YAAY,oBAAoB,MAAM,cAAc;EACpD,QAAQ;EACR;;cAEY,6BAA6B;WAChC;WACA;WACA;WACA,SAAS;WACT;EACT,YAAY,oBAAoB,UAAU;EAC1C,QAAQ;EACR;;cAEY,2BAA2B;WAC9B;WACA;WACA;WACA;EACT,YAAY;EACZ,QAAQ;EACR;;cAEY,6BAA6B;WAChC;WACA;WACA;WACA;WACA;EACT,YAAY,cAAc;EAC1B,QAAQ;EACR;;cAEY,wBAAwB;WAC3B;WACA;WACA;WACA;WACA;WACA,QAAQ;WACR;EACT,YAAY,oBAAoB,cAAc,YAAY,SAAS;EACnE,QAAQ;EACR;;cAEY,uBAAuB;WAC1B;WACA;WACA;WACA;WACA,QAAQ;WACR;EACT,YAAY,oBAAoB,eAAe,SAAS;EACxD,QAAQ;EACR;;cAEY,oBAAoB;WACvB;WACA;WACA,SAAS;WACT,MAAM;WACN,gBAAgB;WAChB;EACT,YAAY,oBAAoB,SAAS,gBAAgB,OAAO;EAChE,QAAQ;EACR;;KAEG,kBAAkB,kBAAkB,gBAAgB,uBAAuB,qBAAqB,uBAAuB,kBAAkB,iBAAiB;iBAC9I,gCAAgC,OAAO,mBAAmB;iBAC1D,0CAA0C,MAAM,wBAAwB"}
package/dist/target.d.mts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { a as MONGO_DECIMAL128_CODEC_ID, c as MONGO_INT64_CODEC_ID, d as MONGO_OBJECTID_CODEC_ID, f as MONGO_STRING_CODEC_ID, i as MONGO_DATE_CODEC_ID, l as MONGO_INT64_NUMBER_CODEC_ID, n as MONGO_BOOLEAN_CODEC_ID, o as MONGO_DOUBLE_CODEC_ID, p as MONGO_VECTOR_CODEC_ID, r as MONGO_BSON_CODEC_ID, s as MONGO_INT32_CODEC_ID, t as MONGO_BINARY_CODEC_ID, u as MONGO_JSON_CODEC_ID } from "./codec-ids-PSU05uwH.mjs";
2
2
  import { a as Vector, i as CodecTypes, n as BsonScalar, r as BsonValue, t as BsonInputValue } from "./codec-types-Cm23P4cr.mjs";
3
3
  import { i as mongoStandardCodecs, n as mongoCodecDescriptors, r as mongoDescriptorById, t as buildStandardCodecRegistry } from "./codecs-CXPz3PFI.mjs";
4
- import { a as DropCollectionCall, c as RenameCollectionCall, d as schemaCollectionToCreateCollectionOptions, f as schemaIndexToCreateIndexOptions, i as CreateIndexCall, l as RenameFieldCall, n as CollModMeta, o as DropIndexCall, r as CreateCollectionCall, s as OpFactoryCall$1, t as CollModCall, u as UnsetFieldCall } from "./op-factory-call-BoYr7vvM-jFNdzIK6.mjs";
5
- import { _ as renderOps, a as MongoTargetContract, c as MongoTargetSchemaVerifier, d as PlannerProducedMongoMigration, f as RenderMigrationMeta, g as renderCallsToTypeScript, h as mongoTargetDescriptor, i as MongoMigrationRunnerExecuteOptions, l as MongoTargetUnboundDatabase, m as deserializeMongoOps, n as MongoMigrationPlanner, o as MongoTargetContractSerializer, p as deserializeMongoOp, r as MongoMigrationRunner, s as MongoTargetDatabase, t as FilterEvaluator, u as PlanCallsResult, v as serializeMongoOps } from "./control-PcpFueeY.mjs";
4
+ import { a as DropCollectionCall, c as RenameCollectionCall, d as schemaCollectionToCreateCollectionOptions, f as schemaIndexToCreateIndexOptions, i as CreateIndexCall, l as RenameFieldCall, n as CollModMeta, o as DropIndexCall, r as CreateCollectionCall, s as OpFactoryCall$1, t as CollModCall, u as UnsetFieldCall } from "./op-factory-call-BoYr7vvM-CNpt7COE.mjs";
5
+ import { _ as renderOps, a as MongoTargetContract, c as MongoTargetSchemaVerifier, d as PlannerProducedMongoMigration, f as RenderMigrationMeta, g as renderCallsToTypeScript, h as mongoTargetDescriptor, i as MongoMigrationRunnerExecuteOptions, l as MongoTargetUnboundDatabase, m as deserializeMongoOps, n as MongoMigrationPlanner, o as MongoTargetContractSerializer, p as deserializeMongoOp, r as MongoMigrationRunner, s as MongoTargetDatabase, t as FilterEvaluator, u as PlanCallsResult, v as serializeMongoOps } from "./control-rl8nrKoA.mjs";
6
6
  import { a as mongoDate, c as mongoInt32, d as mongoObjectId, f as mongoString, i as mongoDataTypes, l as mongoInt64, m as mongoVectorParams, n as mongoBool, o as mongoDecimal128, p as mongoVector, r as mongoBson, s as mongoDouble, t as mongoBinary, u as mongoJson } from "./data-types-CcyIYfyC.mjs";
7
- 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-CPNxGxSK.mjs";
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-D_hZnT_B.mjs";
8
8
  import "./pack-DSebNEVZ.mjs";
9
9
  import { t as prisma6MongoBinding } from "./prisma6-binding-DppqC9Jo.mjs";
10
10
  import { t as MongoRuntimeTargetInstance } from "./runtime-B9_-kjBX.mjs";
package/dist/target.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import { a as MONGO_DECIMAL128_CODEC_ID, c as MONGO_INT64_CODEC_ID, d as MONGO_OBJECTID_CODEC_ID, f as MONGO_STRING_CODEC_ID, i as MONGO_DATE_CODEC_ID, l as MONGO_INT64_NUMBER_CODEC_ID, n as MONGO_BOOLEAN_CODEC_ID, o as MONGO_DOUBLE_CODEC_ID, p as MONGO_VECTOR_CODEC_ID, r as MONGO_BSON_CODEC_ID, s as MONGO_INT32_CODEC_ID, t as MONGO_BINARY_CODEC_ID, u as MONGO_JSON_CODEC_ID } from "./codec-ids-WdrumsYA-BkQfspmL.mjs";
2
2
  import { a as mongoDate, c as mongoInt32, d as mongoObjectId, f as mongoString, i as mongoDataTypes, l as mongoInt64, m as mongoVectorParams, n as mongoBool, o as mongoDecimal128, p as mongoVector, r as mongoBson, s as mongoDouble, t as mongoBinary, u as mongoJson } from "./data-types-D7u1m_Jl-C5XUZspA.mjs";
3
3
  import { i as mongoStandardCodecs, n as mongoCodecDescriptors, r as mongoDescriptorById, t as buildStandardCodecRegistry } from "./codecs-D6yLMoD2-Bn8-UhA5.mjs";
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-BmDfC5c5-BI-Wusuk.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-CFnCH6ol.mjs";
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-jwrORVMV-BGqJk_WT.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-L7CfVM6Q.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-i6ORtPD9.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, mongoVector, mongoVectorParams, placeholder, prisma6MongoBinding, renameCollection, renameField, renderCallsToTypeScript, renderOps, schemaCollectionToCreateCollectionOptions, schemaIndexToCreateIndexOptions, serializeMongoOps, setValidation, unsetField, validatedCollection };
@@ -1,3 +1,3 @@
1
- import { a as DropCollectionCall, c as RenameCollectionCall, d as schemaCollectionToCreateCollectionOptions, f as schemaIndexToCreateIndexOptions, i as CreateIndexCall, l as RenameFieldCall, n as CollModMeta, o as DropIndexCall, r as CreateCollectionCall, s as OpFactoryCall$1, t as CollModCall, u as UnsetFieldCall } from "./op-factory-call-BoYr7vvM-jFNdzIK6.mjs";
2
- import { _ as renderOps, a as MongoTargetContract, c as MongoTargetSchemaVerifier, d as PlannerProducedMongoMigration, f as RenderMigrationMeta, g as renderCallsToTypeScript, h as mongoTargetDescriptor, i as MongoMigrationRunnerExecuteOptions, l as MongoTargetUnboundDatabase, m as deserializeMongoOps, n as MongoMigrationPlanner, o as MongoTargetContractSerializer, p as deserializeMongoOp, r as MongoMigrationRunner, s as MongoTargetDatabase, t as FilterEvaluator, u as PlanCallsResult, v as serializeMongoOps } from "./control-PcpFueeY.mjs";
1
+ import { a as DropCollectionCall, c as RenameCollectionCall, d as schemaCollectionToCreateCollectionOptions, f as schemaIndexToCreateIndexOptions, i as CreateIndexCall, l as RenameFieldCall, n as CollModMeta, o as DropIndexCall, r as CreateCollectionCall, s as OpFactoryCall$1, t as CollModCall, u as UnsetFieldCall } from "./op-factory-call-BoYr7vvM-CNpt7COE.mjs";
2
+ import { _ as renderOps, a as MongoTargetContract, c as MongoTargetSchemaVerifier, d as PlannerProducedMongoMigration, f as RenderMigrationMeta, g as renderCallsToTypeScript, h as mongoTargetDescriptor, i as MongoMigrationRunnerExecuteOptions, l as MongoTargetUnboundDatabase, m as deserializeMongoOps, n as MongoMigrationPlanner, o as MongoTargetContractSerializer, p as deserializeMongoOp, r as MongoMigrationRunner, s as MongoTargetDatabase, t as FilterEvaluator, u as PlanCallsResult, v as serializeMongoOps } from "./control-rl8nrKoA.mjs";
3
3
  export { CollModCall, type CollModMeta, CreateCollectionCall, CreateIndexCall, DropCollectionCall, DropIndexCall, FilterEvaluator, MongoMigrationPlanner, MongoMigrationRunner, type MongoMigrationRunnerExecuteOptions, type MongoTargetContract, MongoTargetContractSerializer, MongoTargetDatabase, MongoTargetSchemaVerifier, MongoTargetUnboundDatabase, type OpFactoryCall$1 as OpFactoryCall, type PlanCallsResult, PlannerProducedMongoMigration, RenameCollectionCall, RenameFieldCall, type RenderMigrationMeta, UnsetFieldCall, deserializeMongoOp, deserializeMongoOps, mongoTargetDescriptor, renderCallsToTypeScript, renderOps, schemaCollectionToCreateCollectionOptions, schemaIndexToCreateIndexOptions, serializeMongoOps };
@@ -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-CFnCH6ol.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-L7CfVM6Q.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,2 +1,2 @@
1
- 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-CPNxGxSK.mjs";
1
+ 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-D_hZnT_B.mjs";
2
2
  export { Migration, MigrationCLI, collMod, createCollection, createIndex, dataTransform, dropCollection, dropIndex, placeholder, renameCollection, renameField, setValidation, unsetField, validatedCollection };
@@ -1,3 +1,3 @@
1
- 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-BmDfC5c5-BI-Wusuk.mjs";
1
+ 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-jwrORVMV-BGqJk_WT.mjs";
2
2
  import { n as MigrationCLI, r as placeholder, t as Migration } from "./migration-C-jfTsGU.mjs";
3
3
  export { Migration, MigrationCLI, collMod, createCollection, createIndex, dataTransform, dropCollection, dropIndex, placeholder, renameCollection, renameField, setValidation, unsetField, validatedCollection };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/orm-target-mongo",
3
- "version": "8.0.0-rc.18-dev.13",
3
+ "version": "8.0.0-rc.18-dev.14",
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.18-dev.13",
13
- "@prisma/orm-framework": "8.0.0-rc.18-dev.13",
14
- "@prisma/orm-toolchain": "8.0.0-rc.18-dev.13",
12
+ "@prisma/orm-family-mongo": "8.0.0-rc.18-dev.14",
13
+ "@prisma/orm-framework": "8.0.0-rc.18-dev.14",
14
+ "@prisma/orm-toolchain": "8.0.0-rc.18-dev.14",
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.18-dev.13",
20
- "@internal/driver-mongo": "8.0.0-rc.18-dev.13",
21
- "@internal/target-mongo": "8.0.0-rc.18-dev.13",
22
- "@repo/tsconfig": "8.0.0-rc.18-dev.13",
23
- "@repo/tsdown": "8.0.0-rc.18-dev.13",
19
+ "@internal/adapter-mongo": "8.0.0-rc.18-dev.14",
20
+ "@internal/driver-mongo": "8.0.0-rc.18-dev.14",
21
+ "@internal/target-mongo": "8.0.0-rc.18-dev.14",
22
+ "@repo/tsconfig": "8.0.0-rc.18-dev.14",
23
+ "@repo/tsdown": "8.0.0-rc.18-dev.14",
24
24
  "tsdown": "0.22.14",
25
25
  "typescript": "5.9.3"
26
26
  },