@prisma-next/target-postgres 0.14.0 → 0.15.0-dev.1
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-BtsOWgI3.mjs +674 -0
- package/dist/authoring-BtsOWgI3.mjs.map +1 -0
- package/dist/canonicalize-D1F4vUnP.d.mts +48 -0
- package/dist/canonicalize-D1F4vUnP.d.mts.map +1 -0
- package/dist/{codec-ids-BvytN2P8.mjs → codec-ids-B10ZZHzw.mjs} +4 -2
- package/dist/codec-ids-B10ZZHzw.mjs.map +1 -0
- package/dist/{codec-ids-CnXu9Qy3.d.mts → codec-ids-CI144z7g.d.mts} +4 -2
- package/dist/codec-ids-CI144z7g.d.mts.map +1 -0
- package/dist/codec-ids.d.mts +2 -2
- package/dist/codec-ids.mjs +2 -2
- package/dist/{codec-types-DHCkwPKE.d.mts → codec-types-CTfT4U4O.d.mts} +4 -2
- package/dist/codec-types-CTfT4U4O.d.mts.map +1 -0
- package/dist/codec-types.d.mts +1 -1
- package/dist/{codecs--0A5_4Bq.d.mts → codecs-D7W9O0Xx.d.mts} +134 -4
- package/dist/codecs-D7W9O0Xx.d.mts.map +1 -0
- package/dist/codecs-DRbb26Or.mjs +955 -0
- package/dist/codecs-DRbb26Or.mjs.map +1 -0
- package/dist/codecs.d.mts +2 -2
- package/dist/codecs.mjs +3 -757
- package/dist/codecs.mjs.map +1 -1
- package/dist/contract-free.d.mts +33 -3
- package/dist/contract-free.d.mts.map +1 -1
- package/dist/contract-free.mjs +23 -7
- package/dist/contract-free.mjs.map +1 -1
- package/dist/control-policy-1Tcf7Tyu.mjs +1285 -0
- package/dist/control-policy-1Tcf7Tyu.mjs.map +1 -0
- package/dist/control.d.mts +2 -2
- package/dist/control.d.mts.map +1 -1
- package/dist/control.mjs +880 -36
- 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-DPzwBMhW.d.mts} +3 -3
- package/dist/{data-transform-DDgWdB5o.d.mts.map → data-transform-DPzwBMhW.d.mts.map} +1 -1
- package/dist/data-transform.d.mts +1 -1
- package/dist/{ddl-QDyOSeLc.mjs → ddl-GTTOvjx_.mjs} +128 -6
- package/dist/ddl-GTTOvjx_.mjs.map +1 -0
- package/dist/ddl.d.mts +3 -2
- package/dist/ddl.mjs +2 -2
- package/dist/default-normalizer.d.mts +1 -1
- package/dist/default-normalizer.d.mts.map +1 -1
- package/dist/default-normalizer.mjs +247 -1
- package/dist/default-normalizer.mjs.map +1 -0
- package/dist/descriptor-meta-CFQKLXl_.mjs +23 -0
- package/dist/descriptor-meta-CFQKLXl_.mjs.map +1 -0
- package/dist/descriptor-meta-runtime-UwYdV8fD.mjs +12 -0
- package/dist/descriptor-meta-runtime-UwYdV8fD.mjs.map +1 -0
- package/dist/diff-database-schema-Bfgshz4v.mjs +305 -0
- package/dist/diff-database-schema-Bfgshz4v.mjs.map +1 -0
- package/dist/diff-database-schema.d.mts +46 -0
- package/dist/diff-database-schema.d.mts.map +1 -0
- package/dist/diff-database-schema.mjs +2 -0
- package/dist/errors-DO-w0EUS.mjs +35 -0
- package/dist/errors-DO-w0EUS.mjs.map +1 -0
- package/dist/errors.d.mts +11 -9
- package/dist/errors.d.mts.map +1 -1
- package/dist/errors.mjs +1 -1
- package/dist/issue-planner.d.mts +35 -11
- package/dist/issue-planner.d.mts.map +1 -1
- package/dist/issue-planner.mjs +2 -2
- package/dist/migration.d.mts +5 -5
- package/dist/migration.d.mts.map +1 -1
- package/dist/migration.mjs +4 -4
- package/dist/namespace-ids-xtp_ZY86.mjs +7 -0
- package/dist/namespace-ids-xtp_ZY86.mjs.map +1 -0
- package/dist/native-type-normalizer.mjs +37 -1
- package/dist/native-type-normalizer.mjs.map +1 -0
- package/dist/nodes-DJC5B8Id.mjs +192 -0
- package/dist/nodes-DJC5B8Id.mjs.map +1 -0
- package/dist/nodes-Dv5eCSq9.d.mts +170 -0
- package/dist/nodes-Dv5eCSq9.d.mts.map +1 -0
- package/dist/{op-factory-call-DmQEc3XV.d.mts → op-factory-call-Bn9zDx4_.d.mts} +114 -15
- package/dist/op-factory-call-Bn9zDx4_.d.mts.map +1 -0
- package/dist/{op-factory-call-D_p5vxwt.mjs → op-factory-call-C38NzvQD.mjs} +469 -32
- package/dist/op-factory-call-C38NzvQD.mjs.map +1 -0
- package/dist/op-factory-call.d.mts +2 -2
- package/dist/op-factory-call.mjs +2 -2
- package/dist/pack.d.mts +321 -3
- package/dist/pack.d.mts.map +1 -1
- package/dist/pack.mjs +1 -1
- package/dist/planner-BvUu6b9C.mjs +390 -0
- package/dist/planner-BvUu6b9C.mjs.map +1 -0
- package/dist/{planner-ddl-builders-B2wOwLqI.mjs → planner-ddl-builders-BKlmGDJl.mjs} +17 -28
- package/dist/planner-ddl-builders-BKlmGDJl.mjs.map +1 -0
- package/dist/planner-ddl-builders.d.mts +4 -6
- package/dist/planner-ddl-builders.d.mts.map +1 -1
- package/dist/planner-ddl-builders.mjs +2 -2
- package/dist/planner-identity-values-CJPha2Sz.mjs.map +1 -1
- package/dist/planner-identity-values.d.mts +8 -2
- package/dist/planner-identity-values.d.mts.map +1 -1
- package/dist/planner-identity-values.mjs +2 -2
- package/dist/{planner-produced-postgres-migration-QqHa2C2l.d.mts → planner-produced-postgres-migration-BEY1T0Xm.d.mts} +4 -4
- package/dist/{planner-produced-postgres-migration-QqHa2C2l.d.mts.map → planner-produced-postgres-migration-BEY1T0Xm.d.mts.map} +1 -1
- package/dist/{planner-produced-postgres-migration-Cji5vxUf.mjs → planner-produced-postgres-migration-D7y-PEHK.mjs} +3 -3
- package/dist/{planner-produced-postgres-migration-Cji5vxUf.mjs.map → planner-produced-postgres-migration-D7y-PEHK.mjs.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-zqNfs2XZ.mjs} +5 -5
- package/dist/{planner-sql-checks-jqUUGyQR.mjs.map → planner-sql-checks-zqNfs2XZ.mjs.map} +1 -1
- package/dist/planner-sql-checks.d.mts +2 -2
- package/dist/planner-sql-checks.d.mts.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 +72 -17
- package/dist/planner.d.mts.map +1 -1
- package/dist/planner.mjs +3 -2
- package/dist/postgres-contract-view-C9j5cqP0.d.mts +34 -0
- package/dist/postgres-contract-view-C9j5cqP0.d.mts.map +1 -0
- package/dist/{postgres-contract-serializer-k3TAcPMY.mjs → postgres-contract-view-DM8sN1Ot.mjs} +45 -41
- package/dist/postgres-contract-view-DM8sN1Ot.mjs.map +1 -0
- package/dist/postgres-database-schema-node-CJv5bfbs.d.mts +262 -0
- package/dist/postgres-database-schema-node-CJv5bfbs.d.mts.map +1 -0
- package/dist/{postgres-migration-Y4YBJqkS.d.mts → postgres-migration-DbckK1su.d.mts} +58 -9
- package/dist/postgres-migration-DbckK1su.d.mts.map +1 -0
- package/dist/{postgres-migration-B5jKrXv3.mjs → postgres-migration-arMSWU9b.mjs} +78 -45
- package/dist/postgres-migration-arMSWU9b.mjs.map +1 -0
- package/dist/postgres-native-enum-BwVNf0Ku.mjs +45 -0
- package/dist/postgres-native-enum-BwVNf0Ku.mjs.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-role-schema-node-Cm-j0ZGM.mjs +190 -0
- package/dist/postgres-role-schema-node-Cm-j0ZGM.mjs.map +1 -0
- package/dist/{postgres-schema-COGZ1ark.mjs → postgres-schema-Cm4DtiGA.mjs} +200 -11
- package/dist/postgres-schema-Cm4DtiGA.mjs.map +1 -0
- package/dist/postgres-schema-DKq6s1P3.d.mts +269 -0
- package/dist/postgres-schema-DKq6s1P3.d.mts.map +1 -0
- package/dist/postgres-table-schema-node-D6LvInCe.mjs +216 -0
- package/dist/postgres-table-schema-node-D6LvInCe.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-XyBaaenM.mjs +22 -0
- package/dist/resolve-ddl-schema-XyBaaenM.mjs.map +1 -0
- package/dist/rls-canonicalize.d.mts +27 -0
- package/dist/rls-canonicalize.d.mts.map +1 -0
- package/dist/rls-canonicalize.mjs +2 -0
- package/dist/runtime.d.mts +6 -8
- 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 +15 -0
- package/dist/schema-ir-annotations.d.mts.map +1 -0
- package/dist/schema-ir-annotations.mjs +2 -0
- package/dist/{sql-utils-DcfMz4MQ.mjs → sql-utils-SU4FDvIV.mjs} +12 -3
- package/dist/{sql-utils-DcfMz4MQ.mjs.map → sql-utils-SU4FDvIV.mjs.map} +1 -1
- package/dist/sql-utils.d.mts +8 -1
- package/dist/sql-utils.d.mts.map +1 -1
- package/dist/sql-utils.mjs +2 -2
- package/dist/types.d.mts +4 -140
- package/dist/types.mjs +5 -2
- package/dist/wire-name-DbQ9-2RC.mjs +104 -0
- package/dist/wire-name-DbQ9-2RC.mjs.map +1 -0
- package/package.json +26 -20
- package/src/contract-free/checks.ts +153 -0
- package/src/contract-free/control-bootstrap.ts +20 -3
- package/src/contract-free/ddl.ts +98 -1
- package/src/core/authoring.ts +726 -2
- package/src/core/codec-helpers.ts +33 -7
- package/src/core/codec-ids.ts +2 -0
- package/src/core/codec-type-map.ts +4 -0
- package/src/core/codecs.ts +236 -12
- package/src/core/ddl/nodes.ts +185 -2
- package/src/core/default-normalizer.ts +122 -2
- package/src/core/descriptor-meta.ts +12 -1
- package/src/core/entity-kinds.ts +41 -0
- package/src/core/errors.ts +14 -12
- package/src/core/migrations/bound-schema.ts +10 -0
- package/src/core/migrations/column-ddl-rendering.ts +117 -0
- package/src/core/migrations/contract-to-postgres-database-schema-node.ts +189 -0
- package/src/core/migrations/control-policy.ts +217 -65
- package/src/core/migrations/diff-database-schema.ts +252 -0
- package/src/core/migrations/issue-planner.ts +817 -656
- package/src/core/migrations/op-factory-call.ts +383 -23
- package/src/core/migrations/operations/columns.ts +24 -12
- package/src/core/migrations/operations/constraints.ts +1 -1
- package/src/core/migrations/operations/data-transform.ts +6 -0
- package/src/core/migrations/operations/dependencies.ts +2 -1
- package/src/core/migrations/operations/native-enum-types.ts +62 -0
- package/src/core/migrations/operations/rls.ts +187 -0
- package/src/core/migrations/operations/shared.ts +0 -30
- package/src/core/migrations/planner-ddl-builders.ts +31 -59
- package/src/core/migrations/planner-identity-values.ts +1 -1
- package/src/core/migrations/planner-recipes.ts +31 -13
- package/src/core/migrations/planner-sql-checks.ts +1 -1
- package/src/core/migrations/planner-strategies.ts +249 -218
- package/src/core/migrations/planner-target-details.ts +3 -1
- package/src/core/migrations/planner.ts +357 -67
- package/src/core/migrations/postgres-migration.ts +118 -86
- package/src/core/migrations/render-typescript.ts +42 -15
- package/src/core/migrations/resolve-ddl-schema.ts +26 -0
- package/src/core/migrations/runner.ts +11 -16
- package/src/core/migrations/verify-postgres-namespaces.ts +46 -31
- package/src/core/namespace-ids.ts +3 -0
- package/src/core/postgres-contract-serializer.ts +46 -71
- package/src/core/postgres-contract-view.ts +48 -0
- package/src/core/postgres-native-enum.ts +61 -0
- package/src/core/postgres-rls-enablement.ts +34 -0
- package/src/core/postgres-rls-policy.ts +64 -0
- package/src/core/postgres-role.ts +59 -0
- package/src/core/postgres-schema-verifier.ts +10 -7
- package/src/core/postgres-schema.ts +85 -15
- package/src/core/postgres-validators.ts +34 -0
- package/src/core/psl-infer/infer-psl-contract.ts +1290 -0
- package/src/core/psl-infer/postgres-default-mapping.ts +16 -0
- package/src/core/psl-infer/postgres-type-map.ts +129 -0
- package/src/core/rls/canonicalize.ts +65 -0
- package/src/core/rls/wire-name.ts +33 -0
- package/src/core/schema-ir/node-storage-coordinate.ts +26 -0
- package/src/core/schema-ir/postgres-database-schema-node.ts +61 -0
- package/src/core/schema-ir/postgres-namespace-schema-node.ts +70 -0
- package/src/core/schema-ir/postgres-native-enum-schema-node.ts +83 -0
- package/src/core/schema-ir/postgres-policy-schema-node.ts +90 -0
- package/src/core/schema-ir/postgres-role-schema-node.ts +65 -0
- package/src/core/schema-ir/postgres-table-schema-node.ts +140 -0
- package/src/core/schema-ir/schema-node-kinds.ts +122 -0
- package/src/core/sql-utils.ts +15 -2
- package/src/exports/codecs.ts +5 -0
- package/src/exports/contract-free.ts +11 -1
- package/src/exports/control.ts +27 -33
- package/src/exports/ddl.ts +8 -0
- package/src/exports/diff-database-schema.ts +7 -0
- package/src/exports/issue-planner.ts +1 -1
- package/src/exports/migration.ts +1 -0
- package/src/exports/op-factory-call.ts +4 -0
- package/src/exports/planner-ddl-builders.ts +0 -2
- package/src/exports/planner-identity-values.ts +4 -1
- package/src/exports/planner.ts +1 -0
- package/src/exports/rls-canonicalize.ts +12 -0
- package/src/exports/runtime.ts +1 -0
- package/src/exports/schema-ir-annotations.ts +1 -0
- package/src/exports/sql-utils.ts +1 -0
- package/src/exports/types.ts +37 -0
- package/dist/codec-ids-BvytN2P8.mjs.map +0 -1
- package/dist/codec-ids-CnXu9Qy3.d.mts.map +0 -1
- package/dist/codec-types-DHCkwPKE.d.mts.map +0 -1
- package/dist/codecs--0A5_4Bq.d.mts.map +0 -1
- package/dist/ddl-QDyOSeLc.mjs.map +0 -1
- package/dist/default-normalizer-DyyCHQWs.mjs +0 -131
- 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/errors-CUk87ByX.mjs +0 -33
- package/dist/errors-CUk87ByX.mjs.map +0 -1
- package/dist/issue-planner-DL6g3CmE.mjs +0 -824
- package/dist/issue-planner-DL6g3CmE.mjs.map +0 -1
- package/dist/native-type-normalizer-Bc9XJzWC.mjs +0 -38
- package/dist/native-type-normalizer-Bc9XJzWC.mjs.map +0 -1
- package/dist/nodes-Bbhs2rwj.mjs +0 -76
- 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
- package/src/core/postgres-enum-type-schema.ts +0 -17
package/dist/pack.d.mts
CHANGED
|
@@ -1,10 +1,56 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Z as postgresQualifyColumnType } from "./codecs-D7W9O0Xx.mjs";
|
|
2
|
+
import { r as CodecTypes } from "./codec-types-CTfT4U4O.mjs";
|
|
3
|
+
import { t as PostgresRlsPolicy } from "./postgres-rls-policy--CSddvMR.mjs";
|
|
4
|
+
import { a as postgresCreateNamespace, c as PostgresRlsEnablement, l as PostgresRlsEnablementInput, o as PostgresRole, u as PostgresNativeEnum } from "./postgres-schema-DKq6s1P3.mjs";
|
|
5
|
+
import { PslExtensionBlock } from "@prisma-next/framework-components/authoring";
|
|
6
|
+
import { EntityHandleLoweringInput, LoweredPackEntity, ResolvedPslModelRefs } from "@prisma-next/sql-contract/entity-handle-lowering-hook";
|
|
2
7
|
|
|
8
|
+
//#region src/core/authoring.d.ts
|
|
9
|
+
interface RlsPolicyExtensionBlock extends PslExtensionBlock {
|
|
10
|
+
readonly namespaceId: string;
|
|
11
|
+
/**
|
|
12
|
+
* Model refs the family interpreter resolved from the block's descriptor-
|
|
13
|
+
* declared `refKind: 'model'` parameters before invoking this factory
|
|
14
|
+
* (keyed by parameter name). An unresolved required ref is the
|
|
15
|
+
* interpreter's diagnostic; the factory is never called with one missing.
|
|
16
|
+
*/
|
|
17
|
+
readonly resolvedModelRefs?: ResolvedPslModelRefs;
|
|
18
|
+
}
|
|
19
|
+
/** A parsed `role` block annotated with its lexical namespace id by the interpreter. */
|
|
20
|
+
interface RoleExtensionBlock extends PslExtensionBlock {
|
|
21
|
+
readonly namespaceId: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The SQL-family entity-handle batch lowering hook for the Postgres pack
|
|
25
|
+
* (`SqlEntityHandleLoweringContribution`). Receives every `entities` handle
|
|
26
|
+
* whose kind this pack registered — batch, so the cross-entity diagnostics
|
|
27
|
+
* (duplicate prefix, policy without rlsEnabled, duplicate role) can see
|
|
28
|
+
* sibling handles — and lowers them with the same keying and hash assembly
|
|
29
|
+
* as the PSL path: `policy` keyed by prefix (wire name via
|
|
30
|
+
* {@link buildRlsPolicyEntity}), `rls` keyed by table name, `role` keyed by
|
|
31
|
+
* name and filed under the default namespace (roles are declared
|
|
32
|
+
* contract-wide; PSL has no role block to set a precedent).
|
|
33
|
+
*/
|
|
34
|
+
declare function postgresLowerEntityHandles(input: EntityHandleLoweringInput): readonly LoweredPackEntity[];
|
|
35
|
+
//#endregion
|
|
3
36
|
//#region src/core/descriptor-meta.d.ts
|
|
4
37
|
declare const postgresTargetDescriptorMetaBase: {
|
|
5
38
|
readonly defaultNamespaceId: "public";
|
|
6
39
|
readonly authoring: {
|
|
7
|
-
readonly type: {
|
|
40
|
+
readonly type: {
|
|
41
|
+
readonly pg: {
|
|
42
|
+
readonly enum: {
|
|
43
|
+
readonly kind: "typeConstructor";
|
|
44
|
+
readonly entityRefArg: {
|
|
45
|
+
readonly index: 0;
|
|
46
|
+
readonly entityKind: "native_enum";
|
|
47
|
+
};
|
|
48
|
+
readonly output: {
|
|
49
|
+
readonly codecId: "pg/enum@1";
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
};
|
|
8
54
|
readonly field: {
|
|
9
55
|
readonly text: {
|
|
10
56
|
readonly kind: "fieldPreset";
|
|
@@ -137,7 +183,279 @@ declare const postgresTargetDescriptorMetaBase: {
|
|
|
137
183
|
};
|
|
138
184
|
};
|
|
139
185
|
};
|
|
140
|
-
readonly entityTypes: {
|
|
186
|
+
readonly entityTypes: {
|
|
187
|
+
readonly role: {
|
|
188
|
+
readonly kind: "entity";
|
|
189
|
+
readonly discriminator: "role";
|
|
190
|
+
readonly validatorSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
191
|
+
kind: "role";
|
|
192
|
+
name: string;
|
|
193
|
+
namespaceId: string;
|
|
194
|
+
control?: "external";
|
|
195
|
+
}, {}>;
|
|
196
|
+
readonly output: {
|
|
197
|
+
readonly factory: (block: RoleExtensionBlock, ctx: import("@prisma-next/framework-components/authoring").AuthoringEntityContext) => PostgresRole | undefined;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
readonly rls: {
|
|
201
|
+
readonly kind: "entity";
|
|
202
|
+
readonly discriminator: "rls";
|
|
203
|
+
readonly validatorSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
204
|
+
kind: "rls";
|
|
205
|
+
tableName: string;
|
|
206
|
+
namespaceId: string;
|
|
207
|
+
}, {}>;
|
|
208
|
+
readonly output: {
|
|
209
|
+
readonly factory: (input: PostgresRlsEnablementInput) => PostgresRlsEnablement;
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
readonly policy: {
|
|
213
|
+
readonly kind: "entity";
|
|
214
|
+
readonly discriminator: "policy";
|
|
215
|
+
readonly validatorSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
216
|
+
kind: "policy";
|
|
217
|
+
name: string;
|
|
218
|
+
prefix: string;
|
|
219
|
+
tableName: string;
|
|
220
|
+
namespaceId: string;
|
|
221
|
+
operation: "delete" | "select" | "insert" | "update" | "all";
|
|
222
|
+
roles: readonly string[];
|
|
223
|
+
permissive: boolean;
|
|
224
|
+
using?: string;
|
|
225
|
+
withCheck?: string;
|
|
226
|
+
}, {}>;
|
|
227
|
+
readonly output: {
|
|
228
|
+
readonly factory: (block: RlsPolicyExtensionBlock, ctx: import("@prisma-next/framework-components/authoring").AuthoringEntityContext) => PostgresRlsPolicy | undefined;
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
readonly native_enum: {
|
|
232
|
+
readonly kind: "entity";
|
|
233
|
+
readonly discriminator: "native_enum";
|
|
234
|
+
readonly validatorSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
235
|
+
kind: "postgres-enum";
|
|
236
|
+
typeName: string;
|
|
237
|
+
members: readonly string[];
|
|
238
|
+
control?: "external" | "managed" | "tolerated" | "observed";
|
|
239
|
+
}, {}>;
|
|
240
|
+
readonly output: {
|
|
241
|
+
factory: (block: import("@prisma-next/psl-parser").PslExtensionBlock, ctx: import("@prisma-next/framework-components/authoring").AuthoringEntityContext) => PostgresNativeEnum | undefined;
|
|
242
|
+
deriveValueSet: (entity: PostgresNativeEnum) => {
|
|
243
|
+
kind: "valueSet";
|
|
244
|
+
values: string[];
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
readonly pslBlockDescriptors: {
|
|
250
|
+
readonly policy_select: {
|
|
251
|
+
readonly kind: "pslBlock";
|
|
252
|
+
readonly keyword: "policy_select";
|
|
253
|
+
readonly discriminator: "policy";
|
|
254
|
+
readonly name: {
|
|
255
|
+
readonly required: true;
|
|
256
|
+
};
|
|
257
|
+
readonly parameters: {
|
|
258
|
+
readonly target: {
|
|
259
|
+
readonly kind: "ref";
|
|
260
|
+
readonly refKind: "model";
|
|
261
|
+
readonly scope: "same-namespace";
|
|
262
|
+
readonly required: true;
|
|
263
|
+
};
|
|
264
|
+
readonly roles: {
|
|
265
|
+
readonly kind: "list";
|
|
266
|
+
readonly of: {
|
|
267
|
+
readonly kind: "ref";
|
|
268
|
+
readonly refKind: "role";
|
|
269
|
+
readonly scope: "cross-space";
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
readonly using: {
|
|
273
|
+
readonly kind: "value";
|
|
274
|
+
readonly codecId: "pg/text@1";
|
|
275
|
+
readonly required: true;
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
readonly requiresModelAttribute: {
|
|
279
|
+
readonly parameter: "target";
|
|
280
|
+
readonly attribute: "rls";
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
readonly policy_delete: {
|
|
284
|
+
readonly kind: "pslBlock";
|
|
285
|
+
readonly keyword: "policy_delete";
|
|
286
|
+
readonly discriminator: "policy";
|
|
287
|
+
readonly name: {
|
|
288
|
+
readonly required: true;
|
|
289
|
+
};
|
|
290
|
+
readonly parameters: {
|
|
291
|
+
readonly target: {
|
|
292
|
+
readonly kind: "ref";
|
|
293
|
+
readonly refKind: "model";
|
|
294
|
+
readonly scope: "same-namespace";
|
|
295
|
+
readonly required: true;
|
|
296
|
+
};
|
|
297
|
+
readonly roles: {
|
|
298
|
+
readonly kind: "list";
|
|
299
|
+
readonly of: {
|
|
300
|
+
readonly kind: "ref";
|
|
301
|
+
readonly refKind: "role";
|
|
302
|
+
readonly scope: "cross-space";
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
readonly using: {
|
|
306
|
+
readonly kind: "value";
|
|
307
|
+
readonly codecId: "pg/text@1";
|
|
308
|
+
readonly required: true;
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
readonly requiresModelAttribute: {
|
|
312
|
+
readonly parameter: "target";
|
|
313
|
+
readonly attribute: "rls";
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
readonly policy_insert: {
|
|
317
|
+
readonly kind: "pslBlock";
|
|
318
|
+
readonly keyword: "policy_insert";
|
|
319
|
+
readonly discriminator: "policy";
|
|
320
|
+
readonly name: {
|
|
321
|
+
readonly required: true;
|
|
322
|
+
};
|
|
323
|
+
readonly parameters: {
|
|
324
|
+
readonly target: {
|
|
325
|
+
readonly kind: "ref";
|
|
326
|
+
readonly refKind: "model";
|
|
327
|
+
readonly scope: "same-namespace";
|
|
328
|
+
readonly required: true;
|
|
329
|
+
};
|
|
330
|
+
readonly roles: {
|
|
331
|
+
readonly kind: "list";
|
|
332
|
+
readonly of: {
|
|
333
|
+
readonly kind: "ref";
|
|
334
|
+
readonly refKind: "role";
|
|
335
|
+
readonly scope: "cross-space";
|
|
336
|
+
};
|
|
337
|
+
};
|
|
338
|
+
readonly withCheck: {
|
|
339
|
+
readonly kind: "value";
|
|
340
|
+
readonly codecId: "pg/text@1";
|
|
341
|
+
readonly required: true;
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
readonly requiresModelAttribute: {
|
|
345
|
+
readonly parameter: "target";
|
|
346
|
+
readonly attribute: "rls";
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
readonly policy_update: {
|
|
350
|
+
readonly kind: "pslBlock";
|
|
351
|
+
readonly keyword: "policy_update";
|
|
352
|
+
readonly discriminator: "policy";
|
|
353
|
+
readonly name: {
|
|
354
|
+
readonly required: true;
|
|
355
|
+
};
|
|
356
|
+
readonly parameters: {
|
|
357
|
+
readonly target: {
|
|
358
|
+
readonly kind: "ref";
|
|
359
|
+
readonly refKind: "model";
|
|
360
|
+
readonly scope: "same-namespace";
|
|
361
|
+
readonly required: true;
|
|
362
|
+
};
|
|
363
|
+
readonly roles: {
|
|
364
|
+
readonly kind: "list";
|
|
365
|
+
readonly of: {
|
|
366
|
+
readonly kind: "ref";
|
|
367
|
+
readonly refKind: "role";
|
|
368
|
+
readonly scope: "cross-space";
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
readonly using: {
|
|
372
|
+
readonly kind: "value";
|
|
373
|
+
readonly codecId: "pg/text@1";
|
|
374
|
+
readonly required: true;
|
|
375
|
+
};
|
|
376
|
+
readonly withCheck: {
|
|
377
|
+
readonly kind: "value";
|
|
378
|
+
readonly codecId: "pg/text@1";
|
|
379
|
+
readonly required: true;
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
readonly requiresModelAttribute: {
|
|
383
|
+
readonly parameter: "target";
|
|
384
|
+
readonly attribute: "rls";
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
readonly policy_all: {
|
|
388
|
+
readonly kind: "pslBlock";
|
|
389
|
+
readonly keyword: "policy_all";
|
|
390
|
+
readonly discriminator: "policy";
|
|
391
|
+
readonly name: {
|
|
392
|
+
readonly required: true;
|
|
393
|
+
};
|
|
394
|
+
readonly parameters: {
|
|
395
|
+
readonly target: {
|
|
396
|
+
readonly kind: "ref";
|
|
397
|
+
readonly refKind: "model";
|
|
398
|
+
readonly scope: "same-namespace";
|
|
399
|
+
readonly required: true;
|
|
400
|
+
};
|
|
401
|
+
readonly roles: {
|
|
402
|
+
readonly kind: "list";
|
|
403
|
+
readonly of: {
|
|
404
|
+
readonly kind: "ref";
|
|
405
|
+
readonly refKind: "role";
|
|
406
|
+
readonly scope: "cross-space";
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
|
+
readonly using: {
|
|
410
|
+
readonly kind: "value";
|
|
411
|
+
readonly codecId: "pg/text@1";
|
|
412
|
+
readonly required: true;
|
|
413
|
+
};
|
|
414
|
+
readonly withCheck: {
|
|
415
|
+
readonly kind: "value";
|
|
416
|
+
readonly codecId: "pg/text@1";
|
|
417
|
+
readonly required: true;
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
readonly requiresModelAttribute: {
|
|
421
|
+
readonly parameter: "target";
|
|
422
|
+
readonly attribute: "rls";
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
readonly native_enum: {
|
|
426
|
+
readonly kind: "pslBlock";
|
|
427
|
+
readonly keyword: "native_enum";
|
|
428
|
+
readonly discriminator: "native_enum";
|
|
429
|
+
readonly name: {
|
|
430
|
+
readonly required: true;
|
|
431
|
+
};
|
|
432
|
+
readonly parameters: {};
|
|
433
|
+
readonly variadicParameters: true;
|
|
434
|
+
};
|
|
435
|
+
readonly role: {
|
|
436
|
+
readonly kind: "pslBlock";
|
|
437
|
+
readonly keyword: "role";
|
|
438
|
+
readonly discriminator: "role";
|
|
439
|
+
readonly name: {
|
|
440
|
+
readonly required: true;
|
|
441
|
+
};
|
|
442
|
+
readonly parameters: {};
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
readonly modelAttributes: {
|
|
446
|
+
readonly rls: {
|
|
447
|
+
readonly kind: "modelAttribute";
|
|
448
|
+
readonly attribute: "rls";
|
|
449
|
+
readonly spec: import("@prisma-next/psl-parser").AttributeSpec<{}>;
|
|
450
|
+
readonly lower: (_parsed: Record<never, never>, ctx: import("@prisma-next/framework-components/authoring").AuthoringModelAttributeContext) => {
|
|
451
|
+
key: string;
|
|
452
|
+
entity: PostgresRlsEnablement;
|
|
453
|
+
};
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
readonly createNamespace: typeof postgresCreateNamespace;
|
|
457
|
+
readonly qualifyColumnType: typeof postgresQualifyColumnType;
|
|
458
|
+
readonly lowerEntityHandles: typeof postgresLowerEntityHandles;
|
|
141
459
|
};
|
|
142
460
|
readonly kind: "target";
|
|
143
461
|
readonly familyId: "sql";
|
package/dist/pack.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pack.d.mts","names":[],"sources":["../src/core/descriptor-meta.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"pack.d.mts","names":[],"sources":["../src/core/authoring.ts","../src/core/descriptor-meta.ts"],"mappings":";;;;;;;;UA8DiB,uBAAA,SAAgC,iBAAiB;EAAA,SACvD,WAAA;EA+pBkB;AAAA;;;;ACltB+B;EDktB/B,SAxpBlB,iBAAA,GAAoB,oBAAA;AAAA;;UAId,kBAAA,SAA2B,iBAAiB;EAAA,SAClD,WAAW;AAAA;;;;;;;;;;;;iBAipBN,0BAAA,CACd,KAAA,EAAO,yBAAA,YACG,iBAAiB;;;cChtBvB,gCAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAaI,kBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAEG,4BAAA,SAAqC,gCAAA;EAAA,SACvC,YAAA,GAAe,UAAU;AAAA"}
|
package/dist/pack.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-
|
|
1
|
+
import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-CFQKLXl_.mjs";
|
|
2
2
|
export { postgresTargetDescriptorMeta as default };
|