@contember/cli 1.4.0-rc.7 → 2.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dockerfile +0 -1
- package/build.sh +1 -1
- package/dist/development/run.cjs +31 -0
- package/dist/development/run.cjs.map +1 -0
- package/dist/development/run.js +30 -0
- package/dist/development/run.js.map +1 -0
- package/dist/development/src/commands/deploy/DeployCommand.cjs +87 -0
- package/dist/development/src/commands/deploy/DeployCommand.cjs.map +1 -0
- package/dist/development/src/commands/deploy/DeployCommand.js +87 -0
- package/dist/development/src/commands/deploy/DeployCommand.js.map +1 -0
- package/dist/development/src/commands/migrations/MigrationAmendCommand.cjs +123 -0
- package/dist/development/src/commands/migrations/MigrationAmendCommand.cjs.map +1 -0
- package/dist/development/src/commands/migrations/MigrationAmendCommand.js +123 -0
- package/dist/development/src/commands/migrations/MigrationAmendCommand.js.map +1 -0
- package/dist/development/src/commands/migrations/MigrationBlankCommand.cjs +23 -0
- package/dist/development/src/commands/migrations/MigrationBlankCommand.cjs.map +1 -0
- package/dist/development/src/commands/migrations/MigrationBlankCommand.js +23 -0
- package/dist/development/src/commands/migrations/MigrationBlankCommand.js.map +1 -0
- package/dist/development/src/commands/migrations/MigrationDescribeCommand.cjs +30 -0
- package/dist/development/src/commands/migrations/MigrationDescribeCommand.cjs.map +1 -0
- package/dist/development/src/commands/migrations/MigrationDescribeCommand.js +30 -0
- package/dist/development/src/commands/migrations/MigrationDescribeCommand.js.map +1 -0
- package/dist/development/src/commands/migrations/MigrationDiffCommand.cjs +76 -0
- package/dist/development/src/commands/migrations/MigrationDiffCommand.cjs.map +1 -0
- package/dist/development/src/commands/migrations/MigrationDiffCommand.js +76 -0
- package/dist/development/src/commands/migrations/MigrationDiffCommand.js.map +1 -0
- package/dist/development/src/commands/migrations/MigrationExecuteCommand.cjs +26 -0
- package/dist/development/src/commands/migrations/MigrationExecuteCommand.cjs.map +1 -0
- package/dist/development/src/commands/migrations/MigrationExecuteCommand.js +26 -0
- package/dist/development/src/commands/migrations/MigrationExecuteCommand.js.map +1 -0
- package/dist/development/src/commands/migrations/MigrationRebaseCommand.cjs +31 -0
- package/dist/development/src/commands/migrations/MigrationRebaseCommand.cjs.map +1 -0
- package/dist/development/src/commands/migrations/MigrationRebaseCommand.js +31 -0
- package/dist/development/src/commands/migrations/MigrationRebaseCommand.js.map +1 -0
- package/dist/development/src/commands/migrations/MigrationStatusCommand.cjs +57 -0
- package/dist/development/src/commands/migrations/MigrationStatusCommand.cjs.map +1 -0
- package/dist/development/src/commands/migrations/MigrationStatusCommand.js +57 -0
- package/dist/development/src/commands/migrations/MigrationStatusCommand.js.map +1 -0
- package/dist/development/src/commands/misc/VersionCommand.cjs +18 -0
- package/dist/development/src/commands/misc/VersionCommand.cjs.map +1 -0
- package/dist/development/src/commands/misc/VersionCommand.js +18 -0
- package/dist/development/src/commands/misc/VersionCommand.js.map +1 -0
- package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.cjs +36 -0
- package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.cjs.map +1 -0
- package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.js +36 -0
- package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.js.map +1 -0
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.cjs +69 -0
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -0
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.js +69 -0
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -0
- package/dist/development/src/commands/project/ProjectValidateCommand.cjs +40 -0
- package/dist/development/src/commands/project/ProjectValidateCommand.cjs.map +1 -0
- package/dist/development/src/commands/project/ProjectValidateCommand.js +40 -0
- package/dist/development/src/commands/project/ProjectValidateCommand.js.map +1 -0
- package/dist/development/src/commands/transfer/ExportCommand.cjs +66 -0
- package/dist/development/src/commands/transfer/ExportCommand.cjs.map +1 -0
- package/dist/development/src/commands/transfer/ExportCommand.js +66 -0
- package/dist/development/src/commands/transfer/ExportCommand.js.map +1 -0
- package/dist/development/src/commands/transfer/ImportCommand.cjs +60 -0
- package/dist/development/src/commands/transfer/ImportCommand.cjs.map +1 -0
- package/dist/development/src/commands/transfer/ImportCommand.js +60 -0
- package/dist/development/src/commands/transfer/ImportCommand.js.map +1 -0
- package/dist/development/src/commands/transfer/TransferCommand.cjs +73 -0
- package/dist/development/src/commands/transfer/TransferCommand.cjs.map +1 -0
- package/dist/development/src/commands/transfer/TransferCommand.js +73 -0
- package/dist/development/src/commands/transfer/TransferCommand.js.map +1 -0
- package/dist/development/src/commands/transfer/utils.cjs +22 -0
- package/dist/development/src/commands/transfer/utils.cjs.map +1 -0
- package/dist/development/src/commands/transfer/utils.js +22 -0
- package/dist/development/src/commands/transfer/utils.js.map +1 -0
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.cjs +54 -0
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.cjs.map +1 -0
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.js +54 -0
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +1 -0
- package/dist/development/src/consts.cjs +10 -0
- package/dist/development/src/consts.cjs.map +1 -0
- package/dist/development/src/consts.js +9 -0
- package/dist/development/src/consts.js.map +1 -0
- package/dist/development/src/dic.cjs +116 -0
- package/dist/development/src/dic.cjs.map +1 -0
- package/dist/development/src/dic.js +116 -0
- package/dist/development/src/dic.js.map +1 -0
- package/dist/development/src/lib/SystemClientProvider.cjs +14 -0
- package/dist/development/src/lib/SystemClientProvider.cjs.map +1 -0
- package/dist/development/src/lib/SystemClientProvider.js +14 -0
- package/dist/development/src/lib/SystemClientProvider.js.map +1 -0
- package/dist/development/src/lib/TenantClientProvider.cjs +14 -0
- package/dist/development/src/lib/TenantClientProvider.cjs.map +1 -0
- package/dist/development/src/lib/TenantClientProvider.js +14 -0
- package/dist/development/src/lib/TenantClientProvider.js.map +1 -0
- package/dist/development/src/lib/VersionChecker.cjs +85 -0
- package/dist/development/src/lib/VersionChecker.cjs.map +1 -0
- package/dist/development/src/lib/VersionChecker.js +68 -0
- package/dist/development/src/lib/VersionChecker.js.map +1 -0
- package/dist/development/src/lib/admin/AdminClient.cjs +30 -0
- package/dist/development/src/lib/admin/AdminClient.cjs.map +1 -0
- package/dist/development/src/lib/admin/AdminClient.js +30 -0
- package/dist/development/src/lib/admin/AdminClient.js.map +1 -0
- package/dist/development/src/lib/admin/AdminDeployer.cjs +36 -0
- package/dist/development/src/lib/admin/AdminDeployer.cjs.map +1 -0
- package/dist/development/src/lib/admin/AdminDeployer.js +36 -0
- package/dist/development/src/lib/admin/AdminDeployer.js.map +1 -0
- package/dist/development/src/lib/assertNever.cjs +7 -0
- package/dist/development/src/lib/assertNever.cjs.map +1 -0
- package/dist/development/src/lib/assertNever.js +7 -0
- package/dist/development/src/lib/assertNever.js.map +1 -0
- package/dist/development/src/lib/dsn.cjs +16 -0
- package/dist/development/src/lib/dsn.cjs.map +1 -0
- package/dist/development/src/lib/dsn.js +16 -0
- package/dist/development/src/lib/dsn.js.map +1 -0
- package/dist/development/src/lib/env.cjs +15 -0
- package/dist/development/src/lib/env.cjs.map +1 -0
- package/dist/development/src/lib/env.js +15 -0
- package/dist/development/src/lib/env.js.map +1 -0
- package/dist/development/src/lib/fs/DockerComposeManager.cjs +41 -0
- package/dist/development/src/lib/fs/DockerComposeManager.cjs.map +1 -0
- package/dist/development/src/lib/fs/DockerComposeManager.js +41 -0
- package/dist/development/src/lib/fs/DockerComposeManager.js.map +1 -0
- package/dist/development/src/lib/fs/FileSystem.cjs +43 -0
- package/dist/development/src/lib/fs/FileSystem.cjs.map +1 -0
- package/dist/development/src/lib/fs/FileSystem.js +27 -0
- package/dist/development/src/lib/fs/FileSystem.js.map +1 -0
- package/dist/development/src/lib/fs/YamlHandler.cjs +48 -0
- package/dist/development/src/lib/fs/YamlHandler.cjs.map +1 -0
- package/dist/development/src/lib/fs/YamlHandler.js +48 -0
- package/dist/development/src/lib/fs/YamlHandler.js.map +1 -0
- package/dist/development/src/lib/js/EsBuildBuilder.cjs +36 -0
- package/dist/development/src/lib/js/EsBuildBuilder.cjs.map +1 -0
- package/dist/development/src/lib/js/EsBuildBuilder.js +19 -0
- package/dist/development/src/lib/js/EsBuildBuilder.js.map +1 -0
- package/dist/development/src/lib/js/EvalExecutor.cjs +10 -0
- package/dist/development/src/lib/js/EvalExecutor.cjs.map +1 -0
- package/dist/development/src/lib/js/EvalExecutor.js +10 -0
- package/dist/development/src/lib/js/EvalExecutor.js.map +1 -0
- package/dist/development/src/lib/js/JsCodeRunner.cjs +17 -0
- package/dist/development/src/lib/js/JsCodeRunner.cjs.map +1 -0
- package/dist/development/src/lib/js/JsCodeRunner.js +17 -0
- package/dist/development/src/lib/js/JsCodeRunner.js.map +1 -0
- package/dist/development/src/lib/maskToken.cjs +5 -0
- package/dist/development/src/lib/maskToken.cjs.map +1 -0
- package/dist/development/src/lib/maskToken.js +5 -0
- package/dist/development/src/lib/maskToken.js.map +1 -0
- package/dist/development/src/lib/migrations/MigrationExecutionFacade.cjs +84 -0
- package/dist/development/src/lib/migrations/MigrationExecutionFacade.cjs.map +1 -0
- package/dist/development/src/lib/migrations/MigrationExecutionFacade.js +84 -0
- package/dist/development/src/lib/migrations/MigrationExecutionFacade.js.map +1 -0
- package/dist/development/src/lib/migrations/MigrationPrinter.cjs +82 -0
- package/dist/development/src/lib/migrations/MigrationPrinter.cjs.map +1 -0
- package/dist/development/src/lib/migrations/MigrationPrinter.js +82 -0
- package/dist/development/src/lib/migrations/MigrationPrinter.js.map +1 -0
- package/dist/development/src/lib/migrations/MigrationRebaseFacade.cjs +41 -0
- package/dist/development/src/lib/migrations/MigrationRebaseFacade.cjs.map +1 -0
- package/dist/development/src/lib/migrations/MigrationRebaseFacade.js +41 -0
- package/dist/development/src/lib/migrations/MigrationRebaseFacade.js.map +1 -0
- package/dist/development/src/lib/migrations/MigrationsStatusFacade.cjs +27 -0
- package/dist/development/src/lib/migrations/MigrationsStatusFacade.cjs.map +1 -0
- package/dist/development/src/lib/migrations/MigrationsStatusFacade.js +27 -0
- package/dist/development/src/lib/migrations/MigrationsStatusFacade.js.map +1 -0
- package/dist/development/src/lib/migrations/MigrationsValidator.cjs +38 -0
- package/dist/development/src/lib/migrations/MigrationsValidator.cjs.map +1 -0
- package/dist/development/src/lib/migrations/MigrationsValidator.js +38 -0
- package/dist/development/src/lib/migrations/MigrationsValidator.js.map +1 -0
- package/dist/development/src/lib/migrations/migrations.cjs +43 -0
- package/dist/development/src/lib/migrations/migrations.cjs.map +1 -0
- package/dist/development/src/lib/migrations/migrations.js +43 -0
- package/dist/development/src/lib/migrations/migrations.js.map +1 -0
- package/dist/development/src/lib/project/RemoteProject.cjs +12 -0
- package/dist/development/src/lib/project/RemoteProject.cjs.map +1 -0
- package/dist/development/src/lib/project/RemoteProject.js +12 -0
- package/dist/development/src/lib/project/RemoteProject.js.map +1 -0
- package/dist/development/src/lib/project/RemoteProjectProvider.cjs +21 -0
- package/dist/development/src/lib/project/RemoteProjectProvider.cjs.map +1 -0
- package/dist/development/src/lib/project/RemoteProjectProvider.js +21 -0
- package/dist/development/src/lib/project/RemoteProjectProvider.js.map +1 -0
- package/dist/development/src/lib/project/RemoteProjectResolver.cjs +29 -0
- package/dist/development/src/lib/project/RemoteProjectResolver.cjs.map +1 -0
- package/dist/development/src/lib/project/RemoteProjectResolver.js +29 -0
- package/dist/development/src/lib/project/RemoteProjectResolver.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/EntityInfo.cjs +199 -0
- package/dist/development/src/lib/project/docs/components/EntityInfo.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/EntityInfo.js +199 -0
- package/dist/development/src/lib/project/docs/components/EntityInfo.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/EntityLink.cjs +11 -0
- package/dist/development/src/lib/project/docs/components/EntityLink.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/EntityLink.js +11 -0
- package/dist/development/src/lib/project/docs/components/EntityLink.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/FieldLink.cjs +31 -0
- package/dist/development/src/lib/project/docs/components/FieldLink.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/FieldLink.js +31 -0
- package/dist/development/src/lib/project/docs/components/FieldLink.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/FieldPermissions.cjs +33 -0
- package/dist/development/src/lib/project/docs/components/FieldPermissions.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/FieldPermissions.js +33 -0
- package/dist/development/src/lib/project/docs/components/FieldPermissions.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/FieldType.cjs +135 -0
- package/dist/development/src/lib/project/docs/components/FieldType.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/FieldType.js +135 -0
- package/dist/development/src/lib/project/docs/components/FieldType.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/OnDelete.cjs +134 -0
- package/dist/development/src/lib/project/docs/components/OnDelete.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/OnDelete.js +134 -0
- package/dist/development/src/lib/project/docs/components/OnDelete.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/ProjectInfo.cjs +96 -0
- package/dist/development/src/lib/project/docs/components/ProjectInfo.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/ProjectInfo.js +96 -0
- package/dist/development/src/lib/project/docs/components/ProjectInfo.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/SinglePermission.cjs +26 -0
- package/dist/development/src/lib/project/docs/components/SinglePermission.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/SinglePermission.js +26 -0
- package/dist/development/src/lib/project/docs/components/SinglePermission.js.map +1 -0
- package/dist/development/src/lib/project/docs/components/utils.cjs +7 -0
- package/dist/development/src/lib/project/docs/components/utils.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/components/utils.js +7 -0
- package/dist/development/src/lib/project/docs/components/utils.js.map +1 -0
- package/dist/development/src/lib/project/docs/projectDescribe.cjs +32 -0
- package/dist/development/src/lib/project/docs/projectDescribe.cjs.map +1 -0
- package/dist/development/src/lib/project/docs/projectDescribe.js +31 -0
- package/dist/development/src/lib/project/docs/projectDescribe.js.map +1 -0
- package/dist/development/src/lib/schema/SchemaLoader.cjs +49 -0
- package/dist/development/src/lib/schema/SchemaLoader.cjs.map +1 -0
- package/dist/development/src/lib/schema/SchemaLoader.js +32 -0
- package/dist/development/src/lib/schema/SchemaLoader.js.map +1 -0
- package/dist/development/src/lib/schema/SchemaValidationHelper.cjs +11 -0
- package/dist/development/src/lib/schema/SchemaValidationHelper.cjs.map +1 -0
- package/dist/development/src/lib/schema/SchemaValidationHelper.js +11 -0
- package/dist/development/src/lib/schema/SchemaValidationHelper.js.map +1 -0
- package/dist/development/src/lib/schema/SchemaValidationPrinter.cjs +14 -0
- package/dist/development/src/lib/schema/SchemaValidationPrinter.cjs.map +1 -0
- package/dist/development/src/lib/schema/SchemaValidationPrinter.js +14 -0
- package/dist/development/src/lib/schema/SchemaValidationPrinter.js.map +1 -0
- package/dist/development/src/lib/schema/collectReferences.cjs +34 -0
- package/dist/development/src/lib/schema/collectReferences.cjs.map +1 -0
- package/dist/development/src/lib/schema/collectReferences.js +34 -0
- package/dist/development/src/lib/schema/collectReferences.js.map +1 -0
- package/dist/development/src/lib/stream.cjs +43 -0
- package/dist/development/src/lib/stream.cjs.map +1 -0
- package/dist/development/src/lib/stream.js +43 -0
- package/dist/development/src/lib/stream.js.map +1 -0
- package/dist/development/src/lib/tenant/TenantClient.cjs +45 -0
- package/dist/development/src/lib/tenant/TenantClient.cjs.map +1 -0
- package/dist/development/src/lib/tenant/TenantClient.js +45 -0
- package/dist/development/src/lib/tenant/TenantClient.js.map +1 -0
- package/dist/development/src/lib/transfer/DataTransferClient.cjs +97 -0
- package/dist/development/src/lib/transfer/DataTransferClient.cjs.map +1 -0
- package/dist/development/src/lib/transfer/DataTransferClient.js +97 -0
- package/dist/development/src/lib/transfer/DataTransferClient.js.map +1 -0
- package/dist/development/src/lib/transfer/stdio.cjs +12 -0
- package/dist/development/src/lib/transfer/stdio.cjs.map +1 -0
- package/dist/development/src/lib/transfer/stdio.js +12 -0
- package/dist/development/src/lib/transfer/stdio.js.map +1 -0
- package/dist/development/src/lib/workspace/WorkspaceResolver.cjs +38 -0
- package/dist/development/src/lib/workspace/WorkspaceResolver.cjs.map +1 -0
- package/dist/development/src/lib/workspace/WorkspaceResolver.js +38 -0
- package/dist/development/src/lib/workspace/WorkspaceResolver.js.map +1 -0
- package/dist/production/run.cjs +31 -0
- package/dist/production/run.cjs.map +1 -0
- package/dist/production/run.js +30 -0
- package/dist/production/run.js.map +1 -0
- package/dist/production/src/commands/deploy/DeployCommand.cjs +87 -0
- package/dist/production/src/commands/deploy/DeployCommand.cjs.map +1 -0
- package/dist/production/src/commands/deploy/DeployCommand.js +87 -0
- package/dist/production/src/commands/deploy/DeployCommand.js.map +1 -0
- package/dist/production/src/commands/migrations/MigrationAmendCommand.cjs +123 -0
- package/dist/production/src/commands/migrations/MigrationAmendCommand.cjs.map +1 -0
- package/dist/production/src/commands/migrations/MigrationAmendCommand.js +123 -0
- package/dist/production/src/commands/migrations/MigrationAmendCommand.js.map +1 -0
- package/dist/production/src/commands/migrations/MigrationBlankCommand.cjs +23 -0
- package/dist/production/src/commands/migrations/MigrationBlankCommand.cjs.map +1 -0
- package/dist/production/src/commands/migrations/MigrationBlankCommand.js +23 -0
- package/dist/production/src/commands/migrations/MigrationBlankCommand.js.map +1 -0
- package/dist/production/src/commands/migrations/MigrationDescribeCommand.cjs +30 -0
- package/dist/production/src/commands/migrations/MigrationDescribeCommand.cjs.map +1 -0
- package/dist/production/src/commands/migrations/MigrationDescribeCommand.js +30 -0
- package/dist/production/src/commands/migrations/MigrationDescribeCommand.js.map +1 -0
- package/dist/production/src/commands/migrations/MigrationDiffCommand.cjs +76 -0
- package/dist/production/src/commands/migrations/MigrationDiffCommand.cjs.map +1 -0
- package/dist/production/src/commands/migrations/MigrationDiffCommand.js +76 -0
- package/dist/production/src/commands/migrations/MigrationDiffCommand.js.map +1 -0
- package/dist/production/src/commands/migrations/MigrationExecuteCommand.cjs +26 -0
- package/dist/production/src/commands/migrations/MigrationExecuteCommand.cjs.map +1 -0
- package/dist/production/src/commands/migrations/MigrationExecuteCommand.js +26 -0
- package/dist/production/src/commands/migrations/MigrationExecuteCommand.js.map +1 -0
- package/dist/production/src/commands/migrations/MigrationRebaseCommand.cjs +31 -0
- package/dist/production/src/commands/migrations/MigrationRebaseCommand.cjs.map +1 -0
- package/dist/production/src/commands/migrations/MigrationRebaseCommand.js +31 -0
- package/dist/production/src/commands/migrations/MigrationRebaseCommand.js.map +1 -0
- package/dist/production/src/commands/migrations/MigrationStatusCommand.cjs +57 -0
- package/dist/production/src/commands/migrations/MigrationStatusCommand.cjs.map +1 -0
- package/dist/production/src/commands/migrations/MigrationStatusCommand.js +57 -0
- package/dist/production/src/commands/migrations/MigrationStatusCommand.js.map +1 -0
- package/dist/production/src/commands/misc/VersionCommand.cjs +18 -0
- package/dist/production/src/commands/misc/VersionCommand.cjs.map +1 -0
- package/dist/production/src/commands/misc/VersionCommand.js +18 -0
- package/dist/production/src/commands/misc/VersionCommand.js.map +1 -0
- package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.cjs +36 -0
- package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.cjs.map +1 -0
- package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.js +36 -0
- package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.js.map +1 -0
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.cjs +69 -0
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -0
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.js +69 -0
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -0
- package/dist/production/src/commands/project/ProjectValidateCommand.cjs +40 -0
- package/dist/production/src/commands/project/ProjectValidateCommand.cjs.map +1 -0
- package/dist/production/src/commands/project/ProjectValidateCommand.js +40 -0
- package/dist/production/src/commands/project/ProjectValidateCommand.js.map +1 -0
- package/dist/production/src/commands/transfer/ExportCommand.cjs +66 -0
- package/dist/production/src/commands/transfer/ExportCommand.cjs.map +1 -0
- package/dist/production/src/commands/transfer/ExportCommand.js +66 -0
- package/dist/production/src/commands/transfer/ExportCommand.js.map +1 -0
- package/dist/production/src/commands/transfer/ImportCommand.cjs +60 -0
- package/dist/production/src/commands/transfer/ImportCommand.cjs.map +1 -0
- package/dist/production/src/commands/transfer/ImportCommand.js +60 -0
- package/dist/production/src/commands/transfer/ImportCommand.js.map +1 -0
- package/dist/production/src/commands/transfer/TransferCommand.cjs +73 -0
- package/dist/production/src/commands/transfer/TransferCommand.cjs.map +1 -0
- package/dist/production/src/commands/transfer/TransferCommand.js +73 -0
- package/dist/production/src/commands/transfer/TransferCommand.js.map +1 -0
- package/dist/production/src/commands/transfer/utils.cjs +22 -0
- package/dist/production/src/commands/transfer/utils.cjs.map +1 -0
- package/dist/production/src/commands/transfer/utils.js +22 -0
- package/dist/production/src/commands/transfer/utils.js.map +1 -0
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.cjs +54 -0
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.cjs.map +1 -0
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.js +54 -0
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +1 -0
- package/dist/production/src/consts.cjs +10 -0
- package/dist/production/src/consts.cjs.map +1 -0
- package/dist/production/src/consts.js +9 -0
- package/dist/production/src/consts.js.map +1 -0
- package/dist/production/src/dic.cjs +116 -0
- package/dist/production/src/dic.cjs.map +1 -0
- package/dist/production/src/dic.js +116 -0
- package/dist/production/src/dic.js.map +1 -0
- package/dist/production/src/lib/SystemClientProvider.cjs +14 -0
- package/dist/production/src/lib/SystemClientProvider.cjs.map +1 -0
- package/dist/production/src/lib/SystemClientProvider.js +14 -0
- package/dist/production/src/lib/SystemClientProvider.js.map +1 -0
- package/dist/production/src/lib/TenantClientProvider.cjs +14 -0
- package/dist/production/src/lib/TenantClientProvider.cjs.map +1 -0
- package/dist/production/src/lib/TenantClientProvider.js +14 -0
- package/dist/production/src/lib/TenantClientProvider.js.map +1 -0
- package/dist/production/src/lib/VersionChecker.cjs +85 -0
- package/dist/production/src/lib/VersionChecker.cjs.map +1 -0
- package/dist/production/src/lib/VersionChecker.js +68 -0
- package/dist/production/src/lib/VersionChecker.js.map +1 -0
- package/dist/production/src/lib/admin/AdminClient.cjs +30 -0
- package/dist/production/src/lib/admin/AdminClient.cjs.map +1 -0
- package/dist/production/src/lib/admin/AdminClient.js +30 -0
- package/dist/production/src/lib/admin/AdminClient.js.map +1 -0
- package/dist/production/src/lib/admin/AdminDeployer.cjs +36 -0
- package/dist/production/src/lib/admin/AdminDeployer.cjs.map +1 -0
- package/dist/production/src/lib/admin/AdminDeployer.js +36 -0
- package/dist/production/src/lib/admin/AdminDeployer.js.map +1 -0
- package/dist/production/src/lib/assertNever.cjs +7 -0
- package/dist/production/src/lib/assertNever.cjs.map +1 -0
- package/dist/production/src/lib/assertNever.js +7 -0
- package/dist/production/src/lib/assertNever.js.map +1 -0
- package/dist/production/src/lib/dsn.cjs +16 -0
- package/dist/production/src/lib/dsn.cjs.map +1 -0
- package/dist/production/src/lib/dsn.js +16 -0
- package/dist/production/src/lib/dsn.js.map +1 -0
- package/dist/production/src/lib/env.cjs +15 -0
- package/dist/production/src/lib/env.cjs.map +1 -0
- package/dist/production/src/lib/env.js +15 -0
- package/dist/production/src/lib/env.js.map +1 -0
- package/dist/production/src/lib/fs/DockerComposeManager.cjs +41 -0
- package/dist/production/src/lib/fs/DockerComposeManager.cjs.map +1 -0
- package/dist/production/src/lib/fs/DockerComposeManager.js +41 -0
- package/dist/production/src/lib/fs/DockerComposeManager.js.map +1 -0
- package/dist/production/src/lib/fs/FileSystem.cjs +43 -0
- package/dist/production/src/lib/fs/FileSystem.cjs.map +1 -0
- package/dist/production/src/lib/fs/FileSystem.js +27 -0
- package/dist/production/src/lib/fs/FileSystem.js.map +1 -0
- package/dist/production/src/lib/fs/YamlHandler.cjs +48 -0
- package/dist/production/src/lib/fs/YamlHandler.cjs.map +1 -0
- package/dist/production/src/lib/fs/YamlHandler.js +48 -0
- package/dist/production/src/lib/fs/YamlHandler.js.map +1 -0
- package/dist/production/src/lib/js/EsBuildBuilder.cjs +36 -0
- package/dist/production/src/lib/js/EsBuildBuilder.cjs.map +1 -0
- package/dist/production/src/lib/js/EsBuildBuilder.js +19 -0
- package/dist/production/src/lib/js/EsBuildBuilder.js.map +1 -0
- package/dist/production/src/lib/js/EvalExecutor.cjs +10 -0
- package/dist/production/src/lib/js/EvalExecutor.cjs.map +1 -0
- package/dist/production/src/lib/js/EvalExecutor.js +10 -0
- package/dist/production/src/lib/js/EvalExecutor.js.map +1 -0
- package/dist/production/src/lib/js/JsCodeRunner.cjs +17 -0
- package/dist/production/src/lib/js/JsCodeRunner.cjs.map +1 -0
- package/dist/production/src/lib/js/JsCodeRunner.js +17 -0
- package/dist/production/src/lib/js/JsCodeRunner.js.map +1 -0
- package/dist/production/src/lib/maskToken.cjs +5 -0
- package/dist/production/src/lib/maskToken.cjs.map +1 -0
- package/dist/production/src/lib/maskToken.js +5 -0
- package/dist/production/src/lib/maskToken.js.map +1 -0
- package/dist/production/src/lib/migrations/MigrationExecutionFacade.cjs +84 -0
- package/dist/production/src/lib/migrations/MigrationExecutionFacade.cjs.map +1 -0
- package/dist/production/src/lib/migrations/MigrationExecutionFacade.js +84 -0
- package/dist/production/src/lib/migrations/MigrationExecutionFacade.js.map +1 -0
- package/dist/production/src/lib/migrations/MigrationPrinter.cjs +82 -0
- package/dist/production/src/lib/migrations/MigrationPrinter.cjs.map +1 -0
- package/dist/production/src/lib/migrations/MigrationPrinter.js +82 -0
- package/dist/production/src/lib/migrations/MigrationPrinter.js.map +1 -0
- package/dist/production/src/lib/migrations/MigrationRebaseFacade.cjs +41 -0
- package/dist/production/src/lib/migrations/MigrationRebaseFacade.cjs.map +1 -0
- package/dist/production/src/lib/migrations/MigrationRebaseFacade.js +41 -0
- package/dist/production/src/lib/migrations/MigrationRebaseFacade.js.map +1 -0
- package/dist/production/src/lib/migrations/MigrationsStatusFacade.cjs +27 -0
- package/dist/production/src/lib/migrations/MigrationsStatusFacade.cjs.map +1 -0
- package/dist/production/src/lib/migrations/MigrationsStatusFacade.js +27 -0
- package/dist/production/src/lib/migrations/MigrationsStatusFacade.js.map +1 -0
- package/dist/production/src/lib/migrations/MigrationsValidator.cjs +38 -0
- package/dist/production/src/lib/migrations/MigrationsValidator.cjs.map +1 -0
- package/dist/production/src/lib/migrations/MigrationsValidator.js +38 -0
- package/dist/production/src/lib/migrations/MigrationsValidator.js.map +1 -0
- package/dist/production/src/lib/migrations/migrations.cjs +43 -0
- package/dist/production/src/lib/migrations/migrations.cjs.map +1 -0
- package/dist/production/src/lib/migrations/migrations.js +43 -0
- package/dist/production/src/lib/migrations/migrations.js.map +1 -0
- package/dist/production/src/lib/project/RemoteProject.cjs +12 -0
- package/dist/production/src/lib/project/RemoteProject.cjs.map +1 -0
- package/dist/production/src/lib/project/RemoteProject.js +12 -0
- package/dist/production/src/lib/project/RemoteProject.js.map +1 -0
- package/dist/production/src/lib/project/RemoteProjectProvider.cjs +21 -0
- package/dist/production/src/lib/project/RemoteProjectProvider.cjs.map +1 -0
- package/dist/production/src/lib/project/RemoteProjectProvider.js +21 -0
- package/dist/production/src/lib/project/RemoteProjectProvider.js.map +1 -0
- package/dist/production/src/lib/project/RemoteProjectResolver.cjs +29 -0
- package/dist/production/src/lib/project/RemoteProjectResolver.cjs.map +1 -0
- package/dist/production/src/lib/project/RemoteProjectResolver.js +29 -0
- package/dist/production/src/lib/project/RemoteProjectResolver.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/EntityInfo.cjs +77 -0
- package/dist/production/src/lib/project/docs/components/EntityInfo.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/EntityInfo.js +77 -0
- package/dist/production/src/lib/project/docs/components/EntityInfo.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/EntityLink.cjs +7 -0
- package/dist/production/src/lib/project/docs/components/EntityLink.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/EntityLink.js +7 -0
- package/dist/production/src/lib/project/docs/components/EntityLink.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/FieldLink.cjs +15 -0
- package/dist/production/src/lib/project/docs/components/FieldLink.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/FieldLink.js +15 -0
- package/dist/production/src/lib/project/docs/components/FieldLink.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/FieldPermissions.cjs +17 -0
- package/dist/production/src/lib/project/docs/components/FieldPermissions.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/FieldPermissions.js +17 -0
- package/dist/production/src/lib/project/docs/components/FieldPermissions.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/FieldType.cjs +59 -0
- package/dist/production/src/lib/project/docs/components/FieldType.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/FieldType.js +59 -0
- package/dist/production/src/lib/project/docs/components/FieldType.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/OnDelete.cjs +66 -0
- package/dist/production/src/lib/project/docs/components/OnDelete.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/OnDelete.js +66 -0
- package/dist/production/src/lib/project/docs/components/OnDelete.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/ProjectInfo.cjs +32 -0
- package/dist/production/src/lib/project/docs/components/ProjectInfo.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/ProjectInfo.js +32 -0
- package/dist/production/src/lib/project/docs/components/ProjectInfo.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/SinglePermission.cjs +14 -0
- package/dist/production/src/lib/project/docs/components/SinglePermission.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/SinglePermission.js +14 -0
- package/dist/production/src/lib/project/docs/components/SinglePermission.js.map +1 -0
- package/dist/production/src/lib/project/docs/components/utils.cjs +7 -0
- package/dist/production/src/lib/project/docs/components/utils.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/components/utils.js +7 -0
- package/dist/production/src/lib/project/docs/components/utils.js.map +1 -0
- package/dist/production/src/lib/project/docs/projectDescribe.cjs +28 -0
- package/dist/production/src/lib/project/docs/projectDescribe.cjs.map +1 -0
- package/dist/production/src/lib/project/docs/projectDescribe.js +27 -0
- package/dist/production/src/lib/project/docs/projectDescribe.js.map +1 -0
- package/dist/production/src/lib/schema/SchemaLoader.cjs +49 -0
- package/dist/production/src/lib/schema/SchemaLoader.cjs.map +1 -0
- package/dist/production/src/lib/schema/SchemaLoader.js +32 -0
- package/dist/production/src/lib/schema/SchemaLoader.js.map +1 -0
- package/dist/production/src/lib/schema/SchemaValidationHelper.cjs +11 -0
- package/dist/production/src/lib/schema/SchemaValidationHelper.cjs.map +1 -0
- package/dist/production/src/lib/schema/SchemaValidationHelper.js +11 -0
- package/dist/production/src/lib/schema/SchemaValidationHelper.js.map +1 -0
- package/dist/production/src/lib/schema/SchemaValidationPrinter.cjs +14 -0
- package/dist/production/src/lib/schema/SchemaValidationPrinter.cjs.map +1 -0
- package/dist/production/src/lib/schema/SchemaValidationPrinter.js +14 -0
- package/dist/production/src/lib/schema/SchemaValidationPrinter.js.map +1 -0
- package/dist/production/src/lib/schema/collectReferences.cjs +34 -0
- package/dist/production/src/lib/schema/collectReferences.cjs.map +1 -0
- package/dist/production/src/lib/schema/collectReferences.js +34 -0
- package/dist/production/src/lib/schema/collectReferences.js.map +1 -0
- package/dist/production/src/lib/stream.cjs +43 -0
- package/dist/production/src/lib/stream.cjs.map +1 -0
- package/dist/production/src/lib/stream.js +43 -0
- package/dist/production/src/lib/stream.js.map +1 -0
- package/dist/production/src/lib/tenant/TenantClient.cjs +45 -0
- package/dist/production/src/lib/tenant/TenantClient.cjs.map +1 -0
- package/dist/production/src/lib/tenant/TenantClient.js +45 -0
- package/dist/production/src/lib/tenant/TenantClient.js.map +1 -0
- package/dist/production/src/lib/transfer/DataTransferClient.cjs +97 -0
- package/dist/production/src/lib/transfer/DataTransferClient.cjs.map +1 -0
- package/dist/production/src/lib/transfer/DataTransferClient.js +97 -0
- package/dist/production/src/lib/transfer/DataTransferClient.js.map +1 -0
- package/dist/production/src/lib/transfer/stdio.cjs +12 -0
- package/dist/production/src/lib/transfer/stdio.cjs.map +1 -0
- package/dist/production/src/lib/transfer/stdio.js +12 -0
- package/dist/production/src/lib/transfer/stdio.js.map +1 -0
- package/dist/production/src/lib/workspace/WorkspaceResolver.cjs +38 -0
- package/dist/production/src/lib/workspace/WorkspaceResolver.cjs.map +1 -0
- package/dist/production/src/lib/workspace/WorkspaceResolver.js +38 -0
- package/dist/production/src/lib/workspace/WorkspaceResolver.js.map +1 -0
- package/dist/types/commands/deploy/DeployCommand.d.ts +30 -0
- package/dist/types/commands/deploy/DeployCommand.d.ts.map +1 -0
- package/dist/types/commands/index.d.ts +6 -0
- package/dist/types/commands/index.d.ts.map +1 -0
- package/dist/types/commands/migrations/MigrationAmendCommand.d.ts +32 -0
- package/dist/types/commands/migrations/MigrationAmendCommand.d.ts.map +1 -0
- package/dist/types/commands/migrations/MigrationBlankCommand.d.ts +15 -0
- package/dist/types/commands/migrations/MigrationBlankCommand.d.ts.map +1 -0
- package/dist/types/commands/migrations/MigrationDescribeCommand.d.ts +20 -0
- package/dist/types/commands/migrations/MigrationDescribeCommand.d.ts.map +1 -0
- package/dist/types/commands/migrations/MigrationDiffCommand.d.ts +25 -0
- package/dist/types/commands/migrations/MigrationDiffCommand.d.ts.map +1 -0
- package/dist/types/commands/migrations/MigrationExecuteCommand.d.ts +16 -0
- package/dist/types/commands/migrations/MigrationExecuteCommand.d.ts.map +1 -0
- package/dist/types/commands/migrations/MigrationRebaseCommand.d.ts +18 -0
- package/dist/types/commands/migrations/MigrationRebaseCommand.d.ts.map +1 -0
- package/dist/types/commands/migrations/MigrationStatusCommand.d.ts +22 -0
- package/dist/types/commands/migrations/MigrationStatusCommand.d.ts.map +1 -0
- package/dist/types/commands/misc/VersionCommand.d.ts +8 -0
- package/dist/types/commands/misc/VersionCommand.d.ts.map +1 -0
- package/dist/types/commands/project/ProjectGenerateDocumentationCommand.d.ts +15 -0
- package/dist/types/commands/project/ProjectGenerateDocumentationCommand.d.ts.map +1 -0
- package/dist/types/commands/project/ProjectPrintSchemaCommand.d.ts +19 -0
- package/dist/types/commands/project/ProjectPrintSchemaCommand.d.ts.map +1 -0
- package/dist/types/commands/project/ProjectValidateCommand.d.ts +19 -0
- package/dist/types/commands/project/ProjectValidateCommand.d.ts.map +1 -0
- package/dist/types/commands/project/index.d.ts +4 -0
- package/dist/types/commands/project/index.d.ts.map +1 -0
- package/dist/types/commands/transfer/ExportCommand.d.ts +23 -0
- package/dist/types/commands/transfer/ExportCommand.d.ts.map +1 -0
- package/dist/types/commands/transfer/ImportCommand.d.ts +20 -0
- package/dist/types/commands/transfer/ImportCommand.d.ts.map +1 -0
- package/dist/types/commands/transfer/TransferCommand.d.ts +21 -0
- package/dist/types/commands/transfer/TransferCommand.d.ts.map +1 -0
- package/dist/types/commands/transfer/utils.d.ts +5 -0
- package/dist/types/commands/transfer/utils.d.ts.map +1 -0
- package/dist/types/commands/workspace/WorkspaceUpdateApiCommand.d.ts +15 -0
- package/dist/types/commands/workspace/WorkspaceUpdateApiCommand.d.ts.map +1 -0
- package/dist/types/consts.d.ts +3 -0
- package/dist/types/consts.d.ts.map +1 -0
- package/dist/types/dic.d.ts +144 -0
- package/dist/types/dic.d.ts.map +1 -0
- package/dist/types/lib/SystemClientProvider.d.ts +8 -0
- package/dist/types/lib/SystemClientProvider.d.ts.map +1 -0
- package/dist/types/lib/TenantClientProvider.d.ts +8 -0
- package/dist/types/lib/TenantClientProvider.d.ts.map +1 -0
- package/dist/types/lib/VersionChecker.d.ts +11 -0
- package/dist/types/lib/VersionChecker.d.ts.map +1 -0
- package/dist/types/lib/admin/AdminClient.d.ts +12 -0
- package/dist/types/lib/admin/AdminClient.d.ts.map +1 -0
- package/dist/types/lib/admin/AdminDeployer.d.ts +15 -0
- package/dist/types/lib/admin/AdminDeployer.d.ts.map +1 -0
- package/dist/types/lib/assertNever.d.ts.map +1 -0
- package/dist/types/lib/dsn.d.ts.map +1 -0
- package/dist/types/lib/env.d.ts +11 -0
- package/dist/types/lib/env.d.ts.map +1 -0
- package/dist/types/lib/fs/DockerComposeManager.d.ts +25 -0
- package/dist/types/lib/fs/DockerComposeManager.d.ts.map +1 -0
- package/dist/types/lib/fs/FileSystem.d.ts +8 -0
- package/dist/types/lib/fs/FileSystem.d.ts.map +1 -0
- package/dist/types/lib/fs/YamlHandler.d.ts +15 -0
- package/dist/types/lib/fs/YamlHandler.d.ts.map +1 -0
- package/dist/types/lib/js/EsBuildBuilder.d.ts +5 -0
- package/dist/types/lib/js/EsBuildBuilder.d.ts.map +1 -0
- package/dist/types/lib/js/EvalExecutor.d.ts +5 -0
- package/dist/types/lib/js/EvalExecutor.d.ts.map +1 -0
- package/dist/types/lib/js/JsBuilder.d.ts +4 -0
- package/dist/types/lib/js/JsBuilder.d.ts.map +1 -0
- package/dist/types/lib/js/JsCodeRunner.d.ts +9 -0
- package/dist/types/lib/js/JsCodeRunner.d.ts.map +1 -0
- package/dist/types/lib/js/JsExecutor.d.ts +4 -0
- package/dist/types/lib/js/JsExecutor.d.ts.map +1 -0
- package/dist/types/lib/json.d.ts +7 -0
- package/dist/types/lib/json.d.ts.map +1 -0
- package/dist/types/lib/maskToken.d.ts +2 -0
- package/dist/types/lib/maskToken.d.ts.map +1 -0
- package/dist/types/lib/migrations/MigrationExecutionFacade.d.ts +23 -0
- package/dist/types/lib/migrations/MigrationExecutionFacade.d.ts.map +1 -0
- package/dist/types/lib/migrations/MigrationPrinter.d.ts +12 -0
- package/dist/types/lib/migrations/MigrationPrinter.d.ts.map +1 -0
- package/dist/types/lib/migrations/MigrationRebaseFacade.d.ts +12 -0
- package/dist/types/lib/migrations/MigrationRebaseFacade.d.ts.map +1 -0
- package/dist/types/lib/migrations/MigrationsStatusFacade.d.ts +16 -0
- package/dist/types/lib/migrations/MigrationsStatusFacade.d.ts.map +1 -0
- package/dist/types/lib/migrations/MigrationsValidator.d.ts +10 -0
- package/dist/types/lib/migrations/MigrationsValidator.d.ts.map +1 -0
- package/dist/types/lib/migrations/migrations.d.ts +3 -0
- package/dist/types/lib/migrations/migrations.d.ts.map +1 -0
- package/dist/types/lib/project/RemoteProject.d.ts +8 -0
- package/dist/types/lib/project/RemoteProject.d.ts.map +1 -0
- package/dist/types/lib/project/RemoteProjectProvider.d.ts +7 -0
- package/dist/types/lib/project/RemoteProjectProvider.d.ts.map +1 -0
- package/dist/types/lib/project/RemoteProjectResolver.d.ts +8 -0
- package/dist/types/lib/project/RemoteProjectResolver.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/EntityInfo.d.ts +11 -0
- package/dist/types/lib/project/docs/components/EntityInfo.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/EntityLink.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/FieldLink.d.ts +7 -0
- package/dist/types/lib/project/docs/components/FieldLink.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/FieldPermissions.d.ts +7 -0
- package/dist/types/lib/project/docs/components/FieldPermissions.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/FieldType.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/OnDelete.d.ts +9 -0
- package/dist/types/lib/project/docs/components/OnDelete.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/ProjectInfo.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/SinglePermission.d.ts +7 -0
- package/dist/types/lib/project/docs/components/SinglePermission.d.ts.map +1 -0
- package/dist/types/lib/project/docs/components/utils.d.ts.map +1 -0
- package/dist/types/lib/project/docs/projectDescribe.d.ts.map +1 -0
- package/dist/types/lib/schema/SchemaLoader.d.ts +18 -0
- package/dist/types/lib/schema/SchemaLoader.d.ts.map +1 -0
- package/dist/types/lib/schema/SchemaValidationHelper.d.ts +4 -0
- package/dist/types/lib/schema/SchemaValidationHelper.d.ts.map +1 -0
- package/dist/types/lib/schema/SchemaValidationPrinter.d.ts +3 -0
- package/dist/types/lib/schema/SchemaValidationPrinter.d.ts.map +1 -0
- package/dist/types/lib/schema/collectReferences.d.ts.map +1 -0
- package/dist/types/lib/stream.d.ts +8 -0
- package/dist/types/lib/stream.d.ts.map +1 -0
- package/dist/types/lib/tenant/TenantClient.d.ts +9 -0
- package/dist/types/lib/tenant/TenantClient.d.ts.map +1 -0
- package/dist/types/lib/transfer/DataTransferClient.d.ts +18 -0
- package/dist/types/lib/transfer/DataTransferClient.d.ts.map +1 -0
- package/dist/types/lib/transfer/stdio.d.ts.map +1 -0
- package/dist/types/lib/workspace/Workspace.d.ts +8 -0
- package/dist/types/lib/workspace/Workspace.d.ts.map +1 -0
- package/dist/types/lib/workspace/WorkspaceResolver.d.ts +15 -0
- package/dist/types/lib/workspace/WorkspaceResolver.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/esbuild.cjs +27 -0
- package/package.json +16 -13
- package/src/.eslintrc.cjs +5 -0
- package/src/commands/deploy/DeployCommand.ts +51 -107
- package/src/commands/index.ts +0 -1
- package/src/commands/migrations/MigrationAmendCommand.ts +97 -115
- package/src/commands/migrations/MigrationBlankCommand.ts +8 -20
- package/src/commands/migrations/MigrationDescribeCommand.ts +12 -22
- package/src/commands/migrations/MigrationDiffCommand.ts +66 -95
- package/src/commands/migrations/MigrationExecuteCommand.ts +23 -83
- package/src/commands/migrations/MigrationRebaseCommand.ts +20 -62
- package/src/commands/migrations/MigrationStatusCommand.ts +20 -40
- package/src/commands/misc/VersionCommand.ts +7 -2
- package/src/commands/project/ProjectGenerateDocumentationCommand.ts +47 -0
- package/src/commands/project/ProjectPrintSchemaCommand.ts +10 -16
- package/src/commands/project/ProjectValidateCommand.ts +33 -54
- package/src/commands/project/index.ts +1 -1
- package/src/commands/transfer/ExportCommand.ts +16 -14
- package/src/commands/transfer/ImportCommand.ts +18 -15
- package/src/commands/transfer/TransferCommand.ts +29 -18
- package/src/commands/transfer/utils.ts +1 -117
- package/src/commands/workspace/WorkspaceUpdateApiCommand.ts +8 -16
- package/src/consts.ts +5 -0
- package/src/dic.ts +258 -0
- package/src/lib/SystemClientProvider.ts +14 -0
- package/src/lib/TenantClientProvider.ts +14 -0
- package/src/lib/VersionChecker.ts +71 -0
- package/src/lib/admin/AdminClient.ts +33 -0
- package/src/lib/admin/AdminDeployer.ts +45 -0
- package/src/lib/dsn.ts +13 -0
- package/src/lib/env.ts +21 -0
- package/src/lib/fs/DockerComposeManager.ts +63 -0
- package/src/lib/fs/FileSystem.ts +19 -0
- package/src/lib/fs/YamlHandler.ts +59 -0
- package/src/lib/js/EsBuildBuilder.ts +17 -0
- package/src/lib/js/EvalExecutor.ts +8 -0
- package/src/lib/js/JsBuilder.ts +3 -0
- package/src/lib/js/JsCodeRunner.ts +15 -0
- package/src/lib/js/JsExecutor.ts +3 -0
- package/src/lib/json.ts +4 -0
- package/src/lib/migrations/MigrationExecutionFacade.ts +97 -0
- package/src/lib/migrations/MigrationPrinter.ts +86 -0
- package/src/lib/migrations/MigrationRebaseFacade.ts +41 -0
- package/src/lib/migrations/MigrationsStatusFacade.ts +27 -0
- package/src/lib/migrations/MigrationsValidator.ts +40 -0
- package/src/lib/migrations/migrations.ts +45 -0
- package/src/lib/project/RemoteProject.ts +9 -0
- package/src/lib/project/RemoteProjectProvider.ts +16 -0
- package/src/lib/project/RemoteProjectResolver.ts +30 -0
- package/src/lib/project/docs/.eslintrc.cjs +5 -0
- package/src/lib/project/docs/components/EntityInfo.tsx +85 -0
- package/src/lib/project/docs/components/OnDelete.tsx +72 -0
- package/src/lib/project/docs/components/ProjectInfo.tsx +48 -0
- package/src/lib/project/docs/projectDescribe.tsx +28 -0
- package/src/lib/schema/SchemaLoader.ts +38 -0
- package/src/lib/schema/SchemaValidationHelper.ts +9 -0
- package/src/lib/schema/SchemaValidationPrinter.ts +13 -0
- package/src/lib/tenant/TenantClient.ts +45 -0
- package/src/lib/transfer/DataTransferClient.ts +112 -0
- package/src/lib/workspace/Workspace.ts +7 -0
- package/src/lib/workspace/WorkspaceResolver.ts +45 -0
- package/src/run.ts +23 -63
- package/src/tsconfig.json +4 -2
- package/tailwind.config.js +1 -1
- package/dist/src/commands/deploy/DeployCommand.d.ts +0 -21
- package/dist/src/commands/deploy/DeployCommand.d.ts.map +0 -1
- package/dist/src/commands/deploy/DeployCommand.js +0 -135
- package/dist/src/commands/deploy/DeployCommand.js.map +0 -1
- package/dist/src/commands/deploy/index.js +0 -18
- package/dist/src/commands/deploy/index.js.map +0 -1
- package/dist/src/commands/index.d.ts +0 -7
- package/dist/src/commands/index.d.ts.map +0 -1
- package/dist/src/commands/index.js +0 -23
- package/dist/src/commands/index.js.map +0 -1
- package/dist/src/commands/migrations/MigrationAmendCommand.d.ts +0 -18
- package/dist/src/commands/migrations/MigrationAmendCommand.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationAmendCommand.js +0 -126
- package/dist/src/commands/migrations/MigrationAmendCommand.js.map +0 -1
- package/dist/src/commands/migrations/MigrationBlankCommand.d.ts +0 -15
- package/dist/src/commands/migrations/MigrationBlankCommand.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationBlankCommand.js +0 -29
- package/dist/src/commands/migrations/MigrationBlankCommand.js.map +0 -1
- package/dist/src/commands/migrations/MigrationDescribeCommand.d.ts +0 -17
- package/dist/src/commands/migrations/MigrationDescribeCommand.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationDescribeCommand.js +0 -42
- package/dist/src/commands/migrations/MigrationDescribeCommand.js.map +0 -1
- package/dist/src/commands/migrations/MigrationDiffCommand.d.ts +0 -18
- package/dist/src/commands/migrations/MigrationDiffCommand.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationDiffCommand.js +0 -110
- package/dist/src/commands/migrations/MigrationDiffCommand.js.map +0 -1
- package/dist/src/commands/migrations/MigrationExecuteCommand.d.ts +0 -17
- package/dist/src/commands/migrations/MigrationExecuteCommand.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationExecuteCommand.js +0 -83
- package/dist/src/commands/migrations/MigrationExecuteCommand.js.map +0 -1
- package/dist/src/commands/migrations/MigrationRebaseCommand.d.ts +0 -16
- package/dist/src/commands/migrations/MigrationRebaseCommand.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationRebaseCommand.js +0 -64
- package/dist/src/commands/migrations/MigrationRebaseCommand.js.map +0 -1
- package/dist/src/commands/migrations/MigrationStatusCommand.d.ts +0 -19
- package/dist/src/commands/migrations/MigrationStatusCommand.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationStatusCommand.js +0 -88
- package/dist/src/commands/migrations/MigrationStatusCommand.js.map +0 -1
- package/dist/src/commands/migrations/MigrationValidationHelper.d.ts +0 -4
- package/dist/src/commands/migrations/MigrationValidationHelper.d.ts.map +0 -1
- package/dist/src/commands/migrations/MigrationValidationHelper.js +0 -34
- package/dist/src/commands/migrations/MigrationValidationHelper.js.map +0 -1
- package/dist/src/commands/migrations/SystemApiClientResolver.d.ts +0 -8
- package/dist/src/commands/migrations/SystemApiClientResolver.d.ts.map +0 -1
- package/dist/src/commands/migrations/SystemApiClientResolver.js +0 -14
- package/dist/src/commands/migrations/SystemApiClientResolver.js.map +0 -1
- package/dist/src/commands/migrations/index.js +0 -24
- package/dist/src/commands/migrations/index.js.map +0 -1
- package/dist/src/commands/misc/VersionCommand.d.ts +0 -6
- package/dist/src/commands/misc/VersionCommand.d.ts.map +0 -1
- package/dist/src/commands/misc/VersionCommand.js +0 -15
- package/dist/src/commands/misc/VersionCommand.js.map +0 -1
- package/dist/src/commands/misc/index.js +0 -18
- package/dist/src/commands/misc/index.js.map +0 -1
- package/dist/src/commands/project/ProjectGenerateDocumentation.d.ts +0 -15
- package/dist/src/commands/project/ProjectGenerateDocumentation.d.ts.map +0 -1
- package/dist/src/commands/project/ProjectGenerateDocumentation.js +0 -43
- package/dist/src/commands/project/ProjectGenerateDocumentation.js.map +0 -1
- package/dist/src/commands/project/ProjectPrintSchemaCommand.d.ts +0 -18
- package/dist/src/commands/project/ProjectPrintSchemaCommand.d.ts.map +0 -1
- package/dist/src/commands/project/ProjectPrintSchemaCommand.js +0 -81
- package/dist/src/commands/project/ProjectPrintSchemaCommand.js.map +0 -1
- package/dist/src/commands/project/ProjectValidateCommand.d.ts +0 -13
- package/dist/src/commands/project/ProjectValidateCommand.d.ts.map +0 -1
- package/dist/src/commands/project/ProjectValidateCommand.js +0 -65
- package/dist/src/commands/project/ProjectValidateCommand.js.map +0 -1
- package/dist/src/commands/project/index.d.ts +0 -4
- package/dist/src/commands/project/index.d.ts.map +0 -1
- package/dist/src/commands/project/index.js +0 -20
- package/dist/src/commands/project/index.js.map +0 -1
- package/dist/src/commands/tenant/CreateApiKeyCommand.d.ts +0 -14
- package/dist/src/commands/tenant/CreateApiKeyCommand.d.ts.map +0 -1
- package/dist/src/commands/tenant/CreateApiKeyCommand.js +0 -34
- package/dist/src/commands/tenant/CreateApiKeyCommand.js.map +0 -1
- package/dist/src/commands/tenant/InviteCommand.d.ts +0 -14
- package/dist/src/commands/tenant/InviteCommand.d.ts.map +0 -1
- package/dist/src/commands/tenant/InviteCommand.js +0 -32
- package/dist/src/commands/tenant/InviteCommand.js.map +0 -1
- package/dist/src/commands/tenant/ResetPasswordCommand.d.ts +0 -14
- package/dist/src/commands/tenant/ResetPasswordCommand.d.ts.map +0 -1
- package/dist/src/commands/tenant/ResetPasswordCommand.js +0 -30
- package/dist/src/commands/tenant/ResetPasswordCommand.js.map +0 -1
- package/dist/src/commands/tenant/SignInCommand.d.ts +0 -14
- package/dist/src/commands/tenant/SignInCommand.d.ts.map +0 -1
- package/dist/src/commands/tenant/SignInCommand.js +0 -32
- package/dist/src/commands/tenant/SignInCommand.js.map +0 -1
- package/dist/src/commands/tenant/index.d.ts +0 -5
- package/dist/src/commands/tenant/index.d.ts.map +0 -1
- package/dist/src/commands/tenant/index.js +0 -21
- package/dist/src/commands/tenant/index.js.map +0 -1
- package/dist/src/commands/transfer/ExportCommand.d.ts +0 -20
- package/dist/src/commands/transfer/ExportCommand.d.ts.map +0 -1
- package/dist/src/commands/transfer/ExportCommand.js +0 -70
- package/dist/src/commands/transfer/ExportCommand.js.map +0 -1
- package/dist/src/commands/transfer/ImportCommand.d.ts +0 -17
- package/dist/src/commands/transfer/ImportCommand.d.ts.map +0 -1
- package/dist/src/commands/transfer/ImportCommand.js +0 -61
- package/dist/src/commands/transfer/ImportCommand.js.map +0 -1
- package/dist/src/commands/transfer/TransferCommand.d.ts +0 -18
- package/dist/src/commands/transfer/TransferCommand.d.ts.map +0 -1
- package/dist/src/commands/transfer/TransferCommand.js +0 -67
- package/dist/src/commands/transfer/TransferCommand.js.map +0 -1
- package/dist/src/commands/transfer/index.js +0 -20
- package/dist/src/commands/transfer/index.js.map +0 -1
- package/dist/src/commands/transfer/utils.d.ts +0 -27
- package/dist/src/commands/transfer/utils.d.ts.map +0 -1
- package/dist/src/commands/transfer/utils.js +0 -136
- package/dist/src/commands/transfer/utils.js.map +0 -1
- package/dist/src/commands/workspace/WorkspaceUpdateApiCommand.d.ts +0 -13
- package/dist/src/commands/workspace/WorkspaceUpdateApiCommand.d.ts.map +0 -1
- package/dist/src/commands/workspace/WorkspaceUpdateApiCommand.js +0 -66
- package/dist/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +0 -1
- package/dist/src/commands/workspace/index.js +0 -18
- package/dist/src/commands/workspace/index.js.map +0 -1
- package/dist/src/run.js +0 -50
- package/dist/src/run.js.map +0 -1
- package/dist/src/tsconfig.tsbuildinfo +0 -1
- package/dist/src/utils/admin.d.ts +0 -14
- package/dist/src/utils/admin.d.ts.map +0 -1
- package/dist/src/utils/admin.js +0 -47
- package/dist/src/utils/admin.js.map +0 -1
- package/dist/src/utils/assertNever.d.ts.map +0 -1
- package/dist/src/utils/assertNever.js +0 -8
- package/dist/src/utils/assertNever.js.map +0 -1
- package/dist/src/utils/checkVersions.d.ts +0 -3
- package/dist/src/utils/checkVersions.d.ts.map +0 -1
- package/dist/src/utils/checkVersions.js +0 -83
- package/dist/src/utils/checkVersions.js.map +0 -1
- package/dist/src/utils/dockerCompose.d.ts +0 -18
- package/dist/src/utils/dockerCompose.d.ts.map +0 -1
- package/dist/src/utils/dockerCompose.js +0 -66
- package/dist/src/utils/dockerCompose.js.map +0 -1
- package/dist/src/utils/dsn.d.ts.map +0 -1
- package/dist/src/utils/dsn.js +0 -17
- package/dist/src/utils/dsn.js.map +0 -1
- package/dist/src/utils/esbuild.d.ts +0 -2
- package/dist/src/utils/esbuild.d.ts.map +0 -1
- package/dist/src/utils/esbuild.js +0 -41
- package/dist/src/utils/esbuild.js.map +0 -1
- package/dist/src/utils/instance/environment.d.ts +0 -4
- package/dist/src/utils/instance/environment.d.ts.map +0 -1
- package/dist/src/utils/instance/environment.js +0 -3
- package/dist/src/utils/instance/environment.js.map +0 -1
- package/dist/src/utils/instance/index.d.ts +0 -3
- package/dist/src/utils/instance/index.d.ts.map +0 -1
- package/dist/src/utils/instance/index.js +0 -21
- package/dist/src/utils/instance/index.js.map +0 -1
- package/dist/src/utils/instance/interactiveUtils.d.ts +0 -4
- package/dist/src/utils/instance/interactiveUtils.d.ts.map +0 -1
- package/dist/src/utils/instance/interactiveUtils.js +0 -36
- package/dist/src/utils/instance/interactiveUtils.js.map +0 -1
- package/dist/src/utils/migrations/MigrationCreateHelper.d.ts +0 -21
- package/dist/src/utils/migrations/MigrationCreateHelper.d.ts.map +0 -1
- package/dist/src/utils/migrations/MigrationCreateHelper.js +0 -32
- package/dist/src/utils/migrations/MigrationCreateHelper.js.map +0 -1
- package/dist/src/utils/migrations/MigrationExecuteHelper.d.ts +0 -23
- package/dist/src/utils/migrations/MigrationExecuteHelper.d.ts.map +0 -1
- package/dist/src/utils/migrations/MigrationExecuteHelper.js +0 -84
- package/dist/src/utils/migrations/MigrationExecuteHelper.js.map +0 -1
- package/dist/src/utils/migrations/MigrationsContainer.d.ts +0 -20
- package/dist/src/utils/migrations/MigrationsContainer.d.ts.map +0 -1
- package/dist/src/utils/migrations/MigrationsContainer.js +0 -58
- package/dist/src/utils/migrations/MigrationsContainer.js.map +0 -1
- package/dist/src/utils/migrations/migrations.d.ts +0 -9
- package/dist/src/utils/migrations/migrations.d.ts.map +0 -1
- package/dist/src/utils/migrations/migrations.js +0 -77
- package/dist/src/utils/migrations/migrations.js.map +0 -1
- package/dist/src/utils/project/components/EntityInfo.d.ts +0 -11
- package/dist/src/utils/project/components/EntityInfo.d.ts.map +0 -1
- package/dist/src/utils/project/components/EntityInfo.js +0 -54
- package/dist/src/utils/project/components/EntityInfo.js.map +0 -1
- package/dist/src/utils/project/components/EntityLink.d.ts.map +0 -1
- package/dist/src/utils/project/components/EntityLink.js +0 -8
- package/dist/src/utils/project/components/EntityLink.js.map +0 -1
- package/dist/src/utils/project/components/FieldLink.d.ts +0 -7
- package/dist/src/utils/project/components/FieldLink.d.ts.map +0 -1
- package/dist/src/utils/project/components/FieldLink.js +0 -13
- package/dist/src/utils/project/components/FieldLink.js.map +0 -1
- package/dist/src/utils/project/components/FieldPermissions.d.ts +0 -7
- package/dist/src/utils/project/components/FieldPermissions.d.ts.map +0 -1
- package/dist/src/utils/project/components/FieldPermissions.js +0 -17
- package/dist/src/utils/project/components/FieldPermissions.js.map +0 -1
- package/dist/src/utils/project/components/FieldType.d.ts.map +0 -1
- package/dist/src/utils/project/components/FieldType.js +0 -59
- package/dist/src/utils/project/components/FieldType.js.map +0 -1
- package/dist/src/utils/project/components/OnDelete.d.ts +0 -9
- package/dist/src/utils/project/components/OnDelete.d.ts.map +0 -1
- package/dist/src/utils/project/components/OnDelete.js +0 -70
- package/dist/src/utils/project/components/OnDelete.js.map +0 -1
- package/dist/src/utils/project/components/ProjectInfo.d.ts.map +0 -1
- package/dist/src/utils/project/components/ProjectInfo.js +0 -28
- package/dist/src/utils/project/components/ProjectInfo.js.map +0 -1
- package/dist/src/utils/project/components/SinglePermission.d.ts +0 -7
- package/dist/src/utils/project/components/SinglePermission.d.ts.map +0 -1
- package/dist/src/utils/project/components/SinglePermission.js +0 -15
- package/dist/src/utils/project/components/SinglePermission.js.map +0 -1
- package/dist/src/utils/project/components/utils.d.ts.map +0 -1
- package/dist/src/utils/project/components/utils.js +0 -8
- package/dist/src/utils/project/components/utils.js.map +0 -1
- package/dist/src/utils/project/loadSchema.d.ts +0 -4
- package/dist/src/utils/project/loadSchema.d.ts.map +0 -1
- package/dist/src/utils/project/loadSchema.js +0 -14
- package/dist/src/utils/project/loadSchema.js.map +0 -1
- package/dist/src/utils/project/projectDescribe.d.ts.map +0 -1
- package/dist/src/utils/project/projectDescribe.js +0 -29
- package/dist/src/utils/project/projectDescribe.js.map +0 -1
- package/dist/src/utils/project/resources/out.css +0 -824
- package/dist/src/utils/schema/collectReferences.d.ts.map +0 -1
- package/dist/src/utils/schema/collectReferences.js +0 -35
- package/dist/src/utils/schema/collectReferences.js.map +0 -1
- package/dist/src/utils/schema.d.ts +0 -5
- package/dist/src/utils/schema.d.ts.map +0 -1
- package/dist/src/utils/schema.js +0 -22
- package/dist/src/utils/schema.js.map +0 -1
- package/dist/src/utils/stdio.d.ts.map +0 -1
- package/dist/src/utils/stdio.js +0 -13
- package/dist/src/utils/stdio.js.map +0 -1
- package/dist/src/utils/stream.d.ts +0 -9
- package/dist/src/utils/stream.d.ts.map +0 -1
- package/dist/src/utils/stream.js +0 -41
- package/dist/src/utils/stream.js.map +0 -1
- package/dist/src/utils/tenant.d.ts +0 -66
- package/dist/src/utils/tenant.d.ts.map +0 -1
- package/dist/src/utils/tenant.js +0 -355
- package/dist/src/utils/tenant.js.map +0 -1
- package/dist/src/utils/token.d.ts +0 -2
- package/dist/src/utils/token.d.ts.map +0 -1
- package/dist/src/utils/token.js +0 -6
- package/dist/src/utils/token.js.map +0 -1
- package/dist/src/utils/tuple.d.ts +0 -2
- package/dist/src/utils/tuple.d.ts.map +0 -1
- package/dist/src/utils/tuple.js +0 -6
- package/dist/src/utils/tuple.js.map +0 -1
- package/dist/src/utils/workspace.d.ts +0 -3
- package/dist/src/utils/workspace.d.ts.map +0 -1
- package/dist/src/utils/workspace.js +0 -25
- package/dist/src/utils/workspace.js.map +0 -1
- package/dist/src/utils/yaml.d.ts +0 -8
- package/dist/src/utils/yaml.d.ts.map +0 -1
- package/dist/src/utils/yaml.js +0 -33
- package/dist/src/utils/yaml.js.map +0 -1
- package/esbuild.js +0 -15
- package/src/.eslintrc.js +0 -5
- package/src/commands/migrations/MigrationValidationHelper.ts +0 -36
- package/src/commands/migrations/SystemApiClientResolver.ts +0 -22
- package/src/commands/project/ProjectGenerateDocumentation.ts +0 -49
- package/src/commands/tenant/CreateApiKeyCommand.ts +0 -40
- package/src/commands/tenant/InviteCommand.ts +0 -38
- package/src/commands/tenant/ResetPasswordCommand.ts +0 -36
- package/src/commands/tenant/SignInCommand.ts +0 -38
- package/src/commands/tenant/index.ts +0 -4
- package/src/utils/admin.ts +0 -45
- package/src/utils/checkVersions.ts +0 -58
- package/src/utils/dockerCompose.ts +0 -58
- package/src/utils/dsn.ts +0 -13
- package/src/utils/esbuild.ts +0 -14
- package/src/utils/instance/environment.ts +0 -4
- package/src/utils/instance/index.ts +0 -2
- package/src/utils/instance/interactiveUtils.ts +0 -39
- package/src/utils/migrations/MigrationCreateHelper.ts +0 -59
- package/src/utils/migrations/MigrationExecuteHelper.ts +0 -115
- package/src/utils/migrations/MigrationsContainer.ts +0 -80
- package/src/utils/migrations/migrations.ts +0 -80
- package/src/utils/project/components/EntityInfo.tsx +0 -82
- package/src/utils/project/components/OnDelete.tsx +0 -72
- package/src/utils/project/components/ProjectInfo.tsx +0 -48
- package/src/utils/project/loadSchema.ts +0 -14
- package/src/utils/project/projectDescribe.tsx +0 -26
- package/src/utils/schema.ts +0 -19
- package/src/utils/tenant.ts +0 -434
- package/src/utils/tuple.ts +0 -1
- package/src/utils/workspace.ts +0 -21
- package/src/utils/yaml.ts +0 -36
- /package/dist/{src → types}/commands/deploy/index.d.ts +0 -0
- /package/dist/{src → types}/commands/deploy/index.d.ts.map +0 -0
- /package/dist/{src → types}/commands/migrations/index.d.ts +0 -0
- /package/dist/{src → types}/commands/migrations/index.d.ts.map +0 -0
- /package/dist/{src → types}/commands/misc/index.d.ts +0 -0
- /package/dist/{src → types}/commands/misc/index.d.ts.map +0 -0
- /package/dist/{src → types}/commands/transfer/index.d.ts +0 -0
- /package/dist/{src → types}/commands/transfer/index.d.ts.map +0 -0
- /package/dist/{src → types}/commands/workspace/index.d.ts +0 -0
- /package/dist/{src → types}/commands/workspace/index.d.ts.map +0 -0
- /package/dist/{src/utils → types/lib}/assertNever.d.ts +0 -0
- /package/dist/{src/utils → types/lib}/dsn.d.ts +0 -0
- /package/dist/{src/utils/project → types/lib/project/docs}/components/EntityLink.d.ts +0 -0
- /package/dist/{src/utils/project → types/lib/project/docs}/components/FieldType.d.ts +0 -0
- /package/dist/{src/utils/project → types/lib/project/docs}/components/ProjectInfo.d.ts +0 -0
- /package/dist/{src/utils/project → types/lib/project/docs}/components/utils.d.ts +0 -0
- /package/dist/{src/utils/project → types/lib/project/docs}/projectDescribe.d.ts +0 -0
- /package/dist/{src/utils → types/lib}/schema/collectReferences.d.ts +0 -0
- /package/dist/{src/utils → types/lib/transfer}/stdio.d.ts +0 -0
- /package/dist/{src → types}/run.d.ts +0 -0
- /package/dist/{src → types}/run.d.ts.map +0 -0
- /package/src/{utils → lib}/assertNever.ts +0 -0
- /package/src/{utils/token.ts → lib/maskToken.ts} +0 -0
- /package/src/{utils/project → lib/project/docs}/components/EntityLink.tsx +0 -0
- /package/src/{utils/project → lib/project/docs}/components/FieldLink.tsx +0 -0
- /package/src/{utils/project → lib/project/docs}/components/FieldPermissions.tsx +0 -0
- /package/src/{utils/project → lib/project/docs}/components/FieldType.tsx +0 -0
- /package/src/{utils/project → lib/project/docs}/components/SinglePermission.tsx +0 -0
- /package/src/{utils/project → lib/project/docs}/components/utils.ts +0 -0
- /package/src/{utils/project → lib/project/docs}/resources/style.css +0 -0
- /package/src/{utils → lib}/schema/collectReferences.ts +0 -0
- /package/src/{utils → lib}/stream.ts +0 -0
- /package/src/{utils → lib/transfer}/stdio.ts +0 -0
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Input, Project, Workspace } from '@contember/cli-common'
|
|
2
|
-
import { MigrationsContainerFactory } from './MigrationsContainer'
|
|
3
|
-
import {
|
|
4
|
-
MigrationCreator,
|
|
5
|
-
MigrationDescriber,
|
|
6
|
-
MigrationFilesManager,
|
|
7
|
-
MigrationsResolver,
|
|
8
|
-
SchemaMigrator,
|
|
9
|
-
SchemaVersionBuilder,
|
|
10
|
-
} from '@contember/migrations-client'
|
|
11
|
-
|
|
12
|
-
type Args = {
|
|
13
|
-
project?: string
|
|
14
|
-
migrationName: string
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
type Options = {}
|
|
18
|
-
|
|
19
|
-
export const executeCreateMigrationCommand = async (
|
|
20
|
-
input: Input<Pick<Args, 'project'>, Options>,
|
|
21
|
-
{ workspace }: {workspace: Workspace},
|
|
22
|
-
createMigrationCallback: (args: {
|
|
23
|
-
workspace: Workspace
|
|
24
|
-
project: Project
|
|
25
|
-
migrationCreator: MigrationCreator
|
|
26
|
-
migrationDescriber: MigrationDescriber
|
|
27
|
-
migrationsResolver: MigrationsResolver
|
|
28
|
-
schemaVersionBuilder: SchemaVersionBuilder
|
|
29
|
-
schemaMigrator: SchemaMigrator
|
|
30
|
-
migrationFilesManager: MigrationFilesManager
|
|
31
|
-
}) => Promise<number>,
|
|
32
|
-
) => {
|
|
33
|
-
const projectName = input.getArgument('project')
|
|
34
|
-
const allProjects = projectName === '.'
|
|
35
|
-
const projects = allProjects
|
|
36
|
-
? await workspace.projects.listProjects()
|
|
37
|
-
: [await workspace.projects.getProject(projectName, { fuzzy: true })]
|
|
38
|
-
|
|
39
|
-
for (const project of projects) {
|
|
40
|
-
console.group(`Project ${project.name}:`)
|
|
41
|
-
const container = new MigrationsContainerFactory(project.migrationsDir).create()
|
|
42
|
-
|
|
43
|
-
const result = await createMigrationCallback({
|
|
44
|
-
project,
|
|
45
|
-
migrationCreator: container.migrationCreator,
|
|
46
|
-
migrationDescriber: container.migrationDescriber,
|
|
47
|
-
migrationsResolver: container.migrationsResolver,
|
|
48
|
-
schemaVersionBuilder: container.schemaVersionBuilder,
|
|
49
|
-
schemaMigrator: container.schemaMigrator,
|
|
50
|
-
migrationFilesManager: container.migrationFilesManager,
|
|
51
|
-
workspace,
|
|
52
|
-
})
|
|
53
|
-
console.groupEnd()
|
|
54
|
-
if (result > 0) {
|
|
55
|
-
return result
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return 0
|
|
59
|
-
}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { CommandConfiguration } from '@contember/cli-common'
|
|
2
|
-
import {
|
|
3
|
-
ContentMigrationFactoryArgs,
|
|
4
|
-
isSchemaMigration,
|
|
5
|
-
MigrationDescriber,
|
|
6
|
-
MigrationsResolver,
|
|
7
|
-
MigrationToExecuteOkStatus,
|
|
8
|
-
SchemaVersionBuilder,
|
|
9
|
-
SystemClient,
|
|
10
|
-
MigrationExecutor,
|
|
11
|
-
MigrationsStatusResolver,
|
|
12
|
-
} from '@contember/migrations-client'
|
|
13
|
-
import { printMigrationDescription } from './migrations'
|
|
14
|
-
import prompts from 'prompts'
|
|
15
|
-
|
|
16
|
-
export type ExecuteMigrationOptions = {
|
|
17
|
-
instance?: string
|
|
18
|
-
['remote-project']?: string
|
|
19
|
-
yes?: true
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export const configureExecuteMigrationCommand = (configuration: CommandConfiguration<{}, ExecuteMigrationOptions>) => {
|
|
23
|
-
configuration //
|
|
24
|
-
.option('instance')
|
|
25
|
-
.valueRequired()
|
|
26
|
-
.description('Local instance name or remote Contember API URL')
|
|
27
|
-
configuration //
|
|
28
|
-
.option('remote-project')
|
|
29
|
-
.valueRequired()
|
|
30
|
-
.description('Specify this when remote project name does not match local project name.')
|
|
31
|
-
configuration //
|
|
32
|
-
.option('yes')
|
|
33
|
-
.valueNone()
|
|
34
|
-
.description('Do not ask for confirmation.')
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export const resolveMigrationStatus = async (
|
|
38
|
-
client: SystemClient,
|
|
39
|
-
migrationsResolver: MigrationsResolver,
|
|
40
|
-
force: boolean = false,
|
|
41
|
-
) => {
|
|
42
|
-
const migrationStatusResolver = new MigrationsStatusResolver()
|
|
43
|
-
const executedMigrations = await client.listExecutedMigrations()
|
|
44
|
-
const localMigrations = await migrationsResolver.getMigrationFiles()
|
|
45
|
-
return migrationStatusResolver.getMigrationsStatus(executedMigrations, localMigrations, force)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export const executeMigrations = async ({
|
|
49
|
-
client,
|
|
50
|
-
migrations,
|
|
51
|
-
requireConfirmation,
|
|
52
|
-
schemaVersionBuilder,
|
|
53
|
-
migrationDescriber,
|
|
54
|
-
contentMigrationFactoryArgs,
|
|
55
|
-
force,
|
|
56
|
-
}: {
|
|
57
|
-
client: SystemClient
|
|
58
|
-
migrations: MigrationToExecuteOkStatus[]
|
|
59
|
-
requireConfirmation: boolean
|
|
60
|
-
schemaVersionBuilder: SchemaVersionBuilder
|
|
61
|
-
migrationDescriber: MigrationDescriber
|
|
62
|
-
contentMigrationFactoryArgs: ContentMigrationFactoryArgs
|
|
63
|
-
force?: boolean
|
|
64
|
-
}): Promise<number> => {
|
|
65
|
-
if (migrations.length === 0) {
|
|
66
|
-
return 0
|
|
67
|
-
}
|
|
68
|
-
console.log('Will execute following migrations:')
|
|
69
|
-
migrations.forEach(it => console.log(it.name))
|
|
70
|
-
if (requireConfirmation) {
|
|
71
|
-
if (!process.stdin.isTTY) {
|
|
72
|
-
throw 'TTY not available. Pass --yes option to confirm execution.'
|
|
73
|
-
}
|
|
74
|
-
do {
|
|
75
|
-
const { action } = await prompts({
|
|
76
|
-
type: 'select',
|
|
77
|
-
name: 'action',
|
|
78
|
-
message: 'Do you want to continue?',
|
|
79
|
-
choices: [
|
|
80
|
-
{ value: 'yes', title: 'Execute migrations' },
|
|
81
|
-
{ value: 'describe', title: 'Describe migrations' },
|
|
82
|
-
{ value: 'no', title: 'Abort' },
|
|
83
|
-
],
|
|
84
|
-
})
|
|
85
|
-
if (action === 'describe') {
|
|
86
|
-
const schema = await schemaVersionBuilder.buildSchemaUntil(migrations[0].version)
|
|
87
|
-
for (const migration of migrations) {
|
|
88
|
-
const migrationContent = await migration.localMigration.getContent()
|
|
89
|
-
if (!isSchemaMigration(migrationContent)) {
|
|
90
|
-
continue
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
await printMigrationDescription(migrationDescriber, schema, migrationContent, {
|
|
94
|
-
noSql: true,
|
|
95
|
-
})
|
|
96
|
-
}
|
|
97
|
-
} else if (action === 'yes') {
|
|
98
|
-
break
|
|
99
|
-
} else {
|
|
100
|
-
return 1
|
|
101
|
-
}
|
|
102
|
-
} while (true)
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
const executor = new MigrationExecutor()
|
|
106
|
-
|
|
107
|
-
await executor.executeMigrations({
|
|
108
|
-
client,
|
|
109
|
-
migrations,
|
|
110
|
-
contentMigrationFactoryArgs,
|
|
111
|
-
log: message => console.log(message),
|
|
112
|
-
force,
|
|
113
|
-
})
|
|
114
|
-
return 0
|
|
115
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { Builder } from '@contember/dic'
|
|
2
|
-
import { MigrationDescriber, ModificationHandlerFactory, SchemaDiffer, SchemaMigrator, VERSION_LATEST } from '@contember/schema-migrations'
|
|
3
|
-
import { MigrationCreator } from '@contember/migrations-client'
|
|
4
|
-
import { SchemaVersionBuilder } from '@contember/migrations-client'
|
|
5
|
-
import { MigrationsResolver } from '@contember/migrations-client'
|
|
6
|
-
import { MigrationFilesManager } from '@contember/migrations-client'
|
|
7
|
-
import { JsonLoader } from '@contember/migrations-client'
|
|
8
|
-
import { MigrationParser } from '@contember/migrations-client'
|
|
9
|
-
import { JsLoader } from '@contember/migrations-client'
|
|
10
|
-
import { buildJs } from '../esbuild'
|
|
11
|
-
|
|
12
|
-
export interface MigrationsContainer {
|
|
13
|
-
migrationCreator: MigrationCreator
|
|
14
|
-
migrationDescriber: MigrationDescriber
|
|
15
|
-
schemaVersionBuilder: SchemaVersionBuilder
|
|
16
|
-
schemaDiffer: SchemaDiffer
|
|
17
|
-
migrationsResolver: MigrationsResolver
|
|
18
|
-
migrationFilesManager: MigrationFilesManager
|
|
19
|
-
schemaMigrator: SchemaMigrator
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const jsSample = `
|
|
23
|
-
export const query = \`\`
|
|
24
|
-
export const variables = {}
|
|
25
|
-
|
|
26
|
-
// or multiple queries
|
|
27
|
-
// export const queries = []
|
|
28
|
-
|
|
29
|
-
// or a factory
|
|
30
|
-
// export default async () => ({ queries: [] })
|
|
31
|
-
`
|
|
32
|
-
|
|
33
|
-
export class MigrationsContainerFactory {
|
|
34
|
-
constructor(private readonly directory: string) {}
|
|
35
|
-
|
|
36
|
-
public create(): MigrationsContainer {
|
|
37
|
-
return new Builder({})
|
|
38
|
-
.addService('migrationFilesManager', () => {
|
|
39
|
-
const jsExecutor = async (file: string) => {
|
|
40
|
-
const code = await buildJs(file)
|
|
41
|
-
const fn = new Function(`var module = {}; ((module) => { ${code} })(module); return module`)
|
|
42
|
-
return fn().exports
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return new MigrationFilesManager(this.directory, {
|
|
46
|
-
json: new JsonLoader(new MigrationParser()),
|
|
47
|
-
ts: new JsLoader(new MigrationParser(), jsExecutor),
|
|
48
|
-
js: new JsLoader(new MigrationParser(), jsExecutor),
|
|
49
|
-
})
|
|
50
|
-
})
|
|
51
|
-
.addService('modificationHandlerFactory', () =>
|
|
52
|
-
new ModificationHandlerFactory(ModificationHandlerFactory.defaultFactoryMap))
|
|
53
|
-
.addService('schemaMigrator', ({ modificationHandlerFactory }) =>
|
|
54
|
-
new SchemaMigrator(modificationHandlerFactory))
|
|
55
|
-
.addService('migrationsResolver', ({ migrationFilesManager }) =>
|
|
56
|
-
new MigrationsResolver(migrationFilesManager))
|
|
57
|
-
.addService('schemaVersionBuilder', ({ migrationsResolver, schemaMigrator }) =>
|
|
58
|
-
new SchemaVersionBuilder(migrationsResolver, schemaMigrator))
|
|
59
|
-
.addService('schemaDiffer', ({ schemaMigrator }) =>
|
|
60
|
-
new SchemaDiffer(schemaMigrator))
|
|
61
|
-
.addService('migrationCreator', ({ migrationFilesManager, schemaDiffer }) =>
|
|
62
|
-
new MigrationCreator(migrationFilesManager, schemaDiffer, {
|
|
63
|
-
json: JSON.stringify({ formatVersion: VERSION_LATEST, modifications: [] }, undefined, '\t') + '\n',
|
|
64
|
-
ts: jsSample,
|
|
65
|
-
js: jsSample,
|
|
66
|
-
}))
|
|
67
|
-
.addService('migrationDescriber', ({ modificationHandlerFactory }) =>
|
|
68
|
-
new MigrationDescriber(modificationHandlerFactory))
|
|
69
|
-
.build()
|
|
70
|
-
.pick(
|
|
71
|
-
'migrationCreator',
|
|
72
|
-
'migrationDescriber',
|
|
73
|
-
'schemaVersionBuilder',
|
|
74
|
-
'schemaDiffer',
|
|
75
|
-
'migrationsResolver',
|
|
76
|
-
'migrationFilesManager',
|
|
77
|
-
'schemaMigrator',
|
|
78
|
-
)
|
|
79
|
-
}
|
|
80
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { Migration, MigrationDescriber } from '@contember/schema-migrations'
|
|
2
|
-
import chalk from 'chalk'
|
|
3
|
-
import { Schema } from '@contember/schema'
|
|
4
|
-
import chalkTable from 'chalk-table'
|
|
5
|
-
import { assertNever } from '../assertNever'
|
|
6
|
-
import { emptyDatabaseMetadata } from '@contember/database'
|
|
7
|
-
import { MigrationState } from '@contember/migrations-client'
|
|
8
|
-
import { AnyMigrationStatus } from '@contember/migrations-client'
|
|
9
|
-
|
|
10
|
-
export const printMigrationDescription = function (
|
|
11
|
-
migrationsDescriber: MigrationDescriber,
|
|
12
|
-
schema: Schema,
|
|
13
|
-
migration: Migration,
|
|
14
|
-
options: { sqlOnly?: boolean; noSql?: boolean },
|
|
15
|
-
) {
|
|
16
|
-
const description = migrationsDescriber.describeModifications(schema, migration)
|
|
17
|
-
description.forEach(({ modification, getSql, description }) => {
|
|
18
|
-
const sql = getSql({
|
|
19
|
-
systemSchema: 'system',
|
|
20
|
-
databaseMetadata: emptyDatabaseMetadata,
|
|
21
|
-
invalidateDatabaseMetadata: () => null,
|
|
22
|
-
})
|
|
23
|
-
if (options.sqlOnly) {
|
|
24
|
-
if (sql.trim()) {
|
|
25
|
-
console.log(sql)
|
|
26
|
-
}
|
|
27
|
-
} else {
|
|
28
|
-
const color = description.isDestructive ? chalk.red : chalk.blue
|
|
29
|
-
console.group(color(`${description.message} [${modification.modification}]`))
|
|
30
|
-
if (description.failureWarning) {
|
|
31
|
-
console.log(chalk.bgWhite(chalk.redBright(description.failureWarning)))
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (!options.noSql) {
|
|
35
|
-
if (sql.trim()) {
|
|
36
|
-
console.log(sql)
|
|
37
|
-
} else {
|
|
38
|
-
console.log('No sql to execute')
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
console.groupEnd()
|
|
42
|
-
}
|
|
43
|
-
})
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export const createMigrationStatusTable = (migrations: AnyMigrationStatus[]): string => {
|
|
47
|
-
return chalkTable(
|
|
48
|
-
{
|
|
49
|
-
columns: ['status', 'migration', 'info'],
|
|
50
|
-
},
|
|
51
|
-
migrations.map(it => {
|
|
52
|
-
switch (it.state) {
|
|
53
|
-
case MigrationState.EXECUTED_ERROR:
|
|
54
|
-
return { status: chalk.bgRedBright.white('ERROR'), migration: it.name, info: it.errorMessage }
|
|
55
|
-
case MigrationState.EXECUTED_OK:
|
|
56
|
-
return {
|
|
57
|
-
status: chalk.bgGreen.blackBright('Executed'),
|
|
58
|
-
migration: it.name,
|
|
59
|
-
info: `Executed at ${it.executedMigration.executedAt.toISOString()}`,
|
|
60
|
-
}
|
|
61
|
-
case MigrationState.EXECUTED_MISSING:
|
|
62
|
-
return {
|
|
63
|
-
status: chalk.bgRedBright.white('ERROR'),
|
|
64
|
-
migration: it.name,
|
|
65
|
-
info: it.errorMessage,
|
|
66
|
-
}
|
|
67
|
-
case MigrationState.TO_EXECUTE_OK:
|
|
68
|
-
return {
|
|
69
|
-
status: chalk.bgBlueBright.white('Not executed'),
|
|
70
|
-
migration: it.name,
|
|
71
|
-
info: 'Will be executed during next deploy',
|
|
72
|
-
}
|
|
73
|
-
case MigrationState.TO_EXECUTE_ERROR:
|
|
74
|
-
return { status: chalk.bgRedBright.white('ERROR'), migration: it.name, info: it.errorMessage }
|
|
75
|
-
default:
|
|
76
|
-
assertNever(it)
|
|
77
|
-
}
|
|
78
|
-
}),
|
|
79
|
-
)
|
|
80
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { Model, Schema } from '@contember/schema'
|
|
2
|
-
import { ReferencesMap } from '../../schema/collectReferences'
|
|
3
|
-
import { formatEntityAnchor, formatFieldAnchor } from './utils'
|
|
4
|
-
import { SinglePermission } from './SinglePermission'
|
|
5
|
-
import { FieldType } from './FieldType'
|
|
6
|
-
import { FieldPermissions } from './FieldPermissions'
|
|
7
|
-
import { OnDelete } from './OnDelete'
|
|
8
|
-
import { Fragment, h } from 'preact'
|
|
9
|
-
|
|
10
|
-
interface EntityInfoProps {
|
|
11
|
-
entity: Model.Entity
|
|
12
|
-
schema: Schema
|
|
13
|
-
references: ReferencesMap
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const EntityInfo = ({ entity, schema, references }: EntityInfoProps) => (
|
|
17
|
-
<div class={'m-4 border border-gray-400 rounded-lg group'}
|
|
18
|
-
id={formatEntityAnchor(entity.name)}>
|
|
19
|
-
<div class={'font-bold text-gray-900 py-2 px-4 border-b border-gray-400 group-target:bg-yellow-100 rounded-t-lg'}>
|
|
20
|
-
{entity.name}
|
|
21
|
-
</div>
|
|
22
|
-
<div class={'px-2 py-2 flex flex-wrap '}>
|
|
23
|
-
<div>
|
|
24
|
-
<table>
|
|
25
|
-
<thead>
|
|
26
|
-
<tr>
|
|
27
|
-
<th class={'text-left px-2 text-gray-500 font-normal w-[180px] max-w-[180px]'}>Name</th>
|
|
28
|
-
<th class={'text-left px-2 text-gray-500 font-normal w-[340px] max-w-[340px]'}>Type</th>
|
|
29
|
-
{Object.keys(schema.acl.roles).map(role => <th
|
|
30
|
-
class={'text-left px-2 text-gray-500 font-normal w-[120px] max-w-[120px] text-xs truncate text-sm'}>{role}</th>)}
|
|
31
|
-
</tr>
|
|
32
|
-
</thead>
|
|
33
|
-
<tr>
|
|
34
|
-
<td></td>
|
|
35
|
-
<td></td>
|
|
36
|
-
{Object.values(schema.acl.roles).map(role => <td class={'px-2'}>
|
|
37
|
-
<SinglePermission value={'D'}
|
|
38
|
-
predicate={role.entities[entity.name]?.operations.delete} />
|
|
39
|
-
</td>)}
|
|
40
|
-
</tr>
|
|
41
|
-
{Object.values(entity.fields).map(field => (
|
|
42
|
-
<tr class={'even:bg-gray-100 target:bg-yellow-100'}
|
|
43
|
-
id={formatFieldAnchor(entity.name, field.name)}>
|
|
44
|
-
<td class={'px-2 font-mono truncate w-[180px] max-w-[180px]'} title={field.name}>
|
|
45
|
-
{field.name}
|
|
46
|
-
</td>
|
|
47
|
-
<td class={'text-gray-800 px-2 font-mono w-[420px] max-w-[420px]'}>
|
|
48
|
-
<FieldType field={field} />
|
|
49
|
-
</td>
|
|
50
|
-
{Object.values(schema.acl.roles).map(role => <td class={'px-2'}>
|
|
51
|
-
<FieldPermissions field={field.name}
|
|
52
|
-
entityPermissions={role.entities[entity.name]} />
|
|
53
|
-
</td>)}
|
|
54
|
-
</tr>
|
|
55
|
-
))}
|
|
56
|
-
|
|
57
|
-
</table>
|
|
58
|
-
</div>
|
|
59
|
-
<div class={'px-2 py-2 w-1/2'}>
|
|
60
|
-
<h3 class={'text-lg text-gray-600'}>On delete behaviour:</h3>
|
|
61
|
-
<p class={'text-gray-500 text-sm'}>
|
|
62
|
-
(What happens when you attempt to delete entity {entity.name})</p>
|
|
63
|
-
<div class={'mt-2 text-sm '}>
|
|
64
|
-
<OnDelete references={references} entity={entity} />
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
{false && <div class={'px-2 py-2 w-1/2'}>
|
|
68
|
-
<h3 class={'text-lg text-gray-600'}>ACL predicates:</h3>
|
|
69
|
-
<div class={'mt-2 text-sm '}>
|
|
70
|
-
{Object.entries(schema.acl.roles).map(([roleName, role]) =>
|
|
71
|
-
Object.entries(role.entities[entity.name]?.predicates ?? {}).map(([predicateName, predicate]) => (
|
|
72
|
-
<Fragment>
|
|
73
|
-
<h4>{roleName}: {predicateName}</h4>
|
|
74
|
-
<code>{JSON.stringify(predicate)}</code>
|
|
75
|
-
</Fragment>
|
|
76
|
-
)),
|
|
77
|
-
)}
|
|
78
|
-
</div>
|
|
79
|
-
</div>}
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
)
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { h, Fragment } from 'preact'
|
|
2
|
-
import { Model } from '@contember/schema'
|
|
3
|
-
import { ReferenceMapEntry, ReferencesMap } from '../../schema/collectReferences'
|
|
4
|
-
import { FieldLink } from './FieldLink'
|
|
5
|
-
import { EntityLink } from './EntityLink'
|
|
6
|
-
|
|
7
|
-
const sortReferences = (a: ReferenceMapEntry, b: ReferenceMapEntry) =>
|
|
8
|
-
a.owningRelation.joiningColumn.onDelete.localeCompare(b.owningRelation.joiningColumn.onDelete)
|
|
9
|
-
|| a.owningEntity.name.localeCompare(b.owningEntity.name)
|
|
10
|
-
|| a.owningRelation.name.localeCompare(b.owningRelation.name)
|
|
11
|
-
|
|
12
|
-
export const OnDelete = ({ references, entity, visited = [] }: { references: ReferencesMap; entity: Model.Entity; visited?: Model.Entity[] }) => {
|
|
13
|
-
const referencedFrom = references[entity.name]
|
|
14
|
-
if (referencedFrom.length === 0) {
|
|
15
|
-
if (visited.length !== 0) {
|
|
16
|
-
return null
|
|
17
|
-
}
|
|
18
|
-
return (
|
|
19
|
-
<span class={'bg-green-200 text-gray-600 p-1 rounded'}>
|
|
20
|
-
This entity is not referenced from any other entity.
|
|
21
|
-
</span>
|
|
22
|
-
)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
if (visited.includes(entity)) {
|
|
26
|
-
return (
|
|
27
|
-
<ul class={'ml-4'}>
|
|
28
|
-
<li class={'italic'}>(recursion)</li>
|
|
29
|
-
</ul>
|
|
30
|
-
)
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<ul class={visited.length > 0 ? 'ml-4' : ''}>
|
|
35
|
-
{referencedFrom
|
|
36
|
-
.sort(sortReferences)
|
|
37
|
-
.map(it => {
|
|
38
|
-
const inverseDescr = it.targetRelation
|
|
39
|
-
? <>see <FieldLink entity={entity.name} field={it.targetRelation.name} /></>
|
|
40
|
-
: 'no inverse side'
|
|
41
|
-
if (it.owningRelation.joiningColumn.onDelete === 'restrict') {
|
|
42
|
-
return (
|
|
43
|
-
<li>
|
|
44
|
-
<span class={'bg-black text-white px-1'}>Fails</span> when referenced from
|
|
45
|
-
{' '}<FieldLink entity={it.owningEntity.name} field={it.owningRelation.name} />
|
|
46
|
-
{' '}({inverseDescr})
|
|
47
|
-
</li>
|
|
48
|
-
)
|
|
49
|
-
}
|
|
50
|
-
if (it.owningRelation.joiningColumn.onDelete === 'set null') {
|
|
51
|
-
return (
|
|
52
|
-
<li>
|
|
53
|
-
<span class={'bg-blue-400 text-white px-1'}>Sets null</span> at
|
|
54
|
-
{' '}<FieldLink entity={it.owningEntity.name} field={it.owningRelation.name} />
|
|
55
|
-
{' '}({inverseDescr})
|
|
56
|
-
</li>
|
|
57
|
-
)
|
|
58
|
-
}
|
|
59
|
-
if (it.owningRelation.joiningColumn.onDelete === 'cascade') {
|
|
60
|
-
return (
|
|
61
|
-
<li>
|
|
62
|
-
<span class={'bg-red-400 text-white px-1'}>Deletes</span> <EntityLink entity={it.owningEntity.name} />
|
|
63
|
-
{' '}connected using
|
|
64
|
-
{' '}<FieldLink entity={it.owningEntity.name} field={it.owningRelation.name} noEntityLabel />
|
|
65
|
-
{' '}({inverseDescr})
|
|
66
|
-
<OnDelete entity={it.owningEntity} visited={[...visited, entity]} references={references} />
|
|
67
|
-
</li>
|
|
68
|
-
)
|
|
69
|
-
}
|
|
70
|
-
})}
|
|
71
|
-
</ul>)
|
|
72
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Schema } from '@contember/schema'
|
|
2
|
-
import { h } from 'preact'
|
|
3
|
-
import { collectReferences } from '../../schema/collectReferences'
|
|
4
|
-
import { EntityLink } from './EntityLink'
|
|
5
|
-
import { EntityInfo } from './EntityInfo'
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export const ProjectInfo = (props: { schema: Schema; projectName: string }) => {
|
|
9
|
-
const references = collectReferences(props.schema.model)
|
|
10
|
-
|
|
11
|
-
return (
|
|
12
|
-
<div class={'w-full'}>
|
|
13
|
-
<div class={'bg-gray-100 p-6 border-b border-gray-400'}>
|
|
14
|
-
<h1 class={'font-bold text-xl mb-1'}>{props.projectName}</h1>
|
|
15
|
-
<div class={'flex flex-column gap-4'}>
|
|
16
|
-
<div>
|
|
17
|
-
<h2 class={'font-semibold text-gray-500 mb-1'}>Entities</h2>
|
|
18
|
-
<ul class={'text-sm'}>
|
|
19
|
-
{Object.values(props.schema.model.entities).map(entity => (
|
|
20
|
-
<li>
|
|
21
|
-
<EntityLink entity={entity.name} />
|
|
22
|
-
</li>
|
|
23
|
-
))}
|
|
24
|
-
</ul>
|
|
25
|
-
</div>
|
|
26
|
-
<div>
|
|
27
|
-
<h2 class={'font-semibold text-gray-500 mb-1'}>Enums</h2>
|
|
28
|
-
<ul class={'text-sm'}>
|
|
29
|
-
{Object.entries(props.schema.model.enums).map(([name, values]) => (
|
|
30
|
-
<li class={'mb-2'}>
|
|
31
|
-
{name} <br />
|
|
32
|
-
<span class={'text-gray-700 ml-4'}>
|
|
33
|
-
{values.join(', ')}
|
|
34
|
-
</span>
|
|
35
|
-
</li>
|
|
36
|
-
))}
|
|
37
|
-
</ul>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
</div>
|
|
43
|
-
{Object.values(props.schema.model.entities).map(entity => (
|
|
44
|
-
<EntityInfo entity={entity} schema={props.schema} references={references}/>
|
|
45
|
-
))}
|
|
46
|
-
</div>
|
|
47
|
-
)
|
|
48
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Project } from '@contember/cli-common'
|
|
2
|
-
import { Schema } from '@contember/schema'
|
|
3
|
-
import { join } from 'node:path'
|
|
4
|
-
import { schemaType } from '@contember/schema-utils'
|
|
5
|
-
import { buildJs } from '../esbuild'
|
|
6
|
-
|
|
7
|
-
export const loadSchema = async (project: Project): Promise<Schema> => {
|
|
8
|
-
const bundledJs = await buildJs(join(project.apiDir, 'index.ts'))
|
|
9
|
-
|
|
10
|
-
const fn = new Function('require', `var module = {}; ((module) => { ${bundledJs} })(module); return module`)
|
|
11
|
-
|
|
12
|
-
const schema = fn(require).exports.default
|
|
13
|
-
return schemaType(schema)
|
|
14
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Schema } from '@contember/schema'
|
|
2
|
-
import { h } from 'preact'
|
|
3
|
-
import render from 'preact-render-to-string'
|
|
4
|
-
import { ProjectInfo } from './components/ProjectInfo'
|
|
5
|
-
import { readFile } from 'node:fs/promises'
|
|
6
|
-
|
|
7
|
-
export const renderProjectInfoHtml = async (schema: Schema, projectName: string) => {
|
|
8
|
-
const html = render(<ProjectInfo schema={schema} projectName={projectName} />)
|
|
9
|
-
|
|
10
|
-
const css = await readFile(__dirname + '/resources/out.css')
|
|
11
|
-
return `<!DOCTYPE html>
|
|
12
|
-
<html lang="en">
|
|
13
|
-
<head>
|
|
14
|
-
<meta charset="UTF-8">
|
|
15
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
16
|
-
<style>${css}</style>
|
|
17
|
-
<title>${projectName}</title>
|
|
18
|
-
</head>
|
|
19
|
-
<body>
|
|
20
|
-
${html}
|
|
21
|
-
</body>
|
|
22
|
-
</html>
|
|
23
|
-
`
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
package/src/utils/schema.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { SchemaValidator, SchemaValidatorSkippedErrors, ValidationError } from '@contember/schema-utils'
|
|
2
|
-
import { Schema } from '@contember/schema'
|
|
3
|
-
|
|
4
|
-
export const printValidationErrors = (errors: ValidationError[], message?: string) => {
|
|
5
|
-
if (errors.length === 0) {
|
|
6
|
-
return
|
|
7
|
-
}
|
|
8
|
-
console.group(message || 'Schema is invalid:')
|
|
9
|
-
for (const err of errors) {
|
|
10
|
-
console.log(`${err.path.join('.')}: [${err.code}] ${err.message}`)
|
|
11
|
-
}
|
|
12
|
-
console.groupEnd()
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const validateSchemaAndPrintErrors = (schema: Schema, message?: string, skippedErrors?: SchemaValidatorSkippedErrors[]): boolean => {
|
|
16
|
-
const errors = SchemaValidator.validate(schema, skippedErrors)
|
|
17
|
-
printValidationErrors(errors, message)
|
|
18
|
-
return errors.length === 0
|
|
19
|
-
}
|