@prisma-next/target-postgres 0.14.0-dev.4 → 0.14.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-BX1WHIdN.mjs +220 -0
- package/dist/authoring-BX1WHIdN.mjs.map +1 -0
- package/dist/canonicalize-Bn3BM1Cn.mjs +46 -0
- package/dist/canonicalize-Bn3BM1Cn.mjs.map +1 -0
- package/dist/canonicalize-CAbXtVtB.d.mts +37 -0
- package/dist/canonicalize-CAbXtVtB.d.mts.map +1 -0
- package/dist/{codec-types-DHCkwPKE.d.mts → codec-types-CueCoGD0.d.mts} +2 -2
- package/dist/{codec-types-DHCkwPKE.d.mts.map → codec-types-CueCoGD0.d.mts.map} +1 -1
- package/dist/codec-types.d.mts +1 -1
- package/dist/{codecs--0A5_4Bq.d.mts → codecs-Ca8upop6.d.mts} +12 -1
- package/dist/codecs-Ca8upop6.d.mts.map +1 -0
- package/dist/codecs.d.mts +1 -1
- package/dist/codecs.mjs +34 -1
- package/dist/codecs.mjs.map +1 -1
- package/dist/contract-free.d.mts +8 -3
- package/dist/contract-free.d.mts.map +1 -1
- package/dist/contract-free.mjs +3 -3
- package/dist/control.d.mts +1 -1
- package/dist/control.d.mts.map +1 -1
- package/dist/control.mjs +639 -21
- package/dist/control.mjs.map +1 -1
- package/dist/data-transform-BOWpliq8.mjs.map +1 -1
- package/dist/{data-transform-DDgWdB5o.d.mts → data-transform-qKy1U5V9.d.mts} +2 -2
- package/dist/{data-transform-DDgWdB5o.d.mts.map → data-transform-qKy1U5V9.d.mts.map} +1 -1
- package/dist/data-transform.d.mts +1 -1
- package/dist/{ddl-QDyOSeLc.mjs → ddl-BmLIe1z_.mjs} +62 -5
- package/dist/ddl-BmLIe1z_.mjs.map +1 -0
- package/dist/ddl.d.mts +3 -2
- package/dist/ddl.mjs +2 -2
- package/dist/{default-normalizer-DyyCHQWs.mjs → default-normalizer-Dug8Fez9.mjs} +119 -2
- package/dist/default-normalizer-Dug8Fez9.mjs.map +1 -0
- package/dist/default-normalizer.d.mts +1 -1
- package/dist/default-normalizer.d.mts.map +1 -1
- package/dist/default-normalizer.mjs +1 -1
- package/dist/descriptor-meta-runtime-UwYdV8fD.mjs +12 -0
- package/dist/descriptor-meta-runtime-UwYdV8fD.mjs.map +1 -0
- package/dist/descriptor-meta-tjatyhtZ.mjs +18 -0
- package/dist/descriptor-meta-tjatyhtZ.mjs.map +1 -0
- package/dist/{issue-planner-DL6g3CmE.mjs → issue-planner-DbFvaAgu.mjs} +35 -10
- package/dist/issue-planner-DbFvaAgu.mjs.map +1 -0
- package/dist/issue-planner.d.mts +3 -3
- package/dist/issue-planner.d.mts.map +1 -1
- package/dist/issue-planner.mjs +1 -1
- package/dist/migration.d.mts +5 -5
- package/dist/migration.mjs +4 -4
- package/dist/nodes-CSkPX3rI.d.mts +120 -0
- package/dist/nodes-CSkPX3rI.d.mts.map +1 -0
- package/dist/{nodes-Bbhs2rwj.mjs → nodes-Dh__NS58.mjs} +56 -2
- package/dist/nodes-Dh__NS58.mjs.map +1 -0
- package/dist/{op-factory-call-DmQEc3XV.d.mts → op-factory-call-CJWUxyUW.d.mts} +44 -13
- package/dist/op-factory-call-CJWUxyUW.d.mts.map +1 -0
- package/dist/{op-factory-call-D_p5vxwt.mjs → op-factory-call-t65c4jyY.mjs} +201 -28
- package/dist/op-factory-call-t65c4jyY.mjs.map +1 -0
- package/dist/op-factory-call.d.mts +1 -1
- package/dist/op-factory-call.mjs +1 -1
- package/dist/pack.d.mts +74 -2
- package/dist/pack.d.mts.map +1 -1
- package/dist/pack.mjs +1 -1
- package/dist/planner-CG2pLHk-.mjs +640 -0
- package/dist/planner-CG2pLHk-.mjs.map +1 -0
- package/dist/{planner-ddl-builders-B2wOwLqI.mjs → planner-ddl-builders-B8Nn6nHN.mjs} +12 -27
- package/dist/planner-ddl-builders-B8Nn6nHN.mjs.map +1 -0
- package/dist/planner-ddl-builders.d.mts +2 -4
- package/dist/planner-ddl-builders.d.mts.map +1 -1
- package/dist/planner-ddl-builders.mjs +2 -2
- package/dist/{planner-produced-postgres-migration-Cji5vxUf.mjs → planner-produced-postgres-migration-BolD0Mvc.mjs} +3 -3
- package/dist/{planner-produced-postgres-migration-Cji5vxUf.mjs.map → planner-produced-postgres-migration-BolD0Mvc.mjs.map} +1 -1
- package/dist/{planner-produced-postgres-migration-QqHa2C2l.d.mts → planner-produced-postgres-migration-Cz9--XOT.d.mts} +4 -4
- package/dist/{planner-produced-postgres-migration-QqHa2C2l.d.mts.map → planner-produced-postgres-migration-Cz9--XOT.d.mts.map} +1 -1
- package/dist/planner-produced-postgres-migration.d.mts +1 -1
- package/dist/planner-produced-postgres-migration.mjs +1 -1
- package/dist/{planner-sql-checks-jqUUGyQR.mjs → planner-sql-checks-DE9c4519.mjs} +2 -2
- package/dist/{planner-sql-checks-jqUUGyQR.mjs.map → planner-sql-checks-DE9c4519.mjs.map} +1 -1
- package/dist/planner-sql-checks.mjs +1 -1
- package/dist/{planner-target-details-CIY6tLeo.d.mts → planner-target-details-HkP4RrRO.d.mts} +2 -2
- package/dist/planner-target-details-HkP4RrRO.d.mts.map +1 -0
- package/dist/planner-target-details.d.mts +1 -1
- package/dist/planner.d.mts +82 -4
- package/dist/planner.d.mts.map +1 -1
- package/dist/planner.mjs +2 -2
- package/dist/{postgres-contract-serializer-k3TAcPMY.mjs → postgres-contract-view-BegduLr6.mjs} +50 -23
- package/dist/postgres-contract-view-BegduLr6.mjs.map +1 -0
- package/dist/postgres-contract-view-C9j5cqP0.d.mts +34 -0
- package/dist/postgres-contract-view-C9j5cqP0.d.mts.map +1 -0
- package/dist/postgres-database-schema-node-os8ogEap.d.mts +183 -0
- package/dist/postgres-database-schema-node-os8ogEap.d.mts.map +1 -0
- package/dist/{postgres-migration-B5jKrXv3.mjs → postgres-migration-BfMmK6tv.mjs} +21 -2
- package/dist/postgres-migration-BfMmK6tv.mjs.map +1 -0
- package/dist/{postgres-migration-Y4YBJqkS.d.mts → postgres-migration-D7kNVWVG.d.mts} +19 -6
- package/dist/postgres-migration-D7kNVWVG.d.mts.map +1 -0
- package/dist/postgres-rls-policy--CSddvMR.d.mts +52 -0
- package/dist/postgres-rls-policy--CSddvMR.d.mts.map +1 -0
- package/dist/{postgres-schema-COGZ1ark.mjs → postgres-schema-BLIHBEfX.mjs} +108 -5
- package/dist/postgres-schema-BLIHBEfX.mjs.map +1 -0
- package/dist/postgres-schema-BywoeKlt.d.mts +189 -0
- package/dist/postgres-schema-BywoeKlt.d.mts.map +1 -0
- package/dist/postgres-table-schema-node-1nNc8XDT.mjs +248 -0
- package/dist/postgres-table-schema-node-1nNc8XDT.mjs.map +1 -0
- package/dist/render-ops.d.mts +1 -1
- package/dist/{render-typescript-KMgosran.mjs → render-typescript-7yqILcwr.mjs} +45 -16
- package/dist/render-typescript-7yqILcwr.mjs.map +1 -0
- package/dist/render-typescript.mjs +1 -1
- package/dist/resolve-ddl-schema-CL1RR1mx.mjs +20 -0
- package/dist/resolve-ddl-schema-CL1RR1mx.mjs.map +1 -0
- package/dist/rls-canonicalize.d.mts +2 -0
- package/dist/rls-canonicalize.mjs +2 -0
- package/dist/runtime.d.mts +7 -6
- package/dist/runtime.d.mts.map +1 -1
- package/dist/runtime.mjs +3 -3
- package/dist/runtime.mjs.map +1 -1
- package/dist/schema-ir-annotations.d.mts +14 -0
- package/dist/schema-ir-annotations.d.mts.map +1 -0
- package/dist/schema-ir-annotations.mjs +2 -0
- package/dist/types.d.mts +4 -140
- package/dist/types.mjs +3 -2
- package/package.json +22 -17
- package/src/contract-free/checks.ts +73 -0
- package/src/contract-free/ddl.ts +45 -1
- package/src/core/authoring.ts +115 -1
- package/src/core/codecs.ts +35 -1
- package/src/core/ddl/nodes.ts +94 -2
- package/src/core/default-normalizer.ts +122 -2
- package/src/core/descriptor-meta.ts +4 -0
- package/src/core/entity-kinds.ts +16 -0
- package/src/core/migrations/bound-schema.ts +10 -0
- package/src/core/migrations/contract-to-postgres-database-schema-node.ts +125 -0
- package/src/core/migrations/control-policy.ts +3 -0
- package/src/core/migrations/diff-database-schema.ts +191 -0
- package/src/core/migrations/issue-planner.ts +44 -3
- package/src/core/migrations/op-factory-call.ts +109 -21
- package/src/core/migrations/operations/columns.ts +24 -12
- package/src/core/migrations/operations/data-transform.ts +6 -0
- package/src/core/migrations/operations/rls.ts +106 -0
- package/src/core/migrations/operations/shared.ts +0 -30
- package/src/core/migrations/planner-ddl-builders.ts +15 -56
- package/src/core/migrations/planner-recipes.ts +31 -13
- package/src/core/migrations/planner-strategies.ts +3 -11
- package/src/core/migrations/planner-target-details.ts +3 -1
- package/src/core/migrations/planner.ts +165 -33
- package/src/core/migrations/postgres-migration.ts +34 -4
- package/src/core/migrations/render-typescript.ts +42 -15
- package/src/core/migrations/resolve-ddl-schema.ts +24 -0
- package/src/core/migrations/runner.ts +13 -16
- package/src/core/migrations/verify-postgres-namespaces.ts +24 -19
- package/src/core/postgres-contract-serializer.ts +50 -33
- package/src/core/postgres-contract-view.ts +48 -0
- package/src/core/postgres-rls-policy.ts +64 -0
- package/src/core/postgres-role.ts +37 -0
- package/src/core/postgres-schema.ts +37 -13
- package/src/core/postgres-validators.ts +20 -0
- package/src/core/psl-infer/infer-psl-contract.ts +834 -0
- package/src/core/psl-infer/postgres-default-mapping.ts +16 -0
- package/src/core/psl-infer/postgres-type-map.ts +157 -0
- package/src/core/rls/canonicalize.ts +48 -0
- package/src/core/schema-ir/postgres-database-schema-node.ts +63 -0
- package/src/core/schema-ir/postgres-namespace-schema-node.ts +61 -0
- package/src/core/schema-ir/postgres-policy-schema-node.ts +93 -0
- package/src/core/schema-ir/postgres-role-schema-node.ts +66 -0
- package/src/core/schema-ir/postgres-table-schema-node.ts +107 -0
- package/src/core/schema-ir/schema-node-kinds.ts +28 -0
- package/src/exports/contract-free.ts +7 -1
- package/src/exports/control.ts +39 -12
- package/src/exports/ddl.ts +4 -0
- package/src/exports/migration.ts +1 -0
- package/src/exports/planner-ddl-builders.ts +0 -2
- package/src/exports/planner.ts +2 -0
- package/src/exports/rls-canonicalize.ts +6 -0
- package/src/exports/runtime.ts +1 -0
- package/src/exports/schema-ir-annotations.ts +1 -0
- package/src/exports/types.ts +28 -0
- package/dist/codecs--0A5_4Bq.d.mts.map +0 -1
- package/dist/ddl-QDyOSeLc.mjs.map +0 -1
- package/dist/default-normalizer-DyyCHQWs.mjs.map +0 -1
- package/dist/descriptor-meta-CpGygXpI.mjs +0 -140
- package/dist/descriptor-meta-CpGygXpI.mjs.map +0 -1
- package/dist/issue-planner-DL6g3CmE.mjs.map +0 -1
- package/dist/nodes-Bbhs2rwj.mjs.map +0 -1
- package/dist/nodes-pLeLgdis.d.mts +0 -67
- package/dist/nodes-pLeLgdis.d.mts.map +0 -1
- package/dist/op-factory-call-D_p5vxwt.mjs.map +0 -1
- package/dist/op-factory-call-DmQEc3XV.d.mts.map +0 -1
- package/dist/planner-Bs_baQax.mjs +0 -324
- package/dist/planner-Bs_baQax.mjs.map +0 -1
- package/dist/planner-ddl-builders-B2wOwLqI.mjs.map +0 -1
- package/dist/planner-target-details-CIY6tLeo.d.mts.map +0 -1
- package/dist/postgres-contract-serializer-k3TAcPMY.mjs.map +0 -1
- package/dist/postgres-migration-B5jKrXv3.mjs.map +0 -1
- package/dist/postgres-migration-Y4YBJqkS.d.mts.map +0 -1
- package/dist/postgres-schema-COGZ1ark.mjs.map +0 -1
- package/dist/render-typescript-KMgosran.mjs.map +0 -1
- package/dist/types.d.mts.map +0 -1
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { c as PostgresRlsPolicySchema, d as PostgresRlsPolicy, l as PostgresRoleSchema, u as PostgresRole } from "./postgres-schema-BLIHBEfX.mjs";
|
|
2
|
+
import { n as normalizePredicate, t as computeContentHash } from "./canonicalize-Bn3BM1Cn.mjs";
|
|
3
|
+
import { temporalAuthoringPresets } from "@prisma-next/family-sql/control";
|
|
4
|
+
//#region src/core/authoring.ts
|
|
5
|
+
const postgresAuthoringTypes = {};
|
|
6
|
+
function readRefParam(block, key) {
|
|
7
|
+
const param = block.parameters[key];
|
|
8
|
+
return param?.kind === "ref" ? param.identifier : void 0;
|
|
9
|
+
}
|
|
10
|
+
function readValueParam(block, key) {
|
|
11
|
+
const param = block.parameters[key];
|
|
12
|
+
return param?.kind === "value" ? param.raw : void 0;
|
|
13
|
+
}
|
|
14
|
+
function readListRefParams(block, key) {
|
|
15
|
+
const param = block.parameters[key];
|
|
16
|
+
if (param?.kind !== "list") return [];
|
|
17
|
+
return param.items.flatMap((item) => item.kind === "ref" ? [item.identifier] : []);
|
|
18
|
+
}
|
|
19
|
+
function unwrapQuotedString(raw) {
|
|
20
|
+
if (raw.startsWith("\"") && raw.endsWith("\"") && raw.length >= 2) return raw.slice(1, -1).replace(/\\"/g, "\"");
|
|
21
|
+
return raw;
|
|
22
|
+
}
|
|
23
|
+
function lowerRlsPolicyFromBlock(block, _ctx) {
|
|
24
|
+
const prefix = block.name;
|
|
25
|
+
const targetModelName = readRefParam(block, "target") ?? "";
|
|
26
|
+
const tableName = targetModelName.charAt(0).toLowerCase() + targetModelName.slice(1);
|
|
27
|
+
const roles = [...readListRefParams(block, "roles")].sort();
|
|
28
|
+
const using = unwrapQuotedString(readValueParam(block, "using") ?? "");
|
|
29
|
+
return new PostgresRlsPolicy({
|
|
30
|
+
name: `${prefix}_${computeContentHash({
|
|
31
|
+
using: normalizePredicate(using),
|
|
32
|
+
roles,
|
|
33
|
+
operation: "select",
|
|
34
|
+
permissive: true
|
|
35
|
+
})}`,
|
|
36
|
+
prefix,
|
|
37
|
+
tableName,
|
|
38
|
+
namespaceId: block.namespaceId,
|
|
39
|
+
operation: "select",
|
|
40
|
+
roles,
|
|
41
|
+
using,
|
|
42
|
+
permissive: true
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
const postgresAuthoringEntityTypes = {
|
|
46
|
+
role: {
|
|
47
|
+
kind: "entity",
|
|
48
|
+
discriminator: "role",
|
|
49
|
+
validatorSchema: PostgresRoleSchema,
|
|
50
|
+
output: { factory: (input) => new PostgresRole(input) }
|
|
51
|
+
},
|
|
52
|
+
policy: {
|
|
53
|
+
kind: "entity",
|
|
54
|
+
discriminator: "policy",
|
|
55
|
+
validatorSchema: PostgresRlsPolicySchema,
|
|
56
|
+
output: { factory: lowerRlsPolicyFromBlock }
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Field presets contributed by the Postgres target pack.
|
|
61
|
+
*
|
|
62
|
+
* These mirror the PSL scalar-to-codec mapping used by the Postgres adapter
|
|
63
|
+
* (see `createPostgresPslScalarTypeDescriptors`), so that authoring a field
|
|
64
|
+
* via the TS callback surface (e.g. `field.int()`) and via the PSL scalar
|
|
65
|
+
* surface (e.g. `Int`) lowers to byte-identical contracts.
|
|
66
|
+
*
|
|
67
|
+
* The `uuidNative` / `id.uuidv4Native` / `id.uuidv7Native` presets use the
|
|
68
|
+
* native Postgres `uuid` type (codecId `pg/uuid@1`). For cross-target
|
|
69
|
+
* portability use `uuidString` / `id.uuidv4String` / `id.uuidv7String` from
|
|
70
|
+
* the family pack instead.
|
|
71
|
+
*/
|
|
72
|
+
/**
|
|
73
|
+
* PSL block descriptor for `policy_select`.
|
|
74
|
+
*
|
|
75
|
+
* The parser learns the block shape from this descriptor; lowering from
|
|
76
|
+
* `PslExtensionBlock` to `PostgresRlsPolicy` is wired in the PSL
|
|
77
|
+
* interpreter (a later dispatch). The `discriminator` matches
|
|
78
|
+
* `PostgresRlsPolicy.kind` so the parsed block node carries the same
|
|
79
|
+
* discriminant as the IR class it will lower to.
|
|
80
|
+
*
|
|
81
|
+
* The `roles` list uses `scope:'cross-space'` because same-namespace
|
|
82
|
+
* role ref resolution requires PSL namespace entries keyed by `refKind`
|
|
83
|
+
* (i.e. `'role'`), which in turn requires the role block discriminator to
|
|
84
|
+
* equal `'role'`. Aligning discriminator with refKind is tracked for
|
|
85
|
+
* slice 4 (cross-space roles). Until then cross-space passes validation
|
|
86
|
+
* unconditionally and the authored role names flow through unchanged.
|
|
87
|
+
*/
|
|
88
|
+
const postgresAuthoringPslBlockDescriptors = { policy_select: {
|
|
89
|
+
kind: "pslBlock",
|
|
90
|
+
keyword: "policy_select",
|
|
91
|
+
discriminator: "policy",
|
|
92
|
+
name: { required: true },
|
|
93
|
+
parameters: {
|
|
94
|
+
target: {
|
|
95
|
+
kind: "ref",
|
|
96
|
+
refKind: "model",
|
|
97
|
+
scope: "same-namespace",
|
|
98
|
+
required: true
|
|
99
|
+
},
|
|
100
|
+
roles: {
|
|
101
|
+
kind: "list",
|
|
102
|
+
of: {
|
|
103
|
+
kind: "ref",
|
|
104
|
+
refKind: "role",
|
|
105
|
+
scope: "cross-space"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
using: {
|
|
109
|
+
kind: "value",
|
|
110
|
+
codecId: "pg/text@1",
|
|
111
|
+
required: true
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
} };
|
|
115
|
+
const postgresAuthoringFieldPresets = {
|
|
116
|
+
text: {
|
|
117
|
+
kind: "fieldPreset",
|
|
118
|
+
output: {
|
|
119
|
+
codecId: "pg/text@1",
|
|
120
|
+
nativeType: "text"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
int: {
|
|
124
|
+
kind: "fieldPreset",
|
|
125
|
+
output: {
|
|
126
|
+
codecId: "pg/int4@1",
|
|
127
|
+
nativeType: "int4"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
bigint: {
|
|
131
|
+
kind: "fieldPreset",
|
|
132
|
+
output: {
|
|
133
|
+
codecId: "pg/int8@1",
|
|
134
|
+
nativeType: "int8"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
float: {
|
|
138
|
+
kind: "fieldPreset",
|
|
139
|
+
output: {
|
|
140
|
+
codecId: "pg/float8@1",
|
|
141
|
+
nativeType: "float8"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
decimal: {
|
|
145
|
+
kind: "fieldPreset",
|
|
146
|
+
output: {
|
|
147
|
+
codecId: "pg/numeric@1",
|
|
148
|
+
nativeType: "numeric"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
boolean: {
|
|
152
|
+
kind: "fieldPreset",
|
|
153
|
+
output: {
|
|
154
|
+
codecId: "pg/bool@1",
|
|
155
|
+
nativeType: "bool"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
json: {
|
|
159
|
+
kind: "fieldPreset",
|
|
160
|
+
output: {
|
|
161
|
+
codecId: "pg/jsonb@1",
|
|
162
|
+
nativeType: "jsonb"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
bytes: {
|
|
166
|
+
kind: "fieldPreset",
|
|
167
|
+
output: {
|
|
168
|
+
codecId: "pg/bytea@1",
|
|
169
|
+
nativeType: "bytea"
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
dateTime: {
|
|
173
|
+
kind: "fieldPreset",
|
|
174
|
+
output: {
|
|
175
|
+
codecId: "pg/timestamptz@1",
|
|
176
|
+
nativeType: "timestamptz"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
temporal: /* @__PURE__ */ temporalAuthoringPresets({
|
|
180
|
+
codecId: "pg/timestamptz@1",
|
|
181
|
+
nativeType: "timestamptz"
|
|
182
|
+
}),
|
|
183
|
+
uuidNative: {
|
|
184
|
+
kind: "fieldPreset",
|
|
185
|
+
output: {
|
|
186
|
+
codecId: "pg/uuid@1",
|
|
187
|
+
nativeType: "uuid"
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
id: {
|
|
191
|
+
uuidv4Native: {
|
|
192
|
+
kind: "fieldPreset",
|
|
193
|
+
output: {
|
|
194
|
+
codecId: "pg/uuid@1",
|
|
195
|
+
nativeType: "uuid",
|
|
196
|
+
executionDefaults: { onCreate: {
|
|
197
|
+
kind: "generator",
|
|
198
|
+
id: "uuidv4"
|
|
199
|
+
} },
|
|
200
|
+
id: true
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
uuidv7Native: {
|
|
204
|
+
kind: "fieldPreset",
|
|
205
|
+
output: {
|
|
206
|
+
codecId: "pg/uuid@1",
|
|
207
|
+
nativeType: "uuid",
|
|
208
|
+
executionDefaults: { onCreate: {
|
|
209
|
+
kind: "generator",
|
|
210
|
+
id: "uuidv7"
|
|
211
|
+
} },
|
|
212
|
+
id: true
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
//#endregion
|
|
218
|
+
export { postgresAuthoringTypes as i, postgresAuthoringFieldPresets as n, postgresAuthoringPslBlockDescriptors as r, postgresAuthoringEntityTypes as t };
|
|
219
|
+
|
|
220
|
+
//# sourceMappingURL=authoring-BX1WHIdN.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authoring-BX1WHIdN.mjs","names":[],"sources":["../src/core/authoring.ts"],"sourcesContent":["import { temporalAuthoringPresets } from '@prisma-next/family-sql/control';\nimport type {\n AuthoringEntityContext,\n AuthoringEntityTypeNamespace,\n AuthoringFieldNamespace,\n AuthoringPslBlockDescriptorNamespace,\n AuthoringTypeNamespace,\n PslExtensionBlock,\n} from '@prisma-next/framework-components/authoring';\nimport { PostgresRlsPolicy } from './postgres-rls-policy';\nimport { PostgresRole, type PostgresRoleInput } from './postgres-role';\nimport { PostgresRlsPolicySchema, PostgresRoleSchema } from './postgres-validators';\nimport { computeContentHash, normalizePredicate } from './rls/canonicalize';\n\nexport const postgresAuthoringTypes = {} as const satisfies AuthoringTypeNamespace;\n\nexport interface RlsPolicyExtensionBlock extends PslExtensionBlock {\n readonly namespaceId: string;\n}\n\nfunction readRefParam(block: PslExtensionBlock, key: string): string | undefined {\n const param = block.parameters[key];\n return param?.kind === 'ref' ? param.identifier : undefined;\n}\n\nfunction readValueParam(block: PslExtensionBlock, key: string): string | undefined {\n const param = block.parameters[key];\n return param?.kind === 'value' ? param.raw : undefined;\n}\n\nfunction readListRefParams(block: PslExtensionBlock, key: string): string[] {\n const param = block.parameters[key];\n if (param?.kind !== 'list') return [];\n return param.items.flatMap((item) => (item.kind === 'ref' ? [item.identifier] : []));\n}\n\nfunction unwrapQuotedString(raw: string): string {\n if (raw.startsWith('\"') && raw.endsWith('\"') && raw.length >= 2) {\n return raw.slice(1, -1).replace(/\\\\\"/g, '\"');\n }\n return raw;\n}\n\nfunction lowerRlsPolicyFromBlock(\n block: RlsPolicyExtensionBlock,\n _ctx: AuthoringEntityContext,\n): PostgresRlsPolicy {\n const prefix = block.name;\n const targetModelName = readRefParam(block, 'target') ?? '';\n const tableName = targetModelName.charAt(0).toLowerCase() + targetModelName.slice(1);\n const roles = [...readListRefParams(block, 'roles')].sort();\n const using = unwrapQuotedString(readValueParam(block, 'using') ?? '');\n\n const wireHash = computeContentHash({\n using: normalizePredicate(using),\n roles,\n operation: 'select',\n permissive: true,\n });\n const wireName = `${prefix}_${wireHash}`;\n\n return new PostgresRlsPolicy({\n name: wireName,\n prefix,\n tableName,\n namespaceId: block.namespaceId,\n operation: 'select',\n roles,\n using,\n permissive: true,\n });\n}\n\nexport const postgresAuthoringEntityTypes = {\n role: {\n kind: 'entity',\n discriminator: 'role',\n validatorSchema: PostgresRoleSchema,\n output: {\n factory: (input: PostgresRoleInput): PostgresRole => new PostgresRole(input),\n },\n },\n policy: {\n kind: 'entity',\n discriminator: 'policy',\n validatorSchema: PostgresRlsPolicySchema,\n output: {\n factory: lowerRlsPolicyFromBlock,\n },\n },\n} as const satisfies AuthoringEntityTypeNamespace;\n\n/**\n * Field presets contributed by the Postgres target pack.\n *\n * These mirror the PSL scalar-to-codec mapping used by the Postgres adapter\n * (see `createPostgresPslScalarTypeDescriptors`), so that authoring a field\n * via the TS callback surface (e.g. `field.int()`) and via the PSL scalar\n * surface (e.g. `Int`) lowers to byte-identical contracts.\n *\n * The `uuidNative` / `id.uuidv4Native` / `id.uuidv7Native` presets use the\n * native Postgres `uuid` type (codecId `pg/uuid@1`). For cross-target\n * portability use `uuidString` / `id.uuidv4String` / `id.uuidv7String` from\n * the family pack instead.\n */\n/**\n * PSL block descriptor for `policy_select`.\n *\n * The parser learns the block shape from this descriptor; lowering from\n * `PslExtensionBlock` to `PostgresRlsPolicy` is wired in the PSL\n * interpreter (a later dispatch). The `discriminator` matches\n * `PostgresRlsPolicy.kind` so the parsed block node carries the same\n * discriminant as the IR class it will lower to.\n *\n * The `roles` list uses `scope:'cross-space'` because same-namespace\n * role ref resolution requires PSL namespace entries keyed by `refKind`\n * (i.e. `'role'`), which in turn requires the role block discriminator to\n * equal `'role'`. Aligning discriminator with refKind is tracked for\n * slice 4 (cross-space roles). Until then cross-space passes validation\n * unconditionally and the authored role names flow through unchanged.\n */\nexport const postgresAuthoringPslBlockDescriptors = {\n policy_select: {\n kind: 'pslBlock',\n keyword: 'policy_select',\n discriminator: 'policy',\n name: { required: true },\n parameters: {\n target: { kind: 'ref', refKind: 'model', scope: 'same-namespace', required: true },\n roles: {\n kind: 'list',\n of: { kind: 'ref', refKind: 'role', scope: 'cross-space' },\n },\n using: { kind: 'value', codecId: 'pg/text@1', required: true },\n },\n },\n} as const satisfies AuthoringPslBlockDescriptorNamespace;\n\nexport const postgresAuthoringFieldPresets = {\n text: {\n kind: 'fieldPreset',\n output: {\n codecId: 'pg/text@1',\n nativeType: 'text',\n },\n },\n int: {\n kind: 'fieldPreset',\n output: {\n codecId: 'pg/int4@1',\n nativeType: 'int4',\n },\n },\n bigint: {\n kind: 'fieldPreset',\n output: {\n codecId: 'pg/int8@1',\n nativeType: 'int8',\n },\n },\n float: {\n kind: 'fieldPreset',\n output: {\n codecId: 'pg/float8@1',\n nativeType: 'float8',\n },\n },\n decimal: {\n kind: 'fieldPreset',\n output: {\n codecId: 'pg/numeric@1',\n nativeType: 'numeric',\n },\n },\n boolean: {\n kind: 'fieldPreset',\n output: {\n codecId: 'pg/bool@1',\n nativeType: 'bool',\n },\n },\n json: {\n kind: 'fieldPreset',\n output: {\n codecId: 'pg/jsonb@1',\n nativeType: 'jsonb',\n },\n },\n bytes: {\n kind: 'fieldPreset',\n output: {\n codecId: 'pg/bytea@1',\n nativeType: 'bytea',\n },\n },\n dateTime: {\n kind: 'fieldPreset',\n output: {\n codecId: 'pg/timestamptz@1',\n nativeType: 'timestamptz',\n },\n },\n temporal: /* @__PURE__ */ temporalAuthoringPresets({\n codecId: 'pg/timestamptz@1',\n nativeType: 'timestamptz',\n }),\n uuidNative: {\n kind: 'fieldPreset',\n output: {\n codecId: 'pg/uuid@1',\n nativeType: 'uuid',\n },\n },\n id: {\n uuidv4Native: {\n kind: 'fieldPreset',\n output: {\n codecId: 'pg/uuid@1',\n nativeType: 'uuid',\n executionDefaults: {\n onCreate: {\n kind: 'generator',\n id: 'uuidv4',\n },\n },\n id: true,\n },\n },\n uuidv7Native: {\n kind: 'fieldPreset',\n output: {\n codecId: 'pg/uuid@1',\n nativeType: 'uuid',\n executionDefaults: {\n onCreate: {\n kind: 'generator',\n id: 'uuidv7',\n },\n },\n id: true,\n },\n },\n },\n} as const satisfies AuthoringFieldNamespace;\n"],"mappings":";;;;AAcA,MAAa,yBAAyB,CAAC;AAMvC,SAAS,aAAa,OAA0B,KAAiC;CAC/E,MAAM,QAAQ,MAAM,WAAW;CAC/B,OAAO,OAAO,SAAS,QAAQ,MAAM,aAAa,KAAA;AACpD;AAEA,SAAS,eAAe,OAA0B,KAAiC;CACjF,MAAM,QAAQ,MAAM,WAAW;CAC/B,OAAO,OAAO,SAAS,UAAU,MAAM,MAAM,KAAA;AAC/C;AAEA,SAAS,kBAAkB,OAA0B,KAAuB;CAC1E,MAAM,QAAQ,MAAM,WAAW;CAC/B,IAAI,OAAO,SAAS,QAAQ,OAAO,CAAC;CACpC,OAAO,MAAM,MAAM,SAAS,SAAU,KAAK,SAAS,QAAQ,CAAC,KAAK,UAAU,IAAI,CAAC,CAAE;AACrF;AAEA,SAAS,mBAAmB,KAAqB;CAC/C,IAAI,IAAI,WAAW,IAAG,KAAK,IAAI,SAA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gCAAgC;CAC3C,MAAM;EACJ,MAAM;EACN,QAAQ;GACN,SAAS;GACT,YAAY;EACd;CACF;CACA,KAAK;EACH,MAAM;EACN,QAAQ;GACN,SAAS;GACT,YAAY;EACd;CACF;CACA,QAAQ;EACN,MAAM;EACN,QAAQ;GACN,SAAS;GACT,YAAY;EACd;CACF;CACA,OAAO;EACL,MAAM;EACN,QAAQ;GACN,SAAS;GACT,YAAY;EACd;CACF;CACA,SAAS;EACP,MAAM;EACN,QAAQ;GACN,SAAS;GACT,YAAY;EACd;CACF;CACA,SAAS;EACP,MAAM;EACN,QAAQ;GACN,SAAS;GACT,YAAY;EACd;CACF;CACA,MAAM;EACJ,MAAM;EACN,QAAQ;GACN,SAAS;GACT,YAAY;EACd;CACF;CACA,OAAO;EACL,MAAM;EACN,QAAQ;GACN,SAAS;GACT,YAAY;EACd;CACF;CACA,UAAU;EACR,MAAM;EACN,QAAQ;GACN,SAAS;GACT,YAAY;EACd;CACF;CACA,UAA0B,yCAAyB;EACjD,SAAS;EACT,YAAY;CACd,CAAC;CACD,YAAY;EACV,MAAM;EACN,QAAQ;GACN,SAAS;GACT,YAAY;EACd;CACF;CACA,IAAI;EACF,cAAc;GACZ,MAAM;GACN,QAAQ;IACN,SAAS;IACT,YAAY;IACZ,mBAAmB,EACjB,UAAU;KACR,MAAM;KACN,IAAI;IACN,EACF;IACA,IAAI;GACN;EACF;EACA,cAAc;GACZ,MAAM;GACN,QAAQ;IACN,SAAS;IACT,YAAY;IACZ,mBAAmB,EACjB,UAAU;KACR,MAAM;KACN,IAAI;IACN,EACF;IACA,IAAI;GACN;EACF;CACF;AACF"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
//#region src/core/rls/canonicalize.ts
|
|
3
|
+
/**
|
|
4
|
+
* Stabilizes an authored predicate for hashing: trim, and collapse runs of
|
|
5
|
+
* internal whitespace to a single space.
|
|
6
|
+
*
|
|
7
|
+
* This is deliberately minimal. The content hash is the equivalence relation
|
|
8
|
+
* for a policy, and the wire name (prefix + hash) is the only thing ever
|
|
9
|
+
* compared — we never recompute the hash from an introspected policy body, so
|
|
10
|
+
* there is no need to match Postgres's reprinted form. Minimal normalization
|
|
11
|
+
* also protects the no-collision property: aggressive rewriting (lowercasing,
|
|
12
|
+
* paren-stripping, cast-alias folding) risks collapsing two distinct predicates
|
|
13
|
+
* onto one hash. Out-of-band alteration of a hashed policy is unsupported.
|
|
14
|
+
*
|
|
15
|
+
* The normalizer is a stability commitment: any change re-suffixes all wire names.
|
|
16
|
+
*/
|
|
17
|
+
function normalizePredicate(sql) {
|
|
18
|
+
return sql.replace(/\s+/g, " ").trim();
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Returns the first 8 lowercase hex characters of the SHA-256 digest over the
|
|
22
|
+
* canonical content tuple for an RLS policy:
|
|
23
|
+
*
|
|
24
|
+
* [normalize(using), normalize(withCheck), sortedRoles, operation, permissive]
|
|
25
|
+
*
|
|
26
|
+
* Schema and table are excluded (they are orthogonal to policy equivalence).
|
|
27
|
+
* Uses `JSON.stringify` for a deterministic encoding.
|
|
28
|
+
*/
|
|
29
|
+
function computeContentHash(parts) {
|
|
30
|
+
const using = normalizePredicate(parts.using ?? "");
|
|
31
|
+
const withCheck = normalizePredicate(parts.withCheck ?? "");
|
|
32
|
+
const roles = [...new Set(parts.roles)].sort();
|
|
33
|
+
const permissive = parts.permissive ? "permissive" : "restrictive";
|
|
34
|
+
const tuple = JSON.stringify([
|
|
35
|
+
using,
|
|
36
|
+
withCheck,
|
|
37
|
+
roles,
|
|
38
|
+
parts.operation,
|
|
39
|
+
permissive
|
|
40
|
+
]);
|
|
41
|
+
return createHash("sha256").update(tuple).digest("hex").slice(0, 8);
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { normalizePredicate as n, computeContentHash as t };
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=canonicalize-Bn3BM1Cn.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canonicalize-Bn3BM1Cn.mjs","names":[],"sources":["../src/core/rls/canonicalize.ts"],"sourcesContent":["import { createHash } from 'node:crypto';\n\nexport type RlsPolicyOperation = 'select' | 'insert' | 'update' | 'delete' | 'all';\n\nexport interface ContentHashParts {\n readonly using?: string;\n readonly withCheck?: string;\n readonly roles: readonly string[];\n readonly operation: RlsPolicyOperation;\n readonly permissive: boolean;\n}\n\n/**\n * Stabilizes an authored predicate for hashing: trim, and collapse runs of\n * internal whitespace to a single space.\n *\n * This is deliberately minimal. The content hash is the equivalence relation\n * for a policy, and the wire name (prefix + hash) is the only thing ever\n * compared — we never recompute the hash from an introspected policy body, so\n * there is no need to match Postgres's reprinted form. Minimal normalization\n * also protects the no-collision property: aggressive rewriting (lowercasing,\n * paren-stripping, cast-alias folding) risks collapsing two distinct predicates\n * onto one hash. Out-of-band alteration of a hashed policy is unsupported.\n *\n * The normalizer is a stability commitment: any change re-suffixes all wire names.\n */\nexport function normalizePredicate(sql: string): string {\n return sql.replace(/\\s+/g, ' ').trim();\n}\n\n/**\n * Returns the first 8 lowercase hex characters of the SHA-256 digest over the\n * canonical content tuple for an RLS policy:\n *\n * [normalize(using), normalize(withCheck), sortedRoles, operation, permissive]\n *\n * Schema and table are excluded (they are orthogonal to policy equivalence).\n * Uses `JSON.stringify` for a deterministic encoding.\n */\nexport function computeContentHash(parts: ContentHashParts): string {\n const using = normalizePredicate(parts.using ?? '');\n const withCheck = normalizePredicate(parts.withCheck ?? '');\n const roles = [...new Set(parts.roles)].sort();\n const permissive = parts.permissive ? 'permissive' : 'restrictive';\n\n const tuple = JSON.stringify([using, withCheck, roles, parts.operation, permissive]);\n return createHash('sha256').update(tuple).digest('hex').slice(0, 8);\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA0BA,SAAgB,mBAAmB,KAAqB;CACtD,OAAO,IAAI,QAAQ,QAAQ,GAAG,CAAC,CAAC,KAAK;AACvC;;;;;;;;;;AAWA,SAAgB,mBAAmB,OAAiC;CAClE,MAAM,QAAQ,mBAAmB,MAAM,SAAS,EAAE;CAClD,MAAM,YAAY,mBAAmB,MAAM,aAAa,EAAE;CAC1D,MAAM,QAAQ,CAAC,GAAG,IAAI,IAAI,MAAM,KAAK,CAAC,CAAC,CAAC,KAAK;CAC7C,MAAM,aAAa,MAAM,aAAa,eAAe;CAErD,MAAM,QAAQ,KAAK,UAAU;EAAC;EAAO;EAAW;EAAO,MAAM;EAAW;CAAU,CAAC;CACnF,OAAO,WAAW,QAAQ,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC;AACpE"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//#region src/core/rls/canonicalize.d.ts
|
|
2
|
+
type RlsPolicyOperation = 'select' | 'insert' | 'update' | 'delete' | 'all';
|
|
3
|
+
interface ContentHashParts {
|
|
4
|
+
readonly using?: string;
|
|
5
|
+
readonly withCheck?: string;
|
|
6
|
+
readonly roles: readonly string[];
|
|
7
|
+
readonly operation: RlsPolicyOperation;
|
|
8
|
+
readonly permissive: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Stabilizes an authored predicate for hashing: trim, and collapse runs of
|
|
12
|
+
* internal whitespace to a single space.
|
|
13
|
+
*
|
|
14
|
+
* This is deliberately minimal. The content hash is the equivalence relation
|
|
15
|
+
* for a policy, and the wire name (prefix + hash) is the only thing ever
|
|
16
|
+
* compared — we never recompute the hash from an introspected policy body, so
|
|
17
|
+
* there is no need to match Postgres's reprinted form. Minimal normalization
|
|
18
|
+
* also protects the no-collision property: aggressive rewriting (lowercasing,
|
|
19
|
+
* paren-stripping, cast-alias folding) risks collapsing two distinct predicates
|
|
20
|
+
* onto one hash. Out-of-band alteration of a hashed policy is unsupported.
|
|
21
|
+
*
|
|
22
|
+
* The normalizer is a stability commitment: any change re-suffixes all wire names.
|
|
23
|
+
*/
|
|
24
|
+
declare function normalizePredicate(sql: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* Returns the first 8 lowercase hex characters of the SHA-256 digest over the
|
|
27
|
+
* canonical content tuple for an RLS policy:
|
|
28
|
+
*
|
|
29
|
+
* [normalize(using), normalize(withCheck), sortedRoles, operation, permissive]
|
|
30
|
+
*
|
|
31
|
+
* Schema and table are excluded (they are orthogonal to policy equivalence).
|
|
32
|
+
* Uses `JSON.stringify` for a deterministic encoding.
|
|
33
|
+
*/
|
|
34
|
+
declare function computeContentHash(parts: ContentHashParts): string;
|
|
35
|
+
//#endregion
|
|
36
|
+
export { normalizePredicate as i, RlsPolicyOperation as n, computeContentHash as r, ContentHashParts as t };
|
|
37
|
+
//# sourceMappingURL=canonicalize-CAbXtVtB.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canonicalize-CAbXtVtB.d.mts","names":[],"sources":["../src/core/rls/canonicalize.ts"],"mappings":";KAEY,kBAAA;AAAA,UAEK,gBAAA;EAAA,SACN,KAAA;EAAA,SACA,SAAA;EAAA,SACA,KAAA;EAAA,SACA,SAAA,EAAW,kBAAkB;EAAA,SAC7B,UAAA;AAAA;;;;;;;;;;AAAU;AAiBrB;;;;iBAAgB,kBAAA,CAAmB,GAAW;AAa9C;;;;AAA0D;;;;;AAA1D,iBAAgB,kBAAA,CAAmB,KAAuB,EAAhB,gBAAgB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as PgVarcharDescriptor, S as PgVarbitDescriptor, _ as PgTimeDescriptor, a as PgFloat4Descriptor, b as PgTimetzDescriptor, c as PgInt2Descriptor, d as PgIntDescriptor, f as PgIntervalDescriptor, g as PgTextDescriptor, h as PgNumericDescriptor, i as PgCharDescriptor, l as PgInt4Descriptor, m as PgJsonbDescriptor, n as PgBoolDescriptor, o as PgFloat8Descriptor, p as PgJsonDescriptor, r as PgByteaDescriptor, s as PgFloatDescriptor, t as PgBitDescriptor, u as PgInt8Descriptor, v as PgTimestampDescriptor, x as PgUuidDescriptor, y as PgTimestamptzDescriptor } from "./codecs
|
|
1
|
+
import { C as PgVarcharDescriptor, S as PgVarbitDescriptor, _ as PgTimeDescriptor, a as PgFloat4Descriptor, b as PgTimetzDescriptor, c as PgInt2Descriptor, d as PgIntDescriptor, f as PgIntervalDescriptor, g as PgTextDescriptor, h as PgNumericDescriptor, i as PgCharDescriptor, l as PgInt4Descriptor, m as PgJsonbDescriptor, n as PgBoolDescriptor, o as PgFloat8Descriptor, p as PgJsonDescriptor, r as PgByteaDescriptor, s as PgFloatDescriptor, t as PgBitDescriptor, u as PgInt8Descriptor, v as PgTimestampDescriptor, x as PgUuidDescriptor, y as PgTimestamptzDescriptor } from "./codecs-Ca8upop6.mjs";
|
|
2
2
|
import { ExtractCodecTypes } from "@prisma-next/sql-relational-core/ast";
|
|
3
3
|
import { JsonValue as JsonValue$1 } from "@prisma-next/contract/types";
|
|
4
4
|
|
|
@@ -75,4 +75,4 @@ type Interval<P extends number | undefined = undefined> = BrandedString<{
|
|
|
75
75
|
}>;
|
|
76
76
|
//#endregion
|
|
77
77
|
export { JsonValue$1 as a, Timestamp as c, VarBit as d, Varchar as f, Interval as i, Timestamptz as l, Char as n, Numeric as o, CodecTypes as r, Time as s, Bit as t, Timetz as u };
|
|
78
|
-
//# sourceMappingURL=codec-types-
|
|
78
|
+
//# sourceMappingURL=codec-types-CueCoGD0.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec-types-
|
|
1
|
+
{"version":3,"file":"codec-types-CueCoGD0.d.mts","names":[],"sources":["../src/core/codec-type-map.ts","../src/exports/codec-types.ts"],"mappings":";;;;;cA4Ca,kBAAA;EAAA;;;;;;iBA8BH,gBAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;KAEE,OAAA,6BAAoC,CAAA,0BAA2B,CAAA,CAAE,CAAA,IAAK,CAAA,CAAE,CAAA,EAAG,CAAA;AAAA,KAE3E,kBAAA,UAA4B,kBAAkB;AAAA,KAE9C,mBAAA,GAAsB,iBAAiB,CAAC,kBAAA;;;KCrExC,UAAA,GAAa,OAAO,CAAC,mBAAA;AAAA,KAI5B,OAAA,kBAAyB,MAAA,qBAA2B,CAAA,0BAClC,KAAA,GAAQ,KAAA,CAAM,CAAA;AAAA,KAGhC,aAAA,eAA4B,MAAA,qBAA2B,OAAA,SAAgB,KAAA;AAAA,KAEhE,IAAA,qBAAyB,aAAa;EAAG,YAAA,EAAc,CAAA;AAAA;AAAA,KACvD,OAAA,qBAA4B,aAAa;EAAG,eAAA,EAAiB,CAAA;AAAA;AAAA,KAC7D,OAAA,+DAAsE,aAAA;EAChF,kBAAA,EAAoB,CAAA;EACpB,cAAA,EAAgB,CAAA;AAAA;AAAA,KAEN,GAAA,qBAAwB,aAAa;EAAG,WAAA,EAAa,CAAA;AAAA;AAAA,KACrD,MAAA,qBAA2B,aAAa;EAAG,cAAA,EAAgB,CAAA;AAAA;AAAA,KAC3D,SAAA,6CAAsD,aAAa;EAC7E,oBAAA,EAAsB,CAAA;AAAA;AAAA,KAEZ,WAAA,6CAAwD,aAAa;EAC/E,sBAAA,EAAwB,CAAA;AAAA;AAAA,KAEd,IAAA,6CAAiD,aAAa;EAAG,eAAA,EAAiB,CAAA;AAAA;AAAA,KAClF,MAAA,6CAAmD,aAAa;EAC1E,iBAAA,EAAmB,CAAA;AAAA;AAAA,KAET,QAAA,6CAAqD,aAAa;EAC5E,mBAAA,EAAqB,CAAA;AAAA"}
|
package/dist/codec-types.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as JsonValue, c as Timestamp, d as VarBit, f as Varchar, i as Interval, l as Timestamptz, n as Char, o as Numeric, r as CodecTypes, s as Time, t as Bit, u as Timetz } from "./codec-types-
|
|
1
|
+
import { a as JsonValue, c as Timestamp, d as VarBit, f as Varchar, i as Interval, l as Timestamptz, n as Char, o as Numeric, r as CodecTypes, s as Time, t as Bit, u as Timetz } from "./codec-types-CueCoGD0.mjs";
|
|
2
2
|
export { Bit, Char, CodecTypes, Interval, type JsonValue, Numeric, Time, Timestamp, Timestamptz, Timetz, VarBit, Varchar };
|
|
@@ -35,6 +35,7 @@ declare class PgTextDescriptor extends CodecDescriptorImpl<void> {
|
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
37
|
readonly paramsSchema: StandardSchemaV1<void>;
|
|
38
|
+
renderValueLiteral(value: JsonValue): string | undefined;
|
|
38
39
|
factory(): (ctx: CodecInstanceContext) => PgTextCodec;
|
|
39
40
|
}
|
|
40
41
|
declare const pgTextColumn: () => import("@prisma-next/framework-components/codec").ColumnSpec<PgTextCodec, undefined>;
|
|
@@ -58,6 +59,7 @@ declare class PgInt4Descriptor extends CodecDescriptorImpl<void> {
|
|
|
58
59
|
};
|
|
59
60
|
};
|
|
60
61
|
readonly paramsSchema: StandardSchemaV1<void>;
|
|
62
|
+
renderValueLiteral(value: JsonValue): string | undefined;
|
|
61
63
|
factory(): (ctx: CodecInstanceContext) => PgInt4Codec;
|
|
62
64
|
}
|
|
63
65
|
declare const pgInt4Column: () => import("@prisma-next/framework-components/codec").ColumnSpec<PgInt4Codec, undefined>;
|
|
@@ -81,6 +83,7 @@ declare class PgInt2Descriptor extends CodecDescriptorImpl<void> {
|
|
|
81
83
|
};
|
|
82
84
|
};
|
|
83
85
|
readonly paramsSchema: StandardSchemaV1<void>;
|
|
86
|
+
renderValueLiteral(value: JsonValue): string | undefined;
|
|
84
87
|
factory(): (ctx: CodecInstanceContext) => PgInt2Codec;
|
|
85
88
|
}
|
|
86
89
|
declare const pgInt2Column: () => import("@prisma-next/framework-components/codec").ColumnSpec<PgInt2Codec, undefined>;
|
|
@@ -104,6 +107,7 @@ declare class PgInt8Descriptor extends CodecDescriptorImpl<void> {
|
|
|
104
107
|
};
|
|
105
108
|
};
|
|
106
109
|
readonly paramsSchema: StandardSchemaV1<void>;
|
|
110
|
+
renderValueLiteral(value: JsonValue): string | undefined;
|
|
107
111
|
factory(): (ctx: CodecInstanceContext) => PgInt8Codec;
|
|
108
112
|
}
|
|
109
113
|
declare const pgInt8Column: () => import("@prisma-next/framework-components/codec").ColumnSpec<PgInt8Codec, undefined>;
|
|
@@ -127,6 +131,7 @@ declare class PgFloat4Descriptor extends CodecDescriptorImpl<void> {
|
|
|
127
131
|
};
|
|
128
132
|
};
|
|
129
133
|
readonly paramsSchema: StandardSchemaV1<void>;
|
|
134
|
+
renderValueLiteral(value: JsonValue): string | undefined;
|
|
130
135
|
factory(): (ctx: CodecInstanceContext) => PgFloat4Codec;
|
|
131
136
|
}
|
|
132
137
|
declare const pgFloat4Column: () => import("@prisma-next/framework-components/codec").ColumnSpec<PgFloat4Codec, undefined>;
|
|
@@ -150,6 +155,7 @@ declare class PgFloat8Descriptor extends CodecDescriptorImpl<void> {
|
|
|
150
155
|
};
|
|
151
156
|
};
|
|
152
157
|
readonly paramsSchema: StandardSchemaV1<void>;
|
|
158
|
+
renderValueLiteral(value: JsonValue): string | undefined;
|
|
153
159
|
factory(): (ctx: CodecInstanceContext) => PgFloat8Codec;
|
|
154
160
|
}
|
|
155
161
|
declare const pgFloat8Column: () => import("@prisma-next/framework-components/codec").ColumnSpec<PgFloat8Codec, undefined>;
|
|
@@ -173,6 +179,7 @@ declare class PgBoolDescriptor extends CodecDescriptorImpl<void> {
|
|
|
173
179
|
};
|
|
174
180
|
};
|
|
175
181
|
readonly paramsSchema: StandardSchemaV1<void>;
|
|
182
|
+
renderValueLiteral(value: JsonValue): string | undefined;
|
|
176
183
|
factory(): (ctx: CodecInstanceContext) => PgBoolCodec;
|
|
177
184
|
}
|
|
178
185
|
declare const pgBoolColumn: () => import("@prisma-next/framework-components/codec").ColumnSpec<PgBoolCodec, undefined>;
|
|
@@ -495,6 +502,7 @@ declare class PgCharDescriptor extends CodecDescriptorImpl<LengthParams> {
|
|
|
495
502
|
readonly length?: number;
|
|
496
503
|
}>;
|
|
497
504
|
renderOutputType(params: LengthParams): string | undefined;
|
|
505
|
+
renderValueLiteral(value: JsonValue): string | undefined;
|
|
498
506
|
factory(_params: LengthParams): (ctx: CodecInstanceContext) => SqlCharCodec;
|
|
499
507
|
}
|
|
500
508
|
declare const pgCharColumn: (params?: LengthParams) => import("@prisma-next/framework-components/codec").ColumnSpec<SqlCharCodec, LengthParams>;
|
|
@@ -517,6 +525,7 @@ declare class PgVarcharDescriptor extends CodecDescriptorImpl<LengthParams> {
|
|
|
517
525
|
readonly length?: number;
|
|
518
526
|
}>;
|
|
519
527
|
renderOutputType(params: LengthParams): string | undefined;
|
|
528
|
+
renderValueLiteral(value: JsonValue): string | undefined;
|
|
520
529
|
factory(_params: LengthParams): (ctx: CodecInstanceContext) => SqlVarcharCodec;
|
|
521
530
|
}
|
|
522
531
|
declare const pgVarcharColumn: (params?: LengthParams) => import("@prisma-next/framework-components/codec").ColumnSpec<SqlVarcharCodec, LengthParams>;
|
|
@@ -534,6 +543,7 @@ declare class PgIntDescriptor extends CodecDescriptorImpl<void> {
|
|
|
534
543
|
};
|
|
535
544
|
readonly traits: readonly ["equality", "order", "numeric"];
|
|
536
545
|
readonly paramsSchema: StandardSchemaV1<void, void>;
|
|
546
|
+
renderValueLiteral(value: JsonValue): string | undefined;
|
|
537
547
|
factory(): (ctx: CodecInstanceContext) => SqlIntCodec;
|
|
538
548
|
}
|
|
539
549
|
declare const pgIntColumn: () => import("@prisma-next/framework-components/codec").ColumnSpec<SqlIntCodec, undefined>;
|
|
@@ -551,9 +561,10 @@ declare class PgFloatDescriptor extends CodecDescriptorImpl<void> {
|
|
|
551
561
|
};
|
|
552
562
|
readonly traits: readonly ["equality", "order", "numeric"];
|
|
553
563
|
readonly paramsSchema: StandardSchemaV1<void, void>;
|
|
564
|
+
renderValueLiteral(value: JsonValue): string | undefined;
|
|
554
565
|
factory(): (ctx: CodecInstanceContext) => SqlFloatCodec;
|
|
555
566
|
}
|
|
556
567
|
declare const pgFloatColumn: () => import("@prisma-next/framework-components/codec").ColumnSpec<SqlFloatCodec, undefined>;
|
|
557
568
|
//#endregion
|
|
558
569
|
export { pgInt2Column as A, pgTimestampColumn as B, PgVarcharDescriptor as C, pgFloat4Column as D, pgCharColumn as E, pgJsonColumn as F, pgVarcharColumn as G, pgTimetzColumn as H, pgJsonbColumn as I, pgNumericColumn as L, pgInt8Column as M, pgIntColumn as N, pgFloat8Column as O, pgIntervalColumn as P, pgTextColumn as R, PgVarbitDescriptor as S, pgBoolColumn as T, pgUuidColumn as U, pgTimestamptzColumn as V, pgVarbitColumn as W, PgTimeDescriptor as _, PgFloat4Descriptor as a, PgTimetzDescriptor as b, PgInt2Descriptor as c, PgIntDescriptor as d, PgIntervalDescriptor as f, PgTextDescriptor as g, PgNumericDescriptor as h, PgCharDescriptor as i, pgInt4Column as j, pgFloatColumn as k, PgInt4Descriptor as l, PgJsonbDescriptor as m, PgBoolDescriptor as n, PgFloat8Descriptor as o, PgJsonDescriptor as p, PgByteaDescriptor as r, PgFloatDescriptor as s, PgBitDescriptor as t, PgInt8Descriptor as u, PgTimestampDescriptor as v, pgBitColumn as w, PgUuidDescriptor as x, PgTimestamptzDescriptor as y, pgTimeColumn as z };
|
|
559
|
-
//# sourceMappingURL=codecs
|
|
570
|
+
//# sourceMappingURL=codecs-Ca8upop6.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codecs-Ca8upop6.d.mts","names":[],"sources":["../src/core/codecs.ts"],"mappings":";;;;;;;KAoFK,YAAA;EAAA,SAA0B,MAAM;AAAA;AAAA,KAChC,eAAA;EAAA,SAA6B,SAAS;AAAA;AAAA,KACtC,aAAA;EAAA,SAA2B,SAAA;EAAA,SAA4B,KAAK;AAAA;AAAA,cAuCpD,WAAA,SAAoB,SAAA,QACxB,gBAAA;EAKD,MAAA,CAAO,KAAA,UAAe,IAAA,EAAM,gBAAA,GAAmB,OAAA;EAG/C,MAAA,CAAO,IAAA,UAAc,IAAA,EAAM,gBAAA,GAAmB,OAAA;EAGpD,UAAA,CAAW,KAAA,WAAgB,SAAA;EAG3B,UA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
package/dist/codecs.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as pgInt2Column, B as pgTimestampColumn, C as PgVarcharDescriptor, D as pgFloat4Column, E as pgCharColumn, F as pgJsonColumn, G as pgVarcharColumn, H as pgTimetzColumn, I as pgJsonbColumn, L as pgNumericColumn, M as pgInt8Column, N as pgIntColumn, O as pgFloat8Column, P as pgIntervalColumn, R as pgTextColumn, S as PgVarbitDescriptor, T as pgBoolColumn, U as pgUuidColumn, V as pgTimestamptzColumn, W as pgVarbitColumn, _ as PgTimeDescriptor, a as PgFloat4Descriptor, b as PgTimetzDescriptor, c as PgInt2Descriptor, d as PgIntDescriptor, f as PgIntervalDescriptor, g as PgTextDescriptor, h as PgNumericDescriptor, i as PgCharDescriptor, j as pgInt4Column, k as pgFloatColumn, l as PgInt4Descriptor, m as PgJsonbDescriptor, n as PgBoolDescriptor, o as PgFloat8Descriptor, p as PgJsonDescriptor, s as PgFloatDescriptor, t as PgBitDescriptor, u as PgInt8Descriptor, v as PgTimestampDescriptor, w as pgBitColumn, x as PgUuidDescriptor, y as PgTimestamptzDescriptor, z as pgTimeColumn } from "./codecs
|
|
1
|
+
import { A as pgInt2Column, B as pgTimestampColumn, C as PgVarcharDescriptor, D as pgFloat4Column, E as pgCharColumn, F as pgJsonColumn, G as pgVarcharColumn, H as pgTimetzColumn, I as pgJsonbColumn, L as pgNumericColumn, M as pgInt8Column, N as pgIntColumn, O as pgFloat8Column, P as pgIntervalColumn, R as pgTextColumn, S as PgVarbitDescriptor, T as pgBoolColumn, U as pgUuidColumn, V as pgTimestamptzColumn, W as pgVarbitColumn, _ as PgTimeDescriptor, a as PgFloat4Descriptor, b as PgTimetzDescriptor, c as PgInt2Descriptor, d as PgIntDescriptor, f as PgIntervalDescriptor, g as PgTextDescriptor, h as PgNumericDescriptor, i as PgCharDescriptor, j as pgInt4Column, k as pgFloatColumn, l as PgInt4Descriptor, m as PgJsonbDescriptor, n as PgBoolDescriptor, o as PgFloat8Descriptor, p as PgJsonDescriptor, s as PgFloatDescriptor, t as PgBitDescriptor, u as PgInt8Descriptor, v as PgTimestampDescriptor, w as pgBitColumn, x as PgUuidDescriptor, y as PgTimestamptzDescriptor, z as pgTimeColumn } from "./codecs-Ca8upop6.mjs";
|
|
2
2
|
import { CodecDescriptorRegistry } from "@prisma-next/sql-relational-core/query-lane-context";
|
|
3
3
|
|
|
4
4
|
//#region src/core/registry.d.ts
|
package/dist/codecs.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as PG_VARBIT_CODEC_ID, S as PG_UUID_CODEC_ID, _ as PG_TEXT_CODEC_ID, a as PG_FLOAT4_CODEC_ID, b as PG_TIMETZ_CODEC_ID, c as PG_INT2_CODEC_ID, d as PG_INTERVAL_CODEC_ID, f as PG_INT_CODEC_ID, g as PG_TEXT_ARRAY_CODEC_ID, h as PG_NUMERIC_CODEC_ID, i as PG_CHAR_CODEC_ID, l as PG_INT4_CODEC_ID, m as PG_JSON_CODEC_ID, n as PG_BOOL_CODEC_ID, o as PG_FLOAT8_CODEC_ID, p as PG_JSONB_CODEC_ID, r as PG_BYTEA_CODEC_ID, s as PG_FLOAT_CODEC_ID, t as PG_BIT_CODEC_ID, u as PG_INT8_CODEC_ID, v as PG_TIMESTAMPTZ_CODEC_ID, w as PG_VARCHAR_CODEC_ID, x as PG_TIME_CODEC_ID, y as PG_TIMESTAMP_CODEC_ID } from "./codec-ids-BvytN2P8.mjs";
|
|
2
2
|
import { SqlCharCodec, SqlFloatCodec, SqlIntCodec, SqlVarcharCodec, sqlCharDescriptor, sqlFloatDescriptor, sqlIntDescriptor, sqlTextDescriptor, sqlTimestampDescriptor, sqlVarcharDescriptor } from "@prisma-next/sql-relational-core/ast";
|
|
3
|
-
import { CodecDescriptorImpl, CodecImpl, column, voidParamsSchema } from "@prisma-next/framework-components/codec";
|
|
3
|
+
import { CodecDescriptorImpl, CodecImpl, column, renderTsLiteral, voidParamsSchema } from "@prisma-next/framework-components/codec";
|
|
4
4
|
import { blindCast } from "@prisma-next/utils/casts";
|
|
5
5
|
import { type } from "arktype";
|
|
6
6
|
import { buildCodecDescriptorRegistry } from "@prisma-next/sql-relational-core/codec-descriptor-registry";
|
|
@@ -106,6 +106,9 @@ var PgTextDescriptor = class extends CodecDescriptorImpl {
|
|
|
106
106
|
targetTypes = ["text"];
|
|
107
107
|
meta = PG_TEXT_META;
|
|
108
108
|
paramsSchema = voidParamsSchema;
|
|
109
|
+
renderValueLiteral(value) {
|
|
110
|
+
return renderTsLiteral(value);
|
|
111
|
+
}
|
|
109
112
|
factory() {
|
|
110
113
|
return () => new PgTextCodec(this);
|
|
111
114
|
}
|
|
@@ -169,6 +172,9 @@ var PgInt4Descriptor = class extends CodecDescriptorImpl {
|
|
|
169
172
|
targetTypes = ["int4"];
|
|
170
173
|
meta = PG_INT4_META;
|
|
171
174
|
paramsSchema = voidParamsSchema;
|
|
175
|
+
renderValueLiteral(value) {
|
|
176
|
+
return renderTsLiteral(value);
|
|
177
|
+
}
|
|
172
178
|
factory() {
|
|
173
179
|
return () => new PgInt4Codec(this);
|
|
174
180
|
}
|
|
@@ -199,6 +205,9 @@ var PgInt2Descriptor = class extends CodecDescriptorImpl {
|
|
|
199
205
|
targetTypes = ["int2"];
|
|
200
206
|
meta = PG_INT2_META;
|
|
201
207
|
paramsSchema = voidParamsSchema;
|
|
208
|
+
renderValueLiteral(value) {
|
|
209
|
+
return renderTsLiteral(value);
|
|
210
|
+
}
|
|
202
211
|
factory() {
|
|
203
212
|
return () => new PgInt2Codec(this);
|
|
204
213
|
}
|
|
@@ -229,6 +238,9 @@ var PgInt8Descriptor = class extends CodecDescriptorImpl {
|
|
|
229
238
|
targetTypes = ["int8"];
|
|
230
239
|
meta = PG_INT8_META;
|
|
231
240
|
paramsSchema = voidParamsSchema;
|
|
241
|
+
renderValueLiteral(value) {
|
|
242
|
+
return renderTsLiteral(value);
|
|
243
|
+
}
|
|
232
244
|
factory() {
|
|
233
245
|
return () => new PgInt8Codec(this);
|
|
234
246
|
}
|
|
@@ -259,6 +271,9 @@ var PgFloat4Descriptor = class extends CodecDescriptorImpl {
|
|
|
259
271
|
targetTypes = ["float4"];
|
|
260
272
|
meta = PG_FLOAT4_META;
|
|
261
273
|
paramsSchema = voidParamsSchema;
|
|
274
|
+
renderValueLiteral(value) {
|
|
275
|
+
return renderTsLiteral(value);
|
|
276
|
+
}
|
|
262
277
|
factory() {
|
|
263
278
|
return () => new PgFloat4Codec(this);
|
|
264
279
|
}
|
|
@@ -289,6 +304,9 @@ var PgFloat8Descriptor = class extends CodecDescriptorImpl {
|
|
|
289
304
|
targetTypes = ["float8"];
|
|
290
305
|
meta = PG_FLOAT8_META;
|
|
291
306
|
paramsSchema = voidParamsSchema;
|
|
307
|
+
renderValueLiteral(value) {
|
|
308
|
+
return renderTsLiteral(value);
|
|
309
|
+
}
|
|
292
310
|
factory() {
|
|
293
311
|
return () => new PgFloat8Codec(this);
|
|
294
312
|
}
|
|
@@ -315,6 +333,9 @@ var PgBoolDescriptor = class extends CodecDescriptorImpl {
|
|
|
315
333
|
targetTypes = ["bool"];
|
|
316
334
|
meta = PG_BOOL_META;
|
|
317
335
|
paramsSchema = voidParamsSchema;
|
|
336
|
+
renderValueLiteral(value) {
|
|
337
|
+
return renderTsLiteral(value);
|
|
338
|
+
}
|
|
318
339
|
factory() {
|
|
319
340
|
return () => new PgBoolCodec(this);
|
|
320
341
|
}
|
|
@@ -677,6 +698,9 @@ var PgCharDescriptor = class extends CodecDescriptorImpl {
|
|
|
677
698
|
renderOutputType(params) {
|
|
678
699
|
return sqlCharDescriptor.renderOutputType(params);
|
|
679
700
|
}
|
|
701
|
+
renderValueLiteral(value) {
|
|
702
|
+
return renderTsLiteral(value);
|
|
703
|
+
}
|
|
680
704
|
factory(_params) {
|
|
681
705
|
return () => new SqlCharCodec(this);
|
|
682
706
|
}
|
|
@@ -692,6 +716,9 @@ var PgVarcharDescriptor = class extends CodecDescriptorImpl {
|
|
|
692
716
|
renderOutputType(params) {
|
|
693
717
|
return sqlVarcharDescriptor.renderOutputType(params);
|
|
694
718
|
}
|
|
719
|
+
renderValueLiteral(value) {
|
|
720
|
+
return renderTsLiteral(value);
|
|
721
|
+
}
|
|
695
722
|
factory(_params) {
|
|
696
723
|
return () => new SqlVarcharCodec(this);
|
|
697
724
|
}
|
|
@@ -704,6 +731,9 @@ var PgIntDescriptor = class extends CodecDescriptorImpl {
|
|
|
704
731
|
meta = PG_INT_META;
|
|
705
732
|
traits = sqlIntDescriptor.traits;
|
|
706
733
|
paramsSchema = sqlIntDescriptor.paramsSchema;
|
|
734
|
+
renderValueLiteral(value) {
|
|
735
|
+
return renderTsLiteral(value);
|
|
736
|
+
}
|
|
707
737
|
factory() {
|
|
708
738
|
return () => new SqlIntCodec(this);
|
|
709
739
|
}
|
|
@@ -716,6 +746,9 @@ var PgFloatDescriptor = class extends CodecDescriptorImpl {
|
|
|
716
746
|
meta = PG_FLOAT_META;
|
|
717
747
|
traits = sqlFloatDescriptor.traits;
|
|
718
748
|
paramsSchema = sqlFloatDescriptor.paramsSchema;
|
|
749
|
+
renderValueLiteral(value) {
|
|
750
|
+
return renderTsLiteral(value);
|
|
751
|
+
}
|
|
719
752
|
factory() {
|
|
720
753
|
return () => new SqlFloatCodec(this);
|
|
721
754
|
}
|