@nest-batch/core 0.2.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 (476) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +368 -0
  3. package/dist/src/adapters/in-process.adapter.d.ts +140 -0
  4. package/dist/src/adapters/in-process.adapter.d.ts.map +1 -0
  5. package/dist/src/adapters/in-process.adapter.js +86 -0
  6. package/dist/src/adapters/in-process.adapter.js.map +1 -0
  7. package/dist/src/adapters/index.d.ts +18 -0
  8. package/dist/src/adapters/index.d.ts.map +1 -0
  9. package/dist/src/adapters/index.js +35 -0
  10. package/dist/src/adapters/index.js.map +1 -0
  11. package/dist/src/builder/batch-builder.d.ts +26 -0
  12. package/dist/src/builder/batch-builder.d.ts.map +1 -0
  13. package/dist/src/builder/batch-builder.js +25 -0
  14. package/dist/src/builder/batch-builder.js.map +1 -0
  15. package/dist/src/builder/flow-builder.d.ts +59 -0
  16. package/dist/src/builder/flow-builder.d.ts.map +1 -0
  17. package/dist/src/builder/flow-builder.js +115 -0
  18. package/dist/src/builder/flow-builder.js.map +1 -0
  19. package/dist/src/builder/index.d.ts +5 -0
  20. package/dist/src/builder/index.d.ts.map +1 -0
  21. package/dist/src/builder/index.js +23 -0
  22. package/dist/src/builder/index.js.map +1 -0
  23. package/dist/src/builder/job-builder.d.ts +76 -0
  24. package/dist/src/builder/job-builder.d.ts.map +1 -0
  25. package/dist/src/builder/job-builder.js +166 -0
  26. package/dist/src/builder/job-builder.js.map +1 -0
  27. package/dist/src/builder/step-builder.d.ts +74 -0
  28. package/dist/src/builder/step-builder.d.ts.map +1 -0
  29. package/dist/src/builder/step-builder.js +144 -0
  30. package/dist/src/builder/step-builder.js.map +1 -0
  31. package/dist/src/compiler/builder-types.d.ts +20 -0
  32. package/dist/src/compiler/builder-types.d.ts.map +1 -0
  33. package/dist/src/compiler/builder-types.js +6 -0
  34. package/dist/src/compiler/builder-types.js.map +1 -0
  35. package/dist/src/compiler/definition-compiler.d.ts +99 -0
  36. package/dist/src/compiler/definition-compiler.d.ts.map +1 -0
  37. package/dist/src/compiler/definition-compiler.js +257 -0
  38. package/dist/src/compiler/definition-compiler.js.map +1 -0
  39. package/dist/src/compiler/index.d.ts +3 -0
  40. package/dist/src/compiler/index.d.ts.map +1 -0
  41. package/dist/src/compiler/index.js +21 -0
  42. package/dist/src/compiler/index.js.map +1 -0
  43. package/dist/src/core/errors.d.ts +77 -0
  44. package/dist/src/core/errors.d.ts.map +1 -0
  45. package/dist/src/core/errors.js +170 -0
  46. package/dist/src/core/errors.js.map +1 -0
  47. package/dist/src/core/execution-context/index.d.ts +4 -0
  48. package/dist/src/core/execution-context/index.d.ts.map +1 -0
  49. package/dist/src/core/execution-context/index.js +22 -0
  50. package/dist/src/core/execution-context/index.js.map +1 -0
  51. package/dist/src/core/execution-context/json-value.d.ts +5 -0
  52. package/dist/src/core/execution-context/json-value.d.ts.map +1 -0
  53. package/dist/src/core/execution-context/json-value.js +6 -0
  54. package/dist/src/core/execution-context/json-value.js.map +1 -0
  55. package/dist/src/core/execution-context/serializer.d.ts +4 -0
  56. package/dist/src/core/execution-context/serializer.d.ts.map +1 -0
  57. package/dist/src/core/execution-context/serializer.js +34 -0
  58. package/dist/src/core/execution-context/serializer.js.map +1 -0
  59. package/dist/src/core/execution-context/validator.d.ts +18 -0
  60. package/dist/src/core/execution-context/validator.d.ts.map +1 -0
  61. package/dist/src/core/execution-context/validator.js +90 -0
  62. package/dist/src/core/execution-context/validator.js.map +1 -0
  63. package/dist/src/core/index.d.ts +8 -0
  64. package/dist/src/core/index.d.ts.map +1 -0
  65. package/dist/src/core/index.js +26 -0
  66. package/dist/src/core/index.js.map +1 -0
  67. package/dist/src/core/ir/decider-definition.d.ts +20 -0
  68. package/dist/src/core/ir/decider-definition.d.ts.map +1 -0
  69. package/dist/src/core/ir/decider-definition.js +6 -0
  70. package/dist/src/core/ir/decider-definition.js.map +1 -0
  71. package/dist/src/core/ir/index.d.ts +8 -0
  72. package/dist/src/core/ir/index.d.ts.map +1 -0
  73. package/dist/src/core/ir/index.js +26 -0
  74. package/dist/src/core/ir/index.js.map +1 -0
  75. package/dist/src/core/ir/job-definition.d.ts +15 -0
  76. package/dist/src/core/ir/job-definition.d.ts.map +1 -0
  77. package/dist/src/core/ir/job-definition.js +6 -0
  78. package/dist/src/core/ir/job-definition.js.map +1 -0
  79. package/dist/src/core/ir/listener-definition.d.ts +10 -0
  80. package/dist/src/core/ir/listener-definition.d.ts.map +1 -0
  81. package/dist/src/core/ir/listener-definition.js +6 -0
  82. package/dist/src/core/ir/listener-definition.js.map +1 -0
  83. package/dist/src/core/ir/policy-config.d.ts +24 -0
  84. package/dist/src/core/ir/policy-config.d.ts.map +1 -0
  85. package/dist/src/core/ir/policy-config.js +6 -0
  86. package/dist/src/core/ir/policy-config.js.map +1 -0
  87. package/dist/src/core/ir/refs.d.ts +42 -0
  88. package/dist/src/core/ir/refs.d.ts.map +1 -0
  89. package/dist/src/core/ir/refs.js +18 -0
  90. package/dist/src/core/ir/refs.js.map +1 -0
  91. package/dist/src/core/ir/step-definition.d.ts +59 -0
  92. package/dist/src/core/ir/step-definition.d.ts.map +1 -0
  93. package/dist/src/core/ir/step-definition.js +6 -0
  94. package/dist/src/core/ir/step-definition.js.map +1 -0
  95. package/dist/src/core/ir/transition-definition.d.ts +8 -0
  96. package/dist/src/core/ir/transition-definition.d.ts.map +1 -0
  97. package/dist/src/core/ir/transition-definition.js +6 -0
  98. package/dist/src/core/ir/transition-definition.js.map +1 -0
  99. package/dist/src/core/item/index.d.ts +2 -0
  100. package/dist/src/core/item/index.d.ts.map +1 -0
  101. package/dist/src/core/item/index.js +20 -0
  102. package/dist/src/core/item/index.js.map +1 -0
  103. package/dist/src/core/item/interfaces.d.ts +64 -0
  104. package/dist/src/core/item/interfaces.d.ts.map +1 -0
  105. package/dist/src/core/item/interfaces.js +6 -0
  106. package/dist/src/core/item/interfaces.js.map +1 -0
  107. package/dist/src/core/repository/index.d.ts +3 -0
  108. package/dist/src/core/repository/index.d.ts.map +1 -0
  109. package/dist/src/core/repository/index.js +21 -0
  110. package/dist/src/core/repository/index.js.map +1 -0
  111. package/dist/src/core/repository/job-repository.d.ts +60 -0
  112. package/dist/src/core/repository/job-repository.d.ts.map +1 -0
  113. package/dist/src/core/repository/job-repository.js +27 -0
  114. package/dist/src/core/repository/job-repository.js.map +1 -0
  115. package/dist/src/core/repository/types.d.ts +84 -0
  116. package/dist/src/core/repository/types.d.ts.map +1 -0
  117. package/dist/src/core/repository/types.js +6 -0
  118. package/dist/src/core/repository/types.js.map +1 -0
  119. package/dist/src/core/status.d.ts +29 -0
  120. package/dist/src/core/status.d.ts.map +1 -0
  121. package/dist/src/core/status.js +58 -0
  122. package/dist/src/core/status.js.map +1 -0
  123. package/dist/src/core/transaction/index.d.ts +2 -0
  124. package/dist/src/core/transaction/index.d.ts.map +1 -0
  125. package/dist/src/core/transaction/index.js +20 -0
  126. package/dist/src/core/transaction/index.js.map +1 -0
  127. package/dist/src/core/transaction/transaction-manager.d.ts +8 -0
  128. package/dist/src/core/transaction/transaction-manager.d.ts.map +1 -0
  129. package/dist/src/core/transaction/transaction-manager.js +14 -0
  130. package/dist/src/core/transaction/transaction-manager.js.map +1 -0
  131. package/dist/src/core/validation/definition-validator.d.ts +46 -0
  132. package/dist/src/core/validation/definition-validator.d.ts.map +1 -0
  133. package/dist/src/core/validation/definition-validator.js +177 -0
  134. package/dist/src/core/validation/definition-validator.js.map +1 -0
  135. package/dist/src/core/validation/index.d.ts +2 -0
  136. package/dist/src/core/validation/index.d.ts.map +1 -0
  137. package/dist/src/core/validation/index.js +20 -0
  138. package/dist/src/core/validation/index.js.map +1 -0
  139. package/dist/src/decorators/constants.d.ts +10 -0
  140. package/dist/src/decorators/constants.d.ts.map +1 -0
  141. package/dist/src/decorators/constants.js +50 -0
  142. package/dist/src/decorators/constants.js.map +1 -0
  143. package/dist/src/decorators/flow.decorator.d.ts +25 -0
  144. package/dist/src/decorators/flow.decorator.d.ts.map +1 -0
  145. package/dist/src/decorators/flow.decorator.js +19 -0
  146. package/dist/src/decorators/flow.decorator.js.map +1 -0
  147. package/dist/src/decorators/index.d.ts +8 -0
  148. package/dist/src/decorators/index.d.ts.map +1 -0
  149. package/dist/src/decorators/index.js +26 -0
  150. package/dist/src/decorators/index.js.map +1 -0
  151. package/dist/src/decorators/item.decorators.d.ts +32 -0
  152. package/dist/src/decorators/item.decorators.d.ts.map +1 -0
  153. package/dist/src/decorators/item.decorators.js +40 -0
  154. package/dist/src/decorators/item.decorators.js.map +1 -0
  155. package/dist/src/decorators/job.decorator.d.ts +11 -0
  156. package/dist/src/decorators/job.decorator.d.ts.map +1 -0
  157. package/dist/src/decorators/job.decorator.js +17 -0
  158. package/dist/src/decorators/job.decorator.js.map +1 -0
  159. package/dist/src/decorators/listener.decorators.d.ts +56 -0
  160. package/dist/src/decorators/listener.decorators.d.ts.map +1 -0
  161. package/dist/src/decorators/listener.decorators.js +157 -0
  162. package/dist/src/decorators/listener.decorators.js.map +1 -0
  163. package/dist/src/decorators/step.decorator.d.ts +25 -0
  164. package/dist/src/decorators/step.decorator.d.ts.map +1 -0
  165. package/dist/src/decorators/step.decorator.js +21 -0
  166. package/dist/src/decorators/step.decorator.js.map +1 -0
  167. package/dist/src/decorators/tasklet.decorator.d.ts +7 -0
  168. package/dist/src/decorators/tasklet.decorator.d.ts.map +1 -0
  169. package/dist/src/decorators/tasklet.decorator.js +21 -0
  170. package/dist/src/decorators/tasklet.decorator.js.map +1 -0
  171. package/dist/src/execution/batch-worker-runner.d.ts +27 -0
  172. package/dist/src/execution/batch-worker-runner.d.ts.map +1 -0
  173. package/dist/src/execution/batch-worker-runner.js +147 -0
  174. package/dist/src/execution/batch-worker-runner.js.map +1 -0
  175. package/dist/src/execution/chunk-step-executor.d.ts +86 -0
  176. package/dist/src/execution/chunk-step-executor.d.ts.map +1 -0
  177. package/dist/src/execution/chunk-step-executor.js +482 -0
  178. package/dist/src/execution/chunk-step-executor.js.map +1 -0
  179. package/dist/src/execution/execution-strategy.d.ts +110 -0
  180. package/dist/src/execution/execution-strategy.d.ts.map +1 -0
  181. package/dist/src/execution/execution-strategy.js +13 -0
  182. package/dist/src/execution/execution-strategy.js.map +1 -0
  183. package/dist/src/execution/external-task-execution-strategy.d.ts +36 -0
  184. package/dist/src/execution/external-task-execution-strategy.d.ts.map +1 -0
  185. package/dist/src/execution/external-task-execution-strategy.js +97 -0
  186. package/dist/src/execution/external-task-execution-strategy.js.map +1 -0
  187. package/dist/src/execution/in-process-execution-strategy.d.ts +129 -0
  188. package/dist/src/execution/in-process-execution-strategy.d.ts.map +1 -0
  189. package/dist/src/execution/in-process-execution-strategy.js +141 -0
  190. package/dist/src/execution/in-process-execution-strategy.js.map +1 -0
  191. package/dist/src/execution/index.d.ts +14 -0
  192. package/dist/src/execution/index.d.ts.map +1 -0
  193. package/dist/src/execution/index.js +32 -0
  194. package/dist/src/execution/index.js.map +1 -0
  195. package/dist/src/execution/job-executor.d.ts +145 -0
  196. package/dist/src/execution/job-executor.d.ts.map +1 -0
  197. package/dist/src/execution/job-executor.js +475 -0
  198. package/dist/src/execution/job-executor.js.map +1 -0
  199. package/dist/src/execution/job-explorer.d.ts +15 -0
  200. package/dist/src/execution/job-explorer.d.ts.map +1 -0
  201. package/dist/src/execution/job-explorer.js +84 -0
  202. package/dist/src/execution/job-explorer.js.map +1 -0
  203. package/dist/src/execution/job-key.d.ts +3 -0
  204. package/dist/src/execution/job-key.d.ts.map +1 -0
  205. package/dist/src/execution/job-key.js +43 -0
  206. package/dist/src/execution/job-key.js.map +1 -0
  207. package/dist/src/execution/job-launcher.d.ts +75 -0
  208. package/dist/src/execution/job-launcher.d.ts.map +1 -0
  209. package/dist/src/execution/job-launcher.js +112 -0
  210. package/dist/src/execution/job-launcher.js.map +1 -0
  211. package/dist/src/execution/job-operator.d.ts +22 -0
  212. package/dist/src/execution/job-operator.d.ts.map +1 -0
  213. package/dist/src/execution/job-operator.js +125 -0
  214. package/dist/src/execution/job-operator.js.map +1 -0
  215. package/dist/src/execution/listener-invoker.d.ts +164 -0
  216. package/dist/src/execution/listener-invoker.d.ts.map +1 -0
  217. package/dist/src/execution/listener-invoker.js +246 -0
  218. package/dist/src/execution/listener-invoker.js.map +1 -0
  219. package/dist/src/execution/ref-resolver.d.ts +40 -0
  220. package/dist/src/execution/ref-resolver.d.ts.map +1 -0
  221. package/dist/src/execution/ref-resolver.js +41 -0
  222. package/dist/src/execution/ref-resolver.js.map +1 -0
  223. package/dist/src/execution/tasklet-step-executor.d.ts +79 -0
  224. package/dist/src/execution/tasklet-step-executor.d.ts.map +1 -0
  225. package/dist/src/execution/tasklet-step-executor.js +138 -0
  226. package/dist/src/execution/tasklet-step-executor.js.map +1 -0
  227. package/dist/src/explorer/batch-explorer.d.ts +138 -0
  228. package/dist/src/explorer/batch-explorer.d.ts.map +1 -0
  229. package/dist/src/explorer/batch-explorer.js +167 -0
  230. package/dist/src/explorer/batch-explorer.js.map +1 -0
  231. package/dist/src/explorer/index.d.ts +2 -0
  232. package/dist/src/explorer/index.d.ts.map +1 -0
  233. package/dist/src/explorer/index.js +20 -0
  234. package/dist/src/explorer/index.js.map +1 -0
  235. package/dist/src/flow/flow-evaluator.d.ts +30 -0
  236. package/dist/src/flow/flow-evaluator.d.ts.map +1 -0
  237. package/dist/src/flow/flow-evaluator.js +80 -0
  238. package/dist/src/flow/flow-evaluator.js.map +1 -0
  239. package/dist/src/flow/index.d.ts +2 -0
  240. package/dist/src/flow/index.d.ts.map +1 -0
  241. package/dist/src/flow/index.js +20 -0
  242. package/dist/src/flow/index.js.map +1 -0
  243. package/dist/src/index.d.ts +18 -0
  244. package/dist/src/index.d.ts.map +1 -0
  245. package/dist/src/index.js +90 -0
  246. package/dist/src/index.js.map +1 -0
  247. package/dist/src/io/checkpoint.d.ts +7 -0
  248. package/dist/src/io/checkpoint.d.ts.map +1 -0
  249. package/dist/src/io/checkpoint.js +56 -0
  250. package/dist/src/io/checkpoint.js.map +1 -0
  251. package/dist/src/io/database.d.ts +50 -0
  252. package/dist/src/io/database.d.ts.map +1 -0
  253. package/dist/src/io/database.js +108 -0
  254. package/dist/src/io/database.js.map +1 -0
  255. package/dist/src/io/file-readers.d.ts +54 -0
  256. package/dist/src/io/file-readers.d.ts.map +1 -0
  257. package/dist/src/io/file-readers.js +167 -0
  258. package/dist/src/io/file-readers.js.map +1 -0
  259. package/dist/src/io/file-writers.d.ts +31 -0
  260. package/dist/src/io/file-writers.d.ts.map +1 -0
  261. package/dist/src/io/file-writers.js +80 -0
  262. package/dist/src/io/file-writers.js.map +1 -0
  263. package/dist/src/io/index.d.ts +6 -0
  264. package/dist/src/io/index.d.ts.map +1 -0
  265. package/dist/src/io/index.js +24 -0
  266. package/dist/src/io/index.js.map +1 -0
  267. package/dist/src/io/s3.d.ts +50 -0
  268. package/dist/src/io/s3.d.ts.map +1 -0
  269. package/dist/src/io/s3.js +96 -0
  270. package/dist/src/io/s3.js.map +1 -0
  271. package/dist/src/listeners/builtin-listeners.d.ts +77 -0
  272. package/dist/src/listeners/builtin-listeners.d.ts.map +1 -0
  273. package/dist/src/listeners/builtin-listeners.js +108 -0
  274. package/dist/src/listeners/builtin-listeners.js.map +1 -0
  275. package/dist/src/listeners/index.d.ts +8 -0
  276. package/dist/src/listeners/index.d.ts.map +1 -0
  277. package/dist/src/listeners/index.js +25 -0
  278. package/dist/src/listeners/index.js.map +1 -0
  279. package/dist/src/module/adapter-options.d.ts +39 -0
  280. package/dist/src/module/adapter-options.d.ts.map +1 -0
  281. package/dist/src/module/adapter-options.js +34 -0
  282. package/dist/src/module/adapter-options.js.map +1 -0
  283. package/dist/src/module/adapter.d.ts +157 -0
  284. package/dist/src/module/adapter.d.ts.map +1 -0
  285. package/dist/src/module/adapter.js +80 -0
  286. package/dist/src/module/adapter.js.map +1 -0
  287. package/dist/src/module/batch-schedule-registry.d.ts +110 -0
  288. package/dist/src/module/batch-schedule-registry.d.ts.map +1 -0
  289. package/dist/src/module/batch-schedule-registry.js +0 -0
  290. package/dist/src/module/batch-schedule-registry.js.map +1 -0
  291. package/dist/src/module/index.d.ts +14 -0
  292. package/dist/src/module/index.d.ts.map +1 -0
  293. package/dist/src/module/index.js +31 -0
  294. package/dist/src/module/index.js.map +1 -0
  295. package/dist/src/module/nest-batch.module.d.ts +236 -0
  296. package/dist/src/module/nest-batch.module.d.ts.map +1 -0
  297. package/dist/src/module/nest-batch.module.js +475 -0
  298. package/dist/src/module/nest-batch.module.js.map +1 -0
  299. package/dist/src/module/tokens.d.ts +83 -0
  300. package/dist/src/module/tokens.d.ts.map +1 -0
  301. package/dist/src/module/tokens.js +58 -0
  302. package/dist/src/module/tokens.js.map +1 -0
  303. package/dist/src/observability/event-types.d.ts +55 -0
  304. package/dist/src/observability/event-types.d.ts.map +1 -0
  305. package/dist/src/observability/event-types.js +36 -0
  306. package/dist/src/observability/event-types.js.map +1 -0
  307. package/dist/src/observability/exporters.d.ts +35 -0
  308. package/dist/src/observability/exporters.d.ts.map +1 -0
  309. package/dist/src/observability/exporters.js +93 -0
  310. package/dist/src/observability/exporters.js.map +1 -0
  311. package/dist/src/observability/index.d.ts +3 -0
  312. package/dist/src/observability/index.d.ts.map +1 -0
  313. package/dist/src/observability/index.js +21 -0
  314. package/dist/src/observability/index.js.map +1 -0
  315. package/dist/src/partition-helpers.d.ts +127 -0
  316. package/dist/src/partition-helpers.d.ts.map +1 -0
  317. package/dist/src/partition-helpers.js +136 -0
  318. package/dist/src/partition-helpers.js.map +1 -0
  319. package/dist/src/policies/backoff.d.ts +3 -0
  320. package/dist/src/policies/backoff.d.ts.map +1 -0
  321. package/dist/src/policies/backoff.js +34 -0
  322. package/dist/src/policies/backoff.js.map +1 -0
  323. package/dist/src/policies/index.d.ts +4 -0
  324. package/dist/src/policies/index.d.ts.map +1 -0
  325. package/dist/src/policies/index.js +22 -0
  326. package/dist/src/policies/index.js.map +1 -0
  327. package/dist/src/policies/retry-policy.d.ts +13 -0
  328. package/dist/src/policies/retry-policy.d.ts.map +1 -0
  329. package/dist/src/policies/retry-policy.js +55 -0
  330. package/dist/src/policies/retry-policy.js.map +1 -0
  331. package/dist/src/policies/skip-policy.d.ts +12 -0
  332. package/dist/src/policies/skip-policy.d.ts.map +1 -0
  333. package/dist/src/policies/skip-policy.js +44 -0
  334. package/dist/src/policies/skip-policy.js.map +1 -0
  335. package/dist/src/registry/index.d.ts +2 -0
  336. package/dist/src/registry/index.d.ts.map +1 -0
  337. package/dist/src/registry/index.js +20 -0
  338. package/dist/src/registry/index.js.map +1 -0
  339. package/dist/src/registry/job-registry.d.ts +16 -0
  340. package/dist/src/registry/job-registry.d.ts.map +1 -0
  341. package/dist/src/registry/job-registry.js +50 -0
  342. package/dist/src/registry/job-registry.js.map +1 -0
  343. package/dist/src/repository/id-generator.d.ts +18 -0
  344. package/dist/src/repository/id-generator.d.ts.map +1 -0
  345. package/dist/src/repository/id-generator.js +37 -0
  346. package/dist/src/repository/id-generator.js.map +1 -0
  347. package/dist/src/repository/in-memory/in-memory-job-repository.d.ts +49 -0
  348. package/dist/src/repository/in-memory/in-memory-job-repository.d.ts.map +1 -0
  349. package/dist/src/repository/in-memory/in-memory-job-repository.js +291 -0
  350. package/dist/src/repository/in-memory/in-memory-job-repository.js.map +1 -0
  351. package/dist/src/repository/in-memory/index.d.ts +2 -0
  352. package/dist/src/repository/in-memory/index.d.ts.map +1 -0
  353. package/dist/src/repository/in-memory/index.js +20 -0
  354. package/dist/src/repository/in-memory/index.js.map +1 -0
  355. package/dist/src/repository/index.d.ts +4 -0
  356. package/dist/src/repository/index.d.ts.map +1 -0
  357. package/dist/src/repository/index.js +22 -0
  358. package/dist/src/repository/index.js.map +1 -0
  359. package/dist/src/repository/uuid-v7.d.ts +20 -0
  360. package/dist/src/repository/uuid-v7.d.ts.map +1 -0
  361. package/dist/src/repository/uuid-v7.js +31 -0
  362. package/dist/src/repository/uuid-v7.js.map +1 -0
  363. package/dist/src/scheduling/batch-scheduled.d.ts +87 -0
  364. package/dist/src/scheduling/batch-scheduled.d.ts.map +1 -0
  365. package/dist/src/scheduling/batch-scheduled.js +170 -0
  366. package/dist/src/scheduling/batch-scheduled.js.map +1 -0
  367. package/dist/src/transaction/in-memory-transaction-manager.d.ts +16 -0
  368. package/dist/src/transaction/in-memory-transaction-manager.d.ts.map +1 -0
  369. package/dist/src/transaction/in-memory-transaction-manager.js +33 -0
  370. package/dist/src/transaction/in-memory-transaction-manager.js.map +1 -0
  371. package/dist/src/transaction/index.d.ts +2 -0
  372. package/dist/src/transaction/index.d.ts.map +1 -0
  373. package/dist/src/transaction/index.js +20 -0
  374. package/dist/src/transaction/index.js.map +1 -0
  375. package/dist/tests/contracts/index.d.ts +26 -0
  376. package/dist/tests/contracts/index.d.ts.map +1 -0
  377. package/dist/tests/contracts/index.js +37 -0
  378. package/dist/tests/contracts/index.js.map +1 -0
  379. package/dist/tests/contracts/job-repository.contract.d.ts +46 -0
  380. package/dist/tests/contracts/job-repository.contract.d.ts.map +1 -0
  381. package/dist/tests/contracts/job-repository.contract.js +644 -0
  382. package/dist/tests/contracts/job-repository.contract.js.map +1 -0
  383. package/package.json +80 -0
  384. package/src/adapters/in-process.adapter.ts +182 -0
  385. package/src/adapters/index.ts +17 -0
  386. package/src/builder/batch-builder.ts +32 -0
  387. package/src/builder/flow-builder.ts +141 -0
  388. package/src/builder/index.ts +4 -0
  389. package/src/builder/job-builder.ts +206 -0
  390. package/src/builder/step-builder.ts +190 -0
  391. package/src/compiler/builder-types.ts +27 -0
  392. package/src/compiler/definition-compiler.ts +325 -0
  393. package/src/compiler/index.ts +2 -0
  394. package/src/core/errors.ts +125 -0
  395. package/src/core/execution-context/index.ts +3 -0
  396. package/src/core/execution-context/json-value.ts +3 -0
  397. package/src/core/execution-context/serializer.ts +21 -0
  398. package/src/core/execution-context/validator.ts +103 -0
  399. package/src/core/index.ts +7 -0
  400. package/src/core/ir/decider-definition.ts +25 -0
  401. package/src/core/ir/index.ts +7 -0
  402. package/src/core/ir/job-definition.ts +15 -0
  403. package/src/core/ir/listener-definition.ts +19 -0
  404. package/src/core/ir/policy-config.ts +19 -0
  405. package/src/core/ir/refs.ts +42 -0
  406. package/src/core/ir/step-definition.ts +62 -0
  407. package/src/core/ir/transition-definition.ts +9 -0
  408. package/src/core/item/index.ts +1 -0
  409. package/src/core/item/interfaces.ts +70 -0
  410. package/src/core/repository/index.ts +2 -0
  411. package/src/core/repository/job-repository.ts +100 -0
  412. package/src/core/repository/types.ts +91 -0
  413. package/src/core/status.ts +31 -0
  414. package/src/core/transaction/index.ts +1 -0
  415. package/src/core/transaction/transaction-manager.ts +8 -0
  416. package/src/core/validation/definition-validator.ts +215 -0
  417. package/src/core/validation/index.ts +1 -0
  418. package/src/decorators/constants.ts +9 -0
  419. package/src/decorators/flow.decorator.ts +31 -0
  420. package/src/decorators/index.ts +7 -0
  421. package/src/decorators/item.decorators.ts +51 -0
  422. package/src/decorators/job.decorator.ts +16 -0
  423. package/src/decorators/listener.decorators.ts +142 -0
  424. package/src/decorators/step.decorator.ts +33 -0
  425. package/src/decorators/tasklet.decorator.ts +14 -0
  426. package/src/execution/batch-worker-runner.ts +142 -0
  427. package/src/execution/chunk-step-executor.ts +594 -0
  428. package/src/execution/execution-strategy.ts +115 -0
  429. package/src/execution/external-task-execution-strategy.ts +104 -0
  430. package/src/execution/in-process-execution-strategy.ts +207 -0
  431. package/src/execution/index.ts +13 -0
  432. package/src/execution/job-executor.ts +553 -0
  433. package/src/execution/job-explorer.ts +73 -0
  434. package/src/execution/job-key.ts +35 -0
  435. package/src/execution/job-launcher.ts +132 -0
  436. package/src/execution/job-operator.ts +127 -0
  437. package/src/execution/listener-invoker.ts +389 -0
  438. package/src/execution/ref-resolver.ts +64 -0
  439. package/src/execution/tasklet-step-executor.ts +182 -0
  440. package/src/explorer/batch-explorer.ts +251 -0
  441. package/src/explorer/index.ts +1 -0
  442. package/src/flow/flow-evaluator.ts +89 -0
  443. package/src/flow/index.ts +1 -0
  444. package/src/index.ts +24 -0
  445. package/src/io/checkpoint.ts +47 -0
  446. package/src/io/database.ts +114 -0
  447. package/src/io/file-readers.ts +191 -0
  448. package/src/io/file-writers.ts +99 -0
  449. package/src/io/index.ts +5 -0
  450. package/src/io/s3.ts +117 -0
  451. package/src/listeners/builtin-listeners.ts +151 -0
  452. package/src/listeners/index.ts +7 -0
  453. package/src/module/adapter-options.ts +38 -0
  454. package/src/module/adapter.ts +160 -0
  455. package/src/module/batch-schedule-registry.ts +0 -0
  456. package/src/module/index.ts +13 -0
  457. package/src/module/nest-batch.module.ts +674 -0
  458. package/src/module/tokens.ts +95 -0
  459. package/src/observability/event-types.ts +61 -0
  460. package/src/observability/exporters.ts +96 -0
  461. package/src/observability/index.ts +2 -0
  462. package/src/partition-helpers.ts +204 -0
  463. package/src/policies/backoff.ts +22 -0
  464. package/src/policies/index.ts +3 -0
  465. package/src/policies/retry-policy.ts +57 -0
  466. package/src/policies/skip-policy.ts +51 -0
  467. package/src/registry/index.ts +1 -0
  468. package/src/registry/job-registry.ts +42 -0
  469. package/src/repository/id-generator.ts +25 -0
  470. package/src/repository/in-memory/in-memory-job-repository.ts +334 -0
  471. package/src/repository/in-memory/index.ts +1 -0
  472. package/src/repository/index.ts +3 -0
  473. package/src/repository/uuid-v7.ts +40 -0
  474. package/src/scheduling/batch-scheduled.ts +257 -0
  475. package/src/transaction/in-memory-transaction-manager.ts +23 -0
  476. package/src/transaction/index.ts +1 -0
@@ -0,0 +1,84 @@
1
+ import type { JobStatus, StepStatus } from '../status';
2
+ import type { JsonValue } from '../execution-context/json-value';
3
+ export interface JobInstance {
4
+ id: string;
5
+ jobName: string;
6
+ jobKey: string;
7
+ createdAt: Date;
8
+ }
9
+ export interface JobExecutionPatch {
10
+ status?: JobStatus;
11
+ startTime?: Date | null;
12
+ endTime?: Date | null;
13
+ exitCode?: string;
14
+ exitMessage?: string;
15
+ }
16
+ export interface JobExecution {
17
+ id: string;
18
+ jobInstanceId: string;
19
+ status: JobStatus;
20
+ startTime: Date | null;
21
+ endTime: Date | null;
22
+ exitCode: string;
23
+ exitMessage: string;
24
+ params: JobParameters;
25
+ }
26
+ export interface StepExecutionPatch {
27
+ status?: StepStatus;
28
+ readCount?: number;
29
+ writeCount?: number;
30
+ skipCount?: number;
31
+ rollbackCount?: number;
32
+ commitCount?: number;
33
+ startTime?: Date | null;
34
+ endTime?: Date | null;
35
+ exitCode?: string;
36
+ exitMessage?: string;
37
+ }
38
+ export interface StepExecution {
39
+ id: string;
40
+ jobExecutionId: string;
41
+ stepName: string;
42
+ status: StepStatus;
43
+ readCount: number;
44
+ writeCount: number;
45
+ skipCount: number;
46
+ rollbackCount: number;
47
+ commitCount: number;
48
+ startTime: Date | null;
49
+ endTime: Date | null;
50
+ exitCode: string;
51
+ exitMessage: string;
52
+ }
53
+ export interface ExecutionContext {
54
+ data: JsonValue;
55
+ version: number;
56
+ }
57
+ export type ExecutionScope = {
58
+ jobExecutionId: string;
59
+ } | {
60
+ stepExecutionId: string;
61
+ };
62
+ export type JobParameters = Record<string, JsonValue>;
63
+ export interface JobInstanceFilter {
64
+ jobName?: string;
65
+ jobKey?: string;
66
+ }
67
+ export interface JobExecutionFilter {
68
+ jobInstanceId?: string;
69
+ status?: JobStatus | readonly JobStatus[];
70
+ startedAfter?: Date;
71
+ startedBefore?: Date;
72
+ }
73
+ export interface StepExecutionContextEntry {
74
+ stepExecutionId: string;
75
+ context: ExecutionContext;
76
+ }
77
+ export interface JobExecutionDetails {
78
+ jobInstance: JobInstance;
79
+ jobExecution: JobExecution;
80
+ stepExecutions: StepExecution[];
81
+ jobContext: ExecutionContext;
82
+ stepContexts: StepExecutionContextEntry[];
83
+ }
84
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/core/repository/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,KA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CAC3C"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/core/repository/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,29 @@
1
+ export declare enum FlowExecutionStatus {
2
+ COMPLETED = "COMPLETED",
3
+ FAILED = "FAILED",
4
+ STOPPED = "STOPPED",
5
+ UNKNOWN = "UNKNOWN"
6
+ }
7
+ export declare enum JobStatus {
8
+ STARTING = "STARTING",
9
+ STARTED = "STARTED",
10
+ COMPLETED = "COMPLETED",
11
+ FAILED = "FAILED",
12
+ STOPPING = "STOPPING",
13
+ STOPPED = "STOPPED",
14
+ ABANDONED = "ABANDONED",
15
+ UNKNOWN = "UNKNOWN"
16
+ }
17
+ export declare enum StepStatus {
18
+ STARTING = "STARTING",
19
+ STARTED = "STARTED",
20
+ COMPLETED = "COMPLETED",
21
+ FAILED = "FAILED",
22
+ STOPPED = "STOPPED",
23
+ UNKNOWN = "UNKNOWN"
24
+ }
25
+ export declare enum ChunkStatus {
26
+ PROCESSING = "PROCESSING",
27
+ COMPLETED = "COMPLETED"
28
+ }
29
+ //# sourceMappingURL=status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/core/status.ts"],"names":[],"mappings":"AAAA,oBAAY,mBAAmB;IAC7B,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,oBAAY,SAAS;IACnB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,OAAO,YAAY;CACpB;AAED,oBAAY,UAAU;IACpB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,oBAAY,WAAW;IACrB,UAAU,eAAe;IACzB,SAAS,cAAc;CACxB"}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
+ });
10
+ }
11
+ _export(exports, {
12
+ get ChunkStatus () {
13
+ return ChunkStatus;
14
+ },
15
+ get FlowExecutionStatus () {
16
+ return FlowExecutionStatus;
17
+ },
18
+ get JobStatus () {
19
+ return JobStatus;
20
+ },
21
+ get StepStatus () {
22
+ return StepStatus;
23
+ }
24
+ });
25
+ var FlowExecutionStatus = /*#__PURE__*/ function(FlowExecutionStatus) {
26
+ FlowExecutionStatus["COMPLETED"] = "COMPLETED";
27
+ FlowExecutionStatus["FAILED"] = "FAILED";
28
+ FlowExecutionStatus["STOPPED"] = "STOPPED";
29
+ FlowExecutionStatus["UNKNOWN"] = "UNKNOWN";
30
+ return FlowExecutionStatus;
31
+ }({});
32
+ var JobStatus = /*#__PURE__*/ function(JobStatus) {
33
+ JobStatus["STARTING"] = "STARTING";
34
+ JobStatus["STARTED"] = "STARTED";
35
+ JobStatus["COMPLETED"] = "COMPLETED";
36
+ JobStatus["FAILED"] = "FAILED";
37
+ JobStatus["STOPPING"] = "STOPPING";
38
+ JobStatus["STOPPED"] = "STOPPED";
39
+ JobStatus["ABANDONED"] = "ABANDONED";
40
+ JobStatus["UNKNOWN"] = "UNKNOWN";
41
+ return JobStatus;
42
+ }({});
43
+ var StepStatus = /*#__PURE__*/ function(StepStatus) {
44
+ StepStatus["STARTING"] = "STARTING";
45
+ StepStatus["STARTED"] = "STARTED";
46
+ StepStatus["COMPLETED"] = "COMPLETED";
47
+ StepStatus["FAILED"] = "FAILED";
48
+ StepStatus["STOPPED"] = "STOPPED";
49
+ StepStatus["UNKNOWN"] = "UNKNOWN";
50
+ return StepStatus;
51
+ }({});
52
+ var ChunkStatus = /*#__PURE__*/ function(ChunkStatus) {
53
+ ChunkStatus["PROCESSING"] = "PROCESSING";
54
+ ChunkStatus["COMPLETED"] = "COMPLETED";
55
+ return ChunkStatus;
56
+ }({});
57
+
58
+ //# sourceMappingURL=status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/core/status.ts"],"sourcesContent":["export enum FlowExecutionStatus {\n COMPLETED = 'COMPLETED',\n FAILED = 'FAILED',\n STOPPED = 'STOPPED',\n UNKNOWN = 'UNKNOWN',\n}\n\nexport enum JobStatus {\n STARTING = 'STARTING',\n STARTED = 'STARTED',\n COMPLETED = 'COMPLETED',\n FAILED = 'FAILED',\n STOPPING = 'STOPPING',\n STOPPED = 'STOPPED',\n ABANDONED = 'ABANDONED',\n UNKNOWN = 'UNKNOWN',\n}\n\nexport enum StepStatus {\n STARTING = 'STARTING',\n STARTED = 'STARTED',\n COMPLETED = 'COMPLETED',\n FAILED = 'FAILED',\n STOPPED = 'STOPPED',\n UNKNOWN = 'UNKNOWN',\n}\n\nexport enum ChunkStatus {\n PROCESSING = 'PROCESSING',\n COMPLETED = 'COMPLETED',\n}\n"],"names":["ChunkStatus","FlowExecutionStatus","JobStatus","StepStatus"],"mappings":";;;;;;;;;;;QA2BYA;eAAAA;;QA3BAC;eAAAA;;QAOAC;eAAAA;;QAWAC;eAAAA;;;AAlBL,IAAA,AAAKF,6CAAAA;;;;;WAAAA;;AAOL,IAAA,AAAKC,mCAAAA;;;;;;;;;WAAAA;;AAWL,IAAA,AAAKC,oCAAAA;;;;;;;WAAAA;;AASL,IAAA,AAAKH,qCAAAA;;;WAAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './transaction-manager';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/transaction/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ _export_star(require("./transaction-manager"), exports);
6
+ function _export_star(from, to) {
7
+ Object.keys(from).forEach(function(k) {
8
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
9
+ Object.defineProperty(to, k, {
10
+ enumerable: true,
11
+ get: function() {
12
+ return from[k];
13
+ }
14
+ });
15
+ }
16
+ });
17
+ return from;
18
+ }
19
+
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/core/transaction/index.ts"],"sourcesContent":["export * from './transaction-manager';\n"],"names":[],"mappings":";;;;qBAAc"}
@@ -0,0 +1,8 @@
1
+ export interface TransactionContext {
2
+ readonly isActive: true;
3
+ readonly id: string;
4
+ }
5
+ export declare abstract class TransactionManager {
6
+ abstract withTransaction<T>(fn: (ctx: TransactionContext) => Promise<T>): Promise<T>;
7
+ }
8
+ //# sourceMappingURL=transaction-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transaction-manager.d.ts","sourceRoot":"","sources":["../../../../src/core/transaction/transaction-manager.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED,8BAAsB,kBAAkB;IACtC,QAAQ,CAAC,eAAe,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,kBAAkB,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;CACrF"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "TransactionManager", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return TransactionManager;
9
+ }
10
+ });
11
+ let TransactionManager = class TransactionManager {
12
+ };
13
+
14
+ //# sourceMappingURL=transaction-manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/core/transaction/transaction-manager.ts"],"sourcesContent":["export interface TransactionContext {\n readonly isActive: true;\n readonly id: string;\n}\n\nexport abstract class TransactionManager {\n abstract withTransaction<T>(fn: (ctx: TransactionContext) => Promise<T>): Promise<T>;\n}\n"],"names":["TransactionManager"],"mappings":";;;;+BAKsBA;;;eAAAA;;;AAAf,IAAA,AAAeA,qBAAf,MAAeA;AAEtB"}
@@ -0,0 +1,46 @@
1
+ import { JobDefinition, TransitionDefinition, StepDefinition } from '../ir';
2
+ /**
3
+ * Pure validation for a fully-built `JobDefinition` IR.
4
+ *
5
+ * Does not perform any execution, scheduling, or Nest wiring. After the
6
+ * Builder/Compiler/Decorator API has assembled a `JobDefinition`, the
7
+ * `DefinitionValidator` answers one question: "is this graph structurally
8
+ * sound?" — by enforcing the invariants that the runtime executor relies on.
9
+ *
10
+ * Invariants enforced (in order):
11
+ *
12
+ * 1. EMPTY_JOB — the job has at least one step.
13
+ * 2. NO_START_STEP — `startStepId` references an existing step.
14
+ * 3. INVALID_CHUNK_SIZE — every `chunk` step has `chunkSize > 0`.
15
+ * 4. MISSING_TARGET — every transition's `from`/`to` references a
16
+ * step that exists (or `toStepId === null` for END).
17
+ * 5. UNREACHABLE_STEP — every step is reachable from `startStepId`
18
+ * via transitions (BFS).
19
+ * 6. CYCLE_DETECTED — the transition graph has no cycles (DFS with
20
+ * recursion stack tracking).
21
+ *
22
+ * The order matters: cheap, local checks run first so a malformed job
23
+ * fails fast before we walk the whole graph.
24
+ *
25
+ * Per ORACLE verdict 1b: "all transitions target existing steps, one start
26
+ * step, no accidental cycles, terminal statuses are handled".
27
+ */
28
+ export declare class DefinitionValidator {
29
+ /**
30
+ * Validates a complete `JobDefinition`. Throws `InvalidFlowGraphError`
31
+ * on the first violation found, with a stable `code` (see class doc).
32
+ */
33
+ validate(job: JobDefinition): void;
34
+ /**
35
+ * Lightweight, partial validation used by `FlowEvaluator` and the
36
+ * `Builder` API when only a subset of steps/transitions is in scope.
37
+ *
38
+ * Mirrors rule 4 of `validate()` (transition endpoints must exist) but
39
+ * does NOT enforce reachability, cycles, or the start step — those
40
+ * require the full `JobDefinition` graph.
41
+ */
42
+ validateTransition(transitions: TransitionDefinition[], availableSteps: Record<string, StepDefinition>): void;
43
+ private collectReachable;
44
+ private assertAcyclic;
45
+ }
46
+ //# sourceMappingURL=definition-validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definition-validator.d.ts","sourceRoot":"","sources":["../../../../src/core/validation/definition-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,cAAc,EACf,MAAM,OAAO,CAAC;AAIf;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,mBAAmB;IAC9B;;;OAGG;IACH,QAAQ,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI;IAwGlC;;;;;;;OAOG;IACH,kBAAkB,CAChB,WAAW,EAAE,oBAAoB,EAAE,EACnC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,GAC7C,IAAI;IAqBP,OAAO,CAAC,gBAAgB;IAgBxB,OAAO,CAAC,aAAa;CAuBtB"}
@@ -0,0 +1,177 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "DefinitionValidator", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return DefinitionValidator;
9
+ }
10
+ });
11
+ const _errors = require("../errors");
12
+ const _partitionhelpers = require("../../partition-helpers");
13
+ let DefinitionValidator = class DefinitionValidator {
14
+ /**
15
+ * Validates a complete `JobDefinition`. Throws `InvalidFlowGraphError`
16
+ * on the first violation found, with a stable `code` (see class doc).
17
+ */ validate(job) {
18
+ const stepIds = Object.keys(job.steps);
19
+ // 1. At least one step.
20
+ if (stepIds.length === 0) {
21
+ throw new _errors.InvalidFlowGraphError('EMPTY_JOB', `Job "${job.id}" has no steps`, {
22
+ jobId: job.id
23
+ });
24
+ }
25
+ // 2. startStepId must reference an existing step.
26
+ if (!(job.startStepId in job.steps)) {
27
+ throw new _errors.InvalidFlowGraphError('NO_START_STEP', `Job "${job.id}" startStepId "${job.startStepId}" is not in steps`, {
28
+ jobId: job.id,
29
+ startStepId: job.startStepId
30
+ });
31
+ }
32
+ // 3. Per-step invariants.
33
+ for (const stepId of stepIds){
34
+ const step = job.steps[stepId];
35
+ if (step.kind === 'chunk' && step.chunkSize <= 0) {
36
+ throw new _errors.InvalidFlowGraphError('INVALID_CHUNK_SIZE', `Step "${stepId}" has invalid chunkSize ${step.chunkSize}`, {
37
+ jobId: job.id,
38
+ stepId,
39
+ chunkSize: step.chunkSize
40
+ });
41
+ }
42
+ if (step.kind === 'chunk' && step.partitions !== undefined) {
43
+ // Delegate the partition-config validation to the pure helper
44
+ // so the rule lives in exactly one place (the
45
+ // `partition-helpers` module). The validator's job is to
46
+ // surface the failure with the IR-shaped context; the
47
+ // helper's job is to decide whether the config is valid.
48
+ try {
49
+ (0, _partitionhelpers.validatePartitions)(step.partitions);
50
+ } catch (err) {
51
+ const message = err instanceof Error ? err.message : String(err);
52
+ throw new _errors.InvalidFlowGraphError('INVALID_PARTITIONS', `Step "${stepId}" has invalid partitions: ${message}`, {
53
+ jobId: job.id,
54
+ stepId,
55
+ partitions: step.partitions
56
+ });
57
+ }
58
+ }
59
+ }
60
+ // 4. Every transition's endpoints must exist.
61
+ for (const t of job.transitions){
62
+ if (!(t.fromStepId in job.steps)) {
63
+ throw new _errors.InvalidFlowGraphError('MISSING_TARGET', `Transition fromStepId "${t.fromStepId}" not found in steps`, {
64
+ jobId: job.id,
65
+ fromStepId: t.fromStepId
66
+ });
67
+ }
68
+ if (t.toStepId !== null && !(t.toStepId in job.steps)) {
69
+ throw new _errors.InvalidFlowGraphError('MISSING_TARGET', `Transition toStepId "${t.toStepId}" not found in steps`, {
70
+ jobId: job.id,
71
+ toStepId: t.toStepId
72
+ });
73
+ }
74
+ }
75
+ const deciderStepIds = new Set();
76
+ for (const d of job.deciders ?? []){
77
+ if (!(d.afterStepId in job.steps)) {
78
+ throw new _errors.InvalidFlowGraphError('MISSING_TARGET', `Decider afterStepId "${d.afterStepId}" not found in steps`, {
79
+ jobId: job.id,
80
+ afterStepId: d.afterStepId
81
+ });
82
+ }
83
+ if (deciderStepIds.has(d.afterStepId)) {
84
+ throw new _errors.InvalidFlowGraphError('DUPLICATE_DECIDER', `Step "${d.afterStepId}" has multiple deciders`, {
85
+ jobId: job.id,
86
+ afterStepId: d.afterStepId
87
+ });
88
+ }
89
+ deciderStepIds.add(d.afterStepId);
90
+ }
91
+ // 5. No unreachable steps (BFS from startStepId).
92
+ const reachable = this.collectReachable(job);
93
+ for (const stepId of stepIds){
94
+ if (!reachable.has(stepId)) {
95
+ throw new _errors.InvalidFlowGraphError('UNREACHABLE_STEP', `Step "${stepId}" is unreachable from startStepId "${job.startStepId}"`, {
96
+ jobId: job.id,
97
+ stepId,
98
+ startStepId: job.startStepId
99
+ });
100
+ }
101
+ }
102
+ // 6. No cycles (DFS with stack tracking).
103
+ this.assertAcyclic(job);
104
+ }
105
+ /**
106
+ * Lightweight, partial validation used by `FlowEvaluator` and the
107
+ * `Builder` API when only a subset of steps/transitions is in scope.
108
+ *
109
+ * Mirrors rule 4 of `validate()` (transition endpoints must exist) but
110
+ * does NOT enforce reachability, cycles, or the start step — those
111
+ * require the full `JobDefinition` graph.
112
+ */ validateTransition(transitions, availableSteps) {
113
+ for (const t of transitions){
114
+ if (!(t.fromStepId in availableSteps)) {
115
+ throw new _errors.InvalidFlowGraphError('MISSING_TARGET', `Transition fromStepId "${t.fromStepId}" not in steps`, {
116
+ fromStepId: t.fromStepId
117
+ });
118
+ }
119
+ if (t.toStepId !== null && !(t.toStepId in availableSteps)) {
120
+ throw new _errors.InvalidFlowGraphError('MISSING_TARGET', `Transition toStepId "${t.toStepId}" not in steps`, {
121
+ toStepId: t.toStepId
122
+ });
123
+ }
124
+ }
125
+ }
126
+ // --- private helpers --------------------------------------------------
127
+ collectReachable(job) {
128
+ const reachable = new Set();
129
+ const queue = [
130
+ job.startStepId
131
+ ];
132
+ while(queue.length > 0){
133
+ const cur = queue.shift();
134
+ if (reachable.has(cur)) continue;
135
+ reachable.add(cur);
136
+ for (const t of job.transitions){
137
+ if (t.fromStepId === cur && t.toStepId !== null && !reachable.has(t.toStepId)) {
138
+ queue.push(t.toStepId);
139
+ }
140
+ }
141
+ }
142
+ return reachable;
143
+ }
144
+ assertAcyclic(job) {
145
+ const visited = new Set();
146
+ const inStack = new Set();
147
+ const detectCycle = (stepId, path)=>{
148
+ if (inStack.has(stepId)) {
149
+ throw new _errors.InvalidFlowGraphError('CYCLE_DETECTED', `Cycle detected in job "${job.id}": ${[
150
+ ...path,
151
+ stepId
152
+ ].join(' -> ')}`, {
153
+ jobId: job.id,
154
+ path: [
155
+ ...path,
156
+ stepId
157
+ ]
158
+ });
159
+ }
160
+ if (visited.has(stepId)) return;
161
+ visited.add(stepId);
162
+ inStack.add(stepId);
163
+ for (const t of job.transitions){
164
+ if (t.fromStepId === stepId && t.toStepId !== null) {
165
+ detectCycle(t.toStepId, [
166
+ ...path,
167
+ stepId
168
+ ]);
169
+ }
170
+ }
171
+ inStack.delete(stepId);
172
+ };
173
+ detectCycle(job.startStepId, []);
174
+ }
175
+ };
176
+
177
+ //# sourceMappingURL=definition-validator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/core/validation/definition-validator.ts"],"sourcesContent":["import {\n JobDefinition,\n TransitionDefinition,\n StepDefinition,\n} from '../ir';\nimport { InvalidFlowGraphError } from '../errors';\nimport { validatePartitions } from '../../partition-helpers';\n\n/**\n * Pure validation for a fully-built `JobDefinition` IR.\n *\n * Does not perform any execution, scheduling, or Nest wiring. After the\n * Builder/Compiler/Decorator API has assembled a `JobDefinition`, the\n * `DefinitionValidator` answers one question: \"is this graph structurally\n * sound?\" — by enforcing the invariants that the runtime executor relies on.\n *\n * Invariants enforced (in order):\n *\n * 1. EMPTY_JOB — the job has at least one step.\n * 2. NO_START_STEP — `startStepId` references an existing step.\n * 3. INVALID_CHUNK_SIZE — every `chunk` step has `chunkSize > 0`.\n * 4. MISSING_TARGET — every transition's `from`/`to` references a\n * step that exists (or `toStepId === null` for END).\n * 5. UNREACHABLE_STEP — every step is reachable from `startStepId`\n * via transitions (BFS).\n * 6. CYCLE_DETECTED — the transition graph has no cycles (DFS with\n * recursion stack tracking).\n *\n * The order matters: cheap, local checks run first so a malformed job\n * fails fast before we walk the whole graph.\n *\n * Per ORACLE verdict 1b: \"all transitions target existing steps, one start\n * step, no accidental cycles, terminal statuses are handled\".\n */\nexport class DefinitionValidator {\n /**\n * Validates a complete `JobDefinition`. Throws `InvalidFlowGraphError`\n * on the first violation found, with a stable `code` (see class doc).\n */\n validate(job: JobDefinition): void {\n const stepIds = Object.keys(job.steps);\n\n // 1. At least one step.\n if (stepIds.length === 0) {\n throw new InvalidFlowGraphError(\n 'EMPTY_JOB',\n `Job \"${job.id}\" has no steps`,\n { jobId: job.id },\n );\n }\n\n // 2. startStepId must reference an existing step.\n if (!(job.startStepId in job.steps)) {\n throw new InvalidFlowGraphError(\n 'NO_START_STEP',\n `Job \"${job.id}\" startStepId \"${job.startStepId}\" is not in steps`,\n { jobId: job.id, startStepId: job.startStepId },\n );\n }\n\n // 3. Per-step invariants.\n for (const stepId of stepIds) {\n const step: StepDefinition = job.steps[stepId]!;\n if (step.kind === 'chunk' && step.chunkSize <= 0) {\n throw new InvalidFlowGraphError(\n 'INVALID_CHUNK_SIZE',\n `Step \"${stepId}\" has invalid chunkSize ${step.chunkSize}`,\n { jobId: job.id, stepId, chunkSize: step.chunkSize },\n );\n }\n if (step.kind === 'chunk' && step.partitions !== undefined) {\n // Delegate the partition-config validation to the pure helper\n // so the rule lives in exactly one place (the\n // `partition-helpers` module). The validator's job is to\n // surface the failure with the IR-shaped context; the\n // helper's job is to decide whether the config is valid.\n try {\n validatePartitions(step.partitions);\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n throw new InvalidFlowGraphError(\n 'INVALID_PARTITIONS',\n `Step \"${stepId}\" has invalid partitions: ${message}`,\n { jobId: job.id, stepId, partitions: step.partitions },\n );\n }\n }\n }\n\n // 4. Every transition's endpoints must exist.\n for (const t of job.transitions) {\n if (!(t.fromStepId in job.steps)) {\n throw new InvalidFlowGraphError(\n 'MISSING_TARGET',\n `Transition fromStepId \"${t.fromStepId}\" not found in steps`,\n { jobId: job.id, fromStepId: t.fromStepId },\n );\n }\n if (t.toStepId !== null && !(t.toStepId in job.steps)) {\n throw new InvalidFlowGraphError(\n 'MISSING_TARGET',\n `Transition toStepId \"${t.toStepId}\" not found in steps`,\n { jobId: job.id, toStepId: t.toStepId },\n );\n }\n }\n\n const deciderStepIds = new Set<string>();\n for (const d of job.deciders ?? []) {\n if (!(d.afterStepId in job.steps)) {\n throw new InvalidFlowGraphError(\n 'MISSING_TARGET',\n `Decider afterStepId \"${d.afterStepId}\" not found in steps`,\n { jobId: job.id, afterStepId: d.afterStepId },\n );\n }\n if (deciderStepIds.has(d.afterStepId)) {\n throw new InvalidFlowGraphError(\n 'DUPLICATE_DECIDER',\n `Step \"${d.afterStepId}\" has multiple deciders`,\n { jobId: job.id, afterStepId: d.afterStepId },\n );\n }\n deciderStepIds.add(d.afterStepId);\n }\n\n // 5. No unreachable steps (BFS from startStepId).\n const reachable = this.collectReachable(job);\n\n for (const stepId of stepIds) {\n if (!reachable.has(stepId)) {\n throw new InvalidFlowGraphError(\n 'UNREACHABLE_STEP',\n `Step \"${stepId}\" is unreachable from startStepId \"${job.startStepId}\"`,\n { jobId: job.id, stepId, startStepId: job.startStepId },\n );\n }\n }\n\n // 6. No cycles (DFS with stack tracking).\n this.assertAcyclic(job);\n }\n\n /**\n * Lightweight, partial validation used by `FlowEvaluator` and the\n * `Builder` API when only a subset of steps/transitions is in scope.\n *\n * Mirrors rule 4 of `validate()` (transition endpoints must exist) but\n * does NOT enforce reachability, cycles, or the start step — those\n * require the full `JobDefinition` graph.\n */\n validateTransition(\n transitions: TransitionDefinition[],\n availableSteps: Record<string, StepDefinition>,\n ): void {\n for (const t of transitions) {\n if (!(t.fromStepId in availableSteps)) {\n throw new InvalidFlowGraphError(\n 'MISSING_TARGET',\n `Transition fromStepId \"${t.fromStepId}\" not in steps`,\n { fromStepId: t.fromStepId },\n );\n }\n if (t.toStepId !== null && !(t.toStepId in availableSteps)) {\n throw new InvalidFlowGraphError(\n 'MISSING_TARGET',\n `Transition toStepId \"${t.toStepId}\" not in steps`,\n { toStepId: t.toStepId },\n );\n }\n }\n }\n\n // --- private helpers --------------------------------------------------\n\n private collectReachable(job: JobDefinition): Set<string> {\n const reachable = new Set<string>();\n const queue: string[] = [job.startStepId];\n while (queue.length > 0) {\n const cur = queue.shift()!;\n if (reachable.has(cur)) continue;\n reachable.add(cur);\n for (const t of job.transitions) {\n if (t.fromStepId === cur && t.toStepId !== null && !reachable.has(t.toStepId)) {\n queue.push(t.toStepId);\n }\n }\n }\n return reachable;\n }\n\n private assertAcyclic(job: JobDefinition): void {\n const visited = new Set<string>();\n const inStack = new Set<string>();\n const detectCycle = (stepId: string, path: readonly string[]): void => {\n if (inStack.has(stepId)) {\n throw new InvalidFlowGraphError(\n 'CYCLE_DETECTED',\n `Cycle detected in job \"${job.id}\": ${[...path, stepId].join(' -> ')}`,\n { jobId: job.id, path: [...path, stepId] },\n );\n }\n if (visited.has(stepId)) return;\n visited.add(stepId);\n inStack.add(stepId);\n for (const t of job.transitions) {\n if (t.fromStepId === stepId && t.toStepId !== null) {\n detectCycle(t.toStepId, [...path, stepId]);\n }\n }\n inStack.delete(stepId);\n };\n detectCycle(job.startStepId, []);\n }\n}\n"],"names":["DefinitionValidator","validate","job","stepIds","Object","keys","steps","length","InvalidFlowGraphError","id","jobId","startStepId","stepId","step","kind","chunkSize","partitions","undefined","validatePartitions","err","message","Error","String","t","transitions","fromStepId","toStepId","deciderStepIds","Set","d","deciders","afterStepId","has","add","reachable","collectReachable","assertAcyclic","validateTransition","availableSteps","queue","cur","shift","push","visited","inStack","detectCycle","path","join","delete"],"mappings":";;;;+BAkCaA;;;eAAAA;;;wBA7ByB;kCACH;AA4B5B,IAAA,AAAMA,sBAAN,MAAMA;IACX;;;GAGC,GACDC,SAASC,GAAkB,EAAQ;QACjC,MAAMC,UAAUC,OAAOC,IAAI,CAACH,IAAII,KAAK;QAErC,wBAAwB;QACxB,IAAIH,QAAQI,MAAM,KAAK,GAAG;YACxB,MAAM,IAAIC,6BAAqB,CAC7B,aACA,CAAC,KAAK,EAAEN,IAAIO,EAAE,CAAC,cAAc,CAAC,EAC9B;gBAAEC,OAAOR,IAAIO,EAAE;YAAC;QAEpB;QAEA,kDAAkD;QAClD,IAAI,CAAEP,CAAAA,IAAIS,WAAW,IAAIT,IAAII,KAAK,AAAD,GAAI;YACnC,MAAM,IAAIE,6BAAqB,CAC7B,iBACA,CAAC,KAAK,EAAEN,IAAIO,EAAE,CAAC,eAAe,EAAEP,IAAIS,WAAW,CAAC,iBAAiB,CAAC,EAClE;gBAAED,OAAOR,IAAIO,EAAE;gBAAEE,aAAaT,IAAIS,WAAW;YAAC;QAElD;QAEA,0BAA0B;QAC1B,KAAK,MAAMC,UAAUT,QAAS;YAC5B,MAAMU,OAAuBX,IAAII,KAAK,CAACM,OAAO;YAC9C,IAAIC,KAAKC,IAAI,KAAK,WAAWD,KAAKE,SAAS,IAAI,GAAG;gBAChD,MAAM,IAAIP,6BAAqB,CAC7B,sBACA,CAAC,MAAM,EAAEI,OAAO,wBAAwB,EAAEC,KAAKE,SAAS,EAAE,EAC1D;oBAAEL,OAAOR,IAAIO,EAAE;oBAAEG;oBAAQG,WAAWF,KAAKE,SAAS;gBAAC;YAEvD;YACA,IAAIF,KAAKC,IAAI,KAAK,WAAWD,KAAKG,UAAU,KAAKC,WAAW;gBAC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AAM;oBAClDmB,YAAYtB,EAAEG,QAAQ,EAAE;2BAAIoB;wBAAMlC;qBAAO;gBAC3C;YACF;YACAgC,QAAQI,MAAM,CAACpC;QACjB;QACAiC,YAAY3C,IAAIS,WAAW,EAAE,EAAE;IACjC;AACF"}
@@ -0,0 +1,2 @@
1
+ export * from './definition-validator';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/validation/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ _export_star(require("./definition-validator"), exports);
6
+ function _export_star(from, to) {
7
+ Object.keys(from).forEach(function(k) {
8
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
9
+ Object.defineProperty(to, k, {
10
+ enumerable: true,
11
+ get: function() {
12
+ return from[k];
13
+ }
14
+ });
15
+ }
16
+ });
17
+ return from;
18
+ }
19
+
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/core/validation/index.ts"],"sourcesContent":["export * from './definition-validator';\n"],"names":[],"mappings":";;;;qBAAc"}
@@ -0,0 +1,10 @@
1
+ export declare const BATCH_JOB_METADATA = "nest-batch:job";
2
+ export declare const BATCH_STEP_METADATA = "nest-batch:step";
3
+ export declare const BATCH_TASKLET_METADATA = "nest-batch:tasklet";
4
+ export declare const BATCH_ITEM_READER_METADATA = "nest-batch:item-reader";
5
+ export declare const BATCH_ITEM_PROCESSOR_METADATA = "nest-batch:item-processor";
6
+ export declare const BATCH_ITEM_WRITER_METADATA = "nest-batch:item-writer";
7
+ export declare const BATCH_LISTENER_METADATA = "nest-batch:listener";
8
+ export declare const BATCH_TRANSITION_METADATA = "nest-batch:transition";
9
+ export declare const BATCH_SCHEDULED_OPTIONS = "nest-batch:scheduled";
10
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/decorators/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,mBAAmB,CAAC;AACnD,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AACrD,eAAO,MAAM,sBAAsB,uBAAuB,CAAC;AAC3D,eAAO,MAAM,0BAA0B,2BAA2B,CAAC;AACnE,eAAO,MAAM,6BAA6B,8BAA8B,CAAC;AACzE,eAAO,MAAM,0BAA0B,2BAA2B,CAAC;AACnE,eAAO,MAAM,uBAAuB,wBAAwB,CAAC;AAC7D,eAAO,MAAM,yBAAyB,0BAA0B,CAAC;AACjE,eAAO,MAAM,uBAAuB,yBAAyB,CAAC"}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
+ });
10
+ }
11
+ _export(exports, {
12
+ get BATCH_ITEM_PROCESSOR_METADATA () {
13
+ return BATCH_ITEM_PROCESSOR_METADATA;
14
+ },
15
+ get BATCH_ITEM_READER_METADATA () {
16
+ return BATCH_ITEM_READER_METADATA;
17
+ },
18
+ get BATCH_ITEM_WRITER_METADATA () {
19
+ return BATCH_ITEM_WRITER_METADATA;
20
+ },
21
+ get BATCH_JOB_METADATA () {
22
+ return BATCH_JOB_METADATA;
23
+ },
24
+ get BATCH_LISTENER_METADATA () {
25
+ return BATCH_LISTENER_METADATA;
26
+ },
27
+ get BATCH_SCHEDULED_OPTIONS () {
28
+ return BATCH_SCHEDULED_OPTIONS;
29
+ },
30
+ get BATCH_STEP_METADATA () {
31
+ return BATCH_STEP_METADATA;
32
+ },
33
+ get BATCH_TASKLET_METADATA () {
34
+ return BATCH_TASKLET_METADATA;
35
+ },
36
+ get BATCH_TRANSITION_METADATA () {
37
+ return BATCH_TRANSITION_METADATA;
38
+ }
39
+ });
40
+ const BATCH_JOB_METADATA = 'nest-batch:job';
41
+ const BATCH_STEP_METADATA = 'nest-batch:step';
42
+ const BATCH_TASKLET_METADATA = 'nest-batch:tasklet';
43
+ const BATCH_ITEM_READER_METADATA = 'nest-batch:item-reader';
44
+ const BATCH_ITEM_PROCESSOR_METADATA = 'nest-batch:item-processor';
45
+ const BATCH_ITEM_WRITER_METADATA = 'nest-batch:item-writer';
46
+ const BATCH_LISTENER_METADATA = 'nest-batch:listener';
47
+ const BATCH_TRANSITION_METADATA = 'nest-batch:transition';
48
+ const BATCH_SCHEDULED_OPTIONS = 'nest-batch:scheduled';
49
+
50
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/decorators/constants.ts"],"sourcesContent":["export const BATCH_JOB_METADATA = 'nest-batch:job';\nexport const BATCH_STEP_METADATA = 'nest-batch:step';\nexport const BATCH_TASKLET_METADATA = 'nest-batch:tasklet';\nexport const BATCH_ITEM_READER_METADATA = 'nest-batch:item-reader';\nexport const BATCH_ITEM_PROCESSOR_METADATA = 'nest-batch:item-processor';\nexport const BATCH_ITEM_WRITER_METADATA = 'nest-batch:item-writer';\nexport const BATCH_LISTENER_METADATA = 'nest-batch:listener';\nexport const BATCH_TRANSITION_METADATA = 'nest-batch:transition';\nexport const BATCH_SCHEDULED_OPTIONS = 'nest-batch:scheduled';\n"],"names":["BATCH_ITEM_PROCESSOR_METADATA","BATCH_ITEM_READER_METADATA","BATCH_ITEM_WRITER_METADATA","BATCH_JOB_METADATA","BATCH_LISTENER_METADATA","BATCH_SCHEDULED_OPTIONS","BATCH_STEP_METADATA","BATCH_TASKLET_METADATA","BATCH_TRANSITION_METADATA"],"mappings":";;;;;;;;;;;QAIaA;eAAAA;;QADAC;eAAAA;;QAEAC;eAAAA;;QALAC;eAAAA;;QAMAC;eAAAA;;QAEAC;eAAAA;;QAPAC;eAAAA;;QACAC;eAAAA;;QAKAC;eAAAA;;;AAPN,MAAML,qBAAqB;AAC3B,MAAMG,sBAAsB;AAC5B,MAAMC,yBAAyB;AAC/B,MAAMN,6BAA6B;AACnC,MAAMD,gCAAgC;AACtC,MAAME,6BAA6B;AACnC,MAAME,0BAA0B;AAChC,MAAMI,4BAA4B;AAClC,MAAMH,0BAA0B"}