@contember/engine-system-api 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 (1224) hide show
  1. package/dist/development/index.cjs +73 -0
  2. package/dist/development/index.cjs.map +1 -0
  3. package/dist/development/index.js +70 -0
  4. package/dist/development/index.js.map +1 -0
  5. package/dist/development/src/SystemContainer.cjs +48 -0
  6. package/dist/development/src/SystemContainer.cjs.map +1 -0
  7. package/dist/development/src/SystemContainer.js +48 -0
  8. package/dist/development/src/SystemContainer.js.map +1 -0
  9. package/dist/development/src/migrations/2018-08-04-102200-init.cjs +36 -0
  10. package/dist/development/src/migrations/2018-08-04-102200-init.cjs.map +1 -0
  11. package/dist/development/src/migrations/2018-08-04-102200-init.js +37 -0
  12. package/dist/development/src/migrations/2018-08-04-102200-init.js.map +1 -0
  13. package/dist/development/src/migrations/2018-08-05-130501-trigger-event-function.cjs +98 -0
  14. package/dist/development/src/migrations/2018-08-05-130501-trigger-event-function.cjs.map +1 -0
  15. package/dist/development/src/migrations/2018-08-05-130501-trigger-event-function.js +99 -0
  16. package/dist/development/src/migrations/2018-08-05-130501-trigger-event-function.js.map +1 -0
  17. package/dist/development/src/migrations/2019-01-14-143432-event-trx-id.cjs +16 -0
  18. package/dist/development/src/migrations/2019-01-14-143432-event-trx-id.cjs.map +1 -0
  19. package/dist/development/src/migrations/2019-01-14-143432-event-trx-id.js +17 -0
  20. package/dist/development/src/migrations/2019-01-14-143432-event-trx-id.js.map +1 -0
  21. package/dist/development/src/migrations/2019-02-04-154500-event-rebase.cjs +58 -0
  22. package/dist/development/src/migrations/2019-02-04-154500-event-rebase.cjs.map +1 -0
  23. package/dist/development/src/migrations/2019-02-04-154500-event-rebase.js +59 -0
  24. package/dist/development/src/migrations/2019-02-04-154500-event-rebase.js.map +1 -0
  25. package/dist/development/src/migrations/2019-03-18-104147-event-run-migration-struct.cjs +11 -0
  26. package/dist/development/src/migrations/2019-03-18-104147-event-run-migration-struct.cjs.map +1 -0
  27. package/dist/development/src/migrations/2019-03-18-104147-event-run-migration-struct.js +12 -0
  28. package/dist/development/src/migrations/2019-03-18-104147-event-run-migration-struct.js.map +1 -0
  29. package/dist/development/src/migrations/2019-07-29-103000-trigger-event-function-fix.cjs +65 -0
  30. package/dist/development/src/migrations/2019-07-29-103000-trigger-event-function-fix.cjs.map +1 -0
  31. package/dist/development/src/migrations/2019-07-29-103000-trigger-event-function-fix.js +66 -0
  32. package/dist/development/src/migrations/2019-07-29-103000-trigger-event-function-fix.js.map +1 -0
  33. package/dist/development/src/migrations/2019-11-28-100000-missing-setting-fallback.cjs +20 -0
  34. package/dist/development/src/migrations/2019-11-28-100000-missing-setting-fallback.cjs.map +1 -0
  35. package/dist/development/src/migrations/2019-11-28-100000-missing-setting-fallback.js +21 -0
  36. package/dist/development/src/migrations/2019-11-28-100000-missing-setting-fallback.js.map +1 -0
  37. package/dist/development/src/migrations/2020-03-27-130000-project-migrations.cjs +21 -0
  38. package/dist/development/src/migrations/2020-03-27-130000-project-migrations.cjs.map +1 -0
  39. package/dist/development/src/migrations/2020-03-27-130000-project-migrations.js +22 -0
  40. package/dist/development/src/migrations/2020-03-27-130000-project-migrations.js.map +1 -0
  41. package/dist/development/src/migrations/2020-05-06-150000-composed-primary.cjs +189 -0
  42. package/dist/development/src/migrations/2020-05-06-150000-composed-primary.cjs.map +1 -0
  43. package/dist/development/src/migrations/2020-05-06-150000-composed-primary.js +190 -0
  44. package/dist/development/src/migrations/2020-05-06-150000-composed-primary.js.map +1 -0
  45. package/dist/development/src/migrations/2020-06-01-103000-event-trigger-perf.cjs +129 -0
  46. package/dist/development/src/migrations/2020-06-01-103000-event-trigger-perf.cjs.map +1 -0
  47. package/dist/development/src/migrations/2020-06-01-103000-event-trigger-perf.js +130 -0
  48. package/dist/development/src/migrations/2020-06-01-103000-event-trigger-perf.js.map +1 -0
  49. package/dist/development/src/migrations/2021-03-23-110000-timestamp-fix.cjs +14 -0
  50. package/dist/development/src/migrations/2021-03-23-110000-timestamp-fix.cjs.map +1 -0
  51. package/dist/development/src/migrations/2021-03-23-110000-timestamp-fix.js +15 -0
  52. package/dist/development/src/migrations/2021-03-23-110000-timestamp-fix.js.map +1 -0
  53. package/dist/development/src/migrations/2021-05-07-155800-event-log-rework.cjs +287 -0
  54. package/dist/development/src/migrations/2021-05-07-155800-event-log-rework.cjs.map +1 -0
  55. package/dist/development/src/migrations/2021-05-07-155800-event-log-rework.js +288 -0
  56. package/dist/development/src/migrations/2021-05-07-155800-event-log-rework.js.map +1 -0
  57. package/dist/development/src/migrations/2021-05-19-1232000-event-log-fix-constraint.cjs +45 -0
  58. package/dist/development/src/migrations/2021-05-19-1232000-event-log-fix-constraint.cjs.map +1 -0
  59. package/dist/development/src/migrations/2021-05-19-1232000-event-log-fix-constraint.js +46 -0
  60. package/dist/development/src/migrations/2021-05-19-1232000-event-log-fix-constraint.js.map +1 -0
  61. package/dist/development/src/migrations/2021-12-21-155500-events-up.cjs +14 -0
  62. package/dist/development/src/migrations/2021-12-21-155500-events-up.cjs.map +1 -0
  63. package/dist/development/src/migrations/2021-12-21-155500-events-up.js +15 -0
  64. package/dist/development/src/migrations/2021-12-21-155500-events-up.js.map +1 -0
  65. package/dist/development/src/migrations/2022-02-08-132600-fn-search-path.cjs +15 -0
  66. package/dist/development/src/migrations/2022-02-08-132600-fn-search-path.cjs.map +1 -0
  67. package/dist/development/src/migrations/2022-02-08-132600-fn-search-path.js +16 -0
  68. package/dist/development/src/migrations/2022-02-08-132600-fn-search-path.js.map +1 -0
  69. package/dist/development/src/migrations/2022-02-08-140500-drop-deadcode.cjs +10 -0
  70. package/dist/development/src/migrations/2022-02-08-140500-drop-deadcode.cjs.map +1 -0
  71. package/dist/development/src/migrations/2022-02-08-140500-drop-deadcode.js +11 -0
  72. package/dist/development/src/migrations/2022-02-08-140500-drop-deadcode.js.map +1 -0
  73. package/dist/development/src/migrations/2022-02-08-144400-dynamic-stage-schema.cjs +49 -0
  74. package/dist/development/src/migrations/2022-02-08-144400-dynamic-stage-schema.cjs.map +1 -0
  75. package/dist/development/src/migrations/2022-02-08-144400-dynamic-stage-schema.js +50 -0
  76. package/dist/development/src/migrations/2022-02-08-144400-dynamic-stage-schema.js.map +1 -0
  77. package/dist/development/src/migrations/2022-10-03-110000-table-on-delete.cjs +59 -0
  78. package/dist/development/src/migrations/2022-10-03-110000-table-on-delete.cjs.map +1 -0
  79. package/dist/development/src/migrations/2022-10-03-110000-table-on-delete.js +60 -0
  80. package/dist/development/src/migrations/2022-10-03-110000-table-on-delete.js.map +1 -0
  81. package/dist/development/src/migrations/2023-09-11-174000-fix-on-delete.cjs +65 -0
  82. package/dist/development/src/migrations/2023-09-11-174000-fix-on-delete.cjs.map +1 -0
  83. package/dist/development/src/migrations/2023-09-11-174000-fix-on-delete.js +66 -0
  84. package/dist/development/src/migrations/2023-09-11-174000-fix-on-delete.js.map +1 -0
  85. package/dist/development/src/migrations/2023-10-19-173000-fix-unique.cjs +43 -0
  86. package/dist/development/src/migrations/2023-10-19-173000-fix-unique.cjs.map +1 -0
  87. package/dist/development/src/migrations/2023-10-19-173000-fix-unique.js +44 -0
  88. package/dist/development/src/migrations/2023-10-19-173000-fix-unique.js.map +1 -0
  89. package/dist/development/src/migrations/2023-10-24-140000-schema-nullable-checksum.cjs +11 -0
  90. package/dist/development/src/migrations/2023-10-24-140000-schema-nullable-checksum.cjs.map +1 -0
  91. package/dist/development/src/migrations/2023-10-24-140000-schema-nullable-checksum.js +12 -0
  92. package/dist/development/src/migrations/2023-10-24-140000-schema-nullable-checksum.js.map +1 -0
  93. package/dist/development/src/migrations/2024-06-28-150000-migrations-drop-sequence.cjs +15 -0
  94. package/dist/development/src/migrations/2024-06-28-150000-migrations-drop-sequence.cjs.map +1 -0
  95. package/dist/development/src/migrations/2024-06-28-150000-migrations-drop-sequence.js +16 -0
  96. package/dist/development/src/migrations/2024-06-28-150000-migrations-drop-sequence.js.map +1 -0
  97. package/dist/development/src/migrations/runner.cjs +98 -0
  98. package/dist/development/src/migrations/runner.cjs.map +1 -0
  99. package/dist/development/src/migrations/runner.js +98 -0
  100. package/dist/development/src/migrations/runner.js.map +1 -0
  101. package/dist/development/src/migrations/snapshot-factory.cjs +44 -0
  102. package/dist/development/src/migrations/snapshot-factory.cjs.map +1 -0
  103. package/dist/development/src/migrations/snapshot-factory.js +44 -0
  104. package/dist/development/src/migrations/snapshot-factory.js.map +1 -0
  105. package/dist/development/src/migrations/snapshot.cjs +168 -0
  106. package/dist/development/src/migrations/snapshot.cjs.map +1 -0
  107. package/dist/development/src/migrations/snapshot.js +169 -0
  108. package/dist/development/src/migrations/snapshot.js.map +1 -0
  109. package/dist/development/src/model/ProjectInitializer.cjs +41 -0
  110. package/dist/development/src/model/ProjectInitializer.cjs.map +1 -0
  111. package/dist/development/src/model/ProjectInitializer.js +41 -0
  112. package/dist/development/src/model/ProjectInitializer.js.map +1 -0
  113. package/dist/development/src/model/ProjectTruncateExecutor.cjs +31 -0
  114. package/dist/development/src/model/ProjectTruncateExecutor.cjs.map +1 -0
  115. package/dist/development/src/model/ProjectTruncateExecutor.js +31 -0
  116. package/dist/development/src/model/ProjectTruncateExecutor.js.map +1 -0
  117. package/dist/development/src/model/authorization/AuthorizationActions.cjs +13 -0
  118. package/dist/development/src/model/authorization/AuthorizationActions.cjs.map +1 -0
  119. package/dist/development/src/model/authorization/AuthorizationActions.js +14 -0
  120. package/dist/development/src/model/authorization/AuthorizationActions.js.map +1 -0
  121. package/dist/development/src/model/authorization/Identity.cjs +10 -0
  122. package/dist/development/src/model/authorization/Identity.cjs.map +1 -0
  123. package/dist/development/src/model/authorization/Identity.js +10 -0
  124. package/dist/development/src/model/authorization/Identity.js.map +1 -0
  125. package/dist/development/src/model/authorization/PermissionsFactory.cjs +16 -0
  126. package/dist/development/src/model/authorization/PermissionsFactory.cjs.map +1 -0
  127. package/dist/development/src/model/authorization/PermissionsFactory.js +16 -0
  128. package/dist/development/src/model/authorization/PermissionsFactory.js.map +1 -0
  129. package/dist/development/src/model/authorization/StagePermissionsFactory.cjs +57 -0
  130. package/dist/development/src/model/authorization/StagePermissionsFactory.cjs.map +1 -0
  131. package/dist/development/src/model/authorization/StagePermissionsFactory.js +57 -0
  132. package/dist/development/src/model/authorization/StagePermissionsFactory.js.map +1 -0
  133. package/dist/development/src/model/authorization/StageScope.cjs +19 -0
  134. package/dist/development/src/model/authorization/StageScope.cjs.map +1 -0
  135. package/dist/development/src/model/authorization/StageScope.js +19 -0
  136. package/dist/development/src/model/authorization/StageScope.js.map +1 -0
  137. package/dist/development/src/model/authorization/SwitchEvaluatorNode.cjs +14 -0
  138. package/dist/development/src/model/authorization/SwitchEvaluatorNode.cjs.map +1 -0
  139. package/dist/development/src/model/authorization/SwitchEvaluatorNode.js +14 -0
  140. package/dist/development/src/model/authorization/SwitchEvaluatorNode.js.map +1 -0
  141. package/dist/development/src/model/commands/CommandBus.cjs +18 -0
  142. package/dist/development/src/model/commands/CommandBus.cjs.map +1 -0
  143. package/dist/development/src/model/commands/CommandBus.js +18 -0
  144. package/dist/development/src/model/commands/CommandBus.js.map +1 -0
  145. package/dist/development/src/model/commands/events/TruncateEventsCommand.cjs +10 -0
  146. package/dist/development/src/model/commands/events/TruncateEventsCommand.cjs.map +1 -0
  147. package/dist/development/src/model/commands/events/TruncateEventsCommand.js +10 -0
  148. package/dist/development/src/model/commands/events/TruncateEventsCommand.js.map +1 -0
  149. package/dist/development/src/model/commands/migrations/DeleteMigrationCommand.cjs +16 -0
  150. package/dist/development/src/model/commands/migrations/DeleteMigrationCommand.cjs.map +1 -0
  151. package/dist/development/src/model/commands/migrations/DeleteMigrationCommand.js +16 -0
  152. package/dist/development/src/model/commands/migrations/DeleteMigrationCommand.js.map +1 -0
  153. package/dist/development/src/model/commands/migrations/ModifyMigrationCommand.cjs +38 -0
  154. package/dist/development/src/model/commands/migrations/ModifyMigrationCommand.cjs.map +1 -0
  155. package/dist/development/src/model/commands/migrations/ModifyMigrationCommand.js +38 -0
  156. package/dist/development/src/model/commands/migrations/ModifyMigrationCommand.js.map +1 -0
  157. package/dist/development/src/model/commands/migrations/SaveMigrationCommand.cjs +28 -0
  158. package/dist/development/src/model/commands/migrations/SaveMigrationCommand.cjs.map +1 -0
  159. package/dist/development/src/model/commands/migrations/SaveMigrationCommand.js +28 -0
  160. package/dist/development/src/model/commands/migrations/SaveMigrationCommand.js.map +1 -0
  161. package/dist/development/src/model/commands/stages/CreateStageCommand.cjs +22 -0
  162. package/dist/development/src/model/commands/stages/CreateStageCommand.cjs.map +1 -0
  163. package/dist/development/src/model/commands/stages/CreateStageCommand.js +22 -0
  164. package/dist/development/src/model/commands/stages/CreateStageCommand.js.map +1 -0
  165. package/dist/development/src/model/database/DatabaseContext.cjs +29 -0
  166. package/dist/development/src/model/database/DatabaseContext.cjs.map +1 -0
  167. package/dist/development/src/model/database/DatabaseContext.js +29 -0
  168. package/dist/development/src/model/database/DatabaseContext.js.map +1 -0
  169. package/dist/development/src/model/dtos/ExecutedMigration.cjs +21 -0
  170. package/dist/development/src/model/dtos/ExecutedMigration.cjs.map +1 -0
  171. package/dist/development/src/model/dtos/ExecutedMigration.js +21 -0
  172. package/dist/development/src/model/dtos/ExecutedMigration.js.map +1 -0
  173. package/dist/development/src/model/events/EventResponseBuilder.cjs +59 -0
  174. package/dist/development/src/model/events/EventResponseBuilder.cjs.map +1 -0
  175. package/dist/development/src/model/events/EventResponseBuilder.js +59 -0
  176. package/dist/development/src/model/events/EventResponseBuilder.js.map +1 -0
  177. package/dist/development/src/model/events/EventResponseHelper.cjs +25 -0
  178. package/dist/development/src/model/events/EventResponseHelper.cjs.map +1 -0
  179. package/dist/development/src/model/events/EventResponseHelper.js +25 -0
  180. package/dist/development/src/model/events/EventResponseHelper.js.map +1 -0
  181. package/dist/development/src/model/events/identityUtils.cjs +16 -0
  182. package/dist/development/src/model/events/identityUtils.cjs.map +1 -0
  183. package/dist/development/src/model/events/identityUtils.js +16 -0
  184. package/dist/development/src/model/events/identityUtils.js.map +1 -0
  185. package/dist/development/src/model/events/types.cjs +69 -0
  186. package/dist/development/src/model/events/types.cjs.map +1 -0
  187. package/dist/development/src/model/events/types.js +69 -0
  188. package/dist/development/src/model/events/types.js.map +1 -0
  189. package/dist/development/src/model/helpers/modelHelpers.cjs +28 -0
  190. package/dist/development/src/model/helpers/modelHelpers.cjs.map +1 -0
  191. package/dist/development/src/model/helpers/modelHelpers.js +28 -0
  192. package/dist/development/src/model/helpers/modelHelpers.js.map +1 -0
  193. package/dist/development/src/model/helpers/stageHelpers.cjs +7 -0
  194. package/dist/development/src/model/helpers/stageHelpers.cjs.map +1 -0
  195. package/dist/development/src/model/helpers/stageHelpers.js +7 -0
  196. package/dist/development/src/model/helpers/stageHelpers.js.map +1 -0
  197. package/dist/development/src/model/metadata/SchemaDatabaseMetadataResolverStore.cjs +35 -0
  198. package/dist/development/src/model/metadata/SchemaDatabaseMetadataResolverStore.cjs.map +1 -0
  199. package/dist/development/src/model/metadata/SchemaDatabaseMetadataResolverStore.js +35 -0
  200. package/dist/development/src/model/metadata/SchemaDatabaseMetadataResolverStore.js.map +1 -0
  201. package/dist/development/src/model/migrations/ExecutedMigrationsResolver.cjs +17 -0
  202. package/dist/development/src/model/migrations/ExecutedMigrationsResolver.cjs.map +1 -0
  203. package/dist/development/src/model/migrations/ExecutedMigrationsResolver.js +17 -0
  204. package/dist/development/src/model/migrations/ExecutedMigrationsResolver.js.map +1 -0
  205. package/dist/development/src/model/migrations/MigrationAlterer.cjs +42 -0
  206. package/dist/development/src/model/migrations/MigrationAlterer.cjs.map +1 -0
  207. package/dist/development/src/model/migrations/MigrationAlterer.js +42 -0
  208. package/dist/development/src/model/migrations/MigrationAlterer.js.map +1 -0
  209. package/dist/development/src/model/migrations/ProjectMigrator.cjs +214 -0
  210. package/dist/development/src/model/migrations/ProjectMigrator.cjs.map +1 -0
  211. package/dist/development/src/model/migrations/ProjectMigrator.js +214 -0
  212. package/dist/development/src/model/migrations/ProjectMigrator.js.map +1 -0
  213. package/dist/development/src/model/migrations/SchemaVersionBuilder.cjs +37 -0
  214. package/dist/development/src/model/migrations/SchemaVersionBuilder.cjs.map +1 -0
  215. package/dist/development/src/model/migrations/SchemaVersionBuilder.js +37 -0
  216. package/dist/development/src/model/migrations/SchemaVersionBuilder.js.map +1 -0
  217. package/dist/development/src/model/queries/events/EventQueryHelpers.cjs +48 -0
  218. package/dist/development/src/model/queries/events/EventQueryHelpers.cjs.map +1 -0
  219. package/dist/development/src/model/queries/events/EventQueryHelpers.js +48 -0
  220. package/dist/development/src/model/queries/events/EventQueryHelpers.js.map +1 -0
  221. package/dist/development/src/model/queries/events/EventsQuery.cjs +74 -0
  222. package/dist/development/src/model/queries/events/EventsQuery.cjs.map +1 -0
  223. package/dist/development/src/model/queries/events/EventsQuery.js +74 -0
  224. package/dist/development/src/model/queries/events/EventsQuery.js.map +1 -0
  225. package/dist/development/src/model/queries/events/LatestTransactionIdByStageQuery.cjs +19 -0
  226. package/dist/development/src/model/queries/events/LatestTransactionIdByStageQuery.cjs.map +1 -0
  227. package/dist/development/src/model/queries/events/LatestTransactionIdByStageQuery.js +19 -0
  228. package/dist/development/src/model/queries/events/LatestTransactionIdByStageQuery.js.map +1 -0
  229. package/dist/development/src/model/queries/events/OldValuesQuery.cjs +19 -0
  230. package/dist/development/src/model/queries/events/OldValuesQuery.cjs.map +1 -0
  231. package/dist/development/src/model/queries/events/OldValuesQuery.js +19 -0
  232. package/dist/development/src/model/queries/events/OldValuesQuery.js.map +1 -0
  233. package/dist/development/src/model/queries/migrations/ExecutedMigrationByVersionQuery.cjs +18 -0
  234. package/dist/development/src/model/queries/migrations/ExecutedMigrationByVersionQuery.cjs.map +1 -0
  235. package/dist/development/src/model/queries/migrations/ExecutedMigrationByVersionQuery.js +18 -0
  236. package/dist/development/src/model/queries/migrations/ExecutedMigrationByVersionQuery.js.map +1 -0
  237. package/dist/development/src/model/queries/migrations/ExecutedMigrationsQuery.cjs +19 -0
  238. package/dist/development/src/model/queries/migrations/ExecutedMigrationsQuery.cjs.map +1 -0
  239. package/dist/development/src/model/queries/migrations/ExecutedMigrationsQuery.js +19 -0
  240. package/dist/development/src/model/queries/migrations/ExecutedMigrationsQuery.js.map +1 -0
  241. package/dist/development/src/model/queries/migrations/ExecutedMigrationsQueryHelper.cjs +18 -0
  242. package/dist/development/src/model/queries/migrations/ExecutedMigrationsQueryHelper.cjs.map +1 -0
  243. package/dist/development/src/model/queries/migrations/ExecutedMigrationsQueryHelper.js +18 -0
  244. package/dist/development/src/model/queries/migrations/ExecutedMigrationsQueryHelper.js.map +1 -0
  245. package/dist/development/src/model/queries/stages/StageBySlugQuery.cjs +17 -0
  246. package/dist/development/src/model/queries/stages/StageBySlugQuery.cjs.map +1 -0
  247. package/dist/development/src/model/queries/stages/StageBySlugQuery.js +17 -0
  248. package/dist/development/src/model/queries/stages/StageBySlugQuery.js.map +1 -0
  249. package/dist/development/src/model/queries/stages/StageQueryFactory.cjs +8 -0
  250. package/dist/development/src/model/queries/stages/StageQueryFactory.cjs.map +1 -0
  251. package/dist/development/src/model/queries/stages/StageQueryFactory.js +8 -0
  252. package/dist/development/src/model/queries/stages/StageQueryFactory.js.map +1 -0
  253. package/dist/development/src/model/queries/stages/StagesQuery.cjs +12 -0
  254. package/dist/development/src/model/queries/stages/StagesQuery.cjs.map +1 -0
  255. package/dist/development/src/model/queries/stages/StagesQuery.js +12 -0
  256. package/dist/development/src/model/queries/stages/StagesQuery.js.map +1 -0
  257. package/dist/development/src/model/stages/StageCreator.cjs +22 -0
  258. package/dist/development/src/model/stages/StageCreator.cjs.map +1 -0
  259. package/dist/development/src/model/stages/StageCreator.js +22 -0
  260. package/dist/development/src/model/stages/StageCreator.js.map +1 -0
  261. package/dist/development/src/resolvers/ResolverFactory.cjs +88 -0
  262. package/dist/development/src/resolvers/ResolverFactory.cjs.map +1 -0
  263. package/dist/development/src/resolvers/ResolverFactory.js +88 -0
  264. package/dist/development/src/resolvers/ResolverFactory.js.map +1 -0
  265. package/dist/development/src/resolvers/SystemResolverContext.cjs +37 -0
  266. package/dist/development/src/resolvers/SystemResolverContext.cjs.map +1 -0
  267. package/dist/development/src/resolvers/SystemResolverContext.js +37 -0
  268. package/dist/development/src/resolvers/SystemResolverContext.js.map +1 -0
  269. package/dist/development/src/resolvers/mutation/MigrateMutationResolver.cjs +114 -0
  270. package/dist/development/src/resolvers/mutation/MigrateMutationResolver.cjs.map +1 -0
  271. package/dist/development/src/resolvers/mutation/MigrateMutationResolver.js +114 -0
  272. package/dist/development/src/resolvers/mutation/MigrateMutationResolver.js.map +1 -0
  273. package/dist/development/src/resolvers/mutation/MigrationAlterMutationResolver.cjs +49 -0
  274. package/dist/development/src/resolvers/mutation/MigrationAlterMutationResolver.cjs.map +1 -0
  275. package/dist/development/src/resolvers/mutation/MigrationAlterMutationResolver.js +49 -0
  276. package/dist/development/src/resolvers/mutation/MigrationAlterMutationResolver.js.map +1 -0
  277. package/dist/development/src/resolvers/mutation/TruncateMutationResolver.cjs +15 -0
  278. package/dist/development/src/resolvers/mutation/TruncateMutationResolver.cjs.map +1 -0
  279. package/dist/development/src/resolvers/mutation/TruncateMutationResolver.js +15 -0
  280. package/dist/development/src/resolvers/mutation/TruncateMutationResolver.js.map +1 -0
  281. package/dist/development/src/resolvers/query/EventsQueryResolver.cjs +44 -0
  282. package/dist/development/src/resolvers/query/EventsQueryResolver.cjs.map +1 -0
  283. package/dist/development/src/resolvers/query/EventsQueryResolver.js +44 -0
  284. package/dist/development/src/resolvers/query/EventsQueryResolver.js.map +1 -0
  285. package/dist/development/src/resolvers/query/ExecutedMigrationsQueryResolver.cjs +30 -0
  286. package/dist/development/src/resolvers/query/ExecutedMigrationsQueryResolver.cjs.map +1 -0
  287. package/dist/development/src/resolvers/query/ExecutedMigrationsQueryResolver.js +30 -0
  288. package/dist/development/src/resolvers/query/ExecutedMigrationsQueryResolver.js.map +1 -0
  289. package/dist/development/src/resolvers/query/StagesQueryResolver.cjs +20 -0
  290. package/dist/development/src/resolvers/query/StagesQueryResolver.cjs.map +1 -0
  291. package/dist/development/src/resolvers/query/StagesQueryResolver.js +20 -0
  292. package/dist/development/src/resolvers/query/StagesQueryResolver.js.map +1 -0
  293. package/dist/development/src/resolvers/types/EventOldValuesResolver.cjs +10 -0
  294. package/dist/development/src/resolvers/types/EventOldValuesResolver.cjs.map +1 -0
  295. package/dist/development/src/resolvers/types/EventOldValuesResolver.js +10 -0
  296. package/dist/development/src/resolvers/types/EventOldValuesResolver.js.map +1 -0
  297. package/dist/development/src/resolvers/types/OldValuesHelpers.cjs +22 -0
  298. package/dist/development/src/resolvers/types/OldValuesHelpers.cjs.map +1 -0
  299. package/dist/development/src/resolvers/types/OldValuesHelpers.js +22 -0
  300. package/dist/development/src/resolvers/types/OldValuesHelpers.js.map +1 -0
  301. package/dist/development/src/schema/dev.graphql.cjs +56 -0
  302. package/dist/development/src/schema/dev.graphql.cjs.map +1 -0
  303. package/dist/development/src/schema/dev.graphql.js +57 -0
  304. package/dist/development/src/schema/dev.graphql.js.map +1 -0
  305. package/dist/development/src/schema/system.graphql.cjs +209 -0
  306. package/dist/development/src/schema/system.graphql.cjs.map +1 -0
  307. package/dist/development/src/schema/system.graphql.js +210 -0
  308. package/dist/development/src/schema/system.graphql.js.map +1 -0
  309. package/dist/development/src/schema/types.cjs +46 -0
  310. package/dist/development/src/schema/types.cjs.map +1 -0
  311. package/dist/development/src/schema/types.js +46 -0
  312. package/dist/development/src/schema/types.js.map +1 -0
  313. package/dist/development/src/utils/MapSet.cjs +43 -0
  314. package/dist/development/src/utils/MapSet.cjs.map +1 -0
  315. package/dist/development/src/utils/MapSet.js +43 -0
  316. package/dist/development/src/utils/MapSet.js.map +1 -0
  317. package/dist/development/src/utils/Response.cjs +21 -0
  318. package/dist/development/src/utils/Response.cjs.map +1 -0
  319. package/dist/development/src/utils/Response.js +21 -0
  320. package/dist/development/src/utils/Response.js.map +1 -0
  321. package/dist/development/src/utils/assertNever.cjs +7 -0
  322. package/dist/development/src/utils/assertNever.cjs.map +1 -0
  323. package/dist/development/src/utils/assertNever.js +7 -0
  324. package/dist/development/src/utils/assertNever.js.map +1 -0
  325. package/dist/development/src/utils/batchQuery.cjs +22 -0
  326. package/dist/development/src/utils/batchQuery.cjs.map +1 -0
  327. package/dist/development/src/utils/batchQuery.js +22 -0
  328. package/dist/development/src/utils/batchQuery.js.map +1 -0
  329. package/dist/development/src/utils/exceptions.cjs +9 -0
  330. package/dist/development/src/utils/exceptions.cjs.map +1 -0
  331. package/dist/development/src/utils/exceptions.js +9 -0
  332. package/dist/development/src/utils/exceptions.js.map +1 -0
  333. package/dist/development/src/utils/tick.cjs +5 -0
  334. package/dist/development/src/utils/tick.cjs.map +1 -0
  335. package/dist/development/src/utils/tick.js +5 -0
  336. package/dist/development/src/utils/tick.js.map +1 -0
  337. package/dist/development/src/utils/tuple.cjs +5 -0
  338. package/dist/development/src/utils/tuple.cjs.map +1 -0
  339. package/dist/development/src/utils/tuple.js +5 -0
  340. package/dist/development/src/utils/tuple.js.map +1 -0
  341. package/dist/production/index.cjs +73 -0
  342. package/dist/production/index.cjs.map +1 -0
  343. package/dist/production/index.js +70 -0
  344. package/dist/production/index.js.map +1 -0
  345. package/dist/production/src/SystemContainer.cjs +48 -0
  346. package/dist/production/src/SystemContainer.cjs.map +1 -0
  347. package/dist/production/src/SystemContainer.js +48 -0
  348. package/dist/production/src/SystemContainer.js.map +1 -0
  349. package/dist/production/src/migrations/2018-08-04-102200-init.cjs +36 -0
  350. package/dist/production/src/migrations/2018-08-04-102200-init.cjs.map +1 -0
  351. package/dist/production/src/migrations/2018-08-04-102200-init.js +37 -0
  352. package/dist/production/src/migrations/2018-08-04-102200-init.js.map +1 -0
  353. package/dist/production/src/migrations/2018-08-05-130501-trigger-event-function.cjs +98 -0
  354. package/dist/production/src/migrations/2018-08-05-130501-trigger-event-function.cjs.map +1 -0
  355. package/dist/production/src/migrations/2018-08-05-130501-trigger-event-function.js +99 -0
  356. package/dist/production/src/migrations/2018-08-05-130501-trigger-event-function.js.map +1 -0
  357. package/dist/production/src/migrations/2019-01-14-143432-event-trx-id.cjs +16 -0
  358. package/dist/production/src/migrations/2019-01-14-143432-event-trx-id.cjs.map +1 -0
  359. package/dist/production/src/migrations/2019-01-14-143432-event-trx-id.js +17 -0
  360. package/dist/production/src/migrations/2019-01-14-143432-event-trx-id.js.map +1 -0
  361. package/dist/production/src/migrations/2019-02-04-154500-event-rebase.cjs +58 -0
  362. package/dist/production/src/migrations/2019-02-04-154500-event-rebase.cjs.map +1 -0
  363. package/dist/production/src/migrations/2019-02-04-154500-event-rebase.js +59 -0
  364. package/dist/production/src/migrations/2019-02-04-154500-event-rebase.js.map +1 -0
  365. package/dist/production/src/migrations/2019-03-18-104147-event-run-migration-struct.cjs +11 -0
  366. package/dist/production/src/migrations/2019-03-18-104147-event-run-migration-struct.cjs.map +1 -0
  367. package/dist/production/src/migrations/2019-03-18-104147-event-run-migration-struct.js +12 -0
  368. package/dist/production/src/migrations/2019-03-18-104147-event-run-migration-struct.js.map +1 -0
  369. package/dist/production/src/migrations/2019-07-29-103000-trigger-event-function-fix.cjs +65 -0
  370. package/dist/production/src/migrations/2019-07-29-103000-trigger-event-function-fix.cjs.map +1 -0
  371. package/dist/production/src/migrations/2019-07-29-103000-trigger-event-function-fix.js +66 -0
  372. package/dist/production/src/migrations/2019-07-29-103000-trigger-event-function-fix.js.map +1 -0
  373. package/dist/production/src/migrations/2019-11-28-100000-missing-setting-fallback.cjs +20 -0
  374. package/dist/production/src/migrations/2019-11-28-100000-missing-setting-fallback.cjs.map +1 -0
  375. package/dist/production/src/migrations/2019-11-28-100000-missing-setting-fallback.js +21 -0
  376. package/dist/production/src/migrations/2019-11-28-100000-missing-setting-fallback.js.map +1 -0
  377. package/dist/production/src/migrations/2020-03-27-130000-project-migrations.cjs +21 -0
  378. package/dist/production/src/migrations/2020-03-27-130000-project-migrations.cjs.map +1 -0
  379. package/dist/production/src/migrations/2020-03-27-130000-project-migrations.js +22 -0
  380. package/dist/production/src/migrations/2020-03-27-130000-project-migrations.js.map +1 -0
  381. package/dist/production/src/migrations/2020-05-06-150000-composed-primary.cjs +189 -0
  382. package/dist/production/src/migrations/2020-05-06-150000-composed-primary.cjs.map +1 -0
  383. package/dist/production/src/migrations/2020-05-06-150000-composed-primary.js +190 -0
  384. package/dist/production/src/migrations/2020-05-06-150000-composed-primary.js.map +1 -0
  385. package/dist/production/src/migrations/2020-06-01-103000-event-trigger-perf.cjs +129 -0
  386. package/dist/production/src/migrations/2020-06-01-103000-event-trigger-perf.cjs.map +1 -0
  387. package/dist/production/src/migrations/2020-06-01-103000-event-trigger-perf.js +130 -0
  388. package/dist/production/src/migrations/2020-06-01-103000-event-trigger-perf.js.map +1 -0
  389. package/dist/production/src/migrations/2021-03-23-110000-timestamp-fix.cjs +14 -0
  390. package/dist/production/src/migrations/2021-03-23-110000-timestamp-fix.cjs.map +1 -0
  391. package/dist/production/src/migrations/2021-03-23-110000-timestamp-fix.js +15 -0
  392. package/dist/production/src/migrations/2021-03-23-110000-timestamp-fix.js.map +1 -0
  393. package/dist/production/src/migrations/2021-05-07-155800-event-log-rework.cjs +287 -0
  394. package/dist/production/src/migrations/2021-05-07-155800-event-log-rework.cjs.map +1 -0
  395. package/dist/production/src/migrations/2021-05-07-155800-event-log-rework.js +288 -0
  396. package/dist/production/src/migrations/2021-05-07-155800-event-log-rework.js.map +1 -0
  397. package/dist/production/src/migrations/2021-05-19-1232000-event-log-fix-constraint.cjs +45 -0
  398. package/dist/production/src/migrations/2021-05-19-1232000-event-log-fix-constraint.cjs.map +1 -0
  399. package/dist/production/src/migrations/2021-05-19-1232000-event-log-fix-constraint.js +46 -0
  400. package/dist/production/src/migrations/2021-05-19-1232000-event-log-fix-constraint.js.map +1 -0
  401. package/dist/production/src/migrations/2021-12-21-155500-events-up.cjs +14 -0
  402. package/dist/production/src/migrations/2021-12-21-155500-events-up.cjs.map +1 -0
  403. package/dist/production/src/migrations/2021-12-21-155500-events-up.js +15 -0
  404. package/dist/production/src/migrations/2021-12-21-155500-events-up.js.map +1 -0
  405. package/dist/production/src/migrations/2022-02-08-132600-fn-search-path.cjs +15 -0
  406. package/dist/production/src/migrations/2022-02-08-132600-fn-search-path.cjs.map +1 -0
  407. package/dist/production/src/migrations/2022-02-08-132600-fn-search-path.js +16 -0
  408. package/dist/production/src/migrations/2022-02-08-132600-fn-search-path.js.map +1 -0
  409. package/dist/production/src/migrations/2022-02-08-140500-drop-deadcode.cjs +10 -0
  410. package/dist/production/src/migrations/2022-02-08-140500-drop-deadcode.cjs.map +1 -0
  411. package/dist/production/src/migrations/2022-02-08-140500-drop-deadcode.js +11 -0
  412. package/dist/production/src/migrations/2022-02-08-140500-drop-deadcode.js.map +1 -0
  413. package/dist/production/src/migrations/2022-02-08-144400-dynamic-stage-schema.cjs +49 -0
  414. package/dist/production/src/migrations/2022-02-08-144400-dynamic-stage-schema.cjs.map +1 -0
  415. package/dist/production/src/migrations/2022-02-08-144400-dynamic-stage-schema.js +50 -0
  416. package/dist/production/src/migrations/2022-02-08-144400-dynamic-stage-schema.js.map +1 -0
  417. package/dist/production/src/migrations/2022-10-03-110000-table-on-delete.cjs +59 -0
  418. package/dist/production/src/migrations/2022-10-03-110000-table-on-delete.cjs.map +1 -0
  419. package/dist/production/src/migrations/2022-10-03-110000-table-on-delete.js +60 -0
  420. package/dist/production/src/migrations/2022-10-03-110000-table-on-delete.js.map +1 -0
  421. package/dist/production/src/migrations/2023-09-11-174000-fix-on-delete.cjs +65 -0
  422. package/dist/production/src/migrations/2023-09-11-174000-fix-on-delete.cjs.map +1 -0
  423. package/dist/production/src/migrations/2023-09-11-174000-fix-on-delete.js +66 -0
  424. package/dist/production/src/migrations/2023-09-11-174000-fix-on-delete.js.map +1 -0
  425. package/dist/production/src/migrations/2023-10-19-173000-fix-unique.cjs +43 -0
  426. package/dist/production/src/migrations/2023-10-19-173000-fix-unique.cjs.map +1 -0
  427. package/dist/production/src/migrations/2023-10-19-173000-fix-unique.js +44 -0
  428. package/dist/production/src/migrations/2023-10-19-173000-fix-unique.js.map +1 -0
  429. package/dist/production/src/migrations/2023-10-24-140000-schema-nullable-checksum.cjs +11 -0
  430. package/dist/production/src/migrations/2023-10-24-140000-schema-nullable-checksum.cjs.map +1 -0
  431. package/dist/production/src/migrations/2023-10-24-140000-schema-nullable-checksum.js +12 -0
  432. package/dist/production/src/migrations/2023-10-24-140000-schema-nullable-checksum.js.map +1 -0
  433. package/dist/production/src/migrations/2024-06-28-150000-migrations-drop-sequence.cjs +15 -0
  434. package/dist/production/src/migrations/2024-06-28-150000-migrations-drop-sequence.cjs.map +1 -0
  435. package/dist/production/src/migrations/2024-06-28-150000-migrations-drop-sequence.js +16 -0
  436. package/dist/production/src/migrations/2024-06-28-150000-migrations-drop-sequence.js.map +1 -0
  437. package/dist/production/src/migrations/runner.cjs +98 -0
  438. package/dist/production/src/migrations/runner.cjs.map +1 -0
  439. package/dist/production/src/migrations/runner.js +98 -0
  440. package/dist/production/src/migrations/runner.js.map +1 -0
  441. package/dist/production/src/migrations/snapshot-factory.cjs +44 -0
  442. package/dist/production/src/migrations/snapshot-factory.cjs.map +1 -0
  443. package/dist/production/src/migrations/snapshot-factory.js +44 -0
  444. package/dist/production/src/migrations/snapshot-factory.js.map +1 -0
  445. package/dist/production/src/migrations/snapshot.cjs +168 -0
  446. package/dist/production/src/migrations/snapshot.cjs.map +1 -0
  447. package/dist/production/src/migrations/snapshot.js +169 -0
  448. package/dist/production/src/migrations/snapshot.js.map +1 -0
  449. package/dist/production/src/model/ProjectInitializer.cjs +41 -0
  450. package/dist/production/src/model/ProjectInitializer.cjs.map +1 -0
  451. package/dist/production/src/model/ProjectInitializer.js +41 -0
  452. package/dist/production/src/model/ProjectInitializer.js.map +1 -0
  453. package/dist/production/src/model/ProjectTruncateExecutor.cjs +31 -0
  454. package/dist/production/src/model/ProjectTruncateExecutor.cjs.map +1 -0
  455. package/dist/production/src/model/ProjectTruncateExecutor.js +31 -0
  456. package/dist/production/src/model/ProjectTruncateExecutor.js.map +1 -0
  457. package/dist/production/src/model/authorization/AuthorizationActions.cjs +13 -0
  458. package/dist/production/src/model/authorization/AuthorizationActions.cjs.map +1 -0
  459. package/dist/production/src/model/authorization/AuthorizationActions.js +14 -0
  460. package/dist/production/src/model/authorization/AuthorizationActions.js.map +1 -0
  461. package/dist/production/src/model/authorization/Identity.cjs +10 -0
  462. package/dist/production/src/model/authorization/Identity.cjs.map +1 -0
  463. package/dist/production/src/model/authorization/Identity.js +10 -0
  464. package/dist/production/src/model/authorization/Identity.js.map +1 -0
  465. package/dist/production/src/model/authorization/PermissionsFactory.cjs +16 -0
  466. package/dist/production/src/model/authorization/PermissionsFactory.cjs.map +1 -0
  467. package/dist/production/src/model/authorization/PermissionsFactory.js +16 -0
  468. package/dist/production/src/model/authorization/PermissionsFactory.js.map +1 -0
  469. package/dist/production/src/model/authorization/StagePermissionsFactory.cjs +57 -0
  470. package/dist/production/src/model/authorization/StagePermissionsFactory.cjs.map +1 -0
  471. package/dist/production/src/model/authorization/StagePermissionsFactory.js +57 -0
  472. package/dist/production/src/model/authorization/StagePermissionsFactory.js.map +1 -0
  473. package/dist/production/src/model/authorization/StageScope.cjs +19 -0
  474. package/dist/production/src/model/authorization/StageScope.cjs.map +1 -0
  475. package/dist/production/src/model/authorization/StageScope.js +19 -0
  476. package/dist/production/src/model/authorization/StageScope.js.map +1 -0
  477. package/dist/production/src/model/authorization/SwitchEvaluatorNode.cjs +14 -0
  478. package/dist/production/src/model/authorization/SwitchEvaluatorNode.cjs.map +1 -0
  479. package/dist/production/src/model/authorization/SwitchEvaluatorNode.js +14 -0
  480. package/dist/production/src/model/authorization/SwitchEvaluatorNode.js.map +1 -0
  481. package/dist/production/src/model/commands/CommandBus.cjs +18 -0
  482. package/dist/production/src/model/commands/CommandBus.cjs.map +1 -0
  483. package/dist/production/src/model/commands/CommandBus.js +18 -0
  484. package/dist/production/src/model/commands/CommandBus.js.map +1 -0
  485. package/dist/production/src/model/commands/events/TruncateEventsCommand.cjs +10 -0
  486. package/dist/production/src/model/commands/events/TruncateEventsCommand.cjs.map +1 -0
  487. package/dist/production/src/model/commands/events/TruncateEventsCommand.js +10 -0
  488. package/dist/production/src/model/commands/events/TruncateEventsCommand.js.map +1 -0
  489. package/dist/production/src/model/commands/migrations/DeleteMigrationCommand.cjs +16 -0
  490. package/dist/production/src/model/commands/migrations/DeleteMigrationCommand.cjs.map +1 -0
  491. package/dist/production/src/model/commands/migrations/DeleteMigrationCommand.js +16 -0
  492. package/dist/production/src/model/commands/migrations/DeleteMigrationCommand.js.map +1 -0
  493. package/dist/production/src/model/commands/migrations/ModifyMigrationCommand.cjs +38 -0
  494. package/dist/production/src/model/commands/migrations/ModifyMigrationCommand.cjs.map +1 -0
  495. package/dist/production/src/model/commands/migrations/ModifyMigrationCommand.js +38 -0
  496. package/dist/production/src/model/commands/migrations/ModifyMigrationCommand.js.map +1 -0
  497. package/dist/production/src/model/commands/migrations/SaveMigrationCommand.cjs +28 -0
  498. package/dist/production/src/model/commands/migrations/SaveMigrationCommand.cjs.map +1 -0
  499. package/dist/production/src/model/commands/migrations/SaveMigrationCommand.js +28 -0
  500. package/dist/production/src/model/commands/migrations/SaveMigrationCommand.js.map +1 -0
  501. package/dist/production/src/model/commands/stages/CreateStageCommand.cjs +22 -0
  502. package/dist/production/src/model/commands/stages/CreateStageCommand.cjs.map +1 -0
  503. package/dist/production/src/model/commands/stages/CreateStageCommand.js +22 -0
  504. package/dist/production/src/model/commands/stages/CreateStageCommand.js.map +1 -0
  505. package/dist/production/src/model/database/DatabaseContext.cjs +29 -0
  506. package/dist/production/src/model/database/DatabaseContext.cjs.map +1 -0
  507. package/dist/production/src/model/database/DatabaseContext.js +29 -0
  508. package/dist/production/src/model/database/DatabaseContext.js.map +1 -0
  509. package/dist/production/src/model/dtos/ExecutedMigration.cjs +21 -0
  510. package/dist/production/src/model/dtos/ExecutedMigration.cjs.map +1 -0
  511. package/dist/production/src/model/dtos/ExecutedMigration.js +21 -0
  512. package/dist/production/src/model/dtos/ExecutedMigration.js.map +1 -0
  513. package/dist/production/src/model/events/EventResponseBuilder.cjs +59 -0
  514. package/dist/production/src/model/events/EventResponseBuilder.cjs.map +1 -0
  515. package/dist/production/src/model/events/EventResponseBuilder.js +59 -0
  516. package/dist/production/src/model/events/EventResponseBuilder.js.map +1 -0
  517. package/dist/production/src/model/events/EventResponseHelper.cjs +25 -0
  518. package/dist/production/src/model/events/EventResponseHelper.cjs.map +1 -0
  519. package/dist/production/src/model/events/EventResponseHelper.js +25 -0
  520. package/dist/production/src/model/events/EventResponseHelper.js.map +1 -0
  521. package/dist/production/src/model/events/identityUtils.cjs +16 -0
  522. package/dist/production/src/model/events/identityUtils.cjs.map +1 -0
  523. package/dist/production/src/model/events/identityUtils.js +16 -0
  524. package/dist/production/src/model/events/identityUtils.js.map +1 -0
  525. package/dist/production/src/model/events/types.cjs +69 -0
  526. package/dist/production/src/model/events/types.cjs.map +1 -0
  527. package/dist/production/src/model/events/types.js +69 -0
  528. package/dist/production/src/model/events/types.js.map +1 -0
  529. package/dist/production/src/model/helpers/modelHelpers.cjs +28 -0
  530. package/dist/production/src/model/helpers/modelHelpers.cjs.map +1 -0
  531. package/dist/production/src/model/helpers/modelHelpers.js +28 -0
  532. package/dist/production/src/model/helpers/modelHelpers.js.map +1 -0
  533. package/dist/production/src/model/helpers/stageHelpers.cjs +7 -0
  534. package/dist/production/src/model/helpers/stageHelpers.cjs.map +1 -0
  535. package/dist/production/src/model/helpers/stageHelpers.js +7 -0
  536. package/dist/production/src/model/helpers/stageHelpers.js.map +1 -0
  537. package/dist/production/src/model/metadata/SchemaDatabaseMetadataResolverStore.cjs +35 -0
  538. package/dist/production/src/model/metadata/SchemaDatabaseMetadataResolverStore.cjs.map +1 -0
  539. package/dist/production/src/model/metadata/SchemaDatabaseMetadataResolverStore.js +35 -0
  540. package/dist/production/src/model/metadata/SchemaDatabaseMetadataResolverStore.js.map +1 -0
  541. package/dist/production/src/model/migrations/ExecutedMigrationsResolver.cjs +17 -0
  542. package/dist/production/src/model/migrations/ExecutedMigrationsResolver.cjs.map +1 -0
  543. package/dist/production/src/model/migrations/ExecutedMigrationsResolver.js +17 -0
  544. package/dist/production/src/model/migrations/ExecutedMigrationsResolver.js.map +1 -0
  545. package/dist/production/src/model/migrations/MigrationAlterer.cjs +42 -0
  546. package/dist/production/src/model/migrations/MigrationAlterer.cjs.map +1 -0
  547. package/dist/production/src/model/migrations/MigrationAlterer.js +42 -0
  548. package/dist/production/src/model/migrations/MigrationAlterer.js.map +1 -0
  549. package/dist/production/src/model/migrations/ProjectMigrator.cjs +214 -0
  550. package/dist/production/src/model/migrations/ProjectMigrator.cjs.map +1 -0
  551. package/dist/production/src/model/migrations/ProjectMigrator.js +214 -0
  552. package/dist/production/src/model/migrations/ProjectMigrator.js.map +1 -0
  553. package/dist/production/src/model/migrations/SchemaVersionBuilder.cjs +37 -0
  554. package/dist/production/src/model/migrations/SchemaVersionBuilder.cjs.map +1 -0
  555. package/dist/production/src/model/migrations/SchemaVersionBuilder.js +37 -0
  556. package/dist/production/src/model/migrations/SchemaVersionBuilder.js.map +1 -0
  557. package/dist/production/src/model/queries/events/EventQueryHelpers.cjs +48 -0
  558. package/dist/production/src/model/queries/events/EventQueryHelpers.cjs.map +1 -0
  559. package/dist/production/src/model/queries/events/EventQueryHelpers.js +48 -0
  560. package/dist/production/src/model/queries/events/EventQueryHelpers.js.map +1 -0
  561. package/dist/production/src/model/queries/events/EventsQuery.cjs +74 -0
  562. package/dist/production/src/model/queries/events/EventsQuery.cjs.map +1 -0
  563. package/dist/production/src/model/queries/events/EventsQuery.js +74 -0
  564. package/dist/production/src/model/queries/events/EventsQuery.js.map +1 -0
  565. package/dist/production/src/model/queries/events/LatestTransactionIdByStageQuery.cjs +19 -0
  566. package/dist/production/src/model/queries/events/LatestTransactionIdByStageQuery.cjs.map +1 -0
  567. package/dist/production/src/model/queries/events/LatestTransactionIdByStageQuery.js +19 -0
  568. package/dist/production/src/model/queries/events/LatestTransactionIdByStageQuery.js.map +1 -0
  569. package/dist/production/src/model/queries/events/OldValuesQuery.cjs +19 -0
  570. package/dist/production/src/model/queries/events/OldValuesQuery.cjs.map +1 -0
  571. package/dist/production/src/model/queries/events/OldValuesQuery.js +19 -0
  572. package/dist/production/src/model/queries/events/OldValuesQuery.js.map +1 -0
  573. package/dist/production/src/model/queries/migrations/ExecutedMigrationByVersionQuery.cjs +18 -0
  574. package/dist/production/src/model/queries/migrations/ExecutedMigrationByVersionQuery.cjs.map +1 -0
  575. package/dist/production/src/model/queries/migrations/ExecutedMigrationByVersionQuery.js +18 -0
  576. package/dist/production/src/model/queries/migrations/ExecutedMigrationByVersionQuery.js.map +1 -0
  577. package/dist/production/src/model/queries/migrations/ExecutedMigrationsQuery.cjs +19 -0
  578. package/dist/production/src/model/queries/migrations/ExecutedMigrationsQuery.cjs.map +1 -0
  579. package/dist/production/src/model/queries/migrations/ExecutedMigrationsQuery.js +19 -0
  580. package/dist/production/src/model/queries/migrations/ExecutedMigrationsQuery.js.map +1 -0
  581. package/dist/production/src/model/queries/migrations/ExecutedMigrationsQueryHelper.cjs +18 -0
  582. package/dist/production/src/model/queries/migrations/ExecutedMigrationsQueryHelper.cjs.map +1 -0
  583. package/dist/production/src/model/queries/migrations/ExecutedMigrationsQueryHelper.js +18 -0
  584. package/dist/production/src/model/queries/migrations/ExecutedMigrationsQueryHelper.js.map +1 -0
  585. package/dist/production/src/model/queries/stages/StageBySlugQuery.cjs +17 -0
  586. package/dist/production/src/model/queries/stages/StageBySlugQuery.cjs.map +1 -0
  587. package/dist/production/src/model/queries/stages/StageBySlugQuery.js +17 -0
  588. package/dist/production/src/model/queries/stages/StageBySlugQuery.js.map +1 -0
  589. package/dist/production/src/model/queries/stages/StageQueryFactory.cjs +8 -0
  590. package/dist/production/src/model/queries/stages/StageQueryFactory.cjs.map +1 -0
  591. package/dist/production/src/model/queries/stages/StageQueryFactory.js +8 -0
  592. package/dist/production/src/model/queries/stages/StageQueryFactory.js.map +1 -0
  593. package/dist/production/src/model/queries/stages/StagesQuery.cjs +12 -0
  594. package/dist/production/src/model/queries/stages/StagesQuery.cjs.map +1 -0
  595. package/dist/production/src/model/queries/stages/StagesQuery.js +12 -0
  596. package/dist/production/src/model/queries/stages/StagesQuery.js.map +1 -0
  597. package/dist/production/src/model/stages/StageCreator.cjs +22 -0
  598. package/dist/production/src/model/stages/StageCreator.cjs.map +1 -0
  599. package/dist/production/src/model/stages/StageCreator.js +22 -0
  600. package/dist/production/src/model/stages/StageCreator.js.map +1 -0
  601. package/dist/production/src/resolvers/ResolverFactory.cjs +88 -0
  602. package/dist/production/src/resolvers/ResolverFactory.cjs.map +1 -0
  603. package/dist/production/src/resolvers/ResolverFactory.js +88 -0
  604. package/dist/production/src/resolvers/ResolverFactory.js.map +1 -0
  605. package/dist/production/src/resolvers/SystemResolverContext.cjs +37 -0
  606. package/dist/production/src/resolvers/SystemResolverContext.cjs.map +1 -0
  607. package/dist/production/src/resolvers/SystemResolverContext.js +37 -0
  608. package/dist/production/src/resolvers/SystemResolverContext.js.map +1 -0
  609. package/dist/production/src/resolvers/mutation/MigrateMutationResolver.cjs +114 -0
  610. package/dist/production/src/resolvers/mutation/MigrateMutationResolver.cjs.map +1 -0
  611. package/dist/production/src/resolvers/mutation/MigrateMutationResolver.js +114 -0
  612. package/dist/production/src/resolvers/mutation/MigrateMutationResolver.js.map +1 -0
  613. package/dist/production/src/resolvers/mutation/MigrationAlterMutationResolver.cjs +49 -0
  614. package/dist/production/src/resolvers/mutation/MigrationAlterMutationResolver.cjs.map +1 -0
  615. package/dist/production/src/resolvers/mutation/MigrationAlterMutationResolver.js +49 -0
  616. package/dist/production/src/resolvers/mutation/MigrationAlterMutationResolver.js.map +1 -0
  617. package/dist/production/src/resolvers/mutation/TruncateMutationResolver.cjs +15 -0
  618. package/dist/production/src/resolvers/mutation/TruncateMutationResolver.cjs.map +1 -0
  619. package/dist/production/src/resolvers/mutation/TruncateMutationResolver.js +15 -0
  620. package/dist/production/src/resolvers/mutation/TruncateMutationResolver.js.map +1 -0
  621. package/dist/production/src/resolvers/query/EventsQueryResolver.cjs +44 -0
  622. package/dist/production/src/resolvers/query/EventsQueryResolver.cjs.map +1 -0
  623. package/dist/production/src/resolvers/query/EventsQueryResolver.js +44 -0
  624. package/dist/production/src/resolvers/query/EventsQueryResolver.js.map +1 -0
  625. package/dist/production/src/resolvers/query/ExecutedMigrationsQueryResolver.cjs +30 -0
  626. package/dist/production/src/resolvers/query/ExecutedMigrationsQueryResolver.cjs.map +1 -0
  627. package/dist/production/src/resolvers/query/ExecutedMigrationsQueryResolver.js +30 -0
  628. package/dist/production/src/resolvers/query/ExecutedMigrationsQueryResolver.js.map +1 -0
  629. package/dist/production/src/resolvers/query/StagesQueryResolver.cjs +20 -0
  630. package/dist/production/src/resolvers/query/StagesQueryResolver.cjs.map +1 -0
  631. package/dist/production/src/resolvers/query/StagesQueryResolver.js +20 -0
  632. package/dist/production/src/resolvers/query/StagesQueryResolver.js.map +1 -0
  633. package/dist/production/src/resolvers/types/EventOldValuesResolver.cjs +10 -0
  634. package/dist/production/src/resolvers/types/EventOldValuesResolver.cjs.map +1 -0
  635. package/dist/production/src/resolvers/types/EventOldValuesResolver.js +10 -0
  636. package/dist/production/src/resolvers/types/EventOldValuesResolver.js.map +1 -0
  637. package/dist/production/src/resolvers/types/OldValuesHelpers.cjs +22 -0
  638. package/dist/production/src/resolvers/types/OldValuesHelpers.cjs.map +1 -0
  639. package/dist/production/src/resolvers/types/OldValuesHelpers.js +22 -0
  640. package/dist/production/src/resolvers/types/OldValuesHelpers.js.map +1 -0
  641. package/dist/production/src/schema/dev.graphql.cjs +56 -0
  642. package/dist/production/src/schema/dev.graphql.cjs.map +1 -0
  643. package/dist/production/src/schema/dev.graphql.js +57 -0
  644. package/dist/production/src/schema/dev.graphql.js.map +1 -0
  645. package/dist/production/src/schema/system.graphql.cjs +209 -0
  646. package/dist/production/src/schema/system.graphql.cjs.map +1 -0
  647. package/dist/production/src/schema/system.graphql.js +210 -0
  648. package/dist/production/src/schema/system.graphql.js.map +1 -0
  649. package/dist/production/src/schema/types.cjs +46 -0
  650. package/dist/production/src/schema/types.cjs.map +1 -0
  651. package/dist/production/src/schema/types.js +46 -0
  652. package/dist/production/src/schema/types.js.map +1 -0
  653. package/dist/production/src/utils/MapSet.cjs +43 -0
  654. package/dist/production/src/utils/MapSet.cjs.map +1 -0
  655. package/dist/production/src/utils/MapSet.js +43 -0
  656. package/dist/production/src/utils/MapSet.js.map +1 -0
  657. package/dist/production/src/utils/Response.cjs +21 -0
  658. package/dist/production/src/utils/Response.cjs.map +1 -0
  659. package/dist/production/src/utils/Response.js +21 -0
  660. package/dist/production/src/utils/Response.js.map +1 -0
  661. package/dist/production/src/utils/assertNever.cjs +7 -0
  662. package/dist/production/src/utils/assertNever.cjs.map +1 -0
  663. package/dist/production/src/utils/assertNever.js +7 -0
  664. package/dist/production/src/utils/assertNever.js.map +1 -0
  665. package/dist/production/src/utils/batchQuery.cjs +22 -0
  666. package/dist/production/src/utils/batchQuery.cjs.map +1 -0
  667. package/dist/production/src/utils/batchQuery.js +22 -0
  668. package/dist/production/src/utils/batchQuery.js.map +1 -0
  669. package/dist/production/src/utils/exceptions.cjs +9 -0
  670. package/dist/production/src/utils/exceptions.cjs.map +1 -0
  671. package/dist/production/src/utils/exceptions.js +9 -0
  672. package/dist/production/src/utils/exceptions.js.map +1 -0
  673. package/dist/production/src/utils/tick.cjs +5 -0
  674. package/dist/production/src/utils/tick.cjs.map +1 -0
  675. package/dist/production/src/utils/tick.js +5 -0
  676. package/dist/production/src/utils/tick.js.map +1 -0
  677. package/dist/production/src/utils/tuple.cjs +5 -0
  678. package/dist/production/src/utils/tuple.cjs.map +1 -0
  679. package/dist/production/src/utils/tuple.js +5 -0
  680. package/dist/production/src/utils/tuple.js.map +1 -0
  681. package/dist/tests/tsconfig.tsbuildinfo +1 -1
  682. package/dist/types/index.d.ts +9 -0
  683. package/dist/types/index.d.ts.map +1 -0
  684. package/dist/types/migrations/2024-06-28-150000-migrations-drop-sequence.d.ts +3 -0
  685. package/dist/types/migrations/2024-06-28-150000-migrations-drop-sequence.d.ts.map +1 -0
  686. package/dist/types/migrations/runner.d.ts.map +1 -0
  687. package/dist/types/migrations/snapshot-factory.d.ts.map +1 -0
  688. package/dist/types/migrations/snapshot.d.ts.map +1 -0
  689. package/dist/types/model/authorization/AuthorizationActions.d.ts +22 -0
  690. package/dist/types/model/authorization/AuthorizationActions.d.ts.map +1 -0
  691. package/dist/types/model/commands/Command.d.ts +15 -0
  692. package/dist/types/model/commands/Command.d.ts.map +1 -0
  693. package/dist/types/model/commands/migrations/SaveMigrationCommand.d.ts.map +1 -0
  694. package/dist/types/model/events/EventResponseHelper.d.ts.map +1 -0
  695. package/dist/types/model/helpers/modelHelpers.d.ts.map +1 -0
  696. package/dist/types/model/queries/migrations/ExecutedMigrationsQuery.d.ts.map +1 -0
  697. package/dist/types/tsconfig.tsbuildinfo +1 -0
  698. package/dist/types/utils/batchQuery.d.ts.map +1 -0
  699. package/dist/types/utils/tuple.d.ts.map +1 -0
  700. package/package.json +33 -20
  701. package/src/index.ts +8 -8
  702. package/src/migrations/2024-06-28-150000-migrations-drop-sequence.ts +15 -0
  703. package/src/migrations/runner.ts +2 -0
  704. package/src/migrations/snapshot.ts +0 -9
  705. package/src/model/commands/Command.ts +1 -1
  706. package/src/model/commands/migrations/SaveMigrationCommand.ts +10 -4
  707. package/src/tsconfig.json +1 -1
  708. package/tests/cases/migrations/2020-05-06-150000-composed-primary.test.ts +32 -3
  709. package/tests/cases/migrations/2020-06-01-103000-event-trigger-perf.test.ts +31 -3
  710. package/tests/tsconfig.json +0 -1
  711. package/vitest.config.ts +3 -0
  712. package/dist/src/StagingDisabledError.js +0 -7
  713. package/dist/src/StagingDisabledError.js.map +0 -1
  714. package/dist/src/SystemContainer.js +0 -52
  715. package/dist/src/SystemContainer.js.map +0 -1
  716. package/dist/src/bin/runMigrations.js +0 -31
  717. package/dist/src/bin/runMigrations.js.map +0 -1
  718. package/dist/src/index.d.ts +0 -9
  719. package/dist/src/index.d.ts.map +0 -1
  720. package/dist/src/index.js +0 -41
  721. package/dist/src/index.js.map +0 -1
  722. package/dist/src/migrations/2018-08-04-102200-init.js +0 -37
  723. package/dist/src/migrations/2018-08-04-102200-init.js.map +0 -1
  724. package/dist/src/migrations/2018-08-05-130501-trigger-event-function.js +0 -99
  725. package/dist/src/migrations/2018-08-05-130501-trigger-event-function.js.map +0 -1
  726. package/dist/src/migrations/2019-01-14-143432-event-trx-id.js +0 -17
  727. package/dist/src/migrations/2019-01-14-143432-event-trx-id.js.map +0 -1
  728. package/dist/src/migrations/2019-02-04-154500-event-rebase.js +0 -59
  729. package/dist/src/migrations/2019-02-04-154500-event-rebase.js.map +0 -1
  730. package/dist/src/migrations/2019-03-18-104147-event-run-migration-struct.js +0 -12
  731. package/dist/src/migrations/2019-03-18-104147-event-run-migration-struct.js.map +0 -1
  732. package/dist/src/migrations/2019-07-29-103000-trigger-event-function-fix.js +0 -66
  733. package/dist/src/migrations/2019-07-29-103000-trigger-event-function-fix.js.map +0 -1
  734. package/dist/src/migrations/2019-11-28-100000-missing-setting-fallback.js +0 -21
  735. package/dist/src/migrations/2019-11-28-100000-missing-setting-fallback.js.map +0 -1
  736. package/dist/src/migrations/2020-03-27-130000-project-migrations.js +0 -19
  737. package/dist/src/migrations/2020-03-27-130000-project-migrations.js.map +0 -1
  738. package/dist/src/migrations/2020-05-06-150000-composed-primary.js +0 -174
  739. package/dist/src/migrations/2020-05-06-150000-composed-primary.js.map +0 -1
  740. package/dist/src/migrations/2020-06-01-103000-event-trigger-perf.js +0 -120
  741. package/dist/src/migrations/2020-06-01-103000-event-trigger-perf.js.map +0 -1
  742. package/dist/src/migrations/2021-03-23-110000-timestamp-fix.js +0 -15
  743. package/dist/src/migrations/2021-03-23-110000-timestamp-fix.js.map +0 -1
  744. package/dist/src/migrations/2021-05-07-155800-event-log-rework.js +0 -278
  745. package/dist/src/migrations/2021-05-07-155800-event-log-rework.js.map +0 -1
  746. package/dist/src/migrations/2021-05-19-1232000-event-log-fix-constraint.js +0 -36
  747. package/dist/src/migrations/2021-05-19-1232000-event-log-fix-constraint.js.map +0 -1
  748. package/dist/src/migrations/2021-12-21-155500-events-up.js +0 -15
  749. package/dist/src/migrations/2021-12-21-155500-events-up.js.map +0 -1
  750. package/dist/src/migrations/2022-02-08-132600-fn-search-path.js +0 -16
  751. package/dist/src/migrations/2022-02-08-132600-fn-search-path.js.map +0 -1
  752. package/dist/src/migrations/2022-02-08-140500-drop-deadcode.js +0 -11
  753. package/dist/src/migrations/2022-02-08-140500-drop-deadcode.js.map +0 -1
  754. package/dist/src/migrations/2022-02-08-144400-dynamic-stage-schema.js +0 -50
  755. package/dist/src/migrations/2022-02-08-144400-dynamic-stage-schema.js.map +0 -1
  756. package/dist/src/migrations/2022-10-03-110000-table-on-delete.js +0 -61
  757. package/dist/src/migrations/2022-10-03-110000-table-on-delete.js.map +0 -1
  758. package/dist/src/migrations/2023-09-11-174000-fix-on-delete.js +0 -67
  759. package/dist/src/migrations/2023-09-11-174000-fix-on-delete.js.map +0 -1
  760. package/dist/src/migrations/2023-10-19-173000-fix-unique.js +0 -45
  761. package/dist/src/migrations/2023-10-19-173000-fix-unique.js.map +0 -1
  762. package/dist/src/migrations/2023-10-24-140000-schema-nullable-checksum.js +0 -12
  763. package/dist/src/migrations/2023-10-24-140000-schema-nullable-checksum.js.map +0 -1
  764. package/dist/src/migrations/index.js +0 -19
  765. package/dist/src/migrations/index.js.map +0 -1
  766. package/dist/src/migrations/runner.d.ts.map +0 -1
  767. package/dist/src/migrations/runner.js +0 -88
  768. package/dist/src/migrations/runner.js.map +0 -1
  769. package/dist/src/migrations/snapshot-factory.d.ts.map +0 -1
  770. package/dist/src/migrations/snapshot-factory.js +0 -46
  771. package/dist/src/migrations/snapshot-factory.js.map +0 -1
  772. package/dist/src/migrations/snapshot.d.ts.map +0 -1
  773. package/dist/src/migrations/snapshot.js +0 -177
  774. package/dist/src/migrations/snapshot.js.map +0 -1
  775. package/dist/src/migrations/types.js +0 -3
  776. package/dist/src/migrations/types.js.map +0 -1
  777. package/dist/src/model/ProjectInitializer.js +0 -40
  778. package/dist/src/model/ProjectInitializer.js.map +0 -1
  779. package/dist/src/model/ProjectTruncateExecutor.js +0 -29
  780. package/dist/src/model/ProjectTruncateExecutor.js.map +0 -1
  781. package/dist/src/model/authorization/AuthorizationActions.d.ts +0 -21
  782. package/dist/src/model/authorization/AuthorizationActions.d.ts.map +0 -1
  783. package/dist/src/model/authorization/AuthorizationActions.js +0 -15
  784. package/dist/src/model/authorization/AuthorizationActions.js.map +0 -1
  785. package/dist/src/model/authorization/Identity.js +0 -11
  786. package/dist/src/model/authorization/Identity.js.map +0 -1
  787. package/dist/src/model/authorization/PermissionsFactory.js +0 -17
  788. package/dist/src/model/authorization/PermissionsFactory.js.map +0 -1
  789. package/dist/src/model/authorization/StagePermissionsFactory.js +0 -57
  790. package/dist/src/model/authorization/StagePermissionsFactory.js.map +0 -1
  791. package/dist/src/model/authorization/StageScope.js +0 -20
  792. package/dist/src/model/authorization/StageScope.js.map +0 -1
  793. package/dist/src/model/authorization/SwitchEvaluatorNode.js +0 -15
  794. package/dist/src/model/authorization/SwitchEvaluatorNode.js.map +0 -1
  795. package/dist/src/model/authorization/index.js +0 -20
  796. package/dist/src/model/authorization/index.js.map +0 -1
  797. package/dist/src/model/commands/Command.d.ts +0 -15
  798. package/dist/src/model/commands/Command.d.ts.map +0 -1
  799. package/dist/src/model/commands/Command.js +0 -3
  800. package/dist/src/model/commands/Command.js.map +0 -1
  801. package/dist/src/model/commands/CommandBus.js +0 -17
  802. package/dist/src/model/commands/CommandBus.js.map +0 -1
  803. package/dist/src/model/commands/events/TruncateEventsCommand.js +0 -11
  804. package/dist/src/model/commands/events/TruncateEventsCommand.js.map +0 -1
  805. package/dist/src/model/commands/events/index.js +0 -18
  806. package/dist/src/model/commands/events/index.js.map +0 -1
  807. package/dist/src/model/commands/index.js +0 -22
  808. package/dist/src/model/commands/index.js.map +0 -1
  809. package/dist/src/model/commands/migrations/DeleteMigrationCommand.js +0 -20
  810. package/dist/src/model/commands/migrations/DeleteMigrationCommand.js.map +0 -1
  811. package/dist/src/model/commands/migrations/ModifyMigrationCommand.js +0 -41
  812. package/dist/src/model/commands/migrations/ModifyMigrationCommand.js.map +0 -1
  813. package/dist/src/model/commands/migrations/SaveMigrationCommand.d.ts.map +0 -1
  814. package/dist/src/model/commands/migrations/SaveMigrationCommand.js +0 -32
  815. package/dist/src/model/commands/migrations/SaveMigrationCommand.js.map +0 -1
  816. package/dist/src/model/commands/migrations/index.js +0 -19
  817. package/dist/src/model/commands/migrations/index.js.map +0 -1
  818. package/dist/src/model/commands/stages/CreateStageCommand.js +0 -26
  819. package/dist/src/model/commands/stages/CreateStageCommand.js.map +0 -1
  820. package/dist/src/model/commands/stages/TruncateStagesCommand.js +0 -11
  821. package/dist/src/model/commands/stages/TruncateStagesCommand.js.map +0 -1
  822. package/dist/src/model/commands/stages/index.js +0 -19
  823. package/dist/src/model/commands/stages/index.js.map +0 -1
  824. package/dist/src/model/database/DatabaseContext.js +0 -28
  825. package/dist/src/model/database/DatabaseContext.js.map +0 -1
  826. package/dist/src/model/database/index.js +0 -18
  827. package/dist/src/model/database/index.js.map +0 -1
  828. package/dist/src/model/dependencies/content/ContentQueryExecutor.js +0 -3
  829. package/dist/src/model/dependencies/content/ContentQueryExecutor.js.map +0 -1
  830. package/dist/src/model/dependencies/index.js +0 -19
  831. package/dist/src/model/dependencies/index.js.map +0 -1
  832. package/dist/src/model/dependencies/tenant/IdentityFetcher.js +0 -3
  833. package/dist/src/model/dependencies/tenant/IdentityFetcher.js.map +0 -1
  834. package/dist/src/model/dependencies/tenant/index.js +0 -18
  835. package/dist/src/model/dependencies/tenant/index.js.map +0 -1
  836. package/dist/src/model/dtos/ExecutedMigration.js +0 -18
  837. package/dist/src/model/dtos/ExecutedMigration.js.map +0 -1
  838. package/dist/src/model/dtos/Stage.js +0 -3
  839. package/dist/src/model/dtos/Stage.js.map +0 -1
  840. package/dist/src/model/dtos/index.js +0 -19
  841. package/dist/src/model/dtos/index.js.map +0 -1
  842. package/dist/src/model/events/EventResponseBuilder.js +0 -58
  843. package/dist/src/model/events/EventResponseBuilder.js.map +0 -1
  844. package/dist/src/model/events/EventResponseHelper.d.ts.map +0 -1
  845. package/dist/src/model/events/EventResponseHelper.js +0 -26
  846. package/dist/src/model/events/EventResponseHelper.js.map +0 -1
  847. package/dist/src/model/events/identityUtils.js +0 -18
  848. package/dist/src/model/events/identityUtils.js.map +0 -1
  849. package/dist/src/model/events/index.js +0 -19
  850. package/dist/src/model/events/index.js.map +0 -1
  851. package/dist/src/model/events/types.js +0 -51
  852. package/dist/src/model/events/types.js.map +0 -1
  853. package/dist/src/model/helpers/index.js +0 -19
  854. package/dist/src/model/helpers/index.js.map +0 -1
  855. package/dist/src/model/helpers/modelHelpers.d.ts.map +0 -1
  856. package/dist/src/model/helpers/modelHelpers.js +0 -23
  857. package/dist/src/model/helpers/modelHelpers.js.map +0 -1
  858. package/dist/src/model/helpers/stageHelpers.js +0 -8
  859. package/dist/src/model/helpers/stageHelpers.js.map +0 -1
  860. package/dist/src/model/index.js +0 -30
  861. package/dist/src/model/index.js.map +0 -1
  862. package/dist/src/model/metadata/SchemaDatabaseMetadataResolverStore.js +0 -33
  863. package/dist/src/model/metadata/SchemaDatabaseMetadataResolverStore.js.map +0 -1
  864. package/dist/src/model/metadata/index.js +0 -18
  865. package/dist/src/model/metadata/index.js.map +0 -1
  866. package/dist/src/model/migrations/ExecutedMigrationsResolver.js +0 -14
  867. package/dist/src/model/migrations/ExecutedMigrationsResolver.js.map +0 -1
  868. package/dist/src/model/migrations/MigrationAlterer.js +0 -38
  869. package/dist/src/model/migrations/MigrationAlterer.js.map +0 -1
  870. package/dist/src/model/migrations/MigrationInput.js +0 -3
  871. package/dist/src/model/migrations/MigrationInput.js.map +0 -1
  872. package/dist/src/model/migrations/ProjectMigrator.js +0 -201
  873. package/dist/src/model/migrations/ProjectMigrator.js.map +0 -1
  874. package/dist/src/model/migrations/SchemaVersionBuilder.js +0 -36
  875. package/dist/src/model/migrations/SchemaVersionBuilder.js.map +0 -1
  876. package/dist/src/model/migrations/index.js +0 -21
  877. package/dist/src/model/migrations/index.js.map +0 -1
  878. package/dist/src/model/queries/events/EventQueryHelpers.js +0 -21
  879. package/dist/src/model/queries/events/EventQueryHelpers.js.map +0 -1
  880. package/dist/src/model/queries/events/EventsQuery.js +0 -88
  881. package/dist/src/model/queries/events/EventsQuery.js.map +0 -1
  882. package/dist/src/model/queries/events/LatestTransactionIdByStageQuery.js +0 -26
  883. package/dist/src/model/queries/events/LatestTransactionIdByStageQuery.js.map +0 -1
  884. package/dist/src/model/queries/events/OldValuesQuery.js +0 -25
  885. package/dist/src/model/queries/events/OldValuesQuery.js.map +0 -1
  886. package/dist/src/model/queries/events/index.js +0 -20
  887. package/dist/src/model/queries/events/index.js.map +0 -1
  888. package/dist/src/model/queries/index.js +0 -20
  889. package/dist/src/model/queries/index.js.map +0 -1
  890. package/dist/src/model/queries/migrations/ExecutedMigrationByVersionQuery.js +0 -19
  891. package/dist/src/model/queries/migrations/ExecutedMigrationByVersionQuery.js.map +0 -1
  892. package/dist/src/model/queries/migrations/ExecutedMigrationsQuery.d.ts.map +0 -1
  893. package/dist/src/model/queries/migrations/ExecutedMigrationsQuery.js +0 -22
  894. package/dist/src/model/queries/migrations/ExecutedMigrationsQuery.js.map +0 -1
  895. package/dist/src/model/queries/migrations/ExecutedMigrationsQueryHelper.js +0 -17
  896. package/dist/src/model/queries/migrations/ExecutedMigrationsQueryHelper.js.map +0 -1
  897. package/dist/src/model/queries/migrations/index.js +0 -20
  898. package/dist/src/model/queries/migrations/index.js.map +0 -1
  899. package/dist/src/model/queries/stages/StageBySlugQuery.js +0 -18
  900. package/dist/src/model/queries/stages/StageBySlugQuery.js.map +0 -1
  901. package/dist/src/model/queries/stages/StageQueryFactory.js +0 -14
  902. package/dist/src/model/queries/stages/StageQueryFactory.js.map +0 -1
  903. package/dist/src/model/queries/stages/StagesQuery.js +0 -13
  904. package/dist/src/model/queries/stages/StagesQuery.js.map +0 -1
  905. package/dist/src/model/queries/stages/index.js +0 -20
  906. package/dist/src/model/queries/stages/index.js.map +0 -1
  907. package/dist/src/model/stages/StageCreator.js +0 -18
  908. package/dist/src/model/stages/StageCreator.js.map +0 -1
  909. package/dist/src/model/stages/index.js +0 -18
  910. package/dist/src/model/stages/index.js.map +0 -1
  911. package/dist/src/resolvers/Resolver.js +0 -3
  912. package/dist/src/resolvers/Resolver.js.map +0 -1
  913. package/dist/src/resolvers/ResolverFactory.js +0 -86
  914. package/dist/src/resolvers/ResolverFactory.js.map +0 -1
  915. package/dist/src/resolvers/SystemResolverContext.js +0 -38
  916. package/dist/src/resolvers/SystemResolverContext.js.map +0 -1
  917. package/dist/src/resolvers/index.js +0 -22
  918. package/dist/src/resolvers/index.js.map +0 -1
  919. package/dist/src/resolvers/mutation/MigrateMutationResolver.js +0 -110
  920. package/dist/src/resolvers/mutation/MigrateMutationResolver.js.map +0 -1
  921. package/dist/src/resolvers/mutation/MigrationAlterMutationResolver.js +0 -36
  922. package/dist/src/resolvers/mutation/MigrationAlterMutationResolver.js.map +0 -1
  923. package/dist/src/resolvers/mutation/TruncateMutationResolver.js +0 -16
  924. package/dist/src/resolvers/mutation/TruncateMutationResolver.js.map +0 -1
  925. package/dist/src/resolvers/mutation/index.js +0 -20
  926. package/dist/src/resolvers/mutation/index.js.map +0 -1
  927. package/dist/src/resolvers/query/EventsQueryResolver.js +0 -26
  928. package/dist/src/resolvers/query/EventsQueryResolver.js.map +0 -1
  929. package/dist/src/resolvers/query/ExecutedMigrationsQueryResolver.js +0 -19
  930. package/dist/src/resolvers/query/ExecutedMigrationsQueryResolver.js.map +0 -1
  931. package/dist/src/resolvers/query/StagesQueryResolver.js +0 -11
  932. package/dist/src/resolvers/query/StagesQueryResolver.js.map +0 -1
  933. package/dist/src/resolvers/query/index.js +0 -20
  934. package/dist/src/resolvers/query/index.js.map +0 -1
  935. package/dist/src/resolvers/types/EventOldValuesResolver.js +0 -11
  936. package/dist/src/resolvers/types/EventOldValuesResolver.js.map +0 -1
  937. package/dist/src/resolvers/types/OldValuesHelpers.js +0 -10
  938. package/dist/src/resolvers/types/OldValuesHelpers.js.map +0 -1
  939. package/dist/src/resolvers/types/index.js +0 -18
  940. package/dist/src/resolvers/types/index.js.map +0 -1
  941. package/dist/src/schema/dev.graphql.js +0 -57
  942. package/dist/src/schema/dev.graphql.js.map +0 -1
  943. package/dist/src/schema/index.js +0 -40
  944. package/dist/src/schema/index.js.map +0 -1
  945. package/dist/src/schema/system.graphql.js +0 -210
  946. package/dist/src/schema/system.graphql.js.map +0 -1
  947. package/dist/src/schema/types.js +0 -41
  948. package/dist/src/schema/types.js.map +0 -1
  949. package/dist/src/tsconfig.tsbuildinfo +0 -1
  950. package/dist/src/types.js +0 -3
  951. package/dist/src/types.js.map +0 -1
  952. package/dist/src/utils/MapSet.js +0 -41
  953. package/dist/src/utils/MapSet.js.map +0 -1
  954. package/dist/src/utils/Response.js +0 -19
  955. package/dist/src/utils/Response.js.map +0 -1
  956. package/dist/src/utils/assertNever.js +0 -8
  957. package/dist/src/utils/assertNever.js.map +0 -1
  958. package/dist/src/utils/batchQuery.d.ts.map +0 -1
  959. package/dist/src/utils/batchQuery.js +0 -23
  960. package/dist/src/utils/batchQuery.js.map +0 -1
  961. package/dist/src/utils/exceptions.js +0 -10
  962. package/dist/src/utils/exceptions.js.map +0 -1
  963. package/dist/src/utils/index.js +0 -24
  964. package/dist/src/utils/index.js.map +0 -1
  965. package/dist/src/utils/providers.js +0 -3
  966. package/dist/src/utils/providers.js.map +0 -1
  967. package/dist/src/utils/set.js +0 -5
  968. package/dist/src/utils/set.js.map +0 -1
  969. package/dist/src/utils/tick.js +0 -6
  970. package/dist/src/utils/tick.js.map +0 -1
  971. package/dist/src/utils/tuple.d.ts.map +0 -1
  972. package/dist/src/utils/tuple.js +0 -6
  973. package/dist/src/utils/tuple.js.map +0 -1
  974. package/dist/src/utils/uuid.js +0 -3
  975. package/dist/src/utils/uuid.js.map +0 -1
  976. package/dist/tests/cases/migrations/2020-05-06-150000-composed-primary.test.js +0 -229
  977. package/dist/tests/cases/migrations/2020-05-06-150000-composed-primary.test.js.map +0 -1
  978. package/dist/tests/cases/migrations/2020-06-01-103000-event-trigger-perf.test.js +0 -171
  979. package/dist/tests/cases/migrations/2020-06-01-103000-event-trigger-perf.test.js.map +0 -1
  980. package/dist/tests/cases/migrations/2022-10-03-110000-table-on-delete.test.js +0 -58
  981. package/dist/tests/cases/migrations/2022-10-03-110000-table-on-delete.test.js.map +0 -1
  982. package/dist/tests/cases/migrations/2023-09-11-174000-fix-on-delete.test.js +0 -99
  983. package/dist/tests/cases/migrations/2023-09-11-174000-fix-on-delete.test.js.map +0 -1
  984. package/dist/tests/cases/migrations/2023-10-19-173000-fix-unique.test.js +0 -75
  985. package/dist/tests/cases/migrations/2023-10-19-173000-fix-unique.test.js.map +0 -1
  986. package/dist/tests/src/constants.js +0 -5
  987. package/dist/tests/src/constants.js.map +0 -1
  988. package/dist/tests/src/utils.js +0 -8
  989. package/dist/tests/src/utils.js.map +0 -1
  990. package/vite.config.js +0 -3
  991. /package/dist/{src → types}/StagingDisabledError.d.ts +0 -0
  992. /package/dist/{src → types}/StagingDisabledError.d.ts.map +0 -0
  993. /package/dist/{src → types}/SystemContainer.d.ts +0 -0
  994. /package/dist/{src → types}/SystemContainer.d.ts.map +0 -0
  995. /package/dist/{src → types}/bin/runMigrations.d.ts +0 -0
  996. /package/dist/{src → types}/bin/runMigrations.d.ts.map +0 -0
  997. /package/dist/{src → types}/migrations/2018-08-04-102200-init.d.ts +0 -0
  998. /package/dist/{src → types}/migrations/2018-08-04-102200-init.d.ts.map +0 -0
  999. /package/dist/{src → types}/migrations/2018-08-05-130501-trigger-event-function.d.ts +0 -0
  1000. /package/dist/{src → types}/migrations/2018-08-05-130501-trigger-event-function.d.ts.map +0 -0
  1001. /package/dist/{src → types}/migrations/2019-01-14-143432-event-trx-id.d.ts +0 -0
  1002. /package/dist/{src → types}/migrations/2019-01-14-143432-event-trx-id.d.ts.map +0 -0
  1003. /package/dist/{src → types}/migrations/2019-02-04-154500-event-rebase.d.ts +0 -0
  1004. /package/dist/{src → types}/migrations/2019-02-04-154500-event-rebase.d.ts.map +0 -0
  1005. /package/dist/{src → types}/migrations/2019-03-18-104147-event-run-migration-struct.d.ts +0 -0
  1006. /package/dist/{src → types}/migrations/2019-03-18-104147-event-run-migration-struct.d.ts.map +0 -0
  1007. /package/dist/{src → types}/migrations/2019-07-29-103000-trigger-event-function-fix.d.ts +0 -0
  1008. /package/dist/{src → types}/migrations/2019-07-29-103000-trigger-event-function-fix.d.ts.map +0 -0
  1009. /package/dist/{src → types}/migrations/2019-11-28-100000-missing-setting-fallback.d.ts +0 -0
  1010. /package/dist/{src → types}/migrations/2019-11-28-100000-missing-setting-fallback.d.ts.map +0 -0
  1011. /package/dist/{src → types}/migrations/2020-03-27-130000-project-migrations.d.ts +0 -0
  1012. /package/dist/{src → types}/migrations/2020-03-27-130000-project-migrations.d.ts.map +0 -0
  1013. /package/dist/{src → types}/migrations/2020-05-06-150000-composed-primary.d.ts +0 -0
  1014. /package/dist/{src → types}/migrations/2020-05-06-150000-composed-primary.d.ts.map +0 -0
  1015. /package/dist/{src → types}/migrations/2020-06-01-103000-event-trigger-perf.d.ts +0 -0
  1016. /package/dist/{src → types}/migrations/2020-06-01-103000-event-trigger-perf.d.ts.map +0 -0
  1017. /package/dist/{src → types}/migrations/2021-03-23-110000-timestamp-fix.d.ts +0 -0
  1018. /package/dist/{src → types}/migrations/2021-03-23-110000-timestamp-fix.d.ts.map +0 -0
  1019. /package/dist/{src → types}/migrations/2021-05-07-155800-event-log-rework.d.ts +0 -0
  1020. /package/dist/{src → types}/migrations/2021-05-07-155800-event-log-rework.d.ts.map +0 -0
  1021. /package/dist/{src → types}/migrations/2021-05-19-1232000-event-log-fix-constraint.d.ts +0 -0
  1022. /package/dist/{src → types}/migrations/2021-05-19-1232000-event-log-fix-constraint.d.ts.map +0 -0
  1023. /package/dist/{src → types}/migrations/2021-12-21-155500-events-up.d.ts +0 -0
  1024. /package/dist/{src → types}/migrations/2021-12-21-155500-events-up.d.ts.map +0 -0
  1025. /package/dist/{src → types}/migrations/2022-02-08-132600-fn-search-path.d.ts +0 -0
  1026. /package/dist/{src → types}/migrations/2022-02-08-132600-fn-search-path.d.ts.map +0 -0
  1027. /package/dist/{src → types}/migrations/2022-02-08-140500-drop-deadcode.d.ts +0 -0
  1028. /package/dist/{src → types}/migrations/2022-02-08-140500-drop-deadcode.d.ts.map +0 -0
  1029. /package/dist/{src → types}/migrations/2022-02-08-144400-dynamic-stage-schema.d.ts +0 -0
  1030. /package/dist/{src → types}/migrations/2022-02-08-144400-dynamic-stage-schema.d.ts.map +0 -0
  1031. /package/dist/{src → types}/migrations/2022-10-03-110000-table-on-delete.d.ts +0 -0
  1032. /package/dist/{src → types}/migrations/2022-10-03-110000-table-on-delete.d.ts.map +0 -0
  1033. /package/dist/{src → types}/migrations/2023-09-11-174000-fix-on-delete.d.ts +0 -0
  1034. /package/dist/{src → types}/migrations/2023-09-11-174000-fix-on-delete.d.ts.map +0 -0
  1035. /package/dist/{src → types}/migrations/2023-10-19-173000-fix-unique.d.ts +0 -0
  1036. /package/dist/{src → types}/migrations/2023-10-19-173000-fix-unique.d.ts.map +0 -0
  1037. /package/dist/{src → types}/migrations/2023-10-24-140000-schema-nullable-checksum.d.ts +0 -0
  1038. /package/dist/{src → types}/migrations/2023-10-24-140000-schema-nullable-checksum.d.ts.map +0 -0
  1039. /package/dist/{src → types}/migrations/index.d.ts +0 -0
  1040. /package/dist/{src → types}/migrations/index.d.ts.map +0 -0
  1041. /package/dist/{src → types}/migrations/runner.d.ts +0 -0
  1042. /package/dist/{src → types}/migrations/snapshot-factory.d.ts +0 -0
  1043. /package/dist/{src → types}/migrations/snapshot.d.ts +0 -0
  1044. /package/dist/{src → types}/migrations/types.d.ts +0 -0
  1045. /package/dist/{src → types}/migrations/types.d.ts.map +0 -0
  1046. /package/dist/{src → types}/model/ProjectInitializer.d.ts +0 -0
  1047. /package/dist/{src → types}/model/ProjectInitializer.d.ts.map +0 -0
  1048. /package/dist/{src → types}/model/ProjectTruncateExecutor.d.ts +0 -0
  1049. /package/dist/{src → types}/model/ProjectTruncateExecutor.d.ts.map +0 -0
  1050. /package/dist/{src → types}/model/authorization/Identity.d.ts +0 -0
  1051. /package/dist/{src → types}/model/authorization/Identity.d.ts.map +0 -0
  1052. /package/dist/{src → types}/model/authorization/PermissionsFactory.d.ts +0 -0
  1053. /package/dist/{src → types}/model/authorization/PermissionsFactory.d.ts.map +0 -0
  1054. /package/dist/{src → types}/model/authorization/StagePermissionsFactory.d.ts +0 -0
  1055. /package/dist/{src → types}/model/authorization/StagePermissionsFactory.d.ts.map +0 -0
  1056. /package/dist/{src → types}/model/authorization/StageScope.d.ts +0 -0
  1057. /package/dist/{src → types}/model/authorization/StageScope.d.ts.map +0 -0
  1058. /package/dist/{src → types}/model/authorization/SwitchEvaluatorNode.d.ts +0 -0
  1059. /package/dist/{src → types}/model/authorization/SwitchEvaluatorNode.d.ts.map +0 -0
  1060. /package/dist/{src → types}/model/authorization/index.d.ts +0 -0
  1061. /package/dist/{src → types}/model/authorization/index.d.ts.map +0 -0
  1062. /package/dist/{src → types}/model/commands/CommandBus.d.ts +0 -0
  1063. /package/dist/{src → types}/model/commands/CommandBus.d.ts.map +0 -0
  1064. /package/dist/{src → types}/model/commands/events/TruncateEventsCommand.d.ts +0 -0
  1065. /package/dist/{src → types}/model/commands/events/TruncateEventsCommand.d.ts.map +0 -0
  1066. /package/dist/{src → types}/model/commands/events/index.d.ts +0 -0
  1067. /package/dist/{src → types}/model/commands/events/index.d.ts.map +0 -0
  1068. /package/dist/{src → types}/model/commands/index.d.ts +0 -0
  1069. /package/dist/{src → types}/model/commands/index.d.ts.map +0 -0
  1070. /package/dist/{src → types}/model/commands/migrations/DeleteMigrationCommand.d.ts +0 -0
  1071. /package/dist/{src → types}/model/commands/migrations/DeleteMigrationCommand.d.ts.map +0 -0
  1072. /package/dist/{src → types}/model/commands/migrations/ModifyMigrationCommand.d.ts +0 -0
  1073. /package/dist/{src → types}/model/commands/migrations/ModifyMigrationCommand.d.ts.map +0 -0
  1074. /package/dist/{src → types}/model/commands/migrations/SaveMigrationCommand.d.ts +0 -0
  1075. /package/dist/{src → types}/model/commands/migrations/index.d.ts +0 -0
  1076. /package/dist/{src → types}/model/commands/migrations/index.d.ts.map +0 -0
  1077. /package/dist/{src → types}/model/commands/stages/CreateStageCommand.d.ts +0 -0
  1078. /package/dist/{src → types}/model/commands/stages/CreateStageCommand.d.ts.map +0 -0
  1079. /package/dist/{src → types}/model/commands/stages/TruncateStagesCommand.d.ts +0 -0
  1080. /package/dist/{src → types}/model/commands/stages/TruncateStagesCommand.d.ts.map +0 -0
  1081. /package/dist/{src → types}/model/commands/stages/index.d.ts +0 -0
  1082. /package/dist/{src → types}/model/commands/stages/index.d.ts.map +0 -0
  1083. /package/dist/{src → types}/model/database/DatabaseContext.d.ts +0 -0
  1084. /package/dist/{src → types}/model/database/DatabaseContext.d.ts.map +0 -0
  1085. /package/dist/{src → types}/model/database/index.d.ts +0 -0
  1086. /package/dist/{src → types}/model/database/index.d.ts.map +0 -0
  1087. /package/dist/{src → types}/model/dependencies/content/ContentQueryExecutor.d.ts +0 -0
  1088. /package/dist/{src → types}/model/dependencies/content/ContentQueryExecutor.d.ts.map +0 -0
  1089. /package/dist/{src → types}/model/dependencies/index.d.ts +0 -0
  1090. /package/dist/{src → types}/model/dependencies/index.d.ts.map +0 -0
  1091. /package/dist/{src → types}/model/dependencies/tenant/IdentityFetcher.d.ts +0 -0
  1092. /package/dist/{src → types}/model/dependencies/tenant/IdentityFetcher.d.ts.map +0 -0
  1093. /package/dist/{src → types}/model/dependencies/tenant/index.d.ts +0 -0
  1094. /package/dist/{src → types}/model/dependencies/tenant/index.d.ts.map +0 -0
  1095. /package/dist/{src → types}/model/dtos/ExecutedMigration.d.ts +0 -0
  1096. /package/dist/{src → types}/model/dtos/ExecutedMigration.d.ts.map +0 -0
  1097. /package/dist/{src → types}/model/dtos/Stage.d.ts +0 -0
  1098. /package/dist/{src → types}/model/dtos/Stage.d.ts.map +0 -0
  1099. /package/dist/{src → types}/model/dtos/index.d.ts +0 -0
  1100. /package/dist/{src → types}/model/dtos/index.d.ts.map +0 -0
  1101. /package/dist/{src → types}/model/events/EventResponseBuilder.d.ts +0 -0
  1102. /package/dist/{src → types}/model/events/EventResponseBuilder.d.ts.map +0 -0
  1103. /package/dist/{src → types}/model/events/EventResponseHelper.d.ts +0 -0
  1104. /package/dist/{src → types}/model/events/identityUtils.d.ts +0 -0
  1105. /package/dist/{src → types}/model/events/identityUtils.d.ts.map +0 -0
  1106. /package/dist/{src → types}/model/events/index.d.ts +0 -0
  1107. /package/dist/{src → types}/model/events/index.d.ts.map +0 -0
  1108. /package/dist/{src → types}/model/events/types.d.ts +0 -0
  1109. /package/dist/{src → types}/model/events/types.d.ts.map +0 -0
  1110. /package/dist/{src → types}/model/helpers/index.d.ts +0 -0
  1111. /package/dist/{src → types}/model/helpers/index.d.ts.map +0 -0
  1112. /package/dist/{src → types}/model/helpers/modelHelpers.d.ts +0 -0
  1113. /package/dist/{src → types}/model/helpers/stageHelpers.d.ts +0 -0
  1114. /package/dist/{src → types}/model/helpers/stageHelpers.d.ts.map +0 -0
  1115. /package/dist/{src → types}/model/index.d.ts +0 -0
  1116. /package/dist/{src → types}/model/index.d.ts.map +0 -0
  1117. /package/dist/{src → types}/model/metadata/SchemaDatabaseMetadataResolverStore.d.ts +0 -0
  1118. /package/dist/{src → types}/model/metadata/SchemaDatabaseMetadataResolverStore.d.ts.map +0 -0
  1119. /package/dist/{src → types}/model/metadata/index.d.ts +0 -0
  1120. /package/dist/{src → types}/model/metadata/index.d.ts.map +0 -0
  1121. /package/dist/{src → types}/model/migrations/ExecutedMigrationsResolver.d.ts +0 -0
  1122. /package/dist/{src → types}/model/migrations/ExecutedMigrationsResolver.d.ts.map +0 -0
  1123. /package/dist/{src → types}/model/migrations/MigrationAlterer.d.ts +0 -0
  1124. /package/dist/{src → types}/model/migrations/MigrationAlterer.d.ts.map +0 -0
  1125. /package/dist/{src → types}/model/migrations/MigrationInput.d.ts +0 -0
  1126. /package/dist/{src → types}/model/migrations/MigrationInput.d.ts.map +0 -0
  1127. /package/dist/{src → types}/model/migrations/ProjectMigrator.d.ts +0 -0
  1128. /package/dist/{src → types}/model/migrations/ProjectMigrator.d.ts.map +0 -0
  1129. /package/dist/{src → types}/model/migrations/SchemaVersionBuilder.d.ts +0 -0
  1130. /package/dist/{src → types}/model/migrations/SchemaVersionBuilder.d.ts.map +0 -0
  1131. /package/dist/{src → types}/model/migrations/index.d.ts +0 -0
  1132. /package/dist/{src → types}/model/migrations/index.d.ts.map +0 -0
  1133. /package/dist/{src → types}/model/queries/events/EventQueryHelpers.d.ts +0 -0
  1134. /package/dist/{src → types}/model/queries/events/EventQueryHelpers.d.ts.map +0 -0
  1135. /package/dist/{src → types}/model/queries/events/EventsQuery.d.ts +0 -0
  1136. /package/dist/{src → types}/model/queries/events/EventsQuery.d.ts.map +0 -0
  1137. /package/dist/{src → types}/model/queries/events/LatestTransactionIdByStageQuery.d.ts +0 -0
  1138. /package/dist/{src → types}/model/queries/events/LatestTransactionIdByStageQuery.d.ts.map +0 -0
  1139. /package/dist/{src → types}/model/queries/events/OldValuesQuery.d.ts +0 -0
  1140. /package/dist/{src → types}/model/queries/events/OldValuesQuery.d.ts.map +0 -0
  1141. /package/dist/{src → types}/model/queries/events/index.d.ts +0 -0
  1142. /package/dist/{src → types}/model/queries/events/index.d.ts.map +0 -0
  1143. /package/dist/{src → types}/model/queries/index.d.ts +0 -0
  1144. /package/dist/{src → types}/model/queries/index.d.ts.map +0 -0
  1145. /package/dist/{src → types}/model/queries/migrations/ExecutedMigrationByVersionQuery.d.ts +0 -0
  1146. /package/dist/{src → types}/model/queries/migrations/ExecutedMigrationByVersionQuery.d.ts.map +0 -0
  1147. /package/dist/{src → types}/model/queries/migrations/ExecutedMigrationsQuery.d.ts +0 -0
  1148. /package/dist/{src → types}/model/queries/migrations/ExecutedMigrationsQueryHelper.d.ts +0 -0
  1149. /package/dist/{src → types}/model/queries/migrations/ExecutedMigrationsQueryHelper.d.ts.map +0 -0
  1150. /package/dist/{src → types}/model/queries/migrations/index.d.ts +0 -0
  1151. /package/dist/{src → types}/model/queries/migrations/index.d.ts.map +0 -0
  1152. /package/dist/{src → types}/model/queries/stages/StageBySlugQuery.d.ts +0 -0
  1153. /package/dist/{src → types}/model/queries/stages/StageBySlugQuery.d.ts.map +0 -0
  1154. /package/dist/{src → types}/model/queries/stages/StageQueryFactory.d.ts +0 -0
  1155. /package/dist/{src → types}/model/queries/stages/StageQueryFactory.d.ts.map +0 -0
  1156. /package/dist/{src → types}/model/queries/stages/StagesQuery.d.ts +0 -0
  1157. /package/dist/{src → types}/model/queries/stages/StagesQuery.d.ts.map +0 -0
  1158. /package/dist/{src → types}/model/queries/stages/index.d.ts +0 -0
  1159. /package/dist/{src → types}/model/queries/stages/index.d.ts.map +0 -0
  1160. /package/dist/{src → types}/model/stages/StageCreator.d.ts +0 -0
  1161. /package/dist/{src → types}/model/stages/StageCreator.d.ts.map +0 -0
  1162. /package/dist/{src → types}/model/stages/index.d.ts +0 -0
  1163. /package/dist/{src → types}/model/stages/index.d.ts.map +0 -0
  1164. /package/dist/{src → types}/resolvers/Resolver.d.ts +0 -0
  1165. /package/dist/{src → types}/resolvers/Resolver.d.ts.map +0 -0
  1166. /package/dist/{src → types}/resolvers/ResolverFactory.d.ts +0 -0
  1167. /package/dist/{src → types}/resolvers/ResolverFactory.d.ts.map +0 -0
  1168. /package/dist/{src → types}/resolvers/SystemResolverContext.d.ts +0 -0
  1169. /package/dist/{src → types}/resolvers/SystemResolverContext.d.ts.map +0 -0
  1170. /package/dist/{src → types}/resolvers/index.d.ts +0 -0
  1171. /package/dist/{src → types}/resolvers/index.d.ts.map +0 -0
  1172. /package/dist/{src → types}/resolvers/mutation/MigrateMutationResolver.d.ts +0 -0
  1173. /package/dist/{src → types}/resolvers/mutation/MigrateMutationResolver.d.ts.map +0 -0
  1174. /package/dist/{src → types}/resolvers/mutation/MigrationAlterMutationResolver.d.ts +0 -0
  1175. /package/dist/{src → types}/resolvers/mutation/MigrationAlterMutationResolver.d.ts.map +0 -0
  1176. /package/dist/{src → types}/resolvers/mutation/TruncateMutationResolver.d.ts +0 -0
  1177. /package/dist/{src → types}/resolvers/mutation/TruncateMutationResolver.d.ts.map +0 -0
  1178. /package/dist/{src → types}/resolvers/mutation/index.d.ts +0 -0
  1179. /package/dist/{src → types}/resolvers/mutation/index.d.ts.map +0 -0
  1180. /package/dist/{src → types}/resolvers/query/EventsQueryResolver.d.ts +0 -0
  1181. /package/dist/{src → types}/resolvers/query/EventsQueryResolver.d.ts.map +0 -0
  1182. /package/dist/{src → types}/resolvers/query/ExecutedMigrationsQueryResolver.d.ts +0 -0
  1183. /package/dist/{src → types}/resolvers/query/ExecutedMigrationsQueryResolver.d.ts.map +0 -0
  1184. /package/dist/{src → types}/resolvers/query/StagesQueryResolver.d.ts +0 -0
  1185. /package/dist/{src → types}/resolvers/query/StagesQueryResolver.d.ts.map +0 -0
  1186. /package/dist/{src → types}/resolvers/query/index.d.ts +0 -0
  1187. /package/dist/{src → types}/resolvers/query/index.d.ts.map +0 -0
  1188. /package/dist/{src → types}/resolvers/types/EventOldValuesResolver.d.ts +0 -0
  1189. /package/dist/{src → types}/resolvers/types/EventOldValuesResolver.d.ts.map +0 -0
  1190. /package/dist/{src → types}/resolvers/types/OldValuesHelpers.d.ts +0 -0
  1191. /package/dist/{src → types}/resolvers/types/OldValuesHelpers.d.ts.map +0 -0
  1192. /package/dist/{src → types}/resolvers/types/index.d.ts +0 -0
  1193. /package/dist/{src → types}/resolvers/types/index.d.ts.map +0 -0
  1194. /package/dist/{src → types}/schema/dev.graphql.d.ts +0 -0
  1195. /package/dist/{src → types}/schema/dev.graphql.d.ts.map +0 -0
  1196. /package/dist/{src → types}/schema/index.d.ts +0 -0
  1197. /package/dist/{src → types}/schema/index.d.ts.map +0 -0
  1198. /package/dist/{src → types}/schema/system.graphql.d.ts +0 -0
  1199. /package/dist/{src → types}/schema/system.graphql.d.ts.map +0 -0
  1200. /package/dist/{src → types}/schema/types.d.ts +0 -0
  1201. /package/dist/{src → types}/schema/types.d.ts.map +0 -0
  1202. /package/dist/{src → types}/types.d.ts +0 -0
  1203. /package/dist/{src → types}/types.d.ts.map +0 -0
  1204. /package/dist/{src → types}/utils/MapSet.d.ts +0 -0
  1205. /package/dist/{src → types}/utils/MapSet.d.ts.map +0 -0
  1206. /package/dist/{src → types}/utils/Response.d.ts +0 -0
  1207. /package/dist/{src → types}/utils/Response.d.ts.map +0 -0
  1208. /package/dist/{src → types}/utils/assertNever.d.ts +0 -0
  1209. /package/dist/{src → types}/utils/assertNever.d.ts.map +0 -0
  1210. /package/dist/{src → types}/utils/batchQuery.d.ts +0 -0
  1211. /package/dist/{src → types}/utils/exceptions.d.ts +0 -0
  1212. /package/dist/{src → types}/utils/exceptions.d.ts.map +0 -0
  1213. /package/dist/{src → types}/utils/index.d.ts +0 -0
  1214. /package/dist/{src → types}/utils/index.d.ts.map +0 -0
  1215. /package/dist/{src → types}/utils/providers.d.ts +0 -0
  1216. /package/dist/{src → types}/utils/providers.d.ts.map +0 -0
  1217. /package/dist/{src → types}/utils/set.d.ts +0 -0
  1218. /package/dist/{src → types}/utils/set.d.ts.map +0 -0
  1219. /package/dist/{src → types}/utils/tick.d.ts +0 -0
  1220. /package/dist/{src → types}/utils/tick.d.ts.map +0 -0
  1221. /package/dist/{src → types}/utils/tuple.d.ts +0 -0
  1222. /package/dist/{src → types}/utils/uuid.d.ts +0 -0
  1223. /package/dist/{src → types}/utils/uuid.d.ts.map +0 -0
  1224. /package/tests/{.eslintrc.js → .eslintrc.cjs} +0 -0
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const Database = require("@contember/database");
4
+ const schemaMigrations = require("@contember/schema-migrations");
5
+ const ExecutedMigrationByVersionQuery = require("../../queries/migrations/ExecutedMigrationByVersionQuery.cjs");
6
+ require("../../../schema/dev.graphql.cjs");
7
+ require("../../../schema/system.graphql.cjs");
8
+ class ModifyMigrationCommand {
9
+ constructor(version, migration) {
10
+ this.version = version;
11
+ this.migration = migration;
12
+ }
13
+ async execute({ db }) {
14
+ const current = await db.createQueryHandler().fetch(new ExecutedMigrationByVersionQuery.ExecutedMigrationByVersionQuery(this.version));
15
+ if (!current) {
16
+ return false;
17
+ }
18
+ const newMigration = {
19
+ version: current.version,
20
+ name: current.name,
21
+ formatVersion: current.formatVersion,
22
+ modifications: current.modifications,
23
+ ...this.migration
24
+ };
25
+ const values = {
26
+ version: newMigration.version,
27
+ name: newMigration.name,
28
+ migration: JSON.stringify(newMigration),
29
+ checksum: schemaMigrations.calculateMigrationChecksum(newMigration)
30
+ };
31
+ await Database.UpdateBuilder.create().table("schema_migration").values(values).where({
32
+ version: this.version
33
+ }).execute(db);
34
+ return true;
35
+ }
36
+ }
37
+ exports.ModifyMigrationCommand = ModifyMigrationCommand;
38
+ //# sourceMappingURL=ModifyMigrationCommand.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModifyMigrationCommand.cjs","sources":["../../../../../../../packages/engine-system-api/src/model/commands/migrations/ModifyMigrationCommand.ts"],"sourcesContent":["import { QueryBuilder, UpdateBuilder } from '@contember/database'\nimport { calculateMigrationChecksum, Migration } from '@contember/schema-migrations'\nimport { Command } from '../Command'\nimport { ExecutedMigrationByVersionQuery } from '../../queries'\n\nexport class ModifyMigrationCommand implements Command<boolean> {\n\tconstructor(private readonly version: string, private readonly migration: Partial<Migration>) {}\n\n\tpublic async execute({ db }: Command.Args): Promise<boolean> {\n\t\tconst current = await db.createQueryHandler().fetch(new ExecutedMigrationByVersionQuery(this.version))\n\t\tif (!current) {\n\t\t\treturn false\n\t\t}\n\t\tconst newMigration = {\n\t\t\tversion: current.version,\n\t\t\tname: current.name,\n\t\t\tformatVersion: current.formatVersion,\n\t\t\tmodifications: current.modifications,\n\t\t\t...this.migration,\n\t\t}\n\t\tconst values: QueryBuilder.Values = {\n\t\t\tversion: newMigration.version,\n\t\t\tname: newMigration.name,\n\t\t\tmigration: JSON.stringify(newMigration),\n\t\t\tchecksum: calculateMigrationChecksum(newMigration),\n\t\t}\n\t\tawait UpdateBuilder.create() //\n\t\t\t.table('schema_migration')\n\t\t\t.values(values)\n\t\t\t.where({\n\t\t\t\tversion: this.version,\n\t\t\t})\n\t\t\t.execute(db)\n\t\treturn true\n\t}\n}\n"],"names":["ExecutedMigrationByVersionQuery","calculateMigrationChecksum","UpdateBuilder"],"mappings":";;;;;;;AAKO,MAAM,uBAAmD;AAAA,EAC/D,YAA6B,SAAkC,WAA+B;AAAjE,SAAA,UAAA;AAAkC,SAAA,YAAA;AAAA,EAAgC;AAAA,EAE/F,MAAa,QAAQ,EAAE,MAAsC;AACtD,UAAA,UAAU,MAAM,GAAG,mBAAmB,EAAE,MAAM,IAAIA,gEAAgC,KAAK,OAAO,CAAC;AACrG,QAAI,CAAC,SAAS;AACN,aAAA;AAAA,IACR;AACA,UAAM,eAAe;AAAA,MACpB,SAAS,QAAQ;AAAA,MACjB,MAAM,QAAQ;AAAA,MACd,eAAe,QAAQ;AAAA,MACvB,eAAe,QAAQ;AAAA,MACvB,GAAG,KAAK;AAAA,IAAA;AAET,UAAM,SAA8B;AAAA,MACnC,SAAS,aAAa;AAAA,MACtB,MAAM,aAAa;AAAA,MACnB,WAAW,KAAK,UAAU,YAAY;AAAA,MACtC,UAAUC,4CAA2B,YAAY;AAAA,IAAA;AAE5C,UAAAC,SAAA,cAAc,SAClB,MAAM,kBAAkB,EACxB,OAAO,MAAM,EACb,MAAM;AAAA,MACN,SAAS,KAAK;AAAA,IAAA,CACd,EACA,QAAQ,EAAE;AACL,WAAA;AAAA,EACR;AACD;;"}
@@ -0,0 +1,38 @@
1
+ import { UpdateBuilder as UpdateBuilder$1 } from "@contember/database";
2
+ import { calculateMigrationChecksum } from "@contember/schema-migrations";
3
+ import { ExecutedMigrationByVersionQuery } from "../../queries/migrations/ExecutedMigrationByVersionQuery.js";
4
+ import "../../../schema/dev.graphql.js";
5
+ import "../../../schema/system.graphql.js";
6
+ class ModifyMigrationCommand {
7
+ constructor(version, migration) {
8
+ this.version = version;
9
+ this.migration = migration;
10
+ }
11
+ async execute({ db }) {
12
+ const current = await db.createQueryHandler().fetch(new ExecutedMigrationByVersionQuery(this.version));
13
+ if (!current) {
14
+ return false;
15
+ }
16
+ const newMigration = {
17
+ version: current.version,
18
+ name: current.name,
19
+ formatVersion: current.formatVersion,
20
+ modifications: current.modifications,
21
+ ...this.migration
22
+ };
23
+ const values = {
24
+ version: newMigration.version,
25
+ name: newMigration.name,
26
+ migration: JSON.stringify(newMigration),
27
+ checksum: calculateMigrationChecksum(newMigration)
28
+ };
29
+ await UpdateBuilder$1.create().table("schema_migration").values(values).where({
30
+ version: this.version
31
+ }).execute(db);
32
+ return true;
33
+ }
34
+ }
35
+ export {
36
+ ModifyMigrationCommand
37
+ };
38
+ //# sourceMappingURL=ModifyMigrationCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModifyMigrationCommand.js","sources":["../../../../../../../packages/engine-system-api/src/model/commands/migrations/ModifyMigrationCommand.ts"],"sourcesContent":["import { QueryBuilder, UpdateBuilder } from '@contember/database'\nimport { calculateMigrationChecksum, Migration } from '@contember/schema-migrations'\nimport { Command } from '../Command'\nimport { ExecutedMigrationByVersionQuery } from '../../queries'\n\nexport class ModifyMigrationCommand implements Command<boolean> {\n\tconstructor(private readonly version: string, private readonly migration: Partial<Migration>) {}\n\n\tpublic async execute({ db }: Command.Args): Promise<boolean> {\n\t\tconst current = await db.createQueryHandler().fetch(new ExecutedMigrationByVersionQuery(this.version))\n\t\tif (!current) {\n\t\t\treturn false\n\t\t}\n\t\tconst newMigration = {\n\t\t\tversion: current.version,\n\t\t\tname: current.name,\n\t\t\tformatVersion: current.formatVersion,\n\t\t\tmodifications: current.modifications,\n\t\t\t...this.migration,\n\t\t}\n\t\tconst values: QueryBuilder.Values = {\n\t\t\tversion: newMigration.version,\n\t\t\tname: newMigration.name,\n\t\t\tmigration: JSON.stringify(newMigration),\n\t\t\tchecksum: calculateMigrationChecksum(newMigration),\n\t\t}\n\t\tawait UpdateBuilder.create() //\n\t\t\t.table('schema_migration')\n\t\t\t.values(values)\n\t\t\t.where({\n\t\t\t\tversion: this.version,\n\t\t\t})\n\t\t\t.execute(db)\n\t\treturn true\n\t}\n}\n"],"names":["UpdateBuilder"],"mappings":";;;;;AAKO,MAAM,uBAAmD;AAAA,EAC/D,YAA6B,SAAkC,WAA+B;AAAjE,SAAA,UAAA;AAAkC,SAAA,YAAA;AAAA,EAAgC;AAAA,EAE/F,MAAa,QAAQ,EAAE,MAAsC;AACtD,UAAA,UAAU,MAAM,GAAG,mBAAmB,EAAE,MAAM,IAAI,gCAAgC,KAAK,OAAO,CAAC;AACrG,QAAI,CAAC,SAAS;AACN,aAAA;AAAA,IACR;AACA,UAAM,eAAe;AAAA,MACpB,SAAS,QAAQ;AAAA,MACjB,MAAM,QAAQ;AAAA,MACd,eAAe,QAAQ;AAAA,MACvB,eAAe,QAAQ;AAAA,MACvB,GAAG,KAAK;AAAA,IAAA;AAET,UAAM,SAA8B;AAAA,MACnC,SAAS,aAAa;AAAA,MACtB,MAAM,aAAa;AAAA,MACnB,WAAW,KAAK,UAAU,YAAY;AAAA,MACtC,UAAU,2BAA2B,YAAY;AAAA,IAAA;AAE5C,UAAAA,gBAAc,SAClB,MAAM,kBAAkB,EACxB,OAAO,MAAM,EACb,MAAM;AAAA,MACN,SAAS,KAAK;AAAA,IAAA,CACd,EACA,QAAQ,EAAE;AACL,WAAA;AAAA,EACR;AACD;"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const Database = require("@contember/database");
4
+ const schemaMigrations = require("@contember/schema-migrations");
5
+ class SaveMigrationCommand {
6
+ constructor(migration) {
7
+ this.migration = migration;
8
+ }
9
+ async execute({ db }) {
10
+ const { type, ...migrationData } = this.migration;
11
+ if ("queries" in migrationData) {
12
+ migrationData.queries = [];
13
+ }
14
+ const values = {
15
+ version: this.migration.version,
16
+ name: this.migration.name,
17
+ type,
18
+ migration: JSON.stringify(migrationData),
19
+ checksum: this.migration.type === "schema" ? schemaMigrations.calculateMigrationChecksum(this.migration) : null
20
+ };
21
+ const latestId = (await Database.SelectBuilder.create().from("schema_migration").select(new Database.Literal("max(id)"), "id").getResult(db))[0]?.id ?? 0;
22
+ const newId = latestId + 1;
23
+ await Database.InsertBuilder.create().into("schema_migration").values({ id: newId, ...values }).execute(db);
24
+ return newId;
25
+ }
26
+ }
27
+ exports.SaveMigrationCommand = SaveMigrationCommand;
28
+ //# sourceMappingURL=SaveMigrationCommand.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SaveMigrationCommand.cjs","sources":["../../../../../../../packages/engine-system-api/src/model/commands/migrations/SaveMigrationCommand.ts"],"sourcesContent":["import { InsertBuilder, Literal, QueryBuilder, SelectBuilder } from '@contember/database'\nimport { calculateMigrationChecksum } from '@contember/schema-migrations'\nimport { Command } from '../Command'\nimport { MigrationInput } from '../../migrations/MigrationInput'\n\nexport class SaveMigrationCommand implements Command<number> {\n\tconstructor(private readonly migration: MigrationInput) {}\n\n\tpublic async execute({ db }: Command.Args): Promise<number> {\n\t\tconst { type, ...migrationData } = this.migration\n\n\t\tif ('queries' in migrationData) {\n\t\t\t// in case of content migration, we don't want to store the queries\n\t\t\tmigrationData.queries = []\n\t\t}\n\n\t\tconst values: QueryBuilder.Values = {\n\t\t\tversion: this.migration.version,\n\t\t\tname: this.migration.name,\n\t\t\ttype,\n\t\t\tmigration: JSON.stringify(migrationData),\n\t\t\tchecksum: this.migration.type === 'schema' ? calculateMigrationChecksum(this.migration) : null,\n\t\t}\n\n\t\tconst latestId = (await SelectBuilder.create<{ id: number }>()\n\t\t\t.from('schema_migration')\n\t\t\t.select(new Literal('max(id)'), 'id')\n\t\t\t.getResult(db)\n\t\t)[0]?.id ?? 0\n\n\t\tconst newId = latestId + 1\n\t\tconst result = await InsertBuilder.create()\n\t\t\t.into('schema_migration')\n\t\t\t.values({ id: newId, ...values })\n\t\t\t.execute(db)\n\n\t\treturn newId\n\t}\n}\n"],"names":["calculateMigrationChecksum","SelectBuilder","Literal","InsertBuilder"],"mappings":";;;;AAKO,MAAM,qBAAgD;AAAA,EAC5D,YAA6B,WAA2B;AAA3B,SAAA,YAAA;AAAA,EAA4B;AAAA,EAEzD,MAAa,QAAQ,EAAE,MAAqC;AAC3D,UAAM,EAAE,MAAM,GAAG,cAAA,IAAkB,KAAK;AAExC,QAAI,aAAa,eAAe;AAE/B,oBAAc,UAAU;IACzB;AAEA,UAAM,SAA8B;AAAA,MACnC,SAAS,KAAK,UAAU;AAAA,MACxB,MAAM,KAAK,UAAU;AAAA,MACrB;AAAA,MACA,WAAW,KAAK,UAAU,aAAa;AAAA,MACvC,UAAU,KAAK,UAAU,SAAS,WAAWA,4CAA2B,KAAK,SAAS,IAAI;AAAA,IAAA;AAGrF,UAAA,YAAY,MAAMC,uBAAc,SACpC,KAAK,kBAAkB,EACvB,OAAO,IAAIC,iBAAQ,SAAS,GAAG,IAAI,EACnC,UAAU,EAAE,GACZ,CAAC,GAAG,MAAM;AAEZ,UAAM,QAAQ,WAAW;AACV,UAAMC,SAAA,cAAc,OAAO,EACxC,KAAK,kBAAkB,EACvB,OAAO,EAAE,IAAI,OAAO,GAAG,OAAQ,CAAA,EAC/B,QAAQ,EAAE;AAEL,WAAA;AAAA,EACR;AACD;;"}
@@ -0,0 +1,28 @@
1
+ import { SelectBuilder, Literal, InsertBuilder as InsertBuilder$1 } from "@contember/database";
2
+ import { calculateMigrationChecksum } from "@contember/schema-migrations";
3
+ class SaveMigrationCommand {
4
+ constructor(migration) {
5
+ this.migration = migration;
6
+ }
7
+ async execute({ db }) {
8
+ const { type, ...migrationData } = this.migration;
9
+ if ("queries" in migrationData) {
10
+ migrationData.queries = [];
11
+ }
12
+ const values = {
13
+ version: this.migration.version,
14
+ name: this.migration.name,
15
+ type,
16
+ migration: JSON.stringify(migrationData),
17
+ checksum: this.migration.type === "schema" ? calculateMigrationChecksum(this.migration) : null
18
+ };
19
+ const latestId = (await SelectBuilder.create().from("schema_migration").select(new Literal("max(id)"), "id").getResult(db))[0]?.id ?? 0;
20
+ const newId = latestId + 1;
21
+ await InsertBuilder$1.create().into("schema_migration").values({ id: newId, ...values }).execute(db);
22
+ return newId;
23
+ }
24
+ }
25
+ export {
26
+ SaveMigrationCommand
27
+ };
28
+ //# sourceMappingURL=SaveMigrationCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SaveMigrationCommand.js","sources":["../../../../../../../packages/engine-system-api/src/model/commands/migrations/SaveMigrationCommand.ts"],"sourcesContent":["import { InsertBuilder, Literal, QueryBuilder, SelectBuilder } from '@contember/database'\nimport { calculateMigrationChecksum } from '@contember/schema-migrations'\nimport { Command } from '../Command'\nimport { MigrationInput } from '../../migrations/MigrationInput'\n\nexport class SaveMigrationCommand implements Command<number> {\n\tconstructor(private readonly migration: MigrationInput) {}\n\n\tpublic async execute({ db }: Command.Args): Promise<number> {\n\t\tconst { type, ...migrationData } = this.migration\n\n\t\tif ('queries' in migrationData) {\n\t\t\t// in case of content migration, we don't want to store the queries\n\t\t\tmigrationData.queries = []\n\t\t}\n\n\t\tconst values: QueryBuilder.Values = {\n\t\t\tversion: this.migration.version,\n\t\t\tname: this.migration.name,\n\t\t\ttype,\n\t\t\tmigration: JSON.stringify(migrationData),\n\t\t\tchecksum: this.migration.type === 'schema' ? calculateMigrationChecksum(this.migration) : null,\n\t\t}\n\n\t\tconst latestId = (await SelectBuilder.create<{ id: number }>()\n\t\t\t.from('schema_migration')\n\t\t\t.select(new Literal('max(id)'), 'id')\n\t\t\t.getResult(db)\n\t\t)[0]?.id ?? 0\n\n\t\tconst newId = latestId + 1\n\t\tconst result = await InsertBuilder.create()\n\t\t\t.into('schema_migration')\n\t\t\t.values({ id: newId, ...values })\n\t\t\t.execute(db)\n\n\t\treturn newId\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";;AAKO,MAAM,qBAAgD;AAAA,EAC5D,YAA6B,WAA2B;AAA3B,SAAA,YAAA;AAAA,EAA4B;AAAA,EAEzD,MAAa,QAAQ,EAAE,MAAqC;AAC3D,UAAM,EAAE,MAAM,GAAG,cAAA,IAAkB,KAAK;AAExC,QAAI,aAAa,eAAe;AAE/B,oBAAc,UAAU;IACzB;AAEA,UAAM,SAA8B;AAAA,MACnC,SAAS,KAAK,UAAU;AAAA,MACxB,MAAM,KAAK,UAAU;AAAA,MACrB;AAAA,MACA,WAAW,KAAK,UAAU,aAAa;AAAA,MACvC,UAAU,KAAK,UAAU,SAAS,WAAW,2BAA2B,KAAK,SAAS,IAAI;AAAA,IAAA;AAGrF,UAAA,YAAY,MAAM,cAAc,SACpC,KAAK,kBAAkB,EACvB,OAAO,IAAI,QAAQ,SAAS,GAAG,IAAI,EACnC,UAAU,EAAE,GACZ,CAAC,GAAG,MAAM;AAEZ,UAAM,QAAQ,WAAW;AACV,UAAMA,gBAAc,OAAO,EACxC,KAAK,kBAAkB,EACvB,OAAO,EAAE,IAAI,OAAO,GAAG,OAAQ,CAAA,EAC/B,QAAQ,EAAE;AAEL,WAAA;AAAA,EACR;AACD;"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const Database = require("@contember/database");
4
+ const stageHelpers = require("../../helpers/stageHelpers.cjs");
5
+ require("@contember/schema-utils");
6
+ class CreateStageCommand {
7
+ constructor(stage) {
8
+ this.stage = stage;
9
+ }
10
+ async execute({ db, providers }) {
11
+ const schemaName = this.stage.schema ?? stageHelpers.formatSchemaName(this.stage);
12
+ await Database.InsertBuilder.create().into("stage").values({
13
+ id: providers.uuid(),
14
+ name: this.stage.name,
15
+ slug: this.stage.slug,
16
+ schema: schemaName
17
+ }).execute(db);
18
+ await db.query("CREATE SCHEMA IF NOT EXISTS " + Database.wrapIdentifier(schemaName));
19
+ }
20
+ }
21
+ exports.CreateStageCommand = CreateStageCommand;
22
+ //# sourceMappingURL=CreateStageCommand.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreateStageCommand.cjs","sources":["../../../../../../../packages/engine-system-api/src/model/commands/stages/CreateStageCommand.ts"],"sourcesContent":["import { InsertBuilder, wrapIdentifier } from '@contember/database'\nimport { StageConfig } from '../../../types'\nimport { Command } from '../Command'\nimport { formatSchemaName } from '../../helpers'\n\nexport class CreateStageCommand implements Command<void> {\n\tconstructor(private readonly stage: StageConfig) {}\n\n\tpublic async execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst schemaName = this.stage.schema ?? formatSchemaName(this.stage)\n\t\tawait InsertBuilder.create()\n\t\t\t.into('stage')\n\t\t\t.values({\n\t\t\t\tid: providers.uuid(),\n\t\t\t\tname: this.stage.name,\n\t\t\t\tslug: this.stage.slug,\n\t\t\t\tschema: schemaName,\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\tawait db.query('CREATE SCHEMA IF NOT EXISTS ' + wrapIdentifier(schemaName))\n\t}\n}\n"],"names":["formatSchemaName","InsertBuilder","wrapIdentifier"],"mappings":";;;;;AAKO,MAAM,mBAA4C;AAAA,EACxD,YAA6B,OAAoB;AAApB,SAAA,QAAA;AAAA,EAAqB;AAAA,EAElD,MAAa,QAAQ,EAAE,IAAI,aAA0C;AACpE,UAAM,aAAa,KAAK,MAAM,UAAUA,8BAAiB,KAAK,KAAK;AACnE,UAAMC,SAAAA,cAAc,OAAO,EACzB,KAAK,OAAO,EACZ,OAAO;AAAA,MACP,IAAI,UAAU,KAAK;AAAA,MACnB,MAAM,KAAK,MAAM;AAAA,MACjB,MAAM,KAAK,MAAM;AAAA,MACjB,QAAQ;AAAA,IAAA,CACR,EACA,QAAQ,EAAE;AAEZ,UAAM,GAAG,MAAM,iCAAiCC,SAAAA,eAAe,UAAU,CAAC;AAAA,EAC3E;AACD;;"}
@@ -0,0 +1,22 @@
1
+ import { InsertBuilder as InsertBuilder$1, wrapIdentifier } from "@contember/database";
2
+ import { formatSchemaName } from "../../helpers/stageHelpers.js";
3
+ import "@contember/schema-utils";
4
+ class CreateStageCommand {
5
+ constructor(stage) {
6
+ this.stage = stage;
7
+ }
8
+ async execute({ db, providers }) {
9
+ const schemaName = this.stage.schema ?? formatSchemaName(this.stage);
10
+ await InsertBuilder$1.create().into("stage").values({
11
+ id: providers.uuid(),
12
+ name: this.stage.name,
13
+ slug: this.stage.slug,
14
+ schema: schemaName
15
+ }).execute(db);
16
+ await db.query("CREATE SCHEMA IF NOT EXISTS " + wrapIdentifier(schemaName));
17
+ }
18
+ }
19
+ export {
20
+ CreateStageCommand
21
+ };
22
+ //# sourceMappingURL=CreateStageCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreateStageCommand.js","sources":["../../../../../../../packages/engine-system-api/src/model/commands/stages/CreateStageCommand.ts"],"sourcesContent":["import { InsertBuilder, wrapIdentifier } from '@contember/database'\nimport { StageConfig } from '../../../types'\nimport { Command } from '../Command'\nimport { formatSchemaName } from '../../helpers'\n\nexport class CreateStageCommand implements Command<void> {\n\tconstructor(private readonly stage: StageConfig) {}\n\n\tpublic async execute({ db, providers }: Command.Args): Promise<void> {\n\t\tconst schemaName = this.stage.schema ?? formatSchemaName(this.stage)\n\t\tawait InsertBuilder.create()\n\t\t\t.into('stage')\n\t\t\t.values({\n\t\t\t\tid: providers.uuid(),\n\t\t\t\tname: this.stage.name,\n\t\t\t\tslug: this.stage.slug,\n\t\t\t\tschema: schemaName,\n\t\t\t})\n\t\t\t.execute(db)\n\n\t\tawait db.query('CREATE SCHEMA IF NOT EXISTS ' + wrapIdentifier(schemaName))\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";;;AAKO,MAAM,mBAA4C;AAAA,EACxD,YAA6B,OAAoB;AAApB,SAAA,QAAA;AAAA,EAAqB;AAAA,EAElD,MAAa,QAAQ,EAAE,IAAI,aAA0C;AACpE,UAAM,aAAa,KAAK,MAAM,UAAU,iBAAiB,KAAK,KAAK;AACnE,UAAMA,gBAAc,OAAO,EACzB,KAAK,OAAO,EACZ,OAAO;AAAA,MACP,IAAI,UAAU,KAAK;AAAA,MACnB,MAAM,KAAK,MAAM;AAAA,MACjB,MAAM,KAAK,MAAM;AAAA,MACjB,QAAQ;AAAA,IAAA,CACR,EACA,QAAQ,EAAE;AAEZ,UAAM,GAAG,MAAM,iCAAiC,eAAe,UAAU,CAAC;AAAA,EAC3E;AACD;"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const Database = require("@contember/database");
4
+ const CommandBus = require("../commands/CommandBus.cjs");
5
+ require("@contember/schema-migrations");
6
+ require("@contember/schema-utils");
7
+ class DatabaseContextFactory {
8
+ constructor(schemaName, providers) {
9
+ this.schemaName = schemaName;
10
+ this.providers = providers;
11
+ }
12
+ create(connection) {
13
+ const client = new Database.Client(connection, this.schemaName, { module: "system" });
14
+ return createDatabaseContext(client, this.providers);
15
+ }
16
+ }
17
+ const createDatabaseContext = (client, providers) => ({
18
+ client,
19
+ queryHandler: client.createQueryHandler(),
20
+ transaction: (cb) => client.transaction(async (client2) => {
21
+ await client2.query(Database.Connection.REPEATABLE_READ);
22
+ return cb(createDatabaseContext(client2, providers));
23
+ }),
24
+ scope: (cb) => client.scope((client2) => cb(createDatabaseContext(client2, providers))),
25
+ commandBus: new CommandBus.CommandBus(client, providers),
26
+ locked: (lock, cb) => client.locked(lock, (client2) => cb(createDatabaseContext(client2, providers)))
27
+ });
28
+ exports.DatabaseContextFactory = DatabaseContextFactory;
29
+ //# sourceMappingURL=DatabaseContext.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DatabaseContext.cjs","sources":["../../../../../../packages/engine-system-api/src/model/database/DatabaseContext.ts"],"sourcesContent":["import { Client, Connection, DatabaseQueryable } from '@contember/database'\nimport { QueryHandler } from '@contember/queryable'\nimport { UuidProvider } from '../../utils'\nimport { CommandBus } from '../commands'\n\nexport interface DatabaseContext<ConnectionType extends Connection.ConnectionLike = Connection.ConnectionLike> {\n\tclient: Client<ConnectionType>\n\tqueryHandler: QueryHandler<DatabaseQueryable>\n\ttransaction: <T>(cb: (db: DatabaseContext<Connection.TransactionLike>) => Promise<T> | T) => Promise<T>\n\tscope: <T>(cb: (db: DatabaseContext<ConnectionType & Connection.AcquiredConnectionLike>) => Promise<T> | T) => Promise<T>\n\tlocked: <T>(lock: number, cb: (db: DatabaseContext<Connection.ConnectionLike>) => Promise<T> | T) => Promise<T>\n\tcommandBus: CommandBus\n}\n\nexport class DatabaseContextFactory {\n\tconstructor(\n\t\tpublic readonly schemaName: string,\n\t\tprivate readonly providers: UuidProvider,\n\t) {}\n\n\tpublic create(connection: Connection.ConnectionLike): DatabaseContext {\n\t\tconst client = new Client(connection, this.schemaName, { module: 'system' })\n\t\treturn createDatabaseContext(client, this.providers)\n\t}\n}\n\nconst createDatabaseContext = <ConnectionType extends Connection.ConnectionLike = Connection.ConnectionLike>(\n\tclient: Client<ConnectionType>,\n\tproviders: UuidProvider,\n): DatabaseContext<ConnectionType> => ({\n\tclient,\n\tqueryHandler: client.createQueryHandler(),\n\ttransaction: cb =>\n\t\tclient.transaction(async client => {\n\t\t\tawait client.query(Connection.REPEATABLE_READ)\n\t\t\treturn cb(createDatabaseContext(client, providers))\n\t\t}),\n\tscope: cb =>\n\t\tclient.scope(client => cb(createDatabaseContext(client, providers))),\n\tcommandBus: new CommandBus(client, providers),\n\tlocked: (lock, cb) => client.locked(lock, client => cb(createDatabaseContext(client, providers))),\n})\n"],"names":["Client","client","Connection","CommandBus"],"mappings":";;;;;;AAcO,MAAM,uBAAuB;AAAA,EACnC,YACiB,YACC,WAChB;AAFe,SAAA,aAAA;AACC,SAAA,YAAA;AAAA,EACf;AAAA,EAEI,OAAO,YAAwD;AAC/D,UAAA,SAAS,IAAIA,SAAO,OAAA,YAAY,KAAK,YAAY,EAAE,QAAQ,SAAA,CAAU;AACpE,WAAA,sBAAsB,QAAQ,KAAK,SAAS;AAAA,EACpD;AACD;AAEA,MAAM,wBAAwB,CAC7B,QACA,eACsC;AAAA,EACtC;AAAA,EACA,cAAc,OAAO,mBAAmB;AAAA,EACxC,aAAa,CAAA,OACZ,OAAO,YAAY,OAAMC,YAAU;AAC5BA,UAAAA,QAAO,MAAMC,SAAA,WAAW,eAAe;AAC7C,WAAO,GAAG,sBAAsBD,SAAQ,SAAS,CAAC;AAAA,EAAA,CAClD;AAAA,EACF,OAAO,CACN,OAAA,OAAO,MAAM,CAAAA,YAAU,GAAG,sBAAsBA,SAAQ,SAAS,CAAC,CAAC;AAAA,EACpE,YAAY,IAAIE,WAAAA,WAAW,QAAQ,SAAS;AAAA,EAC5C,QAAQ,CAAC,MAAM,OAAO,OAAO,OAAO,MAAM,CAAAF,YAAU,GAAG,sBAAsBA,SAAQ,SAAS,CAAC,CAAC;AACjG;;"}
@@ -0,0 +1,29 @@
1
+ import { Client, Connection } from "@contember/database";
2
+ import { CommandBus } from "../commands/CommandBus.js";
3
+ import "@contember/schema-migrations";
4
+ import "@contember/schema-utils";
5
+ class DatabaseContextFactory {
6
+ constructor(schemaName, providers) {
7
+ this.schemaName = schemaName;
8
+ this.providers = providers;
9
+ }
10
+ create(connection) {
11
+ const client = new Client(connection, this.schemaName, { module: "system" });
12
+ return createDatabaseContext(client, this.providers);
13
+ }
14
+ }
15
+ const createDatabaseContext = (client, providers) => ({
16
+ client,
17
+ queryHandler: client.createQueryHandler(),
18
+ transaction: (cb) => client.transaction(async (client2) => {
19
+ await client2.query(Connection.REPEATABLE_READ);
20
+ return cb(createDatabaseContext(client2, providers));
21
+ }),
22
+ scope: (cb) => client.scope((client2) => cb(createDatabaseContext(client2, providers))),
23
+ commandBus: new CommandBus(client, providers),
24
+ locked: (lock, cb) => client.locked(lock, (client2) => cb(createDatabaseContext(client2, providers)))
25
+ });
26
+ export {
27
+ DatabaseContextFactory
28
+ };
29
+ //# sourceMappingURL=DatabaseContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DatabaseContext.js","sources":["../../../../../../packages/engine-system-api/src/model/database/DatabaseContext.ts"],"sourcesContent":["import { Client, Connection, DatabaseQueryable } from '@contember/database'\nimport { QueryHandler } from '@contember/queryable'\nimport { UuidProvider } from '../../utils'\nimport { CommandBus } from '../commands'\n\nexport interface DatabaseContext<ConnectionType extends Connection.ConnectionLike = Connection.ConnectionLike> {\n\tclient: Client<ConnectionType>\n\tqueryHandler: QueryHandler<DatabaseQueryable>\n\ttransaction: <T>(cb: (db: DatabaseContext<Connection.TransactionLike>) => Promise<T> | T) => Promise<T>\n\tscope: <T>(cb: (db: DatabaseContext<ConnectionType & Connection.AcquiredConnectionLike>) => Promise<T> | T) => Promise<T>\n\tlocked: <T>(lock: number, cb: (db: DatabaseContext<Connection.ConnectionLike>) => Promise<T> | T) => Promise<T>\n\tcommandBus: CommandBus\n}\n\nexport class DatabaseContextFactory {\n\tconstructor(\n\t\tpublic readonly schemaName: string,\n\t\tprivate readonly providers: UuidProvider,\n\t) {}\n\n\tpublic create(connection: Connection.ConnectionLike): DatabaseContext {\n\t\tconst client = new Client(connection, this.schemaName, { module: 'system' })\n\t\treturn createDatabaseContext(client, this.providers)\n\t}\n}\n\nconst createDatabaseContext = <ConnectionType extends Connection.ConnectionLike = Connection.ConnectionLike>(\n\tclient: Client<ConnectionType>,\n\tproviders: UuidProvider,\n): DatabaseContext<ConnectionType> => ({\n\tclient,\n\tqueryHandler: client.createQueryHandler(),\n\ttransaction: cb =>\n\t\tclient.transaction(async client => {\n\t\t\tawait client.query(Connection.REPEATABLE_READ)\n\t\t\treturn cb(createDatabaseContext(client, providers))\n\t\t}),\n\tscope: cb =>\n\t\tclient.scope(client => cb(createDatabaseContext(client, providers))),\n\tcommandBus: new CommandBus(client, providers),\n\tlocked: (lock, cb) => client.locked(lock, client => cb(createDatabaseContext(client, providers))),\n})\n"],"names":["client"],"mappings":";;;;AAcO,MAAM,uBAAuB;AAAA,EACnC,YACiB,YACC,WAChB;AAFe,SAAA,aAAA;AACC,SAAA,YAAA;AAAA,EACf;AAAA,EAEI,OAAO,YAAwD;AAC/D,UAAA,SAAS,IAAI,OAAO,YAAY,KAAK,YAAY,EAAE,QAAQ,SAAA,CAAU;AACpE,WAAA,sBAAsB,QAAQ,KAAK,SAAS;AAAA,EACpD;AACD;AAEA,MAAM,wBAAwB,CAC7B,QACA,eACsC;AAAA,EACtC;AAAA,EACA,cAAc,OAAO,mBAAmB;AAAA,EACxC,aAAa,CAAA,OACZ,OAAO,YAAY,OAAMA,YAAU;AAC5BA,UAAAA,QAAO,MAAM,WAAW,eAAe;AAC7C,WAAO,GAAG,sBAAsBA,SAAQ,SAAS,CAAC;AAAA,EAAA,CAClD;AAAA,EACF,OAAO,CACN,OAAA,OAAO,MAAM,CAAAA,YAAU,GAAG,sBAAsBA,SAAQ,SAAS,CAAC,CAAC;AAAA,EACpE,YAAY,IAAI,WAAW,QAAQ,SAAS;AAAA,EAC5C,QAAQ,CAAC,MAAM,OAAO,OAAO,OAAO,MAAM,CAAAA,YAAU,GAAG,sBAAsBA,SAAQ,SAAS,CAAC,CAAC;AACjG;"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const schemaMigrations = require("@contember/schema-migrations");
4
+ var __defProp = Object.defineProperty;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __publicField = (obj, key, value) => __defNormalProp(obj, key + "", value);
7
+ class ExecutedMigration {
8
+ constructor(id, name, formatVersion, modifications, executedAt, checksum, type) {
9
+ this.id = id;
10
+ this.name = name;
11
+ this.formatVersion = formatVersion;
12
+ this.modifications = modifications;
13
+ this.executedAt = executedAt;
14
+ this.checksum = checksum;
15
+ this.type = type;
16
+ __publicField(this, "version");
17
+ this.version = schemaMigrations.MigrationVersionHelper.extractVersion(name);
18
+ }
19
+ }
20
+ exports.ExecutedMigration = ExecutedMigration;
21
+ //# sourceMappingURL=ExecutedMigration.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExecutedMigration.cjs","sources":["../../../../../../packages/engine-system-api/src/model/dtos/ExecutedMigration.ts"],"sourcesContent":["import { Migration, MigrationVersionHelper } from '@contember/schema-migrations'\n\nexport class ExecutedMigration implements Migration {\n\tpublic readonly version: string\n\n\tconstructor(\n\t\tpublic readonly id: number,\n\t\tpublic readonly name: string,\n\t\tpublic readonly formatVersion: number,\n\t\tpublic readonly modifications: Migration.Modification[],\n\t\tpublic readonly executedAt: Date,\n\t\tpublic readonly checksum: string | null,\n\t\tpublic readonly type: 'schema' | 'content',\n\n\t) {\n\t\tthis.version = MigrationVersionHelper.extractVersion(name)\n\t}\n}\n"],"names":["MigrationVersionHelper"],"mappings":";;;;;;AAEO,MAAM,kBAAuC;AAAA,EAGnD,YACiB,IACA,MACA,eACA,eACA,YACA,UACA,MAEf;AARe,SAAA,KAAA;AACA,SAAA,OAAA;AACA,SAAA,gBAAA;AACA,SAAA,gBAAA;AACA,SAAA,aAAA;AACA,SAAA,WAAA;AACA,SAAA,OAAA;AATD,kBAAA,MAAA,SAAA;AAYV,SAAA,UAAUA,iBAAAA,uBAAuB,eAAe,IAAI;AAAA,EAC1D;AACD;;"}
@@ -0,0 +1,21 @@
1
+ import { MigrationVersionHelper } from "@contember/schema-migrations";
2
+ var __defProp = Object.defineProperty;
3
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
+ var __publicField = (obj, key, value) => __defNormalProp(obj, key + "", value);
5
+ class ExecutedMigration {
6
+ constructor(id, name, formatVersion, modifications, executedAt, checksum, type) {
7
+ this.id = id;
8
+ this.name = name;
9
+ this.formatVersion = formatVersion;
10
+ this.modifications = modifications;
11
+ this.executedAt = executedAt;
12
+ this.checksum = checksum;
13
+ this.type = type;
14
+ __publicField(this, "version");
15
+ this.version = MigrationVersionHelper.extractVersion(name);
16
+ }
17
+ }
18
+ export {
19
+ ExecutedMigration
20
+ };
21
+ //# sourceMappingURL=ExecutedMigration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExecutedMigration.js","sources":["../../../../../../packages/engine-system-api/src/model/dtos/ExecutedMigration.ts"],"sourcesContent":["import { Migration, MigrationVersionHelper } from '@contember/schema-migrations'\n\nexport class ExecutedMigration implements Migration {\n\tpublic readonly version: string\n\n\tconstructor(\n\t\tpublic readonly id: number,\n\t\tpublic readonly name: string,\n\t\tpublic readonly formatVersion: number,\n\t\tpublic readonly modifications: Migration.Modification[],\n\t\tpublic readonly executedAt: Date,\n\t\tpublic readonly checksum: string | null,\n\t\tpublic readonly type: 'schema' | 'content',\n\n\t) {\n\t\tthis.version = MigrationVersionHelper.extractVersion(name)\n\t}\n}\n"],"names":[],"mappings":";;;;AAEO,MAAM,kBAAuC;AAAA,EAGnD,YACiB,IACA,MACA,eACA,eACA,YACA,UACA,MAEf;AARe,SAAA,KAAA;AACA,SAAA,OAAA;AACA,SAAA,gBAAA;AACA,SAAA,gBAAA;AACA,SAAA,aAAA;AACA,SAAA,WAAA;AACA,SAAA,OAAA;AATD,kBAAA,MAAA,SAAA;AAYV,SAAA,UAAU,uBAAuB,eAAe,IAAI;AAAA,EAC1D;AACD;"}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const types = require("./types.cjs");
4
+ const types$1 = require("../../schema/types.cjs");
5
+ require("../../schema/dev.graphql.cjs");
6
+ require("../../schema/system.graphql.cjs");
7
+ const assertNever = require("../../utils/assertNever.cjs");
8
+ const identityUtils = require("./identityUtils.cjs");
9
+ const EventResponseHelper = require("./EventResponseHelper.cjs");
10
+ class EventResponseBuilder {
11
+ constructor(identityFetcher) {
12
+ this.identityFetcher = identityFetcher;
13
+ }
14
+ async buildResponse(events) {
15
+ const apiEventTypeMapping = {
16
+ [types.EventType.create]: types$1.EventType.Create,
17
+ [types.EventType.update]: types$1.EventType.Update,
18
+ [types.EventType.delete]: types$1.EventType.Delete
19
+ };
20
+ const identityIds = events.map((it) => it.identityId).filter((it, index, ids) => ids.indexOf(it) === index);
21
+ const identities = await this.identityFetcher.fetchIdentities(identityIds);
22
+ const identitiesMap = Object.fromEntries(identities.map((it) => [it.identityId, it]));
23
+ return events.map((it) => {
24
+ const commonData = {
25
+ createdAt: it.createdAt,
26
+ appliedAt: it.appliedAt,
27
+ id: it.id,
28
+ type: apiEventTypeMapping[it.type],
29
+ description: this.formatDescription(it),
30
+ transactionId: it.transactionId,
31
+ identityId: it.identityId,
32
+ identityDescription: identityUtils.formatIdentity(identitiesMap[it.identityId])
33
+ };
34
+ switch (it.type) {
35
+ case types.EventType.create:
36
+ return (() => EventResponseHelper.appendCreateSpecificData(commonData, it))();
37
+ case types.EventType.update:
38
+ return (() => EventResponseHelper.appendUpdateSpecificData(commonData, it))();
39
+ case types.EventType.delete:
40
+ return (() => EventResponseHelper.appendDeleteSpecificData(commonData, it))();
41
+ }
42
+ assertNever.assertNever();
43
+ });
44
+ }
45
+ formatDescription(event) {
46
+ switch (event.type) {
47
+ case types.EventType.create:
48
+ return `Creating ${event.tableName}#${event.rowId.join(";")}`;
49
+ case types.EventType.update:
50
+ return `Updating ${event.tableName}#${event.rowId.join(";")}`;
51
+ case types.EventType.delete:
52
+ return `Deleting ${event.tableName}#${event.rowId.join(";")}`;
53
+ default:
54
+ return assertNever.assertNever();
55
+ }
56
+ }
57
+ }
58
+ exports.EventResponseBuilder = EventResponseBuilder;
59
+ //# sourceMappingURL=EventResponseBuilder.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventResponseBuilder.cjs","sources":["../../../../../../packages/engine-system-api/src/model/events/EventResponseBuilder.ts"],"sourcesContent":["import { ContentEvent, EventType } from './types'\nimport { CreateEvent, DeleteEvent, EventType as ApiEventType, UpdateEvent } from '../../schema'\nimport { assertNever } from '../../utils'\nimport { IdentityFetcher } from '../dependencies'\nimport { formatIdentity } from './identityUtils'\nimport { appendCreateSpecificData, appendDeleteSpecificData, appendUpdateSpecificData } from './EventResponseHelper'\n\nexport class EventResponseBuilder {\n\tconstructor(private readonly identityFetcher: IdentityFetcher) {}\n\n\tpublic async buildResponse(events: ContentEvent[]): Promise<(CreateEvent | DeleteEvent | UpdateEvent)[]> {\n\t\tconst apiEventTypeMapping = {\n\t\t\t[EventType.create]: ApiEventType.Create,\n\t\t\t[EventType.update]: ApiEventType.Update,\n\t\t\t[EventType.delete]: ApiEventType.Delete,\n\t\t}\n\t\tconst identityIds = events.map(it => it.identityId).filter((it, index, ids) => ids.indexOf(it) === index)\n\t\tconst identities = await this.identityFetcher.fetchIdentities(identityIds)\n\t\tconst identitiesMap = Object.fromEntries(identities.map(it => [it.identityId, it]))\n\n\t\treturn events.map(it => {\n\t\t\tconst commonData = {\n\t\t\t\tcreatedAt: it.createdAt,\n\t\t\t\tappliedAt: it.appliedAt,\n\t\t\t\tid: it.id,\n\t\t\t\ttype: apiEventTypeMapping[it.type],\n\t\t\t\tdescription: this.formatDescription(it),\n\t\t\t\ttransactionId: it.transactionId,\n\t\t\t\tidentityId: it.identityId,\n\t\t\t\tidentityDescription: formatIdentity(identitiesMap[it.identityId]),\n\t\t\t}\n\t\t\tswitch (it.type) {\n\t\t\t\tcase EventType.create:\n\t\t\t\t\treturn ((): CreateEvent => appendCreateSpecificData(commonData, it))()\n\t\t\t\tcase EventType.update:\n\t\t\t\t\treturn ((): UpdateEvent => appendUpdateSpecificData(commonData, it))()\n\t\t\t\tcase EventType.delete:\n\t\t\t\t\treturn ((): DeleteEvent => appendDeleteSpecificData(commonData, it))()\n\t\t\t}\n\t\t\tassertNever(it)\n\t\t})\n\t}\n\n\tprivate formatDescription(event: ContentEvent): string {\n\t\tswitch (event.type) {\n\t\t\tcase EventType.create:\n\t\t\t\treturn `Creating ${event.tableName}#${event.rowId.join(';')}`\n\t\t\tcase EventType.update:\n\t\t\t\treturn `Updating ${event.tableName}#${event.rowId.join(';')}`\n\t\t\tcase EventType.delete:\n\t\t\t\treturn `Deleting ${event.tableName}#${event.rowId.join(';')}`\n\t\t\tdefault:\n\t\t\t\treturn assertNever(event)\n\t\t}\n\t}\n}\n"],"names":["EventType","ApiEventType","formatIdentity","appendCreateSpecificData","appendUpdateSpecificData","appendDeleteSpecificData","assertNever"],"mappings":";;;;;;;;;AAOO,MAAM,qBAAqB;AAAA,EACjC,YAA6B,iBAAkC;AAAlC,SAAA,kBAAA;AAAA,EAAmC;AAAA,EAEhE,MAAa,cAAc,QAA8E;AACxG,UAAM,sBAAsB;AAAA,MAC3B,CAACA,MAAA,UAAU,MAAM,GAAGC,QAAAA,UAAa;AAAA,MACjC,CAACD,MAAA,UAAU,MAAM,GAAGC,QAAAA,UAAa;AAAA,MACjC,CAACD,MAAA,UAAU,MAAM,GAAGC,QAAAA,UAAa;AAAA,IAAA;AAElC,UAAM,cAAc,OAAO,IAAI,CAAM,OAAA,GAAG,UAAU,EAAE,OAAO,CAAC,IAAI,OAAO,QAAQ,IAAI,QAAQ,EAAE,MAAM,KAAK;AACxG,UAAM,aAAa,MAAM,KAAK,gBAAgB,gBAAgB,WAAW;AACnE,UAAA,gBAAgB,OAAO,YAAY,WAAW,IAAI,CAAM,OAAA,CAAC,GAAG,YAAY,EAAE,CAAC,CAAC;AAE3E,WAAA,OAAO,IAAI,CAAM,OAAA;AACvB,YAAM,aAAa;AAAA,QAClB,WAAW,GAAG;AAAA,QACd,WAAW,GAAG;AAAA,QACd,IAAI,GAAG;AAAA,QACP,MAAM,oBAAoB,GAAG,IAAI;AAAA,QACjC,aAAa,KAAK,kBAAkB,EAAE;AAAA,QACtC,eAAe,GAAG;AAAA,QAClB,YAAY,GAAG;AAAA,QACf,qBAAqBC,cAAAA,eAAe,cAAc,GAAG,UAAU,CAAC;AAAA,MAAA;AAEjE,cAAQ,GAAG,MAAM;AAAA,QAChB,KAAKF,MAAU,UAAA;AACd,kBAAQ,MAAmBG,oBAAA,yBAAyB,YAAY,EAAE,GAAG;AAAA,QACtE,KAAKH,MAAU,UAAA;AACd,kBAAQ,MAAmBI,oBAAA,yBAAyB,YAAY,EAAE,GAAG;AAAA,QACtE,KAAKJ,MAAU,UAAA;AACd,kBAAQ,MAAmBK,oBAAA,yBAAyB,YAAY,EAAE,GAAG;AAAA,MACvE;AACAC,kBAAAA,YAAc;AAAA,IAAA,CACd;AAAA,EACF;AAAA,EAEQ,kBAAkB,OAA6B;AACtD,YAAQ,MAAM,MAAM;AAAA,MACnB,KAAKN,MAAU,UAAA;AACP,eAAA,YAAY,MAAM,SAAS,IAAI,MAAM,MAAM,KAAK,GAAG,CAAC;AAAA,MAC5D,KAAKA,MAAU,UAAA;AACP,eAAA,YAAY,MAAM,SAAS,IAAI,MAAM,MAAM,KAAK,GAAG,CAAC;AAAA,MAC5D,KAAKA,MAAU,UAAA;AACP,eAAA,YAAY,MAAM,SAAS,IAAI,MAAM,MAAM,KAAK,GAAG,CAAC;AAAA,MAC5D;AACC,eAAOM,YAAAA,YAAiB;AAAA,IAC1B;AAAA,EACD;AACD;;"}
@@ -0,0 +1,59 @@
1
+ import { EventType } from "./types.js";
2
+ import { EventType as EventType$1 } from "../../schema/types.js";
3
+ import "../../schema/dev.graphql.js";
4
+ import "../../schema/system.graphql.js";
5
+ import { assertNever } from "../../utils/assertNever.js";
6
+ import { formatIdentity } from "./identityUtils.js";
7
+ import { appendDeleteSpecificData, appendUpdateSpecificData, appendCreateSpecificData } from "./EventResponseHelper.js";
8
+ class EventResponseBuilder {
9
+ constructor(identityFetcher) {
10
+ this.identityFetcher = identityFetcher;
11
+ }
12
+ async buildResponse(events) {
13
+ const apiEventTypeMapping = {
14
+ [EventType.create]: EventType$1.Create,
15
+ [EventType.update]: EventType$1.Update,
16
+ [EventType.delete]: EventType$1.Delete
17
+ };
18
+ const identityIds = events.map((it) => it.identityId).filter((it, index, ids) => ids.indexOf(it) === index);
19
+ const identities = await this.identityFetcher.fetchIdentities(identityIds);
20
+ const identitiesMap = Object.fromEntries(identities.map((it) => [it.identityId, it]));
21
+ return events.map((it) => {
22
+ const commonData = {
23
+ createdAt: it.createdAt,
24
+ appliedAt: it.appliedAt,
25
+ id: it.id,
26
+ type: apiEventTypeMapping[it.type],
27
+ description: this.formatDescription(it),
28
+ transactionId: it.transactionId,
29
+ identityId: it.identityId,
30
+ identityDescription: formatIdentity(identitiesMap[it.identityId])
31
+ };
32
+ switch (it.type) {
33
+ case EventType.create:
34
+ return (() => appendCreateSpecificData(commonData, it))();
35
+ case EventType.update:
36
+ return (() => appendUpdateSpecificData(commonData, it))();
37
+ case EventType.delete:
38
+ return (() => appendDeleteSpecificData(commonData, it))();
39
+ }
40
+ assertNever();
41
+ });
42
+ }
43
+ formatDescription(event) {
44
+ switch (event.type) {
45
+ case EventType.create:
46
+ return `Creating ${event.tableName}#${event.rowId.join(";")}`;
47
+ case EventType.update:
48
+ return `Updating ${event.tableName}#${event.rowId.join(";")}`;
49
+ case EventType.delete:
50
+ return `Deleting ${event.tableName}#${event.rowId.join(";")}`;
51
+ default:
52
+ return assertNever();
53
+ }
54
+ }
55
+ }
56
+ export {
57
+ EventResponseBuilder
58
+ };
59
+ //# sourceMappingURL=EventResponseBuilder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventResponseBuilder.js","sources":["../../../../../../packages/engine-system-api/src/model/events/EventResponseBuilder.ts"],"sourcesContent":["import { ContentEvent, EventType } from './types'\nimport { CreateEvent, DeleteEvent, EventType as ApiEventType, UpdateEvent } from '../../schema'\nimport { assertNever } from '../../utils'\nimport { IdentityFetcher } from '../dependencies'\nimport { formatIdentity } from './identityUtils'\nimport { appendCreateSpecificData, appendDeleteSpecificData, appendUpdateSpecificData } from './EventResponseHelper'\n\nexport class EventResponseBuilder {\n\tconstructor(private readonly identityFetcher: IdentityFetcher) {}\n\n\tpublic async buildResponse(events: ContentEvent[]): Promise<(CreateEvent | DeleteEvent | UpdateEvent)[]> {\n\t\tconst apiEventTypeMapping = {\n\t\t\t[EventType.create]: ApiEventType.Create,\n\t\t\t[EventType.update]: ApiEventType.Update,\n\t\t\t[EventType.delete]: ApiEventType.Delete,\n\t\t}\n\t\tconst identityIds = events.map(it => it.identityId).filter((it, index, ids) => ids.indexOf(it) === index)\n\t\tconst identities = await this.identityFetcher.fetchIdentities(identityIds)\n\t\tconst identitiesMap = Object.fromEntries(identities.map(it => [it.identityId, it]))\n\n\t\treturn events.map(it => {\n\t\t\tconst commonData = {\n\t\t\t\tcreatedAt: it.createdAt,\n\t\t\t\tappliedAt: it.appliedAt,\n\t\t\t\tid: it.id,\n\t\t\t\ttype: apiEventTypeMapping[it.type],\n\t\t\t\tdescription: this.formatDescription(it),\n\t\t\t\ttransactionId: it.transactionId,\n\t\t\t\tidentityId: it.identityId,\n\t\t\t\tidentityDescription: formatIdentity(identitiesMap[it.identityId]),\n\t\t\t}\n\t\t\tswitch (it.type) {\n\t\t\t\tcase EventType.create:\n\t\t\t\t\treturn ((): CreateEvent => appendCreateSpecificData(commonData, it))()\n\t\t\t\tcase EventType.update:\n\t\t\t\t\treturn ((): UpdateEvent => appendUpdateSpecificData(commonData, it))()\n\t\t\t\tcase EventType.delete:\n\t\t\t\t\treturn ((): DeleteEvent => appendDeleteSpecificData(commonData, it))()\n\t\t\t}\n\t\t\tassertNever(it)\n\t\t})\n\t}\n\n\tprivate formatDescription(event: ContentEvent): string {\n\t\tswitch (event.type) {\n\t\t\tcase EventType.create:\n\t\t\t\treturn `Creating ${event.tableName}#${event.rowId.join(';')}`\n\t\t\tcase EventType.update:\n\t\t\t\treturn `Updating ${event.tableName}#${event.rowId.join(';')}`\n\t\t\tcase EventType.delete:\n\t\t\t\treturn `Deleting ${event.tableName}#${event.rowId.join(';')}`\n\t\t\tdefault:\n\t\t\t\treturn assertNever(event)\n\t\t}\n\t}\n}\n"],"names":["ApiEventType"],"mappings":";;;;;;;AAOO,MAAM,qBAAqB;AAAA,EACjC,YAA6B,iBAAkC;AAAlC,SAAA,kBAAA;AAAA,EAAmC;AAAA,EAEhE,MAAa,cAAc,QAA8E;AACxG,UAAM,sBAAsB;AAAA,MAC3B,CAAC,UAAU,MAAM,GAAGA,YAAa;AAAA,MACjC,CAAC,UAAU,MAAM,GAAGA,YAAa;AAAA,MACjC,CAAC,UAAU,MAAM,GAAGA,YAAa;AAAA,IAAA;AAElC,UAAM,cAAc,OAAO,IAAI,CAAM,OAAA,GAAG,UAAU,EAAE,OAAO,CAAC,IAAI,OAAO,QAAQ,IAAI,QAAQ,EAAE,MAAM,KAAK;AACxG,UAAM,aAAa,MAAM,KAAK,gBAAgB,gBAAgB,WAAW;AACnE,UAAA,gBAAgB,OAAO,YAAY,WAAW,IAAI,CAAM,OAAA,CAAC,GAAG,YAAY,EAAE,CAAC,CAAC;AAE3E,WAAA,OAAO,IAAI,CAAM,OAAA;AACvB,YAAM,aAAa;AAAA,QAClB,WAAW,GAAG;AAAA,QACd,WAAW,GAAG;AAAA,QACd,IAAI,GAAG;AAAA,QACP,MAAM,oBAAoB,GAAG,IAAI;AAAA,QACjC,aAAa,KAAK,kBAAkB,EAAE;AAAA,QACtC,eAAe,GAAG;AAAA,QAClB,YAAY,GAAG;AAAA,QACf,qBAAqB,eAAe,cAAc,GAAG,UAAU,CAAC;AAAA,MAAA;AAEjE,cAAQ,GAAG,MAAM;AAAA,QAChB,KAAK,UAAU;AACd,kBAAQ,MAAmB,yBAAyB,YAAY,EAAE,GAAG;AAAA,QACtE,KAAK,UAAU;AACd,kBAAQ,MAAmB,yBAAyB,YAAY,EAAE,GAAG;AAAA,QACtE,KAAK,UAAU;AACd,kBAAQ,MAAmB,yBAAyB,YAAY,EAAE,GAAG;AAAA,MACvE;AACA,kBAAc;AAAA,IAAA,CACd;AAAA,EACF;AAAA,EAEQ,kBAAkB,OAA6B;AACtD,YAAQ,MAAM,MAAM;AAAA,MACnB,KAAK,UAAU;AACP,eAAA,YAAY,MAAM,SAAS,IAAI,MAAM,MAAM,KAAK,GAAG,CAAC;AAAA,MAC5D,KAAK,UAAU;AACP,eAAA,YAAY,MAAM,SAAS,IAAI,MAAM,MAAM,KAAK,GAAG,CAAC;AAAA,MAC5D,KAAK,UAAU;AACP,eAAA,YAAY,MAAM,SAAS,IAAI,MAAM,MAAM,KAAK,GAAG,CAAC;AAAA,MAC5D;AACC,eAAO,YAAiB;AAAA,IAC1B;AAAA,EACD;AACD;"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const appendUpdateSpecificData = (commonData, event) => ({
4
+ ...commonData,
5
+ tableName: event.tableName,
6
+ primaryKey: event.rowId,
7
+ diffValues: event.values,
8
+ oldValues: {}
9
+ });
10
+ const appendCreateSpecificData = (commonData, event) => ({
11
+ ...commonData,
12
+ tableName: event.tableName,
13
+ primaryKey: event.rowId,
14
+ newValues: event.values
15
+ });
16
+ const appendDeleteSpecificData = (commonData, event) => ({
17
+ ...commonData,
18
+ tableName: event.tableName,
19
+ primaryKey: event.rowId,
20
+ oldValues: {}
21
+ });
22
+ exports.appendCreateSpecificData = appendCreateSpecificData;
23
+ exports.appendDeleteSpecificData = appendDeleteSpecificData;
24
+ exports.appendUpdateSpecificData = appendUpdateSpecificData;
25
+ //# sourceMappingURL=EventResponseHelper.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventResponseHelper.cjs","sources":["../../../../../../packages/engine-system-api/src/model/events/EventResponseHelper.ts"],"sourcesContent":["import { CreateEvent, DeleteEvent, UpdateEvent } from './types'\n\nexport const appendUpdateSpecificData = <T>(commonData: T, event: UpdateEvent) => ({\n\t...commonData,\n\ttableName: event.tableName,\n\tprimaryKey: event.rowId,\n\tdiffValues: event.values,\n\toldValues: {},\n})\n\nexport const appendCreateSpecificData = <T>(commonData: T, event: CreateEvent) => ({\n\t...commonData,\n\ttableName: event.tableName,\n\tprimaryKey: event.rowId,\n\tnewValues: event.values,\n})\n\nexport const appendDeleteSpecificData = <T>(commonData: T, event: DeleteEvent) => ({\n\t...commonData,\n\ttableName: event.tableName,\n\tprimaryKey: event.rowId,\n\toldValues: {},\n})\n"],"names":[],"mappings":";;AAEa,MAAA,2BAA2B,CAAI,YAAe,WAAwB;AAAA,EAClF,GAAG;AAAA,EACH,WAAW,MAAM;AAAA,EACjB,YAAY,MAAM;AAAA,EAClB,YAAY,MAAM;AAAA,EAClB,WAAW,CAAC;AACb;AAEa,MAAA,2BAA2B,CAAI,YAAe,WAAwB;AAAA,EAClF,GAAG;AAAA,EACH,WAAW,MAAM;AAAA,EACjB,YAAY,MAAM;AAAA,EAClB,WAAW,MAAM;AAClB;AAEa,MAAA,2BAA2B,CAAI,YAAe,WAAwB;AAAA,EAClF,GAAG;AAAA,EACH,WAAW,MAAM;AAAA,EACjB,YAAY,MAAM;AAAA,EAClB,WAAW,CAAC;AACb;;;;"}
@@ -0,0 +1,25 @@
1
+ const appendUpdateSpecificData = (commonData, event) => ({
2
+ ...commonData,
3
+ tableName: event.tableName,
4
+ primaryKey: event.rowId,
5
+ diffValues: event.values,
6
+ oldValues: {}
7
+ });
8
+ const appendCreateSpecificData = (commonData, event) => ({
9
+ ...commonData,
10
+ tableName: event.tableName,
11
+ primaryKey: event.rowId,
12
+ newValues: event.values
13
+ });
14
+ const appendDeleteSpecificData = (commonData, event) => ({
15
+ ...commonData,
16
+ tableName: event.tableName,
17
+ primaryKey: event.rowId,
18
+ oldValues: {}
19
+ });
20
+ export {
21
+ appendCreateSpecificData,
22
+ appendDeleteSpecificData,
23
+ appendUpdateSpecificData
24
+ };
25
+ //# sourceMappingURL=EventResponseHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventResponseHelper.js","sources":["../../../../../../packages/engine-system-api/src/model/events/EventResponseHelper.ts"],"sourcesContent":["import { CreateEvent, DeleteEvent, UpdateEvent } from './types'\n\nexport const appendUpdateSpecificData = <T>(commonData: T, event: UpdateEvent) => ({\n\t...commonData,\n\ttableName: event.tableName,\n\tprimaryKey: event.rowId,\n\tdiffValues: event.values,\n\toldValues: {},\n})\n\nexport const appendCreateSpecificData = <T>(commonData: T, event: CreateEvent) => ({\n\t...commonData,\n\ttableName: event.tableName,\n\tprimaryKey: event.rowId,\n\tnewValues: event.values,\n})\n\nexport const appendDeleteSpecificData = <T>(commonData: T, event: DeleteEvent) => ({\n\t...commonData,\n\ttableName: event.tableName,\n\tprimaryKey: event.rowId,\n\toldValues: {},\n})\n"],"names":[],"mappings":"AAEa,MAAA,2BAA2B,CAAI,YAAe,WAAwB;AAAA,EAClF,GAAG;AAAA,EACH,WAAW,MAAM;AAAA,EACjB,YAAY,MAAM;AAAA,EAClB,YAAY,MAAM;AAAA,EAClB,WAAW,CAAC;AACb;AAEa,MAAA,2BAA2B,CAAI,YAAe,WAAwB;AAAA,EAClF,GAAG;AAAA,EACH,WAAW,MAAM;AAAA,EACjB,YAAY,MAAM;AAAA,EAClB,WAAW,MAAM;AAClB;AAEa,MAAA,2BAA2B,CAAI,YAAe,WAAwB;AAAA,EAClF,GAAG;AAAA,EACH,WAAW,MAAM;AAAA,EACjB,YAAY,MAAM;AAAA,EAClB,WAAW,CAAC;AACb;"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const assertNever = require("../../utils/assertNever.cjs");
4
+ const formatIdentity = (identity) => {
5
+ if (!identity) {
6
+ return "(unknown)";
7
+ }
8
+ if (identity.type === "person") {
9
+ return identity.person.name;
10
+ } else if (identity.type === "apiKey") {
11
+ return `API key (${identity.description})`;
12
+ }
13
+ assertNever.assertNever();
14
+ };
15
+ exports.formatIdentity = formatIdentity;
16
+ //# sourceMappingURL=identityUtils.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identityUtils.cjs","sources":["../../../../../../packages/engine-system-api/src/model/events/identityUtils.ts"],"sourcesContent":["import { TenantIdentity } from '../dependencies/tenant/IdentityFetcher'\nimport { assertNever } from '../../utils'\n\nexport const formatIdentity = (identity: TenantIdentity): string => {\n\tif (!identity) {\n\t\treturn '(unknown)'\n\t}\n\tif (identity.type === 'person') {\n\t\treturn identity.person.name\n\t} else if (identity.type === 'apiKey') {\n\t\treturn `API key (${identity.description})`\n\t}\n\tassertNever(identity)\n}\n"],"names":["assertNever"],"mappings":";;;AAGa,MAAA,iBAAiB,CAAC,aAAqC;AACnE,MAAI,CAAC,UAAU;AACP,WAAA;AAAA,EACR;AACI,MAAA,SAAS,SAAS,UAAU;AAC/B,WAAO,SAAS,OAAO;AAAA,EAAA,WACb,SAAS,SAAS,UAAU;AAC/B,WAAA,YAAY,SAAS,WAAW;AAAA,EACxC;AACAA,cAAAA,YAAoB;AACrB;;"}
@@ -0,0 +1,16 @@
1
+ import { assertNever } from "../../utils/assertNever.js";
2
+ const formatIdentity = (identity) => {
3
+ if (!identity) {
4
+ return "(unknown)";
5
+ }
6
+ if (identity.type === "person") {
7
+ return identity.person.name;
8
+ } else if (identity.type === "apiKey") {
9
+ return `API key (${identity.description})`;
10
+ }
11
+ assertNever();
12
+ };
13
+ export {
14
+ formatIdentity
15
+ };
16
+ //# sourceMappingURL=identityUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identityUtils.js","sources":["../../../../../../packages/engine-system-api/src/model/events/identityUtils.ts"],"sourcesContent":["import { TenantIdentity } from '../dependencies/tenant/IdentityFetcher'\nimport { assertNever } from '../../utils'\n\nexport const formatIdentity = (identity: TenantIdentity): string => {\n\tif (!identity) {\n\t\treturn '(unknown)'\n\t}\n\tif (identity.type === 'person') {\n\t\treturn identity.person.name\n\t} else if (identity.type === 'apiKey') {\n\t\treturn `API key (${identity.description})`\n\t}\n\tassertNever(identity)\n}\n"],"names":[],"mappings":";AAGa,MAAA,iBAAiB,CAAC,aAAqC;AACnE,MAAI,CAAC,UAAU;AACP,WAAA;AAAA,EACR;AACI,MAAA,SAAS,SAAS,UAAU;AAC/B,WAAO,SAAS,OAAO;AAAA,EAAA,WACb,SAAS,SAAS,UAAU;AAC/B,WAAA,YAAY,SAAS,WAAW;AAAA,EACxC;AACA,cAAoB;AACrB;"}