@prisma/orm-target-mongo 8.0.0-rc.24-dev.15 → 8.0.0-rc.24-dev.17

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 (28) hide show
  1. package/dist/{control-BlMckWwK.mjs → control-ADZk3Q1S.mjs} +3059 -307
  2. package/dist/control-ADZk3Q1S.mjs.map +1 -0
  3. package/dist/{control-BG4g6muN.mjs → control-BOgtJHaR.mjs} +2 -2
  4. package/dist/{control-BG4g6muN.mjs.map → control-BOgtJHaR.mjs.map} +1 -1
  5. package/dist/{control-OiC131Dv.d.mts → control-Dc2P_CN-.d.mts} +15 -6
  6. package/dist/control-Dc2P_CN-.d.mts.map +1 -0
  7. package/dist/driver.mjs +1 -1
  8. package/dist/driver__control.mjs +1 -1
  9. package/dist/driver__runtime.mjs +1 -1
  10. package/dist/driver__runtime.mjs.map +1 -1
  11. package/dist/{migration-DASk9QNA.d.mts → migration-D78n7EUy.d.mts} +1 -1
  12. package/dist/{migration-factories-C5ktmt8c-BP8k9SnZ.mjs → migration-factories-RJZq8NhE-CigCh286.mjs} +621 -13
  13. package/dist/migration-factories-RJZq8NhE-CigCh286.mjs.map +1 -0
  14. package/dist/{mongo-driver-CfJ69N8C-B5aKUbjW.mjs → mongo-driver-Bf-j_7pF-CxF7b-9b.mjs} +3 -3
  15. package/dist/{mongo-driver-CfJ69N8C-B5aKUbjW.mjs.map → mongo-driver-Bf-j_7pF-CxF7b-9b.mjs.map} +1 -1
  16. package/dist/{op-factory-call-BCgwbVJe-DhcJRxAb.d.mts → op-factory-call-vacb7XmE-sHhC1Hit.d.mts} +151 -5
  17. package/dist/op-factory-call-vacb7XmE-sHhC1Hit.d.mts.map +1 -0
  18. package/dist/target.d.mts +4 -4
  19. package/dist/target.mjs +3 -3
  20. package/dist/target__control.d.mts +2 -2
  21. package/dist/target__control.mjs +1 -1
  22. package/dist/target__migration.d.mts +3 -3
  23. package/dist/target__migration.mjs +2 -2
  24. package/package.json +10 -10
  25. package/dist/control-BlMckWwK.mjs.map +0 -1
  26. package/dist/control-OiC131Dv.d.mts.map +0 -1
  27. package/dist/migration-factories-C5ktmt8c-BP8k9SnZ.mjs.map +0 -1
  28. package/dist/op-factory-call-BCgwbVJe-DhcJRxAb.d.mts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-factories-RJZq8NhE-CigCh286.mjs","names":[],"sources":["../../../../3-targets/mongo/1-target/dist/migration-factories-RJZq8NhE.mjs"],"sourcesContent":["import { t as mongoTargetError } from \"./mongo-target-errors-Btf3ML1w.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { MONGO_INDEX_OPTION_KEYS, defaultMongoIndexName } from \"@internal/mongo-contract\";\nimport { CollModCommand, DropCollectionCommand, DropIndexCommand, ListCollectionsCommand, ListIndexesCommand, MongoAndExpr, MongoExistsExpr, MongoFieldFilter, MongoNotExpr, RenameCollectionCommand, buildIndexOpId, keysToKeySpec } from \"@internal/mongo-query-ast/control\";\nimport { RawAggregateCommand, RawDeleteManyCommand, 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/bson-convert.ts\nconst NUMBERS = [\n\t\"double\",\n\t\"int\",\n\t\"long\",\n\t\"decimal\"\n];\n/**\n* For each BSON type a field can be cast to, the BSON types whose `$convert` result is what casting\n* the value means. `$convert` accepts more pairs than these; each one left off gives a result the\n* value did not mean:\n*\n* - `string` to `bool` is `true` for every non-empty string, `\"false\"` and `\"no\"` included.\n* - `objectId` or `date` to `bool` is always `true`.\n* - `bool` to a number is `1` or `0`, which a number field does not mean.\n* - `date` to `double`, `long` or `decimal` is milliseconds since the epoch, and a number to `date`\n* reads the number that way, a unit the value does not name.\n* - `objectId` to `date` is the time the id was made, not a date the document holds.\n*\n* See the MongoDB `$convert` reference.\n*/\nconst CASTS_FROM = {\n\tdouble: /* @__PURE__ */ new Set([...NUMBERS, \"string\"]),\n\tstring: /* @__PURE__ */ new Set([\n\t\t...NUMBERS,\n\t\t\"string\",\n\t\t\"bool\",\n\t\t\"date\",\n\t\t\"objectId\"\n\t]),\n\tobjectId: /* @__PURE__ */ new Set([\"string\", \"objectId\"]),\n\tbool: /* @__PURE__ */ new Set([...NUMBERS, \"bool\"]),\n\tdate: /* @__PURE__ */ new Set([\"string\", \"date\"]),\n\tint: /* @__PURE__ */ new Set([...NUMBERS, \"string\"]),\n\tlong: /* @__PURE__ */ new Set([...NUMBERS, \"string\"]),\n\tdecimal: /* @__PURE__ */ new Set([...NUMBERS, \"string\"])\n};\n/** The casts that keep every value: each source type with the types it widens to. */\nconst KEEPS_EVERY_VALUE = {\n\tint: /* @__PURE__ */ new Set([\n\t\t\"long\",\n\t\t\"double\",\n\t\t\"decimal\"\n\t]),\n\tlong: /* @__PURE__ */ new Set([\"decimal\"])\n};\nfunction isConvertTarget(to) {\n\treturn Object.hasOwn(CASTS_FROM, to);\n}\n/** Whether a cast with `$convert` from BSON type `from` to `to` keeps what the values mean, for the values it casts. */\nfunction castsFrom(from, to) {\n\treturn from === to || (CASTS_FROM[to]?.has(from) ?? false);\n}\n/** Whether casting a value of BSON type `from` to `to` keeps every value as it was. */\nfunction convertKeepsEveryValue(from, to) {\n\treturn from === to || (KEEPS_EVERY_VALUE[from]?.has(to) ?? false);\n}\n//#endregion\n//#region src/core/migrations/stored-key-path.ts\nconst BLANK = /* @__PURE__ */ new Set([\n\t\" \",\n\t\"\t\",\n\t\"\\n\",\n\t\"\\r\"\n]);\nconst ESCAPES = {\n\tb: \"\\b\",\n\tf: \"\\f\",\n\tn: \"\\n\",\n\tr: \"\\r\",\n\tt: \"\t\",\n\t\"/\": \"/\",\n\t\"\\\\\": \"\\\\\"\n};\nfunction isNameFirst(char) {\n\treturn /^[A-Za-z_]$/.test(char) || (char.codePointAt(0) ?? 0) >= 128;\n}\nfunction isNameChar(char) {\n\treturn isNameFirst(char) || /^[0-9]$/.test(char);\n}\nvar Reader = class {\n\ttext;\n\tposition = 0;\n\tconstructor(text) {\n\t\tthis.text = text;\n\t}\n\tget done() {\n\t\treturn this.position >= this.text.length;\n\t}\n\tpeek(offset = 0) {\n\t\treturn this.text[this.position + offset] ?? \"\";\n\t}\n\tnext() {\n\t\tconst char = this.peek();\n\t\tthis.position += 1;\n\t\treturn char;\n\t}\n\tskipBlank() {\n\t\twhile (BLANK.has(this.peek())) this.position += 1;\n\t}\n};\nfunction readShorthandName(reader) {\n\tif (!isNameFirst(reader.peek())) return void 0;\n\tlet name = \"\";\n\twhile (!reader.done && isNameChar(reader.peek())) name += reader.next();\n\treturn name;\n}\nfunction readStringLiteral(reader) {\n\tconst quote = reader.next();\n\tlet value = \"\";\n\twhile (!reader.done) {\n\t\tconst char = reader.next();\n\t\tif (char === quote) return value;\n\t\tif (char !== \"\\\\\") {\n\t\t\tif ((char.codePointAt(0) ?? 0) < 32) return void 0;\n\t\t\tvalue += char;\n\t\t\tcontinue;\n\t\t}\n\t\tconst escaped = reader.next();\n\t\tif (escaped === quote) value += quote;\n\t\telse if (escaped === \"u\") {\n\t\t\tconst hex = reader.text.slice(reader.position, reader.position + 4);\n\t\t\tif (!/^[0-9A-Fa-f]{4}$/.test(hex)) return void 0;\n\t\t\treader.position += 4;\n\t\t\tvalue += String.fromCharCode(Number.parseInt(hex, 16));\n\t\t} else {\n\t\t\tconst replacement = ESCAPES[escaped];\n\t\t\tif (replacement === void 0) return void 0;\n\t\t\tvalue += replacement;\n\t\t}\n\t}\n}\nfunction readBracket(reader) {\n\treader.next();\n\treader.skipBlank();\n\tlet step;\n\tconst first = reader.peek();\n\tif (first === \"*\") {\n\t\treader.next();\n\t\tstep = { kind: \"wildcard\" };\n\t} else if (first === \"'\" || first === \"\\\"\") {\n\t\tconst name = readStringLiteral(reader);\n\t\tstep = name === void 0 ? void 0 : {\n\t\t\tkind: \"member\",\n\t\t\tname\n\t\t};\n\t}\n\treader.skipBlank();\n\treturn step !== void 0 && reader.next() === \"]\" ? step : void 0;\n}\n/**\n* Parses an RFC 9535 JSONPath that uses only member name selectors (`.street`, `['street']`) and\n* the wildcard selector (`[*]`, `.*`), the grammar SQL's stored-key operations take. Any other\n* JSONPath feature is refused with the reason.\n*/\nfunction parseJsonPath(text) {\n\tconst unsupported = notOk(`path ${JSON.stringify(text)} is not a JSONPath of member names (.name or ['name']) and wildcards ([*] or .*) from $`);\n\tconst reader = new Reader(text);\n\tif (reader.next() !== \"$\") return unsupported;\n\tconst steps = [];\n\twhile (!reader.done) {\n\t\treader.skipBlank();\n\t\tconst char = reader.peek();\n\t\tlet step;\n\t\tif (char === \".\" && reader.peek(1) === \"*\") {\n\t\t\treader.position += 2;\n\t\t\tstep = { kind: \"wildcard\" };\n\t\t} else if (char === \".\") {\n\t\t\treader.next();\n\t\t\tconst name = readShorthandName(reader);\n\t\t\tstep = name === void 0 ? void 0 : {\n\t\t\t\tkind: \"member\",\n\t\t\t\tname\n\t\t\t};\n\t\t} else if (char === \"[\") step = readBracket(reader);\n\t\tif (step === void 0) return unsupported;\n\t\tsteps.push(step);\n\t}\n\treturn ok({\n\t\ttext,\n\t\tsteps\n\t});\n}\n/** The steps as a JSONPath: a member name in shorthand when it is an identifier, else in brackets. */\nfunction jsonPathText(steps) {\n\treturn `$${steps.map((step) => {\n\t\tif (step.kind === \"wildcard\") return \"[*]\";\n\t\treturn /^[A-Za-z_][A-Za-z0-9_]*$/.test(step.name) ? `.${step.name}` : `[${JSON.stringify(step.name)}]`;\n\t}).join(\"\")}`;\n}\n/** The longest start of `path`'s text that is a path of `steps` selectors, without trailing blanks. */\nfunction writtenPrefix(path, steps) {\n\tfor (let end = path.text.length - 1; end > 0; end -= 1) {\n\t\tconst prefix = path.text.slice(0, end).trimEnd();\n\t\tconst parsed = parseJsonPath(prefix);\n\t\tif (parsed.ok && parsed.value.steps.length === steps) return prefix;\n\t}\n\treturn jsonPathText(path.steps.slice(0, steps));\n}\n/** The key path of `path` inside root field `field`, when the path ends at a member name. */\nfunction storedKeyPath(field, path) {\n\tconst parsed = parseJsonPath(path);\n\tif (!parsed.ok) return parsed;\n\tconst last = parsed.value.steps.at(-1);\n\tif (last?.kind !== \"member\") return notOk(`path ${JSON.stringify(path)} does not end at a key`);\n\treturn ok({\n\t\tfield,\n\t\tpath: parsed.value,\n\t\tobjects: parsed.value.steps.slice(0, -1),\n\t\tobjectsText: writtenPrefix(parsed.value, parsed.value.steps.length - 1),\n\t\tkey: last.name\n\t});\n}\n/** The names of the keys a key path steps through and ends at. */\nfunction keysOf(keyPath) {\n\treturn keyPath.path.steps.flatMap((step) => step.kind === \"member\" ? [step.name] : []);\n}\n/** A key's value in an object, read with `$getField` so the key is never read as a path or an operator. */\nfunction keyOf(object, key) {\n\treturn { $getField: {\n\t\tfield: { $literal: key },\n\t\tinput: object\n\t} };\n}\n/** Whether the object holds the key, `null` included. */\nfunction holdsKey(object, key) {\n\treturn { $ne: [{ $type: keyOf(object, key) }, \"missing\"] };\n}\n/** Whether the key is missing from the object or holds `null`. */\nfunction lacksKey(object, key) {\n\treturn { $in: [{ $type: keyOf(object, key) }, [\"missing\", \"null\"]] };\n}\nfunction isOfType(value, type) {\n\treturn { $eq: [{ $type: value }, type] };\n}\n/** Whether a value has the type the next step reads: a list for a wildcard, an object for a key. */\nfunction walkable(value, steps) {\n\treturn isOfType(value, steps[0]?.kind === \"wildcard\" ? \"array\" : \"object\");\n}\nfunction elementVariable(depth) {\n\treturn `element${depth}`;\n}\n/** The value of `value`, known to be walkable by `steps`, with each object at the end of `steps` rewritten. */\nfunction rewritten(value, steps, rewrite, depth) {\n\tconst [step, ...rest] = steps;\n\tif (step === void 0) return rewrite(value);\n\tconst guarded = (child, childDepth) => ({ $cond: [\n\t\twalkable(child, rest),\n\t\trewritten(child, rest, rewrite, childDepth),\n\t\tchild\n\t] });\n\tif (step.kind === \"wildcard\") {\n\t\tconst as = elementVariable(depth);\n\t\treturn { $map: {\n\t\t\tinput: value,\n\t\t\tas,\n\t\t\tin: guarded(`$$${as}`, depth + 1)\n\t\t} };\n\t}\n\tconst child = keyOf(value, step.name);\n\treturn { $cond: [\n\t\twalkable(child, rest),\n\t\t{ $setField: {\n\t\t\tfield: { $literal: step.name },\n\t\t\tinput: value,\n\t\t\tvalue: rewritten(child, rest, rewrite, depth)\n\t\t} },\n\t\tvalue\n\t] };\n}\n/** Whether some object at the end of `steps`, inside `value` known to be walkable by them, satisfies `condition`. */\nfunction anyObject(value, steps, condition, depth) {\n\tconst [step, ...rest] = steps;\n\tif (step === void 0) return condition(value);\n\tconst guarded = (child, childDepth) => ({ $cond: [\n\t\twalkable(child, rest),\n\t\tanyObject(child, rest, condition, childDepth),\n\t\tfalse\n\t] });\n\tif (step.kind === \"wildcard\") {\n\t\tconst as = elementVariable(depth);\n\t\treturn { $anyElementTrue: [{ $map: {\n\t\t\tinput: value,\n\t\t\tas,\n\t\t\tin: guarded(`$$${as}`, depth + 1)\n\t\t} }] };\n\t}\n\treturn guarded(keyOf(value, step.name), depth);\n}\n/**\n* The update pipeline that rewrites each object at the key path's objects with `rewrite`. A missing\n* or `null` value, or a value of another type than the step expects, is left as it is.\n*/\nfunction objectsRewritePipeline(keyPath, rewrite) {\n\tconst root = `$${keyPath.field}`;\n\treturn [{ $set: { [keyPath.field]: { $cond: [\n\t\twalkable(root, keyPath.objects),\n\t\trewritten(root, keyPath.objects, rewrite, 0),\n\t\troot\n\t] } } }];\n}\n/** The filter that matches the documents where some object at the key path's objects satisfies `condition`. */\nfunction documentsWithObject(keyPath, condition) {\n\tconst root = `$${keyPath.field}`;\n\treturn { $expr: { $cond: [\n\t\twalkable(root, keyPath.objects),\n\t\tanyObject(root, keyPath.objects, condition, 0),\n\t\tfalse\n\t] } };\n}\n//#endregion\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}\n/** A raw `aggregate` on a collection, as a data transform's check reads documents. */\nfunction rawAggregate(collectionName, pipeline) {\n\treturn rewritePlan(collectionName, new RawAggregateCommand(collectionName, pipeline));\n}\n/**\n* A raw `updateMany` on a collection, which a data transform's run can make skip document\n* validation. `update` is an update document, such as `{ $set: { age: 0 } }`, or an aggregation\n* pipeline, such as `[{ $set: { age: { $toInt: '$age' } } }]`, which can read the document's own\n* values.\n*/\nfunction rawUpdateMany(collectionName, filter, update, options) {\n\treturn rewritePlan(collectionName, new RawUpdateManyCommand(collectionName, filter, update, ifDefined(\"bypassDocumentValidation\", options?.bypassDocumentValidation)));\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_KEYS = [\n\t{\n\t\tmatches: (key) => key === \"\",\n\t\treason: \"it is empty\"\n\t},\n\t{\n\t\tmatches: (key) => key.includes(\".\"),\n\t\treason: \"MongoDB reads a name containing \\\".\\\" as a path into embedded documents\"\n\t},\n\t{\n\t\tmatches: (key) => key.startsWith(\"$\"),\n\t\treason: \"MongoDB reads a name starting with \\\"$\\\" as an operator\"\n\t}\n];\n/** Why a key of a document or of an object inside one cannot be rewritten, if it cannot. */\nfunction unrewritableKeyReason(key) {\n\treturn UNREWRITABLE_KEYS.find((rule) => rule.matches(key))?.reason;\n}\n/** Why `renameField` and `unsetField` cannot rewrite a field of this name, if they cannot. */\nfunction unrewritableFieldNameReason(field) {\n\treturn field === \"_id\" ? \"MongoDB does not let a document change its _id\" : unrewritableKeyReason(field);\n}\n/** The plan meta of the raw queries a migration's operations run and check with. */\nconst RAW_PLAN_META = {\n\ttarget: \"mongo\",\n\tstorageHash: \"\",\n\tlane: \"mongo-raw\"\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: { ...RAW_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}\n/**\n* The documents whose field holds a value of none of the BSON types `types`, or, for a list, an\n* element of none of them. A single value is read with `$expr`, since a query's `$type` and `$ne`\n* look at the elements of a list.\n*/\nfunction documentsNotOfType(field, shape) {\n\tif (shape.list) return { [field]: { $elemMatch: {\n\t\t$ne: null,\n\t\t$not: { $type: [...shape.types] }\n\t} } };\n\treturn { $expr: { $not: { $in: [{ $type: `$${field}` }, [\n\t\t\"missing\",\n\t\t\"null\",\n\t\t...shape.types\n\t]] } } };\n}\n/** The documents where the field is missing or holds `null`, read with `$expr` so a list holding `null` is not one. */\nfunction documentsMissingOrNull(field) {\n\treturn { $expr: { $in: [{ $type: `$${field}` }, [\"missing\", \"null\"]] } };\n}\nconst NUMBER_TYPES = [\n\t\"int\",\n\t\"long\",\n\t\"double\",\n\t\"decimal\"\n];\n/**\n* The documents whose field holds a value of one of the BSON types `types`, or, for a list, an\n* element of one of them. A single value is read with `$expr`, since a query's `$type` looks at the\n* elements of a list.\n*/\nfunction documentsOfType(field, shape) {\n\tif (shape.list) return { [field]: { $elemMatch: { $type: [...shape.types] } } };\n\treturn { $expr: { $in: [{ $type: `$${field}` }, [...shape.types]] } };\n}\n/**\n* The documents the cast changes: those holding a value of a type it is planned from, other than\n* `to`. A value of any other type is left as it is, for the validator change's document check to\n* name. A cast planned from no type casts every value that is not of type `to`.\n*/\nfunction documentsToCast(field, to, options) {\n\tconst list = options.list === true;\n\tconst from = [...new Set(options.from.flatMap((type) => type === \"number\" ? NUMBER_TYPES : [type]))].filter((type) => type !== to);\n\tconst condition = options.from.length === 0 ? documentsNotOfType(field, {\n\t\ttypes: [to],\n\t\tlist\n\t}) : documentsOfType(field, {\n\t\ttypes: from,\n\t\tlist\n\t});\n\treturn options.filter === void 0 ? condition : { $and: [options.filter, condition] };\n}\nfunction castExpression(field, to, list) {\n\treturn list ? { $map: {\n\t\tinput: `$${field}`,\n\t\tas: \"value\",\n\t\tin: { $convert: {\n\t\t\tinput: \"$$value\",\n\t\t\tto\n\t\t} }\n\t} } : { $convert: {\n\t\tinput: `$${field}`,\n\t\tto\n\t} };\n}\n/**\n* Casts a field to the BSON type `to` with `$convert`, in the documents where it holds another\n* type. A value `$convert` cannot cast fails the update. Widening when every type in `from` casts\n* to `to` keeping its value, destructive otherwise.\n*/\nfunction castField(options) {\n\tconst { collection: collectionName, field, to, filter } = options;\n\tassertRewritableField(collectionName, field);\n\tif (!isConvertTarget(to)) throw mongoTargetError(\"MIGRATION.INVALID_OPERATION_ENTRY\", `castField casts field \"${field}\" in collection ${collectionName} to \"${to}\", which $convert cannot cast to.`, { meta: {\n\t\tcontext: \"castField\",\n\t\tcollection: collectionName,\n\t\tfield,\n\t\tto\n\t} });\n\tconst listOf = (types) => options.list === true ? `list of ${types}` : types;\n\tconst id = `field.${collectionName}.${field}.cast(${to})${idSuffix(filter)}`;\n\tconst toCast = documentsToCast(field, to, options);\n\treturn {\n\t\tid,\n\t\tmeta: { rewrite: {\n\t\t\tkind: \"cast\",\n\t\t\tcollection: collectionName,\n\t\t\tfield,\n\t\t\tto\n\t\t} },\n\t\tlabel: `Cast field ${field} in collection ${collectionName}${options.from.length === 0 ? \"\" : ` from ${listOf(options.from.join(\", \"))}`} to ${listOf(to)}${labelSuffix(filter)}`,\n\t\toperationClass: options.from.length > 0 && options.from.every((from) => convertKeepsEveryValue(from, to)) ? \"widening\" : \"destructive\",\n\t\tname: id,\n\t\tprecheck: [],\n\t\trun: [rewritePlan(collectionName, new RawUpdateManyCommand(collectionName, toCast, [{ $set: { [field]: castExpression(field, to, options.list === true) } }], { bypassDocumentValidation: true }))],\n\t\tpostcheck: [{\n\t\t\tdescription: `no document in ${collectionName} holds ${field} as ${options.from.length === 0 ? `another type than ${to}` : `a type it is cast from, ${options.from.join(\", \")}`}`,\n\t\t\tsource: rewritePlan(collectionName, new RawAggregateCommand(collectionName, [{ $match: toCast }, { $limit: 1 }])),\n\t\t\tfilter: MATCH_ALL_FILTER,\n\t\t\texpect: \"notExists\"\n\t\t}]\n\t};\n}\n/**\n* Sets a field to `value` in the documents where it is missing or `null`, skipping document\n* validation, as a migration fills a new required field with a temporary value.\n*/\nfunction fillField(options) {\n\tconst { collection: collectionName, field, value, filter } = options;\n\tassertRewritableField(collectionName, field);\n\tconst id = `field.${collectionName}.${field}.fill${idSuffix(filter)}`;\n\tconst unfilled = documentsMissingOrNull(field);\n\tconst toFill = filter === void 0 ? unfilled : { $and: [filter, unfilled] };\n\treturn {\n\t\tid,\n\t\tmeta: { rewrite: {\n\t\t\tkind: \"fill\",\n\t\t\tcollection: collectionName,\n\t\t\tfield\n\t\t} },\n\t\tlabel: `Fill field ${field} in collection ${collectionName} where it is missing or null${labelSuffix(filter)}`,\n\t\toperationClass: \"widening\",\n\t\tname: id,\n\t\tprecheck: [],\n\t\trun: [rawUpdateMany(collectionName, toFill, [{ $set: { [field]: value } }], { bypassDocumentValidation: true })],\n\t\tpostcheck: [{\n\t\t\tdescription: `no document in ${collectionName} has ${field} missing or null`,\n\t\t\tsource: rawAggregate(collectionName, [{ $match: toFill }, { $limit: 1 }]),\n\t\t\tfilter: MATCH_ALL_FILTER,\n\t\t\texpect: \"notExists\"\n\t\t}]\n\t};\n}\n/** Where the objects that hold a key are: the path to them, and the root field and collection. */\nfunction placeAt(options, path) {\n\treturn `at path ${JSON.stringify(path)} in field ${options.field} of collection ${options.collection}`;\n}\nfunction keyPlace(options, keyPath) {\n\treturn placeAt(options, keyPath.objectsText);\n}\nfunction assertRewritableKey(options, keyPath, key) {\n\tconst reason = unrewritableKeyReason(key);\n\tif (reason === void 0) return;\n\tthrow mongoTargetError(\"MIGRATION.FIELD_NAME_UNSUPPORTED\", `Key ${JSON.stringify(key)} ${keyPlace(options, keyPath)} cannot be rewritten: ${reason}.`, { meta: {\n\t\tcollection: options.collection,\n\t\tfield: options.field,\n\t\tpath: options.path,\n\t\tkey,\n\t\treason\n\t} });\n}\n/** The key path of a stored key operation, refusing a root field or a key MongoDB cannot rewrite. */\nfunction rewritableKeyPath(factory, options) {\n\tassertRewritableField(options.collection, options.field);\n\tconst keyPath = storedKeyPath(options.field, options.path);\n\tif (!keyPath.ok) throw mongoTargetError(\"MIGRATION.INVALID_OPERATION_ENTRY\", `${factory} cannot act ${placeAt(options, options.path)}: ${keyPath.failure}.`, { meta: {\n\t\tcontext: factory,\n\t\tcollection: options.collection,\n\t\tfield: options.field,\n\t\tpath: options.path,\n\t\treason: keyPath.failure\n\t} });\n\tfor (const key of keysOf(keyPath.value)) assertRewritableKey(options, keyPath.value, key);\n\treturn keyPath.value;\n}\nfunction withFilter(filter, condition) {\n\treturn filter === void 0 ? condition : { $and: [filter, condition] };\n}\nfunction storedKeyId(options, action) {\n\treturn `storedKey.${options.collection}.${options.field}.${options.path}.${action}${idSuffix(options.filter)}`;\n}\nfunction noDocumentMatches(collectionName, match, description) {\n\treturn {\n\t\tdescription,\n\t\tsource: rawAggregate(collectionName, [{ $match: match }, { $limit: 1 }]),\n\t\tfilter: MATCH_ALL_FILTER,\n\t\texpect: \"notExists\"\n\t};\n}\nfunction storedKeyRewrite(options, toRewrite, keyPath, rewrite) {\n\treturn rawUpdateMany(options.collection, toRewrite, objectsRewritePipeline(keyPath, rewrite), { bypassDocumentValidation: true });\n}\nfunction literal(key) {\n\treturn { $literal: key };\n}\n/**\n* Renames the last key of `path` to `to` in every object at the path inside root field `field`,\n* skipping document validation. The precheck stops when an object holds both names.\n*/\nfunction renameStoredKey(options) {\n\tconst keyPath = rewritableKeyPath(\"renameStoredKey\", options);\n\tconst { collection: collectionName, field, path, to, filter } = options;\n\tassertRewritableKey(options, keyPath, to);\n\tconst { key } = keyPath;\n\tif (key === to) throw mongoTargetError(\"MIGRATION.INVALID_OPERATION_ENTRY\", `renameStoredKey renames key ${JSON.stringify(key)} ${keyPlace(options, keyPath)} to its own name.`, { meta: {\n\t\tcontext: \"renameStoredKey\",\n\t\tcollection: collectionName,\n\t\tfield,\n\t\tpath,\n\t\treason: \"the new name is the old name\"\n\t} });\n\tconst place = keyPlace(options, keyPath);\n\tconst holdingKey = withFilter(filter, documentsWithObject(keyPath, (object) => holdsKey(object, key)));\n\tconst holdingBoth = withFilter(filter, documentsWithObject(keyPath, (object) => ({ $and: [holdsKey(object, key), holdsKey(object, to)] })));\n\tconst id = storedKeyId(options, `rename(${to})`);\n\treturn {\n\t\tid,\n\t\tmeta: { rewrite: {\n\t\t\tkind: \"renameStoredKey\",\n\t\t\tcollection: collectionName,\n\t\t\tfield,\n\t\t\tpath,\n\t\t\tto\n\t\t} },\n\t\tlabel: `Rename key ${JSON.stringify(key)} to ${JSON.stringify(to)} ${place}${labelSuffix(filter)}`,\n\t\toperationClass: \"widening\",\n\t\tname: id,\n\t\tprecheck: [noDocumentMatches(collectionName, holdingBoth, `no object ${place} holds both key ${JSON.stringify(key)} and key ${JSON.stringify(to)}; remove one of the two keys from those objects`)],\n\t\trun: [storedKeyRewrite(options, holdingKey, keyPath, (object) => ({ $cond: [\n\t\t\tholdsKey(object, key),\n\t\t\t{ $setField: {\n\t\t\t\tfield: literal(to),\n\t\t\t\tinput: { $unsetField: {\n\t\t\t\t\tfield: literal(key),\n\t\t\t\t\tinput: object\n\t\t\t\t} },\n\t\t\t\tvalue: keyOf(object, key)\n\t\t\t} },\n\t\t\tobject\n\t\t] }))],\n\t\tpostcheck: [noDocumentMatches(collectionName, holdingKey, `no object ${place} holds key ${JSON.stringify(key)}`)]\n\t};\n}\n/** Removes the last key of `path` from every object at the path inside root field `field`, skipping document validation. */\nfunction removeStoredKey(options) {\n\tconst keyPath = rewritableKeyPath(\"removeStoredKey\", options);\n\tconst { collection: collectionName, field, path, filter } = options;\n\tconst { key } = keyPath;\n\tconst holdingKey = withFilter(filter, documentsWithObject(keyPath, (object) => holdsKey(object, key)));\n\tconst id = storedKeyId(options, \"remove\");\n\treturn {\n\t\tid,\n\t\tmeta: { rewrite: {\n\t\t\tkind: \"removeStoredKey\",\n\t\t\tcollection: collectionName,\n\t\t\tfield,\n\t\t\tpath\n\t\t} },\n\t\tlabel: `Remove key ${JSON.stringify(key)} ${keyPlace(options, keyPath)}${labelSuffix(filter)}`,\n\t\toperationClass: \"destructive\",\n\t\tname: id,\n\t\tprecheck: [],\n\t\trun: [storedKeyRewrite(options, holdingKey, keyPath, (object) => ({ $unsetField: {\n\t\t\tfield: literal(key),\n\t\t\tinput: object\n\t\t} }))],\n\t\tpostcheck: [noDocumentMatches(collectionName, holdingKey, `no object ${keyPlace(options, keyPath)} holds key ${JSON.stringify(key)}`)]\n\t};\n}\n/**\n* Sets the last key of `path` to `value` in every object at the path inside root field `field`\n* where it is missing or `null`, skipping document validation.\n*/\nfunction fillStoredKey(options) {\n\tconst keyPath = rewritableKeyPath(\"fillStoredKey\", options);\n\tconst { collection: collectionName, field, path, value, filter } = options;\n\tconst { key } = keyPath;\n\tconst lackingKey = withFilter(filter, documentsWithObject(keyPath, (object) => lacksKey(object, key)));\n\tconst id = storedKeyId(options, \"fill\");\n\treturn {\n\t\tid,\n\t\tmeta: { rewrite: {\n\t\t\tkind: \"fillStoredKey\",\n\t\t\tcollection: collectionName,\n\t\t\tfield,\n\t\t\tpath\n\t\t} },\n\t\tlabel: `Fill key ${JSON.stringify(key)} ${keyPlace(options, keyPath)} where it is missing or null${labelSuffix(filter)}`,\n\t\toperationClass: \"widening\",\n\t\tname: id,\n\t\tprecheck: [],\n\t\trun: [storedKeyRewrite(options, lackingKey, keyPath, (object) => ({ $cond: [\n\t\t\tlacksKey(object, key),\n\t\t\t{ $setField: {\n\t\t\t\tfield: literal(key),\n\t\t\t\tinput: object,\n\t\t\t\tvalue\n\t\t\t} },\n\t\t\tobject\n\t\t] }))],\n\t\tpostcheck: [noDocumentMatches(collectionName, lackingKey, `no object ${keyPlace(options, keyPath)} lacks key ${JSON.stringify(key)} or holds null there`)]\n\t};\n}\nfunction isStoredValue(value) {\n\treturn typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\";\n}\nfunction storedValuePlace(factory, options, value) {\n\tconst { collection: collectionName, field, path } = options;\n\tif (!isStoredValue(value)) throw mongoTargetError(\"MIGRATION.INVALID_OPERATION_ENTRY\", `${factory} cannot match value ${JSON.stringify(value)} in field ${field} of collection ${collectionName}: it compares only strings, numbers and booleans.`, { meta: {\n\t\tcontext: factory,\n\t\tcollection: collectionName,\n\t\tfield,\n\t\treason: \"the value is not a string, a number or a boolean\"\n\t} });\n\tif (path === void 0) {\n\t\tassertRewritableField(collectionName, field);\n\t\treturn {\n\t\t\tkeyPath: void 0,\n\t\t\ttext: `in field ${field} of collection ${collectionName}`\n\t\t};\n\t}\n\tconst at = {\n\t\tcollection: collectionName,\n\t\tfield,\n\t\tpath\n\t};\n\treturn {\n\t\tkeyPath: rewritableKeyPath(factory, at),\n\t\ttext: placeAt(at, path)\n\t};\n}\nfunction equalsValue(held, value) {\n\treturn { $eq: [held, { $literal: value }] };\n}\n/** Whether a value is `value`, or a list with an element equal to it. */\nfunction holdsValue(held, value) {\n\treturn { $cond: [\n\t\t{ $isArray: held },\n\t\t{ $in: [{ $literal: value }, held] },\n\t\tequalsValue(held, value)\n\t] };\n}\n/** The documents in which the value at the place satisfies `condition`. */\nfunction documentsWhereValue(options, place, condition) {\n\tconst { keyPath } = place;\n\tconst match = keyPath === void 0 ? { $expr: condition(`$${options.field}`) } : documentsWithObject(keyPath, (object) => condition(keyOf(object, keyPath.key)));\n\treturn withFilter(options.filter, match);\n}\n/**\n* The update pipeline that rewrites the value at the place: a list with `inList`, and a value equal\n* to `matched` with `replacement`, or, when it is `undefined`, by removing the field or key.\n*/\nfunction storedValuePipeline(options, place, matched, inList, replacement) {\n\tconst { keyPath } = place;\n\tif (keyPath === void 0) {\n\t\tconst held = `$${options.field}`;\n\t\treturn [{ $set: { [options.field]: { $cond: [\n\t\t\t{ $isArray: held },\n\t\t\tinList(held),\n\t\t\t{ $cond: [\n\t\t\t\tequalsValue(held, matched),\n\t\t\t\treplacement === void 0 ? \"$$REMOVE\" : replacement,\n\t\t\t\theld\n\t\t\t] }\n\t\t] } } }];\n\t}\n\tconst key = literal(keyPath.key);\n\treturn objectsRewritePipeline(keyPath, (object) => {\n\t\tconst held = keyOf(object, keyPath.key);\n\t\tconst set = (value) => ({ $setField: {\n\t\t\tfield: key,\n\t\t\tinput: object,\n\t\t\tvalue\n\t\t} });\n\t\treturn { $cond: [\n\t\t\t{ $isArray: held },\n\t\t\tset(inList(held)),\n\t\t\t{ $cond: [\n\t\t\t\tequalsValue(held, matched),\n\t\t\t\treplacement === void 0 ? { $unsetField: {\n\t\t\t\t\tfield: key,\n\t\t\t\t\tinput: object\n\t\t\t\t} } : set(replacement),\n\t\t\t\tobject\n\t\t\t] }\n\t\t] };\n\t});\n}\nfunction storedValueId(options, action) {\n\tconst path = options.path === void 0 ? \"\" : `.${options.path}`;\n\treturn `storedValue.${options.collection}.${options.field}${path}.${action}${idSuffix(options.filter)}`;\n}\nconst TYPED_CONSTANT = /* @__PURE__ */ new Set([\n\t\"$literal\",\n\t\"$toDouble\",\n\t\"$toLong\",\n\t\"$toInt\",\n\t\"$toDecimal\"\n]);\n/** The constant an expression writes, as a label shows it: unwrapped from `$literal` or a cast. */\nfunction expressionText(value) {\n\tif (typeof value === \"object\" && value !== null && !Array.isArray(value)) {\n\t\tconst entries = Object.entries(value);\n\t\tconst [only] = entries;\n\t\tif (entries.length === 1 && only !== void 0 && TYPED_CONSTANT.has(only[0])) return expressionText(only[1] ?? null);\n\t}\n\treturn JSON.stringify(value);\n}\nfunction holdingDescription(options, value) {\n\tconst at = options.path === void 0 ? \"\" : ` at path ${JSON.stringify(options.path)}`;\n\treturn `no document in ${options.collection} holds value ${JSON.stringify(value)}${at} in field ${options.field}`;\n}\n/**\n* Replaces the stored value `from` with `to` where the field, or the key at `path` inside it, holds\n* it: the value itself, or each element of a list equal to it. Skips document validation.\n*/\nfunction replaceStoredValue(options) {\n\tconst { collection: collectionName, field, path, from, to, filter } = options;\n\tconst place = storedValuePlace(\"replaceStoredValue\", options, from);\n\tconst holding = documentsWhereValue(options, place, (held) => holdsValue(held, from));\n\tconst id = storedValueId(options, `replace(${JSON.stringify(from)})`);\n\treturn {\n\t\tid,\n\t\tmeta: { rewrite: {\n\t\t\tkind: \"replaceStoredValue\",\n\t\t\tcollection: collectionName,\n\t\t\tfield,\n\t\t\t...ifDefined(\"path\", path)\n\t\t} },\n\t\tlabel: `Replace value ${JSON.stringify(from)} with ${expressionText(to)} ${place.text}${labelSuffix(filter)}`,\n\t\toperationClass: \"widening\",\n\t\tname: id,\n\t\tprecheck: [],\n\t\trun: [rawUpdateMany(collectionName, holding, storedValuePipeline(options, place, from, (list) => ({ $map: {\n\t\t\tinput: list,\n\t\t\tas: \"value\",\n\t\t\tin: { $cond: [\n\t\t\t\tequalsValue(\"$$value\", from),\n\t\t\t\tto,\n\t\t\t\t\"$$value\"\n\t\t\t] }\n\t\t} }), to), { bypassDocumentValidation: true })],\n\t\tpostcheck: [noDocumentMatches(collectionName, holding, holdingDescription(options, from))]\n\t};\n}\n/**\n* Removes the stored value `value` where the field, or the key at `path` inside it, holds it: the\n* field or key goes where it equals the value, and the value is pulled from a list. With\n* `required`, the operation first checks that no document holds the value there outside a list.\n* Skips document validation.\n*/\nfunction removeStoredValue(options) {\n\tconst { collection: collectionName, field, path, value, filter, required, enumValue } = options;\n\tconst place = storedValuePlace(\"removeStoredValue\", options, value);\n\tconst holding = documentsWhereValue(options, place, (held) => holdsValue(held, value));\n\tconst id = storedValueId(options, `remove(${JSON.stringify(value)})`);\n\treturn {\n\t\tid,\n\t\tmeta: { rewrite: {\n\t\t\tkind: \"removeStoredValue\",\n\t\t\tcollection: collectionName,\n\t\t\tfield,\n\t\t\t...ifDefined(\"path\", path),\n\t\t\tvalue,\n\t\t\t...ifDefined(\"required\", required),\n\t\t\t...ifDefined(\"filter\", filter),\n\t\t\t...ifDefined(\"enumValue\", enumValue)\n\t\t} },\n\t\tlabel: `Remove value ${JSON.stringify(value)} ${path === void 0 ? `from field ${field} of collection ${collectionName}` : place.text}${labelSuffix(filter)}`,\n\t\toperationClass: \"destructive\",\n\t\tname: id,\n\t\tprecheck: required === true ? [noDocumentMatches(collectionName, documentsWhereValue(options, place, (held) => equalsValue(held, value)), `${holdingDescription(options, value)}, which is required`)] : [],\n\t\trun: [rawUpdateMany(collectionName, holding, storedValuePipeline(options, place, value, (list) => ({ $filter: {\n\t\t\tinput: list,\n\t\t\tas: \"value\",\n\t\t\tcond: { $not: [equalsValue(\"$$value\", value)] }\n\t\t} }), void 0), { bypassDocumentValidation: true })],\n\t\tpostcheck: [noDocumentMatches(collectionName, holding, holdingDescription(options, value))]\n\t};\n}\n/** The documents a filter selects, in words where the planner wrote it, for an operation's label. */\nfunction selectedText(filter) {\n\tconst words = Object.entries(filter).map(([field, condition]) => conditionInWords(field, condition));\n\treturn words.length > 0 && words.every((word) => word !== void 0) ? `whose ${words.join(\" and \")}` : `matching ${JSON.stringify(filter)}`;\n}\n/** Deletes the documents of a collection that `filter` selects, as a variant's documents are deleted. */\nfunction deleteDocuments(options) {\n\tconst { collection: collectionName, filter } = options;\n\tconst id = `documents.${collectionName}.delete${idSuffix(filter)}`;\n\treturn {\n\t\tid,\n\t\tlabel: `Delete the documents of collection ${collectionName} ${selectedText(filter)}`,\n\t\toperationClass: \"destructive\",\n\t\tname: id,\n\t\tprecheck: [],\n\t\trun: [rewritePlan(collectionName, new RawDeleteManyCommand(collectionName, filter))],\n\t\tpostcheck: [noDocumentMatches(collectionName, filter, `no document in ${collectionName} matches ${JSON.stringify(filter)}`)]\n\t};\n}\nfunction formatKeys(keys) {\n\treturn keys.map((k) => `${k.field}:${k.direction}`).join(\", \");\n}\n/** What an index content check matches: the index's keys and options in its collection, whatever its name. */\nfunction indexObject(collectionName, keys) {\n\tif (isTextIndex(keys)) return `a text index in \"${collectionName}\"`;\n\treturn `an index on { ${keys.map((key) => `${key.field}: ${JSON.stringify(key.direction)}`).join(\", \")} } in \"${collectionName}\"`;\n}\nfunction namedIndexObject(collectionName, name) {\n\treturn `an index named \"${name}\" in \"${collectionName}\"`;\n}\nfunction nameFilter(name) {\n\treturn MongoFieldFilter.eq(\"name\", name);\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\";\n/**\n* Creates an index under `options.name`, or under the name MongoDB would give it when the call gives none. The precheck requires that the collection holds no index with that name and none with the same keys and options; the postcheck requires an index with that name, keys and options.\n*/\nfunction createIndex(collectionName, keys, options) {\n\tconst name = options?.name ?? defaultMongoIndexName(keys);\n\tconst definition = indexDefinitionFilter(keys, options);\n\treturn {\n\t\tid: buildIndexOpId(\"create\", collectionName, name),\n\t\tlabel: `Create index ${name} on ${collectionName} (${formatKeys(keys)})`,\n\t\toperationClass: \"additive\",\n\t\tprecheck: [{\n\t\t\tdescription: `no index named ${name} exists on ${collectionName}`,\n\t\t\tsource: new ListIndexesCommand(collectionName),\n\t\t\tfilter: nameFilter(name),\n\t\t\texpect: \"notExists\",\n\t\t\tobject: namedIndexObject(collectionName, name)\n\t\t}, {\n\t\t\tdescription: `no index with the same keys and options exists on ${collectionName}`,\n\t\t\tsource: new ListIndexesCommand(collectionName),\n\t\t\tfilter: definition,\n\t\t\texpect: \"notExists\",\n\t\t\tobject: indexObject(collectionName, keys)\n\t\t}],\n\t\texecute: [{\n\t\t\tdescription: `create index ${name} 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 ${name} exists on ${collectionName}`,\n\t\t\tsource: new ListIndexesCommand(collectionName),\n\t\t\tfilter: MongoAndExpr.of([nameFilter(name), definition]),\n\t\t\texpect: \"exists\"\n\t\t}]\n\t};\n}\n/**\n* Drops the index named `options.name`, or the name MongoDB would give the keys when the call gives none. `options` lists every option the index has, as `migration plan` writes them: the precheck requires an index with that name, those keys and exactly those options, so an option left out must be absent from the index. A call without options checks the keys only. The postcheck requires that no index with that name is left.\n*/\nfunction dropIndex(collectionName, keys, options) {\n\tconst name = options?.name ?? defaultMongoIndexName(keys);\n\tconst content = options === void 0 ? keyFilter(keys) : indexDefinitionFilter(keys, options);\n\treturn {\n\t\tid: buildIndexOpId(\"drop\", collectionName, name),\n\t\tlabel: `Drop index ${name} on ${collectionName} (${formatKeys(keys)})`,\n\t\toperationClass: \"widening\",\n\t\tprecheck: [{\n\t\t\tdescription: `index ${name} exists on ${collectionName} with the expected keys and options`,\n\t\t\tsource: new ListIndexesCommand(collectionName),\n\t\t\tfilter: MongoAndExpr.of([nameFilter(name), content]),\n\t\t\texpect: \"exists\",\n\t\t\tobject: namedIndexObject(collectionName, name)\n\t\t}],\n\t\texecute: [{\n\t\t\tdescription: `drop index ${name} on ${collectionName}`,\n\t\t\tcommand: new DropIndexCommand(collectionName, name)\n\t\t}],\n\t\tpostcheck: [{\n\t\t\tdescription: `index ${name} no longer exists on ${collectionName}`,\n\t\t\tsource: new ListIndexesCommand(collectionName),\n\t\t\tfilter: nameFilter(name),\n\t\t\texpect: \"notExists\",\n\t\t\tobject: namedIndexObject(collectionName, name)\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\tobject: `collection \"${collectionName}\"`\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\tobject: `collection \"${name}\"`\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\tconst validator = {\n\t\tvalidator: { $jsonSchema: schema },\n\t\t...ifDefined(\"validationLevel\", options?.validationLevel),\n\t\t...ifDefined(\"validationAction\", options?.validationAction)\n\t};\n\tconst checks = options?.checkDocuments === true ? collMod(collectionName, validator, { checkDocuments: true }) : {\n\t\tprecheck: [],\n\t\tpostcheck: []\n\t};\n\treturn {\n\t\tid: `collection.${collectionName}.setValidation`,\n\t\tlabel: `Set validation on ${collectionName}`,\n\t\toperationClass: \"widening\",\n\t\tprecheck: checks.precheck,\n\t\texecute: [{\n\t\t\tdescription: `set validation on ${collectionName}`,\n\t\t\tcommand: new CollModCommand(collectionName, validator)\n\t\t}],\n\t\tpostcheck: checks.postcheck\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}\n/**\n* A check that no document of `collection` fails `validator`: an aggregate that matches the\n* documents the validator rejects.\n*/\nfunction documentsFitValidator(collection, validator) {\n\treturn {\n\t\tdescription: `every document in ${collection} fits the new validator`,\n\t\tsource: {\n\t\t\tcollection,\n\t\t\tcommand: new RawAggregateCommand(collection, [{ $match: { $nor: [validator] } }, { $limit: 1 }]),\n\t\t\tmeta: { ...RAW_PLAN_META }\n\t\t},\n\t\tfilter: MongoExistsExpr.exists(\"_id\"),\n\t\texpect: \"notExists\"\n\t};\n}\nfunction collMod(collectionName, options, meta) {\n\tconst hasValidator = options.validator != null && Object.keys(options.validator).length > 0;\n\tif (meta?.checkDocuments === true && !hasValidator) throw mongoTargetError(\"MIGRATION.INVALID_OPERATION_ENTRY\", `collMod of collection ${collectionName} checks the documents, but sets no validator to check them against.`, { meta: {\n\t\tcontext: \"collMod\",\n\t\tcollection: collectionName\n\t} });\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\tobject: `collection \"${collectionName}\"`\n\t\t}, ...meta?.checkDocuments === true ? [documentsFitValidator(collectionName, options.validator)] : []] : [],\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 { storedKeyPath as A, unrewritableKeyReason as C, jsonPathText as D, documentsWithObject as E, isConvertTarget as M, keysOf as O, unrewritableFieldNameReason as S, validatedCollection as T, renameCollection as _, dataTransform as a, replaceStoredValue as b, documentsNotOfType as c, fillField as d, fillStoredKey as f, removeStoredValue as g, removeStoredKey as h, createIndex as i, castsFrom as j, lacksKey as k, dropCollection as l, rawUpdateMany as m, collMod as n, deleteDocuments as o, rawAggregate as p, createCollection as r, documentsMissingOrNull as s, castField as t, dropIndex as u, renameField as v, unsetField as w, setValidation as x, renameStoredKey as y };\n\n//# sourceMappingURL=migration-factories-RJZq8NhE.mjs.map"],"mappings":";;;;;;;;;;AAUA,MAAM,UAAU;CACf;CACA;CACA;CACA;AACD;;;;;;;;;;;;;;;AAeA,MAAM,aAAa;CAClB,wBAAwB,IAAI,IAAI,CAAC,GAAG,SAAS,QAAQ,CAAC;CACtD,wBAAwB,IAAI,IAAI;EAC/B,GAAG;EACH;EACA;EACA;EACA;CACD,CAAC;CACD,0BAA0B,IAAI,IAAI,CAAC,UAAU,UAAU,CAAC;CACxD,sBAAsB,IAAI,IAAI,CAAC,GAAG,SAAS,MAAM,CAAC;CAClD,sBAAsB,IAAI,IAAI,CAAC,UAAU,MAAM,CAAC;CAChD,qBAAqB,IAAI,IAAI,CAAC,GAAG,SAAS,QAAQ,CAAC;CACnD,sBAAsB,IAAI,IAAI,CAAC,GAAG,SAA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GAC1C,QAAQ,IAAI,uBAAuB;GACnC,QAAQ,iBAAiB,GAAG,QAAQ,cAAc;GAClD,QAAQ;GACR,QAAQ,eAAe,eAAe;EACvC,GAAG,GAAG,MAAM,mBAAmB,OAAO,CAAC,sBAAsB,gBAAgB,QAAQ,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;EAC1G,SAAS,CAAC;GACT,aAAa,UAAU;GACvB,SAAS,IAAI,eAAe,gBAAgB,OAAO;EACpD,CAAC;EACD,WAAW,eAAe,CAAC;GAC1B,aAAa,wBAAwB;GACrC,QAAQ,IAAI,uBAAuB;GACnC,QAAQ,aAAa,GAAG;IACvB,iBAAiB,GAAG,QAAQ,cAAc;IAC1C,GAAG,QAAQ,kBAAkB,CAAC,iBAAiB,GAAG,2BAA2B,QAAQ,eAAe,CAAC,IAAI,CAAC;IAC1G,GAAG,QAAQ,mBAAmB,CAAC,iBAAiB,GAAG,4BAA4B,QAAQ,gBAAgB,CAAC,IAAI,CAAC;IAC7G,oBAAoB,QAAQ,aAAa,CAAC,CAAC;GAC5C,CAAC;GACD,QAAQ;EACT,CAAC,IAAI,CAAC;CACP;AACD;AACA,SAAS,oBAAoB,MAAM,QAAQ,SAAS;CACnD,OAAO,CAAC,iBAAiB,MAAM;EAC9B,WAAW,EAAE,aAAa,OAAO;EACjC,iBAAiB;EACjB,kBAAkB;CACnB,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-targets/mongo/3-driver/dist/mongo-driver-CfJ69N8C.mjs
3
+ //#region ../../../3-targets/mongo/3-driver/dist/mongo-driver-Bf-j_7pF.mjs
4
4
  const DRIVER_INFO = {
5
5
  name: "Prisma",
6
- version: "8.0.0-rc.24-dev.15"
6
+ version: "8.0.0-rc.24-dev.17"
7
7
  };
8
8
  const mongoDriverDescriptorMeta = {
9
9
  kind: "driver",
@@ -194,4 +194,4 @@ var MongoDriverImpl = class MongoDriverImpl {
194
194
  //#endregion
195
195
  export { MongoDriverImpl as n, mongoDriverDescriptorMeta as r, DRIVER_INFO as t };
196
196
 
197
- //# sourceMappingURL=mongo-driver-CfJ69N8C-B5aKUbjW.mjs.map
197
+ //# sourceMappingURL=mongo-driver-Bf-j_7pF-CxF7b-9b.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"mongo-driver-CfJ69N8C-B5aKUbjW.mjs","names":[],"sources":["../../../../3-targets/mongo/3-driver/dist/mongo-driver-CfJ69N8C.mjs"],"sourcesContent":["import { BSON, MongoClient } from \"mongodb\";\nimport { assertNever } from \"@internal/utils/internal-error\";\n//#endregion\n//#region src/core/driver-info.ts\nconst DRIVER_INFO = {\n\tname: \"Prisma\",\n\tversion: \"8.0.0-rc.24-dev.15\"\n};\n//#endregion\n//#region src/core/descriptor-meta.ts\nconst mongoDriverDescriptorMeta = {\n\tkind: \"driver\",\n\tfamilyId: \"mongo\",\n\ttargetId: \"mongo\",\n\tid: \"mongo\",\n\tversion: DRIVER_INFO.version,\n\tcapabilities: {}\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\ttry {\n\t\t\tawait client.connect();\n\t\t} catch (error) {\n\t\t\tawait client.close();\n\t\t\tthrow error;\n\t\t}\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};\n//#endregion\nexport { mongoDriverDescriptorMeta as n, DRIVER_INFO as r, MongoDriverImpl as t };\n\n//# sourceMappingURL=mongo-driver-CfJ69N8C.mjs.map"],"mappings":";;;AAIA,MAAM,cAAc;CACnB,MAAM;CACN,SAAS;AACV;AAGA,MAAM,4BAA4B;CACjC,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS,YAAY;CACrB,cAAc,CAAC;AAChB;;AAIA,SAAS,gBAAgB,OAAO;CAC/B,MAAM,YAAY;CAClB,IAAI,OAAO,cAAc,YAAY,cAAc,QAAQ,UAAU,aAAa,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AG,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"}
1
+ {"version":3,"file":"mongo-driver-Bf-j_7pF-CxF7b-9b.mjs","names":[],"sources":["../../../../3-targets/mongo/3-driver/dist/mongo-driver-Bf-j_7pF.mjs"],"sourcesContent":["import { BSON, MongoClient } from \"mongodb\";\nimport { assertNever } from \"@internal/utils/internal-error\";\n//#endregion\n//#region src/core/driver-info.ts\nconst DRIVER_INFO = {\n\tname: \"Prisma\",\n\tversion: \"8.0.0-rc.24-dev.17\"\n};\n//#endregion\n//#region src/core/descriptor-meta.ts\nconst mongoDriverDescriptorMeta = {\n\tkind: \"driver\",\n\tfamilyId: \"mongo\",\n\ttargetId: \"mongo\",\n\tid: \"mongo\",\n\tversion: DRIVER_INFO.version,\n\tcapabilities: {}\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\ttry {\n\t\t\tawait client.connect();\n\t\t} catch (error) {\n\t\t\tawait client.close();\n\t\t\tthrow error;\n\t\t}\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};\n//#endregion\nexport { mongoDriverDescriptorMeta as n, DRIVER_INFO as r, MongoDriverImpl as t };\n\n//# sourceMappingURL=mongo-driver-Bf-j_7pF.mjs.map"],"mappings":";;;AAIA,MAAM,cAAc;CACnB,MAAM;CACN,SAAS;AACV;AAGA,MAAM,4BAA4B;CACjC,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS,YAAY;CACrB,cAAc,CAAC;AAChB;;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,IAAI;GACH,MAAM,OAAO,QAAQ;EACtB,SAAS,OAAO;GACf,MAAM,OAAO,MAAM;GACnB,MAAM;EACP;EACA,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,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;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"}
@@ -1,12 +1,12 @@
1
1
  import "@prisma/orm-family-mongo/contract";
2
- import { AnyMongoMigrationOperation, CollModOptions, CreateCollectionOptions, CreateIndexOptions, MongoDmlOperation, MongoFilterExpr, MongoIndexKey, MongoMigrationPlanOperation } from "@prisma/orm-family-mongo/query-ast/control";
2
+ import { AnyMongoMigrationOperation, CollModOptions, CreateCollectionOptions, CreateIndexOptions, MongoDmlOperation, MongoFieldRewriteMeta, MongoFilterExpr, MongoIndexKey, MongoMigrationPlanOperation } from "@prisma/orm-family-mongo/query-ast/control";
3
3
  import { MongoQueryPlan } from "@prisma/orm-family-mongo/query-ast/execution";
4
4
  import { MigrationOperationClass, OpFactoryCall } from "@prisma/orm-framework/components/control";
5
5
  import { JsonValue } from "@prisma/orm-framework/contract/types";
6
6
  import { MongoSchemaCollection, MongoSchemaIndex } from "@prisma/orm-family-mongo/schema-ir";
7
7
  import { ImportRequirement, TsExpression } from "@prisma/orm-framework/ts-render";
8
8
  import { Document } from "@prisma/orm-family-mongo/value";
9
- //#region ../../../3-targets/mongo/1-target/dist/op-factory-call-BCgwbVJe.d.mts
9
+ //#region ../../../3-targets/mongo/1-target/dist/op-factory-call-vacb7XmE.d.mts
10
10
  //#region src/core/migrations/migration-factories.d.ts
11
11
  interface Buildable {
12
12
  build(): MongoQueryPlan;
@@ -71,6 +71,75 @@ interface FillFieldOptions {
71
71
  * validation, as a migration fills a new required field with a temporary value.
72
72
  */
73
73
  declare function fillField(options: FillFieldOptions): MongoDmlOperation;
74
+ interface StoredKeyOptions {
75
+ readonly collection: string;
76
+ /** The stored name of the root field whose value holds the key. */
77
+ readonly field: string;
78
+ /** A JSONPath from the field's value to the key, such as `$[*].street`. A wildcard selects the elements of a list; it does not select an object's member values. */
79
+ readonly path: string;
80
+ readonly filter?: Document;
81
+ }
82
+ interface RenameStoredKeyOptions extends StoredKeyOptions {
83
+ readonly to: string;
84
+ }
85
+ interface FillStoredKeyOptions extends StoredKeyOptions {
86
+ /** An aggregation expression for the value, so it is stored with its BSON type: `{ $toLong: 0 }` stores a long. */
87
+ readonly value: JsonValue;
88
+ }
89
+ /**
90
+ * Renames the last key of `path` to `to` in every object at the path inside root field `field`,
91
+ * skipping document validation. The precheck stops when an object holds both names.
92
+ */
93
+ declare function renameStoredKey(options: RenameStoredKeyOptions): MongoDmlOperation;
94
+ /** Removes the last key of `path` from every object at the path inside root field `field`, skipping document validation. */
95
+ declare function removeStoredKey(options: StoredKeyOptions): MongoDmlOperation;
96
+ /**
97
+ * Sets the last key of `path` to `value` in every object at the path inside root field `field`
98
+ * where it is missing or `null`, skipping document validation.
99
+ */
100
+ declare function fillStoredKey(options: FillStoredKeyOptions): MongoDmlOperation;
101
+ /** A value a stored value operation matches by equality: an enum's stored value. */
102
+ type StoredValue = string | number | boolean;
103
+ interface StoredValueOptions {
104
+ readonly collection: string;
105
+ /** The stored name of the root field that holds the value, or whose value holds it. */
106
+ readonly field: string;
107
+ /** A JSONPath from the field's value to the key that holds the value, such as `$[*].status`; absent for the field itself. */
108
+ readonly path?: string;
109
+ readonly filter?: Document;
110
+ }
111
+ interface ReplaceStoredValueOptions extends StoredValueOptions {
112
+ readonly from: StoredValue;
113
+ /** An aggregation expression for the new value, so it is stored with its BSON type: `{ $toDouble: 2 }` stores a double. */
114
+ readonly to: JsonValue;
115
+ }
116
+ interface RemoveStoredValueOptions extends StoredValueOptions {
117
+ readonly value: StoredValue;
118
+ /** Whether the field or key must hold a value, so the operation stops while a document holds the value there outside a list. */
119
+ readonly required?: boolean;
120
+ /** The enum value whose stored value is removed, which the failure names when a required place holds it. */
121
+ readonly enumValue?: Extract<MongoFieldRewriteMeta, {
122
+ kind: 'removeStoredValue';
123
+ }>['enumValue'];
124
+ }
125
+ /**
126
+ * Replaces the stored value `from` with `to` where the field, or the key at `path` inside it, holds
127
+ * it: the value itself, or each element of a list equal to it. Skips document validation.
128
+ */
129
+ declare function replaceStoredValue(options: ReplaceStoredValueOptions): MongoDmlOperation;
130
+ /**
131
+ * Removes the stored value `value` where the field, or the key at `path` inside it, holds it: the
132
+ * field or key goes where it equals the value, and the value is pulled from a list. With
133
+ * `required`, the operation first checks that no document holds the value there outside a list.
134
+ * Skips document validation.
135
+ */
136
+ declare function removeStoredValue(options: RemoveStoredValueOptions): MongoDmlOperation;
137
+ interface DeleteDocumentsOptions {
138
+ readonly collection: string;
139
+ readonly filter: Document;
140
+ }
141
+ /** Deletes the documents of a collection that `filter` selects, as a variant's documents are deleted. */
142
+ declare function deleteDocuments(options: DeleteDocumentsOptions): MongoDmlOperation;
74
143
  /**
75
144
  * Creates an index under `options.name`, or under the name MongoDB would give it when the call gives none. The precheck requires that the collection holds no index with that name and none with the same keys and options; the postcheck requires an index with that name, keys and options.
76
145
  */
@@ -94,6 +163,13 @@ declare function validatedCollection(name: string, schema: Record<string, unknow
94
163
  unique?: boolean;
95
164
  }>): MongoMigrationPlanOperation[];
96
165
  //#endregion
166
+ //#region src/core/migrations/unfilled-value.d.ts
167
+ /** A value a planner-written operation takes from the user: its `migration.ts` writes `placeholder(slot)` where the value goes. */
168
+ declare class UnfilledValue {
169
+ readonly slot: string;
170
+ constructor(slot: string);
171
+ }
172
+ //#endregion
97
173
  //#region src/core/migrations/op-factory-call.d.ts
98
174
  interface CollModMeta {
99
175
  readonly id?: string;
@@ -229,6 +305,76 @@ declare class FillFieldCall extends OpFactoryCallNode {
229
305
  toOp(): MongoDmlOperation;
230
306
  renderTypeScript(): string;
231
307
  }
308
+ declare class RenameStoredKeyCall extends OpFactoryCallNode {
309
+ readonly factoryName: "renameStoredKey";
310
+ readonly operationClass: "widening";
311
+ readonly options: RenameStoredKeyOptions;
312
+ readonly label: string;
313
+ constructor(options: RenameStoredKeyOptions);
314
+ toOp(): MongoDmlOperation;
315
+ renderTypeScript(): string;
316
+ }
317
+ declare class RemoveStoredKeyCall extends OpFactoryCallNode {
318
+ readonly factoryName: "removeStoredKey";
319
+ readonly operationClass: "destructive";
320
+ readonly options: StoredKeyOptions;
321
+ readonly label: string;
322
+ constructor(options: StoredKeyOptions);
323
+ toOp(): MongoDmlOperation;
324
+ renderTypeScript(): string;
325
+ }
326
+ /** The options of a `fillStoredKey` call, whose value may be a placeholder the user fills in `migration.ts`. */
327
+ interface FillStoredKeyCallOptions extends StoredKeyOptions {
328
+ readonly value: JsonValue | UnfilledValue;
329
+ }
330
+ /**
331
+ * Sets a key inside a field's value where it is missing or `null`. An unfilled value is a placeholder
332
+ * the user fills in `migration.ts`; until then `toOp()` rejects with `MIGRATION.UNFILLED_PLACEHOLDER`.
333
+ */
334
+ declare class FillStoredKeyCall extends OpFactoryCallNode {
335
+ readonly factoryName: "fillStoredKey";
336
+ readonly operationClass: "widening";
337
+ readonly options: FillStoredKeyCallOptions;
338
+ readonly label: string;
339
+ constructor(options: FillStoredKeyCallOptions);
340
+ toOp(): MongoDmlOperation | Promise<never>;
341
+ renderTypeScript(): string;
342
+ importRequirements(): readonly ImportRequirement[];
343
+ }
344
+ declare class ReplaceStoredValueCall extends OpFactoryCallNode {
345
+ readonly factoryName: "replaceStoredValue";
346
+ readonly operationClass: "widening";
347
+ readonly options: ReplaceStoredValueOptions;
348
+ readonly label: string;
349
+ constructor(options: ReplaceStoredValueOptions);
350
+ toOp(): MongoDmlOperation;
351
+ renderTypeScript(): string;
352
+ }
353
+ /** What `migration.ts` imports for a `removeStoredValue` call beside the call itself. */
354
+ interface RemoveStoredValueImports {
355
+ /** Whether an edit that keeps the data can replace the call with `replaceStoredValue` calls: the plan's own edit, or the one a failed check of a required field gives. */
356
+ readonly importsReplacement: boolean;
357
+ }
358
+ declare class RemoveStoredValueCall extends OpFactoryCallNode {
359
+ readonly factoryName: "removeStoredValue";
360
+ readonly operationClass: "destructive";
361
+ readonly options: RemoveStoredValueOptions;
362
+ readonly imports: RemoveStoredValueImports;
363
+ readonly label: string;
364
+ constructor(options: RemoveStoredValueOptions, imports?: RemoveStoredValueImports);
365
+ toOp(): MongoDmlOperation;
366
+ renderTypeScript(): string;
367
+ importRequirements(): readonly ImportRequirement[];
368
+ }
369
+ declare class DeleteDocumentsCall extends OpFactoryCallNode {
370
+ readonly factoryName: "deleteDocuments";
371
+ readonly operationClass: "destructive";
372
+ readonly options: DeleteDocumentsOptions;
373
+ readonly label: string;
374
+ constructor(options: DeleteDocumentsOptions);
375
+ toOp(): MongoDmlOperation;
376
+ renderTypeScript(): string;
377
+ }
232
378
  declare class CollModCall extends OpFactoryCallNode {
233
379
  readonly factoryName: "collMod";
234
380
  readonly collection: string;
@@ -240,9 +386,9 @@ declare class CollModCall extends OpFactoryCallNode {
240
386
  toOp(): MongoMigrationPlanOperation;
241
387
  renderTypeScript(): string;
242
388
  }
243
- type OpFactoryCall$1 = CreateIndexCall | DropIndexCall | CreateCollectionCall | DropCollectionCall | RenameCollectionCall | RenameFieldCall | UnsetFieldCall | CastFieldCall | DataTransformCall | FillFieldCall | CollModCall;
389
+ type OpFactoryCall$1 = CreateIndexCall | DropIndexCall | CreateCollectionCall | DropCollectionCall | RenameCollectionCall | RenameFieldCall | UnsetFieldCall | CastFieldCall | DataTransformCall | FillFieldCall | RenameStoredKeyCall | RemoveStoredKeyCall | FillStoredKeyCall | ReplaceStoredValueCall | RemoveStoredValueCall | DeleteDocumentsCall | CollModCall;
244
390
  declare function schemaIndexToCreateIndexOptions(index: MongoSchemaIndex): IndexCallOptions;
245
391
  declare function schemaCollectionToCreateCollectionOptions(coll: MongoSchemaCollection): CreateCollectionOptions | undefined;
246
392
  //#endregion
247
- export { unsetField as A, rawAggregate as C, schemaCollectionToCreateCollectionOptions as D, renameField as E, schemaIndexToCreateIndexOptions as O, fillField as S, renameCollection as T, createCollection as _, CreateIndexCall as a, dropCollection as b, DropIndexCall as c, OpFactoryCall$1 as d, RenameCollectionCall as f, collMod as g, castField as h, CreateCollectionCall as i, validatedCollection as j, setValidation as k, FillFieldCall as l, UnsetFieldCall as m, CollModCall as n, DataTransformCall as o, RenameFieldCall as p, CollModMeta as r, DropCollectionCall as s, CastFieldCall as t, IndexCallOptions as u, createIndex as v, rawUpdateMany as w, dropIndex as x, dataTransform as y };
248
- //# sourceMappingURL=op-factory-call-BCgwbVJe-DhcJRxAb.d.mts.map
393
+ export { fillStoredKey as A, schemaIndexToCreateIndexOptions as B, createCollection as C, dropCollection as D, deleteDocuments as E, renameCollection as F, unsetField as H, renameField as I, renameStoredKey as L, rawUpdateMany as M, removeStoredKey as N, dropIndex as O, removeStoredValue as P, replaceStoredValue as R, collMod as S, dataTransform as T, validatedCollection as U, setValidation as V, RenameFieldCall as _, CreateIndexCall as a, UnsetFieldCall as b, DropCollectionCall as c, FillStoredKeyCall as d, IndexCallOptions as f, RenameCollectionCall as g, RemoveStoredValueCall as h, CreateCollectionCall as i, rawAggregate as j, fillField as k, DropIndexCall as l, RemoveStoredKeyCall as m, CollModCall as n, DataTransformCall as o, OpFactoryCall$1 as p, CollModMeta as r, DeleteDocumentsCall as s, CastFieldCall as t, FillFieldCall as u, RenameStoredKeyCall as v, createIndex as w, castField as x, ReplaceStoredValueCall as y, schemaCollectionToCreateCollectionOptions as z };
394
+ //# sourceMappingURL=op-factory-call-vacb7XmE-sHhC1Hit.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"op-factory-call-vacb7XmE-sHhC1Hit.d.mts","names":[],"sources":["../../../../3-targets/mongo/1-target/dist/op-factory-call-vacb7XmE.d.mts"],"mappings":";;;;;;;;;;UASU;EACR,SAAS;;iBAEM,cAAc,cAAc;;;;;;EAM3C;EACA;IACE,cAAc,iBAAiB;IAC/B,SAAS;IACT;IACA;;EAEF,WAAW,iBAAiB;IAC1B;;iBAEa,aAAa,wBAAwB,mBAAmB,aAAa;;;;;;;iBAOrE,cAAc,wB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AQ;EACR;;cAEY,4BAA4B;WAC/B;WACA;WACA,SAAS;WACT;EACT,YAAY,SAAS;EACrB,QAAQ;EACR;;;UAGQ,iCAAiC;WAChC,OAAO,YAAY;;;;;;cAMhB,0BAA0B;WAC7B;WACA;WACA,SAAS;WACT;EACT,YAAY,SAAS;EACrB,QAAQ,oBAAoB;EAC5B;EACA,+BAA+B;;cAEnB,+BAA+B;WAClC;WACA;WACA,SAAS;WACT;EACT,YAAY,SAAS;EACrB,QAAQ;EACR;;;UAGQ;;WAEC;;cAEG,8BAA8B;WACjC;WACA;WACA,SAAS;WACT,SAAS;WACT;EACT,YAAY,SAAS,0BAA0B,UAAU;EACzD,QAAQ;EACR;EACA,+BAA+B;;cAEnB,4BAA4B;WAC/B;WACA;WACA,SAAS;WACT;EACT,YAAY,SAAS;EACrB,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,gBAAgB,oBAAoB,gBAAgB,sBAAsB,sBAAsB,oBAAoB,yBAAyB,wBAAwB,sBAAsB;iBACzU,gCAAgC,OAAO,mBAAmB;iBAC1D,0CAA0C,MAAM,wBAAwB"}
package/dist/target.d.mts CHANGED
@@ -1,12 +1,12 @@
1
1
  import { _ as MONGO_STRING_CODEC_ID, a as MONGO_DATE_INSTANT_CODEC_ID, b as MONGO_VECTOR_CODEC_ID, c as MONGO_DATE_TEMPORAL_CODEC_ID, d as MONGO_DURATION_STRING_CODEC_ID, f as MONGO_INT32_CODEC_ID, g as MONGO_OBJECTID_CODEC_ID, h as MONGO_JSON_CODEC_ID, i as MONGO_DATE_CODEC_ID, l as MONGO_DECIMAL128_CODEC_ID, m as MONGO_INT64_NUMBER_CODEC_ID, n as MONGO_BOOLEAN_CODEC_ID, o as MONGO_DATE_INSTANT_STRING_CODEC_ID, p as MONGO_INT64_CODEC_ID, r as MONGO_BSON_CODEC_ID, s as MONGO_DATE_STRING_CODEC_ID, t as MONGO_BINARY_CODEC_ID, u as MONGO_DOUBLE_CODEC_ID, v as MONGO_TIME_STRING_CODEC_ID, y as MONGO_TIME_TEMPORAL_CODEC_ID } from "./codec-ids-B8WIyai-.mjs";
2
2
  import { a as ParameterizedOutputTypesForTypeParams, i as CodecTypes, n as BsonScalar, o as Vector, r as BsonValue, t as BsonInputValue } from "./codec-types-C6UDhw7l.mjs";
3
3
  import { n as mongoDescriptorById, t as mongoCodecDescriptors } from "./codecs-Bkkn7nm4.mjs";
4
- import { A as unsetField, C as rawAggregate, D as schemaCollectionToCreateCollectionOptions, E as renameField, O as schemaIndexToCreateIndexOptions, S as fillField, T as renameCollection, _ as createCollection, a as CreateIndexCall, b as dropCollection, c as DropIndexCall, d as OpFactoryCall$1, f as RenameCollectionCall, g as collMod, h as castField, i as CreateCollectionCall, j as validatedCollection, k as setValidation, m as UnsetFieldCall, n as CollModCall, p as RenameFieldCall, r as CollModMeta, s as DropCollectionCall, u as IndexCallOptions, v as createIndex, w as rawUpdateMany, x as dropIndex, y as dataTransform } from "./op-factory-call-BCgwbVJe-DhcJRxAb.mjs";
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-OiC131Dv.mjs";
4
+ import { A as fillStoredKey, B as schemaIndexToCreateIndexOptions, C as createCollection, D as dropCollection, E as deleteDocuments, F as renameCollection, H as unsetField, I as renameField, L as renameStoredKey, M as rawUpdateMany, N as removeStoredKey, O as dropIndex, P as removeStoredValue, R as replaceStoredValue, S as collMod, T as dataTransform, U as validatedCollection, V as setValidation, _ as RenameFieldCall, a as CreateIndexCall, b as UnsetFieldCall, c as DropCollectionCall, f as IndexCallOptions, g as RenameCollectionCall, i as CreateCollectionCall, j as rawAggregate, k as fillField, l as DropIndexCall, n as CollModCall, p as OpFactoryCall$1, r as CollModMeta, w as createIndex, x as castField, z as schemaCollectionToCreateCollectionOptions } from "./op-factory-call-vacb7XmE-sHhC1Hit.mjs";
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-Dc2P_CN-.mjs";
6
6
  import { S as mongoVectorParams, _ as mongoString, a as mongoCalendarDateText, b as mongoTimeText, c as mongoDecimal128, d as mongoDurationText, f as mongoInstantText, g as mongoObjectId, h as mongoJson, i as mongoCalendarDate, l as mongoDouble, m as mongoInt64, n as mongoBool, o as mongoDataTypes, p as mongoInt32, r as mongoBson, s as mongoDate, t as mongoBinary, u as mongoDuration, v as mongoTextDataTypes, x as mongoVector, y as mongoTime } from "./data-types-ozSM4YdB.mjs";
7
- import { n as MigrationCLI, r as placeholder, t as Migration } from "./migration-DASk9QNA.mjs";
7
+ import { n as MigrationCLI, r as placeholder, t as Migration } from "./migration-D78n7EUy.mjs";
8
8
  import "./pack-FzGKNW0Q.mjs";
9
9
  import { t as prisma6MongoBinding } from "./prisma6-binding-DhnqslLT.mjs";
10
10
  import { n as mongoNowGenerators, t as MongoRuntimeTargetInstance } from "./runtime-C-5ghims.mjs";
11
11
  import { t as MONGO_MIN_SERVER_VERSION } from "./server-version-B8XXr7hf.mjs";
12
- export { type BsonInputValue, type BsonScalar, type BsonValue, CodecTypes, CollModCall, type CollModMeta, CreateCollectionCall, CreateIndexCall, DropCollectionCall, DropIndexCall, FilterEvaluator, type IndexCallOptions, MONGO_BINARY_CODEC_ID, MONGO_BOOLEAN_CODEC_ID, MONGO_BSON_CODEC_ID, MONGO_DATE_CODEC_ID, MONGO_DATE_INSTANT_CODEC_ID, MONGO_DATE_INSTANT_STRING_CODEC_ID, MONGO_DATE_STRING_CODEC_ID, MONGO_DATE_TEMPORAL_CODEC_ID, MONGO_DECIMAL128_CODEC_ID, MONGO_DOUBLE_CODEC_ID, MONGO_DURATION_STRING_CODEC_ID, MONGO_INT32_CODEC_ID, MONGO_INT64_CODEC_ID, MONGO_INT64_NUMBER_CODEC_ID, MONGO_JSON_CODEC_ID, MONGO_MIN_SERVER_VERSION, MONGO_OBJECTID_CODEC_ID, MONGO_STRING_CODEC_ID, MONGO_TIME_STRING_CODEC_ID, MONGO_TIME_TEMPORAL_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, castField, collMod, createCollection, createIndex, dataTransform, deserializeMongoOp, deserializeMongoOps, dropCollection, dropIndex, fillField, mongoBinary, mongoBool, mongoBson, mongoCalendarDate, mongoCalendarDateText, mongoCodecDescriptors, mongoDataTypes, mongoDate, mongoDecimal128, mongoDescriptorById, mongoDouble, mongoDuration, mongoDurationText, mongoInstantText, mongoInt32, mongoInt64, mongoJson, mongoNowGenerators, mongoObjectId, mongoString, mongoTargetDescriptor, mongoTextDataTypes, mongoTime, mongoTimeText, mongoVector, mongoVectorParams, placeholder, prisma6MongoBinding, rawAggregate, rawUpdateMany, renameCollection, renameField, renderCallsToTypeScript, renderOps, schemaCollectionToCreateCollectionOptions, schemaIndexToCreateIndexOptions, serializeMongoOps, setValidation, unsetField, validatedCollection };
12
+ export { type BsonInputValue, type BsonScalar, type BsonValue, CodecTypes, CollModCall, type CollModMeta, CreateCollectionCall, CreateIndexCall, DropCollectionCall, DropIndexCall, FilterEvaluator, type IndexCallOptions, MONGO_BINARY_CODEC_ID, MONGO_BOOLEAN_CODEC_ID, MONGO_BSON_CODEC_ID, MONGO_DATE_CODEC_ID, MONGO_DATE_INSTANT_CODEC_ID, MONGO_DATE_INSTANT_STRING_CODEC_ID, MONGO_DATE_STRING_CODEC_ID, MONGO_DATE_TEMPORAL_CODEC_ID, MONGO_DECIMAL128_CODEC_ID, MONGO_DOUBLE_CODEC_ID, MONGO_DURATION_STRING_CODEC_ID, MONGO_INT32_CODEC_ID, MONGO_INT64_CODEC_ID, MONGO_INT64_NUMBER_CODEC_ID, MONGO_JSON_CODEC_ID, MONGO_MIN_SERVER_VERSION, MONGO_OBJECTID_CODEC_ID, MONGO_STRING_CODEC_ID, MONGO_TIME_STRING_CODEC_ID, MONGO_TIME_TEMPORAL_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, castField, collMod, createCollection, createIndex, dataTransform, deleteDocuments, deserializeMongoOp, deserializeMongoOps, dropCollection, dropIndex, fillField, fillStoredKey, mongoBinary, mongoBool, mongoBson, mongoCalendarDate, mongoCalendarDateText, mongoCodecDescriptors, mongoDataTypes, mongoDate, mongoDecimal128, mongoDescriptorById, mongoDouble, mongoDuration, mongoDurationText, mongoInstantText, mongoInt32, mongoInt64, mongoJson, mongoNowGenerators, mongoObjectId, mongoString, mongoTargetDescriptor, mongoTextDataTypes, mongoTime, mongoTimeText, mongoVector, mongoVectorParams, placeholder, prisma6MongoBinding, rawAggregate, rawUpdateMany, removeStoredKey, removeStoredValue, renameCollection, renameField, renameStoredKey, renderCallsToTypeScript, renderOps, replaceStoredValue, schemaCollectionToCreateCollectionOptions, schemaIndexToCreateIndexOptions, serializeMongoOps, setValidation, unsetField, validatedCollection };
package/dist/target.mjs CHANGED
@@ -2,9 +2,9 @@ import { _ as MONGO_STRING_CODEC_ID, a as MONGO_DATE_INSTANT_CODEC_ID, b as MONG
2
2
  import { $ as mongoVector, B as mongoDecimal128, F as mongoBson, G as mongoInt32, H as mongoDuration, I as mongoCalendarDate, J as mongoObjectId, K as mongoInt64, L as mongoCalendarDateText, N as mongoBinary, P as mongoBool, Q as mongoTimeText, R as mongoDataTypes, U as mongoDurationText, V as mongoDouble, W as mongoInstantText, X as mongoTextDataTypes, Y as mongoString, Z as mongoTime, et as mongoVectorParams, q as mongoJson, z as mongoDate } from "./data-types-BR7vssy0-CuNYIJHI.mjs";
3
3
  import { n as mongoDescriptorById, t as mongoCodecDescriptors } from "./codecs-DB6ji3ee-BzMiSM6G.mjs";
4
4
  import { n as mongoNowGenerators } from "./date-time-now-generators-CMBWOjGk-Dux-x9uO.mjs";
5
- import { _ as setValidation, a as createIndex, b as validatedCollection, d as fillField, g as renameField, h as renameCollection, i as createCollection, l as dropCollection, m as rawUpdateMany, o as dataTransform, p as rawAggregate, r as collMod, t as castField, u as dropIndex, y as unsetField } from "./migration-factories-C5ktmt8c-BP8k9SnZ.mjs";
6
- 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-BlMckWwK.mjs";
5
+ import { C as renameCollection, D as setValidation, E as replaceStoredValue, M as validatedCollection, S as removeStoredValue, T as renameStoredKey, a as createIndex, b as rawUpdateMany, d as dropCollection, f as dropIndex, i as createCollection, j as unsetField, m as fillStoredKey, o as dataTransform, p as fillField, r as collMod, s as deleteDocuments, t as castField, w as renameField, x as removeStoredKey, y as rawAggregate } from "./migration-factories-RJZq8NhE-CigCh286.mjs";
6
+ 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-ADZk3Q1S.mjs";
7
7
  import { n as MigrationCLI, r as placeholder, t as Migration } from "./migration-psmPNv10.mjs";
8
8
  import { t as prisma6MongoBinding } from "./prisma6-binding-BwMMxDjX.mjs";
9
9
  import { t as MONGO_MIN_SERVER_VERSION } from "./server-version-DYZgW3HI.mjs";
10
- export { CollModCall, CreateCollectionCall, CreateIndexCall, DropCollectionCall, DropIndexCall, FilterEvaluator, MONGO_BINARY_CODEC_ID, MONGO_BOOLEAN_CODEC_ID, MONGO_BSON_CODEC_ID, MONGO_DATE_CODEC_ID, MONGO_DATE_INSTANT_CODEC_ID, MONGO_DATE_INSTANT_STRING_CODEC_ID, MONGO_DATE_STRING_CODEC_ID, MONGO_DATE_TEMPORAL_CODEC_ID, MONGO_DECIMAL128_CODEC_ID, MONGO_DOUBLE_CODEC_ID, MONGO_DURATION_STRING_CODEC_ID, MONGO_INT32_CODEC_ID, MONGO_INT64_CODEC_ID, MONGO_INT64_NUMBER_CODEC_ID, MONGO_JSON_CODEC_ID, MONGO_MIN_SERVER_VERSION, MONGO_OBJECTID_CODEC_ID, MONGO_STRING_CODEC_ID, MONGO_TIME_STRING_CODEC_ID, MONGO_TIME_TEMPORAL_CODEC_ID, MONGO_VECTOR_CODEC_ID, Migration, MigrationCLI, MongoMigrationPlanner, MongoMigrationRunner, MongoTargetContractSerializer, MongoTargetDatabase, MongoTargetSchemaVerifier, MongoTargetUnboundDatabase, PlannerProducedMongoMigration, RenameCollectionCall, RenameFieldCall, UnsetFieldCall, castField, collMod, createCollection, createIndex, dataTransform, deserializeMongoOp, deserializeMongoOps, dropCollection, dropIndex, fillField, mongoBinary, mongoBool, mongoBson, mongoCalendarDate, mongoCalendarDateText, mongoCodecDescriptors, mongoDataTypes, mongoDate, mongoDecimal128, mongoDescriptorById, mongoDouble, mongoDuration, mongoDurationText, mongoInstantText, mongoInt32, mongoInt64, mongoJson, mongoNowGenerators, mongoObjectId, mongoString, mongoTargetDescriptor, mongoTextDataTypes, mongoTime, mongoTimeText, mongoVector, mongoVectorParams, placeholder, prisma6MongoBinding, rawAggregate, rawUpdateMany, renameCollection, renameField, renderCallsToTypeScript, renderOps, schemaCollectionToCreateCollectionOptions, schemaIndexToCreateIndexOptions, serializeMongoOps, setValidation, unsetField, validatedCollection };
10
+ export { CollModCall, CreateCollectionCall, CreateIndexCall, DropCollectionCall, DropIndexCall, FilterEvaluator, MONGO_BINARY_CODEC_ID, MONGO_BOOLEAN_CODEC_ID, MONGO_BSON_CODEC_ID, MONGO_DATE_CODEC_ID, MONGO_DATE_INSTANT_CODEC_ID, MONGO_DATE_INSTANT_STRING_CODEC_ID, MONGO_DATE_STRING_CODEC_ID, MONGO_DATE_TEMPORAL_CODEC_ID, MONGO_DECIMAL128_CODEC_ID, MONGO_DOUBLE_CODEC_ID, MONGO_DURATION_STRING_CODEC_ID, MONGO_INT32_CODEC_ID, MONGO_INT64_CODEC_ID, MONGO_INT64_NUMBER_CODEC_ID, MONGO_JSON_CODEC_ID, MONGO_MIN_SERVER_VERSION, MONGO_OBJECTID_CODEC_ID, MONGO_STRING_CODEC_ID, MONGO_TIME_STRING_CODEC_ID, MONGO_TIME_TEMPORAL_CODEC_ID, MONGO_VECTOR_CODEC_ID, Migration, MigrationCLI, MongoMigrationPlanner, MongoMigrationRunner, MongoTargetContractSerializer, MongoTargetDatabase, MongoTargetSchemaVerifier, MongoTargetUnboundDatabase, PlannerProducedMongoMigration, RenameCollectionCall, RenameFieldCall, UnsetFieldCall, castField, collMod, createCollection, createIndex, dataTransform, deleteDocuments, deserializeMongoOp, deserializeMongoOps, dropCollection, dropIndex, fillField, fillStoredKey, mongoBinary, mongoBool, mongoBson, mongoCalendarDate, mongoCalendarDateText, mongoCodecDescriptors, mongoDataTypes, mongoDate, mongoDecimal128, mongoDescriptorById, mongoDouble, mongoDuration, mongoDurationText, mongoInstantText, mongoInt32, mongoInt64, mongoJson, mongoNowGenerators, mongoObjectId, mongoString, mongoTargetDescriptor, mongoTextDataTypes, mongoTime, mongoTimeText, mongoVector, mongoVectorParams, placeholder, prisma6MongoBinding, rawAggregate, rawUpdateMany, removeStoredKey, removeStoredValue, renameCollection, renameField, renameStoredKey, renderCallsToTypeScript, renderOps, replaceStoredValue, schemaCollectionToCreateCollectionOptions, schemaIndexToCreateIndexOptions, serializeMongoOps, setValidation, unsetField, validatedCollection };
@@ -1,3 +1,3 @@
1
- import { D as schemaCollectionToCreateCollectionOptions, O as schemaIndexToCreateIndexOptions, a as CreateIndexCall, c as DropIndexCall, d as OpFactoryCall$1, f as RenameCollectionCall, i as CreateCollectionCall, m as UnsetFieldCall, n as CollModCall, p as RenameFieldCall, r as CollModMeta, s as DropCollectionCall, u as IndexCallOptions } from "./op-factory-call-BCgwbVJe-DhcJRxAb.mjs";
2
- 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-OiC131Dv.mjs";
1
+ import { B as schemaIndexToCreateIndexOptions, _ as RenameFieldCall, a as CreateIndexCall, b as UnsetFieldCall, c as DropCollectionCall, f as IndexCallOptions, g as RenameCollectionCall, i as CreateCollectionCall, l as DropIndexCall, n as CollModCall, p as OpFactoryCall$1, r as CollModMeta, z as schemaCollectionToCreateCollectionOptions } from "./op-factory-call-vacb7XmE-sHhC1Hit.mjs";
2
+ 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-Dc2P_CN-.mjs";
3
3
  export { CollModCall, type CollModMeta, CreateCollectionCall, CreateIndexCall, DropCollectionCall, DropIndexCall, FilterEvaluator, type IndexCallOptions, MongoMigrationPlanner, MongoMigrationRunner, type MongoMigrationRunnerErrorCode, type MongoMigrationRunnerExecuteOptions, type MongoMigrationRunnerFailure, type MongoMigrationRunnerResult, 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-BlMckWwK.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-ADZk3Q1S.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
- import { A as unsetField, C as rawAggregate, E as renameField, S as fillField, T as renameCollection, _ as createCollection, b as dropCollection, g as collMod, h as castField, j as validatedCollection, k as setValidation, v as createIndex, w as rawUpdateMany, x as dropIndex, y as dataTransform } from "./op-factory-call-BCgwbVJe-DhcJRxAb.mjs";
2
- import { n as MigrationCLI, r as placeholder, t as Migration } from "./migration-DASk9QNA.mjs";
3
- export { Migration, MigrationCLI, castField, collMod, createCollection, createIndex, dataTransform, dropCollection, dropIndex, fillField, placeholder, rawAggregate, rawUpdateMany, renameCollection, renameField, setValidation, unsetField, validatedCollection };
1
+ import { A as fillStoredKey, C as createCollection, D as dropCollection, E as deleteDocuments, F as renameCollection, H as unsetField, I as renameField, L as renameStoredKey, M as rawUpdateMany, N as removeStoredKey, O as dropIndex, P as removeStoredValue, R as replaceStoredValue, S as collMod, T as dataTransform, U as validatedCollection, V as setValidation, j as rawAggregate, k as fillField, w as createIndex, x as castField } from "./op-factory-call-vacb7XmE-sHhC1Hit.mjs";
2
+ import { n as MigrationCLI, r as placeholder, t as Migration } from "./migration-D78n7EUy.mjs";
3
+ export { Migration, MigrationCLI, castField, collMod, createCollection, createIndex, dataTransform, deleteDocuments, dropCollection, dropIndex, fillField, fillStoredKey, placeholder, rawAggregate, rawUpdateMany, removeStoredKey, removeStoredValue, renameCollection, renameField, renameStoredKey, replaceStoredValue, setValidation, unsetField, validatedCollection };
@@ -1,3 +1,3 @@
1
- import { _ as setValidation, a as createIndex, b as validatedCollection, d as fillField, g as renameField, h as renameCollection, i as createCollection, l as dropCollection, m as rawUpdateMany, o as dataTransform, p as rawAggregate, r as collMod, t as castField, u as dropIndex, y as unsetField } from "./migration-factories-C5ktmt8c-BP8k9SnZ.mjs";
1
+ import { C as renameCollection, D as setValidation, E as replaceStoredValue, M as validatedCollection, S as removeStoredValue, T as renameStoredKey, a as createIndex, b as rawUpdateMany, d as dropCollection, f as dropIndex, i as createCollection, j as unsetField, m as fillStoredKey, o as dataTransform, p as fillField, r as collMod, s as deleteDocuments, t as castField, w as renameField, x as removeStoredKey, y as rawAggregate } from "./migration-factories-RJZq8NhE-CigCh286.mjs";
2
2
  import { n as MigrationCLI, r as placeholder, t as Migration } from "./migration-psmPNv10.mjs";
3
- export { Migration, MigrationCLI, castField, collMod, createCollection, createIndex, dataTransform, dropCollection, dropIndex, fillField, placeholder, rawAggregate, rawUpdateMany, renameCollection, renameField, setValidation, unsetField, validatedCollection };
3
+ export { Migration, MigrationCLI, castField, collMod, createCollection, createIndex, dataTransform, deleteDocuments, dropCollection, dropIndex, fillField, fillStoredKey, placeholder, rawAggregate, rawUpdateMany, removeStoredKey, removeStoredValue, renameCollection, renameField, renameStoredKey, replaceStoredValue, setValidation, unsetField, validatedCollection };