@contember/cli 2.1.0-alpha.8 → 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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contember/cli",
3
- "version": "2.1.0-alpha.8",
3
+ "version": "2.1.0-beta.1",
4
4
  "license": "Apache-2.0",
5
5
  "bin": {
6
6
  "contember": "./dist/production/run.js"
@@ -10,43 +10,47 @@
10
10
  "build": "tailwindcss -i src/lib/project/docs/resources/style.css -o ./dist/resources/out.css"
11
11
  },
12
12
  "devDependencies": {
13
+ "@tailwindcss/cli": "^4.2.1",
13
14
  "@types/fs-extra": "^11.0.4",
14
15
  "@types/js-yaml": "^4.0.9",
15
- "@types/node": "^20.17.22",
16
+ "@types/node": "^24.12.0",
16
17
  "@types/prompts": "^2.4.9",
17
- "@types/semver": "^7.5.8",
18
- "autoprefixer": "^10.4.20",
19
- "postcss": "^8.4.47",
20
- "tailwindcss": "^3.4.14"
18
+ "@types/semver": "^7.7.1",
19
+ "tailwindcss": "^4.2.1"
21
20
  },
22
21
  "dependencies": {
23
- "@contember/cli-common": "2.1.0-alpha.8",
24
- "@contember/config-loader": "2.1.0-alpha.8",
25
- "@contember/database": "2.1.0-alpha.8",
26
- "@contember/dic": "2.1.0-alpha.8",
27
- "@contember/engine-common": "2.1.0-alpha.8",
28
- "@contember/engine-content-api": "2.1.0-alpha.8",
29
- "@contember/graphql-client": "2.1.0-alpha.8",
30
- "@contember/migrations-client": "2.1.0-alpha.8",
31
- "@contember/schema": "2.1.0-alpha.8",
32
- "@contember/schema-migrations": "2.1.0-alpha.8",
33
- "@contember/schema-utils": "2.1.0-alpha.8",
34
- "@contember/typesafe": "2.1.0-alpha.8",
35
- "@graphql-tools/schema": "^10.0.7",
36
- "chalk": "^5.3.0",
22
+ "@contember/cli-common": "2.1.0-beta.1",
23
+ "@contember/config-loader": "2.1.0-beta.1",
24
+ "@contember/database": "2.1.0-beta.1",
25
+ "@contember/dic": "2.1.0-beta.1",
26
+ "@contember/engine-common": "2.1.0-beta.1",
27
+ "@contember/engine-content-api": "2.1.0-beta.1",
28
+ "@contember/graphql-client": "2.1.0-beta.1",
29
+ "@contember/migrations-client": "2.1.0-beta.1",
30
+ "@contember/schema": "2.1.0-beta.1",
31
+ "@contember/schema-migrations": "2.1.0-beta.1",
32
+ "@contember/schema-utils": "2.1.0-beta.1",
33
+ "@contember/typesafe": "2.1.0-beta.1",
34
+ "@graphql-tools/schema": "^10.0.31",
35
+ "chalk": "^5.6.2",
37
36
  "chalk-table": "^1.0.2",
38
- "fast-glob": "^3.3.2",
39
- "graphql": "^16.9.0",
40
- "js-yaml": "^4.1.0",
41
- "lodash-es": "^4.17.21",
42
- "pg": "^8.12.0",
43
- "preact": "^10.23.2",
44
- "preact-render-to-string": "^6.5.11",
37
+ "fast-glob": "^3.3.3",
38
+ "graphql": "^16.13.1",
39
+ "js-yaml": "^4.1.1",
40
+ "lodash-es": "^4.17.23",
41
+ "pg": "^8.20.0",
42
+ "preact": "^10.28.4",
43
+ "preact-render-to-string": "^6.6.6",
45
44
  "prompts": "^2.4.2",
46
- "semver": "^7.6.3",
47
- "yawn-yaml": "^2.3.0"
45
+ "semver": "^7.7.4",
46
+ "yawn-yaml": "^3.0.0"
48
47
  },
49
48
  "peerDependencies": {
50
49
  "esbuild": "*"
50
+ },
51
+ "repository": {
52
+ "type": "git",
53
+ "url": "git+https://github.com/contember/contember.git",
54
+ "directory": "packages/cli"
51
55
  }
52
56
  }
@@ -0,0 +1,41 @@
1
+ import { Command, CommandConfiguration, Input } from '@contember/cli-common'
2
+ import { RemoteProjectResolver } from '../../lib/project/RemoteProjectResolver'
3
+ import { ActionsClient } from '../../lib/actions/ActionsClient'
4
+
5
+ type Args = {
6
+ eventId: string
7
+ }
8
+
9
+ type Options = {
10
+ project?: string
11
+ }
12
+
13
+ export class ActionsGetEventCommand extends Command<Args, Options> {
14
+ constructor(
15
+ private readonly remoteProjectResolver: RemoteProjectResolver,
16
+ ) {
17
+ super()
18
+ }
19
+
20
+ protected configure(configuration: CommandConfiguration<Args, Options>): void {
21
+ configuration.description('Get single event')
22
+ configuration.argument('eventId')
23
+ configuration.option('project').valueRequired()
24
+ }
25
+
26
+ protected async execute(input: Input<Args, Options>): Promise<void | number> {
27
+ const dsn = input.getOption('project')
28
+ const project = await this.remoteProjectResolver.resolve(dsn)
29
+ if (!project) {
30
+ throw `Project not defined`
31
+ }
32
+ const api = ActionsClient.create(project.endpoint, project.name, project.token)
33
+
34
+ const result = await api.getEvent(input.getArgument('eventId'))
35
+ if (!result) {
36
+ console.log('Event not found')
37
+ return 1
38
+ }
39
+ console.log(JSON.stringify(result, null, 2))
40
+ }
41
+ }
@@ -0,0 +1,68 @@
1
+ import { Command, CommandConfiguration, Input } from '@contember/cli-common'
2
+ import { RemoteProjectResolver } from '../../lib/project/RemoteProjectResolver'
3
+ import { ActionsClient } from '../../lib/actions/ActionsClient'
4
+ import chalkTable from 'chalk-table'
5
+ type Args = {}
6
+
7
+ type Options = {
8
+ project?: string
9
+ json?: boolean
10
+ }
11
+
12
+ export class ActionsListFailedEventsCommand extends Command<Args, Options> {
13
+ constructor(
14
+ private readonly remoteProjectResolver: RemoteProjectResolver,
15
+ ) {
16
+ super()
17
+ }
18
+
19
+ protected configure(configuration: CommandConfiguration<Args, Options>): void {
20
+ configuration.description('Show failed events')
21
+ configuration.option('project').valueRequired()
22
+ configuration.option('json').valueNone()
23
+ }
24
+
25
+ protected async execute(input: Input<Args, Options>): Promise<void | number> {
26
+ const dsn = input.getOption('project')
27
+ const project = await this.remoteProjectResolver.resolve(dsn)
28
+ if (!project) {
29
+ throw `Project not defined`
30
+ }
31
+ const api = ActionsClient.create(project.endpoint, project.name, project.token)
32
+
33
+ const result = await api.listFailedEvents()
34
+ if (input.getOption('json')) {
35
+ console.log(JSON.stringify(result, null, 2))
36
+ return
37
+ }
38
+ if (result.length === 0) {
39
+ console.log('No failed events')
40
+ return
41
+ }
42
+ const table = chalkTable(
43
+ {
44
+ columns: [
45
+ { field: 'id', name: 'ID' },
46
+ { field: 'createdAt', name: 'Created at' },
47
+ { field: 'lastStateChange', name: 'Last state change' },
48
+ { field: 'visibleAt', name: 'Visible at' },
49
+ { field: 'numRetries', name: 'Retries' },
50
+ { field: 'state', name: 'State' },
51
+ { field: 'target', name: 'Target' },
52
+ { field: 'log', name: 'Log' },
53
+ ],
54
+ },
55
+ result.map(it => ({
56
+ id: it.id,
57
+ createdAt: it.createdAt,
58
+ lastStateChange: it.lastStateChange,
59
+ visibleAt: it.visibleAt || '',
60
+ numRetries: it.numRetries.toString(),
61
+ state: it.state,
62
+ target: it.target,
63
+ log: JSON.stringify(it.log.length > 0 ? it.log[it.log.length - 1] : {}),
64
+ })),
65
+ )
66
+ console.log(table)
67
+ }
68
+ }
@@ -0,0 +1,36 @@
1
+ import { Command, CommandConfiguration, Input } from '@contember/cli-common'
2
+ import { RemoteProjectResolver } from '../../lib/project/RemoteProjectResolver'
3
+ import { ActionsClient } from '../../lib/actions/ActionsClient'
4
+ import chalkTable from 'chalk-table'
5
+
6
+ type Args = {}
7
+
8
+ type Options = {
9
+ project?: string
10
+ }
11
+
12
+ export class ActionsListVariablesCommand extends Command<Args, Options> {
13
+ constructor(
14
+ private readonly remoteProjectResolver: RemoteProjectResolver,
15
+ ) {
16
+ super()
17
+ }
18
+
19
+ protected configure(configuration: CommandConfiguration<Args, Options>): void {
20
+ configuration.description('Show action variables')
21
+ configuration.option('project').valueRequired()
22
+ }
23
+
24
+ protected async execute(input: Input<Args, Options>): Promise<void | number> {
25
+ const dsn = input.getOption('project')
26
+ const project = await this.remoteProjectResolver.resolve(dsn)
27
+ if (!project) {
28
+ throw `Project not defined`
29
+ }
30
+ const api = ActionsClient.create(project.endpoint, project.name, project.token)
31
+ const result = await api.listVariables()
32
+ console.log(chalkTable({
33
+ columns: ['name', 'value'],
34
+ }, result))
35
+ }
36
+ }
@@ -0,0 +1,42 @@
1
+ import { Command, CommandConfiguration, Input } from '@contember/cli-common'
2
+ import { RemoteProjectResolver } from '../../lib/project/RemoteProjectResolver'
3
+ import { ActionsClient } from '../../lib/actions/ActionsClient'
4
+ import chalkTable from 'chalk-table'
5
+ type Args = {
6
+ eventId: string
7
+ }
8
+
9
+ type Options = {
10
+ project?: string
11
+ }
12
+
13
+ export class ActionsRetryEventCommand extends Command<Args, Options> {
14
+ constructor(
15
+ private readonly remoteProjectResolver: RemoteProjectResolver,
16
+ ) {
17
+ super()
18
+ }
19
+
20
+ protected configure(configuration: CommandConfiguration<Args, Options>): void {
21
+ configuration.description('Retry given event')
22
+ configuration.argument('eventId')
23
+ configuration.option('project').valueRequired()
24
+ }
25
+
26
+ protected async execute(input: Input<Args, Options>): Promise<void | number> {
27
+ const dsn = input.getOption('project')
28
+ const project = await this.remoteProjectResolver.resolve(dsn)
29
+ if (!project) {
30
+ throw `Project not defined`
31
+ }
32
+ const api = ActionsClient.create(project.endpoint, project.name, project.token)
33
+
34
+ const result = await api.retryEvent(input.getArgument('eventId'))
35
+ if (result) {
36
+ console.log('Event requeued for processing')
37
+ } else {
38
+ console.log('Failed to requeue event. Check the event status')
39
+ return 1
40
+ }
41
+ }
42
+ }
@@ -0,0 +1,62 @@
1
+ import { Command, CommandConfiguration, Input } from '@contember/cli-common'
2
+ import { RemoteProjectResolver } from '../../lib/project/RemoteProjectResolver'
3
+ import { ActionsClient } from '../../lib/actions/ActionsClient'
4
+
5
+ type Args = {
6
+ variables: string[]
7
+ }
8
+
9
+ type Options = {
10
+ project?: string
11
+ merge?: boolean
12
+ set?: boolean
13
+ ['append-only-missing']?: boolean
14
+ }
15
+
16
+ export class ActionsSetVariablesCommand extends Command<Args, Options> {
17
+ constructor(
18
+ private readonly remoteProjectResolver: RemoteProjectResolver,
19
+ ) {
20
+ super()
21
+ }
22
+
23
+ protected configure(configuration: CommandConfiguration<Args, Options>): void {
24
+ configuration.description('Set action variables')
25
+ configuration.option('project').valueRequired()
26
+ configuration.option('merge').valueNone().description('merges with new values (default behaviour)')
27
+ configuration.option('set').valueNone().description('replaces all variables')
28
+ configuration.option('append-only-missing').valueNone().description('appends values if not already exist')
29
+ configuration.argument('variables').variadic().description('variables to set, in the form of name=value')
30
+ }
31
+
32
+ protected async execute(input: Input<Args, Options>): Promise<void | number> {
33
+ const dsn = input.getOption('project')
34
+ const project = await this.remoteProjectResolver.resolve(dsn)
35
+ if (!project) {
36
+ throw `Project not defined`
37
+ }
38
+ const api = ActionsClient.create(project.endpoint, project.name, project.token)
39
+ const mode = input.getOption('merge')
40
+ ? 'MERGE' as const
41
+ : input.getOption('set')
42
+ ? 'SET' as const
43
+ : input.getOption('append-only-missing')
44
+ ? 'APPEND_ONLY_MISSING' as const
45
+ : 'MERGE' as const
46
+
47
+ const variables = input.getArgument('variables').flatMap(it => it.split('\n')).filter(it => it.trim().length > 0)
48
+ const result = await api.setVariables(
49
+ variables.map(it => {
50
+ const [name, value] = it.split('=')
51
+ return { name, value }
52
+ }),
53
+ mode,
54
+ )
55
+ if (result) {
56
+ console.log('Success')
57
+ } else {
58
+ console.error('Failed')
59
+ return 1
60
+ }
61
+ }
62
+ }
@@ -0,0 +1,42 @@
1
+ import { Command, CommandConfiguration, Input } from '@contember/cli-common'
2
+ import { RemoteProjectResolver } from '../../lib/project/RemoteProjectResolver'
3
+ import { ActionsClient } from '../../lib/actions/ActionsClient'
4
+ import chalkTable from 'chalk-table'
5
+ type Args = {
6
+ eventId: string
7
+ }
8
+
9
+ type Options = {
10
+ project?: string
11
+ }
12
+
13
+ export class ActionsStopEventCommand extends Command<Args, Options> {
14
+ constructor(
15
+ private readonly remoteProjectResolver: RemoteProjectResolver,
16
+ ) {
17
+ super()
18
+ }
19
+
20
+ protected configure(configuration: CommandConfiguration<Args, Options>): void {
21
+ configuration.description('Stop given event')
22
+ configuration.argument('eventId')
23
+ configuration.option('project').valueRequired()
24
+ }
25
+
26
+ protected async execute(input: Input<Args, Options>): Promise<void | number> {
27
+ const dsn = input.getOption('project')
28
+ const project = await this.remoteProjectResolver.resolve(dsn)
29
+ if (!project) {
30
+ throw `Project not defined`
31
+ }
32
+ const api = ActionsClient.create(project.endpoint, project.name, project.token)
33
+
34
+ const result = await api.stopEvent(input.getArgument('eventId'))
35
+ if (result) {
36
+ console.log('Event stopped')
37
+ } else {
38
+ console.log('Failed to stop event. Check the event id.')
39
+ return 1
40
+ }
41
+ }
42
+ }
@@ -48,7 +48,6 @@ export class DeployCommand extends Command<Args, Options> {
48
48
  }
49
49
 
50
50
  protected async execute(input: Input<Args, Options>): Promise<void | number> {
51
-
52
51
  const dsn = input.getArgument('dsn')
53
52
  const adminEndpoint = input.getOption('admin')
54
53
  const remoteProject = this.remoteProjectResolver.resolve(dsn, adminEndpoint)
@@ -63,7 +62,6 @@ export class DeployCommand extends Command<Args, Options> {
63
62
 
64
63
  const deployAdmin = input.getOption('no-admin') !== true && !!remoteProject.adminEndpoint && !!projectAdminDistDir
65
64
 
66
-
67
65
  console.log('')
68
66
  console.log('Contember project deployment configuration:')
69
67
  console.log(`Target project name: ${remoteProject.name}`)
@@ -72,7 +70,6 @@ export class DeployCommand extends Command<Args, Options> {
72
70
  console.log(`Deploy token: ${maskToken(remoteProject.token)}`)
73
71
  console.log('')
74
72
 
75
-
76
73
  if (deployAdmin && !(await this.fs.pathExists(`${projectAdminDistDir}/index.html`))) {
77
74
  throw `Missing ${projectAdminDistDir}/index.html. Please build admin before deploying.`
78
75
  }
@@ -58,7 +58,6 @@ export class MigrationAmendCommand extends Command<Args, Options> {
58
58
  throw `Some migrations are not executed. Unable to amend.`
59
59
  }
60
60
 
61
-
62
61
  const schema = await this.schemaLoader.loadSchema()
63
62
  try {
64
63
  const initialSchema = await this.schemaVersionBuilder.buildSchema()
@@ -152,7 +151,8 @@ export class MigrationAmendCommand extends Command<Args, Options> {
152
151
  const { action } = await prompts({
153
152
  type: 'select',
154
153
  name: 'action',
155
- message: 'The amendment results in a no-op migration because the changes introduced by the latest migration were reverted.\nYou can choose to remove the latest migration or to modify it so it is empty.',
154
+ message:
155
+ 'The amendment results in a no-op migration because the changes introduced by the latest migration were reverted.\nYou can choose to remove the latest migration or to modify it so it is empty.',
156
156
  choices: [
157
157
  { value: 'remove', title: 'Remove latest migration' },
158
158
  { value: 'keep', title: 'Keep latest migration and make it empty' },
@@ -6,8 +6,7 @@ type Args = {
6
6
  format?: string
7
7
  }
8
8
 
9
- type Options = {
10
- }
9
+ type Options = {}
11
10
 
12
11
  export class MigrationBlankCommand extends Command<Args, Options> {
13
12
  constructor(
@@ -31,4 +30,3 @@ export class MigrationBlankCommand extends Command<Args, Options> {
31
30
  return 0
32
31
  }
33
32
  }
34
-
@@ -11,7 +11,6 @@ type Options = {
11
11
  ['no-sql']: boolean
12
12
  }
13
13
 
14
-
15
14
  export class MigrationDescribeCommand extends Command<Args, Options> {
16
15
  constructor(
17
16
  private readonly migrationPrinter: MigrationPrinter,
@@ -58,7 +58,6 @@ export class MigrationDiffCommand extends Command<Args, Options> {
58
58
  }
59
59
  this.migrationPrinter.printMigrationDescription(result.initialSchema, result.migration, { noSql: true })
60
60
 
61
-
62
61
  if (!yes) {
63
62
  const { action } = await prompts({
64
63
  type: 'select',
@@ -82,7 +81,6 @@ export class MigrationDiffCommand extends Command<Args, Options> {
82
81
  const filename = await this.migrationCreator.saveMigration(result.migration)
83
82
 
84
83
  console.log(`${filename} created`)
85
-
86
84
  } catch (e) {
87
85
  if (e instanceof InvalidSchemaException) {
88
86
  printValidationErrors(e.validationErrors, e.message)
@@ -1,8 +1,7 @@
1
1
  import { Command, CommandConfiguration, Input } from '@contember/cli-common'
2
2
  import { MigrationExecutionFacade } from '../../lib/migrations/MigrationExecutionFacade'
3
3
 
4
- type Args = {
5
- }
4
+ type Args = {}
6
5
 
7
6
  type Options = {
8
7
  until?: string
@@ -18,7 +18,6 @@ export class MigrationRebaseCommand extends Command<Args, Options> {
18
18
  super()
19
19
  }
20
20
 
21
-
22
21
  protected configure(configuration: CommandConfiguration<Args, Options>): void {
23
22
  configuration.description('Rebase migrations on filesystem and in local instance')
24
23
  configuration.argument('migration').variadic()
@@ -29,7 +28,6 @@ export class MigrationRebaseCommand extends Command<Args, Options> {
29
28
  }
30
29
 
31
30
  protected async execute(input: Input<Args, Options>): Promise<void> {
32
-
33
31
  const migrationNames = input.getArgument('migration')
34
32
 
35
33
  const migrations: Migration[] = []
@@ -5,8 +5,7 @@ import { MigrationsStatusFacade } from '../../lib/migrations/MigrationsStatusFac
5
5
  import { MigrationPrinter } from '../../lib/migrations/MigrationPrinter'
6
6
  import { SystemClientProvider } from '../../lib/SystemClientProvider'
7
7
 
8
- type Args = {
9
- }
8
+ type Args = {}
10
9
 
11
10
  type Options = {
12
11
  ['only-to-execute']?: true
@@ -41,7 +40,6 @@ export class MigrationStatusCommand extends Command<Args, Options> {
41
40
  }
42
41
 
43
42
  protected async execute(input: Input<Args, Options>): Promise<number> {
44
-
45
43
  const onlyErrors = input.getOption('only-errors')
46
44
  const onlyToExecute = input.getOption('only-to-execute')
47
45
  const restoreMissing = input.getOption('restore-missing')
@@ -68,17 +66,14 @@ export class MigrationStatusCommand extends Command<Args, Options> {
68
66
  status = await this.migrationsStatusFacade.resolveMigrationsStatus({})
69
67
  }
70
68
 
69
+ const filtered = onlyErrors || onlyToExecute
70
+ ? sortMigrations([
71
+ ...(onlyErrors ? status.errorMigrations : []),
72
+ ...(onlyToExecute ? status.migrationsToExecute : []),
73
+ ])
74
+ : status.allMigrations
71
75
 
72
-
73
- const filtered =
74
- onlyErrors || onlyToExecute
75
- ? sortMigrations([
76
- ...(onlyErrors ? status.errorMigrations : []),
77
- ...(onlyToExecute ? status.migrationsToExecute : []),
78
- ])
79
- : status.allMigrations
80
-
81
- this.migrationPrinter.printStatusTable(filtered)
76
+ console.log(this.migrationPrinter.printStatusTable(filtered))
82
77
 
83
78
  const hasErrors = status.errorMigrations.length > 0
84
79
 
@@ -6,8 +6,7 @@ import { SchemaLoader } from '../../lib/schema/SchemaLoader'
6
6
  import { validateSchemaAndPrintErrors } from '../../lib/schema/SchemaValidationHelper'
7
7
  import { SchemaVersionBuilder } from '@contember/migrations-client'
8
8
 
9
- type Args = {
10
- }
9
+ type Args = {}
11
10
 
12
11
  type Options = {
13
12
  source?: 'migrations' | 'definition'
@@ -14,8 +14,7 @@ import { SchemaLoader } from '../../lib/schema/SchemaLoader'
14
14
  import { SchemaVersionBuilder } from '@contember/migrations-client'
15
15
  import { validateSchemaAndPrintErrors } from '../../lib/schema/SchemaValidationHelper'
16
16
 
17
- type Args = {
18
- }
17
+ type Args = {}
19
18
 
20
19
  type Options = {
21
20
  role?: string[]
@@ -51,7 +50,6 @@ export class ProjectPrintSchemaCommand extends Command<Args, Options> {
51
50
  protected async execute(input: Input<Args, Options>): Promise<number> {
52
51
  const format = input.getOption('format') || 'graphql'
53
52
 
54
-
55
53
  const schema = input.getOption('source') === 'migrations'
56
54
  ? await this.schemaVersionBuilder.buildSchema()
57
55
  : await this.schemaLoader.loadSchema()
@@ -6,6 +6,7 @@ import { printProgressLine } from '../../lib/transfer/stdio'
6
6
  import { createGunzip, createGzip } from 'node:zlib'
7
7
  import { RemoteProjectResolver } from '../../lib/project/RemoteProjectResolver'
8
8
  import { DataTransferClient } from '../../lib/transfer/DataTransferClient'
9
+ import { Readable } from 'node:stream'
9
10
 
10
11
  type Args = {
11
12
  source?: string
@@ -64,12 +65,16 @@ export class ExportCommand extends Command<Args, Options> {
64
65
  includeSystem,
65
66
  gzip: gzipTransfer,
66
67
  })
68
+ if (!response.body) {
69
+ throw new Error('Response does not contain a readable stream.')
70
+ }
67
71
 
68
72
  let transferred = 0
69
73
  let start = Date.now()
70
74
  let lastMbReported = 0
71
75
  console.log('')
72
- response.on('data', chunk => {
76
+ const stream = Readable.fromWeb(response.body as any)
77
+ stream.on('data', chunk => {
73
78
  transferred += chunk.length
74
79
  const currentMb = Math.floor(transferred / 1024 / 1024)
75
80
  if (currentMb > lastMbReported) {
@@ -82,9 +87,9 @@ export class ExportCommand extends Command<Args, Options> {
82
87
  const fileName = input.getOption('output') ?? `${project.name}.jsonl${gzipOutput ? '.gz' : ''}`
83
88
  const fileStream = createWriteStream(fileName)
84
89
 
85
- const responseStream = gzipOutput === gzipTransfer
86
- ? response
87
- : response.pipe(gzipOutput ? createGzip() : createGunzip())
90
+ const responseStream = !gzipOutput
91
+ ? stream
92
+ : stream.pipe(createGzip())
88
93
 
89
94
  await pipeline(responseStream, fileStream)
90
95
 
@@ -51,7 +51,11 @@ export class ImportCommand extends Command<Args, Options> {
51
51
  }
52
52
  const file = input.getArgument('file')
53
53
  const baseInputStream = createReadStream(file)
54
- const stream = (file.endsWith('.gz') ? baseInputStream.pipe(createGunzip()) : baseInputStream)
54
+ const stream = file.endsWith('.gz') ? baseInputStream.pipe(createGunzip()) : baseInputStream
55
+ stream.on('error', (err: any) => {
56
+ console.error('Error in import stream:', err)
57
+ })
58
+
55
59
  const gzipTransfer = !input.getOption('no-gzip-transfer')
56
60
  const response = await this.dataTransferClient.dataImport({
57
61
  stream: stream,
@@ -60,13 +64,13 @@ export class ImportCommand extends Command<Args, Options> {
60
64
  gzip: gzipTransfer,
61
65
  })
62
66
  console.log('')
63
- const responseData = JSON.parse((await readStream(response)).toString())
67
+ const responseData = await response.json()
64
68
  if (responseData.ok) {
65
69
  console.log('Import done.')
66
70
  } else {
67
71
  console.error('Import failed:')
68
72
  console.log(responseData)
73
+ return 1
69
74
  }
70
75
  }
71
76
  }
72
-