@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/dist/development/src/commands/project/ProjectPrintSchemaCommand.cjs +3 -2
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -1
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.js +3 -2
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -1
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.cjs +3 -2
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -1
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.js +3 -2
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -1
- package/dist/types/commands/project/ProjectPrintSchemaCommand.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -14
- package/src/commands/project/ProjectPrintSchemaCommand.ts +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contember/cli",
|
|
3
|
-
"version": "2.2.0-alpha.
|
|
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.
|
|
40
|
-
"@contember/config-loader": "2.2.0-alpha.
|
|
41
|
-
"@contember/database": "2.2.0-alpha.
|
|
42
|
-
"@contember/dic": "2.2.0-alpha.
|
|
43
|
-
"@contember/engine-common": "2.2.0-alpha.
|
|
44
|
-
"@contember/engine-content-api": "2.2.0-alpha.
|
|
45
|
-
"@contember/graphql-client": "2.2.0-alpha.
|
|
46
|
-
"@contember/graphql-client-tenant": "2.2.0-alpha.
|
|
47
|
-
"@contember/migrations-client": "2.2.0-alpha.
|
|
48
|
-
"@contember/schema": "2.2.0-alpha.
|
|
49
|
-
"@contember/schema-migrations": "2.2.0-alpha.
|
|
50
|
-
"@contember/schema-utils": "2.2.0-alpha.
|
|
51
|
-
"@contember/typesafe": "2.2.0-alpha.
|
|
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
|
|
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 =
|
|
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(
|