@prisma-next/family-sql 0.3.0-pr.93.4 → 0.3.0-pr.94.1

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 (85) hide show
  1. package/dist/control-adapter.d.mts +47 -0
  2. package/dist/control-adapter.d.mts.map +1 -0
  3. package/dist/control-adapter.mjs +1 -0
  4. package/dist/control.d.mts +65 -0
  5. package/dist/control.d.mts.map +1 -0
  6. package/dist/control.mjs +136 -0
  7. package/dist/control.mjs.map +1 -0
  8. package/dist/instance-B_PdDN4y.mjs +525 -0
  9. package/dist/instance-B_PdDN4y.mjs.map +1 -0
  10. package/dist/instance-wm4TrZN0.d.mts +130 -0
  11. package/dist/instance-wm4TrZN0.d.mts.map +1 -0
  12. package/dist/runtime.d.mts +70 -0
  13. package/dist/runtime.d.mts.map +1 -0
  14. package/dist/runtime.mjs +74 -0
  15. package/dist/runtime.mjs.map +1 -0
  16. package/dist/schema-verify.d.mts +85 -0
  17. package/dist/schema-verify.d.mts.map +1 -0
  18. package/dist/schema-verify.mjs +3 -0
  19. package/dist/test-utils.d.mts +31 -0
  20. package/dist/test-utils.d.mts.map +1 -0
  21. package/dist/test-utils.mjs +5 -0
  22. package/dist/types-D5CPT9N4.d.mts +270 -0
  23. package/dist/types-D5CPT9N4.d.mts.map +1 -0
  24. package/dist/verify-DhFytkFC.mjs +108 -0
  25. package/dist/verify-DhFytkFC.mjs.map +1 -0
  26. package/dist/verify-sql-schema-BnLVoeWI.mjs +686 -0
  27. package/dist/verify-sql-schema-BnLVoeWI.mjs.map +1 -0
  28. package/dist/verify.d.mts +31 -0
  29. package/dist/verify.d.mts.map +1 -0
  30. package/dist/verify.mjs +3 -0
  31. package/package.json +30 -43
  32. package/dist/chunk-F27CR6XZ.js +0 -589
  33. package/dist/chunk-F27CR6XZ.js.map +0 -1
  34. package/dist/chunk-SU7LN2UH.js +0 -96
  35. package/dist/chunk-SU7LN2UH.js.map +0 -1
  36. package/dist/chunk-XH2Y5NTD.js +0 -715
  37. package/dist/chunk-XH2Y5NTD.js.map +0 -1
  38. package/dist/core/assembly.d.ts +0 -25
  39. package/dist/core/assembly.d.ts.map +0 -1
  40. package/dist/core/control-adapter.d.ts +0 -42
  41. package/dist/core/control-adapter.d.ts.map +0 -1
  42. package/dist/core/descriptor.d.ts +0 -24
  43. package/dist/core/descriptor.d.ts.map +0 -1
  44. package/dist/core/instance.d.ts +0 -140
  45. package/dist/core/instance.d.ts.map +0 -1
  46. package/dist/core/migrations/plan-helpers.d.ts +0 -20
  47. package/dist/core/migrations/plan-helpers.d.ts.map +0 -1
  48. package/dist/core/migrations/policies.d.ts +0 -6
  49. package/dist/core/migrations/policies.d.ts.map +0 -1
  50. package/dist/core/migrations/types.d.ts +0 -280
  51. package/dist/core/migrations/types.d.ts.map +0 -1
  52. package/dist/core/runtime-descriptor.d.ts +0 -19
  53. package/dist/core/runtime-descriptor.d.ts.map +0 -1
  54. package/dist/core/runtime-instance.d.ts +0 -54
  55. package/dist/core/runtime-instance.d.ts.map +0 -1
  56. package/dist/core/schema-verify/verify-helpers.d.ts +0 -96
  57. package/dist/core/schema-verify/verify-helpers.d.ts.map +0 -1
  58. package/dist/core/schema-verify/verify-sql-schema.d.ts +0 -45
  59. package/dist/core/schema-verify/verify-sql-schema.d.ts.map +0 -1
  60. package/dist/core/verify.d.ts +0 -39
  61. package/dist/core/verify.d.ts.map +0 -1
  62. package/dist/exports/control-adapter.d.ts +0 -2
  63. package/dist/exports/control-adapter.d.ts.map +0 -1
  64. package/dist/exports/control-adapter.js +0 -1
  65. package/dist/exports/control-adapter.js.map +0 -1
  66. package/dist/exports/control.d.ts +0 -13
  67. package/dist/exports/control.d.ts.map +0 -1
  68. package/dist/exports/control.js +0 -149
  69. package/dist/exports/control.js.map +0 -1
  70. package/dist/exports/runtime.d.ts +0 -8
  71. package/dist/exports/runtime.d.ts.map +0 -1
  72. package/dist/exports/runtime.js +0 -64
  73. package/dist/exports/runtime.js.map +0 -1
  74. package/dist/exports/schema-verify.d.ts +0 -11
  75. package/dist/exports/schema-verify.d.ts.map +0 -1
  76. package/dist/exports/schema-verify.js +0 -15
  77. package/dist/exports/schema-verify.js.map +0 -1
  78. package/dist/exports/test-utils.d.ts +0 -7
  79. package/dist/exports/test-utils.d.ts.map +0 -1
  80. package/dist/exports/test-utils.js +0 -17
  81. package/dist/exports/test-utils.js.map +0 -1
  82. package/dist/exports/verify.d.ts +0 -2
  83. package/dist/exports/verify.d.ts.map +0 -1
  84. package/dist/exports/verify.js +0 -11
  85. package/dist/exports/verify.js.map +0 -1
@@ -1,280 +0,0 @@
1
- /**
2
- * SQL-specific migration types.
3
- *
4
- * These types extend the canonical migration types from the framework control plane
5
- * with SQL-specific fields for execution (precheck SQL, execute SQL, etc.).
6
- */
7
- import type { TargetBoundComponentDescriptor } from '@prisma-next/contract/framework-components';
8
- import type { ControlDriverInstance, ControlExtensionDescriptor, ControlTargetDescriptor, ControlTargetInstance, MigrationOperationPolicy, MigrationPlan, MigrationPlannerConflict, MigrationPlannerFailureResult, MigrationPlannerSuccessResult, MigrationPlanOperation, MigrationRunnerExecutionChecks, MigrationRunnerFailure, MigrationRunnerSuccessValue, OperationContext, SchemaIssue } from '@prisma-next/core-control-plane/types';
9
- import type { SqlContract, SqlStorage } from '@prisma-next/sql-contract/types';
10
- import type { SqlSchemaIR } from '@prisma-next/sql-schema-ir/types';
11
- import type { Result } from '@prisma-next/utils/result';
12
- import type { SqlControlFamilyInstance } from '../instance';
13
- export type AnyRecord = Readonly<Record<string, unknown>>;
14
- /**
15
- * A single database dependency declared by a framework component.
16
- * Uses SqlMigrationPlanOperation so we inherit the existing precheck/execute/postcheck contract.
17
- *
18
- * Database dependencies allow components (extensions, adapters) to declare what database-side
19
- * persistence structures they require (e.g., Postgres extensions, schemas, functions).
20
- * The planner emits these as migration operations, and the verifier uses the pure verification
21
- * hook to check satisfaction against the schema IR.
22
- */
23
- export interface ComponentDatabaseDependency<TTargetDetails> {
24
- /** Stable identifier for the dependency (e.g. 'postgres.extension.vector') */
25
- readonly id: string;
26
- /** Human label for output (e.g. 'Enable vector extension') */
27
- readonly label: string;
28
- /**
29
- * Operations that install/ensure the dependency.
30
- * Use SqlMigrationPlanOperation so we inherit the existing precheck/execute/postcheck contract.
31
- */
32
- readonly install: readonly SqlMigrationPlanOperation<TTargetDetails>[];
33
- /**
34
- * Pure verification hook: checks whether this dependency is already installed
35
- * based on the in-memory schema IR (no DB I/O).
36
- *
37
- * This must return structured issues suitable for CLI and tree output, not just a boolean.
38
- */
39
- readonly verifyDatabaseDependencyInstalled: (schema: SqlSchemaIR) => readonly SchemaIssue[];
40
- }
41
- /**
42
- * Database dependencies declared by a framework component.
43
- */
44
- export interface ComponentDatabaseDependencies<TTargetDetails> {
45
- /**
46
- * Dependencies required for db init.
47
- * Future: update dependencies can be added later (e.g. widening/destructive).
48
- */
49
- readonly init?: readonly ComponentDatabaseDependency<TTargetDetails>[];
50
- }
51
- /**
52
- * Minimal structural type implemented by any descriptor that can expose
53
- * component-owned database dependencies. Targets/adapters typically omit
54
- * the property, while extensions provide dependency metadata.
55
- */
56
- export interface DatabaseDependencyProvider {
57
- readonly databaseDependencies?: ComponentDatabaseDependencies<unknown>;
58
- }
59
- /**
60
- * SQL-specific extension descriptor with optional database dependencies.
61
- * Extends the core ControlExtensionDescriptor with SQL-specific metadata.
62
- *
63
- * Database dependencies are attached to the descriptor (not the instance) because
64
- * they are declarative metadata that planner/verifier need without constructing instances.
65
- */
66
- export interface SqlControlExtensionDescriptor<TTargetId extends string> extends ControlExtensionDescriptor<'sql', TTargetId> {
67
- /** Optional database dependencies this extension requires. */
68
- readonly databaseDependencies?: ComponentDatabaseDependencies<unknown>;
69
- }
70
- /**
71
- * A single step in a SQL migration operation (precheck, execute, or postcheck).
72
- */
73
- export interface SqlMigrationPlanOperationStep {
74
- readonly description: string;
75
- readonly sql: string;
76
- readonly meta?: AnyRecord;
77
- }
78
- /**
79
- * Target details for a SQL migration operation (table, column, index, etc.).
80
- */
81
- export interface SqlMigrationPlanOperationTarget<TTargetDetails> {
82
- readonly id: string;
83
- readonly details?: TTargetDetails;
84
- }
85
- /**
86
- * A single SQL migration operation with SQL-specific fields.
87
- * Extends the core MigrationPlanOperation with SQL execution details.
88
- */
89
- export interface SqlMigrationPlanOperation<TTargetDetails> extends MigrationPlanOperation {
90
- /** Optional detailed explanation of what this operation does and why. */
91
- readonly summary?: string;
92
- readonly target: SqlMigrationPlanOperationTarget<TTargetDetails>;
93
- readonly precheck: readonly SqlMigrationPlanOperationStep[];
94
- readonly execute: readonly SqlMigrationPlanOperationStep[];
95
- readonly postcheck: readonly SqlMigrationPlanOperationStep[];
96
- readonly meta?: AnyRecord;
97
- }
98
- /**
99
- * Contract identity information for SQL migrations.
100
- */
101
- export interface SqlMigrationPlanContractInfo {
102
- readonly coreHash: string;
103
- readonly profileHash?: string;
104
- }
105
- /**
106
- * A SQL migration plan with SQL-specific fields.
107
- * Extends the core MigrationPlan with origin tracking and metadata.
108
- */
109
- export interface SqlMigrationPlan<TTargetDetails> extends MigrationPlan {
110
- /**
111
- * Origin contract identity that the plan expects the database to currently be at.
112
- * If omitted, the runner treats the origin as "no marker present" (empty database),
113
- * and will only proceed if no marker exists (or if the marker already matches destination).
114
- */
115
- readonly origin?: SqlMigrationPlanContractInfo | null;
116
- /**
117
- * Destination contract identity that the plan intends to reach.
118
- */
119
- readonly destination: SqlMigrationPlanContractInfo;
120
- readonly operations: readonly SqlMigrationPlanOperation<TTargetDetails>[];
121
- readonly meta?: AnyRecord;
122
- }
123
- /**
124
- * Specific conflict kinds for SQL migrations.
125
- */
126
- export type SqlPlannerConflictKind = 'typeMismatch' | 'nullabilityConflict' | 'indexIncompatible' | 'foreignKeyConflict' | 'missingButNonAdditive' | 'unsupportedExtension' | 'extensionMissing' | 'unsupportedOperation';
127
- /**
128
- * Location information for SQL planner conflicts.
129
- */
130
- export interface SqlPlannerConflictLocation {
131
- readonly table?: string;
132
- readonly column?: string;
133
- readonly index?: string;
134
- readonly constraint?: string;
135
- readonly extension?: string;
136
- }
137
- /**
138
- * A SQL-specific planner conflict with additional location information.
139
- * Extends the core MigrationPlannerConflict.
140
- */
141
- export interface SqlPlannerConflict extends MigrationPlannerConflict {
142
- readonly kind: SqlPlannerConflictKind;
143
- readonly location?: SqlPlannerConflictLocation;
144
- readonly meta?: AnyRecord;
145
- }
146
- /**
147
- * Successful SQL planner result with the migration plan.
148
- */
149
- export interface SqlPlannerSuccessResult<TTargetDetails> extends Omit<MigrationPlannerSuccessResult, 'plan'> {
150
- readonly kind: 'success';
151
- readonly plan: SqlMigrationPlan<TTargetDetails>;
152
- }
153
- /**
154
- * Failed SQL planner result with the list of conflicts.
155
- */
156
- export interface SqlPlannerFailureResult extends Omit<MigrationPlannerFailureResult, 'conflicts'> {
157
- readonly kind: 'failure';
158
- readonly conflicts: readonly SqlPlannerConflict[];
159
- }
160
- /**
161
- * Union type for SQL planner results.
162
- */
163
- export type SqlPlannerResult<TTargetDetails> = SqlPlannerSuccessResult<TTargetDetails> | SqlPlannerFailureResult;
164
- /**
165
- * Options for SQL migration planner.
166
- */
167
- export interface SqlMigrationPlannerPlanOptions {
168
- readonly contract: SqlContract<SqlStorage>;
169
- readonly schema: SqlSchemaIR;
170
- readonly policy: MigrationOperationPolicy;
171
- readonly schemaName?: string;
172
- /**
173
- * Active framework components participating in this composition.
174
- * SQL targets can interpret this list to derive database dependencies.
175
- * All components must have matching familyId ('sql') and targetId.
176
- */
177
- readonly frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<'sql', string>>;
178
- }
179
- /**
180
- * SQL migration planner interface.
181
- * Extends the core MigrationPlanner with SQL-specific types.
182
- */
183
- export interface SqlMigrationPlanner<TTargetDetails> {
184
- plan(options: SqlMigrationPlannerPlanOptions): SqlPlannerResult<TTargetDetails>;
185
- }
186
- /**
187
- * Callbacks for SQL migration runner execution.
188
- */
189
- export interface SqlMigrationRunnerExecuteCallbacks<TTargetDetails> {
190
- onOperationStart?(operation: SqlMigrationPlanOperation<TTargetDetails>): void;
191
- onOperationComplete?(operation: SqlMigrationPlanOperation<TTargetDetails>): void;
192
- }
193
- /**
194
- * Options for SQL migration runner execution.
195
- */
196
- export interface SqlMigrationRunnerExecuteOptions<TTargetDetails> {
197
- readonly plan: SqlMigrationPlan<TTargetDetails>;
198
- readonly driver: ControlDriverInstance<'sql', string>;
199
- /**
200
- * Destination contract IR.
201
- * Must correspond to `plan.destination` and is used for schema verification and marker/ledger writes.
202
- */
203
- readonly destinationContract: SqlContract<SqlStorage>;
204
- /**
205
- * Execution-time policy that defines which operation classes are allowed.
206
- * The runner validates each operation against this policy before execution.
207
- */
208
- readonly policy: MigrationOperationPolicy;
209
- readonly schemaName?: string;
210
- readonly strictVerification?: boolean;
211
- readonly callbacks?: SqlMigrationRunnerExecuteCallbacks<TTargetDetails>;
212
- readonly context?: OperationContext;
213
- /**
214
- * Execution-time checks configuration.
215
- * All checks default to `true` (enabled) when omitted.
216
- */
217
- readonly executionChecks?: MigrationRunnerExecutionChecks;
218
- /**
219
- * Active framework components participating in this composition.
220
- * SQL targets can interpret this list to derive database dependencies.
221
- * All components must have matching familyId ('sql') and targetId.
222
- */
223
- readonly frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<'sql', string>>;
224
- }
225
- /**
226
- * Error codes for SQL migration runner failures.
227
- */
228
- export type SqlMigrationRunnerErrorCode = 'DESTINATION_CONTRACT_MISMATCH' | 'MARKER_ORIGIN_MISMATCH' | 'POLICY_VIOLATION' | 'PRECHECK_FAILED' | 'POSTCHECK_FAILED' | 'SCHEMA_VERIFY_FAILED' | 'EXECUTION_FAILED';
229
- /**
230
- * Detailed information about a SQL migration runner failure.
231
- * Extends the core MigrationRunnerFailure with SQL-specific error codes.
232
- */
233
- export interface SqlMigrationRunnerFailure extends MigrationRunnerFailure {
234
- readonly code: SqlMigrationRunnerErrorCode;
235
- readonly meta?: AnyRecord;
236
- }
237
- /**
238
- * Success value for SQL migration runner execution.
239
- * Extends core type for type branding and potential SQL-specific extensions.
240
- */
241
- export interface SqlMigrationRunnerSuccessValue extends MigrationRunnerSuccessValue {
242
- }
243
- /**
244
- * Result type for SQL migration runner execution.
245
- */
246
- export type SqlMigrationRunnerResult = Result<SqlMigrationRunnerSuccessValue, SqlMigrationRunnerFailure>;
247
- /**
248
- * SQL migration runner interface.
249
- * Extends the core MigrationRunner with SQL-specific types.
250
- */
251
- export interface SqlMigrationRunner<TTargetDetails> {
252
- execute(options: SqlMigrationRunnerExecuteOptions<TTargetDetails>): Promise<SqlMigrationRunnerResult>;
253
- }
254
- /**
255
- * SQL control target descriptor with migration support.
256
- * Extends the core ControlTargetDescriptor with SQL-specific migration methods.
257
- */
258
- export interface SqlControlTargetDescriptor<TTargetId extends string, TTargetDetails> extends ControlTargetDescriptor<'sql', TTargetId, ControlTargetInstance<'sql', TTargetId>, SqlControlFamilyInstance> {
259
- /**
260
- * Creates a SQL migration planner for this target.
261
- * Direct method for SQL-specific usage.
262
- */
263
- createPlanner(family: SqlControlFamilyInstance): SqlMigrationPlanner<TTargetDetails>;
264
- /**
265
- * Creates a SQL migration runner for this target.
266
- * Direct method for SQL-specific usage.
267
- */
268
- createRunner(family: SqlControlFamilyInstance): SqlMigrationRunner<TTargetDetails>;
269
- }
270
- /**
271
- * Options for creating a SQL migration plan.
272
- */
273
- export interface CreateSqlMigrationPlanOptions<TTargetDetails> {
274
- readonly targetId: string;
275
- readonly origin?: SqlMigrationPlanContractInfo | null;
276
- readonly destination: SqlMigrationPlanContractInfo;
277
- readonly operations: readonly SqlMigrationPlanOperation<TTargetDetails>[];
278
- readonly meta?: AnyRecord;
279
- }
280
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/migrations/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,4CAA4C,CAAC;AACjG,OAAO,KAAK,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GAAG,mBAAmB,CAAC,cAAc,CAAC,CAAC;IACrF;;;OAGG;IACH,YAAY,CAAC,MAAM,EAAE,wBAAwB,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC;CACpF;AAMD;;GAEG;AACH,MAAM,WAAW,6BAA6B,CAAC,cAAc;IAC3D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,4BAA4B,GAAG,IAAI,CAAC;IACtD,QAAQ,CAAC,WAAW,EAAE,4BAA4B,CAAC;IACnD,QAAQ,CAAC,UAAU,EAAE,SAAS,yBAAyB,CAAC,cAAc,CAAC,EAAE,CAAC;IAC1E,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC;CAC3B"}
@@ -1,19 +0,0 @@
1
- import type { RuntimeAdapterDescriptor, RuntimeDriverDescriptor, RuntimeExtensionDescriptor, RuntimeFamilyDescriptor, RuntimeTargetDescriptor } from '@prisma-next/core-execution-plane/types';
2
- import { type SqlRuntimeAdapterInstance, type SqlRuntimeDriverInstance, type SqlRuntimeFamilyInstance } from './runtime-instance';
3
- /**
4
- * SQL runtime family descriptor implementation.
5
- * Provides factory method to create SQL runtime family instance.
6
- */
7
- export declare class SqlRuntimeFamilyDescriptor implements RuntimeFamilyDescriptor<'sql', SqlRuntimeFamilyInstance> {
8
- readonly kind: "family";
9
- readonly id = "sql";
10
- readonly familyId: "sql";
11
- readonly version = "0.0.1";
12
- create<TTargetId extends string>(options: {
13
- readonly target: RuntimeTargetDescriptor<'sql', TTargetId>;
14
- readonly adapter: RuntimeAdapterDescriptor<'sql', TTargetId, SqlRuntimeAdapterInstance<TTargetId>>;
15
- readonly driver: RuntimeDriverDescriptor<'sql', TTargetId, SqlRuntimeDriverInstance<TTargetId>>;
16
- readonly extensionPacks: readonly RuntimeExtensionDescriptor<'sql', TTargetId>[];
17
- }): SqlRuntimeFamilyInstance;
18
- }
19
- //# sourceMappingURL=runtime-descriptor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime-descriptor.d.ts","sourceRoot":"","sources":["../../src/core/runtime-descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,uBAAuB,EACvB,0BAA0B,EAC1B,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC9B,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,qBAAa,0BACX,YAAW,uBAAuB,CAAC,KAAK,EAAE,wBAAwB,CAAC;IAEnE,QAAQ,CAAC,IAAI,EAAG,QAAQ,CAAU;IAClC,QAAQ,CAAC,EAAE,SAAS;IACpB,QAAQ,CAAC,QAAQ,EAAG,KAAK,CAAU;IACnC,QAAQ,CAAC,OAAO,WAAW;IAE3B,MAAM,CAAC,SAAS,SAAS,MAAM,EAAE,OAAO,EAAE;QACxC,QAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QAC3D,QAAQ,CAAC,OAAO,EAAE,wBAAwB,CACxC,KAAK,EACL,SAAS,EACT,yBAAyB,CAAC,SAAS,CAAC,CACrC,CAAC;QACF,QAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAC,KAAK,EAAE,SAAS,EAAE,wBAAwB,CAAC,SAAS,CAAC,CAAC,CAAC;QAChG,QAAQ,CAAC,cAAc,EAAE,SAAS,0BAA0B,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;KAClF,GAAG,wBAAwB;CAS7B"}
@@ -1,54 +0,0 @@
1
- import type { RuntimeAdapterDescriptor, RuntimeDriverDescriptor, RuntimeDriverInstance, RuntimeFamilyDescriptor, RuntimeFamilyInstance, RuntimeTargetDescriptor } from '@prisma-next/core-execution-plane/types';
2
- import type { Log, Plugin, RuntimeVerifyOptions } from '@prisma-next/runtime-executor';
3
- import type { SqlContract, SqlStorage } from '@prisma-next/sql-contract/types';
4
- import type { Adapter, LoweredStatement, SelectAst, SqlDriver } from '@prisma-next/sql-relational-core/ast';
5
- import type { Runtime, SqlRuntimeAdapterInstance, SqlRuntimeExtensionDescriptor } from '@prisma-next/sql-runtime';
6
- /**
7
- * SQL runtime driver instance type.
8
- * Combines identity properties with SQL-specific behavior methods.
9
- */
10
- export type SqlRuntimeDriverInstance<TTargetId extends string = string> = RuntimeDriverInstance<'sql', TTargetId> & SqlDriver;
11
- export type { SqlRuntimeAdapterInstance } from '@prisma-next/sql-runtime';
12
- /**
13
- * SQL runtime family instance interface.
14
- * Extends base RuntimeFamilyInstance with SQL-specific runtime creation method.
15
- */
16
- export interface SqlRuntimeFamilyInstance extends RuntimeFamilyInstance<'sql'> {
17
- /**
18
- * Creates a SQL runtime from contract, driver options, and verification settings.
19
- *
20
- * Extension packs are routed through composition (at instance creation time),
21
- * not through this method. This aligns with control-plane composition patterns.
22
- *
23
- * @param options - Runtime creation options
24
- * @param options.contract - SQL contract
25
- * @param options.driverOptions - Driver options (e.g., PostgresDriverOptions)
26
- * @param options.verify - Runtime verification options
27
- * @param options.plugins - Optional plugins
28
- * @param options.mode - Optional runtime mode
29
- * @param options.log - Optional log instance
30
- * @returns Runtime instance
31
- */
32
- createRuntime<TContract extends SqlContract<SqlStorage>>(options: {
33
- readonly contract: TContract;
34
- readonly driverOptions: unknown;
35
- readonly verify: RuntimeVerifyOptions;
36
- readonly plugins?: readonly Plugin<TContract, Adapter<SelectAst, SqlContract<SqlStorage>, LoweredStatement>, SqlDriver>[];
37
- readonly mode?: 'strict' | 'permissive';
38
- readonly log?: Log;
39
- }): Runtime;
40
- }
41
- /**
42
- * Creates a SQL runtime family instance from runtime descriptors.
43
- *
44
- * Routes the same framework composition as control-plane:
45
- * family, target, adapter, driver, extensionPacks (all as descriptors with IDs).
46
- */
47
- export declare function createSqlRuntimeFamilyInstance<TTargetId extends string>(options: {
48
- readonly family: RuntimeFamilyDescriptor<'sql'>;
49
- readonly target: RuntimeTargetDescriptor<'sql', TTargetId>;
50
- readonly adapter: RuntimeAdapterDescriptor<'sql', TTargetId, SqlRuntimeAdapterInstance<TTargetId>>;
51
- readonly driver: RuntimeDriverDescriptor<'sql', TTargetId, SqlRuntimeDriverInstance<TTargetId>>;
52
- readonly extensionPacks?: readonly SqlRuntimeExtensionDescriptor<TTargetId>[];
53
- }): SqlRuntimeFamilyInstance;
54
- //# sourceMappingURL=runtime-instance.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime-instance.d.ts","sourceRoot":"","sources":["../../src/core/runtime-instance.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,yCAAyC,CAAC;AACjD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,KAAK,EACV,OAAO,EACP,gBAAgB,EAChB,SAAS,EACT,SAAS,EACV,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EACV,OAAO,EAEP,yBAAyB,EACzB,6BAA6B,EAC9B,MAAM,0BAA0B,CAAC;AAGlC;;;GAGG;AACH,MAAM,MAAM,wBAAwB,CAAC,SAAS,SAAS,MAAM,GAAG,MAAM,IAAI,qBAAqB,CAC7F,KAAK,EACL,SAAS,CACV,GACC,SAAS,CAAC;AAGZ,YAAY,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAE1E;;;GAGG;AACH,MAAM,WAAW,wBAAyB,SAAQ,qBAAqB,CAAC,KAAK,CAAC;IAC5E;;;;;;;;;;;;;;OAcG;IACH,aAAa,CAAC,SAAS,SAAS,WAAW,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE;QAChE,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;QAC7B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;QAChC,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAC;QACtC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,CAChC,SAAS,EACT,OAAO,CAAC,SAAS,EAAE,WAAW,CAAC,UAAU,CAAC,EAAE,gBAAgB,CAAC,EAC7D,SAAS,CACV,EAAE,CAAC;QACJ,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,GAAG,YAAY,CAAC;QACxC,QAAQ,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC;KACpB,GAAG,OAAO,CAAC;CACb;AAED;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,SAAS,SAAS,MAAM,EAAE,OAAO,EAAE;IAChF,QAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAC,KAAK,CAAC,CAAC;IAChD,QAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAC3D,QAAQ,CAAC,OAAO,EAAE,wBAAwB,CACxC,KAAK,EACL,SAAS,EACT,yBAAyB,CAAC,SAAS,CAAC,CACrC,CAAC;IACF,QAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAC,KAAK,EAAE,SAAS,EAAE,wBAAwB,CAAC,SAAS,CAAC,CAAC,CAAC;IAChG,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,6BAA6B,CAAC,SAAS,CAAC,EAAE,CAAC;CAC/E,GAAG,wBAAwB,CAuD3B"}
@@ -1,96 +0,0 @@
1
- /**
2
- * Pure verification helper functions for SQL schema verification.
3
- * These functions verify schema IR against contract requirements.
4
- */
5
- import type { SchemaIssue, SchemaVerificationNode } from '@prisma-next/core-control-plane/types';
6
- import type { ForeignKey, Index, PrimaryKey, UniqueConstraint } from '@prisma-next/sql-contract/types';
7
- import type { SqlForeignKeyIR, SqlIndexIR, SqlSchemaIR, SqlUniqueIR } from '@prisma-next/sql-schema-ir/types';
8
- import type { ComponentDatabaseDependency } from '../migrations/types';
9
- /**
10
- * Compares two arrays of strings for equality (order-sensitive).
11
- */
12
- export declare function arraysEqual(a: readonly string[], b: readonly string[]): boolean;
13
- /**
14
- * Checks if a unique constraint requirement is satisfied by the given columns.
15
- *
16
- * Semantic satisfaction: a unique constraint requirement can be satisfied by:
17
- * - A unique constraint with the same columns, OR
18
- * - A unique index with the same columns
19
- *
20
- * @param uniques - The unique constraints in the schema table
21
- * @param indexes - The indexes in the schema table
22
- * @param columns - The columns required by the unique constraint
23
- * @returns true if the requirement is satisfied
24
- */
25
- export declare function isUniqueConstraintSatisfied(uniques: readonly SqlUniqueIR[], indexes: readonly SqlIndexIR[], columns: readonly string[]): boolean;
26
- /**
27
- * Checks if an index requirement is satisfied by the given columns.
28
- *
29
- * Semantic satisfaction: a non-unique index requirement can be satisfied by:
30
- * - Any index (unique or non-unique) with the same columns, OR
31
- * - A unique constraint with the same columns (stronger satisfies weaker)
32
- *
33
- * @param indexes - The indexes in the schema table
34
- * @param uniques - The unique constraints in the schema table
35
- * @param columns - The columns required by the index
36
- * @returns true if the requirement is satisfied
37
- */
38
- export declare function isIndexSatisfied(indexes: readonly SqlIndexIR[], uniques: readonly SqlUniqueIR[], columns: readonly string[]): boolean;
39
- /**
40
- * Verifies primary key matches between contract and schema.
41
- * Returns 'pass' or 'fail'.
42
- *
43
- * Uses semantic satisfaction: identity is based on (table + kind + columns).
44
- * Name differences are ignored by default (names are for DDL/diagnostics, not identity).
45
- */
46
- export declare function verifyPrimaryKey(contractPK: PrimaryKey, schemaPK: PrimaryKey | undefined, tableName: string, issues: SchemaIssue[]): 'pass' | 'fail';
47
- /**
48
- * Verifies foreign keys match between contract and schema.
49
- * Returns verification nodes for the tree.
50
- *
51
- * Uses semantic satisfaction: identity is based on (table + columns + referenced table + referenced columns).
52
- * Name differences are ignored by default (names are for DDL/diagnostics, not identity).
53
- */
54
- export declare function verifyForeignKeys(contractFKs: readonly ForeignKey[], schemaFKs: readonly SqlForeignKeyIR[], tableName: string, tablePath: string, issues: SchemaIssue[], strict: boolean): SchemaVerificationNode[];
55
- /**
56
- * Verifies unique constraints match between contract and schema.
57
- * Returns verification nodes for the tree.
58
- *
59
- * Uses semantic satisfaction: identity is based on (table + kind + columns).
60
- * A unique constraint requirement can be satisfied by either:
61
- * - A unique constraint with the same columns, or
62
- * - A unique index with the same columns
63
- *
64
- * Name differences are ignored by default (names are for DDL/diagnostics, not identity).
65
- */
66
- export declare function verifyUniqueConstraints(contractUniques: readonly UniqueConstraint[], schemaUniques: readonly SqlUniqueIR[], schemaIndexes: readonly SqlIndexIR[], tableName: string, tablePath: string, issues: SchemaIssue[], strict: boolean): SchemaVerificationNode[];
67
- /**
68
- * Verifies indexes match between contract and schema.
69
- * Returns verification nodes for the tree.
70
- *
71
- * Uses semantic satisfaction: identity is based on (table + kind + columns).
72
- * A non-unique index requirement can be satisfied by either:
73
- * - A non-unique index with the same columns, or
74
- * - A unique index with the same columns (stronger satisfies weaker)
75
- *
76
- * Name differences are ignored by default (names are for DDL/diagnostics, not identity).
77
- */
78
- export declare function verifyIndexes(contractIndexes: readonly Index[], schemaIndexes: readonly SqlIndexIR[], schemaUniques: readonly SqlUniqueIR[], tableName: string, tablePath: string, issues: SchemaIssue[], strict: boolean): SchemaVerificationNode[];
79
- /**
80
- * Verifies database dependencies are installed using component-owned verification hooks.
81
- * Each dependency provides a pure verifyDatabaseDependencyInstalled function that checks
82
- * whether the dependency is satisfied based on the in-memory schema IR (no DB I/O).
83
- *
84
- * Returns verification nodes for the tree.
85
- */
86
- export declare function verifyDatabaseDependencies(dependencies: ReadonlyArray<ComponentDatabaseDependency<unknown>>, schema: SqlSchemaIR, issues: SchemaIssue[]): SchemaVerificationNode[];
87
- /**
88
- * Computes counts of pass/warn/fail nodes by traversing the tree.
89
- */
90
- export declare function computeCounts(node: SchemaVerificationNode): {
91
- pass: number;
92
- warn: number;
93
- fail: number;
94
- totalNodes: number;
95
- };
96
- //# sourceMappingURL=verify-helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verify-helpers.d.ts","sourceRoot":"","sources":["../../../src/core/schema-verify/verify-helpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AACjG,OAAO,KAAK,EACV,UAAU,EACV,KAAK,EACL,UAAU,EACV,gBAAgB,EACjB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,eAAe,EACf,UAAU,EACV,WAAW,EACX,WAAW,EACZ,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAEvE;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,SAAS,MAAM,EAAE,EAAE,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAU/E;AASD;;;;;;;;;;;GAWG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,SAAS,WAAW,EAAE,EAC/B,OAAO,EAAE,SAAS,UAAU,EAAE,EAC9B,OAAO,EAAE,SAAS,MAAM,EAAE,GACzB,OAAO,CAQT;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,SAAS,UAAU,EAAE,EAC9B,OAAO,EAAE,SAAS,WAAW,EAAE,EAC/B,OAAO,EAAE,SAAS,MAAM,EAAE,GACzB,OAAO,CAQT;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,UAAU,GAAG,SAAS,EAChC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,WAAW,EAAE,GACpB,MAAM,GAAG,MAAM,CA0BjB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,SAAS,UAAU,EAAE,EAClC,SAAS,EAAE,SAAS,eAAe,EAAE,EACrC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,WAAW,EAAE,EACrB,MAAM,EAAE,OAAO,GACd,sBAAsB,EAAE,CAkF1B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,SAAS,gBAAgB,EAAE,EAC5C,aAAa,EAAE,SAAS,WAAW,EAAE,EACrC,aAAa,EAAE,SAAS,UAAU,EAAE,EACpC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,WAAW,EAAE,EACrB,MAAM,EAAE,OAAO,GACd,sBAAsB,EAAE,CAiF1B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,eAAe,EAAE,SAAS,KAAK,EAAE,EACjC,aAAa,EAAE,SAAS,UAAU,EAAE,EACpC,aAAa,EAAE,SAAS,WAAW,EAAE,EACrC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,WAAW,EAAE,EACrB,MAAM,EAAE,OAAO,GACd,sBAAsB,EAAE,CAsF1B;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,YAAY,EAAE,aAAa,CAAC,2BAA2B,CAAC,OAAO,CAAC,CAAC,EACjE,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EAAE,GACpB,sBAAsB,EAAE,CAwC1B;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,sBAAsB,GAAG;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB,CA6BA"}
@@ -1,45 +0,0 @@
1
- /**
2
- * Pure SQL schema verification function.
3
- *
4
- * This module provides a pure function that verifies a SqlSchemaIR against
5
- * a SqlContract without requiring a database connection. It can be reused
6
- * by migration planners and other tools that need to compare schema states.
7
- */
8
- import type { TargetBoundComponentDescriptor } from '@prisma-next/contract/framework-components';
9
- import type { OperationContext, VerifyDatabaseSchemaResult } from '@prisma-next/core-control-plane/types';
10
- import type { SqlContract, SqlStorage } from '@prisma-next/sql-contract/types';
11
- import type { SqlSchemaIR } from '@prisma-next/sql-schema-ir/types';
12
- /**
13
- * Options for the pure schema verification function.
14
- */
15
- export interface VerifySqlSchemaOptions {
16
- /** The validated SQL contract to verify against */
17
- readonly contract: SqlContract<SqlStorage>;
18
- /** The schema IR from introspection (or another source) */
19
- readonly schema: SqlSchemaIR;
20
- /** Whether to run in strict mode (detects extra tables/columns) */
21
- readonly strict: boolean;
22
- /** Optional operation context for metadata */
23
- readonly context?: OperationContext;
24
- /** Type metadata registry for codec consistency warnings */
25
- readonly typeMetadataRegistry: ReadonlyMap<string, {
26
- nativeType?: string;
27
- }>;
28
- /**
29
- * Active framework components participating in this composition.
30
- * All components must have matching familyId ('sql') and targetId.
31
- */
32
- readonly frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<'sql', string>>;
33
- }
34
- /**
35
- * Verifies that a SqlSchemaIR matches a SqlContract.
36
- *
37
- * This is a pure function that does NOT perform any database I/O.
38
- * It takes an already-introspected schema IR and compares it against
39
- * the contract requirements.
40
- *
41
- * @param options - Verification options
42
- * @returns VerifyDatabaseSchemaResult with verification tree and issues
43
- */
44
- export declare function verifySqlSchema(options: VerifySqlSchemaOptions): VerifyDatabaseSchemaResult;
45
- //# sourceMappingURL=verify-sql-schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verify-sql-schema.d.ts","sourceRoot":"","sources":["../../../src/core/schema-verify/verify-sql-schema.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,4CAA4C,CAAC;AACjG,OAAO,KAAK,EACV,gBAAgB,EAGhB,0BAA0B,EAC3B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAYpE;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,mDAAmD;IACnD,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IAC3C,2DAA2D;IAC3D,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,mEAAmE;IACnE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,8CAA8C;IAC9C,QAAQ,CAAC,OAAO,CAAC,EAAE,gBAAgB,CAAC;IACpC,4DAA4D;IAC5D,QAAQ,CAAC,oBAAoB,EAAE,WAAW,CAAC,MAAM,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5E;;;OAGG;IACH,QAAQ,CAAC,mBAAmB,EAAE,aAAa,CAAC,8BAA8B,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;CAC5F;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,0BAA0B,CAye3F"}
@@ -1,39 +0,0 @@
1
- import type { ContractMarkerRecord } from '@prisma-next/contract/types';
2
- import type { ControlAdapterDescriptor, ControlDriverInstance, ControlExtensionDescriptor, ControlTargetDescriptor } from '@prisma-next/core-control-plane/types';
3
- /**
4
- * Parses a contract marker row from database query result.
5
- * This is SQL-specific parsing logic (handles SQL row structure with snake_case columns).
6
- */
7
- export declare function parseContractMarkerRow(row: unknown): ContractMarkerRecord;
8
- /**
9
- * Returns the SQL statement to read the contract marker.
10
- * This is a migration-plane helper (no runtime imports).
11
- * @internal - Used internally by readMarker(). Prefer readMarker() for Control Plane usage.
12
- */
13
- export declare function readMarkerSql(): {
14
- readonly sql: string;
15
- readonly params: readonly unknown[];
16
- };
17
- /**
18
- * Reads the contract marker from the database using the provided driver.
19
- * Returns the parsed marker record or null if no marker is found.
20
- * This abstracts SQL-specific details from the Control Plane.
21
- *
22
- * @param driver - ControlDriverInstance instance for executing queries
23
- * @returns Promise resolving to ContractMarkerRecord or null if marker not found
24
- */
25
- export declare function readMarker(driver: ControlDriverInstance<'sql', string>): Promise<ContractMarkerRecord | null>;
26
- /**
27
- * Collects supported codec type IDs from adapter and extension manifests.
28
- * Returns a sorted, unique array of type IDs that are declared in the manifests.
29
- * This enables coverage checks by comparing contract column types against supported types.
30
- *
31
- * Note: This extracts type IDs from manifest type imports, not from runtime codec registries.
32
- * The manifests declare which codec types are available, but the actual type IDs
33
- * are defined in the codec-types TypeScript modules that are imported.
34
- *
35
- * For MVP, we return an empty array since extracting type IDs from TypeScript modules
36
- * would require runtime evaluation or static analysis. This can be enhanced later.
37
- */
38
- export declare function collectSupportedCodecTypeIds<TFamilyId extends string, TTargetId extends string>(descriptors: ReadonlyArray<ControlTargetDescriptor<TFamilyId, TTargetId> | ControlAdapterDescriptor<TFamilyId, TTargetId> | ControlExtensionDescriptor<TFamilyId, TTargetId>>): readonly string[];
39
- //# sourceMappingURL=verify.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../src/core/verify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACrB,0BAA0B,EAC1B,uBAAuB,EACxB,MAAM,uCAAuC,CAAC;AAuC/C;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,OAAO,GAAG,oBAAoB,CAgCzE;AAED;;;;GAIG;AACH,wBAAgB,aAAa,IAAI;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,CAAA;CAAE,CAc7F;AAED;;;;;;;GAOG;AACH,wBAAsB,UAAU,CAC9B,MAAM,EAAE,qBAAqB,CAAC,KAAK,EAAE,MAAM,CAAC,GAC3C,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAoCtC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,CAAC,SAAS,SAAS,MAAM,EAAE,SAAS,SAAS,MAAM,EAC7F,WAAW,EAAE,aAAa,CACtB,uBAAuB,CAAC,SAAS,EAAE,SAAS,CAAC,GAC7C,wBAAwB,CAAC,SAAS,EAAE,SAAS,CAAC,GAC9C,0BAA0B,CAAC,SAAS,EAAE,SAAS,CAAC,CACnD,GACA,SAAS,MAAM,EAAE,CAMnB"}
@@ -1,2 +0,0 @@
1
- export type { SqlControlAdapter, SqlControlAdapterDescriptor } from '../core/control-adapter';
2
- //# sourceMappingURL=control-adapter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"control-adapter.d.ts","sourceRoot":"","sources":["../../src/exports/control-adapter.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC"}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=control-adapter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,13 +0,0 @@
1
- import { SqlFamilyDescriptor } from '../core/descriptor';
2
- export type { MigrationOperationClass, MigrationOperationPolicy, MigrationPlan, MigrationPlanner, MigrationPlannerConflict, MigrationPlannerResult, MigrationPlanOperation, TargetMigrationsCapability, } from '@prisma-next/core-control-plane/types';
3
- export type { SchemaVerifyOptions, SqlControlFamilyInstance } from '../core/instance';
4
- export { createMigrationPlan, plannerFailure, plannerSuccess, runnerFailure, runnerSuccess, } from '../core/migrations/plan-helpers';
5
- export { INIT_ADDITIVE_POLICY } from '../core/migrations/policies';
6
- export type { ComponentDatabaseDependencies, ComponentDatabaseDependency, CreateSqlMigrationPlanOptions, SqlControlExtensionDescriptor, SqlControlTargetDescriptor, SqlMigrationPlan, SqlMigrationPlanContractInfo, SqlMigrationPlanner, SqlMigrationPlannerPlanOptions, SqlMigrationPlanOperation, SqlMigrationPlanOperationStep, SqlMigrationPlanOperationTarget, SqlMigrationRunner, SqlMigrationRunnerErrorCode, SqlMigrationRunnerExecuteCallbacks, SqlMigrationRunnerExecuteOptions, SqlMigrationRunnerFailure, SqlMigrationRunnerResult, SqlMigrationRunnerSuccessValue, SqlPlannerConflict, SqlPlannerConflictKind, SqlPlannerConflictLocation, SqlPlannerFailureResult, SqlPlannerResult, SqlPlannerSuccessResult, } from '../core/migrations/types';
7
- /**
8
- * SQL family descriptor for control plane (CLI/config).
9
- * Provides the SQL family hook and conversion helpers.
10
- */
11
- declare const _default: SqlFamilyDescriptor;
12
- export default _default;
13
- //# sourceMappingURL=control.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"control.d.ts","sourceRoot":"","sources":["../../src/exports/control.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAGzD,YAAY,EACV,uBAAuB,EACvB,wBAAwB,EACxB,aAAa,EACb,gBAAgB,EAChB,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,uCAAuC,CAAC;AAC/C,YAAY,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,aAAa,EACb,aAAa,GACd,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,YAAY,EACV,6BAA6B,EAC7B,2BAA2B,EAC3B,6BAA6B,EAC7B,6BAA6B,EAC7B,0BAA0B,EAC1B,gBAAgB,EAChB,4BAA4B,EAC5B,mBAAmB,EACnB,8BAA8B,EAC9B,yBAAyB,EACzB,6BAA6B,EAC7B,+BAA+B,EAC/B,kBAAkB,EAClB,2BAA2B,EAC3B,kCAAkC,EAClC,gCAAgC,EAChC,yBAAyB,EACzB,wBAAwB,EACxB,8BAA8B,EAC9B,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,EACvB,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAElC;;;GAGG;;AACH,wBAAyC"}