@prisma-next/family-sql 0.3.0-dev.3 → 0.3.0-dev.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{exports/chunk-6P44BVZ4.js → chunk-GYEG3I7U.js} +48 -4
- package/dist/chunk-GYEG3I7U.js.map +1 -0
- package/dist/{exports/chunk-C3GKWCKA.js → chunk-SU7LN2UH.js} +1 -1
- package/dist/chunk-SU7LN2UH.js.map +1 -0
- package/dist/{exports/chunk-F252JMEU.js → chunk-XH2Y5NTD.js} +59 -116
- package/dist/chunk-XH2Y5NTD.js.map +1 -0
- package/dist/core/assembly.d.ts +43 -0
- package/dist/core/assembly.d.ts.map +1 -0
- package/dist/core/control-adapter.d.ts +42 -0
- package/dist/core/control-adapter.d.ts.map +1 -0
- package/dist/core/descriptor.d.ts +28 -0
- package/dist/core/descriptor.d.ts.map +1 -0
- package/dist/{exports/instance-DiZi2k_2.d.ts → core/instance.d.ts} +28 -15
- package/dist/core/instance.d.ts.map +1 -0
- package/dist/core/migrations/plan-helpers.d.ts +20 -0
- package/dist/core/migrations/plan-helpers.d.ts.map +1 -0
- package/dist/core/migrations/policies.d.ts +6 -0
- package/dist/core/migrations/policies.d.ts.map +1 -0
- package/dist/{exports/types-Bh7ftf0Q.d.ts → core/migrations/types.d.ts} +41 -36
- package/dist/core/migrations/types.d.ts.map +1 -0
- package/dist/core/runtime-descriptor.d.ts +19 -0
- package/dist/core/runtime-descriptor.d.ts.map +1 -0
- package/dist/core/runtime-instance.d.ts +54 -0
- package/dist/core/runtime-instance.d.ts.map +1 -0
- package/dist/core/schema-verify/verify-helpers.d.ts +96 -0
- package/dist/core/schema-verify/verify-helpers.d.ts.map +1 -0
- package/dist/core/schema-verify/verify-sql-schema.d.ts +45 -0
- package/dist/core/schema-verify/verify-sql-schema.d.ts.map +1 -0
- package/dist/core/verify.d.ts +39 -0
- package/dist/core/verify.d.ts.map +1 -0
- package/dist/exports/control-adapter.d.ts +2 -44
- package/dist/exports/control-adapter.d.ts.map +1 -0
- package/dist/exports/control.d.ts +8 -160
- package/dist/exports/control.d.ts.map +1 -0
- package/dist/exports/control.js +7 -7
- package/dist/exports/control.js.map +1 -1
- package/dist/exports/runtime.d.ts +3 -61
- package/dist/exports/runtime.d.ts.map +1 -0
- package/dist/exports/schema-verify.d.ts +8 -72
- package/dist/exports/schema-verify.d.ts.map +1 -0
- package/dist/exports/schema-verify.js +5 -1
- package/dist/exports/test-utils.d.ts +5 -31
- package/dist/exports/test-utils.d.ts.map +1 -0
- package/dist/exports/test-utils.js +3 -3
- package/dist/exports/verify.d.ts +2 -28
- package/dist/exports/verify.d.ts.map +1 -0
- package/dist/exports/verify.js +1 -1
- package/package.json +26 -26
- package/src/core/assembly.ts +189 -0
- package/src/core/control-adapter.ts +52 -0
- package/src/core/descriptor.ts +33 -0
- package/src/core/instance.ts +909 -0
- package/src/core/migrations/plan-helpers.ts +164 -0
- package/src/core/migrations/policies.ts +8 -0
- package/src/core/migrations/types.ts +380 -0
- package/src/core/runtime-descriptor.ts +45 -0
- package/src/core/runtime-instance.ts +144 -0
- package/src/core/schema-verify/verify-helpers.ts +532 -0
- package/src/core/schema-verify/verify-sql-schema.ts +588 -0
- package/src/core/verify.ts +177 -0
- package/src/exports/control-adapter.ts +1 -0
- package/src/exports/control.ts +56 -0
- package/src/exports/runtime.ts +7 -0
- package/src/exports/schema-verify.ts +16 -0
- package/src/exports/test-utils.ts +11 -0
- package/src/exports/verify.ts +1 -0
- package/dist/exports/chunk-6P44BVZ4.js.map +0 -1
- package/dist/exports/chunk-C3GKWCKA.js.map +0 -1
- package/dist/exports/chunk-F252JMEU.js.map +0 -1
|
@@ -1,165 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
import { S as SqlControlTargetDescriptor, C as CreateSqlMigrationPlanOptions, a as SqlMigrationPlan, b as SqlPlannerConflict, c as SqlPlannerFailureResult, d as SqlPlannerSuccessResult, e as SqlMigrationRunnerErrorCode, A as AnyRecord, f as SqlMigrationRunnerFailure, g as SqlMigrationRunnerSuccessValue } from './types-Bh7ftf0Q.js';
|
|
8
|
-
export { h as ComponentDatabaseDependencies, i as ComponentDatabaseDependency, j as SqlControlExtensionDescriptor, k as SqlMigrationPlanContractInfo, n as SqlMigrationPlanOperation, o as SqlMigrationPlanOperationStep, p as SqlMigrationPlanOperationTarget, l as SqlMigrationPlanner, m as SqlMigrationPlannerPlanOptions, q as SqlMigrationRunner, r as SqlMigrationRunnerExecuteCallbacks, s as SqlMigrationRunnerExecuteOptions, t as SqlMigrationRunnerResult, u as SqlPlannerConflictKind, v as SqlPlannerConflictLocation, w as SqlPlannerResult } from './types-Bh7ftf0Q.js';
|
|
9
|
-
import { NotOk, Ok } from '@prisma-next/utils/result';
|
|
10
|
-
import '@prisma-next/sql-schema-ir/types';
|
|
11
|
-
import '@prisma-next/contract/framework-components';
|
|
12
|
-
import '@prisma-next/contract/ir';
|
|
13
|
-
import '@prisma-next/contract/pack-manifest-types';
|
|
14
|
-
import '@prisma-next/contract/types';
|
|
15
|
-
import '@prisma-next/core-control-plane/schema-view';
|
|
16
|
-
import '@prisma-next/sql-operations';
|
|
17
|
-
import '@prisma-next/sql-contract/types';
|
|
18
|
-
|
|
19
|
-
type StorageColumn = {
|
|
20
|
-
readonly nativeType: string;
|
|
21
|
-
readonly codecId: string;
|
|
22
|
-
readonly nullable: boolean;
|
|
23
|
-
};
|
|
24
|
-
type PrimaryKey = {
|
|
25
|
-
readonly columns: readonly string[];
|
|
26
|
-
readonly name?: string;
|
|
27
|
-
};
|
|
28
|
-
type UniqueConstraint = {
|
|
29
|
-
readonly columns: readonly string[];
|
|
30
|
-
readonly name?: string;
|
|
31
|
-
};
|
|
32
|
-
type Index = {
|
|
33
|
-
readonly columns: readonly string[];
|
|
34
|
-
readonly name?: string;
|
|
35
|
-
};
|
|
36
|
-
type ForeignKeyReferences = {
|
|
37
|
-
readonly table: string;
|
|
38
|
-
readonly columns: readonly string[];
|
|
39
|
-
};
|
|
40
|
-
type ForeignKey = {
|
|
41
|
-
readonly columns: readonly string[];
|
|
42
|
-
readonly references: ForeignKeyReferences;
|
|
43
|
-
readonly name?: string;
|
|
44
|
-
};
|
|
45
|
-
type StorageTable = {
|
|
46
|
-
readonly columns: Record<string, StorageColumn>;
|
|
47
|
-
readonly primaryKey?: PrimaryKey;
|
|
48
|
-
readonly uniques: ReadonlyArray<UniqueConstraint>;
|
|
49
|
-
readonly indexes: ReadonlyArray<Index>;
|
|
50
|
-
readonly foreignKeys: ReadonlyArray<ForeignKey>;
|
|
51
|
-
};
|
|
52
|
-
type SqlStorage = {
|
|
53
|
-
readonly tables: Record<string, StorageTable>;
|
|
54
|
-
};
|
|
55
|
-
type ModelField = {
|
|
56
|
-
readonly column: string;
|
|
57
|
-
};
|
|
58
|
-
type ModelStorage = {
|
|
59
|
-
readonly table: string;
|
|
60
|
-
};
|
|
61
|
-
type ModelDefinition = {
|
|
62
|
-
readonly storage: ModelStorage;
|
|
63
|
-
readonly fields: Record<string, ModelField>;
|
|
64
|
-
readonly relations: Record<string, unknown>;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* ContractIR types and factories for building contract intermediate representation.
|
|
69
|
-
* ContractIR is family-agnostic and used by authoring, emitter, and no-emit runtime.
|
|
70
|
-
*/
|
|
71
|
-
/**
|
|
72
|
-
* ContractIR represents the intermediate representation of a contract.
|
|
73
|
-
* It is family-agnostic and contains generic storage, models, and relations.
|
|
74
|
-
* Note: coreHash and profileHash are computed by the emitter, not part of the IR.
|
|
75
|
-
*/
|
|
76
|
-
interface ContractIR<TStorage extends Record<string, unknown> = Record<string, unknown>, TModels extends Record<string, unknown> = Record<string, unknown>, TRelations extends Record<string, unknown> = Record<string, unknown>> {
|
|
77
|
-
readonly schemaVersion: string;
|
|
78
|
-
readonly targetFamily: string;
|
|
79
|
-
readonly target: string;
|
|
80
|
-
readonly models: TModels;
|
|
81
|
-
readonly relations: TRelations;
|
|
82
|
-
readonly storage: TStorage;
|
|
83
|
-
readonly extensionPacks: Record<string, unknown>;
|
|
84
|
-
readonly capabilities: Record<string, Record<string, boolean>>;
|
|
85
|
-
readonly meta: Record<string, unknown>;
|
|
86
|
-
readonly sources: Record<string, unknown>;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Specifies how to import TypeScript types from a package.
|
|
91
|
-
* Used in extension pack manifests to declare codec and operation type imports.
|
|
92
|
-
*/
|
|
93
|
-
interface TypesImportSpec {
|
|
94
|
-
readonly package: string;
|
|
95
|
-
readonly named: string;
|
|
96
|
-
readonly alias: string;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Validation context passed to TargetFamilyHook.validateTypes().
|
|
100
|
-
* Contains pre-assembled operation registry, type imports, and extension IDs.
|
|
101
|
-
*/
|
|
102
|
-
interface ValidationContext {
|
|
103
|
-
readonly operationRegistry?: OperationRegistry;
|
|
104
|
-
readonly codecTypeImports?: ReadonlyArray<TypesImportSpec>;
|
|
105
|
-
readonly operationTypeImports?: ReadonlyArray<TypesImportSpec>;
|
|
106
|
-
readonly extensionIds?: ReadonlyArray<string>;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* SQL family descriptor implementation.
|
|
111
|
-
* Provides the SQL family hook and factory method.
|
|
112
|
-
*/
|
|
113
|
-
declare class SqlFamilyDescriptor implements ControlFamilyDescriptor<'sql', SqlControlFamilyInstance> {
|
|
114
|
-
readonly kind: "family";
|
|
115
|
-
readonly id = "sql";
|
|
116
|
-
readonly familyId: "sql";
|
|
117
|
-
readonly version = "0.0.1";
|
|
118
|
-
readonly hook: {
|
|
119
|
-
readonly id: "sql";
|
|
120
|
-
readonly validateTypes: (ir: ContractIR, _ctx: ValidationContext) => void;
|
|
121
|
-
readonly validateStructure: (ir: ContractIR) => void;
|
|
122
|
-
readonly generateContractTypes: (ir: ContractIR, codecTypeImports: ReadonlyArray<TypesImportSpec>, operationTypeImports: ReadonlyArray<TypesImportSpec>) => string;
|
|
123
|
-
readonly generateStorageType: (storage: SqlStorage) => string;
|
|
124
|
-
readonly generateModelsType: (models: Record<string, ModelDefinition> | undefined, storage: SqlStorage) => string;
|
|
125
|
-
readonly generateRelationsType: (relations: Record<string, unknown> | undefined) => string;
|
|
126
|
-
readonly generateMappingsType: (models: Record<string, ModelDefinition> | undefined, storage: SqlStorage, codecTypes: string, operationTypes: string) => string;
|
|
127
|
-
};
|
|
128
|
-
create<TTargetId extends string, TTargetDetails>(options: {
|
|
129
|
-
readonly target: SqlControlTargetDescriptor<TTargetId, TTargetDetails>;
|
|
130
|
-
readonly adapter: ControlAdapterDescriptor<'sql', TTargetId, SqlControlAdapter<TTargetId>>;
|
|
131
|
-
readonly driver: ControlDriverDescriptor<'sql', TTargetId>;
|
|
132
|
-
readonly extensionPacks: readonly ControlExtensionDescriptor<'sql', TTargetId>[];
|
|
133
|
-
}): SqlControlFamilyInstance;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
declare function createMigrationPlan<TTargetDetails>(options: CreateSqlMigrationPlanOptions<TTargetDetails>): SqlMigrationPlan<TTargetDetails>;
|
|
137
|
-
declare function plannerSuccess<TTargetDetails>(plan: SqlMigrationPlan<TTargetDetails>): SqlPlannerSuccessResult<TTargetDetails>;
|
|
138
|
-
declare function plannerFailure(conflicts: readonly SqlPlannerConflict[]): SqlPlannerFailureResult;
|
|
139
|
-
/**
|
|
140
|
-
* Creates a successful migration runner result.
|
|
141
|
-
*/
|
|
142
|
-
declare function runnerSuccess(value: {
|
|
143
|
-
operationsPlanned: number;
|
|
144
|
-
operationsExecuted: number;
|
|
145
|
-
}): Ok<SqlMigrationRunnerSuccessValue>;
|
|
146
|
-
/**
|
|
147
|
-
* Creates a failed migration runner result.
|
|
148
|
-
*/
|
|
149
|
-
declare function runnerFailure(code: SqlMigrationRunnerErrorCode, summary: string, options?: {
|
|
150
|
-
why?: string;
|
|
151
|
-
meta?: AnyRecord;
|
|
152
|
-
}): NotOk<SqlMigrationRunnerFailure>;
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Policy used by `db init`: additive-only operations, no widening/destructive steps.
|
|
156
|
-
*/
|
|
157
|
-
declare const INIT_ADDITIVE_POLICY: MigrationOperationPolicy;
|
|
158
|
-
|
|
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';
|
|
159
7
|
/**
|
|
160
8
|
* SQL family descriptor for control plane (CLI/config).
|
|
161
9
|
* Provides the SQL family hook and conversion helpers.
|
|
162
10
|
*/
|
|
163
11
|
declare const _default: SqlFamilyDescriptor;
|
|
164
|
-
|
|
165
|
-
|
|
12
|
+
export default _default;
|
|
13
|
+
//# sourceMappingURL=control.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
package/dist/exports/control.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSqlFamilyInstance
|
|
3
|
-
} from "
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
3
|
+
} from "../chunk-GYEG3I7U.js";
|
|
4
|
+
import "../chunk-SU7LN2UH.js";
|
|
5
|
+
import "../chunk-XH2Y5NTD.js";
|
|
6
6
|
|
|
7
7
|
// src/core/descriptor.ts
|
|
8
8
|
import { sqlTargetFamilyHook } from "@prisma-next/sql-contract-emitter";
|
|
@@ -12,11 +12,11 @@ var SqlFamilyDescriptor = class {
|
|
|
12
12
|
familyId = "sql";
|
|
13
13
|
version = "0.0.1";
|
|
14
14
|
hook = sqlTargetFamilyHook;
|
|
15
|
-
create(
|
|
15
|
+
create(stack) {
|
|
16
16
|
return createSqlFamilyInstance({
|
|
17
|
-
target:
|
|
18
|
-
adapter:
|
|
19
|
-
extensionPacks:
|
|
17
|
+
target: stack.target,
|
|
18
|
+
adapter: stack.adapter,
|
|
19
|
+
extensionPacks: stack.extensionPacks
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/core/descriptor.ts","../../src/core/migrations/plan-helpers.ts","../../src/core/migrations/policies.ts","../../src/exports/control.ts"],"sourcesContent":["import type {\n ControlAdapterDescriptor,\n ControlDriverDescriptor,\n ControlExtensionDescriptor,\n ControlFamilyDescriptor,\n} from '@prisma-next/core-control-plane/types';\nimport { sqlTargetFamilyHook } from '@prisma-next/sql-contract-emitter';\nimport type { SqlControlAdapter } from './control-adapter';\nimport { createSqlFamilyInstance, type SqlControlFamilyInstance } from './instance';\nimport type { SqlControlTargetDescriptor } from './migrations/types';\n\n/**\n * SQL family descriptor implementation.\n * Provides the SQL family hook and factory method.\n */\nexport class SqlFamilyDescriptor\n implements ControlFamilyDescriptor<'sql', SqlControlFamilyInstance>\n{\n readonly kind = 'family' as const;\n readonly id = 'sql';\n readonly familyId = 'sql' as const;\n readonly version = '0.0.1';\n readonly hook = sqlTargetFamilyHook;\n\n create<TTargetId extends string, TTargetDetails>(options: {\n readonly target: SqlControlTargetDescriptor<TTargetId, TTargetDetails>;\n readonly adapter: ControlAdapterDescriptor<'sql', TTargetId, SqlControlAdapter<TTargetId>>;\n readonly driver: ControlDriverDescriptor<'sql', TTargetId>;\n readonly extensionPacks: readonly ControlExtensionDescriptor<'sql', TTargetId>[];\n }): SqlControlFamilyInstance {\n return createSqlFamilyInstance({\n target: options.target,\n adapter: options.adapter,\n extensionPacks: options.extensionPacks,\n });\n }\n}\n","import type { NotOk, Ok } from '@prisma-next/utils/result';\nimport { notOk, ok } from '@prisma-next/utils/result';\nimport type {\n AnyRecord,\n CreateSqlMigrationPlanOptions,\n SqlMigrationPlan,\n SqlMigrationPlanOperation,\n SqlMigrationPlanOperationStep,\n SqlMigrationPlanOperationTarget,\n SqlMigrationRunnerErrorCode,\n SqlMigrationRunnerFailure,\n SqlMigrationRunnerSuccessValue,\n SqlPlannerConflict,\n SqlPlannerFailureResult,\n SqlPlannerSuccessResult,\n} from './types';\n\nconst readOnlyEmptyObject: Record<string, never> = Object.freeze({});\n\nfunction cloneRecord<T extends AnyRecord>(value: T): T {\n if (value === readOnlyEmptyObject) {\n return value;\n }\n return Object.freeze({ ...value }) as T;\n}\n\nfunction freezeSteps(\n steps: readonly SqlMigrationPlanOperationStep[],\n): readonly SqlMigrationPlanOperationStep[] {\n if (steps.length === 0) {\n return Object.freeze([]);\n }\n return Object.freeze(\n steps.map((step) =>\n Object.freeze({\n description: step.description,\n sql: step.sql,\n ...(step.meta ? { meta: cloneRecord(step.meta) } : {}),\n }),\n ),\n );\n}\n\nfunction freezeDetailsValue<T>(value: T): T {\n // Primitives and null/undefined are already immutable, return as-is\n if (value === null || value === undefined) {\n return value;\n }\n if (typeof value !== 'object') {\n return value;\n }\n // Arrays: shallow clone and freeze\n if (Array.isArray(value)) {\n return Object.freeze([...value]) as T;\n }\n // Objects: shallow clone and freeze (matching cloneRecord pattern)\n return Object.freeze({ ...value }) as T;\n}\n\nfunction freezeTargetDetails<TTargetDetails>(\n target: SqlMigrationPlanOperationTarget<TTargetDetails>,\n): SqlMigrationPlanOperationTarget<TTargetDetails> {\n return Object.freeze({\n id: target.id,\n ...(target.details !== undefined ? { details: freezeDetailsValue(target.details) } : {}),\n });\n}\n\nfunction freezeOperation<TTargetDetails>(\n operation: SqlMigrationPlanOperation<TTargetDetails>,\n): SqlMigrationPlanOperation<TTargetDetails> {\n return Object.freeze({\n id: operation.id,\n label: operation.label,\n ...(operation.summary ? { summary: operation.summary } : {}),\n operationClass: operation.operationClass,\n target: freezeTargetDetails(operation.target),\n precheck: freezeSteps(operation.precheck),\n execute: freezeSteps(operation.execute),\n postcheck: freezeSteps(operation.postcheck),\n ...(operation.meta ? { meta: cloneRecord(operation.meta) } : {}),\n });\n}\n\nfunction freezeOperations<TTargetDetails>(\n operations: readonly SqlMigrationPlanOperation<TTargetDetails>[],\n): readonly SqlMigrationPlanOperation<TTargetDetails>[] {\n if (operations.length === 0) {\n return Object.freeze([]);\n }\n return Object.freeze(operations.map((operation) => freezeOperation(operation)));\n}\n\nexport function createMigrationPlan<TTargetDetails>(\n options: CreateSqlMigrationPlanOptions<TTargetDetails>,\n): SqlMigrationPlan<TTargetDetails> {\n return Object.freeze({\n targetId: options.targetId,\n ...(options.origin !== undefined\n ? { origin: options.origin ? Object.freeze({ ...options.origin }) : null }\n : {}),\n destination: Object.freeze({ ...options.destination }),\n operations: freezeOperations(options.operations),\n ...(options.meta ? { meta: cloneRecord(options.meta) } : {}),\n });\n}\n\nexport function plannerSuccess<TTargetDetails>(\n plan: SqlMigrationPlan<TTargetDetails>,\n): SqlPlannerSuccessResult<TTargetDetails> {\n return Object.freeze({\n kind: 'success',\n plan,\n });\n}\n\nexport function plannerFailure(conflicts: readonly SqlPlannerConflict[]): SqlPlannerFailureResult {\n return Object.freeze({\n kind: 'failure' as const,\n conflicts: Object.freeze(\n conflicts.map((conflict) =>\n Object.freeze({\n kind: conflict.kind,\n summary: conflict.summary,\n ...(conflict.why ? { why: conflict.why } : {}),\n ...(conflict.location ? { location: Object.freeze({ ...conflict.location }) } : {}),\n ...(conflict.meta ? { meta: cloneRecord(conflict.meta) } : {}),\n }),\n ),\n ),\n });\n}\n\n/**\n * Creates a successful migration runner result.\n */\nexport function runnerSuccess(value: {\n operationsPlanned: number;\n operationsExecuted: number;\n}): Ok<SqlMigrationRunnerSuccessValue> {\n return ok(\n Object.freeze({\n operationsPlanned: value.operationsPlanned,\n operationsExecuted: value.operationsExecuted,\n }),\n );\n}\n\n/**\n * Creates a failed migration runner result.\n */\nexport function runnerFailure(\n code: SqlMigrationRunnerErrorCode,\n summary: string,\n options?: { why?: string; meta?: AnyRecord },\n): NotOk<SqlMigrationRunnerFailure> {\n const failure: SqlMigrationRunnerFailure = Object.freeze({\n code,\n summary,\n ...(options?.why ? { why: options.why } : {}),\n ...(options?.meta ? { meta: cloneRecord(options.meta) } : {}),\n });\n return notOk(failure);\n}\n","import type { MigrationOperationPolicy } from '@prisma-next/core-control-plane/types';\n\n/**\n * Policy used by `db init`: additive-only operations, no widening/destructive steps.\n */\nexport const INIT_ADDITIVE_POLICY: MigrationOperationPolicy = Object.freeze({\n allowedOperationClasses: Object.freeze(['additive'] as const),\n});\n","import { SqlFamilyDescriptor } from '../core/descriptor';\n\n// Re-export core types from canonical source\nexport type {\n MigrationOperationClass,\n MigrationOperationPolicy,\n MigrationPlan,\n MigrationPlanner,\n MigrationPlannerConflict,\n MigrationPlannerResult,\n MigrationPlanOperation,\n TargetMigrationsCapability,\n} from '@prisma-next/core-control-plane/types';\nexport type { SchemaVerifyOptions, SqlControlFamilyInstance } from '../core/instance';\nexport {\n createMigrationPlan,\n plannerFailure,\n plannerSuccess,\n runnerFailure,\n runnerSuccess,\n} from '../core/migrations/plan-helpers';\nexport { INIT_ADDITIVE_POLICY } from '../core/migrations/policies';\n// SQL-specific types\nexport type {\n ComponentDatabaseDependencies,\n ComponentDatabaseDependency,\n CreateSqlMigrationPlanOptions,\n SqlControlExtensionDescriptor,\n SqlControlTargetDescriptor,\n SqlMigrationPlan,\n SqlMigrationPlanContractInfo,\n SqlMigrationPlanner,\n SqlMigrationPlannerPlanOptions,\n SqlMigrationPlanOperation,\n SqlMigrationPlanOperationStep,\n SqlMigrationPlanOperationTarget,\n SqlMigrationRunner,\n SqlMigrationRunnerErrorCode,\n SqlMigrationRunnerExecuteCallbacks,\n SqlMigrationRunnerExecuteOptions,\n SqlMigrationRunnerFailure,\n SqlMigrationRunnerResult,\n SqlMigrationRunnerSuccessValue,\n SqlPlannerConflict,\n SqlPlannerConflictKind,\n SqlPlannerConflictLocation,\n SqlPlannerFailureResult,\n SqlPlannerResult,\n SqlPlannerSuccessResult,\n} from '../core/migrations/types';\n\n/**\n * SQL family descriptor for control plane (CLI/config).\n * Provides the SQL family hook and conversion helpers.\n */\nexport default new SqlFamilyDescriptor();\n"],"mappings":";;;;;;;AAMA,SAAS,2BAA2B;AAS7B,IAAM,sBAAN,MAEP;AAAA,EACW,OAAO;AAAA,EACP,KAAK;AAAA,EACL,WAAW;AAAA,EACX,UAAU;AAAA,EACV,OAAO;AAAA,EAEhB,OAAiD,SAKpB;AAC3B,WAAO,wBAAwB;AAAA,MAC7B,QAAQ,QAAQ;AAAA,MAChB,SAAS,QAAQ;AAAA,MACjB,gBAAgB,QAAQ;AAAA,IAC1B,CAAC;AAAA,EACH;AACF;;;ACnCA,SAAS,OAAO,UAAU;AAgB1B,IAAM,sBAA6C,OAAO,OAAO,CAAC,CAAC;AAEnE,SAAS,YAAiC,OAAa;AACrD,MAAI,UAAU,qBAAqB;AACjC,WAAO;AAAA,EACT;AACA,SAAO,OAAO,OAAO,EAAE,GAAG,MAAM,CAAC;AACnC;AAEA,SAAS,YACP,OAC0C;AAC1C,MAAI,MAAM,WAAW,GAAG;AACtB,WAAO,OAAO,OAAO,CAAC,CAAC;AAAA,EACzB;AACA,SAAO,OAAO;AAAA,IACZ,MAAM;AAAA,MAAI,CAAC,SACT,OAAO,OAAO;AAAA,QACZ,aAAa,KAAK;AAAA,QAClB,KAAK,KAAK;AAAA,QACV,GAAI,KAAK,OAAO,EAAE,MAAM,YAAY,KAAK,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I,IAAI,CAAC;AAAA,IAC3C,GAAI,SAAS,OAAO,EAAE,MAAM,YAAY,QAAQ,IAAI,EAAE,IAAI,CAAC;AAAA,EAC7D,CAAC;AACD,SAAO,MAAM,OAAO;AACtB;;;AC9JO,IAAM,uBAAiD,OAAO,OAAO;AAAA,EAC1E,yBAAyB,OAAO,OAAO,CAAC,UAAU,CAAU;AAC9D,CAAC;;;ACgDD,IAAO,kBAAQ,IAAI,oBAAoB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/core/descriptor.ts","../../src/core/migrations/plan-helpers.ts","../../src/core/migrations/policies.ts","../../src/exports/control.ts"],"sourcesContent":["import type {\n ControlFamilyDescriptor,\n ControlPlaneStack,\n} from '@prisma-next/core-control-plane/types';\nimport { sqlTargetFamilyHook } from '@prisma-next/sql-contract-emitter';\nimport { createSqlFamilyInstance, type SqlControlFamilyInstance } from './instance';\n\n/**\n * SQL family descriptor implementation.\n * Provides the SQL family hook and factory method.\n */\nexport class SqlFamilyDescriptor\n implements ControlFamilyDescriptor<'sql', SqlControlFamilyInstance>\n{\n readonly kind = 'family' as const;\n readonly id = 'sql';\n readonly familyId = 'sql' as const;\n readonly version = '0.0.1';\n readonly hook = sqlTargetFamilyHook;\n\n create<TTargetId extends string>(\n stack: ControlPlaneStack<'sql', TTargetId>,\n ): SqlControlFamilyInstance {\n // Note: driver is not passed here because SqlFamilyInstance operations\n // (validate, emit, etc.) don't require DB connectivity. Commands that\n // need the driver (verify, introspect) get it directly from the stack.\n return createSqlFamilyInstance({\n target: stack.target,\n adapter: stack.adapter,\n extensionPacks: stack.extensionPacks,\n });\n }\n}\n","import type { NotOk, Ok } from '@prisma-next/utils/result';\nimport { notOk, ok } from '@prisma-next/utils/result';\nimport type {\n AnyRecord,\n CreateSqlMigrationPlanOptions,\n SqlMigrationPlan,\n SqlMigrationPlanOperation,\n SqlMigrationPlanOperationStep,\n SqlMigrationPlanOperationTarget,\n SqlMigrationRunnerErrorCode,\n SqlMigrationRunnerFailure,\n SqlMigrationRunnerSuccessValue,\n SqlPlannerConflict,\n SqlPlannerFailureResult,\n SqlPlannerSuccessResult,\n} from './types';\n\nconst readOnlyEmptyObject: Record<string, never> = Object.freeze({});\n\nfunction cloneRecord<T extends AnyRecord>(value: T): T {\n if (value === readOnlyEmptyObject) {\n return value;\n }\n return Object.freeze({ ...value }) as T;\n}\n\nfunction freezeSteps(\n steps: readonly SqlMigrationPlanOperationStep[],\n): readonly SqlMigrationPlanOperationStep[] {\n if (steps.length === 0) {\n return Object.freeze([]);\n }\n return Object.freeze(\n steps.map((step) =>\n Object.freeze({\n description: step.description,\n sql: step.sql,\n ...(step.meta ? { meta: cloneRecord(step.meta) } : {}),\n }),\n ),\n );\n}\n\nfunction freezeDetailsValue<T>(value: T): T {\n // Primitives and null/undefined are already immutable, return as-is\n if (value === null || value === undefined) {\n return value;\n }\n if (typeof value !== 'object') {\n return value;\n }\n // Arrays: shallow clone and freeze\n if (Array.isArray(value)) {\n return Object.freeze([...value]) as T;\n }\n // Objects: shallow clone and freeze (matching cloneRecord pattern)\n return Object.freeze({ ...value }) as T;\n}\n\nfunction freezeTargetDetails<TTargetDetails>(\n target: SqlMigrationPlanOperationTarget<TTargetDetails>,\n): SqlMigrationPlanOperationTarget<TTargetDetails> {\n return Object.freeze({\n id: target.id,\n ...(target.details !== undefined ? { details: freezeDetailsValue(target.details) } : {}),\n });\n}\n\nfunction freezeOperation<TTargetDetails>(\n operation: SqlMigrationPlanOperation<TTargetDetails>,\n): SqlMigrationPlanOperation<TTargetDetails> {\n return Object.freeze({\n id: operation.id,\n label: operation.label,\n ...(operation.summary ? { summary: operation.summary } : {}),\n operationClass: operation.operationClass,\n target: freezeTargetDetails(operation.target),\n precheck: freezeSteps(operation.precheck),\n execute: freezeSteps(operation.execute),\n postcheck: freezeSteps(operation.postcheck),\n ...(operation.meta ? { meta: cloneRecord(operation.meta) } : {}),\n });\n}\n\nfunction freezeOperations<TTargetDetails>(\n operations: readonly SqlMigrationPlanOperation<TTargetDetails>[],\n): readonly SqlMigrationPlanOperation<TTargetDetails>[] {\n if (operations.length === 0) {\n return Object.freeze([]);\n }\n return Object.freeze(operations.map((operation) => freezeOperation(operation)));\n}\n\nexport function createMigrationPlan<TTargetDetails>(\n options: CreateSqlMigrationPlanOptions<TTargetDetails>,\n): SqlMigrationPlan<TTargetDetails> {\n return Object.freeze({\n targetId: options.targetId,\n ...(options.origin !== undefined\n ? { origin: options.origin ? Object.freeze({ ...options.origin }) : null }\n : {}),\n destination: Object.freeze({ ...options.destination }),\n operations: freezeOperations(options.operations),\n ...(options.meta ? { meta: cloneRecord(options.meta) } : {}),\n });\n}\n\nexport function plannerSuccess<TTargetDetails>(\n plan: SqlMigrationPlan<TTargetDetails>,\n): SqlPlannerSuccessResult<TTargetDetails> {\n return Object.freeze({\n kind: 'success',\n plan,\n });\n}\n\nexport function plannerFailure(conflicts: readonly SqlPlannerConflict[]): SqlPlannerFailureResult {\n return Object.freeze({\n kind: 'failure' as const,\n conflicts: Object.freeze(\n conflicts.map((conflict) =>\n Object.freeze({\n kind: conflict.kind,\n summary: conflict.summary,\n ...(conflict.why ? { why: conflict.why } : {}),\n ...(conflict.location ? { location: Object.freeze({ ...conflict.location }) } : {}),\n ...(conflict.meta ? { meta: cloneRecord(conflict.meta) } : {}),\n }),\n ),\n ),\n });\n}\n\n/**\n * Creates a successful migration runner result.\n */\nexport function runnerSuccess(value: {\n operationsPlanned: number;\n operationsExecuted: number;\n}): Ok<SqlMigrationRunnerSuccessValue> {\n return ok(\n Object.freeze({\n operationsPlanned: value.operationsPlanned,\n operationsExecuted: value.operationsExecuted,\n }),\n );\n}\n\n/**\n * Creates a failed migration runner result.\n */\nexport function runnerFailure(\n code: SqlMigrationRunnerErrorCode,\n summary: string,\n options?: { why?: string; meta?: AnyRecord },\n): NotOk<SqlMigrationRunnerFailure> {\n const failure: SqlMigrationRunnerFailure = Object.freeze({\n code,\n summary,\n ...(options?.why ? { why: options.why } : {}),\n ...(options?.meta ? { meta: cloneRecord(options.meta) } : {}),\n });\n return notOk(failure);\n}\n","import type { MigrationOperationPolicy } from '@prisma-next/core-control-plane/types';\n\n/**\n * Policy used by `db init`: additive-only operations, no widening/destructive steps.\n */\nexport const INIT_ADDITIVE_POLICY: MigrationOperationPolicy = Object.freeze({\n allowedOperationClasses: Object.freeze(['additive'] as const),\n});\n","import { SqlFamilyDescriptor } from '../core/descriptor';\n\n// Re-export core types from canonical source\nexport type {\n MigrationOperationClass,\n MigrationOperationPolicy,\n MigrationPlan,\n MigrationPlanner,\n MigrationPlannerConflict,\n MigrationPlannerResult,\n MigrationPlanOperation,\n TargetMigrationsCapability,\n} from '@prisma-next/core-control-plane/types';\nexport type { SchemaVerifyOptions, SqlControlFamilyInstance } from '../core/instance';\nexport {\n createMigrationPlan,\n plannerFailure,\n plannerSuccess,\n runnerFailure,\n runnerSuccess,\n} from '../core/migrations/plan-helpers';\nexport { INIT_ADDITIVE_POLICY } from '../core/migrations/policies';\n// SQL-specific types\nexport type {\n ComponentDatabaseDependencies,\n ComponentDatabaseDependency,\n CreateSqlMigrationPlanOptions,\n SqlControlExtensionDescriptor,\n SqlControlTargetDescriptor,\n SqlMigrationPlan,\n SqlMigrationPlanContractInfo,\n SqlMigrationPlanner,\n SqlMigrationPlannerPlanOptions,\n SqlMigrationPlanOperation,\n SqlMigrationPlanOperationStep,\n SqlMigrationPlanOperationTarget,\n SqlMigrationRunner,\n SqlMigrationRunnerErrorCode,\n SqlMigrationRunnerExecuteCallbacks,\n SqlMigrationRunnerExecuteOptions,\n SqlMigrationRunnerFailure,\n SqlMigrationRunnerResult,\n SqlMigrationRunnerSuccessValue,\n SqlPlannerConflict,\n SqlPlannerConflictKind,\n SqlPlannerConflictLocation,\n SqlPlannerFailureResult,\n SqlPlannerResult,\n SqlPlannerSuccessResult,\n} from '../core/migrations/types';\n\n/**\n * SQL family descriptor for control plane (CLI/config).\n * Provides the SQL family hook and conversion helpers.\n */\nexport default new SqlFamilyDescriptor();\n"],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AAS,eAAe,WAAmE;AAChG,SAAO,OAAO,OAAO;AAAA,IACnB,MAAM;AAAA,IACN,WAAW,OAAO;AAAA,MAChB,UAAU;AAAA,QAAI,CAAC,aACb,OAAO,OAAO;AAAA,UACZ,MAAM,SAAS;AAAA,UACf,SAAS,SAAS;AAAA,UAClB,GAAI,SAAS,MAAM,EAAE,KAAK,SAAS,IAAI,IAAI,CAAC;AAAA,UAC5C,GAAI,SAAS,WAAW,EAAE,UAAU,OAAO,OAAO,EAAE,GAAG,SAAS,SAAS,CAAC,EAAE,IAAI,CAAC;AAAA,UACjF,GAAI,SAAS,OAAO,EAAE,MAAM,YAAY,SAAS,IAAI,EAAE,IAAI,CAAC;AAAA,QAC9D,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF,CAAC;AACH;AAKO,SAAS,cAAc,OAGS;AACrC,SAAO;AAAA,IACL,OAAO,OAAO;AAAA,MACZ,mBAAmB,MAAM;AAAA,MACzB,oBAAoB,MAAM;AAAA,IAC5B,CAAC;AAAA,EACH;AACF;AAKO,SAAS,cACd,MACA,SACA,SACkC;AAClC,QAAM,UAAqC,OAAO,OAAO;AAAA,IACvD;AAAA,IACA;AAAA,IACA,GAAI,SAAS,MAAM,EAAE,KAAK,QAAQ,IAAI,IAAI,CAAC;AAAA,IAC3C,GAAI,SAAS,OAAO,EAAE,MAAM,YAAY,QAAQ,IAAI,EAAE,IAAI,CAAC;AAAA,EAC7D,CAAC;AACD,SAAO,MAAM,OAAO;AACtB;;;AC9JO,IAAM,uBAAiD,OAAO,OAAO;AAAA,EAC1E,yBAAyB,OAAO,OAAO,CAAC,UAAU,CAAU;AAC9D,CAAC;;;ACgDD,IAAO,kBAAQ,IAAI,oBAAoB;","names":[]}
|
|
@@ -1,66 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { RuntimeVerifyOptions, Plugin, Log } from '@prisma-next/runtime-executor';
|
|
3
|
-
import { SqlContract, SqlStorage } from '@prisma-next/sql-contract/types';
|
|
4
|
-
import { Adapter, SelectAst, LoweredStatement, SqlDriver } from '@prisma-next/sql-relational-core/ast';
|
|
5
|
-
import { Runtime, SqlRuntimeAdapterInstance } from '@prisma-next/sql-runtime';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* SQL runtime driver instance type.
|
|
9
|
-
* Combines identity properties with SQL-specific behavior methods.
|
|
10
|
-
*/
|
|
11
|
-
type SqlRuntimeDriverInstance<TTargetId extends string = string> = RuntimeDriverInstance<'sql', TTargetId> & SqlDriver;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* SQL runtime family instance interface.
|
|
15
|
-
* Extends base RuntimeFamilyInstance with SQL-specific runtime creation method.
|
|
16
|
-
*/
|
|
17
|
-
interface SqlRuntimeFamilyInstance extends RuntimeFamilyInstance<'sql'> {
|
|
18
|
-
/**
|
|
19
|
-
* Creates a SQL runtime from contract, driver options, and verification settings.
|
|
20
|
-
*
|
|
21
|
-
* Extension packs are routed through composition (at instance creation time),
|
|
22
|
-
* not through this method. This aligns with control-plane composition patterns.
|
|
23
|
-
*
|
|
24
|
-
* @param options - Runtime creation options
|
|
25
|
-
* @param options.contract - SQL contract
|
|
26
|
-
* @param options.driverOptions - Driver options (e.g., PostgresDriverOptions)
|
|
27
|
-
* @param options.verify - Runtime verification options
|
|
28
|
-
* @param options.plugins - Optional plugins
|
|
29
|
-
* @param options.mode - Optional runtime mode
|
|
30
|
-
* @param options.log - Optional log instance
|
|
31
|
-
* @returns Runtime instance
|
|
32
|
-
*/
|
|
33
|
-
createRuntime<TContract extends SqlContract<SqlStorage>>(options: {
|
|
34
|
-
readonly contract: TContract;
|
|
35
|
-
readonly driverOptions: unknown;
|
|
36
|
-
readonly verify: RuntimeVerifyOptions;
|
|
37
|
-
readonly plugins?: readonly Plugin<TContract, Adapter<SelectAst, SqlContract<SqlStorage>, LoweredStatement>, SqlDriver>[];
|
|
38
|
-
readonly mode?: 'strict' | 'permissive';
|
|
39
|
-
readonly log?: Log;
|
|
40
|
-
}): Runtime;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* SQL runtime family descriptor implementation.
|
|
45
|
-
* Provides factory method to create SQL runtime family instance.
|
|
46
|
-
*/
|
|
47
|
-
declare class SqlRuntimeFamilyDescriptor implements RuntimeFamilyDescriptor<'sql', SqlRuntimeFamilyInstance> {
|
|
48
|
-
readonly kind: "family";
|
|
49
|
-
readonly id = "sql";
|
|
50
|
-
readonly familyId: "sql";
|
|
51
|
-
readonly version = "0.0.1";
|
|
52
|
-
create<TTargetId extends string>(options: {
|
|
53
|
-
readonly target: RuntimeTargetDescriptor<'sql', TTargetId>;
|
|
54
|
-
readonly adapter: RuntimeAdapterDescriptor<'sql', TTargetId, SqlRuntimeAdapterInstance<TTargetId>>;
|
|
55
|
-
readonly driver: RuntimeDriverDescriptor<'sql', TTargetId, SqlRuntimeDriverInstance<TTargetId>>;
|
|
56
|
-
readonly extensionPacks: readonly RuntimeExtensionDescriptor<'sql', TTargetId>[];
|
|
57
|
-
}): SqlRuntimeFamilyInstance;
|
|
58
|
-
}
|
|
59
|
-
|
|
1
|
+
import { SqlRuntimeFamilyDescriptor } from '../core/runtime-descriptor';
|
|
60
2
|
/**
|
|
61
3
|
* SQL runtime family descriptor for execution/runtime plane.
|
|
62
4
|
* Provides factory method to create SQL runtime family instance.
|
|
63
5
|
*/
|
|
64
6
|
declare const _default: SqlRuntimeFamilyDescriptor;
|
|
65
|
-
|
|
66
|
-
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/exports/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAExE;;;GAGG;;AACH,wBAAgD"}
|
|
@@ -1,75 +1,11 @@
|
|
|
1
|
-
import { SchemaIssue, SchemaVerificationNode, OperationContext, VerifyDatabaseSchemaResult } from '@prisma-next/core-control-plane/types';
|
|
2
|
-
import { SqlSchemaIR } from '@prisma-next/sql-schema-ir/types';
|
|
3
|
-
import { i as ComponentDatabaseDependency } from './types-Bh7ftf0Q.js';
|
|
4
|
-
import { TargetBoundComponentDescriptor } from '@prisma-next/contract/framework-components';
|
|
5
|
-
import { SqlContract, SqlStorage } from '@prisma-next/sql-contract/types';
|
|
6
|
-
import '@prisma-next/utils/result';
|
|
7
|
-
import './instance-DiZi2k_2.js';
|
|
8
|
-
import '@prisma-next/contract/ir';
|
|
9
|
-
import '@prisma-next/contract/pack-manifest-types';
|
|
10
|
-
import '@prisma-next/contract/types';
|
|
11
|
-
import '@prisma-next/core-control-plane/schema-view';
|
|
12
|
-
import '@prisma-next/operations';
|
|
13
|
-
import '@prisma-next/sql-operations';
|
|
14
|
-
|
|
15
1
|
/**
|
|
16
|
-
* Pure
|
|
17
|
-
* These functions verify schema IR against contract requirements.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Compares two arrays of strings for equality (order-sensitive).
|
|
22
|
-
*/
|
|
23
|
-
declare function arraysEqual(a: readonly string[], b: readonly string[]): boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Verifies database dependencies are installed using component-owned verification hooks.
|
|
26
|
-
* Each dependency provides a pure verifyDatabaseDependencyInstalled function that checks
|
|
27
|
-
* whether the dependency is satisfied based on the in-memory schema IR (no DB I/O).
|
|
28
|
-
*
|
|
29
|
-
* Returns verification nodes for the tree.
|
|
30
|
-
*/
|
|
31
|
-
declare function verifyDatabaseDependencies(dependencies: ReadonlyArray<ComponentDatabaseDependency<unknown>>, schema: SqlSchemaIR, issues: SchemaIssue[]): SchemaVerificationNode[];
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Pure SQL schema verification function.
|
|
35
|
-
*
|
|
36
|
-
* This module provides a pure function that verifies a SqlSchemaIR against
|
|
37
|
-
* a SqlContract without requiring a database connection. It can be reused
|
|
38
|
-
* by migration planners and other tools that need to compare schema states.
|
|
39
|
-
*/
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Options for the pure schema verification function.
|
|
43
|
-
*/
|
|
44
|
-
interface VerifySqlSchemaOptions {
|
|
45
|
-
/** The validated SQL contract to verify against */
|
|
46
|
-
readonly contract: SqlContract<SqlStorage>;
|
|
47
|
-
/** The schema IR from introspection (or another source) */
|
|
48
|
-
readonly schema: SqlSchemaIR;
|
|
49
|
-
/** Whether to run in strict mode (detects extra tables/columns) */
|
|
50
|
-
readonly strict: boolean;
|
|
51
|
-
/** Optional operation context for metadata */
|
|
52
|
-
readonly context?: OperationContext;
|
|
53
|
-
/** Type metadata registry for codec consistency warnings */
|
|
54
|
-
readonly typeMetadataRegistry: ReadonlyMap<string, {
|
|
55
|
-
nativeType?: string;
|
|
56
|
-
}>;
|
|
57
|
-
/**
|
|
58
|
-
* Active framework components participating in this composition.
|
|
59
|
-
* All components must have matching familyId ('sql') and targetId.
|
|
60
|
-
*/
|
|
61
|
-
readonly frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<'sql', string>>;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Verifies that a SqlSchemaIR matches a SqlContract.
|
|
65
|
-
*
|
|
66
|
-
* This is a pure function that does NOT perform any database I/O.
|
|
67
|
-
* It takes an already-introspected schema IR and compares it against
|
|
68
|
-
* the contract requirements.
|
|
2
|
+
* Pure schema verification exports.
|
|
69
3
|
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
4
|
+
* This module exports the pure schema verification function that can be used
|
|
5
|
+
* without a database connection. It's suitable for migration planning and
|
|
6
|
+
* other tools that need to compare schema states.
|
|
72
7
|
*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
export {
|
|
8
|
+
export { arraysEqual, isIndexSatisfied, isUniqueConstraintSatisfied, verifyDatabaseDependencies, } from '../core/schema-verify/verify-helpers';
|
|
9
|
+
export type { VerifySqlSchemaOptions } from '../core/schema-verify/verify-sql-schema';
|
|
10
|
+
export { verifySqlSchema } from '../core/schema-verify/verify-sql-schema';
|
|
11
|
+
//# sourceMappingURL=schema-verify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-verify.d.ts","sourceRoot":"","sources":["../../src/exports/schema-verify.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
arraysEqual,
|
|
3
|
+
isIndexSatisfied,
|
|
4
|
+
isUniqueConstraintSatisfied,
|
|
3
5
|
verifyDatabaseDependencies,
|
|
4
6
|
verifySqlSchema
|
|
5
|
-
} from "
|
|
7
|
+
} from "../chunk-XH2Y5NTD.js";
|
|
6
8
|
export {
|
|
7
9
|
arraysEqual,
|
|
10
|
+
isIndexSatisfied,
|
|
11
|
+
isUniqueConstraintSatisfied,
|
|
8
12
|
verifyDatabaseDependencies,
|
|
9
13
|
verifySqlSchema
|
|
10
14
|
};
|
|
@@ -1,33 +1,7 @@
|
|
|
1
|
-
import { OperationManifest } from '@prisma-next/contract/pack-manifest-types';
|
|
2
|
-
import { TypesImportSpec } from '@prisma-next/contract/types';
|
|
3
|
-
import { ControlTargetDescriptor, ControlAdapterDescriptor, ControlExtensionDescriptor } from '@prisma-next/core-control-plane/types';
|
|
4
|
-
import { OperationSignature, OperationRegistry } from '@prisma-next/operations';
|
|
5
|
-
export { c as convertOperationManifest } from './instance-DiZi2k_2.js';
|
|
6
|
-
import '@prisma-next/contract/framework-components';
|
|
7
|
-
import '@prisma-next/contract/ir';
|
|
8
|
-
import '@prisma-next/core-control-plane/schema-view';
|
|
9
|
-
import '@prisma-next/sql-operations';
|
|
10
|
-
import '@prisma-next/sql-schema-ir/types';
|
|
11
|
-
|
|
12
1
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* conversion function, and registers them in a new registry.
|
|
2
|
+
* Test utilities for working with component descriptors.
|
|
3
|
+
* These functions operate on descriptors directly, used in tests and integration tests.
|
|
16
4
|
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
*/
|
|
21
|
-
declare function extractCodecTypeImports(descriptors: ReadonlyArray<ControlTargetDescriptor<'sql', string> | ControlAdapterDescriptor<'sql', string> | ControlExtensionDescriptor<'sql', string>>): ReadonlyArray<TypesImportSpec>;
|
|
22
|
-
/**
|
|
23
|
-
* Extracts operation type imports from descriptors for contract.d.ts generation.
|
|
24
|
-
*/
|
|
25
|
-
declare function extractOperationTypeImports(descriptors: ReadonlyArray<ControlTargetDescriptor<'sql', string> | ControlAdapterDescriptor<'sql', string> | ControlExtensionDescriptor<'sql', string>>): ReadonlyArray<TypesImportSpec>;
|
|
26
|
-
/**
|
|
27
|
-
* Extracts extension IDs from descriptors in deterministic order:
|
|
28
|
-
* [adapter.id, target.id, ...extensions.map(e => e.id)]
|
|
29
|
-
* Deduplicates while preserving stable order.
|
|
30
|
-
*/
|
|
31
|
-
declare function extractExtensionIds(adapter: ControlAdapterDescriptor<'sql', string>, target: ControlTargetDescriptor<'sql', string>, extensions: ReadonlyArray<ControlExtensionDescriptor<'sql', string>>): ReadonlyArray<string>;
|
|
32
|
-
|
|
33
|
-
export { assembleOperationRegistry, extractCodecTypeImports, extractExtensionIds, extractOperationTypeImports };
|
|
5
|
+
export { assembleOperationRegistry, extractCodecTypeImports, extractExtensionIds, extractOperationTypeImports, } from '../core/assembly';
|
|
6
|
+
export { convertOperationManifest } from '../core/instance';
|
|
7
|
+
//# sourceMappingURL=test-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../../src/exports/test-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,mBAAmB,EACnB,2BAA2B,GAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
extractCodecTypeImports,
|
|
5
5
|
extractExtensionIds,
|
|
6
6
|
extractOperationTypeImports
|
|
7
|
-
} from "
|
|
8
|
-
import "
|
|
9
|
-
import "
|
|
7
|
+
} from "../chunk-GYEG3I7U.js";
|
|
8
|
+
import "../chunk-SU7LN2UH.js";
|
|
9
|
+
import "../chunk-XH2Y5NTD.js";
|
|
10
10
|
export {
|
|
11
11
|
assembleOperationRegistry,
|
|
12
12
|
convertOperationManifest,
|
package/dist/exports/verify.d.ts
CHANGED
|
@@ -1,28 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Parses a contract marker row from database query result.
|
|
6
|
-
* This is SQL-specific parsing logic (handles SQL row structure with snake_case columns).
|
|
7
|
-
*/
|
|
8
|
-
declare function parseContractMarkerRow(row: unknown): ContractMarkerRecord;
|
|
9
|
-
/**
|
|
10
|
-
* Returns the SQL statement to read the contract marker.
|
|
11
|
-
* This is a migration-plane helper (no runtime imports).
|
|
12
|
-
* @internal - Used internally by readMarker(). Prefer readMarker() for Control Plane usage.
|
|
13
|
-
*/
|
|
14
|
-
declare function readMarkerSql(): {
|
|
15
|
-
readonly sql: string;
|
|
16
|
-
readonly params: readonly unknown[];
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Reads the contract marker from the database using the provided driver.
|
|
20
|
-
* Returns the parsed marker record or null if no marker is found.
|
|
21
|
-
* This abstracts SQL-specific details from the Control Plane.
|
|
22
|
-
*
|
|
23
|
-
* @param driver - ControlDriverInstance instance for executing queries
|
|
24
|
-
* @returns Promise resolving to ContractMarkerRecord or null if marker not found
|
|
25
|
-
*/
|
|
26
|
-
declare function readMarker(driver: ControlDriverInstance<'sql', string>): Promise<ContractMarkerRecord | null>;
|
|
27
|
-
|
|
28
|
-
export { parseContractMarkerRow, readMarker, readMarkerSql };
|
|
1
|
+
export { parseContractMarkerRow, readMarker, readMarkerSql } from '../core/verify';
|
|
2
|
+
//# sourceMappingURL=verify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../src/exports/verify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/exports/verify.js
CHANGED
package/package.json
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma-next/family-sql",
|
|
3
|
-
"version": "0.3.0-dev.
|
|
3
|
+
"version": "0.3.0-dev.30",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "SQL family descriptor for Prisma Next",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"arktype": "^2.0.0",
|
|
9
|
-
"@prisma-next/
|
|
10
|
-
"@prisma-next/
|
|
11
|
-
"@prisma-next/core-control-plane": "0.3.0-dev.
|
|
12
|
-
"@prisma-next/core-execution-plane": "0.3.0-dev.
|
|
13
|
-
"@prisma-next/operations": "0.3.0-dev.
|
|
14
|
-
"@prisma-next/runtime-executor": "0.3.0-dev.
|
|
15
|
-
"@prisma-next/sql-contract
|
|
16
|
-
"@prisma-next/sql-contract-
|
|
17
|
-
"@prisma-next/sql-contract": "0.3.0-dev.
|
|
18
|
-
"@prisma-next/sql-operations": "0.3.0-dev.
|
|
19
|
-
"@prisma-next/sql-relational-core": "0.3.0-dev.
|
|
20
|
-
"@prisma-next/sql-runtime": "0.3.0-dev.
|
|
21
|
-
"@prisma-next/sql-schema-ir": "0.3.0-dev.
|
|
22
|
-
"@prisma-next/utils": "0.3.0-dev.
|
|
9
|
+
"@prisma-next/contract": "0.3.0-dev.30",
|
|
10
|
+
"@prisma-next/cli": "0.3.0-dev.30",
|
|
11
|
+
"@prisma-next/core-control-plane": "0.3.0-dev.30",
|
|
12
|
+
"@prisma-next/core-execution-plane": "0.3.0-dev.30",
|
|
13
|
+
"@prisma-next/operations": "0.3.0-dev.30",
|
|
14
|
+
"@prisma-next/runtime-executor": "0.3.0-dev.30",
|
|
15
|
+
"@prisma-next/sql-contract": "0.3.0-dev.30",
|
|
16
|
+
"@prisma-next/sql-contract-emitter": "0.3.0-dev.30",
|
|
17
|
+
"@prisma-next/sql-contract-ts": "0.3.0-dev.30",
|
|
18
|
+
"@prisma-next/sql-operations": "0.3.0-dev.30",
|
|
19
|
+
"@prisma-next/sql-relational-core": "0.3.0-dev.30",
|
|
20
|
+
"@prisma-next/sql-runtime": "0.3.0-dev.30",
|
|
21
|
+
"@prisma-next/sql-schema-ir": "0.3.0-dev.30",
|
|
22
|
+
"@prisma-next/utils": "0.3.0-dev.30"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"@prisma-next/
|
|
31
|
-
"@prisma-next/test-utils": "0.0.1"
|
|
25
|
+
"tsup": "8.5.1",
|
|
26
|
+
"typescript": "5.9.3",
|
|
27
|
+
"vitest": "4.0.16",
|
|
28
|
+
"@prisma-next/driver-postgres": "0.3.0-dev.30",
|
|
29
|
+
"@prisma-next/test-utils": "0.0.1",
|
|
30
|
+
"@prisma-next/tsconfig": "0.0.0"
|
|
32
31
|
},
|
|
33
32
|
"files": [
|
|
34
|
-
"dist"
|
|
33
|
+
"dist",
|
|
34
|
+
"src"
|
|
35
35
|
],
|
|
36
36
|
"exports": {
|
|
37
37
|
"./control": {
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
|
-
"build": "tsup --config tsup.config.ts",
|
|
63
|
+
"build": "tsup --config tsup.config.ts && tsc --project tsconfig.build.json",
|
|
64
64
|
"test": "vitest run",
|
|
65
65
|
"test:coverage": "vitest run --coverage",
|
|
66
66
|
"typecheck": "tsc --project tsconfig.json --noEmit",
|
|
67
|
-
"lint": "biome check . --
|
|
68
|
-
"clean": "
|
|
67
|
+
"lint": "biome check . --error-on-warnings",
|
|
68
|
+
"clean": "rm -rf dist dist-tsc dist-tsc-prod coverage .tmp-output"
|
|
69
69
|
}
|
|
70
70
|
}
|