@prisma-next/framework-components 0.0.1 → 0.3.0-dev.147
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.d.mts +2 -0
- package/dist/authoring.mjs +122 -0
- package/dist/authoring.mjs.map +1 -0
- package/dist/codec-types-D9ixsdxw.d.mts +40 -0
- package/dist/codec-types-D9ixsdxw.d.mts.map +1 -0
- package/dist/codec.d.mts +2 -0
- package/dist/codec.mjs +6 -0
- package/dist/codec.mjs.map +1 -0
- package/dist/components.d.mts +2 -0
- package/dist/components.mjs +3 -0
- package/dist/control.d.mts +550 -0
- package/dist/control.d.mts.map +1 -0
- package/dist/control.mjs +140 -0
- package/dist/control.mjs.map +1 -0
- package/dist/emission-types-Dt9_NXRb.d.mts +24 -0
- package/dist/emission-types-Dt9_NXRb.d.mts.map +1 -0
- package/dist/emission.d.mts +3 -0
- package/dist/emission.mjs +1 -0
- package/dist/execution.d.mts +78 -0
- package/dist/execution.d.mts.map +1 -0
- package/dist/execution.mjs +43 -0
- package/dist/execution.mjs.map +1 -0
- package/dist/framework-authoring-BybjSfF5.d.mts +99 -0
- package/dist/framework-authoring-BybjSfF5.d.mts.map +1 -0
- package/dist/framework-components-Bl3SLyGG.mjs +27 -0
- package/dist/framework-components-Bl3SLyGG.mjs.map +1 -0
- package/dist/framework-components-W-TA8p5-.d.mts +333 -0
- package/dist/framework-components-W-TA8p5-.d.mts.map +1 -0
- package/dist/types-import-spec-BupmVNbx.d.mts +13 -0
- package/dist/types-import-spec-BupmVNbx.d.mts.map +1 -0
- package/package.json +6 -6
|
@@ -0,0 +1,550 @@
|
|
|
1
|
+
import { a as AuthoringFieldNamespace, d as AuthoringTypeNamespace, i as AuthoringContributions } from "./framework-authoring-BybjSfF5.mjs";
|
|
2
|
+
import { n as CodecLookup } from "./codec-types-D9ixsdxw.mjs";
|
|
3
|
+
import { t as TypesImportSpec } from "./types-import-spec-BupmVNbx.mjs";
|
|
4
|
+
import { a as ComponentMetadata, b as TargetInstance, c as DriverDescriptor, d as ExtensionDescriptor, f as ExtensionInstance, h as FamilyInstance, l as DriverInstance, m as FamilyDescriptor, n as AdapterInstance, t as AdapterDescriptor, v as TargetBoundComponentDescriptor, y as TargetDescriptor } from "./framework-components-W-TA8p5-.mjs";
|
|
5
|
+
import { t as EmissionSpi } from "./emission-types-Dt9_NXRb.mjs";
|
|
6
|
+
import { Contract, ContractMarkerRecord } from "@prisma-next/contract/types";
|
|
7
|
+
import { Result } from "@prisma-next/utils/result";
|
|
8
|
+
|
|
9
|
+
//#region src/control-result-types.d.ts
|
|
10
|
+
interface OperationContext {
|
|
11
|
+
readonly contractPath?: string;
|
|
12
|
+
readonly configPath?: string;
|
|
13
|
+
readonly meta?: Readonly<Record<string, unknown>>;
|
|
14
|
+
}
|
|
15
|
+
interface VerifyDatabaseResult {
|
|
16
|
+
readonly ok: boolean;
|
|
17
|
+
readonly code?: string;
|
|
18
|
+
readonly summary: string;
|
|
19
|
+
readonly contract: {
|
|
20
|
+
readonly storageHash: string;
|
|
21
|
+
readonly profileHash?: string;
|
|
22
|
+
};
|
|
23
|
+
readonly marker?: {
|
|
24
|
+
readonly storageHash?: string;
|
|
25
|
+
readonly profileHash?: string;
|
|
26
|
+
};
|
|
27
|
+
readonly target: {
|
|
28
|
+
readonly expected: string;
|
|
29
|
+
readonly actual?: string;
|
|
30
|
+
};
|
|
31
|
+
readonly missingCodecs?: readonly string[];
|
|
32
|
+
readonly codecCoverageSkipped?: boolean;
|
|
33
|
+
readonly meta?: {
|
|
34
|
+
readonly configPath?: string;
|
|
35
|
+
readonly contractPath: string;
|
|
36
|
+
};
|
|
37
|
+
readonly timings: {
|
|
38
|
+
readonly total: number;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
interface SchemaIssue {
|
|
42
|
+
readonly kind: 'missing_table' | 'missing_column' | 'extra_table' | 'extra_column' | 'extra_primary_key' | 'extra_foreign_key' | 'extra_unique_constraint' | 'extra_index' | 'type_mismatch' | 'type_missing' | 'type_values_mismatch' | 'nullability_mismatch' | 'primary_key_mismatch' | 'foreign_key_mismatch' | 'unique_constraint_mismatch' | 'index_mismatch' | 'dependency_missing' | 'default_missing' | 'default_mismatch' | 'extra_default';
|
|
43
|
+
readonly table?: string;
|
|
44
|
+
readonly column?: string;
|
|
45
|
+
readonly indexOrConstraint?: string;
|
|
46
|
+
readonly typeName?: string;
|
|
47
|
+
readonly expected?: string;
|
|
48
|
+
readonly actual?: string;
|
|
49
|
+
readonly message: string;
|
|
50
|
+
}
|
|
51
|
+
interface SchemaVerificationNode {
|
|
52
|
+
readonly status: 'pass' | 'warn' | 'fail';
|
|
53
|
+
readonly kind: string;
|
|
54
|
+
readonly name: string;
|
|
55
|
+
readonly contractPath: string;
|
|
56
|
+
readonly code: string;
|
|
57
|
+
readonly message: string;
|
|
58
|
+
readonly expected: unknown;
|
|
59
|
+
readonly actual: unknown;
|
|
60
|
+
readonly children: readonly SchemaVerificationNode[];
|
|
61
|
+
}
|
|
62
|
+
interface VerifyDatabaseSchemaResult {
|
|
63
|
+
readonly ok: boolean;
|
|
64
|
+
readonly code?: string;
|
|
65
|
+
readonly summary: string;
|
|
66
|
+
readonly contract: {
|
|
67
|
+
readonly storageHash: string;
|
|
68
|
+
readonly profileHash?: string;
|
|
69
|
+
};
|
|
70
|
+
readonly target: {
|
|
71
|
+
readonly expected: string;
|
|
72
|
+
readonly actual?: string;
|
|
73
|
+
};
|
|
74
|
+
readonly schema: {
|
|
75
|
+
readonly issues: readonly SchemaIssue[];
|
|
76
|
+
readonly root: SchemaVerificationNode;
|
|
77
|
+
readonly counts: {
|
|
78
|
+
readonly pass: number;
|
|
79
|
+
readonly warn: number;
|
|
80
|
+
readonly fail: number;
|
|
81
|
+
readonly totalNodes: number;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
readonly meta?: {
|
|
85
|
+
readonly configPath?: string;
|
|
86
|
+
readonly contractPath?: string;
|
|
87
|
+
readonly strict: boolean;
|
|
88
|
+
};
|
|
89
|
+
readonly timings: {
|
|
90
|
+
readonly total: number;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
interface EmitContractResult {
|
|
94
|
+
readonly contractJson: string;
|
|
95
|
+
readonly contractDts: string;
|
|
96
|
+
readonly storageHash: string;
|
|
97
|
+
readonly executionHash?: string;
|
|
98
|
+
readonly profileHash: string;
|
|
99
|
+
}
|
|
100
|
+
interface IntrospectSchemaResult<TSchemaIR> {
|
|
101
|
+
readonly ok: true;
|
|
102
|
+
readonly summary: string;
|
|
103
|
+
readonly target: {
|
|
104
|
+
readonly familyId: string;
|
|
105
|
+
readonly id: string;
|
|
106
|
+
};
|
|
107
|
+
readonly schema: TSchemaIR;
|
|
108
|
+
readonly meta?: {
|
|
109
|
+
readonly configPath?: string;
|
|
110
|
+
readonly dbUrl?: string;
|
|
111
|
+
};
|
|
112
|
+
readonly timings: {
|
|
113
|
+
readonly total: number;
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
interface SignDatabaseResult {
|
|
117
|
+
readonly ok: boolean;
|
|
118
|
+
readonly summary: string;
|
|
119
|
+
readonly contract: {
|
|
120
|
+
readonly storageHash: string;
|
|
121
|
+
readonly profileHash?: string;
|
|
122
|
+
};
|
|
123
|
+
readonly target: {
|
|
124
|
+
readonly expected: string;
|
|
125
|
+
readonly actual?: string;
|
|
126
|
+
};
|
|
127
|
+
readonly marker: {
|
|
128
|
+
readonly created: boolean;
|
|
129
|
+
readonly updated: boolean;
|
|
130
|
+
readonly previous?: {
|
|
131
|
+
readonly storageHash?: string;
|
|
132
|
+
readonly profileHash?: string;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
readonly meta?: {
|
|
136
|
+
readonly configPath?: string;
|
|
137
|
+
readonly contractPath: string;
|
|
138
|
+
};
|
|
139
|
+
readonly timings: {
|
|
140
|
+
readonly total: number;
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
//#endregion
|
|
144
|
+
//#region src/control-instances.d.ts
|
|
145
|
+
interface ControlFamilyInstance<TFamilyId extends string, TSchemaIR = unknown> extends FamilyInstance<TFamilyId> {
|
|
146
|
+
validateContract(contractJson: unknown): Contract;
|
|
147
|
+
verify(options: {
|
|
148
|
+
readonly driver: ControlDriverInstance<TFamilyId, string>;
|
|
149
|
+
readonly contract: unknown;
|
|
150
|
+
readonly expectedTargetId: string;
|
|
151
|
+
readonly contractPath: string;
|
|
152
|
+
readonly configPath?: string;
|
|
153
|
+
}): Promise<VerifyDatabaseResult>;
|
|
154
|
+
schemaVerify(options: {
|
|
155
|
+
readonly driver: ControlDriverInstance<TFamilyId, string>;
|
|
156
|
+
readonly contract: unknown;
|
|
157
|
+
readonly strict: boolean;
|
|
158
|
+
readonly contractPath: string;
|
|
159
|
+
readonly configPath?: string;
|
|
160
|
+
readonly frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<TFamilyId, string>>;
|
|
161
|
+
}): Promise<VerifyDatabaseSchemaResult>;
|
|
162
|
+
sign(options: {
|
|
163
|
+
readonly driver: ControlDriverInstance<TFamilyId, string>;
|
|
164
|
+
readonly contract: unknown;
|
|
165
|
+
readonly contractPath: string;
|
|
166
|
+
readonly configPath?: string;
|
|
167
|
+
}): Promise<SignDatabaseResult>;
|
|
168
|
+
readMarker(options: {
|
|
169
|
+
readonly driver: ControlDriverInstance<TFamilyId, string>;
|
|
170
|
+
}): Promise<ContractMarkerRecord | null>;
|
|
171
|
+
introspect(options: {
|
|
172
|
+
readonly driver: ControlDriverInstance<TFamilyId, string>;
|
|
173
|
+
readonly contract?: unknown;
|
|
174
|
+
}): Promise<TSchemaIR>;
|
|
175
|
+
}
|
|
176
|
+
interface ControlTargetInstance<TFamilyId extends string, TTargetId extends string> extends TargetInstance<TFamilyId, TTargetId> {}
|
|
177
|
+
interface ControlAdapterInstance<TFamilyId extends string, TTargetId extends string> extends AdapterInstance<TFamilyId, TTargetId> {}
|
|
178
|
+
interface ControlDriverInstance<TFamilyId extends string, TTargetId extends string> extends DriverInstance<TFamilyId, TTargetId> {
|
|
179
|
+
query<Row = Record<string, unknown>>(sql: string, params?: readonly unknown[]): Promise<{
|
|
180
|
+
readonly rows: Row[];
|
|
181
|
+
}>;
|
|
182
|
+
close(): Promise<void>;
|
|
183
|
+
}
|
|
184
|
+
interface ControlExtensionInstance<TFamilyId extends string, TTargetId extends string> extends ExtensionInstance<TFamilyId, TTargetId> {}
|
|
185
|
+
//#endregion
|
|
186
|
+
//#region src/control-stack.d.ts
|
|
187
|
+
interface AssembledAuthoringContributions {
|
|
188
|
+
readonly field: AuthoringFieldNamespace;
|
|
189
|
+
readonly type: AuthoringTypeNamespace;
|
|
190
|
+
}
|
|
191
|
+
interface ControlStack<TFamilyId extends string = string, TTargetId extends string = string> {
|
|
192
|
+
readonly family: ControlFamilyDescriptor<TFamilyId>;
|
|
193
|
+
readonly target: ControlTargetDescriptor<TFamilyId, TTargetId>;
|
|
194
|
+
readonly adapter?: ControlAdapterDescriptor<TFamilyId, TTargetId> | undefined;
|
|
195
|
+
readonly driver?: ControlDriverDescriptor<TFamilyId, TTargetId> | undefined;
|
|
196
|
+
readonly extensionPacks: readonly ControlExtensionDescriptor<TFamilyId, TTargetId>[];
|
|
197
|
+
readonly codecTypeImports: ReadonlyArray<TypesImportSpec>;
|
|
198
|
+
readonly operationTypeImports: ReadonlyArray<TypesImportSpec>;
|
|
199
|
+
readonly queryOperationTypeImports: ReadonlyArray<TypesImportSpec>;
|
|
200
|
+
readonly extensionIds: ReadonlyArray<string>;
|
|
201
|
+
readonly codecLookup: CodecLookup;
|
|
202
|
+
readonly authoringContributions: AssembledAuthoringContributions;
|
|
203
|
+
}
|
|
204
|
+
interface CreateControlStackInput<TFamilyId extends string = string, TTargetId extends string = string> {
|
|
205
|
+
readonly family: ControlFamilyDescriptor<TFamilyId>;
|
|
206
|
+
readonly target: ControlTargetDescriptor<TFamilyId, TTargetId>;
|
|
207
|
+
readonly adapter?: ControlAdapterDescriptor<TFamilyId, TTargetId> | undefined;
|
|
208
|
+
readonly driver?: ControlDriverDescriptor<TFamilyId, TTargetId> | undefined;
|
|
209
|
+
readonly extensionPacks?: ReadonlyArray<ControlExtensionDescriptor<TFamilyId, TTargetId>> | undefined;
|
|
210
|
+
}
|
|
211
|
+
declare function assertUniqueCodecOwner(options: {
|
|
212
|
+
readonly codecId: string;
|
|
213
|
+
readonly owners: Map<string, string>;
|
|
214
|
+
readonly descriptorId: string;
|
|
215
|
+
readonly entityLabel: string;
|
|
216
|
+
readonly entityOwnershipLabel: string;
|
|
217
|
+
}): void;
|
|
218
|
+
declare function extractCodecTypeImports(descriptors: ReadonlyArray<Pick<ComponentMetadata, 'types'>>): ReadonlyArray<TypesImportSpec>;
|
|
219
|
+
declare function extractOperationTypeImports(descriptors: ReadonlyArray<Pick<ComponentMetadata, 'types'>>): ReadonlyArray<TypesImportSpec>;
|
|
220
|
+
declare function extractQueryOperationTypeImports(descriptors: ReadonlyArray<Pick<ComponentMetadata, 'types'>>): ReadonlyArray<TypesImportSpec>;
|
|
221
|
+
declare function extractComponentIds(family: {
|
|
222
|
+
readonly id: string;
|
|
223
|
+
}, target: {
|
|
224
|
+
readonly id: string;
|
|
225
|
+
}, adapter: {
|
|
226
|
+
readonly id: string;
|
|
227
|
+
} | undefined, extensions: ReadonlyArray<{
|
|
228
|
+
readonly id: string;
|
|
229
|
+
}>): ReadonlyArray<string>;
|
|
230
|
+
declare function assembleAuthoringContributions(descriptors: ReadonlyArray<{
|
|
231
|
+
readonly authoring?: AuthoringContributions;
|
|
232
|
+
}>): AssembledAuthoringContributions;
|
|
233
|
+
declare function extractCodecLookup(descriptors: ReadonlyArray<Pick<ComponentMetadata & {
|
|
234
|
+
id?: string;
|
|
235
|
+
}, 'types' | 'id'>>): CodecLookup;
|
|
236
|
+
declare function createControlStack<TFamilyId extends string, TTargetId extends string>(input: CreateControlStackInput<TFamilyId, TTargetId>): ControlStack<TFamilyId, TTargetId>;
|
|
237
|
+
//#endregion
|
|
238
|
+
//#region src/control-descriptors.d.ts
|
|
239
|
+
interface ControlFamilyDescriptor<TFamilyId extends string, TFamilyInstance extends ControlFamilyInstance<TFamilyId> = ControlFamilyInstance<TFamilyId>> extends FamilyDescriptor<TFamilyId> {
|
|
240
|
+
readonly emission: EmissionSpi;
|
|
241
|
+
create<TTargetId extends string>(stack: ControlStack<TFamilyId, TTargetId>): TFamilyInstance;
|
|
242
|
+
}
|
|
243
|
+
interface ControlTargetDescriptor<TFamilyId extends string, TTargetId extends string, TTargetInstance extends ControlTargetInstance<TFamilyId, TTargetId> = ControlTargetInstance<TFamilyId, TTargetId>> extends TargetDescriptor<TFamilyId, TTargetId> {
|
|
244
|
+
create(): TTargetInstance;
|
|
245
|
+
}
|
|
246
|
+
interface ControlAdapterDescriptor<TFamilyId extends string, TTargetId extends string, TAdapterInstance extends ControlAdapterInstance<TFamilyId, TTargetId> = ControlAdapterInstance<TFamilyId, TTargetId>> extends AdapterDescriptor<TFamilyId, TTargetId> {
|
|
247
|
+
create(): TAdapterInstance;
|
|
248
|
+
}
|
|
249
|
+
interface ControlDriverDescriptor<TFamilyId extends string, TTargetId extends string, TDriverInstance extends ControlDriverInstance<TFamilyId, TTargetId> = ControlDriverInstance<TFamilyId, TTargetId>, TConnection = string> extends DriverDescriptor<TFamilyId, TTargetId> {
|
|
250
|
+
create(connection: TConnection): Promise<TDriverInstance>;
|
|
251
|
+
}
|
|
252
|
+
interface ControlExtensionDescriptor<TFamilyId extends string, TTargetId extends string, TExtensionInstance extends ControlExtensionInstance<TFamilyId, TTargetId> = ControlExtensionInstance<TFamilyId, TTargetId>> extends ExtensionDescriptor<TFamilyId, TTargetId> {
|
|
253
|
+
create(): TExtensionInstance;
|
|
254
|
+
}
|
|
255
|
+
//#endregion
|
|
256
|
+
//#region src/control-migration-types.d.ts
|
|
257
|
+
/**
|
|
258
|
+
* Migration operation classes define the safety level of an operation.
|
|
259
|
+
* - 'additive': Adds new structures without modifying existing ones (safe)
|
|
260
|
+
* - 'widening': Relaxes constraints or expands types (generally safe)
|
|
261
|
+
* - 'destructive': Removes or alters existing structures (potentially unsafe)
|
|
262
|
+
*/
|
|
263
|
+
type MigrationOperationClass = 'additive' | 'widening' | 'destructive';
|
|
264
|
+
/**
|
|
265
|
+
* Policy defining which operation classes are allowed during a migration.
|
|
266
|
+
*/
|
|
267
|
+
interface MigrationOperationPolicy {
|
|
268
|
+
readonly allowedOperationClasses: readonly MigrationOperationClass[];
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* A single migration operation for display purposes.
|
|
272
|
+
* Contains only the fields needed for CLI output (tree view, JSON envelope).
|
|
273
|
+
*/
|
|
274
|
+
interface MigrationPlanOperation {
|
|
275
|
+
/** Unique identifier for this operation (e.g., "table.users.create"). */
|
|
276
|
+
readonly id: string;
|
|
277
|
+
/** Human-readable label for display in UI/CLI (e.g., "Create table users"). */
|
|
278
|
+
readonly label: string;
|
|
279
|
+
/** The class of operation (additive, widening, destructive). */
|
|
280
|
+
readonly operationClass: MigrationOperationClass;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* A migration plan for display purposes.
|
|
284
|
+
* Contains only the fields needed for CLI output (summary, JSON envelope).
|
|
285
|
+
*/
|
|
286
|
+
interface MigrationPlan {
|
|
287
|
+
/** The target ID this plan is for (e.g., 'postgres'). */
|
|
288
|
+
readonly targetId: string;
|
|
289
|
+
/**
|
|
290
|
+
* Origin contract identity that the plan expects the database to currently be at.
|
|
291
|
+
* If omitted or null, the runner skips origin validation entirely.
|
|
292
|
+
*/
|
|
293
|
+
readonly origin?: {
|
|
294
|
+
readonly storageHash: string;
|
|
295
|
+
readonly profileHash?: string;
|
|
296
|
+
} | null;
|
|
297
|
+
/** Destination contract identity that the plan intends to reach. */
|
|
298
|
+
readonly destination: {
|
|
299
|
+
readonly storageHash: string;
|
|
300
|
+
readonly profileHash?: string;
|
|
301
|
+
};
|
|
302
|
+
/** Ordered list of operations to execute. */
|
|
303
|
+
readonly operations: readonly MigrationPlanOperation[];
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* A conflict detected during migration planning.
|
|
307
|
+
*/
|
|
308
|
+
interface MigrationPlannerConflict {
|
|
309
|
+
/** Kind of conflict (e.g., 'typeMismatch', 'nullabilityConflict'). */
|
|
310
|
+
readonly kind: string;
|
|
311
|
+
/** Human-readable summary of the conflict. */
|
|
312
|
+
readonly summary: string;
|
|
313
|
+
/** Optional explanation of why this conflict occurred. */
|
|
314
|
+
readonly why?: string;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Successful planner result with the migration plan.
|
|
318
|
+
*/
|
|
319
|
+
interface MigrationPlannerSuccessResult {
|
|
320
|
+
readonly kind: 'success';
|
|
321
|
+
readonly plan: MigrationPlan;
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Failed planner result with the list of conflicts.
|
|
325
|
+
*/
|
|
326
|
+
interface MigrationPlannerFailureResult {
|
|
327
|
+
readonly kind: 'failure';
|
|
328
|
+
readonly conflicts: readonly MigrationPlannerConflict[];
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Union type for planner results.
|
|
332
|
+
*/
|
|
333
|
+
type MigrationPlannerResult = MigrationPlannerSuccessResult | MigrationPlannerFailureResult;
|
|
334
|
+
/**
|
|
335
|
+
* Success value for migration runner execution.
|
|
336
|
+
*/
|
|
337
|
+
interface MigrationRunnerSuccessValue {
|
|
338
|
+
readonly operationsPlanned: number;
|
|
339
|
+
readonly operationsExecuted: number;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Failure details for migration runner execution.
|
|
343
|
+
*/
|
|
344
|
+
interface MigrationRunnerFailure {
|
|
345
|
+
/** Error code for the failure. */
|
|
346
|
+
readonly code: string;
|
|
347
|
+
/** Human-readable summary of the failure. */
|
|
348
|
+
readonly summary: string;
|
|
349
|
+
/** Optional explanation of why the failure occurred. */
|
|
350
|
+
readonly why?: string;
|
|
351
|
+
/** Optional metadata for debugging and UX (e.g., schema issues, SQL state). */
|
|
352
|
+
readonly meta?: Record<string, unknown>;
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Result type for migration runner execution.
|
|
356
|
+
*/
|
|
357
|
+
type MigrationRunnerResult = Result<MigrationRunnerSuccessValue, MigrationRunnerFailure>;
|
|
358
|
+
/**
|
|
359
|
+
* Execution-time checks configuration for migration runners.
|
|
360
|
+
* All checks default to `true` (enabled) when omitted.
|
|
361
|
+
*/
|
|
362
|
+
interface MigrationRunnerExecutionChecks {
|
|
363
|
+
/**
|
|
364
|
+
* Whether to run prechecks before executing operations.
|
|
365
|
+
* Defaults to `true` (prechecks are run).
|
|
366
|
+
*/
|
|
367
|
+
readonly prechecks?: boolean;
|
|
368
|
+
/**
|
|
369
|
+
* Whether to run postchecks after executing operations.
|
|
370
|
+
* Defaults to `true` (postchecks are run).
|
|
371
|
+
*/
|
|
372
|
+
readonly postchecks?: boolean;
|
|
373
|
+
/**
|
|
374
|
+
* Whether to run idempotency probe (check if postcheck is already satisfied before execution).
|
|
375
|
+
* Defaults to `true` (idempotency probe is run).
|
|
376
|
+
*/
|
|
377
|
+
readonly idempotencyChecks?: boolean;
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Migration planner interface for planning schema changes.
|
|
381
|
+
* This is the minimal interface that CLI commands use.
|
|
382
|
+
*
|
|
383
|
+
* @template TFamilyId - The family ID (e.g., 'sql', 'document')
|
|
384
|
+
* @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
|
|
385
|
+
*/
|
|
386
|
+
interface MigrationPlanner<TFamilyId extends string = string, TTargetId extends string = string> {
|
|
387
|
+
plan(options: {
|
|
388
|
+
readonly contract: unknown;
|
|
389
|
+
readonly schema: unknown;
|
|
390
|
+
readonly policy: MigrationOperationPolicy;
|
|
391
|
+
/**
|
|
392
|
+
* Active framework components participating in this composition.
|
|
393
|
+
* Families/targets can interpret this list to derive family-specific metadata.
|
|
394
|
+
* All components must have matching familyId and targetId.
|
|
395
|
+
*/
|
|
396
|
+
readonly frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<TFamilyId, TTargetId>>;
|
|
397
|
+
}): MigrationPlannerResult;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Migration runner interface for executing migration plans.
|
|
401
|
+
* This is the minimal interface that CLI commands use.
|
|
402
|
+
*
|
|
403
|
+
* @template TFamilyId - The family ID (e.g., 'sql', 'document')
|
|
404
|
+
* @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
|
|
405
|
+
*/
|
|
406
|
+
interface MigrationRunner<TFamilyId extends string = string, TTargetId extends string = string> {
|
|
407
|
+
execute(options: {
|
|
408
|
+
readonly plan: MigrationPlan;
|
|
409
|
+
readonly driver: ControlDriverInstance<TFamilyId, TTargetId>;
|
|
410
|
+
readonly destinationContract: unknown;
|
|
411
|
+
readonly policy: MigrationOperationPolicy;
|
|
412
|
+
readonly callbacks?: {
|
|
413
|
+
onOperationStart?(op: MigrationPlanOperation): void;
|
|
414
|
+
onOperationComplete?(op: MigrationPlanOperation): void;
|
|
415
|
+
};
|
|
416
|
+
/**
|
|
417
|
+
* Execution-time checks configuration.
|
|
418
|
+
* All checks default to `true` (enabled) when omitted.
|
|
419
|
+
*/
|
|
420
|
+
readonly executionChecks?: MigrationRunnerExecutionChecks;
|
|
421
|
+
/**
|
|
422
|
+
* Active framework components participating in this composition.
|
|
423
|
+
* Families/targets can interpret this list to derive family-specific metadata.
|
|
424
|
+
* All components must have matching familyId and targetId.
|
|
425
|
+
*/
|
|
426
|
+
readonly frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<TFamilyId, TTargetId>>;
|
|
427
|
+
}): Promise<MigrationRunnerResult>;
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Optional capability interface for targets that support migrations.
|
|
431
|
+
* Targets that implement migrations expose this via their descriptor.
|
|
432
|
+
*
|
|
433
|
+
* @template TFamilyId - The family ID (e.g., 'sql', 'document')
|
|
434
|
+
* @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
|
|
435
|
+
* @template TFamilyInstance - The family instance type (e.g., SqlControlFamilyInstance)
|
|
436
|
+
*/
|
|
437
|
+
interface TargetMigrationsCapability<TFamilyId extends string = string, TTargetId extends string = string, TFamilyInstance extends ControlFamilyInstance<TFamilyId> = ControlFamilyInstance<TFamilyId>> {
|
|
438
|
+
createPlanner(family: TFamilyInstance): MigrationPlanner<TFamilyId, TTargetId>;
|
|
439
|
+
createRunner(family: TFamilyInstance): MigrationRunner<TFamilyId, TTargetId>;
|
|
440
|
+
/**
|
|
441
|
+
* Synthesizes a family-specific schema IR from a contract for offline planning.
|
|
442
|
+
* The returned schema can be passed to `planner.plan({ schema })` as the "from" state.
|
|
443
|
+
*
|
|
444
|
+
* @param contract - The contract to convert, or null for a new project (empty schema).
|
|
445
|
+
* @param frameworkComponents - Active framework components, used to derive database
|
|
446
|
+
* dependencies (e.g. extensions) that should be reflected in the schema IR.
|
|
447
|
+
* @returns Family-specific schema IR (e.g., `SqlSchemaIR` for SQL targets).
|
|
448
|
+
*/
|
|
449
|
+
contractToSchema(contract: Contract | null, frameworkComponents?: ReadonlyArray<TargetBoundComponentDescriptor<TFamilyId, TTargetId>>): unknown;
|
|
450
|
+
}
|
|
451
|
+
//#endregion
|
|
452
|
+
//#region src/control-schema-view.d.ts
|
|
453
|
+
/**
|
|
454
|
+
* Core schema view types for family-agnostic schema visualization.
|
|
455
|
+
*
|
|
456
|
+
* These types provide a minimal, generic, tree-shaped representation of schemas
|
|
457
|
+
* across families, designed for CLI visualization and lightweight tooling.
|
|
458
|
+
*
|
|
459
|
+
* Families can optionally project their family-specific Schema IR into this
|
|
460
|
+
* core view via the `toSchemaView` method on `FamilyInstance`.
|
|
461
|
+
*
|
|
462
|
+
* ## Example: SQL Family Mapping
|
|
463
|
+
*
|
|
464
|
+
* For the SQL family, `SqlSchemaIR` can be mapped to `CoreSchemaView` as follows:
|
|
465
|
+
*
|
|
466
|
+
* ```ts
|
|
467
|
+
* // SqlSchemaIR structure:
|
|
468
|
+
* // {
|
|
469
|
+
* // tables: { user: { columns: {...}, primaryKey: {...}, ... }, ... },
|
|
470
|
+
* // dependencies: [{ id: 'postgres.extension.vector' }],
|
|
471
|
+
* // annotations: {...}
|
|
472
|
+
* // }
|
|
473
|
+
*
|
|
474
|
+
* // CoreSchemaView mapping:
|
|
475
|
+
* // {
|
|
476
|
+
* // root: {
|
|
477
|
+
* // kind: 'root',
|
|
478
|
+
* // id: 'sql-schema',
|
|
479
|
+
* // label: 'sql schema (tables: 2)',
|
|
480
|
+
* // children: [
|
|
481
|
+
* // {
|
|
482
|
+
* // kind: 'entity',
|
|
483
|
+
* // id: 'table-user',
|
|
484
|
+
* // label: 'table user',
|
|
485
|
+
* // meta: { primaryKey: ['id'], ... },
|
|
486
|
+
* // children: [
|
|
487
|
+
* // {
|
|
488
|
+
* // kind: 'field',
|
|
489
|
+
* // id: 'column-id',
|
|
490
|
+
* // label: 'id: int4 (pg/int4@1, not null)',
|
|
491
|
+
* // meta: { nativeType: 'int4', codecId: 'pg/int4@1', nullable: false, ... }
|
|
492
|
+
* // },
|
|
493
|
+
* // {
|
|
494
|
+
* // kind: 'index',
|
|
495
|
+
* // id: 'index-user-email',
|
|
496
|
+
* // label: 'index user_email_unique',
|
|
497
|
+
* // meta: { columns: ['email'], unique: true, ... }
|
|
498
|
+
* // }
|
|
499
|
+
* // ]
|
|
500
|
+
* // },
|
|
501
|
+
* // {
|
|
502
|
+
* // kind: 'dependency',
|
|
503
|
+
* // id: 'dependency-postgres.extension.pgvector',
|
|
504
|
+
* // label: 'pgvector extension is enabled',
|
|
505
|
+
* // meta: { ... }
|
|
506
|
+
* // }
|
|
507
|
+
* // ]
|
|
508
|
+
* // }
|
|
509
|
+
* // }
|
|
510
|
+
* ```
|
|
511
|
+
*
|
|
512
|
+
* This mapping demonstrates that the core view types are expressive enough
|
|
513
|
+
* to represent SQL schemas without being SQL-specific.
|
|
514
|
+
*/
|
|
515
|
+
/**
|
|
516
|
+
* Node kinds for schema tree nodes.
|
|
517
|
+
* Designed to be generic enough for SQL, document, KV, and future families.
|
|
518
|
+
*/
|
|
519
|
+
type SchemaNodeKind = 'root' | 'namespace' | 'collection' | 'entity' | 'field' | 'index' | 'dependency';
|
|
520
|
+
/**
|
|
521
|
+
* A node in the schema tree.
|
|
522
|
+
* Tree-shaped structure good for Command Tree-style CLI output.
|
|
523
|
+
*/
|
|
524
|
+
interface SchemaTreeNode {
|
|
525
|
+
readonly kind: SchemaNodeKind;
|
|
526
|
+
readonly id: string;
|
|
527
|
+
readonly label: string;
|
|
528
|
+
readonly meta?: Record<string, unknown>;
|
|
529
|
+
readonly children?: readonly SchemaTreeNode[];
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* Core schema view providing a family-agnostic tree representation of a schema.
|
|
533
|
+
* Used by CLI and cross-family tooling for visualization.
|
|
534
|
+
*/
|
|
535
|
+
interface CoreSchemaView {
|
|
536
|
+
readonly root: SchemaTreeNode;
|
|
537
|
+
}
|
|
538
|
+
//#endregion
|
|
539
|
+
//#region src/control-capabilities.d.ts
|
|
540
|
+
interface MigratableTargetDescriptor<TFamilyId extends string, TTargetId extends string, TFamilyInstance extends ControlFamilyInstance<TFamilyId> = ControlFamilyInstance<TFamilyId>> extends ControlTargetDescriptor<TFamilyId, TTargetId> {
|
|
541
|
+
readonly migrations: TargetMigrationsCapability<TFamilyId, TTargetId, TFamilyInstance>;
|
|
542
|
+
}
|
|
543
|
+
declare function hasMigrations<TFamilyId extends string, TTargetId extends string>(target: ControlTargetDescriptor<TFamilyId, TTargetId>): target is MigratableTargetDescriptor<TFamilyId, TTargetId>;
|
|
544
|
+
interface SchemaViewCapable<TSchemaIR = unknown> {
|
|
545
|
+
toSchemaView(schema: TSchemaIR): CoreSchemaView;
|
|
546
|
+
}
|
|
547
|
+
declare function hasSchemaView<TFamilyId extends string>(instance: ControlFamilyInstance<TFamilyId>): instance is ControlFamilyInstance<TFamilyId> & SchemaViewCapable;
|
|
548
|
+
//#endregion
|
|
549
|
+
export { type AssembledAuthoringContributions, type ControlAdapterDescriptor, type ControlAdapterInstance, type ControlDriverDescriptor, type ControlDriverInstance, type ControlExtensionDescriptor, type ControlExtensionInstance, type ControlFamilyDescriptor, type ControlFamilyInstance, type ControlStack, type ControlTargetDescriptor, type ControlTargetInstance, type CoreSchemaView, type CreateControlStackInput, type EmitContractResult, type IntrospectSchemaResult, type MigratableTargetDescriptor, 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 SchemaNodeKind, type SchemaTreeNode, type SchemaVerificationNode, type SchemaViewCapable, type SignDatabaseResult, type TargetMigrationsCapability, type VerifyDatabaseResult, type VerifyDatabaseSchemaResult, assembleAuthoringContributions, assertUniqueCodecOwner, createControlStack, extractCodecLookup, extractCodecTypeImports, extractComponentIds, extractOperationTypeImports, extractQueryOperationTypeImports, hasMigrations, hasSchemaView };
|
|
550
|
+
//# sourceMappingURL=control.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control.d.mts","names":[],"sources":["../src/control-result-types.ts","../src/control-instances.ts","../src/control-stack.ts","../src/control-descriptors.ts","../src/control-migration-types.ts","../src/control-schema-view.ts","../src/control-capabilities.ts"],"sourcesContent":[],"mappings":";;;;;;;;;UAAiB,gBAAA;;;kBAGC,SAAS;;UAGV,oBAAA;;;;EANA,SAAA,QAAA,EAAgB;IAMhB,SAAA,WAAoB,EAAA,MAAA;IA2BpB,SAAA,WAAW,CAAA,EAAA,MAAA;EA+BX,CAAA;EAYA,SAAA,MAAA,CAAA,EAAA;IAgCA,SAAA,WAAkB,CAAA,EAAA,MAAA;I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