@prisma-next/mongo-contract 0.7.0-dev.7 → 0.8.0-dev.1
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/README.md +2 -1
- package/dist/index.d.mts +657 -85
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +393 -45
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/src/contract-schema.ts +16 -0
- package/src/contract-types.ts +24 -123
- package/src/exports/index.ts +52 -19
- package/src/ir/mongo-change-stream-pre-and-post-images-options.ts +23 -0
- package/src/ir/mongo-clustered-collection-options.ts +32 -0
- package/src/ir/mongo-collation-options.ts +66 -0
- package/src/ir/mongo-collection-options.ts +159 -0
- package/src/ir/mongo-collection.ts +71 -0
- package/src/ir/mongo-index-option-defaults.ts +27 -0
- package/src/ir/mongo-index-options.ts +91 -0
- package/src/ir/mongo-index.ts +64 -0
- package/src/ir/mongo-storage.ts +55 -0
- package/src/ir/mongo-time-series-collection-options.ts +40 -0
- package/src/ir/mongo-validator.ts +42 -0
- package/src/polymorphic-index-scope.ts +16 -6
- package/src/validate-mongo-contract.ts +8 -0
package/README.md
CHANGED
|
@@ -4,7 +4,8 @@ Contract types and validation for the MongoDB family.
|
|
|
4
4
|
|
|
5
5
|
## Responsibilities
|
|
6
6
|
|
|
7
|
-
- **Contract types**: `MongoContract`, `MongoContractWithTypeMaps`, `MongoTypeMaps`, `MongoModelDefinition`, `
|
|
7
|
+
- **Contract types**: `MongoContract`, `MongoContractWithTypeMaps`, `MongoTypeMaps`, `MongoModelDefinition`, `MongoStorageShape` (raw-JSON storage shape) — the typed contract representation for MongoDB targets
|
|
8
|
+
- **Storage IR**: `MongoStorage` — the in-memory storage class instantiated by the per-target contract serializer; structurally satisfies `MongoStorageShape` and additionally carries the `namespaces` map
|
|
8
9
|
- **Type-level extraction**: `ExtractMongoTypeMaps`, `ExtractMongoCodecTypes`, `InferModelRow` — utility types for deriving codec types and row shapes from a contract
|
|
9
10
|
- **Contract validation**: `validateMongoContract()` — validates a JSON contract against the MongoDB schema using arktype, returning a `ValidatedMongoContract`
|
|
10
11
|
- **Storage validation**: `validateMongoStorage()` — validates the storage section of a MongoDB contract
|