@shipfox/api-definitions 2.0.0

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 (401) hide show
  1. package/.turbo/turbo-build.log +2 -0
  2. package/.turbo/turbo-type$colon$emit.log +1 -0
  3. package/.turbo/turbo-type.log +1 -0
  4. package/CHANGELOG.md +215 -0
  5. package/LICENSE +21 -0
  6. package/dist/config.d.ts +10 -0
  7. package/dist/config.d.ts.map +1 -0
  8. package/dist/config.js +35 -0
  9. package/dist/config.js.map +1 -0
  10. package/dist/core/entities/index.d.ts +5 -0
  11. package/dist/core/entities/index.d.ts.map +1 -0
  12. package/dist/core/entities/index.js +6 -0
  13. package/dist/core/entities/index.js.map +1 -0
  14. package/dist/core/entities/integration-context.d.ts +11 -0
  15. package/dist/core/entities/integration-context.d.ts.map +1 -0
  16. package/dist/core/entities/integration-context.js +3 -0
  17. package/dist/core/entities/integration-context.js.map +1 -0
  18. package/dist/core/entities/sync-state.d.ts +19 -0
  19. package/dist/core/entities/sync-state.d.ts.map +1 -0
  20. package/dist/core/entities/sync-state.js +20 -0
  21. package/dist/core/entities/sync-state.js.map +1 -0
  22. package/dist/core/entities/workflow-definition.d.ts +35 -0
  23. package/dist/core/entities/workflow-definition.d.ts.map +1 -0
  24. package/dist/core/entities/workflow-definition.js +3 -0
  25. package/dist/core/entities/workflow-definition.js.map +1 -0
  26. package/dist/core/entities/workflow-model.d.ts +138 -0
  27. package/dist/core/entities/workflow-model.d.ts.map +1 -0
  28. package/dist/core/entities/workflow-model.js +3 -0
  29. package/dist/core/entities/workflow-model.js.map +1 -0
  30. package/dist/core/errors.d.ts +10 -0
  31. package/dist/core/errors.d.ts.map +1 -0
  32. package/dist/core/errors.js +14 -0
  33. package/dist/core/errors.js.map +1 -0
  34. package/dist/core/has-agent-step-integrations.d.ts +3 -0
  35. package/dist/core/has-agent-step-integrations.d.ts.map +1 -0
  36. package/dist/core/has-agent-step-integrations.js +5 -0
  37. package/dist/core/has-agent-step-integrations.js.map +1 -0
  38. package/dist/core/index.d.ts +9 -0
  39. package/dist/core/index.d.ts.map +1 -0
  40. package/dist/core/index.js +9 -0
  41. package/dist/core/index.js.map +1 -0
  42. package/dist/core/parse-definition.d.ts +9 -0
  43. package/dist/core/parse-definition.d.ts.map +1 -0
  44. package/dist/core/parse-definition.js +17 -0
  45. package/dist/core/parse-definition.js.map +1 -0
  46. package/dist/core/sync-definitions.d.ts +44 -0
  47. package/dist/core/sync-definitions.d.ts.map +1 -0
  48. package/dist/core/sync-definitions.js +140 -0
  49. package/dist/core/sync-definitions.js.map +1 -0
  50. package/dist/core/validate-definition.d.ts +20 -0
  51. package/dist/core/validate-definition.d.ts.map +1 -0
  52. package/dist/core/validate-definition.js +61 -0
  53. package/dist/core/validate-definition.js.map +1 -0
  54. package/dist/core/workflow-model/constants.d.ts +2 -0
  55. package/dist/core/workflow-model/constants.d.ts.map +1 -0
  56. package/dist/core/workflow-model/constants.js +3 -0
  57. package/dist/core/workflow-model/constants.js.map +1 -0
  58. package/dist/core/workflow-model/cron-trigger.d.ts +16 -0
  59. package/dist/core/workflow-model/cron-trigger.d.ts.map +1 -0
  60. package/dist/core/workflow-model/cron-trigger.js +85 -0
  61. package/dist/core/workflow-model/cron-trigger.js.map +1 -0
  62. package/dist/core/workflow-model/index.d.ts +4 -0
  63. package/dist/core/workflow-model/index.d.ts.map +1 -0
  64. package/dist/core/workflow-model/index.js +5 -0
  65. package/dist/core/workflow-model/index.js.map +1 -0
  66. package/dist/core/workflow-model/invalid-workflow-model-error.d.ts +15 -0
  67. package/dist/core/workflow-model/invalid-workflow-model-error.d.ts.map +1 -0
  68. package/dist/core/workflow-model/invalid-workflow-model-error.js +9 -0
  69. package/dist/core/workflow-model/invalid-workflow-model-error.js.map +1 -0
  70. package/dist/core/workflow-model/map-job-ids.d.ts +4 -0
  71. package/dist/core/workflow-model/map-job-ids.d.ts.map +1 -0
  72. package/dist/core/workflow-model/map-job-ids.js +33 -0
  73. package/dist/core/workflow-model/map-job-ids.js.map +1 -0
  74. package/dist/core/workflow-model/normalize-agent-integrations.d.ts +12 -0
  75. package/dist/core/workflow-model/normalize-agent-integrations.d.ts.map +1 -0
  76. package/dist/core/workflow-model/normalize-agent-integrations.js +157 -0
  77. package/dist/core/workflow-model/normalize-agent-integrations.js.map +1 -0
  78. package/dist/core/workflow-model/normalize-dependencies.d.ts +6 -0
  79. package/dist/core/workflow-model/normalize-dependencies.d.ts.map +1 -0
  80. package/dist/core/workflow-model/normalize-dependencies.js +119 -0
  81. package/dist/core/workflow-model/normalize-dependencies.js.map +1 -0
  82. package/dist/core/workflow-model/normalize-env.d.ts +17 -0
  83. package/dist/core/workflow-model/normalize-env.d.ts.map +1 -0
  84. package/dist/core/workflow-model/normalize-env.js +40 -0
  85. package/dist/core/workflow-model/normalize-env.js.map +1 -0
  86. package/dist/core/workflow-model/normalize-if-condition.d.ts +14 -0
  87. package/dist/core/workflow-model/normalize-if-condition.d.ts.map +1 -0
  88. package/dist/core/workflow-model/normalize-if-condition.js +75 -0
  89. package/dist/core/workflow-model/normalize-if-condition.js.map +1 -0
  90. package/dist/core/workflow-model/normalize-job-checkout.d.ts +5 -0
  91. package/dist/core/workflow-model/normalize-job-checkout.d.ts.map +1 -0
  92. package/dist/core/workflow-model/normalize-job-checkout.js +16 -0
  93. package/dist/core/workflow-model/normalize-job-checkout.js.map +1 -0
  94. package/dist/core/workflow-model/normalize-job-listening.d.ts +10 -0
  95. package/dist/core/workflow-model/normalize-job-listening.d.ts.map +1 -0
  96. package/dist/core/workflow-model/normalize-job-listening.js +125 -0
  97. package/dist/core/workflow-model/normalize-job-listening.js.map +1 -0
  98. package/dist/core/workflow-model/normalize-job-success.d.ts +11 -0
  99. package/dist/core/workflow-model/normalize-job-success.d.ts.map +1 -0
  100. package/dist/core/workflow-model/normalize-job-success.js +23 -0
  101. package/dist/core/workflow-model/normalize-job-success.js.map +1 -0
  102. package/dist/core/workflow-model/normalize-jobs.d.ts +12 -0
  103. package/dist/core/workflow-model/normalize-jobs.d.ts.map +1 -0
  104. package/dist/core/workflow-model/normalize-jobs.js +935 -0
  105. package/dist/core/workflow-model/normalize-jobs.js.map +1 -0
  106. package/dist/core/workflow-model/normalize-needs.d.ts +2 -0
  107. package/dist/core/workflow-model/normalize-needs.d.ts.map +1 -0
  108. package/dist/core/workflow-model/normalize-needs.js +16 -0
  109. package/dist/core/workflow-model/normalize-needs.js.map +1 -0
  110. package/dist/core/workflow-model/normalize-step-gate.d.ts +15 -0
  111. package/dist/core/workflow-model/normalize-step-gate.d.ts.map +1 -0
  112. package/dist/core/workflow-model/normalize-step-gate.js +89 -0
  113. package/dist/core/workflow-model/normalize-step-gate.js.map +1 -0
  114. package/dist/core/workflow-model/normalize-step-outputs.d.ts +10 -0
  115. package/dist/core/workflow-model/normalize-step-outputs.d.ts.map +1 -0
  116. package/dist/core/workflow-model/normalize-step-outputs.js +32 -0
  117. package/dist/core/workflow-model/normalize-step-outputs.js.map +1 -0
  118. package/dist/core/workflow-model/normalize-triggers.d.ts +11 -0
  119. package/dist/core/workflow-model/normalize-triggers.d.ts.map +1 -0
  120. package/dist/core/workflow-model/normalize-triggers.js +128 -0
  121. package/dist/core/workflow-model/normalize-triggers.js.map +1 -0
  122. package/dist/core/workflow-model/normalize-workflow-document.d.ts +11 -0
  123. package/dist/core/workflow-model/normalize-workflow-document.d.ts.map +1 -0
  124. package/dist/core/workflow-model/normalize-workflow-document.js +43 -0
  125. package/dist/core/workflow-model/normalize-workflow-document.js.map +1 -0
  126. package/dist/core/workflow-model/parse-duration-ms.d.ts +11 -0
  127. package/dist/core/workflow-model/parse-duration-ms.d.ts.map +1 -0
  128. package/dist/core/workflow-model/parse-duration-ms.js +47 -0
  129. package/dist/core/workflow-model/parse-duration-ms.js.map +1 -0
  130. package/dist/core/workflow-model/parse-interpolation-field.d.ts +14 -0
  131. package/dist/core/workflow-model/parse-interpolation-field.d.ts.map +1 -0
  132. package/dist/core/workflow-model/parse-interpolation-field.js +377 -0
  133. package/dist/core/workflow-model/parse-interpolation-field.js.map +1 -0
  134. package/dist/core/workflow-model/stable-id.d.ts +2 -0
  135. package/dist/core/workflow-model/stable-id.d.ts.map +1 -0
  136. package/dist/core/workflow-model/stable-id.js +8 -0
  137. package/dist/core/workflow-model/stable-id.js.map +1 -0
  138. package/dist/core/workflow-model/validate-job-references.d.ts +10 -0
  139. package/dist/core/workflow-model/validate-job-references.d.ts.map +1 -0
  140. package/dist/core/workflow-model/validate-job-references.js +42 -0
  141. package/dist/core/workflow-model/validate-job-references.js.map +1 -0
  142. package/dist/core/workflow-model/validate-predicate-expression.d.ts +14 -0
  143. package/dist/core/workflow-model/validate-predicate-expression.d.ts.map +1 -0
  144. package/dist/core/workflow-model/validate-predicate-expression.js +273 -0
  145. package/dist/core/workflow-model/validate-predicate-expression.js.map +1 -0
  146. package/dist/core/workflow-model/validation-issue.d.ts +8 -0
  147. package/dist/core/workflow-model/validation-issue.d.ts.map +1 -0
  148. package/dist/core/workflow-model/validation-issue.js +17 -0
  149. package/dist/core/workflow-model/validation-issue.js.map +1 -0
  150. package/dist/core/workflow-model/workflow-field-label.d.ts +3 -0
  151. package/dist/core/workflow-model/workflow-field-label.d.ts.map +1 -0
  152. package/dist/core/workflow-model/workflow-field-label.js +47 -0
  153. package/dist/core/workflow-model/workflow-field-label.js.map +1 -0
  154. package/dist/core/workflow-yaml/index.d.ts +3 -0
  155. package/dist/core/workflow-yaml/index.d.ts.map +1 -0
  156. package/dist/core/workflow-yaml/index.js +4 -0
  157. package/dist/core/workflow-yaml/index.js.map +1 -0
  158. package/dist/core/workflow-yaml/invalid-workflow-yaml-error.d.ts +16 -0
  159. package/dist/core/workflow-yaml/invalid-workflow-yaml-error.d.ts.map +1 -0
  160. package/dist/core/workflow-yaml/invalid-workflow-yaml-error.js +12 -0
  161. package/dist/core/workflow-yaml/invalid-workflow-yaml-error.js.map +1 -0
  162. package/dist/core/workflow-yaml/parse-workflow-yaml.d.ts +9 -0
  163. package/dist/core/workflow-yaml/parse-workflow-yaml.d.ts.map +1 -0
  164. package/dist/core/workflow-yaml/parse-workflow-yaml.js +52 -0
  165. package/dist/core/workflow-yaml/parse-workflow-yaml.js.map +1 -0
  166. package/dist/core/workflow-yaml/source-locations.d.ts +3 -0
  167. package/dist/core/workflow-yaml/source-locations.d.ts.map +1 -0
  168. package/dist/core/workflow-yaml/source-locations.js +48 -0
  169. package/dist/core/workflow-yaml/source-locations.js.map +1 -0
  170. package/dist/db/db.d.ts +1277 -0
  171. package/dist/db/db.d.ts.map +1 -0
  172. package/dist/db/db.js +22 -0
  173. package/dist/db/db.js.map +1 -0
  174. package/dist/db/definition-triggers.d.ts +4 -0
  175. package/dist/db/definition-triggers.d.ts.map +1 -0
  176. package/dist/db/definition-triggers.js +17 -0
  177. package/dist/db/definition-triggers.js.map +1 -0
  178. package/dist/db/definitions.d.ts +63 -0
  179. package/dist/db/definitions.d.ts.map +1 -0
  180. package/dist/db/definitions.js +208 -0
  181. package/dist/db/definitions.js.map +1 -0
  182. package/dist/db/index.d.ts +8 -0
  183. package/dist/db/index.d.ts.map +1 -0
  184. package/dist/db/index.js +10 -0
  185. package/dist/db/index.js.map +1 -0
  186. package/dist/db/schema/common.d.ts +2 -0
  187. package/dist/db/schema/common.d.ts.map +1 -0
  188. package/dist/db/schema/common.js +4 -0
  189. package/dist/db/schema/common.js.map +1 -0
  190. package/dist/db/schema/definitions.d.ts +237 -0
  191. package/dist/db/schema/definitions.d.ts.map +1 -0
  192. package/dist/db/schema/definitions.js +63 -0
  193. package/dist/db/schema/definitions.js.map +1 -0
  194. package/dist/db/schema/outbox.d.ts +195 -0
  195. package/dist/db/schema/outbox.d.ts.map +1 -0
  196. package/dist/db/schema/outbox.js +5 -0
  197. package/dist/db/schema/outbox.js.map +1 -0
  198. package/dist/db/schema/sync-states.d.ts +218 -0
  199. package/dist/db/schema/sync-states.d.ts.map +1 -0
  200. package/dist/db/schema/sync-states.js +68 -0
  201. package/dist/db/schema/sync-states.js.map +1 -0
  202. package/dist/db/sync-states.d.ts +21 -0
  203. package/dist/db/sync-states.d.ts.map +1 -0
  204. package/dist/db/sync-states.js +47 -0
  205. package/dist/db/sync-states.js.map +1 -0
  206. package/dist/index.d.ts +14 -0
  207. package/dist/index.d.ts.map +1 -0
  208. package/dist/index.js +63 -0
  209. package/dist/index.js.map +1 -0
  210. package/dist/presentation/dto/definition.d.ts +6 -0
  211. package/dist/presentation/dto/definition.d.ts.map +1 -0
  212. package/dist/presentation/dto/definition.js +35 -0
  213. package/dist/presentation/dto/definition.js.map +1 -0
  214. package/dist/presentation/dto/index.d.ts +2 -0
  215. package/dist/presentation/dto/index.d.ts.map +1 -0
  216. package/dist/presentation/dto/index.js +3 -0
  217. package/dist/presentation/dto/index.js.map +1 -0
  218. package/dist/presentation/index.d.ts +2 -0
  219. package/dist/presentation/index.d.ts.map +1 -0
  220. package/dist/presentation/index.js +3 -0
  221. package/dist/presentation/index.js.map +1 -0
  222. package/dist/presentation/routes/create-definition.d.ts +9 -0
  223. package/dist/presentation/routes/create-definition.d.ts.map +1 -0
  224. package/dist/presentation/routes/create-definition.js +76 -0
  225. package/dist/presentation/routes/create-definition.js.map +1 -0
  226. package/dist/presentation/routes/get-definition.d.ts +2 -0
  227. package/dist/presentation/routes/get-definition.d.ts.map +1 -0
  228. package/dist/presentation/routes/get-definition.js +43 -0
  229. package/dist/presentation/routes/get-definition.js.map +1 -0
  230. package/dist/presentation/routes/index.d.ts +7 -0
  231. package/dist/presentation/routes/index.d.ts.map +1 -0
  232. package/dist/presentation/routes/index.js +22 -0
  233. package/dist/presentation/routes/index.js.map +1 -0
  234. package/dist/presentation/routes/list-definitions.d.ts +2 -0
  235. package/dist/presentation/routes/list-definitions.d.ts.map +1 -0
  236. package/dist/presentation/routes/list-definitions.js +56 -0
  237. package/dist/presentation/routes/list-definitions.js.map +1 -0
  238. package/dist/presentation/routes/validate-definition.d.ts +2 -0
  239. package/dist/presentation/routes/validate-definition.d.ts.map +1 -0
  240. package/dist/presentation/routes/validate-definition.js +43 -0
  241. package/dist/presentation/routes/validate-definition.js.map +1 -0
  242. package/dist/presentation/subscribers/index.d.ts +3 -0
  243. package/dist/presentation/subscribers/index.d.ts.map +1 -0
  244. package/dist/presentation/subscribers/index.js +4 -0
  245. package/dist/presentation/subscribers/index.js.map +1 -0
  246. package/dist/presentation/subscribers/on-project-source-bound.d.ts +3 -0
  247. package/dist/presentation/subscribers/on-project-source-bound.d.ts.map +1 -0
  248. package/dist/presentation/subscribers/on-project-source-bound.js +11 -0
  249. package/dist/presentation/subscribers/on-project-source-bound.js.map +1 -0
  250. package/dist/presentation/subscribers/on-project-source-commit-observed.d.ts +3 -0
  251. package/dist/presentation/subscribers/on-project-source-commit-observed.d.ts.map +1 -0
  252. package/dist/presentation/subscribers/on-project-source-commit-observed.js +13 -0
  253. package/dist/presentation/subscribers/on-project-source-commit-observed.js.map +1 -0
  254. package/dist/presentation/subscribers/start-definition-sync.d.ts +10 -0
  255. package/dist/presentation/subscribers/start-definition-sync.d.ts.map +1 -0
  256. package/dist/presentation/subscribers/start-definition-sync.js +26 -0
  257. package/dist/presentation/subscribers/start-definition-sync.js.map +1 -0
  258. package/dist/temporal/activities/index.d.ts +3 -0
  259. package/dist/temporal/activities/index.d.ts.map +1 -0
  260. package/dist/temporal/activities/index.js +3 -0
  261. package/dist/temporal/activities/index.js.map +1 -0
  262. package/dist/temporal/activities/sync-activities.d.ts +47 -0
  263. package/dist/temporal/activities/sync-activities.d.ts.map +1 -0
  264. package/dist/temporal/activities/sync-activities.js +128 -0
  265. package/dist/temporal/activities/sync-activities.js.map +1 -0
  266. package/dist/temporal/constants.d.ts +3 -0
  267. package/dist/temporal/constants.d.ts.map +1 -0
  268. package/dist/temporal/constants.js +4 -0
  269. package/dist/temporal/constants.js.map +1 -0
  270. package/dist/temporal/index.d.ts +3 -0
  271. package/dist/temporal/index.d.ts.map +1 -0
  272. package/dist/temporal/index.js +4 -0
  273. package/dist/temporal/index.js.map +1 -0
  274. package/dist/temporal/workflows/definition-sync.d.ts +20 -0
  275. package/dist/temporal/workflows/definition-sync.d.ts.map +1 -0
  276. package/dist/temporal/workflows/definition-sync.js +95 -0
  277. package/dist/temporal/workflows/definition-sync.js.map +1 -0
  278. package/dist/temporal/workflows/index.d.ts +2 -0
  279. package/dist/temporal/workflows/index.d.ts.map +1 -0
  280. package/dist/temporal/workflows/index.js +3 -0
  281. package/dist/temporal/workflows/index.js.map +1 -0
  282. package/dist/tsconfig.test.tsbuildinfo +1 -0
  283. package/drizzle/0000_initial.sql +64 -0
  284. package/drizzle/0001_definition_list_pagination.sql +1 -0
  285. package/drizzle/meta/0000_snapshot.json +527 -0
  286. package/drizzle/meta/_journal.json +20 -0
  287. package/drizzle.config.ts +11 -0
  288. package/package.json +89 -0
  289. package/src/config.test.ts +23 -0
  290. package/src/config.ts +50 -0
  291. package/src/core/entities/index.ts +4 -0
  292. package/src/core/entities/integration-context.ts +21 -0
  293. package/src/core/entities/sync-state.ts +40 -0
  294. package/src/core/entities/workflow-definition.ts +38 -0
  295. package/src/core/entities/workflow-model.ts +162 -0
  296. package/src/core/errors.ts +21 -0
  297. package/src/core/has-agent-step-integrations.ts +7 -0
  298. package/src/core/index.ts +23 -0
  299. package/src/core/parse-definition.test.ts +200 -0
  300. package/src/core/parse-definition.ts +28 -0
  301. package/src/core/sync-definitions.test.ts +390 -0
  302. package/src/core/sync-definitions.ts +216 -0
  303. package/src/core/validate-definition.test.ts +152 -0
  304. package/src/core/validate-definition.ts +72 -0
  305. package/src/core/workflow-model/README.md +129 -0
  306. package/src/core/workflow-model/constants.ts +1 -0
  307. package/src/core/workflow-model/cron-trigger.test.ts +29 -0
  308. package/src/core/workflow-model/cron-trigger.ts +83 -0
  309. package/src/core/workflow-model/index.ts +9 -0
  310. package/src/core/workflow-model/invalid-workflow-model-error.ts +71 -0
  311. package/src/core/workflow-model/map-job-ids.ts +33 -0
  312. package/src/core/workflow-model/normalize-agent-integrations.ts +208 -0
  313. package/src/core/workflow-model/normalize-dependencies.ts +139 -0
  314. package/src/core/workflow-model/normalize-env.ts +48 -0
  315. package/src/core/workflow-model/normalize-if-condition.ts +126 -0
  316. package/src/core/workflow-model/normalize-job-checkout.ts +19 -0
  317. package/src/core/workflow-model/normalize-job-listening.ts +121 -0
  318. package/src/core/workflow-model/normalize-job-success.ts +28 -0
  319. package/src/core/workflow-model/normalize-jobs.ts +1010 -0
  320. package/src/core/workflow-model/normalize-needs.ts +12 -0
  321. package/src/core/workflow-model/normalize-step-gate.ts +90 -0
  322. package/src/core/workflow-model/normalize-step-outputs.ts +36 -0
  323. package/src/core/workflow-model/normalize-triggers.ts +130 -0
  324. package/src/core/workflow-model/normalize-workflow-document.test.ts +4463 -0
  325. package/src/core/workflow-model/normalize-workflow-document.ts +63 -0
  326. package/src/core/workflow-model/parse-duration-ms.ts +58 -0
  327. package/src/core/workflow-model/parse-interpolation-field.ts +566 -0
  328. package/src/core/workflow-model/stable-id.ts +12 -0
  329. package/src/core/workflow-model/validate-job-references.ts +54 -0
  330. package/src/core/workflow-model/validate-predicate-expression.test.ts +161 -0
  331. package/src/core/workflow-model/validate-predicate-expression.ts +406 -0
  332. package/src/core/workflow-model/validation-issue.ts +27 -0
  333. package/src/core/workflow-model/workflow-field-label.ts +50 -0
  334. package/src/core/workflow-yaml/README.md +77 -0
  335. package/src/core/workflow-yaml/index.ts +11 -0
  336. package/src/core/workflow-yaml/invalid-workflow-yaml-error.ts +23 -0
  337. package/src/core/workflow-yaml/parse-workflow-yaml.test.ts +71 -0
  338. package/src/core/workflow-yaml/parse-workflow-yaml.ts +74 -0
  339. package/src/core/workflow-yaml/source-locations.ts +62 -0
  340. package/src/db/db.ts +18 -0
  341. package/src/db/definition-triggers.test.ts +95 -0
  342. package/src/db/definition-triggers.ts +17 -0
  343. package/src/db/definitions.test.ts +1309 -0
  344. package/src/db/definitions.ts +357 -0
  345. package/src/db/index.ts +31 -0
  346. package/src/db/schema/common.ts +3 -0
  347. package/src/db/schema/definitions.test.ts +36 -0
  348. package/src/db/schema/definitions.ts +76 -0
  349. package/src/db/schema/outbox.ts +4 -0
  350. package/src/db/schema/sync-states.ts +79 -0
  351. package/src/db/sync-states.test.ts +90 -0
  352. package/src/db/sync-states.ts +86 -0
  353. package/src/index.ts +104 -0
  354. package/src/presentation/dto/definition.test.ts +59 -0
  355. package/src/presentation/dto/definition.ts +41 -0
  356. package/src/presentation/dto/index.ts +1 -0
  357. package/src/presentation/index.ts +1 -0
  358. package/src/presentation/routes/create-definition.test.ts +356 -0
  359. package/src/presentation/routes/create-definition.ts +101 -0
  360. package/src/presentation/routes/get-definition.test.ts +79 -0
  361. package/src/presentation/routes/get-definition.ts +37 -0
  362. package/src/presentation/routes/index.test.ts +41 -0
  363. package/src/presentation/routes/index.ts +28 -0
  364. package/src/presentation/routes/list-definitions.test.ts +195 -0
  365. package/src/presentation/routes/list-definitions.ts +49 -0
  366. package/src/presentation/routes/validate-definition.test.ts +63 -0
  367. package/src/presentation/routes/validate-definition.ts +46 -0
  368. package/src/presentation/subscribers/index.ts +2 -0
  369. package/src/presentation/subscribers/on-project-source-bound.test.ts +65 -0
  370. package/src/presentation/subscribers/on-project-source-bound.ts +11 -0
  371. package/src/presentation/subscribers/on-project-source-commit-observed.test.ts +56 -0
  372. package/src/presentation/subscribers/on-project-source-commit-observed.ts +15 -0
  373. package/src/presentation/subscribers/start-definition-sync.ts +38 -0
  374. package/src/temporal/activities/index.ts +10 -0
  375. package/src/temporal/activities/sync-activities.test.ts +337 -0
  376. package/src/temporal/activities/sync-activities.ts +206 -0
  377. package/src/temporal/constants.ts +2 -0
  378. package/src/temporal/index.ts +2 -0
  379. package/src/temporal/workflows/definition-sync.test.ts +59 -0
  380. package/src/temporal/workflows/definition-sync.ts +116 -0
  381. package/src/temporal/workflows/index.ts +1 -0
  382. package/test/env.ts +7 -0
  383. package/test/factories/definition.ts +66 -0
  384. package/test/fixtures/invalid-cycle.yml +13 -0
  385. package/test/fixtures/invalid-missing-name.yml +4 -0
  386. package/test/fixtures/invalid-yaml-syntax.yml +6 -0
  387. package/test/fixtures/valid-dag.yml +25 -0
  388. package/test/fixtures/valid-listening-job.yml +21 -0
  389. package/test/fixtures/valid-simple.yml +18 -0
  390. package/test/fixtures/workflow-yaml/invalid/invalid-yaml-syntax.yaml +6 -0
  391. package/test/fixtures/workflow-yaml/invalid/missing-step-run.yaml +5 -0
  392. package/test/fixtures/workflow-yaml/valid/simple-build.document.json +26 -0
  393. package/test/fixtures/workflow-yaml/valid/simple-build.yaml +14 -0
  394. package/test/globalSetup.ts +25 -0
  395. package/test/index.ts +1 -0
  396. package/test/setup.ts +17 -0
  397. package/tsconfig.build.json +9 -0
  398. package/tsconfig.build.tsbuildinfo +1 -0
  399. package/tsconfig.json +3 -0
  400. package/tsconfig.test.json +8 -0
  401. package/vitest.config.ts +11 -0
@@ -0,0 +1,64 @@
1
+ CREATE TYPE "public"."definitions_source" AS ENUM('manual', 'vcs');--> statement-breakpoint
2
+ CREATE TYPE "public"."definitions_sync_error_code" AS ENUM('no-workflow-files', 'invalid-definition', 'provider-repository-not-found', 'provider-file-not-found', 'provider-access-denied', 'provider-rate-limited', 'provider-timeout', 'provider-unavailable', 'provider-malformed-response', 'content-too-large', 'too-many-files', 'connection-unavailable', 'unknown');--> statement-breakpoint
3
+ CREATE TYPE "public"."definitions_sync_status" AS ENUM('pending', 'syncing', 'succeeded', 'failed');--> statement-breakpoint
4
+ CREATE TABLE "definitions_workflow_definitions" (
5
+ "id" uuid PRIMARY KEY DEFAULT uuidv7() NOT NULL,
6
+ "project_id" uuid NOT NULL,
7
+ "config_path" text,
8
+ "source" "definitions_source" DEFAULT 'manual' NOT NULL,
9
+ "sha" text,
10
+ "ref" text,
11
+ "name" text NOT NULL,
12
+ "definition" jsonb NOT NULL,
13
+ "content_hash" text,
14
+ "fetched_at" timestamp with time zone DEFAULT now() NOT NULL,
15
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
16
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL,
17
+ "deleted_at" timestamp with time zone,
18
+ CONSTRAINT "definitions_wd_source_ref_sha_consistent" CHECK (("source" = 'vcs') = ("ref" IS NOT NULL OR "sha" IS NOT NULL))
19
+ );
20
+ --> statement-breakpoint
21
+ CREATE TABLE "definitions_sync_states" (
22
+ "id" uuid PRIMARY KEY DEFAULT uuidv7() NOT NULL,
23
+ "project_id" uuid NOT NULL,
24
+ "source_connection_id" uuid NOT NULL,
25
+ "source_external_repository_id" text NOT NULL,
26
+ "ref" text NOT NULL,
27
+ "status" "definitions_sync_status" DEFAULT 'pending' NOT NULL,
28
+ "last_error_code" "definitions_sync_error_code",
29
+ "last_error_message" text,
30
+ "started_at" timestamp with time zone,
31
+ "finished_at" timestamp with time zone,
32
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
33
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL
34
+ );
35
+ --> statement-breakpoint
36
+ CREATE TABLE "definitions_outbox" (
37
+ "id" uuid PRIMARY KEY DEFAULT uuidv7() NOT NULL,
38
+ "event_type" text NOT NULL,
39
+ "ordering_key" text,
40
+ "payload" jsonb NOT NULL,
41
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
42
+ "dispatched_at" timestamp with time zone,
43
+ "dispatch_attempts" integer DEFAULT 0 NOT NULL,
44
+ "next_dispatch_at" timestamp with time zone DEFAULT now() NOT NULL,
45
+ "last_dispatch_error" jsonb,
46
+ "last_dispatch_failed_at" timestamp with time zone,
47
+ "dead_lettered_at" timestamp with time zone
48
+ );
49
+ --> statement-breakpoint
50
+ CREATE UNIQUE INDEX "definitions_wd_manual_unique" ON "definitions_workflow_definitions" USING btree ("project_id","config_path") WHERE "config_path" IS NOT NULL AND "ref" IS NULL AND "sha" IS NULL;
51
+ --> statement-breakpoint
52
+ CREATE UNIQUE INDEX "definitions_wd_sha_lookup" ON "definitions_workflow_definitions" USING btree ("project_id","sha","config_path") WHERE "sha" IS NOT NULL;
53
+ --> statement-breakpoint
54
+ CREATE UNIQUE INDEX "definitions_wd_ref_lookup" ON "definitions_workflow_definitions" USING btree ("project_id","ref","config_path") WHERE "ref" IS NOT NULL;
55
+ --> statement-breakpoint
56
+ CREATE INDEX "definitions_wd_project_name_id_idx" ON "definitions_workflow_definitions" USING btree ("project_id","name","id") WHERE "deleted_at" IS NULL;
57
+ --> statement-breakpoint
58
+ CREATE UNIQUE INDEX "definitions_sync_states_source_unique" ON "definitions_sync_states" USING btree ("project_id","source_connection_id","source_external_repository_id","ref");
59
+ --> statement-breakpoint
60
+ CREATE INDEX "definitions_sync_states_failed_idx" ON "definitions_sync_states" USING btree ("updated_at") WHERE "status" = 'failed';
61
+ --> statement-breakpoint
62
+ CREATE INDEX "definitions_outbox_pending_idx" ON "definitions_outbox" USING btree ("next_dispatch_at","created_at") WHERE "dispatched_at" IS NULL AND "dead_lettered_at" IS NULL;
63
+ --> statement-breakpoint
64
+ CREATE INDEX "definitions_outbox_dispatched_retention_idx" ON "definitions_outbox" USING btree ("dispatched_at","id") WHERE "dispatched_at" IS NOT NULL;
@@ -0,0 +1 @@
1
+ CREATE INDEX IF NOT EXISTS "definitions_wd_project_name_id_idx" ON "definitions_workflow_definitions" USING btree ("project_id","name","id") WHERE "deleted_at" IS NULL;
@@ -0,0 +1,527 @@
1
+ {
2
+ "id": "a20924e2-d7b1-4f98-b8c4-bab54ea48de5",
3
+ "prevId": "ead2b55f-f06b-4452-8dde-4ce9cbcb92c3",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.definitions_workflow_definitions": {
8
+ "name": "definitions_workflow_definitions",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "uuidv7()"
17
+ },
18
+ "project_id": {
19
+ "name": "project_id",
20
+ "type": "uuid",
21
+ "primaryKey": false,
22
+ "notNull": true
23
+ },
24
+ "config_path": {
25
+ "name": "config_path",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": false
29
+ },
30
+ "source": {
31
+ "name": "source",
32
+ "type": "definitions_source",
33
+ "typeSchema": "public",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "default": "'manual'"
37
+ },
38
+ "sha": {
39
+ "name": "sha",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": false
43
+ },
44
+ "ref": {
45
+ "name": "ref",
46
+ "type": "text",
47
+ "primaryKey": false,
48
+ "notNull": false
49
+ },
50
+ "name": {
51
+ "name": "name",
52
+ "type": "text",
53
+ "primaryKey": false,
54
+ "notNull": true
55
+ },
56
+ "definition": {
57
+ "name": "definition",
58
+ "type": "jsonb",
59
+ "primaryKey": false,
60
+ "notNull": true
61
+ },
62
+ "content_hash": {
63
+ "name": "content_hash",
64
+ "type": "text",
65
+ "primaryKey": false,
66
+ "notNull": false
67
+ },
68
+ "fetched_at": {
69
+ "name": "fetched_at",
70
+ "type": "timestamp with time zone",
71
+ "primaryKey": false,
72
+ "notNull": true,
73
+ "default": "now()"
74
+ },
75
+ "created_at": {
76
+ "name": "created_at",
77
+ "type": "timestamp with time zone",
78
+ "primaryKey": false,
79
+ "notNull": true,
80
+ "default": "now()"
81
+ },
82
+ "updated_at": {
83
+ "name": "updated_at",
84
+ "type": "timestamp with time zone",
85
+ "primaryKey": false,
86
+ "notNull": true,
87
+ "default": "now()"
88
+ },
89
+ "deleted_at": {
90
+ "name": "deleted_at",
91
+ "type": "timestamp with time zone",
92
+ "primaryKey": false,
93
+ "notNull": false
94
+ }
95
+ },
96
+ "indexes": {
97
+ "definitions_wd_manual_unique": {
98
+ "name": "definitions_wd_manual_unique",
99
+ "columns": [
100
+ {
101
+ "expression": "project_id",
102
+ "isExpression": false,
103
+ "asc": true,
104
+ "nulls": "last"
105
+ },
106
+ {
107
+ "expression": "config_path",
108
+ "isExpression": false,
109
+ "asc": true,
110
+ "nulls": "last"
111
+ }
112
+ ],
113
+ "isUnique": true,
114
+ "where": "\"config_path\" IS NOT NULL AND \"ref\" IS NULL AND \"sha\" IS NULL",
115
+ "concurrently": false,
116
+ "method": "btree",
117
+ "with": {}
118
+ },
119
+ "definitions_wd_sha_lookup": {
120
+ "name": "definitions_wd_sha_lookup",
121
+ "columns": [
122
+ {
123
+ "expression": "project_id",
124
+ "isExpression": false,
125
+ "asc": true,
126
+ "nulls": "last"
127
+ },
128
+ {
129
+ "expression": "sha",
130
+ "isExpression": false,
131
+ "asc": true,
132
+ "nulls": "last"
133
+ },
134
+ {
135
+ "expression": "config_path",
136
+ "isExpression": false,
137
+ "asc": true,
138
+ "nulls": "last"
139
+ }
140
+ ],
141
+ "isUnique": true,
142
+ "where": "\"sha\" IS NOT NULL",
143
+ "concurrently": false,
144
+ "method": "btree",
145
+ "with": {}
146
+ },
147
+ "definitions_wd_ref_lookup": {
148
+ "name": "definitions_wd_ref_lookup",
149
+ "columns": [
150
+ {
151
+ "expression": "project_id",
152
+ "isExpression": false,
153
+ "asc": true,
154
+ "nulls": "last"
155
+ },
156
+ {
157
+ "expression": "ref",
158
+ "isExpression": false,
159
+ "asc": true,
160
+ "nulls": "last"
161
+ },
162
+ {
163
+ "expression": "config_path",
164
+ "isExpression": false,
165
+ "asc": true,
166
+ "nulls": "last"
167
+ }
168
+ ],
169
+ "isUnique": true,
170
+ "where": "\"ref\" IS NOT NULL",
171
+ "concurrently": false,
172
+ "method": "btree",
173
+ "with": {}
174
+ },
175
+ "definitions_wd_project_name_id_idx": {
176
+ "name": "definitions_wd_project_name_id_idx",
177
+ "columns": [
178
+ {
179
+ "expression": "project_id",
180
+ "isExpression": false,
181
+ "asc": true,
182
+ "nulls": "last"
183
+ },
184
+ {
185
+ "expression": "name",
186
+ "isExpression": false,
187
+ "asc": true,
188
+ "nulls": "last"
189
+ },
190
+ {
191
+ "expression": "id",
192
+ "isExpression": false,
193
+ "asc": true,
194
+ "nulls": "last"
195
+ }
196
+ ],
197
+ "isUnique": false,
198
+ "where": "\"deleted_at\" IS NULL",
199
+ "concurrently": false,
200
+ "method": "btree",
201
+ "with": {}
202
+ }
203
+ },
204
+ "foreignKeys": {},
205
+ "compositePrimaryKeys": {},
206
+ "uniqueConstraints": {},
207
+ "policies": {},
208
+ "checkConstraints": {
209
+ "definitions_wd_source_ref_sha_consistent": {
210
+ "name": "definitions_wd_source_ref_sha_consistent",
211
+ "value": "(\"source\" = 'vcs') = (\"ref\" IS NOT NULL OR \"sha\" IS NOT NULL)"
212
+ }
213
+ },
214
+ "isRLSEnabled": false
215
+ },
216
+ "public.definitions_sync_states": {
217
+ "name": "definitions_sync_states",
218
+ "schema": "",
219
+ "columns": {
220
+ "id": {
221
+ "name": "id",
222
+ "type": "uuid",
223
+ "primaryKey": true,
224
+ "notNull": true,
225
+ "default": "uuidv7()"
226
+ },
227
+ "project_id": {
228
+ "name": "project_id",
229
+ "type": "uuid",
230
+ "primaryKey": false,
231
+ "notNull": true
232
+ },
233
+ "source_connection_id": {
234
+ "name": "source_connection_id",
235
+ "type": "uuid",
236
+ "primaryKey": false,
237
+ "notNull": true
238
+ },
239
+ "source_external_repository_id": {
240
+ "name": "source_external_repository_id",
241
+ "type": "text",
242
+ "primaryKey": false,
243
+ "notNull": true
244
+ },
245
+ "ref": {
246
+ "name": "ref",
247
+ "type": "text",
248
+ "primaryKey": false,
249
+ "notNull": true
250
+ },
251
+ "status": {
252
+ "name": "status",
253
+ "type": "definitions_sync_status",
254
+ "typeSchema": "public",
255
+ "primaryKey": false,
256
+ "notNull": true,
257
+ "default": "'pending'"
258
+ },
259
+ "last_error_code": {
260
+ "name": "last_error_code",
261
+ "type": "definitions_sync_error_code",
262
+ "typeSchema": "public",
263
+ "primaryKey": false,
264
+ "notNull": false
265
+ },
266
+ "last_error_message": {
267
+ "name": "last_error_message",
268
+ "type": "text",
269
+ "primaryKey": false,
270
+ "notNull": false
271
+ },
272
+ "started_at": {
273
+ "name": "started_at",
274
+ "type": "timestamp with time zone",
275
+ "primaryKey": false,
276
+ "notNull": false
277
+ },
278
+ "finished_at": {
279
+ "name": "finished_at",
280
+ "type": "timestamp with time zone",
281
+ "primaryKey": false,
282
+ "notNull": false
283
+ },
284
+ "created_at": {
285
+ "name": "created_at",
286
+ "type": "timestamp with time zone",
287
+ "primaryKey": false,
288
+ "notNull": true,
289
+ "default": "now()"
290
+ },
291
+ "updated_at": {
292
+ "name": "updated_at",
293
+ "type": "timestamp with time zone",
294
+ "primaryKey": false,
295
+ "notNull": true,
296
+ "default": "now()"
297
+ }
298
+ },
299
+ "indexes": {
300
+ "definitions_sync_states_source_unique": {
301
+ "name": "definitions_sync_states_source_unique",
302
+ "columns": [
303
+ {
304
+ "expression": "project_id",
305
+ "isExpression": false,
306
+ "asc": true,
307
+ "nulls": "last"
308
+ },
309
+ {
310
+ "expression": "source_connection_id",
311
+ "isExpression": false,
312
+ "asc": true,
313
+ "nulls": "last"
314
+ },
315
+ {
316
+ "expression": "source_external_repository_id",
317
+ "isExpression": false,
318
+ "asc": true,
319
+ "nulls": "last"
320
+ },
321
+ {
322
+ "expression": "ref",
323
+ "isExpression": false,
324
+ "asc": true,
325
+ "nulls": "last"
326
+ }
327
+ ],
328
+ "isUnique": true,
329
+ "concurrently": false,
330
+ "method": "btree",
331
+ "with": {}
332
+ },
333
+ "definitions_sync_states_failed_idx": {
334
+ "name": "definitions_sync_states_failed_idx",
335
+ "columns": [
336
+ {
337
+ "expression": "updated_at",
338
+ "isExpression": false,
339
+ "asc": true,
340
+ "nulls": "last"
341
+ }
342
+ ],
343
+ "isUnique": false,
344
+ "where": "\"status\" = 'failed'",
345
+ "concurrently": false,
346
+ "method": "btree",
347
+ "with": {}
348
+ }
349
+ },
350
+ "foreignKeys": {},
351
+ "compositePrimaryKeys": {},
352
+ "uniqueConstraints": {},
353
+ "policies": {},
354
+ "checkConstraints": {},
355
+ "isRLSEnabled": false
356
+ },
357
+ "public.definitions_outbox": {
358
+ "name": "definitions_outbox",
359
+ "schema": "",
360
+ "columns": {
361
+ "id": {
362
+ "name": "id",
363
+ "type": "uuid",
364
+ "primaryKey": true,
365
+ "notNull": true,
366
+ "default": "uuidv7()"
367
+ },
368
+ "event_type": {
369
+ "name": "event_type",
370
+ "type": "text",
371
+ "primaryKey": false,
372
+ "notNull": true
373
+ },
374
+ "ordering_key": {
375
+ "name": "ordering_key",
376
+ "type": "text",
377
+ "primaryKey": false,
378
+ "notNull": false
379
+ },
380
+ "payload": {
381
+ "name": "payload",
382
+ "type": "jsonb",
383
+ "primaryKey": false,
384
+ "notNull": true
385
+ },
386
+ "created_at": {
387
+ "name": "created_at",
388
+ "type": "timestamp with time zone",
389
+ "primaryKey": false,
390
+ "notNull": true,
391
+ "default": "now()"
392
+ },
393
+ "dispatched_at": {
394
+ "name": "dispatched_at",
395
+ "type": "timestamp with time zone",
396
+ "primaryKey": false,
397
+ "notNull": false
398
+ },
399
+ "dispatch_attempts": {
400
+ "name": "dispatch_attempts",
401
+ "type": "integer",
402
+ "primaryKey": false,
403
+ "notNull": true,
404
+ "default": 0
405
+ },
406
+ "next_dispatch_at": {
407
+ "name": "next_dispatch_at",
408
+ "type": "timestamp with time zone",
409
+ "primaryKey": false,
410
+ "notNull": true,
411
+ "default": "now()"
412
+ },
413
+ "last_dispatch_error": {
414
+ "name": "last_dispatch_error",
415
+ "type": "jsonb",
416
+ "primaryKey": false,
417
+ "notNull": false
418
+ },
419
+ "last_dispatch_failed_at": {
420
+ "name": "last_dispatch_failed_at",
421
+ "type": "timestamp with time zone",
422
+ "primaryKey": false,
423
+ "notNull": false
424
+ },
425
+ "dead_lettered_at": {
426
+ "name": "dead_lettered_at",
427
+ "type": "timestamp with time zone",
428
+ "primaryKey": false,
429
+ "notNull": false
430
+ }
431
+ },
432
+ "indexes": {
433
+ "definitions_outbox_pending_idx": {
434
+ "name": "definitions_outbox_pending_idx",
435
+ "columns": [
436
+ {
437
+ "expression": "next_dispatch_at",
438
+ "isExpression": false,
439
+ "asc": true,
440
+ "nulls": "last"
441
+ },
442
+ {
443
+ "expression": "created_at",
444
+ "isExpression": false,
445
+ "asc": true,
446
+ "nulls": "last"
447
+ }
448
+ ],
449
+ "isUnique": false,
450
+ "where": "\"dispatched_at\" IS NULL AND \"dead_lettered_at\" IS NULL",
451
+ "concurrently": false,
452
+ "method": "btree",
453
+ "with": {}
454
+ },
455
+ "definitions_outbox_dispatched_retention_idx": {
456
+ "name": "definitions_outbox_dispatched_retention_idx",
457
+ "columns": [
458
+ {
459
+ "expression": "dispatched_at",
460
+ "isExpression": false,
461
+ "asc": true,
462
+ "nulls": "last"
463
+ },
464
+ {
465
+ "expression": "id",
466
+ "isExpression": false,
467
+ "asc": true,
468
+ "nulls": "last"
469
+ }
470
+ ],
471
+ "isUnique": false,
472
+ "where": "\"dispatched_at\" IS NOT NULL",
473
+ "concurrently": false,
474
+ "method": "btree",
475
+ "with": {}
476
+ }
477
+ },
478
+ "foreignKeys": {},
479
+ "compositePrimaryKeys": {},
480
+ "uniqueConstraints": {},
481
+ "policies": {},
482
+ "checkConstraints": {},
483
+ "isRLSEnabled": false
484
+ }
485
+ },
486
+ "enums": {
487
+ "public.definitions_source": {
488
+ "name": "definitions_source",
489
+ "schema": "public",
490
+ "values": ["manual", "vcs"]
491
+ },
492
+ "public.definitions_sync_error_code": {
493
+ "name": "definitions_sync_error_code",
494
+ "schema": "public",
495
+ "values": [
496
+ "no-workflow-files",
497
+ "invalid-definition",
498
+ "provider-repository-not-found",
499
+ "provider-file-not-found",
500
+ "provider-access-denied",
501
+ "provider-rate-limited",
502
+ "provider-timeout",
503
+ "provider-unavailable",
504
+ "provider-malformed-response",
505
+ "content-too-large",
506
+ "too-many-files",
507
+ "connection-unavailable",
508
+ "unknown"
509
+ ]
510
+ },
511
+ "public.definitions_sync_status": {
512
+ "name": "definitions_sync_status",
513
+ "schema": "public",
514
+ "values": ["pending", "syncing", "succeeded", "failed"]
515
+ }
516
+ },
517
+ "schemas": {},
518
+ "sequences": {},
519
+ "roles": {},
520
+ "policies": {},
521
+ "views": {},
522
+ "_meta": {
523
+ "columns": {},
524
+ "schemas": {},
525
+ "tables": {}
526
+ }
527
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "version": "7",
3
+ "dialect": "postgresql",
4
+ "entries": [
5
+ {
6
+ "idx": 0,
7
+ "version": "7",
8
+ "when": 1776766565686,
9
+ "tag": "0000_initial",
10
+ "breakpoints": true
11
+ },
12
+ {
13
+ "idx": 1,
14
+ "version": "7",
15
+ "when": 1778494690000,
16
+ "tag": "0001_definition_list_pagination",
17
+ "breakpoints": true
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,11 @@
1
+ import {defineConfig} from 'drizzle-kit';
2
+
3
+ export default defineConfig({
4
+ schema: [
5
+ './src/db/schema/definitions.ts',
6
+ './src/db/schema/outbox.ts',
7
+ './src/db/schema/sync-states.ts',
8
+ ],
9
+ out: './drizzle',
10
+ dialect: 'postgresql',
11
+ });