@contember/cli 1.4.0-rc.8 → 2.0.0-alpha.8

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 (1001) hide show
  1. package/Dockerfile +1 -1
  2. package/dist/development/run.cjs +31 -0
  3. package/dist/development/run.cjs.map +1 -0
  4. package/dist/development/run.js +30 -0
  5. package/dist/development/run.js.map +1 -0
  6. package/dist/development/src/commands/deploy/DeployCommand.cjs +87 -0
  7. package/dist/development/src/commands/deploy/DeployCommand.cjs.map +1 -0
  8. package/dist/development/src/commands/deploy/DeployCommand.js +87 -0
  9. package/dist/development/src/commands/deploy/DeployCommand.js.map +1 -0
  10. package/dist/development/src/commands/migrations/MigrationAmendCommand.cjs +123 -0
  11. package/dist/development/src/commands/migrations/MigrationAmendCommand.cjs.map +1 -0
  12. package/dist/development/src/commands/migrations/MigrationAmendCommand.js +123 -0
  13. package/dist/development/src/commands/migrations/MigrationAmendCommand.js.map +1 -0
  14. package/dist/development/src/commands/migrations/MigrationBlankCommand.cjs +23 -0
  15. package/dist/development/src/commands/migrations/MigrationBlankCommand.cjs.map +1 -0
  16. package/dist/development/src/commands/migrations/MigrationBlankCommand.js +23 -0
  17. package/dist/development/src/commands/migrations/MigrationBlankCommand.js.map +1 -0
  18. package/dist/development/src/commands/migrations/MigrationDescribeCommand.cjs +30 -0
  19. package/dist/development/src/commands/migrations/MigrationDescribeCommand.cjs.map +1 -0
  20. package/dist/development/src/commands/migrations/MigrationDescribeCommand.js +30 -0
  21. package/dist/development/src/commands/migrations/MigrationDescribeCommand.js.map +1 -0
  22. package/dist/development/src/commands/migrations/MigrationDiffCommand.cjs +76 -0
  23. package/dist/development/src/commands/migrations/MigrationDiffCommand.cjs.map +1 -0
  24. package/dist/development/src/commands/migrations/MigrationDiffCommand.js +76 -0
  25. package/dist/development/src/commands/migrations/MigrationDiffCommand.js.map +1 -0
  26. package/dist/development/src/commands/migrations/MigrationExecuteCommand.cjs +26 -0
  27. package/dist/development/src/commands/migrations/MigrationExecuteCommand.cjs.map +1 -0
  28. package/dist/development/src/commands/migrations/MigrationExecuteCommand.js +26 -0
  29. package/dist/development/src/commands/migrations/MigrationExecuteCommand.js.map +1 -0
  30. package/dist/development/src/commands/migrations/MigrationRebaseCommand.cjs +31 -0
  31. package/dist/development/src/commands/migrations/MigrationRebaseCommand.cjs.map +1 -0
  32. package/dist/development/src/commands/migrations/MigrationRebaseCommand.js +31 -0
  33. package/dist/development/src/commands/migrations/MigrationRebaseCommand.js.map +1 -0
  34. package/dist/development/src/commands/migrations/MigrationStatusCommand.cjs +57 -0
  35. package/dist/development/src/commands/migrations/MigrationStatusCommand.cjs.map +1 -0
  36. package/dist/development/src/commands/migrations/MigrationStatusCommand.js +57 -0
  37. package/dist/development/src/commands/migrations/MigrationStatusCommand.js.map +1 -0
  38. package/dist/development/src/commands/misc/VersionCommand.cjs +18 -0
  39. package/dist/development/src/commands/misc/VersionCommand.cjs.map +1 -0
  40. package/dist/development/src/commands/misc/VersionCommand.js +18 -0
  41. package/dist/development/src/commands/misc/VersionCommand.js.map +1 -0
  42. package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.cjs +36 -0
  43. package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.cjs.map +1 -0
  44. package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.js +36 -0
  45. package/dist/development/src/commands/project/ProjectGenerateDocumentationCommand.js.map +1 -0
  46. package/dist/development/src/commands/project/ProjectPrintSchemaCommand.cjs +69 -0
  47. package/dist/development/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -0
  48. package/dist/development/src/commands/project/ProjectPrintSchemaCommand.js +69 -0
  49. package/dist/development/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -0
  50. package/dist/development/src/commands/project/ProjectValidateCommand.cjs +40 -0
  51. package/dist/development/src/commands/project/ProjectValidateCommand.cjs.map +1 -0
  52. package/dist/development/src/commands/project/ProjectValidateCommand.js +40 -0
  53. package/dist/development/src/commands/project/ProjectValidateCommand.js.map +1 -0
  54. package/dist/development/src/commands/transfer/ExportCommand.cjs +66 -0
  55. package/dist/development/src/commands/transfer/ExportCommand.cjs.map +1 -0
  56. package/dist/development/src/commands/transfer/ExportCommand.js +66 -0
  57. package/dist/development/src/commands/transfer/ExportCommand.js.map +1 -0
  58. package/dist/development/src/commands/transfer/ImportCommand.cjs +60 -0
  59. package/dist/development/src/commands/transfer/ImportCommand.cjs.map +1 -0
  60. package/dist/development/src/commands/transfer/ImportCommand.js +60 -0
  61. package/dist/development/src/commands/transfer/ImportCommand.js.map +1 -0
  62. package/dist/development/src/commands/transfer/TransferCommand.cjs +73 -0
  63. package/dist/development/src/commands/transfer/TransferCommand.cjs.map +1 -0
  64. package/dist/development/src/commands/transfer/TransferCommand.js +73 -0
  65. package/dist/development/src/commands/transfer/TransferCommand.js.map +1 -0
  66. package/dist/development/src/commands/transfer/utils.cjs +22 -0
  67. package/dist/development/src/commands/transfer/utils.cjs.map +1 -0
  68. package/dist/development/src/commands/transfer/utils.js +22 -0
  69. package/dist/development/src/commands/transfer/utils.js.map +1 -0
  70. package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.cjs +54 -0
  71. package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.cjs.map +1 -0
  72. package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.js +54 -0
  73. package/dist/development/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +1 -0
  74. package/dist/development/src/consts.cjs +10 -0
  75. package/dist/development/src/consts.cjs.map +1 -0
  76. package/dist/development/src/consts.js +9 -0
  77. package/dist/development/src/consts.js.map +1 -0
  78. package/dist/development/src/dic.cjs +116 -0
  79. package/dist/development/src/dic.cjs.map +1 -0
  80. package/dist/development/src/dic.js +116 -0
  81. package/dist/development/src/dic.js.map +1 -0
  82. package/dist/development/src/lib/SystemClientProvider.cjs +14 -0
  83. package/dist/development/src/lib/SystemClientProvider.cjs.map +1 -0
  84. package/dist/development/src/lib/SystemClientProvider.js +14 -0
  85. package/dist/development/src/lib/SystemClientProvider.js.map +1 -0
  86. package/dist/development/src/lib/TenantClientProvider.cjs +14 -0
  87. package/dist/development/src/lib/TenantClientProvider.cjs.map +1 -0
  88. package/dist/development/src/lib/TenantClientProvider.js +14 -0
  89. package/dist/development/src/lib/TenantClientProvider.js.map +1 -0
  90. package/dist/development/src/lib/VersionChecker.cjs +85 -0
  91. package/dist/development/src/lib/VersionChecker.cjs.map +1 -0
  92. package/dist/development/src/lib/VersionChecker.js +68 -0
  93. package/dist/development/src/lib/VersionChecker.js.map +1 -0
  94. package/dist/development/src/lib/admin/AdminClient.cjs +30 -0
  95. package/dist/development/src/lib/admin/AdminClient.cjs.map +1 -0
  96. package/dist/development/src/lib/admin/AdminClient.js +30 -0
  97. package/dist/development/src/lib/admin/AdminClient.js.map +1 -0
  98. package/dist/development/src/lib/admin/AdminDeployer.cjs +36 -0
  99. package/dist/development/src/lib/admin/AdminDeployer.cjs.map +1 -0
  100. package/dist/development/src/lib/admin/AdminDeployer.js +36 -0
  101. package/dist/development/src/lib/admin/AdminDeployer.js.map +1 -0
  102. package/dist/development/src/lib/assertNever.cjs +7 -0
  103. package/dist/development/src/lib/assertNever.cjs.map +1 -0
  104. package/dist/development/src/lib/assertNever.js +7 -0
  105. package/dist/development/src/lib/assertNever.js.map +1 -0
  106. package/dist/development/src/lib/dsn.cjs +16 -0
  107. package/dist/development/src/lib/dsn.cjs.map +1 -0
  108. package/dist/development/src/lib/dsn.js +16 -0
  109. package/dist/development/src/lib/dsn.js.map +1 -0
  110. package/dist/development/src/lib/env.cjs +15 -0
  111. package/dist/development/src/lib/env.cjs.map +1 -0
  112. package/dist/development/src/lib/env.js +15 -0
  113. package/dist/development/src/lib/env.js.map +1 -0
  114. package/dist/development/src/lib/fs/DockerComposeManager.cjs +41 -0
  115. package/dist/development/src/lib/fs/DockerComposeManager.cjs.map +1 -0
  116. package/dist/development/src/lib/fs/DockerComposeManager.js +41 -0
  117. package/dist/development/src/lib/fs/DockerComposeManager.js.map +1 -0
  118. package/dist/development/src/lib/fs/FileSystem.cjs +43 -0
  119. package/dist/development/src/lib/fs/FileSystem.cjs.map +1 -0
  120. package/dist/development/src/lib/fs/FileSystem.js +27 -0
  121. package/dist/development/src/lib/fs/FileSystem.js.map +1 -0
  122. package/dist/development/src/lib/fs/YamlHandler.cjs +48 -0
  123. package/dist/development/src/lib/fs/YamlHandler.cjs.map +1 -0
  124. package/dist/development/src/lib/fs/YamlHandler.js +48 -0
  125. package/dist/development/src/lib/fs/YamlHandler.js.map +1 -0
  126. package/dist/development/src/lib/js/EsBuildBuilder.cjs +36 -0
  127. package/dist/development/src/lib/js/EsBuildBuilder.cjs.map +1 -0
  128. package/dist/development/src/lib/js/EsBuildBuilder.js +19 -0
  129. package/dist/development/src/lib/js/EsBuildBuilder.js.map +1 -0
  130. package/dist/development/src/lib/js/EvalExecutor.cjs +10 -0
  131. package/dist/development/src/lib/js/EvalExecutor.cjs.map +1 -0
  132. package/dist/development/src/lib/js/EvalExecutor.js +10 -0
  133. package/dist/development/src/lib/js/EvalExecutor.js.map +1 -0
  134. package/dist/development/src/lib/js/JsCodeRunner.cjs +17 -0
  135. package/dist/development/src/lib/js/JsCodeRunner.cjs.map +1 -0
  136. package/dist/development/src/lib/js/JsCodeRunner.js +17 -0
  137. package/dist/development/src/lib/js/JsCodeRunner.js.map +1 -0
  138. package/dist/development/src/lib/maskToken.cjs +5 -0
  139. package/dist/development/src/lib/maskToken.cjs.map +1 -0
  140. package/dist/development/src/lib/maskToken.js +5 -0
  141. package/dist/development/src/lib/maskToken.js.map +1 -0
  142. package/dist/development/src/lib/migrations/MigrationExecutionFacade.cjs +84 -0
  143. package/dist/development/src/lib/migrations/MigrationExecutionFacade.cjs.map +1 -0
  144. package/dist/development/src/lib/migrations/MigrationExecutionFacade.js +84 -0
  145. package/dist/development/src/lib/migrations/MigrationExecutionFacade.js.map +1 -0
  146. package/dist/development/src/lib/migrations/MigrationPrinter.cjs +82 -0
  147. package/dist/development/src/lib/migrations/MigrationPrinter.cjs.map +1 -0
  148. package/dist/development/src/lib/migrations/MigrationPrinter.js +82 -0
  149. package/dist/development/src/lib/migrations/MigrationPrinter.js.map +1 -0
  150. package/dist/development/src/lib/migrations/MigrationRebaseFacade.cjs +41 -0
  151. package/dist/development/src/lib/migrations/MigrationRebaseFacade.cjs.map +1 -0
  152. package/dist/development/src/lib/migrations/MigrationRebaseFacade.js +41 -0
  153. package/dist/development/src/lib/migrations/MigrationRebaseFacade.js.map +1 -0
  154. package/dist/development/src/lib/migrations/MigrationsStatusFacade.cjs +27 -0
  155. package/dist/development/src/lib/migrations/MigrationsStatusFacade.cjs.map +1 -0
  156. package/dist/development/src/lib/migrations/MigrationsStatusFacade.js +27 -0
  157. package/dist/development/src/lib/migrations/MigrationsStatusFacade.js.map +1 -0
  158. package/dist/development/src/lib/migrations/MigrationsValidator.cjs +38 -0
  159. package/dist/development/src/lib/migrations/MigrationsValidator.cjs.map +1 -0
  160. package/dist/development/src/lib/migrations/MigrationsValidator.js +38 -0
  161. package/dist/development/src/lib/migrations/MigrationsValidator.js.map +1 -0
  162. package/dist/development/src/lib/migrations/migrations.cjs +43 -0
  163. package/dist/development/src/lib/migrations/migrations.cjs.map +1 -0
  164. package/dist/development/src/lib/migrations/migrations.js +43 -0
  165. package/dist/development/src/lib/migrations/migrations.js.map +1 -0
  166. package/dist/development/src/lib/project/RemoteProject.cjs +12 -0
  167. package/dist/development/src/lib/project/RemoteProject.cjs.map +1 -0
  168. package/dist/development/src/lib/project/RemoteProject.js +12 -0
  169. package/dist/development/src/lib/project/RemoteProject.js.map +1 -0
  170. package/dist/development/src/lib/project/RemoteProjectProvider.cjs +21 -0
  171. package/dist/development/src/lib/project/RemoteProjectProvider.cjs.map +1 -0
  172. package/dist/development/src/lib/project/RemoteProjectProvider.js +21 -0
  173. package/dist/development/src/lib/project/RemoteProjectProvider.js.map +1 -0
  174. package/dist/development/src/lib/project/RemoteProjectResolver.cjs +29 -0
  175. package/dist/development/src/lib/project/RemoteProjectResolver.cjs.map +1 -0
  176. package/dist/development/src/lib/project/RemoteProjectResolver.js +29 -0
  177. package/dist/development/src/lib/project/RemoteProjectResolver.js.map +1 -0
  178. package/dist/development/src/lib/project/docs/components/EntityInfo.cjs +199 -0
  179. package/dist/development/src/lib/project/docs/components/EntityInfo.cjs.map +1 -0
  180. package/dist/development/src/lib/project/docs/components/EntityInfo.js +199 -0
  181. package/dist/development/src/lib/project/docs/components/EntityInfo.js.map +1 -0
  182. package/dist/development/src/lib/project/docs/components/EntityLink.cjs +11 -0
  183. package/dist/development/src/lib/project/docs/components/EntityLink.cjs.map +1 -0
  184. package/dist/development/src/lib/project/docs/components/EntityLink.js +11 -0
  185. package/dist/development/src/lib/project/docs/components/EntityLink.js.map +1 -0
  186. package/dist/development/src/lib/project/docs/components/FieldLink.cjs +31 -0
  187. package/dist/development/src/lib/project/docs/components/FieldLink.cjs.map +1 -0
  188. package/dist/development/src/lib/project/docs/components/FieldLink.js +31 -0
  189. package/dist/development/src/lib/project/docs/components/FieldLink.js.map +1 -0
  190. package/dist/development/src/lib/project/docs/components/FieldPermissions.cjs +33 -0
  191. package/dist/development/src/lib/project/docs/components/FieldPermissions.cjs.map +1 -0
  192. package/dist/development/src/lib/project/docs/components/FieldPermissions.js +33 -0
  193. package/dist/development/src/lib/project/docs/components/FieldPermissions.js.map +1 -0
  194. package/dist/development/src/lib/project/docs/components/FieldType.cjs +135 -0
  195. package/dist/development/src/lib/project/docs/components/FieldType.cjs.map +1 -0
  196. package/dist/development/src/lib/project/docs/components/FieldType.js +135 -0
  197. package/dist/development/src/lib/project/docs/components/FieldType.js.map +1 -0
  198. package/dist/development/src/lib/project/docs/components/OnDelete.cjs +134 -0
  199. package/dist/development/src/lib/project/docs/components/OnDelete.cjs.map +1 -0
  200. package/dist/development/src/lib/project/docs/components/OnDelete.js +134 -0
  201. package/dist/development/src/lib/project/docs/components/OnDelete.js.map +1 -0
  202. package/dist/development/src/lib/project/docs/components/ProjectInfo.cjs +96 -0
  203. package/dist/development/src/lib/project/docs/components/ProjectInfo.cjs.map +1 -0
  204. package/dist/development/src/lib/project/docs/components/ProjectInfo.js +96 -0
  205. package/dist/development/src/lib/project/docs/components/ProjectInfo.js.map +1 -0
  206. package/dist/development/src/lib/project/docs/components/SinglePermission.cjs +26 -0
  207. package/dist/development/src/lib/project/docs/components/SinglePermission.cjs.map +1 -0
  208. package/dist/development/src/lib/project/docs/components/SinglePermission.js +26 -0
  209. package/dist/development/src/lib/project/docs/components/SinglePermission.js.map +1 -0
  210. package/dist/development/src/lib/project/docs/components/utils.cjs +7 -0
  211. package/dist/development/src/lib/project/docs/components/utils.cjs.map +1 -0
  212. package/dist/development/src/lib/project/docs/components/utils.js +7 -0
  213. package/dist/development/src/lib/project/docs/components/utils.js.map +1 -0
  214. package/dist/development/src/lib/project/docs/projectDescribe.cjs +32 -0
  215. package/dist/development/src/lib/project/docs/projectDescribe.cjs.map +1 -0
  216. package/dist/development/src/lib/project/docs/projectDescribe.js +31 -0
  217. package/dist/development/src/lib/project/docs/projectDescribe.js.map +1 -0
  218. package/dist/development/src/lib/schema/SchemaLoader.cjs +49 -0
  219. package/dist/development/src/lib/schema/SchemaLoader.cjs.map +1 -0
  220. package/dist/development/src/lib/schema/SchemaLoader.js +32 -0
  221. package/dist/development/src/lib/schema/SchemaLoader.js.map +1 -0
  222. package/dist/development/src/lib/schema/SchemaValidationHelper.cjs +11 -0
  223. package/dist/development/src/lib/schema/SchemaValidationHelper.cjs.map +1 -0
  224. package/dist/development/src/lib/schema/SchemaValidationHelper.js +11 -0
  225. package/dist/development/src/lib/schema/SchemaValidationHelper.js.map +1 -0
  226. package/dist/development/src/lib/schema/SchemaValidationPrinter.cjs +14 -0
  227. package/dist/development/src/lib/schema/SchemaValidationPrinter.cjs.map +1 -0
  228. package/dist/development/src/lib/schema/SchemaValidationPrinter.js +14 -0
  229. package/dist/development/src/lib/schema/SchemaValidationPrinter.js.map +1 -0
  230. package/dist/development/src/lib/schema/collectReferences.cjs +34 -0
  231. package/dist/development/src/lib/schema/collectReferences.cjs.map +1 -0
  232. package/dist/development/src/lib/schema/collectReferences.js +34 -0
  233. package/dist/development/src/lib/schema/collectReferences.js.map +1 -0
  234. package/dist/development/src/lib/stream.cjs +43 -0
  235. package/dist/development/src/lib/stream.cjs.map +1 -0
  236. package/dist/development/src/lib/stream.js +43 -0
  237. package/dist/development/src/lib/stream.js.map +1 -0
  238. package/dist/development/src/lib/tenant/TenantClient.cjs +45 -0
  239. package/dist/development/src/lib/tenant/TenantClient.cjs.map +1 -0
  240. package/dist/development/src/lib/tenant/TenantClient.js +45 -0
  241. package/dist/development/src/lib/tenant/TenantClient.js.map +1 -0
  242. package/dist/development/src/lib/transfer/DataTransferClient.cjs +97 -0
  243. package/dist/development/src/lib/transfer/DataTransferClient.cjs.map +1 -0
  244. package/dist/development/src/lib/transfer/DataTransferClient.js +97 -0
  245. package/dist/development/src/lib/transfer/DataTransferClient.js.map +1 -0
  246. package/dist/development/src/lib/transfer/stdio.cjs +12 -0
  247. package/dist/development/src/lib/transfer/stdio.cjs.map +1 -0
  248. package/dist/development/src/lib/transfer/stdio.js +12 -0
  249. package/dist/development/src/lib/transfer/stdio.js.map +1 -0
  250. package/dist/development/src/lib/workspace/WorkspaceResolver.cjs +38 -0
  251. package/dist/development/src/lib/workspace/WorkspaceResolver.cjs.map +1 -0
  252. package/dist/development/src/lib/workspace/WorkspaceResolver.js +38 -0
  253. package/dist/development/src/lib/workspace/WorkspaceResolver.js.map +1 -0
  254. package/dist/production/run.cjs +31 -0
  255. package/dist/production/run.cjs.map +1 -0
  256. package/dist/production/run.js +30 -0
  257. package/dist/production/run.js.map +1 -0
  258. package/dist/production/src/commands/deploy/DeployCommand.cjs +87 -0
  259. package/dist/production/src/commands/deploy/DeployCommand.cjs.map +1 -0
  260. package/dist/production/src/commands/deploy/DeployCommand.js +87 -0
  261. package/dist/production/src/commands/deploy/DeployCommand.js.map +1 -0
  262. package/dist/production/src/commands/migrations/MigrationAmendCommand.cjs +123 -0
  263. package/dist/production/src/commands/migrations/MigrationAmendCommand.cjs.map +1 -0
  264. package/dist/production/src/commands/migrations/MigrationAmendCommand.js +123 -0
  265. package/dist/production/src/commands/migrations/MigrationAmendCommand.js.map +1 -0
  266. package/dist/production/src/commands/migrations/MigrationBlankCommand.cjs +23 -0
  267. package/dist/production/src/commands/migrations/MigrationBlankCommand.cjs.map +1 -0
  268. package/dist/production/src/commands/migrations/MigrationBlankCommand.js +23 -0
  269. package/dist/production/src/commands/migrations/MigrationBlankCommand.js.map +1 -0
  270. package/dist/production/src/commands/migrations/MigrationDescribeCommand.cjs +30 -0
  271. package/dist/production/src/commands/migrations/MigrationDescribeCommand.cjs.map +1 -0
  272. package/dist/production/src/commands/migrations/MigrationDescribeCommand.js +30 -0
  273. package/dist/production/src/commands/migrations/MigrationDescribeCommand.js.map +1 -0
  274. package/dist/production/src/commands/migrations/MigrationDiffCommand.cjs +76 -0
  275. package/dist/production/src/commands/migrations/MigrationDiffCommand.cjs.map +1 -0
  276. package/dist/production/src/commands/migrations/MigrationDiffCommand.js +76 -0
  277. package/dist/production/src/commands/migrations/MigrationDiffCommand.js.map +1 -0
  278. package/dist/production/src/commands/migrations/MigrationExecuteCommand.cjs +26 -0
  279. package/dist/production/src/commands/migrations/MigrationExecuteCommand.cjs.map +1 -0
  280. package/dist/production/src/commands/migrations/MigrationExecuteCommand.js +26 -0
  281. package/dist/production/src/commands/migrations/MigrationExecuteCommand.js.map +1 -0
  282. package/dist/production/src/commands/migrations/MigrationRebaseCommand.cjs +31 -0
  283. package/dist/production/src/commands/migrations/MigrationRebaseCommand.cjs.map +1 -0
  284. package/dist/production/src/commands/migrations/MigrationRebaseCommand.js +31 -0
  285. package/dist/production/src/commands/migrations/MigrationRebaseCommand.js.map +1 -0
  286. package/dist/production/src/commands/migrations/MigrationStatusCommand.cjs +57 -0
  287. package/dist/production/src/commands/migrations/MigrationStatusCommand.cjs.map +1 -0
  288. package/dist/production/src/commands/migrations/MigrationStatusCommand.js +57 -0
  289. package/dist/production/src/commands/migrations/MigrationStatusCommand.js.map +1 -0
  290. package/dist/production/src/commands/misc/VersionCommand.cjs +18 -0
  291. package/dist/production/src/commands/misc/VersionCommand.cjs.map +1 -0
  292. package/dist/production/src/commands/misc/VersionCommand.js +18 -0
  293. package/dist/production/src/commands/misc/VersionCommand.js.map +1 -0
  294. package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.cjs +36 -0
  295. package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.cjs.map +1 -0
  296. package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.js +36 -0
  297. package/dist/production/src/commands/project/ProjectGenerateDocumentationCommand.js.map +1 -0
  298. package/dist/production/src/commands/project/ProjectPrintSchemaCommand.cjs +69 -0
  299. package/dist/production/src/commands/project/ProjectPrintSchemaCommand.cjs.map +1 -0
  300. package/dist/production/src/commands/project/ProjectPrintSchemaCommand.js +69 -0
  301. package/dist/production/src/commands/project/ProjectPrintSchemaCommand.js.map +1 -0
  302. package/dist/production/src/commands/project/ProjectValidateCommand.cjs +40 -0
  303. package/dist/production/src/commands/project/ProjectValidateCommand.cjs.map +1 -0
  304. package/dist/production/src/commands/project/ProjectValidateCommand.js +40 -0
  305. package/dist/production/src/commands/project/ProjectValidateCommand.js.map +1 -0
  306. package/dist/production/src/commands/transfer/ExportCommand.cjs +66 -0
  307. package/dist/production/src/commands/transfer/ExportCommand.cjs.map +1 -0
  308. package/dist/production/src/commands/transfer/ExportCommand.js +66 -0
  309. package/dist/production/src/commands/transfer/ExportCommand.js.map +1 -0
  310. package/dist/production/src/commands/transfer/ImportCommand.cjs +60 -0
  311. package/dist/production/src/commands/transfer/ImportCommand.cjs.map +1 -0
  312. package/dist/production/src/commands/transfer/ImportCommand.js +60 -0
  313. package/dist/production/src/commands/transfer/ImportCommand.js.map +1 -0
  314. package/dist/production/src/commands/transfer/TransferCommand.cjs +73 -0
  315. package/dist/production/src/commands/transfer/TransferCommand.cjs.map +1 -0
  316. package/dist/production/src/commands/transfer/TransferCommand.js +73 -0
  317. package/dist/production/src/commands/transfer/TransferCommand.js.map +1 -0
  318. package/dist/production/src/commands/transfer/utils.cjs +22 -0
  319. package/dist/production/src/commands/transfer/utils.cjs.map +1 -0
  320. package/dist/production/src/commands/transfer/utils.js +22 -0
  321. package/dist/production/src/commands/transfer/utils.js.map +1 -0
  322. package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.cjs +54 -0
  323. package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.cjs.map +1 -0
  324. package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.js +54 -0
  325. package/dist/production/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +1 -0
  326. package/dist/production/src/consts.cjs +10 -0
  327. package/dist/production/src/consts.cjs.map +1 -0
  328. package/dist/production/src/consts.js +9 -0
  329. package/dist/production/src/consts.js.map +1 -0
  330. package/dist/production/src/dic.cjs +116 -0
  331. package/dist/production/src/dic.cjs.map +1 -0
  332. package/dist/production/src/dic.js +116 -0
  333. package/dist/production/src/dic.js.map +1 -0
  334. package/dist/production/src/lib/SystemClientProvider.cjs +14 -0
  335. package/dist/production/src/lib/SystemClientProvider.cjs.map +1 -0
  336. package/dist/production/src/lib/SystemClientProvider.js +14 -0
  337. package/dist/production/src/lib/SystemClientProvider.js.map +1 -0
  338. package/dist/production/src/lib/TenantClientProvider.cjs +14 -0
  339. package/dist/production/src/lib/TenantClientProvider.cjs.map +1 -0
  340. package/dist/production/src/lib/TenantClientProvider.js +14 -0
  341. package/dist/production/src/lib/TenantClientProvider.js.map +1 -0
  342. package/dist/production/src/lib/VersionChecker.cjs +85 -0
  343. package/dist/production/src/lib/VersionChecker.cjs.map +1 -0
  344. package/dist/production/src/lib/VersionChecker.js +68 -0
  345. package/dist/production/src/lib/VersionChecker.js.map +1 -0
  346. package/dist/production/src/lib/admin/AdminClient.cjs +30 -0
  347. package/dist/production/src/lib/admin/AdminClient.cjs.map +1 -0
  348. package/dist/production/src/lib/admin/AdminClient.js +30 -0
  349. package/dist/production/src/lib/admin/AdminClient.js.map +1 -0
  350. package/dist/production/src/lib/admin/AdminDeployer.cjs +36 -0
  351. package/dist/production/src/lib/admin/AdminDeployer.cjs.map +1 -0
  352. package/dist/production/src/lib/admin/AdminDeployer.js +36 -0
  353. package/dist/production/src/lib/admin/AdminDeployer.js.map +1 -0
  354. package/dist/production/src/lib/assertNever.cjs +7 -0
  355. package/dist/production/src/lib/assertNever.cjs.map +1 -0
  356. package/dist/production/src/lib/assertNever.js +7 -0
  357. package/dist/production/src/lib/assertNever.js.map +1 -0
  358. package/dist/production/src/lib/dsn.cjs +16 -0
  359. package/dist/production/src/lib/dsn.cjs.map +1 -0
  360. package/dist/production/src/lib/dsn.js +16 -0
  361. package/dist/production/src/lib/dsn.js.map +1 -0
  362. package/dist/production/src/lib/env.cjs +15 -0
  363. package/dist/production/src/lib/env.cjs.map +1 -0
  364. package/dist/production/src/lib/env.js +15 -0
  365. package/dist/production/src/lib/env.js.map +1 -0
  366. package/dist/production/src/lib/fs/DockerComposeManager.cjs +41 -0
  367. package/dist/production/src/lib/fs/DockerComposeManager.cjs.map +1 -0
  368. package/dist/production/src/lib/fs/DockerComposeManager.js +41 -0
  369. package/dist/production/src/lib/fs/DockerComposeManager.js.map +1 -0
  370. package/dist/production/src/lib/fs/FileSystem.cjs +43 -0
  371. package/dist/production/src/lib/fs/FileSystem.cjs.map +1 -0
  372. package/dist/production/src/lib/fs/FileSystem.js +27 -0
  373. package/dist/production/src/lib/fs/FileSystem.js.map +1 -0
  374. package/dist/production/src/lib/fs/YamlHandler.cjs +48 -0
  375. package/dist/production/src/lib/fs/YamlHandler.cjs.map +1 -0
  376. package/dist/production/src/lib/fs/YamlHandler.js +48 -0
  377. package/dist/production/src/lib/fs/YamlHandler.js.map +1 -0
  378. package/dist/production/src/lib/js/EsBuildBuilder.cjs +36 -0
  379. package/dist/production/src/lib/js/EsBuildBuilder.cjs.map +1 -0
  380. package/dist/production/src/lib/js/EsBuildBuilder.js +19 -0
  381. package/dist/production/src/lib/js/EsBuildBuilder.js.map +1 -0
  382. package/dist/production/src/lib/js/EvalExecutor.cjs +10 -0
  383. package/dist/production/src/lib/js/EvalExecutor.cjs.map +1 -0
  384. package/dist/production/src/lib/js/EvalExecutor.js +10 -0
  385. package/dist/production/src/lib/js/EvalExecutor.js.map +1 -0
  386. package/dist/production/src/lib/js/JsCodeRunner.cjs +17 -0
  387. package/dist/production/src/lib/js/JsCodeRunner.cjs.map +1 -0
  388. package/dist/production/src/lib/js/JsCodeRunner.js +17 -0
  389. package/dist/production/src/lib/js/JsCodeRunner.js.map +1 -0
  390. package/dist/production/src/lib/maskToken.cjs +5 -0
  391. package/dist/production/src/lib/maskToken.cjs.map +1 -0
  392. package/dist/production/src/lib/maskToken.js +5 -0
  393. package/dist/production/src/lib/maskToken.js.map +1 -0
  394. package/dist/production/src/lib/migrations/MigrationExecutionFacade.cjs +84 -0
  395. package/dist/production/src/lib/migrations/MigrationExecutionFacade.cjs.map +1 -0
  396. package/dist/production/src/lib/migrations/MigrationExecutionFacade.js +84 -0
  397. package/dist/production/src/lib/migrations/MigrationExecutionFacade.js.map +1 -0
  398. package/dist/production/src/lib/migrations/MigrationPrinter.cjs +82 -0
  399. package/dist/production/src/lib/migrations/MigrationPrinter.cjs.map +1 -0
  400. package/dist/production/src/lib/migrations/MigrationPrinter.js +82 -0
  401. package/dist/production/src/lib/migrations/MigrationPrinter.js.map +1 -0
  402. package/dist/production/src/lib/migrations/MigrationRebaseFacade.cjs +41 -0
  403. package/dist/production/src/lib/migrations/MigrationRebaseFacade.cjs.map +1 -0
  404. package/dist/production/src/lib/migrations/MigrationRebaseFacade.js +41 -0
  405. package/dist/production/src/lib/migrations/MigrationRebaseFacade.js.map +1 -0
  406. package/dist/production/src/lib/migrations/MigrationsStatusFacade.cjs +27 -0
  407. package/dist/production/src/lib/migrations/MigrationsStatusFacade.cjs.map +1 -0
  408. package/dist/production/src/lib/migrations/MigrationsStatusFacade.js +27 -0
  409. package/dist/production/src/lib/migrations/MigrationsStatusFacade.js.map +1 -0
  410. package/dist/production/src/lib/migrations/MigrationsValidator.cjs +38 -0
  411. package/dist/production/src/lib/migrations/MigrationsValidator.cjs.map +1 -0
  412. package/dist/production/src/lib/migrations/MigrationsValidator.js +38 -0
  413. package/dist/production/src/lib/migrations/MigrationsValidator.js.map +1 -0
  414. package/dist/production/src/lib/migrations/migrations.cjs +43 -0
  415. package/dist/production/src/lib/migrations/migrations.cjs.map +1 -0
  416. package/dist/production/src/lib/migrations/migrations.js +43 -0
  417. package/dist/production/src/lib/migrations/migrations.js.map +1 -0
  418. package/dist/production/src/lib/project/RemoteProject.cjs +12 -0
  419. package/dist/production/src/lib/project/RemoteProject.cjs.map +1 -0
  420. package/dist/production/src/lib/project/RemoteProject.js +12 -0
  421. package/dist/production/src/lib/project/RemoteProject.js.map +1 -0
  422. package/dist/production/src/lib/project/RemoteProjectProvider.cjs +21 -0
  423. package/dist/production/src/lib/project/RemoteProjectProvider.cjs.map +1 -0
  424. package/dist/production/src/lib/project/RemoteProjectProvider.js +21 -0
  425. package/dist/production/src/lib/project/RemoteProjectProvider.js.map +1 -0
  426. package/dist/production/src/lib/project/RemoteProjectResolver.cjs +29 -0
  427. package/dist/production/src/lib/project/RemoteProjectResolver.cjs.map +1 -0
  428. package/dist/production/src/lib/project/RemoteProjectResolver.js +29 -0
  429. package/dist/production/src/lib/project/RemoteProjectResolver.js.map +1 -0
  430. package/dist/production/src/lib/project/docs/components/EntityInfo.cjs +77 -0
  431. package/dist/production/src/lib/project/docs/components/EntityInfo.cjs.map +1 -0
  432. package/dist/production/src/lib/project/docs/components/EntityInfo.js +77 -0
  433. package/dist/production/src/lib/project/docs/components/EntityInfo.js.map +1 -0
  434. package/dist/production/src/lib/project/docs/components/EntityLink.cjs +7 -0
  435. package/dist/production/src/lib/project/docs/components/EntityLink.cjs.map +1 -0
  436. package/dist/production/src/lib/project/docs/components/EntityLink.js +7 -0
  437. package/dist/production/src/lib/project/docs/components/EntityLink.js.map +1 -0
  438. package/dist/production/src/lib/project/docs/components/FieldLink.cjs +15 -0
  439. package/dist/production/src/lib/project/docs/components/FieldLink.cjs.map +1 -0
  440. package/dist/production/src/lib/project/docs/components/FieldLink.js +15 -0
  441. package/dist/production/src/lib/project/docs/components/FieldLink.js.map +1 -0
  442. package/dist/production/src/lib/project/docs/components/FieldPermissions.cjs +17 -0
  443. package/dist/production/src/lib/project/docs/components/FieldPermissions.cjs.map +1 -0
  444. package/dist/production/src/lib/project/docs/components/FieldPermissions.js +17 -0
  445. package/dist/production/src/lib/project/docs/components/FieldPermissions.js.map +1 -0
  446. package/dist/production/src/lib/project/docs/components/FieldType.cjs +59 -0
  447. package/dist/production/src/lib/project/docs/components/FieldType.cjs.map +1 -0
  448. package/dist/production/src/lib/project/docs/components/FieldType.js +59 -0
  449. package/dist/production/src/lib/project/docs/components/FieldType.js.map +1 -0
  450. package/dist/production/src/lib/project/docs/components/OnDelete.cjs +66 -0
  451. package/dist/production/src/lib/project/docs/components/OnDelete.cjs.map +1 -0
  452. package/dist/production/src/lib/project/docs/components/OnDelete.js +66 -0
  453. package/dist/production/src/lib/project/docs/components/OnDelete.js.map +1 -0
  454. package/dist/production/src/lib/project/docs/components/ProjectInfo.cjs +32 -0
  455. package/dist/production/src/lib/project/docs/components/ProjectInfo.cjs.map +1 -0
  456. package/dist/production/src/lib/project/docs/components/ProjectInfo.js +32 -0
  457. package/dist/production/src/lib/project/docs/components/ProjectInfo.js.map +1 -0
  458. package/dist/production/src/lib/project/docs/components/SinglePermission.cjs +14 -0
  459. package/dist/production/src/lib/project/docs/components/SinglePermission.cjs.map +1 -0
  460. package/dist/production/src/lib/project/docs/components/SinglePermission.js +14 -0
  461. package/dist/production/src/lib/project/docs/components/SinglePermission.js.map +1 -0
  462. package/dist/production/src/lib/project/docs/components/utils.cjs +7 -0
  463. package/dist/production/src/lib/project/docs/components/utils.cjs.map +1 -0
  464. package/dist/production/src/lib/project/docs/components/utils.js +7 -0
  465. package/dist/production/src/lib/project/docs/components/utils.js.map +1 -0
  466. package/dist/production/src/lib/project/docs/projectDescribe.cjs +28 -0
  467. package/dist/production/src/lib/project/docs/projectDescribe.cjs.map +1 -0
  468. package/dist/production/src/lib/project/docs/projectDescribe.js +27 -0
  469. package/dist/production/src/lib/project/docs/projectDescribe.js.map +1 -0
  470. package/dist/production/src/lib/schema/SchemaLoader.cjs +49 -0
  471. package/dist/production/src/lib/schema/SchemaLoader.cjs.map +1 -0
  472. package/dist/production/src/lib/schema/SchemaLoader.js +32 -0
  473. package/dist/production/src/lib/schema/SchemaLoader.js.map +1 -0
  474. package/dist/production/src/lib/schema/SchemaValidationHelper.cjs +11 -0
  475. package/dist/production/src/lib/schema/SchemaValidationHelper.cjs.map +1 -0
  476. package/dist/production/src/lib/schema/SchemaValidationHelper.js +11 -0
  477. package/dist/production/src/lib/schema/SchemaValidationHelper.js.map +1 -0
  478. package/dist/production/src/lib/schema/SchemaValidationPrinter.cjs +14 -0
  479. package/dist/production/src/lib/schema/SchemaValidationPrinter.cjs.map +1 -0
  480. package/dist/production/src/lib/schema/SchemaValidationPrinter.js +14 -0
  481. package/dist/production/src/lib/schema/SchemaValidationPrinter.js.map +1 -0
  482. package/dist/production/src/lib/schema/collectReferences.cjs +34 -0
  483. package/dist/production/src/lib/schema/collectReferences.cjs.map +1 -0
  484. package/dist/production/src/lib/schema/collectReferences.js +34 -0
  485. package/dist/production/src/lib/schema/collectReferences.js.map +1 -0
  486. package/dist/production/src/lib/stream.cjs +43 -0
  487. package/dist/production/src/lib/stream.cjs.map +1 -0
  488. package/dist/production/src/lib/stream.js +43 -0
  489. package/dist/production/src/lib/stream.js.map +1 -0
  490. package/dist/production/src/lib/tenant/TenantClient.cjs +45 -0
  491. package/dist/production/src/lib/tenant/TenantClient.cjs.map +1 -0
  492. package/dist/production/src/lib/tenant/TenantClient.js +45 -0
  493. package/dist/production/src/lib/tenant/TenantClient.js.map +1 -0
  494. package/dist/production/src/lib/transfer/DataTransferClient.cjs +97 -0
  495. package/dist/production/src/lib/transfer/DataTransferClient.cjs.map +1 -0
  496. package/dist/production/src/lib/transfer/DataTransferClient.js +97 -0
  497. package/dist/production/src/lib/transfer/DataTransferClient.js.map +1 -0
  498. package/dist/production/src/lib/transfer/stdio.cjs +12 -0
  499. package/dist/production/src/lib/transfer/stdio.cjs.map +1 -0
  500. package/dist/production/src/lib/transfer/stdio.js +12 -0
  501. package/dist/production/src/lib/transfer/stdio.js.map +1 -0
  502. package/dist/production/src/lib/workspace/WorkspaceResolver.cjs +38 -0
  503. package/dist/production/src/lib/workspace/WorkspaceResolver.cjs.map +1 -0
  504. package/dist/production/src/lib/workspace/WorkspaceResolver.js +38 -0
  505. package/dist/production/src/lib/workspace/WorkspaceResolver.js.map +1 -0
  506. package/dist/types/commands/deploy/DeployCommand.d.ts +30 -0
  507. package/dist/types/commands/deploy/DeployCommand.d.ts.map +1 -0
  508. package/dist/types/commands/index.d.ts +6 -0
  509. package/dist/types/commands/index.d.ts.map +1 -0
  510. package/dist/types/commands/migrations/MigrationAmendCommand.d.ts +32 -0
  511. package/dist/types/commands/migrations/MigrationAmendCommand.d.ts.map +1 -0
  512. package/dist/types/commands/migrations/MigrationBlankCommand.d.ts +15 -0
  513. package/dist/types/commands/migrations/MigrationBlankCommand.d.ts.map +1 -0
  514. package/dist/types/commands/migrations/MigrationDescribeCommand.d.ts +20 -0
  515. package/dist/types/commands/migrations/MigrationDescribeCommand.d.ts.map +1 -0
  516. package/dist/types/commands/migrations/MigrationDiffCommand.d.ts +25 -0
  517. package/dist/types/commands/migrations/MigrationDiffCommand.d.ts.map +1 -0
  518. package/dist/types/commands/migrations/MigrationExecuteCommand.d.ts +16 -0
  519. package/dist/types/commands/migrations/MigrationExecuteCommand.d.ts.map +1 -0
  520. package/dist/types/commands/migrations/MigrationRebaseCommand.d.ts +18 -0
  521. package/dist/types/commands/migrations/MigrationRebaseCommand.d.ts.map +1 -0
  522. package/dist/types/commands/migrations/MigrationStatusCommand.d.ts +22 -0
  523. package/dist/types/commands/migrations/MigrationStatusCommand.d.ts.map +1 -0
  524. package/dist/types/commands/misc/VersionCommand.d.ts +8 -0
  525. package/dist/types/commands/misc/VersionCommand.d.ts.map +1 -0
  526. package/dist/types/commands/project/ProjectGenerateDocumentationCommand.d.ts +15 -0
  527. package/dist/types/commands/project/ProjectGenerateDocumentationCommand.d.ts.map +1 -0
  528. package/dist/types/commands/project/ProjectPrintSchemaCommand.d.ts +19 -0
  529. package/dist/types/commands/project/ProjectPrintSchemaCommand.d.ts.map +1 -0
  530. package/dist/types/commands/project/ProjectValidateCommand.d.ts +19 -0
  531. package/dist/types/commands/project/ProjectValidateCommand.d.ts.map +1 -0
  532. package/dist/types/commands/project/index.d.ts +4 -0
  533. package/dist/types/commands/project/index.d.ts.map +1 -0
  534. package/dist/types/commands/transfer/ExportCommand.d.ts +23 -0
  535. package/dist/types/commands/transfer/ExportCommand.d.ts.map +1 -0
  536. package/dist/types/commands/transfer/ImportCommand.d.ts +20 -0
  537. package/dist/types/commands/transfer/ImportCommand.d.ts.map +1 -0
  538. package/dist/types/commands/transfer/TransferCommand.d.ts +21 -0
  539. package/dist/types/commands/transfer/TransferCommand.d.ts.map +1 -0
  540. package/dist/types/commands/transfer/utils.d.ts +5 -0
  541. package/dist/types/commands/transfer/utils.d.ts.map +1 -0
  542. package/dist/types/commands/workspace/WorkspaceUpdateApiCommand.d.ts +15 -0
  543. package/dist/types/commands/workspace/WorkspaceUpdateApiCommand.d.ts.map +1 -0
  544. package/dist/types/consts.d.ts +3 -0
  545. package/dist/types/consts.d.ts.map +1 -0
  546. package/dist/types/dic.d.ts +144 -0
  547. package/dist/types/dic.d.ts.map +1 -0
  548. package/dist/types/lib/SystemClientProvider.d.ts +8 -0
  549. package/dist/types/lib/SystemClientProvider.d.ts.map +1 -0
  550. package/dist/types/lib/TenantClientProvider.d.ts +8 -0
  551. package/dist/types/lib/TenantClientProvider.d.ts.map +1 -0
  552. package/dist/types/lib/VersionChecker.d.ts +11 -0
  553. package/dist/types/lib/VersionChecker.d.ts.map +1 -0
  554. package/dist/types/lib/admin/AdminClient.d.ts +12 -0
  555. package/dist/types/lib/admin/AdminClient.d.ts.map +1 -0
  556. package/dist/types/lib/admin/AdminDeployer.d.ts +15 -0
  557. package/dist/types/lib/admin/AdminDeployer.d.ts.map +1 -0
  558. package/dist/types/lib/assertNever.d.ts.map +1 -0
  559. package/dist/types/lib/dsn.d.ts.map +1 -0
  560. package/dist/types/lib/env.d.ts +11 -0
  561. package/dist/types/lib/env.d.ts.map +1 -0
  562. package/dist/types/lib/fs/DockerComposeManager.d.ts +25 -0
  563. package/dist/types/lib/fs/DockerComposeManager.d.ts.map +1 -0
  564. package/dist/types/lib/fs/FileSystem.d.ts +8 -0
  565. package/dist/types/lib/fs/FileSystem.d.ts.map +1 -0
  566. package/dist/types/lib/fs/YamlHandler.d.ts +15 -0
  567. package/dist/types/lib/fs/YamlHandler.d.ts.map +1 -0
  568. package/dist/types/lib/js/EsBuildBuilder.d.ts +5 -0
  569. package/dist/types/lib/js/EsBuildBuilder.d.ts.map +1 -0
  570. package/dist/types/lib/js/EvalExecutor.d.ts +5 -0
  571. package/dist/types/lib/js/EvalExecutor.d.ts.map +1 -0
  572. package/dist/types/lib/js/JsBuilder.d.ts +4 -0
  573. package/dist/types/lib/js/JsBuilder.d.ts.map +1 -0
  574. package/dist/types/lib/js/JsCodeRunner.d.ts +9 -0
  575. package/dist/types/lib/js/JsCodeRunner.d.ts.map +1 -0
  576. package/dist/types/lib/js/JsExecutor.d.ts +4 -0
  577. package/dist/types/lib/js/JsExecutor.d.ts.map +1 -0
  578. package/dist/types/lib/json.d.ts +7 -0
  579. package/dist/types/lib/json.d.ts.map +1 -0
  580. package/dist/types/lib/maskToken.d.ts +2 -0
  581. package/dist/types/lib/maskToken.d.ts.map +1 -0
  582. package/dist/types/lib/migrations/MigrationExecutionFacade.d.ts +23 -0
  583. package/dist/types/lib/migrations/MigrationExecutionFacade.d.ts.map +1 -0
  584. package/dist/types/lib/migrations/MigrationPrinter.d.ts +12 -0
  585. package/dist/types/lib/migrations/MigrationPrinter.d.ts.map +1 -0
  586. package/dist/types/lib/migrations/MigrationRebaseFacade.d.ts +12 -0
  587. package/dist/types/lib/migrations/MigrationRebaseFacade.d.ts.map +1 -0
  588. package/dist/types/lib/migrations/MigrationsStatusFacade.d.ts +16 -0
  589. package/dist/types/lib/migrations/MigrationsStatusFacade.d.ts.map +1 -0
  590. package/dist/types/lib/migrations/MigrationsValidator.d.ts +10 -0
  591. package/dist/types/lib/migrations/MigrationsValidator.d.ts.map +1 -0
  592. package/dist/types/lib/migrations/migrations.d.ts +3 -0
  593. package/dist/types/lib/migrations/migrations.d.ts.map +1 -0
  594. package/dist/types/lib/project/RemoteProject.d.ts +8 -0
  595. package/dist/types/lib/project/RemoteProject.d.ts.map +1 -0
  596. package/dist/types/lib/project/RemoteProjectProvider.d.ts +7 -0
  597. package/dist/types/lib/project/RemoteProjectProvider.d.ts.map +1 -0
  598. package/dist/types/lib/project/RemoteProjectResolver.d.ts +8 -0
  599. package/dist/types/lib/project/RemoteProjectResolver.d.ts.map +1 -0
  600. package/dist/types/lib/project/docs/components/EntityInfo.d.ts +11 -0
  601. package/dist/types/lib/project/docs/components/EntityInfo.d.ts.map +1 -0
  602. package/dist/types/lib/project/docs/components/EntityLink.d.ts.map +1 -0
  603. package/dist/types/lib/project/docs/components/FieldLink.d.ts +7 -0
  604. package/dist/types/lib/project/docs/components/FieldLink.d.ts.map +1 -0
  605. package/dist/types/lib/project/docs/components/FieldPermissions.d.ts +7 -0
  606. package/dist/types/lib/project/docs/components/FieldPermissions.d.ts.map +1 -0
  607. package/dist/types/lib/project/docs/components/FieldType.d.ts.map +1 -0
  608. package/dist/types/lib/project/docs/components/OnDelete.d.ts +9 -0
  609. package/dist/types/lib/project/docs/components/OnDelete.d.ts.map +1 -0
  610. package/dist/types/lib/project/docs/components/ProjectInfo.d.ts.map +1 -0
  611. package/dist/types/lib/project/docs/components/SinglePermission.d.ts +7 -0
  612. package/dist/types/lib/project/docs/components/SinglePermission.d.ts.map +1 -0
  613. package/dist/types/lib/project/docs/components/utils.d.ts.map +1 -0
  614. package/dist/types/lib/project/docs/projectDescribe.d.ts.map +1 -0
  615. package/dist/types/lib/schema/SchemaLoader.d.ts +18 -0
  616. package/dist/types/lib/schema/SchemaLoader.d.ts.map +1 -0
  617. package/dist/types/lib/schema/SchemaValidationHelper.d.ts +4 -0
  618. package/dist/types/lib/schema/SchemaValidationHelper.d.ts.map +1 -0
  619. package/dist/types/lib/schema/SchemaValidationPrinter.d.ts +3 -0
  620. package/dist/types/lib/schema/SchemaValidationPrinter.d.ts.map +1 -0
  621. package/dist/types/lib/schema/collectReferences.d.ts.map +1 -0
  622. package/dist/types/lib/stream.d.ts +8 -0
  623. package/dist/types/lib/stream.d.ts.map +1 -0
  624. package/dist/types/lib/tenant/TenantClient.d.ts +9 -0
  625. package/dist/types/lib/tenant/TenantClient.d.ts.map +1 -0
  626. package/dist/types/lib/transfer/DataTransferClient.d.ts +18 -0
  627. package/dist/types/lib/transfer/DataTransferClient.d.ts.map +1 -0
  628. package/dist/types/lib/transfer/stdio.d.ts.map +1 -0
  629. package/dist/types/lib/workspace/Workspace.d.ts +8 -0
  630. package/dist/types/lib/workspace/Workspace.d.ts.map +1 -0
  631. package/dist/types/lib/workspace/WorkspaceResolver.d.ts +15 -0
  632. package/dist/types/lib/workspace/WorkspaceResolver.d.ts.map +1 -0
  633. package/dist/types/tsconfig.tsbuildinfo +1 -0
  634. package/package.json +15 -12
  635. package/src/.eslintrc.cjs +5 -0
  636. package/src/commands/deploy/DeployCommand.ts +51 -107
  637. package/src/commands/index.ts +0 -1
  638. package/src/commands/migrations/MigrationAmendCommand.ts +97 -115
  639. package/src/commands/migrations/MigrationBlankCommand.ts +8 -20
  640. package/src/commands/migrations/MigrationDescribeCommand.ts +12 -22
  641. package/src/commands/migrations/MigrationDiffCommand.ts +66 -95
  642. package/src/commands/migrations/MigrationExecuteCommand.ts +23 -83
  643. package/src/commands/migrations/MigrationRebaseCommand.ts +20 -62
  644. package/src/commands/migrations/MigrationStatusCommand.ts +20 -40
  645. package/src/commands/misc/VersionCommand.ts +7 -2
  646. package/src/commands/project/ProjectGenerateDocumentationCommand.ts +47 -0
  647. package/src/commands/project/ProjectPrintSchemaCommand.ts +10 -16
  648. package/src/commands/project/ProjectValidateCommand.ts +33 -54
  649. package/src/commands/project/index.ts +1 -1
  650. package/src/commands/transfer/ExportCommand.ts +16 -14
  651. package/src/commands/transfer/ImportCommand.ts +18 -15
  652. package/src/commands/transfer/TransferCommand.ts +29 -18
  653. package/src/commands/transfer/utils.ts +1 -117
  654. package/src/commands/workspace/WorkspaceUpdateApiCommand.ts +8 -16
  655. package/src/consts.ts +5 -0
  656. package/src/dic.ts +258 -0
  657. package/src/lib/SystemClientProvider.ts +14 -0
  658. package/src/lib/TenantClientProvider.ts +14 -0
  659. package/src/lib/VersionChecker.ts +71 -0
  660. package/src/lib/admin/AdminClient.ts +33 -0
  661. package/src/lib/admin/AdminDeployer.ts +45 -0
  662. package/src/lib/dsn.ts +13 -0
  663. package/src/lib/env.ts +21 -0
  664. package/src/lib/fs/DockerComposeManager.ts +63 -0
  665. package/src/lib/fs/FileSystem.ts +19 -0
  666. package/src/lib/fs/YamlHandler.ts +59 -0
  667. package/src/lib/js/EsBuildBuilder.ts +17 -0
  668. package/src/lib/js/EvalExecutor.ts +8 -0
  669. package/src/lib/js/JsBuilder.ts +3 -0
  670. package/src/lib/js/JsCodeRunner.ts +15 -0
  671. package/src/lib/js/JsExecutor.ts +3 -0
  672. package/src/lib/json.ts +4 -0
  673. package/src/lib/migrations/MigrationExecutionFacade.ts +97 -0
  674. package/src/lib/migrations/MigrationPrinter.ts +86 -0
  675. package/src/lib/migrations/MigrationRebaseFacade.ts +41 -0
  676. package/src/lib/migrations/MigrationsStatusFacade.ts +27 -0
  677. package/src/lib/migrations/MigrationsValidator.ts +40 -0
  678. package/src/lib/migrations/migrations.ts +45 -0
  679. package/src/lib/project/RemoteProject.ts +9 -0
  680. package/src/lib/project/RemoteProjectProvider.ts +16 -0
  681. package/src/lib/project/RemoteProjectResolver.ts +30 -0
  682. package/src/lib/project/docs/.eslintrc.cjs +5 -0
  683. package/src/lib/project/docs/components/EntityInfo.tsx +85 -0
  684. package/src/lib/project/docs/components/OnDelete.tsx +72 -0
  685. package/src/lib/project/docs/components/ProjectInfo.tsx +48 -0
  686. package/src/lib/project/docs/projectDescribe.tsx +28 -0
  687. package/src/lib/schema/SchemaLoader.ts +38 -0
  688. package/src/lib/schema/SchemaValidationHelper.ts +9 -0
  689. package/src/lib/schema/SchemaValidationPrinter.ts +13 -0
  690. package/src/lib/tenant/TenantClient.ts +45 -0
  691. package/src/lib/transfer/DataTransferClient.ts +112 -0
  692. package/src/lib/workspace/Workspace.ts +7 -0
  693. package/src/lib/workspace/WorkspaceResolver.ts +45 -0
  694. package/src/run.ts +23 -63
  695. package/src/tsconfig.json +4 -2
  696. package/tailwind.config.js +1 -1
  697. package/dist/src/commands/deploy/DeployCommand.d.ts +0 -21
  698. package/dist/src/commands/deploy/DeployCommand.d.ts.map +0 -1
  699. package/dist/src/commands/deploy/DeployCommand.js +0 -135
  700. package/dist/src/commands/deploy/DeployCommand.js.map +0 -1
  701. package/dist/src/commands/deploy/index.js +0 -18
  702. package/dist/src/commands/deploy/index.js.map +0 -1
  703. package/dist/src/commands/index.d.ts +0 -7
  704. package/dist/src/commands/index.d.ts.map +0 -1
  705. package/dist/src/commands/index.js +0 -23
  706. package/dist/src/commands/index.js.map +0 -1
  707. package/dist/src/commands/migrations/MigrationAmendCommand.d.ts +0 -18
  708. package/dist/src/commands/migrations/MigrationAmendCommand.d.ts.map +0 -1
  709. package/dist/src/commands/migrations/MigrationAmendCommand.js +0 -126
  710. package/dist/src/commands/migrations/MigrationAmendCommand.js.map +0 -1
  711. package/dist/src/commands/migrations/MigrationBlankCommand.d.ts +0 -15
  712. package/dist/src/commands/migrations/MigrationBlankCommand.d.ts.map +0 -1
  713. package/dist/src/commands/migrations/MigrationBlankCommand.js +0 -29
  714. package/dist/src/commands/migrations/MigrationBlankCommand.js.map +0 -1
  715. package/dist/src/commands/migrations/MigrationDescribeCommand.d.ts +0 -17
  716. package/dist/src/commands/migrations/MigrationDescribeCommand.d.ts.map +0 -1
  717. package/dist/src/commands/migrations/MigrationDescribeCommand.js +0 -42
  718. package/dist/src/commands/migrations/MigrationDescribeCommand.js.map +0 -1
  719. package/dist/src/commands/migrations/MigrationDiffCommand.d.ts +0 -18
  720. package/dist/src/commands/migrations/MigrationDiffCommand.d.ts.map +0 -1
  721. package/dist/src/commands/migrations/MigrationDiffCommand.js +0 -110
  722. package/dist/src/commands/migrations/MigrationDiffCommand.js.map +0 -1
  723. package/dist/src/commands/migrations/MigrationExecuteCommand.d.ts +0 -17
  724. package/dist/src/commands/migrations/MigrationExecuteCommand.d.ts.map +0 -1
  725. package/dist/src/commands/migrations/MigrationExecuteCommand.js +0 -83
  726. package/dist/src/commands/migrations/MigrationExecuteCommand.js.map +0 -1
  727. package/dist/src/commands/migrations/MigrationRebaseCommand.d.ts +0 -16
  728. package/dist/src/commands/migrations/MigrationRebaseCommand.d.ts.map +0 -1
  729. package/dist/src/commands/migrations/MigrationRebaseCommand.js +0 -64
  730. package/dist/src/commands/migrations/MigrationRebaseCommand.js.map +0 -1
  731. package/dist/src/commands/migrations/MigrationStatusCommand.d.ts +0 -19
  732. package/dist/src/commands/migrations/MigrationStatusCommand.d.ts.map +0 -1
  733. package/dist/src/commands/migrations/MigrationStatusCommand.js +0 -88
  734. package/dist/src/commands/migrations/MigrationStatusCommand.js.map +0 -1
  735. package/dist/src/commands/migrations/MigrationValidationHelper.d.ts +0 -4
  736. package/dist/src/commands/migrations/MigrationValidationHelper.d.ts.map +0 -1
  737. package/dist/src/commands/migrations/MigrationValidationHelper.js +0 -34
  738. package/dist/src/commands/migrations/MigrationValidationHelper.js.map +0 -1
  739. package/dist/src/commands/migrations/SystemApiClientResolver.d.ts +0 -8
  740. package/dist/src/commands/migrations/SystemApiClientResolver.d.ts.map +0 -1
  741. package/dist/src/commands/migrations/SystemApiClientResolver.js +0 -14
  742. package/dist/src/commands/migrations/SystemApiClientResolver.js.map +0 -1
  743. package/dist/src/commands/migrations/index.js +0 -24
  744. package/dist/src/commands/migrations/index.js.map +0 -1
  745. package/dist/src/commands/misc/VersionCommand.d.ts +0 -6
  746. package/dist/src/commands/misc/VersionCommand.d.ts.map +0 -1
  747. package/dist/src/commands/misc/VersionCommand.js +0 -15
  748. package/dist/src/commands/misc/VersionCommand.js.map +0 -1
  749. package/dist/src/commands/misc/index.js +0 -18
  750. package/dist/src/commands/misc/index.js.map +0 -1
  751. package/dist/src/commands/project/ProjectGenerateDocumentation.d.ts +0 -15
  752. package/dist/src/commands/project/ProjectGenerateDocumentation.d.ts.map +0 -1
  753. package/dist/src/commands/project/ProjectGenerateDocumentation.js +0 -43
  754. package/dist/src/commands/project/ProjectGenerateDocumentation.js.map +0 -1
  755. package/dist/src/commands/project/ProjectPrintSchemaCommand.d.ts +0 -18
  756. package/dist/src/commands/project/ProjectPrintSchemaCommand.d.ts.map +0 -1
  757. package/dist/src/commands/project/ProjectPrintSchemaCommand.js +0 -81
  758. package/dist/src/commands/project/ProjectPrintSchemaCommand.js.map +0 -1
  759. package/dist/src/commands/project/ProjectValidateCommand.d.ts +0 -13
  760. package/dist/src/commands/project/ProjectValidateCommand.d.ts.map +0 -1
  761. package/dist/src/commands/project/ProjectValidateCommand.js +0 -65
  762. package/dist/src/commands/project/ProjectValidateCommand.js.map +0 -1
  763. package/dist/src/commands/project/index.d.ts +0 -4
  764. package/dist/src/commands/project/index.d.ts.map +0 -1
  765. package/dist/src/commands/project/index.js +0 -20
  766. package/dist/src/commands/project/index.js.map +0 -1
  767. package/dist/src/commands/tenant/CreateApiKeyCommand.d.ts +0 -14
  768. package/dist/src/commands/tenant/CreateApiKeyCommand.d.ts.map +0 -1
  769. package/dist/src/commands/tenant/CreateApiKeyCommand.js +0 -34
  770. package/dist/src/commands/tenant/CreateApiKeyCommand.js.map +0 -1
  771. package/dist/src/commands/tenant/InviteCommand.d.ts +0 -14
  772. package/dist/src/commands/tenant/InviteCommand.d.ts.map +0 -1
  773. package/dist/src/commands/tenant/InviteCommand.js +0 -32
  774. package/dist/src/commands/tenant/InviteCommand.js.map +0 -1
  775. package/dist/src/commands/tenant/ResetPasswordCommand.d.ts +0 -14
  776. package/dist/src/commands/tenant/ResetPasswordCommand.d.ts.map +0 -1
  777. package/dist/src/commands/tenant/ResetPasswordCommand.js +0 -30
  778. package/dist/src/commands/tenant/ResetPasswordCommand.js.map +0 -1
  779. package/dist/src/commands/tenant/SignInCommand.d.ts +0 -14
  780. package/dist/src/commands/tenant/SignInCommand.d.ts.map +0 -1
  781. package/dist/src/commands/tenant/SignInCommand.js +0 -32
  782. package/dist/src/commands/tenant/SignInCommand.js.map +0 -1
  783. package/dist/src/commands/tenant/index.d.ts +0 -5
  784. package/dist/src/commands/tenant/index.d.ts.map +0 -1
  785. package/dist/src/commands/tenant/index.js +0 -21
  786. package/dist/src/commands/tenant/index.js.map +0 -1
  787. package/dist/src/commands/transfer/ExportCommand.d.ts +0 -20
  788. package/dist/src/commands/transfer/ExportCommand.d.ts.map +0 -1
  789. package/dist/src/commands/transfer/ExportCommand.js +0 -70
  790. package/dist/src/commands/transfer/ExportCommand.js.map +0 -1
  791. package/dist/src/commands/transfer/ImportCommand.d.ts +0 -17
  792. package/dist/src/commands/transfer/ImportCommand.d.ts.map +0 -1
  793. package/dist/src/commands/transfer/ImportCommand.js +0 -61
  794. package/dist/src/commands/transfer/ImportCommand.js.map +0 -1
  795. package/dist/src/commands/transfer/TransferCommand.d.ts +0 -18
  796. package/dist/src/commands/transfer/TransferCommand.d.ts.map +0 -1
  797. package/dist/src/commands/transfer/TransferCommand.js +0 -67
  798. package/dist/src/commands/transfer/TransferCommand.js.map +0 -1
  799. package/dist/src/commands/transfer/index.js +0 -20
  800. package/dist/src/commands/transfer/index.js.map +0 -1
  801. package/dist/src/commands/transfer/utils.d.ts +0 -27
  802. package/dist/src/commands/transfer/utils.d.ts.map +0 -1
  803. package/dist/src/commands/transfer/utils.js +0 -136
  804. package/dist/src/commands/transfer/utils.js.map +0 -1
  805. package/dist/src/commands/workspace/WorkspaceUpdateApiCommand.d.ts +0 -13
  806. package/dist/src/commands/workspace/WorkspaceUpdateApiCommand.d.ts.map +0 -1
  807. package/dist/src/commands/workspace/WorkspaceUpdateApiCommand.js +0 -66
  808. package/dist/src/commands/workspace/WorkspaceUpdateApiCommand.js.map +0 -1
  809. package/dist/src/commands/workspace/index.js +0 -18
  810. package/dist/src/commands/workspace/index.js.map +0 -1
  811. package/dist/src/run.js +0 -50
  812. package/dist/src/run.js.map +0 -1
  813. package/dist/src/tsconfig.tsbuildinfo +0 -1
  814. package/dist/src/utils/admin.d.ts +0 -14
  815. package/dist/src/utils/admin.d.ts.map +0 -1
  816. package/dist/src/utils/admin.js +0 -47
  817. package/dist/src/utils/admin.js.map +0 -1
  818. package/dist/src/utils/assertNever.d.ts.map +0 -1
  819. package/dist/src/utils/assertNever.js +0 -8
  820. package/dist/src/utils/assertNever.js.map +0 -1
  821. package/dist/src/utils/checkVersions.d.ts +0 -3
  822. package/dist/src/utils/checkVersions.d.ts.map +0 -1
  823. package/dist/src/utils/checkVersions.js +0 -83
  824. package/dist/src/utils/checkVersions.js.map +0 -1
  825. package/dist/src/utils/dockerCompose.d.ts +0 -18
  826. package/dist/src/utils/dockerCompose.d.ts.map +0 -1
  827. package/dist/src/utils/dockerCompose.js +0 -66
  828. package/dist/src/utils/dockerCompose.js.map +0 -1
  829. package/dist/src/utils/dsn.d.ts.map +0 -1
  830. package/dist/src/utils/dsn.js +0 -17
  831. package/dist/src/utils/dsn.js.map +0 -1
  832. package/dist/src/utils/esbuild.d.ts +0 -2
  833. package/dist/src/utils/esbuild.d.ts.map +0 -1
  834. package/dist/src/utils/esbuild.js +0 -41
  835. package/dist/src/utils/esbuild.js.map +0 -1
  836. package/dist/src/utils/instance/environment.d.ts +0 -4
  837. package/dist/src/utils/instance/environment.d.ts.map +0 -1
  838. package/dist/src/utils/instance/environment.js +0 -3
  839. package/dist/src/utils/instance/environment.js.map +0 -1
  840. package/dist/src/utils/instance/index.d.ts +0 -3
  841. package/dist/src/utils/instance/index.d.ts.map +0 -1
  842. package/dist/src/utils/instance/index.js +0 -21
  843. package/dist/src/utils/instance/index.js.map +0 -1
  844. package/dist/src/utils/instance/interactiveUtils.d.ts +0 -4
  845. package/dist/src/utils/instance/interactiveUtils.d.ts.map +0 -1
  846. package/dist/src/utils/instance/interactiveUtils.js +0 -36
  847. package/dist/src/utils/instance/interactiveUtils.js.map +0 -1
  848. package/dist/src/utils/migrations/MigrationCreateHelper.d.ts +0 -21
  849. package/dist/src/utils/migrations/MigrationCreateHelper.d.ts.map +0 -1
  850. package/dist/src/utils/migrations/MigrationCreateHelper.js +0 -32
  851. package/dist/src/utils/migrations/MigrationCreateHelper.js.map +0 -1
  852. package/dist/src/utils/migrations/MigrationExecuteHelper.d.ts +0 -23
  853. package/dist/src/utils/migrations/MigrationExecuteHelper.d.ts.map +0 -1
  854. package/dist/src/utils/migrations/MigrationExecuteHelper.js +0 -84
  855. package/dist/src/utils/migrations/MigrationExecuteHelper.js.map +0 -1
  856. package/dist/src/utils/migrations/MigrationsContainer.d.ts +0 -20
  857. package/dist/src/utils/migrations/MigrationsContainer.d.ts.map +0 -1
  858. package/dist/src/utils/migrations/MigrationsContainer.js +0 -58
  859. package/dist/src/utils/migrations/MigrationsContainer.js.map +0 -1
  860. package/dist/src/utils/migrations/migrations.d.ts +0 -9
  861. package/dist/src/utils/migrations/migrations.d.ts.map +0 -1
  862. package/dist/src/utils/migrations/migrations.js +0 -77
  863. package/dist/src/utils/migrations/migrations.js.map +0 -1
  864. package/dist/src/utils/project/components/EntityInfo.d.ts +0 -11
  865. package/dist/src/utils/project/components/EntityInfo.d.ts.map +0 -1
  866. package/dist/src/utils/project/components/EntityInfo.js +0 -54
  867. package/dist/src/utils/project/components/EntityInfo.js.map +0 -1
  868. package/dist/src/utils/project/components/EntityLink.d.ts.map +0 -1
  869. package/dist/src/utils/project/components/EntityLink.js +0 -8
  870. package/dist/src/utils/project/components/EntityLink.js.map +0 -1
  871. package/dist/src/utils/project/components/FieldLink.d.ts +0 -7
  872. package/dist/src/utils/project/components/FieldLink.d.ts.map +0 -1
  873. package/dist/src/utils/project/components/FieldLink.js +0 -13
  874. package/dist/src/utils/project/components/FieldLink.js.map +0 -1
  875. package/dist/src/utils/project/components/FieldPermissions.d.ts +0 -7
  876. package/dist/src/utils/project/components/FieldPermissions.d.ts.map +0 -1
  877. package/dist/src/utils/project/components/FieldPermissions.js +0 -17
  878. package/dist/src/utils/project/components/FieldPermissions.js.map +0 -1
  879. package/dist/src/utils/project/components/FieldType.d.ts.map +0 -1
  880. package/dist/src/utils/project/components/FieldType.js +0 -59
  881. package/dist/src/utils/project/components/FieldType.js.map +0 -1
  882. package/dist/src/utils/project/components/OnDelete.d.ts +0 -9
  883. package/dist/src/utils/project/components/OnDelete.d.ts.map +0 -1
  884. package/dist/src/utils/project/components/OnDelete.js +0 -70
  885. package/dist/src/utils/project/components/OnDelete.js.map +0 -1
  886. package/dist/src/utils/project/components/ProjectInfo.d.ts.map +0 -1
  887. package/dist/src/utils/project/components/ProjectInfo.js +0 -28
  888. package/dist/src/utils/project/components/ProjectInfo.js.map +0 -1
  889. package/dist/src/utils/project/components/SinglePermission.d.ts +0 -7
  890. package/dist/src/utils/project/components/SinglePermission.d.ts.map +0 -1
  891. package/dist/src/utils/project/components/SinglePermission.js +0 -15
  892. package/dist/src/utils/project/components/SinglePermission.js.map +0 -1
  893. package/dist/src/utils/project/components/utils.d.ts.map +0 -1
  894. package/dist/src/utils/project/components/utils.js +0 -8
  895. package/dist/src/utils/project/components/utils.js.map +0 -1
  896. package/dist/src/utils/project/loadSchema.d.ts +0 -4
  897. package/dist/src/utils/project/loadSchema.d.ts.map +0 -1
  898. package/dist/src/utils/project/loadSchema.js +0 -14
  899. package/dist/src/utils/project/loadSchema.js.map +0 -1
  900. package/dist/src/utils/project/projectDescribe.d.ts.map +0 -1
  901. package/dist/src/utils/project/projectDescribe.js +0 -29
  902. package/dist/src/utils/project/projectDescribe.js.map +0 -1
  903. package/dist/src/utils/project/resources/out.css +0 -824
  904. package/dist/src/utils/schema/collectReferences.d.ts.map +0 -1
  905. package/dist/src/utils/schema/collectReferences.js +0 -35
  906. package/dist/src/utils/schema/collectReferences.js.map +0 -1
  907. package/dist/src/utils/schema.d.ts +0 -5
  908. package/dist/src/utils/schema.d.ts.map +0 -1
  909. package/dist/src/utils/schema.js +0 -22
  910. package/dist/src/utils/schema.js.map +0 -1
  911. package/dist/src/utils/stdio.d.ts.map +0 -1
  912. package/dist/src/utils/stdio.js +0 -13
  913. package/dist/src/utils/stdio.js.map +0 -1
  914. package/dist/src/utils/stream.d.ts +0 -9
  915. package/dist/src/utils/stream.d.ts.map +0 -1
  916. package/dist/src/utils/stream.js +0 -41
  917. package/dist/src/utils/stream.js.map +0 -1
  918. package/dist/src/utils/tenant.d.ts +0 -66
  919. package/dist/src/utils/tenant.d.ts.map +0 -1
  920. package/dist/src/utils/tenant.js +0 -355
  921. package/dist/src/utils/tenant.js.map +0 -1
  922. package/dist/src/utils/token.d.ts +0 -2
  923. package/dist/src/utils/token.d.ts.map +0 -1
  924. package/dist/src/utils/token.js +0 -6
  925. package/dist/src/utils/token.js.map +0 -1
  926. package/dist/src/utils/tuple.d.ts +0 -2
  927. package/dist/src/utils/tuple.d.ts.map +0 -1
  928. package/dist/src/utils/tuple.js +0 -6
  929. package/dist/src/utils/tuple.js.map +0 -1
  930. package/dist/src/utils/workspace.d.ts +0 -3
  931. package/dist/src/utils/workspace.d.ts.map +0 -1
  932. package/dist/src/utils/workspace.js +0 -25
  933. package/dist/src/utils/workspace.js.map +0 -1
  934. package/dist/src/utils/yaml.d.ts +0 -8
  935. package/dist/src/utils/yaml.d.ts.map +0 -1
  936. package/dist/src/utils/yaml.js +0 -33
  937. package/dist/src/utils/yaml.js.map +0 -1
  938. package/src/.eslintrc.js +0 -5
  939. package/src/commands/migrations/MigrationValidationHelper.ts +0 -36
  940. package/src/commands/migrations/SystemApiClientResolver.ts +0 -22
  941. package/src/commands/project/ProjectGenerateDocumentation.ts +0 -49
  942. package/src/commands/tenant/CreateApiKeyCommand.ts +0 -40
  943. package/src/commands/tenant/InviteCommand.ts +0 -38
  944. package/src/commands/tenant/ResetPasswordCommand.ts +0 -36
  945. package/src/commands/tenant/SignInCommand.ts +0 -38
  946. package/src/commands/tenant/index.ts +0 -4
  947. package/src/utils/admin.ts +0 -45
  948. package/src/utils/checkVersions.ts +0 -58
  949. package/src/utils/dockerCompose.ts +0 -58
  950. package/src/utils/dsn.ts +0 -13
  951. package/src/utils/esbuild.ts +0 -14
  952. package/src/utils/instance/environment.ts +0 -4
  953. package/src/utils/instance/index.ts +0 -2
  954. package/src/utils/instance/interactiveUtils.ts +0 -39
  955. package/src/utils/migrations/MigrationCreateHelper.ts +0 -59
  956. package/src/utils/migrations/MigrationExecuteHelper.ts +0 -115
  957. package/src/utils/migrations/MigrationsContainer.ts +0 -80
  958. package/src/utils/migrations/migrations.ts +0 -80
  959. package/src/utils/project/components/EntityInfo.tsx +0 -82
  960. package/src/utils/project/components/OnDelete.tsx +0 -72
  961. package/src/utils/project/components/ProjectInfo.tsx +0 -48
  962. package/src/utils/project/loadSchema.ts +0 -14
  963. package/src/utils/project/projectDescribe.tsx +0 -26
  964. package/src/utils/schema.ts +0 -19
  965. package/src/utils/tenant.ts +0 -434
  966. package/src/utils/tuple.ts +0 -1
  967. package/src/utils/workspace.ts +0 -21
  968. package/src/utils/yaml.ts +0 -36
  969. /package/dist/{src → types}/commands/deploy/index.d.ts +0 -0
  970. /package/dist/{src → types}/commands/deploy/index.d.ts.map +0 -0
  971. /package/dist/{src → types}/commands/migrations/index.d.ts +0 -0
  972. /package/dist/{src → types}/commands/migrations/index.d.ts.map +0 -0
  973. /package/dist/{src → types}/commands/misc/index.d.ts +0 -0
  974. /package/dist/{src → types}/commands/misc/index.d.ts.map +0 -0
  975. /package/dist/{src → types}/commands/transfer/index.d.ts +0 -0
  976. /package/dist/{src → types}/commands/transfer/index.d.ts.map +0 -0
  977. /package/dist/{src → types}/commands/workspace/index.d.ts +0 -0
  978. /package/dist/{src → types}/commands/workspace/index.d.ts.map +0 -0
  979. /package/dist/{src/utils → types/lib}/assertNever.d.ts +0 -0
  980. /package/dist/{src/utils → types/lib}/dsn.d.ts +0 -0
  981. /package/dist/{src/utils/project → types/lib/project/docs}/components/EntityLink.d.ts +0 -0
  982. /package/dist/{src/utils/project → types/lib/project/docs}/components/FieldType.d.ts +0 -0
  983. /package/dist/{src/utils/project → types/lib/project/docs}/components/ProjectInfo.d.ts +0 -0
  984. /package/dist/{src/utils/project → types/lib/project/docs}/components/utils.d.ts +0 -0
  985. /package/dist/{src/utils/project → types/lib/project/docs}/projectDescribe.d.ts +0 -0
  986. /package/dist/{src/utils → types/lib}/schema/collectReferences.d.ts +0 -0
  987. /package/dist/{src/utils → types/lib/transfer}/stdio.d.ts +0 -0
  988. /package/dist/{src → types}/run.d.ts +0 -0
  989. /package/dist/{src → types}/run.d.ts.map +0 -0
  990. /package/src/{utils → lib}/assertNever.ts +0 -0
  991. /package/src/{utils/token.ts → lib/maskToken.ts} +0 -0
  992. /package/src/{utils/project → lib/project/docs}/components/EntityLink.tsx +0 -0
  993. /package/src/{utils/project → lib/project/docs}/components/FieldLink.tsx +0 -0
  994. /package/src/{utils/project → lib/project/docs}/components/FieldPermissions.tsx +0 -0
  995. /package/src/{utils/project → lib/project/docs}/components/FieldType.tsx +0 -0
  996. /package/src/{utils/project → lib/project/docs}/components/SinglePermission.tsx +0 -0
  997. /package/src/{utils/project → lib/project/docs}/components/utils.ts +0 -0
  998. /package/src/{utils/project → lib/project/docs}/resources/style.css +0 -0
  999. /package/src/{utils → lib}/schema/collectReferences.ts +0 -0
  1000. /package/src/{utils → lib}/stream.ts +0 -0
  1001. /package/src/{utils → lib/transfer}/stdio.ts +0 -0
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const cliCommon = require("@contember/cli-common");
4
+ const schemaMigrations = require("@contember/schema-migrations");
5
+ const prompts = require("prompts");
6
+ const SchemaValidationPrinter = require("../../lib/schema/SchemaValidationPrinter.cjs");
7
+ class MigrationDiffCommand extends cliCommon.Command {
8
+ constructor(schemaLoader, schemaVersionBuilder, migrationCreator, migrationPrinter, migrationExecutorFacade) {
9
+ super();
10
+ this.schemaLoader = schemaLoader;
11
+ this.schemaVersionBuilder = schemaVersionBuilder;
12
+ this.migrationCreator = migrationCreator;
13
+ this.migrationPrinter = migrationPrinter;
14
+ this.migrationExecutorFacade = migrationExecutorFacade;
15
+ }
16
+ configure(configuration) {
17
+ configuration.description("Creates schema migration diff");
18
+ configuration.argument("migrationName");
19
+ configuration.option("execute").valueNone();
20
+ configuration.option("yes").valueNone().description("Do not ask for confirmation.");
21
+ configuration.option("skip-initial-schema-validation");
22
+ }
23
+ async execute(input) {
24
+ const migrationName = input.getArgument("migrationName");
25
+ let shouldExecute = input.getOption("execute");
26
+ const yes = input.getOption("yes");
27
+ const skipInitialSchemaValidation = input.getOption("skip-initial-schema-validation") === true;
28
+ const schema = await this.schemaLoader.loadSchema();
29
+ try {
30
+ const initialSchema = await this.schemaVersionBuilder.buildSchema();
31
+ const result = await this.migrationCreator.prepareMigration(initialSchema, schema, migrationName, {
32
+ skipInitialSchemaValidation
33
+ });
34
+ if (result === null) {
35
+ console.log("Nothing to do");
36
+ return;
37
+ }
38
+ this.migrationPrinter.printMigrationDescription(result.initialSchema, result.migration, { noSql: true });
39
+ if (!yes) {
40
+ const { action } = await prompts({
41
+ type: "select",
42
+ name: "action",
43
+ message: "Do you want to continue?",
44
+ choices: [
45
+ { value: "yes", title: "Yes" },
46
+ ...!shouldExecute ? [{ value: "execute", title: "Yes and execute immediately" }] : [],
47
+ { value: "no", title: "Abort" }
48
+ ]
49
+ });
50
+ if (!action || action === "no") {
51
+ console.log("Aborting");
52
+ return;
53
+ }
54
+ if (action === "execute") {
55
+ shouldExecute = true;
56
+ }
57
+ }
58
+ const filename = await this.migrationCreator.saveMigration(result.migration);
59
+ console.log(`${filename} created`);
60
+ } catch (e) {
61
+ if (e instanceof schemaMigrations.InvalidSchemaException) {
62
+ SchemaValidationPrinter.printValidationErrors(e.validationErrors, e.message);
63
+ return;
64
+ }
65
+ throw e;
66
+ }
67
+ if (shouldExecute) {
68
+ await this.migrationExecutorFacade.execute({
69
+ force: false,
70
+ requireConfirmation: !yes
71
+ });
72
+ }
73
+ }
74
+ }
75
+ exports.MigrationDiffCommand = MigrationDiffCommand;
76
+ //# sourceMappingURL=MigrationDiffCommand.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MigrationDiffCommand.cjs","sources":["../../../../../../packages/cli/src/commands/migrations/MigrationDiffCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration, Input } from '@contember/cli-common'\nimport { InvalidSchemaException } from '@contember/schema-migrations'\nimport prompts from 'prompts'\nimport { MigrationCreator, SchemaVersionBuilder } from '@contember/migrations-client'\nimport { SchemaLoader } from '../../lib/schema/SchemaLoader'\nimport { MigrationPrinter } from '../../lib/migrations/MigrationPrinter'\nimport { MigrationExecutionFacade } from '../../lib/migrations/MigrationExecutionFacade'\nimport { printValidationErrors } from '../../lib/schema/SchemaValidationPrinter'\n\ntype Args = {\n\tmigrationName: string\n}\n\ntype Options = {\n\texecute?: true\n\tyes?: true\n\t'skip-initial-schema-validation'?: true\n}\n\nexport class MigrationDiffCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly schemaLoader: SchemaLoader,\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t\tprivate readonly migrationCreator: MigrationCreator,\n\t\tprivate readonly migrationPrinter: MigrationPrinter,\n\t\tprivate readonly migrationExecutorFacade: MigrationExecutionFacade,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Creates schema migration diff')\n\t\tconfiguration.argument('migrationName')\n\t\tconfiguration.option('execute').valueNone()\n\t\tconfiguration //\n\t\t\t.option('yes')\n\t\t\t.valueNone()\n\t\t\t.description('Do not ask for confirmation.')\n\n\t\tconfiguration.option('skip-initial-schema-validation')\n\t}\n\n\tprotected async execute(input: Input<Args, Options>): Promise<void> {\n\t\tconst migrationName = input.getArgument('migrationName')\n\t\tlet shouldExecute = input.getOption('execute')\n\t\tconst yes = input.getOption('yes')\n\t\tconst skipInitialSchemaValidation = input.getOption('skip-initial-schema-validation') === true\n\n\t\tconst schema = await this.schemaLoader.loadSchema()\n\t\ttry {\n\t\t\tconst initialSchema = await this.schemaVersionBuilder.buildSchema()\n\t\t\tconst result = await this.migrationCreator.prepareMigration(initialSchema, schema, migrationName, {\n\t\t\t\tskipInitialSchemaValidation: skipInitialSchemaValidation,\n\t\t\t})\n\t\t\tif (result === null) {\n\t\t\t\tconsole.log('Nothing to do')\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.migrationPrinter.printMigrationDescription(result.initialSchema, result.migration, { noSql: true })\n\n\n\t\t\tif (!yes) {\n\t\t\t\tconst { action } = await prompts({\n\t\t\t\t\ttype: 'select',\n\t\t\t\t\tname: 'action',\n\t\t\t\t\tmessage: 'Do you want to continue?',\n\t\t\t\t\tchoices: [\n\t\t\t\t\t\t{ value: 'yes', title: 'Yes' },\n\t\t\t\t\t\t...(!shouldExecute ? [{ value: 'execute', title: 'Yes and execute immediately' }] : []),\n\t\t\t\t\t\t{ value: 'no', title: 'Abort' },\n\t\t\t\t\t],\n\t\t\t\t})\n\t\t\t\tif (!action || action === 'no') {\n\t\t\t\t\tconsole.log('Aborting')\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif (action === 'execute') {\n\t\t\t\t\tshouldExecute = true\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst filename = await this.migrationCreator.saveMigration(result.migration)\n\n\t\t\tconsole.log(`${filename} created`)\n\n\t\t} catch (e) {\n\t\t\tif (e instanceof InvalidSchemaException) {\n\t\t\t\tprintValidationErrors(e.validationErrors, e.message)\n\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthrow e\n\t\t}\n\n\t\tif (shouldExecute) {\n\t\t\tawait this.migrationExecutorFacade.execute({\n\t\t\t\tforce: false,\n\t\t\t\trequireConfirmation: !yes,\n\t\t\t})\n\t\t}\n\t}\n}\n"],"names":["Command","InvalidSchemaException","printValidationErrors"],"mappings":";;;;;;AAmBO,MAAM,6BAA6BA,UAAAA,QAAuB;AAAA,EAChE,YACkB,cACA,sBACA,kBACA,kBACA,yBAChB;AACK;AANW,SAAA,eAAA;AACA,SAAA,uBAAA;AACA,SAAA,mBAAA;AACA,SAAA,mBAAA;AACA,SAAA,0BAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,+BAA+B;AACzD,kBAAc,SAAS,eAAe;AACxB,kBAAA,OAAO,SAAS,EAAE,UAAU;AAC1C,kBACE,OAAO,KAAK,EACZ,UAAU,EACV,YAAY,8BAA8B;AAE5C,kBAAc,OAAO,gCAAgC;AAAA,EACtD;AAAA,EAEA,MAAgB,QAAQ,OAA4C;AAC7D,UAAA,gBAAgB,MAAM,YAAY,eAAe;AACnD,QAAA,gBAAgB,MAAM,UAAU,SAAS;AACvC,UAAA,MAAM,MAAM,UAAU,KAAK;AACjC,UAAM,8BAA8B,MAAM,UAAU,gCAAgC,MAAM;AAE1F,UAAM,SAAS,MAAM,KAAK,aAAa,WAAW;AAC9C,QAAA;AACH,YAAM,gBAAgB,MAAM,KAAK,qBAAqB,YAAY;AAClE,YAAM,SAAS,MAAM,KAAK,iBAAiB,iBAAiB,eAAe,QAAQ,eAAe;AAAA,QACjG;AAAA,MAAA,CACA;AACD,UAAI,WAAW,MAAM;AACpB,gBAAQ,IAAI,eAAe;AAC3B;AAAA,MACD;AACK,WAAA,iBAAiB,0BAA0B,OAAO,eAAe,OAAO,WAAW,EAAE,OAAO,KAAA,CAAM;AAGvG,UAAI,CAAC,KAAK;AACT,cAAM,EAAE,WAAW,MAAM,QAAQ;AAAA,UAChC,MAAM;AAAA,UACN,MAAM;AAAA,UACN,SAAS;AAAA,UACT,SAAS;AAAA,YACR,EAAE,OAAO,OAAO,OAAO,MAAM;AAAA,YAC7B,GAAI,CAAC,gBAAgB,CAAC,EAAE,OAAO,WAAW,OAAO,8BAA+B,CAAA,IAAI,CAAC;AAAA,YACrF,EAAE,OAAO,MAAM,OAAO,QAAQ;AAAA,UAC/B;AAAA,QAAA,CACA;AACG,YAAA,CAAC,UAAU,WAAW,MAAM;AAC/B,kBAAQ,IAAI,UAAU;AACtB;AAAA,QACD;AACA,YAAI,WAAW,WAAW;AACT,0BAAA;AAAA,QACjB;AAAA,MACD;AAEA,YAAM,WAAW,MAAM,KAAK,iBAAiB,cAAc,OAAO,SAAS;AAEnE,cAAA,IAAI,GAAG,QAAQ,UAAU;AAAA,aAEzB,GAAG;AACX,UAAI,aAAaC,iBAAAA,wBAAwB;AAClBC,gCAAAA,sBAAA,EAAE,kBAAkB,EAAE,OAAO;AAEnD;AAAA,MACD;AACM,YAAA;AAAA,IACP;AAEA,QAAI,eAAe;AACZ,YAAA,KAAK,wBAAwB,QAAQ;AAAA,QAC1C,OAAO;AAAA,QACP,qBAAqB,CAAC;AAAA,MAAA,CACtB;AAAA,IACF;AAAA,EACD;AACD;;"}
@@ -0,0 +1,76 @@
1
+ import { Command } from "@contember/cli-common";
2
+ import { InvalidSchemaException } from "@contember/schema-migrations";
3
+ import prompts from "prompts";
4
+ import { printValidationErrors } from "../../lib/schema/SchemaValidationPrinter.js";
5
+ class MigrationDiffCommand extends Command {
6
+ constructor(schemaLoader, schemaVersionBuilder, migrationCreator, migrationPrinter, migrationExecutorFacade) {
7
+ super();
8
+ this.schemaLoader = schemaLoader;
9
+ this.schemaVersionBuilder = schemaVersionBuilder;
10
+ this.migrationCreator = migrationCreator;
11
+ this.migrationPrinter = migrationPrinter;
12
+ this.migrationExecutorFacade = migrationExecutorFacade;
13
+ }
14
+ configure(configuration) {
15
+ configuration.description("Creates schema migration diff");
16
+ configuration.argument("migrationName");
17
+ configuration.option("execute").valueNone();
18
+ configuration.option("yes").valueNone().description("Do not ask for confirmation.");
19
+ configuration.option("skip-initial-schema-validation");
20
+ }
21
+ async execute(input) {
22
+ const migrationName = input.getArgument("migrationName");
23
+ let shouldExecute = input.getOption("execute");
24
+ const yes = input.getOption("yes");
25
+ const skipInitialSchemaValidation = input.getOption("skip-initial-schema-validation") === true;
26
+ const schema = await this.schemaLoader.loadSchema();
27
+ try {
28
+ const initialSchema = await this.schemaVersionBuilder.buildSchema();
29
+ const result = await this.migrationCreator.prepareMigration(initialSchema, schema, migrationName, {
30
+ skipInitialSchemaValidation
31
+ });
32
+ if (result === null) {
33
+ console.log("Nothing to do");
34
+ return;
35
+ }
36
+ this.migrationPrinter.printMigrationDescription(result.initialSchema, result.migration, { noSql: true });
37
+ if (!yes) {
38
+ const { action } = await prompts({
39
+ type: "select",
40
+ name: "action",
41
+ message: "Do you want to continue?",
42
+ choices: [
43
+ { value: "yes", title: "Yes" },
44
+ ...!shouldExecute ? [{ value: "execute", title: "Yes and execute immediately" }] : [],
45
+ { value: "no", title: "Abort" }
46
+ ]
47
+ });
48
+ if (!action || action === "no") {
49
+ console.log("Aborting");
50
+ return;
51
+ }
52
+ if (action === "execute") {
53
+ shouldExecute = true;
54
+ }
55
+ }
56
+ const filename = await this.migrationCreator.saveMigration(result.migration);
57
+ console.log(`${filename} created`);
58
+ } catch (e) {
59
+ if (e instanceof InvalidSchemaException) {
60
+ printValidationErrors(e.validationErrors, e.message);
61
+ return;
62
+ }
63
+ throw e;
64
+ }
65
+ if (shouldExecute) {
66
+ await this.migrationExecutorFacade.execute({
67
+ force: false,
68
+ requireConfirmation: !yes
69
+ });
70
+ }
71
+ }
72
+ }
73
+ export {
74
+ MigrationDiffCommand
75
+ };
76
+ //# sourceMappingURL=MigrationDiffCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MigrationDiffCommand.js","sources":["../../../../../../packages/cli/src/commands/migrations/MigrationDiffCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration, Input } from '@contember/cli-common'\nimport { InvalidSchemaException } from '@contember/schema-migrations'\nimport prompts from 'prompts'\nimport { MigrationCreator, SchemaVersionBuilder } from '@contember/migrations-client'\nimport { SchemaLoader } from '../../lib/schema/SchemaLoader'\nimport { MigrationPrinter } from '../../lib/migrations/MigrationPrinter'\nimport { MigrationExecutionFacade } from '../../lib/migrations/MigrationExecutionFacade'\nimport { printValidationErrors } from '../../lib/schema/SchemaValidationPrinter'\n\ntype Args = {\n\tmigrationName: string\n}\n\ntype Options = {\n\texecute?: true\n\tyes?: true\n\t'skip-initial-schema-validation'?: true\n}\n\nexport class MigrationDiffCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly schemaLoader: SchemaLoader,\n\t\tprivate readonly schemaVersionBuilder: SchemaVersionBuilder,\n\t\tprivate readonly migrationCreator: MigrationCreator,\n\t\tprivate readonly migrationPrinter: MigrationPrinter,\n\t\tprivate readonly migrationExecutorFacade: MigrationExecutionFacade,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Creates schema migration diff')\n\t\tconfiguration.argument('migrationName')\n\t\tconfiguration.option('execute').valueNone()\n\t\tconfiguration //\n\t\t\t.option('yes')\n\t\t\t.valueNone()\n\t\t\t.description('Do not ask for confirmation.')\n\n\t\tconfiguration.option('skip-initial-schema-validation')\n\t}\n\n\tprotected async execute(input: Input<Args, Options>): Promise<void> {\n\t\tconst migrationName = input.getArgument('migrationName')\n\t\tlet shouldExecute = input.getOption('execute')\n\t\tconst yes = input.getOption('yes')\n\t\tconst skipInitialSchemaValidation = input.getOption('skip-initial-schema-validation') === true\n\n\t\tconst schema = await this.schemaLoader.loadSchema()\n\t\ttry {\n\t\t\tconst initialSchema = await this.schemaVersionBuilder.buildSchema()\n\t\t\tconst result = await this.migrationCreator.prepareMigration(initialSchema, schema, migrationName, {\n\t\t\t\tskipInitialSchemaValidation: skipInitialSchemaValidation,\n\t\t\t})\n\t\t\tif (result === null) {\n\t\t\t\tconsole.log('Nothing to do')\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.migrationPrinter.printMigrationDescription(result.initialSchema, result.migration, { noSql: true })\n\n\n\t\t\tif (!yes) {\n\t\t\t\tconst { action } = await prompts({\n\t\t\t\t\ttype: 'select',\n\t\t\t\t\tname: 'action',\n\t\t\t\t\tmessage: 'Do you want to continue?',\n\t\t\t\t\tchoices: [\n\t\t\t\t\t\t{ value: 'yes', title: 'Yes' },\n\t\t\t\t\t\t...(!shouldExecute ? [{ value: 'execute', title: 'Yes and execute immediately' }] : []),\n\t\t\t\t\t\t{ value: 'no', title: 'Abort' },\n\t\t\t\t\t],\n\t\t\t\t})\n\t\t\t\tif (!action || action === 'no') {\n\t\t\t\t\tconsole.log('Aborting')\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif (action === 'execute') {\n\t\t\t\t\tshouldExecute = true\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst filename = await this.migrationCreator.saveMigration(result.migration)\n\n\t\t\tconsole.log(`${filename} created`)\n\n\t\t} catch (e) {\n\t\t\tif (e instanceof InvalidSchemaException) {\n\t\t\t\tprintValidationErrors(e.validationErrors, e.message)\n\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthrow e\n\t\t}\n\n\t\tif (shouldExecute) {\n\t\t\tawait this.migrationExecutorFacade.execute({\n\t\t\t\tforce: false,\n\t\t\t\trequireConfirmation: !yes,\n\t\t\t})\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";;;;AAmBO,MAAM,6BAA6B,QAAuB;AAAA,EAChE,YACkB,cACA,sBACA,kBACA,kBACA,yBAChB;AACK;AANW,SAAA,eAAA;AACA,SAAA,uBAAA;AACA,SAAA,mBAAA;AACA,SAAA,mBAAA;AACA,SAAA,0BAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,+BAA+B;AACzD,kBAAc,SAAS,eAAe;AACxB,kBAAA,OAAO,SAAS,EAAE,UAAU;AAC1C,kBACE,OAAO,KAAK,EACZ,UAAU,EACV,YAAY,8BAA8B;AAE5C,kBAAc,OAAO,gCAAgC;AAAA,EACtD;AAAA,EAEA,MAAgB,QAAQ,OAA4C;AAC7D,UAAA,gBAAgB,MAAM,YAAY,eAAe;AACnD,QAAA,gBAAgB,MAAM,UAAU,SAAS;AACvC,UAAA,MAAM,MAAM,UAAU,KAAK;AACjC,UAAM,8BAA8B,MAAM,UAAU,gCAAgC,MAAM;AAE1F,UAAM,SAAS,MAAM,KAAK,aAAa,WAAW;AAC9C,QAAA;AACH,YAAM,gBAAgB,MAAM,KAAK,qBAAqB,YAAY;AAClE,YAAM,SAAS,MAAM,KAAK,iBAAiB,iBAAiB,eAAe,QAAQ,eAAe;AAAA,QACjG;AAAA,MAAA,CACA;AACD,UAAI,WAAW,MAAM;AACpB,gBAAQ,IAAI,eAAe;AAC3B;AAAA,MACD;AACK,WAAA,iBAAiB,0BAA0B,OAAO,eAAe,OAAO,WAAW,EAAE,OAAO,KAAA,CAAM;AAGvG,UAAI,CAAC,KAAK;AACT,cAAM,EAAE,WAAW,MAAM,QAAQ;AAAA,UAChC,MAAM;AAAA,UACN,MAAM;AAAA,UACN,SAAS;AAAA,UACT,SAAS;AAAA,YACR,EAAE,OAAO,OAAO,OAAO,MAAM;AAAA,YAC7B,GAAI,CAAC,gBAAgB,CAAC,EAAE,OAAO,WAAW,OAAO,8BAA+B,CAAA,IAAI,CAAC;AAAA,YACrF,EAAE,OAAO,MAAM,OAAO,QAAQ;AAAA,UAC/B;AAAA,QAAA,CACA;AACG,YAAA,CAAC,UAAU,WAAW,MAAM;AAC/B,kBAAQ,IAAI,UAAU;AACtB;AAAA,QACD;AACA,YAAI,WAAW,WAAW;AACT,0BAAA;AAAA,QACjB;AAAA,MACD;AAEA,YAAM,WAAW,MAAM,KAAK,iBAAiB,cAAc,OAAO,SAAS;AAEnE,cAAA,IAAI,GAAG,QAAQ,UAAU;AAAA,aAEzB,GAAG;AACX,UAAI,aAAa,wBAAwB;AAClB,8BAAA,EAAE,kBAAkB,EAAE,OAAO;AAEnD;AAAA,MACD;AACM,YAAA;AAAA,IACP;AAEA,QAAI,eAAe;AACZ,YAAA,KAAK,wBAAwB,QAAQ;AAAA,QAC1C,OAAO;AAAA,QACP,qBAAqB,CAAC;AAAA,MAAA,CACtB;AAAA,IACF;AAAA,EACD;AACD;"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const cliCommon = require("@contember/cli-common");
4
+ class MigrationExecuteCommand extends cliCommon.Command {
5
+ constructor(migrationExecutorFacade) {
6
+ super();
7
+ this.migrationExecutorFacade = migrationExecutorFacade;
8
+ }
9
+ configure(configuration) {
10
+ configuration.description("Executes migrations on Contember server.");
11
+ configuration.option("force").description("Ignore migrations order and missing migrations (dev only)");
12
+ configuration.option("until").valueRequired().description("Execute all migrations leading up to, and inclusive of, a specified migration");
13
+ configuration.option("yes").valueNone().description("Do not ask for confirmation.");
14
+ }
15
+ async execute(input) {
16
+ const force = input.getOption("force");
17
+ const until = input.getOption("until");
18
+ await this.migrationExecutorFacade.execute({
19
+ force,
20
+ until,
21
+ requireConfirmation: !input.getOption("yes")
22
+ });
23
+ }
24
+ }
25
+ exports.MigrationExecuteCommand = MigrationExecuteCommand;
26
+ //# sourceMappingURL=MigrationExecuteCommand.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MigrationExecuteCommand.cjs","sources":["../../../../../../packages/cli/src/commands/migrations/MigrationExecuteCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration, Input } from '@contember/cli-common'\nimport { MigrationExecutionFacade } from '../../lib/migrations/MigrationExecutionFacade'\n\ntype Args = {\n}\n\ntype Options = {\n\tuntil?: string\n\tforce: boolean\n\tyes?: boolean\n}\n\nexport class MigrationExecuteCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly migrationExecutorFacade: MigrationExecutionFacade,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Executes migrations on Contember server.')\n\t\tconfiguration.option('force')\n\t\t\t.description('Ignore migrations order and missing migrations (dev only)')\n\t\tconfiguration.option('until')\n\t\t\t.valueRequired()\n\t\t\t.description('Execute all migrations leading up to, and inclusive of, a specified migration')\n\t\tconfiguration //\n\t\t\t.option('yes')\n\t\t\t.valueNone()\n\t\t\t.description('Do not ask for confirmation.')\n\t}\n\n\tprotected async execute(input: Input<Args, Options>): Promise<void> {\n\t\tconst force = input.getOption('force')\n\t\tconst until = input.getOption('until')\n\n\t\tawait this.migrationExecutorFacade.execute({\n\t\t\tforce,\n\t\t\tuntil,\n\t\t\trequireConfirmation: !input.getOption('yes'),\n\t\t})\n\t}\n}\n"],"names":["Command"],"mappings":";;;AAYO,MAAM,gCAAgCA,UAAAA,QAAuB;AAAA,EACnE,YACkB,yBAChB;AACK;AAFW,SAAA,0BAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,0CAA0C;AACpE,kBAAc,OAAO,OAAO,EAC1B,YAAY,2DAA2D;AACzE,kBAAc,OAAO,OAAO,EAC1B,cAAc,EACd,YAAY,+EAA+E;AAC7F,kBACE,OAAO,KAAK,EACZ,UAAU,EACV,YAAY,8BAA8B;AAAA,EAC7C;AAAA,EAEA,MAAgB,QAAQ,OAA4C;AAC7D,UAAA,QAAQ,MAAM,UAAU,OAAO;AAC/B,UAAA,QAAQ,MAAM,UAAU,OAAO;AAE/B,UAAA,KAAK,wBAAwB,QAAQ;AAAA,MAC1C;AAAA,MACA;AAAA,MACA,qBAAqB,CAAC,MAAM,UAAU,KAAK;AAAA,IAAA,CAC3C;AAAA,EACF;AACD;;"}
@@ -0,0 +1,26 @@
1
+ import { Command } from "@contember/cli-common";
2
+ class MigrationExecuteCommand extends Command {
3
+ constructor(migrationExecutorFacade) {
4
+ super();
5
+ this.migrationExecutorFacade = migrationExecutorFacade;
6
+ }
7
+ configure(configuration) {
8
+ configuration.description("Executes migrations on Contember server.");
9
+ configuration.option("force").description("Ignore migrations order and missing migrations (dev only)");
10
+ configuration.option("until").valueRequired().description("Execute all migrations leading up to, and inclusive of, a specified migration");
11
+ configuration.option("yes").valueNone().description("Do not ask for confirmation.");
12
+ }
13
+ async execute(input) {
14
+ const force = input.getOption("force");
15
+ const until = input.getOption("until");
16
+ await this.migrationExecutorFacade.execute({
17
+ force,
18
+ until,
19
+ requireConfirmation: !input.getOption("yes")
20
+ });
21
+ }
22
+ }
23
+ export {
24
+ MigrationExecuteCommand
25
+ };
26
+ //# sourceMappingURL=MigrationExecuteCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MigrationExecuteCommand.js","sources":["../../../../../../packages/cli/src/commands/migrations/MigrationExecuteCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration, Input } from '@contember/cli-common'\nimport { MigrationExecutionFacade } from '../../lib/migrations/MigrationExecutionFacade'\n\ntype Args = {\n}\n\ntype Options = {\n\tuntil?: string\n\tforce: boolean\n\tyes?: boolean\n}\n\nexport class MigrationExecuteCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly migrationExecutorFacade: MigrationExecutionFacade,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Executes migrations on Contember server.')\n\t\tconfiguration.option('force')\n\t\t\t.description('Ignore migrations order and missing migrations (dev only)')\n\t\tconfiguration.option('until')\n\t\t\t.valueRequired()\n\t\t\t.description('Execute all migrations leading up to, and inclusive of, a specified migration')\n\t\tconfiguration //\n\t\t\t.option('yes')\n\t\t\t.valueNone()\n\t\t\t.description('Do not ask for confirmation.')\n\t}\n\n\tprotected async execute(input: Input<Args, Options>): Promise<void> {\n\t\tconst force = input.getOption('force')\n\t\tconst until = input.getOption('until')\n\n\t\tawait this.migrationExecutorFacade.execute({\n\t\t\tforce,\n\t\t\tuntil,\n\t\t\trequireConfirmation: !input.getOption('yes'),\n\t\t})\n\t}\n}\n"],"names":[],"mappings":";AAYO,MAAM,gCAAgC,QAAuB;AAAA,EACnE,YACkB,yBAChB;AACK;AAFW,SAAA,0BAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,0CAA0C;AACpE,kBAAc,OAAO,OAAO,EAC1B,YAAY,2DAA2D;AACzE,kBAAc,OAAO,OAAO,EAC1B,cAAc,EACd,YAAY,+EAA+E;AAC7F,kBACE,OAAO,KAAK,EACZ,UAAU,EACV,YAAY,8BAA8B;AAAA,EAC7C;AAAA,EAEA,MAAgB,QAAQ,OAA4C;AAC7D,UAAA,QAAQ,MAAM,UAAU,OAAO;AAC/B,UAAA,QAAQ,MAAM,UAAU,OAAO;AAE/B,UAAA,KAAK,wBAAwB,QAAQ;AAAA,MAC1C;AAAA,MACA;AAAA,MACA,qBAAqB,CAAC,MAAM,UAAU,KAAK;AAAA,IAAA,CAC3C;AAAA,EACF;AACD;"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const cliCommon = require("@contember/cli-common");
4
+ class MigrationRebaseCommand extends cliCommon.Command {
5
+ constructor(migrationsResolver, migrationRebaseFacade) {
6
+ super();
7
+ this.migrationsResolver = migrationsResolver;
8
+ this.migrationRebaseFacade = migrationRebaseFacade;
9
+ }
10
+ configure(configuration) {
11
+ configuration.description("Rebase migrations on filesystem and in local instance");
12
+ configuration.argument("migration").variadic();
13
+ configuration.option("yes").valueNone().description("Do not ask for confirmation.");
14
+ }
15
+ async execute(input) {
16
+ const migrationNames = input.getArgument("migration");
17
+ const migrations = [];
18
+ for (const migrationName of migrationNames) {
19
+ const migration = await this.migrationsResolver.findSchemaMigrationByVersion(migrationName);
20
+ if (!migration) {
21
+ throw `Migration ${migrationName} not found`;
22
+ }
23
+ migrations.push(migration);
24
+ }
25
+ console.log("Rebasing: " + migrations.map((it) => it.name).join(", "));
26
+ await this.migrationRebaseFacade.rebase(migrations);
27
+ console.log("Done");
28
+ }
29
+ }
30
+ exports.MigrationRebaseCommand = MigrationRebaseCommand;
31
+ //# sourceMappingURL=MigrationRebaseCommand.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MigrationRebaseCommand.cjs","sources":["../../../../../../packages/cli/src/commands/migrations/MigrationRebaseCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration, Input } from '@contember/cli-common'\nimport { Migration, MigrationsResolver } from '@contember/migrations-client'\nimport { MigrationRebaseFacade } from '../../lib/migrations/MigrationRebaseFacade'\n\ntype Args = {\n\tmigration: string[]\n}\n\ntype Options = {\n\tyes?: true\n}\n\nexport class MigrationRebaseCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly migrationsResolver: MigrationsResolver,\n\t\tprivate readonly migrationRebaseFacade: MigrationRebaseFacade,\n\t) {\n\t\tsuper()\n\t}\n\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Rebase migrations on filesystem and in local instance')\n\t\tconfiguration.argument('migration').variadic()\n\t\tconfiguration //\n\t\t\t.option('yes')\n\t\t\t.valueNone()\n\t\t\t.description('Do not ask for confirmation.')\n\t}\n\n\tprotected async execute(input: Input<Args, Options>): Promise<void> {\n\n\t\tconst migrationNames = input.getArgument('migration')\n\n\t\tconst migrations: Migration[] = []\n\t\tfor (const migrationName of migrationNames) {\n\t\t\tconst migration = await this.migrationsResolver.findSchemaMigrationByVersion(migrationName)\n\t\t\tif (!migration) {\n\t\t\t\tthrow `Migration ${migrationName} not found`\n\t\t\t}\n\t\t\tmigrations.push(migration)\n\t\t}\n\n\t\tconsole.log('Rebasing: ' + migrations.map(it => it.name).join(', '))\n\t\tawait this.migrationRebaseFacade.rebase(migrations)\n\t\tconsole.log('Done')\n\t}\n}\n"],"names":["Command"],"mappings":";;;AAYO,MAAM,+BAA+BA,UAAAA,QAAuB;AAAA,EAClE,YACkB,oBACA,uBAChB;AACK;AAHW,SAAA,qBAAA;AACA,SAAA,wBAAA;AAAA,EAGlB;AAAA,EAGU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,uDAAuD;AACnE,kBAAA,SAAS,WAAW,EAAE,SAAS;AAC7C,kBACE,OAAO,KAAK,EACZ,UAAU,EACV,YAAY,8BAA8B;AAAA,EAC7C;AAAA,EAEA,MAAgB,QAAQ,OAA4C;AAE7D,UAAA,iBAAiB,MAAM,YAAY,WAAW;AAEpD,UAAM,aAA0B,CAAA;AAChC,eAAW,iBAAiB,gBAAgB;AAC3C,YAAM,YAAY,MAAM,KAAK,mBAAmB,6BAA6B,aAAa;AAC1F,UAAI,CAAC,WAAW;AACf,cAAM,aAAa,aAAa;AAAA,MACjC;AACA,iBAAW,KAAK,SAAS;AAAA,IAC1B;AAEQ,YAAA,IAAI,eAAe,WAAW,IAAI,CAAA,OAAM,GAAG,IAAI,EAAE,KAAK,IAAI,CAAC;AAC7D,UAAA,KAAK,sBAAsB,OAAO,UAAU;AAClD,YAAQ,IAAI,MAAM;AAAA,EACnB;AACD;;"}
@@ -0,0 +1,31 @@
1
+ import { Command } from "@contember/cli-common";
2
+ class MigrationRebaseCommand extends Command {
3
+ constructor(migrationsResolver, migrationRebaseFacade) {
4
+ super();
5
+ this.migrationsResolver = migrationsResolver;
6
+ this.migrationRebaseFacade = migrationRebaseFacade;
7
+ }
8
+ configure(configuration) {
9
+ configuration.description("Rebase migrations on filesystem and in local instance");
10
+ configuration.argument("migration").variadic();
11
+ configuration.option("yes").valueNone().description("Do not ask for confirmation.");
12
+ }
13
+ async execute(input) {
14
+ const migrationNames = input.getArgument("migration");
15
+ const migrations = [];
16
+ for (const migrationName of migrationNames) {
17
+ const migration = await this.migrationsResolver.findSchemaMigrationByVersion(migrationName);
18
+ if (!migration) {
19
+ throw `Migration ${migrationName} not found`;
20
+ }
21
+ migrations.push(migration);
22
+ }
23
+ console.log("Rebasing: " + migrations.map((it) => it.name).join(", "));
24
+ await this.migrationRebaseFacade.rebase(migrations);
25
+ console.log("Done");
26
+ }
27
+ }
28
+ export {
29
+ MigrationRebaseCommand
30
+ };
31
+ //# sourceMappingURL=MigrationRebaseCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MigrationRebaseCommand.js","sources":["../../../../../../packages/cli/src/commands/migrations/MigrationRebaseCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration, Input } from '@contember/cli-common'\nimport { Migration, MigrationsResolver } from '@contember/migrations-client'\nimport { MigrationRebaseFacade } from '../../lib/migrations/MigrationRebaseFacade'\n\ntype Args = {\n\tmigration: string[]\n}\n\ntype Options = {\n\tyes?: true\n}\n\nexport class MigrationRebaseCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly migrationsResolver: MigrationsResolver,\n\t\tprivate readonly migrationRebaseFacade: MigrationRebaseFacade,\n\t) {\n\t\tsuper()\n\t}\n\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Rebase migrations on filesystem and in local instance')\n\t\tconfiguration.argument('migration').variadic()\n\t\tconfiguration //\n\t\t\t.option('yes')\n\t\t\t.valueNone()\n\t\t\t.description('Do not ask for confirmation.')\n\t}\n\n\tprotected async execute(input: Input<Args, Options>): Promise<void> {\n\n\t\tconst migrationNames = input.getArgument('migration')\n\n\t\tconst migrations: Migration[] = []\n\t\tfor (const migrationName of migrationNames) {\n\t\t\tconst migration = await this.migrationsResolver.findSchemaMigrationByVersion(migrationName)\n\t\t\tif (!migration) {\n\t\t\t\tthrow `Migration ${migrationName} not found`\n\t\t\t}\n\t\t\tmigrations.push(migration)\n\t\t}\n\n\t\tconsole.log('Rebasing: ' + migrations.map(it => it.name).join(', '))\n\t\tawait this.migrationRebaseFacade.rebase(migrations)\n\t\tconsole.log('Done')\n\t}\n}\n"],"names":[],"mappings":";AAYO,MAAM,+BAA+B,QAAuB;AAAA,EAClE,YACkB,oBACA,uBAChB;AACK;AAHW,SAAA,qBAAA;AACA,SAAA,wBAAA;AAAA,EAGlB;AAAA,EAGU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,uDAAuD;AACnE,kBAAA,SAAS,WAAW,EAAE,SAAS;AAC7C,kBACE,OAAO,KAAK,EACZ,UAAU,EACV,YAAY,8BAA8B;AAAA,EAC7C;AAAA,EAEA,MAAgB,QAAQ,OAA4C;AAE7D,UAAA,iBAAiB,MAAM,YAAY,WAAW;AAEpD,UAAM,aAA0B,CAAA;AAChC,eAAW,iBAAiB,gBAAgB;AAC3C,YAAM,YAAY,MAAM,KAAK,mBAAmB,6BAA6B,aAAa;AAC1F,UAAI,CAAC,WAAW;AACf,cAAM,aAAa,aAAa;AAAA,MACjC;AACA,iBAAW,KAAK,SAAS;AAAA,IAC1B;AAEQ,YAAA,IAAI,eAAe,WAAW,IAAI,CAAA,OAAM,GAAG,IAAI,EAAE,KAAK,IAAI,CAAC;AAC7D,UAAA,KAAK,sBAAsB,OAAO,UAAU;AAClD,YAAQ,IAAI,MAAM;AAAA,EACnB;AACD;"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const cliCommon = require("@contember/cli-common");
4
+ const migrationsClient = require("@contember/migrations-client");
5
+ const chalk = require("chalk");
6
+ class MigrationStatusCommand extends cliCommon.Command {
7
+ constructor(migrationsStatusFacade, migrationFilesManager, systemClientProvider, migrationPrinter) {
8
+ super();
9
+ this.migrationsStatusFacade = migrationsStatusFacade;
10
+ this.migrationFilesManager = migrationFilesManager;
11
+ this.systemClientProvider = systemClientProvider;
12
+ this.migrationPrinter = migrationPrinter;
13
+ }
14
+ configure(configuration) {
15
+ configuration.description("Shows status of executed migrations on an instance & sync status");
16
+ configuration.option("only-errors").valueNone().description("Show only migrations with an error.");
17
+ configuration.option("only-to-execute").valueNone().description("Show only migrations to execute.");
18
+ configuration.option("restore-missing").valueNone().description("Restores migrations locally missing");
19
+ }
20
+ async execute(input) {
21
+ const onlyErrors = input.getOption("only-errors");
22
+ const onlyToExecute = input.getOption("only-to-execute");
23
+ const restoreMissing = input.getOption("restore-missing");
24
+ let status = await this.migrationsStatusFacade.resolveMigrationsStatus({});
25
+ if (restoreMissing) {
26
+ const missing = status.errorMigrations.filter((it) => it.state === migrationsClient.MigrationState.EXECUTED_MISSING);
27
+ for (const migration of missing) {
28
+ console.log(`Restoring migration ${migration.name}`);
29
+ const fullMigration = await this.systemClientProvider.get().getExecutedMigration(migration.version);
30
+ await this.migrationFilesManager.createFile(
31
+ JSON.stringify(
32
+ {
33
+ formatVersion: fullMigration.formatVersion,
34
+ modifications: fullMigration.modifications
35
+ },
36
+ void 0,
37
+ " "
38
+ ) + "\n",
39
+ fullMigration.name
40
+ );
41
+ }
42
+ status = await this.migrationsStatusFacade.resolveMigrationsStatus({});
43
+ }
44
+ const filtered = onlyErrors || onlyToExecute ? migrationsClient.sortMigrations([
45
+ ...onlyErrors ? status.errorMigrations : [],
46
+ ...onlyToExecute ? status.migrationsToExecute : []
47
+ ]) : status.allMigrations;
48
+ this.migrationPrinter.printStatusTable(filtered);
49
+ const hasErrors = status.errorMigrations.length > 0;
50
+ if (hasErrors) {
51
+ console.error(chalk.redBright("Some migrations are broken"));
52
+ }
53
+ return hasErrors ? 1 : 0;
54
+ }
55
+ }
56
+ exports.MigrationStatusCommand = MigrationStatusCommand;
57
+ //# sourceMappingURL=MigrationStatusCommand.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MigrationStatusCommand.cjs","sources":["../../../../../../packages/cli/src/commands/migrations/MigrationStatusCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration, Input } from '@contember/cli-common'\nimport { MigrationFilesManager, MigrationState, sortMigrations, SystemClient } from '@contember/migrations-client'\nimport chalk from 'chalk'\nimport { MigrationsStatusFacade } from '../../lib/migrations/MigrationsStatusFacade'\nimport { MigrationPrinter } from '../../lib/migrations/MigrationPrinter'\nimport { SystemClientProvider } from '../../lib/SystemClientProvider'\n\ntype Args = {\n}\n\ntype Options = {\n\t['only-to-execute']?: true\n\t['only-errors']?: true\n\t['restore-missing']?: true\n}\n\nexport class MigrationStatusCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly migrationsStatusFacade: MigrationsStatusFacade,\n\t\tprivate readonly migrationFilesManager: MigrationFilesManager,\n\t\tprivate readonly systemClientProvider: SystemClientProvider,\n\t\tprivate readonly migrationPrinter: MigrationPrinter,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Shows status of executed migrations on an instance & sync status')\n\t\tconfiguration //\n\t\t\t.option('only-errors')\n\t\t\t.valueNone()\n\t\t\t.description('Show only migrations with an error.')\n\t\tconfiguration //\n\t\t\t.option('only-to-execute')\n\t\t\t.valueNone()\n\t\t\t.description('Show only migrations to execute.')\n\t\tconfiguration //\n\t\t\t.option('restore-missing')\n\t\t\t.valueNone()\n\t\t\t.description('Restores migrations locally missing')\n\t}\n\n\tprotected async execute(input: Input<Args, Options>): Promise<number> {\n\n\t\tconst onlyErrors = input.getOption('only-errors')\n\t\tconst onlyToExecute = input.getOption('only-to-execute')\n\t\tconst restoreMissing = input.getOption('restore-missing')\n\n\t\tlet status = await this.migrationsStatusFacade.resolveMigrationsStatus({})\n\n\t\tif (restoreMissing) {\n\t\t\tconst missing = status.errorMigrations.filter(it => it.state === MigrationState.EXECUTED_MISSING)\n\t\t\tfor (const migration of missing) {\n\t\t\t\tconsole.log(`Restoring migration ${migration.name}`)\n\t\t\t\tconst fullMigration = await this.systemClientProvider.get().getExecutedMigration(migration.version)\n\t\t\t\tawait this.migrationFilesManager.createFile(\n\t\t\t\t\tJSON.stringify(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tformatVersion: fullMigration.formatVersion,\n\t\t\t\t\t\t\tmodifications: fullMigration.modifications,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t'\\t',\n\t\t\t\t\t) + '\\n',\n\t\t\t\t\tfullMigration.name,\n\t\t\t\t)\n\t\t\t}\n\t\t\tstatus = await this.migrationsStatusFacade.resolveMigrationsStatus({})\n\t\t}\n\n\n\n\t\tconst filtered =\n\t\t\tonlyErrors || onlyToExecute\n\t\t\t\t? sortMigrations([\n\t\t\t\t\t...(onlyErrors ? status.errorMigrations : []),\n\t\t\t\t\t...(onlyToExecute ? status.migrationsToExecute : []),\n\t\t\t\t ])\n\t\t\t\t: status.allMigrations\n\n\t\tthis.migrationPrinter.printStatusTable(filtered)\n\n\t\tconst hasErrors = status.errorMigrations.length > 0\n\n\t\tif (hasErrors) {\n\t\t\tconsole.error(chalk.redBright('Some migrations are broken'))\n\t\t}\n\n\t\treturn hasErrors ? 1 : 0\n\t}\n}\n"],"names":["Command","MigrationState","sortMigrations"],"mappings":";;;;;AAgBO,MAAM,+BAA+BA,UAAAA,QAAuB;AAAA,EAClE,YACkB,wBACA,uBACA,sBACA,kBAChB;AACK;AALW,SAAA,yBAAA;AACA,SAAA,wBAAA;AACA,SAAA,uBAAA;AACA,SAAA,mBAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,kEAAkE;AAC5F,kBACE,OAAO,aAAa,EACpB,UAAU,EACV,YAAY,qCAAqC;AACnD,kBACE,OAAO,iBAAiB,EACxB,UAAU,EACV,YAAY,kCAAkC;AAChD,kBACE,OAAO,iBAAiB,EACxB,UAAU,EACV,YAAY,qCAAqC;AAAA,EACpD;AAAA,EAEA,MAAgB,QAAQ,OAA8C;AAE/D,UAAA,aAAa,MAAM,UAAU,aAAa;AAC1C,UAAA,gBAAgB,MAAM,UAAU,iBAAiB;AACjD,UAAA,iBAAiB,MAAM,UAAU,iBAAiB;AAExD,QAAI,SAAS,MAAM,KAAK,uBAAuB,wBAAwB,CAAE,CAAA;AAEzE,QAAI,gBAAgB;AACb,YAAA,UAAU,OAAO,gBAAgB,OAAO,QAAM,GAAG,UAAUC,gCAAe,gBAAgB;AAChG,iBAAW,aAAa,SAAS;AAChC,gBAAQ,IAAI,uBAAuB,UAAU,IAAI,EAAE;AAC7C,cAAA,gBAAgB,MAAM,KAAK,qBAAqB,MAAM,qBAAqB,UAAU,OAAO;AAClG,cAAM,KAAK,sBAAsB;AAAA,UAChC,KAAK;AAAA,YACJ;AAAA,cACC,eAAe,cAAc;AAAA,cAC7B,eAAe,cAAc;AAAA,YAC9B;AAAA,YACA;AAAA,YACA;AAAA,UAAA,IACG;AAAA,UACJ,cAAc;AAAA,QAAA;AAAA,MAEhB;AACA,eAAS,MAAM,KAAK,uBAAuB,wBAAwB,CAAE,CAAA;AAAA,IACtE;AAIM,UAAA,WACL,cAAc,gBACXC,gCAAe;AAAA,MAChB,GAAI,aAAa,OAAO,kBAAkB,CAAC;AAAA,MAC3C,GAAI,gBAAgB,OAAO,sBAAsB,CAAC;AAAA,IAAA,CAChD,IACD,OAAO;AAEN,SAAA,iBAAiB,iBAAiB,QAAQ;AAEzC,UAAA,YAAY,OAAO,gBAAgB,SAAS;AAElD,QAAI,WAAW;AACd,cAAQ,MAAM,MAAM,UAAU,4BAA4B,CAAC;AAAA,IAC5D;AAEA,WAAO,YAAY,IAAI;AAAA,EACxB;AACD;;"}
@@ -0,0 +1,57 @@
1
+ import { Command } from "@contember/cli-common";
2
+ import { MigrationState, sortMigrations } from "@contember/migrations-client";
3
+ import chalk from "chalk";
4
+ class MigrationStatusCommand extends Command {
5
+ constructor(migrationsStatusFacade, migrationFilesManager, systemClientProvider, migrationPrinter) {
6
+ super();
7
+ this.migrationsStatusFacade = migrationsStatusFacade;
8
+ this.migrationFilesManager = migrationFilesManager;
9
+ this.systemClientProvider = systemClientProvider;
10
+ this.migrationPrinter = migrationPrinter;
11
+ }
12
+ configure(configuration) {
13
+ configuration.description("Shows status of executed migrations on an instance & sync status");
14
+ configuration.option("only-errors").valueNone().description("Show only migrations with an error.");
15
+ configuration.option("only-to-execute").valueNone().description("Show only migrations to execute.");
16
+ configuration.option("restore-missing").valueNone().description("Restores migrations locally missing");
17
+ }
18
+ async execute(input) {
19
+ const onlyErrors = input.getOption("only-errors");
20
+ const onlyToExecute = input.getOption("only-to-execute");
21
+ const restoreMissing = input.getOption("restore-missing");
22
+ let status = await this.migrationsStatusFacade.resolveMigrationsStatus({});
23
+ if (restoreMissing) {
24
+ const missing = status.errorMigrations.filter((it) => it.state === MigrationState.EXECUTED_MISSING);
25
+ for (const migration of missing) {
26
+ console.log(`Restoring migration ${migration.name}`);
27
+ const fullMigration = await this.systemClientProvider.get().getExecutedMigration(migration.version);
28
+ await this.migrationFilesManager.createFile(
29
+ JSON.stringify(
30
+ {
31
+ formatVersion: fullMigration.formatVersion,
32
+ modifications: fullMigration.modifications
33
+ },
34
+ void 0,
35
+ " "
36
+ ) + "\n",
37
+ fullMigration.name
38
+ );
39
+ }
40
+ status = await this.migrationsStatusFacade.resolveMigrationsStatus({});
41
+ }
42
+ const filtered = onlyErrors || onlyToExecute ? sortMigrations([
43
+ ...onlyErrors ? status.errorMigrations : [],
44
+ ...onlyToExecute ? status.migrationsToExecute : []
45
+ ]) : status.allMigrations;
46
+ this.migrationPrinter.printStatusTable(filtered);
47
+ const hasErrors = status.errorMigrations.length > 0;
48
+ if (hasErrors) {
49
+ console.error(chalk.redBright("Some migrations are broken"));
50
+ }
51
+ return hasErrors ? 1 : 0;
52
+ }
53
+ }
54
+ export {
55
+ MigrationStatusCommand
56
+ };
57
+ //# sourceMappingURL=MigrationStatusCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MigrationStatusCommand.js","sources":["../../../../../../packages/cli/src/commands/migrations/MigrationStatusCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration, Input } from '@contember/cli-common'\nimport { MigrationFilesManager, MigrationState, sortMigrations, SystemClient } from '@contember/migrations-client'\nimport chalk from 'chalk'\nimport { MigrationsStatusFacade } from '../../lib/migrations/MigrationsStatusFacade'\nimport { MigrationPrinter } from '../../lib/migrations/MigrationPrinter'\nimport { SystemClientProvider } from '../../lib/SystemClientProvider'\n\ntype Args = {\n}\n\ntype Options = {\n\t['only-to-execute']?: true\n\t['only-errors']?: true\n\t['restore-missing']?: true\n}\n\nexport class MigrationStatusCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly migrationsStatusFacade: MigrationsStatusFacade,\n\t\tprivate readonly migrationFilesManager: MigrationFilesManager,\n\t\tprivate readonly systemClientProvider: SystemClientProvider,\n\t\tprivate readonly migrationPrinter: MigrationPrinter,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Shows status of executed migrations on an instance & sync status')\n\t\tconfiguration //\n\t\t\t.option('only-errors')\n\t\t\t.valueNone()\n\t\t\t.description('Show only migrations with an error.')\n\t\tconfiguration //\n\t\t\t.option('only-to-execute')\n\t\t\t.valueNone()\n\t\t\t.description('Show only migrations to execute.')\n\t\tconfiguration //\n\t\t\t.option('restore-missing')\n\t\t\t.valueNone()\n\t\t\t.description('Restores migrations locally missing')\n\t}\n\n\tprotected async execute(input: Input<Args, Options>): Promise<number> {\n\n\t\tconst onlyErrors = input.getOption('only-errors')\n\t\tconst onlyToExecute = input.getOption('only-to-execute')\n\t\tconst restoreMissing = input.getOption('restore-missing')\n\n\t\tlet status = await this.migrationsStatusFacade.resolveMigrationsStatus({})\n\n\t\tif (restoreMissing) {\n\t\t\tconst missing = status.errorMigrations.filter(it => it.state === MigrationState.EXECUTED_MISSING)\n\t\t\tfor (const migration of missing) {\n\t\t\t\tconsole.log(`Restoring migration ${migration.name}`)\n\t\t\t\tconst fullMigration = await this.systemClientProvider.get().getExecutedMigration(migration.version)\n\t\t\t\tawait this.migrationFilesManager.createFile(\n\t\t\t\t\tJSON.stringify(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tformatVersion: fullMigration.formatVersion,\n\t\t\t\t\t\t\tmodifications: fullMigration.modifications,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t'\\t',\n\t\t\t\t\t) + '\\n',\n\t\t\t\t\tfullMigration.name,\n\t\t\t\t)\n\t\t\t}\n\t\t\tstatus = await this.migrationsStatusFacade.resolveMigrationsStatus({})\n\t\t}\n\n\n\n\t\tconst filtered =\n\t\t\tonlyErrors || onlyToExecute\n\t\t\t\t? sortMigrations([\n\t\t\t\t\t...(onlyErrors ? status.errorMigrations : []),\n\t\t\t\t\t...(onlyToExecute ? status.migrationsToExecute : []),\n\t\t\t\t ])\n\t\t\t\t: status.allMigrations\n\n\t\tthis.migrationPrinter.printStatusTable(filtered)\n\n\t\tconst hasErrors = status.errorMigrations.length > 0\n\n\t\tif (hasErrors) {\n\t\t\tconsole.error(chalk.redBright('Some migrations are broken'))\n\t\t}\n\n\t\treturn hasErrors ? 1 : 0\n\t}\n}\n"],"names":[],"mappings":";;;AAgBO,MAAM,+BAA+B,QAAuB;AAAA,EAClE,YACkB,wBACA,uBACA,sBACA,kBAChB;AACK;AALW,SAAA,yBAAA;AACA,SAAA,wBAAA;AACA,SAAA,uBAAA;AACA,SAAA,mBAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,kEAAkE;AAC5F,kBACE,OAAO,aAAa,EACpB,UAAU,EACV,YAAY,qCAAqC;AACnD,kBACE,OAAO,iBAAiB,EACxB,UAAU,EACV,YAAY,kCAAkC;AAChD,kBACE,OAAO,iBAAiB,EACxB,UAAU,EACV,YAAY,qCAAqC;AAAA,EACpD;AAAA,EAEA,MAAgB,QAAQ,OAA8C;AAE/D,UAAA,aAAa,MAAM,UAAU,aAAa;AAC1C,UAAA,gBAAgB,MAAM,UAAU,iBAAiB;AACjD,UAAA,iBAAiB,MAAM,UAAU,iBAAiB;AAExD,QAAI,SAAS,MAAM,KAAK,uBAAuB,wBAAwB,CAAE,CAAA;AAEzE,QAAI,gBAAgB;AACb,YAAA,UAAU,OAAO,gBAAgB,OAAO,QAAM,GAAG,UAAU,eAAe,gBAAgB;AAChG,iBAAW,aAAa,SAAS;AAChC,gBAAQ,IAAI,uBAAuB,UAAU,IAAI,EAAE;AAC7C,cAAA,gBAAgB,MAAM,KAAK,qBAAqB,MAAM,qBAAqB,UAAU,OAAO;AAClG,cAAM,KAAK,sBAAsB;AAAA,UAChC,KAAK;AAAA,YACJ;AAAA,cACC,eAAe,cAAc;AAAA,cAC7B,eAAe,cAAc;AAAA,YAC9B;AAAA,YACA;AAAA,YACA;AAAA,UAAA,IACG;AAAA,UACJ,cAAc;AAAA,QAAA;AAAA,MAEhB;AACA,eAAS,MAAM,KAAK,uBAAuB,wBAAwB,CAAE,CAAA;AAAA,IACtE;AAIM,UAAA,WACL,cAAc,gBACX,eAAe;AAAA,MAChB,GAAI,aAAa,OAAO,kBAAkB,CAAC;AAAA,MAC3C,GAAI,gBAAgB,OAAO,sBAAsB,CAAC;AAAA,IAAA,CAChD,IACD,OAAO;AAEN,SAAA,iBAAiB,iBAAiB,QAAQ;AAEzC,UAAA,YAAY,OAAO,gBAAgB,SAAS;AAElD,QAAI,WAAW;AACd,cAAQ,MAAM,MAAM,UAAU,4BAA4B,CAAC;AAAA,IAC5D;AAEA,WAAO,YAAY,IAAI;AAAA,EACxB;AACD;"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const cliCommon = require("@contember/cli-common");
4
+ class VersionCommand extends cliCommon.Command {
5
+ constructor(version) {
6
+ super();
7
+ this.version = version;
8
+ }
9
+ configure(configuration) {
10
+ configuration.description("Prints Contember CLI version");
11
+ }
12
+ async execute() {
13
+ console.log(this.version);
14
+ return 0;
15
+ }
16
+ }
17
+ exports.VersionCommand = VersionCommand;
18
+ //# sourceMappingURL=VersionCommand.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VersionCommand.cjs","sources":["../../../../../../packages/cli/src/commands/misc/VersionCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration } from '@contember/cli-common'\n\nexport class VersionCommand extends Command<{}, {}> {\n\tconstructor(\n\t\tprivate readonly version: string,\n\t) {\n\t\tsuper()\n\t}\n\tprotected configure(configuration: CommandConfiguration<{}, {}>): void {\n\t\tconfiguration.description('Prints Contember CLI version')\n\t}\n\n\tprotected async execute(): Promise<void | number> {\n\t\tconsole.log(this.version)\n\t\treturn 0\n\t}\n}\n"],"names":["Command"],"mappings":";;;AAEO,MAAM,uBAAuBA,UAAAA,QAAgB;AAAA,EACnD,YACkB,SAChB;AACK;AAFW,SAAA,UAAA;AAAA,EAGlB;AAAA,EACU,UAAU,eAAmD;AACtE,kBAAc,YAAY,8BAA8B;AAAA,EACzD;AAAA,EAEA,MAAgB,UAAkC;AACzC,YAAA,IAAI,KAAK,OAAO;AACjB,WAAA;AAAA,EACR;AACD;;"}
@@ -0,0 +1,18 @@
1
+ import { Command } from "@contember/cli-common";
2
+ class VersionCommand extends Command {
3
+ constructor(version) {
4
+ super();
5
+ this.version = version;
6
+ }
7
+ configure(configuration) {
8
+ configuration.description("Prints Contember CLI version");
9
+ }
10
+ async execute() {
11
+ console.log(this.version);
12
+ return 0;
13
+ }
14
+ }
15
+ export {
16
+ VersionCommand
17
+ };
18
+ //# sourceMappingURL=VersionCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VersionCommand.js","sources":["../../../../../../packages/cli/src/commands/misc/VersionCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration } from '@contember/cli-common'\n\nexport class VersionCommand extends Command<{}, {}> {\n\tconstructor(\n\t\tprivate readonly version: string,\n\t) {\n\t\tsuper()\n\t}\n\tprotected configure(configuration: CommandConfiguration<{}, {}>): void {\n\t\tconfiguration.description('Prints Contember CLI version')\n\t}\n\n\tprotected async execute(): Promise<void | number> {\n\t\tconsole.log(this.version)\n\t\treturn 0\n\t}\n}\n"],"names":[],"mappings":";AAEO,MAAM,uBAAuB,QAAgB;AAAA,EACnD,YACkB,SAChB;AACK;AAFW,SAAA,UAAA;AAAA,EAGlB;AAAA,EACU,UAAU,eAAmD;AACtE,kBAAc,YAAY,8BAA8B;AAAA,EACzD;AAAA,EAEA,MAAgB,UAAkC;AACzC,YAAA,IAAI,KAAK,OAAO;AACjB,WAAA;AAAA,EACR;AACD;"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const cliCommon = require("@contember/cli-common");
4
+ const projectDescribe = require("../../lib/project/docs/projectDescribe.cjs");
5
+ const fs = require("node:fs/promises");
6
+ const node_path = require("node:path");
7
+ const SchemaValidationHelper = require("../../lib/schema/SchemaValidationHelper.cjs");
8
+ class ProjectGenerateDocumentationCommand extends cliCommon.Command {
9
+ constructor(schemaLoader) {
10
+ super();
11
+ this.schemaLoader = schemaLoader;
12
+ }
13
+ configure(configuration) {
14
+ configuration.description("Generates HTML documentation from project schema");
15
+ configuration.option("output").valueRequired().description('file name or "-" for stdout');
16
+ configuration.option("name").valueRequired().description("project name (for the title)");
17
+ }
18
+ async execute(input) {
19
+ const schema = await this.schemaLoader.loadSchema();
20
+ if (!SchemaValidationHelper.validateSchemaAndPrintErrors(schema, "Defined schema is invalid:")) {
21
+ return 1;
22
+ }
23
+ const name = input.getOption("name") ?? "Contember project";
24
+ const html = await projectDescribe.renderProjectInfoHtml(schema, name);
25
+ const output = input.getOption("output") ?? `${name.toLowerCase().replace(/\s+/g, "-")}.html`;
26
+ if (output === "-") {
27
+ console.log(html);
28
+ } else {
29
+ console.log(`Documentation saved to ${output}`);
30
+ await fs.writeFile(node_path.join(process.cwd(), output), html);
31
+ }
32
+ return 0;
33
+ }
34
+ }
35
+ exports.ProjectGenerateDocumentationCommand = ProjectGenerateDocumentationCommand;
36
+ //# sourceMappingURL=ProjectGenerateDocumentationCommand.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProjectGenerateDocumentationCommand.cjs","sources":["../../../../../../packages/cli/src/commands/project/ProjectGenerateDocumentationCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration, Input } from '@contember/cli-common'\nimport { renderProjectInfoHtml } from '../../lib/project/docs/projectDescribe'\nimport { writeFile } from 'node:fs/promises'\nimport { join } from 'node:path'\nimport { SchemaLoader } from '../../lib/schema/SchemaLoader'\nimport { validateSchemaAndPrintErrors } from '../../lib/schema/SchemaValidationHelper'\n\ntype Args = {\n}\n\ntype Options = {\n\tname?: string\n\toutput?: string\n}\n\nexport class ProjectGenerateDocumentationCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly schemaLoader: SchemaLoader,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Generates HTML documentation from project schema')\n\t\tconfiguration.option('output').valueRequired().description('file name or \"-\" for stdout')\n\t\tconfiguration.option('name').valueRequired().description('project name (for the title)')\n\t}\n\n\tprotected async execute(input: Input<Args, Options>): Promise<number> {\n\t\tconst schema = await this.schemaLoader.loadSchema()\n\t\tif (!validateSchemaAndPrintErrors(schema, 'Defined schema is invalid:')) {\n\t\t\treturn 1\n\t\t}\n\t\tconst name = input.getOption('name') ?? 'Contember project'\n\n\t\tconst html = await renderProjectInfoHtml(schema, name)\n\t\tconst output = input.getOption('output') ?? `${name.toLowerCase().replace(/\\s+/g, '-')}.html`\n\t\tif (output === '-') {\n\t\t\tconsole.log(html)\n\t\t} else {\n\t\t\tconsole.log(`Documentation saved to ${output}`)\n\t\t\tawait writeFile(join(process.cwd(), output), html)\n\t\t}\n\n\t\treturn 0\n\t}\n}\n"],"names":["Command","validateSchemaAndPrintErrors","renderProjectInfoHtml","writeFile","join"],"mappings":";;;;;;;AAeO,MAAM,4CAA4CA,UAAAA,QAAuB;AAAA,EAC/E,YACkB,cAChB;AACK;AAFW,SAAA,eAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,kDAAkD;AAC5E,kBAAc,OAAO,QAAQ,EAAE,cAAc,EAAE,YAAY,6BAA6B;AACxF,kBAAc,OAAO,MAAM,EAAE,cAAc,EAAE,YAAY,8BAA8B;AAAA,EACxF;AAAA,EAEA,MAAgB,QAAQ,OAA8C;AACrE,UAAM,SAAS,MAAM,KAAK,aAAa,WAAW;AAClD,QAAI,CAACC,uBAAA,6BAA6B,QAAQ,4BAA4B,GAAG;AACjE,aAAA;AAAA,IACR;AACA,UAAM,OAAO,MAAM,UAAU,MAAM,KAAK;AAExC,UAAM,OAAO,MAAMC,gBAAAA,sBAAsB,QAAQ,IAAI;AACrD,UAAM,SAAS,MAAM,UAAU,QAAQ,KAAK,GAAG,KAAK,YAAA,EAAc,QAAQ,QAAQ,GAAG,CAAC;AACtF,QAAI,WAAW,KAAK;AACnB,cAAQ,IAAI,IAAI;AAAA,IAAA,OACV;AACE,cAAA,IAAI,0BAA0B,MAAM,EAAE;AAC9C,YAAMC,GAAAA,UAAUC,UAAAA,KAAK,QAAQ,OAAO,MAAM,GAAG,IAAI;AAAA,IAClD;AAEO,WAAA;AAAA,EACR;AACD;;"}
@@ -0,0 +1,36 @@
1
+ import { Command } from "@contember/cli-common";
2
+ import { renderProjectInfoHtml } from "../../lib/project/docs/projectDescribe.js";
3
+ import { writeFile } from "node:fs/promises";
4
+ import { join } from "node:path";
5
+ import { validateSchemaAndPrintErrors } from "../../lib/schema/SchemaValidationHelper.js";
6
+ class ProjectGenerateDocumentationCommand extends Command {
7
+ constructor(schemaLoader) {
8
+ super();
9
+ this.schemaLoader = schemaLoader;
10
+ }
11
+ configure(configuration) {
12
+ configuration.description("Generates HTML documentation from project schema");
13
+ configuration.option("output").valueRequired().description('file name or "-" for stdout');
14
+ configuration.option("name").valueRequired().description("project name (for the title)");
15
+ }
16
+ async execute(input) {
17
+ const schema = await this.schemaLoader.loadSchema();
18
+ if (!validateSchemaAndPrintErrors(schema, "Defined schema is invalid:")) {
19
+ return 1;
20
+ }
21
+ const name = input.getOption("name") ?? "Contember project";
22
+ const html = await renderProjectInfoHtml(schema, name);
23
+ const output = input.getOption("output") ?? `${name.toLowerCase().replace(/\s+/g, "-")}.html`;
24
+ if (output === "-") {
25
+ console.log(html);
26
+ } else {
27
+ console.log(`Documentation saved to ${output}`);
28
+ await writeFile(join(process.cwd(), output), html);
29
+ }
30
+ return 0;
31
+ }
32
+ }
33
+ export {
34
+ ProjectGenerateDocumentationCommand
35
+ };
36
+ //# sourceMappingURL=ProjectGenerateDocumentationCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProjectGenerateDocumentationCommand.js","sources":["../../../../../../packages/cli/src/commands/project/ProjectGenerateDocumentationCommand.ts"],"sourcesContent":["import { Command, CommandConfiguration, Input } from '@contember/cli-common'\nimport { renderProjectInfoHtml } from '../../lib/project/docs/projectDescribe'\nimport { writeFile } from 'node:fs/promises'\nimport { join } from 'node:path'\nimport { SchemaLoader } from '../../lib/schema/SchemaLoader'\nimport { validateSchemaAndPrintErrors } from '../../lib/schema/SchemaValidationHelper'\n\ntype Args = {\n}\n\ntype Options = {\n\tname?: string\n\toutput?: string\n}\n\nexport class ProjectGenerateDocumentationCommand extends Command<Args, Options> {\n\tconstructor(\n\t\tprivate readonly schemaLoader: SchemaLoader,\n\t) {\n\t\tsuper()\n\t}\n\n\tprotected configure(configuration: CommandConfiguration<Args, Options>): void {\n\t\tconfiguration.description('Generates HTML documentation from project schema')\n\t\tconfiguration.option('output').valueRequired().description('file name or \"-\" for stdout')\n\t\tconfiguration.option('name').valueRequired().description('project name (for the title)')\n\t}\n\n\tprotected async execute(input: Input<Args, Options>): Promise<number> {\n\t\tconst schema = await this.schemaLoader.loadSchema()\n\t\tif (!validateSchemaAndPrintErrors(schema, 'Defined schema is invalid:')) {\n\t\t\treturn 1\n\t\t}\n\t\tconst name = input.getOption('name') ?? 'Contember project'\n\n\t\tconst html = await renderProjectInfoHtml(schema, name)\n\t\tconst output = input.getOption('output') ?? `${name.toLowerCase().replace(/\\s+/g, '-')}.html`\n\t\tif (output === '-') {\n\t\t\tconsole.log(html)\n\t\t} else {\n\t\t\tconsole.log(`Documentation saved to ${output}`)\n\t\t\tawait writeFile(join(process.cwd(), output), html)\n\t\t}\n\n\t\treturn 0\n\t}\n}\n"],"names":[],"mappings":";;;;;AAeO,MAAM,4CAA4C,QAAuB;AAAA,EAC/E,YACkB,cAChB;AACK;AAFW,SAAA,eAAA;AAAA,EAGlB;AAAA,EAEU,UAAU,eAA0D;AAC7E,kBAAc,YAAY,kDAAkD;AAC5E,kBAAc,OAAO,QAAQ,EAAE,cAAc,EAAE,YAAY,6BAA6B;AACxF,kBAAc,OAAO,MAAM,EAAE,cAAc,EAAE,YAAY,8BAA8B;AAAA,EACxF;AAAA,EAEA,MAAgB,QAAQ,OAA8C;AACrE,UAAM,SAAS,MAAM,KAAK,aAAa,WAAW;AAClD,QAAI,CAAC,6BAA6B,QAAQ,4BAA4B,GAAG;AACjE,aAAA;AAAA,IACR;AACA,UAAM,OAAO,MAAM,UAAU,MAAM,KAAK;AAExC,UAAM,OAAO,MAAM,sBAAsB,QAAQ,IAAI;AACrD,UAAM,SAAS,MAAM,UAAU,QAAQ,KAAK,GAAG,KAAK,YAAA,EAAc,QAAQ,QAAQ,GAAG,CAAC;AACtF,QAAI,WAAW,KAAK;AACnB,cAAQ,IAAI,IAAI;AAAA,IAAA,OACV;AACE,cAAA,IAAI,0BAA0B,MAAM,EAAE;AAC9C,YAAM,UAAU,KAAK,QAAQ,OAAO,MAAM,GAAG,IAAI;AAAA,IAClD;AAEO,WAAA;AAAA,EACR;AACD;"}