@contember/cli 1.4.0-rc.7 → 2.0.0-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1004) hide show
  1. package/Dockerfile +0 -1
  2. package/build.sh +1 -1
  3. package/dist/development/run.cjs +31 -0
  4. package/dist/development/run.cjs.map +1 -0
  5. package/dist/development/run.js +30 -0
  6. package/dist/development/run.js.map +1 -0
  7. package/dist/development/src/commands/deploy/DeployCommand.cjs +87 -0
  8. package/dist/development/src/commands/deploy/DeployCommand.cjs.map +1 -0
  9. package/dist/development/src/commands/deploy/DeployCommand.js +87 -0
  10. package/dist/development/src/commands/deploy/DeployCommand.js.map +1 -0
  11. package/dist/development/src/commands/migrations/MigrationAmendCommand.cjs +123 -0
  12. package/dist/development/src/commands/migrations/MigrationAmendCommand.cjs.map +1 -0
  13. package/dist/development/src/commands/migrations/MigrationAmendCommand.js +123 -0
  14. package/dist/development/src/commands/migrations/MigrationAmendCommand.js.map +1 -0
  15. package/dist/development/src/commands/migrations/MigrationBlankCommand.cjs +23 -0
  16. package/dist/development/src/commands/migrations/MigrationBlankCommand.cjs.map +1 -0
  17. package/dist/development/src/commands/migrations/MigrationBlankCommand.js +23 -0
  18. package/dist/development/src/commands/migrations/MigrationBlankCommand.js.map +1 -0
  19. package/dist/development/src/commands/migrations/MigrationDescribeCommand.cjs +30 -0
  20. package/dist/development/src/commands/migrations/MigrationDescribeCommand.cjs.map +1 -0
  21. package/dist/development/src/commands/migrations/MigrationDescribeCommand.js +30 -0
  22. package/dist/development/src/commands/migrations/MigrationDescribeCommand.js.map +1 -0
  23. package/dist/development/src/commands/migrations/MigrationDiffCommand.cjs +76 -0
  24. package/dist/development/src/commands/migrations/MigrationDiffCommand.cjs.map +1 -0
  25. package/dist/development/src/commands/migrations/MigrationDiffCommand.js +76 -0
  26. package/dist/development/src/commands/migrations/MigrationDiffCommand.js.map +1 -0
  27. package/dist/development/src/commands/migrations/MigrationExecuteCommand.cjs +26 -0
  28. package/dist/development/src/commands/migrations/MigrationExecuteCommand.cjs.map +1 -0
  29. package/dist/development/src/commands/migrations/MigrationExecuteCommand.js +26 -0
  30. package/dist/development/src/commands/migrations/MigrationExecuteCommand.js.map +1 -0
  31. package/dist/development/src/commands/migrations/MigrationRebaseCommand.cjs +31 -0
  32. package/dist/development/src/commands/migrations/MigrationRebaseCommand.cjs.map +1 -0
  33. package/dist/development/src/commands/migrations/MigrationRebaseCommand.js +31 -0
  34. package/dist/development/src/commands/migrations/MigrationRebaseCommand.js.map +1 -0
  35. package/dist/development/src/commands/migrations/MigrationStatusCommand.cjs +57 -0
  36. package/dist/development/src/commands/migrations/MigrationStatusCommand.cjs.map +1 -0
  37. package/dist/development/src/commands/migrations/MigrationStatusCommand.js +57 -0
  38. package/dist/development/src/commands/migrations/MigrationStatusCommand.js.map +1 -0
  39. package/dist/development/src/commands/misc/VersionCommand.cjs +18 -0
  40. package/dist/development/src/commands/misc/VersionCommand.cjs.map +1 -0
  41. package/dist/development/src/commands/misc/VersionCommand.js +18 -0
  42. package/dist/development/src/commands/misc/VersionCommand.js.map +1 -0
  43. package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.cjs +36 -0
  44. package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.cjs.map +1 -0
  45. package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.js +36 -0
  46. package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.js.map +1 -0
  47. package/dist/development/src/commands/project/ProjectPrintSchemaCommand.cjs +69 -0
  48. package/dist/development/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -0
  49. package/dist/development/src/commands/project/ProjectPrintSchemaCommand.js +69 -0
  50. package/dist/development/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -0
  51. package/dist/development/src/commands/project/ProjectValidateCommand.cjs +40 -0
  52. package/dist/development/src/commands/project/ProjectValidateCommand.cjs.map +1 -0
  53. package/dist/development/src/commands/project/ProjectValidateCommand.js +40 -0
  54. package/dist/development/src/commands/project/ProjectValidateCommand.js.map +1 -0
  55. package/dist/development/src/commands/transfer/ExportCommand.cjs +66 -0
  56. package/dist/development/src/commands/transfer/ExportCommand.cjs.map +1 -0
  57. package/dist/development/src/commands/transfer/ExportCommand.js +66 -0
  58. package/dist/development/src/commands/transfer/ExportCommand.js.map +1 -0
  59. package/dist/development/src/commands/transfer/ImportCommand.cjs +60 -0
  60. package/dist/development/src/commands/transfer/ImportCommand.cjs.map +1 -0
  61. package/dist/development/src/commands/transfer/ImportCommand.js +60 -0
  62. package/dist/development/src/commands/transfer/ImportCommand.js.map +1 -0
  63. package/dist/development/src/commands/transfer/TransferCommand.cjs +73 -0
  64. package/dist/development/src/commands/transfer/TransferCommand.cjs.map +1 -0
  65. package/dist/development/src/commands/transfer/TransferCommand.js +73 -0
  66. package/dist/development/src/commands/transfer/TransferCommand.js.map +1 -0
  67. package/dist/development/src/commands/transfer/utils.cjs +22 -0
  68. package/dist/development/src/commands/transfer/utils.cjs.map +1 -0
  69. package/dist/development/src/commands/transfer/utils.js +22 -0
  70. package/dist/development/src/commands/transfer/utils.js.map +1 -0
  71. package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.cjs +54 -0
  72. package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.cjs.map +1 -0
  73. package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.js +54 -0
  74. package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +1 -0
  75. package/dist/development/src/consts.cjs +10 -0
  76. package/dist/development/src/consts.cjs.map +1 -0
  77. package/dist/development/src/consts.js +9 -0
  78. package/dist/development/src/consts.js.map +1 -0
  79. package/dist/development/src/dic.cjs +116 -0
  80. package/dist/development/src/dic.cjs.map +1 -0
  81. package/dist/development/src/dic.js +116 -0
  82. package/dist/development/src/dic.js.map +1 -0
  83. package/dist/development/src/lib/SystemClientProvider.cjs +14 -0
  84. package/dist/development/src/lib/SystemClientProvider.cjs.map +1 -0
  85. package/dist/development/src/lib/SystemClientProvider.js +14 -0
  86. package/dist/development/src/lib/SystemClientProvider.js.map +1 -0
  87. package/dist/development/src/lib/TenantClientProvider.cjs +14 -0
  88. package/dist/development/src/lib/TenantClientProvider.cjs.map +1 -0
  89. package/dist/development/src/lib/TenantClientProvider.js +14 -0
  90. package/dist/development/src/lib/TenantClientProvider.js.map +1 -0
  91. package/dist/development/src/lib/VersionChecker.cjs +85 -0
  92. package/dist/development/src/lib/VersionChecker.cjs.map +1 -0
  93. package/dist/development/src/lib/VersionChecker.js +68 -0
  94. package/dist/development/src/lib/VersionChecker.js.map +1 -0
  95. package/dist/development/src/lib/admin/AdminClient.cjs +30 -0
  96. package/dist/development/src/lib/admin/AdminClient.cjs.map +1 -0
  97. package/dist/development/src/lib/admin/AdminClient.js +30 -0
  98. package/dist/development/src/lib/admin/AdminClient.js.map +1 -0
  99. package/dist/development/src/lib/admin/AdminDeployer.cjs +36 -0
  100. package/dist/development/src/lib/admin/AdminDeployer.cjs.map +1 -0
  101. package/dist/development/src/lib/admin/AdminDeployer.js +36 -0
  102. package/dist/development/src/lib/admin/AdminDeployer.js.map +1 -0
  103. package/dist/development/src/lib/assertNever.cjs +7 -0
  104. package/dist/development/src/lib/assertNever.cjs.map +1 -0
  105. package/dist/development/src/lib/assertNever.js +7 -0
  106. package/dist/development/src/lib/assertNever.js.map +1 -0
  107. package/dist/development/src/lib/dsn.cjs +16 -0
  108. package/dist/development/src/lib/dsn.cjs.map +1 -0
  109. package/dist/development/src/lib/dsn.js +16 -0
  110. package/dist/development/src/lib/dsn.js.map +1 -0
  111. package/dist/development/src/lib/env.cjs +15 -0
  112. package/dist/development/src/lib/env.cjs.map +1 -0
  113. package/dist/development/src/lib/env.js +15 -0
  114. package/dist/development/src/lib/env.js.map +1 -0
  115. package/dist/development/src/lib/fs/DockerComposeManager.cjs +41 -0
  116. package/dist/development/src/lib/fs/DockerComposeManager.cjs.map +1 -0
  117. package/dist/development/src/lib/fs/DockerComposeManager.js +41 -0
  118. package/dist/development/src/lib/fs/DockerComposeManager.js.map +1 -0
  119. package/dist/development/src/lib/fs/FileSystem.cjs +43 -0
  120. package/dist/development/src/lib/fs/FileSystem.cjs.map +1 -0
  121. package/dist/development/src/lib/fs/FileSystem.js +27 -0
  122. package/dist/development/src/lib/fs/FileSystem.js.map +1 -0
  123. package/dist/development/src/lib/fs/YamlHandler.cjs +48 -0
  124. package/dist/development/src/lib/fs/YamlHandler.cjs.map +1 -0
  125. package/dist/development/src/lib/fs/YamlHandler.js +48 -0
  126. package/dist/development/src/lib/fs/YamlHandler.js.map +1 -0
  127. package/dist/development/src/lib/js/EsBuildBuilder.cjs +36 -0
  128. package/dist/development/src/lib/js/EsBuildBuilder.cjs.map +1 -0
  129. package/dist/development/src/lib/js/EsBuildBuilder.js +19 -0
  130. package/dist/development/src/lib/js/EsBuildBuilder.js.map +1 -0
  131. package/dist/development/src/lib/js/EvalExecutor.cjs +10 -0
  132. package/dist/development/src/lib/js/EvalExecutor.cjs.map +1 -0
  133. package/dist/development/src/lib/js/EvalExecutor.js +10 -0
  134. package/dist/development/src/lib/js/EvalExecutor.js.map +1 -0
  135. package/dist/development/src/lib/js/JsCodeRunner.cjs +17 -0
  136. package/dist/development/src/lib/js/JsCodeRunner.cjs.map +1 -0
  137. package/dist/development/src/lib/js/JsCodeRunner.js +17 -0
  138. package/dist/development/src/lib/js/JsCodeRunner.js.map +1 -0
  139. package/dist/development/src/lib/maskToken.cjs +5 -0
  140. package/dist/development/src/lib/maskToken.cjs.map +1 -0
  141. package/dist/development/src/lib/maskToken.js +5 -0
  142. package/dist/development/src/lib/maskToken.js.map +1 -0
  143. package/dist/development/src/lib/migrations/MigrationExecutionFacade.cjs +84 -0
  144. package/dist/development/src/lib/migrations/MigrationExecutionFacade.cjs.map +1 -0
  145. package/dist/development/src/lib/migrations/MigrationExecutionFacade.js +84 -0
  146. package/dist/development/src/lib/migrations/MigrationExecutionFacade.js.map +1 -0
  147. package/dist/development/src/lib/migrations/MigrationPrinter.cjs +82 -0
  148. package/dist/development/src/lib/migrations/MigrationPrinter.cjs.map +1 -0
  149. package/dist/development/src/lib/migrations/MigrationPrinter.js +82 -0
  150. package/dist/development/src/lib/migrations/MigrationPrinter.js.map +1 -0
  151. package/dist/development/src/lib/migrations/MigrationRebaseFacade.cjs +41 -0
  152. package/dist/development/src/lib/migrations/MigrationRebaseFacade.cjs.map +1 -0
  153. package/dist/development/src/lib/migrations/MigrationRebaseFacade.js +41 -0
  154. package/dist/development/src/lib/migrations/MigrationRebaseFacade.js.map +1 -0
  155. package/dist/development/src/lib/migrations/MigrationsStatusFacade.cjs +27 -0
  156. package/dist/development/src/lib/migrations/MigrationsStatusFacade.cjs.map +1 -0
  157. package/dist/development/src/lib/migrations/MigrationsStatusFacade.js +27 -0
  158. package/dist/development/src/lib/migrations/MigrationsStatusFacade.js.map +1 -0
  159. package/dist/development/src/lib/migrations/MigrationsValidator.cjs +38 -0
  160. package/dist/development/src/lib/migrations/MigrationsValidator.cjs.map +1 -0
  161. package/dist/development/src/lib/migrations/MigrationsValidator.js +38 -0
  162. package/dist/development/src/lib/migrations/MigrationsValidator.js.map +1 -0
  163. package/dist/development/src/lib/migrations/migrations.cjs +43 -0
  164. package/dist/development/src/lib/migrations/migrations.cjs.map +1 -0
  165. package/dist/development/src/lib/migrations/migrations.js +43 -0
  166. package/dist/development/src/lib/migrations/migrations.js.map +1 -0
  167. package/dist/development/src/lib/project/RemoteProject.cjs +12 -0
  168. package/dist/development/src/lib/project/RemoteProject.cjs.map +1 -0
  169. package/dist/development/src/lib/project/RemoteProject.js +12 -0
  170. package/dist/development/src/lib/project/RemoteProject.js.map +1 -0
  171. package/dist/development/src/lib/project/RemoteProjectProvider.cjs +21 -0
  172. package/dist/development/src/lib/project/RemoteProjectProvider.cjs.map +1 -0
  173. package/dist/development/src/lib/project/RemoteProjectProvider.js +21 -0
  174. package/dist/development/src/lib/project/RemoteProjectProvider.js.map +1 -0
  175. package/dist/development/src/lib/project/RemoteProjectResolver.cjs +29 -0
  176. package/dist/development/src/lib/project/RemoteProjectResolver.cjs.map +1 -0
  177. package/dist/development/src/lib/project/RemoteProjectResolver.js +29 -0
  178. package/dist/development/src/lib/project/RemoteProjectResolver.js.map +1 -0
  179. package/dist/development/src/lib/project/docs/components/EntityInfo.cjs +199 -0
  180. package/dist/development/src/lib/project/docs/components/EntityInfo.cjs.map +1 -0
  181. package/dist/development/src/lib/project/docs/components/EntityInfo.js +199 -0
  182. package/dist/development/src/lib/project/docs/components/EntityInfo.js.map +1 -0
  183. package/dist/development/src/lib/project/docs/components/EntityLink.cjs +11 -0
  184. package/dist/development/src/lib/project/docs/components/EntityLink.cjs.map +1 -0
  185. package/dist/development/src/lib/project/docs/components/EntityLink.js +11 -0
  186. package/dist/development/src/lib/project/docs/components/EntityLink.js.map +1 -0
  187. package/dist/development/src/lib/project/docs/components/FieldLink.cjs +31 -0
  188. package/dist/development/src/lib/project/docs/components/FieldLink.cjs.map +1 -0
  189. package/dist/development/src/lib/project/docs/components/FieldLink.js +31 -0
  190. package/dist/development/src/lib/project/docs/components/FieldLink.js.map +1 -0
  191. package/dist/development/src/lib/project/docs/components/FieldPermissions.cjs +33 -0
  192. package/dist/development/src/lib/project/docs/components/FieldPermissions.cjs.map +1 -0
  193. package/dist/development/src/lib/project/docs/components/FieldPermissions.js +33 -0
  194. package/dist/development/src/lib/project/docs/components/FieldPermissions.js.map +1 -0
  195. package/dist/development/src/lib/project/docs/components/FieldType.cjs +135 -0
  196. package/dist/development/src/lib/project/docs/components/FieldType.cjs.map +1 -0
  197. package/dist/development/src/lib/project/docs/components/FieldType.js +135 -0
  198. package/dist/development/src/lib/project/docs/components/FieldType.js.map +1 -0
  199. package/dist/development/src/lib/project/docs/components/OnDelete.cjs +134 -0
  200. package/dist/development/src/lib/project/docs/components/OnDelete.cjs.map +1 -0
  201. package/dist/development/src/lib/project/docs/components/OnDelete.js +134 -0
  202. package/dist/development/src/lib/project/docs/components/OnDelete.js.map +1 -0
  203. package/dist/development/src/lib/project/docs/components/ProjectInfo.cjs +96 -0
  204. package/dist/development/src/lib/project/docs/components/ProjectInfo.cjs.map +1 -0
  205. package/dist/development/src/lib/project/docs/components/ProjectInfo.js +96 -0
  206. package/dist/development/src/lib/project/docs/components/ProjectInfo.js.map +1 -0
  207. package/dist/development/src/lib/project/docs/components/SinglePermission.cjs +26 -0
  208. package/dist/development/src/lib/project/docs/components/SinglePermission.cjs.map +1 -0
  209. package/dist/development/src/lib/project/docs/components/SinglePermission.js +26 -0
  210. package/dist/development/src/lib/project/docs/components/SinglePermission.js.map +1 -0
  211. package/dist/development/src/lib/project/docs/components/utils.cjs +7 -0
  212. package/dist/development/src/lib/project/docs/components/utils.cjs.map +1 -0
  213. package/dist/development/src/lib/project/docs/components/utils.js +7 -0
  214. package/dist/development/src/lib/project/docs/components/utils.js.map +1 -0
  215. package/dist/development/src/lib/project/docs/projectDescribe.cjs +32 -0
  216. package/dist/development/src/lib/project/docs/projectDescribe.cjs.map +1 -0
  217. package/dist/development/src/lib/project/docs/projectDescribe.js +31 -0
  218. package/dist/development/src/lib/project/docs/projectDescribe.js.map +1 -0
  219. package/dist/development/src/lib/schema/SchemaLoader.cjs +49 -0
  220. package/dist/development/src/lib/schema/SchemaLoader.cjs.map +1 -0
  221. package/dist/development/src/lib/schema/SchemaLoader.js +32 -0
  222. package/dist/development/src/lib/schema/SchemaLoader.js.map +1 -0
  223. package/dist/development/src/lib/schema/SchemaValidationHelper.cjs +11 -0
  224. package/dist/development/src/lib/schema/SchemaValidationHelper.cjs.map +1 -0
  225. package/dist/development/src/lib/schema/SchemaValidationHelper.js +11 -0
  226. package/dist/development/src/lib/schema/SchemaValidationHelper.js.map +1 -0
  227. package/dist/development/src/lib/schema/SchemaValidationPrinter.cjs +14 -0
  228. package/dist/development/src/lib/schema/SchemaValidationPrinter.cjs.map +1 -0
  229. package/dist/development/src/lib/schema/SchemaValidationPrinter.js +14 -0
  230. package/dist/development/src/lib/schema/SchemaValidationPrinter.js.map +1 -0
  231. package/dist/development/src/lib/schema/collectReferences.cjs +34 -0
  232. package/dist/development/src/lib/schema/collectReferences.cjs.map +1 -0
  233. package/dist/development/src/lib/schema/collectReferences.js +34 -0
  234. package/dist/development/src/lib/schema/collectReferences.js.map +1 -0
  235. package/dist/development/src/lib/stream.cjs +43 -0
  236. package/dist/development/src/lib/stream.cjs.map +1 -0
  237. package/dist/development/src/lib/stream.js +43 -0
  238. package/dist/development/src/lib/stream.js.map +1 -0
  239. package/dist/development/src/lib/tenant/TenantClient.cjs +45 -0
  240. package/dist/development/src/lib/tenant/TenantClient.cjs.map +1 -0
  241. package/dist/development/src/lib/tenant/TenantClient.js +45 -0
  242. package/dist/development/src/lib/tenant/TenantClient.js.map +1 -0
  243. package/dist/development/src/lib/transfer/DataTransferClient.cjs +97 -0
  244. package/dist/development/src/lib/transfer/DataTransferClient.cjs.map +1 -0
  245. package/dist/development/src/lib/transfer/DataTransferClient.js +97 -0
  246. package/dist/development/src/lib/transfer/DataTransferClient.js.map +1 -0
  247. package/dist/development/src/lib/transfer/stdio.cjs +12 -0
  248. package/dist/development/src/lib/transfer/stdio.cjs.map +1 -0
  249. package/dist/development/src/lib/transfer/stdio.js +12 -0
  250. package/dist/development/src/lib/transfer/stdio.js.map +1 -0
  251. package/dist/development/src/lib/workspace/WorkspaceResolver.cjs +38 -0
  252. package/dist/development/src/lib/workspace/WorkspaceResolver.cjs.map +1 -0
  253. package/dist/development/src/lib/workspace/WorkspaceResolver.js +38 -0
  254. package/dist/development/src/lib/workspace/WorkspaceResolver.js.map +1 -0
  255. package/dist/production/run.cjs +31 -0
  256. package/dist/production/run.cjs.map +1 -0
  257. package/dist/production/run.js +30 -0
  258. package/dist/production/run.js.map +1 -0
  259. package/dist/production/src/commands/deploy/DeployCommand.cjs +87 -0
  260. package/dist/production/src/commands/deploy/DeployCommand.cjs.map +1 -0
  261. package/dist/production/src/commands/deploy/DeployCommand.js +87 -0
  262. package/dist/production/src/commands/deploy/DeployCommand.js.map +1 -0
  263. package/dist/production/src/commands/migrations/MigrationAmendCommand.cjs +123 -0
  264. package/dist/production/src/commands/migrations/MigrationAmendCommand.cjs.map +1 -0
  265. package/dist/production/src/commands/migrations/MigrationAmendCommand.js +123 -0
  266. package/dist/production/src/commands/migrations/MigrationAmendCommand.js.map +1 -0
  267. package/dist/production/src/commands/migrations/MigrationBlankCommand.cjs +23 -0
  268. package/dist/production/src/commands/migrations/MigrationBlankCommand.cjs.map +1 -0
  269. package/dist/production/src/commands/migrations/MigrationBlankCommand.js +23 -0
  270. package/dist/production/src/commands/migrations/MigrationBlankCommand.js.map +1 -0
  271. package/dist/production/src/commands/migrations/MigrationDescribeCommand.cjs +30 -0
  272. package/dist/production/src/commands/migrations/MigrationDescribeCommand.cjs.map +1 -0
  273. package/dist/production/src/commands/migrations/MigrationDescribeCommand.js +30 -0
  274. package/dist/production/src/commands/migrations/MigrationDescribeCommand.js.map +1 -0
  275. package/dist/production/src/commands/migrations/MigrationDiffCommand.cjs +76 -0
  276. package/dist/production/src/commands/migrations/MigrationDiffCommand.cjs.map +1 -0
  277. package/dist/production/src/commands/migrations/MigrationDiffCommand.js +76 -0
  278. package/dist/production/src/commands/migrations/MigrationDiffCommand.js.map +1 -0
  279. package/dist/production/src/commands/migrations/MigrationExecuteCommand.cjs +26 -0
  280. package/dist/production/src/commands/migrations/MigrationExecuteCommand.cjs.map +1 -0
  281. package/dist/production/src/commands/migrations/MigrationExecuteCommand.js +26 -0
  282. package/dist/production/src/commands/migrations/MigrationExecuteCommand.js.map +1 -0
  283. package/dist/production/src/commands/migrations/MigrationRebaseCommand.cjs +31 -0
  284. package/dist/production/src/commands/migrations/MigrationRebaseCommand.cjs.map +1 -0
  285. package/dist/production/src/commands/migrations/MigrationRebaseCommand.js +31 -0
  286. package/dist/production/src/commands/migrations/MigrationRebaseCommand.js.map +1 -0
  287. package/dist/production/src/commands/migrations/MigrationStatusCommand.cjs +57 -0
  288. package/dist/production/src/commands/migrations/MigrationStatusCommand.cjs.map +1 -0
  289. package/dist/production/src/commands/migrations/MigrationStatusCommand.js +57 -0
  290. package/dist/production/src/commands/migrations/MigrationStatusCommand.js.map +1 -0
  291. package/dist/production/src/commands/misc/VersionCommand.cjs +18 -0
  292. package/dist/production/src/commands/misc/VersionCommand.cjs.map +1 -0
  293. package/dist/production/src/commands/misc/VersionCommand.js +18 -0
  294. package/dist/production/src/commands/misc/VersionCommand.js.map +1 -0
  295. package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.cjs +36 -0
  296. package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.cjs.map +1 -0
  297. package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.js +36 -0
  298. package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.js.map +1 -0
  299. package/dist/production/src/commands/project/ProjectPrintSchemaCommand.cjs +69 -0
  300. package/dist/production/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -0
  301. package/dist/production/src/commands/project/ProjectPrintSchemaCommand.js +69 -0
  302. package/dist/production/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -0
  303. package/dist/production/src/commands/project/ProjectValidateCommand.cjs +40 -0
  304. package/dist/production/src/commands/project/ProjectValidateCommand.cjs.map +1 -0
  305. package/dist/production/src/commands/project/ProjectValidateCommand.js +40 -0
  306. package/dist/production/src/commands/project/ProjectValidateCommand.js.map +1 -0
  307. package/dist/production/src/commands/transfer/ExportCommand.cjs +66 -0
  308. package/dist/production/src/commands/transfer/ExportCommand.cjs.map +1 -0
  309. package/dist/production/src/commands/transfer/ExportCommand.js +66 -0
  310. package/dist/production/src/commands/transfer/ExportCommand.js.map +1 -0
  311. package/dist/production/src/commands/transfer/ImportCommand.cjs +60 -0
  312. package/dist/production/src/commands/transfer/ImportCommand.cjs.map +1 -0
  313. package/dist/production/src/commands/transfer/ImportCommand.js +60 -0
  314. package/dist/production/src/commands/transfer/ImportCommand.js.map +1 -0
  315. package/dist/production/src/commands/transfer/TransferCommand.cjs +73 -0
  316. package/dist/production/src/commands/transfer/TransferCommand.cjs.map +1 -0
  317. package/dist/production/src/commands/transfer/TransferCommand.js +73 -0
  318. package/dist/production/src/commands/transfer/TransferCommand.js.map +1 -0
  319. package/dist/production/src/commands/transfer/utils.cjs +22 -0
  320. package/dist/production/src/commands/transfer/utils.cjs.map +1 -0
  321. package/dist/production/src/commands/transfer/utils.js +22 -0
  322. package/dist/production/src/commands/transfer/utils.js.map +1 -0
  323. package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.cjs +54 -0
  324. package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.cjs.map +1 -0
  325. package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.js +54 -0
  326. package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +1 -0
  327. package/dist/production/src/consts.cjs +10 -0
  328. package/dist/production/src/consts.cjs.map +1 -0
  329. package/dist/production/src/consts.js +9 -0
  330. package/dist/production/src/consts.js.map +1 -0
  331. package/dist/production/src/dic.cjs +116 -0
  332. package/dist/production/src/dic.cjs.map +1 -0
  333. package/dist/production/src/dic.js +116 -0
  334. package/dist/production/src/dic.js.map +1 -0
  335. package/dist/production/src/lib/SystemClientProvider.cjs +14 -0
  336. package/dist/production/src/lib/SystemClientProvider.cjs.map +1 -0
  337. package/dist/production/src/lib/SystemClientProvider.js +14 -0
  338. package/dist/production/src/lib/SystemClientProvider.js.map +1 -0
  339. package/dist/production/src/lib/TenantClientProvider.cjs +14 -0
  340. package/dist/production/src/lib/TenantClientProvider.cjs.map +1 -0
  341. package/dist/production/src/lib/TenantClientProvider.js +14 -0
  342. package/dist/production/src/lib/TenantClientProvider.js.map +1 -0
  343. package/dist/production/src/lib/VersionChecker.cjs +85 -0
  344. package/dist/production/src/lib/VersionChecker.cjs.map +1 -0
  345. package/dist/production/src/lib/VersionChecker.js +68 -0
  346. package/dist/production/src/lib/VersionChecker.js.map +1 -0
  347. package/dist/production/src/lib/admin/AdminClient.cjs +30 -0
  348. package/dist/production/src/lib/admin/AdminClient.cjs.map +1 -0
  349. package/dist/production/src/lib/admin/AdminClient.js +30 -0
  350. package/dist/production/src/lib/admin/AdminClient.js.map +1 -0
  351. package/dist/production/src/lib/admin/AdminDeployer.cjs +36 -0
  352. package/dist/production/src/lib/admin/AdminDeployer.cjs.map +1 -0
  353. package/dist/production/src/lib/admin/AdminDeployer.js +36 -0
  354. package/dist/production/src/lib/admin/AdminDeployer.js.map +1 -0
  355. package/dist/production/src/lib/assertNever.cjs +7 -0
  356. package/dist/production/src/lib/assertNever.cjs.map +1 -0
  357. package/dist/production/src/lib/assertNever.js +7 -0
  358. package/dist/production/src/lib/assertNever.js.map +1 -0
  359. package/dist/production/src/lib/dsn.cjs +16 -0
  360. package/dist/production/src/lib/dsn.cjs.map +1 -0
  361. package/dist/production/src/lib/dsn.js +16 -0
  362. package/dist/production/src/lib/dsn.js.map +1 -0
  363. package/dist/production/src/lib/env.cjs +15 -0
  364. package/dist/production/src/lib/env.cjs.map +1 -0
  365. package/dist/production/src/lib/env.js +15 -0
  366. package/dist/production/src/lib/env.js.map +1 -0
  367. package/dist/production/src/lib/fs/DockerComposeManager.cjs +41 -0
  368. package/dist/production/src/lib/fs/DockerComposeManager.cjs.map +1 -0
  369. package/dist/production/src/lib/fs/DockerComposeManager.js +41 -0
  370. package/dist/production/src/lib/fs/DockerComposeManager.js.map +1 -0
  371. package/dist/production/src/lib/fs/FileSystem.cjs +43 -0
  372. package/dist/production/src/lib/fs/FileSystem.cjs.map +1 -0
  373. package/dist/production/src/lib/fs/FileSystem.js +27 -0
  374. package/dist/production/src/lib/fs/FileSystem.js.map +1 -0
  375. package/dist/production/src/lib/fs/YamlHandler.cjs +48 -0
  376. package/dist/production/src/lib/fs/YamlHandler.cjs.map +1 -0
  377. package/dist/production/src/lib/fs/YamlHandler.js +48 -0
  378. package/dist/production/src/lib/fs/YamlHandler.js.map +1 -0
  379. package/dist/production/src/lib/js/EsBuildBuilder.cjs +36 -0
  380. package/dist/production/src/lib/js/EsBuildBuilder.cjs.map +1 -0
  381. package/dist/production/src/lib/js/EsBuildBuilder.js +19 -0
  382. package/dist/production/src/lib/js/EsBuildBuilder.js.map +1 -0
  383. package/dist/production/src/lib/js/EvalExecutor.cjs +10 -0
  384. package/dist/production/src/lib/js/EvalExecutor.cjs.map +1 -0
  385. package/dist/production/src/lib/js/EvalExecutor.js +10 -0
  386. package/dist/production/src/lib/js/EvalExecutor.js.map +1 -0
  387. package/dist/production/src/lib/js/JsCodeRunner.cjs +17 -0
  388. package/dist/production/src/lib/js/JsCodeRunner.cjs.map +1 -0
  389. package/dist/production/src/lib/js/JsCodeRunner.js +17 -0
  390. package/dist/production/src/lib/js/JsCodeRunner.js.map +1 -0
  391. package/dist/production/src/lib/maskToken.cjs +5 -0
  392. package/dist/production/src/lib/maskToken.cjs.map +1 -0
  393. package/dist/production/src/lib/maskToken.js +5 -0
  394. package/dist/production/src/lib/maskToken.js.map +1 -0
  395. package/dist/production/src/lib/migrations/MigrationExecutionFacade.cjs +84 -0
  396. package/dist/production/src/lib/migrations/MigrationExecutionFacade.cjs.map +1 -0
  397. package/dist/production/src/lib/migrations/MigrationExecutionFacade.js +84 -0
  398. package/dist/production/src/lib/migrations/MigrationExecutionFacade.js.map +1 -0
  399. package/dist/production/src/lib/migrations/MigrationPrinter.cjs +82 -0
  400. package/dist/production/src/lib/migrations/MigrationPrinter.cjs.map +1 -0
  401. package/dist/production/src/lib/migrations/MigrationPrinter.js +82 -0
  402. package/dist/production/src/lib/migrations/MigrationPrinter.js.map +1 -0
  403. package/dist/production/src/lib/migrations/MigrationRebaseFacade.cjs +41 -0
  404. package/dist/production/src/lib/migrations/MigrationRebaseFacade.cjs.map +1 -0
  405. package/dist/production/src/lib/migrations/MigrationRebaseFacade.js +41 -0
  406. package/dist/production/src/lib/migrations/MigrationRebaseFacade.js.map +1 -0
  407. package/dist/production/src/lib/migrations/MigrationsStatusFacade.cjs +27 -0
  408. package/dist/production/src/lib/migrations/MigrationsStatusFacade.cjs.map +1 -0
  409. package/dist/production/src/lib/migrations/MigrationsStatusFacade.js +27 -0
  410. package/dist/production/src/lib/migrations/MigrationsStatusFacade.js.map +1 -0
  411. package/dist/production/src/lib/migrations/MigrationsValidator.cjs +38 -0
  412. package/dist/production/src/lib/migrations/MigrationsValidator.cjs.map +1 -0
  413. package/dist/production/src/lib/migrations/MigrationsValidator.js +38 -0
  414. package/dist/production/src/lib/migrations/MigrationsValidator.js.map +1 -0
  415. package/dist/production/src/lib/migrations/migrations.cjs +43 -0
  416. package/dist/production/src/lib/migrations/migrations.cjs.map +1 -0
  417. package/dist/production/src/lib/migrations/migrations.js +43 -0
  418. package/dist/production/src/lib/migrations/migrations.js.map +1 -0
  419. package/dist/production/src/lib/project/RemoteProject.cjs +12 -0
  420. package/dist/production/src/lib/project/RemoteProject.cjs.map +1 -0
  421. package/dist/production/src/lib/project/RemoteProject.js +12 -0
  422. package/dist/production/src/lib/project/RemoteProject.js.map +1 -0
  423. package/dist/production/src/lib/project/RemoteProjectProvider.cjs +21 -0
  424. package/dist/production/src/lib/project/RemoteProjectProvider.cjs.map +1 -0
  425. package/dist/production/src/lib/project/RemoteProjectProvider.js +21 -0
  426. package/dist/production/src/lib/project/RemoteProjectProvider.js.map +1 -0
  427. package/dist/production/src/lib/project/RemoteProjectResolver.cjs +29 -0
  428. package/dist/production/src/lib/project/RemoteProjectResolver.cjs.map +1 -0
  429. package/dist/production/src/lib/project/RemoteProjectResolver.js +29 -0
  430. package/dist/production/src/lib/project/RemoteProjectResolver.js.map +1 -0
  431. package/dist/production/src/lib/project/docs/components/EntityInfo.cjs +77 -0
  432. package/dist/production/src/lib/project/docs/components/EntityInfo.cjs.map +1 -0
  433. package/dist/production/src/lib/project/docs/components/EntityInfo.js +77 -0
  434. package/dist/production/src/lib/project/docs/components/EntityInfo.js.map +1 -0
  435. package/dist/production/src/lib/project/docs/components/EntityLink.cjs +7 -0
  436. package/dist/production/src/lib/project/docs/components/EntityLink.cjs.map +1 -0
  437. package/dist/production/src/lib/project/docs/components/EntityLink.js +7 -0
  438. package/dist/production/src/lib/project/docs/components/EntityLink.js.map +1 -0
  439. package/dist/production/src/lib/project/docs/components/FieldLink.cjs +15 -0
  440. package/dist/production/src/lib/project/docs/components/FieldLink.cjs.map +1 -0
  441. package/dist/production/src/lib/project/docs/components/FieldLink.js +15 -0
  442. package/dist/production/src/lib/project/docs/components/FieldLink.js.map +1 -0
  443. package/dist/production/src/lib/project/docs/components/FieldPermissions.cjs +17 -0
  444. package/dist/production/src/lib/project/docs/components/FieldPermissions.cjs.map +1 -0
  445. package/dist/production/src/lib/project/docs/components/FieldPermissions.js +17 -0
  446. package/dist/production/src/lib/project/docs/components/FieldPermissions.js.map +1 -0
  447. package/dist/production/src/lib/project/docs/components/FieldType.cjs +59 -0
  448. package/dist/production/src/lib/project/docs/components/FieldType.cjs.map +1 -0
  449. package/dist/production/src/lib/project/docs/components/FieldType.js +59 -0
  450. package/dist/production/src/lib/project/docs/components/FieldType.js.map +1 -0
  451. package/dist/production/src/lib/project/docs/components/OnDelete.cjs +66 -0
  452. package/dist/production/src/lib/project/docs/components/OnDelete.cjs.map +1 -0
  453. package/dist/production/src/lib/project/docs/components/OnDelete.js +66 -0
  454. package/dist/production/src/lib/project/docs/components/OnDelete.js.map +1 -0
  455. package/dist/production/src/lib/project/docs/components/ProjectInfo.cjs +32 -0
  456. package/dist/production/src/lib/project/docs/components/ProjectInfo.cjs.map +1 -0
  457. package/dist/production/src/lib/project/docs/components/ProjectInfo.js +32 -0
  458. package/dist/production/src/lib/project/docs/components/ProjectInfo.js.map +1 -0
  459. package/dist/production/src/lib/project/docs/components/SinglePermission.cjs +14 -0
  460. package/dist/production/src/lib/project/docs/components/SinglePermission.cjs.map +1 -0
  461. package/dist/production/src/lib/project/docs/components/SinglePermission.js +14 -0
  462. package/dist/production/src/lib/project/docs/components/SinglePermission.js.map +1 -0
  463. package/dist/production/src/lib/project/docs/components/utils.cjs +7 -0
  464. package/dist/production/src/lib/project/docs/components/utils.cjs.map +1 -0
  465. package/dist/production/src/lib/project/docs/components/utils.js +7 -0
  466. package/dist/production/src/lib/project/docs/components/utils.js.map +1 -0
  467. package/dist/production/src/lib/project/docs/projectDescribe.cjs +28 -0
  468. package/dist/production/src/lib/project/docs/projectDescribe.cjs.map +1 -0
  469. package/dist/production/src/lib/project/docs/projectDescribe.js +27 -0
  470. package/dist/production/src/lib/project/docs/projectDescribe.js.map +1 -0
  471. package/dist/production/src/lib/schema/SchemaLoader.cjs +49 -0
  472. package/dist/production/src/lib/schema/SchemaLoader.cjs.map +1 -0
  473. package/dist/production/src/lib/schema/SchemaLoader.js +32 -0
  474. package/dist/production/src/lib/schema/SchemaLoader.js.map +1 -0
  475. package/dist/production/src/lib/schema/SchemaValidationHelper.cjs +11 -0
  476. package/dist/production/src/lib/schema/SchemaValidationHelper.cjs.map +1 -0
  477. package/dist/production/src/lib/schema/SchemaValidationHelper.js +11 -0
  478. package/dist/production/src/lib/schema/SchemaValidationHelper.js.map +1 -0
  479. package/dist/production/src/lib/schema/SchemaValidationPrinter.cjs +14 -0
  480. package/dist/production/src/lib/schema/SchemaValidationPrinter.cjs.map +1 -0
  481. package/dist/production/src/lib/schema/SchemaValidationPrinter.js +14 -0
  482. package/dist/production/src/lib/schema/SchemaValidationPrinter.js.map +1 -0
  483. package/dist/production/src/lib/schema/collectReferences.cjs +34 -0
  484. package/dist/production/src/lib/schema/collectReferences.cjs.map +1 -0
  485. package/dist/production/src/lib/schema/collectReferences.js +34 -0
  486. package/dist/production/src/lib/schema/collectReferences.js.map +1 -0
  487. package/dist/production/src/lib/stream.cjs +43 -0
  488. package/dist/production/src/lib/stream.cjs.map +1 -0
  489. package/dist/production/src/lib/stream.js +43 -0
  490. package/dist/production/src/lib/stream.js.map +1 -0
  491. package/dist/production/src/lib/tenant/TenantClient.cjs +45 -0
  492. package/dist/production/src/lib/tenant/TenantClient.cjs.map +1 -0
  493. package/dist/production/src/lib/tenant/TenantClient.js +45 -0
  494. package/dist/production/src/lib/tenant/TenantClient.js.map +1 -0
  495. package/dist/production/src/lib/transfer/DataTransferClient.cjs +97 -0
  496. package/dist/production/src/lib/transfer/DataTransferClient.cjs.map +1 -0
  497. package/dist/production/src/lib/transfer/DataTransferClient.js +97 -0
  498. package/dist/production/src/lib/transfer/DataTransferClient.js.map +1 -0
  499. package/dist/production/src/lib/transfer/stdio.cjs +12 -0
  500. package/dist/production/src/lib/transfer/stdio.cjs.map +1 -0
  501. package/dist/production/src/lib/transfer/stdio.js +12 -0
  502. package/dist/production/src/lib/transfer/stdio.js.map +1 -0
  503. package/dist/production/src/lib/workspace/WorkspaceResolver.cjs +38 -0
  504. package/dist/production/src/lib/workspace/WorkspaceResolver.cjs.map +1 -0
  505. package/dist/production/src/lib/workspace/WorkspaceResolver.js +38 -0
  506. package/dist/production/src/lib/workspace/WorkspaceResolver.js.map +1 -0
  507. package/dist/types/commands/deploy/DeployCommand.d.ts +30 -0
  508. package/dist/types/commands/deploy/DeployCommand.d.ts.map +1 -0
  509. package/dist/types/commands/index.d.ts +6 -0
  510. package/dist/types/commands/index.d.ts.map +1 -0
  511. package/dist/types/commands/migrations/MigrationAmendCommand.d.ts +32 -0
  512. package/dist/types/commands/migrations/MigrationAmendCommand.d.ts.map +1 -0
  513. package/dist/types/commands/migrations/MigrationBlankCommand.d.ts +15 -0
  514. package/dist/types/commands/migrations/MigrationBlankCommand.d.ts.map +1 -0
  515. package/dist/types/commands/migrations/MigrationDescribeCommand.d.ts +20 -0
  516. package/dist/types/commands/migrations/MigrationDescribeCommand.d.ts.map +1 -0
  517. package/dist/types/commands/migrations/MigrationDiffCommand.d.ts +25 -0
  518. package/dist/types/commands/migrations/MigrationDiffCommand.d.ts.map +1 -0
  519. package/dist/types/commands/migrations/MigrationExecuteCommand.d.ts +16 -0
  520. package/dist/types/commands/migrations/MigrationExecuteCommand.d.ts.map +1 -0
  521. package/dist/types/commands/migrations/MigrationRebaseCommand.d.ts +18 -0
  522. package/dist/types/commands/migrations/MigrationRebaseCommand.d.ts.map +1 -0
  523. package/dist/types/commands/migrations/MigrationStatusCommand.d.ts +22 -0
  524. package/dist/types/commands/migrations/MigrationStatusCommand.d.ts.map +1 -0
  525. package/dist/types/commands/misc/VersionCommand.d.ts +8 -0
  526. package/dist/types/commands/misc/VersionCommand.d.ts.map +1 -0
  527. package/dist/types/commands/project/ProjectGenerateDocumentationCommand.d.ts +15 -0
  528. package/dist/types/commands/project/ProjectGenerateDocumentationCommand.d.ts.map +1 -0
  529. package/dist/types/commands/project/ProjectPrintSchemaCommand.d.ts +19 -0
  530. package/dist/types/commands/project/ProjectPrintSchemaCommand.d.ts.map +1 -0
  531. package/dist/types/commands/project/ProjectValidateCommand.d.ts +19 -0
  532. package/dist/types/commands/project/ProjectValidateCommand.d.ts.map +1 -0
  533. package/dist/types/commands/project/index.d.ts +4 -0
  534. package/dist/types/commands/project/index.d.ts.map +1 -0
  535. package/dist/types/commands/transfer/ExportCommand.d.ts +23 -0
  536. package/dist/types/commands/transfer/ExportCommand.d.ts.map +1 -0
  537. package/dist/types/commands/transfer/ImportCommand.d.ts +20 -0
  538. package/dist/types/commands/transfer/ImportCommand.d.ts.map +1 -0
  539. package/dist/types/commands/transfer/TransferCommand.d.ts +21 -0
  540. package/dist/types/commands/transfer/TransferCommand.d.ts.map +1 -0
  541. package/dist/types/commands/transfer/utils.d.ts +5 -0
  542. package/dist/types/commands/transfer/utils.d.ts.map +1 -0
  543. package/dist/types/commands/workspace/WorkspaceUpdateApiCommand.d.ts +15 -0
  544. package/dist/types/commands/workspace/WorkspaceUpdateApiCommand.d.ts.map +1 -0
  545. package/dist/types/consts.d.ts +3 -0
  546. package/dist/types/consts.d.ts.map +1 -0
  547. package/dist/types/dic.d.ts +144 -0
  548. package/dist/types/dic.d.ts.map +1 -0
  549. package/dist/types/lib/SystemClientProvider.d.ts +8 -0
  550. package/dist/types/lib/SystemClientProvider.d.ts.map +1 -0
  551. package/dist/types/lib/TenantClientProvider.d.ts +8 -0
  552. package/dist/types/lib/TenantClientProvider.d.ts.map +1 -0
  553. package/dist/types/lib/VersionChecker.d.ts +11 -0
  554. package/dist/types/lib/VersionChecker.d.ts.map +1 -0
  555. package/dist/types/lib/admin/AdminClient.d.ts +12 -0
  556. package/dist/types/lib/admin/AdminClient.d.ts.map +1 -0
  557. package/dist/types/lib/admin/AdminDeployer.d.ts +15 -0
  558. package/dist/types/lib/admin/AdminDeployer.d.ts.map +1 -0
  559. package/dist/types/lib/assertNever.d.ts.map +1 -0
  560. package/dist/types/lib/dsn.d.ts.map +1 -0
  561. package/dist/types/lib/env.d.ts +11 -0
  562. package/dist/types/lib/env.d.ts.map +1 -0
  563. package/dist/types/lib/fs/DockerComposeManager.d.ts +25 -0
  564. package/dist/types/lib/fs/DockerComposeManager.d.ts.map +1 -0
  565. package/dist/types/lib/fs/FileSystem.d.ts +8 -0
  566. package/dist/types/lib/fs/FileSystem.d.ts.map +1 -0
  567. package/dist/types/lib/fs/YamlHandler.d.ts +15 -0
  568. package/dist/types/lib/fs/YamlHandler.d.ts.map +1 -0
  569. package/dist/types/lib/js/EsBuildBuilder.d.ts +5 -0
  570. package/dist/types/lib/js/EsBuildBuilder.d.ts.map +1 -0
  571. package/dist/types/lib/js/EvalExecutor.d.ts +5 -0
  572. package/dist/types/lib/js/EvalExecutor.d.ts.map +1 -0
  573. package/dist/types/lib/js/JsBuilder.d.ts +4 -0
  574. package/dist/types/lib/js/JsBuilder.d.ts.map +1 -0
  575. package/dist/types/lib/js/JsCodeRunner.d.ts +9 -0
  576. package/dist/types/lib/js/JsCodeRunner.d.ts.map +1 -0
  577. package/dist/types/lib/js/JsExecutor.d.ts +4 -0
  578. package/dist/types/lib/js/JsExecutor.d.ts.map +1 -0
  579. package/dist/types/lib/json.d.ts +7 -0
  580. package/dist/types/lib/json.d.ts.map +1 -0
  581. package/dist/types/lib/maskToken.d.ts +2 -0
  582. package/dist/types/lib/maskToken.d.ts.map +1 -0
  583. package/dist/types/lib/migrations/MigrationExecutionFacade.d.ts +23 -0
  584. package/dist/types/lib/migrations/MigrationExecutionFacade.d.ts.map +1 -0
  585. package/dist/types/lib/migrations/MigrationPrinter.d.ts +12 -0
  586. package/dist/types/lib/migrations/MigrationPrinter.d.ts.map +1 -0
  587. package/dist/types/lib/migrations/MigrationRebaseFacade.d.ts +12 -0
  588. package/dist/types/lib/migrations/MigrationRebaseFacade.d.ts.map +1 -0
  589. package/dist/types/lib/migrations/MigrationsStatusFacade.d.ts +16 -0
  590. package/dist/types/lib/migrations/MigrationsStatusFacade.d.ts.map +1 -0
  591. package/dist/types/lib/migrations/MigrationsValidator.d.ts +10 -0
  592. package/dist/types/lib/migrations/MigrationsValidator.d.ts.map +1 -0
  593. package/dist/types/lib/migrations/migrations.d.ts +3 -0
  594. package/dist/types/lib/migrations/migrations.d.ts.map +1 -0
  595. package/dist/types/lib/project/RemoteProject.d.ts +8 -0
  596. package/dist/types/lib/project/RemoteProject.d.ts.map +1 -0
  597. package/dist/types/lib/project/RemoteProjectProvider.d.ts +7 -0
  598. package/dist/types/lib/project/RemoteProjectProvider.d.ts.map +1 -0
  599. package/dist/types/lib/project/RemoteProjectResolver.d.ts +8 -0
  600. package/dist/types/lib/project/RemoteProjectResolver.d.ts.map +1 -0
  601. package/dist/types/lib/project/docs/components/EntityInfo.d.ts +11 -0
  602. package/dist/types/lib/project/docs/components/EntityInfo.d.ts.map +1 -0
  603. package/dist/types/lib/project/docs/components/EntityLink.d.ts.map +1 -0
  604. package/dist/types/lib/project/docs/components/FieldLink.d.ts +7 -0
  605. package/dist/types/lib/project/docs/components/FieldLink.d.ts.map +1 -0
  606. package/dist/types/lib/project/docs/components/FieldPermissions.d.ts +7 -0
  607. package/dist/types/lib/project/docs/components/FieldPermissions.d.ts.map +1 -0
  608. package/dist/types/lib/project/docs/components/FieldType.d.ts.map +1 -0
  609. package/dist/types/lib/project/docs/components/OnDelete.d.ts +9 -0
  610. package/dist/types/lib/project/docs/components/OnDelete.d.ts.map +1 -0
  611. package/dist/types/lib/project/docs/components/ProjectInfo.d.ts.map +1 -0
  612. package/dist/types/lib/project/docs/components/SinglePermission.d.ts +7 -0
  613. package/dist/types/lib/project/docs/components/SinglePermission.d.ts.map +1 -0
  614. package/dist/types/lib/project/docs/components/utils.d.ts.map +1 -0
  615. package/dist/types/lib/project/docs/projectDescribe.d.ts.map +1 -0
  616. package/dist/types/lib/schema/SchemaLoader.d.ts +18 -0
  617. package/dist/types/lib/schema/SchemaLoader.d.ts.map +1 -0
  618. package/dist/types/lib/schema/SchemaValidationHelper.d.ts +4 -0
  619. package/dist/types/lib/schema/SchemaValidationHelper.d.ts.map +1 -0
  620. package/dist/types/lib/schema/SchemaValidationPrinter.d.ts +3 -0
  621. package/dist/types/lib/schema/SchemaValidationPrinter.d.ts.map +1 -0
  622. package/dist/types/lib/schema/collectReferences.d.ts.map +1 -0
  623. package/dist/types/lib/stream.d.ts +8 -0
  624. package/dist/types/lib/stream.d.ts.map +1 -0
  625. package/dist/types/lib/tenant/TenantClient.d.ts +9 -0
  626. package/dist/types/lib/tenant/TenantClient.d.ts.map +1 -0
  627. package/dist/types/lib/transfer/DataTransferClient.d.ts +18 -0
  628. package/dist/types/lib/transfer/DataTransferClient.d.ts.map +1 -0
  629. package/dist/types/lib/transfer/stdio.d.ts.map +1 -0
  630. package/dist/types/lib/workspace/Workspace.d.ts +8 -0
  631. package/dist/types/lib/workspace/Workspace.d.ts.map +1 -0
  632. package/dist/types/lib/workspace/WorkspaceResolver.d.ts +15 -0
  633. package/dist/types/lib/workspace/WorkspaceResolver.d.ts.map +1 -0
  634. package/dist/types/tsconfig.tsbuildinfo +1 -0
  635. package/esbuild.cjs +27 -0
  636. package/package.json +16 -13
  637. package/src/.eslintrc.cjs +5 -0
  638. package/src/commands/deploy/DeployCommand.ts +51 -107
  639. package/src/commands/index.ts +0 -1
  640. package/src/commands/migrations/MigrationAmendCommand.ts +97 -115
  641. package/src/commands/migrations/MigrationBlankCommand.ts +8 -20
  642. package/src/commands/migrations/MigrationDescribeCommand.ts +12 -22
  643. package/src/commands/migrations/MigrationDiffCommand.ts +66 -95
  644. package/src/commands/migrations/MigrationExecuteCommand.ts +23 -83
  645. package/src/commands/migrations/MigrationRebaseCommand.ts +20 -62
  646. package/src/commands/migrations/MigrationStatusCommand.ts +20 -40
  647. package/src/commands/misc/VersionCommand.ts +7 -2
  648. package/src/commands/project/ProjectGenerateDocumentationCommand.ts +47 -0
  649. package/src/commands/project/ProjectPrintSchemaCommand.ts +10 -16
  650. package/src/commands/project/ProjectValidateCommand.ts +33 -54
  651. package/src/commands/project/index.ts +1 -1
  652. package/src/commands/transfer/ExportCommand.ts +16 -14
  653. package/src/commands/transfer/ImportCommand.ts +18 -15
  654. package/src/commands/transfer/TransferCommand.ts +29 -18
  655. package/src/commands/transfer/utils.ts +1 -117
  656. package/src/commands/workspace/WorkspaceUpdateApiCommand.ts +8 -16
  657. package/src/consts.ts +5 -0
  658. package/src/dic.ts +258 -0
  659. package/src/lib/SystemClientProvider.ts +14 -0
  660. package/src/lib/TenantClientProvider.ts +14 -0
  661. package/src/lib/VersionChecker.ts +71 -0
  662. package/src/lib/admin/AdminClient.ts +33 -0
  663. package/src/lib/admin/AdminDeployer.ts +45 -0
  664. package/src/lib/dsn.ts +13 -0
  665. package/src/lib/env.ts +21 -0
  666. package/src/lib/fs/DockerComposeManager.ts +63 -0
  667. package/src/lib/fs/FileSystem.ts +19 -0
  668. package/src/lib/fs/YamlHandler.ts +59 -0
  669. package/src/lib/js/EsBuildBuilder.ts +17 -0
  670. package/src/lib/js/EvalExecutor.ts +8 -0
  671. package/src/lib/js/JsBuilder.ts +3 -0
  672. package/src/lib/js/JsCodeRunner.ts +15 -0
  673. package/src/lib/js/JsExecutor.ts +3 -0
  674. package/src/lib/json.ts +4 -0
  675. package/src/lib/migrations/MigrationExecutionFacade.ts +97 -0
  676. package/src/lib/migrations/MigrationPrinter.ts +86 -0
  677. package/src/lib/migrations/MigrationRebaseFacade.ts +41 -0
  678. package/src/lib/migrations/MigrationsStatusFacade.ts +27 -0
  679. package/src/lib/migrations/MigrationsValidator.ts +40 -0
  680. package/src/lib/migrations/migrations.ts +45 -0
  681. package/src/lib/project/RemoteProject.ts +9 -0
  682. package/src/lib/project/RemoteProjectProvider.ts +16 -0
  683. package/src/lib/project/RemoteProjectResolver.ts +30 -0
  684. package/src/lib/project/docs/.eslintrc.cjs +5 -0
  685. package/src/lib/project/docs/components/EntityInfo.tsx +85 -0
  686. package/src/lib/project/docs/components/OnDelete.tsx +72 -0
  687. package/src/lib/project/docs/components/ProjectInfo.tsx +48 -0
  688. package/src/lib/project/docs/projectDescribe.tsx +28 -0
  689. package/src/lib/schema/SchemaLoader.ts +38 -0
  690. package/src/lib/schema/SchemaValidationHelper.ts +9 -0
  691. package/src/lib/schema/SchemaValidationPrinter.ts +13 -0
  692. package/src/lib/tenant/TenantClient.ts +45 -0
  693. package/src/lib/transfer/DataTransferClient.ts +112 -0
  694. package/src/lib/workspace/Workspace.ts +7 -0
  695. package/src/lib/workspace/WorkspaceResolver.ts +45 -0
  696. package/src/run.ts +23 -63
  697. package/src/tsconfig.json +4 -2
  698. package/tailwind.config.js +1 -1
  699. package/dist/src/commands/deploy/DeployCommand.d.ts +0 -21
  700. package/dist/src/commands/deploy/DeployCommand.d.ts.map +0 -1
  701. package/dist/src/commands/deploy/DeployCommand.js +0 -135
  702. package/dist/src/commands/deploy/DeployCommand.js.map +0 -1
  703. package/dist/src/commands/deploy/index.js +0 -18
  704. package/dist/src/commands/deploy/index.js.map +0 -1
  705. package/dist/src/commands/index.d.ts +0 -7
  706. package/dist/src/commands/index.d.ts.map +0 -1
  707. package/dist/src/commands/index.js +0 -23
  708. package/dist/src/commands/index.js.map +0 -1
  709. package/dist/src/commands/migrations/MigrationAmendCommand.d.ts +0 -18
  710. package/dist/src/commands/migrations/MigrationAmendCommand.d.ts.map +0 -1
  711. package/dist/src/commands/migrations/MigrationAmendCommand.js +0 -126
  712. package/dist/src/commands/migrations/MigrationAmendCommand.js.map +0 -1
  713. package/dist/src/commands/migrations/MigrationBlankCommand.d.ts +0 -15
  714. package/dist/src/commands/migrations/MigrationBlankCommand.d.ts.map +0 -1
  715. package/dist/src/commands/migrations/MigrationBlankCommand.js +0 -29
  716. package/dist/src/commands/migrations/MigrationBlankCommand.js.map +0 -1
  717. package/dist/src/commands/migrations/MigrationDescribeCommand.d.ts +0 -17
  718. package/dist/src/commands/migrations/MigrationDescribeCommand.d.ts.map +0 -1
  719. package/dist/src/commands/migrations/MigrationDescribeCommand.js +0 -42
  720. package/dist/src/commands/migrations/MigrationDescribeCommand.js.map +0 -1
  721. package/dist/src/commands/migrations/MigrationDiffCommand.d.ts +0 -18
  722. package/dist/src/commands/migrations/MigrationDiffCommand.d.ts.map +0 -1
  723. package/dist/src/commands/migrations/MigrationDiffCommand.js +0 -110
  724. package/dist/src/commands/migrations/MigrationDiffCommand.js.map +0 -1
  725. package/dist/src/commands/migrations/MigrationExecuteCommand.d.ts +0 -17
  726. package/dist/src/commands/migrations/MigrationExecuteCommand.d.ts.map +0 -1
  727. package/dist/src/commands/migrations/MigrationExecuteCommand.js +0 -83
  728. package/dist/src/commands/migrations/MigrationExecuteCommand.js.map +0 -1
  729. package/dist/src/commands/migrations/MigrationRebaseCommand.d.ts +0 -16
  730. package/dist/src/commands/migrations/MigrationRebaseCommand.d.ts.map +0 -1
  731. package/dist/src/commands/migrations/MigrationRebaseCommand.js +0 -64
  732. package/dist/src/commands/migrations/MigrationRebaseCommand.js.map +0 -1
  733. package/dist/src/commands/migrations/MigrationStatusCommand.d.ts +0 -19
  734. package/dist/src/commands/migrations/MigrationStatusCommand.d.ts.map +0 -1
  735. package/dist/src/commands/migrations/MigrationStatusCommand.js +0 -88
  736. package/dist/src/commands/migrations/MigrationStatusCommand.js.map +0 -1
  737. package/dist/src/commands/migrations/MigrationValidationHelper.d.ts +0 -4
  738. package/dist/src/commands/migrations/MigrationValidationHelper.d.ts.map +0 -1
  739. package/dist/src/commands/migrations/MigrationValidationHelper.js +0 -34
  740. package/dist/src/commands/migrations/MigrationValidationHelper.js.map +0 -1
  741. package/dist/src/commands/migrations/SystemApiClientResolver.d.ts +0 -8
  742. package/dist/src/commands/migrations/SystemApiClientResolver.d.ts.map +0 -1
  743. package/dist/src/commands/migrations/SystemApiClientResolver.js +0 -14
  744. package/dist/src/commands/migrations/SystemApiClientResolver.js.map +0 -1
  745. package/dist/src/commands/migrations/index.js +0 -24
  746. package/dist/src/commands/migrations/index.js.map +0 -1
  747. package/dist/src/commands/misc/VersionCommand.d.ts +0 -6
  748. package/dist/src/commands/misc/VersionCommand.d.ts.map +0 -1
  749. package/dist/src/commands/misc/VersionCommand.js +0 -15
  750. package/dist/src/commands/misc/VersionCommand.js.map +0 -1
  751. package/dist/src/commands/misc/index.js +0 -18
  752. package/dist/src/commands/misc/index.js.map +0 -1
  753. package/dist/src/commands/project/ProjectGenerateDocumentation.d.ts +0 -15
  754. package/dist/src/commands/project/ProjectGenerateDocumentation.d.ts.map +0 -1
  755. package/dist/src/commands/project/ProjectGenerateDocumentation.js +0 -43
  756. package/dist/src/commands/project/ProjectGenerateDocumentation.js.map +0 -1
  757. package/dist/src/commands/project/ProjectPrintSchemaCommand.d.ts +0 -18
  758. package/dist/src/commands/project/ProjectPrintSchemaCommand.d.ts.map +0 -1
  759. package/dist/src/commands/project/ProjectPrintSchemaCommand.js +0 -81
  760. package/dist/src/commands/project/ProjectPrintSchemaCommand.js.map +0 -1
  761. package/dist/src/commands/project/ProjectValidateCommand.d.ts +0 -13
  762. package/dist/src/commands/project/ProjectValidateCommand.d.ts.map +0 -1
  763. package/dist/src/commands/project/ProjectValidateCommand.js +0 -65
  764. package/dist/src/commands/project/ProjectValidateCommand.js.map +0 -1
  765. package/dist/src/commands/project/index.d.ts +0 -4
  766. package/dist/src/commands/project/index.d.ts.map +0 -1
  767. package/dist/src/commands/project/index.js +0 -20
  768. package/dist/src/commands/project/index.js.map +0 -1
  769. package/dist/src/commands/tenant/CreateApiKeyCommand.d.ts +0 -14
  770. package/dist/src/commands/tenant/CreateApiKeyCommand.d.ts.map +0 -1
  771. package/dist/src/commands/tenant/CreateApiKeyCommand.js +0 -34
  772. package/dist/src/commands/tenant/CreateApiKeyCommand.js.map +0 -1
  773. package/dist/src/commands/tenant/InviteCommand.d.ts +0 -14
  774. package/dist/src/commands/tenant/InviteCommand.d.ts.map +0 -1
  775. package/dist/src/commands/tenant/InviteCommand.js +0 -32
  776. package/dist/src/commands/tenant/InviteCommand.js.map +0 -1
  777. package/dist/src/commands/tenant/ResetPasswordCommand.d.ts +0 -14
  778. package/dist/src/commands/tenant/ResetPasswordCommand.d.ts.map +0 -1
  779. package/dist/src/commands/tenant/ResetPasswordCommand.js +0 -30
  780. package/dist/src/commands/tenant/ResetPasswordCommand.js.map +0 -1
  781. package/dist/src/commands/tenant/SignInCommand.d.ts +0 -14
  782. package/dist/src/commands/tenant/SignInCommand.d.ts.map +0 -1
  783. package/dist/src/commands/tenant/SignInCommand.js +0 -32
  784. package/dist/src/commands/tenant/SignInCommand.js.map +0 -1
  785. package/dist/src/commands/tenant/index.d.ts +0 -5
  786. package/dist/src/commands/tenant/index.d.ts.map +0 -1
  787. package/dist/src/commands/tenant/index.js +0 -21
  788. package/dist/src/commands/tenant/index.js.map +0 -1
  789. package/dist/src/commands/transfer/ExportCommand.d.ts +0 -20
  790. package/dist/src/commands/transfer/ExportCommand.d.ts.map +0 -1
  791. package/dist/src/commands/transfer/ExportCommand.js +0 -70
  792. package/dist/src/commands/transfer/ExportCommand.js.map +0 -1
  793. package/dist/src/commands/transfer/ImportCommand.d.ts +0 -17
  794. package/dist/src/commands/transfer/ImportCommand.d.ts.map +0 -1
  795. package/dist/src/commands/transfer/ImportCommand.js +0 -61
  796. package/dist/src/commands/transfer/ImportCommand.js.map +0 -1
  797. package/dist/src/commands/transfer/TransferCommand.d.ts +0 -18
  798. package/dist/src/commands/transfer/TransferCommand.d.ts.map +0 -1
  799. package/dist/src/commands/transfer/TransferCommand.js +0 -67
  800. package/dist/src/commands/transfer/TransferCommand.js.map +0 -1
  801. package/dist/src/commands/transfer/index.js +0 -20
  802. package/dist/src/commands/transfer/index.js.map +0 -1
  803. package/dist/src/commands/transfer/utils.d.ts +0 -27
  804. package/dist/src/commands/transfer/utils.d.ts.map +0 -1
  805. package/dist/src/commands/transfer/utils.js +0 -136
  806. package/dist/src/commands/transfer/utils.js.map +0 -1
  807. package/dist/src/commands/workspace/WorkspaceUpdateApiCommand.d.ts +0 -13
  808. package/dist/src/commands/workspace/WorkspaceUpdateApiCommand.d.ts.map +0 -1
  809. package/dist/src/commands/workspace/WorkspaceUpdateApiCommand.js +0 -66
  810. package/dist/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +0 -1
  811. package/dist/src/commands/workspace/index.js +0 -18
  812. package/dist/src/commands/workspace/index.js.map +0 -1
  813. package/dist/src/run.js +0 -50
  814. package/dist/src/run.js.map +0 -1
  815. package/dist/src/tsconfig.tsbuildinfo +0 -1
  816. package/dist/src/utils/admin.d.ts +0 -14
  817. package/dist/src/utils/admin.d.ts.map +0 -1
  818. package/dist/src/utils/admin.js +0 -47
  819. package/dist/src/utils/admin.js.map +0 -1
  820. package/dist/src/utils/assertNever.d.ts.map +0 -1
  821. package/dist/src/utils/assertNever.js +0 -8
  822. package/dist/src/utils/assertNever.js.map +0 -1
  823. package/dist/src/utils/checkVersions.d.ts +0 -3
  824. package/dist/src/utils/checkVersions.d.ts.map +0 -1
  825. package/dist/src/utils/checkVersions.js +0 -83
  826. package/dist/src/utils/checkVersions.js.map +0 -1
  827. package/dist/src/utils/dockerCompose.d.ts +0 -18
  828. package/dist/src/utils/dockerCompose.d.ts.map +0 -1
  829. package/dist/src/utils/dockerCompose.js +0 -66
  830. package/dist/src/utils/dockerCompose.js.map +0 -1
  831. package/dist/src/utils/dsn.d.ts.map +0 -1
  832. package/dist/src/utils/dsn.js +0 -17
  833. package/dist/src/utils/dsn.js.map +0 -1
  834. package/dist/src/utils/esbuild.d.ts +0 -2
  835. package/dist/src/utils/esbuild.d.ts.map +0 -1
  836. package/dist/src/utils/esbuild.js +0 -41
  837. package/dist/src/utils/esbuild.js.map +0 -1
  838. package/dist/src/utils/instance/environment.d.ts +0 -4
  839. package/dist/src/utils/instance/environment.d.ts.map +0 -1
  840. package/dist/src/utils/instance/environment.js +0 -3
  841. package/dist/src/utils/instance/environment.js.map +0 -1
  842. package/dist/src/utils/instance/index.d.ts +0 -3
  843. package/dist/src/utils/instance/index.d.ts.map +0 -1
  844. package/dist/src/utils/instance/index.js +0 -21
  845. package/dist/src/utils/instance/index.js.map +0 -1
  846. package/dist/src/utils/instance/interactiveUtils.d.ts +0 -4
  847. package/dist/src/utils/instance/interactiveUtils.d.ts.map +0 -1
  848. package/dist/src/utils/instance/interactiveUtils.js +0 -36
  849. package/dist/src/utils/instance/interactiveUtils.js.map +0 -1
  850. package/dist/src/utils/migrations/MigrationCreateHelper.d.ts +0 -21
  851. package/dist/src/utils/migrations/MigrationCreateHelper.d.ts.map +0 -1
  852. package/dist/src/utils/migrations/MigrationCreateHelper.js +0 -32
  853. package/dist/src/utils/migrations/MigrationCreateHelper.js.map +0 -1
  854. package/dist/src/utils/migrations/MigrationExecuteHelper.d.ts +0 -23
  855. package/dist/src/utils/migrations/MigrationExecuteHelper.d.ts.map +0 -1
  856. package/dist/src/utils/migrations/MigrationExecuteHelper.js +0 -84
  857. package/dist/src/utils/migrations/MigrationExecuteHelper.js.map +0 -1
  858. package/dist/src/utils/migrations/MigrationsContainer.d.ts +0 -20
  859. package/dist/src/utils/migrations/MigrationsContainer.d.ts.map +0 -1
  860. package/dist/src/utils/migrations/MigrationsContainer.js +0 -58
  861. package/dist/src/utils/migrations/MigrationsContainer.js.map +0 -1
  862. package/dist/src/utils/migrations/migrations.d.ts +0 -9
  863. package/dist/src/utils/migrations/migrations.d.ts.map +0 -1
  864. package/dist/src/utils/migrations/migrations.js +0 -77
  865. package/dist/src/utils/migrations/migrations.js.map +0 -1
  866. package/dist/src/utils/project/components/EntityInfo.d.ts +0 -11
  867. package/dist/src/utils/project/components/EntityInfo.d.ts.map +0 -1
  868. package/dist/src/utils/project/components/EntityInfo.js +0 -54
  869. package/dist/src/utils/project/components/EntityInfo.js.map +0 -1
  870. package/dist/src/utils/project/components/EntityLink.d.ts.map +0 -1
  871. package/dist/src/utils/project/components/EntityLink.js +0 -8
  872. package/dist/src/utils/project/components/EntityLink.js.map +0 -1
  873. package/dist/src/utils/project/components/FieldLink.d.ts +0 -7
  874. package/dist/src/utils/project/components/FieldLink.d.ts.map +0 -1
  875. package/dist/src/utils/project/components/FieldLink.js +0 -13
  876. package/dist/src/utils/project/components/FieldLink.js.map +0 -1
  877. package/dist/src/utils/project/components/FieldPermissions.d.ts +0 -7
  878. package/dist/src/utils/project/components/FieldPermissions.d.ts.map +0 -1
  879. package/dist/src/utils/project/components/FieldPermissions.js +0 -17
  880. package/dist/src/utils/project/components/FieldPermissions.js.map +0 -1
  881. package/dist/src/utils/project/components/FieldType.d.ts.map +0 -1
  882. package/dist/src/utils/project/components/FieldType.js +0 -59
  883. package/dist/src/utils/project/components/FieldType.js.map +0 -1
  884. package/dist/src/utils/project/components/OnDelete.d.ts +0 -9
  885. package/dist/src/utils/project/components/OnDelete.d.ts.map +0 -1
  886. package/dist/src/utils/project/components/OnDelete.js +0 -70
  887. package/dist/src/utils/project/components/OnDelete.js.map +0 -1
  888. package/dist/src/utils/project/components/ProjectInfo.d.ts.map +0 -1
  889. package/dist/src/utils/project/components/ProjectInfo.js +0 -28
  890. package/dist/src/utils/project/components/ProjectInfo.js.map +0 -1
  891. package/dist/src/utils/project/components/SinglePermission.d.ts +0 -7
  892. package/dist/src/utils/project/components/SinglePermission.d.ts.map +0 -1
  893. package/dist/src/utils/project/components/SinglePermission.js +0 -15
  894. package/dist/src/utils/project/components/SinglePermission.js.map +0 -1
  895. package/dist/src/utils/project/components/utils.d.ts.map +0 -1
  896. package/dist/src/utils/project/components/utils.js +0 -8
  897. package/dist/src/utils/project/components/utils.js.map +0 -1
  898. package/dist/src/utils/project/loadSchema.d.ts +0 -4
  899. package/dist/src/utils/project/loadSchema.d.ts.map +0 -1
  900. package/dist/src/utils/project/loadSchema.js +0 -14
  901. package/dist/src/utils/project/loadSchema.js.map +0 -1
  902. package/dist/src/utils/project/projectDescribe.d.ts.map +0 -1
  903. package/dist/src/utils/project/projectDescribe.js +0 -29
  904. package/dist/src/utils/project/projectDescribe.js.map +0 -1
  905. package/dist/src/utils/project/resources/out.css +0 -824
  906. package/dist/src/utils/schema/collectReferences.d.ts.map +0 -1
  907. package/dist/src/utils/schema/collectReferences.js +0 -35
  908. package/dist/src/utils/schema/collectReferences.js.map +0 -1
  909. package/dist/src/utils/schema.d.ts +0 -5
  910. package/dist/src/utils/schema.d.ts.map +0 -1
  911. package/dist/src/utils/schema.js +0 -22
  912. package/dist/src/utils/schema.js.map +0 -1
  913. package/dist/src/utils/stdio.d.ts.map +0 -1
  914. package/dist/src/utils/stdio.js +0 -13
  915. package/dist/src/utils/stdio.js.map +0 -1
  916. package/dist/src/utils/stream.d.ts +0 -9
  917. package/dist/src/utils/stream.d.ts.map +0 -1
  918. package/dist/src/utils/stream.js +0 -41
  919. package/dist/src/utils/stream.js.map +0 -1
  920. package/dist/src/utils/tenant.d.ts +0 -66
  921. package/dist/src/utils/tenant.d.ts.map +0 -1
  922. package/dist/src/utils/tenant.js +0 -355
  923. package/dist/src/utils/tenant.js.map +0 -1
  924. package/dist/src/utils/token.d.ts +0 -2
  925. package/dist/src/utils/token.d.ts.map +0 -1
  926. package/dist/src/utils/token.js +0 -6
  927. package/dist/src/utils/token.js.map +0 -1
  928. package/dist/src/utils/tuple.d.ts +0 -2
  929. package/dist/src/utils/tuple.d.ts.map +0 -1
  930. package/dist/src/utils/tuple.js +0 -6
  931. package/dist/src/utils/tuple.js.map +0 -1
  932. package/dist/src/utils/workspace.d.ts +0 -3
  933. package/dist/src/utils/workspace.d.ts.map +0 -1
  934. package/dist/src/utils/workspace.js +0 -25
  935. package/dist/src/utils/workspace.js.map +0 -1
  936. package/dist/src/utils/yaml.d.ts +0 -8
  937. package/dist/src/utils/yaml.d.ts.map +0 -1
  938. package/dist/src/utils/yaml.js +0 -33
  939. package/dist/src/utils/yaml.js.map +0 -1
  940. package/esbuild.js +0 -15
  941. package/src/.eslintrc.js +0 -5
  942. package/src/commands/migrations/MigrationValidationHelper.ts +0 -36
  943. package/src/commands/migrations/SystemApiClientResolver.ts +0 -22
  944. package/src/commands/project/ProjectGenerateDocumentation.ts +0 -49
  945. package/src/commands/tenant/CreateApiKeyCommand.ts +0 -40
  946. package/src/commands/tenant/InviteCommand.ts +0 -38
  947. package/src/commands/tenant/ResetPasswordCommand.ts +0 -36
  948. package/src/commands/tenant/SignInCommand.ts +0 -38
  949. package/src/commands/tenant/index.ts +0 -4
  950. package/src/utils/admin.ts +0 -45
  951. package/src/utils/checkVersions.ts +0 -58
  952. package/src/utils/dockerCompose.ts +0 -58
  953. package/src/utils/dsn.ts +0 -13
  954. package/src/utils/esbuild.ts +0 -14
  955. package/src/utils/instance/environment.ts +0 -4
  956. package/src/utils/instance/index.ts +0 -2
  957. package/src/utils/instance/interactiveUtils.ts +0 -39
  958. package/src/utils/migrations/MigrationCreateHelper.ts +0 -59
  959. package/src/utils/migrations/MigrationExecuteHelper.ts +0 -115
  960. package/src/utils/migrations/MigrationsContainer.ts +0 -80
  961. package/src/utils/migrations/migrations.ts +0 -80
  962. package/src/utils/project/components/EntityInfo.tsx +0 -82
  963. package/src/utils/project/components/OnDelete.tsx +0 -72
  964. package/src/utils/project/components/ProjectInfo.tsx +0 -48
  965. package/src/utils/project/loadSchema.ts +0 -14
  966. package/src/utils/project/projectDescribe.tsx +0 -26
  967. package/src/utils/schema.ts +0 -19
  968. package/src/utils/tenant.ts +0 -434
  969. package/src/utils/tuple.ts +0 -1
  970. package/src/utils/workspace.ts +0 -21
  971. package/src/utils/yaml.ts +0 -36
  972. /package/dist/{src → types}/commands/deploy/index.d.ts +0 -0
  973. /package/dist/{src → types}/commands/deploy/index.d.ts.map +0 -0
  974. /package/dist/{src → types}/commands/migrations/index.d.ts +0 -0
  975. /package/dist/{src → types}/commands/migrations/index.d.ts.map +0 -0
  976. /package/dist/{src → types}/commands/misc/index.d.ts +0 -0
  977. /package/dist/{src → types}/commands/misc/index.d.ts.map +0 -0
  978. /package/dist/{src → types}/commands/transfer/index.d.ts +0 -0
  979. /package/dist/{src → types}/commands/transfer/index.d.ts.map +0 -0
  980. /package/dist/{src → types}/commands/workspace/index.d.ts +0 -0
  981. /package/dist/{src → types}/commands/workspace/index.d.ts.map +0 -0
  982. /package/dist/{src/utils → types/lib}/assertNever.d.ts +0 -0
  983. /package/dist/{src/utils → types/lib}/dsn.d.ts +0 -0
  984. /package/dist/{src/utils/project → types/lib/project/docs}/components/EntityLink.d.ts +0 -0
  985. /package/dist/{src/utils/project → types/lib/project/docs}/components/FieldType.d.ts +0 -0
  986. /package/dist/{src/utils/project → types/lib/project/docs}/components/ProjectInfo.d.ts +0 -0
  987. /package/dist/{src/utils/project → types/lib/project/docs}/components/utils.d.ts +0 -0
  988. /package/dist/{src/utils/project → types/lib/project/docs}/projectDescribe.d.ts +0 -0
  989. /package/dist/{src/utils → types/lib}/schema/collectReferences.d.ts +0 -0
  990. /package/dist/{src/utils → types/lib/transfer}/stdio.d.ts +0 -0
  991. /package/dist/{src → types}/run.d.ts +0 -0
  992. /package/dist/{src → types}/run.d.ts.map +0 -0
  993. /package/src/{utils → lib}/assertNever.ts +0 -0
  994. /package/src/{utils/token.ts → lib/maskToken.ts} +0 -0
  995. /package/src/{utils/project → lib/project/docs}/components/EntityLink.tsx +0 -0
  996. /package/src/{utils/project → lib/project/docs}/components/FieldLink.tsx +0 -0
  997. /package/src/{utils/project → lib/project/docs}/components/FieldPermissions.tsx +0 -0
  998. /package/src/{utils/project → lib/project/docs}/components/FieldType.tsx +0 -0
  999. /package/src/{utils/project → lib/project/docs}/components/SinglePermission.tsx +0 -0
  1000. /package/src/{utils/project → lib/project/docs}/components/utils.ts +0 -0
  1001. /package/src/{utils/project → lib/project/docs}/resources/style.css +0 -0
  1002. /package/src/{utils → lib}/schema/collectReferences.ts +0 -0
  1003. /package/src/{utils → lib}/stream.ts +0 -0
  1004. /package/src/{utils → lib/transfer}/stdio.ts +0 -0
@@ -1,78 +1,57 @@
1
- import { Command, CommandConfiguration, Input, validateProjectName, Workspace } from '@contember/cli-common'
2
- import { MigrationsContainerFactory } from '../../utils/migrations/MigrationsContainer'
3
- import { validateSchemaAndPrintErrors } from '../../utils/schema'
1
+ import { Command, CommandConfiguration } from '@contember/cli-common'
4
2
  import { emptySchema } from '@contember/schema-utils'
5
- import { validateMigrations } from '../migrations/MigrationValidationHelper'
6
- import { loadSchema } from '../../utils/project/loadSchema'
3
+ import { SchemaLoader } from '../../lib/schema/SchemaLoader'
4
+ import { validateSchemaAndPrintErrors } from '../../lib/schema/SchemaValidationHelper'
5
+ import { MigrationsValidator } from '../../lib/migrations/MigrationsValidator'
6
+ import { MigrationsResolver, SchemaVersionBuilder } from '@contember/migrations-client'
7
+ import { SchemaDiffer } from '@contember/schema-migrations'
7
8
 
8
- type Args = {
9
- project?: string
10
- }
9
+ type Args = {}
11
10
 
12
11
  type Options = {}
13
12
 
14
13
  export class ProjectValidateCommand extends Command<Args, Options> {
15
14
  constructor(
16
- private readonly workspace: Workspace,
15
+ private readonly schemaLoader: SchemaLoader,
16
+ private readonly migrationValidator: MigrationsValidator,
17
+ private readonly migrationsResolver: MigrationsResolver,
18
+ private readonly schemaDiffer: SchemaDiffer,
19
+ private readonly schemaVersionBuilder: SchemaVersionBuilder,
17
20
  ) {
18
21
  super()
19
22
  }
20
23
 
21
24
  protected configure(configuration: CommandConfiguration<Args, Options>): void {
22
25
  configuration.description('Validates project schema')
23
- if (!this.workspace.isSingleProjectMode()) {
24
- configuration.argument('project')
25
- }
26
26
  }
27
27
 
28
- protected async execute(input: Input<Args, Options>): Promise<number> {
29
- const [projectName] = [input.getArgument('project')]
30
- const workspace = this.workspace
28
+ protected async execute(): Promise<number> {
29
+ let projectValid = true
31
30
 
32
- const allProjects = projectName === '.'
33
- const projects = allProjects
34
- ? await workspace.projects.listProjects()
35
- : [await workspace.projects.getProject(projectName, { fuzzy: true })]
36
- let valid = true
37
- const invalidProjects = []
38
- for (const project of projects) {
39
- console.group(`Project ${project.name}:`)
40
- const migrationsDir = await project.migrationsDir
41
- const container = new MigrationsContainerFactory(migrationsDir).create()
42
- const migrations = await container.migrationsResolver.getSchemaMigrations()
43
- let projectValid = await validateMigrations(
44
- emptySchema,
45
- migrations,
46
- container.migrationDescriber,
47
- container.schemaMigrator,
48
- )
49
- const schema = await loadSchema(project)
50
- projectValid = validateSchemaAndPrintErrors(schema, 'Defined schema is invalid:') && projectValid
31
+ const migrations = await this.migrationsResolver.getSchemaMigrations()
32
+ projectValid = this.migrationValidator.validate(emptySchema, migrations)
33
+ && projectValid
51
34
 
52
- const builtSchema = await container.schemaVersionBuilder.buildSchema()
53
- projectValid =
54
- validateSchemaAndPrintErrors(builtSchema, 'Schema built from migrations is invalid:') && projectValid
35
+ const schema = await this.schemaLoader.loadSchema()
36
+ projectValid = validateSchemaAndPrintErrors(schema, 'Defined schema is invalid:')
37
+ && projectValid
55
38
 
56
- if (projectValid) {
57
- const diff = await container.schemaDiffer.diffSchemas(builtSchema, schema)
58
- if (diff.length > 0) {
59
- console.log('Migrations are not in sync with a defined schema')
60
- projectValid = false
61
- }
62
- }
39
+ const builtSchema = await this.schemaVersionBuilder.buildSchema()
40
+ projectValid = validateSchemaAndPrintErrors(builtSchema, 'Schema built from migrations is invalid:')
41
+ && projectValid
63
42
 
64
- if (projectValid) {
65
- console.log('Project schema is valid')
66
- } else {
67
- invalidProjects.push(project.name)
43
+ if (projectValid) {
44
+ const diff = await this.schemaDiffer.diffSchemas(builtSchema, schema)
45
+ if (diff.length > 0) {
46
+ console.log('Migrations are not in sync with a defined schema')
47
+ projectValid = false
68
48
  }
69
- console.groupEnd()
70
- valid = valid && projectValid
71
49
  }
72
- if (invalidProjects.length) {
73
- console.log('Following projects failed the validation:')
74
- invalidProjects.forEach(it => console.log(it))
50
+
51
+ if (projectValid) {
52
+ console.log('Project schema is valid')
75
53
  }
76
- return valid ? 0 : 1
54
+
55
+ return projectValid ? 0 : 1
77
56
  }
78
57
  }
@@ -1,3 +1,3 @@
1
- export * from './ProjectGenerateDocumentation'
1
+ export * from './ProjectGenerateDocumentationCommand'
2
2
  export * from './ProjectPrintSchemaCommand'
3
3
  export * from './ProjectValidateCommand'
@@ -1,10 +1,11 @@
1
- import { Command, CommandConfiguration, Input, Workspace } from '@contember/cli-common'
1
+ import { Command, CommandConfiguration, Input } from '@contember/cli-common'
2
2
  import { createWriteStream } from 'node:fs'
3
- import { dataExport, resolveProject } from './utils'
4
- import { maskToken } from '../../utils/token'
3
+ import { maskToken } from '../../lib/maskToken'
5
4
  import { pipeline } from 'node:stream/promises'
6
- import { printProgressLine } from '../../utils/stdio'
5
+ import { printProgressLine } from '../../lib/transfer/stdio'
7
6
  import { createGunzip, createGzip } from 'node:zlib'
7
+ import { RemoteProjectResolver } from '../../lib/project/RemoteProjectResolver'
8
+ import { DataTransferClient } from '../../lib/transfer/DataTransferClient'
8
9
 
9
10
  type Args = {
10
11
  source?: string
@@ -20,17 +21,15 @@ type Options = {
20
21
 
21
22
  export class ExportCommand extends Command<Args, Options> {
22
23
  constructor(
23
- private readonly workspace: Workspace,
24
+ private readonly remoteProjectResolver: RemoteProjectResolver,
25
+ private readonly dataTransferClient: DataTransferClient,
24
26
  ) {
25
27
  super()
26
28
  }
27
29
 
28
30
  protected configure(configuration: CommandConfiguration<Args, Options>): void {
29
31
  configuration.description('Export data from a project')
30
- const from = configuration.argument('source')
31
- if (this.workspace.isSingleProjectMode()) {
32
- from.optional()
33
- }
32
+ configuration.argument('source').optional()
34
33
  configuration.option('include-system').valueNone()
35
34
  configuration.option('no-gzip').valueNone().deprecated()
36
35
  configuration.option('no-gzip-transfer').valueNone()
@@ -40,13 +39,16 @@ export class ExportCommand extends Command<Args, Options> {
40
39
 
41
40
  protected async execute(input: Input<Args, Options>): Promise<void | number> {
42
41
  const from = input.getArgument('source')
43
- const project = await resolveProject({ workspace: this.workspace, projectOrDsn: from })
42
+ const project = await this.remoteProjectResolver.resolve(from)
43
+ if (!project) {
44
+ throw `Project not defined`
45
+ }
44
46
 
45
47
  console.log('')
46
48
  console.log('Exporting data from a following project')
47
49
  console.log('')
48
- console.log(`Project name: ${project.project}`)
49
- console.log(`API URL: ${project.baseUrl}`)
50
+ console.log(`Project name: ${project.name}`)
51
+ console.log(`API URL: ${project.endpoint}`)
50
52
  console.log(`Token: ${maskToken(project.token)}`)
51
53
 
52
54
  const gzipOutput = !input.getOption('no-gzip-output') && !input.getOption('no-gzip')
@@ -54,7 +56,7 @@ export class ExportCommand extends Command<Args, Options> {
54
56
 
55
57
  const includeSystem = input.getOption('include-system') === true
56
58
 
57
- const response = await dataExport({
59
+ const response = await this.dataTransferClient.dataExport({
58
60
  project,
59
61
  includeSystem,
60
62
  gzip: gzipTransfer,
@@ -74,7 +76,7 @@ export class ExportCommand extends Command<Args, Options> {
74
76
  }
75
77
  })
76
78
 
77
- const fileName = input.getOption('output') ?? `${project.project}.jsonl${gzipOutput ? '.gz' : ''}`
79
+ const fileName = input.getOption('output') ?? `${project.name}.jsonl${gzipOutput ? '.gz' : ''}`
78
80
  const fileStream = createWriteStream(fileName)
79
81
 
80
82
  const responseStream = gzipOutput === gzipTransfer
@@ -1,10 +1,12 @@
1
- import { Command, CommandConfiguration, Input, Workspace } from '@contember/cli-common'
1
+ import { Command, CommandConfiguration, Input } from '@contember/cli-common'
2
2
  import { createReadStream } from 'node:fs'
3
3
  import { createGunzip } from 'node:zlib'
4
- import { confirmImport, dataImport, resolveProject } from './utils'
5
- import { maskToken } from '../../utils/token'
6
- import { printProgressLine } from '../../utils/stdio'
7
- import { readStream } from '../../utils/stream'
4
+ import { confirmImport } from './utils'
5
+ import { maskToken } from '../../lib/maskToken'
6
+ import { printProgressLine } from '../../lib/transfer/stdio'
7
+ import { readStream } from '../../lib/stream'
8
+ import { RemoteProjectResolver } from '../../lib/project/RemoteProjectResolver'
9
+ import { DataTransferClient } from '../../lib/transfer/DataTransferClient'
8
10
 
9
11
  type Args = {
10
12
  file: string
@@ -17,7 +19,8 @@ type Options = {
17
19
 
18
20
  export class ImportCommand extends Command<Args, Options> {
19
21
  constructor(
20
- private readonly workspace: Workspace,
22
+ private readonly remoteProjectResolver: RemoteProjectResolver,
23
+ private readonly dataTransferClient: DataTransferClient,
21
24
  ) {
22
25
  super()
23
26
  }
@@ -25,22 +28,22 @@ export class ImportCommand extends Command<Args, Options> {
25
28
  protected configure(configuration: CommandConfiguration<Args, Options>): void {
26
29
  configuration.description('Import data into a project')
27
30
  configuration.argument('file')
28
- const from = configuration.argument('target')
29
- if (this.workspace.isSingleProjectMode()) {
30
- from.optional()
31
- }
31
+ configuration.argument('target').optional()
32
32
  configuration.option('no-gzip-transfer').valueNone()
33
33
  configuration.option('yes').valueNone()
34
34
  }
35
35
 
36
36
  protected async execute(input: Input<Args, Options>): Promise<void | number> {
37
- const from = input.getArgument('target')
38
- const project = await resolveProject({ projectOrDsn: from, workspace: this.workspace })
37
+ const target = input.getArgument('target')
38
+ const project = await this.remoteProjectResolver.resolve(target)
39
+ if (!project) {
40
+ throw `Target project not defined`
41
+ }
39
42
  console.log('')
40
43
  console.log('Importing data into a following project')
41
44
  console.log('')
42
- console.log(`Project name: ${project.project}`)
43
- console.log(`API URL: ${project.baseUrl}`)
45
+ console.log(`Project name: ${project.name}`)
46
+ console.log(`API URL: ${project.endpoint}`)
44
47
  console.log(`Token: ${maskToken(project.token)}`)
45
48
  console.log('')
46
49
  if (!await confirmImport(input)) {
@@ -50,7 +53,7 @@ export class ImportCommand extends Command<Args, Options> {
50
53
  const baseInputStream = createReadStream(file)
51
54
  const stream = (file.endsWith('.gz') ? baseInputStream.pipe(createGunzip()) : baseInputStream)
52
55
  const gzipTransfer = !input.getOption('no-gzip-transfer')
53
- const response = await dataImport({
56
+ const response = await this.dataTransferClient.dataImport({
54
57
  stream: stream,
55
58
  project,
56
59
  printProgress: printProgressLine,
@@ -1,9 +1,11 @@
1
- import { Command, CommandConfiguration, Input, Workspace } from '@contember/cli-common'
2
- import { confirmImport, dataExport, dataImport, resolveProject } from './utils'
3
- import { maskToken } from '../../utils/token'
4
- import { printProgressLine } from '../../utils/stdio'
5
- import { readStream } from '../../utils/stream'
1
+ import { Command, CommandConfiguration, Input } from '@contember/cli-common'
2
+ import { confirmImport } from './utils'
3
+ import { maskToken } from '../../lib/maskToken'
4
+ import { printProgressLine } from '../../lib/transfer/stdio'
5
+ import { readStream } from '../../lib/stream'
6
6
  import { createGunzip } from 'node:zlib'
7
+ import { RemoteProjectResolver } from '../../lib/project/RemoteProjectResolver'
8
+ import { DataTransferClient } from '../../lib/transfer/DataTransferClient'
7
9
 
8
10
  type Args = {
9
11
  source: string
@@ -17,7 +19,8 @@ type Options = {
17
19
 
18
20
  export class TransferCommand extends Command<Args, Options> {
19
21
  constructor(
20
- private readonly workspace: Workspace,
22
+ private readonly remoteProjectResolver: RemoteProjectResolver,
23
+ private readonly dataTransferClient: DataTransferClient,
21
24
  ) {
22
25
  super()
23
26
  }
@@ -25,10 +28,7 @@ export class TransferCommand extends Command<Args, Options> {
25
28
  protected configure(configuration: CommandConfiguration<Args, Options>): void {
26
29
  configuration.description('Transfer data between projects')
27
30
  configuration.argument('source')
28
- const target = configuration.argument('target')
29
- if (this.workspace.isSingleProjectMode()) {
30
- target.optional()
31
- }
31
+ configuration.argument('target').optional()
32
32
  configuration.option('include-system').valueNone()
33
33
  configuration.option('no-gzip-transfer').valueNone()
34
34
  configuration.option('yes').valueNone()
@@ -36,20 +36,27 @@ export class TransferCommand extends Command<Args, Options> {
36
36
 
37
37
  protected async execute(input: Input<Args, Options>): Promise<void | number> {
38
38
  const source = input.getArgument('source')
39
- const sourceProject = await resolveProject({ projectOrDsn: source, workspace: this.workspace })
39
+ const sourceProject = await this.remoteProjectResolver.resolve(source)
40
+ if (!sourceProject) {
41
+ throw `Source project not defined`
42
+ }
40
43
 
41
44
  const target = input.getArgument('target')
42
- const targetProject = await resolveProject({ projectOrDsn: target, workspace: this.workspace })
45
+ const targetProject = await this.remoteProjectResolver.resolve(target)
46
+ if (!targetProject) {
47
+ throw `Target project not defined`
48
+ }
49
+
43
50
 
44
51
  console.log('')
45
52
  console.log('Transferring data between projects:')
46
53
  console.log('')
47
- console.log(`Source project name: ${sourceProject.project}`)
48
- console.log(`Source API URL: ${sourceProject.baseUrl}`)
54
+ console.log(`Source project name: ${sourceProject.name}`)
55
+ console.log(`Source API URL: ${sourceProject.endpoint}`)
49
56
  console.log(`Source token: ${maskToken(sourceProject.token)}`)
50
57
  console.log('')
51
- console.log(`Target project name: ${targetProject.project}`)
52
- console.log(`Target API URL: ${targetProject.baseUrl}`)
58
+ console.log(`Target project name: ${targetProject.name}`)
59
+ console.log(`Target API URL: ${targetProject.endpoint}`)
53
60
  console.log(`Target token: ${maskToken(targetProject.token)}`)
54
61
  console.log('')
55
62
  if (!await confirmImport(input)) {
@@ -58,9 +65,13 @@ export class TransferCommand extends Command<Args, Options> {
58
65
 
59
66
  const includeSystem = input.getOption('include-system') === true
60
67
  const gzipTransfer = !input.getOption('no-gzip-transfer')
61
- const exportResponse = (await dataExport({ project: sourceProject, includeSystem, gzip: gzipTransfer }))
68
+ const exportResponse = (await this.dataTransferClient.dataExport({
69
+ project: sourceProject,
70
+ includeSystem,
71
+ gzip: gzipTransfer,
72
+ }))
62
73
  const ungzipedResponse = gzipTransfer ? exportResponse.pipe(createGunzip()) : exportResponse
63
- const importResponse = await dataImport({
74
+ const importResponse = await this.dataTransferClient.dataImport({
64
75
  stream: ungzipedResponse,
65
76
  project: targetProject,
66
77
  printProgress: printProgressLine,
@@ -1,122 +1,6 @@
1
- import { Readable, Stream } from 'node:stream'
2
- import { LineTransform, readStream } from '../../utils/stream'
3
- import https from 'node:https'
4
- import http from 'node:http'
5
- import { Input, Workspace } from '@contember/cli-common'
6
- import { parseDsn } from '../../utils/dsn'
7
- import { interactiveResolveInstanceEnvironmentFromInput } from '../../utils/instance'
8
- import { interactiveResolveApiToken } from '../../utils/tenant'
1
+ import { Input } from '@contember/cli-common'
9
2
  import prompts from 'prompts'
10
- import { createGzip } from 'node:zlib'
11
3
 
12
- export type ProjectEndpoint = {
13
- token: string
14
- project: string
15
- baseUrl: string
16
- }
17
-
18
- export const resolveProject = async ({ projectOrDsn, workspace }: { projectOrDsn?: string; workspace: Workspace }): Promise<ProjectEndpoint> => {
19
- let endpoint: string | undefined = undefined
20
- let token: string | undefined = undefined
21
- let project: string | undefined
22
- if (projectOrDsn?.includes('://')) {
23
- ({ endpoint, project, token } = parseDsn(projectOrDsn))
24
- } else if (projectOrDsn !== undefined && projectOrDsn !== '.') {
25
- project = projectOrDsn
26
- }
27
- const instance = await interactiveResolveInstanceEnvironmentFromInput(workspace, endpoint)
28
- token ??= await interactiveResolveApiToken({ workspace, instance })
29
- project ??= (await workspace.projects.getSingleProject()).name
30
- return { project, token, baseUrl: instance.baseUrl }
31
-
32
- }
33
-
34
- export const dataImport = async ({ printProgress, stream, project: { project, token, baseUrl }, gzip }: { stream: Readable; project: ProjectEndpoint; printProgress: (message: string) => void; gzip: boolean }) => {
35
- let table = ''
36
- let rowCount = 0
37
- let rowTotal = 0
38
- let transferred = 0
39
- let start = Date.now()
40
- const inputStream = stream.pipe(new LineTransform(line => {
41
- transferred += line.length + 1
42
- if (line === '') {
43
- return ''
44
- }
45
- const data = JSON.parse(line)
46
- switch (data[0]) {
47
- case 'importSystemSchemaBegin':
48
- return JSON.stringify([data[0], { ...data[1], project }])
49
- case 'importContentSchemaBegin':
50
- return JSON.stringify([data[0], { ...data[1], project }])
51
- case 'insertBegin':
52
- table = data[1].table
53
- rowCount = 0
54
- break
55
- case 'insertRow':
56
- rowCount++
57
- rowTotal++
58
- break
59
- case 'insertEnd':
60
- break
61
- }
62
- if ((rowCount % 1000) === 0 || data[0] !== 'insertRow') {
63
- const mbs = Math.floor(transferred / 1024 / 1024).toString()
64
- const durationS = Math.floor((Date.now() - start) / 1000)
65
- printProgress(`transferred ${mbs} MiB; inserted ${rowCount} ${table} rows, ${rowTotal} total; ${durationS} seconds`)
66
- }
67
- return line
68
- }))
69
-
70
- return await executeRequest({
71
- url: `${baseUrl}/import`,
72
- token,
73
- headers: {
74
- 'Content-type': 'application/x-ndjson',
75
- ...(gzip ? { 'Content-Encoding': 'gzip' } : {}),
76
- },
77
- body: gzip ? inputStream.pipe(createGzip()) : inputStream,
78
- })
79
- }
80
-
81
- export const dataExport = async ({ project: { project, token, baseUrl }, gzip, includeSystem }: { project: ProjectEndpoint; includeSystem: boolean; gzip: boolean }) => {
82
- return await executeRequest({
83
- url: `${baseUrl}/export`,
84
- token,
85
- headers: {
86
- 'Accept-Encoding': gzip ? 'gzip' : 'identity',
87
- 'Content-type': 'application/json',
88
- },
89
- body: JSON.stringify({
90
- projects: [{ slug: project, system: includeSystem }],
91
- }),
92
- })
93
- }
94
-
95
- const executeRequest = async ({ url, token, headers, body }: { url: string; token: string; headers: Record<string, string >; body: any }) => {
96
- return await new Promise<http.IncomingMessage>((resolve, reject) => {
97
- const req = (url.startsWith('https://') ? https : http).request(url, {
98
- method: 'POST',
99
- headers: {
100
- Authorization: `Bearer ${token}`,
101
- ...headers,
102
- },
103
- }, async res => {
104
- if (res.statusCode !== 200) {
105
- const responseBody = (await readStream(res)).toString()
106
- reject(new Error(`Invalid response: ${res.statusMessage}\n${responseBody}`))
107
- } else {
108
- resolve(res)
109
- }
110
- })
111
-
112
- if (body instanceof Stream) {
113
- body.pipe(req)
114
- } else {
115
- req.write(body)
116
- req.end()
117
- }
118
- })
119
- }
120
4
 
121
5
  export const confirmImport = async (input: Input<{}, { yes: boolean }>): Promise<boolean> => {
122
6
  if (input.getOption('yes')) {
@@ -1,6 +1,6 @@
1
- import { Command, CommandConfiguration, Input, Workspace } from '@contember/cli-common'
2
- import { updateWorkspaceApiVersion } from '../../utils/workspace'
3
- import { contemberDockerImages, updateMainDockerComposeConfig } from '../../utils/dockerCompose'
1
+ import { Command, CommandConfiguration, Input, PackageWorkspaceResolver } from '@contember/cli-common'
2
+ import { DockerComposeManager } from '../../lib/fs/DockerComposeManager'
3
+ import { contemberDockerImages } from '../../consts'
4
4
 
5
5
  type Args = {
6
6
  version: string
@@ -10,7 +10,8 @@ type Options = {}
10
10
 
11
11
  export class WorkspaceUpdateApiCommand extends Command<Args, Options> {
12
12
  constructor(
13
- private readonly workspace: Workspace,
13
+ private readonly packageWorkspaceResolver: PackageWorkspaceResolver,
14
+ private readonly dockerComposeManager: DockerComposeManager,
14
15
  ) {
15
16
  super()
16
17
  }
@@ -22,8 +23,7 @@ export class WorkspaceUpdateApiCommand extends Command<Args, Options> {
22
23
 
23
24
  protected async execute(input: Input<Args, Options>): Promise<void> {
24
25
  const version = input.getArgument('version')
25
- const workspace = this.workspace
26
- const packageWorkspace = await workspace.resolvePackageWorkspace()
26
+ const packageWorkspace = await this.packageWorkspaceResolver.resolve()
27
27
 
28
28
  await packageWorkspace.updateEverywhere({
29
29
  '@contember/schema': version,
@@ -31,24 +31,16 @@ export class WorkspaceUpdateApiCommand extends Command<Args, Options> {
31
31
  '@contember/cli': version,
32
32
  })
33
33
 
34
- const updatedYaml = await updateWorkspaceApiVersion(workspace, version)
35
-
36
- if (updatedYaml) {
37
- console.log(`${updatedYaml} updated`)
38
- } else {
39
- console.log('contember.yaml not found, skipping')
40
- }
41
-
42
34
  console.log('Updating docker-compose')
43
35
  const getNewImage = (currentImage: string): string | null => {
44
36
  for (const candidate of contemberDockerImages) {
45
37
  if (currentImage.startsWith(`${candidate}:`)) {
46
- return `${candidate}:${version}`
38
+ return `${candidate.replace(/-ee$/, '')}:${version}`
47
39
  }
48
40
  }
49
41
  return null
50
42
  }
51
- await updateMainDockerComposeConfig(workspace.directory, data => ({
43
+ await this.dockerComposeManager.updateMainDockerComposeConfig(data => ({
52
44
  ...data,
53
45
  services: Object.fromEntries(Object.entries(data?.services ?? {}).map(([name, service]: [string, any]) => {
54
46
  const newImage = getNewImage(service.image)
package/src/consts.ts ADDED
@@ -0,0 +1,5 @@
1
+ import { join } from 'node:path'
2
+ import { dirname } from 'node:path'
3
+ import { fileURLToPath } from 'node:url'
4
+ export const packageRoot = process.env.CONTEMBER_CLI_PACKAGE_ROOT || join(dirname(fileURLToPath(import.meta.url)), '../')
5
+ export const contemberDockerImages = ['contember/engine', 'contember/engine-ee', 'contember/cli']