@ai-matrx/content-ir 0.10.0 → 0.10.2
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/CHANGELOG.md +28 -0
- package/dist/core.cjs +3 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +3 -1
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/session.cjs +3 -1
- package/dist/session.cjs.map +1 -1
- package/dist/session.js +3 -1
- package/dist/session.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1660,9 +1660,10 @@ var KindStreamParser = class {
|
|
|
1660
1660
|
}
|
|
1661
1661
|
validateFinalFieldValue(fieldSchema, value, fieldName, objectKind) {
|
|
1662
1662
|
if (fieldSchema.type === "json") return null;
|
|
1663
|
+
if (value === null && fieldSchema.nullable === true) return null;
|
|
1663
1664
|
if (fieldSchema.type === "json[]") {
|
|
1664
1665
|
if (value === null) {
|
|
1665
|
-
return
|
|
1666
|
+
return `Field "${fieldName}" on kind "${objectKind}" cannot be null.`;
|
|
1666
1667
|
}
|
|
1667
1668
|
if (!Array.isArray(value)) {
|
|
1668
1669
|
return `Field "${fieldName}" on kind "${objectKind}" must be an array.`;
|
|
@@ -1759,6 +1760,7 @@ var KindStreamParser = class {
|
|
|
1759
1760
|
if (fieldSchema.type === "json") {
|
|
1760
1761
|
return null;
|
|
1761
1762
|
}
|
|
1763
|
+
if (value === null && fieldSchema.nullable === true) return null;
|
|
1762
1764
|
if (fieldSchema.type === "array" || fieldSchema.type === "json[]") {
|
|
1763
1765
|
return valueKind === "array" ? null : `Field "${fieldName}" must be an array.`;
|
|
1764
1766
|
}
|