@orchestr-sh/orchestr 1.11.0 → 1.11.2

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 (340) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/CODE_OF_CONDUCT.md +43 -0
  3. package/CONTRIBUTING.md +274 -0
  4. package/dist/Cache/CacheManager.cjs +1 -1
  5. package/dist/Cache/CacheManager.mjs +1 -1
  6. package/dist/Cache/CacheManager.mjs.map +1 -1
  7. package/dist/Cache/Events/CacheFlushed.cjs +1 -1
  8. package/dist/Cache/Events/CacheFlushed.mjs +1 -1
  9. package/dist/Cache/Events/CacheFlushed.mjs.map +1 -1
  10. package/dist/Cache/Events/CacheHit.cjs +1 -1
  11. package/dist/Cache/Events/CacheHit.mjs +1 -1
  12. package/dist/Cache/Events/CacheHit.mjs.map +1 -1
  13. package/dist/Cache/Events/CacheMissed.cjs +1 -1
  14. package/dist/Cache/Events/CacheMissed.mjs +1 -1
  15. package/dist/Cache/Events/CacheMissed.mjs.map +1 -1
  16. package/dist/Cache/Events/KeyForgotten.cjs +1 -1
  17. package/dist/Cache/Events/KeyForgotten.mjs +1 -1
  18. package/dist/Cache/Events/KeyForgotten.mjs.map +1 -1
  19. package/dist/Cache/Events/KeyWritten.cjs +1 -1
  20. package/dist/Cache/Events/KeyWritten.mjs +1 -1
  21. package/dist/Cache/Events/KeyWritten.mjs.map +1 -1
  22. package/dist/Cache/Locks/CacheLock.cjs +1 -1
  23. package/dist/Cache/Locks/CacheLock.mjs +1 -1
  24. package/dist/Cache/Locks/CacheLock.mjs.map +1 -1
  25. package/dist/Cache/Locks/Lock.cjs +1 -1
  26. package/dist/Cache/Locks/Lock.mjs +1 -1
  27. package/dist/Cache/Locks/Lock.mjs.map +1 -1
  28. package/dist/Cache/Repository.cjs +1 -1
  29. package/dist/Cache/Repository.mjs +1 -1
  30. package/dist/Cache/Repository.mjs.map +1 -1
  31. package/dist/Cache/Stores/ArrayStore.cjs +1 -1
  32. package/dist/Cache/Stores/ArrayStore.mjs +1 -1
  33. package/dist/Cache/Stores/ArrayStore.mjs.map +1 -1
  34. package/dist/Cache/Stores/DatabaseStore.cjs +1 -1
  35. package/dist/Cache/Stores/DatabaseStore.mjs +1 -1
  36. package/dist/Cache/Stores/DatabaseStore.mjs.map +1 -1
  37. package/dist/Cache/Stores/FileStore.cjs +1 -1
  38. package/dist/Cache/Stores/FileStore.mjs +1 -1
  39. package/dist/Cache/Stores/FileStore.mjs.map +1 -1
  40. package/dist/Cache/Tags/TagSet.cjs +1 -1
  41. package/dist/Cache/Tags/TagSet.mjs +1 -1
  42. package/dist/Cache/Tags/TagSet.mjs.map +1 -1
  43. package/dist/Cache/Tags/TaggedCache.cjs +1 -1
  44. package/dist/Cache/Tags/TaggedCache.mjs +1 -1
  45. package/dist/Cache/Tags/TaggedCache.mjs.map +1 -1
  46. package/dist/Console/Commands/CacheClearCommand.cjs +1 -1
  47. package/dist/Console/Commands/CacheClearCommand.mjs +1 -1
  48. package/dist/Console/Commands/CacheClearCommand.mjs.map +1 -1
  49. package/dist/Console/Commands/CacheForgetCommand.cjs +1 -1
  50. package/dist/Console/Commands/CacheForgetCommand.mjs +1 -1
  51. package/dist/Console/Commands/CacheForgetCommand.mjs.map +1 -1
  52. package/dist/Console/Commands/CacheTableCommand.cjs +1 -1
  53. package/dist/Console/Commands/CacheTableCommand.mjs +1 -1
  54. package/dist/Console/Commands/CacheTableCommand.mjs.map +1 -1
  55. package/dist/Console/Commands/DeployCommand.mjs.map +1 -1
  56. package/dist/Console/Commands/DeployEnvCommand.mjs.map +1 -1
  57. package/dist/Console/Commands/DeployInitCommand.mjs.map +1 -1
  58. package/dist/Console/Commands/DeployProvisionCommand.mjs.map +1 -1
  59. package/dist/Console/Commands/DeployRollbackCommand.mjs.map +1 -1
  60. package/dist/Console/Commands/DeployServerCommand.mjs.map +1 -1
  61. package/dist/Console/Commands/DeployStatusCommand.mjs.map +1 -1
  62. package/dist/Console/Commands/EventCacheCommand.cjs +1 -1
  63. package/dist/Console/Commands/EventCacheCommand.mjs +1 -1
  64. package/dist/Console/Commands/EventCacheCommand.mjs.map +1 -1
  65. package/dist/Console/Commands/EventClearCommand.cjs +1 -1
  66. package/dist/Console/Commands/EventClearCommand.mjs +1 -1
  67. package/dist/Console/Commands/EventClearCommand.mjs.map +1 -1
  68. package/dist/Console/Commands/EventListCommand.cjs +1 -1
  69. package/dist/Console/Commands/EventListCommand.mjs +1 -1
  70. package/dist/Console/Commands/EventListCommand.mjs.map +1 -1
  71. package/dist/Console/Commands/MakeControllerCommand.cjs +1 -1
  72. package/dist/Console/Commands/MakeControllerCommand.mjs +1 -1
  73. package/dist/Console/Commands/MakeControllerCommand.mjs.map +1 -1
  74. package/dist/Console/Commands/MakeEventCommand.cjs +1 -1
  75. package/dist/Console/Commands/MakeEventCommand.mjs +1 -1
  76. package/dist/Console/Commands/MakeEventCommand.mjs.map +1 -1
  77. package/dist/Console/Commands/MakeJobCommand.cjs +1 -1
  78. package/dist/Console/Commands/MakeJobCommand.mjs +1 -1
  79. package/dist/Console/Commands/MakeJobCommand.mjs.map +1 -1
  80. package/dist/Console/Commands/MakeListenerCommand.cjs +1 -1
  81. package/dist/Console/Commands/MakeListenerCommand.mjs +1 -1
  82. package/dist/Console/Commands/MakeListenerCommand.mjs.map +1 -1
  83. package/dist/Console/Commands/MakeMigrationCommand.cjs +1 -1
  84. package/dist/Console/Commands/MakeMigrationCommand.mjs +1 -1
  85. package/dist/Console/Commands/MakeMigrationCommand.mjs.map +1 -1
  86. package/dist/Console/Commands/MakeSeederCommand.cjs +1 -1
  87. package/dist/Console/Commands/MakeSeederCommand.mjs +1 -1
  88. package/dist/Console/Commands/MakeSeederCommand.mjs.map +1 -1
  89. package/dist/Console/Commands/MakeViewCommand.cjs +1 -1
  90. package/dist/Console/Commands/MakeViewCommand.mjs +1 -1
  91. package/dist/Console/Commands/MakeViewCommand.mjs.map +1 -1
  92. package/dist/Console/Commands/MigrateCommand.cjs +1 -1
  93. package/dist/Console/Commands/MigrateCommand.mjs +1 -1
  94. package/dist/Console/Commands/MigrateCommand.mjs.map +1 -1
  95. package/dist/Console/Commands/MigrateFreshCommand.cjs +1 -1
  96. package/dist/Console/Commands/MigrateFreshCommand.mjs +1 -1
  97. package/dist/Console/Commands/MigrateFreshCommand.mjs.map +1 -1
  98. package/dist/Console/Commands/MigrateRefreshCommand.cjs +1 -1
  99. package/dist/Console/Commands/MigrateRefreshCommand.mjs +1 -1
  100. package/dist/Console/Commands/MigrateRefreshCommand.mjs.map +1 -1
  101. package/dist/Console/Commands/MigrateResetCommand.cjs +1 -1
  102. package/dist/Console/Commands/MigrateResetCommand.mjs +1 -1
  103. package/dist/Console/Commands/MigrateResetCommand.mjs.map +1 -1
  104. package/dist/Console/Commands/MigrateRollbackCommand.cjs +1 -1
  105. package/dist/Console/Commands/MigrateRollbackCommand.mjs +1 -1
  106. package/dist/Console/Commands/MigrateRollbackCommand.mjs.map +1 -1
  107. package/dist/Console/Commands/MigrateStatusCommand.cjs +1 -1
  108. package/dist/Console/Commands/MigrateStatusCommand.mjs +1 -1
  109. package/dist/Console/Commands/MigrateStatusCommand.mjs.map +1 -1
  110. package/dist/Console/Commands/QueueBatchesTableCommand.cjs +1 -1
  111. package/dist/Console/Commands/QueueBatchesTableCommand.mjs +1 -1
  112. package/dist/Console/Commands/QueueBatchesTableCommand.mjs.map +1 -1
  113. package/dist/Console/Commands/QueueClearCommand.cjs +1 -1
  114. package/dist/Console/Commands/QueueClearCommand.mjs +1 -1
  115. package/dist/Console/Commands/QueueClearCommand.mjs.map +1 -1
  116. package/dist/Console/Commands/QueueFailedCommand.cjs +1 -1
  117. package/dist/Console/Commands/QueueFailedCommand.mjs +1 -1
  118. package/dist/Console/Commands/QueueFailedCommand.mjs.map +1 -1
  119. package/dist/Console/Commands/QueueFailedTableCommand.cjs +1 -1
  120. package/dist/Console/Commands/QueueFailedTableCommand.mjs +1 -1
  121. package/dist/Console/Commands/QueueFailedTableCommand.mjs.map +1 -1
  122. package/dist/Console/Commands/QueueFlushCommand.cjs +1 -1
  123. package/dist/Console/Commands/QueueFlushCommand.mjs +1 -1
  124. package/dist/Console/Commands/QueueFlushCommand.mjs.map +1 -1
  125. package/dist/Console/Commands/QueueForgetCommand.cjs +1 -1
  126. package/dist/Console/Commands/QueueForgetCommand.mjs +1 -1
  127. package/dist/Console/Commands/QueueForgetCommand.mjs.map +1 -1
  128. package/dist/Console/Commands/QueueMonitorCommand.cjs +1 -1
  129. package/dist/Console/Commands/QueueMonitorCommand.mjs +1 -1
  130. package/dist/Console/Commands/QueueMonitorCommand.mjs.map +1 -1
  131. package/dist/Console/Commands/QueuePruneBatchesCommand.cjs +1 -1
  132. package/dist/Console/Commands/QueuePruneBatchesCommand.mjs +1 -1
  133. package/dist/Console/Commands/QueuePruneBatchesCommand.mjs.map +1 -1
  134. package/dist/Console/Commands/QueuePruneFailedCommand.cjs +1 -1
  135. package/dist/Console/Commands/QueuePruneFailedCommand.mjs +1 -1
  136. package/dist/Console/Commands/QueuePruneFailedCommand.mjs.map +1 -1
  137. package/dist/Console/Commands/QueueRestartCommand.cjs +1 -1
  138. package/dist/Console/Commands/QueueRestartCommand.mjs +1 -1
  139. package/dist/Console/Commands/QueueRestartCommand.mjs.map +1 -1
  140. package/dist/Console/Commands/QueueRetryCommand.cjs +1 -1
  141. package/dist/Console/Commands/QueueRetryCommand.mjs +1 -1
  142. package/dist/Console/Commands/QueueRetryCommand.mjs.map +1 -1
  143. package/dist/Console/Commands/QueueTableCommand.cjs +1 -1
  144. package/dist/Console/Commands/QueueTableCommand.mjs +1 -1
  145. package/dist/Console/Commands/QueueTableCommand.mjs.map +1 -1
  146. package/dist/Console/Commands/QueueWorkCommand.cjs +1 -1
  147. package/dist/Console/Commands/QueueWorkCommand.mjs +1 -1
  148. package/dist/Console/Commands/QueueWorkCommand.mjs.map +1 -1
  149. package/dist/Console/Commands/SeedCommand.cjs +1 -1
  150. package/dist/Console/Commands/SeedCommand.mjs +1 -1
  151. package/dist/Console/Commands/SeedCommand.mjs.map +1 -1
  152. package/dist/Console/ConsoleKernel.cjs +1 -1
  153. package/dist/Console/ConsoleKernel.mjs +1 -1
  154. package/dist/Console/ConsoleKernel.mjs.map +1 -1
  155. package/dist/Console/orchestr.cjs +2 -0
  156. package/dist/Console/orchestr.d.cts +1 -0
  157. package/dist/Console/orchestr.d.mts +1 -0
  158. package/dist/Console/orchestr.mjs +3 -0
  159. package/dist/Console/orchestr.mjs.map +1 -0
  160. package/dist/Container/Container.mjs.map +1 -1
  161. package/dist/Database/Adapters/DrizzleAdapter.cjs +1 -1
  162. package/dist/Database/Adapters/DrizzleAdapter.mjs +1 -1
  163. package/dist/Database/Adapters/DrizzleAdapter.mjs.map +1 -1
  164. package/dist/Database/Connection.cjs +1 -1
  165. package/dist/Database/Connection.mjs +1 -1
  166. package/dist/Database/Connection.mjs.map +1 -1
  167. package/dist/Database/DatabaseManager.cjs +1 -1
  168. package/dist/Database/DatabaseManager.mjs +1 -1
  169. package/dist/Database/DatabaseManager.mjs.map +1 -1
  170. package/dist/Database/Ensemble/Ensemble.mjs.map +1 -1
  171. package/dist/Database/Ensemble/EnsembleBuilder.mjs.map +1 -1
  172. package/dist/Database/Ensemble/EnsembleCollection.cjs +1 -1
  173. package/dist/Database/Ensemble/EnsembleCollection.mjs +1 -1
  174. package/dist/Database/Ensemble/EnsembleCollection.mjs.map +1 -1
  175. package/dist/Database/Ensemble/Relations/BelongsTo.mjs.map +1 -1
  176. package/dist/Database/Ensemble/Relations/BelongsToMany.cjs +1 -1
  177. package/dist/Database/Ensemble/Relations/BelongsToMany.mjs +1 -1
  178. package/dist/Database/Ensemble/Relations/BelongsToMany.mjs.map +1 -1
  179. package/dist/Database/Ensemble/Relations/HasMany.mjs.map +1 -1
  180. package/dist/Database/Ensemble/Relations/MorphTo.mjs.map +1 -1
  181. package/dist/Database/Ensemble/Relations/MorphToMany.mjs.map +1 -1
  182. package/dist/Database/Migrations/Blueprint.cjs +1 -1
  183. package/dist/Database/Migrations/Blueprint.mjs +1 -1
  184. package/dist/Database/Migrations/Blueprint.mjs.map +1 -1
  185. package/dist/Database/Migrations/MigrationCreator.cjs +1 -1
  186. package/dist/Database/Migrations/MigrationCreator.mjs +1 -1
  187. package/dist/Database/Migrations/MigrationCreator.mjs.map +1 -1
  188. package/dist/Database/Migrations/MigrationRepository.cjs +1 -1
  189. package/dist/Database/Migrations/MigrationRepository.mjs +1 -1
  190. package/dist/Database/Migrations/MigrationRepository.mjs.map +1 -1
  191. package/dist/Database/Migrations/Migrator.cjs +1 -1
  192. package/dist/Database/Migrations/Migrator.mjs +1 -1
  193. package/dist/Database/Migrations/Migrator.mjs.map +1 -1
  194. package/dist/Database/Migrations/SchemaBuilder.cjs +1 -1
  195. package/dist/Database/Migrations/SchemaBuilder.mjs +1 -1
  196. package/dist/Database/Migrations/SchemaBuilder.mjs.map +1 -1
  197. package/dist/Database/Query/Builder.cjs +1 -1
  198. package/dist/Database/Query/Builder.mjs +1 -1
  199. package/dist/Database/Query/Builder.mjs.map +1 -1
  200. package/dist/Database/Query/Expression.cjs +1 -1
  201. package/dist/Database/Query/Expression.mjs +1 -1
  202. package/dist/Database/Query/Expression.mjs.map +1 -1
  203. package/dist/Database/Seeders/SeederRunner.cjs +1 -1
  204. package/dist/Database/Seeders/SeederRunner.mjs +1 -1
  205. package/dist/Database/Seeders/SeederRunner.mjs.map +1 -1
  206. package/dist/Deploy/Deployer.cjs +1 -1
  207. package/dist/Deploy/Deployer.mjs +1 -1
  208. package/dist/Deploy/Deployer.mjs.map +1 -1
  209. package/dist/Deploy/ProjectConfig.mjs.map +1 -1
  210. package/dist/Deploy/Provisioner.cjs +1 -1
  211. package/dist/Deploy/Provisioner.mjs +1 -1
  212. package/dist/Deploy/Provisioner.mjs.map +1 -1
  213. package/dist/Deploy/SSHConnection.mjs.map +1 -1
  214. package/dist/Deploy/SymphonyClient.cjs +1 -1
  215. package/dist/Deploy/SymphonyClient.mjs +1 -1
  216. package/dist/Deploy/SymphonyClient.mjs.map +1 -1
  217. package/dist/Deploy/TarBuilder.mjs.map +1 -1
  218. package/dist/Deploy/prompt.mjs.map +1 -1
  219. package/dist/Events/Dispatcher.cjs +1 -1
  220. package/dist/Events/Dispatcher.d.cts +1 -1
  221. package/dist/Events/Dispatcher.d.mts +1 -1
  222. package/dist/Events/Dispatcher.mjs +1 -1
  223. package/dist/Events/Dispatcher.mjs.map +1 -1
  224. package/dist/Events/EventServiceProvider.cjs +1 -1
  225. package/dist/Events/EventServiceProvider.d.cts +1 -1
  226. package/dist/Events/EventServiceProvider.d.mts +1 -1
  227. package/dist/Events/EventServiceProvider.mjs.map +1 -1
  228. package/dist/Events/index.cjs +1 -0
  229. package/dist/Events/index.d.cts +7 -0
  230. package/dist/Events/index.d.mts +7 -0
  231. package/dist/Events/index.mjs +1 -0
  232. package/dist/Facades/Bus.mjs.map +1 -1
  233. package/dist/Facades/Cache.mjs.map +1 -1
  234. package/dist/Facades/Config.mjs.map +1 -1
  235. package/dist/Facades/DB.mjs.map +1 -1
  236. package/dist/Facades/Event.d.cts +1 -1
  237. package/dist/Facades/Event.d.mts +1 -1
  238. package/dist/Facades/Event.mjs.map +1 -1
  239. package/dist/Facades/Queue.mjs.map +1 -1
  240. package/dist/Facades/Route.d.cts +1 -1
  241. package/dist/Facades/Route.d.mts +1 -1
  242. package/dist/Facades/Route.mjs.map +1 -1
  243. package/dist/Facades/View.mjs.map +1 -1
  244. package/dist/Facades/index.cjs +1 -0
  245. package/dist/Facades/index.d.cts +9 -0
  246. package/dist/Facades/index.d.mts +9 -0
  247. package/dist/Facades/index.mjs +1 -0
  248. package/dist/Foundation/Application.mjs.map +1 -1
  249. package/dist/Foundation/Config/ConfigServiceProvider.d.cts +1 -1
  250. package/dist/Foundation/Config/ConfigServiceProvider.d.mts +1 -1
  251. package/dist/Foundation/Http/FormRequest.d.cts +1 -1
  252. package/dist/Foundation/Http/FormRequest.d.mts +1 -1
  253. package/dist/Foundation/Http/FormRequest.mjs.map +1 -1
  254. package/dist/Foundation/Http/Rules/AnyOfRule.mjs.map +1 -1
  255. package/dist/Foundation/Http/Rules/ImageFileRule.mjs.map +1 -1
  256. package/dist/Foundation/Http/Validator.mjs.map +1 -1
  257. package/dist/Queue/Batching/Batch.cjs +1 -1
  258. package/dist/Queue/Batching/Batch.mjs +1 -1
  259. package/dist/Queue/Batching/Batch.mjs.map +1 -1
  260. package/dist/Queue/Batching/PendingBatch.cjs +1 -1
  261. package/dist/Queue/Batching/PendingBatch.mjs +1 -1
  262. package/dist/Queue/Batching/PendingBatch.mjs.map +1 -1
  263. package/dist/Queue/Concerns/Dispatchable.mjs.map +1 -1
  264. package/dist/Queue/Drivers/DatabaseDriver.cjs +1 -1
  265. package/dist/Queue/Drivers/DatabaseDriver.mjs +1 -1
  266. package/dist/Queue/Drivers/DatabaseDriver.mjs.map +1 -1
  267. package/dist/Queue/Drivers/NullDriver.cjs +1 -1
  268. package/dist/Queue/Drivers/NullDriver.mjs +1 -1
  269. package/dist/Queue/Drivers/NullDriver.mjs.map +1 -1
  270. package/dist/Queue/Drivers/SyncDriver.cjs +1 -1
  271. package/dist/Queue/Drivers/SyncDriver.mjs +1 -1
  272. package/dist/Queue/Drivers/SyncDriver.mjs.map +1 -1
  273. package/dist/Queue/Events/JobExceptionOccurred.cjs +1 -1
  274. package/dist/Queue/Events/JobExceptionOccurred.mjs +1 -1
  275. package/dist/Queue/Events/JobExceptionOccurred.mjs.map +1 -1
  276. package/dist/Queue/Events/JobFailed.cjs +1 -1
  277. package/dist/Queue/Events/JobFailed.mjs +1 -1
  278. package/dist/Queue/Events/JobFailed.mjs.map +1 -1
  279. package/dist/Queue/Events/JobProcessed.cjs +1 -1
  280. package/dist/Queue/Events/JobProcessed.mjs +1 -1
  281. package/dist/Queue/Events/JobProcessed.mjs.map +1 -1
  282. package/dist/Queue/Events/JobProcessing.cjs +1 -1
  283. package/dist/Queue/Events/JobProcessing.mjs +1 -1
  284. package/dist/Queue/Events/JobProcessing.mjs.map +1 -1
  285. package/dist/Queue/Events/JobQueued.cjs +1 -1
  286. package/dist/Queue/Events/JobQueued.mjs +1 -1
  287. package/dist/Queue/Events/JobQueued.mjs.map +1 -1
  288. package/dist/Queue/Events/JobRetryRequested.cjs +1 -1
  289. package/dist/Queue/Events/JobRetryRequested.mjs +1 -1
  290. package/dist/Queue/Events/JobRetryRequested.mjs.map +1 -1
  291. package/dist/Queue/Events/WorkerStopping.cjs +1 -1
  292. package/dist/Queue/Events/WorkerStopping.mjs +1 -1
  293. package/dist/Queue/Events/WorkerStopping.mjs.map +1 -1
  294. package/dist/Queue/Failed/DatabaseFailedJobProvider.cjs +1 -1
  295. package/dist/Queue/Failed/DatabaseFailedJobProvider.mjs +1 -1
  296. package/dist/Queue/Failed/DatabaseFailedJobProvider.mjs.map +1 -1
  297. package/dist/Queue/Middleware/RateLimited.cjs +1 -1
  298. package/dist/Queue/Middleware/RateLimited.mjs +1 -1
  299. package/dist/Queue/Middleware/RateLimited.mjs.map +1 -1
  300. package/dist/Queue/Middleware/ThrottlesExceptions.cjs +1 -1
  301. package/dist/Queue/Middleware/ThrottlesExceptions.mjs +1 -1
  302. package/dist/Queue/Middleware/ThrottlesExceptions.mjs.map +1 -1
  303. package/dist/Queue/Middleware/WithoutOverlapping.cjs +1 -1
  304. package/dist/Queue/Middleware/WithoutOverlapping.mjs +1 -1
  305. package/dist/Queue/Middleware/WithoutOverlapping.mjs.map +1 -1
  306. package/dist/Queue/PendingChain.cjs +1 -1
  307. package/dist/Queue/PendingChain.mjs +1 -1
  308. package/dist/Queue/PendingChain.mjs.map +1 -1
  309. package/dist/Queue/PendingDispatch.cjs +1 -1
  310. package/dist/Queue/PendingDispatch.mjs +1 -1
  311. package/dist/Queue/PendingDispatch.mjs.map +1 -1
  312. package/dist/Queue/QueueManager.cjs +1 -1
  313. package/dist/Queue/QueueManager.mjs +1 -1
  314. package/dist/Queue/QueueManager.mjs.map +1 -1
  315. package/dist/Queue/QueueServiceProvider.mjs.map +1 -1
  316. package/dist/Queue/Workers/Worker.cjs +1 -1
  317. package/dist/Queue/Workers/Worker.mjs +1 -1
  318. package/dist/Queue/Workers/Worker.mjs.map +1 -1
  319. package/dist/Routing/Request.mjs.map +1 -1
  320. package/dist/Routing/Response.mjs.map +1 -1
  321. package/dist/Routing/Route.d.cts +1 -1
  322. package/dist/Routing/Route.d.mts +1 -1
  323. package/dist/Routing/Router.d.cts +1 -1
  324. package/dist/Routing/Router.d.mts +1 -1
  325. package/dist/Support/EventDiscovery.cjs +1 -1
  326. package/dist/Support/EventDiscovery.mjs +1 -1
  327. package/dist/Support/EventDiscovery.mjs.map +1 -1
  328. package/dist/Support/Testing/Fakes/EventFake.cjs +1 -1
  329. package/dist/Support/Testing/Fakes/EventFake.d.cts +1 -1
  330. package/dist/Support/Testing/Fakes/EventFake.d.mts +1 -1
  331. package/dist/Support/Testing/Fakes/EventFake.mjs +1 -1
  332. package/dist/Support/Testing/Fakes/EventFake.mjs.map +1 -1
  333. package/dist/Support/helpers.mjs.map +1 -1
  334. package/dist/View/Engines/TemplateEngine.mjs.map +1 -1
  335. package/dist/index.d.cts +19 -19
  336. package/dist/index.d.mts +19 -19
  337. package/docs/events-typescript-usage.md +126 -0
  338. package/docs/future-improvements.md +49 -0
  339. package/docs/validation.md +201 -0
  340. package/package.json +65 -31
@@ -1,2 +1,2 @@
1
- import{Migrator as e}from"../../Database/Migrations/Migrator.mjs";import{Command as t}from"../Command.mjs";var n=class extends t{signature=`migrate:refresh`;description=`Reset and re-run all migrations`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||this.app.databasePath(`migrations`),a=new e(r,Array.isArray(i)?i:[i]);this.info(`Refreshing database...`),this.newLine();try{let e=await a.refresh();e.rolledBack.length>0&&(this.comment(`Rolled back:`),e.rolledBack.forEach(e=>{this.info(` ${e}`)}),this.newLine()),e.ran.length>0&&(this.comment(`Migrated:`),e.ran.forEach(e=>{this.info(` ${e}`)}),this.newLine()),this.info(`Database refresh completed successfully.`)}catch(e){throw this.error(`Refresh failed: ${e.message}`),e}}};export{n as MigrateRefreshCommand};
1
+ import{Migrator as e}from"../../Database/Migrations/Migrator.mjs";import{Command as t}from"../Command.mjs";var n=class extends t{app;signature=`migrate:refresh`;description=`Reset and re-run all migrations`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||this.app.databasePath(`migrations`),a=new e(r,Array.isArray(i)?i:[i]);this.info(`Refreshing database...`),this.newLine();try{let e=await a.refresh();e.rolledBack.length>0&&(this.comment(`Rolled back:`),e.rolledBack.forEach(e=>{this.info(` ${e}`)}),this.newLine()),e.ran.length>0&&(this.comment(`Migrated:`),e.ran.forEach(e=>{this.info(` ${e}`)}),this.newLine()),this.info(`Database refresh completed successfully.`)}catch(e){throw this.error(`Refresh failed: ${e.message}`),e}}};export{n as MigrateRefreshCommand};
2
2
  //# sourceMappingURL=MigrateRefreshCommand.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"MigrateRefreshCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MigrateRefreshCommand.ts"],"sourcesContent":["/**\n * MigrateRefreshCommand\n *\n * Reset and re-run all migrations\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Migrator } from '@/Database/Migrations/Migrator';\nimport { Application } from '@/Foundation/Application';\n\nexport class MigrateRefreshCommand extends Command {\n signature = 'migrate:refresh';\n description = 'Reset and re-run all migrations';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const db = this.app.make('db') as any;\n const connection = db.connection();\n const migrationPath = options.path || this.app.databasePath('migrations');\n const paths = Array.isArray(migrationPath) ? migrationPath : [migrationPath];\n\n const migrator = new Migrator(connection, paths);\n\n this.info('Refreshing database...');\n this.newLine();\n\n try {\n const result = await migrator.refresh();\n\n if (result.rolledBack.length > 0) {\n this.comment('Rolled back:');\n result.rolledBack.forEach((migration) => {\n this.info(` ${migration}`);\n });\n this.newLine();\n }\n\n if (result.ran.length > 0) {\n this.comment('Migrated:');\n result.ran.forEach((migration) => {\n this.info(` ${migration}`);\n });\n this.newLine();\n }\n\n this.info(`Database refresh completed successfully.`);\n } catch (error) {\n this.error(`Refresh failed: ${(error as Error).message}`);\n throw error;\n }\n }\n}\n"],"mappings":"2GAUA,IAAa,EAAb,cAA2C,CAAQ,CACjD,UAAY,kBACZ,YAAc,kCAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CAEnE,IAAM,EADK,KAAK,IAAI,KAAK,KAAK,CACR,YAAY,CAC5B,EAAgB,EAAQ,MAAQ,KAAK,IAAI,aAAa,aAAa,CAGnE,EAAW,IAAI,EAAS,EAFhB,MAAM,QAAQ,EAAc,CAAG,EAAgB,CAAC,EAAc,CAE5B,CAEhD,KAAK,KAAK,yBAAyB,CACnC,KAAK,SAAS,CAEd,GAAI,CACF,IAAM,EAAS,MAAM,EAAS,SAAS,CAEnC,EAAO,WAAW,OAAS,IAC7B,KAAK,QAAQ,eAAe,CAC5B,EAAO,WAAW,QAAS,GAAc,CACvC,KAAK,KAAK,KAAK,IAAY,EAC3B,CACF,KAAK,SAAS,EAGZ,EAAO,IAAI,OAAS,IACtB,KAAK,QAAQ,YAAY,CACzB,EAAO,IAAI,QAAS,GAAc,CAChC,KAAK,KAAK,KAAK,IAAY,EAC3B,CACF,KAAK,SAAS,EAGhB,KAAK,KAAK,2CAA2C,OAC9C,EAAO,CAEd,MADA,KAAK,MAAM,mBAAoB,EAAgB,UAAU,CACnD"}
1
+ {"version":3,"file":"MigrateRefreshCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MigrateRefreshCommand.ts"],"sourcesContent":["/**\n * MigrateRefreshCommand\n *\n * Reset and re-run all migrations\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Migrator } from '@/Database/Migrations/Migrator';\nimport { Application } from '@/Foundation/Application';\n\nexport class MigrateRefreshCommand extends Command {\n signature = 'migrate:refresh';\n description = 'Reset and re-run all migrations';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const db = this.app.make('db') as any;\n const connection = db.connection();\n const migrationPath = options.path || this.app.databasePath('migrations');\n const paths = Array.isArray(migrationPath) ? migrationPath : [migrationPath];\n\n const migrator = new Migrator(connection, paths);\n\n this.info('Refreshing database...');\n this.newLine();\n\n try {\n const result = await migrator.refresh();\n\n if (result.rolledBack.length > 0) {\n this.comment('Rolled back:');\n result.rolledBack.forEach((migration) => {\n this.info(` ${migration}`);\n });\n this.newLine();\n }\n\n if (result.ran.length > 0) {\n this.comment('Migrated:');\n result.ran.forEach((migration) => {\n this.info(` ${migration}`);\n });\n this.newLine();\n }\n\n this.info(`Database refresh completed successfully.`);\n } catch (error) {\n this.error(`Refresh failed: ${(error as Error).message}`);\n throw error;\n }\n }\n}\n"],"mappings":"2GAUA,IAAa,EAAb,cAA2C,CAAQ,CAI3B,IAHtB,UAAY,kBACZ,YAAc,kCAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CAEnE,IAAM,EADK,KAAK,IAAI,KAAK,KACJ,CAAC,YAAY,CAC5B,EAAgB,EAAQ,MAAQ,KAAK,IAAI,aAAa,aAAa,CAGnE,EAAW,IAAI,EAAS,EAFhB,MAAM,QAAQ,EAAc,CAAG,EAAgB,CAAC,EAAc,CAE5B,CAEhD,KAAK,KAAK,yBAAyB,CACnC,KAAK,SAAS,CAEd,GAAI,CACF,IAAM,EAAS,MAAM,EAAS,SAAS,CAEnC,EAAO,WAAW,OAAS,IAC7B,KAAK,QAAQ,eAAe,CAC5B,EAAO,WAAW,QAAS,GAAc,CACvC,KAAK,KAAK,KAAK,IAAY,EAC3B,CACF,KAAK,SAAS,EAGZ,EAAO,IAAI,OAAS,IACtB,KAAK,QAAQ,YAAY,CACzB,EAAO,IAAI,QAAS,GAAc,CAChC,KAAK,KAAK,KAAK,IAAY,EAC3B,CACF,KAAK,SAAS,EAGhB,KAAK,KAAK,2CAA2C,OAC9C,EAAO,CAEd,MADA,KAAK,MAAM,mBAAoB,EAAgB,UAAU,CACnD"}
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../Database/Migrations/Migrator.cjs`),t=require(`../Command.cjs`);var n=class extends t.Command{signature=`migrate:reset`;description=`Rollback all database migrations`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||this.app.databasePath(`migrations`),a=new e.Migrator(r,Array.isArray(i)?i:[i]);this.info(`Resetting database...`),this.newLine();try{let e=await a.reset();if(e.length===0){this.comment(`Nothing to rollback.`);return}e.forEach(e=>{this.info(`Rolled back: ${e}`)}),this.newLine(),this.info(`Database reset completed successfully.`)}catch(e){throw this.error(`Reset failed: ${e.message}`),e}}};exports.MigrateResetCommand=n;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../Database/Migrations/Migrator.cjs`),t=require(`../Command.cjs`);var n=class extends t.Command{app;signature=`migrate:reset`;description=`Rollback all database migrations`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||this.app.databasePath(`migrations`),a=new e.Migrator(r,Array.isArray(i)?i:[i]);this.info(`Resetting database...`),this.newLine();try{let e=await a.reset();if(e.length===0){this.comment(`Nothing to rollback.`);return}e.forEach(e=>{this.info(`Rolled back: ${e}`)}),this.newLine(),this.info(`Database reset completed successfully.`)}catch(e){throw this.error(`Reset failed: ${e.message}`),e}}};exports.MigrateResetCommand=n;
@@ -1,2 +1,2 @@
1
- import{Migrator as e}from"../../Database/Migrations/Migrator.mjs";import{Command as t}from"../Command.mjs";var n=class extends t{signature=`migrate:reset`;description=`Rollback all database migrations`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||this.app.databasePath(`migrations`),a=new e(r,Array.isArray(i)?i:[i]);this.info(`Resetting database...`),this.newLine();try{let e=await a.reset();if(e.length===0){this.comment(`Nothing to rollback.`);return}e.forEach(e=>{this.info(`Rolled back: ${e}`)}),this.newLine(),this.info(`Database reset completed successfully.`)}catch(e){throw this.error(`Reset failed: ${e.message}`),e}}};export{n as MigrateResetCommand};
1
+ import{Migrator as e}from"../../Database/Migrations/Migrator.mjs";import{Command as t}from"../Command.mjs";var n=class extends t{app;signature=`migrate:reset`;description=`Rollback all database migrations`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||this.app.databasePath(`migrations`),a=new e(r,Array.isArray(i)?i:[i]);this.info(`Resetting database...`),this.newLine();try{let e=await a.reset();if(e.length===0){this.comment(`Nothing to rollback.`);return}e.forEach(e=>{this.info(`Rolled back: ${e}`)}),this.newLine(),this.info(`Database reset completed successfully.`)}catch(e){throw this.error(`Reset failed: ${e.message}`),e}}};export{n as MigrateResetCommand};
2
2
  //# sourceMappingURL=MigrateResetCommand.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"MigrateResetCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MigrateResetCommand.ts"],"sourcesContent":["/**\n * MigrateResetCommand\n *\n * Rollback all database migrations\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Migrator } from '@/Database/Migrations/Migrator';\nimport { Application } from '@/Foundation/Application';\n\nexport class MigrateResetCommand extends Command {\n signature = 'migrate:reset';\n description = 'Rollback all database migrations';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const db = this.app.make('db') as any;\n const connection = db.connection();\n const migrationPath = options.path || this.app.databasePath('migrations');\n const paths = Array.isArray(migrationPath) ? migrationPath : [migrationPath];\n\n const migrator = new Migrator(connection, paths);\n\n this.info('Resetting database...');\n this.newLine();\n\n try {\n const rolledBack = await migrator.reset();\n\n if (rolledBack.length === 0) {\n this.comment('Nothing to rollback.');\n return;\n }\n\n rolledBack.forEach((migration) => {\n this.info(`Rolled back: ${migration}`);\n });\n\n this.newLine();\n this.info(`Database reset completed successfully.`);\n } catch (error) {\n this.error(`Reset failed: ${(error as Error).message}`);\n throw error;\n }\n }\n}\n"],"mappings":"2GAUA,IAAa,EAAb,cAAyC,CAAQ,CAC/C,UAAY,gBACZ,YAAc,mCAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CAEnE,IAAM,EADK,KAAK,IAAI,KAAK,KAAK,CACR,YAAY,CAC5B,EAAgB,EAAQ,MAAQ,KAAK,IAAI,aAAa,aAAa,CAGnE,EAAW,IAAI,EAAS,EAFhB,MAAM,QAAQ,EAAc,CAAG,EAAgB,CAAC,EAAc,CAE5B,CAEhD,KAAK,KAAK,wBAAwB,CAClC,KAAK,SAAS,CAEd,GAAI,CACF,IAAM,EAAa,MAAM,EAAS,OAAO,CAEzC,GAAI,EAAW,SAAW,EAAG,CAC3B,KAAK,QAAQ,uBAAuB,CACpC,OAGF,EAAW,QAAS,GAAc,CAChC,KAAK,KAAK,gBAAgB,IAAY,EACtC,CAEF,KAAK,SAAS,CACd,KAAK,KAAK,yCAAyC,OAC5C,EAAO,CAEd,MADA,KAAK,MAAM,iBAAkB,EAAgB,UAAU,CACjD"}
1
+ {"version":3,"file":"MigrateResetCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MigrateResetCommand.ts"],"sourcesContent":["/**\n * MigrateResetCommand\n *\n * Rollback all database migrations\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Migrator } from '@/Database/Migrations/Migrator';\nimport { Application } from '@/Foundation/Application';\n\nexport class MigrateResetCommand extends Command {\n signature = 'migrate:reset';\n description = 'Rollback all database migrations';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const db = this.app.make('db') as any;\n const connection = db.connection();\n const migrationPath = options.path || this.app.databasePath('migrations');\n const paths = Array.isArray(migrationPath) ? migrationPath : [migrationPath];\n\n const migrator = new Migrator(connection, paths);\n\n this.info('Resetting database...');\n this.newLine();\n\n try {\n const rolledBack = await migrator.reset();\n\n if (rolledBack.length === 0) {\n this.comment('Nothing to rollback.');\n return;\n }\n\n rolledBack.forEach((migration) => {\n this.info(`Rolled back: ${migration}`);\n });\n\n this.newLine();\n this.info(`Database reset completed successfully.`);\n } catch (error) {\n this.error(`Reset failed: ${(error as Error).message}`);\n throw error;\n }\n }\n}\n"],"mappings":"2GAUA,IAAa,EAAb,cAAyC,CAAQ,CAIzB,IAHtB,UAAY,gBACZ,YAAc,mCAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CAEnE,IAAM,EADK,KAAK,IAAI,KAAK,KACJ,CAAC,YAAY,CAC5B,EAAgB,EAAQ,MAAQ,KAAK,IAAI,aAAa,aAAa,CAGnE,EAAW,IAAI,EAAS,EAFhB,MAAM,QAAQ,EAAc,CAAG,EAAgB,CAAC,EAAc,CAE5B,CAEhD,KAAK,KAAK,wBAAwB,CAClC,KAAK,SAAS,CAEd,GAAI,CACF,IAAM,EAAa,MAAM,EAAS,OAAO,CAEzC,GAAI,EAAW,SAAW,EAAG,CAC3B,KAAK,QAAQ,uBAAuB,CACpC,OAGF,EAAW,QAAS,GAAc,CAChC,KAAK,KAAK,gBAAgB,IAAY,EACtC,CAEF,KAAK,SAAS,CACd,KAAK,KAAK,yCAAyC,OAC5C,EAAO,CAEd,MADA,KAAK,MAAM,iBAAkB,EAAgB,UAAU,CACjD"}
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../Database/Migrations/Migrator.cjs`),t=require(`../Command.cjs`);var n=class extends t.Command{signature=`migrate:rollback`;description=`Rollback the last database migration`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||this.app.databasePath(`migrations`),a=new e.Migrator(r,Array.isArray(i)?i:[i]);this.info(`Rolling back migrations...`),this.newLine();try{let e=await a.rollback({step:n.step?parseInt(n.step,10):void 0,pretend:n.pretend===!0});if(e.length===0){this.comment(`Nothing to rollback.`);return}e.forEach(e=>{this.info(`Rolled back: ${e}`)}),this.newLine(),this.info(`Rollback completed successfully.`)}catch(e){throw this.error(`Rollback failed: ${e.message}`),e}}};exports.MigrateRollbackCommand=n;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../Database/Migrations/Migrator.cjs`),t=require(`../Command.cjs`);var n=class extends t.Command{app;signature=`migrate:rollback`;description=`Rollback the last database migration`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||this.app.databasePath(`migrations`),a=new e.Migrator(r,Array.isArray(i)?i:[i]);this.info(`Rolling back migrations...`),this.newLine();try{let e=await a.rollback({step:n.step?parseInt(n.step,10):void 0,pretend:n.pretend===!0});if(e.length===0){this.comment(`Nothing to rollback.`);return}e.forEach(e=>{this.info(`Rolled back: ${e}`)}),this.newLine(),this.info(`Rollback completed successfully.`)}catch(e){throw this.error(`Rollback failed: ${e.message}`),e}}};exports.MigrateRollbackCommand=n;
@@ -1,2 +1,2 @@
1
- import{Migrator as e}from"../../Database/Migrations/Migrator.mjs";import{Command as t}from"../Command.mjs";var n=class extends t{signature=`migrate:rollback`;description=`Rollback the last database migration`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||this.app.databasePath(`migrations`),a=new e(r,Array.isArray(i)?i:[i]);this.info(`Rolling back migrations...`),this.newLine();try{let e=await a.rollback({step:n.step?parseInt(n.step,10):void 0,pretend:n.pretend===!0});if(e.length===0){this.comment(`Nothing to rollback.`);return}e.forEach(e=>{this.info(`Rolled back: ${e}`)}),this.newLine(),this.info(`Rollback completed successfully.`)}catch(e){throw this.error(`Rollback failed: ${e.message}`),e}}};export{n as MigrateRollbackCommand};
1
+ import{Migrator as e}from"../../Database/Migrations/Migrator.mjs";import{Command as t}from"../Command.mjs";var n=class extends t{app;signature=`migrate:rollback`;description=`Rollback the last database migration`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||this.app.databasePath(`migrations`),a=new e(r,Array.isArray(i)?i:[i]);this.info(`Rolling back migrations...`),this.newLine();try{let e=await a.rollback({step:n.step?parseInt(n.step,10):void 0,pretend:n.pretend===!0});if(e.length===0){this.comment(`Nothing to rollback.`);return}e.forEach(e=>{this.info(`Rolled back: ${e}`)}),this.newLine(),this.info(`Rollback completed successfully.`)}catch(e){throw this.error(`Rollback failed: ${e.message}`),e}}};export{n as MigrateRollbackCommand};
2
2
  //# sourceMappingURL=MigrateRollbackCommand.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"MigrateRollbackCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MigrateRollbackCommand.ts"],"sourcesContent":["/**\n * MigrateRollbackCommand\n *\n * Rollback the last database migration\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Migrator } from '@/Database/Migrations/Migrator';\nimport { Application } from '@/Foundation/Application';\n\nexport class MigrateRollbackCommand extends Command {\n signature = 'migrate:rollback';\n description = 'Rollback the last database migration';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const db = this.app.make('db') as any;\n const connection = db.connection();\n const migrationPath = options.path || this.app.databasePath('migrations');\n const paths = Array.isArray(migrationPath) ? migrationPath : [migrationPath];\n\n const migrator = new Migrator(connection, paths);\n\n this.info('Rolling back migrations...');\n this.newLine();\n\n try {\n const rolledBack = await migrator.rollback({\n step: options.step ? parseInt(options.step as string, 10) : undefined,\n pretend: options.pretend === true,\n });\n\n if (rolledBack.length === 0) {\n this.comment('Nothing to rollback.');\n return;\n }\n\n rolledBack.forEach((migration) => {\n this.info(`Rolled back: ${migration}`);\n });\n\n this.newLine();\n this.info(`Rollback completed successfully.`);\n } catch (error) {\n this.error(`Rollback failed: ${(error as Error).message}`);\n throw error;\n }\n }\n}\n"],"mappings":"2GAUA,IAAa,EAAb,cAA4C,CAAQ,CAClD,UAAY,mBACZ,YAAc,uCAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CAEnE,IAAM,EADK,KAAK,IAAI,KAAK,KAAK,CACR,YAAY,CAC5B,EAAgB,EAAQ,MAAQ,KAAK,IAAI,aAAa,aAAa,CAGnE,EAAW,IAAI,EAAS,EAFhB,MAAM,QAAQ,EAAc,CAAG,EAAgB,CAAC,EAAc,CAE5B,CAEhD,KAAK,KAAK,6BAA6B,CACvC,KAAK,SAAS,CAEd,GAAI,CACF,IAAM,EAAa,MAAM,EAAS,SAAS,CACzC,KAAM,EAAQ,KAAO,SAAS,EAAQ,KAAgB,GAAG,CAAG,IAAA,GAC5D,QAAS,EAAQ,UAAY,GAC9B,CAAC,CAEF,GAAI,EAAW,SAAW,EAAG,CAC3B,KAAK,QAAQ,uBAAuB,CACpC,OAGF,EAAW,QAAS,GAAc,CAChC,KAAK,KAAK,gBAAgB,IAAY,EACtC,CAEF,KAAK,SAAS,CACd,KAAK,KAAK,mCAAmC,OACtC,EAAO,CAEd,MADA,KAAK,MAAM,oBAAqB,EAAgB,UAAU,CACpD"}
1
+ {"version":3,"file":"MigrateRollbackCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MigrateRollbackCommand.ts"],"sourcesContent":["/**\n * MigrateRollbackCommand\n *\n * Rollback the last database migration\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Migrator } from '@/Database/Migrations/Migrator';\nimport { Application } from '@/Foundation/Application';\n\nexport class MigrateRollbackCommand extends Command {\n signature = 'migrate:rollback';\n description = 'Rollback the last database migration';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const db = this.app.make('db') as any;\n const connection = db.connection();\n const migrationPath = options.path || this.app.databasePath('migrations');\n const paths = Array.isArray(migrationPath) ? migrationPath : [migrationPath];\n\n const migrator = new Migrator(connection, paths);\n\n this.info('Rolling back migrations...');\n this.newLine();\n\n try {\n const rolledBack = await migrator.rollback({\n step: options.step ? parseInt(options.step as string, 10) : undefined,\n pretend: options.pretend === true,\n });\n\n if (rolledBack.length === 0) {\n this.comment('Nothing to rollback.');\n return;\n }\n\n rolledBack.forEach((migration) => {\n this.info(`Rolled back: ${migration}`);\n });\n\n this.newLine();\n this.info(`Rollback completed successfully.`);\n } catch (error) {\n this.error(`Rollback failed: ${(error as Error).message}`);\n throw error;\n }\n }\n}\n"],"mappings":"2GAUA,IAAa,EAAb,cAA4C,CAAQ,CAI5B,IAHtB,UAAY,mBACZ,YAAc,uCAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CAEnE,IAAM,EADK,KAAK,IAAI,KAAK,KACJ,CAAC,YAAY,CAC5B,EAAgB,EAAQ,MAAQ,KAAK,IAAI,aAAa,aAAa,CAGnE,EAAW,IAAI,EAAS,EAFhB,MAAM,QAAQ,EAAc,CAAG,EAAgB,CAAC,EAAc,CAE5B,CAEhD,KAAK,KAAK,6BAA6B,CACvC,KAAK,SAAS,CAEd,GAAI,CACF,IAAM,EAAa,MAAM,EAAS,SAAS,CACzC,KAAM,EAAQ,KAAO,SAAS,EAAQ,KAAgB,GAAG,CAAG,IAAA,GAC5D,QAAS,EAAQ,UAAY,GAC9B,CAAC,CAEF,GAAI,EAAW,SAAW,EAAG,CAC3B,KAAK,QAAQ,uBAAuB,CACpC,OAGF,EAAW,QAAS,GAAc,CAChC,KAAK,KAAK,gBAAgB,IAAY,EACtC,CAEF,KAAK,SAAS,CACd,KAAK,KAAK,mCAAmC,OACtC,EAAO,CAEd,MADA,KAAK,MAAM,oBAAqB,EAAgB,UAAU,CACpD"}
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../Database/Migrations/Migrator.cjs`),t=require(`../Command.cjs`);var n=class extends t.Command{signature=`migrate:status`;description=`Show the status of each migration`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||this.app.databasePath(`migrations`),a=new e.Migrator(r,Array.isArray(i)?i:[i]);try{let e=await a.getRan(),t=await a.getMigrationBatches(),n=await a.getMigrationFiles();if(n.length===0){this.comment(`No migrations found.`);return}this.info(`Migration status:`),this.newLine();let r=Math.max(...n.map(e=>e.length));this.line(`${`Migration`.padEnd(r+2)} ${`Ran?`.padEnd(6)} ${`Batch`.padEnd(5)}`),this.line(`-`.repeat(r+6+5+8)),n.forEach(n=>{let i=e.includes(n),a=t[n]||`-`,o=i?`\x1B[32mYes\x1B[0m`:`\x1B[31mNo\x1B[0m`;this.line(`${n.padEnd(r+2)} ${o.padEnd(15)} ${a}`)}),this.newLine()}catch(e){throw this.error(`Failed to get migration status: ${e.message}`),e}}};exports.MigrateStatusCommand=n;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../Database/Migrations/Migrator.cjs`),t=require(`../Command.cjs`);var n=class extends t.Command{app;signature=`migrate:status`;description=`Show the status of each migration`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||this.app.databasePath(`migrations`),a=new e.Migrator(r,Array.isArray(i)?i:[i]);try{let e=await a.getRan(),t=await a.getMigrationBatches(),n=await a.getMigrationFiles();if(n.length===0){this.comment(`No migrations found.`);return}this.info(`Migration status:`),this.newLine();let r=Math.max(...n.map(e=>e.length));this.line(`${`Migration`.padEnd(r+2)} ${`Ran?`.padEnd(6)} ${`Batch`.padEnd(5)}`),this.line(`-`.repeat(r+6+5+8)),n.forEach(n=>{let i=e.includes(n),a=t[n]||`-`,o=i?`\x1B[32mYes\x1B[0m`:`\x1B[31mNo\x1B[0m`;this.line(`${n.padEnd(r+2)} ${o.padEnd(15)} ${a}`)}),this.newLine()}catch(e){throw this.error(`Failed to get migration status: ${e.message}`),e}}};exports.MigrateStatusCommand=n;
@@ -1,2 +1,2 @@
1
- import{Migrator as e}from"../../Database/Migrations/Migrator.mjs";import{Command as t}from"../Command.mjs";var n=class extends t{signature=`migrate:status`;description=`Show the status of each migration`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||this.app.databasePath(`migrations`),a=new e(r,Array.isArray(i)?i:[i]);try{let e=await a.getRan(),t=await a.getMigrationBatches(),n=await a.getMigrationFiles();if(n.length===0){this.comment(`No migrations found.`);return}this.info(`Migration status:`),this.newLine();let r=Math.max(...n.map(e=>e.length));this.line(`${`Migration`.padEnd(r+2)} ${`Ran?`.padEnd(6)} ${`Batch`.padEnd(5)}`),this.line(`-`.repeat(r+6+5+8)),n.forEach(n=>{let i=e.includes(n),a=t[n]||`-`,o=i?`\x1B[32mYes\x1B[0m`:`\x1B[31mNo\x1B[0m`;this.line(`${n.padEnd(r+2)} ${o.padEnd(15)} ${a}`)}),this.newLine()}catch(e){throw this.error(`Failed to get migration status: ${e.message}`),e}}};export{n as MigrateStatusCommand};
1
+ import{Migrator as e}from"../../Database/Migrations/Migrator.mjs";import{Command as t}from"../Command.mjs";var n=class extends t{app;signature=`migrate:status`;description=`Show the status of each migration`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||this.app.databasePath(`migrations`),a=new e(r,Array.isArray(i)?i:[i]);try{let e=await a.getRan(),t=await a.getMigrationBatches(),n=await a.getMigrationFiles();if(n.length===0){this.comment(`No migrations found.`);return}this.info(`Migration status:`),this.newLine();let r=Math.max(...n.map(e=>e.length));this.line(`${`Migration`.padEnd(r+2)} ${`Ran?`.padEnd(6)} ${`Batch`.padEnd(5)}`),this.line(`-`.repeat(r+6+5+8)),n.forEach(n=>{let i=e.includes(n),a=t[n]||`-`,o=i?`\x1B[32mYes\x1B[0m`:`\x1B[31mNo\x1B[0m`;this.line(`${n.padEnd(r+2)} ${o.padEnd(15)} ${a}`)}),this.newLine()}catch(e){throw this.error(`Failed to get migration status: ${e.message}`),e}}};export{n as MigrateStatusCommand};
2
2
  //# sourceMappingURL=MigrateStatusCommand.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"MigrateStatusCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MigrateStatusCommand.ts"],"sourcesContent":["/**\n * MigrateStatusCommand\n *\n * Show the status of each migration\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Migrator } from '@/Database/Migrations/Migrator';\nimport { Application } from '@/Foundation/Application';\n\nexport class MigrateStatusCommand extends Command {\n signature = 'migrate:status';\n description = 'Show the status of each migration';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const db = this.app.make('db') as any;\n const connection = db.connection();\n const migrationPath = options.path || this.app.databasePath('migrations');\n const paths = Array.isArray(migrationPath) ? migrationPath : [migrationPath];\n\n const migrator = new Migrator(connection, paths);\n\n try {\n const ran = await migrator.getRan();\n const batches = await migrator.getMigrationBatches();\n const files = await migrator.getMigrationFiles();\n\n if (files.length === 0) {\n this.comment('No migrations found.');\n return;\n }\n\n this.info('Migration status:');\n this.newLine();\n\n // Calculate column widths\n const maxLength = Math.max(...files.map((f) => f.length));\n const statusWidth = 6;\n const batchWidth = 5;\n\n // Print header\n this.line(`${'Migration'.padEnd(maxLength + 2)} ${'Ran?'.padEnd(statusWidth)} ${'Batch'.padEnd(batchWidth)}`);\n this.line('-'.repeat(maxLength + statusWidth + batchWidth + 8));\n\n // Print migrations\n files.forEach((file) => {\n const hasRan = ran.includes(file);\n const batch = batches[file] || '-';\n const status = hasRan ? '\\x1b[32mYes\\x1b[0m' : '\\x1b[31mNo\\x1b[0m';\n\n this.line(`${file.padEnd(maxLength + 2)} ${status.padEnd(statusWidth + 9)} ${batch}`);\n });\n\n this.newLine();\n } catch (error) {\n this.error(`Failed to get migration status: ${(error as Error).message}`);\n throw error;\n }\n }\n}\n"],"mappings":"2GAUA,IAAa,EAAb,cAA0C,CAAQ,CAChD,UAAY,iBACZ,YAAc,oCAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CAEnE,IAAM,EADK,KAAK,IAAI,KAAK,KAAK,CACR,YAAY,CAC5B,EAAgB,EAAQ,MAAQ,KAAK,IAAI,aAAa,aAAa,CAGnE,EAAW,IAAI,EAAS,EAFhB,MAAM,QAAQ,EAAc,CAAG,EAAgB,CAAC,EAAc,CAE5B,CAEhD,GAAI,CACF,IAAM,EAAM,MAAM,EAAS,QAAQ,CAC7B,EAAU,MAAM,EAAS,qBAAqB,CAC9C,EAAQ,MAAM,EAAS,mBAAmB,CAEhD,GAAI,EAAM,SAAW,EAAG,CACtB,KAAK,QAAQ,uBAAuB,CACpC,OAGF,KAAK,KAAK,oBAAoB,CAC9B,KAAK,SAAS,CAGd,IAAM,EAAY,KAAK,IAAI,GAAG,EAAM,IAAK,GAAM,EAAE,OAAO,CAAC,CAKzD,KAAK,KAAK,GAAG,YAAY,OAAO,EAAY,EAAE,CAAC,IAAI,OAAO,OAAO,EAAY,CAAC,IAAI,QAAQ,OAAO,EAAW,GAAG,CAC/G,KAAK,KAAK,IAAI,OAAO,EAAY,EAAc,EAAa,EAAE,CAAC,CAG/D,EAAM,QAAS,GAAS,CACtB,IAAM,EAAS,EAAI,SAAS,EAAK,CAC3B,EAAQ,EAAQ,IAAS,IACzB,EAAS,EAAS,qBAAuB,oBAE/C,KAAK,KAAK,GAAG,EAAK,OAAO,EAAY,EAAE,CAAC,IAAI,EAAO,OAAO,GAAgB,CAAC,IAAI,IAAQ,EACvF,CAEF,KAAK,SAAS,OACP,EAAO,CAEd,MADA,KAAK,MAAM,mCAAoC,EAAgB,UAAU,CACnE"}
1
+ {"version":3,"file":"MigrateStatusCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MigrateStatusCommand.ts"],"sourcesContent":["/**\n * MigrateStatusCommand\n *\n * Show the status of each migration\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Migrator } from '@/Database/Migrations/Migrator';\nimport { Application } from '@/Foundation/Application';\n\nexport class MigrateStatusCommand extends Command {\n signature = 'migrate:status';\n description = 'Show the status of each migration';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const db = this.app.make('db') as any;\n const connection = db.connection();\n const migrationPath = options.path || this.app.databasePath('migrations');\n const paths = Array.isArray(migrationPath) ? migrationPath : [migrationPath];\n\n const migrator = new Migrator(connection, paths);\n\n try {\n const ran = await migrator.getRan();\n const batches = await migrator.getMigrationBatches();\n const files = await migrator.getMigrationFiles();\n\n if (files.length === 0) {\n this.comment('No migrations found.');\n return;\n }\n\n this.info('Migration status:');\n this.newLine();\n\n // Calculate column widths\n const maxLength = Math.max(...files.map((f) => f.length));\n const statusWidth = 6;\n const batchWidth = 5;\n\n // Print header\n this.line(`${'Migration'.padEnd(maxLength + 2)} ${'Ran?'.padEnd(statusWidth)} ${'Batch'.padEnd(batchWidth)}`);\n this.line('-'.repeat(maxLength + statusWidth + batchWidth + 8));\n\n // Print migrations\n files.forEach((file) => {\n const hasRan = ran.includes(file);\n const batch = batches[file] || '-';\n const status = hasRan ? '\\x1b[32mYes\\x1b[0m' : '\\x1b[31mNo\\x1b[0m';\n\n this.line(`${file.padEnd(maxLength + 2)} ${status.padEnd(statusWidth + 9)} ${batch}`);\n });\n\n this.newLine();\n } catch (error) {\n this.error(`Failed to get migration status: ${(error as Error).message}`);\n throw error;\n }\n }\n}\n"],"mappings":"2GAUA,IAAa,EAAb,cAA0C,CAAQ,CAI1B,IAHtB,UAAY,iBACZ,YAAc,oCAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CAEnE,IAAM,EADK,KAAK,IAAI,KAAK,KACJ,CAAC,YAAY,CAC5B,EAAgB,EAAQ,MAAQ,KAAK,IAAI,aAAa,aAAa,CAGnE,EAAW,IAAI,EAAS,EAFhB,MAAM,QAAQ,EAAc,CAAG,EAAgB,CAAC,EAAc,CAE5B,CAEhD,GAAI,CACF,IAAM,EAAM,MAAM,EAAS,QAAQ,CAC7B,EAAU,MAAM,EAAS,qBAAqB,CAC9C,EAAQ,MAAM,EAAS,mBAAmB,CAEhD,GAAI,EAAM,SAAW,EAAG,CACtB,KAAK,QAAQ,uBAAuB,CACpC,OAGF,KAAK,KAAK,oBAAoB,CAC9B,KAAK,SAAS,CAGd,IAAM,EAAY,KAAK,IAAI,GAAG,EAAM,IAAK,GAAM,EAAE,OAAO,CAAC,CAKzD,KAAK,KAAK,GAAG,YAAY,OAAO,EAAY,EAAE,CAAC,IAAI,OAAO,OAAO,EAAY,CAAC,IAAI,QAAQ,OAAO,EAAW,GAAG,CAC/G,KAAK,KAAK,IAAI,OAAO,EAAY,EAAc,EAAa,EAAE,CAAC,CAG/D,EAAM,QAAS,GAAS,CACtB,IAAM,EAAS,EAAI,SAAS,EAAK,CAC3B,EAAQ,EAAQ,IAAS,IACzB,EAAS,EAAS,qBAAuB,oBAE/C,KAAK,KAAK,GAAG,EAAK,OAAO,EAAY,EAAE,CAAC,IAAI,EAAO,OAAO,GAAgB,CAAC,IAAI,IAAQ,EACvF,CAEF,KAAK,SAAS,OACP,EAAO,CAEd,MADA,KAAK,MAAM,mCAAoC,EAAgB,UAAU,CACnE"}
@@ -1,4 +1,4 @@
1
- const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`fs/promises`);n=e.__toESM(n);let r=require(`path`);r=e.__toESM(r);var i=class extends t.Command{signature=`queue:batches-table`;description=`Create a migration for the batches database table`;constructor(e){super(),this.app=e}async handle(e,t){let i=t.path||this.app.databasePath(`migrations`);await n.mkdir(i,{recursive:!0});let a=`${new Date().toISOString().replace(/[-:T]/g,``).slice(0,14)}_create_job_batches_table.ts`,o=r.join(i,a);await n.writeFile(o,this.getStub()),this.info(`Migration created successfully: ${o}`),this.comment(`Run "npx orchestr migrate" to create the table.`)}getStub(){return`import { Migration } from '@orchestr-sh/orchestr';
1
+ const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`fs/promises`);n=e.__toESM(n,1);let r=require(`path`);r=e.__toESM(r,1);var i=class extends t.Command{app;signature=`queue:batches-table`;description=`Create a migration for the batches database table`;constructor(e){super(),this.app=e}async handle(e,t){let i=t.path||this.app.databasePath(`migrations`);await n.mkdir(i,{recursive:!0});let a=`${new Date().toISOString().replace(/[-:T]/g,``).slice(0,14)}_create_job_batches_table.ts`,o=r.join(i,a);await n.writeFile(o,this.getStub()),this.info(`Migration created successfully: ${o}`),this.comment(`Run "npx orchestr migrate" to create the table.`)}getStub(){return`import { Migration } from '@orchestr-sh/orchestr';
2
2
  import type { SchemaBuilder } from '@orchestr-sh/orchestr';
3
3
 
4
4
  export default class CreateJobBatchesTable extends Migration {
@@ -1,4 +1,4 @@
1
- import{Command as e}from"../Command.mjs";import*as t from"fs/promises";import*as n from"path";var r=class extends e{signature=`queue:batches-table`;description=`Create a migration for the batches database table`;constructor(e){super(),this.app=e}async handle(e,r){let i=r.path||this.app.databasePath(`migrations`);await t.mkdir(i,{recursive:!0});let a=`${new Date().toISOString().replace(/[-:T]/g,``).slice(0,14)}_create_job_batches_table.ts`,o=n.join(i,a);await t.writeFile(o,this.getStub()),this.info(`Migration created successfully: ${o}`),this.comment(`Run "npx orchestr migrate" to create the table.`)}getStub(){return`import { Migration } from '@orchestr-sh/orchestr';
1
+ import{Command as e}from"../Command.mjs";import*as t from"fs/promises";import*as n from"path";var r=class extends e{app;signature=`queue:batches-table`;description=`Create a migration for the batches database table`;constructor(e){super(),this.app=e}async handle(e,r){let i=r.path||this.app.databasePath(`migrations`);await t.mkdir(i,{recursive:!0});let a=`${new Date().toISOString().replace(/[-:T]/g,``).slice(0,14)}_create_job_batches_table.ts`,o=n.join(i,a);await t.writeFile(o,this.getStub()),this.info(`Migration created successfully: ${o}`),this.comment(`Run "npx orchestr migrate" to create the table.`)}getStub(){return`import { Migration } from '@orchestr-sh/orchestr';
2
2
  import type { SchemaBuilder } from '@orchestr-sh/orchestr';
3
3
 
4
4
  export default class CreateJobBatchesTable extends Migration {
@@ -1 +1 @@
1
- {"version":3,"file":"QueueBatchesTableCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueueBatchesTableCommand.ts"],"sourcesContent":["/**\n * QueueBatchesTableCommand\n *\n * Create a migration for the batches database table.\n * Mirrors Laravel's `php artisan queue:batches-table`.\n */\n\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueueBatchesTableCommand extends Command {\n signature = 'queue:batches-table';\n description = 'Create a migration for the batches database table';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(_args: string[], options: CommandOptions): Promise<void> {\n const migrationsPath = (options.path as string) || this.app.databasePath('migrations');\n await fs.mkdir(migrationsPath, { recursive: true });\n\n const timestamp = new Date().toISOString().replace(/[-:T]/g, '').slice(0, 14);\n const fileName = `${timestamp}_create_job_batches_table.ts`;\n const filePath = path.join(migrationsPath, fileName);\n\n await fs.writeFile(filePath, this.getStub());\n\n this.info(`Migration created successfully: ${filePath}`);\n this.comment('Run \"npx orchestr migrate\" to create the table.');\n }\n\n protected getStub(): string {\n return `import { Migration } from '@orchestr-sh/orchestr';\nimport type { SchemaBuilder } from '@orchestr-sh/orchestr';\n\nexport default class CreateJobBatchesTable extends Migration {\n async up(schema: SchemaBuilder): Promise<void> {\n await schema.create('job_batches', (table) => {\n table.string('id').primary();\n table.string('name');\n table.integer('total_jobs');\n table.integer('pending_jobs');\n table.integer('failed_jobs');\n table.text('failed_job_ids');\n table.text('options').nullable();\n table.integer('cancelled_at').nullable();\n table.integer('created_at');\n table.integer('finished_at').nullable();\n });\n }\n\n async down(schema: SchemaBuilder): Promise<void> {\n await schema.drop('job_batches');\n }\n}\n`;\n }\n}\n"],"mappings":"8FAYA,IAAa,EAAb,cAA8C,CAAQ,CACpD,UAAY,sBACZ,YAAc,oDAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAiB,EAAwC,CACpE,IAAM,EAAkB,EAAQ,MAAmB,KAAK,IAAI,aAAa,aAAa,CACtF,MAAM,EAAG,MAAM,EAAgB,CAAE,UAAW,GAAM,CAAC,CAGnD,IAAM,EAAW,GADC,IAAI,MAAM,CAAC,aAAa,CAAC,QAAQ,SAAU,GAAG,CAAC,MAAM,EAAG,GAAG,CAC/C,8BACxB,EAAW,EAAK,KAAK,EAAgB,EAAS,CAEpD,MAAM,EAAG,UAAU,EAAU,KAAK,SAAS,CAAC,CAE5C,KAAK,KAAK,mCAAmC,IAAW,CACxD,KAAK,QAAQ,kDAAkD,CAGjE,SAA4B,CAC1B,MAAO"}
1
+ {"version":3,"file":"QueueBatchesTableCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueueBatchesTableCommand.ts"],"sourcesContent":["/**\n * QueueBatchesTableCommand\n *\n * Create a migration for the batches database table.\n * Mirrors Laravel's `php artisan queue:batches-table`.\n */\n\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueueBatchesTableCommand extends Command {\n signature = 'queue:batches-table';\n description = 'Create a migration for the batches database table';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(_args: string[], options: CommandOptions): Promise<void> {\n const migrationsPath = (options.path as string) || this.app.databasePath('migrations');\n await fs.mkdir(migrationsPath, { recursive: true });\n\n const timestamp = new Date().toISOString().replace(/[-:T]/g, '').slice(0, 14);\n const fileName = `${timestamp}_create_job_batches_table.ts`;\n const filePath = path.join(migrationsPath, fileName);\n\n await fs.writeFile(filePath, this.getStub());\n\n this.info(`Migration created successfully: ${filePath}`);\n this.comment('Run \"npx orchestr migrate\" to create the table.');\n }\n\n protected getStub(): string {\n return `import { Migration } from '@orchestr-sh/orchestr';\nimport type { SchemaBuilder } from '@orchestr-sh/orchestr';\n\nexport default class CreateJobBatchesTable extends Migration {\n async up(schema: SchemaBuilder): Promise<void> {\n await schema.create('job_batches', (table) => {\n table.string('id').primary();\n table.string('name');\n table.integer('total_jobs');\n table.integer('pending_jobs');\n table.integer('failed_jobs');\n table.text('failed_job_ids');\n table.text('options').nullable();\n table.integer('cancelled_at').nullable();\n table.integer('created_at');\n table.integer('finished_at').nullable();\n });\n }\n\n async down(schema: SchemaBuilder): Promise<void> {\n await schema.drop('job_batches');\n }\n}\n`;\n }\n}\n"],"mappings":"8FAYA,IAAa,EAAb,cAA8C,CAAQ,CAI9B,IAHtB,UAAY,sBACZ,YAAc,oDAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAiB,EAAwC,CACpE,IAAM,EAAkB,EAAQ,MAAmB,KAAK,IAAI,aAAa,aAAa,CACtF,MAAM,EAAG,MAAM,EAAgB,CAAE,UAAW,GAAM,CAAC,CAGnD,IAAM,EAAW,GADC,IAAI,MAAM,CAAC,aAAa,CAAC,QAAQ,SAAU,GAAG,CAAC,MAAM,EAAG,GAC7C,CAAC,8BACxB,EAAW,EAAK,KAAK,EAAgB,EAAS,CAEpD,MAAM,EAAG,UAAU,EAAU,KAAK,SAAS,CAAC,CAE5C,KAAK,KAAK,mCAAmC,IAAW,CACxD,KAAK,QAAQ,kDAAkD,CAGjE,SAA4B,CAC1B,MAAO"}
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../Command.cjs`);var t=class extends e.Command{signature=`queue:clear [connection]`;description=`Delete all of the jobs from the specified queue`;constructor(e){super(),this.app=e}async handle(e,t){let n=this.app.make(`queue`),r=e[0]||n.getDefaultConnection(),i=t.queue||`default`,a=await n.connection(r).clear(i);this.info(`Cleared ${a} job(s) from the [${i}] queue on [${r}] connection.`)}};exports.QueueClearCommand=t;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../Command.cjs`);var t=class extends e.Command{app;signature=`queue:clear [connection]`;description=`Delete all of the jobs from the specified queue`;constructor(e){super(),this.app=e}async handle(e,t){let n=this.app.make(`queue`),r=e[0]||n.getDefaultConnection(),i=t.queue||`default`,a=await n.connection(r).clear(i);this.info(`Cleared ${a} job(s) from the [${i}] queue on [${r}] connection.`)}};exports.QueueClearCommand=t;
@@ -1,2 +1,2 @@
1
- import{Command as e}from"../Command.mjs";var t=class extends e{signature=`queue:clear [connection]`;description=`Delete all of the jobs from the specified queue`;constructor(e){super(),this.app=e}async handle(e,t){let n=this.app.make(`queue`),r=e[0]||n.getDefaultConnection(),i=t.queue||`default`,a=await n.connection(r).clear(i);this.info(`Cleared ${a} job(s) from the [${i}] queue on [${r}] connection.`)}};export{t as QueueClearCommand};
1
+ import{Command as e}from"../Command.mjs";var t=class extends e{app;signature=`queue:clear [connection]`;description=`Delete all of the jobs from the specified queue`;constructor(e){super(),this.app=e}async handle(e,t){let n=this.app.make(`queue`),r=e[0]||n.getDefaultConnection(),i=t.queue||`default`,a=await n.connection(r).clear(i);this.info(`Cleared ${a} job(s) from the [${i}] queue on [${r}] connection.`)}};export{t as QueueClearCommand};
2
2
  //# sourceMappingURL=QueueClearCommand.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueueClearCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueueClearCommand.ts"],"sourcesContent":["/**\n * QueueClearCommand\n *\n * Delete all of the jobs from the specified queue.\n * Mirrors Laravel's `php artisan queue:clear`.\n */\n\nimport type { QueueManager } from '@/Queue/QueueManager';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueueClearCommand extends Command {\n signature = 'queue:clear [connection]';\n description = 'Delete all of the jobs from the specified queue';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const manager = this.app.make<QueueManager>('queue');\n const connection = args[0] || manager.getDefaultConnection();\n const queue = (options.queue as string) || 'default';\n\n const driver = manager.connection(connection);\n const count = await driver.clear(queue);\n\n this.info(`Cleared ${count} job(s) from the [${queue}] queue on [${connection}] connection.`);\n }\n}\n"],"mappings":"yCAWA,IAAa,EAAb,cAAuC,CAAQ,CAC7C,UAAY,2BACZ,YAAc,kDAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAU,KAAK,IAAI,KAAmB,QAAQ,CAC9C,EAAa,EAAK,IAAM,EAAQ,sBAAsB,CACtD,EAAS,EAAQ,OAAoB,UAGrC,EAAQ,MADC,EAAQ,WAAW,EAAW,CAClB,MAAM,EAAM,CAEvC,KAAK,KAAK,WAAW,EAAM,oBAAoB,EAAM,cAAc,EAAW,eAAe"}
1
+ {"version":3,"file":"QueueClearCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueueClearCommand.ts"],"sourcesContent":["/**\n * QueueClearCommand\n *\n * Delete all of the jobs from the specified queue.\n * Mirrors Laravel's `php artisan queue:clear`.\n */\n\nimport type { QueueManager } from '@/Queue/QueueManager';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueueClearCommand extends Command {\n signature = 'queue:clear [connection]';\n description = 'Delete all of the jobs from the specified queue';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const manager = this.app.make<QueueManager>('queue');\n const connection = args[0] || manager.getDefaultConnection();\n const queue = (options.queue as string) || 'default';\n\n const driver = manager.connection(connection);\n const count = await driver.clear(queue);\n\n this.info(`Cleared ${count} job(s) from the [${queue}] queue on [${connection}] connection.`);\n }\n}\n"],"mappings":"yCAWA,IAAa,EAAb,cAAuC,CAAQ,CAIvB,IAHtB,UAAY,2BACZ,YAAc,kDAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAU,KAAK,IAAI,KAAmB,QAAQ,CAC9C,EAAa,EAAK,IAAM,EAAQ,sBAAsB,CACtD,EAAS,EAAQ,OAAoB,UAGrC,EAAQ,MADC,EAAQ,WAAW,EACR,CAAC,MAAM,EAAM,CAEvC,KAAK,KAAK,WAAW,EAAM,oBAAoB,EAAM,cAAc,EAAW,eAAe"}
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../Command.cjs`);var t=class extends e.Command{signature=`queue:failed`;description=`List all of the failed queue jobs`;constructor(e){super(),this.app=e}async handle(e,t){let n=this.getFailedJobProvider();if(!n){this.error(`No failed job provider configured.`);return}let r=await n.all();if(r.length===0){this.info(`No failed jobs found.`);return}this.info(`Found ${r.length} failed job(s):`),this.newLine();let i=[`ID`,`UUID`,`Connection`,`Queue`,`Job`,`Failed At`],a=r.map(e=>{let t=`Unknown`;try{let n=JSON.parse(e.payload);t=n.displayName||n.job||`Unknown`}catch{}return[String(e.id),e.uuid.substring(0,8)+`...`,e.connection,e.queue,t,e.failed_at]}),o=i.map((e,t)=>{let n=Math.max(...a.map(e=>String(e[t]).length));return Math.max(e.length,n)}),s=o.map(e=>`-`.repeat(e+2)).join(`+`),c=e=>e.map((e,t)=>` ${String(e).padEnd(o[t])} `).join(`|`);this.line(s),this.line(c(i)),this.line(s);for(let e of a)this.line(c(e));this.line(s)}getFailedJobProvider(){try{return this.app.make(`queue.failer`)}catch{return null}}};exports.QueueFailedCommand=t;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../Command.cjs`);var t=class extends e.Command{app;signature=`queue:failed`;description=`List all of the failed queue jobs`;constructor(e){super(),this.app=e}async handle(e,t){let n=this.getFailedJobProvider();if(!n){this.error(`No failed job provider configured.`);return}let r=await n.all();if(r.length===0){this.info(`No failed jobs found.`);return}this.info(`Found ${r.length} failed job(s):`),this.newLine();let i=[`ID`,`UUID`,`Connection`,`Queue`,`Job`,`Failed At`],a=r.map(e=>{let t=`Unknown`;try{let n=JSON.parse(e.payload);t=n.displayName||n.job||`Unknown`}catch{}return[String(e.id),e.uuid.substring(0,8)+`...`,e.connection,e.queue,t,e.failed_at]}),o=i.map((e,t)=>{let n=Math.max(...a.map(e=>String(e[t]).length));return Math.max(e.length,n)}),s=o.map(e=>`-`.repeat(e+2)).join(`+`),c=e=>e.map((e,t)=>` ${String(e).padEnd(o[t])} `).join(`|`);this.line(s),this.line(c(i)),this.line(s);for(let e of a)this.line(c(e));this.line(s)}getFailedJobProvider(){try{return this.app.make(`queue.failer`)}catch{return null}}};exports.QueueFailedCommand=t;
@@ -1,2 +1,2 @@
1
- import{Command as e}from"../Command.mjs";var t=class extends e{signature=`queue:failed`;description=`List all of the failed queue jobs`;constructor(e){super(),this.app=e}async handle(e,t){let n=this.getFailedJobProvider();if(!n){this.error(`No failed job provider configured.`);return}let r=await n.all();if(r.length===0){this.info(`No failed jobs found.`);return}this.info(`Found ${r.length} failed job(s):`),this.newLine();let i=[`ID`,`UUID`,`Connection`,`Queue`,`Job`,`Failed At`],a=r.map(e=>{let t=`Unknown`;try{let n=JSON.parse(e.payload);t=n.displayName||n.job||`Unknown`}catch{}return[String(e.id),e.uuid.substring(0,8)+`...`,e.connection,e.queue,t,e.failed_at]}),o=i.map((e,t)=>{let n=Math.max(...a.map(e=>String(e[t]).length));return Math.max(e.length,n)}),s=o.map(e=>`-`.repeat(e+2)).join(`+`),c=e=>e.map((e,t)=>` ${String(e).padEnd(o[t])} `).join(`|`);this.line(s),this.line(c(i)),this.line(s);for(let e of a)this.line(c(e));this.line(s)}getFailedJobProvider(){try{return this.app.make(`queue.failer`)}catch{return null}}};export{t as QueueFailedCommand};
1
+ import{Command as e}from"../Command.mjs";var t=class extends e{app;signature=`queue:failed`;description=`List all of the failed queue jobs`;constructor(e){super(),this.app=e}async handle(e,t){let n=this.getFailedJobProvider();if(!n){this.error(`No failed job provider configured.`);return}let r=await n.all();if(r.length===0){this.info(`No failed jobs found.`);return}this.info(`Found ${r.length} failed job(s):`),this.newLine();let i=[`ID`,`UUID`,`Connection`,`Queue`,`Job`,`Failed At`],a=r.map(e=>{let t=`Unknown`;try{let n=JSON.parse(e.payload);t=n.displayName||n.job||`Unknown`}catch{}return[String(e.id),e.uuid.substring(0,8)+`...`,e.connection,e.queue,t,e.failed_at]}),o=i.map((e,t)=>{let n=Math.max(...a.map(e=>String(e[t]).length));return Math.max(e.length,n)}),s=o.map(e=>`-`.repeat(e+2)).join(`+`),c=e=>e.map((e,t)=>` ${String(e).padEnd(o[t])} `).join(`|`);this.line(s),this.line(c(i)),this.line(s);for(let e of a)this.line(c(e));this.line(s)}getFailedJobProvider(){try{return this.app.make(`queue.failer`)}catch{return null}}};export{t as QueueFailedCommand};
2
2
  //# sourceMappingURL=QueueFailedCommand.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueueFailedCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueueFailedCommand.ts"],"sourcesContent":["/**\n * QueueFailedCommand\n *\n * List all of the failed queue jobs.\n * Mirrors Laravel's `php artisan queue:failed`.\n */\n\nimport type { FailedJobProvider } from '@/Queue/Failed/FailedJobProvider';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueueFailedCommand extends Command {\n signature = 'queue:failed';\n description = 'List all of the failed queue jobs';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(_args: string[], _options: CommandOptions): Promise<void> {\n const failer = this.getFailedJobProvider();\n\n if (!failer) {\n this.error('No failed job provider configured.');\n return;\n }\n\n const failedJobs = await failer.all();\n\n if (failedJobs.length === 0) {\n this.info('No failed jobs found.');\n return;\n }\n\n this.info(`Found ${failedJobs.length} failed job(s):`);\n this.newLine();\n\n const headers = ['ID', 'UUID', 'Connection', 'Queue', 'Job', 'Failed At'];\n const rows = failedJobs.map((job) => {\n let jobName = 'Unknown';\n try {\n const payload = JSON.parse(job.payload);\n jobName = payload.displayName || payload.job || 'Unknown';\n } catch {\n // Invalid payload\n }\n\n return [String(job.id), job.uuid.substring(0, 8) + '...', job.connection, job.queue, jobName, job.failed_at];\n });\n\n // Simple table output\n const colWidths = headers.map((h, i) => {\n const maxData = Math.max(...rows.map((r) => String(r[i]).length));\n return Math.max(h.length, maxData);\n });\n\n const separator = colWidths.map((w) => '-'.repeat(w + 2)).join('+');\n const formatRow = (row: string[]) => row.map((cell, i) => ` ${String(cell).padEnd(colWidths[i])} `).join('|');\n\n this.line(separator);\n this.line(formatRow(headers));\n this.line(separator);\n for (const row of rows) {\n this.line(formatRow(row));\n }\n this.line(separator);\n }\n\n protected getFailedJobProvider(): FailedJobProvider | null {\n try {\n return this.app.make<FailedJobProvider>('queue.failer');\n } catch {\n return null;\n }\n }\n}\n"],"mappings":"yCAWA,IAAa,EAAb,cAAwC,CAAQ,CAC9C,UAAY,eACZ,YAAc,oCAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAiB,EAAyC,CACrE,IAAM,EAAS,KAAK,sBAAsB,CAE1C,GAAI,CAAC,EAAQ,CACX,KAAK,MAAM,qCAAqC,CAChD,OAGF,IAAM,EAAa,MAAM,EAAO,KAAK,CAErC,GAAI,EAAW,SAAW,EAAG,CAC3B,KAAK,KAAK,wBAAwB,CAClC,OAGF,KAAK,KAAK,SAAS,EAAW,OAAO,iBAAiB,CACtD,KAAK,SAAS,CAEd,IAAM,EAAU,CAAC,KAAM,OAAQ,aAAc,QAAS,MAAO,YAAY,CACnE,EAAO,EAAW,IAAK,GAAQ,CACnC,IAAI,EAAU,UACd,GAAI,CACF,IAAM,EAAU,KAAK,MAAM,EAAI,QAAQ,CACvC,EAAU,EAAQ,aAAe,EAAQ,KAAO,eAC1C,EAIR,MAAO,CAAC,OAAO,EAAI,GAAG,CAAE,EAAI,KAAK,UAAU,EAAG,EAAE,CAAG,MAAO,EAAI,WAAY,EAAI,MAAO,EAAS,EAAI,UAAU,EAC5G,CAGI,EAAY,EAAQ,KAAK,EAAG,IAAM,CACtC,IAAM,EAAU,KAAK,IAAI,GAAG,EAAK,IAAK,GAAM,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CACjE,OAAO,KAAK,IAAI,EAAE,OAAQ,EAAQ,EAClC,CAEI,EAAY,EAAU,IAAK,GAAM,IAAI,OAAO,EAAI,EAAE,CAAC,CAAC,KAAK,IAAI,CAC7D,EAAa,GAAkB,EAAI,KAAK,EAAM,IAAM,IAAI,OAAO,EAAK,CAAC,OAAO,EAAU,GAAG,CAAC,GAAG,CAAC,KAAK,IAAI,CAE7G,KAAK,KAAK,EAAU,CACpB,KAAK,KAAK,EAAU,EAAQ,CAAC,CAC7B,KAAK,KAAK,EAAU,CACpB,IAAK,IAAM,KAAO,EAChB,KAAK,KAAK,EAAU,EAAI,CAAC,CAE3B,KAAK,KAAK,EAAU,CAGtB,sBAA2D,CACzD,GAAI,CACF,OAAO,KAAK,IAAI,KAAwB,eAAe,MACjD,CACN,OAAO"}
1
+ {"version":3,"file":"QueueFailedCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueueFailedCommand.ts"],"sourcesContent":["/**\n * QueueFailedCommand\n *\n * List all of the failed queue jobs.\n * Mirrors Laravel's `php artisan queue:failed`.\n */\n\nimport type { FailedJobProvider } from '@/Queue/Failed/FailedJobProvider';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueueFailedCommand extends Command {\n signature = 'queue:failed';\n description = 'List all of the failed queue jobs';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(_args: string[], _options: CommandOptions): Promise<void> {\n const failer = this.getFailedJobProvider();\n\n if (!failer) {\n this.error('No failed job provider configured.');\n return;\n }\n\n const failedJobs = await failer.all();\n\n if (failedJobs.length === 0) {\n this.info('No failed jobs found.');\n return;\n }\n\n this.info(`Found ${failedJobs.length} failed job(s):`);\n this.newLine();\n\n const headers = ['ID', 'UUID', 'Connection', 'Queue', 'Job', 'Failed At'];\n const rows = failedJobs.map((job) => {\n let jobName = 'Unknown';\n try {\n const payload = JSON.parse(job.payload);\n jobName = payload.displayName || payload.job || 'Unknown';\n } catch {\n // Invalid payload\n }\n\n return [String(job.id), job.uuid.substring(0, 8) + '...', job.connection, job.queue, jobName, job.failed_at];\n });\n\n // Simple table output\n const colWidths = headers.map((h, i) => {\n const maxData = Math.max(...rows.map((r) => String(r[i]).length));\n return Math.max(h.length, maxData);\n });\n\n const separator = colWidths.map((w) => '-'.repeat(w + 2)).join('+');\n const formatRow = (row: string[]) => row.map((cell, i) => ` ${String(cell).padEnd(colWidths[i])} `).join('|');\n\n this.line(separator);\n this.line(formatRow(headers));\n this.line(separator);\n for (const row of rows) {\n this.line(formatRow(row));\n }\n this.line(separator);\n }\n\n protected getFailedJobProvider(): FailedJobProvider | null {\n try {\n return this.app.make<FailedJobProvider>('queue.failer');\n } catch {\n return null;\n }\n }\n}\n"],"mappings":"yCAWA,IAAa,EAAb,cAAwC,CAAQ,CAIxB,IAHtB,UAAY,eACZ,YAAc,oCAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAiB,EAAyC,CACrE,IAAM,EAAS,KAAK,sBAAsB,CAE1C,GAAI,CAAC,EAAQ,CACX,KAAK,MAAM,qCAAqC,CAChD,OAGF,IAAM,EAAa,MAAM,EAAO,KAAK,CAErC,GAAI,EAAW,SAAW,EAAG,CAC3B,KAAK,KAAK,wBAAwB,CAClC,OAGF,KAAK,KAAK,SAAS,EAAW,OAAO,iBAAiB,CACtD,KAAK,SAAS,CAEd,IAAM,EAAU,CAAC,KAAM,OAAQ,aAAc,QAAS,MAAO,YAAY,CACnE,EAAO,EAAW,IAAK,GAAQ,CACnC,IAAI,EAAU,UACd,GAAI,CACF,IAAM,EAAU,KAAK,MAAM,EAAI,QAAQ,CACvC,EAAU,EAAQ,aAAe,EAAQ,KAAO,eAC1C,EAIR,MAAO,CAAC,OAAO,EAAI,GAAG,CAAE,EAAI,KAAK,UAAU,EAAG,EAAE,CAAG,MAAO,EAAI,WAAY,EAAI,MAAO,EAAS,EAAI,UAAU,EAC5G,CAGI,EAAY,EAAQ,KAAK,EAAG,IAAM,CACtC,IAAM,EAAU,KAAK,IAAI,GAAG,EAAK,IAAK,GAAM,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CACjE,OAAO,KAAK,IAAI,EAAE,OAAQ,EAAQ,EAClC,CAEI,EAAY,EAAU,IAAK,GAAM,IAAI,OAAO,EAAI,EAAE,CAAC,CAAC,KAAK,IAAI,CAC7D,EAAa,GAAkB,EAAI,KAAK,EAAM,IAAM,IAAI,OAAO,EAAK,CAAC,OAAO,EAAU,GAAG,CAAC,GAAG,CAAC,KAAK,IAAI,CAE7G,KAAK,KAAK,EAAU,CACpB,KAAK,KAAK,EAAU,EAAQ,CAAC,CAC7B,KAAK,KAAK,EAAU,CACpB,IAAK,IAAM,KAAO,EAChB,KAAK,KAAK,EAAU,EAAI,CAAC,CAE3B,KAAK,KAAK,EAAU,CAGtB,sBAA2D,CACzD,GAAI,CACF,OAAO,KAAK,IAAI,KAAwB,eAAe,MACjD,CACN,OAAO"}
@@ -1,4 +1,4 @@
1
- const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`fs/promises`);n=e.__toESM(n);let r=require(`path`);r=e.__toESM(r);var i=class extends t.Command{signature=`queue:failed-table`;description=`Create a migration for the failed queue jobs database table`;constructor(e){super(),this.app=e}async handle(e,t){let i=t.path||this.app.databasePath(`migrations`);await n.mkdir(i,{recursive:!0});let a=`${new Date().toISOString().replace(/[-:T]/g,``).slice(0,14)}_create_failed_jobs_table.ts`,o=r.join(i,a);await n.writeFile(o,this.getStub()),this.info(`Migration created successfully: ${o}`),this.comment(`Run "npx orchestr migrate" to create the table.`)}getStub(){return`import { Migration } from '@orchestr-sh/orchestr';
1
+ const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`fs/promises`);n=e.__toESM(n,1);let r=require(`path`);r=e.__toESM(r,1);var i=class extends t.Command{app;signature=`queue:failed-table`;description=`Create a migration for the failed queue jobs database table`;constructor(e){super(),this.app=e}async handle(e,t){let i=t.path||this.app.databasePath(`migrations`);await n.mkdir(i,{recursive:!0});let a=`${new Date().toISOString().replace(/[-:T]/g,``).slice(0,14)}_create_failed_jobs_table.ts`,o=r.join(i,a);await n.writeFile(o,this.getStub()),this.info(`Migration created successfully: ${o}`),this.comment(`Run "npx orchestr migrate" to create the table.`)}getStub(){return`import { Migration } from '@orchestr-sh/orchestr';
2
2
  import type { SchemaBuilder } from '@orchestr-sh/orchestr';
3
3
 
4
4
  export default class CreateFailedJobsTable extends Migration {
@@ -1,4 +1,4 @@
1
- import{Command as e}from"../Command.mjs";import*as t from"fs/promises";import*as n from"path";var r=class extends e{signature=`queue:failed-table`;description=`Create a migration for the failed queue jobs database table`;constructor(e){super(),this.app=e}async handle(e,r){let i=r.path||this.app.databasePath(`migrations`);await t.mkdir(i,{recursive:!0});let a=`${new Date().toISOString().replace(/[-:T]/g,``).slice(0,14)}_create_failed_jobs_table.ts`,o=n.join(i,a);await t.writeFile(o,this.getStub()),this.info(`Migration created successfully: ${o}`),this.comment(`Run "npx orchestr migrate" to create the table.`)}getStub(){return`import { Migration } from '@orchestr-sh/orchestr';
1
+ import{Command as e}from"../Command.mjs";import*as t from"fs/promises";import*as n from"path";var r=class extends e{app;signature=`queue:failed-table`;description=`Create a migration for the failed queue jobs database table`;constructor(e){super(),this.app=e}async handle(e,r){let i=r.path||this.app.databasePath(`migrations`);await t.mkdir(i,{recursive:!0});let a=`${new Date().toISOString().replace(/[-:T]/g,``).slice(0,14)}_create_failed_jobs_table.ts`,o=n.join(i,a);await t.writeFile(o,this.getStub()),this.info(`Migration created successfully: ${o}`),this.comment(`Run "npx orchestr migrate" to create the table.`)}getStub(){return`import { Migration } from '@orchestr-sh/orchestr';
2
2
  import type { SchemaBuilder } from '@orchestr-sh/orchestr';
3
3
 
4
4
  export default class CreateFailedJobsTable extends Migration {
@@ -1 +1 @@
1
- {"version":3,"file":"QueueFailedTableCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueueFailedTableCommand.ts"],"sourcesContent":["/**\n * QueueFailedTableCommand\n *\n * Create a migration for the failed queue jobs database table.\n * Mirrors Laravel's `php artisan queue:failed-table`.\n */\n\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueueFailedTableCommand extends Command {\n signature = 'queue:failed-table';\n description = 'Create a migration for the failed queue jobs database table';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(_args: string[], options: CommandOptions): Promise<void> {\n const migrationsPath = (options.path as string) || this.app.databasePath('migrations');\n await fs.mkdir(migrationsPath, { recursive: true });\n\n const timestamp = new Date().toISOString().replace(/[-:T]/g, '').slice(0, 14);\n const fileName = `${timestamp}_create_failed_jobs_table.ts`;\n const filePath = path.join(migrationsPath, fileName);\n\n await fs.writeFile(filePath, this.getStub());\n\n this.info(`Migration created successfully: ${filePath}`);\n this.comment('Run \"npx orchestr migrate\" to create the table.');\n }\n\n protected getStub(): string {\n return `import { Migration } from '@orchestr-sh/orchestr';\nimport type { SchemaBuilder } from '@orchestr-sh/orchestr';\n\nexport default class CreateFailedJobsTable extends Migration {\n async up(schema: SchemaBuilder): Promise<void> {\n await schema.create('failed_jobs', (table) => {\n table.bigIncrements('id');\n table.string('uuid').unique();\n table.text('connection');\n table.text('queue');\n table.text('payload');\n table.text('exception');\n table.timestamp('failed_at').defaultTo(new Date().toISOString());\n });\n }\n\n async down(schema: SchemaBuilder): Promise<void> {\n await schema.drop('failed_jobs');\n }\n}\n`;\n }\n}\n"],"mappings":"8FAYA,IAAa,EAAb,cAA6C,CAAQ,CACnD,UAAY,qBACZ,YAAc,8DAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAiB,EAAwC,CACpE,IAAM,EAAkB,EAAQ,MAAmB,KAAK,IAAI,aAAa,aAAa,CACtF,MAAM,EAAG,MAAM,EAAgB,CAAE,UAAW,GAAM,CAAC,CAGnD,IAAM,EAAW,GADC,IAAI,MAAM,CAAC,aAAa,CAAC,QAAQ,SAAU,GAAG,CAAC,MAAM,EAAG,GAAG,CAC/C,8BACxB,EAAW,EAAK,KAAK,EAAgB,EAAS,CAEpD,MAAM,EAAG,UAAU,EAAU,KAAK,SAAS,CAAC,CAE5C,KAAK,KAAK,mCAAmC,IAAW,CACxD,KAAK,QAAQ,kDAAkD,CAGjE,SAA4B,CAC1B,MAAO"}
1
+ {"version":3,"file":"QueueFailedTableCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueueFailedTableCommand.ts"],"sourcesContent":["/**\n * QueueFailedTableCommand\n *\n * Create a migration for the failed queue jobs database table.\n * Mirrors Laravel's `php artisan queue:failed-table`.\n */\n\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueueFailedTableCommand extends Command {\n signature = 'queue:failed-table';\n description = 'Create a migration for the failed queue jobs database table';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(_args: string[], options: CommandOptions): Promise<void> {\n const migrationsPath = (options.path as string) || this.app.databasePath('migrations');\n await fs.mkdir(migrationsPath, { recursive: true });\n\n const timestamp = new Date().toISOString().replace(/[-:T]/g, '').slice(0, 14);\n const fileName = `${timestamp}_create_failed_jobs_table.ts`;\n const filePath = path.join(migrationsPath, fileName);\n\n await fs.writeFile(filePath, this.getStub());\n\n this.info(`Migration created successfully: ${filePath}`);\n this.comment('Run \"npx orchestr migrate\" to create the table.');\n }\n\n protected getStub(): string {\n return `import { Migration } from '@orchestr-sh/orchestr';\nimport type { SchemaBuilder } from '@orchestr-sh/orchestr';\n\nexport default class CreateFailedJobsTable extends Migration {\n async up(schema: SchemaBuilder): Promise<void> {\n await schema.create('failed_jobs', (table) => {\n table.bigIncrements('id');\n table.string('uuid').unique();\n table.text('connection');\n table.text('queue');\n table.text('payload');\n table.text('exception');\n table.timestamp('failed_at').defaultTo(new Date().toISOString());\n });\n }\n\n async down(schema: SchemaBuilder): Promise<void> {\n await schema.drop('failed_jobs');\n }\n}\n`;\n }\n}\n"],"mappings":"8FAYA,IAAa,EAAb,cAA6C,CAAQ,CAI7B,IAHtB,UAAY,qBACZ,YAAc,8DAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAiB,EAAwC,CACpE,IAAM,EAAkB,EAAQ,MAAmB,KAAK,IAAI,aAAa,aAAa,CACtF,MAAM,EAAG,MAAM,EAAgB,CAAE,UAAW,GAAM,CAAC,CAGnD,IAAM,EAAW,GADC,IAAI,MAAM,CAAC,aAAa,CAAC,QAAQ,SAAU,GAAG,CAAC,MAAM,EAAG,GAC7C,CAAC,8BACxB,EAAW,EAAK,KAAK,EAAgB,EAAS,CAEpD,MAAM,EAAG,UAAU,EAAU,KAAK,SAAS,CAAC,CAE5C,KAAK,KAAK,mCAAmC,IAAW,CACxD,KAAK,QAAQ,kDAAkD,CAGjE,SAA4B,CAC1B,MAAO"}
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../Command.cjs`);var t=class extends e.Command{signature=`queue:flush`;description=`Flush all of the failed queue jobs`;constructor(e){super(),this.app=e}async handle(e,t){let n=this.getFailedJobProvider();if(!n){this.error(`No failed job provider configured.`);return}let r=t.hours?Number(t.hours):void 0;await n.flush(r),r?this.info(`All failed jobs older than ${r} hour(s) have been deleted.`):this.info(`All failed jobs deleted successfully.`)}getFailedJobProvider(){try{return this.app.make(`queue.failer`)}catch{return null}}};exports.QueueFlushCommand=t;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../Command.cjs`);var t=class extends e.Command{app;signature=`queue:flush`;description=`Flush all of the failed queue jobs`;constructor(e){super(),this.app=e}async handle(e,t){let n=this.getFailedJobProvider();if(!n){this.error(`No failed job provider configured.`);return}let r=t.hours?Number(t.hours):void 0;await n.flush(r),r?this.info(`All failed jobs older than ${r} hour(s) have been deleted.`):this.info(`All failed jobs deleted successfully.`)}getFailedJobProvider(){try{return this.app.make(`queue.failer`)}catch{return null}}};exports.QueueFlushCommand=t;
@@ -1,2 +1,2 @@
1
- import{Command as e}from"../Command.mjs";var t=class extends e{signature=`queue:flush`;description=`Flush all of the failed queue jobs`;constructor(e){super(),this.app=e}async handle(e,t){let n=this.getFailedJobProvider();if(!n){this.error(`No failed job provider configured.`);return}let r=t.hours?Number(t.hours):void 0;await n.flush(r),r?this.info(`All failed jobs older than ${r} hour(s) have been deleted.`):this.info(`All failed jobs deleted successfully.`)}getFailedJobProvider(){try{return this.app.make(`queue.failer`)}catch{return null}}};export{t as QueueFlushCommand};
1
+ import{Command as e}from"../Command.mjs";var t=class extends e{app;signature=`queue:flush`;description=`Flush all of the failed queue jobs`;constructor(e){super(),this.app=e}async handle(e,t){let n=this.getFailedJobProvider();if(!n){this.error(`No failed job provider configured.`);return}let r=t.hours?Number(t.hours):void 0;await n.flush(r),r?this.info(`All failed jobs older than ${r} hour(s) have been deleted.`):this.info(`All failed jobs deleted successfully.`)}getFailedJobProvider(){try{return this.app.make(`queue.failer`)}catch{return null}}};export{t as QueueFlushCommand};
2
2
  //# sourceMappingURL=QueueFlushCommand.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueueFlushCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueueFlushCommand.ts"],"sourcesContent":["/**\n * QueueFlushCommand\n *\n * Flush all of the failed queue jobs.\n * Mirrors Laravel's `php artisan queue:flush`.\n */\n\nimport type { FailedJobProvider } from '@/Queue/Failed/FailedJobProvider';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueueFlushCommand extends Command {\n signature = 'queue:flush';\n description = 'Flush all of the failed queue jobs';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(_args: string[], options: CommandOptions): Promise<void> {\n const failer = this.getFailedJobProvider();\n\n if (!failer) {\n this.error('No failed job provider configured.');\n return;\n }\n\n const hours = options.hours ? Number(options.hours) : undefined;\n\n await failer.flush(hours);\n\n if (hours) {\n this.info(`All failed jobs older than ${hours} hour(s) have been deleted.`);\n } else {\n this.info('All failed jobs deleted successfully.');\n }\n }\n\n protected getFailedJobProvider(): FailedJobProvider | null {\n try {\n return this.app.make<FailedJobProvider>('queue.failer');\n } catch {\n return null;\n }\n }\n}\n"],"mappings":"yCAWA,IAAa,EAAb,cAAuC,CAAQ,CAC7C,UAAY,cACZ,YAAc,qCAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAiB,EAAwC,CACpE,IAAM,EAAS,KAAK,sBAAsB,CAE1C,GAAI,CAAC,EAAQ,CACX,KAAK,MAAM,qCAAqC,CAChD,OAGF,IAAM,EAAQ,EAAQ,MAAQ,OAAO,EAAQ,MAAM,CAAG,IAAA,GAEtD,MAAM,EAAO,MAAM,EAAM,CAErB,EACF,KAAK,KAAK,8BAA8B,EAAM,6BAA6B,CAE3E,KAAK,KAAK,wCAAwC,CAItD,sBAA2D,CACzD,GAAI,CACF,OAAO,KAAK,IAAI,KAAwB,eAAe,MACjD,CACN,OAAO"}
1
+ {"version":3,"file":"QueueFlushCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueueFlushCommand.ts"],"sourcesContent":["/**\n * QueueFlushCommand\n *\n * Flush all of the failed queue jobs.\n * Mirrors Laravel's `php artisan queue:flush`.\n */\n\nimport type { FailedJobProvider } from '@/Queue/Failed/FailedJobProvider';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueueFlushCommand extends Command {\n signature = 'queue:flush';\n description = 'Flush all of the failed queue jobs';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(_args: string[], options: CommandOptions): Promise<void> {\n const failer = this.getFailedJobProvider();\n\n if (!failer) {\n this.error('No failed job provider configured.');\n return;\n }\n\n const hours = options.hours ? Number(options.hours) : undefined;\n\n await failer.flush(hours);\n\n if (hours) {\n this.info(`All failed jobs older than ${hours} hour(s) have been deleted.`);\n } else {\n this.info('All failed jobs deleted successfully.');\n }\n }\n\n protected getFailedJobProvider(): FailedJobProvider | null {\n try {\n return this.app.make<FailedJobProvider>('queue.failer');\n } catch {\n return null;\n }\n }\n}\n"],"mappings":"yCAWA,IAAa,EAAb,cAAuC,CAAQ,CAIvB,IAHtB,UAAY,cACZ,YAAc,qCAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAiB,EAAwC,CACpE,IAAM,EAAS,KAAK,sBAAsB,CAE1C,GAAI,CAAC,EAAQ,CACX,KAAK,MAAM,qCAAqC,CAChD,OAGF,IAAM,EAAQ,EAAQ,MAAQ,OAAO,EAAQ,MAAM,CAAG,IAAA,GAEtD,MAAM,EAAO,MAAM,EAAM,CAErB,EACF,KAAK,KAAK,8BAA8B,EAAM,6BAA6B,CAE3E,KAAK,KAAK,wCAAwC,CAItD,sBAA2D,CACzD,GAAI,CACF,OAAO,KAAK,IAAI,KAAwB,eAAe,MACjD,CACN,OAAO"}
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../Command.cjs`);var t=class extends e.Command{signature=`queue:forget <id>`;description=`Delete a failed queue job`;constructor(e){super(),this.app=e}async handle(e,t){let n=e[0];if(!n){this.error(`Please specify a job ID.`);return}let r=this.getFailedJobProvider();if(!r){this.error(`No failed job provider configured.`);return}await r.forget(n)?this.info(`Failed job [${n}] deleted successfully.`):this.error(`Failed job [${n}] not found.`)}getFailedJobProvider(){try{return this.app.make(`queue.failer`)}catch{return null}}};exports.QueueForgetCommand=t;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../Command.cjs`);var t=class extends e.Command{app;signature=`queue:forget <id>`;description=`Delete a failed queue job`;constructor(e){super(),this.app=e}async handle(e,t){let n=e[0];if(!n){this.error(`Please specify a job ID.`);return}let r=this.getFailedJobProvider();if(!r){this.error(`No failed job provider configured.`);return}await r.forget(n)?this.info(`Failed job [${n}] deleted successfully.`):this.error(`Failed job [${n}] not found.`)}getFailedJobProvider(){try{return this.app.make(`queue.failer`)}catch{return null}}};exports.QueueForgetCommand=t;
@@ -1,2 +1,2 @@
1
- import{Command as e}from"../Command.mjs";var t=class extends e{signature=`queue:forget <id>`;description=`Delete a failed queue job`;constructor(e){super(),this.app=e}async handle(e,t){let n=e[0];if(!n){this.error(`Please specify a job ID.`);return}let r=this.getFailedJobProvider();if(!r){this.error(`No failed job provider configured.`);return}await r.forget(n)?this.info(`Failed job [${n}] deleted successfully.`):this.error(`Failed job [${n}] not found.`)}getFailedJobProvider(){try{return this.app.make(`queue.failer`)}catch{return null}}};export{t as QueueForgetCommand};
1
+ import{Command as e}from"../Command.mjs";var t=class extends e{app;signature=`queue:forget <id>`;description=`Delete a failed queue job`;constructor(e){super(),this.app=e}async handle(e,t){let n=e[0];if(!n){this.error(`Please specify a job ID.`);return}let r=this.getFailedJobProvider();if(!r){this.error(`No failed job provider configured.`);return}await r.forget(n)?this.info(`Failed job [${n}] deleted successfully.`):this.error(`Failed job [${n}] not found.`)}getFailedJobProvider(){try{return this.app.make(`queue.failer`)}catch{return null}}};export{t as QueueForgetCommand};
2
2
  //# sourceMappingURL=QueueForgetCommand.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueueForgetCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueueForgetCommand.ts"],"sourcesContent":["/**\n * QueueForgetCommand\n *\n * Delete a failed queue job.\n * Mirrors Laravel's `php artisan queue:forget`.\n */\n\nimport type { FailedJobProvider } from '@/Queue/Failed/FailedJobProvider';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueueForgetCommand extends Command {\n signature = 'queue:forget <id>';\n description = 'Delete a failed queue job';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], _options: CommandOptions): Promise<void> {\n const id = args[0];\n\n if (!id) {\n this.error('Please specify a job ID.');\n return;\n }\n\n const failer = this.getFailedJobProvider();\n\n if (!failer) {\n this.error('No failed job provider configured.');\n return;\n }\n\n const deleted = await failer.forget(id);\n\n if (deleted) {\n this.info(`Failed job [${id}] deleted successfully.`);\n } else {\n this.error(`Failed job [${id}] not found.`);\n }\n }\n\n protected getFailedJobProvider(): FailedJobProvider | null {\n try {\n return this.app.make<FailedJobProvider>('queue.failer');\n } catch {\n return null;\n }\n }\n}\n"],"mappings":"yCAWA,IAAa,EAAb,cAAwC,CAAQ,CAC9C,UAAY,oBACZ,YAAc,4BAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAyC,CACpE,IAAM,EAAK,EAAK,GAEhB,GAAI,CAAC,EAAI,CACP,KAAK,MAAM,2BAA2B,CACtC,OAGF,IAAM,EAAS,KAAK,sBAAsB,CAE1C,GAAI,CAAC,EAAQ,CACX,KAAK,MAAM,qCAAqC,CAChD,OAGc,MAAM,EAAO,OAAO,EAAG,CAGrC,KAAK,KAAK,eAAe,EAAG,yBAAyB,CAErD,KAAK,MAAM,eAAe,EAAG,cAAc,CAI/C,sBAA2D,CACzD,GAAI,CACF,OAAO,KAAK,IAAI,KAAwB,eAAe,MACjD,CACN,OAAO"}
1
+ {"version":3,"file":"QueueForgetCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueueForgetCommand.ts"],"sourcesContent":["/**\n * QueueForgetCommand\n *\n * Delete a failed queue job.\n * Mirrors Laravel's `php artisan queue:forget`.\n */\n\nimport type { FailedJobProvider } from '@/Queue/Failed/FailedJobProvider';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueueForgetCommand extends Command {\n signature = 'queue:forget <id>';\n description = 'Delete a failed queue job';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], _options: CommandOptions): Promise<void> {\n const id = args[0];\n\n if (!id) {\n this.error('Please specify a job ID.');\n return;\n }\n\n const failer = this.getFailedJobProvider();\n\n if (!failer) {\n this.error('No failed job provider configured.');\n return;\n }\n\n const deleted = await failer.forget(id);\n\n if (deleted) {\n this.info(`Failed job [${id}] deleted successfully.`);\n } else {\n this.error(`Failed job [${id}] not found.`);\n }\n }\n\n protected getFailedJobProvider(): FailedJobProvider | null {\n try {\n return this.app.make<FailedJobProvider>('queue.failer');\n } catch {\n return null;\n }\n }\n}\n"],"mappings":"yCAWA,IAAa,EAAb,cAAwC,CAAQ,CAIxB,IAHtB,UAAY,oBACZ,YAAc,4BAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAyC,CACpE,IAAM,EAAK,EAAK,GAEhB,GAAI,CAAC,EAAI,CACP,KAAK,MAAM,2BAA2B,CACtC,OAGF,IAAM,EAAS,KAAK,sBAAsB,CAE1C,GAAI,CAAC,EAAQ,CACX,KAAK,MAAM,qCAAqC,CAChD,OAKE,MAFkB,EAAO,OAAO,EAAG,CAGrC,KAAK,KAAK,eAAe,EAAG,yBAAyB,CAErD,KAAK,MAAM,eAAe,EAAG,cAAc,CAI/C,sBAA2D,CACzD,GAAI,CACF,OAAO,KAAK,IAAI,KAAwB,eAAe,MACjD,CACN,OAAO"}
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../Command.cjs`);var t=class extends e.Command{signature=`queue:monitor [queues]`;description=`Monitor the size of the specified queues`;constructor(e){super(),this.app=e}async handle(e,t){let n=this.app.make(`queue`),r=e[0]||`default`,i=Number(t.max)||1e3,a=r.split(`,`).map(e=>e.trim());this.info(`Queue Monitor`),this.newLine();for(let e of a){let t=e.split(`:`),r=t.length>1?t[0]:n.getDefaultConnection(),a=t.length>1?t[1]:t[0],o=await n.connection(r).size(a),s=o>i?`\x1B[31mALERT\x1B[0m`:`\x1B[32mOK\x1B[0m`;this.line(` [${r}:${a}] ${o} job(s) ${s}`),o>i&&this.warn(` Queue [${r}:${a}] has ${o} jobs, which exceeds the maximum of ${i}.`)}}};exports.QueueMonitorCommand=t;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../Command.cjs`);var t=class extends e.Command{app;signature=`queue:monitor [queues]`;description=`Monitor the size of the specified queues`;constructor(e){super(),this.app=e}async handle(e,t){let n=this.app.make(`queue`),r=e[0]||`default`,i=Number(t.max)||1e3,a=r.split(`,`).map(e=>e.trim());this.info(`Queue Monitor`),this.newLine();for(let e of a){let t=e.split(`:`),r=t.length>1?t[0]:n.getDefaultConnection(),a=t.length>1?t[1]:t[0],o=await n.connection(r).size(a),s=o>i?`\x1B[31mALERT\x1B[0m`:`\x1B[32mOK\x1B[0m`;this.line(` [${r}:${a}] ${o} job(s) ${s}`),o>i&&this.warn(` Queue [${r}:${a}] has ${o} jobs, which exceeds the maximum of ${i}.`)}}};exports.QueueMonitorCommand=t;
@@ -1,2 +1,2 @@
1
- import{Command as e}from"../Command.mjs";var t=class extends e{signature=`queue:monitor [queues]`;description=`Monitor the size of the specified queues`;constructor(e){super(),this.app=e}async handle(e,t){let n=this.app.make(`queue`),r=e[0]||`default`,i=Number(t.max)||1e3,a=r.split(`,`).map(e=>e.trim());this.info(`Queue Monitor`),this.newLine();for(let e of a){let t=e.split(`:`),r=t.length>1?t[0]:n.getDefaultConnection(),a=t.length>1?t[1]:t[0],o=await n.connection(r).size(a),s=o>i?`\x1B[31mALERT\x1B[0m`:`\x1B[32mOK\x1B[0m`;this.line(` [${r}:${a}] ${o} job(s) ${s}`),o>i&&this.warn(` Queue [${r}:${a}] has ${o} jobs, which exceeds the maximum of ${i}.`)}}};export{t as QueueMonitorCommand};
1
+ import{Command as e}from"../Command.mjs";var t=class extends e{app;signature=`queue:monitor [queues]`;description=`Monitor the size of the specified queues`;constructor(e){super(),this.app=e}async handle(e,t){let n=this.app.make(`queue`),r=e[0]||`default`,i=Number(t.max)||1e3,a=r.split(`,`).map(e=>e.trim());this.info(`Queue Monitor`),this.newLine();for(let e of a){let t=e.split(`:`),r=t.length>1?t[0]:n.getDefaultConnection(),a=t.length>1?t[1]:t[0],o=await n.connection(r).size(a),s=o>i?`\x1B[31mALERT\x1B[0m`:`\x1B[32mOK\x1B[0m`;this.line(` [${r}:${a}] ${o} job(s) ${s}`),o>i&&this.warn(` Queue [${r}:${a}] has ${o} jobs, which exceeds the maximum of ${i}.`)}}};export{t as QueueMonitorCommand};
2
2
  //# sourceMappingURL=QueueMonitorCommand.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueueMonitorCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueueMonitorCommand.ts"],"sourcesContent":["/**\n * QueueMonitorCommand\n *\n * Monitor the size of the specified queues.\n * Mirrors Laravel's `php artisan queue:monitor`.\n */\n\nimport type { QueueManager } from '@/Queue/QueueManager';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueueMonitorCommand extends Command {\n signature = 'queue:monitor [queues]';\n description = 'Monitor the size of the specified queues';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const manager = this.app.make<QueueManager>('queue');\n const queuesArg = args[0] || 'default';\n const max = Number(options.max) || 1000;\n\n const queuePairs = queuesArg.split(',').map((q) => q.trim());\n\n this.info('Queue Monitor');\n this.newLine();\n\n for (const queuePair of queuePairs) {\n // Format: connection:queue or just queue\n const parts = queuePair.split(':');\n const connection = parts.length > 1 ? parts[0] : manager.getDefaultConnection();\n const queue = parts.length > 1 ? parts[1] : parts[0];\n\n const driver = manager.connection(connection);\n const size = await driver.size(queue);\n\n const status = size > max ? '\\x1b[31mALERT\\x1b[0m' : '\\x1b[32mOK\\x1b[0m';\n\n this.line(` [${connection}:${queue}] ${size} job(s) ${status}`);\n\n if (size > max) {\n this.warn(` Queue [${connection}:${queue}] has ${size} jobs, which exceeds the maximum of ${max}.`);\n }\n }\n }\n}\n"],"mappings":"yCAWA,IAAa,EAAb,cAAyC,CAAQ,CAC/C,UAAY,yBACZ,YAAc,2CAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAU,KAAK,IAAI,KAAmB,QAAQ,CAC9C,EAAY,EAAK,IAAM,UACvB,EAAM,OAAO,EAAQ,IAAI,EAAI,IAE7B,EAAa,EAAU,MAAM,IAAI,CAAC,IAAK,GAAM,EAAE,MAAM,CAAC,CAE5D,KAAK,KAAK,gBAAgB,CAC1B,KAAK,SAAS,CAEd,IAAK,IAAM,KAAa,EAAY,CAElC,IAAM,EAAQ,EAAU,MAAM,IAAI,CAC5B,EAAa,EAAM,OAAS,EAAI,EAAM,GAAK,EAAQ,sBAAsB,CACzE,EAAQ,EAAM,OAAS,EAAI,EAAM,GAAK,EAAM,GAG5C,EAAO,MADE,EAAQ,WAAW,EAAW,CACnB,KAAK,EAAM,CAE/B,EAAS,EAAO,EAAM,uBAAyB,oBAErD,KAAK,KAAK,MAAM,EAAW,GAAG,EAAM,IAAI,EAAK,UAAU,IAAS,CAE5D,EAAO,GACT,KAAK,KAAK,YAAY,EAAW,GAAG,EAAM,QAAQ,EAAK,sCAAsC,EAAI,GAAG"}
1
+ {"version":3,"file":"QueueMonitorCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueueMonitorCommand.ts"],"sourcesContent":["/**\n * QueueMonitorCommand\n *\n * Monitor the size of the specified queues.\n * Mirrors Laravel's `php artisan queue:monitor`.\n */\n\nimport type { QueueManager } from '@/Queue/QueueManager';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueueMonitorCommand extends Command {\n signature = 'queue:monitor [queues]';\n description = 'Monitor the size of the specified queues';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const manager = this.app.make<QueueManager>('queue');\n const queuesArg = args[0] || 'default';\n const max = Number(options.max) || 1000;\n\n const queuePairs = queuesArg.split(',').map((q) => q.trim());\n\n this.info('Queue Monitor');\n this.newLine();\n\n for (const queuePair of queuePairs) {\n // Format: connection:queue or just queue\n const parts = queuePair.split(':');\n const connection = parts.length > 1 ? parts[0] : manager.getDefaultConnection();\n const queue = parts.length > 1 ? parts[1] : parts[0];\n\n const driver = manager.connection(connection);\n const size = await driver.size(queue);\n\n const status = size > max ? '\\x1b[31mALERT\\x1b[0m' : '\\x1b[32mOK\\x1b[0m';\n\n this.line(` [${connection}:${queue}] ${size} job(s) ${status}`);\n\n if (size > max) {\n this.warn(` Queue [${connection}:${queue}] has ${size} jobs, which exceeds the maximum of ${max}.`);\n }\n }\n }\n}\n"],"mappings":"yCAWA,IAAa,EAAb,cAAyC,CAAQ,CAIzB,IAHtB,UAAY,yBACZ,YAAc,2CAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAU,KAAK,IAAI,KAAmB,QAAQ,CAC9C,EAAY,EAAK,IAAM,UACvB,EAAM,OAAO,EAAQ,IAAI,EAAI,IAE7B,EAAa,EAAU,MAAM,IAAI,CAAC,IAAK,GAAM,EAAE,MAAM,CAAC,CAE5D,KAAK,KAAK,gBAAgB,CAC1B,KAAK,SAAS,CAEd,IAAK,IAAM,KAAa,EAAY,CAElC,IAAM,EAAQ,EAAU,MAAM,IAAI,CAC5B,EAAa,EAAM,OAAS,EAAI,EAAM,GAAK,EAAQ,sBAAsB,CACzE,EAAQ,EAAM,OAAS,EAAI,EAAM,GAAK,EAAM,GAG5C,EAAO,MADE,EAAQ,WAAW,EACT,CAAC,KAAK,EAAM,CAE/B,EAAS,EAAO,EAAM,uBAAyB,oBAErD,KAAK,KAAK,MAAM,EAAW,GAAG,EAAM,IAAI,EAAK,UAAU,IAAS,CAE5D,EAAO,GACT,KAAK,KAAK,YAAY,EAAW,GAAG,EAAM,QAAQ,EAAK,sCAAsC,EAAI,GAAG"}
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../Command.cjs`);var t=class extends e.Command{signature=`queue:prune-batches`;description=`Prune stale entries from the batches database`;constructor(e){super(),this.app=e}async handle(e,t){let n=Number(t.hours)||24,r=Math.floor(Date.now()/1e3)-n*60*60;try{let e=this.app.make(`db`).connection(),i=t.table||`job_batches`;await e.table(i).whereNotNull(`finished_at`).where(`finished_at`,`<=`,r).delete(),await e.table(i).whereNotNull(`cancelled_at`).where(`cancelled_at`,`<=`,r).delete(),this.info(`Pruned batches older than ${n} hour(s).`)}catch(e){this.error(`Failed to prune batches: ${e.message}`)}}};exports.QueuePruneBatchesCommand=t;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../Command.cjs`);var t=class extends e.Command{app;signature=`queue:prune-batches`;description=`Prune stale entries from the batches database`;constructor(e){super(),this.app=e}async handle(e,t){let n=Number(t.hours)||24,r=Math.floor(Date.now()/1e3)-n*60*60;try{let e=this.app.make(`db`).connection(),i=t.table||`job_batches`;await e.table(i).whereNotNull(`finished_at`).where(`finished_at`,`<=`,r).delete(),await e.table(i).whereNotNull(`cancelled_at`).where(`cancelled_at`,`<=`,r).delete(),this.info(`Pruned batches older than ${n} hour(s).`)}catch(e){this.error(`Failed to prune batches: ${e.message}`)}}};exports.QueuePruneBatchesCommand=t;
@@ -1,2 +1,2 @@
1
- import{Command as e}from"../Command.mjs";var t=class extends e{signature=`queue:prune-batches`;description=`Prune stale entries from the batches database`;constructor(e){super(),this.app=e}async handle(e,t){let n=Number(t.hours)||24,r=Math.floor(Date.now()/1e3)-n*60*60;try{let e=this.app.make(`db`).connection(),i=t.table||`job_batches`;await e.table(i).whereNotNull(`finished_at`).where(`finished_at`,`<=`,r).delete(),await e.table(i).whereNotNull(`cancelled_at`).where(`cancelled_at`,`<=`,r).delete(),this.info(`Pruned batches older than ${n} hour(s).`)}catch(e){this.error(`Failed to prune batches: ${e.message}`)}}};export{t as QueuePruneBatchesCommand};
1
+ import{Command as e}from"../Command.mjs";var t=class extends e{app;signature=`queue:prune-batches`;description=`Prune stale entries from the batches database`;constructor(e){super(),this.app=e}async handle(e,t){let n=Number(t.hours)||24,r=Math.floor(Date.now()/1e3)-n*60*60;try{let e=this.app.make(`db`).connection(),i=t.table||`job_batches`;await e.table(i).whereNotNull(`finished_at`).where(`finished_at`,`<=`,r).delete(),await e.table(i).whereNotNull(`cancelled_at`).where(`cancelled_at`,`<=`,r).delete(),this.info(`Pruned batches older than ${n} hour(s).`)}catch(e){this.error(`Failed to prune batches: ${e.message}`)}}};export{t as QueuePruneBatchesCommand};
2
2
  //# sourceMappingURL=QueuePruneBatchesCommand.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueuePruneBatchesCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueuePruneBatchesCommand.ts"],"sourcesContent":["/**\n * QueuePruneBatchesCommand\n *\n * Prune stale entries from the batches database.\n * Mirrors Laravel's `php artisan queue:prune-batches`.\n */\n\nimport type { DatabaseManager } from '@/Database/DatabaseManager';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueuePruneBatchesCommand extends Command {\n signature = 'queue:prune-batches';\n description = 'Prune stale entries from the batches database';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(_args: string[], options: CommandOptions): Promise<void> {\n const hours = Number(options.hours) || 24;\n const cutoff = Math.floor(Date.now() / 1000) - hours * 60 * 60;\n\n try {\n const db = this.app.make<DatabaseManager>('db');\n const connection = db.connection();\n const table = (options.table as string) || 'job_batches';\n\n // Delete finished batches older than the cutoff\n await connection.table(table).whereNotNull('finished_at').where('finished_at', '<=', cutoff).delete();\n\n // Also delete cancelled batches older than the cutoff\n await connection.table(table).whereNotNull('cancelled_at').where('cancelled_at', '<=', cutoff).delete();\n\n this.info(`Pruned batches older than ${hours} hour(s).`);\n } catch (error) {\n this.error(`Failed to prune batches: ${(error as Error).message}`);\n }\n }\n}\n"],"mappings":"yCAWA,IAAa,EAAb,cAA8C,CAAQ,CACpD,UAAY,sBACZ,YAAc,gDAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAiB,EAAwC,CACpE,IAAM,EAAQ,OAAO,EAAQ,MAAM,EAAI,GACjC,EAAS,KAAK,MAAM,KAAK,KAAK,CAAG,IAAK,CAAG,EAAQ,GAAK,GAE5D,GAAI,CAEF,IAAM,EADK,KAAK,IAAI,KAAsB,KAAK,CACzB,YAAY,CAC5B,EAAS,EAAQ,OAAoB,cAG3C,MAAM,EAAW,MAAM,EAAM,CAAC,aAAa,cAAc,CAAC,MAAM,cAAe,KAAM,EAAO,CAAC,QAAQ,CAGrG,MAAM,EAAW,MAAM,EAAM,CAAC,aAAa,eAAe,CAAC,MAAM,eAAgB,KAAM,EAAO,CAAC,QAAQ,CAEvG,KAAK,KAAK,6BAA6B,EAAM,WAAW,OACjD,EAAO,CACd,KAAK,MAAM,4BAA6B,EAAgB,UAAU"}
1
+ {"version":3,"file":"QueuePruneBatchesCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueuePruneBatchesCommand.ts"],"sourcesContent":["/**\n * QueuePruneBatchesCommand\n *\n * Prune stale entries from the batches database.\n * Mirrors Laravel's `php artisan queue:prune-batches`.\n */\n\nimport type { DatabaseManager } from '@/Database/DatabaseManager';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueuePruneBatchesCommand extends Command {\n signature = 'queue:prune-batches';\n description = 'Prune stale entries from the batches database';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(_args: string[], options: CommandOptions): Promise<void> {\n const hours = Number(options.hours) || 24;\n const cutoff = Math.floor(Date.now() / 1000) - hours * 60 * 60;\n\n try {\n const db = this.app.make<DatabaseManager>('db');\n const connection = db.connection();\n const table = (options.table as string) || 'job_batches';\n\n // Delete finished batches older than the cutoff\n await connection.table(table).whereNotNull('finished_at').where('finished_at', '<=', cutoff).delete();\n\n // Also delete cancelled batches older than the cutoff\n await connection.table(table).whereNotNull('cancelled_at').where('cancelled_at', '<=', cutoff).delete();\n\n this.info(`Pruned batches older than ${hours} hour(s).`);\n } catch (error) {\n this.error(`Failed to prune batches: ${(error as Error).message}`);\n }\n }\n}\n"],"mappings":"yCAWA,IAAa,EAAb,cAA8C,CAAQ,CAI9B,IAHtB,UAAY,sBACZ,YAAc,gDAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAiB,EAAwC,CACpE,IAAM,EAAQ,OAAO,EAAQ,MAAM,EAAI,GACjC,EAAS,KAAK,MAAM,KAAK,KAAK,CAAG,IAAK,CAAG,EAAQ,GAAK,GAE5D,GAAI,CAEF,IAAM,EADK,KAAK,IAAI,KAAsB,KACrB,CAAC,YAAY,CAC5B,EAAS,EAAQ,OAAoB,cAG3C,MAAM,EAAW,MAAM,EAAM,CAAC,aAAa,cAAc,CAAC,MAAM,cAAe,KAAM,EAAO,CAAC,QAAQ,CAGrG,MAAM,EAAW,MAAM,EAAM,CAAC,aAAa,eAAe,CAAC,MAAM,eAAgB,KAAM,EAAO,CAAC,QAAQ,CAEvG,KAAK,KAAK,6BAA6B,EAAM,WAAW,OACjD,EAAO,CACd,KAAK,MAAM,4BAA6B,EAAgB,UAAU"}
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../Command.cjs`);var t=class extends e.Command{signature=`queue:prune-failed`;description=`Prune stale entries from the failed jobs table`;constructor(e){super(),this.app=e}async handle(e,t){let n=Number(t.hours)||24,r=this.getFailedJobProvider();if(!r){this.error(`No failed job provider configured.`);return}await r.flush(n),this.info(`Pruned failed jobs older than ${n} hour(s).`)}getFailedJobProvider(){try{return this.app.make(`queue.failer`)}catch{return null}}};exports.QueuePruneFailedCommand=t;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../Command.cjs`);var t=class extends e.Command{app;signature=`queue:prune-failed`;description=`Prune stale entries from the failed jobs table`;constructor(e){super(),this.app=e}async handle(e,t){let n=Number(t.hours)||24,r=this.getFailedJobProvider();if(!r){this.error(`No failed job provider configured.`);return}await r.flush(n),this.info(`Pruned failed jobs older than ${n} hour(s).`)}getFailedJobProvider(){try{return this.app.make(`queue.failer`)}catch{return null}}};exports.QueuePruneFailedCommand=t;
@@ -1,2 +1,2 @@
1
- import{Command as e}from"../Command.mjs";var t=class extends e{signature=`queue:prune-failed`;description=`Prune stale entries from the failed jobs table`;constructor(e){super(),this.app=e}async handle(e,t){let n=Number(t.hours)||24,r=this.getFailedJobProvider();if(!r){this.error(`No failed job provider configured.`);return}await r.flush(n),this.info(`Pruned failed jobs older than ${n} hour(s).`)}getFailedJobProvider(){try{return this.app.make(`queue.failer`)}catch{return null}}};export{t as QueuePruneFailedCommand};
1
+ import{Command as e}from"../Command.mjs";var t=class extends e{app;signature=`queue:prune-failed`;description=`Prune stale entries from the failed jobs table`;constructor(e){super(),this.app=e}async handle(e,t){let n=Number(t.hours)||24,r=this.getFailedJobProvider();if(!r){this.error(`No failed job provider configured.`);return}await r.flush(n),this.info(`Pruned failed jobs older than ${n} hour(s).`)}getFailedJobProvider(){try{return this.app.make(`queue.failer`)}catch{return null}}};export{t as QueuePruneFailedCommand};
2
2
  //# sourceMappingURL=QueuePruneFailedCommand.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueuePruneFailedCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueuePruneFailedCommand.ts"],"sourcesContent":["/**\n * QueuePruneFailedCommand\n *\n * Prune stale entries from the failed jobs table.\n * Mirrors Laravel's `php artisan queue:prune-failed`.\n */\n\nimport type { FailedJobProvider } from '@/Queue/Failed/FailedJobProvider';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueuePruneFailedCommand extends Command {\n signature = 'queue:prune-failed';\n description = 'Prune stale entries from the failed jobs table';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(_args: string[], options: CommandOptions): Promise<void> {\n const hours = Number(options.hours) || 24;\n\n const failer = this.getFailedJobProvider();\n\n if (!failer) {\n this.error('No failed job provider configured.');\n return;\n }\n\n await failer.flush(hours);\n\n this.info(`Pruned failed jobs older than ${hours} hour(s).`);\n }\n\n protected getFailedJobProvider(): FailedJobProvider | null {\n try {\n return this.app.make<FailedJobProvider>('queue.failer');\n } catch {\n return null;\n }\n }\n}\n"],"mappings":"yCAWA,IAAa,EAAb,cAA6C,CAAQ,CACnD,UAAY,qBACZ,YAAc,iDAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAiB,EAAwC,CACpE,IAAM,EAAQ,OAAO,EAAQ,MAAM,EAAI,GAEjC,EAAS,KAAK,sBAAsB,CAE1C,GAAI,CAAC,EAAQ,CACX,KAAK,MAAM,qCAAqC,CAChD,OAGF,MAAM,EAAO,MAAM,EAAM,CAEzB,KAAK,KAAK,iCAAiC,EAAM,WAAW,CAG9D,sBAA2D,CACzD,GAAI,CACF,OAAO,KAAK,IAAI,KAAwB,eAAe,MACjD,CACN,OAAO"}
1
+ {"version":3,"file":"QueuePruneFailedCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueuePruneFailedCommand.ts"],"sourcesContent":["/**\n * QueuePruneFailedCommand\n *\n * Prune stale entries from the failed jobs table.\n * Mirrors Laravel's `php artisan queue:prune-failed`.\n */\n\nimport type { FailedJobProvider } from '@/Queue/Failed/FailedJobProvider';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueuePruneFailedCommand extends Command {\n signature = 'queue:prune-failed';\n description = 'Prune stale entries from the failed jobs table';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(_args: string[], options: CommandOptions): Promise<void> {\n const hours = Number(options.hours) || 24;\n\n const failer = this.getFailedJobProvider();\n\n if (!failer) {\n this.error('No failed job provider configured.');\n return;\n }\n\n await failer.flush(hours);\n\n this.info(`Pruned failed jobs older than ${hours} hour(s).`);\n }\n\n protected getFailedJobProvider(): FailedJobProvider | null {\n try {\n return this.app.make<FailedJobProvider>('queue.failer');\n } catch {\n return null;\n }\n }\n}\n"],"mappings":"yCAWA,IAAa,EAAb,cAA6C,CAAQ,CAI7B,IAHtB,UAAY,qBACZ,YAAc,iDAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAiB,EAAwC,CACpE,IAAM,EAAQ,OAAO,EAAQ,MAAM,EAAI,GAEjC,EAAS,KAAK,sBAAsB,CAE1C,GAAI,CAAC,EAAQ,CACX,KAAK,MAAM,qCAAqC,CAChD,OAGF,MAAM,EAAO,MAAM,EAAM,CAEzB,KAAK,KAAK,iCAAiC,EAAM,WAAW,CAG9D,sBAA2D,CACzD,GAAI,CACF,OAAO,KAAK,IAAI,KAAwB,eAAe,MACjD,CACN,OAAO"}
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../Command.cjs`);var t=class extends e.Command{signature=`queue:restart`;description=`Restart queue worker daemons after their current job`;constructor(e){super(),this.app=e}async handle(e,t){this.info(`Broadcasting queue restart signal...`);try{process.kill(process.pid,`SIGUSR2`)}catch{}this.info(`Queue restart signal sent.`),this.comment(`Workers will restart after finishing their current job.`)}};exports.QueueRestartCommand=t;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../Command.cjs`);var t=class extends e.Command{app;signature=`queue:restart`;description=`Restart queue worker daemons after their current job`;constructor(e){super(),this.app=e}async handle(e,t){this.info(`Broadcasting queue restart signal...`);try{process.kill(process.pid,`SIGUSR2`)}catch{}this.info(`Queue restart signal sent.`),this.comment(`Workers will restart after finishing their current job.`)}};exports.QueueRestartCommand=t;
@@ -1,2 +1,2 @@
1
- import{Command as e}from"../Command.mjs";var t=class extends e{signature=`queue:restart`;description=`Restart queue worker daemons after their current job`;constructor(e){super(),this.app=e}async handle(e,t){this.info(`Broadcasting queue restart signal...`);try{process.kill(process.pid,`SIGUSR2`)}catch{}this.info(`Queue restart signal sent.`),this.comment(`Workers will restart after finishing their current job.`)}};export{t as QueueRestartCommand};
1
+ import{Command as e}from"../Command.mjs";var t=class extends e{app;signature=`queue:restart`;description=`Restart queue worker daemons after their current job`;constructor(e){super(),this.app=e}async handle(e,t){this.info(`Broadcasting queue restart signal...`);try{process.kill(process.pid,`SIGUSR2`)}catch{}this.info(`Queue restart signal sent.`),this.comment(`Workers will restart after finishing their current job.`)}};export{t as QueueRestartCommand};
2
2
  //# sourceMappingURL=QueueRestartCommand.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueueRestartCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueueRestartCommand.ts"],"sourcesContent":["/**\n * QueueRestartCommand\n *\n * Restart queue worker daemons.\n * Mirrors Laravel's `php artisan queue:restart`.\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueueRestartCommand extends Command {\n signature = 'queue:restart';\n description = 'Restart queue worker daemons after their current job';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(_args: string[], _options: CommandOptions): Promise<void> {\n // Signal workers to restart by sending SIGUSR2\n // In production, this would use a cache-based signal mechanism\n this.info('Broadcasting queue restart signal...');\n\n try {\n process.kill(process.pid, 'SIGUSR2');\n } catch {\n // Process might not support this signal\n }\n\n this.info('Queue restart signal sent.');\n this.comment('Workers will restart after finishing their current job.');\n }\n}\n"],"mappings":"yCAUA,IAAa,EAAb,cAAyC,CAAQ,CAC/C,UAAY,gBACZ,YAAc,uDAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAiB,EAAyC,CAGrE,KAAK,KAAK,uCAAuC,CAEjD,GAAI,CACF,QAAQ,KAAK,QAAQ,IAAK,UAAU,MAC9B,EAIR,KAAK,KAAK,6BAA6B,CACvC,KAAK,QAAQ,0DAA0D"}
1
+ {"version":3,"file":"QueueRestartCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueueRestartCommand.ts"],"sourcesContent":["/**\n * QueueRestartCommand\n *\n * Restart queue worker daemons.\n * Mirrors Laravel's `php artisan queue:restart`.\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueueRestartCommand extends Command {\n signature = 'queue:restart';\n description = 'Restart queue worker daemons after their current job';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(_args: string[], _options: CommandOptions): Promise<void> {\n // Signal workers to restart by sending SIGUSR2\n // In production, this would use a cache-based signal mechanism\n this.info('Broadcasting queue restart signal...');\n\n try {\n process.kill(process.pid, 'SIGUSR2');\n } catch {\n // Process might not support this signal\n }\n\n this.info('Queue restart signal sent.');\n this.comment('Workers will restart after finishing their current job.');\n }\n}\n"],"mappings":"yCAUA,IAAa,EAAb,cAAyC,CAAQ,CAIzB,IAHtB,UAAY,gBACZ,YAAc,uDAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAiB,EAAyC,CAGrE,KAAK,KAAK,uCAAuC,CAEjD,GAAI,CACF,QAAQ,KAAK,QAAQ,IAAK,UAAU,MAC9B,EAIR,KAAK,KAAK,6BAA6B,CACvC,KAAK,QAAQ,0DAA0D"}
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../Command.cjs`);var t=class extends e.Command{signature=`queue:retry <id>`;description=`Retry a failed queue job (use "all" to retry all)`;constructor(e){super(),this.app=e}async handle(e,t){let n=e[0];if(!n){this.error(`Please specify a job ID or "all" to retry all failed jobs.`);return}let r=this.getFailedJobProvider();if(!r){this.error(`No failed job provider configured.`);return}let i=this.app.make(`queue`);if(n===`all`){await this.retryAll(r,i);return}let a=await r.find(n);if(!a){this.error(`Failed job [${n}] not found.`);return}await i.connection(a.connection).pushRaw(a.payload,a.queue),await r.forget(a.id),this.info(`The failed job [${a.uuid}] has been pushed back onto the queue.`)}async retryAll(e,t){let n=await e.all();if(n.length===0){this.info(`No failed jobs to retry.`);return}let r=0;for(let i of n)try{await t.connection(i.connection).pushRaw(i.payload,i.queue),await e.forget(i.id),r++}catch(e){this.error(`Failed to retry job [${i.uuid}]: ${e.message}`)}this.info(`Retried ${r} failed job(s).`)}getFailedJobProvider(){try{return this.app.make(`queue.failer`)}catch{return null}}};exports.QueueRetryCommand=t;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../Command.cjs`);var t=class extends e.Command{app;signature=`queue:retry <id>`;description=`Retry a failed queue job (use "all" to retry all)`;constructor(e){super(),this.app=e}async handle(e,t){let n=e[0];if(!n){this.error(`Please specify a job ID or "all" to retry all failed jobs.`);return}let r=this.getFailedJobProvider();if(!r){this.error(`No failed job provider configured.`);return}let i=this.app.make(`queue`);if(n===`all`){await this.retryAll(r,i);return}let a=await r.find(n);if(!a){this.error(`Failed job [${n}] not found.`);return}await i.connection(a.connection).pushRaw(a.payload,a.queue),await r.forget(a.id),this.info(`The failed job [${a.uuid}] has been pushed back onto the queue.`)}async retryAll(e,t){let n=await e.all();if(n.length===0){this.info(`No failed jobs to retry.`);return}let r=0;for(let i of n)try{await t.connection(i.connection).pushRaw(i.payload,i.queue),await e.forget(i.id),r++}catch(e){this.error(`Failed to retry job [${i.uuid}]: ${e.message}`)}this.info(`Retried ${r} failed job(s).`)}getFailedJobProvider(){try{return this.app.make(`queue.failer`)}catch{return null}}};exports.QueueRetryCommand=t;
@@ -1,2 +1,2 @@
1
- import{Command as e}from"../Command.mjs";var t=class extends e{signature=`queue:retry <id>`;description=`Retry a failed queue job (use "all" to retry all)`;constructor(e){super(),this.app=e}async handle(e,t){let n=e[0];if(!n){this.error(`Please specify a job ID or "all" to retry all failed jobs.`);return}let r=this.getFailedJobProvider();if(!r){this.error(`No failed job provider configured.`);return}let i=this.app.make(`queue`);if(n===`all`){await this.retryAll(r,i);return}let a=await r.find(n);if(!a){this.error(`Failed job [${n}] not found.`);return}await i.connection(a.connection).pushRaw(a.payload,a.queue),await r.forget(a.id),this.info(`The failed job [${a.uuid}] has been pushed back onto the queue.`)}async retryAll(e,t){let n=await e.all();if(n.length===0){this.info(`No failed jobs to retry.`);return}let r=0;for(let i of n)try{await t.connection(i.connection).pushRaw(i.payload,i.queue),await e.forget(i.id),r++}catch(e){this.error(`Failed to retry job [${i.uuid}]: ${e.message}`)}this.info(`Retried ${r} failed job(s).`)}getFailedJobProvider(){try{return this.app.make(`queue.failer`)}catch{return null}}};export{t as QueueRetryCommand};
1
+ import{Command as e}from"../Command.mjs";var t=class extends e{app;signature=`queue:retry <id>`;description=`Retry a failed queue job (use "all" to retry all)`;constructor(e){super(),this.app=e}async handle(e,t){let n=e[0];if(!n){this.error(`Please specify a job ID or "all" to retry all failed jobs.`);return}let r=this.getFailedJobProvider();if(!r){this.error(`No failed job provider configured.`);return}let i=this.app.make(`queue`);if(n===`all`){await this.retryAll(r,i);return}let a=await r.find(n);if(!a){this.error(`Failed job [${n}] not found.`);return}await i.connection(a.connection).pushRaw(a.payload,a.queue),await r.forget(a.id),this.info(`The failed job [${a.uuid}] has been pushed back onto the queue.`)}async retryAll(e,t){let n=await e.all();if(n.length===0){this.info(`No failed jobs to retry.`);return}let r=0;for(let i of n)try{await t.connection(i.connection).pushRaw(i.payload,i.queue),await e.forget(i.id),r++}catch(e){this.error(`Failed to retry job [${i.uuid}]: ${e.message}`)}this.info(`Retried ${r} failed job(s).`)}getFailedJobProvider(){try{return this.app.make(`queue.failer`)}catch{return null}}};export{t as QueueRetryCommand};
2
2
  //# sourceMappingURL=QueueRetryCommand.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueueRetryCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueueRetryCommand.ts"],"sourcesContent":["/**\n * QueueRetryCommand\n *\n * Retry a failed queue job.\n * Mirrors Laravel's `php artisan queue:retry`.\n */\n\nimport type { FailedJobProvider } from '@/Queue/Failed/FailedJobProvider';\nimport type { QueueManager } from '@/Queue/QueueManager';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueueRetryCommand extends Command {\n signature = 'queue:retry <id>';\n description = 'Retry a failed queue job (use \"all\" to retry all)';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], _options: CommandOptions): Promise<void> {\n const id = args[0];\n\n if (!id) {\n this.error('Please specify a job ID or \"all\" to retry all failed jobs.');\n return;\n }\n\n const failer = this.getFailedJobProvider();\n\n if (!failer) {\n this.error('No failed job provider configured.');\n return;\n }\n\n const manager = this.app.make<QueueManager>('queue');\n\n if (id === 'all') {\n await this.retryAll(failer, manager);\n return;\n }\n\n const failedJob = await failer.find(id);\n\n if (!failedJob) {\n this.error(`Failed job [${id}] not found.`);\n return;\n }\n\n // Push the job back onto the queue\n const driver = manager.connection(failedJob.connection);\n await driver.pushRaw(failedJob.payload, failedJob.queue);\n\n // Remove from failed jobs\n await failer.forget(failedJob.id);\n\n this.info(`The failed job [${failedJob.uuid}] has been pushed back onto the queue.`);\n }\n\n protected async retryAll(failer: FailedJobProvider, manager: QueueManager): Promise<void> {\n const failedJobs = await failer.all();\n\n if (failedJobs.length === 0) {\n this.info('No failed jobs to retry.');\n return;\n }\n\n let retried = 0;\n\n for (const failedJob of failedJobs) {\n try {\n const driver = manager.connection(failedJob.connection);\n await driver.pushRaw(failedJob.payload, failedJob.queue);\n await failer.forget(failedJob.id);\n retried++;\n } catch (error) {\n this.error(`Failed to retry job [${failedJob.uuid}]: ${(error as Error).message}`);\n }\n }\n\n this.info(`Retried ${retried} failed job(s).`);\n }\n\n protected getFailedJobProvider(): FailedJobProvider | null {\n try {\n return this.app.make<FailedJobProvider>('queue.failer');\n } catch {\n return null;\n }\n }\n}\n"],"mappings":"yCAYA,IAAa,EAAb,cAAuC,CAAQ,CAC7C,UAAY,mBACZ,YAAc,oDAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAyC,CACpE,IAAM,EAAK,EAAK,GAEhB,GAAI,CAAC,EAAI,CACP,KAAK,MAAM,6DAA6D,CACxE,OAGF,IAAM,EAAS,KAAK,sBAAsB,CAE1C,GAAI,CAAC,EAAQ,CACX,KAAK,MAAM,qCAAqC,CAChD,OAGF,IAAM,EAAU,KAAK,IAAI,KAAmB,QAAQ,CAEpD,GAAI,IAAO,MAAO,CAChB,MAAM,KAAK,SAAS,EAAQ,EAAQ,CACpC,OAGF,IAAM,EAAY,MAAM,EAAO,KAAK,EAAG,CAEvC,GAAI,CAAC,EAAW,CACd,KAAK,MAAM,eAAe,EAAG,cAAc,CAC3C,OAKF,MADe,EAAQ,WAAW,EAAU,WAAW,CAC1C,QAAQ,EAAU,QAAS,EAAU,MAAM,CAGxD,MAAM,EAAO,OAAO,EAAU,GAAG,CAEjC,KAAK,KAAK,mBAAmB,EAAU,KAAK,wCAAwC,CAGtF,MAAgB,SAAS,EAA2B,EAAsC,CACxF,IAAM,EAAa,MAAM,EAAO,KAAK,CAErC,GAAI,EAAW,SAAW,EAAG,CAC3B,KAAK,KAAK,2BAA2B,CACrC,OAGF,IAAI,EAAU,EAEd,IAAK,IAAM,KAAa,EACtB,GAAI,CAEF,MADe,EAAQ,WAAW,EAAU,WAAW,CAC1C,QAAQ,EAAU,QAAS,EAAU,MAAM,CACxD,MAAM,EAAO,OAAO,EAAU,GAAG,CACjC,UACO,EAAO,CACd,KAAK,MAAM,wBAAwB,EAAU,KAAK,KAAM,EAAgB,UAAU,CAItF,KAAK,KAAK,WAAW,EAAQ,iBAAiB,CAGhD,sBAA2D,CACzD,GAAI,CACF,OAAO,KAAK,IAAI,KAAwB,eAAe,MACjD,CACN,OAAO"}
1
+ {"version":3,"file":"QueueRetryCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueueRetryCommand.ts"],"sourcesContent":["/**\n * QueueRetryCommand\n *\n * Retry a failed queue job.\n * Mirrors Laravel's `php artisan queue:retry`.\n */\n\nimport type { FailedJobProvider } from '@/Queue/Failed/FailedJobProvider';\nimport type { QueueManager } from '@/Queue/QueueManager';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueueRetryCommand extends Command {\n signature = 'queue:retry <id>';\n description = 'Retry a failed queue job (use \"all\" to retry all)';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], _options: CommandOptions): Promise<void> {\n const id = args[0];\n\n if (!id) {\n this.error('Please specify a job ID or \"all\" to retry all failed jobs.');\n return;\n }\n\n const failer = this.getFailedJobProvider();\n\n if (!failer) {\n this.error('No failed job provider configured.');\n return;\n }\n\n const manager = this.app.make<QueueManager>('queue');\n\n if (id === 'all') {\n await this.retryAll(failer, manager);\n return;\n }\n\n const failedJob = await failer.find(id);\n\n if (!failedJob) {\n this.error(`Failed job [${id}] not found.`);\n return;\n }\n\n // Push the job back onto the queue\n const driver = manager.connection(failedJob.connection);\n await driver.pushRaw(failedJob.payload, failedJob.queue);\n\n // Remove from failed jobs\n await failer.forget(failedJob.id);\n\n this.info(`The failed job [${failedJob.uuid}] has been pushed back onto the queue.`);\n }\n\n protected async retryAll(failer: FailedJobProvider, manager: QueueManager): Promise<void> {\n const failedJobs = await failer.all();\n\n if (failedJobs.length === 0) {\n this.info('No failed jobs to retry.');\n return;\n }\n\n let retried = 0;\n\n for (const failedJob of failedJobs) {\n try {\n const driver = manager.connection(failedJob.connection);\n await driver.pushRaw(failedJob.payload, failedJob.queue);\n await failer.forget(failedJob.id);\n retried++;\n } catch (error) {\n this.error(`Failed to retry job [${failedJob.uuid}]: ${(error as Error).message}`);\n }\n }\n\n this.info(`Retried ${retried} failed job(s).`);\n }\n\n protected getFailedJobProvider(): FailedJobProvider | null {\n try {\n return this.app.make<FailedJobProvider>('queue.failer');\n } catch {\n return null;\n }\n }\n}\n"],"mappings":"yCAYA,IAAa,EAAb,cAAuC,CAAQ,CAIvB,IAHtB,UAAY,mBACZ,YAAc,oDAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAyC,CACpE,IAAM,EAAK,EAAK,GAEhB,GAAI,CAAC,EAAI,CACP,KAAK,MAAM,6DAA6D,CACxE,OAGF,IAAM,EAAS,KAAK,sBAAsB,CAE1C,GAAI,CAAC,EAAQ,CACX,KAAK,MAAM,qCAAqC,CAChD,OAGF,IAAM,EAAU,KAAK,IAAI,KAAmB,QAAQ,CAEpD,GAAI,IAAO,MAAO,CAChB,MAAM,KAAK,SAAS,EAAQ,EAAQ,CACpC,OAGF,IAAM,EAAY,MAAM,EAAO,KAAK,EAAG,CAEvC,GAAI,CAAC,EAAW,CACd,KAAK,MAAM,eAAe,EAAG,cAAc,CAC3C,OAKF,MADe,EAAQ,WAAW,EAAU,WAChC,CAAC,QAAQ,EAAU,QAAS,EAAU,MAAM,CAGxD,MAAM,EAAO,OAAO,EAAU,GAAG,CAEjC,KAAK,KAAK,mBAAmB,EAAU,KAAK,wCAAwC,CAGtF,MAAgB,SAAS,EAA2B,EAAsC,CACxF,IAAM,EAAa,MAAM,EAAO,KAAK,CAErC,GAAI,EAAW,SAAW,EAAG,CAC3B,KAAK,KAAK,2BAA2B,CACrC,OAGF,IAAI,EAAU,EAEd,IAAK,IAAM,KAAa,EACtB,GAAI,CAEF,MADe,EAAQ,WAAW,EAAU,WAChC,CAAC,QAAQ,EAAU,QAAS,EAAU,MAAM,CACxD,MAAM,EAAO,OAAO,EAAU,GAAG,CACjC,UACO,EAAO,CACd,KAAK,MAAM,wBAAwB,EAAU,KAAK,KAAM,EAAgB,UAAU,CAItF,KAAK,KAAK,WAAW,EAAQ,iBAAiB,CAGhD,sBAA2D,CACzD,GAAI,CACF,OAAO,KAAK,IAAI,KAAwB,eAAe,MACjD,CACN,OAAO"}
@@ -1,4 +1,4 @@
1
- const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`fs/promises`);n=e.__toESM(n);let r=require(`path`);r=e.__toESM(r);var i=class extends t.Command{signature=`queue:table`;description=`Create a migration for the queue jobs database table`;constructor(e){super(),this.app=e}async handle(e,t){let i=t.path||this.app.databasePath(`migrations`);await n.mkdir(i,{recursive:!0});let a=`${new Date().toISOString().replace(/[-:T]/g,``).slice(0,14)}_create_jobs_table.ts`,o=r.join(i,a);await n.writeFile(o,this.getStub()),this.info(`Migration created successfully: ${o}`),this.comment(`Run "npx orchestr migrate" to create the table.`)}getStub(){return`import { Migration } from '@orchestr-sh/orchestr';
1
+ const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`fs/promises`);n=e.__toESM(n,1);let r=require(`path`);r=e.__toESM(r,1);var i=class extends t.Command{app;signature=`queue:table`;description=`Create a migration for the queue jobs database table`;constructor(e){super(),this.app=e}async handle(e,t){let i=t.path||this.app.databasePath(`migrations`);await n.mkdir(i,{recursive:!0});let a=`${new Date().toISOString().replace(/[-:T]/g,``).slice(0,14)}_create_jobs_table.ts`,o=r.join(i,a);await n.writeFile(o,this.getStub()),this.info(`Migration created successfully: ${o}`),this.comment(`Run "npx orchestr migrate" to create the table.`)}getStub(){return`import { Migration } from '@orchestr-sh/orchestr';
2
2
  import type { SchemaBuilder } from '@orchestr-sh/orchestr';
3
3
 
4
4
  export default class CreateJobsTable extends Migration {
@@ -1,4 +1,4 @@
1
- import{Command as e}from"../Command.mjs";import*as t from"fs/promises";import*as n from"path";var r=class extends e{signature=`queue:table`;description=`Create a migration for the queue jobs database table`;constructor(e){super(),this.app=e}async handle(e,r){let i=r.path||this.app.databasePath(`migrations`);await t.mkdir(i,{recursive:!0});let a=`${new Date().toISOString().replace(/[-:T]/g,``).slice(0,14)}_create_jobs_table.ts`,o=n.join(i,a);await t.writeFile(o,this.getStub()),this.info(`Migration created successfully: ${o}`),this.comment(`Run "npx orchestr migrate" to create the table.`)}getStub(){return`import { Migration } from '@orchestr-sh/orchestr';
1
+ import{Command as e}from"../Command.mjs";import*as t from"fs/promises";import*as n from"path";var r=class extends e{app;signature=`queue:table`;description=`Create a migration for the queue jobs database table`;constructor(e){super(),this.app=e}async handle(e,r){let i=r.path||this.app.databasePath(`migrations`);await t.mkdir(i,{recursive:!0});let a=`${new Date().toISOString().replace(/[-:T]/g,``).slice(0,14)}_create_jobs_table.ts`,o=n.join(i,a);await t.writeFile(o,this.getStub()),this.info(`Migration created successfully: ${o}`),this.comment(`Run "npx orchestr migrate" to create the table.`)}getStub(){return`import { Migration } from '@orchestr-sh/orchestr';
2
2
  import type { SchemaBuilder } from '@orchestr-sh/orchestr';
3
3
 
4
4
  export default class CreateJobsTable extends Migration {
@@ -1 +1 @@
1
- {"version":3,"file":"QueueTableCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueueTableCommand.ts"],"sourcesContent":["/**\n * QueueTableCommand\n *\n * Create a migration for the queue jobs database table.\n * Mirrors Laravel's `php artisan queue:table`.\n */\n\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueueTableCommand extends Command {\n signature = 'queue:table';\n description = 'Create a migration for the queue jobs database table';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(_args: string[], options: CommandOptions): Promise<void> {\n const migrationsPath = (options.path as string) || this.app.databasePath('migrations');\n await fs.mkdir(migrationsPath, { recursive: true });\n\n const timestamp = new Date().toISOString().replace(/[-:T]/g, '').slice(0, 14);\n const fileName = `${timestamp}_create_jobs_table.ts`;\n const filePath = path.join(migrationsPath, fileName);\n\n await fs.writeFile(filePath, this.getStub());\n\n this.info(`Migration created successfully: ${filePath}`);\n this.comment('Run \"npx orchestr migrate\" to create the table.');\n }\n\n protected getStub(): string {\n return `import { Migration } from '@orchestr-sh/orchestr';\nimport type { SchemaBuilder } from '@orchestr-sh/orchestr';\n\nexport default class CreateJobsTable extends Migration {\n async up(schema: SchemaBuilder): Promise<void> {\n await schema.create('jobs', (table) => {\n table.bigIncrements('id');\n table.string('queue').index();\n table.text('payload');\n table.integer('attempts').defaultTo(0);\n table.integer('reserved_at').nullable();\n table.integer('available_at');\n table.integer('created_at');\n });\n }\n\n async down(schema: SchemaBuilder): Promise<void> {\n await schema.drop('jobs');\n }\n}\n`;\n }\n}\n"],"mappings":"8FAYA,IAAa,EAAb,cAAuC,CAAQ,CAC7C,UAAY,cACZ,YAAc,uDAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAiB,EAAwC,CACpE,IAAM,EAAkB,EAAQ,MAAmB,KAAK,IAAI,aAAa,aAAa,CACtF,MAAM,EAAG,MAAM,EAAgB,CAAE,UAAW,GAAM,CAAC,CAGnD,IAAM,EAAW,GADC,IAAI,MAAM,CAAC,aAAa,CAAC,QAAQ,SAAU,GAAG,CAAC,MAAM,EAAG,GAAG,CAC/C,uBACxB,EAAW,EAAK,KAAK,EAAgB,EAAS,CAEpD,MAAM,EAAG,UAAU,EAAU,KAAK,SAAS,CAAC,CAE5C,KAAK,KAAK,mCAAmC,IAAW,CACxD,KAAK,QAAQ,kDAAkD,CAGjE,SAA4B,CAC1B,MAAO"}
1
+ {"version":3,"file":"QueueTableCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueueTableCommand.ts"],"sourcesContent":["/**\n * QueueTableCommand\n *\n * Create a migration for the queue jobs database table.\n * Mirrors Laravel's `php artisan queue:table`.\n */\n\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueueTableCommand extends Command {\n signature = 'queue:table';\n description = 'Create a migration for the queue jobs database table';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(_args: string[], options: CommandOptions): Promise<void> {\n const migrationsPath = (options.path as string) || this.app.databasePath('migrations');\n await fs.mkdir(migrationsPath, { recursive: true });\n\n const timestamp = new Date().toISOString().replace(/[-:T]/g, '').slice(0, 14);\n const fileName = `${timestamp}_create_jobs_table.ts`;\n const filePath = path.join(migrationsPath, fileName);\n\n await fs.writeFile(filePath, this.getStub());\n\n this.info(`Migration created successfully: ${filePath}`);\n this.comment('Run \"npx orchestr migrate\" to create the table.');\n }\n\n protected getStub(): string {\n return `import { Migration } from '@orchestr-sh/orchestr';\nimport type { SchemaBuilder } from '@orchestr-sh/orchestr';\n\nexport default class CreateJobsTable extends Migration {\n async up(schema: SchemaBuilder): Promise<void> {\n await schema.create('jobs', (table) => {\n table.bigIncrements('id');\n table.string('queue').index();\n table.text('payload');\n table.integer('attempts').defaultTo(0);\n table.integer('reserved_at').nullable();\n table.integer('available_at');\n table.integer('created_at');\n });\n }\n\n async down(schema: SchemaBuilder): Promise<void> {\n await schema.drop('jobs');\n }\n}\n`;\n }\n}\n"],"mappings":"8FAYA,IAAa,EAAb,cAAuC,CAAQ,CAIvB,IAHtB,UAAY,cACZ,YAAc,uDAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAiB,EAAwC,CACpE,IAAM,EAAkB,EAAQ,MAAmB,KAAK,IAAI,aAAa,aAAa,CACtF,MAAM,EAAG,MAAM,EAAgB,CAAE,UAAW,GAAM,CAAC,CAGnD,IAAM,EAAW,GADC,IAAI,MAAM,CAAC,aAAa,CAAC,QAAQ,SAAU,GAAG,CAAC,MAAM,EAAG,GAC7C,CAAC,uBACxB,EAAW,EAAK,KAAK,EAAgB,EAAS,CAEpD,MAAM,EAAG,UAAU,EAAU,KAAK,SAAS,CAAC,CAE5C,KAAK,KAAK,mCAAmC,IAAW,CACxD,KAAK,QAAQ,kDAAkD,CAGjE,SAA4B,CAC1B,MAAO"}
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../Command.cjs`);var t=class extends e.Command{signature=`queue:work [connection]`;description=`Start processing jobs on the queue as a daemon`;constructor(e){super(),this.app=e}async handle(e,t){let n=this.app.make(`queue`),r=this.app.make(`queue.worker`),i=e[0]||n.getDefaultConnection(),a=t.queue||`default`,o=t.once===!0||t.once===`true`;this.info(`[${new Date().toISOString()}] Processing jobs from the [${a}] queue(s) on [${i}] connection.`);let s={name:t.name||`default`,sleep:Number(t.sleep)||3,tries:Number(t.tries)||1,timeout:Number(t.timeout)||60,memory:Number(t.memory)||128,maxJobs:Number(t[`max-jobs`])||0,maxTime:Number(t[`max-time`])||0,force:t.force===!0||t.force===`true`,stopWhenEmpty:t[`stop-when-empty`]===!0||t[`stop-when-empty`]===`true`,backoff:Number(t.backoff)||0,rest:Number(t.rest)||0};if(o){await r.runOnce(i,a,s)||this.comment(`No jobs available.`);return}await r.daemon(i,a,s),this.info(`Worker stopped.`)}};exports.QueueWorkCommand=t;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../Command.cjs`);var t=class extends e.Command{app;signature=`queue:work [connection]`;description=`Start processing jobs on the queue as a daemon`;constructor(e){super(),this.app=e}async handle(e,t){let n=this.app.make(`queue`),r=this.app.make(`queue.worker`),i=e[0]||n.getDefaultConnection(),a=t.queue||`default`,o=t.once===!0||t.once===`true`;this.info(`[${new Date().toISOString()}] Processing jobs from the [${a}] queue(s) on [${i}] connection.`);let s={name:t.name||`default`,sleep:Number(t.sleep)||3,tries:Number(t.tries)||1,timeout:Number(t.timeout)||60,memory:Number(t.memory)||128,maxJobs:Number(t[`max-jobs`])||0,maxTime:Number(t[`max-time`])||0,force:t.force===!0||t.force===`true`,stopWhenEmpty:t[`stop-when-empty`]===!0||t[`stop-when-empty`]===`true`,backoff:Number(t.backoff)||0,rest:Number(t.rest)||0};if(o){await r.runOnce(i,a,s)||this.comment(`No jobs available.`);return}await r.daemon(i,a,s),this.info(`Worker stopped.`)}};exports.QueueWorkCommand=t;
@@ -1,2 +1,2 @@
1
- import{Command as e}from"../Command.mjs";var t=class extends e{signature=`queue:work [connection]`;description=`Start processing jobs on the queue as a daemon`;constructor(e){super(),this.app=e}async handle(e,t){let n=this.app.make(`queue`),r=this.app.make(`queue.worker`),i=e[0]||n.getDefaultConnection(),a=t.queue||`default`,o=t.once===!0||t.once===`true`;this.info(`[${new Date().toISOString()}] Processing jobs from the [${a}] queue(s) on [${i}] connection.`);let s={name:t.name||`default`,sleep:Number(t.sleep)||3,tries:Number(t.tries)||1,timeout:Number(t.timeout)||60,memory:Number(t.memory)||128,maxJobs:Number(t[`max-jobs`])||0,maxTime:Number(t[`max-time`])||0,force:t.force===!0||t.force===`true`,stopWhenEmpty:t[`stop-when-empty`]===!0||t[`stop-when-empty`]===`true`,backoff:Number(t.backoff)||0,rest:Number(t.rest)||0};if(o){await r.runOnce(i,a,s)||this.comment(`No jobs available.`);return}await r.daemon(i,a,s),this.info(`Worker stopped.`)}};export{t as QueueWorkCommand};
1
+ import{Command as e}from"../Command.mjs";var t=class extends e{app;signature=`queue:work [connection]`;description=`Start processing jobs on the queue as a daemon`;constructor(e){super(),this.app=e}async handle(e,t){let n=this.app.make(`queue`),r=this.app.make(`queue.worker`),i=e[0]||n.getDefaultConnection(),a=t.queue||`default`,o=t.once===!0||t.once===`true`;this.info(`[${new Date().toISOString()}] Processing jobs from the [${a}] queue(s) on [${i}] connection.`);let s={name:t.name||`default`,sleep:Number(t.sleep)||3,tries:Number(t.tries)||1,timeout:Number(t.timeout)||60,memory:Number(t.memory)||128,maxJobs:Number(t[`max-jobs`])||0,maxTime:Number(t[`max-time`])||0,force:t.force===!0||t.force===`true`,stopWhenEmpty:t[`stop-when-empty`]===!0||t[`stop-when-empty`]===`true`,backoff:Number(t.backoff)||0,rest:Number(t.rest)||0};if(o){await r.runOnce(i,a,s)||this.comment(`No jobs available.`);return}await r.daemon(i,a,s),this.info(`Worker stopped.`)}};export{t as QueueWorkCommand};
2
2
  //# sourceMappingURL=QueueWorkCommand.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueueWorkCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueueWorkCommand.ts"],"sourcesContent":["/**\n * QueueWorkCommand\n *\n * Start processing jobs on the queue as a daemon.\n * Mirrors Laravel's `php artisan queue:work`.\n */\n\nimport type { QueueManager } from '@/Queue/QueueManager';\nimport type { Worker } from '@/Queue/Workers/Worker';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueueWorkCommand extends Command {\n signature = 'queue:work [connection]';\n description = 'Start processing jobs on the queue as a daemon';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const manager = this.app.make<QueueManager>('queue');\n const worker = this.app.make<Worker>('queue.worker');\n\n const connection = args[0] || manager.getDefaultConnection();\n const queues = (options.queue as string) || 'default';\n const once = options.once === true || options.once === 'true';\n\n this.info(\n `[${new Date().toISOString()}] Processing jobs from the [${queues}] queue(s) on [${connection}] connection.`\n );\n\n const workerOptions = {\n name: (options.name as string) || 'default',\n sleep: Number(options.sleep) || 3,\n tries: Number(options.tries) || 1,\n timeout: Number(options.timeout) || 60,\n memory: Number(options.memory) || 128,\n maxJobs: Number(options['max-jobs']) || 0,\n maxTime: Number(options['max-time']) || 0,\n force: options.force === true || options.force === 'true',\n stopWhenEmpty: options['stop-when-empty'] === true || options['stop-when-empty'] === 'true',\n backoff: Number(options.backoff) || 0,\n rest: Number(options.rest) || 0,\n };\n\n if (once) {\n const processed = await worker.runOnce(connection, queues, workerOptions);\n if (!processed) {\n this.comment('No jobs available.');\n }\n return;\n }\n\n await worker.daemon(connection, queues, workerOptions);\n this.info('Worker stopped.');\n }\n}\n"],"mappings":"yCAYA,IAAa,EAAb,cAAsC,CAAQ,CAC5C,UAAY,0BACZ,YAAc,iDAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAU,KAAK,IAAI,KAAmB,QAAQ,CAC9C,EAAS,KAAK,IAAI,KAAa,eAAe,CAE9C,EAAa,EAAK,IAAM,EAAQ,sBAAsB,CACtD,EAAU,EAAQ,OAAoB,UACtC,EAAO,EAAQ,OAAS,IAAQ,EAAQ,OAAS,OAEvD,KAAK,KACH,IAAI,IAAI,MAAM,CAAC,aAAa,CAAC,8BAA8B,EAAO,iBAAiB,EAAW,eAC/F,CAED,IAAM,EAAgB,CACpB,KAAO,EAAQ,MAAmB,UAClC,MAAO,OAAO,EAAQ,MAAM,EAAI,EAChC,MAAO,OAAO,EAAQ,MAAM,EAAI,EAChC,QAAS,OAAO,EAAQ,QAAQ,EAAI,GACpC,OAAQ,OAAO,EAAQ,OAAO,EAAI,IAClC,QAAS,OAAO,EAAQ,YAAY,EAAI,EACxC,QAAS,OAAO,EAAQ,YAAY,EAAI,EACxC,MAAO,EAAQ,QAAU,IAAQ,EAAQ,QAAU,OACnD,cAAe,EAAQ,qBAAuB,IAAQ,EAAQ,qBAAuB,OACrF,QAAS,OAAO,EAAQ,QAAQ,EAAI,EACpC,KAAM,OAAO,EAAQ,KAAK,EAAI,EAC/B,CAED,GAAI,EAAM,CACU,MAAM,EAAO,QAAQ,EAAY,EAAQ,EAAc,EAEvE,KAAK,QAAQ,qBAAqB,CAEpC,OAGF,MAAM,EAAO,OAAO,EAAY,EAAQ,EAAc,CACtD,KAAK,KAAK,kBAAkB"}
1
+ {"version":3,"file":"QueueWorkCommand.mjs","names":[],"sources":["../../../src/Console/Commands/QueueWorkCommand.ts"],"sourcesContent":["/**\n * QueueWorkCommand\n *\n * Start processing jobs on the queue as a daemon.\n * Mirrors Laravel's `php artisan queue:work`.\n */\n\nimport type { QueueManager } from '@/Queue/QueueManager';\nimport type { Worker } from '@/Queue/Workers/Worker';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class QueueWorkCommand extends Command {\n signature = 'queue:work [connection]';\n description = 'Start processing jobs on the queue as a daemon';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const manager = this.app.make<QueueManager>('queue');\n const worker = this.app.make<Worker>('queue.worker');\n\n const connection = args[0] || manager.getDefaultConnection();\n const queues = (options.queue as string) || 'default';\n const once = options.once === true || options.once === 'true';\n\n this.info(\n `[${new Date().toISOString()}] Processing jobs from the [${queues}] queue(s) on [${connection}] connection.`\n );\n\n const workerOptions = {\n name: (options.name as string) || 'default',\n sleep: Number(options.sleep) || 3,\n tries: Number(options.tries) || 1,\n timeout: Number(options.timeout) || 60,\n memory: Number(options.memory) || 128,\n maxJobs: Number(options['max-jobs']) || 0,\n maxTime: Number(options['max-time']) || 0,\n force: options.force === true || options.force === 'true',\n stopWhenEmpty: options['stop-when-empty'] === true || options['stop-when-empty'] === 'true',\n backoff: Number(options.backoff) || 0,\n rest: Number(options.rest) || 0,\n };\n\n if (once) {\n const processed = await worker.runOnce(connection, queues, workerOptions);\n if (!processed) {\n this.comment('No jobs available.');\n }\n return;\n }\n\n await worker.daemon(connection, queues, workerOptions);\n this.info('Worker stopped.');\n }\n}\n"],"mappings":"yCAYA,IAAa,EAAb,cAAsC,CAAQ,CAItB,IAHtB,UAAY,0BACZ,YAAc,iDAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAU,KAAK,IAAI,KAAmB,QAAQ,CAC9C,EAAS,KAAK,IAAI,KAAa,eAAe,CAE9C,EAAa,EAAK,IAAM,EAAQ,sBAAsB,CACtD,EAAU,EAAQ,OAAoB,UACtC,EAAO,EAAQ,OAAS,IAAQ,EAAQ,OAAS,OAEvD,KAAK,KACH,IAAI,IAAI,MAAM,CAAC,aAAa,CAAC,8BAA8B,EAAO,iBAAiB,EAAW,eAC/F,CAED,IAAM,EAAgB,CACpB,KAAO,EAAQ,MAAmB,UAClC,MAAO,OAAO,EAAQ,MAAM,EAAI,EAChC,MAAO,OAAO,EAAQ,MAAM,EAAI,EAChC,QAAS,OAAO,EAAQ,QAAQ,EAAI,GACpC,OAAQ,OAAO,EAAQ,OAAO,EAAI,IAClC,QAAS,OAAO,EAAQ,YAAY,EAAI,EACxC,QAAS,OAAO,EAAQ,YAAY,EAAI,EACxC,MAAO,EAAQ,QAAU,IAAQ,EAAQ,QAAU,OACnD,cAAe,EAAQ,qBAAuB,IAAQ,EAAQ,qBAAuB,OACrF,QAAS,OAAO,EAAQ,QAAQ,EAAI,EACpC,KAAM,OAAO,EAAQ,KAAK,EAAI,EAC/B,CAED,GAAI,EAAM,CAEH,MADmB,EAAO,QAAQ,EAAY,EAAQ,EAAc,EAEvE,KAAK,QAAQ,qBAAqB,CAEpC,OAGF,MAAM,EAAO,OAAO,EAAY,EAAQ,EAAc,CACtD,KAAK,KAAK,kBAAkB"}
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../Database/Seeders/SeederRunner.cjs`),t=require(`../Command.cjs`);var n=class extends t.Command{signature=`db:seed`;description=`Seed the database with records`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||`./database/seeders`,a=new e.SeederRunner(r,Array.isArray(i)?i:[i]);this.info(`Seeding database...`),this.newLine();try{let e=n.class;e?await a.runByName(e):await a.run(),this.info(`Database seeding completed successfully.`)}catch(e){throw this.error(`Seeding failed: ${e.message}`),e}}};exports.SeedCommand=n;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../Database/Seeders/SeederRunner.cjs`),t=require(`../Command.cjs`);var n=class extends t.Command{app;signature=`db:seed`;description=`Seed the database with records`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||`./database/seeders`,a=new e.SeederRunner(r,Array.isArray(i)?i:[i]);this.info(`Seeding database...`),this.newLine();try{let e=n.class;e?await a.runByName(e):await a.run(),this.info(`Database seeding completed successfully.`)}catch(e){throw this.error(`Seeding failed: ${e.message}`),e}}};exports.SeedCommand=n;
@@ -1,2 +1,2 @@
1
- import{SeederRunner as e}from"../../Database/Seeders/SeederRunner.mjs";import{Command as t}from"../Command.mjs";var n=class extends t{signature=`db:seed`;description=`Seed the database with records`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||`./database/seeders`,a=new e(r,Array.isArray(i)?i:[i]);this.info(`Seeding database...`),this.newLine();try{let e=n.class;e?await a.runByName(e):await a.run(),this.info(`Database seeding completed successfully.`)}catch(e){throw this.error(`Seeding failed: ${e.message}`),e}}};export{n as SeedCommand};
1
+ import{SeederRunner as e}from"../../Database/Seeders/SeederRunner.mjs";import{Command as t}from"../Command.mjs";var n=class extends t{app;signature=`db:seed`;description=`Seed the database with records`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||`./database/seeders`,a=new e(r,Array.isArray(i)?i:[i]);this.info(`Seeding database...`),this.newLine();try{let e=n.class;e?await a.runByName(e):await a.run(),this.info(`Database seeding completed successfully.`)}catch(e){throw this.error(`Seeding failed: ${e.message}`),e}}};export{n as SeedCommand};
2
2
  //# sourceMappingURL=SeedCommand.mjs.map