@mittwald/cli 1.0.0-alpha.45 → 1.0.0-alpha.47

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 (491) hide show
  1. package/README.md +214 -154
  2. package/bin/run.js +1 -1
  3. package/dist/commands/app/copy.d.ts +1 -1
  4. package/dist/commands/app/copy.js +2 -2
  5. package/dist/commands/app/create/node.d.ts +4 -4
  6. package/dist/commands/app/create/node.js +2 -2
  7. package/dist/commands/app/create/php.d.ts +4 -4
  8. package/dist/commands/app/create/php.js +2 -2
  9. package/dist/commands/app/create/python.d.ts +4 -4
  10. package/dist/commands/app/create/python.js +2 -2
  11. package/dist/commands/app/create/static.d.ts +4 -4
  12. package/dist/commands/app/create/static.js +2 -2
  13. package/dist/commands/app/dependency/list.d.ts +3 -4
  14. package/dist/commands/app/dependency/list.js +2 -5
  15. package/dist/commands/app/dependency/update.d.ts +1 -1
  16. package/dist/commands/app/dependency/update.js +2 -2
  17. package/dist/commands/app/dependency/versions.d.ts +3 -4
  18. package/dist/commands/app/dependency/versions.js +2 -5
  19. package/dist/commands/app/download.d.ts +3 -2
  20. package/dist/commands/app/download.js +15 -31
  21. package/dist/commands/app/get.d.ts +1 -1
  22. package/dist/commands/app/get.js +4 -4
  23. package/dist/commands/app/install/contao.d.ts +3 -3
  24. package/dist/commands/app/install/contao.js +2 -3
  25. package/dist/commands/app/install/drupal.d.ts +4 -4
  26. package/dist/commands/app/install/drupal.js +2 -3
  27. package/dist/commands/app/install/grav.d.ts +3 -3
  28. package/dist/commands/app/install/grav.js +2 -3
  29. package/dist/commands/app/install/joomla.d.ts +3 -3
  30. package/dist/commands/app/install/joomla.js +2 -3
  31. package/dist/commands/app/install/matomo.d.ts +3 -3
  32. package/dist/commands/app/install/matomo.js +2 -3
  33. package/dist/commands/app/install/moodle.d.ts +4 -4
  34. package/dist/commands/app/install/moodle.js +2 -3
  35. package/dist/commands/app/install/neos.d.ts +4 -4
  36. package/dist/commands/app/install/neos.js +2 -3
  37. package/dist/commands/app/install/nextcloud.d.ts +3 -3
  38. package/dist/commands/app/install/nextcloud.js +2 -3
  39. package/dist/commands/app/install/prestashop.d.ts +4 -4
  40. package/dist/commands/app/install/prestashop.js +2 -3
  41. package/dist/commands/app/install/shopware5.d.ts +3 -3
  42. package/dist/commands/app/install/shopware5.js +2 -3
  43. package/dist/commands/app/install/shopware6.d.ts +4 -4
  44. package/dist/commands/app/install/shopware6.js +2 -3
  45. package/dist/commands/app/install/typo3.d.ts +4 -4
  46. package/dist/commands/app/install/typo3.js +2 -3
  47. package/dist/commands/app/install/wordpress.d.ts +4 -4
  48. package/dist/commands/app/install/wordpress.js +2 -3
  49. package/dist/commands/app/list-upgrade-candidates.d.ts +2 -2
  50. package/dist/commands/app/list-upgrade-candidates.js +4 -4
  51. package/dist/commands/app/list.d.ts +3 -3
  52. package/dist/commands/app/list.js +4 -4
  53. package/dist/commands/app/ssh.d.ts +1 -1
  54. package/dist/commands/app/ssh.js +6 -6
  55. package/dist/commands/app/uninstall.d.ts +1 -1
  56. package/dist/commands/app/uninstall.js +2 -2
  57. package/dist/commands/app/upgrade.d.ts +3 -2
  58. package/dist/commands/app/upgrade.js +9 -11
  59. package/dist/commands/app/upload.d.ts +3 -2
  60. package/dist/commands/app/upload.js +15 -28
  61. package/dist/commands/app/versions.d.ts +2 -2
  62. package/dist/commands/app/versions.js +10 -19
  63. package/dist/commands/backup/create.d.ts +3 -3
  64. package/dist/commands/backup/create.js +6 -7
  65. package/dist/commands/backup/delete.d.ts +2 -2
  66. package/dist/commands/backup/delete.js +4 -9
  67. package/dist/commands/backup/download.d.ts +3 -3
  68. package/dist/commands/backup/download.js +20 -25
  69. package/dist/commands/backup/get.d.ts +2 -2
  70. package/dist/commands/backup/get.js +9 -12
  71. package/dist/commands/backup/list.d.ts +2 -4
  72. package/dist/commands/backup/list.js +8 -11
  73. package/dist/commands/backup/schedule/list.d.ts +2 -4
  74. package/dist/commands/backup/schedule/list.js +2 -5
  75. package/dist/commands/context/get.d.ts +1 -1
  76. package/dist/commands/context/get.js +2 -2
  77. package/dist/commands/context/reset.d.ts +1 -1
  78. package/dist/commands/context/reset.js +2 -2
  79. package/dist/commands/context/set.d.ts +1 -1
  80. package/dist/commands/context/set.js +6 -11
  81. package/dist/commands/conversation/categories.d.ts +2 -4
  82. package/dist/commands/conversation/categories.js +3 -6
  83. package/dist/commands/conversation/close.d.ts +3 -3
  84. package/dist/commands/conversation/close.js +6 -10
  85. package/dist/commands/conversation/create.d.ts +1 -1
  86. package/dist/commands/conversation/create.js +2 -2
  87. package/dist/commands/conversation/list.d.ts +2 -4
  88. package/dist/commands/conversation/list.js +2 -5
  89. package/dist/commands/conversation/reply.d.ts +3 -3
  90. package/dist/commands/conversation/reply.js +9 -14
  91. package/dist/commands/conversation/show.d.ts +3 -3
  92. package/dist/commands/conversation/show.js +8 -14
  93. package/dist/commands/conversation/show2.d.ts +1 -1
  94. package/dist/commands/conversation/show2.js +1 -1
  95. package/dist/commands/cronjob/create.d.ts +3 -1
  96. package/dist/commands/cronjob/create.js +10 -4
  97. package/dist/commands/cronjob/delete.d.ts +1 -1
  98. package/dist/commands/cronjob/delete.js +2 -2
  99. package/dist/commands/cronjob/execute.d.ts +1 -1
  100. package/dist/commands/cronjob/execute.js +1 -1
  101. package/dist/commands/cronjob/execution/abort.d.ts +1 -1
  102. package/dist/commands/cronjob/execution/abort.js +2 -2
  103. package/dist/commands/cronjob/execution/get.d.ts +1 -1
  104. package/dist/commands/cronjob/execution/get.js +1 -1
  105. package/dist/commands/cronjob/execution/list.d.ts +2 -4
  106. package/dist/commands/cronjob/execution/list.js +5 -7
  107. package/dist/commands/cronjob/execution/logs.d.ts +1 -1
  108. package/dist/commands/cronjob/execution/logs.js +2 -2
  109. package/dist/commands/cronjob/get.d.ts +2 -2
  110. package/dist/commands/cronjob/get.js +3 -3
  111. package/dist/commands/cronjob/list.d.ts +2 -4
  112. package/dist/commands/cronjob/list.js +3 -6
  113. package/dist/commands/database/mysql/charsets.d.ts +3 -4
  114. package/dist/commands/database/mysql/charsets.js +2 -5
  115. package/dist/commands/database/mysql/create.d.ts +2 -2
  116. package/dist/commands/database/mysql/create.js +5 -5
  117. package/dist/commands/database/mysql/delete.d.ts +1 -2
  118. package/dist/commands/database/mysql/delete.js +3 -7
  119. package/dist/commands/database/mysql/dump.d.ts +1 -1
  120. package/dist/commands/database/mysql/dump.js +6 -6
  121. package/dist/commands/database/mysql/get.d.ts +1 -1
  122. package/dist/commands/database/mysql/get.js +2 -2
  123. package/dist/commands/database/mysql/import.d.ts +1 -1
  124. package/dist/commands/database/mysql/import.js +6 -6
  125. package/dist/commands/database/mysql/list.d.ts +2 -4
  126. package/dist/commands/database/mysql/list.js +2 -5
  127. package/dist/commands/database/mysql/phpmyadmin.d.ts +1 -1
  128. package/dist/commands/database/mysql/phpmyadmin.js +2 -2
  129. package/dist/commands/database/mysql/port-forward.d.ts +1 -1
  130. package/dist/commands/database/mysql/port-forward.js +6 -6
  131. package/dist/commands/database/mysql/shell.d.ts +1 -1
  132. package/dist/commands/database/mysql/shell.js +6 -6
  133. package/dist/commands/database/mysql/user/delete.d.ts +1 -1
  134. package/dist/commands/database/mysql/user/delete.js +2 -2
  135. package/dist/commands/database/mysql/user/get.d.ts +1 -1
  136. package/dist/commands/database/mysql/user/get.js +1 -1
  137. package/dist/commands/database/mysql/user/list.d.ts +2 -4
  138. package/dist/commands/database/mysql/user/list.js +1 -4
  139. package/dist/commands/database/mysql/versions.d.ts +2 -4
  140. package/dist/commands/database/mysql/versions.js +1 -4
  141. package/dist/commands/database/redis/create.d.ts +1 -1
  142. package/dist/commands/database/redis/create.js +2 -2
  143. package/dist/commands/database/redis/get.d.ts +1 -1
  144. package/dist/commands/database/redis/get.js +1 -1
  145. package/dist/commands/database/redis/list.d.ts +2 -4
  146. package/dist/commands/database/redis/list.js +2 -5
  147. package/dist/commands/database/redis/shell.d.ts +1 -1
  148. package/dist/commands/database/redis/shell.js +6 -6
  149. package/dist/commands/database/redis/versions.d.ts +2 -4
  150. package/dist/commands/database/redis/versions.js +2 -5
  151. package/dist/commands/ddev/init.d.ts +1 -1
  152. package/dist/commands/ddev/init.js +3 -3
  153. package/dist/commands/ddev/render-config.d.ts +1 -1
  154. package/dist/commands/ddev/render-config.js +2 -2
  155. package/dist/commands/domain/dnszone/get.d.ts +1 -1
  156. package/dist/commands/domain/dnszone/get.js +3 -3
  157. package/dist/commands/domain/dnszone/list.d.ts +2 -4
  158. package/dist/commands/domain/dnszone/list.js +3 -6
  159. package/dist/commands/domain/dnszone/update.d.ts +1 -1
  160. package/dist/commands/domain/dnszone/update.js +3 -3
  161. package/dist/commands/domain/get.d.ts +1 -1
  162. package/dist/commands/domain/get.js +3 -3
  163. package/dist/commands/domain/list.d.ts +2 -4
  164. package/dist/commands/domain/list.js +2 -5
  165. package/dist/commands/domain/virtualhost/create.d.ts +1 -1
  166. package/dist/commands/domain/virtualhost/create.js +2 -2
  167. package/dist/commands/domain/virtualhost/delete.d.ts +1 -1
  168. package/dist/commands/domain/virtualhost/delete.js +1 -1
  169. package/dist/commands/domain/virtualhost/get.d.ts +1 -1
  170. package/dist/commands/domain/virtualhost/get.js +2 -2
  171. package/dist/commands/domain/virtualhost/list.d.ts +2 -4
  172. package/dist/commands/domain/virtualhost/list.js +2 -5
  173. package/dist/commands/login/reset.d.ts +1 -1
  174. package/dist/commands/login/reset.js +2 -2
  175. package/dist/commands/login/status.d.ts +1 -1
  176. package/dist/commands/login/status.js +1 -1
  177. package/dist/commands/login/token.d.ts +1 -1
  178. package/dist/commands/login/token.js +2 -2
  179. package/dist/commands/mail/address/create.d.ts +3 -2
  180. package/dist/commands/mail/address/create.js +6 -5
  181. package/dist/commands/mail/address/delete.d.ts +1 -1
  182. package/dist/commands/mail/address/delete.js +1 -1
  183. package/dist/commands/mail/address/get.d.ts +1 -1
  184. package/dist/commands/mail/address/get.js +1 -1
  185. package/dist/commands/mail/address/list.d.ts +2 -4
  186. package/dist/commands/mail/address/list.js +6 -9
  187. package/dist/commands/mail/address/update.d.ts +1 -1
  188. package/dist/commands/mail/address/update.js +2 -2
  189. package/dist/commands/mail/deliverybox/get.d.ts +1 -1
  190. package/dist/commands/mail/deliverybox/get.js +1 -1
  191. package/dist/commands/mail/deliverybox/list.d.ts +2 -4
  192. package/dist/commands/mail/deliverybox/list.js +3 -6
  193. package/dist/commands/org/delete.d.ts +1 -1
  194. package/dist/commands/org/delete.js +2 -2
  195. package/dist/commands/org/get.d.ts +1 -1
  196. package/dist/commands/org/get.js +3 -3
  197. package/dist/commands/org/invite/list-own.d.ts +3 -3
  198. package/dist/commands/org/invite/list-own.js +2 -2
  199. package/dist/commands/org/invite/list.d.ts +3 -6
  200. package/dist/commands/org/invite/list.js +10 -12
  201. package/dist/commands/org/invite/revoke.d.ts +1 -1
  202. package/dist/commands/org/invite/revoke.js +1 -1
  203. package/dist/commands/org/invite.d.ts +2 -2
  204. package/dist/commands/org/invite.js +5 -5
  205. package/dist/commands/org/list.d.ts +2 -4
  206. package/dist/commands/org/list.js +1 -4
  207. package/dist/commands/org/membership/list-own.d.ts +3 -3
  208. package/dist/commands/org/membership/list-own.js +6 -7
  209. package/dist/commands/org/membership/list.d.ts +3 -3
  210. package/dist/commands/org/membership/list.js +7 -8
  211. package/dist/commands/org/membership/revoke.d.ts +1 -1
  212. package/dist/commands/org/membership/revoke.js +1 -1
  213. package/dist/commands/project/create.d.ts +2 -2
  214. package/dist/commands/project/create.js +3 -3
  215. package/dist/commands/project/delete.d.ts +1 -1
  216. package/dist/commands/project/delete.js +3 -3
  217. package/dist/commands/project/filesystem/usage.d.ts +1 -1
  218. package/dist/commands/project/filesystem/usage.js +16 -11
  219. package/dist/commands/project/get.d.ts +2 -2
  220. package/dist/commands/project/get.js +6 -6
  221. package/dist/commands/project/invite/get.d.ts +1 -1
  222. package/dist/commands/project/invite/get.js +1 -1
  223. package/dist/commands/project/invite/list-own.d.ts +2 -4
  224. package/dist/commands/project/invite/list-own.js +2 -5
  225. package/dist/commands/project/invite/list.d.ts +2 -4
  226. package/dist/commands/project/invite/list.js +13 -16
  227. package/dist/commands/project/list.d.ts +3 -6
  228. package/dist/commands/project/list.js +1 -4
  229. package/dist/commands/project/membership/get-own.d.ts +1 -1
  230. package/dist/commands/project/membership/get-own.js +2 -2
  231. package/dist/commands/project/membership/get.d.ts +1 -1
  232. package/dist/commands/project/membership/get.js +1 -1
  233. package/dist/commands/project/membership/list-own.d.ts +2 -4
  234. package/dist/commands/project/membership/list-own.js +10 -15
  235. package/dist/commands/project/membership/list.d.ts +3 -3
  236. package/dist/commands/project/membership/list.js +3 -3
  237. package/dist/commands/project/ssh.d.ts +1 -1
  238. package/dist/commands/project/ssh.js +5 -5
  239. package/dist/commands/project/update.d.ts +1 -1
  240. package/dist/commands/project/update.js +2 -2
  241. package/dist/commands/server/get.d.ts +1 -1
  242. package/dist/commands/server/get.js +2 -2
  243. package/dist/commands/server/list.d.ts +2 -4
  244. package/dist/commands/server/list.js +1 -4
  245. package/dist/commands/sftp-user/delete.d.ts +1 -1
  246. package/dist/commands/sftp-user/delete.js +2 -2
  247. package/dist/commands/sftp-user/list.d.ts +2 -5
  248. package/dist/commands/sftp-user/list.js +2 -5
  249. package/dist/commands/ssh-user/delete.d.ts +1 -1
  250. package/dist/commands/ssh-user/delete.js +2 -2
  251. package/dist/commands/ssh-user/list.d.ts +2 -5
  252. package/dist/commands/ssh-user/list.js +2 -5
  253. package/dist/commands/user/api-token/create.d.ts +3 -4
  254. package/dist/commands/user/api-token/create.js +14 -25
  255. package/dist/commands/user/api-token/get.d.ts +1 -1
  256. package/dist/commands/user/api-token/get.js +1 -1
  257. package/dist/commands/user/api-token/list.d.ts +2 -4
  258. package/dist/commands/user/api-token/list.js +10 -13
  259. package/dist/commands/user/api-token/revoke.d.ts +1 -1
  260. package/dist/commands/user/api-token/revoke.js +1 -1
  261. package/dist/commands/user/get.d.ts +1 -1
  262. package/dist/commands/user/get.js +1 -1
  263. package/dist/commands/user/session/get.d.ts +1 -1
  264. package/dist/commands/user/session/get.js +1 -1
  265. package/dist/commands/user/session/list.d.ts +2 -4
  266. package/dist/commands/user/session/list.js +10 -12
  267. package/dist/commands/user/ssh-key/create.d.ts +2 -2
  268. package/dist/commands/user/ssh-key/create.js +5 -5
  269. package/dist/commands/user/ssh-key/delete.d.ts +1 -1
  270. package/dist/commands/user/ssh-key/delete.js +1 -1
  271. package/dist/commands/user/ssh-key/get.d.ts +1 -1
  272. package/dist/commands/user/ssh-key/get.js +1 -1
  273. package/dist/commands/user/ssh-key/import.d.ts +2 -2
  274. package/dist/commands/user/ssh-key/import.js +5 -5
  275. package/dist/commands/user/ssh-key/list.d.ts +3 -3
  276. package/dist/commands/user/ssh-key/list.js +3 -3
  277. package/dist/lib/apiutil/SuccessfulResponse.d.ts +19 -0
  278. package/dist/lib/auth/token.js +1 -1
  279. package/dist/{BaseCommand.js → lib/basecommands/BaseCommand.js} +4 -4
  280. package/dist/{types.d.ts → lib/basecommands/CommandFlags.d.ts} +2 -4
  281. package/dist/{DeleteBaseCommand.d.ts → lib/basecommands/DeleteBaseCommand.d.ts} +1 -1
  282. package/dist/{DeleteBaseCommand.js → lib/basecommands/DeleteBaseCommand.js} +3 -3
  283. package/dist/{rendering/react → lib/basecommands}/ExecRenderBaseCommand.d.ts +2 -2
  284. package/dist/{rendering/react → lib/basecommands}/ExecRenderBaseCommand.js +2 -2
  285. package/dist/{ExtendedBaseCommand.d.ts → lib/basecommands/ExtendedBaseCommand.d.ts} +2 -2
  286. package/dist/{ExtendedBaseCommand.js → lib/basecommands/ExtendedBaseCommand.js} +3 -3
  287. package/dist/{GetBaseCommand.d.ts → lib/basecommands/GetBaseCommand.d.ts} +1 -1
  288. package/dist/{GetBaseCommand.js → lib/basecommands/GetBaseCommand.js} +1 -1
  289. package/dist/{ListBaseCommand.d.ts → lib/basecommands/ListBaseCommand.d.ts} +5 -3
  290. package/dist/{ListBaseCommand.js → lib/basecommands/ListBaseCommand.js} +10 -3
  291. package/dist/{rendering/react → lib/basecommands}/RenderBaseCommand.d.ts +3 -3
  292. package/dist/{rendering/react → lib/basecommands}/RenderBaseCommand.js +6 -6
  293. package/dist/lib/{context.d.ts → context/Context.d.ts} +11 -14
  294. package/dist/lib/{context.js → context/Context.js} +12 -5
  295. package/dist/lib/context/ContextProvider.d.ts +6 -0
  296. package/dist/lib/{context_ddev.d.ts → context/DDEVContextProvider.d.ts} +3 -2
  297. package/dist/lib/{context_ddev.js → context/DDEVContextProvider.js} +3 -3
  298. package/dist/lib/context/FlagSet.d.ts +20 -0
  299. package/dist/lib/{context_flags.d.ts → context/FlagSetBuilder.d.ts} +23 -9
  300. package/dist/lib/context/FlagSetBuilder.js +148 -0
  301. package/dist/lib/context/TerraformContextProvider.d.ts +7 -0
  302. package/dist/lib/{context_terraform.js → context/TerraformContextProvider.js} +2 -2
  303. package/dist/lib/{context_user.d.ts → context/UserContextProvider.d.ts} +4 -2
  304. package/dist/lib/{context_user.js → context/UserContextProvider.js} +4 -6
  305. package/dist/lib/context/WritableContextProvider.d.ts +14 -0
  306. package/dist/lib/context/WritableContextProvider.js +1 -0
  307. package/dist/lib/ddev/config_loader.js +1 -1
  308. package/dist/lib/ddev/init_assert.js +2 -2
  309. package/dist/lib/error/UnexpectedShortIDPassedError.js +1 -1
  310. package/dist/lib/{handleError.d.ts → error/handleError.d.ts} +2 -3
  311. package/dist/lib/{handleError.js → error/handleError.js} +4 -6
  312. package/dist/lib/flags/expireFlags.d.ts +7 -0
  313. package/dist/lib/flags/expireFlags.js +18 -0
  314. package/dist/lib/{app → resources/app}/Installer.d.ts +5 -3
  315. package/dist/lib/{app → resources/app}/Installer.js +4 -4
  316. package/dist/lib/{app → resources/app}/custom_installation.js +3 -3
  317. package/dist/lib/{app → resources/app}/flags.d.ts +7 -7
  318. package/dist/lib/{app → resources/app}/flags.js +18 -12
  319. package/dist/lib/{app → resources/app}/hooks.js +1 -1
  320. package/dist/lib/{app → resources/app}/install.d.ts +1 -1
  321. package/dist/lib/resources/app/sync.d.ts +15 -0
  322. package/dist/lib/resources/app/sync.js +55 -0
  323. package/dist/lib/resources/app/upgrade.d.ts +1 -0
  324. package/dist/lib/resources/app/upgrade.js +1 -0
  325. package/dist/lib/{app → resources/app}/versions.d.ts +1 -1
  326. package/dist/lib/{app → resources/app}/versions.js +1 -1
  327. package/dist/lib/{app → resources/app}/wait.d.ts +3 -2
  328. package/dist/lib/{app → resources/app}/wait.js +3 -3
  329. package/dist/lib/resources/backup/flags.d.ts +1 -0
  330. package/dist/lib/resources/backup/flags.js +4 -0
  331. package/dist/lib/resources/conversation/flags.d.ts +2 -0
  332. package/dist/lib/resources/conversation/flags.js +12 -0
  333. package/dist/lib/{database → resources/database}/common.d.ts +1 -1
  334. package/dist/lib/{database → resources/database}/mysql/connect.d.ts +1 -1
  335. package/dist/lib/{database → resources/database}/mysql/temp_user.d.ts +1 -1
  336. package/dist/lib/{database → resources/database}/mysql/temp_user.js +1 -1
  337. package/dist/lib/{database → resources/database}/redis/connect.d.ts +1 -1
  338. package/dist/lib/{database → resources/database}/redis/flags.js +2 -2
  339. package/dist/lib/resources/domain/dnszone/flags.d.ts +1 -0
  340. package/dist/lib/{domain → resources/domain}/dnszone/flags.js +2 -2
  341. package/dist/lib/resources/domain/flags.d.ts +1 -0
  342. package/dist/lib/{domain → resources/domain}/flags.js +2 -2
  343. package/dist/lib/resources/mail/flags.d.ts +1 -0
  344. package/dist/lib/{mail → resources/mail}/flags.js +2 -2
  345. package/dist/lib/resources/org/flags.d.ts +2 -0
  346. package/dist/lib/resources/org/flags.js +10 -0
  347. package/dist/lib/{project → resources/project}/flags.d.ts +4 -3
  348. package/dist/lib/{project → resources/project}/flags.js +15 -8
  349. package/dist/lib/{project → resources/project}/hooks.js +1 -1
  350. package/dist/lib/{project → resources/project}/ingress.js +2 -4
  351. package/dist/lib/{projectbackup → resources/projectbackup}/hooks.js +1 -1
  352. package/dist/lib/resources/server/flags.d.ts +2 -0
  353. package/dist/lib/resources/server/flags.js +10 -0
  354. package/dist/lib/resources/ssh/types.js +1 -0
  355. package/dist/lib/units/ByteQuantity.d.ts +23 -0
  356. package/dist/lib/units/ByteQuantity.js +49 -0
  357. package/dist/lib/units/Duration.d.ts +23 -0
  358. package/dist/lib/units/Duration.js +57 -0
  359. package/dist/lib/util/fs/hasBinaryInPath.d.ts +9 -0
  360. package/dist/lib/{hasbin.js → util/fs/hasBinaryInPath.js} +9 -1
  361. package/dist/lib/util/fs/isNotFound.d.ts +8 -0
  362. package/dist/lib/util/fs/isNotFound.js +10 -0
  363. package/dist/lib/util/fs/pathExists.d.ts +7 -0
  364. package/dist/lib/{fsutil.js → util/fs/pathExists.js} +7 -3
  365. package/dist/lib/util/maybe.d.ts +12 -0
  366. package/dist/lib/util/maybe.js +17 -0
  367. package/dist/lib/util/mergeObjects.d.ts +7 -0
  368. package/dist/lib/{mergeObjects.js → util/mergeObjects.js} +8 -2
  369. package/dist/lib/util/password/generatePassword.d.ts +9 -0
  370. package/dist/lib/util/password/generatePassword.js +12 -0
  371. package/dist/lib/util/password/generatePasswordWithSpecialChars.d.ts +9 -0
  372. package/dist/lib/{password.js → util/password/generatePasswordWithSpecialChars.js} +9 -5
  373. package/dist/lib/wait.d.ts +5 -2
  374. package/dist/lib/wait.js +10 -9
  375. package/dist/rendering/formatter/GetFormatter.d.ts +11 -0
  376. package/dist/rendering/formatter/GetFormatter.js +20 -0
  377. package/dist/rendering/formatter/ListDateColumnFormatter.d.ts +24 -0
  378. package/dist/rendering/formatter/ListDateColumnFormatter.js +28 -0
  379. package/dist/{Formatter.d.ts → rendering/formatter/ListFormatter.d.ts} +2 -12
  380. package/dist/{Formatter.js → rendering/formatter/ListFormatter.js} +1 -19
  381. package/dist/rendering/formatter/printHeader.d.ts +7 -0
  382. package/dist/rendering/formatter/printHeader.js +12 -0
  383. package/dist/rendering/formatter/printKeyValues.d.ts +7 -0
  384. package/dist/{lib/viewhelpers/tui.js → rendering/formatter/printKeyValues.js} +6 -5
  385. package/dist/rendering/lib/getTerminalWidth.d.ts +7 -1
  386. package/dist/rendering/lib/getTerminalWidth.js +9 -2
  387. package/dist/rendering/process/components/ProcessError.js +1 -1
  388. package/dist/rendering/process/process_exec.js +3 -0
  389. package/dist/rendering/react/ComponentPrinter.d.ts +1 -1
  390. package/dist/rendering/react/components/AppInstallation/AppInstallationDetails.js +8 -10
  391. package/dist/rendering/react/components/AppInstallation/AppSystemSoftware.js +1 -1
  392. package/dist/rendering/react/components/ByteFormat.d.ts +9 -1
  393. package/dist/rendering/react/components/ByteFormat.js +9 -10
  394. package/dist/rendering/react/components/CronJob/CronJobDetails.js +2 -2
  395. package/dist/rendering/react/components/DnsZone/DnsZoneRecordsA.js +1 -1
  396. package/dist/rendering/react/components/DnsZone/DnsZoneRecordsAAAA.js +1 -1
  397. package/dist/rendering/react/components/DnsZone/DnsZoneRecordsMX.js +1 -1
  398. package/dist/rendering/react/components/DnsZone/DnsZoneRecordsSRV.js +1 -1
  399. package/dist/rendering/react/components/DnsZone/DnsZoneRecordsTXT.js +1 -1
  400. package/dist/rendering/react/components/FormattedDate.js +1 -1
  401. package/dist/rendering/react/components/OptionalValue.d.ts +13 -0
  402. package/dist/rendering/react/components/OptionalValue.js +16 -0
  403. package/dist/rendering/react/components/ProjectBackup/ProjectBackupDetails.js +2 -2
  404. package/dist/rendering/react/components/Table/CellData.js +1 -1
  405. package/dist/rendering/react/components/WithoutLineBreaks.js +1 -1
  406. package/dist/rendering/setup/FlagSupportedSetup.js +1 -1
  407. package/dist/{lib/viewhelpers/date.d.ts → rendering/textformat/formatDate.d.ts} +0 -1
  408. package/dist/{lib/viewhelpers/date.js → rendering/textformat/formatDate.js} +8 -15
  409. package/dist/rendering/textformat/removeLineBreaks.d.ts +6 -0
  410. package/dist/rendering/textformat/removeLineBreaks.js +8 -0
  411. package/package.json +5 -5
  412. package/dist/Flags.d.ts +0 -1
  413. package/dist/Flags.js +0 -1
  414. package/dist/lib/bytes.d.ts +0 -1
  415. package/dist/lib/bytes.js +0 -16
  416. package/dist/lib/context_flags.js +0 -88
  417. package/dist/lib/context_terraform.d.ts +0 -6
  418. package/dist/lib/domain/dnszone/flags.d.ts +0 -1
  419. package/dist/lib/domain/flags.d.ts +0 -1
  420. package/dist/lib/expires.d.ts +0 -11
  421. package/dist/lib/expires.js +0 -31
  422. package/dist/lib/fsutil.d.ts +0 -2
  423. package/dist/lib/hasbin.d.ts +0 -1
  424. package/dist/lib/mail/flags.d.ts +0 -1
  425. package/dist/lib/mergeObjects.d.ts +0 -1
  426. package/dist/lib/notify.d.ts +0 -2
  427. package/dist/lib/notify.js +0 -5
  428. package/dist/lib/org/flags.d.ts +0 -1
  429. package/dist/lib/org/flags.js +0 -3
  430. package/dist/lib/password.d.ts +0 -2
  431. package/dist/lib/server/flags.d.ts +0 -1
  432. package/dist/lib/server/flags.js +0 -3
  433. package/dist/lib/viewhelpers/list_column_date.d.ts +0 -14
  434. package/dist/lib/viewhelpers/list_column_date.js +0 -21
  435. package/dist/lib/viewhelpers/removeLineBreaks.d.ts +0 -1
  436. package/dist/lib/viewhelpers/removeLineBreaks.js +0 -1
  437. package/dist/lib/viewhelpers/size.d.ts +0 -2
  438. package/dist/lib/viewhelpers/size.js +0 -4
  439. package/dist/lib/viewhelpers/tui.d.ts +0 -2
  440. package/dist/normalize_id.d.ts +0 -7
  441. package/dist/normalize_id.js +0 -34
  442. /package/dist/lib/{app/upgrade.d.ts → apiutil/SuccessfulResponse.js} +0 -0
  443. /package/dist/lib/{api_consistency.d.ts → apiutil/api_consistency.d.ts} +0 -0
  444. /package/dist/lib/{api_consistency.js → apiutil/api_consistency.js} +0 -0
  445. /package/dist/lib/{api_logging.d.ts → apiutil/api_logging.d.ts} +0 -0
  446. /package/dist/lib/{api_logging.js → apiutil/api_logging.js} +0 -0
  447. /package/dist/lib/{api_retry.d.ts → apiutil/api_retry.d.ts} +0 -0
  448. /package/dist/lib/{api_retry.js → apiutil/api_retry.js} +0 -0
  449. /package/dist/lib/{assert_success.d.ts → apiutil/assert_success.d.ts} +0 -0
  450. /package/dist/lib/{assert_success.js → apiutil/assert_success.js} +0 -0
  451. /package/dist/{BaseCommand.d.ts → lib/basecommands/BaseCommand.d.ts} +0 -0
  452. /package/dist/lib/{app/upgrade.js → basecommands/CommandFlags.js} +0 -0
  453. /package/dist/lib/{ssh/types.js → context/ContextProvider.js} +0 -0
  454. /package/dist/{types.js → lib/context/FlagSet.js} +0 -0
  455. /package/dist/lib/{app → resources/app}/custom_installation.d.ts +0 -0
  456. /package/dist/lib/{app → resources/app}/hooks.d.ts +0 -0
  457. /package/dist/lib/{app → resources/app}/install.js +0 -0
  458. /package/dist/lib/{app → resources/app}/uuid.d.ts +0 -0
  459. /package/dist/lib/{app → resources/app}/uuid.js +0 -0
  460. /package/dist/lib/{conversation → resources/conversation}/message_input.d.ts +0 -0
  461. /package/dist/lib/{conversation → resources/conversation}/message_input.js +0 -0
  462. /package/dist/lib/{database → resources/database}/common.js +0 -0
  463. /package/dist/lib/{database → resources/database}/mysql/connect.js +0 -0
  464. /package/dist/lib/{database → resources/database}/mysql/flags.d.ts +0 -0
  465. /package/dist/lib/{database → resources/database}/mysql/flags.js +0 -0
  466. /package/dist/lib/{database → resources/database}/redis/connect.js +0 -0
  467. /package/dist/lib/{database → resources/database}/redis/flags.d.ts +0 -0
  468. /package/dist/lib/{domain → resources/domain}/dnszone/records.d.ts +0 -0
  469. /package/dist/lib/{domain → resources/domain}/dnszone/records.js +0 -0
  470. /package/dist/lib/{project → resources/project}/hooks.d.ts +0 -0
  471. /package/dist/lib/{project → resources/project}/ingress.d.ts +0 -0
  472. /package/dist/lib/{project → resources/project}/shortId.d.ts +0 -0
  473. /package/dist/lib/{project → resources/project}/shortId.js +0 -0
  474. /package/dist/lib/{projectbackup → resources/projectbackup}/hooks.d.ts +0 -0
  475. /package/dist/lib/{ssh → resources/ssh}/appinstall.d.ts +0 -0
  476. /package/dist/lib/{ssh → resources/ssh}/appinstall.js +0 -0
  477. /package/dist/lib/{ssh → resources/ssh}/connection.d.ts +0 -0
  478. /package/dist/lib/{ssh → resources/ssh}/connection.js +0 -0
  479. /package/dist/lib/{ssh → resources/ssh}/doc.d.ts +0 -0
  480. /package/dist/lib/{ssh → resources/ssh}/doc.js +0 -0
  481. /package/dist/lib/{ssh → resources/ssh}/exec.d.ts +0 -0
  482. /package/dist/lib/{ssh → resources/ssh}/exec.js +0 -0
  483. /package/dist/lib/{ssh → resources/ssh}/flags.d.ts +0 -0
  484. /package/dist/lib/{ssh → resources/ssh}/flags.js +0 -0
  485. /package/dist/lib/{ssh → resources/ssh}/project.d.ts +0 -0
  486. /package/dist/lib/{ssh → resources/ssh}/project.js +0 -0
  487. /package/dist/lib/{ssh → resources/ssh}/types.d.ts +0 -0
  488. /package/dist/lib/{language.d.ts → util/language/articleForWord.d.ts} +0 -0
  489. /package/dist/lib/{language.js → util/language/articleForWord.js} +0 -0
  490. /package/dist/{Printer.d.ts → rendering/Printer.d.ts} +0 -0
  491. /package/dist/{Printer.js → rendering/Printer.js} +0 -0
@@ -1,12 +1,12 @@
1
- import { BaseCommand } from "../../BaseCommand.js";
2
- import { Args } from "@oclif/core";
3
- import { normalizeConversationId } from "../../normalize_id.js";
4
1
  import { assertStatus } from "@mittwald/api-client-commons";
5
- import { formatRelativeDate } from "../../lib/viewhelpers/date.js";
2
+ import { formatRelativeDate } from "../../rendering/textformat/formatDate.js";
6
3
  import { marked } from "marked";
7
4
  import TerminalRenderer from "marked-terminal";
8
5
  import chalk from "chalk";
9
- import { printHeader, printKeyValues } from "../../lib/viewhelpers/tui.js";
6
+ import { conversationArgs, withConversationId, } from "../../lib/resources/conversation/flags.js";
7
+ import { ExtendedBaseCommand } from "../../lib/basecommands/ExtendedBaseCommand.js";
8
+ import { printHeader } from "../../rendering/formatter/printHeader.js";
9
+ import { printKeyValues } from "../../rendering/formatter/printKeyValues.js";
10
10
  function printStatusChange(text, date) {
11
11
  console.log(chalk.gray(`${text}, ${formatRelativeDate(date)}`));
12
12
  }
@@ -72,17 +72,11 @@ async function printConversationMessages(responseItems) {
72
72
  await printResponseItem(responseItem);
73
73
  }
74
74
  }
75
- export default class Show extends BaseCommand {
75
+ export default class Show extends ExtendedBaseCommand {
76
76
  static description = "Show a conversation and message history";
77
- static args = {
78
- id: Args.string({
79
- required: true,
80
- description: "ID of the conversation to show",
81
- }),
82
- };
77
+ static args = { ...conversationArgs };
83
78
  async run() {
84
- const { args } = await this.parse(Show);
85
- const conversationId = await normalizeConversationId(this.apiClient, args.id);
79
+ const conversationId = await withConversationId(this.apiClient, Show, this.flags, this.args, this.config);
86
80
  const [conversation, responseItems] = await this.loadConversationWithMessages(conversationId);
87
81
  printConversationMetadata(conversation);
88
82
  await printConversationMessages(responseItems);
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { RenderBaseCommand } from "../../rendering/react/RenderBaseCommand.js";
2
+ import { RenderBaseCommand } from "../../lib/basecommands/RenderBaseCommand.js";
3
3
  export default class Show extends RenderBaseCommand<typeof Show> {
4
4
  static flags: {
5
5
  wait: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<any>;
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Suspense } from "react";
3
3
  import { assertStatus } from "@mittwald/api-client-commons";
4
4
  import { usePromise } from "@mittwald/react-use-promise";
5
- import { RenderBaseCommand } from "../../rendering/react/RenderBaseCommand.js";
5
+ import { RenderBaseCommand } from "../../lib/basecommands/RenderBaseCommand.js";
6
6
  import { useRenderContext } from "../../rendering/react/context.js";
7
7
  import { UsePromiseRenderSetup } from "../../rendering/setup/usePromiseSetup.js";
8
8
  import { Box } from "ink";
@@ -1,5 +1,6 @@
1
- import { ExecRenderBaseCommand } from "../../rendering/react/ExecRenderBaseCommand.js";
1
+ import { ExecRenderBaseCommand } from "../../lib/basecommands/ExecRenderBaseCommand.js";
2
2
  import { ReactNode } from "react";
3
+ import Duration from "../../lib/units/Duration.js";
3
4
  type Result = {
4
5
  cronjobId: string;
5
6
  };
@@ -13,6 +14,7 @@ export declare class Create extends ExecRenderBaseCommand<typeof Create, Result>
13
14
  url: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
14
15
  interpreter: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
15
16
  command: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
17
+ timeout: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<Duration, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
16
18
  quiet: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
17
19
  "installation-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
18
20
  };
@@ -1,11 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ExecRenderBaseCommand } from "../../rendering/react/ExecRenderBaseCommand.js";
2
+ import { ExecRenderBaseCommand } from "../../lib/basecommands/ExecRenderBaseCommand.js";
3
3
  import { makeProcessRenderer, processFlags, } from "../../rendering/process/process_flags.js";
4
4
  import { Flags } from "@oclif/core";
5
5
  import { assertStatus } from "@mittwald/api-client-commons";
6
6
  import { Success } from "../../rendering/react/components/Success.js";
7
7
  import { Value } from "../../rendering/react/components/Value.js";
8
- import { appInstallationFlags } from "../../lib/app/flags.js";
8
+ import { appInstallationFlags } from "../../lib/resources/app/flags.js";
9
+ import Duration from "../../lib/units/Duration.js";
9
10
  export class Create extends ExecRenderBaseCommand {
10
11
  static summary = "Create a new cron job";
11
12
  static flags = {
@@ -47,11 +48,16 @@ export class Create extends ExecRenderBaseCommand {
47
48
  default: undefined,
48
49
  exclusive: ["url"],
49
50
  }),
51
+ timeout: Duration.relativeFlag({
52
+ summary: "timeout for the cron job; common duration formats are supported (for example, '1h', '30m', '30s')",
53
+ default: Duration.fromString("1h"),
54
+ required: false,
55
+ }),
50
56
  };
51
57
  async exec() {
52
58
  const p = makeProcessRenderer(this.flags, "Creating a new cron job");
53
59
  const appInstallationId = await this.withAppInstallationId(Create);
54
- const { description, interval, disable, email, url, interpreter, command } = this.flags;
60
+ const { description, interval, disable, email, url, interpreter, command, timeout, } = this.flags;
55
61
  if (!url && !command) {
56
62
  throw new Error("either `--url` or `--command` must be specified");
57
63
  }
@@ -75,7 +81,7 @@ export class Create extends ExecRenderBaseCommand {
75
81
  interval,
76
82
  email,
77
83
  destination: url ? { url } : { interpreter, path: command },
78
- timeout: 3600,
84
+ timeout: timeout.seconds,
79
85
  },
80
86
  });
81
87
  assertStatus(r, 201);
@@ -1,4 +1,4 @@
1
- import { DeleteBaseCommand } from "../../DeleteBaseCommand.js";
1
+ import { DeleteBaseCommand } from "../../lib/basecommands/DeleteBaseCommand.js";
2
2
  export default class Delete extends DeleteBaseCommand<typeof Delete> {
3
3
  static description: string;
4
4
  static resourceName: string;
@@ -1,6 +1,6 @@
1
- import { DeleteBaseCommand } from "../../DeleteBaseCommand.js";
1
+ import { DeleteBaseCommand } from "../../lib/basecommands/DeleteBaseCommand.js";
2
2
  import { Args } from "@oclif/core";
3
- import assertSuccess from "../../lib/assert_success.js";
3
+ import assertSuccess from "../../lib/apiutil/assert_success.js";
4
4
  export default class Delete extends DeleteBaseCommand {
5
5
  static description = "Delete a cron job";
6
6
  static resourceName = "cron job";
@@ -1,4 +1,4 @@
1
- import { ExecRenderBaseCommand } from "../../rendering/react/ExecRenderBaseCommand.js";
1
+ import { ExecRenderBaseCommand } from "../../lib/basecommands/ExecRenderBaseCommand.js";
2
2
  import { ReactNode } from "react";
3
3
  type Result = {
4
4
  executionId: string;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ExecRenderBaseCommand } from "../../rendering/react/ExecRenderBaseCommand.js";
2
+ import { ExecRenderBaseCommand } from "../../lib/basecommands/ExecRenderBaseCommand.js";
3
3
  import { makeProcessRenderer, processFlags, } from "../../rendering/process/process_flags.js";
4
4
  import { Args } from "@oclif/core";
5
5
  import { assertStatus } from "@mittwald/api-client-commons";
@@ -1,4 +1,4 @@
1
- import { ExecRenderBaseCommand } from "../../../rendering/react/ExecRenderBaseCommand.js";
1
+ import { ExecRenderBaseCommand } from "../../../lib/basecommands/ExecRenderBaseCommand.js";
2
2
  import { ReactNode } from "react";
3
3
  type Result = {
4
4
  executionId: string;
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ExecRenderBaseCommand } from "../../../rendering/react/ExecRenderBaseCommand.js";
2
+ import { ExecRenderBaseCommand } from "../../../lib/basecommands/ExecRenderBaseCommand.js";
3
3
  import { makeProcessRenderer, processFlags, } from "../../../rendering/process/process_flags.js";
4
4
  import { Args } from "@oclif/core";
5
5
  import { Success } from "../../../rendering/react/components/Success.js";
6
6
  import { Value } from "../../../rendering/react/components/Value.js";
7
- import assertSuccess from "../../../lib/assert_success.js";
7
+ import assertSuccess from "../../../lib/apiutil/assert_success.js";
8
8
  export class Abort extends ExecRenderBaseCommand {
9
9
  static summary = "Abort a running cron job execution.";
10
10
  static flags = {
@@ -1,5 +1,5 @@
1
1
  import { MittwaldAPIV2Client } from "@mittwald/api-client";
2
- import { GetBaseCommand } from "../../../GetBaseCommand.js";
2
+ import { GetBaseCommand } from "../../../lib/basecommands/GetBaseCommand.js";
3
3
  type APIResponse = Awaited<ReturnType<MittwaldAPIV2Client["cronjob"]["getExecution"]>>;
4
4
  export declare class Get extends GetBaseCommand<typeof Get, APIResponse> {
5
5
  static description: string;
@@ -1,4 +1,4 @@
1
- import { GetBaseCommand } from "../../../GetBaseCommand.js";
1
+ import { GetBaseCommand } from "../../../lib/basecommands/GetBaseCommand.js";
2
2
  import { Args } from "@oclif/core";
3
3
  export class Get extends GetBaseCommand {
4
4
  static description = "Get a cron job execution.";
@@ -1,8 +1,7 @@
1
1
  import { Simplify } from "@mittwald/api-client-commons";
2
2
  import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
3
- import { SuccessfulResponse } from "../../../types.js";
4
- import { ListColumns } from "../../../Formatter.js";
5
- import { ListBaseCommand } from "../../../ListBaseCommand.js";
3
+ import { ListColumns } from "../../../rendering/formatter/ListFormatter.js";
4
+ import { ListBaseCommand } from "../../../lib/basecommands/ListBaseCommand.js";
6
5
  type ResponseItem = Simplify<MittwaldAPIV2.Paths.V2CronjobsCronjobIdExecutions.Get.Responses.$200.Content.ApplicationJson[number]>;
7
6
  type Response = Awaited<ReturnType<MittwaldAPIV2Client["cronjob"]["listExecutions"]>>;
8
7
  export declare class List extends ListBaseCommand<typeof List, ResponseItem, Response> {
@@ -36,7 +35,6 @@ export declare class List extends ListBaseCommand<typeof List, ResponseItem, Res
36
35
  "no-relative-dates": import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
37
36
  };
38
37
  getData(): Promise<Response>;
39
- protected mapData(data: SuccessfulResponse<Response, 200>["data"]): MittwaldAPIV2.Components.Schemas.CronjobCronjobExecution[];
40
38
  protected getColumns(): ListColumns<ResponseItem>;
41
39
  }
42
40
  export {};
@@ -1,6 +1,7 @@
1
- import { ListBaseCommand } from "../../../ListBaseCommand.js";
1
+ import { ListBaseCommand } from "../../../lib/basecommands/ListBaseCommand.js";
2
2
  import { Flags } from "@oclif/core";
3
- import { formatRelativeDate, optionalDateRenderer, } from "../../../lib/viewhelpers/date.js";
3
+ import { formatRelativeDate } from "../../../rendering/textformat/formatDate.js";
4
+ import maybe from "../../../lib/util/maybe.js";
4
5
  export class List extends ListBaseCommand {
5
6
  static description = "List CronjobExecutions belonging to a Cronjob.";
6
7
  static aliases = ["project:cronjob:execution:list"];
@@ -18,9 +19,6 @@ export class List extends ListBaseCommand {
18
19
  const { "cronjob-id": cronjobId } = this.flags;
19
20
  return await this.apiClient.cronjob.listExecutions({ cronjobId });
20
21
  }
21
- mapData(data) {
22
- return data;
23
- }
24
22
  getColumns() {
25
23
  return {
26
24
  id: {},
@@ -31,10 +29,10 @@ export class List extends ListBaseCommand {
31
29
  : "",
32
30
  },
33
31
  started: {
34
- get: (r) => optionalDateRenderer(formatRelativeDate)(r.executionStart),
32
+ get: (r) => maybe(formatRelativeDate)(r.executionStart),
35
33
  },
36
34
  ended: {
37
- get: (r) => optionalDateRenderer(formatRelativeDate)(r.executionEnd),
35
+ get: (r) => maybe(formatRelativeDate)(r.executionEnd),
38
36
  },
39
37
  };
40
38
  }
@@ -1,5 +1,5 @@
1
1
  import { MittwaldAPIV2 } from "@mittwald/api-client";
2
- import { BaseCommand } from "../../../BaseCommand.js";
2
+ import { BaseCommand } from "../../../lib/basecommands/BaseCommand.js";
3
3
  export type PathParams = MittwaldAPIV2.Paths.V2CronjobsCronjobIdExecutionsExecutionId.Get.Parameters.Path;
4
4
  export declare class Logs extends BaseCommand {
5
5
  static summary: string;
@@ -1,6 +1,6 @@
1
- import { GetBaseCommand } from "../../../GetBaseCommand.js";
1
+ import { GetBaseCommand } from "../../../lib/basecommands/GetBaseCommand.js";
2
2
  import { Args, Flags } from "@oclif/core";
3
- import { BaseCommand } from "../../../BaseCommand.js";
3
+ import { BaseCommand } from "../../../lib/basecommands/BaseCommand.js";
4
4
  import { assertStatus } from "@mittwald/api-client-commons";
5
5
  import * as cp from "child_process";
6
6
  import * as fs from "fs";
@@ -1,6 +1,6 @@
1
- import { RenderBaseCommand } from "../../rendering/react/RenderBaseCommand.js";
2
- import { GetFormatter } from "../../Formatter.js";
1
+ import { RenderBaseCommand } from "../../lib/basecommands/RenderBaseCommand.js";
3
2
  import { ReactNode } from "react";
3
+ import { GetFormatter } from "../../rendering/formatter/GetFormatter.js";
4
4
  export declare class Get extends RenderBaseCommand<typeof Get> {
5
5
  static description: string;
6
6
  static flags: {
@@ -1,13 +1,13 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { GetBaseCommand } from "../../GetBaseCommand.js";
2
+ import { GetBaseCommand } from "../../lib/basecommands/GetBaseCommand.js";
3
3
  import { Args } from "@oclif/core";
4
- import { RenderBaseCommand } from "../../rendering/react/RenderBaseCommand.js";
5
- import { GetFormatter } from "../../Formatter.js";
4
+ import { RenderBaseCommand } from "../../lib/basecommands/RenderBaseCommand.js";
6
5
  import { ComponentPrinter } from "../../rendering/react/ComponentPrinter.js";
7
6
  import { usePromise } from "@mittwald/react-use-promise";
8
7
  import { assertStatus } from "@mittwald/api-client-commons";
9
8
  import { RenderJson } from "../../rendering/react/json/RenderJson.js";
10
9
  import { CronJobDetails } from "../../rendering/react/components/CronJob/CronJobDetails.js";
10
+ import { GetFormatter } from "../../rendering/formatter/GetFormatter.js";
11
11
  export class Get extends RenderBaseCommand {
12
12
  static description = "Get details of a cron job";
13
13
  static flags = { ...GetBaseCommand.baseFlags };
@@ -1,8 +1,7 @@
1
1
  import { Simplify } from "@mittwald/api-client-commons";
2
2
  import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
3
- import { SuccessfulResponse } from "../../types.js";
4
- import { ListBaseCommand } from "../../ListBaseCommand.js";
5
- import { ListColumns } from "../../Formatter.js";
3
+ import { ListBaseCommand } from "../../lib/basecommands/ListBaseCommand.js";
4
+ import { ListColumns } from "../../rendering/formatter/ListFormatter.js";
6
5
  type ResponseItem = Simplify<MittwaldAPIV2.Paths.V2ProjectsProjectIdCronjobs.Get.Responses.$200.Content.ApplicationJson[number]>;
7
6
  export type PathParams = MittwaldAPIV2.Paths.V2ProjectsProjectIdCronjobs.Get.Parameters.Path;
8
7
  export type Response = Awaited<ReturnType<MittwaldAPIV2Client["cronjob"]["listCronjobs"]>>;
@@ -37,7 +36,6 @@ export declare class List extends ListBaseCommand<typeof List, ResponseItem, Res
37
36
  "no-relative-dates": import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
38
37
  };
39
38
  getData(): Promise<Response>;
40
- protected mapData(data: SuccessfulResponse<Response, 200>["data"]): ResponseItem[] | Promise<ResponseItem[]>;
41
39
  protected getColumns(data: ResponseItem[]): ListColumns<ResponseItem>;
42
40
  }
43
41
  export {};
@@ -1,6 +1,6 @@
1
- import { ListBaseCommand } from "../../ListBaseCommand.js";
2
- import { projectFlags } from "../../lib/project/flags.js";
3
- import { formatRelativeDate } from "../../lib/viewhelpers/date.js";
1
+ import { ListBaseCommand } from "../../lib/basecommands/ListBaseCommand.js";
2
+ import { projectFlags } from "../../lib/resources/project/flags.js";
3
+ import { formatRelativeDate } from "../../rendering/textformat/formatDate.js";
4
4
  export class List extends ListBaseCommand {
5
5
  static description = "List cron jobs belonging to a project.";
6
6
  static aliases = ["project:cronjob:list"];
@@ -14,9 +14,6 @@ export class List extends ListBaseCommand {
14
14
  const projectId = await this.withProjectId(List);
15
15
  return await this.apiClient.cronjob.listCronjobs({ projectId });
16
16
  }
17
- mapData(data) {
18
- return data;
19
- }
20
17
  getColumns(data) {
21
18
  const { id, shortId, createdAt } = super.getColumns(data);
22
19
  return {
@@ -1,8 +1,7 @@
1
1
  import { Simplify } from "@mittwald/api-client-commons";
2
2
  import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
3
- import { SuccessfulResponse } from "../../../types.js";
4
- import { ListBaseCommand } from "../../../ListBaseCommand.js";
5
- import { ListColumns } from "../../../Formatter.js";
3
+ import { ListBaseCommand } from "../../../lib/basecommands/ListBaseCommand.js";
4
+ import { ListColumns } from "../../../rendering/formatter/ListFormatter.js";
6
5
  type ResponseItem = Simplify<MittwaldAPIV2.Paths.V2MysqlCharsets.Get.Responses.$200.Content.ApplicationJson[number]>;
7
6
  type Response = Awaited<ReturnType<MittwaldAPIV2Client["database"]["listMysqlCharsets"]>>;
8
7
  export declare class Charsets extends ListBaseCommand<typeof Charsets, ResponseItem, Response> {
@@ -32,8 +31,8 @@ export declare class Charsets extends ListBaseCommand<typeof Charsets, ResponseI
32
31
  sort?: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined> | undefined;
33
32
  "no-relative-dates": import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
34
33
  };
34
+ protected sorter: (a: ResponseItem, b: ResponseItem) => number;
35
35
  getData(): Promise<Response>;
36
- protected mapData(data: SuccessfulResponse<Response, 200>["data"]): MittwaldAPIV2.Components.Schemas.DatabaseMySqlCharacterSettings[];
37
36
  protected getColumns(): ListColumns<ResponseItem>;
38
37
  }
39
38
  export {};
@@ -1,17 +1,14 @@
1
- import { ListBaseCommand } from "../../../ListBaseCommand.js";
1
+ import { ListBaseCommand } from "../../../lib/basecommands/ListBaseCommand.js";
2
2
  export class Charsets extends ListBaseCommand {
3
3
  static description = "List available MySQL character sets and collations, optionally filtered by a MySQLVersion.";
4
4
  static args = {};
5
5
  static flags = {
6
6
  ...ListBaseCommand.baseFlags,
7
7
  };
8
+ sorter = (a, b) => a.name.localeCompare(b.name);
8
9
  async getData() {
9
10
  return await this.apiClient.database.listMysqlCharsets({});
10
11
  }
11
- mapData(data) {
12
- data.sort((a, b) => a.name.localeCompare(b.name));
13
- return data;
14
- }
15
12
  getColumns() {
16
13
  return {
17
14
  name: {},
@@ -1,4 +1,4 @@
1
- import { ExecRenderBaseCommand } from "../../../rendering/react/ExecRenderBaseCommand.js";
1
+ import { ExecRenderBaseCommand } from "../../../lib/basecommands/ExecRenderBaseCommand.js";
2
2
  import { ReactNode } from "react";
3
3
  type Result = {
4
4
  databaseId: string;
@@ -13,7 +13,7 @@ export declare class Create extends ExecRenderBaseCommand<typeof Create, Result>
13
13
  "character-set": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
14
14
  "user-password": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
15
15
  "user-external": import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
16
- "user-access-level": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
16
+ "user-access-level": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<"full" | "readonly", import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
17
17
  quiet: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
18
18
  "project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
19
19
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ExecRenderBaseCommand } from "../../../rendering/react/ExecRenderBaseCommand.js";
3
- import { projectFlags } from "../../../lib/project/flags.js";
2
+ import { ExecRenderBaseCommand } from "../../../lib/basecommands/ExecRenderBaseCommand.js";
3
+ import { projectFlags } from "../../../lib/resources/project/flags.js";
4
4
  import { makeProcessRenderer, processFlags, } from "../../../rendering/process/process_flags.js";
5
5
  import { Flags } from "@oclif/core";
6
6
  import { Text } from "ink";
@@ -38,11 +38,11 @@ export class Create extends ExecRenderBaseCommand {
38
38
  summary: "enable external access for default user",
39
39
  default: false,
40
40
  }),
41
- "user-access-level": Flags.string({
41
+ "user-access-level": Flags.custom({
42
42
  summary: "the access level preset for the default user",
43
43
  options: ["full", "readonly"],
44
44
  default: "full",
45
- }),
45
+ })(),
46
46
  };
47
47
  async exec() {
48
48
  const p = makeProcessRenderer(this.flags, "Creating a new MySQL database");
@@ -59,7 +59,7 @@ export class Create extends ExecRenderBaseCommand {
59
59
  }, {
60
60
  password,
61
61
  externalAccess,
62
- accessLevel: accessLevel,
62
+ accessLevel,
63
63
  });
64
64
  const database = await p.runStep("fetching database", async () => {
65
65
  const response = await this.apiClient.database.getMysqlDatabase({
@@ -1,4 +1,4 @@
1
- import { DeleteBaseCommand } from "../../../DeleteBaseCommand.js";
1
+ import { DeleteBaseCommand } from "../../../lib/basecommands/DeleteBaseCommand.js";
2
2
  export default class Delete extends DeleteBaseCommand<typeof Delete> {
3
3
  static description: string;
4
4
  static resourceName: string;
@@ -10,5 +10,4 @@ export default class Delete extends DeleteBaseCommand<typeof Delete> {
10
10
  "database-id": import("@oclif/core/lib/interfaces/parser.js").Arg<string, Record<string, unknown>>;
11
11
  };
12
12
  protected deleteResource(): Promise<void>;
13
- protected mapResourceId(id: string): Promise<string>;
14
13
  }
@@ -1,7 +1,6 @@
1
- import { normalizeProjectId } from "../../../normalize_id.js";
2
- import { DeleteBaseCommand } from "../../../DeleteBaseCommand.js";
3
- import { mysqlArgs, withMySQLId } from "../../../lib/database/mysql/flags.js";
4
- import assertSuccess from "../../../lib/assert_success.js";
1
+ import { DeleteBaseCommand } from "../../../lib/basecommands/DeleteBaseCommand.js";
2
+ import { mysqlArgs, withMySQLId, } from "../../../lib/resources/database/mysql/flags.js";
3
+ import assertSuccess from "../../../lib/apiutil/assert_success.js";
5
4
  export default class Delete extends DeleteBaseCommand {
6
5
  static description = "Delete a MySQL database";
7
6
  static resourceName = "MySQL database";
@@ -14,7 +13,4 @@ export default class Delete extends DeleteBaseCommand {
14
13
  });
15
14
  assertSuccess(response);
16
15
  }
17
- mapResourceId(id) {
18
- return normalizeProjectId(this.apiClient, id);
19
- }
20
16
  }
@@ -1,4 +1,4 @@
1
- import { ExecRenderBaseCommand } from "../../../rendering/react/ExecRenderBaseCommand.js";
1
+ import { ExecRenderBaseCommand } from "../../../lib/basecommands/ExecRenderBaseCommand.js";
2
2
  import { ReactNode } from "react";
3
3
  export declare class Dump extends ExecRenderBaseCommand<typeof Dump, Record<string, never>> {
4
4
  static summary: string;
@@ -1,17 +1,17 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ExecRenderBaseCommand } from "../../../rendering/react/ExecRenderBaseCommand.js";
2
+ import { ExecRenderBaseCommand } from "../../../lib/basecommands/ExecRenderBaseCommand.js";
3
3
  import { Flags } from "@oclif/core";
4
4
  import { makeProcessRenderer, processFlags, } from "../../../rendering/process/process_flags.js";
5
5
  import { Text } from "ink";
6
6
  import { Value } from "../../../rendering/react/components/Value.js";
7
7
  import * as fs from "fs";
8
8
  import { Success } from "../../../rendering/react/components/Success.js";
9
- import { mysqlArgs, mysqlConnectionFlagsWithTempUser, withMySQLId, } from "../../../lib/database/mysql/flags.js";
10
- import { runWithConnectionDetails } from "../../../lib/database/mysql/connect.js";
11
- import { executeViaSSH } from "../../../lib/ssh/exec.js";
9
+ import { mysqlArgs, mysqlConnectionFlagsWithTempUser, withMySQLId, } from "../../../lib/resources/database/mysql/flags.js";
10
+ import { runWithConnectionDetails } from "../../../lib/resources/database/mysql/connect.js";
11
+ import { executeViaSSH } from "../../../lib/resources/ssh/exec.js";
12
12
  import shellEscape from "shell-escape";
13
- import { sshConnectionFlags } from "../../../lib/ssh/flags.js";
14
- import { sshUsageDocumentation } from "../../../lib/ssh/doc.js";
13
+ import { sshConnectionFlags } from "../../../lib/resources/ssh/flags.js";
14
+ import { sshUsageDocumentation } from "../../../lib/resources/ssh/doc.js";
15
15
  export class Dump extends ExecRenderBaseCommand {
16
16
  static summary = "Create a dump of a MySQL database";
17
17
  static description = "This command creates a dump of a MySQL database via mysqldump and saves it to a local file.\n\n" +
@@ -1,5 +1,5 @@
1
1
  import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
2
- import { GetBaseCommand } from "../../../GetBaseCommand.js";
2
+ import { GetBaseCommand } from "../../../lib/basecommands/GetBaseCommand.js";
3
3
  export type PathParams = MittwaldAPIV2.Paths.V2MysqlDatabasesMysqlDatabaseId.Get.Parameters.Path;
4
4
  type APIResponse = Awaited<ReturnType<MittwaldAPIV2Client["database"]["getMysqlDatabase"]>>;
5
5
  export declare abstract class Get extends GetBaseCommand<typeof Get, APIResponse> {
@@ -1,5 +1,5 @@
1
- import { GetBaseCommand } from "../../../GetBaseCommand.js";
2
- import { mysqlArgs, withMySQLId } from "../../../lib/database/mysql/flags.js";
1
+ import { GetBaseCommand } from "../../../lib/basecommands/GetBaseCommand.js";
2
+ import { mysqlArgs, withMySQLId, } from "../../../lib/resources/database/mysql/flags.js";
3
3
  export class Get extends GetBaseCommand {
4
4
  static description = "Get a MySQLDatabase.";
5
5
  static flags = {
@@ -1,4 +1,4 @@
1
- import { ExecRenderBaseCommand } from "../../../rendering/react/ExecRenderBaseCommand.js";
1
+ import { ExecRenderBaseCommand } from "../../../lib/basecommands/ExecRenderBaseCommand.js";
2
2
  import { ReactNode } from "react";
3
3
  export declare class Import extends ExecRenderBaseCommand<typeof Import, Record<string, never>> {
4
4
  static summary: string;
@@ -1,17 +1,17 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ExecRenderBaseCommand } from "../../../rendering/react/ExecRenderBaseCommand.js";
2
+ import { ExecRenderBaseCommand } from "../../../lib/basecommands/ExecRenderBaseCommand.js";
3
3
  import { Flags } from "@oclif/core";
4
4
  import { makeProcessRenderer, processFlags, } from "../../../rendering/process/process_flags.js";
5
5
  import { Text } from "ink";
6
6
  import { Value } from "../../../rendering/react/components/Value.js";
7
7
  import * as fs from "fs";
8
8
  import { Success } from "../../../rendering/react/components/Success.js";
9
- import { mysqlArgs, mysqlConnectionFlagsWithTempUser, withMySQLId, } from "../../../lib/database/mysql/flags.js";
10
- import { executeViaSSH } from "../../../lib/ssh/exec.js";
11
- import { sshConnectionFlags } from "../../../lib/ssh/flags.js";
9
+ import { mysqlArgs, mysqlConnectionFlagsWithTempUser, withMySQLId, } from "../../../lib/resources/database/mysql/flags.js";
10
+ import { executeViaSSH } from "../../../lib/resources/ssh/exec.js";
11
+ import { sshConnectionFlags } from "../../../lib/resources/ssh/flags.js";
12
12
  import shellEscape from "shell-escape";
13
- import { runWithConnectionDetails } from "../../../lib/database/mysql/connect.js";
14
- import { sshUsageDocumentation } from "../../../lib/ssh/doc.js";
13
+ import { runWithConnectionDetails } from "../../../lib/resources/database/mysql/connect.js";
14
+ import { sshUsageDocumentation } from "../../../lib/resources/ssh/doc.js";
15
15
  export class Import extends ExecRenderBaseCommand {
16
16
  static summary = "Imports a dump of a MySQL database";
17
17
  static description = "This command imports a mysqldump file from your local filesystem into a MySQL database.\n\n" +
@@ -1,8 +1,7 @@
1
1
  import { Simplify } from "@mittwald/api-client-commons";
2
2
  import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
3
- import { SuccessfulResponse } from "../../../types.js";
4
- import { ListColumns } from "../../../Formatter.js";
5
- import { ListBaseCommand } from "../../../ListBaseCommand.js";
3
+ import { ListColumns } from "../../../rendering/formatter/ListFormatter.js";
4
+ import { ListBaseCommand } from "../../../lib/basecommands/ListBaseCommand.js";
6
5
  type ResponseItem = Simplify<MittwaldAPIV2.Paths.V2ProjectsProjectIdMysqlDatabases.Get.Responses.$200.Content.ApplicationJson[number]>;
7
6
  type Response = Awaited<ReturnType<MittwaldAPIV2Client["database"]["listMysqlDatabases"]>>;
8
7
  export declare class List extends ListBaseCommand<typeof List, ResponseItem, Response> {
@@ -34,7 +33,6 @@ export declare class List extends ListBaseCommand<typeof List, ResponseItem, Res
34
33
  "no-relative-dates": import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
35
34
  };
36
35
  getData(): Promise<Response>;
37
- protected mapData(data: SuccessfulResponse<Response, 200>["data"]): MittwaldAPIV2.Components.Schemas.DatabaseMySqlDatabase[];
38
36
  protected getColumns(ignoredData: ResponseItem[]): ListColumns<ResponseItem>;
39
37
  }
40
38
  export {};
@@ -1,5 +1,5 @@
1
- import { ListBaseCommand } from "../../../ListBaseCommand.js";
2
- import { projectFlags } from "../../../lib/project/flags.js";
1
+ import { ListBaseCommand } from "../../../lib/basecommands/ListBaseCommand.js";
2
+ import { projectFlags } from "../../../lib/resources/project/flags.js";
3
3
  export class List extends ListBaseCommand {
4
4
  static description = "List MySQLDatabases belonging to a Project.";
5
5
  static args = {};
@@ -13,9 +13,6 @@ export class List extends ListBaseCommand {
13
13
  projectId,
14
14
  });
15
15
  }
16
- mapData(data) {
17
- return data;
18
- }
19
16
  getColumns(ignoredData) {
20
17
  const { id, name, createdAt } = super.getColumns(ignoredData, {
21
18
  shortIdKey: "name",
@@ -1,4 +1,4 @@
1
- import { BaseCommand } from "../../../BaseCommand.js";
1
+ import { BaseCommand } from "../../../lib/basecommands/BaseCommand.js";
2
2
  export declare class PhpMyAdmin extends BaseCommand {
3
3
  static summary: string;
4
4
  static args: {
@@ -1,7 +1,7 @@
1
- import { BaseCommand } from "../../../BaseCommand.js";
1
+ import { BaseCommand } from "../../../lib/basecommands/BaseCommand.js";
2
2
  import { assertStatus } from "@mittwald/api-client-commons";
3
3
  import open from "open";
4
- import { mysqlArgs, withMySQLId } from "../../../lib/database/mysql/flags.js";
4
+ import { mysqlArgs, withMySQLId, } from "../../../lib/resources/database/mysql/flags.js";
5
5
  export class PhpMyAdmin extends BaseCommand {
6
6
  static summary = "Open phpMyAdmin for a MySQL database.";
7
7
  static args = { ...mysqlArgs };
@@ -1,4 +1,4 @@
1
- import { ExecRenderBaseCommand } from "../../../rendering/react/ExecRenderBaseCommand.js";
1
+ import { ExecRenderBaseCommand } from "../../../lib/basecommands/ExecRenderBaseCommand.js";
2
2
  import { ReactNode } from "react";
3
3
  export declare class PortForward extends ExecRenderBaseCommand<typeof PortForward, Record<string, never>> {
4
4
  static summary: string;