@contember/cli 2.2.0-alpha.1 → 2.2.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/CLAUDE.md +35 -41
- package/dist/development/run.cjs +12 -4
- package/dist/development/run.cjs.map +1 -1
- package/dist/development/run.js +12 -4
- package/dist/development/run.js.map +1 -1
- package/dist/development/src/commands/actions/ActionsGetEventCommand.cjs +30 -15
- package/dist/development/src/commands/actions/ActionsGetEventCommand.cjs.map +1 -1
- package/dist/development/src/commands/actions/ActionsGetEventCommand.js +31 -16
- package/dist/development/src/commands/actions/ActionsGetEventCommand.js.map +1 -1
- package/dist/development/src/commands/actions/ActionsListFailedEventsCommand.cjs +21 -41
- package/dist/development/src/commands/actions/ActionsListFailedEventsCommand.cjs.map +1 -1
- package/dist/development/src/commands/actions/ActionsListFailedEventsCommand.js +22 -42
- package/dist/development/src/commands/actions/ActionsListFailedEventsCommand.js.map +1 -1
- package/dist/development/src/commands/actions/ActionsListVariablesCommand.cjs +15 -13
- package/dist/development/src/commands/actions/ActionsListVariablesCommand.cjs.map +1 -1
- package/dist/development/src/commands/actions/ActionsListVariablesCommand.js +15 -13
- package/dist/development/src/commands/actions/ActionsListVariablesCommand.js.map +1 -1
- package/dist/development/src/commands/actions/ActionsRetryEventCommand.cjs +28 -16
- package/dist/development/src/commands/actions/ActionsRetryEventCommand.cjs.map +1 -1
- package/dist/development/src/commands/actions/ActionsRetryEventCommand.js +29 -17
- package/dist/development/src/commands/actions/ActionsRetryEventCommand.js.map +1 -1
- package/dist/development/src/commands/actions/ActionsSetVariablesCommand.cjs +51 -22
- package/dist/development/src/commands/actions/ActionsSetVariablesCommand.cjs.map +1 -1
- package/dist/development/src/commands/actions/ActionsSetVariablesCommand.js +52 -23
- package/dist/development/src/commands/actions/ActionsSetVariablesCommand.js.map +1 -1
- package/dist/development/src/commands/actions/ActionsStopEventCommand.cjs +28 -16
- package/dist/development/src/commands/actions/ActionsStopEventCommand.cjs.map +1 -1
- package/dist/development/src/commands/actions/ActionsStopEventCommand.js +29 -17
- package/dist/development/src/commands/actions/ActionsStopEventCommand.js.map +1 -1
- package/dist/development/src/commands/deploy/DeployCommand.cjs +56 -29
- package/dist/development/src/commands/deploy/DeployCommand.cjs.map +1 -1
- package/dist/development/src/commands/deploy/DeployCommand.js +57 -30
- package/dist/development/src/commands/deploy/DeployCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationAmendCommand.cjs +64 -24
- package/dist/development/src/commands/migrations/MigrationAmendCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationAmendCommand.js +65 -25
- package/dist/development/src/commands/migrations/MigrationAmendCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationBlankCommand.cjs +2 -2
- package/dist/development/src/commands/migrations/MigrationBlankCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationBlankCommand.js +2 -2
- package/dist/development/src/commands/migrations/MigrationBlankCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationDescribeCommand.cjs +7 -3
- package/dist/development/src/commands/migrations/MigrationDescribeCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationDescribeCommand.js +8 -4
- package/dist/development/src/commands/migrations/MigrationDescribeCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationDiffCommand.cjs +73 -25
- package/dist/development/src/commands/migrations/MigrationDiffCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationDiffCommand.js +74 -26
- package/dist/development/src/commands/migrations/MigrationDiffCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationExecuteCommand.cjs +7 -2
- package/dist/development/src/commands/migrations/MigrationExecuteCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationExecuteCommand.js +7 -2
- package/dist/development/src/commands/migrations/MigrationExecuteCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationInitStateCommand.cjs +11 -4
- package/dist/development/src/commands/migrations/MigrationInitStateCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationInitStateCommand.js +11 -4
- package/dist/development/src/commands/migrations/MigrationInitStateCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationRebaseCommand.cjs +24 -4
- package/dist/development/src/commands/migrations/MigrationRebaseCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationRebaseCommand.js +25 -5
- package/dist/development/src/commands/migrations/MigrationRebaseCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationSnapshotCommand.cjs +39 -8
- package/dist/development/src/commands/migrations/MigrationSnapshotCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationSnapshotCommand.js +40 -9
- package/dist/development/src/commands/migrations/MigrationSnapshotCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationStatusCommand.cjs +5 -5
- package/dist/development/src/commands/migrations/MigrationStatusCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationStatusCommand.js +5 -5
- package/dist/development/src/commands/migrations/MigrationStatusCommand.js.map +1 -1
- package/dist/development/src/commands/migrations/MigrationVerifySnapshotCommand.cjs +6 -7
- package/dist/development/src/commands/migrations/MigrationVerifySnapshotCommand.cjs.map +1 -1
- package/dist/development/src/commands/migrations/MigrationVerifySnapshotCommand.js +6 -7
- package/dist/development/src/commands/migrations/MigrationVerifySnapshotCommand.js.map +1 -1
- package/dist/development/src/commands/misc/CommandsCommand.cjs +58 -0
- package/dist/development/src/commands/misc/CommandsCommand.cjs.map +1 -0
- package/dist/development/src/commands/misc/CommandsCommand.js +58 -0
- package/dist/development/src/commands/misc/CommandsCommand.js.map +1 -0
- package/dist/development/src/commands/misc/VersionCommand.cjs +2 -3
- package/dist/development/src/commands/misc/VersionCommand.cjs.map +1 -1
- package/dist/development/src/commands/misc/VersionCommand.js +2 -3
- package/dist/development/src/commands/misc/VersionCommand.js.map +1 -1
- package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.cjs +12 -12
- package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.cjs.map +1 -1
- package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.js +13 -13
- package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.js.map +1 -1
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.cjs +17 -15
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -1
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.js +18 -16
- package/dist/development/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -1
- package/dist/development/src/commands/project/ProjectValidateCommand.cjs +40 -12
- package/dist/development/src/commands/project/ProjectValidateCommand.cjs.map +1 -1
- package/dist/development/src/commands/project/ProjectValidateCommand.js +42 -14
- package/dist/development/src/commands/project/ProjectValidateCommand.js.map +1 -1
- package/dist/development/src/commands/tenant/TenantApplyCommand.cjs +32 -12
- package/dist/development/src/commands/tenant/TenantApplyCommand.cjs.map +1 -1
- package/dist/development/src/commands/tenant/TenantApplyCommand.js +33 -13
- package/dist/development/src/commands/tenant/TenantApplyCommand.js.map +1 -1
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyCreateCommand.cjs +68 -0
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyCreateCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyCreateCommand.js +68 -0
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyCreateCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyDisableCommand.cjs +31 -0
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyDisableCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyDisableCommand.js +31 -0
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyDisableCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyListCommand.cjs +55 -0
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyListCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyListCommand.js +55 -0
- package/dist/development/src/commands/tenant/apikey/TenantApiKeyListCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberAddCommand.cjs +36 -0
- package/dist/development/src/commands/tenant/member/TenantMemberAddCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberAddCommand.js +36 -0
- package/dist/development/src/commands/tenant/member/TenantMemberAddCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberInviteCommand.cjs +62 -0
- package/dist/development/src/commands/tenant/member/TenantMemberInviteCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberInviteCommand.js +62 -0
- package/dist/development/src/commands/tenant/member/TenantMemberInviteCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.cjs +102 -0
- package/dist/development/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.js +102 -0
- package/dist/development/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberListCommand.cjs +73 -0
- package/dist/development/src/commands/tenant/member/TenantMemberListCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberListCommand.js +73 -0
- package/dist/development/src/commands/tenant/member/TenantMemberListCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberRemoveCommand.cjs +35 -0
- package/dist/development/src/commands/tenant/member/TenantMemberRemoveCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberRemoveCommand.js +35 -0
- package/dist/development/src/commands/tenant/member/TenantMemberRemoveCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberUpdateCommand.cjs +45 -0
- package/dist/development/src/commands/tenant/member/TenantMemberUpdateCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/member/TenantMemberUpdateCommand.js +45 -0
- package/dist/development/src/commands/tenant/member/TenantMemberUpdateCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/member/memberOptions.cjs +16 -0
- package/dist/development/src/commands/tenant/member/memberOptions.cjs.map +1 -0
- package/dist/development/src/commands/tenant/member/memberOptions.js +16 -0
- package/dist/development/src/commands/tenant/member/memberOptions.js.map +1 -0
- package/dist/development/src/commands/tenant/member/membershipInput.cjs +109 -0
- package/dist/development/src/commands/tenant/member/membershipInput.cjs.map +1 -0
- package/dist/development/src/commands/tenant/member/membershipInput.js +109 -0
- package/dist/development/src/commands/tenant/member/membershipInput.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantIdentityRoleAddCommand.cjs +27 -0
- package/dist/development/src/commands/tenant/person/TenantIdentityRoleAddCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantIdentityRoleAddCommand.js +27 -0
- package/dist/development/src/commands/tenant/person/TenantIdentityRoleAddCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.cjs +34 -0
- package/dist/development/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.js +34 -0
- package/dist/development/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonCreateCommand.cjs +79 -0
- package/dist/development/src/commands/tenant/person/TenantPersonCreateCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonCreateCommand.js +79 -0
- package/dist/development/src/commands/tenant/person/TenantPersonCreateCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonDisableCommand.cjs +29 -0
- package/dist/development/src/commands/tenant/person/TenantPersonDisableCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonDisableCommand.js +29 -0
- package/dist/development/src/commands/tenant/person/TenantPersonDisableCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonListCommand.cjs +53 -0
- package/dist/development/src/commands/tenant/person/TenantPersonListCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonListCommand.js +53 -0
- package/dist/development/src/commands/tenant/person/TenantPersonListCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonResetMfaCommand.cjs +37 -0
- package/dist/development/src/commands/tenant/person/TenantPersonResetMfaCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonResetMfaCommand.js +37 -0
- package/dist/development/src/commands/tenant/person/TenantPersonResetMfaCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.cjs +47 -0
- package/dist/development/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.js +47 -0
- package/dist/development/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonSetPasswordCommand.cjs +46 -0
- package/dist/development/src/commands/tenant/person/TenantPersonSetPasswordCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonSetPasswordCommand.js +46 -0
- package/dist/development/src/commands/tenant/person/TenantPersonSetPasswordCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonShowCommand.cjs +55 -0
- package/dist/development/src/commands/tenant/person/TenantPersonShowCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonShowCommand.js +55 -0
- package/dist/development/src/commands/tenant/person/TenantPersonShowCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonSignOutCommand.cjs +38 -0
- package/dist/development/src/commands/tenant/person/TenantPersonSignOutCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonSignOutCommand.js +38 -0
- package/dist/development/src/commands/tenant/person/TenantPersonSignOutCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonUpdateCommand.cjs +36 -0
- package/dist/development/src/commands/tenant/person/TenantPersonUpdateCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantPersonUpdateCommand.js +36 -0
- package/dist/development/src/commands/tenant/person/TenantPersonUpdateCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantSessionCreateCommand.cjs +65 -0
- package/dist/development/src/commands/tenant/person/TenantSessionCreateCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/TenantSessionCreateCommand.js +65 -0
- package/dist/development/src/commands/tenant/person/TenantSessionCreateCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/person/personInput.cjs +77 -0
- package/dist/development/src/commands/tenant/person/personInput.cjs.map +1 -0
- package/dist/development/src/commands/tenant/person/personInput.js +77 -0
- package/dist/development/src/commands/tenant/person/personInput.js.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantAuthLogCommand.cjs +96 -0
- package/dist/development/src/commands/tenant/policy/TenantAuthLogCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantAuthLogCommand.js +96 -0
- package/dist/development/src/commands/tenant/policy/TenantAuthLogCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateAddCommand.cjs +59 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateAddCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateAddCommand.js +59 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateAddCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateListCommand.cjs +41 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateListCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateListCommand.js +41 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateListCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.cjs +42 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.js +42 -0
- package/dist/development/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyCreateCommand.cjs +36 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyCreateCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyCreateCommand.js +36 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyCreateCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyDeleteCommand.cjs +31 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyDeleteCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyDeleteCommand.js +31 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyDeleteCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyListCommand.cjs +33 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyListCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyListCommand.js +33 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyListCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyUpdateCommand.cjs +38 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyUpdateCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyUpdateCommand.js +38 -0
- package/dist/development/src/commands/tenant/policy/TenantPolicyUpdateCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/policy/policyInput.cjs +167 -0
- package/dist/development/src/commands/tenant/policy/policyInput.cjs.map +1 -0
- package/dist/development/src/commands/tenant/policy/policyInput.js +167 -0
- package/dist/development/src/commands/tenant/policy/policyInput.js.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantConfigShowCommand.cjs +24 -0
- package/dist/development/src/commands/tenant/project/TenantConfigShowCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantConfigShowCommand.js +24 -0
- package/dist/development/src/commands/tenant/project/TenantConfigShowCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantIdpListCommand.cjs +22 -0
- package/dist/development/src/commands/tenant/project/TenantIdpListCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantIdpListCommand.js +22 -0
- package/dist/development/src/commands/tenant/project/TenantIdpListCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantProjectCreateCommand.cjs +53 -0
- package/dist/development/src/commands/tenant/project/TenantProjectCreateCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantProjectCreateCommand.js +53 -0
- package/dist/development/src/commands/tenant/project/TenantProjectCreateCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantProjectListCommand.cjs +22 -0
- package/dist/development/src/commands/tenant/project/TenantProjectListCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantProjectListCommand.js +22 -0
- package/dist/development/src/commands/tenant/project/TenantProjectListCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantProjectSecretSetCommand.cjs +50 -0
- package/dist/development/src/commands/tenant/project/TenantProjectSecretSetCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantProjectSecretSetCommand.js +50 -0
- package/dist/development/src/commands/tenant/project/TenantProjectSecretSetCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantProjectShowCommand.cjs +23 -0
- package/dist/development/src/commands/tenant/project/TenantProjectShowCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantProjectShowCommand.js +23 -0
- package/dist/development/src/commands/tenant/project/TenantProjectShowCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantProjectUpdateCommand.cjs +53 -0
- package/dist/development/src/commands/tenant/project/TenantProjectUpdateCommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantProjectUpdateCommand.js +53 -0
- package/dist/development/src/commands/tenant/project/TenantProjectUpdateCommand.js.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantWhoAmICommand.cjs +18 -0
- package/dist/development/src/commands/tenant/project/TenantWhoAmICommand.cjs.map +1 -0
- package/dist/development/src/commands/tenant/project/TenantWhoAmICommand.js +18 -0
- package/dist/development/src/commands/tenant/project/TenantWhoAmICommand.js.map +1 -0
- package/dist/development/src/commands/tenant/project/jsonConfigOption.cjs +26 -0
- package/dist/development/src/commands/tenant/project/jsonConfigOption.cjs.map +1 -0
- package/dist/development/src/commands/tenant/project/jsonConfigOption.js +26 -0
- package/dist/development/src/commands/tenant/project/jsonConfigOption.js.map +1 -0
- package/dist/development/src/commands/tenant/tenantOutput.cjs +35 -0
- package/dist/development/src/commands/tenant/tenantOutput.cjs.map +1 -0
- package/dist/development/src/commands/tenant/tenantOutput.js +35 -0
- package/dist/development/src/commands/tenant/tenantOutput.js.map +1 -0
- package/dist/development/src/commands/transfer/ExportCommand.cjs +35 -20
- package/dist/development/src/commands/transfer/ExportCommand.cjs.map +1 -1
- package/dist/development/src/commands/transfer/ExportCommand.js +38 -23
- package/dist/development/src/commands/transfer/ExportCommand.js.map +1 -1
- package/dist/development/src/commands/transfer/ImportCommand.cjs +70 -27
- package/dist/development/src/commands/transfer/ImportCommand.cjs.map +1 -1
- package/dist/development/src/commands/transfer/ImportCommand.js +72 -29
- package/dist/development/src/commands/transfer/ImportCommand.js.map +1 -1
- package/dist/development/src/commands/transfer/TransferCommand.cjs +79 -29
- package/dist/development/src/commands/transfer/TransferCommand.cjs.map +1 -1
- package/dist/development/src/commands/transfer/TransferCommand.js +81 -31
- package/dist/development/src/commands/transfer/TransferCommand.js.map +1 -1
- package/dist/development/src/commands/transfer/utils.cjs +12 -10
- package/dist/development/src/commands/transfer/utils.cjs.map +1 -1
- package/dist/development/src/commands/transfer/utils.js +12 -10
- package/dist/development/src/commands/transfer/utils.js.map +1 -1
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.cjs +87 -32
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.cjs.map +1 -1
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.js +89 -34
- package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +1 -1
- package/dist/development/src/dic.cjs +152 -47
- package/dist/development/src/dic.cjs.map +1 -1
- package/dist/development/src/dic.js +152 -47
- package/dist/development/src/dic.js.map +1 -1
- package/dist/development/src/lib/SystemClientProvider.cjs +55 -2
- package/dist/development/src/lib/SystemClientProvider.cjs.map +1 -1
- package/dist/development/src/lib/SystemClientProvider.js +55 -2
- package/dist/development/src/lib/SystemClientProvider.js.map +1 -1
- package/dist/development/src/lib/TenantClientProvider.cjs +28 -5
- package/dist/development/src/lib/TenantClientProvider.cjs.map +1 -1
- package/dist/development/src/lib/TenantClientProvider.js +28 -5
- package/dist/development/src/lib/TenantClientProvider.js.map +1 -1
- package/dist/development/src/lib/actions/ActionsClient.cjs +18 -6
- package/dist/development/src/lib/actions/ActionsClient.cjs.map +1 -1
- package/dist/development/src/lib/actions/ActionsClient.js +18 -6
- package/dist/development/src/lib/actions/ActionsClient.js.map +1 -1
- package/dist/development/src/lib/actions/resolveActionsClient.cjs +13 -0
- package/dist/development/src/lib/actions/resolveActionsClient.cjs.map +1 -0
- package/dist/development/src/lib/actions/resolveActionsClient.js +13 -0
- package/dist/development/src/lib/actions/resolveActionsClient.js.map +1 -0
- package/dist/development/src/lib/actions/runActionMutationBatch.cjs +44 -0
- package/dist/development/src/lib/actions/runActionMutationBatch.cjs.map +1 -0
- package/dist/development/src/lib/actions/runActionMutationBatch.js +44 -0
- package/dist/development/src/lib/actions/runActionMutationBatch.js.map +1 -0
- package/dist/development/src/lib/admin/AdminClient.cjs +31 -11
- package/dist/development/src/lib/admin/AdminClient.cjs.map +1 -1
- package/dist/development/src/lib/admin/AdminClient.js +31 -11
- package/dist/development/src/lib/admin/AdminClient.js.map +1 -1
- package/dist/development/src/lib/admin/AdminDeployer.cjs +5 -3
- package/dist/development/src/lib/admin/AdminDeployer.cjs.map +1 -1
- package/dist/development/src/lib/admin/AdminDeployer.js +5 -3
- package/dist/development/src/lib/admin/AdminDeployer.js.map +1 -1
- package/dist/development/src/lib/errors/TransportError.cjs +204 -0
- package/dist/development/src/lib/errors/TransportError.cjs.map +1 -0
- package/dist/development/src/lib/errors/TransportError.js +204 -0
- package/dist/development/src/lib/errors/TransportError.js.map +1 -0
- package/dist/development/src/lib/maskToken.cjs +7 -1
- package/dist/development/src/lib/maskToken.cjs.map +1 -1
- package/dist/development/src/lib/maskToken.js +7 -1
- package/dist/development/src/lib/maskToken.js.map +1 -1
- package/dist/development/src/lib/migrations/MigrationExecutionFacade.cjs +97 -50
- package/dist/development/src/lib/migrations/MigrationExecutionFacade.cjs.map +1 -1
- package/dist/development/src/lib/migrations/MigrationExecutionFacade.js +97 -50
- package/dist/development/src/lib/migrations/MigrationExecutionFacade.js.map +1 -1
- package/dist/development/src/lib/migrations/MigrationPrinter.cjs +80 -64
- package/dist/development/src/lib/migrations/MigrationPrinter.cjs.map +1 -1
- package/dist/development/src/lib/migrations/MigrationPrinter.js +81 -65
- package/dist/development/src/lib/migrations/MigrationPrinter.js.map +1 -1
- package/dist/development/src/lib/migrations/MigrationRebaseFacade.cjs +2 -1
- package/dist/development/src/lib/migrations/MigrationRebaseFacade.cjs.map +1 -1
- package/dist/development/src/lib/migrations/MigrationRebaseFacade.js +2 -1
- package/dist/development/src/lib/migrations/MigrationRebaseFacade.js.map +1 -1
- package/dist/development/src/lib/migrations/MigrationSnapshotFacade.cjs +14 -10
- package/dist/development/src/lib/migrations/MigrationSnapshotFacade.cjs.map +1 -1
- package/dist/development/src/lib/migrations/MigrationSnapshotFacade.js +14 -10
- package/dist/development/src/lib/migrations/MigrationSnapshotFacade.js.map +1 -1
- package/dist/development/src/lib/migrations/MigrationsStatusFacade.cjs +12 -4
- package/dist/development/src/lib/migrations/MigrationsStatusFacade.cjs.map +1 -1
- package/dist/development/src/lib/migrations/MigrationsStatusFacade.js +12 -4
- package/dist/development/src/lib/migrations/MigrationsStatusFacade.js.map +1 -1
- package/dist/development/src/lib/migrations/MigrationsValidator.cjs +5 -3
- package/dist/development/src/lib/migrations/MigrationsValidator.cjs.map +1 -1
- package/dist/development/src/lib/migrations/MigrationsValidator.js +5 -3
- package/dist/development/src/lib/migrations/MigrationsValidator.js.map +1 -1
- package/dist/development/src/lib/project/RemoteProjectProvider.cjs +5 -1
- package/dist/development/src/lib/project/RemoteProjectProvider.cjs.map +1 -1
- package/dist/development/src/lib/project/RemoteProjectProvider.js +5 -1
- package/dist/development/src/lib/project/RemoteProjectProvider.js.map +1 -1
- package/dist/development/src/lib/prompt/prompt.cjs +13 -0
- package/dist/development/src/lib/prompt/prompt.cjs.map +1 -0
- package/dist/development/src/lib/prompt/prompt.internal.cjs +21 -0
- package/dist/development/src/lib/prompt/prompt.internal.cjs.map +1 -0
- package/dist/development/src/lib/prompt/prompt.internal.js +21 -0
- package/dist/development/src/lib/prompt/prompt.internal.js.map +1 -0
- package/dist/development/src/lib/prompt/prompt.js +13 -0
- package/dist/development/src/lib/prompt/prompt.js.map +1 -0
- package/dist/development/src/lib/schema/SchemaValidationHelper.cjs +2 -2
- package/dist/development/src/lib/schema/SchemaValidationHelper.cjs.map +1 -1
- package/dist/development/src/lib/schema/SchemaValidationHelper.js +2 -2
- package/dist/development/src/lib/schema/SchemaValidationHelper.js.map +1 -1
- package/dist/development/src/lib/schema/SchemaValidationPrinter.cjs +4 -4
- package/dist/development/src/lib/schema/SchemaValidationPrinter.cjs.map +1 -1
- package/dist/development/src/lib/schema/SchemaValidationPrinter.js +4 -4
- package/dist/development/src/lib/schema/SchemaValidationPrinter.js.map +1 -1
- package/dist/development/src/lib/tenant/TenantApiTransport.cjs +160 -0
- package/dist/development/src/lib/tenant/TenantApiTransport.cjs.map +1 -0
- package/dist/development/src/lib/tenant/TenantApiTransport.js +160 -0
- package/dist/development/src/lib/tenant/TenantApiTransport.js.map +1 -0
- package/dist/development/src/lib/tenant/TenantConfigApplier.cjs +110 -26
- package/dist/development/src/lib/tenant/TenantConfigApplier.cjs.map +1 -1
- package/dist/development/src/lib/tenant/TenantConfigApplier.js +110 -26
- package/dist/development/src/lib/tenant/TenantConfigApplier.js.map +1 -1
- package/dist/development/src/lib/tenant/TenantConnectionProvider.cjs +20 -0
- package/dist/development/src/lib/tenant/TenantConnectionProvider.cjs.map +1 -0
- package/dist/development/src/lib/tenant/TenantConnectionProvider.js +20 -0
- package/dist/development/src/lib/tenant/TenantConnectionProvider.js.map +1 -0
- package/dist/development/src/lib/tenant/TenantConnectionResolver.cjs +30 -0
- package/dist/development/src/lib/tenant/TenantConnectionResolver.cjs.map +1 -0
- package/dist/development/src/lib/tenant/TenantConnectionResolver.js +30 -0
- package/dist/development/src/lib/tenant/TenantConnectionResolver.js.map +1 -0
- package/dist/development/src/lib/tenant/authPolicy.cjs +10 -0
- package/dist/development/src/lib/tenant/authPolicy.cjs.map +1 -0
- package/dist/development/src/lib/tenant/authPolicy.js +10 -0
- package/dist/development/src/lib/tenant/authPolicy.js.map +1 -0
- package/dist/development/src/lib/tenant/clients/TenantApiKeyClient.cjs +101 -0
- package/dist/development/src/lib/tenant/clients/TenantApiKeyClient.cjs.map +1 -0
- package/dist/development/src/lib/tenant/clients/TenantApiKeyClient.js +101 -0
- package/dist/development/src/lib/tenant/clients/TenantApiKeyClient.js.map +1 -0
- package/dist/development/src/lib/tenant/clients/TenantMemberClient.cjs +96 -0
- package/dist/development/src/lib/tenant/clients/TenantMemberClient.cjs.map +1 -0
- package/dist/development/src/lib/tenant/clients/TenantMemberClient.js +96 -0
- package/dist/development/src/lib/tenant/clients/TenantMemberClient.js.map +1 -0
- package/dist/development/src/lib/tenant/clients/TenantPersonClient.cjs +162 -0
- package/dist/development/src/lib/tenant/clients/TenantPersonClient.cjs.map +1 -0
- package/dist/development/src/lib/tenant/clients/TenantPersonClient.js +162 -0
- package/dist/development/src/lib/tenant/clients/TenantPersonClient.js.map +1 -0
- package/dist/development/src/lib/tenant/clients/TenantPolicyClient.cjs +135 -0
- package/dist/development/src/lib/tenant/clients/TenantPolicyClient.cjs.map +1 -0
- package/dist/development/src/lib/tenant/clients/TenantPolicyClient.js +135 -0
- package/dist/development/src/lib/tenant/clients/TenantPolicyClient.js.map +1 -0
- package/dist/development/src/lib/tenant/clients/TenantProjectClient.cjs +209 -0
- package/dist/development/src/lib/tenant/clients/TenantProjectClient.cjs.map +1 -0
- package/dist/development/src/lib/tenant/clients/TenantProjectClient.js +209 -0
- package/dist/development/src/lib/tenant/clients/TenantProjectClient.js.map +1 -0
- package/dist/development/src/lib/tenant/clients/index.cjs +21 -0
- package/dist/development/src/lib/tenant/clients/index.cjs.map +1 -0
- package/dist/development/src/lib/tenant/clients/index.js +21 -0
- package/dist/development/src/lib/tenant/clients/index.js.map +1 -0
- package/dist/development/src/lib/tenant/confirmation.cjs +23 -0
- package/dist/development/src/lib/tenant/confirmation.cjs.map +1 -0
- package/dist/development/src/lib/tenant/confirmation.js +23 -0
- package/dist/development/src/lib/tenant/confirmation.js.map +1 -0
- package/dist/development/src/lib/tenant/input/pagination.cjs +24 -0
- package/dist/development/src/lib/tenant/input/pagination.cjs.map +1 -0
- package/dist/development/src/lib/tenant/input/pagination.js +24 -0
- package/dist/development/src/lib/tenant/input/pagination.js.map +1 -0
- package/dist/development/src/lib/tenant/input/value.cjs +71 -0
- package/dist/development/src/lib/tenant/input/value.cjs.map +1 -0
- package/dist/development/src/lib/tenant/input/value.js +71 -0
- package/dist/development/src/lib/tenant/input/value.js.map +1 -0
- package/dist/development/src/lib/tenant/stdin.cjs +13 -0
- package/dist/development/src/lib/tenant/stdin.cjs.map +1 -0
- package/dist/development/src/lib/tenant/stdin.js +13 -0
- package/dist/development/src/lib/tenant/stdin.js.map +1 -0
- package/dist/development/src/lib/tenant/tenantConfig.cjs.map +1 -1
- package/dist/development/src/lib/tenant/tenantConfig.js.map +1 -1
- package/dist/development/src/lib/transfer/DataTransferClient.cjs +290 -54
- package/dist/development/src/lib/transfer/DataTransferClient.cjs.map +1 -1
- package/dist/development/src/lib/transfer/DataTransferClient.js +292 -56
- package/dist/development/src/lib/transfer/DataTransferClient.js.map +1 -1
- package/dist/development/src/lib/transfer/stdio.cjs +3 -8
- package/dist/development/src/lib/transfer/stdio.cjs.map +1 -1
- package/dist/development/src/lib/transfer/stdio.js +3 -8
- package/dist/development/src/lib/transfer/stdio.js.map +1 -1
- package/dist/production/run.cjs +12 -4
- package/dist/production/run.cjs.map +1 -1
- package/dist/production/run.js +12 -4
- package/dist/production/run.js.map +1 -1
- package/dist/production/src/commands/actions/ActionsGetEventCommand.cjs +30 -15
- package/dist/production/src/commands/actions/ActionsGetEventCommand.cjs.map +1 -1
- package/dist/production/src/commands/actions/ActionsGetEventCommand.js +31 -16
- package/dist/production/src/commands/actions/ActionsGetEventCommand.js.map +1 -1
- package/dist/production/src/commands/actions/ActionsListFailedEventsCommand.cjs +21 -41
- package/dist/production/src/commands/actions/ActionsListFailedEventsCommand.cjs.map +1 -1
- package/dist/production/src/commands/actions/ActionsListFailedEventsCommand.js +22 -42
- package/dist/production/src/commands/actions/ActionsListFailedEventsCommand.js.map +1 -1
- package/dist/production/src/commands/actions/ActionsListVariablesCommand.cjs +15 -13
- package/dist/production/src/commands/actions/ActionsListVariablesCommand.cjs.map +1 -1
- package/dist/production/src/commands/actions/ActionsListVariablesCommand.js +15 -13
- package/dist/production/src/commands/actions/ActionsListVariablesCommand.js.map +1 -1
- package/dist/production/src/commands/actions/ActionsRetryEventCommand.cjs +28 -16
- package/dist/production/src/commands/actions/ActionsRetryEventCommand.cjs.map +1 -1
- package/dist/production/src/commands/actions/ActionsRetryEventCommand.js +29 -17
- package/dist/production/src/commands/actions/ActionsRetryEventCommand.js.map +1 -1
- package/dist/production/src/commands/actions/ActionsSetVariablesCommand.cjs +51 -22
- package/dist/production/src/commands/actions/ActionsSetVariablesCommand.cjs.map +1 -1
- package/dist/production/src/commands/actions/ActionsSetVariablesCommand.js +52 -23
- package/dist/production/src/commands/actions/ActionsSetVariablesCommand.js.map +1 -1
- package/dist/production/src/commands/actions/ActionsStopEventCommand.cjs +28 -16
- package/dist/production/src/commands/actions/ActionsStopEventCommand.cjs.map +1 -1
- package/dist/production/src/commands/actions/ActionsStopEventCommand.js +29 -17
- package/dist/production/src/commands/actions/ActionsStopEventCommand.js.map +1 -1
- package/dist/production/src/commands/deploy/DeployCommand.cjs +56 -29
- package/dist/production/src/commands/deploy/DeployCommand.cjs.map +1 -1
- package/dist/production/src/commands/deploy/DeployCommand.js +57 -30
- package/dist/production/src/commands/deploy/DeployCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationAmendCommand.cjs +64 -24
- package/dist/production/src/commands/migrations/MigrationAmendCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationAmendCommand.js +65 -25
- package/dist/production/src/commands/migrations/MigrationAmendCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationBlankCommand.cjs +2 -2
- package/dist/production/src/commands/migrations/MigrationBlankCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationBlankCommand.js +2 -2
- package/dist/production/src/commands/migrations/MigrationBlankCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationDescribeCommand.cjs +7 -3
- package/dist/production/src/commands/migrations/MigrationDescribeCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationDescribeCommand.js +8 -4
- package/dist/production/src/commands/migrations/MigrationDescribeCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationDiffCommand.cjs +73 -25
- package/dist/production/src/commands/migrations/MigrationDiffCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationDiffCommand.js +74 -26
- package/dist/production/src/commands/migrations/MigrationDiffCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationExecuteCommand.cjs +7 -2
- package/dist/production/src/commands/migrations/MigrationExecuteCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationExecuteCommand.js +7 -2
- package/dist/production/src/commands/migrations/MigrationExecuteCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationInitStateCommand.cjs +11 -4
- package/dist/production/src/commands/migrations/MigrationInitStateCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationInitStateCommand.js +11 -4
- package/dist/production/src/commands/migrations/MigrationInitStateCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationRebaseCommand.cjs +24 -4
- package/dist/production/src/commands/migrations/MigrationRebaseCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationRebaseCommand.js +25 -5
- package/dist/production/src/commands/migrations/MigrationRebaseCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationSnapshotCommand.cjs +39 -8
- package/dist/production/src/commands/migrations/MigrationSnapshotCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationSnapshotCommand.js +40 -9
- package/dist/production/src/commands/migrations/MigrationSnapshotCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationStatusCommand.cjs +5 -5
- package/dist/production/src/commands/migrations/MigrationStatusCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationStatusCommand.js +5 -5
- package/dist/production/src/commands/migrations/MigrationStatusCommand.js.map +1 -1
- package/dist/production/src/commands/migrations/MigrationVerifySnapshotCommand.cjs +6 -7
- package/dist/production/src/commands/migrations/MigrationVerifySnapshotCommand.cjs.map +1 -1
- package/dist/production/src/commands/migrations/MigrationVerifySnapshotCommand.js +6 -7
- package/dist/production/src/commands/migrations/MigrationVerifySnapshotCommand.js.map +1 -1
- package/dist/production/src/commands/misc/CommandsCommand.cjs +58 -0
- package/dist/production/src/commands/misc/CommandsCommand.cjs.map +1 -0
- package/dist/production/src/commands/misc/CommandsCommand.js +58 -0
- package/dist/production/src/commands/misc/CommandsCommand.js.map +1 -0
- package/dist/production/src/commands/misc/VersionCommand.cjs +2 -3
- package/dist/production/src/commands/misc/VersionCommand.cjs.map +1 -1
- package/dist/production/src/commands/misc/VersionCommand.js +2 -3
- package/dist/production/src/commands/misc/VersionCommand.js.map +1 -1
- package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.cjs +12 -12
- package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.cjs.map +1 -1
- package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.js +13 -13
- package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.js.map +1 -1
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.cjs +17 -15
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -1
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.js +18 -16
- package/dist/production/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -1
- package/dist/production/src/commands/project/ProjectValidateCommand.cjs +40 -12
- package/dist/production/src/commands/project/ProjectValidateCommand.cjs.map +1 -1
- package/dist/production/src/commands/project/ProjectValidateCommand.js +42 -14
- package/dist/production/src/commands/project/ProjectValidateCommand.js.map +1 -1
- package/dist/production/src/commands/tenant/TenantApplyCommand.cjs +32 -12
- package/dist/production/src/commands/tenant/TenantApplyCommand.cjs.map +1 -1
- package/dist/production/src/commands/tenant/TenantApplyCommand.js +33 -13
- package/dist/production/src/commands/tenant/TenantApplyCommand.js.map +1 -1
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyCreateCommand.cjs +68 -0
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyCreateCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyCreateCommand.js +68 -0
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyCreateCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyDisableCommand.cjs +31 -0
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyDisableCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyDisableCommand.js +31 -0
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyDisableCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyListCommand.cjs +55 -0
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyListCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyListCommand.js +55 -0
- package/dist/production/src/commands/tenant/apikey/TenantApiKeyListCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberAddCommand.cjs +36 -0
- package/dist/production/src/commands/tenant/member/TenantMemberAddCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberAddCommand.js +36 -0
- package/dist/production/src/commands/tenant/member/TenantMemberAddCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberInviteCommand.cjs +62 -0
- package/dist/production/src/commands/tenant/member/TenantMemberInviteCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberInviteCommand.js +62 -0
- package/dist/production/src/commands/tenant/member/TenantMemberInviteCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.cjs +102 -0
- package/dist/production/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.js +102 -0
- package/dist/production/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberListCommand.cjs +73 -0
- package/dist/production/src/commands/tenant/member/TenantMemberListCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberListCommand.js +73 -0
- package/dist/production/src/commands/tenant/member/TenantMemberListCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberRemoveCommand.cjs +35 -0
- package/dist/production/src/commands/tenant/member/TenantMemberRemoveCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberRemoveCommand.js +35 -0
- package/dist/production/src/commands/tenant/member/TenantMemberRemoveCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberUpdateCommand.cjs +45 -0
- package/dist/production/src/commands/tenant/member/TenantMemberUpdateCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/member/TenantMemberUpdateCommand.js +45 -0
- package/dist/production/src/commands/tenant/member/TenantMemberUpdateCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/member/memberOptions.cjs +16 -0
- package/dist/production/src/commands/tenant/member/memberOptions.cjs.map +1 -0
- package/dist/production/src/commands/tenant/member/memberOptions.js +16 -0
- package/dist/production/src/commands/tenant/member/memberOptions.js.map +1 -0
- package/dist/production/src/commands/tenant/member/membershipInput.cjs +109 -0
- package/dist/production/src/commands/tenant/member/membershipInput.cjs.map +1 -0
- package/dist/production/src/commands/tenant/member/membershipInput.js +109 -0
- package/dist/production/src/commands/tenant/member/membershipInput.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantIdentityRoleAddCommand.cjs +27 -0
- package/dist/production/src/commands/tenant/person/TenantIdentityRoleAddCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantIdentityRoleAddCommand.js +27 -0
- package/dist/production/src/commands/tenant/person/TenantIdentityRoleAddCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.cjs +34 -0
- package/dist/production/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.js +34 -0
- package/dist/production/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonCreateCommand.cjs +79 -0
- package/dist/production/src/commands/tenant/person/TenantPersonCreateCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonCreateCommand.js +79 -0
- package/dist/production/src/commands/tenant/person/TenantPersonCreateCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonDisableCommand.cjs +29 -0
- package/dist/production/src/commands/tenant/person/TenantPersonDisableCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonDisableCommand.js +29 -0
- package/dist/production/src/commands/tenant/person/TenantPersonDisableCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonListCommand.cjs +53 -0
- package/dist/production/src/commands/tenant/person/TenantPersonListCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonListCommand.js +53 -0
- package/dist/production/src/commands/tenant/person/TenantPersonListCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonResetMfaCommand.cjs +37 -0
- package/dist/production/src/commands/tenant/person/TenantPersonResetMfaCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonResetMfaCommand.js +37 -0
- package/dist/production/src/commands/tenant/person/TenantPersonResetMfaCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.cjs +47 -0
- package/dist/production/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.js +47 -0
- package/dist/production/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonSetPasswordCommand.cjs +46 -0
- package/dist/production/src/commands/tenant/person/TenantPersonSetPasswordCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonSetPasswordCommand.js +46 -0
- package/dist/production/src/commands/tenant/person/TenantPersonSetPasswordCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonShowCommand.cjs +55 -0
- package/dist/production/src/commands/tenant/person/TenantPersonShowCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonShowCommand.js +55 -0
- package/dist/production/src/commands/tenant/person/TenantPersonShowCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonSignOutCommand.cjs +38 -0
- package/dist/production/src/commands/tenant/person/TenantPersonSignOutCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonSignOutCommand.js +38 -0
- package/dist/production/src/commands/tenant/person/TenantPersonSignOutCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonUpdateCommand.cjs +36 -0
- package/dist/production/src/commands/tenant/person/TenantPersonUpdateCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantPersonUpdateCommand.js +36 -0
- package/dist/production/src/commands/tenant/person/TenantPersonUpdateCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantSessionCreateCommand.cjs +65 -0
- package/dist/production/src/commands/tenant/person/TenantSessionCreateCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/TenantSessionCreateCommand.js +65 -0
- package/dist/production/src/commands/tenant/person/TenantSessionCreateCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/person/personInput.cjs +77 -0
- package/dist/production/src/commands/tenant/person/personInput.cjs.map +1 -0
- package/dist/production/src/commands/tenant/person/personInput.js +77 -0
- package/dist/production/src/commands/tenant/person/personInput.js.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantAuthLogCommand.cjs +96 -0
- package/dist/production/src/commands/tenant/policy/TenantAuthLogCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantAuthLogCommand.js +96 -0
- package/dist/production/src/commands/tenant/policy/TenantAuthLogCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateAddCommand.cjs +59 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateAddCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateAddCommand.js +59 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateAddCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateListCommand.cjs +41 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateListCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateListCommand.js +41 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateListCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.cjs +42 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.js +42 -0
- package/dist/production/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyCreateCommand.cjs +36 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyCreateCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyCreateCommand.js +36 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyCreateCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyDeleteCommand.cjs +31 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyDeleteCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyDeleteCommand.js +31 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyDeleteCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyListCommand.cjs +33 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyListCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyListCommand.js +33 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyListCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyUpdateCommand.cjs +38 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyUpdateCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyUpdateCommand.js +38 -0
- package/dist/production/src/commands/tenant/policy/TenantPolicyUpdateCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/policy/policyInput.cjs +167 -0
- package/dist/production/src/commands/tenant/policy/policyInput.cjs.map +1 -0
- package/dist/production/src/commands/tenant/policy/policyInput.js +167 -0
- package/dist/production/src/commands/tenant/policy/policyInput.js.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantConfigShowCommand.cjs +24 -0
- package/dist/production/src/commands/tenant/project/TenantConfigShowCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantConfigShowCommand.js +24 -0
- package/dist/production/src/commands/tenant/project/TenantConfigShowCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantIdpListCommand.cjs +22 -0
- package/dist/production/src/commands/tenant/project/TenantIdpListCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantIdpListCommand.js +22 -0
- package/dist/production/src/commands/tenant/project/TenantIdpListCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantProjectCreateCommand.cjs +53 -0
- package/dist/production/src/commands/tenant/project/TenantProjectCreateCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantProjectCreateCommand.js +53 -0
- package/dist/production/src/commands/tenant/project/TenantProjectCreateCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantProjectListCommand.cjs +22 -0
- package/dist/production/src/commands/tenant/project/TenantProjectListCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantProjectListCommand.js +22 -0
- package/dist/production/src/commands/tenant/project/TenantProjectListCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantProjectSecretSetCommand.cjs +50 -0
- package/dist/production/src/commands/tenant/project/TenantProjectSecretSetCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantProjectSecretSetCommand.js +50 -0
- package/dist/production/src/commands/tenant/project/TenantProjectSecretSetCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantProjectShowCommand.cjs +23 -0
- package/dist/production/src/commands/tenant/project/TenantProjectShowCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantProjectShowCommand.js +23 -0
- package/dist/production/src/commands/tenant/project/TenantProjectShowCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantProjectUpdateCommand.cjs +53 -0
- package/dist/production/src/commands/tenant/project/TenantProjectUpdateCommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantProjectUpdateCommand.js +53 -0
- package/dist/production/src/commands/tenant/project/TenantProjectUpdateCommand.js.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantWhoAmICommand.cjs +18 -0
- package/dist/production/src/commands/tenant/project/TenantWhoAmICommand.cjs.map +1 -0
- package/dist/production/src/commands/tenant/project/TenantWhoAmICommand.js +18 -0
- package/dist/production/src/commands/tenant/project/TenantWhoAmICommand.js.map +1 -0
- package/dist/production/src/commands/tenant/project/jsonConfigOption.cjs +26 -0
- package/dist/production/src/commands/tenant/project/jsonConfigOption.cjs.map +1 -0
- package/dist/production/src/commands/tenant/project/jsonConfigOption.js +26 -0
- package/dist/production/src/commands/tenant/project/jsonConfigOption.js.map +1 -0
- package/dist/production/src/commands/tenant/tenantOutput.cjs +35 -0
- package/dist/production/src/commands/tenant/tenantOutput.cjs.map +1 -0
- package/dist/production/src/commands/tenant/tenantOutput.js +35 -0
- package/dist/production/src/commands/tenant/tenantOutput.js.map +1 -0
- package/dist/production/src/commands/transfer/ExportCommand.cjs +35 -20
- package/dist/production/src/commands/transfer/ExportCommand.cjs.map +1 -1
- package/dist/production/src/commands/transfer/ExportCommand.js +38 -23
- package/dist/production/src/commands/transfer/ExportCommand.js.map +1 -1
- package/dist/production/src/commands/transfer/ImportCommand.cjs +70 -27
- package/dist/production/src/commands/transfer/ImportCommand.cjs.map +1 -1
- package/dist/production/src/commands/transfer/ImportCommand.js +72 -29
- package/dist/production/src/commands/transfer/ImportCommand.js.map +1 -1
- package/dist/production/src/commands/transfer/TransferCommand.cjs +79 -29
- package/dist/production/src/commands/transfer/TransferCommand.cjs.map +1 -1
- package/dist/production/src/commands/transfer/TransferCommand.js +81 -31
- package/dist/production/src/commands/transfer/TransferCommand.js.map +1 -1
- package/dist/production/src/commands/transfer/utils.cjs +12 -10
- package/dist/production/src/commands/transfer/utils.cjs.map +1 -1
- package/dist/production/src/commands/transfer/utils.js +12 -10
- package/dist/production/src/commands/transfer/utils.js.map +1 -1
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.cjs +87 -32
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.cjs.map +1 -1
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.js +89 -34
- package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +1 -1
- package/dist/production/src/dic.cjs +152 -47
- package/dist/production/src/dic.cjs.map +1 -1
- package/dist/production/src/dic.js +152 -47
- package/dist/production/src/dic.js.map +1 -1
- package/dist/production/src/lib/SystemClientProvider.cjs +55 -2
- package/dist/production/src/lib/SystemClientProvider.cjs.map +1 -1
- package/dist/production/src/lib/SystemClientProvider.js +55 -2
- package/dist/production/src/lib/SystemClientProvider.js.map +1 -1
- package/dist/production/src/lib/TenantClientProvider.cjs +28 -5
- package/dist/production/src/lib/TenantClientProvider.cjs.map +1 -1
- package/dist/production/src/lib/TenantClientProvider.js +28 -5
- package/dist/production/src/lib/TenantClientProvider.js.map +1 -1
- package/dist/production/src/lib/actions/ActionsClient.cjs +18 -6
- package/dist/production/src/lib/actions/ActionsClient.cjs.map +1 -1
- package/dist/production/src/lib/actions/ActionsClient.js +18 -6
- package/dist/production/src/lib/actions/ActionsClient.js.map +1 -1
- package/dist/production/src/lib/actions/resolveActionsClient.cjs +13 -0
- package/dist/production/src/lib/actions/resolveActionsClient.cjs.map +1 -0
- package/dist/production/src/lib/actions/resolveActionsClient.js +13 -0
- package/dist/production/src/lib/actions/resolveActionsClient.js.map +1 -0
- package/dist/production/src/lib/actions/runActionMutationBatch.cjs +44 -0
- package/dist/production/src/lib/actions/runActionMutationBatch.cjs.map +1 -0
- package/dist/production/src/lib/actions/runActionMutationBatch.js +44 -0
- package/dist/production/src/lib/actions/runActionMutationBatch.js.map +1 -0
- package/dist/production/src/lib/admin/AdminClient.cjs +31 -11
- package/dist/production/src/lib/admin/AdminClient.cjs.map +1 -1
- package/dist/production/src/lib/admin/AdminClient.js +31 -11
- package/dist/production/src/lib/admin/AdminClient.js.map +1 -1
- package/dist/production/src/lib/admin/AdminDeployer.cjs +5 -3
- package/dist/production/src/lib/admin/AdminDeployer.cjs.map +1 -1
- package/dist/production/src/lib/admin/AdminDeployer.js +5 -3
- package/dist/production/src/lib/admin/AdminDeployer.js.map +1 -1
- package/dist/production/src/lib/errors/TransportError.cjs +204 -0
- package/dist/production/src/lib/errors/TransportError.cjs.map +1 -0
- package/dist/production/src/lib/errors/TransportError.js +204 -0
- package/dist/production/src/lib/errors/TransportError.js.map +1 -0
- package/dist/production/src/lib/maskToken.cjs +7 -1
- package/dist/production/src/lib/maskToken.cjs.map +1 -1
- package/dist/production/src/lib/maskToken.js +7 -1
- package/dist/production/src/lib/maskToken.js.map +1 -1
- package/dist/production/src/lib/migrations/MigrationExecutionFacade.cjs +97 -50
- package/dist/production/src/lib/migrations/MigrationExecutionFacade.cjs.map +1 -1
- package/dist/production/src/lib/migrations/MigrationExecutionFacade.js +97 -50
- package/dist/production/src/lib/migrations/MigrationExecutionFacade.js.map +1 -1
- package/dist/production/src/lib/migrations/MigrationPrinter.cjs +80 -64
- package/dist/production/src/lib/migrations/MigrationPrinter.cjs.map +1 -1
- package/dist/production/src/lib/migrations/MigrationPrinter.js +81 -65
- package/dist/production/src/lib/migrations/MigrationPrinter.js.map +1 -1
- package/dist/production/src/lib/migrations/MigrationRebaseFacade.cjs +2 -1
- package/dist/production/src/lib/migrations/MigrationRebaseFacade.cjs.map +1 -1
- package/dist/production/src/lib/migrations/MigrationRebaseFacade.js +2 -1
- package/dist/production/src/lib/migrations/MigrationRebaseFacade.js.map +1 -1
- package/dist/production/src/lib/migrations/MigrationSnapshotFacade.cjs +14 -10
- package/dist/production/src/lib/migrations/MigrationSnapshotFacade.cjs.map +1 -1
- package/dist/production/src/lib/migrations/MigrationSnapshotFacade.js +14 -10
- package/dist/production/src/lib/migrations/MigrationSnapshotFacade.js.map +1 -1
- package/dist/production/src/lib/migrations/MigrationsStatusFacade.cjs +12 -4
- package/dist/production/src/lib/migrations/MigrationsStatusFacade.cjs.map +1 -1
- package/dist/production/src/lib/migrations/MigrationsStatusFacade.js +12 -4
- package/dist/production/src/lib/migrations/MigrationsStatusFacade.js.map +1 -1
- package/dist/production/src/lib/migrations/MigrationsValidator.cjs +5 -3
- package/dist/production/src/lib/migrations/MigrationsValidator.cjs.map +1 -1
- package/dist/production/src/lib/migrations/MigrationsValidator.js +5 -3
- package/dist/production/src/lib/migrations/MigrationsValidator.js.map +1 -1
- package/dist/production/src/lib/project/RemoteProjectProvider.cjs +5 -1
- package/dist/production/src/lib/project/RemoteProjectProvider.cjs.map +1 -1
- package/dist/production/src/lib/project/RemoteProjectProvider.js +5 -1
- package/dist/production/src/lib/project/RemoteProjectProvider.js.map +1 -1
- package/dist/production/src/lib/prompt/prompt.cjs +13 -0
- package/dist/production/src/lib/prompt/prompt.cjs.map +1 -0
- package/dist/production/src/lib/prompt/prompt.internal.cjs +21 -0
- package/dist/production/src/lib/prompt/prompt.internal.cjs.map +1 -0
- package/dist/production/src/lib/prompt/prompt.internal.js +21 -0
- package/dist/production/src/lib/prompt/prompt.internal.js.map +1 -0
- package/dist/production/src/lib/prompt/prompt.js +13 -0
- package/dist/production/src/lib/prompt/prompt.js.map +1 -0
- package/dist/production/src/lib/schema/SchemaValidationHelper.cjs +2 -2
- package/dist/production/src/lib/schema/SchemaValidationHelper.cjs.map +1 -1
- package/dist/production/src/lib/schema/SchemaValidationHelper.js +2 -2
- package/dist/production/src/lib/schema/SchemaValidationHelper.js.map +1 -1
- package/dist/production/src/lib/schema/SchemaValidationPrinter.cjs +4 -4
- package/dist/production/src/lib/schema/SchemaValidationPrinter.cjs.map +1 -1
- package/dist/production/src/lib/schema/SchemaValidationPrinter.js +4 -4
- package/dist/production/src/lib/schema/SchemaValidationPrinter.js.map +1 -1
- package/dist/production/src/lib/tenant/TenantApiTransport.cjs +160 -0
- package/dist/production/src/lib/tenant/TenantApiTransport.cjs.map +1 -0
- package/dist/production/src/lib/tenant/TenantApiTransport.js +160 -0
- package/dist/production/src/lib/tenant/TenantApiTransport.js.map +1 -0
- package/dist/production/src/lib/tenant/TenantConfigApplier.cjs +110 -26
- package/dist/production/src/lib/tenant/TenantConfigApplier.cjs.map +1 -1
- package/dist/production/src/lib/tenant/TenantConfigApplier.js +110 -26
- package/dist/production/src/lib/tenant/TenantConfigApplier.js.map +1 -1
- package/dist/production/src/lib/tenant/TenantConnectionProvider.cjs +20 -0
- package/dist/production/src/lib/tenant/TenantConnectionProvider.cjs.map +1 -0
- package/dist/production/src/lib/tenant/TenantConnectionProvider.js +20 -0
- package/dist/production/src/lib/tenant/TenantConnectionProvider.js.map +1 -0
- package/dist/production/src/lib/tenant/TenantConnectionResolver.cjs +30 -0
- package/dist/production/src/lib/tenant/TenantConnectionResolver.cjs.map +1 -0
- package/dist/production/src/lib/tenant/TenantConnectionResolver.js +30 -0
- package/dist/production/src/lib/tenant/TenantConnectionResolver.js.map +1 -0
- package/dist/production/src/lib/tenant/authPolicy.cjs +10 -0
- package/dist/production/src/lib/tenant/authPolicy.cjs.map +1 -0
- package/dist/production/src/lib/tenant/authPolicy.js +10 -0
- package/dist/production/src/lib/tenant/authPolicy.js.map +1 -0
- package/dist/production/src/lib/tenant/clients/TenantApiKeyClient.cjs +101 -0
- package/dist/production/src/lib/tenant/clients/TenantApiKeyClient.cjs.map +1 -0
- package/dist/production/src/lib/tenant/clients/TenantApiKeyClient.js +101 -0
- package/dist/production/src/lib/tenant/clients/TenantApiKeyClient.js.map +1 -0
- package/dist/production/src/lib/tenant/clients/TenantMemberClient.cjs +96 -0
- package/dist/production/src/lib/tenant/clients/TenantMemberClient.cjs.map +1 -0
- package/dist/production/src/lib/tenant/clients/TenantMemberClient.js +96 -0
- package/dist/production/src/lib/tenant/clients/TenantMemberClient.js.map +1 -0
- package/dist/production/src/lib/tenant/clients/TenantPersonClient.cjs +162 -0
- package/dist/production/src/lib/tenant/clients/TenantPersonClient.cjs.map +1 -0
- package/dist/production/src/lib/tenant/clients/TenantPersonClient.js +162 -0
- package/dist/production/src/lib/tenant/clients/TenantPersonClient.js.map +1 -0
- package/dist/production/src/lib/tenant/clients/TenantPolicyClient.cjs +135 -0
- package/dist/production/src/lib/tenant/clients/TenantPolicyClient.cjs.map +1 -0
- package/dist/production/src/lib/tenant/clients/TenantPolicyClient.js +135 -0
- package/dist/production/src/lib/tenant/clients/TenantPolicyClient.js.map +1 -0
- package/dist/production/src/lib/tenant/clients/TenantProjectClient.cjs +209 -0
- package/dist/production/src/lib/tenant/clients/TenantProjectClient.cjs.map +1 -0
- package/dist/production/src/lib/tenant/clients/TenantProjectClient.js +209 -0
- package/dist/production/src/lib/tenant/clients/TenantProjectClient.js.map +1 -0
- package/dist/production/src/lib/tenant/clients/index.cjs +21 -0
- package/dist/production/src/lib/tenant/clients/index.cjs.map +1 -0
- package/dist/production/src/lib/tenant/clients/index.js +21 -0
- package/dist/production/src/lib/tenant/clients/index.js.map +1 -0
- package/dist/production/src/lib/tenant/confirmation.cjs +23 -0
- package/dist/production/src/lib/tenant/confirmation.cjs.map +1 -0
- package/dist/production/src/lib/tenant/confirmation.js +23 -0
- package/dist/production/src/lib/tenant/confirmation.js.map +1 -0
- package/dist/production/src/lib/tenant/input/pagination.cjs +24 -0
- package/dist/production/src/lib/tenant/input/pagination.cjs.map +1 -0
- package/dist/production/src/lib/tenant/input/pagination.js +24 -0
- package/dist/production/src/lib/tenant/input/pagination.js.map +1 -0
- package/dist/production/src/lib/tenant/input/value.cjs +71 -0
- package/dist/production/src/lib/tenant/input/value.cjs.map +1 -0
- package/dist/production/src/lib/tenant/input/value.js +71 -0
- package/dist/production/src/lib/tenant/input/value.js.map +1 -0
- package/dist/production/src/lib/tenant/stdin.cjs +13 -0
- package/dist/production/src/lib/tenant/stdin.cjs.map +1 -0
- package/dist/production/src/lib/tenant/stdin.js +13 -0
- package/dist/production/src/lib/tenant/stdin.js.map +1 -0
- package/dist/production/src/lib/tenant/tenantConfig.cjs.map +1 -1
- package/dist/production/src/lib/tenant/tenantConfig.js.map +1 -1
- package/dist/production/src/lib/transfer/DataTransferClient.cjs +290 -54
- package/dist/production/src/lib/transfer/DataTransferClient.cjs.map +1 -1
- package/dist/production/src/lib/transfer/DataTransferClient.js +292 -56
- package/dist/production/src/lib/transfer/DataTransferClient.js.map +1 -1
- package/dist/production/src/lib/transfer/stdio.cjs +3 -8
- package/dist/production/src/lib/transfer/stdio.cjs.map +1 -1
- package/dist/production/src/lib/transfer/stdio.js +3 -8
- package/dist/production/src/lib/transfer/stdio.js.map +1 -1
- package/dist/types/commands/actions/ActionsGetEventCommand.d.ts +6 -4
- package/dist/types/commands/actions/ActionsGetEventCommand.d.ts.map +1 -1
- package/dist/types/commands/actions/ActionsListFailedEventsCommand.d.ts +5 -4
- package/dist/types/commands/actions/ActionsListFailedEventsCommand.d.ts.map +1 -1
- package/dist/types/commands/actions/ActionsListVariablesCommand.d.ts +5 -3
- package/dist/types/commands/actions/ActionsListVariablesCommand.d.ts.map +1 -1
- package/dist/types/commands/actions/ActionsRetryEventCommand.d.ts +6 -4
- package/dist/types/commands/actions/ActionsRetryEventCommand.d.ts.map +1 -1
- package/dist/types/commands/actions/ActionsSetVariablesCommand.d.ts +5 -3
- package/dist/types/commands/actions/ActionsSetVariablesCommand.d.ts.map +1 -1
- package/dist/types/commands/actions/ActionsStopEventCommand.d.ts +6 -4
- package/dist/types/commands/actions/ActionsStopEventCommand.d.ts.map +1 -1
- package/dist/types/commands/deploy/DeployCommand.d.ts +11 -3
- package/dist/types/commands/deploy/DeployCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationAmendCommand.d.ts +3 -2
- package/dist/types/commands/migrations/MigrationAmendCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationBlankCommand.d.ts +2 -2
- package/dist/types/commands/migrations/MigrationBlankCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationDescribeCommand.d.ts +2 -2
- package/dist/types/commands/migrations/MigrationDescribeCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationDiffCommand.d.ts +4 -3
- package/dist/types/commands/migrations/MigrationDiffCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationExecuteCommand.d.ts +4 -3
- package/dist/types/commands/migrations/MigrationExecuteCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationInitStateCommand.d.ts +2 -2
- package/dist/types/commands/migrations/MigrationInitStateCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationRebaseCommand.d.ts +4 -3
- package/dist/types/commands/migrations/MigrationRebaseCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationSnapshotCommand.d.ts +5 -3
- package/dist/types/commands/migrations/MigrationSnapshotCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationStatusCommand.d.ts +9 -3
- package/dist/types/commands/migrations/MigrationStatusCommand.d.ts.map +1 -1
- package/dist/types/commands/migrations/MigrationVerifySnapshotCommand.d.ts +2 -2
- package/dist/types/commands/migrations/MigrationVerifySnapshotCommand.d.ts.map +1 -1
- package/dist/types/commands/misc/CommandsCommand.d.ts +13 -0
- package/dist/types/commands/misc/CommandsCommand.d.ts.map +1 -0
- package/dist/types/commands/misc/VersionCommand.d.ts +11 -4
- package/dist/types/commands/misc/VersionCommand.d.ts.map +1 -1
- package/dist/types/commands/misc/index.d.ts +1 -0
- package/dist/types/commands/misc/index.d.ts.map +1 -1
- package/dist/types/commands/project/ProjectGenerateDocumentationCommand.d.ts +5 -3
- package/dist/types/commands/project/ProjectGenerateDocumentationCommand.d.ts.map +1 -1
- package/dist/types/commands/project/ProjectPrintSchemaCommand.d.ts +2 -2
- package/dist/types/commands/project/ProjectPrintSchemaCommand.d.ts.map +1 -1
- package/dist/types/commands/project/ProjectValidateCommand.d.ts +3 -3
- package/dist/types/commands/project/ProjectValidateCommand.d.ts.map +1 -1
- package/dist/types/commands/tenant/TenantApplyCommand.d.ts +10 -3
- package/dist/types/commands/tenant/TenantApplyCommand.d.ts.map +1 -1
- package/dist/types/commands/tenant/apikey/TenantApiKeyCreateCommand.d.ts +22 -0
- package/dist/types/commands/tenant/apikey/TenantApiKeyCreateCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/apikey/TenantApiKeyDisableCommand.d.ts +17 -0
- package/dist/types/commands/tenant/apikey/TenantApiKeyDisableCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/apikey/TenantApiKeyListCommand.d.ts +15 -0
- package/dist/types/commands/tenant/apikey/TenantApiKeyListCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/apikey/index.d.ts +4 -0
- package/dist/types/commands/tenant/apikey/index.d.ts.map +1 -0
- package/dist/types/commands/tenant/index.d.ts +5 -0
- package/dist/types/commands/tenant/index.d.ts.map +1 -1
- package/dist/types/commands/tenant/member/TenantMemberAddCommand.d.ts +19 -0
- package/dist/types/commands/tenant/member/TenantMemberAddCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/member/TenantMemberInviteCommand.d.ts +28 -0
- package/dist/types/commands/tenant/member/TenantMemberInviteCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/member/TenantMemberInviteUnmanagedCommand.d.ts +36 -0
- package/dist/types/commands/tenant/member/TenantMemberInviteUnmanagedCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/member/TenantMemberListCommand.d.ts +21 -0
- package/dist/types/commands/tenant/member/TenantMemberListCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/member/TenantMemberRemoveCommand.d.ts +17 -0
- package/dist/types/commands/tenant/member/TenantMemberRemoveCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/member/TenantMemberUpdateCommand.d.ts +20 -0
- package/dist/types/commands/tenant/member/TenantMemberUpdateCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/member/index.d.ts +7 -0
- package/dist/types/commands/tenant/member/index.d.ts.map +1 -0
- package/dist/types/commands/tenant/member/memberOptions.d.ts +16 -0
- package/dist/types/commands/tenant/member/memberOptions.d.ts.map +1 -0
- package/dist/types/commands/tenant/member/membershipInput.d.ts +44 -0
- package/dist/types/commands/tenant/member/membershipInput.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantIdentityRoleAddCommand.d.ts +15 -0
- package/dist/types/commands/tenant/person/TenantIdentityRoleAddCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantIdentityRoleRemoveCommand.d.ts +17 -0
- package/dist/types/commands/tenant/person/TenantIdentityRoleRemoveCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantPersonCreateCommand.d.ts +25 -0
- package/dist/types/commands/tenant/person/TenantPersonCreateCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantPersonDisableCommand.d.ts +16 -0
- package/dist/types/commands/tenant/person/TenantPersonDisableCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantPersonListCommand.d.ts +18 -0
- package/dist/types/commands/tenant/person/TenantPersonListCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantPersonResetMfaCommand.d.ts +16 -0
- package/dist/types/commands/tenant/person/TenantPersonResetMfaCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantPersonResetPasswordRequestCommand.d.ts +21 -0
- package/dist/types/commands/tenant/person/TenantPersonResetPasswordRequestCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantPersonSetPasswordCommand.d.ts +20 -0
- package/dist/types/commands/tenant/person/TenantPersonSetPasswordCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantPersonShowCommand.d.ts +14 -0
- package/dist/types/commands/tenant/person/TenantPersonShowCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantPersonSignOutCommand.d.ts +17 -0
- package/dist/types/commands/tenant/person/TenantPersonSignOutCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantPersonUpdateCommand.d.ts +17 -0
- package/dist/types/commands/tenant/person/TenantPersonUpdateCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/TenantSessionCreateCommand.d.ts +18 -0
- package/dist/types/commands/tenant/person/TenantSessionCreateCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/index.d.ts +13 -0
- package/dist/types/commands/tenant/person/index.d.ts.map +1 -0
- package/dist/types/commands/tenant/person/personInput.d.ts +37 -0
- package/dist/types/commands/tenant/person/personInput.d.ts.map +1 -0
- package/dist/types/commands/tenant/policy/TenantAuthLogCommand.d.ts +35 -0
- package/dist/types/commands/tenant/policy/TenantAuthLogCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/policy/TenantMailTemplateAddCommand.d.ts +30 -0
- package/dist/types/commands/tenant/policy/TenantMailTemplateAddCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/policy/TenantMailTemplateListCommand.d.ts +12 -0
- package/dist/types/commands/tenant/policy/TenantMailTemplateListCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/policy/TenantMailTemplateRemoveCommand.d.ts +19 -0
- package/dist/types/commands/tenant/policy/TenantMailTemplateRemoveCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/policy/TenantPolicyCreateCommand.d.ts +17 -0
- package/dist/types/commands/tenant/policy/TenantPolicyCreateCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/policy/TenantPolicyDeleteCommand.d.ts +16 -0
- package/dist/types/commands/tenant/policy/TenantPolicyDeleteCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/policy/TenantPolicyListCommand.d.ts +12 -0
- package/dist/types/commands/tenant/policy/TenantPolicyListCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/policy/TenantPolicyUpdateCommand.d.ts +19 -0
- package/dist/types/commands/tenant/policy/TenantPolicyUpdateCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/policy/index.d.ts +9 -0
- package/dist/types/commands/tenant/policy/index.d.ts.map +1 -0
- package/dist/types/commands/tenant/policy/policyInput.d.ts +41 -0
- package/dist/types/commands/tenant/policy/policyInput.d.ts.map +1 -0
- package/dist/types/commands/tenant/project/TenantConfigShowCommand.d.ts +12 -0
- package/dist/types/commands/tenant/project/TenantConfigShowCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/project/TenantIdpListCommand.d.ts +12 -0
- package/dist/types/commands/tenant/project/TenantIdpListCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/project/TenantProjectCreateCommand.d.ts +22 -0
- package/dist/types/commands/tenant/project/TenantProjectCreateCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/project/TenantProjectListCommand.d.ts +12 -0
- package/dist/types/commands/tenant/project/TenantProjectListCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/project/TenantProjectSecretSetCommand.d.ts +21 -0
- package/dist/types/commands/tenant/project/TenantProjectSecretSetCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/project/TenantProjectShowCommand.d.ts +14 -0
- package/dist/types/commands/tenant/project/TenantProjectShowCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/project/TenantProjectUpdateCommand.d.ts +21 -0
- package/dist/types/commands/tenant/project/TenantProjectUpdateCommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/project/TenantWhoAmICommand.d.ts +12 -0
- package/dist/types/commands/tenant/project/TenantWhoAmICommand.d.ts.map +1 -0
- package/dist/types/commands/tenant/project/index.d.ts +9 -0
- package/dist/types/commands/tenant/project/index.d.ts.map +1 -0
- package/dist/types/commands/tenant/project/jsonConfigOption.d.ts +9 -0
- package/dist/types/commands/tenant/project/jsonConfigOption.d.ts.map +1 -0
- package/dist/types/commands/tenant/tenantOutput.d.ts +7 -0
- package/dist/types/commands/tenant/tenantOutput.d.ts.map +1 -0
- package/dist/types/commands/transfer/ExportCommand.d.ts +8 -2
- package/dist/types/commands/transfer/ExportCommand.d.ts.map +1 -1
- package/dist/types/commands/transfer/ImportCommand.d.ts +15 -3
- package/dist/types/commands/transfer/ImportCommand.d.ts.map +1 -1
- package/dist/types/commands/transfer/TransferCommand.d.ts +14 -2
- package/dist/types/commands/transfer/TransferCommand.d.ts.map +1 -1
- package/dist/types/commands/transfer/utils.d.ts +2 -2
- package/dist/types/commands/transfer/utils.d.ts.map +1 -1
- package/dist/types/commands/workspace/WorkspaceUpdateApiCommand.d.ts +27 -4
- package/dist/types/commands/workspace/WorkspaceUpdateApiCommand.d.ts.map +1 -1
- package/dist/types/dic.d.ts +93 -6
- package/dist/types/dic.d.ts.map +1 -1
- package/dist/types/lib/SystemClientProvider.d.ts +4 -1
- package/dist/types/lib/SystemClientProvider.d.ts.map +1 -1
- package/dist/types/lib/TenantClientProvider.d.ts +14 -5
- package/dist/types/lib/TenantClientProvider.d.ts.map +1 -1
- package/dist/types/lib/VersionChecker.d.ts.map +1 -1
- package/dist/types/lib/actions/ActionsClient.d.ts +17 -8
- package/dist/types/lib/actions/ActionsClient.d.ts.map +1 -1
- package/dist/types/lib/actions/resolveActionsClient.d.ts +7 -0
- package/dist/types/lib/actions/resolveActionsClient.d.ts.map +1 -0
- package/dist/types/lib/actions/runActionMutationBatch.d.ts +23 -0
- package/dist/types/lib/actions/runActionMutationBatch.d.ts.map +1 -0
- package/dist/types/lib/admin/AdminClient.d.ts +1 -0
- package/dist/types/lib/admin/AdminClient.d.ts.map +1 -1
- package/dist/types/lib/admin/AdminDeployer.d.ts +3 -1
- package/dist/types/lib/admin/AdminDeployer.d.ts.map +1 -1
- package/dist/types/lib/dsn.d.ts.map +1 -1
- package/dist/types/lib/errors/TransportError.d.ts +29 -0
- package/dist/types/lib/errors/TransportError.d.ts.map +1 -0
- package/dist/types/lib/errors/index.d.ts +2 -0
- package/dist/types/lib/errors/index.d.ts.map +1 -0
- package/dist/types/lib/fs/DockerComposeManager.d.ts.map +1 -1
- package/dist/types/lib/fs/FileSystem.d.ts.map +1 -1
- package/dist/types/lib/fs/YamlHandler.d.ts.map +1 -1
- package/dist/types/lib/js/EsBuildBuilder.d.ts.map +1 -1
- package/dist/types/lib/js/EvalExecutor.d.ts.map +1 -1
- package/dist/types/lib/js/JsCodeRunner.d.ts.map +1 -1
- package/dist/types/lib/maskToken.d.ts +1 -0
- package/dist/types/lib/maskToken.d.ts.map +1 -1
- package/dist/types/lib/migrations/MigrationExecutionFacade.d.ts +8 -3
- package/dist/types/lib/migrations/MigrationExecutionFacade.d.ts.map +1 -1
- package/dist/types/lib/migrations/MigrationPrinter.d.ts +28 -2
- package/dist/types/lib/migrations/MigrationPrinter.d.ts.map +1 -1
- package/dist/types/lib/migrations/MigrationRebaseFacade.d.ts.map +1 -1
- package/dist/types/lib/migrations/MigrationSnapshotFacade.d.ts +6 -3
- package/dist/types/lib/migrations/MigrationSnapshotFacade.d.ts.map +1 -1
- package/dist/types/lib/migrations/MigrationsStatusFacade.d.ts +13 -2
- package/dist/types/lib/migrations/MigrationsStatusFacade.d.ts.map +1 -1
- package/dist/types/lib/migrations/MigrationsValidator.d.ts +3 -1
- package/dist/types/lib/migrations/MigrationsValidator.d.ts.map +1 -1
- package/dist/types/lib/project/RemoteProject.d.ts.map +1 -1
- package/dist/types/lib/project/RemoteProjectProvider.d.ts.map +1 -1
- package/dist/types/lib/project/RemoteProjectResolver.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/EntityInfo.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/EntityLink.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/FieldLink.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/FieldPermissions.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/FieldType.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/OnDelete.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/ProjectInfo.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/SinglePermission.d.ts.map +1 -1
- package/dist/types/lib/project/docs/components/utils.d.ts.map +1 -1
- package/dist/types/lib/project/docs/projectDescribe.d.ts.map +1 -1
- package/dist/types/lib/prompt/index.d.ts +2 -0
- package/dist/types/lib/prompt/index.d.ts.map +1 -0
- package/dist/types/lib/prompt/prompt.d.ts +6 -0
- package/dist/types/lib/prompt/prompt.d.ts.map +1 -0
- package/dist/types/lib/prompt/prompt.internal.d.ts +37 -0
- package/dist/types/lib/prompt/prompt.internal.d.ts.map +1 -0
- package/dist/types/lib/prompt/prompt.test.d.ts +2 -0
- package/dist/types/lib/prompt/prompt.test.d.ts.map +1 -0
- package/dist/types/lib/schema/SchemaLoader.d.ts.map +1 -1
- package/dist/types/lib/schema/SchemaValidationHelper.d.ts +2 -1
- package/dist/types/lib/schema/SchemaValidationHelper.d.ts.map +1 -1
- package/dist/types/lib/schema/SchemaValidationPrinter.d.ts +2 -1
- package/dist/types/lib/schema/SchemaValidationPrinter.d.ts.map +1 -1
- package/dist/types/lib/schema/collectReferences.d.ts.map +1 -1
- package/dist/types/lib/stream.d.ts.map +1 -1
- package/dist/types/lib/tenant/TenantApiTransport.d.ts +49 -0
- package/dist/types/lib/tenant/TenantApiTransport.d.ts.map +1 -0
- package/dist/types/lib/tenant/TenantConfigApplier.d.ts +38 -3
- package/dist/types/lib/tenant/TenantConfigApplier.d.ts.map +1 -1
- package/dist/types/lib/tenant/TenantConfigLoader.d.ts.map +1 -1
- package/dist/types/lib/tenant/TenantConnection.d.ts +8 -0
- package/dist/types/lib/tenant/TenantConnection.d.ts.map +1 -0
- package/dist/types/lib/tenant/TenantConnectionProvider.d.ts +8 -0
- package/dist/types/lib/tenant/TenantConnectionProvider.d.ts.map +1 -0
- package/dist/types/lib/tenant/TenantConnectionResolver.d.ts +8 -0
- package/dist/types/lib/tenant/TenantConnectionResolver.d.ts.map +1 -0
- package/dist/types/lib/tenant/authPolicy.d.ts +17 -0
- package/dist/types/lib/tenant/authPolicy.d.ts.map +1 -0
- package/dist/types/lib/tenant/clients/TenantApiKeyClient.d.ts +56 -0
- package/dist/types/lib/tenant/clients/TenantApiKeyClient.d.ts.map +1 -0
- package/dist/types/lib/tenant/clients/TenantMemberClient.d.ts +68 -0
- package/dist/types/lib/tenant/clients/TenantMemberClient.d.ts.map +1 -0
- package/dist/types/lib/tenant/clients/TenantPersonClient.d.ts +97 -0
- package/dist/types/lib/tenant/clients/TenantPersonClient.d.ts.map +1 -0
- package/dist/types/lib/tenant/clients/TenantPolicyClient.d.ts +75 -0
- package/dist/types/lib/tenant/clients/TenantPolicyClient.d.ts.map +1 -0
- package/dist/types/lib/tenant/clients/TenantProjectClient.d.ts +162 -0
- package/dist/types/lib/tenant/clients/TenantProjectClient.d.ts.map +1 -0
- package/dist/types/lib/tenant/clients/index.d.ts +21 -0
- package/dist/types/lib/tenant/clients/index.d.ts.map +1 -0
- package/dist/types/lib/tenant/confirmation.d.ts +14 -0
- package/dist/types/lib/tenant/confirmation.d.ts.map +1 -0
- package/dist/types/lib/tenant/input/index.d.ts +3 -0
- package/dist/types/lib/tenant/input/index.d.ts.map +1 -0
- package/dist/types/lib/tenant/input/pagination.d.ts +7 -0
- package/dist/types/lib/tenant/input/pagination.d.ts.map +1 -0
- package/dist/types/lib/tenant/input/value.d.ts +45 -0
- package/dist/types/lib/tenant/input/value.d.ts.map +1 -0
- package/dist/types/lib/tenant/stdin.d.ts +8 -0
- package/dist/types/lib/tenant/stdin.d.ts.map +1 -0
- package/dist/types/lib/tenant/tenantConfig.d.ts +96 -22
- package/dist/types/lib/tenant/tenantConfig.d.ts.map +1 -1
- package/dist/types/lib/transfer/DataTransferClient.d.ts +8 -2
- package/dist/types/lib/transfer/DataTransferClient.d.ts.map +1 -1
- package/dist/types/lib/transfer/stdio.d.ts +3 -1
- package/dist/types/lib/transfer/stdio.d.ts.map +1 -1
- package/dist/types/lib/workspace/WorkspaceResolver.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -14
- package/src/commands/actions/ActionsGetEventCommand.ts +38 -16
- package/src/commands/actions/ActionsListFailedEventsCommand.ts +24 -43
- package/src/commands/actions/ActionsListVariablesCommand.ts +15 -13
- package/src/commands/actions/ActionsRetryEventCommand.ts +36 -18
- package/src/commands/actions/ActionsSetVariablesCommand.ts +56 -28
- package/src/commands/actions/ActionsStopEventCommand.ts +36 -18
- package/src/commands/deploy/DeployCommand.ts +69 -30
- package/src/commands/migrations/MigrationAmendCommand.ts +69 -26
- package/src/commands/migrations/MigrationBlankCommand.ts +3 -3
- package/src/commands/migrations/MigrationDescribeCommand.ts +9 -4
- package/src/commands/migrations/MigrationDiffCommand.ts +83 -31
- package/src/commands/migrations/MigrationExecuteCommand.ts +11 -4
- package/src/commands/migrations/MigrationInitStateCommand.ts +18 -5
- package/src/commands/migrations/MigrationRebaseCommand.ts +28 -6
- package/src/commands/migrations/MigrationSnapshotCommand.ts +45 -10
- package/src/commands/migrations/MigrationStatusCommand.ts +20 -12
- package/src/commands/migrations/MigrationVerifySnapshotCommand.ts +7 -8
- package/src/commands/misc/CommandsCommand.ts +74 -0
- package/src/commands/misc/VersionCommand.ts +13 -6
- package/src/commands/misc/index.ts +1 -0
- package/src/commands/project/ProjectGenerateDocumentationCommand.ts +12 -13
- package/src/commands/project/ProjectPrintSchemaCommand.ts +19 -17
- package/src/commands/project/ProjectValidateCommand.ts +52 -18
- package/src/commands/tenant/TenantApplyCommand.ts +46 -14
- package/src/commands/tenant/apikey/TenantApiKeyCreateCommand.ts +102 -0
- package/src/commands/tenant/apikey/TenantApiKeyDisableCommand.ts +47 -0
- package/src/commands/tenant/apikey/TenantApiKeyListCommand.ts +64 -0
- package/src/commands/tenant/apikey/index.ts +4 -0
- package/src/commands/tenant/index.ts +5 -0
- package/src/commands/tenant/member/TenantMemberAddCommand.ts +48 -0
- package/src/commands/tenant/member/TenantMemberInviteCommand.ts +88 -0
- package/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.ts +135 -0
- package/src/commands/tenant/member/TenantMemberListCommand.ts +94 -0
- package/src/commands/tenant/member/TenantMemberRemoveCommand.ts +48 -0
- package/src/commands/tenant/member/TenantMemberUpdateCommand.ts +58 -0
- package/src/commands/tenant/member/index.ts +9 -0
- package/src/commands/tenant/member/memberOptions.ts +29 -0
- package/src/commands/tenant/member/membershipInput.ts +155 -0
- package/src/commands/tenant/person/TenantIdentityRoleAddCommand.ts +44 -0
- package/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.ts +54 -0
- package/src/commands/tenant/person/TenantPersonCreateCommand.ts +98 -0
- package/src/commands/tenant/person/TenantPersonDisableCommand.ts +46 -0
- package/src/commands/tenant/person/TenantPersonListCommand.ts +68 -0
- package/src/commands/tenant/person/TenantPersonResetMfaCommand.ts +59 -0
- package/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.ts +67 -0
- package/src/commands/tenant/person/TenantPersonSetPasswordCommand.ts +66 -0
- package/src/commands/tenant/person/TenantPersonShowCommand.ts +70 -0
- package/src/commands/tenant/person/TenantPersonSignOutCommand.ts +60 -0
- package/src/commands/tenant/person/TenantPersonUpdateCommand.ts +55 -0
- package/src/commands/tenant/person/TenantSessionCreateCommand.ts +79 -0
- package/src/commands/tenant/person/index.ts +15 -0
- package/src/commands/tenant/person/personInput.ts +112 -0
- package/src/commands/tenant/policy/TenantAuthLogCommand.ts +141 -0
- package/src/commands/tenant/policy/TenantMailTemplateAddCommand.ts +92 -0
- package/src/commands/tenant/policy/TenantMailTemplateListCommand.ts +50 -0
- package/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.ts +63 -0
- package/src/commands/tenant/policy/TenantPolicyCreateCommand.ts +46 -0
- package/src/commands/tenant/policy/TenantPolicyDeleteCommand.ts +42 -0
- package/src/commands/tenant/policy/TenantPolicyListCommand.ts +39 -0
- package/src/commands/tenant/policy/TenantPolicyUpdateCommand.ts +51 -0
- package/src/commands/tenant/policy/index.ts +9 -0
- package/src/commands/tenant/policy/policyInput.ts +210 -0
- package/src/commands/tenant/project/TenantConfigShowCommand.ts +28 -0
- package/src/commands/tenant/project/TenantIdpListCommand.ts +27 -0
- package/src/commands/tenant/project/TenantProjectCreateCommand.ts +67 -0
- package/src/commands/tenant/project/TenantProjectListCommand.ts +27 -0
- package/src/commands/tenant/project/TenantProjectSecretSetCommand.ts +63 -0
- package/src/commands/tenant/project/TenantProjectShowCommand.ts +29 -0
- package/src/commands/tenant/project/TenantProjectUpdateCommand.ts +66 -0
- package/src/commands/tenant/project/TenantWhoAmICommand.ts +22 -0
- package/src/commands/tenant/project/index.ts +9 -0
- package/src/commands/tenant/project/jsonConfigOption.ts +33 -0
- package/src/commands/tenant/tenantOutput.ts +35 -0
- package/src/commands/transfer/ExportCommand.ts +46 -29
- package/src/commands/transfer/ImportCommand.ts +87 -34
- package/src/commands/transfer/TransferCommand.ts +94 -34
- package/src/commands/transfer/utils.ts +12 -11
- package/src/commands/workspace/WorkspaceUpdateApiCommand.ts +135 -36
- package/src/dic.ts +198 -47
- package/src/lib/SystemClientProvider.ts +75 -1
- package/src/lib/TenantClientProvider.ts +44 -6
- package/src/lib/actions/ActionsClient.ts +38 -14
- package/src/lib/actions/resolveActionsClient.ts +15 -0
- package/src/lib/actions/runActionMutationBatch.ts +69 -0
- package/src/lib/admin/AdminClient.ts +39 -12
- package/src/lib/admin/AdminDeployer.ts +4 -2
- package/src/lib/errors/TransportError.ts +260 -0
- package/src/lib/errors/index.ts +1 -0
- package/src/lib/maskToken.ts +9 -1
- package/src/lib/migrations/MigrationExecutionFacade.ts +117 -59
- package/src/lib/migrations/MigrationPrinter.ts +100 -64
- package/src/lib/migrations/MigrationRebaseFacade.ts +2 -1
- package/src/lib/migrations/MigrationSnapshotFacade.ts +15 -10
- package/src/lib/migrations/MigrationsStatusFacade.ts +17 -3
- package/src/lib/migrations/MigrationsValidator.ts +4 -2
- package/src/lib/project/RemoteProjectProvider.ts +6 -1
- package/src/lib/prompt/index.ts +1 -0
- package/src/lib/prompt/prompt.internal.ts +69 -0
- package/src/lib/prompt/prompt.test.ts +100 -0
- package/src/lib/prompt/prompt.ts +23 -0
- package/src/lib/schema/SchemaValidationHelper.ts +8 -2
- package/src/lib/schema/SchemaValidationPrinter.ts +5 -4
- package/src/lib/tenant/TenantApiTransport.ts +209 -0
- package/src/lib/tenant/TenantConfigApplier.ts +198 -29
- package/src/lib/tenant/TenantConnection.ts +8 -0
- package/src/lib/tenant/TenantConnectionProvider.ts +21 -0
- package/src/lib/tenant/TenantConnectionResolver.ts +31 -0
- package/src/lib/tenant/authPolicy.ts +20 -0
- package/src/lib/tenant/clients/README.md +84 -0
- package/src/lib/tenant/clients/TenantApiKeyClient.ts +182 -0
- package/src/lib/tenant/clients/TenantMemberClient.ts +199 -0
- package/src/lib/tenant/clients/TenantPersonClient.ts +306 -0
- package/src/lib/tenant/clients/TenantPolicyClient.ts +244 -0
- package/src/lib/tenant/clients/TenantProjectClient.ts +425 -0
- package/src/lib/tenant/clients/index.ts +29 -0
- package/src/lib/tenant/confirmation.ts +32 -0
- package/src/lib/tenant/input/index.ts +2 -0
- package/src/lib/tenant/input/pagination.ts +39 -0
- package/src/lib/tenant/input/value.ts +149 -0
- package/src/lib/tenant/stdin.ts +16 -0
- package/src/lib/tenant/tenantConfig.ts +146 -25
- package/src/lib/transfer/DataTransferClient.ts +354 -59
- package/src/lib/transfer/stdio.ts +5 -7
- package/src/run.ts +19 -3
- package/tenant.config.example.ts +28 -0
- package/tests/cases/unit/MigrationAmendCommand.test.ts +17 -2
- package/tests/cases/unit/MigrationDiffCommand.test.ts +182 -0
- package/tests/cases/unit/MigrationExecuteCommand.test.ts +58 -0
- package/tests/cases/unit/MigrationExecutionFacade.test.ts +341 -54
- package/tests/cases/unit/MigrationInitStateCommand.test.ts +72 -0
- package/tests/cases/unit/MigrationRebaseCommand.test.ts +59 -0
- package/tests/cases/unit/MigrationSnapshotFacade.test.ts +75 -13
- package/tests/cases/unit/MigrationStatusCommand.test.ts +197 -0
- package/tests/cases/unit/MigrationsValidator.test.ts +61 -0
- package/tests/cases/unit/actions.test.ts +802 -0
- package/tests/cases/unit/cli-process.test.ts +266 -0
- package/tests/cases/unit/command-registry.test.ts +214 -0
- package/tests/cases/unit/deploy.test.ts +505 -0
- package/tests/cases/unit/migration-transport.test.ts +156 -0
- package/tests/cases/unit/project.test.ts +223 -0
- package/tests/cases/unit/structured-output.test.ts +189 -0
- package/tests/cases/unit/tenant-apikey.test.ts +645 -0
- package/tests/cases/unit/tenant-apply-command.test.ts +247 -0
- package/tests/cases/unit/tenant-clients.test.ts +130 -0
- package/tests/cases/unit/tenant-connection.test.ts +91 -0
- package/tests/cases/unit/tenant-input.test.ts +275 -0
- package/tests/cases/unit/tenant-member.test.ts +683 -0
- package/tests/cases/unit/tenant-person.test.ts +857 -0
- package/tests/cases/unit/tenant-policy.test.ts +799 -0
- package/tests/cases/unit/tenant-project.test.ts +634 -0
- package/tests/cases/unit/tenant-transport.test.ts +322 -0
- package/tests/cases/unit/transfer.test.ts +714 -0
- package/tests/cases/unit/transport-errors.test.ts +78 -0
- package/tests/cases/unit/workspace-update-api.test.ts +152 -0
- package/tests/tenantConfigApplier.test.ts +434 -38
- package/dist/development/src/lib/tenant/TenantClient.cjs +0 -104
- package/dist/development/src/lib/tenant/TenantClient.cjs.map +0 -1
- package/dist/development/src/lib/tenant/TenantClient.js +0 -104
- package/dist/development/src/lib/tenant/TenantClient.js.map +0 -1
- package/dist/production/src/lib/tenant/TenantClient.cjs +0 -104
- package/dist/production/src/lib/tenant/TenantClient.cjs.map +0 -1
- package/dist/production/src/lib/tenant/TenantClient.js +0 -104
- package/dist/production/src/lib/tenant/TenantClient.js.map +0 -1
- package/dist/types/lib/tenant/TenantClient.d.ts +0 -24
- package/dist/types/lib/tenant/TenantClient.d.ts.map +0 -1
- package/src/lib/tenant/TenantClient.ts +0 -149
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MigrationExecutionFacade.js","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationExecutionFacade.ts"],"sourcesContent":["import prompts from 'prompts'\nimport { MigrationPrinter } from './MigrationPrinter.js'\nimport {\n\tisSchemaMigration,\n\tMigrateErrorCode,\n\tMigrationExecutor,\n\tMigrationToExecuteOkStatus,\n\tSchemaState,\n\tSchemaStateManager,\n\tSchemaVersionBuilder,\n} from '@contember/migrations-client'\nimport { MigrationsStatusFacade } from './MigrationsStatusFacade.js'\nimport { MigrationSnapshotFacade } from './MigrationSnapshotFacade.js'\nimport { MigrationVersionHelper } from '@contember/engine-common'\nimport { SystemClientProvider } from '../SystemClientProvider.js'\nimport { TenantClientProvider } from '../TenantClientProvider.js'\nimport { RemoteProjectProvider } from '../project/RemoteProjectProvider.js'\n\nexport class MigrationExecutionFacade {\n\tconstructor(\n\t\tprivate readonly systemClientProvider: SystemClientProvider,\n\t\tprivate readonly tenantClientProvider: TenantClientProvider,\n\t\tprivate readonly projectProvider: RemoteProjectProvider,\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t\tprivate readonly migrationPrinter: MigrationPrinter,\n\t\tprivate readonly migrationExecutor: MigrationExecutor,\n\t\tprivate readonly migrationStatusFacade: MigrationsStatusFacade,\n\t\tprivate readonly schemaStateManager: SchemaStateManager,\n\t\tprivate readonly migrationSnapshotFacade: MigrationSnapshotFacade,\n\t) {\n\t}\n\n\texecute = async ({\n\t\trequireConfirmation,\n\t\tforce,\n\t\tuntil,\n\t\tadditionalMessage,\n\t\tuseSnapshot = true,\n\t}: {\n\t\trequireConfirmation: boolean | ((migrations: MigrationToExecuteOkStatus[]) => boolean)\n\t\tforce?: boolean\n\t\tuntil?: string\n\t\tadditionalMessage?: string\n\t\tuseSnapshot?: boolean\n\t}): Promise<boolean> => {\n\t\tconst project = this.projectProvider.get()\n\t\tawait this.tenantClientProvider.get().createProject(project.name, true)\n\n\t\tconst stateMode = await this.schemaStateManager.isStateMode()\n\t\tlet schemaState = stateMode ? await this.schemaStateManager.readState() : undefined\n\n\t\t// The state files always reflect the latest schema. When migrating to an older version, that\n\t\t// state may reference parts of the model that don't exist yet, so skip it rather than push an\n\t\t// inconsistent overlay. Run `migrations:execute` without `--until` to sync the schema state.\n\t\tif (until && schemaState) {\n\t\t\tconsole.log(\n\t\t\t\t'Warning: schema state was not applied because --until targets a specific migration; the state files reflect the latest schema. Run migrations:execute without --until to sync it.',\n\t\t\t)\n\t\t\tschemaState = undefined\n\t\t}\n\n\t\tif (useSnapshot) {\n\t\t\tawait this.tryApplySnapshot({ until, schemaState })\n\t\t}\n\n\t\tconst status = await this.migrationStatusFacade.resolveMigrationsStatus({ force })\n\t\tconst migrations = until\n\t\t\t? status.migrationsToExecute.filter(it => it.version <= MigrationVersionHelper.extractVersion(until))\n\t\t\t: status.migrationsToExecute\n\t\tif (migrations.length === 0 && !schemaState) {\n\t\t\tconsole.log('No migrations to execute')\n\t\t\treturn true\n\t\t}\n\t\tif (migrations.length > 0) {\n\t\t\tconsole.log('Will execute following migrations:')\n\t\t\tmigrations.forEach(it => console.log(it.name))\n\t\t}\n\t\tif (schemaState && migrations.length === 0) {\n\t\t\tconsole.log('Updating schema state')\n\t\t}\n\t\tadditionalMessage && console.log(additionalMessage)\n\n\t\tif (migrations.length > 0 && (typeof requireConfirmation === 'function' ? requireConfirmation(migrations) : requireConfirmation)) {\n\t\t\tif (!process.stdin.isTTY) {\n\t\t\t\tthrow 'TTY not available. Pass --yes option to confirm execution.'\n\t\t\t}\n\t\t\tdo {\n\t\t\t\tconst { action } = await prompts({\n\t\t\t\t\ttype: 'select',\n\t\t\t\t\tname: 'action',\n\t\t\t\t\tmessage: 'Do you want to continue?',\n\t\t\t\t\tchoices: [\n\t\t\t\t\t\t{ value: 'yes', title: 'Execute migrations' },\n\t\t\t\t\t\t{ value: 'describe', title: 'Describe migrations' },\n\t\t\t\t\t\t{ value: 'no', title: 'Abort' },\n\t\t\t\t\t],\n\t\t\t\t})\n\t\t\t\tif (action === 'describe') {\n\t\t\t\t\tconst schema = await this.schemaVersionBuilder.buildSchemaUntil(migrations[0].version)\n\t\t\t\t\tfor (const migration of migrations) {\n\t\t\t\t\t\tconst migrationContent = await migration.localMigration.getContent()\n\t\t\t\t\t\tif (!isSchemaMigration(migrationContent)) {\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tawait this.migrationPrinter.printMigrationDescription(schema, migrationContent, {\n\t\t\t\t\t\t\tnoSql: true,\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t} else if (action === 'yes') {\n\t\t\t\t\tbreak\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t} while (true)\n\t\t}\n\n\t\ttry {\n\t\t\tawait this.migrationExecutor.executeMigrations({\n\t\t\t\tclient: this.systemClientProvider.get(),\n\t\t\t\tmigrations,\n\t\t\t\tschemaState,\n\t\t\t\tcontentMigrationFactoryArgs: {\n\t\t\t\t\tapiToken: project.token,\n\t\t\t\t\tapiBaseUrl: project.endpoint,\n\t\t\t\t\tprojectName: project.name,\n\t\t\t\t\tschemaVersionBuilder: this.schemaVersionBuilder,\n\t\t\t\t},\n\t\t\t\tlog: message => console.log(message),\n\t\t\t\tforce,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tif (isViewReplaceFailure(e)) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t\"\\nAn in-place view update (CREATE OR REPLACE VIEW) failed — Postgres rejects it (SQLSTATE 42P16) when a view's\"\n\t\t\t\t\t\t+ ' output columns changed (e.g. reordered or retyped) even though its fields did not.\\n'\n\t\t\t\t\t\t+ 'Re-generate the migration with `migrations:diff <name> --recreate-views` to drop & recreate the affected'\n\t\t\t\t\t\t+ ' views (and their dependants) instead.\\n',\n\t\t\t\t)\n\t\t\t}\n\t\t\tthrow e\n\t\t}\n\t\treturn true\n\t}\n\n\tprivate async tryApplySnapshot({ until, schemaState }: { until?: string; schemaState?: SchemaState }): Promise<void> {\n\t\tconst executed = await this.systemClientProvider.get().listExecutedMigrations()\n\t\tconst snapshot = await this.migrationSnapshotFacade.getUsableSnapshot(executed)\n\t\tif (!snapshot) {\n\t\t\treturn\n\t\t}\n\t\tif (until && snapshot.version > MigrationVersionHelper.extractVersion(until)) {\n\t\t\t// snapshot reaches past the requested target — fall back to a normal replay\n\t\t\treturn\n\t\t}\n\t\tconsole.log(`Bootstrapping from snapshot (collapses ${snapshot.covers.length} migrations up to ${snapshot.version})`)\n\t\tif (snapshot.contentMigrations.length > 0) {\n\t\t\tconsole.warn(\n\t\t\t\t`Note: ${snapshot.contentMigrations.length} content migration(s) are covered by the snapshot; their data is NOT reproduced.`,\n\t\t\t)\n\t\t}\n\t\tconst input = await this.migrationSnapshotFacade.buildSnapshotInput(snapshot)\n\t\ttry {\n\t\t\tawait this.systemClientProvider.get().migrateFromSnapshot(input, schemaState)\n\t\t} catch (e) {\n\t\t\tif (isProjectNotEmptyError(e)) {\n\t\t\t\t// The project was migrated between our emptiness check and the server call (e.g. a\n\t\t\t\t// concurrent execute on a fresh database). Fall back to a normal replay rather than\n\t\t\t\t// crashing — the subsequent status resolution will pick up whatever is left to run.\n\t\t\t\tconsole.warn('Snapshot skipped: the project is no longer empty. Falling back to a full replay.')\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthrow e\n\t\t}\n\t\tconsole.log('Snapshot applied')\n\t}\n}\n\nconst isProjectNotEmptyError = (e: unknown): boolean =>\n\tArray.isArray(e) && e.some(it => it !== null && typeof it === 'object' && (it as { code?: unknown }).code === MigrateErrorCode.ProjectNotEmpty)\n\n// A failed `updateView` modification surfaces as MIGRATION_FAILED whose developerMessage embeds the failing\n// statement (`CREATE OR REPLACE VIEW …`). Since each modification's SQL is executed in isolation, that string\n// is a precise signal that an in-place view update — and not some other statement — is what Postgres rejected.\nconst isViewReplaceFailure = (e: unknown): boolean =>\n\tArray.isArray(e) && e.some(it =>\n\t\tit !== null\n\t\t&& typeof it === 'object'\n\t\t&& (it as { code?: unknown }).code === MigrateErrorCode.MigrationFailed\n\t\t&& typeof (it as { message?: unknown }).message === 'string'\n\t\t&& (it as { message: string }).message.includes('CREATE OR REPLACE VIEW')\n\t)\n"],"names":[],"mappings":";;;;;;AAkBO,MAAM,yBAAyB;AAAA,EACrC,YACkB,sBACA,sBACA,iBACA,sBACA,kBACA,mBACA,uBACA,oBACA,yB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,CAAA;AAAA,EAjHA;AAAA,EAmHA,MAAc,iBAAiB,EAAE,OAAO,eAA6E;AACpH,UAAM,WAAW,MAAM,KAAK,qBAAqB,IAAA,EAAM,uBAAA;AACvD,UAAM,WAAW,MAAM,KAAK,wBAAwB,kBAAkB,QAAQ;AAC9E,QAAI,CAAC,UAAU;AACd;AAAA,IACD;AACA,QAAI,SAAS,SAAS,UAAU,uBAAuB,eAAe,KAAK,GAAG;AAE7E;AAAA,IACD;AACA,YAAQ,IAAI,0CAA0C,SAAS,OAAO,MAAM,qBAAqB,SAAS,OAAO,GAAG;AACpH,QAAI,SAAS,kBAAkB,SAAS,GAAG;AAC1C,cAAQ;AAAA,QACP,SAAS,SAAS,kBAAkB,MAAM;AAAA,MAAA;AAAA,IAE5C;AACA,UAAM,QAAQ,MAAM,KAAK,wBAAwB,mBAAmB,QAAQ;AAC5E,QAAI;AACH,YAAM,KAAK,qBAAqB,IAAA,EAAM,oBAAoB,OAAO,WAAW;AAAA,IAC7E,SAAS,GAAG;AACX,UAAI,uBAAuB,CAAC,GAAG;AAI9B,gBAAQ,KAAK,kFAAkF;AAC/F;AAAA,MACD;AACA,YAAM;AAAA,IACP;AACA,YAAQ,IAAI,kBAAkB;AAAA,EAC/B;AACD;AAEA,MAAM,yBAAyB,CAAC,MAC/B,MAAM,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA,OAAM,OAAO,QAAQ,OAAO,OAAO,YAAa,GAA0B,SAAS,iBAAiB,eAAe;AAK/I,MAAM,uBAAuB,CAAC,MAC7B,MAAM,QAAQ,CAAC,KAAK,EAAE;AAAA,EAAK,QAC1B,OAAO,QACJ,OAAO,OAAO,YACb,GAA0B,SAAS,iBAAiB,mBACrD,OAAQ,GAA6B,YAAY,YAChD,GAA2B,QAAQ,SAAS,wBAAwB;AACzE;"}
|
|
1
|
+
{"version":3,"file":"MigrationExecutionFacade.js","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationExecutionFacade.ts"],"sourcesContent":["import { MigrationPrinter } from './MigrationPrinter.js'\nimport {\n\tisSchemaMigration,\n\tMigrateErrorCode,\n\tMigrationExecutor,\n\tMigrationToExecuteOkStatus,\n\tSchemaState,\n\tSchemaStateManager,\n\tSchemaVersionBuilder,\n\tSnapshotFile,\n} from '@contember/migrations-client'\nimport { MigrationsStatusFacade } from './MigrationsStatusFacade.js'\nimport { MigrationSnapshotFacade } from './MigrationSnapshotFacade.js'\nimport { MigrationVersionHelper } from '@contember/engine-common'\nimport { SystemClientProvider } from '../SystemClientProvider.js'\nimport { TenantClientProvider } from '../TenantClientProvider.js'\nimport { RemoteProjectProvider } from '../project/RemoteProjectProvider.js'\nimport { CliError, ExitCode, Output } from '@contember/cli-common'\nimport { GraphQlClientError } from '@contember/graphql-client'\nimport { promptSelect } from '../prompt/index.js'\n\nexport class MigrationExecutionFacade {\n\tconstructor(\n\t\tprivate readonly systemClientProvider: SystemClientProvider,\n\t\tprivate readonly tenantClientProvider: TenantClientProvider,\n\t\tprivate readonly projectProvider: RemoteProjectProvider,\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t\tprivate readonly migrationPrinter: MigrationPrinter,\n\t\tprivate readonly migrationExecutor: MigrationExecutor,\n\t\tprivate readonly migrationStatusFacade: MigrationsStatusFacade,\n\t\tprivate readonly schemaStateManager: SchemaStateManager,\n\t\tprivate readonly migrationSnapshotFacade: MigrationSnapshotFacade,\n\t\tprivate readonly output: Output = new Output(),\n\t) {\n\t}\n\n\texecute = async ({\n\t\trequireConfirmation,\n\t\tforce,\n\t\tuntil,\n\t\tadditionalMessage,\n\t\tuseSnapshot = true,\n\t\tonConfirmed,\n\t}: {\n\t\trequireConfirmation: boolean | ((migrations: MigrationToExecuteOkStatus[]) => boolean)\n\t\tforce?: boolean\n\t\tuntil?: string\n\t\tadditionalMessage?: string\n\t\tuseSnapshot?: boolean\n\t\tonConfirmed?: () => void\n\t}): Promise<boolean> => {\n\t\tconst project = this.projectProvider.get()\n\t\tconst stateMode = await this.schemaStateManager.isStateMode()\n\t\tlet schemaState = stateMode ? await this.schemaStateManager.readState() : undefined\n\t\tconst localMigrations = await this.migrationStatusFacade.getLocalMigrationFiles()\n\n\t\t// The state files always reflect the latest schema. When migrating to an older version, that\n\t\t// state may reference parts of the model that don't exist yet, so skip it rather than push an\n\t\t// inconsistent overlay. Run `migrations execute` without `--until` to sync the schema state.\n\t\tif (until && schemaState) {\n\t\t\tthis.output.warn(\n\t\t\t\t'Warning: schema state was not applied because --until targets a specific migration; the state files reflect the latest schema. Run \"migrations execute\" without --until to sync it.',\n\t\t\t)\n\t\t\tschemaState = undefined\n\t\t}\n\t\tif (localMigrations.length === 0 && !schemaState) {\n\t\t\tthis.output.info('No migrations to execute')\n\t\t\treturn false\n\t\t}\n\n\t\tlet migrationsToConfirm: MigrationToExecuteOkStatus[] = []\n\t\tif (localMigrations.length > 0) {\n\t\t\tconst status = await this.resolvePreflightStatus({ force })\n\t\t\tmigrationsToConfirm = until\n\t\t\t\t? status.migrationsToExecute.filter(it => it.version <= MigrationVersionHelper.extractVersion(until))\n\t\t\t\t: status.migrationsToExecute\n\t\t\tif (migrationsToConfirm.length === 0 && !schemaState) {\n\t\t\t\tthis.output.info('No migrations to execute')\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif (migrationsToConfirm.length > 0) {\n\t\t\t\tthis.output.info('Will execute following migrations:')\n\t\t\t\tmigrationsToConfirm.forEach(it => this.output.info(it.name))\n\t\t\t}\n\t\t}\n\t\tif (schemaState && localMigrations.length === 0) {\n\t\t\tthis.output.info('Will update schema state')\n\t\t}\n\t\tif (additionalMessage) {\n\t\t\tthis.output.info(additionalMessage)\n\t\t}\n\n\t\tif (typeof requireConfirmation === 'function' ? requireConfirmation(migrationsToConfirm) : requireConfirmation) {\n\t\t\tif (!this.output.canPrompt()) {\n\t\t\t\tthrow new CliError('TTY not available. Pass --yes to confirm execution.', {\n\t\t\t\t\tcode: 'TTY_UNAVAILABLE',\n\t\t\t\t\texitCode: ExitCode.InputError,\n\t\t\t\t})\n\t\t\t}\n\t\t\tdo {\n\t\t\t\tconst action = await promptSelect(this.output, {\n\t\t\t\t\tmessage: 'Do you want to continue?',\n\t\t\t\t\tchoices: [\n\t\t\t\t\t\t{ value: 'yes', title: migrationsToConfirm.length > 0 ? 'Execute migrations' : 'Update schema state' },\n\t\t\t\t\t\t...(migrationsToConfirm.length > 0 ? [{ value: 'describe', title: 'Describe migrations' }] : []),\n\t\t\t\t\t\t{ value: 'no', title: 'Abort' },\n\t\t\t\t\t],\n\t\t\t\t})\n\t\t\t\tif (action === 'describe') {\n\t\t\t\t\tconst schema = await this.schemaVersionBuilder.buildSchemaUntil(migrationsToConfirm[0].version)\n\t\t\t\t\tfor (const migration of migrationsToConfirm) {\n\t\t\t\t\t\tconst content = await migration.localMigration.getContent()\n\t\t\t\t\t\tif (isSchemaMigration(content)) {\n\t\t\t\t\t\t\tthis.migrationPrinter.printMigrationDescription(schema, content, { noSql: true })\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif (action === 'yes') {\n\t\t\t\t\tonConfirmed?.()\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tthrow new CliError('Migration execution aborted', {\n\t\t\t\t\tcode: 'OPERATION_ABORTED',\n\t\t\t\t\texitCode: ExitCode.InputError,\n\t\t\t\t})\n\t\t\t} while (true)\n\t\t}\n\n\t\tawait this.tenantClientProvider.get().createProject(project.name, true, { noDeployToken: true })\n\n\t\tconst snapshot = useSnapshot ? await this.getSnapshotToApply({ until }) : undefined\n\n\t\tlet status = await this.migrationStatusFacade.resolveMigrationsStatus({ force })\n\t\tlet migrations = until\n\t\t\t? status.migrationsToExecute.filter(it => it.version <= MigrationVersionHelper.extractVersion(until))\n\t\t\t: status.migrationsToExecute\n\t\tif (schemaState && migrations.length === 0) {\n\t\t\tthis.output.info('Updating schema state')\n\t\t}\n\t\tif (snapshot) {\n\t\t\tthis.output.info(`Will bootstrap from snapshot (${snapshot.covers.length} migrations up to ${snapshot.version})`)\n\t\t}\n\t\tif (migrations.length === 0 && !schemaState && !snapshot) {\n\t\t\tthis.output.info('No pending migrations to execute')\n\t\t\treturn false\n\t\t}\n\n\t\tif (snapshot) {\n\t\t\tawait this.applySnapshot(snapshot, schemaState)\n\t\t\tstatus = await this.migrationStatusFacade.resolveMigrationsStatus({ force })\n\t\t\tmigrations = until\n\t\t\t\t? status.migrationsToExecute.filter(it => it.version <= MigrationVersionHelper.extractVersion(until))\n\t\t\t\t: status.migrationsToExecute\n\t\t}\n\n\t\ttry {\n\t\t\tawait this.migrationExecutor.executeMigrations({\n\t\t\t\tclient: this.systemClientProvider.get(),\n\t\t\t\tmigrations,\n\t\t\t\tschemaState,\n\t\t\t\tcontentMigrationFactoryArgs: {\n\t\t\t\t\tapiToken: project.token,\n\t\t\t\t\tapiBaseUrl: project.endpoint,\n\t\t\t\t\tprojectName: project.name,\n\t\t\t\t\tschemaVersionBuilder: this.schemaVersionBuilder,\n\t\t\t\t},\n\t\t\t\tlog: message => this.output.info(message),\n\t\t\t\tforce,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tif (isViewReplaceFailure(e)) {\n\t\t\t\tthis.output.error(\n\t\t\t\t\t\"\\nAn in-place view update (CREATE OR REPLACE VIEW) failed — Postgres rejects it (SQLSTATE 42P16) when a view's\"\n\t\t\t\t\t\t+ ' output columns changed (e.g. reordered or retyped) even though its fields did not.\\n'\n\t\t\t\t\t\t+ 'Re-generate the migration with `migrations diff <name> --recreate-views` to drop & recreate the affected'\n\t\t\t\t\t\t+ ' views (and their dependants) instead.\\n',\n\t\t\t\t)\n\t\t\t}\n\t\t\tthrow e\n\t\t}\n\t\treturn true\n\t}\n\n\tprivate async resolvePreflightStatus({ force }: { force?: boolean }) {\n\t\ttry {\n\t\t\treturn await this.migrationStatusFacade.resolveMigrationsStatus({ force })\n\t\t} catch (error) {\n\t\t\tconst projectNotFound = error instanceof CliError\n\t\t\t\t? error.code === 'SYSTEM_API_NOT_FOUND'\n\t\t\t\t: error instanceof GraphQlClientError && error.response?.status === 404\n\t\t\tif (!projectNotFound) {\n\t\t\t\tthrow error\n\t\t\t}\n\t\t\treturn await this.migrationStatusFacade.resolveMigrationsStatusFromExecuted([], { force })\n\t\t}\n\t}\n\n\tprivate async getSnapshotToApply({ until }: { until?: string }): Promise<SnapshotFile | undefined> {\n\t\tconst executed = await this.systemClientProvider.get().listExecutedMigrations()\n\t\tconst snapshot = await this.migrationSnapshotFacade.getUsableSnapshot(executed)\n\t\tif (!snapshot) {\n\t\t\treturn undefined\n\t\t}\n\t\tif (until && snapshot.version > MigrationVersionHelper.extractVersion(until)) {\n\t\t\t// snapshot reaches past the requested target — fall back to a normal replay\n\t\t\treturn undefined\n\t\t}\n\t\treturn snapshot\n\t}\n\n\tprivate async applySnapshot(snapshot: SnapshotFile, schemaState?: SchemaState): Promise<void> {\n\t\tthis.output.info(`Bootstrapping from snapshot (collapses ${snapshot.covers.length} migrations up to ${snapshot.version})`)\n\t\tif (snapshot.contentMigrations.length > 0) {\n\t\t\tthis.output.warn(\n\t\t\t\t`Note: ${snapshot.contentMigrations.length} content migration(s) are covered by the snapshot; their data is NOT reproduced.`,\n\t\t\t)\n\t\t}\n\t\tconst input = await this.migrationSnapshotFacade.buildSnapshotInput(snapshot)\n\t\ttry {\n\t\t\tawait this.systemClientProvider.get().migrateFromSnapshot(input, schemaState)\n\t\t} catch (e) {\n\t\t\tif (isProjectNotEmptyError(e)) {\n\t\t\t\t// The project was migrated between our emptiness check and the server call (e.g. a\n\t\t\t\t// concurrent execute on a fresh database). Fall back to a normal replay rather than\n\t\t\t\t// crashing — the subsequent status resolution will pick up whatever is left to run.\n\t\t\t\tthis.output.warn('Snapshot skipped: the project is no longer empty. Falling back to a full replay.')\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthrow e\n\t\t}\n\t\tthis.output.info('Snapshot applied')\n\t}\n}\n\nconst isProjectNotEmptyError = (e: unknown): boolean => Array.isArray(e) && e.some(it => hasCode(it, MigrateErrorCode.ProjectNotEmpty))\n\n// A failed `updateView` modification surfaces as MIGRATION_FAILED whose developerMessage embeds the failing\n// statement (`CREATE OR REPLACE VIEW …`). Since each modification's SQL is executed in isolation, that string\n// is a precise signal that an in-place view update — and not some other statement — is what Postgres rejected.\nconst isViewReplaceFailure = (e: unknown): boolean =>\n\tArray.isArray(e) && e.some(it =>\n\t\thasCode(it, MigrateErrorCode.MigrationFailed)\n\t\t&& 'message' in it\n\t\t&& typeof it.message === 'string'\n\t\t&& it.message.includes('CREATE OR REPLACE VIEW')\n\t)\n\nconst hasCode = (value: unknown, code: MigrateErrorCode): value is object & { code: MigrateErrorCode } =>\n\tvalue !== null && typeof value === 'object' && 'code' in value && value.code === code\n"],"names":["status"],"mappings":";;;;;;;;AAqBO,MAAM,yBAAyB;AAAA,EACrC,YACkB,sBACA,sBACA,iBACA,sBACA,kBACA,mBACA,uBACA,oBACA,yBACA,SAAiB,IAAI,UACrC;AAVgB,SAAA,uBAAA;AACA,SAAA,uBAAA;AACA,SAAA,kBAAA;AACA,SAAA,uBAAA;AACA,SAAA,mBAAA;AACA,SAAA,oBAAA;AACA,SAAA,wBAAA;AACA,SAAA,qBAAA;AACA,SAAA,0BAAA;AACA,SAAA,SAAA;AAIlB,kBAAA,MAAA,WAAU,OAAO;AAAA,MAChB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,cAAc;AAAA,MACd;AAAA,IAAA,MAQuB;AACvB,YAAM,UAAU,KAAK,gBAAgB,IAAA;AACrC,YAAM,YAAY,MAAM,KAAK,mBAAmB,YAAA;AAChD,UAAI,cAAc,YAAY,MAAM,KAAK,mBAAmB,cAAc;AAC1E,YAAM,kBAAkB,MAAM,KAAK,sBAAsB,uBAAA;AAKzD,UAAI,SAAS,aAAa;AACzB,aAAK,OAAO;AAAA,UACX;AAAA,QAAA;AAED,sBAAc;AAAA,MACf;AACA,UAAI,gBAAgB,WAAW,KAAK,CAAC,aAA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,EAEA,MAAc,cAAc,UAAwB,aAA0C;AAC7F,SAAK,OAAO,KAAK,0CAA0C,SAAS,OAAO,MAAM,qBAAqB,SAAS,OAAO,GAAG;AACzH,QAAI,SAAS,kBAAkB,SAAS,GAAG;AAC1C,WAAK,OAAO;AAAA,QACX,SAAS,SAAS,kBAAkB,MAAM;AAAA,MAAA;AAAA,IAE5C;AACA,UAAM,QAAQ,MAAM,KAAK,wBAAwB,mBAAmB,QAAQ;AAC5E,QAAI;AACH,YAAM,KAAK,qBAAqB,IAAA,EAAM,oBAAoB,OAAO,WAAW;AAAA,IAC7E,SAAS,GAAG;AACX,UAAI,uBAAuB,CAAC,GAAG;AAI9B,aAAK,OAAO,KAAK,kFAAkF;AACnG;AAAA,MACD;AACA,YAAM;AAAA,IACP;AACA,SAAK,OAAO,KAAK,kBAAkB;AAAA,EACpC;AACD;AAEA,MAAM,yBAAyB,CAAC,MAAwB,MAAM,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA,OAAM,QAAQ,IAAI,iBAAiB,eAAe,CAAC;AAKtI,MAAM,uBAAuB,CAAC,MAC7B,MAAM,QAAQ,CAAC,KAAK,EAAE;AAAA,EAAK,CAAA,OAC1B,QAAQ,IAAI,iBAAiB,eAAe,KACzC,aAAa,MACb,OAAO,GAAG,YAAY,YACtB,GAAG,QAAQ,SAAS,wBAAwB;AAChD;AAED,MAAM,UAAU,CAAC,OAAgB,SAChC,UAAU,QAAQ,OAAO,UAAU,YAAY,UAAU,SAAS,MAAM,SAAS;"}
|
|
@@ -4,84 +4,100 @@ const chalk = require("chalk");
|
|
|
4
4
|
const migrationsClient = require("@contember/migrations-client");
|
|
5
5
|
const Database = require("@contember/database");
|
|
6
6
|
const chalkTable = require("chalk-table");
|
|
7
|
+
const cliCommon = require("@contember/cli-common");
|
|
7
8
|
const assertNever = require("../assertNever.cjs");
|
|
8
9
|
var __defProp = Object.defineProperty;
|
|
9
10
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
11
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
12
|
+
const migrationStatusColumns = [
|
|
13
|
+
{ field: "status", name: "Status" },
|
|
14
|
+
{ field: "migration", name: "Migration" },
|
|
15
|
+
{ field: "info", name: "Info" }
|
|
16
|
+
];
|
|
11
17
|
class MigrationPrinter {
|
|
12
|
-
constructor(migrationsDescriber) {
|
|
18
|
+
constructor(migrationsDescriber, output = new cliCommon.Output()) {
|
|
13
19
|
this.migrationsDescriber = migrationsDescriber;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
this.output = output;
|
|
21
|
+
__publicField(this, "describeMigration", (schema, migration) => {
|
|
22
|
+
return this.migrationsDescriber.describeModifications(schema, migration).map(({ modification, getSql, description }) => ({
|
|
23
|
+
modification: modification.modification,
|
|
24
|
+
description: description.message,
|
|
25
|
+
isDestructive: description.isDestructive ?? false,
|
|
26
|
+
failureWarning: description.failureWarning ?? null,
|
|
27
|
+
sql: getSql({
|
|
18
28
|
systemSchema: "system",
|
|
19
29
|
databaseMetadata: Database.emptyDatabaseMetadata,
|
|
20
30
|
invalidateDatabaseMetadata: () => null
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
})
|
|
32
|
+
}));
|
|
33
|
+
});
|
|
34
|
+
__publicField(this, "formatMigrationDescription", (items, options = {}) => {
|
|
35
|
+
if (options.sqlOnly) {
|
|
36
|
+
return items.map((it) => sanitizeMultiline(it.sql.trim())).filter((it) => it !== "").join("\n");
|
|
37
|
+
}
|
|
38
|
+
return items.map((item) => {
|
|
39
|
+
const color = item.isDestructive ? chalk.red : chalk.blue;
|
|
40
|
+
const lines = [color(`${sanitizeMultiline(item.description)} [${sanitizeMultiline(item.modification)}]`)];
|
|
41
|
+
if (item.failureWarning) {
|
|
42
|
+
lines.push(chalk.bgWhite(chalk.redBright(sanitizeMultiline(item.failureWarning))));
|
|
43
|
+
}
|
|
44
|
+
if (!options.noSql) {
|
|
45
|
+
lines.push(item.sql.trim() ? sanitizeMultiline(item.sql) : "No sql to execute");
|
|
46
|
+
}
|
|
47
|
+
return lines.map((line, index) => index === 0 ? line : indent(line)).join("\n");
|
|
48
|
+
}).join("\n");
|
|
49
|
+
});
|
|
50
|
+
__publicField(this, "printMigrationDescription", (schema, migration, options) => {
|
|
51
|
+
const description = this.formatMigrationDescription(this.describeMigration(schema, migration), options);
|
|
52
|
+
if (description !== "") {
|
|
53
|
+
for (const line of description.split("\n")) {
|
|
54
|
+
this.output.info(line);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
__publicField(this, "statusRows", (migrations) => {
|
|
59
|
+
return migrations.map((it) => {
|
|
60
|
+
switch (it.state) {
|
|
61
|
+
case migrationsClient.MigrationState.EXECUTED_ERROR:
|
|
62
|
+
return { status: chalk.bgRedBright.white("ERROR"), migration: it.name, info: it.errorMessage };
|
|
63
|
+
case migrationsClient.MigrationState.EXECUTED_OK:
|
|
64
|
+
return {
|
|
65
|
+
status: chalk.bgGreen.blackBright("Executed"),
|
|
66
|
+
migration: it.name,
|
|
67
|
+
info: `Executed at ${it.executedMigration.executedAt.toISOString()}`
|
|
68
|
+
};
|
|
69
|
+
case migrationsClient.MigrationState.EXECUTED_MISSING:
|
|
70
|
+
return {
|
|
71
|
+
status: chalk.bgRedBright.white("ERROR"),
|
|
72
|
+
migration: it.name,
|
|
73
|
+
info: it.errorMessage
|
|
74
|
+
};
|
|
75
|
+
case migrationsClient.MigrationState.TO_EXECUTE_OK:
|
|
76
|
+
return {
|
|
77
|
+
status: chalk.bgBlueBright.white("Not executed"),
|
|
78
|
+
migration: it.name,
|
|
79
|
+
info: "Will be executed during next deploy"
|
|
80
|
+
};
|
|
81
|
+
case migrationsClient.MigrationState.TO_EXECUTE_ERROR:
|
|
82
|
+
return { status: chalk.bgRedBright.white("ERROR"), migration: it.name, info: it.errorMessage };
|
|
83
|
+
case migrationsClient.MigrationState.SKIP_EMPTY:
|
|
84
|
+
return {
|
|
85
|
+
status: chalk.bgYellow.white("Skip"),
|
|
86
|
+
migration: it.name,
|
|
87
|
+
info: `Skipped because empty`
|
|
88
|
+
};
|
|
89
|
+
default:
|
|
90
|
+
return assertNever.assertNever();
|
|
40
91
|
}
|
|
41
92
|
});
|
|
42
93
|
});
|
|
43
|
-
__publicField(this, "
|
|
44
|
-
return chalkTable(
|
|
45
|
-
{
|
|
46
|
-
columns: ["status", "migration", "info"]
|
|
47
|
-
},
|
|
48
|
-
migrations.map((it) => {
|
|
49
|
-
switch (it.state) {
|
|
50
|
-
case migrationsClient.MigrationState.EXECUTED_ERROR:
|
|
51
|
-
return { status: chalk.bgRedBright.white("ERROR"), migration: it.name, info: it.errorMessage };
|
|
52
|
-
case migrationsClient.MigrationState.EXECUTED_OK:
|
|
53
|
-
return {
|
|
54
|
-
status: chalk.bgGreen.blackBright("Executed"),
|
|
55
|
-
migration: it.name,
|
|
56
|
-
info: `Executed at ${it.executedMigration.executedAt.toISOString()}`
|
|
57
|
-
};
|
|
58
|
-
case migrationsClient.MigrationState.EXECUTED_MISSING:
|
|
59
|
-
return {
|
|
60
|
-
status: chalk.bgRedBright.white("ERROR"),
|
|
61
|
-
migration: it.name,
|
|
62
|
-
info: it.errorMessage
|
|
63
|
-
};
|
|
64
|
-
case migrationsClient.MigrationState.TO_EXECUTE_OK:
|
|
65
|
-
return {
|
|
66
|
-
status: chalk.bgBlueBright.white("Not executed"),
|
|
67
|
-
migration: it.name,
|
|
68
|
-
info: "Will be executed during next deploy"
|
|
69
|
-
};
|
|
70
|
-
case migrationsClient.MigrationState.TO_EXECUTE_ERROR:
|
|
71
|
-
return { status: chalk.bgRedBright.white("ERROR"), migration: it.name, info: it.errorMessage };
|
|
72
|
-
case migrationsClient.MigrationState.SKIP_EMPTY:
|
|
73
|
-
return {
|
|
74
|
-
status: chalk.bgYellow.white("Skip"),
|
|
75
|
-
migration: it.name,
|
|
76
|
-
info: `Skipped because empty`
|
|
77
|
-
};
|
|
78
|
-
default:
|
|
79
|
-
assertNever.assertNever();
|
|
80
|
-
}
|
|
81
|
-
})
|
|
82
|
-
);
|
|
94
|
+
__publicField(this, "formatStatusTable", (migrations) => {
|
|
95
|
+
return chalkTable({ columns: migrationStatusColumns }, this.statusRows(migrations));
|
|
83
96
|
});
|
|
84
97
|
}
|
|
85
98
|
}
|
|
99
|
+
const indent = (text) => text.split("\n").map((line) => ` ${line}`).join("\n");
|
|
100
|
+
const sanitizeMultiline = (text) => text.split("\n").map(cliCommon.escapeTerminalText).join("\n");
|
|
86
101
|
exports.MigrationPrinter = MigrationPrinter;
|
|
102
|
+
exports.migrationStatusColumns = migrationStatusColumns;
|
|
87
103
|
//# sourceMappingURL=MigrationPrinter.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MigrationPrinter.cjs","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationPrinter.ts"],"sourcesContent":["/// <reference path=\"../../../types/chalk-table/index.d.ts\" />\n\nimport { Schema } from '@contember/schema'\nimport chalk from 'chalk'\nimport { AnyMigrationStatus, Migration, MigrationDescriber, MigrationState } from '@contember/migrations-client'\nimport { emptyDatabaseMetadata } from '@contember/database'\nimport chalkTable from 'chalk-table'\nimport { assertNever } from '../assertNever.js'\n\nexport
|
|
1
|
+
{"version":3,"file":"MigrationPrinter.cjs","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationPrinter.ts"],"sourcesContent":["/// <reference path=\"../../../types/chalk-table/index.d.ts\" />\n\nimport { Schema } from '@contember/schema'\nimport chalk from 'chalk'\nimport { AnyMigrationStatus, Migration, MigrationDescriber, MigrationState } from '@contember/migrations-client'\nimport { emptyDatabaseMetadata } from '@contember/database'\nimport chalkTable from 'chalk-table'\nimport { escapeTerminalText, Output } from '@contember/cli-common'\nimport { assertNever } from '../assertNever.js'\n\nexport interface MigrationDescriptionItem {\n\tmodification: string\n\tdescription: string\n\tisDestructive: boolean\n\tfailureWarning: string | null\n\tsql: string\n}\n\nexport interface MigrationStatusRow {\n\tstatus: string\n\tmigration: string\n\tinfo: string\n}\n\nexport const migrationStatusColumns: { field: keyof MigrationStatusRow & string; name: string }[] = [\n\t{ field: 'status', name: 'Status' },\n\t{ field: 'migration', name: 'Migration' },\n\t{ field: 'info', name: 'Info' },\n]\n\nexport class MigrationPrinter {\n\tconstructor(\n\t\tprivate readonly migrationsDescriber: MigrationDescriber,\n\t\tprivate readonly output: Output = new Output(),\n\t) {\n\t}\n\n\t/** The structured description of a migration — the data behind `migrations describe`. */\n\tdescribeMigration = (schema: Schema, migration: Migration): MigrationDescriptionItem[] => {\n\t\treturn this.migrationsDescriber.describeModifications(schema, migration).map(({ modification, getSql, description }) => ({\n\t\t\tmodification: modification.modification,\n\t\t\tdescription: description.message,\n\t\t\tisDestructive: description.isDestructive ?? false,\n\t\t\tfailureWarning: description.failureWarning ?? null,\n\t\t\tsql: getSql({\n\t\t\t\tsystemSchema: 'system',\n\t\t\t\tdatabaseMetadata: emptyDatabaseMetadata,\n\t\t\t\tinvalidateDatabaseMetadata: () => null,\n\t\t\t}),\n\t\t}))\n\t}\n\n\tformatMigrationDescription = (items: MigrationDescriptionItem[], options: { sqlOnly?: boolean; noSql?: boolean } = {}): string => {\n\t\tif (options.sqlOnly) {\n\t\t\treturn items.map(it => sanitizeMultiline(it.sql.trim())).filter(it => it !== '').join('\\n')\n\t\t}\n\t\treturn items.map(item => {\n\t\t\tconst color = item.isDestructive ? chalk.red : chalk.blue\n\t\t\tconst lines = [color(`${sanitizeMultiline(item.description)} [${sanitizeMultiline(item.modification)}]`)]\n\t\t\tif (item.failureWarning) {\n\t\t\t\tlines.push(chalk.bgWhite(chalk.redBright(sanitizeMultiline(item.failureWarning))))\n\t\t\t}\n\t\t\tif (!options.noSql) {\n\t\t\t\tlines.push(item.sql.trim() ? sanitizeMultiline(item.sql) : 'No sql to execute')\n\t\t\t}\n\t\t\t// the body is indented under its header, as console.group used to render it\n\t\t\treturn lines.map((line, index) => index === 0 ? line : indent(line)).join('\\n')\n\t\t}).join('\\n')\n\t}\n\n\t/** Prints the description as a diagnostic — a preamble of what a command is about to do. */\n\tprintMigrationDescription = (\n\t\tschema: Schema,\n\t\tmigration: Migration,\n\t\toptions: { sqlOnly?: boolean; noSql?: boolean },\n\t) => {\n\t\tconst description = this.formatMigrationDescription(this.describeMigration(schema, migration), options)\n\t\tif (description !== '') {\n\t\t\tfor (const line of description.split('\\n')) {\n\t\t\t\tthis.output.info(line)\n\t\t\t}\n\t\t}\n\t}\n\n\tstatusRows = (migrations: AnyMigrationStatus[]): MigrationStatusRow[] => {\n\t\treturn migrations.map((it): MigrationStatusRow => {\n\t\t\tswitch (it.state) {\n\t\t\t\tcase MigrationState.EXECUTED_ERROR:\n\t\t\t\t\treturn { status: chalk.bgRedBright.white('ERROR'), migration: it.name, info: it.errorMessage }\n\t\t\t\tcase MigrationState.EXECUTED_OK:\n\t\t\t\t\treturn {\n\t\t\t\t\t\tstatus: chalk.bgGreen.blackBright('Executed'),\n\t\t\t\t\t\tmigration: it.name,\n\t\t\t\t\t\tinfo: `Executed at ${it.executedMigration.executedAt.toISOString()}`,\n\t\t\t\t\t}\n\t\t\t\tcase MigrationState.EXECUTED_MISSING:\n\t\t\t\t\treturn {\n\t\t\t\t\t\tstatus: chalk.bgRedBright.white('ERROR'),\n\t\t\t\t\t\tmigration: it.name,\n\t\t\t\t\t\tinfo: it.errorMessage,\n\t\t\t\t\t}\n\t\t\t\tcase MigrationState.TO_EXECUTE_OK:\n\t\t\t\t\treturn {\n\t\t\t\t\t\tstatus: chalk.bgBlueBright.white('Not executed'),\n\t\t\t\t\t\tmigration: it.name,\n\t\t\t\t\t\tinfo: 'Will be executed during next deploy',\n\t\t\t\t\t}\n\t\t\t\tcase MigrationState.TO_EXECUTE_ERROR:\n\t\t\t\t\treturn { status: chalk.bgRedBright.white('ERROR'), migration: it.name, info: it.errorMessage }\n\t\t\t\tcase MigrationState.SKIP_EMPTY:\n\t\t\t\t\treturn {\n\t\t\t\t\t\tstatus: chalk.bgYellow.white('Skip'),\n\t\t\t\t\t\tmigration: it.name,\n\t\t\t\t\t\tinfo: `Skipped because empty`,\n\t\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\treturn assertNever(it)\n\t\t\t}\n\t\t})\n\t}\n\n\tformatStatusTable = (migrations: AnyMigrationStatus[]): string => {\n\t\treturn chalkTable({ columns: migrationStatusColumns }, this.statusRows(migrations))\n\t}\n}\n\nconst indent = (text: string): string => text.split('\\n').map(line => ` ${line}`).join('\\n')\nconst sanitizeMultiline = (text: string): string => text.split('\\n').map(escapeTerminalText).join('\\n')\n"],"names":["Output","emptyDatabaseMetadata","MigrationState","assertNever","escapeTerminalText"],"mappings":";;;;;;;;;;;AAwBO,MAAM,yBAAuF;AAAA,EACnG,EAAE,OAAO,UAAU,MAAM,SAAA;AAAA,EACzB,EAAE,OAAO,aAAa,MAAM,YAAA;AAAA,EAC5B,EAAE,OAAO,QAAQ,MAAM,OAAA;AACxB;AAEO,MAAM,iBAAiB;AAAA,EAC7B,YACkB,qBACA,SAAiB,IAAIA,UAAAA,UACrC;AAFgB,SAAA,sBAAA;AACA,SAAA,SAAA;AAKlB,kBAAA,MAAA,qBAAoB,CAAC,QAAgB,cAAqD;AACzF,aAAO,KAAK,oBAAoB,sBAAsB,QAAQ,SAAS,EAAE,IAAI,CAAC,EAAE,cAAc,QAAQ,YAAA,OAAmB;AAAA,QACxH,cAAc,aAAa;AAAA,QAC3B,aAAa,YAAY;AAAA,QACzB,eAAe,YAAY,iBAAiB;AAAA,QAC5C,gBAAgB,YAAY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K,MAAM,IAAI,EAAE,IAAI,CAAA,SAAQ,KAAK,IAAI,EAAE,EAAE,KAAK,IAAI;AAC5F,MAAM,oBAAoB,CAAC,SAAyB,KAAK,MAAM,IAAI,EAAE,IAAIC,UAAAA,kBAAkB,EAAE,KAAK,IAAI;;;"}
|
|
@@ -2,86 +2,102 @@ import chalk from "chalk";
|
|
|
2
2
|
import { MigrationState } from "@contember/migrations-client";
|
|
3
3
|
import { emptyDatabaseMetadata } from "@contember/database";
|
|
4
4
|
import chalkTable from "chalk-table";
|
|
5
|
+
import { Output, escapeTerminalText } from "@contember/cli-common";
|
|
5
6
|
import { assertNever } from "../assertNever.js";
|
|
6
7
|
var __defProp = Object.defineProperty;
|
|
7
8
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
9
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
10
|
+
const migrationStatusColumns = [
|
|
11
|
+
{ field: "status", name: "Status" },
|
|
12
|
+
{ field: "migration", name: "Migration" },
|
|
13
|
+
{ field: "info", name: "Info" }
|
|
14
|
+
];
|
|
9
15
|
class MigrationPrinter {
|
|
10
|
-
constructor(migrationsDescriber) {
|
|
16
|
+
constructor(migrationsDescriber, output = new Output()) {
|
|
11
17
|
this.migrationsDescriber = migrationsDescriber;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
18
|
+
this.output = output;
|
|
19
|
+
__publicField(this, "describeMigration", (schema, migration) => {
|
|
20
|
+
return this.migrationsDescriber.describeModifications(schema, migration).map(({ modification, getSql, description }) => ({
|
|
21
|
+
modification: modification.modification,
|
|
22
|
+
description: description.message,
|
|
23
|
+
isDestructive: description.isDestructive ?? false,
|
|
24
|
+
failureWarning: description.failureWarning ?? null,
|
|
25
|
+
sql: getSql({
|
|
16
26
|
systemSchema: "system",
|
|
17
27
|
databaseMetadata: emptyDatabaseMetadata,
|
|
18
28
|
invalidateDatabaseMetadata: () => null
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
})
|
|
30
|
+
}));
|
|
31
|
+
});
|
|
32
|
+
__publicField(this, "formatMigrationDescription", (items, options = {}) => {
|
|
33
|
+
if (options.sqlOnly) {
|
|
34
|
+
return items.map((it) => sanitizeMultiline(it.sql.trim())).filter((it) => it !== "").join("\n");
|
|
35
|
+
}
|
|
36
|
+
return items.map((item) => {
|
|
37
|
+
const color = item.isDestructive ? chalk.red : chalk.blue;
|
|
38
|
+
const lines = [color(`${sanitizeMultiline(item.description)} [${sanitizeMultiline(item.modification)}]`)];
|
|
39
|
+
if (item.failureWarning) {
|
|
40
|
+
lines.push(chalk.bgWhite(chalk.redBright(sanitizeMultiline(item.failureWarning))));
|
|
41
|
+
}
|
|
42
|
+
if (!options.noSql) {
|
|
43
|
+
lines.push(item.sql.trim() ? sanitizeMultiline(item.sql) : "No sql to execute");
|
|
44
|
+
}
|
|
45
|
+
return lines.map((line, index) => index === 0 ? line : indent(line)).join("\n");
|
|
46
|
+
}).join("\n");
|
|
47
|
+
});
|
|
48
|
+
__publicField(this, "printMigrationDescription", (schema, migration, options) => {
|
|
49
|
+
const description = this.formatMigrationDescription(this.describeMigration(schema, migration), options);
|
|
50
|
+
if (description !== "") {
|
|
51
|
+
for (const line of description.split("\n")) {
|
|
52
|
+
this.output.info(line);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
__publicField(this, "statusRows", (migrations) => {
|
|
57
|
+
return migrations.map((it) => {
|
|
58
|
+
switch (it.state) {
|
|
59
|
+
case MigrationState.EXECUTED_ERROR:
|
|
60
|
+
return { status: chalk.bgRedBright.white("ERROR"), migration: it.name, info: it.errorMessage };
|
|
61
|
+
case MigrationState.EXECUTED_OK:
|
|
62
|
+
return {
|
|
63
|
+
status: chalk.bgGreen.blackBright("Executed"),
|
|
64
|
+
migration: it.name,
|
|
65
|
+
info: `Executed at ${it.executedMigration.executedAt.toISOString()}`
|
|
66
|
+
};
|
|
67
|
+
case MigrationState.EXECUTED_MISSING:
|
|
68
|
+
return {
|
|
69
|
+
status: chalk.bgRedBright.white("ERROR"),
|
|
70
|
+
migration: it.name,
|
|
71
|
+
info: it.errorMessage
|
|
72
|
+
};
|
|
73
|
+
case MigrationState.TO_EXECUTE_OK:
|
|
74
|
+
return {
|
|
75
|
+
status: chalk.bgBlueBright.white("Not executed"),
|
|
76
|
+
migration: it.name,
|
|
77
|
+
info: "Will be executed during next deploy"
|
|
78
|
+
};
|
|
79
|
+
case MigrationState.TO_EXECUTE_ERROR:
|
|
80
|
+
return { status: chalk.bgRedBright.white("ERROR"), migration: it.name, info: it.errorMessage };
|
|
81
|
+
case MigrationState.SKIP_EMPTY:
|
|
82
|
+
return {
|
|
83
|
+
status: chalk.bgYellow.white("Skip"),
|
|
84
|
+
migration: it.name,
|
|
85
|
+
info: `Skipped because empty`
|
|
86
|
+
};
|
|
87
|
+
default:
|
|
88
|
+
return assertNever();
|
|
38
89
|
}
|
|
39
90
|
});
|
|
40
91
|
});
|
|
41
|
-
__publicField(this, "
|
|
42
|
-
return chalkTable(
|
|
43
|
-
{
|
|
44
|
-
columns: ["status", "migration", "info"]
|
|
45
|
-
},
|
|
46
|
-
migrations.map((it) => {
|
|
47
|
-
switch (it.state) {
|
|
48
|
-
case MigrationState.EXECUTED_ERROR:
|
|
49
|
-
return { status: chalk.bgRedBright.white("ERROR"), migration: it.name, info: it.errorMessage };
|
|
50
|
-
case MigrationState.EXECUTED_OK:
|
|
51
|
-
return {
|
|
52
|
-
status: chalk.bgGreen.blackBright("Executed"),
|
|
53
|
-
migration: it.name,
|
|
54
|
-
info: `Executed at ${it.executedMigration.executedAt.toISOString()}`
|
|
55
|
-
};
|
|
56
|
-
case MigrationState.EXECUTED_MISSING:
|
|
57
|
-
return {
|
|
58
|
-
status: chalk.bgRedBright.white("ERROR"),
|
|
59
|
-
migration: it.name,
|
|
60
|
-
info: it.errorMessage
|
|
61
|
-
};
|
|
62
|
-
case MigrationState.TO_EXECUTE_OK:
|
|
63
|
-
return {
|
|
64
|
-
status: chalk.bgBlueBright.white("Not executed"),
|
|
65
|
-
migration: it.name,
|
|
66
|
-
info: "Will be executed during next deploy"
|
|
67
|
-
};
|
|
68
|
-
case MigrationState.TO_EXECUTE_ERROR:
|
|
69
|
-
return { status: chalk.bgRedBright.white("ERROR"), migration: it.name, info: it.errorMessage };
|
|
70
|
-
case MigrationState.SKIP_EMPTY:
|
|
71
|
-
return {
|
|
72
|
-
status: chalk.bgYellow.white("Skip"),
|
|
73
|
-
migration: it.name,
|
|
74
|
-
info: `Skipped because empty`
|
|
75
|
-
};
|
|
76
|
-
default:
|
|
77
|
-
assertNever();
|
|
78
|
-
}
|
|
79
|
-
})
|
|
80
|
-
);
|
|
92
|
+
__publicField(this, "formatStatusTable", (migrations) => {
|
|
93
|
+
return chalkTable({ columns: migrationStatusColumns }, this.statusRows(migrations));
|
|
81
94
|
});
|
|
82
95
|
}
|
|
83
96
|
}
|
|
97
|
+
const indent = (text) => text.split("\n").map((line) => ` ${line}`).join("\n");
|
|
98
|
+
const sanitizeMultiline = (text) => text.split("\n").map(escapeTerminalText).join("\n");
|
|
84
99
|
export {
|
|
85
|
-
MigrationPrinter
|
|
100
|
+
MigrationPrinter,
|
|
101
|
+
migrationStatusColumns
|
|
86
102
|
};
|
|
87
103
|
//# sourceMappingURL=MigrationPrinter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MigrationPrinter.js","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationPrinter.ts"],"sourcesContent":["/// <reference path=\"../../../types/chalk-table/index.d.ts\" />\n\nimport { Schema } from '@contember/schema'\nimport chalk from 'chalk'\nimport { AnyMigrationStatus, Migration, MigrationDescriber, MigrationState } from '@contember/migrations-client'\nimport { emptyDatabaseMetadata } from '@contember/database'\nimport chalkTable from 'chalk-table'\nimport { assertNever } from '../assertNever.js'\n\nexport
|
|
1
|
+
{"version":3,"file":"MigrationPrinter.js","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationPrinter.ts"],"sourcesContent":["/// <reference path=\"../../../types/chalk-table/index.d.ts\" />\n\nimport { Schema } from '@contember/schema'\nimport chalk from 'chalk'\nimport { AnyMigrationStatus, Migration, MigrationDescriber, MigrationState } from '@contember/migrations-client'\nimport { emptyDatabaseMetadata } from '@contember/database'\nimport chalkTable from 'chalk-table'\nimport { escapeTerminalText, Output } from '@contember/cli-common'\nimport { assertNever } from '../assertNever.js'\n\nexport interface MigrationDescriptionItem {\n\tmodification: string\n\tdescription: string\n\tisDestructive: boolean\n\tfailureWarning: string | null\n\tsql: string\n}\n\nexport interface MigrationStatusRow {\n\tstatus: string\n\tmigration: string\n\tinfo: string\n}\n\nexport const migrationStatusColumns: { field: keyof MigrationStatusRow & string; name: string }[] = [\n\t{ field: 'status', name: 'Status' },\n\t{ field: 'migration', name: 'Migration' },\n\t{ field: 'info', name: 'Info' },\n]\n\nexport class MigrationPrinter {\n\tconstructor(\n\t\tprivate readonly migrationsDescriber: MigrationDescriber,\n\t\tprivate readonly output: Output = new Output(),\n\t) {\n\t}\n\n\t/** The structured description of a migration — the data behind `migrations describe`. */\n\tdescribeMigration = (schema: Schema, migration: Migration): MigrationDescriptionItem[] => {\n\t\treturn this.migrationsDescriber.describeModifications(schema, migration).map(({ modification, getSql, description }) => ({\n\t\t\tmodification: modification.modification,\n\t\t\tdescription: description.message,\n\t\t\tisDestructive: description.isDestructive ?? false,\n\t\t\tfailureWarning: description.failureWarning ?? null,\n\t\t\tsql: getSql({\n\t\t\t\tsystemSchema: 'system',\n\t\t\t\tdatabaseMetadata: emptyDatabaseMetadata,\n\t\t\t\tinvalidateDatabaseMetadata: () => null,\n\t\t\t}),\n\t\t}))\n\t}\n\n\tformatMigrationDescription = (items: MigrationDescriptionItem[], options: { sqlOnly?: boolean; noSql?: boolean } = {}): string => {\n\t\tif (options.sqlOnly) {\n\t\t\treturn items.map(it => sanitizeMultiline(it.sql.trim())).filter(it => it !== '').join('\\n')\n\t\t}\n\t\treturn items.map(item => {\n\t\t\tconst color = item.isDestructive ? chalk.red : chalk.blue\n\t\t\tconst lines = [color(`${sanitizeMultiline(item.description)} [${sanitizeMultiline(item.modification)}]`)]\n\t\t\tif (item.failureWarning) {\n\t\t\t\tlines.push(chalk.bgWhite(chalk.redBright(sanitizeMultiline(item.failureWarning))))\n\t\t\t}\n\t\t\tif (!options.noSql) {\n\t\t\t\tlines.push(item.sql.trim() ? sanitizeMultiline(item.sql) : 'No sql to execute')\n\t\t\t}\n\t\t\t// the body is indented under its header, as console.group used to render it\n\t\t\treturn lines.map((line, index) => index === 0 ? line : indent(line)).join('\\n')\n\t\t}).join('\\n')\n\t}\n\n\t/** Prints the description as a diagnostic — a preamble of what a command is about to do. */\n\tprintMigrationDescription = (\n\t\tschema: Schema,\n\t\tmigration: Migration,\n\t\toptions: { sqlOnly?: boolean; noSql?: boolean },\n\t) => {\n\t\tconst description = this.formatMigrationDescription(this.describeMigration(schema, migration), options)\n\t\tif (description !== '') {\n\t\t\tfor (const line of description.split('\\n')) {\n\t\t\t\tthis.output.info(line)\n\t\t\t}\n\t\t}\n\t}\n\n\tstatusRows = (migrations: AnyMigrationStatus[]): MigrationStatusRow[] => {\n\t\treturn migrations.map((it): MigrationStatusRow => {\n\t\t\tswitch (it.state) {\n\t\t\t\tcase MigrationState.EXECUTED_ERROR:\n\t\t\t\t\treturn { status: chalk.bgRedBright.white('ERROR'), migration: it.name, info: it.errorMessage }\n\t\t\t\tcase MigrationState.EXECUTED_OK:\n\t\t\t\t\treturn {\n\t\t\t\t\t\tstatus: chalk.bgGreen.blackBright('Executed'),\n\t\t\t\t\t\tmigration: it.name,\n\t\t\t\t\t\tinfo: `Executed at ${it.executedMigration.executedAt.toISOString()}`,\n\t\t\t\t\t}\n\t\t\t\tcase MigrationState.EXECUTED_MISSING:\n\t\t\t\t\treturn {\n\t\t\t\t\t\tstatus: chalk.bgRedBright.white('ERROR'),\n\t\t\t\t\t\tmigration: it.name,\n\t\t\t\t\t\tinfo: it.errorMessage,\n\t\t\t\t\t}\n\t\t\t\tcase MigrationState.TO_EXECUTE_OK:\n\t\t\t\t\treturn {\n\t\t\t\t\t\tstatus: chalk.bgBlueBright.white('Not executed'),\n\t\t\t\t\t\tmigration: it.name,\n\t\t\t\t\t\tinfo: 'Will be executed during next deploy',\n\t\t\t\t\t}\n\t\t\t\tcase MigrationState.TO_EXECUTE_ERROR:\n\t\t\t\t\treturn { status: chalk.bgRedBright.white('ERROR'), migration: it.name, info: it.errorMessage }\n\t\t\t\tcase MigrationState.SKIP_EMPTY:\n\t\t\t\t\treturn {\n\t\t\t\t\t\tstatus: chalk.bgYellow.white('Skip'),\n\t\t\t\t\t\tmigration: it.name,\n\t\t\t\t\t\tinfo: `Skipped because empty`,\n\t\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\treturn assertNever(it)\n\t\t\t}\n\t\t})\n\t}\n\n\tformatStatusTable = (migrations: AnyMigrationStatus[]): string => {\n\t\treturn chalkTable({ columns: migrationStatusColumns }, this.statusRows(migrations))\n\t}\n}\n\nconst indent = (text: string): string => text.split('\\n').map(line => ` ${line}`).join('\\n')\nconst sanitizeMultiline = (text: string): string => text.split('\\n').map(escapeTerminalText).join('\\n')\n"],"names":[],"mappings":";;;;;;;;;AAwBO,MAAM,yBAAuF;AAAA,EACnG,EAAE,OAAO,UAAU,MAAM,SAAA;AAAA,EACzB,EAAE,OAAO,aAAa,MAAM,YAAA;AAAA,EAC5B,EAAE,OAAO,QAAQ,MAAM,OAAA;AACxB;AAEO,MAAM,iBAAiB;AAAA,EAC7B,YACk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C,mBAAO,YAAc;AAAA,QAAA;AAAA,MAExB,CAAC;AAAA,IACF,CAAA;AAEA,kBAAA,MAAA,qBAAoB,CAAC,eAA6C;AACjE,aAAO,WAAW,EAAE,SAAS,uBAAA,GAA0B,KAAK,WAAW,UAAU,CAAC;AAAA,IACnF,CAAA;AAAA,EAxFA;AAyFD;AAEA,MAAM,SAAS,CAAC,SAAyB,KAAK,MAAM,IAAI,EAAE,IAAI,CAAA,SAAQ,KAAK,IAAI,EAAE,EAAE,KAAK,IAAI;AAC5F,MAAM,oBAAoB,CAAC,SAAyB,KAAK,MAAM,IAAI,EAAE,IAAI,kBAAkB,EAAE,KAAK,IAAI;"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const schemaUtils = require("@contember/schema-utils");
|
|
4
4
|
const engineCommon = require("@contember/engine-common");
|
|
5
|
+
const cliCommon = require("@contember/cli-common");
|
|
5
6
|
var __defProp = Object.defineProperty;
|
|
6
7
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
8
|
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "", value);
|
|
@@ -20,7 +21,7 @@ class MigrationRebaseFacade {
|
|
|
20
21
|
);
|
|
21
22
|
const valid = await this.migrationsValidator.validate(schemaWithoutMigrations, migrations);
|
|
22
23
|
if (!valid) {
|
|
23
|
-
throw
|
|
24
|
+
throw new cliCommon.CliError("Cannot rebase migrations", { code: "MIGRATIONS_INVALID", exitCode: cliCommon.ExitCode.InputError });
|
|
24
25
|
}
|
|
25
26
|
let i = 0;
|
|
26
27
|
for (const migration of migrations) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MigrationRebaseFacade.cjs","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationRebaseFacade.ts"],"sourcesContent":["import { Migration, MigrationFilesManager, SchemaStateManager, SchemaVersionBuilder, SystemClient } from '@contember/migrations-client'\nimport { MigrationsValidator } from './MigrationsValidator.js'\nimport { emptySchema } from '@contember/schema-utils'\nimport { MigrationVersionHelper } from '@contember/engine-common'\nimport { SystemClientProvider } from '../SystemClientProvider.js'\n\nexport class MigrationRebaseFacade {\n\tconstructor(\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t\tprivate readonly migrationsValidator: MigrationsValidator,\n\t\tprivate readonly systemClientProvider: SystemClientProvider,\n\t\tprivate readonly migrationFilesManager: MigrationFilesManager,\n\t\tprivate readonly schemaStateManager: SchemaStateManager,\n\t) {\n\t}\n\n\trebase = async (migrations: Migration[]) => {\n\t\tconst versions = migrations.map(it => it.version)\n\t\tconst schemaWithoutMigrations = await this.schemaVersionBuilder.buildSchemaAdvanced(\n\t\t\temptySchema,\n\t\t\tversion => !versions.includes(version),\n\t\t)\n\t\tconst valid = await this.migrationsValidator.validate(schemaWithoutMigrations, migrations)\n\t\tif (!valid) {\n\t\t\tthrow
|
|
1
|
+
{"version":3,"file":"MigrationRebaseFacade.cjs","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationRebaseFacade.ts"],"sourcesContent":["import { Migration, MigrationFilesManager, SchemaStateManager, SchemaVersionBuilder, SystemClient } from '@contember/migrations-client'\nimport { MigrationsValidator } from './MigrationsValidator.js'\nimport { emptySchema } from '@contember/schema-utils'\nimport { MigrationVersionHelper } from '@contember/engine-common'\nimport { SystemClientProvider } from '../SystemClientProvider.js'\nimport { CliError, ExitCode } from '@contember/cli-common'\n\nexport class MigrationRebaseFacade {\n\tconstructor(\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t\tprivate readonly migrationsValidator: MigrationsValidator,\n\t\tprivate readonly systemClientProvider: SystemClientProvider,\n\t\tprivate readonly migrationFilesManager: MigrationFilesManager,\n\t\tprivate readonly schemaStateManager: SchemaStateManager,\n\t) {\n\t}\n\n\trebase = async (migrations: Migration[]) => {\n\t\tconst versions = migrations.map(it => it.version)\n\t\tconst schemaWithoutMigrations = await this.schemaVersionBuilder.buildSchemaAdvanced(\n\t\t\temptySchema,\n\t\t\tversion => !versions.includes(version),\n\t\t)\n\t\tconst valid = await this.migrationsValidator.validate(schemaWithoutMigrations, migrations)\n\t\tif (!valid) {\n\t\t\tthrow new CliError('Cannot rebase migrations', { code: 'MIGRATIONS_INVALID', exitCode: ExitCode.InputError })\n\t\t}\n\n\t\tlet i = 0\n\t\tfor (const migration of migrations) {\n\t\t\tconst name = migration.name.substring(MigrationVersionHelper.prefixLength + 1)\n\t\t\tconst [version, fullName] = MigrationVersionHelper.createVersion(name, i++)\n\t\t\tconst newMigration = {\n\t\t\t\tname: fullName,\n\t\t\t\tversion: version,\n\t\t\t\tformatVersion: migration.formatVersion,\n\t\t\t\tmodifications: migration.modifications,\n\t\t\t}\n\t\t\tawait this.systemClientProvider.get().migrationModify(migration.version, newMigration)\n\t\t\tawait this.migrationFilesManager.moveFile(migration.name, newMigration.name)\n\t\t}\n\n\t\t// migrationModify rebuilds the server schema from migrations, dropping the non-model\n\t\t// state; re-apply it from the state files so the server stays consistent.\n\t\tif (await this.schemaStateManager.isStateMode()) {\n\t\t\tawait this.systemClientProvider.get().migrate([], false, await this.schemaStateManager.readState())\n\t\t}\n\t}\n}\n"],"names":["emptySchema","CliError","ExitCode","MigrationVersionHelper"],"mappings":";;;;;;;;AAOO,MAAM,sBAAsB;AAAA,EAClC,YACkB,sBACA,qBACA,sBACA,uBACA,oBAChB;AALgB,SAAA,uBAAA;AACA,SAAA,sBAAA;AACA,SAAA,uBAAA;AACA,SAAA,wBAAA;AACA,SAAA,qBAAA;AAIlB,kBAAA,MAAA,UAAS,OAAO,eAA4B;AAC3C,YAAM,WAAW,WAAW,IAAI,CAAA,OAAM,GAAG,OAAO;AAChD,YAAM,0BAA0B,MAAM,KAAK,qBAAqB;AAAA,QAC/DA,YAAAA;AAAAA,QACA,CAAA,YAAW,CAAC,SAAS,SAAS,OAAO;AAAA,MAAA;AAEtC,YAAM,QAAQ,MAAM,KAAK,oBAAoB,SAAS,yBAAyB,UAAU;AACzF,UAAI,CAAC,OAAO;AACX,cAAM,IAAIC,UAAAA,SAAS,4BAA4B,EAAE,MAAM,sBAAsB,UAAUC,mBAAS,YAAY;AAAA,MAC7G;AAEA,UAAI,IAAI;AACR,iBAAW,aAAa,YAAY;AACnC,cAAM,OAAO,UAAU,KAAK,UAAUC,aAAAA,uBAAuB,eAAe,CAAC;AAC7E,cAAM,CAAC,SAAS,QAAQ,IAAIA,aAAAA,uBAAuB,cAAc,MAAM,GAAG;AAC1E,cAAM,eAAe;AAAA,UACpB,MAAM;AAAA,UACN;AAAA,UACA,eAAe,UAAU;AAAA,UACzB,eAAe,UAAU;AAAA,QAAA;AAE1B,cAAM,KAAK,qBAAqB,IAAA,EAAM,gBAAgB,UAAU,SAAS,YAAY;AACrF,cAAM,KAAK,sBAAsB,SAAS,UAAU,MAAM,aAAa,IAAI;AAAA,MAC5E;AAIA,UAAI,MAAM,KAAK,mBAAmB,eAAe;AAChD,cAAM,KAAK,qBAAqB,IAAA,EAAM,QAAQ,IAAI,OAAO,MAAM,KAAK,mBAAmB,UAAA,CAAW;AAAA,MACnG;AAAA,IACD,CAAA;AAAA,EAhCA;AAiCD;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { emptySchema } from "@contember/schema-utils";
|
|
2
2
|
import { MigrationVersionHelper } from "@contember/engine-common";
|
|
3
|
+
import { CliError, ExitCode } from "@contember/cli-common";
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5
6
|
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "", value);
|
|
@@ -18,7 +19,7 @@ class MigrationRebaseFacade {
|
|
|
18
19
|
);
|
|
19
20
|
const valid = await this.migrationsValidator.validate(schemaWithoutMigrations, migrations);
|
|
20
21
|
if (!valid) {
|
|
21
|
-
throw
|
|
22
|
+
throw new CliError("Cannot rebase migrations", { code: "MIGRATIONS_INVALID", exitCode: ExitCode.InputError });
|
|
22
23
|
}
|
|
23
24
|
let i = 0;
|
|
24
25
|
for (const migration of migrations) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MigrationRebaseFacade.js","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationRebaseFacade.ts"],"sourcesContent":["import { Migration, MigrationFilesManager, SchemaStateManager, SchemaVersionBuilder, SystemClient } from '@contember/migrations-client'\nimport { MigrationsValidator } from './MigrationsValidator.js'\nimport { emptySchema } from '@contember/schema-utils'\nimport { MigrationVersionHelper } from '@contember/engine-common'\nimport { SystemClientProvider } from '../SystemClientProvider.js'\n\nexport class MigrationRebaseFacade {\n\tconstructor(\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t\tprivate readonly migrationsValidator: MigrationsValidator,\n\t\tprivate readonly systemClientProvider: SystemClientProvider,\n\t\tprivate readonly migrationFilesManager: MigrationFilesManager,\n\t\tprivate readonly schemaStateManager: SchemaStateManager,\n\t) {\n\t}\n\n\trebase = async (migrations: Migration[]) => {\n\t\tconst versions = migrations.map(it => it.version)\n\t\tconst schemaWithoutMigrations = await this.schemaVersionBuilder.buildSchemaAdvanced(\n\t\t\temptySchema,\n\t\t\tversion => !versions.includes(version),\n\t\t)\n\t\tconst valid = await this.migrationsValidator.validate(schemaWithoutMigrations, migrations)\n\t\tif (!valid) {\n\t\t\tthrow
|
|
1
|
+
{"version":3,"file":"MigrationRebaseFacade.js","sources":["../../../../../../packages/cli/src/lib/migrations/MigrationRebaseFacade.ts"],"sourcesContent":["import { Migration, MigrationFilesManager, SchemaStateManager, SchemaVersionBuilder, SystemClient } from '@contember/migrations-client'\nimport { MigrationsValidator } from './MigrationsValidator.js'\nimport { emptySchema } from '@contember/schema-utils'\nimport { MigrationVersionHelper } from '@contember/engine-common'\nimport { SystemClientProvider } from '../SystemClientProvider.js'\nimport { CliError, ExitCode } from '@contember/cli-common'\n\nexport class MigrationRebaseFacade {\n\tconstructor(\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t\tprivate readonly migrationsValidator: MigrationsValidator,\n\t\tprivate readonly systemClientProvider: SystemClientProvider,\n\t\tprivate readonly migrationFilesManager: MigrationFilesManager,\n\t\tprivate readonly schemaStateManager: SchemaStateManager,\n\t) {\n\t}\n\n\trebase = async (migrations: Migration[]) => {\n\t\tconst versions = migrations.map(it => it.version)\n\t\tconst schemaWithoutMigrations = await this.schemaVersionBuilder.buildSchemaAdvanced(\n\t\t\temptySchema,\n\t\t\tversion => !versions.includes(version),\n\t\t)\n\t\tconst valid = await this.migrationsValidator.validate(schemaWithoutMigrations, migrations)\n\t\tif (!valid) {\n\t\t\tthrow new CliError('Cannot rebase migrations', { code: 'MIGRATIONS_INVALID', exitCode: ExitCode.InputError })\n\t\t}\n\n\t\tlet i = 0\n\t\tfor (const migration of migrations) {\n\t\t\tconst name = migration.name.substring(MigrationVersionHelper.prefixLength + 1)\n\t\t\tconst [version, fullName] = MigrationVersionHelper.createVersion(name, i++)\n\t\t\tconst newMigration = {\n\t\t\t\tname: fullName,\n\t\t\t\tversion: version,\n\t\t\t\tformatVersion: migration.formatVersion,\n\t\t\t\tmodifications: migration.modifications,\n\t\t\t}\n\t\t\tawait this.systemClientProvider.get().migrationModify(migration.version, newMigration)\n\t\t\tawait this.migrationFilesManager.moveFile(migration.name, newMigration.name)\n\t\t}\n\n\t\t// migrationModify rebuilds the server schema from migrations, dropping the non-model\n\t\t// state; re-apply it from the state files so the server stays consistent.\n\t\tif (await this.schemaStateManager.isStateMode()) {\n\t\t\tawait this.systemClientProvider.get().migrate([], false, await this.schemaStateManager.readState())\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";;;;;;AAOO,MAAM,sBAAsB;AAAA,EAClC,YACkB,sBACA,qBACA,sBACA,uBACA,oBAChB;AALgB,SAAA,uBAAA;AACA,SAAA,sBAAA;AACA,SAAA,uBAAA;AACA,SAAA,wBAAA;AACA,SAAA,qBAAA;AAIlB,kBAAA,MAAA,UAAS,OAAO,eAA4B;AAC3C,YAAM,WAAW,WAAW,IAAI,CAAA,OAAM,GAAG,OAAO;AAChD,YAAM,0BAA0B,MAAM,KAAK,qBAAqB;AAAA,QAC/D;AAAA,QACA,CAAA,YAAW,CAAC,SAAS,SAAS,OAAO;AAAA,MAAA;AAEtC,YAAM,QAAQ,MAAM,KAAK,oBAAoB,SAAS,yBAAyB,UAAU;AACzF,UAAI,CAAC,OAAO;AACX,cAAM,IAAI,SAAS,4BAA4B,EAAE,MAAM,sBAAsB,UAAU,SAAS,YAAY;AAAA,MAC7G;AAEA,UAAI,IAAI;AACR,iBAAW,aAAa,YAAY;AACnC,cAAM,OAAO,UAAU,KAAK,UAAU,uBAAuB,eAAe,CAAC;AAC7E,cAAM,CAAC,SAAS,QAAQ,IAAI,uBAAuB,cAAc,MAAM,GAAG;AAC1E,cAAM,eAAe;AAAA,UACpB,MAAM;AAAA,UACN;AAAA,UACA,eAAe,UAAU;AAAA,UACzB,eAAe,UAAU;AAAA,QAAA;AAE1B,cAAM,KAAK,qBAAqB,IAAA,EAAM,gBAAgB,UAAU,SAAS,YAAY;AACrF,cAAM,KAAK,sBAAsB,SAAS,UAAU,MAAM,aAAa,IAAI;AAAA,MAC5E;AAIA,UAAI,MAAM,KAAK,mBAAmB,eAAe;AAChD,cAAM,KAAK,qBAAqB,IAAA,EAAM,QAAQ,IAAI,OAAO,MAAM,KAAK,mBAAmB,UAAA,CAAW;AAAA,MACnG;AAAA,IACD,CAAA;AAAA,EAhCA;AAiCD;"}
|