@tachybase/plugin-print-template 0.23.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (759) hide show
  1. package/.turbo/turbo-build.log +14 -0
  2. package/README.md +1 -0
  3. package/client.d.ts +2 -0
  4. package/client.js +1 -0
  5. package/dist/client/index.d.ts +7 -0
  6. package/dist/client/index.js +1 -0
  7. package/dist/externalVersion.js +7 -0
  8. package/dist/index.d.ts +2 -0
  9. package/dist/index.js +39 -0
  10. package/dist/node_modules/bullmq/LICENSE +21 -0
  11. package/dist/node_modules/bullmq/dist/cjs/classes/async-fifo-queue.js +129 -0
  12. package/dist/node_modules/bullmq/dist/cjs/classes/backoffs.js +48 -0
  13. package/dist/node_modules/bullmq/dist/cjs/classes/child-pool.js +71 -0
  14. package/dist/node_modules/bullmq/dist/cjs/classes/child-processor.js +154 -0
  15. package/dist/node_modules/bullmq/dist/cjs/classes/child.js +210 -0
  16. package/dist/node_modules/bullmq/dist/cjs/classes/errors/delayed-error.js +20 -0
  17. package/dist/node_modules/bullmq/dist/cjs/classes/errors/index.js +8 -0
  18. package/dist/node_modules/bullmq/dist/cjs/classes/errors/rate-limit-error.js +19 -0
  19. package/dist/node_modules/bullmq/dist/cjs/classes/errors/unrecoverable-error.js +20 -0
  20. package/dist/node_modules/bullmq/dist/cjs/classes/errors/waiting-children-error.js +20 -0
  21. package/dist/node_modules/bullmq/dist/cjs/classes/flow-producer.js +339 -0
  22. package/dist/node_modules/bullmq/dist/cjs/classes/index.js +25 -0
  23. package/dist/node_modules/bullmq/dist/cjs/classes/job-scheduler.js +221 -0
  24. package/dist/node_modules/bullmq/dist/cjs/classes/job.js +893 -0
  25. package/dist/node_modules/bullmq/dist/cjs/classes/main-base.js +44 -0
  26. package/dist/node_modules/bullmq/dist/cjs/classes/main-worker.d.ts +1 -0
  27. package/dist/node_modules/bullmq/dist/cjs/classes/main-worker.js +10 -0
  28. package/dist/node_modules/bullmq/dist/cjs/classes/main.d.ts +1 -0
  29. package/dist/node_modules/bullmq/dist/cjs/classes/main.js +10 -0
  30. package/dist/node_modules/bullmq/dist/cjs/classes/queue-base.js +155 -0
  31. package/dist/node_modules/bullmq/dist/cjs/classes/queue-events-producer.js +42 -0
  32. package/dist/node_modules/bullmq/dist/cjs/classes/queue-events.js +125 -0
  33. package/dist/node_modules/bullmq/dist/cjs/classes/queue-getters.js +450 -0
  34. package/dist/node_modules/bullmq/dist/cjs/classes/queue-keys.js +43 -0
  35. package/dist/node_modules/bullmq/dist/cjs/classes/queue.js +635 -0
  36. package/dist/node_modules/bullmq/dist/cjs/classes/redis-connection.js +270 -0
  37. package/dist/node_modules/bullmq/dist/cjs/classes/repeat.js +204 -0
  38. package/dist/node_modules/bullmq/dist/cjs/classes/sandbox.js +75 -0
  39. package/dist/node_modules/bullmq/dist/cjs/classes/scripts.js +1035 -0
  40. package/dist/node_modules/bullmq/dist/cjs/classes/worker.js +819 -0
  41. package/dist/node_modules/bullmq/dist/cjs/commands/addDelayedJob-6.lua +119 -0
  42. package/dist/node_modules/bullmq/dist/cjs/commands/addJobScheduler-2.lua +91 -0
  43. package/dist/node_modules/bullmq/dist/cjs/commands/addLog-2.lua +30 -0
  44. package/dist/node_modules/bullmq/dist/cjs/commands/addParentJob-4.lua +104 -0
  45. package/dist/node_modules/bullmq/dist/cjs/commands/addPrioritizedJob-8.lua +117 -0
  46. package/dist/node_modules/bullmq/dist/cjs/commands/addRepeatableJob-2.lua +84 -0
  47. package/dist/node_modules/bullmq/dist/cjs/commands/addStandardJob-8.lua +122 -0
  48. package/dist/node_modules/bullmq/dist/cjs/commands/changeDelay-4.lua +55 -0
  49. package/dist/node_modules/bullmq/dist/cjs/commands/changePriority-7.lua +68 -0
  50. package/dist/node_modules/bullmq/dist/cjs/commands/cleanJobsInSet-3.lua +55 -0
  51. package/dist/node_modules/bullmq/dist/cjs/commands/drain-5.lua +41 -0
  52. package/dist/node_modules/bullmq/dist/cjs/commands/extendLock-2.lua +23 -0
  53. package/dist/node_modules/bullmq/dist/cjs/commands/extendLocks-1.lua +44 -0
  54. package/dist/node_modules/bullmq/dist/cjs/commands/getCounts-1.lua +36 -0
  55. package/dist/node_modules/bullmq/dist/cjs/commands/getCountsPerPriority-4.lua +35 -0
  56. package/dist/node_modules/bullmq/dist/cjs/commands/getJobScheduler-1.lua +19 -0
  57. package/dist/node_modules/bullmq/dist/cjs/commands/getRanges-1.lua +70 -0
  58. package/dist/node_modules/bullmq/dist/cjs/commands/getRateLimitTtl-1.lua +20 -0
  59. package/dist/node_modules/bullmq/dist/cjs/commands/getState-8.lua +65 -0
  60. package/dist/node_modules/bullmq/dist/cjs/commands/getStateV2-8.lua +58 -0
  61. package/dist/node_modules/bullmq/dist/cjs/commands/includes/addBaseMarkerIfNeeded.lua +9 -0
  62. package/dist/node_modules/bullmq/dist/cjs/commands/includes/addDelayMarkerIfNeeded.lua +15 -0
  63. package/dist/node_modules/bullmq/dist/cjs/commands/includes/addJobInTargetList.lua +11 -0
  64. package/dist/node_modules/bullmq/dist/cjs/commands/includes/addJobWithPriority.lua +14 -0
  65. package/dist/node_modules/bullmq/dist/cjs/commands/includes/batches.lua +18 -0
  66. package/dist/node_modules/bullmq/dist/cjs/commands/includes/checkItemInList.lua +12 -0
  67. package/dist/node_modules/bullmq/dist/cjs/commands/includes/cleanList.lua +47 -0
  68. package/dist/node_modules/bullmq/dist/cjs/commands/includes/cleanSet.lua +66 -0
  69. package/dist/node_modules/bullmq/dist/cjs/commands/includes/collectMetrics.lua +46 -0
  70. package/dist/node_modules/bullmq/dist/cjs/commands/includes/deduplicateJob.lua +24 -0
  71. package/dist/node_modules/bullmq/dist/cjs/commands/includes/destructureJobKey.lua +12 -0
  72. package/dist/node_modules/bullmq/dist/cjs/commands/includes/findPage.lua +70 -0
  73. package/dist/node_modules/bullmq/dist/cjs/commands/includes/getDelayedScore.lua +25 -0
  74. package/dist/node_modules/bullmq/dist/cjs/commands/includes/getJobsInZset.lua +13 -0
  75. package/dist/node_modules/bullmq/dist/cjs/commands/includes/getNextDelayedTimestamp.lua +12 -0
  76. package/dist/node_modules/bullmq/dist/cjs/commands/includes/getOrSetMaxEvents.lua +11 -0
  77. package/dist/node_modules/bullmq/dist/cjs/commands/includes/getRateLimitTTL.lua +17 -0
  78. package/dist/node_modules/bullmq/dist/cjs/commands/includes/getTargetQueueList.lua +22 -0
  79. package/dist/node_modules/bullmq/dist/cjs/commands/includes/getTimestamp.lua +19 -0
  80. package/dist/node_modules/bullmq/dist/cjs/commands/includes/getZSetItems.lua +7 -0
  81. package/dist/node_modules/bullmq/dist/cjs/commands/includes/handleDuplicatedJob.lua +26 -0
  82. package/dist/node_modules/bullmq/dist/cjs/commands/includes/isLocked.lua +33 -0
  83. package/dist/node_modules/bullmq/dist/cjs/commands/includes/isQueueMaxed.lua +15 -0
  84. package/dist/node_modules/bullmq/dist/cjs/commands/includes/isQueuePaused.lua +7 -0
  85. package/dist/node_modules/bullmq/dist/cjs/commands/includes/isQueuePausedOrMaxed.lua +18 -0
  86. package/dist/node_modules/bullmq/dist/cjs/commands/includes/moveJobFromPriorityToActive.lua +13 -0
  87. package/dist/node_modules/bullmq/dist/cjs/commands/includes/moveParentFromWaitingChildrenToFailed.lua +53 -0
  88. package/dist/node_modules/bullmq/dist/cjs/commands/includes/moveParentToWaitIfNeeded.lua +55 -0
  89. package/dist/node_modules/bullmq/dist/cjs/commands/includes/prepareJobForProcessing.lua +50 -0
  90. package/dist/node_modules/bullmq/dist/cjs/commands/includes/promoteDelayedJobs.lua +40 -0
  91. package/dist/node_modules/bullmq/dist/cjs/commands/includes/pushBackJobWithPriority.lua +9 -0
  92. package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeDeduplicationKey.lua +11 -0
  93. package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeDeduplicationKeyIfNeeded.lua +14 -0
  94. package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJob.lua +17 -0
  95. package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJobFromAnyState.lua +35 -0
  96. package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJobKeys.lua +8 -0
  97. package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJobs.lua +13 -0
  98. package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJobsByMaxAge.lua +16 -0
  99. package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJobsByMaxCount.lua +15 -0
  100. package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJobsOnFail.lua +36 -0
  101. package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeListJobs.lua +17 -0
  102. package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeLock.lua +19 -0
  103. package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeParentDependencyKey.lua +90 -0
  104. package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeZSetJobs.lua +27 -0
  105. package/dist/node_modules/bullmq/dist/cjs/commands/includes/storeJob.lua +36 -0
  106. package/dist/node_modules/bullmq/dist/cjs/commands/includes/trimEvents.lua +15 -0
  107. package/dist/node_modules/bullmq/dist/cjs/commands/includes/updateExistingJobsParent.lua +27 -0
  108. package/dist/node_modules/bullmq/dist/cjs/commands/includes/updateJobFields.lua +11 -0
  109. package/dist/node_modules/bullmq/dist/cjs/commands/includes/updateParentDepsIfNeeded.lua +13 -0
  110. package/dist/node_modules/bullmq/dist/cjs/commands/isFinished-3.lua +48 -0
  111. package/dist/node_modules/bullmq/dist/cjs/commands/isJobInList-1.lua +16 -0
  112. package/dist/node_modules/bullmq/dist/cjs/commands/isMaxed-2.lua +17 -0
  113. package/dist/node_modules/bullmq/dist/cjs/commands/moveJobFromActiveToWait-10.lua +60 -0
  114. package/dist/node_modules/bullmq/dist/cjs/commands/moveJobsToWait-8.lua +73 -0
  115. package/dist/node_modules/bullmq/dist/cjs/commands/moveStalledJobsToWait-9.lua +156 -0
  116. package/dist/node_modules/bullmq/dist/cjs/commands/moveToActive-11.lua +93 -0
  117. package/dist/node_modules/bullmq/dist/cjs/commands/moveToDelayed-8.lua +77 -0
  118. package/dist/node_modules/bullmq/dist/cjs/commands/moveToFinished-14.lua +283 -0
  119. package/dist/node_modules/bullmq/dist/cjs/commands/moveToWaitingChildren-5.lua +68 -0
  120. package/dist/node_modules/bullmq/dist/cjs/commands/obliterate-2.lua +118 -0
  121. package/dist/node_modules/bullmq/dist/cjs/commands/paginate-1.lua +49 -0
  122. package/dist/node_modules/bullmq/dist/cjs/commands/pause-7.lua +42 -0
  123. package/dist/node_modules/bullmq/dist/cjs/commands/promote-9.lua +62 -0
  124. package/dist/node_modules/bullmq/dist/cjs/commands/releaseLock-1.lua +19 -0
  125. package/dist/node_modules/bullmq/dist/cjs/commands/removeChildDependency-1.lua +34 -0
  126. package/dist/node_modules/bullmq/dist/cjs/commands/removeJob-2.lua +92 -0
  127. package/dist/node_modules/bullmq/dist/cjs/commands/removeJobScheduler-3.lua +43 -0
  128. package/dist/node_modules/bullmq/dist/cjs/commands/removeRepeatable-3.lua +58 -0
  129. package/dist/node_modules/bullmq/dist/cjs/commands/reprocessJob-8.lua +49 -0
  130. package/dist/node_modules/bullmq/dist/cjs/commands/retryJob-11.lua +82 -0
  131. package/dist/node_modules/bullmq/dist/cjs/commands/saveStacktrace-1.lua +19 -0
  132. package/dist/node_modules/bullmq/dist/cjs/commands/updateData-1.lua +20 -0
  133. package/dist/node_modules/bullmq/dist/cjs/commands/updateProgress-3.lua +33 -0
  134. package/dist/node_modules/bullmq/dist/cjs/commands/updateRepeatableJobMillis-1.lua +28 -0
  135. package/dist/node_modules/bullmq/dist/cjs/enums/child-command.js +10 -0
  136. package/dist/node_modules/bullmq/dist/cjs/enums/error-code.js +15 -0
  137. package/dist/node_modules/bullmq/dist/cjs/enums/index.js +9 -0
  138. package/dist/node_modules/bullmq/dist/cjs/enums/metrics-time.js +15 -0
  139. package/dist/node_modules/bullmq/dist/cjs/enums/parent-command.js +16 -0
  140. package/dist/node_modules/bullmq/dist/cjs/enums/telemetry-attributes.js +48 -0
  141. package/dist/node_modules/bullmq/dist/cjs/index.js +1 -0
  142. package/dist/node_modules/bullmq/dist/cjs/interfaces/advanced-options.js +3 -0
  143. package/dist/node_modules/bullmq/dist/cjs/interfaces/backoff-options.js +3 -0
  144. package/dist/node_modules/bullmq/dist/cjs/interfaces/base-job-options.js +3 -0
  145. package/dist/node_modules/bullmq/dist/cjs/interfaces/child-message.js +3 -0
  146. package/dist/node_modules/bullmq/dist/cjs/interfaces/connection.js +3 -0
  147. package/dist/node_modules/bullmq/dist/cjs/interfaces/debounce-options.js +3 -0
  148. package/dist/node_modules/bullmq/dist/cjs/interfaces/flow-job.js +3 -0
  149. package/dist/node_modules/bullmq/dist/cjs/interfaces/index.js +32 -0
  150. package/dist/node_modules/bullmq/dist/cjs/interfaces/ioredis-events.js +3 -0
  151. package/dist/node_modules/bullmq/dist/cjs/interfaces/job-json.js +3 -0
  152. package/dist/node_modules/bullmq/dist/cjs/interfaces/job-scheduler-json.js +3 -0
  153. package/dist/node_modules/bullmq/dist/cjs/interfaces/keep-jobs.js +3 -0
  154. package/dist/node_modules/bullmq/dist/cjs/interfaces/metrics-options.js +3 -0
  155. package/dist/node_modules/bullmq/dist/cjs/interfaces/metrics.js +3 -0
  156. package/dist/node_modules/bullmq/dist/cjs/interfaces/minimal-job.js +3 -0
  157. package/dist/node_modules/bullmq/dist/cjs/interfaces/parent-message.js +3 -0
  158. package/dist/node_modules/bullmq/dist/cjs/interfaces/parent.js +3 -0
  159. package/dist/node_modules/bullmq/dist/cjs/interfaces/queue-options.js +9 -0
  160. package/dist/node_modules/bullmq/dist/cjs/interfaces/rate-limiter-options.js +3 -0
  161. package/dist/node_modules/bullmq/dist/cjs/interfaces/redis-options.js +3 -0
  162. package/dist/node_modules/bullmq/dist/cjs/interfaces/redis-streams.js +3 -0
  163. package/dist/node_modules/bullmq/dist/cjs/interfaces/repeat-options.js +3 -0
  164. package/dist/node_modules/bullmq/dist/cjs/interfaces/repeatable-job.js +3 -0
  165. package/dist/node_modules/bullmq/dist/cjs/interfaces/repeatable-options.js +3 -0
  166. package/dist/node_modules/bullmq/dist/cjs/interfaces/sandboxed-job-processor.js +3 -0
  167. package/dist/node_modules/bullmq/dist/cjs/interfaces/sandboxed-job.js +3 -0
  168. package/dist/node_modules/bullmq/dist/cjs/interfaces/sandboxed-options.js +3 -0
  169. package/dist/node_modules/bullmq/dist/cjs/interfaces/telemetry.js +3 -0
  170. package/dist/node_modules/bullmq/dist/cjs/interfaces/worker-options.js +3 -0
  171. package/dist/node_modules/bullmq/dist/cjs/scripts/addDelayedJob-6.js +373 -0
  172. package/dist/node_modules/bullmq/dist/cjs/scripts/addJobScheduler-2.js +237 -0
  173. package/dist/node_modules/bullmq/dist/cjs/scripts/addLog-2.js +33 -0
  174. package/dist/node_modules/bullmq/dist/cjs/scripts/addParentJob-4.js +340 -0
  175. package/dist/node_modules/bullmq/dist/cjs/scripts/addPrioritizedJob-8.js +350 -0
  176. package/dist/node_modules/bullmq/dist/cjs/scripts/addRepeatableJob-2.js +230 -0
  177. package/dist/node_modules/bullmq/dist/cjs/scripts/addStandardJob-8.js +354 -0
  178. package/dist/node_modules/bullmq/dist/cjs/scripts/changeDelay-4.js +107 -0
  179. package/dist/node_modules/bullmq/dist/cjs/scripts/changePriority-7.js +122 -0
  180. package/dist/node_modules/bullmq/dist/cjs/scripts/cleanJobsInSet-3.js +350 -0
  181. package/dist/node_modules/bullmq/dist/cjs/scripts/drain-5.js +258 -0
  182. package/dist/node_modules/bullmq/dist/cjs/scripts/extendLock-2.js +30 -0
  183. package/dist/node_modules/bullmq/dist/cjs/scripts/extendLocks-1.js +46 -0
  184. package/dist/node_modules/bullmq/dist/cjs/scripts/getCounts-1.js +42 -0
  185. package/dist/node_modules/bullmq/dist/cjs/scripts/getCountsPerPriority-4.js +46 -0
  186. package/dist/node_modules/bullmq/dist/cjs/scripts/getJobScheduler-1.js +23 -0
  187. package/dist/node_modules/bullmq/dist/cjs/scripts/getRanges-1.js +73 -0
  188. package/dist/node_modules/bullmq/dist/cjs/scripts/getRateLimitTtl-1.js +39 -0
  189. package/dist/node_modules/bullmq/dist/cjs/scripts/getState-8.js +73 -0
  190. package/dist/node_modules/bullmq/dist/cjs/scripts/getStateV2-8.js +57 -0
  191. package/dist/node_modules/bullmq/dist/cjs/scripts/index.js +49 -0
  192. package/dist/node_modules/bullmq/dist/cjs/scripts/isFinished-3.js +49 -0
  193. package/dist/node_modules/bullmq/dist/cjs/scripts/isJobInList-1.js +32 -0
  194. package/dist/node_modules/bullmq/dist/cjs/scripts/isMaxed-2.js +34 -0
  195. package/dist/node_modules/bullmq/dist/cjs/scripts/moveJobFromActiveToWait-10.js +110 -0
  196. package/dist/node_modules/bullmq/dist/cjs/scripts/moveJobsToWait-8.js +118 -0
  197. package/dist/node_modules/bullmq/dist/cjs/scripts/moveStalledJobsToWait-9.js +529 -0
  198. package/dist/node_modules/bullmq/dist/cjs/scripts/moveToActive-11.js +233 -0
  199. package/dist/node_modules/bullmq/dist/cjs/scripts/moveToDelayed-8.js +156 -0
  200. package/dist/node_modules/bullmq/dist/cjs/scripts/moveToFinished-14.js +798 -0
  201. package/dist/node_modules/bullmq/dist/cjs/scripts/moveToWaitingChildren-5.js +83 -0
  202. package/dist/node_modules/bullmq/dist/cjs/scripts/obliterate-2.js +327 -0
  203. package/dist/node_modules/bullmq/dist/cjs/scripts/paginate-1.js +110 -0
  204. package/dist/node_modules/bullmq/dist/cjs/scripts/pause-7.js +67 -0
  205. package/dist/node_modules/bullmq/dist/cjs/scripts/promote-9.js +105 -0
  206. package/dist/node_modules/bullmq/dist/cjs/scripts/releaseLock-1.js +25 -0
  207. package/dist/node_modules/bullmq/dist/cjs/scripts/removeChildDependency-1.js +165 -0
  208. package/dist/node_modules/bullmq/dist/cjs/scripts/removeJob-2.js +292 -0
  209. package/dist/node_modules/bullmq/dist/cjs/scripts/removeJobScheduler-3.js +49 -0
  210. package/dist/node_modules/bullmq/dist/cjs/scripts/removeRepeatable-3.js +63 -0
  211. package/dist/node_modules/bullmq/dist/cjs/scripts/reprocessJob-8.js +96 -0
  212. package/dist/node_modules/bullmq/dist/cjs/scripts/retryJob-11.js +193 -0
  213. package/dist/node_modules/bullmq/dist/cjs/scripts/saveStacktrace-1.js +27 -0
  214. package/dist/node_modules/bullmq/dist/cjs/scripts/updateData-1.js +26 -0
  215. package/dist/node_modules/bullmq/dist/cjs/scripts/updateProgress-3.js +46 -0
  216. package/dist/node_modules/bullmq/dist/cjs/scripts/updateRepeatableJobMillis-1.js +33 -0
  217. package/dist/node_modules/bullmq/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -0
  218. package/dist/node_modules/bullmq/dist/cjs/types/backoff-strategy.js +3 -0
  219. package/dist/node_modules/bullmq/dist/cjs/types/finished-status.js +3 -0
  220. package/dist/node_modules/bullmq/dist/cjs/types/index.js +12 -0
  221. package/dist/node_modules/bullmq/dist/cjs/types/job-json-sandbox.js +3 -0
  222. package/dist/node_modules/bullmq/dist/cjs/types/job-options.js +3 -0
  223. package/dist/node_modules/bullmq/dist/cjs/types/job-scheduler-template-options.js +3 -0
  224. package/dist/node_modules/bullmq/dist/cjs/types/job-type.js +3 -0
  225. package/dist/node_modules/bullmq/dist/cjs/types/minimal-queue.js +3 -0
  226. package/dist/node_modules/bullmq/dist/cjs/types/repeat-strategy.js +3 -0
  227. package/dist/node_modules/bullmq/dist/cjs/utils.js +288 -0
  228. package/dist/node_modules/bullmq/dist/cjs/version.js +5 -0
  229. package/dist/node_modules/bullmq/dist/esm/classes/async-fifo-queue.d.ts +37 -0
  230. package/dist/node_modules/bullmq/dist/esm/classes/async-fifo-queue.js +125 -0
  231. package/dist/node_modules/bullmq/dist/esm/classes/backoffs.d.ts +10 -0
  232. package/dist/node_modules/bullmq/dist/esm/classes/backoffs.js +44 -0
  233. package/dist/node_modules/bullmq/dist/esm/classes/child-pool.d.ts +23 -0
  234. package/dist/node_modules/bullmq/dist/esm/classes/child-pool.js +67 -0
  235. package/dist/node_modules/bullmq/dist/esm/classes/child-processor.d.ts +37 -0
  236. package/dist/node_modules/bullmq/dist/esm/classes/child-processor.js +150 -0
  237. package/dist/node_modules/bullmq/dist/esm/classes/child.d.ts +35 -0
  238. package/dist/node_modules/bullmq/dist/esm/classes/child.js +206 -0
  239. package/dist/node_modules/bullmq/dist/esm/classes/errors/delayed-error.d.ts +11 -0
  240. package/dist/node_modules/bullmq/dist/esm/classes/errors/delayed-error.js +16 -0
  241. package/dist/node_modules/bullmq/dist/esm/classes/errors/index.d.ts +4 -0
  242. package/dist/node_modules/bullmq/dist/esm/classes/errors/index.js +5 -0
  243. package/dist/node_modules/bullmq/dist/esm/classes/errors/rate-limit-error.d.ts +10 -0
  244. package/dist/node_modules/bullmq/dist/esm/classes/errors/rate-limit-error.js +15 -0
  245. package/dist/node_modules/bullmq/dist/esm/classes/errors/unrecoverable-error.d.ts +11 -0
  246. package/dist/node_modules/bullmq/dist/esm/classes/errors/unrecoverable-error.js +16 -0
  247. package/dist/node_modules/bullmq/dist/esm/classes/errors/waiting-children-error.d.ts +11 -0
  248. package/dist/node_modules/bullmq/dist/esm/classes/errors/waiting-children-error.js +16 -0
  249. package/dist/node_modules/bullmq/dist/esm/classes/flow-producer.d.ts +179 -0
  250. package/dist/node_modules/bullmq/dist/esm/classes/flow-producer.js +335 -0
  251. package/dist/node_modules/bullmq/dist/esm/classes/index.d.ts +19 -0
  252. package/dist/node_modules/bullmq/dist/esm/classes/index.js +22 -0
  253. package/dist/node_modules/bullmq/dist/esm/classes/job-scheduler.d.ts +24 -0
  254. package/dist/node_modules/bullmq/dist/esm/classes/job-scheduler.js +216 -0
  255. package/dist/node_modules/bullmq/dist/esm/classes/job.d.ts +425 -0
  256. package/dist/node_modules/bullmq/dist/esm/classes/job.js +889 -0
  257. package/dist/node_modules/bullmq/dist/esm/classes/main-base.d.ts +4 -0
  258. package/dist/node_modules/bullmq/dist/esm/classes/main-base.js +42 -0
  259. package/dist/node_modules/bullmq/dist/esm/classes/main-worker.d.ts +1 -0
  260. package/dist/node_modules/bullmq/dist/esm/classes/main-worker.js +8 -0
  261. package/dist/node_modules/bullmq/dist/esm/classes/main.d.ts +1 -0
  262. package/dist/node_modules/bullmq/dist/esm/classes/main.js +8 -0
  263. package/dist/node_modules/bullmq/dist/esm/classes/queue-base.d.ts +83 -0
  264. package/dist/node_modules/bullmq/dist/esm/classes/queue-base.js +151 -0
  265. package/dist/node_modules/bullmq/dist/esm/classes/queue-events-producer.d.ts +21 -0
  266. package/dist/node_modules/bullmq/dist/esm/classes/queue-events-producer.js +38 -0
  267. package/dist/node_modules/bullmq/dist/esm/classes/queue-events.d.ts +201 -0
  268. package/dist/node_modules/bullmq/dist/esm/classes/queue-events.js +121 -0
  269. package/dist/node_modules/bullmq/dist/esm/classes/queue-getters.d.ts +235 -0
  270. package/dist/node_modules/bullmq/dist/esm/classes/queue-getters.js +447 -0
  271. package/dist/node_modules/bullmq/dist/esm/classes/queue-keys.d.ts +10 -0
  272. package/dist/node_modules/bullmq/dist/esm/classes/queue-keys.js +39 -0
  273. package/dist/node_modules/bullmq/dist/esm/classes/queue.d.ts +406 -0
  274. package/dist/node_modules/bullmq/dist/esm/classes/queue.js +631 -0
  275. package/dist/node_modules/bullmq/dist/esm/classes/redis-connection.d.ts +46 -0
  276. package/dist/node_modules/bullmq/dist/esm/classes/redis-connection.js +266 -0
  277. package/dist/node_modules/bullmq/dist/esm/classes/repeat.d.ts +25 -0
  278. package/dist/node_modules/bullmq/dist/esm/classes/repeat.js +199 -0
  279. package/dist/node_modules/bullmq/dist/esm/classes/sandbox.d.ts +4 -0
  280. package/dist/node_modules/bullmq/dist/esm/classes/sandbox.js +73 -0
  281. package/dist/node_modules/bullmq/dist/esm/classes/scripts.d.ts +160 -0
  282. package/dist/node_modules/bullmq/dist/esm/classes/scripts.js +1031 -0
  283. package/dist/node_modules/bullmq/dist/esm/classes/worker.d.ts +231 -0
  284. package/dist/node_modules/bullmq/dist/esm/classes/worker.js +815 -0
  285. package/dist/node_modules/bullmq/dist/esm/commands/addDelayedJob-6.lua +119 -0
  286. package/dist/node_modules/bullmq/dist/esm/commands/addJobScheduler-2.lua +91 -0
  287. package/dist/node_modules/bullmq/dist/esm/commands/addLog-2.lua +30 -0
  288. package/dist/node_modules/bullmq/dist/esm/commands/addParentJob-4.lua +104 -0
  289. package/dist/node_modules/bullmq/dist/esm/commands/addPrioritizedJob-8.lua +117 -0
  290. package/dist/node_modules/bullmq/dist/esm/commands/addRepeatableJob-2.lua +84 -0
  291. package/dist/node_modules/bullmq/dist/esm/commands/addStandardJob-8.lua +122 -0
  292. package/dist/node_modules/bullmq/dist/esm/commands/changeDelay-4.lua +55 -0
  293. package/dist/node_modules/bullmq/dist/esm/commands/changePriority-7.lua +68 -0
  294. package/dist/node_modules/bullmq/dist/esm/commands/cleanJobsInSet-3.lua +55 -0
  295. package/dist/node_modules/bullmq/dist/esm/commands/drain-5.lua +41 -0
  296. package/dist/node_modules/bullmq/dist/esm/commands/extendLock-2.lua +23 -0
  297. package/dist/node_modules/bullmq/dist/esm/commands/extendLocks-1.lua +44 -0
  298. package/dist/node_modules/bullmq/dist/esm/commands/getCounts-1.lua +36 -0
  299. package/dist/node_modules/bullmq/dist/esm/commands/getCountsPerPriority-4.lua +35 -0
  300. package/dist/node_modules/bullmq/dist/esm/commands/getJobScheduler-1.lua +19 -0
  301. package/dist/node_modules/bullmq/dist/esm/commands/getRanges-1.lua +70 -0
  302. package/dist/node_modules/bullmq/dist/esm/commands/getRateLimitTtl-1.lua +20 -0
  303. package/dist/node_modules/bullmq/dist/esm/commands/getState-8.lua +65 -0
  304. package/dist/node_modules/bullmq/dist/esm/commands/getStateV2-8.lua +58 -0
  305. package/dist/node_modules/bullmq/dist/esm/commands/includes/addBaseMarkerIfNeeded.lua +9 -0
  306. package/dist/node_modules/bullmq/dist/esm/commands/includes/addDelayMarkerIfNeeded.lua +15 -0
  307. package/dist/node_modules/bullmq/dist/esm/commands/includes/addJobInTargetList.lua +11 -0
  308. package/dist/node_modules/bullmq/dist/esm/commands/includes/addJobWithPriority.lua +14 -0
  309. package/dist/node_modules/bullmq/dist/esm/commands/includes/batches.lua +18 -0
  310. package/dist/node_modules/bullmq/dist/esm/commands/includes/checkItemInList.lua +12 -0
  311. package/dist/node_modules/bullmq/dist/esm/commands/includes/cleanList.lua +47 -0
  312. package/dist/node_modules/bullmq/dist/esm/commands/includes/cleanSet.lua +66 -0
  313. package/dist/node_modules/bullmq/dist/esm/commands/includes/collectMetrics.lua +46 -0
  314. package/dist/node_modules/bullmq/dist/esm/commands/includes/deduplicateJob.lua +24 -0
  315. package/dist/node_modules/bullmq/dist/esm/commands/includes/destructureJobKey.lua +12 -0
  316. package/dist/node_modules/bullmq/dist/esm/commands/includes/findPage.lua +70 -0
  317. package/dist/node_modules/bullmq/dist/esm/commands/includes/getDelayedScore.lua +25 -0
  318. package/dist/node_modules/bullmq/dist/esm/commands/includes/getJobsInZset.lua +13 -0
  319. package/dist/node_modules/bullmq/dist/esm/commands/includes/getNextDelayedTimestamp.lua +12 -0
  320. package/dist/node_modules/bullmq/dist/esm/commands/includes/getOrSetMaxEvents.lua +11 -0
  321. package/dist/node_modules/bullmq/dist/esm/commands/includes/getRateLimitTTL.lua +17 -0
  322. package/dist/node_modules/bullmq/dist/esm/commands/includes/getTargetQueueList.lua +22 -0
  323. package/dist/node_modules/bullmq/dist/esm/commands/includes/getTimestamp.lua +19 -0
  324. package/dist/node_modules/bullmq/dist/esm/commands/includes/getZSetItems.lua +7 -0
  325. package/dist/node_modules/bullmq/dist/esm/commands/includes/handleDuplicatedJob.lua +26 -0
  326. package/dist/node_modules/bullmq/dist/esm/commands/includes/isLocked.lua +33 -0
  327. package/dist/node_modules/bullmq/dist/esm/commands/includes/isQueueMaxed.lua +15 -0
  328. package/dist/node_modules/bullmq/dist/esm/commands/includes/isQueuePaused.lua +7 -0
  329. package/dist/node_modules/bullmq/dist/esm/commands/includes/isQueuePausedOrMaxed.lua +18 -0
  330. package/dist/node_modules/bullmq/dist/esm/commands/includes/moveJobFromPriorityToActive.lua +13 -0
  331. package/dist/node_modules/bullmq/dist/esm/commands/includes/moveParentFromWaitingChildrenToFailed.lua +53 -0
  332. package/dist/node_modules/bullmq/dist/esm/commands/includes/moveParentToWaitIfNeeded.lua +55 -0
  333. package/dist/node_modules/bullmq/dist/esm/commands/includes/prepareJobForProcessing.lua +50 -0
  334. package/dist/node_modules/bullmq/dist/esm/commands/includes/promoteDelayedJobs.lua +40 -0
  335. package/dist/node_modules/bullmq/dist/esm/commands/includes/pushBackJobWithPriority.lua +9 -0
  336. package/dist/node_modules/bullmq/dist/esm/commands/includes/removeDeduplicationKey.lua +11 -0
  337. package/dist/node_modules/bullmq/dist/esm/commands/includes/removeDeduplicationKeyIfNeeded.lua +14 -0
  338. package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJob.lua +17 -0
  339. package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJobFromAnyState.lua +35 -0
  340. package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJobKeys.lua +8 -0
  341. package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJobs.lua +13 -0
  342. package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJobsByMaxAge.lua +16 -0
  343. package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJobsByMaxCount.lua +15 -0
  344. package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJobsOnFail.lua +36 -0
  345. package/dist/node_modules/bullmq/dist/esm/commands/includes/removeListJobs.lua +17 -0
  346. package/dist/node_modules/bullmq/dist/esm/commands/includes/removeLock.lua +19 -0
  347. package/dist/node_modules/bullmq/dist/esm/commands/includes/removeParentDependencyKey.lua +90 -0
  348. package/dist/node_modules/bullmq/dist/esm/commands/includes/removeZSetJobs.lua +27 -0
  349. package/dist/node_modules/bullmq/dist/esm/commands/includes/storeJob.lua +36 -0
  350. package/dist/node_modules/bullmq/dist/esm/commands/includes/trimEvents.lua +15 -0
  351. package/dist/node_modules/bullmq/dist/esm/commands/includes/updateExistingJobsParent.lua +27 -0
  352. package/dist/node_modules/bullmq/dist/esm/commands/includes/updateJobFields.lua +11 -0
  353. package/dist/node_modules/bullmq/dist/esm/commands/includes/updateParentDepsIfNeeded.lua +13 -0
  354. package/dist/node_modules/bullmq/dist/esm/commands/isFinished-3.lua +48 -0
  355. package/dist/node_modules/bullmq/dist/esm/commands/isJobInList-1.lua +16 -0
  356. package/dist/node_modules/bullmq/dist/esm/commands/isMaxed-2.lua +17 -0
  357. package/dist/node_modules/bullmq/dist/esm/commands/moveJobFromActiveToWait-10.lua +60 -0
  358. package/dist/node_modules/bullmq/dist/esm/commands/moveJobsToWait-8.lua +73 -0
  359. package/dist/node_modules/bullmq/dist/esm/commands/moveStalledJobsToWait-9.lua +156 -0
  360. package/dist/node_modules/bullmq/dist/esm/commands/moveToActive-11.lua +93 -0
  361. package/dist/node_modules/bullmq/dist/esm/commands/moveToDelayed-8.lua +77 -0
  362. package/dist/node_modules/bullmq/dist/esm/commands/moveToFinished-14.lua +283 -0
  363. package/dist/node_modules/bullmq/dist/esm/commands/moveToWaitingChildren-5.lua +68 -0
  364. package/dist/node_modules/bullmq/dist/esm/commands/obliterate-2.lua +118 -0
  365. package/dist/node_modules/bullmq/dist/esm/commands/paginate-1.lua +49 -0
  366. package/dist/node_modules/bullmq/dist/esm/commands/pause-7.lua +42 -0
  367. package/dist/node_modules/bullmq/dist/esm/commands/promote-9.lua +62 -0
  368. package/dist/node_modules/bullmq/dist/esm/commands/releaseLock-1.lua +19 -0
  369. package/dist/node_modules/bullmq/dist/esm/commands/removeChildDependency-1.lua +34 -0
  370. package/dist/node_modules/bullmq/dist/esm/commands/removeJob-2.lua +92 -0
  371. package/dist/node_modules/bullmq/dist/esm/commands/removeJobScheduler-3.lua +43 -0
  372. package/dist/node_modules/bullmq/dist/esm/commands/removeRepeatable-3.lua +58 -0
  373. package/dist/node_modules/bullmq/dist/esm/commands/reprocessJob-8.lua +49 -0
  374. package/dist/node_modules/bullmq/dist/esm/commands/retryJob-11.lua +82 -0
  375. package/dist/node_modules/bullmq/dist/esm/commands/saveStacktrace-1.lua +19 -0
  376. package/dist/node_modules/bullmq/dist/esm/commands/updateData-1.lua +20 -0
  377. package/dist/node_modules/bullmq/dist/esm/commands/updateProgress-3.lua +33 -0
  378. package/dist/node_modules/bullmq/dist/esm/commands/updateRepeatableJobMillis-1.lua +28 -0
  379. package/dist/node_modules/bullmq/dist/esm/enums/child-command.d.ts +5 -0
  380. package/dist/node_modules/bullmq/dist/esm/enums/child-command.js +7 -0
  381. package/dist/node_modules/bullmq/dist/esm/enums/error-code.d.ts +10 -0
  382. package/dist/node_modules/bullmq/dist/esm/enums/error-code.js +12 -0
  383. package/dist/node_modules/bullmq/dist/esm/enums/index.d.ts +5 -0
  384. package/dist/node_modules/bullmq/dist/esm/enums/index.js +6 -0
  385. package/dist/node_modules/bullmq/dist/esm/enums/metrics-time.d.ts +10 -0
  386. package/dist/node_modules/bullmq/dist/esm/enums/metrics-time.js +12 -0
  387. package/dist/node_modules/bullmq/dist/esm/enums/parent-command.d.ts +11 -0
  388. package/dist/node_modules/bullmq/dist/esm/enums/parent-command.js +13 -0
  389. package/dist/node_modules/bullmq/dist/esm/enums/telemetry-attributes.d.ts +42 -0
  390. package/dist/node_modules/bullmq/dist/esm/enums/telemetry-attributes.js +45 -0
  391. package/dist/node_modules/bullmq/dist/esm/index.d.ts +5 -0
  392. package/dist/node_modules/bullmq/dist/esm/index.js +6 -0
  393. package/dist/node_modules/bullmq/dist/esm/interfaces/advanced-options.d.ts +18 -0
  394. package/dist/node_modules/bullmq/dist/esm/interfaces/advanced-options.js +2 -0
  395. package/dist/node_modules/bullmq/dist/esm/interfaces/backoff-options.d.ts +15 -0
  396. package/dist/node_modules/bullmq/dist/esm/interfaces/backoff-options.js +2 -0
  397. package/dist/node_modules/bullmq/dist/esm/interfaces/base-job-options.d.ts +100 -0
  398. package/dist/node_modules/bullmq/dist/esm/interfaces/base-job-options.js +2 -0
  399. package/dist/node_modules/bullmq/dist/esm/interfaces/child-message.d.ts +6 -0
  400. package/dist/node_modules/bullmq/dist/esm/interfaces/child-message.js +2 -0
  401. package/dist/node_modules/bullmq/dist/esm/interfaces/connection.d.ts +8 -0
  402. package/dist/node_modules/bullmq/dist/esm/interfaces/connection.js +2 -0
  403. package/dist/node_modules/bullmq/dist/esm/interfaces/debounce-options.d.ts +13 -0
  404. package/dist/node_modules/bullmq/dist/esm/interfaces/debounce-options.js +2 -0
  405. package/dist/node_modules/bullmq/dist/esm/interfaces/flow-job.d.ts +19 -0
  406. package/dist/node_modules/bullmq/dist/esm/interfaces/flow-job.js +2 -0
  407. package/dist/node_modules/bullmq/dist/esm/interfaces/index.d.ts +28 -0
  408. package/dist/node_modules/bullmq/dist/esm/interfaces/index.js +29 -0
  409. package/dist/node_modules/bullmq/dist/esm/interfaces/ioredis-events.d.ts +8 -0
  410. package/dist/node_modules/bullmq/dist/esm/interfaces/ioredis-events.js +2 -0
  411. package/dist/node_modules/bullmq/dist/esm/interfaces/job-json.d.ts +47 -0
  412. package/dist/node_modules/bullmq/dist/esm/interfaces/job-json.js +2 -0
  413. package/dist/node_modules/bullmq/dist/esm/interfaces/job-scheduler-json.d.ts +16 -0
  414. package/dist/node_modules/bullmq/dist/esm/interfaces/job-scheduler-json.js +2 -0
  415. package/dist/node_modules/bullmq/dist/esm/interfaces/keep-jobs.d.ts +17 -0
  416. package/dist/node_modules/bullmq/dist/esm/interfaces/keep-jobs.js +2 -0
  417. package/dist/node_modules/bullmq/dist/esm/interfaces/metrics-options.d.ts +12 -0
  418. package/dist/node_modules/bullmq/dist/esm/interfaces/metrics-options.js +2 -0
  419. package/dist/node_modules/bullmq/dist/esm/interfaces/metrics.d.ts +9 -0
  420. package/dist/node_modules/bullmq/dist/esm/interfaces/metrics.js +2 -0
  421. package/dist/node_modules/bullmq/dist/esm/interfaces/minimal-job.d.ts +133 -0
  422. package/dist/node_modules/bullmq/dist/esm/interfaces/minimal-job.js +2 -0
  423. package/dist/node_modules/bullmq/dist/esm/interfaces/parent-message.d.ts +8 -0
  424. package/dist/node_modules/bullmq/dist/esm/interfaces/parent-message.js +2 -0
  425. package/dist/node_modules/bullmq/dist/esm/interfaces/parent.d.ts +20 -0
  426. package/dist/node_modules/bullmq/dist/esm/interfaces/parent.js +2 -0
  427. package/dist/node_modules/bullmq/dist/esm/interfaces/queue-options.d.ts +97 -0
  428. package/dist/node_modules/bullmq/dist/esm/interfaces/queue-options.js +6 -0
  429. package/dist/node_modules/bullmq/dist/esm/interfaces/rate-limiter-options.d.ts +12 -0
  430. package/dist/node_modules/bullmq/dist/esm/interfaces/rate-limiter-options.js +2 -0
  431. package/dist/node_modules/bullmq/dist/esm/interfaces/redis-options.d.ts +8 -0
  432. package/dist/node_modules/bullmq/dist/esm/interfaces/redis-options.js +2 -0
  433. package/dist/node_modules/bullmq/dist/esm/interfaces/redis-streams.d.ts +4 -0
  434. package/dist/node_modules/bullmq/dist/esm/interfaces/redis-streams.js +2 -0
  435. package/dist/node_modules/bullmq/dist/esm/interfaces/repeat-options.d.ts +51 -0
  436. package/dist/node_modules/bullmq/dist/esm/interfaces/repeat-options.js +2 -0
  437. package/dist/node_modules/bullmq/dist/esm/interfaces/repeatable-job.d.ts +10 -0
  438. package/dist/node_modules/bullmq/dist/esm/interfaces/repeatable-job.js +2 -0
  439. package/dist/node_modules/bullmq/dist/esm/interfaces/repeatable-options.d.ts +7 -0
  440. package/dist/node_modules/bullmq/dist/esm/interfaces/repeatable-options.js +2 -0
  441. package/dist/node_modules/bullmq/dist/esm/interfaces/sandboxed-job-processor.d.ts +5 -0
  442. package/dist/node_modules/bullmq/dist/esm/interfaces/sandboxed-job-processor.js +2 -0
  443. package/dist/node_modules/bullmq/dist/esm/interfaces/sandboxed-job.d.ts +13 -0
  444. package/dist/node_modules/bullmq/dist/esm/interfaces/sandboxed-job.js +2 -0
  445. package/dist/node_modules/bullmq/dist/esm/interfaces/sandboxed-options.d.ts +28 -0
  446. package/dist/node_modules/bullmq/dist/esm/interfaces/sandboxed-options.js +2 -0
  447. package/dist/node_modules/bullmq/dist/esm/interfaces/telemetry.d.ts +150 -0
  448. package/dist/node_modules/bullmq/dist/esm/interfaces/telemetry.js +2 -0
  449. package/dist/node_modules/bullmq/dist/esm/interfaces/worker-options.d.ts +133 -0
  450. package/dist/node_modules/bullmq/dist/esm/interfaces/worker-options.js +2 -0
  451. package/dist/node_modules/bullmq/dist/esm/scripts/addDelayedJob-6.d.ts +5 -0
  452. package/dist/node_modules/bullmq/dist/esm/scripts/addDelayedJob-6.js +370 -0
  453. package/dist/node_modules/bullmq/dist/esm/scripts/addJobScheduler-2.d.ts +5 -0
  454. package/dist/node_modules/bullmq/dist/esm/scripts/addJobScheduler-2.js +234 -0
  455. package/dist/node_modules/bullmq/dist/esm/scripts/addLog-2.d.ts +5 -0
  456. package/dist/node_modules/bullmq/dist/esm/scripts/addLog-2.js +30 -0
  457. package/dist/node_modules/bullmq/dist/esm/scripts/addParentJob-4.d.ts +5 -0
  458. package/dist/node_modules/bullmq/dist/esm/scripts/addParentJob-4.js +337 -0
  459. package/dist/node_modules/bullmq/dist/esm/scripts/addPrioritizedJob-8.d.ts +5 -0
  460. package/dist/node_modules/bullmq/dist/esm/scripts/addPrioritizedJob-8.js +347 -0
  461. package/dist/node_modules/bullmq/dist/esm/scripts/addRepeatableJob-2.d.ts +5 -0
  462. package/dist/node_modules/bullmq/dist/esm/scripts/addRepeatableJob-2.js +227 -0
  463. package/dist/node_modules/bullmq/dist/esm/scripts/addStandardJob-8.d.ts +5 -0
  464. package/dist/node_modules/bullmq/dist/esm/scripts/addStandardJob-8.js +351 -0
  465. package/dist/node_modules/bullmq/dist/esm/scripts/changeDelay-4.d.ts +5 -0
  466. package/dist/node_modules/bullmq/dist/esm/scripts/changeDelay-4.js +104 -0
  467. package/dist/node_modules/bullmq/dist/esm/scripts/changePriority-7.d.ts +5 -0
  468. package/dist/node_modules/bullmq/dist/esm/scripts/changePriority-7.js +119 -0
  469. package/dist/node_modules/bullmq/dist/esm/scripts/cleanJobsInSet-3.d.ts +5 -0
  470. package/dist/node_modules/bullmq/dist/esm/scripts/cleanJobsInSet-3.js +347 -0
  471. package/dist/node_modules/bullmq/dist/esm/scripts/drain-5.d.ts +5 -0
  472. package/dist/node_modules/bullmq/dist/esm/scripts/drain-5.js +255 -0
  473. package/dist/node_modules/bullmq/dist/esm/scripts/extendLock-2.d.ts +5 -0
  474. package/dist/node_modules/bullmq/dist/esm/scripts/extendLock-2.js +27 -0
  475. package/dist/node_modules/bullmq/dist/esm/scripts/extendLocks-1.d.ts +5 -0
  476. package/dist/node_modules/bullmq/dist/esm/scripts/extendLocks-1.js +43 -0
  477. package/dist/node_modules/bullmq/dist/esm/scripts/getCounts-1.d.ts +5 -0
  478. package/dist/node_modules/bullmq/dist/esm/scripts/getCounts-1.js +39 -0
  479. package/dist/node_modules/bullmq/dist/esm/scripts/getCountsPerPriority-4.d.ts +5 -0
  480. package/dist/node_modules/bullmq/dist/esm/scripts/getCountsPerPriority-4.js +43 -0
  481. package/dist/node_modules/bullmq/dist/esm/scripts/getJobScheduler-1.d.ts +5 -0
  482. package/dist/node_modules/bullmq/dist/esm/scripts/getJobScheduler-1.js +20 -0
  483. package/dist/node_modules/bullmq/dist/esm/scripts/getRanges-1.d.ts +5 -0
  484. package/dist/node_modules/bullmq/dist/esm/scripts/getRanges-1.js +70 -0
  485. package/dist/node_modules/bullmq/dist/esm/scripts/getRateLimitTtl-1.d.ts +5 -0
  486. package/dist/node_modules/bullmq/dist/esm/scripts/getRateLimitTtl-1.js +36 -0
  487. package/dist/node_modules/bullmq/dist/esm/scripts/getState-8.d.ts +5 -0
  488. package/dist/node_modules/bullmq/dist/esm/scripts/getState-8.js +70 -0
  489. package/dist/node_modules/bullmq/dist/esm/scripts/getStateV2-8.d.ts +5 -0
  490. package/dist/node_modules/bullmq/dist/esm/scripts/getStateV2-8.js +54 -0
  491. package/dist/node_modules/bullmq/dist/esm/scripts/index.d.ts +45 -0
  492. package/dist/node_modules/bullmq/dist/esm/scripts/index.js +46 -0
  493. package/dist/node_modules/bullmq/dist/esm/scripts/isFinished-3.d.ts +5 -0
  494. package/dist/node_modules/bullmq/dist/esm/scripts/isFinished-3.js +46 -0
  495. package/dist/node_modules/bullmq/dist/esm/scripts/isJobInList-1.d.ts +5 -0
  496. package/dist/node_modules/bullmq/dist/esm/scripts/isJobInList-1.js +29 -0
  497. package/dist/node_modules/bullmq/dist/esm/scripts/isMaxed-2.d.ts +5 -0
  498. package/dist/node_modules/bullmq/dist/esm/scripts/isMaxed-2.js +31 -0
  499. package/dist/node_modules/bullmq/dist/esm/scripts/moveJobFromActiveToWait-10.d.ts +5 -0
  500. package/dist/node_modules/bullmq/dist/esm/scripts/moveJobFromActiveToWait-10.js +107 -0
  501. package/dist/node_modules/bullmq/dist/esm/scripts/moveJobsToWait-8.d.ts +5 -0
  502. package/dist/node_modules/bullmq/dist/esm/scripts/moveJobsToWait-8.js +115 -0
  503. package/dist/node_modules/bullmq/dist/esm/scripts/moveStalledJobsToWait-9.d.ts +5 -0
  504. package/dist/node_modules/bullmq/dist/esm/scripts/moveStalledJobsToWait-9.js +526 -0
  505. package/dist/node_modules/bullmq/dist/esm/scripts/moveToActive-11.d.ts +5 -0
  506. package/dist/node_modules/bullmq/dist/esm/scripts/moveToActive-11.js +230 -0
  507. package/dist/node_modules/bullmq/dist/esm/scripts/moveToDelayed-8.d.ts +5 -0
  508. package/dist/node_modules/bullmq/dist/esm/scripts/moveToDelayed-8.js +153 -0
  509. package/dist/node_modules/bullmq/dist/esm/scripts/moveToFinished-14.d.ts +5 -0
  510. package/dist/node_modules/bullmq/dist/esm/scripts/moveToFinished-14.js +795 -0
  511. package/dist/node_modules/bullmq/dist/esm/scripts/moveToWaitingChildren-5.d.ts +5 -0
  512. package/dist/node_modules/bullmq/dist/esm/scripts/moveToWaitingChildren-5.js +80 -0
  513. package/dist/node_modules/bullmq/dist/esm/scripts/obliterate-2.d.ts +5 -0
  514. package/dist/node_modules/bullmq/dist/esm/scripts/obliterate-2.js +324 -0
  515. package/dist/node_modules/bullmq/dist/esm/scripts/paginate-1.d.ts +5 -0
  516. package/dist/node_modules/bullmq/dist/esm/scripts/paginate-1.js +107 -0
  517. package/dist/node_modules/bullmq/dist/esm/scripts/pause-7.d.ts +5 -0
  518. package/dist/node_modules/bullmq/dist/esm/scripts/pause-7.js +64 -0
  519. package/dist/node_modules/bullmq/dist/esm/scripts/promote-9.d.ts +5 -0
  520. package/dist/node_modules/bullmq/dist/esm/scripts/promote-9.js +102 -0
  521. package/dist/node_modules/bullmq/dist/esm/scripts/releaseLock-1.d.ts +5 -0
  522. package/dist/node_modules/bullmq/dist/esm/scripts/releaseLock-1.js +22 -0
  523. package/dist/node_modules/bullmq/dist/esm/scripts/removeChildDependency-1.d.ts +5 -0
  524. package/dist/node_modules/bullmq/dist/esm/scripts/removeChildDependency-1.js +162 -0
  525. package/dist/node_modules/bullmq/dist/esm/scripts/removeJob-2.d.ts +5 -0
  526. package/dist/node_modules/bullmq/dist/esm/scripts/removeJob-2.js +289 -0
  527. package/dist/node_modules/bullmq/dist/esm/scripts/removeJobScheduler-3.d.ts +5 -0
  528. package/dist/node_modules/bullmq/dist/esm/scripts/removeJobScheduler-3.js +46 -0
  529. package/dist/node_modules/bullmq/dist/esm/scripts/removeRepeatable-3.d.ts +5 -0
  530. package/dist/node_modules/bullmq/dist/esm/scripts/removeRepeatable-3.js +60 -0
  531. package/dist/node_modules/bullmq/dist/esm/scripts/reprocessJob-8.d.ts +5 -0
  532. package/dist/node_modules/bullmq/dist/esm/scripts/reprocessJob-8.js +93 -0
  533. package/dist/node_modules/bullmq/dist/esm/scripts/retryJob-11.d.ts +5 -0
  534. package/dist/node_modules/bullmq/dist/esm/scripts/retryJob-11.js +190 -0
  535. package/dist/node_modules/bullmq/dist/esm/scripts/saveStacktrace-1.d.ts +5 -0
  536. package/dist/node_modules/bullmq/dist/esm/scripts/saveStacktrace-1.js +24 -0
  537. package/dist/node_modules/bullmq/dist/esm/scripts/updateData-1.d.ts +5 -0
  538. package/dist/node_modules/bullmq/dist/esm/scripts/updateData-1.js +23 -0
  539. package/dist/node_modules/bullmq/dist/esm/scripts/updateProgress-3.d.ts +5 -0
  540. package/dist/node_modules/bullmq/dist/esm/scripts/updateProgress-3.js +43 -0
  541. package/dist/node_modules/bullmq/dist/esm/scripts/updateRepeatableJobMillis-1.d.ts +5 -0
  542. package/dist/node_modules/bullmq/dist/esm/scripts/updateRepeatableJobMillis-1.js +30 -0
  543. package/dist/node_modules/bullmq/dist/esm/tsconfig.tsbuildinfo +1 -0
  544. package/dist/node_modules/bullmq/dist/esm/types/backoff-strategy.d.ts +2 -0
  545. package/dist/node_modules/bullmq/dist/esm/types/backoff-strategy.js +2 -0
  546. package/dist/node_modules/bullmq/dist/esm/types/finished-status.d.ts +2 -0
  547. package/dist/node_modules/bullmq/dist/esm/types/finished-status.js +2 -0
  548. package/dist/node_modules/bullmq/dist/esm/types/index.d.ts +8 -0
  549. package/dist/node_modules/bullmq/dist/esm/types/index.js +9 -0
  550. package/dist/node_modules/bullmq/dist/esm/types/job-json-sandbox.d.ts +5 -0
  551. package/dist/node_modules/bullmq/dist/esm/types/job-json-sandbox.js +2 -0
  552. package/dist/node_modules/bullmq/dist/esm/types/job-options.d.ts +81 -0
  553. package/dist/node_modules/bullmq/dist/esm/types/job-options.js +2 -0
  554. package/dist/node_modules/bullmq/dist/esm/types/job-scheduler-template-options.d.ts +2 -0
  555. package/dist/node_modules/bullmq/dist/esm/types/job-scheduler-template-options.js +2 -0
  556. package/dist/node_modules/bullmq/dist/esm/types/job-type.d.ts +3 -0
  557. package/dist/node_modules/bullmq/dist/esm/types/job-type.js +2 -0
  558. package/dist/node_modules/bullmq/dist/esm/types/minimal-queue.d.ts +2 -0
  559. package/dist/node_modules/bullmq/dist/esm/types/minimal-queue.js +2 -0
  560. package/dist/node_modules/bullmq/dist/esm/types/repeat-strategy.d.ts +2 -0
  561. package/dist/node_modules/bullmq/dist/esm/types/repeat-strategy.js +2 -0
  562. package/dist/node_modules/bullmq/dist/esm/utils.d.ts +72 -0
  563. package/dist/node_modules/bullmq/dist/esm/utils.js +263 -0
  564. package/dist/node_modules/bullmq/dist/esm/version.d.ts +1 -0
  565. package/dist/node_modules/bullmq/dist/esm/version.js +2 -0
  566. package/dist/node_modules/bullmq/node_modules/.bin/semver +17 -0
  567. package/dist/node_modules/bullmq/node_modules/.bin/uuid +17 -0
  568. package/dist/node_modules/bullmq/package.json +1 -0
  569. package/dist/node_modules/docxtemplater/build/docxtemplater.js +5019 -0
  570. package/dist/node_modules/docxtemplater/build/docxtemplater.min.js +1 -0
  571. package/dist/node_modules/docxtemplater/docxtemplater.d.ts +140 -0
  572. package/dist/node_modules/docxtemplater/docxtemplater.test-d.ts +318 -0
  573. package/dist/node_modules/docxtemplater/expressions-ie11.d.ts +19 -0
  574. package/dist/node_modules/docxtemplater/expressions-ie11.js +170 -0
  575. package/dist/node_modules/docxtemplater/expressions.d.ts +25 -0
  576. package/dist/node_modules/docxtemplater/expressions.js +322 -0
  577. package/dist/node_modules/docxtemplater/inspect-module.d.ts +29 -0
  578. package/dist/node_modules/docxtemplater/js/browser-versions/fs.js +3 -0
  579. package/dist/node_modules/docxtemplater/js/browser-versions/xmldom.js +7 -0
  580. package/dist/node_modules/docxtemplater/js/collect-content-types.js +28 -0
  581. package/dist/node_modules/docxtemplater/js/content-types.js +16 -0
  582. package/dist/node_modules/docxtemplater/js/debugger-module.js +60 -0
  583. package/dist/node_modules/docxtemplater/js/doc-utils.js +450 -0
  584. package/dist/node_modules/docxtemplater/js/docxtemplater.d.ts +140 -0
  585. package/dist/node_modules/docxtemplater/js/docxtemplater.js +1 -0
  586. package/dist/node_modules/docxtemplater/js/docxtemplater.test-d.ts +318 -0
  587. package/dist/node_modules/docxtemplater/js/error-logger.js +34 -0
  588. package/dist/node_modules/docxtemplater/js/errors.js +406 -0
  589. package/dist/node_modules/docxtemplater/js/expressions-ie11.d.ts +19 -0
  590. package/dist/node_modules/docxtemplater/js/expressions-ie11.js +165 -0
  591. package/dist/node_modules/docxtemplater/js/expressions.d.ts +25 -0
  592. package/dist/node_modules/docxtemplater/js/expressions.js +283 -0
  593. package/dist/node_modules/docxtemplater/js/file-type-config.js +89 -0
  594. package/dist/node_modules/docxtemplater/js/filetypes.js +24 -0
  595. package/dist/node_modules/docxtemplater/js/get-resolved-id.js +14 -0
  596. package/dist/node_modules/docxtemplater/js/inspect-module.d.ts +29 -0
  597. package/dist/node_modules/docxtemplater/js/inspect-module.js +253 -0
  598. package/dist/node_modules/docxtemplater/js/join-uncorrupt.js +109 -0
  599. package/dist/node_modules/docxtemplater/js/lexer.js +470 -0
  600. package/dist/node_modules/docxtemplater/js/memory-test.js +38 -0
  601. package/dist/node_modules/docxtemplater/js/merge-sort.js +32 -0
  602. package/dist/node_modules/docxtemplater/js/module-wrapper.js +44 -0
  603. package/dist/node_modules/docxtemplater/js/modules/common.js +69 -0
  604. package/dist/node_modules/docxtemplater/js/modules/expand-pair-trait.js +257 -0
  605. package/dist/node_modules/docxtemplater/js/modules/fix-doc-pr-corruption.js +85 -0
  606. package/dist/node_modules/docxtemplater/js/modules/loop.js +470 -0
  607. package/dist/node_modules/docxtemplater/js/modules/rawxml.js +109 -0
  608. package/dist/node_modules/docxtemplater/js/modules/render.js +176 -0
  609. package/dist/node_modules/docxtemplater/js/modules/space-preserve.js +107 -0
  610. package/dist/node_modules/docxtemplater/js/parser.js +203 -0
  611. package/dist/node_modules/docxtemplater/js/postrender.js +110 -0
  612. package/dist/node_modules/docxtemplater/js/prefix-matcher.js +48 -0
  613. package/dist/node_modules/docxtemplater/js/proof-state-module.js +27 -0
  614. package/dist/node_modules/docxtemplater/js/render.js +64 -0
  615. package/dist/node_modules/docxtemplater/js/resolve.js +82 -0
  616. package/dist/node_modules/docxtemplater/js/scope-manager.js +229 -0
  617. package/dist/node_modules/docxtemplater/js/test-text.js +12 -0
  618. package/dist/node_modules/docxtemplater/js/tests/assertion-module.js +163 -0
  619. package/dist/node_modules/docxtemplater/js/tests/data/raw-xml-pptx.js +3 -0
  620. package/dist/node_modules/docxtemplater/js/tests/e2e/async.js +167 -0
  621. package/dist/node_modules/docxtemplater/js/tests/e2e/base.js +1133 -0
  622. package/dist/node_modules/docxtemplater/js/tests/e2e/doc-props.js +68 -0
  623. package/dist/node_modules/docxtemplater/js/tests/e2e/errors.js +1216 -0
  624. package/dist/node_modules/docxtemplater/js/tests/e2e/fixtures.js +2031 -0
  625. package/dist/node_modules/docxtemplater/js/tests/e2e/integration.js +1258 -0
  626. package/dist/node_modules/docxtemplater/js/tests/e2e/lexer-parser-render.js +139 -0
  627. package/dist/node_modules/docxtemplater/js/tests/e2e/modules.js +796 -0
  628. package/dist/node_modules/docxtemplater/js/tests/e2e/pptx.js +140 -0
  629. package/dist/node_modules/docxtemplater/js/tests/e2e/speed.js +281 -0
  630. package/dist/node_modules/docxtemplater/js/tests/e2e/table.js +215 -0
  631. package/dist/node_modules/docxtemplater/js/tests/e2e/text.js +98 -0
  632. package/dist/node_modules/docxtemplater/js/tests/e2e/v3.js +279 -0
  633. package/dist/node_modules/docxtemplater/js/tests/e2e/xml-templater.js +478 -0
  634. package/dist/node_modules/docxtemplater/js/tests/filenames.js +1 -0
  635. package/dist/node_modules/docxtemplater/js/tests/index.js +122 -0
  636. package/dist/node_modules/docxtemplater/js/tests/printy.js +47 -0
  637. package/dist/node_modules/docxtemplater/js/tests/string-repeat.js +36 -0
  638. package/dist/node_modules/docxtemplater/js/tests/unit/doc-utils.js +77 -0
  639. package/dist/node_modules/docxtemplater/js/tests/unit/expressions.js +124 -0
  640. package/dist/node_modules/docxtemplater/js/tests/unit/merge-sort.js +69 -0
  641. package/dist/node_modules/docxtemplater/js/tests/unit/scope-manager.js +76 -0
  642. package/dist/node_modules/docxtemplater/js/tests/unit/xml-matcher.js +72 -0
  643. package/dist/node_modules/docxtemplater/js/tests/utils.js +873 -0
  644. package/dist/node_modules/docxtemplater/js/tests/xml-prettify.js +219 -0
  645. package/dist/node_modules/docxtemplater/js/text.d.ts +16 -0
  646. package/dist/node_modules/docxtemplater/js/text.js +88 -0
  647. package/dist/node_modules/docxtemplater/js/traits.js +347 -0
  648. package/dist/node_modules/docxtemplater/js/uintarray-to-string.js +132 -0
  649. package/dist/node_modules/docxtemplater/js/utils.js +12 -0
  650. package/dist/node_modules/docxtemplater/js/xml-matcher.js +13 -0
  651. package/dist/node_modules/docxtemplater/js/xml-templater.js +242 -0
  652. package/dist/node_modules/docxtemplater/package.json +1 -0
  653. package/dist/node_modules/docxtemplater/text.d.ts +16 -0
  654. package/dist/node_modules/docxtemplater/text.js +88 -0
  655. package/dist/node_modules/docxtemplater/webpack.config.js +55 -0
  656. package/dist/node_modules/pizzip/.babelrc +5 -0
  657. package/dist/node_modules/pizzip/.codeclimate.yml +14 -0
  658. package/dist/node_modules/pizzip/.editorconfig +13 -0
  659. package/dist/node_modules/pizzip/.eslintcache +1 -0
  660. package/dist/node_modules/pizzip/.eslintrc +203 -0
  661. package/dist/node_modules/pizzip/.ignored.log +8 -0
  662. package/dist/node_modules/pizzip/.jshintignore +2 -0
  663. package/dist/node_modules/pizzip/.jshintrc +12 -0
  664. package/dist/node_modules/pizzip/.prettierrc.yaml +1 -0
  665. package/dist/node_modules/pizzip/.travis.yml +19 -0
  666. package/dist/node_modules/pizzip/LICENSE.markdown +647 -0
  667. package/dist/node_modules/pizzip/README.markdown +30 -0
  668. package/dist/node_modules/pizzip/dist/pizzip-utils-ie.js +50 -0
  669. package/dist/node_modules/pizzip/dist/pizzip-utils-ie.min.js +1 -0
  670. package/dist/node_modules/pizzip/dist/pizzip-utils.js +58 -0
  671. package/dist/node_modules/pizzip/dist/pizzip-utils.min.js +1 -0
  672. package/dist/node_modules/pizzip/dist/pizzip.js +321 -0
  673. package/dist/node_modules/pizzip/dist/pizzip.min.js +2 -0
  674. package/dist/node_modules/pizzip/dist/pizzip.min.js.LICENSE.txt +1 -0
  675. package/dist/node_modules/pizzip/es6/arrayReader.js +59 -0
  676. package/dist/node_modules/pizzip/es6/base64.js +69 -0
  677. package/dist/node_modules/pizzip/es6/compressedObject.js +28 -0
  678. package/dist/node_modules/pizzip/es6/compressions.js +13 -0
  679. package/dist/node_modules/pizzip/es6/crc32.js +102 -0
  680. package/dist/node_modules/pizzip/es6/dataReader.js +115 -0
  681. package/dist/node_modules/pizzip/es6/defaults.js +11 -0
  682. package/dist/node_modules/pizzip/es6/deprecatedPublicUtils.js +103 -0
  683. package/dist/node_modules/pizzip/es6/flate.js +19 -0
  684. package/dist/node_modules/pizzip/es6/index.d.ts +384 -0
  685. package/dist/node_modules/pizzip/es6/index.js +89 -0
  686. package/dist/node_modules/pizzip/es6/index.test-d.ts +99 -0
  687. package/dist/node_modules/pizzip/es6/license_header.js +11 -0
  688. package/dist/node_modules/pizzip/es6/load.js +39 -0
  689. package/dist/node_modules/pizzip/es6/nodeBuffer.js +10 -0
  690. package/dist/node_modules/pizzip/es6/nodeBufferReader.js +24 -0
  691. package/dist/node_modules/pizzip/es6/object.js +924 -0
  692. package/dist/node_modules/pizzip/es6/signature.js +7 -0
  693. package/dist/node_modules/pizzip/es6/stringReader.js +40 -0
  694. package/dist/node_modules/pizzip/es6/stringWriter.js +30 -0
  695. package/dist/node_modules/pizzip/es6/support.js +37 -0
  696. package/dist/node_modules/pizzip/es6/uint8ArrayReader.js +29 -0
  697. package/dist/node_modules/pizzip/es6/uint8ArrayWriter.js +36 -0
  698. package/dist/node_modules/pizzip/es6/utf8.js +241 -0
  699. package/dist/node_modules/pizzip/es6/utils.js +381 -0
  700. package/dist/node_modules/pizzip/es6/zipEntries.js +317 -0
  701. package/dist/node_modules/pizzip/es6/zipEntry.js +349 -0
  702. package/dist/node_modules/pizzip/js/arrayReader.js +49 -0
  703. package/dist/node_modules/pizzip/js/base64.js +53 -0
  704. package/dist/node_modules/pizzip/js/compressedObject.js +28 -0
  705. package/dist/node_modules/pizzip/js/compressions.js +14 -0
  706. package/dist/node_modules/pizzip/js/crc32.js +33 -0
  707. package/dist/node_modules/pizzip/js/dataReader.js +112 -0
  708. package/dist/node_modules/pizzip/js/defaults.js +12 -0
  709. package/dist/node_modules/pizzip/js/deprecatedPublicUtils.js +104 -0
  710. package/dist/node_modules/pizzip/js/flate.js +15 -0
  711. package/dist/node_modules/pizzip/js/index.d.ts +384 -0
  712. package/dist/node_modules/pizzip/js/index.js +3 -0
  713. package/dist/node_modules/pizzip/js/index.test-d.ts +99 -0
  714. package/dist/node_modules/pizzip/js/license_header.js +12 -0
  715. package/dist/node_modules/pizzip/js/load.js +38 -0
  716. package/dist/node_modules/pizzip/js/nodeBuffer.js +11 -0
  717. package/dist/node_modules/pizzip/js/nodeBufferReader.js +21 -0
  718. package/dist/node_modules/pizzip/js/object.js +803 -0
  719. package/dist/node_modules/pizzip/js/signature.js +8 -0
  720. package/dist/node_modules/pizzip/js/stringReader.js +37 -0
  721. package/dist/node_modules/pizzip/js/stringWriter.js +29 -0
  722. package/dist/node_modules/pizzip/js/support.js +31 -0
  723. package/dist/node_modules/pizzip/js/uint8ArrayReader.js +26 -0
  724. package/dist/node_modules/pizzip/js/uint8ArrayWriter.js +35 -0
  725. package/dist/node_modules/pizzip/js/utf8.js +221 -0
  726. package/dist/node_modules/pizzip/js/utils.js +353 -0
  727. package/dist/node_modules/pizzip/js/zipEntries.js +266 -0
  728. package/dist/node_modules/pizzip/js/zipEntry.js +293 -0
  729. package/dist/node_modules/pizzip/package.json +1 -0
  730. package/dist/node_modules/pizzip/symlink.sh +4 -0
  731. package/dist/node_modules/pizzip/utils/.jshintignore +2 -0
  732. package/dist/node_modules/pizzip/utils/.jshintrc +13 -0
  733. package/dist/node_modules/pizzip/utils/.travis.yml +10 -0
  734. package/dist/node_modules/pizzip/utils/LICENSE.markdown +651 -0
  735. package/dist/node_modules/pizzip/utils/README.markdown +21 -0
  736. package/dist/node_modules/pizzip/utils/dist/pizzip-utils-ie.js +50 -0
  737. package/dist/node_modules/pizzip/utils/dist/pizzip-utils-ie.min.js +1 -0
  738. package/dist/node_modules/pizzip/utils/dist/pizzip-utils.js +58 -0
  739. package/dist/node_modules/pizzip/utils/dist/pizzip-utils.min.js +1 -0
  740. package/dist/node_modules/pizzip/utils/es6/index.js +105 -0
  741. package/dist/node_modules/pizzip/utils/es6/index_IE.js +43 -0
  742. package/dist/node_modules/pizzip/utils/es6/license_header.js +8 -0
  743. package/dist/node_modules/pizzip/utils/index.d.ts +5 -0
  744. package/dist/node_modules/pizzip/utils/index.js +1 -0
  745. package/dist/node_modules/pizzip/utils/index.test-d.ts +15 -0
  746. package/dist/node_modules/pizzip/utils/webpack.config.js +39 -0
  747. package/dist/node_modules/pizzip/vendor/FileSaver.js +247 -0
  748. package/dist/node_modules/pizzip/webpack.config.js +30 -0
  749. package/dist/server/actions/printTemplates.d.ts +6 -0
  750. package/dist/server/actions/printTemplates.js +126 -0
  751. package/dist/server/actions/producer.d.ts +3 -0
  752. package/dist/server/actions/producer.js +81 -0
  753. package/dist/server/index.d.ts +1 -0
  754. package/dist/server/index.js +33 -0
  755. package/dist/server/plugin.d.ts +8 -0
  756. package/dist/server/plugin.js +120 -0
  757. package/package.json +26 -0
  758. package/server.d.ts +2 -0
  759. package/server.js +1 -0
@@ -0,0 +1,819 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Worker = void 0;
4
+ const fs = require("fs");
5
+ const url_1 = require("url");
6
+ const path = require("path");
7
+ const uuid_1 = require("uuid");
8
+ // Note: this Polyfill is only needed for Node versions < 15.4.0
9
+ const node_abort_controller_1 = require("node-abort-controller");
10
+ const utils_1 = require("../utils");
11
+ const queue_base_1 = require("./queue-base");
12
+ const repeat_1 = require("./repeat");
13
+ const child_pool_1 = require("./child-pool");
14
+ const job_1 = require("./job");
15
+ const redis_connection_1 = require("./redis-connection");
16
+ const sandbox_1 = require("./sandbox");
17
+ const async_fifo_queue_1 = require("./async-fifo-queue");
18
+ const errors_1 = require("./errors");
19
+ const enums_1 = require("../enums");
20
+ const job_scheduler_1 = require("./job-scheduler");
21
+ // 10 seconds is the maximum time a BZPOPMIN can block.
22
+ const maximumBlockTimeout = 10;
23
+ // 30 seconds is the maximum limit until.
24
+ const maximumLimitUntil = 30000;
25
+ /**
26
+ *
27
+ * This class represents a worker that is able to process jobs from the queue.
28
+ * As soon as the class is instantiated and a connection to Redis is established
29
+ * it will start processing jobs.
30
+ *
31
+ */
32
+ class Worker extends queue_base_1.QueueBase {
33
+ static RateLimitError() {
34
+ return new errors_1.RateLimitError();
35
+ }
36
+ constructor(name, processor, opts, Connection) {
37
+ super(name, Object.assign(Object.assign({}, opts), { blockingConnection: true }), Connection);
38
+ this.abortDelayController = null;
39
+ this.blockUntil = 0;
40
+ this.drained = false;
41
+ this.extendLocksTimer = null;
42
+ this.limitUntil = 0;
43
+ this.waiting = null;
44
+ this.running = false;
45
+ if (!opts || !opts.connection) {
46
+ throw new Error('Worker requires a connection');
47
+ }
48
+ this.opts = Object.assign({ drainDelay: 5, concurrency: 1, lockDuration: 30000, maxStalledCount: 1, stalledInterval: 30000, autorun: true, runRetryDelay: 15000 }, this.opts);
49
+ if (this.opts.stalledInterval <= 0) {
50
+ throw new Error('stalledInterval must be greater than 0');
51
+ }
52
+ if (this.opts.drainDelay <= 0) {
53
+ throw new Error('drainDelay must be greater than 0');
54
+ }
55
+ this.concurrency = this.opts.concurrency;
56
+ this.opts.lockRenewTime =
57
+ this.opts.lockRenewTime || this.opts.lockDuration / 2;
58
+ this.id = (0, uuid_1.v4)();
59
+ if (processor) {
60
+ if (typeof processor === 'function') {
61
+ this.processFn = processor;
62
+ }
63
+ else {
64
+ // SANDBOXED
65
+ if (processor instanceof url_1.URL) {
66
+ if (!fs.existsSync(processor)) {
67
+ throw new Error(`URL ${processor} does not exist in the local file system`);
68
+ }
69
+ processor = processor.href;
70
+ }
71
+ else {
72
+ const supportedFileTypes = ['.js', '.ts', '.flow', '.cjs'];
73
+ const processorFile = processor +
74
+ (supportedFileTypes.includes(path.extname(processor)) ? '' : '.js');
75
+ if (!fs.existsSync(processorFile)) {
76
+ throw new Error(`File ${processorFile} does not exist`);
77
+ }
78
+ }
79
+ // Separate paths so that bundling tools can resolve dependencies easier
80
+ const dirname = path.dirname(module.filename || __filename);
81
+ const workerThreadsMainFile = path.join(dirname, 'main-worker.js');
82
+ const spawnProcessMainFile = path.join(dirname, 'main.js');
83
+ let mainFilePath = this.opts.useWorkerThreads
84
+ ? workerThreadsMainFile
85
+ : spawnProcessMainFile;
86
+ try {
87
+ fs.statSync(mainFilePath); // would throw if file not exists
88
+ }
89
+ catch (_) {
90
+ const mainFile = this.opts.useWorkerThreads
91
+ ? 'main-worker.js'
92
+ : 'main.js';
93
+ mainFilePath = path.join(process.cwd(), `dist/cjs/classes/${mainFile}`);
94
+ fs.statSync(mainFilePath);
95
+ }
96
+ this.childPool = new child_pool_1.ChildPool({
97
+ mainFile: mainFilePath,
98
+ useWorkerThreads: this.opts.useWorkerThreads,
99
+ workerForkOptions: this.opts.workerForkOptions,
100
+ workerThreadsOptions: this.opts.workerThreadsOptions,
101
+ });
102
+ this.processFn = (0, sandbox_1.default)(processor, this.childPool).bind(this);
103
+ }
104
+ if (this.opts.autorun) {
105
+ this.run().catch(error => this.emit('error', error));
106
+ }
107
+ }
108
+ const connectionName = this.clientName() + (this.opts.name ? `:w:${this.opts.name}` : '');
109
+ this.blockingConnection = new redis_connection_1.RedisConnection((0, utils_1.isRedisInstance)(opts.connection)
110
+ ? opts.connection.duplicate({ connectionName })
111
+ : Object.assign(Object.assign({}, opts.connection), { connectionName }), false, true, opts.skipVersionCheck);
112
+ this.blockingConnection.on('error', error => this.emit('error', error));
113
+ this.blockingConnection.on('ready', () => setTimeout(() => this.emit('ready'), 0));
114
+ }
115
+ emit(event, ...args) {
116
+ return super.emit(event, ...args);
117
+ }
118
+ off(eventName, listener) {
119
+ super.off(eventName, listener);
120
+ return this;
121
+ }
122
+ on(event, listener) {
123
+ super.on(event, listener);
124
+ return this;
125
+ }
126
+ once(event, listener) {
127
+ super.once(event, listener);
128
+ return this;
129
+ }
130
+ callProcessJob(job, token) {
131
+ return this.processFn(job, token);
132
+ }
133
+ createJob(data, jobId) {
134
+ return this.Job.fromJSON(this, data, jobId);
135
+ }
136
+ /**
137
+ *
138
+ * Waits until the worker is ready to start processing jobs.
139
+ * In general only useful when writing tests.
140
+ *
141
+ */
142
+ async waitUntilReady() {
143
+ await super.waitUntilReady();
144
+ return this.blockingConnection.client;
145
+ }
146
+ set concurrency(concurrency) {
147
+ if (typeof concurrency !== 'number' ||
148
+ concurrency < 1 ||
149
+ !isFinite(concurrency)) {
150
+ throw new Error('concurrency must be a finite number greater than 0');
151
+ }
152
+ this._concurrency = concurrency;
153
+ }
154
+ get concurrency() {
155
+ return this._concurrency;
156
+ }
157
+ get repeat() {
158
+ return new Promise(async (resolve) => {
159
+ if (!this._repeat) {
160
+ const connection = await this.client;
161
+ this._repeat = new repeat_1.Repeat(this.name, Object.assign(Object.assign({}, this.opts), { connection }));
162
+ this._repeat.on('error', e => this.emit.bind(this, e));
163
+ }
164
+ resolve(this._repeat);
165
+ });
166
+ }
167
+ get jobScheduler() {
168
+ return new Promise(async (resolve) => {
169
+ if (!this._jobScheduler) {
170
+ const connection = await this.client;
171
+ this._jobScheduler = new job_scheduler_1.JobScheduler(this.name, Object.assign(Object.assign({}, this.opts), { connection }));
172
+ this._jobScheduler.on('error', e => this.emit.bind(this, e));
173
+ }
174
+ resolve(this._jobScheduler);
175
+ });
176
+ }
177
+ async run() {
178
+ if (!this.processFn) {
179
+ throw new Error('No process function is defined.');
180
+ }
181
+ if (this.running) {
182
+ throw new Error('Worker is already running.');
183
+ }
184
+ try {
185
+ this.running = true;
186
+ if (this.closing) {
187
+ return;
188
+ }
189
+ await this.startStalledCheckTimer();
190
+ const jobsInProgress = new Set();
191
+ this.startLockExtenderTimer(jobsInProgress);
192
+ const asyncFifoQueue = (this.asyncFifoQueue =
193
+ new async_fifo_queue_1.AsyncFifoQueue());
194
+ let tokenPostfix = 0;
195
+ const client = await this.client;
196
+ const bclient = await this.blockingConnection.client;
197
+ /**
198
+ * This is the main loop in BullMQ. Its goals are to fetch jobs from the queue
199
+ * as efficiently as possible, providing concurrency and minimal unnecessary calls
200
+ * to Redis.
201
+ */
202
+ while (!this.closing) {
203
+ let numTotal = asyncFifoQueue.numTotal();
204
+ /**
205
+ * This inner loop tries to fetch jobs concurrently, but if we are waiting for a job
206
+ * to arrive at the queue we should not try to fetch more jobs (as it would be pointless)
207
+ */
208
+ while (!this.waiting &&
209
+ numTotal < this._concurrency &&
210
+ (!this.limitUntil || numTotal == 0)) {
211
+ const token = `${this.id}:${tokenPostfix++}`;
212
+ const fetchedJob = this.retryIfFailed(() => this._getNextJob(client, bclient, token, { block: true }), this.opts.runRetryDelay);
213
+ asyncFifoQueue.add(fetchedJob);
214
+ numTotal = asyncFifoQueue.numTotal();
215
+ if (this.waiting && numTotal > 1) {
216
+ // We are waiting for jobs but we have others that we could start processing already
217
+ break;
218
+ }
219
+ // We await here so that we fetch jobs in sequence, this is important to avoid unnecessary calls
220
+ // to Redis in high concurrency scenarios.
221
+ const job = await fetchedJob;
222
+ // No more jobs waiting but we have others that could start processing already
223
+ if (!job && numTotal > 1) {
224
+ break;
225
+ }
226
+ // If there are potential jobs to be processed and blockUntil is set, we should exit to avoid waiting
227
+ // for processing this job.
228
+ if (this.blockUntil) {
229
+ break;
230
+ }
231
+ }
232
+ // Since there can be undefined jobs in the queue (when a job fails or queue is empty)
233
+ // we iterate until we find a job.
234
+ let job;
235
+ do {
236
+ job = await asyncFifoQueue.fetch();
237
+ } while (!job && asyncFifoQueue.numQueued() > 0);
238
+ if (job) {
239
+ const token = job.token;
240
+ asyncFifoQueue.add(this.retryIfFailed(() => this.processJob(job, token, () => asyncFifoQueue.numTotal() <= this._concurrency, jobsInProgress), this.opts.runRetryDelay));
241
+ }
242
+ }
243
+ this.running = false;
244
+ return await asyncFifoQueue.waitAll();
245
+ }
246
+ catch (error) {
247
+ this.running = false;
248
+ throw error;
249
+ }
250
+ }
251
+ /**
252
+ * Returns a promise that resolves to the next job in queue.
253
+ * @param token - worker token to be assigned to retrieved job
254
+ * @returns a Job or undefined if no job was available in the queue.
255
+ */
256
+ async getNextJob(token, { block = true } = {}) {
257
+ var _a, _b;
258
+ const nextJob = await this._getNextJob(await this.client, await this.blockingConnection.client, token, { block });
259
+ return this.trace(enums_1.SpanKind.INTERNAL, 'getNextJob', this.name, async (span) => {
260
+ span === null || span === void 0 ? void 0 : span.setAttributes({
261
+ [enums_1.TelemetryAttributes.WorkerId]: this.id,
262
+ [enums_1.TelemetryAttributes.QueueName]: this.name,
263
+ [enums_1.TelemetryAttributes.WorkerName]: this.opts.name,
264
+ [enums_1.TelemetryAttributes.WorkerOptions]: JSON.stringify({ block }),
265
+ [enums_1.TelemetryAttributes.JobId]: nextJob === null || nextJob === void 0 ? void 0 : nextJob.id,
266
+ });
267
+ return nextJob;
268
+ }, (_b = (_a = nextJob === null || nextJob === void 0 ? void 0 : nextJob.opts) === null || _a === void 0 ? void 0 : _a.telemetry) === null || _b === void 0 ? void 0 : _b.metadata);
269
+ }
270
+ async _getNextJob(client, bclient, token, { block = true } = {}) {
271
+ var _a;
272
+ if (this.paused) {
273
+ if (block) {
274
+ await this.paused;
275
+ }
276
+ else {
277
+ return;
278
+ }
279
+ }
280
+ if (this.closing) {
281
+ return;
282
+ }
283
+ if (this.drained && block && !this.limitUntil && !this.waiting) {
284
+ this.waiting = this.waitForJob(bclient, this.blockUntil);
285
+ try {
286
+ this.blockUntil = await this.waiting;
287
+ if (this.blockUntil <= 0 || this.blockUntil - Date.now() < 1) {
288
+ return await this.moveToActive(client, token, this.opts.name);
289
+ }
290
+ }
291
+ catch (err) {
292
+ // Swallow error if locally not paused or not closing since we did not force a disconnection
293
+ if (!(this.paused || this.closing) &&
294
+ (0, utils_1.isNotConnectionError)(err)) {
295
+ throw err;
296
+ }
297
+ }
298
+ finally {
299
+ this.waiting = null;
300
+ }
301
+ }
302
+ else {
303
+ const limitUntil = this.limitUntil;
304
+ if (limitUntil) {
305
+ (_a = this.abortDelayController) === null || _a === void 0 ? void 0 : _a.abort();
306
+ this.abortDelayController = new node_abort_controller_1.AbortController();
307
+ await this.delay(this.getLimitUntil(limitUntil), this.abortDelayController);
308
+ }
309
+ return this.moveToActive(client, token, this.opts.name);
310
+ }
311
+ }
312
+ /**
313
+ * Overrides the rate limit to be active for the next jobs.
314
+ * @deprecated This method is deprecated and will be removed in v6. Use queue.rateLimit method instead.
315
+ * @param expireTimeMs - expire time in ms of this rate limit.
316
+ */
317
+ async rateLimit(expireTimeMs) {
318
+ await this.trace(enums_1.SpanKind.INTERNAL, 'rateLimit', this.name, async (span) => {
319
+ span === null || span === void 0 ? void 0 : span.setAttributes({
320
+ [enums_1.TelemetryAttributes.WorkerId]: this.id,
321
+ [enums_1.TelemetryAttributes.WorkerRateLimit]: expireTimeMs,
322
+ });
323
+ await this.client.then(client => client.set(this.keys.limiter, Number.MAX_SAFE_INTEGER, 'PX', expireTimeMs));
324
+ });
325
+ }
326
+ get minimumBlockTimeout() {
327
+ return this.blockingConnection.capabilities.canBlockFor1Ms
328
+ ? /* 1 millisecond is chosen because the granularity of our timestamps are milliseconds.
329
+ Obviously we can still process much faster than 1 job per millisecond but delays and rate limits
330
+ will never work with more accuracy than 1ms. */
331
+ 0.001
332
+ : 0.002;
333
+ }
334
+ async moveToActive(client, token, name) {
335
+ const [jobData, id, limitUntil, delayUntil] = await this.scripts.moveToActive(client, token, name);
336
+ this.updateDelays(limitUntil, delayUntil);
337
+ return this.nextJobFromJobData(jobData, id, token);
338
+ }
339
+ async waitForJob(bclient, blockUntil) {
340
+ if (this.paused) {
341
+ return Infinity;
342
+ }
343
+ let timeout;
344
+ try {
345
+ if (!this.closing && !this.limitUntil) {
346
+ let blockTimeout = this.getBlockTimeout(blockUntil);
347
+ if (blockTimeout > 0) {
348
+ blockTimeout = this.blockingConnection.capabilities.canDoubleTimeout
349
+ ? blockTimeout
350
+ : Math.ceil(blockTimeout);
351
+ // We cannot trust that the blocking connection stays blocking forever
352
+ // due to issues in Redis and IORedis, so we will reconnect if we
353
+ // don't get a response in the expected time.
354
+ timeout = setTimeout(async () => {
355
+ bclient.disconnect(!this.closing);
356
+ }, blockTimeout * 1000 + 1000);
357
+ this.updateDelays(); // reset delays to avoid reusing same values in next iteration
358
+ // Markers should only be used for un-blocking, so we will handle them in this
359
+ // function only.
360
+ const result = await bclient.bzpopmin(this.keys.marker, blockTimeout);
361
+ if (result) {
362
+ const [_key, member, score] = result;
363
+ if (member) {
364
+ return parseInt(score);
365
+ }
366
+ }
367
+ }
368
+ return 0;
369
+ }
370
+ }
371
+ catch (error) {
372
+ if ((0, utils_1.isNotConnectionError)(error)) {
373
+ this.emit('error', error);
374
+ }
375
+ if (!this.closing) {
376
+ await this.delay();
377
+ }
378
+ }
379
+ finally {
380
+ clearTimeout(timeout);
381
+ }
382
+ return Infinity;
383
+ }
384
+ getBlockTimeout(blockUntil) {
385
+ const opts = this.opts;
386
+ // when there are delayed jobs
387
+ if (blockUntil) {
388
+ const blockDelay = blockUntil - Date.now();
389
+ // when we reach the time to get new jobs
390
+ if (blockDelay <= 0) {
391
+ return blockDelay;
392
+ }
393
+ else if (blockDelay < this.minimumBlockTimeout * 1000) {
394
+ return this.minimumBlockTimeout;
395
+ }
396
+ else {
397
+ // We restrict the maximum block timeout to 10 second to avoid
398
+ // blocking the connection for too long in the case of reconnections
399
+ // reference: https://github.com/taskforcesh/bullmq/issues/1658
400
+ return Math.min(blockDelay / 1000, maximumBlockTimeout);
401
+ }
402
+ }
403
+ else {
404
+ return Math.max(opts.drainDelay, this.minimumBlockTimeout);
405
+ }
406
+ }
407
+ getLimitUntil(limitUntil) {
408
+ // We restrict the maximum limit until to 30 second to
409
+ // be able to promote delayed jobs while queue is rate limited
410
+ return Math.min(limitUntil, maximumLimitUntil);
411
+ }
412
+ /**
413
+ *
414
+ * This function is exposed only for testing purposes.
415
+ */
416
+ async delay(milliseconds, abortController) {
417
+ await (0, utils_1.delay)(milliseconds || utils_1.DELAY_TIME_1, abortController);
418
+ }
419
+ updateDelays(limitUntil = 0, delayUntil = 0) {
420
+ this.limitUntil = Math.max(limitUntil, 0) || 0;
421
+ this.blockUntil = Math.max(delayUntil, 0) || 0;
422
+ }
423
+ async nextJobFromJobData(jobData, jobId, token) {
424
+ if (!jobData) {
425
+ if (!this.drained) {
426
+ this.emit('drained');
427
+ this.drained = true;
428
+ }
429
+ }
430
+ else {
431
+ this.drained = false;
432
+ const job = this.createJob(jobData, jobId);
433
+ job.token = token;
434
+ // Add next scheduled job if necessary.
435
+ if (job.opts.repeat && !job.nextRepeatableJobId) {
436
+ // Use new job scheduler if possible
437
+ if (job.repeatJobKey) {
438
+ const jobScheduler = await this.jobScheduler;
439
+ await jobScheduler.upsertJobScheduler(job.repeatJobKey, job.opts.repeat, job.name, job.data, job.opts, { override: false, producerId: job.id });
440
+ }
441
+ else {
442
+ const repeat = await this.repeat;
443
+ await repeat.updateRepeatableJob(job.name, job.data, job.opts, {
444
+ override: false,
445
+ });
446
+ }
447
+ }
448
+ return job;
449
+ }
450
+ }
451
+ async processJob(job, token, fetchNextCallback = () => true, jobsInProgress) {
452
+ var _a, _b;
453
+ if (!job || this.closing || this.paused) {
454
+ return;
455
+ }
456
+ const srcPropagationMedatada = (_b = (_a = job.opts) === null || _a === void 0 ? void 0 : _a.telemetry) === null || _b === void 0 ? void 0 : _b.metadata;
457
+ return this.trace(enums_1.SpanKind.CONSUMER, 'process', this.name, async (span) => {
458
+ span === null || span === void 0 ? void 0 : span.setAttributes({
459
+ [enums_1.TelemetryAttributes.WorkerId]: this.id,
460
+ [enums_1.TelemetryAttributes.WorkerName]: this.opts.name,
461
+ [enums_1.TelemetryAttributes.JobId]: job.id,
462
+ });
463
+ const handleCompleted = async (result) => {
464
+ jobsInProgress.delete(inProgressItem);
465
+ if (!this.connection.closing) {
466
+ const completed = await job.moveToCompleted(result, token, fetchNextCallback() && !(this.closing || this.paused));
467
+ this.emit('completed', job, result, 'active');
468
+ span === null || span === void 0 ? void 0 : span.addEvent('job completed', {
469
+ [enums_1.TelemetryAttributes.JobResult]: JSON.stringify(result),
470
+ });
471
+ const [jobData, jobId, limitUntil, delayUntil] = completed || [];
472
+ this.updateDelays(limitUntil, delayUntil);
473
+ return this.nextJobFromJobData(jobData, jobId, token);
474
+ }
475
+ };
476
+ const handleFailed = async (err) => {
477
+ jobsInProgress.delete(inProgressItem);
478
+ if (!this.connection.closing) {
479
+ try {
480
+ // Check if the job was manually rate-limited
481
+ if (err.message == errors_1.RATE_LIMIT_ERROR) {
482
+ this.limitUntil = await this.moveLimitedBackToWait(job, token);
483
+ return;
484
+ }
485
+ if (err instanceof errors_1.DelayedError ||
486
+ err.name == 'DelayedError' ||
487
+ err instanceof errors_1.WaitingChildrenError ||
488
+ err.name == 'WaitingChildrenError') {
489
+ return;
490
+ }
491
+ const result = await job.moveToFailed(err, token, true);
492
+ this.emit('failed', job, err, 'active');
493
+ span === null || span === void 0 ? void 0 : span.addEvent('job failed', {
494
+ [enums_1.TelemetryAttributes.JobFailedReason]: err.message,
495
+ });
496
+ if (result) {
497
+ const [jobData, jobId, limitUntil, delayUntil] = result;
498
+ this.updateDelays(limitUntil, delayUntil);
499
+ return this.nextJobFromJobData(jobData, jobId, token);
500
+ }
501
+ }
502
+ catch (err) {
503
+ this.emit('error', err);
504
+ // It probably means that the job has lost the lock before completion
505
+ // A worker will (or already has) moved the job back
506
+ // to the waiting list (as stalled)
507
+ span === null || span === void 0 ? void 0 : span.recordException(err.message);
508
+ }
509
+ }
510
+ };
511
+ this.emit('active', job, 'waiting');
512
+ const processedOn = Date.now();
513
+ const inProgressItem = { job, ts: processedOn };
514
+ try {
515
+ jobsInProgress.add(inProgressItem);
516
+ const result = await this.callProcessJob(job, token);
517
+ return await handleCompleted(result);
518
+ }
519
+ catch (err) {
520
+ const failed = await handleFailed(err);
521
+ return failed;
522
+ }
523
+ finally {
524
+ span === null || span === void 0 ? void 0 : span.setAttributes({
525
+ [enums_1.TelemetryAttributes.JobFinishedTimestamp]: Date.now(),
526
+ [enums_1.TelemetryAttributes.JobProcessedTimestamp]: processedOn,
527
+ });
528
+ }
529
+ }, srcPropagationMedatada);
530
+ }
531
+ /**
532
+ *
533
+ * Pauses the processing of this queue only for this worker.
534
+ */
535
+ async pause(doNotWaitActive) {
536
+ await this.trace(enums_1.SpanKind.INTERNAL, 'pause', this.name, async (span) => {
537
+ span === null || span === void 0 ? void 0 : span.setAttributes({
538
+ [enums_1.TelemetryAttributes.WorkerId]: this.id,
539
+ [enums_1.TelemetryAttributes.WorkerName]: this.opts.name,
540
+ [enums_1.TelemetryAttributes.WorkerDoNotWaitActive]: doNotWaitActive,
541
+ });
542
+ if (!this.paused) {
543
+ this.paused = new Promise(resolve => {
544
+ this.resumeWorker = function () {
545
+ resolve();
546
+ this.paused = null; // Allow pause to be checked externally for paused state.
547
+ this.resumeWorker = null;
548
+ };
549
+ });
550
+ await (!doNotWaitActive && this.whenCurrentJobsFinished());
551
+ this.emit('paused');
552
+ }
553
+ });
554
+ }
555
+ /**
556
+ *
557
+ * Resumes processing of this worker (if paused).
558
+ */
559
+ resume() {
560
+ if (this.resumeWorker) {
561
+ this.trace(enums_1.SpanKind.INTERNAL, 'resume', this.name, span => {
562
+ span === null || span === void 0 ? void 0 : span.setAttributes({
563
+ [enums_1.TelemetryAttributes.WorkerId]: this.id,
564
+ [enums_1.TelemetryAttributes.WorkerName]: this.opts.name,
565
+ });
566
+ this.resumeWorker();
567
+ this.emit('resumed');
568
+ });
569
+ }
570
+ }
571
+ /**
572
+ *
573
+ * Checks if worker is paused.
574
+ *
575
+ * @returns true if worker is paused, false otherwise.
576
+ */
577
+ isPaused() {
578
+ return !!this.paused;
579
+ }
580
+ /**
581
+ *
582
+ * Checks if worker is currently running.
583
+ *
584
+ * @returns true if worker is running, false otherwise.
585
+ */
586
+ isRunning() {
587
+ return this.running;
588
+ }
589
+ /**
590
+ *
591
+ * Closes the worker and related redis connections.
592
+ *
593
+ * This method waits for current jobs to finalize before returning.
594
+ *
595
+ * @param force - Use force boolean parameter if you do not want to wait for
596
+ * current jobs to be processed. When using telemetry, be mindful that it can
597
+ * interfere with the proper closure of spans, potentially preventing them from being exported.
598
+ *
599
+ * @returns Promise that resolves when the worker has been closed.
600
+ */
601
+ async close(force = false) {
602
+ if (this.closing) {
603
+ return this.closing;
604
+ }
605
+ await this.trace(enums_1.SpanKind.INTERNAL, 'close', this.name, async (span) => {
606
+ span === null || span === void 0 ? void 0 : span.setAttributes({
607
+ [enums_1.TelemetryAttributes.WorkerId]: this.id,
608
+ [enums_1.TelemetryAttributes.WorkerName]: this.opts.name,
609
+ [enums_1.TelemetryAttributes.WorkerForceClose]: force,
610
+ });
611
+ this.closing = (async () => {
612
+ var _a, _b;
613
+ this.emit('closing', 'closing queue');
614
+ (_a = this.abortDelayController) === null || _a === void 0 ? void 0 : _a.abort();
615
+ this.resume();
616
+ // Define the async cleanup functions
617
+ const asyncCleanups = [
618
+ () => {
619
+ return force || this.whenCurrentJobsFinished(false);
620
+ },
621
+ () => { var _a; return (_a = this.childPool) === null || _a === void 0 ? void 0 : _a.clean(); },
622
+ () => this.blockingConnection.close(force),
623
+ () => this.connection.close(force),
624
+ ];
625
+ // Run cleanup functions sequentially and make sure all are run despite any errors
626
+ for (const cleanup of asyncCleanups) {
627
+ try {
628
+ await cleanup();
629
+ }
630
+ catch (err) {
631
+ this.emit('error', err);
632
+ }
633
+ }
634
+ clearTimeout(this.extendLocksTimer);
635
+ (_b = this.stalledCheckStopper) === null || _b === void 0 ? void 0 : _b.call(this);
636
+ this.closed = true;
637
+ this.emit('closed');
638
+ })();
639
+ return await this.closing;
640
+ });
641
+ }
642
+ /**
643
+ *
644
+ * Manually starts the stalled checker.
645
+ * The check will run once as soon as this method is called, and
646
+ * then every opts.stalledInterval milliseconds until the worker is closed.
647
+ * Note: Normally you do not need to call this method, since the stalled checker
648
+ * is automatically started when the worker starts processing jobs after
649
+ * calling run. However if you want to process the jobs manually you need
650
+ * to call this method to start the stalled checker.
651
+ *
652
+ * @see {@link https://docs.bullmq.io/patterns/manually-fetching-jobs}
653
+ */
654
+ async startStalledCheckTimer() {
655
+ if (!this.opts.skipStalledCheck) {
656
+ if (!this.closing) {
657
+ await this.trace(enums_1.SpanKind.INTERNAL, 'startStalledCheckTimer', this.name, async (span) => {
658
+ span === null || span === void 0 ? void 0 : span.setAttributes({
659
+ [enums_1.TelemetryAttributes.WorkerId]: this.id,
660
+ [enums_1.TelemetryAttributes.WorkerName]: this.opts.name,
661
+ });
662
+ this.stalledChecker().catch(err => {
663
+ this.emit('error', err);
664
+ });
665
+ });
666
+ }
667
+ }
668
+ }
669
+ async stalledChecker() {
670
+ while (!this.closing) {
671
+ try {
672
+ await this.checkConnectionError(() => this.moveStalledJobsToWait());
673
+ }
674
+ catch (err) {
675
+ this.emit('error', err);
676
+ }
677
+ await new Promise(resolve => {
678
+ const timeout = setTimeout(resolve, this.opts.stalledInterval);
679
+ this.stalledCheckStopper = () => {
680
+ clearTimeout(timeout);
681
+ resolve();
682
+ };
683
+ });
684
+ }
685
+ }
686
+ startLockExtenderTimer(jobsInProgress) {
687
+ if (!this.opts.skipLockRenewal) {
688
+ clearTimeout(this.extendLocksTimer);
689
+ if (!this.closed) {
690
+ this.extendLocksTimer = setTimeout(async () => {
691
+ // Get all the jobs whose locks expire in less than 1/2 of the lockRenewTime
692
+ const now = Date.now();
693
+ const jobsToExtend = [];
694
+ for (const item of jobsInProgress) {
695
+ const { job, ts } = item;
696
+ if (!ts) {
697
+ item.ts = now;
698
+ continue;
699
+ }
700
+ if (ts + this.opts.lockRenewTime / 2 < now) {
701
+ item.ts = now;
702
+ jobsToExtend.push(job);
703
+ }
704
+ }
705
+ try {
706
+ if (jobsToExtend.length) {
707
+ await this.extendLocks(jobsToExtend);
708
+ }
709
+ }
710
+ catch (err) {
711
+ this.emit('error', err);
712
+ }
713
+ this.startLockExtenderTimer(jobsInProgress);
714
+ }, this.opts.lockRenewTime / 2);
715
+ }
716
+ }
717
+ }
718
+ /**
719
+ * Returns a promise that resolves when active jobs are cleared
720
+ *
721
+ * @returns
722
+ */
723
+ async whenCurrentJobsFinished(reconnect = true) {
724
+ //
725
+ // Force reconnection of blocking connection to abort blocking redis call immediately.
726
+ //
727
+ if (this.waiting) {
728
+ // If we are not going to reconnect, we will not wait for the disconnection.
729
+ await this.blockingConnection.disconnect(reconnect);
730
+ }
731
+ else {
732
+ reconnect = false;
733
+ }
734
+ if (this.asyncFifoQueue) {
735
+ await this.asyncFifoQueue.waitAll();
736
+ }
737
+ reconnect && (await this.blockingConnection.reconnect());
738
+ }
739
+ async retryIfFailed(fn, delayInMs) {
740
+ const retry = 1;
741
+ do {
742
+ try {
743
+ return await fn();
744
+ }
745
+ catch (err) {
746
+ this.emit('error', err);
747
+ if (delayInMs) {
748
+ await this.delay(delayInMs);
749
+ }
750
+ else {
751
+ return;
752
+ }
753
+ }
754
+ } while (retry);
755
+ }
756
+ async extendLocks(jobs) {
757
+ await this.trace(enums_1.SpanKind.INTERNAL, 'extendLocks', this.name, async (span) => {
758
+ span === null || span === void 0 ? void 0 : span.setAttributes({
759
+ [enums_1.TelemetryAttributes.WorkerId]: this.id,
760
+ [enums_1.TelemetryAttributes.WorkerName]: this.opts.name,
761
+ [enums_1.TelemetryAttributes.WorkerJobsToExtendLocks]: jobs.map(job => job.id),
762
+ });
763
+ try {
764
+ const erroredJobIds = await this.scripts.extendLocks(jobs.map(job => job.id), jobs.map(job => job.token), this.opts.lockDuration);
765
+ for (const jobId of erroredJobIds) {
766
+ // TODO: Send signal to process function that the job has been lost.
767
+ this.emit('error', new Error(`could not renew lock for job ${jobId}`));
768
+ }
769
+ }
770
+ catch (err) {
771
+ this.emit('error', err);
772
+ }
773
+ });
774
+ }
775
+ async moveStalledJobsToWait() {
776
+ await this.trace(enums_1.SpanKind.INTERNAL, 'moveStalledJobsToWait', this.name, async (span) => {
777
+ const chunkSize = 50;
778
+ const [failed, stalled] = await this.scripts.moveStalledJobsToWait();
779
+ span === null || span === void 0 ? void 0 : span.setAttributes({
780
+ [enums_1.TelemetryAttributes.WorkerId]: this.id,
781
+ [enums_1.TelemetryAttributes.WorkerName]: this.opts.name,
782
+ [enums_1.TelemetryAttributes.WorkerStalledJobs]: stalled,
783
+ [enums_1.TelemetryAttributes.WorkerFailedJobs]: failed,
784
+ });
785
+ stalled.forEach((jobId) => {
786
+ span === null || span === void 0 ? void 0 : span.addEvent('job stalled', {
787
+ [enums_1.TelemetryAttributes.JobId]: jobId,
788
+ });
789
+ this.emit('stalled', jobId, 'active');
790
+ });
791
+ // Todo: check if there any listeners on failed event
792
+ const jobPromises = [];
793
+ for (let i = 0; i < failed.length; i++) {
794
+ jobPromises.push(job_1.Job.fromId(this, failed[i]));
795
+ if ((i + 1) % chunkSize === 0) {
796
+ this.notifyFailedJobs(await Promise.all(jobPromises));
797
+ jobPromises.length = 0;
798
+ }
799
+ }
800
+ this.notifyFailedJobs(await Promise.all(jobPromises));
801
+ });
802
+ }
803
+ notifyFailedJobs(failedJobs, span) {
804
+ const failedReason = 'job stalled more than allowable limit';
805
+ failedJobs.forEach((job) => {
806
+ span === null || span === void 0 ? void 0 : span.addEvent('job failed', {
807
+ [enums_1.TelemetryAttributes.JobId]: job.id,
808
+ [enums_1.TelemetryAttributes.JobName]: job.name,
809
+ [enums_1.TelemetryAttributes.JobFailedReason]: failedReason,
810
+ });
811
+ this.emit('failed', job, new Error(failedReason), 'active');
812
+ });
813
+ }
814
+ moveLimitedBackToWait(job, token) {
815
+ return this.scripts.moveJobFromActiveToWait(job.id, token);
816
+ }
817
+ }
818
+ exports.Worker = Worker;
819
+ //# sourceMappingURL=worker.js.map