@stoker-platform/cli 0.5.20 → 0.5.21
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.
|
@@ -39,6 +39,7 @@ import {defineSecret} from "firebase-functions/params";
|
|
|
39
39
|
import {readFileSync} from "fs";
|
|
40
40
|
import {
|
|
41
41
|
getPathCollections,
|
|
42
|
+
roleHasOperationAccess,
|
|
42
43
|
} from "@stoker-platform/utils";
|
|
43
44
|
import {
|
|
44
45
|
CollectionSchema,
|
|
@@ -202,10 +203,12 @@ Object.values(schema.collections).forEach((collectionSchema) => {
|
|
|
202
203
|
});
|
|
203
204
|
}
|
|
204
205
|
|
|
206
|
+
const readRoles = schema.config.roles.filter((role) =>
|
|
207
|
+
roleHasOperationAccess(collectionSchema, role, "read"));
|
|
205
208
|
if (
|
|
206
209
|
collectionSchema.fullTextSearch &&
|
|
207
210
|
process.env.STOKER_ALGOLIA_ID &&
|
|
208
|
-
!
|
|
211
|
+
!readRoles.every((role) =>
|
|
209
212
|
collectionSchema.preloadCache?.roles.includes(role) ||
|
|
210
213
|
collectionSchema.access.serverReadOnly?.includes(role)
|
|
211
214
|
)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stoker-platform/cli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.21",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"main": "./lib/src/main.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@google-cloud/secret-manager": "^6.1.1",
|
|
25
25
|
"@google-cloud/storage": "^7.18.0",
|
|
26
26
|
"@inquirer/prompts": "^8.1.0",
|
|
27
|
-
"@stoker-platform/node-client": "0.5.
|
|
27
|
+
"@stoker-platform/node-client": "0.5.14",
|
|
28
28
|
"@stoker-platform/types": "0.5.5",
|
|
29
29
|
"@stoker-platform/utils": "0.5.8",
|
|
30
30
|
"algoliasearch": "^5.46.2",
|