@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
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { Builder } from "@contember/dic";
|
|
2
|
+
import { MigrationFilesManager, JsonLoader, MigrationParser, JsLoader, ModificationHandlerFactory, SchemaMigrator, MigrationsResolver, SchemaVersionBuilder, SchemaDiffer, MigrationCreator, VERSION_LATEST, MigrationDescriber, MigrationExecutor, MigrationsStatusResolver } from "@contember/migrations-client";
|
|
3
|
+
import { JsCodeRunner } from "./lib/js/JsCodeRunner.js";
|
|
4
|
+
import { EsBuildBuilder } from "./lib/js/EsBuildBuilder.js";
|
|
5
|
+
import { EvalExecutor } from "./lib/js/EvalExecutor.js";
|
|
6
|
+
import { AdminDeployer } from "./lib/admin/AdminDeployer.js";
|
|
7
|
+
import { RemoteProjectResolver } from "./lib/project/RemoteProjectResolver.js";
|
|
8
|
+
import { AdminClient } from "./lib/admin/AdminClient.js";
|
|
9
|
+
import { FileSystem } from "./lib/fs/FileSystem.js";
|
|
10
|
+
import { WorkspaceResolver } from "./lib/workspace/WorkspaceResolver.js";
|
|
11
|
+
import { YamlHandler } from "./lib/fs/YamlHandler.js";
|
|
12
|
+
import { DeployCommand } from "./commands/deploy/DeployCommand.js";
|
|
13
|
+
import { MigrationAmendCommand } from "./commands/migrations/MigrationAmendCommand.js";
|
|
14
|
+
import { MigrationBlankCommand } from "./commands/migrations/MigrationBlankCommand.js";
|
|
15
|
+
import { MigrationDescribeCommand } from "./commands/migrations/MigrationDescribeCommand.js";
|
|
16
|
+
import { MigrationDiffCommand } from "./commands/migrations/MigrationDiffCommand.js";
|
|
17
|
+
import { MigrationExecuteCommand } from "./commands/migrations/MigrationExecuteCommand.js";
|
|
18
|
+
import { MigrationStatusCommand } from "./commands/migrations/MigrationStatusCommand.js";
|
|
19
|
+
import { MigrationRebaseCommand } from "./commands/migrations/MigrationRebaseCommand.js";
|
|
20
|
+
import { VersionCommand } from "./commands/misc/VersionCommand.js";
|
|
21
|
+
import { ProjectGenerateDocumentationCommand } from "./commands/project/ProjectGenerateDocumentationCommand.js";
|
|
22
|
+
import { ProjectPrintSchemaCommand } from "./commands/project/ProjectPrintSchemaCommand.js";
|
|
23
|
+
import { ProjectValidateCommand } from "./commands/project/ProjectValidateCommand.js";
|
|
24
|
+
import { WorkspaceUpdateApiCommand } from "./commands/workspace/WorkspaceUpdateApiCommand.js";
|
|
25
|
+
import { MigrationExecutionFacade } from "./lib/migrations/MigrationExecutionFacade.js";
|
|
26
|
+
import { MigrationPrinter } from "./lib/migrations/MigrationPrinter.js";
|
|
27
|
+
import { MigrationsStatusFacade } from "./lib/migrations/MigrationsStatusFacade.js";
|
|
28
|
+
import { ImportSchemaLoader, TranspilingSchemaLoader } from "./lib/schema/SchemaLoader.js";
|
|
29
|
+
import { MigrationsValidator } from "./lib/migrations/MigrationsValidator.js";
|
|
30
|
+
import { MigrationRebaseFacade } from "./lib/migrations/MigrationRebaseFacade.js";
|
|
31
|
+
import { DataTransferClient } from "./lib/transfer/DataTransferClient.js";
|
|
32
|
+
import { ExportCommand } from "./commands/transfer/ExportCommand.js";
|
|
33
|
+
import { ImportCommand } from "./commands/transfer/ImportCommand.js";
|
|
34
|
+
import { TransferCommand } from "./commands/transfer/TransferCommand.js";
|
|
35
|
+
import { CommandRunner, PackageWorkspaceResolver, Yarn, YarnClassic, Pnpm, Npm, CommandManager, Application } from "@contember/cli-common";
|
|
36
|
+
import { VersionChecker } from "./lib/VersionChecker.js";
|
|
37
|
+
import { DockerComposeManager } from "./lib/fs/DockerComposeManager.js";
|
|
38
|
+
import { RemoteProjectProvider } from "./lib/project/RemoteProjectProvider.js";
|
|
39
|
+
import { SystemClientProvider } from "./lib/SystemClientProvider.js";
|
|
40
|
+
import { TenantClientProvider } from "./lib/TenantClientProvider.js";
|
|
41
|
+
const jsSample = `
|
|
42
|
+
export const query = \`\`
|
|
43
|
+
export const variables = {}
|
|
44
|
+
|
|
45
|
+
// or multiple queries
|
|
46
|
+
// export const queries = []
|
|
47
|
+
|
|
48
|
+
// or a factory
|
|
49
|
+
// export default async () => ({ queries: [] })
|
|
50
|
+
`;
|
|
51
|
+
const createContainer = ({ env, version, runtime, workspace }) => {
|
|
52
|
+
return new Builder({}).addService("env", () => env).addService("version", () => version).addService("runtime", () => runtime).addService("workspace", () => workspace).addService("fs", () => new FileSystem()).addService("yamlHandler", ({ fs }) => new YamlHandler(fs)).addService("jsExecutor", () => new EvalExecutor()).addService("jsBuilder", () => new EsBuildBuilder()).addService("jsCodeRunner", ({ jsExecutor, jsBuilder }) => new JsCodeRunner(jsBuilder, jsExecutor)).addService("workspaceResolver", ({ yamlHandler }) => new WorkspaceResolver(yamlHandler)).addService("remoteProjectResolver", ({ env: env2 }) => new RemoteProjectResolver(env2)).addService("remoteProjectProvider", ({ remoteProjectResolver }) => {
|
|
53
|
+
const provider = new RemoteProjectProvider();
|
|
54
|
+
const remoteProject = remoteProjectResolver.resolve();
|
|
55
|
+
if (remoteProject) {
|
|
56
|
+
provider.setRemoteProject(remoteProject);
|
|
57
|
+
}
|
|
58
|
+
return provider;
|
|
59
|
+
}).addService("systemClientProvider", ({ remoteProjectProvider }) => new SystemClientProvider(remoteProjectProvider)).addService("tenantClientProvider", ({ remoteProjectProvider }) => new TenantClientProvider(remoteProjectProvider)).addService("adminClient", ({ remoteProjectProvider }) => new AdminClient(remoteProjectProvider)).addService("migrationFilesManager", ({ jsCodeRunner, workspace: workspace2 }) => {
|
|
60
|
+
const runJs = runtime === "bun" ? (file) => import(file) : jsCodeRunner.run;
|
|
61
|
+
return new MigrationFilesManager(workspace2.migrationsDir, {
|
|
62
|
+
json: new JsonLoader(new MigrationParser()),
|
|
63
|
+
ts: new JsLoader(new MigrationParser(), runJs),
|
|
64
|
+
js: new JsLoader(new MigrationParser(), runJs)
|
|
65
|
+
});
|
|
66
|
+
}).addService("packageWorkspaceResolver", ({ workspace: workspace2, fs }) => {
|
|
67
|
+
const commandRunner = new CommandRunner();
|
|
68
|
+
return new PackageWorkspaceResolver(workspace2.baseDir, fs, [
|
|
69
|
+
new Yarn(fs, commandRunner),
|
|
70
|
+
new YarnClassic(fs, commandRunner),
|
|
71
|
+
new Pnpm(fs, commandRunner),
|
|
72
|
+
new Npm(fs, commandRunner)
|
|
73
|
+
]);
|
|
74
|
+
}).addService("dockerComposeManager", ({ workspace: workspace2, env: env2, fs, yamlHandler }) => new DockerComposeManager(workspace2.baseDir, env2.dockerComposeFile, fs, yamlHandler)).addService("modificationHandlerFactory", () => new ModificationHandlerFactory(ModificationHandlerFactory.defaultFactoryMap)).addService("schemaMigrator", ({ modificationHandlerFactory }) => new SchemaMigrator(modificationHandlerFactory)).addService("migrationsResolver", ({ migrationFilesManager }) => new MigrationsResolver(migrationFilesManager)).addService("schemaVersionBuilder", ({ migrationsResolver, schemaMigrator }) => new SchemaVersionBuilder(migrationsResolver, schemaMigrator)).addService("schemaDiffer", ({ schemaMigrator }) => new SchemaDiffer(schemaMigrator)).addService("migrationCreator", ({ migrationFilesManager, schemaDiffer }) => new MigrationCreator(migrationFilesManager, schemaDiffer, {
|
|
75
|
+
json: JSON.stringify({ formatVersion: VERSION_LATEST, modifications: [] }, void 0, " ") + "\n",
|
|
76
|
+
ts: jsSample,
|
|
77
|
+
js: jsSample
|
|
78
|
+
})).addService("migrationDescriber", ({ modificationHandlerFactory }) => new MigrationDescriber(modificationHandlerFactory)).addService("migrationPrinter", ({ migrationDescriber }) => new MigrationPrinter(migrationDescriber)).addService("migrationsExecutor", () => new MigrationExecutor()).addService("migrationsStatusResolver", () => new MigrationsStatusResolver()).addService("migrationsStatusFacade", ({ systemClientProvider, migrationsResolver, migrationsStatusResolver }) => new MigrationsStatusFacade(systemClientProvider, migrationsResolver, migrationsStatusResolver)).addService("migrationExecutionFacade", ({ systemClientProvider, tenantClientProvider, remoteProjectProvider, schemaVersionBuilder, migrationPrinter, migrationsExecutor, migrationsStatusFacade }) => new MigrationExecutionFacade(systemClientProvider, tenantClientProvider, remoteProjectProvider, schemaVersionBuilder, migrationPrinter, migrationsExecutor, migrationsStatusFacade)).addService("migrationsValidator", ({ migrationDescriber, schemaMigrator }) => new MigrationsValidator(migrationDescriber, schemaMigrator)).addService("migrationRebaseFacade", ({ schemaVersionBuilder, migrationsValidator, systemClientProvider, migrationFilesManager }) => new MigrationRebaseFacade(schemaVersionBuilder, migrationsValidator, systemClientProvider, migrationFilesManager)).addService("schemaLoader", ({ workspace: workspace2, jsCodeRunner, runtime: runtime2 }) => runtime2 === "bun" ? new ImportSchemaLoader(workspace2) : new TranspilingSchemaLoader(workspace2, jsCodeRunner)).addService("adminDeployer", ({ remoteProjectProvider, adminClient, fs }) => new AdminDeployer(remoteProjectProvider, adminClient, fs)).addService("dataTransferClient", () => new DataTransferClient()).addService("deployCommand", ({ adminDeployer, migrationExecutionFacade, fs, remoteProjectProvider, remoteProjectResolver, workspace: workspace2 }) => new DeployCommand(adminDeployer, migrationExecutionFacade, fs, remoteProjectProvider, remoteProjectResolver, workspace2)).addService("migrationAmendCommand", ({ migrationsResolver, systemClientProvider, migrationsStatusFacade, schemaLoader, schemaVersionBuilder, migrationCreator, migrationsValidator, migrationPrinter, schemaMigrator }) => new MigrationAmendCommand(migrationsResolver, systemClientProvider, migrationsStatusFacade, schemaLoader, schemaVersionBuilder, migrationCreator, migrationsValidator, migrationPrinter, schemaMigrator)).addService("migrationBlankCommand", ({ migrationCreator }) => new MigrationBlankCommand(migrationCreator)).addService("migrationDescribeCommand", ({ migrationPrinter, schemaVersionBuilder, migrationsResolver }) => new MigrationDescribeCommand(migrationPrinter, schemaVersionBuilder, migrationsResolver)).addService("migrationDiffCommand", ({ schemaLoader, schemaVersionBuilder, migrationCreator, migrationPrinter, migrationExecutionFacade }) => new MigrationDiffCommand(schemaLoader, schemaVersionBuilder, migrationCreator, migrationPrinter, migrationExecutionFacade)).addService("migrationExecuteCommand", ({ migrationExecutionFacade }) => new MigrationExecuteCommand(migrationExecutionFacade)).addService("migrationRebaseCommand", ({ migrationsResolver, migrationRebaseFacade }) => new MigrationRebaseCommand(migrationsResolver, migrationRebaseFacade)).addService("migrationStatusCommand", ({ migrationsStatusFacade, migrationFilesManager, systemClientProvider, migrationPrinter }) => new MigrationStatusCommand(migrationsStatusFacade, migrationFilesManager, systemClientProvider, migrationPrinter)).addService("versionCommand", ({ version: version2 }) => new VersionCommand(version2)).addService("projectGenerateDocumentationCommand", ({ schemaLoader }) => new ProjectGenerateDocumentationCommand(schemaLoader)).addService("projectPrintSchemaCommand", ({ schemaLoader, schemaVersionBuilder }) => new ProjectPrintSchemaCommand(schemaLoader, schemaVersionBuilder)).addService("projectValidateCommand", ({ schemaLoader, migrationsValidator, migrationsResolver, schemaDiffer, schemaVersionBuilder }) => new ProjectValidateCommand(schemaLoader, migrationsValidator, migrationsResolver, schemaDiffer, schemaVersionBuilder)).addService("exportCommand", ({ dataTransferClient, remoteProjectResolver }) => new ExportCommand(remoteProjectResolver, dataTransferClient)).addService("importCommand", ({ dataTransferClient, remoteProjectResolver }) => new ImportCommand(remoteProjectResolver, dataTransferClient)).addService("transferCommand", ({ dataTransferClient, remoteProjectResolver }) => new TransferCommand(remoteProjectResolver, dataTransferClient)).addService("workspaceUpdateCommand", ({ packageWorkspaceResolver, dockerComposeManager }) => new WorkspaceUpdateApiCommand(packageWorkspaceResolver, dockerComposeManager)).addService("commandList", (dic) => {
|
|
79
|
+
const commands = {
|
|
80
|
+
["deploy"]: () => dic.deployCommand,
|
|
81
|
+
["version"]: () => dic.versionCommand,
|
|
82
|
+
["data:export"]: () => dic.exportCommand,
|
|
83
|
+
["data:import"]: () => dic.importCommand,
|
|
84
|
+
["data:transfer"]: () => dic.transferCommand,
|
|
85
|
+
["migrations:diff"]: () => dic.migrationDiffCommand,
|
|
86
|
+
["migrations:amend"]: () => dic.migrationAmendCommand,
|
|
87
|
+
["migrations:blank"]: () => dic.migrationBlankCommand,
|
|
88
|
+
["migrations:describe"]: () => dic.migrationDescribeCommand,
|
|
89
|
+
["migrations:execute"]: () => dic.migrationExecuteCommand,
|
|
90
|
+
["migrations:rebase"]: () => dic.migrationRebaseCommand,
|
|
91
|
+
["migrations:status"]: () => dic.migrationStatusCommand,
|
|
92
|
+
["workspace:update:api"]: () => dic.workspaceUpdateCommand,
|
|
93
|
+
["project:validate"]: () => dic.projectValidateCommand,
|
|
94
|
+
["project:print-schema"]: () => dic.projectPrintSchemaCommand,
|
|
95
|
+
["project:generate-doc"]: () => dic.projectGenerateDocumentationCommand
|
|
96
|
+
};
|
|
97
|
+
return commands;
|
|
98
|
+
}).addService("commandManager", ({ commandList }) => new CommandManager(commandList)).addService("versionChecker", ({ version: version2, workspace: workspace2, packageWorkspaceResolver, dockerComposeManager }) => new VersionChecker(version2, workspace2.baseDir, packageWorkspaceResolver, dockerComposeManager)).addService("application", ({ commandManager, versionChecker }) => {
|
|
99
|
+
const app = new Application(
|
|
100
|
+
commandManager,
|
|
101
|
+
`Contember CLI version ${version}`,
|
|
102
|
+
{
|
|
103
|
+
beforeRun: async ({ name }) => {
|
|
104
|
+
if (!process.env.CONTEMBER_SKIP_VERSION_CHECK && !["deploy", "version", "data:export", "data:import", "data:transfer"].includes(name)) {
|
|
105
|
+
await versionChecker.checkVersions();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
return app;
|
|
111
|
+
}).build();
|
|
112
|
+
};
|
|
113
|
+
export {
|
|
114
|
+
createContainer
|
|
115
|
+
};
|
|
116
|
+
//# sourceMappingURL=dic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dic.js","sources":["../../../../packages/cli/src/dic.ts"],"sourcesContent":["import { Builder } from '@contember/dic'\nimport {\n\tJsLoader,\n\tJsonLoader,\n\tMigrationCreator,\n\tMigrationDescriber,\n\tMigrationExecutor,\n\tMigrationFilesManager,\n\tMigrationParser,\n\tMigrationsResolver,\n\tMigrationsStatusResolver,\n\tModificationHandlerFactory,\n\tSchemaDiffer,\n\tSchemaMigrator,\n\tSchemaVersionBuilder,\n\tVERSION_LATEST,\n} from '@contember/migrations-client'\nimport { JsCodeRunner } from './lib/js/JsCodeRunner'\nimport { EsBuildBuilder } from './lib/js/EsBuildBuilder'\nimport { EvalExecutor } from './lib/js/EvalExecutor'\nimport { AdminDeployer } from './lib/admin/AdminDeployer'\nimport { RemoteProjectResolver } from './lib/project/RemoteProjectResolver'\nimport { CliEnv } from './lib/env'\nimport { AdminClient } from './lib/admin/AdminClient'\nimport { FileSystem } from './lib/fs/FileSystem'\nimport { WorkspaceResolver } from './lib/workspace/WorkspaceResolver'\nimport { YamlHandler } from './lib/fs/YamlHandler'\nimport {\n\tDeployCommand,\n\tMigrationAmendCommand,\n\tMigrationBlankCommand,\n\tMigrationDescribeCommand,\n\tMigrationDiffCommand,\n\tMigrationExecuteCommand,\n\tMigrationRebaseCommand,\n\tMigrationStatusCommand,\n\tProjectGenerateDocumentationCommand,\n\tProjectPrintSchemaCommand,\n\tProjectValidateCommand,\n\tVersionCommand,\n\tWorkspaceUpdateApiCommand,\n} from './commands'\nimport { MigrationExecutionFacade } from './lib/migrations/MigrationExecutionFacade'\nimport { MigrationPrinter } from './lib/migrations/MigrationPrinter'\nimport { MigrationsStatusFacade } from './lib/migrations/MigrationsStatusFacade'\nimport { ImportSchemaLoader, SchemaLoader, TranspilingSchemaLoader } from './lib/schema/SchemaLoader'\nimport { MigrationsValidator } from './lib/migrations/MigrationsValidator'\nimport { MigrationRebaseFacade } from './lib/migrations/MigrationRebaseFacade'\nimport { DataTransferClient } from './lib/transfer/DataTransferClient'\nimport { ExportCommand, ImportCommand, TransferCommand } from './commands/transfer'\nimport {\n\tApplication,\n\tCommandFactoryList,\n\tCommandManager,\n\tCommandRunner,\n\tNpm,\n\tPackageWorkspaceResolver,\n\tPnpm,\n\tYarn,\n\tYarnClassic,\n} from '@contember/cli-common'\nimport { VersionChecker } from './lib/VersionChecker'\nimport { DockerComposeManager } from './lib/fs/DockerComposeManager'\nimport { RemoteProjectProvider } from './lib/project/RemoteProjectProvider'\nimport { SystemClientProvider } from './lib/SystemClientProvider'\nimport { TenantClientProvider } from './lib/TenantClientProvider'\nimport { Workspace } from './lib/workspace/Workspace'\n\nconst jsSample = `\nexport const query = \\`\\`\nexport const variables = {}\n\n// or multiple queries\n// export const queries = []\n\n// or a factory\n// export default async () => ({ queries: [] })\n`\n\nexport const createContainer = ({ env, version, runtime, workspace }: {\n\tworkspace: Workspace\n\tenv: CliEnv\n\tversion: string\n\truntime: 'node' | 'bun'\n}) => {\n\treturn new Builder({})\n\t\t.addService('env', () =>\n\t\t\tenv)\n\t\t.addService('version', () =>\n\t\t\tversion)\n\t\t.addService('runtime', () =>\n\t\t\truntime)\n\t\t.addService('workspace', () =>\n\t\t\tworkspace)\n\t\t.addService('fs', () =>\n\t\t\tnew FileSystem())\n\t\t.addService('yamlHandler', ({ fs }) =>\n\t\t\tnew YamlHandler(fs))\n\t\t.addService('jsExecutor', () =>\n\t\t\tnew EvalExecutor())\n\t\t.addService('jsBuilder', () =>\n\t\t\tnew EsBuildBuilder())\n\t\t.addService('jsCodeRunner', ({ jsExecutor, jsBuilder }) =>\n\t\t\tnew JsCodeRunner(jsBuilder, jsExecutor))\n\n\t\t.addService('workspaceResolver', ({ yamlHandler }) =>\n\t\t\tnew WorkspaceResolver(yamlHandler))\n\n\t\t.addService('remoteProjectResolver', ({ env }) =>\n\t\t\tnew RemoteProjectResolver(env))\n\t\t.addService('remoteProjectProvider', ({ remoteProjectResolver }) => {\n\t\t\tconst provider = new RemoteProjectProvider()\n\t\t\tconst remoteProject = remoteProjectResolver.resolve()\n\t\t\tif (remoteProject) {\n\t\t\t\tprovider.setRemoteProject(remoteProject)\n\t\t\t}\n\t\t\treturn provider\n\t\t})\n\t\t.addService('systemClientProvider', ({ remoteProjectProvider }) =>\n\t\t\tnew SystemClientProvider(remoteProjectProvider))\n\t\t.addService('tenantClientProvider', ({ remoteProjectProvider }) =>\n\t\t\tnew TenantClientProvider(remoteProjectProvider))\n\t\t.addService('adminClient', ({ remoteProjectProvider }) =>\n\t\t\tnew AdminClient(remoteProjectProvider))\n\t\t.addService('migrationFilesManager', ({ jsCodeRunner, workspace }) => {\n\t\t\tconst runJs = runtime === 'bun' ? (file: string) => import(file) : jsCodeRunner.run\n\t\t\treturn new MigrationFilesManager(workspace.migrationsDir, {\n\t\t\t\tjson: new JsonLoader(new MigrationParser()),\n\t\t\t\tts: new JsLoader(new MigrationParser(), runJs),\n\t\t\t\tjs: new JsLoader(new MigrationParser(), runJs),\n\t\t\t})\n\t\t})\n\t\t.addService('packageWorkspaceResolver', ({ workspace, fs }) => {\n\t\t\tconst commandRunner = new CommandRunner()\n\t\t\treturn new PackageWorkspaceResolver(workspace.baseDir, fs, [\n\t\t\t\tnew Yarn(fs, commandRunner),\n\t\t\t\tnew YarnClassic(fs, commandRunner),\n\t\t\t\tnew Pnpm(fs, commandRunner),\n\t\t\t\tnew Npm(fs, commandRunner),\n\t\t\t])\n\t\t})\n\t\t.addService('dockerComposeManager', ({ workspace, env, fs, yamlHandler }) =>\n\t\t\tnew DockerComposeManager(workspace.baseDir, env.dockerComposeFile, fs, yamlHandler))\n\t\t.addService('modificationHandlerFactory', () =>\n\t\t\tnew ModificationHandlerFactory(ModificationHandlerFactory.defaultFactoryMap))\n\t\t.addService('schemaMigrator', ({ modificationHandlerFactory }) =>\n\t\t\tnew SchemaMigrator(modificationHandlerFactory))\n\t\t.addService('migrationsResolver', ({ migrationFilesManager }) =>\n\t\t\tnew MigrationsResolver(migrationFilesManager))\n\t\t.addService('schemaVersionBuilder', ({ migrationsResolver, schemaMigrator }) =>\n\t\t\tnew SchemaVersionBuilder(migrationsResolver, schemaMigrator))\n\t\t.addService('schemaDiffer', ({ schemaMigrator }) =>\n\t\t\tnew SchemaDiffer(schemaMigrator))\n\t\t.addService('migrationCreator', ({ migrationFilesManager, schemaDiffer }) =>\n\t\t\tnew MigrationCreator(migrationFilesManager, schemaDiffer, {\n\t\t\t\tjson: JSON.stringify({ formatVersion: VERSION_LATEST, modifications: [] }, undefined, '\\t') + '\\n',\n\t\t\t\tts: jsSample,\n\t\t\t\tjs: jsSample,\n\t\t\t}))\n\t\t.addService('migrationDescriber', ({ modificationHandlerFactory }) =>\n\t\t\tnew MigrationDescriber(modificationHandlerFactory))\n\t\t.addService('migrationPrinter', ({ migrationDescriber }) =>\n\t\t\tnew MigrationPrinter(migrationDescriber))\n\t\t.addService('migrationsExecutor', () =>\n\t\t\tnew MigrationExecutor())\n\t\t.addService('migrationsStatusResolver', () =>\n\t\t\tnew MigrationsStatusResolver())\n\t\t.addService('migrationsStatusFacade', ({ systemClientProvider, migrationsResolver, migrationsStatusResolver }) =>\n\t\t\tnew MigrationsStatusFacade(systemClientProvider, migrationsResolver, migrationsStatusResolver))\n\t\t.addService('migrationExecutionFacade', ({ systemClientProvider, tenantClientProvider, remoteProjectProvider, schemaVersionBuilder, migrationPrinter, migrationsExecutor, migrationsStatusFacade }) =>\n\t\t\tnew MigrationExecutionFacade(systemClientProvider, tenantClientProvider, remoteProjectProvider, schemaVersionBuilder, migrationPrinter, migrationsExecutor, migrationsStatusFacade))\n\t\t.addService('migrationsValidator', ({ migrationDescriber, schemaMigrator }) =>\n\t\t\tnew MigrationsValidator(migrationDescriber, schemaMigrator))\n\t\t.addService('migrationRebaseFacade', ({ schemaVersionBuilder, migrationsValidator, systemClientProvider, migrationFilesManager }) =>\n\t\t\tnew MigrationRebaseFacade(schemaVersionBuilder, migrationsValidator, systemClientProvider, migrationFilesManager))\n\t\t.addService('schemaLoader', ({ workspace, jsCodeRunner, runtime }) =>\n\t\t\truntime === 'bun' ? new ImportSchemaLoader(workspace) : new TranspilingSchemaLoader(workspace, jsCodeRunner))\n\n\t\t.addService('adminDeployer', ({ remoteProjectProvider, adminClient, fs }) =>\n\t\t\tnew AdminDeployer(remoteProjectProvider, adminClient, fs))\n\t\t.addService('dataTransferClient', () =>\n\t\t\tnew DataTransferClient())\n\n\n\t\t.addService('deployCommand', ({ adminDeployer, migrationExecutionFacade, fs, remoteProjectProvider, remoteProjectResolver, workspace }) =>\n\t\t \tnew DeployCommand(adminDeployer, migrationExecutionFacade, fs, remoteProjectProvider, remoteProjectResolver, workspace))\n\t\t.addService('migrationAmendCommand', ({ migrationsResolver, systemClientProvider, migrationsStatusFacade, schemaLoader, schemaVersionBuilder, migrationCreator, migrationsValidator, migrationPrinter, schemaMigrator }) =>\n\t\t\tnew MigrationAmendCommand(migrationsResolver, systemClientProvider, migrationsStatusFacade, schemaLoader, schemaVersionBuilder, migrationCreator, migrationsValidator, migrationPrinter, schemaMigrator))\n\t\t.addService('migrationBlankCommand', ({ migrationCreator }) =>\n\t\t\tnew MigrationBlankCommand(migrationCreator))\n\t\t.addService('migrationDescribeCommand', ({ migrationPrinter, schemaVersionBuilder, migrationsResolver }) =>\n\t\t\tnew MigrationDescribeCommand(migrationPrinter, schemaVersionBuilder, migrationsResolver))\n\t\t.addService('migrationDiffCommand', ({ schemaLoader, schemaVersionBuilder, migrationCreator, migrationPrinter, migrationExecutionFacade }) =>\n\t\t\tnew MigrationDiffCommand(schemaLoader, schemaVersionBuilder, migrationCreator, migrationPrinter, migrationExecutionFacade))\n\t\t.addService('migrationExecuteCommand', ({ migrationExecutionFacade }) =>\n\t\t\tnew MigrationExecuteCommand(migrationExecutionFacade))\n\t\t.addService('migrationRebaseCommand', ({ migrationsResolver, migrationRebaseFacade }) =>\n\t\t\tnew MigrationRebaseCommand(migrationsResolver, migrationRebaseFacade))\n\t\t.addService('migrationStatusCommand', ({ migrationsStatusFacade, migrationFilesManager, systemClientProvider, migrationPrinter }) =>\n\t\t\tnew MigrationStatusCommand(migrationsStatusFacade, migrationFilesManager, systemClientProvider, migrationPrinter))\n\t\t.addService('versionCommand', ({ version }) =>\n\t\t\tnew VersionCommand(version))\n\t\t.addService('projectGenerateDocumentationCommand', ({ schemaLoader }) =>\n\t\t\tnew ProjectGenerateDocumentationCommand(schemaLoader))\n\t\t.addService('projectPrintSchemaCommand', ({ schemaLoader, schemaVersionBuilder }) =>\n\t\t\tnew ProjectPrintSchemaCommand(schemaLoader, schemaVersionBuilder))\n\t\t.addService('projectValidateCommand', ({ schemaLoader, migrationsValidator, migrationsResolver, schemaDiffer, schemaVersionBuilder }) =>\n\t\t\tnew ProjectValidateCommand(schemaLoader, migrationsValidator, migrationsResolver, schemaDiffer, schemaVersionBuilder))\n\t\t.addService('exportCommand', ({ dataTransferClient, remoteProjectResolver }) =>\n\t\t\tnew ExportCommand(remoteProjectResolver, dataTransferClient))\n\t\t.addService('importCommand', ({ dataTransferClient, remoteProjectResolver }) =>\n\t\t\tnew ImportCommand(remoteProjectResolver, dataTransferClient))\n\t\t.addService('transferCommand', ({ dataTransferClient, remoteProjectResolver }) =>\n\t\t\tnew TransferCommand(remoteProjectResolver, dataTransferClient))\n\t\t.addService('workspaceUpdateCommand', ({ packageWorkspaceResolver, dockerComposeManager }) =>\n\t\t\tnew WorkspaceUpdateApiCommand(packageWorkspaceResolver, dockerComposeManager))\n\t\t.addService('commandList', dic => {\n\t\t\tconst commands: CommandFactoryList = {\n\t\t\t\t['deploy']: () => dic.deployCommand,\n\t\t\t\t['version']: () => dic.versionCommand,\n\t\t\t\t['data:export']: () => dic.exportCommand,\n\t\t\t\t['data:import']: () => dic.importCommand,\n\t\t\t\t['data:transfer']: () => dic.transferCommand,\n\t\t\t\t['migrations:diff']: () => dic.migrationDiffCommand,\n\t\t\t\t['migrations:amend']: () => dic.migrationAmendCommand,\n\t\t\t\t['migrations:blank']: () => dic.migrationBlankCommand,\n\t\t\t\t['migrations:describe']: () => dic.migrationDescribeCommand,\n\t\t\t\t['migrations:execute']: () => dic.migrationExecuteCommand,\n\t\t\t\t['migrations:rebase']: () => dic.migrationRebaseCommand,\n\t\t\t\t['migrations:status']: () => dic.migrationStatusCommand,\n\t\t\t\t['workspace:update:api']: () => dic.workspaceUpdateCommand,\n\t\t\t\t['project:validate']: () => dic.projectValidateCommand,\n\t\t\t\t['project:print-schema']: () => dic.projectPrintSchemaCommand,\n\t\t\t\t['project:generate-doc']: () => dic.projectGenerateDocumentationCommand,\n\t\t\t}\n\t\t\treturn commands\n\t\t})\n\t\t.addService('commandManager', ({ commandList }) =>\n\t\t\tnew CommandManager(commandList))\n\n\t\t.addService('versionChecker', ({ version, workspace, packageWorkspaceResolver, dockerComposeManager }) =>\n\t\t\tnew VersionChecker(version, workspace.baseDir, packageWorkspaceResolver, dockerComposeManager))\n\t\t.addService('application', ({ commandManager, versionChecker }) => {\n\t\t\tconst app = new Application(\n\t\t\t\tcommandManager,\n\t\t\t\t`Contember CLI version ${version}`,\n\t\t\t\t{\n\t\t\t\t\tbeforeRun: async ({ name }) => {\n\t\t\t\t\t\tif (!process.env.CONTEMBER_SKIP_VERSION_CHECK && !['deploy', 'version', 'data:export', 'data:import', 'data:transfer'].includes(name)) {\n\t\t\t\t\t\t\tawait versionChecker.checkVersions()\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t)\n\t\t\treturn app\n\t\t})\n\t\t.build()\n}\n"],"names":["env","workspace","runtime","version"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoEA,MAAM,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWV,MAAM,kBAAkB,CAAC,EAAE,KAAK,SAAS,SAAS,gBAKnD;AACE,SAAA,IAAI,QAAQ,EAAE,EACnB,WAAW,OAAO,MAClB,GAAG,EACH,WAAW,WAAW,MACtB,OAAO,EACP,WAAW,WAAW,MACtB,OAAO,EACP,WAAW,aAAa,MACxB,SAAS,EACT,WAAW,MAAM,MACjB,IAAI,YAAY,EAChB,WAAW,eAAe,CAAC,EAAE,GAC7B,MAAA,IAAI,YAAY,EAAE,CAAC,EACnB,WAAW,cAAc,MACzB,IAAI,aAAa,CAAC,EAClB,WAAW,aAAa,MACxB,IAAI,eAAgB,CAAA,EACpB,WAAW,gBAAgB,CAAC,EAAE,YAAY,UAAU,MACpD,IAAI,aAAa,WAAW,UAAU,CAAC,EAEvC,WAAW,qBAAqB,CAAC,EAAE,kBACnC,IAAI,kBAAkB,WAAW,CAAC,EAElC,WAAW,yBAAyB,CAAC,EAAE,KAAAA,WACvC,IAAI,sBAAsBA,IAAG,CAAC,EAC9B,WAAW,yBAAyB,CAAC,EAAE,4BAA4B;AAC7D,UAAA,WAAW,IAAI;AACf,UAAA,gBAAgB,sBAAsB;AAC5C,QAAI,eAAe;AAClB,eAAS,iBAAiB,aAAa;AAAA,IACxC;AACO,WAAA;AAAA,EAAA,CACP,EACA,WAAW,wBAAwB,CAAC,EAAE,4BACtC,IAAI,qBAAqB,qBAAqB,CAAC,EAC/C,WAAW,wBAAwB,CAAC,EAAE,sBAAA,MACtC,IAAI,qBAAqB,qBAAqB,CAAC,EAC/C,WAAW,eAAe,CAAC,EAAE,4BAC7B,IAAI,YAAY,qBAAqB,CAAC,EACtC,WAAW,yBAAyB,CAAC,EAAE,cAAc,WAAAC,iBAAgB;AACrE,UAAM,QAAQ,YAAY,QAAQ,CAAC,SAAiB,OAAO,QAAQ,aAAa;AACzE,WAAA,IAAI,sBAAsBA,WAAU,eAAe;AAAA,MACzD,MAAM,IAAI,WAAW,IAAI,iBAAiB;AAAA,MAC1C,IAAI,IAAI,SAAS,IAAI,gBAAA,GAAmB,KAAK;AAAA,MAC7C,IAAI,IAAI,SAAS,IAAI,gBAAA,GAAmB,KAAK;AAAA,IAAA,CAC7C;AAAA,EAAA,CACD,EACA,WAAW,4BAA4B,CAAC,EAAE,WAAAA,YAAW,SAAS;AACxD,UAAA,gBAAgB,IAAI;AAC1B,WAAO,IAAI,yBAAyBA,WAAU,SAAS,IAAI;AAAA,MAC1D,IAAI,KAAK,IAAI,aAAa;AAAA,MAC1B,IAAI,YAAY,IAAI,aAAa;AAAA,MACjC,IAAI,KAAK,IAAI,aAAa;AAAA,MAC1B,IAAI,IAAI,IAAI,aAAa;AAAA,IAAA,CACzB;AAAA,EAAA,CACD,EACA,WAAW,wBAAwB,CAAC,EAAE,WAAAA,YAAW,KAAAD,MAAK,IAAI,kBAC1D,IAAI,qBAAqBC,WAAU,SAASD,KAAI,mBAAmB,IAAI,WAAW,CAAC,EACnF,WAAW,8BAA8B,MACzC,IAAI,2BAA2B,2BAA2B,iBAAiB,CAAC,EAC5E,WAAW,kBAAkB,CAAC,EAAE,2BAA2B,MAC3D,IAAI,eAAe,0BAA0B,CAAC,EAC9C,WAAW,sBAAsB,CAAC,EAAE,sBAAsB,MAC1D,IAAI,mBAAmB,qBAAqB,CAAC,EAC7C,WAAW,wBAAwB,CAAC,EAAE,oBAAoB,eAAe,MACzE,IAAI,qBAAqB,oBAAoB,cAAc,CAAC,EAC5D,WAAW,gBAAgB,CAAC,EAAE,eAAA,MAC9B,IAAI,aAAa,cAAc,CAAC,EAChC,WAAW,oBAAoB,CAAC,EAAE,uBAAuB,aAAA,MACzD,IAAI,iBAAiB,uBAAuB,cAAc;AAAA,IACzD,MAAM,KAAK,UAAU,EAAE,eAAe,gBAAgB,eAAe,CAAA,KAAM,QAAW,GAAI,IAAI;AAAA,IAC9F,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,CACJ,CAAC,EACF,WAAW,sBAAsB,CAAC,EAAE,2BACpC,MAAA,IAAI,mBAAmB,0BAA0B,CAAC,EAClD,WAAW,oBAAoB,CAAC,EAAE,mBAAA,MAClC,IAAI,iBAAiB,kBAAkB,CAAC,EACxC,WAAW,sBAAsB,MACjC,IAAI,kBAAmB,CAAA,EACvB,WAAW,4BAA4B,MACvC,IAAI,yBAA0B,CAAA,EAC9B,WAAW,0BAA0B,CAAC,EAAE,sBAAsB,oBAAoB,yBAAyB,MAC3G,IAAI,uBAAuB,sBAAsB,oBAAoB,wBAAwB,CAAC,EAC9F,WAAW,4BAA4B,CAAC,EAAE,sBAAsB,sBAAsB,uBAAuB,sBAAsB,kBAAkB,oBAAoB,6BACzK,IAAI,yBAAyB,sBAAsB,sBAAsB,uBAAuB,sBAAsB,kBAAkB,oBAAoB,sBAAsB,CAAC,EACnL,WAAW,uBAAuB,CAAC,EAAE,oBAAoB,qBACzD,IAAI,oBAAoB,oBAAoB,cAAc,CAAC,EAC3D,WAAW,yBAAyB,CAAC,EAAE,sBAAsB,qBAAqB,sBAAsB,4BACxG,IAAI,sBAAsB,sBAAsB,qBAAqB,sBAAsB,qBAAqB,CAAC,EACjH,WAAW,gBAAgB,CAAC,EAAE,WAAAC,YAAW,cAAc,SAAAC,eACvDA,aAAY,QAAQ,IAAI,mBAAmBD,UAAS,IAAI,IAAI,wBAAwBA,YAAW,YAAY,CAAC,EAE5G,WAAW,iBAAiB,CAAC,EAAE,uBAAuB,aAAa,GAAG,MACtE,IAAI,cAAc,uBAAuB,aAAa,EAAE,CAAC,EACzD,WAAW,sBAAsB,MACjC,IAAI,mBAAmB,CAAC,EAGxB,WAAW,iBAAiB,CAAC,EAAE,eAAe,0BAA0B,IAAI,uBAAuB,uBAAuB,WAAAA,WAAAA,MACzH,IAAI,cAAc,eAAe,0BAA0B,IAAI,uBAAuB,uBAAuBA,UAAS,CAAC,EACxH,WAAW,yBAAyB,CAAC,EAAE,oBAAoB,sBAAsB,wBAAwB,cAAc,sBAAsB,kBAAkB,qBAAqB,kBAAkB,eAAe,MACrN,IAAI,sBAAsB,oBAAoB,sBAAsB,wBAAwB,cAAc,sBAAsB,kBAAkB,qBAAqB,kBAAkB,cAAc,CAAC,EACxM,WAAW,yBAAyB,CAAC,EAAE,iBAAiB,MACxD,IAAI,sBAAsB,gBAAgB,CAAC,EAC3C,WAAW,4BAA4B,CAAC,EAAE,kBAAkB,sBAAsB,mBAAA,MAClF,IAAI,yBAAyB,kBAAkB,sBAAsB,kBAAkB,CAAC,EACxF,WAAW,wBAAwB,CAAC,EAAE,cAAc,sBAAsB,kBAAkB,kBAAkB,+BAC9G,IAAI,qBAAqB,cAAc,sBAAsB,kBAAkB,kBAAkB,wBAAwB,CAAC,EAC1H,WAAW,2BAA2B,CAAC,EAAE,+BACzC,IAAI,wBAAwB,wBAAwB,CAAC,EACrD,WAAW,0BAA0B,CAAC,EAAE,oBAAoB,sBAAA,MAC5D,IAAI,uBAAuB,oBAAoB,qBAAqB,CAAC,EACrE,WAAW,0BAA0B,CAAC,EAAE,wBAAwB,uBAAuB,sBAAsB,iBAAiB,MAC9H,IAAI,uBAAuB,wBAAwB,uBAAuB,sBAAsB,gBAAgB,CAAC,EACjH,WAAW,kBAAkB,CAAC,EAAE,SAAAE,SAAQ,MACxC,IAAI,eAAeA,QAAO,CAAC,EAC3B,WAAW,uCAAuC,CAAC,EAAE,aAAA,MACrD,IAAI,oCAAoC,YAAY,CAAC,EACrD,WAAW,6BAA6B,CAAC,EAAE,cAAc,qBAAA,MACzD,IAAI,0BAA0B,cAAc,oBAAoB,CAAC,EACjE,WAAW,0BAA0B,CAAC,EAAE,cAAc,qBAAqB,oBAAoB,cAAc,2BAC7G,IAAI,uBAAuB,cAAc,qBAAqB,oBAAoB,cAAc,oBAAoB,CAAC,EACrH,WAAW,iBAAiB,CAAC,EAAE,oBAAoB,sBAAA,MACnD,IAAI,cAAc,uBAAuB,kBAAkB,CAAC,EAC5D,WAAW,iBAAiB,CAAC,EAAE,oBAAoB,4BACnD,IAAI,cAAc,uBAAuB,kBAAkB,CAAC,EAC5D,WAAW,mBAAmB,CAAC,EAAE,oBAAoB,4BACrD,IAAI,gBAAgB,uBAAuB,kBAAkB,CAAC,EAC9D,WAAW,0BAA0B,CAAC,EAAE,0BAA0B,qBAAqB,MACvF,IAAI,0BAA0B,0BAA0B,oBAAoB,CAAC,EAC7E,WAAW,eAAe,CAAO,QAAA;AACjC,UAAM,WAA+B;AAAA,MACpC,CAAC,QAAQ,GAAG,MAAM,IAAI;AAAA,MACtB,CAAC,SAAS,GAAG,MAAM,IAAI;AAAA,MACvB,CAAC,aAAa,GAAG,MAAM,IAAI;AAAA,MAC3B,CAAC,aAAa,GAAG,MAAM,IAAI;AAAA,MAC3B,CAAC,eAAe,GAAG,MAAM,IAAI;AAAA,MAC7B,CAAC,iBAAiB,GAAG,MAAM,IAAI;AAAA,MAC/B,CAAC,kBAAkB,GAAG,MAAM,IAAI;AAAA,MAChC,CAAC,kBAAkB,GAAG,MAAM,IAAI;AAAA,MAChC,CAAC,qBAAqB,GAAG,MAAM,IAAI;AAAA,MACnC,CAAC,oBAAoB,GAAG,MAAM,IAAI;AAAA,MAClC,CAAC,mBAAmB,GAAG,MAAM,IAAI;AAAA,MACjC,CAAC,mBAAmB,GAAG,MAAM,IAAI;AAAA,MACjC,CAAC,sBAAsB,GAAG,MAAM,IAAI;AAAA,MACpC,CAAC,kBAAkB,GAAG,MAAM,IAAI;AAAA,MAChC,CAAC,sBAAsB,GAAG,MAAM,IAAI;AAAA,MACpC,CAAC,sBAAsB,GAAG,MAAM,IAAI;AAAA,IAAA;AAE9B,WAAA;AAAA,EAAA,CACP,EACA,WAAW,kBAAkB,CAAC,EAAE,YAAY,MAC5C,IAAI,eAAe,WAAW,CAAC,EAE/B,WAAW,kBAAkB,CAAC,EAAE,SAAAA,UAAS,WAAAF,YAAW,0BAA0B,qBAAqB,MACnG,IAAI,eAAeE,UAASF,WAAU,SAAS,0BAA0B,oBAAoB,CAAC,EAC9F,WAAW,eAAe,CAAC,EAAE,gBAAgB,qBAAqB;AAClE,UAAM,MAAM,IAAI;AAAA,MACf;AAAA,MACA,yBAAyB,OAAO;AAAA,MAChC;AAAA,QACC,WAAW,OAAO,EAAE,WAAW;AAC9B,cAAI,CAAC,QAAQ,IAAI,gCAAgC,CAAC,CAAC,UAAU,WAAW,eAAe,eAAe,eAAe,EAAE,SAAS,IAAI,GAAG;AACtI,kBAAM,eAAe;UACtB;AAAA,QACD;AAAA,MACD;AAAA,IAAA;AAEM,WAAA;AAAA,EAAA,CACP,EACA,MAAM;AACT;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const migrationsClient = require("@contember/migrations-client");
|
|
4
|
+
class SystemClientProvider {
|
|
5
|
+
constructor(remoteProjectProvider) {
|
|
6
|
+
this.remoteProjectProvider = remoteProjectProvider;
|
|
7
|
+
}
|
|
8
|
+
get() {
|
|
9
|
+
const project = this.remoteProjectProvider.get();
|
|
10
|
+
return migrationsClient.SystemClient.create(project.endpoint, project.name, project.token);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.SystemClientProvider = SystemClientProvider;
|
|
14
|
+
//# sourceMappingURL=SystemClientProvider.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SystemClientProvider.cjs","sources":["../../../../../packages/cli/src/lib/SystemClientProvider.ts"],"sourcesContent":["import { RemoteProjectProvider } from './project/RemoteProjectProvider'\nimport { SystemClient } from '@contember/migrations-client'\n\nexport class SystemClientProvider {\n\tconstructor(\n\t\tprivate readonly remoteProjectProvider: RemoteProjectProvider,\n\t) {\n\t}\n\n\tpublic get(): SystemClient {\n\t\tconst project = this.remoteProjectProvider.get()\n\t\treturn SystemClient.create(project.endpoint, project.name, project.token)\n\t}\n}\n"],"names":["SystemClient"],"mappings":";;;AAGO,MAAM,qBAAqB;AAAA,EACjC,YACkB,uBAChB;AADgB,SAAA,wBAAA;AAAA,EAElB;AAAA,EAEO,MAAoB;AACpB,UAAA,UAAU,KAAK,sBAAsB,IAAI;AAC/C,WAAOA,8BAAa,OAAO,QAAQ,UAAU,QAAQ,MAAM,QAAQ,KAAK;AAAA,EACzE;AACD;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SystemClient } from "@contember/migrations-client";
|
|
2
|
+
class SystemClientProvider {
|
|
3
|
+
constructor(remoteProjectProvider) {
|
|
4
|
+
this.remoteProjectProvider = remoteProjectProvider;
|
|
5
|
+
}
|
|
6
|
+
get() {
|
|
7
|
+
const project = this.remoteProjectProvider.get();
|
|
8
|
+
return SystemClient.create(project.endpoint, project.name, project.token);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
SystemClientProvider
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=SystemClientProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SystemClientProvider.js","sources":["../../../../../packages/cli/src/lib/SystemClientProvider.ts"],"sourcesContent":["import { RemoteProjectProvider } from './project/RemoteProjectProvider'\nimport { SystemClient } from '@contember/migrations-client'\n\nexport class SystemClientProvider {\n\tconstructor(\n\t\tprivate readonly remoteProjectProvider: RemoteProjectProvider,\n\t) {\n\t}\n\n\tpublic get(): SystemClient {\n\t\tconst project = this.remoteProjectProvider.get()\n\t\treturn SystemClient.create(project.endpoint, project.name, project.token)\n\t}\n}\n"],"names":[],"mappings":";AAGO,MAAM,qBAAqB;AAAA,EACjC,YACkB,uBAChB;AADgB,SAAA,wBAAA;AAAA,EAElB;AAAA,EAEO,MAAoB;AACpB,UAAA,UAAU,KAAK,sBAAsB,IAAI;AAC/C,WAAO,aAAa,OAAO,QAAQ,UAAU,QAAQ,MAAM,QAAQ,KAAK;AAAA,EACzE;AACD;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const TenantClient = require("./tenant/TenantClient.cjs");
|
|
4
|
+
class TenantClientProvider {
|
|
5
|
+
constructor(remoteProjectProvider) {
|
|
6
|
+
this.remoteProjectProvider = remoteProjectProvider;
|
|
7
|
+
}
|
|
8
|
+
get() {
|
|
9
|
+
const project = this.remoteProjectProvider.get();
|
|
10
|
+
return TenantClient.TenantClient.create(project.endpoint, project.token);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.TenantClientProvider = TenantClientProvider;
|
|
14
|
+
//# sourceMappingURL=TenantClientProvider.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TenantClientProvider.cjs","sources":["../../../../../packages/cli/src/lib/TenantClientProvider.ts"],"sourcesContent":["import { TenantClient } from './tenant/TenantClient'\nimport { RemoteProjectProvider } from './project/RemoteProjectProvider'\n\nexport class TenantClientProvider {\n\tconstructor(\n\t\tprivate readonly remoteProjectProvider: RemoteProjectProvider,\n\t) {\n\t}\n\n\tpublic get(): TenantClient {\n\t\tconst project = this.remoteProjectProvider.get()\n\t\treturn TenantClient.create(project.endpoint, project.token)\n\t}\n}\n"],"names":["TenantClient"],"mappings":";;;AAGO,MAAM,qBAAqB;AAAA,EACjC,YACkB,uBAChB;AADgB,SAAA,wBAAA;AAAA,EAElB;AAAA,EAEO,MAAoB;AACpB,UAAA,UAAU,KAAK,sBAAsB,IAAI;AAC/C,WAAOA,aAAAA,aAAa,OAAO,QAAQ,UAAU,QAAQ,KAAK;AAAA,EAC3D;AACD;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TenantClient } from "./tenant/TenantClient.js";
|
|
2
|
+
class TenantClientProvider {
|
|
3
|
+
constructor(remoteProjectProvider) {
|
|
4
|
+
this.remoteProjectProvider = remoteProjectProvider;
|
|
5
|
+
}
|
|
6
|
+
get() {
|
|
7
|
+
const project = this.remoteProjectProvider.get();
|
|
8
|
+
return TenantClient.create(project.endpoint, project.token);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
TenantClientProvider
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=TenantClientProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TenantClientProvider.js","sources":["../../../../../packages/cli/src/lib/TenantClientProvider.ts"],"sourcesContent":["import { TenantClient } from './tenant/TenantClient'\nimport { RemoteProjectProvider } from './project/RemoteProjectProvider'\n\nexport class TenantClientProvider {\n\tconstructor(\n\t\tprivate readonly remoteProjectProvider: RemoteProjectProvider,\n\t) {\n\t}\n\n\tpublic get(): TenantClient {\n\t\tconst project = this.remoteProjectProvider.get()\n\t\treturn TenantClient.create(project.endpoint, project.token)\n\t}\n}\n"],"names":[],"mappings":";AAGO,MAAM,qBAAqB;AAAA,EACjC,YACkB,uBAChB;AADgB,SAAA,wBAAA;AAAA,EAElB;AAAA,EAEO,MAAoB;AACpB,UAAA,UAAU,KAAK,sBAAsB,IAAI;AAC/C,WAAO,aAAa,OAAO,QAAQ,UAAU,QAAQ,KAAK;AAAA,EAC3D;AACD;"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const node_path = require("node:path");
|
|
4
|
+
const semver = require("semver");
|
|
5
|
+
const consts = require("../consts.cjs");
|
|
6
|
+
function _interopNamespaceDefault(e) {
|
|
7
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
8
|
+
if (e) {
|
|
9
|
+
for (const k in e) {
|
|
10
|
+
if (k !== "default") {
|
|
11
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: () => e[k]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
n.default = e;
|
|
20
|
+
return Object.freeze(n);
|
|
21
|
+
}
|
|
22
|
+
const semver__namespace = /* @__PURE__ */ _interopNamespaceDefault(semver);
|
|
23
|
+
var __defProp = Object.defineProperty;
|
|
24
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
25
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "", value);
|
|
26
|
+
class VersionChecker {
|
|
27
|
+
constructor(version, dir, packageWorkspaceResolver, dockerComposeManager) {
|
|
28
|
+
this.version = version;
|
|
29
|
+
this.dir = dir;
|
|
30
|
+
this.packageWorkspaceResolver = packageWorkspaceResolver;
|
|
31
|
+
this.dockerComposeManager = dockerComposeManager;
|
|
32
|
+
__publicField(this, "checkVersions", async () => {
|
|
33
|
+
const cliVersion = this.version;
|
|
34
|
+
const packageWorkspace = await this.packageWorkspaceResolver.resolve();
|
|
35
|
+
const errors = [];
|
|
36
|
+
for (const packageName of ["@contember/schema", "@contember/schema-definition"]) {
|
|
37
|
+
const installedPackages = await packageWorkspace.findInstalledDependencies(packageName);
|
|
38
|
+
for (const pckg of installedPackages) {
|
|
39
|
+
const jsonPath = node_path.relative(this.dir, node_path.join(pckg.defined.pckg.dir, "package.json"));
|
|
40
|
+
if (!pckg.installed) {
|
|
41
|
+
errors.push(`Package ${packageName} defined in ${jsonPath} is not installed.`);
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
if (pckg.defined.version !== "workspace:*" && !semver__namespace.satisfies(pckg.installed.version, pckg.defined.version)) {
|
|
45
|
+
errors.push(`Package ${packageName}@${pckg.installed.version} does not match constraint ${pckg.defined.version} defined in ${jsonPath}.`);
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
if (cliVersion !== pckg.installed.version) {
|
|
49
|
+
errors.push(`Package ${packageName}@${pckg.installed.version} does not match version of CLI ${cliVersion}.`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const dockerCompose = await this.dockerComposeManager.tryReadMainDockerComposeConfig();
|
|
54
|
+
if (!dockerCompose) {
|
|
55
|
+
errors.push("docker-compose.yaml not found.");
|
|
56
|
+
} else {
|
|
57
|
+
for (const [name, def] of Object.entries(dockerCompose.services ?? {})) {
|
|
58
|
+
if (!def.image) {
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
const [image, version2] = def.image.split(":");
|
|
62
|
+
if (!version2 || !consts.contemberDockerImages.includes(image)) {
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
const versionParts = version2.split(/[.-]/);
|
|
66
|
+
if (versionParts[versionParts.length - 1] === "debian") {
|
|
67
|
+
versionParts.pop();
|
|
68
|
+
}
|
|
69
|
+
const cliVersionParts = cliVersion.split(/[.-]/).slice(0, versionParts.length);
|
|
70
|
+
if (versionParts.join(".") !== cliVersionParts.join(".")) {
|
|
71
|
+
errors.push(`Docker service ${name} with image ${image}:${version2} does not match version of CLI ${cliVersion}.`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (errors.length) {
|
|
76
|
+
throw `${errors.map((it) => `${it}`).join("\n")}
|
|
77
|
+
|
|
78
|
+
Please make sure all dependencies are up to date.
|
|
79
|
+
If 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`;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.VersionChecker = VersionChecker;
|
|
85
|
+
//# sourceMappingURL=VersionChecker.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VersionChecker.cjs","sources":["../../../../../packages/cli/src/lib/VersionChecker.ts"],"sourcesContent":["import { join, relative } from 'node:path'\nimport * as semver from 'semver'\nimport { PackageWorkspaceResolver } from '@contember/cli-common'\nimport { DockerComposeManager } from './fs/DockerComposeManager'\nimport { contemberDockerImages } from '../consts'\n\nexport class VersionChecker {\n\tconstructor(\n\t\tprivate readonly version: string,\n\t\tprivate readonly dir: string,\n\t\tprivate readonly packageWorkspaceResolver: PackageWorkspaceResolver,\n\t\tprivate readonly dockerComposeManager: DockerComposeManager,\n\t) {\n\t}\n\n\tcheckVersions = async () => {\n\t\tconst cliVersion = this.version\n\t\tconst packageWorkspace = await this.packageWorkspaceResolver.resolve()\n\n\t\tconst errors: string[] = []\n\n\t\tfor (const packageName of ['@contember/schema', '@contember/schema-definition']) {\n\t\t\tconst installedPackages = await packageWorkspace.findInstalledDependencies(packageName)\n\t\t\tfor (const pckg of installedPackages) {\n\t\t\t\tconst jsonPath = relative(this.dir, join(pckg.defined.pckg.dir, 'package.json'))\n\n\t\t\t\tif (!pckg.installed) {\n\t\t\t\t\terrors.push(`Package ${packageName} defined in ${jsonPath} is not installed.`)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif (pckg.defined.version !== 'workspace:*' && !semver.satisfies(pckg.installed.version, pckg.defined.version)) {\n\t\t\t\t\terrors.push(`Package ${packageName}@${pckg.installed.version} does not match constraint ${pckg.defined.version} defined in ${jsonPath}.`)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif (cliVersion !== pckg.installed.version) {\n\t\t\t\t\terrors.push(`Package ${packageName}@${pckg.installed.version} does not match version of CLI ${cliVersion}.`)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tconst dockerCompose = await this.dockerComposeManager.tryReadMainDockerComposeConfig()\n\n\t\tif (!dockerCompose) {\n\t\t\terrors.push('docker-compose.yaml not found.')\n\t\t} else {\n\t\t\tfor (const [name, def] of Object.entries(dockerCompose.services ?? {})) {\n\t\t\t\tif (!def.image) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tconst [image, version] = def.image.split(':')\n\t\t\t\tif (!version || !contemberDockerImages.includes(image)) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tconst versionParts = version.split(/[.-]/)\n\t\t\t\tif (versionParts[versionParts.length - 1] === 'debian') {\n\t\t\t\t\tversionParts.pop()\n\t\t\t\t}\n\t\t\t\tconst cliVersionParts = cliVersion.split(/[.-]/).slice(0, versionParts.length)\n\t\t\t\tif (versionParts.join('.') !== cliVersionParts.join('.')) {\n\t\t\t\t\terrors.push(`Docker service ${name} with image ${image}:${version} does not match version of CLI ${cliVersion}.`)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (errors.length) {\n\t\t\tthrow `${errors.map(it => `${it}`).join('\\n')}\n\nPlease 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`\n\t\t}\n\t}\n\n}\n"],"names":["relative","join","semver","version","contemberDockerImages"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAMO,MAAM,eAAe;AAAA,EAC3B,YACkB,SACA,KACA,0BACA,sBAChB;AAJgB,SAAA,UAAA;AACA,SAAA,MAAA;AACA,SAAA,2BAAA;AACA,SAAA,uBAAA;AAIlB,kBAAA,MAAA,iBAAgB,YAAY;AAC3B,YAAM,aAAa,KAAK;AACxB,YAAM,mBAAmB,MAAM,KAAK,yBAAyB,QAAQ;AAErE,YAAM,SAAmB,CAAA;AAEzB,iBAAW,eAAe,CAAC,qBAAqB,8BAA8B,GAAG;AAChF,cAAM,oBAAoB,MAAM,iBAAiB,0BAA0B,WAAW;AACtF,mBAAW,QAAQ,mBAAmB;AAC/B,gBAAA,WAAWA,UAAAA,SAAS,KAAK,KAAKC,UAAA,KAAK,KAAK,QAAQ,KAAK,KAAK,cAAc,CAAC;AAE3E,cAAA,CAAC,KAAK,WAAW;AACpB,mBAAO,KAAK,WAAW,WAAW,eAAe,QAAQ,oBAAoB;AAC7E;AAAA,UACD;AACA,cAAI,KAAK,QAAQ,YAAY,iBAAiB,CAACC,kBAAO,UAAU,KAAK,UAAU,SAAS,KAAK,QAAQ,OAAO,GAAG;AAC9G,mBAAO,KAAK,WAAW,WAAW,IAAI,KAAK,UAAU,OAAO,8BAA8B,KAAK,QAAQ,OAAO,eAAe,QAAQ,GAAG;AACxI;AAAA,UACD;AACI,cAAA,eAAe,KAAK,UAAU,SAAS;AACnC,mBAAA,KAAK,WAAW,WAAW,IAAI,KAAK,UAAU,OAAO,kCAAkC,UAAU,GAAG;AAAA,UAC5G;AAAA,QACD;AAAA,MACD;AACA,YAAM,gBAAgB,MAAM,KAAK,qBAAqB,+BAA+B;AAErF,UAAI,CAAC,eAAe;AACnB,eAAO,KAAK,gCAAgC;AAAA,MAAA,OACtC;AACK,mBAAA,CAAC,MAAM,GAAG,KAAK,OAAO,QAAQ,cAAc,YAAY,CAAA,CAAE,GAAG;AACnE,cAAA,CAAC,IAAI,OAAO;AACf;AAAA,UACD;AACA,gBAAM,CAAC,OAAOC,QAAO,IAAI,IAAI,MAAM,MAAM,GAAG;AAC5C,cAAI,CAACA,YAAW,CAACC,OAAsB,sBAAA,SAAS,KAAK,GAAG;AACvD;AAAA,UACD;AACM,gBAAA,eAAeD,SAAQ,MAAM,MAAM;AACzC,cAAI,aAAa,aAAa,SAAS,CAAC,MAAM,UAAU;AACvD,yBAAa,IAAI;AAAA,UAClB;AACM,gBAAA,kBAAkB,WAAW,MAAM,MAAM,EAAE,MAAM,GAAG,aAAa,MAAM;AAC7E,cAAI,aAAa,KAAK,GAAG,MAAM,gBAAgB,KAAK,GAAG,GAAG;AAClD,mBAAA,KAAK,kBAAkB,IAAI,eAAe,KAAK,IAAIA,QAAO,kCAAkC,UAAU,GAAG;AAAA,UACjH;AAAA,QACD;AAAA,MACD;AAEA,UAAI,OAAO,QAAQ;AACZ,cAAA,GAAG,OAAO,IAAI,CAAM,OAAA,GAAG,EAAE,EAAE,EAAE,KAAK,IAAI,CAAC;AAAA;AAAA;AAAA;AAAA,MAG9C;AAAA,IAAA,CACD;AAAA,EAvDA;AAyDD;;"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { relative, join } from "node:path";
|
|
2
|
+
import * as semver from "semver";
|
|
3
|
+
import { contemberDockerImages } from "../consts.js";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "", value);
|
|
7
|
+
class VersionChecker {
|
|
8
|
+
constructor(version, dir, packageWorkspaceResolver, dockerComposeManager) {
|
|
9
|
+
this.version = version;
|
|
10
|
+
this.dir = dir;
|
|
11
|
+
this.packageWorkspaceResolver = packageWorkspaceResolver;
|
|
12
|
+
this.dockerComposeManager = dockerComposeManager;
|
|
13
|
+
__publicField(this, "checkVersions", async () => {
|
|
14
|
+
const cliVersion = this.version;
|
|
15
|
+
const packageWorkspace = await this.packageWorkspaceResolver.resolve();
|
|
16
|
+
const errors = [];
|
|
17
|
+
for (const packageName of ["@contember/schema", "@contember/schema-definition"]) {
|
|
18
|
+
const installedPackages = await packageWorkspace.findInstalledDependencies(packageName);
|
|
19
|
+
for (const pckg of installedPackages) {
|
|
20
|
+
const jsonPath = relative(this.dir, join(pckg.defined.pckg.dir, "package.json"));
|
|
21
|
+
if (!pckg.installed) {
|
|
22
|
+
errors.push(`Package ${packageName} defined in ${jsonPath} is not installed.`);
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
if (pckg.defined.version !== "workspace:*" && !semver.satisfies(pckg.installed.version, pckg.defined.version)) {
|
|
26
|
+
errors.push(`Package ${packageName}@${pckg.installed.version} does not match constraint ${pckg.defined.version} defined in ${jsonPath}.`);
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
if (cliVersion !== pckg.installed.version) {
|
|
30
|
+
errors.push(`Package ${packageName}@${pckg.installed.version} does not match version of CLI ${cliVersion}.`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const dockerCompose = await this.dockerComposeManager.tryReadMainDockerComposeConfig();
|
|
35
|
+
if (!dockerCompose) {
|
|
36
|
+
errors.push("docker-compose.yaml not found.");
|
|
37
|
+
} else {
|
|
38
|
+
for (const [name, def] of Object.entries(dockerCompose.services ?? {})) {
|
|
39
|
+
if (!def.image) {
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
const [image, version2] = def.image.split(":");
|
|
43
|
+
if (!version2 || !contemberDockerImages.includes(image)) {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
const versionParts = version2.split(/[.-]/);
|
|
47
|
+
if (versionParts[versionParts.length - 1] === "debian") {
|
|
48
|
+
versionParts.pop();
|
|
49
|
+
}
|
|
50
|
+
const cliVersionParts = cliVersion.split(/[.-]/).slice(0, versionParts.length);
|
|
51
|
+
if (versionParts.join(".") !== cliVersionParts.join(".")) {
|
|
52
|
+
errors.push(`Docker service ${name} with image ${image}:${version2} does not match version of CLI ${cliVersion}.`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if (errors.length) {
|
|
57
|
+
throw `${errors.map((it) => `${it}`).join("\n")}
|
|
58
|
+
|
|
59
|
+
Please make sure all dependencies are up to date.
|
|
60
|
+
If 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`;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
VersionChecker
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=VersionChecker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VersionChecker.js","sources":["../../../../../packages/cli/src/lib/VersionChecker.ts"],"sourcesContent":["import { join, relative } from 'node:path'\nimport * as semver from 'semver'\nimport { PackageWorkspaceResolver } from '@contember/cli-common'\nimport { DockerComposeManager } from './fs/DockerComposeManager'\nimport { contemberDockerImages } from '../consts'\n\nexport class VersionChecker {\n\tconstructor(\n\t\tprivate readonly version: string,\n\t\tprivate readonly dir: string,\n\t\tprivate readonly packageWorkspaceResolver: PackageWorkspaceResolver,\n\t\tprivate readonly dockerComposeManager: DockerComposeManager,\n\t) {\n\t}\n\n\tcheckVersions = async () => {\n\t\tconst cliVersion = this.version\n\t\tconst packageWorkspace = await this.packageWorkspaceResolver.resolve()\n\n\t\tconst errors: string[] = []\n\n\t\tfor (const packageName of ['@contember/schema', '@contember/schema-definition']) {\n\t\t\tconst installedPackages = await packageWorkspace.findInstalledDependencies(packageName)\n\t\t\tfor (const pckg of installedPackages) {\n\t\t\t\tconst jsonPath = relative(this.dir, join(pckg.defined.pckg.dir, 'package.json'))\n\n\t\t\t\tif (!pckg.installed) {\n\t\t\t\t\terrors.push(`Package ${packageName} defined in ${jsonPath} is not installed.`)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif (pckg.defined.version !== 'workspace:*' && !semver.satisfies(pckg.installed.version, pckg.defined.version)) {\n\t\t\t\t\terrors.push(`Package ${packageName}@${pckg.installed.version} does not match constraint ${pckg.defined.version} defined in ${jsonPath}.`)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif (cliVersion !== pckg.installed.version) {\n\t\t\t\t\terrors.push(`Package ${packageName}@${pckg.installed.version} does not match version of CLI ${cliVersion}.`)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tconst dockerCompose = await this.dockerComposeManager.tryReadMainDockerComposeConfig()\n\n\t\tif (!dockerCompose) {\n\t\t\terrors.push('docker-compose.yaml not found.')\n\t\t} else {\n\t\t\tfor (const [name, def] of Object.entries(dockerCompose.services ?? {})) {\n\t\t\t\tif (!def.image) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tconst [image, version] = def.image.split(':')\n\t\t\t\tif (!version || !contemberDockerImages.includes(image)) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tconst versionParts = version.split(/[.-]/)\n\t\t\t\tif (versionParts[versionParts.length - 1] === 'debian') {\n\t\t\t\t\tversionParts.pop()\n\t\t\t\t}\n\t\t\t\tconst cliVersionParts = cliVersion.split(/[.-]/).slice(0, versionParts.length)\n\t\t\t\tif (versionParts.join('.') !== cliVersionParts.join('.')) {\n\t\t\t\t\terrors.push(`Docker service ${name} with image ${image}:${version} does not match version of CLI ${cliVersion}.`)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (errors.length) {\n\t\t\tthrow `${errors.map(it => `${it}`).join('\\n')}\n\nPlease 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`\n\t\t}\n\t}\n\n}\n"],"names":["version"],"mappings":";;;;;;AAMO,MAAM,eAAe;AAAA,EAC3B,YACkB,SACA,KACA,0BACA,sBAChB;AAJgB,SAAA,UAAA;AACA,SAAA,MAAA;AACA,SAAA,2BAAA;AACA,SAAA,uBAAA;AAIlB,kBAAA,MAAA,iBAAgB,YAAY;AAC3B,YAAM,aAAa,KAAK;AACxB,YAAM,mBAAmB,MAAM,KAAK,yBAAyB,QAAQ;AAErE,YAAM,SAAmB,CAAA;AAEzB,iBAAW,eAAe,CAAC,qBAAqB,8BAA8B,GAAG;AAChF,cAAM,oBAAoB,MAAM,iBAAiB,0BAA0B,WAAW;AACtF,mBAAW,QAAQ,mBAAmB;AAC/B,gBAAA,WAAW,SAAS,KAAK,KAAK,KAAK,KAAK,QAAQ,KAAK,KAAK,cAAc,CAAC;AAE3E,cAAA,CAAC,KAAK,WAAW;AACpB,mBAAO,KAAK,WAAW,WAAW,eAAe,QAAQ,oBAAoB;AAC7E;AAAA,UACD;AACA,cAAI,KAAK,QAAQ,YAAY,iBAAiB,CAAC,OAAO,UAAU,KAAK,UAAU,SAAS,KAAK,QAAQ,OAAO,GAAG;AAC9G,mBAAO,KAAK,WAAW,WAAW,IAAI,KAAK,UAAU,OAAO,8BAA8B,KAAK,QAAQ,OAAO,eAAe,QAAQ,GAAG;AACxI;AAAA,UACD;AACI,cAAA,eAAe,KAAK,UAAU,SAAS;AACnC,mBAAA,KAAK,WAAW,WAAW,IAAI,KAAK,UAAU,OAAO,kCAAkC,UAAU,GAAG;AAAA,UAC5G;AAAA,QACD;AAAA,MACD;AACA,YAAM,gBAAgB,MAAM,KAAK,qBAAqB,+BAA+B;AAErF,UAAI,CAAC,eAAe;AACnB,eAAO,KAAK,gCAAgC;AAAA,MAAA,OACtC;AACK,mBAAA,CAAC,MAAM,GAAG,KAAK,OAAO,QAAQ,cAAc,YAAY,CAAA,CAAE,GAAG;AACnE,cAAA,CAAC,IAAI,OAAO;AACf;AAAA,UACD;AACA,gBAAM,CAAC,OAAOA,QAAO,IAAI,IAAI,MAAM,MAAM,GAAG;AAC5C,cAAI,CAACA,YAAW,CAAC,sBAAsB,SAAS,KAAK,GAAG;AACvD;AAAA,UACD;AACM,gBAAA,eAAeA,SAAQ,MAAM,MAAM;AACzC,cAAI,aAAa,aAAa,SAAS,CAAC,MAAM,UAAU;AACvD,yBAAa,IAAI;AAAA,UAClB;AACM,gBAAA,kBAAkB,WAAW,MAAM,MAAM,EAAE,MAAM,GAAG,aAAa,MAAM;AAC7E,cAAI,aAAa,KAAK,GAAG,MAAM,gBAAgB,KAAK,GAAG,GAAG;AAClD,mBAAA,KAAK,kBAAkB,IAAI,eAAe,KAAK,IAAIA,QAAO,kCAAkC,UAAU,GAAG;AAAA,UACjH;AAAA,QACD;AAAA,MACD;AAEA,UAAI,OAAO,QAAQ;AACZ,cAAA,GAAG,OAAO,IAAI,CAAM,OAAA,GAAG,EAAE,EAAE,EAAE,KAAK,IAAI,CAAC;AAAA;AAAA;AAAA;AAAA,MAG9C;AAAA,IAAA,CACD;AAAA,EAvDA;AAyDD;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const maskToken = require("../maskToken.cjs");
|
|
4
|
+
class AdminClient {
|
|
5
|
+
constructor(remoteProjectProvider) {
|
|
6
|
+
this.remoteProjectProvider = remoteProjectProvider;
|
|
7
|
+
}
|
|
8
|
+
async deploy(project, files) {
|
|
9
|
+
const response = await this.execute("_deploy", "POST", { project, files });
|
|
10
|
+
if (!response.ok) {
|
|
11
|
+
const project2 = this.remoteProjectProvider.get();
|
|
12
|
+
const maskedToken = maskToken.maskToken(project2.token);
|
|
13
|
+
throw `Failed to deploy admin, POST request to ${project2.endpoint}/_deploy with token ${maskedToken} returned status ${response.status} ${response.statusText}
|
|
14
|
+
${await response.text()}`;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
async execute(path, method, body) {
|
|
18
|
+
const project = this.remoteProjectProvider.get();
|
|
19
|
+
if (!project.adminEndpoint) {
|
|
20
|
+
throw new Error("Admin endpoint not set");
|
|
21
|
+
}
|
|
22
|
+
return await fetch(`${project.adminEndpoint}/${path}`, {
|
|
23
|
+
method,
|
|
24
|
+
headers: { "Content-Type": "application/json", "Authorization": `Bearer ${project.token}` },
|
|
25
|
+
body: JSON.stringify(body)
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.AdminClient = AdminClient;
|
|
30
|
+
//# sourceMappingURL=AdminClient.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdminClient.cjs","sources":["../../../../../../packages/cli/src/lib/admin/AdminClient.ts"],"sourcesContent":["import { maskToken } from '../maskToken'\nimport { RemoteProjectProvider } from '../project/RemoteProjectProvider'\n\nexport type AdminFiles = Array<{ path: string; data: string }>\nexport class AdminClient {\n\tconstructor(\n\t\tprivate readonly remoteProjectProvider: RemoteProjectProvider,\n\t) {\n\t}\n\n\tpublic async deploy(project: string | null, files: AdminFiles): Promise<void> {\n\t\tconst response = await this.execute('_deploy', 'POST', { project, files })\n\n\t\tif (!response.ok) {\n\t\t\tconst project = this.remoteProjectProvider.get()\n\t\t\tconst maskedToken = maskToken(project.token)\n\t\t\tthrow `Failed to deploy admin, POST request to ${project.endpoint}/_deploy with token ${maskedToken} returned status ${response.status} ${response.statusText}\\n${await response.text()}`\n\t\t}\n\t}\n\n\tprivate async execute(path: string, method: string, body: any): Promise<Response> {\n\t\tconst project = this.remoteProjectProvider.get()\n\t\tif (!project.adminEndpoint) {\n\t\t\tthrow new Error('Admin endpoint not set')\n\t\t}\n\t\treturn await fetch(`${project.adminEndpoint}/${path}`, {\n\t\t\tmethod: method,\n\t\t\theaders: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${project.token}` },\n\t\t\tbody: JSON.stringify(body),\n\t\t})\n\t}\n\n}\n"],"names":["project","maskToken"],"mappings":";;;AAIO,MAAM,YAAY;AAAA,EACxB,YACkB,uBAChB;AADgB,SAAA,wBAAA;AAAA,EAElB;AAAA,EAEA,MAAa,OAAO,SAAwB,OAAkC;AACvE,UAAA,WAAW,MAAM,KAAK,QAAQ,WAAW,QAAQ,EAAE,SAAS,MAAA,CAAO;AAErE,QAAA,CAAC,SAAS,IAAI;AACXA,YAAAA,WAAU,KAAK,sBAAsB,IAAI;AACzC,YAAA,cAAcC,UAAAA,UAAUD,SAAQ,KAAK;AACrC,YAAA,2CAA2CA,SAAQ,QAAQ,uBAAuB,WAAW,oBAAoB,SAAS,MAAM,IAAI,SAAS,UAAU;AAAA,EAAK,MAAM,SAAS,KAAM,CAAA;AAAA,IACxL;AAAA,EACD;AAAA,EAEA,MAAc,QAAQ,MAAc,QAAgB,MAA8B;AAC3E,UAAA,UAAU,KAAK,sBAAsB,IAAI;AAC3C,QAAA,CAAC,QAAQ,eAAe;AACrB,YAAA,IAAI,MAAM,wBAAwB;AAAA,IACzC;AACA,WAAO,MAAM,MAAM,GAAG,QAAQ,aAAa,IAAI,IAAI,IAAI;AAAA,MACtD;AAAA,MACA,SAAS,EAAE,gBAAgB,oBAAoB,iBAAiB,UAAU,QAAQ,KAAK,GAAG;AAAA,MAC1F,MAAM,KAAK,UAAU,IAAI;AAAA,IAAA,CACzB;AAAA,EACF;AAED;;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { maskToken } from "../maskToken.js";
|
|
2
|
+
class AdminClient {
|
|
3
|
+
constructor(remoteProjectProvider) {
|
|
4
|
+
this.remoteProjectProvider = remoteProjectProvider;
|
|
5
|
+
}
|
|
6
|
+
async deploy(project, files) {
|
|
7
|
+
const response = await this.execute("_deploy", "POST", { project, files });
|
|
8
|
+
if (!response.ok) {
|
|
9
|
+
const project2 = this.remoteProjectProvider.get();
|
|
10
|
+
const maskedToken = maskToken(project2.token);
|
|
11
|
+
throw `Failed to deploy admin, POST request to ${project2.endpoint}/_deploy with token ${maskedToken} returned status ${response.status} ${response.statusText}
|
|
12
|
+
${await response.text()}`;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
async execute(path, method, body) {
|
|
16
|
+
const project = this.remoteProjectProvider.get();
|
|
17
|
+
if (!project.adminEndpoint) {
|
|
18
|
+
throw new Error("Admin endpoint not set");
|
|
19
|
+
}
|
|
20
|
+
return await fetch(`${project.adminEndpoint}/${path}`, {
|
|
21
|
+
method,
|
|
22
|
+
headers: { "Content-Type": "application/json", "Authorization": `Bearer ${project.token}` },
|
|
23
|
+
body: JSON.stringify(body)
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
AdminClient
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=AdminClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdminClient.js","sources":["../../../../../../packages/cli/src/lib/admin/AdminClient.ts"],"sourcesContent":["import { maskToken } from '../maskToken'\nimport { RemoteProjectProvider } from '../project/RemoteProjectProvider'\n\nexport type AdminFiles = Array<{ path: string; data: string }>\nexport class AdminClient {\n\tconstructor(\n\t\tprivate readonly remoteProjectProvider: RemoteProjectProvider,\n\t) {\n\t}\n\n\tpublic async deploy(project: string | null, files: AdminFiles): Promise<void> {\n\t\tconst response = await this.execute('_deploy', 'POST', { project, files })\n\n\t\tif (!response.ok) {\n\t\t\tconst project = this.remoteProjectProvider.get()\n\t\t\tconst maskedToken = maskToken(project.token)\n\t\t\tthrow `Failed to deploy admin, POST request to ${project.endpoint}/_deploy with token ${maskedToken} returned status ${response.status} ${response.statusText}\\n${await response.text()}`\n\t\t}\n\t}\n\n\tprivate async execute(path: string, method: string, body: any): Promise<Response> {\n\t\tconst project = this.remoteProjectProvider.get()\n\t\tif (!project.adminEndpoint) {\n\t\t\tthrow new Error('Admin endpoint not set')\n\t\t}\n\t\treturn await fetch(`${project.adminEndpoint}/${path}`, {\n\t\t\tmethod: method,\n\t\t\theaders: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${project.token}` },\n\t\t\tbody: JSON.stringify(body),\n\t\t})\n\t}\n\n}\n"],"names":["project"],"mappings":";AAIO,MAAM,YAAY;AAAA,EACxB,YACkB,uBAChB;AADgB,SAAA,wBAAA;AAAA,EAElB;AAAA,EAEA,MAAa,OAAO,SAAwB,OAAkC;AACvE,UAAA,WAAW,MAAM,KAAK,QAAQ,WAAW,QAAQ,EAAE,SAAS,MAAA,CAAO;AAErE,QAAA,CAAC,SAAS,IAAI;AACXA,YAAAA,WAAU,KAAK,sBAAsB,IAAI;AACzC,YAAA,cAAc,UAAUA,SAAQ,KAAK;AACrC,YAAA,2CAA2CA,SAAQ,QAAQ,uBAAuB,WAAW,oBAAoB,SAAS,MAAM,IAAI,SAAS,UAAU;AAAA,EAAK,MAAM,SAAS,KAAM,CAAA;AAAA,IACxL;AAAA,EACD;AAAA,EAEA,MAAc,QAAQ,MAAc,QAAgB,MAA8B;AAC3E,UAAA,UAAU,KAAK,sBAAsB,IAAI;AAC3C,QAAA,CAAC,QAAQ,eAAe;AACrB,YAAA,IAAI,MAAM,wBAAwB;AAAA,IACzC;AACA,WAAO,MAAM,MAAM,GAAG,QAAQ,aAAa,IAAI,IAAI,IAAI;AAAA,MACtD;AAAA,MACA,SAAS,EAAE,gBAAgB,oBAAoB,iBAAiB,UAAU,QAAQ,KAAK,GAAG;AAAA,MAC1F,MAAM,KAAK,UAAU,IAAI;AAAA,IAAA,CACzB;AAAA,EACF;AAED;"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6
|
+
class AdminDeployer {
|
|
7
|
+
constructor(remoteProjectProvider, adminClient, fs) {
|
|
8
|
+
this.remoteProjectProvider = remoteProjectProvider;
|
|
9
|
+
this.adminClient = adminClient;
|
|
10
|
+
this.fs = fs;
|
|
11
|
+
__publicField(this, "deploy", async ({ dir, root }) => {
|
|
12
|
+
console.log("Deploying admin...");
|
|
13
|
+
const files = await this.readAdminFiles(dir);
|
|
14
|
+
const project = root ? null : this.remoteProjectProvider.get().name;
|
|
15
|
+
await this.adminClient.deploy(project, files);
|
|
16
|
+
console.log(`Admin deployed (${files.length} files)`);
|
|
17
|
+
});
|
|
18
|
+
__publicField(this, "readAdminFiles", async (dir, prefix = "") => {
|
|
19
|
+
const files = [];
|
|
20
|
+
for (const fileName of await this.fs.readDir(dir, { withFileTypes: true })) {
|
|
21
|
+
if (fileName.isDirectory()) {
|
|
22
|
+
const subFiles = await this.readAdminFiles(`${dir}/${fileName.name}`, prefix + fileName.name + "/");
|
|
23
|
+
files.push(...subFiles);
|
|
24
|
+
} else if (fileName.isFile()) {
|
|
25
|
+
files.push({
|
|
26
|
+
path: prefix + fileName.name,
|
|
27
|
+
data: (await this.fs.readFile(`${dir}/${fileName.name}`)).toString("base64")
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return files;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.AdminDeployer = AdminDeployer;
|
|
36
|
+
//# sourceMappingURL=AdminDeployer.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdminDeployer.cjs","sources":["../../../../../../packages/cli/src/lib/admin/AdminDeployer.ts"],"sourcesContent":["import { AdminClient, AdminFiles } from './AdminClient'\nimport { FileSystem } from '../fs/FileSystem'\nimport { RemoteProjectProvider } from '../project/RemoteProjectProvider'\n\nexport class AdminDeployer {\n\tconstructor(\n\t\tprivate readonly remoteProjectProvider: RemoteProjectProvider,\n\t\tprivate readonly adminClient: AdminClient,\n\t\tprivate readonly fs: FileSystem,\n\t) {\n\t}\n\n\tpublic deploy = async ({ dir, root }: {\n\t\tdir: string\n\t\troot: boolean\n\t}) => {\n\t\tconsole.log('Deploying admin...')\n\t\tconst files = await this.readAdminFiles(dir)\n\t\tconst project = root ? null : this.remoteProjectProvider.get().name\n\n\t\t// in some cases you need deploy whole folder with custom build etc.\n\t\t// with root option you can build app on your own and simply deploy it with subprojects\n\t\tawait this.adminClient.deploy(project, files)\n\n\t\tconsole.log(`Admin deployed (${files.length} files)`)\n\t}\n\n\n\tprivate readAdminFiles = async (dir: string, prefix: string = ''): Promise<AdminFiles> => {\n\t\tconst files = []\n\t\tfor (const fileName of await this.fs.readDir(dir, { withFileTypes: true })) {\n\t\t\tif (fileName.isDirectory()) {\n\t\t\t\tconst subFiles = await this.readAdminFiles(`${dir}/${fileName.name}`, prefix + fileName.name + '/')\n\t\t\t\tfiles.push(...subFiles)\n\t\t\t} else if (fileName.isFile()) {\n\t\t\t\tfiles.push({\n\t\t\t\t\tpath: prefix + fileName.name,\n\t\t\t\t\tdata: (await this.fs.readFile(`${dir}/${fileName.name}`)).toString('base64'),\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\treturn files\n\t}\n}\n"],"names":[],"mappings":";;;;;AAIO,MAAM,cAAc;AAAA,EAC1B,YACkB,uBACA,aACA,IAChB;AAHgB,SAAA,wBAAA;AACA,SAAA,cAAA;AACA,SAAA,KAAA;AAIlB,kBAAA,MAAO,UAAS,OAAO,EAAE,KAAK,WAGxB;AACL,cAAQ,IAAI,oBAAoB;AAChC,YAAM,QAAQ,MAAM,KAAK,eAAe,GAAG;AAC3C,YAAM,UAAU,OAAO,OAAO,KAAK,sBAAsB,IAAM,EAAA;AAI/D,YAAM,KAAK,YAAY,OAAO,SAAS,KAAK;AAE5C,cAAQ,IAAI,mBAAmB,MAAM,MAAM,SAAS;AAAA,IAAA,CACrD;AAGA,kBAAA,MAAQ,kBAAiB,OAAO,KAAa,SAAiB,OAA4B;AACzF,YAAM,QAAQ,CAAA;AACH,iBAAA,YAAY,MAAM,KAAK,GAAG,QAAQ,KAAK,EAAE,eAAe,KAAK,CAAC,GAAG;AACvE,YAAA,SAAS,eAAe;AAC3B,gBAAM,WAAW,MAAM,KAAK,eAAe,GAAG,GAAG,IAAI,SAAS,IAAI,IAAI,SAAS,SAAS,OAAO,GAAG;AAC5F,gBAAA,KAAK,GAAG,QAAQ;AAAA,QAAA,WACZ,SAAS,UAAU;AAC7B,gBAAM,KAAK;AAAA,YACV,MAAM,SAAS,SAAS;AAAA,YACxB,OAAO,MAAM,KAAK,GAAG,SAAS,GAAG,GAAG,IAAI,SAAS,IAAI,EAAE,GAAG,SAAS,QAAQ;AAAA,UAAA,CAC3E;AAAA,QACF;AAAA,MACD;AAEO,aAAA;AAAA,IAAA,CACR;AAAA,EAjCA;AAkCD;;"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
class AdminDeployer {
|
|
5
|
+
constructor(remoteProjectProvider, adminClient, fs) {
|
|
6
|
+
this.remoteProjectProvider = remoteProjectProvider;
|
|
7
|
+
this.adminClient = adminClient;
|
|
8
|
+
this.fs = fs;
|
|
9
|
+
__publicField(this, "deploy", async ({ dir, root }) => {
|
|
10
|
+
console.log("Deploying admin...");
|
|
11
|
+
const files = await this.readAdminFiles(dir);
|
|
12
|
+
const project = root ? null : this.remoteProjectProvider.get().name;
|
|
13
|
+
await this.adminClient.deploy(project, files);
|
|
14
|
+
console.log(`Admin deployed (${files.length} files)`);
|
|
15
|
+
});
|
|
16
|
+
__publicField(this, "readAdminFiles", async (dir, prefix = "") => {
|
|
17
|
+
const files = [];
|
|
18
|
+
for (const fileName of await this.fs.readDir(dir, { withFileTypes: true })) {
|
|
19
|
+
if (fileName.isDirectory()) {
|
|
20
|
+
const subFiles = await this.readAdminFiles(`${dir}/${fileName.name}`, prefix + fileName.name + "/");
|
|
21
|
+
files.push(...subFiles);
|
|
22
|
+
} else if (fileName.isFile()) {
|
|
23
|
+
files.push({
|
|
24
|
+
path: prefix + fileName.name,
|
|
25
|
+
data: (await this.fs.readFile(`${dir}/${fileName.name}`)).toString("base64")
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return files;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
AdminDeployer
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=AdminDeployer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdminDeployer.js","sources":["../../../../../../packages/cli/src/lib/admin/AdminDeployer.ts"],"sourcesContent":["import { AdminClient, AdminFiles } from './AdminClient'\nimport { FileSystem } from '../fs/FileSystem'\nimport { RemoteProjectProvider } from '../project/RemoteProjectProvider'\n\nexport class AdminDeployer {\n\tconstructor(\n\t\tprivate readonly remoteProjectProvider: RemoteProjectProvider,\n\t\tprivate readonly adminClient: AdminClient,\n\t\tprivate readonly fs: FileSystem,\n\t) {\n\t}\n\n\tpublic deploy = async ({ dir, root }: {\n\t\tdir: string\n\t\troot: boolean\n\t}) => {\n\t\tconsole.log('Deploying admin...')\n\t\tconst files = await this.readAdminFiles(dir)\n\t\tconst project = root ? null : this.remoteProjectProvider.get().name\n\n\t\t// in some cases you need deploy whole folder with custom build etc.\n\t\t// with root option you can build app on your own and simply deploy it with subprojects\n\t\tawait this.adminClient.deploy(project, files)\n\n\t\tconsole.log(`Admin deployed (${files.length} files)`)\n\t}\n\n\n\tprivate readAdminFiles = async (dir: string, prefix: string = ''): Promise<AdminFiles> => {\n\t\tconst files = []\n\t\tfor (const fileName of await this.fs.readDir(dir, { withFileTypes: true })) {\n\t\t\tif (fileName.isDirectory()) {\n\t\t\t\tconst subFiles = await this.readAdminFiles(`${dir}/${fileName.name}`, prefix + fileName.name + '/')\n\t\t\t\tfiles.push(...subFiles)\n\t\t\t} else if (fileName.isFile()) {\n\t\t\t\tfiles.push({\n\t\t\t\t\tpath: prefix + fileName.name,\n\t\t\t\t\tdata: (await this.fs.readFile(`${dir}/${fileName.name}`)).toString('base64'),\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\treturn files\n\t}\n}\n"],"names":[],"mappings":";;;AAIO,MAAM,cAAc;AAAA,EAC1B,YACkB,uBACA,aACA,IAChB;AAHgB,SAAA,wBAAA;AACA,SAAA,cAAA;AACA,SAAA,KAAA;AAIlB,kBAAA,MAAO,UAAS,OAAO,EAAE,KAAK,WAGxB;AACL,cAAQ,IAAI,oBAAoB;AAChC,YAAM,QAAQ,MAAM,KAAK,eAAe,GAAG;AAC3C,YAAM,UAAU,OAAO,OAAO,KAAK,sBAAsB,IAAM,EAAA;AAI/D,YAAM,KAAK,YAAY,OAAO,SAAS,KAAK;AAE5C,cAAQ,IAAI,mBAAmB,MAAM,MAAM,SAAS;AAAA,IAAA,CACrD;AAGA,kBAAA,MAAQ,kBAAiB,OAAO,KAAa,SAAiB,OAA4B;AACzF,YAAM,QAAQ,CAAA;AACH,iBAAA,YAAY,MAAM,KAAK,GAAG,QAAQ,KAAK,EAAE,eAAe,KAAK,CAAC,GAAG;AACvE,YAAA,SAAS,eAAe;AAC3B,gBAAM,WAAW,MAAM,KAAK,eAAe,GAAG,GAAG,IAAI,SAAS,IAAI,IAAI,SAAS,SAAS,OAAO,GAAG;AAC5F,gBAAA,KAAK,GAAG,QAAQ;AAAA,QAAA,WACZ,SAAS,UAAU;AAC7B,gBAAM,KAAK;AAAA,YACV,MAAM,SAAS,SAAS;AAAA,YACxB,OAAO,MAAM,KAAK,GAAG,SAAS,GAAG,GAAG,IAAI,SAAS,IAAI,EAAE,GAAG,SAAS,QAAQ;AAAA,UAAA,CAC3E;AAAA,QACF;AAAA,MACD;AAEO,aAAA;AAAA,IAAA,CACR;AAAA,EAjCA;AAkCD;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assertNever.cjs","sources":["../../../../../packages/cli/src/lib/assertNever.ts"],"sourcesContent":["export function assertNever(_: never): never {\n\tthrow new Error()\n}\n"],"names":[],"mappings":";;AAAO,SAAS,YAAY,GAAiB;AAC5C,QAAM,IAAI,MAAM;AACjB;;"}
|