@prisma-next/family-sql 0.12.0-dev.20 → 0.12.0-dev.21
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/control.mjs +6 -6
- package/dist/control.mjs.map +1 -1
- package/dist/schema-verify.mjs +1 -1
- package/dist/{verify-sql-schema-CXW_D9dW.mjs → verify-sql-schema-fljAiO-C.mjs} +5 -5
- package/dist/verify-sql-schema-fljAiO-C.mjs.map +1 -0
- package/package.json +21 -21
- package/src/core/migrations/control-policy.ts +5 -5
- package/src/core/schema-verify/verify-sql-schema.ts +4 -4
- package/dist/verify-sql-schema-CXW_D9dW.mjs.map +0 -1
package/dist/control.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as sqlFamilyAuthoringFieldPresets, t as sqlFamilyAuthoringTypes } from "./authoring-type-constructors-F4JpCJl7.mjs";
|
|
2
2
|
import { t as SqlContractSerializer } from "./sql-contract-serializer-8axtK4lg.mjs";
|
|
3
|
-
import { a as extractCodecControlHooks, t as verifySqlSchema } from "./verify-sql-schema-
|
|
3
|
+
import { a as extractCodecControlHooks, t as verifySqlSchema } from "./verify-sql-schema-fljAiO-C.mjs";
|
|
4
4
|
import { t as collectSupportedCodecTypeIds } from "./verify-Crewz6hG.mjs";
|
|
5
5
|
import { n as temporalAuthoringPresets, r as timestampNowControlDescriptor } from "./timestamp-now-generator-BkjCQIde.mjs";
|
|
6
6
|
import { sqlEmission } from "@prisma-next/sql-contract-emitter";
|
|
@@ -1632,9 +1632,9 @@ function deriveAnnotations(storage, annotationNamespace, resolveEnumStorageKey)
|
|
|
1632
1632
|
* policy is forced to `external` regardless of the node's own declaration.
|
|
1633
1633
|
* Every other default defers to the node's effective control policy.
|
|
1634
1634
|
*/
|
|
1635
|
-
function controlPolicyForCall(subject,
|
|
1636
|
-
if (
|
|
1637
|
-
return effectiveControlPolicy(subject?.explicitNodeControlPolicy,
|
|
1635
|
+
function controlPolicyForCall(subject, defaultControlPolicy) {
|
|
1636
|
+
if (defaultControlPolicy === "external") return "external";
|
|
1637
|
+
return effectiveControlPolicy(subject?.explicitNodeControlPolicy, defaultControlPolicy);
|
|
1638
1638
|
}
|
|
1639
1639
|
/**
|
|
1640
1640
|
* Whether a call is allowed to emit under a given control policy.
|
|
@@ -1655,11 +1655,11 @@ function callAllowedUnderControlPolicy(policy, subject) {
|
|
|
1655
1655
|
}
|
|
1656
1656
|
}
|
|
1657
1657
|
function filterCallsByControlPolicy(options) {
|
|
1658
|
-
const
|
|
1658
|
+
const defaultControlPolicy = options.contract.defaultControlPolicy;
|
|
1659
1659
|
const kept = [];
|
|
1660
1660
|
for (const call of options.calls) {
|
|
1661
1661
|
const subject = options.resolveControlPolicySubject(call);
|
|
1662
|
-
if (callAllowedUnderControlPolicy(controlPolicyForCall(subject,
|
|
1662
|
+
if (callAllowedUnderControlPolicy(controlPolicyForCall(subject, defaultControlPolicy), subject)) kept.push(call);
|
|
1663
1663
|
}
|
|
1664
1664
|
return Object.freeze(kept);
|
|
1665
1665
|
}
|