@contentful/experiences-visual-editor-react 3.8.0-beta.0 → 3.8.0-beta.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/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/dist/renderApp.js +20 -0
- package/dist/renderApp.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -766,6 +766,16 @@ const ComponentVariableSchema$1 = z.object({
|
|
|
766
766
|
});
|
|
767
767
|
const ComponentTreeNodeSchema$1 = BaseComponentTreeNodeSchema$1.extend({
|
|
768
768
|
children: z.lazy(() => ComponentTreeNodeSchema$1.array()),
|
|
769
|
+
}).superRefine(({ id, prebindingId, parameters }, ctx) => {
|
|
770
|
+
// We don't fail if parameters are present but prebindingId is not because
|
|
771
|
+
// older experiences (updated before 21-09-2025) always included parameters
|
|
772
|
+
// and they will start failing if we do.
|
|
773
|
+
if (prebindingId && !parameters) {
|
|
774
|
+
ctx.addIssue({
|
|
775
|
+
code: z.ZodIssueCode.custom,
|
|
776
|
+
message: `Found "prebindingId" but no "parameters" for node with id: "${id}"`,
|
|
777
|
+
});
|
|
778
|
+
}
|
|
769
779
|
});
|
|
770
780
|
const ComponentTreeSchema$1 = z
|
|
771
781
|
.object({
|
|
@@ -4003,6 +4013,16 @@ const ComponentVariableSchema = z.object({
|
|
|
4003
4013
|
});
|
|
4004
4014
|
const ComponentTreeNodeSchema = BaseComponentTreeNodeSchema.extend({
|
|
4005
4015
|
children: z.lazy(() => ComponentTreeNodeSchema.array()),
|
|
4016
|
+
}).superRefine(({ id, prebindingId, parameters }, ctx) => {
|
|
4017
|
+
// We don't fail if parameters are present but prebindingId is not because
|
|
4018
|
+
// older experiences (updated before 21-09-2025) always included parameters
|
|
4019
|
+
// and they will start failing if we do.
|
|
4020
|
+
if (prebindingId && !parameters) {
|
|
4021
|
+
ctx.addIssue({
|
|
4022
|
+
code: z.ZodIssueCode.custom,
|
|
4023
|
+
message: `Found "prebindingId" but no "parameters" for node with id: "${id}"`,
|
|
4024
|
+
});
|
|
4025
|
+
}
|
|
4006
4026
|
});
|
|
4007
4027
|
const ComponentTreeSchema = z
|
|
4008
4028
|
.object({
|