@prisma-next/family-mongo 0.7.0 → 0.8.0-dev.10
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 +22 -9
- package/dist/control-adapter.d.mts +75 -0
- package/dist/control-adapter.d.mts.map +1 -0
- package/dist/control-adapter.mjs +1 -0
- package/dist/control.d.mts +60 -16
- package/dist/control.d.mts.map +1 -1
- package/dist/control.mjs +257 -276
- package/dist/control.mjs.map +1 -1
- package/dist/ir.d.mts +131 -0
- package/dist/ir.d.mts.map +1 -0
- package/dist/ir.mjs +54 -0
- package/dist/ir.mjs.map +1 -0
- package/dist/mongo-contract-serializer-Co3EaTVj.mjs +98 -0
- package/dist/mongo-contract-serializer-Co3EaTVj.mjs.map +1 -0
- package/dist/schema-verify.d.mts +22 -2
- package/dist/schema-verify.d.mts.map +1 -0
- package/dist/schema-verify.mjs +1 -1
- package/dist/verify-mongo-schema-BL7t9YTB.mjs +592 -0
- package/dist/verify-mongo-schema-BL7t9YTB.mjs.map +1 -0
- package/package.json +20 -22
- package/src/core/contract-to-schema.ts +84 -0
- package/src/core/control-adapter.ts +97 -0
- package/src/core/control-instance.ts +275 -272
- package/src/core/control-target-descriptor.ts +26 -0
- package/src/core/control-types.ts +6 -4
- package/src/core/ir/mongo-contract-serializer-base.ts +124 -0
- package/src/core/ir/mongo-contract-serializer.ts +18 -0
- package/src/core/ir/mongo-schema-verifier-base.ts +87 -0
- package/src/core/operation-preview.ts +131 -0
- package/src/core/schema-diff.ts +402 -0
- package/src/core/schema-verify/canonicalize-introspection.ts +389 -0
- package/src/core/schema-verify/verify-mongo-schema.ts +60 -0
- package/src/exports/control-adapter.ts +1 -0
- package/src/exports/control.ts +8 -1
- package/src/exports/ir.ts +3 -0
- package/src/exports/schema-verify.ts +4 -2
- package/src/core/mongo-target-descriptor.ts +0 -180
package/README.md
CHANGED
|
@@ -6,7 +6,9 @@ Mongo family descriptor and family pack for Prisma Next.
|
|
|
6
6
|
|
|
7
7
|
This package is the Mongo family integration point for both control-plane assembly and authoring-time pack composition. It provides:
|
|
8
8
|
|
|
9
|
-
- the Mongo `ControlFamilyDescriptor`
|
|
9
|
+
- the Mongo `ControlFamilyDescriptor` used by configs and CLI flows
|
|
10
|
+
- the `MongoControlAdapter` SPI that lets adapters supply wire-level marker-ledger and introspection implementations
|
|
11
|
+
- family-shared verification and operation-preview helpers (`verifyMongoSchema`, `formatMongoOperations`)
|
|
10
12
|
- the pure-data Mongo family pack ref used by `contract.ts` authoring
|
|
11
13
|
- a cohesive dependency surface for the Mongo family, including `@prisma-next/mongo-contract-ts`
|
|
12
14
|
|
|
@@ -14,16 +16,19 @@ This package is the Mongo family integration point for both control-plane assemb
|
|
|
14
16
|
|
|
15
17
|
- **Control-plane assembly**: Exposes `mongoFamilyDescriptor` and `createMongoFamilyInstance()` for validation and emission flows.
|
|
16
18
|
- **Family hook integration**: Wires `mongoEmission` from `@prisma-next/mongo-emitter` into the family descriptor.
|
|
17
|
-
- **
|
|
19
|
+
- **Adapter SPI**: Defines `MongoControlAdapter` — the contract `@prisma-next/adapter-mongo` implements for marker-ledger CAS, ledger appends, and schema introspection. `MongoControlFamilyInstance` resolves the adapter from the control stack and dispatches wire-level work through it.
|
|
20
|
+
- **Family-shared verification**: Owns `verifyMongoSchema` (the structural diff against introspected `MongoSchemaIR`) and the `MongoSchemaVerifierBase` walk used by per-target verifiers.
|
|
18
21
|
- **Authoring-time family pack**: Exposes `@prisma-next/family-mongo/pack` so `defineContract(...)` can bind a Mongo contract to the Mongo family without importing control-plane code.
|
|
19
22
|
- **Validation and emission**: Delegates Mongo contract validation to `@prisma-next/mongo-contract` and contract emission to the shared emitter pipeline.
|
|
20
23
|
|
|
21
24
|
## Entrypoints
|
|
22
25
|
|
|
23
|
-
- `./control`: control-plane entrypoint exporting `mongoFamilyDescriptor`, `
|
|
26
|
+
- `./control`: control-plane entrypoint exporting `mongoFamilyDescriptor`, `createMongoFamilyInstance`, `MongoControlFamilyInstance`, and family-shared helpers (`contractToMongoSchemaIR`, `formatMongoOperations`, `diffMongoSchemas`)
|
|
27
|
+
- `./control-adapter`: SPI surface — `MongoControlAdapter` and `MongoControlAdapterDescriptor`, implemented by `@prisma-next/adapter-mongo`
|
|
28
|
+
- `./ir`: Mongo family IR abstract bases (`MongoContractSerializerBase`, `MongoSchemaVerifierBase`) extended by target packages. The concrete `MongoStorage` storage class lives in the foundation package `@prisma-next/mongo-contract`.
|
|
24
29
|
- `./migration`: migration authoring — `Migration` class, factory functions, and strategies (re-exported from `@prisma-next/target-mongo/migration`)
|
|
25
30
|
- `./pack`: pure pack ref for TypeScript authoring flows such as `@prisma-next/mongo-contract-ts/contract-builder`
|
|
26
|
-
- `./schema-verify`:
|
|
31
|
+
- `./schema-verify`: family-shared `verifyMongoSchema(...)`. The CLI `db verify --schema-only` path and the `MongoMigrationRunner` post-apply verify step both call into this shared verifier, so both surfaces agree on "matches the contract" by construction
|
|
27
32
|
|
|
28
33
|
## Usage
|
|
29
34
|
|
|
@@ -31,7 +36,8 @@ This package is the Mongo family integration point for both control-plane assemb
|
|
|
31
36
|
|
|
32
37
|
```typescript
|
|
33
38
|
import { createControlStack } from '@prisma-next/framework-components/control';
|
|
34
|
-
import { mongoFamilyDescriptor
|
|
39
|
+
import { mongoFamilyDescriptor } from '@prisma-next/family-mongo/control';
|
|
40
|
+
import { mongoTargetDescriptor } from '@prisma-next/target-mongo/control';
|
|
35
41
|
|
|
36
42
|
const stack = createControlStack({
|
|
37
43
|
family: mongoFamilyDescriptor,
|
|
@@ -129,13 +135,19 @@ Run `node migration.ts` to produce `ops.json` and `migration.json`. Use `--dry-r
|
|
|
129
135
|
## Package Structure
|
|
130
136
|
|
|
131
137
|
- `src/core/control-descriptor.ts`: `MongoFamilyDescriptor` implementation
|
|
132
|
-
- `src/core/control-instance.ts`: `createMongoFamilyInstance()` and `MongoControlFamilyInstance`
|
|
133
|
-
- `src/core/
|
|
138
|
+
- `src/core/control-instance.ts`: `createMongoFamilyInstance()` and `MongoControlFamilyInstance` — resolves the `MongoControlAdapter` from the control stack and dispatches wire-level work through it
|
|
139
|
+
- `src/core/control-adapter.ts`: `MongoControlAdapter` SPI definition
|
|
140
|
+
- `src/core/control-target-descriptor.ts`: `MongoControlTargetDescriptor` interface (concrete `mongoTargetDescriptor` lives in `@prisma-next/target-mongo`)
|
|
141
|
+
- `src/core/ir/`: Mongo family IR abstract bases (`MongoContractSerializerBase`, `MongoSchemaVerifierBase`); the concrete `MongoStorage` class lives at `@prisma-next/mongo-contract/ir/mongo-storage.ts`
|
|
142
|
+
- `src/core/operation-preview.ts`: family-shared `formatMongoOperations` / `mongoOperationsToPreview`
|
|
143
|
+
- `src/core/schema-verify/verify-mongo-schema.ts`: family-shared `verifyMongoSchema(...)`
|
|
134
144
|
- `src/core/mongo-migration.ts`: `MongoMigration` class (fixes the `Migration<TOperation>` type parameter to `MongoMigrationPlanOperation`)
|
|
135
145
|
- `src/exports/control.ts`: control-plane entrypoint
|
|
146
|
+
- `src/exports/control-adapter.ts`: adapter SPI entrypoint
|
|
147
|
+
- `src/exports/ir.ts`: IR abstract base entrypoint
|
|
136
148
|
- `src/exports/migration.ts`: migration authoring entrypoint
|
|
137
149
|
- `src/exports/pack.ts`: authoring-time family pack ref
|
|
138
|
-
- `src/exports/schema-verify.ts`: schema-verify entrypoint
|
|
150
|
+
- `src/exports/schema-verify.ts`: schema-verify entrypoint exposing the family-shared `verifyMongoSchema`
|
|
139
151
|
|
|
140
152
|
## Dependencies
|
|
141
153
|
|
|
@@ -145,4 +157,5 @@ Run `node migration.ts` to produce `ops.json` and `migration.json`. Use `--dry-r
|
|
|
145
157
|
- `@prisma-next/mongo-contract-ts`: Mongo `contract.ts` authoring surface
|
|
146
158
|
- `@prisma-next/mongo-emitter`: Mongo family emission hook
|
|
147
159
|
- `@prisma-next/mongo-query-ast`: Mongo command AST types (`MongoMigrationPlanOperation`)
|
|
148
|
-
|
|
160
|
+
|
|
161
|
+
This package carries no runtime dependency on `@prisma-next/target-mongo`, `@prisma-next/adapter-mongo`, or `@prisma-next/driver-mongo` — those lower layers depend on the family and adapter SPI defined here, matching the layering used by the SQL family.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { MongoSchemaIR } from "@prisma-next/mongo-schema-ir";
|
|
2
|
+
import { ControlAdapterDescriptor, ControlAdapterInstance, ControlDriverInstance } from "@prisma-next/framework-components/control";
|
|
3
|
+
import { ContractMarkerRecord } from "@prisma-next/contract/types";
|
|
4
|
+
|
|
5
|
+
//#region src/core/control-adapter.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Mongo control adapter interface for control-plane operations.
|
|
8
|
+
* Implemented by target-specific adapters (e.g. `@prisma-next/adapter-mongo`).
|
|
9
|
+
*
|
|
10
|
+
* Mirrors `SqlControlAdapter` so the family layer dispatches every
|
|
11
|
+
* driver-bound wire operation through a single SPI surface instead of
|
|
12
|
+
* importing target-package internals directly. The adapter is the
|
|
13
|
+
* natural home for these method bodies because it owns both the
|
|
14
|
+
* `ControlDriverInstance` (which exposes the underlying `Db`) and the
|
|
15
|
+
* Mongo command vocabulary used to talk to it.
|
|
16
|
+
*
|
|
17
|
+
* @template TTarget - The target ID (today only `'mongo'`).
|
|
18
|
+
*/
|
|
19
|
+
interface MongoControlAdapter<TTarget extends string = string> extends ControlAdapterInstance<'mongo', TTarget> {
|
|
20
|
+
/**
|
|
21
|
+
* Reads the contract marker document for `space`, or returns `null`
|
|
22
|
+
* if no marker document has been written for that space yet. Each
|
|
23
|
+
* space owns one document keyed by `_id: <space>` in the
|
|
24
|
+
* `_prisma_migrations` collection.
|
|
25
|
+
*/
|
|
26
|
+
readMarker(driver: ControlDriverInstance<'mongo', TTarget>, space: string): Promise<ContractMarkerRecord | null>;
|
|
27
|
+
/**
|
|
28
|
+
* Reads every marker document (one per contract space) and returns
|
|
29
|
+
* them keyed by `space`. Used by the per-space verifier to detect
|
|
30
|
+
* marker-vs-on-disk drift and orphan marker rows. Returns an empty
|
|
31
|
+
* map when no marker documents exist yet.
|
|
32
|
+
*/
|
|
33
|
+
readAllMarkers(driver: ControlDriverInstance<'mongo', TTarget>): Promise<ReadonlyMap<string, ContractMarkerRecord>>;
|
|
34
|
+
/**
|
|
35
|
+
* Inserts an initial marker document for the given space.
|
|
36
|
+
*/
|
|
37
|
+
initMarker(driver: ControlDriverInstance<'mongo', TTarget>, space: string, destination: {
|
|
38
|
+
readonly storageHash: string;
|
|
39
|
+
readonly profileHash: string;
|
|
40
|
+
readonly invariants?: readonly string[];
|
|
41
|
+
}): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Atomically updates the marker document for `space` (CAS on
|
|
44
|
+
* `expectedFrom`). Returns `true` when the CAS succeeded, `false`
|
|
45
|
+
* when another process advanced the marker first.
|
|
46
|
+
*/
|
|
47
|
+
updateMarker(driver: ControlDriverInstance<'mongo', TTarget>, space: string, expectedFrom: string, destination: {
|
|
48
|
+
readonly storageHash: string;
|
|
49
|
+
readonly profileHash: string;
|
|
50
|
+
readonly invariants?: readonly string[];
|
|
51
|
+
}): Promise<boolean>;
|
|
52
|
+
/**
|
|
53
|
+
* Appends a ledger entry for the given space. Ledger entries co-exist
|
|
54
|
+
* with marker documents in the same collection; their key shape
|
|
55
|
+
* distinguishes them at read time.
|
|
56
|
+
*/
|
|
57
|
+
writeLedgerEntry(driver: ControlDriverInstance<'mongo', TTarget>, space: string, entry: {
|
|
58
|
+
readonly edgeId: string;
|
|
59
|
+
readonly from: string;
|
|
60
|
+
readonly to: string;
|
|
61
|
+
}): Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Introspects the live database and returns a `MongoSchemaIR`.
|
|
64
|
+
*/
|
|
65
|
+
introspectSchema(driver: ControlDriverInstance<'mongo', TTarget>): Promise<MongoSchemaIR>;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Mongo control adapter descriptor. Mirrors `SqlControlAdapterDescriptor`:
|
|
69
|
+
* extends the framework's `ControlAdapterDescriptor` and narrows the
|
|
70
|
+
* `create()` return to a `MongoControlAdapter<TTarget>`.
|
|
71
|
+
*/
|
|
72
|
+
interface MongoControlAdapterDescriptor<TTarget extends string = string> extends ControlAdapterDescriptor<'mongo', TTarget, MongoControlAdapter<TTarget>> {}
|
|
73
|
+
//#endregion
|
|
74
|
+
export { type MongoControlAdapter, type MongoControlAdapterDescriptor };
|
|
75
|
+
//# sourceMappingURL=control-adapter.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-adapter.d.mts","names":[],"sources":["../src/core/control-adapter.ts"],"mappings":";;;;;;;AAqBA;;;;;;;;;;;UAAiB,mBAAA,0CACP,sBAAA,UAAgC,OAAA;EAoBrC;;;;;;EAbH,UAAA,CACE,MAAA,EAAQ,qBAAA,UAA+B,OAAA,GACvC,KAAA,WACC,OAAA,CAAQ,oBAAA;EA+C8B;;;;;;EAvCzC,cAAA,CACE,MAAA,EAAQ,qBAAA,UAA+B,OAAA,IACtC,OAAA,CAAQ,WAAA,SAAoB,oBAAA;EApBvB;;;EAyBR,UAAA,CACE,MAAA,EAAQ,qBAAA,UAA+B,OAAA,GACvC,KAAA,UACA,WAAA;IAAA,SACW,WAAA;IAAA,SACA,WAAA;IAAA,SACA,UAAA;EAAA,IAEV,OAAA;EAzBsC;;;;;EAgCzC,YAAA,CACE,MAAA,EAAQ,qBAAA,UAA+B,OAAA,GACvC,KAAA,UACA,YAAA,UACA,WAAA;IAAA,SACW,WAAA;IAAA,SACA,WAAA;IAAA,SACA,UAAA;EAAA,IAEV,OAAA;EA7BQ;;;;;EAoCX,gBAAA,CACE,MAAA,EAAQ,qBAAA,UAA+B,OAAA,GACvC,KAAA,UACA,KAAA;IAAA,SAAkB,MAAA;IAAA,SAAyB,IAAA;IAAA,SAAuB,EAAA;EAAA,IACjE,OAAA;EAhCD;;;EAqCF,gBAAA,CAAiB,MAAA,EAAQ,qBAAA,UAA+B,OAAA,IAAW,OAAA,CAAQ,aAAA;AAAA;;;;;;UAQ5D,6BAAA,0CACP,wBAAA,UAAkC,OAAA,EAAS,mBAAA,CAAoB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/control.d.mts
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
import { ContractSpace, ControlExtensionDescriptor, ControlFamilyDescriptor, ControlFamilyInstance, ControlStack, MigratableTargetDescriptor, OperationPreviewCapable, SchemaViewCapable } from "@prisma-next/framework-components/control";
|
|
2
|
-
import { MongoContract, MongoStorage } from "@prisma-next/mongo-contract";
|
|
3
1
|
import { MongoSchemaIR } from "@prisma-next/mongo-schema-ir";
|
|
2
|
+
import { ContractSerializer, ContractSpace, ControlExtensionDescriptor, ControlFamilyDescriptor, ControlFamilyInstance, ControlStack, MigratableTargetDescriptor, MigrationPlanOperation, OperationPreview, OperationPreviewCapable, SchemaIssue, SchemaVerificationNode, SchemaVerifier, SchemaViewCapable } from "@prisma-next/framework-components/control";
|
|
3
|
+
import { MongoContract, MongoStorageShape } from "@prisma-next/mongo-contract";
|
|
4
4
|
import { Contract } from "@prisma-next/contract/types";
|
|
5
5
|
|
|
6
|
+
//#region src/core/contract-to-schema.d.ts
|
|
7
|
+
declare function contractToMongoSchemaIR(contract: MongoContract | null): MongoSchemaIR;
|
|
8
|
+
//#endregion
|
|
6
9
|
//#region src/core/control-instance.d.ts
|
|
7
10
|
interface MongoControlFamilyInstance extends ControlFamilyInstance<'mongo', MongoSchemaIR>, SchemaViewCapable<MongoSchemaIR>, OperationPreviewCapable {
|
|
11
|
+
/**
|
|
12
|
+
* Validates the JSON contract envelope structurally and returns it
|
|
13
|
+
* cast to the framework `Contract` shape. The per-target serializer
|
|
14
|
+
* (held on the Mongo target descriptor) does the class-form wrap for
|
|
15
|
+
* downstream consumers; the family only needs the validated data.
|
|
16
|
+
*/
|
|
8
17
|
validateContract(contractJson: unknown): Contract;
|
|
9
18
|
}
|
|
10
19
|
declare function createMongoFamilyInstance(controlStack: ControlStack): MongoControlFamilyInstance;
|
|
@@ -12,6 +21,24 @@ declare function createMongoFamilyInstance(controlStack: ControlStack): MongoCon
|
|
|
12
21
|
//#region src/core/control-descriptor.d.ts
|
|
13
22
|
declare const mongoFamilyDescriptor: ControlFamilyDescriptor<'mongo', MongoControlFamilyInstance>;
|
|
14
23
|
//#endregion
|
|
24
|
+
//#region src/core/control-target-descriptor.d.ts
|
|
25
|
+
/**
|
|
26
|
+
* Mongo target control descriptor type. Extends the framework's
|
|
27
|
+
* `MigratableTargetDescriptor` with two named SPI properties next to
|
|
28
|
+
* the existing `migrations` capability:
|
|
29
|
+
*
|
|
30
|
+
* - `contractSerializer` — JSON to class boundary for Mongo contracts.
|
|
31
|
+
* - `schemaVerifier` — per-target verifier walking the family contract
|
|
32
|
+
* against `MongoSchemaIR`.
|
|
33
|
+
*
|
|
34
|
+
* The descriptor itself is the aggregator; no extra `Target<TContract,
|
|
35
|
+
* TSchema>` interface is introduced.
|
|
36
|
+
*/
|
|
37
|
+
interface MongoControlTargetDescriptor<TContract extends MongoContract = MongoContract> extends MigratableTargetDescriptor<'mongo', 'mongo', MongoControlFamilyInstance> {
|
|
38
|
+
readonly contractSerializer: ContractSerializer<TContract>;
|
|
39
|
+
readonly schemaVerifier: SchemaVerifier<TContract, MongoSchemaIR>;
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
15
42
|
//#region src/core/control-types.d.ts
|
|
16
43
|
/**
|
|
17
44
|
* Mongo-family extension descriptor.
|
|
@@ -23,25 +50,42 @@ declare const mongoFamilyDescriptor: ControlFamilyDescriptor<'mongo', MongoContr
|
|
|
23
50
|
* The shape comes from `@prisma-next/framework-components/control`
|
|
24
51
|
* (`ContractSpace`) — contract-space identity is a framework concept,
|
|
25
52
|
* not a Mongo-specific one. The Mongo family specialises the generic
|
|
26
|
-
* to `MongoContract<
|
|
27
|
-
*
|
|
53
|
+
* to `MongoContract<MongoStorageShape>` so descriptor authors see a
|
|
54
|
+
* typed contract value over the raw-JSON envelope shape; the runtime
|
|
55
|
+
* in-memory class `MongoStorage` structurally satisfies the shape.
|
|
56
|
+
* Mirrors `SqlControlExtensionDescriptor`.
|
|
28
57
|
*/
|
|
29
58
|
interface MongoControlExtensionDescriptor extends ControlExtensionDescriptor<'mongo', 'mongo'> {
|
|
30
|
-
readonly contractSpace?: ContractSpace<MongoContract<
|
|
59
|
+
readonly contractSpace?: ContractSpace<MongoContract<MongoStorageShape>>;
|
|
31
60
|
}
|
|
32
61
|
//#endregion
|
|
33
|
-
//#region src/core/
|
|
62
|
+
//#region src/core/operation-preview.d.ts
|
|
63
|
+
declare function formatMongoOperations(operations: readonly MigrationPlanOperation[]): string[];
|
|
34
64
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* returns a `MigrationPlanWithAuthoringSurface` that knows how to render
|
|
39
|
-
* itself back to such a file; `MongoMigrationPlanner.emptyMigration()`
|
|
40
|
-
* returns the same shape for `migration new`. Users run the scaffolded
|
|
41
|
-
* `migration.ts` directly (via `node migration.ts`) to self-emit
|
|
42
|
-
* `ops.json` and attest the `migrationHash`.
|
|
65
|
+
* Wraps `formatMongoOperations` into the family-agnostic
|
|
66
|
+
* `OperationPreview` shape. Each statement carries
|
|
67
|
+
* `language: 'mongodb-shell'`. Mirrors `sqlOperationsToPreview`.
|
|
43
68
|
*/
|
|
44
|
-
declare
|
|
69
|
+
declare function mongoOperationsToPreview(operations: readonly MigrationPlanOperation[]): OperationPreview;
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region src/core/schema-diff.d.ts
|
|
72
|
+
declare function diffMongoSchemas(live: MongoSchemaIR, expected: MongoSchemaIR, strict: boolean): {
|
|
73
|
+
root: SchemaVerificationNode;
|
|
74
|
+
issues: SchemaIssue[];
|
|
75
|
+
counts: {
|
|
76
|
+
pass: number;
|
|
77
|
+
warn: number;
|
|
78
|
+
fail: number;
|
|
79
|
+
totalNodes: number;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region src/core/schema-verify/canonicalize-introspection.d.ts
|
|
84
|
+
interface CanonicalizedSchemas {
|
|
85
|
+
readonly live: MongoSchemaIR;
|
|
86
|
+
readonly expected: MongoSchemaIR;
|
|
87
|
+
}
|
|
88
|
+
declare function canonicalizeSchemasForVerification(live: MongoSchemaIR, expected: MongoSchemaIR): CanonicalizedSchemas;
|
|
45
89
|
//#endregion
|
|
46
|
-
export { type MongoControlExtensionDescriptor, type MongoControlFamilyInstance, createMongoFamilyInstance, mongoFamilyDescriptor,
|
|
90
|
+
export { type MongoControlExtensionDescriptor, type MongoControlFamilyInstance, type MongoControlTargetDescriptor, canonicalizeSchemasForVerification, contractToMongoSchemaIR, createMongoFamilyInstance, diffMongoSchemas, formatMongoOperations, mongoFamilyDescriptor, mongoOperationsToPreview };
|
|
47
91
|
//# sourceMappingURL=control.d.mts.map
|
package/dist/control.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control.d.mts","names":[],"sources":["../src/core/control-instance.ts","../src/core/control-descriptor.ts","../src/core/control-types.ts","../src/core/
|
|
1
|
+
{"version":3,"file":"control.d.mts","names":[],"sources":["../src/core/contract-to-schema.ts","../src/core/control-instance.ts","../src/core/control-descriptor.ts","../src/core/control-target-descriptor.ts","../src/core/control-types.ts","../src/core/operation-preview.ts","../src/core/schema-diff.ts","../src/core/schema-verify/canonicalize-introspection.ts"],"mappings":";;;;;;iBAyEgB,uBAAA,CAAwB,QAAA,EAAU,aAAA,UAAuB,aAAA;;;UCzCxD,0BAAA,SACP,qBAAA,UAA+B,aAAA,GACrC,iBAAA,CAAkB,aAAA,GAClB,uBAAA;;;ADsCJ;;;;EC/BE,gBAAA,CAAiB,YAAA,YAAwB,QAAA;AAAA;AAAA,iBAmF3B,yBAAA,CAA0B,YAAA,EAAc,YAAA,GAAe,0BAAA;;;cCtG1D,qBAAA,EAAuB,uBAAA,UAAiC,0BAAA;;;;;AFkDrE;;;;;;;;;;UGpDiB,4BAAA,mBAA+C,aAAA,GAAgB,aAAA,UACtE,0BAAA,mBAA6C,0BAAA;EAAA,SAC5C,kBAAA,EAAoB,kBAAA,CAAmB,SAAA;EAAA,SACvC,cAAA,EAAgB,cAAA,CAAe,SAAA,EAAW,aAAA;AAAA;;;;;;;AHiDrD;;;;;;;;;;;UIpDiB,+BAAA,SACP,0BAAA;EAAA,SACC,aAAA,GAAgB,aAAA,CAAc,aAAA,CAAc,iBAAA;AAAA;;;iBC6EvC,qBAAA,CAAsB,UAAA,WAAqB,sBAAA;;;;;AL3B3D;iBKgDgB,wBAAA,CACd,UAAA,WAAqB,sBAAA,KACpB,gBAAA;;;iBChHa,gBAAA,CACd,IAAA,EAAM,aAAA,EACN,QAAA,EAAU,aAAA,EACV,MAAA;EAEA,IAAA,EAAM,sBAAA;EACN,MAAA,EAAQ,WAAA;EACR,MAAA;IAAU,IAAA;IAAc,IAAA;IAAc,IAAA;IAAc,UAAA;EAAA;AAAA;;;UCYrC,oBAAA;EAAA,SACN,IAAA,EAAM,aAAA;EAAA,SACN,QAAA,EAAU,aAAA;AAAA;AAAA,iBAGL,kCAAA,CACd,IAAA,EAAM,aAAA,EACN,QAAA,EAAU,aAAA,GACT,oBAAA"}
|