@prisma-next/core-control-plane 0.3.0-dev.54 → 0.3.0-dev.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,85 +1,36 @@
1
1
  # @prisma-next/core-control-plane
2
2
 
3
- Control plane domain actions, config types, validation, and error factories for Prisma Next.
3
+ Control-plane migration and emission primitives for Prisma Next.
4
4
 
5
5
  ## Overview
6
6
 
7
- This package provides the core domain logic for control plane operations (contract emission, database verification) without any file I/O or CLI awareness. It's part of the core layer and can be used programmatically or by the CLI layer.
7
+ This package provides control-plane building blocks consumed by CLI/tooling and target-family packages:
8
8
 
9
- ## Responsibilities
10
-
11
- - **Config Types**: Type definitions for Prisma Next configuration (`PrismaNextConfig`, `ControlFamilyDescriptor`, `ControlTargetDescriptor`, `ControlAdapterDescriptor`, `ControlDriverDescriptor`, `ControlExtensionDescriptor`)
12
- - **ControlPlaneStack**: A struct bundling `target`, `adapter`, `driver`, and `extensionPacks` for control plane operations. Use `createControlPlaneStack()` to construct with sensible defaults.
13
- - **Config Validation**: Pure validation logic for config structure (no file I/O)
14
- - **Config Normalization**: `defineConfig()` function for normalizing config with defaults
15
- - **Domain Actions**:
16
- - `verifyDatabase()`: Verifies database contract markers (accepts config object and ContractIR)
17
-
18
- Note: Contract emission is implemented on the SQL family instance (e.g., `familyInstance.emitContract()`), not as a core domain action.
19
- - **Error Factories**: Domain error factories (`CliStructuredError`, config errors, runtime errors)
20
- - **Pack Manifest Types**: Type definitions for extension pack manifests
21
- - **Migration SPI**: Generic migration planner/runner interfaces (`MigrationPlanner<TFamilyId, TTargetId>`, `MigrationRunner<TFamilyId, TTargetId>`, `TargetMigrationsCapability<TFamilyId, TTargetId, TFamilyInstance>`) that thread family/target IDs for compile-time component compatibility enforcement
22
- - `MigrationRunnerFailure` includes optional `meta` for structured debugging context (e.g., schema issues, SQL state)
23
-
24
- ## Dependencies
25
-
26
- - **Depends on**:
27
- - `@prisma-next/contract` - ContractIR types
28
- - `@prisma-next/emitter` - TargetFamilyHook, emit function
29
- - `@prisma-next/operations` - OperationRegistry
30
- - `arktype` - Validation
31
-
32
- - **Depended on by**:
33
- - `@prisma-next/cli` - CLI layer uses domain actions
34
-
35
- ## Architecture
36
-
37
- ```mermaid
38
- flowchart TD
39
- subgraph "Core Layer"
40
- CCP[@prisma-next/core-control-plane]
41
- end
9
+ - migration/result interfaces and control-plane component types
10
+ - stack composition helper (`createControlPlaneStack`)
11
+ - schema-view interfaces
12
+ - contract emission/hash helpers
13
+ - structured error utilities used by CLI output mapping
42
14
 
43
- subgraph "Tooling Layer"
44
- CLI[@prisma-next/cli]
45
- end
15
+ ## Responsibilities
46
16
 
47
- CLI -->|uses| CCP
48
- ```
17
+ - **Control stack and component contracts**: stack composition and migration-facing descriptor/instance types
18
+ - **Migration SPI**: planner/runner/capability interfaces that thread family/target IDs through control flows
19
+ - **Emission helpers**: canonicalization/hash utilities and emit result shaping
20
+ - **Structured errors**: CLI/runtime envelope-compatible error factories
49
21
 
50
22
  ## Usage
51
23
 
52
- ### Config Types and Validation
53
-
54
- ```typescript
55
- import { defineConfig, validateConfig, type PrismaNextConfig } from '@prisma-next/core-control-plane/config-types';
56
- import { validateConfig } from '@prisma-next/core-control-plane/config-validation';
57
-
58
- // Define and normalize config
59
- const config = defineConfig({
60
- family: sqlFamilyDescriptor,
61
- target: postgresTargetDescriptor,
62
- adapter: postgresAdapterDescriptor,
63
- contract: {
64
- source: contractBuilder, // TS-first value/loader
65
- // source: { kind: 'psl', schemaPath: './schema.prisma' }, // PSL-first
66
- output: 'src/prisma/contract.json',
67
- },
68
- });
24
+ Config authoring types and validation now live in `@prisma-next/config`:
69
25
 
70
- // Validate config structure (pure validation, no file I/O)
71
- validateConfig(config);
72
- ```
73
-
74
- `contract.source` supports:
75
- - direct values and sync/async loader functions (TS-first)
76
- - `{ kind: 'psl', schemaPath: string }` (PSL-first, requires non-empty `schemaPath`)
26
+ - `@prisma-next/config/config-types`
27
+ - `@prisma-next/config/config-validation`
77
28
 
78
29
  ### ControlPlaneStack
79
30
 
80
31
  The `ControlPlaneStack` bundles component descriptors for control plane operations (creating family instances, running CLI commands, connecting to databases):
81
32
 
82
- ```typescript
33
+ ```ts
83
34
  import { createControlPlaneStack } from '@prisma-next/core-control-plane/stack';
84
35
  import type { ControlPlaneStack } from '@prisma-next/core-control-plane/types';
85
36
 
@@ -97,36 +48,9 @@ const familyInstance = config.family.create(stack);
97
48
  // Stack is also used internally by ControlClient and CLI commands
98
49
  ```
99
50
 
100
- **Stack shape after construction:**
101
- - `target`: Required target descriptor
102
- - `adapter`: Required adapter descriptor
103
- - `driver`: `ControlDriverDescriptor | undefined` (always present, may be `undefined`)
104
- - `extensionPacks`: `readonly ControlExtensionDescriptor[]` (always an array, possibly empty)
105
-
106
- ### Verify Database
107
-
108
- ```typescript
109
- import { verifyDatabase } from '@prisma-next/core-control-plane/verify-database';
110
-
111
- // Verify database - accepts config object and ContractIR (no file loading)
112
- const result = await verifyDatabase({
113
- config: loadedConfig,
114
- contractIR: parsedContract,
115
- dbUrl: connectionString,
116
- contractPath: 'src/prisma/contract.json',
117
- configPath: 'prisma-next.config.ts',
118
- });
119
-
120
- if (result.ok) {
121
- console.log('Database matches contract');
122
- } else {
123
- console.error(`Verification failed: ${result.summary}`);
124
- }
125
- ```
126
-
127
51
  ### Error Factories
128
52
 
129
- ```typescript
53
+ ```ts
130
54
  import {
131
55
  errorConfigFileNotFound,
132
56
  errorMarkerMissing,
@@ -138,30 +62,6 @@ throw errorConfigFileNotFound('prisma-next.config.ts', {
138
62
  });
139
63
  ```
140
64
 
141
- ## Migration SPI Design
142
-
143
- The migration planner/runner interfaces are generic over `TFamilyId` and `TTargetId` to enable compile-time enforcement of component compatibility:
144
-
145
- - **`MigrationPlanner<TFamilyId, TTargetId>`**: Generic planner interface that accepts `TargetBoundComponentDescriptor<TFamilyId, TTargetId>[]`
146
- - **`MigrationRunner<TFamilyId, TTargetId>`**: Generic runner interface that accepts `TargetBoundComponentDescriptor<TFamilyId, TTargetId>[]`
147
- - **`TargetMigrationsCapability<TFamilyId, TTargetId, TFamilyInstance>`**: Generic capability interface for targets that support migrations
148
-
149
- The CLI performs runtime validation at the composition boundary using `assertFrameworkComponentsCompatible()` before calling typed planner/runner instances. This validates that all components have matching `familyId` and `targetId`, then returns a typed `TargetBoundComponentDescriptor` array that satisfies the planner/runner interface requirements.
150
-
151
- ```typescript
152
- // CLI composition boundary - runtime assertion + type narrowing
153
- const rawComponents = [config.target, config.adapter, ...(config.extensionPacks ?? [])];
154
- const frameworkComponents = assertFrameworkComponentsCompatible(
155
- config.family.familyId,
156
- config.target.targetId,
157
- rawComponents,
158
- );
159
-
160
- // Now frameworkComponents is typed as TargetBoundComponentDescriptor<TFamilyId, TTargetId>[]
161
- const planner = target.migrations.createPlanner(sqlFamilyInstance);
162
- planner.plan({ contract, schema, policy, frameworkComponents });
163
- ```
164
-
165
65
  ## Package Location
166
66
 
167
67
  This package is part of the **framework domain**, **core layer**, **migration plane**:
@@ -174,5 +74,3 @@ This package is part of the **framework domain**, **core layer**, **migration pl
174
74
 
175
75
  - [Package Layering](../../../../docs/architecture docs/Package-Layering.md)
176
76
  - [ADR 140 - Package Layering & Target-Family Namespacing](../../../../docs/architecture docs/adrs/ADR 140 - Package Layering & Target-Family Namespacing.md)
177
-
178
-
package/dist/emission.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { type } from "arktype";
2
1
  import { bigintJsonReplacer } from "@prisma-next/contract/types";
3
2
  import { isArrayEqual } from "@prisma-next/utils/array-equal";
4
3
  import { ifDefined } from "@prisma-next/utils/defined";
4
+ import { type } from "arktype";
5
5
  import { format } from "prettier";
6
6
  import { createHash } from "node:crypto";
7
7
 
package/dist/errors.mjs CHANGED
@@ -1,3 +1,310 @@
1
- import { S as errorUnexpected, _ as errorQueryRunnerFactoryRequired, a as errorContractMissingExtensionPacks, b as errorTargetMigrationNotSupported, c as errorDestructiveChanges, d as errorFileNotFound, f as errorHashMismatch, g as errorMigrationPlanningFailed, h as errorMarkerRequired, i as errorContractConfigMissing, l as errorDriverRequired, m as errorMarkerMissing, n as errorConfigFileNotFound, o as errorContractValidationFailed, p as errorJsonFormatNotSupported, r as errorConfigValidation, s as errorDatabaseConnectionRequired, t as CliStructuredError, u as errorFamilyReadMarkerSqlRequired, v as errorRunnerFailed, x as errorTargetMismatch, y as errorRuntime } from "./errors-CvuQhtGp.mjs";
1
+ //#region src/errors.ts
2
+ /**
3
+ * Structured CLI error that contains all information needed for error envelopes.
4
+ * Call sites throw these errors with full context.
5
+ */
6
+ var CliStructuredError = class extends Error {
7
+ code;
8
+ domain;
9
+ severity;
10
+ why;
11
+ fix;
12
+ where;
13
+ meta;
14
+ docsUrl;
15
+ constructor(code, summary, options) {
16
+ super(summary);
17
+ this.name = "CliStructuredError";
18
+ this.code = code;
19
+ this.domain = options?.domain ?? "CLI";
20
+ this.severity = options?.severity ?? "error";
21
+ this.why = options?.why;
22
+ this.fix = options?.fix === options?.why ? void 0 : options?.fix;
23
+ this.where = options?.where ? {
24
+ path: options.where.path,
25
+ line: options.where.line
26
+ } : void 0;
27
+ this.meta = options?.meta;
28
+ this.docsUrl = options?.docsUrl;
29
+ }
30
+ /**
31
+ * Converts this error to a CLI error envelope for output formatting.
32
+ */
33
+ toEnvelope() {
34
+ return {
35
+ ok: false,
36
+ code: `${this.domain === "CLI" ? "PN-CLI-" : "PN-RTM-"}${this.code}`,
37
+ domain: this.domain,
38
+ severity: this.severity,
39
+ summary: this.message,
40
+ why: this.why,
41
+ fix: this.fix,
42
+ where: this.where,
43
+ meta: this.meta,
44
+ docsUrl: this.docsUrl
45
+ };
46
+ }
47
+ /**
48
+ * Type guard to check if an error is a CliStructuredError.
49
+ * Uses duck-typing to work across module boundaries where instanceof may fail.
50
+ */
51
+ static is(error) {
52
+ if (!(error instanceof Error)) return false;
53
+ const candidate = error;
54
+ return candidate.name === "CliStructuredError" && typeof candidate.code === "string" && (candidate.domain === "CLI" || candidate.domain === "RTM") && typeof candidate.toEnvelope === "function";
55
+ }
56
+ };
57
+ /**
58
+ * Config file not found or missing.
59
+ */
60
+ function errorConfigFileNotFound(configPath, options) {
61
+ return new CliStructuredError("4001", "Config file not found", {
62
+ domain: "CLI",
63
+ ...options?.why ? { why: options.why } : { why: "Config file not found" },
64
+ fix: "Run 'prisma-next init' to create a config file",
65
+ docsUrl: "https://prisma-next.dev/docs/cli/config",
66
+ ...configPath ? { where: { path: configPath } } : {}
67
+ });
68
+ }
69
+ /**
70
+ * Contract configuration missing from config.
71
+ */
72
+ function errorContractConfigMissing(options) {
73
+ return new CliStructuredError("4002", "Contract configuration missing", {
74
+ domain: "CLI",
75
+ why: options?.why ?? "The contract configuration is required for emit",
76
+ fix: "Add contract configuration to your prisma-next.config.ts",
77
+ docsUrl: "https://prisma-next.dev/docs/cli/contract-emit"
78
+ });
79
+ }
80
+ /**
81
+ * Contract validation failed.
82
+ */
83
+ function errorContractValidationFailed(reason, options) {
84
+ return new CliStructuredError("4003", "Contract validation failed", {
85
+ domain: "CLI",
86
+ why: reason,
87
+ fix: "Re-run `prisma-next contract emit`, or fix the contract file and try again",
88
+ docsUrl: "https://prisma-next.dev/docs/contracts",
89
+ ...options?.where ? { where: options.where } : {}
90
+ });
91
+ }
92
+ /**
93
+ * File not found.
94
+ */
95
+ function errorFileNotFound(filePath, options) {
96
+ return new CliStructuredError("4004", "File not found", {
97
+ domain: "CLI",
98
+ why: options?.why ?? `File not found: ${filePath}`,
99
+ fix: options?.fix ?? "Check that the file path is correct",
100
+ where: { path: filePath },
101
+ ...options?.docsUrl ? { docsUrl: options.docsUrl } : {}
102
+ });
103
+ }
104
+ /**
105
+ * Database connection is required but not provided.
106
+ */
107
+ function errorDatabaseConnectionRequired(options) {
108
+ return new CliStructuredError("4005", "Database connection is required", {
109
+ domain: "CLI",
110
+ why: options?.why ?? "Database connection is required for this command",
111
+ fix: "Provide `--db <url>` or set `db: { connection: \"postgres://…\" }` in prisma-next.config.ts"
112
+ });
113
+ }
114
+ /**
115
+ * Query runner factory is required but not provided in config.
116
+ */
117
+ function errorQueryRunnerFactoryRequired(options) {
118
+ return new CliStructuredError("4006", "Query runner factory is required", {
119
+ domain: "CLI",
120
+ why: options?.why ?? "Config.db.queryRunnerFactory is required for db verify",
121
+ fix: "Add db.queryRunnerFactory to prisma-next.config.ts",
122
+ docsUrl: "https://prisma-next.dev/docs/cli/db-verify"
123
+ });
124
+ }
125
+ /**
126
+ * Family verify.readMarker is required but not provided.
127
+ */
128
+ function errorFamilyReadMarkerSqlRequired(options) {
129
+ return new CliStructuredError("4007", "Family readMarker() is required", {
130
+ domain: "CLI",
131
+ why: options?.why ?? "Family verify.readMarker is required for db verify",
132
+ fix: "Ensure family.verify.readMarker() is exported by your family package",
133
+ docsUrl: "https://prisma-next.dev/docs/cli/db-verify"
134
+ });
135
+ }
136
+ /**
137
+ * JSON output format not supported.
138
+ */
139
+ function errorJsonFormatNotSupported(options) {
140
+ return new CliStructuredError("4008", "Unsupported JSON format", {
141
+ domain: "CLI",
142
+ why: `The ${options.command} command does not support --json ${options.format}`,
143
+ fix: `Use --json ${options.supportedFormats.join(" or ")}, or omit --json for human output`,
144
+ meta: {
145
+ command: options.command,
146
+ format: options.format,
147
+ supportedFormats: options.supportedFormats
148
+ }
149
+ });
150
+ }
151
+ /**
152
+ * Driver is required for DB-connected commands but not provided.
153
+ */
154
+ function errorDriverRequired(options) {
155
+ return new CliStructuredError("4010", "Driver is required for DB-connected commands", {
156
+ domain: "CLI",
157
+ why: options?.why ?? "Config.driver is required for DB-connected commands",
158
+ fix: "Add a control-plane driver to prisma-next.config.ts (e.g. import a driver descriptor and set `driver: postgresDriver`)",
159
+ docsUrl: "https://prisma-next.dev/docs/cli/config"
160
+ });
161
+ }
162
+ /**
163
+ * Contract requires extension packs that are not provided by config descriptors.
164
+ */
165
+ function errorContractMissingExtensionPacks(options) {
166
+ const missing = [...options.missingExtensionPacks].sort();
167
+ return new CliStructuredError("4011", "Missing extension packs in config", {
168
+ domain: "CLI",
169
+ why: missing.length === 1 ? `Contract requires extension pack '${missing[0]}', but CLI config does not provide a matching descriptor.` : `Contract requires extension packs ${missing.map((p) => `'${p}'`).join(", ")}, but CLI config does not provide matching descriptors.`,
170
+ fix: "Add the missing extension descriptors to `extensions` in prisma-next.config.ts",
171
+ docsUrl: "https://prisma-next.dev/docs/cli/config",
172
+ meta: {
173
+ missingExtensionPacks: missing,
174
+ providedComponentIds: [...options.providedComponentIds].sort()
175
+ }
176
+ });
177
+ }
178
+ /**
179
+ * Migration planning failed due to conflicts.
180
+ */
181
+ function errorMigrationPlanningFailed(options) {
182
+ const conflictSummaries = options.conflicts.map((c) => c.summary);
183
+ const computedWhy = options.why ?? conflictSummaries.join("\n");
184
+ const conflictFixes = options.conflicts.map((c) => c.why).filter((why) => typeof why === "string");
185
+ return new CliStructuredError("4020", "Migration planning failed", {
186
+ domain: "CLI",
187
+ why: computedWhy,
188
+ fix: conflictFixes.length > 0 ? conflictFixes.join("\n") : "Use `db schema-verify` to inspect conflicts, or ensure the database is empty",
189
+ meta: { conflicts: options.conflicts },
190
+ docsUrl: "https://prisma-next.dev/docs/cli/db-init"
191
+ });
192
+ }
193
+ /**
194
+ * Target does not support migrations (missing createPlanner/createRunner).
195
+ */
196
+ function errorTargetMigrationNotSupported(options) {
197
+ return new CliStructuredError("4021", "Target does not support migrations", {
198
+ domain: "CLI",
199
+ why: options?.why ?? "The configured target does not provide migration planner/runner",
200
+ fix: "Select a target that provides migrations (it must export `target.migrations` for db init)",
201
+ docsUrl: "https://prisma-next.dev/docs/cli/db-init"
202
+ });
203
+ }
204
+ /**
205
+ * Config validation error (missing required fields).
206
+ */
207
+ function errorConfigValidation(field, options) {
208
+ return new CliStructuredError("4009", "Config validation error", {
209
+ domain: "CLI",
210
+ why: options?.why ?? `Config must have a "${field}" field`,
211
+ fix: "Check your prisma-next.config.ts and ensure all required fields are provided",
212
+ docsUrl: "https://prisma-next.dev/docs/cli/config"
213
+ });
214
+ }
215
+ /**
216
+ * Contract marker not found in database.
217
+ */
218
+ function errorMarkerMissing(options) {
219
+ return new CliStructuredError("3001", "Database not signed", {
220
+ domain: "RTM",
221
+ why: options?.why ?? "No database signature (marker) found",
222
+ fix: "Run `prisma-next db sign --db <url>` to sign the database"
223
+ });
224
+ }
225
+ /**
226
+ * Contract hash does not match database marker.
227
+ */
228
+ function errorHashMismatch(options) {
229
+ return new CliStructuredError("3002", "Hash mismatch", {
230
+ domain: "RTM",
231
+ why: options?.why ?? "Contract hash does not match database marker",
232
+ fix: "Migrate database or re-sign if intentional",
233
+ ...options?.expected || options?.actual ? { meta: {
234
+ ...options.expected ? { expected: options.expected } : {},
235
+ ...options.actual ? { actual: options.actual } : {}
236
+ } } : {}
237
+ });
238
+ }
239
+ /**
240
+ * Contract target does not match config target.
241
+ */
242
+ function errorTargetMismatch(expected, actual, options) {
243
+ return new CliStructuredError("3003", "Target mismatch", {
244
+ domain: "RTM",
245
+ why: options?.why ?? `Contract target does not match config target (expected: ${expected}, actual: ${actual})`,
246
+ fix: "Align contract target and config target",
247
+ meta: {
248
+ expected,
249
+ actual
250
+ }
251
+ });
252
+ }
253
+ /**
254
+ * Database marker is required but not found.
255
+ * Used by commands that require a pre-existing marker as a precondition.
256
+ */
257
+ function errorMarkerRequired(options) {
258
+ return new CliStructuredError("3010", "Database must be signed first", {
259
+ domain: "RTM",
260
+ why: options?.why ?? "No database signature (marker) found",
261
+ fix: options?.fix ?? "Run `prisma-next db init` first to sign the database"
262
+ });
263
+ }
264
+ /**
265
+ * Migration runner failed during execution.
266
+ */
267
+ function errorRunnerFailed(summary, options) {
268
+ return new CliStructuredError("3020", summary, {
269
+ domain: "RTM",
270
+ why: options?.why ?? "Migration runner failed",
271
+ fix: options?.fix ?? "Inspect the reported conflict and reconcile schema drift",
272
+ ...options?.meta ? { meta: options.meta } : {}
273
+ });
274
+ }
275
+ /**
276
+ * Destructive operations require explicit confirmation via --accept-data-loss.
277
+ */
278
+ function errorDestructiveChanges(summary, options) {
279
+ return new CliStructuredError("3030", summary, {
280
+ domain: "RTM",
281
+ why: options?.why ?? "Planned operations include destructive changes that require confirmation",
282
+ fix: options?.fix ?? "Use `--plan` to preview, then re-run with `--accept-data-loss`",
283
+ ...options?.meta ? { meta: options.meta } : {}
284
+ });
285
+ }
286
+ /**
287
+ * Generic runtime error.
288
+ */
289
+ function errorRuntime(summary, options) {
290
+ return new CliStructuredError("3000", summary, {
291
+ domain: "RTM",
292
+ ...options?.why ? { why: options.why } : { why: "Verification failed" },
293
+ ...options?.fix ? { fix: options.fix } : { fix: "Check contract and database state" },
294
+ ...options?.meta ? { meta: options.meta } : {}
295
+ });
296
+ }
297
+ /**
298
+ * Generic unexpected error.
299
+ */
300
+ function errorUnexpected(message, options) {
301
+ return new CliStructuredError("4999", "Unexpected error", {
302
+ domain: "CLI",
303
+ why: options?.why ?? message,
304
+ fix: options?.fix ?? "Check the error message and try again"
305
+ });
306
+ }
2
307
 
3
- export { CliStructuredError, errorConfigFileNotFound, errorConfigValidation, errorContractConfigMissing, errorContractMissingExtensionPacks, errorContractValidationFailed, errorDatabaseConnectionRequired, errorDestructiveChanges, errorDriverRequired, errorFamilyReadMarkerSqlRequired, errorFileNotFound, errorHashMismatch, errorJsonFormatNotSupported, errorMarkerMissing, errorMarkerRequired, errorMigrationPlanningFailed, errorQueryRunnerFactoryRequired, errorRunnerFailed, errorRuntime, errorTargetMigrationNotSupported, errorTargetMismatch, errorUnexpected };
308
+ //#endregion
309
+ export { CliStructuredError, errorConfigFileNotFound, errorConfigValidation, errorContractConfigMissing, errorContractMissingExtensionPacks, errorContractValidationFailed, errorDatabaseConnectionRequired, errorDestructiveChanges, errorDriverRequired, errorFamilyReadMarkerSqlRequired, errorFileNotFound, errorHashMismatch, errorJsonFormatNotSupported, errorMarkerMissing, errorMarkerRequired, errorMigrationPlanningFailed, errorQueryRunnerFactoryRequired, errorRunnerFailed, errorRuntime, errorTargetMigrationNotSupported, errorTargetMismatch, errorUnexpected };
310
+ //# sourceMappingURL=errors.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.mjs","names":[],"sources":["../src/errors.ts"],"sourcesContent":["/**\n * CLI error envelope for output formatting.\n * This is the serialized form of a CliStructuredError.\n */\nexport interface CliErrorEnvelope {\n readonly ok: false;\n readonly code: string;\n readonly domain: string;\n readonly severity: 'error' | 'warn' | 'info';\n readonly summary: string;\n readonly why: string | undefined;\n readonly fix: string | undefined;\n readonly where:\n | {\n readonly path: string | undefined;\n readonly line: number | undefined;\n }\n | undefined;\n readonly meta: Record<string, unknown> | undefined;\n readonly docsUrl: string | undefined;\n}\n\n/**\n * Minimal conflict data structure expected by CLI output.\n */\nexport interface CliErrorConflict {\n readonly kind: string;\n readonly summary: string;\n readonly why?: string;\n}\n\n/**\n * Structured CLI error that contains all information needed for error envelopes.\n * Call sites throw these errors with full context.\n */\nexport class CliStructuredError extends Error {\n readonly code: string;\n readonly domain: 'CLI' | 'RTM';\n readonly severity: 'error' | 'warn' | 'info';\n readonly why: string | undefined;\n readonly fix: string | undefined;\n readonly where:\n | {\n readonly path: string | undefined;\n readonly line: number | undefined;\n }\n | undefined;\n readonly meta: Record<string, unknown> | undefined;\n readonly docsUrl: string | undefined;\n\n constructor(\n code: string,\n summary: string,\n options?: {\n readonly domain?: 'CLI' | 'RTM';\n readonly severity?: 'error' | 'warn' | 'info';\n readonly why?: string;\n readonly fix?: string;\n readonly where?: { readonly path?: string; readonly line?: number };\n readonly meta?: Record<string, unknown>;\n readonly docsUrl?: string;\n },\n ) {\n super(summary);\n this.name = 'CliStructuredError';\n this.code = code;\n this.domain = options?.domain ?? 'CLI';\n this.severity = options?.severity ?? 'error';\n this.why = options?.why;\n this.fix = options?.fix === options?.why ? undefined : options?.fix;\n this.where = options?.where\n ? {\n path: options.where.path,\n line: options.where.line,\n }\n : undefined;\n this.meta = options?.meta;\n this.docsUrl = options?.docsUrl;\n }\n\n /**\n * Converts this error to a CLI error envelope for output formatting.\n */\n toEnvelope(): CliErrorEnvelope {\n const codePrefix = this.domain === 'CLI' ? 'PN-CLI-' : 'PN-RTM-';\n return {\n ok: false as const,\n code: `${codePrefix}${this.code}`,\n domain: this.domain,\n severity: this.severity,\n summary: this.message,\n why: this.why,\n fix: this.fix,\n where: this.where,\n meta: this.meta,\n docsUrl: this.docsUrl,\n };\n }\n\n /**\n * Type guard to check if an error is a CliStructuredError.\n * Uses duck-typing to work across module boundaries where instanceof may fail.\n */\n static is(error: unknown): error is CliStructuredError {\n if (!(error instanceof Error)) {\n return false;\n }\n const candidate = error as CliStructuredError;\n return (\n candidate.name === 'CliStructuredError' &&\n typeof candidate.code === 'string' &&\n (candidate.domain === 'CLI' || candidate.domain === 'RTM') &&\n typeof candidate.toEnvelope === 'function'\n );\n }\n}\n\n// ============================================================================\n// Config Errors (PN-CLI-4001-4007)\n// ============================================================================\n\n/**\n * Config file not found or missing.\n */\nexport function errorConfigFileNotFound(\n configPath?: string,\n options?: {\n readonly why?: string;\n },\n): CliStructuredError {\n return new CliStructuredError('4001', 'Config file not found', {\n domain: 'CLI',\n ...(options?.why ? { why: options.why } : { why: 'Config file not found' }),\n fix: \"Run 'prisma-next init' to create a config file\",\n docsUrl: 'https://prisma-next.dev/docs/cli/config',\n ...(configPath ? { where: { path: configPath } } : {}),\n });\n}\n\n/**\n * Contract configuration missing from config.\n */\nexport function errorContractConfigMissing(options?: {\n readonly why?: string;\n}): CliStructuredError {\n return new CliStructuredError('4002', 'Contract configuration missing', {\n domain: 'CLI',\n why: options?.why ?? 'The contract configuration is required for emit',\n fix: 'Add contract configuration to your prisma-next.config.ts',\n docsUrl: 'https://prisma-next.dev/docs/cli/contract-emit',\n });\n}\n\n/**\n * Contract validation failed.\n */\nexport function errorContractValidationFailed(\n reason: string,\n options?: {\n readonly where?: { readonly path?: string; readonly line?: number };\n },\n): CliStructuredError {\n return new CliStructuredError('4003', 'Contract validation failed', {\n domain: 'CLI',\n why: reason,\n fix: 'Re-run `prisma-next contract emit`, or fix the contract file and try again',\n docsUrl: 'https://prisma-next.dev/docs/contracts',\n ...(options?.where ? { where: options.where } : {}),\n });\n}\n\n/**\n * File not found.\n */\nexport function errorFileNotFound(\n filePath: string,\n options?: {\n readonly why?: string;\n readonly fix?: string;\n readonly docsUrl?: string;\n },\n): CliStructuredError {\n return new CliStructuredError('4004', 'File not found', {\n domain: 'CLI',\n why: options?.why ?? `File not found: ${filePath}`,\n fix: options?.fix ?? 'Check that the file path is correct',\n where: { path: filePath },\n ...(options?.docsUrl ? { docsUrl: options.docsUrl } : {}),\n });\n}\n\n/**\n * Database connection is required but not provided.\n */\nexport function errorDatabaseConnectionRequired(options?: {\n readonly why?: string;\n}): CliStructuredError {\n return new CliStructuredError('4005', 'Database connection is required', {\n domain: 'CLI',\n why: options?.why ?? 'Database connection is required for this command',\n fix: 'Provide `--db <url>` or set `db: { connection: \"postgres://…\" }` in prisma-next.config.ts',\n });\n}\n\n/**\n * Query runner factory is required but not provided in config.\n */\nexport function errorQueryRunnerFactoryRequired(options?: {\n readonly why?: string;\n}): CliStructuredError {\n return new CliStructuredError('4006', 'Query runner factory is required', {\n domain: 'CLI',\n why: options?.why ?? 'Config.db.queryRunnerFactory is required for db verify',\n fix: 'Add db.queryRunnerFactory to prisma-next.config.ts',\n docsUrl: 'https://prisma-next.dev/docs/cli/db-verify',\n });\n}\n\n/**\n * Family verify.readMarker is required but not provided.\n */\nexport function errorFamilyReadMarkerSqlRequired(options?: {\n readonly why?: string;\n}): CliStructuredError {\n return new CliStructuredError('4007', 'Family readMarker() is required', {\n domain: 'CLI',\n why: options?.why ?? 'Family verify.readMarker is required for db verify',\n fix: 'Ensure family.verify.readMarker() is exported by your family package',\n docsUrl: 'https://prisma-next.dev/docs/cli/db-verify',\n });\n}\n\n/**\n * JSON output format not supported.\n */\nexport function errorJsonFormatNotSupported(options: {\n readonly command: string;\n readonly format: string;\n readonly supportedFormats: readonly string[];\n}): CliStructuredError {\n return new CliStructuredError('4008', 'Unsupported JSON format', {\n domain: 'CLI',\n why: `The ${options.command} command does not support --json ${options.format}`,\n fix: `Use --json ${options.supportedFormats.join(' or ')}, or omit --json for human output`,\n meta: {\n command: options.command,\n format: options.format,\n supportedFormats: options.supportedFormats,\n },\n });\n}\n\n/**\n * Driver is required for DB-connected commands but not provided.\n */\nexport function errorDriverRequired(options?: { readonly why?: string }): CliStructuredError {\n return new CliStructuredError('4010', 'Driver is required for DB-connected commands', {\n domain: 'CLI',\n why: options?.why ?? 'Config.driver is required for DB-connected commands',\n fix: 'Add a control-plane driver to prisma-next.config.ts (e.g. import a driver descriptor and set `driver: postgresDriver`)',\n docsUrl: 'https://prisma-next.dev/docs/cli/config',\n });\n}\n\n/**\n * Contract requires extension packs that are not provided by config descriptors.\n */\nexport function errorContractMissingExtensionPacks(options: {\n readonly missingExtensionPacks: readonly string[];\n readonly providedComponentIds: readonly string[];\n}): CliStructuredError {\n const missing = [...options.missingExtensionPacks].sort();\n return new CliStructuredError('4011', 'Missing extension packs in config', {\n domain: 'CLI',\n why:\n missing.length === 1\n ? `Contract requires extension pack '${missing[0]}', but CLI config does not provide a matching descriptor.`\n : `Contract requires extension packs ${missing.map((p) => `'${p}'`).join(', ')}, but CLI config does not provide matching descriptors.`,\n fix: 'Add the missing extension descriptors to `extensions` in prisma-next.config.ts',\n docsUrl: 'https://prisma-next.dev/docs/cli/config',\n meta: {\n missingExtensionPacks: missing,\n providedComponentIds: [...options.providedComponentIds].sort(),\n },\n });\n}\n\n/**\n * Migration planning failed due to conflicts.\n */\nexport function errorMigrationPlanningFailed(options: {\n readonly conflicts: readonly CliErrorConflict[];\n readonly why?: string;\n}): CliStructuredError {\n // Build \"why\" from conflict summaries - these contain the actual problem description\n const conflictSummaries = options.conflicts.map((c) => c.summary);\n const computedWhy = options.why ?? conflictSummaries.join('\\n');\n\n // Build \"fix\" from conflict \"why\" fields - these contain actionable advice\n const conflictFixes = options.conflicts\n .map((c) => c.why)\n .filter((why): why is string => typeof why === 'string');\n const computedFix =\n conflictFixes.length > 0\n ? conflictFixes.join('\\n')\n : 'Use `db schema-verify` to inspect conflicts, or ensure the database is empty';\n\n return new CliStructuredError('4020', 'Migration planning failed', {\n domain: 'CLI',\n why: computedWhy,\n fix: computedFix,\n meta: { conflicts: options.conflicts },\n docsUrl: 'https://prisma-next.dev/docs/cli/db-init',\n });\n}\n\n/**\n * Target does not support migrations (missing createPlanner/createRunner).\n */\nexport function errorTargetMigrationNotSupported(options?: {\n readonly why?: string;\n}): CliStructuredError {\n return new CliStructuredError('4021', 'Target does not support migrations', {\n domain: 'CLI',\n why: options?.why ?? 'The configured target does not provide migration planner/runner',\n fix: 'Select a target that provides migrations (it must export `target.migrations` for db init)',\n docsUrl: 'https://prisma-next.dev/docs/cli/db-init',\n });\n}\n\n/**\n * Config validation error (missing required fields).\n */\nexport function errorConfigValidation(\n field: string,\n options?: {\n readonly why?: string;\n },\n): CliStructuredError {\n return new CliStructuredError('4009', 'Config validation error', {\n domain: 'CLI',\n why: options?.why ?? `Config must have a \"${field}\" field`,\n fix: 'Check your prisma-next.config.ts and ensure all required fields are provided',\n docsUrl: 'https://prisma-next.dev/docs/cli/config',\n });\n}\n\n// ============================================================================\n// Runtime Errors (PN-RTM-3000-3030)\n// ============================================================================\n\n/**\n * Contract marker not found in database.\n */\nexport function errorMarkerMissing(options?: {\n readonly why?: string;\n readonly dbUrl?: string;\n}): CliStructuredError {\n return new CliStructuredError('3001', 'Database not signed', {\n domain: 'RTM',\n why: options?.why ?? 'No database signature (marker) found',\n fix: 'Run `prisma-next db sign --db <url>` to sign the database',\n });\n}\n\n/**\n * Contract hash does not match database marker.\n */\nexport function errorHashMismatch(options?: {\n readonly why?: string;\n readonly expected?: string;\n readonly actual?: string;\n}): CliStructuredError {\n return new CliStructuredError('3002', 'Hash mismatch', {\n domain: 'RTM',\n why: options?.why ?? 'Contract hash does not match database marker',\n fix: 'Migrate database or re-sign if intentional',\n ...(options?.expected || options?.actual\n ? {\n meta: {\n ...(options.expected ? { expected: options.expected } : {}),\n ...(options.actual ? { actual: options.actual } : {}),\n },\n }\n : {}),\n });\n}\n\n/**\n * Contract target does not match config target.\n */\nexport function errorTargetMismatch(\n expected: string,\n actual: string,\n options?: {\n readonly why?: string;\n },\n): CliStructuredError {\n return new CliStructuredError('3003', 'Target mismatch', {\n domain: 'RTM',\n why:\n options?.why ??\n `Contract target does not match config target (expected: ${expected}, actual: ${actual})`,\n fix: 'Align contract target and config target',\n meta: { expected, actual },\n });\n}\n\n/**\n * Database marker is required but not found.\n * Used by commands that require a pre-existing marker as a precondition.\n */\nexport function errorMarkerRequired(options?: {\n readonly why?: string;\n readonly fix?: string;\n}): CliStructuredError {\n return new CliStructuredError('3010', 'Database must be signed first', {\n domain: 'RTM',\n why: options?.why ?? 'No database signature (marker) found',\n fix: options?.fix ?? 'Run `prisma-next db init` first to sign the database',\n });\n}\n\n/**\n * Migration runner failed during execution.\n */\nexport function errorRunnerFailed(\n summary: string,\n options?: {\n readonly why?: string;\n readonly fix?: string;\n readonly meta?: Record<string, unknown>;\n },\n): CliStructuredError {\n return new CliStructuredError('3020', summary, {\n domain: 'RTM',\n why: options?.why ?? 'Migration runner failed',\n fix: options?.fix ?? 'Inspect the reported conflict and reconcile schema drift',\n ...(options?.meta ? { meta: options.meta } : {}),\n });\n}\n\n/**\n * Destructive operations require explicit confirmation via --accept-data-loss.\n */\nexport function errorDestructiveChanges(\n summary: string,\n options?: {\n readonly why?: string;\n readonly fix?: string;\n readonly meta?: Record<string, unknown>;\n },\n): CliStructuredError {\n return new CliStructuredError('3030', summary, {\n domain: 'RTM',\n why: options?.why ?? 'Planned operations include destructive changes that require confirmation',\n fix: options?.fix ?? 'Use `--plan` to preview, then re-run with `--accept-data-loss`',\n ...(options?.meta ? { meta: options.meta } : {}),\n });\n}\n\n/**\n * Generic runtime error.\n */\nexport function errorRuntime(\n summary: string,\n options?: {\n readonly why?: string;\n readonly fix?: string;\n readonly meta?: Record<string, unknown>;\n },\n): CliStructuredError {\n return new CliStructuredError('3000', summary, {\n domain: 'RTM',\n ...(options?.why ? { why: options.why } : { why: 'Verification failed' }),\n ...(options?.fix ? { fix: options.fix } : { fix: 'Check contract and database state' }),\n ...(options?.meta ? { meta: options.meta } : {}),\n });\n}\n\n// ============================================================================\n// Generic Error\n// ============================================================================\n\n/**\n * Generic unexpected error.\n */\nexport function errorUnexpected(\n message: string,\n options?: {\n readonly why?: string;\n readonly fix?: string;\n },\n): CliStructuredError {\n return new CliStructuredError('4999', 'Unexpected error', {\n domain: 'CLI',\n why: options?.why ?? message,\n fix: options?.fix ?? 'Check the error message and try again',\n });\n}\n"],"mappings":";;;;;AAmCA,IAAa,qBAAb,cAAwC,MAAM;CAC5C,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAS;CAMT,AAAS;CACT,AAAS;CAET,YACE,MACA,SACA,SASA;AACA,QAAM,QAAQ;AACd,OAAK,OAAO;AACZ,OAAK,OAAO;AACZ,OAAK,SAAS,SAAS,UAAU;AACjC,OAAK,WAAW,SAAS,YAAY;AACrC,OAAK,MAAM,SAAS;AACpB,OAAK,MAAM,SAAS,QAAQ,SAAS,MAAM,SAAY,SAAS;AAChE,OAAK,QAAQ,SAAS,QAClB;GACE,MAAM,QAAQ,MAAM;GACpB,MAAM,QAAQ,MAAM;GACrB,GACD;AACJ,OAAK,OAAO,SAAS;AACrB,OAAK,UAAU,SAAS;;;;;CAM1B,aAA+B;AAE7B,SAAO;GACL,IAAI;GACJ,MAAM,GAHW,KAAK,WAAW,QAAQ,YAAY,YAG/B,KAAK;GAC3B,QAAQ,KAAK;GACb,UAAU,KAAK;GACf,SAAS,KAAK;GACd,KAAK,KAAK;GACV,KAAK,KAAK;GACV,OAAO,KAAK;GACZ,MAAM,KAAK;GACX,SAAS,KAAK;GACf;;;;;;CAOH,OAAO,GAAG,OAA6C;AACrD,MAAI,EAAE,iBAAiB,OACrB,QAAO;EAET,MAAM,YAAY;AAClB,SACE,UAAU,SAAS,wB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QAAQ;EACR,KAAK,SAAS,OAAO;EACrB,KAAK,SAAS,OAAO;EACtB,CAAC;;;;;AAMJ,SAAgB,kBACd,SACA,SAKoB;AACpB,QAAO,IAAI,mBAAmB,QAAQ,SAAS;EAC7C,QAAQ;EACR,KAAK,SAAS,OAAO;EACrB,KAAK,SAAS,OAAO;EACrB,GAAI,SAAS,OAAO,EAAE,MAAM,QAAQ,MAAM,GAAG,EAAE;EAChD,CAAC;;;;;AAMJ,SAAgB,wBACd,SACA,SAKoB;AACpB,QAAO,IAAI,mBAAmB,QAAQ,SAAS;EAC7C,QAAQ;EACR,KAAK,SAAS,OAAO;EACrB,KAAK,SAAS,OAAO;EACrB,GAAI,SAAS,OAAO,EAAE,MAAM,QAAQ,MAAM,GAAG,EAAE;EAChD,CAAC;;;;;AAMJ,SAAgB,aACd,SACA,SAKoB;AACpB,QAAO,IAAI,mBAAmB,QAAQ,SAAS;EAC7C,QAAQ;EACR,GAAI,SAAS,MAAM,EAAE,KAAK,QAAQ,KAAK,GAAG,EAAE,KAAK,uBAAuB;EACxE,GAAI,SAAS,MAAM,EAAE,KAAK,QAAQ,KAAK,GAAG,EAAE,KAAK,qCAAqC;EACtF,GAAI,SAAS,OAAO,EAAE,MAAM,QAAQ,MAAM,GAAG,EAAE;EAChD,CAAC;;;;;AAUJ,SAAgB,gBACd,SACA,SAIoB;AACpB,QAAO,IAAI,mBAAmB,QAAQ,oBAAoB;EACxD,QAAQ;EACR,KAAK,SAAS,OAAO;EACrB,KAAK,SAAS,OAAO;EACtB,CAAC"}
@@ -86,4 +86,4 @@ interface CoreSchemaView {
86
86
  }
87
87
  //#endregion
88
88
  export { SchemaNodeKind as n, SchemaTreeNode as r, CoreSchemaView as t };
89
- //# sourceMappingURL=schema-view-D9u47nc8.d.mts.map
89
+ //# sourceMappingURL=schema-view-sm_lz9f5.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema-view-D9u47nc8.d.mts","names":[],"sources":["../src/schema-view.ts"],"sourcesContent":[],"mappings":";;AAmEA;AAaA;;;;;AAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAzBY,cAAA;;;;;UAaK,cAAA;iBACA;;;kBAGC;+BACa;;;;;;UAOd,cAAA;iBACA"}
1
+ {"version":3,"file":"schema-view-sm_lz9f5.d.mts","names":[],"sources":["../src/schema-view.ts"],"sourcesContent":[],"mappings":";;AAmEA;AAaA;;;;;AAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAzBY,cAAA;;;;;UAaK,cAAA;iBACA;;;kBAGC;+BACa;;;;;;UAOd,cAAA;iBACA"}
@@ -1,2 +1,2 @@
1
- import { n as SchemaNodeKind, r as SchemaTreeNode, t as CoreSchemaView } from "./schema-view-D9u47nc8.mjs";
1
+ import { n as SchemaNodeKind, r as SchemaTreeNode, t as CoreSchemaView } from "./schema-view-sm_lz9f5.mjs";
2
2
  export { type CoreSchemaView, type SchemaNodeKind, type SchemaTreeNode };
package/dist/stack.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as ControlExtensionDescriptor, l as ControlPlaneStack, r as ControlDriverDescriptor, t as ControlAdapterDescriptor, u as ControlTargetDescriptor } from "./types-DWZxwNKq.mjs";
1
+ import { a as ControlExtensionDescriptor, l as ControlPlaneStack, r as ControlDriverDescriptor, t as ControlAdapterDescriptor, u as ControlTargetDescriptor } from "./types-vfrpOolc.mjs";
2
2
 
3
3
  //#region src/stack.d.ts
4
4
 
@@ -1,8 +1,8 @@
1
- import { t as CoreSchemaView } from "./schema-view-D9u47nc8.mjs";
1
+ import { t as CoreSchemaView } from "./schema-view-sm_lz9f5.mjs";
2
2
  import { ContractMarkerRecord, TargetFamilyHook } from "@prisma-next/contract/types";
3
3
  import { ContractIR } from "@prisma-next/contract/ir";
4
- import { Result } from "@prisma-next/utils/result";
5
4
  import { AdapterDescriptor, AdapterInstance, DriverDescriptor, DriverInstance, ExtensionDescriptor, ExtensionInstance, FamilyDescriptor, FamilyInstance, TargetBoundComponentDescriptor, TargetDescriptor, TargetInstance } from "@prisma-next/contract/framework-components";
5
+ import { Result } from "@prisma-next/utils/result";
6
6
 
7
7
  //#region src/migrations.d.ts
8
8
 
@@ -602,4 +602,4 @@ interface SignDatabaseResult {
602
602
  }
603
603
  //#endregion
604
604
  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 };
605
- //# sourceMappingURL=types-DWZxwNKq.d.mts.map
605
+ //# sourceMappingURL=types-vfrpOolc.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-DWZxwNKq.d.mts","names":[],"sources":["../src/migrations.ts","../src/types.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAsGA;AAQA;AASA;AAQA;AAcA;;AAAwE,KApH5D,uBAAA,GAoH4D,UAAA,GAAA,UAAA,GAAA,aAAA;;;AAUxE;AA6BiB,UAtJA,wBAAA,CAsJgB;EAOZ,SAAA,uBAAA,EAAA,SA5JwB,uBA4JxB,EAAA;;;;;;AASO,UA1JX,sBAAA,CA0JW;EAUX;EAKE,SAAA,EAAA,EAAA,MAAA;EACwB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;;;8BAaa;mBACX;;;;;;;;;;;;;;;;;;;;UAqBF,kBAAA;;;;;;;;;;;;;UAcA;;;;;;;mBAOE;;;;;;;;;;;;;UAcF,kBAAA"}
package/dist/types.d.mts CHANGED
@@ -1,2 +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-DWZxwNKq.mjs";
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-vfrpOolc.mjs";
2
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 };