@prisma-next/family-sql 0.5.0-dev.6 → 0.5.0-dev.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/README.md +2 -2
  2. package/dist/{authoring-type-constructors-BAR65pSK.mjs → authoring-type-constructors-D9b8AG6y.mjs} +13 -13
  3. package/dist/authoring-type-constructors-D9b8AG6y.mjs.map +1 -0
  4. package/dist/control-adapter.d.mts +12 -1
  5. package/dist/control-adapter.d.mts.map +1 -1
  6. package/dist/control.d.mts +97 -27
  7. package/dist/control.d.mts.map +1 -1
  8. package/dist/control.mjs +1030 -13
  9. package/dist/control.mjs.map +1 -1
  10. package/dist/migration.d.mts +22 -23
  11. package/dist/migration.d.mts.map +1 -1
  12. package/dist/migration.mjs +24 -22
  13. package/dist/migration.mjs.map +1 -1
  14. package/dist/pack.d.mts +35 -23
  15. package/dist/pack.mjs +1 -1
  16. package/dist/runtime.d.mts +19 -1
  17. package/dist/runtime.d.mts.map +1 -1
  18. package/dist/runtime.mjs +27 -1
  19. package/dist/runtime.mjs.map +1 -1
  20. package/dist/schema-verify.d.mts +2 -2
  21. package/dist/timestamp-now-generator-Bt4L3cfM.mjs +86 -0
  22. package/dist/timestamp-now-generator-Bt4L3cfM.mjs.map +1 -0
  23. package/dist/{types-C6K4mxDM.d.mts → types-DiBtjG6M.d.mts} +46 -22
  24. package/dist/types-DiBtjG6M.d.mts.map +1 -0
  25. package/dist/verify-BdES8wgQ.mjs +82 -0
  26. package/dist/verify-BdES8wgQ.mjs.map +1 -0
  27. package/dist/{verify-sql-schema-BBhkqEDo.d.mts → verify-sql-schema-DW8Agf1F.d.mts} +2 -2
  28. package/dist/{verify-sql-schema-BBhkqEDo.d.mts.map → verify-sql-schema-DW8Agf1F.d.mts.map} +1 -1
  29. package/dist/verify-sql-schema-Ovz7RXR5.mjs.map +1 -1
  30. package/dist/verify.d.mts +16 -20
  31. package/dist/verify.d.mts.map +1 -1
  32. package/dist/verify.mjs +2 -2
  33. package/package.json +19 -18
  34. package/src/core/authoring-field-presets.ts +35 -23
  35. package/src/core/control-adapter.ts +12 -0
  36. package/src/core/control-instance.ts +43 -15
  37. package/src/core/migrations/plan-helpers.ts +3 -0
  38. package/src/core/migrations/types.ts +38 -20
  39. package/src/core/operation-preview.ts +62 -0
  40. package/src/core/psl-contract-infer/default-mapping.ts +56 -0
  41. package/src/core/psl-contract-infer/name-transforms.ts +178 -0
  42. package/src/core/psl-contract-infer/postgres-default-mapping.ts +16 -0
  43. package/src/core/psl-contract-infer/postgres-type-map.ts +165 -0
  44. package/src/core/psl-contract-infer/printer-config.ts +55 -0
  45. package/src/core/psl-contract-infer/raw-default-parser.ts +91 -0
  46. package/src/core/psl-contract-infer/relation-inference.ts +196 -0
  47. package/src/core/psl-contract-infer/sql-schema-ir-to-psl-ast.ts +832 -0
  48. package/src/core/sql-migration.ts +25 -23
  49. package/src/core/timestamp-now-generator.ts +74 -0
  50. package/src/core/timestamp-now-runtime-generator.ts +24 -0
  51. package/src/core/verify.ts +46 -108
  52. package/src/exports/control.ts +4 -1
  53. package/src/exports/runtime.ts +2 -0
  54. package/src/exports/verify.ts +1 -1
  55. package/dist/authoring-type-constructors-BAR65pSK.mjs.map +0 -1
  56. package/dist/types-C6K4mxDM.d.mts.map +0 -1
  57. package/dist/verify-4GshvY4p.mjs +0 -122
  58. package/dist/verify-4GshvY4p.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"migration.mjs","names":[],"sources":["../src/core/sql-migration.ts"],"sourcesContent":["import { Migration } from '@prisma-next/migration-tools/migration';\nimport type { AnySqlMigrationOperation, SqlPlanTargetDetails } from './migrations/types';\n\n/**\n * Family-owned base class for SQL migrations.\n *\n * Parameterized on the target-details shape because SQL-family targets\n * (Postgres, MySQL, SQLite, …) each carry their own `target.details` payload\n * on `SqlMigrationPlanOperation`. The type parameter is narrowed to\n * `SqlPlanTargetDetails` so every target-specific shape must at minimum\n * identify the object being targeted (schema + name); concrete targets\n * extend the shape with their own fields.\n *\n * Each concrete target-side subclass (e.g. Postgres's\n * `TypeScriptRenderablePostgresMigration`) fixes `targetId` to its own\n * target-id string literal, since SQL can't hardcode a single `targetId`:\n * `targetId` is a target-level identity, not a family-level one, and\n * belongs on the subclass.\n *\n * `familyId` is intentionally not declared here. The SQL family has no\n * family-scoped runtime identity today consumers reach the family via\n * target descriptors rather than by family-id lookup, so adding one would\n * be purely decorative. Introducing it later is a non-breaking superset.\n *\n * The operation type parameter is `AnySqlMigrationOperation<TDetails>` the\n * union of DDL-shaped `SqlMigrationPlanOperation` and `DataTransformOperation`\n * — so subclasses can return a mix of schema operations (e.g. `setNotNull`,\n * `addColumn`) and data-transform operations (e.g. `dataTransform`). Mirrors\n * `MongoMigration`'s parameterization on `AnyMongoMigrationOperation`.\n */\nexport abstract class SqlMigration<\n TDetails extends SqlPlanTargetDetails,\n TTargetId extends string = string,\n> extends Migration<AnySqlMigrationOperation<TDetails>, 'sql', TTargetId> {}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,IAAsB,eAAtB,cAGU,UAAgE"}
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 return deriveProvidedInvariants(this.operations);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,IAAsB,eAAtB,cAGU,UAAiE;;;;;;;;;;;CAWzE,IAAI,qBAAwC;AAC1C,SAAO,yBAAyB,KAAK,WAAW"}
package/dist/pack.d.mts CHANGED
@@ -83,9 +83,11 @@ declare const sqlFamilyPack: {
83
83
  readonly typeParams: {
84
84
  readonly length: 36;
85
85
  };
86
- readonly executionDefault: {
87
- readonly kind: "generator";
88
- readonly id: "uuidv4";
86
+ readonly executionDefaults: {
87
+ readonly onCreate: {
88
+ readonly kind: "generator";
89
+ readonly id: "uuidv4";
90
+ };
89
91
  };
90
92
  readonly id: true;
91
93
  };
@@ -98,9 +100,11 @@ declare const sqlFamilyPack: {
98
100
  readonly typeParams: {
99
101
  readonly length: 36;
100
102
  };
101
- readonly executionDefault: {
102
- readonly kind: "generator";
103
- readonly id: "uuidv7";
103
+ readonly executionDefaults: {
104
+ readonly onCreate: {
105
+ readonly kind: "generator";
106
+ readonly id: "uuidv7";
107
+ };
104
108
  };
105
109
  readonly id: true;
106
110
  };
@@ -113,9 +117,11 @@ declare const sqlFamilyPack: {
113
117
  readonly typeParams: {
114
118
  readonly length: 26;
115
119
  };
116
- readonly executionDefault: {
117
- readonly kind: "generator";
118
- readonly id: "ulid";
120
+ readonly executionDefaults: {
121
+ readonly onCreate: {
122
+ readonly kind: "generator";
123
+ readonly id: "ulid";
124
+ };
119
125
  };
120
126
  readonly id: true;
121
127
  };
@@ -146,14 +152,16 @@ declare const sqlFamilyPack: {
146
152
  readonly default: 21;
147
153
  };
148
154
  };
149
- readonly executionDefault: {
150
- readonly kind: "generator";
151
- readonly id: "nanoid";
152
- readonly params: {
153
- readonly size: {
154
- readonly kind: "arg";
155
- readonly index: 0;
156
- readonly path: readonly ["size"];
155
+ readonly executionDefaults: {
156
+ readonly onCreate: {
157
+ readonly kind: "generator";
158
+ readonly id: "nanoid";
159
+ readonly params: {
160
+ readonly size: {
161
+ readonly kind: "arg";
162
+ readonly index: 0;
163
+ readonly path: readonly ["size"];
164
+ };
157
165
  };
158
166
  };
159
167
  };
@@ -168,9 +176,11 @@ declare const sqlFamilyPack: {
168
176
  readonly typeParams: {
169
177
  readonly length: 24;
170
178
  };
171
- readonly executionDefault: {
172
- readonly kind: "generator";
173
- readonly id: "cuid2";
179
+ readonly executionDefaults: {
180
+ readonly onCreate: {
181
+ readonly kind: "generator";
182
+ readonly id: "cuid2";
183
+ };
174
184
  };
175
185
  readonly id: true;
176
186
  };
@@ -183,9 +193,11 @@ declare const sqlFamilyPack: {
183
193
  readonly typeParams: {
184
194
  readonly length: 27;
185
195
  };
186
- readonly executionDefault: {
187
- readonly kind: "generator";
188
- readonly id: "ksuid";
196
+ readonly executionDefaults: {
197
+ readonly onCreate: {
198
+ readonly kind: "generator";
199
+ readonly id: "ksuid";
200
+ };
189
201
  };
190
202
  readonly id: true;
191
203
  };
package/dist/pack.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as sqlFamilyAuthoringFieldPresets, t as sqlFamilyAuthoringTypes } from "./authoring-type-constructors-BAR65pSK.mjs";
1
+ import { n as sqlFamilyAuthoringFieldPresets, t as sqlFamilyAuthoringTypes } from "./authoring-type-constructors-D9b8AG6y.mjs";
2
2
 
3
3
  //#region src/exports/pack.ts
4
4
  const sqlFamilyPack = {
@@ -1,3 +1,4 @@
1
+ import { RuntimeMutationDefaultGenerator } from "@prisma-next/sql-runtime";
1
2
  import { RuntimeFamilyDescriptor, RuntimeFamilyInstance } from "@prisma-next/framework-components/execution";
2
3
 
3
4
  //#region src/core/runtime-instance.d.ts
@@ -23,5 +24,22 @@ interface SqlRuntimeFamilyInstance extends RuntimeFamilyInstance<'sql'> {}
23
24
  */
24
25
  declare const sqlRuntimeFamilyDescriptor: RuntimeFamilyDescriptor<'sql', SqlRuntimeFamilyInstance>;
25
26
  //#endregion
26
- export { sqlRuntimeFamilyDescriptor as default };
27
+ //#region src/core/timestamp-now-runtime-generator.d.ts
28
+ /**
29
+ * Builds the canonical runtime-plane generator for the wall-clock-now
30
+ * mutation default. Returns `new Date()`; semantics are target-agnostic
31
+ * so all SQL targets share this single implementation.
32
+ *
33
+ * Declares `stability: 'query'` so a single ORM bulk operation
34
+ * (e.g. `createAll([...])`) shares one timestamp across every row and
35
+ * every timestamp-defaulted column. Matches Prisma 6's `@updatedAt`
36
+ * semantics: one `new Date()` per lowered mutation, not per row.
37
+ *
38
+ * Lives in a runtime-plane-only module so the control-plane
39
+ * `timestamp-now-generator.ts` (descriptor + authoring presets) stays
40
+ * free of `@prisma-next/sql-runtime` imports.
41
+ */
42
+ declare function timestampNowRuntimeGenerator(): RuntimeMutationDefaultGenerator;
43
+ //#endregion
44
+ export { sqlRuntimeFamilyDescriptor as default, timestampNowRuntimeGenerator };
27
45
  //# sourceMappingURL=runtime.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.mts","names":[],"sources":["../src/core/runtime-instance.ts","../src/core/runtime-descriptor.ts"],"sourcesContent":[],"mappings":";;;;;;AAUA;;;;ACCA;;UDDiB,wBAAA,SAAiC;;;;AAAlD;;;;ACCA;;;cAAa,4BAA4B,+BAA+B"}
1
+ {"version":3,"file":"runtime.d.mts","names":[],"sources":["../src/core/runtime-instance.ts","../src/core/runtime-descriptor.ts","../src/core/timestamp-now-runtime-generator.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAUA;;;;ACCA;UDDiB,wBAAA,SAAiC;;;;;AAAlD;;;;ACCA;;cAAa,4BAA4B,+BAA+B;;;;;;ADDxE;;;;ACCA;;;;ACMA;;;iBAAgB,4BAAA,CAAA,GAAgC"}
package/dist/runtime.mjs CHANGED
@@ -1,3 +1,5 @@
1
+ import { t as TIMESTAMP_NOW_GENERATOR_ID } from "./timestamp-now-generator-Bt4L3cfM.mjs";
2
+
1
3
  //#region src/core/runtime-instance.ts
2
4
  /**
3
5
  * Creates a SQL execution-plane family instance.
@@ -29,10 +31,34 @@ const sqlRuntimeFamilyDescriptor = {
29
31
  };
30
32
  Object.freeze(sqlRuntimeFamilyDescriptor);
31
33
 
34
+ //#endregion
35
+ //#region src/core/timestamp-now-runtime-generator.ts
36
+ /**
37
+ * Builds the canonical runtime-plane generator for the wall-clock-now
38
+ * mutation default. Returns `new Date()`; semantics are target-agnostic
39
+ * so all SQL targets share this single implementation.
40
+ *
41
+ * Declares `stability: 'query'` so a single ORM bulk operation
42
+ * (e.g. `createAll([...])`) shares one timestamp across every row and
43
+ * every timestamp-defaulted column. Matches Prisma 6's `@updatedAt`
44
+ * semantics: one `new Date()` per lowered mutation, not per row.
45
+ *
46
+ * Lives in a runtime-plane-only module so the control-plane
47
+ * `timestamp-now-generator.ts` (descriptor + authoring presets) stays
48
+ * free of `@prisma-next/sql-runtime` imports.
49
+ */
50
+ function timestampNowRuntimeGenerator() {
51
+ return {
52
+ id: TIMESTAMP_NOW_GENERATOR_ID,
53
+ generate: () => /* @__PURE__ */ new Date(),
54
+ stability: "query"
55
+ };
56
+ }
57
+
32
58
  //#endregion
33
59
  //#region src/exports/runtime.ts
34
60
  var runtime_default = sqlRuntimeFamilyDescriptor;
35
61
 
36
62
  //#endregion
37
- export { runtime_default as default };
63
+ export { runtime_default as default, timestampNowRuntimeGenerator };
38
64
  //# sourceMappingURL=runtime.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.mjs","names":["sqlRuntimeFamilyDescriptor: RuntimeFamilyDescriptor<'sql', SqlRuntimeFamilyInstance>"],"sources":["../src/core/runtime-instance.ts","../src/core/runtime-descriptor.ts","../src/exports/runtime.ts"],"sourcesContent":["import type { RuntimeFamilyInstance } from '@prisma-next/framework-components/execution';\n\n/**\n * SQL execution-plane family instance interface.\n *\n * Note: this is currently named `SqlRuntimeFamilyInstance` because the execution plane\n * framework types are still using the `Runtime*` naming (`RuntimeFamilyInstance`, etc.).\n *\n * This will be renamed to `SqlExecutionFamilyInstance` as part of `TML-1842`.\n */\nexport interface SqlRuntimeFamilyInstance extends RuntimeFamilyInstance<'sql'> {}\n\n/**\n * Creates a SQL execution-plane family instance.\n *\n * This will be renamed to `createSqlExecutionFamilyInstance()` as part of `TML-1842`.\n */\nexport function createSqlRuntimeFamilyInstance(): SqlRuntimeFamilyInstance {\n return {\n familyId: 'sql' as const,\n };\n}\n","import type { RuntimeFamilyDescriptor } from '@prisma-next/framework-components/execution';\nimport { createSqlRuntimeFamilyInstance, type SqlRuntimeFamilyInstance } from './runtime-instance';\n\n/**\n * SQL execution-plane family descriptor.\n *\n * Note: this is currently named `sqlRuntimeFamilyDescriptor` because the execution plane\n * framework types are still using the `Runtime*` naming (`RuntimeFamilyDescriptor`, etc.).\n *\n * This will be renamed to `sqlExecutionFamilyDescriptor` as part of `TML-1842`.\n */\nexport const sqlRuntimeFamilyDescriptor: RuntimeFamilyDescriptor<'sql', SqlRuntimeFamilyInstance> =\n {\n kind: 'family',\n id: 'sql',\n familyId: 'sql',\n version: '0.0.1',\n create() {\n return createSqlRuntimeFamilyInstance();\n },\n };\n\nObject.freeze(sqlRuntimeFamilyDescriptor);\n","import { sqlRuntimeFamilyDescriptor } from '../core/runtime-descriptor';\n\nexport default sqlRuntimeFamilyDescriptor;\n"],"mappings":";;;;;;AAiBA,SAAgB,iCAA2D;AACzE,QAAO,EACL,UAAU,OACX;;;;;;;;;;;;;ACTH,MAAaA,6BACX;CACE,MAAM;CACN,IAAI;CACJ,UAAU;CACV,SAAS;CACT,SAAS;AACP,SAAO,gCAAgC;;CAE1C;AAEH,OAAO,OAAO,2BAA2B;;;;ACpBzC,sBAAe"}
1
+ {"version":3,"file":"runtime.mjs","names":["sqlRuntimeFamilyDescriptor: RuntimeFamilyDescriptor<'sql', SqlRuntimeFamilyInstance>"],"sources":["../src/core/runtime-instance.ts","../src/core/runtime-descriptor.ts","../src/core/timestamp-now-runtime-generator.ts","../src/exports/runtime.ts"],"sourcesContent":["import type { RuntimeFamilyInstance } from '@prisma-next/framework-components/execution';\n\n/**\n * SQL execution-plane family instance interface.\n *\n * Note: this is currently named `SqlRuntimeFamilyInstance` because the execution plane\n * framework types are still using the `Runtime*` naming (`RuntimeFamilyInstance`, etc.).\n *\n * This will be renamed to `SqlExecutionFamilyInstance` as part of `TML-1842`.\n */\nexport interface SqlRuntimeFamilyInstance extends RuntimeFamilyInstance<'sql'> {}\n\n/**\n * Creates a SQL execution-plane family instance.\n *\n * This will be renamed to `createSqlExecutionFamilyInstance()` as part of `TML-1842`.\n */\nexport function createSqlRuntimeFamilyInstance(): SqlRuntimeFamilyInstance {\n return {\n familyId: 'sql' as const,\n };\n}\n","import type { RuntimeFamilyDescriptor } from '@prisma-next/framework-components/execution';\nimport { createSqlRuntimeFamilyInstance, type SqlRuntimeFamilyInstance } from './runtime-instance';\n\n/**\n * SQL execution-plane family descriptor.\n *\n * Note: this is currently named `sqlRuntimeFamilyDescriptor` because the execution plane\n * framework types are still using the `Runtime*` naming (`RuntimeFamilyDescriptor`, etc.).\n *\n * This will be renamed to `sqlExecutionFamilyDescriptor` as part of `TML-1842`.\n */\nexport const sqlRuntimeFamilyDescriptor: RuntimeFamilyDescriptor<'sql', SqlRuntimeFamilyInstance> =\n {\n kind: 'family',\n id: 'sql',\n familyId: 'sql',\n version: '0.0.1',\n create() {\n return createSqlRuntimeFamilyInstance();\n },\n };\n\nObject.freeze(sqlRuntimeFamilyDescriptor);\n","import type { RuntimeMutationDefaultGenerator } from '@prisma-next/sql-runtime';\nimport { TIMESTAMP_NOW_GENERATOR_ID } from './timestamp-now-generator';\n\n/**\n * Builds the canonical runtime-plane generator for the wall-clock-now\n * mutation default. Returns `new Date()`; semantics are target-agnostic\n * so all SQL targets share this single implementation.\n *\n * Declares `stability: 'query'` so a single ORM bulk operation\n * (e.g. `createAll([...])`) shares one timestamp across every row and\n * every timestamp-defaulted column. Matches Prisma 6's `@updatedAt`\n * semantics: one `new Date()` per lowered mutation, not per row.\n *\n * Lives in a runtime-plane-only module so the control-plane\n * `timestamp-now-generator.ts` (descriptor + authoring presets) stays\n * free of `@prisma-next/sql-runtime` imports.\n */\nexport function timestampNowRuntimeGenerator(): RuntimeMutationDefaultGenerator {\n return {\n id: TIMESTAMP_NOW_GENERATOR_ID,\n generate: () => new Date(),\n stability: 'query',\n };\n}\n","import { sqlRuntimeFamilyDescriptor } from '../core/runtime-descriptor';\n\nexport { timestampNowRuntimeGenerator } from '../core/timestamp-now-runtime-generator';\n\nexport default sqlRuntimeFamilyDescriptor;\n"],"mappings":";;;;;;;;AAiBA,SAAgB,iCAA2D;AACzE,QAAO,EACL,UAAU,OACX;;;;;;;;;;;;;ACTH,MAAaA,6BACX;CACE,MAAM;CACN,IAAI;CACJ,UAAU;CACV,SAAS;CACT,SAAS;AACP,SAAO,gCAAgC;;CAE1C;AAEH,OAAO,OAAO,2BAA2B;;;;;;;;;;;;;;;;;;ACLzC,SAAgB,+BAAgE;AAC9E,QAAO;EACL,IAAI;EACJ,gCAAgB,IAAI,MAAM;EAC1B,WAAW;EACZ;;;;;AClBH,sBAAe"}
@@ -1,5 +1,5 @@
1
- import { i as verifySqlSchema, n as NativeTypeNormalizer, r as VerifySqlSchemaOptions } from "./verify-sql-schema-BBhkqEDo.mjs";
2
- import { a as ComponentDatabaseDependency } from "./types-C6K4mxDM.mjs";
1
+ import { i as verifySqlSchema, n as NativeTypeNormalizer, r as VerifySqlSchemaOptions } from "./verify-sql-schema-DW8Agf1F.mjs";
2
+ import { i as ComponentDatabaseDependency } from "./types-DiBtjG6M.mjs";
3
3
  import { SchemaIssue, SchemaVerificationNode } from "@prisma-next/framework-components/control";
4
4
  import { SqlIndexIR, SqlSchemaIR, SqlUniqueIR } from "@prisma-next/sql-schema-ir/types";
5
5
 
@@ -0,0 +1,86 @@
1
+ //#region src/core/timestamp-now-generator.ts
2
+ /**
3
+ * Canonical id for the wall-clock-now mutation default generator.
4
+ *
5
+ * Owned by `family-sql` because that's where the generator lives. The
6
+ * id flows out from here to (1) the control-plane descriptor and the
7
+ * temporal field-preset pair below, (2) the runtime-plane sibling
8
+ * `timestamp-now-runtime-generator.ts`, and (3) authoring surfaces
9
+ * (PSL `temporal.updatedAt()`, TS `field.temporal.updatedAt()`) via
10
+ * the descriptor flow. Co-locating the constant with its only owner
11
+ * keeps the framework layer free of concrete generator ids.
12
+ */
13
+ const TIMESTAMP_NOW_GENERATOR_ID = "timestampNow";
14
+ /**
15
+ * Builds the canonical control-plane descriptor for the wall-clock-now
16
+ * mutation default generator. The descriptor's `id` and `buildPhases`
17
+ * are target-agnostic so PSL `temporal.updatedAt()` and TS
18
+ * `field.temporal.updatedAt()` lower to byte-identical contracts.
19
+ *
20
+ * `applicableCodecIds` is omitted: `timestampNow` is preset-only (not
21
+ * reachable via `@default(timestampNow())` lowering), and the codec is
22
+ * co-registered by the preset descriptor itself, so the
23
+ * `@default(...)` compatibility check has no role to play here.
24
+ */
25
+ function timestampNowControlDescriptor() {
26
+ return {
27
+ id: TIMESTAMP_NOW_GENERATOR_ID,
28
+ buildPhases: () => ({
29
+ onCreate: {
30
+ kind: "generator",
31
+ id: TIMESTAMP_NOW_GENERATOR_ID
32
+ },
33
+ onUpdate: {
34
+ kind: "generator",
35
+ id: TIMESTAMP_NOW_GENERATOR_ID
36
+ }
37
+ })
38
+ };
39
+ }
40
+ /**
41
+ * Builds the canonical `temporal.{createdAt,updatedAt}` field-preset pair
42
+ * for a SQL target. `createdAt` lowers to a `now()` storage default;
43
+ * `updatedAt` lowers to the `timestampNow` execution generator on both
44
+ * `onCreate` and `onUpdate` (RD: "last modified time", non-null). Targets
45
+ * supply the codec/native-type pair that matches their timestamp column;
46
+ * everything else is shared so PSL `temporal.updatedAt()` and TS
47
+ * `field.temporal.updatedAt()` lower to byte-identical contracts across
48
+ * targets by construction.
49
+ */
50
+ function temporalAuthoringPresets(input) {
51
+ const { codecId, nativeType } = input;
52
+ return {
53
+ createdAt: {
54
+ kind: "fieldPreset",
55
+ output: {
56
+ codecId,
57
+ nativeType,
58
+ default: {
59
+ kind: "function",
60
+ expression: "now()"
61
+ }
62
+ }
63
+ },
64
+ updatedAt: {
65
+ kind: "fieldPreset",
66
+ output: {
67
+ codecId,
68
+ nativeType,
69
+ executionDefaults: {
70
+ onCreate: {
71
+ kind: "generator",
72
+ id: TIMESTAMP_NOW_GENERATOR_ID
73
+ },
74
+ onUpdate: {
75
+ kind: "generator",
76
+ id: TIMESTAMP_NOW_GENERATOR_ID
77
+ }
78
+ }
79
+ }
80
+ }
81
+ };
82
+ }
83
+
84
+ //#endregion
85
+ export { temporalAuthoringPresets as n, timestampNowControlDescriptor as r, TIMESTAMP_NOW_GENERATOR_ID as t };
86
+ //# sourceMappingURL=timestamp-now-generator-Bt4L3cfM.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timestamp-now-generator-Bt4L3cfM.mjs","names":[],"sources":["../src/core/timestamp-now-generator.ts"],"sourcesContent":["import type { AuthoringFieldPresetDescriptor } from '@prisma-next/framework-components/authoring';\nimport type { MutationDefaultGeneratorDescriptor } from '@prisma-next/framework-components/control';\n\n/**\n * Canonical id for the wall-clock-now mutation default generator.\n *\n * Owned by `family-sql` because that's where the generator lives. The\n * id flows out from here to (1) the control-plane descriptor and the\n * temporal field-preset pair below, (2) the runtime-plane sibling\n * `timestamp-now-runtime-generator.ts`, and (3) authoring surfaces\n * (PSL `temporal.updatedAt()`, TS `field.temporal.updatedAt()`) via\n * the descriptor flow. Co-locating the constant with its only owner\n * keeps the framework layer free of concrete generator ids.\n */\nexport const TIMESTAMP_NOW_GENERATOR_ID = 'timestampNow' as const;\n\n/**\n * Builds the canonical control-plane descriptor for the wall-clock-now\n * mutation default generator. The descriptor's `id` and `buildPhases`\n * are target-agnostic so PSL `temporal.updatedAt()` and TS\n * `field.temporal.updatedAt()` lower to byte-identical contracts.\n *\n * `applicableCodecIds` is omitted: `timestampNow` is preset-only (not\n * reachable via `@default(timestampNow())` lowering), and the codec is\n * co-registered by the preset descriptor itself, so the\n * `@default(...)` compatibility check has no role to play here.\n */\nexport function timestampNowControlDescriptor(): MutationDefaultGeneratorDescriptor {\n return {\n id: TIMESTAMP_NOW_GENERATOR_ID,\n buildPhases: () => ({\n onCreate: { kind: 'generator', id: TIMESTAMP_NOW_GENERATOR_ID },\n onUpdate: { kind: 'generator', id: TIMESTAMP_NOW_GENERATOR_ID },\n }),\n };\n}\n\n/**\n * Builds the canonical `temporal.{createdAt,updatedAt}` field-preset pair\n * for a SQL target. `createdAt` lowers to a `now()` storage default;\n * `updatedAt` lowers to the `timestampNow` execution generator on both\n * `onCreate` and `onUpdate` (RD: \"last modified time\", non-null). Targets\n * supply the codec/native-type pair that matches their timestamp column;\n * everything else is shared so PSL `temporal.updatedAt()` and TS\n * `field.temporal.updatedAt()` lower to byte-identical contracts across\n * targets by construction.\n */\nexport function temporalAuthoringPresets<\n const CodecId extends string,\n const NativeType extends string,\n>(input: { readonly codecId: CodecId; readonly nativeType: NativeType }) {\n const { codecId, nativeType } = input;\n return {\n createdAt: {\n kind: 'fieldPreset',\n output: {\n codecId,\n nativeType,\n default: { kind: 'function', expression: 'now()' },\n },\n },\n updatedAt: {\n kind: 'fieldPreset',\n output: {\n codecId,\n nativeType,\n executionDefaults: {\n onCreate: { kind: 'generator', id: TIMESTAMP_NOW_GENERATOR_ID },\n onUpdate: { kind: 'generator', id: TIMESTAMP_NOW_GENERATOR_ID },\n },\n },\n },\n } as const satisfies Record<string, AuthoringFieldPresetDescriptor>;\n}\n"],"mappings":";;;;;;;;;;;;AAcA,MAAa,6BAA6B;;;;;;;;;;;;AAa1C,SAAgB,gCAAoE;AAClF,QAAO;EACL,IAAI;EACJ,oBAAoB;GAClB,UAAU;IAAE,MAAM;IAAa,IAAI;IAA4B;GAC/D,UAAU;IAAE,MAAM;IAAa,IAAI;IAA4B;GAChE;EACF;;;;;;;;;;;;AAaH,SAAgB,yBAGd,OAAuE;CACvE,MAAM,EAAE,SAAS,eAAe;AAChC,QAAO;EACL,WAAW;GACT,MAAM;GACN,QAAQ;IACN;IACA;IACA,SAAS;KAAE,MAAM;KAAY,YAAY;KAAS;IACnD;GACF;EACD,WAAW;GACT,MAAM;GACN,QAAQ;IACN;IACA;IACA,mBAAmB;KACjB,UAAU;MAAE,MAAM;MAAa,IAAI;MAA4B;KAC/D,UAAU;MAAE,MAAM;MAAa,IAAI;MAA4B;KAChE;IACF;GACF;EACF"}
@@ -1,10 +1,11 @@
1
- import { ControlAdapterDescriptor, ControlDriverInstance, ControlExtensionDescriptor, ControlFamilyInstance, ControlStack, DataTransformOperation, MigratableTargetDescriptor, MigrationOperationPolicy, MigrationPlan, MigrationPlanOperation, MigrationPlannerConflict, MigrationPlannerFailureResult, MigrationPlannerSuccessResult, MigrationRunnerExecutionChecks, MigrationRunnerFailure, MigrationRunnerSuccessValue, OperationContext, SchemaIssue, SchemaViewCapable, SignDatabaseResult, VerifyDatabaseResult, VerifyDatabaseSchemaResult } from "@prisma-next/framework-components/control";
1
+ import { ControlAdapterDescriptor, ControlDriverInstance, ControlExtensionDescriptor, ControlFamilyInstance, ControlStack, MigratableTargetDescriptor, MigrationOperationPolicy, MigrationPlan, MigrationPlanOperation, MigrationPlannerConflict, MigrationPlannerFailureResult, MigrationPlannerSuccessResult, MigrationRunnerExecutionChecks, MigrationRunnerFailure, MigrationRunnerSuccessValue, OperationContext, OperationPreview, OperationPreviewCapable, PslContractInferCapable, SchemaIssue, SchemaViewCapable, SignDatabaseResult, VerifyDatabaseResult, VerifyDatabaseSchemaResult } from "@prisma-next/framework-components/control";
2
2
  import { Result } from "@prisma-next/utils/result";
3
- import { SqlSchemaIR } from "@prisma-next/sql-schema-ir/types";
4
3
  import { Contract } from "@prisma-next/contract/types";
4
+ import { SqlSchemaIR } from "@prisma-next/sql-schema-ir/types";
5
5
  import { TargetBoundComponentDescriptor } from "@prisma-next/framework-components/components";
6
6
  import { SqlStorage, StorageTypeInstance } from "@prisma-next/sql-contract/types";
7
7
  import { TypesImportSpec } from "@prisma-next/framework-components/emission";
8
+ import { PslDocumentAst } from "@prisma-next/framework-components/psl-ast";
8
9
  import { SqlOperationDescriptor } from "@prisma-next/sql-operations";
9
10
 
10
11
  //#region src/core/control-instance.d.ts
@@ -32,7 +33,7 @@ interface SchemaVerifyOptions {
32
33
  */
33
34
  readonly frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<'sql', string>>;
34
35
  }
35
- interface SqlControlFamilyInstance extends ControlFamilyInstance<'sql', SqlSchemaIR>, SchemaViewCapable<SqlSchemaIR>, SqlFamilyInstanceState {
36
+ interface SqlControlFamilyInstance extends ControlFamilyInstance<'sql', SqlSchemaIR>, SchemaViewCapable<SqlSchemaIR>, PslContractInferCapable<SqlSchemaIR>, OperationPreviewCapable, SqlFamilyInstanceState {
36
37
  validateContract(contractJson: unknown): Contract;
37
38
  verify(options: {
38
39
  readonly driver: ControlDriverInstance<'sql', string>;
@@ -52,6 +53,8 @@ interface SqlControlFamilyInstance extends ControlFamilyInstance<'sql', SqlSchem
52
53
  readonly driver: ControlDriverInstance<'sql', string>;
53
54
  readonly contract?: unknown;
54
55
  }): Promise<SqlSchemaIR>;
56
+ inferPslContract(schemaIR: SqlSchemaIR): PslDocumentAst;
57
+ toOperationPreview(operations: readonly MigrationPlanOperation[]): OperationPreview;
55
58
  }
56
59
  //#endregion
57
60
  //#region src/core/migrations/types.d.ts
@@ -143,6 +146,15 @@ interface SqlControlAdapterDescriptor<TTargetId extends string> extends ControlA
143
146
  interface SqlMigrationPlanOperationStep {
144
147
  readonly description: string;
145
148
  readonly sql: string;
149
+ /**
150
+ * Optional parameter values bound at execution time. The runner forwards
151
+ * these to `driver.query(sql, params ?? [])`, so step authors can use
152
+ * placeholder syntax (`$1`, `$2`, …) instead of inlining literals into
153
+ * the SQL string. Reuses the driver's parameter binder rather than
154
+ * rolling per-target literal serialization for every type the planner
155
+ * may emit.
156
+ */
157
+ readonly params?: readonly unknown[];
146
158
  readonly meta?: AnyRecord;
147
159
  }
148
160
  /**
@@ -168,16 +180,6 @@ interface SqlMigrationPlanOperation<TTargetDetails> extends MigrationPlanOperati
168
180
  readonly postcheck: readonly SqlMigrationPlanOperationStep[];
169
181
  readonly meta?: AnyRecord;
170
182
  }
171
- /**
172
- * Union of all operation shapes a SQL-family migration may emit: schema-facing
173
- * `SqlMigrationPlanOperation`s and family-agnostic `DataTransformOperation`s.
174
- *
175
- * Mirrors `AnyMongoMigrationOperation` in shape — the runner already handles
176
- * both branches via `isDataTransformOperation`, and authored `migration.ts`
177
- * files must be able to intermix `dataTransform(endContract, …)` calls with
178
- * DDL factory calls (e.g. `setNotNull(…)`) in a single `operations` array.
179
- */
180
- type AnySqlMigrationOperation<TTargetDetails> = SqlMigrationPlanOperation<TTargetDetails> | DataTransformOperation;
181
183
  interface SqlMigrationPlanContractInfo {
182
184
  readonly storageHash: string;
183
185
  readonly profileHash?: string;
@@ -193,6 +195,15 @@ interface SqlMigrationPlan<TTargetDetails> extends MigrationPlan {
193
195
  */
194
196
  readonly destination: SqlMigrationPlanContractInfo;
195
197
  readonly operations: readonly SqlMigrationPlanOperation<TTargetDetails>[];
198
+ /**
199
+ * Sorted, deduplicated invariant ids declared by this plan's data-transform
200
+ * ops. Required at the SQL-family layer (the SQL runners consume this as
201
+ * the source of truth for marker writes and self-edge no-op checks); the
202
+ * framework-level {@link MigrationPlan.providedInvariants} stays optional
203
+ * because `db init` / `db update` plans don't have a corresponding
204
+ * migration manifest.
205
+ */
206
+ readonly providedInvariants: readonly string[];
196
207
  readonly meta?: AnyRecord;
197
208
  }
198
209
  type SqlPlannerConflictKind = 'typeMismatch' | 'nullabilityConflict' | 'indexIncompatible' | 'foreignKeyConflict' | 'missingButNonAdditive' | 'unsupportedOperation';
@@ -223,14 +234,21 @@ interface SqlMigrationPlannerPlanOptions {
223
234
  readonly policy: MigrationOperationPolicy;
224
235
  readonly schemaName?: string;
225
236
  /**
226
- * The "from" contract (state the planner assumes the database starts at).
227
- * Only `migration plan` supplies this; `db update` / `db init` reconcile
228
- * against the live schema with no old contract. Strategies that need
229
- * from/to column-shape comparisons (unsafe type change, nullability
237
+ * The "from" contract (state the planner assumes the database starts at),
238
+ * or `null` for reconciliation flows that have no prior contract.
239
+ *
240
+ * Required at every call site so the structural fact "I have a prior
241
+ * contract / I don't" is visible in the type. `migration plan` supplies
242
+ * the previous bundle's `metadata.toContract`; `db update` / `db init`
243
+ * reconcile against the live schema and pass `null`. Strategies that
244
+ * need from/to column-shape comparisons (unsafe type change, nullability
230
245
  * tightening) use this to decide whether to emit `dataTransform`
231
- * placeholders.
246
+ * placeholders; they short-circuit when it is `null`.
247
+ *
248
+ * Planners also derive the "from" identity they stamp onto the produced
249
+ * plan's `describe()` as `fromContract?.storage.storageHash ?? null`.
232
250
  */
233
- readonly fromContract?: Contract<SqlStorage> | null;
251
+ readonly fromContract: Contract<SqlStorage> | null;
234
252
  /**
235
253
  * Active framework components participating in this composition.
236
254
  * SQL targets can interpret this list to derive database dependencies.
@@ -274,7 +292,7 @@ interface SqlMigrationRunnerExecuteOptions<TTargetDetails> {
274
292
  */
275
293
  readonly frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<'sql', string>>;
276
294
  }
277
- type SqlMigrationRunnerErrorCode = 'DESTINATION_CONTRACT_MISMATCH' | 'MARKER_ORIGIN_MISMATCH' | 'POLICY_VIOLATION' | 'PRECHECK_FAILED' | 'POSTCHECK_FAILED' | 'SCHEMA_VERIFY_FAILED' | 'EXECUTION_FAILED';
295
+ type SqlMigrationRunnerErrorCode = 'DESTINATION_CONTRACT_MISMATCH' | 'MARKER_ORIGIN_MISMATCH' | 'POLICY_VIOLATION' | 'PRECHECK_FAILED' | 'POSTCHECK_FAILED' | 'SCHEMA_VERIFY_FAILED' | 'FOREIGN_KEY_VIOLATION' | 'EXECUTION_FAILED';
278
296
  interface SqlMigrationRunnerFailure extends MigrationRunnerFailure {
279
297
  readonly code: SqlMigrationRunnerErrorCode;
280
298
  readonly meta?: AnyRecord;
@@ -294,8 +312,14 @@ interface CreateSqlMigrationPlanOptions<TTargetDetails> {
294
312
  readonly origin?: SqlMigrationPlanContractInfo | null;
295
313
  readonly destination: SqlMigrationPlanContractInfo;
296
314
  readonly operations: readonly SqlMigrationPlanOperation<TTargetDetails>[];
315
+ /**
316
+ * Sorted, deduplicated invariant ids for this plan; mirrors the required
317
+ * field on {@link SqlMigrationPlan}. Callers without a migration manifest
318
+ * (`db init`, `db update`, planner-built plans) pass `[]`.
319
+ */
320
+ readonly providedInvariants: readonly string[];
297
321
  readonly meta?: AnyRecord;
298
322
  }
299
323
  //#endregion
300
- export { SqlPlannerFailureResult as A, SqlMigrationRunnerFailure as C, SqlPlannerConflict as D, SqlPlanTargetDetails as E, isDatabaseDependencyProvider as F, SchemaVerifyOptions as I, SqlControlFamilyInstance as L, SqlPlannerSuccessResult as M, StorageTypePlanResult as N, SqlPlannerConflictKind as O, collectInitDependencies as P, SqlMigrationRunnerExecuteOptions as S, SqlMigrationRunnerSuccessValue as T, SqlMigrationPlanner as _, ComponentDatabaseDependency as a, SqlMigrationRunnerErrorCode as b, ResolveIdentityValueInput as c, SqlControlTargetDescriptor as d, SqlMigrationPlan as f, SqlMigrationPlanOperationTarget as g, SqlMigrationPlanOperationStep as h, ComponentDatabaseDependencies as i, SqlPlannerResult as j, SqlPlannerConflictLocation as k, SqlControlAdapterDescriptor as l, SqlMigrationPlanOperation as m, AnySqlMigrationOperation as n, CreateSqlMigrationPlanOptions as o, SqlMigrationPlanContractInfo as p, CodecControlHooks as r, ExpandNativeTypeInput as s, AnyRecord as t, SqlControlExtensionDescriptor as u, SqlMigrationPlannerPlanOptions as v, SqlMigrationRunnerResult as w, SqlMigrationRunnerExecuteCallbacks as x, SqlMigrationRunner as y };
301
- //# sourceMappingURL=types-C6K4mxDM.d.mts.map
324
+ export { SqlPlannerResult as A, SqlMigrationRunnerResult as C, SqlPlannerConflictKind as D, SqlPlannerConflict as E, SchemaVerifyOptions as F, SqlControlFamilyInstance as I, StorageTypePlanResult as M, collectInitDependencies as N, SqlPlannerConflictLocation as O, isDatabaseDependencyProvider as P, SqlMigrationRunnerFailure as S, SqlPlanTargetDetails as T, SqlMigrationPlannerPlanOptions as _, CreateSqlMigrationPlanOptions as a, SqlMigrationRunnerExecuteCallbacks as b, SqlControlAdapterDescriptor as c, SqlMigrationPlan as d, SqlMigrationPlanContractInfo as f, SqlMigrationPlanner as g, SqlMigrationPlanOperationTarget as h, ComponentDatabaseDependency as i, SqlPlannerSuccessResult as j, SqlPlannerFailureResult as k, SqlControlExtensionDescriptor as l, SqlMigrationPlanOperationStep as m, CodecControlHooks as n, ExpandNativeTypeInput as o, SqlMigrationPlanOperation as p, ComponentDatabaseDependencies as r, ResolveIdentityValueInput as s, AnyRecord as t, SqlControlTargetDescriptor as u, SqlMigrationRunner as v, SqlMigrationRunnerSuccessValue as w, SqlMigrationRunnerExecuteOptions as x, SqlMigrationRunnerErrorCode as y };
325
+ //# sourceMappingURL=types-DiBtjG6M.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-DiBtjG6M.d.mts","names":[],"sources":["../src/core/control-instance.ts","../src/core/migrations/types.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;UAgKU,eAAA;;;;;AA3HsE;AA2HvD,KAOpB,uBAAA,GAA0B,GAAH,CAAA,MAAA,EAAe,eAAA,CAAZ;AAAG,UAExB,sBAAA,CAAsB;EACW,SAAA,gBAAA,EAAd,aAAc,CAAA,eAAA,CAAA;EAAd,SAAA,oBAAA,EACI,aADJ,CACkB,eADlB,CAAA;EACkB,SAAA,YAAA,EACtB,aADsB,CAA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sB,SAAA,UAAA,CAAA,EAAA,MAAA;EAKxD;AAEjB;;;;;AAKA;;;;;;AAMA;;;EAEiD,SAAA,YAAA,EA9ExB,QA8EwB,CA9Ef,UA8Ee,CAAA,GAAA,IAAA;EAAd;;;;;EAEkC,SAAA,mBAAA,EA1ErC,aA0EqC,CA1EvB,8BA0EuB,CAAA,KAAA,EAAA,MAAA,CAAA,CAAA;;AAH3D,UApEO,mBAoEP,CAAA,cAAA,CAAA,CAAA;EAA0B,IAAA,CAAA,OAAA,EAnEpB,8BAmEoB,CAAA,EAnEa,gBAmEb,CAnE8B,cAmE9B,CAAA;AAMpC;AAEoB,UAxEH,kCAwEG,CAAA,cAAA,CAAA,CAAA;EACI,gBAAA,EAAA,SAAA,EAxEO,yBAwEP,CAxEiC,cAwEjC,CAAA,CAAA,EAAA,IAAA;EACkC,mBAAA,EAAA,SAAA,EAxExB,yBAwEwB,CAxEE,cAwEF,CAAA,CAAA,EAAA,IAAA;;AAOxC,UA5ED,gCA4EC,CAAA,cAAA,CAAA,CAAA;EAAS,SAAA,IAAA,EA3EV,gBA2EU,CA3EO,cA2EP,CAAA;mBA1ER;;;;;gCAKa,SAAS;;;;;mBAKtB;;;uBAGI,mCAAmC;qBACrC;;;;;6BAKQ;;;;;;gCAMG,cAAc;;KAGlC,2BAAA;UAUK,yBAAA,SAAkC;iBAClC;kBACC;;UAGD,8BAAA,SAAuC;KAE5C,wBAAA,GAA2B,OACrC,gCACA;UAGe;mBAEJ,iCAAiC,kBACzC,QAAQ;;UAGI,6EACP,kCAAkC,WAAW;mCACpB,cAAc;wBACzB,2BAA2B,oBAAoB;uBAChD,2BAA2B,mBAAmB;;UAGpD;;oBAEG;wBACI;gCACQ,0BAA0B;;;;;;;kBAOxC"}
@@ -0,0 +1,82 @@
1
+ import { type } from "arktype";
2
+
3
+ //#region src/core/verify.ts
4
+ const MetaSchema = type({ "[string]": "unknown" });
5
+ function parseMeta(meta) {
6
+ if (meta === null || meta === void 0) return {};
7
+ let parsed;
8
+ if (typeof meta === "string") try {
9
+ parsed = JSON.parse(meta);
10
+ } catch {
11
+ return {};
12
+ }
13
+ else parsed = meta;
14
+ const result = MetaSchema(parsed);
15
+ if (result instanceof type.errors) return {};
16
+ return result;
17
+ }
18
+ /**
19
+ * SQLite stores `contract_json` as TEXT, so the wire shape is a JSON string;
20
+ * Postgres uses `jsonb` and returns an already-parsed value. Normalize both
21
+ * here so `ContractMarkerRecord.contractJson` is always the structured form.
22
+ */
23
+ function parseContractJson(value) {
24
+ if (value === null || value === void 0) return null;
25
+ if (typeof value !== "string") return value;
26
+ try {
27
+ return JSON.parse(value);
28
+ } catch {
29
+ return null;
30
+ }
31
+ }
32
+ const ContractMarkerRowSchema = type({
33
+ core_hash: "string",
34
+ profile_hash: "string",
35
+ "contract_json?": "unknown | null",
36
+ "canonical_version?": "number | null",
37
+ "updated_at?": "Date | string",
38
+ "app_tag?": "string | null",
39
+ "meta?": "unknown | null",
40
+ invariants: type("string").array()
41
+ });
42
+ /**
43
+ * Parses a contract marker row from database query result.
44
+ * This is SQL-specific parsing logic (handles SQL row structure with snake_case columns).
45
+ */
46
+ function parseContractMarkerRow(row) {
47
+ const result = ContractMarkerRowSchema(row);
48
+ if (result instanceof type.errors) {
49
+ const messages = result.map((p) => p.message).join("; ");
50
+ throw new Error(`Invalid contract marker row: ${messages}`);
51
+ }
52
+ const updatedAt = result.updated_at ? result.updated_at instanceof Date ? result.updated_at : new Date(result.updated_at) : /* @__PURE__ */ new Date();
53
+ return {
54
+ storageHash: result.core_hash,
55
+ profileHash: result.profile_hash,
56
+ contractJson: parseContractJson(result.contract_json),
57
+ canonicalVersion: result.canonical_version ?? null,
58
+ updatedAt,
59
+ appTag: result.app_tag ?? null,
60
+ meta: parseMeta(result.meta),
61
+ invariants: result.invariants
62
+ };
63
+ }
64
+ /**
65
+ * Collects supported codec type IDs from adapter and extension manifests.
66
+ * Returns a sorted, unique array of type IDs that are declared in the manifests.
67
+ * This enables coverage checks by comparing contract column types against supported types.
68
+ *
69
+ * Note: This extracts type IDs from manifest type imports, not from runtime codec registries.
70
+ * The manifests declare which codec types are available, but the actual type IDs
71
+ * are defined in the codec-types TypeScript modules that are imported.
72
+ *
73
+ * For MVP, we return an empty array since extracting type IDs from TypeScript modules
74
+ * would require runtime evaluation or static analysis. This can be enhanced later.
75
+ */
76
+ function collectSupportedCodecTypeIds(descriptors) {
77
+ return [];
78
+ }
79
+
80
+ //#endregion
81
+ export { parseContractMarkerRow as n, collectSupportedCodecTypeIds as t };
82
+ //# sourceMappingURL=verify-BdES8wgQ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify-BdES8wgQ.mjs","names":["parsed: unknown"],"sources":["../src/core/verify.ts"],"sourcesContent":["import type { ContractMarkerRecord } from '@prisma-next/contract/types';\nimport { type } from 'arktype';\n\nconst MetaSchema = type({ '[string]': 'unknown' });\n\nfunction parseMeta(meta: unknown): Record<string, unknown> {\n if (meta === null || meta === undefined) {\n return {};\n }\n\n let parsed: unknown;\n if (typeof meta === 'string') {\n try {\n parsed = JSON.parse(meta);\n } catch {\n return {};\n }\n } else {\n parsed = meta;\n }\n\n const result = MetaSchema(parsed);\n if (result instanceof type.errors) {\n return {};\n }\n\n return result as Record<string, unknown>;\n}\n\n/**\n * SQLite stores `contract_json` as TEXT, so the wire shape is a JSON string;\n * Postgres uses `jsonb` and returns an already-parsed value. Normalize both\n * here so `ContractMarkerRecord.contractJson` is always the structured form.\n */\nfunction parseContractJson(value: unknown): unknown {\n if (value === null || value === undefined) return null;\n if (typeof value !== 'string') return value;\n try {\n return JSON.parse(value);\n } catch {\n return null;\n }\n}\n\n/**\n * Wire shape of a `prisma_contract.marker` row as it comes out of a SQL\n * driver. Snake-cased to match the on-disk column names. Shared by every\n * SQL target's `readMarker` so each runner doesn't redeclare it inline.\n */\nexport type ContractMarkerRow = {\n core_hash: string;\n profile_hash: string;\n contract_json: unknown | null;\n canonical_version: number | null;\n updated_at: Date | string;\n app_tag: string | null;\n meta: unknown | null;\n // SQLite stores arrays as JSON-TEXT, so this is `string` on the wire from\n // a SQLite driver and `string[]` from a Postgres driver. Targets normalize\n // before passing to `parseContractMarkerRow`.\n invariants: unknown;\n};\n\nconst ContractMarkerRowSchema = type({\n core_hash: 'string',\n profile_hash: 'string',\n 'contract_json?': 'unknown | null',\n 'canonical_version?': 'number | null',\n 'updated_at?': 'Date | string',\n 'app_tag?': 'string | null',\n 'meta?': 'unknown | null',\n invariants: type('string').array(),\n});\n\n/**\n * Parses a contract marker row from database query result.\n * This is SQL-specific parsing logic (handles SQL row structure with snake_case columns).\n */\nexport function parseContractMarkerRow(row: unknown): ContractMarkerRecord {\n const result = ContractMarkerRowSchema(row);\n if (result instanceof type.errors) {\n const messages = result.map((p: { message: string }) => p.message).join('; ');\n throw new Error(`Invalid contract marker row: ${messages}`);\n }\n\n const updatedAt = result.updated_at\n ? result.updated_at instanceof Date\n ? result.updated_at\n : new Date(result.updated_at)\n : new Date();\n\n return {\n storageHash: result.core_hash,\n profileHash: result.profile_hash,\n contractJson: parseContractJson(result.contract_json),\n canonicalVersion: result.canonical_version ?? null,\n updatedAt,\n appTag: result.app_tag ?? null,\n meta: parseMeta(result.meta),\n invariants: result.invariants,\n };\n}\n\n/**\n * Collects supported codec type IDs from adapter and extension manifests.\n * Returns a sorted, unique array of type IDs that are declared in the manifests.\n * This enables coverage checks by comparing contract column types against supported types.\n *\n * Note: This extracts type IDs from manifest type imports, not from runtime codec registries.\n * The manifests declare which codec types are available, but the actual type IDs\n * are defined in the codec-types TypeScript modules that are imported.\n *\n * For MVP, we return an empty array since extracting type IDs from TypeScript modules\n * would require runtime evaluation or static analysis. This can be enhanced later.\n */\nexport function collectSupportedCodecTypeIds(\n descriptors: ReadonlyArray<{ readonly id: string }>,\n): readonly string[] {\n // For MVP, return empty array\n // Future enhancement: Extract type IDs from codec-types modules via static analysis\n // or require manifests to explicitly list supported type IDs\n void descriptors;\n return [];\n}\n"],"mappings":";;;AAGA,MAAM,aAAa,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6 @@
1
1
  import { OperationContext, VerifyDatabaseSchemaResult } from "@prisma-next/framework-components/control";
2
- import { SqlSchemaIR } from "@prisma-next/sql-schema-ir/types";
3
2
  import { ColumnDefault, Contract } from "@prisma-next/contract/types";
3
+ import { SqlSchemaIR } from "@prisma-next/sql-schema-ir/types";
4
4
  import { TargetBoundComponentDescriptor } from "@prisma-next/framework-components/components";
5
5
  import { SqlStorage } from "@prisma-next/sql-contract/types";
6
6
 
@@ -64,4 +64,4 @@ interface VerifySqlSchemaOptions {
64
64
  declare function verifySqlSchema(options: VerifySqlSchemaOptions): VerifyDatabaseSchemaResult;
65
65
  //#endregion
66
66
  export { verifySqlSchema as i, NativeTypeNormalizer as n, VerifySqlSchemaOptions as r, DefaultNormalizer as t };
67
- //# sourceMappingURL=verify-sql-schema-BBhkqEDo.d.mts.map
67
+ //# sourceMappingURL=verify-sql-schema-DW8Agf1F.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"verify-sql-schema-BBhkqEDo.d.mts","names":[],"sources":["../src/core/schema-verify/verify-sql-schema.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;AAqEgC,KA9BpB,iBAAA,GA8BoB,CAAA,UAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,GA3B3B,aA2B2B,GAAA,SAAA;;;;AAyBhC;;KA7CY,oBAAA;;;;UAKK,sBAAA;;qBAEI,SAAS;;mBAEX;;;;qBAIE;;iCAEY;;;;;;;gCAKD,cAAc;;;;;;8BAMhB;;;;;;iCAMG;;;;;;;;;;;;iBAajB,eAAA,UAAyB,yBAAyB"}
1
+ {"version":3,"file":"verify-sql-schema-DW8Agf1F.d.mts","names":[],"sources":["../src/core/schema-verify/verify-sql-schema.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;AAqEgC,KA9BpB,iBAAA,GA8BoB,CAAA,UAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,GA3B3B,aA2B2B,GAAA,SAAA;;;;AAyBhC;;KA7CY,oBAAA;;;;UAKK,sBAAA;;qBAEI,SAAS;;mBAEX;;;;qBAIE;;iCAEY;;;;;;;gCAKD,cAAc;;;;;;8BAMhB;;;;;;iCAMG;;;;;;;;;;;;iBAajB,eAAA,UAAyB,yBAAyB"}