@prisma/orm-toolchain 8.0.0-rc.9-dev.1 → 8.0.0-rc.9-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/{aggregate-EMuVN6hq.mjs → aggregate-Ib7P8moX.mjs} +2 -2
  2. package/dist/{aggregate-EMuVN6hq.mjs.map → aggregate-Ib7P8moX.mjs.map} +1 -1
  3. package/dist/cli.mjs +5 -5
  4. package/dist/cli.mjs.map +1 -1
  5. package/dist/cli__control-api.d.mts +1 -1
  6. package/dist/cli__control-api.mjs +1 -1
  7. package/dist/cli__migration-cli.mjs +1 -1
  8. package/dist/config-loader.mjs +1 -1
  9. package/dist/{domain-type-generation-bpSO3Y0L-jo2C7LlH.mjs → domain-type-generation-CR9ECUau-DOlKbcaE.mjs} +20 -6
  10. package/dist/domain-type-generation-CR9ECUau-DOlKbcaE.mjs.map +1 -0
  11. package/dist/{domain-type-generation-PkAb39ob-Ct8AGqow.d.mts → domain-type-generation-X6-AaL1U-DHEoRf_y.d.mts} +14 -3
  12. package/dist/domain-type-generation-X6-AaL1U-DHEoRf_y.d.mts.map +1 -0
  13. package/dist/emitter.d.mts +2 -2
  14. package/dist/emitter.mjs +2 -2
  15. package/dist/emitter__domain-type-generation.d.mts +2 -2
  16. package/dist/emitter__domain-type-generation.mjs +2 -2
  17. package/dist/{exports-4S7plLIx.mjs → exports-BysXxIyI.mjs} +2 -2
  18. package/dist/{exports-4S7plLIx.mjs.map → exports-BysXxIyI.mjs.map} +1 -1
  19. package/dist/exports-CE6OD63o-4Qpqr2W7.mjs +398 -0
  20. package/dist/exports-CE6OD63o-4Qpqr2W7.mjs.map +1 -0
  21. package/dist/{exports-Cv8nMmBT.mjs → exports-gEustzOH.mjs} +2 -2
  22. package/dist/{exports-Cv8nMmBT.mjs.map → exports-gEustzOH.mjs.map} +1 -1
  23. package/dist/{index-Dgwl8Tzs.d.mts → index-D217lbiW.d.mts} +7 -3
  24. package/dist/index-D217lbiW.d.mts.map +1 -0
  25. package/dist/migration-tools.mjs +1 -1
  26. package/dist/migration-tools__aggregate.mjs +1 -1
  27. package/dist/{ref-CUMSMd2D-BUVY_EPC.mjs → ref-BPBIUGrB-BFzvJ0bv.mjs} +10 -6
  28. package/dist/ref-BPBIUGrB-BFzvJ0bv.mjs.map +1 -0
  29. package/dist/vite-plugin-contract-emit.mjs +3 -3
  30. package/package.json +12 -12
  31. package/dist/domain-type-generation-PkAb39ob-Ct8AGqow.d.mts.map +0 -1
  32. package/dist/domain-type-generation-bpSO3Y0L-jo2C7LlH.mjs.map +0 -1
  33. package/dist/exports-Dw2WIX63-CQgI2e_L.mjs +0 -160
  34. package/dist/exports-Dw2WIX63-CQgI2e_L.mjs.map +0 -1
  35. package/dist/index-Dgwl8Tzs.d.mts.map +0 -1
  36. package/dist/ref-CUMSMd2D-BUVY_EPC.mjs.map +0 -1
@@ -2,7 +2,7 @@ import { i as Refs, n as RefEntry } from "./refs-BNCUu58Y-BIso5Jfg.mjs";
2
2
  import { n as MigrationGraph } from "./graph-bDjJ4GL9-BhFevsJS.mjs";
3
3
  import { r as MigrationRef, t as ContractRef } from "./ref-resolution-CaHQJXE0.mjs";
4
4
  import { A as SchemaVerifyOptions, C as EmitResult, D as IntrospectOptions, E as ExecuteDbVerifyResult, M as VerifyOptions, N as executeDbVerify, S as EmitOptions, T as ExecuteDbVerifyOptions, _ as DbUpdateResult, a as ControlClient, b as EmitFailure, c as CreateControlClient, d as DbInitOptions, f as DbInitResult, g as DbUpdateOptions, h as DbUpdateFailureCode, i as ControlActionName, j as SignOptions, k as OnControlProgress, l as DbInitFailure, m as DbUpdateFailure, n as ContractEmitOptions, o as ControlClientOptions, p as DbInitSuccess, r as ContractEmitResult, s as ControlProgressEvent, t as CliStructuredError$2, u as DbInitFailureCode, v as DbUpdateSuccess, w as EmitSuccess, x as EmitFailureCode, y as EmitContractConfig } from "./db-verify-Yih5kWtB-B1kv76ec.mjs";
5
- import { a as emit } from "./index-Dgwl8Tzs.mjs";
5
+ import { a as emit } from "./index-D217lbiW.mjs";
6
6
  import { n as OnDiskMigrationPackage, t as MigrationOps } from "./package-CfWiDNrr-ZR4HM_Iz.mjs";
7
7
  import { c as ContractSpaceAggregate, d as IntegrityQueryOptions, p as IntegrityViolation, t as AggregateContractSpace } from "./aggregate-DLUJLq5Y.mjs";
8
8
  import { r as PrismaNextConfig$1 } from "./index-u5RdrumF.mjs";
@@ -1,2 +1,2 @@
1
- import { $ as loadContractRawSafely, At as statusForMigrationHash, B as executeDbUpdate, Ct as resolveRefAdvancementFields, Dt as runMigrationCheck, Et as runContractSpaceSeedPhase, G as executeRefAdvancement, H as executeMigrateShowPlan, J as executeRefSetCommand, K as executeRefDeleteCommand, Ot as runMigrationList, Q as loadAggregateIntegrityViolations, R as executeContractEmit, St as resolveMigrationRef, U as executeMigrationNewCommand, V as executeDbVerify, W as executeMigrationPlanCommand, X as hasMigrationPath, Z as listRefsByContractHash, _ as enumerateCheckSpaces, a as buildContractSpaceAggregate, bt as resolveContractRefToSnapshot, c as buildRefAdvancementFields, dt as refuseContractSpaceIntegrity, et as loadContractSpaceAggregateForCli, f as computeRefAdvancementName, ft as refuseDeclaredExtensionTargetMismatch, g as enrichContract, gt as refuseUnknownInvariants, h as disposeEmitQueue, ht as refusePackageCorruptionOnAggregate, i as appliedHashesFromLedger, it as mapIntegrityViolations, l as checkSingleTarget, lt as readContractIR, m as deriveStatusEdgeAnnotations, mt as refuseMissingInvariantPath, n as advanceRefSafely, nt as mapCaughtMigrationError, o as buildMigrationSpaceGraphEntries, ot as migrationSpaceListEntriesFromAggregate, p as createControlClient, pt as refuseMarkerOutsideGraph, q as executeRefListCommand, r as appContractStandInFromIdentity, rt as mapContractAtError, s as buildReadAggregate, st as originHashForStatus, ut as readMigrationRefs, wt as resolveToForPlan, xt as resolveFromForPlan, yt as resolveContractRef$1, z as executeDbInit } from "./ref-CUMSMd2D-BUVY_EPC.mjs";
1
+ import { $ as loadContractRawSafely, At as statusForMigrationHash, B as executeDbUpdate, Ct as resolveRefAdvancementFields, Dt as runMigrationCheck, Et as runContractSpaceSeedPhase, G as executeRefAdvancement, H as executeMigrateShowPlan, J as executeRefSetCommand, K as executeRefDeleteCommand, Ot as runMigrationList, Q as loadAggregateIntegrityViolations, R as executeContractEmit, St as resolveMigrationRef, U as executeMigrationNewCommand, V as executeDbVerify, W as executeMigrationPlanCommand, X as hasMigrationPath, Z as listRefsByContractHash, _ as enumerateCheckSpaces, a as buildContractSpaceAggregate, bt as resolveContractRefToSnapshot, c as buildRefAdvancementFields, dt as refuseContractSpaceIntegrity, et as loadContractSpaceAggregateForCli, f as computeRefAdvancementName, ft as refuseDeclaredExtensionTargetMismatch, g as enrichContract, gt as refuseUnknownInvariants, h as disposeEmitQueue, ht as refusePackageCorruptionOnAggregate, i as appliedHashesFromLedger, it as mapIntegrityViolations, l as checkSingleTarget, lt as readContractIR, m as deriveStatusEdgeAnnotations, mt as refuseMissingInvariantPath, n as advanceRefSafely, nt as mapCaughtMigrationError, o as buildMigrationSpaceGraphEntries, ot as migrationSpaceListEntriesFromAggregate, p as createControlClient, pt as refuseMarkerOutsideGraph, q as executeRefListCommand, r as appContractStandInFromIdentity, rt as mapContractAtError, s as buildReadAggregate, st as originHashForStatus, ut as readMigrationRefs, wt as resolveToForPlan, xt as resolveFromForPlan, yt as resolveContractRef$1, z as executeDbInit } from "./ref-BPBIUGrB-BFzvJ0bv.mjs";
2
2
  export { advanceRefSafely, appContractStandInFromIdentity, appliedHashesFromLedger, buildContractSpaceAggregate, buildMigrationSpaceGraphEntries, buildReadAggregate, buildRefAdvancementFields, checkSingleTarget, computeRefAdvancementName, createControlClient, deriveStatusEdgeAnnotations, disposeEmitQueue, enrichContract, enumerateCheckSpaces, executeContractEmit, executeDbInit, executeDbUpdate, executeDbVerify, executeMigrateShowPlan, executeMigrationNewCommand, executeMigrationPlanCommand, executeRefAdvancement, executeRefDeleteCommand, executeRefListCommand, executeRefSetCommand, hasMigrationPath, listRefsByContractHash, loadAggregateIntegrityViolations, loadContractRawSafely, loadContractSpaceAggregateForCli, mapCaughtMigrationError, mapContractAtError, mapIntegrityViolations, migrationSpaceListEntriesFromAggregate, originHashForStatus, readContractIR, readMigrationRefs, refuseContractSpaceIntegrity, refuseDeclaredExtensionTargetMismatch, refuseMarkerOutsideGraph, refuseMissingInvariantPath, refusePackageCorruptionOnAggregate, refuseUnknownInvariants, resolveContractRef$1 as resolveContractRef, resolveContractRefToSnapshot, resolveFromForPlan, resolveMigrationRef, resolveRefAdvancementFields, resolveToForPlan, runContractSpaceSeedPhase, runMigrationCheck, runMigrationList, statusForMigrationHash };
@@ -1,5 +1,5 @@
1
1
  import { g as errorInvalidJson } from "./errors-SoLLYLtw-DMxVbVs9.mjs";
2
- import { a as loadConfigForSections } from "./exports-Cv8nMmBT.mjs";
2
+ import { a as loadConfigForSections } from "./exports-gEustzOH.mjs";
3
3
  import { r as buildMigrationArtifacts } from "./migration-B9w-7dKe.mjs";
4
4
  import { readFileSync, realpathSync, writeFileSync } from "node:fs";
5
5
  import { CliStructuredError, errorMigrationCliInvalidConfigArg, errorMigrationCliUnknownFlag } from "@prisma/orm-framework/errors/control";
@@ -1,2 +1,2 @@
1
- import { a as loadConfigForSections, i as loadConfigForFile, n as findNearestConfigPathForFile, o as requireConfigSections, r as loadConfig, t as finalizeConfig } from "./exports-Cv8nMmBT.mjs";
1
+ import { a as loadConfigForSections, i as loadConfigForFile, n as findNearestConfigPathForFile, o as requireConfigSections, r as loadConfig, t as finalizeConfig } from "./exports-gEustzOH.mjs";
2
2
  export { finalizeConfig, findNearestConfigPathForFile, loadConfig, loadConfigForFile, loadConfigForSections, requireConfigSections };
@@ -3,7 +3,7 @@ import { structuredError } from "@prisma/orm-framework/utils/structured-error";
3
3
  import { keepInternalSpecifiers } from "@prisma/orm-framework/components/emission";
4
4
  import { renderImports, tsStringLiteral } from "@prisma/orm-framework/ts-render";
5
5
  import { blindCast } from "@prisma/orm-framework/utils/casts";
6
- //#region ../../../1-framework/3-tooling/emitter/dist/domain-type-generation-bpSO3Y0L.mjs
6
+ //#region ../../../1-framework/3-tooling/emitter/dist/domain-type-generation-CR9ECUau.mjs
7
7
  function emitterError(code, message, options) {
8
8
  return structuredError(code, message, options);
9
9
  }
@@ -66,6 +66,7 @@ function generateModelRelationsType(relations) {
66
66
  const parts = [];
67
67
  if (toRef) parts.push(`readonly to: ${serializeCrossReference(blindCast(toRef))}`);
68
68
  if (relObj["cardinality"]) parts.push(`readonly cardinality: ${serializeValue(relObj["cardinality"])}`);
69
+ if (typeof relObj["nullable"] === "boolean") parts.push(`readonly nullable: ${relObj["nullable"]}`);
69
70
  const on = relObj["on"];
70
71
  if (on && (!on.localFields || !on.targetFields)) throw emitterError("CONTRACT.RELATION_INVALID", `Relation "${relName}" has an "on" block but is missing localFields or targetFields`, { meta: { relation: relName } });
71
72
  if (on?.localFields && on.targetFields) {
@@ -222,11 +223,26 @@ function resolveFieldType(field, codecLookup, resolvedTypeParams, resolvedValueS
222
223
  function generateFieldResolvedType(field, codecLookup, side = "output") {
223
224
  return resolveFieldType(field, codecLookup)[side];
224
225
  }
226
+ /**
227
+ * Resolves one model field's input and output types the way `FieldOutputTypes` /
228
+ * `FieldInputTypes` do: inline type params win over the family resolver, and a family-resolved
229
+ * value set renders as a literal union.
230
+ */
231
+ function resolveModelFieldType(modelName, fieldName, field, model, resolvers) {
232
+ const resolvedTypeParams = (field.type.kind === "scalar" && field.type.typeParams && Object.keys(field.type.typeParams).length > 0 ? field.type.typeParams : void 0) ?? resolvers.resolveFieldTypeParams?.(modelName, fieldName, model);
233
+ const resolvedValueSet = resolvers.resolveFieldValueSet?.(modelName, fieldName, model);
234
+ return resolveFieldType(field, resolvers.codecLookup, resolvedTypeParams, resolvedValueSet);
235
+ }
225
236
  function generateBothFieldTypesMaps(models, codecLookup, resolveFieldTypeParams, resolveFieldValueSet) {
226
237
  if (!models || Object.keys(models).length === 0) return {
227
238
  output: "Record<string, never>",
228
239
  input: "Record<string, never>"
229
240
  };
241
+ const resolvers = {
242
+ codecLookup,
243
+ resolveFieldTypeParams,
244
+ resolveFieldValueSet
245
+ };
230
246
  const outputModelEntries = [];
231
247
  const inputModelEntries = [];
232
248
  for (const [modelName, model] of Object.entries(models).sort(([a], [b]) => a.localeCompare(b))) {
@@ -234,9 +250,7 @@ function generateBothFieldTypesMaps(models, codecLookup, resolveFieldTypeParams,
234
250
  const outputFieldEntries = [];
235
251
  const inputFieldEntries = [];
236
252
  for (const [fieldName, field] of Object.entries(model.fields)) {
237
- const resolvedTypeParams = (field.type.kind === "scalar" && field.type.typeParams && Object.keys(field.type.typeParams).length > 0 ? field.type.typeParams : void 0) ?? resolveFieldTypeParams?.(modelName, fieldName, model);
238
- const resolvedValueSet = resolveFieldValueSet?.(modelName, fieldName, model);
239
- const resolved = resolveFieldType(field, codecLookup, resolvedTypeParams, resolvedValueSet);
253
+ const resolved = resolveModelFieldType(modelName, fieldName, field, model, resolvers);
240
254
  const key = `readonly ${serializeObjectKey(fieldName)}`;
241
255
  outputFieldEntries.push(`${key}: ${resolved.output}`);
242
256
  inputFieldEntries.push(`${key}: ${resolved.input}`);
@@ -329,6 +343,6 @@ function generateValueObjectTypeAliases(valueObjects, codecLookup) {
329
343
  return aliases.join("\n");
330
344
  }
331
345
  //#endregion
332
- export { serializeCrossReference as C, serializeValue as D, serializeObjectKey as E, resolveValueObjectType as S, serializeNamespaceId as T, generateValueObjectType as _, generateContractFieldDescriptor as a, renderValueSetType as b, generateFieldResolvedType as c, generateImportLines as d, generateModelFieldEntry as f, generateRootsType as g, generateModelsType as h, generateCodecTypeIntersection as i, generateFieldTypesMapsByNamespace as l, generateModelRelationsType as m, emitterError as n, generateFieldInputTypesMap as o, generateModelFieldsType as p, generateBothFieldTypesMaps as r, generateFieldOutputTypesMap as s, deduplicateImports as t, generateHashTypeAliases as u, generateValueObjectTypeAliases as v, serializeExecutionType as w, resolveFieldType as x, generateValueObjectsDescriptorType as y };
346
+ export { resolveValueObjectType as C, serializeObjectKey as D, serializeNamespaceId as E, serializeValue as O, resolveModelFieldType as S, serializeExecutionType as T, generateValueObjectType as _, generateContractFieldDescriptor as a, renderValueSetType as b, generateFieldResolvedType as c, generateImportLines as d, generateModelFieldEntry as f, generateRootsType as g, generateModelsType as h, generateCodecTypeIntersection as i, generateFieldTypesMapsByNamespace as l, generateModelRelationsType as m, emitterError as n, generateFieldInputTypesMap as o, generateModelFieldsType as p, generateBothFieldTypesMaps as r, generateFieldOutputTypesMap as s, deduplicateImports as t, generateHashTypeAliases as u, generateValueObjectTypeAliases as v, serializeCrossReference as w, resolveFieldType as x, generateValueObjectsDescriptorType as y };
333
347
 
334
- //# sourceMappingURL=domain-type-generation-bpSO3Y0L-jo2C7LlH.mjs.map
348
+ //# sourceMappingURL=domain-type-generation-CR9ECUau-DOlKbcaE.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domain-type-generation-CR9ECUau-DOlKbcaE.mjs","names":[],"sources":["../../../../1-framework/3-tooling/emitter/dist/domain-type-generation-CR9ECUau.mjs"],"sourcesContent":["import { isSafeTypeExpression } from \"./type-expression-safety.mjs\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { keepInternalSpecifiers } from \"@internal/framework-components/emission\";\nimport { renderImports, tsStringLiteral } from \"@internal/ts-render\";\nimport { blindCast } from \"@internal/utils/casts\";\n//#region src/emitter-errors.ts\nfunction emitterError(code, message, options) {\n\treturn structuredError(code, message, options);\n}\n//#endregion\n//#region src/domain-type-generation.ts\nfunction serializeValue(value) {\n\tif (value === null) return \"null\";\n\tif (value === void 0) return \"undefined\";\n\tif (typeof value === \"string\") return tsStringLiteral(value);\n\tif (typeof value === \"number\" || typeof value === \"boolean\") return String(value);\n\tif (typeof value === \"bigint\") return `${value}n`;\n\tif (Array.isArray(value)) return `readonly [${value.map((v) => serializeValue(v)).join(\", \")}]`;\n\tif (typeof value === \"object\") {\n\t\tconst entries = [];\n\t\tfor (const [k, v] of Object.entries(value)) entries.push(`readonly ${serializeObjectKey(k)}: ${serializeValue(v)}`);\n\t\treturn `{ ${entries.join(\"; \")} }`;\n\t}\n\treturn \"unknown\";\n}\nfunction serializeObjectKey(key) {\n\tif (/^[$A-Z_a-z][$\\w]*$/.test(key)) return key;\n\treturn serializeValue(key);\n}\nfunction serializeNamespaceId(value) {\n\treturn `${serializeValue(value)} & NamespaceId`;\n}\nfunction serializeCrossReference(ref) {\n\treturn `{ readonly namespace: ${serializeNamespaceId(String(ref.namespace))}; readonly model: ${serializeValue(ref.model)}${ref.space !== void 0 ? `; readonly space: ${serializeValue(ref.space)}` : \"\"} }`;\n}\nfunction generateRootsType(roots) {\n\tif (!roots || Object.keys(roots).length === 0) return \"Record<string, never>\";\n\treturn `{ ${Object.entries(roots).map(([key, value]) => `readonly ${serializeObjectKey(key)}: ${serializeCrossReference(value)}`).join(\"; \")} }`;\n}\nfunction contractFieldModifierSuffix(field) {\n\treturn (field.many === true ? \"; readonly many: true\" : \"\") + (field.dict === true ? \"; readonly dict: true\" : \"\");\n}\nfunction generateModelFieldEntry(fieldName, field) {\n\tconst mods = contractFieldModifierSuffix(field);\n\tconst { nullable, type } = field;\n\tif (type.kind === \"scalar\") {\n\t\tconst typeParamsSpec = type.typeParams && Object.keys(type.typeParams).length > 0 ? `; readonly typeParams: ${serializeValue(type.typeParams)}` : \"\";\n\t\treturn `readonly ${serializeObjectKey(fieldName)}: { readonly nullable: ${nullable}; readonly type: { readonly kind: \"scalar\"; readonly codecId: ${serializeValue(type.codecId)}${typeParamsSpec} }${mods} }`;\n\t}\n\tif (type.kind === \"valueObject\") return `readonly ${serializeObjectKey(fieldName)}: { readonly nullable: ${nullable}; readonly type: { readonly kind: \"valueObject\"; readonly name: ${serializeValue(type.name)} }${mods} }`;\n\treturn `readonly ${serializeObjectKey(fieldName)}: { readonly nullable: ${nullable}; readonly type: ${serializeValue(type)}${mods} }`;\n}\nfunction generateModelFieldsType(fields) {\n\tconst fieldEntries = [];\n\tfor (const [fieldName, field] of Object.entries(fields)) fieldEntries.push(generateModelFieldEntry(fieldName, field));\n\treturn fieldEntries.length > 0 ? `{ ${fieldEntries.join(\"; \")} }` : \"Record<string, never>\";\n}\nfunction generateModelRelationsType(relations) {\n\tconst relationEntries = [];\n\tfor (const [relName, rel] of Object.entries(relations)) {\n\t\tif (typeof rel !== \"object\" || rel === null) continue;\n\t\tconst relObj = rel;\n\t\tconst toRef = relObj[\"to\"];\n\t\tif (toRef !== null && typeof toRef === \"object\" && \"space\" in toRef && toRef.space !== void 0) {\n\t\t\trelationEntries.push(`readonly ${serializeObjectKey(relName)}: never`);\n\t\t\tcontinue;\n\t\t}\n\t\tconst parts = [];\n\t\tif (toRef) parts.push(`readonly to: ${serializeCrossReference(blindCast(toRef))}`);\n\t\tif (relObj[\"cardinality\"]) parts.push(`readonly cardinality: ${serializeValue(relObj[\"cardinality\"])}`);\n\t\tif (typeof relObj[\"nullable\"] === \"boolean\") parts.push(`readonly nullable: ${relObj[\"nullable\"]}`);\n\t\tconst on = relObj[\"on\"];\n\t\tif (on && (!on.localFields || !on.targetFields)) throw emitterError(\"CONTRACT.RELATION_INVALID\", `Relation \"${relName}\" has an \"on\" block but is missing localFields or targetFields`, { meta: { relation: relName } });\n\t\tif (on?.localFields && on.targetFields) {\n\t\t\tconst localFields = on.localFields.map((f) => serializeValue(f)).join(\", \");\n\t\t\tconst targetFields = on.targetFields.map((f) => serializeValue(f)).join(\", \");\n\t\t\tparts.push(`readonly on: { readonly localFields: readonly [${localFields}]; readonly targetFields: readonly [${targetFields}] }`);\n\t\t}\n\t\tif (relObj[\"cardinality\"] === \"N:M\") {\n\t\t\tconst { through } = blindCast(relObj);\n\t\t\tconst table = serializeValue(through.table);\n\t\t\tconst namespaceId = serializeValue(through.namespaceId);\n\t\t\tconst parentColumns = through.parentColumns.map((c) => serializeValue(c)).join(\", \");\n\t\t\tconst childColumns = through.childColumns.map((c) => serializeValue(c)).join(\", \");\n\t\t\tconst targetColumns = through.targetColumns.map((c) => serializeValue(c)).join(\", \");\n\t\t\tparts.push(`readonly through: { readonly table: ${table}; readonly namespaceId: ${namespaceId}; readonly parentColumns: readonly [${parentColumns}]; readonly childColumns: readonly [${childColumns}]; readonly targetColumns: readonly [${targetColumns}] }`);\n\t\t}\n\t\tif (parts.length > 0) relationEntries.push(`readonly ${serializeObjectKey(relName)}: { ${parts.join(\"; \")} }`);\n\t}\n\tif (relationEntries.length === 0) return \"Record<string, never>\";\n\treturn `{ ${relationEntries.join(\"; \")} }`;\n}\nfunction generateModelsType(models, generateModelStorage) {\n\tif (!models || Object.keys(models).length === 0) return \"Record<string, never>\";\n\tconst modelTypes = [];\n\tfor (const [modelName, model] of Object.entries(models).sort(([a], [b]) => a.localeCompare(b))) {\n\t\tconst fieldsType = generateModelFieldsType(model.fields);\n\t\tconst relationsType = generateModelRelationsType(model.relations);\n\t\tconst storageType = generateModelStorage(modelName, model);\n\t\tconst modelParts = [\n\t\t\t`readonly fields: ${fieldsType}`,\n\t\t\t`readonly relations: ${relationsType}`,\n\t\t\t`readonly storage: ${storageType}`\n\t\t];\n\t\tif (model.owner) modelParts.push(`readonly owner: ${serializeValue(model.owner)}`);\n\t\tif (model.discriminator) modelParts.push(`readonly discriminator: ${serializeValue(model.discriminator)}`);\n\t\tif (model.variants) modelParts.push(`readonly variants: ${serializeValue(model.variants)}`);\n\t\tif (model.base) modelParts.push(`readonly base: ${serializeCrossReference(model.base)}`);\n\t\tmodelTypes.push(`readonly ${serializeObjectKey(modelName)}: { ${modelParts.join(\"; \")} }`);\n\t}\n\treturn `{ ${modelTypes.join(\"; \")} }`;\n}\nfunction deduplicateImports(imports) {\n\tconst seenKeys = /* @__PURE__ */ new Set();\n\tconst result = [];\n\tfor (const imp of imports) {\n\t\tconst key = `${imp.package}::${imp.named}`;\n\t\tif (!seenKeys.has(key)) {\n\t\t\tseenKeys.add(key);\n\t\t\tresult.push(imp);\n\t\t}\n\t}\n\treturn result;\n}\nfunction generateImportLines(imports, resolveImportSpecifier = keepInternalSpecifiers) {\n\tconst rendered = renderImports(imports.map((imp) => ({\n\t\tmoduleSpecifier: resolveImportSpecifier(imp.package),\n\t\tsymbol: imp.named,\n\t\talias: imp.alias,\n\t\ttypeOnly: true\n\t})));\n\treturn rendered === \"\" ? [] : rendered.split(\"\\n\");\n}\nfunction generateCodecTypeIntersection(imports, named) {\n\treturn imports.filter((imp) => imp.named === named).map((imp) => imp.alias).join(\" & \") || \"Record<string, never>\";\n}\nfunction serializeExecutionType(execution) {\n\tconst parts = [\"readonly executionHash: ExecutionHash\"];\n\tfor (const [key, value] of Object.entries(execution)) {\n\t\tif (key === \"executionHash\") continue;\n\t\tparts.push(`readonly ${serializeObjectKey(key)}: ${serializeValue(value)}`);\n\t}\n\treturn `{ ${parts.join(\"; \")} }`;\n}\nfunction generateHashTypeAliases(hashes) {\n\tconst executionHashType = hashes.executionHash ? `ExecutionHashBase<${serializeValue(hashes.executionHash)}>` : \"ExecutionHashBase<string>\";\n\treturn [\n\t\t`export type StorageHash = StorageHashBase<${serializeValue(hashes.storageHash)}>;`,\n\t\t`export type ExecutionHash = ${executionHashType};`,\n\t\t`export type ProfileHash = ProfileHashBase<${serializeValue(hashes.profileHash)}>;`\n\t].join(\"\\n\");\n}\nfunction applyModifiers(base, field) {\n\tlet result = base;\n\tif (field.many === true) result = `ReadonlyArray<${result}>`;\n\tif (field.dict === true) result = `Readonly<Record<string, ${result}>>`;\n\tif (field.nullable) result = `${result} | null`;\n\treturn result;\n}\n/**\n* Renders a value set (a field/column's permitted values, codec-encoded) into a TS literal union by\n* routing **each** value through the codec's `renderValueLiteral` — the seam owned by the codec, not\n* a generic serializer. `side`: `output` = read type, `input` = create/update type.\n*\n* Returns `undefined` — signalling the caller to fall back to the codec's full output type — when\n* the lookup is absent, has no `renderValueLiteralFor`, the value set is empty, or **any** value\n* isn't literal-expressible. A caller that needs column and field types to agree shares this so both\n* compute the union identically.\n*/\nfunction renderValueSetType(values, codecId, side, codecLookup) {\n\tif (values.length === 0 || codecLookup?.renderValueLiteralFor === void 0) return void 0;\n\tconst literals = [];\n\tfor (const value of values) {\n\t\tconst lit = codecLookup.renderValueLiteralFor(codecId, value, side);\n\t\tif (lit === void 0 || !isSafeTypeExpression(lit)) return void 0;\n\t\tliterals.push(lit);\n\t}\n\treturn literals.join(\" | \");\n}\nfunction resolveFieldType(field, codecLookup, resolvedTypeParams, resolvedValueSet) {\n\tconst { type } = field;\n\tswitch (type.kind) {\n\t\tcase \"scalar\": {\n\t\t\tif (resolvedValueSet) {\n\t\t\t\tconst output = renderValueSetType(resolvedValueSet.encodedValues, resolvedValueSet.codecId, \"output\", codecLookup);\n\t\t\t\tconst input = renderValueSetType(resolvedValueSet.encodedValues, resolvedValueSet.codecId, \"input\", codecLookup);\n\t\t\t\tif (output !== void 0 && input !== void 0) return {\n\t\t\t\t\toutput: applyModifiers(output, field),\n\t\t\t\t\tinput: applyModifiers(input, field)\n\t\t\t\t};\n\t\t\t}\n\t\t\tlet outputResolved;\n\t\t\tlet inputResolved;\n\t\t\tconst effectiveTypeParams = (type.typeParams && Object.keys(type.typeParams).length > 0 ? type.typeParams : void 0) ?? resolvedTypeParams;\n\t\t\tif (codecLookup && effectiveTypeParams && Object.keys(effectiveTypeParams).length > 0) {\n\t\t\t\tconst rendered = codecLookup.renderOutputTypeFor(type.codecId, effectiveTypeParams);\n\t\t\t\tif (rendered && isSafeTypeExpression(rendered)) outputResolved = rendered;\n\t\t\t\tconst renderedInput = codecLookup.renderInputTypeFor?.(type.codecId, effectiveTypeParams);\n\t\t\t\tif (renderedInput && isSafeTypeExpression(renderedInput)) inputResolved = renderedInput;\n\t\t\t}\n\t\t\tconst codecAccessor = `CodecTypes[${serializeValue(type.codecId)}]`;\n\t\t\treturn {\n\t\t\t\toutput: applyModifiers(outputResolved ?? `${codecAccessor}[\"output\"]`, field),\n\t\t\t\tinput: applyModifiers(inputResolved ?? `${codecAccessor}[\"input\"]`, field)\n\t\t\t};\n\t\t}\n\t\tcase \"valueObject\": return {\n\t\t\toutput: applyModifiers(`${type.name}Output`, field),\n\t\t\tinput: applyModifiers(`${type.name}Input`, field)\n\t\t};\n\t\tcase \"union\": {\n\t\t\tconst outputMembers = type.members.map((m) => m.kind === \"scalar\" ? `CodecTypes[${serializeValue(m.codecId)}][\"output\"]` : `${m.name}Output`);\n\t\t\tconst inputMembers = type.members.map((m) => m.kind === \"scalar\" ? `CodecTypes[${serializeValue(m.codecId)}][\"input\"]` : `${m.name}Input`);\n\t\t\treturn {\n\t\t\t\toutput: applyModifiers(outputMembers.join(\" | \"), field),\n\t\t\t\tinput: applyModifiers(inputMembers.join(\" | \"), field)\n\t\t\t};\n\t\t}\n\t\tdefault: return {\n\t\t\toutput: applyModifiers(\"unknown\", field),\n\t\t\tinput: applyModifiers(\"unknown\", field)\n\t\t};\n\t}\n}\nfunction generateFieldResolvedType(field, codecLookup, side = \"output\") {\n\treturn resolveFieldType(field, codecLookup)[side];\n}\n/**\n* Resolves one model field's input and output types the way `FieldOutputTypes` /\n* `FieldInputTypes` do: inline type params win over the family resolver, and a family-resolved\n* value set renders as a literal union.\n*/\nfunction resolveModelFieldType(modelName, fieldName, field, model, resolvers) {\n\tconst resolvedTypeParams = (field.type.kind === \"scalar\" && field.type.typeParams && Object.keys(field.type.typeParams).length > 0 ? field.type.typeParams : void 0) ?? resolvers.resolveFieldTypeParams?.(modelName, fieldName, model);\n\tconst resolvedValueSet = resolvers.resolveFieldValueSet?.(modelName, fieldName, model);\n\treturn resolveFieldType(field, resolvers.codecLookup, resolvedTypeParams, resolvedValueSet);\n}\nfunction generateBothFieldTypesMaps(models, codecLookup, resolveFieldTypeParams, resolveFieldValueSet) {\n\tif (!models || Object.keys(models).length === 0) return {\n\t\toutput: \"Record<string, never>\",\n\t\tinput: \"Record<string, never>\"\n\t};\n\tconst resolvers = {\n\t\tcodecLookup,\n\t\tresolveFieldTypeParams,\n\t\tresolveFieldValueSet\n\t};\n\tconst outputModelEntries = [];\n\tconst inputModelEntries = [];\n\tfor (const [modelName, model] of Object.entries(models).sort(([a], [b]) => a.localeCompare(b))) {\n\t\tif (!model) continue;\n\t\tconst outputFieldEntries = [];\n\t\tconst inputFieldEntries = [];\n\t\tfor (const [fieldName, field] of Object.entries(model.fields)) {\n\t\t\tconst resolved = resolveModelFieldType(modelName, fieldName, field, model, resolvers);\n\t\t\tconst key = `readonly ${serializeObjectKey(fieldName)}`;\n\t\t\toutputFieldEntries.push(`${key}: ${resolved.output}`);\n\t\t\tinputFieldEntries.push(`${key}: ${resolved.input}`);\n\t\t}\n\t\tconst outputFields = outputFieldEntries.length > 0 ? `{ ${outputFieldEntries.join(\"; \")} }` : \"Record<string, never>\";\n\t\tconst inputFields = inputFieldEntries.length > 0 ? `{ ${inputFieldEntries.join(\"; \")} }` : \"Record<string, never>\";\n\t\tconst modelKey = `readonly ${serializeObjectKey(modelName)}`;\n\t\toutputModelEntries.push(`${modelKey}: ${outputFields}`);\n\t\tinputModelEntries.push(`${modelKey}: ${inputFields}`);\n\t}\n\treturn {\n\t\toutput: `{ ${outputModelEntries.join(\"; \")} }`,\n\t\tinput: `{ ${inputModelEntries.join(\"; \")} }`\n\t};\n}\nfunction generateFieldTypesMapsByNamespace(namespaceModels, codecLookup, resolveFieldTypeParams, resolveFieldValueSet) {\n\tif (namespaceModels.length === 0) return {\n\t\toutput: \"Record<string, never>\",\n\t\tinput: \"Record<string, never>\"\n\t};\n\tconst outputNamespaceEntries = [];\n\tconst inputNamespaceEntries = [];\n\tfor (const [nsId, models] of namespaceModels) {\n\t\tconst inner = generateBothFieldTypesMaps(models, codecLookup, resolveFieldTypeParams, resolveFieldValueSet);\n\t\tconst nsKey = `readonly ${serializeObjectKey(nsId)}`;\n\t\toutputNamespaceEntries.push(`${nsKey}: ${inner.output}`);\n\t\tinputNamespaceEntries.push(`${nsKey}: ${inner.input}`);\n\t}\n\treturn {\n\t\toutput: `{ ${outputNamespaceEntries.join(\"; \")} }`,\n\t\tinput: `{ ${inputNamespaceEntries.join(\"; \")} }`\n\t};\n}\nfunction generateFieldOutputTypesMap(models, codecLookup, resolveFieldTypeParams) {\n\treturn generateBothFieldTypesMaps(models, codecLookup, resolveFieldTypeParams).output;\n}\nfunction generateFieldInputTypesMap(models, codecLookup, resolveFieldTypeParams) {\n\treturn generateBothFieldTypesMaps(models, codecLookup, resolveFieldTypeParams).input;\n}\nfunction generateValueObjectType(_voName, vo, _valueObjects, side = \"output\", codecLookup) {\n\treturn resolveValueObjectType(_voName, vo, _valueObjects, codecLookup)[side];\n}\nfunction resolveValueObjectType(_voName, vo, _valueObjects, codecLookup) {\n\tconst outputEntries = [];\n\tconst inputEntries = [];\n\tfor (const [fieldName, field] of Object.entries(vo.fields)) {\n\t\tconst resolved = resolveFieldType(field, codecLookup);\n\t\tconst key = `readonly ${serializeObjectKey(fieldName)}`;\n\t\toutputEntries.push(`${key}: ${resolved.output}`);\n\t\tinputEntries.push(`${key}: ${resolved.input}`);\n\t}\n\tconst empty = \"Record<string, never>\";\n\treturn {\n\t\toutput: outputEntries.length > 0 ? `{ ${outputEntries.join(\"; \")} }` : empty,\n\t\tinput: inputEntries.length > 0 ? `{ ${inputEntries.join(\"; \")} }` : empty\n\t};\n}\nfunction generateContractFieldDescriptor(fieldName, field) {\n\tconst mods = [];\n\tif (field.many === true) mods.push(\"; readonly many: true\");\n\tif (field.dict === true) mods.push(\"; readonly dict: true\");\n\tconst modStr = mods.join(\"\");\n\tconst { type } = field;\n\tif (type.kind === \"scalar\") {\n\t\tconst typeParamsSpec = type.typeParams && Object.keys(type.typeParams).length > 0 ? `; readonly typeParams: ${serializeValue(type.typeParams)}` : \"\";\n\t\treturn `readonly ${serializeObjectKey(fieldName)}: { readonly nullable: ${field.nullable}; readonly type: { readonly kind: \"scalar\"; readonly codecId: ${serializeValue(type.codecId)}${typeParamsSpec} }${modStr} }`;\n\t}\n\tif (type.kind === \"valueObject\") return `readonly ${serializeObjectKey(fieldName)}: { readonly nullable: ${field.nullable}; readonly type: { readonly kind: \"valueObject\"; readonly name: ${serializeValue(type.name)} }${modStr} }`;\n\treturn `readonly ${serializeObjectKey(fieldName)}: { readonly nullable: ${field.nullable}; readonly type: ${serializeValue(type)}${modStr} }`;\n}\nfunction generateValueObjectsDescriptorType(valueObjects) {\n\tif (!valueObjects || Object.keys(valueObjects).length === 0) return \"Record<string, never>\";\n\tconst voEntries = [];\n\tfor (const [voName, vo] of Object.entries(valueObjects)) {\n\t\tconst fieldEntries = [];\n\t\tfor (const [fieldName, field] of Object.entries(vo.fields)) fieldEntries.push(generateContractFieldDescriptor(fieldName, field));\n\t\tconst fieldsType = fieldEntries.length > 0 ? `{ ${fieldEntries.join(\"; \")} }` : \"Record<string, never>\";\n\t\tvoEntries.push(`readonly ${serializeObjectKey(voName)}: { readonly fields: ${fieldsType} }`);\n\t}\n\treturn `{ ${voEntries.join(\"; \")} }`;\n}\nfunction generateValueObjectTypeAliases(valueObjects, codecLookup) {\n\tif (!valueObjects || Object.keys(valueObjects).length === 0) return \"\";\n\tconst aliases = [];\n\tfor (const [voName, vo] of Object.entries(valueObjects)) {\n\t\tconst resolved = resolveValueObjectType(voName, vo, valueObjects, codecLookup);\n\t\taliases.push(`export type ${voName}Output = ${resolved.output};`);\n\t\taliases.push(`export type ${voName}Input = ${resolved.input};`);\n\t}\n\treturn aliases.join(\"\\n\");\n}\n//#endregion\nexport { serializeCrossReference as C, serializeValue as D, serializeObjectKey as E, emitterError as O, resolveValueObjectType as S, serializeNamespaceId as T, generateValueObjectTypeAliases as _, generateFieldInputTypesMap as a, resolveFieldType as b, generateFieldTypesMapsByNamespace as c, generateModelFieldEntry as d, generateModelFieldsType as f, generateValueObjectType as g, generateRootsType as h, generateContractFieldDescriptor as i, generateHashTypeAliases as l, generateModelsType as m, generateBothFieldTypesMaps as n, generateFieldOutputTypesMap as o, generateModelRelationsType as p, generateCodecTypeIntersection as r, generateFieldResolvedType as s, deduplicateImports as t, generateImportLines as u, generateValueObjectsDescriptorType as v, serializeExecutionType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,mBAAmB,MAAM,EAAE,uBAAuB,WAAW,GAAG;CAC5F;CACA,OAAO,KAAK,UAAU,KAAK,IAAI,EAAE;AAClC;AACA,SAAS,+BAA+B,cAAc,aAAa;CAClE,IAAI,CAAC,gBAAgB,OAAO,KAAK,YAAY,CAAC,CAAC,WAAW,GAAG,OAAO;CACpE,MAAM,UAAU,CAAC;CACjB,KAAK,MAAM,CAAC,QAAQ,OAAO,OAAO,QAAQ,YAAY,GAAG;EACxD,MAAM,WAAW,uBAAuB,QAAQ,IAAI,cAAc,WAAW;EAC7E,QAAQ,KAAK,eAAe,OAAO,WAAW,SAAS,OAAO,EAAE;EAChE,QAAQ,KAAK,eAAe,OAAO,UAAU,SAAS,MAAM,EAAE;CAC/D;CACA,OAAO,QAAQ,KAAK,IAAI;AACzB"}
@@ -1,7 +1,7 @@
1
1
  import { ImportSpecifierResolver, TypesImportSpec } from "@prisma/orm-framework/components/emission";
2
2
  import { ContractField, ContractModelBase, ContractValueObject, CrossReference, JsonValue } from "@prisma/orm-framework/contract/types";
3
3
  import { CodecLookup } from "@prisma/orm-framework/components/codec";
4
- //#region ../../../1-framework/3-tooling/emitter/dist/domain-type-generation-PkAb39ob.d.mts
4
+ //#region ../../../1-framework/3-tooling/emitter/dist/domain-type-generation-X6-AaL1U.d.mts
5
5
  //#region src/domain-type-generation.d.ts
6
6
  declare function serializeValue(value: unknown): string;
7
7
  declare function serializeObjectKey(key: string): string;
@@ -49,6 +49,17 @@ type FieldValueSetResolver = (modelName: string, fieldName: string, model: Contr
49
49
  declare function renderValueSetType(values: readonly JsonValue[], codecId: string, side: 'output' | 'input', codecLookup: CodecLookup | undefined): string | undefined;
50
50
  declare function resolveFieldType(field: ContractField, codecLookup?: CodecLookup, resolvedTypeParams?: Record<string, unknown>, resolvedValueSet?: ResolvedFieldValueSet): ResolvedFieldType;
51
51
  declare function generateFieldResolvedType(field: ContractField, codecLookup?: CodecLookup, side?: 'input' | 'output'): string;
52
+ type ModelFieldTypeResolvers = {
53
+ readonly codecLookup: CodecLookup | undefined;
54
+ readonly resolveFieldTypeParams: FieldTypeParamsResolver | undefined;
55
+ readonly resolveFieldValueSet: FieldValueSetResolver | undefined;
56
+ };
57
+ /**
58
+ * Resolves one model field's input and output types the way `FieldOutputTypes` /
59
+ * `FieldInputTypes` do: inline type params win over the family resolver, and a family-resolved
60
+ * value set renders as a literal union.
61
+ */
62
+ declare function resolveModelFieldType(modelName: string, fieldName: string, field: ContractField, model: ContractModelBase, resolvers: ModelFieldTypeResolvers): ResolvedFieldType;
52
63
  declare function generateBothFieldTypesMaps(models: Record<string, ContractModelBase> | undefined, codecLookup?: CodecLookup, resolveFieldTypeParams?: FieldTypeParamsResolver, resolveFieldValueSet?: FieldValueSetResolver): ResolvedFieldType;
53
64
  declare function generateFieldTypesMapsByNamespace(namespaceModels: ReadonlyArray<readonly [string, Record<string, ContractModelBase>]>, codecLookup?: CodecLookup, resolveFieldTypeParams?: FieldTypeParamsResolver, resolveFieldValueSet?: FieldValueSetResolver): ResolvedFieldType;
54
65
  declare function generateFieldOutputTypesMap(models: Record<string, ContractModelBase> | undefined, codecLookup?: CodecLookup, resolveFieldTypeParams?: FieldTypeParamsResolver): string;
@@ -59,5 +70,5 @@ declare function generateContractFieldDescriptor(fieldName: string, field: Contr
59
70
  declare function generateValueObjectsDescriptorType(valueObjects: Record<string, ContractValueObject> | undefined): string;
60
71
  declare function generateValueObjectTypeAliases(valueObjects: Record<string, ContractValueObject> | undefined, codecLookup?: CodecLookup): string;
61
72
  //#endregion
62
- export { serializeValue as A, renderValueSetType as C, serializeExecutionType as D, serializeCrossReference as E, serializeNamespaceId as O, generateValueObjectsDescriptorType as S, resolveValueObjectType as T, generateModelRelationsType as _, deduplicateImports as a, generateValueObjectType as b, generateContractFieldDescriptor as c, generateFieldResolvedType as d, generateFieldTypesMapsByNamespace as f, generateModelFieldsType as g, generateModelFieldEntry as h, ResolvedFieldValueSet as i, serializeObjectKey as k, generateFieldInputTypesMap as l, generateImportLines as m, FieldValueSetResolver as n, generateBothFieldTypesMaps as o, generateHashTypeAliases as p, ResolvedFieldType as r, generateCodecTypeIntersection as s, FieldTypeParamsResolver as t, generateFieldOutputTypesMap as u, generateModelsType as v, resolveFieldType as w, generateValueObjectTypeAliases as x, generateRootsType as y };
63
- //# sourceMappingURL=domain-type-generation-PkAb39ob-Ct8AGqow.d.mts.map
73
+ export { serializeNamespaceId as A, generateValueObjectsDescriptorType as C, resolveValueObjectType as D, resolveModelFieldType as E, serializeValue as M, serializeCrossReference as O, generateValueObjectTypeAliases as S, resolveFieldType as T, generateModelFieldsType as _, ResolvedFieldValueSet as a, generateRootsType as b, generateCodecTypeIntersection as c, generateFieldOutputTypesMap as d, generateFieldResolvedType as f, generateModelFieldEntry as g, generateImportLines as h, ResolvedFieldType as i, serializeObjectKey as j, serializeExecutionType as k, generateContractFieldDescriptor as l, generateHashTypeAliases as m, FieldValueSetResolver as n, deduplicateImports as o, generateFieldTypesMapsByNamespace as p, ModelFieldTypeResolvers as r, generateBothFieldTypesMaps as s, FieldTypeParamsResolver as t, generateFieldInputTypesMap as u, generateModelRelationsType as v, renderValueSetType as w, generateValueObjectType as x, generateModelsType as y };
74
+ //# sourceMappingURL=domain-type-generation-X6-AaL1U-DHEoRf_y.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domain-type-generation-X6-AaL1U-DHEoRf_y.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/emitter/dist/domain-type-generation-X6-AaL1U.d.mts"],"mappings":";;;;;iBAIiB,eAAe;iBACf,mBAAmB;iBACnB,qBAAqB;iBACrB,wBAAwB,KAAK;iBAC7B,kBAAkB,OAAO,eAAe;iBACxC,wBAAwB,mBAAmB,OAAO;iBAClD,wBAAwB,QAAQ,eAAe;iBAC/C,2BAA2B,WAAW;iBACtC,mBAAmB,QAAQ,eAAe,oBAAoB,uBAAuB,mBAAmB,OAAO;iBAC/G,mBAAmB,SAAS,oBAAoB;iBAChD,oBAAoB,SAAS,mBAAmB,yBAAyB;iBACzE,8BAA8B,SAAS,cAAc,kBAAkB;iBACvE,uBAAuB,WAAW;iBAClC,wBAAwB;WAC9B;WACA;WACA;;KAEN;WACM;WACA;;KAEN,2BAA2B,mBAAmB,mBAAmB,OAAO,sBAAsB;;;;;;KAM9F;WACM,wBAAwB;WACxB;;KAEN,yBAAyB,mBAAmB,mBAAmB,OAAO,sBAAsB;;;;;;;;;;;iBAWhF,mBAAmB,iBAAiB,aAAa,iBAAiB,0BAA0B,aAAa;iBACzG,iBAAiB,OAAO,eAAe,cAAc,aAAa,qBAAqB,yBAAyB,mBAAmB,wBAAwB;iBAC3J,0BAA0B,OAAO,eAAe,cAAc,aAAa;KACvF;WACM,aAAa;WACb,wBAAwB;WACxB,sBAAsB;;;;;;;iBAOhB,sBAAsB,mBAAmB,mBAAmB,OAAO,eAAe,OAAO,mBAAmB,WAAW,0BAA0B;iBACjJ,2BAA2B,QAAQ,eAAe,gCAAgC,cAAc,aAAa,yBAAyB,yBAAyB,uBAAuB,wBAAwB;iBAC9M,kCAAkC,iBAAiB,gCAAgC,eAAe,sBAAsB,cAAc,aAAa,yBAAyB,yBAAyB,uBAAuB,wBAAwB;iBACpP,4BAA4B,QAAQ,eAAe,gCAAgC,cAAc,aAAa,yBAAyB;iBACvI,2BAA2B,QAAQ,eAAe,gCAAgC,cAAc,aAAa,yBAAyB;iBACtI,wBAAwB,iBAAiB,IAAI,qBAAqB,eAAe,eAAe,sBAAsB,2BAA2B,cAAc;iBAC/J,uBAAuB,iBAAiB,IAAI,qBAAqB,eAAe,eAAe,sBAAsB,cAAc,cAAc;iBACjJ,gCAAgC,mBAAmB,OAAO;iBAC1D,mCAAmC,cAAc,eAAe;iBAChE,+BAA+B,cAAc,eAAe,kCAAkC,cAAc"}
@@ -1,3 +1,3 @@
1
- import { A as serializeValue, _ as generateModelRelationsType, a as deduplicateImports, k as serializeObjectKey, m as generateImportLines, p as generateHashTypeAliases, s as generateCodecTypeIntersection, u as generateFieldOutputTypesMap, y as generateRootsType } from "./domain-type-generation-PkAb39ob-Ct8AGqow.mjs";
2
- import { a as emit, i as EmittedArtifactPaths, n as EmitResult, o as generateContractDts, r as EmitStackInput, s as getEmittedArtifactPaths, t as EmitOptions } from "./index-Dgwl8Tzs.mjs";
1
+ import { M as serializeValue, b as generateRootsType, c as generateCodecTypeIntersection, d as generateFieldOutputTypesMap, h as generateImportLines, j as serializeObjectKey, m as generateHashTypeAliases, o as deduplicateImports, v as generateModelRelationsType } from "./domain-type-generation-X6-AaL1U-DHEoRf_y.mjs";
2
+ import { a as emit, i as EmittedArtifactPaths, n as EmitResult, o as generateContractDts, r as EmitStackInput, s as getEmittedArtifactPaths, t as EmitOptions } from "./index-D217lbiW.mjs";
3
3
  export { type EmitOptions, type EmitResult, type EmitStackInput, type EmittedArtifactPaths, deduplicateImports, emit, generateCodecTypeIntersection, generateContractDts, generateFieldOutputTypesMap, generateHashTypeAliases, generateImportLines, generateModelRelationsType, generateRootsType, getEmittedArtifactPaths, serializeObjectKey, serializeValue };
package/dist/emitter.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { D as serializeValue, E as serializeObjectKey, d as generateImportLines, g as generateRootsType, i as generateCodecTypeIntersection, m as generateModelRelationsType, s as generateFieldOutputTypesMap, t as deduplicateImports, u as generateHashTypeAliases } from "./domain-type-generation-bpSO3Y0L-jo2C7LlH.mjs";
2
- import { n as generateContractDts, r as getEmittedArtifactPaths, t as emit } from "./exports-Dw2WIX63-CQgI2e_L.mjs";
1
+ import { D as serializeObjectKey, O as serializeValue, d as generateImportLines, g as generateRootsType, i as generateCodecTypeIntersection, m as generateModelRelationsType, s as generateFieldOutputTypesMap, t as deduplicateImports, u as generateHashTypeAliases } from "./domain-type-generation-CR9ECUau-DOlKbcaE.mjs";
2
+ import { n as generateContractDts, r as getEmittedArtifactPaths, t as emit } from "./exports-CE6OD63o-4Qpqr2W7.mjs";
3
3
  export { deduplicateImports, emit, generateCodecTypeIntersection, generateContractDts, generateFieldOutputTypesMap, generateHashTypeAliases, generateImportLines, generateModelRelationsType, generateRootsType, getEmittedArtifactPaths, serializeObjectKey, serializeValue };
@@ -1,2 +1,2 @@
1
- import { A as serializeValue, C as renderValueSetType, D as serializeExecutionType, E as serializeCrossReference, O as serializeNamespaceId, S as generateValueObjectsDescriptorType, T as resolveValueObjectType, _ as generateModelRelationsType, a as deduplicateImports, b as generateValueObjectType, c as generateContractFieldDescriptor, d as generateFieldResolvedType, f as generateFieldTypesMapsByNamespace, g as generateModelFieldsType, h as generateModelFieldEntry, i as ResolvedFieldValueSet, k as serializeObjectKey, l as generateFieldInputTypesMap, m as generateImportLines, n as FieldValueSetResolver, o as generateBothFieldTypesMaps, p as generateHashTypeAliases, r as ResolvedFieldType, s as generateCodecTypeIntersection, t as FieldTypeParamsResolver, u as generateFieldOutputTypesMap, v as generateModelsType, w as resolveFieldType, x as generateValueObjectTypeAliases, y as generateRootsType } from "./domain-type-generation-PkAb39ob-Ct8AGqow.mjs";
2
- export { FieldTypeParamsResolver, FieldValueSetResolver, ResolvedFieldType, ResolvedFieldValueSet, deduplicateImports, generateBothFieldTypesMaps, generateCodecTypeIntersection, generateContractFieldDescriptor, generateFieldInputTypesMap, generateFieldOutputTypesMap, generateFieldResolvedType, generateFieldTypesMapsByNamespace, generateHashTypeAliases, generateImportLines, generateModelFieldEntry, generateModelFieldsType, generateModelRelationsType, generateModelsType, generateRootsType, generateValueObjectType, generateValueObjectTypeAliases, generateValueObjectsDescriptorType, renderValueSetType, resolveFieldType, resolveValueObjectType, serializeCrossReference, serializeExecutionType, serializeNamespaceId, serializeObjectKey, serializeValue };
1
+ import { A as serializeNamespaceId, C as generateValueObjectsDescriptorType, D as resolveValueObjectType, E as resolveModelFieldType, M as serializeValue, O as serializeCrossReference, S as generateValueObjectTypeAliases, T as resolveFieldType, _ as generateModelFieldsType, a as ResolvedFieldValueSet, b as generateRootsType, c as generateCodecTypeIntersection, d as generateFieldOutputTypesMap, f as generateFieldResolvedType, g as generateModelFieldEntry, h as generateImportLines, i as ResolvedFieldType, j as serializeObjectKey, k as serializeExecutionType, l as generateContractFieldDescriptor, m as generateHashTypeAliases, n as FieldValueSetResolver, o as deduplicateImports, p as generateFieldTypesMapsByNamespace, r as ModelFieldTypeResolvers, s as generateBothFieldTypesMaps, t as FieldTypeParamsResolver, u as generateFieldInputTypesMap, v as generateModelRelationsType, w as renderValueSetType, x as generateValueObjectType, y as generateModelsType } from "./domain-type-generation-X6-AaL1U-DHEoRf_y.mjs";
2
+ export { FieldTypeParamsResolver, FieldValueSetResolver, ModelFieldTypeResolvers, ResolvedFieldType, ResolvedFieldValueSet, deduplicateImports, generateBothFieldTypesMaps, generateCodecTypeIntersection, generateContractFieldDescriptor, generateFieldInputTypesMap, generateFieldOutputTypesMap, generateFieldResolvedType, generateFieldTypesMapsByNamespace, generateHashTypeAliases, generateImportLines, generateModelFieldEntry, generateModelFieldsType, generateModelRelationsType, generateModelsType, generateRootsType, generateValueObjectType, generateValueObjectTypeAliases, generateValueObjectsDescriptorType, renderValueSetType, resolveFieldType, resolveModelFieldType, resolveValueObjectType, serializeCrossReference, serializeExecutionType, serializeNamespaceId, serializeObjectKey, serializeValue };
@@ -1,2 +1,2 @@
1
- import { C as serializeCrossReference, D as serializeValue, E as serializeObjectKey, S as resolveValueObjectType, T as serializeNamespaceId, _ as generateValueObjectType, a as generateContractFieldDescriptor, b as renderValueSetType, c as generateFieldResolvedType, d as generateImportLines, f as generateModelFieldEntry, g as generateRootsType, h as generateModelsType, i as generateCodecTypeIntersection, l as generateFieldTypesMapsByNamespace, m as generateModelRelationsType, o as generateFieldInputTypesMap, p as generateModelFieldsType, r as generateBothFieldTypesMaps, s as generateFieldOutputTypesMap, t as deduplicateImports, u as generateHashTypeAliases, v as generateValueObjectTypeAliases, w as serializeExecutionType, x as resolveFieldType, y as generateValueObjectsDescriptorType } from "./domain-type-generation-bpSO3Y0L-jo2C7LlH.mjs";
2
- export { deduplicateImports, generateBothFieldTypesMaps, generateCodecTypeIntersection, generateContractFieldDescriptor, generateFieldInputTypesMap, generateFieldOutputTypesMap, generateFieldResolvedType, generateFieldTypesMapsByNamespace, generateHashTypeAliases, generateImportLines, generateModelFieldEntry, generateModelFieldsType, generateModelRelationsType, generateModelsType, generateRootsType, generateValueObjectType, generateValueObjectTypeAliases, generateValueObjectsDescriptorType, renderValueSetType, resolveFieldType, resolveValueObjectType, serializeCrossReference, serializeExecutionType, serializeNamespaceId, serializeObjectKey, serializeValue };
1
+ import { C as resolveValueObjectType, D as serializeObjectKey, E as serializeNamespaceId, O as serializeValue, S as resolveModelFieldType, T as serializeExecutionType, _ as generateValueObjectType, a as generateContractFieldDescriptor, b as renderValueSetType, c as generateFieldResolvedType, d as generateImportLines, f as generateModelFieldEntry, g as generateRootsType, h as generateModelsType, i as generateCodecTypeIntersection, l as generateFieldTypesMapsByNamespace, m as generateModelRelationsType, o as generateFieldInputTypesMap, p as generateModelFieldsType, r as generateBothFieldTypesMaps, s as generateFieldOutputTypesMap, t as deduplicateImports, u as generateHashTypeAliases, v as generateValueObjectTypeAliases, w as serializeCrossReference, x as resolveFieldType, y as generateValueObjectsDescriptorType } from "./domain-type-generation-CR9ECUau-DOlKbcaE.mjs";
2
+ export { deduplicateImports, generateBothFieldTypesMaps, generateCodecTypeIntersection, generateContractFieldDescriptor, generateFieldInputTypesMap, generateFieldOutputTypesMap, generateFieldResolvedType, generateFieldTypesMapsByNamespace, generateHashTypeAliases, generateImportLines, generateModelFieldEntry, generateModelFieldsType, generateModelRelationsType, generateModelsType, generateRootsType, generateValueObjectType, generateValueObjectTypeAliases, generateValueObjectsDescriptorType, renderValueSetType, resolveFieldType, resolveModelFieldType, resolveValueObjectType, serializeCrossReference, serializeExecutionType, serializeNamespaceId, serializeObjectKey, serializeValue };
@@ -1,4 +1,4 @@
1
- import { n as findNearestConfigPathForFile, o as requireConfigSections, r as loadConfig } from "./exports-Cv8nMmBT.mjs";
1
+ import { n as findNearestConfigPathForFile, o as requireConfigSections, r as loadConfig } from "./exports-gEustzOH.mjs";
2
2
  import { InternalError } from "@prisma/orm-framework/utils/internal-error";
3
3
  import { CliStructuredError } from "@prisma/orm-framework/errors/control";
4
4
  import { createControlStack } from "@prisma/orm-framework/components/control";
@@ -1786,4 +1786,4 @@ function startServer(streams) {
1786
1786
  //#endregion
1787
1787
  export { startServer };
1788
1788
 
1789
- //# sourceMappingURL=exports-4S7plLIx.mjs.map
1789
+ //# sourceMappingURL=exports-BysXxIyI.mjs.map