@stoker-platform/cli 0.5.141 → 0.5.142

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/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/cli",
3
- "version": "0.5.140",
3
+ "version": "0.5.141",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "./lib/src/main.js",
@@ -1690,7 +1690,10 @@ export const lintSchema = async (noLog = false) => {
1690
1690
  if (filter.roles && !filter.roles.includes(role))
1691
1691
  continue;
1692
1692
  if (filter.type === "relation" && hasArrayContains) {
1693
- errors.push(`Collection ${collectionName} has a relation filter for role ${role} on field ${filter.field} that uses an array-contains filter, but an array-contains filter has already been used. This can be resolved by using the preload cache.`);
1693
+ const field = getField(fields, filter.field);
1694
+ if (["ManyToOne", "ManyToMany"].includes(field.type)) {
1695
+ errors.push(`Collection ${collectionName} has a relation filter for role ${role} on field ${filter.field} that uses an array-contains filter, but an array-contains filter has already been used. This can be resolved by using the preload cache.`);
1696
+ }
1694
1697
  }
1695
1698
  if (filter.type === "select") {
1696
1699
  const field = getField(fields, filter.field);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/cli",
3
- "version": "0.5.141",
3
+ "version": "0.5.142",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "./lib/src/main.js",