@prisma/orm-family-mongo 8.0.0-rc.12-dev.12 → 8.0.0-rc.12-dev.13
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.
- package/dist/{authoring-entity-types-DkFfee0x-CRRHtwhi.mjs → authoring-entity-types-DkFfee0x-DzGu9hUw.mjs} +3 -3
- package/dist/{authoring-entity-types-DkFfee0x-CRRHtwhi.mjs.map → authoring-entity-types-DkFfee0x-DzGu9hUw.mjs.map} +1 -1
- package/dist/{canonicalization-hooks-BXCTdx8s.mjs → canonicalization-hooks-CRVM-Kqh-Qi-VmEVg.mjs} +2 -2
- package/dist/canonicalization-hooks-CRVM-Kqh-Qi-VmEVg.mjs.map +1 -0
- package/dist/{config-types-v_AdyJzO.mjs → config-types-x4rKdA0F.mjs} +4 -4
- package/dist/{config-types-v_AdyJzO.mjs.map → config-types-x4rKdA0F.mjs.map} +1 -1
- package/dist/{contract-builder-C0TMb001.mjs → contract-builder-0eayq5gp.mjs} +6 -6
- package/dist/{contract-builder-C0TMb001.mjs.map → contract-builder-0eayq5gp.mjs.map} +1 -1
- package/dist/{contract-builder-DVBFIIYp.d.mts → contract-builder-D0Fsm4m-.d.mts} +4 -4
- package/dist/{contract-builder-DVBFIIYp.d.mts.map → contract-builder-D0Fsm4m-.d.mts.map} +1 -1
- package/dist/contract-prisma6__provider.d.mts +35 -0
- package/dist/contract-prisma6__provider.d.mts.map +1 -0
- package/dist/contract-prisma6__provider.mjs +1020 -0
- package/dist/contract-prisma6__provider.mjs.map +1 -0
- package/dist/contract-psl.d.mts +43 -7
- package/dist/contract-psl.d.mts.map +1 -1
- package/dist/contract-psl.mjs +2 -2
- package/dist/contract-psl__provider.mjs +4 -4
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.d.mts +1 -1
- package/dist/contract-ts.mjs +2 -2
- package/dist/contract-ts__config-types.mjs +1 -1
- package/dist/contract-ts__contract-builder.d.mts +1 -1
- package/dist/contract-ts__contract-builder.mjs +1 -1
- package/dist/contract.d.mts +3 -3
- package/dist/contract.mjs +3 -3
- package/dist/contract__canonicalization-hooks.mjs +1 -1
- package/dist/contract__entity-kinds.d.mts +1 -1
- package/dist/contract__entity-kinds.mjs +1 -1
- package/dist/{control-BtmriDhU.mjs → control-BG0O1wDj.mjs} +12 -12
- package/dist/control-BG0O1wDj.mjs.map +1 -0
- package/dist/{control-9Vd-XWkM.d.mts → control-BXKlnxAS.d.mts} +3 -3
- package/dist/{control-9Vd-XWkM.d.mts.map → control-BXKlnxAS.d.mts.map} +1 -1
- package/dist/{control-adapter-Bh_ZraGM-7HXImyjy.d.mts → control-adapter-Bh_ZraGM-XeWQ672u.d.mts} +4 -4
- package/dist/{control-adapter-Bh_ZraGM-7HXImyjy.d.mts.map → control-adapter-Bh_ZraGM-XeWQ672u.d.mts.map} +1 -1
- package/dist/control-adapter-miP7lGv5.d.mts +1 -0
- package/dist/{control-C6gTadl8.d.mts → control-zKduRmAA.d.mts} +5 -5
- package/dist/{control-C6gTadl8.d.mts.map → control-zKduRmAA.d.mts.map} +1 -1
- package/dist/{dist-Dyp05u64.mjs → dist-C_TI9T_n.mjs} +2 -2
- package/dist/{dist-Dyp05u64.mjs.map → dist-C_TI9T_n.mjs.map} +1 -1
- package/dist/{dist-B4a9eijw.mjs → dist-DsIID5AE.mjs} +87 -41
- package/dist/dist-DsIID5AE.mjs.map +1 -0
- package/dist/{entity-kinds-FlR_bJNA-D4NYzPhs.mjs → entity-kinds-BFgLffz7-D8WUc2oo.mjs} +3 -3
- package/dist/{entity-kinds-FlR_bJNA-D4NYzPhs.mjs.map → entity-kinds-BFgLffz7-D8WUc2oo.mjs.map} +1 -1
- package/dist/family.d.mts +9 -9
- package/dist/family.mjs +8 -8
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control.d.mts +1 -1
- package/dist/family__control.mjs +2 -2
- package/dist/family__ir.d.mts +2 -2
- package/dist/family__ir.mjs +3 -3
- package/dist/family__migration.d.mts +1 -1
- package/dist/family__migration.mjs +1 -1
- package/dist/family__pack.mjs +2 -2
- package/dist/family__runtime.d.mts +2 -2
- package/dist/family__runtime.mjs +1 -1
- package/dist/family__schema-verify.d.mts +1 -1
- package/dist/family__schema-verify.mjs +1 -1
- package/dist/{field-accessor-DHsAPiW3-iwRb2vC-.d.mts → field-accessor-DHsAPiW3-mw_sFEGx.d.mts} +3 -3
- package/dist/{field-accessor-DHsAPiW3-iwRb2vC-.d.mts.map → field-accessor-DHsAPiW3-mw_sFEGx.d.mts.map} +1 -1
- package/dist/{index-s1CL1J5A.d.mts → index-BpA_pfO1.d.mts} +4 -4
- package/dist/{index-s1CL1J5A.d.mts.map → index-BpA_pfO1.d.mts.map} +1 -1
- package/dist/{index-BfSjP_y5.d.mts → index-DJLkZc6k.d.mts} +3 -3
- package/dist/{index-BfSjP_y5.d.mts.map → index-DJLkZc6k.d.mts.map} +1 -1
- package/dist/{index-D-8mmTbj.d.mts → index-Db33rU3r.d.mts} +3 -3
- package/dist/{index-D-8mmTbj.d.mts.map → index-Db33rU3r.d.mts.map} +1 -1
- package/dist/{index-B-iG-2je.d.mts → index-XiYJVhuE.d.mts} +3 -3
- package/dist/{index-B-iG-2je.d.mts.map → index-XiYJVhuE.d.mts.map} +1 -1
- package/dist/{index-BUYcBNdw.d.mts → index-b-S3URri.d.mts} +50 -30
- package/dist/index-b-S3URri.d.mts.map +1 -0
- package/dist/{interpreter-D1CQbops-C_hzRtYe.mjs → interpreter-DPALasb4-BORWXsN5.mjs} +98 -103
- package/dist/interpreter-DPALasb4-BORWXsN5.mjs.map +1 -0
- package/dist/{ir-Dun4Br3Q.d.mts → ir-9VhpVaDJ.d.mts} +5 -5
- package/dist/{ir-Dun4Br3Q.d.mts.map → ir-9VhpVaDJ.d.mts.map} +1 -1
- package/dist/{ir-Ch2aPr7a.mjs → ir-vZWjElPY.mjs} +2 -2
- package/dist/{ir-Ch2aPr7a.mjs.map → ir-vZWjElPY.mjs.map} +1 -1
- package/dist/lowering.d.mts +1 -1
- package/dist/{migration-Cs9Lwv2y.d.mts → migration-9n6DCvlw.d.mts} +5 -5
- package/dist/{migration-Cs9Lwv2y.d.mts.map → migration-9n6DCvlw.d.mts.map} +1 -1
- package/dist/{migration-BsJgtw77.mjs → migration-DofqFxoZ.mjs} +2 -2
- package/dist/{migration-BsJgtw77.mjs.map → migration-DofqFxoZ.mjs.map} +1 -1
- package/dist/{mongo-contract-serializer-DC_DM9_Y-MJjsJZwM.mjs → mongo-contract-serializer-DC_DM9_Y-CDk1Veya.mjs} +6 -6
- package/dist/{mongo-contract-serializer-DC_DM9_Y-MJjsJZwM.mjs.map → mongo-contract-serializer-DC_DM9_Y-CDk1Veya.mjs.map} +1 -1
- package/dist/{mongo-contract-view-AnejqfrQ-nd-SP6W4.d.mts → mongo-contract-view-AnejqfrQ-DLhDjvsh.d.mts} +3 -3
- package/dist/{mongo-contract-view-AnejqfrQ-nd-SP6W4.d.mts.map → mongo-contract-view-AnejqfrQ-DLhDjvsh.d.mts.map} +1 -1
- package/dist/{mongo-contract-view-JZOa0Ry--BTfPzsVC.mjs → mongo-contract-view-JZOa0Ry--BL8lTjbw.mjs} +3 -3
- package/dist/{mongo-contract-view-JZOa0Ry--BTfPzsVC.mjs.map → mongo-contract-view-JZOa0Ry--BL8lTjbw.mjs.map} +1 -1
- package/dist/{mongo-value-set-tNn9-pun-dJYx_rVD.d.mts → mongo-value-set-BngSUlOh-BhDGXjM_.d.mts} +3 -3
- package/dist/{mongo-value-set-tNn9-pun-dJYx_rVD.d.mts.map → mongo-value-set-BngSUlOh-BhDGXjM_.d.mts.map} +1 -1
- package/dist/orm.d.mts +2 -2
- package/dist/orm.mjs +3 -3
- package/dist/query-ast.d.mts +2 -2
- package/dist/query-ast__control.d.mts +2 -2
- package/dist/query-builder.d.mts +3 -3
- package/dist/query-builder.mjs +1 -1
- package/dist/query-builder__contract-free.d.mts +3 -3
- package/dist/{runtime-BPRKmAdg.d.mts → runtime-F95l7p-U.d.mts} +3 -3
- package/dist/runtime-F95l7p-U.d.mts.map +1 -0
- package/dist/runtime.d.mts +1 -1
- package/dist/schema-ir.d.mts +1 -1
- package/dist/{schema-verify-BQA8oyKJ.d.mts → schema-verify-DehTbLkM.d.mts} +4 -4
- package/dist/{schema-verify-BQA8oyKJ.d.mts.map → schema-verify-DehTbLkM.d.mts.map} +1 -1
- package/dist/{verify-mongo-schema-B0bMHQW0-DSZhsvrk.mjs → verify-mongo-schema-B0bMHQW0-BuK0Jv5S.mjs} +3 -3
- package/dist/{verify-mongo-schema-B0bMHQW0-DSZhsvrk.mjs.map → verify-mongo-schema-B0bMHQW0-BuK0Jv5S.mjs.map} +1 -1
- package/dist/wire.d.mts +1 -1
- package/package.json +21 -19
- package/dist/canonicalization-hooks-BXCTdx8s.mjs.map +0 -1
- package/dist/control-BtmriDhU.mjs.map +0 -1
- package/dist/control-adapter-Bjc81f8y.d.mts +0 -1
- package/dist/dist-B4a9eijw.mjs.map +0 -1
- package/dist/index-BUYcBNdw.d.mts.map +0 -1
- package/dist/interpreter-D1CQbops-C_hzRtYe.mjs.map +0 -1
- package/dist/runtime-BPRKmAdg.d.mts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dist-DsIID5AE.mjs","names":[],"sources":["../../../../2-mongo-family/1-foundation/mongo-contract/dist/index.mjs"],"sourcesContent":["import { t as mongoContractCanonicalizationHooks } from \"./canonicalization-hooks-CRVM-Kqh.mjs\";\nimport { a as MongoCollection, c as MongoCollectionOptions, d as MongoCollationOptions, f as MongoChangeStreamPreAndPostImagesOptions, g as createMongoNamespaceEnvelopeSchema, h as createMongoContractSchema, i as MongoValueSet, l as MongoTimeSeriesCollectionOptions, m as StorageValueSetSchema, n as composeMongoEntityKinds, o as MongoValidator, p as MongoContractSchema, s as MongoIndex, u as MongoIndexOptionDefaults } from \"./entity-kinds-BFgLffz7.mjs\";\nimport { RelationKeys } from \"@internal/framework-components/runtime\";\nimport { computeExecutionHash, computeStorageHash } from \"@internal/contract/hashing\";\nimport { errorEnumCodecNotInPackStack } from \"@internal/errors/control\";\nimport { IRNodeBase, NamespaceBase, UNBOUND_NAMESPACE_ID, buildNamespacedEntities, buildSingleNamespaceView, freezeNode, hydrateNamespaceEntities } from \"@internal/framework-components/ir\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { UNBOUND_DOMAIN_NAMESPACE_ID } from \"@internal/contract/default-namespace\";\n//#region src/build-execution-section.ts\nfunction compareCodeUnits(a, b) {\n\treturn a < b ? -1 : a > b ? 1 : 0;\n}\nfunction compareRefs(a, b) {\n\treturn compareCodeUnits(a.ref.namespace, b.ref.namespace) || compareCodeUnits(a.ref.entry, b.ref.entry) || compareCodeUnits(a.ref.field, b.ref.field);\n}\n/**\n* Builds a Mongo contract's `execution` section from its mutation defaults: sorted by namespace, entry and field, and hashed. PSL and TS authoring both call this, so the two paths emit the same section and hash.\n*/\nfunction buildMongoExecutionSection(defaults) {\n\tif (defaults.length === 0) return;\n\tconst execution = { mutations: { defaults: [...defaults].sort(compareRefs) } };\n\treturn {\n\t\texecutionHash: computeExecutionHash({\n\t\t\ttarget: \"mongo\",\n\t\t\ttargetFamily: \"mongo\",\n\t\t\texecution\n\t\t}),\n\t\t...execution\n\t};\n}\n//#endregion\n//#region src/ir/mongo-unbound-namespace.ts\nvar MongoUnboundNamespace = class MongoUnboundNamespace extends NamespaceBase {\n\tstatic instance = new MongoUnboundNamespace();\n\tid = UNBOUND_NAMESPACE_ID;\n\tentries = Object.freeze({ collection: Object.freeze({}) });\n\tconstructor() {\n\t\tsuper();\n\t\tObject.defineProperty(this, \"kind\", {\n\t\t\tvalue: \"mongo-namespace\",\n\t\t\twritable: false,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true\n\t\t});\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/ir/build-mongo-namespace.ts\nconst MONGO_NAMESPACE_KIND = \"mongo-namespace\";\nvar MongoBoundNamespace = class MongoBoundNamespace extends NamespaceBase {\n\tid;\n\tentries;\n\tstatic fromCollectionsInput(input) {\n\t\tconst collectionMap = input.entries[\"collection\"];\n\t\tconst collectionCount = collectionMap !== void 0 ? Object.keys(collectionMap).length : 0;\n\t\tconst hasUnknownKinds = Object.keys(input.entries).some((kind) => kind !== \"collection\");\n\t\tif (input.id === UNBOUND_NAMESPACE_ID && collectionCount === 0 && !hasUnknownKinds) return MongoUnboundNamespace.instance;\n\t\treturn new MongoBoundNamespace(input);\n\t}\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.id = input.id;\n\t\tconst rawEntries = {\n\t\t\tcollection: {},\n\t\t\t...input.entries\n\t\t};\n\t\tthis.entries = Object.freeze(blindCast(hydrateNamespaceEntities(rawEntries, composeMongoEntityKinds(), \"carry\")));\n\t\tObject.defineProperty(this, \"kind\", {\n\t\t\tvalue: MONGO_NAMESPACE_KIND,\n\t\t\twritable: false,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true\n\t\t});\n\t\tfreezeNode(this);\n\t}\n\tget collection() {\n\t\treturn this.entries.collection ?? Object.freeze({});\n\t}\n};\nfunction buildMongoNamespace(input) {\n\treturn MongoBoundNamespace.fromCollectionsInput(input);\n}\n//#endregion\n//#region src/ir/mongo-storage.ts\nvar MongoStorage = class extends IRNodeBase {\n\tstorageHash;\n\tnamespaces;\n\tconstructor(input) {\n\t\tsuper();\n\t\tObject.defineProperty(this, \"kind\", {\n\t\t\tvalue: \"mongo-storage\",\n\t\t\twritable: false,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true\n\t\t});\n\t\tthis.storageHash = input.storageHash;\n\t\tthis.namespaces = Object.freeze(input.namespaces);\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/build-mongo-storage.ts\nfunction encodeEnumValue(value, codecId, codecLookup) {\n\tconst codec = codecLookup.get(codecId);\n\tif (!codec) throw errorEnumCodecNotInPackStack({ codecId });\n\treturn codec.encodeJson(value);\n}\n/**\n* Encodes each enum's members through the enum's codec into a storage value set. An enum whose codec the lookup cannot resolve is an error: the codec is not part of the contract's pack stack.\n*/\nfunction encodeMongoValueSets(enums, codecLookup) {\n\tconst valueSets = {};\n\tfor (const [enumName, { codecId, members }] of Object.entries(enums)) valueSets[enumName] = {\n\t\tkind: \"valueSet\",\n\t\tvalues: members.map((member) => encodeEnumValue(member.value, codecId, codecLookup))\n\t};\n\treturn valueSets;\n}\n/**\n* Builds a Mongo contract's storage: the unbound namespace holding the collections and value sets, and the storage hash that `db sign` and `db verify` compare. Every Mongo contract source calls this, so they hash storage the same way.\n*/\nfunction buildMongoStorage(input) {\n\tconst hasValueSets = Object.keys(input.valueSets).length > 0;\n\tconst namespace = buildMongoNamespace({\n\t\tid: UNBOUND_NAMESPACE_ID,\n\t\tentries: {\n\t\t\tcollection: input.collections,\n\t\t\t...hasValueSets ? { valueSet: input.valueSets } : {}\n\t\t}\n\t});\n\treturn new MongoStorage({\n\t\tstorageHash: computeStorageHash({\n\t\t\ttarget: \"mongo\",\n\t\t\ttargetFamily: \"mongo\",\n\t\t\tstorage: { namespaces: { [UNBOUND_NAMESPACE_ID]: {\n\t\t\t\tid: UNBOUND_NAMESPACE_ID,\n\t\t\t\tentries: {\n\t\t\t\t\tcollection: namespace.entries.collection,\n\t\t\t\t\t...namespace.entries.valueSet !== void 0 ? { valueSet: namespace.entries.valueSet } : {}\n\t\t\t\t}\n\t\t\t} } },\n\t\t\t...mongoContractCanonicalizationHooks\n\t\t}),\n\t\tnamespaces: { [UNBOUND_NAMESPACE_ID]: namespace }\n\t});\n}\n//#endregion\n//#region src/contract-view.ts\nconst MONGO_BUILTIN_KINDS = [\"collection\"];\n/**\n* Builds the Mongo view: unwraps the sole namespace's built-in `collection` kind\n* to the root, attaches the namespace-keyed `namespace` map, and layers both\n* over the deserialized contract so the result is a structural superset of the\n* contract.\n*/\nfunction buildMongoContractView(contract) {\n\tconst rootAccessors = buildSingleNamespaceView(contract.storage, MONGO_BUILTIN_KINDS);\n\tconst namespace = buildNamespacedEntities(contract.storage, MONGO_BUILTIN_KINDS);\n\treturn {\n\t\t...contract,\n\t\t...rootAccessors,\n\t\tnamespace\n\t};\n}\n//#endregion\n//#region src/default-namespace.ts\n/** Default storage namespace for Mongo-family contracts at runtime. */\nconst defaultMongoStorageNamespaceId = UNBOUND_NAMESPACE_ID;\n/** Default domain namespace for Mongo-family contracts at runtime. */\nconst defaultMongoDomainNamespaceId = UNBOUND_DOMAIN_NAMESPACE_ID;\n//#endregion\n//#region src/ir/mongo-clustered-collection-options.ts\n/**\n* Clustered-collection options (the `clusteredIndex` collection-creation\n* field). Lifted from a `type =` data shape to an AST class extending\n* `IRNodeBase` per FR18.\n*\n* MongoDB requires `key` and `unique` for any clustered collection; the\n* constructor enforces presence by type signature.\n*/\nvar MongoClusteredCollectionOptions = class extends IRNodeBase {\n\tkind = \"mongo-clustered-collection-options\";\n\tkey;\n\tunique;\n\tconstructor(options) {\n\t\tsuper();\n\t\tif (options.name !== void 0) this.name = options.name;\n\t\tthis.key = options.key;\n\t\tthis.unique = options.unique;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/ir/mongo-index-options.ts\n/**\n* Mongo Contract IR node for the per-index option vocabulary (the second\n* argument to `db.collection.createIndex(keys, options)` minus the keys\n* themselves). Lifted from a `type =` data shape to an AST class\n* extending `IRNodeBase` per FR18.\n*\n* Nested `collation` is itself an IR class (`MongoCollationOptions`); the\n* constructor accepts either a class instance or a data literal and\n* normalises to the class form so downstream walks see a uniform IR tree.\n*/\nvar MongoIndexOptions = class extends IRNodeBase {\n\tkind = \"mongo-index-options\";\n\tconstructor(options = {}) {\n\t\tsuper();\n\t\tif (options.unique !== void 0) this.unique = options.unique;\n\t\tif (options.name !== void 0) this.name = options.name;\n\t\tif (options.partialFilterExpression !== void 0) this.partialFilterExpression = options.partialFilterExpression;\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.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\tif (options.textIndexVersion !== void 0) this.textIndexVersion = options.textIndexVersion;\n\t\tif (options[\"2dsphereIndexVersion\"] !== void 0) this[\"2dsphereIndexVersion\"] = options[\"2dsphereIndexVersion\"];\n\t\tif (options.bits !== void 0) this.bits = options.bits;\n\t\tif (options.min !== void 0) this.min = options.min;\n\t\tif (options.max !== void 0) this.max = options.max;\n\t\tif (options.bucketSize !== void 0) this.bucketSize = options.bucketSize;\n\t\tif (options.hidden !== void 0) this.hidden = options.hidden;\n\t\tif (options.collation !== void 0) this.collation = options.collation instanceof MongoCollationOptions ? options.collation : new MongoCollationOptions(options.collation);\n\t\tif (options.wildcardProjection !== void 0) this.wildcardProjection = options.wildcardProjection;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/polymorphic-index-scope.ts\nfunction isScalarDiscriminatorValue(value) {\n\tconst t = typeof value;\n\treturn t === \"string\" || t === \"number\" || t === \"boolean\";\n}\nfunction formatValue(value) {\n\tif (typeof value === \"string\") return JSON.stringify(value);\n\tif (value === null) return \"null\";\n\tif (Array.isArray(value)) return JSON.stringify(value);\n\tif (typeof value === \"object\") return JSON.stringify(value);\n\treturn String(value);\n}\nfunction applyPolymorphicScopeToMongoIndex(index, scope) {\n\tif (!isScalarDiscriminatorValue(scope.discriminatorValue)) return {\n\t\tkind: \"conflict\",\n\t\treason: `Variant-scoped indexes require a scalar (string, number, or boolean) discriminator value for field \"${scope.discriminatorField}\", but received ${formatValue(scope.discriminatorValue)}.`\n\t};\n\tconst existing = index.partialFilterExpression;\n\tif (existing && Object.hasOwn(existing, scope.discriminatorField)) {\n\t\tconst existingValue = existing[scope.discriminatorField];\n\t\tif (existingValue === scope.discriminatorValue) return {\n\t\t\tkind: \"ok\",\n\t\t\tindex\n\t\t};\n\t\treturn {\n\t\t\tkind: \"conflict\",\n\t\t\treason: `Index partialFilterExpression sets \"${scope.discriminatorField}\" to ${formatValue(existingValue)}, which conflicts with the variant's discriminator value ${formatValue(scope.discriminatorValue)}.`\n\t\t};\n\t}\n\tconst merged = {\n\t\t...existing ?? {},\n\t\t[scope.discriminatorField]: scope.discriminatorValue\n\t};\n\treturn {\n\t\tkind: \"ok\",\n\t\tindex: new MongoIndex({\n\t\t\tkeys: index.keys,\n\t\t\t...index.unique !== void 0 && { unique: index.unique },\n\t\t\t...index.sparse !== void 0 && { sparse: index.sparse },\n\t\t\t...index.expireAfterSeconds !== void 0 && { expireAfterSeconds: index.expireAfterSeconds },\n\t\t\tpartialFilterExpression: merged,\n\t\t\t...index.wildcardProjection !== void 0 && { wildcardProjection: index.wildcardProjection },\n\t\t\t...index.collation !== void 0 && { collation: index.collation },\n\t\t\t...index.weights !== void 0 && { weights: index.weights },\n\t\t\t...index.default_language !== void 0 && { default_language: index.default_language },\n\t\t\t...index.language_override !== void 0 && { language_override: index.language_override }\n\t\t})\n\t};\n}\n//#endregion\n//#region src/relation-fields.ts\nconst DOCUMENT_ID_FIELD = \"_id\";\n/**\n* The model facts behind a same-space to-one relation's nullability: which side owns the\n* foreign key, and whether each local field is nullable.\n*/\nfunction resolveMongoToOneRelationFields(model, relation) {\n\tconst fields = relation.on.localFields.map((name) => ({\n\t\tname,\n\t\tnullable: model.fields[name]?.nullable ?? true\n\t}));\n\treturn {\n\t\townsForeignKey: !(relation.cardinality === \"1:1\" && fields.every((field) => field.name === DOCUMENT_ID_FIELD)),\n\t\tfields\n\t};\n}\n//#endregion\n//#region src/validate-storage.ts\nfunction formatCrossRef(crossRef) {\n\treturn `${crossRef.namespace}.${crossRef.model}`;\n}\nfunction storageDeclaresCollection(storage, collectionName) {\n\tfor (const ns of Object.values(storage.namespaces)) if (Object.hasOwn(ns.entries[\"collection\"] ?? {}, collectionName)) return true;\n\treturn false;\n}\nfunction validateMongoStorage(contract) {\n\tconst errors = [];\n\tfor (const [namespaceId, namespace] of Object.entries(contract.domain.namespaces)) {\n\t\tconst models = namespace.models;\n\t\tfor (const [modelName, model] of Object.entries(models)) {\n\t\t\tconst qualifiedName = `${namespaceId}:${modelName}`;\n\t\t\tif (model.storage.collection && !storageDeclaresCollection(contract.storage, model.storage.collection)) errors.push(`Model \"${qualifiedName}\" references collection \"${model.storage.collection}\" which is not declared under any namespace's collections map`);\n\t\t\tif (model.base) {\n\t\t\t\tconst baseModel = models[model.base.model];\n\t\t\t\tif (baseModel) {\n\t\t\t\t\tconst variantCollection = model.storage.collection;\n\t\t\t\t\tconst baseCollection = baseModel.storage.collection;\n\t\t\t\t\tif (variantCollection !== baseCollection) errors.push(`Mongo does not support multi-table inheritance; variant \"${qualifiedName}\" must share its base's collection (\"${baseCollection ?? \"(none)\"}\"), but has \"${variantCollection ?? \"(none)\"}\"`);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const [relName, relation] of Object.entries(model.relations ?? {})) {\n\t\t\t\tconst targetModel = models[relation.to.model];\n\t\t\t\tconst targetLabel = formatCrossRef(relation.to);\n\t\t\t\tif (targetModel?.owner) {\n\t\t\t\t\tif (targetModel.owner !== modelName) errors.push(`Embed relation \"${relName}\" targets \"${targetLabel}\" which is owned by \"${targetModel.owner}\", not \"${qualifiedName}\"`);\n\t\t\t\t\tif (targetModel.storage.collection) errors.push(`Embed relation \"${relName}\" targets \"${targetLabel}\" which must not have a collection`);\n\t\t\t\t} else if (\"on\" in relation && relation.on) {\n\t\t\t\t\tfor (const localField of relation.on.localFields) if (!(localField in model.fields)) errors.push(`Reference relation \"${relName}\": localField \"${localField}\" is not a field on model \"${qualifiedName}\"`);\n\t\t\t\t\tif (targetModel) {\n\t\t\t\t\t\tfor (const targetField of relation.on.targetFields) if (!(targetField in targetModel.fields)) errors.push(`Reference relation \"${relName}\": targetField \"${targetField}\" is not a field on model \"${targetLabel}\"`);\n\t\t\t\t\t}\n\t\t\t\t\tconst nullabilityError = toOneRelationNullabilityError(qualifiedName, relName, relation, model);\n\t\t\t\t\tif (nullabilityError !== void 0) errors.push(nullabilityError);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif (errors.length > 0) throw structuredError(\"CONTRACT.VALIDATION_FAILED\", `Contract storage validation failed:\\n- ${errors.join(\"\\n- \")}`);\n}\n/**\n* A same-space to-one relation that states `nullable` must agree with its local fields: nullable\n* exactly when one of them is nullable (a field that is not declared counts as nullable). A\n* relation without the flag is left to hydration, which derives it the same way.\n*/\nfunction toOneRelationNullabilityError(qualifiedName, relationName, relation, model) {\n\tif (!(\"on\" in relation && (relation.cardinality === \"1:1\" || relation.cardinality === \"N:1\") && relation.to.space === void 0) || relation.nullable === void 0) return void 0;\n\tconst location = `Relation \"${relationName}\" on model \"${qualifiedName}\"`;\n\tconst { ownsForeignKey, fields } = resolveMongoToOneRelationFields(model, relation);\n\tif (!ownsForeignKey) return relation.nullable ? void 0 : `${location} is required but does not own the foreign key, so nothing in storage guarantees the related document exists`;\n\tconst anyNullable = fields.some((field) => field.nullable);\n\tif (relation.nullable === anyNullable) return void 0;\n\tconst fieldList = fields.filter((field) => field.nullable !== relation.nullable).map((field) => `\"${field.name}\"`).join(\", \");\n\treturn relation.nullable ? `${location} is nullable but every local field is required (fields ${fieldList})` : `${location} is required but a local field is nullable (fields ${fieldList})`;\n}\n//#endregion\nexport { MongoChangeStreamPreAndPostImagesOptions, MongoClusteredCollectionOptions, MongoCollationOptions, MongoCollection, MongoCollectionOptions, MongoContractSchema, MongoIndex, MongoIndexOptionDefaults, MongoIndexOptions, MongoStorage, MongoTimeSeriesCollectionOptions, MongoUnboundNamespace, MongoValidator, MongoValueSet, RelationKeys, StorageValueSetSchema, applyPolymorphicScopeToMongoIndex, buildMongoContractView, buildMongoExecutionSection, buildMongoNamespace, buildMongoStorage, createMongoContractSchema, createMongoNamespaceEnvelopeSchema, defaultMongoDomainNamespaceId, defaultMongoStorageNamespaceId, encodeMongoValueSets, resolveMongoTo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,SAAS;CACrE,MAAM,cAAc,OAAO,MAAM,UAAU,MAAM,QAAQ;CACzD,IAAI,SAAS,aAAa,aAAa,OAAO,KAAK;CACnD,MAAM,YAAY,OAAO,QAAQ,UAAU,MAAM,aAAa,SAAS,QAAQ,CAAC,CAAC,KAAK,UAAU,IAAI,MAAM,KAAK,EAAE,CAAC,CAAC,KAAK,IAAI;CAC5H,OAAO,SAAS,WAAW,GAAG,SAAS,yDAAyD,UAAU,KAAK,GAAG,SAAS,qDAAqD,UAAU;AAC3L"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
2
|
+
import { IRNodeBase, freezeNode } from "@prisma/orm-framework/components/ir";
|
|
2
3
|
import { ContractExecutionSectionSchema, CrossReferenceSchema } from "@prisma/orm-framework/contract/types";
|
|
3
4
|
import { type } from "arktype";
|
|
4
|
-
|
|
5
|
-
//#region ../../../2-mongo-family/1-foundation/mongo-contract/dist/entity-kinds-FlR_bJNA.mjs
|
|
5
|
+
//#region ../../../2-mongo-family/1-foundation/mongo-contract/dist/entity-kinds-BFgLffz7.mjs
|
|
6
6
|
const ControlPolicySchema = type("'managed' | 'tolerated' | 'external' | 'observed'");
|
|
7
7
|
const ScalarFieldTypeSchema = type({
|
|
8
8
|
"+": "reject",
|
|
@@ -615,4 +615,4 @@ function composeMongoEntityKinds(packKinds = []) {
|
|
|
615
615
|
//#endregion
|
|
616
616
|
export { MongoContractSchema as a, MongoTimeSeriesCollectionOptions as c, StorageValueSetSchema as d, collectionEntityKind as f, valueSetEntityKind as g, createMongoNamespaceEnvelopeSchema as h, MongoCollectionOptions as i, MongoValidator as l, createMongoContractSchema as m, MongoCollationOptions as n, MongoIndex as o, composeMongoEntityKinds as p, MongoCollection as r, MongoIndexOptionDefaults as s, MongoChangeStreamPreAndPostImagesOptions as t, MongoValueSet as u };
|
|
617
617
|
|
|
618
|
-
//# sourceMappingURL=entity-kinds-
|
|
618
|
+
//# sourceMappingURL=entity-kinds-BFgLffz7-D8WUc2oo.mjs.map
|
package/dist/{entity-kinds-FlR_bJNA-D4NYzPhs.mjs.map → entity-kinds-BFgLffz7-D8WUc2oo.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-kinds-FlR_bJNA-D4NYzPhs.mjs","names":[],"sources":["../../../../2-mongo-family/1-foundation/mongo-contract/dist/entity-kinds-FlR_bJNA.mjs"],"sourcesContent":["import { ContractExecutionSectionSchema, CrossReferenceSchema } from \"@internal/contract/types\";\nimport { type } from \"arktype\";\nimport { IRNodeBase, freezeNode } from \"@internal/framework-components/ir\";\nimport { structuredError } from \"@internal/utils/structured-error\";\n//#region src/contract-schema.ts\nconst ControlPolicySchema = type(\"'managed' | 'tolerated' | 'external' | 'observed'\");\nconst ScalarFieldTypeSchema = type({\n\t\"+\": \"reject\",\n\tkind: \"'scalar'\",\n\tcodecId: \"string\",\n\t\"typeParams?\": \"Record<string, unknown>\"\n});\nconst ValueObjectFieldTypeSchema = type({\n\t\"+\": \"reject\",\n\tkind: \"'valueObject'\",\n\tname: \"string\"\n});\nconst UnionFieldTypeSchema = type({\n\t\"+\": \"reject\",\n\tkind: \"'union'\",\n\tmembers: ScalarFieldTypeSchema.or(ValueObjectFieldTypeSchema).array()\n});\nconst FieldTypeSchema = ScalarFieldTypeSchema.or(ValueObjectFieldTypeSchema).or(UnionFieldTypeSchema);\nconst DomainEnumRefSchema = type({\n\tplane: \"'domain'\",\n\tnamespaceId: \"string\",\n\tentityKind: \"'enum'\",\n\tentityName: \"string\",\n\t\"spaceId?\": \"string\"\n});\nconst ContractEnumSchema = type({\n\t\"+\": \"reject\",\n\tcodecId: \"string\",\n\tmembers: type({\n\t\tname: \"string\",\n\t\tvalue: \"string | number | boolean | null | unknown[] | Record<string, unknown>\"\n\t}).array().atLeastLength(1).readonly()\n});\nconst FieldSchema = type({\n\t\"+\": \"reject\",\n\ttype: FieldTypeSchema,\n\t\"nullable?\": \"boolean\",\n\t\"many?\": \"boolean\",\n\t\"dict?\": \"boolean\",\n\t\"valueSet?\": DomainEnumRefSchema\n}).pipe((field) => ({\n\t...field,\n\tnullable: field.nullable ?? false\n}));\nconst RelationOnSchema = type({\n\t\"+\": \"reject\",\n\tlocalFields: \"string[]\",\n\ttargetFields: \"string[]\"\n});\nconst ToOneReferenceRelationSchema = type({\n\t\"+\": \"reject\",\n\tto: CrossReferenceSchema,\n\tcardinality: \"'1:1' | 'N:1'\",\n\t\"nullable?\": \"boolean\",\n\ton: RelationOnSchema\n});\nconst ToManyReferenceRelationSchema = type({\n\t\"+\": \"reject\",\n\tto: CrossReferenceSchema,\n\tcardinality: \"'1:N'\",\n\ton: RelationOnSchema\n});\nconst EmbedRelationSchema = type({\n\t\"+\": \"reject\",\n\tto: CrossReferenceSchema,\n\tcardinality: \"'1:1' | '1:N'\"\n});\nconst RelationSchema = ToOneReferenceRelationSchema.or(ToManyReferenceRelationSchema).or(EmbedRelationSchema);\nconst StorageRelationEntrySchema = type({\n\t\"+\": \"reject\",\n\tfield: \"string\"\n});\nconst MongoJsonPrimitiveSchema = type.declare().type(\"string | number | boolean | null\");\nfunction isMongoJsonRecord(value) {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) return false;\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === Object.prototype || prototype === null;\n}\nfunction withUnseenReference(value, seen, visit) {\n\tif (seen.has(value)) return false;\n\tseen.add(value);\n\tconst result = visit();\n\tseen.delete(value);\n\treturn result;\n}\nfunction isMongoJsonObject(value, seen) {\n\treturn isMongoJsonRecord(value) && withUnseenReference(value, seen, () => Object.values(value).every((entry) => isMongoJsonValue(entry, seen)));\n}\nfunction isMongoJsonValue(value, seen = /* @__PURE__ */ new WeakSet()) {\n\tif (MongoJsonPrimitiveSchema.allows(value)) return true;\n\tif (Array.isArray(value)) return withUnseenReference(value, seen, () => value.every((entry) => isMongoJsonValue(entry, seen)));\n\treturn isMongoJsonObject(value, seen);\n}\nconst MongoJsonValueSchema = type(\"unknown\").narrow((value, ctx) => isMongoJsonValue(value) ? true : ctx.mustBe(\"a JSON-serializable MongoJsonValue\"));\nconst MongoJsonObjectSchema = type({ \"[string]\": \"unknown\" }).narrow((value, ctx) => isMongoJsonRecord(value) && Object.values(value).every((entry) => MongoJsonValueSchema.allows(entry)) ? true : ctx.mustBe(\"a JSON object with MongoJsonValue entries\"));\nconst NumberRecordSchema = type({ \"[string]\": \"number\" });\nconst IndexFieldsSchema = type({\n\t\"+\": \"reject\",\n\t\"[string]\": \"1 | -1 | \\\"text\\\" | \\\"2dsphere\\\" | \\\"2d\\\" | \\\"hashed\\\"\"\n}).narrow((fields, ctx) => Object.keys(fields).length > 0 ? true : ctx.mustBe(\"an index field map with at least one entry\"));\nconst CollationSchema = type({\n\t\"+\": \"reject\",\n\t\"kind?\": \"'mongo-collation-options'\",\n\tlocale: \"string\",\n\t\"caseLevel?\": \"boolean\",\n\t\"caseFirst?\": \"\\\"off\\\" | \\\"upper\\\" | \\\"lower\\\"\",\n\t\"strength?\": \"1 | 2 | 3 | 4 | 5\",\n\t\"numericOrdering?\": \"boolean\",\n\t\"alternate?\": \"\\\"non-ignorable\\\" | \\\"shifted\\\"\",\n\t\"maxVariable?\": \"\\\"punct\\\" | \\\"space\\\"\",\n\t\"backwards?\": \"boolean\",\n\t\"normalization?\": \"boolean\"\n});\nconst IndexOptionDefaultsSchema = type({\n\t\"+\": \"reject\",\n\t\"kind?\": \"'mongo-index-option-defaults'\",\n\t\"storageEngine?\": MongoJsonObjectSchema\n});\nconst TimeSeriesCollectionOptionsSchema = type({\n\t\"+\": \"reject\",\n\t\"kind?\": \"'mongo-time-series-collection-options'\",\n\ttimeField: \"string\",\n\t\"metaField?\": \"string\",\n\t\"granularity?\": \"\\\"seconds\\\" | \\\"minutes\\\" | \\\"hours\\\"\",\n\t\"bucketMaxSpanSeconds?\": \"number\",\n\t\"bucketRoundingSeconds?\": \"number\"\n});\nconst ClusteredCollectionOptionsSchema = type({\n\t\"+\": \"reject\",\n\t\"kind?\": \"'mongo-clustered-collection-options'\",\n\t\"name?\": \"string\",\n\tkey: type({\n\t\t\"+\": \"reject\",\n\t\t\"[string]\": \"1\"\n\t}).narrow((key, ctx) => Object.keys(key).length > 0 ? true : ctx.mustBe(\"a clustered index key map with at least one entry\")),\n\tunique: \"boolean\"\n});\nconst ChangeStreamPreAndPostImagesSchema = type({\n\t\"+\": \"reject\",\n\t\"kind?\": \"'mongo-change-stream-pre-and-post-images-options'\",\n\tenabled: \"boolean\"\n});\ntype({\n\t\"+\": \"reject\",\n\t\"capped?\": \"boolean\",\n\t\"size?\": \"number\",\n\t\"max?\": \"number\",\n\t\"storageEngine?\": MongoJsonObjectSchema,\n\t\"indexOptionDefaults?\": IndexOptionDefaultsSchema,\n\t\"collation?\": CollationSchema,\n\t\"timeseries?\": TimeSeriesCollectionOptionsSchema,\n\t\"clusteredIndex?\": ClusteredCollectionOptionsSchema,\n\t\"expireAfterSeconds?\": \"number\",\n\t\"changeStreamPreAndPostImages?\": ChangeStreamPreAndPostImagesSchema\n});\nconst ModelStorageSchema = type({\n\t\"+\": \"reject\",\n\t\"collection?\": \"string\",\n\t\"relations?\": type({ \"[string]\": StorageRelationEntrySchema })\n});\nconst DiscriminatorSchema = type({\n\t\"+\": \"reject\",\n\tfield: \"string\"\n});\nconst VariantEntrySchema = type({\n\t\"+\": \"reject\",\n\tvalue: \"string\"\n});\nconst ModelDefinitionSchema = type({\n\t\"+\": \"reject\",\n\tfields: type({ \"[string]\": FieldSchema }),\n\tstorage: ModelStorageSchema,\n\t\"relations?\": type({ \"[string]\": RelationSchema }),\n\t\"discriminator?\": DiscriminatorSchema,\n\t\"variants?\": type({ \"[string]\": VariantEntrySchema }),\n\t\"base?\": CrossReferenceSchema,\n\t\"owner?\": \"string\"\n});\ntype({\n\t\"+\": \"reject\",\n\tfields: IndexFieldsSchema,\n\t\"options?\": type({\n\t\t\"+\": \"reject\",\n\t\t\"kind?\": \"'mongo-index-options'\",\n\t\t\"unique?\": \"boolean\",\n\t\t\"name?\": \"string\",\n\t\t\"partialFilterExpression?\": MongoJsonObjectSchema,\n\t\t\"sparse?\": \"boolean\",\n\t\t\"expireAfterSeconds?\": \"number\",\n\t\t\"weights?\": NumberRecordSchema,\n\t\t\"default_language?\": \"string\",\n\t\t\"language_override?\": \"string\",\n\t\t\"textIndexVersion?\": \"number\",\n\t\t\"2dsphereIndexVersion?\": \"number\",\n\t\t\"bits?\": \"number\",\n\t\t\"min?\": \"number\",\n\t\t\"max?\": \"number\",\n\t\t\"bucketSize?\": \"number\",\n\t\t\"hidden?\": \"boolean\",\n\t\t\"collation?\": CollationSchema,\n\t\t\"wildcardProjection?\": type({\n\t\t\t\"+\": \"reject\",\n\t\t\t\"[string]\": \"0 | 1\"\n\t\t})\n\t})\n});\nconst MongoStorageIndexSchema = type({\n\t\"+\": \"reject\",\n\t\"kind?\": \"'mongo-index'\",\n\tkeys: type({\n\t\t\"+\": \"reject\",\n\t\tfield: \"string\",\n\t\tdirection: \"1 | -1 | \\\"text\\\" | \\\"2dsphere\\\" | \\\"2d\\\" | \\\"hashed\\\"\"\n\t}).array().atLeastLength(1),\n\t\"unique?\": \"boolean\",\n\t\"sparse?\": \"boolean\",\n\t\"expireAfterSeconds?\": \"number\",\n\t\"partialFilterExpression?\": \"Record<string, unknown>\",\n\t\"wildcardProjection?\": \"Record<string, 0 | 1>\",\n\t\"collation?\": \"Record<string, unknown>\",\n\t\"weights?\": \"Record<string, number>\",\n\t\"default_language?\": \"string\",\n\t\"language_override?\": \"string\"\n});\nconst MongoStorageValidatorSchema = type({\n\t\"+\": \"reject\",\n\t\"kind?\": \"'mongo-validator'\",\n\tjsonSchema: \"Record<string, unknown>\",\n\tvalidationLevel: \"'strict' | 'moderate'\",\n\tvalidationAction: \"'error' | 'warn'\"\n});\nconst MongoCollectionOptionsSchema = type({\n\t\"+\": \"reject\",\n\t\"kind?\": \"'mongo-collection-options'\",\n\t\"capped?\": type({\n\t\t\"+\": \"reject\",\n\t\tsize: \"number\",\n\t\t\"max?\": \"number\"\n\t}),\n\t\"storageEngine?\": MongoJsonObjectSchema,\n\t\"indexOptionDefaults?\": IndexOptionDefaultsSchema,\n\t\"timeseries?\": type({\n\t\t\"+\": \"reject\",\n\t\t\"kind?\": \"'mongo-time-series-collection-options'\",\n\t\ttimeField: \"string\",\n\t\t\"metaField?\": \"string\",\n\t\t\"granularity?\": \"'seconds' | 'minutes' | 'hours'\",\n\t\t\"bucketMaxSpanSeconds?\": \"number\",\n\t\t\"bucketRoundingSeconds?\": \"number\"\n\t}),\n\t\"collation?\": \"Record<string, unknown>\",\n\t\"expireAfterSeconds?\": \"number\",\n\t\"changeStreamPreAndPostImages?\": ChangeStreamPreAndPostImagesSchema,\n\t\"clusteredIndex?\": type({\n\t\t\"+\": \"reject\",\n\t\t\"name?\": \"string\"\n\t})\n});\nconst StorageCollectionSchema = type({\n\t\"+\": \"reject\",\n\t\"kind?\": \"'mongo-collection'\",\n\t\"indexes?\": MongoStorageIndexSchema.array(),\n\t\"validator?\": MongoStorageValidatorSchema,\n\t\"options?\": MongoCollectionOptionsSchema,\n\t\"control?\": ControlPolicySchema\n});\nconst StorageValueSetSchema = type({\n\t\"+\": \"reject\",\n\tkind: \"'valueSet'\",\n\tvalues: type(\"string | number | boolean | null | unknown[] | Record<string, unknown>\").array().readonly()\n});\nfunction collectionEntrySchema(fragments) {\n\tif (fragments === void 0 || fragments.size === 0) return StorageCollectionSchema;\n\treturn type(\"unknown\").narrow((entry, ctx) => {\n\t\tif (typeof entry !== \"object\" || entry === null || Array.isArray(entry)) return ctx.mustBe(\"an object\");\n\t\tconst kind = entry.kind;\n\t\tif (typeof kind === \"string\") {\n\t\t\tconst fragment = fragments.get(kind);\n\t\t\tif (fragment !== void 0) {\n\t\t\t\tconst parsed = fragment(entry);\n\t\t\t\tif (parsed instanceof type.errors) return ctx.reject({ expected: parsed.summary });\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tconst parsed = StorageCollectionSchema(entry);\n\t\tif (parsed instanceof type.errors) return ctx.reject({ expected: parsed.summary });\n\t\treturn true;\n\t});\n}\n/**\n* Builds the per-namespace envelope schema for Mongo storage. Pack\n* contributions are keyed by the descriptor's `discriminator` and\n* validate each entry by matching the entry's `kind` field. Mongo today\n* has no pack contributions; the composition surface exists for symmetry\n* with SQL and as the substrate for future entity kinds.\n*\n* `'kind?': 'string'` because `kind` is non-enumerable on built\n* Mongo namespace IR classes and therefore absent from the wire shape; the\n* type-side narrowing is enforced by the IR class, not by this validator.\n*/\nfunction createMongoNamespaceEnvelopeSchema(fragments) {\n\treturn type({\n\t\t\"+\": \"reject\",\n\t\tid: \"string\",\n\t\t\"kind?\": \"string\",\n\t\tentries: type({\n\t\t\t\"collection?\": type({ \"[string]\": collectionEntrySchema(fragments) }),\n\t\t\t\"valueSet?\": type({ \"[string]\": StorageValueSetSchema })\n\t\t})\n\t}).narrow((ns, ctx) => {\n\t\tif (typeof ns !== \"object\" || ns === null || Array.isArray(ns)) return ctx.mustBe(\"an object\");\n\t\tif (Object.hasOwn(ns, \"collections\") || Object.hasOwn(ns, \"tables\")) return ctx.reject({ expected: \"namespace must use `entries: { collection? }`; flat `collections` / `tables` keys are no longer accepted\" });\n\t\treturn true;\n\t});\n}\n/**\n* Builds the full Mongo contract schema. The per-namespace entry\n* threading happens through {@link createMongoNamespaceEnvelopeSchema};\n* the rest of the envelope is family-shared.\n*/\nfunction createMongoContractSchema(fragments) {\n\tconst namespaceEnvelope = createMongoNamespaceEnvelopeSchema(fragments);\n\treturn type({\n\t\t\"+\": \"reject\",\n\t\ttargetFamily: \"'mongo'\",\n\t\t\"schemaVersion?\": \"string\",\n\t\t\"target?\": \"string\",\n\t\t\"storageHash?\": \"string\",\n\t\t\"profileHash?\": \"string\",\n\t\troots: type({ \"[string]\": CrossReferenceSchema }),\n\t\t\"capabilities?\": \"Record<string, unknown>\",\n\t\t\"extensions?\": \"Record<string, unknown>\",\n\t\t\"meta?\": \"Record<string, unknown>\",\n\t\t\"defaultControlPolicy?\": ControlPolicySchema,\n\t\t\"execution?\": ContractExecutionSectionSchema,\n\t\t\"sources?\": \"Record<string, unknown>\",\n\t\t\"_generated?\": \"Record<string, unknown>\",\n\t\tdomain: type({ namespaces: type({ \"[string]\": type({\n\t\t\tmodels: type({ \"[string]\": ModelDefinitionSchema }),\n\t\t\t\"valueObjects?\": type({ \"[string]\": type({\n\t\t\t\t\"+\": \"reject\",\n\t\t\t\tfields: type({ \"[string]\": FieldSchema })\n\t\t\t}) }),\n\t\t\t\"enum?\": type({ \"[string]\": ContractEnumSchema })\n\t\t}) }) }),\n\t\tstorage: type({\n\t\t\t\"+\": \"reject\",\n\t\t\tnamespaces: type({ \"[string]\": namespaceEnvelope }),\n\t\t\t\"storageHash?\": \"string\"\n\t\t})\n\t});\n}\nconst MongoContractSchema = createMongoContractSchema();\n//#endregion\n//#region src/ir/mongo-change-stream-pre-and-post-images-options.ts\n/**\n* Change-stream pre-and-post-images collection option. Lifted from a\n* `type =` data shape to an AST class extending `IRNodeBase` per\n* FR18. Single-field shape; the class exists for AST-pattern\n* consistency (every nested data shape inside `MongoCollectionOptions`\n* is an AST node so the verifier can walk uniformly).\n*/\nvar MongoChangeStreamPreAndPostImagesOptions = class extends IRNodeBase {\n\tkind = \"mongo-change-stream-pre-and-post-images-options\";\n\tenabled;\n\tconstructor(options) {\n\t\tsuper();\n\t\tthis.enabled = options.enabled;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/ir/mongo-collation-options.ts\n/**\n* Mongo Contract IR leaf for collection / index collation options.\n*\n* Lifted from a `type =` data shape to an AST class extending\n* `IRNodeBase` per FR18 (\"Mongo's Contract IR is fully unified under\n* the AST-class pattern, layered family / target\"). Single concrete class\n* (no target subclass): collation options carry no target-specific\n* variation at this layer — both Atlas and self-hosted Mongo consume the\n* same option vocabulary.\n*\n* Undefined optional fields are not assigned, so `JSON.stringify` omits\n* them from the canonical JSON output (matches the pre-lift data shape's\n* round-trip behaviour, modulo the new `kind` discriminator).\n*/\nvar MongoCollationOptions = class extends IRNodeBase {\n\tkind = \"mongo-collation-options\";\n\tlocale;\n\tconstructor(options) {\n\t\tsuper();\n\t\tthis.locale = options.locale;\n\t\tif (options.caseLevel !== void 0) this.caseLevel = options.caseLevel;\n\t\tif (options.caseFirst !== void 0) this.caseFirst = options.caseFirst;\n\t\tif (options.strength !== void 0) this.strength = options.strength;\n\t\tif (options.numericOrdering !== void 0) this.numericOrdering = options.numericOrdering;\n\t\tif (options.alternate !== void 0) this.alternate = options.alternate;\n\t\tif (options.maxVariable !== void 0) this.maxVariable = options.maxVariable;\n\t\tif (options.backwards !== void 0) this.backwards = options.backwards;\n\t\tif (options.normalization !== void 0) this.normalization = options.normalization;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/ir/mongo-index-option-defaults.ts\n/**\n* Collection-level default index options (the `indexOptionDefaults`\n* collection-creation field on Mongo's `createCollection`). Lifted from\n* a `type =` data shape to an AST class extending `IRNodeBase` per\n* FR18 (Mongo Contract IR fully unified under the AST-class pattern).\n*\n* Carries `storageEngine` only — the underlying MongoDB option set is\n* intentionally narrow at this layer; per-engine richer option vocabularies\n* are out of scope for this project.\n*/\nvar MongoIndexOptionDefaults = class extends IRNodeBase {\n\tkind = \"mongo-index-option-defaults\";\n\tconstructor(options = {}) {\n\t\tsuper();\n\t\tif (options.storageEngine !== void 0) this.storageEngine = options.storageEngine;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/ir/mongo-time-series-collection-options.ts\n/**\n* Time-series collection options. Lifted from a `type =` data shape to\n* an AST class extending `IRNodeBase` per FR18.\n*\n* MongoDB requires `timeField` for any time-series collection; the\n* constructor enforces presence by type signature (`timeField: string`\n* is required on the input).\n*/\nvar MongoTimeSeriesCollectionOptions = class extends IRNodeBase {\n\tkind = \"mongo-time-series-collection-options\";\n\ttimeField;\n\tconstructor(options) {\n\t\tsuper();\n\t\tthis.timeField = options.timeField;\n\t\tif (options.metaField !== void 0) this.metaField = options.metaField;\n\t\tif (options.granularity !== void 0) this.granularity = options.granularity;\n\t\tif (options.bucketMaxSpanSeconds !== void 0) this.bucketMaxSpanSeconds = options.bucketMaxSpanSeconds;\n\t\tif (options.bucketRoundingSeconds !== void 0) this.bucketRoundingSeconds = options.bucketRoundingSeconds;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/ir/mongo-collection-options.ts\n/**\n* Mongo Contract IR node for collection-level creation options (the\n* second argument to `db.createCollection(name, options)`). Lifted from\n* the pre-M2R2 `MongoStorageCollectionOptions` storage interface to a\n* class extending `IRNodeBase` per FR18.\n*\n* Single concrete family-layer class (no target subclass). The\n* constructor accepts the storage JSON envelope shape ({@link\n* MongoCollectionOptionsInput}) so the family-base hydration walker\n* can pass arktype-validated objects directly to `new`. Authoring\n* vocabulary is translated to this shape upstream in the contract-ts\n* builder.\n*\n* Nested IR sub-shapes (collation, timeseries, …) are normalised to\n* their respective IR class instances inside the constructor so\n* downstream walks see a uniform AST regardless of whether the input\n* was a JSON literal or an already-constructed class.\n*/\nvar MongoCollectionOptions = class extends IRNodeBase {\n\tkind = \"mongo-collection-options\";\n\tconstructor(input = {}) {\n\t\tsuper();\n\t\tif (input.capped !== void 0) this.capped = {\n\t\t\tsize: input.capped.size,\n\t\t\t...input.capped.max != null && { max: input.capped.max }\n\t\t};\n\t\tif (input.storageEngine !== void 0) this.storageEngine = input.storageEngine;\n\t\tif (input.indexOptionDefaults !== void 0) this.indexOptionDefaults = input.indexOptionDefaults instanceof MongoIndexOptionDefaults ? input.indexOptionDefaults : new MongoIndexOptionDefaults(input.indexOptionDefaults);\n\t\tif (input.collation !== void 0) this.collation = input.collation instanceof MongoCollationOptions ? input.collation : new MongoCollationOptions(input.collation);\n\t\tif (input.timeseries !== void 0) this.timeseries = input.timeseries instanceof MongoTimeSeriesCollectionOptions ? input.timeseries : new MongoTimeSeriesCollectionOptions(input.timeseries);\n\t\tif (input.clusteredIndex !== void 0) this.clusteredIndex = input.clusteredIndex.name !== void 0 ? { name: input.clusteredIndex.name } : {};\n\t\tif (input.expireAfterSeconds !== void 0) this.expireAfterSeconds = input.expireAfterSeconds;\n\t\tif (input.changeStreamPreAndPostImages !== void 0) this.changeStreamPreAndPostImages = input.changeStreamPreAndPostImages instanceof MongoChangeStreamPreAndPostImagesOptions ? input.changeStreamPreAndPostImages : new MongoChangeStreamPreAndPostImagesOptions(input.changeStreamPreAndPostImages);\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/ir/mongo-index.ts\n/**\n* Mongo Contract IR node for a single collection index entry (one\n* element of `MongoCollection.indexes`). Lifted from the\n* pre-M2R2 `MongoStorageIndex` storage interface to a class extending\n* `IRNodeBase` per FR18.\n*\n* Single concrete family-layer class (no target subclass). The spec's\n* `MongoTargetIndex extends MongoIndex` pattern remains additive — a\n* future Mongo target with target-specific index extensions is free to\n* subclass; for the single Mongo target shipped today a concrete\n* family-layer class is enough and avoids a target-import layering\n* violation from the contract-ts builder.\n*/\nvar MongoIndex = class extends IRNodeBase {\n\tkind = \"mongo-index\";\n\tkeys;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.keys = input.keys;\n\t\tif (input.unique !== void 0) this.unique = input.unique;\n\t\tif (input.sparse !== void 0) this.sparse = input.sparse;\n\t\tif (input.expireAfterSeconds !== void 0) this.expireAfterSeconds = input.expireAfterSeconds;\n\t\tif (input.partialFilterExpression !== void 0) this.partialFilterExpression = input.partialFilterExpression;\n\t\tif (input.wildcardProjection !== void 0) this.wildcardProjection = input.wildcardProjection;\n\t\tif (input.collation !== void 0) this.collation = input.collation;\n\t\tif (input.weights !== void 0) this.weights = input.weights;\n\t\tif (input.default_language !== void 0) this.default_language = input.default_language;\n\t\tif (input.language_override !== void 0) this.language_override = input.language_override;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/ir/mongo-validator.ts\n/**\n* Mongo Contract IR node for collection-level document validators (the\n* `validator` field on Mongo's `createCollection`). Lifted from the\n* pre-M2R2 `MongoStorageValidator` storage interface to a class extending\n* `IRNodeBase` per FR18.\n*\n* Concrete at the family layer (no target subclass). The spec's\n* abstract-family + target-concrete pattern (`MongoTargetValidator\n* extends MongoValidator`) becomes meaningful when a second Mongo target\n* introduces target-specific validator extensions (Atlas search rules,\n* DocumentDB-specific levels, …); for the single Mongo target shipped\n* today, a concrete family-layer class lets the PSL JSON-Schema deriver\n* and the contract-ts builder construct instances directly without a\n* target-import layering violation. Target subclassing remains additive\n* — a future `MongoTargetValidator extends MongoValidator` is an\n* additive change, not a breaking one.\n*/\nvar MongoValidator = class extends IRNodeBase {\n\tkind = \"mongo-validator\";\n\tjsonSchema;\n\tvalidationLevel;\n\tvalidationAction;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.jsonSchema = input.jsonSchema;\n\t\tthis.validationLevel = input.validationLevel;\n\t\tthis.validationAction = input.validationAction;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/ir/mongo-collection.ts\n/**\n* Mongo Contract IR node for a single collection entry in a namespace's\n* `collections` map. Lifted from the pre-M2R2\n* `MongoStorageCollection` storage interface to a class extending\n* `IRNodeBase` per FR18.\n*\n* Concrete at the family layer (no target subclass). The spec's\n* `MongoTargetCollection extends MongoCollection` pattern remains\n* additive: a future Mongo target with target-specific extensions is\n* free to subclass without breaking the family-layer construction\n* sites.\n*\n* The unprefixed name `MongoCollection` is now the contract IR class.\n* Note that `@internal/mongo-orm` also exports a (different)\n* `MongoCollection<TContract, ModelName>` generic for the user-facing\n* ORM query builder; the two live in separate packages and are\n* resolved by import path. A source file that needs both should alias\n* one (e.g. `import { MongoCollection as MongoContractCollection }\n* from '@internal/mongo-contract'`).\n*/\nvar MongoCollection = class extends IRNodeBase {\n\tkind = \"mongo-collection\";\n\tconstructor(input = {}) {\n\t\tsuper();\n\t\tif (input.indexes !== void 0) this.indexes = input.indexes.map((idx) => idx instanceof MongoIndex ? idx : new MongoIndex(idx));\n\t\tif (input.validator !== void 0) this.validator = input.validator instanceof MongoValidator ? input.validator : new MongoValidator(input.validator);\n\t\tif (input.options !== void 0) this.options = input.options instanceof MongoCollectionOptions ? input.options : new MongoCollectionOptions(input.options);\n\t\tif (input.control !== void 0) this.control = input.control;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/ir/mongo-value-set.ts\n/**\n* Mongo Contract IR node for a value-set entry in a namespace's `valueSet` map\n* (`entries.valueSet`). Same shape as SQL's `StorageValueSet`: the ordered set of permitted\n* codec-encoded values for a field restriction, with no `codecId` (the field that references it\n* holds the codec). The `kind` is enumerable so the JSON envelope carries the discriminator and the\n* hydration walker can dispatch on it. Value-sets are keyed by name in the parent namespace's\n* `valueSet: Record<string, MongoValueSet>` map, so the entry name is not on the class.\n*/\nvar MongoValueSet = class extends IRNodeBase {\n\tkind = \"valueSet\";\n\tvalues;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.values = Object.freeze([...input.values]);\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/entity-kinds.ts\nconst collectionEntityKind = {\n\tkind: \"collection\",\n\tschema: StorageCollectionSchema,\n\tconstruct: (input) => new MongoCollection(input)\n};\nconst valueSetEntityKind = {\n\tkind: \"valueSet\",\n\tschema: StorageValueSetSchema,\n\tconstruct: (input) => new MongoValueSet(input)\n};\n/**\n* Assembles the `kind → descriptor` registry for Mongo namespaces: the built-in\n* `collection` kind plus any target `packKinds`. This builds the lookup table —\n* it does not touch contract data. `hydrateNamespaceEntities` later consumes\n* this registry to turn a namespace's raw entries into IR instances. Throws on\n* a duplicate kind.\n*/\nfunction composeMongoEntityKinds(packKinds = []) {\n\tconst kinds = /* @__PURE__ */ new Map([[\"collection\", collectionEntityKind], [\"valueSet\", valueSetEntityKind]]);\n\tfor (const descriptor of packKinds) {\n\t\tif (kinds.has(descriptor.kind)) throw structuredError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `composeMongoEntityKinds: duplicate entity kind \"${descriptor.kind}\" — each kind may be registered only once`);\n\t\tkinds.set(descriptor.kind, descriptor);\n\t}\n\treturn kinds;\n}\n//#endregion\nexport { MongoCollection as a, MongoCollectionOptions as c, MongoCollationOptions as d, MongoChangeStreamPreAndPostImagesOptions as f, createMongoNamespaceEnvelopeSchema as g, createMongoContractSchema as h, MongoValueSet as i, MongoTimeSeriesCollectionOptions as l, StorageValueSetSchema as m, composeMongoEntityKinds as n, MongoValidator as o, MongoContractSchema as p, valueSetEntityKind as r, MongoIndex as s, collectionEntityKind as t, MongoIndexOptionDefaults as u };\n\n//# sourceMappingURL=entity-kinds-FlR_bJNA.mjs.map"],"mappings":";;;;;AAKA,MAAM,sBAAsB,KAAK,mDAAmD;AACpF,MAAM,wBAAwB,KAAK;CAClC,KAAK;CACL,MAAM;CACN,SAAS;CACT,eAAe;AAChB,CAAC;AACD,MAAM,6BAA6B,KAAK;CACvC,KAAK;CACL,MAAM;CACN,MAAM;AACP,CAAC;AACD,MAAM,uBAAuB,KAAK;CACjC,KAAK;CACL,MAAM;CACN,SAAS,sBAAsB,GAAG,0BAA0B,CAAC,CAAC,MAAM;AACrE,CAAC;AACD,MAAM,kBAAkB,sBAAsB,GAAG,0BAA0B,CAAC,CAAC,GAAG,oBAAoB;AACpG,MAAM,sBAAsB,KAAK;CAChC,OAAO;CACP,aAAa;CACb,YAAY;CACZ,YAAY;CACZ,YAAY;AACb,CAAC;AACD,MAAM,qBAAqB,KAAK;CAC/B,KAAK;CACL,SAAS;CACT,SAAS,KAAK;EACb,MAAM;EACN,OAAO;CACR,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS;AACtC,CAAC;AACD,MAAM,cAAc,KAAK;CACxB,KAAK;CACL,MAAM;CACN,aAAa;CACb,SAAS;CACT,SAAS;CACT,aAAa;AACd,CAAC,CAAC,CAAC,MAAM,WAAW;CACnB,GAAG;CACH,UAAU,MAAM,YAAY;AAC7B,EAAE;AACF,MAAM,mBAAm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,GAAG,KAAK,UAAU,MAAM,mBAAmB,yBAAyB,MAAM,UAAU,IAAI,uBAAuB,MAAM,OAAO;EACvJ,IAAI,MAAM,YAAY,KAAK,GAAG,KAAK,UAAU,MAAM;EACnD,WAAW,IAAI;CAChB;AACD;;;;;;;;;AAWA,IAAI,gBAAgB,cAAc,WAAW;CAC5C,OAAO;CACP;CACA,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,SAAS,OAAO,OAAO,CAAC,GAAG,MAAM,MAAM,CAAC;EAC7C,WAAW,IAAI;CAChB;AACD;AAGA,MAAM,uBAAuB;CAC5B,MAAM;CACN,QAAQ;CACR,YAAY,UAAU,IAAI,gBAAgB,KAAK;AAChD;AACA,MAAM,qBAAqB;CAC1B,MAAM;CACN,QAAQ;CACR,YAAY,UAAU,IAAI,cAAc,KAAK;AAC9C;;;;;;;;AAQA,SAAS,wBAAwB,YAAY,CAAC,GAAG;CAChD,MAAM,wBAAwB,IAAI,IAAI,CAAC,CAAC,cAAc,oBAAoB,GAAG,CAAC,YAAY,kBAAkB,CAAC,CAAC;CAC9G,KAAK,MAAM,cAAc,WAAW;EACnC,IAAI,MAAM,IAAI,WAAW,IAAI,GAAG,MAAM,gBAAgB,sCAAsC,mDAAmD,WAAW,KAAK,0CAA0C;EACzM,MAAM,IAAI,WAAW,MAAM,UAAU;CACtC;CACA,OAAO;AACR"}
|
|
1
|
+
{"version":3,"file":"entity-kinds-BFgLffz7-D8WUc2oo.mjs","names":[],"sources":["../../../../2-mongo-family/1-foundation/mongo-contract/dist/entity-kinds-BFgLffz7.mjs"],"sourcesContent":["import { IRNodeBase, freezeNode } from \"@internal/framework-components/ir\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { ContractExecutionSectionSchema, CrossReferenceSchema } from \"@internal/contract/types\";\nimport { type } from \"arktype\";\n//#region src/contract-schema.ts\nconst ControlPolicySchema = type(\"'managed' | 'tolerated' | 'external' | 'observed'\");\nconst ScalarFieldTypeSchema = type({\n\t\"+\": \"reject\",\n\tkind: \"'scalar'\",\n\tcodecId: \"string\",\n\t\"typeParams?\": \"Record<string, unknown>\"\n});\nconst ValueObjectFieldTypeSchema = type({\n\t\"+\": \"reject\",\n\tkind: \"'valueObject'\",\n\tname: \"string\"\n});\nconst UnionFieldTypeSchema = type({\n\t\"+\": \"reject\",\n\tkind: \"'union'\",\n\tmembers: ScalarFieldTypeSchema.or(ValueObjectFieldTypeSchema).array()\n});\nconst FieldTypeSchema = ScalarFieldTypeSchema.or(ValueObjectFieldTypeSchema).or(UnionFieldTypeSchema);\nconst DomainEnumRefSchema = type({\n\tplane: \"'domain'\",\n\tnamespaceId: \"string\",\n\tentityKind: \"'enum'\",\n\tentityName: \"string\",\n\t\"spaceId?\": \"string\"\n});\nconst ContractEnumSchema = type({\n\t\"+\": \"reject\",\n\tcodecId: \"string\",\n\tmembers: type({\n\t\tname: \"string\",\n\t\tvalue: \"string | number | boolean | null | unknown[] | Record<string, unknown>\"\n\t}).array().atLeastLength(1).readonly()\n});\nconst FieldSchema = type({\n\t\"+\": \"reject\",\n\ttype: FieldTypeSchema,\n\t\"nullable?\": \"boolean\",\n\t\"many?\": \"boolean\",\n\t\"dict?\": \"boolean\",\n\t\"valueSet?\": DomainEnumRefSchema\n}).pipe((field) => ({\n\t...field,\n\tnullable: field.nullable ?? false\n}));\nconst RelationOnSchema = type({\n\t\"+\": \"reject\",\n\tlocalFields: \"string[]\",\n\ttargetFields: \"string[]\"\n});\nconst ToOneReferenceRelationSchema = type({\n\t\"+\": \"reject\",\n\tto: CrossReferenceSchema,\n\tcardinality: \"'1:1' | 'N:1'\",\n\t\"nullable?\": \"boolean\",\n\ton: RelationOnSchema\n});\nconst ToManyReferenceRelationSchema = type({\n\t\"+\": \"reject\",\n\tto: CrossReferenceSchema,\n\tcardinality: \"'1:N'\",\n\ton: RelationOnSchema\n});\nconst EmbedRelationSchema = type({\n\t\"+\": \"reject\",\n\tto: CrossReferenceSchema,\n\tcardinality: \"'1:1' | '1:N'\"\n});\nconst RelationSchema = ToOneReferenceRelationSchema.or(ToManyReferenceRelationSchema).or(EmbedRelationSchema);\nconst StorageRelationEntrySchema = type({\n\t\"+\": \"reject\",\n\tfield: \"string\"\n});\nconst MongoJsonPrimitiveSchema = type.declare().type(\"string | number | boolean | null\");\nfunction isMongoJsonRecord(value) {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) return false;\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === Object.prototype || prototype === null;\n}\nfunction withUnseenReference(value, seen, visit) {\n\tif (seen.has(value)) return false;\n\tseen.add(value);\n\tconst result = visit();\n\tseen.delete(value);\n\treturn result;\n}\nfunction isMongoJsonObject(value, seen) {\n\treturn isMongoJsonRecord(value) && withUnseenReference(value, seen, () => Object.values(value).every((entry) => isMongoJsonValue(entry, seen)));\n}\nfunction isMongoJsonValue(value, seen = /* @__PURE__ */ new WeakSet()) {\n\tif (MongoJsonPrimitiveSchema.allows(value)) return true;\n\tif (Array.isArray(value)) return withUnseenReference(value, seen, () => value.every((entry) => isMongoJsonValue(entry, seen)));\n\treturn isMongoJsonObject(value, seen);\n}\nconst MongoJsonValueSchema = type(\"unknown\").narrow((value, ctx) => isMongoJsonValue(value) ? true : ctx.mustBe(\"a JSON-serializable MongoJsonValue\"));\nconst MongoJsonObjectSchema = type({ \"[string]\": \"unknown\" }).narrow((value, ctx) => isMongoJsonRecord(value) && Object.values(value).every((entry) => MongoJsonValueSchema.allows(entry)) ? true : ctx.mustBe(\"a JSON object with MongoJsonValue entries\"));\nconst NumberRecordSchema = type({ \"[string]\": \"number\" });\nconst IndexFieldsSchema = type({\n\t\"+\": \"reject\",\n\t\"[string]\": \"1 | -1 | \\\"text\\\" | \\\"2dsphere\\\" | \\\"2d\\\" | \\\"hashed\\\"\"\n}).narrow((fields, ctx) => Object.keys(fields).length > 0 ? true : ctx.mustBe(\"an index field map with at least one entry\"));\nconst CollationSchema = type({\n\t\"+\": \"reject\",\n\t\"kind?\": \"'mongo-collation-options'\",\n\tlocale: \"string\",\n\t\"caseLevel?\": \"boolean\",\n\t\"caseFirst?\": \"\\\"off\\\" | \\\"upper\\\" | \\\"lower\\\"\",\n\t\"strength?\": \"1 | 2 | 3 | 4 | 5\",\n\t\"numericOrdering?\": \"boolean\",\n\t\"alternate?\": \"\\\"non-ignorable\\\" | \\\"shifted\\\"\",\n\t\"maxVariable?\": \"\\\"punct\\\" | \\\"space\\\"\",\n\t\"backwards?\": \"boolean\",\n\t\"normalization?\": \"boolean\"\n});\nconst IndexOptionDefaultsSchema = type({\n\t\"+\": \"reject\",\n\t\"kind?\": \"'mongo-index-option-defaults'\",\n\t\"storageEngine?\": MongoJsonObjectSchema\n});\nconst TimeSeriesCollectionOptionsSchema = type({\n\t\"+\": \"reject\",\n\t\"kind?\": \"'mongo-time-series-collection-options'\",\n\ttimeField: \"string\",\n\t\"metaField?\": \"string\",\n\t\"granularity?\": \"\\\"seconds\\\" | \\\"minutes\\\" | \\\"hours\\\"\",\n\t\"bucketMaxSpanSeconds?\": \"number\",\n\t\"bucketRoundingSeconds?\": \"number\"\n});\nconst ClusteredCollectionOptionsSchema = type({\n\t\"+\": \"reject\",\n\t\"kind?\": \"'mongo-clustered-collection-options'\",\n\t\"name?\": \"string\",\n\tkey: type({\n\t\t\"+\": \"reject\",\n\t\t\"[string]\": \"1\"\n\t}).narrow((key, ctx) => Object.keys(key).length > 0 ? true : ctx.mustBe(\"a clustered index key map with at least one entry\")),\n\tunique: \"boolean\"\n});\nconst ChangeStreamPreAndPostImagesSchema = type({\n\t\"+\": \"reject\",\n\t\"kind?\": \"'mongo-change-stream-pre-and-post-images-options'\",\n\tenabled: \"boolean\"\n});\ntype({\n\t\"+\": \"reject\",\n\t\"capped?\": \"boolean\",\n\t\"size?\": \"number\",\n\t\"max?\": \"number\",\n\t\"storageEngine?\": MongoJsonObjectSchema,\n\t\"indexOptionDefaults?\": IndexOptionDefaultsSchema,\n\t\"collation?\": CollationSchema,\n\t\"timeseries?\": TimeSeriesCollectionOptionsSchema,\n\t\"clusteredIndex?\": ClusteredCollectionOptionsSchema,\n\t\"expireAfterSeconds?\": \"number\",\n\t\"changeStreamPreAndPostImages?\": ChangeStreamPreAndPostImagesSchema\n});\nconst ModelStorageSchema = type({\n\t\"+\": \"reject\",\n\t\"collection?\": \"string\",\n\t\"relations?\": type({ \"[string]\": StorageRelationEntrySchema })\n});\nconst DiscriminatorSchema = type({\n\t\"+\": \"reject\",\n\tfield: \"string\"\n});\nconst VariantEntrySchema = type({\n\t\"+\": \"reject\",\n\tvalue: \"string\"\n});\nconst ModelDefinitionSchema = type({\n\t\"+\": \"reject\",\n\tfields: type({ \"[string]\": FieldSchema }),\n\tstorage: ModelStorageSchema,\n\t\"relations?\": type({ \"[string]\": RelationSchema }),\n\t\"discriminator?\": DiscriminatorSchema,\n\t\"variants?\": type({ \"[string]\": VariantEntrySchema }),\n\t\"base?\": CrossReferenceSchema,\n\t\"owner?\": \"string\"\n});\ntype({\n\t\"+\": \"reject\",\n\tfields: IndexFieldsSchema,\n\t\"options?\": type({\n\t\t\"+\": \"reject\",\n\t\t\"kind?\": \"'mongo-index-options'\",\n\t\t\"unique?\": \"boolean\",\n\t\t\"name?\": \"string\",\n\t\t\"partialFilterExpression?\": MongoJsonObjectSchema,\n\t\t\"sparse?\": \"boolean\",\n\t\t\"expireAfterSeconds?\": \"number\",\n\t\t\"weights?\": NumberRecordSchema,\n\t\t\"default_language?\": \"string\",\n\t\t\"language_override?\": \"string\",\n\t\t\"textIndexVersion?\": \"number\",\n\t\t\"2dsphereIndexVersion?\": \"number\",\n\t\t\"bits?\": \"number\",\n\t\t\"min?\": \"number\",\n\t\t\"max?\": \"number\",\n\t\t\"bucketSize?\": \"number\",\n\t\t\"hidden?\": \"boolean\",\n\t\t\"collation?\": CollationSchema,\n\t\t\"wildcardProjection?\": type({\n\t\t\t\"+\": \"reject\",\n\t\t\t\"[string]\": \"0 | 1\"\n\t\t})\n\t})\n});\nconst MongoStorageIndexSchema = type({\n\t\"+\": \"reject\",\n\t\"kind?\": \"'mongo-index'\",\n\tkeys: type({\n\t\t\"+\": \"reject\",\n\t\tfield: \"string\",\n\t\tdirection: \"1 | -1 | \\\"text\\\" | \\\"2dsphere\\\" | \\\"2d\\\" | \\\"hashed\\\"\"\n\t}).array().atLeastLength(1),\n\t\"unique?\": \"boolean\",\n\t\"sparse?\": \"boolean\",\n\t\"expireAfterSeconds?\": \"number\",\n\t\"partialFilterExpression?\": \"Record<string, unknown>\",\n\t\"wildcardProjection?\": \"Record<string, 0 | 1>\",\n\t\"collation?\": \"Record<string, unknown>\",\n\t\"weights?\": \"Record<string, number>\",\n\t\"default_language?\": \"string\",\n\t\"language_override?\": \"string\"\n});\nconst MongoStorageValidatorSchema = type({\n\t\"+\": \"reject\",\n\t\"kind?\": \"'mongo-validator'\",\n\tjsonSchema: \"Record<string, unknown>\",\n\tvalidationLevel: \"'strict' | 'moderate'\",\n\tvalidationAction: \"'error' | 'warn'\"\n});\nconst MongoCollectionOptionsSchema = type({\n\t\"+\": \"reject\",\n\t\"kind?\": \"'mongo-collection-options'\",\n\t\"capped?\": type({\n\t\t\"+\": \"reject\",\n\t\tsize: \"number\",\n\t\t\"max?\": \"number\"\n\t}),\n\t\"storageEngine?\": MongoJsonObjectSchema,\n\t\"indexOptionDefaults?\": IndexOptionDefaultsSchema,\n\t\"timeseries?\": type({\n\t\t\"+\": \"reject\",\n\t\t\"kind?\": \"'mongo-time-series-collection-options'\",\n\t\ttimeField: \"string\",\n\t\t\"metaField?\": \"string\",\n\t\t\"granularity?\": \"'seconds' | 'minutes' | 'hours'\",\n\t\t\"bucketMaxSpanSeconds?\": \"number\",\n\t\t\"bucketRoundingSeconds?\": \"number\"\n\t}),\n\t\"collation?\": \"Record<string, unknown>\",\n\t\"expireAfterSeconds?\": \"number\",\n\t\"changeStreamPreAndPostImages?\": ChangeStreamPreAndPostImagesSchema,\n\t\"clusteredIndex?\": type({\n\t\t\"+\": \"reject\",\n\t\t\"name?\": \"string\"\n\t})\n});\nconst StorageCollectionSchema = type({\n\t\"+\": \"reject\",\n\t\"kind?\": \"'mongo-collection'\",\n\t\"indexes?\": MongoStorageIndexSchema.array(),\n\t\"validator?\": MongoStorageValidatorSchema,\n\t\"options?\": MongoCollectionOptionsSchema,\n\t\"control?\": ControlPolicySchema\n});\nconst StorageValueSetSchema = type({\n\t\"+\": \"reject\",\n\tkind: \"'valueSet'\",\n\tvalues: type(\"string | number | boolean | null | unknown[] | Record<string, unknown>\").array().readonly()\n});\nfunction collectionEntrySchema(fragments) {\n\tif (fragments === void 0 || fragments.size === 0) return StorageCollectionSchema;\n\treturn type(\"unknown\").narrow((entry, ctx) => {\n\t\tif (typeof entry !== \"object\" || entry === null || Array.isArray(entry)) return ctx.mustBe(\"an object\");\n\t\tconst kind = entry.kind;\n\t\tif (typeof kind === \"string\") {\n\t\t\tconst fragment = fragments.get(kind);\n\t\t\tif (fragment !== void 0) {\n\t\t\t\tconst parsed = fragment(entry);\n\t\t\t\tif (parsed instanceof type.errors) return ctx.reject({ expected: parsed.summary });\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tconst parsed = StorageCollectionSchema(entry);\n\t\tif (parsed instanceof type.errors) return ctx.reject({ expected: parsed.summary });\n\t\treturn true;\n\t});\n}\n/**\n* Builds the per-namespace envelope schema for Mongo storage. Pack\n* contributions are keyed by the descriptor's `discriminator` and\n* validate each entry by matching the entry's `kind` field. Mongo today\n* has no pack contributions; the composition surface exists for symmetry\n* with SQL and as the substrate for future entity kinds.\n*\n* `'kind?': 'string'` because `kind` is non-enumerable on built\n* Mongo namespace IR classes and therefore absent from the wire shape; the\n* type-side narrowing is enforced by the IR class, not by this validator.\n*/\nfunction createMongoNamespaceEnvelopeSchema(fragments) {\n\treturn type({\n\t\t\"+\": \"reject\",\n\t\tid: \"string\",\n\t\t\"kind?\": \"string\",\n\t\tentries: type({\n\t\t\t\"collection?\": type({ \"[string]\": collectionEntrySchema(fragments) }),\n\t\t\t\"valueSet?\": type({ \"[string]\": StorageValueSetSchema })\n\t\t})\n\t}).narrow((ns, ctx) => {\n\t\tif (typeof ns !== \"object\" || ns === null || Array.isArray(ns)) return ctx.mustBe(\"an object\");\n\t\tif (Object.hasOwn(ns, \"collections\") || Object.hasOwn(ns, \"tables\")) return ctx.reject({ expected: \"namespace must use `entries: { collection? }`; flat `collections` / `tables` keys are no longer accepted\" });\n\t\treturn true;\n\t});\n}\n/**\n* Builds the full Mongo contract schema. The per-namespace entry\n* threading happens through {@link createMongoNamespaceEnvelopeSchema};\n* the rest of the envelope is family-shared.\n*/\nfunction createMongoContractSchema(fragments) {\n\tconst namespaceEnvelope = createMongoNamespaceEnvelopeSchema(fragments);\n\treturn type({\n\t\t\"+\": \"reject\",\n\t\ttargetFamily: \"'mongo'\",\n\t\t\"schemaVersion?\": \"string\",\n\t\t\"target?\": \"string\",\n\t\t\"storageHash?\": \"string\",\n\t\t\"profileHash?\": \"string\",\n\t\troots: type({ \"[string]\": CrossReferenceSchema }),\n\t\t\"capabilities?\": \"Record<string, unknown>\",\n\t\t\"extensions?\": \"Record<string, unknown>\",\n\t\t\"meta?\": \"Record<string, unknown>\",\n\t\t\"defaultControlPolicy?\": ControlPolicySchema,\n\t\t\"execution?\": ContractExecutionSectionSchema,\n\t\t\"sources?\": \"Record<string, unknown>\",\n\t\t\"_generated?\": \"Record<string, unknown>\",\n\t\tdomain: type({ namespaces: type({ \"[string]\": type({\n\t\t\tmodels: type({ \"[string]\": ModelDefinitionSchema }),\n\t\t\t\"valueObjects?\": type({ \"[string]\": type({\n\t\t\t\t\"+\": \"reject\",\n\t\t\t\tfields: type({ \"[string]\": FieldSchema })\n\t\t\t}) }),\n\t\t\t\"enum?\": type({ \"[string]\": ContractEnumSchema })\n\t\t}) }) }),\n\t\tstorage: type({\n\t\t\t\"+\": \"reject\",\n\t\t\tnamespaces: type({ \"[string]\": namespaceEnvelope }),\n\t\t\t\"storageHash?\": \"string\"\n\t\t})\n\t});\n}\nconst MongoContractSchema = createMongoContractSchema();\n//#endregion\n//#region src/ir/mongo-change-stream-pre-and-post-images-options.ts\n/**\n* Change-stream pre-and-post-images collection option. Lifted from a\n* `type =` data shape to an AST class extending `IRNodeBase` per\n* FR18. Single-field shape; the class exists for AST-pattern\n* consistency (every nested data shape inside `MongoCollectionOptions`\n* is an AST node so the verifier can walk uniformly).\n*/\nvar MongoChangeStreamPreAndPostImagesOptions = class extends IRNodeBase {\n\tkind = \"mongo-change-stream-pre-and-post-images-options\";\n\tenabled;\n\tconstructor(options) {\n\t\tsuper();\n\t\tthis.enabled = options.enabled;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/ir/mongo-collation-options.ts\n/**\n* Mongo Contract IR leaf for collection / index collation options.\n*\n* Lifted from a `type =` data shape to an AST class extending\n* `IRNodeBase` per FR18 (\"Mongo's Contract IR is fully unified under\n* the AST-class pattern, layered family / target\"). Single concrete class\n* (no target subclass): collation options carry no target-specific\n* variation at this layer — both Atlas and self-hosted Mongo consume the\n* same option vocabulary.\n*\n* Undefined optional fields are not assigned, so `JSON.stringify` omits\n* them from the canonical JSON output (matches the pre-lift data shape's\n* round-trip behaviour, modulo the new `kind` discriminator).\n*/\nvar MongoCollationOptions = class extends IRNodeBase {\n\tkind = \"mongo-collation-options\";\n\tlocale;\n\tconstructor(options) {\n\t\tsuper();\n\t\tthis.locale = options.locale;\n\t\tif (options.caseLevel !== void 0) this.caseLevel = options.caseLevel;\n\t\tif (options.caseFirst !== void 0) this.caseFirst = options.caseFirst;\n\t\tif (options.strength !== void 0) this.strength = options.strength;\n\t\tif (options.numericOrdering !== void 0) this.numericOrdering = options.numericOrdering;\n\t\tif (options.alternate !== void 0) this.alternate = options.alternate;\n\t\tif (options.maxVariable !== void 0) this.maxVariable = options.maxVariable;\n\t\tif (options.backwards !== void 0) this.backwards = options.backwards;\n\t\tif (options.normalization !== void 0) this.normalization = options.normalization;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/ir/mongo-index-option-defaults.ts\n/**\n* Collection-level default index options (the `indexOptionDefaults`\n* collection-creation field on Mongo's `createCollection`). Lifted from\n* a `type =` data shape to an AST class extending `IRNodeBase` per\n* FR18 (Mongo Contract IR fully unified under the AST-class pattern).\n*\n* Carries `storageEngine` only — the underlying MongoDB option set is\n* intentionally narrow at this layer; per-engine richer option vocabularies\n* are out of scope for this project.\n*/\nvar MongoIndexOptionDefaults = class extends IRNodeBase {\n\tkind = \"mongo-index-option-defaults\";\n\tconstructor(options = {}) {\n\t\tsuper();\n\t\tif (options.storageEngine !== void 0) this.storageEngine = options.storageEngine;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/ir/mongo-time-series-collection-options.ts\n/**\n* Time-series collection options. Lifted from a `type =` data shape to\n* an AST class extending `IRNodeBase` per FR18.\n*\n* MongoDB requires `timeField` for any time-series collection; the\n* constructor enforces presence by type signature (`timeField: string`\n* is required on the input).\n*/\nvar MongoTimeSeriesCollectionOptions = class extends IRNodeBase {\n\tkind = \"mongo-time-series-collection-options\";\n\ttimeField;\n\tconstructor(options) {\n\t\tsuper();\n\t\tthis.timeField = options.timeField;\n\t\tif (options.metaField !== void 0) this.metaField = options.metaField;\n\t\tif (options.granularity !== void 0) this.granularity = options.granularity;\n\t\tif (options.bucketMaxSpanSeconds !== void 0) this.bucketMaxSpanSeconds = options.bucketMaxSpanSeconds;\n\t\tif (options.bucketRoundingSeconds !== void 0) this.bucketRoundingSeconds = options.bucketRoundingSeconds;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/ir/mongo-collection-options.ts\n/**\n* Mongo Contract IR node for collection-level creation options (the\n* second argument to `db.createCollection(name, options)`). Lifted from\n* the pre-M2R2 `MongoStorageCollectionOptions` storage interface to a\n* class extending `IRNodeBase` per FR18.\n*\n* Single concrete family-layer class (no target subclass). The\n* constructor accepts the storage JSON envelope shape ({@link\n* MongoCollectionOptionsInput}) so the family-base hydration walker\n* can pass arktype-validated objects directly to `new`. Authoring\n* vocabulary is translated to this shape upstream in the contract-ts\n* builder.\n*\n* Nested IR sub-shapes (collation, timeseries, …) are normalised to\n* their respective IR class instances inside the constructor so\n* downstream walks see a uniform AST regardless of whether the input\n* was a JSON literal or an already-constructed class.\n*/\nvar MongoCollectionOptions = class extends IRNodeBase {\n\tkind = \"mongo-collection-options\";\n\tconstructor(input = {}) {\n\t\tsuper();\n\t\tif (input.capped !== void 0) this.capped = {\n\t\t\tsize: input.capped.size,\n\t\t\t...input.capped.max != null && { max: input.capped.max }\n\t\t};\n\t\tif (input.storageEngine !== void 0) this.storageEngine = input.storageEngine;\n\t\tif (input.indexOptionDefaults !== void 0) this.indexOptionDefaults = input.indexOptionDefaults instanceof MongoIndexOptionDefaults ? input.indexOptionDefaults : new MongoIndexOptionDefaults(input.indexOptionDefaults);\n\t\tif (input.collation !== void 0) this.collation = input.collation instanceof MongoCollationOptions ? input.collation : new MongoCollationOptions(input.collation);\n\t\tif (input.timeseries !== void 0) this.timeseries = input.timeseries instanceof MongoTimeSeriesCollectionOptions ? input.timeseries : new MongoTimeSeriesCollectionOptions(input.timeseries);\n\t\tif (input.clusteredIndex !== void 0) this.clusteredIndex = input.clusteredIndex.name !== void 0 ? { name: input.clusteredIndex.name } : {};\n\t\tif (input.expireAfterSeconds !== void 0) this.expireAfterSeconds = input.expireAfterSeconds;\n\t\tif (input.changeStreamPreAndPostImages !== void 0) this.changeStreamPreAndPostImages = input.changeStreamPreAndPostImages instanceof MongoChangeStreamPreAndPostImagesOptions ? input.changeStreamPreAndPostImages : new MongoChangeStreamPreAndPostImagesOptions(input.changeStreamPreAndPostImages);\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/ir/mongo-index.ts\n/**\n* Mongo Contract IR node for a single collection index entry (one\n* element of `MongoCollection.indexes`). Lifted from the\n* pre-M2R2 `MongoStorageIndex` storage interface to a class extending\n* `IRNodeBase` per FR18.\n*\n* Single concrete family-layer class (no target subclass). The spec's\n* `MongoTargetIndex extends MongoIndex` pattern remains additive — a\n* future Mongo target with target-specific index extensions is free to\n* subclass; for the single Mongo target shipped today a concrete\n* family-layer class is enough and avoids a target-import layering\n* violation from the contract-ts builder.\n*/\nvar MongoIndex = class extends IRNodeBase {\n\tkind = \"mongo-index\";\n\tkeys;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.keys = input.keys;\n\t\tif (input.unique !== void 0) this.unique = input.unique;\n\t\tif (input.sparse !== void 0) this.sparse = input.sparse;\n\t\tif (input.expireAfterSeconds !== void 0) this.expireAfterSeconds = input.expireAfterSeconds;\n\t\tif (input.partialFilterExpression !== void 0) this.partialFilterExpression = input.partialFilterExpression;\n\t\tif (input.wildcardProjection !== void 0) this.wildcardProjection = input.wildcardProjection;\n\t\tif (input.collation !== void 0) this.collation = input.collation;\n\t\tif (input.weights !== void 0) this.weights = input.weights;\n\t\tif (input.default_language !== void 0) this.default_language = input.default_language;\n\t\tif (input.language_override !== void 0) this.language_override = input.language_override;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/ir/mongo-validator.ts\n/**\n* Mongo Contract IR node for collection-level document validators (the\n* `validator` field on Mongo's `createCollection`). Lifted from the\n* pre-M2R2 `MongoStorageValidator` storage interface to a class extending\n* `IRNodeBase` per FR18.\n*\n* Concrete at the family layer (no target subclass). The spec's\n* abstract-family + target-concrete pattern (`MongoTargetValidator\n* extends MongoValidator`) becomes meaningful when a second Mongo target\n* introduces target-specific validator extensions (Atlas search rules,\n* DocumentDB-specific levels, …); for the single Mongo target shipped\n* today, a concrete family-layer class lets the PSL JSON-Schema deriver\n* and the contract-ts builder construct instances directly without a\n* target-import layering violation. Target subclassing remains additive\n* — a future `MongoTargetValidator extends MongoValidator` is an\n* additive change, not a breaking one.\n*/\nvar MongoValidator = class extends IRNodeBase {\n\tkind = \"mongo-validator\";\n\tjsonSchema;\n\tvalidationLevel;\n\tvalidationAction;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.jsonSchema = input.jsonSchema;\n\t\tthis.validationLevel = input.validationLevel;\n\t\tthis.validationAction = input.validationAction;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/ir/mongo-collection.ts\n/**\n* Mongo Contract IR node for a single collection entry in a namespace's\n* `collections` map. Lifted from the pre-M2R2\n* `MongoStorageCollection` storage interface to a class extending\n* `IRNodeBase` per FR18.\n*\n* Concrete at the family layer (no target subclass). The spec's\n* `MongoTargetCollection extends MongoCollection` pattern remains\n* additive: a future Mongo target with target-specific extensions is\n* free to subclass without breaking the family-layer construction\n* sites.\n*\n* The unprefixed name `MongoCollection` is now the contract IR class.\n* Note that `@internal/mongo-orm` also exports a (different)\n* `MongoCollection<TContract, ModelName>` generic for the user-facing\n* ORM query builder; the two live in separate packages and are\n* resolved by import path. A source file that needs both should alias\n* one (e.g. `import { MongoCollection as MongoContractCollection }\n* from '@internal/mongo-contract'`).\n*/\nvar MongoCollection = class extends IRNodeBase {\n\tkind = \"mongo-collection\";\n\tconstructor(input = {}) {\n\t\tsuper();\n\t\tif (input.indexes !== void 0) this.indexes = input.indexes.map((idx) => idx instanceof MongoIndex ? idx : new MongoIndex(idx));\n\t\tif (input.validator !== void 0) this.validator = input.validator instanceof MongoValidator ? input.validator : new MongoValidator(input.validator);\n\t\tif (input.options !== void 0) this.options = input.options instanceof MongoCollectionOptions ? input.options : new MongoCollectionOptions(input.options);\n\t\tif (input.control !== void 0) this.control = input.control;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/ir/mongo-value-set.ts\n/**\n* Mongo Contract IR node for a value-set entry in a namespace's `valueSet` map\n* (`entries.valueSet`). Same shape as SQL's `StorageValueSet`: the ordered set of permitted\n* codec-encoded values for a field restriction, with no `codecId` (the field that references it\n* holds the codec). The `kind` is enumerable so the JSON envelope carries the discriminator and the\n* hydration walker can dispatch on it. Value-sets are keyed by name in the parent namespace's\n* `valueSet: Record<string, MongoValueSet>` map, so the entry name is not on the class.\n*/\nvar MongoValueSet = class extends IRNodeBase {\n\tkind = \"valueSet\";\n\tvalues;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.values = Object.freeze([...input.values]);\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/entity-kinds.ts\nconst collectionEntityKind = {\n\tkind: \"collection\",\n\tschema: StorageCollectionSchema,\n\tconstruct: (input) => new MongoCollection(input)\n};\nconst valueSetEntityKind = {\n\tkind: \"valueSet\",\n\tschema: StorageValueSetSchema,\n\tconstruct: (input) => new MongoValueSet(input)\n};\n/**\n* Assembles the `kind → descriptor` registry for Mongo namespaces: the built-in\n* `collection` kind plus any target `packKinds`. This builds the lookup table —\n* it does not touch contract data. `hydrateNamespaceEntities` later consumes\n* this registry to turn a namespace's raw entries into IR instances. Throws on\n* a duplicate kind.\n*/\nfunction composeMongoEntityKinds(packKinds = []) {\n\tconst kinds = /* @__PURE__ */ new Map([[\"collection\", collectionEntityKind], [\"valueSet\", valueSetEntityKind]]);\n\tfor (const descriptor of packKinds) {\n\t\tif (kinds.has(descriptor.kind)) throw structuredError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `composeMongoEntityKinds: duplicate entity kind \"${descriptor.kind}\" — each kind may be registered only once`);\n\t\tkinds.set(descriptor.kind, descriptor);\n\t}\n\treturn kinds;\n}\n//#endregion\nexport { MongoCollection as a, MongoCollectionOptions as c, MongoCollationOptions as d, MongoChangeStreamPreAndPostImagesOptions as f, createMongoNamespaceEnvelopeSchema as g, createMongoContractSchema as h, MongoValueSet as i, MongoTimeSeriesCollectionOptions as l, StorageValueSetSchema as m, composeMongoEntityKinds as n, MongoValidator as o, MongoContractSchema as p, valueSetEntityKind as r, MongoIndex as s, collectionEntityKind as t, MongoIndexOptionDefaults as u };\n\n//# sourceMappingURL=entity-kinds-BFgLffz7.mjs.map"],"mappings":";;;;;AAKA,MAAM,sBAAsB,KAAK,mDAAmD;AACpF,MAAM,wBAAwB,KAAK;CAClC,KAAK;CACL,MAAM;CACN,SAAS;CACT,eAAe;AAChB,CAAC;AACD,MAAM,6B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BAAwB,YAAY,CAAC,GAAG;CAChD,MAAM,wBAAwB,IAAI,IAAI,CAAC,CAAC,cAAc,oBAAoB,GAAG,CAAC,YAAY,kBAAkB,CAAC,CAAC;CAC9G,KAAK,MAAM,cAAc,WAAW;EACnC,IAAI,MAAM,IAAI,WAAW,IAAI,GAAG,MAAM,gBAAgB,sCAAsC,mDAAmD,WAAW,KAAK,0CAA0C;EACzM,MAAM,IAAI,WAAW,MAAM,UAAU;CACtC;CACA,OAAO;AACR"}
|
package/dist/family.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as MongoRunnerDependencies, n as MongoControlAdapter, r as MongoControlAdapterDescriptor, t as MarkerOperations } from "./control-adapter-Bh_ZraGM-
|
|
3
|
-
import { a as contractToMongoSchemaIR, c as formatMongoOperations, i as canonicalizeSchemasForVerification, l as mongoFamilyDescriptor, n as MongoControlFamilyInstance, o as createMongoFamilyInstance, r as MongoControlTargetDescriptor, s as diffMongoSchemas, t as MongoControlExtensionDescriptor, u as mongoOperationsToPreview } from "./control-
|
|
4
|
-
import "./control-adapter-
|
|
5
|
-
import { t as MongoContractView$1 } from "./mongo-contract-view-AnejqfrQ-
|
|
6
|
-
import { n as MongoContractSerializerBase, r as MongoSchemaVerifierBase, t as MongoContractSerializer } from "./ir-
|
|
7
|
-
import { t as MongoMigration } from "./migration-
|
|
1
|
+
import { A as defaultMongoDomainNamespaceId, j as defaultMongoStorageNamespaceId } from "./index-b-S3URri.mjs";
|
|
2
|
+
import { i as MongoRunnerDependencies, n as MongoControlAdapter, r as MongoControlAdapterDescriptor, t as MarkerOperations } from "./control-adapter-Bh_ZraGM-XeWQ672u.mjs";
|
|
3
|
+
import { a as contractToMongoSchemaIR, c as formatMongoOperations, i as canonicalizeSchemasForVerification, l as mongoFamilyDescriptor, n as MongoControlFamilyInstance, o as createMongoFamilyInstance, r as MongoControlTargetDescriptor, s as diffMongoSchemas, t as MongoControlExtensionDescriptor, u as mongoOperationsToPreview } from "./control-zKduRmAA.mjs";
|
|
4
|
+
import "./control-adapter-miP7lGv5.mjs";
|
|
5
|
+
import { t as MongoContractView$1 } from "./mongo-contract-view-AnejqfrQ-DLhDjvsh.mjs";
|
|
6
|
+
import { n as MongoContractSerializerBase, r as MongoSchemaVerifierBase, t as MongoContractSerializer } from "./ir-9VhpVaDJ.mjs";
|
|
7
|
+
import { t as MongoMigration } from "./migration-9n6DCvlw.mjs";
|
|
8
8
|
import { r as mongoFamilyPslBlockDescriptors, t as mongoFamilyEntityTypes } from "./pack-BUb_cutQ.mjs";
|
|
9
|
-
import { t as timestampNowRuntimeGenerator } from "./runtime-
|
|
10
|
-
import { n as verifyMongoSchema, t as VerifyMongoSchemaOptions } from "./schema-verify-
|
|
9
|
+
import { t as timestampNowRuntimeGenerator } from "./runtime-F95l7p-U.mjs";
|
|
10
|
+
import { n as verifyMongoSchema, t as VerifyMongoSchemaOptions } from "./schema-verify-DehTbLkM.mjs";
|
|
11
11
|
export { type MarkerOperations, MongoMigration as Migration, MongoContractSerializer, MongoContractSerializerBase, MongoContractView$1 as MongoContractView, type MongoControlAdapter, type MongoControlAdapterDescriptor, type MongoControlExtensionDescriptor, type MongoControlFamilyInstance, type MongoControlTargetDescriptor, type MongoRunnerDependencies, MongoSchemaVerifierBase, type VerifyMongoSchemaOptions, canonicalizeSchemasForVerification, contractToMongoSchemaIR, createMongoFamilyInstance, defaultMongoDomainNamespaceId, defaultMongoStorageNamespaceId, diffMongoSchemas, formatMongoOperations, mongoFamilyDescriptor, mongoFamilyEntityTypes, mongoFamilyPslBlockDescriptors, mongoOperationsToPreview, timestampNowRuntimeGenerator, verifyMongoSchema };
|
package/dist/family.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { d as
|
|
2
|
-
import { i as verifyMongoSchema, n as contractToMongoSchemaIR, r as diffMongoSchemas, t as canonicalizeSchemasForVerification } from "./verify-mongo-schema-B0bMHQW0-
|
|
3
|
-
import { n as mongoFamilyPslBlockDescriptors, t as mongoFamilyEntityTypes } from "./authoring-entity-types-DkFfee0x-
|
|
4
|
-
import { n as MongoContractSerializerBase, t as MongoContractSerializer } from "./mongo-contract-serializer-DC_DM9_Y-
|
|
5
|
-
import { i as mongoOperationsToPreview, n as formatMongoOperations, r as mongoFamilyDescriptor, t as createMongoFamilyInstance } from "./control-
|
|
6
|
-
import { t as MongoContractView$1 } from "./mongo-contract-view-JZOa0Ry--
|
|
7
|
-
import { t as MongoSchemaVerifierBase } from "./ir-
|
|
8
|
-
import { t as MongoMigration } from "./migration-
|
|
1
|
+
import { d as defaultMongoDomainNamespaceId, f as defaultMongoStorageNamespaceId } from "./dist-DsIID5AE.mjs";
|
|
2
|
+
import { i as verifyMongoSchema, n as contractToMongoSchemaIR, r as diffMongoSchemas, t as canonicalizeSchemasForVerification } from "./verify-mongo-schema-B0bMHQW0-BuK0Jv5S.mjs";
|
|
3
|
+
import { n as mongoFamilyPslBlockDescriptors, t as mongoFamilyEntityTypes } from "./authoring-entity-types-DkFfee0x-DzGu9hUw.mjs";
|
|
4
|
+
import { n as MongoContractSerializerBase, t as MongoContractSerializer } from "./mongo-contract-serializer-DC_DM9_Y-CDk1Veya.mjs";
|
|
5
|
+
import { i as mongoOperationsToPreview, n as formatMongoOperations, r as mongoFamilyDescriptor, t as createMongoFamilyInstance } from "./control-BG0O1wDj.mjs";
|
|
6
|
+
import { t as MongoContractView$1 } from "./mongo-contract-view-JZOa0Ry--BL8lTjbw.mjs";
|
|
7
|
+
import { t as MongoSchemaVerifierBase } from "./ir-vZWjElPY.mjs";
|
|
8
|
+
import { t as MongoMigration } from "./migration-DofqFxoZ.mjs";
|
|
9
9
|
import { t as timestampNowRuntimeGenerator } from "./runtime-B5fNQHQZ.mjs";
|
|
10
10
|
export { MongoMigration as Migration, MongoContractSerializer, MongoContractSerializerBase, MongoContractView$1 as MongoContractView, MongoSchemaVerifierBase, canonicalizeSchemasForVerification, contractToMongoSchemaIR, createMongoFamilyInstance, defaultMongoDomainNamespaceId, defaultMongoStorageNamespaceId, diffMongoSchemas, formatMongoOperations, mongoFamilyDescriptor, mongoFamilyEntityTypes, mongoFamilyPslBlockDescriptors, mongoOperationsToPreview, timestampNowRuntimeGenerator, verifyMongoSchema };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as MongoRunnerDependencies, n as MongoControlAdapter, r as MongoControlAdapterDescriptor, t as MarkerOperations } from "./control-adapter-Bh_ZraGM-
|
|
2
|
-
import "./control-adapter-
|
|
1
|
+
import { i as MongoRunnerDependencies, n as MongoControlAdapter, r as MongoControlAdapterDescriptor, t as MarkerOperations } from "./control-adapter-Bh_ZraGM-XeWQ672u.mjs";
|
|
2
|
+
import "./control-adapter-miP7lGv5.mjs";
|
|
3
3
|
export type { MarkerOperations, MongoControlAdapter, MongoControlAdapterDescriptor, MongoRunnerDependencies };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as contractToMongoSchemaIR, c as formatMongoOperations, i as canonicalizeSchemasForVerification, l as mongoFamilyDescriptor, n as MongoControlFamilyInstance, o as createMongoFamilyInstance, r as MongoControlTargetDescriptor, s as diffMongoSchemas, t as MongoControlExtensionDescriptor, u as mongoOperationsToPreview } from "./control-
|
|
1
|
+
import { a as contractToMongoSchemaIR, c as formatMongoOperations, i as canonicalizeSchemasForVerification, l as mongoFamilyDescriptor, n as MongoControlFamilyInstance, o as createMongoFamilyInstance, r as MongoControlTargetDescriptor, s as diffMongoSchemas, t as MongoControlExtensionDescriptor, u as mongoOperationsToPreview } from "./control-zKduRmAA.mjs";
|
|
2
2
|
export { type MongoControlExtensionDescriptor, type MongoControlFamilyInstance, type MongoControlTargetDescriptor, canonicalizeSchemasForVerification, contractToMongoSchemaIR, createMongoFamilyInstance, diffMongoSchemas, formatMongoOperations, mongoFamilyDescriptor, mongoOperationsToPreview };
|
package/dist/family__control.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as contractToMongoSchemaIR, r as diffMongoSchemas, t as canonicalizeSchemasForVerification } from "./verify-mongo-schema-B0bMHQW0-
|
|
2
|
-
import { i as mongoOperationsToPreview, n as formatMongoOperations, r as mongoFamilyDescriptor, t as createMongoFamilyInstance } from "./control-
|
|
1
|
+
import { n as contractToMongoSchemaIR, r as diffMongoSchemas, t as canonicalizeSchemasForVerification } from "./verify-mongo-schema-B0bMHQW0-BuK0Jv5S.mjs";
|
|
2
|
+
import { i as mongoOperationsToPreview, n as formatMongoOperations, r as mongoFamilyDescriptor, t as createMongoFamilyInstance } from "./control-BG0O1wDj.mjs";
|
|
3
3
|
export { canonicalizeSchemasForVerification, contractToMongoSchemaIR, createMongoFamilyInstance, diffMongoSchemas, formatMongoOperations, mongoFamilyDescriptor, mongoOperationsToPreview };
|
package/dist/family__ir.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as MongoContractView$1 } from "./mongo-contract-view-AnejqfrQ-
|
|
2
|
-
import { n as MongoContractSerializerBase, r as MongoSchemaVerifierBase, t as MongoContractSerializer } from "./ir-
|
|
1
|
+
import { t as MongoContractView$1 } from "./mongo-contract-view-AnejqfrQ-DLhDjvsh.mjs";
|
|
2
|
+
import { n as MongoContractSerializerBase, r as MongoSchemaVerifierBase, t as MongoContractSerializer } from "./ir-9VhpVaDJ.mjs";
|
|
3
3
|
export { MongoContractSerializer, MongoContractSerializerBase, MongoContractView$1 as MongoContractView, MongoSchemaVerifierBase };
|
package/dist/family__ir.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as MongoContractSerializerBase, t as MongoContractSerializer } from "./mongo-contract-serializer-DC_DM9_Y-
|
|
2
|
-
import { t as MongoContractView$1 } from "./mongo-contract-view-JZOa0Ry--
|
|
3
|
-
import { t as MongoSchemaVerifierBase } from "./ir-
|
|
1
|
+
import { n as MongoContractSerializerBase, t as MongoContractSerializer } from "./mongo-contract-serializer-DC_DM9_Y-CDk1Veya.mjs";
|
|
2
|
+
import { t as MongoContractView$1 } from "./mongo-contract-view-JZOa0Ry--BL8lTjbw.mjs";
|
|
3
|
+
import { t as MongoSchemaVerifierBase } from "./ir-vZWjElPY.mjs";
|
|
4
4
|
export { MongoContractSerializer, MongoContractSerializerBase, MongoContractView$1 as MongoContractView, MongoSchemaVerifierBase };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as MongoMigration } from "./migration-
|
|
1
|
+
import { t as MongoMigration } from "./migration-9n6DCvlw.mjs";
|
|
2
2
|
export { MongoMigration as Migration };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as MongoMigration } from "./migration-
|
|
1
|
+
import { t as MongoMigration } from "./migration-DofqFxoZ.mjs";
|
|
2
2
|
export { MongoMigration as Migration };
|
package/dist/family__pack.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as mongoAttributeSpecs } from "./interpreter-
|
|
2
|
-
import { n as mongoFamilyPslBlockDescriptors, t as mongoFamilyEntityTypes } from "./authoring-entity-types-DkFfee0x-
|
|
1
|
+
import { i as mongoAttributeSpecs } from "./interpreter-DPALasb4-BORWXsN5.mjs";
|
|
2
|
+
import { n as mongoFamilyPslBlockDescriptors, t as mongoFamilyEntityTypes } from "./authoring-entity-types-DkFfee0x-DzGu9hUw.mjs";
|
|
3
3
|
//#region ../../../2-mongo-family/9-family/dist/pack.mjs
|
|
4
4
|
const mongoFamilyPack = {
|
|
5
5
|
kind: "family",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as timestampNowRuntimeGenerator } from "./runtime-
|
|
1
|
+
import { A as defaultMongoDomainNamespaceId, j as defaultMongoStorageNamespaceId } from "./index-b-S3URri.mjs";
|
|
2
|
+
import { t as timestampNowRuntimeGenerator } from "./runtime-F95l7p-U.mjs";
|
|
3
3
|
export { defaultMongoDomainNamespaceId, defaultMongoStorageNamespaceId, timestampNowRuntimeGenerator };
|
package/dist/family__runtime.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { d as
|
|
1
|
+
import { d as defaultMongoDomainNamespaceId, f as defaultMongoStorageNamespaceId } from "./dist-DsIID5AE.mjs";
|
|
2
2
|
import { t as timestampNowRuntimeGenerator } from "./runtime-B5fNQHQZ.mjs";
|
|
3
3
|
export { defaultMongoDomainNamespaceId, defaultMongoStorageNamespaceId, timestampNowRuntimeGenerator };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as verifyMongoSchema, t as VerifyMongoSchemaOptions } from "./schema-verify-
|
|
1
|
+
import { n as verifyMongoSchema, t as VerifyMongoSchemaOptions } from "./schema-verify-DehTbLkM.mjs";
|
|
2
2
|
export { type VerifyMongoSchemaOptions, verifyMongoSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as verifyMongoSchema } from "./verify-mongo-schema-B0bMHQW0-
|
|
1
|
+
import { i as verifyMongoSchema } from "./verify-mongo-schema-B0bMHQW0-BuK0Jv5S.mjs";
|
|
2
2
|
export { verifyMongoSchema };
|
package/dist/{field-accessor-DHsAPiW3-iwRb2vC-.d.mts → field-accessor-DHsAPiW3-mw_sFEGx.d.mts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as MongoContract, V as MongoModelsMap, a as ExtractMongoTypeMaps, o as InferModelRow, t as AnyMongoTypeMaps, w as MongoContractWithTypeMaps } from "./mongo-value-set-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { C as MongoContract, V as MongoModelsMap, a as ExtractMongoTypeMaps, o as InferModelRow, t as AnyMongoTypeMaps, w as MongoContractWithTypeMaps } from "./mongo-value-set-BngSUlOh-BhDGXjM_.mjs";
|
|
2
|
+
import "./index-b-S3URri.mjs";
|
|
3
3
|
import { c as MongoValue } from "./index-wKMm41HC.mjs";
|
|
4
4
|
import { B as MongoFilterExpr, d as MongoAggAccumulator, m as MongoAggExpr, vt as MongoUpdatePipelineStage } from "./query-plan-C0-Yu8hf-DdilEdW6.mjs";
|
|
5
5
|
import "./execution-CKnUiOfm.mjs";
|
|
@@ -585,4 +585,4 @@ declare function expr(predicate: TypedAggExpr<DocField>): MongoFilterExpr;
|
|
|
585
585
|
declare function createFieldAccessor<S extends DocShape, N extends NestedDocShape = Record<string, never>>(): FieldAccessor<S, N>;
|
|
586
586
|
//#endregion
|
|
587
587
|
export { TypedUpdateOp as A, ProjectedShape as C, StringField as D, SortSpec as E, expr as F, UpdaterResult as M, ValidPaths as N, TypedAccumulatorExpr as O, createFieldAccessor as P, PathCompletions as S, ResolveRow as T, NullableDocField as _, DocShape as a, ObjectExpression as b, FieldAccessor as c, LeafExpression as d, LiteralValue as f, NestedDocShape as g, ModelToDocShape as h, DocField as i, UnwoundShape as j, TypedAggExpr as k, GroupSpec as l, ModelNestedShape as m, BooleanField as n, Expression as o, ModelArrayField as p, DateField as r, ExtractDocShape as s, ArrayField as t, GroupedDocShape as u, NullableNumericField as v, ResolvePath as w, ObjectField as x, NumericField as y };
|
|
588
|
-
//# sourceMappingURL=field-accessor-DHsAPiW3-
|
|
588
|
+
//# sourceMappingURL=field-accessor-DHsAPiW3-mw_sFEGx.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-accessor-DHsAPiW3-
|
|
1
|
+
{"version":3,"file":"field-accessor-DHsAPiW3-mw_sFEGx.d.mts","names":[],"sources":["../../../../2-mongo-family/5-query-builders/query-builder/dist/field-accessor-DHsAPiW3.d.mts"],"mappings":";;;;;;;;UAKU;WACC;WACA;;KAEN;WACM;WACA;;KAEN;WACM;WACA;;KAEN;WACM;WACA;;KAEN;WACM;WACA;;KAEN;WACM;WACA;;KAEN;WACM;WACA;;KAEN;WACM;WACA;;KAEN,aAAa,UAAU,YAAY,UAAU,uBAAuB,UAAU,wBAAwB,UAAU,yBAAyB,UAAU,YAAY;KAC/J,WAAW,eAAe;KAC1B,eAAe,KAAK;EACvB;IACE;IACA,eAAe;;IAEf,IAAI;EACN,eAAe;IACb;KACC,gBAAgB,k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zB,QAAQ,QAAQ,cAAc,cAAc;EAC5C,eAAe;EACf,YAAY,OAAO,aAAa;;;;;;;;;;;;;UAaxB,iBAAiB,UAAU,wBAAwB,aAAa,YAAY;WAC3E;EACT,OAAO,iBAAiB;EACxB,GAAG,cAAc;EACjB,GAAG,cAAc;EACjB,IAAI,OAAO,aAAa;EACxB,SAAS;;;;;;;;;;;;KAYN,WAAW,UAAU,YAAY,UAAU,kBAAkB,KAAK,iBAAiB,KAAK,eAAe;;;;;;;;;;;;;;;UAelG;EACR,IAAI,QAAQ,eAAe,gBAAgB;EAC3C,SAAS,OAAO,wBAAwB;EACxC,YAAY,SAAS,eAAe;EACpC,YAAY,SAAS,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgCjC,cAAc,UAAU,UAAU,UAAU,iBAAiB,qCAAqC,WAAW,aAAa,WAAW,EAAE,WAAW,UAAU,WAAW,IAAI,MAAM,MAAM,WAAW,YAAY,GAAG;WAC3M,OAAO;;;;;;;;;;;;;;;EAehB,QAAQ,UAAU,WAAW,UAAU,eAAe,eAAe;;;;;;;;;iBAStD,KAAK,WAAW,aAAa,YAAY;;;;;;;;;;;iBAWzC,oBAAoB,UAAU,UAAU,UAAU,iBAAiB,0BAA0B,cAAc,GAAG"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as MongoCodecRegistry, t as MongoCodec } from "./index-Dv2PNMiG.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { s as MongoMutationDefaults } from "./index-b-S3URri.mjs";
|
|
3
3
|
import { o as MongoParamRef } from "./index-wKMm41HC.mjs";
|
|
4
4
|
import { ot as MongoResultShape, rt as MongoQueryPlan } from "./query-plan-C0-Yu8hf-DdilEdW6.mjs";
|
|
5
5
|
import "./execution-CKnUiOfm.mjs";
|
|
6
|
-
import { r as AnyMongoDmlWireCommand } from "./index-
|
|
7
|
-
import { a as MongoLoweredDraft, i as MongoDriver, t as MongoAdapter } from "./index-
|
|
6
|
+
import { r as AnyMongoDmlWireCommand } from "./index-XiYJVhuE.mjs";
|
|
7
|
+
import { a as MongoLoweredDraft, i as MongoDriver, t as MongoAdapter } from "./index-DJLkZc6k.mjs";
|
|
8
8
|
import { AfterExecuteResult, AfterQueryResult, AsyncIterableResult, ExecuteInterceptResult, ExecutionPlan, ParamRefMutator, QueryInterceptResult, RuntimeExecuteOptions, RuntimeMiddleware, RuntimeMiddlewareContext, RuntimeStatementStats } from "@prisma/orm-framework/components/runtime";
|
|
9
9
|
import { RuntimeAdapterDescriptor, RuntimeAdapterInstance, RuntimeDriverDescriptor, RuntimeDriverInstance, RuntimeExtensionDescriptor, RuntimeExtensionInstance, RuntimeTargetDescriptor, RuntimeTargetInstance, RuntimeTargetInstance as RuntimeTargetInstance$1 } from "@prisma/orm-framework/components/execution";
|
|
10
10
|
//#region ../../../2-mongo-family/7-runtime/dist/index.d.mts
|
|
@@ -303,4 +303,4 @@ interface MongoRuntime {
|
|
|
303
303
|
declare function createMongoRuntime(options: MongoRuntimeOptions): MongoRuntime;
|
|
304
304
|
//#endregion
|
|
305
305
|
export { createMongoExecutionContext as C, flattenMongoParamRefs as D, createMongoRuntime as E, RuntimeTargetInstance$1 as S, createMongoParamRefMutator as T, MongoRuntimeExtensionInstance as _, MongoGeneratorStability as a, MongoRuntimeTargetDescriptor as b, MongoParamRefEntry as c, MongoParamRefMutator as d, MongoParamRefMutatorInternal as f, MongoRuntimeExtensionDescriptor as g, MongoRuntimeAdapterInstance as h, MongoExecutionStack as i, MongoParamRefEntryUnion as l, MongoRuntimeAdapterDescriptor as m, MongoExecutionContext as n, MongoMiddleware as o, MongoRuntime as p, MongoExecutionPlan as r, MongoMiddlewareContext as s, MongoCodecLookup as t, MongoParamRefHandle as u, MongoRuntimeMutationDefaultGenerator as v, createMongoExecutionStack as w, MongoStaticContributions as x, MongoRuntimeOptions as y };
|
|
306
|
-
//# sourceMappingURL=index-
|
|
306
|
+
//# sourceMappingURL=index-BpA_pfO1.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-BpA_pfO1.d.mts","names":[],"sources":["../../../../2-mongo-family/7-runtime/dist/index.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA6BU,mBAAmB,uBAAuB,cAAc;;;;;;;;;WASvD,SAAS;WACT,cAAc;;;;;;;KAOpB;UACK;WACC;WACA,WAAW,SAAS;WACpB,WAAW;;;;;;;UAOZ;WACC,cAAc;WACd,kCAAkC,cAAc;;UAEjD,6BAA6B,oCAAoC,wBAAwB,+BAAiC,aAAa,+BAAiC,oBAAoB,iCAAiC,WAAW,kBAAkB;UAC1P,4BAA4B,4CAA4C,gCAAgC,YAAY;UACpH,8BAA8B,oCAAoC,yBAAyB,gCAAgC,aAAa,4BAA4B,oBAAoB,kCAAkC,WAAW,mBAAmB;UACxP,8BAA8B,4CAA4C,kCAAkC;UAC5G,gCAAgC,4CAA4C,oCAAoC,WAAW,8BAA8B,aAAa;EAC9K,UAAU,8BAA8B;;;;;UAKhC,oBAAoB;WACnB,QAAQ,6BAA6B;WACrC,SAAS,8BAA8B;WACvC,QAAQ,iCAAiC,oBAAoB,+BAA+B;WAC5F,qBAAqB,gCAAgC;;iBAE/C,0BAA0B,oCAAoC;WACpE,QAAQ,6BAA6B;WACrC,SAAS,8BAA8B;WACvC,SAAS,iCAAiC,oBAAoB,+BAA+B;WAC7F,sBAAsB,gCAAgC;IAC7D,oBAAoB;;;;;;UAMd;EACR,IAAI,aAAa;EACjB,IAAI;;;;;;;;;UASI,sBAAsB,qBAAqB,4CAA4C;WACtF,UAAU;WACV,QAAQ;WACR,OAAO,oBAAoB;;iBAErB,4BAA4B,qBAAqB,oCAAoC;WAC3F,UAAU;WACV,OAAO,oBAAoB;IAClC,sBAAsB,WAAW;;;;;;;;;cASvB;;;;;;;;UAQJ,oBAAoB;YAClB,2BAA2B;;;;;;;UAO7B,mBAAmB;WAClB,KAAK,oBAAoB;WACz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EACxE,SAAS;;iBAEM,mBAAmB,SAAS,sBAAsB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { rt as MongoQueryPlan } from "./query-plan-C0-Yu8hf-DdilEdW6.mjs";
|
|
2
|
-
import { t as AnyMongoDdlCommand } from "./control-
|
|
2
|
+
import { t as AnyMongoDdlCommand } from "./control-BXKlnxAS.mjs";
|
|
3
3
|
import "./execution-CKnUiOfm.mjs";
|
|
4
|
-
import { i as AnyMongoWireCommand, n as AnyMongoDdlWireCommand, r as AnyMongoDmlWireCommand } from "./index-
|
|
4
|
+
import { i as AnyMongoWireCommand, n as AnyMongoDdlWireCommand, r as AnyMongoDmlWireCommand } from "./index-XiYJVhuE.mjs";
|
|
5
5
|
import { ControlDriverInstance } from "@prisma/orm-framework/components/control";
|
|
6
6
|
import { CodecCallContext } from "@prisma/orm-framework/components/codec";
|
|
7
7
|
import { Db } from "mongodb";
|
|
@@ -148,4 +148,4 @@ interface MongoControlDriverInstance extends ControlDriverInstance<'mongo', 'mon
|
|
|
148
148
|
}
|
|
149
149
|
//#endregion
|
|
150
150
|
export { MongoLoweredDraft as a, MongoDriver as i, MongoControlDriverInstance as n, MongoDdlPlan as r, MongoAdapter as t };
|
|
151
|
-
//# sourceMappingURL=index-
|
|
151
|
+
//# sourceMappingURL=index-DJLkZc6k.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-DJLkZc6k.d.mts","names":[],"sources":["../../../../2-mongo-family/6-transport/mongo-lowering/dist/index.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;KAkBK;WACM;WACA;WACA,UAAU;;WAEV;WACA;WACA,WAAW,cAAc;;WAEzB;WACA;WACA,QAAQ;WACR,QAAQ,0BAA0B,cAAc;WAChD;;WAEA;WACA;WACA,QAAQ;WACR,QAAQ,0BAA0B,cAAc;WAChD;;WAEA;WACA;WACA,QAAQ;;WAER;WACA;WACA,QAAQ;;WAER;WACA;WACA,QAAQ;WACR,QAAQ,0BAA0B,cAAc;WAChD;WACA,MAAM;WACN;;WAEA;WACA;WACA,QAAQ;WACR,MAAM;;WAEN;WACA;WACA,UAAU,cAAc;;WAExB;WACA;WACA,UAAU;;WAEV;WACA;WACA,WAAW,cAAc;;WAEzB;WACA;WACA,QAAQ;WACR,QAAQ,0BAA0B,cAAc;;WAEhD;WACA;WACA,QAAQ;WACR,QAAQ,0BAA0B,cAAc;;WAEhD;WACA;WACA,QAAQ;;WAER;WACA;WACA,QAAQ;;WAER;WACA;WACA,QAAQ;WACR,QAAQ,0BAA0B,cAAc;WAChD;WACA,MAAM;WACN;;WAEA;WACA;WACA,QAAQ;WACR,MAAM;;WAEN;WACA;WACA,UAAU,cAAc;;;UAGzB;WACC,SAAS;;UAEV;EACR,MAAM,MAAM,cAAc,KAAK,mBAAmB,QAAQ;EAC1D,MAAM,MAAM,gBAAgB,KAAK,mBAAmB,QAAQ;EAC5D,MAAM,MAAM,iBAAiB,cAAc,KAAK,mBAAmB,QAAQ;;;;;;;;;;;EAW3E,gBAAgB,MAAM,iBAAiB;;;;;;;;;EASvC,cAAc,OAAO,mBAAmB,KAAK,mBAAmB,QAAQ;;;;UAIhE;EACR,QAAQ,KAAK,aAAa,yBAAyB,cAAc;EACjE,IAAI,aAAa,yBAAyB;EAC1C,SAAS;;UAED,mCAAmC,yCAAyC;WAC3E,IAAI"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as CollationOptions } from "./mongodb-types-B4HmhF1S.mjs";
|
|
2
|
-
import { A as MongoIndexKey } from "./mongo-value-set-
|
|
3
|
-
import "./index-
|
|
2
|
+
import { A as MongoIndexKey } from "./mongo-value-set-BngSUlOh-BhDGXjM_.mjs";
|
|
3
|
+
import "./index-b-S3URri.mjs";
|
|
4
4
|
import { IRNodeBase } from "@prisma/orm-framework/components/ir";
|
|
5
5
|
import { DiffableNode } from "@prisma/orm-framework/components/control";
|
|
6
6
|
//#region ../../../2-mongo-family/3-tooling/mongo-schema-ir/dist/exports/index.d.mts
|
|
@@ -175,4 +175,4 @@ declare function indexesEquivalent(a: MongoSchemaIndex, b: MongoSchemaIndex): bo
|
|
|
175
175
|
type AnyMongoSchemaNode = MongoSchemaIR | MongoSchemaCollection | MongoSchemaCollectionOptions | MongoSchemaIndex | MongoSchemaValidator;
|
|
176
176
|
//#endregion
|
|
177
177
|
export { MongoSchemaCollectionOptionsInput as a, MongoSchemaIndex as c, MongoSchemaValidatorOptions as d, MongoSchemaVisitor as f, indexesEquivalent as h, MongoSchemaCollectionOptions as i, MongoSchemaIndexOptions as l, deepEqual as m, MongoSchemaCollection as n, MongoSchemaIR as o, canonicalize as p, MongoSchemaCollectionCtorOptions as r, MongoSchemaIRNode as s, AnyMongoSchemaNode as t, MongoSchemaValidator as u };
|
|
178
|
-
//# sourceMappingURL=index-
|
|
178
|
+
//# sourceMappingURL=index-Db33rU3r.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-Db33rU3r.d.mts","names":[],"sources":["../../../../2-mongo-family/3-tooling/mongo-schema-ir/dist/exports/index.d.mts"],"mappings":";;;;;;;iBAKiB,aAAa;;;UAGpB;WACC;IACP;IACA;;WAEO;IACP;IACA;IACA;;WAEO,YAAY;WACZ;IACP;;WAEO;IACP;;;cAGU,qCAAqC;WACxC;;WAEA;WACA;IACP;IACA;;WAEO;IACP;IACA;IACA;;WAEO,YAAY;WACZ;IACP;;WAEO;IACP;;EAEF,YAAY,SAAS;EACrB,OAAO,GAAG,SAAS,mBAAmB,KAAK;;;;UAInC;WACC,YAAY;WACZ;WACA;;cAEG,6BAA6B;WAChC;;WAEA;WACA,YAAY;WACZ;WACA;EACT,YAAY,SAAS;EACrB,OAAO,GAAG,SAAS,mBAAmB,KAAK;;;;UAInC;WACC;WACA,UAAU,cAAc;WACxB,YAAY;WACZ,UAAU;;cAEP,8BAA8B;WACjC;WACA;WACA;WACA,SAAS,cAAc;WACvB,YAAY;WACZ,UAAU;EACnB,YAAY,SAAS;EACrB,OAAO,GAAG,SAAS,mBAAmB,KAAK;;;;cAI/B,sBAAsB;WACzB;;WAEA;WACA,aAAa,cAAc;WAC3B,iBAAiB;mBACT;EACjB,YAAY,aAAa,cAAc;EACvC,OAAO,GAAG,SAAS,mBAAmB,KAAK;EAC3C,WAAW,eAAe;;;;UAIlB,mBAAmB;EAC3B,OAAO,MAAM,gBAAgB;EAC7B,WAAW,MAAM,wBAAwB;EACzC,MAAM,MAAM,mBAAmB;EAC/B,UAAU,MAAM,uBAAuB;EACvC,kBAAkB,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;uBAkBlC,0BAA0B,sBAAsB;WAC5D;oBACS;;oBAEA;WACT,OAAO,GAAG,SAAS,mBAAmB,KAAK;EACpD;EACA,UAAU,OAAO;EACjB,qBAAqB;;;;UAIb;WACC,MAAM,cAAc;WACpB;WACA;WACA;WACA,0BAA0B;WAC1B,qBAAqB;WACrB,YAAY;WACZ,UAAU;WACV;WACA;;cAEG,yBAAyB;WAC5B;WACA;WACA,MAAM,cAAc;WACpB;WACA;WACA;WACA,0BAA0B;WAC1B,qBAAqB;WACrB,YAAY;WACZ,UAAU;WACV;WACA;EACT,YAAY,SAAS;EACrB,OAAO,GAAG,SAAS,mBAAmB,KAAK;;;;;;;;iBAQ5B,UAAU,YAAY;iBACtB,kBAAkB,GAAG,kBAAkB,GAAG;;;KAGtD,qBAAqB,gBAAgB,wBAAwB,+BAA+B,mBAAmB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as CreateCollectionOptions, r as CreateIndexesOptions, t as CollationOptions } from "./mongodb-types-B4HmhF1S.mjs";
|
|
2
|
-
import { j as MongoIndexKeyDirection } from "./mongo-value-set-
|
|
2
|
+
import { j as MongoIndexKeyDirection } from "./mongo-value-set-BngSUlOh-BhDGXjM_.mjs";
|
|
3
3
|
import { l as RawPipeline, t as Document } from "./index-wKMm41HC.mjs";
|
|
4
|
-
import { a as CollModOptions, l as CreateIndexOptions, s as CreateCollectionOptions$1 } from "./control-
|
|
4
|
+
import { a as CollModOptions, l as CreateIndexOptions, s as CreateCollectionOptions$1 } from "./control-BXKlnxAS.mjs";
|
|
5
5
|
import "./execution-CKnUiOfm.mjs";
|
|
6
6
|
//#region ../../../2-mongo-family/6-transport/mongo-wire/dist/index.d.mts
|
|
7
7
|
//#region src/wire-commands.d.ts
|
|
@@ -133,4 +133,4 @@ type AnyMongoWireCommand = AnyMongoDmlWireCommand | AnyMongoDdlWireCommand;
|
|
|
133
133
|
declare function isDdlWireCommand(cmd: AnyMongoWireCommand): cmd is AnyMongoDdlWireCommand;
|
|
134
134
|
//#endregion
|
|
135
135
|
export { UpdateOneWireCommand as _, CollModWireCommand as a, DeleteManyWireCommand as c, DropIndexWireCommand as d, FindOneAndDeleteWireCommand as f, UpdateManyWireCommand as g, InsertOneWireCommand as h, AnyMongoWireCommand as i, DeleteOneWireCommand as l, InsertManyWireCommand as m, AnyMongoDdlWireCommand as n, CreateCollectionWireCommand as o, FindOneAndUpdateWireCommand as p, AnyMongoDmlWireCommand as r, CreateIndexWireCommand as s, AggregateWireCommand as t, DropCollectionWireCommand as u, isDdlWireCommand as v };
|
|
136
|
-
//# sourceMappingURL=index-
|
|
136
|
+
//# sourceMappingURL=index-XiYJVhuE.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-XiYJVhuE.d.mts","names":[],"sources":["../../../../2-mongo-family/6-transport/mongo-wire/dist/index.d.mts"],"mappings":";;;;;;;uBAKuB;oBACH;WACT;YACC,YAAY;YACZ;;cAEE,6BAA6B;WAChC;WACA,UAAU;EACnB,YAAY,oBAAoB,UAAU;;cAE9B,6BAA6B;WAChC;WACA,QAAQ;WACR,QAAQ,WAAW,cAAc;WACjC;EACT,YAAY,oBAAoB,QAAQ,UAAU,QAAQ,WAAW,cAAc,WAAW;;cAElF,6BAA6B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