@contember/cli 2.2.0-alpha.13 → 2.2.0-alpha.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contember/cli",
3
- "version": "2.2.0-alpha.13",
3
+ "version": "2.2.0-alpha.15",
4
4
  "license": "Apache-2.0",
5
5
  "bin": {
6
6
  "contember": "./dist/production/run.js"
@@ -36,19 +36,19 @@
36
36
  "tailwindcss": "^4.2.1"
37
37
  },
38
38
  "dependencies": {
39
- "@contember/cli-common": "2.2.0-alpha.13",
40
- "@contember/config-loader": "2.2.0-alpha.13",
41
- "@contember/database": "2.2.0-alpha.13",
42
- "@contember/dic": "2.2.0-alpha.13",
43
- "@contember/engine-common": "2.2.0-alpha.13",
44
- "@contember/engine-content-api": "2.2.0-alpha.13",
45
- "@contember/graphql-client": "2.2.0-alpha.13",
46
- "@contember/graphql-client-tenant": "2.2.0-alpha.13",
47
- "@contember/migrations-client": "2.2.0-alpha.13",
48
- "@contember/schema": "2.2.0-alpha.13",
49
- "@contember/schema-migrations": "2.2.0-alpha.13",
50
- "@contember/schema-utils": "2.2.0-alpha.13",
51
- "@contember/typesafe": "2.2.0-alpha.13",
39
+ "@contember/cli-common": "2.2.0-alpha.15",
40
+ "@contember/config-loader": "2.2.0-alpha.15",
41
+ "@contember/database": "2.2.0-alpha.15",
42
+ "@contember/dic": "2.2.0-alpha.15",
43
+ "@contember/engine-common": "2.2.0-alpha.15",
44
+ "@contember/engine-content-api": "2.2.0-alpha.15",
45
+ "@contember/graphql-client": "2.2.0-alpha.15",
46
+ "@contember/graphql-client-tenant": "2.2.0-alpha.15",
47
+ "@contember/migrations-client": "2.2.0-alpha.15",
48
+ "@contember/schema": "2.2.0-alpha.15",
49
+ "@contember/schema-migrations": "2.2.0-alpha.15",
50
+ "@contember/schema-utils": "2.2.0-alpha.15",
51
+ "@contember/typesafe": "2.2.0-alpha.15",
52
52
  "@graphql-tools/schema": "^10.0.31",
53
53
  "chalk": "^5.6.2",
54
54
  "chalk-table": "^1.0.2",
@@ -70,10 +70,11 @@ export class ProjectPrintSchemaCommand extends Command<Args, Options> {
70
70
  const inputRoles = input.getOption('role')
71
71
  const schemaNormalized = input.getOption('normalize') ? normalizeSchema(filteredSchema) : filteredSchema
72
72
  // Built the way the engine builds it: types and introspection from the nested set, root fields from the root set.
73
- const { root: rootPermissions, all: permissions } = permissionFactory.createContextual(schemaNormalized, inputRoles || ['admin'])
73
+ const roles = inputRoles || ['admin']
74
+ const { root: rootPermissions, all: permissions } = permissionFactory.createContextual(schemaNormalized, roles)
74
75
  const schemaBuilderFactory = new GraphQlSchemaBuilderFactory()
75
76
  const customPrimary = schemaNormalized.acl.customPrimary ?? false
76
- const refreshMaterializedView = Object.values(schemaNormalized.acl.roles).some(it => it.content?.refreshMaterializedView)
77
+ const refreshMaterializedView = permissionFactory.isRefreshMaterializedViewAllowed(schemaNormalized, roles)
77
78
  const authorizator = new Authorizator(permissions, customPrimary, refreshMaterializedView)
78
79
  const rootAuthorizator = new Authorizator(rootPermissions, customPrimary, refreshMaterializedView)
79
80
  const introspection = new IntrospectionSchemaFactory(