@contentful/experiences-core 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.cjs +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -988,6 +988,16 @@ const ComponentVariableSchema = z.object({
|
|
|
988
988
|
});
|
|
989
989
|
const ComponentTreeNodeSchema = BaseComponentTreeNodeSchema.extend({
|
|
990
990
|
children: z.lazy(() => ComponentTreeNodeSchema.array()),
|
|
991
|
+
}).superRefine(({ id, prebindingId, parameters }, ctx) => {
|
|
992
|
+
// We don't fail if parameters are present but prebindingId is not because
|
|
993
|
+
// older experiences (updated before 21-09-2025) always included parameters
|
|
994
|
+
// and they will start failing if we do.
|
|
995
|
+
if (prebindingId && !parameters) {
|
|
996
|
+
ctx.addIssue({
|
|
997
|
+
code: z.ZodIssueCode.custom,
|
|
998
|
+
message: `Found "prebindingId" but no "parameters" for node with id: "${id}"`,
|
|
999
|
+
});
|
|
1000
|
+
}
|
|
991
1001
|
});
|
|
992
1002
|
const ComponentTreeSchema = z
|
|
993
1003
|
.object({
|