@contember/cli 2.2.0-alpha.11 → 2.2.0-alpha.12
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 +6 -7
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -1
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.js +6 -7
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -1
- package/dist/development/src/lib/project/docs/components/EntityInfo.cjs +27 -28
- package/dist/development/src/lib/project/docs/components/EntityInfo.cjs.map +1 -1
- package/dist/development/src/lib/project/docs/components/EntityInfo.js +28 -29
- package/dist/development/src/lib/project/docs/components/EntityInfo.js.map +1 -1
- package/dist/development/src/lib/project/docs/components/FieldPermissions.cjs +30 -10
- package/dist/development/src/lib/project/docs/components/FieldPermissions.cjs.map +1 -1
- package/dist/development/src/lib/project/docs/components/FieldPermissions.js +30 -10
- package/dist/development/src/lib/project/docs/components/FieldPermissions.js.map +1 -1
- package/dist/development/src/lib/project/docs/components/SinglePermission.cjs +23 -10
- package/dist/development/src/lib/project/docs/components/SinglePermission.cjs.map +1 -1
- package/dist/development/src/lib/project/docs/components/SinglePermission.js +23 -10
- package/dist/development/src/lib/project/docs/components/SinglePermission.js.map +1 -1
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.cjs +6 -7
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -1
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.js +6 -7
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -1
- package/dist/production/src/lib/project/docs/components/EntityInfo.cjs +1 -2
- package/dist/production/src/lib/project/docs/components/EntityInfo.cjs.map +1 -1
- package/dist/production/src/lib/project/docs/components/EntityInfo.js +2 -3
- package/dist/production/src/lib/project/docs/components/EntityInfo.js.map +1 -1
- package/dist/production/src/lib/project/docs/components/FieldPermissions.cjs +18 -6
- package/dist/production/src/lib/project/docs/components/FieldPermissions.cjs.map +1 -1
- package/dist/production/src/lib/project/docs/components/FieldPermissions.js +19 -7
- package/dist/production/src/lib/project/docs/components/FieldPermissions.js.map +1 -1
- package/dist/production/src/lib/project/docs/components/SinglePermission.cjs +12 -3
- package/dist/production/src/lib/project/docs/components/SinglePermission.cjs.map +1 -1
- package/dist/production/src/lib/project/docs/components/SinglePermission.js +12 -3
- package/dist/production/src/lib/project/docs/components/SinglePermission.js.map +1 -1
- package/dist/types/lib/project/docs/components/EntityInfo.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/FieldPermissions.d.ts +3 -0
- package/dist/types/lib/project/docs/components/FieldPermissions.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/SinglePermission.d.ts +2 -1
- package/dist/types/lib/project/docs/components/SinglePermission.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -14
- package/src/commands/project/ProjectPrintSchemaCommand.ts +7 -7
- package/src/lib/project/docs/components/EntityInfo.tsx +2 -3
- package/src/lib/project/docs/components/FieldPermissions.tsx +25 -6
- package/src/lib/project/docs/components/SinglePermission.tsx +17 -3
- package/tests/cases/unit/project.test.ts +53 -1
|
@@ -39,13 +39,12 @@ class ProjectPrintSchemaCommand extends cliCommon.Command {
|
|
|
39
39
|
const permissionFactory = new engineContentApi.PermissionFactory();
|
|
40
40
|
const inputRoles = input.getOption("role");
|
|
41
41
|
const schemaNormalized = input.getOption("normalize") ? schemaUtils.normalizeSchema(filteredSchema) : filteredSchema;
|
|
42
|
-
const permissions = permissionFactory.
|
|
42
|
+
const { root: rootPermissions, all: permissions } = permissionFactory.createContextual(schemaNormalized, inputRoles || ["admin"]);
|
|
43
43
|
const schemaBuilderFactory = new engineContentApi.GraphQlSchemaBuilderFactory();
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
);
|
|
44
|
+
const customPrimary = schemaNormalized.acl.customPrimary ?? false;
|
|
45
|
+
const refreshMaterializedView = Object.values(schemaNormalized.acl.roles).some((it) => it.content?.refreshMaterializedView);
|
|
46
|
+
const authorizator = new engineContentApi.Authorizator(permissions, customPrimary, refreshMaterializedView);
|
|
47
|
+
const rootAuthorizator = new engineContentApi.Authorizator(rootPermissions, customPrimary, refreshMaterializedView);
|
|
49
48
|
const introspection = new engineContentApi.IntrospectionSchemaFactory(
|
|
50
49
|
schemaNormalized.model,
|
|
51
50
|
new engineContentApi.EntityRulesResolver(schemaNormalized.validation, schemaNormalized.model),
|
|
@@ -65,7 +64,7 @@ class ProjectPrintSchemaCommand extends cliCommon.Command {
|
|
|
65
64
|
quiet: (value) => JSON.stringify(value)
|
|
66
65
|
});
|
|
67
66
|
} else if (format === "graphql") {
|
|
68
|
-
const contentSchema = schemaBuilderFactory.create(schemaNormalized.model, authorizator).build();
|
|
67
|
+
const contentSchema = schemaBuilderFactory.create(schemaNormalized.model, authorizator, rootAuthorizator).build();
|
|
69
68
|
const introspectionSchemaFactory = new engineContentApi.IntrospectionSchemaDefinitionFactory(introspection);
|
|
70
69
|
const introspectionSchema = introspectionSchemaFactory.create();
|
|
71
70
|
const gqlSchema = schema.mergeSchemas({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectPrintSchemaCommand.cjs","sources":["../../../../../../packages/cli/src/commands/project/ProjectPrintSchemaCommand.ts"],"sourcesContent":["import { CliError, Command, CommandConfiguration, ExitCode, Input, Output } from '@contember/cli-common'\nimport {\n\tAuthorizator,\n\tEntityRulesResolver,\n\tGraphQlSchemaBuilderFactory,\n\tIntrospectionSchemaDefinitionFactory,\n\tIntrospectionSchemaFactory,\n\tPermissionFactory,\n} from '@contember/engine-content-api'\nimport { printSchema } from 'graphql'\nimport { mergeSchemas } from '@graphql-tools/schema'\nimport { emptySchema, normalizeSchema } from '@contember/schema-utils'\nimport { SchemaLoader } from '../../lib/schema/SchemaLoader.js'\nimport { SchemaVersionBuilder } from '@contember/migrations-client'\nimport { validateSchemaAndPrintErrors } from '../../lib/schema/SchemaValidationHelper.js'\n\ntype Args = {}\n\ntype Options = {\n\trole?: string[]\n\tnormalize?: boolean\n\tformat?: 'graphql' | 'introspection' | 'schema'\n\tsource?: 'migrations' | 'definition'\n\t['omit-acl']?: boolean\n\t['omit-validation']?: boolean\n\t['omit-actions']?: boolean\n\t['omit-settings']?: boolean\n}\n\nexport class ProjectPrintSchemaCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly schemaLoader: SchemaLoader,\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Prints project schema')\n\t\tconfiguration.option('format').valueRequired().description('graphql|introspection|schema')\n\t\tconfiguration.option('source').valueRequired().description('migrations|definition')\n\t\tconfiguration.option('role').valueArray()\n\t\tconfiguration.option('normalize').valueNone()\n\t\tconfiguration.option('omit-acl').valueNone()\n\t\tconfiguration.option('omit-validation').valueNone()\n\t\tconfiguration.option('omit-actions').valueNone()\n\t\tconfiguration.option('omit-settings').valueNone()\n\t}\n\n\tprotected async execute(input: Input<Args, Options>, output: Output): Promise<void> {\n\t\tconst format = input.getOption('format') || 'graphql'\n\n\t\tconst schema = input.getOption('source') === 'migrations'\n\t\t\t? await this.schemaVersionBuilder.buildSchema()\n\t\t\t: await this.schemaLoader.loadSchema()\n\n\t\tconst filteredSchema = {\n\t\t\tmodel: schema.model,\n\t\t\tacl: input.getOption('omit-acl') ? emptySchema.acl : schema.acl,\n\t\t\tvalidation: input.getOption('omit-validation') ? emptySchema.validation : schema.validation,\n\t\t\tactions: input.getOption('omit-actions') ? emptySchema.actions : schema.actions,\n\t\t\tsettings: input.getOption('omit-settings') ? emptySchema.settings : schema.settings,\n\t\t}\n\n\t\tif (!validateSchemaAndPrintErrors(filteredSchema, 'Defined schema is invalid:', undefined, output)) {\n\t\t\tthrow new CliError('Defined schema is invalid', { code: 'SCHEMA_INVALID', exitCode: ExitCode.InputError })\n\t\t}\n\n\t\tconst permissionFactory = new PermissionFactory()\n\t\tconst inputRoles = input.getOption('role')\n\t\tconst schemaNormalized = input.getOption('normalize') ? normalizeSchema(filteredSchema) : filteredSchema\n\t\tconst permissions = permissionFactory.
|
|
1
|
+
{"version":3,"file":"ProjectPrintSchemaCommand.cjs","sources":["../../../../../../packages/cli/src/commands/project/ProjectPrintSchemaCommand.ts"],"sourcesContent":["import { CliError, Command, CommandConfiguration, ExitCode, Input, Output } from '@contember/cli-common'\nimport {\n\tAuthorizator,\n\tEntityRulesResolver,\n\tGraphQlSchemaBuilderFactory,\n\tIntrospectionSchemaDefinitionFactory,\n\tIntrospectionSchemaFactory,\n\tPermissionFactory,\n} from '@contember/engine-content-api'\nimport { printSchema } from 'graphql'\nimport { mergeSchemas } from '@graphql-tools/schema'\nimport { emptySchema, normalizeSchema } from '@contember/schema-utils'\nimport { SchemaLoader } from '../../lib/schema/SchemaLoader.js'\nimport { SchemaVersionBuilder } from '@contember/migrations-client'\nimport { validateSchemaAndPrintErrors } from '../../lib/schema/SchemaValidationHelper.js'\n\ntype Args = {}\n\ntype Options = {\n\trole?: string[]\n\tnormalize?: boolean\n\tformat?: 'graphql' | 'introspection' | 'schema'\n\tsource?: 'migrations' | 'definition'\n\t['omit-acl']?: boolean\n\t['omit-validation']?: boolean\n\t['omit-actions']?: boolean\n\t['omit-settings']?: boolean\n}\n\nexport class ProjectPrintSchemaCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly schemaLoader: SchemaLoader,\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Prints project schema')\n\t\tconfiguration.option('format').valueRequired().description('graphql|introspection|schema')\n\t\tconfiguration.option('source').valueRequired().description('migrations|definition')\n\t\tconfiguration.option('role').valueArray()\n\t\tconfiguration.option('normalize').valueNone()\n\t\tconfiguration.option('omit-acl').valueNone()\n\t\tconfiguration.option('omit-validation').valueNone()\n\t\tconfiguration.option('omit-actions').valueNone()\n\t\tconfiguration.option('omit-settings').valueNone()\n\t}\n\n\tprotected async execute(input: Input<Args, Options>, output: Output): Promise<void> {\n\t\tconst format = input.getOption('format') || 'graphql'\n\n\t\tconst schema = input.getOption('source') === 'migrations'\n\t\t\t? await this.schemaVersionBuilder.buildSchema()\n\t\t\t: await this.schemaLoader.loadSchema()\n\n\t\tconst filteredSchema = {\n\t\t\tmodel: schema.model,\n\t\t\tacl: input.getOption('omit-acl') ? emptySchema.acl : schema.acl,\n\t\t\tvalidation: input.getOption('omit-validation') ? emptySchema.validation : schema.validation,\n\t\t\tactions: input.getOption('omit-actions') ? emptySchema.actions : schema.actions,\n\t\t\tsettings: input.getOption('omit-settings') ? emptySchema.settings : schema.settings,\n\t\t}\n\n\t\tif (!validateSchemaAndPrintErrors(filteredSchema, 'Defined schema is invalid:', undefined, output)) {\n\t\t\tthrow new CliError('Defined schema is invalid', { code: 'SCHEMA_INVALID', exitCode: ExitCode.InputError })\n\t\t}\n\n\t\tconst permissionFactory = new PermissionFactory()\n\t\tconst inputRoles = input.getOption('role')\n\t\tconst schemaNormalized = input.getOption('normalize') ? normalizeSchema(filteredSchema) : filteredSchema\n\t\t// Built the way the engine builds it: types and introspection from the nested set, root fields from the root set.\n\t\tconst { root: rootPermissions, all: permissions } = permissionFactory.createContextual(schemaNormalized, inputRoles || ['admin'])\n\t\tconst schemaBuilderFactory = new GraphQlSchemaBuilderFactory()\n\t\tconst customPrimary = schemaNormalized.acl.customPrimary ?? false\n\t\tconst refreshMaterializedView = Object.values(schemaNormalized.acl.roles).some(it => it.content?.refreshMaterializedView)\n\t\tconst authorizator = new Authorizator(permissions, customPrimary, refreshMaterializedView)\n\t\tconst rootAuthorizator = new Authorizator(rootPermissions, customPrimary, refreshMaterializedView)\n\t\tconst introspection = new IntrospectionSchemaFactory(\n\t\t\tschemaNormalized.model,\n\t\t\tnew EntityRulesResolver(schemaNormalized.validation, schemaNormalized.model),\n\t\t\tauthorizator,\n\t\t)\n\n\t\tif (format === 'schema') {\n\t\t\tif (inputRoles) {\n\t\t\t\tthrow new CliError('The --role option is not supported for the \"schema\" format', { code: 'UNSUPPORTED_OPTION', exitCode: ExitCode.InputError })\n\t\t\t}\n\t\t\t// human mode keeps the tab-indented rendering; --json is a single JSON.stringify of the same value, not a re-encoding of this string\n\t\t\toutput.data(schemaNormalized, {\n\t\t\t\thuman: value => JSON.stringify(value, null, '\\t'),\n\t\t\t\tquiet: value => JSON.stringify(value),\n\t\t\t})\n\t\t} else if (format === 'introspection') {\n\t\t\toutput.data(introspection.create(), {\n\t\t\t\thuman: value => JSON.stringify(value, null, '\\t'),\n\t\t\t\tquiet: value => JSON.stringify(value),\n\t\t\t})\n\t\t} else if (format === 'graphql') {\n\t\t\tconst contentSchema = schemaBuilderFactory.create(schemaNormalized.model, authorizator, rootAuthorizator).build()\n\t\t\tconst introspectionSchemaFactory = new IntrospectionSchemaDefinitionFactory(introspection)\n\t\t\tconst introspectionSchema = introspectionSchemaFactory.create()\n\t\t\tconst gqlSchema = mergeSchemas({\n\t\t\t\tschemas: [contentSchema, introspectionSchema],\n\t\t\t})\n\t\t\tgqlSchema.description = '' // this enforces schema definition print\n\t\t\tconst printedSchema = printSchema(gqlSchema).replace('\"\"\"\"\"\"\\n', '') // remove empty comment\n\t\t\toutput.data(printedSchema, {\n\t\t\t\thuman: value => value,\n\t\t\t\tquiet: value => value.split('\\n'),\n\t\t\t})\n\t\t} else {\n\t\t\tthrow new CliError(`Unknown schema format \"${format}\"`, { code: 'UNKNOWN_FORMAT', exitCode: ExitCode.InputError })\n\t\t}\n\t}\n}\n"],"names":["Command","schema","emptySchema","validateSchemaAndPrintErrors","CliError","ExitCode","PermissionFactory","normalizeSchema","GraphQlSchemaBuilderFactory","Authorizator","IntrospectionSchemaFactory","EntityRulesResolver","IntrospectionSchema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W,WAAW;AAChC,YAAM,gBAAgB,qBAAqB,OAAO,iBAAiB,OAAO,cAAc,gBAAgB,EAAE,MAAA;AAC1G,YAAM,6BAA6B,IAAIO,iBAAAA,qCAAqC,aAAa;AACzF,YAAM,sBAAsB,2BAA2B,OAAA;AACvD,YAAM,YAAYC,OAAAA,aAAa;AAAA,QAC9B,SAAS,CAAC,eAAe,mBAAmB;AAAA,MAAA,CAC5C;AACD,gBAAU,cAAc;AACxB,YAAM,gBAAgBC,QAAAA,YAAY,SAAS,EAAE,QAAQ,YAAY,EAAE;AACnE,aAAO,KAAK,eAAe;AAAA,QAC1B,OAAO,CAAA,UAAS;AAAA,QAChB,OAAO,CAAA,UAAS,MAAM,MAAM,IAAI;AAAA,MAAA,CAChC;AAAA,IACF,OAAO;AACN,YAAM,IAAIV,UAAAA,SAAS,0BAA0B,MAAM,KAAK,EAAE,MAAM,kBAAkB,UAAUC,UAAAA,SAAS,WAAA,CAAY;AAAA,IAClH;AAAA,EACD;AACD;;"}
|
|
@@ -37,13 +37,12 @@ class ProjectPrintSchemaCommand extends Command {
|
|
|
37
37
|
const permissionFactory = new PermissionFactory();
|
|
38
38
|
const inputRoles = input.getOption("role");
|
|
39
39
|
const schemaNormalized = input.getOption("normalize") ? normalizeSchema(filteredSchema) : filteredSchema;
|
|
40
|
-
const permissions = permissionFactory.
|
|
40
|
+
const { root: rootPermissions, all: permissions } = permissionFactory.createContextual(schemaNormalized, inputRoles || ["admin"]);
|
|
41
41
|
const schemaBuilderFactory = new GraphQlSchemaBuilderFactory();
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
);
|
|
42
|
+
const customPrimary = schemaNormalized.acl.customPrimary ?? false;
|
|
43
|
+
const refreshMaterializedView = Object.values(schemaNormalized.acl.roles).some((it) => it.content?.refreshMaterializedView);
|
|
44
|
+
const authorizator = new Authorizator(permissions, customPrimary, refreshMaterializedView);
|
|
45
|
+
const rootAuthorizator = new Authorizator(rootPermissions, customPrimary, refreshMaterializedView);
|
|
47
46
|
const introspection = new IntrospectionSchemaFactory(
|
|
48
47
|
schemaNormalized.model,
|
|
49
48
|
new EntityRulesResolver(schemaNormalized.validation, schemaNormalized.model),
|
|
@@ -63,7 +62,7 @@ class ProjectPrintSchemaCommand extends Command {
|
|
|
63
62
|
quiet: (value) => JSON.stringify(value)
|
|
64
63
|
});
|
|
65
64
|
} else if (format === "graphql") {
|
|
66
|
-
const contentSchema = schemaBuilderFactory.create(schemaNormalized.model, authorizator).build();
|
|
65
|
+
const contentSchema = schemaBuilderFactory.create(schemaNormalized.model, authorizator, rootAuthorizator).build();
|
|
67
66
|
const introspectionSchemaFactory = new IntrospectionSchemaDefinitionFactory(introspection);
|
|
68
67
|
const introspectionSchema = introspectionSchemaFactory.create();
|
|
69
68
|
const gqlSchema = mergeSchemas({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectPrintSchemaCommand.js","sources":["../../../../../../packages/cli/src/commands/project/ProjectPrintSchemaCommand.ts"],"sourcesContent":["import { CliError, Command, CommandConfiguration, ExitCode, Input, Output } from '@contember/cli-common'\nimport {\n\tAuthorizator,\n\tEntityRulesResolver,\n\tGraphQlSchemaBuilderFactory,\n\tIntrospectionSchemaDefinitionFactory,\n\tIntrospectionSchemaFactory,\n\tPermissionFactory,\n} from '@contember/engine-content-api'\nimport { printSchema } from 'graphql'\nimport { mergeSchemas } from '@graphql-tools/schema'\nimport { emptySchema, normalizeSchema } from '@contember/schema-utils'\nimport { SchemaLoader } from '../../lib/schema/SchemaLoader.js'\nimport { SchemaVersionBuilder } from '@contember/migrations-client'\nimport { validateSchemaAndPrintErrors } from '../../lib/schema/SchemaValidationHelper.js'\n\ntype Args = {}\n\ntype Options = {\n\trole?: string[]\n\tnormalize?: boolean\n\tformat?: 'graphql' | 'introspection' | 'schema'\n\tsource?: 'migrations' | 'definition'\n\t['omit-acl']?: boolean\n\t['omit-validation']?: boolean\n\t['omit-actions']?: boolean\n\t['omit-settings']?: boolean\n}\n\nexport class ProjectPrintSchemaCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly schemaLoader: SchemaLoader,\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Prints project schema')\n\t\tconfiguration.option('format').valueRequired().description('graphql|introspection|schema')\n\t\tconfiguration.option('source').valueRequired().description('migrations|definition')\n\t\tconfiguration.option('role').valueArray()\n\t\tconfiguration.option('normalize').valueNone()\n\t\tconfiguration.option('omit-acl').valueNone()\n\t\tconfiguration.option('omit-validation').valueNone()\n\t\tconfiguration.option('omit-actions').valueNone()\n\t\tconfiguration.option('omit-settings').valueNone()\n\t}\n\n\tprotected async execute(input: Input<Args, Options>, output: Output): Promise<void> {\n\t\tconst format = input.getOption('format') || 'graphql'\n\n\t\tconst schema = input.getOption('source') === 'migrations'\n\t\t\t? await this.schemaVersionBuilder.buildSchema()\n\t\t\t: await this.schemaLoader.loadSchema()\n\n\t\tconst filteredSchema = {\n\t\t\tmodel: schema.model,\n\t\t\tacl: input.getOption('omit-acl') ? emptySchema.acl : schema.acl,\n\t\t\tvalidation: input.getOption('omit-validation') ? emptySchema.validation : schema.validation,\n\t\t\tactions: input.getOption('omit-actions') ? emptySchema.actions : schema.actions,\n\t\t\tsettings: input.getOption('omit-settings') ? emptySchema.settings : schema.settings,\n\t\t}\n\n\t\tif (!validateSchemaAndPrintErrors(filteredSchema, 'Defined schema is invalid:', undefined, output)) {\n\t\t\tthrow new CliError('Defined schema is invalid', { code: 'SCHEMA_INVALID', exitCode: ExitCode.InputError })\n\t\t}\n\n\t\tconst permissionFactory = new PermissionFactory()\n\t\tconst inputRoles = input.getOption('role')\n\t\tconst schemaNormalized = input.getOption('normalize') ? normalizeSchema(filteredSchema) : filteredSchema\n\t\tconst permissions = permissionFactory.
|
|
1
|
+
{"version":3,"file":"ProjectPrintSchemaCommand.js","sources":["../../../../../../packages/cli/src/commands/project/ProjectPrintSchemaCommand.ts"],"sourcesContent":["import { CliError, Command, CommandConfiguration, ExitCode, Input, Output } from '@contember/cli-common'\nimport {\n\tAuthorizator,\n\tEntityRulesResolver,\n\tGraphQlSchemaBuilderFactory,\n\tIntrospectionSchemaDefinitionFactory,\n\tIntrospectionSchemaFactory,\n\tPermissionFactory,\n} from '@contember/engine-content-api'\nimport { printSchema } from 'graphql'\nimport { mergeSchemas } from '@graphql-tools/schema'\nimport { emptySchema, normalizeSchema } from '@contember/schema-utils'\nimport { SchemaLoader } from '../../lib/schema/SchemaLoader.js'\nimport { SchemaVersionBuilder } from '@contember/migrations-client'\nimport { validateSchemaAndPrintErrors } from '../../lib/schema/SchemaValidationHelper.js'\n\ntype Args = {}\n\ntype Options = {\n\trole?: string[]\n\tnormalize?: boolean\n\tformat?: 'graphql' | 'introspection' | 'schema'\n\tsource?: 'migrations' | 'definition'\n\t['omit-acl']?: boolean\n\t['omit-validation']?: boolean\n\t['omit-actions']?: boolean\n\t['omit-settings']?: boolean\n}\n\nexport class ProjectPrintSchemaCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly schemaLoader: SchemaLoader,\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Prints project schema')\n\t\tconfiguration.option('format').valueRequired().description('graphql|introspection|schema')\n\t\tconfiguration.option('source').valueRequired().description('migrations|definition')\n\t\tconfiguration.option('role').valueArray()\n\t\tconfiguration.option('normalize').valueNone()\n\t\tconfiguration.option('omit-acl').valueNone()\n\t\tconfiguration.option('omit-validation').valueNone()\n\t\tconfiguration.option('omit-actions').valueNone()\n\t\tconfiguration.option('omit-settings').valueNone()\n\t}\n\n\tprotected async execute(input: Input<Args, Options>, output: Output): Promise<void> {\n\t\tconst format = input.getOption('format') || 'graphql'\n\n\t\tconst schema = input.getOption('source') === 'migrations'\n\t\t\t? await this.schemaVersionBuilder.buildSchema()\n\t\t\t: await this.schemaLoader.loadSchema()\n\n\t\tconst filteredSchema = {\n\t\t\tmodel: schema.model,\n\t\t\tacl: input.getOption('omit-acl') ? emptySchema.acl : schema.acl,\n\t\t\tvalidation: input.getOption('omit-validation') ? emptySchema.validation : schema.validation,\n\t\t\tactions: input.getOption('omit-actions') ? emptySchema.actions : schema.actions,\n\t\t\tsettings: input.getOption('omit-settings') ? emptySchema.settings : schema.settings,\n\t\t}\n\n\t\tif (!validateSchemaAndPrintErrors(filteredSchema, 'Defined schema is invalid:', undefined, output)) {\n\t\t\tthrow new CliError('Defined schema is invalid', { code: 'SCHEMA_INVALID', exitCode: ExitCode.InputError })\n\t\t}\n\n\t\tconst permissionFactory = new PermissionFactory()\n\t\tconst inputRoles = input.getOption('role')\n\t\tconst schemaNormalized = input.getOption('normalize') ? normalizeSchema(filteredSchema) : filteredSchema\n\t\t// Built the way the engine builds it: types and introspection from the nested set, root fields from the root set.\n\t\tconst { root: rootPermissions, all: permissions } = permissionFactory.createContextual(schemaNormalized, inputRoles || ['admin'])\n\t\tconst schemaBuilderFactory = new GraphQlSchemaBuilderFactory()\n\t\tconst customPrimary = schemaNormalized.acl.customPrimary ?? false\n\t\tconst refreshMaterializedView = Object.values(schemaNormalized.acl.roles).some(it => it.content?.refreshMaterializedView)\n\t\tconst authorizator = new Authorizator(permissions, customPrimary, refreshMaterializedView)\n\t\tconst rootAuthorizator = new Authorizator(rootPermissions, customPrimary, refreshMaterializedView)\n\t\tconst introspection = new IntrospectionSchemaFactory(\n\t\t\tschemaNormalized.model,\n\t\t\tnew EntityRulesResolver(schemaNormalized.validation, schemaNormalized.model),\n\t\t\tauthorizator,\n\t\t)\n\n\t\tif (format === 'schema') {\n\t\t\tif (inputRoles) {\n\t\t\t\tthrow new CliError('The --role option is not supported for the \"schema\" format', { code: 'UNSUPPORTED_OPTION', exitCode: ExitCode.InputError })\n\t\t\t}\n\t\t\t// human mode keeps the tab-indented rendering; --json is a single JSON.stringify of the same value, not a re-encoding of this string\n\t\t\toutput.data(schemaNormalized, {\n\t\t\t\thuman: value => JSON.stringify(value, null, '\\t'),\n\t\t\t\tquiet: value => JSON.stringify(value),\n\t\t\t})\n\t\t} else if (format === 'introspection') {\n\t\t\toutput.data(introspection.create(), {\n\t\t\t\thuman: value => JSON.stringify(value, null, '\\t'),\n\t\t\t\tquiet: value => JSON.stringify(value),\n\t\t\t})\n\t\t} else if (format === 'graphql') {\n\t\t\tconst contentSchema = schemaBuilderFactory.create(schemaNormalized.model, authorizator, rootAuthorizator).build()\n\t\t\tconst introspectionSchemaFactory = new IntrospectionSchemaDefinitionFactory(introspection)\n\t\t\tconst introspectionSchema = introspectionSchemaFactory.create()\n\t\t\tconst gqlSchema = mergeSchemas({\n\t\t\t\tschemas: [contentSchema, introspectionSchema],\n\t\t\t})\n\t\t\tgqlSchema.description = '' // this enforces schema definition print\n\t\t\tconst printedSchema = printSchema(gqlSchema).replace('\"\"\"\"\"\"\\n', '') // remove empty comment\n\t\t\toutput.data(printedSchema, {\n\t\t\t\thuman: value => value,\n\t\t\t\tquiet: value => value.split('\\n'),\n\t\t\t})\n\t\t} else {\n\t\t\tthrow new CliError(`Unknown schema format \"${format}\"`, { code: 'UNKNOWN_FORMAT', exitCode: ExitCode.InputError })\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";;;;;;AA6BO,MAAM,kCAAkC,QAAuB;AAAA,EACrE,YACkB,cACA,sBAChB;AACD,UAAA;AAHiB,SAAA,eAAA;AACA,SAAA,uBAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,uBAAuB;AACjD,kBAAc,OAAO,QAAQ,EAAE,cAAA,EAAgB,YAAY,8BAA8B;AACzF,kBAAc,OAAO,QAAQ,EAAE,cAAA,EAAgB,YAAY,uBAAuB;AAClF,kBAAc,OAAO,MAAM,EAAE,WAAA;AAC7B,kBAAc,OA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AE,MAAM,kBAAkB,UAAU,SAAS,WAAA,CAAY;AAAA,IAClH;AAAA,EACD;AACD;"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxDevRuntime = require("react/jsx-dev-runtime");
|
|
4
4
|
const utils = require("./utils.cjs");
|
|
5
|
-
const SinglePermission = require("./SinglePermission.cjs");
|
|
6
5
|
const FieldType = require("./FieldType.cjs");
|
|
7
6
|
const FieldPermissions = require("./FieldPermissions.cjs");
|
|
8
7
|
const OnDelete = require("./OnDelete.cjs");
|
|
@@ -10,7 +9,7 @@ require("preact");
|
|
|
10
9
|
const EntityInfo = ({ entity, schema, references }) => /* @__PURE__ */ jsxDevRuntime.jsxDEV("div", { class: "m-4 border border-gray-400 rounded-lg group", id: utils.formatEntityAnchor(entity.name), children: [
|
|
11
10
|
/* @__PURE__ */ jsxDevRuntime.jsxDEV("div", { class: "font-bold text-gray-900 py-2 px-4 border-b border-gray-400 group-target:bg-yellow-100 rounded-t-lg", children: entity.name }, void 0, false, {
|
|
12
11
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
13
|
-
lineNumber:
|
|
12
|
+
lineNumber: 17,
|
|
14
13
|
columnNumber: 3
|
|
15
14
|
}, void 0),
|
|
16
15
|
/* @__PURE__ */ jsxDevRuntime.jsxDEV("div", { class: "px-2 py-2 flex flex-wrap ", children: [
|
|
@@ -18,12 +17,12 @@ const EntityInfo = ({ entity, schema, references }) => /* @__PURE__ */ jsxDevRun
|
|
|
18
17
|
/* @__PURE__ */ jsxDevRuntime.jsxDEV("thead", { children: /* @__PURE__ */ jsxDevRuntime.jsxDEV("tr", { children: [
|
|
19
18
|
/* @__PURE__ */ jsxDevRuntime.jsxDEV("th", { class: "text-left px-2 text-gray-500 font-normal w-[180px] max-w-[180px]", children: "Name" }, void 0, false, {
|
|
20
19
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
21
|
-
lineNumber:
|
|
20
|
+
lineNumber: 25,
|
|
22
21
|
columnNumber: 8
|
|
23
22
|
}, void 0),
|
|
24
23
|
/* @__PURE__ */ jsxDevRuntime.jsxDEV("th", { class: "text-left px-2 text-gray-500 font-normal w-[340px] max-w-[340px]", children: "Type" }, void 0, false, {
|
|
25
24
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
26
|
-
lineNumber:
|
|
25
|
+
lineNumber: 26,
|
|
27
26
|
columnNumber: 8
|
|
28
27
|
}, void 0),
|
|
29
28
|
Object.keys(schema.acl.roles).map((role) => /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
@@ -36,87 +35,87 @@ const EntityInfo = ({ entity, schema, references }) => /* @__PURE__ */ jsxDevRun
|
|
|
36
35
|
false,
|
|
37
36
|
{
|
|
38
37
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
39
|
-
lineNumber:
|
|
38
|
+
lineNumber: 28,
|
|
40
39
|
columnNumber: 9
|
|
41
40
|
},
|
|
42
41
|
void 0
|
|
43
42
|
))
|
|
44
43
|
] }, void 0, true, {
|
|
45
44
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
46
|
-
lineNumber:
|
|
45
|
+
lineNumber: 24,
|
|
47
46
|
columnNumber: 7
|
|
48
47
|
}, void 0) }, void 0, false, {
|
|
49
48
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
50
|
-
lineNumber:
|
|
49
|
+
lineNumber: 23,
|
|
51
50
|
columnNumber: 6
|
|
52
51
|
}, void 0),
|
|
53
52
|
/* @__PURE__ */ jsxDevRuntime.jsxDEV("tr", { children: [
|
|
54
53
|
/* @__PURE__ */ jsxDevRuntime.jsxDEV("td", {}, void 0, false, {
|
|
55
54
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
56
|
-
lineNumber:
|
|
55
|
+
lineNumber: 38,
|
|
57
56
|
columnNumber: 7
|
|
58
57
|
}, void 0),
|
|
59
58
|
/* @__PURE__ */ jsxDevRuntime.jsxDEV("td", {}, void 0, false, {
|
|
60
59
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
61
|
-
lineNumber:
|
|
60
|
+
lineNumber: 39,
|
|
62
61
|
columnNumber: 7
|
|
63
62
|
}, void 0),
|
|
64
|
-
Object.entries(schema.acl.roles).map(([name, role]) => /* @__PURE__ */ jsxDevRuntime.jsxDEV("td", { class: "px-2", children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
63
|
+
Object.entries(schema.acl.roles).map(([name, role]) => /* @__PURE__ */ jsxDevRuntime.jsxDEV("td", { class: "px-2", children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(FieldPermissions.DeletePermission, { entityPermissions: role.entities[entity.name] }, void 0, false, {
|
|
65
64
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
66
|
-
lineNumber:
|
|
65
|
+
lineNumber: 42,
|
|
67
66
|
columnNumber: 9
|
|
68
67
|
}, void 0) }, name, false, {
|
|
69
68
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
70
|
-
lineNumber:
|
|
69
|
+
lineNumber: 41,
|
|
71
70
|
columnNumber: 8
|
|
72
71
|
}, void 0))
|
|
73
72
|
] }, void 0, true, {
|
|
74
73
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
75
|
-
lineNumber:
|
|
74
|
+
lineNumber: 37,
|
|
76
75
|
columnNumber: 6
|
|
77
76
|
}, void 0),
|
|
78
77
|
Object.values(entity.fields).map((field) => /* @__PURE__ */ jsxDevRuntime.jsxDEV("tr", { class: "even:bg-gray-100 target:bg-yellow-100", id: utils.formatFieldAnchor(entity.name, field.name), children: [
|
|
79
78
|
/* @__PURE__ */ jsxDevRuntime.jsxDEV("td", { class: "px-2 font-mono truncate w-[180px] max-w-[180px]", title: field.name, children: field.name }, void 0, false, {
|
|
80
79
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
81
|
-
lineNumber:
|
|
80
|
+
lineNumber: 48,
|
|
82
81
|
columnNumber: 8
|
|
83
82
|
}, void 0),
|
|
84
83
|
/* @__PURE__ */ jsxDevRuntime.jsxDEV("td", { class: "text-gray-800 px-2 font-mono w-[420px] max-w-[420px]", children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(FieldType.FieldType, { field }, void 0, false, {
|
|
85
84
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
86
|
-
lineNumber:
|
|
85
|
+
lineNumber: 52,
|
|
87
86
|
columnNumber: 9
|
|
88
87
|
}, void 0) }, void 0, false, {
|
|
89
88
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
90
|
-
lineNumber:
|
|
89
|
+
lineNumber: 51,
|
|
91
90
|
columnNumber: 8
|
|
92
91
|
}, void 0),
|
|
93
92
|
Object.entries(schema.acl.roles).map(([name, role]) => /* @__PURE__ */ jsxDevRuntime.jsxDEV("td", { class: "px-2", children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(FieldPermissions.FieldPermissions, { field: field.name, entityPermissions: role.entities[entity.name] }, void 0, false, {
|
|
94
93
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
95
|
-
lineNumber:
|
|
94
|
+
lineNumber: 56,
|
|
96
95
|
columnNumber: 10
|
|
97
96
|
}, void 0) }, name, false, {
|
|
98
97
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
99
|
-
lineNumber:
|
|
98
|
+
lineNumber: 55,
|
|
100
99
|
columnNumber: 9
|
|
101
100
|
}, void 0))
|
|
102
101
|
] }, field.name, true, {
|
|
103
102
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
104
|
-
lineNumber:
|
|
103
|
+
lineNumber: 47,
|
|
105
104
|
columnNumber: 7
|
|
106
105
|
}, void 0))
|
|
107
106
|
] }, void 0, true, {
|
|
108
107
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
109
|
-
lineNumber:
|
|
108
|
+
lineNumber: 22,
|
|
110
109
|
columnNumber: 5
|
|
111
110
|
}, void 0) }, void 0, false, {
|
|
112
111
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
113
|
-
lineNumber:
|
|
112
|
+
lineNumber: 21,
|
|
114
113
|
columnNumber: 4
|
|
115
114
|
}, void 0),
|
|
116
115
|
/* @__PURE__ */ jsxDevRuntime.jsxDEV("div", { class: "px-2 py-2 w-1/2", children: [
|
|
117
116
|
/* @__PURE__ */ jsxDevRuntime.jsxDEV("h3", { class: "text-lg text-gray-600", children: "On delete behaviour:" }, void 0, false, {
|
|
118
117
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
119
|
-
lineNumber:
|
|
118
|
+
lineNumber: 64,
|
|
120
119
|
columnNumber: 5
|
|
121
120
|
}, void 0),
|
|
122
121
|
/* @__PURE__ */ jsxDevRuntime.jsxDEV("p", { class: "text-gray-500 text-sm", children: [
|
|
@@ -125,32 +124,32 @@ const EntityInfo = ({ entity, schema, references }) => /* @__PURE__ */ jsxDevRun
|
|
|
125
124
|
")"
|
|
126
125
|
] }, void 0, true, {
|
|
127
126
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
128
|
-
lineNumber:
|
|
127
|
+
lineNumber: 65,
|
|
129
128
|
columnNumber: 5
|
|
130
129
|
}, void 0),
|
|
131
130
|
/* @__PURE__ */ jsxDevRuntime.jsxDEV("div", { class: "mt-2 text-sm ", children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(OnDelete.OnDelete, { references, entity }, void 0, false, {
|
|
132
131
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
133
|
-
lineNumber:
|
|
132
|
+
lineNumber: 69,
|
|
134
133
|
columnNumber: 6
|
|
135
134
|
}, void 0) }, void 0, false, {
|
|
136
135
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
137
|
-
lineNumber:
|
|
136
|
+
lineNumber: 68,
|
|
138
137
|
columnNumber: 5
|
|
139
138
|
}, void 0)
|
|
140
139
|
] }, void 0, true, {
|
|
141
140
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
142
|
-
lineNumber:
|
|
141
|
+
lineNumber: 63,
|
|
143
142
|
columnNumber: 4
|
|
144
143
|
}, void 0),
|
|
145
144
|
false
|
|
146
145
|
] }, void 0, true, {
|
|
147
146
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
148
|
-
lineNumber:
|
|
147
|
+
lineNumber: 20,
|
|
149
148
|
columnNumber: 3
|
|
150
149
|
}, void 0)
|
|
151
150
|
] }, void 0, true, {
|
|
152
151
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
153
|
-
lineNumber:
|
|
152
|
+
lineNumber: 16,
|
|
154
153
|
columnNumber: 2
|
|
155
154
|
}, void 0);
|
|
156
155
|
exports.EntityInfo = EntityInfo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityInfo.cjs","sources":["../../../../../../../../packages/cli/src/lib/project/docs/components/EntityInfo.tsx"],"sourcesContent":["import { Model, Schema } from '@contember/schema'\nimport { ReferencesMap } from '../../../schema/collectReferences.js'\nimport { formatEntityAnchor, formatFieldAnchor } from './utils.js'\nimport {
|
|
1
|
+
{"version":3,"file":"EntityInfo.cjs","sources":["../../../../../../../../packages/cli/src/lib/project/docs/components/EntityInfo.tsx"],"sourcesContent":["import { Model, Schema } from '@contember/schema'\nimport { ReferencesMap } from '../../../schema/collectReferences.js'\nimport { formatEntityAnchor, formatFieldAnchor } from './utils.js'\nimport { FieldType } from './FieldType.js'\nimport { DeletePermission, FieldPermissions } from './FieldPermissions.js'\nimport { OnDelete } from './OnDelete.js'\nimport { Fragment, h } from 'preact'\n\ninterface EntityInfoProps {\n\tentity: Model.Entity\n\tschema: Schema\n\treferences: ReferencesMap\n}\n\nexport const EntityInfo = ({ entity, schema, references }: EntityInfoProps) => (\n\t<div class={'m-4 border border-gray-400 rounded-lg group'} id={formatEntityAnchor(entity.name)}>\n\t\t<div class={'font-bold text-gray-900 py-2 px-4 border-b border-gray-400 group-target:bg-yellow-100 rounded-t-lg'}>\n\t\t\t{entity.name}\n\t\t</div>\n\t\t<div class={'px-2 py-2 flex flex-wrap '}>\n\t\t\t<div>\n\t\t\t\t<table>\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th class={'text-left px-2 text-gray-500 font-normal w-[180px] max-w-[180px]'}>Name</th>\n\t\t\t\t\t\t\t<th class={'text-left px-2 text-gray-500 font-normal w-[340px] max-w-[340px]'}>Type</th>\n\t\t\t\t\t\t\t{Object.keys(schema.acl.roles).map(role => (\n\t\t\t\t\t\t\t\t<th\n\t\t\t\t\t\t\t\t\tkey={role}\n\t\t\t\t\t\t\t\t\tclass={'text-left px-2 text-gray-500 font-normal w-[120px] max-w-[120px] text-xs truncate text-sm'}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{role}\n\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t{Object.entries(schema.acl.roles).map(([name, role]) => (\n\t\t\t\t\t\t\t<td class={'px-2'} key={name}>\n\t\t\t\t\t\t\t\t<DeletePermission entityPermissions={role.entities[entity.name]} />\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</tr>\n\t\t\t\t\t{Object.values(entity.fields).map(field => (\n\t\t\t\t\t\t<tr class={'even:bg-gray-100 target:bg-yellow-100'} id={formatFieldAnchor(entity.name, field.name)} key={field.name}>\n\t\t\t\t\t\t\t<td class={'px-2 font-mono truncate w-[180px] max-w-[180px]'} title={field.name}>\n\t\t\t\t\t\t\t\t{field.name}\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class={'text-gray-800 px-2 font-mono w-[420px] max-w-[420px]'}>\n\t\t\t\t\t\t\t\t<FieldType field={field} />\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t{Object.entries(schema.acl.roles).map(([name, role]) => (\n\t\t\t\t\t\t\t\t<td class={'px-2'} key={name}>\n\t\t\t\t\t\t\t\t\t<FieldPermissions field={field.name} entityPermissions={role.entities[entity.name]} />\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t))}\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t\t<div class={'px-2 py-2 w-1/2'}>\n\t\t\t\t<h3 class={'text-lg text-gray-600'}>On delete behaviour:</h3>\n\t\t\t\t<p class={'text-gray-500 text-sm'}>\n\t\t\t\t\t(What happens when you attempt to delete entity {entity.name})\n\t\t\t\t</p>\n\t\t\t\t<div class={'mt-2 text-sm '}>\n\t\t\t\t\t<OnDelete references={references} entity={entity} />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{false && (\n\t\t\t\t<div class={'px-2 py-2 w-1/2'}>\n\t\t\t\t\t<h3 class={'text-lg text-gray-600'}>ACL predicates:</h3>\n\t\t\t\t\t<div class={'mt-2 text-sm '}>\n\t\t\t\t\t\t{Object.entries(schema.acl.roles).map(([roleName, role]) =>\n\t\t\t\t\t\t\tObject.entries(role.entities[entity.name]?.predicates ?? {}).map(([predicateName, predicate]) => (\n\t\t\t\t\t\t\t\t<Fragment key={roleName + '__' + predicateName}>\n\t\t\t\t\t\t\t\t\t<h4>{roleName}: {predicateName}</h4>\n\t\t\t\t\t\t\t\t\t<code>{JSON.stringify(predicate)}</code>\n\t\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t</div>\n)\n"],"names":["jsxDEV","formatEntityAnchor","this","DeletePermission","formatFieldAnchor","FieldType","FieldPermissions","OnDelete"],"mappings":";;;;;;;;AAcO,MAAM,aAAa,CAAC,EAAE,QAAQ,QAAQ,WAAA,MAC5CA,8BAAAA,OAAC,OAAA,EAAI,OAAO,+CAA+C,IAAIC,MAAAA,mBAAmB,OAAO,IAAI,GAC5F,UAAA;AAAA,EAAAD,qCAAC,OAAA,EAAI,OAAO,sGACV,UAAA,OAAO,KAAA,GADT,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAAE,MAEA;AAAA,EACAF,8BAAAA,OAAC,OAAA,EAAI,OAAO,6BACX,UAAA;AAAA,IAAAA,8BAAAA,OAAC,OAAA,EACA,+CAAC,SAAA,EACA,UAAA;AAAA,MAAAA,8BAAAA,OAAC,SAAA,EACA,+CAAC,MAAA,EACA,UAAA;AAAA,QAAAA,qCAAC,MAAA,EAAG,OAAO,oEAAoE,UAAA,OAAA,GAA/E,QAAA,OAAA;AAAA,UAAA,UAAA;AAAA,UAAA,YAAA;AAAA,UAA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AA,IACC;AAAA,EAAA,EAAA,GApDF,QAAA,MAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAAA,MAmEA;AAAA,EAAA,GAvED,QAAA,MAAA;AAAA,EAAA,UAAA;AAAA,EAAA,YAAA;AAAA,EAAA,cAAA;AAAA,GAAAA,MAwEA;;"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
2
2
|
import { formatFieldAnchor, formatEntityAnchor } from "./utils.js";
|
|
3
|
-
import { SinglePermission } from "./SinglePermission.js";
|
|
4
3
|
import { FieldType } from "./FieldType.js";
|
|
5
|
-
import { FieldPermissions } from "./FieldPermissions.js";
|
|
4
|
+
import { DeletePermission, FieldPermissions } from "./FieldPermissions.js";
|
|
6
5
|
import { OnDelete } from "./OnDelete.js";
|
|
7
6
|
import "preact";
|
|
8
7
|
const EntityInfo = ({ entity, schema, references }) => /* @__PURE__ */ jsxDEV("div", { class: "m-4 border border-gray-400 rounded-lg group", id: formatEntityAnchor(entity.name), children: [
|
|
9
8
|
/* @__PURE__ */ jsxDEV("div", { class: "font-bold text-gray-900 py-2 px-4 border-b border-gray-400 group-target:bg-yellow-100 rounded-t-lg", children: entity.name }, void 0, false, {
|
|
10
9
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
11
|
-
lineNumber:
|
|
10
|
+
lineNumber: 17,
|
|
12
11
|
columnNumber: 3
|
|
13
12
|
}, void 0),
|
|
14
13
|
/* @__PURE__ */ jsxDEV("div", { class: "px-2 py-2 flex flex-wrap ", children: [
|
|
@@ -16,12 +15,12 @@ const EntityInfo = ({ entity, schema, references }) => /* @__PURE__ */ jsxDEV("d
|
|
|
16
15
|
/* @__PURE__ */ jsxDEV("thead", { children: /* @__PURE__ */ jsxDEV("tr", { children: [
|
|
17
16
|
/* @__PURE__ */ jsxDEV("th", { class: "text-left px-2 text-gray-500 font-normal w-[180px] max-w-[180px]", children: "Name" }, void 0, false, {
|
|
18
17
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
19
|
-
lineNumber:
|
|
18
|
+
lineNumber: 25,
|
|
20
19
|
columnNumber: 8
|
|
21
20
|
}, void 0),
|
|
22
21
|
/* @__PURE__ */ jsxDEV("th", { class: "text-left px-2 text-gray-500 font-normal w-[340px] max-w-[340px]", children: "Type" }, void 0, false, {
|
|
23
22
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
24
|
-
lineNumber:
|
|
23
|
+
lineNumber: 26,
|
|
25
24
|
columnNumber: 8
|
|
26
25
|
}, void 0),
|
|
27
26
|
Object.keys(schema.acl.roles).map((role) => /* @__PURE__ */ jsxDEV(
|
|
@@ -34,87 +33,87 @@ const EntityInfo = ({ entity, schema, references }) => /* @__PURE__ */ jsxDEV("d
|
|
|
34
33
|
false,
|
|
35
34
|
{
|
|
36
35
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
37
|
-
lineNumber:
|
|
36
|
+
lineNumber: 28,
|
|
38
37
|
columnNumber: 9
|
|
39
38
|
},
|
|
40
39
|
void 0
|
|
41
40
|
))
|
|
42
41
|
] }, void 0, true, {
|
|
43
42
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
44
|
-
lineNumber:
|
|
43
|
+
lineNumber: 24,
|
|
45
44
|
columnNumber: 7
|
|
46
45
|
}, void 0) }, void 0, false, {
|
|
47
46
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
48
|
-
lineNumber:
|
|
47
|
+
lineNumber: 23,
|
|
49
48
|
columnNumber: 6
|
|
50
49
|
}, void 0),
|
|
51
50
|
/* @__PURE__ */ jsxDEV("tr", { children: [
|
|
52
51
|
/* @__PURE__ */ jsxDEV("td", {}, void 0, false, {
|
|
53
52
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
54
|
-
lineNumber:
|
|
53
|
+
lineNumber: 38,
|
|
55
54
|
columnNumber: 7
|
|
56
55
|
}, void 0),
|
|
57
56
|
/* @__PURE__ */ jsxDEV("td", {}, void 0, false, {
|
|
58
57
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
59
|
-
lineNumber:
|
|
58
|
+
lineNumber: 39,
|
|
60
59
|
columnNumber: 7
|
|
61
60
|
}, void 0),
|
|
62
|
-
Object.entries(schema.acl.roles).map(([name, role]) => /* @__PURE__ */ jsxDEV("td", { class: "px-2", children: /* @__PURE__ */ jsxDEV(
|
|
61
|
+
Object.entries(schema.acl.roles).map(([name, role]) => /* @__PURE__ */ jsxDEV("td", { class: "px-2", children: /* @__PURE__ */ jsxDEV(DeletePermission, { entityPermissions: role.entities[entity.name] }, void 0, false, {
|
|
63
62
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
64
|
-
lineNumber:
|
|
63
|
+
lineNumber: 42,
|
|
65
64
|
columnNumber: 9
|
|
66
65
|
}, void 0) }, name, false, {
|
|
67
66
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
68
|
-
lineNumber:
|
|
67
|
+
lineNumber: 41,
|
|
69
68
|
columnNumber: 8
|
|
70
69
|
}, void 0))
|
|
71
70
|
] }, void 0, true, {
|
|
72
71
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
73
|
-
lineNumber:
|
|
72
|
+
lineNumber: 37,
|
|
74
73
|
columnNumber: 6
|
|
75
74
|
}, void 0),
|
|
76
75
|
Object.values(entity.fields).map((field) => /* @__PURE__ */ jsxDEV("tr", { class: "even:bg-gray-100 target:bg-yellow-100", id: formatFieldAnchor(entity.name, field.name), children: [
|
|
77
76
|
/* @__PURE__ */ jsxDEV("td", { class: "px-2 font-mono truncate w-[180px] max-w-[180px]", title: field.name, children: field.name }, void 0, false, {
|
|
78
77
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
79
|
-
lineNumber:
|
|
78
|
+
lineNumber: 48,
|
|
80
79
|
columnNumber: 8
|
|
81
80
|
}, void 0),
|
|
82
81
|
/* @__PURE__ */ jsxDEV("td", { class: "text-gray-800 px-2 font-mono w-[420px] max-w-[420px]", children: /* @__PURE__ */ jsxDEV(FieldType, { field }, void 0, false, {
|
|
83
82
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
84
|
-
lineNumber:
|
|
83
|
+
lineNumber: 52,
|
|
85
84
|
columnNumber: 9
|
|
86
85
|
}, void 0) }, void 0, false, {
|
|
87
86
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
88
|
-
lineNumber:
|
|
87
|
+
lineNumber: 51,
|
|
89
88
|
columnNumber: 8
|
|
90
89
|
}, void 0),
|
|
91
90
|
Object.entries(schema.acl.roles).map(([name, role]) => /* @__PURE__ */ jsxDEV("td", { class: "px-2", children: /* @__PURE__ */ jsxDEV(FieldPermissions, { field: field.name, entityPermissions: role.entities[entity.name] }, void 0, false, {
|
|
92
91
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
93
|
-
lineNumber:
|
|
92
|
+
lineNumber: 56,
|
|
94
93
|
columnNumber: 10
|
|
95
94
|
}, void 0) }, name, false, {
|
|
96
95
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
97
|
-
lineNumber:
|
|
96
|
+
lineNumber: 55,
|
|
98
97
|
columnNumber: 9
|
|
99
98
|
}, void 0))
|
|
100
99
|
] }, field.name, true, {
|
|
101
100
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
102
|
-
lineNumber:
|
|
101
|
+
lineNumber: 47,
|
|
103
102
|
columnNumber: 7
|
|
104
103
|
}, void 0))
|
|
105
104
|
] }, void 0, true, {
|
|
106
105
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
107
|
-
lineNumber:
|
|
106
|
+
lineNumber: 22,
|
|
108
107
|
columnNumber: 5
|
|
109
108
|
}, void 0) }, void 0, false, {
|
|
110
109
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
111
|
-
lineNumber:
|
|
110
|
+
lineNumber: 21,
|
|
112
111
|
columnNumber: 4
|
|
113
112
|
}, void 0),
|
|
114
113
|
/* @__PURE__ */ jsxDEV("div", { class: "px-2 py-2 w-1/2", children: [
|
|
115
114
|
/* @__PURE__ */ jsxDEV("h3", { class: "text-lg text-gray-600", children: "On delete behaviour:" }, void 0, false, {
|
|
116
115
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
117
|
-
lineNumber:
|
|
116
|
+
lineNumber: 64,
|
|
118
117
|
columnNumber: 5
|
|
119
118
|
}, void 0),
|
|
120
119
|
/* @__PURE__ */ jsxDEV("p", { class: "text-gray-500 text-sm", children: [
|
|
@@ -123,32 +122,32 @@ const EntityInfo = ({ entity, schema, references }) => /* @__PURE__ */ jsxDEV("d
|
|
|
123
122
|
")"
|
|
124
123
|
] }, void 0, true, {
|
|
125
124
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
126
|
-
lineNumber:
|
|
125
|
+
lineNumber: 65,
|
|
127
126
|
columnNumber: 5
|
|
128
127
|
}, void 0),
|
|
129
128
|
/* @__PURE__ */ jsxDEV("div", { class: "mt-2 text-sm ", children: /* @__PURE__ */ jsxDEV(OnDelete, { references, entity }, void 0, false, {
|
|
130
129
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
131
|
-
lineNumber:
|
|
130
|
+
lineNumber: 69,
|
|
132
131
|
columnNumber: 6
|
|
133
132
|
}, void 0) }, void 0, false, {
|
|
134
133
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
135
|
-
lineNumber:
|
|
134
|
+
lineNumber: 68,
|
|
136
135
|
columnNumber: 5
|
|
137
136
|
}, void 0)
|
|
138
137
|
] }, void 0, true, {
|
|
139
138
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
140
|
-
lineNumber:
|
|
139
|
+
lineNumber: 63,
|
|
141
140
|
columnNumber: 4
|
|
142
141
|
}, void 0),
|
|
143
142
|
false
|
|
144
143
|
] }, void 0, true, {
|
|
145
144
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
146
|
-
lineNumber:
|
|
145
|
+
lineNumber: 20,
|
|
147
146
|
columnNumber: 3
|
|
148
147
|
}, void 0)
|
|
149
148
|
] }, void 0, true, {
|
|
150
149
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
151
|
-
lineNumber:
|
|
150
|
+
lineNumber: 16,
|
|
152
151
|
columnNumber: 2
|
|
153
152
|
}, void 0);
|
|
154
153
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityInfo.js","sources":["../../../../../../../../packages/cli/src/lib/project/docs/components/EntityInfo.tsx"],"sourcesContent":["import { Model, Schema } from '@contember/schema'\nimport { ReferencesMap } from '../../../schema/collectReferences.js'\nimport { formatEntityAnchor, formatFieldAnchor } from './utils.js'\nimport {
|
|
1
|
+
{"version":3,"file":"EntityInfo.js","sources":["../../../../../../../../packages/cli/src/lib/project/docs/components/EntityInfo.tsx"],"sourcesContent":["import { Model, Schema } from '@contember/schema'\nimport { ReferencesMap } from '../../../schema/collectReferences.js'\nimport { formatEntityAnchor, formatFieldAnchor } from './utils.js'\nimport { FieldType } from './FieldType.js'\nimport { DeletePermission, FieldPermissions } from './FieldPermissions.js'\nimport { OnDelete } from './OnDelete.js'\nimport { Fragment, h } from 'preact'\n\ninterface EntityInfoProps {\n\tentity: Model.Entity\n\tschema: Schema\n\treferences: ReferencesMap\n}\n\nexport const EntityInfo = ({ entity, schema, references }: EntityInfoProps) => (\n\t<div class={'m-4 border border-gray-400 rounded-lg group'} id={formatEntityAnchor(entity.name)}>\n\t\t<div class={'font-bold text-gray-900 py-2 px-4 border-b border-gray-400 group-target:bg-yellow-100 rounded-t-lg'}>\n\t\t\t{entity.name}\n\t\t</div>\n\t\t<div class={'px-2 py-2 flex flex-wrap '}>\n\t\t\t<div>\n\t\t\t\t<table>\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th class={'text-left px-2 text-gray-500 font-normal w-[180px] max-w-[180px]'}>Name</th>\n\t\t\t\t\t\t\t<th class={'text-left px-2 text-gray-500 font-normal w-[340px] max-w-[340px]'}>Type</th>\n\t\t\t\t\t\t\t{Object.keys(schema.acl.roles).map(role => (\n\t\t\t\t\t\t\t\t<th\n\t\t\t\t\t\t\t\t\tkey={role}\n\t\t\t\t\t\t\t\t\tclass={'text-left px-2 text-gray-500 font-normal w-[120px] max-w-[120px] text-xs truncate text-sm'}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{role}\n\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t{Object.entries(schema.acl.roles).map(([name, role]) => (\n\t\t\t\t\t\t\t<td class={'px-2'} key={name}>\n\t\t\t\t\t\t\t\t<DeletePermission entityPermissions={role.entities[entity.name]} />\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</tr>\n\t\t\t\t\t{Object.values(entity.fields).map(field => (\n\t\t\t\t\t\t<tr class={'even:bg-gray-100 target:bg-yellow-100'} id={formatFieldAnchor(entity.name, field.name)} key={field.name}>\n\t\t\t\t\t\t\t<td class={'px-2 font-mono truncate w-[180px] max-w-[180px]'} title={field.name}>\n\t\t\t\t\t\t\t\t{field.name}\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class={'text-gray-800 px-2 font-mono w-[420px] max-w-[420px]'}>\n\t\t\t\t\t\t\t\t<FieldType field={field} />\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t{Object.entries(schema.acl.roles).map(([name, role]) => (\n\t\t\t\t\t\t\t\t<td class={'px-2'} key={name}>\n\t\t\t\t\t\t\t\t\t<FieldPermissions field={field.name} entityPermissions={role.entities[entity.name]} />\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t))}\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t\t<div class={'px-2 py-2 w-1/2'}>\n\t\t\t\t<h3 class={'text-lg text-gray-600'}>On delete behaviour:</h3>\n\t\t\t\t<p class={'text-gray-500 text-sm'}>\n\t\t\t\t\t(What happens when you attempt to delete entity {entity.name})\n\t\t\t\t</p>\n\t\t\t\t<div class={'mt-2 text-sm '}>\n\t\t\t\t\t<OnDelete references={references} entity={entity} />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{false && (\n\t\t\t\t<div class={'px-2 py-2 w-1/2'}>\n\t\t\t\t\t<h3 class={'text-lg text-gray-600'}>ACL predicates:</h3>\n\t\t\t\t\t<div class={'mt-2 text-sm '}>\n\t\t\t\t\t\t{Object.entries(schema.acl.roles).map(([roleName, role]) =>\n\t\t\t\t\t\t\tObject.entries(role.entities[entity.name]?.predicates ?? {}).map(([predicateName, predicate]) => (\n\t\t\t\t\t\t\t\t<Fragment key={roleName + '__' + predicateName}>\n\t\t\t\t\t\t\t\t\t<h4>{roleName}: {predicateName}</h4>\n\t\t\t\t\t\t\t\t\t<code>{JSON.stringify(predicate)}</code>\n\t\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t</div>\n)\n"],"names":["this"],"mappings":";;;;;;AAcO,MAAM,aAAa,CAAC,EAAE,QAAQ,QAAQ,WAAA,MAC5C,uBAAC,OAAA,EAAI,OAAO,+CAA+C,IAAI,mBAAmB,OAAO,IAAI,GAC5F,UAAA;AAAA,EAAA,uBAAC,OAAA,EAAI,OAAO,sGACV,UAAA,OAAO,KAAA,GADT,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAAA,MAEA;AAAA,EACA,uBAAC,OAAA,EAAI,OAAO,6BACX,UAAA;AAAA,IAAA,uBAAC,OAAA,EACA,iCAAC,SAAA,EACA,UAAA;AAAA,MAAA,uBAAC,SAAA,EACA,iCAAC,MAAA,EACA,UAAA;AAAA,QAAA,uBAAC,MAAA,EAAG,OAAO,oEAAoE,UAAA,OAAA,GAA/E,QAAA,OAAA;AAAA,UAAA,UAAA;AAAA,UAAA,YAAA;AAAA,UAAA,cAAA;AAAA,QAAA,GAAAA,MAAmF;AAAA,QACnF,uBAAC,MAAA,EAAG,OAAO,oEAAoE,UAAA,OAAA,GAA/E,QAAA,OAAA;AAAA,UAAA,UAAA;AAAA,UAAA,YAAA;AAAA,UAAA,cAAA;AAAA,QAAA,GAAAA,MAAmF;AAAA,QAClF,OAAO,KAAK,OAAO,IAAI,KAAK,EAAE,IAAI,CAAA,SAClC;AAAA,UAAC;AAAA,UAAA;AAAA,YAEA,OAAO;AAAA,YAEN,UAAA;AAAA,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