@prisma-next/core-control-plane 0.3.0-dev.1 → 0.3.0-dev.100

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.
Files changed (62) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +31 -99
  3. package/dist/constants.d.mts +9 -0
  4. package/dist/constants.d.mts.map +1 -0
  5. package/dist/constants.mjs +10 -0
  6. package/dist/constants.mjs.map +1 -0
  7. package/dist/emission.d.mts +63 -0
  8. package/dist/emission.d.mts.map +1 -0
  9. package/dist/emission.mjs +316 -0
  10. package/dist/emission.mjs.map +1 -0
  11. package/dist/errors.d.mts +232 -0
  12. package/dist/errors.d.mts.map +1 -0
  13. package/dist/errors.mjs +330 -0
  14. package/dist/errors.mjs.map +1 -0
  15. package/dist/{exports/schema-view.d.ts → schema-view-DObwT8x9.d.mts} +15 -13
  16. package/dist/schema-view-DObwT8x9.d.mts.map +1 -0
  17. package/dist/schema-view.d.mts +2 -0
  18. package/dist/schema-view.mjs +1 -0
  19. package/dist/stack.d.mts +30 -0
  20. package/dist/stack.d.mts.map +1 -0
  21. package/dist/stack.mjs +30 -0
  22. package/dist/stack.mjs.map +1 -0
  23. package/dist/types-BArIWumw.d.mts +615 -0
  24. package/dist/types-BArIWumw.d.mts.map +1 -0
  25. package/dist/types.d.mts +2 -0
  26. package/dist/types.mjs +1 -0
  27. package/package.json +33 -40
  28. package/src/constants.ts +5 -0
  29. package/src/emission/canonicalization.ts +300 -0
  30. package/src/emission/emit.ts +181 -0
  31. package/src/emission/hashing.ts +59 -0
  32. package/src/emission/types.ts +33 -0
  33. package/src/errors.ts +533 -0
  34. package/src/exports/constants.ts +1 -0
  35. package/src/exports/emission.ts +6 -0
  36. package/src/exports/errors.ts +27 -0
  37. package/src/exports/schema-view.ts +1 -0
  38. package/src/exports/stack.ts +1 -0
  39. package/src/exports/types.ts +38 -0
  40. package/src/migrations.ts +273 -0
  41. package/src/schema-view.ts +95 -0
  42. package/src/stack.ts +38 -0
  43. package/src/types.ts +536 -0
  44. package/dist/chunk-U5RYT6PT.js +0 -229
  45. package/dist/chunk-U5RYT6PT.js.map +0 -1
  46. package/dist/exports/config-types.d.ts +0 -70
  47. package/dist/exports/config-types.js +0 -53
  48. package/dist/exports/config-types.js.map +0 -1
  49. package/dist/exports/config-validation.d.ts +0 -18
  50. package/dist/exports/config-validation.js +0 -252
  51. package/dist/exports/config-validation.js.map +0 -1
  52. package/dist/exports/emission.d.ts +0 -42
  53. package/dist/exports/emission.js +0 -310
  54. package/dist/exports/emission.js.map +0 -1
  55. package/dist/exports/errors.d.ts +0 -184
  56. package/dist/exports/errors.js +0 -43
  57. package/dist/exports/errors.js.map +0 -1
  58. package/dist/exports/schema-view.js +0 -1
  59. package/dist/exports/schema-view.js.map +0 -1
  60. package/dist/exports/types.d.ts +0 -589
  61. package/dist/exports/types.js +0 -1
  62. package/dist/exports/types.js.map +0 -1
package/src/errors.ts ADDED
@@ -0,0 +1,533 @@
1
+ import { ifDefined } from '@prisma-next/utils/defined';
2
+ import type { SchemaIssue, VerifyDatabaseSchemaResult } from './types';
3
+
4
+ /**
5
+ * CLI error envelope for output formatting.
6
+ * This is the serialized form of a CliStructuredError.
7
+ */
8
+ export interface CliErrorEnvelope {
9
+ readonly ok: false;
10
+ readonly code: string;
11
+ readonly domain: string;
12
+ readonly severity: 'error' | 'warn' | 'info';
13
+ readonly summary: string;
14
+ readonly why: string | undefined;
15
+ readonly fix: string | undefined;
16
+ readonly where:
17
+ | {
18
+ readonly path: string | undefined;
19
+ readonly line: number | undefined;
20
+ }
21
+ | undefined;
22
+ readonly meta: Record<string, unknown> | undefined;
23
+ readonly docsUrl: string | undefined;
24
+ }
25
+
26
+ /**
27
+ * Minimal conflict data structure expected by CLI output.
28
+ */
29
+ export interface CliErrorConflict {
30
+ readonly kind: string;
31
+ readonly summary: string;
32
+ readonly why?: string;
33
+ }
34
+
35
+ /**
36
+ * Structured CLI error that contains all information needed for error envelopes.
37
+ * Call sites throw these errors with full context.
38
+ */
39
+ export class CliStructuredError extends Error {
40
+ readonly code: string;
41
+ readonly domain: 'CLI' | 'RUN';
42
+ readonly severity: 'error' | 'warn' | 'info';
43
+ readonly why: string | undefined;
44
+ readonly fix: string | undefined;
45
+ readonly where:
46
+ | {
47
+ readonly path: string | undefined;
48
+ readonly line: number | undefined;
49
+ }
50
+ | undefined;
51
+ readonly meta: Record<string, unknown> | undefined;
52
+ readonly docsUrl: string | undefined;
53
+
54
+ constructor(
55
+ code: string,
56
+ summary: string,
57
+ options?: {
58
+ readonly domain?: 'CLI' | 'RUN';
59
+ readonly severity?: 'error' | 'warn' | 'info';
60
+ readonly why?: string;
61
+ readonly fix?: string;
62
+ readonly where?: { readonly path?: string; readonly line?: number };
63
+ readonly meta?: Record<string, unknown>;
64
+ readonly docsUrl?: string;
65
+ },
66
+ ) {
67
+ super(summary);
68
+ this.name = 'CliStructuredError';
69
+ this.code = code;
70
+ this.domain = options?.domain ?? 'CLI';
71
+ this.severity = options?.severity ?? 'error';
72
+ this.why = options?.why;
73
+ this.fix = options?.fix === options?.why ? undefined : options?.fix;
74
+ this.where = options?.where
75
+ ? {
76
+ path: options.where.path,
77
+ line: options.where.line,
78
+ }
79
+ : undefined;
80
+ this.meta = options?.meta;
81
+ this.docsUrl = options?.docsUrl;
82
+ }
83
+
84
+ /**
85
+ * Converts this error to a CLI error envelope for output formatting.
86
+ */
87
+ toEnvelope(): CliErrorEnvelope {
88
+ const codePrefix = this.domain === 'CLI' ? 'PN-CLI-' : 'PN-RUN-';
89
+ return {
90
+ ok: false as const,
91
+ code: `${codePrefix}${this.code}`,
92
+ domain: this.domain,
93
+ severity: this.severity,
94
+ summary: this.message,
95
+ why: this.why,
96
+ fix: this.fix,
97
+ where: this.where,
98
+ meta: this.meta,
99
+ docsUrl: this.docsUrl,
100
+ };
101
+ }
102
+
103
+ /**
104
+ * Type guard to check if an error is a CliStructuredError.
105
+ * Uses duck-typing to work across module boundaries where instanceof may fail.
106
+ */
107
+ static is(error: unknown): error is CliStructuredError {
108
+ if (!(error instanceof Error)) {
109
+ return false;
110
+ }
111
+ const candidate = error as CliStructuredError;
112
+ return (
113
+ candidate.name === 'CliStructuredError' &&
114
+ typeof candidate.code === 'string' &&
115
+ (candidate.domain === 'CLI' || candidate.domain === 'RUN') &&
116
+ typeof candidate.toEnvelope === 'function'
117
+ );
118
+ }
119
+ }
120
+
121
+ // ============================================================================
122
+ // Config Errors (PN-CLI-4001-4007)
123
+ // ============================================================================
124
+
125
+ /**
126
+ * Config file not found or missing.
127
+ */
128
+ export function errorConfigFileNotFound(
129
+ configPath?: string,
130
+ options?: {
131
+ readonly why?: string;
132
+ },
133
+ ): CliStructuredError {
134
+ return new CliStructuredError('4001', 'Config file not found', {
135
+ domain: 'CLI',
136
+ ...(options?.why ? { why: options.why } : { why: 'Config file not found' }),
137
+ fix: "Run 'prisma-next init' to create a config file",
138
+ docsUrl: 'https://prisma-next.dev/docs/cli/config',
139
+ ...(configPath ? { where: { path: configPath } } : {}),
140
+ });
141
+ }
142
+
143
+ /**
144
+ * Contract configuration missing from config.
145
+ */
146
+ export function errorContractConfigMissing(options?: {
147
+ readonly why?: string;
148
+ }): CliStructuredError {
149
+ return new CliStructuredError('4002', 'Contract configuration missing', {
150
+ domain: 'CLI',
151
+ why: options?.why ?? 'The contract configuration is required for emit',
152
+ fix: 'Add contract configuration to your prisma-next.config.ts',
153
+ docsUrl: 'https://prisma-next.dev/docs/cli/contract-emit',
154
+ });
155
+ }
156
+
157
+ /**
158
+ * Contract validation failed.
159
+ */
160
+ export function errorContractValidationFailed(
161
+ reason: string,
162
+ options?: {
163
+ readonly where?: { readonly path?: string; readonly line?: number };
164
+ },
165
+ ): CliStructuredError {
166
+ return new CliStructuredError('4003', 'Contract validation failed', {
167
+ domain: 'CLI',
168
+ why: reason,
169
+ fix: 'Re-run `prisma-next contract emit`, or fix the contract file and try again',
170
+ docsUrl: 'https://prisma-next.dev/docs/contracts',
171
+ ...(options?.where ? { where: options.where } : {}),
172
+ });
173
+ }
174
+
175
+ /**
176
+ * File not found.
177
+ */
178
+ export function errorFileNotFound(
179
+ filePath: string,
180
+ options?: {
181
+ readonly why?: string;
182
+ readonly fix?: string;
183
+ readonly docsUrl?: string;
184
+ },
185
+ ): CliStructuredError {
186
+ return new CliStructuredError('4004', 'File not found', {
187
+ domain: 'CLI',
188
+ why: options?.why ?? `File not found: ${filePath}`,
189
+ fix: options?.fix ?? 'Check that the file path is correct',
190
+ where: { path: filePath },
191
+ ...(options?.docsUrl ? { docsUrl: options.docsUrl } : {}),
192
+ });
193
+ }
194
+
195
+ /**
196
+ * Database connection is required but not provided.
197
+ */
198
+ export function errorDatabaseConnectionRequired(options?: {
199
+ readonly why?: string;
200
+ readonly commandName?: string;
201
+ readonly retryCommand?: string;
202
+ }): CliStructuredError {
203
+ const runHint = options?.retryCommand
204
+ ? `Run \`${options.retryCommand}\``
205
+ : options?.commandName
206
+ ? `Run \`prisma-next ${options.commandName} --db <url>\``
207
+ : 'Provide `--db <url>`';
208
+ return new CliStructuredError('4005', 'Database connection is required', {
209
+ domain: 'CLI',
210
+ why: options?.why ?? 'Database connection is required for this command',
211
+ fix: `${runHint}, or set \`db: { connection: "postgres://…" }\` in prisma-next.config.ts`,
212
+ });
213
+ }
214
+
215
+ /**
216
+ * Query runner factory is required but not provided in config.
217
+ */
218
+ export function errorQueryRunnerFactoryRequired(options?: {
219
+ readonly why?: string;
220
+ }): CliStructuredError {
221
+ return new CliStructuredError('4006', 'Query runner factory is required', {
222
+ domain: 'CLI',
223
+ why: options?.why ?? 'Config.db.queryRunnerFactory is required for db verify',
224
+ fix: 'Add db.queryRunnerFactory to prisma-next.config.ts',
225
+ docsUrl: 'https://prisma-next.dev/docs/cli/db-verify',
226
+ });
227
+ }
228
+
229
+ /**
230
+ * Family verify.readMarker is required but not provided.
231
+ */
232
+ export function errorFamilyReadMarkerSqlRequired(options?: {
233
+ readonly why?: string;
234
+ }): CliStructuredError {
235
+ return new CliStructuredError('4007', 'Family readMarker() is required', {
236
+ domain: 'CLI',
237
+ why: options?.why ?? 'Family verify.readMarker is required for db verify',
238
+ fix: 'Ensure family.verify.readMarker() is exported by your family package',
239
+ docsUrl: 'https://prisma-next.dev/docs/cli/db-verify',
240
+ });
241
+ }
242
+
243
+ /**
244
+ * JSON output format not supported.
245
+ */
246
+ export function errorJsonFormatNotSupported(options: {
247
+ readonly command: string;
248
+ readonly format: string;
249
+ readonly supportedFormats: readonly string[];
250
+ }): CliStructuredError {
251
+ return new CliStructuredError('4008', 'Unsupported JSON format', {
252
+ domain: 'CLI',
253
+ why: `The ${options.command} command does not support --json ${options.format}`,
254
+ fix: `Use --json ${options.supportedFormats.join(' or ')}, or omit --json for human output`,
255
+ meta: {
256
+ command: options.command,
257
+ format: options.format,
258
+ supportedFormats: options.supportedFormats,
259
+ },
260
+ });
261
+ }
262
+
263
+ /**
264
+ * Driver is required for DB-connected commands but not provided.
265
+ */
266
+ export function errorDriverRequired(options?: { readonly why?: string }): CliStructuredError {
267
+ return new CliStructuredError('4010', 'Driver is required for DB-connected commands', {
268
+ domain: 'CLI',
269
+ why: options?.why ?? 'Config.driver is required for DB-connected commands',
270
+ fix: 'Add a control-plane driver to prisma-next.config.ts (e.g. import a driver descriptor and set `driver: postgresDriver`)',
271
+ docsUrl: 'https://prisma-next.dev/docs/cli/config',
272
+ });
273
+ }
274
+
275
+ /**
276
+ * Contract requires extension packs that are not provided by config descriptors.
277
+ */
278
+ export function errorContractMissingExtensionPacks(options: {
279
+ readonly missingExtensionPacks: readonly string[];
280
+ readonly providedComponentIds: readonly string[];
281
+ }): CliStructuredError {
282
+ const missing = [...options.missingExtensionPacks].sort();
283
+ return new CliStructuredError('4011', 'Missing extension packs in config', {
284
+ domain: 'CLI',
285
+ why:
286
+ missing.length === 1
287
+ ? `Contract requires extension pack '${missing[0]}', but CLI config does not provide a matching descriptor.`
288
+ : `Contract requires extension packs ${missing.map((p) => `'${p}'`).join(', ')}, but CLI config does not provide matching descriptors.`,
289
+ fix: 'Add the missing extension descriptors to `extensions` in prisma-next.config.ts',
290
+ docsUrl: 'https://prisma-next.dev/docs/cli/config',
291
+ meta: {
292
+ missingExtensionPacks: missing,
293
+ providedComponentIds: [...options.providedComponentIds].sort(),
294
+ },
295
+ });
296
+ }
297
+
298
+ /**
299
+ * Migration planning failed due to conflicts.
300
+ */
301
+ export function errorMigrationPlanningFailed(options: {
302
+ readonly conflicts: readonly CliErrorConflict[];
303
+ readonly why?: string;
304
+ }): CliStructuredError {
305
+ // Build "why" from conflict summaries - these contain the actual problem description
306
+ const conflictSummaries = options.conflicts.map((c) => c.summary);
307
+ const computedWhy = options.why ?? conflictSummaries.join('\n');
308
+
309
+ // Build "fix" from conflict "why" fields - these contain actionable advice
310
+ const conflictFixes = options.conflicts
311
+ .map((c) => c.why)
312
+ .filter((why): why is string => typeof why === 'string');
313
+ const computedFix =
314
+ conflictFixes.length > 0
315
+ ? conflictFixes.join('\n')
316
+ : 'Use `db verify --schema-only` to inspect conflicts, or ensure the database is empty';
317
+
318
+ return new CliStructuredError('4020', 'Migration planning failed', {
319
+ domain: 'CLI',
320
+ why: computedWhy,
321
+ fix: computedFix,
322
+ meta: { conflicts: options.conflicts },
323
+ docsUrl: 'https://prisma-next.dev/docs/cli/db-init',
324
+ });
325
+ }
326
+
327
+ /**
328
+ * Target does not support migrations (missing createPlanner/createRunner).
329
+ */
330
+ export function errorTargetMigrationNotSupported(options?: {
331
+ readonly why?: string;
332
+ }): CliStructuredError {
333
+ return new CliStructuredError('4021', 'Target does not support migrations', {
334
+ domain: 'CLI',
335
+ why: options?.why ?? 'The configured target does not provide migration planner/runner',
336
+ fix: 'Select a target that provides migrations (it must export `target.migrations` for db init)',
337
+ docsUrl: 'https://prisma-next.dev/docs/cli/db-init',
338
+ });
339
+ }
340
+
341
+ /**
342
+ * Config validation error (missing required fields).
343
+ */
344
+ export function errorConfigValidation(
345
+ field: string,
346
+ options?: {
347
+ readonly why?: string;
348
+ },
349
+ ): CliStructuredError {
350
+ return new CliStructuredError('4009', 'Config validation error', {
351
+ domain: 'CLI',
352
+ why: options?.why ?? `Config must have a "${field}" field`,
353
+ fix: 'Check your prisma-next.config.ts and ensure all required fields are provided',
354
+ docsUrl: 'https://prisma-next.dev/docs/cli/config',
355
+ });
356
+ }
357
+
358
+ // ============================================================================
359
+ // Runtime Errors (PN-RUN-3000-3030)
360
+ // ============================================================================
361
+
362
+ /**
363
+ * Contract marker not found in database.
364
+ */
365
+ export function errorMarkerMissing(options?: {
366
+ readonly why?: string;
367
+ readonly dbUrl?: string;
368
+ }): CliStructuredError {
369
+ return new CliStructuredError('3001', 'Database not signed', {
370
+ domain: 'RUN',
371
+ why: options?.why ?? 'No database signature (marker) found',
372
+ fix: 'Run `prisma-next db sign --db <url>` to sign the database',
373
+ });
374
+ }
375
+
376
+ /**
377
+ * Contract hash does not match database marker.
378
+ */
379
+ export function errorHashMismatch(options?: {
380
+ readonly why?: string;
381
+ readonly expected?: string;
382
+ readonly actual?: string;
383
+ }): CliStructuredError {
384
+ return new CliStructuredError('3002', 'Hash mismatch', {
385
+ domain: 'RUN',
386
+ why: options?.why ?? 'Contract hash does not match database marker',
387
+ fix: 'Migrate database or re-sign if intentional',
388
+ ...(options?.expected || options?.actual
389
+ ? {
390
+ meta: {
391
+ ...(options.expected ? { expected: options.expected } : {}),
392
+ ...(options.actual ? { actual: options.actual } : {}),
393
+ },
394
+ }
395
+ : {}),
396
+ });
397
+ }
398
+
399
+ /**
400
+ * Contract target does not match config target.
401
+ */
402
+ export function errorTargetMismatch(
403
+ expected: string,
404
+ actual: string,
405
+ options?: {
406
+ readonly why?: string;
407
+ },
408
+ ): CliStructuredError {
409
+ return new CliStructuredError('3003', 'Target mismatch', {
410
+ domain: 'RUN',
411
+ why:
412
+ options?.why ??
413
+ `Contract target does not match config target (expected: ${expected}, actual: ${actual})`,
414
+ fix: 'Align contract target and config target',
415
+ meta: { expected, actual },
416
+ });
417
+ }
418
+
419
+ /**
420
+ * Database marker is required but not found.
421
+ * Used by commands that require a pre-existing marker as a precondition.
422
+ */
423
+ export function errorMarkerRequired(options?: {
424
+ readonly why?: string;
425
+ readonly fix?: string;
426
+ }): CliStructuredError {
427
+ return new CliStructuredError('3010', 'Database must be signed first', {
428
+ domain: 'RUN',
429
+ why: options?.why ?? 'No database signature (marker) found',
430
+ fix: options?.fix ?? 'Run `prisma-next db init` first to sign the database',
431
+ });
432
+ }
433
+
434
+ /**
435
+ * Schema verification found mismatches between the database and the contract.
436
+ * The full verification tree is preserved in `meta.verificationResult`.
437
+ */
438
+ export function errorSchemaVerificationFailed(options: {
439
+ readonly summary: string;
440
+ readonly verificationResult: VerifyDatabaseSchemaResult;
441
+ readonly issues?: readonly SchemaIssue[];
442
+ }): CliStructuredError {
443
+ return new CliStructuredError('3004', options.summary, {
444
+ domain: 'RUN',
445
+ why: 'Database schema does not satisfy the contract',
446
+ fix: 'Run `prisma-next db update` to reconcile, or adjust your contract to match the database',
447
+ meta: {
448
+ verificationResult: options.verificationResult,
449
+ ...ifDefined('issues', options.issues),
450
+ },
451
+ });
452
+ }
453
+
454
+ /**
455
+ * Migration runner failed during execution.
456
+ */
457
+ export function errorRunnerFailed(
458
+ summary: string,
459
+ options?: {
460
+ readonly why?: string;
461
+ readonly fix?: string;
462
+ readonly meta?: Record<string, unknown>;
463
+ },
464
+ ): CliStructuredError {
465
+ return new CliStructuredError('3020', summary, {
466
+ domain: 'RUN',
467
+ why: options?.why ?? 'Migration runner failed',
468
+ fix: options?.fix ?? 'Inspect the reported conflict and reconcile schema drift',
469
+ ...(options?.meta ? { meta: options.meta } : {}),
470
+ });
471
+ }
472
+
473
+ /** Error code for destructive changes that require explicit confirmation. */
474
+ export const ERROR_CODE_DESTRUCTIVE_CHANGES = '3030';
475
+
476
+ /**
477
+ * Destructive operations require explicit confirmation via -y/--yes.
478
+ */
479
+ export function errorDestructiveChanges(
480
+ summary: string,
481
+ options?: {
482
+ readonly why?: string;
483
+ readonly fix?: string;
484
+ readonly meta?: Record<string, unknown>;
485
+ },
486
+ ): CliStructuredError {
487
+ return new CliStructuredError(ERROR_CODE_DESTRUCTIVE_CHANGES, summary, {
488
+ domain: 'RUN',
489
+ why: options?.why ?? 'Planned operations include destructive changes that require confirmation',
490
+ fix: options?.fix ?? 'Re-run with `-y` to apply, or use `--dry-run` to preview first',
491
+ ...(options?.meta ? { meta: options.meta } : {}),
492
+ });
493
+ }
494
+
495
+ /**
496
+ * Generic runtime error.
497
+ */
498
+ export function errorRuntime(
499
+ summary: string,
500
+ options?: {
501
+ readonly why?: string;
502
+ readonly fix?: string;
503
+ readonly meta?: Record<string, unknown>;
504
+ },
505
+ ): CliStructuredError {
506
+ return new CliStructuredError('3000', summary, {
507
+ domain: 'RUN',
508
+ ...(options?.why ? { why: options.why } : { why: 'Verification failed' }),
509
+ ...(options?.fix ? { fix: options.fix } : { fix: 'Check contract and database state' }),
510
+ ...(options?.meta ? { meta: options.meta } : {}),
511
+ });
512
+ }
513
+
514
+ // ============================================================================
515
+ // Generic Error
516
+ // ============================================================================
517
+
518
+ /**
519
+ * Generic unexpected error.
520
+ */
521
+ export function errorUnexpected(
522
+ message: string,
523
+ options?: {
524
+ readonly why?: string;
525
+ readonly fix?: string;
526
+ },
527
+ ): CliStructuredError {
528
+ return new CliStructuredError('4999', 'Unexpected error', {
529
+ domain: 'CLI',
530
+ why: options?.why ?? message,
531
+ fix: options?.fix ?? 'Check the error message and try again',
532
+ });
533
+ }
@@ -0,0 +1 @@
1
+ export { EMPTY_CONTRACT_HASH } from '../constants';
@@ -0,0 +1,6 @@
1
+ // Export emission functions and types
2
+
3
+ export { canonicalizeContract } from '../emission/canonicalization';
4
+ export { emit } from '../emission/emit';
5
+ export { computeExecutionHash, computeProfileHash, computeStorageHash } from '../emission/hashing';
6
+ export type { EmitOptions, EmitResult } from '../emission/types';
@@ -0,0 +1,27 @@
1
+ export type { CliErrorConflict, CliErrorEnvelope } from '../errors';
2
+ export {
3
+ CliStructuredError,
4
+ ERROR_CODE_DESTRUCTIVE_CHANGES,
5
+ errorConfigFileNotFound,
6
+ errorConfigValidation,
7
+ errorContractConfigMissing,
8
+ errorContractMissingExtensionPacks,
9
+ errorContractValidationFailed,
10
+ errorDatabaseConnectionRequired,
11
+ errorDestructiveChanges,
12
+ errorDriverRequired,
13
+ errorFamilyReadMarkerSqlRequired,
14
+ errorFileNotFound,
15
+ errorHashMismatch,
16
+ errorJsonFormatNotSupported,
17
+ errorMarkerMissing,
18
+ errorMarkerRequired,
19
+ errorMigrationPlanningFailed,
20
+ errorQueryRunnerFactoryRequired,
21
+ errorRunnerFailed,
22
+ errorRuntime,
23
+ errorSchemaVerificationFailed,
24
+ errorTargetMigrationNotSupported,
25
+ errorTargetMismatch,
26
+ errorUnexpected,
27
+ } from '../errors';
@@ -0,0 +1 @@
1
+ export type { CoreSchemaView, SchemaNodeKind, SchemaTreeNode } from '../schema-view';
@@ -0,0 +1 @@
1
+ export { createControlPlaneStack } from '../stack';
@@ -0,0 +1,38 @@
1
+ export type {
2
+ // Control* types (ADR 151)
3
+ ControlAdapterDescriptor,
4
+ ControlAdapterInstance,
5
+ ControlDriverDescriptor,
6
+ ControlDriverInstance,
7
+ ControlExtensionDescriptor,
8
+ ControlExtensionInstance,
9
+ ControlFamilyDescriptor,
10
+ ControlFamilyInstance,
11
+ ControlPlaneStack,
12
+ ControlTargetDescriptor,
13
+ ControlTargetInstance,
14
+ EmitContractResult,
15
+ IntrospectSchemaResult,
16
+ // Migration types (canonical, family-agnostic)
17
+ MigrationOperationClass,
18
+ MigrationOperationPolicy,
19
+ MigrationPlan,
20
+ MigrationPlanner,
21
+ MigrationPlannerConflict,
22
+ MigrationPlannerFailureResult,
23
+ MigrationPlannerResult,
24
+ MigrationPlannerSuccessResult,
25
+ MigrationPlanOperation,
26
+ MigrationRunner,
27
+ MigrationRunnerExecutionChecks,
28
+ MigrationRunnerFailure,
29
+ MigrationRunnerResult,
30
+ MigrationRunnerSuccessValue,
31
+ OperationContext,
32
+ SchemaIssue,
33
+ SchemaVerificationNode,
34
+ SignDatabaseResult,
35
+ TargetMigrationsCapability,
36
+ VerifyDatabaseResult,
37
+ VerifyDatabaseSchemaResult,
38
+ } from '../types';