@contember/cli 1.4.0-rc.8 → 2.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dockerfile +0 -1
- package/build.sh +1 -1
- package/dist/development/run.cjs +31 -0
- package/dist/development/run.cjs.map +1 -0
- package/dist/development/run.js +30 -0
- package/dist/development/run.js.map +1 -0
- package/dist/development/src/commands/deploy/DeployCommand.cjs +87 -0
- package/dist/development/src/commands/deploy/DeployCommand.cjs.map +1 -0
- package/dist/development/src/commands/deploy/DeployCommand.js +87 -0
- package/dist/development/src/commands/deploy/DeployCommand.js.map +1 -0
- package/dist/development/src/commands/migrations/MigrationAmendCommand.cjs +123 -0
- package/dist/development/src/commands/migrations/MigrationAmendCommand.cjs.map +1 -0
- package/dist/development/src/commands/migrations/MigrationAmendCommand.js +123 -0
- package/dist/development/src/commands/migrations/MigrationAmendCommand.js.map +1 -0
- package/dist/development/src/commands/migrations/MigrationBlankCommand.cjs +23 -0
- package/dist/development/src/commands/migrations/MigrationBlankCommand.cjs.map +1 -0
- package/dist/development/src/commands/migrations/MigrationBlankCommand.js +23 -0
- package/dist/development/src/commands/migrations/MigrationBlankCommand.js.map +1 -0
- package/dist/development/src/commands/migrations/MigrationDescribeCommand.cjs +30 -0
- package/dist/development/src/commands/migrations/MigrationDescribeCommand.cjs.map +1 -0
- package/dist/development/src/commands/migrations/MigrationDescribeCommand.js +30 -0
- package/dist/development/src/commands/migrations/MigrationDescribeCommand.js.map +1 -0
- package/dist/development/src/commands/migrations/MigrationDiffCommand.cjs +76 -0
- package/dist/development/src/commands/migrations/MigrationDiffCommand.cjs.map +1 -0
- package/dist/development/src/commands/migrations/MigrationDiffCommand.js +76 -0
- package/dist/development/src/commands/migrations/MigrationDiffCommand.js.map +1 -0
- package/dist/development/src/commands/migrations/MigrationExecuteCommand.cjs +26 -0
- package/dist/development/src/commands/migrations/MigrationExecuteCommand.cjs.map +1 -0
- package/dist/development/src/commands/migrations/MigrationExecuteCommand.js +26 -0
- package/dist/development/src/commands/migrations/MigrationExecuteCommand.js.map +1 -0
- package/dist/development/src/commands/migrations/MigrationRebaseCommand.cjs +31 -0
- package/dist/development/src/commands/migrations/MigrationRebaseCommand.cjs.map +1 -0
- package/dist/development/src/commands/migrations/MigrationRebaseCommand.js +31 -0
- package/dist/development/src/commands/migrations/MigrationRebaseCommand.js.map +1 -0
- package/dist/development/src/commands/migrations/MigrationStatusCommand.cjs +57 -0
- package/dist/development/src/commands/migrations/MigrationStatusCommand.cjs.map +1 -0
- package/dist/development/src/commands/migrations/MigrationStatusCommand.js +57 -0
- package/dist/development/src/commands/migrations/MigrationStatusCommand.js.map +1 -0
- package/dist/development/src/commands/misc/VersionCommand.cjs +18 -0
- package/dist/development/src/commands/misc/VersionCommand.cjs.map +1 -0
- package/dist/development/src/commands/misc/VersionCommand.js +18 -0
- package/dist/development/src/commands/misc/VersionCommand.js.map +1 -0
- package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.cjs +36 -0
- package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.cjs.map +1 -0
- package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.js +36 -0
- package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.js.map +1 -0
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.cjs +69 -0
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -0
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.js +69 -0
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -0
- package/dist/development/src/commands/project/ProjectValidateCommand.cjs +40 -0
- package/dist/development/src/commands/project/ProjectValidateCommand.cjs.map +1 -0
- package/dist/development/src/commands/project/ProjectValidateCommand.js +40 -0
- package/dist/development/src/commands/project/ProjectValidateCommand.js.map +1 -0
- package/dist/development/src/commands/transfer/ExportCommand.cjs +66 -0
- package/dist/development/src/commands/transfer/ExportCommand.cjs.map +1 -0
- package/dist/development/src/commands/transfer/ExportCommand.js +66 -0
- package/dist/development/src/commands/transfer/ExportCommand.js.map +1 -0
- package/dist/development/src/commands/transfer/ImportCommand.cjs +60 -0
- package/dist/development/src/commands/transfer/ImportCommand.cjs.map +1 -0
- package/dist/development/src/commands/transfer/ImportCommand.js +60 -0
- package/dist/development/src/commands/transfer/ImportCommand.js.map +1 -0
- package/dist/development/src/commands/transfer/TransferCommand.cjs +73 -0
- package/dist/development/src/commands/transfer/TransferCommand.cjs.map +1 -0
- package/dist/development/src/commands/transfer/TransferCommand.js +73 -0
- package/dist/development/src/commands/transfer/TransferCommand.js.map +1 -0
- package/dist/development/src/commands/transfer/utils.cjs +22 -0
- package/dist/development/src/commands/transfer/utils.cjs.map +1 -0
- package/dist/development/src/commands/transfer/utils.js +22 -0
- package/dist/development/src/commands/transfer/utils.js.map +1 -0
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.cjs +54 -0
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.cjs.map +1 -0
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.js +54 -0
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +1 -0
- package/dist/development/src/consts.cjs +10 -0
- package/dist/development/src/consts.cjs.map +1 -0
- package/dist/development/src/consts.js +9 -0
- package/dist/development/src/consts.js.map +1 -0
- package/dist/development/src/dic.cjs +116 -0
- package/dist/development/src/dic.cjs.map +1 -0
- package/dist/development/src/dic.js +116 -0
- package/dist/development/src/dic.js.map +1 -0
- package/dist/development/src/lib/SystemClientProvider.cjs +14 -0
- package/dist/development/src/lib/SystemClientProvider.cjs.map +1 -0
- package/dist/development/src/lib/SystemClientProvider.js +14 -0
- package/dist/development/src/lib/SystemClientProvider.js.map +1 -0
- package/dist/development/src/lib/TenantClientProvider.cjs +14 -0
- package/dist/development/src/lib/TenantClientProvider.cjs.map +1 -0
- package/dist/development/src/lib/TenantClientProvider.js +14 -0
- package/dist/development/src/lib/TenantClientProvider.js.map +1 -0
- package/dist/development/src/lib/VersionChecker.cjs +85 -0
- package/dist/development/src/lib/VersionChecker.cjs.map +1 -0
- package/dist/development/src/lib/VersionChecker.js +68 -0
- package/dist/development/src/lib/VersionChecker.js.map +1 -0
- package/dist/development/src/lib/admin/AdminClient.cjs +30 -0
- package/dist/development/src/lib/admin/AdminClient.cjs.map +1 -0
- package/dist/development/src/lib/admin/AdminClient.js +30 -0
- package/dist/development/src/lib/admin/AdminClient.js.map +1 -0
- package/dist/development/src/lib/admin/AdminDeployer.cjs +36 -0
- package/dist/development/src/lib/admin/AdminDeployer.cjs.map +1 -0
- package/dist/development/src/lib/admin/AdminDeployer.js +36 -0
- package/dist/development/src/lib/admin/AdminDeployer.js.map +1 -0
- package/dist/development/src/lib/assertNever.cjs +7 -0
- package/dist/development/src/lib/assertNever.cjs.map +1 -0
- package/dist/development/src/lib/assertNever.js +7 -0
- package/dist/development/src/lib/assertNever.js.map +1 -0
- package/dist/development/src/lib/dsn.cjs +16 -0
- package/dist/development/src/lib/dsn.cjs.map +1 -0
- package/dist/development/src/lib/dsn.js +16 -0
- package/dist/development/src/lib/dsn.js.map +1 -0
- package/dist/development/src/lib/env.cjs +15 -0
- package/dist/development/src/lib/env.cjs.map +1 -0
- package/dist/development/src/lib/env.js +15 -0
- package/dist/development/src/lib/env.js.map +1 -0
- package/dist/development/src/lib/fs/DockerComposeManager.cjs +41 -0
- package/dist/development/src/lib/fs/DockerComposeManager.cjs.map +1 -0
- package/dist/development/src/lib/fs/DockerComposeManager.js +41 -0
- package/dist/development/src/lib/fs/DockerComposeManager.js.map +1 -0
- package/dist/development/src/lib/fs/FileSystem.cjs +43 -0
- package/dist/development/src/lib/fs/FileSystem.cjs.map +1 -0
- package/dist/development/src/lib/fs/FileSystem.js +27 -0
- package/dist/development/src/lib/fs/FileSystem.js.map +1 -0
- package/dist/development/src/lib/fs/YamlHandler.cjs +48 -0
- package/dist/development/src/lib/fs/YamlHandler.cjs.map +1 -0
- package/dist/development/src/lib/fs/YamlHandler.js +48 -0
- package/dist/development/src/lib/fs/YamlHandler.js.map +1 -0
- package/dist/development/src/lib/js/EsBuildBuilder.cjs +36 -0
- package/dist/development/src/lib/js/EsBuildBuilder.cjs.map +1 -0
- package/dist/development/src/lib/js/EsBuildBuilder.js +19 -0
- package/dist/development/src/lib/js/EsBuildBuilder.js.map +1 -0
- package/dist/development/src/lib/js/EvalExecutor.cjs +10 -0
- package/dist/development/src/lib/js/EvalExecutor.cjs.map +1 -0
- package/dist/development/src/lib/js/EvalExecutor.js +10 -0
- package/dist/development/src/lib/js/EvalExecutor.js.map +1 -0
- package/dist/development/src/lib/js/JsCodeRunner.cjs +17 -0
- package/dist/development/src/lib/js/JsCodeRunner.cjs.map +1 -0
- package/dist/development/src/lib/js/JsCodeRunner.js +17 -0
- package/dist/development/src/lib/js/JsCodeRunner.js.map +1 -0
- package/dist/development/src/lib/maskToken.cjs +5 -0
- package/dist/development/src/lib/maskToken.cjs.map +1 -0
- package/dist/development/src/lib/maskToken.js +5 -0
- package/dist/development/src/lib/maskToken.js.map +1 -0
- package/dist/development/src/lib/migrations/MigrationExecutionFacade.cjs +84 -0
- package/dist/development/src/lib/migrations/MigrationExecutionFacade.cjs.map +1 -0
- package/dist/development/src/lib/migrations/MigrationExecutionFacade.js +84 -0
- package/dist/development/src/lib/migrations/MigrationExecutionFacade.js.map +1 -0
- package/dist/development/src/lib/migrations/MigrationPrinter.cjs +82 -0
- package/dist/development/src/lib/migrations/MigrationPrinter.cjs.map +1 -0
- package/dist/development/src/lib/migrations/MigrationPrinter.js +82 -0
- package/dist/development/src/lib/migrations/MigrationPrinter.js.map +1 -0
- package/dist/development/src/lib/migrations/MigrationRebaseFacade.cjs +41 -0
- package/dist/development/src/lib/migrations/MigrationRebaseFacade.cjs.map +1 -0
- package/dist/development/src/lib/migrations/MigrationRebaseFacade.js +41 -0
- package/dist/development/src/lib/migrations/MigrationRebaseFacade.js.map +1 -0
- package/dist/development/src/lib/migrations/MigrationsStatusFacade.cjs +27 -0
- package/dist/development/src/lib/migrations/MigrationsStatusFacade.cjs.map +1 -0
- package/dist/development/src/lib/migrations/MigrationsStatusFacade.js +27 -0
- package/dist/development/src/lib/migrations/MigrationsStatusFacade.js.map +1 -0
- package/dist/development/src/lib/migrations/MigrationsValidator.cjs +38 -0
- package/dist/development/src/lib/migrations/MigrationsValidator.cjs.map +1 -0
- package/dist/development/src/lib/migrations/MigrationsValidator.js +38 -0
- package/dist/development/src/lib/migrations/MigrationsValidator.js.map +1 -0
- package/dist/development/src/lib/migrations/migrations.cjs +43 -0
- package/dist/development/src/lib/migrations/migrations.cjs.map +1 -0
- package/dist/development/src/lib/migrations/migrations.js +43 -0
- package/dist/development/src/lib/migrations/migrations.js.map +1 -0
- package/dist/development/src/lib/project/RemoteProject.cjs +12 -0
- package/dist/development/src/lib/project/RemoteProject.cjs.map +1 -0
- package/dist/development/src/lib/project/RemoteProject.js +12 -0
- package/dist/development/src/lib/project/RemoteProject.js.map +1 -0
- package/dist/development/src/lib/project/RemoteProjectProvider.cjs +21 -0
- package/dist/development/src/lib/project/RemoteProjectProvider.cjs.map +1 -0
- package/dist/development/src/lib/project/RemoteProjectProvider.js +21 -0
- package/dist/development/src/lib/project/RemoteProjectProvider.js.map +1 -0
- package/dist/development/src/lib/project/RemoteProjectResolver.cjs +29 -0
- package/dist/development/src/lib/project/RemoteProjectResolver.cjs.map +1 -0
- package/dist/development/src/lib/project/RemoteProjectResolver.js +29 -0
- package/dist/development/src/lib/project/RemoteProjectResolver.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/EntityInfo.cjs +199 -0
- package/dist/development/src/lib/project/docs/components/EntityInfo.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/EntityInfo.js +199 -0
- package/dist/development/src/lib/project/docs/components/EntityInfo.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/EntityLink.cjs +11 -0
- package/dist/development/src/lib/project/docs/components/EntityLink.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/EntityLink.js +11 -0
- package/dist/development/src/lib/project/docs/components/EntityLink.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/FieldLink.cjs +31 -0
- package/dist/development/src/lib/project/docs/components/FieldLink.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/FieldLink.js +31 -0
- package/dist/development/src/lib/project/docs/components/FieldLink.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/FieldPermissions.cjs +33 -0
- package/dist/development/src/lib/project/docs/components/FieldPermissions.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/FieldPermissions.js +33 -0
- package/dist/development/src/lib/project/docs/components/FieldPermissions.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/FieldType.cjs +135 -0
- package/dist/development/src/lib/project/docs/components/FieldType.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/FieldType.js +135 -0
- package/dist/development/src/lib/project/docs/components/FieldType.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/OnDelete.cjs +134 -0
- package/dist/development/src/lib/project/docs/components/OnDelete.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/OnDelete.js +134 -0
- package/dist/development/src/lib/project/docs/components/OnDelete.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/ProjectInfo.cjs +96 -0
- package/dist/development/src/lib/project/docs/components/ProjectInfo.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/ProjectInfo.js +96 -0
- package/dist/development/src/lib/project/docs/components/ProjectInfo.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/SinglePermission.cjs +26 -0
- package/dist/development/src/lib/project/docs/components/SinglePermission.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/SinglePermission.js +26 -0
- package/dist/development/src/lib/project/docs/components/SinglePermission.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/utils.cjs +7 -0
- package/dist/development/src/lib/project/docs/components/utils.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/utils.js +7 -0
- package/dist/development/src/lib/project/docs/components/utils.js.map +1 -0
- package/dist/development/src/lib/project/docs/projectDescribe.cjs +32 -0
- package/dist/development/src/lib/project/docs/projectDescribe.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/projectDescribe.js +31 -0
- package/dist/development/src/lib/project/docs/projectDescribe.js.map +1 -0
- package/dist/development/src/lib/schema/SchemaLoader.cjs +49 -0
- package/dist/development/src/lib/schema/SchemaLoader.cjs.map +1 -0
- package/dist/development/src/lib/schema/SchemaLoader.js +32 -0
- package/dist/development/src/lib/schema/SchemaLoader.js.map +1 -0
- package/dist/development/src/lib/schema/SchemaValidationHelper.cjs +11 -0
- package/dist/development/src/lib/schema/SchemaValidationHelper.cjs.map +1 -0
- package/dist/development/src/lib/schema/SchemaValidationHelper.js +11 -0
- package/dist/development/src/lib/schema/SchemaValidationHelper.js.map +1 -0
- package/dist/development/src/lib/schema/SchemaValidationPrinter.cjs +14 -0
- package/dist/development/src/lib/schema/SchemaValidationPrinter.cjs.map +1 -0
- package/dist/development/src/lib/schema/SchemaValidationPrinter.js +14 -0
- package/dist/development/src/lib/schema/SchemaValidationPrinter.js.map +1 -0
- package/dist/development/src/lib/schema/collectReferences.cjs +34 -0
- package/dist/development/src/lib/schema/collectReferences.cjs.map +1 -0
- package/dist/development/src/lib/schema/collectReferences.js +34 -0
- package/dist/development/src/lib/schema/collectReferences.js.map +1 -0
- package/dist/development/src/lib/stream.cjs +43 -0
- package/dist/development/src/lib/stream.cjs.map +1 -0
- package/dist/development/src/lib/stream.js +43 -0
- package/dist/development/src/lib/stream.js.map +1 -0
- package/dist/development/src/lib/tenant/TenantClient.cjs +45 -0
- package/dist/development/src/lib/tenant/TenantClient.cjs.map +1 -0
- package/dist/development/src/lib/tenant/TenantClient.js +45 -0
- package/dist/development/src/lib/tenant/TenantClient.js.map +1 -0
- package/dist/development/src/lib/transfer/DataTransferClient.cjs +97 -0
- package/dist/development/src/lib/transfer/DataTransferClient.cjs.map +1 -0
- package/dist/development/src/lib/transfer/DataTransferClient.js +97 -0
- package/dist/development/src/lib/transfer/DataTransferClient.js.map +1 -0
- package/dist/development/src/lib/transfer/stdio.cjs +12 -0
- package/dist/development/src/lib/transfer/stdio.cjs.map +1 -0
- package/dist/development/src/lib/transfer/stdio.js +12 -0
- package/dist/development/src/lib/transfer/stdio.js.map +1 -0
- package/dist/development/src/lib/workspace/WorkspaceResolver.cjs +38 -0
- package/dist/development/src/lib/workspace/WorkspaceResolver.cjs.map +1 -0
- package/dist/development/src/lib/workspace/WorkspaceResolver.js +38 -0
- package/dist/development/src/lib/workspace/WorkspaceResolver.js.map +1 -0
- package/dist/production/run.cjs +31 -0
- package/dist/production/run.cjs.map +1 -0
- package/dist/production/run.js +30 -0
- package/dist/production/run.js.map +1 -0
- package/dist/production/src/commands/deploy/DeployCommand.cjs +87 -0
- package/dist/production/src/commands/deploy/DeployCommand.cjs.map +1 -0
- package/dist/production/src/commands/deploy/DeployCommand.js +87 -0
- package/dist/production/src/commands/deploy/DeployCommand.js.map +1 -0
- package/dist/production/src/commands/migrations/MigrationAmendCommand.cjs +123 -0
- package/dist/production/src/commands/migrations/MigrationAmendCommand.cjs.map +1 -0
- package/dist/production/src/commands/migrations/MigrationAmendCommand.js +123 -0
- package/dist/production/src/commands/migrations/MigrationAmendCommand.js.map +1 -0
- package/dist/production/src/commands/migrations/MigrationBlankCommand.cjs +23 -0
- package/dist/production/src/commands/migrations/MigrationBlankCommand.cjs.map +1 -0
- package/dist/production/src/commands/migrations/MigrationBlankCommand.js +23 -0
- package/dist/production/src/commands/migrations/MigrationBlankCommand.js.map +1 -0
- package/dist/production/src/commands/migrations/MigrationDescribeCommand.cjs +30 -0
- package/dist/production/src/commands/migrations/MigrationDescribeCommand.cjs.map +1 -0
- package/dist/production/src/commands/migrations/MigrationDescribeCommand.js +30 -0
- package/dist/production/src/commands/migrations/MigrationDescribeCommand.js.map +1 -0
- package/dist/production/src/commands/migrations/MigrationDiffCommand.cjs +76 -0
- package/dist/production/src/commands/migrations/MigrationDiffCommand.cjs.map +1 -0
- package/dist/production/src/commands/migrations/MigrationDiffCommand.js +76 -0
- package/dist/production/src/commands/migrations/MigrationDiffCommand.js.map +1 -0
- package/dist/production/src/commands/migrations/MigrationExecuteCommand.cjs +26 -0
- package/dist/production/src/commands/migrations/MigrationExecuteCommand.cjs.map +1 -0
- package/dist/production/src/commands/migrations/MigrationExecuteCommand.js +26 -0
- package/dist/production/src/commands/migrations/MigrationExecuteCommand.js.map +1 -0
- package/dist/production/src/commands/migrations/MigrationRebaseCommand.cjs +31 -0
- package/dist/production/src/commands/migrations/MigrationRebaseCommand.cjs.map +1 -0
- package/dist/production/src/commands/migrations/MigrationRebaseCommand.js +31 -0
- package/dist/production/src/commands/migrations/MigrationRebaseCommand.js.map +1 -0
- package/dist/production/src/commands/migrations/MigrationStatusCommand.cjs +57 -0
- package/dist/production/src/commands/migrations/MigrationStatusCommand.cjs.map +1 -0
- package/dist/production/src/commands/migrations/MigrationStatusCommand.js +57 -0
- package/dist/production/src/commands/migrations/MigrationStatusCommand.js.map +1 -0
- package/dist/production/src/commands/misc/VersionCommand.cjs +18 -0
- package/dist/production/src/commands/misc/VersionCommand.cjs.map +1 -0
- package/dist/production/src/commands/misc/VersionCommand.js +18 -0
- package/dist/production/src/commands/misc/VersionCommand.js.map +1 -0
- package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.cjs +36 -0
- package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.cjs.map +1 -0
- package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.js +36 -0
- package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.js.map +1 -0
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.cjs +69 -0
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -0
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.js +69 -0
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -0
- package/dist/production/src/commands/project/ProjectValidateCommand.cjs +40 -0
- package/dist/production/src/commands/project/ProjectValidateCommand.cjs.map +1 -0
- package/dist/production/src/commands/project/ProjectValidateCommand.js +40 -0
- package/dist/production/src/commands/project/ProjectValidateCommand.js.map +1 -0
- package/dist/production/src/commands/transfer/ExportCommand.cjs +66 -0
- package/dist/production/src/commands/transfer/ExportCommand.cjs.map +1 -0
- package/dist/production/src/commands/transfer/ExportCommand.js +66 -0
- package/dist/production/src/commands/transfer/ExportCommand.js.map +1 -0
- package/dist/production/src/commands/transfer/ImportCommand.cjs +60 -0
- package/dist/production/src/commands/transfer/ImportCommand.cjs.map +1 -0
- package/dist/production/src/commands/transfer/ImportCommand.js +60 -0
- package/dist/production/src/commands/transfer/ImportCommand.js.map +1 -0
- package/dist/production/src/commands/transfer/TransferCommand.cjs +73 -0
- package/dist/production/src/commands/transfer/TransferCommand.cjs.map +1 -0
- package/dist/production/src/commands/transfer/TransferCommand.js +73 -0
- package/dist/production/src/commands/transfer/TransferCommand.js.map +1 -0
- package/dist/production/src/commands/transfer/utils.cjs +22 -0
- package/dist/production/src/commands/transfer/utils.cjs.map +1 -0
- package/dist/production/src/commands/transfer/utils.js +22 -0
- package/dist/production/src/commands/transfer/utils.js.map +1 -0
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.cjs +54 -0
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.cjs.map +1 -0
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.js +54 -0
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +1 -0
- package/dist/production/src/consts.cjs +10 -0
- package/dist/production/src/consts.cjs.map +1 -0
- package/dist/production/src/consts.js +9 -0
- package/dist/production/src/consts.js.map +1 -0
- package/dist/production/src/dic.cjs +116 -0
- package/dist/production/src/dic.cjs.map +1 -0
- package/dist/production/src/dic.js +116 -0
- package/dist/production/src/dic.js.map +1 -0
- package/dist/production/src/lib/SystemClientProvider.cjs +14 -0
- package/dist/production/src/lib/SystemClientProvider.cjs.map +1 -0
- package/dist/production/src/lib/SystemClientProvider.js +14 -0
- package/dist/production/src/lib/SystemClientProvider.js.map +1 -0
- package/dist/production/src/lib/TenantClientProvider.cjs +14 -0
- package/dist/production/src/lib/TenantClientProvider.cjs.map +1 -0
- package/dist/production/src/lib/TenantClientProvider.js +14 -0
- package/dist/production/src/lib/TenantClientProvider.js.map +1 -0
- package/dist/production/src/lib/VersionChecker.cjs +85 -0
- package/dist/production/src/lib/VersionChecker.cjs.map +1 -0
- package/dist/production/src/lib/VersionChecker.js +68 -0
- package/dist/production/src/lib/VersionChecker.js.map +1 -0
- package/dist/production/src/lib/admin/AdminClient.cjs +30 -0
- package/dist/production/src/lib/admin/AdminClient.cjs.map +1 -0
- package/dist/production/src/lib/admin/AdminClient.js +30 -0
- package/dist/production/src/lib/admin/AdminClient.js.map +1 -0
- package/dist/production/src/lib/admin/AdminDeployer.cjs +36 -0
- package/dist/production/src/lib/admin/AdminDeployer.cjs.map +1 -0
- package/dist/production/src/lib/admin/AdminDeployer.js +36 -0
- package/dist/production/src/lib/admin/AdminDeployer.js.map +1 -0
- package/dist/production/src/lib/assertNever.cjs +7 -0
- package/dist/production/src/lib/assertNever.cjs.map +1 -0
- package/dist/production/src/lib/assertNever.js +7 -0
- package/dist/production/src/lib/assertNever.js.map +1 -0
- package/dist/production/src/lib/dsn.cjs +16 -0
- package/dist/production/src/lib/dsn.cjs.map +1 -0
- package/dist/production/src/lib/dsn.js +16 -0
- package/dist/production/src/lib/dsn.js.map +1 -0
- package/dist/production/src/lib/env.cjs +15 -0
- package/dist/production/src/lib/env.cjs.map +1 -0
- package/dist/production/src/lib/env.js +15 -0
- package/dist/production/src/lib/env.js.map +1 -0
- package/dist/production/src/lib/fs/DockerComposeManager.cjs +41 -0
- package/dist/production/src/lib/fs/DockerComposeManager.cjs.map +1 -0
- package/dist/production/src/lib/fs/DockerComposeManager.js +41 -0
- package/dist/production/src/lib/fs/DockerComposeManager.js.map +1 -0
- package/dist/production/src/lib/fs/FileSystem.cjs +43 -0
- package/dist/production/src/lib/fs/FileSystem.cjs.map +1 -0
- package/dist/production/src/lib/fs/FileSystem.js +27 -0
- package/dist/production/src/lib/fs/FileSystem.js.map +1 -0
- package/dist/production/src/lib/fs/YamlHandler.cjs +48 -0
- package/dist/production/src/lib/fs/YamlHandler.cjs.map +1 -0
- package/dist/production/src/lib/fs/YamlHandler.js +48 -0
- package/dist/production/src/lib/fs/YamlHandler.js.map +1 -0
- package/dist/production/src/lib/js/EsBuildBuilder.cjs +36 -0
- package/dist/production/src/lib/js/EsBuildBuilder.cjs.map +1 -0
- package/dist/production/src/lib/js/EsBuildBuilder.js +19 -0
- package/dist/production/src/lib/js/EsBuildBuilder.js.map +1 -0
- package/dist/production/src/lib/js/EvalExecutor.cjs +10 -0
- package/dist/production/src/lib/js/EvalExecutor.cjs.map +1 -0
- package/dist/production/src/lib/js/EvalExecutor.js +10 -0
- package/dist/production/src/lib/js/EvalExecutor.js.map +1 -0
- package/dist/production/src/lib/js/JsCodeRunner.cjs +17 -0
- package/dist/production/src/lib/js/JsCodeRunner.cjs.map +1 -0
- package/dist/production/src/lib/js/JsCodeRunner.js +17 -0
- package/dist/production/src/lib/js/JsCodeRunner.js.map +1 -0
- package/dist/production/src/lib/maskToken.cjs +5 -0
- package/dist/production/src/lib/maskToken.cjs.map +1 -0
- package/dist/production/src/lib/maskToken.js +5 -0
- package/dist/production/src/lib/maskToken.js.map +1 -0
- package/dist/production/src/lib/migrations/MigrationExecutionFacade.cjs +84 -0
- package/dist/production/src/lib/migrations/MigrationExecutionFacade.cjs.map +1 -0
- package/dist/production/src/lib/migrations/MigrationExecutionFacade.js +84 -0
- package/dist/production/src/lib/migrations/MigrationExecutionFacade.js.map +1 -0
- package/dist/production/src/lib/migrations/MigrationPrinter.cjs +82 -0
- package/dist/production/src/lib/migrations/MigrationPrinter.cjs.map +1 -0
- package/dist/production/src/lib/migrations/MigrationPrinter.js +82 -0
- package/dist/production/src/lib/migrations/MigrationPrinter.js.map +1 -0
- package/dist/production/src/lib/migrations/MigrationRebaseFacade.cjs +41 -0
- package/dist/production/src/lib/migrations/MigrationRebaseFacade.cjs.map +1 -0
- package/dist/production/src/lib/migrations/MigrationRebaseFacade.js +41 -0
- package/dist/production/src/lib/migrations/MigrationRebaseFacade.js.map +1 -0
- package/dist/production/src/lib/migrations/MigrationsStatusFacade.cjs +27 -0
- package/dist/production/src/lib/migrations/MigrationsStatusFacade.cjs.map +1 -0
- package/dist/production/src/lib/migrations/MigrationsStatusFacade.js +27 -0
- package/dist/production/src/lib/migrations/MigrationsStatusFacade.js.map +1 -0
- package/dist/production/src/lib/migrations/MigrationsValidator.cjs +38 -0
- package/dist/production/src/lib/migrations/MigrationsValidator.cjs.map +1 -0
- package/dist/production/src/lib/migrations/MigrationsValidator.js +38 -0
- package/dist/production/src/lib/migrations/MigrationsValidator.js.map +1 -0
- package/dist/production/src/lib/migrations/migrations.cjs +43 -0
- package/dist/production/src/lib/migrations/migrations.cjs.map +1 -0
- package/dist/production/src/lib/migrations/migrations.js +43 -0
- package/dist/production/src/lib/migrations/migrations.js.map +1 -0
- package/dist/production/src/lib/project/RemoteProject.cjs +12 -0
- package/dist/production/src/lib/project/RemoteProject.cjs.map +1 -0
- package/dist/production/src/lib/project/RemoteProject.js +12 -0
- package/dist/production/src/lib/project/RemoteProject.js.map +1 -0
- package/dist/production/src/lib/project/RemoteProjectProvider.cjs +21 -0
- package/dist/production/src/lib/project/RemoteProjectProvider.cjs.map +1 -0
- package/dist/production/src/lib/project/RemoteProjectProvider.js +21 -0
- package/dist/production/src/lib/project/RemoteProjectProvider.js.map +1 -0
- package/dist/production/src/lib/project/RemoteProjectResolver.cjs +29 -0
- package/dist/production/src/lib/project/RemoteProjectResolver.cjs.map +1 -0
- package/dist/production/src/lib/project/RemoteProjectResolver.js +29 -0
- package/dist/production/src/lib/project/RemoteProjectResolver.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/EntityInfo.cjs +77 -0
- package/dist/production/src/lib/project/docs/components/EntityInfo.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/EntityInfo.js +77 -0
- package/dist/production/src/lib/project/docs/components/EntityInfo.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/EntityLink.cjs +7 -0
- package/dist/production/src/lib/project/docs/components/EntityLink.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/EntityLink.js +7 -0
- package/dist/production/src/lib/project/docs/components/EntityLink.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/FieldLink.cjs +15 -0
- package/dist/production/src/lib/project/docs/components/FieldLink.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/FieldLink.js +15 -0
- package/dist/production/src/lib/project/docs/components/FieldLink.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/FieldPermissions.cjs +17 -0
- package/dist/production/src/lib/project/docs/components/FieldPermissions.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/FieldPermissions.js +17 -0
- package/dist/production/src/lib/project/docs/components/FieldPermissions.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/FieldType.cjs +59 -0
- package/dist/production/src/lib/project/docs/components/FieldType.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/FieldType.js +59 -0
- package/dist/production/src/lib/project/docs/components/FieldType.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/OnDelete.cjs +66 -0
- package/dist/production/src/lib/project/docs/components/OnDelete.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/OnDelete.js +66 -0
- package/dist/production/src/lib/project/docs/components/OnDelete.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/ProjectInfo.cjs +32 -0
- package/dist/production/src/lib/project/docs/components/ProjectInfo.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/ProjectInfo.js +32 -0
- package/dist/production/src/lib/project/docs/components/ProjectInfo.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/SinglePermission.cjs +14 -0
- package/dist/production/src/lib/project/docs/components/SinglePermission.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/SinglePermission.js +14 -0
- package/dist/production/src/lib/project/docs/components/SinglePermission.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/utils.cjs +7 -0
- package/dist/production/src/lib/project/docs/components/utils.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/utils.js +7 -0
- package/dist/production/src/lib/project/docs/components/utils.js.map +1 -0
- package/dist/production/src/lib/project/docs/projectDescribe.cjs +28 -0
- package/dist/production/src/lib/project/docs/projectDescribe.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/projectDescribe.js +27 -0
- package/dist/production/src/lib/project/docs/projectDescribe.js.map +1 -0
- package/dist/production/src/lib/schema/SchemaLoader.cjs +49 -0
- package/dist/production/src/lib/schema/SchemaLoader.cjs.map +1 -0
- package/dist/production/src/lib/schema/SchemaLoader.js +32 -0
- package/dist/production/src/lib/schema/SchemaLoader.js.map +1 -0
- package/dist/production/src/lib/schema/SchemaValidationHelper.cjs +11 -0
- package/dist/production/src/lib/schema/SchemaValidationHelper.cjs.map +1 -0
- package/dist/production/src/lib/schema/SchemaValidationHelper.js +11 -0
- package/dist/production/src/lib/schema/SchemaValidationHelper.js.map +1 -0
- package/dist/production/src/lib/schema/SchemaValidationPrinter.cjs +14 -0
- package/dist/production/src/lib/schema/SchemaValidationPrinter.cjs.map +1 -0
- package/dist/production/src/lib/schema/SchemaValidationPrinter.js +14 -0
- package/dist/production/src/lib/schema/SchemaValidationPrinter.js.map +1 -0
- package/dist/production/src/lib/schema/collectReferences.cjs +34 -0
- package/dist/production/src/lib/schema/collectReferences.cjs.map +1 -0
- package/dist/production/src/lib/schema/collectReferences.js +34 -0
- package/dist/production/src/lib/schema/collectReferences.js.map +1 -0
- package/dist/production/src/lib/stream.cjs +43 -0
- package/dist/production/src/lib/stream.cjs.map +1 -0
- package/dist/production/src/lib/stream.js +43 -0
- package/dist/production/src/lib/stream.js.map +1 -0
- package/dist/production/src/lib/tenant/TenantClient.cjs +45 -0
- package/dist/production/src/lib/tenant/TenantClient.cjs.map +1 -0
- package/dist/production/src/lib/tenant/TenantClient.js +45 -0
- package/dist/production/src/lib/tenant/TenantClient.js.map +1 -0
- package/dist/production/src/lib/transfer/DataTransferClient.cjs +97 -0
- package/dist/production/src/lib/transfer/DataTransferClient.cjs.map +1 -0
- package/dist/production/src/lib/transfer/DataTransferClient.js +97 -0
- package/dist/production/src/lib/transfer/DataTransferClient.js.map +1 -0
- package/dist/production/src/lib/transfer/stdio.cjs +12 -0
- package/dist/production/src/lib/transfer/stdio.cjs.map +1 -0
- package/dist/production/src/lib/transfer/stdio.js +12 -0
- package/dist/production/src/lib/transfer/stdio.js.map +1 -0
- package/dist/production/src/lib/workspace/WorkspaceResolver.cjs +38 -0
- package/dist/production/src/lib/workspace/WorkspaceResolver.cjs.map +1 -0
- package/dist/production/src/lib/workspace/WorkspaceResolver.js +38 -0
- package/dist/production/src/lib/workspace/WorkspaceResolver.js.map +1 -0
- package/dist/types/commands/deploy/DeployCommand.d.ts +30 -0
- package/dist/types/commands/deploy/DeployCommand.d.ts.map +1 -0
- package/dist/types/commands/index.d.ts +6 -0
- package/dist/types/commands/index.d.ts.map +1 -0
- package/dist/types/commands/migrations/MigrationAmendCommand.d.ts +32 -0
- package/dist/types/commands/migrations/MigrationAmendCommand.d.ts.map +1 -0
- package/dist/types/commands/migrations/MigrationBlankCommand.d.ts +15 -0
- package/dist/types/commands/migrations/MigrationBlankCommand.d.ts.map +1 -0
- package/dist/types/commands/migrations/MigrationDescribeCommand.d.ts +20 -0
- package/dist/types/commands/migrations/MigrationDescribeCommand.d.ts.map +1 -0
- package/dist/types/commands/migrations/MigrationDiffCommand.d.ts +25 -0
- package/dist/types/commands/migrations/MigrationDiffCommand.d.ts.map +1 -0
- package/dist/types/commands/migrations/MigrationExecuteCommand.d.ts +16 -0
- package/dist/types/commands/migrations/MigrationExecuteCommand.d.ts.map +1 -0
- package/dist/types/commands/migrations/MigrationRebaseCommand.d.ts +18 -0
- package/dist/types/commands/migrations/MigrationRebaseCommand.d.ts.map +1 -0
- package/dist/types/commands/migrations/MigrationStatusCommand.d.ts +22 -0
- package/dist/types/commands/migrations/MigrationStatusCommand.d.ts.map +1 -0
- package/dist/types/commands/misc/VersionCommand.d.ts +8 -0
- package/dist/types/commands/misc/VersionCommand.d.ts.map +1 -0
- package/dist/types/commands/project/ProjectGenerateDocumentationCommand.d.ts +15 -0
- package/dist/types/commands/project/ProjectGenerateDocumentationCommand.d.ts.map +1 -0
- package/dist/types/commands/project/ProjectPrintSchemaCommand.d.ts +19 -0
- package/dist/types/commands/project/ProjectPrintSchemaCommand.d.ts.map +1 -0
- package/dist/types/commands/project/ProjectValidateCommand.d.ts +19 -0
- package/dist/types/commands/project/ProjectValidateCommand.d.ts.map +1 -0
- package/dist/types/commands/project/index.d.ts +4 -0
- package/dist/types/commands/project/index.d.ts.map +1 -0
- package/dist/types/commands/transfer/ExportCommand.d.ts +23 -0
- package/dist/types/commands/transfer/ExportCommand.d.ts.map +1 -0
- package/dist/types/commands/transfer/ImportCommand.d.ts +20 -0
- package/dist/types/commands/transfer/ImportCommand.d.ts.map +1 -0
- package/dist/types/commands/transfer/TransferCommand.d.ts +21 -0
- package/dist/types/commands/transfer/TransferCommand.d.ts.map +1 -0
- package/dist/types/commands/transfer/utils.d.ts +5 -0
- package/dist/types/commands/transfer/utils.d.ts.map +1 -0
- package/dist/types/commands/workspace/WorkspaceUpdateApiCommand.d.ts +15 -0
- package/dist/types/commands/workspace/WorkspaceUpdateApiCommand.d.ts.map +1 -0
- package/dist/types/consts.d.ts +3 -0
- package/dist/types/consts.d.ts.map +1 -0
- package/dist/types/dic.d.ts +144 -0
- package/dist/types/dic.d.ts.map +1 -0
- package/dist/types/lib/SystemClientProvider.d.ts +8 -0
- package/dist/types/lib/SystemClientProvider.d.ts.map +1 -0
- package/dist/types/lib/TenantClientProvider.d.ts +8 -0
- package/dist/types/lib/TenantClientProvider.d.ts.map +1 -0
- package/dist/types/lib/VersionChecker.d.ts +11 -0
- package/dist/types/lib/VersionChecker.d.ts.map +1 -0
- package/dist/types/lib/admin/AdminClient.d.ts +12 -0
- package/dist/types/lib/admin/AdminClient.d.ts.map +1 -0
- package/dist/types/lib/admin/AdminDeployer.d.ts +15 -0
- package/dist/types/lib/admin/AdminDeployer.d.ts.map +1 -0
- package/dist/types/lib/assertNever.d.ts.map +1 -0
- package/dist/types/lib/dsn.d.ts.map +1 -0
- package/dist/types/lib/env.d.ts +11 -0
- package/dist/types/lib/env.d.ts.map +1 -0
- package/dist/types/lib/fs/DockerComposeManager.d.ts +25 -0
- package/dist/types/lib/fs/DockerComposeManager.d.ts.map +1 -0
- package/dist/types/lib/fs/FileSystem.d.ts +8 -0
- package/dist/types/lib/fs/FileSystem.d.ts.map +1 -0
- package/dist/types/lib/fs/YamlHandler.d.ts +15 -0
- package/dist/types/lib/fs/YamlHandler.d.ts.map +1 -0
- package/dist/types/lib/js/EsBuildBuilder.d.ts +5 -0
- package/dist/types/lib/js/EsBuildBuilder.d.ts.map +1 -0
- package/dist/types/lib/js/EvalExecutor.d.ts +5 -0
- package/dist/types/lib/js/EvalExecutor.d.ts.map +1 -0
- package/dist/types/lib/js/JsBuilder.d.ts +4 -0
- package/dist/types/lib/js/JsBuilder.d.ts.map +1 -0
- package/dist/types/lib/js/JsCodeRunner.d.ts +9 -0
- package/dist/types/lib/js/JsCodeRunner.d.ts.map +1 -0
- package/dist/types/lib/js/JsExecutor.d.ts +4 -0
- package/dist/types/lib/js/JsExecutor.d.ts.map +1 -0
- package/dist/types/lib/json.d.ts +7 -0
- package/dist/types/lib/json.d.ts.map +1 -0
- package/dist/types/lib/maskToken.d.ts +2 -0
- package/dist/types/lib/maskToken.d.ts.map +1 -0
- package/dist/types/lib/migrations/MigrationExecutionFacade.d.ts +23 -0
- package/dist/types/lib/migrations/MigrationExecutionFacade.d.ts.map +1 -0
- package/dist/types/lib/migrations/MigrationPrinter.d.ts +12 -0
- package/dist/types/lib/migrations/MigrationPrinter.d.ts.map +1 -0
- package/dist/types/lib/migrations/MigrationRebaseFacade.d.ts +12 -0
- package/dist/types/lib/migrations/MigrationRebaseFacade.d.ts.map +1 -0
- package/dist/types/lib/migrations/MigrationsStatusFacade.d.ts +16 -0
- package/dist/types/lib/migrations/MigrationsStatusFacade.d.ts.map +1 -0
- package/dist/types/lib/migrations/MigrationsValidator.d.ts +10 -0
- package/dist/types/lib/migrations/MigrationsValidator.d.ts.map +1 -0
- package/dist/types/lib/migrations/migrations.d.ts +3 -0
- package/dist/types/lib/migrations/migrations.d.ts.map +1 -0
- package/dist/types/lib/project/RemoteProject.d.ts +8 -0
- package/dist/types/lib/project/RemoteProject.d.ts.map +1 -0
- package/dist/types/lib/project/RemoteProjectProvider.d.ts +7 -0
- package/dist/types/lib/project/RemoteProjectProvider.d.ts.map +1 -0
- package/dist/types/lib/project/RemoteProjectResolver.d.ts +8 -0
- package/dist/types/lib/project/RemoteProjectResolver.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/EntityInfo.d.ts +11 -0
- package/dist/types/lib/project/docs/components/EntityInfo.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/EntityLink.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/FieldLink.d.ts +7 -0
- package/dist/types/lib/project/docs/components/FieldLink.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/FieldPermissions.d.ts +7 -0
- package/dist/types/lib/project/docs/components/FieldPermissions.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/FieldType.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/OnDelete.d.ts +9 -0
- package/dist/types/lib/project/docs/components/OnDelete.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/ProjectInfo.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/SinglePermission.d.ts +7 -0
- package/dist/types/lib/project/docs/components/SinglePermission.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/utils.d.ts.map +1 -0
- package/dist/types/lib/project/docs/projectDescribe.d.ts.map +1 -0
- package/dist/types/lib/schema/SchemaLoader.d.ts +18 -0
- package/dist/types/lib/schema/SchemaLoader.d.ts.map +1 -0
- package/dist/types/lib/schema/SchemaValidationHelper.d.ts +4 -0
- package/dist/types/lib/schema/SchemaValidationHelper.d.ts.map +1 -0
- package/dist/types/lib/schema/SchemaValidationPrinter.d.ts +3 -0
- package/dist/types/lib/schema/SchemaValidationPrinter.d.ts.map +1 -0
- package/dist/types/lib/schema/collectReferences.d.ts.map +1 -0
- package/dist/types/lib/stream.d.ts +8 -0
- package/dist/types/lib/stream.d.ts.map +1 -0
- package/dist/types/lib/tenant/TenantClient.d.ts +9 -0
- package/dist/types/lib/tenant/TenantClient.d.ts.map +1 -0
- package/dist/types/lib/transfer/DataTransferClient.d.ts +18 -0
- package/dist/types/lib/transfer/DataTransferClient.d.ts.map +1 -0
- package/dist/types/lib/transfer/stdio.d.ts.map +1 -0
- package/dist/types/lib/workspace/Workspace.d.ts +8 -0
- package/dist/types/lib/workspace/Workspace.d.ts.map +1 -0
- package/dist/types/lib/workspace/WorkspaceResolver.d.ts +15 -0
- package/dist/types/lib/workspace/WorkspaceResolver.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/esbuild.cjs +27 -0
- package/package.json +16 -13
- package/src/.eslintrc.cjs +5 -0
- package/src/commands/deploy/DeployCommand.ts +51 -107
- package/src/commands/index.ts +0 -1
- package/src/commands/migrations/MigrationAmendCommand.ts +97 -115
- package/src/commands/migrations/MigrationBlankCommand.ts +8 -20
- package/src/commands/migrations/MigrationDescribeCommand.ts +12 -22
- package/src/commands/migrations/MigrationDiffCommand.ts +66 -95
- package/src/commands/migrations/MigrationExecuteCommand.ts +23 -83
- package/src/commands/migrations/MigrationRebaseCommand.ts +20 -62
- package/src/commands/migrations/MigrationStatusCommand.ts +20 -40
- package/src/commands/misc/VersionCommand.ts +7 -2
- package/src/commands/project/ProjectGenerateDocumentationCommand.ts +47 -0
- package/src/commands/project/ProjectPrintSchemaCommand.ts +10 -16
- package/src/commands/project/ProjectValidateCommand.ts +33 -54
- package/src/commands/project/index.ts +1 -1
- package/src/commands/transfer/ExportCommand.ts +16 -14
- package/src/commands/transfer/ImportCommand.ts +18 -15
- package/src/commands/transfer/TransferCommand.ts +29 -18
- package/src/commands/transfer/utils.ts +1 -117
- package/src/commands/workspace/WorkspaceUpdateApiCommand.ts +8 -16
- package/src/consts.ts +5 -0
- package/src/dic.ts +258 -0
- package/src/lib/SystemClientProvider.ts +14 -0
- package/src/lib/TenantClientProvider.ts +14 -0
- package/src/lib/VersionChecker.ts +71 -0
- package/src/lib/admin/AdminClient.ts +33 -0
- package/src/lib/admin/AdminDeployer.ts +45 -0
- package/src/lib/dsn.ts +13 -0
- package/src/lib/env.ts +21 -0
- package/src/lib/fs/DockerComposeManager.ts +63 -0
- package/src/lib/fs/FileSystem.ts +19 -0
- package/src/lib/fs/YamlHandler.ts +59 -0
- package/src/lib/js/EsBuildBuilder.ts +17 -0
- package/src/lib/js/EvalExecutor.ts +8 -0
- package/src/lib/js/JsBuilder.ts +3 -0
- package/src/lib/js/JsCodeRunner.ts +15 -0
- package/src/lib/js/JsExecutor.ts +3 -0
- package/src/lib/json.ts +4 -0
- package/src/lib/migrations/MigrationExecutionFacade.ts +97 -0
- package/src/lib/migrations/MigrationPrinter.ts +86 -0
- package/src/lib/migrations/MigrationRebaseFacade.ts +41 -0
- package/src/lib/migrations/MigrationsStatusFacade.ts +27 -0
- package/src/lib/migrations/MigrationsValidator.ts +40 -0
- package/src/lib/migrations/migrations.ts +45 -0
- package/src/lib/project/RemoteProject.ts +9 -0
- package/src/lib/project/RemoteProjectProvider.ts +16 -0
- package/src/lib/project/RemoteProjectResolver.ts +30 -0
- package/src/lib/project/docs/.eslintrc.cjs +5 -0
- package/src/lib/project/docs/components/EntityInfo.tsx +85 -0
- package/src/lib/project/docs/components/OnDelete.tsx +72 -0
- package/src/lib/project/docs/components/ProjectInfo.tsx +48 -0
- package/src/lib/project/docs/projectDescribe.tsx +28 -0
- package/src/lib/schema/SchemaLoader.ts +38 -0
- package/src/lib/schema/SchemaValidationHelper.ts +9 -0
- package/src/lib/schema/SchemaValidationPrinter.ts +13 -0
- package/src/lib/tenant/TenantClient.ts +45 -0
- package/src/lib/transfer/DataTransferClient.ts +112 -0
- package/src/lib/workspace/Workspace.ts +7 -0
- package/src/lib/workspace/WorkspaceResolver.ts +45 -0
- package/src/run.ts +23 -63
- package/src/tsconfig.json +4 -2
- package/tailwind.config.js +1 -1
- package/dist/src/commands/deploy/DeployCommand.d.ts +0 -21
- package/dist/src/commands/deploy/DeployCommand.d.ts.map +0 -1
- package/dist/src/commands/deploy/DeployCommand.js +0 -135
- package/dist/src/commands/deploy/DeployCommand.js.map +0 -1
- package/dist/src/commands/deploy/index.js +0 -18
- package/dist/src/commands/deploy/index.js.map +0 -1
- package/dist/src/commands/index.d.ts +0 -7
- package/dist/src/commands/index.d.ts.map +0 -1
- package/dist/src/commands/index.js +0 -23
- package/dist/src/commands/index.js.map +0 -1
- package/dist/src/commands/migrations/MigrationAmendCommand.d.ts +0 -18
- package/dist/src/commands/migrations/MigrationAmendCommand.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationAmendCommand.js +0 -126
- package/dist/src/commands/migrations/MigrationAmendCommand.js.map +0 -1
- package/dist/src/commands/migrations/MigrationBlankCommand.d.ts +0 -15
- package/dist/src/commands/migrations/MigrationBlankCommand.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationBlankCommand.js +0 -29
- package/dist/src/commands/migrations/MigrationBlankCommand.js.map +0 -1
- package/dist/src/commands/migrations/MigrationDescribeCommand.d.ts +0 -17
- package/dist/src/commands/migrations/MigrationDescribeCommand.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationDescribeCommand.js +0 -42
- package/dist/src/commands/migrations/MigrationDescribeCommand.js.map +0 -1
- package/dist/src/commands/migrations/MigrationDiffCommand.d.ts +0 -18
- package/dist/src/commands/migrations/MigrationDiffCommand.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationDiffCommand.js +0 -110
- package/dist/src/commands/migrations/MigrationDiffCommand.js.map +0 -1
- package/dist/src/commands/migrations/MigrationExecuteCommand.d.ts +0 -17
- package/dist/src/commands/migrations/MigrationExecuteCommand.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationExecuteCommand.js +0 -83
- package/dist/src/commands/migrations/MigrationExecuteCommand.js.map +0 -1
- package/dist/src/commands/migrations/MigrationRebaseCommand.d.ts +0 -16
- package/dist/src/commands/migrations/MigrationRebaseCommand.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationRebaseCommand.js +0 -64
- package/dist/src/commands/migrations/MigrationRebaseCommand.js.map +0 -1
- package/dist/src/commands/migrations/MigrationStatusCommand.d.ts +0 -19
- package/dist/src/commands/migrations/MigrationStatusCommand.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationStatusCommand.js +0 -88
- package/dist/src/commands/migrations/MigrationStatusCommand.js.map +0 -1
- package/dist/src/commands/migrations/MigrationValidationHelper.d.ts +0 -4
- package/dist/src/commands/migrations/MigrationValidationHelper.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationValidationHelper.js +0 -34
- package/dist/src/commands/migrations/MigrationValidationHelper.js.map +0 -1
- package/dist/src/commands/migrations/SystemApiClientResolver.d.ts +0 -8
- package/dist/src/commands/migrations/SystemApiClientResolver.d.ts.map +0 -1
- package/dist/src/commands/migrations/SystemApiClientResolver.js +0 -14
- package/dist/src/commands/migrations/SystemApiClientResolver.js.map +0 -1
- package/dist/src/commands/migrations/index.js +0 -24
- package/dist/src/commands/migrations/index.js.map +0 -1
- package/dist/src/commands/misc/VersionCommand.d.ts +0 -6
- package/dist/src/commands/misc/VersionCommand.d.ts.map +0 -1
- package/dist/src/commands/misc/VersionCommand.js +0 -15
- package/dist/src/commands/misc/VersionCommand.js.map +0 -1
- package/dist/src/commands/misc/index.js +0 -18
- package/dist/src/commands/misc/index.js.map +0 -1
- package/dist/src/commands/project/ProjectGenerateDocumentation.d.ts +0 -15
- package/dist/src/commands/project/ProjectGenerateDocumentation.d.ts.map +0 -1
- package/dist/src/commands/project/ProjectGenerateDocumentation.js +0 -43
- package/dist/src/commands/project/ProjectGenerateDocumentation.js.map +0 -1
- package/dist/src/commands/project/ProjectPrintSchemaCommand.d.ts +0 -18
- package/dist/src/commands/project/ProjectPrintSchemaCommand.d.ts.map +0 -1
- package/dist/src/commands/project/ProjectPrintSchemaCommand.js +0 -81
- package/dist/src/commands/project/ProjectPrintSchemaCommand.js.map +0 -1
- package/dist/src/commands/project/ProjectValidateCommand.d.ts +0 -13
- package/dist/src/commands/project/ProjectValidateCommand.d.ts.map +0 -1
- package/dist/src/commands/project/ProjectValidateCommand.js +0 -65
- package/dist/src/commands/project/ProjectValidateCommand.js.map +0 -1
- package/dist/src/commands/project/index.d.ts +0 -4
- package/dist/src/commands/project/index.d.ts.map +0 -1
- package/dist/src/commands/project/index.js +0 -20
- package/dist/src/commands/project/index.js.map +0 -1
- package/dist/src/commands/tenant/CreateApiKeyCommand.d.ts +0 -14
- package/dist/src/commands/tenant/CreateApiKeyCommand.d.ts.map +0 -1
- package/dist/src/commands/tenant/CreateApiKeyCommand.js +0 -34
- package/dist/src/commands/tenant/CreateApiKeyCommand.js.map +0 -1
- package/dist/src/commands/tenant/InviteCommand.d.ts +0 -14
- package/dist/src/commands/tenant/InviteCommand.d.ts.map +0 -1
- package/dist/src/commands/tenant/InviteCommand.js +0 -32
- package/dist/src/commands/tenant/InviteCommand.js.map +0 -1
- package/dist/src/commands/tenant/ResetPasswordCommand.d.ts +0 -14
- package/dist/src/commands/tenant/ResetPasswordCommand.d.ts.map +0 -1
- package/dist/src/commands/tenant/ResetPasswordCommand.js +0 -30
- package/dist/src/commands/tenant/ResetPasswordCommand.js.map +0 -1
- package/dist/src/commands/tenant/SignInCommand.d.ts +0 -14
- package/dist/src/commands/tenant/SignInCommand.d.ts.map +0 -1
- package/dist/src/commands/tenant/SignInCommand.js +0 -32
- package/dist/src/commands/tenant/SignInCommand.js.map +0 -1
- package/dist/src/commands/tenant/index.d.ts +0 -5
- package/dist/src/commands/tenant/index.d.ts.map +0 -1
- package/dist/src/commands/tenant/index.js +0 -21
- package/dist/src/commands/tenant/index.js.map +0 -1
- package/dist/src/commands/transfer/ExportCommand.d.ts +0 -20
- package/dist/src/commands/transfer/ExportCommand.d.ts.map +0 -1
- package/dist/src/commands/transfer/ExportCommand.js +0 -70
- package/dist/src/commands/transfer/ExportCommand.js.map +0 -1
- package/dist/src/commands/transfer/ImportCommand.d.ts +0 -17
- package/dist/src/commands/transfer/ImportCommand.d.ts.map +0 -1
- package/dist/src/commands/transfer/ImportCommand.js +0 -61
- package/dist/src/commands/transfer/ImportCommand.js.map +0 -1
- package/dist/src/commands/transfer/TransferCommand.d.ts +0 -18
- package/dist/src/commands/transfer/TransferCommand.d.ts.map +0 -1
- package/dist/src/commands/transfer/TransferCommand.js +0 -67
- package/dist/src/commands/transfer/TransferCommand.js.map +0 -1
- package/dist/src/commands/transfer/index.js +0 -20
- package/dist/src/commands/transfer/index.js.map +0 -1
- package/dist/src/commands/transfer/utils.d.ts +0 -27
- package/dist/src/commands/transfer/utils.d.ts.map +0 -1
- package/dist/src/commands/transfer/utils.js +0 -136
- package/dist/src/commands/transfer/utils.js.map +0 -1
- package/dist/src/commands/workspace/WorkspaceUpdateApiCommand.d.ts +0 -13
- package/dist/src/commands/workspace/WorkspaceUpdateApiCommand.d.ts.map +0 -1
- package/dist/src/commands/workspace/WorkspaceUpdateApiCommand.js +0 -66
- package/dist/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +0 -1
- package/dist/src/commands/workspace/index.js +0 -18
- package/dist/src/commands/workspace/index.js.map +0 -1
- package/dist/src/run.js +0 -50
- package/dist/src/run.js.map +0 -1
- package/dist/src/tsconfig.tsbuildinfo +0 -1
- package/dist/src/utils/admin.d.ts +0 -14
- package/dist/src/utils/admin.d.ts.map +0 -1
- package/dist/src/utils/admin.js +0 -47
- package/dist/src/utils/admin.js.map +0 -1
- package/dist/src/utils/assertNever.d.ts.map +0 -1
- package/dist/src/utils/assertNever.js +0 -8
- package/dist/src/utils/assertNever.js.map +0 -1
- package/dist/src/utils/checkVersions.d.ts +0 -3
- package/dist/src/utils/checkVersions.d.ts.map +0 -1
- package/dist/src/utils/checkVersions.js +0 -83
- package/dist/src/utils/checkVersions.js.map +0 -1
- package/dist/src/utils/dockerCompose.d.ts +0 -18
- package/dist/src/utils/dockerCompose.d.ts.map +0 -1
- package/dist/src/utils/dockerCompose.js +0 -66
- package/dist/src/utils/dockerCompose.js.map +0 -1
- package/dist/src/utils/dsn.d.ts.map +0 -1
- package/dist/src/utils/dsn.js +0 -17
- package/dist/src/utils/dsn.js.map +0 -1
- package/dist/src/utils/esbuild.d.ts +0 -2
- package/dist/src/utils/esbuild.d.ts.map +0 -1
- package/dist/src/utils/esbuild.js +0 -41
- package/dist/src/utils/esbuild.js.map +0 -1
- package/dist/src/utils/instance/environment.d.ts +0 -4
- package/dist/src/utils/instance/environment.d.ts.map +0 -1
- package/dist/src/utils/instance/environment.js +0 -3
- package/dist/src/utils/instance/environment.js.map +0 -1
- package/dist/src/utils/instance/index.d.ts +0 -3
- package/dist/src/utils/instance/index.d.ts.map +0 -1
- package/dist/src/utils/instance/index.js +0 -21
- package/dist/src/utils/instance/index.js.map +0 -1
- package/dist/src/utils/instance/interactiveUtils.d.ts +0 -4
- package/dist/src/utils/instance/interactiveUtils.d.ts.map +0 -1
- package/dist/src/utils/instance/interactiveUtils.js +0 -36
- package/dist/src/utils/instance/interactiveUtils.js.map +0 -1
- package/dist/src/utils/migrations/MigrationCreateHelper.d.ts +0 -21
- package/dist/src/utils/migrations/MigrationCreateHelper.d.ts.map +0 -1
- package/dist/src/utils/migrations/MigrationCreateHelper.js +0 -32
- package/dist/src/utils/migrations/MigrationCreateHelper.js.map +0 -1
- package/dist/src/utils/migrations/MigrationExecuteHelper.d.ts +0 -23
- package/dist/src/utils/migrations/MigrationExecuteHelper.d.ts.map +0 -1
- package/dist/src/utils/migrations/MigrationExecuteHelper.js +0 -84
- package/dist/src/utils/migrations/MigrationExecuteHelper.js.map +0 -1
- package/dist/src/utils/migrations/MigrationsContainer.d.ts +0 -20
- package/dist/src/utils/migrations/MigrationsContainer.d.ts.map +0 -1
- package/dist/src/utils/migrations/MigrationsContainer.js +0 -58
- package/dist/src/utils/migrations/MigrationsContainer.js.map +0 -1
- package/dist/src/utils/migrations/migrations.d.ts +0 -9
- package/dist/src/utils/migrations/migrations.d.ts.map +0 -1
- package/dist/src/utils/migrations/migrations.js +0 -77
- package/dist/src/utils/migrations/migrations.js.map +0 -1
- package/dist/src/utils/project/components/EntityInfo.d.ts +0 -11
- package/dist/src/utils/project/components/EntityInfo.d.ts.map +0 -1
- package/dist/src/utils/project/components/EntityInfo.js +0 -54
- package/dist/src/utils/project/components/EntityInfo.js.map +0 -1
- package/dist/src/utils/project/components/EntityLink.d.ts.map +0 -1
- package/dist/src/utils/project/components/EntityLink.js +0 -8
- package/dist/src/utils/project/components/EntityLink.js.map +0 -1
- package/dist/src/utils/project/components/FieldLink.d.ts +0 -7
- package/dist/src/utils/project/components/FieldLink.d.ts.map +0 -1
- package/dist/src/utils/project/components/FieldLink.js +0 -13
- package/dist/src/utils/project/components/FieldLink.js.map +0 -1
- package/dist/src/utils/project/components/FieldPermissions.d.ts +0 -7
- package/dist/src/utils/project/components/FieldPermissions.d.ts.map +0 -1
- package/dist/src/utils/project/components/FieldPermissions.js +0 -17
- package/dist/src/utils/project/components/FieldPermissions.js.map +0 -1
- package/dist/src/utils/project/components/FieldType.d.ts.map +0 -1
- package/dist/src/utils/project/components/FieldType.js +0 -59
- package/dist/src/utils/project/components/FieldType.js.map +0 -1
- package/dist/src/utils/project/components/OnDelete.d.ts +0 -9
- package/dist/src/utils/project/components/OnDelete.d.ts.map +0 -1
- package/dist/src/utils/project/components/OnDelete.js +0 -70
- package/dist/src/utils/project/components/OnDelete.js.map +0 -1
- package/dist/src/utils/project/components/ProjectInfo.d.ts.map +0 -1
- package/dist/src/utils/project/components/ProjectInfo.js +0 -28
- package/dist/src/utils/project/components/ProjectInfo.js.map +0 -1
- package/dist/src/utils/project/components/SinglePermission.d.ts +0 -7
- package/dist/src/utils/project/components/SinglePermission.d.ts.map +0 -1
- package/dist/src/utils/project/components/SinglePermission.js +0 -15
- package/dist/src/utils/project/components/SinglePermission.js.map +0 -1
- package/dist/src/utils/project/components/utils.d.ts.map +0 -1
- package/dist/src/utils/project/components/utils.js +0 -8
- package/dist/src/utils/project/components/utils.js.map +0 -1
- package/dist/src/utils/project/loadSchema.d.ts +0 -4
- package/dist/src/utils/project/loadSchema.d.ts.map +0 -1
- package/dist/src/utils/project/loadSchema.js +0 -14
- package/dist/src/utils/project/loadSchema.js.map +0 -1
- package/dist/src/utils/project/projectDescribe.d.ts.map +0 -1
- package/dist/src/utils/project/projectDescribe.js +0 -29
- package/dist/src/utils/project/projectDescribe.js.map +0 -1
- package/dist/src/utils/project/resources/out.css +0 -824
- package/dist/src/utils/schema/collectReferences.d.ts.map +0 -1
- package/dist/src/utils/schema/collectReferences.js +0 -35
- package/dist/src/utils/schema/collectReferences.js.map +0 -1
- package/dist/src/utils/schema.d.ts +0 -5
- package/dist/src/utils/schema.d.ts.map +0 -1
- package/dist/src/utils/schema.js +0 -22
- package/dist/src/utils/schema.js.map +0 -1
- package/dist/src/utils/stdio.d.ts.map +0 -1
- package/dist/src/utils/stdio.js +0 -13
- package/dist/src/utils/stdio.js.map +0 -1
- package/dist/src/utils/stream.d.ts +0 -9
- package/dist/src/utils/stream.d.ts.map +0 -1
- package/dist/src/utils/stream.js +0 -41
- package/dist/src/utils/stream.js.map +0 -1
- package/dist/src/utils/tenant.d.ts +0 -66
- package/dist/src/utils/tenant.d.ts.map +0 -1
- package/dist/src/utils/tenant.js +0 -355
- package/dist/src/utils/tenant.js.map +0 -1
- package/dist/src/utils/token.d.ts +0 -2
- package/dist/src/utils/token.d.ts.map +0 -1
- package/dist/src/utils/token.js +0 -6
- package/dist/src/utils/token.js.map +0 -1
- package/dist/src/utils/tuple.d.ts +0 -2
- package/dist/src/utils/tuple.d.ts.map +0 -1
- package/dist/src/utils/tuple.js +0 -6
- package/dist/src/utils/tuple.js.map +0 -1
- package/dist/src/utils/workspace.d.ts +0 -3
- package/dist/src/utils/workspace.d.ts.map +0 -1
- package/dist/src/utils/workspace.js +0 -25
- package/dist/src/utils/workspace.js.map +0 -1
- package/dist/src/utils/yaml.d.ts +0 -8
- package/dist/src/utils/yaml.d.ts.map +0 -1
- package/dist/src/utils/yaml.js +0 -33
- package/dist/src/utils/yaml.js.map +0 -1
- package/esbuild.js +0 -15
- package/src/.eslintrc.js +0 -5
- package/src/commands/migrations/MigrationValidationHelper.ts +0 -36
- package/src/commands/migrations/SystemApiClientResolver.ts +0 -22
- package/src/commands/project/ProjectGenerateDocumentation.ts +0 -49
- package/src/commands/tenant/CreateApiKeyCommand.ts +0 -40
- package/src/commands/tenant/InviteCommand.ts +0 -38
- package/src/commands/tenant/ResetPasswordCommand.ts +0 -36
- package/src/commands/tenant/SignInCommand.ts +0 -38
- package/src/commands/tenant/index.ts +0 -4
- package/src/utils/admin.ts +0 -45
- package/src/utils/checkVersions.ts +0 -58
- package/src/utils/dockerCompose.ts +0 -58
- package/src/utils/dsn.ts +0 -13
- package/src/utils/esbuild.ts +0 -14
- package/src/utils/instance/environment.ts +0 -4
- package/src/utils/instance/index.ts +0 -2
- package/src/utils/instance/interactiveUtils.ts +0 -39
- package/src/utils/migrations/MigrationCreateHelper.ts +0 -59
- package/src/utils/migrations/MigrationExecuteHelper.ts +0 -115
- package/src/utils/migrations/MigrationsContainer.ts +0 -80
- package/src/utils/migrations/migrations.ts +0 -80
- package/src/utils/project/components/EntityInfo.tsx +0 -82
- package/src/utils/project/components/OnDelete.tsx +0 -72
- package/src/utils/project/components/ProjectInfo.tsx +0 -48
- package/src/utils/project/loadSchema.ts +0 -14
- package/src/utils/project/projectDescribe.tsx +0 -26
- package/src/utils/schema.ts +0 -19
- package/src/utils/tenant.ts +0 -434
- package/src/utils/tuple.ts +0 -1
- package/src/utils/workspace.ts +0 -21
- package/src/utils/yaml.ts +0 -36
- /package/dist/{src → types}/commands/deploy/index.d.ts +0 -0
- /package/dist/{src → types}/commands/deploy/index.d.ts.map +0 -0
- /package/dist/{src → types}/commands/migrations/index.d.ts +0 -0
- /package/dist/{src → types}/commands/migrations/index.d.ts.map +0 -0
- /package/dist/{src → types}/commands/misc/index.d.ts +0 -0
- /package/dist/{src → types}/commands/misc/index.d.ts.map +0 -0
- /package/dist/{src → types}/commands/transfer/index.d.ts +0 -0
- /package/dist/{src → types}/commands/transfer/index.d.ts.map +0 -0
- /package/dist/{src → types}/commands/workspace/index.d.ts +0 -0
- /package/dist/{src → types}/commands/workspace/index.d.ts.map +0 -0
- /package/dist/{src/utils → types/lib}/assertNever.d.ts +0 -0
- /package/dist/{src/utils → types/lib}/dsn.d.ts +0 -0
- /package/dist/{src/utils/project → types/lib/project/docs}/components/EntityLink.d.ts +0 -0
- /package/dist/{src/utils/project → types/lib/project/docs}/components/FieldType.d.ts +0 -0
- /package/dist/{src/utils/project → types/lib/project/docs}/components/ProjectInfo.d.ts +0 -0
- /package/dist/{src/utils/project → types/lib/project/docs}/components/utils.d.ts +0 -0
- /package/dist/{src/utils/project → types/lib/project/docs}/projectDescribe.d.ts +0 -0
- /package/dist/{src/utils → types/lib}/schema/collectReferences.d.ts +0 -0
- /package/dist/{src/utils → types/lib/transfer}/stdio.d.ts +0 -0
- /package/dist/{src → types}/run.d.ts +0 -0
- /package/dist/{src → types}/run.d.ts.map +0 -0
- /package/src/{utils → lib}/assertNever.ts +0 -0
- /package/src/{utils/token.ts → lib/maskToken.ts} +0 -0
- /package/src/{utils/project → lib/project/docs}/components/EntityLink.tsx +0 -0
- /package/src/{utils/project → lib/project/docs}/components/FieldLink.tsx +0 -0
- /package/src/{utils/project → lib/project/docs}/components/FieldPermissions.tsx +0 -0
- /package/src/{utils/project → lib/project/docs}/components/FieldType.tsx +0 -0
- /package/src/{utils/project → lib/project/docs}/components/SinglePermission.tsx +0 -0
- /package/src/{utils/project → lib/project/docs}/components/utils.ts +0 -0
- /package/src/{utils/project → lib/project/docs}/resources/style.css +0 -0
- /package/src/{utils → lib}/schema/collectReferences.ts +0 -0
- /package/src/{utils → lib}/stream.ts +0 -0
- /package/src/{utils → lib/transfer}/stdio.ts +0 -0
package/src/dic.ts
ADDED
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { Builder } from '@contember/dic'
|
|
2
|
+
import {
|
|
3
|
+
JsLoader,
|
|
4
|
+
JsonLoader,
|
|
5
|
+
MigrationCreator,
|
|
6
|
+
MigrationDescriber,
|
|
7
|
+
MigrationExecutor,
|
|
8
|
+
MigrationFilesManager,
|
|
9
|
+
MigrationParser,
|
|
10
|
+
MigrationsResolver,
|
|
11
|
+
MigrationsStatusResolver,
|
|
12
|
+
ModificationHandlerFactory,
|
|
13
|
+
SchemaDiffer,
|
|
14
|
+
SchemaMigrator,
|
|
15
|
+
SchemaVersionBuilder,
|
|
16
|
+
VERSION_LATEST,
|
|
17
|
+
} from '@contember/migrations-client'
|
|
18
|
+
import { JsCodeRunner } from './lib/js/JsCodeRunner'
|
|
19
|
+
import { EsBuildBuilder } from './lib/js/EsBuildBuilder'
|
|
20
|
+
import { EvalExecutor } from './lib/js/EvalExecutor'
|
|
21
|
+
import { AdminDeployer } from './lib/admin/AdminDeployer'
|
|
22
|
+
import { RemoteProjectResolver } from './lib/project/RemoteProjectResolver'
|
|
23
|
+
import { CliEnv } from './lib/env'
|
|
24
|
+
import { AdminClient } from './lib/admin/AdminClient'
|
|
25
|
+
import { FileSystem } from './lib/fs/FileSystem'
|
|
26
|
+
import { WorkspaceResolver } from './lib/workspace/WorkspaceResolver'
|
|
27
|
+
import { YamlHandler } from './lib/fs/YamlHandler'
|
|
28
|
+
import {
|
|
29
|
+
DeployCommand,
|
|
30
|
+
MigrationAmendCommand,
|
|
31
|
+
MigrationBlankCommand,
|
|
32
|
+
MigrationDescribeCommand,
|
|
33
|
+
MigrationDiffCommand,
|
|
34
|
+
MigrationExecuteCommand,
|
|
35
|
+
MigrationRebaseCommand,
|
|
36
|
+
MigrationStatusCommand,
|
|
37
|
+
ProjectGenerateDocumentationCommand,
|
|
38
|
+
ProjectPrintSchemaCommand,
|
|
39
|
+
ProjectValidateCommand,
|
|
40
|
+
VersionCommand,
|
|
41
|
+
WorkspaceUpdateApiCommand,
|
|
42
|
+
} from './commands'
|
|
43
|
+
import { MigrationExecutionFacade } from './lib/migrations/MigrationExecutionFacade'
|
|
44
|
+
import { MigrationPrinter } from './lib/migrations/MigrationPrinter'
|
|
45
|
+
import { MigrationsStatusFacade } from './lib/migrations/MigrationsStatusFacade'
|
|
46
|
+
import { ImportSchemaLoader, SchemaLoader, TranspilingSchemaLoader } from './lib/schema/SchemaLoader'
|
|
47
|
+
import { MigrationsValidator } from './lib/migrations/MigrationsValidator'
|
|
48
|
+
import { MigrationRebaseFacade } from './lib/migrations/MigrationRebaseFacade'
|
|
49
|
+
import { DataTransferClient } from './lib/transfer/DataTransferClient'
|
|
50
|
+
import { ExportCommand, ImportCommand, TransferCommand } from './commands/transfer'
|
|
51
|
+
import {
|
|
52
|
+
Application,
|
|
53
|
+
CommandFactoryList,
|
|
54
|
+
CommandManager,
|
|
55
|
+
CommandRunner,
|
|
56
|
+
Npm,
|
|
57
|
+
PackageWorkspaceResolver,
|
|
58
|
+
Pnpm,
|
|
59
|
+
Yarn,
|
|
60
|
+
YarnClassic,
|
|
61
|
+
} from '@contember/cli-common'
|
|
62
|
+
import { VersionChecker } from './lib/VersionChecker'
|
|
63
|
+
import { DockerComposeManager } from './lib/fs/DockerComposeManager'
|
|
64
|
+
import { RemoteProjectProvider } from './lib/project/RemoteProjectProvider'
|
|
65
|
+
import { SystemClientProvider } from './lib/SystemClientProvider'
|
|
66
|
+
import { TenantClientProvider } from './lib/TenantClientProvider'
|
|
67
|
+
import { Workspace } from './lib/workspace/Workspace'
|
|
68
|
+
|
|
69
|
+
const jsSample = `
|
|
70
|
+
export const query = \`\`
|
|
71
|
+
export const variables = {}
|
|
72
|
+
|
|
73
|
+
// or multiple queries
|
|
74
|
+
// export const queries = []
|
|
75
|
+
|
|
76
|
+
// or a factory
|
|
77
|
+
// export default async () => ({ queries: [] })
|
|
78
|
+
`
|
|
79
|
+
|
|
80
|
+
export const createContainer = ({ env, version, runtime, workspace }: {
|
|
81
|
+
workspace: Workspace
|
|
82
|
+
env: CliEnv
|
|
83
|
+
version: string
|
|
84
|
+
runtime: 'node' | 'bun'
|
|
85
|
+
}) => {
|
|
86
|
+
return new Builder({})
|
|
87
|
+
.addService('env', () =>
|
|
88
|
+
env)
|
|
89
|
+
.addService('version', () =>
|
|
90
|
+
version)
|
|
91
|
+
.addService('runtime', () =>
|
|
92
|
+
runtime)
|
|
93
|
+
.addService('workspace', () =>
|
|
94
|
+
workspace)
|
|
95
|
+
.addService('fs', () =>
|
|
96
|
+
new FileSystem())
|
|
97
|
+
.addService('yamlHandler', ({ fs }) =>
|
|
98
|
+
new YamlHandler(fs))
|
|
99
|
+
.addService('jsExecutor', () =>
|
|
100
|
+
new EvalExecutor())
|
|
101
|
+
.addService('jsBuilder', () =>
|
|
102
|
+
new EsBuildBuilder())
|
|
103
|
+
.addService('jsCodeRunner', ({ jsExecutor, jsBuilder }) =>
|
|
104
|
+
new JsCodeRunner(jsBuilder, jsExecutor))
|
|
105
|
+
|
|
106
|
+
.addService('workspaceResolver', ({ yamlHandler }) =>
|
|
107
|
+
new WorkspaceResolver(yamlHandler))
|
|
108
|
+
|
|
109
|
+
.addService('remoteProjectResolver', ({ env }) =>
|
|
110
|
+
new RemoteProjectResolver(env))
|
|
111
|
+
.addService('remoteProjectProvider', ({ remoteProjectResolver }) => {
|
|
112
|
+
const provider = new RemoteProjectProvider()
|
|
113
|
+
const remoteProject = remoteProjectResolver.resolve()
|
|
114
|
+
if (remoteProject) {
|
|
115
|
+
provider.setRemoteProject(remoteProject)
|
|
116
|
+
}
|
|
117
|
+
return provider
|
|
118
|
+
})
|
|
119
|
+
.addService('systemClientProvider', ({ remoteProjectProvider }) =>
|
|
120
|
+
new SystemClientProvider(remoteProjectProvider))
|
|
121
|
+
.addService('tenantClientProvider', ({ remoteProjectProvider }) =>
|
|
122
|
+
new TenantClientProvider(remoteProjectProvider))
|
|
123
|
+
.addService('adminClient', ({ remoteProjectProvider }) =>
|
|
124
|
+
new AdminClient(remoteProjectProvider))
|
|
125
|
+
.addService('migrationFilesManager', ({ jsCodeRunner, workspace }) => {
|
|
126
|
+
const runJs = runtime === 'bun' ? (file: string) => import(file) : jsCodeRunner.run
|
|
127
|
+
return new MigrationFilesManager(workspace.migrationsDir, {
|
|
128
|
+
json: new JsonLoader(new MigrationParser()),
|
|
129
|
+
ts: new JsLoader(new MigrationParser(), runJs),
|
|
130
|
+
js: new JsLoader(new MigrationParser(), runJs),
|
|
131
|
+
})
|
|
132
|
+
})
|
|
133
|
+
.addService('packageWorkspaceResolver', ({ workspace, fs }) => {
|
|
134
|
+
const commandRunner = new CommandRunner()
|
|
135
|
+
return new PackageWorkspaceResolver(workspace.baseDir, fs, [
|
|
136
|
+
new Yarn(fs, commandRunner),
|
|
137
|
+
new YarnClassic(fs, commandRunner),
|
|
138
|
+
new Pnpm(fs, commandRunner),
|
|
139
|
+
new Npm(fs, commandRunner),
|
|
140
|
+
])
|
|
141
|
+
})
|
|
142
|
+
.addService('dockerComposeManager', ({ workspace, env, fs, yamlHandler }) =>
|
|
143
|
+
new DockerComposeManager(workspace.baseDir, env.dockerComposeFile, fs, yamlHandler))
|
|
144
|
+
.addService('modificationHandlerFactory', () =>
|
|
145
|
+
new ModificationHandlerFactory(ModificationHandlerFactory.defaultFactoryMap))
|
|
146
|
+
.addService('schemaMigrator', ({ modificationHandlerFactory }) =>
|
|
147
|
+
new SchemaMigrator(modificationHandlerFactory))
|
|
148
|
+
.addService('migrationsResolver', ({ migrationFilesManager }) =>
|
|
149
|
+
new MigrationsResolver(migrationFilesManager))
|
|
150
|
+
.addService('schemaVersionBuilder', ({ migrationsResolver, schemaMigrator }) =>
|
|
151
|
+
new SchemaVersionBuilder(migrationsResolver, schemaMigrator))
|
|
152
|
+
.addService('schemaDiffer', ({ schemaMigrator }) =>
|
|
153
|
+
new SchemaDiffer(schemaMigrator))
|
|
154
|
+
.addService('migrationCreator', ({ migrationFilesManager, schemaDiffer }) =>
|
|
155
|
+
new MigrationCreator(migrationFilesManager, schemaDiffer, {
|
|
156
|
+
json: JSON.stringify({ formatVersion: VERSION_LATEST, modifications: [] }, undefined, '\t') + '\n',
|
|
157
|
+
ts: jsSample,
|
|
158
|
+
js: jsSample,
|
|
159
|
+
}))
|
|
160
|
+
.addService('migrationDescriber', ({ modificationHandlerFactory }) =>
|
|
161
|
+
new MigrationDescriber(modificationHandlerFactory))
|
|
162
|
+
.addService('migrationPrinter', ({ migrationDescriber }) =>
|
|
163
|
+
new MigrationPrinter(migrationDescriber))
|
|
164
|
+
.addService('migrationsExecutor', () =>
|
|
165
|
+
new MigrationExecutor())
|
|
166
|
+
.addService('migrationsStatusResolver', () =>
|
|
167
|
+
new MigrationsStatusResolver())
|
|
168
|
+
.addService('migrationsStatusFacade', ({ systemClientProvider, migrationsResolver, migrationsStatusResolver }) =>
|
|
169
|
+
new MigrationsStatusFacade(systemClientProvider, migrationsResolver, migrationsStatusResolver))
|
|
170
|
+
.addService('migrationExecutionFacade', ({ systemClientProvider, tenantClientProvider, remoteProjectProvider, schemaVersionBuilder, migrationPrinter, migrationsExecutor, migrationsStatusFacade }) =>
|
|
171
|
+
new MigrationExecutionFacade(systemClientProvider, tenantClientProvider, remoteProjectProvider, schemaVersionBuilder, migrationPrinter, migrationsExecutor, migrationsStatusFacade))
|
|
172
|
+
.addService('migrationsValidator', ({ migrationDescriber, schemaMigrator }) =>
|
|
173
|
+
new MigrationsValidator(migrationDescriber, schemaMigrator))
|
|
174
|
+
.addService('migrationRebaseFacade', ({ schemaVersionBuilder, migrationsValidator, systemClientProvider, migrationFilesManager }) =>
|
|
175
|
+
new MigrationRebaseFacade(schemaVersionBuilder, migrationsValidator, systemClientProvider, migrationFilesManager))
|
|
176
|
+
.addService('schemaLoader', ({ workspace, jsCodeRunner, runtime }) =>
|
|
177
|
+
runtime === 'bun' ? new ImportSchemaLoader(workspace) : new TranspilingSchemaLoader(workspace, jsCodeRunner))
|
|
178
|
+
|
|
179
|
+
.addService('adminDeployer', ({ remoteProjectProvider, adminClient, fs }) =>
|
|
180
|
+
new AdminDeployer(remoteProjectProvider, adminClient, fs))
|
|
181
|
+
.addService('dataTransferClient', () =>
|
|
182
|
+
new DataTransferClient())
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
.addService('deployCommand', ({ adminDeployer, migrationExecutionFacade, fs, remoteProjectProvider, remoteProjectResolver, workspace }) =>
|
|
186
|
+
new DeployCommand(adminDeployer, migrationExecutionFacade, fs, remoteProjectProvider, remoteProjectResolver, workspace))
|
|
187
|
+
.addService('migrationAmendCommand', ({ migrationsResolver, systemClientProvider, migrationsStatusFacade, schemaLoader, schemaVersionBuilder, migrationCreator, migrationsValidator, migrationPrinter, schemaMigrator }) =>
|
|
188
|
+
new MigrationAmendCommand(migrationsResolver, systemClientProvider, migrationsStatusFacade, schemaLoader, schemaVersionBuilder, migrationCreator, migrationsValidator, migrationPrinter, schemaMigrator))
|
|
189
|
+
.addService('migrationBlankCommand', ({ migrationCreator }) =>
|
|
190
|
+
new MigrationBlankCommand(migrationCreator))
|
|
191
|
+
.addService('migrationDescribeCommand', ({ migrationPrinter, schemaVersionBuilder, migrationsResolver }) =>
|
|
192
|
+
new MigrationDescribeCommand(migrationPrinter, schemaVersionBuilder, migrationsResolver))
|
|
193
|
+
.addService('migrationDiffCommand', ({ schemaLoader, schemaVersionBuilder, migrationCreator, migrationPrinter, migrationExecutionFacade }) =>
|
|
194
|
+
new MigrationDiffCommand(schemaLoader, schemaVersionBuilder, migrationCreator, migrationPrinter, migrationExecutionFacade))
|
|
195
|
+
.addService('migrationExecuteCommand', ({ migrationExecutionFacade }) =>
|
|
196
|
+
new MigrationExecuteCommand(migrationExecutionFacade))
|
|
197
|
+
.addService('migrationRebaseCommand', ({ migrationsResolver, migrationRebaseFacade }) =>
|
|
198
|
+
new MigrationRebaseCommand(migrationsResolver, migrationRebaseFacade))
|
|
199
|
+
.addService('migrationStatusCommand', ({ migrationsStatusFacade, migrationFilesManager, systemClientProvider, migrationPrinter }) =>
|
|
200
|
+
new MigrationStatusCommand(migrationsStatusFacade, migrationFilesManager, systemClientProvider, migrationPrinter))
|
|
201
|
+
.addService('versionCommand', ({ version }) =>
|
|
202
|
+
new VersionCommand(version))
|
|
203
|
+
.addService('projectGenerateDocumentationCommand', ({ schemaLoader }) =>
|
|
204
|
+
new ProjectGenerateDocumentationCommand(schemaLoader))
|
|
205
|
+
.addService('projectPrintSchemaCommand', ({ schemaLoader, schemaVersionBuilder }) =>
|
|
206
|
+
new ProjectPrintSchemaCommand(schemaLoader, schemaVersionBuilder))
|
|
207
|
+
.addService('projectValidateCommand', ({ schemaLoader, migrationsValidator, migrationsResolver, schemaDiffer, schemaVersionBuilder }) =>
|
|
208
|
+
new ProjectValidateCommand(schemaLoader, migrationsValidator, migrationsResolver, schemaDiffer, schemaVersionBuilder))
|
|
209
|
+
.addService('exportCommand', ({ dataTransferClient, remoteProjectResolver }) =>
|
|
210
|
+
new ExportCommand(remoteProjectResolver, dataTransferClient))
|
|
211
|
+
.addService('importCommand', ({ dataTransferClient, remoteProjectResolver }) =>
|
|
212
|
+
new ImportCommand(remoteProjectResolver, dataTransferClient))
|
|
213
|
+
.addService('transferCommand', ({ dataTransferClient, remoteProjectResolver }) =>
|
|
214
|
+
new TransferCommand(remoteProjectResolver, dataTransferClient))
|
|
215
|
+
.addService('workspaceUpdateCommand', ({ packageWorkspaceResolver, dockerComposeManager }) =>
|
|
216
|
+
new WorkspaceUpdateApiCommand(packageWorkspaceResolver, dockerComposeManager))
|
|
217
|
+
.addService('commandList', dic => {
|
|
218
|
+
const commands: CommandFactoryList = {
|
|
219
|
+
['deploy']: () => dic.deployCommand,
|
|
220
|
+
['version']: () => dic.versionCommand,
|
|
221
|
+
['data:export']: () => dic.exportCommand,
|
|
222
|
+
['data:import']: () => dic.importCommand,
|
|
223
|
+
['data:transfer']: () => dic.transferCommand,
|
|
224
|
+
['migrations:diff']: () => dic.migrationDiffCommand,
|
|
225
|
+
['migrations:amend']: () => dic.migrationAmendCommand,
|
|
226
|
+
['migrations:blank']: () => dic.migrationBlankCommand,
|
|
227
|
+
['migrations:describe']: () => dic.migrationDescribeCommand,
|
|
228
|
+
['migrations:execute']: () => dic.migrationExecuteCommand,
|
|
229
|
+
['migrations:rebase']: () => dic.migrationRebaseCommand,
|
|
230
|
+
['migrations:status']: () => dic.migrationStatusCommand,
|
|
231
|
+
['workspace:update:api']: () => dic.workspaceUpdateCommand,
|
|
232
|
+
['project:validate']: () => dic.projectValidateCommand,
|
|
233
|
+
['project:print-schema']: () => dic.projectPrintSchemaCommand,
|
|
234
|
+
['project:generate-doc']: () => dic.projectGenerateDocumentationCommand,
|
|
235
|
+
}
|
|
236
|
+
return commands
|
|
237
|
+
})
|
|
238
|
+
.addService('commandManager', ({ commandList }) =>
|
|
239
|
+
new CommandManager(commandList))
|
|
240
|
+
|
|
241
|
+
.addService('versionChecker', ({ version, workspace, packageWorkspaceResolver, dockerComposeManager }) =>
|
|
242
|
+
new VersionChecker(version, workspace.baseDir, packageWorkspaceResolver, dockerComposeManager))
|
|
243
|
+
.addService('application', ({ commandManager, versionChecker }) => {
|
|
244
|
+
const app = new Application(
|
|
245
|
+
commandManager,
|
|
246
|
+
`Contember CLI version ${version}`,
|
|
247
|
+
{
|
|
248
|
+
beforeRun: async ({ name }) => {
|
|
249
|
+
if (!process.env.CONTEMBER_SKIP_VERSION_CHECK && !['deploy', 'version', 'data:export', 'data:import', 'data:transfer'].includes(name)) {
|
|
250
|
+
await versionChecker.checkVersions()
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
)
|
|
255
|
+
return app
|
|
256
|
+
})
|
|
257
|
+
.build()
|
|
258
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RemoteProjectProvider } from './project/RemoteProjectProvider'
|
|
2
|
+
import { SystemClient } from '@contember/migrations-client'
|
|
3
|
+
|
|
4
|
+
export class SystemClientProvider {
|
|
5
|
+
constructor(
|
|
6
|
+
private readonly remoteProjectProvider: RemoteProjectProvider,
|
|
7
|
+
) {
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
public get(): SystemClient {
|
|
11
|
+
const project = this.remoteProjectProvider.get()
|
|
12
|
+
return SystemClient.create(project.endpoint, project.name, project.token)
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TenantClient } from './tenant/TenantClient'
|
|
2
|
+
import { RemoteProjectProvider } from './project/RemoteProjectProvider'
|
|
3
|
+
|
|
4
|
+
export class TenantClientProvider {
|
|
5
|
+
constructor(
|
|
6
|
+
private readonly remoteProjectProvider: RemoteProjectProvider,
|
|
7
|
+
) {
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
public get(): TenantClient {
|
|
11
|
+
const project = this.remoteProjectProvider.get()
|
|
12
|
+
return TenantClient.create(project.endpoint, project.token)
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { join, relative } from 'node:path'
|
|
2
|
+
import * as semver from 'semver'
|
|
3
|
+
import { PackageWorkspaceResolver } from '@contember/cli-common'
|
|
4
|
+
import { DockerComposeManager } from './fs/DockerComposeManager'
|
|
5
|
+
import { contemberDockerImages } from '../consts'
|
|
6
|
+
|
|
7
|
+
export class VersionChecker {
|
|
8
|
+
constructor(
|
|
9
|
+
private readonly version: string,
|
|
10
|
+
private readonly dir: string,
|
|
11
|
+
private readonly packageWorkspaceResolver: PackageWorkspaceResolver,
|
|
12
|
+
private readonly dockerComposeManager: DockerComposeManager,
|
|
13
|
+
) {
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
checkVersions = async () => {
|
|
17
|
+
const cliVersion = this.version
|
|
18
|
+
const packageWorkspace = await this.packageWorkspaceResolver.resolve()
|
|
19
|
+
|
|
20
|
+
const errors: string[] = []
|
|
21
|
+
|
|
22
|
+
for (const packageName of ['@contember/schema', '@contember/schema-definition']) {
|
|
23
|
+
const installedPackages = await packageWorkspace.findInstalledDependencies(packageName)
|
|
24
|
+
for (const pckg of installedPackages) {
|
|
25
|
+
const jsonPath = relative(this.dir, join(pckg.defined.pckg.dir, 'package.json'))
|
|
26
|
+
|
|
27
|
+
if (!pckg.installed) {
|
|
28
|
+
errors.push(`Package ${packageName} defined in ${jsonPath} is not installed.`)
|
|
29
|
+
continue
|
|
30
|
+
}
|
|
31
|
+
if (pckg.defined.version !== 'workspace:*' && !semver.satisfies(pckg.installed.version, pckg.defined.version)) {
|
|
32
|
+
errors.push(`Package ${packageName}@${pckg.installed.version} does not match constraint ${pckg.defined.version} defined in ${jsonPath}.`)
|
|
33
|
+
continue
|
|
34
|
+
}
|
|
35
|
+
if (cliVersion !== pckg.installed.version) {
|
|
36
|
+
errors.push(`Package ${packageName}@${pckg.installed.version} does not match version of CLI ${cliVersion}.`)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
const dockerCompose = await this.dockerComposeManager.tryReadMainDockerComposeConfig()
|
|
41
|
+
|
|
42
|
+
if (!dockerCompose) {
|
|
43
|
+
errors.push('docker-compose.yaml not found.')
|
|
44
|
+
} else {
|
|
45
|
+
for (const [name, def] of Object.entries(dockerCompose.services ?? {})) {
|
|
46
|
+
if (!def.image) {
|
|
47
|
+
continue
|
|
48
|
+
}
|
|
49
|
+
const [image, version] = def.image.split(':')
|
|
50
|
+
if (!version || !contemberDockerImages.includes(image)) {
|
|
51
|
+
continue
|
|
52
|
+
}
|
|
53
|
+
const versionParts = version.split(/[.-]/)
|
|
54
|
+
if (versionParts[versionParts.length - 1] === 'debian') {
|
|
55
|
+
versionParts.pop()
|
|
56
|
+
}
|
|
57
|
+
const cliVersionParts = cliVersion.split(/[.-]/).slice(0, versionParts.length)
|
|
58
|
+
if (versionParts.join('.') !== cliVersionParts.join('.')) {
|
|
59
|
+
errors.push(`Docker service ${name} with image ${image}:${version} does not match version of CLI ${cliVersion}.`)
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (errors.length) {
|
|
65
|
+
throw `${errors.map(it => `${it}`).join('\n')}
|
|
66
|
+
|
|
67
|
+
Please make sure all dependencies are up to date.\nIf you are really certain about the compatibility, you can disable this version check by running the CLI with the CONTEMBER_SKIP_VERSION_CHECK=1 environment variable`
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { maskToken } from '../maskToken'
|
|
2
|
+
import { RemoteProjectProvider } from '../project/RemoteProjectProvider'
|
|
3
|
+
|
|
4
|
+
export type AdminFiles = Array<{ path: string; data: string }>
|
|
5
|
+
export class AdminClient {
|
|
6
|
+
constructor(
|
|
7
|
+
private readonly remoteProjectProvider: RemoteProjectProvider,
|
|
8
|
+
) {
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public async deploy(project: string | null, files: AdminFiles): Promise<void> {
|
|
12
|
+
const response = await this.execute('_deploy', 'POST', { project, files })
|
|
13
|
+
|
|
14
|
+
if (!response.ok) {
|
|
15
|
+
const project = this.remoteProjectProvider.get()
|
|
16
|
+
const maskedToken = maskToken(project.token)
|
|
17
|
+
throw `Failed to deploy admin, POST request to ${project.endpoint}/_deploy with token ${maskedToken} returned status ${response.status} ${response.statusText}\n${await response.text()}`
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
private async execute(path: string, method: string, body: any): Promise<Response> {
|
|
22
|
+
const project = this.remoteProjectProvider.get()
|
|
23
|
+
if (!project.adminEndpoint) {
|
|
24
|
+
throw new Error('Admin endpoint not set')
|
|
25
|
+
}
|
|
26
|
+
return await fetch(`${project.adminEndpoint}/${path}`, {
|
|
27
|
+
method: method,
|
|
28
|
+
headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${project.token}` },
|
|
29
|
+
body: JSON.stringify(body),
|
|
30
|
+
})
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { AdminClient, AdminFiles } from './AdminClient'
|
|
2
|
+
import { FileSystem } from '../fs/FileSystem'
|
|
3
|
+
import { RemoteProjectProvider } from '../project/RemoteProjectProvider'
|
|
4
|
+
|
|
5
|
+
export class AdminDeployer {
|
|
6
|
+
constructor(
|
|
7
|
+
private readonly remoteProjectProvider: RemoteProjectProvider,
|
|
8
|
+
private readonly adminClient: AdminClient,
|
|
9
|
+
private readonly fs: FileSystem,
|
|
10
|
+
) {
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public deploy = async ({ dir, root }: {
|
|
14
|
+
dir: string
|
|
15
|
+
root: boolean
|
|
16
|
+
}) => {
|
|
17
|
+
console.log('Deploying admin...')
|
|
18
|
+
const files = await this.readAdminFiles(dir)
|
|
19
|
+
const project = root ? null : this.remoteProjectProvider.get().name
|
|
20
|
+
|
|
21
|
+
// in some cases you need deploy whole folder with custom build etc.
|
|
22
|
+
// with root option you can build app on your own and simply deploy it with subprojects
|
|
23
|
+
await this.adminClient.deploy(project, files)
|
|
24
|
+
|
|
25
|
+
console.log(`Admin deployed (${files.length} files)`)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
private readAdminFiles = async (dir: string, prefix: string = ''): Promise<AdminFiles> => {
|
|
30
|
+
const files = []
|
|
31
|
+
for (const fileName of await this.fs.readDir(dir, { withFileTypes: true })) {
|
|
32
|
+
if (fileName.isDirectory()) {
|
|
33
|
+
const subFiles = await this.readAdminFiles(`${dir}/${fileName.name}`, prefix + fileName.name + '/')
|
|
34
|
+
files.push(...subFiles)
|
|
35
|
+
} else if (fileName.isFile()) {
|
|
36
|
+
files.push({
|
|
37
|
+
path: prefix + fileName.name,
|
|
38
|
+
data: (await this.fs.readFile(`${dir}/${fileName.name}`)).toString('base64'),
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return files
|
|
44
|
+
}
|
|
45
|
+
}
|
package/src/lib/dsn.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { URL } from 'node:url'
|
|
2
|
+
|
|
3
|
+
export const parseDsn = (dsn: string): { endpoint: string; project: string; token: string } => {
|
|
4
|
+
const uri = new URL(dsn)
|
|
5
|
+
if (uri.protocol !== 'contember:' && uri.protocol !== 'contember-unsecure:') {
|
|
6
|
+
throw 'Invalid DSN'
|
|
7
|
+
}
|
|
8
|
+
return {
|
|
9
|
+
project: uri.username,
|
|
10
|
+
token: uri.password,
|
|
11
|
+
endpoint: (uri.protocol === 'contember-unsecure:' ? 'http://' : 'https://') + uri.host,
|
|
12
|
+
}
|
|
13
|
+
}
|
package/src/lib/env.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface CliEnv {
|
|
2
|
+
apiToken?: string
|
|
3
|
+
loginToken?: string
|
|
4
|
+
apiUrl?: string
|
|
5
|
+
projectName?: string
|
|
6
|
+
dockerComposeFile?: string
|
|
7
|
+
dsn?: string
|
|
8
|
+
dir?: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const readCliEnv = (): CliEnv => {
|
|
12
|
+
return {
|
|
13
|
+
dir: process.env.CONTEMBER_DIR,
|
|
14
|
+
apiToken: process.env.CONTEMBER_API_TOKEN,
|
|
15
|
+
loginToken: process.env.CONTEMBER_LOGIN_TOKEN,
|
|
16
|
+
apiUrl: process.env.CONTEMBER_API_URL ?? process.env.CONTEMBER_INSTANCE,
|
|
17
|
+
projectName: process.env.CONTEMBER_PROJECT_NAME,
|
|
18
|
+
dockerComposeFile: process.env.COMPOSE_FILE,
|
|
19
|
+
dsn: process.env.CONTEMBER_DSN,
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { dirname, join } from 'node:path'
|
|
2
|
+
import jsyaml from 'js-yaml'
|
|
3
|
+
import { FileSystem } from './FileSystem'
|
|
4
|
+
import { JsonUpdateCallback, YamlHandler } from './YamlHandler'
|
|
5
|
+
|
|
6
|
+
export interface DockerComposeServiceConfig {
|
|
7
|
+
image?: string
|
|
8
|
+
command?: string
|
|
9
|
+
user?: string
|
|
10
|
+
environment?: Record<string, string>
|
|
11
|
+
ports?: (string | {})[] // todo long syntax
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface DockerComposeConfig {
|
|
15
|
+
[key: string]: unknown
|
|
16
|
+
|
|
17
|
+
version?: string
|
|
18
|
+
services?: Record<string, DockerComposeServiceConfig>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
const MAIN_CONFIGS = ['docker-compose.yaml', 'docker-compose.yml']
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
export class DockerComposeManager {
|
|
26
|
+
constructor(
|
|
27
|
+
private readonly dir: string,
|
|
28
|
+
private readonly composeFile: string | undefined,
|
|
29
|
+
private readonly fs: FileSystem,
|
|
30
|
+
private readonly yamlHandler: YamlHandler,
|
|
31
|
+
) {
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
tryReadMainDockerComposeConfig = async (dir: string = this.dir): Promise<DockerComposeConfig | null> => {
|
|
35
|
+
const path = await this.resolvePath(dir, MAIN_CONFIGS)
|
|
36
|
+
if (!path) {
|
|
37
|
+
if (dir === '/') {
|
|
38
|
+
return null
|
|
39
|
+
}
|
|
40
|
+
return await this.tryReadMainDockerComposeConfig(dirname(dir))
|
|
41
|
+
}
|
|
42
|
+
return jsyaml.load(await this.fs.readFile(path, 'utf8')) as DockerComposeConfig
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
updateMainDockerComposeConfig = async (
|
|
46
|
+
updater: JsonUpdateCallback<DockerComposeConfig>,
|
|
47
|
+
dir: string = this.dir,
|
|
48
|
+
): Promise<void> => {
|
|
49
|
+
const path = this.composeFile || (await this.resolvePath(dir, MAIN_CONFIGS)) || join(dir, MAIN_CONFIGS[0])
|
|
50
|
+
return this.yamlHandler.updateYaml(path, updater, { createMissing: true })
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
private resolvePath = async (dir: string, possibleFileNames: string[]): Promise<string | null> => {
|
|
54
|
+
for (const file of possibleFileNames) {
|
|
55
|
+
const path = join(dir, file)
|
|
56
|
+
if (await this.fs.pathExists(path)) {
|
|
57
|
+
return path
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return null
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as fs from 'node:fs/promises'
|
|
2
|
+
import { access } from 'node:fs/promises'
|
|
3
|
+
import glob from 'fast-glob'
|
|
4
|
+
|
|
5
|
+
export class FileSystem {
|
|
6
|
+
readDir = fs.readdir
|
|
7
|
+
readFile = fs.readFile
|
|
8
|
+
pathExists = async (path: string) => {
|
|
9
|
+
try {
|
|
10
|
+
await access(path)
|
|
11
|
+
return true
|
|
12
|
+
} catch {
|
|
13
|
+
return false
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
listDirectories = async (dir: string, patterns: string[]): Promise<string[]> => {
|
|
17
|
+
return await glob(patterns, { onlyDirectories: true, cwd: dir })
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { readFile, writeFile } from 'node:fs/promises'
|
|
2
|
+
import jsyaml from 'js-yaml'
|
|
3
|
+
import { FileSystem } from './FileSystem'
|
|
4
|
+
import YAWN from 'yawn-yaml'
|
|
5
|
+
import { JSONObject, JSONPrimitive } from '../json'
|
|
6
|
+
import { Merger } from '@contember/config-loader'
|
|
7
|
+
|
|
8
|
+
export type JsonUpdateCallback<Value = JSONObject> = (
|
|
9
|
+
data: Partial<Value>,
|
|
10
|
+
utils: { merge: (a: JSONObject, b: JSONObject) => JSONObject },
|
|
11
|
+
) => Value
|
|
12
|
+
|
|
13
|
+
export class YamlHandler {
|
|
14
|
+
constructor(
|
|
15
|
+
private readonly fs: FileSystem,
|
|
16
|
+
) {
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
readYaml = async <T = unknown>(path: string): Promise<T> => {
|
|
20
|
+
const content = await this.fs.readFile(path, { encoding: 'utf8' })
|
|
21
|
+
return jsyaml.load(content) as unknown as T
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
tryReadYaml = async <T = unknown>(path: string): Promise<T | null> => {
|
|
25
|
+
try {
|
|
26
|
+
return await this.readYaml<T>(path)
|
|
27
|
+
} catch (e: any) {
|
|
28
|
+
if (e.code === 'ENOENT') {
|
|
29
|
+
return null
|
|
30
|
+
}
|
|
31
|
+
throw e
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
updateYaml = async <Value = JSONObject>(
|
|
36
|
+
path: string,
|
|
37
|
+
updater: JsonUpdateCallback<Value>,
|
|
38
|
+
options: { createMissing?: boolean } = {},
|
|
39
|
+
) => {
|
|
40
|
+
let config = ''
|
|
41
|
+
if (await this.fs.pathExists(path)) {
|
|
42
|
+
config = await readFile(path, { encoding: 'utf8' })
|
|
43
|
+
} else if (options.createMissing !== true) {
|
|
44
|
+
throw new Error(`File ${path} does not exist.`)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
let newConfig = ''
|
|
48
|
+
const mergeUtils = { merge: (a: JSONObject, b: JSONObject) => Merger.merge<JSONPrimitive>(a, b) }
|
|
49
|
+
if (config) {
|
|
50
|
+
const yawn = new YAWN(config)
|
|
51
|
+
yawn.json = updater(yawn.json, mergeUtils)
|
|
52
|
+
newConfig = yawn.yaml
|
|
53
|
+
} else {
|
|
54
|
+
newConfig = jsyaml.dump(updater({}, mergeUtils))
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
await writeFile(path, newConfig, { encoding: 'utf8' })
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { JsBuilder } from './JsBuilder'
|
|
2
|
+
import * as esbuild from 'esbuild'
|
|
3
|
+
|
|
4
|
+
export class EsBuildBuilder implements JsBuilder {
|
|
5
|
+
async build(path: string): Promise<string> {
|
|
6
|
+
const response = await esbuild.build({
|
|
7
|
+
entryPoints: [path],
|
|
8
|
+
platform: 'node',
|
|
9
|
+
bundle: true,
|
|
10
|
+
treeShaking: true,
|
|
11
|
+
write: false,
|
|
12
|
+
loader: { '.sql': 'text' },
|
|
13
|
+
external: ['@contember/admin', 'react', 'react/jsx-runtime'],
|
|
14
|
+
})
|
|
15
|
+
return response.outputFiles[0].text
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { JsExecutor } from './JsExecutor'
|
|
2
|
+
|
|
3
|
+
export class EvalExecutor implements JsExecutor {
|
|
4
|
+
public async execute(code: string): Promise<unknown> {
|
|
5
|
+
const fn = new Function(`var module = {}; ((module) => { ${code} })(module); return module`)
|
|
6
|
+
return fn().exports
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { JsBuilder } from './JsBuilder'
|
|
2
|
+
import { JsExecutor } from './JsExecutor'
|
|
3
|
+
|
|
4
|
+
export class JsCodeRunner {
|
|
5
|
+
constructor(
|
|
6
|
+
private readonly jsBuilder: JsBuilder,
|
|
7
|
+
private readonly jsExecutor: JsExecutor,
|
|
8
|
+
) {
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
run = async (path: string): Promise<unknown> => {
|
|
12
|
+
const builtCode = await this.jsBuilder.build(path)
|
|
13
|
+
return this.jsExecutor.execute(builtCode)
|
|
14
|
+
}
|
|
15
|
+
}
|