@contember/cli 1.4.0-rc.7 → 2.0.0-alpha.10
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/Dockerfile +0 -1
- package/build.sh +1 -1
- package/dist/development/run.cjs +31 -0
- package/dist/development/run.cjs.map +1 -0
- package/dist/development/run.js +30 -0
- package/dist/development/run.js.map +1 -0
- package/dist/development/src/commands/deploy/DeployCommand.cjs +87 -0
- package/dist/development/src/commands/deploy/DeployCommand.cjs.map +1 -0
- package/dist/development/src/commands/deploy/DeployCommand.js +87 -0
- package/dist/development/src/commands/deploy/DeployCommand.js.map +1 -0
- package/dist/development/src/commands/migrations/MigrationAmendCommand.cjs +123 -0
- package/dist/development/src/commands/migrations/MigrationAmendCommand.cjs.map +1 -0
- package/dist/development/src/commands/migrations/MigrationAmendCommand.js +123 -0
- package/dist/development/src/commands/migrations/MigrationAmendCommand.js.map +1 -0
- package/dist/development/src/commands/migrations/MigrationBlankCommand.cjs +23 -0
- package/dist/development/src/commands/migrations/MigrationBlankCommand.cjs.map +1 -0
- package/dist/development/src/commands/migrations/MigrationBlankCommand.js +23 -0
- package/dist/development/src/commands/migrations/MigrationBlankCommand.js.map +1 -0
- package/dist/development/src/commands/migrations/MigrationDescribeCommand.cjs +30 -0
- package/dist/development/src/commands/migrations/MigrationDescribeCommand.cjs.map +1 -0
- package/dist/development/src/commands/migrations/MigrationDescribeCommand.js +30 -0
- package/dist/development/src/commands/migrations/MigrationDescribeCommand.js.map +1 -0
- package/dist/development/src/commands/migrations/MigrationDiffCommand.cjs +76 -0
- package/dist/development/src/commands/migrations/MigrationDiffCommand.cjs.map +1 -0
- package/dist/development/src/commands/migrations/MigrationDiffCommand.js +76 -0
- package/dist/development/src/commands/migrations/MigrationDiffCommand.js.map +1 -0
- package/dist/development/src/commands/migrations/MigrationExecuteCommand.cjs +26 -0
- package/dist/development/src/commands/migrations/MigrationExecuteCommand.cjs.map +1 -0
- package/dist/development/src/commands/migrations/MigrationExecuteCommand.js +26 -0
- package/dist/development/src/commands/migrations/MigrationExecuteCommand.js.map +1 -0
- package/dist/development/src/commands/migrations/MigrationRebaseCommand.cjs +31 -0
- package/dist/development/src/commands/migrations/MigrationRebaseCommand.cjs.map +1 -0
- package/dist/development/src/commands/migrations/MigrationRebaseCommand.js +31 -0
- package/dist/development/src/commands/migrations/MigrationRebaseCommand.js.map +1 -0
- package/dist/development/src/commands/migrations/MigrationStatusCommand.cjs +57 -0
- package/dist/development/src/commands/migrations/MigrationStatusCommand.cjs.map +1 -0
- package/dist/development/src/commands/migrations/MigrationStatusCommand.js +57 -0
- package/dist/development/src/commands/migrations/MigrationStatusCommand.js.map +1 -0
- package/dist/development/src/commands/misc/VersionCommand.cjs +18 -0
- package/dist/development/src/commands/misc/VersionCommand.cjs.map +1 -0
- package/dist/development/src/commands/misc/VersionCommand.js +18 -0
- package/dist/development/src/commands/misc/VersionCommand.js.map +1 -0
- package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.cjs +36 -0
- package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.cjs.map +1 -0
- package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.js +36 -0
- package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.js.map +1 -0
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.cjs +69 -0
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -0
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.js +69 -0
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -0
- package/dist/development/src/commands/project/ProjectValidateCommand.cjs +40 -0
- package/dist/development/src/commands/project/ProjectValidateCommand.cjs.map +1 -0
- package/dist/development/src/commands/project/ProjectValidateCommand.js +40 -0
- package/dist/development/src/commands/project/ProjectValidateCommand.js.map +1 -0
- package/dist/development/src/commands/transfer/ExportCommand.cjs +66 -0
- package/dist/development/src/commands/transfer/ExportCommand.cjs.map +1 -0
- package/dist/development/src/commands/transfer/ExportCommand.js +66 -0
- package/dist/development/src/commands/transfer/ExportCommand.js.map +1 -0
- package/dist/development/src/commands/transfer/ImportCommand.cjs +60 -0
- package/dist/development/src/commands/transfer/ImportCommand.cjs.map +1 -0
- package/dist/development/src/commands/transfer/ImportCommand.js +60 -0
- package/dist/development/src/commands/transfer/ImportCommand.js.map +1 -0
- package/dist/development/src/commands/transfer/TransferCommand.cjs +73 -0
- package/dist/development/src/commands/transfer/TransferCommand.cjs.map +1 -0
- package/dist/development/src/commands/transfer/TransferCommand.js +73 -0
- package/dist/development/src/commands/transfer/TransferCommand.js.map +1 -0
- package/dist/development/src/commands/transfer/utils.cjs +22 -0
- package/dist/development/src/commands/transfer/utils.cjs.map +1 -0
- package/dist/development/src/commands/transfer/utils.js +22 -0
- package/dist/development/src/commands/transfer/utils.js.map +1 -0
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.cjs +54 -0
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.cjs.map +1 -0
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.js +54 -0
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +1 -0
- package/dist/development/src/consts.cjs +10 -0
- package/dist/development/src/consts.cjs.map +1 -0
- package/dist/development/src/consts.js +9 -0
- package/dist/development/src/consts.js.map +1 -0
- package/dist/development/src/dic.cjs +116 -0
- package/dist/development/src/dic.cjs.map +1 -0
- package/dist/development/src/dic.js +116 -0
- package/dist/development/src/dic.js.map +1 -0
- package/dist/development/src/lib/SystemClientProvider.cjs +14 -0
- package/dist/development/src/lib/SystemClientProvider.cjs.map +1 -0
- package/dist/development/src/lib/SystemClientProvider.js +14 -0
- package/dist/development/src/lib/SystemClientProvider.js.map +1 -0
- package/dist/development/src/lib/TenantClientProvider.cjs +14 -0
- package/dist/development/src/lib/TenantClientProvider.cjs.map +1 -0
- package/dist/development/src/lib/TenantClientProvider.js +14 -0
- package/dist/development/src/lib/TenantClientProvider.js.map +1 -0
- package/dist/development/src/lib/VersionChecker.cjs +85 -0
- package/dist/development/src/lib/VersionChecker.cjs.map +1 -0
- package/dist/development/src/lib/VersionChecker.js +68 -0
- package/dist/development/src/lib/VersionChecker.js.map +1 -0
- package/dist/development/src/lib/admin/AdminClient.cjs +30 -0
- package/dist/development/src/lib/admin/AdminClient.cjs.map +1 -0
- package/dist/development/src/lib/admin/AdminClient.js +30 -0
- package/dist/development/src/lib/admin/AdminClient.js.map +1 -0
- package/dist/development/src/lib/admin/AdminDeployer.cjs +36 -0
- package/dist/development/src/lib/admin/AdminDeployer.cjs.map +1 -0
- package/dist/development/src/lib/admin/AdminDeployer.js +36 -0
- package/dist/development/src/lib/admin/AdminDeployer.js.map +1 -0
- package/dist/development/src/lib/assertNever.cjs +7 -0
- package/dist/development/src/lib/assertNever.cjs.map +1 -0
- package/dist/development/src/lib/assertNever.js +7 -0
- package/dist/development/src/lib/assertNever.js.map +1 -0
- package/dist/development/src/lib/dsn.cjs +16 -0
- package/dist/development/src/lib/dsn.cjs.map +1 -0
- package/dist/development/src/lib/dsn.js +16 -0
- package/dist/development/src/lib/dsn.js.map +1 -0
- package/dist/development/src/lib/env.cjs +15 -0
- package/dist/development/src/lib/env.cjs.map +1 -0
- package/dist/development/src/lib/env.js +15 -0
- package/dist/development/src/lib/env.js.map +1 -0
- package/dist/development/src/lib/fs/DockerComposeManager.cjs +41 -0
- package/dist/development/src/lib/fs/DockerComposeManager.cjs.map +1 -0
- package/dist/development/src/lib/fs/DockerComposeManager.js +41 -0
- package/dist/development/src/lib/fs/DockerComposeManager.js.map +1 -0
- package/dist/development/src/lib/fs/FileSystem.cjs +43 -0
- package/dist/development/src/lib/fs/FileSystem.cjs.map +1 -0
- package/dist/development/src/lib/fs/FileSystem.js +27 -0
- package/dist/development/src/lib/fs/FileSystem.js.map +1 -0
- package/dist/development/src/lib/fs/YamlHandler.cjs +48 -0
- package/dist/development/src/lib/fs/YamlHandler.cjs.map +1 -0
- package/dist/development/src/lib/fs/YamlHandler.js +48 -0
- package/dist/development/src/lib/fs/YamlHandler.js.map +1 -0
- package/dist/development/src/lib/js/EsBuildBuilder.cjs +36 -0
- package/dist/development/src/lib/js/EsBuildBuilder.cjs.map +1 -0
- package/dist/development/src/lib/js/EsBuildBuilder.js +19 -0
- package/dist/development/src/lib/js/EsBuildBuilder.js.map +1 -0
- package/dist/development/src/lib/js/EvalExecutor.cjs +10 -0
- package/dist/development/src/lib/js/EvalExecutor.cjs.map +1 -0
- package/dist/development/src/lib/js/EvalExecutor.js +10 -0
- package/dist/development/src/lib/js/EvalExecutor.js.map +1 -0
- package/dist/development/src/lib/js/JsCodeRunner.cjs +17 -0
- package/dist/development/src/lib/js/JsCodeRunner.cjs.map +1 -0
- package/dist/development/src/lib/js/JsCodeRunner.js +17 -0
- package/dist/development/src/lib/js/JsCodeRunner.js.map +1 -0
- package/dist/development/src/lib/maskToken.cjs +5 -0
- package/dist/development/src/lib/maskToken.cjs.map +1 -0
- package/dist/development/src/lib/maskToken.js +5 -0
- package/dist/development/src/lib/maskToken.js.map +1 -0
- package/dist/development/src/lib/migrations/MigrationExecutionFacade.cjs +84 -0
- package/dist/development/src/lib/migrations/MigrationExecutionFacade.cjs.map +1 -0
- package/dist/development/src/lib/migrations/MigrationExecutionFacade.js +84 -0
- package/dist/development/src/lib/migrations/MigrationExecutionFacade.js.map +1 -0
- package/dist/development/src/lib/migrations/MigrationPrinter.cjs +82 -0
- package/dist/development/src/lib/migrations/MigrationPrinter.cjs.map +1 -0
- package/dist/development/src/lib/migrations/MigrationPrinter.js +82 -0
- package/dist/development/src/lib/migrations/MigrationPrinter.js.map +1 -0
- package/dist/development/src/lib/migrations/MigrationRebaseFacade.cjs +41 -0
- package/dist/development/src/lib/migrations/MigrationRebaseFacade.cjs.map +1 -0
- package/dist/development/src/lib/migrations/MigrationRebaseFacade.js +41 -0
- package/dist/development/src/lib/migrations/MigrationRebaseFacade.js.map +1 -0
- package/dist/development/src/lib/migrations/MigrationsStatusFacade.cjs +27 -0
- package/dist/development/src/lib/migrations/MigrationsStatusFacade.cjs.map +1 -0
- package/dist/development/src/lib/migrations/MigrationsStatusFacade.js +27 -0
- package/dist/development/src/lib/migrations/MigrationsStatusFacade.js.map +1 -0
- package/dist/development/src/lib/migrations/MigrationsValidator.cjs +38 -0
- package/dist/development/src/lib/migrations/MigrationsValidator.cjs.map +1 -0
- package/dist/development/src/lib/migrations/MigrationsValidator.js +38 -0
- package/dist/development/src/lib/migrations/MigrationsValidator.js.map +1 -0
- package/dist/development/src/lib/migrations/migrations.cjs +43 -0
- package/dist/development/src/lib/migrations/migrations.cjs.map +1 -0
- package/dist/development/src/lib/migrations/migrations.js +43 -0
- package/dist/development/src/lib/migrations/migrations.js.map +1 -0
- package/dist/development/src/lib/project/RemoteProject.cjs +12 -0
- package/dist/development/src/lib/project/RemoteProject.cjs.map +1 -0
- package/dist/development/src/lib/project/RemoteProject.js +12 -0
- package/dist/development/src/lib/project/RemoteProject.js.map +1 -0
- package/dist/development/src/lib/project/RemoteProjectProvider.cjs +21 -0
- package/dist/development/src/lib/project/RemoteProjectProvider.cjs.map +1 -0
- package/dist/development/src/lib/project/RemoteProjectProvider.js +21 -0
- package/dist/development/src/lib/project/RemoteProjectProvider.js.map +1 -0
- package/dist/development/src/lib/project/RemoteProjectResolver.cjs +29 -0
- package/dist/development/src/lib/project/RemoteProjectResolver.cjs.map +1 -0
- package/dist/development/src/lib/project/RemoteProjectResolver.js +29 -0
- package/dist/development/src/lib/project/RemoteProjectResolver.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/EntityInfo.cjs +199 -0
- package/dist/development/src/lib/project/docs/components/EntityInfo.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/EntityInfo.js +199 -0
- package/dist/development/src/lib/project/docs/components/EntityInfo.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/EntityLink.cjs +11 -0
- package/dist/development/src/lib/project/docs/components/EntityLink.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/EntityLink.js +11 -0
- package/dist/development/src/lib/project/docs/components/EntityLink.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/FieldLink.cjs +31 -0
- package/dist/development/src/lib/project/docs/components/FieldLink.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/FieldLink.js +31 -0
- package/dist/development/src/lib/project/docs/components/FieldLink.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/FieldPermissions.cjs +33 -0
- package/dist/development/src/lib/project/docs/components/FieldPermissions.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/FieldPermissions.js +33 -0
- package/dist/development/src/lib/project/docs/components/FieldPermissions.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/FieldType.cjs +135 -0
- package/dist/development/src/lib/project/docs/components/FieldType.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/FieldType.js +135 -0
- package/dist/development/src/lib/project/docs/components/FieldType.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/OnDelete.cjs +134 -0
- package/dist/development/src/lib/project/docs/components/OnDelete.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/OnDelete.js +134 -0
- package/dist/development/src/lib/project/docs/components/OnDelete.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/ProjectInfo.cjs +96 -0
- package/dist/development/src/lib/project/docs/components/ProjectInfo.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/ProjectInfo.js +96 -0
- package/dist/development/src/lib/project/docs/components/ProjectInfo.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/SinglePermission.cjs +26 -0
- package/dist/development/src/lib/project/docs/components/SinglePermission.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/SinglePermission.js +26 -0
- package/dist/development/src/lib/project/docs/components/SinglePermission.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/utils.cjs +7 -0
- package/dist/development/src/lib/project/docs/components/utils.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/utils.js +7 -0
- package/dist/development/src/lib/project/docs/components/utils.js.map +1 -0
- package/dist/development/src/lib/project/docs/projectDescribe.cjs +32 -0
- package/dist/development/src/lib/project/docs/projectDescribe.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/projectDescribe.js +31 -0
- package/dist/development/src/lib/project/docs/projectDescribe.js.map +1 -0
- package/dist/development/src/lib/schema/SchemaLoader.cjs +49 -0
- package/dist/development/src/lib/schema/SchemaLoader.cjs.map +1 -0
- package/dist/development/src/lib/schema/SchemaLoader.js +32 -0
- package/dist/development/src/lib/schema/SchemaLoader.js.map +1 -0
- package/dist/development/src/lib/schema/SchemaValidationHelper.cjs +11 -0
- package/dist/development/src/lib/schema/SchemaValidationHelper.cjs.map +1 -0
- package/dist/development/src/lib/schema/SchemaValidationHelper.js +11 -0
- package/dist/development/src/lib/schema/SchemaValidationHelper.js.map +1 -0
- package/dist/development/src/lib/schema/SchemaValidationPrinter.cjs +14 -0
- package/dist/development/src/lib/schema/SchemaValidationPrinter.cjs.map +1 -0
- package/dist/development/src/lib/schema/SchemaValidationPrinter.js +14 -0
- package/dist/development/src/lib/schema/SchemaValidationPrinter.js.map +1 -0
- package/dist/development/src/lib/schema/collectReferences.cjs +34 -0
- package/dist/development/src/lib/schema/collectReferences.cjs.map +1 -0
- package/dist/development/src/lib/schema/collectReferences.js +34 -0
- package/dist/development/src/lib/schema/collectReferences.js.map +1 -0
- package/dist/development/src/lib/stream.cjs +43 -0
- package/dist/development/src/lib/stream.cjs.map +1 -0
- package/dist/development/src/lib/stream.js +43 -0
- package/dist/development/src/lib/stream.js.map +1 -0
- package/dist/development/src/lib/tenant/TenantClient.cjs +45 -0
- package/dist/development/src/lib/tenant/TenantClient.cjs.map +1 -0
- package/dist/development/src/lib/tenant/TenantClient.js +45 -0
- package/dist/development/src/lib/tenant/TenantClient.js.map +1 -0
- package/dist/development/src/lib/transfer/DataTransferClient.cjs +97 -0
- package/dist/development/src/lib/transfer/DataTransferClient.cjs.map +1 -0
- package/dist/development/src/lib/transfer/DataTransferClient.js +97 -0
- package/dist/development/src/lib/transfer/DataTransferClient.js.map +1 -0
- package/dist/development/src/lib/transfer/stdio.cjs +12 -0
- package/dist/development/src/lib/transfer/stdio.cjs.map +1 -0
- package/dist/development/src/lib/transfer/stdio.js +12 -0
- package/dist/development/src/lib/transfer/stdio.js.map +1 -0
- package/dist/development/src/lib/workspace/WorkspaceResolver.cjs +38 -0
- package/dist/development/src/lib/workspace/WorkspaceResolver.cjs.map +1 -0
- package/dist/development/src/lib/workspace/WorkspaceResolver.js +38 -0
- package/dist/development/src/lib/workspace/WorkspaceResolver.js.map +1 -0
- package/dist/production/run.cjs +31 -0
- package/dist/production/run.cjs.map +1 -0
- package/dist/production/run.js +30 -0
- package/dist/production/run.js.map +1 -0
- package/dist/production/src/commands/deploy/DeployCommand.cjs +87 -0
- package/dist/production/src/commands/deploy/DeployCommand.cjs.map +1 -0
- package/dist/production/src/commands/deploy/DeployCommand.js +87 -0
- package/dist/production/src/commands/deploy/DeployCommand.js.map +1 -0
- package/dist/production/src/commands/migrations/MigrationAmendCommand.cjs +123 -0
- package/dist/production/src/commands/migrations/MigrationAmendCommand.cjs.map +1 -0
- package/dist/production/src/commands/migrations/MigrationAmendCommand.js +123 -0
- package/dist/production/src/commands/migrations/MigrationAmendCommand.js.map +1 -0
- package/dist/production/src/commands/migrations/MigrationBlankCommand.cjs +23 -0
- package/dist/production/src/commands/migrations/MigrationBlankCommand.cjs.map +1 -0
- package/dist/production/src/commands/migrations/MigrationBlankCommand.js +23 -0
- package/dist/production/src/commands/migrations/MigrationBlankCommand.js.map +1 -0
- package/dist/production/src/commands/migrations/MigrationDescribeCommand.cjs +30 -0
- package/dist/production/src/commands/migrations/MigrationDescribeCommand.cjs.map +1 -0
- package/dist/production/src/commands/migrations/MigrationDescribeCommand.js +30 -0
- package/dist/production/src/commands/migrations/MigrationDescribeCommand.js.map +1 -0
- package/dist/production/src/commands/migrations/MigrationDiffCommand.cjs +76 -0
- package/dist/production/src/commands/migrations/MigrationDiffCommand.cjs.map +1 -0
- package/dist/production/src/commands/migrations/MigrationDiffCommand.js +76 -0
- package/dist/production/src/commands/migrations/MigrationDiffCommand.js.map +1 -0
- package/dist/production/src/commands/migrations/MigrationExecuteCommand.cjs +26 -0
- package/dist/production/src/commands/migrations/MigrationExecuteCommand.cjs.map +1 -0
- package/dist/production/src/commands/migrations/MigrationExecuteCommand.js +26 -0
- package/dist/production/src/commands/migrations/MigrationExecuteCommand.js.map +1 -0
- package/dist/production/src/commands/migrations/MigrationRebaseCommand.cjs +31 -0
- package/dist/production/src/commands/migrations/MigrationRebaseCommand.cjs.map +1 -0
- package/dist/production/src/commands/migrations/MigrationRebaseCommand.js +31 -0
- package/dist/production/src/commands/migrations/MigrationRebaseCommand.js.map +1 -0
- package/dist/production/src/commands/migrations/MigrationStatusCommand.cjs +57 -0
- package/dist/production/src/commands/migrations/MigrationStatusCommand.cjs.map +1 -0
- package/dist/production/src/commands/migrations/MigrationStatusCommand.js +57 -0
- package/dist/production/src/commands/migrations/MigrationStatusCommand.js.map +1 -0
- package/dist/production/src/commands/misc/VersionCommand.cjs +18 -0
- package/dist/production/src/commands/misc/VersionCommand.cjs.map +1 -0
- package/dist/production/src/commands/misc/VersionCommand.js +18 -0
- package/dist/production/src/commands/misc/VersionCommand.js.map +1 -0
- package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.cjs +36 -0
- package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.cjs.map +1 -0
- package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.js +36 -0
- package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.js.map +1 -0
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.cjs +69 -0
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -0
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.js +69 -0
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -0
- package/dist/production/src/commands/project/ProjectValidateCommand.cjs +40 -0
- package/dist/production/src/commands/project/ProjectValidateCommand.cjs.map +1 -0
- package/dist/production/src/commands/project/ProjectValidateCommand.js +40 -0
- package/dist/production/src/commands/project/ProjectValidateCommand.js.map +1 -0
- package/dist/production/src/commands/transfer/ExportCommand.cjs +66 -0
- package/dist/production/src/commands/transfer/ExportCommand.cjs.map +1 -0
- package/dist/production/src/commands/transfer/ExportCommand.js +66 -0
- package/dist/production/src/commands/transfer/ExportCommand.js.map +1 -0
- package/dist/production/src/commands/transfer/ImportCommand.cjs +60 -0
- package/dist/production/src/commands/transfer/ImportCommand.cjs.map +1 -0
- package/dist/production/src/commands/transfer/ImportCommand.js +60 -0
- package/dist/production/src/commands/transfer/ImportCommand.js.map +1 -0
- package/dist/production/src/commands/transfer/TransferCommand.cjs +73 -0
- package/dist/production/src/commands/transfer/TransferCommand.cjs.map +1 -0
- package/dist/production/src/commands/transfer/TransferCommand.js +73 -0
- package/dist/production/src/commands/transfer/TransferCommand.js.map +1 -0
- package/dist/production/src/commands/transfer/utils.cjs +22 -0
- package/dist/production/src/commands/transfer/utils.cjs.map +1 -0
- package/dist/production/src/commands/transfer/utils.js +22 -0
- package/dist/production/src/commands/transfer/utils.js.map +1 -0
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.cjs +54 -0
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.cjs.map +1 -0
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.js +54 -0
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +1 -0
- package/dist/production/src/consts.cjs +10 -0
- package/dist/production/src/consts.cjs.map +1 -0
- package/dist/production/src/consts.js +9 -0
- package/dist/production/src/consts.js.map +1 -0
- package/dist/production/src/dic.cjs +116 -0
- package/dist/production/src/dic.cjs.map +1 -0
- package/dist/production/src/dic.js +116 -0
- package/dist/production/src/dic.js.map +1 -0
- package/dist/production/src/lib/SystemClientProvider.cjs +14 -0
- package/dist/production/src/lib/SystemClientProvider.cjs.map +1 -0
- package/dist/production/src/lib/SystemClientProvider.js +14 -0
- package/dist/production/src/lib/SystemClientProvider.js.map +1 -0
- package/dist/production/src/lib/TenantClientProvider.cjs +14 -0
- package/dist/production/src/lib/TenantClientProvider.cjs.map +1 -0
- package/dist/production/src/lib/TenantClientProvider.js +14 -0
- package/dist/production/src/lib/TenantClientProvider.js.map +1 -0
- package/dist/production/src/lib/VersionChecker.cjs +85 -0
- package/dist/production/src/lib/VersionChecker.cjs.map +1 -0
- package/dist/production/src/lib/VersionChecker.js +68 -0
- package/dist/production/src/lib/VersionChecker.js.map +1 -0
- package/dist/production/src/lib/admin/AdminClient.cjs +30 -0
- package/dist/production/src/lib/admin/AdminClient.cjs.map +1 -0
- package/dist/production/src/lib/admin/AdminClient.js +30 -0
- package/dist/production/src/lib/admin/AdminClient.js.map +1 -0
- package/dist/production/src/lib/admin/AdminDeployer.cjs +36 -0
- package/dist/production/src/lib/admin/AdminDeployer.cjs.map +1 -0
- package/dist/production/src/lib/admin/AdminDeployer.js +36 -0
- package/dist/production/src/lib/admin/AdminDeployer.js.map +1 -0
- package/dist/production/src/lib/assertNever.cjs +7 -0
- package/dist/production/src/lib/assertNever.cjs.map +1 -0
- package/dist/production/src/lib/assertNever.js +7 -0
- package/dist/production/src/lib/assertNever.js.map +1 -0
- package/dist/production/src/lib/dsn.cjs +16 -0
- package/dist/production/src/lib/dsn.cjs.map +1 -0
- package/dist/production/src/lib/dsn.js +16 -0
- package/dist/production/src/lib/dsn.js.map +1 -0
- package/dist/production/src/lib/env.cjs +15 -0
- package/dist/production/src/lib/env.cjs.map +1 -0
- package/dist/production/src/lib/env.js +15 -0
- package/dist/production/src/lib/env.js.map +1 -0
- package/dist/production/src/lib/fs/DockerComposeManager.cjs +41 -0
- package/dist/production/src/lib/fs/DockerComposeManager.cjs.map +1 -0
- package/dist/production/src/lib/fs/DockerComposeManager.js +41 -0
- package/dist/production/src/lib/fs/DockerComposeManager.js.map +1 -0
- package/dist/production/src/lib/fs/FileSystem.cjs +43 -0
- package/dist/production/src/lib/fs/FileSystem.cjs.map +1 -0
- package/dist/production/src/lib/fs/FileSystem.js +27 -0
- package/dist/production/src/lib/fs/FileSystem.js.map +1 -0
- package/dist/production/src/lib/fs/YamlHandler.cjs +48 -0
- package/dist/production/src/lib/fs/YamlHandler.cjs.map +1 -0
- package/dist/production/src/lib/fs/YamlHandler.js +48 -0
- package/dist/production/src/lib/fs/YamlHandler.js.map +1 -0
- package/dist/production/src/lib/js/EsBuildBuilder.cjs +36 -0
- package/dist/production/src/lib/js/EsBuildBuilder.cjs.map +1 -0
- package/dist/production/src/lib/js/EsBuildBuilder.js +19 -0
- package/dist/production/src/lib/js/EsBuildBuilder.js.map +1 -0
- package/dist/production/src/lib/js/EvalExecutor.cjs +10 -0
- package/dist/production/src/lib/js/EvalExecutor.cjs.map +1 -0
- package/dist/production/src/lib/js/EvalExecutor.js +10 -0
- package/dist/production/src/lib/js/EvalExecutor.js.map +1 -0
- package/dist/production/src/lib/js/JsCodeRunner.cjs +17 -0
- package/dist/production/src/lib/js/JsCodeRunner.cjs.map +1 -0
- package/dist/production/src/lib/js/JsCodeRunner.js +17 -0
- package/dist/production/src/lib/js/JsCodeRunner.js.map +1 -0
- package/dist/production/src/lib/maskToken.cjs +5 -0
- package/dist/production/src/lib/maskToken.cjs.map +1 -0
- package/dist/production/src/lib/maskToken.js +5 -0
- package/dist/production/src/lib/maskToken.js.map +1 -0
- package/dist/production/src/lib/migrations/MigrationExecutionFacade.cjs +84 -0
- package/dist/production/src/lib/migrations/MigrationExecutionFacade.cjs.map +1 -0
- package/dist/production/src/lib/migrations/MigrationExecutionFacade.js +84 -0
- package/dist/production/src/lib/migrations/MigrationExecutionFacade.js.map +1 -0
- package/dist/production/src/lib/migrations/MigrationPrinter.cjs +82 -0
- package/dist/production/src/lib/migrations/MigrationPrinter.cjs.map +1 -0
- package/dist/production/src/lib/migrations/MigrationPrinter.js +82 -0
- package/dist/production/src/lib/migrations/MigrationPrinter.js.map +1 -0
- package/dist/production/src/lib/migrations/MigrationRebaseFacade.cjs +41 -0
- package/dist/production/src/lib/migrations/MigrationRebaseFacade.cjs.map +1 -0
- package/dist/production/src/lib/migrations/MigrationRebaseFacade.js +41 -0
- package/dist/production/src/lib/migrations/MigrationRebaseFacade.js.map +1 -0
- package/dist/production/src/lib/migrations/MigrationsStatusFacade.cjs +27 -0
- package/dist/production/src/lib/migrations/MigrationsStatusFacade.cjs.map +1 -0
- package/dist/production/src/lib/migrations/MigrationsStatusFacade.js +27 -0
- package/dist/production/src/lib/migrations/MigrationsStatusFacade.js.map +1 -0
- package/dist/production/src/lib/migrations/MigrationsValidator.cjs +38 -0
- package/dist/production/src/lib/migrations/MigrationsValidator.cjs.map +1 -0
- package/dist/production/src/lib/migrations/MigrationsValidator.js +38 -0
- package/dist/production/src/lib/migrations/MigrationsValidator.js.map +1 -0
- package/dist/production/src/lib/migrations/migrations.cjs +43 -0
- package/dist/production/src/lib/migrations/migrations.cjs.map +1 -0
- package/dist/production/src/lib/migrations/migrations.js +43 -0
- package/dist/production/src/lib/migrations/migrations.js.map +1 -0
- package/dist/production/src/lib/project/RemoteProject.cjs +12 -0
- package/dist/production/src/lib/project/RemoteProject.cjs.map +1 -0
- package/dist/production/src/lib/project/RemoteProject.js +12 -0
- package/dist/production/src/lib/project/RemoteProject.js.map +1 -0
- package/dist/production/src/lib/project/RemoteProjectProvider.cjs +21 -0
- package/dist/production/src/lib/project/RemoteProjectProvider.cjs.map +1 -0
- package/dist/production/src/lib/project/RemoteProjectProvider.js +21 -0
- package/dist/production/src/lib/project/RemoteProjectProvider.js.map +1 -0
- package/dist/production/src/lib/project/RemoteProjectResolver.cjs +29 -0
- package/dist/production/src/lib/project/RemoteProjectResolver.cjs.map +1 -0
- package/dist/production/src/lib/project/RemoteProjectResolver.js +29 -0
- package/dist/production/src/lib/project/RemoteProjectResolver.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/EntityInfo.cjs +77 -0
- package/dist/production/src/lib/project/docs/components/EntityInfo.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/EntityInfo.js +77 -0
- package/dist/production/src/lib/project/docs/components/EntityInfo.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/EntityLink.cjs +7 -0
- package/dist/production/src/lib/project/docs/components/EntityLink.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/EntityLink.js +7 -0
- package/dist/production/src/lib/project/docs/components/EntityLink.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/FieldLink.cjs +15 -0
- package/dist/production/src/lib/project/docs/components/FieldLink.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/FieldLink.js +15 -0
- package/dist/production/src/lib/project/docs/components/FieldLink.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/FieldPermissions.cjs +17 -0
- package/dist/production/src/lib/project/docs/components/FieldPermissions.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/FieldPermissions.js +17 -0
- package/dist/production/src/lib/project/docs/components/FieldPermissions.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/FieldType.cjs +59 -0
- package/dist/production/src/lib/project/docs/components/FieldType.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/FieldType.js +59 -0
- package/dist/production/src/lib/project/docs/components/FieldType.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/OnDelete.cjs +66 -0
- package/dist/production/src/lib/project/docs/components/OnDelete.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/OnDelete.js +66 -0
- package/dist/production/src/lib/project/docs/components/OnDelete.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/ProjectInfo.cjs +32 -0
- package/dist/production/src/lib/project/docs/components/ProjectInfo.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/ProjectInfo.js +32 -0
- package/dist/production/src/lib/project/docs/components/ProjectInfo.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/SinglePermission.cjs +14 -0
- package/dist/production/src/lib/project/docs/components/SinglePermission.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/SinglePermission.js +14 -0
- package/dist/production/src/lib/project/docs/components/SinglePermission.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/utils.cjs +7 -0
- package/dist/production/src/lib/project/docs/components/utils.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/utils.js +7 -0
- package/dist/production/src/lib/project/docs/components/utils.js.map +1 -0
- package/dist/production/src/lib/project/docs/projectDescribe.cjs +28 -0
- package/dist/production/src/lib/project/docs/projectDescribe.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/projectDescribe.js +27 -0
- package/dist/production/src/lib/project/docs/projectDescribe.js.map +1 -0
- package/dist/production/src/lib/schema/SchemaLoader.cjs +49 -0
- package/dist/production/src/lib/schema/SchemaLoader.cjs.map +1 -0
- package/dist/production/src/lib/schema/SchemaLoader.js +32 -0
- package/dist/production/src/lib/schema/SchemaLoader.js.map +1 -0
- package/dist/production/src/lib/schema/SchemaValidationHelper.cjs +11 -0
- package/dist/production/src/lib/schema/SchemaValidationHelper.cjs.map +1 -0
- package/dist/production/src/lib/schema/SchemaValidationHelper.js +11 -0
- package/dist/production/src/lib/schema/SchemaValidationHelper.js.map +1 -0
- package/dist/production/src/lib/schema/SchemaValidationPrinter.cjs +14 -0
- package/dist/production/src/lib/schema/SchemaValidationPrinter.cjs.map +1 -0
- package/dist/production/src/lib/schema/SchemaValidationPrinter.js +14 -0
- package/dist/production/src/lib/schema/SchemaValidationPrinter.js.map +1 -0
- package/dist/production/src/lib/schema/collectReferences.cjs +34 -0
- package/dist/production/src/lib/schema/collectReferences.cjs.map +1 -0
- package/dist/production/src/lib/schema/collectReferences.js +34 -0
- package/dist/production/src/lib/schema/collectReferences.js.map +1 -0
- package/dist/production/src/lib/stream.cjs +43 -0
- package/dist/production/src/lib/stream.cjs.map +1 -0
- package/dist/production/src/lib/stream.js +43 -0
- package/dist/production/src/lib/stream.js.map +1 -0
- package/dist/production/src/lib/tenant/TenantClient.cjs +45 -0
- package/dist/production/src/lib/tenant/TenantClient.cjs.map +1 -0
- package/dist/production/src/lib/tenant/TenantClient.js +45 -0
- package/dist/production/src/lib/tenant/TenantClient.js.map +1 -0
- package/dist/production/src/lib/transfer/DataTransferClient.cjs +97 -0
- package/dist/production/src/lib/transfer/DataTransferClient.cjs.map +1 -0
- package/dist/production/src/lib/transfer/DataTransferClient.js +97 -0
- package/dist/production/src/lib/transfer/DataTransferClient.js.map +1 -0
- package/dist/production/src/lib/transfer/stdio.cjs +12 -0
- package/dist/production/src/lib/transfer/stdio.cjs.map +1 -0
- package/dist/production/src/lib/transfer/stdio.js +12 -0
- package/dist/production/src/lib/transfer/stdio.js.map +1 -0
- package/dist/production/src/lib/workspace/WorkspaceResolver.cjs +38 -0
- package/dist/production/src/lib/workspace/WorkspaceResolver.cjs.map +1 -0
- package/dist/production/src/lib/workspace/WorkspaceResolver.js +38 -0
- package/dist/production/src/lib/workspace/WorkspaceResolver.js.map +1 -0
- package/dist/types/commands/deploy/DeployCommand.d.ts +30 -0
- package/dist/types/commands/deploy/DeployCommand.d.ts.map +1 -0
- package/dist/types/commands/index.d.ts +6 -0
- package/dist/types/commands/index.d.ts.map +1 -0
- package/dist/types/commands/migrations/MigrationAmendCommand.d.ts +32 -0
- package/dist/types/commands/migrations/MigrationAmendCommand.d.ts.map +1 -0
- package/dist/types/commands/migrations/MigrationBlankCommand.d.ts +15 -0
- package/dist/types/commands/migrations/MigrationBlankCommand.d.ts.map +1 -0
- package/dist/types/commands/migrations/MigrationDescribeCommand.d.ts +20 -0
- package/dist/types/commands/migrations/MigrationDescribeCommand.d.ts.map +1 -0
- package/dist/types/commands/migrations/MigrationDiffCommand.d.ts +25 -0
- package/dist/types/commands/migrations/MigrationDiffCommand.d.ts.map +1 -0
- package/dist/types/commands/migrations/MigrationExecuteCommand.d.ts +16 -0
- package/dist/types/commands/migrations/MigrationExecuteCommand.d.ts.map +1 -0
- package/dist/types/commands/migrations/MigrationRebaseCommand.d.ts +18 -0
- package/dist/types/commands/migrations/MigrationRebaseCommand.d.ts.map +1 -0
- package/dist/types/commands/migrations/MigrationStatusCommand.d.ts +22 -0
- package/dist/types/commands/migrations/MigrationStatusCommand.d.ts.map +1 -0
- package/dist/types/commands/misc/VersionCommand.d.ts +8 -0
- package/dist/types/commands/misc/VersionCommand.d.ts.map +1 -0
- package/dist/types/commands/project/ProjectGenerateDocumentationCommand.d.ts +15 -0
- package/dist/types/commands/project/ProjectGenerateDocumentationCommand.d.ts.map +1 -0
- package/dist/types/commands/project/ProjectPrintSchemaCommand.d.ts +19 -0
- package/dist/types/commands/project/ProjectPrintSchemaCommand.d.ts.map +1 -0
- package/dist/types/commands/project/ProjectValidateCommand.d.ts +19 -0
- package/dist/types/commands/project/ProjectValidateCommand.d.ts.map +1 -0
- package/dist/types/commands/project/index.d.ts +4 -0
- package/dist/types/commands/project/index.d.ts.map +1 -0
- package/dist/types/commands/transfer/ExportCommand.d.ts +23 -0
- package/dist/types/commands/transfer/ExportCommand.d.ts.map +1 -0
- package/dist/types/commands/transfer/ImportCommand.d.ts +20 -0
- package/dist/types/commands/transfer/ImportCommand.d.ts.map +1 -0
- package/dist/types/commands/transfer/TransferCommand.d.ts +21 -0
- package/dist/types/commands/transfer/TransferCommand.d.ts.map +1 -0
- package/dist/types/commands/transfer/utils.d.ts +5 -0
- package/dist/types/commands/transfer/utils.d.ts.map +1 -0
- package/dist/types/commands/workspace/WorkspaceUpdateApiCommand.d.ts +15 -0
- package/dist/types/commands/workspace/WorkspaceUpdateApiCommand.d.ts.map +1 -0
- package/dist/types/consts.d.ts +3 -0
- package/dist/types/consts.d.ts.map +1 -0
- package/dist/types/dic.d.ts +144 -0
- package/dist/types/dic.d.ts.map +1 -0
- package/dist/types/lib/SystemClientProvider.d.ts +8 -0
- package/dist/types/lib/SystemClientProvider.d.ts.map +1 -0
- package/dist/types/lib/TenantClientProvider.d.ts +8 -0
- package/dist/types/lib/TenantClientProvider.d.ts.map +1 -0
- package/dist/types/lib/VersionChecker.d.ts +11 -0
- package/dist/types/lib/VersionChecker.d.ts.map +1 -0
- package/dist/types/lib/admin/AdminClient.d.ts +12 -0
- package/dist/types/lib/admin/AdminClient.d.ts.map +1 -0
- package/dist/types/lib/admin/AdminDeployer.d.ts +15 -0
- package/dist/types/lib/admin/AdminDeployer.d.ts.map +1 -0
- package/dist/types/lib/assertNever.d.ts.map +1 -0
- package/dist/types/lib/dsn.d.ts.map +1 -0
- package/dist/types/lib/env.d.ts +11 -0
- package/dist/types/lib/env.d.ts.map +1 -0
- package/dist/types/lib/fs/DockerComposeManager.d.ts +25 -0
- package/dist/types/lib/fs/DockerComposeManager.d.ts.map +1 -0
- package/dist/types/lib/fs/FileSystem.d.ts +8 -0
- package/dist/types/lib/fs/FileSystem.d.ts.map +1 -0
- package/dist/types/lib/fs/YamlHandler.d.ts +15 -0
- package/dist/types/lib/fs/YamlHandler.d.ts.map +1 -0
- package/dist/types/lib/js/EsBuildBuilder.d.ts +5 -0
- package/dist/types/lib/js/EsBuildBuilder.d.ts.map +1 -0
- package/dist/types/lib/js/EvalExecutor.d.ts +5 -0
- package/dist/types/lib/js/EvalExecutor.d.ts.map +1 -0
- package/dist/types/lib/js/JsBuilder.d.ts +4 -0
- package/dist/types/lib/js/JsBuilder.d.ts.map +1 -0
- package/dist/types/lib/js/JsCodeRunner.d.ts +9 -0
- package/dist/types/lib/js/JsCodeRunner.d.ts.map +1 -0
- package/dist/types/lib/js/JsExecutor.d.ts +4 -0
- package/dist/types/lib/js/JsExecutor.d.ts.map +1 -0
- package/dist/types/lib/json.d.ts +7 -0
- package/dist/types/lib/json.d.ts.map +1 -0
- package/dist/types/lib/maskToken.d.ts +2 -0
- package/dist/types/lib/maskToken.d.ts.map +1 -0
- package/dist/types/lib/migrations/MigrationExecutionFacade.d.ts +23 -0
- package/dist/types/lib/migrations/MigrationExecutionFacade.d.ts.map +1 -0
- package/dist/types/lib/migrations/MigrationPrinter.d.ts +12 -0
- package/dist/types/lib/migrations/MigrationPrinter.d.ts.map +1 -0
- package/dist/types/lib/migrations/MigrationRebaseFacade.d.ts +12 -0
- package/dist/types/lib/migrations/MigrationRebaseFacade.d.ts.map +1 -0
- package/dist/types/lib/migrations/MigrationsStatusFacade.d.ts +16 -0
- package/dist/types/lib/migrations/MigrationsStatusFacade.d.ts.map +1 -0
- package/dist/types/lib/migrations/MigrationsValidator.d.ts +10 -0
- package/dist/types/lib/migrations/MigrationsValidator.d.ts.map +1 -0
- package/dist/types/lib/migrations/migrations.d.ts +3 -0
- package/dist/types/lib/migrations/migrations.d.ts.map +1 -0
- package/dist/types/lib/project/RemoteProject.d.ts +8 -0
- package/dist/types/lib/project/RemoteProject.d.ts.map +1 -0
- package/dist/types/lib/project/RemoteProjectProvider.d.ts +7 -0
- package/dist/types/lib/project/RemoteProjectProvider.d.ts.map +1 -0
- package/dist/types/lib/project/RemoteProjectResolver.d.ts +8 -0
- package/dist/types/lib/project/RemoteProjectResolver.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/EntityInfo.d.ts +11 -0
- package/dist/types/lib/project/docs/components/EntityInfo.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/EntityLink.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/FieldLink.d.ts +7 -0
- package/dist/types/lib/project/docs/components/FieldLink.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/FieldPermissions.d.ts +7 -0
- package/dist/types/lib/project/docs/components/FieldPermissions.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/FieldType.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/OnDelete.d.ts +9 -0
- package/dist/types/lib/project/docs/components/OnDelete.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/ProjectInfo.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/SinglePermission.d.ts +7 -0
- package/dist/types/lib/project/docs/components/SinglePermission.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/utils.d.ts.map +1 -0
- package/dist/types/lib/project/docs/projectDescribe.d.ts.map +1 -0
- package/dist/types/lib/schema/SchemaLoader.d.ts +18 -0
- package/dist/types/lib/schema/SchemaLoader.d.ts.map +1 -0
- package/dist/types/lib/schema/SchemaValidationHelper.d.ts +4 -0
- package/dist/types/lib/schema/SchemaValidationHelper.d.ts.map +1 -0
- package/dist/types/lib/schema/SchemaValidationPrinter.d.ts +3 -0
- package/dist/types/lib/schema/SchemaValidationPrinter.d.ts.map +1 -0
- package/dist/types/lib/schema/collectReferences.d.ts.map +1 -0
- package/dist/types/lib/stream.d.ts +8 -0
- package/dist/types/lib/stream.d.ts.map +1 -0
- package/dist/types/lib/tenant/TenantClient.d.ts +9 -0
- package/dist/types/lib/tenant/TenantClient.d.ts.map +1 -0
- package/dist/types/lib/transfer/DataTransferClient.d.ts +18 -0
- package/dist/types/lib/transfer/DataTransferClient.d.ts.map +1 -0
- package/dist/types/lib/transfer/stdio.d.ts.map +1 -0
- package/dist/types/lib/workspace/Workspace.d.ts +8 -0
- package/dist/types/lib/workspace/Workspace.d.ts.map +1 -0
- package/dist/types/lib/workspace/WorkspaceResolver.d.ts +15 -0
- package/dist/types/lib/workspace/WorkspaceResolver.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/esbuild.cjs +27 -0
- package/package.json +16 -13
- package/src/.eslintrc.cjs +5 -0
- package/src/commands/deploy/DeployCommand.ts +51 -107
- package/src/commands/index.ts +0 -1
- package/src/commands/migrations/MigrationAmendCommand.ts +97 -115
- package/src/commands/migrations/MigrationBlankCommand.ts +8 -20
- package/src/commands/migrations/MigrationDescribeCommand.ts +12 -22
- package/src/commands/migrations/MigrationDiffCommand.ts +66 -95
- package/src/commands/migrations/MigrationExecuteCommand.ts +23 -83
- package/src/commands/migrations/MigrationRebaseCommand.ts +20 -62
- package/src/commands/migrations/MigrationStatusCommand.ts +20 -40
- package/src/commands/misc/VersionCommand.ts +7 -2
- package/src/commands/project/ProjectGenerateDocumentationCommand.ts +47 -0
- package/src/commands/project/ProjectPrintSchemaCommand.ts +10 -16
- package/src/commands/project/ProjectValidateCommand.ts +33 -54
- package/src/commands/project/index.ts +1 -1
- package/src/commands/transfer/ExportCommand.ts +16 -14
- package/src/commands/transfer/ImportCommand.ts +18 -15
- package/src/commands/transfer/TransferCommand.ts +29 -18
- package/src/commands/transfer/utils.ts +1 -117
- package/src/commands/workspace/WorkspaceUpdateApiCommand.ts +8 -16
- package/src/consts.ts +5 -0
- package/src/dic.ts +258 -0
- package/src/lib/SystemClientProvider.ts +14 -0
- package/src/lib/TenantClientProvider.ts +14 -0
- package/src/lib/VersionChecker.ts +71 -0
- package/src/lib/admin/AdminClient.ts +33 -0
- package/src/lib/admin/AdminDeployer.ts +45 -0
- package/src/lib/dsn.ts +13 -0
- package/src/lib/env.ts +21 -0
- package/src/lib/fs/DockerComposeManager.ts +63 -0
- package/src/lib/fs/FileSystem.ts +19 -0
- package/src/lib/fs/YamlHandler.ts +59 -0
- package/src/lib/js/EsBuildBuilder.ts +17 -0
- package/src/lib/js/EvalExecutor.ts +8 -0
- package/src/lib/js/JsBuilder.ts +3 -0
- package/src/lib/js/JsCodeRunner.ts +15 -0
- package/src/lib/js/JsExecutor.ts +3 -0
- package/src/lib/json.ts +4 -0
- package/src/lib/migrations/MigrationExecutionFacade.ts +97 -0
- package/src/lib/migrations/MigrationPrinter.ts +86 -0
- package/src/lib/migrations/MigrationRebaseFacade.ts +41 -0
- package/src/lib/migrations/MigrationsStatusFacade.ts +27 -0
- package/src/lib/migrations/MigrationsValidator.ts +40 -0
- package/src/lib/migrations/migrations.ts +45 -0
- package/src/lib/project/RemoteProject.ts +9 -0
- package/src/lib/project/RemoteProjectProvider.ts +16 -0
- package/src/lib/project/RemoteProjectResolver.ts +30 -0
- package/src/lib/project/docs/.eslintrc.cjs +5 -0
- package/src/lib/project/docs/components/EntityInfo.tsx +85 -0
- package/src/lib/project/docs/components/OnDelete.tsx +72 -0
- package/src/lib/project/docs/components/ProjectInfo.tsx +48 -0
- package/src/lib/project/docs/projectDescribe.tsx +28 -0
- package/src/lib/schema/SchemaLoader.ts +38 -0
- package/src/lib/schema/SchemaValidationHelper.ts +9 -0
- package/src/lib/schema/SchemaValidationPrinter.ts +13 -0
- package/src/lib/tenant/TenantClient.ts +45 -0
- package/src/lib/transfer/DataTransferClient.ts +112 -0
- package/src/lib/workspace/Workspace.ts +7 -0
- package/src/lib/workspace/WorkspaceResolver.ts +45 -0
- package/src/run.ts +23 -63
- package/src/tsconfig.json +4 -2
- package/tailwind.config.js +1 -1
- package/dist/src/commands/deploy/DeployCommand.d.ts +0 -21
- package/dist/src/commands/deploy/DeployCommand.d.ts.map +0 -1
- package/dist/src/commands/deploy/DeployCommand.js +0 -135
- package/dist/src/commands/deploy/DeployCommand.js.map +0 -1
- package/dist/src/commands/deploy/index.js +0 -18
- package/dist/src/commands/deploy/index.js.map +0 -1
- package/dist/src/commands/index.d.ts +0 -7
- package/dist/src/commands/index.d.ts.map +0 -1
- package/dist/src/commands/index.js +0 -23
- package/dist/src/commands/index.js.map +0 -1
- package/dist/src/commands/migrations/MigrationAmendCommand.d.ts +0 -18
- package/dist/src/commands/migrations/MigrationAmendCommand.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationAmendCommand.js +0 -126
- package/dist/src/commands/migrations/MigrationAmendCommand.js.map +0 -1
- package/dist/src/commands/migrations/MigrationBlankCommand.d.ts +0 -15
- package/dist/src/commands/migrations/MigrationBlankCommand.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationBlankCommand.js +0 -29
- package/dist/src/commands/migrations/MigrationBlankCommand.js.map +0 -1
- package/dist/src/commands/migrations/MigrationDescribeCommand.d.ts +0 -17
- package/dist/src/commands/migrations/MigrationDescribeCommand.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationDescribeCommand.js +0 -42
- package/dist/src/commands/migrations/MigrationDescribeCommand.js.map +0 -1
- package/dist/src/commands/migrations/MigrationDiffCommand.d.ts +0 -18
- package/dist/src/commands/migrations/MigrationDiffCommand.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationDiffCommand.js +0 -110
- package/dist/src/commands/migrations/MigrationDiffCommand.js.map +0 -1
- package/dist/src/commands/migrations/MigrationExecuteCommand.d.ts +0 -17
- package/dist/src/commands/migrations/MigrationExecuteCommand.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationExecuteCommand.js +0 -83
- package/dist/src/commands/migrations/MigrationExecuteCommand.js.map +0 -1
- package/dist/src/commands/migrations/MigrationRebaseCommand.d.ts +0 -16
- package/dist/src/commands/migrations/MigrationRebaseCommand.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationRebaseCommand.js +0 -64
- package/dist/src/commands/migrations/MigrationRebaseCommand.js.map +0 -1
- package/dist/src/commands/migrations/MigrationStatusCommand.d.ts +0 -19
- package/dist/src/commands/migrations/MigrationStatusCommand.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationStatusCommand.js +0 -88
- package/dist/src/commands/migrations/MigrationStatusCommand.js.map +0 -1
- package/dist/src/commands/migrations/MigrationValidationHelper.d.ts +0 -4
- package/dist/src/commands/migrations/MigrationValidationHelper.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationValidationHelper.js +0 -34
- package/dist/src/commands/migrations/MigrationValidationHelper.js.map +0 -1
- package/dist/src/commands/migrations/SystemApiClientResolver.d.ts +0 -8
- package/dist/src/commands/migrations/SystemApiClientResolver.d.ts.map +0 -1
- package/dist/src/commands/migrations/SystemApiClientResolver.js +0 -14
- package/dist/src/commands/migrations/SystemApiClientResolver.js.map +0 -1
- package/dist/src/commands/migrations/index.js +0 -24
- package/dist/src/commands/migrations/index.js.map +0 -1
- package/dist/src/commands/misc/VersionCommand.d.ts +0 -6
- package/dist/src/commands/misc/VersionCommand.d.ts.map +0 -1
- package/dist/src/commands/misc/VersionCommand.js +0 -15
- package/dist/src/commands/misc/VersionCommand.js.map +0 -1
- package/dist/src/commands/misc/index.js +0 -18
- package/dist/src/commands/misc/index.js.map +0 -1
- package/dist/src/commands/project/ProjectGenerateDocumentation.d.ts +0 -15
- package/dist/src/commands/project/ProjectGenerateDocumentation.d.ts.map +0 -1
- package/dist/src/commands/project/ProjectGenerateDocumentation.js +0 -43
- package/dist/src/commands/project/ProjectGenerateDocumentation.js.map +0 -1
- package/dist/src/commands/project/ProjectPrintSchemaCommand.d.ts +0 -18
- package/dist/src/commands/project/ProjectPrintSchemaCommand.d.ts.map +0 -1
- package/dist/src/commands/project/ProjectPrintSchemaCommand.js +0 -81
- package/dist/src/commands/project/ProjectPrintSchemaCommand.js.map +0 -1
- package/dist/src/commands/project/ProjectValidateCommand.d.ts +0 -13
- package/dist/src/commands/project/ProjectValidateCommand.d.ts.map +0 -1
- package/dist/src/commands/project/ProjectValidateCommand.js +0 -65
- package/dist/src/commands/project/ProjectValidateCommand.js.map +0 -1
- package/dist/src/commands/project/index.d.ts +0 -4
- package/dist/src/commands/project/index.d.ts.map +0 -1
- package/dist/src/commands/project/index.js +0 -20
- package/dist/src/commands/project/index.js.map +0 -1
- package/dist/src/commands/tenant/CreateApiKeyCommand.d.ts +0 -14
- package/dist/src/commands/tenant/CreateApiKeyCommand.d.ts.map +0 -1
- package/dist/src/commands/tenant/CreateApiKeyCommand.js +0 -34
- package/dist/src/commands/tenant/CreateApiKeyCommand.js.map +0 -1
- package/dist/src/commands/tenant/InviteCommand.d.ts +0 -14
- package/dist/src/commands/tenant/InviteCommand.d.ts.map +0 -1
- package/dist/src/commands/tenant/InviteCommand.js +0 -32
- package/dist/src/commands/tenant/InviteCommand.js.map +0 -1
- package/dist/src/commands/tenant/ResetPasswordCommand.d.ts +0 -14
- package/dist/src/commands/tenant/ResetPasswordCommand.d.ts.map +0 -1
- package/dist/src/commands/tenant/ResetPasswordCommand.js +0 -30
- package/dist/src/commands/tenant/ResetPasswordCommand.js.map +0 -1
- package/dist/src/commands/tenant/SignInCommand.d.ts +0 -14
- package/dist/src/commands/tenant/SignInCommand.d.ts.map +0 -1
- package/dist/src/commands/tenant/SignInCommand.js +0 -32
- package/dist/src/commands/tenant/SignInCommand.js.map +0 -1
- package/dist/src/commands/tenant/index.d.ts +0 -5
- package/dist/src/commands/tenant/index.d.ts.map +0 -1
- package/dist/src/commands/tenant/index.js +0 -21
- package/dist/src/commands/tenant/index.js.map +0 -1
- package/dist/src/commands/transfer/ExportCommand.d.ts +0 -20
- package/dist/src/commands/transfer/ExportCommand.d.ts.map +0 -1
- package/dist/src/commands/transfer/ExportCommand.js +0 -70
- package/dist/src/commands/transfer/ExportCommand.js.map +0 -1
- package/dist/src/commands/transfer/ImportCommand.d.ts +0 -17
- package/dist/src/commands/transfer/ImportCommand.d.ts.map +0 -1
- package/dist/src/commands/transfer/ImportCommand.js +0 -61
- package/dist/src/commands/transfer/ImportCommand.js.map +0 -1
- package/dist/src/commands/transfer/TransferCommand.d.ts +0 -18
- package/dist/src/commands/transfer/TransferCommand.d.ts.map +0 -1
- package/dist/src/commands/transfer/TransferCommand.js +0 -67
- package/dist/src/commands/transfer/TransferCommand.js.map +0 -1
- package/dist/src/commands/transfer/index.js +0 -20
- package/dist/src/commands/transfer/index.js.map +0 -1
- package/dist/src/commands/transfer/utils.d.ts +0 -27
- package/dist/src/commands/transfer/utils.d.ts.map +0 -1
- package/dist/src/commands/transfer/utils.js +0 -136
- package/dist/src/commands/transfer/utils.js.map +0 -1
- package/dist/src/commands/workspace/WorkspaceUpdateApiCommand.d.ts +0 -13
- package/dist/src/commands/workspace/WorkspaceUpdateApiCommand.d.ts.map +0 -1
- package/dist/src/commands/workspace/WorkspaceUpdateApiCommand.js +0 -66
- package/dist/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +0 -1
- package/dist/src/commands/workspace/index.js +0 -18
- package/dist/src/commands/workspace/index.js.map +0 -1
- package/dist/src/run.js +0 -50
- package/dist/src/run.js.map +0 -1
- package/dist/src/tsconfig.tsbuildinfo +0 -1
- package/dist/src/utils/admin.d.ts +0 -14
- package/dist/src/utils/admin.d.ts.map +0 -1
- package/dist/src/utils/admin.js +0 -47
- package/dist/src/utils/admin.js.map +0 -1
- package/dist/src/utils/assertNever.d.ts.map +0 -1
- package/dist/src/utils/assertNever.js +0 -8
- package/dist/src/utils/assertNever.js.map +0 -1
- package/dist/src/utils/checkVersions.d.ts +0 -3
- package/dist/src/utils/checkVersions.d.ts.map +0 -1
- package/dist/src/utils/checkVersions.js +0 -83
- package/dist/src/utils/checkVersions.js.map +0 -1
- package/dist/src/utils/dockerCompose.d.ts +0 -18
- package/dist/src/utils/dockerCompose.d.ts.map +0 -1
- package/dist/src/utils/dockerCompose.js +0 -66
- package/dist/src/utils/dockerCompose.js.map +0 -1
- package/dist/src/utils/dsn.d.ts.map +0 -1
- package/dist/src/utils/dsn.js +0 -17
- package/dist/src/utils/dsn.js.map +0 -1
- package/dist/src/utils/esbuild.d.ts +0 -2
- package/dist/src/utils/esbuild.d.ts.map +0 -1
- package/dist/src/utils/esbuild.js +0 -41
- package/dist/src/utils/esbuild.js.map +0 -1
- package/dist/src/utils/instance/environment.d.ts +0 -4
- package/dist/src/utils/instance/environment.d.ts.map +0 -1
- package/dist/src/utils/instance/environment.js +0 -3
- package/dist/src/utils/instance/environment.js.map +0 -1
- package/dist/src/utils/instance/index.d.ts +0 -3
- package/dist/src/utils/instance/index.d.ts.map +0 -1
- package/dist/src/utils/instance/index.js +0 -21
- package/dist/src/utils/instance/index.js.map +0 -1
- package/dist/src/utils/instance/interactiveUtils.d.ts +0 -4
- package/dist/src/utils/instance/interactiveUtils.d.ts.map +0 -1
- package/dist/src/utils/instance/interactiveUtils.js +0 -36
- package/dist/src/utils/instance/interactiveUtils.js.map +0 -1
- package/dist/src/utils/migrations/MigrationCreateHelper.d.ts +0 -21
- package/dist/src/utils/migrations/MigrationCreateHelper.d.ts.map +0 -1
- package/dist/src/utils/migrations/MigrationCreateHelper.js +0 -32
- package/dist/src/utils/migrations/MigrationCreateHelper.js.map +0 -1
- package/dist/src/utils/migrations/MigrationExecuteHelper.d.ts +0 -23
- package/dist/src/utils/migrations/MigrationExecuteHelper.d.ts.map +0 -1
- package/dist/src/utils/migrations/MigrationExecuteHelper.js +0 -84
- package/dist/src/utils/migrations/MigrationExecuteHelper.js.map +0 -1
- package/dist/src/utils/migrations/MigrationsContainer.d.ts +0 -20
- package/dist/src/utils/migrations/MigrationsContainer.d.ts.map +0 -1
- package/dist/src/utils/migrations/MigrationsContainer.js +0 -58
- package/dist/src/utils/migrations/MigrationsContainer.js.map +0 -1
- package/dist/src/utils/migrations/migrations.d.ts +0 -9
- package/dist/src/utils/migrations/migrations.d.ts.map +0 -1
- package/dist/src/utils/migrations/migrations.js +0 -77
- package/dist/src/utils/migrations/migrations.js.map +0 -1
- package/dist/src/utils/project/components/EntityInfo.d.ts +0 -11
- package/dist/src/utils/project/components/EntityInfo.d.ts.map +0 -1
- package/dist/src/utils/project/components/EntityInfo.js +0 -54
- package/dist/src/utils/project/components/EntityInfo.js.map +0 -1
- package/dist/src/utils/project/components/EntityLink.d.ts.map +0 -1
- package/dist/src/utils/project/components/EntityLink.js +0 -8
- package/dist/src/utils/project/components/EntityLink.js.map +0 -1
- package/dist/src/utils/project/components/FieldLink.d.ts +0 -7
- package/dist/src/utils/project/components/FieldLink.d.ts.map +0 -1
- package/dist/src/utils/project/components/FieldLink.js +0 -13
- package/dist/src/utils/project/components/FieldLink.js.map +0 -1
- package/dist/src/utils/project/components/FieldPermissions.d.ts +0 -7
- package/dist/src/utils/project/components/FieldPermissions.d.ts.map +0 -1
- package/dist/src/utils/project/components/FieldPermissions.js +0 -17
- package/dist/src/utils/project/components/FieldPermissions.js.map +0 -1
- package/dist/src/utils/project/components/FieldType.d.ts.map +0 -1
- package/dist/src/utils/project/components/FieldType.js +0 -59
- package/dist/src/utils/project/components/FieldType.js.map +0 -1
- package/dist/src/utils/project/components/OnDelete.d.ts +0 -9
- package/dist/src/utils/project/components/OnDelete.d.ts.map +0 -1
- package/dist/src/utils/project/components/OnDelete.js +0 -70
- package/dist/src/utils/project/components/OnDelete.js.map +0 -1
- package/dist/src/utils/project/components/ProjectInfo.d.ts.map +0 -1
- package/dist/src/utils/project/components/ProjectInfo.js +0 -28
- package/dist/src/utils/project/components/ProjectInfo.js.map +0 -1
- package/dist/src/utils/project/components/SinglePermission.d.ts +0 -7
- package/dist/src/utils/project/components/SinglePermission.d.ts.map +0 -1
- package/dist/src/utils/project/components/SinglePermission.js +0 -15
- package/dist/src/utils/project/components/SinglePermission.js.map +0 -1
- package/dist/src/utils/project/components/utils.d.ts.map +0 -1
- package/dist/src/utils/project/components/utils.js +0 -8
- package/dist/src/utils/project/components/utils.js.map +0 -1
- package/dist/src/utils/project/loadSchema.d.ts +0 -4
- package/dist/src/utils/project/loadSchema.d.ts.map +0 -1
- package/dist/src/utils/project/loadSchema.js +0 -14
- package/dist/src/utils/project/loadSchema.js.map +0 -1
- package/dist/src/utils/project/projectDescribe.d.ts.map +0 -1
- package/dist/src/utils/project/projectDescribe.js +0 -29
- package/dist/src/utils/project/projectDescribe.js.map +0 -1
- package/dist/src/utils/project/resources/out.css +0 -824
- package/dist/src/utils/schema/collectReferences.d.ts.map +0 -1
- package/dist/src/utils/schema/collectReferences.js +0 -35
- package/dist/src/utils/schema/collectReferences.js.map +0 -1
- package/dist/src/utils/schema.d.ts +0 -5
- package/dist/src/utils/schema.d.ts.map +0 -1
- package/dist/src/utils/schema.js +0 -22
- package/dist/src/utils/schema.js.map +0 -1
- package/dist/src/utils/stdio.d.ts.map +0 -1
- package/dist/src/utils/stdio.js +0 -13
- package/dist/src/utils/stdio.js.map +0 -1
- package/dist/src/utils/stream.d.ts +0 -9
- package/dist/src/utils/stream.d.ts.map +0 -1
- package/dist/src/utils/stream.js +0 -41
- package/dist/src/utils/stream.js.map +0 -1
- package/dist/src/utils/tenant.d.ts +0 -66
- package/dist/src/utils/tenant.d.ts.map +0 -1
- package/dist/src/utils/tenant.js +0 -355
- package/dist/src/utils/tenant.js.map +0 -1
- package/dist/src/utils/token.d.ts +0 -2
- package/dist/src/utils/token.d.ts.map +0 -1
- package/dist/src/utils/token.js +0 -6
- package/dist/src/utils/token.js.map +0 -1
- package/dist/src/utils/tuple.d.ts +0 -2
- package/dist/src/utils/tuple.d.ts.map +0 -1
- package/dist/src/utils/tuple.js +0 -6
- package/dist/src/utils/tuple.js.map +0 -1
- package/dist/src/utils/workspace.d.ts +0 -3
- package/dist/src/utils/workspace.d.ts.map +0 -1
- package/dist/src/utils/workspace.js +0 -25
- package/dist/src/utils/workspace.js.map +0 -1
- package/dist/src/utils/yaml.d.ts +0 -8
- package/dist/src/utils/yaml.d.ts.map +0 -1
- package/dist/src/utils/yaml.js +0 -33
- package/dist/src/utils/yaml.js.map +0 -1
- package/esbuild.js +0 -15
- package/src/.eslintrc.js +0 -5
- package/src/commands/migrations/MigrationValidationHelper.ts +0 -36
- package/src/commands/migrations/SystemApiClientResolver.ts +0 -22
- package/src/commands/project/ProjectGenerateDocumentation.ts +0 -49
- package/src/commands/tenant/CreateApiKeyCommand.ts +0 -40
- package/src/commands/tenant/InviteCommand.ts +0 -38
- package/src/commands/tenant/ResetPasswordCommand.ts +0 -36
- package/src/commands/tenant/SignInCommand.ts +0 -38
- package/src/commands/tenant/index.ts +0 -4
- package/src/utils/admin.ts +0 -45
- package/src/utils/checkVersions.ts +0 -58
- package/src/utils/dockerCompose.ts +0 -58
- package/src/utils/dsn.ts +0 -13
- package/src/utils/esbuild.ts +0 -14
- package/src/utils/instance/environment.ts +0 -4
- package/src/utils/instance/index.ts +0 -2
- package/src/utils/instance/interactiveUtils.ts +0 -39
- package/src/utils/migrations/MigrationCreateHelper.ts +0 -59
- package/src/utils/migrations/MigrationExecuteHelper.ts +0 -115
- package/src/utils/migrations/MigrationsContainer.ts +0 -80
- package/src/utils/migrations/migrations.ts +0 -80
- package/src/utils/project/components/EntityInfo.tsx +0 -82
- package/src/utils/project/components/OnDelete.tsx +0 -72
- package/src/utils/project/components/ProjectInfo.tsx +0 -48
- package/src/utils/project/loadSchema.ts +0 -14
- package/src/utils/project/projectDescribe.tsx +0 -26
- package/src/utils/schema.ts +0 -19
- package/src/utils/tenant.ts +0 -434
- package/src/utils/tuple.ts +0 -1
- package/src/utils/workspace.ts +0 -21
- package/src/utils/yaml.ts +0 -36
- /package/dist/{src → types}/commands/deploy/index.d.ts +0 -0
- /package/dist/{src → types}/commands/deploy/index.d.ts.map +0 -0
- /package/dist/{src → types}/commands/migrations/index.d.ts +0 -0
- /package/dist/{src → types}/commands/migrations/index.d.ts.map +0 -0
- /package/dist/{src → types}/commands/misc/index.d.ts +0 -0
- /package/dist/{src → types}/commands/misc/index.d.ts.map +0 -0
- /package/dist/{src → types}/commands/transfer/index.d.ts +0 -0
- /package/dist/{src → types}/commands/transfer/index.d.ts.map +0 -0
- /package/dist/{src → types}/commands/workspace/index.d.ts +0 -0
- /package/dist/{src → types}/commands/workspace/index.d.ts.map +0 -0
- /package/dist/{src/utils → types/lib}/assertNever.d.ts +0 -0
- /package/dist/{src/utils → types/lib}/dsn.d.ts +0 -0
- /package/dist/{src/utils/project → types/lib/project/docs}/components/EntityLink.d.ts +0 -0
- /package/dist/{src/utils/project → types/lib/project/docs}/components/FieldType.d.ts +0 -0
- /package/dist/{src/utils/project → types/lib/project/docs}/components/ProjectInfo.d.ts +0 -0
- /package/dist/{src/utils/project → types/lib/project/docs}/components/utils.d.ts +0 -0
- /package/dist/{src/utils/project → types/lib/project/docs}/projectDescribe.d.ts +0 -0
- /package/dist/{src/utils → types/lib}/schema/collectReferences.d.ts +0 -0
- /package/dist/{src/utils → types/lib/transfer}/stdio.d.ts +0 -0
- /package/dist/{src → types}/run.d.ts +0 -0
- /package/dist/{src → types}/run.d.ts.map +0 -0
- /package/src/{utils → lib}/assertNever.ts +0 -0
- /package/src/{utils/token.ts → lib/maskToken.ts} +0 -0
- /package/src/{utils/project → lib/project/docs}/components/EntityLink.tsx +0 -0
- /package/src/{utils/project → lib/project/docs}/components/FieldLink.tsx +0 -0
- /package/src/{utils/project → lib/project/docs}/components/FieldPermissions.tsx +0 -0
- /package/src/{utils/project → lib/project/docs}/components/FieldType.tsx +0 -0
- /package/src/{utils/project → lib/project/docs}/components/SinglePermission.tsx +0 -0
- /package/src/{utils/project → lib/project/docs}/components/utils.ts +0 -0
- /package/src/{utils/project → lib/project/docs}/resources/style.css +0 -0
- /package/src/{utils → lib}/schema/collectReferences.ts +0 -0
- /package/src/{utils → lib}/stream.ts +0 -0
- /package/src/{utils → lib/transfer}/stdio.ts +0 -0
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import { Command, CommandConfiguration, Input
|
|
2
|
-
import { printValidationErrors } from '../../utils/schema'
|
|
1
|
+
import { Command, CommandConfiguration, Input } from '@contember/cli-common'
|
|
3
2
|
import { InvalidSchemaException } from '@contember/schema-migrations'
|
|
4
|
-
import { executeCreateMigrationCommand } from '../../utils/migrations/MigrationCreateHelper'
|
|
5
|
-
import { createMigrationStatusTable, printMigrationDescription } from '../../utils/migrations/migrations'
|
|
6
|
-
import { executeMigrations, resolveMigrationStatus } from '../../utils/migrations/MigrationExecuteHelper'
|
|
7
3
|
import prompts from 'prompts'
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
4
|
+
import { MigrationCreator, SchemaVersionBuilder } from '@contember/migrations-client'
|
|
5
|
+
import { SchemaLoader } from '../../lib/schema/SchemaLoader'
|
|
6
|
+
import { MigrationPrinter } from '../../lib/migrations/MigrationPrinter'
|
|
7
|
+
import { MigrationExecutionFacade } from '../../lib/migrations/MigrationExecutionFacade'
|
|
8
|
+
import { printValidationErrors } from '../../lib/schema/SchemaValidationPrinter'
|
|
12
9
|
|
|
13
10
|
type Args = {
|
|
14
|
-
project?: string
|
|
15
11
|
migrationName: string
|
|
16
12
|
}
|
|
17
13
|
|
|
@@ -23,16 +19,17 @@ type Options = {
|
|
|
23
19
|
|
|
24
20
|
export class MigrationDiffCommand extends Command<Args, Options> {
|
|
25
21
|
constructor(
|
|
26
|
-
private readonly
|
|
22
|
+
private readonly schemaLoader: SchemaLoader,
|
|
23
|
+
private readonly schemaVersionBuilder: SchemaVersionBuilder,
|
|
24
|
+
private readonly migrationCreator: MigrationCreator,
|
|
25
|
+
private readonly migrationPrinter: MigrationPrinter,
|
|
26
|
+
private readonly migrationExecutorFacade: MigrationExecutionFacade,
|
|
27
27
|
) {
|
|
28
28
|
super()
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
protected configure(configuration: CommandConfiguration<Args, Options>): void {
|
|
32
|
-
configuration.description('Creates schema migration diff
|
|
33
|
-
if (!this.workspace.isSingleProjectMode()) {
|
|
34
|
-
configuration.argument('project')
|
|
35
|
-
}
|
|
32
|
+
configuration.description('Creates schema migration diff')
|
|
36
33
|
configuration.argument('migrationName')
|
|
37
34
|
configuration.option('execute').valueNone()
|
|
38
35
|
configuration //
|
|
@@ -43,89 +40,63 @@ export class MigrationDiffCommand extends Command<Args, Options> {
|
|
|
43
40
|
configuration.option('skip-initial-schema-validation')
|
|
44
41
|
}
|
|
45
42
|
|
|
46
|
-
protected async execute(input: Input<Args, Options>): Promise<
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
schemaVersionBuilder,
|
|
52
|
-
migrationsResolver,
|
|
53
|
-
workspace,
|
|
54
|
-
project,
|
|
55
|
-
migrationCreator,
|
|
56
|
-
migrationDescriber,
|
|
57
|
-
}) => {
|
|
58
|
-
const schema = await loadSchema(project)
|
|
59
|
-
try {
|
|
60
|
-
const migrationName = input.getArgument('migrationName')
|
|
61
|
-
const initialSchema = await schemaVersionBuilder.buildSchema()
|
|
62
|
-
const result = await migrationCreator.prepareMigration(initialSchema, schema, migrationName, {
|
|
63
|
-
skipInitialSchemaValidation: input.getOption('skip-initial-schema-validation') === true,
|
|
64
|
-
})
|
|
65
|
-
if (result === null) {
|
|
66
|
-
console.log('Nothing to do')
|
|
67
|
-
return 0
|
|
68
|
-
}
|
|
69
|
-
await printMigrationDescription(migrationDescriber, result.initialSchema, result.migration, { noSql: true })
|
|
70
|
-
const yes = input.getOption('yes')
|
|
71
|
-
let shouldExecute = input.getOption('execute')
|
|
72
|
-
if (!yes) {
|
|
73
|
-
const { action } = await prompts({
|
|
74
|
-
type: 'select',
|
|
75
|
-
name: 'action',
|
|
76
|
-
message: 'Do you want to continue?',
|
|
77
|
-
choices: [
|
|
78
|
-
{ value: 'yes', title: 'Yes' },
|
|
79
|
-
...(!shouldExecute ? [{ value: 'execute', title: 'Yes and execute immediately' }] : []),
|
|
80
|
-
{ value: 'no', title: 'Abort' },
|
|
81
|
-
],
|
|
82
|
-
})
|
|
83
|
-
if (!action || action === 'no') {
|
|
84
|
-
console.log('Aborting')
|
|
85
|
-
return 1
|
|
86
|
-
}
|
|
87
|
-
if (action === 'execute') {
|
|
88
|
-
shouldExecute = true
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
const filename = await migrationCreator.saveMigration(result.migration)
|
|
43
|
+
protected async execute(input: Input<Args, Options>): Promise<void> {
|
|
44
|
+
const migrationName = input.getArgument('migrationName')
|
|
45
|
+
let shouldExecute = input.getOption('execute')
|
|
46
|
+
const yes = input.getOption('yes')
|
|
47
|
+
const skipInitialSchemaValidation = input.getOption('skip-initial-schema-validation') === true
|
|
92
48
|
|
|
93
|
-
|
|
49
|
+
const schema = await this.schemaLoader.loadSchema()
|
|
50
|
+
try {
|
|
51
|
+
const initialSchema = await this.schemaVersionBuilder.buildSchema()
|
|
52
|
+
const result = await this.migrationCreator.prepareMigration(initialSchema, schema, migrationName, {
|
|
53
|
+
skipInitialSchemaValidation: skipInitialSchemaValidation,
|
|
54
|
+
})
|
|
55
|
+
if (result === null) {
|
|
56
|
+
console.log('Nothing to do')
|
|
57
|
+
return
|
|
58
|
+
}
|
|
59
|
+
this.migrationPrinter.printMigrationDescription(result.initialSchema, result.migration, { noSql: true })
|
|
94
60
|
|
|
95
|
-
if (shouldExecute) {
|
|
96
|
-
const instance = await interactiveResolveInstanceEnvironmentFromInput(workspace)
|
|
97
|
-
const apiToken = await interactiveResolveApiToken({ workspace, instance })
|
|
98
|
-
const tenantClient = TenantClient.create(instance.baseUrl, apiToken)
|
|
99
|
-
await tenantClient.createProject(project.name, true)
|
|
100
|
-
const systemClient = SystemClient.create(instance.baseUrl, project.name, apiToken)
|
|
101
61
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
return 0
|
|
121
|
-
} catch (e) {
|
|
122
|
-
if (e instanceof InvalidSchemaException) {
|
|
123
|
-
printValidationErrors(e.validationErrors, e.message)
|
|
124
|
-
return 1
|
|
125
|
-
}
|
|
126
|
-
throw e
|
|
62
|
+
if (!yes) {
|
|
63
|
+
const { action } = await prompts({
|
|
64
|
+
type: 'select',
|
|
65
|
+
name: 'action',
|
|
66
|
+
message: 'Do you want to continue?',
|
|
67
|
+
choices: [
|
|
68
|
+
{ value: 'yes', title: 'Yes' },
|
|
69
|
+
...(!shouldExecute ? [{ value: 'execute', title: 'Yes and execute immediately' }] : []),
|
|
70
|
+
{ value: 'no', title: 'Abort' },
|
|
71
|
+
],
|
|
72
|
+
})
|
|
73
|
+
if (!action || action === 'no') {
|
|
74
|
+
console.log('Aborting')
|
|
75
|
+
return
|
|
76
|
+
}
|
|
77
|
+
if (action === 'execute') {
|
|
78
|
+
shouldExecute = true
|
|
127
79
|
}
|
|
128
|
-
}
|
|
129
|
-
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const filename = await this.migrationCreator.saveMigration(result.migration)
|
|
83
|
+
|
|
84
|
+
console.log(`${filename} created`)
|
|
85
|
+
|
|
86
|
+
} catch (e) {
|
|
87
|
+
if (e instanceof InvalidSchemaException) {
|
|
88
|
+
printValidationErrors(e.validationErrors, e.message)
|
|
89
|
+
|
|
90
|
+
return
|
|
91
|
+
}
|
|
92
|
+
throw e
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (shouldExecute) {
|
|
96
|
+
await this.migrationExecutorFacade.execute({
|
|
97
|
+
force: false,
|
|
98
|
+
requireConfirmation: !yes,
|
|
99
|
+
})
|
|
100
|
+
}
|
|
130
101
|
}
|
|
131
102
|
}
|
|
@@ -1,103 +1,43 @@
|
|
|
1
|
-
import { Command, CommandConfiguration, Input
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
configureExecuteMigrationCommand,
|
|
5
|
-
ExecuteMigrationOptions,
|
|
6
|
-
executeMigrations,
|
|
7
|
-
resolveMigrationStatus,
|
|
8
|
-
} from '../../utils/migrations/MigrationExecuteHelper'
|
|
9
|
-
import { createMigrationStatusTable } from '../../utils/migrations/migrations'
|
|
10
|
-
import { interactiveResolveInstanceEnvironmentFromInput } from '../../utils/instance'
|
|
11
|
-
import { interactiveResolveApiToken, TenantClient } from '../../utils/tenant'
|
|
12
|
-
import { SystemClient } from '@contember/migrations-client'
|
|
13
|
-
import { MigrationVersionHelper } from '@contember/schema-migrations'
|
|
1
|
+
import { Command, CommandConfiguration, Input } from '@contember/cli-common'
|
|
2
|
+
import { MigrationExecutionFacade } from '../../lib/migrations/MigrationExecutionFacade'
|
|
14
3
|
|
|
15
4
|
type Args = {
|
|
16
|
-
project?: string
|
|
17
5
|
}
|
|
18
6
|
|
|
19
|
-
type Options =
|
|
7
|
+
type Options = {
|
|
20
8
|
until?: string
|
|
21
9
|
force: boolean
|
|
10
|
+
yes?: boolean
|
|
22
11
|
}
|
|
23
12
|
|
|
24
13
|
export class MigrationExecuteCommand extends Command<Args, Options> {
|
|
25
14
|
constructor(
|
|
26
|
-
private readonly
|
|
15
|
+
private readonly migrationExecutorFacade: MigrationExecutionFacade,
|
|
27
16
|
) {
|
|
28
17
|
super()
|
|
29
18
|
}
|
|
30
19
|
|
|
31
20
|
protected configure(configuration: CommandConfiguration<Args, Options>): void {
|
|
32
|
-
configuration.description('Executes migrations on
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
21
|
+
configuration.description('Executes migrations on Contember server.')
|
|
22
|
+
configuration.option('force')
|
|
23
|
+
.description('Ignore migrations order and missing migrations (dev only)')
|
|
24
|
+
configuration.option('until')
|
|
25
|
+
.valueRequired()
|
|
26
|
+
.description('Execute all migrations leading up to, and inclusive of, a specified migration')
|
|
27
|
+
configuration //
|
|
28
|
+
.option('yes')
|
|
29
|
+
.valueNone()
|
|
30
|
+
.description('Do not ask for confirmation.')
|
|
39
31
|
}
|
|
40
32
|
|
|
41
|
-
protected async execute(input: Input<Args, Options>): Promise<
|
|
42
|
-
const
|
|
33
|
+
protected async execute(input: Input<Args, Options>): Promise<void> {
|
|
34
|
+
const force = input.getOption('force')
|
|
35
|
+
const until = input.getOption('until')
|
|
43
36
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
throw 'Option remote-project can be used only for a single project'
|
|
50
|
-
}
|
|
51
|
-
const projects = allProjects
|
|
52
|
-
? await workspace.projects.listProjects()
|
|
53
|
-
: [await workspace.projects.getProject(projectName, { fuzzy: true })]
|
|
54
|
-
let code = 0
|
|
55
|
-
for (const project of projects) {
|
|
56
|
-
const migrationsDir = project.migrationsDir
|
|
57
|
-
const container = new MigrationsContainerFactory(migrationsDir).create()
|
|
58
|
-
|
|
59
|
-
const instance = await interactiveResolveInstanceEnvironmentFromInput(workspace, input?.getOption('instance'))
|
|
60
|
-
const apiToken = await interactiveResolveApiToken({ workspace, instance })
|
|
61
|
-
const remoteProject = remoteProjectOption || project.name
|
|
62
|
-
const tenantClient = TenantClient.create(instance.baseUrl, apiToken)
|
|
63
|
-
await tenantClient.createProject(remoteProject, true)
|
|
64
|
-
const systemClient = SystemClient.create(instance.baseUrl, remoteProject, apiToken)
|
|
65
|
-
|
|
66
|
-
const force = input.getOption('force')
|
|
67
|
-
const status = await resolveMigrationStatus(systemClient, container.migrationsResolver, force)
|
|
68
|
-
if (status.errorMigrations.length > 0) {
|
|
69
|
-
console.error(createMigrationStatusTable(status.errorMigrations))
|
|
70
|
-
if (!force) {
|
|
71
|
-
throw `Cannot execute migrations`
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
const until = input.getOption('until')
|
|
75
|
-
const untilNormalized = until ? MigrationVersionHelper.extractVersion(until) : null
|
|
76
|
-
|
|
77
|
-
const migrations = untilNormalized
|
|
78
|
-
? status.migrationsToExecute.filter(it => it.version <= MigrationVersionHelper.extractVersion(untilNormalized))
|
|
79
|
-
: status.migrationsToExecute
|
|
80
|
-
|
|
81
|
-
if (migrations.length === 0) {
|
|
82
|
-
console.log('No migrations to execute')
|
|
83
|
-
continue
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
const singleCode = await executeMigrations({
|
|
87
|
-
migrationDescriber: container.migrationDescriber,
|
|
88
|
-
schemaVersionBuilder: container.schemaVersionBuilder,
|
|
89
|
-
client: systemClient,
|
|
90
|
-
migrations,
|
|
91
|
-
requireConfirmation: !input.getOption('yes'),
|
|
92
|
-
force: force,
|
|
93
|
-
contentMigrationFactoryArgs: {
|
|
94
|
-
apiToken,
|
|
95
|
-
apiBaseUrl: instance.baseUrl.replace(/\/$/, ''),
|
|
96
|
-
projectName: remoteProject,
|
|
97
|
-
},
|
|
98
|
-
})
|
|
99
|
-
code ||= singleCode
|
|
100
|
-
}
|
|
101
|
-
return code
|
|
37
|
+
await this.migrationExecutorFacade.execute({
|
|
38
|
+
force,
|
|
39
|
+
until,
|
|
40
|
+
requireConfirmation: !input.getOption('yes'),
|
|
41
|
+
})
|
|
102
42
|
}
|
|
103
43
|
}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import { Command, CommandConfiguration, Input
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { resolveSystemApiClient } from './SystemApiClientResolver'
|
|
5
|
-
import { emptySchema } from '@contember/schema-utils'
|
|
6
|
-
import { validateMigrations } from './MigrationValidationHelper'
|
|
1
|
+
import { Command, CommandConfiguration, Input } from '@contember/cli-common'
|
|
2
|
+
import { Migration, MigrationsResolver } from '@contember/migrations-client'
|
|
3
|
+
import { MigrationRebaseFacade } from '../../lib/migrations/MigrationRebaseFacade'
|
|
7
4
|
|
|
8
5
|
type Args = {
|
|
9
|
-
project?: string
|
|
10
6
|
migration: string[]
|
|
11
7
|
}
|
|
12
8
|
|
|
@@ -16,7 +12,8 @@ type Options = {
|
|
|
16
12
|
|
|
17
13
|
export class MigrationRebaseCommand extends Command<Args, Options> {
|
|
18
14
|
constructor(
|
|
19
|
-
private readonly
|
|
15
|
+
private readonly migrationsResolver: MigrationsResolver,
|
|
16
|
+
private readonly migrationRebaseFacade: MigrationRebaseFacade,
|
|
20
17
|
) {
|
|
21
18
|
super()
|
|
22
19
|
}
|
|
@@ -24,9 +21,6 @@ export class MigrationRebaseCommand extends Command<Args, Options> {
|
|
|
24
21
|
|
|
25
22
|
protected configure(configuration: CommandConfiguration<Args, Options>): void {
|
|
26
23
|
configuration.description('Rebase migrations on filesystem and in local instance')
|
|
27
|
-
if (!this.workspace.isSingleProjectMode()) {
|
|
28
|
-
configuration.argument('project')
|
|
29
|
-
}
|
|
30
24
|
configuration.argument('migration').variadic()
|
|
31
25
|
configuration //
|
|
32
26
|
.option('yes')
|
|
@@ -34,57 +28,21 @@ export class MigrationRebaseCommand extends Command<Args, Options> {
|
|
|
34
28
|
.description('Do not ask for confirmation.')
|
|
35
29
|
}
|
|
36
30
|
|
|
37
|
-
protected async execute(input: Input<Args, Options>): Promise<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
migrationFilesManager,
|
|
50
|
-
}) => {
|
|
51
|
-
const migrationNames = input.getArgument('migration')
|
|
52
|
-
const migrations = []
|
|
53
|
-
for (const migrationName of migrationNames) {
|
|
54
|
-
const migration = await migrationsResolver.findSchemaMigrationByVersion(migrationName)
|
|
55
|
-
if (!migration) {
|
|
56
|
-
throw `Migration ${migrationName} not found`
|
|
57
|
-
}
|
|
58
|
-
migrations.push(migration)
|
|
59
|
-
}
|
|
60
|
-
console.log('Rebasing: ' + migrations.map(it => it.name).join(', '))
|
|
61
|
-
const versions = migrations.map(it => it.version)
|
|
62
|
-
const schemaWithoutMigrations = await schemaVersionBuilder.buildSchemaAdvanced(
|
|
63
|
-
emptySchema,
|
|
64
|
-
version => !versions.includes(version),
|
|
65
|
-
)
|
|
66
|
-
const valid = await validateMigrations(schemaWithoutMigrations, migrations, migrationDescriber, schemaMigrator)
|
|
67
|
-
if (!valid) {
|
|
68
|
-
throw `Cannot rebase migrations`
|
|
69
|
-
}
|
|
70
|
-
const client = await resolveSystemApiClient(workspace, project)
|
|
71
|
-
let i = 0
|
|
72
|
-
for (const migration of migrations) {
|
|
73
|
-
const name = migration.name.substring(MigrationVersionHelper.prefixLength + 1)
|
|
74
|
-
const [version, fullName] = MigrationVersionHelper.createVersion(name, i++)
|
|
75
|
-
const newMigration = {
|
|
76
|
-
name: fullName,
|
|
77
|
-
version: version,
|
|
78
|
-
formatVersion: migration.formatVersion,
|
|
79
|
-
modifications: migration.modifications,
|
|
80
|
-
}
|
|
81
|
-
await client.migrationModify(migration.version, newMigration)
|
|
82
|
-
await migrationFilesManager.moveFile(migration.name, newMigration.name)
|
|
83
|
-
}
|
|
84
|
-
console.log('Done')
|
|
31
|
+
protected async execute(input: Input<Args, Options>): Promise<void> {
|
|
32
|
+
|
|
33
|
+
const migrationNames = input.getArgument('migration')
|
|
34
|
+
|
|
35
|
+
const migrations: Migration[] = []
|
|
36
|
+
for (const migrationName of migrationNames) {
|
|
37
|
+
const migration = await this.migrationsResolver.findSchemaMigrationByVersion(migrationName)
|
|
38
|
+
if (!migration) {
|
|
39
|
+
throw `Migration ${migrationName} not found`
|
|
40
|
+
}
|
|
41
|
+
migrations.push(migration)
|
|
42
|
+
}
|
|
85
43
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
)
|
|
44
|
+
console.log('Rebasing: ' + migrations.map(it => it.name).join(', '))
|
|
45
|
+
await this.migrationRebaseFacade.rebase(migrations)
|
|
46
|
+
console.log('Done')
|
|
89
47
|
}
|
|
90
48
|
}
|
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
import { Command, CommandConfiguration, Input
|
|
2
|
-
import {
|
|
3
|
-
import { interactiveResolveInstanceEnvironmentFromInput } from '../../utils/instance'
|
|
4
|
-
import { interactiveResolveApiToken } from '../../utils/tenant'
|
|
5
|
-
import { SystemClient } from '@contember/migrations-client'
|
|
6
|
-
import { MigrationState, sortMigrations } from '@contember/migrations-client'
|
|
7
|
-
import { createMigrationStatusTable } from '../../utils/migrations/migrations'
|
|
1
|
+
import { Command, CommandConfiguration, Input } from '@contember/cli-common'
|
|
2
|
+
import { MigrationFilesManager, MigrationState, sortMigrations, SystemClient } from '@contember/migrations-client'
|
|
8
3
|
import chalk from 'chalk'
|
|
9
|
-
import {
|
|
4
|
+
import { MigrationsStatusFacade } from '../../lib/migrations/MigrationsStatusFacade'
|
|
5
|
+
import { MigrationPrinter } from '../../lib/migrations/MigrationPrinter'
|
|
6
|
+
import { SystemClientProvider } from '../../lib/SystemClientProvider'
|
|
10
7
|
|
|
11
8
|
type Args = {
|
|
12
|
-
project?: string
|
|
13
9
|
}
|
|
14
10
|
|
|
15
11
|
type Options = {
|
|
16
|
-
instance?: string
|
|
17
|
-
['remote-project']?: string
|
|
18
12
|
['only-to-execute']?: true
|
|
19
13
|
['only-errors']?: true
|
|
20
14
|
['restore-missing']?: true
|
|
@@ -22,24 +16,16 @@ type Options = {
|
|
|
22
16
|
|
|
23
17
|
export class MigrationStatusCommand extends Command<Args, Options> {
|
|
24
18
|
constructor(
|
|
25
|
-
private readonly
|
|
19
|
+
private readonly migrationsStatusFacade: MigrationsStatusFacade,
|
|
20
|
+
private readonly migrationFilesManager: MigrationFilesManager,
|
|
21
|
+
private readonly systemClientProvider: SystemClientProvider,
|
|
22
|
+
private readonly migrationPrinter: MigrationPrinter,
|
|
26
23
|
) {
|
|
27
24
|
super()
|
|
28
25
|
}
|
|
29
26
|
|
|
30
27
|
protected configure(configuration: CommandConfiguration<Args, Options>): void {
|
|
31
28
|
configuration.description('Shows status of executed migrations on an instance & sync status')
|
|
32
|
-
if (!this.workspace.isSingleProjectMode()) {
|
|
33
|
-
configuration.argument('project')
|
|
34
|
-
}
|
|
35
|
-
configuration //
|
|
36
|
-
.option('instance')
|
|
37
|
-
.valueRequired()
|
|
38
|
-
.description('Local instance name or remote Contember API URL')
|
|
39
|
-
configuration //
|
|
40
|
-
.option('remote-project')
|
|
41
|
-
.valueRequired()
|
|
42
|
-
.description('Specify this when remote project name does not match local project name.')
|
|
43
29
|
configuration //
|
|
44
30
|
.option('only-errors')
|
|
45
31
|
.valueNone()
|
|
@@ -55,26 +41,19 @@ export class MigrationStatusCommand extends Command<Args, Options> {
|
|
|
55
41
|
}
|
|
56
42
|
|
|
57
43
|
protected async execute(input: Input<Args, Options>): Promise<number> {
|
|
58
|
-
const projectName = input.getArgument('project')
|
|
59
44
|
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
const
|
|
63
|
-
const container = new MigrationsContainerFactory(migrationsDir).create()
|
|
45
|
+
const onlyErrors = input.getOption('only-errors')
|
|
46
|
+
const onlyToExecute = input.getOption('only-to-execute')
|
|
47
|
+
const restoreMissing = input.getOption('restore-missing')
|
|
64
48
|
|
|
65
|
-
|
|
66
|
-
const apiToken = await interactiveResolveApiToken({ workspace, instance })
|
|
67
|
-
const remoteProject = input.getOption('remote-project') || project.name
|
|
68
|
-
const client = SystemClient.create(instance.baseUrl, remoteProject, apiToken)
|
|
49
|
+
let status = await this.migrationsStatusFacade.resolveMigrationsStatus({})
|
|
69
50
|
|
|
70
|
-
let status = await resolveMigrationStatus(client, container.migrationsResolver)
|
|
71
|
-
const restoreMissing = input.getOption('restore-missing')
|
|
72
51
|
if (restoreMissing) {
|
|
73
52
|
const missing = status.errorMigrations.filter(it => it.state === MigrationState.EXECUTED_MISSING)
|
|
74
53
|
for (const migration of missing) {
|
|
75
54
|
console.log(`Restoring migration ${migration.name}`)
|
|
76
|
-
const fullMigration = await
|
|
77
|
-
await
|
|
55
|
+
const fullMigration = await this.systemClientProvider.get().getExecutedMigration(migration.version)
|
|
56
|
+
await this.migrationFilesManager.createFile(
|
|
78
57
|
JSON.stringify(
|
|
79
58
|
{
|
|
80
59
|
formatVersion: fullMigration.formatVersion,
|
|
@@ -86,11 +65,10 @@ export class MigrationStatusCommand extends Command<Args, Options> {
|
|
|
86
65
|
fullMigration.name,
|
|
87
66
|
)
|
|
88
67
|
}
|
|
89
|
-
status = await
|
|
68
|
+
status = await this.migrationsStatusFacade.resolveMigrationsStatus({})
|
|
90
69
|
}
|
|
91
70
|
|
|
92
|
-
|
|
93
|
-
const onlyToExecute = input.getOption('only-to-execute')
|
|
71
|
+
|
|
94
72
|
|
|
95
73
|
const filtered =
|
|
96
74
|
onlyErrors || onlyToExecute
|
|
@@ -99,7 +77,9 @@ export class MigrationStatusCommand extends Command<Args, Options> {
|
|
|
99
77
|
...(onlyToExecute ? status.migrationsToExecute : []),
|
|
100
78
|
])
|
|
101
79
|
: status.allMigrations
|
|
102
|
-
|
|
80
|
+
|
|
81
|
+
this.migrationPrinter.printStatusTable(filtered)
|
|
82
|
+
|
|
103
83
|
const hasErrors = status.errorMigrations.length > 0
|
|
104
84
|
|
|
105
85
|
if (hasErrors) {
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import { Command, CommandConfiguration
|
|
1
|
+
import { Command, CommandConfiguration } from '@contember/cli-common'
|
|
2
2
|
|
|
3
3
|
export class VersionCommand extends Command<{}, {}> {
|
|
4
|
+
constructor(
|
|
5
|
+
private readonly version: string,
|
|
6
|
+
) {
|
|
7
|
+
super()
|
|
8
|
+
}
|
|
4
9
|
protected configure(configuration: CommandConfiguration<{}, {}>): void {
|
|
5
10
|
configuration.description('Prints Contember CLI version')
|
|
6
11
|
}
|
|
7
12
|
|
|
8
13
|
protected async execute(): Promise<void | number> {
|
|
9
|
-
console.log(
|
|
14
|
+
console.log(this.version)
|
|
10
15
|
return 0
|
|
11
16
|
}
|
|
12
17
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Command, CommandConfiguration, Input } from '@contember/cli-common'
|
|
2
|
+
import { renderProjectInfoHtml } from '../../lib/project/docs/projectDescribe'
|
|
3
|
+
import { writeFile } from 'node:fs/promises'
|
|
4
|
+
import { join } from 'node:path'
|
|
5
|
+
import { SchemaLoader } from '../../lib/schema/SchemaLoader'
|
|
6
|
+
import { validateSchemaAndPrintErrors } from '../../lib/schema/SchemaValidationHelper'
|
|
7
|
+
|
|
8
|
+
type Args = {
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
type Options = {
|
|
12
|
+
name?: string
|
|
13
|
+
output?: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export class ProjectGenerateDocumentationCommand extends Command<Args, Options> {
|
|
17
|
+
constructor(
|
|
18
|
+
private readonly schemaLoader: SchemaLoader,
|
|
19
|
+
) {
|
|
20
|
+
super()
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
protected configure(configuration: CommandConfiguration<Args, Options>): void {
|
|
24
|
+
configuration.description('Generates HTML documentation from project schema')
|
|
25
|
+
configuration.option('output').valueRequired().description('file name or "-" for stdout')
|
|
26
|
+
configuration.option('name').valueRequired().description('project name (for the title)')
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
protected async execute(input: Input<Args, Options>): Promise<number> {
|
|
30
|
+
const schema = await this.schemaLoader.loadSchema()
|
|
31
|
+
if (!validateSchemaAndPrintErrors(schema, 'Defined schema is invalid:')) {
|
|
32
|
+
return 1
|
|
33
|
+
}
|
|
34
|
+
const name = input.getOption('name') ?? 'Contember project'
|
|
35
|
+
|
|
36
|
+
const html = await renderProjectInfoHtml(schema, name)
|
|
37
|
+
const output = input.getOption('output') ?? `${name.toLowerCase().replace(/\s+/g, '-')}.html`
|
|
38
|
+
if (output === '-') {
|
|
39
|
+
console.log(html)
|
|
40
|
+
} else {
|
|
41
|
+
console.log(`Documentation saved to ${output}`)
|
|
42
|
+
await writeFile(join(process.cwd(), output), html)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return 0
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Command, CommandConfiguration, Input
|
|
2
|
-
import { validateSchemaAndPrintErrors } from '../../utils/schema'
|
|
1
|
+
import { Command, CommandConfiguration, Input } from '@contember/cli-common'
|
|
3
2
|
import {
|
|
4
3
|
Authorizator,
|
|
5
4
|
EntityRulesResolver,
|
|
@@ -10,12 +9,12 @@ import {
|
|
|
10
9
|
} from '@contember/engine-content-api'
|
|
11
10
|
import { printSchema } from 'graphql'
|
|
12
11
|
import { mergeSchemas } from '@graphql-tools/schema'
|
|
13
|
-
import { loadSchema } from '../../utils/project/loadSchema'
|
|
14
12
|
import { normalizeSchema } from '@contember/schema-utils'
|
|
15
|
-
import {
|
|
13
|
+
import { SchemaLoader } from '../../lib/schema/SchemaLoader'
|
|
14
|
+
import { SchemaVersionBuilder } from '@contember/migrations-client'
|
|
15
|
+
import { validateSchemaAndPrintErrors } from '../../lib/schema/SchemaValidationHelper'
|
|
16
16
|
|
|
17
17
|
type Args = {
|
|
18
|
-
project?: string
|
|
19
18
|
}
|
|
20
19
|
|
|
21
20
|
type Options = {
|
|
@@ -27,16 +26,14 @@ type Options = {
|
|
|
27
26
|
|
|
28
27
|
export class ProjectPrintSchemaCommand extends Command<Args, Options> {
|
|
29
28
|
constructor(
|
|
30
|
-
private readonly
|
|
29
|
+
private readonly schemaLoader: SchemaLoader,
|
|
30
|
+
private readonly schemaVersionBuilder: SchemaVersionBuilder,
|
|
31
31
|
) {
|
|
32
32
|
super()
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
protected configure(configuration: CommandConfiguration<Args, Options>): void {
|
|
36
36
|
configuration.description('Prints project schema')
|
|
37
|
-
if (!this.workspace.isSingleProjectMode()) {
|
|
38
|
-
configuration.argument('project')
|
|
39
|
-
}
|
|
40
37
|
configuration.option('format').valueRequired().description('graphql|introspection|schema')
|
|
41
38
|
configuration.option('source').valueRequired().description('migrations|definition')
|
|
42
39
|
configuration.option('role').valueArray()
|
|
@@ -44,20 +41,17 @@ export class ProjectPrintSchemaCommand extends Command<Args, Options> {
|
|
|
44
41
|
}
|
|
45
42
|
|
|
46
43
|
protected async execute(input: Input<Args, Options>): Promise<number> {
|
|
47
|
-
const projectName = input.getArgument('project')
|
|
48
|
-
const workspace = this.workspace
|
|
49
44
|
const format = input.getOption('format') || 'graphql'
|
|
50
45
|
|
|
51
|
-
|
|
52
|
-
const migrationsDir = await project.migrationsDir
|
|
53
|
-
const container = new MigrationsContainerFactory(migrationsDir).create()
|
|
46
|
+
|
|
54
47
|
const schema = input.getOption('source') === 'migrations'
|
|
55
|
-
? await
|
|
56
|
-
: await loadSchema(
|
|
48
|
+
? await this.schemaVersionBuilder.buildSchema()
|
|
49
|
+
: await this.schemaLoader.loadSchema()
|
|
57
50
|
|
|
58
51
|
if (!validateSchemaAndPrintErrors(schema, 'Defined schema is invalid:')) {
|
|
59
52
|
return 1
|
|
60
53
|
}
|
|
54
|
+
|
|
61
55
|
const permissionFactory = new PermissionFactory()
|
|
62
56
|
const inputRoles = input.getOption('role')
|
|
63
57
|
const schemaNormalized = input.getOption('normalize') ? normalizeSchema(schema) : schema
|