@contember/cli 1.4.0-rc.8 → 2.0.0-alpha.8
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 +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/package.json +15 -12
- 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/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
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Command } from "@contember/cli-common";
|
|
2
|
+
import { createReadStream } from "node:fs";
|
|
3
|
+
import { createGunzip } from "node:zlib";
|
|
4
|
+
import { confirmImport } from "./utils.js";
|
|
5
|
+
import { maskToken } from "../../lib/maskToken.js";
|
|
6
|
+
import { printProgressLine } from "../../lib/transfer/stdio.js";
|
|
7
|
+
import { readStream } from "../../lib/stream.js";
|
|
8
|
+
class ImportCommand extends Command {
|
|
9
|
+
constructor(remoteProjectResolver, dataTransferClient) {
|
|
10
|
+
super();
|
|
11
|
+
this.remoteProjectResolver = remoteProjectResolver;
|
|
12
|
+
this.dataTransferClient = dataTransferClient;
|
|
13
|
+
}
|
|
14
|
+
configure(configuration) {
|
|
15
|
+
configuration.description("Import data into a project");
|
|
16
|
+
configuration.argument("file");
|
|
17
|
+
configuration.argument("target").optional();
|
|
18
|
+
configuration.option("no-gzip-transfer").valueNone();
|
|
19
|
+
configuration.option("yes").valueNone();
|
|
20
|
+
}
|
|
21
|
+
async execute(input) {
|
|
22
|
+
const target = input.getArgument("target");
|
|
23
|
+
const project = await this.remoteProjectResolver.resolve(target);
|
|
24
|
+
if (!project) {
|
|
25
|
+
throw `Target project not defined`;
|
|
26
|
+
}
|
|
27
|
+
console.log("");
|
|
28
|
+
console.log("Importing data into a following project");
|
|
29
|
+
console.log("");
|
|
30
|
+
console.log(`Project name: ${project.name}`);
|
|
31
|
+
console.log(`API URL: ${project.endpoint}`);
|
|
32
|
+
console.log(`Token: ${maskToken(project.token)}`);
|
|
33
|
+
console.log("");
|
|
34
|
+
if (!await confirmImport(input)) {
|
|
35
|
+
return 1;
|
|
36
|
+
}
|
|
37
|
+
const file = input.getArgument("file");
|
|
38
|
+
const baseInputStream = createReadStream(file);
|
|
39
|
+
const stream = file.endsWith(".gz") ? baseInputStream.pipe(createGunzip()) : baseInputStream;
|
|
40
|
+
const gzipTransfer = !input.getOption("no-gzip-transfer");
|
|
41
|
+
const response = await this.dataTransferClient.dataImport({
|
|
42
|
+
stream,
|
|
43
|
+
project,
|
|
44
|
+
printProgress: printProgressLine,
|
|
45
|
+
gzip: gzipTransfer
|
|
46
|
+
});
|
|
47
|
+
console.log("");
|
|
48
|
+
const responseData = JSON.parse((await readStream(response)).toString());
|
|
49
|
+
if (responseData.ok) {
|
|
50
|
+
console.log("Import done.");
|
|
51
|
+
} else {
|
|
52
|
+
console.error("Import failed:");
|
|
53
|
+
console.log(responseData);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
ImportCommand
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=ImportCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImportCommand.js","sources":["../../../../../../packages/cli/src/commands/transfer/ImportCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration, Input } from '@contember/cli-common'\nimport { createReadStream } from 'node:fs'\nimport { createGunzip } from 'node:zlib'\nimport { confirmImport } from './utils'\nimport { maskToken } from '../../lib/maskToken'\nimport { printProgressLine } from '../../lib/transfer/stdio'\nimport { readStream } from '../../lib/stream'\nimport { RemoteProjectResolver } from '../../lib/project/RemoteProjectResolver'\nimport { DataTransferClient } from '../../lib/transfer/DataTransferClient'\n\ntype Args = {\n\tfile: string\n\ttarget?: string\n}\ntype Options = {\n\t'yes': boolean\n\t'no-gzip-transfer'?: boolean\n}\n\nexport class ImportCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly remoteProjectResolver: RemoteProjectResolver,\n\t\tprivate readonly dataTransferClient: DataTransferClient,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Import data into a project')\n\t\tconfiguration.argument('file')\n\t\tconfiguration.argument('target').optional()\n\t\tconfiguration.option('no-gzip-transfer').valueNone()\n\t\tconfiguration.option('yes').valueNone()\n\t}\n\n\tprotected async execute(input: Input<Args, Options>): Promise<void | number> {\n\t\tconst target = input.getArgument('target')\n\t\tconst project = await this.remoteProjectResolver.resolve(target)\n\t\tif (!project) {\n\t\t\tthrow `Target project not defined`\n\t\t}\n\t\tconsole.log('')\n\t\tconsole.log('Importing data into a following project')\n\t\tconsole.log('')\n\t\tconsole.log(`Project name: ${project.name}`)\n\t\tconsole.log(`API URL: ${project.endpoint}`)\n\t\tconsole.log(`Token: ${maskToken(project.token)}`)\n\t\tconsole.log('')\n\t\tif (!await confirmImport(input)) {\n\t\t\treturn 1\n\t\t}\n\t\tconst file = input.getArgument('file')\n\t\tconst baseInputStream = createReadStream(file)\n\t\tconst stream = (file.endsWith('.gz') ? baseInputStream.pipe(createGunzip()) : baseInputStream)\n\t\tconst gzipTransfer = !input.getOption('no-gzip-transfer')\n\t\tconst response = await this.dataTransferClient.dataImport({\n\t\t\tstream: stream,\n\t\t\tproject,\n\t\t\tprintProgress: printProgressLine,\n\t\t\tgzip: gzipTransfer,\n\t\t})\n\t\tconsole.log('')\n\t\tconst responseData = JSON.parse((await readStream(response)).toString())\n\t\tif (responseData.ok) {\n\t\t\tconsole.log('Import done.')\n\t\t} else {\n\t\t\tconsole.error('Import failed:')\n\t\t\tconsole.log(responseData)\n\t\t}\n\t}\n}\n\n"],"names":[],"mappings":";;;;;;;AAmBO,MAAM,sBAAsB,QAAuB;AAAA,EACzD,YACkB,uBACA,oBAChB;AACK;AAHW,SAAA,wBAAA;AACA,SAAA,qBAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,4BAA4B;AACtD,kBAAc,SAAS,MAAM;AACf,kBAAA,SAAS,QAAQ,EAAE,SAAS;AAC5B,kBAAA,OAAO,kBAAkB,EAAE,UAAU;AACrC,kBAAA,OAAO,KAAK,EAAE,UAAU;AAAA,EACvC;AAAA,EAEA,MAAgB,QAAQ,OAAqD;AACtE,UAAA,SAAS,MAAM,YAAY,QAAQ;AACzC,UAAM,UAAU,MAAM,KAAK,sBAAsB,QAAQ,MAAM;AAC/D,QAAI,CAAC,SAAS;AACP,YAAA;AAAA,IACP;AACA,YAAQ,IAAI,EAAE;AACd,YAAQ,IAAI,yCAAyC;AACrD,YAAQ,IAAI,EAAE;AACd,YAAQ,IAAI,iBAAiB,QAAQ,IAAI,EAAE;AAC3C,YAAQ,IAAI,YAAY,QAAQ,QAAQ,EAAE;AAC1C,YAAQ,IAAI,UAAU,UAAU,QAAQ,KAAK,CAAC,EAAE;AAChD,YAAQ,IAAI,EAAE;AACd,QAAI,CAAC,MAAM,cAAc,KAAK,GAAG;AACzB,aAAA;AAAA,IACR;AACM,UAAA,OAAO,MAAM,YAAY,MAAM;AAC/B,UAAA,kBAAkB,iBAAiB,IAAI;AACvC,UAAA,SAAU,KAAK,SAAS,KAAK,IAAI,gBAAgB,KAAK,cAAc,IAAI;AAC9E,UAAM,eAAe,CAAC,MAAM,UAAU,kBAAkB;AACxD,UAAM,WAAW,MAAM,KAAK,mBAAmB,WAAW;AAAA,MACzD;AAAA,MACA;AAAA,MACA,eAAe;AAAA,MACf,MAAM;AAAA,IAAA,CACN;AACD,YAAQ,IAAI,EAAE;AACR,UAAA,eAAe,KAAK,OAAO,MAAM,WAAW,QAAQ,GAAG,UAAU;AACvE,QAAI,aAAa,IAAI;AACpB,cAAQ,IAAI,cAAc;AAAA,IAAA,OACpB;AACN,cAAQ,MAAM,gBAAgB;AAC9B,cAAQ,IAAI,YAAY;AAAA,IACzB;AAAA,EACD;AACD;"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const cliCommon = require("@contember/cli-common");
|
|
4
|
+
const utils = require("./utils.cjs");
|
|
5
|
+
const maskToken = require("../../lib/maskToken.cjs");
|
|
6
|
+
const stdio = require("../../lib/transfer/stdio.cjs");
|
|
7
|
+
const stream = require("../../lib/stream.cjs");
|
|
8
|
+
const node_zlib = require("node:zlib");
|
|
9
|
+
class TransferCommand extends cliCommon.Command {
|
|
10
|
+
constructor(remoteProjectResolver, dataTransferClient) {
|
|
11
|
+
super();
|
|
12
|
+
this.remoteProjectResolver = remoteProjectResolver;
|
|
13
|
+
this.dataTransferClient = dataTransferClient;
|
|
14
|
+
}
|
|
15
|
+
configure(configuration) {
|
|
16
|
+
configuration.description("Transfer data between projects");
|
|
17
|
+
configuration.argument("source");
|
|
18
|
+
configuration.argument("target").optional();
|
|
19
|
+
configuration.option("include-system").valueNone();
|
|
20
|
+
configuration.option("no-gzip-transfer").valueNone();
|
|
21
|
+
configuration.option("yes").valueNone();
|
|
22
|
+
}
|
|
23
|
+
async execute(input) {
|
|
24
|
+
const source = input.getArgument("source");
|
|
25
|
+
const sourceProject = await this.remoteProjectResolver.resolve(source);
|
|
26
|
+
if (!sourceProject) {
|
|
27
|
+
throw `Source project not defined`;
|
|
28
|
+
}
|
|
29
|
+
const target = input.getArgument("target");
|
|
30
|
+
const targetProject = await this.remoteProjectResolver.resolve(target);
|
|
31
|
+
if (!targetProject) {
|
|
32
|
+
throw `Target project not defined`;
|
|
33
|
+
}
|
|
34
|
+
console.log("");
|
|
35
|
+
console.log("Transferring data between projects:");
|
|
36
|
+
console.log("");
|
|
37
|
+
console.log(`Source project name: ${sourceProject.name}`);
|
|
38
|
+
console.log(`Source API URL: ${sourceProject.endpoint}`);
|
|
39
|
+
console.log(`Source token: ${maskToken.maskToken(sourceProject.token)}`);
|
|
40
|
+
console.log("");
|
|
41
|
+
console.log(`Target project name: ${targetProject.name}`);
|
|
42
|
+
console.log(`Target API URL: ${targetProject.endpoint}`);
|
|
43
|
+
console.log(`Target token: ${maskToken.maskToken(targetProject.token)}`);
|
|
44
|
+
console.log("");
|
|
45
|
+
if (!await utils.confirmImport(input)) {
|
|
46
|
+
return 1;
|
|
47
|
+
}
|
|
48
|
+
const includeSystem = input.getOption("include-system") === true;
|
|
49
|
+
const gzipTransfer = !input.getOption("no-gzip-transfer");
|
|
50
|
+
const exportResponse = await this.dataTransferClient.dataExport({
|
|
51
|
+
project: sourceProject,
|
|
52
|
+
includeSystem,
|
|
53
|
+
gzip: gzipTransfer
|
|
54
|
+
});
|
|
55
|
+
const ungzipedResponse = gzipTransfer ? exportResponse.pipe(node_zlib.createGunzip()) : exportResponse;
|
|
56
|
+
const importResponse = await this.dataTransferClient.dataImport({
|
|
57
|
+
stream: ungzipedResponse,
|
|
58
|
+
project: targetProject,
|
|
59
|
+
printProgress: stdio.printProgressLine,
|
|
60
|
+
gzip: gzipTransfer
|
|
61
|
+
});
|
|
62
|
+
console.log("");
|
|
63
|
+
const responseData = JSON.parse((await stream.readStream(importResponse)).toString());
|
|
64
|
+
if (responseData.ok) {
|
|
65
|
+
console.log("Transfer done.");
|
|
66
|
+
} else {
|
|
67
|
+
console.error("Transfer failed:");
|
|
68
|
+
console.log(responseData);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.TransferCommand = TransferCommand;
|
|
73
|
+
//# sourceMappingURL=TransferCommand.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransferCommand.cjs","sources":["../../../../../../packages/cli/src/commands/transfer/TransferCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration, Input } from '@contember/cli-common'\nimport { confirmImport } from './utils'\nimport { maskToken } from '../../lib/maskToken'\nimport { printProgressLine } from '../../lib/transfer/stdio'\nimport { readStream } from '../../lib/stream'\nimport { createGunzip } from 'node:zlib'\nimport { RemoteProjectResolver } from '../../lib/project/RemoteProjectResolver'\nimport { DataTransferClient } from '../../lib/transfer/DataTransferClient'\n\ntype Args = {\n\tsource: string\n\ttarget: string\n}\ntype Options = {\n\t'include-system'?: boolean\n\t'no-gzip-transfer'?: boolean\n\tyes: boolean\n}\n\nexport class TransferCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly remoteProjectResolver: RemoteProjectResolver,\n\t\tprivate readonly dataTransferClient: DataTransferClient,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Transfer data between projects')\n\t\tconfiguration.argument('source')\n\t\tconfiguration.argument('target').optional()\n\t\tconfiguration.option('include-system').valueNone()\n\t\tconfiguration.option('no-gzip-transfer').valueNone()\n\t\tconfiguration.option('yes').valueNone()\n\t}\n\n\tprotected async execute(input: Input<Args, Options>): Promise<void | number> {\n\t\tconst source = input.getArgument('source')\n\t\tconst sourceProject = await this.remoteProjectResolver.resolve(source)\n\t\tif (!sourceProject) {\n\t\t\tthrow `Source project not defined`\n\t\t}\n\n\t\tconst target = input.getArgument('target')\n\t\tconst targetProject = await this.remoteProjectResolver.resolve(target)\n\t\tif (!targetProject) {\n\t\t\tthrow `Target project not defined`\n\t\t}\n\n\n\t\tconsole.log('')\n\t\tconsole.log('Transferring data between projects:')\n\t\tconsole.log('')\n\t\tconsole.log(`Source project name: ${sourceProject.name}`)\n\t\tconsole.log(`Source API URL: ${sourceProject.endpoint}`)\n\t\tconsole.log(`Source token: ${maskToken(sourceProject.token)}`)\n\t\tconsole.log('')\n\t\tconsole.log(`Target project name: ${targetProject.name}`)\n\t\tconsole.log(`Target API URL: ${targetProject.endpoint}`)\n\t\tconsole.log(`Target token: ${maskToken(targetProject.token)}`)\n\t\tconsole.log('')\n\t\tif (!await confirmImport(input)) {\n\t\t\treturn 1\n\t\t}\n\n\t\tconst includeSystem = input.getOption('include-system') === true\n\t\tconst gzipTransfer = !input.getOption('no-gzip-transfer')\n\t\tconst exportResponse = (await this.dataTransferClient.dataExport({\n\t\t\tproject: sourceProject,\n\t\t\tincludeSystem,\n\t\t\tgzip: gzipTransfer,\n\t\t}))\n\t\tconst ungzipedResponse = gzipTransfer ? exportResponse.pipe(createGunzip()) : exportResponse\n\t\tconst importResponse = await this.dataTransferClient.dataImport({\n\t\t\tstream: ungzipedResponse,\n\t\t\tproject: targetProject,\n\t\t\tprintProgress: printProgressLine,\n\t\t\tgzip: gzipTransfer,\n\t\t})\n\t\tconsole.log('')\n\n\t\tconst responseData = JSON.parse((await readStream(importResponse)).toString())\n\t\tif (responseData.ok) {\n\t\t\tconsole.log('Transfer done.')\n\t\t} else {\n\t\t\tconsole.error('Transfer failed:')\n\t\t\tconsole.log(responseData)\n\t\t}\n\t}\n}\n"],"names":["Command","maskToken","confirmImport","createGunzip","printProgressLine","readStream"],"mappings":";;;;;;;;AAmBO,MAAM,wBAAwBA,UAAAA,QAAuB;AAAA,EAC3D,YACkB,uBACA,oBAChB;AACK;AAHW,SAAA,wBAAA;AACA,SAAA,qBAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,gCAAgC;AAC1D,kBAAc,SAAS,QAAQ;AACjB,kBAAA,SAAS,QAAQ,EAAE,SAAS;AAC5B,kBAAA,OAAO,gBAAgB,EAAE,UAAU;AACnC,kBAAA,OAAO,kBAAkB,EAAE,UAAU;AACrC,kBAAA,OAAO,KAAK,EAAE,UAAU;AAAA,EACvC;AAAA,EAEA,MAAgB,QAAQ,OAAqD;AACtE,UAAA,SAAS,MAAM,YAAY,QAAQ;AACzC,UAAM,gBAAgB,MAAM,KAAK,sBAAsB,QAAQ,MAAM;AACrE,QAAI,CAAC,eAAe;AACb,YAAA;AAAA,IACP;AAEM,UAAA,SAAS,MAAM,YAAY,QAAQ;AACzC,UAAM,gBAAgB,MAAM,KAAK,sBAAsB,QAAQ,MAAM;AACrE,QAAI,CAAC,eAAe;AACb,YAAA;AAAA,IACP;AAGA,YAAQ,IAAI,EAAE;AACd,YAAQ,IAAI,qCAAqC;AACjD,YAAQ,IAAI,EAAE;AACd,YAAQ,IAAI,wBAAwB,cAAc,IAAI,EAAE;AACxD,YAAQ,IAAI,mBAAmB,cAAc,QAAQ,EAAE;AACvD,YAAQ,IAAI,iBAAiBC,UAAAA,UAAU,cAAc,KAAK,CAAC,EAAE;AAC7D,YAAQ,IAAI,EAAE;AACd,YAAQ,IAAI,wBAAwB,cAAc,IAAI,EAAE;AACxD,YAAQ,IAAI,mBAAmB,cAAc,QAAQ,EAAE;AACvD,YAAQ,IAAI,iBAAiBA,UAAAA,UAAU,cAAc,KAAK,CAAC,EAAE;AAC7D,YAAQ,IAAI,EAAE;AACd,QAAI,CAAC,MAAMC,oBAAc,KAAK,GAAG;AACzB,aAAA;AAAA,IACR;AAEA,UAAM,gBAAgB,MAAM,UAAU,gBAAgB,MAAM;AAC5D,UAAM,eAAe,CAAC,MAAM,UAAU,kBAAkB;AACxD,UAAM,iBAAkB,MAAM,KAAK,mBAAmB,WAAW;AAAA,MAChE,SAAS;AAAA,MACT;AAAA,MACA,MAAM;AAAA,IAAA,CACN;AACD,UAAM,mBAAmB,eAAe,eAAe,KAAKC,UAAA,aAAA,CAAc,IAAI;AAC9E,UAAM,iBAAiB,MAAM,KAAK,mBAAmB,WAAW;AAAA,MAC/D,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,eAAeC,MAAA;AAAA,MACf,MAAM;AAAA,IAAA,CACN;AACD,YAAQ,IAAI,EAAE;AAER,UAAA,eAAe,KAAK,OAAO,MAAMC,OAAAA,WAAW,cAAc,GAAG,UAAU;AAC7E,QAAI,aAAa,IAAI;AACpB,cAAQ,IAAI,gBAAgB;AAAA,IAAA,OACtB;AACN,cAAQ,MAAM,kBAAkB;AAChC,cAAQ,IAAI,YAAY;AAAA,IACzB;AAAA,EACD;AACD;;"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Command } from "@contember/cli-common";
|
|
2
|
+
import { confirmImport } from "./utils.js";
|
|
3
|
+
import { maskToken } from "../../lib/maskToken.js";
|
|
4
|
+
import { printProgressLine } from "../../lib/transfer/stdio.js";
|
|
5
|
+
import { readStream } from "../../lib/stream.js";
|
|
6
|
+
import { createGunzip } from "node:zlib";
|
|
7
|
+
class TransferCommand extends Command {
|
|
8
|
+
constructor(remoteProjectResolver, dataTransferClient) {
|
|
9
|
+
super();
|
|
10
|
+
this.remoteProjectResolver = remoteProjectResolver;
|
|
11
|
+
this.dataTransferClient = dataTransferClient;
|
|
12
|
+
}
|
|
13
|
+
configure(configuration) {
|
|
14
|
+
configuration.description("Transfer data between projects");
|
|
15
|
+
configuration.argument("source");
|
|
16
|
+
configuration.argument("target").optional();
|
|
17
|
+
configuration.option("include-system").valueNone();
|
|
18
|
+
configuration.option("no-gzip-transfer").valueNone();
|
|
19
|
+
configuration.option("yes").valueNone();
|
|
20
|
+
}
|
|
21
|
+
async execute(input) {
|
|
22
|
+
const source = input.getArgument("source");
|
|
23
|
+
const sourceProject = await this.remoteProjectResolver.resolve(source);
|
|
24
|
+
if (!sourceProject) {
|
|
25
|
+
throw `Source project not defined`;
|
|
26
|
+
}
|
|
27
|
+
const target = input.getArgument("target");
|
|
28
|
+
const targetProject = await this.remoteProjectResolver.resolve(target);
|
|
29
|
+
if (!targetProject) {
|
|
30
|
+
throw `Target project not defined`;
|
|
31
|
+
}
|
|
32
|
+
console.log("");
|
|
33
|
+
console.log("Transferring data between projects:");
|
|
34
|
+
console.log("");
|
|
35
|
+
console.log(`Source project name: ${sourceProject.name}`);
|
|
36
|
+
console.log(`Source API URL: ${sourceProject.endpoint}`);
|
|
37
|
+
console.log(`Source token: ${maskToken(sourceProject.token)}`);
|
|
38
|
+
console.log("");
|
|
39
|
+
console.log(`Target project name: ${targetProject.name}`);
|
|
40
|
+
console.log(`Target API URL: ${targetProject.endpoint}`);
|
|
41
|
+
console.log(`Target token: ${maskToken(targetProject.token)}`);
|
|
42
|
+
console.log("");
|
|
43
|
+
if (!await confirmImport(input)) {
|
|
44
|
+
return 1;
|
|
45
|
+
}
|
|
46
|
+
const includeSystem = input.getOption("include-system") === true;
|
|
47
|
+
const gzipTransfer = !input.getOption("no-gzip-transfer");
|
|
48
|
+
const exportResponse = await this.dataTransferClient.dataExport({
|
|
49
|
+
project: sourceProject,
|
|
50
|
+
includeSystem,
|
|
51
|
+
gzip: gzipTransfer
|
|
52
|
+
});
|
|
53
|
+
const ungzipedResponse = gzipTransfer ? exportResponse.pipe(createGunzip()) : exportResponse;
|
|
54
|
+
const importResponse = await this.dataTransferClient.dataImport({
|
|
55
|
+
stream: ungzipedResponse,
|
|
56
|
+
project: targetProject,
|
|
57
|
+
printProgress: printProgressLine,
|
|
58
|
+
gzip: gzipTransfer
|
|
59
|
+
});
|
|
60
|
+
console.log("");
|
|
61
|
+
const responseData = JSON.parse((await readStream(importResponse)).toString());
|
|
62
|
+
if (responseData.ok) {
|
|
63
|
+
console.log("Transfer done.");
|
|
64
|
+
} else {
|
|
65
|
+
console.error("Transfer failed:");
|
|
66
|
+
console.log(responseData);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export {
|
|
71
|
+
TransferCommand
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=TransferCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransferCommand.js","sources":["../../../../../../packages/cli/src/commands/transfer/TransferCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration, Input } from '@contember/cli-common'\nimport { confirmImport } from './utils'\nimport { maskToken } from '../../lib/maskToken'\nimport { printProgressLine } from '../../lib/transfer/stdio'\nimport { readStream } from '../../lib/stream'\nimport { createGunzip } from 'node:zlib'\nimport { RemoteProjectResolver } from '../../lib/project/RemoteProjectResolver'\nimport { DataTransferClient } from '../../lib/transfer/DataTransferClient'\n\ntype Args = {\n\tsource: string\n\ttarget: string\n}\ntype Options = {\n\t'include-system'?: boolean\n\t'no-gzip-transfer'?: boolean\n\tyes: boolean\n}\n\nexport class TransferCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly remoteProjectResolver: RemoteProjectResolver,\n\t\tprivate readonly dataTransferClient: DataTransferClient,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Transfer data between projects')\n\t\tconfiguration.argument('source')\n\t\tconfiguration.argument('target').optional()\n\t\tconfiguration.option('include-system').valueNone()\n\t\tconfiguration.option('no-gzip-transfer').valueNone()\n\t\tconfiguration.option('yes').valueNone()\n\t}\n\n\tprotected async execute(input: Input<Args, Options>): Promise<void | number> {\n\t\tconst source = input.getArgument('source')\n\t\tconst sourceProject = await this.remoteProjectResolver.resolve(source)\n\t\tif (!sourceProject) {\n\t\t\tthrow `Source project not defined`\n\t\t}\n\n\t\tconst target = input.getArgument('target')\n\t\tconst targetProject = await this.remoteProjectResolver.resolve(target)\n\t\tif (!targetProject) {\n\t\t\tthrow `Target project not defined`\n\t\t}\n\n\n\t\tconsole.log('')\n\t\tconsole.log('Transferring data between projects:')\n\t\tconsole.log('')\n\t\tconsole.log(`Source project name: ${sourceProject.name}`)\n\t\tconsole.log(`Source API URL: ${sourceProject.endpoint}`)\n\t\tconsole.log(`Source token: ${maskToken(sourceProject.token)}`)\n\t\tconsole.log('')\n\t\tconsole.log(`Target project name: ${targetProject.name}`)\n\t\tconsole.log(`Target API URL: ${targetProject.endpoint}`)\n\t\tconsole.log(`Target token: ${maskToken(targetProject.token)}`)\n\t\tconsole.log('')\n\t\tif (!await confirmImport(input)) {\n\t\t\treturn 1\n\t\t}\n\n\t\tconst includeSystem = input.getOption('include-system') === true\n\t\tconst gzipTransfer = !input.getOption('no-gzip-transfer')\n\t\tconst exportResponse = (await this.dataTransferClient.dataExport({\n\t\t\tproject: sourceProject,\n\t\t\tincludeSystem,\n\t\t\tgzip: gzipTransfer,\n\t\t}))\n\t\tconst ungzipedResponse = gzipTransfer ? exportResponse.pipe(createGunzip()) : exportResponse\n\t\tconst importResponse = await this.dataTransferClient.dataImport({\n\t\t\tstream: ungzipedResponse,\n\t\t\tproject: targetProject,\n\t\t\tprintProgress: printProgressLine,\n\t\t\tgzip: gzipTransfer,\n\t\t})\n\t\tconsole.log('')\n\n\t\tconst responseData = JSON.parse((await readStream(importResponse)).toString())\n\t\tif (responseData.ok) {\n\t\t\tconsole.log('Transfer done.')\n\t\t} else {\n\t\t\tconsole.error('Transfer failed:')\n\t\t\tconsole.log(responseData)\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";;;;;;AAmBO,MAAM,wBAAwB,QAAuB;AAAA,EAC3D,YACkB,uBACA,oBAChB;AACK;AAHW,SAAA,wBAAA;AACA,SAAA,qBAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,gCAAgC;AAC1D,kBAAc,SAAS,QAAQ;AACjB,kBAAA,SAAS,QAAQ,EAAE,SAAS;AAC5B,kBAAA,OAAO,gBAAgB,EAAE,UAAU;AACnC,kBAAA,OAAO,kBAAkB,EAAE,UAAU;AACrC,kBAAA,OAAO,KAAK,EAAE,UAAU;AAAA,EACvC;AAAA,EAEA,MAAgB,QAAQ,OAAqD;AACtE,UAAA,SAAS,MAAM,YAAY,QAAQ;AACzC,UAAM,gBAAgB,MAAM,KAAK,sBAAsB,QAAQ,MAAM;AACrE,QAAI,CAAC,eAAe;AACb,YAAA;AAAA,IACP;AAEM,UAAA,SAAS,MAAM,YAAY,QAAQ;AACzC,UAAM,gBAAgB,MAAM,KAAK,sBAAsB,QAAQ,MAAM;AACrE,QAAI,CAAC,eAAe;AACb,YAAA;AAAA,IACP;AAGA,YAAQ,IAAI,EAAE;AACd,YAAQ,IAAI,qCAAqC;AACjD,YAAQ,IAAI,EAAE;AACd,YAAQ,IAAI,wBAAwB,cAAc,IAAI,EAAE;AACxD,YAAQ,IAAI,mBAAmB,cAAc,QAAQ,EAAE;AACvD,YAAQ,IAAI,iBAAiB,UAAU,cAAc,KAAK,CAAC,EAAE;AAC7D,YAAQ,IAAI,EAAE;AACd,YAAQ,IAAI,wBAAwB,cAAc,IAAI,EAAE;AACxD,YAAQ,IAAI,mBAAmB,cAAc,QAAQ,EAAE;AACvD,YAAQ,IAAI,iBAAiB,UAAU,cAAc,KAAK,CAAC,EAAE;AAC7D,YAAQ,IAAI,EAAE;AACd,QAAI,CAAC,MAAM,cAAc,KAAK,GAAG;AACzB,aAAA;AAAA,IACR;AAEA,UAAM,gBAAgB,MAAM,UAAU,gBAAgB,MAAM;AAC5D,UAAM,eAAe,CAAC,MAAM,UAAU,kBAAkB;AACxD,UAAM,iBAAkB,MAAM,KAAK,mBAAmB,WAAW;AAAA,MAChE,SAAS;AAAA,MACT;AAAA,MACA,MAAM;AAAA,IAAA,CACN;AACD,UAAM,mBAAmB,eAAe,eAAe,KAAK,aAAA,CAAc,IAAI;AAC9E,UAAM,iBAAiB,MAAM,KAAK,mBAAmB,WAAW;AAAA,MAC/D,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,eAAe;AAAA,MACf,MAAM;AAAA,IAAA,CACN;AACD,YAAQ,IAAI,EAAE;AAER,UAAA,eAAe,KAAK,OAAO,MAAM,WAAW,cAAc,GAAG,UAAU;AAC7E,QAAI,aAAa,IAAI;AACpB,cAAQ,IAAI,gBAAgB;AAAA,IAAA,OACtB;AACN,cAAQ,MAAM,kBAAkB;AAChC,cAAQ,IAAI,YAAY;AAAA,IACzB;AAAA,EACD;AACD;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const prompts = require("prompts");
|
|
4
|
+
const confirmImport = async (input) => {
|
|
5
|
+
if (input.getOption("yes")) {
|
|
6
|
+
return true;
|
|
7
|
+
}
|
|
8
|
+
if (!process.stdin.isTTY) {
|
|
9
|
+
throw "TTY not available. Pass --yes option to confirm execution.";
|
|
10
|
+
}
|
|
11
|
+
console.log("This will completely wipe the target project.");
|
|
12
|
+
console.log("(to skip this dialog, you can pass --yes option)");
|
|
13
|
+
console.log("");
|
|
14
|
+
const { ok } = await prompts({
|
|
15
|
+
type: "confirm",
|
|
16
|
+
name: "ok",
|
|
17
|
+
message: `Do you want to continue?`
|
|
18
|
+
});
|
|
19
|
+
return ok;
|
|
20
|
+
};
|
|
21
|
+
exports.confirmImport = confirmImport;
|
|
22
|
+
//# sourceMappingURL=utils.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.cjs","sources":["../../../../../../packages/cli/src/commands/transfer/utils.ts"],"sourcesContent":["import { Input } from '@contember/cli-common'\nimport prompts from 'prompts'\n\n\nexport const confirmImport = async (input: Input<{}, { yes: boolean }>): Promise<boolean> => {\n\tif (input.getOption('yes')) {\n\t\treturn true\n\t}\n\tif (!process.stdin.isTTY) {\n\t\tthrow 'TTY not available. Pass --yes option to confirm execution.'\n\t}\n\tconsole.log('This will completely wipe the target project.')\n\tconsole.log('(to skip this dialog, you can pass --yes option)')\n\tconsole.log('')\n\tconst { ok } = await prompts({\n\t\ttype: 'confirm',\n\t\tname: 'ok',\n\t\tmessage: `Do you want to continue?`,\n\t})\n\treturn ok\n}\n"],"names":[],"mappings":";;;AAIa,MAAA,gBAAgB,OAAO,UAAyD;AACxF,MAAA,MAAM,UAAU,KAAK,GAAG;AACpB,WAAA;AAAA,EACR;AACI,MAAA,CAAC,QAAQ,MAAM,OAAO;AACnB,UAAA;AAAA,EACP;AACA,UAAQ,IAAI,+CAA+C;AAC3D,UAAQ,IAAI,kDAAkD;AAC9D,UAAQ,IAAI,EAAE;AACd,QAAM,EAAE,OAAO,MAAM,QAAQ;AAAA,IAC5B,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EAAA,CACT;AACM,SAAA;AACR;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import prompts from "prompts";
|
|
2
|
+
const confirmImport = async (input) => {
|
|
3
|
+
if (input.getOption("yes")) {
|
|
4
|
+
return true;
|
|
5
|
+
}
|
|
6
|
+
if (!process.stdin.isTTY) {
|
|
7
|
+
throw "TTY not available. Pass --yes option to confirm execution.";
|
|
8
|
+
}
|
|
9
|
+
console.log("This will completely wipe the target project.");
|
|
10
|
+
console.log("(to skip this dialog, you can pass --yes option)");
|
|
11
|
+
console.log("");
|
|
12
|
+
const { ok } = await prompts({
|
|
13
|
+
type: "confirm",
|
|
14
|
+
name: "ok",
|
|
15
|
+
message: `Do you want to continue?`
|
|
16
|
+
});
|
|
17
|
+
return ok;
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
confirmImport
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../../packages/cli/src/commands/transfer/utils.ts"],"sourcesContent":["import { Input } from '@contember/cli-common'\nimport prompts from 'prompts'\n\n\nexport const confirmImport = async (input: Input<{}, { yes: boolean }>): Promise<boolean> => {\n\tif (input.getOption('yes')) {\n\t\treturn true\n\t}\n\tif (!process.stdin.isTTY) {\n\t\tthrow 'TTY not available. Pass --yes option to confirm execution.'\n\t}\n\tconsole.log('This will completely wipe the target project.')\n\tconsole.log('(to skip this dialog, you can pass --yes option)')\n\tconsole.log('')\n\tconst { ok } = await prompts({\n\t\ttype: 'confirm',\n\t\tname: 'ok',\n\t\tmessage: `Do you want to continue?`,\n\t})\n\treturn ok\n}\n"],"names":[],"mappings":";AAIa,MAAA,gBAAgB,OAAO,UAAyD;AACxF,MAAA,MAAM,UAAU,KAAK,GAAG;AACpB,WAAA;AAAA,EACR;AACI,MAAA,CAAC,QAAQ,MAAM,OAAO;AACnB,UAAA;AAAA,EACP;AACA,UAAQ,IAAI,+CAA+C;AAC3D,UAAQ,IAAI,kDAAkD;AAC9D,UAAQ,IAAI,EAAE;AACd,QAAM,EAAE,OAAO,MAAM,QAAQ;AAAA,IAC5B,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EAAA,CACT;AACM,SAAA;AACR;"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const cliCommon = require("@contember/cli-common");
|
|
4
|
+
const consts = require("../../consts.cjs");
|
|
5
|
+
class WorkspaceUpdateApiCommand extends cliCommon.Command {
|
|
6
|
+
constructor(packageWorkspaceResolver, dockerComposeManager) {
|
|
7
|
+
super();
|
|
8
|
+
this.packageWorkspaceResolver = packageWorkspaceResolver;
|
|
9
|
+
this.dockerComposeManager = dockerComposeManager;
|
|
10
|
+
}
|
|
11
|
+
configure(configuration) {
|
|
12
|
+
configuration.description("Updates Contember API version and all related packages");
|
|
13
|
+
configuration.argument("version");
|
|
14
|
+
}
|
|
15
|
+
async execute(input) {
|
|
16
|
+
const version = input.getArgument("version");
|
|
17
|
+
const packageWorkspace = await this.packageWorkspaceResolver.resolve();
|
|
18
|
+
await packageWorkspace.updateEverywhere({
|
|
19
|
+
"@contember/schema": version,
|
|
20
|
+
"@contember/schema-definition": version,
|
|
21
|
+
"@contember/cli": version
|
|
22
|
+
});
|
|
23
|
+
console.log("Updating docker-compose");
|
|
24
|
+
const getNewImage = (currentImage) => {
|
|
25
|
+
for (const candidate of consts.contemberDockerImages) {
|
|
26
|
+
if (currentImage.startsWith(`${candidate}:`)) {
|
|
27
|
+
return `${candidate.replace(/-ee$/, "")}:${version}`;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return null;
|
|
31
|
+
};
|
|
32
|
+
await this.dockerComposeManager.updateMainDockerComposeConfig((data) => ({
|
|
33
|
+
...data,
|
|
34
|
+
services: Object.fromEntries(Object.entries(data?.services ?? {}).map(([name, service]) => {
|
|
35
|
+
const newImage = getNewImage(service.image);
|
|
36
|
+
if (newImage) {
|
|
37
|
+
console.log(`docker-compose service ${name} updated`);
|
|
38
|
+
return [
|
|
39
|
+
name,
|
|
40
|
+
{
|
|
41
|
+
...service,
|
|
42
|
+
image: newImage
|
|
43
|
+
}
|
|
44
|
+
];
|
|
45
|
+
}
|
|
46
|
+
return [name, service];
|
|
47
|
+
}))
|
|
48
|
+
}));
|
|
49
|
+
console.log("API versions updated");
|
|
50
|
+
console.log("Restart server to apply changes");
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.WorkspaceUpdateApiCommand = WorkspaceUpdateApiCommand;
|
|
54
|
+
//# sourceMappingURL=WorkspaceUpdateApiCommand.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkspaceUpdateApiCommand.cjs","sources":["../../../../../../packages/cli/src/commands/workspace/WorkspaceUpdateApiCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration, Input, PackageWorkspaceResolver } from '@contember/cli-common'\nimport { DockerComposeManager } from '../../lib/fs/DockerComposeManager'\nimport { contemberDockerImages } from '../../consts'\n\ntype Args = {\n\tversion: string\n}\n\ntype Options = {}\n\nexport class WorkspaceUpdateApiCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly packageWorkspaceResolver: PackageWorkspaceResolver,\n\t\tprivate readonly dockerComposeManager: DockerComposeManager,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Updates Contember API version and all related packages')\n\t\tconfiguration.argument('version')\n\t}\n\n\tprotected async execute(input: Input<Args, Options>): Promise<void> {\n\t\tconst version = input.getArgument('version')\n\t\tconst packageWorkspace = await this.packageWorkspaceResolver.resolve()\n\n\t\tawait packageWorkspace.updateEverywhere({\n\t\t\t'@contember/schema': version,\n\t\t\t'@contember/schema-definition': version,\n\t\t\t'@contember/cli': version,\n\t\t})\n\n\t\tconsole.log('Updating docker-compose')\n\t\tconst getNewImage = (currentImage: string): string | null => {\n\t\t\tfor (const candidate of contemberDockerImages) {\n\t\t\t\tif (currentImage.startsWith(`${candidate}:`)) {\n\t\t\t\t\treturn `${candidate.replace(/-ee$/, '')}:${version}`\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null\n\t\t}\n\t\tawait this.dockerComposeManager.updateMainDockerComposeConfig(data => ({\n\t\t\t...data,\n\t\t\tservices: Object.fromEntries(Object.entries(data?.services ?? {}).map(([name, service]: [string, any]) => {\n\t\t\t\tconst newImage = getNewImage(service.image)\n\t\t\t\tif (newImage) {\n\t\t\t\t\tconsole.log(`docker-compose service ${name} updated`)\n\t\t\t\t\treturn [\n\t\t\t\t\t\tname,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t...service,\n\t\t\t\t\t\t\timage: newImage,\n\t\t\t\t\t\t},\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t\treturn [name, service]\n\t\t\t})),\n\t\t}))\n\t\tconsole.log('API versions updated')\n\t\tconsole.log('Restart server to apply changes')\n\t}\n}\n"],"names":["Command","contemberDockerImages"],"mappings":";;;;AAUO,MAAM,kCAAkCA,UAAAA,QAAuB;AAAA,EACrE,YACkB,0BACA,sBAChB;AACK;AAHW,SAAA,2BAAA;AACA,SAAA,uBAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,wDAAwD;AAClF,kBAAc,SAAS,SAAS;AAAA,EACjC;AAAA,EAEA,MAAgB,QAAQ,OAA4C;AAC7D,UAAA,UAAU,MAAM,YAAY,SAAS;AAC3C,UAAM,mBAAmB,MAAM,KAAK,yBAAyB,QAAQ;AAErE,UAAM,iBAAiB,iBAAiB;AAAA,MACvC,qBAAqB;AAAA,MACrB,gCAAgC;AAAA,MAChC,kBAAkB;AAAA,IAAA,CAClB;AAED,YAAQ,IAAI,yBAAyB;AAC/B,UAAA,cAAc,CAAC,iBAAwC;AAC5D,iBAAW,aAAaC,8BAAuB;AAC9C,YAAI,aAAa,WAAW,GAAG,SAAS,GAAG,GAAG;AAC7C,iBAAO,GAAG,UAAU,QAAQ,QAAQ,EAAE,CAAC,IAAI,OAAO;AAAA,QACnD;AAAA,MACD;AACO,aAAA;AAAA,IAAA;AAEF,UAAA,KAAK,qBAAqB,8BAA8B,CAAS,UAAA;AAAA,MACtE,GAAG;AAAA,MACH,UAAU,OAAO,YAAY,OAAO,QAAQ,MAAM,YAAY,CAAA,CAAE,EAAE,IAAI,CAAC,CAAC,MAAM,OAAO,MAAqB;AACnG,cAAA,WAAW,YAAY,QAAQ,KAAK;AAC1C,YAAI,UAAU;AACL,kBAAA,IAAI,0BAA0B,IAAI,UAAU;AAC7C,iBAAA;AAAA,YACN;AAAA,YACA;AAAA,cACC,GAAG;AAAA,cACH,OAAO;AAAA,YACR;AAAA,UAAA;AAAA,QAEF;AACO,eAAA,CAAC,MAAM,OAAO;AAAA,MAAA,CACrB,CAAC;AAAA,IACD,EAAA;AACF,YAAQ,IAAI,sBAAsB;AAClC,YAAQ,IAAI,iCAAiC;AAAA,EAC9C;AACD;;"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Command } from "@contember/cli-common";
|
|
2
|
+
import { contemberDockerImages } from "../../consts.js";
|
|
3
|
+
class WorkspaceUpdateApiCommand extends Command {
|
|
4
|
+
constructor(packageWorkspaceResolver, dockerComposeManager) {
|
|
5
|
+
super();
|
|
6
|
+
this.packageWorkspaceResolver = packageWorkspaceResolver;
|
|
7
|
+
this.dockerComposeManager = dockerComposeManager;
|
|
8
|
+
}
|
|
9
|
+
configure(configuration) {
|
|
10
|
+
configuration.description("Updates Contember API version and all related packages");
|
|
11
|
+
configuration.argument("version");
|
|
12
|
+
}
|
|
13
|
+
async execute(input) {
|
|
14
|
+
const version = input.getArgument("version");
|
|
15
|
+
const packageWorkspace = await this.packageWorkspaceResolver.resolve();
|
|
16
|
+
await packageWorkspace.updateEverywhere({
|
|
17
|
+
"@contember/schema": version,
|
|
18
|
+
"@contember/schema-definition": version,
|
|
19
|
+
"@contember/cli": version
|
|
20
|
+
});
|
|
21
|
+
console.log("Updating docker-compose");
|
|
22
|
+
const getNewImage = (currentImage) => {
|
|
23
|
+
for (const candidate of contemberDockerImages) {
|
|
24
|
+
if (currentImage.startsWith(`${candidate}:`)) {
|
|
25
|
+
return `${candidate.replace(/-ee$/, "")}:${version}`;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return null;
|
|
29
|
+
};
|
|
30
|
+
await this.dockerComposeManager.updateMainDockerComposeConfig((data) => ({
|
|
31
|
+
...data,
|
|
32
|
+
services: Object.fromEntries(Object.entries(data?.services ?? {}).map(([name, service]) => {
|
|
33
|
+
const newImage = getNewImage(service.image);
|
|
34
|
+
if (newImage) {
|
|
35
|
+
console.log(`docker-compose service ${name} updated`);
|
|
36
|
+
return [
|
|
37
|
+
name,
|
|
38
|
+
{
|
|
39
|
+
...service,
|
|
40
|
+
image: newImage
|
|
41
|
+
}
|
|
42
|
+
];
|
|
43
|
+
}
|
|
44
|
+
return [name, service];
|
|
45
|
+
}))
|
|
46
|
+
}));
|
|
47
|
+
console.log("API versions updated");
|
|
48
|
+
console.log("Restart server to apply changes");
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
WorkspaceUpdateApiCommand
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=WorkspaceUpdateApiCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkspaceUpdateApiCommand.js","sources":["../../../../../../packages/cli/src/commands/workspace/WorkspaceUpdateApiCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration, Input, PackageWorkspaceResolver } from '@contember/cli-common'\nimport { DockerComposeManager } from '../../lib/fs/DockerComposeManager'\nimport { contemberDockerImages } from '../../consts'\n\ntype Args = {\n\tversion: string\n}\n\ntype Options = {}\n\nexport class WorkspaceUpdateApiCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly packageWorkspaceResolver: PackageWorkspaceResolver,\n\t\tprivate readonly dockerComposeManager: DockerComposeManager,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Updates Contember API version and all related packages')\n\t\tconfiguration.argument('version')\n\t}\n\n\tprotected async execute(input: Input<Args, Options>): Promise<void> {\n\t\tconst version = input.getArgument('version')\n\t\tconst packageWorkspace = await this.packageWorkspaceResolver.resolve()\n\n\t\tawait packageWorkspace.updateEverywhere({\n\t\t\t'@contember/schema': version,\n\t\t\t'@contember/schema-definition': version,\n\t\t\t'@contember/cli': version,\n\t\t})\n\n\t\tconsole.log('Updating docker-compose')\n\t\tconst getNewImage = (currentImage: string): string | null => {\n\t\t\tfor (const candidate of contemberDockerImages) {\n\t\t\t\tif (currentImage.startsWith(`${candidate}:`)) {\n\t\t\t\t\treturn `${candidate.replace(/-ee$/, '')}:${version}`\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null\n\t\t}\n\t\tawait this.dockerComposeManager.updateMainDockerComposeConfig(data => ({\n\t\t\t...data,\n\t\t\tservices: Object.fromEntries(Object.entries(data?.services ?? {}).map(([name, service]: [string, any]) => {\n\t\t\t\tconst newImage = getNewImage(service.image)\n\t\t\t\tif (newImage) {\n\t\t\t\t\tconsole.log(`docker-compose service ${name} updated`)\n\t\t\t\t\treturn [\n\t\t\t\t\t\tname,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t...service,\n\t\t\t\t\t\t\timage: newImage,\n\t\t\t\t\t\t},\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t\treturn [name, service]\n\t\t\t})),\n\t\t}))\n\t\tconsole.log('API versions updated')\n\t\tconsole.log('Restart server to apply changes')\n\t}\n}\n"],"names":[],"mappings":";;AAUO,MAAM,kCAAkC,QAAuB;AAAA,EACrE,YACkB,0BACA,sBAChB;AACK;AAHW,SAAA,2BAAA;AACA,SAAA,uBAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,wDAAwD;AAClF,kBAAc,SAAS,SAAS;AAAA,EACjC;AAAA,EAEA,MAAgB,QAAQ,OAA4C;AAC7D,UAAA,UAAU,MAAM,YAAY,SAAS;AAC3C,UAAM,mBAAmB,MAAM,KAAK,yBAAyB,QAAQ;AAErE,UAAM,iBAAiB,iBAAiB;AAAA,MACvC,qBAAqB;AAAA,MACrB,gCAAgC;AAAA,MAChC,kBAAkB;AAAA,IAAA,CAClB;AAED,YAAQ,IAAI,yBAAyB;AAC/B,UAAA,cAAc,CAAC,iBAAwC;AAC5D,iBAAW,aAAa,uBAAuB;AAC9C,YAAI,aAAa,WAAW,GAAG,SAAS,GAAG,GAAG;AAC7C,iBAAO,GAAG,UAAU,QAAQ,QAAQ,EAAE,CAAC,IAAI,OAAO;AAAA,QACnD;AAAA,MACD;AACO,aAAA;AAAA,IAAA;AAEF,UAAA,KAAK,qBAAqB,8BAA8B,CAAS,UAAA;AAAA,MACtE,GAAG;AAAA,MACH,UAAU,OAAO,YAAY,OAAO,QAAQ,MAAM,YAAY,CAAA,CAAE,EAAE,IAAI,CAAC,CAAC,MAAM,OAAO,MAAqB;AACnG,cAAA,WAAW,YAAY,QAAQ,KAAK;AAC1C,YAAI,UAAU;AACL,kBAAA,IAAI,0BAA0B,IAAI,UAAU;AAC7C,iBAAA;AAAA,YACN;AAAA,YACA;AAAA,cACC,GAAG;AAAA,cACH,OAAO;AAAA,YACR;AAAA,UAAA;AAAA,QAEF;AACO,eAAA,CAAC,MAAM,OAAO;AAAA,MAAA,CACrB,CAAC;AAAA,IACD,EAAA;AACF,YAAQ,IAAI,sBAAsB;AAClC,YAAQ,IAAI,iCAAiC;AAAA,EAC9C;AACD;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const node_path = require("node:path");
|
|
4
|
+
const node_url = require("node:url");
|
|
5
|
+
var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
|
|
6
|
+
const packageRoot = process.env.CONTEMBER_CLI_PACKAGE_ROOT || node_path.join(node_path.dirname(node_url.fileURLToPath(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.src || new URL("cli/src/consts.cjs", document.baseURI).href)), "../");
|
|
7
|
+
const contemberDockerImages = ["contember/engine", "contember/engine-ee", "contember/cli"];
|
|
8
|
+
exports.contemberDockerImages = contemberDockerImages;
|
|
9
|
+
exports.packageRoot = packageRoot;
|
|
10
|
+
//# sourceMappingURL=consts.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.cjs","sources":["../../../../packages/cli/src/consts.ts"],"sourcesContent":["import { join } from 'node:path'\nimport { dirname } from 'node:path'\nimport { fileURLToPath } from 'node:url'\nexport const packageRoot = process.env.CONTEMBER_CLI_PACKAGE_ROOT || join(dirname(fileURLToPath(import.meta.url)), '../')\nexport const contemberDockerImages = ['contember/engine', 'contember/engine-ee', 'contember/cli']\n"],"names":["join","dirname","fileURLToPath"],"mappings":";;;;;AAGa,MAAA,cAAc,QAAQ,IAAI,8BAA8BA,UAAAA,KAAKC,UAAQ,QAAAC,uBAAc,OAAA,aAAA,cAAA,QAAA,KAAA,EAAA,cAAA,UAAA,EAAA,OAAA,0BAAA,uBAAA,OAAA,IAAA,IAAA,sBAAA,SAAA,OAAA,EAAA,IAAe,CAAC,GAAG,KAAK;AACjH,MAAM,wBAAwB,CAAC,oBAAoB,uBAAuB,eAAe;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { join, dirname } from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
const packageRoot = process.env.CONTEMBER_CLI_PACKAGE_ROOT || join(dirname(fileURLToPath(import.meta.url)), "../");
|
|
4
|
+
const contemberDockerImages = ["contember/engine", "contember/engine-ee", "contember/cli"];
|
|
5
|
+
export {
|
|
6
|
+
contemberDockerImages,
|
|
7
|
+
packageRoot
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=consts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.js","sources":["../../../../packages/cli/src/consts.ts"],"sourcesContent":["import { join } from 'node:path'\nimport { dirname } from 'node:path'\nimport { fileURLToPath } from 'node:url'\nexport const packageRoot = process.env.CONTEMBER_CLI_PACKAGE_ROOT || join(dirname(fileURLToPath(import.meta.url)), '../')\nexport const contemberDockerImages = ['contember/engine', 'contember/engine-ee', 'contember/cli']\n"],"names":[],"mappings":";;AAGa,MAAA,cAAc,QAAQ,IAAI,8BAA8B,KAAK,QAAQ,cAAc,YAAY,GAAG,CAAC,GAAG,KAAK;AACjH,MAAM,wBAAwB,CAAC,oBAAoB,uBAAuB,eAAe;"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const dic = require("@contember/dic");
|
|
4
|
+
const migrationsClient = require("@contember/migrations-client");
|
|
5
|
+
const JsCodeRunner = require("./lib/js/JsCodeRunner.cjs");
|
|
6
|
+
const EsBuildBuilder = require("./lib/js/EsBuildBuilder.cjs");
|
|
7
|
+
const EvalExecutor = require("./lib/js/EvalExecutor.cjs");
|
|
8
|
+
const AdminDeployer = require("./lib/admin/AdminDeployer.cjs");
|
|
9
|
+
const RemoteProjectResolver = require("./lib/project/RemoteProjectResolver.cjs");
|
|
10
|
+
const AdminClient = require("./lib/admin/AdminClient.cjs");
|
|
11
|
+
const FileSystem = require("./lib/fs/FileSystem.cjs");
|
|
12
|
+
const WorkspaceResolver = require("./lib/workspace/WorkspaceResolver.cjs");
|
|
13
|
+
const YamlHandler = require("./lib/fs/YamlHandler.cjs");
|
|
14
|
+
const DeployCommand = require("./commands/deploy/DeployCommand.cjs");
|
|
15
|
+
const MigrationAmendCommand = require("./commands/migrations/MigrationAmendCommand.cjs");
|
|
16
|
+
const MigrationBlankCommand = require("./commands/migrations/MigrationBlankCommand.cjs");
|
|
17
|
+
const MigrationDescribeCommand = require("./commands/migrations/MigrationDescribeCommand.cjs");
|
|
18
|
+
const MigrationDiffCommand = require("./commands/migrations/MigrationDiffCommand.cjs");
|
|
19
|
+
const MigrationExecuteCommand = require("./commands/migrations/MigrationExecuteCommand.cjs");
|
|
20
|
+
const MigrationStatusCommand = require("./commands/migrations/MigrationStatusCommand.cjs");
|
|
21
|
+
const MigrationRebaseCommand = require("./commands/migrations/MigrationRebaseCommand.cjs");
|
|
22
|
+
const VersionCommand = require("./commands/misc/VersionCommand.cjs");
|
|
23
|
+
const ProjectGenerateDocumentationCommand = require("./commands/project/ProjectGenerateDocumentationCommand.cjs");
|
|
24
|
+
const ProjectPrintSchemaCommand = require("./commands/project/ProjectPrintSchemaCommand.cjs");
|
|
25
|
+
const ProjectValidateCommand = require("./commands/project/ProjectValidateCommand.cjs");
|
|
26
|
+
const WorkspaceUpdateApiCommand = require("./commands/workspace/WorkspaceUpdateApiCommand.cjs");
|
|
27
|
+
const MigrationExecutionFacade = require("./lib/migrations/MigrationExecutionFacade.cjs");
|
|
28
|
+
const MigrationPrinter = require("./lib/migrations/MigrationPrinter.cjs");
|
|
29
|
+
const MigrationsStatusFacade = require("./lib/migrations/MigrationsStatusFacade.cjs");
|
|
30
|
+
const SchemaLoader = require("./lib/schema/SchemaLoader.cjs");
|
|
31
|
+
const MigrationsValidator = require("./lib/migrations/MigrationsValidator.cjs");
|
|
32
|
+
const MigrationRebaseFacade = require("./lib/migrations/MigrationRebaseFacade.cjs");
|
|
33
|
+
const DataTransferClient = require("./lib/transfer/DataTransferClient.cjs");
|
|
34
|
+
const ExportCommand = require("./commands/transfer/ExportCommand.cjs");
|
|
35
|
+
const ImportCommand = require("./commands/transfer/ImportCommand.cjs");
|
|
36
|
+
const TransferCommand = require("./commands/transfer/TransferCommand.cjs");
|
|
37
|
+
const cliCommon = require("@contember/cli-common");
|
|
38
|
+
const VersionChecker = require("./lib/VersionChecker.cjs");
|
|
39
|
+
const DockerComposeManager = require("./lib/fs/DockerComposeManager.cjs");
|
|
40
|
+
const RemoteProjectProvider = require("./lib/project/RemoteProjectProvider.cjs");
|
|
41
|
+
const SystemClientProvider = require("./lib/SystemClientProvider.cjs");
|
|
42
|
+
const TenantClientProvider = require("./lib/TenantClientProvider.cjs");
|
|
43
|
+
const jsSample = `
|
|
44
|
+
export const query = \`\`
|
|
45
|
+
export const variables = {}
|
|
46
|
+
|
|
47
|
+
// or multiple queries
|
|
48
|
+
// export const queries = []
|
|
49
|
+
|
|
50
|
+
// or a factory
|
|
51
|
+
// export default async () => ({ queries: [] })
|
|
52
|
+
`;
|
|
53
|
+
const createContainer = ({ env, version, runtime, workspace }) => {
|
|
54
|
+
return new dic.Builder({}).addService("env", () => env).addService("version", () => version).addService("runtime", () => runtime).addService("workspace", () => workspace).addService("fs", () => new FileSystem.FileSystem()).addService("yamlHandler", ({ fs }) => new YamlHandler.YamlHandler(fs)).addService("jsExecutor", () => new EvalExecutor.EvalExecutor()).addService("jsBuilder", () => new EsBuildBuilder.EsBuildBuilder()).addService("jsCodeRunner", ({ jsExecutor, jsBuilder }) => new JsCodeRunner.JsCodeRunner(jsBuilder, jsExecutor)).addService("workspaceResolver", ({ yamlHandler }) => new WorkspaceResolver.WorkspaceResolver(yamlHandler)).addService("remoteProjectResolver", ({ env: env2 }) => new RemoteProjectResolver.RemoteProjectResolver(env2)).addService("remoteProjectProvider", ({ remoteProjectResolver }) => {
|
|
55
|
+
const provider = new RemoteProjectProvider.RemoteProjectProvider();
|
|
56
|
+
const remoteProject = remoteProjectResolver.resolve();
|
|
57
|
+
if (remoteProject) {
|
|
58
|
+
provider.setRemoteProject(remoteProject);
|
|
59
|
+
}
|
|
60
|
+
return provider;
|
|
61
|
+
}).addService("systemClientProvider", ({ remoteProjectProvider }) => new SystemClientProvider.SystemClientProvider(remoteProjectProvider)).addService("tenantClientProvider", ({ remoteProjectProvider }) => new TenantClientProvider.TenantClientProvider(remoteProjectProvider)).addService("adminClient", ({ remoteProjectProvider }) => new AdminClient.AdminClient(remoteProjectProvider)).addService("migrationFilesManager", ({ jsCodeRunner, workspace: workspace2 }) => {
|
|
62
|
+
const runJs = runtime === "bun" ? (file) => import(file) : jsCodeRunner.run;
|
|
63
|
+
return new migrationsClient.MigrationFilesManager(workspace2.migrationsDir, {
|
|
64
|
+
json: new migrationsClient.JsonLoader(new migrationsClient.MigrationParser()),
|
|
65
|
+
ts: new migrationsClient.JsLoader(new migrationsClient.MigrationParser(), runJs),
|
|
66
|
+
js: new migrationsClient.JsLoader(new migrationsClient.MigrationParser(), runJs)
|
|
67
|
+
});
|
|
68
|
+
}).addService("packageWorkspaceResolver", ({ workspace: workspace2, fs }) => {
|
|
69
|
+
const commandRunner = new cliCommon.CommandRunner();
|
|
70
|
+
return new cliCommon.PackageWorkspaceResolver(workspace2.baseDir, fs, [
|
|
71
|
+
new cliCommon.Yarn(fs, commandRunner),
|
|
72
|
+
new cliCommon.YarnClassic(fs, commandRunner),
|
|
73
|
+
new cliCommon.Pnpm(fs, commandRunner),
|
|
74
|
+
new cliCommon.Npm(fs, commandRunner)
|
|
75
|
+
]);
|
|
76
|
+
}).addService("dockerComposeManager", ({ workspace: workspace2, env: env2, fs, yamlHandler }) => new DockerComposeManager.DockerComposeManager(workspace2.baseDir, env2.dockerComposeFile, fs, yamlHandler)).addService("modificationHandlerFactory", () => new migrationsClient.ModificationHandlerFactory(migrationsClient.ModificationHandlerFactory.defaultFactoryMap)).addService("schemaMigrator", ({ modificationHandlerFactory }) => new migrationsClient.SchemaMigrator(modificationHandlerFactory)).addService("migrationsResolver", ({ migrationFilesManager }) => new migrationsClient.MigrationsResolver(migrationFilesManager)).addService("schemaVersionBuilder", ({ migrationsResolver, schemaMigrator }) => new migrationsClient.SchemaVersionBuilder(migrationsResolver, schemaMigrator)).addService("schemaDiffer", ({ schemaMigrator }) => new migrationsClient.SchemaDiffer(schemaMigrator)).addService("migrationCreator", ({ migrationFilesManager, schemaDiffer }) => new migrationsClient.MigrationCreator(migrationFilesManager, schemaDiffer, {
|
|
77
|
+
json: JSON.stringify({ formatVersion: migrationsClient.VERSION_LATEST, modifications: [] }, void 0, " ") + "\n",
|
|
78
|
+
ts: jsSample,
|
|
79
|
+
js: jsSample
|
|
80
|
+
})).addService("migrationDescriber", ({ modificationHandlerFactory }) => new migrationsClient.MigrationDescriber(modificationHandlerFactory)).addService("migrationPrinter", ({ migrationDescriber }) => new MigrationPrinter.MigrationPrinter(migrationDescriber)).addService("migrationsExecutor", () => new migrationsClient.MigrationExecutor()).addService("migrationsStatusResolver", () => new migrationsClient.MigrationsStatusResolver()).addService("migrationsStatusFacade", ({ systemClientProvider, migrationsResolver, migrationsStatusResolver }) => new MigrationsStatusFacade.MigrationsStatusFacade(systemClientProvider, migrationsResolver, migrationsStatusResolver)).addService("migrationExecutionFacade", ({ systemClientProvider, tenantClientProvider, remoteProjectProvider, schemaVersionBuilder, migrationPrinter, migrationsExecutor, migrationsStatusFacade }) => new MigrationExecutionFacade.MigrationExecutionFacade(systemClientProvider, tenantClientProvider, remoteProjectProvider, schemaVersionBuilder, migrationPrinter, migrationsExecutor, migrationsStatusFacade)).addService("migrationsValidator", ({ migrationDescriber, schemaMigrator }) => new MigrationsValidator.MigrationsValidator(migrationDescriber, schemaMigrator)).addService("migrationRebaseFacade", ({ schemaVersionBuilder, migrationsValidator, systemClientProvider, migrationFilesManager }) => new MigrationRebaseFacade.MigrationRebaseFacade(schemaVersionBuilder, migrationsValidator, systemClientProvider, migrationFilesManager)).addService("schemaLoader", ({ workspace: workspace2, jsCodeRunner, runtime: runtime2 }) => runtime2 === "bun" ? new SchemaLoader.ImportSchemaLoader(workspace2) : new SchemaLoader.TranspilingSchemaLoader(workspace2, jsCodeRunner)).addService("adminDeployer", ({ remoteProjectProvider, adminClient, fs }) => new AdminDeployer.AdminDeployer(remoteProjectProvider, adminClient, fs)).addService("dataTransferClient", () => new DataTransferClient.DataTransferClient()).addService("deployCommand", ({ adminDeployer, migrationExecutionFacade, fs, remoteProjectProvider, remoteProjectResolver, workspace: workspace2 }) => new DeployCommand.DeployCommand(adminDeployer, migrationExecutionFacade, fs, remoteProjectProvider, remoteProjectResolver, workspace2)).addService("migrationAmendCommand", ({ migrationsResolver, systemClientProvider, migrationsStatusFacade, schemaLoader, schemaVersionBuilder, migrationCreator, migrationsValidator, migrationPrinter, schemaMigrator }) => new MigrationAmendCommand.MigrationAmendCommand(migrationsResolver, systemClientProvider, migrationsStatusFacade, schemaLoader, schemaVersionBuilder, migrationCreator, migrationsValidator, migrationPrinter, schemaMigrator)).addService("migrationBlankCommand", ({ migrationCreator }) => new MigrationBlankCommand.MigrationBlankCommand(migrationCreator)).addService("migrationDescribeCommand", ({ migrationPrinter, schemaVersionBuilder, migrationsResolver }) => new MigrationDescribeCommand.MigrationDescribeCommand(migrationPrinter, schemaVersionBuilder, migrationsResolver)).addService("migrationDiffCommand", ({ schemaLoader, schemaVersionBuilder, migrationCreator, migrationPrinter, migrationExecutionFacade }) => new MigrationDiffCommand.MigrationDiffCommand(schemaLoader, schemaVersionBuilder, migrationCreator, migrationPrinter, migrationExecutionFacade)).addService("migrationExecuteCommand", ({ migrationExecutionFacade }) => new MigrationExecuteCommand.MigrationExecuteCommand(migrationExecutionFacade)).addService("migrationRebaseCommand", ({ migrationsResolver, migrationRebaseFacade }) => new MigrationRebaseCommand.MigrationRebaseCommand(migrationsResolver, migrationRebaseFacade)).addService("migrationStatusCommand", ({ migrationsStatusFacade, migrationFilesManager, systemClientProvider, migrationPrinter }) => new MigrationStatusCommand.MigrationStatusCommand(migrationsStatusFacade, migrationFilesManager, systemClientProvider, migrationPrinter)).addService("versionCommand", ({ version: version2 }) => new VersionCommand.VersionCommand(version2)).addService("projectGenerateDocumentationCommand", ({ schemaLoader }) => new ProjectGenerateDocumentationCommand.ProjectGenerateDocumentationCommand(schemaLoader)).addService("projectPrintSchemaCommand", ({ schemaLoader, schemaVersionBuilder }) => new ProjectPrintSchemaCommand.ProjectPrintSchemaCommand(schemaLoader, schemaVersionBuilder)).addService("projectValidateCommand", ({ schemaLoader, migrationsValidator, migrationsResolver, schemaDiffer, schemaVersionBuilder }) => new ProjectValidateCommand.ProjectValidateCommand(schemaLoader, migrationsValidator, migrationsResolver, schemaDiffer, schemaVersionBuilder)).addService("exportCommand", ({ dataTransferClient, remoteProjectResolver }) => new ExportCommand.ExportCommand(remoteProjectResolver, dataTransferClient)).addService("importCommand", ({ dataTransferClient, remoteProjectResolver }) => new ImportCommand.ImportCommand(remoteProjectResolver, dataTransferClient)).addService("transferCommand", ({ dataTransferClient, remoteProjectResolver }) => new TransferCommand.TransferCommand(remoteProjectResolver, dataTransferClient)).addService("workspaceUpdateCommand", ({ packageWorkspaceResolver, dockerComposeManager }) => new WorkspaceUpdateApiCommand.WorkspaceUpdateApiCommand(packageWorkspaceResolver, dockerComposeManager)).addService("commandList", (dic2) => {
|
|
81
|
+
const commands = {
|
|
82
|
+
["deploy"]: () => dic2.deployCommand,
|
|
83
|
+
["version"]: () => dic2.versionCommand,
|
|
84
|
+
["data:export"]: () => dic2.exportCommand,
|
|
85
|
+
["data:import"]: () => dic2.importCommand,
|
|
86
|
+
["data:transfer"]: () => dic2.transferCommand,
|
|
87
|
+
["migrations:diff"]: () => dic2.migrationDiffCommand,
|
|
88
|
+
["migrations:amend"]: () => dic2.migrationAmendCommand,
|
|
89
|
+
["migrations:blank"]: () => dic2.migrationBlankCommand,
|
|
90
|
+
["migrations:describe"]: () => dic2.migrationDescribeCommand,
|
|
91
|
+
["migrations:execute"]: () => dic2.migrationExecuteCommand,
|
|
92
|
+
["migrations:rebase"]: () => dic2.migrationRebaseCommand,
|
|
93
|
+
["migrations:status"]: () => dic2.migrationStatusCommand,
|
|
94
|
+
["workspace:update:api"]: () => dic2.workspaceUpdateCommand,
|
|
95
|
+
["project:validate"]: () => dic2.projectValidateCommand,
|
|
96
|
+
["project:print-schema"]: () => dic2.projectPrintSchemaCommand,
|
|
97
|
+
["project:generate-doc"]: () => dic2.projectGenerateDocumentationCommand
|
|
98
|
+
};
|
|
99
|
+
return commands;
|
|
100
|
+
}).addService("commandManager", ({ commandList }) => new cliCommon.CommandManager(commandList)).addService("versionChecker", ({ version: version2, workspace: workspace2, packageWorkspaceResolver, dockerComposeManager }) => new VersionChecker.VersionChecker(version2, workspace2.baseDir, packageWorkspaceResolver, dockerComposeManager)).addService("application", ({ commandManager, versionChecker }) => {
|
|
101
|
+
const app = new cliCommon.Application(
|
|
102
|
+
commandManager,
|
|
103
|
+
`Contember CLI version ${version}`,
|
|
104
|
+
{
|
|
105
|
+
beforeRun: async ({ name }) => {
|
|
106
|
+
if (!process.env.CONTEMBER_SKIP_VERSION_CHECK && !["deploy", "version", "data:export", "data:import", "data:transfer"].includes(name)) {
|
|
107
|
+
await versionChecker.checkVersions();
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
return app;
|
|
113
|
+
}).build();
|
|
114
|
+
};
|
|
115
|
+
exports.createContainer = createContainer;
|
|
116
|
+
//# sourceMappingURL=dic.cjs.map
|