@contember/cli 2.1.0-alpha.30 → 2.1.0-alpha.36
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/run.cjs.map +1 -1
- package/dist/development/run.js.map +1 -1
- package/dist/development/src/commands/actions/ActionsGetEventCommand.cjs.map +1 -1
- package/dist/development/src/commands/actions/ActionsGetEventCommand.js.map +1 -1
- package/dist/development/src/commands/actions/ActionsListFailedEventsCommand.cjs.map +1 -1
- package/dist/development/src/commands/actions/ActionsListFailedEventsCommand.js.map +1 -1
- package/dist/development/src/commands/actions/ActionsListVariablesCommand.cjs.map +1 -1
- package/dist/development/src/commands/actions/ActionsListVariablesCommand.js.map +1 -1
- package/dist/development/src/commands/actions/ActionsRetryEventCommand.cjs.map +1 -1
- package/dist/development/src/commands/actions/ActionsRetryEventCommand.js.map +1 -1
- package/dist/development/src/commands/actions/ActionsSetVariablesCommand.cjs +7 -4
- package/dist/development/src/commands/actions/ActionsSetVariablesCommand.cjs.map +1 -1
- package/dist/development/src/commands/actions/ActionsSetVariablesCommand.js +7 -4
- package/dist/development/src/commands/actions/ActionsSetVariablesCommand.js.map +1 -1
- package/dist/development/src/commands/actions/ActionsStopEventCommand.cjs.map +1 -1
- package/dist/development/src/commands/actions/ActionsStopEventCommand.js.map +1 -1
- package/dist/development/src/commands/deploy/DeployCommand.cjs.map +1 -1
- package/dist/development/src/commands/deploy/DeployCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationAmendCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationAmendCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationBlankCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationBlankCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationDescribeCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationDescribeCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationDiffCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationDiffCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationExecuteCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationExecuteCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationRebaseCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationRebaseCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationStatusCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationStatusCommand.js.map +1 -1
- package/dist/development/src/commands/misc/VersionCommand.cjs.map +1 -1
- package/dist/development/src/commands/misc/VersionCommand.js.map +1 -1
- package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.cjs.map +1 -1
- package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.js.map +1 -1
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -1
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -1
- package/dist/development/src/commands/project/ProjectValidateCommand.cjs.map +1 -1
- package/dist/development/src/commands/project/ProjectValidateCommand.js.map +1 -1
- package/dist/development/src/commands/transfer/ExportCommand.cjs.map +1 -1
- package/dist/development/src/commands/transfer/ExportCommand.js.map +1 -1
- package/dist/development/src/commands/transfer/ImportCommand.cjs.map +1 -1
- package/dist/development/src/commands/transfer/ImportCommand.js.map +1 -1
- package/dist/development/src/commands/transfer/TransferCommand.cjs.map +1 -1
- package/dist/development/src/commands/transfer/TransferCommand.js.map +1 -1
- package/dist/development/src/commands/transfer/utils.cjs.map +1 -1
- package/dist/development/src/commands/transfer/utils.js.map +1 -1
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.cjs +16 -14
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.cjs.map +1 -1
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.js +16 -14
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +1 -1
- package/dist/development/src/consts.cjs.map +1 -1
- package/dist/development/src/dic.cjs +87 -3
- package/dist/development/src/dic.cjs.map +1 -1
- package/dist/development/src/dic.js +88 -4
- package/dist/development/src/dic.js.map +1 -1
- package/dist/development/src/lib/SystemClientProvider.cjs.map +1 -1
- package/dist/development/src/lib/SystemClientProvider.js.map +1 -1
- package/dist/development/src/lib/TenantClientProvider.cjs.map +1 -1
- package/dist/development/src/lib/TenantClientProvider.js.map +1 -1
- package/dist/development/src/lib/VersionChecker.cjs.map +1 -1
- package/dist/development/src/lib/VersionChecker.js.map +1 -1
- package/dist/development/src/lib/actions/ActionsClient.cjs.map +1 -1
- package/dist/development/src/lib/actions/ActionsClient.js.map +1 -1
- package/dist/development/src/lib/admin/AdminClient.cjs.map +1 -1
- package/dist/development/src/lib/admin/AdminClient.js.map +1 -1
- package/dist/development/src/lib/admin/AdminDeployer.cjs.map +1 -1
- package/dist/development/src/lib/admin/AdminDeployer.js.map +1 -1
- package/dist/development/src/lib/assertNever.cjs.map +1 -1
- package/dist/development/src/lib/assertNever.js.map +1 -1
- package/dist/development/src/lib/dsn.cjs.map +1 -1
- package/dist/development/src/lib/dsn.js.map +1 -1
- package/dist/development/src/lib/env.cjs.map +1 -1
- package/dist/development/src/lib/env.js.map +1 -1
- package/dist/development/src/lib/fs/DockerComposeManager.cjs.map +1 -1
- package/dist/development/src/lib/fs/DockerComposeManager.js.map +1 -1
- package/dist/development/src/lib/fs/FileSystem.cjs.map +1 -1
- package/dist/development/src/lib/fs/FileSystem.js.map +1 -1
- package/dist/development/src/lib/fs/YamlHandler.cjs.map +1 -1
- package/dist/development/src/lib/fs/YamlHandler.js.map +1 -1
- package/dist/development/src/lib/js/EsBuildBuilder.cjs.map +1 -1
- package/dist/development/src/lib/js/EsBuildBuilder.js.map +1 -1
- package/dist/development/src/lib/js/EvalExecutor.cjs.map +1 -1
- package/dist/development/src/lib/js/EvalExecutor.js.map +1 -1
- package/dist/development/src/lib/js/JsCodeRunner.cjs.map +1 -1
- package/dist/development/src/lib/js/JsCodeRunner.js.map +1 -1
- package/dist/development/src/lib/migrations/MigrationExecutionFacade.cjs.map +1 -1
- package/dist/development/src/lib/migrations/MigrationExecutionFacade.js.map +1 -1
- package/dist/development/src/lib/migrations/MigrationPrinter.cjs.map +1 -1
- package/dist/development/src/lib/migrations/MigrationPrinter.js.map +1 -1
- package/dist/development/src/lib/migrations/MigrationRebaseFacade.cjs.map +1 -1
- package/dist/development/src/lib/migrations/MigrationRebaseFacade.js.map +1 -1
- package/dist/development/src/lib/migrations/MigrationsStatusFacade.cjs.map +1 -1
- package/dist/development/src/lib/migrations/MigrationsStatusFacade.js.map +1 -1
- package/dist/development/src/lib/migrations/MigrationsValidator.cjs.map +1 -1
- package/dist/development/src/lib/migrations/MigrationsValidator.js.map +1 -1
- package/dist/development/src/lib/project/RemoteProject.cjs.map +1 -1
- package/dist/development/src/lib/project/RemoteProject.js.map +1 -1
- package/dist/development/src/lib/project/RemoteProjectProvider.cjs.map +1 -1
- package/dist/development/src/lib/project/RemoteProjectProvider.js.map +1 -1
- package/dist/development/src/lib/project/RemoteProjectResolver.cjs.map +1 -1
- package/dist/development/src/lib/project/RemoteProjectResolver.js.map +1 -1
- package/dist/development/src/lib/project/docs/components/EntityInfo.cjs +135 -177
- package/dist/development/src/lib/project/docs/components/EntityInfo.cjs.map +1 -1
- package/dist/development/src/lib/project/docs/components/EntityInfo.js +136 -178
- package/dist/development/src/lib/project/docs/components/EntityInfo.js.map +1 -1
- package/dist/development/src/lib/project/docs/components/EntityLink.cjs.map +1 -1
- package/dist/development/src/lib/project/docs/components/EntityLink.js.map +1 -1
- package/dist/development/src/lib/project/docs/components/FieldLink.cjs +5 -5
- package/dist/development/src/lib/project/docs/components/FieldLink.cjs.map +1 -1
- package/dist/development/src/lib/project/docs/components/FieldLink.js +5 -5
- package/dist/development/src/lib/project/docs/components/FieldLink.js.map +1 -1
- package/dist/development/src/lib/project/docs/components/FieldPermissions.cjs +8 -8
- package/dist/development/src/lib/project/docs/components/FieldPermissions.cjs.map +1 -1
- package/dist/development/src/lib/project/docs/components/FieldPermissions.js +8 -8
- package/dist/development/src/lib/project/docs/components/FieldPermissions.js.map +1 -1
- package/dist/development/src/lib/project/docs/components/FieldType.cjs +34 -36
- package/dist/development/src/lib/project/docs/components/FieldType.cjs.map +1 -1
- package/dist/development/src/lib/project/docs/components/FieldType.js +34 -36
- package/dist/development/src/lib/project/docs/components/FieldType.js.map +1 -1
- package/dist/development/src/lib/project/docs/components/OnDelete.cjs +22 -26
- package/dist/development/src/lib/project/docs/components/OnDelete.cjs.map +1 -1
- package/dist/development/src/lib/project/docs/components/OnDelete.js +22 -26
- package/dist/development/src/lib/project/docs/components/OnDelete.js.map +1 -1
- package/dist/development/src/lib/project/docs/components/ProjectInfo.cjs +16 -16
- package/dist/development/src/lib/project/docs/components/ProjectInfo.cjs.map +1 -1
- package/dist/development/src/lib/project/docs/components/ProjectInfo.js +16 -16
- package/dist/development/src/lib/project/docs/components/ProjectInfo.js.map +1 -1
- package/dist/development/src/lib/project/docs/components/SinglePermission.cjs.map +1 -1
- package/dist/development/src/lib/project/docs/components/SinglePermission.js.map +1 -1
- package/dist/development/src/lib/project/docs/components/utils.cjs.map +1 -1
- package/dist/development/src/lib/project/docs/components/utils.js.map +1 -1
- package/dist/development/src/lib/project/docs/projectDescribe.cjs.map +1 -1
- package/dist/development/src/lib/project/docs/projectDescribe.js.map +1 -1
- package/dist/development/src/lib/schema/SchemaLoader.cjs.map +1 -1
- package/dist/development/src/lib/schema/SchemaLoader.js.map +1 -1
- package/dist/development/src/lib/schema/SchemaValidationHelper.cjs.map +1 -1
- package/dist/development/src/lib/schema/SchemaValidationPrinter.cjs.map +1 -1
- package/dist/development/src/lib/schema/SchemaValidationPrinter.js.map +1 -1
- package/dist/development/src/lib/schema/collectReferences.cjs.map +1 -1
- package/dist/development/src/lib/schema/collectReferences.js.map +1 -1
- package/dist/development/src/lib/stream.cjs.map +1 -1
- package/dist/development/src/lib/stream.js.map +1 -1
- package/dist/development/src/lib/tenant/TenantClient.cjs.map +1 -1
- package/dist/development/src/lib/tenant/TenantClient.js.map +1 -1
- package/dist/development/src/lib/transfer/DataTransferClient.cjs +29 -27
- package/dist/development/src/lib/transfer/DataTransferClient.cjs.map +1 -1
- package/dist/development/src/lib/transfer/DataTransferClient.js +29 -27
- package/dist/development/src/lib/transfer/DataTransferClient.js.map +1 -1
- package/dist/development/src/lib/transfer/stdio.cjs.map +1 -1
- package/dist/development/src/lib/transfer/stdio.js.map +1 -1
- package/dist/development/src/lib/workspace/WorkspaceResolver.cjs +4 -4
- package/dist/development/src/lib/workspace/WorkspaceResolver.cjs.map +1 -1
- package/dist/development/src/lib/workspace/WorkspaceResolver.js +5 -5
- package/dist/development/src/lib/workspace/WorkspaceResolver.js.map +1 -1
- package/dist/production/run.cjs.map +1 -1
- package/dist/production/run.js +0 -0
- package/dist/production/run.js.map +1 -1
- package/dist/production/src/commands/actions/ActionsGetEventCommand.cjs.map +1 -1
- package/dist/production/src/commands/actions/ActionsGetEventCommand.js.map +1 -1
- package/dist/production/src/commands/actions/ActionsListFailedEventsCommand.cjs.map +1 -1
- package/dist/production/src/commands/actions/ActionsListFailedEventsCommand.js.map +1 -1
- package/dist/production/src/commands/actions/ActionsListVariablesCommand.cjs.map +1 -1
- package/dist/production/src/commands/actions/ActionsListVariablesCommand.js.map +1 -1
- package/dist/production/src/commands/actions/ActionsRetryEventCommand.cjs.map +1 -1
- package/dist/production/src/commands/actions/ActionsRetryEventCommand.js.map +1 -1
- package/dist/production/src/commands/actions/ActionsSetVariablesCommand.cjs +7 -4
- package/dist/production/src/commands/actions/ActionsSetVariablesCommand.cjs.map +1 -1
- package/dist/production/src/commands/actions/ActionsSetVariablesCommand.js +7 -4
- package/dist/production/src/commands/actions/ActionsSetVariablesCommand.js.map +1 -1
- package/dist/production/src/commands/actions/ActionsStopEventCommand.cjs.map +1 -1
- package/dist/production/src/commands/actions/ActionsStopEventCommand.js.map +1 -1
- package/dist/production/src/commands/deploy/DeployCommand.cjs.map +1 -1
- package/dist/production/src/commands/deploy/DeployCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationAmendCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationAmendCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationBlankCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationBlankCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationDescribeCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationDescribeCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationDiffCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationDiffCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationExecuteCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationExecuteCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationRebaseCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationRebaseCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationStatusCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationStatusCommand.js.map +1 -1
- package/dist/production/src/commands/misc/VersionCommand.cjs.map +1 -1
- package/dist/production/src/commands/misc/VersionCommand.js.map +1 -1
- package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.cjs.map +1 -1
- package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.js.map +1 -1
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -1
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -1
- package/dist/production/src/commands/project/ProjectValidateCommand.cjs.map +1 -1
- package/dist/production/src/commands/project/ProjectValidateCommand.js.map +1 -1
- package/dist/production/src/commands/transfer/ExportCommand.cjs.map +1 -1
- package/dist/production/src/commands/transfer/ExportCommand.js.map +1 -1
- package/dist/production/src/commands/transfer/ImportCommand.cjs.map +1 -1
- package/dist/production/src/commands/transfer/ImportCommand.js.map +1 -1
- package/dist/production/src/commands/transfer/TransferCommand.cjs.map +1 -1
- package/dist/production/src/commands/transfer/TransferCommand.js.map +1 -1
- package/dist/production/src/commands/transfer/utils.cjs.map +1 -1
- package/dist/production/src/commands/transfer/utils.js.map +1 -1
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.cjs +16 -14
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.cjs.map +1 -1
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.js +16 -14
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +1 -1
- package/dist/production/src/consts.cjs.map +1 -1
- package/dist/production/src/dic.cjs +87 -3
- package/dist/production/src/dic.cjs.map +1 -1
- package/dist/production/src/dic.js +88 -4
- package/dist/production/src/dic.js.map +1 -1
- package/dist/production/src/lib/SystemClientProvider.cjs.map +1 -1
- package/dist/production/src/lib/SystemClientProvider.js.map +1 -1
- package/dist/production/src/lib/TenantClientProvider.cjs.map +1 -1
- package/dist/production/src/lib/TenantClientProvider.js.map +1 -1
- package/dist/production/src/lib/VersionChecker.cjs.map +1 -1
- package/dist/production/src/lib/VersionChecker.js.map +1 -1
- package/dist/production/src/lib/actions/ActionsClient.cjs.map +1 -1
- package/dist/production/src/lib/actions/ActionsClient.js.map +1 -1
- package/dist/production/src/lib/admin/AdminClient.cjs.map +1 -1
- package/dist/production/src/lib/admin/AdminClient.js.map +1 -1
- package/dist/production/src/lib/admin/AdminDeployer.cjs.map +1 -1
- package/dist/production/src/lib/admin/AdminDeployer.js.map +1 -1
- package/dist/production/src/lib/assertNever.cjs.map +1 -1
- package/dist/production/src/lib/assertNever.js.map +1 -1
- package/dist/production/src/lib/dsn.cjs.map +1 -1
- package/dist/production/src/lib/dsn.js.map +1 -1
- package/dist/production/src/lib/env.cjs.map +1 -1
- package/dist/production/src/lib/env.js.map +1 -1
- package/dist/production/src/lib/fs/DockerComposeManager.cjs.map +1 -1
- package/dist/production/src/lib/fs/DockerComposeManager.js.map +1 -1
- package/dist/production/src/lib/fs/FileSystem.cjs.map +1 -1
- package/dist/production/src/lib/fs/FileSystem.js.map +1 -1
- package/dist/production/src/lib/fs/YamlHandler.cjs.map +1 -1
- package/dist/production/src/lib/fs/YamlHandler.js.map +1 -1
- package/dist/production/src/lib/js/EsBuildBuilder.cjs.map +1 -1
- package/dist/production/src/lib/js/EsBuildBuilder.js.map +1 -1
- package/dist/production/src/lib/js/EvalExecutor.cjs.map +1 -1
- package/dist/production/src/lib/js/EvalExecutor.js.map +1 -1
- package/dist/production/src/lib/js/JsCodeRunner.cjs.map +1 -1
- package/dist/production/src/lib/js/JsCodeRunner.js.map +1 -1
- package/dist/production/src/lib/migrations/MigrationExecutionFacade.cjs.map +1 -1
- package/dist/production/src/lib/migrations/MigrationExecutionFacade.js.map +1 -1
- package/dist/production/src/lib/migrations/MigrationPrinter.cjs.map +1 -1
- package/dist/production/src/lib/migrations/MigrationPrinter.js.map +1 -1
- package/dist/production/src/lib/migrations/MigrationRebaseFacade.cjs.map +1 -1
- package/dist/production/src/lib/migrations/MigrationRebaseFacade.js.map +1 -1
- package/dist/production/src/lib/migrations/MigrationsStatusFacade.cjs.map +1 -1
- package/dist/production/src/lib/migrations/MigrationsStatusFacade.js.map +1 -1
- package/dist/production/src/lib/migrations/MigrationsValidator.cjs.map +1 -1
- package/dist/production/src/lib/migrations/MigrationsValidator.js.map +1 -1
- package/dist/production/src/lib/project/RemoteProject.cjs.map +1 -1
- package/dist/production/src/lib/project/RemoteProject.js.map +1 -1
- package/dist/production/src/lib/project/RemoteProjectProvider.cjs.map +1 -1
- package/dist/production/src/lib/project/RemoteProjectProvider.js.map +1 -1
- package/dist/production/src/lib/project/RemoteProjectResolver.cjs.map +1 -1
- package/dist/production/src/lib/project/RemoteProjectResolver.js.map +1 -1
- package/dist/production/src/lib/project/docs/components/EntityInfo.cjs +39 -66
- package/dist/production/src/lib/project/docs/components/EntityInfo.cjs.map +1 -1
- package/dist/production/src/lib/project/docs/components/EntityInfo.js +40 -67
- package/dist/production/src/lib/project/docs/components/EntityInfo.js.map +1 -1
- package/dist/production/src/lib/project/docs/components/EntityLink.cjs.map +1 -1
- package/dist/production/src/lib/project/docs/components/EntityLink.js.map +1 -1
- package/dist/production/src/lib/project/docs/components/FieldLink.cjs.map +1 -1
- package/dist/production/src/lib/project/docs/components/FieldLink.js.map +1 -1
- package/dist/production/src/lib/project/docs/components/FieldPermissions.cjs.map +1 -1
- package/dist/production/src/lib/project/docs/components/FieldPermissions.js.map +1 -1
- package/dist/production/src/lib/project/docs/components/FieldType.cjs +3 -5
- package/dist/production/src/lib/project/docs/components/FieldType.cjs.map +1 -1
- package/dist/production/src/lib/project/docs/components/FieldType.js +3 -5
- package/dist/production/src/lib/project/docs/components/FieldType.js.map +1 -1
- package/dist/production/src/lib/project/docs/components/OnDelete.cjs +4 -8
- package/dist/production/src/lib/project/docs/components/OnDelete.cjs.map +1 -1
- package/dist/production/src/lib/project/docs/components/OnDelete.js +4 -8
- package/dist/production/src/lib/project/docs/components/OnDelete.js.map +1 -1
- package/dist/production/src/lib/project/docs/components/ProjectInfo.cjs.map +1 -1
- package/dist/production/src/lib/project/docs/components/ProjectInfo.js.map +1 -1
- package/dist/production/src/lib/project/docs/components/SinglePermission.cjs.map +1 -1
- package/dist/production/src/lib/project/docs/components/SinglePermission.js.map +1 -1
- package/dist/production/src/lib/project/docs/components/utils.cjs.map +1 -1
- package/dist/production/src/lib/project/docs/components/utils.js.map +1 -1
- package/dist/production/src/lib/project/docs/projectDescribe.cjs.map +1 -1
- package/dist/production/src/lib/project/docs/projectDescribe.js.map +1 -1
- package/dist/production/src/lib/schema/SchemaLoader.cjs.map +1 -1
- package/dist/production/src/lib/schema/SchemaLoader.js.map +1 -1
- package/dist/production/src/lib/schema/SchemaValidationHelper.cjs.map +1 -1
- package/dist/production/src/lib/schema/SchemaValidationPrinter.cjs.map +1 -1
- package/dist/production/src/lib/schema/SchemaValidationPrinter.js.map +1 -1
- package/dist/production/src/lib/schema/collectReferences.cjs.map +1 -1
- package/dist/production/src/lib/schema/collectReferences.js.map +1 -1
- package/dist/production/src/lib/stream.cjs.map +1 -1
- package/dist/production/src/lib/stream.js.map +1 -1
- package/dist/production/src/lib/tenant/TenantClient.cjs.map +1 -1
- package/dist/production/src/lib/tenant/TenantClient.js.map +1 -1
- package/dist/production/src/lib/transfer/DataTransferClient.cjs +29 -27
- package/dist/production/src/lib/transfer/DataTransferClient.cjs.map +1 -1
- package/dist/production/src/lib/transfer/DataTransferClient.js +29 -27
- package/dist/production/src/lib/transfer/DataTransferClient.js.map +1 -1
- package/dist/production/src/lib/transfer/stdio.cjs.map +1 -1
- package/dist/production/src/lib/transfer/stdio.js.map +1 -1
- package/dist/production/src/lib/workspace/WorkspaceResolver.cjs +4 -4
- package/dist/production/src/lib/workspace/WorkspaceResolver.cjs.map +1 -1
- package/dist/production/src/lib/workspace/WorkspaceResolver.js +5 -5
- package/dist/production/src/lib/workspace/WorkspaceResolver.js.map +1 -1
- package/dist/types/commands/actions/ActionsGetEventCommand.d.ts.map +1 -1
- package/dist/types/commands/actions/ActionsListFailedEventsCommand.d.ts.map +1 -1
- package/dist/types/commands/actions/ActionsListVariablesCommand.d.ts.map +1 -1
- package/dist/types/commands/actions/ActionsSetVariablesCommand.d.ts.map +1 -1
- package/dist/types/commands/deploy/DeployCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationAmendCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationBlankCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationDescribeCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationDiffCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationExecuteCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationRebaseCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationStatusCommand.d.ts.map +1 -1
- package/dist/types/commands/project/ProjectGenerateDocumentationCommand.d.ts.map +1 -1
- package/dist/types/commands/project/ProjectPrintSchemaCommand.d.ts.map +1 -1
- package/dist/types/commands/transfer/TransferCommand.d.ts.map +1 -1
- package/dist/types/commands/transfer/utils.d.ts.map +1 -1
- package/dist/types/commands/workspace/WorkspaceUpdateApiCommand.d.ts.map +1 -1
- package/dist/types/dic.d.ts.map +1 -1
- package/dist/types/lib/VersionChecker.d.ts.map +1 -1
- package/dist/types/lib/actions/ActionsClient.d.ts.map +1 -1
- package/dist/types/lib/admin/AdminClient.d.ts.map +1 -1
- package/dist/types/lib/admin/AdminDeployer.d.ts.map +1 -1
- package/dist/types/lib/fs/DockerComposeManager.d.ts.map +1 -1
- package/dist/types/lib/migrations/MigrationPrinter.d.ts.map +1 -1
- package/dist/types/lib/migrations/MigrationsStatusFacade.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/EntityInfo.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/FieldLink.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/FieldPermissions.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/FieldType.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/OnDelete.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/ProjectInfo.d.ts.map +1 -1
- package/dist/types/lib/project/docs/projectDescribe.d.ts.map +1 -1
- package/dist/types/lib/schema/SchemaValidationPrinter.d.ts.map +1 -1
- package/dist/types/lib/stream.d.ts.map +1 -1
- package/dist/types/lib/tenant/TenantClient.d.ts.map +1 -1
- package/dist/types/lib/transfer/DataTransferClient.d.ts.map +1 -1
- package/package.json +39 -35
- package/src/commands/actions/ActionsGetEventCommand.ts +0 -1
- package/src/commands/actions/ActionsListFailedEventsCommand.ts +1 -3
- package/src/commands/actions/ActionsListVariablesCommand.ts +1 -2
- package/src/commands/actions/ActionsSetVariablesCommand.ts +13 -7
- package/src/commands/deploy/DeployCommand.ts +0 -3
- package/src/commands/migrations/MigrationAmendCommand.ts +2 -2
- package/src/commands/migrations/MigrationBlankCommand.ts +1 -3
- package/src/commands/migrations/MigrationDescribeCommand.ts +0 -1
- package/src/commands/migrations/MigrationDiffCommand.ts +0 -2
- package/src/commands/migrations/MigrationExecuteCommand.ts +1 -2
- package/src/commands/migrations/MigrationRebaseCommand.ts +0 -2
- package/src/commands/migrations/MigrationStatusCommand.ts +7 -12
- package/src/commands/project/ProjectGenerateDocumentationCommand.ts +1 -2
- package/src/commands/project/ProjectPrintSchemaCommand.ts +1 -3
- package/src/commands/transfer/ImportCommand.ts +1 -2
- package/src/commands/transfer/TransferCommand.ts +2 -3
- package/src/commands/transfer/utils.ts +0 -1
- package/src/commands/workspace/WorkspaceUpdateApiCommand.ts +16 -14
- package/src/dic.ts +150 -116
- package/src/lib/VersionChecker.ts +0 -2
- package/src/lib/actions/ActionsClient.ts +0 -1
- package/src/lib/admin/AdminClient.ts +2 -2
- package/src/lib/admin/AdminDeployer.ts +0 -1
- package/src/lib/fs/DockerComposeManager.ts +0 -3
- package/src/lib/migrations/MigrationPrinter.ts +0 -2
- package/src/lib/migrations/MigrationsStatusFacade.ts +0 -1
- package/src/lib/project/RemoteProjectResolver.ts +2 -2
- package/src/lib/project/docs/components/EntityInfo.tsx +36 -31
- package/src/lib/project/docs/components/FieldLink.tsx +5 -1
- package/src/lib/project/docs/components/FieldPermissions.tsx +8 -6
- package/src/lib/project/docs/components/FieldType.tsx +31 -30
- package/src/lib/project/docs/components/OnDelete.tsx +15 -13
- package/src/lib/project/docs/components/ProjectInfo.tsx +1 -4
- package/src/lib/project/docs/components/SinglePermission.tsx +0 -1
- package/src/lib/project/docs/components/utils.ts +0 -1
- package/src/lib/project/docs/projectDescribe.tsx +0 -2
- package/src/lib/project/docs/resources/style.css +2 -3
- package/src/lib/schema/SchemaLoader.ts +1 -1
- package/src/lib/schema/SchemaValidationPrinter.ts +0 -1
- package/src/lib/stream.ts +7 -8
- package/src/lib/tenant/TenantClient.ts +0 -1
- package/src/lib/transfer/DataTransferClient.ts +32 -32
- package/src/lib/transfer/stdio.ts +0 -1
- package/src/lib/workspace/WorkspaceResolver.ts +5 -5
- package/src/run.ts +2 -5
- package/dist/types/tsconfig.tsbuildinfo +0 -1
- package/postcss.config.js +0 -6
- package/src/.eslintrc.cjs +0 -5
- package/src/lib/project/docs/.eslintrc.cjs +0 -5
- package/tailwind.config.js +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MigrationExecutionFacade.js","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationExecutionFacade.ts"],"sourcesContent":["import prompts from 'prompts'\nimport { MigrationPrinter } from './MigrationPrinter'\nimport { isSchemaMigration, MigrationExecutor, MigrationToExecuteOkStatus, SchemaVersionBuilder } from '@contember/migrations-client'\nimport { MigrationsStatusFacade } from './MigrationsStatusFacade'\nimport { MigrationVersionHelper } from '@contember/engine-common'\nimport { RemoteProject } from '../project/RemoteProject'\nimport { SystemClientProvider } from '../SystemClientProvider'\nimport { TenantClientProvider } from '../TenantClientProvider'\nimport { RemoteProjectProvider } from '../project/RemoteProjectProvider'\n\nexport class MigrationExecutionFacade {\n\tconstructor(\n\t\tprivate readonly systemClientProvider: SystemClientProvider,\n\t\tprivate readonly tenantClientProvider: TenantClientProvider,\n\t\tprivate readonly projectProvider: RemoteProjectProvider,\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t\tprivate readonly migrationPrinter: MigrationPrinter,\n\t\tprivate readonly migrationExecutor: MigrationExecutor,\n\t\tprivate readonly migrationStatusFacade: MigrationsStatusFacade,\n\t) {\n\t}\n\n\texecute = async ({\n\t\trequireConfirmation,\n\t\tforce,\n\t\tuntil,\n\t\tadditionalMessage,\n\t}: {\n\t\trequireConfirmation: boolean | ((migrations: MigrationToExecuteOkStatus[]) => boolean)\n\t\tforce?: boolean\n\t\tuntil?: string\n\t\tadditionalMessage?: string\n\t}): Promise<boolean> => {\n\t\tconst project = this.projectProvider.get()\n\t\tawait this.tenantClientProvider.get().createProject(project.name, true)\n\n\t\tconst status = await this.migrationStatusFacade.resolveMigrationsStatus({ force })\n\t\tconst migrations = until\n\t\t\t? status.migrationsToExecute.filter(it => it.version <= MigrationVersionHelper.extractVersion(until))\n\t\t\t: status.migrationsToExecute\n\t\tif (migrations.length === 0) {\n\t\t\tconsole.log('No migrations to execute')\n\t\t\treturn true\n\t\t}\n\t\tconsole.log('Will execute following migrations:')\n\t\tmigrations.forEach(it => console.log(it.name))\n\t\tadditionalMessage && console.log(additionalMessage)\n\n\t\tif (typeof requireConfirmation === 'function' ? requireConfirmation(migrations) : requireConfirmation) {\n\t\t\tif (!process.stdin.isTTY) {\n\t\t\t\tthrow 'TTY not available. Pass --yes option to confirm execution.'\n\t\t\t}\n\t\t\tdo {\n\t\t\t\tconst { action } = await prompts({\n\t\t\t\t\ttype: 'select',\n\t\t\t\t\tname: 'action',\n\t\t\t\t\tmessage: 'Do you want to continue?',\n\t\t\t\t\tchoices: [\n\t\t\t\t\t\t{ value: 'yes', title: 'Execute migrations' },\n\t\t\t\t\t\t{ value: 'describe', title: 'Describe migrations' },\n\t\t\t\t\t\t{ value: 'no', title: 'Abort' },\n\t\t\t\t\t],\n\t\t\t\t})\n\t\t\t\tif (action === 'describe') {\n\t\t\t\t\tconst schema = await this.schemaVersionBuilder.buildSchemaUntil(migrations[0].version)\n\t\t\t\t\tfor (const migration of migrations) {\n\t\t\t\t\t\tconst migrationContent = await migration.localMigration.getContent()\n\t\t\t\t\t\tif (!isSchemaMigration(migrationContent)) {\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tawait this.migrationPrinter.printMigrationDescription(schema, migrationContent, {\n\t\t\t\t\t\t\tnoSql: true,\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t} else if (action === 'yes') {\n\t\t\t\t\tbreak\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t} while (true)\n\t\t}\n\n\t\tawait this.migrationExecutor.executeMigrations({\n\t\t\tclient: this.systemClientProvider.get(),\n\t\t\tmigrations,\n\t\t\tcontentMigrationFactoryArgs: {\n\t\t\t\tapiToken: project.token,\n\t\t\t\tapiBaseUrl: project.endpoint,\n\t\t\t\tprojectName: project.name,\n\t\t\t\tschemaVersionBuilder: this.schemaVersionBuilder,\n\t\t\t},\n\t\t\tlog: message => console.log(message),\n\t\t\tforce,\n\t\t})\n\t\treturn true\n\t}\n}\n"],"names":[],"mappings":";;;;;;AAUO,MAAM,yBAAyB;AAAA,EACrC,YACkB,sBACA,sBACA,iBACA,sBACA,kBACA,mBACA,uBAChB;AAPgB,SAAA,uBAAA;AACA,SAAA,uBAAA;AACA,SAAA,kBAAA;AACA,SAAA,uBAAA;AACA,SAAA,mBAAA;AACA,SAAA,oBAAA;AACA,SAAA,wBAAA;AAIlB,kBAAA,MAAA,WAAU,OAAO;AAAA,MAChB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA,MAMuB;
|
|
1
|
+
{"version":3,"file":"MigrationExecutionFacade.js","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationExecutionFacade.ts"],"sourcesContent":["import prompts from 'prompts'\nimport { MigrationPrinter } from './MigrationPrinter'\nimport { isSchemaMigration, MigrationExecutor, MigrationToExecuteOkStatus, SchemaVersionBuilder } from '@contember/migrations-client'\nimport { MigrationsStatusFacade } from './MigrationsStatusFacade'\nimport { MigrationVersionHelper } from '@contember/engine-common'\nimport { RemoteProject } from '../project/RemoteProject'\nimport { SystemClientProvider } from '../SystemClientProvider'\nimport { TenantClientProvider } from '../TenantClientProvider'\nimport { RemoteProjectProvider } from '../project/RemoteProjectProvider'\n\nexport class MigrationExecutionFacade {\n\tconstructor(\n\t\tprivate readonly systemClientProvider: SystemClientProvider,\n\t\tprivate readonly tenantClientProvider: TenantClientProvider,\n\t\tprivate readonly projectProvider: RemoteProjectProvider,\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t\tprivate readonly migrationPrinter: MigrationPrinter,\n\t\tprivate readonly migrationExecutor: MigrationExecutor,\n\t\tprivate readonly migrationStatusFacade: MigrationsStatusFacade,\n\t) {\n\t}\n\n\texecute = async ({\n\t\trequireConfirmation,\n\t\tforce,\n\t\tuntil,\n\t\tadditionalMessage,\n\t}: {\n\t\trequireConfirmation: boolean | ((migrations: MigrationToExecuteOkStatus[]) => boolean)\n\t\tforce?: boolean\n\t\tuntil?: string\n\t\tadditionalMessage?: string\n\t}): Promise<boolean> => {\n\t\tconst project = this.projectProvider.get()\n\t\tawait this.tenantClientProvider.get().createProject(project.name, true)\n\n\t\tconst status = await this.migrationStatusFacade.resolveMigrationsStatus({ force })\n\t\tconst migrations = until\n\t\t\t? status.migrationsToExecute.filter(it => it.version <= MigrationVersionHelper.extractVersion(until))\n\t\t\t: status.migrationsToExecute\n\t\tif (migrations.length === 0) {\n\t\t\tconsole.log('No migrations to execute')\n\t\t\treturn true\n\t\t}\n\t\tconsole.log('Will execute following migrations:')\n\t\tmigrations.forEach(it => console.log(it.name))\n\t\tadditionalMessage && console.log(additionalMessage)\n\n\t\tif (typeof requireConfirmation === 'function' ? requireConfirmation(migrations) : requireConfirmation) {\n\t\t\tif (!process.stdin.isTTY) {\n\t\t\t\tthrow 'TTY not available. Pass --yes option to confirm execution.'\n\t\t\t}\n\t\t\tdo {\n\t\t\t\tconst { action } = await prompts({\n\t\t\t\t\ttype: 'select',\n\t\t\t\t\tname: 'action',\n\t\t\t\t\tmessage: 'Do you want to continue?',\n\t\t\t\t\tchoices: [\n\t\t\t\t\t\t{ value: 'yes', title: 'Execute migrations' },\n\t\t\t\t\t\t{ value: 'describe', title: 'Describe migrations' },\n\t\t\t\t\t\t{ value: 'no', title: 'Abort' },\n\t\t\t\t\t],\n\t\t\t\t})\n\t\t\t\tif (action === 'describe') {\n\t\t\t\t\tconst schema = await this.schemaVersionBuilder.buildSchemaUntil(migrations[0].version)\n\t\t\t\t\tfor (const migration of migrations) {\n\t\t\t\t\t\tconst migrationContent = await migration.localMigration.getContent()\n\t\t\t\t\t\tif (!isSchemaMigration(migrationContent)) {\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tawait this.migrationPrinter.printMigrationDescription(schema, migrationContent, {\n\t\t\t\t\t\t\tnoSql: true,\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t} else if (action === 'yes') {\n\t\t\t\t\tbreak\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t} while (true)\n\t\t}\n\n\t\tawait this.migrationExecutor.executeMigrations({\n\t\t\tclient: this.systemClientProvider.get(),\n\t\t\tmigrations,\n\t\t\tcontentMigrationFactoryArgs: {\n\t\t\t\tapiToken: project.token,\n\t\t\t\tapiBaseUrl: project.endpoint,\n\t\t\t\tprojectName: project.name,\n\t\t\t\tschemaVersionBuilder: this.schemaVersionBuilder,\n\t\t\t},\n\t\t\tlog: message => console.log(message),\n\t\t\tforce,\n\t\t})\n\t\treturn true\n\t}\n}\n"],"names":[],"mappings":";;;;;;AAUO,MAAM,yBAAyB;AAAA,EACrC,YACkB,sBACA,sBACA,iBACA,sBACA,kBACA,mBACA,uBAChB;AAPgB,SAAA,uBAAA;AACA,SAAA,uBAAA;AACA,SAAA,kBAAA;AACA,SAAA,uBAAA;AACA,SAAA,mBAAA;AACA,SAAA,oBAAA;AACA,SAAA,wBAAA;AAIlB,kBAAA,MAAA,WAAU,OAAO;AAAA,MAChB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA,MAMuB;AACvB,YAAM,UAAU,KAAK,gBAAgB,IAAA;AACrC,YAAM,KAAK,qBAAqB,IAAA,EAAM,cAAc,QAAQ,MAAM,IAAI;AAEtE,YAAM,SAAS,MAAM,KAAK,sBAAsB,wBAAwB,EAAE,OAAO;AACjF,YAAM,aAAa,QAChB,OAAO,oBAAoB,OAAO,CAAA,OAAM,GAAG,WAAW,uBAAuB,eAAe,KAAK,CAAC,IAClG,OAAO;AACV,UAAI,WAAW,WAAW,GAAG;AAC5B,gBAAQ,IAAI,0BAA0B;AACtC,eAAO;AAAA,MACR;AACA,cAAQ,IAAI,oCAAoC;AAChD,iBAAW,QAAQ,CAAA,OAAM,QAAQ,IAAI,GAAG,IAAI,CAAC;AAC7C,2BAAqB,QAAQ,IAAI,iBAAiB;AAElD,UAAI,OAAO,wBAAwB,aAAa,oBAAoB,UAAU,IAAI,qBAAqB;AACtG,YAAI,CAAC,QAAQ,MAAM,OAAO;AACzB,gBAAM;AAAA,QACP;AACA,WAAG;AACF,gBAAM,EAAE,WAAW,MAAM,QAAQ;AAAA,YAChC,MAAM;AAAA,YACN,MAAM;AAAA,YACN,SAAS;AAAA,YACT,SAAS;AAAA,cACR,EAAE,OAAO,OAAO,OAAO,qBAAA;AAAA,cACvB,EAAE,OAAO,YAAY,OAAO,sBAAA;AAAA,cAC5B,EAAE,OAAO,MAAM,OAAO,QAAA;AAAA,YAAQ;AAAA,UAC/B,CACA;AACD,cAAI,WAAW,YAAY;AAC1B,kBAAM,SAAS,MAAM,KAAK,qBAAqB,iBAAiB,WAAW,CAAC,EAAE,OAAO;AACrF,uBAAW,aAAa,YAAY;AACnC,oBAAM,mBAAmB,MAAM,UAAU,eAAe,WAAA;AACxD,kBAAI,CAAC,kBAAkB,gBAAgB,GAAG;AACzC;AAAA,cACD;AAEA,oBAAM,KAAK,iBAAiB,0BAA0B,QAAQ,kBAAkB;AAAA,gBAC/E,OAAO;AAAA,cAAA,CACP;AAAA,YACF;AAAA,UACD,WAAW,WAAW,OAAO;AAC5B;AAAA,UACD,OAAO;AACN,mBAAO;AAAA,UACR;AAAA,QACD,SAAS;AAAA,MACV;AAEA,YAAM,KAAK,kBAAkB,kBAAkB;AAAA,QAC9C,QAAQ,KAAK,qBAAqB,IAAA;AAAA,QAClC;AAAA,QACA,6BAA6B;AAAA,UAC5B,UAAU,QAAQ;AAAA,UAClB,YAAY,QAAQ;AAAA,UACpB,aAAa,QAAQ;AAAA,UACrB,sBAAsB,KAAK;AAAA,QAAA;AAAA,QAE5B,KAAK,CAAA,YAAW,QAAQ,IAAI,OAAO;AAAA,QACnC;AAAA,MAAA,CACA;AACD,aAAO;AAAA,IACR,CAAA;AAAA,EA5EA;AA6ED;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MigrationPrinter.cjs","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationPrinter.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"MigrationPrinter.cjs","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationPrinter.ts"],"sourcesContent":["/// <reference path=\"../../../types/chalk-table/index.d.ts\" />\n\nimport { Schema } from '@contember/schema'\nimport chalk from 'chalk'\nimport { AnyMigrationStatus, Migration, MigrationDescriber, MigrationState } from '@contember/migrations-client'\nimport { emptyDatabaseMetadata } from '@contember/database'\nimport chalkTable from 'chalk-table'\nimport { assertNever } from '../assertNever'\n\nexport class MigrationPrinter {\n\tconstructor(\n\t\tprivate readonly migrationsDescriber: MigrationDescriber,\n\t) {\n\t}\n\n\tprintMigrationDescription = (\n\t\tschema: Schema,\n\t\tmigration: Migration,\n\t\toptions: { sqlOnly?: boolean; noSql?: boolean },\n\t) => {\n\t\tconst description = this.migrationsDescriber.describeModifications(schema, migration)\n\t\tdescription.forEach(({ modification, getSql, description }) => {\n\t\t\tconst sql = getSql({\n\t\t\t\tsystemSchema: 'system',\n\t\t\t\tdatabaseMetadata: emptyDatabaseMetadata,\n\t\t\t\tinvalidateDatabaseMetadata: () => null,\n\t\t\t})\n\t\t\tif (options.sqlOnly) {\n\t\t\t\tif (sql.trim()) {\n\t\t\t\t\tconsole.log(sql)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst color = description.isDestructive ? chalk.red : chalk.blue\n\t\t\t\tconsole.group(color(`${description.message} [${modification.modification}]`))\n\t\t\t\tif (description.failureWarning) {\n\t\t\t\t\tconsole.log(chalk.bgWhite(chalk.redBright(description.failureWarning)))\n\t\t\t\t}\n\n\t\t\t\tif (!options.noSql) {\n\t\t\t\t\tif (sql.trim()) {\n\t\t\t\t\t\tconsole.log(sql)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.log('No sql to execute')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconsole.groupEnd()\n\t\t\t}\n\t\t})\n\t}\n\n\tprintStatusTable = (migrations: AnyMigrationStatus[]) => {\n\t\treturn chalkTable(\n\t\t\t{\n\t\t\t\tcolumns: ['status', 'migration', 'info'],\n\t\t\t},\n\t\t\tmigrations.map(it => {\n\t\t\t\tswitch (it.state) {\n\t\t\t\t\tcase MigrationState.EXECUTED_ERROR:\n\t\t\t\t\t\treturn { status: chalk.bgRedBright.white('ERROR'), migration: it.name, info: it.errorMessage }\n\t\t\t\t\tcase MigrationState.EXECUTED_OK:\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tstatus: chalk.bgGreen.blackBright('Executed'),\n\t\t\t\t\t\t\tmigration: it.name,\n\t\t\t\t\t\t\tinfo: `Executed at ${it.executedMigration.executedAt.toISOString()}`,\n\t\t\t\t\t\t}\n\t\t\t\t\tcase MigrationState.EXECUTED_MISSING:\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tstatus: chalk.bgRedBright.white('ERROR'),\n\t\t\t\t\t\t\tmigration: it.name,\n\t\t\t\t\t\t\tinfo: it.errorMessage,\n\t\t\t\t\t\t}\n\t\t\t\t\tcase MigrationState.TO_EXECUTE_OK:\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tstatus: chalk.bgBlueBright.white('Not executed'),\n\t\t\t\t\t\t\tmigration: it.name,\n\t\t\t\t\t\t\tinfo: 'Will be executed during next deploy',\n\t\t\t\t\t\t}\n\t\t\t\t\tcase MigrationState.TO_EXECUTE_ERROR:\n\t\t\t\t\t\treturn { status: chalk.bgRedBright.white('ERROR'), migration: it.name, info: it.errorMessage }\n\t\t\t\t\tcase MigrationState.SKIP_EMPTY:\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tstatus: chalk.bgYellow.white('Skip'),\n\t\t\t\t\t\t\tmigration: it.name,\n\t\t\t\t\t\t\tinfo: `Skipped because empty`,\n\t\t\t\t\t\t}\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tassertNever(it)\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\t}\n}\n"],"names":["description","emptyDatabaseMetadata","MigrationState","assertNever"],"mappings":";;;;;;;;;;AASO,MAAM,iBAAiB;AAAA,EAC7B,YACkB,qBAChB;AADgB,SAAA,sBAAA;AAIlB,kBAAA,MAAA,6BAA4B,CAC3B,QACA,WACA,YACI;AACJ,YAAM,cAAc,KAAK,oBAAoB,sBAAsB,QAAQ,SAAS;AACpF,kBAAY,QAAQ,CAAC,EAAE,cAAc,QAAQ,aAAAA,mBAAkB;AAC9D,cAAM,MAAM,OAAO;AAAA,UAClB,cAAc;AAAA,UACd,kBAAkBC,SAAAA;AAAAA,UAClB,4BAA4B,MAAM;AAAA,QAAA,CAClC;AACD,YAAI,QAAQ,SAAS;AACpB,cAAI,IAAI,QAAQ;AACf,oBAAQ,IAAI,GAAG;AAAA,UAChB;AAAA,QACD,OAAO;AACN,gBAAM,QAAQD,aAAY,gBAAgB,MAAM,MAAM,MAAM;AAC5D,kBAAQ,MAAM,MAAM,GAAGA,aAAY,OAAO,KAAK,aAAa,YAAY,GAAG,CAAC;AAC5E,cAAIA,aAAY,gBAAgB;AAC/B,oBAAQ,IAAI,MAAM,QAAQ,MAAM,UAAUA,aAAY,cAAc,CAAC,CAAC;AAAA,UACvE;AAEA,cAAI,CAAC,QAAQ,OAAO;AACnB,gBAAI,IAAI,QAAQ;AACf,sBAAQ,IAAI,GAAG;AAAA,YAChB,OAAO;AACN,sBAAQ,IAAI,mBAAmB;AAAA,YAChC;AAAA,UACD;AACA,kBAAQ,SAAA;AAAA,QACT;AAAA,MACD,CAAC;AAAA,IACF,CAAA;AAEA,kBAAA,MAAA,oBAAmB,CAAC,eAAqC;AACxD,aAAO;AAAA,QACN;AAAA,UACC,SAAS,CAAC,UAAU,aAAa,MAAM;AAAA,QAAA;AAAA,QAExC,WAAW,IAAI,CAAA,OAAM;AACpB,kBAAQ,GAAG,OAAA;AAAA,YACV,KAAKE,iBAAAA,eAAe;AACnB,qBAAO,EAAE,QAAQ,MAAM,YAAY,MAAM,OAAO,GAAG,WAAW,GAAG,MAAM,MAAM,GAAG,aAAA;AAAA,YACjF,KAAKA,iBAAAA,eAAe;AACnB,qBAAO;AAAA,gBACN,QAAQ,MAAM,QAAQ,YAAY,UAAU;AAAA,gBAC5C,WAAW,GAAG;AAAA,gBACd,MAAM,eAAe,GAAG,kBAAkB,WAAW,aAAa;AAAA,cAAA;AAAA,YAEpE,KAAKA,iBAAAA,eAAe;AACnB,qBAAO;AAAA,gBACN,QAAQ,MAAM,YAAY,MAAM,OAAO;AAAA,gBACvC,WAAW,GAAG;AAAA,gBACd,MAAM,GAAG;AAAA,cAAA;AAAA,YAEX,KAAKA,iBAAAA,eAAe;AACnB,qBAAO;AAAA,gBACN,QAAQ,MAAM,aAAa,MAAM,cAAc;AAAA,gBAC/C,WAAW,GAAG;AAAA,gBACd,MAAM;AAAA,cAAA;AAAA,YAER,KAAKA,iBAAAA,eAAe;AACnB,qBAAO,EAAE,QAAQ,MAAM,YAAY,MAAM,OAAO,GAAG,WAAW,GAAG,MAAM,MAAM,GAAG,aAAA;AAAA,YACjF,KAAKA,iBAAAA,eAAe;AACnB,qBAAO;AAAA,gBACN,QAAQ,MAAM,SAAS,MAAM,MAAM;AAAA,gBACnC,WAAW,GAAG;AAAA,gBACd,MAAM;AAAA,cAAA;AAAA,YAER;AACCC,0BAAAA,YAAc;AAAA,UAAA;AAAA,QAEjB,CAAC;AAAA,MAAA;AAAA,IAEH,CAAA;AAAA,EA7EA;AA8ED;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MigrationPrinter.js","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationPrinter.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"MigrationPrinter.js","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationPrinter.ts"],"sourcesContent":["/// <reference path=\"../../../types/chalk-table/index.d.ts\" />\n\nimport { Schema } from '@contember/schema'\nimport chalk from 'chalk'\nimport { AnyMigrationStatus, Migration, MigrationDescriber, MigrationState } from '@contember/migrations-client'\nimport { emptyDatabaseMetadata } from '@contember/database'\nimport chalkTable from 'chalk-table'\nimport { assertNever } from '../assertNever'\n\nexport class MigrationPrinter {\n\tconstructor(\n\t\tprivate readonly migrationsDescriber: MigrationDescriber,\n\t) {\n\t}\n\n\tprintMigrationDescription = (\n\t\tschema: Schema,\n\t\tmigration: Migration,\n\t\toptions: { sqlOnly?: boolean; noSql?: boolean },\n\t) => {\n\t\tconst description = this.migrationsDescriber.describeModifications(schema, migration)\n\t\tdescription.forEach(({ modification, getSql, description }) => {\n\t\t\tconst sql = getSql({\n\t\t\t\tsystemSchema: 'system',\n\t\t\t\tdatabaseMetadata: emptyDatabaseMetadata,\n\t\t\t\tinvalidateDatabaseMetadata: () => null,\n\t\t\t})\n\t\t\tif (options.sqlOnly) {\n\t\t\t\tif (sql.trim()) {\n\t\t\t\t\tconsole.log(sql)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst color = description.isDestructive ? chalk.red : chalk.blue\n\t\t\t\tconsole.group(color(`${description.message} [${modification.modification}]`))\n\t\t\t\tif (description.failureWarning) {\n\t\t\t\t\tconsole.log(chalk.bgWhite(chalk.redBright(description.failureWarning)))\n\t\t\t\t}\n\n\t\t\t\tif (!options.noSql) {\n\t\t\t\t\tif (sql.trim()) {\n\t\t\t\t\t\tconsole.log(sql)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.log('No sql to execute')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconsole.groupEnd()\n\t\t\t}\n\t\t})\n\t}\n\n\tprintStatusTable = (migrations: AnyMigrationStatus[]) => {\n\t\treturn chalkTable(\n\t\t\t{\n\t\t\t\tcolumns: ['status', 'migration', 'info'],\n\t\t\t},\n\t\t\tmigrations.map(it => {\n\t\t\t\tswitch (it.state) {\n\t\t\t\t\tcase MigrationState.EXECUTED_ERROR:\n\t\t\t\t\t\treturn { status: chalk.bgRedBright.white('ERROR'), migration: it.name, info: it.errorMessage }\n\t\t\t\t\tcase MigrationState.EXECUTED_OK:\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tstatus: chalk.bgGreen.blackBright('Executed'),\n\t\t\t\t\t\t\tmigration: it.name,\n\t\t\t\t\t\t\tinfo: `Executed at ${it.executedMigration.executedAt.toISOString()}`,\n\t\t\t\t\t\t}\n\t\t\t\t\tcase MigrationState.EXECUTED_MISSING:\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tstatus: chalk.bgRedBright.white('ERROR'),\n\t\t\t\t\t\t\tmigration: it.name,\n\t\t\t\t\t\t\tinfo: it.errorMessage,\n\t\t\t\t\t\t}\n\t\t\t\t\tcase MigrationState.TO_EXECUTE_OK:\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tstatus: chalk.bgBlueBright.white('Not executed'),\n\t\t\t\t\t\t\tmigration: it.name,\n\t\t\t\t\t\t\tinfo: 'Will be executed during next deploy',\n\t\t\t\t\t\t}\n\t\t\t\t\tcase MigrationState.TO_EXECUTE_ERROR:\n\t\t\t\t\t\treturn { status: chalk.bgRedBright.white('ERROR'), migration: it.name, info: it.errorMessage }\n\t\t\t\t\tcase MigrationState.SKIP_EMPTY:\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tstatus: chalk.bgYellow.white('Skip'),\n\t\t\t\t\t\t\tmigration: it.name,\n\t\t\t\t\t\t\tinfo: `Skipped because empty`,\n\t\t\t\t\t\t}\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tassertNever(it)\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\t}\n}\n"],"names":["description"],"mappings":";;;;;;;;AASO,MAAM,iBAAiB;AAAA,EAC7B,YACkB,qBAChB;AADgB,SAAA,sBAAA;AAIlB,kBAAA,MAAA,6BAA4B,CAC3B,QACA,WACA,YACI;AACJ,YAAM,cAAc,KAAK,oBAAoB,sBAAsB,QAAQ,SAAS;AACpF,kBAAY,QAAQ,CAAC,EAAE,cAAc,QAAQ,aAAAA,mBAAkB;AAC9D,cAAM,MAAM,OAAO;AAAA,UAClB,cAAc;AAAA,UACd,kBAAkB;AAAA,UAClB,4BAA4B,MAAM;AAAA,QAAA,CAClC;AACD,YAAI,QAAQ,SAAS;AACpB,cAAI,IAAI,QAAQ;AACf,oBAAQ,IAAI,GAAG;AAAA,UAChB;AAAA,QACD,OAAO;AACN,gBAAM,QAAQA,aAAY,gBAAgB,MAAM,MAAM,MAAM;AAC5D,kBAAQ,MAAM,MAAM,GAAGA,aAAY,OAAO,KAAK,aAAa,YAAY,GAAG,CAAC;AAC5E,cAAIA,aAAY,gBAAgB;AAC/B,oBAAQ,IAAI,MAAM,QAAQ,MAAM,UAAUA,aAAY,cAAc,CAAC,CAAC;AAAA,UACvE;AAEA,cAAI,CAAC,QAAQ,OAAO;AACnB,gBAAI,IAAI,QAAQ;AACf,sBAAQ,IAAI,GAAG;AAAA,YAChB,OAAO;AACN,sBAAQ,IAAI,mBAAmB;AAAA,YAChC;AAAA,UACD;AACA,kBAAQ,SAAA;AAAA,QACT;AAAA,MACD,CAAC;AAAA,IACF,CAAA;AAEA,kBAAA,MAAA,oBAAmB,CAAC,eAAqC;AACxD,aAAO;AAAA,QACN;AAAA,UACC,SAAS,CAAC,UAAU,aAAa,MAAM;AAAA,QAAA;AAAA,QAExC,WAAW,IAAI,CAAA,OAAM;AACpB,kBAAQ,GAAG,OAAA;AAAA,YACV,KAAK,eAAe;AACnB,qBAAO,EAAE,QAAQ,MAAM,YAAY,MAAM,OAAO,GAAG,WAAW,GAAG,MAAM,MAAM,GAAG,aAAA;AAAA,YACjF,KAAK,eAAe;AACnB,qBAAO;AAAA,gBACN,QAAQ,MAAM,QAAQ,YAAY,UAAU;AAAA,gBAC5C,WAAW,GAAG;AAAA,gBACd,MAAM,eAAe,GAAG,kBAAkB,WAAW,aAAa;AAAA,cAAA;AAAA,YAEpE,KAAK,eAAe;AACnB,qBAAO;AAAA,gBACN,QAAQ,MAAM,YAAY,MAAM,OAAO;AAAA,gBACvC,WAAW,GAAG;AAAA,gBACd,MAAM,GAAG;AAAA,cAAA;AAAA,YAEX,KAAK,eAAe;AACnB,qBAAO;AAAA,gBACN,QAAQ,MAAM,aAAa,MAAM,cAAc;AAAA,gBAC/C,WAAW,GAAG;AAAA,gBACd,MAAM;AAAA,cAAA;AAAA,YAER,KAAK,eAAe;AACnB,qBAAO,EAAE,QAAQ,MAAM,YAAY,MAAM,OAAO,GAAG,WAAW,GAAG,MAAM,MAAM,GAAG,aAAA;AAAA,YACjF,KAAK,eAAe;AACnB,qBAAO;AAAA,gBACN,QAAQ,MAAM,SAAS,MAAM,MAAM;AAAA,gBACnC,WAAW,GAAG;AAAA,gBACd,MAAM;AAAA,cAAA;AAAA,YAER;AACC,0BAAc;AAAA,UAAA;AAAA,QAEjB,CAAC;AAAA,MAAA;AAAA,IAEH,CAAA;AAAA,EA7EA;AA8ED;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MigrationRebaseFacade.cjs","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationRebaseFacade.ts"],"sourcesContent":["import { Migration, MigrationFilesManager, SchemaVersionBuilder, SystemClient } from '@contember/migrations-client'\nimport { MigrationsValidator } from './MigrationsValidator'\nimport { emptySchema } from '@contember/schema-utils'\nimport { MigrationVersionHelper } from '@contember/engine-common'\nimport { SystemClientProvider } from '../SystemClientProvider'\n\nexport class MigrationRebaseFacade {\n\tconstructor(\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t\tprivate readonly migrationsValidator: MigrationsValidator,\n\t\tprivate readonly systemClientProvider: SystemClientProvider,\n\t\tprivate readonly migrationFilesManager: MigrationFilesManager,\n\t) {\n\t}\n\n\trebase = async (migrations: Migration[]) => {\n\t\tconst versions = migrations.map(it => it.version)\n\t\tconst schemaWithoutMigrations = await this.schemaVersionBuilder.buildSchemaAdvanced(\n\t\t\temptySchema,\n\t\t\tversion => !versions.includes(version),\n\t\t)\n\t\tconst valid = await this.migrationsValidator.validate(schemaWithoutMigrations, migrations)\n\t\tif (!valid) {\n\t\t\tthrow `Cannot rebase migrations`\n\t\t}\n\n\t\tlet i = 0\n\t\tfor (const migration of migrations) {\n\t\t\tconst name = migration.name.substring(MigrationVersionHelper.prefixLength + 1)\n\t\t\tconst [version, fullName] = MigrationVersionHelper.createVersion(name, i++)\n\t\t\tconst newMigration = {\n\t\t\t\tname: fullName,\n\t\t\t\tversion: version,\n\t\t\t\tformatVersion: migration.formatVersion,\n\t\t\t\tmodifications: migration.modifications,\n\t\t\t}\n\t\t\tawait this.systemClientProvider.get().migrationModify(migration.version, newMigration)\n\t\t\tawait this.migrationFilesManager.moveFile(migration.name, newMigration.name)\n\t\t}\n\t}\n}\n"],"names":["emptySchema","MigrationVersionHelper"],"mappings":";;;;;;;AAMO,MAAM,sBAAsB;AAAA,EAClC,YACkB,sBACA,qBACA,sBACA,uBAChB;AAJgB,SAAA,uBAAA;AACA,SAAA,sBAAA;AACA,SAAA,uBAAA;AACA,SAAA,wBAAA;AAIlB,kBAAA,MAAA,UAAS,OAAO,eAA4B;AAC3C,YAAM,WAAW,WAAW,IAAI,CAAA,OAAM,GAAG,OAAO;
|
|
1
|
+
{"version":3,"file":"MigrationRebaseFacade.cjs","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationRebaseFacade.ts"],"sourcesContent":["import { Migration, MigrationFilesManager, SchemaVersionBuilder, SystemClient } from '@contember/migrations-client'\nimport { MigrationsValidator } from './MigrationsValidator'\nimport { emptySchema } from '@contember/schema-utils'\nimport { MigrationVersionHelper } from '@contember/engine-common'\nimport { SystemClientProvider } from '../SystemClientProvider'\n\nexport class MigrationRebaseFacade {\n\tconstructor(\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t\tprivate readonly migrationsValidator: MigrationsValidator,\n\t\tprivate readonly systemClientProvider: SystemClientProvider,\n\t\tprivate readonly migrationFilesManager: MigrationFilesManager,\n\t) {\n\t}\n\n\trebase = async (migrations: Migration[]) => {\n\t\tconst versions = migrations.map(it => it.version)\n\t\tconst schemaWithoutMigrations = await this.schemaVersionBuilder.buildSchemaAdvanced(\n\t\t\temptySchema,\n\t\t\tversion => !versions.includes(version),\n\t\t)\n\t\tconst valid = await this.migrationsValidator.validate(schemaWithoutMigrations, migrations)\n\t\tif (!valid) {\n\t\t\tthrow `Cannot rebase migrations`\n\t\t}\n\n\t\tlet i = 0\n\t\tfor (const migration of migrations) {\n\t\t\tconst name = migration.name.substring(MigrationVersionHelper.prefixLength + 1)\n\t\t\tconst [version, fullName] = MigrationVersionHelper.createVersion(name, i++)\n\t\t\tconst newMigration = {\n\t\t\t\tname: fullName,\n\t\t\t\tversion: version,\n\t\t\t\tformatVersion: migration.formatVersion,\n\t\t\t\tmodifications: migration.modifications,\n\t\t\t}\n\t\t\tawait this.systemClientProvider.get().migrationModify(migration.version, newMigration)\n\t\t\tawait this.migrationFilesManager.moveFile(migration.name, newMigration.name)\n\t\t}\n\t}\n}\n"],"names":["emptySchema","MigrationVersionHelper"],"mappings":";;;;;;;AAMO,MAAM,sBAAsB;AAAA,EAClC,YACkB,sBACA,qBACA,sBACA,uBAChB;AAJgB,SAAA,uBAAA;AACA,SAAA,sBAAA;AACA,SAAA,uBAAA;AACA,SAAA,wBAAA;AAIlB,kBAAA,MAAA,UAAS,OAAO,eAA4B;AAC3C,YAAM,WAAW,WAAW,IAAI,CAAA,OAAM,GAAG,OAAO;AAChD,YAAM,0BAA0B,MAAM,KAAK,qBAAqB;AAAA,QAC/DA,YAAAA;AAAAA,QACA,CAAA,YAAW,CAAC,SAAS,SAAS,OAAO;AAAA,MAAA;AAEtC,YAAM,QAAQ,MAAM,KAAK,oBAAoB,SAAS,yBAAyB,UAAU;AACzF,UAAI,CAAC,OAAO;AACX,cAAM;AAAA,MACP;AAEA,UAAI,IAAI;AACR,iBAAW,aAAa,YAAY;AACnC,cAAM,OAAO,UAAU,KAAK,UAAUC,aAAAA,uBAAuB,eAAe,CAAC;AAC7E,cAAM,CAAC,SAAS,QAAQ,IAAIA,aAAAA,uBAAuB,cAAc,MAAM,GAAG;AAC1E,cAAM,eAAe;AAAA,UACpB,MAAM;AAAA,UACN;AAAA,UACA,eAAe,UAAU;AAAA,UACzB,eAAe,UAAU;AAAA,QAAA;AAE1B,cAAM,KAAK,qBAAqB,IAAA,EAAM,gBAAgB,UAAU,SAAS,YAAY;AACrF,cAAM,KAAK,sBAAsB,SAAS,UAAU,MAAM,aAAa,IAAI;AAAA,MAC5E;AAAA,IACD,CAAA;AAAA,EA1BA;AA2BD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MigrationRebaseFacade.js","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationRebaseFacade.ts"],"sourcesContent":["import { Migration, MigrationFilesManager, SchemaVersionBuilder, SystemClient } from '@contember/migrations-client'\nimport { MigrationsValidator } from './MigrationsValidator'\nimport { emptySchema } from '@contember/schema-utils'\nimport { MigrationVersionHelper } from '@contember/engine-common'\nimport { SystemClientProvider } from '../SystemClientProvider'\n\nexport class MigrationRebaseFacade {\n\tconstructor(\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t\tprivate readonly migrationsValidator: MigrationsValidator,\n\t\tprivate readonly systemClientProvider: SystemClientProvider,\n\t\tprivate readonly migrationFilesManager: MigrationFilesManager,\n\t) {\n\t}\n\n\trebase = async (migrations: Migration[]) => {\n\t\tconst versions = migrations.map(it => it.version)\n\t\tconst schemaWithoutMigrations = await this.schemaVersionBuilder.buildSchemaAdvanced(\n\t\t\temptySchema,\n\t\t\tversion => !versions.includes(version),\n\t\t)\n\t\tconst valid = await this.migrationsValidator.validate(schemaWithoutMigrations, migrations)\n\t\tif (!valid) {\n\t\t\tthrow `Cannot rebase migrations`\n\t\t}\n\n\t\tlet i = 0\n\t\tfor (const migration of migrations) {\n\t\t\tconst name = migration.name.substring(MigrationVersionHelper.prefixLength + 1)\n\t\t\tconst [version, fullName] = MigrationVersionHelper.createVersion(name, i++)\n\t\t\tconst newMigration = {\n\t\t\t\tname: fullName,\n\t\t\t\tversion: version,\n\t\t\t\tformatVersion: migration.formatVersion,\n\t\t\t\tmodifications: migration.modifications,\n\t\t\t}\n\t\t\tawait this.systemClientProvider.get().migrationModify(migration.version, newMigration)\n\t\t\tawait this.migrationFilesManager.moveFile(migration.name, newMigration.name)\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";;;;;AAMO,MAAM,sBAAsB;AAAA,EAClC,YACkB,sBACA,qBACA,sBACA,uBAChB;AAJgB,SAAA,uBAAA;AACA,SAAA,sBAAA;AACA,SAAA,uBAAA;AACA,SAAA,wBAAA;AAIlB,kBAAA,MAAA,UAAS,OAAO,eAA4B;AAC3C,YAAM,WAAW,WAAW,IAAI,CAAA,OAAM,GAAG,OAAO;
|
|
1
|
+
{"version":3,"file":"MigrationRebaseFacade.js","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationRebaseFacade.ts"],"sourcesContent":["import { Migration, MigrationFilesManager, SchemaVersionBuilder, SystemClient } from '@contember/migrations-client'\nimport { MigrationsValidator } from './MigrationsValidator'\nimport { emptySchema } from '@contember/schema-utils'\nimport { MigrationVersionHelper } from '@contember/engine-common'\nimport { SystemClientProvider } from '../SystemClientProvider'\n\nexport class MigrationRebaseFacade {\n\tconstructor(\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t\tprivate readonly migrationsValidator: MigrationsValidator,\n\t\tprivate readonly systemClientProvider: SystemClientProvider,\n\t\tprivate readonly migrationFilesManager: MigrationFilesManager,\n\t) {\n\t}\n\n\trebase = async (migrations: Migration[]) => {\n\t\tconst versions = migrations.map(it => it.version)\n\t\tconst schemaWithoutMigrations = await this.schemaVersionBuilder.buildSchemaAdvanced(\n\t\t\temptySchema,\n\t\t\tversion => !versions.includes(version),\n\t\t)\n\t\tconst valid = await this.migrationsValidator.validate(schemaWithoutMigrations, migrations)\n\t\tif (!valid) {\n\t\t\tthrow `Cannot rebase migrations`\n\t\t}\n\n\t\tlet i = 0\n\t\tfor (const migration of migrations) {\n\t\t\tconst name = migration.name.substring(MigrationVersionHelper.prefixLength + 1)\n\t\t\tconst [version, fullName] = MigrationVersionHelper.createVersion(name, i++)\n\t\t\tconst newMigration = {\n\t\t\t\tname: fullName,\n\t\t\t\tversion: version,\n\t\t\t\tformatVersion: migration.formatVersion,\n\t\t\t\tmodifications: migration.modifications,\n\t\t\t}\n\t\t\tawait this.systemClientProvider.get().migrationModify(migration.version, newMigration)\n\t\t\tawait this.migrationFilesManager.moveFile(migration.name, newMigration.name)\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";;;;;AAMO,MAAM,sBAAsB;AAAA,EAClC,YACkB,sBACA,qBACA,sBACA,uBAChB;AAJgB,SAAA,uBAAA;AACA,SAAA,sBAAA;AACA,SAAA,uBAAA;AACA,SAAA,wBAAA;AAIlB,kBAAA,MAAA,UAAS,OAAO,eAA4B;AAC3C,YAAM,WAAW,WAAW,IAAI,CAAA,OAAM,GAAG,OAAO;AAChD,YAAM,0BAA0B,MAAM,KAAK,qBAAqB;AAAA,QAC/D;AAAA,QACA,CAAA,YAAW,CAAC,SAAS,SAAS,OAAO;AAAA,MAAA;AAEtC,YAAM,QAAQ,MAAM,KAAK,oBAAoB,SAAS,yBAAyB,UAAU;AACzF,UAAI,CAAC,OAAO;AACX,cAAM;AAAA,MACP;AAEA,UAAI,IAAI;AACR,iBAAW,aAAa,YAAY;AACnC,cAAM,OAAO,UAAU,KAAK,UAAU,uBAAuB,eAAe,CAAC;AAC7E,cAAM,CAAC,SAAS,QAAQ,IAAI,uBAAuB,cAAc,MAAM,GAAG;AAC1E,cAAM,eAAe;AAAA,UACpB,MAAM;AAAA,UACN;AAAA,UACA,eAAe,UAAU;AAAA,UACzB,eAAe,UAAU;AAAA,QAAA;AAE1B,cAAM,KAAK,qBAAqB,IAAA,EAAM,gBAAgB,UAAU,SAAS,YAAY;AACrF,cAAM,KAAK,sBAAsB,SAAS,UAAU,MAAM,aAAa,IAAI;AAAA,MAC5E;AAAA,IACD,CAAA;AAAA,EA1BA;AA2BD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MigrationsStatusFacade.cjs","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationsStatusFacade.ts"],"sourcesContent":["import { MigrationsResolver, MigrationsStatusResolver } from '@contember/migrations-client'\nimport { SystemClientProvider } from '../SystemClientProvider'\nimport { MigrationPrinter } from './MigrationPrinter'\n\nexport class MigrationsStatusFacade {\n\tconstructor(\n\t\tprivate readonly systemClientProvider: SystemClientProvider,\n\t\tprivate readonly migrationsResolver: MigrationsResolver,\n\t\tprivate readonly migrationsStatusResolver: MigrationsStatusResolver,\n\t\tprivate readonly migrationPrinter: MigrationPrinter,\n\t) {\n\t}\n\n\
|
|
1
|
+
{"version":3,"file":"MigrationsStatusFacade.cjs","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationsStatusFacade.ts"],"sourcesContent":["import { MigrationsResolver, MigrationsStatusResolver } from '@contember/migrations-client'\nimport { SystemClientProvider } from '../SystemClientProvider'\nimport { MigrationPrinter } from './MigrationPrinter'\n\nexport class MigrationsStatusFacade {\n\tconstructor(\n\t\tprivate readonly systemClientProvider: SystemClientProvider,\n\t\tprivate readonly migrationsResolver: MigrationsResolver,\n\t\tprivate readonly migrationsStatusResolver: MigrationsStatusResolver,\n\t\tprivate readonly migrationPrinter: MigrationPrinter,\n\t) {\n\t}\n\n\tpublic resolveMigrationsStatus = async ({ force, allowError }: { force?: boolean; allowError?: boolean }) => {\n\t\tconst executedMigrations = await this.systemClientProvider.get().listExecutedMigrations()\n\t\tconst localMigrations = await this.migrationsResolver.getMigrationFiles()\n\t\tconst status = await this.migrationsStatusResolver.getMigrationsStatus(executedMigrations, localMigrations, force)\n\t\tif (status.errorMigrations.length > 0 && !allowError) {\n\t\t\tconsole.error(this.migrationPrinter.printStatusTable(status.errorMigrations))\n\t\t\tif (!force) {\n\t\t\t\tthrow `Cannot execute migrations`\n\t\t\t}\n\t\t}\n\n\t\treturn status\n\t}\n}\n"],"names":[],"mappings":";;;;;AAIO,MAAM,uBAAuB;AAAA,EACnC,YACkB,sBACA,oBACA,0BACA,kBAChB;AAJgB,SAAA,uBAAA;AACA,SAAA,qBAAA;AACA,SAAA,2BAAA;AACA,SAAA,mBAAA;AAIlB,kBAAA,MAAO,2BAA0B,OAAO,EAAE,OAAO,iBAA4D;AAC5G,YAAM,qBAAqB,MAAM,KAAK,qBAAqB,IAAA,EAAM,uBAAA;AACjE,YAAM,kBAAkB,MAAM,KAAK,mBAAmB,kBAAA;AACtD,YAAM,SAAS,MAAM,KAAK,yBAAyB,oBAAoB,oBAAoB,iBAAiB,KAAK;AACjH,UAAI,OAAO,gBAAgB,SAAS,KAAK,CAAC,YAAY;AACrD,gBAAQ,MAAM,KAAK,iBAAiB,iBAAiB,OAAO,eAAe,CAAC;AAC5E,YAAI,CAAC,OAAO;AACX,gBAAM;AAAA,QACP;AAAA,MACD;AAEA,aAAO;AAAA,IACR,CAAA;AAAA,EAdA;AAeD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MigrationsStatusFacade.js","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationsStatusFacade.ts"],"sourcesContent":["import { MigrationsResolver, MigrationsStatusResolver } from '@contember/migrations-client'\nimport { SystemClientProvider } from '../SystemClientProvider'\nimport { MigrationPrinter } from './MigrationPrinter'\n\nexport class MigrationsStatusFacade {\n\tconstructor(\n\t\tprivate readonly systemClientProvider: SystemClientProvider,\n\t\tprivate readonly migrationsResolver: MigrationsResolver,\n\t\tprivate readonly migrationsStatusResolver: MigrationsStatusResolver,\n\t\tprivate readonly migrationPrinter: MigrationPrinter,\n\t) {\n\t}\n\n\
|
|
1
|
+
{"version":3,"file":"MigrationsStatusFacade.js","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationsStatusFacade.ts"],"sourcesContent":["import { MigrationsResolver, MigrationsStatusResolver } from '@contember/migrations-client'\nimport { SystemClientProvider } from '../SystemClientProvider'\nimport { MigrationPrinter } from './MigrationPrinter'\n\nexport class MigrationsStatusFacade {\n\tconstructor(\n\t\tprivate readonly systemClientProvider: SystemClientProvider,\n\t\tprivate readonly migrationsResolver: MigrationsResolver,\n\t\tprivate readonly migrationsStatusResolver: MigrationsStatusResolver,\n\t\tprivate readonly migrationPrinter: MigrationPrinter,\n\t) {\n\t}\n\n\tpublic resolveMigrationsStatus = async ({ force, allowError }: { force?: boolean; allowError?: boolean }) => {\n\t\tconst executedMigrations = await this.systemClientProvider.get().listExecutedMigrations()\n\t\tconst localMigrations = await this.migrationsResolver.getMigrationFiles()\n\t\tconst status = await this.migrationsStatusResolver.getMigrationsStatus(executedMigrations, localMigrations, force)\n\t\tif (status.errorMigrations.length > 0 && !allowError) {\n\t\t\tconsole.error(this.migrationPrinter.printStatusTable(status.errorMigrations))\n\t\t\tif (!force) {\n\t\t\t\tthrow `Cannot execute migrations`\n\t\t\t}\n\t\t}\n\n\t\treturn status\n\t}\n}\n"],"names":[],"mappings":";;;AAIO,MAAM,uBAAuB;AAAA,EACnC,YACkB,sBACA,oBACA,0BACA,kBAChB;AAJgB,SAAA,uBAAA;AACA,SAAA,qBAAA;AACA,SAAA,2BAAA;AACA,SAAA,mBAAA;AAIlB,kBAAA,MAAO,2BAA0B,OAAO,EAAE,OAAO,iBAA4D;AAC5G,YAAM,qBAAqB,MAAM,KAAK,qBAAqB,IAAA,EAAM,uBAAA;AACjE,YAAM,kBAAkB,MAAM,KAAK,mBAAmB,kBAAA;AACtD,YAAM,SAAS,MAAM,KAAK,yBAAyB,oBAAoB,oBAAoB,iBAAiB,KAAK;AACjH,UAAI,OAAO,gBAAgB,SAAS,KAAK,CAAC,YAAY;AACrD,gBAAQ,MAAM,KAAK,iBAAiB,iBAAiB,OAAO,eAAe,CAAC;AAC5E,YAAI,CAAC,OAAO;AACX,gBAAM;AAAA,QACP;AAAA,MACD;AAEA,aAAO;AAAA,IACR,CAAA;AAAA,EAdA;AAeD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MigrationsValidator.cjs","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationsValidator.ts"],"sourcesContent":["import { Migration } from '@contember/migrations-client'\nimport { Schema } from '@contember/schema'\nimport { SchemaValidatorSkippedErrors } from '@contember/schema-utils'\nimport { MigrationDescriber, MigrationVersionHelper, SchemaMigrator, SchemaUpdateError } from '@contember/schema-migrations'\nimport { validateSchemaAndPrintErrors } from '../schema/SchemaValidationHelper'\n\nexport class MigrationsValidator {\n\tconstructor(\n\t\tprivate readonly describer: MigrationDescriber,\n\t\tprivate readonly migrator: SchemaMigrator,\n\t) {\n\t}\n\n\tvalidate = (initialSchema: Schema, migrations: Migration[]): boolean => {\n\t\tlet migratedSchema = initialSchema\n\t\tlet projectValid = true\n\t\tlet skippedErrors: SchemaValidatorSkippedErrors[] = []\n\t\tfor (const migration of migrations) {\n\t\t\ttry {\n\t\t\t\t// just a check that it does not fail\n\t\t\t\tthis.describer.describeModifications(migratedSchema, migration)\n\n\t\t\t\tmigratedSchema = this.migrator.applyModifications(migratedSchema, migration.modifications, migration.formatVersion)\n\t\t\t} catch (e) {\n\t\t\t\tif (e instanceof SchemaUpdateError) {\n\t\t\t\t\tconsole.error(`Migration ${migration.name} has failed`)\n\t\t\t\t}\n\t\t\t\tthrow e\n\t\t\t}\n\t\t\tconst errorMessage = `Migration ${migration.name} produces invalid schema:`\n\t\t\tskippedErrors = [\n\t\t\t\t...skippedErrors.filter(it => it.skipUntil && MigrationVersionHelper.extractVersion(it.skipUntil) >= migration.version),\n\t\t\t\t...migration.skippedErrors ?? [],\n\t\t\t]\n\t\t\tprojectValid = validateSchemaAndPrintErrors(migratedSchema, errorMessage, skippedErrors)\n\t\t\t\t&& projectValid\n\t\t}\n\t\treturn projectValid\n\t}\n}\n"],"names":["SchemaUpdateError","MigrationVersionHelper","validateSchemaAndPrintErrors"],"mappings":";;;;;;;AAMO,MAAM,oBAAoB;AAAA,EAChC,YACkB,WACA,UAChB;AAFgB,SAAA,YAAA;AACA,SAAA,WAAA;
|
|
1
|
+
{"version":3,"file":"MigrationsValidator.cjs","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationsValidator.ts"],"sourcesContent":["import { Migration } from '@contember/migrations-client'\nimport { Schema } from '@contember/schema'\nimport { SchemaValidatorSkippedErrors } from '@contember/schema-utils'\nimport { MigrationDescriber, MigrationVersionHelper, SchemaMigrator, SchemaUpdateError } from '@contember/schema-migrations'\nimport { validateSchemaAndPrintErrors } from '../schema/SchemaValidationHelper'\n\nexport class MigrationsValidator {\n\tconstructor(\n\t\tprivate readonly describer: MigrationDescriber,\n\t\tprivate readonly migrator: SchemaMigrator,\n\t) {\n\t}\n\n\tvalidate = (initialSchema: Schema, migrations: Migration[]): boolean => {\n\t\tlet migratedSchema = initialSchema\n\t\tlet projectValid = true\n\t\tlet skippedErrors: SchemaValidatorSkippedErrors[] = []\n\t\tfor (const migration of migrations) {\n\t\t\ttry {\n\t\t\t\t// just a check that it does not fail\n\t\t\t\tthis.describer.describeModifications(migratedSchema, migration)\n\n\t\t\t\tmigratedSchema = this.migrator.applyModifications(migratedSchema, migration.modifications, migration.formatVersion)\n\t\t\t} catch (e) {\n\t\t\t\tif (e instanceof SchemaUpdateError) {\n\t\t\t\t\tconsole.error(`Migration ${migration.name} has failed`)\n\t\t\t\t}\n\t\t\t\tthrow e\n\t\t\t}\n\t\t\tconst errorMessage = `Migration ${migration.name} produces invalid schema:`\n\t\t\tskippedErrors = [\n\t\t\t\t...skippedErrors.filter(it => it.skipUntil && MigrationVersionHelper.extractVersion(it.skipUntil) >= migration.version),\n\t\t\t\t...migration.skippedErrors ?? [],\n\t\t\t]\n\t\t\tprojectValid = validateSchemaAndPrintErrors(migratedSchema, errorMessage, skippedErrors)\n\t\t\t\t&& projectValid\n\t\t}\n\t\treturn projectValid\n\t}\n}\n"],"names":["SchemaUpdateError","MigrationVersionHelper","validateSchemaAndPrintErrors"],"mappings":";;;;;;;AAMO,MAAM,oBAAoB;AAAA,EAChC,YACkB,WACA,UAChB;AAFgB,SAAA,YAAA;AACA,SAAA,WAAA;AAIlB,kBAAA,MAAA,YAAW,CAAC,eAAuB,eAAqC;AACvE,UAAI,iBAAiB;AACrB,UAAI,eAAe;AACnB,UAAI,gBAAgD,CAAA;AACpD,iBAAW,aAAa,YAAY;AACnC,YAAI;AAEH,eAAK,UAAU,sBAAsB,gBAAgB,SAAS;AAE9D,2BAAiB,KAAK,SAAS,mBAAmB,gBAAgB,UAAU,eAAe,UAAU,aAAa;AAAA,QACnH,SAAS,GAAG;AACX,cAAI,aAAaA,iBAAAA,mBAAmB;AACnC,oBAAQ,MAAM,aAAa,UAAU,IAAI,aAAa;AAAA,UACvD;AACA,gBAAM;AAAA,QACP;AACA,cAAM,eAAe,aAAa,UAAU,IAAI;AAChD,wBAAgB;AAAA,UACf,GAAG,cAAc,OAAO,CAAA,OAAM,GAAG,aAAaC,wCAAuB,eAAe,GAAG,SAAS,KAAK,UAAU,OAAO;AAAA,UACtH,GAAG,UAAU,iBAAiB,CAAA;AAAA,QAAC;AAEhC,uBAAeC,uBAAAA,6BAA6B,gBAAgB,cAAc,aAAa,KACnF;AAAA,MACL;AACA,aAAO;AAAA,IACR,CAAA;AAAA,EA3BA;AA4BD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MigrationsValidator.js","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationsValidator.ts"],"sourcesContent":["import { Migration } from '@contember/migrations-client'\nimport { Schema } from '@contember/schema'\nimport { SchemaValidatorSkippedErrors } from '@contember/schema-utils'\nimport { MigrationDescriber, MigrationVersionHelper, SchemaMigrator, SchemaUpdateError } from '@contember/schema-migrations'\nimport { validateSchemaAndPrintErrors } from '../schema/SchemaValidationHelper'\n\nexport class MigrationsValidator {\n\tconstructor(\n\t\tprivate readonly describer: MigrationDescriber,\n\t\tprivate readonly migrator: SchemaMigrator,\n\t) {\n\t}\n\n\tvalidate = (initialSchema: Schema, migrations: Migration[]): boolean => {\n\t\tlet migratedSchema = initialSchema\n\t\tlet projectValid = true\n\t\tlet skippedErrors: SchemaValidatorSkippedErrors[] = []\n\t\tfor (const migration of migrations) {\n\t\t\ttry {\n\t\t\t\t// just a check that it does not fail\n\t\t\t\tthis.describer.describeModifications(migratedSchema, migration)\n\n\t\t\t\tmigratedSchema = this.migrator.applyModifications(migratedSchema, migration.modifications, migration.formatVersion)\n\t\t\t} catch (e) {\n\t\t\t\tif (e instanceof SchemaUpdateError) {\n\t\t\t\t\tconsole.error(`Migration ${migration.name} has failed`)\n\t\t\t\t}\n\t\t\t\tthrow e\n\t\t\t}\n\t\t\tconst errorMessage = `Migration ${migration.name} produces invalid schema:`\n\t\t\tskippedErrors = [\n\t\t\t\t...skippedErrors.filter(it => it.skipUntil && MigrationVersionHelper.extractVersion(it.skipUntil) >= migration.version),\n\t\t\t\t...migration.skippedErrors ?? [],\n\t\t\t]\n\t\t\tprojectValid = validateSchemaAndPrintErrors(migratedSchema, errorMessage, skippedErrors)\n\t\t\t\t&& projectValid\n\t\t}\n\t\treturn projectValid\n\t}\n}\n"],"names":[],"mappings":";;;;;AAMO,MAAM,oBAAoB;AAAA,EAChC,YACkB,WACA,UAChB;AAFgB,SAAA,YAAA;AACA,SAAA,WAAA;
|
|
1
|
+
{"version":3,"file":"MigrationsValidator.js","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationsValidator.ts"],"sourcesContent":["import { Migration } from '@contember/migrations-client'\nimport { Schema } from '@contember/schema'\nimport { SchemaValidatorSkippedErrors } from '@contember/schema-utils'\nimport { MigrationDescriber, MigrationVersionHelper, SchemaMigrator, SchemaUpdateError } from '@contember/schema-migrations'\nimport { validateSchemaAndPrintErrors } from '../schema/SchemaValidationHelper'\n\nexport class MigrationsValidator {\n\tconstructor(\n\t\tprivate readonly describer: MigrationDescriber,\n\t\tprivate readonly migrator: SchemaMigrator,\n\t) {\n\t}\n\n\tvalidate = (initialSchema: Schema, migrations: Migration[]): boolean => {\n\t\tlet migratedSchema = initialSchema\n\t\tlet projectValid = true\n\t\tlet skippedErrors: SchemaValidatorSkippedErrors[] = []\n\t\tfor (const migration of migrations) {\n\t\t\ttry {\n\t\t\t\t// just a check that it does not fail\n\t\t\t\tthis.describer.describeModifications(migratedSchema, migration)\n\n\t\t\t\tmigratedSchema = this.migrator.applyModifications(migratedSchema, migration.modifications, migration.formatVersion)\n\t\t\t} catch (e) {\n\t\t\t\tif (e instanceof SchemaUpdateError) {\n\t\t\t\t\tconsole.error(`Migration ${migration.name} has failed`)\n\t\t\t\t}\n\t\t\t\tthrow e\n\t\t\t}\n\t\t\tconst errorMessage = `Migration ${migration.name} produces invalid schema:`\n\t\t\tskippedErrors = [\n\t\t\t\t...skippedErrors.filter(it => it.skipUntil && MigrationVersionHelper.extractVersion(it.skipUntil) >= migration.version),\n\t\t\t\t...migration.skippedErrors ?? [],\n\t\t\t]\n\t\t\tprojectValid = validateSchemaAndPrintErrors(migratedSchema, errorMessage, skippedErrors)\n\t\t\t\t&& projectValid\n\t\t}\n\t\treturn projectValid\n\t}\n}\n"],"names":[],"mappings":";;;;;AAMO,MAAM,oBAAoB;AAAA,EAChC,YACkB,WACA,UAChB;AAFgB,SAAA,YAAA;AACA,SAAA,WAAA;AAIlB,kBAAA,MAAA,YAAW,CAAC,eAAuB,eAAqC;AACvE,UAAI,iBAAiB;AACrB,UAAI,eAAe;AACnB,UAAI,gBAAgD,CAAA;AACpD,iBAAW,aAAa,YAAY;AACnC,YAAI;AAEH,eAAK,UAAU,sBAAsB,gBAAgB,SAAS;AAE9D,2BAAiB,KAAK,SAAS,mBAAmB,gBAAgB,UAAU,eAAe,UAAU,aAAa;AAAA,QACnH,SAAS,GAAG;AACX,cAAI,aAAa,mBAAmB;AACnC,oBAAQ,MAAM,aAAa,UAAU,IAAI,aAAa;AAAA,UACvD;AACA,gBAAM;AAAA,QACP;AACA,cAAM,eAAe,aAAa,UAAU,IAAI;AAChD,wBAAgB;AAAA,UACf,GAAG,cAAc,OAAO,CAAA,OAAM,GAAG,aAAa,uBAAuB,eAAe,GAAG,SAAS,KAAK,UAAU,OAAO;AAAA,UACtH,GAAG,UAAU,iBAAiB,CAAA;AAAA,QAAC;AAEhC,uBAAe,6BAA6B,gBAAgB,cAAc,aAAa,KACnF;AAAA,MACL;AACA,aAAO;AAAA,IACR,CAAA;AAAA,EA3BA;AA4BD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteProject.cjs","sources":["../../../../../../packages/cli/src/lib/project/RemoteProject.ts"],"sourcesContent":["export class RemoteProject {\n\tconstructor(\n\t\tpublic readonly name: string,\n\t\tpublic readonly endpoint: string,\n\t\tpublic readonly token: string,\n\t\tpublic readonly adminEndpoint?: string,\n\t) {\n\t}\n}\n"],"names":[],"mappings":";;AAAO,MAAM,cAAc;AAAA,EAC1B,YACiB,MACA,UACA,OACA,eACf;AAJe,SAAA,OAAA;AACA,SAAA,WAAA;AACA,SAAA,QAAA;AACA,SAAA,gBAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"RemoteProject.cjs","sources":["../../../../../../packages/cli/src/lib/project/RemoteProject.ts"],"sourcesContent":["export class RemoteProject {\n\tconstructor(\n\t\tpublic readonly name: string,\n\t\tpublic readonly endpoint: string,\n\t\tpublic readonly token: string,\n\t\tpublic readonly adminEndpoint?: string,\n\t) {\n\t}\n}\n"],"names":[],"mappings":";;AAAO,MAAM,cAAc;AAAA,EAC1B,YACiB,MACA,UACA,OACA,eACf;AAJe,SAAA,OAAA;AACA,SAAA,WAAA;AACA,SAAA,QAAA;AACA,SAAA,gBAAA;AAAA,EAEjB;AACD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteProject.js","sources":["../../../../../../packages/cli/src/lib/project/RemoteProject.ts"],"sourcesContent":["export class RemoteProject {\n\tconstructor(\n\t\tpublic readonly name: string,\n\t\tpublic readonly endpoint: string,\n\t\tpublic readonly token: string,\n\t\tpublic readonly adminEndpoint?: string,\n\t) {\n\t}\n}\n"],"names":[],"mappings":"AAAO,MAAM,cAAc;AAAA,EAC1B,YACiB,MACA,UACA,OACA,eACf;AAJe,SAAA,OAAA;AACA,SAAA,WAAA;AACA,SAAA,QAAA;AACA,SAAA,gBAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"RemoteProject.js","sources":["../../../../../../packages/cli/src/lib/project/RemoteProject.ts"],"sourcesContent":["export class RemoteProject {\n\tconstructor(\n\t\tpublic readonly name: string,\n\t\tpublic readonly endpoint: string,\n\t\tpublic readonly token: string,\n\t\tpublic readonly adminEndpoint?: string,\n\t) {\n\t}\n}\n"],"names":[],"mappings":"AAAO,MAAM,cAAc;AAAA,EAC1B,YACiB,MACA,UACA,OACA,eACf;AAJe,SAAA,OAAA;AACA,SAAA,WAAA;AACA,SAAA,QAAA;AACA,SAAA,gBAAA;AAAA,EAEjB;AACD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteProjectProvider.cjs","sources":["../../../../../../packages/cli/src/lib/project/RemoteProjectProvider.ts"],"sourcesContent":["import { RemoteProject } from './RemoteProject'\n\nexport class RemoteProjectProvider {\n\tprivate _remoteProject: RemoteProject | undefined = undefined\n\n\tpublic setRemoteProject(remoteProject: RemoteProject) {\n\t\tthis._remoteProject = remoteProject\n\t}\n\n\tpublic get(): RemoteProject {\n\t\tif (!this._remoteProject) {\n\t\t\tthrow new Error('Remote project not set')\n\t\t}\n\t\treturn this._remoteProject\n\t}\n}\n"],"names":[],"mappings":";;;;;AAEO,MAAM,sBAAsB;AAAA,EAA5B,cAAA;
|
|
1
|
+
{"version":3,"file":"RemoteProjectProvider.cjs","sources":["../../../../../../packages/cli/src/lib/project/RemoteProjectProvider.ts"],"sourcesContent":["import { RemoteProject } from './RemoteProject'\n\nexport class RemoteProjectProvider {\n\tprivate _remoteProject: RemoteProject | undefined = undefined\n\n\tpublic setRemoteProject(remoteProject: RemoteProject) {\n\t\tthis._remoteProject = remoteProject\n\t}\n\n\tpublic get(): RemoteProject {\n\t\tif (!this._remoteProject) {\n\t\t\tthrow new Error('Remote project not set')\n\t\t}\n\t\treturn this._remoteProject\n\t}\n}\n"],"names":[],"mappings":";;;;;AAEO,MAAM,sBAAsB;AAAA,EAA5B,cAAA;AACN,kBAAA,MAAQ,gBAAA;AAAA,EAAA;AAAA,EAED,iBAAiB,eAA8B;AACrD,SAAK,iBAAiB;AAAA,EACvB;AAAA,EAEO,MAAqB;AAC3B,QAAI,CAAC,KAAK,gBAAgB;AACzB,YAAM,IAAI,MAAM,wBAAwB;AAAA,IACzC;AACA,WAAO,KAAK;AAAA,EACb;AACD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteProjectProvider.js","sources":["../../../../../../packages/cli/src/lib/project/RemoteProjectProvider.ts"],"sourcesContent":["import { RemoteProject } from './RemoteProject'\n\nexport class RemoteProjectProvider {\n\tprivate _remoteProject: RemoteProject | undefined = undefined\n\n\tpublic setRemoteProject(remoteProject: RemoteProject) {\n\t\tthis._remoteProject = remoteProject\n\t}\n\n\tpublic get(): RemoteProject {\n\t\tif (!this._remoteProject) {\n\t\t\tthrow new Error('Remote project not set')\n\t\t}\n\t\treturn this._remoteProject\n\t}\n}\n"],"names":[],"mappings":";;;AAEO,MAAM,sBAAsB;AAAA,EAA5B,cAAA;
|
|
1
|
+
{"version":3,"file":"RemoteProjectProvider.js","sources":["../../../../../../packages/cli/src/lib/project/RemoteProjectProvider.ts"],"sourcesContent":["import { RemoteProject } from './RemoteProject'\n\nexport class RemoteProjectProvider {\n\tprivate _remoteProject: RemoteProject | undefined = undefined\n\n\tpublic setRemoteProject(remoteProject: RemoteProject) {\n\t\tthis._remoteProject = remoteProject\n\t}\n\n\tpublic get(): RemoteProject {\n\t\tif (!this._remoteProject) {\n\t\t\tthrow new Error('Remote project not set')\n\t\t}\n\t\treturn this._remoteProject\n\t}\n}\n"],"names":[],"mappings":";;;AAEO,MAAM,sBAAsB;AAAA,EAA5B,cAAA;AACN,kBAAA,MAAQ,gBAAA;AAAA,EAAA;AAAA,EAED,iBAAiB,eAA8B;AACrD,SAAK,iBAAiB;AAAA,EACvB;AAAA,EAEO,MAAqB;AAC3B,QAAI,CAAC,KAAK,gBAAgB;AACzB,YAAM,IAAI,MAAM,wBAAwB;AAAA,IACzC;AACA,WAAO,KAAK;AAAA,EACb;AACD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteProjectResolver.cjs","sources":["../../../../../../packages/cli/src/lib/project/RemoteProjectResolver.ts"],"sourcesContent":["import { parseDsn } from '../dsn'\nimport { RemoteProject } from './RemoteProject'\nimport { CliEnv } from '../env'\n\nexport class RemoteProjectResolver {\n\tconstructor(\n\t\tprivate readonly cliEnv: CliEnv,\n\t) {\n\t}\n\n\tresolve(identifier?: string, adminEndpoint?: string): RemoteProject | undefined {\n\t\tlet endpoint: string | undefined\n\t\tlet token: string | undefined\n\t\tlet project: string | undefined\n\t\tif (identifier?.includes('://')) {\n\t\t\t({ endpoint, project, token } = parseDsn(identifier))\n\t\t} else if (this.cliEnv.dsn) {\n\t\t\t({ endpoint, project, token } = parseDsn(this.cliEnv.dsn))\n\t\t} else {\n\t\t\tendpoint = this.cliEnv.apiUrl\n\t\t\ttoken = this.cliEnv.apiToken\n\t\t\tproject = !identifier || identifier === '.' ? this.cliEnv.projectName : identifier\n\t\t}\n\t\tif (!project || !endpoint || !token) {\n\t\t\treturn undefined\n\t\t}\n\t\tif (endpoint.endsWith('/')) {\n\t\t\tendpoint = endpoint.slice(0, -1)\n\t\t}\n\n\t\tif (!adminEndpoint && endpoint.endsWith('.contember.cloud') && !endpoint.includes('://api-')) {\n\t\t\tadminEndpoint = endpoint\n\t\t\tendpoint += '/_api'\n\t\t}\n\n\t\treturn new RemoteProject(project, endpoint, token, adminEndpoint)\n\t}\n}\n"],"names":["parseDsn","RemoteProject"],"mappings":";;;;AAIO,MAAM,sBAAsB;AAAA,EAClC,YACkB,QAChB;AADgB,SAAA,SAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"RemoteProjectResolver.cjs","sources":["../../../../../../packages/cli/src/lib/project/RemoteProjectResolver.ts"],"sourcesContent":["import { parseDsn } from '../dsn'\nimport { RemoteProject } from './RemoteProject'\nimport { CliEnv } from '../env'\n\nexport class RemoteProjectResolver {\n\tconstructor(\n\t\tprivate readonly cliEnv: CliEnv,\n\t) {\n\t}\n\n\tresolve(identifier?: string, adminEndpoint?: string): RemoteProject | undefined {\n\t\tlet endpoint: string | undefined\n\t\tlet token: string | undefined\n\t\tlet project: string | undefined\n\t\tif (identifier?.includes('://')) {\n\t\t\t;({ endpoint, project, token } = parseDsn(identifier))\n\t\t} else if (this.cliEnv.dsn) {\n\t\t\t;({ endpoint, project, token } = parseDsn(this.cliEnv.dsn))\n\t\t} else {\n\t\t\tendpoint = this.cliEnv.apiUrl\n\t\t\ttoken = this.cliEnv.apiToken\n\t\t\tproject = !identifier || identifier === '.' ? this.cliEnv.projectName : identifier\n\t\t}\n\t\tif (!project || !endpoint || !token) {\n\t\t\treturn undefined\n\t\t}\n\t\tif (endpoint.endsWith('/')) {\n\t\t\tendpoint = endpoint.slice(0, -1)\n\t\t}\n\n\t\tif (!adminEndpoint && endpoint.endsWith('.contember.cloud') && !endpoint.includes('://api-')) {\n\t\t\tadminEndpoint = endpoint\n\t\t\tendpoint += '/_api'\n\t\t}\n\n\t\treturn new RemoteProject(project, endpoint, token, adminEndpoint)\n\t}\n}\n"],"names":["parseDsn","RemoteProject"],"mappings":";;;;AAIO,MAAM,sBAAsB;AAAA,EAClC,YACkB,QAChB;AADgB,SAAA,SAAA;AAAA,EAElB;AAAA,EAEA,QAAQ,YAAqB,eAAmD;AAC/E,QAAI;AACJ,QAAI;AACJ,QAAI;AACJ,QAAI,YAAY,SAAS,KAAK,GAAG;AAC/B,OAAC,EAAE,UAAU,SAAS,MAAA,IAAUA,IAAAA,SAAS,UAAU;AAAA,IACrD,WAAW,KAAK,OAAO,KAAK;AAC1B,OAAC,EAAE,UAAU,SAAS,MAAA,IAAUA,IAAAA,SAAS,KAAK,OAAO,GAAG;AAAA,IAC1D,OAAO;AACN,iBAAW,KAAK,OAAO;AACvB,cAAQ,KAAK,OAAO;AACpB,gBAAU,CAAC,cAAc,eAAe,MAAM,KAAK,OAAO,cAAc;AAAA,IACzE;AACA,QAAI,CAAC,WAAW,CAAC,YAAY,CAAC,OAAO;AACpC,aAAO;AAAA,IACR;AACA,QAAI,SAAS,SAAS,GAAG,GAAG;AAC3B,iBAAW,SAAS,MAAM,GAAG,EAAE;AAAA,IAChC;AAEA,QAAI,CAAC,iBAAiB,SAAS,SAAS,kBAAkB,KAAK,CAAC,SAAS,SAAS,SAAS,GAAG;AAC7F,sBAAgB;AAChB,kBAAY;AAAA,IACb;AAEA,WAAO,IAAIC,cAAAA,cAAc,SAAS,UAAU,OAAO,aAAa;AAAA,EACjE;AACD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteProjectResolver.js","sources":["../../../../../../packages/cli/src/lib/project/RemoteProjectResolver.ts"],"sourcesContent":["import { parseDsn } from '../dsn'\nimport { RemoteProject } from './RemoteProject'\nimport { CliEnv } from '../env'\n\nexport class RemoteProjectResolver {\n\tconstructor(\n\t\tprivate readonly cliEnv: CliEnv,\n\t) {\n\t}\n\n\tresolve(identifier?: string, adminEndpoint?: string): RemoteProject | undefined {\n\t\tlet endpoint: string | undefined\n\t\tlet token: string | undefined\n\t\tlet project: string | undefined\n\t\tif (identifier?.includes('://')) {\n\t\t\t({ endpoint, project, token } = parseDsn(identifier))\n\t\t} else if (this.cliEnv.dsn) {\n\t\t\t({ endpoint, project, token } = parseDsn(this.cliEnv.dsn))\n\t\t} else {\n\t\t\tendpoint = this.cliEnv.apiUrl\n\t\t\ttoken = this.cliEnv.apiToken\n\t\t\tproject = !identifier || identifier === '.' ? this.cliEnv.projectName : identifier\n\t\t}\n\t\tif (!project || !endpoint || !token) {\n\t\t\treturn undefined\n\t\t}\n\t\tif (endpoint.endsWith('/')) {\n\t\t\tendpoint = endpoint.slice(0, -1)\n\t\t}\n\n\t\tif (!adminEndpoint && endpoint.endsWith('.contember.cloud') && !endpoint.includes('://api-')) {\n\t\t\tadminEndpoint = endpoint\n\t\t\tendpoint += '/_api'\n\t\t}\n\n\t\treturn new RemoteProject(project, endpoint, token, adminEndpoint)\n\t}\n}\n"],"names":[],"mappings":";;AAIO,MAAM,sBAAsB;AAAA,EAClC,YACkB,QAChB;AADgB,SAAA,SAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"RemoteProjectResolver.js","sources":["../../../../../../packages/cli/src/lib/project/RemoteProjectResolver.ts"],"sourcesContent":["import { parseDsn } from '../dsn'\nimport { RemoteProject } from './RemoteProject'\nimport { CliEnv } from '../env'\n\nexport class RemoteProjectResolver {\n\tconstructor(\n\t\tprivate readonly cliEnv: CliEnv,\n\t) {\n\t}\n\n\tresolve(identifier?: string, adminEndpoint?: string): RemoteProject | undefined {\n\t\tlet endpoint: string | undefined\n\t\tlet token: string | undefined\n\t\tlet project: string | undefined\n\t\tif (identifier?.includes('://')) {\n\t\t\t;({ endpoint, project, token } = parseDsn(identifier))\n\t\t} else if (this.cliEnv.dsn) {\n\t\t\t;({ endpoint, project, token } = parseDsn(this.cliEnv.dsn))\n\t\t} else {\n\t\t\tendpoint = this.cliEnv.apiUrl\n\t\t\ttoken = this.cliEnv.apiToken\n\t\t\tproject = !identifier || identifier === '.' ? this.cliEnv.projectName : identifier\n\t\t}\n\t\tif (!project || !endpoint || !token) {\n\t\t\treturn undefined\n\t\t}\n\t\tif (endpoint.endsWith('/')) {\n\t\t\tendpoint = endpoint.slice(0, -1)\n\t\t}\n\n\t\tif (!adminEndpoint && endpoint.endsWith('.contember.cloud') && !endpoint.includes('://api-')) {\n\t\t\tadminEndpoint = endpoint\n\t\t\tendpoint += '/_api'\n\t\t}\n\n\t\treturn new RemoteProject(project, endpoint, token, adminEndpoint)\n\t}\n}\n"],"names":[],"mappings":";;AAIO,MAAM,sBAAsB;AAAA,EAClC,YACkB,QAChB;AADgB,SAAA,SAAA;AAAA,EAElB;AAAA,EAEA,QAAQ,YAAqB,eAAmD;AAC/E,QAAI;AACJ,QAAI;AACJ,QAAI;AACJ,QAAI,YAAY,SAAS,KAAK,GAAG;AAC/B,OAAC,EAAE,UAAU,SAAS,MAAA,IAAU,SAAS,UAAU;AAAA,IACrD,WAAW,KAAK,OAAO,KAAK;AAC1B,OAAC,EAAE,UAAU,SAAS,MAAA,IAAU,SAAS,KAAK,OAAO,GAAG;AAAA,IAC1D,OAAO;AACN,iBAAW,KAAK,OAAO;AACvB,cAAQ,KAAK,OAAO;AACpB,gBAAU,CAAC,cAAc,eAAe,MAAM,KAAK,OAAO,cAAc;AAAA,IACzE;AACA,QAAI,CAAC,WAAW,CAAC,YAAY,CAAC,OAAO;AACpC,aAAO;AAAA,IACR;AACA,QAAI,SAAS,SAAS,GAAG,GAAG;AAC3B,iBAAW,SAAS,MAAM,GAAG,EAAE;AAAA,IAChC;AAEA,QAAI,CAAC,iBAAiB,SAAS,SAAS,kBAAkB,KAAK,CAAC,SAAS,SAAS,SAAS,GAAG;AAC7F,sBAAgB;AAChB,kBAAY;AAAA,IACb;AAEA,WAAO,IAAI,cAAc,SAAS,UAAU,OAAO,aAAa;AAAA,EACjE;AACD;"}
|
|
@@ -7,193 +7,151 @@ const FieldType = require("./FieldType.cjs");
|
|
|
7
7
|
const FieldPermissions = require("./FieldPermissions.cjs");
|
|
8
8
|
const OnDelete = require("./OnDelete.cjs");
|
|
9
9
|
require("preact");
|
|
10
|
-
const EntityInfo = ({ entity, schema, references }) => /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
11
|
-
"div",
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
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
|
+
/* @__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
|
+
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
13
|
+
lineNumber: 18,
|
|
14
|
+
columnNumber: 3
|
|
15
|
+
}, void 0),
|
|
16
|
+
/* @__PURE__ */ jsxDevRuntime.jsxDEV("div", { class: "px-2 py-2 flex flex-wrap ", children: [
|
|
17
|
+
/* @__PURE__ */ jsxDevRuntime.jsxDEV("div", { children: /* @__PURE__ */ jsxDevRuntime.jsxDEV("table", { children: [
|
|
18
|
+
/* @__PURE__ */ jsxDevRuntime.jsxDEV("thead", { children: /* @__PURE__ */ jsxDevRuntime.jsxDEV("tr", { children: [
|
|
19
|
+
/* @__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
|
+
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
21
|
+
lineNumber: 26,
|
|
22
|
+
columnNumber: 8
|
|
23
|
+
}, void 0),
|
|
24
|
+
/* @__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
|
+
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
26
|
+
lineNumber: 27,
|
|
27
|
+
columnNumber: 8
|
|
28
|
+
}, void 0),
|
|
29
|
+
Object.keys(schema.acl.roles).map((role) => /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
30
|
+
"th",
|
|
31
|
+
{
|
|
32
|
+
class: "text-left px-2 text-gray-500 font-normal w-[120px] max-w-[120px] text-xs truncate text-sm",
|
|
33
|
+
children: role
|
|
34
|
+
},
|
|
35
|
+
role,
|
|
36
|
+
false,
|
|
37
|
+
{
|
|
38
|
+
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
39
|
+
lineNumber: 29,
|
|
40
|
+
columnNumber: 9
|
|
41
|
+
},
|
|
42
|
+
void 0
|
|
43
|
+
))
|
|
44
|
+
] }, void 0, true, {
|
|
17
45
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
18
|
-
lineNumber:
|
|
19
|
-
columnNumber:
|
|
46
|
+
lineNumber: 25,
|
|
47
|
+
columnNumber: 7
|
|
48
|
+
}, void 0) }, void 0, false, {
|
|
49
|
+
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
50
|
+
lineNumber: 24,
|
|
51
|
+
columnNumber: 6
|
|
20
52
|
}, void 0),
|
|
21
|
-
/* @__PURE__ */ jsxDevRuntime.jsxDEV("
|
|
22
|
-
/* @__PURE__ */ jsxDevRuntime.jsxDEV("
|
|
23
|
-
/* @__PURE__ */ jsxDevRuntime.jsxDEV("thead", { children: /* @__PURE__ */ jsxDevRuntime.jsxDEV("tr", { children: [
|
|
24
|
-
/* @__PURE__ */ jsxDevRuntime.jsxDEV("th", { class: "text-left px-2 text-gray-500 font-normal w-[180px] max-w-[180px]", children: "Name" }, void 0, false, {
|
|
25
|
-
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
26
|
-
lineNumber: 27,
|
|
27
|
-
columnNumber: 8
|
|
28
|
-
}, void 0),
|
|
29
|
-
/* @__PURE__ */ jsxDevRuntime.jsxDEV("th", { class: "text-left px-2 text-gray-500 font-normal w-[340px] max-w-[340px]", children: "Type" }, void 0, false, {
|
|
30
|
-
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
31
|
-
lineNumber: 28,
|
|
32
|
-
columnNumber: 8
|
|
33
|
-
}, void 0),
|
|
34
|
-
Object.keys(schema.acl.roles).map((role) => /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
35
|
-
"th",
|
|
36
|
-
{
|
|
37
|
-
class: "text-left px-2 text-gray-500 font-normal w-[120px] max-w-[120px] text-xs truncate text-sm",
|
|
38
|
-
children: role
|
|
39
|
-
},
|
|
40
|
-
role,
|
|
41
|
-
false,
|
|
42
|
-
{
|
|
43
|
-
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
44
|
-
lineNumber: 29,
|
|
45
|
-
columnNumber: 51
|
|
46
|
-
},
|
|
47
|
-
void 0
|
|
48
|
-
))
|
|
49
|
-
] }, void 0, true, {
|
|
50
|
-
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
51
|
-
lineNumber: 26,
|
|
52
|
-
columnNumber: 7
|
|
53
|
-
}, void 0) }, void 0, false, {
|
|
54
|
-
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
55
|
-
lineNumber: 25,
|
|
56
|
-
columnNumber: 6
|
|
57
|
-
}, void 0),
|
|
58
|
-
/* @__PURE__ */ jsxDevRuntime.jsxDEV("tr", { children: [
|
|
59
|
-
/* @__PURE__ */ jsxDevRuntime.jsxDEV("td", {}, void 0, false, {
|
|
60
|
-
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
61
|
-
lineNumber: 35,
|
|
62
|
-
columnNumber: 7
|
|
63
|
-
}, void 0),
|
|
64
|
-
/* @__PURE__ */ jsxDevRuntime.jsxDEV("td", {}, void 0, false, {
|
|
65
|
-
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
66
|
-
lineNumber: 36,
|
|
67
|
-
columnNumber: 7
|
|
68
|
-
}, void 0),
|
|
69
|
-
Object.entries(schema.acl.roles).map(([name, role]) => /* @__PURE__ */ jsxDevRuntime.jsxDEV("td", { class: "px-2", children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
70
|
-
SinglePermission.SinglePermission,
|
|
71
|
-
{
|
|
72
|
-
value: "D",
|
|
73
|
-
predicate: role.entities[entity.name]?.operations.delete
|
|
74
|
-
},
|
|
75
|
-
void 0,
|
|
76
|
-
false,
|
|
77
|
-
{
|
|
78
|
-
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
79
|
-
lineNumber: 38,
|
|
80
|
-
columnNumber: 8
|
|
81
|
-
},
|
|
82
|
-
void 0
|
|
83
|
-
) }, name, false, {
|
|
84
|
-
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
85
|
-
lineNumber: 37,
|
|
86
|
-
columnNumber: 63
|
|
87
|
-
}, void 0))
|
|
88
|
-
] }, void 0, true, {
|
|
89
|
-
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
90
|
-
lineNumber: 34,
|
|
91
|
-
columnNumber: 6
|
|
92
|
-
}, void 0),
|
|
93
|
-
Object.values(entity.fields).map((field) => /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
94
|
-
"tr",
|
|
95
|
-
{
|
|
96
|
-
class: "even:bg-gray-100 target:bg-yellow-100",
|
|
97
|
-
id: utils.formatFieldAnchor(entity.name, field.name),
|
|
98
|
-
children: [
|
|
99
|
-
/* @__PURE__ */ jsxDevRuntime.jsxDEV("td", { class: "px-2 font-mono truncate w-[180px] max-w-[180px]", title: field.name, children: field.name }, void 0, false, {
|
|
100
|
-
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
101
|
-
lineNumber: 47,
|
|
102
|
-
columnNumber: 8
|
|
103
|
-
}, void 0),
|
|
104
|
-
/* @__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, {
|
|
105
|
-
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
106
|
-
lineNumber: 51,
|
|
107
|
-
columnNumber: 9
|
|
108
|
-
}, void 0) }, void 0, false, {
|
|
109
|
-
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
110
|
-
lineNumber: 50,
|
|
111
|
-
columnNumber: 8
|
|
112
|
-
}, void 0),
|
|
113
|
-
Object.entries(schema.acl.roles).map(([name, role]) => /* @__PURE__ */ jsxDevRuntime.jsxDEV("td", { class: "px-2", children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(
|
|
114
|
-
FieldPermissions.FieldPermissions,
|
|
115
|
-
{
|
|
116
|
-
field: field.name,
|
|
117
|
-
entityPermissions: role.entities[entity.name]
|
|
118
|
-
},
|
|
119
|
-
void 0,
|
|
120
|
-
false,
|
|
121
|
-
{
|
|
122
|
-
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
123
|
-
lineNumber: 54,
|
|
124
|
-
columnNumber: 9
|
|
125
|
-
},
|
|
126
|
-
void 0
|
|
127
|
-
) }, name, false, {
|
|
128
|
-
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
129
|
-
lineNumber: 53,
|
|
130
|
-
columnNumber: 64
|
|
131
|
-
}, void 0))
|
|
132
|
-
]
|
|
133
|
-
},
|
|
134
|
-
field.name,
|
|
135
|
-
true,
|
|
136
|
-
{
|
|
137
|
-
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
138
|
-
lineNumber: 43,
|
|
139
|
-
columnNumber: 7
|
|
140
|
-
},
|
|
141
|
-
void 0
|
|
142
|
-
))
|
|
143
|
-
] }, void 0, true, {
|
|
53
|
+
/* @__PURE__ */ jsxDevRuntime.jsxDEV("tr", { children: [
|
|
54
|
+
/* @__PURE__ */ jsxDevRuntime.jsxDEV("td", {}, void 0, false, {
|
|
144
55
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
145
|
-
lineNumber:
|
|
146
|
-
columnNumber:
|
|
147
|
-
}, void 0)
|
|
56
|
+
lineNumber: 39,
|
|
57
|
+
columnNumber: 7
|
|
58
|
+
}, void 0),
|
|
59
|
+
/* @__PURE__ */ jsxDevRuntime.jsxDEV("td", {}, void 0, false, {
|
|
148
60
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
149
|
-
lineNumber:
|
|
150
|
-
columnNumber:
|
|
61
|
+
lineNumber: 40,
|
|
62
|
+
columnNumber: 7
|
|
151
63
|
}, void 0),
|
|
152
|
-
/* @__PURE__ */ jsxDevRuntime.jsxDEV("
|
|
153
|
-
/* @__PURE__ */ jsxDevRuntime.jsxDEV("h3", { class: "text-lg text-gray-600", children: "On delete behaviour:" }, void 0, false, {
|
|
154
|
-
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
155
|
-
lineNumber: 63,
|
|
156
|
-
columnNumber: 5
|
|
157
|
-
}, void 0),
|
|
158
|
-
/* @__PURE__ */ jsxDevRuntime.jsxDEV("p", { class: "text-gray-500 text-sm", children: [
|
|
159
|
-
"(What happens when you attempt to delete entity ",
|
|
160
|
-
entity.name,
|
|
161
|
-
")"
|
|
162
|
-
] }, void 0, true, {
|
|
163
|
-
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
164
|
-
lineNumber: 64,
|
|
165
|
-
columnNumber: 5
|
|
166
|
-
}, void 0),
|
|
167
|
-
/* @__PURE__ */ jsxDevRuntime.jsxDEV("div", { class: "mt-2 text-sm ", children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(OnDelete.OnDelete, { references, entity }, void 0, false, {
|
|
168
|
-
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
169
|
-
lineNumber: 67,
|
|
170
|
-
columnNumber: 6
|
|
171
|
-
}, void 0) }, void 0, false, {
|
|
172
|
-
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
173
|
-
lineNumber: 66,
|
|
174
|
-
columnNumber: 5
|
|
175
|
-
}, void 0)
|
|
176
|
-
] }, void 0, true, {
|
|
64
|
+
Object.entries(schema.acl.roles).map(([name, role]) => /* @__PURE__ */ jsxDevRuntime.jsxDEV("td", { class: "px-2", children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(SinglePermission.SinglePermission, { value: "D", predicate: role.entities[entity.name]?.operations.delete }, void 0, false, {
|
|
177
65
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
178
|
-
lineNumber:
|
|
179
|
-
columnNumber:
|
|
66
|
+
lineNumber: 43,
|
|
67
|
+
columnNumber: 9
|
|
68
|
+
}, void 0) }, name, false, {
|
|
69
|
+
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
70
|
+
lineNumber: 42,
|
|
71
|
+
columnNumber: 8
|
|
72
|
+
}, void 0))
|
|
73
|
+
] }, void 0, true, {
|
|
74
|
+
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
75
|
+
lineNumber: 38,
|
|
76
|
+
columnNumber: 6
|
|
77
|
+
}, void 0),
|
|
78
|
+
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
|
+
/* @__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
|
+
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
81
|
+
lineNumber: 49,
|
|
82
|
+
columnNumber: 8
|
|
83
|
+
}, void 0),
|
|
84
|
+
/* @__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
|
+
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
86
|
+
lineNumber: 53,
|
|
87
|
+
columnNumber: 9
|
|
88
|
+
}, void 0) }, void 0, false, {
|
|
89
|
+
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
90
|
+
lineNumber: 52,
|
|
91
|
+
columnNumber: 8
|
|
180
92
|
}, void 0),
|
|
181
|
-
false
|
|
93
|
+
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
|
+
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
95
|
+
lineNumber: 57,
|
|
96
|
+
columnNumber: 10
|
|
97
|
+
}, void 0) }, name, false, {
|
|
98
|
+
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
99
|
+
lineNumber: 56,
|
|
100
|
+
columnNumber: 9
|
|
101
|
+
}, void 0))
|
|
102
|
+
] }, field.name, true, {
|
|
103
|
+
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
104
|
+
lineNumber: 48,
|
|
105
|
+
columnNumber: 7
|
|
106
|
+
}, void 0))
|
|
107
|
+
] }, void 0, true, {
|
|
108
|
+
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
109
|
+
lineNumber: 23,
|
|
110
|
+
columnNumber: 5
|
|
111
|
+
}, void 0) }, void 0, false, {
|
|
112
|
+
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
113
|
+
lineNumber: 22,
|
|
114
|
+
columnNumber: 4
|
|
115
|
+
}, void 0),
|
|
116
|
+
/* @__PURE__ */ jsxDevRuntime.jsxDEV("div", { class: "px-2 py-2 w-1/2", children: [
|
|
117
|
+
/* @__PURE__ */ jsxDevRuntime.jsxDEV("h3", { class: "text-lg text-gray-600", children: "On delete behaviour:" }, void 0, false, {
|
|
118
|
+
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
119
|
+
lineNumber: 65,
|
|
120
|
+
columnNumber: 5
|
|
121
|
+
}, void 0),
|
|
122
|
+
/* @__PURE__ */ jsxDevRuntime.jsxDEV("p", { class: "text-gray-500 text-sm", children: [
|
|
123
|
+
"(What happens when you attempt to delete entity ",
|
|
124
|
+
entity.name,
|
|
125
|
+
")"
|
|
182
126
|
] }, void 0, true, {
|
|
183
127
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
184
|
-
lineNumber:
|
|
185
|
-
columnNumber:
|
|
128
|
+
lineNumber: 66,
|
|
129
|
+
columnNumber: 5
|
|
130
|
+
}, void 0),
|
|
131
|
+
/* @__PURE__ */ jsxDevRuntime.jsxDEV("div", { class: "mt-2 text-sm ", children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(OnDelete.OnDelete, { references, entity }, void 0, false, {
|
|
132
|
+
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
133
|
+
lineNumber: 70,
|
|
134
|
+
columnNumber: 6
|
|
135
|
+
}, void 0) }, void 0, false, {
|
|
136
|
+
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
137
|
+
lineNumber: 69,
|
|
138
|
+
columnNumber: 5
|
|
186
139
|
}, void 0)
|
|
187
|
-
]
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
140
|
+
] }, void 0, true, {
|
|
141
|
+
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
142
|
+
lineNumber: 64,
|
|
143
|
+
columnNumber: 4
|
|
144
|
+
}, void 0),
|
|
145
|
+
false
|
|
146
|
+
] }, void 0, true, {
|
|
192
147
|
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
193
|
-
lineNumber:
|
|
194
|
-
columnNumber:
|
|
195
|
-
},
|
|
196
|
-
|
|
197
|
-
|
|
148
|
+
lineNumber: 21,
|
|
149
|
+
columnNumber: 3
|
|
150
|
+
}, void 0)
|
|
151
|
+
] }, void 0, true, {
|
|
152
|
+
fileName: "/home/runner/work/contember/contember/packages/cli/src/lib/project/docs/components/EntityInfo.tsx",
|
|
153
|
+
lineNumber: 17,
|
|
154
|
+
columnNumber: 2
|
|
155
|
+
}, void 0);
|
|
198
156
|
exports.EntityInfo = EntityInfo;
|
|
199
157
|
//# sourceMappingURL=EntityInfo.cjs.map
|