@prisma/orm-family-mongo 8.0.0-rc.23-dev.13 → 8.0.0-rc.23-dev.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/{contract-builder-BsGubaBl.d.mts → contract-builder-CnON_Yzr.d.mts} +2 -2
  2. package/dist/{contract-builder-BsGubaBl.d.mts.map → contract-builder-CnON_Yzr.d.mts.map} +1 -1
  3. package/dist/{contract-builder-ClNv0uzB.mjs → contract-builder-DMWgsRpK.mjs} +3 -3
  4. package/dist/{contract-builder-ClNv0uzB.mjs.map → contract-builder-DMWgsRpK.mjs.map} +1 -1
  5. package/dist/contract-prisma6__provider.mjs +3 -3
  6. package/dist/contract-psl.mjs +1 -1
  7. package/dist/contract-psl__provider.mjs +1 -1
  8. package/dist/contract-ts.d.mts +1 -1
  9. package/dist/contract-ts.mjs +1 -1
  10. package/dist/contract-ts__contract-builder.d.mts +1 -1
  11. package/dist/contract-ts__contract-builder.mjs +1 -1
  12. package/dist/contract.d.mts +2 -2
  13. package/dist/contract.mjs +2 -2
  14. package/dist/contract__data-type.d.mts +14 -1
  15. package/dist/contract__data-type.d.mts.map +1 -1
  16. package/dist/contract__data-type.mjs +2 -2
  17. package/dist/{control-BsOZ6I-N.d.mts → control-BNH5e5av.d.mts} +31 -4
  18. package/dist/{control-BsOZ6I-N.d.mts.map → control-BNH5e5av.d.mts.map} +1 -1
  19. package/dist/{control-c3gViWlG.mjs → control-C4YSpUJX.mjs} +19 -10
  20. package/dist/control-C4YSpUJX.mjs.map +1 -0
  21. package/dist/{control-CKsiMx4D.d.mts → control-Cxe4huYd.d.mts} +10 -9
  22. package/dist/{control-CKsiMx4D.d.mts.map → control-Cxe4huYd.d.mts.map} +1 -1
  23. package/dist/{control-ywVRqK1i.mjs → control-DJf8Ct2M.mjs} +6 -2
  24. package/dist/{control-ywVRqK1i.mjs.map → control-DJf8Ct2M.mjs.map} +1 -1
  25. package/dist/{control-adapter-BheElqfe-38zaUL-r.d.mts → control-adapter-BheElqfe-Z1rEl51r.d.mts} +4 -4
  26. package/dist/{control-adapter-BheElqfe-38zaUL-r.d.mts.map → control-adapter-BheElqfe-Z1rEl51r.d.mts.map} +1 -1
  27. package/dist/control-adapter-Cj8JmiQV.d.mts +1 -0
  28. package/dist/{dist-By5gbTEW.mjs → dist-DTFnQk-s.mjs} +171 -4
  29. package/dist/dist-DTFnQk-s.mjs.map +1 -0
  30. package/dist/{dist-DJzrbVGM.mjs → dist-Dyj5B2n7.mjs} +2 -2
  31. package/dist/{dist-DJzrbVGM.mjs.map → dist-Dyj5B2n7.mjs.map} +1 -1
  32. package/dist/{execution-CuluvtwX.d.mts → execution-CD6EeX3b.d.mts} +2 -2
  33. package/dist/{execution-CuluvtwX.d.mts.map → execution-CD6EeX3b.d.mts.map} +1 -1
  34. package/dist/family.d.mts +9 -9
  35. package/dist/family.mjs +7 -7
  36. package/dist/family__control-adapter.d.mts +2 -2
  37. package/dist/family__control.d.mts +1 -1
  38. package/dist/family__control.mjs +2 -2
  39. package/dist/family__ir.d.mts +2 -2
  40. package/dist/family__ir.mjs +3 -3
  41. package/dist/family__migration.d.mts +1 -1
  42. package/dist/family__migration.mjs +1 -1
  43. package/dist/family__pack.mjs +1 -1
  44. package/dist/family__runtime.d.mts +2 -2
  45. package/dist/family__runtime.mjs +1 -1
  46. package/dist/family__schema-verify.d.mts +1 -1
  47. package/dist/family__schema-verify.mjs +1 -1
  48. package/dist/{field-accessor-DJzCZm0f-zDz2llV-.d.mts → field-accessor-DJzCZm0f-ZGjGQy0_.d.mts} +3 -3
  49. package/dist/{field-accessor-DJzCZm0f-zDz2llV-.d.mts.map → field-accessor-DJzCZm0f-ZGjGQy0_.d.mts.map} +1 -1
  50. package/dist/{index-fnk4bdbx.d.mts → index-B2yjvk4C.d.mts} +3 -3
  51. package/dist/{index-fnk4bdbx.d.mts.map → index-B2yjvk4C.d.mts.map} +1 -1
  52. package/dist/{index-hugPlQ5w.d.mts → index-BHEoA-q8.d.mts} +77 -2
  53. package/dist/{index-hugPlQ5w.d.mts.map → index-BHEoA-q8.d.mts.map} +1 -1
  54. package/dist/{index-CZ-tX2cL.d.mts → index-Bw1gxp0Q.d.mts} +2 -2
  55. package/dist/{index-CZ-tX2cL.d.mts.map → index-Bw1gxp0Q.d.mts.map} +1 -1
  56. package/dist/{index-CgKJfbIP.d.mts → index-By9G6gWh.d.mts} +4 -4
  57. package/dist/{index-CgKJfbIP.d.mts.map → index-By9G6gWh.d.mts.map} +1 -1
  58. package/dist/{interpreter-v8GWMscU-DmijqboH.mjs → interpreter-v8GWMscU-BFP58so-.mjs} +3 -3
  59. package/dist/{interpreter-v8GWMscU-DmijqboH.mjs.map → interpreter-v8GWMscU-BFP58so-.mjs.map} +1 -1
  60. package/dist/{ir-B_tAgqIO.d.mts → ir-CeQg097e.d.mts} +3 -3
  61. package/dist/{ir-B_tAgqIO.d.mts.map → ir-CeQg097e.d.mts.map} +1 -1
  62. package/dist/{ir-Bm8xm1eu.mjs → ir-DvWO1xE7.mjs} +2 -2
  63. package/dist/{ir-Bm8xm1eu.mjs.map → ir-DvWO1xE7.mjs.map} +1 -1
  64. package/dist/lowering.d.mts +1 -1
  65. package/dist/{migration-LHRzvIrb.mjs → migration-8enuY81P.mjs} +2 -2
  66. package/dist/{migration-LHRzvIrb.mjs.map → migration-8enuY81P.mjs.map} +1 -1
  67. package/dist/{migration-C8VlQx5N.d.mts → migration-B7PcbeNg.d.mts} +4 -4
  68. package/dist/{migration-C8VlQx5N.d.mts.map → migration-B7PcbeNg.d.mts.map} +1 -1
  69. package/dist/{mongo-contract-serializer-BBknnHWy-DAzm09wB.mjs → mongo-contract-serializer-BBknnHWy-UNgq5T2h.mjs} +2 -2
  70. package/dist/{mongo-contract-serializer-BBknnHWy-DAzm09wB.mjs.map → mongo-contract-serializer-BBknnHWy-UNgq5T2h.mjs.map} +1 -1
  71. package/dist/{mongo-contract-view-AnejqfrQ-DmXEDnxi.d.mts → mongo-contract-view-AnejqfrQ-DLviCLRM.d.mts} +2 -2
  72. package/dist/{mongo-contract-view-AnejqfrQ-DmXEDnxi.d.mts.map → mongo-contract-view-AnejqfrQ-DLviCLRM.d.mts.map} +1 -1
  73. package/dist/{mongo-contract-view-CF5trX6R-BIF8ciuY.mjs → mongo-contract-view-CF5trX6R-_k8QTG5C.mjs} +3 -3
  74. package/dist/{mongo-contract-view-CF5trX6R-BIF8ciuY.mjs.map → mongo-contract-view-CF5trX6R-_k8QTG5C.mjs.map} +1 -1
  75. package/dist/{mongo-data-type-Bv8Bd0zu-cnTiyyP0.mjs → mongo-data-type-DPJy_m2a-CROT8T5j.mjs} +14 -5
  76. package/dist/mongo-data-type-DPJy_m2a-CROT8T5j.mjs.map +1 -0
  77. package/dist/orm.d.mts +2 -2
  78. package/dist/orm.mjs +2 -2
  79. package/dist/query-ast.d.mts +3 -3
  80. package/dist/query-ast.mjs +2 -2
  81. package/dist/query-ast__control.d.mts +2 -2
  82. package/dist/query-ast__control.mjs +2 -2
  83. package/dist/query-ast__execution.d.mts +1 -1
  84. package/dist/query-builder.d.mts +3 -3
  85. package/dist/query-builder.mjs +1 -1
  86. package/dist/query-builder__contract-free.d.mts +3 -3
  87. package/dist/query-builder__contract-free.mjs +1 -1
  88. package/dist/{runtime-Cx_Sw9eY.d.mts → runtime-C2G5v1Bk.d.mts} +2 -2
  89. package/dist/runtime-C2G5v1Bk.d.mts.map +1 -0
  90. package/dist/runtime.d.mts +4 -4
  91. package/dist/schema-ir.d.mts +1 -1
  92. package/dist/{schema-verify-BMTEmTLS.d.mts → schema-verify-DJyHpYGy.d.mts} +3 -3
  93. package/dist/{schema-verify-BMTEmTLS.d.mts.map → schema-verify-DJyHpYGy.d.mts.map} +1 -1
  94. package/dist/{verify-mongo-schema-D8rznxzZ-CjYf39zu.mjs → verify-mongo-schema-D8rznxzZ-Dg51Lhnp.mjs} +2 -2
  95. package/dist/{verify-mongo-schema-D8rznxzZ-CjYf39zu.mjs.map → verify-mongo-schema-D8rznxzZ-Dg51Lhnp.mjs.map} +1 -1
  96. package/dist/wire.d.mts +2 -2
  97. package/package.json +20 -20
  98. package/dist/control-adapter-CPwhJ0SM.d.mts +0 -1
  99. package/dist/control-c3gViWlG.mjs.map +0 -1
  100. package/dist/dist-By5gbTEW.mjs.map +0 -1
  101. package/dist/mongo-data-type-Bv8Bd0zu-cnTiyyP0.mjs.map +0 -1
  102. package/dist/runtime-Cx_Sw9eY.d.mts.map +0 -1
@@ -1,6 +1,6 @@
1
- import { L as validateMongoStorage } from "./dist-By5gbTEW.mjs";
2
- import { r as buildMongoContractFromDefinition } from "./contract-builder-ClNv0uzB.mjs";
3
- import { i as pairMongoBackRelations } from "./interpreter-v8GWMscU-DmijqboH.mjs";
1
+ import { H as validateMongoStorage } from "./dist-DTFnQk-s.mjs";
2
+ import { r as buildMongoContractFromDefinition } from "./contract-builder-DMWgsRpK.mjs";
3
+ import { i as pairMongoBackRelations } from "./interpreter-v8GWMscU-BFP58so-.mjs";
4
4
  import { blindCast } from "@prisma/orm-framework/utils/casts";
5
5
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
6
6
  import { isStructuredError } from "@prisma/orm-framework/utils/structured-error";
@@ -1,3 +1,3 @@
1
- import { i as pairMongoBackRelations, n as interpretPslDocumentToMongoContract, r as mongoAttributeSpecs, t as describeUnsupportedMongoAttribute } from "./interpreter-v8GWMscU-DmijqboH.mjs";
1
+ import { i as pairMongoBackRelations, n as interpretPslDocumentToMongoContract, r as mongoAttributeSpecs, t as describeUnsupportedMongoAttribute } from "./interpreter-v8GWMscU-BFP58so-.mjs";
2
2
  import { t as describeUnresolvedMongoType } from "./dist-DNwA7CuK.mjs";
3
3
  export { describeUnresolvedMongoType, describeUnsupportedMongoAttribute, interpretPslDocumentToMongoContract, mongoAttributeSpecs, pairMongoBackRelations };
@@ -1,4 +1,4 @@
1
- import { n as interpretPslDocumentToMongoContract } from "./interpreter-v8GWMscU-DmijqboH.mjs";
1
+ import { n as interpretPslDocumentToMongoContract } from "./interpreter-v8GWMscU-BFP58so-.mjs";
2
2
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
3
3
  import { structuredError } from "@prisma/orm-framework/utils/structured-error";
4
4
  import { assertDefined } from "@prisma/orm-framework/utils/assertions";
@@ -1,3 +1,3 @@
1
1
  import { n as typescriptContract, r as typescriptContractFromPath, t as ContractConfig } from "./config-types-CQOf5N7R.mjs";
2
- import { A as RelationNode, B as defineContract, C as MergedIndexes, D as ReferenceRelationNode, E as MongoContractResult, F as VariantBaseNode, G as member, H as field, I as bindEnumType, J as nameIndexes, K as mergeRedundantIndexes, L as buildBoundContract, M as RestatedFieldDifference, N as ValueObjectBuilder, O as RefusalKey, P as ValueObjectNode, R as buildMongoContractFromDefinition, S as IndexShapeRule, T as ModelNode, U as index, V as enumType, W as isEnumTypeHandle, X as valueObject, Y as rel, _ as FieldBuilder, a as BuiltContract, b as FieldReference, c as ContractDefinition, d as ContractScaffold, f as DiscriminatorNode, g as ExtractCodecTypesFromPack, h as EnumTypeHandle, i as BuildWarning, j as RemovedIndex, k as RelationBuilder, l as ContractFactory, m as EnumMember, n as BuildFailure, o as CodecTypeMap, p as EmbedRelationNode, q as model, r as BuildRefusal, s as ContractAuthoringHelpers, t as BoundEnumType, u as ContractInput, v as FieldKey, w as ModelBuilder, x as IndexNode, y as FieldNode, z as createContractAuthoringHelpers } from "./contract-builder-BsGubaBl.mjs";
2
+ import { A as RelationNode, B as defineContract, C as MergedIndexes, D as ReferenceRelationNode, E as MongoContractResult, F as VariantBaseNode, G as member, H as field, I as bindEnumType, J as nameIndexes, K as mergeRedundantIndexes, L as buildBoundContract, M as RestatedFieldDifference, N as ValueObjectBuilder, O as RefusalKey, P as ValueObjectNode, R as buildMongoContractFromDefinition, S as IndexShapeRule, T as ModelNode, U as index, V as enumType, W as isEnumTypeHandle, X as valueObject, Y as rel, _ as FieldBuilder, a as BuiltContract, b as FieldReference, c as ContractDefinition, d as ContractScaffold, f as DiscriminatorNode, g as ExtractCodecTypesFromPack, h as EnumTypeHandle, i as BuildWarning, j as RemovedIndex, k as RelationBuilder, l as ContractFactory, m as EnumMember, n as BuildFailure, o as CodecTypeMap, p as EmbedRelationNode, q as model, r as BuildRefusal, s as ContractAuthoringHelpers, t as BoundEnumType, u as ContractInput, v as FieldKey, w as ModelBuilder, x as IndexNode, y as FieldNode, z as createContractAuthoringHelpers } from "./contract-builder-CnON_Yzr.mjs";
3
3
  export { type BoundEnumType, type BuildFailure, type BuildRefusal, type BuildWarning, type BuiltContract, type CodecTypeMap, type ContractAuthoringHelpers, type ContractConfig, type ContractDefinition, type ContractFactory, type ContractInput, type ContractScaffold, type DiscriminatorNode, type EmbedRelationNode, type EnumMember, type EnumTypeHandle, type ExtractCodecTypesFromPack, type FieldBuilder, type FieldKey, type FieldNode, type FieldReference, type IndexNode, type IndexShapeRule, type MergedIndexes, type ModelBuilder, type ModelNode, type MongoContractResult, type ReferenceRelationNode, type RefusalKey, type RelationBuilder, type RelationNode, type RemovedIndex, type RestatedFieldDifference, type ValueObjectBuilder, type ValueObjectNode, type VariantBaseNode, bindEnumType, buildBoundContract, buildMongoContractFromDefinition, createContractAuthoringHelpers, defineContract, enumType, field, index, isEnumTypeHandle, member, mergeRedundantIndexes, model, nameIndexes, rel, typescriptContract, typescriptContractFromPath, valueObject };
@@ -1,3 +1,3 @@
1
- import { a as defineContract, c as index, d as mergeRedundantIndexes, f as model, h as valueObject, i as createContractAuthoringHelpers, l as isEnumTypeHandle, m as rel, n as buildBoundContract, o as enumType, p as nameIndexes, r as buildMongoContractFromDefinition, s as field, t as bindEnumType, u as member } from "./contract-builder-ClNv0uzB.mjs";
1
+ import { a as defineContract, c as index, d as mergeRedundantIndexes, f as model, h as valueObject, i as createContractAuthoringHelpers, l as isEnumTypeHandle, m as rel, n as buildBoundContract, o as enumType, p as nameIndexes, r as buildMongoContractFromDefinition, s as field, t as bindEnumType, u as member } from "./contract-builder-DMWgsRpK.mjs";
2
2
  import { n as typescriptContractFromPath, t as typescriptContract } from "./config-types-D4SnQaTy.mjs";
3
3
  export { bindEnumType, buildBoundContract, buildMongoContractFromDefinition, createContractAuthoringHelpers, defineContract, enumType, field, index, isEnumTypeHandle, member, mergeRedundantIndexes, model, nameIndexes, rel, typescriptContract, typescriptContractFromPath, valueObject };
@@ -1,2 +1,2 @@
1
- import { A as RelationNode, B as defineContract, C as MergedIndexes, D as ReferenceRelationNode, E as MongoContractResult, F as VariantBaseNode, G as member, H as field, I as bindEnumType, J as nameIndexes, K as mergeRedundantIndexes, L as buildBoundContract, M as RestatedFieldDifference, N as ValueObjectBuilder, O as RefusalKey, P as ValueObjectNode, R as buildMongoContractFromDefinition, S as IndexShapeRule, T as ModelNode, U as index, V as enumType, W as isEnumTypeHandle, X as valueObject, Y as rel, _ as FieldBuilder, a as BuiltContract, b as FieldReference, c as ContractDefinition, d as ContractScaffold, f as DiscriminatorNode, g as ExtractCodecTypesFromPack, h as EnumTypeHandle, i as BuildWarning, j as RemovedIndex, k as RelationBuilder, l as ContractFactory, m as EnumMember, n as BuildFailure, o as CodecTypeMap, p as EmbedRelationNode, q as model, r as BuildRefusal, s as ContractAuthoringHelpers, t as BoundEnumType, u as ContractInput, v as FieldKey, w as ModelBuilder, x as IndexNode, y as FieldNode, z as createContractAuthoringHelpers } from "./contract-builder-BsGubaBl.mjs";
1
+ import { A as RelationNode, B as defineContract, C as MergedIndexes, D as ReferenceRelationNode, E as MongoContractResult, F as VariantBaseNode, G as member, H as field, I as bindEnumType, J as nameIndexes, K as mergeRedundantIndexes, L as buildBoundContract, M as RestatedFieldDifference, N as ValueObjectBuilder, O as RefusalKey, P as ValueObjectNode, R as buildMongoContractFromDefinition, S as IndexShapeRule, T as ModelNode, U as index, V as enumType, W as isEnumTypeHandle, X as valueObject, Y as rel, _ as FieldBuilder, a as BuiltContract, b as FieldReference, c as ContractDefinition, d as ContractScaffold, f as DiscriminatorNode, g as ExtractCodecTypesFromPack, h as EnumTypeHandle, i as BuildWarning, j as RemovedIndex, k as RelationBuilder, l as ContractFactory, m as EnumMember, n as BuildFailure, o as CodecTypeMap, p as EmbedRelationNode, q as model, r as BuildRefusal, s as ContractAuthoringHelpers, t as BoundEnumType, u as ContractInput, v as FieldKey, w as ModelBuilder, x as IndexNode, y as FieldNode, z as createContractAuthoringHelpers } from "./contract-builder-CnON_Yzr.mjs";
2
2
  export { type BoundEnumType, type BuildFailure, type BuildRefusal, type BuildWarning, type BuiltContract, type CodecTypeMap, type ContractAuthoringHelpers, type ContractDefinition, type ContractFactory, type ContractInput, type ContractScaffold, type DiscriminatorNode, type EmbedRelationNode, type EnumMember, type EnumTypeHandle, type ExtractCodecTypesFromPack, type FieldBuilder, type FieldKey, type FieldNode, type FieldReference, type IndexNode, type IndexShapeRule, type MergedIndexes, type ModelBuilder, type ModelNode, type MongoContractResult, type ReferenceRelationNode, type RefusalKey, type RelationBuilder, type RelationNode, type RemovedIndex, type RestatedFieldDifference, type ValueObjectBuilder, type ValueObjectNode, type VariantBaseNode, bindEnumType, buildBoundContract, buildMongoContractFromDefinition, createContractAuthoringHelpers, defineContract, enumType, field, index, isEnumTypeHandle, member, mergeRedundantIndexes, model, nameIndexes, rel, valueObject };
@@ -1,2 +1,2 @@
1
- import { a as defineContract, c as index, d as mergeRedundantIndexes, f as model, h as valueObject, i as createContractAuthoringHelpers, l as isEnumTypeHandle, m as rel, n as buildBoundContract, o as enumType, p as nameIndexes, r as buildMongoContractFromDefinition, s as field, t as bindEnumType, u as member } from "./contract-builder-ClNv0uzB.mjs";
1
+ import { a as defineContract, c as index, d as mergeRedundantIndexes, f as model, h as valueObject, i as createContractAuthoringHelpers, l as isEnumTypeHandle, m as rel, n as buildBoundContract, o as enumType, p as nameIndexes, r as buildMongoContractFromDefinition, s as field, t as bindEnumType, u as member } from "./contract-builder-DMWgsRpK.mjs";
2
2
  export { bindEnumType, buildBoundContract, buildMongoContractFromDefinition, createContractAuthoringHelpers, defineContract, enumType, field, index, isEnumTypeHandle, member, mergeRedundantIndexes, model, nameIndexes, rel, valueObject };
@@ -1,3 +1,3 @@
1
1
  import { $ as MongoUnboundFieldOutputTypes, A as MongoIndexFields, B as MongoJsonValue, C as MongoCollectionOptionsAuthoringInput, D as MongoIndex, E as MongoContractWithTypeMaps, F as MongoIndexOptionDefaultsInput, G as MongoStorageClusteredIndexShape, H as MongoModelStorage, I as MongoIndexOptions, J as MongoTimeSeriesCollectionOptionsInput, K as MongoStorageShape, L as MongoIndexOptionsInput, M as MongoIndexKey, N as MongoIndexKeyDirection, O as MongoIndexAuthoringInput, P as MongoIndexOptionDefaults, Q as MongoUnboundFieldInputTypes, R as MongoJsonObject, S as MongoCollectionOptions, T as MongoContract, U as MongoModelsMap, V as MongoModelFieldStorage, W as MongoStorageCappedShape, X as MongoTypeMaps, Y as MongoTimeSeriesGranularity, Z as MongoTypeMapsPhantomKey, _ as MongoCollationOptions, a as ExtractMongoTypeMaps, at as MongoValueObjectInput, b as MongoCollection, c as MongoChangeStreamPreAndPostImagesOptionsInput, ct as MongoWildcardProjection, d as MongoClusteredCollectionOptionsInput, dt as RootModelName, et as MongoValidator, f as MongoCodecInput, g as MongoCollationMaxVariable, h as MongoCollationCaseFirst, i as ExtractMongoFieldOutputTypes, it as MongoValueObject, j as MongoIndexInput, k as MongoIndexFieldValue, l as MongoClusteredCollectionKey, lt as OwnFieldStoredAs, m as MongoCollationAlternate, n as ExtractMongoCodecTypes, nt as MongoValidatorValidationAction, o as InferModelRow, ot as MongoValueSet, p as MongoCodecTypesBase, q as MongoTimeSeriesCollectionOptions, r as ExtractMongoFieldInputTypes, rt as MongoValidatorValidationLevel, s as MongoChangeStreamPreAndPostImagesOptions, st as MongoValueSetInput, t as AnyMongoTypeMaps, tt as MongoValidatorInput, u as MongoClusteredCollectionOptions, ut as OwnStoredNameOf, v as MongoCollationOptionsInput, w as MongoCollectionOptionsInput, x as MongoCollectionInput, y as MongoCollationStrength, z as MongoJsonPrimitive } from "./mongo-value-set-ChzpEiPK-BVtp7f-a.mjs";
2
- import { $ as mongoValueSetsOf, A as ValidatorShape, B as createMongoNamespaceEnvelopeSchema, C as RelationKeys, D as ShapeSpec, E as Shape, F as canonicalize, G as documentIdRefusalReason, H as defaultMongoIndexName, I as collectionControlPoliciesOf, J as indexLookupKey, K as fieldBsonTypeRefusalOf, L as collectionControlPolicyOf, M as buildMongoContractView, N as buildMongoNamespace, O as StorageValueSetSchema, P as buildMongoStorage, Q as mongoModelsOf, R as collectionRootModelsOf, S as PolymorphicIndexScope, T as Scalars, U as defaultMongoStorageNamespaceId, V as defaultMongoDomainNamespaceId, W as deriveCollectionValidators, X as modelAndBasesOf, Y as isEmbedRelation, Z as mongoContractRefusalsOf, _ as MongoNamespaceEntries, a as FieldBsonTypeRefusal, at as resolveMongoToOneRelationFields, b as MongoToOneRelationFields, c as MONGO_INDEX_OPTION_KEYS, ct as validateMongoStorage, d as MongoContractRefusalsInput, dt as validatorFieldNamesOf, et as ownDocumentIdFieldOf, f as MongoContractSchema, ft as validatorRootShapesOf, g as MongoNamespace, h as MongoIndexOptionKey, i as DOCUMENT_ID, it as ownStoredNamesOf, j as applyPolymorphicScopeToMongoIndex, k as ValidatorRootShape, l as MongoContractAccessors, lt as validatorEnumMemberRefusalOf, m as MongoIndexLookupInput, n as CollectionControlPolicies, nt as ownFieldStoredAs, o as FieldOwner, ot as storedNamesOf, p as MongoContractView, pt as valueObjectStoredNamesOf, q as hasOwnFieldStoredAs, r as CollectionValidatorsInput, rt as ownStoredNameOf, s as FieldValueSets, st as unsupportedStoredNameReason, t as ApplyScopeResult, tt as ownEmbedStoredNamesOf, u as MongoContractRefusal, ut as validatorEnumRefusalOf, v as MongoStorage, w as RelationNamesOf, x as MongoUnboundNamespace, y as MongoStorageInput, z as createMongoContractSchema } from "./index-hugPlQ5w.mjs";
3
- export { type AnyMongoTypeMaps, type ApplyScopeResult, type CollectionControlPolicies, type CollectionValidatorsInput, DOCUMENT_ID, type ExtractMongoCodecTypes, type ExtractMongoFieldInputTypes, type ExtractMongoFieldOutputTypes, type ExtractMongoTypeMaps, type FieldBsonTypeRefusal, type FieldOwner, type FieldValueSets, type InferModelRow, MONGO_INDEX_OPTION_KEYS, MongoChangeStreamPreAndPostImagesOptions, type MongoChangeStreamPreAndPostImagesOptionsInput, type MongoClusteredCollectionKey, MongoClusteredCollectionOptions, type MongoClusteredCollectionOptionsInput, type MongoCodecInput, type MongoCodecTypesBase, type MongoCollationAlternate, type MongoCollationCaseFirst, type MongoCollationMaxVariable, MongoCollationOptions, type MongoCollationOptionsInput, type MongoCollationStrength, MongoCollection, type MongoCollectionInput, MongoCollectionOptions, type MongoCollectionOptionsAuthoringInput, type MongoCollectionOptionsInput, type MongoContract, type MongoContractAccessors, type MongoContractRefusal, type MongoContractRefusalsInput, MongoContractSchema, type MongoContractView, type MongoContractWithTypeMaps, MongoIndex, type MongoIndexAuthoringInput, type MongoIndexFieldValue, type MongoIndexFields, type MongoIndexInput, type MongoIndexKey, type MongoIndexKeyDirection, type MongoIndexLookupInput, MongoIndexOptionDefaults, type MongoIndexOptionDefaultsInput, type MongoIndexOptionKey, MongoIndexOptions, type MongoIndexOptionsInput, type MongoJsonObject, type MongoJsonPrimitive, type MongoJsonValue, type MongoModelFieldStorage, type MongoModelStorage, type MongoModelsMap, type MongoNamespace, type MongoNamespaceEntries, MongoStorage, type MongoStorageCappedShape, type MongoStorageClusteredIndexShape, type MongoStorageInput, type MongoStorageShape, MongoTimeSeriesCollectionOptions, type MongoTimeSeriesCollectionOptionsInput, type MongoTimeSeriesGranularity, type MongoToOneRelationFields, type MongoTypeMaps, type MongoTypeMapsPhantomKey, type MongoUnboundFieldInputTypes, type MongoUnboundFieldOutputTypes, MongoUnboundNamespace, MongoValidator, type MongoValidatorInput, type MongoValidatorValidationAction, type MongoValidatorValidationLevel, MongoValueObject, type MongoValueObjectInput, MongoValueSet, type MongoValueSetInput, type MongoWildcardProjection, type OwnFieldStoredAs, type OwnStoredNameOf, type PolymorphicIndexScope, RelationKeys, type RelationNamesOf, type RootModelName, type Scalars, type Shape, type ShapeSpec, StorageValueSetSchema, type ValidatorRootShape, type ValidatorShape, applyPolymorphicScopeToMongoIndex, buildMongoContractView, buildMongoNamespace, buildMongoStorage, canonicalize, collectionControlPoliciesOf, collectionControlPolicyOf, collectionRootModelsOf, createMongoContractSchema, createMongoNamespaceEnvelopeSchema, defaultMongoDomainNamespaceId, defaultMongoIndexName, defaultMongoStorageNamespaceId, deriveCollectionValidators, documentIdRefusalReason, fieldBsonTypeRefusalOf, hasOwnFieldStoredAs, indexLookupKey, isEmbedRelation, modelAndBasesOf, mongoContractRefusalsOf, mongoModelsOf, mongoValueSetsOf, ownDocumentIdFieldOf, ownEmbedStoredNamesOf, ownFieldStoredAs, ownStoredNameOf, ownStoredNamesOf, resolveMongoToOneRelationFields, storedNamesOf, unsupportedStoredNameReason, validateMongoStorage, validatorEnumMemberRefusalOf, validatorEnumRefusalOf, validatorFieldNamesOf, validatorRootShapesOf, valueObjectStoredNamesOf };
2
+ import { $ as indexLookupKey, A as ValidatorDiscriminator, B as collectionControlPolicyOf, C as PolymorphicIndexScope, Ct as variantFilterOf, D as Shape, E as Scalars, F as buildMongoContractView, G as defaultMongoDomainNamespaceId, H as collectionRootModelsOf, I as buildMongoNamespace, J as deriveCollectionValidators, K as defaultMongoIndexName, L as buildMongoStorage, M as ValidatorRootShape, N as ValidatorShape, O as ShapeSpec, P as applyPolymorphicScopeToMongoIndex, Q as hasOwnFieldStoredAs, R as canonicalize, S as MongoUnboundNamespace, St as valueObjectStoredNamesOf, T as RelationNamesOf, U as createMongoContractSchema, V as collectionOfModel, W as createMongoNamespaceEnvelopeSchema, X as embeddingModelOf, Y as documentIdRefusalReason, Z as fieldBsonTypeRefusalOf, _ as MongoNamespace, _t as validatorDocumentShapesOf, a as FieldBsonTypeRefusal, at as mongoValueSetsOf, b as MongoStorageInput, bt as validatorFieldNamesOf, c as MONGO_INDEX_OPTION_KEYS, ct as ownEmbedStoredNamesOf, d as MongoContractRefusalsInput, dt as ownStoredNamesOf, et as isEmbedRelation, f as MongoContractSchema, ft as propertyBsonTypesOf, g as MongoModelReference, gt as validateMongoStorage, h as MongoIndexOptionKey, ht as unsupportedStoredNameReason, i as DOCUMENT_ID, it as mongoModelsOf, j as ValidatorDocumentShape, k as StorageValueSetSchema, l as MongoContractAccessors, lt as ownFieldStoredAs, m as MongoIndexLookupInput, mt as storedNamesOf, n as CollectionControlPolicies, nt as modelFieldStoredAs, o as FieldOwner, ot as otherModelsReached, p as MongoContractView, pt as resolveMongoToOneRelationFields, q as defaultMongoStorageNamespaceId, r as CollectionValidatorsInput, rt as mongoContractRefusalsOf, s as FieldValueSets, st as ownDocumentIdFieldOf, t as ApplyScopeResult, tt as modelAndBasesOf, u as MongoContractRefusal, ut as ownStoredNameOf, v as MongoNamespaceEntries, vt as validatorEnumMemberRefusalOf, w as RelationKeys, x as MongoToOneRelationFields, xt as validatorRootShapesOf, y as MongoStorage, yt as validatorEnumRefusalOf, z as collectionControlPoliciesOf } from "./index-BHEoA-q8.mjs";
3
+ export { type AnyMongoTypeMaps, type ApplyScopeResult, type CollectionControlPolicies, type CollectionValidatorsInput, DOCUMENT_ID, type ExtractMongoCodecTypes, type ExtractMongoFieldInputTypes, type ExtractMongoFieldOutputTypes, type ExtractMongoTypeMaps, type FieldBsonTypeRefusal, type FieldOwner, type FieldValueSets, type InferModelRow, MONGO_INDEX_OPTION_KEYS, MongoChangeStreamPreAndPostImagesOptions, type MongoChangeStreamPreAndPostImagesOptionsInput, type MongoClusteredCollectionKey, MongoClusteredCollectionOptions, type MongoClusteredCollectionOptionsInput, type MongoCodecInput, type MongoCodecTypesBase, type MongoCollationAlternate, type MongoCollationCaseFirst, type MongoCollationMaxVariable, MongoCollationOptions, type MongoCollationOptionsInput, type MongoCollationStrength, MongoCollection, type MongoCollectionInput, MongoCollectionOptions, type MongoCollectionOptionsAuthoringInput, type MongoCollectionOptionsInput, type MongoContract, type MongoContractAccessors, type MongoContractRefusal, type MongoContractRefusalsInput, MongoContractSchema, type MongoContractView, type MongoContractWithTypeMaps, MongoIndex, type MongoIndexAuthoringInput, type MongoIndexFieldValue, type MongoIndexFields, type MongoIndexInput, type MongoIndexKey, type MongoIndexKeyDirection, type MongoIndexLookupInput, MongoIndexOptionDefaults, type MongoIndexOptionDefaultsInput, type MongoIndexOptionKey, MongoIndexOptions, type MongoIndexOptionsInput, type MongoJsonObject, type MongoJsonPrimitive, type MongoJsonValue, type MongoModelFieldStorage, type MongoModelReference, type MongoModelStorage, type MongoModelsMap, type MongoNamespace, type MongoNamespaceEntries, MongoStorage, type MongoStorageCappedShape, type MongoStorageClusteredIndexShape, type MongoStorageInput, type MongoStorageShape, MongoTimeSeriesCollectionOptions, type MongoTimeSeriesCollectionOptionsInput, type MongoTimeSeriesGranularity, type MongoToOneRelationFields, type MongoTypeMaps, type MongoTypeMapsPhantomKey, type MongoUnboundFieldInputTypes, type MongoUnboundFieldOutputTypes, MongoUnboundNamespace, MongoValidator, type MongoValidatorInput, type MongoValidatorValidationAction, type MongoValidatorValidationLevel, MongoValueObject, type MongoValueObjectInput, MongoValueSet, type MongoValueSetInput, type MongoWildcardProjection, type OwnFieldStoredAs, type OwnStoredNameOf, type PolymorphicIndexScope, RelationKeys, type RelationNamesOf, type RootModelName, type Scalars, type Shape, type ShapeSpec, StorageValueSetSchema, type ValidatorDiscriminator, type ValidatorDocumentShape, type ValidatorRootShape, type ValidatorShape, applyPolymorphicScopeToMongoIndex, buildMongoContractView, buildMongoNamespace, buildMongoStorage, canonicalize, collectionControlPoliciesOf, collectionControlPolicyOf, collectionOfModel, collectionRootModelsOf, createMongoContractSchema, createMongoNamespaceEnvelopeSchema, defaultMongoDomainNamespaceId, defaultMongoIndexName, defaultMongoStorageNamespaceId, deriveCollectionValidators, documentIdRefusalReason, embeddingModelOf, fieldBsonTypeRefusalOf, hasOwnFieldStoredAs, indexLookupKey, isEmbedRelation, modelAndBasesOf, modelFieldStoredAs, mongoContractRefusalsOf, mongoModelsOf, mongoValueSetsOf, otherModelsReached, ownDocumentIdFieldOf, ownEmbedStoredNamesOf, ownFieldStoredAs, ownStoredNameOf, ownStoredNamesOf, propertyBsonTypesOf, resolveMongoToOneRelationFields, storedNamesOf, unsupportedStoredNameReason, validateMongoStorage, validatorDocumentShapesOf, validatorEnumMemberRefusalOf, validatorEnumRefusalOf, validatorFieldNamesOf, validatorRootShapesOf, valueObjectStoredNamesOf, variantFilterOf };
package/dist/contract.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  import { a as MongoContractSchema, c as MongoTimeSeriesCollectionOptions, d as MongoValueSet, f as StorageValueSetSchema, g as createMongoNamespaceEnvelopeSchema, h as createMongoContractSchema, i as MongoCollectionOptions, l as MongoValidator, n as MongoCollationOptions, o as MongoIndex, r as MongoCollection, s as MongoIndexOptionDefaults, t as MongoChangeStreamPreAndPostImagesOptions, u as MongoValueObject } from "./entity-kinds-D5mTQzuZ-BY1vGgFk.mjs";
2
- import { A as ownEmbedStoredNamesOf, B as validatorFieldNamesOf, C as indexLookupKey, D as mongoModelsOf, E as mongoContractRefusalsOf, F as storedNamesOf, H as valueObjectStoredNamesOf, I as unsupportedStoredNameReason, L as validateMongoStorage, M as ownStoredNameOf, N as ownStoredNamesOf, O as mongoValueSetsOf, P as resolveMongoToOneRelationFields, R as validatorEnumMemberRefusalOf, S as hasOwnFieldStoredAs, T as modelAndBasesOf, V as validatorRootShapesOf, _ as defaultMongoIndexName, a as MongoStorage, b as documentIdRefusalReason, c as applyPolymorphicScopeToMongoIndex, d as buildMongoStorage, f as canonicalize, g as defaultMongoDomainNamespaceId, h as collectionRootModelsOf, i as MongoIndexOptions, j as ownFieldStoredAs, k as ownDocumentIdFieldOf, l as buildMongoContractView, m as collectionControlPolicyOf, n as MONGO_INDEX_OPTION_KEYS, o as MongoUnboundNamespace, p as collectionControlPoliciesOf, r as MongoClusteredCollectionOptions, s as RelationKeys, t as DOCUMENT_ID, u as buildMongoNamespace, v as defaultMongoStorageNamespaceId, w as isEmbedRelation, x as fieldBsonTypeRefusalOf, y as deriveCollectionValidators, z as validatorEnumRefusalOf } from "./dist-By5gbTEW.mjs";
3
- export { DOCUMENT_ID, MONGO_INDEX_OPTION_KEYS, MongoChangeStreamPreAndPostImagesOptions, MongoClusteredCollectionOptions, MongoCollationOptions, MongoCollection, MongoCollectionOptions, MongoContractSchema, MongoIndex, MongoIndexOptionDefaults, MongoIndexOptions, MongoStorage, MongoTimeSeriesCollectionOptions, MongoUnboundNamespace, MongoValidator, MongoValueObject, MongoValueSet, RelationKeys, StorageValueSetSchema, applyPolymorphicScopeToMongoIndex, buildMongoContractView, buildMongoNamespace, buildMongoStorage, canonicalize, collectionControlPoliciesOf, collectionControlPolicyOf, collectionRootModelsOf, createMongoContractSchema, createMongoNamespaceEnvelopeSchema, defaultMongoDomainNamespaceId, defaultMongoIndexName, defaultMongoStorageNamespaceId, deriveCollectionValidators, documentIdRefusalReason, fieldBsonTypeRefusalOf, hasOwnFieldStoredAs, indexLookupKey, isEmbedRelation, modelAndBasesOf, mongoContractRefusalsOf, mongoModelsOf, mongoValueSetsOf, ownDocumentIdFieldOf, ownEmbedStoredNamesOf, ownFieldStoredAs, ownStoredNameOf, ownStoredNamesOf, resolveMongoToOneRelationFields, storedNamesOf, unsupportedStoredNameReason, validateMongoStorage, validatorEnumMemberRefusalOf, validatorEnumRefusalOf, validatorFieldNamesOf, validatorRootShapesOf, valueObjectStoredNamesOf };
2
+ import { A as mongoModelsOf, B as storedNamesOf, C as fieldBsonTypeRefusalOf, D as modelAndBasesOf, E as isEmbedRelation, F as ownFieldStoredAs, G as validatorEnumRefusalOf, H as validateMongoStorage, I as ownStoredNameOf, J as valueObjectStoredNamesOf, K as validatorFieldNamesOf, L as ownStoredNamesOf, M as otherModelsReached, N as ownDocumentIdFieldOf, O as modelFieldStoredAs, P as ownEmbedStoredNamesOf, R as propertyBsonTypesOf, S as embeddingModelOf, T as indexLookupKey, U as validatorDocumentShapesOf, V as unsupportedStoredNameReason, W as validatorEnumMemberRefusalOf, Y as variantFilterOf, _ as defaultMongoDomainNamespaceId, a as MongoStorage, b as deriveCollectionValidators, c as applyPolymorphicScopeToMongoIndex, d as buildMongoStorage, f as canonicalize, g as collectionRootModelsOf, h as collectionOfModel, i as MongoIndexOptions, j as mongoValueSetsOf, k as mongoContractRefusalsOf, l as buildMongoContractView, m as collectionControlPolicyOf, n as MONGO_INDEX_OPTION_KEYS, o as MongoUnboundNamespace, p as collectionControlPoliciesOf, q as validatorRootShapesOf, r as MongoClusteredCollectionOptions, s as RelationKeys, t as DOCUMENT_ID, u as buildMongoNamespace, v as defaultMongoIndexName, w as hasOwnFieldStoredAs, x as documentIdRefusalReason, y as defaultMongoStorageNamespaceId, z as resolveMongoToOneRelationFields } from "./dist-DTFnQk-s.mjs";
3
+ export { DOCUMENT_ID, MONGO_INDEX_OPTION_KEYS, MongoChangeStreamPreAndPostImagesOptions, MongoClusteredCollectionOptions, MongoCollationOptions, MongoCollection, MongoCollectionOptions, MongoContractSchema, MongoIndex, MongoIndexOptionDefaults, MongoIndexOptions, MongoStorage, MongoTimeSeriesCollectionOptions, MongoUnboundNamespace, MongoValidator, MongoValueObject, MongoValueSet, RelationKeys, StorageValueSetSchema, applyPolymorphicScopeToMongoIndex, buildMongoContractView, buildMongoNamespace, buildMongoStorage, canonicalize, collectionControlPoliciesOf, collectionControlPolicyOf, collectionOfModel, collectionRootModelsOf, createMongoContractSchema, createMongoNamespaceEnvelopeSchema, defaultMongoDomainNamespaceId, defaultMongoIndexName, defaultMongoStorageNamespaceId, deriveCollectionValidators, documentIdRefusalReason, embeddingModelOf, fieldBsonTypeRefusalOf, hasOwnFieldStoredAs, indexLookupKey, isEmbedRelation, modelAndBasesOf, modelFieldStoredAs, mongoContractRefusalsOf, mongoModelsOf, mongoValueSetsOf, otherModelsReached, ownDocumentIdFieldOf, ownEmbedStoredNamesOf, ownFieldStoredAs, ownStoredNameOf, ownStoredNamesOf, propertyBsonTypesOf, resolveMongoToOneRelationFields, storedNamesOf, unsupportedStoredNameReason, validateMongoStorage, validatorDocumentShapesOf, validatorEnumMemberRefusalOf, validatorEnumRefusalOf, validatorFieldNamesOf, validatorRootShapesOf, valueObjectStoredNamesOf, variantFilterOf };
@@ -1,11 +1,22 @@
1
1
  import { DataType, DataTypeParamsProblem, DataTypeSpec, TypeLookups } from "@prisma/orm-framework/components/codec";
2
+ import { JsonValue } from "@prisma/orm-framework/contract/types";
2
3
  //#region ../../../2-mongo-family/1-foundation/mongo-contract/dist/data-type.d.mts
3
4
  //#region src/mongo-data-type.d.ts
5
+ /**
6
+ * The value a migration writes into the existing documents that lack a new required field: the
7
+ * update expression that stores it with the type's BSON type, and the value as messages show it.
8
+ */
9
+ interface MongoTemporaryValue {
10
+ readonly expression: JsonValue;
11
+ readonly text: string;
12
+ }
4
13
  interface MongoDataTypeSpec extends DataTypeSpec {
5
14
  readonly bsonTypes: readonly string[];
15
+ readonly temporaryValue?: MongoTemporaryValue;
6
16
  }
7
17
  interface MongoDataTypeFacts {
8
18
  readonly bsonTypes: readonly string[];
19
+ readonly temporaryValue?: MongoTemporaryValue;
9
20
  }
10
21
  interface MongoDataType extends DataType {
11
22
  readonly mongo: MongoDataTypeFacts;
@@ -17,8 +28,10 @@ declare function isMongoDataType(type: DataType): type is MongoDataType;
17
28
  * represents; undefined when the stack registers no such codec or Mongo data type.
18
29
  */
19
30
  declare function bsonTypesOfCodec(codecId: string, lookups: TypeLookups): readonly string[] | undefined;
31
+ /** The temporary value of the data type the codec `codecId` represents, when it has one. */
32
+ declare function temporaryValueOfCodec(codecId: string, lookups: TypeLookups): MongoTemporaryValue | undefined;
20
33
  /** What is wrong with the type parameters `typeParams` for the data type the codec `codecId` represents, or undefined when it accepts them or the stack registers no such codec or data type. The Mongo contract builder checks each field with it: the type parameters a field carries reach only the TypeScript types and the emitted `contract.d.ts`, so nothing later checks them. */
21
34
  declare function codecTypeParamsProblem(codecId: string, typeParams: Readonly<Record<string, unknown>>, lookups: TypeLookups): DataTypeParamsProblem | undefined;
22
35
  //#endregion
23
- export { type MongoDataType, type MongoDataTypeFacts, type MongoDataTypeSpec, bsonTypesOfCodec, codecTypeParamsProblem, isMongoDataType, mongoDataType };
36
+ export { type MongoDataType, type MongoDataTypeFacts, type MongoDataTypeSpec, type MongoTemporaryValue, bsonTypesOfCodec, codecTypeParamsProblem, isMongoDataType, mongoDataType, temporaryValueOfCodec };
24
37
  //# sourceMappingURL=contract__data-type.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contract__data-type.d.mts","names":[],"sources":["../../../../2-mongo-family/1-foundation/mongo-contract/dist/data-type.d.mts"],"mappings":";;;UAEU,0BAA0B;WACzB;;UAED;WACC;;UAED,sBAAsB;WACrB,OAAO;;iBAED,cAAc,YAAY,MAAM,oBAAoB;iBACpD,gBAAgB,MAAM,WAAW,QAAQ;;;;;iBAKzC,iBAAiB,iBAAiB,SAAS;;iBAE3C,uBAAuB,iBAAiB,YAAY,SAAS,0BAA0B,SAAS,cAAc"}
1
+ {"version":3,"file":"contract__data-type.d.mts","names":[],"sources":["../../../../2-mongo-family/1-foundation/mongo-contract/dist/data-type.d.mts"],"mappings":";;;;;;;;UAOU;WACC,YAAY;WACZ;;UAED,0BAA0B;WACzB;WACA,iBAAiB;;UAElB;WACC;WACA,iBAAiB;;UAElB,sBAAsB;WACrB,OAAO;;iBAED,cAAc,YAAY,MAAM,oBAAoB;iBACpD,gBAAgB,MAAM,WAAW,QAAQ;;;;;iBAKzC,iBAAiB,iBAAiB,SAAS;;iBAE3C,sBAAsB,iBAAiB,SAAS,cAAc;;iBAE9D,uBAAuB,iBAAiB,YAAY,SAAS,0BAA0B,SAAS,cAAc"}
@@ -1,2 +1,2 @@
1
- import { i as mongoDataType, n as codecTypeParamsProblem, r as isMongoDataType, t as bsonTypesOfCodec } from "./mongo-data-type-Bv8Bd0zu-cnTiyyP0.mjs";
2
- export { bsonTypesOfCodec, codecTypeParamsProblem, isMongoDataType, mongoDataType };
1
+ import { a as temporaryValueOfCodec, i as mongoDataType, n as codecTypeParamsProblem, r as isMongoDataType, t as bsonTypesOfCodec } from "./mongo-data-type-DPJy_m2a-CROT8T5j.mjs";
2
+ export { bsonTypesOfCodec, codecTypeParamsProblem, isMongoDataType, mongoDataType, temporaryValueOfCodec };
@@ -1,6 +1,6 @@
1
1
  import { n as CreateCollectionOptions$1, r as CreateIndexesOptions, t as CollationOptions } from "./mongodb-types-B4HmhF1S.mjs";
2
2
  import { M as MongoIndexKey, N as MongoIndexKeyDirection } from "./mongo-value-set-ChzpEiPK-BVtp7f-a.mjs";
3
- import "./index-hugPlQ5w.mjs";
3
+ import "./index-BHEoA-q8.mjs";
4
4
  import { B as MongoFilterExpr, D as MongoAstNode, rt as MongoQueryPlan } from "./query-plan-Dtyaa2z2-BD60dwyV.mjs";
5
5
  import { MigrationOperationClass, MigrationPlanOperation } from "@prisma/orm-framework/components/control";
6
6
  //#region ../../../2-mongo-family/4-query/query-ast/dist/exports/control.d.mts
@@ -157,9 +157,15 @@ declare function buildIndexOpId(verb: 'create' | 'drop', collection: string, nam
157
157
  declare function keysToKeySpec(keys: ReadonlyArray<MongoIndexKey>): Record<string, MongoIndexKeyDirection>;
158
158
  //#endregion
159
159
  //#region src/migration-operation-types.d.ts
160
+ /**
161
+ * What a DDL operation's check reads: the catalog, through an inspection command, or the documents
162
+ * of a collection, through an aggregate.
163
+ */
164
+ type MongoMigrationCheckSource = AnyMongoInspectionCommand | MongoQueryPlan;
165
+ declare function isInspectionCheckSource(source: MongoMigrationCheckSource): source is AnyMongoInspectionCommand;
160
166
  interface MongoMigrationCheck {
161
167
  readonly description: string;
162
- readonly source: AnyMongoInspectionCommand;
168
+ readonly source: MongoMigrationCheckSource;
163
169
  readonly filter: MongoFilterExpr;
164
170
  readonly expect: 'exists' | 'notExists';
165
171
  /** The object the check expects to exist or not, as a reader names it (`collection "orders"`), when the check is about one object. */
@@ -169,7 +175,27 @@ interface MongoMigrationStep {
169
175
  readonly description: string;
170
176
  readonly command: AnyMongoDdlCommand;
171
177
  }
178
+ /** A field the planner rewrites, as the factory that writes the rewrite describes it. */
179
+ type MongoFieldRewriteMeta = {
180
+ readonly kind: 'cast';
181
+ readonly collection: string;
182
+ readonly field: string;
183
+ /** The BSON type `$convert` casts the field to. */
184
+ readonly to: string;
185
+ } | {
186
+ readonly kind: 'fill';
187
+ readonly collection: string;
188
+ readonly field: string;
189
+ };
190
+ /**
191
+ * What an operation is, as the factory that builds it writes it into `ops.json`, so the runner reads
192
+ * it rather than working it out from the operation's commands.
193
+ */
194
+ interface MongoOperationMeta {
195
+ readonly rewrite?: MongoFieldRewriteMeta;
196
+ }
172
197
  interface MongoMigrationPlanOperation extends MigrationPlanOperation {
198
+ readonly meta?: MongoOperationMeta;
173
199
  readonly precheck: readonly MongoMigrationCheck[];
174
200
  readonly execute: readonly MongoMigrationStep[];
175
201
  readonly postcheck: readonly MongoMigrationCheck[];
@@ -194,6 +220,7 @@ interface MongoDmlOperation extends MigrationPlanOperation {
194
220
  * referenceable from refs.
195
221
  */
196
222
  readonly invariantId?: string;
223
+ readonly meta?: MongoOperationMeta;
197
224
  readonly precheck: readonly MongoDmlCheck[];
198
225
  readonly run: readonly MongoQueryPlan[];
199
226
  readonly postcheck: readonly MongoDmlCheck[];
@@ -201,5 +228,5 @@ interface MongoDmlOperation extends MigrationPlanOperation {
201
228
  type AnyMongoMigrationOperation = MongoMigrationPlanOperation | MongoDmlOperation;
202
229
  declare function isMongoDmlOperation(operation: AnyMongoMigrationOperation): operation is MongoDmlOperation;
203
230
  //#endregion
204
- export { isMongoDmlOperation as C, buildIndexOpId as S, MongoInspectionCommandVisitor as _, CollModOptions as a, MongoMigrationStep as b, CreateIndexCommand as c, DropIndexCommand as d, ListCollectionsCommand as f, MongoDmlOperation as g, MongoDmlCheck as h, CollModCommand as i, CreateIndexOptions as l, MongoDdlCommandVisitor as m, AnyMongoInspectionCommand as n, CreateCollectionCommand as o, ListIndexesCommand as p, AnyMongoMigrationOperation as r, CreateCollectionOptions as s, AnyMongoDdlCommand as t, DropCollectionCommand as u, MongoMigrationCheck as v, keysToKeySpec as w, RenameCollectionCommand as x, MongoMigrationPlanOperation as y };
205
- //# sourceMappingURL=control-BsOZ6I-N.d.mts.map
231
+ export { MongoOperationMeta as C, isMongoDmlOperation as D, isInspectionCheckSource as E, keysToKeySpec as O, MongoMigrationStep as S, buildIndexOpId as T, MongoFieldRewriteMeta as _, CollModOptions as a, MongoMigrationCheckSource as b, CreateIndexCommand as c, DropIndexCommand as d, ListCollectionsCommand as f, MongoDmlOperation as g, MongoDmlCheck as h, CollModCommand as i, CreateIndexOptions as l, MongoDdlCommandVisitor as m, AnyMongoInspectionCommand as n, CreateCollectionCommand as o, ListIndexesCommand as p, AnyMongoMigrationOperation as r, CreateCollectionOptions as s, AnyMongoDdlCommand as t, DropCollectionCommand as u, MongoInspectionCommandVisitor as v, RenameCollectionCommand as w, MongoMigrationPlanOperation as x, MongoMigrationCheck as y };
232
+ //# sourceMappingURL=control-BNH5e5av.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"control-BsOZ6I-N.d.mts","names":[],"sources":["../../../../2-mongo-family/4-query/query-ast/dist/exports/control.d.mts"],"mappings":";;;;;;;cAKc,2BAA2B;WAC9B;WACA;EACT,YAAY;EACZ,OAAO,GAAG,SAAS,8BAA8B,KAAK;;cAE1C,+BAA+B;WAClC;EACT;EACA,OAAO,GAAG,SAAS,8BAA8B,KAAK;;KAEnD,4BAA4B,qBAAqB;;;UAG5C,uBAAuB;EAC/B,YAAY,SAAS,qBAAqB;EAC1C,UAAU,SAAS,mBAAmB;EACtC,iBAAiB,SAAS,0BAA0B;EACpD,eAAe,SAAS,wBAAwB;EAChD,iBAAiB,SAAS,0BAA0B;EACpD,QAAQ,SAAS,iBAAiB;;UAE1B,8BAA8B;EACtC,YAAY,SAAS,qBAAqB;EAC1C,gBAAgB,SAAS,yBAAyB;;;;UAI1C;WACC;WACA;WACA;WACA,0BAA0B;WAC1B;WACA,qBAA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nC,mBAAmB;WACnB,kBAAkB;WAClB,oBAAoB;;UAErB;WACC;WACA,QAAQ;WACR,QAAQ;WACR;;;;;;;UAOD,0BAA0B;WACzB,gBAAgB;WAChB;;;;;;WAMA;WACA,mBAAmB;WACnB,cAAc;WACd,oBAAoB;;KAE1B,6BAA6B,8BAA8B;iBAC/C,oBAAoB,WAAW,6BAA6B,aAAa"}
1
+ {"version":3,"file":"control-BNH5e5av.d.mts","names":[],"sources":["../../../../2-mongo-family/4-query/query-ast/dist/exports/control.d.mts"],"mappings":";;;;;;;cAKc,2BAA2B;WAC9B;WACA;EACT,YAAY;EACZ,OAAO,GAAG,SAAS,8BAA8B,KAAK;;cAE1C,+BAA+B;WAClC;EACT;EACA,OAAO,GAAG,SAAS,8BAA8B,KAAK;;KAEnD,4BAA4B,qBAAqB;;;UAG5C,uBAAuB;EAC/B,YAAY,SAAS,qBAAqB;EAC1C,UAAU,SAAS,mBAAmB;EACtC,iBAAiB,SAAS,0BAA0B;EACpD,eAAe,SAAS,wBAAwB;EAChD,iBAAiB,SAAS,0BAA0B;EACpD,QAAQ,SAAS,iBAAiB;;UAE1B,8BAA8B;EACtC,YAAY,SAAS,qBAAqB;EAC1C,gBAAgB,SAAS,yBAAyB;;;;UAI1C;WACC;WACA;WACA;WACA,0BAA0B;WAC1B;WACA,qBAAqB;WACrB,YAAY;WACZ,UAAU;WACV;WACA;;cAEG,2BAA2B,wBAAwB;WACtD;WACA;WACA,MAAM,cAAc;WACpB;WACA;WACA;WACA,0BAA0B;WAC1B;WACA,qBAAqB;WACrB,YAAY;WACZ,UAAU;WACV;WACA;EACT,YAAY,oBAAoB,MAAM,cAAc,gBAAkB,UAAU;EAChF,OAAO,GAAG,SAAS,uBAAuB,KAAK;;cAEnC,yBAAyB;WAC5B;WACA;WACA;EACT,YAAY,oBAAoB;EAChC,OAAO,GAAG,SAAS,uBAAuB,KAAK;;UAEvC;WACC,YAAY;WACZ;WACA;WACA;WACA;WACA;WACA;IACP;IACA;IACA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,12 @@
1
1
  import { t as mongoContractCanonicalizationHooks } from "./canonicalization-hooks-4XyGmYqQ-Fk14vQW2.mjs";
2
- import { V as validatorRootShapesOf } from "./dist-By5gbTEW.mjs";
3
- import { r as mongoAttributeSpecs, t as describeUnsupportedMongoAttribute } from "./interpreter-v8GWMscU-DmijqboH.mjs";
2
+ import { q as validatorRootShapesOf } from "./dist-DTFnQk-s.mjs";
3
+ import { r as mongoAttributeSpecs, t as describeUnsupportedMongoAttribute } from "./interpreter-v8GWMscU-BFP58so-.mjs";
4
4
  import { t as describeUnresolvedMongoType } from "./dist-DNwA7CuK.mjs";
5
5
  import { t as mongoEmission } from "./exports-DNAGDetn.mjs";
6
6
  import { et as RawUpdateManyCommand } from "./execution-BFjGtmf9.mjs";
7
- import { i as verifyMongoSchema } from "./verify-mongo-schema-D8rznxzZ-CjYf39zu.mjs";
7
+ import { i as verifyMongoSchema } from "./verify-mongo-schema-D8rznxzZ-Dg51Lhnp.mjs";
8
8
  import { n as mongoFamilyPslBlockDescriptors, t as mongoFamilyEntityTypes } from "./authoring-entity-types-qeRu8r5L-kYG8jSMg.mjs";
9
- import { t as MongoContractSerializer } from "./mongo-contract-serializer-BBknnHWy-DAzm09wB.mjs";
9
+ import { t as MongoContractSerializer } from "./mongo-contract-serializer-BBknnHWy-UNgq5T2h.mjs";
10
10
  import { blindCast } from "@prisma/orm-framework/utils/casts";
11
11
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
12
12
  import { structuredError } from "@prisma/orm-framework/utils/structured-error";
@@ -21,9 +21,20 @@ function onlyKey(value) {
21
21
  const [key] = keys;
22
22
  return keys.length === 1 ? key : void 0;
23
23
  }
24
+ /** The field an update sets or changes: one `$rename` or `$unset` of one field, or a pipeline of one `$set` of one field. */
25
+ function rewrittenField(update) {
26
+ if (Array.isArray(update)) {
27
+ const [stage, ...others] = update;
28
+ return others.length === 0 && onlyKey(stage) === "$set" ? onlyKey(Reflect.get(stage ?? {}, "$set")) : void 0;
29
+ }
30
+ const operator = onlyKey(update);
31
+ if (operator === void 0 || !FIELD_OPERATORS.has(operator)) return void 0;
32
+ return onlyKey(Reflect.get(update, operator));
33
+ }
24
34
  /**
25
- * The planner's field rewrite an operation is, if it is one: a single `updateMany` that skips
26
- * validation and renames or unsets one field.
35
+ * The field rewrite an operation's run has the shape of, if it has one: a single `updateMany` that
36
+ * skips validation and renames, unsets or sets one field. A data transform the user filled can have
37
+ * this shape too, so a caller tells the two apart by the operation's class.
27
38
  */
28
39
  function fieldRewriteOf(operation) {
29
40
  const run = Reflect.get(operation, "run");
@@ -31,9 +42,7 @@ function fieldRewriteOf(operation) {
31
42
  const [step] = run;
32
43
  const command = typeof step === "object" && step !== null ? Reflect.get(step, "command") : void 0;
33
44
  if (!(command instanceof RawUpdateManyCommand) || command.bypassDocumentValidation !== true) return;
34
- const operator = onlyKey(command.update);
35
- if (operator === void 0 || !FIELD_OPERATORS.has(operator)) return void 0;
36
- const field = onlyKey(Reflect.get(command.update, operator));
45
+ const field = rewrittenField(command.update);
37
46
  return field === void 0 ? void 0 : {
38
47
  collection: command.collection,
39
48
  field,
@@ -565,4 +574,4 @@ const mongoFamilyDescriptor = new MongoFamilyDescriptor();
565
574
  //#endregion
566
575
  export { mongoOperationsToPreview as a, mongoFamilyDescriptor as i, fieldRewriteOf as n, formatMongoOperations as r, createMongoFamilyInstance as t };
567
576
 
568
- //# sourceMappingURL=control-c3gViWlG.mjs.map
577
+ //# sourceMappingURL=control-C4YSpUJX.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control-C4YSpUJX.mjs","names":[],"sources":["../../../../2-mongo-family/9-family/dist/control.mjs"],"sourcesContent":["import { i as contractToMongoSchemaIR, n as canonicalizeSchemasForVerification, r as diffMongoSchemas, t as verifyMongoSchema } from \"./verify-mongo-schema-D8rznxzZ.mjs\";\nimport { n as mongoFamilyPslBlockDescriptors, t as mongoFamilyEntityTypes } from \"./authoring-entity-types-qeRu8r5L.mjs\";\nimport { t as MongoContractSerializer } from \"./mongo-contract-serializer-BBknnHWy.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { describeUnresolvedMongoType, describeUnsupportedMongoAttribute, mongoAttributeSpecs } from \"@internal/mongo-contract-psl\";\nimport { mongoEmission } from \"@internal/mongo-emitter\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { validatorRootShapesOf } from \"@internal/mongo-contract\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { APP_SPACE_ID, SchemaTreeNode, VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_TARGET_MISMATCH, sameMarkerHashes } from \"@internal/framework-components/control\";\nimport { assertDescriptorSelfConsistency } from \"@internal/migration-tools/spaces\";\nimport { mongoContractCanonicalizationHooks } from \"@internal/mongo-contract/canonicalization-hooks\";\nimport { RawUpdateManyCommand } from \"@internal/mongo-query-ast/execution\";\n//#region src/core/field-rewrite.ts\nconst FIELD_OPERATORS = /* @__PURE__ */ new Set([\"$rename\", \"$unset\"]);\nfunction onlyKey(value) {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) return void 0;\n\tconst keys = Object.keys(value);\n\tconst [key] = keys;\n\treturn keys.length === 1 ? key : void 0;\n}\n/** The field an update sets or changes: one `$rename` or `$unset` of one field, or a pipeline of one `$set` of one field. */\nfunction rewrittenField(update) {\n\tif (Array.isArray(update)) {\n\t\tconst [stage, ...others] = update;\n\t\treturn others.length === 0 && onlyKey(stage) === \"$set\" ? onlyKey(Reflect.get(stage ?? {}, \"$set\")) : void 0;\n\t}\n\tconst operator = onlyKey(update);\n\tif (operator === void 0 || !FIELD_OPERATORS.has(operator)) return void 0;\n\treturn onlyKey(Reflect.get(update, operator));\n}\n/**\n* The field rewrite an operation's run has the shape of, if it has one: a single `updateMany` that\n* skips validation and renames, unsets or sets one field. A data transform the user filled can have\n* this shape too, so a caller tells the two apart by the operation's class.\n*/\nfunction fieldRewriteOf(operation) {\n\tconst run = Reflect.get(operation, \"run\");\n\tif (!Array.isArray(run) || run.length !== 1) return void 0;\n\tconst [step] = run;\n\tconst command = typeof step === \"object\" && step !== null ? Reflect.get(step, \"command\") : void 0;\n\tif (!(command instanceof RawUpdateManyCommand) || command.bypassDocumentValidation !== true) return;\n\tconst field = rewrittenField(command.update);\n\treturn field === void 0 ? void 0 : {\n\t\tcollection: command.collection,\n\t\tfield,\n\t\tcommand\n\t};\n}\n//#endregion\n//#region src/core/operation-preview.ts\nfunction formatKeySpec(keys) {\n\treturn `{ ${keys.map((k) => `${JSON.stringify(k.field)}: ${JSON.stringify(k.direction)}`).join(\", \")} }`;\n}\nconst COMMAND_META_KEYS = /* @__PURE__ */ new Set([\n\t\"kind\",\n\t\"collection\",\n\t\"keys\"\n]);\nfunction formatOptionEntries(cmd) {\n\tconst parts = Object.entries(cmd).filter(([key, value]) => !COMMAND_META_KEYS.has(key) && value !== void 0).map(([key, value]) => `${key}: ${JSON.stringify(value)}`);\n\tif (parts.length === 0) return void 0;\n\treturn `{ ${parts.join(\", \")} }`;\n}\nfunction formatOptions(cmd) {\n\treturn formatOptionEntries(cmd);\n}\nfunction formatCreateCollectionOptions(cmd) {\n\treturn formatOptionEntries(cmd);\n}\nfunction collectionRef(name) {\n\treturn `db.getCollection(${JSON.stringify(name)})`;\n}\nvar MongoDdlCommandFormatter = class {\n\tcreateIndex(cmd) {\n\t\tconst keySpec = formatKeySpec(cmd.keys);\n\t\tconst opts = formatOptions(cmd);\n\t\treturn opts ? `${collectionRef(cmd.collection)}.createIndex(${keySpec}, ${opts})` : `${collectionRef(cmd.collection)}.createIndex(${keySpec})`;\n\t}\n\tdropIndex(cmd) {\n\t\treturn `${collectionRef(cmd.collection)}.dropIndex(${JSON.stringify(cmd.name)})`;\n\t}\n\tcreateCollection(cmd) {\n\t\tconst opts = formatCreateCollectionOptions(cmd);\n\t\treturn opts ? `db.createCollection(${JSON.stringify(cmd.collection)}, ${opts})` : `db.createCollection(${JSON.stringify(cmd.collection)})`;\n\t}\n\tdropCollection(cmd) {\n\t\treturn `${collectionRef(cmd.collection)}.drop()`;\n\t}\n\trenameCollection(cmd) {\n\t\treturn `${collectionRef(cmd.collection)}.renameCollection(${JSON.stringify(cmd.to)})`;\n\t}\n\tcollMod(cmd) {\n\t\tconst parts = [`collMod: ${JSON.stringify(cmd.collection)}`];\n\t\tfor (const [key, value] of Object.entries(cmd)) if (!COMMAND_META_KEYS.has(key) && value !== void 0) parts.push(`${key}: ${JSON.stringify(value)}`);\n\t\treturn `db.runCommand({ ${parts.join(\", \")} })`;\n\t}\n};\nconst formatter = new MongoDdlCommandFormatter();\nfunction formatUpdateMany(cmd) {\n\tconst args = [JSON.stringify(cmd.filter), JSON.stringify(cmd.update)];\n\tif (cmd.bypassDocumentValidation) args.push(\"{ bypassDocumentValidation: true }\");\n\treturn `${collectionRef(cmd.collection)}.updateMany(${args.join(\", \")})`;\n}\nfunction arrayAt(value, key) {\n\tconst entry = Reflect.get(value, key);\n\treturn Array.isArray(entry) ? entry : [];\n}\nfunction objectAt(value, key) {\n\tif (typeof value !== \"object\" || value === null) return void 0;\n\tconst entry = Reflect.get(value, key);\n\treturn typeof entry === \"object\" && entry !== null ? entry : void 0;\n}\nfunction isDdlCommand(value) {\n\treturn value !== void 0 && typeof Reflect.get(value, \"accept\") === \"function\";\n}\nfunction formatMongoOperations(operations) {\n\tconst statements = [];\n\tfor (const operation of operations) {\n\t\tfor (const step of arrayAt(operation, \"execute\")) {\n\t\t\tconst command = objectAt(step, \"command\");\n\t\t\tif (isDdlCommand(command)) statements.push(command.accept(formatter));\n\t\t}\n\t\tconst rewrite = fieldRewriteOf(operation);\n\t\tif (rewrite !== void 0) statements.push(formatUpdateMany(rewrite.command));\n\t}\n\treturn statements;\n}\n/**\n* Wraps `formatMongoOperations` into the family-agnostic\n* `OperationPreview` shape. Each statement carries\n* `language: 'mongodb-shell'`. Mirrors `sqlOperationsToPreview`.\n*/\nfunction mongoOperationsToPreview(operations) {\n\treturn { statements: formatMongoOperations(operations).map((text) => ({\n\t\ttext,\n\t\tlanguage: \"mongodb-shell\"\n\t})) };\n}\n//#endregion\n//#region src/core/operation-storage-name.ts\nfunction collectionOfStep(step) {\n\tif (typeof step !== \"object\" || step === null) return void 0;\n\tconst command = Reflect.get(step, \"command\");\n\tif (typeof command !== \"object\" || command === null) return void 0;\n\tconst collection = Reflect.get(command, \"collection\");\n\treturn typeof collection === \"string\" ? collection : void 0;\n}\n/**\n* The collection an operation's command names, as the database knows it: the name the Mongo\n* planner gives a dropped collection. A planner field rewrite is named `<collection>.<field>`. An operation\n* whose commands name no collection is named by its id.\n*/\nfunction mongoStorageNameOf(operation) {\n\tconst execute = Reflect.get(operation, \"execute\");\n\tconst steps = Array.isArray(execute) ? execute : [];\n\tfor (const step of steps) {\n\t\tconst collection = collectionOfStep(step);\n\t\tif (collection !== void 0) return collection;\n\t}\n\tconst rewrite = fieldRewriteOf(operation);\n\tif (rewrite !== void 0) return `${rewrite.collection}.${rewrite.field}`;\n\tconst run = Reflect.get(operation, \"run\");\n\tfor (const step of Array.isArray(run) ? run : []) {\n\t\tconst collection = collectionOfStep(step);\n\t\tif (collection !== void 0) return collection;\n\t}\n\treturn operation.id;\n}\n//#endregion\n//#region src/core/schema-to-view.ts\nfunction mongoSchemaToView(schema) {\n\tconst collectionNodes = schema.collections.map((collection) => collectionToSchemaNode(collection.name, collection));\n\treturn { root: new SchemaTreeNode({\n\t\tkind: \"root\",\n\t\tid: \"mongo-schema\",\n\t\tlabelParts: [{\n\t\t\ttext: \"database\",\n\t\t\trole: \"title\"\n\t\t}],\n\t\t...ifDefined(\"children\", collectionNodes.length > 0 ? collectionNodes : void 0)\n\t}) };\n}\nfunction collectionToSchemaNode(name, collection) {\n\tconst children = [];\n\tfor (const index of collection.indexes) {\n\t\tconst keysSummary = index.keys.map((k) => {\n\t\t\tif (k.direction === 1) return k.field;\n\t\t\tif (k.direction === -1) return `${k.field} desc`;\n\t\t\treturn `${k.field} ${k.direction}`;\n\t\t}).join(\", \");\n\t\tconst prefix = index.unique ? \"unique index\" : \"index\";\n\t\tconst options = [];\n\t\tif (index.sparse) options.push(\"sparse\");\n\t\tif (index.expireAfterSeconds != null) options.push(`ttl: ${index.expireAfterSeconds}s`);\n\t\tif (index.partialFilterExpression) options.push(\"partial\");\n\t\tchildren.push(new SchemaTreeNode({\n\t\t\tkind: \"index\",\n\t\t\tid: `index-${name}-${index.name}`,\n\t\t\tlabelParts: [\n\t\t\t\t{\n\t\t\t\t\ttext: prefix,\n\t\t\t\t\trole: \"keyword\"\n\t\t\t\t},\n\t\t\t\t{ text: \" (\" },\n\t\t\t\t{\n\t\t\t\t\ttext: keysSummary,\n\t\t\t\t\trole: \"name\"\n\t\t\t\t},\n\t\t\t\t{ text: \")\" },\n\t\t\t\t...options.length > 0 ? [{ text: \" \" }, {\n\t\t\t\t\ttext: `(${options.join(\", \")})`,\n\t\t\t\t\trole: \"detail\"\n\t\t\t\t}] : []\n\t\t\t],\n\t\t\tmeta: {\n\t\t\t\tname: index.name,\n\t\t\t\tkeys: index.keys,\n\t\t\t\tunique: index.unique,\n\t\t\t\t...ifDefined(\"sparse\", index.sparse || void 0),\n\t\t\t\t...ifDefined(\"expireAfterSeconds\", index.expireAfterSeconds ?? void 0),\n\t\t\t\t...ifDefined(\"partialFilterExpression\", index.partialFilterExpression ?? void 0)\n\t\t\t}\n\t\t}));\n\t}\n\tif (collection.validator) {\n\t\tconst validatorChildren = [];\n\t\tconst roots = validatorRootShapesOf(collection.validator.jsonSchema);\n\t\tconst fields = /* @__PURE__ */ new Map();\n\t\tfor (const root of roots) for (const [propName, propDef] of Object.entries(root.properties)) {\n\t\t\tconst types = fields.get(propName) ?? /* @__PURE__ */ new Set();\n\t\t\tfor (const type of bsonTypesOf(propDef)) types.add(type);\n\t\t\tfields.set(propName, types);\n\t\t}\n\t\tfor (const [propName, types] of fields) {\n\t\t\tconst bsonType = types.has(\"any\") ? \"any\" : [...types].join(\",\");\n\t\t\tconst required = roots.every((root) => !Object.hasOwn(root.properties, propName) || root.required.includes(propName));\n\t\t\tvalidatorChildren.push(new SchemaTreeNode({\n\t\t\t\tkind: \"field\",\n\t\t\t\tid: `field-${name}-${propName}`,\n\t\t\t\tlabelParts: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: propName,\n\t\t\t\t\t\trole: \"name\"\n\t\t\t\t\t},\n\t\t\t\t\t{ text: \": \" },\n\t\t\t\t\t{ text: bsonType },\n\t\t\t\t\t...required ? [{ text: \" \" }, {\n\t\t\t\t\t\ttext: \"(required)\",\n\t\t\t\t\t\trole: \"detail\"\n\t\t\t\t\t}] : []\n\t\t\t\t]\n\t\t\t}));\n\t\t}\n\t\tchildren.push(new SchemaTreeNode({\n\t\t\tkind: \"field\",\n\t\t\tid: `validator-${name}`,\n\t\t\tlabelParts: [\n\t\t\t\t{\n\t\t\t\t\ttext: \"validator\",\n\t\t\t\t\trole: \"keyword\"\n\t\t\t\t},\n\t\t\t\t{ text: \" \" },\n\t\t\t\t{\n\t\t\t\t\ttext: `(level: ${collection.validator.validationLevel}, action: ${collection.validator.validationAction})`,\n\t\t\t\t\trole: \"detail\"\n\t\t\t\t}\n\t\t\t],\n\t\t\tmeta: {\n\t\t\t\tvalidationLevel: collection.validator.validationLevel,\n\t\t\t\tvalidationAction: collection.validator.validationAction,\n\t\t\t\tjsonSchema: collection.validator.jsonSchema\n\t\t\t},\n\t\t\t...ifDefined(\"children\", validatorChildren.length > 0 ? validatorChildren : void 0)\n\t\t}));\n\t}\n\tif (collection.options) {\n\t\tconst opts = collection.options;\n\t\tconst optLabels = [];\n\t\tif (opts.capped) optLabels.push(\"capped\");\n\t\tif (opts.timeseries) optLabels.push(\"timeseries\");\n\t\tif (opts.collation) optLabels.push(\"collation\");\n\t\tif (opts.changeStreamPreAndPostImages) optLabels.push(\"changeStreamPreAndPostImages\");\n\t\tif (opts.clusteredIndex) optLabels.push(\"clusteredIndex\");\n\t\tif (optLabels.length > 0) children.push(new SchemaTreeNode({\n\t\t\tkind: \"field\",\n\t\t\tid: `options-${name}`,\n\t\t\tlabelParts: [\n\t\t\t\t{\n\t\t\t\t\ttext: \"options\",\n\t\t\t\t\trole: \"keyword\"\n\t\t\t\t},\n\t\t\t\t{ text: \" \" },\n\t\t\t\t{\n\t\t\t\t\ttext: `(${optLabels.join(\", \")})`,\n\t\t\t\t\trole: \"detail\"\n\t\t\t\t}\n\t\t\t],\n\t\t\tmeta: {\n\t\t\t\t...ifDefined(\"capped\", opts.capped ?? void 0),\n\t\t\t\t...ifDefined(\"timeseries\", opts.timeseries ?? void 0),\n\t\t\t\t...ifDefined(\"collation\", opts.collation ?? void 0),\n\t\t\t\t...ifDefined(\"changeStreamPreAndPostImages\", opts.changeStreamPreAndPostImages ?? void 0),\n\t\t\t\t...ifDefined(\"clusteredIndex\", opts.clusteredIndex ?? void 0)\n\t\t\t}\n\t\t}));\n\t}\n\treturn new SchemaTreeNode({\n\t\tkind: \"collection\",\n\t\tid: `collection-${name}`,\n\t\tlabelParts: [\n\t\t\t{\n\t\t\t\ttext: \"collection\",\n\t\t\t\trole: \"keyword\"\n\t\t\t},\n\t\t\t{ text: \" \" },\n\t\t\t{\n\t\t\t\ttext: name,\n\t\t\t\trole: \"name\"\n\t\t\t}\n\t\t],\n\t\t...ifDefined(\"children\", children.length > 0 ? children : void 0)\n\t});\n}\nfunction bsonTypesOf(propDef) {\n\tif (typeof propDef !== \"object\" || propDef === null || !(\"bsonType\" in propDef)) return [\"any\"];\n\tconst { bsonType } = propDef;\n\treturn Array.isArray(bsonType) ? bsonType.map(String) : [String(bsonType)];\n}\n//#endregion\n//#region src/core/control-instance.ts\nfunction deserializeMongoContract(contractJson) {\n\treturn new MongoContractSerializer().deserializeContract(contractJson);\n}\n/**\n* Family-method contract input. By the time control-plane methods\n* (`verify`, `verifySchema`, `sign`, …) are invoked through the CLI\n* control client (`client.ts`), the input has already been threaded\n* through `familyInstance.deserializeContract`. The value is therefore a\n* class-form `MongoTargetContract` (or a structurally-equivalent\n* envelope post-deserialization) and must NOT be re-fed through\n* structural validation (arktype rejects extra keys like `namespaces`).\n*\n* The parameter type on the framework SPI is `unknown` for variance\n* reasons (so the family can express its own contract type without\n* leaking it to the framework). This helper recovers the validated\n* shape with a single narrow cast.\n*/\nfunction asValidatedMongoContract(contract) {\n\treturn blindCast(contract);\n}\nfunction buildVerifyResult(opts) {\n\treturn {\n\t\tok: opts.ok,\n\t\t...ifDefined(\"code\", opts.code),\n\t\tsummary: opts.summary,\n\t\tcontract: {\n\t\t\tstorageHash: opts.contractStorageHash,\n\t\t\t...ifDefined(\"profileHash\", opts.contractProfileHash)\n\t\t},\n\t\t...ifDefined(\"marker\", opts.marker ? {\n\t\t\tstorageHash: opts.marker.storageHash,\n\t\t\tprofileHash: opts.marker.profileHash\n\t\t} : void 0),\n\t\ttarget: {\n\t\t\texpected: opts.expectedTargetId,\n\t\t\t...ifDefined(\"actual\", opts.actualTargetId)\n\t\t},\n\t\tmeta: {\n\t\t\tcontractPath: opts.contractPath,\n\t\t\t...ifDefined(\"configPath\", opts.configPath)\n\t\t},\n\t\ttimings: { total: opts.totalTime }\n\t};\n}\nfunction createMongoFamilyInstance(controlStack) {\n\tconst extensions = blindCast(controlStack.extensions ?? []);\n\tfor (const extension of extensions) if (extension.contractSpace) {\n\t\tconst { contractJson, headRef } = extension.contractSpace;\n\t\tassertDescriptorSelfConsistency({\n\t\t\textensionId: extension.id,\n\t\t\ttarget: contractJson.target,\n\t\t\ttargetFamily: contractJson.targetFamily,\n\t\t\tstorage: contractJson.storage,\n\t\t\theadRefHash: headRef.hash,\n\t\t\t...mongoContractCanonicalizationHooks\n\t\t});\n\t}\n\tconst adapter = blindCast(controlStack.adapter);\n\tconst getControlAdapter = () => {\n\t\tif (!adapter) throw new InternalError(\"Mongo family requires an adapter descriptor in ControlStack\");\n\t\treturn adapter.create(blindCast(controlStack));\n\t};\n\tfunction isMongoTargetDriver(driver) {\n\t\treturn driver.targetId === \"mongo\";\n\t}\n\tfunction asMongoDriver(driver) {\n\t\tif (!isMongoTargetDriver(driver)) throw structuredError(\"CONTRACT.TARGET_MISMATCH\", `Expected Mongo control driver with targetId 'mongo', got '${driver.targetId}'`);\n\t\treturn driver;\n\t}\n\tasync function signSpaceMarker(driver, { space, contract, expected }) {\n\t\tconst storageHash = contract.storage.storageHash;\n\t\tconst profileHash = contract.profileHash;\n\t\tconst signed = {\n\t\t\tspace,\n\t\t\tcontract: {\n\t\t\t\tstorageHash,\n\t\t\t\tprofileHash\n\t\t\t}\n\t\t};\n\t\tconst controlAdapter = getControlAdapter();\n\t\tconst readHashes = async () => {\n\t\t\tconst marker = await controlAdapter.readMarker(driver, space);\n\t\t\treturn marker === null ? null : {\n\t\t\t\tstorageHash: marker.storageHash,\n\t\t\t\tprofileHash: marker.profileHash\n\t\t\t};\n\t\t};\n\t\tconst existing = await readHashes();\n\t\tif (!sameMarkerHashes(existing, expected)) return {\n\t\t\t...signed,\n\t\t\tstatus: \"conflict\",\n\t\t\texpected,\n\t\t\tfound: existing\n\t\t};\n\t\tif (existing === null) {\n\t\t\tawait controlAdapter.initMarker(driver, space, {\n\t\t\t\tstorageHash,\n\t\t\t\tprofileHash\n\t\t\t});\n\t\t\treturn {\n\t\t\t\t...signed,\n\t\t\t\tstatus: \"created\"\n\t\t\t};\n\t\t}\n\t\tif (existing.storageHash === storageHash && existing.profileHash === profileHash) return {\n\t\t\t...signed,\n\t\t\tstatus: \"unchanged\"\n\t\t};\n\t\tif (!await controlAdapter.updateMarker(driver, space, existing.storageHash, {\n\t\t\tstorageHash,\n\t\t\tprofileHash\n\t\t})) return {\n\t\t\t...signed,\n\t\t\tstatus: \"conflict\",\n\t\t\texpected,\n\t\t\tfound: await readHashes()\n\t\t};\n\t\treturn {\n\t\t\t...signed,\n\t\t\tstatus: \"updated\",\n\t\t\tprevious: existing\n\t\t};\n\t}\n\treturn {\n\t\tfamilyId: \"mongo\",\n\t\tget markerLocation() {\n\t\t\treturn getControlAdapter().markerLocation;\n\t\t},\n\t\tdeserializeContract(contractJson) {\n\t\t\treturn blindCast(deserializeMongoContract(contractJson));\n\t\t},\n\t\tasync verify(options) {\n\t\t\tconst { driver, contract: rawContract, expectedTargetId, contractPath, configPath } = options;\n\t\t\tconst startTime = Date.now();\n\t\t\tconst contract = asValidatedMongoContract(rawContract);\n\t\t\tconst contractStorageHash = contract.storage.storageHash;\n\t\t\tconst contractProfileHash = contract.profileHash;\n\t\t\tconst contractTarget = contract.target;\n\t\t\tconst baseOpts = {\n\t\t\t\tcontractStorageHash,\n\t\t\t\tcontractProfileHash,\n\t\t\t\texpectedTargetId,\n\t\t\t\tcontractPath,\n\t\t\t\t...ifDefined(\"configPath\", configPath)\n\t\t\t};\n\t\t\tif (contractTarget !== expectedTargetId) return buildVerifyResult({\n\t\t\t\t...baseOpts,\n\t\t\t\tok: false,\n\t\t\t\tcode: VERIFY_CODE_TARGET_MISMATCH,\n\t\t\t\tsummary: \"Target mismatch\",\n\t\t\t\tactualTargetId: contractTarget,\n\t\t\t\ttotalTime: Date.now() - startTime\n\t\t\t});\n\t\t\tconst marker = await getControlAdapter().readMarker(asMongoDriver(driver), APP_SPACE_ID);\n\t\t\tif (!marker) return buildVerifyResult({\n\t\t\t\t...baseOpts,\n\t\t\t\tok: false,\n\t\t\t\tcode: VERIFY_CODE_MARKER_MISSING,\n\t\t\t\tsummary: \"Marker missing\",\n\t\t\t\ttotalTime: Date.now() - startTime\n\t\t\t});\n\t\t\tif (marker.storageHash !== contractStorageHash) return buildVerifyResult({\n\t\t\t\t...baseOpts,\n\t\t\t\tok: false,\n\t\t\t\tcode: VERIFY_CODE_HASH_MISMATCH,\n\t\t\t\tsummary: \"Hash mismatch\",\n\t\t\t\tmarker,\n\t\t\t\ttotalTime: Date.now() - startTime\n\t\t\t});\n\t\t\tif (contractProfileHash && marker.profileHash !== contractProfileHash) return buildVerifyResult({\n\t\t\t\t...baseOpts,\n\t\t\t\tok: false,\n\t\t\t\tcode: VERIFY_CODE_HASH_MISMATCH,\n\t\t\t\tsummary: \"Hash mismatch\",\n\t\t\t\tmarker,\n\t\t\t\ttotalTime: Date.now() - startTime\n\t\t\t});\n\t\t\treturn buildVerifyResult({\n\t\t\t\t...baseOpts,\n\t\t\t\tok: true,\n\t\t\t\tsummary: \"Database matches contract\",\n\t\t\t\tmarker,\n\t\t\t\ttotalTime: Date.now() - startTime\n\t\t\t});\n\t\t},\n\t\tverifySchema(options) {\n\t\t\treturn verifyMongoSchema({\n\t\t\t\tcontract: asValidatedMongoContract(options.contract),\n\t\t\t\tschema: options.schema,\n\t\t\t\tstrict: options.strict,\n\t\t\t\tframeworkComponents: options.frameworkComponents\n\t\t\t});\n\t\t},\n\t\tasync signSpaces(options) {\n\t\t\tconst mongoDriver = asMongoDriver(options.driver);\n\t\t\tconst signatures = [];\n\t\t\tfor (const space of options.spaces) signatures.push(await signSpaceMarker(mongoDriver, space));\n\t\t\treturn signatures;\n\t\t},\n\t\tasync readMarker(options) {\n\t\t\treturn getControlAdapter().readMarker(asMongoDriver(options.driver), options.space);\n\t\t},\n\t\tasync readAllMarkers(options) {\n\t\t\treturn getControlAdapter().readAllMarkers(asMongoDriver(options.driver));\n\t\t},\n\t\tasync readLedger(options) {\n\t\t\treturn getControlAdapter().readLedger(asMongoDriver(options.driver), options.space);\n\t\t},\n\t\tasync introspect(options) {\n\t\t\treturn getControlAdapter().introspectSchema(asMongoDriver(options.driver));\n\t\t},\n\t\tcreateRunnerDependencies(options) {\n\t\t\treturn getControlAdapter().createRunnerDependencies(asMongoDriver(options.driver));\n\t\t},\n\t\ttoSchemaView(schema) {\n\t\t\treturn mongoSchemaToView(schema);\n\t\t},\n\t\ttoOperationPreview(operations) {\n\t\t\treturn mongoOperationsToPreview(operations);\n\t\t},\n\t\tstorageNameOf(operation) {\n\t\t\treturn mongoStorageNameOf(operation);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/core/control-descriptor.ts\nconst mongoFamilyAttributeSpecs = mongoAttributeSpecs;\nconst mongoFamilyDescribeUnsupportedAttribute = describeUnsupportedMongoAttribute;\nconst mongoFamilyDescribeUnresolvedType = describeUnresolvedMongoType;\nvar MongoFamilyDescriptor = class {\n\tkind = \"family\";\n\tid = \"mongo\";\n\tfamilyId = \"mongo\";\n\tversion = \"0.0.1\";\n\temission = mongoEmission;\n\tauthoring = {\n\t\tentityTypes: mongoFamilyEntityTypes,\n\t\tpslBlockDescriptors: mongoFamilyPslBlockDescriptors,\n\t\tattributeSpecs: mongoFamilyAttributeSpecs\n\t};\n\tpslDiagnostics = {\n\t\tdescribeUnsupportedAttribute: mongoFamilyDescribeUnsupportedAttribute,\n\t\tdescribeUnresolvedType: mongoFamilyDescribeUnresolvedType\n\t};\n\tcreate(stack) {\n\t\treturn createMongoFamilyInstance(stack);\n\t}\n};\nconst mongoFamilyDescriptor = new MongoFamilyDescriptor();\n//#endregion\nexport { canonicalizeSchemasForVerification, contractToMongoSchemaIR, createMongoFamilyInstance, diffMongoSchemas, fieldRewriteOf, formatMongoOperations, mongoFamilyDescriptor, mongoOperationsToPreview };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAeA,MAAM,kCAAkC,IAAI,IAAI,CAAC,WAAW,QAAQ,CAAC;AACrE,SAAS,QAAQ,OAAO;CACvB,IAAI,OAAO,UAAU,YAAY,UAAU,QAAQ,MAAM,QAAQ,KAAK,GAAG,OAAO,KAAK;CACrF,MAAM,OAAO,OAAO,KAAK,KAAK;CAC9B,MAAM,CAAC,OAAO;CACd,OAAO,KAAK,WAAW,IAAI,MAAM,KAAK;AACvC;;AAEA,SAAS,eAAe,QAAQ;CAC/B,IAAI,MAAM,QAAQ,MAAM,GAAG;EAC1B,MAAM,CAAC,OAAO,GAAG,UAAU;EAC3B,OAAO,OAAO,WAAW,KAAK,QAAQ,KAAK,MAAM,SAAS,QAAQ,QAAQ,IAAI,SAAS,CAAC,GAAG,MAAM,CAAC,IAAI,KAAK;CAC5G;CACA,MAAM,WAAW,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K;EACnF;EACA,MAAM,WAAW,SAAS;GACzB,OAAO,kBAAkB,CAAC,CAAC,iBAAiB,cAAc,QAAQ,MAAM,CAAC;EAC1E;EACA,yBAAyB,SAAS;GACjC,OAAO,kBAAkB,CAAC,CAAC,yBAAyB,cAAc,QAAQ,MAAM,CAAC;EAClF;EACA,aAAa,QAAQ;GACpB,OAAO,kBAAkB,MAAM;EAChC;EACA,mBAAmB,YAAY;GAC9B,OAAO,yBAAyB,UAAU;EAC3C;EACA,cAAc,WAAW;GACxB,OAAO,mBAAmB,SAAS;EACpC;CACD;AACD;AAGA,MAAM,4BAA4B;AAClC,MAAM,0CAA0C;AAChD,MAAM,oCAAoC;AAC1C,IAAI,wBAAwB,MAAM;CACjC,OAAO;CACP,KAAK;CACL,WAAW;CACX,UAAU;CACV,WAAW;CACX,YAAY;EACX,aAAa;EACb,qBAAqB;EACrB,gBAAgB;CACjB;CACA,iBAAiB;EAChB,8BAA8B;EAC9B,wBAAwB;CACzB;CACA,OAAO,OAAO;EACb,OAAO,0BAA0B,KAAK;CACvC;AACD;AACA,MAAM,wBAAwB,IAAI,sBAAsB"}
@@ -1,9 +1,9 @@
1
1
  import { K as MongoStorageShape, T as MongoContract } from "./mongo-value-set-ChzpEiPK-BVtp7f-a.mjs";
2
- import "./index-hugPlQ5w.mjs";
3
- import { o as MongoSchemaIR } from "./index-CZ-tX2cL.mjs";
2
+ import "./index-BHEoA-q8.mjs";
3
+ import { o as MongoSchemaIR } from "./index-Bw1gxp0Q.mjs";
4
4
  import { At as RawUpdateManyCommand } from "./query-plan-Dtyaa2z2-BD60dwyV.mjs";
5
- import "./execution-CuluvtwX.mjs";
6
- import { i as MongoRunnerDependencies } from "./control-adapter-BheElqfe-38zaUL-r.mjs";
5
+ import "./execution-CD6EeX3b.mjs";
6
+ import { i as MongoRunnerDependencies } from "./control-adapter-BheElqfe-Z1rEl51r.mjs";
7
7
  import { Contract, ControlPolicy } from "@prisma/orm-framework/contract/types";
8
8
  import { ContractSerializer, ContractSpace, ControlDriverInstance, ControlExtensionDescriptor, ControlFamilyDescriptor, ControlFamilyInstance, ControlStack, MigratableTargetDescriptor, MigrationPlanOperation, OperationPreview, OperationPreviewCapable, SchemaDiffIssue, SchemaVerifier, SchemaViewCapable } from "@prisma/orm-framework/components/control";
9
9
  //#region ../../../2-mongo-family/9-family/dist/control.d.mts
@@ -74,16 +74,17 @@ interface MongoControlExtensionDescriptor extends ControlExtensionDescriptor<'mo
74
74
  }
75
75
  //#endregion
76
76
  //#region src/core/field-rewrite.d.ts
77
- /** A document rewrite the planner plans: `renameField` or `unsetField`. */
77
+ /** A document rewrite the planner plans: `renameField`, `unsetField` or `castField`. */
78
78
  interface FieldRewrite {
79
79
  readonly collection: string;
80
- /** The field the rewrite renames or removes, by its old name. */
80
+ /** The field the rewrite renames, removes or casts, by its old name. */
81
81
  readonly field: string;
82
82
  readonly command: RawUpdateManyCommand;
83
83
  }
84
84
  /**
85
- * The planner's field rewrite an operation is, if it is one: a single `updateMany` that skips
86
- * validation and renames or unsets one field.
85
+ * The field rewrite an operation's run has the shape of, if it has one: a single `updateMany` that
86
+ * skips validation and renames, unsets or sets one field. A data transform the user filled can have
87
+ * this shape too, so a caller tells the two apart by the operation's class.
87
88
  */
88
89
  declare function fieldRewriteOf(operation: MigrationPlanOperation): FieldRewrite | undefined;
89
90
  //#endregion
@@ -121,4 +122,4 @@ interface CanonicalizedSchemas {
121
122
  declare function canonicalizeSchemasForVerification(live: MongoSchemaIR, expected: MongoSchemaIR): CanonicalizedSchemas;
122
123
  //#endregion
123
124
  export { canonicalizeSchemasForVerification as a, diffMongoSchemas as c, mongoFamilyDescriptor as d, mongoOperationsToPreview as f, MongoControlTargetDescriptor as i, fieldRewriteOf as l, MongoControlExtensionDescriptor as n, contractToMongoSchemaIR as o, MongoControlFamilyInstance as r, createMongoFamilyInstance as s, FieldRewrite as t, formatMongoOperations as u };
124
- //# sourceMappingURL=control-CKsiMx4D.d.mts.map
125
+ //# sourceMappingURL=control-Cxe4huYd.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"control-CKsiMx4D.d.mts","names":[],"sources":["../../../../2-mongo-family/9-family/dist/control.d.mts"],"mappings":";;;;;;;;;;iBAOiB,wBAAwB,UAAU,uBAAuB;;;UAGhE,mCAAmC,+BAA+B,gBAAgB,kBAAkB,gBAAgB;;;;;;;;;;;EAW5H,oBAAoB,wBAAwB;;;;EAI5C,yBAAyB;aACd,QAAQ;MACf;;iBAEW,0BAA0B,cAAc,eAAe;;;cAG1D,uBAAuB,iCAAiC;;;;;;;;;;;;;;;UAe5D,6BAA6B,kBAAkB,gBAAgB,uBAAuB,6CAA6C;WAClI,oBAAoB,mBAAmB;WACvC,gBAAgB,eAAe,WAAW;;;;;;;;;;;;;;;;;;;UAmB3C,wCAAwC;WACvC,gBAAgB,cAAc,cAAc;;;;;UAK7C;WACC;;WAEA;WACA,SAAS;;;;;;iBAMH,eAAe,WAAW,yBAAyB;;;iBAGnD,sBAAsB,qBAAqB;;;;;;iBAM3C,yBAAyB,qBAAqB,2BAA2B;;;;;;;;;;;;;UAahF;WACC,mBAAmB;WACnB,mBAAmB;;iBAEb,iBAAiB,MAAM,eAAe,UAAU,eAAe,iBAAiB,0BAA0B,2BAA2B,gBAAgB;;;UAG5J;WACC,MAAM;WACN,UAAU;;iBAEJ,mCAAmC,MAAM,eAAe,UAAU,gBAAgB"}
1
+ {"version":3,"file":"control-Cxe4huYd.d.mts","names":[],"sources":["../../../../2-mongo-family/9-family/dist/control.d.mts"],"mappings":";;;;;;;;;;iBAOiB,wBAAwB,UAAU,uBAAuB;;;UAGhE,mCAAmC,+BAA+B,gBAAgB,kBAAkB,gBAAgB;;;;;;;;;;;EAW5H,oBAAoB,wBAAwB;;;;EAI5C,yBAAyB;aACd,QAAQ;MACf;;iBAEW,0BAA0B,cAAc,eAAe;;;cAG1D,uBAAuB,iCAAiC;;;;;;;;;;;;;;;UAe5D,6BAA6B,kBAAkB,gBAAgB,uBAAuB,6CAA6C;WAClI,oBAAoB,mBAAmB;WACvC,gBAAgB,eAAe,WAAW;;;;;;;;;;;;;;;;;;;UAmB3C,wCAAwC;WACvC,gBAAgB,cAAc,cAAc;;;;;UAK7C;WACC;;WAEA;WACA,SAAS;;;;;;;iBAOH,eAAe,WAAW,yBAAyB;;;iBAGnD,sBAAsB,qBAAqB;;;;;;iBAM3C,yBAAyB,qBAAqB,2BAA2B;;;;;;;;;;;;;UAahF;WACC,mBAAmB;WACnB,mBAAmB;;iBAEb,iBAAiB,MAAM,eAAe,UAAU,eAAe,iBAAiB,0BAA0B,2BAA2B,gBAAgB;;;UAG5J;WACC,MAAM;WACN,UAAU;;iBAEJ,mCAAmC,MAAM,eAAe,UAAU,gBAAgB"}
@@ -132,10 +132,14 @@ function keysToKeySpec(keys) {
132
132
  for (const k of keys) spec[k.field] = k.direction;
133
133
  return spec;
134
134
  }
135
+ const INSPECTION_COMMAND_KINDS = /* @__PURE__ */ new Set(["listIndexes", "listCollections"]);
136
+ function isInspectionCheckSource(source) {
137
+ return "kind" in source && INSPECTION_COMMAND_KINDS.has(source.kind);
138
+ }
135
139
  function isMongoDmlOperation(operation) {
136
140
  return "run" in operation;
137
141
  }
138
142
  //#endregion
139
- export { DropIndexCommand as a, RenameCollectionCommand as c, keysToKeySpec as d, DropCollectionCommand as i, buildIndexOpId as l, CreateCollectionCommand as n, ListCollectionsCommand as o, CreateIndexCommand as r, ListIndexesCommand as s, CollModCommand as t, isMongoDmlOperation as u };
143
+ export { DropIndexCommand as a, RenameCollectionCommand as c, isMongoDmlOperation as d, keysToKeySpec as f, DropCollectionCommand as i, buildIndexOpId as l, CreateCollectionCommand as n, ListCollectionsCommand as o, CreateIndexCommand as r, ListIndexesCommand as s, CollModCommand as t, isInspectionCheckSource as u };
140
144
 
141
- //# sourceMappingURL=control-ywVRqK1i.mjs.map
145
+ //# sourceMappingURL=control-DJf8Ct2M.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"control-ywVRqK1i.mjs","names":[],"sources":["../../../../2-mongo-family/4-query/query-ast/dist/exports/control.mjs"],"sourcesContent":["import { a as MongoNotExpr, i as MongoFieldFilter, l as MongoAstNode, n as MongoExistsExpr, o as MongoOrExpr, r as MongoExprFilter, t as MongoAndExpr } from \"../filter-expressions-Uo8ZdzwB.mjs\";\n//#region src/ddl-commands.ts\nvar CreateIndexCommand = class extends MongoAstNode {\n\tkind = \"createIndex\";\n\tcollection;\n\tkeys;\n\tconstructor(collection, keys, options) {\n\t\tsuper();\n\t\tthis.collection = collection;\n\t\tthis.keys = keys;\n\t\tif (options?.unique !== void 0) this.unique = options.unique;\n\t\tif (options?.sparse !== void 0) this.sparse = options.sparse;\n\t\tif (options?.expireAfterSeconds !== void 0) this.expireAfterSeconds = options.expireAfterSeconds;\n\t\tif (options?.partialFilterExpression !== void 0) this.partialFilterExpression = options.partialFilterExpression;\n\t\tif (options?.name !== void 0) this.name = options.name;\n\t\tif (options?.wildcardProjection !== void 0) this.wildcardProjection = options.wildcardProjection;\n\t\tif (options?.collation !== void 0) this.collation = options.collation;\n\t\tif (options?.weights !== void 0) this.weights = options.weights;\n\t\tif (options?.default_language !== void 0) this.default_language = options.default_language;\n\t\tif (options?.language_override !== void 0) this.language_override = options.language_override;\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.createIndex(this);\n\t}\n};\nvar DropIndexCommand = class extends MongoAstNode {\n\tkind = \"dropIndex\";\n\tcollection;\n\tname;\n\tconstructor(collection, name) {\n\t\tsuper();\n\t\tthis.collection = collection;\n\t\tthis.name = name;\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.dropIndex(this);\n\t}\n};\nvar CreateCollectionCommand = class extends MongoAstNode {\n\tkind = \"createCollection\";\n\tcollection;\n\tconstructor(collection, options) {\n\t\tsuper();\n\t\tthis.collection = collection;\n\t\tif (options?.validator !== void 0) this.validator = options.validator;\n\t\tif (options?.validationLevel !== void 0) this.validationLevel = options.validationLevel;\n\t\tif (options?.validationAction !== void 0) this.validationAction = options.validationAction;\n\t\tif (options?.capped !== void 0) this.capped = options.capped;\n\t\tif (options?.size !== void 0) this.size = options.size;\n\t\tif (options?.max !== void 0) this.max = options.max;\n\t\tif (options?.timeseries !== void 0) this.timeseries = options.timeseries;\n\t\tif (options?.collation !== void 0) this.collation = options.collation;\n\t\tif (options?.changeStreamPreAndPostImages !== void 0) this.changeStreamPreAndPostImages = options.changeStreamPreAndPostImages;\n\t\tif (options?.clusteredIndex !== void 0) this.clusteredIndex = options.clusteredIndex;\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.createCollection(this);\n\t}\n};\nvar DropCollectionCommand = class extends MongoAstNode {\n\tkind = \"dropCollection\";\n\tcollection;\n\tconstructor(collection) {\n\t\tsuper();\n\t\tthis.collection = collection;\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.dropCollection(this);\n\t}\n};\nvar RenameCollectionCommand = class extends MongoAstNode {\n\tkind = \"renameCollection\";\n\tcollection;\n\tto;\n\tconstructor(collection, to) {\n\t\tsuper();\n\t\tthis.collection = collection;\n\t\tthis.to = to;\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.renameCollection(this);\n\t}\n};\nvar CollModCommand = class extends MongoAstNode {\n\tkind = \"collMod\";\n\tcollection;\n\tconstructor(collection, options) {\n\t\tsuper();\n\t\tthis.collection = collection;\n\t\tif (options.validator !== void 0) this.validator = options.validator;\n\t\tif (options.validationLevel !== void 0) this.validationLevel = options.validationLevel;\n\t\tif (options.validationAction !== void 0) this.validationAction = options.validationAction;\n\t\tif (options.changeStreamPreAndPostImages !== void 0) this.changeStreamPreAndPostImages = options.changeStreamPreAndPostImages;\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.collMod(this);\n\t}\n};\n//#endregion\n//#region src/inspection-commands.ts\nvar ListIndexesCommand = class extends MongoAstNode {\n\tkind = \"listIndexes\";\n\tcollection;\n\tconstructor(collection) {\n\t\tsuper();\n\t\tthis.collection = collection;\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.listIndexes(this);\n\t}\n};\nvar ListCollectionsCommand = class extends MongoAstNode {\n\tkind = \"listCollections\";\n\tconstructor() {\n\t\tsuper();\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.listCollections(this);\n\t}\n};\n//#endregion\n//#region src/migration-helpers.ts\nfunction buildIndexOpId(verb, collection, name) {\n\treturn `index.${collection}.${verb}(${name})`;\n}\nfunction keysToKeySpec(keys) {\n\tconst spec = {};\n\tfor (const k of keys) spec[k.field] = k.direction;\n\treturn spec;\n}\n//#endregion\n//#region src/migration-operation-types.ts\nfunction isMongoDmlOperation(operation) {\n\treturn \"run\" in operation;\n}\n//#endregion\nexport { CollModCommand, CreateCollectionCommand, CreateIndexCommand, DropCollectionCommand, DropIndexCommand, ListCollectionsCommand, ListIndexesCommand, MongoAndExpr, MongoExistsExpr, MongoExprFilter, MongoFieldFilter, MongoNotExpr, MongoOrExpr, RenameCollectionCommand, buildIndexOpId, isMongoDmlOperation, keysToKeySpec };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;AAEA,IAAI,qBAAqB,cAAc,aAAa;CACnD,OAAO;CACP;CACA;CACA,YAAY,YAAY,MAAM,SAAS;EACtC,MAAM;EACN,KAAK,aAAa;EAClB,KAAK,OAAO;EACZ,IAAI,SAAS,WAAW,KAAK,GAAG,KAAK,SAAS,QAAQ;EACtD,IAAI,SAAS,WAAW,KAAK,GAAG,KAAK,SAAS,QAAQ;EACtD,IAAI,SAAS,uBAAuB,KAAK,GAAG,KAAK,qBAAqB,QAAQ;EAC9E,IAAI,SAAS,4BAA4B,KAAK,GAAG,KAAK,0BAA0B,QAAQ;EACxF,IAAI,SAAS,SAAS,KAAK,GAAG,KAAK,OAAO,QAAQ;EAClD,IAAI,SAAS,uBAAuB,KAAK,GAAG,KAAK,qBAAqB,QAAQ;EAC9E,IAAI,S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,KAAK,GAAG,KAAK;AAC5C;AACA,SAAS,cAAc,MAAM;CAC5B,MAAM,OAAO,CAAC;CACd,KAAK,MAAM,KAAK,MAAM,KAAK,EAAE,SAAS,EAAE;CACxC,OAAO;AACR;AAGA,SAAS,oBAAoB,WAAW;CACvC,OAAO,SAAS;AACjB"}
1
+ {"version":3,"file":"control-DJf8Ct2M.mjs","names":[],"sources":["../../../../2-mongo-family/4-query/query-ast/dist/exports/control.mjs"],"sourcesContent":["import { a as MongoNotExpr, i as MongoFieldFilter, l as MongoAstNode, n as MongoExistsExpr, o as MongoOrExpr, r as MongoExprFilter, t as MongoAndExpr } from \"../filter-expressions-Uo8ZdzwB.mjs\";\n//#region src/ddl-commands.ts\nvar CreateIndexCommand = class extends MongoAstNode {\n\tkind = \"createIndex\";\n\tcollection;\n\tkeys;\n\tconstructor(collection, keys, options) {\n\t\tsuper();\n\t\tthis.collection = collection;\n\t\tthis.keys = keys;\n\t\tif (options?.unique !== void 0) this.unique = options.unique;\n\t\tif (options?.sparse !== void 0) this.sparse = options.sparse;\n\t\tif (options?.expireAfterSeconds !== void 0) this.expireAfterSeconds = options.expireAfterSeconds;\n\t\tif (options?.partialFilterExpression !== void 0) this.partialFilterExpression = options.partialFilterExpression;\n\t\tif (options?.name !== void 0) this.name = options.name;\n\t\tif (options?.wildcardProjection !== void 0) this.wildcardProjection = options.wildcardProjection;\n\t\tif (options?.collation !== void 0) this.collation = options.collation;\n\t\tif (options?.weights !== void 0) this.weights = options.weights;\n\t\tif (options?.default_language !== void 0) this.default_language = options.default_language;\n\t\tif (options?.language_override !== void 0) this.language_override = options.language_override;\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.createIndex(this);\n\t}\n};\nvar DropIndexCommand = class extends MongoAstNode {\n\tkind = \"dropIndex\";\n\tcollection;\n\tname;\n\tconstructor(collection, name) {\n\t\tsuper();\n\t\tthis.collection = collection;\n\t\tthis.name = name;\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.dropIndex(this);\n\t}\n};\nvar CreateCollectionCommand = class extends MongoAstNode {\n\tkind = \"createCollection\";\n\tcollection;\n\tconstructor(collection, options) {\n\t\tsuper();\n\t\tthis.collection = collection;\n\t\tif (options?.validator !== void 0) this.validator = options.validator;\n\t\tif (options?.validationLevel !== void 0) this.validationLevel = options.validationLevel;\n\t\tif (options?.validationAction !== void 0) this.validationAction = options.validationAction;\n\t\tif (options?.capped !== void 0) this.capped = options.capped;\n\t\tif (options?.size !== void 0) this.size = options.size;\n\t\tif (options?.max !== void 0) this.max = options.max;\n\t\tif (options?.timeseries !== void 0) this.timeseries = options.timeseries;\n\t\tif (options?.collation !== void 0) this.collation = options.collation;\n\t\tif (options?.changeStreamPreAndPostImages !== void 0) this.changeStreamPreAndPostImages = options.changeStreamPreAndPostImages;\n\t\tif (options?.clusteredIndex !== void 0) this.clusteredIndex = options.clusteredIndex;\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.createCollection(this);\n\t}\n};\nvar DropCollectionCommand = class extends MongoAstNode {\n\tkind = \"dropCollection\";\n\tcollection;\n\tconstructor(collection) {\n\t\tsuper();\n\t\tthis.collection = collection;\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.dropCollection(this);\n\t}\n};\nvar RenameCollectionCommand = class extends MongoAstNode {\n\tkind = \"renameCollection\";\n\tcollection;\n\tto;\n\tconstructor(collection, to) {\n\t\tsuper();\n\t\tthis.collection = collection;\n\t\tthis.to = to;\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.renameCollection(this);\n\t}\n};\nvar CollModCommand = class extends MongoAstNode {\n\tkind = \"collMod\";\n\tcollection;\n\tconstructor(collection, options) {\n\t\tsuper();\n\t\tthis.collection = collection;\n\t\tif (options.validator !== void 0) this.validator = options.validator;\n\t\tif (options.validationLevel !== void 0) this.validationLevel = options.validationLevel;\n\t\tif (options.validationAction !== void 0) this.validationAction = options.validationAction;\n\t\tif (options.changeStreamPreAndPostImages !== void 0) this.changeStreamPreAndPostImages = options.changeStreamPreAndPostImages;\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.collMod(this);\n\t}\n};\n//#endregion\n//#region src/inspection-commands.ts\nvar ListIndexesCommand = class extends MongoAstNode {\n\tkind = \"listIndexes\";\n\tcollection;\n\tconstructor(collection) {\n\t\tsuper();\n\t\tthis.collection = collection;\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.listIndexes(this);\n\t}\n};\nvar ListCollectionsCommand = class extends MongoAstNode {\n\tkind = \"listCollections\";\n\tconstructor() {\n\t\tsuper();\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.listCollections(this);\n\t}\n};\n//#endregion\n//#region src/migration-helpers.ts\nfunction buildIndexOpId(verb, collection, name) {\n\treturn `index.${collection}.${verb}(${name})`;\n}\nfunction keysToKeySpec(keys) {\n\tconst spec = {};\n\tfor (const k of keys) spec[k.field] = k.direction;\n\treturn spec;\n}\n//#endregion\n//#region src/migration-operation-types.ts\nconst INSPECTION_COMMAND_KINDS = /* @__PURE__ */ new Set([\"listIndexes\", \"listCollections\"]);\nfunction isInspectionCheckSource(source) {\n\treturn \"kind\" in source && INSPECTION_COMMAND_KINDS.has(source.kind);\n}\nfunction isMongoDmlOperation(operation) {\n\treturn \"run\" in operation;\n}\n//#endregion\nexport { CollModCommand, CreateCollectionCommand, CreateIndexCommand, DropCollectionCommand, DropIndexCommand, ListCollectionsCommand, ListIndexesCommand, MongoAndExpr, MongoExistsExpr, MongoExprFilter, MongoFieldFilter, MongoNotExpr, MongoOrExpr, RenameCollectionCommand, buildIndexOpId, isInspectionCheckSource, isMongoDmlOperation, keysToKeySpec };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;AAEA,IAAI,qBAAqB,cAAc,aAAa;CACnD,OAAO;CACP;CACA;CACA,YAAY,YAAY,MAAM,SAAS;EACtC,MAAM;EACN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AACD;AAGA,IAAI,qBAAqB,cAAc,aAAa;CACnD,OAAO;CACP;CACA,YAAY,YAAY;EACvB,MAAM;EACN,KAAK,aAAa;EAClB,KAAK,OAAO;CACb;CACA,OAAO,SAAS;EACf,OAAO,QAAQ,YAAY,IAAI;CAChC;AACD;AACA,IAAI,yBAAyB,cAAc,aAAa;CACvD,OAAO;CACP,cAAc;EACb,MAAM;EACN,KAAK,OAAO;CACb;CACA,OAAO,SAAS;EACf,OAAO,QAAQ,gBAAgB,IAAI;CACpC;AACD;AAGA,SAAS,eAAe,MAAM,YAAY,MAAM;CAC/C,OAAO,SAAS,WAAW,GAAG,KAAK,GAAG,KAAK;AAC5C;AACA,SAAS,cAAc,MAAM;CAC5B,MAAM,OAAO,CAAC;CACd,KAAK,MAAM,KAAK,MAAM,KAAK,EAAE,SAAS,EAAE;CACxC,OAAO;AACR;AAGA,MAAM,2CAA2C,IAAI,IAAI,CAAC,eAAe,iBAAiB,CAAC;AAC3F,SAAS,wBAAwB,QAAQ;CACxC,OAAO,UAAU,UAAU,yBAAyB,IAAI,OAAO,IAAI;AACpE;AACA,SAAS,oBAAoB,WAAW;CACvC,OAAO,SAAS;AACjB"}
@@ -1,6 +1,6 @@
1
- import { o as MongoSchemaIR } from "./index-CZ-tX2cL.mjs";
2
- import { _ as MongoInspectionCommandVisitor, t as AnyMongoDdlCommand } from "./control-BsOZ6I-N.mjs";
3
- import { o as MongoQueryable, t as MongoAdapter } from "./index-CgKJfbIP.mjs";
1
+ import { o as MongoSchemaIR } from "./index-Bw1gxp0Q.mjs";
2
+ import { t as AnyMongoDdlCommand, v as MongoInspectionCommandVisitor } from "./control-BNH5e5av.mjs";
3
+ import { o as MongoQueryable, t as MongoAdapter } from "./index-By9G6gWh.mjs";
4
4
  import { ContractMarkerRecord, LedgerEntryRecord } from "@prisma/orm-framework/contract/types";
5
5
  import { ControlAdapterDescriptor, ControlAdapterInstance, ControlDriverInstance } from "@prisma/orm-framework/components/control";
6
6
  //#region ../../../2-mongo-family/9-family/dist/control-adapter-BheElqfe.d.mts
@@ -126,4 +126,4 @@ interface MongoControlAdapter<TTarget extends string = string> extends ControlAd
126
126
  interface MongoControlAdapterDescriptor<TTarget extends string = string> extends ControlAdapterDescriptor<'mongo', TTarget, MongoControlAdapter<TTarget>> {}
127
127
  //#endregion
128
128
  export { MongoRunnerDependencies as i, MongoControlAdapter as n, MongoControlAdapterDescriptor as r, MarkerOperations as t };
129
- //# sourceMappingURL=control-adapter-BheElqfe-38zaUL-r.d.mts.map
129
+ //# sourceMappingURL=control-adapter-BheElqfe-Z1rEl51r.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"control-adapter-BheElqfe-38zaUL-r.d.mts","names":[],"sources":["../../../../2-mongo-family/9-family/dist/control-adapter-BheElqfe.d.mts"],"mappings":";;;;;;;;;;;;;UAYU;EACR,WAAW,gBAAgB,QAAQ;EACnC,WAAW,eAAe;aACf;aACA;aACA;MACP;EACJ,aAAa,eAAe,sBAAsB;aACvC;aACA;aACA;MACP;EACJ,iBAAiB,eAAe;aACrB;aACA;aACA;aACA;aACA;aACA;MACP;;;;;UAKI;WACC,oBAAoB,8BAA8B,QAAQ;WAC1D,SAAS;WACT,QAAQ;WACR,aAAa,SAAS,uBAAuB;WAC7C,WAAW;WACX,wBAAwB,QAAQ;;;;;;;;;;;;;;;UAejC,oBAAoB,yCAAyC,gCAAgC;;WAE5F;;;;;;;EAOT,WAAW,QAAQ,+BAA+B,UAAU,gBAAgB,QAAQ;;;;;;;EAOpF,eAAe,QAAQ,+BAA+B,WAAW,QAAQ,oBAAoB;;;;EAI7F,WAAW,QAAQ,+BAA+B,UAAU,eAAe;aAChE;aACA;aACA;MACP;;;;;;EAMJ,aAAa,QAAQ,+BAA+B,UAAU,eAAe,sBAAsB;aACxF;aACA;aACA;MACP;;;;;;EAMJ,iBAAiB,QAAQ,+BAA+B,UAAU,eAAe;aACtE;aACA;aACA;aACA;aACA;aACA;MACP;;;;;EAKJ,WAAW,QAAQ,+BAA+B,UAAU,iBAAiB,iBAAiB;;;;EAI9F,iBAAiB,QAAQ,+BAA+B,WAAW,QAAQ;;;;EAI3E,yBAAyB,QAAQ,+BAA+B,WAAW;;;;;;;UAOnE,8BAA8B,yCAAyC,kCAAkC,SAAS,oBAAoB"}
1
+ {"version":3,"file":"control-adapter-BheElqfe-Z1rEl51r.d.mts","names":[],"sources":["../../../../2-mongo-family/9-family/dist/control-adapter-BheElqfe.d.mts"],"mappings":";;;;;;;;;;;;;UAYU;EACR,WAAW,gBAAgB,QAAQ;EACnC,WAAW,eAAe;aACf;aACA;aACA;MACP;EACJ,aAAa,eAAe,sBAAsB;aACvC;aACA;aACA;MACP;EACJ,iBAAiB,eAAe;aACrB;aACA;aACA;aACA;aACA;aACA;MACP;;;;;UAKI;WACC,oBAAoB,8BAA8B,QAAQ;WAC1D,SAAS;WACT,QAAQ;WACR,aAAa,SAAS,uBAAuB;WAC7C,WAAW;WACX,wBAAwB,QAAQ;;;;;;;;;;;;;;;UAejC,oBAAoB,yCAAyC,gCAAgC;;WAE5F;;;;;;;EAOT,WAAW,QAAQ,+BAA+B,UAAU,gBAAgB,QAAQ;;;;;;;EAOpF,eAAe,QAAQ,+BAA+B,WAAW,QAAQ,oBAAoB;;;;EAI7F,WAAW,QAAQ,+BAA+B,UAAU,eAAe;aAChE;aACA;aACA;MACP;;;;;;EAMJ,aAAa,QAAQ,+BAA+B,UAAU,eAAe,sBAAsB;aACxF;aACA;aACA;MACP;;;;;;EAMJ,iBAAiB,QAAQ,+BAA+B,UAAU,eAAe;aACtE;aACA;aACA;aACA;aACA;aACA;MACP;;;;;EAKJ,WAAW,QAAQ,+BAA+B,UAAU,iBAAiB,iBAAiB;;;;EAI9F,iBAAiB,QAAQ,+BAA+B,WAAW,QAAQ;;;;EAI3E,yBAAyB,QAAQ,+BAA+B,WAAW;;;;;;;UAOnE,8BAA8B,yCAAyC,kCAAkC,SAAS,oBAAoB"}
@@ -0,0 +1 @@
1
+ import "./control-adapter-BheElqfe-Z1rEl51r.mjs";