@contentful/experiences-core 3.7.0 → 3.7.1-beta.0
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/index.cjs +13 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1039,6 +1039,19 @@ const ComponentVariableSchema = zod.z.object({
|
|
|
1039
1039
|
});
|
|
1040
1040
|
const ComponentTreeNodeSchema = BaseComponentTreeNodeSchema.extend({
|
|
1041
1041
|
children: zod.z.lazy(() => ComponentTreeNodeSchema.array()),
|
|
1042
|
+
}).superRefine(({ id, prebindingId, parameters }, ctx) => {
|
|
1043
|
+
if (prebindingId && !parameters) {
|
|
1044
|
+
ctx.addIssue({
|
|
1045
|
+
code: zod.z.ZodIssueCode.custom,
|
|
1046
|
+
message: `Found "prebindingId" but no "parameters" for node with id: "${id}"`,
|
|
1047
|
+
});
|
|
1048
|
+
}
|
|
1049
|
+
if (parameters && !prebindingId) {
|
|
1050
|
+
ctx.addIssue({
|
|
1051
|
+
code: zod.z.ZodIssueCode.custom,
|
|
1052
|
+
message: `Found "parameters" but no "prebindingId" for node with id: "${id}"`,
|
|
1053
|
+
});
|
|
1054
|
+
}
|
|
1042
1055
|
});
|
|
1043
1056
|
const ComponentTreeSchema = zod.z
|
|
1044
1057
|
.object({
|