@stoker-platform/cli 0.5.91 → 0.5.92

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.90",
3
+ "version": "0.5.92",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "./lib/src/main.js",
@@ -126,7 +126,7 @@ export const lintSchema = async (noLog = false) => {
126
126
  }
127
127
  }
128
128
  for (const [collectionName, collectionSchema] of collectionSchemas) {
129
- const { labels, auth, fields, access, ttl, parentCollection, recordTitleField, softDelete, roleSystemFields, preloadCache, relationLists, fullTextSearch, ai, } = collectionSchema;
129
+ const { labels, auth, fields, access, singleton, ttl, parentCollection, recordTitleField, softDelete, roleSystemFields, preloadCache, relationLists, fullTextSearch, ai, } = collectionSchema;
130
130
  const { auth: authAccess, operations, attributeRestrictions, entityRestrictions, permissionWriteRestrictions, serverReadOnly, serverWriteOnly, files, } = access;
131
131
  // eslint-disable-next-line security/detect-object-injection
132
132
  const customization = customizationModules[collectionName];
@@ -238,6 +238,17 @@ export const lintSchema = async (noLog = false) => {
238
238
  errors.push(`Auth collection ${collectionName} cannot have a parent collection`);
239
239
  }
240
240
  }
241
+ if (singleton) {
242
+ if (auth) {
243
+ errors.push(`Singleton collection ${collectionName} cannot have auth enabled`);
244
+ }
245
+ if (operations.create) {
246
+ errors.push(`Singleton collection ${collectionName} cannot have create operations`);
247
+ }
248
+ if (operations.delete) {
249
+ errors.push(`Singleton collection ${collectionName} cannot have delete operations`);
250
+ }
251
+ }
241
252
  if (parentCollection) {
242
253
  if (!collectionNames.includes(parentCollection)) {
243
254
  errors.push(`Collection ${collectionName} has a parent collection ${parentCollection} that does not exist`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/cli",
3
- "version": "0.5.91",
3
+ "version": "0.5.92",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "./lib/src/main.js",