@contember/cli 2.1.0-rc.3 → 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.
Files changed (1475) hide show
  1. package/CLAUDE.md +35 -28
  2. package/dist/development/index.cjs +5 -0
  3. package/dist/development/index.cjs.map +1 -0
  4. package/dist/development/index.js +5 -0
  5. package/dist/development/index.js.map +1 -0
  6. package/dist/development/run.cjs +14 -6
  7. package/dist/development/run.cjs.map +1 -1
  8. package/dist/development/run.js +12 -4
  9. package/dist/development/run.js.map +1 -1
  10. package/dist/development/src/commands/actions/ActionsGetEventCommand.cjs +30 -15
  11. package/dist/development/src/commands/actions/ActionsGetEventCommand.cjs.map +1 -1
  12. package/dist/development/src/commands/actions/ActionsGetEventCommand.js +31 -16
  13. package/dist/development/src/commands/actions/ActionsGetEventCommand.js.map +1 -1
  14. package/dist/development/src/commands/actions/ActionsListFailedEventsCommand.cjs +21 -41
  15. package/dist/development/src/commands/actions/ActionsListFailedEventsCommand.cjs.map +1 -1
  16. package/dist/development/src/commands/actions/ActionsListFailedEventsCommand.js +22 -42
  17. package/dist/development/src/commands/actions/ActionsListFailedEventsCommand.js.map +1 -1
  18. package/dist/development/src/commands/actions/ActionsListVariablesCommand.cjs +15 -13
  19. package/dist/development/src/commands/actions/ActionsListVariablesCommand.cjs.map +1 -1
  20. package/dist/development/src/commands/actions/ActionsListVariablesCommand.js +15 -13
  21. package/dist/development/src/commands/actions/ActionsListVariablesCommand.js.map +1 -1
  22. package/dist/development/src/commands/actions/ActionsRetryEventCommand.cjs +28 -16
  23. package/dist/development/src/commands/actions/ActionsRetryEventCommand.cjs.map +1 -1
  24. package/dist/development/src/commands/actions/ActionsRetryEventCommand.js +29 -17
  25. package/dist/development/src/commands/actions/ActionsRetryEventCommand.js.map +1 -1
  26. package/dist/development/src/commands/actions/ActionsSetVariablesCommand.cjs +51 -22
  27. package/dist/development/src/commands/actions/ActionsSetVariablesCommand.cjs.map +1 -1
  28. package/dist/development/src/commands/actions/ActionsSetVariablesCommand.js +52 -23
  29. package/dist/development/src/commands/actions/ActionsSetVariablesCommand.js.map +1 -1
  30. package/dist/development/src/commands/actions/ActionsStopEventCommand.cjs +28 -16
  31. package/dist/development/src/commands/actions/ActionsStopEventCommand.cjs.map +1 -1
  32. package/dist/development/src/commands/actions/ActionsStopEventCommand.js +29 -17
  33. package/dist/development/src/commands/actions/ActionsStopEventCommand.js.map +1 -1
  34. package/dist/development/src/commands/deploy/DeployCommand.cjs +58 -29
  35. package/dist/development/src/commands/deploy/DeployCommand.cjs.map +1 -1
  36. package/dist/development/src/commands/deploy/DeployCommand.js +59 -30
  37. package/dist/development/src/commands/deploy/DeployCommand.js.map +1 -1
  38. package/dist/development/src/commands/migrations/MigrationAmendCommand.cjs +88 -26
  39. package/dist/development/src/commands/migrations/MigrationAmendCommand.cjs.map +1 -1
  40. package/dist/development/src/commands/migrations/MigrationAmendCommand.js +89 -27
  41. package/dist/development/src/commands/migrations/MigrationAmendCommand.js.map +1 -1
  42. package/dist/development/src/commands/migrations/MigrationBlankCommand.cjs +2 -2
  43. package/dist/development/src/commands/migrations/MigrationBlankCommand.cjs.map +1 -1
  44. package/dist/development/src/commands/migrations/MigrationBlankCommand.js +2 -2
  45. package/dist/development/src/commands/migrations/MigrationBlankCommand.js.map +1 -1
  46. package/dist/development/src/commands/migrations/MigrationDescribeCommand.cjs +7 -3
  47. package/dist/development/src/commands/migrations/MigrationDescribeCommand.cjs.map +1 -1
  48. package/dist/development/src/commands/migrations/MigrationDescribeCommand.js +8 -4
  49. package/dist/development/src/commands/migrations/MigrationDescribeCommand.js.map +1 -1
  50. package/dist/development/src/commands/migrations/MigrationDiffCommand.cjs +103 -19
  51. package/dist/development/src/commands/migrations/MigrationDiffCommand.cjs.map +1 -1
  52. package/dist/development/src/commands/migrations/MigrationDiffCommand.js +104 -20
  53. package/dist/development/src/commands/migrations/MigrationDiffCommand.js.map +1 -1
  54. package/dist/development/src/commands/migrations/MigrationExecuteCommand.cjs +10 -3
  55. package/dist/development/src/commands/migrations/MigrationExecuteCommand.cjs.map +1 -1
  56. package/dist/development/src/commands/migrations/MigrationExecuteCommand.js +10 -3
  57. package/dist/development/src/commands/migrations/MigrationExecuteCommand.js.map +1 -1
  58. package/dist/development/src/commands/migrations/MigrationInitStateCommand.cjs +33 -0
  59. package/dist/development/src/commands/migrations/MigrationInitStateCommand.cjs.map +1 -0
  60. package/dist/development/src/commands/migrations/MigrationInitStateCommand.js +33 -0
  61. package/dist/development/src/commands/migrations/MigrationInitStateCommand.js.map +1 -0
  62. package/dist/development/src/commands/migrations/MigrationRebaseCommand.cjs +24 -4
  63. package/dist/development/src/commands/migrations/MigrationRebaseCommand.cjs.map +1 -1
  64. package/dist/development/src/commands/migrations/MigrationRebaseCommand.js +25 -5
  65. package/dist/development/src/commands/migrations/MigrationRebaseCommand.js.map +1 -1
  66. package/dist/development/src/commands/migrations/MigrationSnapshotCommand.cjs +59 -0
  67. package/dist/development/src/commands/migrations/MigrationSnapshotCommand.cjs.map +1 -0
  68. package/dist/development/src/commands/migrations/MigrationSnapshotCommand.js +59 -0
  69. package/dist/development/src/commands/migrations/MigrationSnapshotCommand.js.map +1 -0
  70. package/dist/development/src/commands/migrations/MigrationStatusCommand.cjs +5 -5
  71. package/dist/development/src/commands/migrations/MigrationStatusCommand.cjs.map +1 -1
  72. package/dist/development/src/commands/migrations/MigrationStatusCommand.js +5 -5
  73. package/dist/development/src/commands/migrations/MigrationStatusCommand.js.map +1 -1
  74. package/dist/development/src/commands/migrations/MigrationVerifySnapshotCommand.cjs +22 -0
  75. package/dist/development/src/commands/migrations/MigrationVerifySnapshotCommand.cjs.map +1 -0
  76. package/dist/development/src/commands/migrations/MigrationVerifySnapshotCommand.js +22 -0
  77. package/dist/development/src/commands/migrations/MigrationVerifySnapshotCommand.js.map +1 -0
  78. package/dist/development/src/commands/misc/CommandsCommand.cjs +58 -0
  79. package/dist/development/src/commands/misc/CommandsCommand.cjs.map +1 -0
  80. package/dist/development/src/commands/misc/CommandsCommand.js +58 -0
  81. package/dist/development/src/commands/misc/CommandsCommand.js.map +1 -0
  82. package/dist/development/src/commands/misc/VersionCommand.cjs +2 -3
  83. package/dist/development/src/commands/misc/VersionCommand.cjs.map +1 -1
  84. package/dist/development/src/commands/misc/VersionCommand.js +2 -3
  85. package/dist/development/src/commands/misc/VersionCommand.js.map +1 -1
  86. package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.cjs +13 -13
  87. package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.cjs.map +1 -1
  88. package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.js +13 -13
  89. package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.js.map +1 -1
  90. package/dist/development/src/commands/project/ProjectPrintSchemaCommand.cjs +17 -15
  91. package/dist/development/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -1
  92. package/dist/development/src/commands/project/ProjectPrintSchemaCommand.js +18 -16
  93. package/dist/development/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -1
  94. package/dist/development/src/commands/project/ProjectValidateCommand.cjs +40 -12
  95. package/dist/development/src/commands/project/ProjectValidateCommand.cjs.map +1 -1
  96. package/dist/development/src/commands/project/ProjectValidateCommand.js +42 -14
  97. package/dist/development/src/commands/project/ProjectValidateCommand.js.map +1 -1
  98. package/dist/development/src/commands/tenant/TenantApplyCommand.cjs +59 -0
  99. package/dist/development/src/commands/tenant/TenantApplyCommand.cjs.map +1 -0
  100. package/dist/development/src/commands/tenant/TenantApplyCommand.js +59 -0
  101. package/dist/development/src/commands/tenant/TenantApplyCommand.js.map +1 -0
  102. package/dist/development/src/commands/tenant/apikey/TenantApiKeyCreateCommand.cjs +68 -0
  103. package/dist/development/src/commands/tenant/apikey/TenantApiKeyCreateCommand.cjs.map +1 -0
  104. package/dist/development/src/commands/tenant/apikey/TenantApiKeyCreateCommand.js +68 -0
  105. package/dist/development/src/commands/tenant/apikey/TenantApiKeyCreateCommand.js.map +1 -0
  106. package/dist/development/src/commands/tenant/apikey/TenantApiKeyDisableCommand.cjs +31 -0
  107. package/dist/development/src/commands/tenant/apikey/TenantApiKeyDisableCommand.cjs.map +1 -0
  108. package/dist/development/src/commands/tenant/apikey/TenantApiKeyDisableCommand.js +31 -0
  109. package/dist/development/src/commands/tenant/apikey/TenantApiKeyDisableCommand.js.map +1 -0
  110. package/dist/development/src/commands/tenant/apikey/TenantApiKeyListCommand.cjs +55 -0
  111. package/dist/development/src/commands/tenant/apikey/TenantApiKeyListCommand.cjs.map +1 -0
  112. package/dist/development/src/commands/tenant/apikey/TenantApiKeyListCommand.js +55 -0
  113. package/dist/development/src/commands/tenant/apikey/TenantApiKeyListCommand.js.map +1 -0
  114. package/dist/development/src/commands/tenant/member/TenantMemberAddCommand.cjs +36 -0
  115. package/dist/development/src/commands/tenant/member/TenantMemberAddCommand.cjs.map +1 -0
  116. package/dist/development/src/commands/tenant/member/TenantMemberAddCommand.js +36 -0
  117. package/dist/development/src/commands/tenant/member/TenantMemberAddCommand.js.map +1 -0
  118. package/dist/development/src/commands/tenant/member/TenantMemberInviteCommand.cjs +62 -0
  119. package/dist/development/src/commands/tenant/member/TenantMemberInviteCommand.cjs.map +1 -0
  120. package/dist/development/src/commands/tenant/member/TenantMemberInviteCommand.js +62 -0
  121. package/dist/development/src/commands/tenant/member/TenantMemberInviteCommand.js.map +1 -0
  122. package/dist/development/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.cjs +102 -0
  123. package/dist/development/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.cjs.map +1 -0
  124. package/dist/development/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.js +102 -0
  125. package/dist/development/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.js.map +1 -0
  126. package/dist/development/src/commands/tenant/member/TenantMemberListCommand.cjs +73 -0
  127. package/dist/development/src/commands/tenant/member/TenantMemberListCommand.cjs.map +1 -0
  128. package/dist/development/src/commands/tenant/member/TenantMemberListCommand.js +73 -0
  129. package/dist/development/src/commands/tenant/member/TenantMemberListCommand.js.map +1 -0
  130. package/dist/development/src/commands/tenant/member/TenantMemberRemoveCommand.cjs +35 -0
  131. package/dist/development/src/commands/tenant/member/TenantMemberRemoveCommand.cjs.map +1 -0
  132. package/dist/development/src/commands/tenant/member/TenantMemberRemoveCommand.js +35 -0
  133. package/dist/development/src/commands/tenant/member/TenantMemberRemoveCommand.js.map +1 -0
  134. package/dist/development/src/commands/tenant/member/TenantMemberUpdateCommand.cjs +45 -0
  135. package/dist/development/src/commands/tenant/member/TenantMemberUpdateCommand.cjs.map +1 -0
  136. package/dist/development/src/commands/tenant/member/TenantMemberUpdateCommand.js +45 -0
  137. package/dist/development/src/commands/tenant/member/TenantMemberUpdateCommand.js.map +1 -0
  138. package/dist/development/src/commands/tenant/member/memberOptions.cjs +16 -0
  139. package/dist/development/src/commands/tenant/member/memberOptions.cjs.map +1 -0
  140. package/dist/development/src/commands/tenant/member/memberOptions.js +16 -0
  141. package/dist/development/src/commands/tenant/member/memberOptions.js.map +1 -0
  142. package/dist/development/src/commands/tenant/member/membershipInput.cjs +109 -0
  143. package/dist/development/src/commands/tenant/member/membershipInput.cjs.map +1 -0
  144. package/dist/development/src/commands/tenant/member/membershipInput.js +109 -0
  145. package/dist/development/src/commands/tenant/member/membershipInput.js.map +1 -0
  146. package/dist/development/src/commands/tenant/person/TenantIdentityRoleAddCommand.cjs +27 -0
  147. package/dist/development/src/commands/tenant/person/TenantIdentityRoleAddCommand.cjs.map +1 -0
  148. package/dist/development/src/commands/tenant/person/TenantIdentityRoleAddCommand.js +27 -0
  149. package/dist/development/src/commands/tenant/person/TenantIdentityRoleAddCommand.js.map +1 -0
  150. package/dist/development/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.cjs +34 -0
  151. package/dist/development/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.cjs.map +1 -0
  152. package/dist/development/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.js +34 -0
  153. package/dist/development/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.js.map +1 -0
  154. package/dist/development/src/commands/tenant/person/TenantPersonCreateCommand.cjs +79 -0
  155. package/dist/development/src/commands/tenant/person/TenantPersonCreateCommand.cjs.map +1 -0
  156. package/dist/development/src/commands/tenant/person/TenantPersonCreateCommand.js +79 -0
  157. package/dist/development/src/commands/tenant/person/TenantPersonCreateCommand.js.map +1 -0
  158. package/dist/development/src/commands/tenant/person/TenantPersonDisableCommand.cjs +29 -0
  159. package/dist/development/src/commands/tenant/person/TenantPersonDisableCommand.cjs.map +1 -0
  160. package/dist/development/src/commands/tenant/person/TenantPersonDisableCommand.js +29 -0
  161. package/dist/development/src/commands/tenant/person/TenantPersonDisableCommand.js.map +1 -0
  162. package/dist/development/src/commands/tenant/person/TenantPersonListCommand.cjs +53 -0
  163. package/dist/development/src/commands/tenant/person/TenantPersonListCommand.cjs.map +1 -0
  164. package/dist/development/src/commands/tenant/person/TenantPersonListCommand.js +53 -0
  165. package/dist/development/src/commands/tenant/person/TenantPersonListCommand.js.map +1 -0
  166. package/dist/development/src/commands/tenant/person/TenantPersonResetMfaCommand.cjs +37 -0
  167. package/dist/development/src/commands/tenant/person/TenantPersonResetMfaCommand.cjs.map +1 -0
  168. package/dist/development/src/commands/tenant/person/TenantPersonResetMfaCommand.js +37 -0
  169. package/dist/development/src/commands/tenant/person/TenantPersonResetMfaCommand.js.map +1 -0
  170. package/dist/development/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.cjs +47 -0
  171. package/dist/development/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.cjs.map +1 -0
  172. package/dist/development/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.js +47 -0
  173. package/dist/development/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.js.map +1 -0
  174. package/dist/development/src/commands/tenant/person/TenantPersonSetPasswordCommand.cjs +46 -0
  175. package/dist/development/src/commands/tenant/person/TenantPersonSetPasswordCommand.cjs.map +1 -0
  176. package/dist/development/src/commands/tenant/person/TenantPersonSetPasswordCommand.js +46 -0
  177. package/dist/development/src/commands/tenant/person/TenantPersonSetPasswordCommand.js.map +1 -0
  178. package/dist/development/src/commands/tenant/person/TenantPersonShowCommand.cjs +55 -0
  179. package/dist/development/src/commands/tenant/person/TenantPersonShowCommand.cjs.map +1 -0
  180. package/dist/development/src/commands/tenant/person/TenantPersonShowCommand.js +55 -0
  181. package/dist/development/src/commands/tenant/person/TenantPersonShowCommand.js.map +1 -0
  182. package/dist/development/src/commands/tenant/person/TenantPersonSignOutCommand.cjs +38 -0
  183. package/dist/development/src/commands/tenant/person/TenantPersonSignOutCommand.cjs.map +1 -0
  184. package/dist/development/src/commands/tenant/person/TenantPersonSignOutCommand.js +38 -0
  185. package/dist/development/src/commands/tenant/person/TenantPersonSignOutCommand.js.map +1 -0
  186. package/dist/development/src/commands/tenant/person/TenantPersonUpdateCommand.cjs +36 -0
  187. package/dist/development/src/commands/tenant/person/TenantPersonUpdateCommand.cjs.map +1 -0
  188. package/dist/development/src/commands/tenant/person/TenantPersonUpdateCommand.js +36 -0
  189. package/dist/development/src/commands/tenant/person/TenantPersonUpdateCommand.js.map +1 -0
  190. package/dist/development/src/commands/tenant/person/TenantSessionCreateCommand.cjs +65 -0
  191. package/dist/development/src/commands/tenant/person/TenantSessionCreateCommand.cjs.map +1 -0
  192. package/dist/development/src/commands/tenant/person/TenantSessionCreateCommand.js +65 -0
  193. package/dist/development/src/commands/tenant/person/TenantSessionCreateCommand.js.map +1 -0
  194. package/dist/development/src/commands/tenant/person/personInput.cjs +77 -0
  195. package/dist/development/src/commands/tenant/person/personInput.cjs.map +1 -0
  196. package/dist/development/src/commands/tenant/person/personInput.js +77 -0
  197. package/dist/development/src/commands/tenant/person/personInput.js.map +1 -0
  198. package/dist/development/src/commands/tenant/policy/TenantAuthLogCommand.cjs +96 -0
  199. package/dist/development/src/commands/tenant/policy/TenantAuthLogCommand.cjs.map +1 -0
  200. package/dist/development/src/commands/tenant/policy/TenantAuthLogCommand.js +96 -0
  201. package/dist/development/src/commands/tenant/policy/TenantAuthLogCommand.js.map +1 -0
  202. package/dist/development/src/commands/tenant/policy/TenantMailTemplateAddCommand.cjs +59 -0
  203. package/dist/development/src/commands/tenant/policy/TenantMailTemplateAddCommand.cjs.map +1 -0
  204. package/dist/development/src/commands/tenant/policy/TenantMailTemplateAddCommand.js +59 -0
  205. package/dist/development/src/commands/tenant/policy/TenantMailTemplateAddCommand.js.map +1 -0
  206. package/dist/development/src/commands/tenant/policy/TenantMailTemplateListCommand.cjs +41 -0
  207. package/dist/development/src/commands/tenant/policy/TenantMailTemplateListCommand.cjs.map +1 -0
  208. package/dist/development/src/commands/tenant/policy/TenantMailTemplateListCommand.js +41 -0
  209. package/dist/development/src/commands/tenant/policy/TenantMailTemplateListCommand.js.map +1 -0
  210. package/dist/development/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.cjs +42 -0
  211. package/dist/development/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.cjs.map +1 -0
  212. package/dist/development/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.js +42 -0
  213. package/dist/development/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.js.map +1 -0
  214. package/dist/development/src/commands/tenant/policy/TenantPolicyCreateCommand.cjs +36 -0
  215. package/dist/development/src/commands/tenant/policy/TenantPolicyCreateCommand.cjs.map +1 -0
  216. package/dist/development/src/commands/tenant/policy/TenantPolicyCreateCommand.js +36 -0
  217. package/dist/development/src/commands/tenant/policy/TenantPolicyCreateCommand.js.map +1 -0
  218. package/dist/development/src/commands/tenant/policy/TenantPolicyDeleteCommand.cjs +31 -0
  219. package/dist/development/src/commands/tenant/policy/TenantPolicyDeleteCommand.cjs.map +1 -0
  220. package/dist/development/src/commands/tenant/policy/TenantPolicyDeleteCommand.js +31 -0
  221. package/dist/development/src/commands/tenant/policy/TenantPolicyDeleteCommand.js.map +1 -0
  222. package/dist/development/src/commands/tenant/policy/TenantPolicyListCommand.cjs +33 -0
  223. package/dist/development/src/commands/tenant/policy/TenantPolicyListCommand.cjs.map +1 -0
  224. package/dist/development/src/commands/tenant/policy/TenantPolicyListCommand.js +33 -0
  225. package/dist/development/src/commands/tenant/policy/TenantPolicyListCommand.js.map +1 -0
  226. package/dist/development/src/commands/tenant/policy/TenantPolicyUpdateCommand.cjs +38 -0
  227. package/dist/development/src/commands/tenant/policy/TenantPolicyUpdateCommand.cjs.map +1 -0
  228. package/dist/development/src/commands/tenant/policy/TenantPolicyUpdateCommand.js +38 -0
  229. package/dist/development/src/commands/tenant/policy/TenantPolicyUpdateCommand.js.map +1 -0
  230. package/dist/development/src/commands/tenant/policy/policyInput.cjs +167 -0
  231. package/dist/development/src/commands/tenant/policy/policyInput.cjs.map +1 -0
  232. package/dist/development/src/commands/tenant/policy/policyInput.js +167 -0
  233. package/dist/development/src/commands/tenant/policy/policyInput.js.map +1 -0
  234. package/dist/development/src/commands/tenant/project/TenantConfigShowCommand.cjs +24 -0
  235. package/dist/development/src/commands/tenant/project/TenantConfigShowCommand.cjs.map +1 -0
  236. package/dist/development/src/commands/tenant/project/TenantConfigShowCommand.js +24 -0
  237. package/dist/development/src/commands/tenant/project/TenantConfigShowCommand.js.map +1 -0
  238. package/dist/development/src/commands/tenant/project/TenantIdpListCommand.cjs +22 -0
  239. package/dist/development/src/commands/tenant/project/TenantIdpListCommand.cjs.map +1 -0
  240. package/dist/development/src/commands/tenant/project/TenantIdpListCommand.js +22 -0
  241. package/dist/development/src/commands/tenant/project/TenantIdpListCommand.js.map +1 -0
  242. package/dist/development/src/commands/tenant/project/TenantProjectCreateCommand.cjs +53 -0
  243. package/dist/development/src/commands/tenant/project/TenantProjectCreateCommand.cjs.map +1 -0
  244. package/dist/development/src/commands/tenant/project/TenantProjectCreateCommand.js +53 -0
  245. package/dist/development/src/commands/tenant/project/TenantProjectCreateCommand.js.map +1 -0
  246. package/dist/development/src/commands/tenant/project/TenantProjectListCommand.cjs +22 -0
  247. package/dist/development/src/commands/tenant/project/TenantProjectListCommand.cjs.map +1 -0
  248. package/dist/development/src/commands/tenant/project/TenantProjectListCommand.js +22 -0
  249. package/dist/development/src/commands/tenant/project/TenantProjectListCommand.js.map +1 -0
  250. package/dist/development/src/commands/tenant/project/TenantProjectSecretSetCommand.cjs +50 -0
  251. package/dist/development/src/commands/tenant/project/TenantProjectSecretSetCommand.cjs.map +1 -0
  252. package/dist/development/src/commands/tenant/project/TenantProjectSecretSetCommand.js +50 -0
  253. package/dist/development/src/commands/tenant/project/TenantProjectSecretSetCommand.js.map +1 -0
  254. package/dist/development/src/commands/tenant/project/TenantProjectShowCommand.cjs +23 -0
  255. package/dist/development/src/commands/tenant/project/TenantProjectShowCommand.cjs.map +1 -0
  256. package/dist/development/src/commands/tenant/project/TenantProjectShowCommand.js +23 -0
  257. package/dist/development/src/commands/tenant/project/TenantProjectShowCommand.js.map +1 -0
  258. package/dist/development/src/commands/tenant/project/TenantProjectUpdateCommand.cjs +53 -0
  259. package/dist/development/src/commands/tenant/project/TenantProjectUpdateCommand.cjs.map +1 -0
  260. package/dist/development/src/commands/tenant/project/TenantProjectUpdateCommand.js +53 -0
  261. package/dist/development/src/commands/tenant/project/TenantProjectUpdateCommand.js.map +1 -0
  262. package/dist/development/src/commands/tenant/project/TenantWhoAmICommand.cjs +18 -0
  263. package/dist/development/src/commands/tenant/project/TenantWhoAmICommand.cjs.map +1 -0
  264. package/dist/development/src/commands/tenant/project/TenantWhoAmICommand.js +18 -0
  265. package/dist/development/src/commands/tenant/project/TenantWhoAmICommand.js.map +1 -0
  266. package/dist/development/src/commands/tenant/project/jsonConfigOption.cjs +26 -0
  267. package/dist/development/src/commands/tenant/project/jsonConfigOption.cjs.map +1 -0
  268. package/dist/development/src/commands/tenant/project/jsonConfigOption.js +26 -0
  269. package/dist/development/src/commands/tenant/project/jsonConfigOption.js.map +1 -0
  270. package/dist/development/src/commands/tenant/tenantOutput.cjs +35 -0
  271. package/dist/development/src/commands/tenant/tenantOutput.cjs.map +1 -0
  272. package/dist/development/src/commands/tenant/tenantOutput.js +35 -0
  273. package/dist/development/src/commands/tenant/tenantOutput.js.map +1 -0
  274. package/dist/development/src/commands/transfer/ExportCommand.cjs +35 -20
  275. package/dist/development/src/commands/transfer/ExportCommand.cjs.map +1 -1
  276. package/dist/development/src/commands/transfer/ExportCommand.js +38 -23
  277. package/dist/development/src/commands/transfer/ExportCommand.js.map +1 -1
  278. package/dist/development/src/commands/transfer/ImportCommand.cjs +70 -27
  279. package/dist/development/src/commands/transfer/ImportCommand.cjs.map +1 -1
  280. package/dist/development/src/commands/transfer/ImportCommand.js +72 -29
  281. package/dist/development/src/commands/transfer/ImportCommand.js.map +1 -1
  282. package/dist/development/src/commands/transfer/TransferCommand.cjs +79 -29
  283. package/dist/development/src/commands/transfer/TransferCommand.cjs.map +1 -1
  284. package/dist/development/src/commands/transfer/TransferCommand.js +81 -31
  285. package/dist/development/src/commands/transfer/TransferCommand.js.map +1 -1
  286. package/dist/development/src/commands/transfer/utils.cjs +12 -10
  287. package/dist/development/src/commands/transfer/utils.cjs.map +1 -1
  288. package/dist/development/src/commands/transfer/utils.js +12 -10
  289. package/dist/development/src/commands/transfer/utils.js.map +1 -1
  290. package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.cjs +87 -32
  291. package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.cjs.map +1 -1
  292. package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.js +89 -34
  293. package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +1 -1
  294. package/dist/development/src/consts.cjs +2 -2
  295. package/dist/development/src/consts.cjs.map +1 -1
  296. package/dist/development/src/dic.cjs +200 -45
  297. package/dist/development/src/dic.cjs.map +1 -1
  298. package/dist/development/src/dic.js +201 -46
  299. package/dist/development/src/dic.js.map +1 -1
  300. package/dist/development/src/lib/SystemClientProvider.cjs +55 -2
  301. package/dist/development/src/lib/SystemClientProvider.cjs.map +1 -1
  302. package/dist/development/src/lib/SystemClientProvider.js +55 -2
  303. package/dist/development/src/lib/SystemClientProvider.js.map +1 -1
  304. package/dist/development/src/lib/TenantClientProvider.cjs +28 -5
  305. package/dist/development/src/lib/TenantClientProvider.cjs.map +1 -1
  306. package/dist/development/src/lib/TenantClientProvider.js +28 -5
  307. package/dist/development/src/lib/TenantClientProvider.js.map +1 -1
  308. package/dist/development/src/lib/VersionChecker.cjs +2 -2
  309. package/dist/development/src/lib/VersionChecker.cjs.map +1 -1
  310. package/dist/development/src/lib/VersionChecker.js.map +1 -1
  311. package/dist/development/src/lib/actions/ActionsClient.cjs +18 -6
  312. package/dist/development/src/lib/actions/ActionsClient.cjs.map +1 -1
  313. package/dist/development/src/lib/actions/ActionsClient.js +18 -6
  314. package/dist/development/src/lib/actions/ActionsClient.js.map +1 -1
  315. package/dist/development/src/lib/actions/resolveActionsClient.cjs +13 -0
  316. package/dist/development/src/lib/actions/resolveActionsClient.cjs.map +1 -0
  317. package/dist/development/src/lib/actions/resolveActionsClient.js +13 -0
  318. package/dist/development/src/lib/actions/resolveActionsClient.js.map +1 -0
  319. package/dist/development/src/lib/actions/runActionMutationBatch.cjs +44 -0
  320. package/dist/development/src/lib/actions/runActionMutationBatch.cjs.map +1 -0
  321. package/dist/development/src/lib/actions/runActionMutationBatch.js +44 -0
  322. package/dist/development/src/lib/actions/runActionMutationBatch.js.map +1 -0
  323. package/dist/development/src/lib/admin/AdminClient.cjs +31 -11
  324. package/dist/development/src/lib/admin/AdminClient.cjs.map +1 -1
  325. package/dist/development/src/lib/admin/AdminClient.js +31 -11
  326. package/dist/development/src/lib/admin/AdminClient.js.map +1 -1
  327. package/dist/development/src/lib/admin/AdminDeployer.cjs +5 -3
  328. package/dist/development/src/lib/admin/AdminDeployer.cjs.map +1 -1
  329. package/dist/development/src/lib/admin/AdminDeployer.js +5 -3
  330. package/dist/development/src/lib/admin/AdminDeployer.js.map +1 -1
  331. package/dist/development/src/lib/errors/TransportError.cjs +204 -0
  332. package/dist/development/src/lib/errors/TransportError.cjs.map +1 -0
  333. package/dist/development/src/lib/errors/TransportError.js +204 -0
  334. package/dist/development/src/lib/errors/TransportError.js.map +1 -0
  335. package/dist/development/src/lib/fs/DockerComposeManager.cjs +10 -10
  336. package/dist/development/src/lib/fs/DockerComposeManager.cjs.map +1 -1
  337. package/dist/development/src/lib/fs/DockerComposeManager.js.map +1 -1
  338. package/dist/development/src/lib/fs/YamlHandler.cjs.map +1 -1
  339. package/dist/development/src/lib/fs/YamlHandler.js.map +1 -1
  340. package/dist/development/src/lib/js/EsBuildBuilder.cjs.map +1 -1
  341. package/dist/development/src/lib/js/EsBuildBuilder.js.map +1 -1
  342. package/dist/development/src/lib/js/EvalExecutor.cjs.map +1 -1
  343. package/dist/development/src/lib/js/EvalExecutor.js.map +1 -1
  344. package/dist/development/src/lib/js/JsCodeRunner.cjs.map +1 -1
  345. package/dist/development/src/lib/js/JsCodeRunner.js.map +1 -1
  346. package/dist/development/src/lib/maskToken.cjs +7 -1
  347. package/dist/development/src/lib/maskToken.cjs.map +1 -1
  348. package/dist/development/src/lib/maskToken.js +7 -1
  349. package/dist/development/src/lib/maskToken.js.map +1 -1
  350. package/dist/development/src/lib/migrations/MigrationExecutionFacade.cjs +150 -43
  351. package/dist/development/src/lib/migrations/MigrationExecutionFacade.cjs.map +1 -1
  352. package/dist/development/src/lib/migrations/MigrationExecutionFacade.js +151 -44
  353. package/dist/development/src/lib/migrations/MigrationExecutionFacade.js.map +1 -1
  354. package/dist/development/src/lib/migrations/MigrationPrinter.cjs +80 -64
  355. package/dist/development/src/lib/migrations/MigrationPrinter.cjs.map +1 -1
  356. package/dist/development/src/lib/migrations/MigrationPrinter.js +81 -65
  357. package/dist/development/src/lib/migrations/MigrationPrinter.js.map +1 -1
  358. package/dist/development/src/lib/migrations/MigrationRebaseFacade.cjs +7 -2
  359. package/dist/development/src/lib/migrations/MigrationRebaseFacade.cjs.map +1 -1
  360. package/dist/development/src/lib/migrations/MigrationRebaseFacade.js +7 -2
  361. package/dist/development/src/lib/migrations/MigrationRebaseFacade.js.map +1 -1
  362. package/dist/development/src/lib/migrations/MigrationSnapshotFacade.cjs +175 -0
  363. package/dist/development/src/lib/migrations/MigrationSnapshotFacade.cjs.map +1 -0
  364. package/dist/development/src/lib/migrations/MigrationSnapshotFacade.js +175 -0
  365. package/dist/development/src/lib/migrations/MigrationSnapshotFacade.js.map +1 -0
  366. package/dist/development/src/lib/migrations/MigrationsStatusFacade.cjs +12 -4
  367. package/dist/development/src/lib/migrations/MigrationsStatusFacade.cjs.map +1 -1
  368. package/dist/development/src/lib/migrations/MigrationsStatusFacade.js +12 -4
  369. package/dist/development/src/lib/migrations/MigrationsStatusFacade.js.map +1 -1
  370. package/dist/development/src/lib/migrations/MigrationsValidator.cjs +5 -3
  371. package/dist/development/src/lib/migrations/MigrationsValidator.cjs.map +1 -1
  372. package/dist/development/src/lib/migrations/MigrationsValidator.js +5 -3
  373. package/dist/development/src/lib/migrations/MigrationsValidator.js.map +1 -1
  374. package/dist/development/src/lib/project/RemoteProjectProvider.cjs +5 -1
  375. package/dist/development/src/lib/project/RemoteProjectProvider.cjs.map +1 -1
  376. package/dist/development/src/lib/project/RemoteProjectProvider.js +5 -1
  377. package/dist/development/src/lib/project/RemoteProjectProvider.js.map +1 -1
  378. package/dist/development/src/lib/project/RemoteProjectResolver.cjs.map +1 -1
  379. package/dist/development/src/lib/project/RemoteProjectResolver.js.map +1 -1
  380. package/dist/development/src/lib/project/docs/components/EntityInfo.cjs.map +1 -1
  381. package/dist/development/src/lib/project/docs/components/EntityInfo.js.map +1 -1
  382. package/dist/development/src/lib/project/docs/components/EntityLink.cjs.map +1 -1
  383. package/dist/development/src/lib/project/docs/components/EntityLink.js.map +1 -1
  384. package/dist/development/src/lib/project/docs/components/FieldLink.cjs.map +1 -1
  385. package/dist/development/src/lib/project/docs/components/FieldLink.js.map +1 -1
  386. package/dist/development/src/lib/project/docs/components/FieldPermissions.cjs.map +1 -1
  387. package/dist/development/src/lib/project/docs/components/FieldPermissions.js.map +1 -1
  388. package/dist/development/src/lib/project/docs/components/FieldType.cjs.map +1 -1
  389. package/dist/development/src/lib/project/docs/components/FieldType.js.map +1 -1
  390. package/dist/development/src/lib/project/docs/components/OnDelete.cjs.map +1 -1
  391. package/dist/development/src/lib/project/docs/components/OnDelete.js.map +1 -1
  392. package/dist/development/src/lib/project/docs/components/ProjectInfo.cjs.map +1 -1
  393. package/dist/development/src/lib/project/docs/components/ProjectInfo.js.map +1 -1
  394. package/dist/development/src/lib/project/docs/projectDescribe.cjs.map +1 -1
  395. package/dist/development/src/lib/project/docs/projectDescribe.js.map +1 -1
  396. package/dist/development/src/lib/prompt/prompt.cjs +13 -0
  397. package/dist/development/src/lib/prompt/prompt.cjs.map +1 -0
  398. package/dist/development/src/lib/prompt/prompt.internal.cjs +21 -0
  399. package/dist/development/src/lib/prompt/prompt.internal.cjs.map +1 -0
  400. package/dist/development/src/lib/prompt/prompt.internal.js +21 -0
  401. package/dist/development/src/lib/prompt/prompt.internal.js.map +1 -0
  402. package/dist/development/src/lib/prompt/prompt.js +13 -0
  403. package/dist/development/src/lib/prompt/prompt.js.map +1 -0
  404. package/dist/development/src/lib/schema/SchemaLoader.cjs +5 -5
  405. package/dist/development/src/lib/schema/SchemaLoader.cjs.map +1 -1
  406. package/dist/development/src/lib/schema/SchemaLoader.js.map +1 -1
  407. package/dist/development/src/lib/schema/SchemaValidationHelper.cjs +2 -2
  408. package/dist/development/src/lib/schema/SchemaValidationHelper.cjs.map +1 -1
  409. package/dist/development/src/lib/schema/SchemaValidationHelper.js +2 -2
  410. package/dist/development/src/lib/schema/SchemaValidationHelper.js.map +1 -1
  411. package/dist/development/src/lib/schema/SchemaValidationPrinter.cjs +4 -4
  412. package/dist/development/src/lib/schema/SchemaValidationPrinter.cjs.map +1 -1
  413. package/dist/development/src/lib/schema/SchemaValidationPrinter.js +4 -4
  414. package/dist/development/src/lib/schema/SchemaValidationPrinter.js.map +1 -1
  415. package/dist/development/src/lib/tenant/TenantApiTransport.cjs +160 -0
  416. package/dist/development/src/lib/tenant/TenantApiTransport.cjs.map +1 -0
  417. package/dist/development/src/lib/tenant/TenantApiTransport.js +160 -0
  418. package/dist/development/src/lib/tenant/TenantApiTransport.js.map +1 -0
  419. package/dist/development/src/lib/tenant/TenantConfigApplier.cjs +139 -0
  420. package/dist/development/src/lib/tenant/TenantConfigApplier.cjs.map +1 -0
  421. package/dist/development/src/lib/tenant/TenantConfigApplier.js +139 -0
  422. package/dist/development/src/lib/tenant/TenantConfigApplier.js.map +1 -0
  423. package/dist/development/src/lib/tenant/TenantConfigLoader.cjs +32 -0
  424. package/dist/development/src/lib/tenant/TenantConfigLoader.cjs.map +1 -0
  425. package/dist/development/src/lib/tenant/TenantConfigLoader.js +32 -0
  426. package/dist/development/src/lib/tenant/TenantConfigLoader.js.map +1 -0
  427. package/dist/development/src/lib/tenant/TenantConnectionProvider.cjs +20 -0
  428. package/dist/development/src/lib/tenant/TenantConnectionProvider.cjs.map +1 -0
  429. package/dist/development/src/lib/tenant/TenantConnectionProvider.js +20 -0
  430. package/dist/development/src/lib/tenant/TenantConnectionProvider.js.map +1 -0
  431. package/dist/development/src/lib/tenant/TenantConnectionResolver.cjs +30 -0
  432. package/dist/development/src/lib/tenant/TenantConnectionResolver.cjs.map +1 -0
  433. package/dist/development/src/lib/tenant/TenantConnectionResolver.js +30 -0
  434. package/dist/development/src/lib/tenant/TenantConnectionResolver.js.map +1 -0
  435. package/dist/development/src/lib/tenant/authPolicy.cjs +10 -0
  436. package/dist/development/src/lib/tenant/authPolicy.cjs.map +1 -0
  437. package/dist/development/src/lib/tenant/authPolicy.js +10 -0
  438. package/dist/development/src/lib/tenant/authPolicy.js.map +1 -0
  439. package/dist/development/src/lib/tenant/clients/TenantApiKeyClient.cjs +101 -0
  440. package/dist/development/src/lib/tenant/clients/TenantApiKeyClient.cjs.map +1 -0
  441. package/dist/development/src/lib/tenant/clients/TenantApiKeyClient.js +101 -0
  442. package/dist/development/src/lib/tenant/clients/TenantApiKeyClient.js.map +1 -0
  443. package/dist/development/src/lib/tenant/clients/TenantMemberClient.cjs +96 -0
  444. package/dist/development/src/lib/tenant/clients/TenantMemberClient.cjs.map +1 -0
  445. package/dist/development/src/lib/tenant/clients/TenantMemberClient.js +96 -0
  446. package/dist/development/src/lib/tenant/clients/TenantMemberClient.js.map +1 -0
  447. package/dist/development/src/lib/tenant/clients/TenantPersonClient.cjs +162 -0
  448. package/dist/development/src/lib/tenant/clients/TenantPersonClient.cjs.map +1 -0
  449. package/dist/development/src/lib/tenant/clients/TenantPersonClient.js +162 -0
  450. package/dist/development/src/lib/tenant/clients/TenantPersonClient.js.map +1 -0
  451. package/dist/development/src/lib/tenant/clients/TenantPolicyClient.cjs +135 -0
  452. package/dist/development/src/lib/tenant/clients/TenantPolicyClient.cjs.map +1 -0
  453. package/dist/development/src/lib/tenant/clients/TenantPolicyClient.js +135 -0
  454. package/dist/development/src/lib/tenant/clients/TenantPolicyClient.js.map +1 -0
  455. package/dist/development/src/lib/tenant/clients/TenantProjectClient.cjs +209 -0
  456. package/dist/development/src/lib/tenant/clients/TenantProjectClient.cjs.map +1 -0
  457. package/dist/development/src/lib/tenant/clients/TenantProjectClient.js +209 -0
  458. package/dist/development/src/lib/tenant/clients/TenantProjectClient.js.map +1 -0
  459. package/dist/development/src/lib/tenant/clients/index.cjs +21 -0
  460. package/dist/development/src/lib/tenant/clients/index.cjs.map +1 -0
  461. package/dist/development/src/lib/tenant/clients/index.js +21 -0
  462. package/dist/development/src/lib/tenant/clients/index.js.map +1 -0
  463. package/dist/development/src/lib/tenant/confirmation.cjs +23 -0
  464. package/dist/development/src/lib/tenant/confirmation.cjs.map +1 -0
  465. package/dist/development/src/lib/tenant/confirmation.js +23 -0
  466. package/dist/development/src/lib/tenant/confirmation.js.map +1 -0
  467. package/dist/development/src/lib/tenant/input/pagination.cjs +24 -0
  468. package/dist/development/src/lib/tenant/input/pagination.cjs.map +1 -0
  469. package/dist/development/src/lib/tenant/input/pagination.js +24 -0
  470. package/dist/development/src/lib/tenant/input/pagination.js.map +1 -0
  471. package/dist/development/src/lib/tenant/input/value.cjs +71 -0
  472. package/dist/development/src/lib/tenant/input/value.cjs.map +1 -0
  473. package/dist/development/src/lib/tenant/input/value.js +71 -0
  474. package/dist/development/src/lib/tenant/input/value.js.map +1 -0
  475. package/dist/development/src/lib/tenant/stdin.cjs +13 -0
  476. package/dist/development/src/lib/tenant/stdin.cjs.map +1 -0
  477. package/dist/development/src/lib/tenant/stdin.js +13 -0
  478. package/dist/development/src/lib/tenant/stdin.js.map +1 -0
  479. package/dist/development/src/lib/tenant/tenantConfig.cjs +5 -0
  480. package/dist/development/src/lib/tenant/tenantConfig.cjs.map +1 -0
  481. package/dist/development/src/lib/tenant/tenantConfig.js +5 -0
  482. package/dist/development/src/lib/tenant/tenantConfig.js.map +1 -0
  483. package/dist/development/src/lib/transfer/DataTransferClient.cjs +290 -54
  484. package/dist/development/src/lib/transfer/DataTransferClient.cjs.map +1 -1
  485. package/dist/development/src/lib/transfer/DataTransferClient.js +292 -56
  486. package/dist/development/src/lib/transfer/DataTransferClient.js.map +1 -1
  487. package/dist/development/src/lib/transfer/stdio.cjs +3 -8
  488. package/dist/development/src/lib/transfer/stdio.cjs.map +1 -1
  489. package/dist/development/src/lib/transfer/stdio.js +3 -8
  490. package/dist/development/src/lib/transfer/stdio.js.map +1 -1
  491. package/dist/development/src/lib/workspace/WorkspaceResolver.cjs +6 -6
  492. package/dist/development/src/lib/workspace/WorkspaceResolver.cjs.map +1 -1
  493. package/dist/development/src/lib/workspace/WorkspaceResolver.js.map +1 -1
  494. package/dist/production/index.cjs +5 -0
  495. package/dist/production/index.cjs.map +1 -0
  496. package/dist/production/index.js +5 -0
  497. package/dist/production/index.js.map +1 -0
  498. package/dist/production/run.cjs +14 -6
  499. package/dist/production/run.cjs.map +1 -1
  500. package/dist/production/run.js +12 -4
  501. package/dist/production/run.js.map +1 -1
  502. package/dist/production/src/commands/actions/ActionsGetEventCommand.cjs +30 -15
  503. package/dist/production/src/commands/actions/ActionsGetEventCommand.cjs.map +1 -1
  504. package/dist/production/src/commands/actions/ActionsGetEventCommand.js +31 -16
  505. package/dist/production/src/commands/actions/ActionsGetEventCommand.js.map +1 -1
  506. package/dist/production/src/commands/actions/ActionsListFailedEventsCommand.cjs +21 -41
  507. package/dist/production/src/commands/actions/ActionsListFailedEventsCommand.cjs.map +1 -1
  508. package/dist/production/src/commands/actions/ActionsListFailedEventsCommand.js +22 -42
  509. package/dist/production/src/commands/actions/ActionsListFailedEventsCommand.js.map +1 -1
  510. package/dist/production/src/commands/actions/ActionsListVariablesCommand.cjs +15 -13
  511. package/dist/production/src/commands/actions/ActionsListVariablesCommand.cjs.map +1 -1
  512. package/dist/production/src/commands/actions/ActionsListVariablesCommand.js +15 -13
  513. package/dist/production/src/commands/actions/ActionsListVariablesCommand.js.map +1 -1
  514. package/dist/production/src/commands/actions/ActionsRetryEventCommand.cjs +28 -16
  515. package/dist/production/src/commands/actions/ActionsRetryEventCommand.cjs.map +1 -1
  516. package/dist/production/src/commands/actions/ActionsRetryEventCommand.js +29 -17
  517. package/dist/production/src/commands/actions/ActionsRetryEventCommand.js.map +1 -1
  518. package/dist/production/src/commands/actions/ActionsSetVariablesCommand.cjs +51 -22
  519. package/dist/production/src/commands/actions/ActionsSetVariablesCommand.cjs.map +1 -1
  520. package/dist/production/src/commands/actions/ActionsSetVariablesCommand.js +52 -23
  521. package/dist/production/src/commands/actions/ActionsSetVariablesCommand.js.map +1 -1
  522. package/dist/production/src/commands/actions/ActionsStopEventCommand.cjs +28 -16
  523. package/dist/production/src/commands/actions/ActionsStopEventCommand.cjs.map +1 -1
  524. package/dist/production/src/commands/actions/ActionsStopEventCommand.js +29 -17
  525. package/dist/production/src/commands/actions/ActionsStopEventCommand.js.map +1 -1
  526. package/dist/production/src/commands/deploy/DeployCommand.cjs +58 -29
  527. package/dist/production/src/commands/deploy/DeployCommand.cjs.map +1 -1
  528. package/dist/production/src/commands/deploy/DeployCommand.js +59 -30
  529. package/dist/production/src/commands/deploy/DeployCommand.js.map +1 -1
  530. package/dist/production/src/commands/migrations/MigrationAmendCommand.cjs +88 -26
  531. package/dist/production/src/commands/migrations/MigrationAmendCommand.cjs.map +1 -1
  532. package/dist/production/src/commands/migrations/MigrationAmendCommand.js +89 -27
  533. package/dist/production/src/commands/migrations/MigrationAmendCommand.js.map +1 -1
  534. package/dist/production/src/commands/migrations/MigrationBlankCommand.cjs +2 -2
  535. package/dist/production/src/commands/migrations/MigrationBlankCommand.cjs.map +1 -1
  536. package/dist/production/src/commands/migrations/MigrationBlankCommand.js +2 -2
  537. package/dist/production/src/commands/migrations/MigrationBlankCommand.js.map +1 -1
  538. package/dist/production/src/commands/migrations/MigrationDescribeCommand.cjs +7 -3
  539. package/dist/production/src/commands/migrations/MigrationDescribeCommand.cjs.map +1 -1
  540. package/dist/production/src/commands/migrations/MigrationDescribeCommand.js +8 -4
  541. package/dist/production/src/commands/migrations/MigrationDescribeCommand.js.map +1 -1
  542. package/dist/production/src/commands/migrations/MigrationDiffCommand.cjs +103 -19
  543. package/dist/production/src/commands/migrations/MigrationDiffCommand.cjs.map +1 -1
  544. package/dist/production/src/commands/migrations/MigrationDiffCommand.js +104 -20
  545. package/dist/production/src/commands/migrations/MigrationDiffCommand.js.map +1 -1
  546. package/dist/production/src/commands/migrations/MigrationExecuteCommand.cjs +10 -3
  547. package/dist/production/src/commands/migrations/MigrationExecuteCommand.cjs.map +1 -1
  548. package/dist/production/src/commands/migrations/MigrationExecuteCommand.js +10 -3
  549. package/dist/production/src/commands/migrations/MigrationExecuteCommand.js.map +1 -1
  550. package/dist/production/src/commands/migrations/MigrationInitStateCommand.cjs +33 -0
  551. package/dist/production/src/commands/migrations/MigrationInitStateCommand.cjs.map +1 -0
  552. package/dist/production/src/commands/migrations/MigrationInitStateCommand.js +33 -0
  553. package/dist/production/src/commands/migrations/MigrationInitStateCommand.js.map +1 -0
  554. package/dist/production/src/commands/migrations/MigrationRebaseCommand.cjs +24 -4
  555. package/dist/production/src/commands/migrations/MigrationRebaseCommand.cjs.map +1 -1
  556. package/dist/production/src/commands/migrations/MigrationRebaseCommand.js +25 -5
  557. package/dist/production/src/commands/migrations/MigrationRebaseCommand.js.map +1 -1
  558. package/dist/production/src/commands/migrations/MigrationSnapshotCommand.cjs +59 -0
  559. package/dist/production/src/commands/migrations/MigrationSnapshotCommand.cjs.map +1 -0
  560. package/dist/production/src/commands/migrations/MigrationSnapshotCommand.js +59 -0
  561. package/dist/production/src/commands/migrations/MigrationSnapshotCommand.js.map +1 -0
  562. package/dist/production/src/commands/migrations/MigrationStatusCommand.cjs +5 -5
  563. package/dist/production/src/commands/migrations/MigrationStatusCommand.cjs.map +1 -1
  564. package/dist/production/src/commands/migrations/MigrationStatusCommand.js +5 -5
  565. package/dist/production/src/commands/migrations/MigrationStatusCommand.js.map +1 -1
  566. package/dist/production/src/commands/migrations/MigrationVerifySnapshotCommand.cjs +22 -0
  567. package/dist/production/src/commands/migrations/MigrationVerifySnapshotCommand.cjs.map +1 -0
  568. package/dist/production/src/commands/migrations/MigrationVerifySnapshotCommand.js +22 -0
  569. package/dist/production/src/commands/migrations/MigrationVerifySnapshotCommand.js.map +1 -0
  570. package/dist/production/src/commands/misc/CommandsCommand.cjs +58 -0
  571. package/dist/production/src/commands/misc/CommandsCommand.cjs.map +1 -0
  572. package/dist/production/src/commands/misc/CommandsCommand.js +58 -0
  573. package/dist/production/src/commands/misc/CommandsCommand.js.map +1 -0
  574. package/dist/production/src/commands/misc/VersionCommand.cjs +2 -3
  575. package/dist/production/src/commands/misc/VersionCommand.cjs.map +1 -1
  576. package/dist/production/src/commands/misc/VersionCommand.js +2 -3
  577. package/dist/production/src/commands/misc/VersionCommand.js.map +1 -1
  578. package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.cjs +13 -13
  579. package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.cjs.map +1 -1
  580. package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.js +13 -13
  581. package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.js.map +1 -1
  582. package/dist/production/src/commands/project/ProjectPrintSchemaCommand.cjs +17 -15
  583. package/dist/production/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -1
  584. package/dist/production/src/commands/project/ProjectPrintSchemaCommand.js +18 -16
  585. package/dist/production/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -1
  586. package/dist/production/src/commands/project/ProjectValidateCommand.cjs +40 -12
  587. package/dist/production/src/commands/project/ProjectValidateCommand.cjs.map +1 -1
  588. package/dist/production/src/commands/project/ProjectValidateCommand.js +42 -14
  589. package/dist/production/src/commands/project/ProjectValidateCommand.js.map +1 -1
  590. package/dist/production/src/commands/tenant/TenantApplyCommand.cjs +59 -0
  591. package/dist/production/src/commands/tenant/TenantApplyCommand.cjs.map +1 -0
  592. package/dist/production/src/commands/tenant/TenantApplyCommand.js +59 -0
  593. package/dist/production/src/commands/tenant/TenantApplyCommand.js.map +1 -0
  594. package/dist/production/src/commands/tenant/apikey/TenantApiKeyCreateCommand.cjs +68 -0
  595. package/dist/production/src/commands/tenant/apikey/TenantApiKeyCreateCommand.cjs.map +1 -0
  596. package/dist/production/src/commands/tenant/apikey/TenantApiKeyCreateCommand.js +68 -0
  597. package/dist/production/src/commands/tenant/apikey/TenantApiKeyCreateCommand.js.map +1 -0
  598. package/dist/production/src/commands/tenant/apikey/TenantApiKeyDisableCommand.cjs +31 -0
  599. package/dist/production/src/commands/tenant/apikey/TenantApiKeyDisableCommand.cjs.map +1 -0
  600. package/dist/production/src/commands/tenant/apikey/TenantApiKeyDisableCommand.js +31 -0
  601. package/dist/production/src/commands/tenant/apikey/TenantApiKeyDisableCommand.js.map +1 -0
  602. package/dist/production/src/commands/tenant/apikey/TenantApiKeyListCommand.cjs +55 -0
  603. package/dist/production/src/commands/tenant/apikey/TenantApiKeyListCommand.cjs.map +1 -0
  604. package/dist/production/src/commands/tenant/apikey/TenantApiKeyListCommand.js +55 -0
  605. package/dist/production/src/commands/tenant/apikey/TenantApiKeyListCommand.js.map +1 -0
  606. package/dist/production/src/commands/tenant/member/TenantMemberAddCommand.cjs +36 -0
  607. package/dist/production/src/commands/tenant/member/TenantMemberAddCommand.cjs.map +1 -0
  608. package/dist/production/src/commands/tenant/member/TenantMemberAddCommand.js +36 -0
  609. package/dist/production/src/commands/tenant/member/TenantMemberAddCommand.js.map +1 -0
  610. package/dist/production/src/commands/tenant/member/TenantMemberInviteCommand.cjs +62 -0
  611. package/dist/production/src/commands/tenant/member/TenantMemberInviteCommand.cjs.map +1 -0
  612. package/dist/production/src/commands/tenant/member/TenantMemberInviteCommand.js +62 -0
  613. package/dist/production/src/commands/tenant/member/TenantMemberInviteCommand.js.map +1 -0
  614. package/dist/production/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.cjs +102 -0
  615. package/dist/production/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.cjs.map +1 -0
  616. package/dist/production/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.js +102 -0
  617. package/dist/production/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.js.map +1 -0
  618. package/dist/production/src/commands/tenant/member/TenantMemberListCommand.cjs +73 -0
  619. package/dist/production/src/commands/tenant/member/TenantMemberListCommand.cjs.map +1 -0
  620. package/dist/production/src/commands/tenant/member/TenantMemberListCommand.js +73 -0
  621. package/dist/production/src/commands/tenant/member/TenantMemberListCommand.js.map +1 -0
  622. package/dist/production/src/commands/tenant/member/TenantMemberRemoveCommand.cjs +35 -0
  623. package/dist/production/src/commands/tenant/member/TenantMemberRemoveCommand.cjs.map +1 -0
  624. package/dist/production/src/commands/tenant/member/TenantMemberRemoveCommand.js +35 -0
  625. package/dist/production/src/commands/tenant/member/TenantMemberRemoveCommand.js.map +1 -0
  626. package/dist/production/src/commands/tenant/member/TenantMemberUpdateCommand.cjs +45 -0
  627. package/dist/production/src/commands/tenant/member/TenantMemberUpdateCommand.cjs.map +1 -0
  628. package/dist/production/src/commands/tenant/member/TenantMemberUpdateCommand.js +45 -0
  629. package/dist/production/src/commands/tenant/member/TenantMemberUpdateCommand.js.map +1 -0
  630. package/dist/production/src/commands/tenant/member/memberOptions.cjs +16 -0
  631. package/dist/production/src/commands/tenant/member/memberOptions.cjs.map +1 -0
  632. package/dist/production/src/commands/tenant/member/memberOptions.js +16 -0
  633. package/dist/production/src/commands/tenant/member/memberOptions.js.map +1 -0
  634. package/dist/production/src/commands/tenant/member/membershipInput.cjs +109 -0
  635. package/dist/production/src/commands/tenant/member/membershipInput.cjs.map +1 -0
  636. package/dist/production/src/commands/tenant/member/membershipInput.js +109 -0
  637. package/dist/production/src/commands/tenant/member/membershipInput.js.map +1 -0
  638. package/dist/production/src/commands/tenant/person/TenantIdentityRoleAddCommand.cjs +27 -0
  639. package/dist/production/src/commands/tenant/person/TenantIdentityRoleAddCommand.cjs.map +1 -0
  640. package/dist/production/src/commands/tenant/person/TenantIdentityRoleAddCommand.js +27 -0
  641. package/dist/production/src/commands/tenant/person/TenantIdentityRoleAddCommand.js.map +1 -0
  642. package/dist/production/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.cjs +34 -0
  643. package/dist/production/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.cjs.map +1 -0
  644. package/dist/production/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.js +34 -0
  645. package/dist/production/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.js.map +1 -0
  646. package/dist/production/src/commands/tenant/person/TenantPersonCreateCommand.cjs +79 -0
  647. package/dist/production/src/commands/tenant/person/TenantPersonCreateCommand.cjs.map +1 -0
  648. package/dist/production/src/commands/tenant/person/TenantPersonCreateCommand.js +79 -0
  649. package/dist/production/src/commands/tenant/person/TenantPersonCreateCommand.js.map +1 -0
  650. package/dist/production/src/commands/tenant/person/TenantPersonDisableCommand.cjs +29 -0
  651. package/dist/production/src/commands/tenant/person/TenantPersonDisableCommand.cjs.map +1 -0
  652. package/dist/production/src/commands/tenant/person/TenantPersonDisableCommand.js +29 -0
  653. package/dist/production/src/commands/tenant/person/TenantPersonDisableCommand.js.map +1 -0
  654. package/dist/production/src/commands/tenant/person/TenantPersonListCommand.cjs +53 -0
  655. package/dist/production/src/commands/tenant/person/TenantPersonListCommand.cjs.map +1 -0
  656. package/dist/production/src/commands/tenant/person/TenantPersonListCommand.js +53 -0
  657. package/dist/production/src/commands/tenant/person/TenantPersonListCommand.js.map +1 -0
  658. package/dist/production/src/commands/tenant/person/TenantPersonResetMfaCommand.cjs +37 -0
  659. package/dist/production/src/commands/tenant/person/TenantPersonResetMfaCommand.cjs.map +1 -0
  660. package/dist/production/src/commands/tenant/person/TenantPersonResetMfaCommand.js +37 -0
  661. package/dist/production/src/commands/tenant/person/TenantPersonResetMfaCommand.js.map +1 -0
  662. package/dist/production/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.cjs +47 -0
  663. package/dist/production/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.cjs.map +1 -0
  664. package/dist/production/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.js +47 -0
  665. package/dist/production/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.js.map +1 -0
  666. package/dist/production/src/commands/tenant/person/TenantPersonSetPasswordCommand.cjs +46 -0
  667. package/dist/production/src/commands/tenant/person/TenantPersonSetPasswordCommand.cjs.map +1 -0
  668. package/dist/production/src/commands/tenant/person/TenantPersonSetPasswordCommand.js +46 -0
  669. package/dist/production/src/commands/tenant/person/TenantPersonSetPasswordCommand.js.map +1 -0
  670. package/dist/production/src/commands/tenant/person/TenantPersonShowCommand.cjs +55 -0
  671. package/dist/production/src/commands/tenant/person/TenantPersonShowCommand.cjs.map +1 -0
  672. package/dist/production/src/commands/tenant/person/TenantPersonShowCommand.js +55 -0
  673. package/dist/production/src/commands/tenant/person/TenantPersonShowCommand.js.map +1 -0
  674. package/dist/production/src/commands/tenant/person/TenantPersonSignOutCommand.cjs +38 -0
  675. package/dist/production/src/commands/tenant/person/TenantPersonSignOutCommand.cjs.map +1 -0
  676. package/dist/production/src/commands/tenant/person/TenantPersonSignOutCommand.js +38 -0
  677. package/dist/production/src/commands/tenant/person/TenantPersonSignOutCommand.js.map +1 -0
  678. package/dist/production/src/commands/tenant/person/TenantPersonUpdateCommand.cjs +36 -0
  679. package/dist/production/src/commands/tenant/person/TenantPersonUpdateCommand.cjs.map +1 -0
  680. package/dist/production/src/commands/tenant/person/TenantPersonUpdateCommand.js +36 -0
  681. package/dist/production/src/commands/tenant/person/TenantPersonUpdateCommand.js.map +1 -0
  682. package/dist/production/src/commands/tenant/person/TenantSessionCreateCommand.cjs +65 -0
  683. package/dist/production/src/commands/tenant/person/TenantSessionCreateCommand.cjs.map +1 -0
  684. package/dist/production/src/commands/tenant/person/TenantSessionCreateCommand.js +65 -0
  685. package/dist/production/src/commands/tenant/person/TenantSessionCreateCommand.js.map +1 -0
  686. package/dist/production/src/commands/tenant/person/personInput.cjs +77 -0
  687. package/dist/production/src/commands/tenant/person/personInput.cjs.map +1 -0
  688. package/dist/production/src/commands/tenant/person/personInput.js +77 -0
  689. package/dist/production/src/commands/tenant/person/personInput.js.map +1 -0
  690. package/dist/production/src/commands/tenant/policy/TenantAuthLogCommand.cjs +96 -0
  691. package/dist/production/src/commands/tenant/policy/TenantAuthLogCommand.cjs.map +1 -0
  692. package/dist/production/src/commands/tenant/policy/TenantAuthLogCommand.js +96 -0
  693. package/dist/production/src/commands/tenant/policy/TenantAuthLogCommand.js.map +1 -0
  694. package/dist/production/src/commands/tenant/policy/TenantMailTemplateAddCommand.cjs +59 -0
  695. package/dist/production/src/commands/tenant/policy/TenantMailTemplateAddCommand.cjs.map +1 -0
  696. package/dist/production/src/commands/tenant/policy/TenantMailTemplateAddCommand.js +59 -0
  697. package/dist/production/src/commands/tenant/policy/TenantMailTemplateAddCommand.js.map +1 -0
  698. package/dist/production/src/commands/tenant/policy/TenantMailTemplateListCommand.cjs +41 -0
  699. package/dist/production/src/commands/tenant/policy/TenantMailTemplateListCommand.cjs.map +1 -0
  700. package/dist/production/src/commands/tenant/policy/TenantMailTemplateListCommand.js +41 -0
  701. package/dist/production/src/commands/tenant/policy/TenantMailTemplateListCommand.js.map +1 -0
  702. package/dist/production/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.cjs +42 -0
  703. package/dist/production/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.cjs.map +1 -0
  704. package/dist/production/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.js +42 -0
  705. package/dist/production/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.js.map +1 -0
  706. package/dist/production/src/commands/tenant/policy/TenantPolicyCreateCommand.cjs +36 -0
  707. package/dist/production/src/commands/tenant/policy/TenantPolicyCreateCommand.cjs.map +1 -0
  708. package/dist/production/src/commands/tenant/policy/TenantPolicyCreateCommand.js +36 -0
  709. package/dist/production/src/commands/tenant/policy/TenantPolicyCreateCommand.js.map +1 -0
  710. package/dist/production/src/commands/tenant/policy/TenantPolicyDeleteCommand.cjs +31 -0
  711. package/dist/production/src/commands/tenant/policy/TenantPolicyDeleteCommand.cjs.map +1 -0
  712. package/dist/production/src/commands/tenant/policy/TenantPolicyDeleteCommand.js +31 -0
  713. package/dist/production/src/commands/tenant/policy/TenantPolicyDeleteCommand.js.map +1 -0
  714. package/dist/production/src/commands/tenant/policy/TenantPolicyListCommand.cjs +33 -0
  715. package/dist/production/src/commands/tenant/policy/TenantPolicyListCommand.cjs.map +1 -0
  716. package/dist/production/src/commands/tenant/policy/TenantPolicyListCommand.js +33 -0
  717. package/dist/production/src/commands/tenant/policy/TenantPolicyListCommand.js.map +1 -0
  718. package/dist/production/src/commands/tenant/policy/TenantPolicyUpdateCommand.cjs +38 -0
  719. package/dist/production/src/commands/tenant/policy/TenantPolicyUpdateCommand.cjs.map +1 -0
  720. package/dist/production/src/commands/tenant/policy/TenantPolicyUpdateCommand.js +38 -0
  721. package/dist/production/src/commands/tenant/policy/TenantPolicyUpdateCommand.js.map +1 -0
  722. package/dist/production/src/commands/tenant/policy/policyInput.cjs +167 -0
  723. package/dist/production/src/commands/tenant/policy/policyInput.cjs.map +1 -0
  724. package/dist/production/src/commands/tenant/policy/policyInput.js +167 -0
  725. package/dist/production/src/commands/tenant/policy/policyInput.js.map +1 -0
  726. package/dist/production/src/commands/tenant/project/TenantConfigShowCommand.cjs +24 -0
  727. package/dist/production/src/commands/tenant/project/TenantConfigShowCommand.cjs.map +1 -0
  728. package/dist/production/src/commands/tenant/project/TenantConfigShowCommand.js +24 -0
  729. package/dist/production/src/commands/tenant/project/TenantConfigShowCommand.js.map +1 -0
  730. package/dist/production/src/commands/tenant/project/TenantIdpListCommand.cjs +22 -0
  731. package/dist/production/src/commands/tenant/project/TenantIdpListCommand.cjs.map +1 -0
  732. package/dist/production/src/commands/tenant/project/TenantIdpListCommand.js +22 -0
  733. package/dist/production/src/commands/tenant/project/TenantIdpListCommand.js.map +1 -0
  734. package/dist/production/src/commands/tenant/project/TenantProjectCreateCommand.cjs +53 -0
  735. package/dist/production/src/commands/tenant/project/TenantProjectCreateCommand.cjs.map +1 -0
  736. package/dist/production/src/commands/tenant/project/TenantProjectCreateCommand.js +53 -0
  737. package/dist/production/src/commands/tenant/project/TenantProjectCreateCommand.js.map +1 -0
  738. package/dist/production/src/commands/tenant/project/TenantProjectListCommand.cjs +22 -0
  739. package/dist/production/src/commands/tenant/project/TenantProjectListCommand.cjs.map +1 -0
  740. package/dist/production/src/commands/tenant/project/TenantProjectListCommand.js +22 -0
  741. package/dist/production/src/commands/tenant/project/TenantProjectListCommand.js.map +1 -0
  742. package/dist/production/src/commands/tenant/project/TenantProjectSecretSetCommand.cjs +50 -0
  743. package/dist/production/src/commands/tenant/project/TenantProjectSecretSetCommand.cjs.map +1 -0
  744. package/dist/production/src/commands/tenant/project/TenantProjectSecretSetCommand.js +50 -0
  745. package/dist/production/src/commands/tenant/project/TenantProjectSecretSetCommand.js.map +1 -0
  746. package/dist/production/src/commands/tenant/project/TenantProjectShowCommand.cjs +23 -0
  747. package/dist/production/src/commands/tenant/project/TenantProjectShowCommand.cjs.map +1 -0
  748. package/dist/production/src/commands/tenant/project/TenantProjectShowCommand.js +23 -0
  749. package/dist/production/src/commands/tenant/project/TenantProjectShowCommand.js.map +1 -0
  750. package/dist/production/src/commands/tenant/project/TenantProjectUpdateCommand.cjs +53 -0
  751. package/dist/production/src/commands/tenant/project/TenantProjectUpdateCommand.cjs.map +1 -0
  752. package/dist/production/src/commands/tenant/project/TenantProjectUpdateCommand.js +53 -0
  753. package/dist/production/src/commands/tenant/project/TenantProjectUpdateCommand.js.map +1 -0
  754. package/dist/production/src/commands/tenant/project/TenantWhoAmICommand.cjs +18 -0
  755. package/dist/production/src/commands/tenant/project/TenantWhoAmICommand.cjs.map +1 -0
  756. package/dist/production/src/commands/tenant/project/TenantWhoAmICommand.js +18 -0
  757. package/dist/production/src/commands/tenant/project/TenantWhoAmICommand.js.map +1 -0
  758. package/dist/production/src/commands/tenant/project/jsonConfigOption.cjs +26 -0
  759. package/dist/production/src/commands/tenant/project/jsonConfigOption.cjs.map +1 -0
  760. package/dist/production/src/commands/tenant/project/jsonConfigOption.js +26 -0
  761. package/dist/production/src/commands/tenant/project/jsonConfigOption.js.map +1 -0
  762. package/dist/production/src/commands/tenant/tenantOutput.cjs +35 -0
  763. package/dist/production/src/commands/tenant/tenantOutput.cjs.map +1 -0
  764. package/dist/production/src/commands/tenant/tenantOutput.js +35 -0
  765. package/dist/production/src/commands/tenant/tenantOutput.js.map +1 -0
  766. package/dist/production/src/commands/transfer/ExportCommand.cjs +35 -20
  767. package/dist/production/src/commands/transfer/ExportCommand.cjs.map +1 -1
  768. package/dist/production/src/commands/transfer/ExportCommand.js +38 -23
  769. package/dist/production/src/commands/transfer/ExportCommand.js.map +1 -1
  770. package/dist/production/src/commands/transfer/ImportCommand.cjs +70 -27
  771. package/dist/production/src/commands/transfer/ImportCommand.cjs.map +1 -1
  772. package/dist/production/src/commands/transfer/ImportCommand.js +72 -29
  773. package/dist/production/src/commands/transfer/ImportCommand.js.map +1 -1
  774. package/dist/production/src/commands/transfer/TransferCommand.cjs +79 -29
  775. package/dist/production/src/commands/transfer/TransferCommand.cjs.map +1 -1
  776. package/dist/production/src/commands/transfer/TransferCommand.js +81 -31
  777. package/dist/production/src/commands/transfer/TransferCommand.js.map +1 -1
  778. package/dist/production/src/commands/transfer/utils.cjs +12 -10
  779. package/dist/production/src/commands/transfer/utils.cjs.map +1 -1
  780. package/dist/production/src/commands/transfer/utils.js +12 -10
  781. package/dist/production/src/commands/transfer/utils.js.map +1 -1
  782. package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.cjs +87 -32
  783. package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.cjs.map +1 -1
  784. package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.js +89 -34
  785. package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +1 -1
  786. package/dist/production/src/consts.cjs +2 -2
  787. package/dist/production/src/consts.cjs.map +1 -1
  788. package/dist/production/src/dic.cjs +200 -45
  789. package/dist/production/src/dic.cjs.map +1 -1
  790. package/dist/production/src/dic.js +201 -46
  791. package/dist/production/src/dic.js.map +1 -1
  792. package/dist/production/src/lib/SystemClientProvider.cjs +55 -2
  793. package/dist/production/src/lib/SystemClientProvider.cjs.map +1 -1
  794. package/dist/production/src/lib/SystemClientProvider.js +55 -2
  795. package/dist/production/src/lib/SystemClientProvider.js.map +1 -1
  796. package/dist/production/src/lib/TenantClientProvider.cjs +28 -5
  797. package/dist/production/src/lib/TenantClientProvider.cjs.map +1 -1
  798. package/dist/production/src/lib/TenantClientProvider.js +28 -5
  799. package/dist/production/src/lib/TenantClientProvider.js.map +1 -1
  800. package/dist/production/src/lib/VersionChecker.cjs +2 -2
  801. package/dist/production/src/lib/VersionChecker.cjs.map +1 -1
  802. package/dist/production/src/lib/VersionChecker.js.map +1 -1
  803. package/dist/production/src/lib/actions/ActionsClient.cjs +18 -6
  804. package/dist/production/src/lib/actions/ActionsClient.cjs.map +1 -1
  805. package/dist/production/src/lib/actions/ActionsClient.js +18 -6
  806. package/dist/production/src/lib/actions/ActionsClient.js.map +1 -1
  807. package/dist/production/src/lib/actions/resolveActionsClient.cjs +13 -0
  808. package/dist/production/src/lib/actions/resolveActionsClient.cjs.map +1 -0
  809. package/dist/production/src/lib/actions/resolveActionsClient.js +13 -0
  810. package/dist/production/src/lib/actions/resolveActionsClient.js.map +1 -0
  811. package/dist/production/src/lib/actions/runActionMutationBatch.cjs +44 -0
  812. package/dist/production/src/lib/actions/runActionMutationBatch.cjs.map +1 -0
  813. package/dist/production/src/lib/actions/runActionMutationBatch.js +44 -0
  814. package/dist/production/src/lib/actions/runActionMutationBatch.js.map +1 -0
  815. package/dist/production/src/lib/admin/AdminClient.cjs +31 -11
  816. package/dist/production/src/lib/admin/AdminClient.cjs.map +1 -1
  817. package/dist/production/src/lib/admin/AdminClient.js +31 -11
  818. package/dist/production/src/lib/admin/AdminClient.js.map +1 -1
  819. package/dist/production/src/lib/admin/AdminDeployer.cjs +5 -3
  820. package/dist/production/src/lib/admin/AdminDeployer.cjs.map +1 -1
  821. package/dist/production/src/lib/admin/AdminDeployer.js +5 -3
  822. package/dist/production/src/lib/admin/AdminDeployer.js.map +1 -1
  823. package/dist/production/src/lib/errors/TransportError.cjs +204 -0
  824. package/dist/production/src/lib/errors/TransportError.cjs.map +1 -0
  825. package/dist/production/src/lib/errors/TransportError.js +204 -0
  826. package/dist/production/src/lib/errors/TransportError.js.map +1 -0
  827. package/dist/production/src/lib/fs/DockerComposeManager.cjs +10 -10
  828. package/dist/production/src/lib/fs/DockerComposeManager.cjs.map +1 -1
  829. package/dist/production/src/lib/fs/DockerComposeManager.js.map +1 -1
  830. package/dist/production/src/lib/fs/YamlHandler.cjs.map +1 -1
  831. package/dist/production/src/lib/fs/YamlHandler.js.map +1 -1
  832. package/dist/production/src/lib/js/EsBuildBuilder.cjs.map +1 -1
  833. package/dist/production/src/lib/js/EsBuildBuilder.js.map +1 -1
  834. package/dist/production/src/lib/js/EvalExecutor.cjs.map +1 -1
  835. package/dist/production/src/lib/js/EvalExecutor.js.map +1 -1
  836. package/dist/production/src/lib/js/JsCodeRunner.cjs.map +1 -1
  837. package/dist/production/src/lib/js/JsCodeRunner.js.map +1 -1
  838. package/dist/production/src/lib/maskToken.cjs +7 -1
  839. package/dist/production/src/lib/maskToken.cjs.map +1 -1
  840. package/dist/production/src/lib/maskToken.js +7 -1
  841. package/dist/production/src/lib/maskToken.js.map +1 -1
  842. package/dist/production/src/lib/migrations/MigrationExecutionFacade.cjs +150 -43
  843. package/dist/production/src/lib/migrations/MigrationExecutionFacade.cjs.map +1 -1
  844. package/dist/production/src/lib/migrations/MigrationExecutionFacade.js +151 -44
  845. package/dist/production/src/lib/migrations/MigrationExecutionFacade.js.map +1 -1
  846. package/dist/production/src/lib/migrations/MigrationPrinter.cjs +80 -64
  847. package/dist/production/src/lib/migrations/MigrationPrinter.cjs.map +1 -1
  848. package/dist/production/src/lib/migrations/MigrationPrinter.js +81 -65
  849. package/dist/production/src/lib/migrations/MigrationPrinter.js.map +1 -1
  850. package/dist/production/src/lib/migrations/MigrationRebaseFacade.cjs +7 -2
  851. package/dist/production/src/lib/migrations/MigrationRebaseFacade.cjs.map +1 -1
  852. package/dist/production/src/lib/migrations/MigrationRebaseFacade.js +7 -2
  853. package/dist/production/src/lib/migrations/MigrationRebaseFacade.js.map +1 -1
  854. package/dist/production/src/lib/migrations/MigrationSnapshotFacade.cjs +175 -0
  855. package/dist/production/src/lib/migrations/MigrationSnapshotFacade.cjs.map +1 -0
  856. package/dist/production/src/lib/migrations/MigrationSnapshotFacade.js +175 -0
  857. package/dist/production/src/lib/migrations/MigrationSnapshotFacade.js.map +1 -0
  858. package/dist/production/src/lib/migrations/MigrationsStatusFacade.cjs +12 -4
  859. package/dist/production/src/lib/migrations/MigrationsStatusFacade.cjs.map +1 -1
  860. package/dist/production/src/lib/migrations/MigrationsStatusFacade.js +12 -4
  861. package/dist/production/src/lib/migrations/MigrationsStatusFacade.js.map +1 -1
  862. package/dist/production/src/lib/migrations/MigrationsValidator.cjs +5 -3
  863. package/dist/production/src/lib/migrations/MigrationsValidator.cjs.map +1 -1
  864. package/dist/production/src/lib/migrations/MigrationsValidator.js +5 -3
  865. package/dist/production/src/lib/migrations/MigrationsValidator.js.map +1 -1
  866. package/dist/production/src/lib/project/RemoteProjectProvider.cjs +5 -1
  867. package/dist/production/src/lib/project/RemoteProjectProvider.cjs.map +1 -1
  868. package/dist/production/src/lib/project/RemoteProjectProvider.js +5 -1
  869. package/dist/production/src/lib/project/RemoteProjectProvider.js.map +1 -1
  870. package/dist/production/src/lib/project/RemoteProjectResolver.cjs.map +1 -1
  871. package/dist/production/src/lib/project/RemoteProjectResolver.js.map +1 -1
  872. package/dist/production/src/lib/project/docs/components/EntityInfo.cjs.map +1 -1
  873. package/dist/production/src/lib/project/docs/components/EntityInfo.js.map +1 -1
  874. package/dist/production/src/lib/project/docs/components/EntityLink.cjs.map +1 -1
  875. package/dist/production/src/lib/project/docs/components/EntityLink.js.map +1 -1
  876. package/dist/production/src/lib/project/docs/components/FieldLink.cjs.map +1 -1
  877. package/dist/production/src/lib/project/docs/components/FieldLink.js.map +1 -1
  878. package/dist/production/src/lib/project/docs/components/FieldPermissions.cjs.map +1 -1
  879. package/dist/production/src/lib/project/docs/components/FieldPermissions.js.map +1 -1
  880. package/dist/production/src/lib/project/docs/components/FieldType.cjs.map +1 -1
  881. package/dist/production/src/lib/project/docs/components/FieldType.js.map +1 -1
  882. package/dist/production/src/lib/project/docs/components/OnDelete.cjs.map +1 -1
  883. package/dist/production/src/lib/project/docs/components/OnDelete.js.map +1 -1
  884. package/dist/production/src/lib/project/docs/components/ProjectInfo.cjs.map +1 -1
  885. package/dist/production/src/lib/project/docs/components/ProjectInfo.js.map +1 -1
  886. package/dist/production/src/lib/project/docs/projectDescribe.cjs.map +1 -1
  887. package/dist/production/src/lib/project/docs/projectDescribe.js.map +1 -1
  888. package/dist/production/src/lib/prompt/prompt.cjs +13 -0
  889. package/dist/production/src/lib/prompt/prompt.cjs.map +1 -0
  890. package/dist/production/src/lib/prompt/prompt.internal.cjs +21 -0
  891. package/dist/production/src/lib/prompt/prompt.internal.cjs.map +1 -0
  892. package/dist/production/src/lib/prompt/prompt.internal.js +21 -0
  893. package/dist/production/src/lib/prompt/prompt.internal.js.map +1 -0
  894. package/dist/production/src/lib/prompt/prompt.js +13 -0
  895. package/dist/production/src/lib/prompt/prompt.js.map +1 -0
  896. package/dist/production/src/lib/schema/SchemaLoader.cjs +5 -5
  897. package/dist/production/src/lib/schema/SchemaLoader.cjs.map +1 -1
  898. package/dist/production/src/lib/schema/SchemaLoader.js.map +1 -1
  899. package/dist/production/src/lib/schema/SchemaValidationHelper.cjs +2 -2
  900. package/dist/production/src/lib/schema/SchemaValidationHelper.cjs.map +1 -1
  901. package/dist/production/src/lib/schema/SchemaValidationHelper.js +2 -2
  902. package/dist/production/src/lib/schema/SchemaValidationHelper.js.map +1 -1
  903. package/dist/production/src/lib/schema/SchemaValidationPrinter.cjs +4 -4
  904. package/dist/production/src/lib/schema/SchemaValidationPrinter.cjs.map +1 -1
  905. package/dist/production/src/lib/schema/SchemaValidationPrinter.js +4 -4
  906. package/dist/production/src/lib/schema/SchemaValidationPrinter.js.map +1 -1
  907. package/dist/production/src/lib/tenant/TenantApiTransport.cjs +160 -0
  908. package/dist/production/src/lib/tenant/TenantApiTransport.cjs.map +1 -0
  909. package/dist/production/src/lib/tenant/TenantApiTransport.js +160 -0
  910. package/dist/production/src/lib/tenant/TenantApiTransport.js.map +1 -0
  911. package/dist/production/src/lib/tenant/TenantConfigApplier.cjs +139 -0
  912. package/dist/production/src/lib/tenant/TenantConfigApplier.cjs.map +1 -0
  913. package/dist/production/src/lib/tenant/TenantConfigApplier.js +139 -0
  914. package/dist/production/src/lib/tenant/TenantConfigApplier.js.map +1 -0
  915. package/dist/production/src/lib/tenant/TenantConfigLoader.cjs +32 -0
  916. package/dist/production/src/lib/tenant/TenantConfigLoader.cjs.map +1 -0
  917. package/dist/production/src/lib/tenant/TenantConfigLoader.js +32 -0
  918. package/dist/production/src/lib/tenant/TenantConfigLoader.js.map +1 -0
  919. package/dist/production/src/lib/tenant/TenantConnectionProvider.cjs +20 -0
  920. package/dist/production/src/lib/tenant/TenantConnectionProvider.cjs.map +1 -0
  921. package/dist/production/src/lib/tenant/TenantConnectionProvider.js +20 -0
  922. package/dist/production/src/lib/tenant/TenantConnectionProvider.js.map +1 -0
  923. package/dist/production/src/lib/tenant/TenantConnectionResolver.cjs +30 -0
  924. package/dist/production/src/lib/tenant/TenantConnectionResolver.cjs.map +1 -0
  925. package/dist/production/src/lib/tenant/TenantConnectionResolver.js +30 -0
  926. package/dist/production/src/lib/tenant/TenantConnectionResolver.js.map +1 -0
  927. package/dist/production/src/lib/tenant/authPolicy.cjs +10 -0
  928. package/dist/production/src/lib/tenant/authPolicy.cjs.map +1 -0
  929. package/dist/production/src/lib/tenant/authPolicy.js +10 -0
  930. package/dist/production/src/lib/tenant/authPolicy.js.map +1 -0
  931. package/dist/production/src/lib/tenant/clients/TenantApiKeyClient.cjs +101 -0
  932. package/dist/production/src/lib/tenant/clients/TenantApiKeyClient.cjs.map +1 -0
  933. package/dist/production/src/lib/tenant/clients/TenantApiKeyClient.js +101 -0
  934. package/dist/production/src/lib/tenant/clients/TenantApiKeyClient.js.map +1 -0
  935. package/dist/production/src/lib/tenant/clients/TenantMemberClient.cjs +96 -0
  936. package/dist/production/src/lib/tenant/clients/TenantMemberClient.cjs.map +1 -0
  937. package/dist/production/src/lib/tenant/clients/TenantMemberClient.js +96 -0
  938. package/dist/production/src/lib/tenant/clients/TenantMemberClient.js.map +1 -0
  939. package/dist/production/src/lib/tenant/clients/TenantPersonClient.cjs +162 -0
  940. package/dist/production/src/lib/tenant/clients/TenantPersonClient.cjs.map +1 -0
  941. package/dist/production/src/lib/tenant/clients/TenantPersonClient.js +162 -0
  942. package/dist/production/src/lib/tenant/clients/TenantPersonClient.js.map +1 -0
  943. package/dist/production/src/lib/tenant/clients/TenantPolicyClient.cjs +135 -0
  944. package/dist/production/src/lib/tenant/clients/TenantPolicyClient.cjs.map +1 -0
  945. package/dist/production/src/lib/tenant/clients/TenantPolicyClient.js +135 -0
  946. package/dist/production/src/lib/tenant/clients/TenantPolicyClient.js.map +1 -0
  947. package/dist/production/src/lib/tenant/clients/TenantProjectClient.cjs +209 -0
  948. package/dist/production/src/lib/tenant/clients/TenantProjectClient.cjs.map +1 -0
  949. package/dist/production/src/lib/tenant/clients/TenantProjectClient.js +209 -0
  950. package/dist/production/src/lib/tenant/clients/TenantProjectClient.js.map +1 -0
  951. package/dist/production/src/lib/tenant/clients/index.cjs +21 -0
  952. package/dist/production/src/lib/tenant/clients/index.cjs.map +1 -0
  953. package/dist/production/src/lib/tenant/clients/index.js +21 -0
  954. package/dist/production/src/lib/tenant/clients/index.js.map +1 -0
  955. package/dist/production/src/lib/tenant/confirmation.cjs +23 -0
  956. package/dist/production/src/lib/tenant/confirmation.cjs.map +1 -0
  957. package/dist/production/src/lib/tenant/confirmation.js +23 -0
  958. package/dist/production/src/lib/tenant/confirmation.js.map +1 -0
  959. package/dist/production/src/lib/tenant/input/pagination.cjs +24 -0
  960. package/dist/production/src/lib/tenant/input/pagination.cjs.map +1 -0
  961. package/dist/production/src/lib/tenant/input/pagination.js +24 -0
  962. package/dist/production/src/lib/tenant/input/pagination.js.map +1 -0
  963. package/dist/production/src/lib/tenant/input/value.cjs +71 -0
  964. package/dist/production/src/lib/tenant/input/value.cjs.map +1 -0
  965. package/dist/production/src/lib/tenant/input/value.js +71 -0
  966. package/dist/production/src/lib/tenant/input/value.js.map +1 -0
  967. package/dist/production/src/lib/tenant/stdin.cjs +13 -0
  968. package/dist/production/src/lib/tenant/stdin.cjs.map +1 -0
  969. package/dist/production/src/lib/tenant/stdin.js +13 -0
  970. package/dist/production/src/lib/tenant/stdin.js.map +1 -0
  971. package/dist/production/src/lib/tenant/tenantConfig.cjs +5 -0
  972. package/dist/production/src/lib/tenant/tenantConfig.cjs.map +1 -0
  973. package/dist/production/src/lib/tenant/tenantConfig.js +5 -0
  974. package/dist/production/src/lib/tenant/tenantConfig.js.map +1 -0
  975. package/dist/production/src/lib/transfer/DataTransferClient.cjs +290 -54
  976. package/dist/production/src/lib/transfer/DataTransferClient.cjs.map +1 -1
  977. package/dist/production/src/lib/transfer/DataTransferClient.js +292 -56
  978. package/dist/production/src/lib/transfer/DataTransferClient.js.map +1 -1
  979. package/dist/production/src/lib/transfer/stdio.cjs +3 -8
  980. package/dist/production/src/lib/transfer/stdio.cjs.map +1 -1
  981. package/dist/production/src/lib/transfer/stdio.js +3 -8
  982. package/dist/production/src/lib/transfer/stdio.js.map +1 -1
  983. package/dist/production/src/lib/workspace/WorkspaceResolver.cjs +6 -6
  984. package/dist/production/src/lib/workspace/WorkspaceResolver.cjs.map +1 -1
  985. package/dist/production/src/lib/workspace/WorkspaceResolver.js.map +1 -1
  986. package/dist/types/commands/actions/ActionsGetEventCommand.d.ts +7 -5
  987. package/dist/types/commands/actions/ActionsGetEventCommand.d.ts.map +1 -1
  988. package/dist/types/commands/actions/ActionsListFailedEventsCommand.d.ts +6 -5
  989. package/dist/types/commands/actions/ActionsListFailedEventsCommand.d.ts.map +1 -1
  990. package/dist/types/commands/actions/ActionsListVariablesCommand.d.ts +6 -4
  991. package/dist/types/commands/actions/ActionsListVariablesCommand.d.ts.map +1 -1
  992. package/dist/types/commands/actions/ActionsRetryEventCommand.d.ts +7 -5
  993. package/dist/types/commands/actions/ActionsRetryEventCommand.d.ts.map +1 -1
  994. package/dist/types/commands/actions/ActionsSetVariablesCommand.d.ts +6 -4
  995. package/dist/types/commands/actions/ActionsSetVariablesCommand.d.ts.map +1 -1
  996. package/dist/types/commands/actions/ActionsStopEventCommand.d.ts +7 -5
  997. package/dist/types/commands/actions/ActionsStopEventCommand.d.ts.map +1 -1
  998. package/dist/types/commands/deploy/DeployCommand.d.ts +18 -9
  999. package/dist/types/commands/deploy/DeployCommand.d.ts.map +1 -1
  1000. package/dist/types/commands/deploy/index.d.ts +1 -1
  1001. package/dist/types/commands/deploy/index.d.ts.map +1 -1
  1002. package/dist/types/commands/index.d.ts +6 -5
  1003. package/dist/types/commands/index.d.ts.map +1 -1
  1004. package/dist/types/commands/migrations/MigrationAmendCommand.d.ts +11 -9
  1005. package/dist/types/commands/migrations/MigrationAmendCommand.d.ts.map +1 -1
  1006. package/dist/types/commands/migrations/MigrationBlankCommand.d.ts +2 -2
  1007. package/dist/types/commands/migrations/MigrationBlankCommand.d.ts.map +1 -1
  1008. package/dist/types/commands/migrations/MigrationDescribeCommand.d.ts +3 -3
  1009. package/dist/types/commands/migrations/MigrationDescribeCommand.d.ts.map +1 -1
  1010. package/dist/types/commands/migrations/MigrationDiffCommand.d.ts +11 -7
  1011. package/dist/types/commands/migrations/MigrationDiffCommand.d.ts.map +1 -1
  1012. package/dist/types/commands/migrations/MigrationExecuteCommand.d.ts +6 -4
  1013. package/dist/types/commands/migrations/MigrationExecuteCommand.d.ts.map +1 -1
  1014. package/dist/types/commands/migrations/MigrationInitStateCommand.d.ts +14 -0
  1015. package/dist/types/commands/migrations/MigrationInitStateCommand.d.ts.map +1 -0
  1016. package/dist/types/commands/migrations/MigrationRebaseCommand.d.ts +5 -4
  1017. package/dist/types/commands/migrations/MigrationRebaseCommand.d.ts.map +1 -1
  1018. package/dist/types/commands/migrations/MigrationSnapshotCommand.d.ts +14 -0
  1019. package/dist/types/commands/migrations/MigrationSnapshotCommand.d.ts.map +1 -0
  1020. package/dist/types/commands/migrations/MigrationStatusCommand.d.ts +12 -6
  1021. package/dist/types/commands/migrations/MigrationStatusCommand.d.ts.map +1 -1
  1022. package/dist/types/commands/migrations/MigrationVerifySnapshotCommand.d.ts +12 -0
  1023. package/dist/types/commands/migrations/MigrationVerifySnapshotCommand.d.ts.map +1 -0
  1024. package/dist/types/commands/migrations/index.d.ts +10 -7
  1025. package/dist/types/commands/migrations/index.d.ts.map +1 -1
  1026. package/dist/types/commands/misc/CommandsCommand.d.ts +13 -0
  1027. package/dist/types/commands/misc/CommandsCommand.d.ts.map +1 -0
  1028. package/dist/types/commands/misc/VersionCommand.d.ts +11 -4
  1029. package/dist/types/commands/misc/VersionCommand.d.ts.map +1 -1
  1030. package/dist/types/commands/misc/index.d.ts +2 -1
  1031. package/dist/types/commands/misc/index.d.ts.map +1 -1
  1032. package/dist/types/commands/project/ProjectGenerateDocumentationCommand.d.ts +6 -4
  1033. package/dist/types/commands/project/ProjectGenerateDocumentationCommand.d.ts.map +1 -1
  1034. package/dist/types/commands/project/ProjectPrintSchemaCommand.d.ts +3 -3
  1035. package/dist/types/commands/project/ProjectPrintSchemaCommand.d.ts.map +1 -1
  1036. package/dist/types/commands/project/ProjectValidateCommand.d.ts +4 -4
  1037. package/dist/types/commands/project/ProjectValidateCommand.d.ts.map +1 -1
  1038. package/dist/types/commands/project/index.d.ts +3 -3
  1039. package/dist/types/commands/project/index.d.ts.map +1 -1
  1040. package/dist/types/commands/tenant/TenantApplyCommand.d.ts +28 -0
  1041. package/dist/types/commands/tenant/TenantApplyCommand.d.ts.map +1 -0
  1042. package/dist/types/commands/tenant/apikey/TenantApiKeyCreateCommand.d.ts +22 -0
  1043. package/dist/types/commands/tenant/apikey/TenantApiKeyCreateCommand.d.ts.map +1 -0
  1044. package/dist/types/commands/tenant/apikey/TenantApiKeyDisableCommand.d.ts +17 -0
  1045. package/dist/types/commands/tenant/apikey/TenantApiKeyDisableCommand.d.ts.map +1 -0
  1046. package/dist/types/commands/tenant/apikey/TenantApiKeyListCommand.d.ts +15 -0
  1047. package/dist/types/commands/tenant/apikey/TenantApiKeyListCommand.d.ts.map +1 -0
  1048. package/dist/types/commands/tenant/apikey/index.d.ts +4 -0
  1049. package/dist/types/commands/tenant/apikey/index.d.ts.map +1 -0
  1050. package/dist/types/commands/tenant/index.d.ts +7 -0
  1051. package/dist/types/commands/tenant/index.d.ts.map +1 -0
  1052. package/dist/types/commands/tenant/member/TenantMemberAddCommand.d.ts +19 -0
  1053. package/dist/types/commands/tenant/member/TenantMemberAddCommand.d.ts.map +1 -0
  1054. package/dist/types/commands/tenant/member/TenantMemberInviteCommand.d.ts +28 -0
  1055. package/dist/types/commands/tenant/member/TenantMemberInviteCommand.d.ts.map +1 -0
  1056. package/dist/types/commands/tenant/member/TenantMemberInviteUnmanagedCommand.d.ts +36 -0
  1057. package/dist/types/commands/tenant/member/TenantMemberInviteUnmanagedCommand.d.ts.map +1 -0
  1058. package/dist/types/commands/tenant/member/TenantMemberListCommand.d.ts +21 -0
  1059. package/dist/types/commands/tenant/member/TenantMemberListCommand.d.ts.map +1 -0
  1060. package/dist/types/commands/tenant/member/TenantMemberRemoveCommand.d.ts +17 -0
  1061. package/dist/types/commands/tenant/member/TenantMemberRemoveCommand.d.ts.map +1 -0
  1062. package/dist/types/commands/tenant/member/TenantMemberUpdateCommand.d.ts +20 -0
  1063. package/dist/types/commands/tenant/member/TenantMemberUpdateCommand.d.ts.map +1 -0
  1064. package/dist/types/commands/tenant/member/index.d.ts +7 -0
  1065. package/dist/types/commands/tenant/member/index.d.ts.map +1 -0
  1066. package/dist/types/commands/tenant/member/memberOptions.d.ts +16 -0
  1067. package/dist/types/commands/tenant/member/memberOptions.d.ts.map +1 -0
  1068. package/dist/types/commands/tenant/member/membershipInput.d.ts +44 -0
  1069. package/dist/types/commands/tenant/member/membershipInput.d.ts.map +1 -0
  1070. package/dist/types/commands/tenant/person/TenantIdentityRoleAddCommand.d.ts +15 -0
  1071. package/dist/types/commands/tenant/person/TenantIdentityRoleAddCommand.d.ts.map +1 -0
  1072. package/dist/types/commands/tenant/person/TenantIdentityRoleRemoveCommand.d.ts +17 -0
  1073. package/dist/types/commands/tenant/person/TenantIdentityRoleRemoveCommand.d.ts.map +1 -0
  1074. package/dist/types/commands/tenant/person/TenantPersonCreateCommand.d.ts +25 -0
  1075. package/dist/types/commands/tenant/person/TenantPersonCreateCommand.d.ts.map +1 -0
  1076. package/dist/types/commands/tenant/person/TenantPersonDisableCommand.d.ts +16 -0
  1077. package/dist/types/commands/tenant/person/TenantPersonDisableCommand.d.ts.map +1 -0
  1078. package/dist/types/commands/tenant/person/TenantPersonListCommand.d.ts +18 -0
  1079. package/dist/types/commands/tenant/person/TenantPersonListCommand.d.ts.map +1 -0
  1080. package/dist/types/commands/tenant/person/TenantPersonResetMfaCommand.d.ts +16 -0
  1081. package/dist/types/commands/tenant/person/TenantPersonResetMfaCommand.d.ts.map +1 -0
  1082. package/dist/types/commands/tenant/person/TenantPersonResetPasswordRequestCommand.d.ts +21 -0
  1083. package/dist/types/commands/tenant/person/TenantPersonResetPasswordRequestCommand.d.ts.map +1 -0
  1084. package/dist/types/commands/tenant/person/TenantPersonSetPasswordCommand.d.ts +20 -0
  1085. package/dist/types/commands/tenant/person/TenantPersonSetPasswordCommand.d.ts.map +1 -0
  1086. package/dist/types/commands/tenant/person/TenantPersonShowCommand.d.ts +14 -0
  1087. package/dist/types/commands/tenant/person/TenantPersonShowCommand.d.ts.map +1 -0
  1088. package/dist/types/commands/tenant/person/TenantPersonSignOutCommand.d.ts +17 -0
  1089. package/dist/types/commands/tenant/person/TenantPersonSignOutCommand.d.ts.map +1 -0
  1090. package/dist/types/commands/tenant/person/TenantPersonUpdateCommand.d.ts +17 -0
  1091. package/dist/types/commands/tenant/person/TenantPersonUpdateCommand.d.ts.map +1 -0
  1092. package/dist/types/commands/tenant/person/TenantSessionCreateCommand.d.ts +18 -0
  1093. package/dist/types/commands/tenant/person/TenantSessionCreateCommand.d.ts.map +1 -0
  1094. package/dist/types/commands/tenant/person/index.d.ts +13 -0
  1095. package/dist/types/commands/tenant/person/index.d.ts.map +1 -0
  1096. package/dist/types/commands/tenant/person/personInput.d.ts +37 -0
  1097. package/dist/types/commands/tenant/person/personInput.d.ts.map +1 -0
  1098. package/dist/types/commands/tenant/policy/TenantAuthLogCommand.d.ts +35 -0
  1099. package/dist/types/commands/tenant/policy/TenantAuthLogCommand.d.ts.map +1 -0
  1100. package/dist/types/commands/tenant/policy/TenantMailTemplateAddCommand.d.ts +30 -0
  1101. package/dist/types/commands/tenant/policy/TenantMailTemplateAddCommand.d.ts.map +1 -0
  1102. package/dist/types/commands/tenant/policy/TenantMailTemplateListCommand.d.ts +12 -0
  1103. package/dist/types/commands/tenant/policy/TenantMailTemplateListCommand.d.ts.map +1 -0
  1104. package/dist/types/commands/tenant/policy/TenantMailTemplateRemoveCommand.d.ts +19 -0
  1105. package/dist/types/commands/tenant/policy/TenantMailTemplateRemoveCommand.d.ts.map +1 -0
  1106. package/dist/types/commands/tenant/policy/TenantPolicyCreateCommand.d.ts +17 -0
  1107. package/dist/types/commands/tenant/policy/TenantPolicyCreateCommand.d.ts.map +1 -0
  1108. package/dist/types/commands/tenant/policy/TenantPolicyDeleteCommand.d.ts +16 -0
  1109. package/dist/types/commands/tenant/policy/TenantPolicyDeleteCommand.d.ts.map +1 -0
  1110. package/dist/types/commands/tenant/policy/TenantPolicyListCommand.d.ts +12 -0
  1111. package/dist/types/commands/tenant/policy/TenantPolicyListCommand.d.ts.map +1 -0
  1112. package/dist/types/commands/tenant/policy/TenantPolicyUpdateCommand.d.ts +19 -0
  1113. package/dist/types/commands/tenant/policy/TenantPolicyUpdateCommand.d.ts.map +1 -0
  1114. package/dist/types/commands/tenant/policy/index.d.ts +9 -0
  1115. package/dist/types/commands/tenant/policy/index.d.ts.map +1 -0
  1116. package/dist/types/commands/tenant/policy/policyInput.d.ts +41 -0
  1117. package/dist/types/commands/tenant/policy/policyInput.d.ts.map +1 -0
  1118. package/dist/types/commands/tenant/project/TenantConfigShowCommand.d.ts +12 -0
  1119. package/dist/types/commands/tenant/project/TenantConfigShowCommand.d.ts.map +1 -0
  1120. package/dist/types/commands/tenant/project/TenantIdpListCommand.d.ts +12 -0
  1121. package/dist/types/commands/tenant/project/TenantIdpListCommand.d.ts.map +1 -0
  1122. package/dist/types/commands/tenant/project/TenantProjectCreateCommand.d.ts +22 -0
  1123. package/dist/types/commands/tenant/project/TenantProjectCreateCommand.d.ts.map +1 -0
  1124. package/dist/types/commands/tenant/project/TenantProjectListCommand.d.ts +12 -0
  1125. package/dist/types/commands/tenant/project/TenantProjectListCommand.d.ts.map +1 -0
  1126. package/dist/types/commands/tenant/project/TenantProjectSecretSetCommand.d.ts +21 -0
  1127. package/dist/types/commands/tenant/project/TenantProjectSecretSetCommand.d.ts.map +1 -0
  1128. package/dist/types/commands/tenant/project/TenantProjectShowCommand.d.ts +14 -0
  1129. package/dist/types/commands/tenant/project/TenantProjectShowCommand.d.ts.map +1 -0
  1130. package/dist/types/commands/tenant/project/TenantProjectUpdateCommand.d.ts +21 -0
  1131. package/dist/types/commands/tenant/project/TenantProjectUpdateCommand.d.ts.map +1 -0
  1132. package/dist/types/commands/tenant/project/TenantWhoAmICommand.d.ts +12 -0
  1133. package/dist/types/commands/tenant/project/TenantWhoAmICommand.d.ts.map +1 -0
  1134. package/dist/types/commands/tenant/project/index.d.ts +9 -0
  1135. package/dist/types/commands/tenant/project/index.d.ts.map +1 -0
  1136. package/dist/types/commands/tenant/project/jsonConfigOption.d.ts +9 -0
  1137. package/dist/types/commands/tenant/project/jsonConfigOption.d.ts.map +1 -0
  1138. package/dist/types/commands/tenant/tenantOutput.d.ts +7 -0
  1139. package/dist/types/commands/tenant/tenantOutput.d.ts.map +1 -0
  1140. package/dist/types/commands/transfer/ExportCommand.d.ts +10 -4
  1141. package/dist/types/commands/transfer/ExportCommand.d.ts.map +1 -1
  1142. package/dist/types/commands/transfer/ImportCommand.d.ts +17 -5
  1143. package/dist/types/commands/transfer/ImportCommand.d.ts.map +1 -1
  1144. package/dist/types/commands/transfer/TransferCommand.d.ts +16 -4
  1145. package/dist/types/commands/transfer/TransferCommand.d.ts.map +1 -1
  1146. package/dist/types/commands/transfer/index.d.ts +3 -3
  1147. package/dist/types/commands/transfer/index.d.ts.map +1 -1
  1148. package/dist/types/commands/transfer/utils.d.ts +2 -2
  1149. package/dist/types/commands/transfer/utils.d.ts.map +1 -1
  1150. package/dist/types/commands/workspace/WorkspaceUpdateApiCommand.d.ts +27 -4
  1151. package/dist/types/commands/workspace/WorkspaceUpdateApiCommand.d.ts.map +1 -1
  1152. package/dist/types/commands/workspace/index.d.ts +1 -1
  1153. package/dist/types/commands/workspace/index.d.ts.map +1 -1
  1154. package/dist/types/dic.d.ts +145 -36
  1155. package/dist/types/dic.d.ts.map +1 -1
  1156. package/dist/types/index.d.ts +2 -0
  1157. package/dist/types/index.d.ts.map +1 -0
  1158. package/dist/types/lib/SystemClientProvider.d.ts +5 -2
  1159. package/dist/types/lib/SystemClientProvider.d.ts.map +1 -1
  1160. package/dist/types/lib/TenantClientProvider.d.ts +14 -5
  1161. package/dist/types/lib/TenantClientProvider.d.ts.map +1 -1
  1162. package/dist/types/lib/VersionChecker.d.ts +1 -1
  1163. package/dist/types/lib/VersionChecker.d.ts.map +1 -1
  1164. package/dist/types/lib/actions/ActionsClient.d.ts +17 -8
  1165. package/dist/types/lib/actions/ActionsClient.d.ts.map +1 -1
  1166. package/dist/types/lib/actions/resolveActionsClient.d.ts +7 -0
  1167. package/dist/types/lib/actions/resolveActionsClient.d.ts.map +1 -0
  1168. package/dist/types/lib/actions/runActionMutationBatch.d.ts +23 -0
  1169. package/dist/types/lib/actions/runActionMutationBatch.d.ts.map +1 -0
  1170. package/dist/types/lib/admin/AdminClient.d.ts +2 -1
  1171. package/dist/types/lib/admin/AdminClient.d.ts.map +1 -1
  1172. package/dist/types/lib/admin/AdminDeployer.d.ts +6 -4
  1173. package/dist/types/lib/admin/AdminDeployer.d.ts.map +1 -1
  1174. package/dist/types/lib/dsn.d.ts.map +1 -1
  1175. package/dist/types/lib/errors/TransportError.d.ts +29 -0
  1176. package/dist/types/lib/errors/TransportError.d.ts.map +1 -0
  1177. package/dist/types/lib/errors/index.d.ts +2 -0
  1178. package/dist/types/lib/errors/index.d.ts.map +1 -0
  1179. package/dist/types/lib/fs/DockerComposeManager.d.ts +2 -2
  1180. package/dist/types/lib/fs/DockerComposeManager.d.ts.map +1 -1
  1181. package/dist/types/lib/fs/FileSystem.d.ts.map +1 -1
  1182. package/dist/types/lib/fs/YamlHandler.d.ts +2 -2
  1183. package/dist/types/lib/fs/YamlHandler.d.ts.map +1 -1
  1184. package/dist/types/lib/js/EsBuildBuilder.d.ts +1 -1
  1185. package/dist/types/lib/js/EsBuildBuilder.d.ts.map +1 -1
  1186. package/dist/types/lib/js/EvalExecutor.d.ts +1 -1
  1187. package/dist/types/lib/js/EvalExecutor.d.ts.map +1 -1
  1188. package/dist/types/lib/js/JsCodeRunner.d.ts +2 -2
  1189. package/dist/types/lib/js/JsCodeRunner.d.ts.map +1 -1
  1190. package/dist/types/lib/maskToken.d.ts +1 -0
  1191. package/dist/types/lib/maskToken.d.ts.map +1 -1
  1192. package/dist/types/lib/migrations/MigrationExecutionFacade.d.ts +18 -8
  1193. package/dist/types/lib/migrations/MigrationExecutionFacade.d.ts.map +1 -1
  1194. package/dist/types/lib/migrations/MigrationPrinter.d.ts +28 -2
  1195. package/dist/types/lib/migrations/MigrationPrinter.d.ts.map +1 -1
  1196. package/dist/types/lib/migrations/MigrationRebaseFacade.d.ts +5 -4
  1197. package/dist/types/lib/migrations/MigrationRebaseFacade.d.ts.map +1 -1
  1198. package/dist/types/lib/migrations/MigrationSnapshotFacade.d.ts +31 -0
  1199. package/dist/types/lib/migrations/MigrationSnapshotFacade.d.ts.map +1 -0
  1200. package/dist/types/lib/migrations/MigrationsStatusFacade.d.ts +15 -4
  1201. package/dist/types/lib/migrations/MigrationsStatusFacade.d.ts.map +1 -1
  1202. package/dist/types/lib/migrations/MigrationsValidator.d.ts +3 -1
  1203. package/dist/types/lib/migrations/MigrationsValidator.d.ts.map +1 -1
  1204. package/dist/types/lib/project/RemoteProject.d.ts.map +1 -1
  1205. package/dist/types/lib/project/RemoteProjectProvider.d.ts +1 -1
  1206. package/dist/types/lib/project/RemoteProjectProvider.d.ts.map +1 -1
  1207. package/dist/types/lib/project/RemoteProjectResolver.d.ts +2 -2
  1208. package/dist/types/lib/project/RemoteProjectResolver.d.ts.map +1 -1
  1209. package/dist/types/lib/project/docs/components/EntityInfo.d.ts +1 -1
  1210. package/dist/types/lib/project/docs/components/EntityInfo.d.ts.map +1 -1
  1211. package/dist/types/lib/project/docs/components/EntityLink.d.ts.map +1 -1
  1212. package/dist/types/lib/project/docs/components/FieldLink.d.ts.map +1 -1
  1213. package/dist/types/lib/project/docs/components/FieldPermissions.d.ts.map +1 -1
  1214. package/dist/types/lib/project/docs/components/FieldType.d.ts.map +1 -1
  1215. package/dist/types/lib/project/docs/components/OnDelete.d.ts +1 -1
  1216. package/dist/types/lib/project/docs/components/OnDelete.d.ts.map +1 -1
  1217. package/dist/types/lib/project/docs/components/ProjectInfo.d.ts.map +1 -1
  1218. package/dist/types/lib/project/docs/components/SinglePermission.d.ts.map +1 -1
  1219. package/dist/types/lib/project/docs/components/utils.d.ts.map +1 -1
  1220. package/dist/types/lib/project/docs/projectDescribe.d.ts.map +1 -1
  1221. package/dist/types/lib/prompt/index.d.ts +2 -0
  1222. package/dist/types/lib/prompt/index.d.ts.map +1 -0
  1223. package/dist/types/lib/prompt/prompt.d.ts +6 -0
  1224. package/dist/types/lib/prompt/prompt.d.ts.map +1 -0
  1225. package/dist/types/lib/prompt/prompt.internal.d.ts +37 -0
  1226. package/dist/types/lib/prompt/prompt.internal.d.ts.map +1 -0
  1227. package/dist/types/lib/prompt/prompt.test.d.ts +2 -0
  1228. package/dist/types/lib/prompt/prompt.test.d.ts.map +1 -0
  1229. package/dist/types/lib/schema/SchemaLoader.d.ts +2 -2
  1230. package/dist/types/lib/schema/SchemaLoader.d.ts.map +1 -1
  1231. package/dist/types/lib/schema/SchemaValidationHelper.d.ts +2 -1
  1232. package/dist/types/lib/schema/SchemaValidationHelper.d.ts.map +1 -1
  1233. package/dist/types/lib/schema/SchemaValidationPrinter.d.ts +2 -1
  1234. package/dist/types/lib/schema/SchemaValidationPrinter.d.ts.map +1 -1
  1235. package/dist/types/lib/schema/collectReferences.d.ts.map +1 -1
  1236. package/dist/types/lib/stream.d.ts.map +1 -1
  1237. package/dist/types/lib/tenant/TenantApiTransport.d.ts +49 -0
  1238. package/dist/types/lib/tenant/TenantApiTransport.d.ts.map +1 -0
  1239. package/dist/types/lib/tenant/TenantConfigApplier.d.ts +53 -0
  1240. package/dist/types/lib/tenant/TenantConfigApplier.d.ts.map +1 -0
  1241. package/dist/types/lib/tenant/TenantConfigLoader.d.ts +16 -0
  1242. package/dist/types/lib/tenant/TenantConfigLoader.d.ts.map +1 -0
  1243. package/dist/types/lib/tenant/TenantConnection.d.ts +8 -0
  1244. package/dist/types/lib/tenant/TenantConnection.d.ts.map +1 -0
  1245. package/dist/types/lib/tenant/TenantConnectionProvider.d.ts +8 -0
  1246. package/dist/types/lib/tenant/TenantConnectionProvider.d.ts.map +1 -0
  1247. package/dist/types/lib/tenant/TenantConnectionResolver.d.ts +8 -0
  1248. package/dist/types/lib/tenant/TenantConnectionResolver.d.ts.map +1 -0
  1249. package/dist/types/lib/tenant/authPolicy.d.ts +17 -0
  1250. package/dist/types/lib/tenant/authPolicy.d.ts.map +1 -0
  1251. package/dist/types/lib/tenant/clients/TenantApiKeyClient.d.ts +56 -0
  1252. package/dist/types/lib/tenant/clients/TenantApiKeyClient.d.ts.map +1 -0
  1253. package/dist/types/lib/tenant/clients/TenantMemberClient.d.ts +68 -0
  1254. package/dist/types/lib/tenant/clients/TenantMemberClient.d.ts.map +1 -0
  1255. package/dist/types/lib/tenant/clients/TenantPersonClient.d.ts +97 -0
  1256. package/dist/types/lib/tenant/clients/TenantPersonClient.d.ts.map +1 -0
  1257. package/dist/types/lib/tenant/clients/TenantPolicyClient.d.ts +75 -0
  1258. package/dist/types/lib/tenant/clients/TenantPolicyClient.d.ts.map +1 -0
  1259. package/dist/types/lib/tenant/clients/TenantProjectClient.d.ts +162 -0
  1260. package/dist/types/lib/tenant/clients/TenantProjectClient.d.ts.map +1 -0
  1261. package/dist/types/lib/tenant/clients/index.d.ts +21 -0
  1262. package/dist/types/lib/tenant/clients/index.d.ts.map +1 -0
  1263. package/dist/types/lib/tenant/confirmation.d.ts +14 -0
  1264. package/dist/types/lib/tenant/confirmation.d.ts.map +1 -0
  1265. package/dist/types/lib/tenant/input/index.d.ts +3 -0
  1266. package/dist/types/lib/tenant/input/index.d.ts.map +1 -0
  1267. package/dist/types/lib/tenant/input/pagination.d.ts +7 -0
  1268. package/dist/types/lib/tenant/input/pagination.d.ts.map +1 -0
  1269. package/dist/types/lib/tenant/input/value.d.ts +45 -0
  1270. package/dist/types/lib/tenant/input/value.d.ts.map +1 -0
  1271. package/dist/types/lib/tenant/stdin.d.ts +8 -0
  1272. package/dist/types/lib/tenant/stdin.d.ts.map +1 -0
  1273. package/dist/types/lib/tenant/tenantConfig.d.ts +148 -0
  1274. package/dist/types/lib/tenant/tenantConfig.d.ts.map +1 -0
  1275. package/dist/types/lib/transfer/DataTransferClient.d.ts +9 -3
  1276. package/dist/types/lib/transfer/DataTransferClient.d.ts.map +1 -1
  1277. package/dist/types/lib/transfer/stdio.d.ts +3 -1
  1278. package/dist/types/lib/transfer/stdio.d.ts.map +1 -1
  1279. package/dist/types/lib/workspace/WorkspaceResolver.d.ts +2 -2
  1280. package/dist/types/lib/workspace/WorkspaceResolver.d.ts.map +1 -1
  1281. package/dist/types/tsconfig.tsbuildinfo +1 -1
  1282. package/package.json +33 -15
  1283. package/src/commands/actions/ActionsGetEventCommand.ts +39 -17
  1284. package/src/commands/actions/ActionsListFailedEventsCommand.ts +25 -44
  1285. package/src/commands/actions/ActionsListVariablesCommand.ts +16 -14
  1286. package/src/commands/actions/ActionsRetryEventCommand.ts +37 -19
  1287. package/src/commands/actions/ActionsSetVariablesCommand.ts +57 -29
  1288. package/src/commands/actions/ActionsStopEventCommand.ts +37 -19
  1289. package/src/commands/deploy/DeployCommand.ts +82 -38
  1290. package/src/commands/deploy/index.ts +1 -1
  1291. package/src/commands/index.ts +6 -5
  1292. package/src/commands/migrations/MigrationAmendCommand.ts +104 -33
  1293. package/src/commands/migrations/MigrationBlankCommand.ts +3 -3
  1294. package/src/commands/migrations/MigrationDescribeCommand.ts +10 -5
  1295. package/src/commands/migrations/MigrationDiffCommand.ts +122 -26
  1296. package/src/commands/migrations/MigrationExecuteCommand.ts +17 -5
  1297. package/src/commands/migrations/MigrationInitStateCommand.ts +47 -0
  1298. package/src/commands/migrations/MigrationRebaseCommand.ts +29 -7
  1299. package/src/commands/migrations/MigrationSnapshotCommand.ts +69 -0
  1300. package/src/commands/migrations/MigrationStatusCommand.ts +22 -14
  1301. package/src/commands/migrations/MigrationVerifySnapshotCommand.ts +27 -0
  1302. package/src/commands/migrations/index.ts +10 -7
  1303. package/src/commands/misc/CommandsCommand.ts +74 -0
  1304. package/src/commands/misc/VersionCommand.ts +13 -6
  1305. package/src/commands/misc/index.ts +2 -1
  1306. package/src/commands/project/ProjectGenerateDocumentationCommand.ts +15 -16
  1307. package/src/commands/project/ProjectPrintSchemaCommand.ts +21 -19
  1308. package/src/commands/project/ProjectValidateCommand.ts +53 -19
  1309. package/src/commands/project/index.ts +3 -3
  1310. package/src/commands/tenant/TenantApplyCommand.ts +89 -0
  1311. package/src/commands/tenant/apikey/TenantApiKeyCreateCommand.ts +102 -0
  1312. package/src/commands/tenant/apikey/TenantApiKeyDisableCommand.ts +47 -0
  1313. package/src/commands/tenant/apikey/TenantApiKeyListCommand.ts +64 -0
  1314. package/src/commands/tenant/apikey/index.ts +4 -0
  1315. package/src/commands/tenant/index.ts +6 -0
  1316. package/src/commands/tenant/member/TenantMemberAddCommand.ts +48 -0
  1317. package/src/commands/tenant/member/TenantMemberInviteCommand.ts +88 -0
  1318. package/src/commands/tenant/member/TenantMemberInviteUnmanagedCommand.ts +135 -0
  1319. package/src/commands/tenant/member/TenantMemberListCommand.ts +94 -0
  1320. package/src/commands/tenant/member/TenantMemberRemoveCommand.ts +48 -0
  1321. package/src/commands/tenant/member/TenantMemberUpdateCommand.ts +58 -0
  1322. package/src/commands/tenant/member/index.ts +9 -0
  1323. package/src/commands/tenant/member/memberOptions.ts +29 -0
  1324. package/src/commands/tenant/member/membershipInput.ts +155 -0
  1325. package/src/commands/tenant/person/TenantIdentityRoleAddCommand.ts +44 -0
  1326. package/src/commands/tenant/person/TenantIdentityRoleRemoveCommand.ts +54 -0
  1327. package/src/commands/tenant/person/TenantPersonCreateCommand.ts +98 -0
  1328. package/src/commands/tenant/person/TenantPersonDisableCommand.ts +46 -0
  1329. package/src/commands/tenant/person/TenantPersonListCommand.ts +68 -0
  1330. package/src/commands/tenant/person/TenantPersonResetMfaCommand.ts +59 -0
  1331. package/src/commands/tenant/person/TenantPersonResetPasswordRequestCommand.ts +67 -0
  1332. package/src/commands/tenant/person/TenantPersonSetPasswordCommand.ts +66 -0
  1333. package/src/commands/tenant/person/TenantPersonShowCommand.ts +70 -0
  1334. package/src/commands/tenant/person/TenantPersonSignOutCommand.ts +60 -0
  1335. package/src/commands/tenant/person/TenantPersonUpdateCommand.ts +55 -0
  1336. package/src/commands/tenant/person/TenantSessionCreateCommand.ts +79 -0
  1337. package/src/commands/tenant/person/index.ts +15 -0
  1338. package/src/commands/tenant/person/personInput.ts +112 -0
  1339. package/src/commands/tenant/policy/TenantAuthLogCommand.ts +141 -0
  1340. package/src/commands/tenant/policy/TenantMailTemplateAddCommand.ts +92 -0
  1341. package/src/commands/tenant/policy/TenantMailTemplateListCommand.ts +50 -0
  1342. package/src/commands/tenant/policy/TenantMailTemplateRemoveCommand.ts +63 -0
  1343. package/src/commands/tenant/policy/TenantPolicyCreateCommand.ts +46 -0
  1344. package/src/commands/tenant/policy/TenantPolicyDeleteCommand.ts +42 -0
  1345. package/src/commands/tenant/policy/TenantPolicyListCommand.ts +39 -0
  1346. package/src/commands/tenant/policy/TenantPolicyUpdateCommand.ts +51 -0
  1347. package/src/commands/tenant/policy/index.ts +9 -0
  1348. package/src/commands/tenant/policy/policyInput.ts +210 -0
  1349. package/src/commands/tenant/project/TenantConfigShowCommand.ts +28 -0
  1350. package/src/commands/tenant/project/TenantIdpListCommand.ts +27 -0
  1351. package/src/commands/tenant/project/TenantProjectCreateCommand.ts +67 -0
  1352. package/src/commands/tenant/project/TenantProjectListCommand.ts +27 -0
  1353. package/src/commands/tenant/project/TenantProjectSecretSetCommand.ts +63 -0
  1354. package/src/commands/tenant/project/TenantProjectShowCommand.ts +29 -0
  1355. package/src/commands/tenant/project/TenantProjectUpdateCommand.ts +66 -0
  1356. package/src/commands/tenant/project/TenantWhoAmICommand.ts +22 -0
  1357. package/src/commands/tenant/project/index.ts +9 -0
  1358. package/src/commands/tenant/project/jsonConfigOption.ts +33 -0
  1359. package/src/commands/tenant/tenantOutput.ts +35 -0
  1360. package/src/commands/transfer/ExportCommand.ts +48 -31
  1361. package/src/commands/transfer/ImportCommand.ts +90 -37
  1362. package/src/commands/transfer/TransferCommand.ts +97 -37
  1363. package/src/commands/transfer/index.ts +3 -3
  1364. package/src/commands/transfer/utils.ts +12 -11
  1365. package/src/commands/workspace/WorkspaceUpdateApiCommand.ts +136 -37
  1366. package/src/commands/workspace/index.ts +1 -1
  1367. package/src/dic.ts +290 -73
  1368. package/src/index.ts +1 -0
  1369. package/src/lib/SystemClientProvider.ts +76 -2
  1370. package/src/lib/TenantClientProvider.ts +44 -6
  1371. package/src/lib/VersionChecker.ts +2 -2
  1372. package/src/lib/actions/ActionsClient.ts +38 -14
  1373. package/src/lib/actions/resolveActionsClient.ts +15 -0
  1374. package/src/lib/actions/runActionMutationBatch.ts +69 -0
  1375. package/src/lib/admin/AdminClient.ts +40 -13
  1376. package/src/lib/admin/AdminDeployer.ts +7 -5
  1377. package/src/lib/errors/TransportError.ts +260 -0
  1378. package/src/lib/errors/index.ts +1 -0
  1379. package/src/lib/fs/DockerComposeManager.ts +2 -2
  1380. package/src/lib/fs/YamlHandler.ts +2 -2
  1381. package/src/lib/js/EsBuildBuilder.ts +1 -1
  1382. package/src/lib/js/EvalExecutor.ts +1 -1
  1383. package/src/lib/js/JsCodeRunner.ts +2 -2
  1384. package/src/lib/maskToken.ts +9 -1
  1385. package/src/lib/migrations/MigrationExecutionFacade.ts +203 -51
  1386. package/src/lib/migrations/MigrationPrinter.ts +101 -65
  1387. package/src/lib/migrations/MigrationRebaseFacade.ts +12 -4
  1388. package/src/lib/migrations/MigrationSnapshotFacade.ts +223 -0
  1389. package/src/lib/migrations/MigrationsStatusFacade.ts +19 -5
  1390. package/src/lib/migrations/MigrationsValidator.ts +5 -3
  1391. package/src/lib/project/RemoteProjectProvider.ts +7 -2
  1392. package/src/lib/project/RemoteProjectResolver.ts +3 -3
  1393. package/src/lib/project/docs/components/EntityInfo.tsx +6 -6
  1394. package/src/lib/project/docs/components/EntityLink.tsx +1 -1
  1395. package/src/lib/project/docs/components/FieldLink.tsx +2 -2
  1396. package/src/lib/project/docs/components/FieldPermissions.tsx +1 -1
  1397. package/src/lib/project/docs/components/FieldType.tsx +2 -2
  1398. package/src/lib/project/docs/components/OnDelete.tsx +3 -3
  1399. package/src/lib/project/docs/components/ProjectInfo.tsx +3 -3
  1400. package/src/lib/project/docs/projectDescribe.tsx +2 -2
  1401. package/src/lib/prompt/index.ts +1 -0
  1402. package/src/lib/prompt/prompt.internal.ts +69 -0
  1403. package/src/lib/prompt/prompt.test.ts +100 -0
  1404. package/src/lib/prompt/prompt.ts +23 -0
  1405. package/src/lib/schema/SchemaLoader.ts +2 -2
  1406. package/src/lib/schema/SchemaValidationHelper.ts +9 -3
  1407. package/src/lib/schema/SchemaValidationPrinter.ts +5 -4
  1408. package/src/lib/tenant/TenantApiTransport.ts +209 -0
  1409. package/src/lib/tenant/TenantConfigApplier.ts +241 -0
  1410. package/src/lib/tenant/TenantConfigLoader.ts +41 -0
  1411. package/src/lib/tenant/TenantConnection.ts +8 -0
  1412. package/src/lib/tenant/TenantConnectionProvider.ts +21 -0
  1413. package/src/lib/tenant/TenantConnectionResolver.ts +31 -0
  1414. package/src/lib/tenant/authPolicy.ts +20 -0
  1415. package/src/lib/tenant/clients/README.md +84 -0
  1416. package/src/lib/tenant/clients/TenantApiKeyClient.ts +182 -0
  1417. package/src/lib/tenant/clients/TenantMemberClient.ts +199 -0
  1418. package/src/lib/tenant/clients/TenantPersonClient.ts +306 -0
  1419. package/src/lib/tenant/clients/TenantPolicyClient.ts +244 -0
  1420. package/src/lib/tenant/clients/TenantProjectClient.ts +425 -0
  1421. package/src/lib/tenant/clients/index.ts +29 -0
  1422. package/src/lib/tenant/confirmation.ts +32 -0
  1423. package/src/lib/tenant/input/index.ts +2 -0
  1424. package/src/lib/tenant/input/pagination.ts +39 -0
  1425. package/src/lib/tenant/input/value.ts +149 -0
  1426. package/src/lib/tenant/stdin.ts +16 -0
  1427. package/src/lib/tenant/tenantConfig.ts +222 -0
  1428. package/src/lib/transfer/DataTransferClient.ts +356 -61
  1429. package/src/lib/transfer/stdio.ts +5 -7
  1430. package/src/lib/workspace/WorkspaceResolver.ts +2 -2
  1431. package/src/run.ts +25 -9
  1432. package/src/tsconfig.json +1 -0
  1433. package/tenant.config.example.ts +92 -0
  1434. package/tests/cases/unit/MigrationAmendCommand.test.ts +171 -0
  1435. package/tests/cases/unit/MigrationDiffCommand.test.ts +182 -0
  1436. package/tests/cases/unit/MigrationExecuteCommand.test.ts +58 -0
  1437. package/tests/cases/unit/MigrationExecutionFacade.test.ts +368 -0
  1438. package/tests/cases/unit/MigrationInitStateCommand.test.ts +72 -0
  1439. package/tests/cases/unit/MigrationRebaseCommand.test.ts +59 -0
  1440. package/tests/cases/unit/MigrationRebaseFacade.test.ts +87 -0
  1441. package/tests/cases/unit/MigrationSnapshotFacade.test.ts +305 -0
  1442. package/tests/cases/unit/MigrationStatusCommand.test.ts +197 -0
  1443. package/tests/cases/unit/MigrationsValidator.test.ts +61 -0
  1444. package/tests/cases/unit/actions.test.ts +802 -0
  1445. package/tests/cases/unit/cli-process.test.ts +266 -0
  1446. package/tests/cases/unit/command-registry.test.ts +214 -0
  1447. package/tests/cases/unit/deploy.test.ts +505 -0
  1448. package/tests/cases/unit/migration-transport.test.ts +156 -0
  1449. package/tests/cases/unit/project.test.ts +223 -0
  1450. package/tests/cases/unit/structured-output.test.ts +189 -0
  1451. package/tests/cases/unit/tenant-apikey.test.ts +645 -0
  1452. package/tests/cases/unit/tenant-apply-command.test.ts +247 -0
  1453. package/tests/cases/unit/tenant-clients.test.ts +130 -0
  1454. package/tests/cases/unit/tenant-connection.test.ts +91 -0
  1455. package/tests/cases/unit/tenant-input.test.ts +275 -0
  1456. package/tests/cases/unit/tenant-member.test.ts +683 -0
  1457. package/tests/cases/unit/tenant-person.test.ts +857 -0
  1458. package/tests/cases/unit/tenant-policy.test.ts +799 -0
  1459. package/tests/cases/unit/tenant-project.test.ts +634 -0
  1460. package/tests/cases/unit/tenant-transport.test.ts +322 -0
  1461. package/tests/cases/unit/transfer.test.ts +714 -0
  1462. package/tests/cases/unit/transport-errors.test.ts +78 -0
  1463. package/tests/cases/unit/workspace-update-api.test.ts +152 -0
  1464. package/tests/tenantConfigApplier.test.ts +483 -0
  1465. package/dist/development/src/lib/tenant/TenantClient.cjs +0 -41
  1466. package/dist/development/src/lib/tenant/TenantClient.cjs.map +0 -1
  1467. package/dist/development/src/lib/tenant/TenantClient.js +0 -41
  1468. package/dist/development/src/lib/tenant/TenantClient.js.map +0 -1
  1469. package/dist/production/src/lib/tenant/TenantClient.cjs +0 -41
  1470. package/dist/production/src/lib/tenant/TenantClient.cjs.map +0 -1
  1471. package/dist/production/src/lib/tenant/TenantClient.js +0 -41
  1472. package/dist/production/src/lib/tenant/TenantClient.js.map +0 -1
  1473. package/dist/types/lib/tenant/TenantClient.d.ts +0 -9
  1474. package/dist/types/lib/tenant/TenantClient.d.ts.map +0 -1
  1475. package/src/lib/tenant/TenantClient.ts +0 -40
@@ -1 +1 @@
1
- {"version":3,"file":"MigrationDescribeCommand.cjs","sources":["../../../../../../packages/cli/src/commands/migrations/MigrationDescribeCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration, Input } from '@contember/cli-common'\nimport { MigrationPrinter } from '../../lib/migrations/MigrationPrinter'\nimport { MigrationsResolver, SchemaVersionBuilder } from '@contember/migrations-client'\n\ntype Args = {\n\tmigration?: string\n}\n\ntype Options = {\n\t['sql-only']: boolean\n\t['no-sql']: boolean\n}\n\nexport class MigrationDescribeCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly migrationPrinter: MigrationPrinter,\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t\tprivate readonly migrationsResolver: MigrationsResolver,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Describes a migration')\n\t\tconfiguration.argument('migration').optional()\n\t\tconfiguration.option('sql-only').valueNone()\n\t\tconfiguration.option('no-sql').valueNone()\n\t}\n\n\tprotected async execute(input: Input<Args, Options>): Promise<void> {\n\t\tconst migrationArg = input.getArgument('migration')\n\t\tconst sqlOnly = input.getOption('sql-only')\n\t\tconst noSql = input.getOption('no-sql')\n\n\t\tconst migration = migrationArg\n\t\t\t? await this.migrationsResolver.findSchemaMigrationByVersion(migrationArg)\n\t\t\t: await this.migrationsResolver.findLatestSchemaMigration()\n\n\t\tif (!migration) {\n\t\t\tthrow 'Undefined migration'\n\t\t}\n\t\tconst schema = await this.schemaVersionBuilder.buildSchemaUntil(migration.version)\n\t\tthis.migrationPrinter.printMigrationDescription(schema, migration, { sqlOnly, noSql })\n\t}\n}\n"],"names":["Command"],"mappings":";;;AAaO,MAAM,iCAAiCA,UAAAA,QAAuB;AAAA,EACpE,YACkB,kBACA,sBACA,oBAChB;AACD,UAAA;AAJiB,SAAA,mBAAA;AACA,SAAA,uBAAA;AACA,SAAA,qBAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,uBAAuB;AACjD,kBAAc,SAAS,WAAW,EAAE,SAAA;AACpC,kBAAc,OAAO,UAAU,EAAE,UAAA;AACjC,kBAAc,OAAO,QAAQ,EAAE,UAAA;AAAA,EAChC;AAAA,EAEA,MAAgB,QAAQ,OAA4C;AACnE,UAAM,eAAe,MAAM,YAAY,WAAW;AAClD,UAAM,UAAU,MAAM,UAAU,UAAU;AAC1C,UAAM,QAAQ,MAAM,UAAU,QAAQ;AAEtC,UAAM,YAAY,eACf,MAAM,KAAK,mBAAmB,6BAA6B,YAAY,IACvE,MAAM,KAAK,mBAAmB,0BAAA;AAEjC,QAAI,CAAC,WAAW;AACf,YAAM;AAAA,IACP;AACA,UAAM,SAAS,MAAM,KAAK,qBAAqB,iBAAiB,UAAU,OAAO;AACjF,SAAK,iBAAiB,0BAA0B,QAAQ,WAAW,EAAE,SAAS,OAAO;AAAA,EACtF;AACD;;"}
1
+ {"version":3,"file":"MigrationDescribeCommand.cjs","sources":["../../../../../../packages/cli/src/commands/migrations/MigrationDescribeCommand.ts"],"sourcesContent":["import { CliError, Command, CommandConfiguration, ExitCode, Input, Output } from '@contember/cli-common'\nimport { MigrationPrinter } from '../../lib/migrations/MigrationPrinter.js'\nimport { MigrationsResolver, SchemaVersionBuilder } from '@contember/migrations-client'\n\ntype Args = {\n\tmigration?: string\n}\n\ntype Options = {\n\t['sql-only']: boolean\n\t['no-sql']: boolean\n}\n\nexport class MigrationDescribeCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly migrationPrinter: MigrationPrinter,\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t\tprivate readonly migrationsResolver: MigrationsResolver,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Describes a migration')\n\t\tconfiguration.argument('migration').optional()\n\t\tconfiguration.option('sql-only').valueNone()\n\t\tconfiguration.option('no-sql').valueNone()\n\t}\n\n\tprotected async execute(input: Input<Args, Options>, output: Output): Promise<void> {\n\t\tconst migrationArg = input.getArgument('migration')\n\t\tconst sqlOnly = input.getOption('sql-only')\n\t\tconst noSql = input.getOption('no-sql')\n\n\t\tconst migration = migrationArg\n\t\t\t? await this.migrationsResolver.findSchemaMigrationByVersion(migrationArg)\n\t\t\t: await this.migrationsResolver.findLatestSchemaMigration()\n\n\t\tif (!migration) {\n\t\t\tthrow new CliError('Undefined migration', { code: 'MIGRATION_NOT_FOUND', exitCode: ExitCode.NotFound })\n\t\t}\n\t\tconst schema = await this.schemaVersionBuilder.buildSchemaUntil(migration.version)\n\t\t// the description is what the user asked for, so it is data: structured with --json, formatted for a human otherwise\n\t\tconst description = this.migrationPrinter.describeMigration(schema, migration)\n\t\toutput.data(description, {\n\t\t\thuman: it => this.migrationPrinter.formatMigrationDescription(it, { sqlOnly, noSql }),\n\t\t\tquiet: () => migration.version,\n\t\t})\n\t}\n}\n"],"names":["Command","CliError","ExitCode"],"mappings":";;;AAaO,MAAM,iCAAiCA,UAAAA,QAAuB;AAAA,EACpE,YACkB,kBACA,sBACA,oBAChB;AACD,UAAA;AAJiB,SAAA,mBAAA;AACA,SAAA,uBAAA;AACA,SAAA,qBAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,uBAAuB;AACjD,kBAAc,SAAS,WAAW,EAAE,SAAA;AACpC,kBAAc,OAAO,UAAU,EAAE,UAAA;AACjC,kBAAc,OAAO,QAAQ,EAAE,UAAA;AAAA,EAChC;AAAA,EAEA,MAAgB,QAAQ,OAA6B,QAA+B;AACnF,UAAM,eAAe,MAAM,YAAY,WAAW;AAClD,UAAM,UAAU,MAAM,UAAU,UAAU;AAC1C,UAAM,QAAQ,MAAM,UAAU,QAAQ;AAEtC,UAAM,YAAY,eACf,MAAM,KAAK,mBAAmB,6BAA6B,YAAY,IACvE,MAAM,KAAK,mBAAmB,0BAAA;AAEjC,QAAI,CAAC,WAAW;AACf,YAAM,IAAIC,UAAAA,SAAS,uBAAuB,EAAE,MAAM,uBAAuB,UAAUC,mBAAS,UAAU;AAAA,IACvG;AACA,UAAM,SAAS,MAAM,KAAK,qBAAqB,iBAAiB,UAAU,OAAO;AAEjF,UAAM,cAAc,KAAK,iBAAiB,kBAAkB,QAAQ,SAAS;AAC7E,WAAO,KAAK,aAAa;AAAA,MACxB,OAAO,QAAM,KAAK,iBAAiB,2BAA2B,IAAI,EAAE,SAAS,OAAO;AAAA,MACpF,OAAO,MAAM,UAAU;AAAA,IAAA,CACvB;AAAA,EACF;AACD;;"}
@@ -1,4 +1,4 @@
1
- import { Command } from "@contember/cli-common";
1
+ import { Command, CliError, ExitCode } from "@contember/cli-common";
2
2
  class MigrationDescribeCommand extends Command {
3
3
  constructor(migrationPrinter, schemaVersionBuilder, migrationsResolver) {
4
4
  super();
@@ -12,16 +12,20 @@ class MigrationDescribeCommand extends Command {
12
12
  configuration.option("sql-only").valueNone();
13
13
  configuration.option("no-sql").valueNone();
14
14
  }
15
- async execute(input) {
15
+ async execute(input, output) {
16
16
  const migrationArg = input.getArgument("migration");
17
17
  const sqlOnly = input.getOption("sql-only");
18
18
  const noSql = input.getOption("no-sql");
19
19
  const migration = migrationArg ? await this.migrationsResolver.findSchemaMigrationByVersion(migrationArg) : await this.migrationsResolver.findLatestSchemaMigration();
20
20
  if (!migration) {
21
- throw "Undefined migration";
21
+ throw new CliError("Undefined migration", { code: "MIGRATION_NOT_FOUND", exitCode: ExitCode.NotFound });
22
22
  }
23
23
  const schema = await this.schemaVersionBuilder.buildSchemaUntil(migration.version);
24
- this.migrationPrinter.printMigrationDescription(schema, migration, { sqlOnly, noSql });
24
+ const description = this.migrationPrinter.describeMigration(schema, migration);
25
+ output.data(description, {
26
+ human: (it) => this.migrationPrinter.formatMigrationDescription(it, { sqlOnly, noSql }),
27
+ quiet: () => migration.version
28
+ });
25
29
  }
26
30
  }
27
31
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"MigrationDescribeCommand.js","sources":["../../../../../../packages/cli/src/commands/migrations/MigrationDescribeCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration, Input } from '@contember/cli-common'\nimport { MigrationPrinter } from '../../lib/migrations/MigrationPrinter'\nimport { MigrationsResolver, SchemaVersionBuilder } from '@contember/migrations-client'\n\ntype Args = {\n\tmigration?: string\n}\n\ntype Options = {\n\t['sql-only']: boolean\n\t['no-sql']: boolean\n}\n\nexport class MigrationDescribeCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly migrationPrinter: MigrationPrinter,\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t\tprivate readonly migrationsResolver: MigrationsResolver,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Describes a migration')\n\t\tconfiguration.argument('migration').optional()\n\t\tconfiguration.option('sql-only').valueNone()\n\t\tconfiguration.option('no-sql').valueNone()\n\t}\n\n\tprotected async execute(input: Input<Args, Options>): Promise<void> {\n\t\tconst migrationArg = input.getArgument('migration')\n\t\tconst sqlOnly = input.getOption('sql-only')\n\t\tconst noSql = input.getOption('no-sql')\n\n\t\tconst migration = migrationArg\n\t\t\t? await this.migrationsResolver.findSchemaMigrationByVersion(migrationArg)\n\t\t\t: await this.migrationsResolver.findLatestSchemaMigration()\n\n\t\tif (!migration) {\n\t\t\tthrow 'Undefined migration'\n\t\t}\n\t\tconst schema = await this.schemaVersionBuilder.buildSchemaUntil(migration.version)\n\t\tthis.migrationPrinter.printMigrationDescription(schema, migration, { sqlOnly, noSql })\n\t}\n}\n"],"names":[],"mappings":";AAaO,MAAM,iCAAiC,QAAuB;AAAA,EACpE,YACkB,kBACA,sBACA,oBAChB;AACD,UAAA;AAJiB,SAAA,mBAAA;AACA,SAAA,uBAAA;AACA,SAAA,qBAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,uBAAuB;AACjD,kBAAc,SAAS,WAAW,EAAE,SAAA;AACpC,kBAAc,OAAO,UAAU,EAAE,UAAA;AACjC,kBAAc,OAAO,QAAQ,EAAE,UAAA;AAAA,EAChC;AAAA,EAEA,MAAgB,QAAQ,OAA4C;AACnE,UAAM,eAAe,MAAM,YAAY,WAAW;AAClD,UAAM,UAAU,MAAM,UAAU,UAAU;AAC1C,UAAM,QAAQ,MAAM,UAAU,QAAQ;AAEtC,UAAM,YAAY,eACf,MAAM,KAAK,mBAAmB,6BAA6B,YAAY,IACvE,MAAM,KAAK,mBAAmB,0BAAA;AAEjC,QAAI,CAAC,WAAW;AACf,YAAM;AAAA,IACP;AACA,UAAM,SAAS,MAAM,KAAK,qBAAqB,iBAAiB,UAAU,OAAO;AACjF,SAAK,iBAAiB,0BAA0B,QAAQ,WAAW,EAAE,SAAS,OAAO;AAAA,EACtF;AACD;"}
1
+ {"version":3,"file":"MigrationDescribeCommand.js","sources":["../../../../../../packages/cli/src/commands/migrations/MigrationDescribeCommand.ts"],"sourcesContent":["import { CliError, Command, CommandConfiguration, ExitCode, Input, Output } from '@contember/cli-common'\nimport { MigrationPrinter } from '../../lib/migrations/MigrationPrinter.js'\nimport { MigrationsResolver, SchemaVersionBuilder } from '@contember/migrations-client'\n\ntype Args = {\n\tmigration?: string\n}\n\ntype Options = {\n\t['sql-only']: boolean\n\t['no-sql']: boolean\n}\n\nexport class MigrationDescribeCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly migrationPrinter: MigrationPrinter,\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t\tprivate readonly migrationsResolver: MigrationsResolver,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Describes a migration')\n\t\tconfiguration.argument('migration').optional()\n\t\tconfiguration.option('sql-only').valueNone()\n\t\tconfiguration.option('no-sql').valueNone()\n\t}\n\n\tprotected async execute(input: Input<Args, Options>, output: Output): Promise<void> {\n\t\tconst migrationArg = input.getArgument('migration')\n\t\tconst sqlOnly = input.getOption('sql-only')\n\t\tconst noSql = input.getOption('no-sql')\n\n\t\tconst migration = migrationArg\n\t\t\t? await this.migrationsResolver.findSchemaMigrationByVersion(migrationArg)\n\t\t\t: await this.migrationsResolver.findLatestSchemaMigration()\n\n\t\tif (!migration) {\n\t\t\tthrow new CliError('Undefined migration', { code: 'MIGRATION_NOT_FOUND', exitCode: ExitCode.NotFound })\n\t\t}\n\t\tconst schema = await this.schemaVersionBuilder.buildSchemaUntil(migration.version)\n\t\t// the description is what the user asked for, so it is data: structured with --json, formatted for a human otherwise\n\t\tconst description = this.migrationPrinter.describeMigration(schema, migration)\n\t\toutput.data(description, {\n\t\t\thuman: it => this.migrationPrinter.formatMigrationDescription(it, { sqlOnly, noSql }),\n\t\t\tquiet: () => migration.version,\n\t\t})\n\t}\n}\n"],"names":[],"mappings":";AAaO,MAAM,iCAAiC,QAAuB;AAAA,EACpE,YACkB,kBACA,sBACA,oBAChB;AACD,UAAA;AAJiB,SAAA,mBAAA;AACA,SAAA,uBAAA;AACA,SAAA,qBAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,uBAAuB;AACjD,kBAAc,SAAS,WAAW,EAAE,SAAA;AACpC,kBAAc,OAAO,UAAU,EAAE,UAAA;AACjC,kBAAc,OAAO,QAAQ,EAAE,UAAA;AAAA,EAChC;AAAA,EAEA,MAAgB,QAAQ,OAA6B,QAA+B;AACnF,UAAM,eAAe,MAAM,YAAY,WAAW;AAClD,UAAM,UAAU,MAAM,UAAU,UAAU;AAC1C,UAAM,QAAQ,MAAM,UAAU,QAAQ;AAEtC,UAAM,YAAY,eACf,MAAM,KAAK,mBAAmB,6BAA6B,YAAY,IACvE,MAAM,KAAK,mBAAmB,0BAAA;AAEjC,QAAI,CAAC,WAAW;AACf,YAAM,IAAI,SAAS,uBAAuB,EAAE,MAAM,uBAAuB,UAAU,SAAS,UAAU;AAAA,IACvG;AACA,UAAM,SAAS,MAAM,KAAK,qBAAqB,iBAAiB,UAAU,OAAO;AAEjF,UAAM,cAAc,KAAK,iBAAiB,kBAAkB,QAAQ,SAAS;AAC7E,WAAO,KAAK,aAAa;AAAA,MACxB,OAAO,QAAM,KAAK,iBAAiB,2BAA2B,IAAI,EAAE,SAAS,OAAO;AAAA,MACpF,OAAO,MAAM,UAAU;AAAA,IAAA,CACvB;AAAA,EACF;AACD;"}
@@ -2,16 +2,19 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const cliCommon = require("@contember/cli-common");
4
4
  const schemaMigrations = require("@contember/schema-migrations");
5
- const prompts = require("prompts");
5
+ const migrationsClient = require("@contember/migrations-client");
6
6
  const SchemaValidationPrinter = require("../../lib/schema/SchemaValidationPrinter.cjs");
7
+ const prompt = require("../../lib/prompt/prompt.cjs");
7
8
  class MigrationDiffCommand extends cliCommon.Command {
8
- constructor(schemaLoader, schemaVersionBuilder, migrationCreator, migrationPrinter, migrationExecutorFacade) {
9
+ constructor(schemaLoader, schemaVersionBuilder, migrationCreator, migrationPrinter, migrationExecutorFacade, schemaStateManager, migrationsResolver) {
9
10
  super();
10
11
  this.schemaLoader = schemaLoader;
11
12
  this.schemaVersionBuilder = schemaVersionBuilder;
12
13
  this.migrationCreator = migrationCreator;
13
14
  this.migrationPrinter = migrationPrinter;
14
15
  this.migrationExecutorFacade = migrationExecutorFacade;
16
+ this.schemaStateManager = schemaStateManager;
17
+ this.migrationsResolver = migrationsResolver;
15
18
  }
16
19
  configure(configuration) {
17
20
  configuration.description("Creates schema migration diff");
@@ -19,27 +22,84 @@ class MigrationDiffCommand extends cliCommon.Command {
19
22
  configuration.option("execute").valueNone();
20
23
  configuration.option("yes").valueNone().description("Do not ask for confirmation.");
21
24
  configuration.option("skip-initial-schema-validation");
25
+ configuration.option("recreate-views").valueNone().description(
26
+ "Drop & recreate changed views instead of updating them in-place (CREATE OR REPLACE VIEW). Use when an in-place view update fails with SQLSTATE 42P16."
27
+ );
22
28
  }
23
- async execute(input) {
29
+ async execute(input, output) {
24
30
  const migrationName = input.getArgument("migrationName");
25
31
  let shouldExecute = input.getOption("execute");
26
32
  const yes = input.getOption("yes");
27
33
  const skipInitialSchemaValidation = input.getOption("skip-initial-schema-validation") === true;
34
+ const recreateViews = input.getOption("recreate-views") === true;
28
35
  const schema = await this.schemaLoader.loadSchema();
36
+ let stateMode = await this.schemaStateManager.isStateMode();
37
+ let initializeStateMode = false;
38
+ if (!stateMode && (await this.migrationsResolver.getSchemaMigrations()).length === 0) {
39
+ output.info("No migrations found — enabling schema state mode for this project.");
40
+ output.info("ACL, validation, actions and settings will be managed in the state/ directory instead of migrations.");
41
+ stateMode = true;
42
+ initializeStateMode = true;
43
+ }
29
44
  try {
30
45
  const initialSchema = await this.schemaVersionBuilder.buildSchema();
31
46
  const result = await this.migrationCreator.prepareMigration(initialSchema, schema, migrationName, {
32
- skipInitialSchemaValidation
47
+ skipInitialSchemaValidation,
48
+ skipNonModelDiffers: stateMode,
49
+ recreateViews
33
50
  });
51
+ const schemaState = stateMode ? migrationsClient.SchemaStateManager.schemaStateFromSchema(schema) : void 0;
52
+ const stateChanged = schemaState ? await this.schemaStateManager.writeState(schemaState, { dryRun: true }) : false;
34
53
  if (result === null) {
35
- console.log("Nothing to do");
54
+ if (stateChanged) {
55
+ if (!yes) {
56
+ if (!output.canPrompt()) {
57
+ throw new cliCommon.CliError("TTY not available. Pass --yes to confirm the schema state update.", {
58
+ code: "TTY_UNAVAILABLE",
59
+ exitCode: cliCommon.ExitCode.InputError
60
+ });
61
+ }
62
+ const confirmed = await prompt.promptConfirm(output, {
63
+ message: "Write the schema state changes?",
64
+ initial: false
65
+ });
66
+ if (!confirmed) {
67
+ throw abortedError("Schema state update");
68
+ }
69
+ }
70
+ if (schemaState === void 0) {
71
+ throw new cliCommon.CliError("Schema state is unavailable", { code: "SCHEMA_STATE_UNAVAILABLE", exitCode: cliCommon.ExitCode.InternalError });
72
+ }
73
+ if (initializeStateMode) {
74
+ await this.schemaStateManager.extractState(schema);
75
+ } else {
76
+ await this.schemaStateManager.writeState(schemaState);
77
+ }
78
+ } else {
79
+ output.info("Nothing to do");
80
+ }
81
+ if (stateChanged && shouldExecute) {
82
+ output.info("Syncing schema state to server...");
83
+ await this.migrationExecutorFacade.execute({
84
+ force: false,
85
+ requireConfirmation: false
86
+ });
87
+ }
88
+ output.data(
89
+ { migration: null, stateUpdated: stateChanged, executed: stateChanged && shouldExecute === true },
90
+ { human: (value) => value.stateUpdated ? "Schema state updated" : "Nothing to do", quiet: (value) => value.stateUpdated }
91
+ );
36
92
  return;
37
93
  }
38
94
  this.migrationPrinter.printMigrationDescription(result.initialSchema, result.migration, { noSql: true });
39
95
  if (!yes) {
40
- const { action } = await prompts({
41
- type: "select",
42
- name: "action",
96
+ if (!output.canPrompt()) {
97
+ throw new cliCommon.CliError("TTY not available. Pass --yes to confirm execution.", {
98
+ code: "TTY_UNAVAILABLE",
99
+ exitCode: cliCommon.ExitCode.InputError
100
+ });
101
+ }
102
+ const action = await prompt.promptSelect(output, {
43
103
  message: "Do you want to continue?",
44
104
  choices: [
45
105
  { value: "yes", title: "Yes" },
@@ -48,29 +108,53 @@ class MigrationDiffCommand extends cliCommon.Command {
48
108
  ]
49
109
  });
50
110
  if (!action || action === "no") {
51
- console.log("Aborting");
52
- return;
111
+ throw abortedError("Migration creation");
53
112
  }
54
113
  if (action === "execute") {
55
114
  shouldExecute = true;
56
115
  }
57
116
  }
58
117
  const filename = await this.migrationCreator.saveMigration(result.migration);
59
- console.log(`${filename} created`);
118
+ if (stateChanged) {
119
+ if (schemaState === void 0) {
120
+ throw new cliCommon.CliError("Schema state is unavailable", { code: "SCHEMA_STATE_UNAVAILABLE", exitCode: cliCommon.ExitCode.InternalError });
121
+ }
122
+ if (initializeStateMode) {
123
+ await this.schemaStateManager.extractState(schema);
124
+ } else {
125
+ await this.schemaStateManager.writeState(schemaState);
126
+ }
127
+ }
128
+ if (stateChanged) {
129
+ output.info("Schema state files updated");
130
+ }
131
+ if (shouldExecute) {
132
+ await this.migrationExecutorFacade.execute({
133
+ force: false,
134
+ requireConfirmation: yes ? false : (migrations) => migrations.some((migration) => migration.name !== result.migration.name)
135
+ });
136
+ }
137
+ output.data(
138
+ { migration: filename, stateUpdated: stateChanged, executed: shouldExecute === true },
139
+ { human: (value) => `${value.migration} created`, quiet: (value) => value.migration }
140
+ );
60
141
  } catch (e) {
61
142
  if (e instanceof schemaMigrations.InvalidSchemaException) {
62
- SchemaValidationPrinter.printValidationErrors(e.validationErrors, e.message);
63
- return;
143
+ SchemaValidationPrinter.printValidationErrors(e.validationErrors, e.message, output);
144
+ throw new cliCommon.CliError(e.message, {
145
+ code: "SCHEMA_INVALID",
146
+ exitCode: cliCommon.ExitCode.InputError,
147
+ details: e.validationErrors,
148
+ cause: e
149
+ });
64
150
  }
65
151
  throw e;
66
152
  }
67
- if (shouldExecute) {
68
- await this.migrationExecutorFacade.execute({
69
- force: false,
70
- requireConfirmation: (migrations) => migrations.length !== 1 && !yes
71
- });
72
- }
73
153
  }
74
154
  }
155
+ const abortedError = (operation) => new cliCommon.CliError(`${operation} aborted`, {
156
+ code: "OPERATION_ABORTED",
157
+ exitCode: cliCommon.ExitCode.InputError
158
+ });
75
159
  exports.MigrationDiffCommand = MigrationDiffCommand;
76
160
  //# sourceMappingURL=MigrationDiffCommand.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"MigrationDiffCommand.cjs","sources":["../../../../../../packages/cli/src/commands/migrations/MigrationDiffCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration, Input } from '@contember/cli-common'\nimport { InvalidSchemaException } from '@contember/schema-migrations'\nimport prompts from 'prompts'\nimport { MigrationCreator, SchemaVersionBuilder } from '@contember/migrations-client'\nimport { SchemaLoader } from '../../lib/schema/SchemaLoader'\nimport { MigrationPrinter } from '../../lib/migrations/MigrationPrinter'\nimport { MigrationExecutionFacade } from '../../lib/migrations/MigrationExecutionFacade'\nimport { printValidationErrors } from '../../lib/schema/SchemaValidationPrinter'\n\ntype Args = {\n\tmigrationName: string\n}\n\ntype Options = {\n\texecute?: true\n\tyes?: true\n\t'skip-initial-schema-validation'?: true\n}\n\nexport class MigrationDiffCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly schemaLoader: SchemaLoader,\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t\tprivate readonly migrationCreator: MigrationCreator,\n\t\tprivate readonly migrationPrinter: MigrationPrinter,\n\t\tprivate readonly migrationExecutorFacade: MigrationExecutionFacade,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Creates schema migration diff')\n\t\tconfiguration.argument('migrationName')\n\t\tconfiguration.option('execute').valueNone()\n\t\tconfiguration //\n\t\t\t.option('yes')\n\t\t\t.valueNone()\n\t\t\t.description('Do not ask for confirmation.')\n\n\t\tconfiguration.option('skip-initial-schema-validation')\n\t}\n\n\tprotected async execute(input: Input<Args, Options>): Promise<void> {\n\t\tconst migrationName = input.getArgument('migrationName')\n\t\tlet shouldExecute = input.getOption('execute')\n\t\tconst yes = input.getOption('yes')\n\t\tconst skipInitialSchemaValidation = input.getOption('skip-initial-schema-validation') === true\n\n\t\tconst schema = await this.schemaLoader.loadSchema()\n\t\ttry {\n\t\t\tconst initialSchema = await this.schemaVersionBuilder.buildSchema()\n\t\t\tconst result = await this.migrationCreator.prepareMigration(initialSchema, schema, migrationName, {\n\t\t\t\tskipInitialSchemaValidation: skipInitialSchemaValidation,\n\t\t\t})\n\t\t\tif (result === null) {\n\t\t\t\tconsole.log('Nothing to do')\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.migrationPrinter.printMigrationDescription(result.initialSchema, result.migration, { noSql: true })\n\n\t\t\tif (!yes) {\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: 'Yes' },\n\t\t\t\t\t\t...(!shouldExecute ? [{ value: 'execute', title: 'Yes and execute immediately' }] : []),\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 || action === 'no') {\n\t\t\t\t\tconsole.log('Aborting')\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif (action === 'execute') {\n\t\t\t\t\tshouldExecute = true\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst filename = await this.migrationCreator.saveMigration(result.migration)\n\n\t\t\tconsole.log(`${filename} created`)\n\t\t} catch (e) {\n\t\t\tif (e instanceof InvalidSchemaException) {\n\t\t\t\tprintValidationErrors(e.validationErrors, e.message)\n\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthrow e\n\t\t}\n\n\t\tif (shouldExecute) {\n\t\t\tawait this.migrationExecutorFacade.execute({\n\t\t\t\tforce: false,\n\t\t\t\trequireConfirmation: migrations => migrations.length !== 1 && !yes,\n\t\t\t})\n\t\t}\n\t}\n}\n"],"names":["Command","InvalidSchemaException","printValidationErrors"],"mappings":";;;;;;AAmBO,MAAM,6BAA6BA,UAAAA,QAAuB;AAAA,EAChE,YACkB,cACA,sBACA,kBACA,kBACA,yBAChB;AACD,UAAA;AANiB,SAAA,eAAA;AACA,SAAA,uBAAA;AACA,SAAA,mBAAA;AACA,SAAA,mBAAA;AACA,SAAA,0BAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,+BAA+B;AACzD,kBAAc,SAAS,eAAe;AACtC,kBAAc,OAAO,SAAS,EAAE,UAAA;AAChC,kBACE,OAAO,KAAK,EACZ,UAAA,EACA,YAAY,8BAA8B;AAE5C,kBAAc,OAAO,gCAAgC;AAAA,EACtD;AAAA,EAEA,MAAgB,QAAQ,OAA4C;AACnE,UAAM,gBAAgB,MAAM,YAAY,eAAe;AACvD,QAAI,gBAAgB,MAAM,UAAU,SAAS;AAC7C,UAAM,MAAM,MAAM,UAAU,KAAK;AACjC,UAAM,8BAA8B,MAAM,UAAU,gCAAgC,MAAM;AAE1F,UAAM,SAAS,MAAM,KAAK,aAAa,WAAA;AACvC,QAAI;AACH,YAAM,gBAAgB,MAAM,KAAK,qBAAqB,YAAA;AACtD,YAAM,SAAS,MAAM,KAAK,iBAAiB,iBAAiB,eAAe,QAAQ,eAAe;AAAA,QACjG;AAAA,MAAA,CACA;AACD,UAAI,WAAW,MAAM;AACpB,gBAAQ,IAAI,eAAe;AAC3B;AAAA,MACD;AACA,WAAK,iBAAiB,0BAA0B,OAAO,eAAe,OAAO,WAAW,EAAE,OAAO,MAAM;AAEvG,UAAI,CAAC,KAAK;AACT,cAAM,EAAE,WAAW,MAAM,QAAQ;AAAA,UAChC,MAAM;AAAA,UACN,MAAM;AAAA,UACN,SAAS;AAAA,UACT,SAAS;AAAA,YACR,EAAE,OAAO,OAAO,OAAO,MAAA;AAAA,YACvB,GAAI,CAAC,gBAAgB,CAAC,EAAE,OAAO,WAAW,OAAO,8BAAA,CAA+B,IAAI,CAAA;AAAA,YACpF,EAAE,OAAO,MAAM,OAAO,QAAA;AAAA,UAAQ;AAAA,QAC/B,CACA;AACD,YAAI,CAAC,UAAU,WAAW,MAAM;AAC/B,kBAAQ,IAAI,UAAU;AACtB;AAAA,QACD;AACA,YAAI,WAAW,WAAW;AACzB,0BAAgB;AAAA,QACjB;AAAA,MACD;AAEA,YAAM,WAAW,MAAM,KAAK,iBAAiB,cAAc,OAAO,SAAS;AAE3E,cAAQ,IAAI,GAAG,QAAQ,UAAU;AAAA,IAClC,SAAS,GAAG;AACX,UAAI,aAAaC,iBAAAA,wBAAwB;AACxCC,gCAAAA,sBAAsB,EAAE,kBAAkB,EAAE,OAAO;AAEnD;AAAA,MACD;AACA,YAAM;AAAA,IACP;AAEA,QAAI,eAAe;AAClB,YAAM,KAAK,wBAAwB,QAAQ;AAAA,QAC1C,OAAO;AAAA,QACP,qBAAqB,CAAA,eAAc,WAAW,WAAW,KAAK,CAAC;AAAA,MAAA,CAC/D;AAAA,IACF;AAAA,EACD;AACD;;"}
1
+ {"version":3,"file":"MigrationDiffCommand.cjs","sources":["../../../../../../packages/cli/src/commands/migrations/MigrationDiffCommand.ts"],"sourcesContent":["import { CliError, Command, CommandConfiguration, ExitCode, Input, Output } from '@contember/cli-common'\nimport { InvalidSchemaException } from '@contember/schema-migrations'\nimport { MigrationCreator, MigrationsResolver, SchemaStateManager, SchemaVersionBuilder } from '@contember/migrations-client'\nimport { SchemaLoader } from '../../lib/schema/SchemaLoader.js'\nimport { MigrationPrinter } from '../../lib/migrations/MigrationPrinter.js'\nimport { MigrationExecutionFacade } from '../../lib/migrations/MigrationExecutionFacade.js'\nimport { printValidationErrors } from '../../lib/schema/SchemaValidationPrinter.js'\nimport { promptConfirm, promptSelect } from '../../lib/prompt/index.js'\n\ntype MigrationExecutor = Pick<MigrationExecutionFacade, 'execute'>\n\ntype Args = {\n\tmigrationName: string\n}\n\ntype Options = {\n\texecute?: true\n\tyes?: true\n\t'skip-initial-schema-validation'?: true\n\t'recreate-views'?: true\n}\n\nexport class MigrationDiffCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly schemaLoader: SchemaLoader,\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t\tprivate readonly migrationCreator: MigrationCreator,\n\t\tprivate readonly migrationPrinter: MigrationPrinter,\n\t\tprivate readonly migrationExecutorFacade: MigrationExecutor,\n\t\tprivate readonly schemaStateManager: SchemaStateManager,\n\t\tprivate readonly migrationsResolver: MigrationsResolver,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Creates schema migration diff')\n\t\tconfiguration.argument('migrationName')\n\t\tconfiguration.option('execute').valueNone()\n\t\tconfiguration //\n\t\t\t.option('yes')\n\t\t\t.valueNone()\n\t\t\t.description('Do not ask for confirmation.')\n\n\t\tconfiguration.option('skip-initial-schema-validation')\n\t\tconfiguration //\n\t\t\t.option('recreate-views')\n\t\t\t.valueNone()\n\t\t\t.description(\n\t\t\t\t'Drop & recreate changed views instead of updating them in-place (CREATE OR REPLACE VIEW). Use when an in-place view update fails with SQLSTATE 42P16.',\n\t\t\t)\n\t}\n\n\tprotected async execute(input: Input<Args, Options>, output: Output): Promise<void> {\n\t\tconst migrationName = input.getArgument('migrationName')\n\t\tlet shouldExecute = input.getOption('execute')\n\t\tconst yes = input.getOption('yes')\n\t\tconst skipInitialSchemaValidation = input.getOption('skip-initial-schema-validation') === true\n\t\tconst recreateViews = input.getOption('recreate-views') === true\n\n\t\tconst schema = await this.schemaLoader.loadSchema()\n\t\tlet stateMode = await this.schemaStateManager.isStateMode()\n\t\tlet initializeStateMode = false\n\n\t\t// New project (no migrations yet) defaults to schema state mode. To opt out, create a migration first (e.g. `migrations blank`).\n\t\tif (!stateMode && (await this.migrationsResolver.getSchemaMigrations()).length === 0) {\n\t\t\toutput.info('No migrations found — enabling schema state mode for this project.')\n\t\t\toutput.info('ACL, validation, actions and settings will be managed in the state/ directory instead of migrations.')\n\t\t\tstateMode = true\n\t\t\tinitializeStateMode = true\n\t\t}\n\n\t\ttry {\n\t\t\tconst initialSchema = await this.schemaVersionBuilder.buildSchema()\n\t\t\tconst result = await this.migrationCreator.prepareMigration(initialSchema, schema, migrationName, {\n\t\t\t\tskipInitialSchemaValidation: skipInitialSchemaValidation,\n\t\t\t\tskipNonModelDiffers: stateMode,\n\t\t\t\trecreateViews,\n\t\t\t})\n\n\t\t\tconst schemaState = stateMode ? SchemaStateManager.schemaStateFromSchema(schema) : undefined\n\t\t\tconst stateChanged = schemaState ? await this.schemaStateManager.writeState(schemaState, { dryRun: true }) : false\n\n\t\t\tif (result === null) {\n\t\t\t\tif (stateChanged) {\n\t\t\t\t\tif (!yes) {\n\t\t\t\t\t\tif (!output.canPrompt()) {\n\t\t\t\t\t\t\tthrow new CliError('TTY not available. Pass --yes to confirm the schema state update.', {\n\t\t\t\t\t\t\t\tcode: 'TTY_UNAVAILABLE',\n\t\t\t\t\t\t\t\texitCode: ExitCode.InputError,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst confirmed = await promptConfirm(output, {\n\t\t\t\t\t\t\tmessage: 'Write the schema state changes?',\n\t\t\t\t\t\t\tinitial: false,\n\t\t\t\t\t\t})\n\t\t\t\t\t\tif (!confirmed) {\n\t\t\t\t\t\t\tthrow abortedError('Schema state update')\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (schemaState === undefined) {\n\t\t\t\t\t\tthrow new CliError('Schema state is unavailable', { code: 'SCHEMA_STATE_UNAVAILABLE', exitCode: ExitCode.InternalError })\n\t\t\t\t\t}\n\t\t\t\t\tif (initializeStateMode) {\n\t\t\t\t\t\tawait this.schemaStateManager.extractState(schema)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tawait this.schemaStateManager.writeState(schemaState)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\toutput.info('Nothing to do')\n\t\t\t\t}\n\t\t\t\tif (stateChanged && shouldExecute) {\n\t\t\t\t\toutput.info('Syncing schema state to server...')\n\t\t\t\t\tawait this.migrationExecutorFacade.execute({\n\t\t\t\t\t\tforce: false,\n\t\t\t\t\t\trequireConfirmation: false,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\toutput.data(\n\t\t\t\t\t{ migration: null, stateUpdated: stateChanged, executed: stateChanged && shouldExecute === true },\n\t\t\t\t\t{ human: value => value.stateUpdated ? 'Schema state updated' : 'Nothing to do', quiet: value => value.stateUpdated },\n\t\t\t\t)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.migrationPrinter.printMigrationDescription(result.initialSchema, result.migration, { noSql: true })\n\n\t\t\tif (!yes) {\n\t\t\t\tif (!output.canPrompt()) {\n\t\t\t\t\tthrow new CliError('TTY not available. Pass --yes to confirm execution.', {\n\t\t\t\t\t\tcode: 'TTY_UNAVAILABLE',\n\t\t\t\t\t\texitCode: ExitCode.InputError,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tconst action = await promptSelect(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: 'Yes' },\n\t\t\t\t\t\t...(!shouldExecute ? [{ value: 'execute', title: 'Yes and execute immediately' }] : []),\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 || action === 'no') {\n\t\t\t\t\tthrow abortedError('Migration creation')\n\t\t\t\t}\n\t\t\t\tif (action === 'execute') {\n\t\t\t\t\tshouldExecute = true\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst filename = await this.migrationCreator.saveMigration(result.migration)\n\t\t\tif (stateChanged) {\n\t\t\t\tif (schemaState === undefined) {\n\t\t\t\t\tthrow new CliError('Schema state is unavailable', { code: 'SCHEMA_STATE_UNAVAILABLE', exitCode: ExitCode.InternalError })\n\t\t\t\t}\n\t\t\t\tif (initializeStateMode) {\n\t\t\t\t\tawait this.schemaStateManager.extractState(schema)\n\t\t\t\t} else {\n\t\t\t\t\tawait this.schemaStateManager.writeState(schemaState)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (stateChanged) {\n\t\t\t\toutput.info('Schema state files updated')\n\t\t\t}\n\n\t\t\tif (shouldExecute) {\n\t\t\t\tawait this.migrationExecutorFacade.execute({\n\t\t\t\t\tforce: false,\n\t\t\t\t\trequireConfirmation: yes\n\t\t\t\t\t\t? false\n\t\t\t\t\t\t: migrations => migrations.some(migration => migration.name !== result.migration.name),\n\t\t\t\t})\n\t\t\t}\n\t\t\toutput.data(\n\t\t\t\t{ migration: filename, stateUpdated: stateChanged, executed: shouldExecute === true },\n\t\t\t\t{ human: value => `${value.migration} created`, quiet: value => value.migration },\n\t\t\t)\n\t\t} catch (e) {\n\t\t\tif (e instanceof InvalidSchemaException) {\n\t\t\t\tprintValidationErrors(e.validationErrors, e.message, output)\n\t\t\t\tthrow new CliError(e.message, {\n\t\t\t\t\tcode: 'SCHEMA_INVALID',\n\t\t\t\t\texitCode: ExitCode.InputError,\n\t\t\t\t\tdetails: e.validationErrors,\n\t\t\t\t\tcause: e,\n\t\t\t\t})\n\t\t\t}\n\t\t\tthrow e\n\t\t}\n\t}\n}\n\nconst abortedError = (operation: string): CliError =>\n\tnew CliError(`${operation} aborted`, {\n\t\tcode: 'OPERATION_ABORTED',\n\t\texitCode: ExitCode.InputError,\n\t})\n"],"names":["Command","SchemaStateManager","CliError","ExitCode","promptConfirm","promptSelect","InvalidSchemaException","printValidationErrors"],"mappings":";;;;;;;AAsBO,MAAM,6BAA6BA,UAAAA,QAAuB;AAAA,EAChE,YACkB,cACA,sBACA,kBACA,kBACA,yBACA,oBACA,oBAChB;AACD,UAAA;AARiB,SAAA,eAAA;AACA,SAAA,uBAAA;AACA,SAAA,mBAAA;AACA,SAAA,mBAAA;AACA,SAAA,0BAAA;AACA,SAAA,qBAAA;AACA,SAAA,qBAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,+BAA+B;AACzD,kBAAc,SAAS,eAAe;AACtC,kBAAc,OAAO,SAAS,EAAE,UAAA;AAChC,kBACE,OAAO,KAAK,EACZ,UAAA,EACA,YAAY,8BAA8B;AAE5C,kBAAc,OAAO,gCAAgC;AACrD,kBACE,OAAO,gBAAgB,EACvB,UAAA,EACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEH;AAAA,EAEA,MAAgB,QAAQ,OAA6B,QAA+B;AACnF,UAAM,gBAAgB,MAAM,YAAY,eAAe;AACvD,QAAI,gBAAgB,MAAM,UAAU,SAAS;AAC7C,UAAM,MAAM,MAAM,UAAU,KAAK;AACjC,UAAM,8BAA8B,MAAM,UAAU,gCAAgC,MAAM;AAC1F,UAAM,gBAAgB,MAAM,UAAU,gBAAgB,MAAM;AAE5D,UAAM,SAAS,MAAM,KAAK,aAAa,WAAA;AACvC,QAAI,YAAY,MAAM,KAAK,mBAAmB,YAAA;AAC9C,QAAI,sBAAsB;AAG1B,QAAI,CAAC,cAAc,MAAM,KAAK,mBAAmB,oBAAA,GAAuB,WAAW,GAAG;AACrF,aAAO,KAAK,oEAAoE;AAChF,aAAO,KAAK,sGAAsG;AAClH,kBAAY;AACZ,4BAAsB;AAAA,IACvB;AAEA,QAAI;AACH,YAAM,gBAAgB,MAAM,KAAK,qBAAqB,YAAA;AACtD,YAAM,SAAS,MAAM,KAAK,iBAAiB,iBAAiB,eAAe,QAAQ,eAAe;AAAA,QACjG;AAAA,QACA,qBAAqB;AAAA,QACrB;AAAA,MAAA,CACA;AAED,YAAM,cAAc,YAAYC,iBAAAA,mBAAmB,sBAAsB,MAAM,IAAI;AACnF,YAAM,eAAe,cAAc,MAAM,KAAK,mBAAmB,WAAW,aAAa,EAAE,QAAQ,KAAA,CAAM,IAAI;AAE7G,UAAI,WAAW,MAAM;AACpB,YAAI,cAAc;AACjB,cAAI,CAAC,KAAK;AACT,gBAAI,CAAC,OAAO,aAAa;AACxB,oBAAM,IAAIC,UAAAA,SAAS,qEAAqE;AAAA,gBACvF,MAAM;AAAA,gBACN,UAAUC,UAAAA,SAAS;AAAA,cAAA,CACnB;AAAA,YACF;AACA,kBAAM,YAAY,MAAMC,OAAAA,cAAc,QAAQ;AAAA,cAC7C,SAAS;AAAA,cACT,SAAS;AAAA,YAAA,CACT;AACD,gBAAI,CAAC,WAAW;AACf,oBAAM,aAAa,qBAAqB;AAAA,YACzC;AAAA,UACD;AACA,cAAI,gBAAgB,QAAW;AAC9B,kBAAM,IAAIF,UAAAA,SAAS,+BAA+B,EAAE,MAAM,4BAA4B,UAAUC,mBAAS,eAAe;AAAA,UACzH;AACA,cAAI,qBAAqB;AACxB,kBAAM,KAAK,mBAAmB,aAAa,MAAM;AAAA,UAClD,OAAO;AACN,kBAAM,KAAK,mBAAmB,WAAW,WAAW;AAAA,UACrD;AAAA,QACD,OAAO;AACN,iBAAO,KAAK,eAAe;AAAA,QAC5B;AACA,YAAI,gBAAgB,eAAe;AAClC,iBAAO,KAAK,mCAAmC;AAC/C,gBAAM,KAAK,wBAAwB,QAAQ;AAAA,YAC1C,OAAO;AAAA,YACP,qBAAqB;AAAA,UAAA,CACrB;AAAA,QACF;AACA,eAAO;AAAA,UACN,EAAE,WAAW,MAAM,cAAc,cAAc,UAAU,gBAAgB,kBAAkB,KAAA;AAAA,UAC3F,EAAE,OAAO,CAAA,UAAS,MAAM,eAAe,yBAAyB,iBAAiB,OAAO,CAAA,UAAS,MAAM,aAAA;AAAA,QAAa;AAErH;AAAA,MACD;AACA,WAAK,iBAAiB,0BAA0B,OAAO,eAAe,OAAO,WAAW,EAAE,OAAO,MAAM;AAEvG,UAAI,CAAC,KAAK;AACT,YAAI,CAAC,OAAO,aAAa;AACxB,gBAAM,IAAID,UAAAA,SAAS,uDAAuD;AAAA,YACzE,MAAM;AAAA,YACN,UAAUC,UAAAA,SAAS;AAAA,UAAA,CACnB;AAAA,QACF;AACA,cAAM,SAAS,MAAME,OAAAA,aAAa,QAAQ;AAAA,UACzC,SAAS;AAAA,UACT,SAAS;AAAA,YACR,EAAE,OAAO,OAAO,OAAO,MAAA;AAAA,YACvB,GAAI,CAAC,gBAAgB,CAAC,EAAE,OAAO,WAAW,OAAO,8BAAA,CAA+B,IAAI,CAAA;AAAA,YACpF,EAAE,OAAO,MAAM,OAAO,QAAA;AAAA,UAAQ;AAAA,QAC/B,CACA;AACD,YAAI,CAAC,UAAU,WAAW,MAAM;AAC/B,gBAAM,aAAa,oBAAoB;AAAA,QACxC;AACA,YAAI,WAAW,WAAW;AACzB,0BAAgB;AAAA,QACjB;AAAA,MACD;AAEA,YAAM,WAAW,MAAM,KAAK,iBAAiB,cAAc,OAAO,SAAS;AAC3E,UAAI,cAAc;AACjB,YAAI,gBAAgB,QAAW;AAC9B,gBAAM,IAAIH,UAAAA,SAAS,+BAA+B,EAAE,MAAM,4BAA4B,UAAUC,mBAAS,eAAe;AAAA,QACzH;AACA,YAAI,qBAAqB;AACxB,gBAAM,KAAK,mBAAmB,aAAa,MAAM;AAAA,QAClD,OAAO;AACN,gBAAM,KAAK,mBAAmB,WAAW,WAAW;AAAA,QACrD;AAAA,MACD;AACA,UAAI,cAAc;AACjB,eAAO,KAAK,4BAA4B;AAAA,MACzC;AAEA,UAAI,eAAe;AAClB,cAAM,KAAK,wBAAwB,QAAQ;AAAA,UAC1C,OAAO;AAAA,UACP,qBAAqB,MAClB,QACA,CAAA,eAAc,WAAW,KAAK,CAAA,cAAa,UAAU,SAAS,OAAO,UAAU,IAAI;AAAA,QAAA,CACtF;AAAA,MACF;AACA,aAAO;AAAA,QACN,EAAE,WAAW,UAAU,cAAc,cAAc,UAAU,kBAAkB,KAAA;AAAA,QAC/E,EAAE,OAAO,CAAA,UAAS,GAAG,MAAM,SAAS,YAAY,OAAO,CAAA,UAAS,MAAM,UAAA;AAAA,MAAU;AAAA,IAElF,SAAS,GAAG;AACX,UAAI,aAAaG,iBAAAA,wBAAwB;AACxCC,gCAAAA,sBAAsB,EAAE,kBAAkB,EAAE,SAAS,MAAM;AAC3D,cAAM,IAAIL,UAAAA,SAAS,EAAE,SAAS;AAAA,UAC7B,MAAM;AAAA,UACN,UAAUC,UAAAA,SAAS;AAAA,UACnB,SAAS,EAAE;AAAA,UACX,OAAO;AAAA,QAAA,CACP;AAAA,MACF;AACA,YAAM;AAAA,IACP;AAAA,EACD;AACD;AAEA,MAAM,eAAe,CAAC,cACrB,IAAID,UAAAA,SAAS,GAAG,SAAS,YAAY;AAAA,EACpC,MAAM;AAAA,EACN,UAAUC,UAAAA,SAAS;AACpB,CAAC;;"}
@@ -1,15 +1,18 @@
1
- import { Command } from "@contember/cli-common";
1
+ import { Command, CliError, ExitCode } from "@contember/cli-common";
2
2
  import { InvalidSchemaException } from "@contember/schema-migrations";
3
- import prompts from "prompts";
3
+ import { SchemaStateManager } from "@contember/migrations-client";
4
4
  import { printValidationErrors } from "../../lib/schema/SchemaValidationPrinter.js";
5
+ import { promptConfirm, promptSelect } from "../../lib/prompt/prompt.js";
5
6
  class MigrationDiffCommand extends Command {
6
- constructor(schemaLoader, schemaVersionBuilder, migrationCreator, migrationPrinter, migrationExecutorFacade) {
7
+ constructor(schemaLoader, schemaVersionBuilder, migrationCreator, migrationPrinter, migrationExecutorFacade, schemaStateManager, migrationsResolver) {
7
8
  super();
8
9
  this.schemaLoader = schemaLoader;
9
10
  this.schemaVersionBuilder = schemaVersionBuilder;
10
11
  this.migrationCreator = migrationCreator;
11
12
  this.migrationPrinter = migrationPrinter;
12
13
  this.migrationExecutorFacade = migrationExecutorFacade;
14
+ this.schemaStateManager = schemaStateManager;
15
+ this.migrationsResolver = migrationsResolver;
13
16
  }
14
17
  configure(configuration) {
15
18
  configuration.description("Creates schema migration diff");
@@ -17,27 +20,84 @@ class MigrationDiffCommand extends Command {
17
20
  configuration.option("execute").valueNone();
18
21
  configuration.option("yes").valueNone().description("Do not ask for confirmation.");
19
22
  configuration.option("skip-initial-schema-validation");
23
+ configuration.option("recreate-views").valueNone().description(
24
+ "Drop & recreate changed views instead of updating them in-place (CREATE OR REPLACE VIEW). Use when an in-place view update fails with SQLSTATE 42P16."
25
+ );
20
26
  }
21
- async execute(input) {
27
+ async execute(input, output) {
22
28
  const migrationName = input.getArgument("migrationName");
23
29
  let shouldExecute = input.getOption("execute");
24
30
  const yes = input.getOption("yes");
25
31
  const skipInitialSchemaValidation = input.getOption("skip-initial-schema-validation") === true;
32
+ const recreateViews = input.getOption("recreate-views") === true;
26
33
  const schema = await this.schemaLoader.loadSchema();
34
+ let stateMode = await this.schemaStateManager.isStateMode();
35
+ let initializeStateMode = false;
36
+ if (!stateMode && (await this.migrationsResolver.getSchemaMigrations()).length === 0) {
37
+ output.info("No migrations found — enabling schema state mode for this project.");
38
+ output.info("ACL, validation, actions and settings will be managed in the state/ directory instead of migrations.");
39
+ stateMode = true;
40
+ initializeStateMode = true;
41
+ }
27
42
  try {
28
43
  const initialSchema = await this.schemaVersionBuilder.buildSchema();
29
44
  const result = await this.migrationCreator.prepareMigration(initialSchema, schema, migrationName, {
30
- skipInitialSchemaValidation
45
+ skipInitialSchemaValidation,
46
+ skipNonModelDiffers: stateMode,
47
+ recreateViews
31
48
  });
49
+ const schemaState = stateMode ? SchemaStateManager.schemaStateFromSchema(schema) : void 0;
50
+ const stateChanged = schemaState ? await this.schemaStateManager.writeState(schemaState, { dryRun: true }) : false;
32
51
  if (result === null) {
33
- console.log("Nothing to do");
52
+ if (stateChanged) {
53
+ if (!yes) {
54
+ if (!output.canPrompt()) {
55
+ throw new CliError("TTY not available. Pass --yes to confirm the schema state update.", {
56
+ code: "TTY_UNAVAILABLE",
57
+ exitCode: ExitCode.InputError
58
+ });
59
+ }
60
+ const confirmed = await promptConfirm(output, {
61
+ message: "Write the schema state changes?",
62
+ initial: false
63
+ });
64
+ if (!confirmed) {
65
+ throw abortedError("Schema state update");
66
+ }
67
+ }
68
+ if (schemaState === void 0) {
69
+ throw new CliError("Schema state is unavailable", { code: "SCHEMA_STATE_UNAVAILABLE", exitCode: ExitCode.InternalError });
70
+ }
71
+ if (initializeStateMode) {
72
+ await this.schemaStateManager.extractState(schema);
73
+ } else {
74
+ await this.schemaStateManager.writeState(schemaState);
75
+ }
76
+ } else {
77
+ output.info("Nothing to do");
78
+ }
79
+ if (stateChanged && shouldExecute) {
80
+ output.info("Syncing schema state to server...");
81
+ await this.migrationExecutorFacade.execute({
82
+ force: false,
83
+ requireConfirmation: false
84
+ });
85
+ }
86
+ output.data(
87
+ { migration: null, stateUpdated: stateChanged, executed: stateChanged && shouldExecute === true },
88
+ { human: (value) => value.stateUpdated ? "Schema state updated" : "Nothing to do", quiet: (value) => value.stateUpdated }
89
+ );
34
90
  return;
35
91
  }
36
92
  this.migrationPrinter.printMigrationDescription(result.initialSchema, result.migration, { noSql: true });
37
93
  if (!yes) {
38
- const { action } = await prompts({
39
- type: "select",
40
- name: "action",
94
+ if (!output.canPrompt()) {
95
+ throw new CliError("TTY not available. Pass --yes to confirm execution.", {
96
+ code: "TTY_UNAVAILABLE",
97
+ exitCode: ExitCode.InputError
98
+ });
99
+ }
100
+ const action = await promptSelect(output, {
41
101
  message: "Do you want to continue?",
42
102
  choices: [
43
103
  { value: "yes", title: "Yes" },
@@ -46,30 +106,54 @@ class MigrationDiffCommand extends Command {
46
106
  ]
47
107
  });
48
108
  if (!action || action === "no") {
49
- console.log("Aborting");
50
- return;
109
+ throw abortedError("Migration creation");
51
110
  }
52
111
  if (action === "execute") {
53
112
  shouldExecute = true;
54
113
  }
55
114
  }
56
115
  const filename = await this.migrationCreator.saveMigration(result.migration);
57
- console.log(`${filename} created`);
116
+ if (stateChanged) {
117
+ if (schemaState === void 0) {
118
+ throw new CliError("Schema state is unavailable", { code: "SCHEMA_STATE_UNAVAILABLE", exitCode: ExitCode.InternalError });
119
+ }
120
+ if (initializeStateMode) {
121
+ await this.schemaStateManager.extractState(schema);
122
+ } else {
123
+ await this.schemaStateManager.writeState(schemaState);
124
+ }
125
+ }
126
+ if (stateChanged) {
127
+ output.info("Schema state files updated");
128
+ }
129
+ if (shouldExecute) {
130
+ await this.migrationExecutorFacade.execute({
131
+ force: false,
132
+ requireConfirmation: yes ? false : (migrations) => migrations.some((migration) => migration.name !== result.migration.name)
133
+ });
134
+ }
135
+ output.data(
136
+ { migration: filename, stateUpdated: stateChanged, executed: shouldExecute === true },
137
+ { human: (value) => `${value.migration} created`, quiet: (value) => value.migration }
138
+ );
58
139
  } catch (e) {
59
140
  if (e instanceof InvalidSchemaException) {
60
- printValidationErrors(e.validationErrors, e.message);
61
- return;
141
+ printValidationErrors(e.validationErrors, e.message, output);
142
+ throw new CliError(e.message, {
143
+ code: "SCHEMA_INVALID",
144
+ exitCode: ExitCode.InputError,
145
+ details: e.validationErrors,
146
+ cause: e
147
+ });
62
148
  }
63
149
  throw e;
64
150
  }
65
- if (shouldExecute) {
66
- await this.migrationExecutorFacade.execute({
67
- force: false,
68
- requireConfirmation: (migrations) => migrations.length !== 1 && !yes
69
- });
70
- }
71
151
  }
72
152
  }
153
+ const abortedError = (operation) => new CliError(`${operation} aborted`, {
154
+ code: "OPERATION_ABORTED",
155
+ exitCode: ExitCode.InputError
156
+ });
73
157
  export {
74
158
  MigrationDiffCommand
75
159
  };
@@ -1 +1 @@
1
- {"version":3,"file":"MigrationDiffCommand.js","sources":["../../../../../../packages/cli/src/commands/migrations/MigrationDiffCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration, Input } from '@contember/cli-common'\nimport { InvalidSchemaException } from '@contember/schema-migrations'\nimport prompts from 'prompts'\nimport { MigrationCreator, SchemaVersionBuilder } from '@contember/migrations-client'\nimport { SchemaLoader } from '../../lib/schema/SchemaLoader'\nimport { MigrationPrinter } from '../../lib/migrations/MigrationPrinter'\nimport { MigrationExecutionFacade } from '../../lib/migrations/MigrationExecutionFacade'\nimport { printValidationErrors } from '../../lib/schema/SchemaValidationPrinter'\n\ntype Args = {\n\tmigrationName: string\n}\n\ntype Options = {\n\texecute?: true\n\tyes?: true\n\t'skip-initial-schema-validation'?: true\n}\n\nexport class MigrationDiffCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly schemaLoader: SchemaLoader,\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t\tprivate readonly migrationCreator: MigrationCreator,\n\t\tprivate readonly migrationPrinter: MigrationPrinter,\n\t\tprivate readonly migrationExecutorFacade: MigrationExecutionFacade,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Creates schema migration diff')\n\t\tconfiguration.argument('migrationName')\n\t\tconfiguration.option('execute').valueNone()\n\t\tconfiguration //\n\t\t\t.option('yes')\n\t\t\t.valueNone()\n\t\t\t.description('Do not ask for confirmation.')\n\n\t\tconfiguration.option('skip-initial-schema-validation')\n\t}\n\n\tprotected async execute(input: Input<Args, Options>): Promise<void> {\n\t\tconst migrationName = input.getArgument('migrationName')\n\t\tlet shouldExecute = input.getOption('execute')\n\t\tconst yes = input.getOption('yes')\n\t\tconst skipInitialSchemaValidation = input.getOption('skip-initial-schema-validation') === true\n\n\t\tconst schema = await this.schemaLoader.loadSchema()\n\t\ttry {\n\t\t\tconst initialSchema = await this.schemaVersionBuilder.buildSchema()\n\t\t\tconst result = await this.migrationCreator.prepareMigration(initialSchema, schema, migrationName, {\n\t\t\t\tskipInitialSchemaValidation: skipInitialSchemaValidation,\n\t\t\t})\n\t\t\tif (result === null) {\n\t\t\t\tconsole.log('Nothing to do')\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.migrationPrinter.printMigrationDescription(result.initialSchema, result.migration, { noSql: true })\n\n\t\t\tif (!yes) {\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: 'Yes' },\n\t\t\t\t\t\t...(!shouldExecute ? [{ value: 'execute', title: 'Yes and execute immediately' }] : []),\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 || action === 'no') {\n\t\t\t\t\tconsole.log('Aborting')\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif (action === 'execute') {\n\t\t\t\t\tshouldExecute = true\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst filename = await this.migrationCreator.saveMigration(result.migration)\n\n\t\t\tconsole.log(`${filename} created`)\n\t\t} catch (e) {\n\t\t\tif (e instanceof InvalidSchemaException) {\n\t\t\t\tprintValidationErrors(e.validationErrors, e.message)\n\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthrow e\n\t\t}\n\n\t\tif (shouldExecute) {\n\t\t\tawait this.migrationExecutorFacade.execute({\n\t\t\t\tforce: false,\n\t\t\t\trequireConfirmation: migrations => migrations.length !== 1 && !yes,\n\t\t\t})\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";;;;AAmBO,MAAM,6BAA6B,QAAuB;AAAA,EAChE,YACkB,cACA,sBACA,kBACA,kBACA,yBAChB;AACD,UAAA;AANiB,SAAA,eAAA;AACA,SAAA,uBAAA;AACA,SAAA,mBAAA;AACA,SAAA,mBAAA;AACA,SAAA,0BAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,+BAA+B;AACzD,kBAAc,SAAS,eAAe;AACtC,kBAAc,OAAO,SAAS,EAAE,UAAA;AAChC,kBACE,OAAO,KAAK,EACZ,UAAA,EACA,YAAY,8BAA8B;AAE5C,kBAAc,OAAO,gCAAgC;AAAA,EACtD;AAAA,EAEA,MAAgB,QAAQ,OAA4C;AACnE,UAAM,gBAAgB,MAAM,YAAY,eAAe;AACvD,QAAI,gBAAgB,MAAM,UAAU,SAAS;AAC7C,UAAM,MAAM,MAAM,UAAU,KAAK;AACjC,UAAM,8BAA8B,MAAM,UAAU,gCAAgC,MAAM;AAE1F,UAAM,SAAS,MAAM,KAAK,aAAa,WAAA;AACvC,QAAI;AACH,YAAM,gBAAgB,MAAM,KAAK,qBAAqB,YAAA;AACtD,YAAM,SAAS,MAAM,KAAK,iBAAiB,iBAAiB,eAAe,QAAQ,eAAe;AAAA,QACjG;AAAA,MAAA,CACA;AACD,UAAI,WAAW,MAAM;AACpB,gBAAQ,IAAI,eAAe;AAC3B;AAAA,MACD;AACA,WAAK,iBAAiB,0BAA0B,OAAO,eAAe,OAAO,WAAW,EAAE,OAAO,MAAM;AAEvG,UAAI,CAAC,KAAK;AACT,cAAM,EAAE,WAAW,MAAM,QAAQ;AAAA,UAChC,MAAM;AAAA,UACN,MAAM;AAAA,UACN,SAAS;AAAA,UACT,SAAS;AAAA,YACR,EAAE,OAAO,OAAO,OAAO,MAAA;AAAA,YACvB,GAAI,CAAC,gBAAgB,CAAC,EAAE,OAAO,WAAW,OAAO,8BAAA,CAA+B,IAAI,CAAA;AAAA,YACpF,EAAE,OAAO,MAAM,OAAO,QAAA;AAAA,UAAQ;AAAA,QAC/B,CACA;AACD,YAAI,CAAC,UAAU,WAAW,MAAM;AAC/B,kBAAQ,IAAI,UAAU;AACtB;AAAA,QACD;AACA,YAAI,WAAW,WAAW;AACzB,0BAAgB;AAAA,QACjB;AAAA,MACD;AAEA,YAAM,WAAW,MAAM,KAAK,iBAAiB,cAAc,OAAO,SAAS;AAE3E,cAAQ,IAAI,GAAG,QAAQ,UAAU;AAAA,IAClC,SAAS,GAAG;AACX,UAAI,aAAa,wBAAwB;AACxC,8BAAsB,EAAE,kBAAkB,EAAE,OAAO;AAEnD;AAAA,MACD;AACA,YAAM;AAAA,IACP;AAEA,QAAI,eAAe;AAClB,YAAM,KAAK,wBAAwB,QAAQ;AAAA,QAC1C,OAAO;AAAA,QACP,qBAAqB,CAAA,eAAc,WAAW,WAAW,KAAK,CAAC;AAAA,MAAA,CAC/D;AAAA,IACF;AAAA,EACD;AACD;"}
1
+ {"version":3,"file":"MigrationDiffCommand.js","sources":["../../../../../../packages/cli/src/commands/migrations/MigrationDiffCommand.ts"],"sourcesContent":["import { CliError, Command, CommandConfiguration, ExitCode, Input, Output } from '@contember/cli-common'\nimport { InvalidSchemaException } from '@contember/schema-migrations'\nimport { MigrationCreator, MigrationsResolver, SchemaStateManager, SchemaVersionBuilder } from '@contember/migrations-client'\nimport { SchemaLoader } from '../../lib/schema/SchemaLoader.js'\nimport { MigrationPrinter } from '../../lib/migrations/MigrationPrinter.js'\nimport { MigrationExecutionFacade } from '../../lib/migrations/MigrationExecutionFacade.js'\nimport { printValidationErrors } from '../../lib/schema/SchemaValidationPrinter.js'\nimport { promptConfirm, promptSelect } from '../../lib/prompt/index.js'\n\ntype MigrationExecutor = Pick<MigrationExecutionFacade, 'execute'>\n\ntype Args = {\n\tmigrationName: string\n}\n\ntype Options = {\n\texecute?: true\n\tyes?: true\n\t'skip-initial-schema-validation'?: true\n\t'recreate-views'?: true\n}\n\nexport class MigrationDiffCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly schemaLoader: SchemaLoader,\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t\tprivate readonly migrationCreator: MigrationCreator,\n\t\tprivate readonly migrationPrinter: MigrationPrinter,\n\t\tprivate readonly migrationExecutorFacade: MigrationExecutor,\n\t\tprivate readonly schemaStateManager: SchemaStateManager,\n\t\tprivate readonly migrationsResolver: MigrationsResolver,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Creates schema migration diff')\n\t\tconfiguration.argument('migrationName')\n\t\tconfiguration.option('execute').valueNone()\n\t\tconfiguration //\n\t\t\t.option('yes')\n\t\t\t.valueNone()\n\t\t\t.description('Do not ask for confirmation.')\n\n\t\tconfiguration.option('skip-initial-schema-validation')\n\t\tconfiguration //\n\t\t\t.option('recreate-views')\n\t\t\t.valueNone()\n\t\t\t.description(\n\t\t\t\t'Drop & recreate changed views instead of updating them in-place (CREATE OR REPLACE VIEW). Use when an in-place view update fails with SQLSTATE 42P16.',\n\t\t\t)\n\t}\n\n\tprotected async execute(input: Input<Args, Options>, output: Output): Promise<void> {\n\t\tconst migrationName = input.getArgument('migrationName')\n\t\tlet shouldExecute = input.getOption('execute')\n\t\tconst yes = input.getOption('yes')\n\t\tconst skipInitialSchemaValidation = input.getOption('skip-initial-schema-validation') === true\n\t\tconst recreateViews = input.getOption('recreate-views') === true\n\n\t\tconst schema = await this.schemaLoader.loadSchema()\n\t\tlet stateMode = await this.schemaStateManager.isStateMode()\n\t\tlet initializeStateMode = false\n\n\t\t// New project (no migrations yet) defaults to schema state mode. To opt out, create a migration first (e.g. `migrations blank`).\n\t\tif (!stateMode && (await this.migrationsResolver.getSchemaMigrations()).length === 0) {\n\t\t\toutput.info('No migrations found — enabling schema state mode for this project.')\n\t\t\toutput.info('ACL, validation, actions and settings will be managed in the state/ directory instead of migrations.')\n\t\t\tstateMode = true\n\t\t\tinitializeStateMode = true\n\t\t}\n\n\t\ttry {\n\t\t\tconst initialSchema = await this.schemaVersionBuilder.buildSchema()\n\t\t\tconst result = await this.migrationCreator.prepareMigration(initialSchema, schema, migrationName, {\n\t\t\t\tskipInitialSchemaValidation: skipInitialSchemaValidation,\n\t\t\t\tskipNonModelDiffers: stateMode,\n\t\t\t\trecreateViews,\n\t\t\t})\n\n\t\t\tconst schemaState = stateMode ? SchemaStateManager.schemaStateFromSchema(schema) : undefined\n\t\t\tconst stateChanged = schemaState ? await this.schemaStateManager.writeState(schemaState, { dryRun: true }) : false\n\n\t\t\tif (result === null) {\n\t\t\t\tif (stateChanged) {\n\t\t\t\t\tif (!yes) {\n\t\t\t\t\t\tif (!output.canPrompt()) {\n\t\t\t\t\t\t\tthrow new CliError('TTY not available. Pass --yes to confirm the schema state update.', {\n\t\t\t\t\t\t\t\tcode: 'TTY_UNAVAILABLE',\n\t\t\t\t\t\t\t\texitCode: ExitCode.InputError,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst confirmed = await promptConfirm(output, {\n\t\t\t\t\t\t\tmessage: 'Write the schema state changes?',\n\t\t\t\t\t\t\tinitial: false,\n\t\t\t\t\t\t})\n\t\t\t\t\t\tif (!confirmed) {\n\t\t\t\t\t\t\tthrow abortedError('Schema state update')\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (schemaState === undefined) {\n\t\t\t\t\t\tthrow new CliError('Schema state is unavailable', { code: 'SCHEMA_STATE_UNAVAILABLE', exitCode: ExitCode.InternalError })\n\t\t\t\t\t}\n\t\t\t\t\tif (initializeStateMode) {\n\t\t\t\t\t\tawait this.schemaStateManager.extractState(schema)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tawait this.schemaStateManager.writeState(schemaState)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\toutput.info('Nothing to do')\n\t\t\t\t}\n\t\t\t\tif (stateChanged && shouldExecute) {\n\t\t\t\t\toutput.info('Syncing schema state to server...')\n\t\t\t\t\tawait this.migrationExecutorFacade.execute({\n\t\t\t\t\t\tforce: false,\n\t\t\t\t\t\trequireConfirmation: false,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\toutput.data(\n\t\t\t\t\t{ migration: null, stateUpdated: stateChanged, executed: stateChanged && shouldExecute === true },\n\t\t\t\t\t{ human: value => value.stateUpdated ? 'Schema state updated' : 'Nothing to do', quiet: value => value.stateUpdated },\n\t\t\t\t)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.migrationPrinter.printMigrationDescription(result.initialSchema, result.migration, { noSql: true })\n\n\t\t\tif (!yes) {\n\t\t\t\tif (!output.canPrompt()) {\n\t\t\t\t\tthrow new CliError('TTY not available. Pass --yes to confirm execution.', {\n\t\t\t\t\t\tcode: 'TTY_UNAVAILABLE',\n\t\t\t\t\t\texitCode: ExitCode.InputError,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tconst action = await promptSelect(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: 'Yes' },\n\t\t\t\t\t\t...(!shouldExecute ? [{ value: 'execute', title: 'Yes and execute immediately' }] : []),\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 || action === 'no') {\n\t\t\t\t\tthrow abortedError('Migration creation')\n\t\t\t\t}\n\t\t\t\tif (action === 'execute') {\n\t\t\t\t\tshouldExecute = true\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst filename = await this.migrationCreator.saveMigration(result.migration)\n\t\t\tif (stateChanged) {\n\t\t\t\tif (schemaState === undefined) {\n\t\t\t\t\tthrow new CliError('Schema state is unavailable', { code: 'SCHEMA_STATE_UNAVAILABLE', exitCode: ExitCode.InternalError })\n\t\t\t\t}\n\t\t\t\tif (initializeStateMode) {\n\t\t\t\t\tawait this.schemaStateManager.extractState(schema)\n\t\t\t\t} else {\n\t\t\t\t\tawait this.schemaStateManager.writeState(schemaState)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (stateChanged) {\n\t\t\t\toutput.info('Schema state files updated')\n\t\t\t}\n\n\t\t\tif (shouldExecute) {\n\t\t\t\tawait this.migrationExecutorFacade.execute({\n\t\t\t\t\tforce: false,\n\t\t\t\t\trequireConfirmation: yes\n\t\t\t\t\t\t? false\n\t\t\t\t\t\t: migrations => migrations.some(migration => migration.name !== result.migration.name),\n\t\t\t\t})\n\t\t\t}\n\t\t\toutput.data(\n\t\t\t\t{ migration: filename, stateUpdated: stateChanged, executed: shouldExecute === true },\n\t\t\t\t{ human: value => `${value.migration} created`, quiet: value => value.migration },\n\t\t\t)\n\t\t} catch (e) {\n\t\t\tif (e instanceof InvalidSchemaException) {\n\t\t\t\tprintValidationErrors(e.validationErrors, e.message, output)\n\t\t\t\tthrow new CliError(e.message, {\n\t\t\t\t\tcode: 'SCHEMA_INVALID',\n\t\t\t\t\texitCode: ExitCode.InputError,\n\t\t\t\t\tdetails: e.validationErrors,\n\t\t\t\t\tcause: e,\n\t\t\t\t})\n\t\t\t}\n\t\t\tthrow e\n\t\t}\n\t}\n}\n\nconst abortedError = (operation: string): CliError =>\n\tnew CliError(`${operation} aborted`, {\n\t\tcode: 'OPERATION_ABORTED',\n\t\texitCode: ExitCode.InputError,\n\t})\n"],"names":[],"mappings":";;;;;AAsBO,MAAM,6BAA6B,QAAuB;AAAA,EAChE,YACkB,cACA,sBACA,kBACA,kBACA,yBACA,oBACA,oBAChB;AACD,UAAA;AARiB,SAAA,eAAA;AACA,SAAA,uBAAA;AACA,SAAA,mBAAA;AACA,SAAA,mBAAA;AACA,SAAA,0BAAA;AACA,SAAA,qBAAA;AACA,SAAA,qBAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,+BAA+B;AACzD,kBAAc,SAAS,eAAe;AACtC,kBAAc,OAAO,SAAS,EAAE,UAAA;AAChC,kBACE,OAAO,KAAK,EACZ,UAAA,EACA,YAAY,8BAA8B;AAE5C,kBAAc,OAAO,gCAAgC;AACrD,kBACE,OAAO,gBAAgB,EACvB,UAAA,EACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEH;AAAA,EAEA,MAAgB,QAAQ,OAA6B,QAA+B;AACnF,UAAM,gBAAgB,MAAM,YAAY,eAAe;AACvD,QAAI,gBAAgB,MAAM,UAAU,SAAS;AAC7C,UAAM,MAAM,MAAM,UAAU,KAAK;AACjC,UAAM,8BAA8B,MAAM,UAAU,gCAAgC,MAAM;AAC1F,UAAM,gBAAgB,MAAM,UAAU,gBAAgB,MAAM;AAE5D,UAAM,SAAS,MAAM,KAAK,aAAa,WAAA;AACvC,QAAI,YAAY,MAAM,KAAK,mBAAmB,YAAA;AAC9C,QAAI,sBAAsB;AAG1B,QAAI,CAAC,cAAc,MAAM,KAAK,mBAAmB,oBAAA,GAAuB,WAAW,GAAG;AACrF,aAAO,KAAK,oEAAoE;AAChF,aAAO,KAAK,sGAAsG;AAClH,kBAAY;AACZ,4BAAsB;AAAA,IACvB;AAEA,QAAI;AACH,YAAM,gBAAgB,MAAM,KAAK,qBAAqB,YAAA;AACtD,YAAM,SAAS,MAAM,KAAK,iBAAiB,iBAAiB,eAAe,QAAQ,eAAe;AAAA,QACjG;AAAA,QACA,qBAAqB;AAAA,QACrB;AAAA,MAAA,CACA;AAED,YAAM,cAAc,YAAY,mBAAmB,sBAAsB,MAAM,IAAI;AACnF,YAAM,eAAe,cAAc,MAAM,KAAK,mBAAmB,WAAW,aAAa,EAAE,QAAQ,KAAA,CAAM,IAAI;AAE7G,UAAI,WAAW,MAAM;AACpB,YAAI,cAAc;AACjB,cAAI,CAAC,KAAK;AACT,gBAAI,CAAC,OAAO,aAAa;AACxB,oBAAM,IAAI,SAAS,qEAAqE;AAAA,gBACvF,MAAM;AAAA,gBACN,UAAU,SAAS;AAAA,cAAA,CACnB;AAAA,YACF;AACA,kBAAM,YAAY,MAAM,cAAc,QAAQ;AAAA,cAC7C,SAAS;AAAA,cACT,SAAS;AAAA,YAAA,CACT;AACD,gBAAI,CAAC,WAAW;AACf,oBAAM,aAAa,qBAAqB;AAAA,YACzC;AAAA,UACD;AACA,cAAI,gBAAgB,QAAW;AAC9B,kBAAM,IAAI,SAAS,+BAA+B,EAAE,MAAM,4BAA4B,UAAU,SAAS,eAAe;AAAA,UACzH;AACA,cAAI,qBAAqB;AACxB,kBAAM,KAAK,mBAAmB,aAAa,MAAM;AAAA,UAClD,OAAO;AACN,kBAAM,KAAK,mBAAmB,WAAW,WAAW;AAAA,UACrD;AAAA,QACD,OAAO;AACN,iBAAO,KAAK,eAAe;AAAA,QAC5B;AACA,YAAI,gBAAgB,eAAe;AAClC,iBAAO,KAAK,mCAAmC;AAC/C,gBAAM,KAAK,wBAAwB,QAAQ;AAAA,YAC1C,OAAO;AAAA,YACP,qBAAqB;AAAA,UAAA,CACrB;AAAA,QACF;AACA,eAAO;AAAA,UACN,EAAE,WAAW,MAAM,cAAc,cAAc,UAAU,gBAAgB,kBAAkB,KAAA;AAAA,UAC3F,EAAE,OAAO,CAAA,UAAS,MAAM,eAAe,yBAAyB,iBAAiB,OAAO,CAAA,UAAS,MAAM,aAAA;AAAA,QAAa;AAErH;AAAA,MACD;AACA,WAAK,iBAAiB,0BAA0B,OAAO,eAAe,OAAO,WAAW,EAAE,OAAO,MAAM;AAEvG,UAAI,CAAC,KAAK;AACT,YAAI,CAAC,OAAO,aAAa;AACxB,gBAAM,IAAI,SAAS,uDAAuD;AAAA,YACzE,MAAM;AAAA,YACN,UAAU,SAAS;AAAA,UAAA,CACnB;AAAA,QACF;AACA,cAAM,SAAS,MAAM,aAAa,QAAQ;AAAA,UACzC,SAAS;AAAA,UACT,SAAS;AAAA,YACR,EAAE,OAAO,OAAO,OAAO,MAAA;AAAA,YACvB,GAAI,CAAC,gBAAgB,CAAC,EAAE,OAAO,WAAW,OAAO,8BAAA,CAA+B,IAAI,CAAA;AAAA,YACpF,EAAE,OAAO,MAAM,OAAO,QAAA;AAAA,UAAQ;AAAA,QAC/B,CACA;AACD,YAAI,CAAC,UAAU,WAAW,MAAM;AAC/B,gBAAM,aAAa,oBAAoB;AAAA,QACxC;AACA,YAAI,WAAW,WAAW;AACzB,0BAAgB;AAAA,QACjB;AAAA,MACD;AAEA,YAAM,WAAW,MAAM,KAAK,iBAAiB,cAAc,OAAO,SAAS;AAC3E,UAAI,cAAc;AACjB,YAAI,gBAAgB,QAAW;AAC9B,gBAAM,IAAI,SAAS,+BAA+B,EAAE,MAAM,4BAA4B,UAAU,SAAS,eAAe;AAAA,QACzH;AACA,YAAI,qBAAqB;AACxB,gBAAM,KAAK,mBAAmB,aAAa,MAAM;AAAA,QAClD,OAAO;AACN,gBAAM,KAAK,mBAAmB,WAAW,WAAW;AAAA,QACrD;AAAA,MACD;AACA,UAAI,cAAc;AACjB,eAAO,KAAK,4BAA4B;AAAA,MACzC;AAEA,UAAI,eAAe;AAClB,cAAM,KAAK,wBAAwB,QAAQ;AAAA,UAC1C,OAAO;AAAA,UACP,qBAAqB,MAClB,QACA,CAAA,eAAc,WAAW,KAAK,CAAA,cAAa,UAAU,SAAS,OAAO,UAAU,IAAI;AAAA,QAAA,CACtF;AAAA,MACF;AACA,aAAO;AAAA,QACN,EAAE,WAAW,UAAU,cAAc,cAAc,UAAU,kBAAkB,KAAA;AAAA,QAC/E,EAAE,OAAO,CAAA,UAAS,GAAG,MAAM,SAAS,YAAY,OAAO,CAAA,UAAS,MAAM,UAAA;AAAA,MAAU;AAAA,IAElF,SAAS,GAAG;AACX,UAAI,aAAa,wBAAwB;AACxC,8BAAsB,EAAE,kBAAkB,EAAE,SAAS,MAAM;AAC3D,cAAM,IAAI,SAAS,EAAE,SAAS;AAAA,UAC7B,MAAM;AAAA,UACN,UAAU,SAAS;AAAA,UACnB,SAAS,EAAE;AAAA,UACX,OAAO;AAAA,QAAA,CACP;AAAA,MACF;AACA,YAAM;AAAA,IACP;AAAA,EACD;AACD;AAEA,MAAM,eAAe,CAAC,cACrB,IAAI,SAAS,GAAG,SAAS,YAAY;AAAA,EACpC,MAAM;AAAA,EACN,UAAU,SAAS;AACpB,CAAC;"}
@@ -10,15 +10,22 @@ class MigrationExecuteCommand extends cliCommon.Command {
10
10
  configuration.description("Executes migrations on Contember server.");
11
11
  configuration.option("force").description("Ignore migrations order and missing migrations (dev only)");
12
12
  configuration.option("until").valueRequired().description("Execute all migrations leading up to, and inclusive of, a specified migration");
13
+ configuration.option("no-snapshot").valueNone().description("Do not bootstrap a fresh database from snapshot.json; replay every migration instead");
13
14
  configuration.option("yes").valueNone().description("Do not ask for confirmation.");
14
15
  }
15
- async execute(input) {
16
+ async execute(input, output) {
16
17
  const force = input.getOption("force");
17
18
  const until = input.getOption("until");
18
- await this.migrationExecutorFacade.execute({
19
+ const changed = await this.migrationExecutorFacade.execute({
19
20
  force,
20
21
  until,
21
- requireConfirmation: !input.getOption("yes")
22
+ requireConfirmation: !input.getOption("yes"),
23
+ useSnapshot: input.getOption("no-snapshot") !== true
24
+ });
25
+ const result = { status: changed ? "completed" : "noop", until: until ?? null };
26
+ output.data(result, {
27
+ human: (value) => value.status === "completed" ? "Migrations executed" : "No migrations to execute",
28
+ quiet: (value) => value.status
22
29
  });
23
30
  }
24
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MigrationExecuteCommand.cjs","sources":["../../../../../../packages/cli/src/commands/migrations/MigrationExecuteCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration, Input } from '@contember/cli-common'\nimport { MigrationExecutionFacade } from '../../lib/migrations/MigrationExecutionFacade'\n\ntype Args = {}\n\ntype Options = {\n\tuntil?: string\n\tforce: boolean\n\tyes?: boolean\n}\n\nexport class MigrationExecuteCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly migrationExecutorFacade: MigrationExecutionFacade,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Executes migrations on Contember server.')\n\t\tconfiguration.option('force')\n\t\t\t.description('Ignore migrations order and missing migrations (dev only)')\n\t\tconfiguration.option('until')\n\t\t\t.valueRequired()\n\t\t\t.description('Execute all migrations leading up to, and inclusive of, a specified migration')\n\t\tconfiguration //\n\t\t\t.option('yes')\n\t\t\t.valueNone()\n\t\t\t.description('Do not ask for confirmation.')\n\t}\n\n\tprotected async execute(input: Input<Args, Options>): Promise<void> {\n\t\tconst force = input.getOption('force')\n\t\tconst until = input.getOption('until')\n\n\t\tawait this.migrationExecutorFacade.execute({\n\t\t\tforce,\n\t\t\tuntil,\n\t\t\trequireConfirmation: !input.getOption('yes'),\n\t\t})\n\t}\n}\n"],"names":["Command"],"mappings":";;;AAWO,MAAM,gCAAgCA,UAAAA,QAAuB;AAAA,EACnE,YACkB,yBAChB;AACD,UAAA;AAFiB,SAAA,0BAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,0CAA0C;AACpE,kBAAc,OAAO,OAAO,EAC1B,YAAY,2DAA2D;AACzE,kBAAc,OAAO,OAAO,EAC1B,cAAA,EACA,YAAY,+EAA+E;AAC7F,kBACE,OAAO,KAAK,EACZ,UAAA,EACA,YAAY,8BAA8B;AAAA,EAC7C;AAAA,EAEA,MAAgB,QAAQ,OAA4C;AACnE,UAAM,QAAQ,MAAM,UAAU,OAAO;AACrC,UAAM,QAAQ,MAAM,UAAU,OAAO;AAErC,UAAM,KAAK,wBAAwB,QAAQ;AAAA,MAC1C;AAAA,MACA;AAAA,MACA,qBAAqB,CAAC,MAAM,UAAU,KAAK;AAAA,IAAA,CAC3C;AAAA,EACF;AACD;;"}
1
+ {"version":3,"file":"MigrationExecuteCommand.cjs","sources":["../../../../../../packages/cli/src/commands/migrations/MigrationExecuteCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration, Input, Output } from '@contember/cli-common'\nimport { MigrationExecutionFacade } from '../../lib/migrations/MigrationExecutionFacade.js'\n\ntype Args = {}\n\ntype Options = {\n\tuntil?: string\n\tforce: boolean\n\tyes?: boolean\n\t['no-snapshot']?: boolean\n}\n\ntype MigrationExecutor = Pick<MigrationExecutionFacade, 'execute'>\n\nexport class MigrationExecuteCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly migrationExecutorFacade: MigrationExecutor,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Executes migrations on Contember server.')\n\t\tconfiguration.option('force')\n\t\t\t.description('Ignore migrations order and missing migrations (dev only)')\n\t\tconfiguration.option('until')\n\t\t\t.valueRequired()\n\t\t\t.description('Execute all migrations leading up to, and inclusive of, a specified migration')\n\t\tconfiguration.option('no-snapshot')\n\t\t\t.valueNone()\n\t\t\t.description('Do not bootstrap a fresh database from snapshot.json; replay every migration instead')\n\t\tconfiguration //\n\t\t\t.option('yes')\n\t\t\t.valueNone()\n\t\t\t.description('Do not ask for confirmation.')\n\t}\n\n\tprotected async execute(input: Input<Args, Options>, output: Output): Promise<void> {\n\t\tconst force = input.getOption('force')\n\t\tconst until = input.getOption('until')\n\n\t\tconst changed = await this.migrationExecutorFacade.execute({\n\t\t\tforce,\n\t\t\tuntil,\n\t\t\trequireConfirmation: !input.getOption('yes'),\n\t\t\tuseSnapshot: input.getOption('no-snapshot') !== true,\n\t\t})\n\t\tconst result = { status: changed ? 'completed' : 'noop', until: until ?? null }\n\t\toutput.data(result, {\n\t\t\thuman: value => value.status === 'completed' ? 'Migrations executed' : 'No migrations to execute',\n\t\t\tquiet: value => value.status,\n\t\t})\n\t}\n}\n"],"names":["Command"],"mappings":";;;AAcO,MAAM,gCAAgCA,UAAAA,QAAuB;AAAA,EACnE,YACkB,yBAChB;AACD,UAAA;AAFiB,SAAA,0BAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,0CAA0C;AACpE,kBAAc,OAAO,OAAO,EAC1B,YAAY,2DAA2D;AACzE,kBAAc,OAAO,OAAO,EAC1B,cAAA,EACA,YAAY,+EAA+E;AAC7F,kBAAc,OAAO,aAAa,EAChC,UAAA,EACA,YAAY,sFAAsF;AACpG,kBACE,OAAO,KAAK,EACZ,UAAA,EACA,YAAY,8BAA8B;AAAA,EAC7C;AAAA,EAEA,MAAgB,QAAQ,OAA6B,QAA+B;AACnF,UAAM,QAAQ,MAAM,UAAU,OAAO;AACrC,UAAM,QAAQ,MAAM,UAAU,OAAO;AAErC,UAAM,UAAU,MAAM,KAAK,wBAAwB,QAAQ;AAAA,MAC1D;AAAA,MACA;AAAA,MACA,qBAAqB,CAAC,MAAM,UAAU,KAAK;AAAA,MAC3C,aAAa,MAAM,UAAU,aAAa,MAAM;AAAA,IAAA,CAChD;AACD,UAAM,SAAS,EAAE,QAAQ,UAAU,cAAc,QAAQ,OAAO,SAAS,KAAA;AACzE,WAAO,KAAK,QAAQ;AAAA,MACnB,OAAO,CAAA,UAAS,MAAM,WAAW,cAAc,wBAAwB;AAAA,MACvE,OAAO,WAAS,MAAM;AAAA,IAAA,CACtB;AAAA,EACF;AACD;;"}
@@ -8,15 +8,22 @@ class MigrationExecuteCommand extends Command {
8
8
  configuration.description("Executes migrations on Contember server.");
9
9
  configuration.option("force").description("Ignore migrations order and missing migrations (dev only)");
10
10
  configuration.option("until").valueRequired().description("Execute all migrations leading up to, and inclusive of, a specified migration");
11
+ configuration.option("no-snapshot").valueNone().description("Do not bootstrap a fresh database from snapshot.json; replay every migration instead");
11
12
  configuration.option("yes").valueNone().description("Do not ask for confirmation.");
12
13
  }
13
- async execute(input) {
14
+ async execute(input, output) {
14
15
  const force = input.getOption("force");
15
16
  const until = input.getOption("until");
16
- await this.migrationExecutorFacade.execute({
17
+ const changed = await this.migrationExecutorFacade.execute({
17
18
  force,
18
19
  until,
19
- requireConfirmation: !input.getOption("yes")
20
+ requireConfirmation: !input.getOption("yes"),
21
+ useSnapshot: input.getOption("no-snapshot") !== true
22
+ });
23
+ const result = { status: changed ? "completed" : "noop", until: until ?? null };
24
+ output.data(result, {
25
+ human: (value) => value.status === "completed" ? "Migrations executed" : "No migrations to execute",
26
+ quiet: (value) => value.status
20
27
  });
21
28
  }
22
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MigrationExecuteCommand.js","sources":["../../../../../../packages/cli/src/commands/migrations/MigrationExecuteCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration, Input } from '@contember/cli-common'\nimport { MigrationExecutionFacade } from '../../lib/migrations/MigrationExecutionFacade'\n\ntype Args = {}\n\ntype Options = {\n\tuntil?: string\n\tforce: boolean\n\tyes?: boolean\n}\n\nexport class MigrationExecuteCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly migrationExecutorFacade: MigrationExecutionFacade,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Executes migrations on Contember server.')\n\t\tconfiguration.option('force')\n\t\t\t.description('Ignore migrations order and missing migrations (dev only)')\n\t\tconfiguration.option('until')\n\t\t\t.valueRequired()\n\t\t\t.description('Execute all migrations leading up to, and inclusive of, a specified migration')\n\t\tconfiguration //\n\t\t\t.option('yes')\n\t\t\t.valueNone()\n\t\t\t.description('Do not ask for confirmation.')\n\t}\n\n\tprotected async execute(input: Input<Args, Options>): Promise<void> {\n\t\tconst force = input.getOption('force')\n\t\tconst until = input.getOption('until')\n\n\t\tawait this.migrationExecutorFacade.execute({\n\t\t\tforce,\n\t\t\tuntil,\n\t\t\trequireConfirmation: !input.getOption('yes'),\n\t\t})\n\t}\n}\n"],"names":[],"mappings":";AAWO,MAAM,gCAAgC,QAAuB;AAAA,EACnE,YACkB,yBAChB;AACD,UAAA;AAFiB,SAAA,0BAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,0CAA0C;AACpE,kBAAc,OAAO,OAAO,EAC1B,YAAY,2DAA2D;AACzE,kBAAc,OAAO,OAAO,EAC1B,cAAA,EACA,YAAY,+EAA+E;AAC7F,kBACE,OAAO,KAAK,EACZ,UAAA,EACA,YAAY,8BAA8B;AAAA,EAC7C;AAAA,EAEA,MAAgB,QAAQ,OAA4C;AACnE,UAAM,QAAQ,MAAM,UAAU,OAAO;AACrC,UAAM,QAAQ,MAAM,UAAU,OAAO;AAErC,UAAM,KAAK,wBAAwB,QAAQ;AAAA,MAC1C;AAAA,MACA;AAAA,MACA,qBAAqB,CAAC,MAAM,UAAU,KAAK;AAAA,IAAA,CAC3C;AAAA,EACF;AACD;"}
1
+ {"version":3,"file":"MigrationExecuteCommand.js","sources":["../../../../../../packages/cli/src/commands/migrations/MigrationExecuteCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration, Input, Output } from '@contember/cli-common'\nimport { MigrationExecutionFacade } from '../../lib/migrations/MigrationExecutionFacade.js'\n\ntype Args = {}\n\ntype Options = {\n\tuntil?: string\n\tforce: boolean\n\tyes?: boolean\n\t['no-snapshot']?: boolean\n}\n\ntype MigrationExecutor = Pick<MigrationExecutionFacade, 'execute'>\n\nexport class MigrationExecuteCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly migrationExecutorFacade: MigrationExecutor,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Executes migrations on Contember server.')\n\t\tconfiguration.option('force')\n\t\t\t.description('Ignore migrations order and missing migrations (dev only)')\n\t\tconfiguration.option('until')\n\t\t\t.valueRequired()\n\t\t\t.description('Execute all migrations leading up to, and inclusive of, a specified migration')\n\t\tconfiguration.option('no-snapshot')\n\t\t\t.valueNone()\n\t\t\t.description('Do not bootstrap a fresh database from snapshot.json; replay every migration instead')\n\t\tconfiguration //\n\t\t\t.option('yes')\n\t\t\t.valueNone()\n\t\t\t.description('Do not ask for confirmation.')\n\t}\n\n\tprotected async execute(input: Input<Args, Options>, output: Output): Promise<void> {\n\t\tconst force = input.getOption('force')\n\t\tconst until = input.getOption('until')\n\n\t\tconst changed = await this.migrationExecutorFacade.execute({\n\t\t\tforce,\n\t\t\tuntil,\n\t\t\trequireConfirmation: !input.getOption('yes'),\n\t\t\tuseSnapshot: input.getOption('no-snapshot') !== true,\n\t\t})\n\t\tconst result = { status: changed ? 'completed' : 'noop', until: until ?? null }\n\t\toutput.data(result, {\n\t\t\thuman: value => value.status === 'completed' ? 'Migrations executed' : 'No migrations to execute',\n\t\t\tquiet: value => value.status,\n\t\t})\n\t}\n}\n"],"names":[],"mappings":";AAcO,MAAM,gCAAgC,QAAuB;AAAA,EACnE,YACkB,yBAChB;AACD,UAAA;AAFiB,SAAA,0BAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,0CAA0C;AACpE,kBAAc,OAAO,OAAO,EAC1B,YAAY,2DAA2D;AACzE,kBAAc,OAAO,OAAO,EAC1B,cAAA,EACA,YAAY,+EAA+E;AAC7F,kBAAc,OAAO,aAAa,EAChC,UAAA,EACA,YAAY,sFAAsF;AACpG,kBACE,OAAO,KAAK,EACZ,UAAA,EACA,YAAY,8BAA8B;AAAA,EAC7C;AAAA,EAEA,MAAgB,QAAQ,OAA6B,QAA+B;AACnF,UAAM,QAAQ,MAAM,UAAU,OAAO;AACrC,UAAM,QAAQ,MAAM,UAAU,OAAO;AAErC,UAAM,UAAU,MAAM,KAAK,wBAAwB,QAAQ;AAAA,MAC1D;AAAA,MACA;AAAA,MACA,qBAAqB,CAAC,MAAM,UAAU,KAAK;AAAA,MAC3C,aAAa,MAAM,UAAU,aAAa,MAAM;AAAA,IAAA,CAChD;AACD,UAAM,SAAS,EAAE,QAAQ,UAAU,cAAc,QAAQ,OAAO,SAAS,KAAA;AACzE,WAAO,KAAK,QAAQ;AAAA,MACnB,OAAO,CAAA,UAAS,MAAM,WAAW,cAAc,wBAAwB;AAAA,MACvE,OAAO,WAAS,MAAM;AAAA,IAAA,CACtB;AAAA,EACF;AACD;"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const cliCommon = require("@contember/cli-common");
4
+ class MigrationInitStateCommand extends cliCommon.Command {
5
+ constructor(schemaLoader, schemaStateManager) {
6
+ super();
7
+ this.schemaLoader = schemaLoader;
8
+ this.schemaStateManager = schemaStateManager;
9
+ }
10
+ configure(configuration) {
11
+ configuration.description("Enables schema state mode by extracting ACL, validation, actions and settings into the state/ directory");
12
+ }
13
+ async execute(input, output) {
14
+ if (await this.schemaStateManager.isStateMode()) {
15
+ output.info("Schema state mode is already enabled");
16
+ writeMachineResult(output, { enabled: true, changed: false });
17
+ return 0;
18
+ }
19
+ const schema = await this.schemaLoader.loadSchema();
20
+ await this.schemaStateManager.extractState(schema);
21
+ output.info("Schema state mode enabled. ACL, validation, actions and settings are now managed in the state/ directory.");
22
+ output.info("These parts of the schema will no longer be written into migrations.");
23
+ writeMachineResult(output, { enabled: true, changed: true });
24
+ return 0;
25
+ }
26
+ }
27
+ const writeMachineResult = (output, result) => {
28
+ if (output.mode !== "human") {
29
+ output.data(result, { quiet: (value) => value.changed });
30
+ }
31
+ };
32
+ exports.MigrationInitStateCommand = MigrationInitStateCommand;
33
+ //# sourceMappingURL=MigrationInitStateCommand.cjs.map