@prisma-next/family-sql 0.13.0-dev.4 → 0.13.0-dev.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring-type-constructors-CjFfO6LM.mjs +342 -0
- package/dist/authoring-type-constructors-CjFfO6LM.mjs.map +1 -0
- package/dist/{control-adapter-CgIL9Vtx.d.mts → control-adapter-Cmw9LvEP.d.mts} +16 -33
- package/dist/control-adapter-Cmw9LvEP.d.mts.map +1 -0
- package/dist/control-adapter.d.mts +2 -2
- package/dist/control.d.mts +36 -34
- package/dist/control.d.mts.map +1 -1
- package/dist/control.mjs +24 -77
- package/dist/control.mjs.map +1 -1
- package/dist/ir.d.mts +6 -4
- package/dist/ir.d.mts.map +1 -1
- package/dist/ir.mjs +1 -1
- package/dist/migration.d.mts +1 -1
- package/dist/migration.d.mts.map +1 -1
- package/dist/migration.mjs +2 -1
- package/dist/migration.mjs.map +1 -1
- package/dist/pack.d.mts +16 -3
- package/dist/pack.d.mts.map +1 -1
- package/dist/pack.mjs +4 -2
- package/dist/pack.mjs.map +1 -1
- package/dist/schema-verify.d.mts +1 -1
- package/dist/schema-verify.mjs +1 -1
- package/dist/{sql-contract-serializer-CY7qnms7.mjs → sql-contract-serializer-BR2vC7Z-.mjs} +27 -27
- package/dist/sql-contract-serializer-BR2vC7Z-.mjs.map +1 -0
- package/dist/{types-CbwQCzXY.d.mts → types-kgstZ_Zd.d.mts} +5 -5
- package/dist/types-kgstZ_Zd.d.mts.map +1 -0
- package/dist/{verify-sql-schema-DcMaT5Zj.d.mts → verify-sql-schema-thU-jKpf.d.mts} +2 -14
- package/dist/verify-sql-schema-thU-jKpf.d.mts.map +1 -0
- package/dist/{verify-sql-schema-DlAgBiT_.mjs → verify-sql-schema-xT4udQLQ.mjs} +25 -118
- package/dist/verify-sql-schema-xT4udQLQ.mjs.map +1 -0
- package/package.json +21 -21
- package/src/core/authoring-entity-types.ts +178 -0
- package/src/core/authoring-field-presets.ts +8 -3
- package/src/core/control-adapter.ts +18 -49
- package/src/core/control-descriptor.ts +3 -0
- package/src/core/control-instance.ts +13 -11
- package/src/core/ir/sql-contract-serializer-base.ts +44 -75
- package/src/core/ir/sql-contract-serializer.ts +7 -0
- package/src/core/migrations/contract-to-schema-ir.ts +47 -112
- package/src/core/migrations/types.ts +4 -1
- package/src/core/psl-contract-infer/postgres-type-map.ts +5 -13
- package/src/core/psl-contract-infer/sql-schema-ir-to-psl-ast.ts +17 -70
- package/src/core/schema-verify/verify-sql-schema.ts +10 -146
- package/src/core/sql-migration.ts +5 -1
- package/src/exports/control-adapter.ts +1 -0
- package/src/exports/control.ts +1 -1
- package/src/exports/pack.ts +3 -0
- package/dist/authoring-type-constructors-D4lQ-qpj.mjs +0 -192
- package/dist/authoring-type-constructors-D4lQ-qpj.mjs.map +0 -1
- package/dist/control-adapter-CgIL9Vtx.d.mts.map +0 -1
- package/dist/sql-contract-serializer-CY7qnms7.mjs.map +0 -1
- package/dist/types-CbwQCzXY.d.mts.map +0 -1
- package/dist/verify-sql-schema-DcMaT5Zj.d.mts.map +0 -1
- package/dist/verify-sql-schema-DlAgBiT_.mjs.map +0 -1
package/dist/ir.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ContractSerializer, SchemaIssue, SchemaVerifier, SchemaVerifyOptions, SchemaVerifyResult } from "@prisma-next/framework-components/control";
|
|
2
|
-
import { Namespace } from "@prisma-next/framework-components/ir";
|
|
2
|
+
import { AnyEntityKindDescriptor, Namespace } from "@prisma-next/framework-components/ir";
|
|
3
3
|
import { SqlNamespaceTablesInput, SqlStorage, SqlStorageTypeEntry } from "@prisma-next/sql-contract/types";
|
|
4
|
-
import { Type } from "arktype";
|
|
5
4
|
import { Contract } from "@prisma-next/contract/types";
|
|
6
5
|
import { JsonObject } from "@prisma-next/utils/json";
|
|
7
6
|
|
|
@@ -32,15 +31,17 @@ type SqlEntityHydrationFactory = (entry: unknown) => unknown;
|
|
|
32
31
|
* `serializeContract` directly.
|
|
33
32
|
*/
|
|
34
33
|
declare abstract class SqlContractSerializerBase<TContract extends Contract<SqlStorage>> implements ContractSerializer<TContract> {
|
|
35
|
-
protected readonly
|
|
34
|
+
protected readonly entityHydrationRegistry: ReadonlyMap<string, SqlEntityHydrationFactory>;
|
|
36
35
|
private readonly contractSchema;
|
|
37
|
-
|
|
36
|
+
private readonly entryKinds;
|
|
37
|
+
constructor(entityHydrationRegistry?: ReadonlyMap<string, SqlEntityHydrationFactory>, packEntityKinds?: readonly AnyEntityKindDescriptor[]);
|
|
38
38
|
deserializeContract<T extends TContract = TContract>(json: unknown): T;
|
|
39
39
|
serializeContract(contract: TContract): JsonObject;
|
|
40
40
|
shouldPreserveEmpty: import("@prisma-next/contract/hashing").PreserveEmptyPredicate;
|
|
41
41
|
sortStorage: import("@prisma-next/contract/hashing").StorageSort;
|
|
42
42
|
protected parseSqlContractStructure(json: unknown): Contract<SqlStorage>;
|
|
43
43
|
protected hydrateSqlStorage(validated: Contract<SqlStorage>): Contract<SqlStorage>;
|
|
44
|
+
protected abstract get defaultNamespaceId(): string;
|
|
44
45
|
protected hydrateSqlNamespaceMap(namespaces: Readonly<Record<string, Namespace | Record<string, unknown>>>): Readonly<Record<string, Namespace>>;
|
|
45
46
|
protected hydrateSqlNamespaceEntry(nsId: string, raw: Namespace | Record<string, unknown>): Namespace | SqlNamespaceTablesInput;
|
|
46
47
|
protected hydrateStorageTypeEntry(entry: SqlStorageTypeEntry): SqlStorageTypeEntry;
|
|
@@ -59,6 +60,7 @@ declare abstract class SqlContractSerializerBase<TContract extends Contract<SqlS
|
|
|
59
60
|
*/
|
|
60
61
|
declare class SqlContractSerializer extends SqlContractSerializerBase<Contract<SqlStorage>> {
|
|
61
62
|
constructor();
|
|
63
|
+
protected get defaultNamespaceId(): string;
|
|
62
64
|
}
|
|
63
65
|
//#endregion
|
|
64
66
|
//#region src/core/ir/sql-schema-verifier-base.d.ts
|
package/dist/ir.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ir.d.mts","names":[],"sources":["../src/core/ir/sql-contract-serializer-base.ts","../src/core/ir/sql-contract-serializer.ts","../src/core/ir/sql-schema-verifier-base.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ir.d.mts","names":[],"sources":["../src/core/ir/sql-contract-serializer-base.ts","../src/core/ir/sql-contract-serializer.ts","../src/core/ir/sql-schema-verifier-base.ts"],"mappings":";;;;;;;KAsCY,yBAAA,IAA6B,KAAc;;AAAvD;;;;AAAuD;AA0BvD;;;;;;;;;;;;;;;;;;uBAAsB,yBAAA,mBAA4C,QAAA,CAAS,UAAA,cAC9D,kBAAA,CAAmB,SAAA;EAAA,mBAMT,uBAAA,EAAyB,WAAA,SAE1C,yBAAA;EAAA,iBANa,cAAA;EAAA,iBACA,UAAA;cAGI,uBAAA,GAAyB,WAAA,SAE1C,yBAAA,GAEF,eAAA,YAA0B,uBAAA;EAO5B,mBAAA,WAA8B,SAAA,GAAY,SAAA,EAAW,IAAA,YAAgB,CAAA;EAMrE,iBAAA,CAAkB,QAAA,EAAU,SAAA,GAAY,UAAA;EAIxC,mBAAA,0CAAmB,sBAAA;EAEnB,WAAA,0CAAW,WAAA;EAAA,UAED,yBAAA,CAA0B,IAAA,YAAgB,QAAA,CAAS,UAAA;EAAA,UAOnD,iBAAA,CAAkB,SAAA,EAAW,QAAA,CAAS,UAAA,IAAc,QAAA,CAAS,UAAA;EAAA,uBAyDhD,kBAAA;EAAA,UAEb,sBAAA,CACR,UAAA,EAAY,QAAA,CAAS,MAAA,SAAe,SAAA,GAAY,MAAA,sBAC/C,QAAA,CAAS,MAAA,SAAe,SAAA;EAAA,UAmBjB,wBAAA,CACR,IAAA,UACA,GAAA,EAAK,SAAA,GAAY,MAAA,oBAChB,SAAA,GAAY,uBAAA;EAAA,UAmCL,uBAAA,CAAwB,KAAA,EAAO,mBAAA,GAAsB,mBAAA;EAAA,UAkBrD,uBAAA,CAAwB,QAAA,EAAU,QAAA,CAAS,UAAA,IAAc,SAAA;AAAA;;;;;;;AAzMrE;;;;AAAuD;cCxB1C,qBAAA,SAA8B,yBAAA,CAA0B,QAAA,CAAS,UAAA;;gBAOrD,kBAAA;AAAA;;;;;;;;;ADiBzB;;;;AAAuD;AA0BvD;;;;;;;;;uBErCsB,qBAAA,gCACT,cAAA,CAAe,SAAA,EAAW,OAAA;EAErC,YAAA,CAAa,OAAA,EAAS,mBAAA,CAAoB,SAAA,EAAW,OAAA,IAAW,kBAAA;EFoDlC;;;;;;EAAA,mBEvCX,qBAAA,CACjB,OAAA,EAAS,mBAAA,CAAoB,SAAA,EAAW,OAAA,aAC9B,WAAA;EF0DoC;;;;;EAAA,mBEnD7B,sBAAA,CACjB,OAAA,EAAS,mBAAA,CAAoB,SAAA,EAAW,OAAA,aAC9B,WAAA;AAAA"}
|
package/dist/ir.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as SqlContractSerializerBase, t as SqlContractSerializer } from "./sql-contract-serializer-
|
|
1
|
+
import { n as SqlContractSerializerBase, t as SqlContractSerializer } from "./sql-contract-serializer-BR2vC7Z-.mjs";
|
|
2
2
|
//#region src/core/ir/sql-schema-verifier-base.ts
|
|
3
3
|
/**
|
|
4
4
|
* SQL family `SchemaVerifier` abstract base. Centralises the SQL-shared
|
package/dist/migration.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as SqlPlanTargetDetails, p as SqlMigrationPlanOperation } from "./types-
|
|
1
|
+
import { T as SqlPlanTargetDetails, p as SqlMigrationPlanOperation } from "./types-kgstZ_Zd.mjs";
|
|
2
2
|
import { Migration } from "@prisma-next/migration-tools/migration";
|
|
3
3
|
|
|
4
4
|
//#region src/core/sql-migration.d.ts
|
package/dist/migration.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration.d.mts","names":[],"sources":["../src/core/sql-migration.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"migration.d.mts","names":[],"sources":["../src/core/sql-migration.ts"],"mappings":";;;;;;AAmBA;;;;;;;;;;;;uBAAsB,YAAA,kBACH,oBAAA,6CAET,SAAA,CAAU,yBAAA,CAA0B,QAAA,UAAkB,SAAA;EAAtD;;;;;;AAWc;;;;EAXd,IAWJ,kBAAA;AAAA"}
|
package/dist/migration.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { deriveProvidedInvariants } from "@prisma-next/migration-tools/invariants";
|
|
2
2
|
import { Migration } from "@prisma-next/migration-tools/migration";
|
|
3
|
+
import { isThenable } from "@prisma-next/utils/promise";
|
|
3
4
|
//#region src/core/sql-migration.ts
|
|
4
5
|
/**
|
|
5
6
|
* Family-owned base class for SQL migrations.
|
|
@@ -27,7 +28,7 @@ var SqlMigration = class extends Migration {
|
|
|
27
28
|
* `MigrationPlan.providedInvariants?` stays optional.
|
|
28
29
|
*/
|
|
29
30
|
get providedInvariants() {
|
|
30
|
-
return deriveProvidedInvariants(this.operations);
|
|
31
|
+
return deriveProvidedInvariants(this.operations.filter((op) => !isThenable(op)));
|
|
31
32
|
}
|
|
32
33
|
};
|
|
33
34
|
//#endregion
|
package/dist/migration.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration.mjs","names":[],"sources":["../src/core/sql-migration.ts"],"sourcesContent":["import { deriveProvidedInvariants } from '@prisma-next/migration-tools/invariants';\nimport { Migration } from '@prisma-next/migration-tools/migration';\nimport type { SqlMigrationPlanOperation, SqlPlanTargetDetails } from './migrations/types';\n\n/**\n * Family-owned base class for SQL migrations.\n *\n * Generic in `TDetails` (family plan target details, e.g. Postgres vs SQLite)\n * and in `TTargetId` (the literal target identifier, e.g. `'postgres'`).\n *\n * Adapters (Postgres, SQLite, …) extend this with a concrete `TDetails` and\n * a fixed `TTargetId` literal, so the public `Migration<TOp>` base sees the\n * fully concrete operation shape. Target-free code in SQL family / tooling\n * parameterises over `TDetails` (and usually `TTargetId = string`).\n *\n * Keeps target-free contract/runtime features in the family layer while\n * letting adapters own target shape.\n */\nexport abstract class SqlMigration<\n TDetails extends SqlPlanTargetDetails,\n TTargetId extends string = string,\n> extends Migration<SqlMigrationPlanOperation<TDetails>, 'sql', TTargetId> {\n /**\n * Sorted, deduplicated invariant ids declared by this migration's\n * data-transform ops. Derived from `this.operations` so the field remains\n * consistent with the operation list — planner-built plans (`db init`,\n * `db update`) yield `[]` because they emit no data-transform ops.\n *\n * Required by `SqlMigrationPlan.providedInvariants` (tightened from\n * optional at the SQL-family layer); the framework-level\n * `MigrationPlan.providedInvariants?` stays optional.\n */\n get providedInvariants(): readonly string[] {\n
|
|
1
|
+
{"version":3,"file":"migration.mjs","names":[],"sources":["../src/core/sql-migration.ts"],"sourcesContent":["import { deriveProvidedInvariants } from '@prisma-next/migration-tools/invariants';\nimport { Migration } from '@prisma-next/migration-tools/migration';\nimport { isThenable } from '@prisma-next/utils/promise';\nimport type { SqlMigrationPlanOperation, SqlPlanTargetDetails } from './migrations/types';\n\n/**\n * Family-owned base class for SQL migrations.\n *\n * Generic in `TDetails` (family plan target details, e.g. Postgres vs SQLite)\n * and in `TTargetId` (the literal target identifier, e.g. `'postgres'`).\n *\n * Adapters (Postgres, SQLite, …) extend this with a concrete `TDetails` and\n * a fixed `TTargetId` literal, so the public `Migration<TOp>` base sees the\n * fully concrete operation shape. Target-free code in SQL family / tooling\n * parameterises over `TDetails` (and usually `TTargetId = string`).\n *\n * Keeps target-free contract/runtime features in the family layer while\n * letting adapters own target shape.\n */\nexport abstract class SqlMigration<\n TDetails extends SqlPlanTargetDetails,\n TTargetId extends string = string,\n> extends Migration<SqlMigrationPlanOperation<TDetails>, 'sql', TTargetId> {\n /**\n * Sorted, deduplicated invariant ids declared by this migration's\n * data-transform ops. Derived from `this.operations` so the field remains\n * consistent with the operation list — planner-built plans (`db init`,\n * `db update`) yield `[]` because they emit no data-transform ops.\n *\n * Required by `SqlMigrationPlan.providedInvariants` (tightened from\n * optional at the SQL-family layer); the framework-level\n * `MigrationPlan.providedInvariants?` stays optional.\n */\n get providedInvariants(): readonly string[] {\n const ops = this.operations.filter(\n (op): op is SqlMigrationPlanOperation<TDetails> => !isThenable(op),\n );\n return deriveProvidedInvariants(ops);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,IAAsB,eAAtB,cAGU,UAAiE;;;;;;;;;;;CAWzE,IAAI,qBAAwC;EAI1C,OAAO,yBAHK,KAAK,WAAW,QACzB,OAAkD,CAAC,WAAW,EAAE,CAEjC,CAAC;CACrC;AACF"}
|
package/dist/pack.d.mts
CHANGED
|
@@ -6,7 +6,7 @@ declare const sqlFamilyPack: {
|
|
|
6
6
|
readonly version: "0.0.1";
|
|
7
7
|
readonly authoring: {
|
|
8
8
|
readonly field: {
|
|
9
|
-
readonly
|
|
9
|
+
readonly uuidString: {
|
|
10
10
|
readonly kind: "fieldPreset";
|
|
11
11
|
readonly output: {
|
|
12
12
|
readonly codecId: "sql/char@1";
|
|
@@ -75,7 +75,7 @@ declare const sqlFamilyPack: {
|
|
|
75
75
|
};
|
|
76
76
|
};
|
|
77
77
|
readonly id: {
|
|
78
|
-
readonly
|
|
78
|
+
readonly uuidv4String: {
|
|
79
79
|
readonly kind: "fieldPreset";
|
|
80
80
|
readonly output: {
|
|
81
81
|
readonly codecId: "sql/char@1";
|
|
@@ -92,7 +92,7 @@ declare const sqlFamilyPack: {
|
|
|
92
92
|
readonly id: true;
|
|
93
93
|
};
|
|
94
94
|
};
|
|
95
|
-
readonly
|
|
95
|
+
readonly uuidv7String: {
|
|
96
96
|
readonly kind: "fieldPreset";
|
|
97
97
|
readonly output: {
|
|
98
98
|
readonly codecId: "sql/char@1";
|
|
@@ -228,6 +228,19 @@ declare const sqlFamilyPack: {
|
|
|
228
228
|
};
|
|
229
229
|
};
|
|
230
230
|
};
|
|
231
|
+
readonly entityTypes: import("@prisma-next/framework-components/authoring").AuthoringEntityTypeNamespace;
|
|
232
|
+
readonly pslBlockDescriptors: {
|
|
233
|
+
readonly enum: {
|
|
234
|
+
readonly kind: "pslBlock";
|
|
235
|
+
readonly keyword: "enum";
|
|
236
|
+
readonly discriminator: "enum";
|
|
237
|
+
readonly name: {
|
|
238
|
+
readonly required: true;
|
|
239
|
+
};
|
|
240
|
+
readonly parameters: {};
|
|
241
|
+
readonly variadicParameters: true;
|
|
242
|
+
};
|
|
243
|
+
};
|
|
231
244
|
};
|
|
232
245
|
};
|
|
233
246
|
//#endregion
|
package/dist/pack.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pack.d.mts","names":[],"sources":["../src/exports/pack.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"pack.d.mts","names":[],"sources":["../src/exports/pack.ts"],"mappings":";cAKM,aAAA;EAAA"}
|
package/dist/pack.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as sqlFamilyAuthoringFieldPresets, t as sqlFamilyAuthoringTypes } from "./authoring-type-constructors-
|
|
1
|
+
import { i as sqlFamilyPslBlockDescriptors, n as sqlFamilyAuthoringFieldPresets, r as sqlFamilyEntityTypes, t as sqlFamilyAuthoringTypes } from "./authoring-type-constructors-CjFfO6LM.mjs";
|
|
2
2
|
//#region src/exports/pack.ts
|
|
3
3
|
const sqlFamilyPack = {
|
|
4
4
|
kind: "family",
|
|
@@ -7,7 +7,9 @@ const sqlFamilyPack = {
|
|
|
7
7
|
version: "0.0.1",
|
|
8
8
|
authoring: {
|
|
9
9
|
field: sqlFamilyAuthoringFieldPresets,
|
|
10
|
-
type: sqlFamilyAuthoringTypes
|
|
10
|
+
type: sqlFamilyAuthoringTypes,
|
|
11
|
+
entityTypes: sqlFamilyEntityTypes,
|
|
12
|
+
pslBlockDescriptors: sqlFamilyPslBlockDescriptors
|
|
11
13
|
}
|
|
12
14
|
};
|
|
13
15
|
//#endregion
|
package/dist/pack.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pack.mjs","names":[],"sources":["../src/exports/pack.ts"],"sourcesContent":["import type { FamilyPackRef } from '@prisma-next/framework-components/components';\nimport { sqlFamilyAuthoringFieldPresets } from '../core/authoring-field-presets';\nimport { sqlFamilyAuthoringTypes } from '../core/authoring-type-constructors';\n\nconst sqlFamilyPack = {\n kind: 'family',\n id: 'sql',\n familyId: 'sql',\n version: '0.0.1',\n authoring: {\n field: sqlFamilyAuthoringFieldPresets,\n type: sqlFamilyAuthoringTypes,\n },\n} as const satisfies FamilyPackRef<'sql'>;\n\nexport default sqlFamilyPack;\n"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"pack.mjs","names":[],"sources":["../src/exports/pack.ts"],"sourcesContent":["import type { FamilyPackRef } from '@prisma-next/framework-components/components';\nimport { sqlFamilyEntityTypes, sqlFamilyPslBlockDescriptors } from '../core/authoring-entity-types';\nimport { sqlFamilyAuthoringFieldPresets } from '../core/authoring-field-presets';\nimport { sqlFamilyAuthoringTypes } from '../core/authoring-type-constructors';\n\nconst sqlFamilyPack = {\n kind: 'family',\n id: 'sql',\n familyId: 'sql',\n version: '0.0.1',\n authoring: {\n field: sqlFamilyAuthoringFieldPresets,\n type: sqlFamilyAuthoringTypes,\n entityTypes: sqlFamilyEntityTypes,\n pslBlockDescriptors: sqlFamilyPslBlockDescriptors,\n },\n} as const satisfies FamilyPackRef<'sql'>;\n\nexport default sqlFamilyPack;\n"],"mappings":";;AAKA,MAAM,gBAAgB;CACpB,MAAM;CACN,IAAI;CACJ,UAAU;CACV,SAAS;CACT,WAAW;EACT,OAAO;EACP,MAAM;EACN,aAAa;EACb,qBAAqB;CACvB;AACF"}
|
package/dist/schema-verify.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as verifySqlSchema, n as NativeTypeNormalizer, r as VerifySqlSchemaOptions } from "./verify-sql-schema-
|
|
1
|
+
import { i as verifySqlSchema, n as NativeTypeNormalizer, r as VerifySqlSchemaOptions } from "./verify-sql-schema-thU-jKpf.mjs";
|
|
2
2
|
import { SchemaIssue } from "@prisma-next/framework-components/control";
|
|
3
3
|
import { ControlPolicy } from "@prisma-next/contract/types";
|
|
4
4
|
import { SqlIndexIR, SqlUniqueIR } from "@prisma-next/sql-schema-ir/types";
|
package/dist/schema-verify.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as isUniqueConstraintSatisfied, n as arraysEqual, r as isIndexSatisfied, t as verifySqlSchema } from "./verify-sql-schema-
|
|
1
|
+
import { i as isUniqueConstraintSatisfied, n as arraysEqual, r as isIndexSatisfied, t as verifySqlSchema } from "./verify-sql-schema-xT4udQLQ.mjs";
|
|
2
2
|
export { arraysEqual, isIndexSatisfied, isUniqueConstraintSatisfied, verifySqlSchema };
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { blindCast } from "@prisma-next/utils/casts";
|
|
1
2
|
import { sqlContractCanonicalizationHooks } from "@prisma-next/sql-contract/canonicalization-hooks";
|
|
2
3
|
import { ifDefined } from "@prisma-next/utils/defined";
|
|
4
|
+
import { NamespaceBase, UNBOUND_NAMESPACE_ID, hydrateNamespaceEntities } from "@prisma-next/framework-components/ir";
|
|
3
5
|
import { ContractValidationError } from "@prisma-next/contract/contract-validation-error";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
+
import { isPlainRecord } from "@prisma-next/contract/is-plain-record";
|
|
7
|
+
import { composeSqlEntityKinds } from "@prisma-next/sql-contract/entity-kinds";
|
|
8
|
+
import { SqlStorage, SqlUnboundNamespace, buildSqlNamespace } from "@prisma-next/sql-contract/types";
|
|
6
9
|
import { createSqlContractSchema, validateSqlContractFully } from "@prisma-next/sql-contract/validators";
|
|
7
|
-
import { blindCast } from "@prisma-next/utils/casts";
|
|
8
10
|
import { type } from "arktype";
|
|
9
11
|
//#region src/core/ir/sql-contract-serializer-base.ts
|
|
10
12
|
const NamespaceRawSchema = type({
|
|
@@ -12,9 +14,6 @@ const NamespaceRawSchema = type({
|
|
|
12
14
|
"kind?": "string",
|
|
13
15
|
entries: type({ "+": "ignore" })
|
|
14
16
|
});
|
|
15
|
-
function isPlainRecord(value) {
|
|
16
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
17
|
-
}
|
|
18
17
|
/**
|
|
19
18
|
* SQL family `ContractSerializer` abstract base. Carries the SQL-shared
|
|
20
19
|
* deserialization pipeline:
|
|
@@ -40,11 +39,13 @@ function isPlainRecord(value) {
|
|
|
40
39
|
* `serializeContract` directly.
|
|
41
40
|
*/
|
|
42
41
|
var SqlContractSerializerBase = class {
|
|
43
|
-
|
|
42
|
+
entityHydrationRegistry;
|
|
44
43
|
contractSchema;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
this.
|
|
44
|
+
entryKinds;
|
|
45
|
+
constructor(entityHydrationRegistry = /* @__PURE__ */ new Map(), packEntityKinds = []) {
|
|
46
|
+
this.entityHydrationRegistry = entityHydrationRegistry;
|
|
47
|
+
this.entryKinds = composeSqlEntityKinds(packEntityKinds);
|
|
48
|
+
this.contractSchema = packEntityKinds.length > 0 ? createSqlContractSchema(this.entryKinds) : void 0;
|
|
48
49
|
}
|
|
49
50
|
deserializeContract(json) {
|
|
50
51
|
const validated = this.parseSqlContractStructure(json);
|
|
@@ -65,16 +66,16 @@ var SqlContractSerializerBase = class {
|
|
|
65
66
|
const rawNamespaces = validated.storage.namespaces;
|
|
66
67
|
if (rawNamespaces === void 0) throw new ContractValidationError("Contract storage.namespaces is required after structural validation", "structural");
|
|
67
68
|
const hydratedNamespaces = this.hydrateSqlNamespaceMap(rawNamespaces);
|
|
68
|
-
const
|
|
69
|
+
const withInjectedUnbound = this.defaultNamespaceId === UNBOUND_NAMESPACE_ID ? {
|
|
70
|
+
...hydratedNamespaces,
|
|
71
|
+
[UNBOUND_NAMESPACE_ID]: hydratedNamespaces[UNBOUND_NAMESPACE_ID] ?? SqlUnboundNamespace.instance
|
|
72
|
+
} : hydratedNamespaces;
|
|
69
73
|
return {
|
|
70
74
|
...validated,
|
|
71
75
|
storage: new SqlStorage({
|
|
72
76
|
storageHash: validated.storage.storageHash,
|
|
73
77
|
...ifDefined("types", hydratedTypes),
|
|
74
|
-
namespaces: blindCast(
|
|
75
|
-
...hydratedNamespaces,
|
|
76
|
-
[UNBOUND_NAMESPACE_ID]: unbound
|
|
77
|
-
})
|
|
78
|
+
namespaces: blindCast(withInjectedUnbound)
|
|
78
79
|
})
|
|
79
80
|
};
|
|
80
81
|
}
|
|
@@ -87,32 +88,28 @@ var SqlContractSerializerBase = class {
|
|
|
87
88
|
hydrateSqlNamespaceEntry(nsId, raw) {
|
|
88
89
|
if (raw instanceof NamespaceBase) return raw;
|
|
89
90
|
const rawRecord = isPlainRecord(raw) ? raw : {};
|
|
90
|
-
if (Object.hasOwn(rawRecord, "tables") || Object.hasOwn(rawRecord, "enum") || Object.hasOwn(rawRecord, "collections")) throw new ContractValidationError("Namespace envelope uses deprecated flat slot keys; expected `entries: { table? }`", "structural");
|
|
91
91
|
const id = typeof rawRecord["id"] === "string" ? rawRecord["id"] : nsId;
|
|
92
92
|
const parsed = NamespaceRawSchema({
|
|
93
93
|
...rawRecord,
|
|
94
94
|
id
|
|
95
95
|
});
|
|
96
96
|
if (parsed instanceof type.errors) throw new ContractValidationError(`Namespace hydration failed: ${parsed.map((p) => p.message).join("; ")}`, "structural");
|
|
97
|
-
const entriesInput = { table: {} };
|
|
98
97
|
const entriesRaw = parsed.entries;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
if (valueSetSlot !== null && typeof valueSetSlot === "object" && !Array.isArray(valueSetSlot)) entriesInput.valueSet = Object.fromEntries(Object.entries(blindCast(valueSetSlot)).map(([vsName, vs]) => [vsName, vs instanceof StorageValueSet ? vs : new StorageValueSet(blindCast(vs))]));
|
|
105
|
-
}
|
|
98
|
+
const rawEntriesMap = isPlainRecord(entriesRaw) ? entriesRaw : {};
|
|
99
|
+
const entriesInput = {};
|
|
100
|
+
for (const [key, innerMap] of Object.entries(rawEntriesMap)) entriesInput[key] = isPlainRecord(innerMap) ? innerMap : Object.freeze({});
|
|
101
|
+
const entriesOutput = hydrateNamespaceEntities(entriesInput, this.entryKinds, "fail", id);
|
|
102
|
+
if (!Object.hasOwn(entriesOutput, "table")) entriesOutput["table"] = {};
|
|
106
103
|
return blindCast({
|
|
107
104
|
id,
|
|
108
|
-
entries:
|
|
105
|
+
entries: entriesOutput
|
|
109
106
|
});
|
|
110
107
|
}
|
|
111
108
|
hydrateStorageTypeEntry(entry) {
|
|
112
109
|
if (typeof entry !== "object" || entry === null) return entry;
|
|
113
110
|
const kind = entry.kind;
|
|
114
111
|
if (typeof kind !== "string") return entry;
|
|
115
|
-
const factory = this.
|
|
112
|
+
const factory = this.entityHydrationRegistry.get(kind);
|
|
116
113
|
if (factory === void 0) return entry;
|
|
117
114
|
return blindCast(factory(entry));
|
|
118
115
|
}
|
|
@@ -135,8 +132,11 @@ var SqlContractSerializer = class extends SqlContractSerializerBase {
|
|
|
135
132
|
constructor() {
|
|
136
133
|
super(/* @__PURE__ */ new Map());
|
|
137
134
|
}
|
|
135
|
+
get defaultNamespaceId() {
|
|
136
|
+
return UNBOUND_NAMESPACE_ID;
|
|
137
|
+
}
|
|
138
138
|
};
|
|
139
139
|
//#endregion
|
|
140
140
|
export { SqlContractSerializerBase as n, SqlContractSerializer as t };
|
|
141
141
|
|
|
142
|
-
//# sourceMappingURL=sql-contract-serializer-
|
|
142
|
+
//# sourceMappingURL=sql-contract-serializer-BR2vC7Z-.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sql-contract-serializer-BR2vC7Z-.mjs","names":[],"sources":["../src/core/ir/sql-contract-serializer-base.ts","../src/core/ir/sql-contract-serializer.ts"],"sourcesContent":["import { ContractValidationError } from '@prisma-next/contract/contract-validation-error';\nimport { isPlainRecord } from '@prisma-next/contract/is-plain-record';\nimport type { Contract } from '@prisma-next/contract/types';\nimport type { ContractSerializer } from '@prisma-next/framework-components/control';\nimport {\n type AnyEntityKindDescriptor,\n hydrateNamespaceEntities,\n type Namespace,\n NamespaceBase,\n UNBOUND_NAMESPACE_ID,\n} from '@prisma-next/framework-components/ir';\nimport { sqlContractCanonicalizationHooks } from '@prisma-next/sql-contract/canonicalization-hooks';\nimport { composeSqlEntityKinds } from '@prisma-next/sql-contract/entity-kinds';\nimport {\n buildSqlNamespace,\n type SqlNamespaceTablesInput,\n SqlStorage,\n type SqlStorageInput,\n type SqlStorageTypeEntry,\n SqlUnboundNamespace,\n} from '@prisma-next/sql-contract/types';\nimport {\n createSqlContractSchema,\n validateSqlContractFully,\n} from '@prisma-next/sql-contract/validators';\nimport { blindCast } from '@prisma-next/utils/casts';\nimport { ifDefined } from '@prisma-next/utils/defined';\nimport type { JsonObject } from '@prisma-next/utils/json';\nimport { type Type, type } from 'arktype';\n\nconst NamespaceRawSchema = type({\n id: 'string',\n 'kind?': 'string',\n entries: type({\n '+': 'ignore',\n }),\n});\n\nexport type SqlEntityHydrationFactory = (entry: unknown) => unknown;\n\n/**\n * SQL family `ContractSerializer` abstract base. Carries the SQL-shared\n * deserialization pipeline:\n *\n * 1. `parseSqlContractStructure` validates the on-disk JSON envelope\n * against the SQL contract arktype schema (`validateSqlContractFully`)\n * and returns the validated flat-data shape.\n * 2. `hydrateSqlStorage` walks the validated `storage` subtree and\n * constructs the family-shared SQL Contract IR class hierarchy\n * (`SqlStorage` -> `StorageTable` -> `StorageColumn` / `PrimaryKey`\n * / …). The rest of the contract envelope is JSON-clean primitive\n * data and passes through unchanged.\n * 3. `constructTargetContract` is the target-specific extension hook;\n * defaults to identity. Targets that need to attach target-only\n * fields (e.g. target-specific derived storage fields) override it.\n *\n * Default `serializeContract` is identity over the contract — concrete\n * SQL targets ship JSON-clean class instances, so the contract value\n * can be stringified directly. The non-enumerable family-level `kind`\n * discriminator on `SqlNode` instances stays out of the persisted\n * envelope automatically. Targets that need to canonicalize on the way\n * out (key ordering, dropping computed-only fields) override\n * `serializeContract` directly.\n */\nexport abstract class SqlContractSerializerBase<TContract extends Contract<SqlStorage>>\n implements ContractSerializer<TContract>\n{\n private readonly contractSchema: Type<unknown> | undefined;\n private readonly entryKinds: ReadonlyMap<string, AnyEntityKindDescriptor>;\n\n constructor(\n protected readonly entityHydrationRegistry: ReadonlyMap<\n string,\n SqlEntityHydrationFactory\n > = new Map(),\n packEntityKinds: readonly AnyEntityKindDescriptor[] = [],\n ) {\n this.entryKinds = composeSqlEntityKinds(packEntityKinds);\n this.contractSchema =\n packEntityKinds.length > 0 ? createSqlContractSchema(this.entryKinds) : undefined;\n }\n\n deserializeContract<T extends TContract = TContract>(json: unknown): T {\n const validated = this.parseSqlContractStructure(json);\n const hydrated = this.hydrateSqlStorage(validated);\n return this.constructTargetContract(hydrated) as T;\n }\n\n serializeContract(contract: TContract): JsonObject {\n return contract as unknown as JsonObject;\n }\n\n shouldPreserveEmpty = sqlContractCanonicalizationHooks.shouldPreserveEmpty;\n\n sortStorage = sqlContractCanonicalizationHooks.sortStorage;\n\n protected parseSqlContractStructure(json: unknown): Contract<SqlStorage> {\n return validateSqlContractFully<Contract<SqlStorage>>(\n json,\n this.contractSchema !== undefined ? { contractSchema: this.contractSchema } : undefined,\n );\n }\n\n protected hydrateSqlStorage(validated: Contract<SqlStorage>): Contract<SqlStorage> {\n const types = validated.storage.types;\n const hydratedTypes =\n types !== undefined\n ? Object.fromEntries(\n Object.entries(types).map(([name, entry]) => [\n name,\n this.hydrateStorageTypeEntry(entry),\n ]),\n )\n : undefined;\n\n const rawNamespaces = validated.storage.namespaces;\n if (rawNamespaces === undefined) {\n throw new ContractValidationError(\n 'Contract storage.namespaces is required after structural validation',\n 'structural',\n );\n }\n const hydratedNamespaces = this.hydrateSqlNamespaceMap(rawNamespaces);\n // Compatibility shim: production code that addresses `__unbound__` for table\n // metadata lookups (collection-contract, query-plan-mutations, model-accessor,\n // query-plan-meta, where-binding) uses optional chaining and tolerates absence,\n // but runtime-qualification (TML-2605) has not yet landed cross-namespace table\n // routing. Injecting the empty singleton here keeps helpers that augment the\n // deserialized JSON (e.g. buildMixedPolyContract) working by providing a slot to\n // write into. Once runtime-qualification routes table lookups by namespace, this\n // shim should be removed.\n //\n // TML-2916: the shim only fires when the target's default namespace IS unbound\n // (SQLite, Mongo). On Postgres (`defaultNamespaceId === 'public'`) injecting an\n // empty `__unbound__` slot violates ADR 223 — un-namespaced PG models belong in\n // `public`, not `__unbound__`.\n const withInjectedUnbound =\n this.defaultNamespaceId === UNBOUND_NAMESPACE_ID\n ? {\n ...hydratedNamespaces,\n [UNBOUND_NAMESPACE_ID]:\n hydratedNamespaces[UNBOUND_NAMESPACE_ID] ?? SqlUnboundNamespace.instance,\n }\n : hydratedNamespaces;\n\n return {\n ...validated,\n storage: new SqlStorage({\n storageHash: validated.storage.storageHash,\n ...ifDefined('types', hydratedTypes),\n // Cast narrows the result of hydrateSqlNamespaceMap from the wider\n // framework `Namespace` to the SQL-family `SqlNamespace`.\n namespaces: blindCast<\n SqlStorageInput['namespaces'],\n 'hydrateSqlNamespaceMap builds each namespace through the SQL family concretions (SqlBoundNamespace / target schema), so every value is a SqlNamespace; the framework return type only promises the base Namespace.'\n >(withInjectedUnbound),\n }),\n };\n }\n\n protected abstract get defaultNamespaceId(): string;\n\n protected hydrateSqlNamespaceMap(\n namespaces: Readonly<Record<string, Namespace | Record<string, unknown>>>,\n ): Readonly<Record<string, Namespace>> {\n return Object.fromEntries(\n Object.entries(namespaces).map(([nsId, namespaceEntryRaw]) => {\n // Raw entries passed structural validation; hydrate materialises family IR class instances.\n const namespaceHydrated = this.hydrateSqlNamespaceEntry(nsId, namespaceEntryRaw);\n const namespaceMaterialised =\n namespaceHydrated instanceof NamespaceBase\n ? namespaceHydrated\n : buildSqlNamespace(\n blindCast<\n SqlNamespaceTablesInput,\n 'hydrateSqlNamespaceEntry returns SqlNamespaceTablesInput when raw is not a NamespaceBase'\n >(namespaceHydrated),\n );\n return [nsId, namespaceMaterialised];\n }),\n );\n }\n\n protected hydrateSqlNamespaceEntry(\n nsId: string,\n raw: Namespace | Record<string, unknown>,\n ): Namespace | SqlNamespaceTablesInput {\n if (raw instanceof NamespaceBase) {\n return raw;\n }\n const rawRecord = isPlainRecord(raw) ? raw : {};\n const id = typeof rawRecord['id'] === 'string' ? rawRecord['id'] : nsId;\n const parsed = NamespaceRawSchema({ ...rawRecord, id });\n if (parsed instanceof type.errors) {\n const messages = parsed.map((p: { message: string }) => p.message).join('; ');\n throw new ContractValidationError(`Namespace hydration failed: ${messages}`, 'structural');\n }\n const entriesRaw = parsed.entries;\n const rawEntriesMap = isPlainRecord(entriesRaw) ? entriesRaw : {};\n\n const entriesInput: Record<string, Readonly<Record<string, unknown>>> = {};\n for (const [key, innerMap] of Object.entries(rawEntriesMap)) {\n entriesInput[key] = isPlainRecord(innerMap) ? innerMap : Object.freeze({});\n }\n\n const entriesOutput = hydrateNamespaceEntities(entriesInput, this.entryKinds, 'fail', id);\n\n // Always ensure a 'table' key is present (may be empty).\n if (!Object.hasOwn(entriesOutput, 'table')) {\n entriesOutput['table'] = {};\n }\n\n return blindCast<\n SqlNamespaceTablesInput,\n 'entriesOutput holds the hydrated SQL entity-kind maps (table always present); this wraps them as the SqlNamespaceTablesInput the family createNamespace consumes.'\n >({\n id,\n entries: entriesOutput,\n });\n }\n\n protected hydrateStorageTypeEntry(entry: SqlStorageTypeEntry): SqlStorageTypeEntry {\n if (typeof entry !== 'object' || entry === null) {\n return entry;\n }\n const kind = (entry as { kind?: unknown }).kind;\n if (typeof kind !== 'string') {\n return entry;\n }\n const factory = this.entityHydrationRegistry.get(kind);\n if (factory === undefined) {\n return entry;\n }\n return blindCast<\n SqlStorageTypeEntry,\n 'entity registry factory returns SqlStorageTypeEntry for storage.types entries'\n >(factory(entry));\n }\n\n protected constructTargetContract(hydrated: Contract<SqlStorage>): TContract {\n return hydrated as TContract;\n }\n}\n","import type { Contract } from '@prisma-next/contract/types';\nimport { UNBOUND_NAMESPACE_ID } from '@prisma-next/framework-components/ir';\nimport type { SqlStorage } from '@prisma-next/sql-contract/types';\nimport { SqlContractSerializerBase } from './sql-contract-serializer-base';\n\n/**\n * Default SQL family `ContractSerializer` concretion. Inherits the\n * full SQL-shared deserialization pipeline (structural validation +\n * IR-class hydration) without pack-registered `storage.types`\n * hydration factories — targets that emit polymorphic JSON outside the\n * codec-typed envelope wire a target-specific subclass with a populated\n * registry (see Postgres). Family-level call sites instantiate this\n * default directly when no target serializer is supplied.\n */\nexport class SqlContractSerializer extends SqlContractSerializerBase<Contract<SqlStorage>> {\n constructor() {\n super(new Map());\n }\n\n // Family-level fallback when no target descriptor is wired in. Preserves the\n // pre-TML-2916 compatibility-shim behaviour for the unbound slot.\n protected override get defaultNamespaceId(): string {\n return UNBOUND_NAMESPACE_ID;\n }\n}\n"],"mappings":";;;;;;;;;;;AA8BA,MAAM,qBAAqB,KAAK;CAC9B,IAAI;CACJ,SAAS;CACT,SAAS,KAAK,EACZ,KAAK,SACP,CAAC;AACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;AA4BD,IAAsB,4BAAtB,MAEA;CAKuB;CAJrB;CACA;CAEA,YACE,0CAGI,IAAI,IAAI,GACZ,kBAAsD,CAAC,GACvD;EALmB,KAAA,0BAAA;EAMnB,KAAK,aAAa,sBAAsB,eAAe;EACvD,KAAK,iBACH,gBAAgB,SAAS,IAAI,wBAAwB,KAAK,UAAU,IAAI,KAAA;CAC5E;CAEA,oBAAqD,MAAkB;EACrE,MAAM,YAAY,KAAK,0BAA0B,IAAI;EACrD,MAAM,WAAW,KAAK,kBAAkB,SAAS;EACjD,OAAO,KAAK,wBAAwB,QAAQ;CAC9C;CAEA,kBAAkB,UAAiC;EACjD,OAAO;CACT;CAEA,sBAAsB,iCAAiC;CAEvD,cAAc,iCAAiC;CAE/C,0BAAoC,MAAqC;EACvE,OAAO,yBACL,MACA,KAAK,mBAAmB,KAAA,IAAY,EAAE,gBAAgB,KAAK,eAAe,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aAAa,OAAO;EAC1B,MAAM,gBAAgB,cAAc,UAAU,IAAI,aAAa,CAAC;EAEhE,MAAM,eAAkE,CAAC;EACzE,KAAK,MAAM,CAAC,KAAK,aAAa,OAAO,QAAQ,aAAa,GACxD,aAAa,OAAO,cAAc,QAAQ,IAAI,WAAW,OAAO,OAAO,CAAC,CAAC;EAG3E,MAAM,gBAAgB,yBAAyB,cAAc,KAAK,YAAY,QAAQ,EAAE;EAGxF,IAAI,CAAC,OAAO,OAAO,eAAe,OAAO,GACvC,cAAc,WAAW,CAAC;EAG5B,OAAO,UAGL;GACA;GACA,SAAS;EACX,CAAC;CACH;CAEA,wBAAkC,OAAiD;EACjF,IAAI,OAAO,UAAU,YAAY,UAAU,MACzC,OAAO;EAET,MAAM,OAAQ,MAA6B;EAC3C,IAAI,OAAO,SAAS,UAClB,OAAO;EAET,MAAM,UAAU,KAAK,wBAAwB,IAAI,IAAI;EACrD,IAAI,YAAY,KAAA,GACd,OAAO;EAET,OAAO,UAGL,QAAQ,KAAK,CAAC;CAClB;CAEA,wBAAkC,UAA2C;EAC3E,OAAO;CACT;AACF;;;;;;;;;;;;ACpOA,IAAa,wBAAb,cAA2C,0BAAgD;CACzF,cAAc;EACZ,sBAAM,IAAI,IAAI,CAAC;CACjB;CAIA,IAAuB,qBAA6B;EAClD,OAAO;CACT;AACF"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as SqlControlAdapter } from "./control-adapter-Cmw9LvEP.mjs";
|
|
2
2
|
import { ContractSerializer, ContractSpace, ControlAdapterDescriptor, ControlExtensionDescriptor, ControlFamilyInstance, ControlStack, MigratableTargetDescriptor, MigrationOperationPolicy, MigrationPlan, MigrationPlanOperation, MigrationPlannerConflict, MigrationPlannerFailureResult, MigrationPlannerSuccessResult, MigrationRunnerExecutionChecks, MigrationRunnerFailure, MigrationRunnerPerSpaceSuccessValue, MigrationRunnerResult, OpFactoryCall, OperationContext, OperationPreview, OperationPreviewCapable, PslContractInferCapable, SchemaIssue, SchemaVerifier, SchemaViewCapable, SignDatabaseResult, VerifyDatabaseResult, VerifyDatabaseSchemaResult } from "@prisma-next/framework-components/control";
|
|
3
3
|
import { SqlControlDriverInstance, SqlStorage, StorageColumn, StorageTable, StorageTypeInstance } from "@prisma-next/sql-contract/types";
|
|
4
4
|
import { PslDocumentAst } from "@prisma-next/framework-components/psl-ast";
|
|
5
5
|
import { Contract } from "@prisma-next/contract/types";
|
|
6
6
|
import { Result } from "@prisma-next/utils/result";
|
|
7
|
-
import { AnyQueryAst, DdlNode,
|
|
7
|
+
import { AnyQueryAst, DdlNode, LowererContext, SqlExecuteRequest } from "@prisma-next/sql-relational-core/ast";
|
|
8
8
|
import { SqlSchemaIR } from "@prisma-next/sql-schema-ir/types";
|
|
9
9
|
import { TargetBoundComponentDescriptor } from "@prisma-next/framework-components/components";
|
|
10
10
|
import { TypesImportSpec } from "@prisma-next/framework-components/emission";
|
|
@@ -68,7 +68,7 @@ interface SqlControlFamilyInstance extends ControlFamilyInstance<'sql', SqlSchem
|
|
|
68
68
|
readonly contract?: unknown;
|
|
69
69
|
}): Promise<SqlSchemaIR>;
|
|
70
70
|
inferPslContract(schemaIR: SqlSchemaIR): PslDocumentAst;
|
|
71
|
-
lowerAst(ast: AnyQueryAst | DdlNode, context: LowererContext<unknown>):
|
|
71
|
+
lowerAst(ast: AnyQueryAst | DdlNode, context: LowererContext<unknown>): Promise<SqlExecuteRequest>;
|
|
72
72
|
/**
|
|
73
73
|
* Inserts the initial marker row for `space` (upsert on `space`).
|
|
74
74
|
* Delegates to the target control adapter's write SPI; see
|
|
@@ -319,7 +319,7 @@ interface SqlMigrationPlan<TTargetDetails> extends MigrationPlan {
|
|
|
319
319
|
* Destination contract identity that the plan intends to reach.
|
|
320
320
|
*/
|
|
321
321
|
readonly destination: SqlMigrationPlanContractInfo;
|
|
322
|
-
readonly operations: readonly SqlMigrationPlanOperation<TTargetDetails>[];
|
|
322
|
+
readonly operations: readonly (SqlMigrationPlanOperation<TTargetDetails> | Promise<SqlMigrationPlanOperation<TTargetDetails>>)[];
|
|
323
323
|
/**
|
|
324
324
|
* Sorted, deduplicated invariant ids declared by this plan's data-transform
|
|
325
325
|
* ops. Required at the SQL-family layer (the SQL runners consume this as
|
|
@@ -517,4 +517,4 @@ interface CreateSqlMigrationPlanOptions<TTargetDetails> {
|
|
|
517
517
|
}
|
|
518
518
|
//#endregion
|
|
519
519
|
export { SqlPlannerResult as A, SqlMigrationRunnerResult as C, SqlPlannerConflictKind as D, SqlPlannerConflict as E, StorageTypePlanResult as M, SqlControlFamilyInstance as N, SqlPlannerConflictLocation as O, SqlMigrationRunnerFailure as S, SqlPlanTargetDetails as T, SqlMigrationPlannerPlanOptions as _, FieldEvent as a, SqlMigrationRunnerExecuteCallbacks as b, SqlControlAdapterDescriptor as c, SqlMigrationPlan as d, SqlMigrationPlanContractInfo as f, SqlMigrationPlanner as g, SqlMigrationPlanOperationTarget as h, ExpandNativeTypeInput as i, SqlPlannerSuccessResult as j, SqlPlannerFailureResult as k, SqlControlExtensionDescriptor as l, SqlMigrationPlanOperationStep as m, CodecControlHooks as n, FieldEventContext as o, SqlMigrationPlanOperation as p, CreateSqlMigrationPlanOptions as r, ResolveIdentityValueInput as s, AnyRecord as t, SqlControlTargetDescriptor as u, SqlMigrationRunner as v, SqlMigrationRunnerSuccessValue as w, SqlMigrationRunnerExecuteOptions as x, SqlMigrationRunnerErrorCode as y };
|
|
520
|
-
//# sourceMappingURL=types-
|
|
520
|
+
//# sourceMappingURL=types-kgstZ_Zd.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-kgstZ_Zd.d.mts","names":[],"sources":["../src/core/control-instance.ts","../src/core/migrations/types.ts"],"mappings":";;;;;;;;;;;;;;UA4KU,eAAA;EAAA,SACC,MAAA;EAAA,SACA,QAAA;EAAA,SACA,QAAA;EAAA,SACA,UAAA;AAAA;AAAA,KAGN,uBAAA,GAA0B,GAAG,S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,wBAAA;IAAA,SACR,eAAA,EAAiB,aAAA,CAAc,gCAAA,CAAiC,cAAA;EAAA,IACvE,OAAA,CAAQ,qBAAA;EAvQJ;;;;;;;;;;EAmRR,mBAAA,CACE,OAAA,EAAS,gCAAA,CAAiC,cAAA,IACzC,OAAA,CAAQ,wBAAA;AAAA;AAAA,UAGI,0BAAA,6DAGG,QAAA,CAAS,UAAA,IAAc,QAAA,CAAS,UAAA,WAC1C,0BAAA,QAAkC,SAAA,EAAW,wBAAA;EAAA,SAC5C,eAAA,SAAwB,uBAAA;;;;;;;WAOxB,kBAAA,EAAoB,kBAAA,CAAmB,SAAA;EApRvB;AAAA;AAU3B;;;;EAV2B,SA2RhB,cAAA,EAAgB,cAAA,CAAe,SAAA,EAAW,WAAA;EACnD,aAAA,CAAc,OAAA,EAAS,iBAAA,CAAkB,SAAA,IAAa,mBAAA,CAAoB,cAAA;EAC1E,YAAA,CAAa,MAAA,EAAQ,wBAAA,GAA2B,kBAAA,CAAmB,cAAA;AAAA;AAAA,UAGpD,6BAAA;EAAA,SACN,QAAA;EAjRA;;;EAAA,SAqRA,OAAA;EAAA,SACA,MAAA,GAAS,4BAAA;EAAA,SACT,WAAA,EAAa,4BAAA;EAAA,SACb,UAAA,WAAqB,yBAAA,CAA0B,cAAA;EApRhB;;;;;EAAA,SA0R/B,kBAAA;EAAA,SACA,IAAA,GAAO,SAAA;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OperationContext, VerifyDatabaseSchemaResult } from "@prisma-next/framework-components/control";
|
|
2
|
-
import {
|
|
2
|
+
import { SqlStorage } from "@prisma-next/sql-contract/types";
|
|
3
3
|
import { ColumnDefault, Contract } from "@prisma-next/contract/types";
|
|
4
4
|
import { SqlSchemaIR } from "@prisma-next/sql-schema-ir/types";
|
|
5
5
|
import { TargetBoundComponentDescriptor } from "@prisma-next/framework-components/components";
|
|
@@ -49,18 +49,6 @@ interface VerifySqlSchemaOptions {
|
|
|
49
49
|
* with contract native types (e.g., Postgres 'varchar' → 'character varying').
|
|
50
50
|
*/
|
|
51
51
|
readonly normalizeNativeType?: NativeTypeNormalizer;
|
|
52
|
-
/**
|
|
53
|
-
* Bridging adapter that resolves the existing values for a `PostgresEnumStorageEntry`
|
|
54
|
-
* (looked up by its native type) from the introspected schema IR. Targets
|
|
55
|
-
* supply this so the family-level verifier can walk `PostgresEnumStorageEntry` instances
|
|
56
|
-
* natively without reaching into target-specific `schema.annotations`
|
|
57
|
-
* shapes itself.
|
|
58
|
-
*
|
|
59
|
-
* Returning `null` indicates the type is missing from the database; the
|
|
60
|
-
* verifier emits a `type_missing` issue. A non-null array triggers a
|
|
61
|
-
* value-set comparison against the contract's `PostgresEnumStorageEntry.values`.
|
|
62
|
-
*/
|
|
63
|
-
readonly resolveExistingEnumValues?: (schema: SqlSchemaIR, enumType: PostgresEnumStorageEntry, namespaceId: string) => readonly string[] | null;
|
|
64
52
|
}
|
|
65
53
|
/**
|
|
66
54
|
* Verifies that a SqlSchemaIR matches a Contract.
|
|
@@ -75,4 +63,4 @@ interface VerifySqlSchemaOptions {
|
|
|
75
63
|
declare function verifySqlSchema(options: VerifySqlSchemaOptions): VerifyDatabaseSchemaResult;
|
|
76
64
|
//#endregion
|
|
77
65
|
export { verifySqlSchema as i, NativeTypeNormalizer as n, VerifySqlSchemaOptions as r, DefaultNormalizer as t };
|
|
78
|
-
//# sourceMappingURL=verify-sql-schema-
|
|
66
|
+
//# sourceMappingURL=verify-sql-schema-thU-jKpf.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-sql-schema-thU-jKpf.d.mts","names":[],"sources":["../src/core/schema-verify/verify-sql-schema.ts"],"mappings":";;;;;;;;;;AAmDkB;KAHN,iBAAA,IACV,UAAA,UACA,UAAA,aACG,aAAa;;;;AAOoC;AAKtD;KALY,oBAAA,IAAwB,UAAkB;;;;UAKrC,sBAAA;EAQI;EAAA,SANV,QAAA,EAAU,QAAA,CAAS,UAAA;EAagB;EAAA,SAXnC,MAAA,EAAQ,WAAA;EAiBW;EAAA,SAfnB,MAAA;EAqB0C;EAAA,SAnB1C,OAAA,GAAU,gBAAA;EANV;EAAA,SAQA,oBAAA,EAAsB,WAAA;IAAsB,UAAA;EAAA;EANpC;;;;EAAA,SAWR,mBAAA,EAAqB,aAAA,CAAc,8BAAA;EALb;;;;;EAAA,SAWtB,gBAAA,GAAmB,iBAAA;EAAA;;;;AAMuB;EANvB,SAMnB,mBAAA,GAAsB,oBAAA;AAAA;;;;;;;AAa2D;;;;iBAA5E,eAAA,CAAgB,OAAA,EAAS,sBAAA,GAAyB,0BAA0B"}
|