@prisma-next/core-control-plane 0.3.0-pr.99.4 → 0.3.0-pr.99.6
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/config-types-h9ifypQ0.d.mts +79 -0
- package/dist/config-types-h9ifypQ0.d.mts.map +1 -0
- package/dist/config-types.d.mts +2 -0
- package/dist/config-types.mjs +65 -0
- package/dist/config-types.mjs.map +1 -0
- package/dist/config-validation.d.mts +15 -0
- package/dist/config-validation.d.mts.map +1 -0
- package/dist/config-validation.mjs +79 -0
- package/dist/config-validation.mjs.map +1 -0
- package/dist/emission.d.mts +57 -0
- package/dist/emission.d.mts.map +1 -0
- package/dist/emission.mjs +261 -0
- package/dist/emission.mjs.map +1 -0
- package/dist/errors-Qlh0sdcb.mjs +276 -0
- package/dist/errors-Qlh0sdcb.mjs.map +1 -0
- package/dist/errors.d.mts +191 -0
- package/dist/errors.d.mts.map +1 -0
- package/dist/errors.mjs +3 -0
- package/dist/{schema-view.d.ts → schema-view-BG_ebqoV.d.mts} +13 -10
- package/dist/schema-view-BG_ebqoV.d.mts.map +1 -0
- package/dist/schema-view.d.mts +2 -0
- package/dist/schema-view.mjs +1 -0
- package/dist/stack.d.mts +30 -0
- package/dist/stack.d.mts.map +1 -0
- package/dist/stack.mjs +30 -0
- package/dist/stack.mjs.map +1 -0
- package/dist/types-CsaU_uQP.d.mts +595 -0
- package/dist/types-CsaU_uQP.d.mts.map +1 -0
- package/dist/types.d.mts +2 -0
- package/dist/types.mjs +1 -0
- package/package.json +21 -37
- package/dist/chunk-YT6YGR3N.js +0 -240
- package/dist/chunk-YT6YGR3N.js.map +0 -1
- package/dist/config-types.d.ts +0 -79
- package/dist/config-types.d.ts.map +0 -1
- package/dist/config-validation.d.ts +0 -10
- package/dist/config-validation.d.ts.map +0 -1
- package/dist/emission/canonicalization.d.ts +0 -6
- package/dist/emission/canonicalization.d.ts.map +0 -1
- package/dist/emission/emit.d.ts +0 -5
- package/dist/emission/emit.d.ts.map +0 -1
- package/dist/emission/hashing.d.ts +0 -17
- package/dist/emission/hashing.d.ts.map +0 -1
- package/dist/emission/types.d.ts +0 -26
- package/dist/emission/types.d.ts.map +0 -1
- package/dist/errors.d.ts +0 -188
- package/dist/errors.d.ts.map +0 -1
- package/dist/exports/config-types.d.ts +0 -3
- package/dist/exports/config-types.d.ts.map +0 -1
- package/dist/exports/config-types.js +0 -53
- package/dist/exports/config-types.js.map +0 -1
- package/dist/exports/config-validation.d.ts +0 -2
- package/dist/exports/config-validation.d.ts.map +0 -1
- package/dist/exports/config-validation.js +0 -252
- package/dist/exports/config-validation.js.map +0 -1
- package/dist/exports/emission.d.ts +0 -5
- package/dist/exports/emission.d.ts.map +0 -1
- package/dist/exports/emission.js +0 -323
- package/dist/exports/emission.js.map +0 -1
- package/dist/exports/errors.d.ts +0 -3
- package/dist/exports/errors.d.ts.map +0 -1
- package/dist/exports/errors.js +0 -43
- package/dist/exports/errors.js.map +0 -1
- package/dist/exports/schema-view.d.ts +0 -2
- package/dist/exports/schema-view.d.ts.map +0 -1
- package/dist/exports/schema-view.js +0 -1
- package/dist/exports/schema-view.js.map +0 -1
- package/dist/exports/stack.d.ts +0 -2
- package/dist/exports/stack.d.ts.map +0 -1
- package/dist/exports/stack.js +0 -13
- package/dist/exports/stack.js.map +0 -1
- package/dist/exports/types.d.ts +0 -2
- package/dist/exports/types.d.ts.map +0 -1
- package/dist/exports/types.js +0 -1
- package/dist/exports/types.js.map +0 -1
- package/dist/migrations.d.ts +0 -190
- package/dist/migrations.d.ts.map +0 -1
- package/dist/schema-view.d.ts.map +0 -1
- package/dist/stack.d.ts +0 -25
- package/dist/stack.d.ts.map +0 -1
- package/dist/types.d.ts +0 -416
- package/dist/types.d.ts.map +0 -1
package/dist/stack.mjs
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region src/stack.ts
|
|
2
|
+
/**
|
|
3
|
+
* Creates a ControlPlaneStack from component descriptors.
|
|
4
|
+
*
|
|
5
|
+
* Provides sensible defaults:
|
|
6
|
+
* - `driver` defaults to `undefined` (optional for commands that don't need DB connection)
|
|
7
|
+
* - `extensionPacks` defaults to `[]` (empty array)
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const stack = createControlPlaneStack({
|
|
12
|
+
* target: postgresTarget,
|
|
13
|
+
* adapter: postgresAdapter,
|
|
14
|
+
* driver: postgresDriver, // optional
|
|
15
|
+
* extensionPacks: [pgvector], // optional
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
function createControlPlaneStack(input) {
|
|
20
|
+
return {
|
|
21
|
+
target: input.target,
|
|
22
|
+
adapter: input.adapter,
|
|
23
|
+
driver: input.driver,
|
|
24
|
+
extensionPacks: input.extensionPacks ?? []
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
export { createControlPlaneStack };
|
|
30
|
+
//# sourceMappingURL=stack.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack.mjs","names":[],"sources":["../src/stack.ts"],"sourcesContent":["import type {\n ControlAdapterDescriptor,\n ControlDriverDescriptor,\n ControlExtensionDescriptor,\n ControlPlaneStack,\n ControlTargetDescriptor,\n} from './types';\n\n/**\n * Creates a ControlPlaneStack from component descriptors.\n *\n * Provides sensible defaults:\n * - `driver` defaults to `undefined` (optional for commands that don't need DB connection)\n * - `extensionPacks` defaults to `[]` (empty array)\n *\n * @example\n * ```ts\n * const stack = createControlPlaneStack({\n * target: postgresTarget,\n * adapter: postgresAdapter,\n * driver: postgresDriver, // optional\n * extensionPacks: [pgvector], // optional\n * });\n * ```\n */\nexport function createControlPlaneStack<TFamilyId extends string, TTargetId extends string>(input: {\n readonly target: ControlTargetDescriptor<TFamilyId, TTargetId>;\n readonly adapter: ControlAdapterDescriptor<TFamilyId, TTargetId>;\n readonly driver?: ControlDriverDescriptor<TFamilyId, TTargetId> | undefined;\n readonly extensionPacks?: readonly ControlExtensionDescriptor<TFamilyId, TTargetId>[] | undefined;\n}): ControlPlaneStack<TFamilyId, TTargetId> {\n return {\n target: input.target,\n adapter: input.adapter,\n driver: input.driver,\n extensionPacks: input.extensionPacks ?? [],\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAyBA,SAAgB,wBAA4E,OAKhD;AAC1C,QAAO;EACL,QAAQ,MAAM;EACd,SAAS,MAAM;EACf,QAAQ,MAAM;EACd,gBAAgB,MAAM,kBAAkB,EAAE;EAC3C"}
|
|
@@ -0,0 +1,595 @@
|
|
|
1
|
+
import { t as CoreSchemaView } from "./schema-view-BG_ebqoV.mjs";
|
|
2
|
+
import { AdapterDescriptor, AdapterInstance, DriverDescriptor, DriverInstance, ExtensionDescriptor, ExtensionInstance, FamilyDescriptor, FamilyInstance, TargetBoundComponentDescriptor, TargetDescriptor, TargetInstance } from "@prisma-next/contract/framework-components";
|
|
3
|
+
import { ContractIR } from "@prisma-next/contract/ir";
|
|
4
|
+
import { ContractMarkerRecord, TargetFamilyHook } from "@prisma-next/contract/types";
|
|
5
|
+
import { Result } from "@prisma-next/utils/result";
|
|
6
|
+
|
|
7
|
+
//#region src/migrations.d.ts
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Migration operation classes define the safety level of an operation.
|
|
11
|
+
* - 'additive': Adds new structures without modifying existing ones (safe)
|
|
12
|
+
* - 'widening': Relaxes constraints or expands types (generally safe)
|
|
13
|
+
* - 'destructive': Removes or alters existing structures (potentially unsafe)
|
|
14
|
+
*/
|
|
15
|
+
type MigrationOperationClass = 'additive' | 'widening' | 'destructive';
|
|
16
|
+
/**
|
|
17
|
+
* Policy defining which operation classes are allowed during a migration.
|
|
18
|
+
*/
|
|
19
|
+
interface MigrationOperationPolicy {
|
|
20
|
+
readonly allowedOperationClasses: readonly MigrationOperationClass[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A single migration operation for display purposes.
|
|
24
|
+
* Contains only the fields needed for CLI output (tree view, JSON envelope).
|
|
25
|
+
*/
|
|
26
|
+
interface MigrationPlanOperation {
|
|
27
|
+
/** Unique identifier for this operation (e.g., "table.users.create"). */
|
|
28
|
+
readonly id: string;
|
|
29
|
+
/** Human-readable label for display in UI/CLI (e.g., "Create table users"). */
|
|
30
|
+
readonly label: string;
|
|
31
|
+
/** The class of operation (additive, widening, destructive). */
|
|
32
|
+
readonly operationClass: MigrationOperationClass;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A migration plan for display purposes.
|
|
36
|
+
* Contains only the fields needed for CLI output (summary, JSON envelope).
|
|
37
|
+
*/
|
|
38
|
+
interface MigrationPlan {
|
|
39
|
+
/** The target ID this plan is for (e.g., 'postgres'). */
|
|
40
|
+
readonly targetId: string;
|
|
41
|
+
/** Destination contract identity that the plan intends to reach. */
|
|
42
|
+
readonly destination: {
|
|
43
|
+
readonly coreHash: string;
|
|
44
|
+
readonly profileHash?: string;
|
|
45
|
+
};
|
|
46
|
+
/** Ordered list of operations to execute. */
|
|
47
|
+
readonly operations: readonly MigrationPlanOperation[];
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* A conflict detected during migration planning.
|
|
51
|
+
*/
|
|
52
|
+
interface MigrationPlannerConflict {
|
|
53
|
+
/** Kind of conflict (e.g., 'typeMismatch', 'nullabilityConflict'). */
|
|
54
|
+
readonly kind: string;
|
|
55
|
+
/** Human-readable summary of the conflict. */
|
|
56
|
+
readonly summary: string;
|
|
57
|
+
/** Optional explanation of why this conflict occurred. */
|
|
58
|
+
readonly why?: string;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Successful planner result with the migration plan.
|
|
62
|
+
*/
|
|
63
|
+
interface MigrationPlannerSuccessResult {
|
|
64
|
+
readonly kind: 'success';
|
|
65
|
+
readonly plan: MigrationPlan;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Failed planner result with the list of conflicts.
|
|
69
|
+
*/
|
|
70
|
+
interface MigrationPlannerFailureResult {
|
|
71
|
+
readonly kind: 'failure';
|
|
72
|
+
readonly conflicts: readonly MigrationPlannerConflict[];
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Union type for planner results.
|
|
76
|
+
*/
|
|
77
|
+
type MigrationPlannerResult = MigrationPlannerSuccessResult | MigrationPlannerFailureResult;
|
|
78
|
+
/**
|
|
79
|
+
* Success value for migration runner execution.
|
|
80
|
+
*/
|
|
81
|
+
interface MigrationRunnerSuccessValue {
|
|
82
|
+
readonly operationsPlanned: number;
|
|
83
|
+
readonly operationsExecuted: number;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Failure details for migration runner execution.
|
|
87
|
+
*/
|
|
88
|
+
interface MigrationRunnerFailure {
|
|
89
|
+
/** Error code for the failure. */
|
|
90
|
+
readonly code: string;
|
|
91
|
+
/** Human-readable summary of the failure. */
|
|
92
|
+
readonly summary: string;
|
|
93
|
+
/** Optional explanation of why the failure occurred. */
|
|
94
|
+
readonly why?: string;
|
|
95
|
+
/** Optional metadata for debugging and UX (e.g., schema issues, SQL state). */
|
|
96
|
+
readonly meta?: Record<string, unknown>;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Result type for migration runner execution.
|
|
100
|
+
*/
|
|
101
|
+
type MigrationRunnerResult = Result<MigrationRunnerSuccessValue, MigrationRunnerFailure>;
|
|
102
|
+
/**
|
|
103
|
+
* Execution-time checks configuration for migration runners.
|
|
104
|
+
* All checks default to `true` (enabled) when omitted.
|
|
105
|
+
*/
|
|
106
|
+
interface MigrationRunnerExecutionChecks {
|
|
107
|
+
/**
|
|
108
|
+
* Whether to run prechecks before executing operations.
|
|
109
|
+
* Defaults to `true` (prechecks are run).
|
|
110
|
+
*/
|
|
111
|
+
readonly prechecks?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Whether to run postchecks after executing operations.
|
|
114
|
+
* Defaults to `true` (postchecks are run).
|
|
115
|
+
*/
|
|
116
|
+
readonly postchecks?: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Whether to run idempotency probe (check if postcheck is already satisfied before execution).
|
|
119
|
+
* Defaults to `true` (idempotency probe is run).
|
|
120
|
+
*/
|
|
121
|
+
readonly idempotencyChecks?: boolean;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Migration planner interface for planning schema changes.
|
|
125
|
+
* This is the minimal interface that CLI commands use.
|
|
126
|
+
*
|
|
127
|
+
* @template TFamilyId - The family ID (e.g., 'sql', 'document')
|
|
128
|
+
* @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
|
|
129
|
+
*/
|
|
130
|
+
interface MigrationPlanner<TFamilyId extends string = string, TTargetId extends string = string> {
|
|
131
|
+
plan(options: {
|
|
132
|
+
readonly contract: unknown;
|
|
133
|
+
readonly schema: unknown;
|
|
134
|
+
readonly policy: MigrationOperationPolicy;
|
|
135
|
+
/**
|
|
136
|
+
* Active framework components participating in this composition.
|
|
137
|
+
* Families/targets can interpret this list to derive family-specific metadata.
|
|
138
|
+
* All components must have matching familyId and targetId.
|
|
139
|
+
*/
|
|
140
|
+
readonly frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<TFamilyId, TTargetId>>;
|
|
141
|
+
}): MigrationPlannerResult;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Migration runner interface for executing migration plans.
|
|
145
|
+
* This is the minimal interface that CLI commands use.
|
|
146
|
+
*
|
|
147
|
+
* @template TFamilyId - The family ID (e.g., 'sql', 'document')
|
|
148
|
+
* @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
|
|
149
|
+
*/
|
|
150
|
+
interface MigrationRunner<TFamilyId extends string = string, TTargetId extends string = string> {
|
|
151
|
+
execute(options: {
|
|
152
|
+
readonly plan: MigrationPlan;
|
|
153
|
+
readonly driver: ControlDriverInstance<TFamilyId, TTargetId>;
|
|
154
|
+
readonly destinationContract: unknown;
|
|
155
|
+
readonly policy: MigrationOperationPolicy;
|
|
156
|
+
readonly callbacks?: {
|
|
157
|
+
onOperationStart?(op: MigrationPlanOperation): void;
|
|
158
|
+
onOperationComplete?(op: MigrationPlanOperation): void;
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Execution-time checks configuration.
|
|
162
|
+
* All checks default to `true` (enabled) when omitted.
|
|
163
|
+
*/
|
|
164
|
+
readonly executionChecks?: MigrationRunnerExecutionChecks;
|
|
165
|
+
/**
|
|
166
|
+
* Active framework components participating in this composition.
|
|
167
|
+
* Families/targets can interpret this list to derive family-specific metadata.
|
|
168
|
+
* All components must have matching familyId and targetId.
|
|
169
|
+
*/
|
|
170
|
+
readonly frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<TFamilyId, TTargetId>>;
|
|
171
|
+
}): Promise<MigrationRunnerResult>;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Optional capability interface for targets that support migrations.
|
|
175
|
+
* Targets that implement migrations expose this via their descriptor.
|
|
176
|
+
*
|
|
177
|
+
* @template TFamilyId - The family ID (e.g., 'sql', 'document')
|
|
178
|
+
* @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
|
|
179
|
+
* @template TFamilyInstance - The family instance type (e.g., SqlControlFamilyInstance)
|
|
180
|
+
*/
|
|
181
|
+
interface TargetMigrationsCapability<TFamilyId extends string = string, TTargetId extends string = string, TFamilyInstance extends ControlFamilyInstance<TFamilyId> = ControlFamilyInstance<TFamilyId>> {
|
|
182
|
+
createPlanner(family: TFamilyInstance): MigrationPlanner<TFamilyId, TTargetId>;
|
|
183
|
+
createRunner(family: TFamilyInstance): MigrationRunner<TFamilyId, TTargetId>;
|
|
184
|
+
}
|
|
185
|
+
//#endregion
|
|
186
|
+
//#region src/types.d.ts
|
|
187
|
+
/**
|
|
188
|
+
* Control-plane family instance interface.
|
|
189
|
+
* Extends the base FamilyInstance with control-plane domain actions.
|
|
190
|
+
*
|
|
191
|
+
* @template TFamilyId - The family ID (e.g., 'sql', 'document')
|
|
192
|
+
* @template TSchemaIR - The schema IR type returned by introspect() (family-specific)
|
|
193
|
+
*/
|
|
194
|
+
interface ControlFamilyInstance<TFamilyId extends string, TSchemaIR = unknown> extends FamilyInstance<TFamilyId> {
|
|
195
|
+
/**
|
|
196
|
+
* Validates a contract JSON and returns a validated ContractIR (without mappings).
|
|
197
|
+
* Mappings are runtime-only and should not be part of ContractIR.
|
|
198
|
+
*
|
|
199
|
+
* Note: The returned ContractIR may include additional fields from the emitted contract
|
|
200
|
+
* (like coreHash, profileHash) that are not part of the ContractIR type but are preserved
|
|
201
|
+
* for use by verify/sign operations.
|
|
202
|
+
*/
|
|
203
|
+
validateContractIR(contractJson: unknown): ContractIR;
|
|
204
|
+
/**
|
|
205
|
+
* Verifies the database marker against the contract.
|
|
206
|
+
* Compares target, coreHash, and profileHash.
|
|
207
|
+
*
|
|
208
|
+
* @param options.contractIR - The validated contract (from validateContractIR). Must have
|
|
209
|
+
* coreHash and target fields for verification. These fields are present in emitted
|
|
210
|
+
* contracts but not in the ContractIR type definition.
|
|
211
|
+
*/
|
|
212
|
+
verify(options: {
|
|
213
|
+
readonly driver: ControlDriverInstance<TFamilyId, string>;
|
|
214
|
+
readonly contractIR: unknown;
|
|
215
|
+
readonly expectedTargetId: string;
|
|
216
|
+
readonly contractPath: string;
|
|
217
|
+
readonly configPath?: string;
|
|
218
|
+
}): Promise<VerifyDatabaseResult>;
|
|
219
|
+
/**
|
|
220
|
+
* Verifies the database schema against the contract.
|
|
221
|
+
* Compares contract requirements against live database schema.
|
|
222
|
+
*/
|
|
223
|
+
schemaVerify(options: {
|
|
224
|
+
readonly driver: ControlDriverInstance<TFamilyId, string>;
|
|
225
|
+
readonly contractIR: unknown;
|
|
226
|
+
readonly strict: boolean;
|
|
227
|
+
readonly contractPath: string;
|
|
228
|
+
readonly configPath?: string;
|
|
229
|
+
/**
|
|
230
|
+
* Active framework components participating in this composition.
|
|
231
|
+
* All components must have matching familyId and targetId.
|
|
232
|
+
*/
|
|
233
|
+
readonly frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<TFamilyId, string>>;
|
|
234
|
+
}): Promise<VerifyDatabaseSchemaResult>;
|
|
235
|
+
/**
|
|
236
|
+
* Signs the database with the contract marker.
|
|
237
|
+
* Writes or updates the contract marker if schema verification passes.
|
|
238
|
+
* This operation is idempotent - if the marker already matches, no changes are made.
|
|
239
|
+
*/
|
|
240
|
+
sign(options: {
|
|
241
|
+
readonly driver: ControlDriverInstance<TFamilyId, string>;
|
|
242
|
+
readonly contractIR: unknown;
|
|
243
|
+
readonly contractPath: string;
|
|
244
|
+
readonly configPath?: string;
|
|
245
|
+
}): Promise<SignDatabaseResult>;
|
|
246
|
+
/**
|
|
247
|
+
* Reads the contract marker from the database.
|
|
248
|
+
* Returns null if no marker exists.
|
|
249
|
+
*/
|
|
250
|
+
readMarker(options: {
|
|
251
|
+
readonly driver: ControlDriverInstance<TFamilyId, string>;
|
|
252
|
+
}): Promise<ContractMarkerRecord | null>;
|
|
253
|
+
/**
|
|
254
|
+
* Introspects the database schema and returns a family-specific schema IR.
|
|
255
|
+
*
|
|
256
|
+
* This is a read-only operation that returns a snapshot of the live database schema.
|
|
257
|
+
* The method is family-owned and delegates to target/adapter-specific introspectors
|
|
258
|
+
* to perform the actual schema introspection.
|
|
259
|
+
*
|
|
260
|
+
* @param options - Introspection options
|
|
261
|
+
* @param options.driver - Control plane driver for database connection
|
|
262
|
+
* @param options.contractIR - Optional contract for contract-guided introspection.
|
|
263
|
+
* When provided, families may use it for filtering, optimization, or validation
|
|
264
|
+
* during introspection. The contract does not change the meaning of "what exists"
|
|
265
|
+
* in the database - it only guides how introspection is performed.
|
|
266
|
+
* @returns Promise resolving to the family-specific Schema IR (e.g., `SqlSchemaIR` for SQL).
|
|
267
|
+
* The IR represents the complete schema snapshot at the time of introspection.
|
|
268
|
+
*/
|
|
269
|
+
introspect(options: {
|
|
270
|
+
readonly driver: ControlDriverInstance<TFamilyId, string>;
|
|
271
|
+
readonly contractIR?: unknown;
|
|
272
|
+
}): Promise<TSchemaIR>;
|
|
273
|
+
/**
|
|
274
|
+
* Optionally projects a family-specific Schema IR into a core schema view.
|
|
275
|
+
* Families that provide this method enable rich tree output for CLI visualization.
|
|
276
|
+
* Families that do not provide it still support introspection via raw Schema IR.
|
|
277
|
+
*/
|
|
278
|
+
toSchemaView?(schema: TSchemaIR): CoreSchemaView;
|
|
279
|
+
/**
|
|
280
|
+
* Emits contract JSON and DTS as strings.
|
|
281
|
+
* Uses the instance's preassembled state (operation registry, type imports, extension IDs).
|
|
282
|
+
* Handles stripping mappings and validation internally.
|
|
283
|
+
*/
|
|
284
|
+
emitContract(options: {
|
|
285
|
+
readonly contractIR: ContractIR | unknown;
|
|
286
|
+
}): Promise<EmitContractResult>;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Control-plane target instance interface.
|
|
290
|
+
* Extends the base TargetInstance with control-plane specific behavior.
|
|
291
|
+
*
|
|
292
|
+
* @template TFamilyId - The family ID (e.g., 'sql', 'document')
|
|
293
|
+
* @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
|
|
294
|
+
*/
|
|
295
|
+
interface ControlTargetInstance<TFamilyId extends string, TTargetId extends string> extends TargetInstance<TFamilyId, TTargetId> {}
|
|
296
|
+
/**
|
|
297
|
+
* Control-plane adapter instance interface.
|
|
298
|
+
* Extends the base AdapterInstance with control-plane specific behavior.
|
|
299
|
+
* Families extend this with family-specific adapter interfaces.
|
|
300
|
+
*
|
|
301
|
+
* @template TFamilyId - The family ID (e.g., 'sql', 'document')
|
|
302
|
+
* @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
|
|
303
|
+
*/
|
|
304
|
+
interface ControlAdapterInstance<TFamilyId extends string, TTargetId extends string> extends AdapterInstance<TFamilyId, TTargetId> {}
|
|
305
|
+
/**
|
|
306
|
+
* Control-plane driver instance interface.
|
|
307
|
+
* Extends the base DriverInstance with control-plane specific behavior.
|
|
308
|
+
*
|
|
309
|
+
* @template TFamilyId - The family ID (e.g., 'sql', 'document')
|
|
310
|
+
* @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
|
|
311
|
+
*/
|
|
312
|
+
interface ControlDriverInstance<TFamilyId extends string, TTargetId extends string> extends DriverInstance<TFamilyId, TTargetId> {
|
|
313
|
+
query<Row = Record<string, unknown>>(sql: string, params?: readonly unknown[]): Promise<{
|
|
314
|
+
readonly rows: Row[];
|
|
315
|
+
}>;
|
|
316
|
+
close(): Promise<void>;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Control-plane extension instance interface.
|
|
320
|
+
* Extends the base ExtensionInstance with control-plane specific behavior.
|
|
321
|
+
*
|
|
322
|
+
* @template TFamilyId - The family ID (e.g., 'sql', 'document')
|
|
323
|
+
* @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
|
|
324
|
+
*/
|
|
325
|
+
interface ControlExtensionInstance<TFamilyId extends string, TTargetId extends string> extends ExtensionInstance<TFamilyId, TTargetId> {}
|
|
326
|
+
/**
|
|
327
|
+
* Operation context for propagating metadata through control-plane operation call chains.
|
|
328
|
+
* Inspired by OpenTelemetry's Context and Sentry's Scope patterns.
|
|
329
|
+
*
|
|
330
|
+
* This context carries informational metadata (like file paths) that can be used for
|
|
331
|
+
* error reporting, logging, and debugging, but is not required for structural correctness.
|
|
332
|
+
* It allows subsystems to propagate context without coupling to file I/O concerns.
|
|
333
|
+
*
|
|
334
|
+
* @example
|
|
335
|
+
* ```typescript
|
|
336
|
+
* const context: OperationContext = {
|
|
337
|
+
* contractPath: './contract.json',
|
|
338
|
+
* configPath: './prisma-next.config.ts',
|
|
339
|
+
* };
|
|
340
|
+
*
|
|
341
|
+
* await runner.execute({ plan, driver, destinationContract: contract, context });
|
|
342
|
+
* ```
|
|
343
|
+
*/
|
|
344
|
+
interface OperationContext {
|
|
345
|
+
/**
|
|
346
|
+
* Path to the contract file (if applicable).
|
|
347
|
+
* Used for error reporting and metadata, not for file I/O.
|
|
348
|
+
*/
|
|
349
|
+
readonly contractPath?: string;
|
|
350
|
+
/**
|
|
351
|
+
* Path to the configuration file (if applicable).
|
|
352
|
+
* Used for error reporting and metadata, not for file I/O.
|
|
353
|
+
*/
|
|
354
|
+
readonly configPath?: string;
|
|
355
|
+
/**
|
|
356
|
+
* Additional metadata that can be propagated through the call chain.
|
|
357
|
+
* Extensible for future needs without breaking changes.
|
|
358
|
+
*/
|
|
359
|
+
readonly meta?: Readonly<Record<string, unknown>>;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* A bundle of control-plane component descriptors for a specific family and target.
|
|
363
|
+
*
|
|
364
|
+
* This struct groups the target, adapter, driver (optional), and extension packs
|
|
365
|
+
* needed to create a family instance and run CLI commands. Use `createControlPlaneStack()`
|
|
366
|
+
* to construct with sensible defaults.
|
|
367
|
+
*
|
|
368
|
+
* @template TFamilyId - The family ID (e.g., 'sql', 'document')
|
|
369
|
+
* @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
|
|
370
|
+
*/
|
|
371
|
+
interface ControlPlaneStack<TFamilyId extends string, TTargetId extends string> {
|
|
372
|
+
readonly target: ControlTargetDescriptor<TFamilyId, TTargetId>;
|
|
373
|
+
readonly adapter: ControlAdapterDescriptor<TFamilyId, TTargetId>;
|
|
374
|
+
readonly driver: ControlDriverDescriptor<TFamilyId, TTargetId> | undefined;
|
|
375
|
+
readonly extensionPacks: readonly ControlExtensionDescriptor<TFamilyId, TTargetId>[];
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Descriptor for a control-plane family (e.g., SQL).
|
|
379
|
+
* Provides the family hook and factory method.
|
|
380
|
+
*
|
|
381
|
+
* @template TFamilyId - The family ID (e.g., 'sql', 'document')
|
|
382
|
+
* @template TFamilyInstance - The family instance type
|
|
383
|
+
*/
|
|
384
|
+
interface ControlFamilyDescriptor<TFamilyId extends string, TFamilyInstance extends ControlFamilyInstance<TFamilyId> = ControlFamilyInstance<TFamilyId>> extends FamilyDescriptor<TFamilyId> {
|
|
385
|
+
readonly hook: TargetFamilyHook;
|
|
386
|
+
create<TTargetId extends string>(stack: ControlPlaneStack<TFamilyId, TTargetId>): TFamilyInstance;
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Descriptor for a control-plane target component (e.g., Postgres target).
|
|
390
|
+
*
|
|
391
|
+
* @template TFamilyId - The family ID (e.g., 'sql', 'document')
|
|
392
|
+
* @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
|
|
393
|
+
* @template TTargetInstance - The target instance type
|
|
394
|
+
* @template TFamilyInstance - The family instance type for migrations (optional)
|
|
395
|
+
*/
|
|
396
|
+
interface ControlTargetDescriptor<TFamilyId extends string, TTargetId extends string, TTargetInstance extends ControlTargetInstance<TFamilyId, TTargetId> = ControlTargetInstance<TFamilyId, TTargetId>, TFamilyInstance extends ControlFamilyInstance<TFamilyId> = ControlFamilyInstance<TFamilyId>> extends TargetDescriptor<TFamilyId, TTargetId> {
|
|
397
|
+
/**
|
|
398
|
+
* Optional migrations capability.
|
|
399
|
+
* Targets that support migrations expose this property.
|
|
400
|
+
* The capability is parameterized by family and target IDs to ensure type-level
|
|
401
|
+
* compatibility of framework components.
|
|
402
|
+
*/
|
|
403
|
+
readonly migrations?: TargetMigrationsCapability<TFamilyId, TTargetId, TFamilyInstance>;
|
|
404
|
+
create(): TTargetInstance;
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Descriptor for a control-plane adapter component (e.g., Postgres adapter).
|
|
408
|
+
*
|
|
409
|
+
* @template TFamilyId - The family ID (e.g., 'sql', 'document')
|
|
410
|
+
* @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
|
|
411
|
+
* @template TAdapterInstance - The adapter instance type
|
|
412
|
+
*/
|
|
413
|
+
interface ControlAdapterDescriptor<TFamilyId extends string, TTargetId extends string, TAdapterInstance extends ControlAdapterInstance<TFamilyId, TTargetId> = ControlAdapterInstance<TFamilyId, TTargetId>> extends AdapterDescriptor<TFamilyId, TTargetId> {
|
|
414
|
+
create(): TAdapterInstance;
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Descriptor for a control-plane driver component (e.g., Postgres driver).
|
|
418
|
+
*
|
|
419
|
+
* The connection input type is driver-specific. For example:
|
|
420
|
+
* - Postgres uses a connection string (URL)
|
|
421
|
+
* - Other drivers may accept structured objects (e.g., file paths, credentials)
|
|
422
|
+
*
|
|
423
|
+
* @template TFamilyId - The family ID (e.g., 'sql', 'document')
|
|
424
|
+
* @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
|
|
425
|
+
* @template TDriverInstance - The driver instance type
|
|
426
|
+
* @template TConnection - The connection input type (defaults to `string` for URL-based drivers)
|
|
427
|
+
*/
|
|
428
|
+
interface ControlDriverDescriptor<TFamilyId extends string, TTargetId extends string, TDriverInstance extends ControlDriverInstance<TFamilyId, TTargetId> = ControlDriverInstance<TFamilyId, TTargetId>, TConnection = string> extends DriverDescriptor<TFamilyId, TTargetId> {
|
|
429
|
+
create(connection: TConnection): Promise<TDriverInstance>;
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* Descriptor for a control-plane extension component (e.g., pgvector).
|
|
433
|
+
*
|
|
434
|
+
* @template TFamilyId - The family ID (e.g., 'sql', 'document')
|
|
435
|
+
* @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
|
|
436
|
+
* @template TExtensionInstance - The extension instance type
|
|
437
|
+
*/
|
|
438
|
+
interface ControlExtensionDescriptor<TFamilyId extends string, TTargetId extends string, TExtensionInstance extends ControlExtensionInstance<TFamilyId, TTargetId> = ControlExtensionInstance<TFamilyId, TTargetId>> extends ExtensionDescriptor<TFamilyId, TTargetId> {
|
|
439
|
+
create(): TExtensionInstance;
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* Result type for database marker verification operations.
|
|
443
|
+
*/
|
|
444
|
+
interface VerifyDatabaseResult {
|
|
445
|
+
readonly ok: boolean;
|
|
446
|
+
readonly code?: string;
|
|
447
|
+
readonly summary: string;
|
|
448
|
+
readonly contract: {
|
|
449
|
+
readonly coreHash: string;
|
|
450
|
+
readonly profileHash?: string;
|
|
451
|
+
};
|
|
452
|
+
readonly marker?: {
|
|
453
|
+
readonly coreHash?: string;
|
|
454
|
+
readonly profileHash?: string;
|
|
455
|
+
};
|
|
456
|
+
readonly target: {
|
|
457
|
+
readonly expected: string;
|
|
458
|
+
readonly actual?: string;
|
|
459
|
+
};
|
|
460
|
+
readonly missingCodecs?: readonly string[];
|
|
461
|
+
readonly codecCoverageSkipped?: boolean;
|
|
462
|
+
readonly meta?: {
|
|
463
|
+
readonly configPath?: string;
|
|
464
|
+
readonly contractPath: string;
|
|
465
|
+
};
|
|
466
|
+
readonly timings: {
|
|
467
|
+
readonly total: number;
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Schema issue type for schema verification results.
|
|
472
|
+
*/
|
|
473
|
+
interface SchemaIssue {
|
|
474
|
+
readonly kind: 'missing_table' | 'missing_column' | 'extra_table' | 'extra_column' | 'extra_primary_key' | 'extra_foreign_key' | 'extra_unique_constraint' | 'extra_index' | 'type_mismatch' | 'nullability_mismatch' | 'primary_key_mismatch' | 'foreign_key_mismatch' | 'unique_constraint_mismatch' | 'index_mismatch' | 'extension_missing';
|
|
475
|
+
readonly table: string;
|
|
476
|
+
readonly column?: string;
|
|
477
|
+
readonly indexOrConstraint?: string;
|
|
478
|
+
readonly expected?: string;
|
|
479
|
+
readonly actual?: string;
|
|
480
|
+
readonly message: string;
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* Contract-shaped verification tree node for schema verification results.
|
|
484
|
+
* Family-agnostic structure that follows the contract structure.
|
|
485
|
+
*/
|
|
486
|
+
interface SchemaVerificationNode {
|
|
487
|
+
readonly status: 'pass' | 'warn' | 'fail';
|
|
488
|
+
readonly kind: string;
|
|
489
|
+
readonly name: string;
|
|
490
|
+
readonly contractPath: string;
|
|
491
|
+
readonly code: string;
|
|
492
|
+
readonly message: string;
|
|
493
|
+
readonly expected: unknown;
|
|
494
|
+
readonly actual: unknown;
|
|
495
|
+
readonly children: readonly SchemaVerificationNode[];
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* Result type for database schema verification operations.
|
|
499
|
+
*/
|
|
500
|
+
interface VerifyDatabaseSchemaResult {
|
|
501
|
+
readonly ok: boolean;
|
|
502
|
+
readonly code?: string;
|
|
503
|
+
readonly summary: string;
|
|
504
|
+
readonly contract: {
|
|
505
|
+
readonly coreHash: string;
|
|
506
|
+
readonly profileHash?: string;
|
|
507
|
+
};
|
|
508
|
+
readonly target: {
|
|
509
|
+
readonly expected: string;
|
|
510
|
+
readonly actual?: string;
|
|
511
|
+
};
|
|
512
|
+
readonly schema: {
|
|
513
|
+
readonly issues: readonly SchemaIssue[];
|
|
514
|
+
readonly root: SchemaVerificationNode;
|
|
515
|
+
readonly counts: {
|
|
516
|
+
readonly pass: number;
|
|
517
|
+
readonly warn: number;
|
|
518
|
+
readonly fail: number;
|
|
519
|
+
readonly totalNodes: number;
|
|
520
|
+
};
|
|
521
|
+
};
|
|
522
|
+
readonly meta?: {
|
|
523
|
+
readonly configPath?: string;
|
|
524
|
+
readonly contractPath?: string;
|
|
525
|
+
readonly strict: boolean;
|
|
526
|
+
};
|
|
527
|
+
readonly timings: {
|
|
528
|
+
readonly total: number;
|
|
529
|
+
};
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* Result type for contract emission operations.
|
|
533
|
+
*/
|
|
534
|
+
interface EmitContractResult {
|
|
535
|
+
readonly contractJson: string;
|
|
536
|
+
readonly contractDts: string;
|
|
537
|
+
readonly coreHash: string;
|
|
538
|
+
readonly profileHash: string;
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Result envelope for schema introspection operations.
|
|
542
|
+
* Used by CLI for JSON output when introspecting database schemas.
|
|
543
|
+
*
|
|
544
|
+
* @template TSchemaIR - The family-specific Schema IR type (e.g., `SqlSchemaIR` for SQL)
|
|
545
|
+
*/
|
|
546
|
+
interface IntrospectSchemaResult<TSchemaIR> {
|
|
547
|
+
readonly ok: true;
|
|
548
|
+
readonly summary: string;
|
|
549
|
+
readonly target: {
|
|
550
|
+
readonly familyId: string;
|
|
551
|
+
readonly id: string;
|
|
552
|
+
};
|
|
553
|
+
readonly schema: TSchemaIR;
|
|
554
|
+
readonly meta?: {
|
|
555
|
+
readonly configPath?: string;
|
|
556
|
+
readonly dbUrl?: string;
|
|
557
|
+
};
|
|
558
|
+
readonly timings: {
|
|
559
|
+
readonly total: number;
|
|
560
|
+
};
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* Result type for database signing operations.
|
|
564
|
+
* Returned when writing or updating the contract marker in the database.
|
|
565
|
+
*/
|
|
566
|
+
interface SignDatabaseResult {
|
|
567
|
+
readonly ok: boolean;
|
|
568
|
+
readonly summary: string;
|
|
569
|
+
readonly contract: {
|
|
570
|
+
readonly coreHash: string;
|
|
571
|
+
readonly profileHash?: string;
|
|
572
|
+
};
|
|
573
|
+
readonly target: {
|
|
574
|
+
readonly expected: string;
|
|
575
|
+
readonly actual?: string;
|
|
576
|
+
};
|
|
577
|
+
readonly marker: {
|
|
578
|
+
readonly created: boolean;
|
|
579
|
+
readonly updated: boolean;
|
|
580
|
+
readonly previous?: {
|
|
581
|
+
readonly coreHash?: string;
|
|
582
|
+
readonly profileHash?: string;
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
readonly meta?: {
|
|
586
|
+
readonly configPath?: string;
|
|
587
|
+
readonly contractPath: string;
|
|
588
|
+
};
|
|
589
|
+
readonly timings: {
|
|
590
|
+
readonly total: number;
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
//#endregion
|
|
594
|
+
export { MigrationRunnerExecutionChecks as A, MigrationPlanOperation as C, MigrationPlannerResult as D, MigrationPlannerFailureResult as E, MigrationRunnerResult as M, MigrationRunnerSuccessValue as N, MigrationPlannerSuccessResult as O, TargetMigrationsCapability as P, MigrationPlan as S, MigrationPlannerConflict as T, SignDatabaseResult as _, ControlExtensionDescriptor as a, MigrationOperationClass as b, ControlFamilyInstance as c, ControlTargetInstance as d, EmitContractResult as f, SchemaVerificationNode as g, SchemaIssue as h, ControlDriverInstance as i, MigrationRunnerFailure as j, MigrationRunner as k, ControlPlaneStack as l, OperationContext as m, ControlAdapterInstance as n, ControlExtensionInstance as o, IntrospectSchemaResult as p, ControlDriverDescriptor as r, ControlFamilyDescriptor as s, ControlAdapterDescriptor as t, ControlTargetDescriptor as u, VerifyDatabaseResult as v, MigrationPlanner as w, MigrationOperationPolicy as x, VerifyDatabaseSchemaResult as y };
|
|
595
|
+
//# sourceMappingURL=types-CsaU_uQP.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-CsaU_uQP.d.mts","names":[],"sources":["../src/migrations.ts","../src/types.ts"],"sourcesContent":[],"mappings":";;;;;;;;AA8FA;AAQA;AASA;AAQA;AAcA;;AAAwE,KA5G5D,uBAAA,GA4G4D,UAAA,GAAA,UAAA,GAAA,aAAA;;;AAUxE;AA6BiB,UA9IA,wBAAA,CA8IgB;EAOZ,SAAA,uBAAA,EAAA,SApJwB,uBAoJxB,EAAA;;;;;;AASO,UAlJX,sBAAA,CAkJW;EAUX;EAKE,SAAA,EAAA,EAAA,MAAA;EACwB;EAAW,SAAA,KAAA,EAAA,MAAA;EAAjC;EAEA,SAAA,cAAA,EA9JM,uBA8JN;;;;;;AAgBf,UAvKW,aAAA,CAuKX;EAD4B;EAGpB,SAAA,QAAA,EAAA,MAAA;EAAR;EAAO,SAAA,WAAA,EAAA;IAeI,SAAA,QAAA,EAAA,MAA0B;IAGK,SAAA,WAAA,CAAA,EAAA,MAAA;EAAtB,CAAA;EAAyD;EAAtB,SAAA,UAAA,EAAA,SAlL7B,sBAkL6B,EAAA;;;;;AAGtC,UA3KN,wBAAA,CA2KM;EAAkC;EAAW,SAAA,IAAA,EAAA,MAAA;EA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;;;;;wBAOd,2BAA2B,WAAW,WAAW;YAC7D;;;;;;;;;UAUK,sGAGU,uBAAuB,WAAW,aAAa,uBACtE,WACA,oBAEM,kBAAkB,WAAW;YAC3B;;;;;;;;;;;;;;UAeK,oGAGS,sBAAsB,WAAW,aAAa,sBACpE,WACA,0CAGM,iBAAiB,WAAW;qBACjB,cAAc,QAAQ;;;;;;;;;UAU1B,0GAGY,yBACzB,WACA,aACE,yBAAyB,WAAW,oBAChC,oBAAoB,WAAW;YAC7B;;;;;UAMK,oBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA8BA,WAAA;;;;;;;;;;;;;UA6BA,sBAAA;;;;;;;;;8BASa;;;;;UAMb,0BAAA;;;;;;;;;;;;;8BAaa;mBACX;;;;;;;;;;;;;;;;;;;;UAqBF,kBAAA;;;;;;;;;;;;UAaA;;;;;;;mBAOE;;;;;;;;;;;;;UAcF,kBAAA"}
|
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { A as MigrationRunnerExecutionChecks, C as MigrationPlanOperation, D as MigrationPlannerResult, E as MigrationPlannerFailureResult, M as MigrationRunnerResult, N as MigrationRunnerSuccessValue, O as MigrationPlannerSuccessResult, P as TargetMigrationsCapability, S as MigrationPlan, T as MigrationPlannerConflict, _ as SignDatabaseResult, a as ControlExtensionDescriptor, b as MigrationOperationClass, c as ControlFamilyInstance, d as ControlTargetInstance, f as EmitContractResult, g as SchemaVerificationNode, h as SchemaIssue, i as ControlDriverInstance, j as MigrationRunnerFailure, k as MigrationRunner, l as ControlPlaneStack, m as OperationContext, n as ControlAdapterInstance, o as ControlExtensionInstance, p as IntrospectSchemaResult, r as ControlDriverDescriptor, s as ControlFamilyDescriptor, t as ControlAdapterDescriptor, u as ControlTargetDescriptor, v as VerifyDatabaseResult, w as MigrationPlanner, x as MigrationOperationPolicy, y as VerifyDatabaseSchemaResult } from "./types-CsaU_uQP.mjs";
|
|
2
|
+
export { type ControlAdapterDescriptor, type ControlAdapterInstance, type ControlDriverDescriptor, type ControlDriverInstance, type ControlExtensionDescriptor, type ControlExtensionInstance, type ControlFamilyDescriptor, type ControlFamilyInstance, type ControlPlaneStack, type ControlTargetDescriptor, type ControlTargetInstance, type EmitContractResult, type IntrospectSchemaResult, type MigrationOperationClass, type MigrationOperationPolicy, type MigrationPlan, type MigrationPlanOperation, type MigrationPlanner, type MigrationPlannerConflict, type MigrationPlannerFailureResult, type MigrationPlannerResult, type MigrationPlannerSuccessResult, type MigrationRunner, type MigrationRunnerExecutionChecks, type MigrationRunnerFailure, type MigrationRunnerResult, type MigrationRunnerSuccessValue, type OperationContext, type SchemaIssue, type SchemaVerificationNode, type SignDatabaseResult, type TargetMigrationsCapability, type VerifyDatabaseResult, type VerifyDatabaseSchemaResult };
|
package/dist/types.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|