@ai-matrx/content-ir 0.10.1 → 0.10.3
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 +52 -0
- package/dist/core.cjs +5 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +5 -1
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/session.cjs +5 -1
- package/dist/session.cjs.map +1 -1
- package/dist/session.js +5 -1
- package/dist/session.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1654,9 +1654,10 @@ var KindStreamParser = class {
|
|
|
1654
1654
|
}
|
|
1655
1655
|
validateFinalFieldValue(fieldSchema, value, fieldName, objectKind) {
|
|
1656
1656
|
if (fieldSchema.type === "json") return null;
|
|
1657
|
+
if (value === null && fieldSchema.nullable === true) return null;
|
|
1657
1658
|
if (fieldSchema.type === "json[]") {
|
|
1658
1659
|
if (value === null) {
|
|
1659
|
-
return
|
|
1660
|
+
return `Field "${fieldName}" on kind "${objectKind}" cannot be null.`;
|
|
1660
1661
|
}
|
|
1661
1662
|
if (!Array.isArray(value)) {
|
|
1662
1663
|
return `Field "${fieldName}" on kind "${objectKind}" must be an array.`;
|
|
@@ -1753,6 +1754,7 @@ var KindStreamParser = class {
|
|
|
1753
1754
|
if (fieldSchema.type === "json") {
|
|
1754
1755
|
return null;
|
|
1755
1756
|
}
|
|
1757
|
+
if (value === null && fieldSchema.nullable === true) return null;
|
|
1756
1758
|
if (fieldSchema.type === "array" || fieldSchema.type === "json[]") {
|
|
1757
1759
|
return valueKind === "array" ? null : `Field "${fieldName}" must be an array.`;
|
|
1758
1760
|
}
|
|
@@ -1881,6 +1883,8 @@ var KindStreamParser = class {
|
|
|
1881
1883
|
const fieldKey = this.fieldKeyFromPath(path);
|
|
1882
1884
|
if (!fieldKey) return void 0;
|
|
1883
1885
|
const parentPath = path.slice(0, -1);
|
|
1886
|
+
const inlineFields = this.inlineSchemas.get(this.pathKey(parentPath));
|
|
1887
|
+
if (inlineFields) return inlineFields[fieldKey];
|
|
1884
1888
|
const parentKind = this.getObjectKindForPath(parentPath);
|
|
1885
1889
|
if (!parentKind) return void 0;
|
|
1886
1890
|
return this.lookupSchema(parentKind)?.fields[fieldKey];
|