@prisma-next/sql-contract-psl 0.13.0-dev.19 → 0.13.0-dev.20

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/provider.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as interpretPslDocumentToSqlContract } from "./interpreter-CQdQo427.mjs";
1
+ import { t as interpretPslDocumentToSqlContract } from "./interpreter-BT6dEGeD.mjs";
2
2
  import { ifDefined } from "@prisma-next/utils/defined";
3
3
  import { notOk, ok } from "@prisma-next/utils/result";
4
4
  import { parsePslDocument } from "@prisma-next/psl-parser";
package/package.json CHANGED
@@ -1,25 +1,25 @@
1
1
  {
2
2
  "name": "@prisma-next/sql-contract-psl",
3
- "version": "0.13.0-dev.19",
3
+ "version": "0.13.0-dev.20",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "description": "PSL-to-SQL ContractIR interpreter for Prisma Next",
8
8
  "dependencies": {
9
- "@prisma-next/config": "0.13.0-dev.19",
10
- "@prisma-next/contract": "0.13.0-dev.19",
11
- "@prisma-next/framework-components": "0.13.0-dev.19",
12
- "@prisma-next/psl-parser": "0.13.0-dev.19",
13
- "@prisma-next/sql-contract": "0.13.0-dev.19",
14
- "@prisma-next/sql-contract-ts": "0.13.0-dev.19",
15
- "@prisma-next/utils": "0.13.0-dev.19",
9
+ "@prisma-next/config": "0.13.0-dev.20",
10
+ "@prisma-next/contract": "0.13.0-dev.20",
11
+ "@prisma-next/framework-components": "0.13.0-dev.20",
12
+ "@prisma-next/psl-parser": "0.13.0-dev.20",
13
+ "@prisma-next/sql-contract": "0.13.0-dev.20",
14
+ "@prisma-next/sql-contract-ts": "0.13.0-dev.20",
15
+ "@prisma-next/utils": "0.13.0-dev.20",
16
16
  "pathe": "^2.0.3"
17
17
  },
18
18
  "devDependencies": {
19
- "@prisma-next/contract-authoring": "0.13.0-dev.19",
20
- "@prisma-next/test-utils": "0.13.0-dev.19",
21
- "@prisma-next/tsconfig": "0.13.0-dev.19",
22
- "@prisma-next/tsdown": "0.13.0-dev.19",
19
+ "@prisma-next/contract-authoring": "0.13.0-dev.20",
20
+ "@prisma-next/test-utils": "0.13.0-dev.20",
21
+ "@prisma-next/tsconfig": "0.13.0-dev.20",
22
+ "@prisma-next/tsdown": "0.13.0-dev.20",
23
23
  "arktype": "^2.2.0",
24
24
  "tsdown": "0.22.1",
25
25
  "typescript": "5.9.3",
@@ -550,7 +550,7 @@ export const NATIVE_TYPE_SPECS: Readonly<Record<string, NativeTypeSpec>> = {
550
550
  codecId: 'sql/char@1',
551
551
  nativeType: 'character',
552
552
  },
553
- 'db.Uuid': { args: 'noArgs', baseType: 'String', codecId: null, nativeType: 'uuid' },
553
+ 'db.Uuid': { args: 'noArgs', baseType: 'String', codecId: 'pg/uuid@1', nativeType: 'uuid' },
554
554
  'db.SmallInt': { args: 'noArgs', baseType: 'Int', codecId: 'pg/int2@1', nativeType: 'int2' },
555
555
  'db.Real': { args: 'noArgs', baseType: 'Float', codecId: 'pg/float4@1', nativeType: 'float4' },
556
556
  'db.Numeric': {
@@ -158,7 +158,7 @@ const BUILTIN_FIELD_ATTRIBUTE_NAMES: ReadonlySet<string> = new Set([
158
158
  * migrated (so they don't get told to do what they just did).
159
159
  *
160
160
  * Pairing the suppression predicate with the hint makes each entry
161
- * self-contained: a future entry for, say, `@id` ↔ `id.uuidv7()` cannot
161
+ * self-contained: a future entry for, say, `@id` ↔ `id.uuidv7String()` cannot
162
162
  * silently inherit the wrong predicate when added.
163
163
  */
164
164
  interface RemovedAttributeRule {
@@ -448,7 +448,9 @@ export function collectResolvedFields(input: CollectResolvedFieldsInput): Resolv
448
448
  });
449
449
  continue;
450
450
  }
451
- if (loweredOnCreate) {
451
+ const fieldUsesNamedType =
452
+ field.typeRef !== undefined || namedTypeDescriptors.has(field.typeName);
453
+ if (loweredOnCreate && !fieldUsesNamedType) {
452
454
  const generatorDescriptor = generatorDescriptorById.get(loweredOnCreate.id);
453
455
  const generatedDescriptor = generatorDescriptor?.resolveGeneratedColumnDescriptor?.({
454
456
  generated: loweredOnCreate,