@stoker-platform/cli 0.5.31 → 0.5.32

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.30",
3
+ "version": "0.5.31",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "./lib/src/main.js",
@@ -24,9 +24,9 @@
24
24
  "@google-cloud/secret-manager": "^6.1.1",
25
25
  "@google-cloud/storage": "^7.19.0",
26
26
  "@inquirer/prompts": "^8.2.0",
27
- "@stoker-platform/node-client": "0.5.20",
28
- "@stoker-platform/types": "0.5.10",
29
- "@stoker-platform/utils": "0.5.14",
27
+ "@stoker-platform/node-client": "0.5.21",
28
+ "@stoker-platform/types": "0.5.11",
29
+ "@stoker-platform/utils": "0.5.15",
30
30
  "algoliasearch": "^5.48.0",
31
31
  "commander": "^14.0.0",
32
32
  "cross-spawn": "^7.0.6",
@@ -316,17 +316,22 @@ export const lintSchema = async (noLog = false) => {
316
316
  errors.push(`The first preload cache field for collection ${collectionName} must be a required field`);
317
317
  }
318
318
  }
319
- preloadCache.range.fields.forEach((field) => {
319
+ preloadCache.range.fields.forEach((field, index) => {
320
320
  const rangeField = getField(fields.concat(systemFieldSchema), field);
321
321
  if (!rangeField) {
322
322
  errors.push(`Collection ${collectionName} has a preload cache with a range field ${field} that does not exist`);
323
323
  }
324
- else if (rangeField.access) {
325
- preloadCache.roles.forEach((role) => {
326
- if (!rangeField.access?.includes(role)) {
327
- errors.push(`Collection ${collectionName} has a preload cache range field ${field} that can't be accessed by role ${role}`);
328
- }
329
- });
324
+ else {
325
+ if (index > 0 && !rangeField.nullable) {
326
+ errors.push(`Collection ${collectionName} has a preload cache range field ${field} that must be nullable`);
327
+ }
328
+ if (rangeField.access) {
329
+ preloadCache.roles.forEach((role) => {
330
+ if (!rangeField.access?.includes(role)) {
331
+ errors.push(`Collection ${collectionName} has a preload cache range field ${field} that can't be accessed by role ${role}`);
332
+ }
333
+ });
334
+ }
330
335
  }
331
336
  });
332
337
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/cli",
3
- "version": "0.5.31",
3
+ "version": "0.5.32",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "./lib/src/main.js",