@prisma/orm-family-mongo 8.0.0-rc.17-dev.14 → 8.0.0-rc.17-dev.16

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.
@@ -15,7 +15,7 @@ import { notOk, ok } from "@prisma/orm-framework/utils/result";
15
15
  import { basename, dirname, extname, join, normalize } from "pathe";
16
16
  import { resolveToOneRelationNullable } from "@prisma/orm-framework/contract-authoring";
17
17
  import { instantiateAuthoringEntityType, isAuthoringEntityTypeDescriptor } from "@prisma/orm-framework/components/authoring";
18
- import { buildSymbolTable, keywordPslSpan, mapPslDiagnostics, nodePslSpan, readResolvedAttribute, readResolvedAttributes } from "@prisma/orm-framework/psl-parser";
18
+ import { buildSymbolTable, keywordPslSpan, mapPslDiagnostics, nodePslSpan, readResolvedAttribute } from "@prisma/orm-framework/psl-parser";
19
19
  import { fkRelationPairKey } from "@prisma/orm-framework/psl-parser/interpret";
20
20
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
21
21
  //#region ../../../2-mongo-family/2-authoring/contract-prisma6/dist/provider.mjs
@@ -320,7 +320,7 @@ function inSourceOrder(diagnostics, documents) {
320
320
  }
321
321
  /** Prisma 6 accepts no dotted path in a datasource or generator block, though the parser reads one as a value. */
322
322
  function reportDottedBlockValues(block, sourceId, sources, diagnostics) {
323
- for (const entry of block.node.entries()) {
323
+ for (const entry of block.entries) {
324
324
  const value = entry.value();
325
325
  if (value === void 0) continue;
326
326
  for (const path of dottedPathsIn(value)) diagnostics.push({
@@ -338,7 +338,7 @@ function checkDatasource(datasources, fallbackSourceId, binding) {
338
338
  if (datasource === void 0) return prisma6Diagnostic("PSL.PRISMA6_MONGO_PROVIDER_MISMATCH", `No datasource block found; add \`datasource db { provider = "${namedProvider}" }\`.`, fallbackSourceId, void 0);
339
339
  const block = datasource.symbol;
340
340
  let parameter;
341
- for (const entry of block.node.entries()) if (entry.key()?.name() === "provider") {
341
+ for (const entry of block.entries) if (entry.key()?.name() === "provider") {
342
342
  parameter = entry;
343
343
  break;
344
344
  }
@@ -349,7 +349,7 @@ function checkDatasource(datasources, fallbackSourceId, binding) {
349
349
  }
350
350
  function buildEnum(located, input, diagnostics) {
351
351
  const { symbol: block, sourceId, sources } = located;
352
- for (const attribute of readResolvedAttributes(block.node.attributes(), sources)) {
352
+ for (const attribute of block.attributes) {
353
353
  if (attribute.name === "map") continue;
354
354
  if (attribute.name === "schema") {
355
355
  diagnostics.push(schemaUnsupported(`Enum "${block.name}"`, attribute, sourceId));
@@ -359,7 +359,7 @@ function buildEnum(located, input, diagnostics) {
359
359
  }
360
360
  const values = Object.create(null);
361
361
  const parameterSpans = Object.create(null);
362
- for (const entry of block.node.entries()) {
362
+ for (const entry of block.entries) {
363
363
  const name = entry.key()?.name();
364
364
  if (name === void 0) continue;
365
365
  let value = name;
@@ -1 +1 @@
1
- {"version":3,"file":"contract-prisma6__provider.mjs","names":[],"sources":["../../../../2-mongo-family/2-authoring/contract-prisma6/dist/provider.mjs"],"sourcesContent":["import { readFile, readdir, stat } from \"node:fs/promises\";\nimport { applySpecifierDefaultControlPolicy } from \"@internal/contract/apply-specifier-default-control-policy\";\nimport { validateContractDomain } from \"@internal/contract/validate-domain\";\nimport { MongoIndex, buildMongoStorage, encodeMongoValueSets, validateMongoStorage } from \"@internal/mongo-contract\";\nimport { ArrayLiteralAst, FunctionCallAst, IdentifierAst, PathExprAst, StringLiteralExprAst, dottedPathsIn, parse } from \"@internal/psl-parser/syntax\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { isStructuredError } from \"@internal/utils/structured-error\";\nimport { basename, dirname, extname, join, normalize } from \"pathe\";\nimport { buildExecutionSection, computeProfileHash } from \"@internal/contract/hashing\";\nimport { crossRef } from \"@internal/contract/types\";\nimport { resolveToOneRelationNullable } from \"@internal/contract-authoring\";\nimport { instantiateAuthoringEntityType, isAuthoringEntityTypeDescriptor } from \"@internal/framework-components/authoring\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { pairMongoBackRelations } from \"@internal/mongo-contract-psl\";\nimport { buildSymbolTable, keywordPslSpan, mapPslDiagnostics, nodePslSpan, readResolvedAttribute, readResolvedAttributes } from \"@internal/psl-parser\";\nimport { fkRelationPairKey } from \"@internal/psl-parser/interpret\";\nimport { ifDefined } from \"@internal/utils/defined\";\n//#region src/diagnostics.ts\nfunction prisma6Diagnostic(code, message, sourceId, span) {\n\treturn {\n\t\tcode,\n\t\tmessage,\n\t\tsourceId,\n\t\t...span !== void 0 ? { span } : {}\n\t};\n}\n//#endregion\n//#region src/indexes.ts\nfunction unsupported(attribute, what, span, ctx) {\n\tctx.diagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_INDEX_ARGUMENT_UNSUPPORTED\", `${ctx.owner}: ${ctx.prefix}${attribute.name} ${what}`, ctx.sourceId, span));\n}\nfunction sortDirection(expression) {\n\tif (expression === void 0) return void 0;\n\tconst token = IdentifierAst.cast(expression.syntax)?.name();\n\treturn token === \"Asc\" ? 1 : token === \"Desc\" ? -1 : void 0;\n}\n/**\n* Reads `sort:` from one index element's or `@unique`'s arguments. `length:` and every other argument are refused: a MongoDB index has no prefix length, and Prisma 6 accepts no other argument there on MongoDB.\n*/\nfunction readSort(attribute, args, ctx) {\n\tlet direction;\n\tfor (const arg of args) {\n\t\tconst key = arg.name()?.name();\n\t\tconst span = nodePslSpan(arg.syntax, ctx.sources);\n\t\tif (key !== \"sort\") return unsupported(attribute, key === \"length\" ? \"argument \\\"length\\\" is not supported: a MongoDB index has no prefix length. Remove it; Prisma 6 ignores it on MongoDB.\" : `argument \"${key ?? \"\"}\" is not supported.`, span, ctx);\n\t\tdirection = sortDirection(arg.value());\n\t\tif (direction === void 0) return unsupported(attribute, \"sort must be Asc or Desc.\", span, ctx);\n\t}\n\treturn { direction };\n}\nfunction readFields(attribute, expression, span, ctx) {\n\tconst array = expression === void 0 ? void 0 : ArrayLiteralAst.cast(expression.syntax);\n\tif (array === void 0) return unsupported(attribute, \"expects a list of field names.\", span, ctx);\n\tconst fields = [];\n\tfor (const element of array.elements()) {\n\t\tconst name = IdentifierAst.cast(element.syntax)?.name();\n\t\tif (name !== void 0) {\n\t\t\tfields.push({\n\t\t\t\tname,\n\t\t\t\tdirection: void 0\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst call = FunctionCallAst.cast(element.syntax);\n\t\tconst path = PathExprAst.cast(element.syntax)?.path() ?? call?.path() ?? [];\n\t\tconst [callee] = path;\n\t\tif (path.length > 1 && (callee === void 0 || !ctx.compositeFields.has(callee))) return unsupported(attribute, `lists the dotted path \"${path.join(\".\")}\", but \"${callee ?? \"\"}\" is not a composite-type field of the model, and Prisma 6 refuses the path as an unknown field. List fields of the model by name.`, nodePslSpan(element.syntax, ctx.sources), ctx);\n\t\tif (path.length > 1) {\n\t\t\tctx.diagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_COMPOSITE_INDEX_PATH_UNSUPPORTED\", `Index path \"${path.join(\".\")}\" reaches into a composite type; indexes on composite-type fields are not supported yet. Index a top-level field or remove the index. Either change also reaches the Prisma 6 app, whose \\`db push\\` builds its indexes from this schema.`, ctx.sourceId, nodePslSpan(element.syntax, ctx.sources)));\n\t\t\treturn;\n\t\t}\n\t\tif (call === void 0 || callee === void 0) return unsupported(attribute, \"expects a list of field names.\", nodePslSpan(element.syntax, ctx.sources), ctx);\n\t\tconst sort = readSort(attribute, call.args(), ctx);\n\t\tif (sort === void 0) return void 0;\n\t\tfields.push({\n\t\t\tname: callee,\n\t\t\tdirection: sort.direction\n\t\t});\n\t}\n\treturn fields;\n}\n/** Reads `@@index`, `@@unique` or `@@fulltext`. `map:` and `name:` are dropped: MongoDB verify never compares index names. */\nfunction parseIndexAttribute(attribute, ctx) {\n\tlet fields;\n\tfor (const arg of attribute.args) {\n\t\tconst key = arg.kind === \"positional\" ? \"fields\" : arg.name;\n\t\tif (key === \"map\" || key === \"name\") continue;\n\t\tif (key !== \"fields\") return unsupported(attribute, `argument \"${key ?? \"\"}\" is not supported.`, arg.span, ctx);\n\t\tfields = readFields(attribute, arg.expression, arg.span, ctx);\n\t\tif (fields === void 0) return void 0;\n\t}\n\tif (fields === void 0 || fields.length === 0) return unsupported(attribute, \"expects a list of field names.\", attribute.span, ctx);\n\treturn {\n\t\tkind: attribute.name,\n\t\tfields,\n\t\tspan: attribute.span\n\t};\n}\n/** Reads a field's `@unique`: `sort:` sets the key direction; `map:` and `name:` are dropped. */\nfunction parseFieldUnique(attribute, fieldName, ctx) {\n\tlet direction;\n\tfor (const arg of attribute.args) {\n\t\tconst key = arg.kind === \"positional\" ? void 0 : arg.name;\n\t\tif (key === \"map\" || key === \"name\") continue;\n\t\tif (key === \"sort\") {\n\t\t\tdirection = sortDirection(arg.expression);\n\t\t\tif (direction === void 0) return unsupported(attribute, \"sort must be Asc or Desc.\", arg.span, ctx);\n\t\t\tcontinue;\n\t\t}\n\t\treturn unsupported(attribute, key === \"length\" ? \"argument \\\"length\\\" is not supported: a MongoDB index has no prefix length. Remove it; Prisma 6 ignores it on MongoDB.\" : `argument \"${key ?? \"\"}\" is not supported.`, arg.span, ctx);\n\t}\n\treturn {\n\t\tkind: \"unique\",\n\t\tfields: [{\n\t\t\tname: fieldName,\n\t\t\tdirection\n\t\t}],\n\t\tspan: attribute.span\n\t};\n}\n//#endregion\n//#region src/interpreter.ts\nconst SUMMARY = \"Prisma 6 MongoDB schema interpretation failed\";\nfunction stringArgument(attribute) {\n\tconst expression = (attribute.args.find((arg) => arg.kind === \"positional\") ?? attribute.args.find((arg) => arg.name === \"name\"))?.expression;\n\treturn expression === void 0 ? void 0 : StringLiteralExprAst.cast(expression.syntax)?.value();\n}\nfunction requireString(attribute, owner, sourceId, diagnostics) {\n\tconst value = stringArgument(attribute);\n\tif (value === void 0) diagnostics.push({\n\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\tmessage: `${owner}: attribute \"@${attribute.name}\" expects one string argument.`,\n\t\tsourceId,\n\t\tspan: attribute.span\n\t});\n\treturn value;\n}\nfunction attributeText(attribute) {\n\tconst args = attribute.args.map((arg) => arg.kind === \"named\" ? `${arg.name}: ${arg.value}` : arg.value);\n\treturn args.length === 0 ? `@${attribute.name}` : `@${attribute.name}(${args.join(\", \")})`;\n}\n/** `auto()` and `now()` with no arguments; any other `@default` value is `other`. */\nfunction defaultKind(attribute) {\n\tconst expression = attribute.args.find((arg) => arg.kind === \"positional\")?.expression;\n\tconst call = expression === void 0 ? void 0 : FunctionCallAst.cast(expression.syntax);\n\tif (call === void 0 || [...call.args()].length > 0) return \"other\";\n\tconst path = call.path().join(\".\");\n\treturn path === \"auto\" ? \"auto\" : path === \"now\" ? \"now\" : \"other\";\n}\nfunction unknownAttribute(owner, attribute, prefix, sourceId) {\n\treturn prisma6Diagnostic(\"PSL.PRISMA6_MONGO_UNKNOWN_ATTRIBUTE\", `${owner}: attribute \"${prefix}${attribute.name}\" is not supported by the Prisma 6 MongoDB contract source.`, sourceId, attribute.span);\n}\nfunction interpretPrisma6Documents(input) {\n\tconst { binding } = input;\n\tconst diagnostics = [...input.seedDiagnostics];\n\tconst datasources = [];\n\tconst enumBlocks = [];\n\tconst compositeTypes = [];\n\tconst models = [];\n\tconst ignoredModels = /* @__PURE__ */ new Set();\n\tconst declaredNames = /* @__PURE__ */ new Map();\n\tconst claimName = (kind, name, sourceId, span) => {\n\t\tconst previous = declaredNames.get(name);\n\t\tif (previous === void 0) {\n\t\t\tdeclaredNames.set(name, sourceId);\n\t\t\treturn true;\n\t\t}\n\t\tdiagnostics.push({\n\t\t\tcode: \"PSL_DUPLICATE_DECLARATION\",\n\t\t\tmessage: `Duplicate declaration of ${kind} \"${name}\"; first declared in ${basename(previous)}.`,\n\t\t\tsourceId,\n\t\t\tspan\n\t\t});\n\t\treturn false;\n\t};\n\tfor (const { document, sources, sourceFile, sourceId } of input.documents) {\n\t\tconst { symbolTable, diagnostics: tableDiagnostics } = buildSymbolTable({\n\t\t\tdocuments: [document],\n\t\t\tsources\n\t\t});\n\t\tfor (const diagnostic of tableDiagnostics) diagnostics.push({\n\t\t\tcode: diagnostic.code,\n\t\t\tmessage: diagnostic.message,\n\t\t\tsourceId,\n\t\t\tspan: sourceFile.rangeToPslSpan(diagnostic.range)\n\t\t});\n\t\tconst unsupported = (keyword, span) => {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_UNSUPPORTED_TOP_LEVEL_BLOCK\",\n\t\t\t\tmessage: `Unsupported top-level block \"${keyword}\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan\n\t\t\t});\n\t\t};\n\t\tfor (const block of Object.values(symbolTable.topLevel.blocks)) switch (block.keyword) {\n\t\t\tcase \"datasource\":\n\t\t\t\tdatasources.push({\n\t\t\t\t\tsymbol: block,\n\t\t\t\t\tsourceId,\n\t\t\t\t\tsources\n\t\t\t\t});\n\t\t\t\treportDottedBlockValues(block, sourceId, sources, diagnostics);\n\t\t\t\tbreak;\n\t\t\tcase \"generator\":\n\t\t\t\treportDottedBlockValues(block, sourceId, sources, diagnostics);\n\t\t\t\tbreak;\n\t\t\tcase \"enum\":\n\t\t\t\tif (claimName(\"enum\", block.name, sourceId, block.span)) enumBlocks.push({\n\t\t\t\t\tsymbol: block,\n\t\t\t\t\tsourceId,\n\t\t\t\t\tsources\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase \"view\":\n\t\t\t\tdiagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_VIEW_UNSUPPORTED\", `View \"${block.name}\" is not supported; Prisma 8 has no views on MongoDB. Remove the view from the schema this contract source reads. The Prisma 6 client then loses the view's model too.`, sourceId, keywordPslSpan(block.node.syntax, block.keyword, sources)));\n\t\t\t\tbreak;\n\t\t\tdefault: unsupported(block.keyword, keywordPslSpan(block.node.syntax, block.keyword, sources));\n\t\t}\n\t\tfor (const namespace of Object.values(symbolTable.topLevel.namespaces)) for (const { span } of namespace.declarations) unsupported(\"namespace\", span);\n\t\tfor (const namedType of Object.values(symbolTable.topLevel.namedTypes)) unsupported(\"types\", namedType.span);\n\t\tfor (const symbol of Object.values(symbolTable.topLevel.compositeTypes)) if (claimName(\"type\", symbol.name, sourceId, symbol.span)) compositeTypes.push({\n\t\t\tsymbol,\n\t\t\tsourceId,\n\t\t\tsources\n\t\t});\n\t\tfor (const symbol of Object.values(symbolTable.topLevel.models)) {\n\t\t\tif (!claimName(\"model\", symbol.name, sourceId, symbol.span)) continue;\n\t\t\tif (symbol.attributes.some((attribute) => attribute.name === \"ignore\")) ignoredModels.add(symbol.name);\n\t\t\telse models.push({\n\t\t\t\tsymbol,\n\t\t\t\tsourceId,\n\t\t\t\tsources\n\t\t\t});\n\t\t}\n\t}\n\tconst providerMismatch = checkDatasource(datasources, input.documents[0]?.sourceId ?? \"schema.prisma\", binding);\n\tif (providerMismatch !== void 0) return notOk({\n\t\tsummary: SUMMARY,\n\t\tdiagnostics: inSourceOrder([...input.seedDiagnostics, providerMismatch], input.documents)\n\t});\n\tconst enums = /* @__PURE__ */ new Map();\n\tfor (const located of enumBlocks) {\n\t\tconst built = buildEnum(located, input, diagnostics);\n\t\tif (built !== void 0) enums.set(located.symbol.name, built);\n\t}\n\tconst modelNames = /* @__PURE__ */ new Set([...models.map((m) => m.symbol.name), ...ignoredModels]);\n\tconst typeContext = {\n\t\tbinding,\n\t\tenums,\n\t\tcompositeTypeNames: new Set(compositeTypes.map((c) => c.symbol.name)),\n\t\tdiagnostics\n\t};\n\tconst valueObjects = {};\n\tfor (const located of compositeTypes) valueObjects[located.symbol.name] = { fields: readCompositeFields(located, typeContext) };\n\tconst builds = /* @__PURE__ */ new Map();\n\tfor (const located of models) builds.set(located.symbol.name, readModel(located, modelNames, ignoredModels, typeContext));\n\tconst foreignKeys = [];\n\tconst invalidFkPairings = [];\n\tconst backRelations = [];\n\tfor (const build of builds.values()) readRelationFields(build, builds, {\n\t\tforeignKeys,\n\t\tinvalidFkPairings,\n\t\tbackRelations\n\t}, diagnostics);\n\tconst paired = pairMongoBackRelations({\n\t\tforeignKeys,\n\t\tcandidates: backRelations,\n\t\tinvalidFkPairings\n\t});\n\tdiagnostics.push(...mapPslDiagnostics(paired.diagnostics, mergedSources(input.documents)));\n\tfor (const { modelName, fieldName, relation } of paired.relations) {\n\t\tconst build = builds.get(modelName);\n\t\tif (build !== void 0) build.relations[fieldName] = relation;\n\t}\n\tconst collections = {};\n\tconst roots = {};\n\tconst executionDefaults = [];\n\tfor (const [modelName, build] of builds) {\n\t\tconst indexes = buildIndexes(build, diagnostics);\n\t\tconst existing = collections[build.collection];\n\t\tcollections[build.collection] = { indexes: [...existing?.indexes ?? [], ...indexes] };\n\t\troots[build.collection] = crossRef(modelName, UNBOUND_NAMESPACE_ID);\n\t\tfor (const { field, phases } of build.executionDefaults) executionDefaults.push({\n\t\t\tref: {\n\t\t\t\tnamespace: UNBOUND_NAMESPACE_ID,\n\t\t\t\tentry: build.collection,\n\t\t\t\tfield\n\t\t\t},\n\t\t\t...phases\n\t\t});\n\t\tif (!build.hasId) diagnostics.push({\n\t\t\tcode: \"PSL_MISSING_ID_FIELD\",\n\t\t\tmessage: `Model \"${modelName}\" has no field with @id attribute. Every model must have exactly one @id field.`,\n\t\t\tsourceId: build.located.sourceId,\n\t\t\tspan: build.located.symbol.span\n\t\t});\n\t}\n\tif (diagnostics.length > 0) return notOk({\n\t\tsummary: SUMMARY,\n\t\tdiagnostics: inSourceOrder(diagnostics, input.documents)\n\t});\n\treturn ok(assembleContract({\n\t\tbinding,\n\t\tbuilds,\n\t\tcollections,\n\t\troots,\n\t\tvalueObjects,\n\t\tenums,\n\t\texecutionDefaults,\n\t\tcodecLookup: input.codecLookup\n\t}));\n}\n/**\n* Diagnostics by file, in the order the schema files were read, then by position; one with no position comes first in its file.\n*/\nfunction inSourceOrder(diagnostics, documents) {\n\tconst fileOrder = new Map(documents.map((document, index) => [document.sourceId, index]));\n\tconst fileRank = (diagnostic) => fileOrder.get(diagnostic.sourceId) ?? documents.length;\n\tconst offset = (diagnostic) => diagnostic.span?.start.offset ?? -1;\n\treturn [...diagnostics].sort((a, b) => fileRank(a) - fileRank(b) || offset(a) - offset(b));\n}\n/** Prisma 6 accepts no dotted path in a datasource or generator block, though the parser reads one as a value. */\nfunction reportDottedBlockValues(block, sourceId, sources, diagnostics) {\n\tfor (const entry of block.node.entries()) {\n\t\tconst value = entry.value();\n\t\tif (value === void 0) continue;\n\t\tfor (const path of dottedPathsIn(value)) diagnostics.push({\n\t\t\tcode: \"PSL_INVALID_EXTENSION_BLOCK_MEMBER\",\n\t\t\tmessage: `${block.keyword} \"${block.name}\": the value of \"${entry.key()?.name() ?? \"\"}\" holds the dotted path ${path.path().join(\".\")}, which Prisma 6 does not accept in a ${block.keyword} block.`,\n\t\t\tsourceId,\n\t\t\tspan: nodePslSpan(path.syntax, sources)\n\t\t});\n\t}\n}\n/** The provider-mismatch diagnostic, or `undefined` when the schema names a provider the target reads. */\nfunction checkDatasource(datasources, fallbackSourceId, binding) {\n\tconst [datasource] = datasources;\n\tconst [namedProvider] = binding.providers;\n\tif (datasource === void 0) return prisma6Diagnostic(\"PSL.PRISMA6_MONGO_PROVIDER_MISMATCH\", `No datasource block found; add \\`datasource db { provider = \"${namedProvider}\" }\\`.`, fallbackSourceId, void 0);\n\tconst block = datasource.symbol;\n\tlet parameter;\n\tfor (const entry of block.node.entries()) if (entry.key()?.name() === \"provider\") {\n\t\tparameter = entry;\n\t\tbreak;\n\t}\n\tconst expression = parameter?.value();\n\tconst provider = expression instanceof StringLiteralExprAst ? expression.value() : void 0;\n\tif (provider !== void 0 && binding.providers.includes(provider)) return void 0;\n\treturn prisma6Diagnostic(\"PSL.PRISMA6_MONGO_PROVIDER_MISMATCH\", provider === void 0 ? `The datasource block declares no string \\`provider\\`; this contract source reads Prisma 6 schemas for provider \"${namedProvider}\".` : `The datasource provider is \"${provider}\"; this contract source reads Prisma 6 schemas for provider \"${namedProvider}\".`, datasource.sourceId, parameter === void 0 ? block.span : nodePslSpan(parameter.syntax, datasource.sources));\n}\nfunction buildEnum(located, input, diagnostics) {\n\tconst { symbol: block, sourceId, sources } = located;\n\tfor (const attribute of readResolvedAttributes(block.node.attributes(), sources)) {\n\t\tif (attribute.name === \"map\") continue;\n\t\tif (attribute.name === \"schema\") {\n\t\t\tdiagnostics.push(schemaUnsupported(`Enum \"${block.name}\"`, attribute, sourceId));\n\t\t\tcontinue;\n\t\t}\n\t\tdiagnostics.push(unknownAttribute(`Enum \"${block.name}\"`, attribute, \"@@\", sourceId));\n\t}\n\tconst values = Object.create(null);\n\tconst parameterSpans = Object.create(null);\n\tfor (const entry of block.node.entries()) {\n\t\tconst name = entry.key()?.name();\n\t\tif (name === void 0) continue;\n\t\tlet value = name;\n\t\tfor (const attributeNode of entry.attributes()) {\n\t\t\tconst attribute = readResolvedAttribute(attributeNode, sources);\n\t\t\tif (attribute.name === \"map\") value = requireString(attribute, `Enum member \"${block.name}.${name}\"`, sourceId, diagnostics) ?? value;\n\t\t\telse diagnostics.push(unknownAttribute(`Enum member \"${block.name}.${name}\"`, attribute, \"@\", sourceId));\n\t\t}\n\t\tvalues[name] = value;\n\t\tparameterSpans[name] = nodePslSpan(entry.syntax, sources);\n\t}\n\tconst descriptor = input.authoringContributions.entityTypes[\"enum\"];\n\tif (descriptor === void 0 || !isAuthoringEntityTypeDescriptor(descriptor)) {\n\t\tdiagnostics.push({\n\t\t\tcode: \"PSL_ENUM_MISSING_FACTORY\",\n\t\t\tmessage: `enum \"${block.name}\" requires an \"enum\" entityType factory in the active authoring contributions`,\n\t\t\tsourceId,\n\t\t\tspan: block.span\n\t\t});\n\t\treturn;\n\t}\n\tconst context = {\n\t\tfamily: input.binding.target.familyId,\n\t\ttarget: input.binding.target.targetId,\n\t\tcodecLookup: input.codecLookup,\n\t\tdataTypeLookup: input.dataTypes.lookup,\n\t\tsourceId,\n\t\tenumInferenceCodecs: {\n\t\t\ttext: input.binding.scalarCodecIds.String,\n\t\t\tint: input.binding.scalarCodecIds.Int\n\t\t},\n\t\tdiagnostics: { push: (diagnostic) => {\n\t\t\tdiagnostics.push(blindCast(diagnostic));\n\t\t} }\n\t};\n\tconst handle = instantiateAuthoringEntityType(\"enum\", descriptor, [{\n\t\tkind: \"enum\",\n\t\tkeyword: \"enum\",\n\t\tname: block.name,\n\t\tvalues,\n\t\tparameterSpans,\n\t\tattributes: {},\n\t\tspan: block.span\n\t}], context);\n\tif (handle === void 0 || handle === null) return void 0;\n\treturn {\n\t\tcodecId: handle.codecId,\n\t\tmembers: handle.enumMembers.map((member) => ({\n\t\t\tname: member.name,\n\t\t\tvalue: member.value\n\t\t}))\n\t};\n}\nfunction schemaUnsupported(owner, attribute, sourceId) {\n\treturn prisma6Diagnostic(\"PSL.PRISMA6_MONGO_SCHEMA_UNSUPPORTED\", `${owner}: \"@@schema\" is not supported; a MongoDB contract has one database, bound by the connection string. Remove @@schema.`, sourceId, attribute.span);\n}\nfunction unsupportedTypeMessage(label, typeName, owner) {\n\tconst base = `${label} has type \"${typeName}(...)\", which has no Prisma 8 codec, so ${`${owner.kind} \"${owner.name}\"`} cannot use this contract source while it has the field. Prisma 6 rejects @ignore on an Unsupported field. Removing the field from the schema leaves its stored values in the documents, but the Prisma 6 client no longer reads or writes them.`;\n\tif (owner.kind === \"type\") return base;\n\treturn `${base} Adding @@ignore to model \"${owner.name}\" keeps the model out of the contract, but the model disappears from the Prisma 6 client too, and every relation field in another model that points to it needs @ignore, which removes that field from the Prisma 6 client as well.`;\n}\n/** The native types Prisma 6 accepts on each MongoDB scalar, checked with Prisma 6.19. */\nconst PRISMA6_NATIVE_TYPES = {\n\tString: [\"db.String\", \"db.ObjectId\"],\n\tBoolean: [\"db.Bool\"],\n\tInt: [\"db.Int\", \"db.Long\"],\n\tBigInt: [\"db.Long\"],\n\tFloat: [\"db.Double\"],\n\tDateTime: [\"db.Date\", \"db.Timestamp\"],\n\tBytes: [\"db.BinData\", \"db.ObjectId\"],\n\tJson: [\"db.Json\"]\n};\n/** The BSON type Prisma 6 stores for each native type. */\nconst PRISMA6_NATIVE_TYPE_BSON = {\n\t\"db.String\": \"string\",\n\t\"db.ObjectId\": \"objectId\",\n\t\"db.Bool\": \"bool\",\n\t\"db.Int\": \"int\",\n\t\"db.Long\": \"long\",\n\t\"db.Double\": \"double\",\n\t\"db.Date\": \"date\",\n\t\"db.Timestamp\": \"timestamp\",\n\t\"db.BinData\": \"binData\",\n\t\"db.Json\": \"object\"\n};\n/** The BSON type Prisma 6 stores for each MongoDB scalar that has no native type. `Int` is a long. */\nconst PRISMA6_SCALAR_BSON = {\n\tString: \"string\",\n\tBoolean: \"bool\",\n\tInt: \"long\",\n\tBigInt: \"long\",\n\tFloat: \"double\",\n\tDateTime: \"date\",\n\tBytes: \"binData\",\n\tJson: \"object\"\n};\nfunction withArticle(typeName) {\n\treturn `${/^[AEIOU]/.test(typeName) ? \"an\" : \"a\"} ${typeName}`;\n}\nfunction acceptedByPrisma6(nativeType, typeName) {\n\treturn (Object.hasOwn(PRISMA6_NATIVE_TYPES, typeName) ? PRISMA6_NATIVE_TYPES[typeName] : void 0)?.includes(nativeType) === true;\n}\n/** Why the reader refuses a native type, and what removing it does to the Prisma 6 app. */\nfunction nativeTypeRefusal(label, nativeType, typeName) {\n\tconst refused = `${label}: native type \"@${nativeType}\" is not supported`;\n\tif (!acceptedByPrisma6(nativeType, typeName)) return `${refused}, and Prisma 6 does not accept it on ${withArticle(typeName)} field either. Remove it.`;\n\tconst declared = PRISMA6_NATIVE_TYPE_BSON[nativeType];\n\tconst plain = PRISMA6_SCALAR_BSON[typeName];\n\treturn `${refused}: Prisma 6 stores it as a BSON ${declared}, and Prisma 8 has no codec for that BSON type. Remove it; this also changes the Prisma 6 app: its client then stores new ${typeName} values as BSON ${plain} instead of ${declared}. Documents already stored keep their ${declared} values, so rewrite them as ${plain}s before Prisma 8 reads them.`;\n}\nfunction nativeTypeCodecId(binding, typeName, nativeType) {\n\tconst forType = Object.hasOwn(binding.nativeTypeCodecIds, typeName) ? binding.nativeTypeCodecIds[typeName] : void 0;\n\treturn forType !== void 0 && Object.hasOwn(forType, nativeType) ? forType[nativeType] : void 0;\n}\n/** The field's contract type, or `undefined` after reporting why it has none. */\nfunction resolveFieldType(field, owner, nativeType, sourceId, ctx) {\n\tconst { binding, diagnostics } = ctx;\n\tconst label = `Field \"${owner.name}.${field.name}\"`;\n\tif (field.typeConstructor !== void 0) {\n\t\tdiagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_UNSUPPORTED_TYPE\", unsupportedTypeMessage(label, field.typeConstructor.path.join(\".\"), owner), sourceId, field.typeConstructor.span));\n\t\treturn;\n\t}\n\tconst nativeTypeUnsupported = (attribute) => {\n\t\tdiagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_NATIVE_TYPE_UNSUPPORTED\", nativeTypeRefusal(label, attribute.name, field.typeName), sourceId, attribute.span));\n\t};\n\tconst many = { many: field.list ? { elementNullable: false } : false };\n\tif (ctx.compositeTypeNames.has(field.typeName)) {\n\t\tif (nativeType !== void 0) return nativeTypeUnsupported(nativeType);\n\t\treturn {\n\t\t\ttype: {\n\t\t\t\tkind: \"valueObject\",\n\t\t\t\tname: field.typeName\n\t\t\t},\n\t\t\tnullable: field.optional,\n\t\t\t...many\n\t\t};\n\t}\n\tconst enumBuild = ctx.enums.get(field.typeName);\n\tif (enumBuild !== void 0) {\n\t\tif (nativeType !== void 0) return nativeTypeUnsupported(nativeType);\n\t\tconst valueSet = {\n\t\t\tplane: \"domain\",\n\t\t\tentityKind: \"enum\",\n\t\t\tnamespaceId: UNBOUND_NAMESPACE_ID,\n\t\t\tentityName: field.typeName\n\t\t};\n\t\treturn {\n\t\t\ttype: {\n\t\t\t\tkind: \"scalar\",\n\t\t\t\tcodecId: enumBuild.codecId\n\t\t\t},\n\t\t\tnullable: field.optional,\n\t\t\tvalueSet,\n\t\t\t...many\n\t\t};\n\t}\n\tconst scalarCodecId = Object.hasOwn(binding.scalarCodecIds, field.typeName) ? binding.scalarCodecIds[field.typeName] : void 0;\n\tif (scalarCodecId === void 0) {\n\t\tdiagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_UNSUPPORTED_TYPE\", `${label} has unknown type \"${field.typeName}\": it is not a scalar type, an enum, a composite type, or a model. Correct the type name.`, sourceId, field.span));\n\t\treturn;\n\t}\n\tlet codecId = scalarCodecId;\n\tif (nativeType !== void 0) {\n\t\tconst nativeCodecId = nativeTypeCodecId(binding, field.typeName, nativeType.name);\n\t\tif (nativeCodecId === void 0) return nativeTypeUnsupported(nativeType);\n\t\tcodecId = nativeCodecId;\n\t}\n\treturn {\n\t\ttype: {\n\t\t\tkind: \"scalar\",\n\t\t\tcodecId\n\t\t},\n\t\tnullable: field.optional,\n\t\t...many\n\t};\n}\nfunction readCompositeFields(located, ctx) {\n\tconst { symbol, sourceId } = located;\n\tfor (const attribute of symbol.attributes) ctx.diagnostics.push(unknownAttribute(`Type \"${symbol.name}\"`, attribute, \"@@\", sourceId));\n\tconst fields = {};\n\tfor (const field of Object.values(symbol.fields)) {\n\t\tif (field.malformedType) continue;\n\t\tconst label = `Field \"${symbol.name}.${field.name}\"`;\n\t\tlet nativeType;\n\t\tlet rejected = false;\n\t\tfor (const attribute of field.attributes) if (attribute.name.startsWith(\"db.\")) nativeType = attribute;\n\t\telse if (attribute.name === \"map\") {\n\t\t\tctx.diagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_COMPOSITE_MAP_UNSUPPORTED\", `${label}: @map on a field of a composite type is not supported yet. The stored field keeps the name \"${stringArgument(attribute) ?? field.name}\", so removing @map renames it in storage; keep the schema as it is until Prisma 8 supports it.`, sourceId, attribute.span));\n\t\t\trejected = true;\n\t\t} else if (attribute.name === \"default\") {\n\t\t\tctx.diagnostics.push(defaultUnsupported(label, attribute, {\n\t\t\t\tkind: \"type\",\n\t\t\t\tname: symbol.name\n\t\t\t}, field, sourceId));\n\t\t\trejected = true;\n\t\t} else {\n\t\t\tctx.diagnostics.push(unknownAttribute(label, attribute, \"@\", sourceId));\n\t\t\trejected = true;\n\t\t}\n\t\tif (rejected) continue;\n\t\tconst resolved = resolveFieldType(field, {\n\t\t\tkind: \"type\",\n\t\t\tname: symbol.name\n\t\t}, nativeType, sourceId, ctx);\n\t\tif (resolved !== void 0) fields[field.name] = resolved;\n\t}\n\treturn fields;\n}\n/** What the Prisma 6 app loses when the Prisma 6 client stops filling a default. */\nfunction defaultRemovalConsequence(owner, field) {\n\tif (field.optional || field.list) return owner.kind === \"model\" ? `a Prisma 6 create call that leaves \"${field.name}\" out no longer gets the default value` : `a \"${owner.name}\" value written without \"${field.name}\" no longer gets the default value`;\n\treturn owner.kind === \"model\" ? `every Prisma 6 create call must then pass \"${field.name}\"` : `every \"${owner.name}\" value the Prisma 6 app writes must then include \"${field.name}\"`;\n}\nfunction defaultUnsupported(label, attribute, owner, field, sourceId) {\n\treturn prisma6Diagnostic(\"PSL.PRISMA6_MONGO_DEFAULT_UNSUPPORTED\", `${label}: ${attributeText(attribute)} is not supported. MongoDB has no stored defaults, and Prisma 8 fills only \\`now()\\` on DateTime fields. The Prisma 6 client fills this default today, so removing it also changes the Prisma 6 app: ${defaultRemovalConsequence(owner, field)}. Set the value in the application code that creates documents, then remove the default.`, sourceId, attribute.span);\n}\nfunction readModel(located, modelNames, ignoredModels, ctx) {\n\tconst { symbol, sourceId, sources } = located;\n\tconst { diagnostics } = ctx;\n\tconst modelLabel = `Model \"${symbol.name}\"`;\n\tlet collection = symbol.name;\n\tconst build = {\n\t\tlocated,\n\t\tcollection: symbol.name,\n\t\tstoredNames: /* @__PURE__ */ new Map(),\n\t\tignoredFields: /* @__PURE__ */ new Set(),\n\t\trejectedFields: /* @__PURE__ */ new Set(),\n\t\tfields: {},\n\t\trelations: {},\n\t\texecutionDefaults: [],\n\t\tuniqueFields: [],\n\t\tmodelIndexes: [],\n\t\trelationFields: [],\n\t\thasId: false\n\t};\n\tconst indexContext = {\n\t\towner: modelLabel,\n\t\tprefix: \"@@\",\n\t\tsourceId,\n\t\tsources,\n\t\tdiagnostics,\n\t\tcompositeFields: new Set(Object.values(symbol.fields).filter((field) => ctx.compositeTypeNames.has(field.typeName)).map((field) => field.name))\n\t};\n\tfor (const attribute of symbol.attributes) switch (attribute.name) {\n\t\tcase \"map\":\n\t\t\tcollection = requireString(attribute, modelLabel, sourceId, diagnostics) ?? collection;\n\t\t\tbreak;\n\t\tcase \"index\":\n\t\tcase \"unique\":\n\t\tcase \"fulltext\": {\n\t\t\tconst parsed = parseIndexAttribute({\n\t\t\t\t...attribute,\n\t\t\t\tname: attribute.name\n\t\t\t}, indexContext);\n\t\t\tif (parsed !== void 0) build.modelIndexes.push(parsed);\n\t\t\tbreak;\n\t\t}\n\t\tcase \"id\":\n\t\t\tbuild.hasId = true;\n\t\t\tdiagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_COMPOSITE_ID_UNSUPPORTED\", `${modelLabel}: @@id is not supported; a MongoDB document is identified by its \"_id\" field. Declare the id as \\`id String @id @default(auto()) @map(\"_id\") @db.ObjectId\\`.`, sourceId, attribute.span));\n\t\t\tbreak;\n\t\tcase \"schema\":\n\t\t\tdiagnostics.push(schemaUnsupported(modelLabel, attribute, sourceId));\n\t\t\tbreak;\n\t\tcase \"ignore\": break;\n\t\tdefault: diagnostics.push(unknownAttribute(modelLabel, attribute, \"@@\", sourceId));\n\t}\n\tfor (const field of Object.values(symbol.fields)) {\n\t\tconst reported = diagnostics.length;\n\t\treadModelField(field, build, modelNames, ignoredModels, ctx);\n\t\tif (diagnostics.length > reported) build.rejectedFields.add(field.name);\n\t}\n\treturn {\n\t\t...build,\n\t\tcollection\n\t};\n}\nfunction readModelField(field, build, modelNames, ignoredModels, ctx) {\n\tconst { symbol, sourceId, sources } = build.located;\n\tconst { diagnostics, binding } = ctx;\n\tconst label = `Field \"${symbol.name}.${field.name}\"`;\n\tconst isRelationField = modelNames.has(field.typeName) && field.typeConstructor === void 0;\n\tif (field.attributes.some((attribute) => attribute.name === \"ignore\")) {\n\t\tbuild.ignoredFields.add(field.name);\n\t\tconst unique = field.attributes.find((attribute) => attribute.name === \"unique\");\n\t\tif (unique !== void 0) diagnostics.push(ignoredFieldReferenced(symbol.name, [field.name], {\n\t\t\tkind: \"index\",\n\t\t\ttext: `@unique on field \"${symbol.name}.${field.name}\"`\n\t\t}, sourceId, unique.span));\n\t\treturn;\n\t}\n\tif (isRelationField) {\n\t\tif (ignoredModels.has(field.typeName)) return;\n\t\tlet relation;\n\t\tfor (const attribute of field.attributes) if (attribute.name === \"relation\") relation = attribute;\n\t\telse diagnostics.push(unknownAttribute(label, attribute, \"@\", sourceId));\n\t\tbuild.relationFields.push({\n\t\t\tfield,\n\t\t\trelation\n\t\t});\n\t\treturn;\n\t}\n\tlet storedName = field.name;\n\tlet nativeType;\n\tlet idAttribute;\n\tlet defaultAttribute;\n\tlet updatedAt;\n\tfor (const attribute of field.attributes) switch (attribute.name) {\n\t\tcase \"map\":\n\t\t\tstoredName = requireString(attribute, label, sourceId, diagnostics) ?? storedName;\n\t\t\tbreak;\n\t\tcase \"id\":\n\t\t\tidAttribute = attribute;\n\t\t\tbreak;\n\t\tcase \"default\":\n\t\t\tdefaultAttribute = attribute;\n\t\t\tbreak;\n\t\tcase \"updatedAt\":\n\t\t\tupdatedAt = attribute;\n\t\t\tbreak;\n\t\tcase \"unique\": {\n\t\t\tconst parsed = parseFieldUnique(attribute, field.name, {\n\t\t\t\towner: label,\n\t\t\t\tprefix: \"@\",\n\t\t\t\tsourceId,\n\t\t\t\tsources,\n\t\t\t\tdiagnostics,\n\t\t\t\tcompositeFields: /* @__PURE__ */ new Set()\n\t\t\t});\n\t\t\tif (parsed !== void 0) build.uniqueFields.push(parsed);\n\t\t\tbreak;\n\t\t}\n\t\tdefault: if (attribute.name.startsWith(\"db.\")) nativeType = attribute;\n\t\telse diagnostics.push(unknownAttribute(label, attribute, \"@\", sourceId));\n\t}\n\tbuild.storedNames.set(field.name, storedName);\n\tif (field.malformedType) return;\n\tconst owner = {\n\t\tkind: \"model\",\n\t\tname: symbol.name\n\t};\n\tconst resolved = resolveFieldType(field, owner, nativeType, sourceId, ctx);\n\tif (resolved === void 0) return;\n\tconst codecId = resolved.type.kind === \"scalar\" ? resolved.type.codecId : void 0;\n\tif (idAttribute !== void 0) {\n\t\tbuild.hasId = true;\n\t\tif (codecId !== binding.objectIdCodecId || storedName !== \"_id\" || field.optional || field.list) {\n\t\t\tdiagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_ID_NOT_OBJECTID\", `${label} is the model's @id, but it is not a required ObjectId stored as \"_id\". Prisma 8 identifies a MongoDB document by an ObjectId \"_id\"; declare the id as \\`${field.name} String @id @default(auto()) @map(\"_id\") @db.ObjectId\\`. If stored documents have \"_id\" values that are not ObjectIds, this model cannot use this contract source until they are rewritten with ObjectId \"_id\" values, along with every field that refers to them.`, sourceId, idAttribute.span));\n\t\t\treturn;\n\t\t}\n\t\tif (defaultAttribute !== void 0 && defaultKind(defaultAttribute) !== \"auto\") {\n\t\t\tdiagnostics.push(defaultUnsupported(label, defaultAttribute, owner, field, sourceId));\n\t\t\treturn;\n\t\t}\n\t\tbuild.fields[storedName] = resolved;\n\t\treturn;\n\t}\n\tconst isDateTime = codecId === binding.scalarCodecIds.DateTime && !field.list;\n\tif (updatedAt !== void 0 && !isDateTime) {\n\t\tdiagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_UPDATED_AT_TYPE_UNSUPPORTED\", `${label}: @updatedAt is only supported on a DateTime field. Removing it also stops the Prisma 6 client from setting the field on every update. Set the value in application code when you write documents, then remove @updatedAt.`, sourceId, updatedAt.span));\n\t\treturn;\n\t}\n\tconst defaultIsNow = defaultAttribute !== void 0 && defaultKind(defaultAttribute) === \"now\";\n\tif (defaultAttribute !== void 0 && (!defaultIsNow || !isDateTime)) {\n\t\tdiagnostics.push(defaultUnsupported(label, defaultAttribute, owner, field, sourceId));\n\t\treturn;\n\t}\n\tconst generator = {\n\t\tkind: \"generator\",\n\t\tid: binding.timestampGeneratorId\n\t};\n\tconst phases = updatedAt !== void 0 ? {\n\t\tonCreate: generator,\n\t\tonUpdate: generator\n\t} : defaultIsNow ? { onCreate: generator } : void 0;\n\tif (phases !== void 0 && field.optional) {\n\t\tconst written = updatedAt ?? defaultAttribute;\n\t\tconst generator = written === void 0 ? \"the generator\" : attributeText(written);\n\t\tdiagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_OPTIONAL_GENERATED_FIELD_UNSUPPORTED\", `${label} is optional and its value comes from ${generator}, which Prisma 8 cannot express on an optional field yet. Either fix also changes the Prisma 6 app: a required field makes the Prisma 6 client fail on a stored document that lacks it, and without ${generator} the Prisma 6 client no longer fills it. Make the field required once every stored document has a value, or set the value in application code and remove ${generator}.`, sourceId, written?.span ?? field.span));\n\t\treturn;\n\t}\n\tbuild.fields[storedName] = resolved;\n\tif (phases !== void 0) build.executionDefaults.push({\n\t\tfield: storedName,\n\t\tphases\n\t});\n}\nfunction identifierList(attributeArg) {\n\tconst expression = attributeArg.expression;\n\tconst array = expression === void 0 ? void 0 : ArrayLiteralAst.cast(expression.syntax);\n\tif (array === void 0) return void 0;\n\tconst names = [];\n\tfor (const element of array.elements()) {\n\t\tconst name = IdentifierAst.cast(element.syntax)?.name();\n\t\tif (name === void 0) return void 0;\n\t\tnames.push(name);\n\t}\n\treturn names;\n}\n/**\n* What removing `onDelete` or `onUpdate` does to the Prisma 6 app. The Prisma 6 client emulates referential actions on MongoDB with these defaults: `onDelete` is `Restrict` on a required relation (a delete fails with P2014) and `SetNull` on an optional one, and `onUpdate` is `Cascade`.\n*/\nfunction referentialActionRemoval(key, declared, sides) {\n\tconst fallback = key === \"onUpdate\" ? {\n\t\taction: \"Cascade\",\n\t\twhen: \"its default\",\n\t\teffect: `changing the field a ${sides.model} refers to in a ${sides.target} updates the key in its ${sides.model} documents`\n\t} : sides.optional ? {\n\t\taction: \"SetNull\",\n\t\twhen: \"its default for an optional relation\",\n\t\teffect: `deleting a ${sides.target} sets the key to null in its ${sides.model} documents`\n\t} : {\n\t\taction: \"Restrict\",\n\t\twhen: \"its default for a required relation\",\n\t\teffect: `deleting a ${sides.target} that still has ${sides.model} documents fails with P2014`\n\t};\n\tif (declared === fallback.action) return `Removing \"${key}: ${declared}\" leaves the Prisma 6 app as it is: ${declared} is already what the Prisma 6 client does for this relation.`;\n\treturn `The Prisma 6 client emulates referential actions, so removing \"${key}: ${declared}\" also changes the Prisma 6 app: its client then applies ${fallback.action}, ${fallback.when}, so ${fallback.effect}.`;\n}\nfunction readRelationArguments(attribute, label, sides, sourceId, diagnostics) {\n\tlet name;\n\tlet fields;\n\tlet references;\n\tlet rejected = false;\n\tconst invalid = (what, span) => {\n\t\trejected = true;\n\t\tdiagnostics.push({\n\t\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\t\tmessage: `${label}: @relation ${what}.`,\n\t\t\tsourceId,\n\t\t\tspan\n\t\t});\n\t};\n\tfor (const arg of attribute.args) {\n\t\tconst key = arg.kind === \"positional\" ? \"name\" : arg.name;\n\t\tswitch (key) {\n\t\t\tcase \"name\": {\n\t\t\t\tconst expression = arg.expression;\n\t\t\t\tname = expression === void 0 ? void 0 : StringLiteralExprAst.cast(expression.syntax)?.value();\n\t\t\t\tif (name === void 0) invalid(\"name must be a string\", arg.span);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"fields\":\n\t\t\t\tfields = identifierList(arg);\n\t\t\t\tif (fields === void 0) invalid(\"fields must be a list of field names\", arg.span);\n\t\t\t\tbreak;\n\t\t\tcase \"references\":\n\t\t\t\treferences = identifierList(arg);\n\t\t\t\tif (references === void 0) invalid(\"references must be a list of field names\", arg.span);\n\t\t\t\tbreak;\n\t\t\tcase \"onDelete\":\n\t\t\tcase \"onUpdate\":\n\t\t\tcase \"map\":\n\t\t\t\trejected = true;\n\t\t\t\tdiagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_REFERENTIAL_ACTION_UNSUPPORTED\", key === \"map\" ? `${label}: @relation argument \"map\" is not supported; it names a foreign key constraint, and MongoDB has none. Remove \"map\"; the Prisma 6 app has no foreign key on MongoDB either, so nothing changes there.` : `${label}: @relation argument \"${key}\" is not supported; Prisma 8 enforces no referential actions on MongoDB. ${referentialActionRemoval(key, arg.value, sides)} Handle related documents in application code, then remove \"${key}\".`, sourceId, arg.span));\n\t\t\t\tbreak;\n\t\t\tdefault: invalid(`argument \"${key ?? \"\"}\" is not supported`, arg.span);\n\t\t}\n\t}\n\treturn rejected ? void 0 : {\n\t\tname,\n\t\tfields,\n\t\treferences\n\t};\n}\nfunction ignoredFieldReferenced(modelName, fieldNames, usedBy, sourceId, span) {\n\tconst one = fieldNames.length === 1;\n\tconst fields = fieldNames.map((name) => `\"${modelName}.${name}\"`).join(\", \");\n\tconst removal = usedBy.kind === \"index\" ? \"which makes Prisma 6 `db push` drop the index\" : \"which removes that relation from the Prisma 6 client\";\n\treturn prisma6Diagnostic(\"PSL.PRISMA6_MONGO_IGNORED_FIELD_REFERENCED\", `${one ? \"Field\" : \"Fields\"} ${fields} ${one ? \"is\" : \"are\"} marked @ignore, but ${usedBy.text} uses ${one ? \"it\" : \"them\"}. Remove @ignore from ${fields}, which adds ${one ? \"it\" : \"them\"} to the Prisma 6 client, or remove ${usedBy.text}, ${removal}.`, sourceId, span);\n}\nfunction readRelationFields(build, builds, out, diagnostics) {\n\tconst { symbol, sourceId, sources } = build.located;\n\tfor (const { field, relation } of build.relationFields) {\n\t\tconst label = `Relation field \"${symbol.name}.${field.name}\"`;\n\t\tconst reject = () => {\n\t\t\tout.invalidFkPairings.push({\n\t\t\t\tpairKey: fkRelationPairKey(symbol.name, field.typeName),\n\t\t\t\t...ifDefined(\"relationName\", relation === void 0 ? void 0 : stringArgument(relation))\n\t\t\t});\n\t\t};\n\t\tconst args = relation === void 0 ? void 0 : readRelationArguments(relation, label, {\n\t\t\tmodel: symbol.name,\n\t\t\ttarget: field.typeName,\n\t\t\toptional: field.optional\n\t\t}, sourceId, diagnostics);\n\t\tif (relation !== void 0 && args === void 0) {\n\t\t\treject();\n\t\t\tcontinue;\n\t\t}\n\t\tconst target = builds.get(field.typeName);\n\t\tif (target === void 0) continue;\n\t\tif (!(args?.fields !== void 0 || args?.references !== void 0)) {\n\t\t\tout.backRelations.push({\n\t\t\t\tmodelName: symbol.name,\n\t\t\t\tfield,\n\t\t\t\ttargetModelName: field.typeName,\n\t\t\t\t...ifDefined(\"relationName\", args?.name),\n\t\t\t\tcardinality: field.list ? \"1:N\" : \"1:1\",\n\t\t\t\tsources\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (field.list) {\n\t\t\tdiagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_LIST_RELATION_UNSUPPORTED\", `${label} is a list relation that stores its keys in a list field (a many-to-many relation on MongoDB), which Prisma 8 does not support yet. Remove the relation fields from the schema this contract source reads and keep the key list as a plain field. The Prisma 6 client then loses the relation fields too, so Prisma 6 code that reads or writes the relation through them (\\`include\\`, \\`connect\\`) has to use the key list instead.`, sourceId, relation?.span ?? field.span));\n\t\t\treject();\n\t\t\tcontinue;\n\t\t}\n\t\tconst localNames = args?.fields ?? [];\n\t\tconst targetNames = args?.references ?? [];\n\t\tconst ignoredLocal = localNames.filter((name) => build.ignoredFields.has(name));\n\t\tif (ignoredLocal.length > 0) {\n\t\t\tdiagnostics.push(ignoredFieldReferenced(symbol.name, ignoredLocal, {\n\t\t\t\tkind: \"relation\",\n\t\t\t\ttext: `relation field \"${symbol.name}.${field.name}\"`\n\t\t\t}, sourceId, relation?.span ?? field.span));\n\t\t\treject();\n\t\t\tcontinue;\n\t\t}\n\t\tconst ignoredTarget = targetNames.filter((name) => target.ignoredFields.has(name));\n\t\tif (ignoredTarget.length > 0) {\n\t\t\tdiagnostics.push(ignoredFieldReferenced(target.located.symbol.name, ignoredTarget, {\n\t\t\t\tkind: \"relation\",\n\t\t\t\ttext: `relation field \"${symbol.name}.${field.name}\"`\n\t\t\t}, sourceId, relation?.span ?? field.span));\n\t\t\treject();\n\t\t\tcontinue;\n\t\t}\n\t\tconst localFields = localNames.map((name) => build.storedNames.get(name));\n\t\tconst targetFields = targetNames.map((name) => target.storedNames.get(name));\n\t\tif (localFields.some((name) => name === void 0) || targetFields.some((name) => name === void 0) || localNames.length !== targetNames.length || localNames.length === 0) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\t\t\tmessage: `${label}: @relation fields and references must name the same number of scalar fields of \"${symbol.name}\" and \"${field.typeName}\".`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: relation?.span ?? field.span\n\t\t\t});\n\t\t\treject();\n\t\t\tcontinue;\n\t\t}\n\t\tif (resolveToOneRelationNullable({\n\t\t\tdeclaredNullable: field.optional,\n\t\t\tlocalFieldNullability: localNames.map((name) => symbol.fields[name]?.optional === true),\n\t\t\townsReference: true\n\t\t}).contradiction !== void 0) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_RELATION_NULLABILITY_MISMATCH\",\n\t\t\t\tmessage: field.optional ? `${label} is optional but every field in @relation(fields: [...]) is required. Make one of those fields optional with \"?\" or remove \"?\" from \"${field.name}\".` : `${label} is required but a field in @relation(fields: [...]) is optional. Add \"?\" to \"${field.name}\" or make those fields required.`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: field.span\n\t\t\t});\n\t\t\treject();\n\t\t\tcontinue;\n\t\t}\n\t\tconst local = localFields.filter((name) => name !== void 0);\n\t\tconst referenced = targetFields.filter((name) => name !== void 0);\n\t\tbuild.relations[field.name] = {\n\t\t\tto: crossRef(field.typeName, UNBOUND_NAMESPACE_ID),\n\t\t\tcardinality: \"N:1\",\n\t\t\tnullable: field.optional,\n\t\t\ton: {\n\t\t\t\tlocalFields: local,\n\t\t\t\ttargetFields: referenced\n\t\t\t}\n\t\t};\n\t\tout.foreignKeys.push({\n\t\t\tdeclaringModel: symbol.name,\n\t\t\ttargetModel: field.typeName,\n\t\t\t...ifDefined(\"relationName\", args?.name),\n\t\t\tlocalFields: local,\n\t\t\ttargetFields: referenced\n\t\t});\n\t}\n}\nfunction buildIndexes(build, diagnostics) {\n\tconst { symbol, sourceId } = build.located;\n\tconst indexes = [];\n\tlet textIndexes = 0;\n\tconst keyFor = (field, text) => ({\n\t\tfield: build.storedNames.get(field.name) ?? field.name,\n\t\tdirection: field.direction ?? (text ? \"text\" : 1)\n\t});\n\tfor (const attribute of [...build.uniqueFields, ...build.modelIndexes]) {\n\t\tconst names = attribute.fields.map((field) => field.name);\n\t\tconst usedBy = {\n\t\t\tkind: \"index\",\n\t\t\ttext: build.uniqueFields.includes(attribute) ? `@unique on field \"${symbol.name}.${attribute.fields[0]?.name ?? \"\"}\"` : `@@${attribute.kind} on model \"${symbol.name}\"`\n\t\t};\n\t\tconst ignored = names.filter((name) => build.ignoredFields.has(name));\n\t\tif (ignored.length > 0) {\n\t\t\tdiagnostics.push(ignoredFieldReferenced(symbol.name, ignored, usedBy, sourceId, attribute.span));\n\t\t\tcontinue;\n\t\t}\n\t\tif (names.some((name) => build.rejectedFields.has(name))) continue;\n\t\tconst unknown = names.find((name) => !build.storedNames.has(name));\n\t\tif (unknown !== void 0) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_INDEX_FIELD_NOT_FOUND\",\n\t\t\t\tmessage: `Index on model \"${symbol.name}\" references unknown field \"${unknown}\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: attribute.span\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (attribute.kind === \"fulltext\") {\n\t\t\ttextIndexes++;\n\t\t\tif (textIndexes > 1) {\n\t\t\t\tdiagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_TEXT_INDEX_LIMIT\", `Model \"${symbol.name}\" has more than one @@fulltext; MongoDB allows one text index per collection. Merge the fields into one @@fulltext.`, sourceId, attribute.span));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tindexes.push(new MongoIndex({\n\t\t\tkeys: attribute.fields.map((field) => keyFor(field, attribute.kind === \"fulltext\")),\n\t\t\t...attribute.kind === \"unique\" ? { unique: true } : {}\n\t\t}));\n\t}\n\treturn indexes;\n}\nfunction assembleContract(input) {\n\tconst target = input.binding.target.targetId;\n\tconst targetFamily = input.binding.target.familyId;\n\tconst builtEnums = {};\n\tfor (const [enumName, built] of input.enums) builtEnums[enumName] = {\n\t\tcodecId: built.codecId,\n\t\tmembers: built.members.map((member) => ({\n\t\t\tname: member.name,\n\t\t\tvalue: blindCast(member.value)\n\t\t}))\n\t};\n\tconst collections = {};\n\tfor (const [name, collection] of Object.entries(input.collections)) collections[name] = collection.indexes.length > 0 ? { indexes: collection.indexes } : {};\n\tconst storage = buildMongoStorage({\n\t\tcollections,\n\t\tvalueSets: encodeMongoValueSets(Object.fromEntries(input.enums), input.codecLookup)\n\t});\n\tconst models = {};\n\tfor (const [modelName, build] of input.builds) models[modelName] = {\n\t\tfields: build.fields,\n\t\trelations: build.relations,\n\t\tstorage: { collection: build.collection }\n\t};\n\tconst capabilities = {};\n\tconst execution = buildExecutionSection({\n\t\ttarget,\n\t\ttargetFamily,\n\t\tdefaults: input.executionDefaults\n\t});\n\treturn {\n\t\ttargetFamily,\n\t\ttarget,\n\t\troots: input.roots,\n\t\tdomain: { namespaces: { [UNBOUND_NAMESPACE_ID]: {\n\t\t\tmodels: blindCast(models),\n\t\t\t...Object.keys(input.valueObjects).length > 0 ? { valueObjects: input.valueObjects } : {},\n\t\t\t...Object.keys(builtEnums).length > 0 ? { enum: builtEnums } : {}\n\t\t} } },\n\t\tstorage,\n\t\textensions: {},\n\t\tcapabilities,\n\t\tprofileHash: computeProfileHash({\n\t\t\ttarget,\n\t\t\ttargetFamily,\n\t\t\tcapabilities\n\t\t}),\n\t\tmeta: {},\n\t\t...execution !== void 0 ? { execution } : {}\n\t};\n}\nfunction mergedSources(documents) {\n\tconst [first, ...rest] = documents.map((document) => document.sources);\n\tif (first === void 0) throw new InternalError(\"A Prisma 6 schema has at least one document\");\n\treturn first.merge(...rest);\n}\n//#endregion\n//#region src/provider.ts\nfunction defaultOutputFromSchemaPath(schemaPath) {\n\treturn join(dirname(schemaPath), \"contract.json\");\n}\nfunction mapParseDiagnostics(diagnostics, sourceFile, sourceId) {\n\treturn diagnostics.map((diagnostic) => ({\n\t\tcode: diagnostic.code,\n\t\tmessage: diagnostic.message,\n\t\tsourceId,\n\t\tspan: sourceFile.rangeToPslSpan(diagnostic.range)\n\t}));\n}\n/**\n* The files a Prisma 6 schema input names: the file itself, or every regular `.prisma` file under the directory, nested directories and symbolic links included, as Prisma 6 reads a schema directory. Sorted by path so duplicate detection blames the later file deterministically.\n*/\nasync function listSchemaFiles(absolutePath, displayPath) {\n\tif (!(await stat(absolutePath)).isDirectory()) return [{\n\t\tsourceId: displayPath,\n\t\tabsolutePath\n\t}];\n\tconst entries = await readdir(absolutePath, { recursive: true });\n\tconst files = [];\n\tfor (const entry of entries.filter((name) => extname(name) === \".prisma\").map((name) => normalize(name)).sort()) {\n\t\tconst entryPath = join(absolutePath, entry);\n\t\tif ((await stat(entryPath)).isFile()) files.push({\n\t\t\tsourceId: join(displayPath, entry),\n\t\t\tabsolutePath: entryPath\n\t\t});\n\t}\n\treturn files;\n}\nfunction isMissingPath(error) {\n\treturn error instanceof Error && Reflect.get(error, \"code\") === \"ENOENT\";\n}\nfunction readFailure(schemaPath, message, meta) {\n\treturn notOk({\n\t\tsummary: `Failed to read Prisma 6 schema at \"${schemaPath}\"`,\n\t\tdiagnostics: [prisma6Diagnostic(\"PSL.PRISMA6_MONGO_SCHEMA_READ_FAILED\", message, schemaPath, void 0)],\n\t\tmeta\n\t});\n}\n/**\n* A `ContractConfig` that reads a Prisma 6 MongoDB `schema.prisma` (a file, or a directory of `.prisma` files) as the contract source.\n*/\nfunction prisma6Contract(schemaPath, options) {\n\tconst parserOptions = { grammar: \"prisma-7\" };\n\treturn {\n\t\tsource: {\n\t\t\tformat: \"psl\",\n\t\t\tinputs: [schemaPath],\n\t\t\tparserOptions,\n\t\t\tasync load(context) {\n\t\t\t\tconst [absolutePath] = context.resolvedInputs;\n\t\t\t\tif (absolutePath === void 0) throw new InternalError(\"prisma6Contract: context.resolvedInputs is empty. The CLI config loader should populate it from source.inputs.\");\n\t\t\t\tlet files;\n\t\t\t\ttry {\n\t\t\t\t\tfiles = await listSchemaFiles(absolutePath, schemaPath);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconst cause = String(error);\n\t\t\t\t\treturn readFailure(schemaPath, isMissingPath(error) ? `There is no file or directory at \"${schemaPath}\". Fix the path passed to prisma6Schema() in prisma.config.ts.` : cause, {\n\t\t\t\t\t\tschemaPath,\n\t\t\t\t\t\tabsolutePath,\n\t\t\t\t\t\tcause\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (files.length === 0) return readFailure(schemaPath, `The schema directory \"${schemaPath}\" contains no .prisma file.`, {\n\t\t\t\t\tschemaPath,\n\t\t\t\t\tabsolutePath\n\t\t\t\t});\n\t\t\t\tconst documents = [];\n\t\t\t\tconst seedDiagnostics = [];\n\t\t\t\tfor (const file of files) {\n\t\t\t\t\tlet schema;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tschema = await readFile(file.absolutePath, \"utf-8\");\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconst message = String(error);\n\t\t\t\t\t\treturn readFailure(file.sourceId, message, {\n\t\t\t\t\t\t\tschemaPath: file.sourceId,\n\t\t\t\t\t\t\tabsoluteSchemaPath: file.absolutePath,\n\t\t\t\t\t\t\tcause: message\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tconst { document, sources, diagnostics } = parse(schema, file.sourceId, parserOptions);\n\t\t\t\t\tconst sourceFile = sources.sourceFileFor(document.syntax);\n\t\t\t\t\tseedDiagnostics.push(...mapParseDiagnostics(diagnostics, sourceFile, file.sourceId));\n\t\t\t\t\tdocuments.push({\n\t\t\t\t\t\tdocument,\n\t\t\t\t\t\tsources,\n\t\t\t\t\t\tsourceFile,\n\t\t\t\t\t\tsourceId: file.sourceId\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tlet contract;\n\t\t\t\ttry {\n\t\t\t\t\tconst interpreted = interpretPrisma6Documents({\n\t\t\t\t\t\tdocuments,\n\t\t\t\t\t\tseedDiagnostics,\n\t\t\t\t\t\tbinding: options.binding,\n\t\t\t\t\t\tauthoringContributions: context.authoringContributions,\n\t\t\t\t\t\tcodecLookup: context.codecLookup,\n\t\t\t\t\t\tdataTypes: context.dataTypes\n\t\t\t\t\t});\n\t\t\t\t\tif (!interpreted.ok) return interpreted;\n\t\t\t\t\tcontract = applySpecifierDefaultControlPolicy(interpreted.value, options.defaultControlPolicy);\n\t\t\t\t\tvalidateContractDomain(contract);\n\t\t\t\t\tvalidateMongoStorage(blindCast(contract));\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (!isStructuredError(error)) throw error;\n\t\t\t\t\treturn notOk({\n\t\t\t\t\t\tsummary: \"Prisma 6 MongoDB schema interpretation failed\",\n\t\t\t\t\t\tdiagnostics: [prisma6Diagnostic(\"PSL.PRISMA6_MONGO_CONTRACT_INVALID\", `This schema gives a contract that Prisma 8 rejects, and the Prisma 6 MongoDB contract source has no specific diagnostic for the cause: ${error.message.replace(/\\.$/, \"\")}. This is a bug in Prisma ORM; please report it with this schema.`, schemaPath, void 0)],\n\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\tschemaPath,\n\t\t\t\t\t\t\tcode: error.code\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn ok(contract);\n\t\t\t}\n\t\t},\n\t\toutput: options.output ?? defaultOutputFromSchemaPath(schemaPath)\n\t};\n}\n//#endregion\nexport { prisma6Contract };\n\n//# sourceMappingURL=provider.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAo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,QAAQ;GACnB;EACD;EACA,QAAQ,QAAQ,UAAU,4BAA4B,UAAU;CACjE;AACD"}
1
+ {"version":3,"file":"contract-prisma6__provider.mjs","names":[],"sources":["../../../../2-mongo-family/2-authoring/contract-prisma6/dist/provider.mjs"],"sourcesContent":["import { readFile, readdir, stat } from \"node:fs/promises\";\nimport { applySpecifierDefaultControlPolicy } from \"@internal/contract/apply-specifier-default-control-policy\";\nimport { validateContractDomain } from \"@internal/contract/validate-domain\";\nimport { MongoIndex, buildMongoStorage, encodeMongoValueSets, validateMongoStorage } from \"@internal/mongo-contract\";\nimport { ArrayLiteralAst, FunctionCallAst, IdentifierAst, PathExprAst, StringLiteralExprAst, dottedPathsIn, parse } from \"@internal/psl-parser/syntax\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { isStructuredError } from \"@internal/utils/structured-error\";\nimport { basename, dirname, extname, join, normalize } from \"pathe\";\nimport { buildExecutionSection, computeProfileHash } from \"@internal/contract/hashing\";\nimport { crossRef } from \"@internal/contract/types\";\nimport { resolveToOneRelationNullable } from \"@internal/contract-authoring\";\nimport { instantiateAuthoringEntityType, isAuthoringEntityTypeDescriptor } from \"@internal/framework-components/authoring\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { pairMongoBackRelations } from \"@internal/mongo-contract-psl\";\nimport { buildSymbolTable, keywordPslSpan, mapPslDiagnostics, nodePslSpan, readResolvedAttribute } from \"@internal/psl-parser\";\nimport { fkRelationPairKey } from \"@internal/psl-parser/interpret\";\nimport { ifDefined } from \"@internal/utils/defined\";\n//#region src/diagnostics.ts\nfunction prisma6Diagnostic(code, message, sourceId, span) {\n\treturn {\n\t\tcode,\n\t\tmessage,\n\t\tsourceId,\n\t\t...span !== void 0 ? { span } : {}\n\t};\n}\n//#endregion\n//#region src/indexes.ts\nfunction unsupported(attribute, what, span, ctx) {\n\tctx.diagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_INDEX_ARGUMENT_UNSUPPORTED\", `${ctx.owner}: ${ctx.prefix}${attribute.name} ${what}`, ctx.sourceId, span));\n}\nfunction sortDirection(expression) {\n\tif (expression === void 0) return void 0;\n\tconst token = IdentifierAst.cast(expression.syntax)?.name();\n\treturn token === \"Asc\" ? 1 : token === \"Desc\" ? -1 : void 0;\n}\n/**\n* Reads `sort:` from one index element's or `@unique`'s arguments. `length:` and every other argument are refused: a MongoDB index has no prefix length, and Prisma 6 accepts no other argument there on MongoDB.\n*/\nfunction readSort(attribute, args, ctx) {\n\tlet direction;\n\tfor (const arg of args) {\n\t\tconst key = arg.name()?.name();\n\t\tconst span = nodePslSpan(arg.syntax, ctx.sources);\n\t\tif (key !== \"sort\") return unsupported(attribute, key === \"length\" ? \"argument \\\"length\\\" is not supported: a MongoDB index has no prefix length. Remove it; Prisma 6 ignores it on MongoDB.\" : `argument \"${key ?? \"\"}\" is not supported.`, span, ctx);\n\t\tdirection = sortDirection(arg.value());\n\t\tif (direction === void 0) return unsupported(attribute, \"sort must be Asc or Desc.\", span, ctx);\n\t}\n\treturn { direction };\n}\nfunction readFields(attribute, expression, span, ctx) {\n\tconst array = expression === void 0 ? void 0 : ArrayLiteralAst.cast(expression.syntax);\n\tif (array === void 0) return unsupported(attribute, \"expects a list of field names.\", span, ctx);\n\tconst fields = [];\n\tfor (const element of array.elements()) {\n\t\tconst name = IdentifierAst.cast(element.syntax)?.name();\n\t\tif (name !== void 0) {\n\t\t\tfields.push({\n\t\t\t\tname,\n\t\t\t\tdirection: void 0\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst call = FunctionCallAst.cast(element.syntax);\n\t\tconst path = PathExprAst.cast(element.syntax)?.path() ?? call?.path() ?? [];\n\t\tconst [callee] = path;\n\t\tif (path.length > 1 && (callee === void 0 || !ctx.compositeFields.has(callee))) return unsupported(attribute, `lists the dotted path \"${path.join(\".\")}\", but \"${callee ?? \"\"}\" is not a composite-type field of the model, and Prisma 6 refuses the path as an unknown field. List fields of the model by name.`, nodePslSpan(element.syntax, ctx.sources), ctx);\n\t\tif (path.length > 1) {\n\t\t\tctx.diagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_COMPOSITE_INDEX_PATH_UNSUPPORTED\", `Index path \"${path.join(\".\")}\" reaches into a composite type; indexes on composite-type fields are not supported yet. Index a top-level field or remove the index. Either change also reaches the Prisma 6 app, whose \\`db push\\` builds its indexes from this schema.`, ctx.sourceId, nodePslSpan(element.syntax, ctx.sources)));\n\t\t\treturn;\n\t\t}\n\t\tif (call === void 0 || callee === void 0) return unsupported(attribute, \"expects a list of field names.\", nodePslSpan(element.syntax, ctx.sources), ctx);\n\t\tconst sort = readSort(attribute, call.args(), ctx);\n\t\tif (sort === void 0) return void 0;\n\t\tfields.push({\n\t\t\tname: callee,\n\t\t\tdirection: sort.direction\n\t\t});\n\t}\n\treturn fields;\n}\n/** Reads `@@index`, `@@unique` or `@@fulltext`. `map:` and `name:` are dropped: MongoDB verify never compares index names. */\nfunction parseIndexAttribute(attribute, ctx) {\n\tlet fields;\n\tfor (const arg of attribute.args) {\n\t\tconst key = arg.kind === \"positional\" ? \"fields\" : arg.name;\n\t\tif (key === \"map\" || key === \"name\") continue;\n\t\tif (key !== \"fields\") return unsupported(attribute, `argument \"${key ?? \"\"}\" is not supported.`, arg.span, ctx);\n\t\tfields = readFields(attribute, arg.expression, arg.span, ctx);\n\t\tif (fields === void 0) return void 0;\n\t}\n\tif (fields === void 0 || fields.length === 0) return unsupported(attribute, \"expects a list of field names.\", attribute.span, ctx);\n\treturn {\n\t\tkind: attribute.name,\n\t\tfields,\n\t\tspan: attribute.span\n\t};\n}\n/** Reads a field's `@unique`: `sort:` sets the key direction; `map:` and `name:` are dropped. */\nfunction parseFieldUnique(attribute, fieldName, ctx) {\n\tlet direction;\n\tfor (const arg of attribute.args) {\n\t\tconst key = arg.kind === \"positional\" ? void 0 : arg.name;\n\t\tif (key === \"map\" || key === \"name\") continue;\n\t\tif (key === \"sort\") {\n\t\t\tdirection = sortDirection(arg.expression);\n\t\t\tif (direction === void 0) return unsupported(attribute, \"sort must be Asc or Desc.\", arg.span, ctx);\n\t\t\tcontinue;\n\t\t}\n\t\treturn unsupported(attribute, key === \"length\" ? \"argument \\\"length\\\" is not supported: a MongoDB index has no prefix length. Remove it; Prisma 6 ignores it on MongoDB.\" : `argument \"${key ?? \"\"}\" is not supported.`, arg.span, ctx);\n\t}\n\treturn {\n\t\tkind: \"unique\",\n\t\tfields: [{\n\t\t\tname: fieldName,\n\t\t\tdirection\n\t\t}],\n\t\tspan: attribute.span\n\t};\n}\n//#endregion\n//#region src/interpreter.ts\nconst SUMMARY = \"Prisma 6 MongoDB schema interpretation failed\";\nfunction stringArgument(attribute) {\n\tconst expression = (attribute.args.find((arg) => arg.kind === \"positional\") ?? attribute.args.find((arg) => arg.name === \"name\"))?.expression;\n\treturn expression === void 0 ? void 0 : StringLiteralExprAst.cast(expression.syntax)?.value();\n}\nfunction requireString(attribute, owner, sourceId, diagnostics) {\n\tconst value = stringArgument(attribute);\n\tif (value === void 0) diagnostics.push({\n\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\tmessage: `${owner}: attribute \"@${attribute.name}\" expects one string argument.`,\n\t\tsourceId,\n\t\tspan: attribute.span\n\t});\n\treturn value;\n}\nfunction attributeText(attribute) {\n\tconst args = attribute.args.map((arg) => arg.kind === \"named\" ? `${arg.name}: ${arg.value}` : arg.value);\n\treturn args.length === 0 ? `@${attribute.name}` : `@${attribute.name}(${args.join(\", \")})`;\n}\n/** `auto()` and `now()` with no arguments; any other `@default` value is `other`. */\nfunction defaultKind(attribute) {\n\tconst expression = attribute.args.find((arg) => arg.kind === \"positional\")?.expression;\n\tconst call = expression === void 0 ? void 0 : FunctionCallAst.cast(expression.syntax);\n\tif (call === void 0 || [...call.args()].length > 0) return \"other\";\n\tconst path = call.path().join(\".\");\n\treturn path === \"auto\" ? \"auto\" : path === \"now\" ? \"now\" : \"other\";\n}\nfunction unknownAttribute(owner, attribute, prefix, sourceId) {\n\treturn prisma6Diagnostic(\"PSL.PRISMA6_MONGO_UNKNOWN_ATTRIBUTE\", `${owner}: attribute \"${prefix}${attribute.name}\" is not supported by the Prisma 6 MongoDB contract source.`, sourceId, attribute.span);\n}\nfunction interpretPrisma6Documents(input) {\n\tconst { binding } = input;\n\tconst diagnostics = [...input.seedDiagnostics];\n\tconst datasources = [];\n\tconst enumBlocks = [];\n\tconst compositeTypes = [];\n\tconst models = [];\n\tconst ignoredModels = /* @__PURE__ */ new Set();\n\tconst declaredNames = /* @__PURE__ */ new Map();\n\tconst claimName = (kind, name, sourceId, span) => {\n\t\tconst previous = declaredNames.get(name);\n\t\tif (previous === void 0) {\n\t\t\tdeclaredNames.set(name, sourceId);\n\t\t\treturn true;\n\t\t}\n\t\tdiagnostics.push({\n\t\t\tcode: \"PSL_DUPLICATE_DECLARATION\",\n\t\t\tmessage: `Duplicate declaration of ${kind} \"${name}\"; first declared in ${basename(previous)}.`,\n\t\t\tsourceId,\n\t\t\tspan\n\t\t});\n\t\treturn false;\n\t};\n\tfor (const { document, sources, sourceFile, sourceId } of input.documents) {\n\t\tconst { symbolTable, diagnostics: tableDiagnostics } = buildSymbolTable({\n\t\t\tdocuments: [document],\n\t\t\tsources\n\t\t});\n\t\tfor (const diagnostic of tableDiagnostics) diagnostics.push({\n\t\t\tcode: diagnostic.code,\n\t\t\tmessage: diagnostic.message,\n\t\t\tsourceId,\n\t\t\tspan: sourceFile.rangeToPslSpan(diagnostic.range)\n\t\t});\n\t\tconst unsupported = (keyword, span) => {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_UNSUPPORTED_TOP_LEVEL_BLOCK\",\n\t\t\t\tmessage: `Unsupported top-level block \"${keyword}\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan\n\t\t\t});\n\t\t};\n\t\tfor (const block of Object.values(symbolTable.topLevel.blocks)) switch (block.keyword) {\n\t\t\tcase \"datasource\":\n\t\t\t\tdatasources.push({\n\t\t\t\t\tsymbol: block,\n\t\t\t\t\tsourceId,\n\t\t\t\t\tsources\n\t\t\t\t});\n\t\t\t\treportDottedBlockValues(block, sourceId, sources, diagnostics);\n\t\t\t\tbreak;\n\t\t\tcase \"generator\":\n\t\t\t\treportDottedBlockValues(block, sourceId, sources, diagnostics);\n\t\t\t\tbreak;\n\t\t\tcase \"enum\":\n\t\t\t\tif (claimName(\"enum\", block.name, sourceId, block.span)) enumBlocks.push({\n\t\t\t\t\tsymbol: block,\n\t\t\t\t\tsourceId,\n\t\t\t\t\tsources\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase \"view\":\n\t\t\t\tdiagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_VIEW_UNSUPPORTED\", `View \"${block.name}\" is not supported; Prisma 8 has no views on MongoDB. Remove the view from the schema this contract source reads. The Prisma 6 client then loses the view's model too.`, sourceId, keywordPslSpan(block.node.syntax, block.keyword, sources)));\n\t\t\t\tbreak;\n\t\t\tdefault: unsupported(block.keyword, keywordPslSpan(block.node.syntax, block.keyword, sources));\n\t\t}\n\t\tfor (const namespace of Object.values(symbolTable.topLevel.namespaces)) for (const { span } of namespace.declarations) unsupported(\"namespace\", span);\n\t\tfor (const namedType of Object.values(symbolTable.topLevel.namedTypes)) unsupported(\"types\", namedType.span);\n\t\tfor (const symbol of Object.values(symbolTable.topLevel.compositeTypes)) if (claimName(\"type\", symbol.name, sourceId, symbol.span)) compositeTypes.push({\n\t\t\tsymbol,\n\t\t\tsourceId,\n\t\t\tsources\n\t\t});\n\t\tfor (const symbol of Object.values(symbolTable.topLevel.models)) {\n\t\t\tif (!claimName(\"model\", symbol.name, sourceId, symbol.span)) continue;\n\t\t\tif (symbol.attributes.some((attribute) => attribute.name === \"ignore\")) ignoredModels.add(symbol.name);\n\t\t\telse models.push({\n\t\t\t\tsymbol,\n\t\t\t\tsourceId,\n\t\t\t\tsources\n\t\t\t});\n\t\t}\n\t}\n\tconst providerMismatch = checkDatasource(datasources, input.documents[0]?.sourceId ?? \"schema.prisma\", binding);\n\tif (providerMismatch !== void 0) return notOk({\n\t\tsummary: SUMMARY,\n\t\tdiagnostics: inSourceOrder([...input.seedDiagnostics, providerMismatch], input.documents)\n\t});\n\tconst enums = /* @__PURE__ */ new Map();\n\tfor (const located of enumBlocks) {\n\t\tconst built = buildEnum(located, input, diagnostics);\n\t\tif (built !== void 0) enums.set(located.symbol.name, built);\n\t}\n\tconst modelNames = /* @__PURE__ */ new Set([...models.map((m) => m.symbol.name), ...ignoredModels]);\n\tconst typeContext = {\n\t\tbinding,\n\t\tenums,\n\t\tcompositeTypeNames: new Set(compositeTypes.map((c) => c.symbol.name)),\n\t\tdiagnostics\n\t};\n\tconst valueObjects = {};\n\tfor (const located of compositeTypes) valueObjects[located.symbol.name] = { fields: readCompositeFields(located, typeContext) };\n\tconst builds = /* @__PURE__ */ new Map();\n\tfor (const located of models) builds.set(located.symbol.name, readModel(located, modelNames, ignoredModels, typeContext));\n\tconst foreignKeys = [];\n\tconst invalidFkPairings = [];\n\tconst backRelations = [];\n\tfor (const build of builds.values()) readRelationFields(build, builds, {\n\t\tforeignKeys,\n\t\tinvalidFkPairings,\n\t\tbackRelations\n\t}, diagnostics);\n\tconst paired = pairMongoBackRelations({\n\t\tforeignKeys,\n\t\tcandidates: backRelations,\n\t\tinvalidFkPairings\n\t});\n\tdiagnostics.push(...mapPslDiagnostics(paired.diagnostics, mergedSources(input.documents)));\n\tfor (const { modelName, fieldName, relation } of paired.relations) {\n\t\tconst build = builds.get(modelName);\n\t\tif (build !== void 0) build.relations[fieldName] = relation;\n\t}\n\tconst collections = {};\n\tconst roots = {};\n\tconst executionDefaults = [];\n\tfor (const [modelName, build] of builds) {\n\t\tconst indexes = buildIndexes(build, diagnostics);\n\t\tconst existing = collections[build.collection];\n\t\tcollections[build.collection] = { indexes: [...existing?.indexes ?? [], ...indexes] };\n\t\troots[build.collection] = crossRef(modelName, UNBOUND_NAMESPACE_ID);\n\t\tfor (const { field, phases } of build.executionDefaults) executionDefaults.push({\n\t\t\tref: {\n\t\t\t\tnamespace: UNBOUND_NAMESPACE_ID,\n\t\t\t\tentry: build.collection,\n\t\t\t\tfield\n\t\t\t},\n\t\t\t...phases\n\t\t});\n\t\tif (!build.hasId) diagnostics.push({\n\t\t\tcode: \"PSL_MISSING_ID_FIELD\",\n\t\t\tmessage: `Model \"${modelName}\" has no field with @id attribute. Every model must have exactly one @id field.`,\n\t\t\tsourceId: build.located.sourceId,\n\t\t\tspan: build.located.symbol.span\n\t\t});\n\t}\n\tif (diagnostics.length > 0) return notOk({\n\t\tsummary: SUMMARY,\n\t\tdiagnostics: inSourceOrder(diagnostics, input.documents)\n\t});\n\treturn ok(assembleContract({\n\t\tbinding,\n\t\tbuilds,\n\t\tcollections,\n\t\troots,\n\t\tvalueObjects,\n\t\tenums,\n\t\texecutionDefaults,\n\t\tcodecLookup: input.codecLookup\n\t}));\n}\n/**\n* Diagnostics by file, in the order the schema files were read, then by position; one with no position comes first in its file.\n*/\nfunction inSourceOrder(diagnostics, documents) {\n\tconst fileOrder = new Map(documents.map((document, index) => [document.sourceId, index]));\n\tconst fileRank = (diagnostic) => fileOrder.get(diagnostic.sourceId) ?? documents.length;\n\tconst offset = (diagnostic) => diagnostic.span?.start.offset ?? -1;\n\treturn [...diagnostics].sort((a, b) => fileRank(a) - fileRank(b) || offset(a) - offset(b));\n}\n/** Prisma 6 accepts no dotted path in a datasource or generator block, though the parser reads one as a value. */\nfunction reportDottedBlockValues(block, sourceId, sources, diagnostics) {\n\tfor (const entry of block.entries) {\n\t\tconst value = entry.value();\n\t\tif (value === void 0) continue;\n\t\tfor (const path of dottedPathsIn(value)) diagnostics.push({\n\t\t\tcode: \"PSL_INVALID_EXTENSION_BLOCK_MEMBER\",\n\t\t\tmessage: `${block.keyword} \"${block.name}\": the value of \"${entry.key()?.name() ?? \"\"}\" holds the dotted path ${path.path().join(\".\")}, which Prisma 6 does not accept in a ${block.keyword} block.`,\n\t\t\tsourceId,\n\t\t\tspan: nodePslSpan(path.syntax, sources)\n\t\t});\n\t}\n}\n/** The provider-mismatch diagnostic, or `undefined` when the schema names a provider the target reads. */\nfunction checkDatasource(datasources, fallbackSourceId, binding) {\n\tconst [datasource] = datasources;\n\tconst [namedProvider] = binding.providers;\n\tif (datasource === void 0) return prisma6Diagnostic(\"PSL.PRISMA6_MONGO_PROVIDER_MISMATCH\", `No datasource block found; add \\`datasource db { provider = \"${namedProvider}\" }\\`.`, fallbackSourceId, void 0);\n\tconst block = datasource.symbol;\n\tlet parameter;\n\tfor (const entry of block.entries) if (entry.key()?.name() === \"provider\") {\n\t\tparameter = entry;\n\t\tbreak;\n\t}\n\tconst expression = parameter?.value();\n\tconst provider = expression instanceof StringLiteralExprAst ? expression.value() : void 0;\n\tif (provider !== void 0 && binding.providers.includes(provider)) return void 0;\n\treturn prisma6Diagnostic(\"PSL.PRISMA6_MONGO_PROVIDER_MISMATCH\", provider === void 0 ? `The datasource block declares no string \\`provider\\`; this contract source reads Prisma 6 schemas for provider \"${namedProvider}\".` : `The datasource provider is \"${provider}\"; this contract source reads Prisma 6 schemas for provider \"${namedProvider}\".`, datasource.sourceId, parameter === void 0 ? block.span : nodePslSpan(parameter.syntax, datasource.sources));\n}\nfunction buildEnum(located, input, diagnostics) {\n\tconst { symbol: block, sourceId, sources } = located;\n\tfor (const attribute of block.attributes) {\n\t\tif (attribute.name === \"map\") continue;\n\t\tif (attribute.name === \"schema\") {\n\t\t\tdiagnostics.push(schemaUnsupported(`Enum \"${block.name}\"`, attribute, sourceId));\n\t\t\tcontinue;\n\t\t}\n\t\tdiagnostics.push(unknownAttribute(`Enum \"${block.name}\"`, attribute, \"@@\", sourceId));\n\t}\n\tconst values = Object.create(null);\n\tconst parameterSpans = Object.create(null);\n\tfor (const entry of block.entries) {\n\t\tconst name = entry.key()?.name();\n\t\tif (name === void 0) continue;\n\t\tlet value = name;\n\t\tfor (const attributeNode of entry.attributes()) {\n\t\t\tconst attribute = readResolvedAttribute(attributeNode, sources);\n\t\t\tif (attribute.name === \"map\") value = requireString(attribute, `Enum member \"${block.name}.${name}\"`, sourceId, diagnostics) ?? value;\n\t\t\telse diagnostics.push(unknownAttribute(`Enum member \"${block.name}.${name}\"`, attribute, \"@\", sourceId));\n\t\t}\n\t\tvalues[name] = value;\n\t\tparameterSpans[name] = nodePslSpan(entry.syntax, sources);\n\t}\n\tconst descriptor = input.authoringContributions.entityTypes[\"enum\"];\n\tif (descriptor === void 0 || !isAuthoringEntityTypeDescriptor(descriptor)) {\n\t\tdiagnostics.push({\n\t\t\tcode: \"PSL_ENUM_MISSING_FACTORY\",\n\t\t\tmessage: `enum \"${block.name}\" requires an \"enum\" entityType factory in the active authoring contributions`,\n\t\t\tsourceId,\n\t\t\tspan: block.span\n\t\t});\n\t\treturn;\n\t}\n\tconst context = {\n\t\tfamily: input.binding.target.familyId,\n\t\ttarget: input.binding.target.targetId,\n\t\tcodecLookup: input.codecLookup,\n\t\tdataTypeLookup: input.dataTypes.lookup,\n\t\tsourceId,\n\t\tenumInferenceCodecs: {\n\t\t\ttext: input.binding.scalarCodecIds.String,\n\t\t\tint: input.binding.scalarCodecIds.Int\n\t\t},\n\t\tdiagnostics: { push: (diagnostic) => {\n\t\t\tdiagnostics.push(blindCast(diagnostic));\n\t\t} }\n\t};\n\tconst handle = instantiateAuthoringEntityType(\"enum\", descriptor, [{\n\t\tkind: \"enum\",\n\t\tkeyword: \"enum\",\n\t\tname: block.name,\n\t\tvalues,\n\t\tparameterSpans,\n\t\tattributes: {},\n\t\tspan: block.span\n\t}], context);\n\tif (handle === void 0 || handle === null) return void 0;\n\treturn {\n\t\tcodecId: handle.codecId,\n\t\tmembers: handle.enumMembers.map((member) => ({\n\t\t\tname: member.name,\n\t\t\tvalue: member.value\n\t\t}))\n\t};\n}\nfunction schemaUnsupported(owner, attribute, sourceId) {\n\treturn prisma6Diagnostic(\"PSL.PRISMA6_MONGO_SCHEMA_UNSUPPORTED\", `${owner}: \"@@schema\" is not supported; a MongoDB contract has one database, bound by the connection string. Remove @@schema.`, sourceId, attribute.span);\n}\nfunction unsupportedTypeMessage(label, typeName, owner) {\n\tconst base = `${label} has type \"${typeName}(...)\", which has no Prisma 8 codec, so ${`${owner.kind} \"${owner.name}\"`} cannot use this contract source while it has the field. Prisma 6 rejects @ignore on an Unsupported field. Removing the field from the schema leaves its stored values in the documents, but the Prisma 6 client no longer reads or writes them.`;\n\tif (owner.kind === \"type\") return base;\n\treturn `${base} Adding @@ignore to model \"${owner.name}\" keeps the model out of the contract, but the model disappears from the Prisma 6 client too, and every relation field in another model that points to it needs @ignore, which removes that field from the Prisma 6 client as well.`;\n}\n/** The native types Prisma 6 accepts on each MongoDB scalar, checked with Prisma 6.19. */\nconst PRISMA6_NATIVE_TYPES = {\n\tString: [\"db.String\", \"db.ObjectId\"],\n\tBoolean: [\"db.Bool\"],\n\tInt: [\"db.Int\", \"db.Long\"],\n\tBigInt: [\"db.Long\"],\n\tFloat: [\"db.Double\"],\n\tDateTime: [\"db.Date\", \"db.Timestamp\"],\n\tBytes: [\"db.BinData\", \"db.ObjectId\"],\n\tJson: [\"db.Json\"]\n};\n/** The BSON type Prisma 6 stores for each native type. */\nconst PRISMA6_NATIVE_TYPE_BSON = {\n\t\"db.String\": \"string\",\n\t\"db.ObjectId\": \"objectId\",\n\t\"db.Bool\": \"bool\",\n\t\"db.Int\": \"int\",\n\t\"db.Long\": \"long\",\n\t\"db.Double\": \"double\",\n\t\"db.Date\": \"date\",\n\t\"db.Timestamp\": \"timestamp\",\n\t\"db.BinData\": \"binData\",\n\t\"db.Json\": \"object\"\n};\n/** The BSON type Prisma 6 stores for each MongoDB scalar that has no native type. `Int` is a long. */\nconst PRISMA6_SCALAR_BSON = {\n\tString: \"string\",\n\tBoolean: \"bool\",\n\tInt: \"long\",\n\tBigInt: \"long\",\n\tFloat: \"double\",\n\tDateTime: \"date\",\n\tBytes: \"binData\",\n\tJson: \"object\"\n};\nfunction withArticle(typeName) {\n\treturn `${/^[AEIOU]/.test(typeName) ? \"an\" : \"a\"} ${typeName}`;\n}\nfunction acceptedByPrisma6(nativeType, typeName) {\n\treturn (Object.hasOwn(PRISMA6_NATIVE_TYPES, typeName) ? PRISMA6_NATIVE_TYPES[typeName] : void 0)?.includes(nativeType) === true;\n}\n/** Why the reader refuses a native type, and what removing it does to the Prisma 6 app. */\nfunction nativeTypeRefusal(label, nativeType, typeName) {\n\tconst refused = `${label}: native type \"@${nativeType}\" is not supported`;\n\tif (!acceptedByPrisma6(nativeType, typeName)) return `${refused}, and Prisma 6 does not accept it on ${withArticle(typeName)} field either. Remove it.`;\n\tconst declared = PRISMA6_NATIVE_TYPE_BSON[nativeType];\n\tconst plain = PRISMA6_SCALAR_BSON[typeName];\n\treturn `${refused}: Prisma 6 stores it as a BSON ${declared}, and Prisma 8 has no codec for that BSON type. Remove it; this also changes the Prisma 6 app: its client then stores new ${typeName} values as BSON ${plain} instead of ${declared}. Documents already stored keep their ${declared} values, so rewrite them as ${plain}s before Prisma 8 reads them.`;\n}\nfunction nativeTypeCodecId(binding, typeName, nativeType) {\n\tconst forType = Object.hasOwn(binding.nativeTypeCodecIds, typeName) ? binding.nativeTypeCodecIds[typeName] : void 0;\n\treturn forType !== void 0 && Object.hasOwn(forType, nativeType) ? forType[nativeType] : void 0;\n}\n/** The field's contract type, or `undefined` after reporting why it has none. */\nfunction resolveFieldType(field, owner, nativeType, sourceId, ctx) {\n\tconst { binding, diagnostics } = ctx;\n\tconst label = `Field \"${owner.name}.${field.name}\"`;\n\tif (field.typeConstructor !== void 0) {\n\t\tdiagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_UNSUPPORTED_TYPE\", unsupportedTypeMessage(label, field.typeConstructor.path.join(\".\"), owner), sourceId, field.typeConstructor.span));\n\t\treturn;\n\t}\n\tconst nativeTypeUnsupported = (attribute) => {\n\t\tdiagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_NATIVE_TYPE_UNSUPPORTED\", nativeTypeRefusal(label, attribute.name, field.typeName), sourceId, attribute.span));\n\t};\n\tconst many = { many: field.list ? { elementNullable: false } : false };\n\tif (ctx.compositeTypeNames.has(field.typeName)) {\n\t\tif (nativeType !== void 0) return nativeTypeUnsupported(nativeType);\n\t\treturn {\n\t\t\ttype: {\n\t\t\t\tkind: \"valueObject\",\n\t\t\t\tname: field.typeName\n\t\t\t},\n\t\t\tnullable: field.optional,\n\t\t\t...many\n\t\t};\n\t}\n\tconst enumBuild = ctx.enums.get(field.typeName);\n\tif (enumBuild !== void 0) {\n\t\tif (nativeType !== void 0) return nativeTypeUnsupported(nativeType);\n\t\tconst valueSet = {\n\t\t\tplane: \"domain\",\n\t\t\tentityKind: \"enum\",\n\t\t\tnamespaceId: UNBOUND_NAMESPACE_ID,\n\t\t\tentityName: field.typeName\n\t\t};\n\t\treturn {\n\t\t\ttype: {\n\t\t\t\tkind: \"scalar\",\n\t\t\t\tcodecId: enumBuild.codecId\n\t\t\t},\n\t\t\tnullable: field.optional,\n\t\t\tvalueSet,\n\t\t\t...many\n\t\t};\n\t}\n\tconst scalarCodecId = Object.hasOwn(binding.scalarCodecIds, field.typeName) ? binding.scalarCodecIds[field.typeName] : void 0;\n\tif (scalarCodecId === void 0) {\n\t\tdiagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_UNSUPPORTED_TYPE\", `${label} has unknown type \"${field.typeName}\": it is not a scalar type, an enum, a composite type, or a model. Correct the type name.`, sourceId, field.span));\n\t\treturn;\n\t}\n\tlet codecId = scalarCodecId;\n\tif (nativeType !== void 0) {\n\t\tconst nativeCodecId = nativeTypeCodecId(binding, field.typeName, nativeType.name);\n\t\tif (nativeCodecId === void 0) return nativeTypeUnsupported(nativeType);\n\t\tcodecId = nativeCodecId;\n\t}\n\treturn {\n\t\ttype: {\n\t\t\tkind: \"scalar\",\n\t\t\tcodecId\n\t\t},\n\t\tnullable: field.optional,\n\t\t...many\n\t};\n}\nfunction readCompositeFields(located, ctx) {\n\tconst { symbol, sourceId } = located;\n\tfor (const attribute of symbol.attributes) ctx.diagnostics.push(unknownAttribute(`Type \"${symbol.name}\"`, attribute, \"@@\", sourceId));\n\tconst fields = {};\n\tfor (const field of Object.values(symbol.fields)) {\n\t\tif (field.malformedType) continue;\n\t\tconst label = `Field \"${symbol.name}.${field.name}\"`;\n\t\tlet nativeType;\n\t\tlet rejected = false;\n\t\tfor (const attribute of field.attributes) if (attribute.name.startsWith(\"db.\")) nativeType = attribute;\n\t\telse if (attribute.name === \"map\") {\n\t\t\tctx.diagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_COMPOSITE_MAP_UNSUPPORTED\", `${label}: @map on a field of a composite type is not supported yet. The stored field keeps the name \"${stringArgument(attribute) ?? field.name}\", so removing @map renames it in storage; keep the schema as it is until Prisma 8 supports it.`, sourceId, attribute.span));\n\t\t\trejected = true;\n\t\t} else if (attribute.name === \"default\") {\n\t\t\tctx.diagnostics.push(defaultUnsupported(label, attribute, {\n\t\t\t\tkind: \"type\",\n\t\t\t\tname: symbol.name\n\t\t\t}, field, sourceId));\n\t\t\trejected = true;\n\t\t} else {\n\t\t\tctx.diagnostics.push(unknownAttribute(label, attribute, \"@\", sourceId));\n\t\t\trejected = true;\n\t\t}\n\t\tif (rejected) continue;\n\t\tconst resolved = resolveFieldType(field, {\n\t\t\tkind: \"type\",\n\t\t\tname: symbol.name\n\t\t}, nativeType, sourceId, ctx);\n\t\tif (resolved !== void 0) fields[field.name] = resolved;\n\t}\n\treturn fields;\n}\n/** What the Prisma 6 app loses when the Prisma 6 client stops filling a default. */\nfunction defaultRemovalConsequence(owner, field) {\n\tif (field.optional || field.list) return owner.kind === \"model\" ? `a Prisma 6 create call that leaves \"${field.name}\" out no longer gets the default value` : `a \"${owner.name}\" value written without \"${field.name}\" no longer gets the default value`;\n\treturn owner.kind === \"model\" ? `every Prisma 6 create call must then pass \"${field.name}\"` : `every \"${owner.name}\" value the Prisma 6 app writes must then include \"${field.name}\"`;\n}\nfunction defaultUnsupported(label, attribute, owner, field, sourceId) {\n\treturn prisma6Diagnostic(\"PSL.PRISMA6_MONGO_DEFAULT_UNSUPPORTED\", `${label}: ${attributeText(attribute)} is not supported. MongoDB has no stored defaults, and Prisma 8 fills only \\`now()\\` on DateTime fields. The Prisma 6 client fills this default today, so removing it also changes the Prisma 6 app: ${defaultRemovalConsequence(owner, field)}. Set the value in the application code that creates documents, then remove the default.`, sourceId, attribute.span);\n}\nfunction readModel(located, modelNames, ignoredModels, ctx) {\n\tconst { symbol, sourceId, sources } = located;\n\tconst { diagnostics } = ctx;\n\tconst modelLabel = `Model \"${symbol.name}\"`;\n\tlet collection = symbol.name;\n\tconst build = {\n\t\tlocated,\n\t\tcollection: symbol.name,\n\t\tstoredNames: /* @__PURE__ */ new Map(),\n\t\tignoredFields: /* @__PURE__ */ new Set(),\n\t\trejectedFields: /* @__PURE__ */ new Set(),\n\t\tfields: {},\n\t\trelations: {},\n\t\texecutionDefaults: [],\n\t\tuniqueFields: [],\n\t\tmodelIndexes: [],\n\t\trelationFields: [],\n\t\thasId: false\n\t};\n\tconst indexContext = {\n\t\towner: modelLabel,\n\t\tprefix: \"@@\",\n\t\tsourceId,\n\t\tsources,\n\t\tdiagnostics,\n\t\tcompositeFields: new Set(Object.values(symbol.fields).filter((field) => ctx.compositeTypeNames.has(field.typeName)).map((field) => field.name))\n\t};\n\tfor (const attribute of symbol.attributes) switch (attribute.name) {\n\t\tcase \"map\":\n\t\t\tcollection = requireString(attribute, modelLabel, sourceId, diagnostics) ?? collection;\n\t\t\tbreak;\n\t\tcase \"index\":\n\t\tcase \"unique\":\n\t\tcase \"fulltext\": {\n\t\t\tconst parsed = parseIndexAttribute({\n\t\t\t\t...attribute,\n\t\t\t\tname: attribute.name\n\t\t\t}, indexContext);\n\t\t\tif (parsed !== void 0) build.modelIndexes.push(parsed);\n\t\t\tbreak;\n\t\t}\n\t\tcase \"id\":\n\t\t\tbuild.hasId = true;\n\t\t\tdiagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_COMPOSITE_ID_UNSUPPORTED\", `${modelLabel}: @@id is not supported; a MongoDB document is identified by its \"_id\" field. Declare the id as \\`id String @id @default(auto()) @map(\"_id\") @db.ObjectId\\`.`, sourceId, attribute.span));\n\t\t\tbreak;\n\t\tcase \"schema\":\n\t\t\tdiagnostics.push(schemaUnsupported(modelLabel, attribute, sourceId));\n\t\t\tbreak;\n\t\tcase \"ignore\": break;\n\t\tdefault: diagnostics.push(unknownAttribute(modelLabel, attribute, \"@@\", sourceId));\n\t}\n\tfor (const field of Object.values(symbol.fields)) {\n\t\tconst reported = diagnostics.length;\n\t\treadModelField(field, build, modelNames, ignoredModels, ctx);\n\t\tif (diagnostics.length > reported) build.rejectedFields.add(field.name);\n\t}\n\treturn {\n\t\t...build,\n\t\tcollection\n\t};\n}\nfunction readModelField(field, build, modelNames, ignoredModels, ctx) {\n\tconst { symbol, sourceId, sources } = build.located;\n\tconst { diagnostics, binding } = ctx;\n\tconst label = `Field \"${symbol.name}.${field.name}\"`;\n\tconst isRelationField = modelNames.has(field.typeName) && field.typeConstructor === void 0;\n\tif (field.attributes.some((attribute) => attribute.name === \"ignore\")) {\n\t\tbuild.ignoredFields.add(field.name);\n\t\tconst unique = field.attributes.find((attribute) => attribute.name === \"unique\");\n\t\tif (unique !== void 0) diagnostics.push(ignoredFieldReferenced(symbol.name, [field.name], {\n\t\t\tkind: \"index\",\n\t\t\ttext: `@unique on field \"${symbol.name}.${field.name}\"`\n\t\t}, sourceId, unique.span));\n\t\treturn;\n\t}\n\tif (isRelationField) {\n\t\tif (ignoredModels.has(field.typeName)) return;\n\t\tlet relation;\n\t\tfor (const attribute of field.attributes) if (attribute.name === \"relation\") relation = attribute;\n\t\telse diagnostics.push(unknownAttribute(label, attribute, \"@\", sourceId));\n\t\tbuild.relationFields.push({\n\t\t\tfield,\n\t\t\trelation\n\t\t});\n\t\treturn;\n\t}\n\tlet storedName = field.name;\n\tlet nativeType;\n\tlet idAttribute;\n\tlet defaultAttribute;\n\tlet updatedAt;\n\tfor (const attribute of field.attributes) switch (attribute.name) {\n\t\tcase \"map\":\n\t\t\tstoredName = requireString(attribute, label, sourceId, diagnostics) ?? storedName;\n\t\t\tbreak;\n\t\tcase \"id\":\n\t\t\tidAttribute = attribute;\n\t\t\tbreak;\n\t\tcase \"default\":\n\t\t\tdefaultAttribute = attribute;\n\t\t\tbreak;\n\t\tcase \"updatedAt\":\n\t\t\tupdatedAt = attribute;\n\t\t\tbreak;\n\t\tcase \"unique\": {\n\t\t\tconst parsed = parseFieldUnique(attribute, field.name, {\n\t\t\t\towner: label,\n\t\t\t\tprefix: \"@\",\n\t\t\t\tsourceId,\n\t\t\t\tsources,\n\t\t\t\tdiagnostics,\n\t\t\t\tcompositeFields: /* @__PURE__ */ new Set()\n\t\t\t});\n\t\t\tif (parsed !== void 0) build.uniqueFields.push(parsed);\n\t\t\tbreak;\n\t\t}\n\t\tdefault: if (attribute.name.startsWith(\"db.\")) nativeType = attribute;\n\t\telse diagnostics.push(unknownAttribute(label, attribute, \"@\", sourceId));\n\t}\n\tbuild.storedNames.set(field.name, storedName);\n\tif (field.malformedType) return;\n\tconst owner = {\n\t\tkind: \"model\",\n\t\tname: symbol.name\n\t};\n\tconst resolved = resolveFieldType(field, owner, nativeType, sourceId, ctx);\n\tif (resolved === void 0) return;\n\tconst codecId = resolved.type.kind === \"scalar\" ? resolved.type.codecId : void 0;\n\tif (idAttribute !== void 0) {\n\t\tbuild.hasId = true;\n\t\tif (codecId !== binding.objectIdCodecId || storedName !== \"_id\" || field.optional || field.list) {\n\t\t\tdiagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_ID_NOT_OBJECTID\", `${label} is the model's @id, but it is not a required ObjectId stored as \"_id\". Prisma 8 identifies a MongoDB document by an ObjectId \"_id\"; declare the id as \\`${field.name} String @id @default(auto()) @map(\"_id\") @db.ObjectId\\`. If stored documents have \"_id\" values that are not ObjectIds, this model cannot use this contract source until they are rewritten with ObjectId \"_id\" values, along with every field that refers to them.`, sourceId, idAttribute.span));\n\t\t\treturn;\n\t\t}\n\t\tif (defaultAttribute !== void 0 && defaultKind(defaultAttribute) !== \"auto\") {\n\t\t\tdiagnostics.push(defaultUnsupported(label, defaultAttribute, owner, field, sourceId));\n\t\t\treturn;\n\t\t}\n\t\tbuild.fields[storedName] = resolved;\n\t\treturn;\n\t}\n\tconst isDateTime = codecId === binding.scalarCodecIds.DateTime && !field.list;\n\tif (updatedAt !== void 0 && !isDateTime) {\n\t\tdiagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_UPDATED_AT_TYPE_UNSUPPORTED\", `${label}: @updatedAt is only supported on a DateTime field. Removing it also stops the Prisma 6 client from setting the field on every update. Set the value in application code when you write documents, then remove @updatedAt.`, sourceId, updatedAt.span));\n\t\treturn;\n\t}\n\tconst defaultIsNow = defaultAttribute !== void 0 && defaultKind(defaultAttribute) === \"now\";\n\tif (defaultAttribute !== void 0 && (!defaultIsNow || !isDateTime)) {\n\t\tdiagnostics.push(defaultUnsupported(label, defaultAttribute, owner, field, sourceId));\n\t\treturn;\n\t}\n\tconst generator = {\n\t\tkind: \"generator\",\n\t\tid: binding.timestampGeneratorId\n\t};\n\tconst phases = updatedAt !== void 0 ? {\n\t\tonCreate: generator,\n\t\tonUpdate: generator\n\t} : defaultIsNow ? { onCreate: generator } : void 0;\n\tif (phases !== void 0 && field.optional) {\n\t\tconst written = updatedAt ?? defaultAttribute;\n\t\tconst generator = written === void 0 ? \"the generator\" : attributeText(written);\n\t\tdiagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_OPTIONAL_GENERATED_FIELD_UNSUPPORTED\", `${label} is optional and its value comes from ${generator}, which Prisma 8 cannot express on an optional field yet. Either fix also changes the Prisma 6 app: a required field makes the Prisma 6 client fail on a stored document that lacks it, and without ${generator} the Prisma 6 client no longer fills it. Make the field required once every stored document has a value, or set the value in application code and remove ${generator}.`, sourceId, written?.span ?? field.span));\n\t\treturn;\n\t}\n\tbuild.fields[storedName] = resolved;\n\tif (phases !== void 0) build.executionDefaults.push({\n\t\tfield: storedName,\n\t\tphases\n\t});\n}\nfunction identifierList(attributeArg) {\n\tconst expression = attributeArg.expression;\n\tconst array = expression === void 0 ? void 0 : ArrayLiteralAst.cast(expression.syntax);\n\tif (array === void 0) return void 0;\n\tconst names = [];\n\tfor (const element of array.elements()) {\n\t\tconst name = IdentifierAst.cast(element.syntax)?.name();\n\t\tif (name === void 0) return void 0;\n\t\tnames.push(name);\n\t}\n\treturn names;\n}\n/**\n* What removing `onDelete` or `onUpdate` does to the Prisma 6 app. The Prisma 6 client emulates referential actions on MongoDB with these defaults: `onDelete` is `Restrict` on a required relation (a delete fails with P2014) and `SetNull` on an optional one, and `onUpdate` is `Cascade`.\n*/\nfunction referentialActionRemoval(key, declared, sides) {\n\tconst fallback = key === \"onUpdate\" ? {\n\t\taction: \"Cascade\",\n\t\twhen: \"its default\",\n\t\teffect: `changing the field a ${sides.model} refers to in a ${sides.target} updates the key in its ${sides.model} documents`\n\t} : sides.optional ? {\n\t\taction: \"SetNull\",\n\t\twhen: \"its default for an optional relation\",\n\t\teffect: `deleting a ${sides.target} sets the key to null in its ${sides.model} documents`\n\t} : {\n\t\taction: \"Restrict\",\n\t\twhen: \"its default for a required relation\",\n\t\teffect: `deleting a ${sides.target} that still has ${sides.model} documents fails with P2014`\n\t};\n\tif (declared === fallback.action) return `Removing \"${key}: ${declared}\" leaves the Prisma 6 app as it is: ${declared} is already what the Prisma 6 client does for this relation.`;\n\treturn `The Prisma 6 client emulates referential actions, so removing \"${key}: ${declared}\" also changes the Prisma 6 app: its client then applies ${fallback.action}, ${fallback.when}, so ${fallback.effect}.`;\n}\nfunction readRelationArguments(attribute, label, sides, sourceId, diagnostics) {\n\tlet name;\n\tlet fields;\n\tlet references;\n\tlet rejected = false;\n\tconst invalid = (what, span) => {\n\t\trejected = true;\n\t\tdiagnostics.push({\n\t\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\t\tmessage: `${label}: @relation ${what}.`,\n\t\t\tsourceId,\n\t\t\tspan\n\t\t});\n\t};\n\tfor (const arg of attribute.args) {\n\t\tconst key = arg.kind === \"positional\" ? \"name\" : arg.name;\n\t\tswitch (key) {\n\t\t\tcase \"name\": {\n\t\t\t\tconst expression = arg.expression;\n\t\t\t\tname = expression === void 0 ? void 0 : StringLiteralExprAst.cast(expression.syntax)?.value();\n\t\t\t\tif (name === void 0) invalid(\"name must be a string\", arg.span);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"fields\":\n\t\t\t\tfields = identifierList(arg);\n\t\t\t\tif (fields === void 0) invalid(\"fields must be a list of field names\", arg.span);\n\t\t\t\tbreak;\n\t\t\tcase \"references\":\n\t\t\t\treferences = identifierList(arg);\n\t\t\t\tif (references === void 0) invalid(\"references must be a list of field names\", arg.span);\n\t\t\t\tbreak;\n\t\t\tcase \"onDelete\":\n\t\t\tcase \"onUpdate\":\n\t\t\tcase \"map\":\n\t\t\t\trejected = true;\n\t\t\t\tdiagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_REFERENTIAL_ACTION_UNSUPPORTED\", key === \"map\" ? `${label}: @relation argument \"map\" is not supported; it names a foreign key constraint, and MongoDB has none. Remove \"map\"; the Prisma 6 app has no foreign key on MongoDB either, so nothing changes there.` : `${label}: @relation argument \"${key}\" is not supported; Prisma 8 enforces no referential actions on MongoDB. ${referentialActionRemoval(key, arg.value, sides)} Handle related documents in application code, then remove \"${key}\".`, sourceId, arg.span));\n\t\t\t\tbreak;\n\t\t\tdefault: invalid(`argument \"${key ?? \"\"}\" is not supported`, arg.span);\n\t\t}\n\t}\n\treturn rejected ? void 0 : {\n\t\tname,\n\t\tfields,\n\t\treferences\n\t};\n}\nfunction ignoredFieldReferenced(modelName, fieldNames, usedBy, sourceId, span) {\n\tconst one = fieldNames.length === 1;\n\tconst fields = fieldNames.map((name) => `\"${modelName}.${name}\"`).join(\", \");\n\tconst removal = usedBy.kind === \"index\" ? \"which makes Prisma 6 `db push` drop the index\" : \"which removes that relation from the Prisma 6 client\";\n\treturn prisma6Diagnostic(\"PSL.PRISMA6_MONGO_IGNORED_FIELD_REFERENCED\", `${one ? \"Field\" : \"Fields\"} ${fields} ${one ? \"is\" : \"are\"} marked @ignore, but ${usedBy.text} uses ${one ? \"it\" : \"them\"}. Remove @ignore from ${fields}, which adds ${one ? \"it\" : \"them\"} to the Prisma 6 client, or remove ${usedBy.text}, ${removal}.`, sourceId, span);\n}\nfunction readRelationFields(build, builds, out, diagnostics) {\n\tconst { symbol, sourceId, sources } = build.located;\n\tfor (const { field, relation } of build.relationFields) {\n\t\tconst label = `Relation field \"${symbol.name}.${field.name}\"`;\n\t\tconst reject = () => {\n\t\t\tout.invalidFkPairings.push({\n\t\t\t\tpairKey: fkRelationPairKey(symbol.name, field.typeName),\n\t\t\t\t...ifDefined(\"relationName\", relation === void 0 ? void 0 : stringArgument(relation))\n\t\t\t});\n\t\t};\n\t\tconst args = relation === void 0 ? void 0 : readRelationArguments(relation, label, {\n\t\t\tmodel: symbol.name,\n\t\t\ttarget: field.typeName,\n\t\t\toptional: field.optional\n\t\t}, sourceId, diagnostics);\n\t\tif (relation !== void 0 && args === void 0) {\n\t\t\treject();\n\t\t\tcontinue;\n\t\t}\n\t\tconst target = builds.get(field.typeName);\n\t\tif (target === void 0) continue;\n\t\tif (!(args?.fields !== void 0 || args?.references !== void 0)) {\n\t\t\tout.backRelations.push({\n\t\t\t\tmodelName: symbol.name,\n\t\t\t\tfield,\n\t\t\t\ttargetModelName: field.typeName,\n\t\t\t\t...ifDefined(\"relationName\", args?.name),\n\t\t\t\tcardinality: field.list ? \"1:N\" : \"1:1\",\n\t\t\t\tsources\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (field.list) {\n\t\t\tdiagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_LIST_RELATION_UNSUPPORTED\", `${label} is a list relation that stores its keys in a list field (a many-to-many relation on MongoDB), which Prisma 8 does not support yet. Remove the relation fields from the schema this contract source reads and keep the key list as a plain field. The Prisma 6 client then loses the relation fields too, so Prisma 6 code that reads or writes the relation through them (\\`include\\`, \\`connect\\`) has to use the key list instead.`, sourceId, relation?.span ?? field.span));\n\t\t\treject();\n\t\t\tcontinue;\n\t\t}\n\t\tconst localNames = args?.fields ?? [];\n\t\tconst targetNames = args?.references ?? [];\n\t\tconst ignoredLocal = localNames.filter((name) => build.ignoredFields.has(name));\n\t\tif (ignoredLocal.length > 0) {\n\t\t\tdiagnostics.push(ignoredFieldReferenced(symbol.name, ignoredLocal, {\n\t\t\t\tkind: \"relation\",\n\t\t\t\ttext: `relation field \"${symbol.name}.${field.name}\"`\n\t\t\t}, sourceId, relation?.span ?? field.span));\n\t\t\treject();\n\t\t\tcontinue;\n\t\t}\n\t\tconst ignoredTarget = targetNames.filter((name) => target.ignoredFields.has(name));\n\t\tif (ignoredTarget.length > 0) {\n\t\t\tdiagnostics.push(ignoredFieldReferenced(target.located.symbol.name, ignoredTarget, {\n\t\t\t\tkind: \"relation\",\n\t\t\t\ttext: `relation field \"${symbol.name}.${field.name}\"`\n\t\t\t}, sourceId, relation?.span ?? field.span));\n\t\t\treject();\n\t\t\tcontinue;\n\t\t}\n\t\tconst localFields = localNames.map((name) => build.storedNames.get(name));\n\t\tconst targetFields = targetNames.map((name) => target.storedNames.get(name));\n\t\tif (localFields.some((name) => name === void 0) || targetFields.some((name) => name === void 0) || localNames.length !== targetNames.length || localNames.length === 0) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\t\t\tmessage: `${label}: @relation fields and references must name the same number of scalar fields of \"${symbol.name}\" and \"${field.typeName}\".`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: relation?.span ?? field.span\n\t\t\t});\n\t\t\treject();\n\t\t\tcontinue;\n\t\t}\n\t\tif (resolveToOneRelationNullable({\n\t\t\tdeclaredNullable: field.optional,\n\t\t\tlocalFieldNullability: localNames.map((name) => symbol.fields[name]?.optional === true),\n\t\t\townsReference: true\n\t\t}).contradiction !== void 0) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_RELATION_NULLABILITY_MISMATCH\",\n\t\t\t\tmessage: field.optional ? `${label} is optional but every field in @relation(fields: [...]) is required. Make one of those fields optional with \"?\" or remove \"?\" from \"${field.name}\".` : `${label} is required but a field in @relation(fields: [...]) is optional. Add \"?\" to \"${field.name}\" or make those fields required.`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: field.span\n\t\t\t});\n\t\t\treject();\n\t\t\tcontinue;\n\t\t}\n\t\tconst local = localFields.filter((name) => name !== void 0);\n\t\tconst referenced = targetFields.filter((name) => name !== void 0);\n\t\tbuild.relations[field.name] = {\n\t\t\tto: crossRef(field.typeName, UNBOUND_NAMESPACE_ID),\n\t\t\tcardinality: \"N:1\",\n\t\t\tnullable: field.optional,\n\t\t\ton: {\n\t\t\t\tlocalFields: local,\n\t\t\t\ttargetFields: referenced\n\t\t\t}\n\t\t};\n\t\tout.foreignKeys.push({\n\t\t\tdeclaringModel: symbol.name,\n\t\t\ttargetModel: field.typeName,\n\t\t\t...ifDefined(\"relationName\", args?.name),\n\t\t\tlocalFields: local,\n\t\t\ttargetFields: referenced\n\t\t});\n\t}\n}\nfunction buildIndexes(build, diagnostics) {\n\tconst { symbol, sourceId } = build.located;\n\tconst indexes = [];\n\tlet textIndexes = 0;\n\tconst keyFor = (field, text) => ({\n\t\tfield: build.storedNames.get(field.name) ?? field.name,\n\t\tdirection: field.direction ?? (text ? \"text\" : 1)\n\t});\n\tfor (const attribute of [...build.uniqueFields, ...build.modelIndexes]) {\n\t\tconst names = attribute.fields.map((field) => field.name);\n\t\tconst usedBy = {\n\t\t\tkind: \"index\",\n\t\t\ttext: build.uniqueFields.includes(attribute) ? `@unique on field \"${symbol.name}.${attribute.fields[0]?.name ?? \"\"}\"` : `@@${attribute.kind} on model \"${symbol.name}\"`\n\t\t};\n\t\tconst ignored = names.filter((name) => build.ignoredFields.has(name));\n\t\tif (ignored.length > 0) {\n\t\t\tdiagnostics.push(ignoredFieldReferenced(symbol.name, ignored, usedBy, sourceId, attribute.span));\n\t\t\tcontinue;\n\t\t}\n\t\tif (names.some((name) => build.rejectedFields.has(name))) continue;\n\t\tconst unknown = names.find((name) => !build.storedNames.has(name));\n\t\tif (unknown !== void 0) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_INDEX_FIELD_NOT_FOUND\",\n\t\t\t\tmessage: `Index on model \"${symbol.name}\" references unknown field \"${unknown}\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: attribute.span\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (attribute.kind === \"fulltext\") {\n\t\t\ttextIndexes++;\n\t\t\tif (textIndexes > 1) {\n\t\t\t\tdiagnostics.push(prisma6Diagnostic(\"PSL.PRISMA6_MONGO_TEXT_INDEX_LIMIT\", `Model \"${symbol.name}\" has more than one @@fulltext; MongoDB allows one text index per collection. Merge the fields into one @@fulltext.`, sourceId, attribute.span));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tindexes.push(new MongoIndex({\n\t\t\tkeys: attribute.fields.map((field) => keyFor(field, attribute.kind === \"fulltext\")),\n\t\t\t...attribute.kind === \"unique\" ? { unique: true } : {}\n\t\t}));\n\t}\n\treturn indexes;\n}\nfunction assembleContract(input) {\n\tconst target = input.binding.target.targetId;\n\tconst targetFamily = input.binding.target.familyId;\n\tconst builtEnums = {};\n\tfor (const [enumName, built] of input.enums) builtEnums[enumName] = {\n\t\tcodecId: built.codecId,\n\t\tmembers: built.members.map((member) => ({\n\t\t\tname: member.name,\n\t\t\tvalue: blindCast(member.value)\n\t\t}))\n\t};\n\tconst collections = {};\n\tfor (const [name, collection] of Object.entries(input.collections)) collections[name] = collection.indexes.length > 0 ? { indexes: collection.indexes } : {};\n\tconst storage = buildMongoStorage({\n\t\tcollections,\n\t\tvalueSets: encodeMongoValueSets(Object.fromEntries(input.enums), input.codecLookup)\n\t});\n\tconst models = {};\n\tfor (const [modelName, build] of input.builds) models[modelName] = {\n\t\tfields: build.fields,\n\t\trelations: build.relations,\n\t\tstorage: { collection: build.collection }\n\t};\n\tconst capabilities = {};\n\tconst execution = buildExecutionSection({\n\t\ttarget,\n\t\ttargetFamily,\n\t\tdefaults: input.executionDefaults\n\t});\n\treturn {\n\t\ttargetFamily,\n\t\ttarget,\n\t\troots: input.roots,\n\t\tdomain: { namespaces: { [UNBOUND_NAMESPACE_ID]: {\n\t\t\tmodels: blindCast(models),\n\t\t\t...Object.keys(input.valueObjects).length > 0 ? { valueObjects: input.valueObjects } : {},\n\t\t\t...Object.keys(builtEnums).length > 0 ? { enum: builtEnums } : {}\n\t\t} } },\n\t\tstorage,\n\t\textensions: {},\n\t\tcapabilities,\n\t\tprofileHash: computeProfileHash({\n\t\t\ttarget,\n\t\t\ttargetFamily,\n\t\t\tcapabilities\n\t\t}),\n\t\tmeta: {},\n\t\t...execution !== void 0 ? { execution } : {}\n\t};\n}\nfunction mergedSources(documents) {\n\tconst [first, ...rest] = documents.map((document) => document.sources);\n\tif (first === void 0) throw new InternalError(\"A Prisma 6 schema has at least one document\");\n\treturn first.merge(...rest);\n}\n//#endregion\n//#region src/provider.ts\nfunction defaultOutputFromSchemaPath(schemaPath) {\n\treturn join(dirname(schemaPath), \"contract.json\");\n}\nfunction mapParseDiagnostics(diagnostics, sourceFile, sourceId) {\n\treturn diagnostics.map((diagnostic) => ({\n\t\tcode: diagnostic.code,\n\t\tmessage: diagnostic.message,\n\t\tsourceId,\n\t\tspan: sourceFile.rangeToPslSpan(diagnostic.range)\n\t}));\n}\n/**\n* The files a Prisma 6 schema input names: the file itself, or every regular `.prisma` file under the directory, nested directories and symbolic links included, as Prisma 6 reads a schema directory. Sorted by path so duplicate detection blames the later file deterministically.\n*/\nasync function listSchemaFiles(absolutePath, displayPath) {\n\tif (!(await stat(absolutePath)).isDirectory()) return [{\n\t\tsourceId: displayPath,\n\t\tabsolutePath\n\t}];\n\tconst entries = await readdir(absolutePath, { recursive: true });\n\tconst files = [];\n\tfor (const entry of entries.filter((name) => extname(name) === \".prisma\").map((name) => normalize(name)).sort()) {\n\t\tconst entryPath = join(absolutePath, entry);\n\t\tif ((await stat(entryPath)).isFile()) files.push({\n\t\t\tsourceId: join(displayPath, entry),\n\t\t\tabsolutePath: entryPath\n\t\t});\n\t}\n\treturn files;\n}\nfunction isMissingPath(error) {\n\treturn error instanceof Error && Reflect.get(error, \"code\") === \"ENOENT\";\n}\nfunction readFailure(schemaPath, message, meta) {\n\treturn notOk({\n\t\tsummary: `Failed to read Prisma 6 schema at \"${schemaPath}\"`,\n\t\tdiagnostics: [prisma6Diagnostic(\"PSL.PRISMA6_MONGO_SCHEMA_READ_FAILED\", message, schemaPath, void 0)],\n\t\tmeta\n\t});\n}\n/**\n* A `ContractConfig` that reads a Prisma 6 MongoDB `schema.prisma` (a file, or a directory of `.prisma` files) as the contract source.\n*/\nfunction prisma6Contract(schemaPath, options) {\n\tconst parserOptions = { grammar: \"prisma-7\" };\n\treturn {\n\t\tsource: {\n\t\t\tformat: \"psl\",\n\t\t\tinputs: [schemaPath],\n\t\t\tparserOptions,\n\t\t\tasync load(context) {\n\t\t\t\tconst [absolutePath] = context.resolvedInputs;\n\t\t\t\tif (absolutePath === void 0) throw new InternalError(\"prisma6Contract: context.resolvedInputs is empty. The CLI config loader should populate it from source.inputs.\");\n\t\t\t\tlet files;\n\t\t\t\ttry {\n\t\t\t\t\tfiles = await listSchemaFiles(absolutePath, schemaPath);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconst cause = String(error);\n\t\t\t\t\treturn readFailure(schemaPath, isMissingPath(error) ? `There is no file or directory at \"${schemaPath}\". Fix the path passed to prisma6Schema() in prisma.config.ts.` : cause, {\n\t\t\t\t\t\tschemaPath,\n\t\t\t\t\t\tabsolutePath,\n\t\t\t\t\t\tcause\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (files.length === 0) return readFailure(schemaPath, `The schema directory \"${schemaPath}\" contains no .prisma file.`, {\n\t\t\t\t\tschemaPath,\n\t\t\t\t\tabsolutePath\n\t\t\t\t});\n\t\t\t\tconst documents = [];\n\t\t\t\tconst seedDiagnostics = [];\n\t\t\t\tfor (const file of files) {\n\t\t\t\t\tlet schema;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tschema = await readFile(file.absolutePath, \"utf-8\");\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconst message = String(error);\n\t\t\t\t\t\treturn readFailure(file.sourceId, message, {\n\t\t\t\t\t\t\tschemaPath: file.sourceId,\n\t\t\t\t\t\t\tabsoluteSchemaPath: file.absolutePath,\n\t\t\t\t\t\t\tcause: message\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tconst { document, sources, diagnostics } = parse(schema, file.sourceId, parserOptions);\n\t\t\t\t\tconst sourceFile = sources.sourceFileFor(document.syntax);\n\t\t\t\t\tseedDiagnostics.push(...mapParseDiagnostics(diagnostics, sourceFile, file.sourceId));\n\t\t\t\t\tdocuments.push({\n\t\t\t\t\t\tdocument,\n\t\t\t\t\t\tsources,\n\t\t\t\t\t\tsourceFile,\n\t\t\t\t\t\tsourceId: file.sourceId\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tlet contract;\n\t\t\t\ttry {\n\t\t\t\t\tconst interpreted = interpretPrisma6Documents({\n\t\t\t\t\t\tdocuments,\n\t\t\t\t\t\tseedDiagnostics,\n\t\t\t\t\t\tbinding: options.binding,\n\t\t\t\t\t\tauthoringContributions: context.authoringContributions,\n\t\t\t\t\t\tcodecLookup: context.codecLookup,\n\t\t\t\t\t\tdataTypes: context.dataTypes\n\t\t\t\t\t});\n\t\t\t\t\tif (!interpreted.ok) return interpreted;\n\t\t\t\t\tcontract = applySpecifierDefaultControlPolicy(interpreted.value, options.defaultControlPolicy);\n\t\t\t\t\tvalidateContractDomain(contract);\n\t\t\t\t\tvalidateMongoStorage(blindCast(contract));\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (!isStructuredError(error)) throw error;\n\t\t\t\t\treturn notOk({\n\t\t\t\t\t\tsummary: \"Prisma 6 MongoDB schema interpretation failed\",\n\t\t\t\t\t\tdiagnostics: [prisma6Diagnostic(\"PSL.PRISMA6_MONGO_CONTRACT_INVALID\", `This schema gives a contract that Prisma 8 rejects, and the Prisma 6 MongoDB contract source has no specific diagnostic for the cause: ${error.message.replace(/\\.$/, \"\")}. This is a bug in Prisma ORM; please report it with this schema.`, schemaPath, void 0)],\n\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\tschemaPath,\n\t\t\t\t\t\t\tcode: error.code\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn ok(contract);\n\t\t\t}\n\t\t},\n\t\toutput: options.output ?? defaultOutputFromSchemaPath(schemaPath)\n\t};\n}\n//#endregion\nexport { prisma6Contract };\n\n//# sourceMappingURL=provider.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAoBA,SAAS,kBAAkB,MAAM,SAAS,UAAU,MAAM;CACzD,OAAO;EACN;EACA;EACA;EACA,GAAG,SAAS,KAAK,IAAI,EAAE,KAAK,IAAI,CAAC;CAClC;AACD;AAGA,SAAS,YAAY,WAAW,MAAM,MAAM,KAAK;CAChD,IAAI,YAAY,KAAK,kBAAkB,gDAAgD,GAAG,IAAI,MAAM,IAAI,IAAI,SAAS,UAAU,KAAK,GAAG,QAAQ,IAAI,UAAU,IAAI,CAAC;AACnK;AACA,SAAS,cAAc,YAAY;CAClC,IAAI,eAAe,KAAK,GAAG,OAAO,KAAK;CACvC,MAAM,QAAQ,cAAc,KAAK,WAAW,MAAM,CAAC,EAAE,KAAK;CAC1D,OAAO,UAAU,QAAQ,IAAI,UAAU,SAAS,KAAK,KAAK;AAC3D;;;;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a,YAAY,KAAK,QAAQ,CAAC;KACnF,UAAU,KAAK;MACd;MACA;MACA;MACA,UAAU,KAAK;KAChB,CAAC;IACF;IACA,IAAI;IACJ,IAAI;KACH,MAAM,cAAc,0BAA0B;MAC7C;MACA;MACA,SAAS,QAAQ;MACjB,wBAAwB,QAAQ;MAChC,aAAa,QAAQ;MACrB,WAAW,QAAQ;KACpB,CAAC;KACD,IAAI,CAAC,YAAY,IAAI,OAAO;KAC5B,WAAW,mCAAmC,YAAY,OAAO,QAAQ,oBAAoB;KAC7F,uBAAuB,QAAQ;KAC/B,qBAAqB,UAAU,QAAQ,CAAC;IACzC,SAAS,OAAO;KACf,IAAI,CAAC,kBAAkB,KAAK,GAAG,MAAM;KACrC,OAAO,MAAM;MACZ,SAAS;MACT,aAAa,CAAC,kBAAkB,sCAAsC,0IAA0I,MAAM,QAAQ,QAAQ,OAAO,EAAE,EAAE,oEAAoE,YAAY,KAAK,CAAC,CAAC;MACxU,MAAM;OACL;OACA,MAAM,MAAM;MACb;KACD,CAAC;IACF;IACA,OAAO,GAAG,QAAQ;GACnB;EACD;EACA,QAAQ,QAAQ,UAAU,4BAA4B,UAAU;CACjE;AACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/orm-family-mongo",
3
- "version": "8.0.0-rc.17-dev.14",
3
+ "version": "8.0.0-rc.17-dev.16",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -9,30 +9,30 @@
9
9
  "dist"
10
10
  ],
11
11
  "dependencies": {
12
- "@prisma/orm-framework": "8.0.0-rc.17-dev.14",
13
- "@prisma/orm-toolchain": "8.0.0-rc.17-dev.14",
12
+ "@prisma/orm-framework": "8.0.0-rc.17-dev.16",
13
+ "@prisma/orm-toolchain": "8.0.0-rc.17-dev.16",
14
14
  "arktype": "^2.2.2",
15
15
  "mongodb": "^7.4.0",
16
16
  "pathe": "^2.0.3"
17
17
  },
18
18
  "devDependencies": {
19
- "@internal/family-mongo": "8.0.0-rc.17-dev.14",
20
- "@internal/mongo-codec": "8.0.0-rc.17-dev.14",
21
- "@internal/mongo-contract": "8.0.0-rc.17-dev.14",
22
- "@internal/mongo-contract-prisma6": "8.0.0-rc.17-dev.14",
23
- "@internal/mongo-contract-psl": "8.0.0-rc.17-dev.14",
24
- "@internal/mongo-contract-ts": "8.0.0-rc.17-dev.14",
25
- "@internal/mongo-emitter": "8.0.0-rc.17-dev.14",
26
- "@internal/mongo-lowering": "8.0.0-rc.17-dev.14",
27
- "@internal/mongo-orm": "8.0.0-rc.17-dev.14",
28
- "@internal/mongo-query-ast": "8.0.0-rc.17-dev.14",
29
- "@internal/mongo-query-builder": "8.0.0-rc.17-dev.14",
30
- "@internal/mongo-runtime": "8.0.0-rc.17-dev.14",
31
- "@internal/mongo-schema-ir": "8.0.0-rc.17-dev.14",
32
- "@internal/mongo-value": "8.0.0-rc.17-dev.14",
33
- "@internal/mongo-wire": "8.0.0-rc.17-dev.14",
34
- "@repo/tsconfig": "8.0.0-rc.17-dev.14",
35
- "@repo/tsdown": "8.0.0-rc.17-dev.14",
19
+ "@internal/family-mongo": "8.0.0-rc.17-dev.16",
20
+ "@internal/mongo-codec": "8.0.0-rc.17-dev.16",
21
+ "@internal/mongo-contract": "8.0.0-rc.17-dev.16",
22
+ "@internal/mongo-contract-prisma6": "8.0.0-rc.17-dev.16",
23
+ "@internal/mongo-contract-psl": "8.0.0-rc.17-dev.16",
24
+ "@internal/mongo-contract-ts": "8.0.0-rc.17-dev.16",
25
+ "@internal/mongo-emitter": "8.0.0-rc.17-dev.16",
26
+ "@internal/mongo-lowering": "8.0.0-rc.17-dev.16",
27
+ "@internal/mongo-orm": "8.0.0-rc.17-dev.16",
28
+ "@internal/mongo-query-ast": "8.0.0-rc.17-dev.16",
29
+ "@internal/mongo-query-builder": "8.0.0-rc.17-dev.16",
30
+ "@internal/mongo-runtime": "8.0.0-rc.17-dev.16",
31
+ "@internal/mongo-schema-ir": "8.0.0-rc.17-dev.16",
32
+ "@internal/mongo-value": "8.0.0-rc.17-dev.16",
33
+ "@internal/mongo-wire": "8.0.0-rc.17-dev.16",
34
+ "@repo/tsconfig": "8.0.0-rc.17-dev.16",
35
+ "@repo/tsdown": "8.0.0-rc.17-dev.16",
36
36
  "tsdown": "0.22.14",
37
37
  "typescript": "5.9.3"
38
38
  },