@contember/cli 2.1.0-alpha.9 → 2.1.0-beta.1

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 (479) hide show
  1. package/CLAUDE.md +39 -0
  2. package/dist/development/run.cjs.map +1 -1
  3. package/dist/development/run.js.map +1 -1
  4. package/dist/development/src/commands/actions/ActionsGetEventCommand.cjs +31 -0
  5. package/dist/development/src/commands/actions/ActionsGetEventCommand.cjs.map +1 -0
  6. package/dist/development/src/commands/actions/ActionsGetEventCommand.js +31 -0
  7. package/dist/development/src/commands/actions/ActionsGetEventCommand.js.map +1 -0
  8. package/dist/development/src/commands/actions/ActionsListFailedEventsCommand.cjs +60 -0
  9. package/dist/development/src/commands/actions/ActionsListFailedEventsCommand.cjs.map +1 -0
  10. package/dist/development/src/commands/actions/ActionsListFailedEventsCommand.js +60 -0
  11. package/dist/development/src/commands/actions/ActionsListFailedEventsCommand.js.map +1 -0
  12. package/dist/development/src/commands/actions/ActionsListVariablesCommand.cjs +29 -0
  13. package/dist/development/src/commands/actions/ActionsListVariablesCommand.cjs.map +1 -0
  14. package/dist/development/src/commands/actions/ActionsListVariablesCommand.js +29 -0
  15. package/dist/development/src/commands/actions/ActionsListVariablesCommand.js.map +1 -0
  16. package/dist/development/src/commands/actions/ActionsRetryEventCommand.cjs +32 -0
  17. package/dist/development/src/commands/actions/ActionsRetryEventCommand.cjs.map +1 -0
  18. package/dist/development/src/commands/actions/ActionsRetryEventCommand.js +32 -0
  19. package/dist/development/src/commands/actions/ActionsRetryEventCommand.js.map +1 -0
  20. package/dist/development/src/commands/actions/ActionsSetVariablesCommand.cjs +43 -0
  21. package/dist/development/src/commands/actions/ActionsSetVariablesCommand.cjs.map +1 -0
  22. package/dist/development/src/commands/actions/ActionsSetVariablesCommand.js +43 -0
  23. package/dist/development/src/commands/actions/ActionsSetVariablesCommand.js.map +1 -0
  24. package/dist/development/src/commands/actions/ActionsStopEventCommand.cjs +32 -0
  25. package/dist/development/src/commands/actions/ActionsStopEventCommand.cjs.map +1 -0
  26. package/dist/development/src/commands/actions/ActionsStopEventCommand.js +32 -0
  27. package/dist/development/src/commands/actions/ActionsStopEventCommand.js.map +1 -0
  28. package/dist/development/src/commands/deploy/DeployCommand.cjs.map +1 -1
  29. package/dist/development/src/commands/deploy/DeployCommand.js.map +1 -1
  30. package/dist/development/src/commands/migrations/MigrationAmendCommand.cjs.map +1 -1
  31. package/dist/development/src/commands/migrations/MigrationAmendCommand.js.map +1 -1
  32. package/dist/development/src/commands/migrations/MigrationBlankCommand.cjs.map +1 -1
  33. package/dist/development/src/commands/migrations/MigrationBlankCommand.js.map +1 -1
  34. package/dist/development/src/commands/migrations/MigrationDescribeCommand.cjs.map +1 -1
  35. package/dist/development/src/commands/migrations/MigrationDescribeCommand.js.map +1 -1
  36. package/dist/development/src/commands/migrations/MigrationDiffCommand.cjs.map +1 -1
  37. package/dist/development/src/commands/migrations/MigrationDiffCommand.js.map +1 -1
  38. package/dist/development/src/commands/migrations/MigrationExecuteCommand.cjs.map +1 -1
  39. package/dist/development/src/commands/migrations/MigrationExecuteCommand.js.map +1 -1
  40. package/dist/development/src/commands/migrations/MigrationRebaseCommand.cjs.map +1 -1
  41. package/dist/development/src/commands/migrations/MigrationRebaseCommand.js.map +1 -1
  42. package/dist/development/src/commands/migrations/MigrationStatusCommand.cjs +1 -1
  43. package/dist/development/src/commands/migrations/MigrationStatusCommand.cjs.map +1 -1
  44. package/dist/development/src/commands/migrations/MigrationStatusCommand.js +1 -1
  45. package/dist/development/src/commands/migrations/MigrationStatusCommand.js.map +1 -1
  46. package/dist/development/src/commands/misc/VersionCommand.cjs.map +1 -1
  47. package/dist/development/src/commands/misc/VersionCommand.js.map +1 -1
  48. package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.cjs.map +1 -1
  49. package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.js.map +1 -1
  50. package/dist/development/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -1
  51. package/dist/development/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -1
  52. package/dist/development/src/commands/project/ProjectValidateCommand.cjs.map +1 -1
  53. package/dist/development/src/commands/project/ProjectValidateCommand.js.map +1 -1
  54. package/dist/development/src/commands/transfer/ExportCommand.cjs +7 -2
  55. package/dist/development/src/commands/transfer/ExportCommand.cjs.map +1 -1
  56. package/dist/development/src/commands/transfer/ExportCommand.js +8 -3
  57. package/dist/development/src/commands/transfer/ExportCommand.js.map +1 -1
  58. package/dist/development/src/commands/transfer/ImportCommand.cjs +7 -4
  59. package/dist/development/src/commands/transfer/ImportCommand.cjs.map +1 -1
  60. package/dist/development/src/commands/transfer/ImportCommand.js +5 -2
  61. package/dist/development/src/commands/transfer/ImportCommand.js.map +1 -1
  62. package/dist/development/src/commands/transfer/TransferCommand.cjs +4 -5
  63. package/dist/development/src/commands/transfer/TransferCommand.cjs.map +1 -1
  64. package/dist/development/src/commands/transfer/TransferCommand.js +4 -5
  65. package/dist/development/src/commands/transfer/TransferCommand.js.map +1 -1
  66. package/dist/development/src/commands/transfer/utils.cjs.map +1 -1
  67. package/dist/development/src/commands/transfer/utils.js.map +1 -1
  68. package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.cjs +16 -14
  69. package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.cjs.map +1 -1
  70. package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.js +16 -14
  71. package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +1 -1
  72. package/dist/development/src/consts.cjs.map +1 -1
  73. package/dist/development/src/dic.cjs +100 -4
  74. package/dist/development/src/dic.cjs.map +1 -1
  75. package/dist/development/src/dic.js +101 -5
  76. package/dist/development/src/dic.js.map +1 -1
  77. package/dist/development/src/lib/SystemClientProvider.cjs.map +1 -1
  78. package/dist/development/src/lib/SystemClientProvider.js.map +1 -1
  79. package/dist/development/src/lib/TenantClientProvider.cjs.map +1 -1
  80. package/dist/development/src/lib/TenantClientProvider.js.map +1 -1
  81. package/dist/development/src/lib/VersionChecker.cjs +7 -9
  82. package/dist/development/src/lib/VersionChecker.cjs.map +1 -1
  83. package/dist/development/src/lib/VersionChecker.js +7 -9
  84. package/dist/development/src/lib/VersionChecker.js.map +1 -1
  85. package/dist/development/src/lib/actions/ActionsClient.cjs +91 -0
  86. package/dist/development/src/lib/actions/ActionsClient.cjs.map +1 -0
  87. package/dist/development/src/lib/actions/ActionsClient.js +91 -0
  88. package/dist/development/src/lib/actions/ActionsClient.js.map +1 -0
  89. package/dist/development/src/lib/admin/AdminClient.cjs.map +1 -1
  90. package/dist/development/src/lib/admin/AdminClient.js.map +1 -1
  91. package/dist/development/src/lib/admin/AdminDeployer.cjs.map +1 -1
  92. package/dist/development/src/lib/admin/AdminDeployer.js.map +1 -1
  93. package/dist/development/src/lib/assertNever.cjs.map +1 -1
  94. package/dist/development/src/lib/assertNever.js.map +1 -1
  95. package/dist/development/src/lib/dsn.cjs.map +1 -1
  96. package/dist/development/src/lib/dsn.js.map +1 -1
  97. package/dist/development/src/lib/env.cjs.map +1 -1
  98. package/dist/development/src/lib/env.js.map +1 -1
  99. package/dist/development/src/lib/fs/DockerComposeManager.cjs.map +1 -1
  100. package/dist/development/src/lib/fs/DockerComposeManager.js.map +1 -1
  101. package/dist/development/src/lib/fs/FileSystem.cjs.map +1 -1
  102. package/dist/development/src/lib/fs/FileSystem.js.map +1 -1
  103. package/dist/development/src/lib/fs/YamlHandler.cjs.map +1 -1
  104. package/dist/development/src/lib/fs/YamlHandler.js.map +1 -1
  105. package/dist/development/src/lib/js/EsBuildBuilder.cjs.map +1 -1
  106. package/dist/development/src/lib/js/EsBuildBuilder.js.map +1 -1
  107. package/dist/development/src/lib/js/EvalExecutor.cjs.map +1 -1
  108. package/dist/development/src/lib/js/EvalExecutor.js.map +1 -1
  109. package/dist/development/src/lib/js/JsCodeRunner.cjs.map +1 -1
  110. package/dist/development/src/lib/js/JsCodeRunner.js.map +1 -1
  111. package/dist/development/src/lib/migrations/MigrationExecutionFacade.cjs.map +1 -1
  112. package/dist/development/src/lib/migrations/MigrationExecutionFacade.js.map +1 -1
  113. package/dist/development/src/lib/migrations/MigrationPrinter.cjs +7 -2
  114. package/dist/development/src/lib/migrations/MigrationPrinter.cjs.map +1 -1
  115. package/dist/development/src/lib/migrations/MigrationPrinter.js +7 -2
  116. package/dist/development/src/lib/migrations/MigrationPrinter.js.map +1 -1
  117. package/dist/development/src/lib/migrations/MigrationRebaseFacade.cjs.map +1 -1
  118. package/dist/development/src/lib/migrations/MigrationRebaseFacade.js.map +1 -1
  119. package/dist/development/src/lib/migrations/MigrationsStatusFacade.cjs +3 -3
  120. package/dist/development/src/lib/migrations/MigrationsStatusFacade.cjs.map +1 -1
  121. package/dist/development/src/lib/migrations/MigrationsStatusFacade.js +3 -3
  122. package/dist/development/src/lib/migrations/MigrationsStatusFacade.js.map +1 -1
  123. package/dist/development/src/lib/migrations/MigrationsValidator.cjs.map +1 -1
  124. package/dist/development/src/lib/migrations/MigrationsValidator.js.map +1 -1
  125. package/dist/development/src/lib/project/RemoteProject.cjs.map +1 -1
  126. package/dist/development/src/lib/project/RemoteProject.js.map +1 -1
  127. package/dist/development/src/lib/project/RemoteProjectProvider.cjs.map +1 -1
  128. package/dist/development/src/lib/project/RemoteProjectProvider.js.map +1 -1
  129. package/dist/development/src/lib/project/RemoteProjectResolver.cjs.map +1 -1
  130. package/dist/development/src/lib/project/RemoteProjectResolver.js.map +1 -1
  131. package/dist/development/src/lib/project/docs/components/EntityInfo.cjs +135 -177
  132. package/dist/development/src/lib/project/docs/components/EntityInfo.cjs.map +1 -1
  133. package/dist/development/src/lib/project/docs/components/EntityInfo.js +136 -178
  134. package/dist/development/src/lib/project/docs/components/EntityInfo.js.map +1 -1
  135. package/dist/development/src/lib/project/docs/components/EntityLink.cjs.map +1 -1
  136. package/dist/development/src/lib/project/docs/components/EntityLink.js.map +1 -1
  137. package/dist/development/src/lib/project/docs/components/FieldLink.cjs +5 -5
  138. package/dist/development/src/lib/project/docs/components/FieldLink.cjs.map +1 -1
  139. package/dist/development/src/lib/project/docs/components/FieldLink.js +5 -5
  140. package/dist/development/src/lib/project/docs/components/FieldLink.js.map +1 -1
  141. package/dist/development/src/lib/project/docs/components/FieldPermissions.cjs +8 -8
  142. package/dist/development/src/lib/project/docs/components/FieldPermissions.cjs.map +1 -1
  143. package/dist/development/src/lib/project/docs/components/FieldPermissions.js +8 -8
  144. package/dist/development/src/lib/project/docs/components/FieldPermissions.js.map +1 -1
  145. package/dist/development/src/lib/project/docs/components/FieldType.cjs +34 -36
  146. package/dist/development/src/lib/project/docs/components/FieldType.cjs.map +1 -1
  147. package/dist/development/src/lib/project/docs/components/FieldType.js +34 -36
  148. package/dist/development/src/lib/project/docs/components/FieldType.js.map +1 -1
  149. package/dist/development/src/lib/project/docs/components/OnDelete.cjs +22 -26
  150. package/dist/development/src/lib/project/docs/components/OnDelete.cjs.map +1 -1
  151. package/dist/development/src/lib/project/docs/components/OnDelete.js +22 -26
  152. package/dist/development/src/lib/project/docs/components/OnDelete.js.map +1 -1
  153. package/dist/development/src/lib/project/docs/components/ProjectInfo.cjs +16 -16
  154. package/dist/development/src/lib/project/docs/components/ProjectInfo.cjs.map +1 -1
  155. package/dist/development/src/lib/project/docs/components/ProjectInfo.js +16 -16
  156. package/dist/development/src/lib/project/docs/components/ProjectInfo.js.map +1 -1
  157. package/dist/development/src/lib/project/docs/components/SinglePermission.cjs.map +1 -1
  158. package/dist/development/src/lib/project/docs/components/SinglePermission.js.map +1 -1
  159. package/dist/development/src/lib/project/docs/components/utils.cjs.map +1 -1
  160. package/dist/development/src/lib/project/docs/components/utils.js.map +1 -1
  161. package/dist/development/src/lib/project/docs/projectDescribe.cjs.map +1 -1
  162. package/dist/development/src/lib/project/docs/projectDescribe.js.map +1 -1
  163. package/dist/development/src/lib/schema/SchemaLoader.cjs.map +1 -1
  164. package/dist/development/src/lib/schema/SchemaLoader.js.map +1 -1
  165. package/dist/development/src/lib/schema/SchemaValidationHelper.cjs.map +1 -1
  166. package/dist/development/src/lib/schema/SchemaValidationPrinter.cjs.map +1 -1
  167. package/dist/development/src/lib/schema/SchemaValidationPrinter.js.map +1 -1
  168. package/dist/development/src/lib/schema/collectReferences.cjs.map +1 -1
  169. package/dist/development/src/lib/schema/collectReferences.js.map +1 -1
  170. package/dist/development/src/lib/stream.cjs +0 -7
  171. package/dist/development/src/lib/stream.cjs.map +1 -1
  172. package/dist/development/src/lib/stream.js +1 -8
  173. package/dist/development/src/lib/stream.js.map +1 -1
  174. package/dist/development/src/lib/tenant/TenantClient.cjs.map +1 -1
  175. package/dist/development/src/lib/tenant/TenantClient.js.map +1 -1
  176. package/dist/development/src/lib/transfer/DataTransferClient.cjs +53 -61
  177. package/dist/development/src/lib/transfer/DataTransferClient.cjs.map +1 -1
  178. package/dist/development/src/lib/transfer/DataTransferClient.js +55 -63
  179. package/dist/development/src/lib/transfer/DataTransferClient.js.map +1 -1
  180. package/dist/development/src/lib/transfer/stdio.cjs.map +1 -1
  181. package/dist/development/src/lib/transfer/stdio.js.map +1 -1
  182. package/dist/development/src/lib/workspace/WorkspaceResolver.cjs +4 -4
  183. package/dist/development/src/lib/workspace/WorkspaceResolver.cjs.map +1 -1
  184. package/dist/development/src/lib/workspace/WorkspaceResolver.js +5 -5
  185. package/dist/development/src/lib/workspace/WorkspaceResolver.js.map +1 -1
  186. package/dist/production/run.cjs.map +1 -1
  187. package/dist/production/run.js.map +1 -1
  188. package/dist/production/src/commands/actions/ActionsGetEventCommand.cjs +31 -0
  189. package/dist/production/src/commands/actions/ActionsGetEventCommand.cjs.map +1 -0
  190. package/dist/production/src/commands/actions/ActionsGetEventCommand.js +31 -0
  191. package/dist/production/src/commands/actions/ActionsGetEventCommand.js.map +1 -0
  192. package/dist/production/src/commands/actions/ActionsListFailedEventsCommand.cjs +60 -0
  193. package/dist/production/src/commands/actions/ActionsListFailedEventsCommand.cjs.map +1 -0
  194. package/dist/production/src/commands/actions/ActionsListFailedEventsCommand.js +60 -0
  195. package/dist/production/src/commands/actions/ActionsListFailedEventsCommand.js.map +1 -0
  196. package/dist/production/src/commands/actions/ActionsListVariablesCommand.cjs +29 -0
  197. package/dist/production/src/commands/actions/ActionsListVariablesCommand.cjs.map +1 -0
  198. package/dist/production/src/commands/actions/ActionsListVariablesCommand.js +29 -0
  199. package/dist/production/src/commands/actions/ActionsListVariablesCommand.js.map +1 -0
  200. package/dist/production/src/commands/actions/ActionsRetryEventCommand.cjs +32 -0
  201. package/dist/production/src/commands/actions/ActionsRetryEventCommand.cjs.map +1 -0
  202. package/dist/production/src/commands/actions/ActionsRetryEventCommand.js +32 -0
  203. package/dist/production/src/commands/actions/ActionsRetryEventCommand.js.map +1 -0
  204. package/dist/production/src/commands/actions/ActionsSetVariablesCommand.cjs +43 -0
  205. package/dist/production/src/commands/actions/ActionsSetVariablesCommand.cjs.map +1 -0
  206. package/dist/production/src/commands/actions/ActionsSetVariablesCommand.js +43 -0
  207. package/dist/production/src/commands/actions/ActionsSetVariablesCommand.js.map +1 -0
  208. package/dist/production/src/commands/actions/ActionsStopEventCommand.cjs +32 -0
  209. package/dist/production/src/commands/actions/ActionsStopEventCommand.cjs.map +1 -0
  210. package/dist/production/src/commands/actions/ActionsStopEventCommand.js +32 -0
  211. package/dist/production/src/commands/actions/ActionsStopEventCommand.js.map +1 -0
  212. package/dist/production/src/commands/deploy/DeployCommand.cjs.map +1 -1
  213. package/dist/production/src/commands/deploy/DeployCommand.js.map +1 -1
  214. package/dist/production/src/commands/migrations/MigrationAmendCommand.cjs.map +1 -1
  215. package/dist/production/src/commands/migrations/MigrationAmendCommand.js.map +1 -1
  216. package/dist/production/src/commands/migrations/MigrationBlankCommand.cjs.map +1 -1
  217. package/dist/production/src/commands/migrations/MigrationBlankCommand.js.map +1 -1
  218. package/dist/production/src/commands/migrations/MigrationDescribeCommand.cjs.map +1 -1
  219. package/dist/production/src/commands/migrations/MigrationDescribeCommand.js.map +1 -1
  220. package/dist/production/src/commands/migrations/MigrationDiffCommand.cjs.map +1 -1
  221. package/dist/production/src/commands/migrations/MigrationDiffCommand.js.map +1 -1
  222. package/dist/production/src/commands/migrations/MigrationExecuteCommand.cjs.map +1 -1
  223. package/dist/production/src/commands/migrations/MigrationExecuteCommand.js.map +1 -1
  224. package/dist/production/src/commands/migrations/MigrationRebaseCommand.cjs.map +1 -1
  225. package/dist/production/src/commands/migrations/MigrationRebaseCommand.js.map +1 -1
  226. package/dist/production/src/commands/migrations/MigrationStatusCommand.cjs +1 -1
  227. package/dist/production/src/commands/migrations/MigrationStatusCommand.cjs.map +1 -1
  228. package/dist/production/src/commands/migrations/MigrationStatusCommand.js +1 -1
  229. package/dist/production/src/commands/migrations/MigrationStatusCommand.js.map +1 -1
  230. package/dist/production/src/commands/misc/VersionCommand.cjs.map +1 -1
  231. package/dist/production/src/commands/misc/VersionCommand.js.map +1 -1
  232. package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.cjs.map +1 -1
  233. package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.js.map +1 -1
  234. package/dist/production/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -1
  235. package/dist/production/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -1
  236. package/dist/production/src/commands/project/ProjectValidateCommand.cjs.map +1 -1
  237. package/dist/production/src/commands/project/ProjectValidateCommand.js.map +1 -1
  238. package/dist/production/src/commands/transfer/ExportCommand.cjs +7 -2
  239. package/dist/production/src/commands/transfer/ExportCommand.cjs.map +1 -1
  240. package/dist/production/src/commands/transfer/ExportCommand.js +8 -3
  241. package/dist/production/src/commands/transfer/ExportCommand.js.map +1 -1
  242. package/dist/production/src/commands/transfer/ImportCommand.cjs +7 -4
  243. package/dist/production/src/commands/transfer/ImportCommand.cjs.map +1 -1
  244. package/dist/production/src/commands/transfer/ImportCommand.js +5 -2
  245. package/dist/production/src/commands/transfer/ImportCommand.js.map +1 -1
  246. package/dist/production/src/commands/transfer/TransferCommand.cjs +4 -5
  247. package/dist/production/src/commands/transfer/TransferCommand.cjs.map +1 -1
  248. package/dist/production/src/commands/transfer/TransferCommand.js +4 -5
  249. package/dist/production/src/commands/transfer/TransferCommand.js.map +1 -1
  250. package/dist/production/src/commands/transfer/utils.cjs.map +1 -1
  251. package/dist/production/src/commands/transfer/utils.js.map +1 -1
  252. package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.cjs +16 -14
  253. package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.cjs.map +1 -1
  254. package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.js +16 -14
  255. package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +1 -1
  256. package/dist/production/src/consts.cjs.map +1 -1
  257. package/dist/production/src/dic.cjs +100 -4
  258. package/dist/production/src/dic.cjs.map +1 -1
  259. package/dist/production/src/dic.js +101 -5
  260. package/dist/production/src/dic.js.map +1 -1
  261. package/dist/production/src/lib/SystemClientProvider.cjs.map +1 -1
  262. package/dist/production/src/lib/SystemClientProvider.js.map +1 -1
  263. package/dist/production/src/lib/TenantClientProvider.cjs.map +1 -1
  264. package/dist/production/src/lib/TenantClientProvider.js.map +1 -1
  265. package/dist/production/src/lib/VersionChecker.cjs +7 -9
  266. package/dist/production/src/lib/VersionChecker.cjs.map +1 -1
  267. package/dist/production/src/lib/VersionChecker.js +7 -9
  268. package/dist/production/src/lib/VersionChecker.js.map +1 -1
  269. package/dist/production/src/lib/actions/ActionsClient.cjs +91 -0
  270. package/dist/production/src/lib/actions/ActionsClient.cjs.map +1 -0
  271. package/dist/production/src/lib/actions/ActionsClient.js +91 -0
  272. package/dist/production/src/lib/actions/ActionsClient.js.map +1 -0
  273. package/dist/production/src/lib/admin/AdminClient.cjs.map +1 -1
  274. package/dist/production/src/lib/admin/AdminClient.js.map +1 -1
  275. package/dist/production/src/lib/admin/AdminDeployer.cjs.map +1 -1
  276. package/dist/production/src/lib/admin/AdminDeployer.js.map +1 -1
  277. package/dist/production/src/lib/assertNever.cjs.map +1 -1
  278. package/dist/production/src/lib/assertNever.js.map +1 -1
  279. package/dist/production/src/lib/dsn.cjs.map +1 -1
  280. package/dist/production/src/lib/dsn.js.map +1 -1
  281. package/dist/production/src/lib/env.cjs.map +1 -1
  282. package/dist/production/src/lib/env.js.map +1 -1
  283. package/dist/production/src/lib/fs/DockerComposeManager.cjs.map +1 -1
  284. package/dist/production/src/lib/fs/DockerComposeManager.js.map +1 -1
  285. package/dist/production/src/lib/fs/FileSystem.cjs.map +1 -1
  286. package/dist/production/src/lib/fs/FileSystem.js.map +1 -1
  287. package/dist/production/src/lib/fs/YamlHandler.cjs.map +1 -1
  288. package/dist/production/src/lib/fs/YamlHandler.js.map +1 -1
  289. package/dist/production/src/lib/js/EsBuildBuilder.cjs.map +1 -1
  290. package/dist/production/src/lib/js/EsBuildBuilder.js.map +1 -1
  291. package/dist/production/src/lib/js/EvalExecutor.cjs.map +1 -1
  292. package/dist/production/src/lib/js/EvalExecutor.js.map +1 -1
  293. package/dist/production/src/lib/js/JsCodeRunner.cjs.map +1 -1
  294. package/dist/production/src/lib/js/JsCodeRunner.js.map +1 -1
  295. package/dist/production/src/lib/migrations/MigrationExecutionFacade.cjs.map +1 -1
  296. package/dist/production/src/lib/migrations/MigrationExecutionFacade.js.map +1 -1
  297. package/dist/production/src/lib/migrations/MigrationPrinter.cjs +7 -2
  298. package/dist/production/src/lib/migrations/MigrationPrinter.cjs.map +1 -1
  299. package/dist/production/src/lib/migrations/MigrationPrinter.js +7 -2
  300. package/dist/production/src/lib/migrations/MigrationPrinter.js.map +1 -1
  301. package/dist/production/src/lib/migrations/MigrationRebaseFacade.cjs.map +1 -1
  302. package/dist/production/src/lib/migrations/MigrationRebaseFacade.js.map +1 -1
  303. package/dist/production/src/lib/migrations/MigrationsStatusFacade.cjs +3 -3
  304. package/dist/production/src/lib/migrations/MigrationsStatusFacade.cjs.map +1 -1
  305. package/dist/production/src/lib/migrations/MigrationsStatusFacade.js +3 -3
  306. package/dist/production/src/lib/migrations/MigrationsStatusFacade.js.map +1 -1
  307. package/dist/production/src/lib/migrations/MigrationsValidator.cjs.map +1 -1
  308. package/dist/production/src/lib/migrations/MigrationsValidator.js.map +1 -1
  309. package/dist/production/src/lib/project/RemoteProject.cjs.map +1 -1
  310. package/dist/production/src/lib/project/RemoteProject.js.map +1 -1
  311. package/dist/production/src/lib/project/RemoteProjectProvider.cjs.map +1 -1
  312. package/dist/production/src/lib/project/RemoteProjectProvider.js.map +1 -1
  313. package/dist/production/src/lib/project/RemoteProjectResolver.cjs.map +1 -1
  314. package/dist/production/src/lib/project/RemoteProjectResolver.js.map +1 -1
  315. package/dist/production/src/lib/project/docs/components/EntityInfo.cjs +39 -66
  316. package/dist/production/src/lib/project/docs/components/EntityInfo.cjs.map +1 -1
  317. package/dist/production/src/lib/project/docs/components/EntityInfo.js +40 -67
  318. package/dist/production/src/lib/project/docs/components/EntityInfo.js.map +1 -1
  319. package/dist/production/src/lib/project/docs/components/EntityLink.cjs.map +1 -1
  320. package/dist/production/src/lib/project/docs/components/EntityLink.js.map +1 -1
  321. package/dist/production/src/lib/project/docs/components/FieldLink.cjs.map +1 -1
  322. package/dist/production/src/lib/project/docs/components/FieldLink.js.map +1 -1
  323. package/dist/production/src/lib/project/docs/components/FieldPermissions.cjs.map +1 -1
  324. package/dist/production/src/lib/project/docs/components/FieldPermissions.js.map +1 -1
  325. package/dist/production/src/lib/project/docs/components/FieldType.cjs +3 -5
  326. package/dist/production/src/lib/project/docs/components/FieldType.cjs.map +1 -1
  327. package/dist/production/src/lib/project/docs/components/FieldType.js +3 -5
  328. package/dist/production/src/lib/project/docs/components/FieldType.js.map +1 -1
  329. package/dist/production/src/lib/project/docs/components/OnDelete.cjs +4 -8
  330. package/dist/production/src/lib/project/docs/components/OnDelete.cjs.map +1 -1
  331. package/dist/production/src/lib/project/docs/components/OnDelete.js +4 -8
  332. package/dist/production/src/lib/project/docs/components/OnDelete.js.map +1 -1
  333. package/dist/production/src/lib/project/docs/components/ProjectInfo.cjs.map +1 -1
  334. package/dist/production/src/lib/project/docs/components/ProjectInfo.js.map +1 -1
  335. package/dist/production/src/lib/project/docs/components/SinglePermission.cjs.map +1 -1
  336. package/dist/production/src/lib/project/docs/components/SinglePermission.js.map +1 -1
  337. package/dist/production/src/lib/project/docs/components/utils.cjs.map +1 -1
  338. package/dist/production/src/lib/project/docs/components/utils.js.map +1 -1
  339. package/dist/production/src/lib/project/docs/projectDescribe.cjs.map +1 -1
  340. package/dist/production/src/lib/project/docs/projectDescribe.js.map +1 -1
  341. package/dist/production/src/lib/schema/SchemaLoader.cjs.map +1 -1
  342. package/dist/production/src/lib/schema/SchemaLoader.js.map +1 -1
  343. package/dist/production/src/lib/schema/SchemaValidationHelper.cjs.map +1 -1
  344. package/dist/production/src/lib/schema/SchemaValidationPrinter.cjs.map +1 -1
  345. package/dist/production/src/lib/schema/SchemaValidationPrinter.js.map +1 -1
  346. package/dist/production/src/lib/schema/collectReferences.cjs.map +1 -1
  347. package/dist/production/src/lib/schema/collectReferences.js.map +1 -1
  348. package/dist/production/src/lib/stream.cjs +0 -7
  349. package/dist/production/src/lib/stream.cjs.map +1 -1
  350. package/dist/production/src/lib/stream.js +1 -8
  351. package/dist/production/src/lib/stream.js.map +1 -1
  352. package/dist/production/src/lib/tenant/TenantClient.cjs.map +1 -1
  353. package/dist/production/src/lib/tenant/TenantClient.js.map +1 -1
  354. package/dist/production/src/lib/transfer/DataTransferClient.cjs +53 -61
  355. package/dist/production/src/lib/transfer/DataTransferClient.cjs.map +1 -1
  356. package/dist/production/src/lib/transfer/DataTransferClient.js +55 -63
  357. package/dist/production/src/lib/transfer/DataTransferClient.js.map +1 -1
  358. package/dist/production/src/lib/transfer/stdio.cjs.map +1 -1
  359. package/dist/production/src/lib/transfer/stdio.js.map +1 -1
  360. package/dist/production/src/lib/workspace/WorkspaceResolver.cjs +4 -4
  361. package/dist/production/src/lib/workspace/WorkspaceResolver.cjs.map +1 -1
  362. package/dist/production/src/lib/workspace/WorkspaceResolver.js +5 -5
  363. package/dist/production/src/lib/workspace/WorkspaceResolver.js.map +1 -1
  364. package/dist/types/commands/actions/ActionsGetEventCommand.d.ts +16 -0
  365. package/dist/types/commands/actions/ActionsGetEventCommand.d.ts.map +1 -0
  366. package/dist/types/commands/actions/ActionsListFailedEventsCommand.d.ts +15 -0
  367. package/dist/types/commands/actions/ActionsListFailedEventsCommand.d.ts.map +1 -0
  368. package/dist/types/commands/actions/ActionsListVariablesCommand.d.ts +14 -0
  369. package/dist/types/commands/actions/ActionsListVariablesCommand.d.ts.map +1 -0
  370. package/dist/types/commands/actions/ActionsRetryEventCommand.d.ts +16 -0
  371. package/dist/types/commands/actions/ActionsRetryEventCommand.d.ts.map +1 -0
  372. package/dist/types/commands/actions/ActionsSetVariablesCommand.d.ts +19 -0
  373. package/dist/types/commands/actions/ActionsSetVariablesCommand.d.ts.map +1 -0
  374. package/dist/types/commands/actions/ActionsStopEventCommand.d.ts +16 -0
  375. package/dist/types/commands/actions/ActionsStopEventCommand.d.ts.map +1 -0
  376. package/dist/types/commands/deploy/DeployCommand.d.ts.map +1 -1
  377. package/dist/types/commands/migrations/MigrationAmendCommand.d.ts.map +1 -1
  378. package/dist/types/commands/migrations/MigrationBlankCommand.d.ts.map +1 -1
  379. package/dist/types/commands/migrations/MigrationDescribeCommand.d.ts.map +1 -1
  380. package/dist/types/commands/migrations/MigrationDiffCommand.d.ts.map +1 -1
  381. package/dist/types/commands/migrations/MigrationExecuteCommand.d.ts.map +1 -1
  382. package/dist/types/commands/migrations/MigrationRebaseCommand.d.ts.map +1 -1
  383. package/dist/types/commands/migrations/MigrationStatusCommand.d.ts.map +1 -1
  384. package/dist/types/commands/project/ProjectGenerateDocumentationCommand.d.ts.map +1 -1
  385. package/dist/types/commands/project/ProjectPrintSchemaCommand.d.ts.map +1 -1
  386. package/dist/types/commands/transfer/ExportCommand.d.ts.map +1 -1
  387. package/dist/types/commands/transfer/ImportCommand.d.ts.map +1 -1
  388. package/dist/types/commands/transfer/TransferCommand.d.ts.map +1 -1
  389. package/dist/types/commands/transfer/utils.d.ts.map +1 -1
  390. package/dist/types/commands/workspace/WorkspaceUpdateApiCommand.d.ts.map +1 -1
  391. package/dist/types/dic.d.ts +18 -0
  392. package/dist/types/dic.d.ts.map +1 -1
  393. package/dist/types/lib/VersionChecker.d.ts.map +1 -1
  394. package/dist/types/lib/actions/ActionsClient.d.ts +33 -0
  395. package/dist/types/lib/actions/ActionsClient.d.ts.map +1 -0
  396. package/dist/types/lib/admin/AdminClient.d.ts.map +1 -1
  397. package/dist/types/lib/admin/AdminDeployer.d.ts.map +1 -1
  398. package/dist/types/lib/fs/DockerComposeManager.d.ts.map +1 -1
  399. package/dist/types/lib/migrations/MigrationPrinter.d.ts +1 -1
  400. package/dist/types/lib/migrations/MigrationPrinter.d.ts.map +1 -1
  401. package/dist/types/lib/migrations/MigrationsStatusFacade.d.ts +3 -1
  402. package/dist/types/lib/migrations/MigrationsStatusFacade.d.ts.map +1 -1
  403. package/dist/types/lib/project/docs/components/EntityInfo.d.ts.map +1 -1
  404. package/dist/types/lib/project/docs/components/FieldLink.d.ts.map +1 -1
  405. package/dist/types/lib/project/docs/components/FieldPermissions.d.ts.map +1 -1
  406. package/dist/types/lib/project/docs/components/FieldType.d.ts.map +1 -1
  407. package/dist/types/lib/project/docs/components/OnDelete.d.ts.map +1 -1
  408. package/dist/types/lib/project/docs/components/ProjectInfo.d.ts.map +1 -1
  409. package/dist/types/lib/project/docs/projectDescribe.d.ts.map +1 -1
  410. package/dist/types/lib/schema/SchemaValidationPrinter.d.ts.map +1 -1
  411. package/dist/types/lib/stream.d.ts.map +1 -1
  412. package/dist/types/lib/tenant/TenantClient.d.ts.map +1 -1
  413. package/dist/types/lib/transfer/DataTransferClient.d.ts +2 -4
  414. package/dist/types/lib/transfer/DataTransferClient.d.ts.map +1 -1
  415. package/dist/types/tsconfig.tsbuildinfo +1 -1
  416. package/package.json +33 -29
  417. package/src/commands/actions/ActionsGetEventCommand.ts +41 -0
  418. package/src/commands/actions/ActionsListFailedEventsCommand.ts +68 -0
  419. package/src/commands/actions/ActionsListVariablesCommand.ts +36 -0
  420. package/src/commands/actions/ActionsRetryEventCommand.ts +42 -0
  421. package/src/commands/actions/ActionsSetVariablesCommand.ts +62 -0
  422. package/src/commands/actions/ActionsStopEventCommand.ts +42 -0
  423. package/src/commands/deploy/DeployCommand.ts +0 -3
  424. package/src/commands/migrations/MigrationAmendCommand.ts +2 -2
  425. package/src/commands/migrations/MigrationBlankCommand.ts +1 -3
  426. package/src/commands/migrations/MigrationDescribeCommand.ts +0 -1
  427. package/src/commands/migrations/MigrationDiffCommand.ts +0 -2
  428. package/src/commands/migrations/MigrationExecuteCommand.ts +1 -2
  429. package/src/commands/migrations/MigrationRebaseCommand.ts +0 -2
  430. package/src/commands/migrations/MigrationStatusCommand.ts +8 -13
  431. package/src/commands/project/ProjectGenerateDocumentationCommand.ts +1 -2
  432. package/src/commands/project/ProjectPrintSchemaCommand.ts +1 -3
  433. package/src/commands/transfer/ExportCommand.ts +9 -4
  434. package/src/commands/transfer/ImportCommand.ts +7 -3
  435. package/src/commands/transfer/TransferCommand.ts +6 -6
  436. package/src/commands/transfer/utils.ts +0 -1
  437. package/src/commands/workspace/WorkspaceUpdateApiCommand.ts +16 -14
  438. package/src/dic.ts +162 -103
  439. package/src/lib/VersionChecker.ts +11 -9
  440. package/src/lib/actions/ActionsClient.ts +111 -0
  441. package/src/lib/admin/AdminClient.ts +2 -2
  442. package/src/lib/admin/AdminDeployer.ts +0 -1
  443. package/src/lib/fs/DockerComposeManager.ts +0 -3
  444. package/src/lib/migrations/MigrationPrinter.ts +7 -4
  445. package/src/lib/migrations/MigrationsStatusFacade.ts +4 -4
  446. package/src/lib/project/RemoteProjectResolver.ts +2 -2
  447. package/src/lib/project/docs/components/EntityInfo.tsx +36 -31
  448. package/src/lib/project/docs/components/FieldLink.tsx +5 -1
  449. package/src/lib/project/docs/components/FieldPermissions.tsx +8 -6
  450. package/src/lib/project/docs/components/FieldType.tsx +31 -30
  451. package/src/lib/project/docs/components/OnDelete.tsx +15 -13
  452. package/src/lib/project/docs/components/ProjectInfo.tsx +1 -4
  453. package/src/lib/project/docs/components/SinglePermission.tsx +0 -1
  454. package/src/lib/project/docs/components/utils.ts +0 -1
  455. package/src/lib/project/docs/projectDescribe.tsx +0 -2
  456. package/src/lib/project/docs/resources/style.css +2 -3
  457. package/src/lib/schema/SchemaLoader.ts +1 -1
  458. package/src/lib/schema/SchemaValidationPrinter.ts +0 -1
  459. package/src/lib/stream.ts +7 -8
  460. package/src/lib/tenant/TenantClient.ts +0 -1
  461. package/src/lib/transfer/DataTransferClient.ts +56 -74
  462. package/src/lib/transfer/stdio.ts +0 -1
  463. package/src/lib/workspace/WorkspaceResolver.ts +5 -5
  464. package/src/run.ts +2 -5
  465. package/dist/development/src/lib/migrations/migrations.cjs +0 -43
  466. package/dist/development/src/lib/migrations/migrations.cjs.map +0 -1
  467. package/dist/development/src/lib/migrations/migrations.js +0 -43
  468. package/dist/development/src/lib/migrations/migrations.js.map +0 -1
  469. package/dist/production/src/lib/migrations/migrations.cjs +0 -43
  470. package/dist/production/src/lib/migrations/migrations.cjs.map +0 -1
  471. package/dist/production/src/lib/migrations/migrations.js +0 -43
  472. package/dist/production/src/lib/migrations/migrations.js.map +0 -1
  473. package/dist/types/lib/migrations/migrations.d.ts +0 -3
  474. package/dist/types/lib/migrations/migrations.d.ts.map +0 -1
  475. package/postcss.config.js +0 -6
  476. package/src/.eslintrc.cjs +0 -5
  477. package/src/lib/migrations/migrations.ts +0 -45
  478. package/src/lib/project/docs/.eslintrc.cjs +0 -5
  479. package/tailwind.config.js +0 -7
@@ -6,6 +6,7 @@ import { readStream } from '../../lib/stream'
6
6
  import { createGunzip } from 'node:zlib'
7
7
  import { RemoteProjectResolver } from '../../lib/project/RemoteProjectResolver'
8
8
  import { DataTransferClient } from '../../lib/transfer/DataTransferClient'
9
+ import { Duplex, Readable } from 'node:stream'
9
10
 
10
11
  type Args = {
11
12
  source: string
@@ -49,7 +50,6 @@ export class TransferCommand extends Command<Args, Options> {
49
50
  throw `Target project not defined`
50
51
  }
51
52
 
52
-
53
53
  console.log('')
54
54
  console.log('Transferring data between projects:')
55
55
  console.log('')
@@ -67,22 +67,22 @@ export class TransferCommand extends Command<Args, Options> {
67
67
 
68
68
  const includeSystem = input.getOption('include-system') === true
69
69
  const gzipTransfer = !input.getOption('no-gzip-transfer')
70
- const exportResponse = (await this.dataTransferClient.dataExport({
70
+ const exportResponse = await this.dataTransferClient.dataExport({
71
71
  project: sourceProject,
72
72
  includeSystem,
73
73
  excludeTables: input.getOption('exclude-table') ?? [],
74
74
  gzip: gzipTransfer,
75
- }))
76
- const ungzipedResponse = gzipTransfer ? exportResponse.pipe(createGunzip()) : exportResponse
75
+ })
76
+ const stream = Readable.fromWeb(exportResponse.body! as any)
77
77
  const importResponse = await this.dataTransferClient.dataImport({
78
- stream: ungzipedResponse,
78
+ stream: stream,
79
79
  project: targetProject,
80
80
  printProgress: printProgressLine,
81
81
  gzip: gzipTransfer,
82
82
  })
83
83
  console.log('')
84
84
 
85
- const responseData = JSON.parse((await readStream(importResponse)).toString())
85
+ const responseData = await importResponse.json()
86
86
  if (responseData.ok) {
87
87
  console.log('Transfer done.')
88
88
  } else {
@@ -1,7 +1,6 @@
1
1
  import { Input } from '@contember/cli-common'
2
2
  import prompts from 'prompts'
3
3
 
4
-
5
4
  export const confirmImport = async (input: Input<{}, { yes: boolean }>): Promise<boolean> => {
6
5
  if (input.getOption('yes')) {
7
6
  return true
@@ -42,20 +42,22 @@ export class WorkspaceUpdateApiCommand extends Command<Args, Options> {
42
42
  }
43
43
  await this.dockerComposeManager.updateMainDockerComposeConfig(data => ({
44
44
  ...data,
45
- services: Object.fromEntries(Object.entries(data?.services ?? {}).map(([name, service]: [string, any]) => {
46
- const newImage = getNewImage(service.image)
47
- if (newImage) {
48
- console.log(`docker-compose service ${name} updated`)
49
- return [
50
- name,
51
- {
52
- ...service,
53
- image: newImage,
54
- },
55
- ]
56
- }
57
- return [name, service]
58
- })),
45
+ services: Object.fromEntries(
46
+ Object.entries(data?.services ?? {}).map(([name, service]: [string, any]) => {
47
+ const newImage = getNewImage(service.image)
48
+ if (newImage) {
49
+ console.log(`docker-compose service ${name} updated`)
50
+ return [
51
+ name,
52
+ {
53
+ ...service,
54
+ image: newImage,
55
+ },
56
+ ]
57
+ }
58
+ return [name, service]
59
+ }),
60
+ ),
59
61
  }))
60
62
  console.log('API versions updated')
61
63
  console.log('Restart server to apply changes')
package/src/dic.ts CHANGED
@@ -50,11 +50,11 @@ import { DataTransferClient } from './lib/transfer/DataTransferClient'
50
50
  import { ExportCommand, ImportCommand, TransferCommand } from './commands/transfer'
51
51
  import {
52
52
  Application,
53
+ Bun,
53
54
  CommandFactoryList,
54
55
  CommandManager,
55
56
  CommandRunner,
56
57
  Npm,
57
- Bun,
58
58
  PackageWorkspaceResolver,
59
59
  Pnpm,
60
60
  Yarn,
@@ -66,6 +66,12 @@ import { RemoteProjectProvider } from './lib/project/RemoteProjectProvider'
66
66
  import { SystemClientProvider } from './lib/SystemClientProvider'
67
67
  import { TenantClientProvider } from './lib/TenantClientProvider'
68
68
  import { Workspace } from './lib/workspace/Workspace'
69
+ import { ActionsListVariablesCommand } from './commands/actions/ActionsListVariablesCommand'
70
+ import { ActionsSetVariablesCommand } from './commands/actions/ActionsSetVariablesCommand'
71
+ import { ActionsListFailedEventsCommand } from './commands/actions/ActionsListFailedEventsCommand'
72
+ import { ActionsRetryEventCommand } from './commands/actions/ActionsRetryEventCommand'
73
+ import { ActionsGetEventCommand } from './commands/actions/ActionsGetEventCommand'
74
+ import { ActionsStopEventCommand } from './commands/actions/ActionsStopEventCommand'
69
75
 
70
76
  const jsSample = `
71
77
  export const query = \`\`
@@ -85,30 +91,17 @@ export const createContainer = ({ env, version, runtime, workspace }: {
85
91
  runtime: 'node' | 'bun'
86
92
  }) => {
87
93
  return new Builder({})
88
- .addService('env', () =>
89
- env)
90
- .addService('version', () =>
91
- version)
92
- .addService('runtime', () =>
93
- runtime)
94
- .addService('workspace', () =>
95
- workspace)
96
- .addService('fs', () =>
97
- new FileSystem())
98
- .addService('yamlHandler', ({ fs }) =>
99
- new YamlHandler(fs))
100
- .addService('jsExecutor', () =>
101
- new EvalExecutor())
102
- .addService('jsBuilder', () =>
103
- new EsBuildBuilder())
104
- .addService('jsCodeRunner', ({ jsExecutor, jsBuilder }) =>
105
- new JsCodeRunner(jsBuilder, jsExecutor))
106
-
107
- .addService('workspaceResolver', ({ yamlHandler }) =>
108
- new WorkspaceResolver(yamlHandler))
109
-
110
- .addService('remoteProjectResolver', ({ env }) =>
111
- new RemoteProjectResolver(env))
94
+ .addService('env', () => env)
95
+ .addService('version', () => version)
96
+ .addService('runtime', () => runtime)
97
+ .addService('workspace', () => workspace)
98
+ .addService('fs', () => new FileSystem())
99
+ .addService('yamlHandler', ({ fs }) => new YamlHandler(fs))
100
+ .addService('jsExecutor', () => new EvalExecutor())
101
+ .addService('jsBuilder', () => new EsBuildBuilder())
102
+ .addService('jsCodeRunner', ({ jsExecutor, jsBuilder }) => new JsCodeRunner(jsBuilder, jsExecutor))
103
+ .addService('workspaceResolver', ({ yamlHandler }) => new WorkspaceResolver(yamlHandler))
104
+ .addService('remoteProjectResolver', ({ env }) => new RemoteProjectResolver(env))
112
105
  .addService('remoteProjectProvider', ({ remoteProjectResolver }) => {
113
106
  const provider = new RemoteProjectProvider()
114
107
  const remoteProject = remoteProjectResolver.resolve()
@@ -117,12 +110,9 @@ export const createContainer = ({ env, version, runtime, workspace }: {
117
110
  }
118
111
  return provider
119
112
  })
120
- .addService('systemClientProvider', ({ remoteProjectProvider }) =>
121
- new SystemClientProvider(remoteProjectProvider))
122
- .addService('tenantClientProvider', ({ remoteProjectProvider }) =>
123
- new TenantClientProvider(remoteProjectProvider))
124
- .addService('adminClient', ({ remoteProjectProvider }) =>
125
- new AdminClient(remoteProjectProvider))
113
+ .addService('systemClientProvider', ({ remoteProjectProvider }) => new SystemClientProvider(remoteProjectProvider))
114
+ .addService('tenantClientProvider', ({ remoteProjectProvider }) => new TenantClientProvider(remoteProjectProvider))
115
+ .addService('adminClient', ({ remoteProjectProvider }) => new AdminClient(remoteProjectProvider))
126
116
  .addService('migrationFilesManager', ({ jsCodeRunner, workspace }) => {
127
117
  const runJs = runtime === 'bun' ? (file: string) => import(file) : jsCodeRunner.run
128
118
  return new MigrationFilesManager(workspace.migrationsDir, {
@@ -141,16 +131,14 @@ export const createContainer = ({ env, version, runtime, workspace }: {
141
131
  new Bun(fs, commandRunner),
142
132
  ])
143
133
  })
144
- .addService('dockerComposeManager', ({ workspace, env, fs, yamlHandler }) =>
145
- new DockerComposeManager(workspace.baseDir, env.dockerComposeFile, fs, yamlHandler))
146
- .addService('modificationHandlerFactory', () =>
147
- new ModificationHandlerFactory(ModificationHandlerFactory.defaultFactoryMap))
148
- .addService('schemaMigrator', ({ modificationHandlerFactory }) =>
149
- new SchemaMigrator(modificationHandlerFactory))
150
- .addService('migrationsResolver', ({ migrationFilesManager }) =>
151
- new MigrationsResolver(migrationFilesManager))
152
- .addService('schemaVersionBuilder', ({ migrationsResolver, schemaMigrator }) =>
153
- new SchemaVersionBuilder(migrationsResolver, schemaMigrator))
134
+ .addService(
135
+ 'dockerComposeManager',
136
+ ({ workspace, env, fs, yamlHandler }) => new DockerComposeManager(workspace.baseDir, env.dockerComposeFile, fs, yamlHandler),
137
+ )
138
+ .addService('modificationHandlerFactory', () => new ModificationHandlerFactory(ModificationHandlerFactory.defaultFactoryMap))
139
+ .addService('schemaMigrator', ({ modificationHandlerFactory }) => new SchemaMigrator(modificationHandlerFactory))
140
+ .addService('migrationsResolver', ({ migrationFilesManager }) => new MigrationsResolver(migrationFilesManager))
141
+ .addService('schemaVersionBuilder', ({ migrationsResolver, schemaMigrator }) => new SchemaVersionBuilder(migrationsResolver, schemaMigrator))
154
142
  .addService('schemaDiffer', ({ schemaMigrator }) =>
155
143
  new SchemaDiffer(schemaMigrator, {
156
144
  maxPatchSize: env.migrationsOptions?.maxPatchSize,
@@ -161,63 +149,127 @@ export const createContainer = ({ env, version, runtime, workspace }: {
161
149
  ts: jsSample,
162
150
  js: jsSample,
163
151
  }))
164
- .addService('migrationDescriber', ({ modificationHandlerFactory }) =>
165
- new MigrationDescriber(modificationHandlerFactory))
166
- .addService('migrationPrinter', ({ migrationDescriber }) =>
167
- new MigrationPrinter(migrationDescriber))
168
- .addService('migrationsExecutor', () =>
169
- new MigrationExecutor())
170
- .addService('migrationsStatusResolver', () =>
171
- new MigrationsStatusResolver())
172
- .addService('migrationsStatusFacade', ({ systemClientProvider, migrationsResolver, migrationsStatusResolver }) =>
173
- new MigrationsStatusFacade(systemClientProvider, migrationsResolver, migrationsStatusResolver))
174
- .addService('migrationExecutionFacade', ({ systemClientProvider, tenantClientProvider, remoteProjectProvider, schemaVersionBuilder, migrationPrinter, migrationsExecutor, migrationsStatusFacade }) =>
175
- new MigrationExecutionFacade(systemClientProvider, tenantClientProvider, remoteProjectProvider, schemaVersionBuilder, migrationPrinter, migrationsExecutor, migrationsStatusFacade))
176
- .addService('migrationsValidator', ({ migrationDescriber, schemaMigrator }) =>
177
- new MigrationsValidator(migrationDescriber, schemaMigrator))
178
- .addService('migrationRebaseFacade', ({ schemaVersionBuilder, migrationsValidator, systemClientProvider, migrationFilesManager }) =>
179
- new MigrationRebaseFacade(schemaVersionBuilder, migrationsValidator, systemClientProvider, migrationFilesManager))
180
- .addService('schemaLoader', ({ workspace, jsCodeRunner, runtime }) =>
181
- runtime === 'bun' ? new ImportSchemaLoader(workspace) : new TranspilingSchemaLoader(workspace, jsCodeRunner))
182
-
183
- .addService('adminDeployer', ({ remoteProjectProvider, adminClient, fs }) =>
184
- new AdminDeployer(remoteProjectProvider, adminClient, fs))
185
- .addService('dataTransferClient', () =>
186
- new DataTransferClient())
187
-
188
-
189
- .addService('deployCommand', ({ adminDeployer, migrationExecutionFacade, fs, remoteProjectProvider, remoteProjectResolver, workspace }) =>
190
- new DeployCommand(adminDeployer, migrationExecutionFacade, fs, remoteProjectProvider, remoteProjectResolver, workspace))
191
- .addService('migrationAmendCommand', ({ migrationsResolver, systemClientProvider, migrationsStatusFacade, schemaLoader, schemaVersionBuilder, migrationCreator, migrationsValidator, migrationPrinter, schemaMigrator }) =>
192
- new MigrationAmendCommand(migrationsResolver, systemClientProvider, migrationsStatusFacade, schemaLoader, schemaVersionBuilder, migrationCreator, migrationsValidator, migrationPrinter, schemaMigrator))
193
- .addService('migrationBlankCommand', ({ migrationCreator }) =>
194
- new MigrationBlankCommand(migrationCreator))
195
- .addService('migrationDescribeCommand', ({ migrationPrinter, schemaVersionBuilder, migrationsResolver }) =>
196
- new MigrationDescribeCommand(migrationPrinter, schemaVersionBuilder, migrationsResolver))
197
- .addService('migrationDiffCommand', ({ schemaLoader, schemaVersionBuilder, migrationCreator, migrationPrinter, migrationExecutionFacade }) =>
198
- new MigrationDiffCommand(schemaLoader, schemaVersionBuilder, migrationCreator, migrationPrinter, migrationExecutionFacade))
199
- .addService('migrationExecuteCommand', ({ migrationExecutionFacade }) =>
200
- new MigrationExecuteCommand(migrationExecutionFacade))
201
- .addService('migrationRebaseCommand', ({ migrationsResolver, migrationRebaseFacade }) =>
202
- new MigrationRebaseCommand(migrationsResolver, migrationRebaseFacade))
203
- .addService('migrationStatusCommand', ({ migrationsStatusFacade, migrationFilesManager, systemClientProvider, migrationPrinter }) =>
204
- new MigrationStatusCommand(migrationsStatusFacade, migrationFilesManager, systemClientProvider, migrationPrinter))
205
- .addService('versionCommand', ({ version }) =>
206
- new VersionCommand(version))
207
- .addService('projectGenerateDocumentationCommand', ({ schemaLoader, schemaVersionBuilder }) =>
208
- new ProjectGenerateDocumentationCommand(schemaLoader, schemaVersionBuilder))
209
- .addService('projectPrintSchemaCommand', ({ schemaLoader, schemaVersionBuilder }) =>
210
- new ProjectPrintSchemaCommand(schemaLoader, schemaVersionBuilder))
211
- .addService('projectValidateCommand', ({ schemaLoader, migrationsValidator, migrationsResolver, schemaDiffer, schemaVersionBuilder }) =>
212
- new ProjectValidateCommand(schemaLoader, migrationsValidator, migrationsResolver, schemaDiffer, schemaVersionBuilder))
213
- .addService('exportCommand', ({ dataTransferClient, remoteProjectResolver }) =>
214
- new ExportCommand(remoteProjectResolver, dataTransferClient))
215
- .addService('importCommand', ({ dataTransferClient, remoteProjectResolver }) =>
216
- new ImportCommand(remoteProjectResolver, dataTransferClient))
217
- .addService('transferCommand', ({ dataTransferClient, remoteProjectResolver }) =>
218
- new TransferCommand(remoteProjectResolver, dataTransferClient))
219
- .addService('workspaceUpdateCommand', ({ packageWorkspaceResolver, dockerComposeManager }) =>
220
- new WorkspaceUpdateApiCommand(packageWorkspaceResolver, dockerComposeManager))
152
+ .addService('migrationDescriber', ({ modificationHandlerFactory }) => new MigrationDescriber(modificationHandlerFactory))
153
+ .addService('migrationPrinter', ({ migrationDescriber }) => new MigrationPrinter(migrationDescriber))
154
+ .addService('migrationsExecutor', () => new MigrationExecutor())
155
+ .addService('migrationsStatusResolver', () => new MigrationsStatusResolver())
156
+ .addService(
157
+ 'migrationsStatusFacade',
158
+ ({ systemClientProvider, migrationsResolver, migrationsStatusResolver, migrationPrinter }) =>
159
+ new MigrationsStatusFacade(systemClientProvider, migrationsResolver, migrationsStatusResolver, migrationPrinter),
160
+ )
161
+ .addService(
162
+ 'migrationExecutionFacade',
163
+ ({
164
+ systemClientProvider,
165
+ tenantClientProvider,
166
+ remoteProjectProvider,
167
+ schemaVersionBuilder,
168
+ migrationPrinter,
169
+ migrationsExecutor,
170
+ migrationsStatusFacade,
171
+ }) =>
172
+ new MigrationExecutionFacade(
173
+ systemClientProvider,
174
+ tenantClientProvider,
175
+ remoteProjectProvider,
176
+ schemaVersionBuilder,
177
+ migrationPrinter,
178
+ migrationsExecutor,
179
+ migrationsStatusFacade,
180
+ ),
181
+ )
182
+ .addService('migrationsValidator', ({ migrationDescriber, schemaMigrator }) => new MigrationsValidator(migrationDescriber, schemaMigrator))
183
+ .addService(
184
+ 'migrationRebaseFacade',
185
+ ({ schemaVersionBuilder, migrationsValidator, systemClientProvider, migrationFilesManager }) =>
186
+ new MigrationRebaseFacade(schemaVersionBuilder, migrationsValidator, systemClientProvider, migrationFilesManager),
187
+ )
188
+ .addService(
189
+ 'schemaLoader',
190
+ ({ workspace, jsCodeRunner, runtime }) =>
191
+ runtime === 'bun' ? new ImportSchemaLoader(workspace) : new TranspilingSchemaLoader(workspace, jsCodeRunner),
192
+ )
193
+ .addService('adminDeployer', ({ remoteProjectProvider, adminClient, fs }) => new AdminDeployer(remoteProjectProvider, adminClient, fs))
194
+ .addService('dataTransferClient', () => new DataTransferClient())
195
+ .addService(
196
+ 'deployCommand',
197
+ ({ adminDeployer, migrationExecutionFacade, fs, remoteProjectProvider, remoteProjectResolver, workspace }) =>
198
+ new DeployCommand(adminDeployer, migrationExecutionFacade, fs, remoteProjectProvider, remoteProjectResolver, workspace),
199
+ )
200
+ .addService(
201
+ 'migrationAmendCommand',
202
+ ({
203
+ migrationsResolver,
204
+ systemClientProvider,
205
+ migrationsStatusFacade,
206
+ schemaLoader,
207
+ schemaVersionBuilder,
208
+ migrationCreator,
209
+ migrationsValidator,
210
+ migrationPrinter,
211
+ schemaMigrator,
212
+ }) =>
213
+ new MigrationAmendCommand(
214
+ migrationsResolver,
215
+ systemClientProvider,
216
+ migrationsStatusFacade,
217
+ schemaLoader,
218
+ schemaVersionBuilder,
219
+ migrationCreator,
220
+ migrationsValidator,
221
+ migrationPrinter,
222
+ schemaMigrator,
223
+ ),
224
+ )
225
+ .addService('migrationBlankCommand', ({ migrationCreator }) => new MigrationBlankCommand(migrationCreator))
226
+ .addService(
227
+ 'migrationDescribeCommand',
228
+ ({ migrationPrinter, schemaVersionBuilder, migrationsResolver }) =>
229
+ new MigrationDescribeCommand(migrationPrinter, schemaVersionBuilder, migrationsResolver),
230
+ )
231
+ .addService(
232
+ 'migrationDiffCommand',
233
+ ({ schemaLoader, schemaVersionBuilder, migrationCreator, migrationPrinter, migrationExecutionFacade }) =>
234
+ new MigrationDiffCommand(schemaLoader, schemaVersionBuilder, migrationCreator, migrationPrinter, migrationExecutionFacade),
235
+ )
236
+ .addService('migrationExecuteCommand', ({ migrationExecutionFacade }) => new MigrationExecuteCommand(migrationExecutionFacade))
237
+ .addService(
238
+ 'migrationRebaseCommand',
239
+ ({ migrationsResolver, migrationRebaseFacade }) => new MigrationRebaseCommand(migrationsResolver, migrationRebaseFacade),
240
+ )
241
+ .addService(
242
+ 'migrationStatusCommand',
243
+ ({ migrationsStatusFacade, migrationFilesManager, systemClientProvider, migrationPrinter }) =>
244
+ new MigrationStatusCommand(migrationsStatusFacade, migrationFilesManager, systemClientProvider, migrationPrinter),
245
+ )
246
+ .addService('versionCommand', ({ version }) => new VersionCommand(version))
247
+ .addService(
248
+ 'projectGenerateDocumentationCommand',
249
+ ({ schemaLoader, schemaVersionBuilder }) => new ProjectGenerateDocumentationCommand(schemaLoader, schemaVersionBuilder),
250
+ )
251
+ .addService(
252
+ 'projectPrintSchemaCommand',
253
+ ({ schemaLoader, schemaVersionBuilder }) => new ProjectPrintSchemaCommand(schemaLoader, schemaVersionBuilder),
254
+ )
255
+ .addService(
256
+ 'projectValidateCommand',
257
+ ({ schemaLoader, migrationsValidator, migrationsResolver, schemaDiffer, schemaVersionBuilder }) =>
258
+ new ProjectValidateCommand(schemaLoader, migrationsValidator, migrationsResolver, schemaDiffer, schemaVersionBuilder),
259
+ )
260
+ .addService('exportCommand', ({ dataTransferClient, remoteProjectResolver }) => new ExportCommand(remoteProjectResolver, dataTransferClient))
261
+ .addService('importCommand', ({ dataTransferClient, remoteProjectResolver }) => new ImportCommand(remoteProjectResolver, dataTransferClient))
262
+ .addService('transferCommand', ({ dataTransferClient, remoteProjectResolver }) => new TransferCommand(remoteProjectResolver, dataTransferClient))
263
+ .addService(
264
+ 'workspaceUpdateCommand',
265
+ ({ packageWorkspaceResolver, dockerComposeManager }) => new WorkspaceUpdateApiCommand(packageWorkspaceResolver, dockerComposeManager),
266
+ )
267
+ .addService('actionsListVariables', ({ remoteProjectResolver }) => new ActionsListVariablesCommand(remoteProjectResolver))
268
+ .addService('actionsSetVariables', ({ remoteProjectResolver }) => new ActionsSetVariablesCommand(remoteProjectResolver))
269
+ .addService('actionsListFailedEvents', ({ remoteProjectResolver }) => new ActionsListFailedEventsCommand(remoteProjectResolver))
270
+ .addService('actionsRetryEvent', ({ remoteProjectResolver }) => new ActionsRetryEventCommand(remoteProjectResolver))
271
+ .addService('actionsGetEvent', ({ remoteProjectResolver }) => new ActionsGetEventCommand(remoteProjectResolver))
272
+ .addService('actionsStopEvent', ({ remoteProjectResolver }) => new ActionsStopEventCommand(remoteProjectResolver))
221
273
  .addService('commandList', dic => {
222
274
  const commands: CommandFactoryList = {
223
275
  ['deploy']: () => dic.deployCommand,
@@ -236,14 +288,21 @@ export const createContainer = ({ env, version, runtime, workspace }: {
236
288
  ['project:validate']: () => dic.projectValidateCommand,
237
289
  ['project:print-schema']: () => dic.projectPrintSchemaCommand,
238
290
  ['project:generate-doc']: () => dic.projectGenerateDocumentationCommand,
291
+ ['actions:list-variables']: () => dic.actionsListVariables,
292
+ ['actions:set-variables']: () => dic.actionsSetVariables,
293
+ ['actions:failed-events']: () => dic.actionsListFailedEvents,
294
+ ['actions:retry-event']: () => dic.actionsRetryEvent,
295
+ ['actions:get-event']: () => dic.actionsGetEvent,
296
+ ['actions:stop-event']: () => dic.actionsStopEvent,
239
297
  }
240
298
  return commands
241
299
  })
242
- .addService('commandManager', ({ commandList }) =>
243
- new CommandManager(commandList))
244
-
245
- .addService('versionChecker', ({ version, workspace, packageWorkspaceResolver, dockerComposeManager }) =>
246
- new VersionChecker(version, workspace.baseDir, packageWorkspaceResolver, dockerComposeManager))
300
+ .addService('commandManager', ({ commandList }) => new CommandManager(commandList))
301
+ .addService(
302
+ 'versionChecker',
303
+ ({ version, workspace, packageWorkspaceResolver, dockerComposeManager }) =>
304
+ new VersionChecker(version, workspace.baseDir, packageWorkspaceResolver, dockerComposeManager),
305
+ )
247
306
  .addService('application', ({ commandManager, versionChecker }) => {
248
307
  const app = new Application(
249
308
  commandManager,
@@ -46,17 +46,13 @@ export class VersionChecker {
46
46
  if (!def.image) {
47
47
  continue
48
48
  }
49
- const [image, version] = def.image.split(':')
50
- if (!version || !contemberDockerImages.includes(image)) {
49
+ const [image, tag] = def.image.split(':')
50
+ if (!tag || !contemberDockerImages.includes(image)) {
51
51
  continue
52
52
  }
53
- const versionParts = version.split(/[.-]/)
54
- if (versionParts[versionParts.length - 1] === 'debian') {
55
- versionParts.pop()
56
- }
57
- const cliVersionParts = cliVersion.split(/[.-]/).slice(0, versionParts.length)
58
- if (versionParts.join('.') !== cliVersionParts.join('.')) {
59
- errors.push(`Docker service ${name} with image ${image}:${version} does not match version of CLI ${cliVersion}.`)
53
+
54
+ if (extractVersion(tag) !== cliVersion) {
55
+ errors.push(`Docker service ${name} with image ${image}:${tag} does not match version of CLI ${cliVersion}.`)
60
56
  }
61
57
  }
62
58
  }
@@ -67,5 +63,11 @@ export class VersionChecker {
67
63
  Please make sure all dependencies are up to date.\nIf you are really certain about the compatibility, you can disable this version check by running the CLI with the CONTEMBER_SKIP_VERSION_CHECK=1 environment variable`
68
64
  }
69
65
  }
66
+ }
70
67
 
68
+ const extractVersion = (tag: string) => {
69
+ // e.g.
70
+ // 2.1.0-alpha.15-foo-bar => 2.1.0-alpha.15
71
+ // 2.1.0-debian => 2.1.0
72
+ return tag.match(/^\d+\.\d+\.\d+(-\w+\.\d+)?/)?.[0] ?? tag
71
73
  }
@@ -0,0 +1,111 @@
1
+ import { GraphQlClient } from '@contember/graphql-client'
2
+
3
+ const createActionsApiUrl = (url: string, project: string) => {
4
+ if (url.endsWith('/')) {
5
+ url = url.substring(0, url.length - 1)
6
+ }
7
+
8
+ return url + '/actions/' + project
9
+ }
10
+ export class ActionsClient {
11
+ constructor(private readonly apiClient: GraphQlClient) {
12
+ }
13
+
14
+ public static create(url: string, project: string, apiToken: string): ActionsClient {
15
+ const graphqlClient = new GraphQlClient({ url: createActionsApiUrl(url, project), apiToken })
16
+ return new ActionsClient(graphqlClient)
17
+ }
18
+
19
+ public async listVariables(): Promise<{ name: string; value: string }[]> {
20
+ const query = `query {
21
+ variables {
22
+ name
23
+ value
24
+ }
25
+ }`
26
+ const result = await this.apiClient.execute<{
27
+ variables: Array<{ name: string; value: string }>
28
+ }>(query)
29
+ return result.variables
30
+ }
31
+
32
+ public async setVariables(variables: { name: string; value: string }[], mode: 'MERGE' | 'SET' | 'APPEND_ONLY_MISSING'): Promise<boolean> {
33
+ const query = `mutation($variables: [VariableInput!]!, $mode: SetVariablesMode) {
34
+ setVariables(args: { variables: $variables, mode: $mode }) {
35
+ ok
36
+ }
37
+ }`
38
+ const result = await this.apiClient.execute<{ setVariables: { ok: boolean } }>(query, { variables: { mode, variables } })
39
+ return result.setVariables.ok
40
+ }
41
+
42
+ public async listFailedEvents({ offset, limit }: { offset?: number; limit?: number } = {}): Promise<Event[]> {
43
+ const query = `query($offset: Int, $limit: Int) {
44
+ failedEvents(args: { offset: $offset, limit: $limit }) {
45
+ id
46
+ createdAt
47
+ lastStateChange
48
+ visibleAt
49
+ numRetries
50
+ state
51
+ target
52
+ payload
53
+ log
54
+ }
55
+ }`
56
+ const result = await this.apiClient.execute<{
57
+ failedEvents: Event[]
58
+ }>(query, { variables: { offset, limit } })
59
+ return result.failedEvents
60
+ }
61
+
62
+ public async retryEvent(id: string): Promise<boolean> {
63
+ const query = `mutation($id: UUID!) {
64
+ retryEvent(id: $id) {
65
+ ok
66
+ }
67
+ }`
68
+ const result = await this.apiClient.execute<{ retryEvent: { ok: boolean } }>(query, { variables: { id } })
69
+ return result.retryEvent.ok
70
+ }
71
+
72
+ public async stopEvent(id: string): Promise<boolean> {
73
+ const query = `mutation($id: UUID!) {
74
+ stopEvent(id: $id) {
75
+ ok
76
+ }
77
+ }`
78
+ const result = await this.apiClient.execute<{ stopEvent: { ok: boolean } }>(query, { variables: { id } })
79
+ return result.stopEvent.ok
80
+ }
81
+
82
+ public async getEvent(id: string): Promise<Event | null> {
83
+ const query = `query($id: UUID!) {
84
+ event(id: $id) {
85
+ id
86
+ createdAt
87
+ lastStateChange
88
+ visibleAt
89
+ numRetries
90
+ state
91
+ target
92
+ payload
93
+ log
94
+ }
95
+ }`
96
+ const result = await this.apiClient.execute<{ event: Event | null }>(query, { variables: { id } })
97
+ return result.event
98
+ }
99
+ }
100
+
101
+ export type Event = {
102
+ id: string
103
+ createdAt: string
104
+ lastStateChange: string
105
+ visibleAt: string | null
106
+ numRetries: number
107
+ state: 'retrying' | 'failed'
108
+ target: string
109
+ payload: any
110
+ log: any
111
+ }
@@ -14,7 +14,8 @@ export class AdminClient {
14
14
  if (!response.ok) {
15
15
  const project = this.remoteProjectProvider.get()
16
16
  const maskedToken = maskToken(project.token)
17
- throw `Failed to deploy admin, POST request to ${project.adminEndpoint}/_deploy with token ${maskedToken} returned status ${response.status} ${response.statusText}\n${await response.text()}`
17
+ throw `Failed to deploy admin, POST request to ${project.adminEndpoint}/_deploy with token ${maskedToken} returned status ${response.status} ${response.statusText}\n${await response
18
+ .text()}`
18
19
  }
19
20
  }
20
21
 
@@ -29,5 +30,4 @@ export class AdminClient {
29
30
  body: JSON.stringify(body),
30
31
  })
31
32
  }
32
-
33
33
  }
@@ -25,7 +25,6 @@ export class AdminDeployer {
25
25
  console.log(`Admin deployed (${files.length} files)`)
26
26
  }
27
27
 
28
-
29
28
  private readAdminFiles = async (dir: string, prefix: string = ''): Promise<AdminFiles> => {
30
29
  const files = []
31
30
  for (const fileName of await this.fs.readDir(dir, { withFileTypes: true })) {
@@ -18,10 +18,8 @@ export interface DockerComposeConfig {
18
18
  services?: Record<string, DockerComposeServiceConfig>
19
19
  }
20
20
 
21
-
22
21
  const MAIN_CONFIGS = ['docker-compose.yaml', 'docker-compose.yml']
23
22
 
24
-
25
23
  export class DockerComposeManager {
26
24
  constructor(
27
25
  private readonly dir: string,
@@ -59,5 +57,4 @@ export class DockerComposeManager {
59
57
  }
60
58
  return null
61
59
  }
62
-
63
60
  }
@@ -1,4 +1,3 @@
1
- // eslint-disable-next-line @typescript-eslint/triple-slash-reference
2
1
  /// <reference path="../../../types/chalk-table/index.d.ts" />
3
2
 
4
3
  import { Schema } from '@contember/schema'
@@ -50,7 +49,7 @@ export class MigrationPrinter {
50
49
  }
51
50
 
52
51
  printStatusTable = (migrations: AnyMigrationStatus[]) => {
53
- const table = chalkTable(
52
+ return chalkTable(
54
53
  {
55
54
  columns: ['status', 'migration', 'info'],
56
55
  },
@@ -78,12 +77,16 @@ export class MigrationPrinter {
78
77
  }
79
78
  case MigrationState.TO_EXECUTE_ERROR:
80
79
  return { status: chalk.bgRedBright.white('ERROR'), migration: it.name, info: it.errorMessage }
80
+ case MigrationState.SKIP_EMPTY:
81
+ return {
82
+ status: chalk.bgYellow.white('Skip'),
83
+ migration: it.name,
84
+ info: `Skipped because empty`,
85
+ }
81
86
  default:
82
87
  assertNever(it)
83
88
  }
84
89
  }),
85
90
  )
86
- console.log(table)
87
91
  }
88
-
89
92
  }