@orchestr-sh/orchestr 1.11.1 → 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 (303) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/Cache/CacheManager.cjs +1 -1
  3. package/dist/Cache/CacheManager.mjs +1 -1
  4. package/dist/Cache/CacheManager.mjs.map +1 -1
  5. package/dist/Cache/Events/CacheFlushed.cjs +1 -1
  6. package/dist/Cache/Events/CacheFlushed.mjs +1 -1
  7. package/dist/Cache/Events/CacheFlushed.mjs.map +1 -1
  8. package/dist/Cache/Events/CacheHit.cjs +1 -1
  9. package/dist/Cache/Events/CacheHit.mjs +1 -1
  10. package/dist/Cache/Events/CacheHit.mjs.map +1 -1
  11. package/dist/Cache/Events/CacheMissed.cjs +1 -1
  12. package/dist/Cache/Events/CacheMissed.mjs +1 -1
  13. package/dist/Cache/Events/CacheMissed.mjs.map +1 -1
  14. package/dist/Cache/Events/KeyForgotten.cjs +1 -1
  15. package/dist/Cache/Events/KeyForgotten.mjs +1 -1
  16. package/dist/Cache/Events/KeyForgotten.mjs.map +1 -1
  17. package/dist/Cache/Events/KeyWritten.cjs +1 -1
  18. package/dist/Cache/Events/KeyWritten.mjs +1 -1
  19. package/dist/Cache/Events/KeyWritten.mjs.map +1 -1
  20. package/dist/Cache/Locks/CacheLock.cjs +1 -1
  21. package/dist/Cache/Locks/CacheLock.mjs +1 -1
  22. package/dist/Cache/Locks/CacheLock.mjs.map +1 -1
  23. package/dist/Cache/Locks/Lock.cjs +1 -1
  24. package/dist/Cache/Locks/Lock.mjs +1 -1
  25. package/dist/Cache/Locks/Lock.mjs.map +1 -1
  26. package/dist/Cache/Repository.cjs +1 -1
  27. package/dist/Cache/Repository.mjs +1 -1
  28. package/dist/Cache/Repository.mjs.map +1 -1
  29. package/dist/Cache/Stores/ArrayStore.cjs +1 -1
  30. package/dist/Cache/Stores/ArrayStore.mjs +1 -1
  31. package/dist/Cache/Stores/ArrayStore.mjs.map +1 -1
  32. package/dist/Cache/Stores/DatabaseStore.cjs +1 -1
  33. package/dist/Cache/Stores/DatabaseStore.mjs +1 -1
  34. package/dist/Cache/Stores/DatabaseStore.mjs.map +1 -1
  35. package/dist/Cache/Stores/FileStore.cjs +1 -1
  36. package/dist/Cache/Stores/FileStore.mjs +1 -1
  37. package/dist/Cache/Stores/FileStore.mjs.map +1 -1
  38. package/dist/Cache/Tags/TagSet.cjs +1 -1
  39. package/dist/Cache/Tags/TagSet.mjs +1 -1
  40. package/dist/Cache/Tags/TagSet.mjs.map +1 -1
  41. package/dist/Cache/Tags/TaggedCache.cjs +1 -1
  42. package/dist/Cache/Tags/TaggedCache.mjs +1 -1
  43. package/dist/Cache/Tags/TaggedCache.mjs.map +1 -1
  44. package/dist/Console/Commands/CacheClearCommand.cjs +1 -1
  45. package/dist/Console/Commands/CacheClearCommand.mjs +1 -1
  46. package/dist/Console/Commands/CacheClearCommand.mjs.map +1 -1
  47. package/dist/Console/Commands/CacheForgetCommand.cjs +1 -1
  48. package/dist/Console/Commands/CacheForgetCommand.mjs +1 -1
  49. package/dist/Console/Commands/CacheForgetCommand.mjs.map +1 -1
  50. package/dist/Console/Commands/CacheTableCommand.cjs +1 -1
  51. package/dist/Console/Commands/CacheTableCommand.mjs +1 -1
  52. package/dist/Console/Commands/CacheTableCommand.mjs.map +1 -1
  53. package/dist/Console/Commands/DeployCommand.mjs.map +1 -1
  54. package/dist/Console/Commands/DeployEnvCommand.mjs.map +1 -1
  55. package/dist/Console/Commands/DeployInitCommand.mjs.map +1 -1
  56. package/dist/Console/Commands/DeployProvisionCommand.mjs.map +1 -1
  57. package/dist/Console/Commands/DeployRollbackCommand.mjs.map +1 -1
  58. package/dist/Console/Commands/DeployServerCommand.mjs.map +1 -1
  59. package/dist/Console/Commands/DeployStatusCommand.mjs.map +1 -1
  60. package/dist/Console/Commands/EventCacheCommand.cjs +1 -1
  61. package/dist/Console/Commands/EventCacheCommand.mjs +1 -1
  62. package/dist/Console/Commands/EventCacheCommand.mjs.map +1 -1
  63. package/dist/Console/Commands/EventClearCommand.cjs +1 -1
  64. package/dist/Console/Commands/EventClearCommand.mjs +1 -1
  65. package/dist/Console/Commands/EventClearCommand.mjs.map +1 -1
  66. package/dist/Console/Commands/EventListCommand.cjs +1 -1
  67. package/dist/Console/Commands/EventListCommand.mjs +1 -1
  68. package/dist/Console/Commands/EventListCommand.mjs.map +1 -1
  69. package/dist/Console/Commands/MakeControllerCommand.cjs +1 -1
  70. package/dist/Console/Commands/MakeControllerCommand.mjs +1 -1
  71. package/dist/Console/Commands/MakeControllerCommand.mjs.map +1 -1
  72. package/dist/Console/Commands/MakeEventCommand.cjs +1 -1
  73. package/dist/Console/Commands/MakeEventCommand.mjs +1 -1
  74. package/dist/Console/Commands/MakeEventCommand.mjs.map +1 -1
  75. package/dist/Console/Commands/MakeJobCommand.cjs +1 -1
  76. package/dist/Console/Commands/MakeJobCommand.mjs +1 -1
  77. package/dist/Console/Commands/MakeJobCommand.mjs.map +1 -1
  78. package/dist/Console/Commands/MakeListenerCommand.cjs +1 -1
  79. package/dist/Console/Commands/MakeListenerCommand.mjs +1 -1
  80. package/dist/Console/Commands/MakeListenerCommand.mjs.map +1 -1
  81. package/dist/Console/Commands/MakeMigrationCommand.cjs +1 -1
  82. package/dist/Console/Commands/MakeMigrationCommand.mjs +1 -1
  83. package/dist/Console/Commands/MakeMigrationCommand.mjs.map +1 -1
  84. package/dist/Console/Commands/MakeSeederCommand.cjs +1 -1
  85. package/dist/Console/Commands/MakeSeederCommand.mjs +1 -1
  86. package/dist/Console/Commands/MakeSeederCommand.mjs.map +1 -1
  87. package/dist/Console/Commands/MakeViewCommand.cjs +1 -1
  88. package/dist/Console/Commands/MakeViewCommand.mjs +1 -1
  89. package/dist/Console/Commands/MakeViewCommand.mjs.map +1 -1
  90. package/dist/Console/Commands/MigrateCommand.cjs +1 -1
  91. package/dist/Console/Commands/MigrateCommand.mjs +1 -1
  92. package/dist/Console/Commands/MigrateCommand.mjs.map +1 -1
  93. package/dist/Console/Commands/MigrateFreshCommand.cjs +1 -1
  94. package/dist/Console/Commands/MigrateFreshCommand.mjs +1 -1
  95. package/dist/Console/Commands/MigrateFreshCommand.mjs.map +1 -1
  96. package/dist/Console/Commands/MigrateRefreshCommand.cjs +1 -1
  97. package/dist/Console/Commands/MigrateRefreshCommand.mjs +1 -1
  98. package/dist/Console/Commands/MigrateRefreshCommand.mjs.map +1 -1
  99. package/dist/Console/Commands/MigrateResetCommand.cjs +1 -1
  100. package/dist/Console/Commands/MigrateResetCommand.mjs +1 -1
  101. package/dist/Console/Commands/MigrateResetCommand.mjs.map +1 -1
  102. package/dist/Console/Commands/MigrateRollbackCommand.cjs +1 -1
  103. package/dist/Console/Commands/MigrateRollbackCommand.mjs +1 -1
  104. package/dist/Console/Commands/MigrateRollbackCommand.mjs.map +1 -1
  105. package/dist/Console/Commands/MigrateStatusCommand.cjs +1 -1
  106. package/dist/Console/Commands/MigrateStatusCommand.mjs +1 -1
  107. package/dist/Console/Commands/MigrateStatusCommand.mjs.map +1 -1
  108. package/dist/Console/Commands/QueueBatchesTableCommand.cjs +1 -1
  109. package/dist/Console/Commands/QueueBatchesTableCommand.mjs +1 -1
  110. package/dist/Console/Commands/QueueBatchesTableCommand.mjs.map +1 -1
  111. package/dist/Console/Commands/QueueClearCommand.cjs +1 -1
  112. package/dist/Console/Commands/QueueClearCommand.mjs +1 -1
  113. package/dist/Console/Commands/QueueClearCommand.mjs.map +1 -1
  114. package/dist/Console/Commands/QueueFailedCommand.cjs +1 -1
  115. package/dist/Console/Commands/QueueFailedCommand.mjs +1 -1
  116. package/dist/Console/Commands/QueueFailedCommand.mjs.map +1 -1
  117. package/dist/Console/Commands/QueueFailedTableCommand.cjs +1 -1
  118. package/dist/Console/Commands/QueueFailedTableCommand.mjs +1 -1
  119. package/dist/Console/Commands/QueueFailedTableCommand.mjs.map +1 -1
  120. package/dist/Console/Commands/QueueFlushCommand.cjs +1 -1
  121. package/dist/Console/Commands/QueueFlushCommand.mjs +1 -1
  122. package/dist/Console/Commands/QueueFlushCommand.mjs.map +1 -1
  123. package/dist/Console/Commands/QueueForgetCommand.cjs +1 -1
  124. package/dist/Console/Commands/QueueForgetCommand.mjs +1 -1
  125. package/dist/Console/Commands/QueueForgetCommand.mjs.map +1 -1
  126. package/dist/Console/Commands/QueueMonitorCommand.cjs +1 -1
  127. package/dist/Console/Commands/QueueMonitorCommand.mjs +1 -1
  128. package/dist/Console/Commands/QueueMonitorCommand.mjs.map +1 -1
  129. package/dist/Console/Commands/QueuePruneBatchesCommand.cjs +1 -1
  130. package/dist/Console/Commands/QueuePruneBatchesCommand.mjs +1 -1
  131. package/dist/Console/Commands/QueuePruneBatchesCommand.mjs.map +1 -1
  132. package/dist/Console/Commands/QueuePruneFailedCommand.cjs +1 -1
  133. package/dist/Console/Commands/QueuePruneFailedCommand.mjs +1 -1
  134. package/dist/Console/Commands/QueuePruneFailedCommand.mjs.map +1 -1
  135. package/dist/Console/Commands/QueueRestartCommand.cjs +1 -1
  136. package/dist/Console/Commands/QueueRestartCommand.mjs +1 -1
  137. package/dist/Console/Commands/QueueRestartCommand.mjs.map +1 -1
  138. package/dist/Console/Commands/QueueRetryCommand.cjs +1 -1
  139. package/dist/Console/Commands/QueueRetryCommand.mjs +1 -1
  140. package/dist/Console/Commands/QueueRetryCommand.mjs.map +1 -1
  141. package/dist/Console/Commands/QueueTableCommand.cjs +1 -1
  142. package/dist/Console/Commands/QueueTableCommand.mjs +1 -1
  143. package/dist/Console/Commands/QueueTableCommand.mjs.map +1 -1
  144. package/dist/Console/Commands/QueueWorkCommand.cjs +1 -1
  145. package/dist/Console/Commands/QueueWorkCommand.mjs +1 -1
  146. package/dist/Console/Commands/QueueWorkCommand.mjs.map +1 -1
  147. package/dist/Console/Commands/SeedCommand.cjs +1 -1
  148. package/dist/Console/Commands/SeedCommand.mjs +1 -1
  149. package/dist/Console/Commands/SeedCommand.mjs.map +1 -1
  150. package/dist/Console/ConsoleKernel.cjs +1 -1
  151. package/dist/Console/ConsoleKernel.mjs +1 -1
  152. package/dist/Console/ConsoleKernel.mjs.map +1 -1
  153. package/dist/Console/orchestr.mjs.map +1 -1
  154. package/dist/Container/Container.mjs.map +1 -1
  155. package/dist/Database/Adapters/DrizzleAdapter.cjs +1 -1
  156. package/dist/Database/Adapters/DrizzleAdapter.mjs +1 -1
  157. package/dist/Database/Adapters/DrizzleAdapter.mjs.map +1 -1
  158. package/dist/Database/Connection.cjs +1 -1
  159. package/dist/Database/Connection.mjs +1 -1
  160. package/dist/Database/Connection.mjs.map +1 -1
  161. package/dist/Database/DatabaseManager.cjs +1 -1
  162. package/dist/Database/DatabaseManager.mjs +1 -1
  163. package/dist/Database/DatabaseManager.mjs.map +1 -1
  164. package/dist/Database/Ensemble/Ensemble.mjs.map +1 -1
  165. package/dist/Database/Ensemble/EnsembleBuilder.mjs.map +1 -1
  166. package/dist/Database/Ensemble/EnsembleCollection.cjs +1 -1
  167. package/dist/Database/Ensemble/EnsembleCollection.mjs +1 -1
  168. package/dist/Database/Ensemble/EnsembleCollection.mjs.map +1 -1
  169. package/dist/Database/Ensemble/Relations/BelongsTo.mjs.map +1 -1
  170. package/dist/Database/Ensemble/Relations/BelongsToMany.cjs +1 -1
  171. package/dist/Database/Ensemble/Relations/BelongsToMany.mjs +1 -1
  172. package/dist/Database/Ensemble/Relations/BelongsToMany.mjs.map +1 -1
  173. package/dist/Database/Ensemble/Relations/HasMany.mjs.map +1 -1
  174. package/dist/Database/Ensemble/Relations/MorphTo.mjs.map +1 -1
  175. package/dist/Database/Ensemble/Relations/MorphToMany.mjs.map +1 -1
  176. package/dist/Database/Migrations/Blueprint.cjs +1 -1
  177. package/dist/Database/Migrations/Blueprint.mjs +1 -1
  178. package/dist/Database/Migrations/Blueprint.mjs.map +1 -1
  179. package/dist/Database/Migrations/MigrationCreator.cjs +1 -1
  180. package/dist/Database/Migrations/MigrationCreator.mjs +1 -1
  181. package/dist/Database/Migrations/MigrationCreator.mjs.map +1 -1
  182. package/dist/Database/Migrations/MigrationRepository.cjs +1 -1
  183. package/dist/Database/Migrations/MigrationRepository.mjs +1 -1
  184. package/dist/Database/Migrations/MigrationRepository.mjs.map +1 -1
  185. package/dist/Database/Migrations/Migrator.cjs +1 -1
  186. package/dist/Database/Migrations/Migrator.mjs +1 -1
  187. package/dist/Database/Migrations/Migrator.mjs.map +1 -1
  188. package/dist/Database/Migrations/SchemaBuilder.cjs +1 -1
  189. package/dist/Database/Migrations/SchemaBuilder.mjs +1 -1
  190. package/dist/Database/Migrations/SchemaBuilder.mjs.map +1 -1
  191. package/dist/Database/Query/Builder.cjs +1 -1
  192. package/dist/Database/Query/Builder.mjs +1 -1
  193. package/dist/Database/Query/Builder.mjs.map +1 -1
  194. package/dist/Database/Query/Expression.cjs +1 -1
  195. package/dist/Database/Query/Expression.mjs +1 -1
  196. package/dist/Database/Query/Expression.mjs.map +1 -1
  197. package/dist/Database/Seeders/SeederRunner.cjs +1 -1
  198. package/dist/Database/Seeders/SeederRunner.mjs +1 -1
  199. package/dist/Database/Seeders/SeederRunner.mjs.map +1 -1
  200. package/dist/Deploy/Deployer.cjs +1 -1
  201. package/dist/Deploy/Deployer.mjs +1 -1
  202. package/dist/Deploy/Deployer.mjs.map +1 -1
  203. package/dist/Deploy/ProjectConfig.mjs.map +1 -1
  204. package/dist/Deploy/Provisioner.cjs +1 -1
  205. package/dist/Deploy/Provisioner.mjs +1 -1
  206. package/dist/Deploy/Provisioner.mjs.map +1 -1
  207. package/dist/Deploy/SSHConnection.mjs.map +1 -1
  208. package/dist/Deploy/SymphonyClient.cjs +1 -1
  209. package/dist/Deploy/SymphonyClient.mjs +1 -1
  210. package/dist/Deploy/SymphonyClient.mjs.map +1 -1
  211. package/dist/Deploy/TarBuilder.mjs.map +1 -1
  212. package/dist/Deploy/prompt.mjs.map +1 -1
  213. package/dist/Events/Dispatcher.cjs +1 -1
  214. package/dist/Events/Dispatcher.mjs +1 -1
  215. package/dist/Events/Dispatcher.mjs.map +1 -1
  216. package/dist/Events/EventServiceProvider.cjs +1 -1
  217. package/dist/Events/EventServiceProvider.mjs.map +1 -1
  218. package/dist/Facades/Bus.mjs.map +1 -1
  219. package/dist/Facades/Cache.mjs.map +1 -1
  220. package/dist/Facades/Config.mjs.map +1 -1
  221. package/dist/Facades/DB.mjs.map +1 -1
  222. package/dist/Facades/Event.mjs.map +1 -1
  223. package/dist/Facades/Queue.mjs.map +1 -1
  224. package/dist/Facades/Route.mjs.map +1 -1
  225. package/dist/Facades/View.mjs.map +1 -1
  226. package/dist/Foundation/Application.mjs.map +1 -1
  227. package/dist/Foundation/Http/FormRequest.mjs.map +1 -1
  228. package/dist/Foundation/Http/Rules/AnyOfRule.mjs.map +1 -1
  229. package/dist/Foundation/Http/Rules/ImageFileRule.mjs.map +1 -1
  230. package/dist/Foundation/Http/Validator.mjs.map +1 -1
  231. package/dist/Queue/Batching/Batch.cjs +1 -1
  232. package/dist/Queue/Batching/Batch.mjs +1 -1
  233. package/dist/Queue/Batching/Batch.mjs.map +1 -1
  234. package/dist/Queue/Batching/PendingBatch.cjs +1 -1
  235. package/dist/Queue/Batching/PendingBatch.mjs +1 -1
  236. package/dist/Queue/Batching/PendingBatch.mjs.map +1 -1
  237. package/dist/Queue/Concerns/Dispatchable.mjs.map +1 -1
  238. package/dist/Queue/Drivers/DatabaseDriver.cjs +1 -1
  239. package/dist/Queue/Drivers/DatabaseDriver.mjs +1 -1
  240. package/dist/Queue/Drivers/DatabaseDriver.mjs.map +1 -1
  241. package/dist/Queue/Drivers/NullDriver.cjs +1 -1
  242. package/dist/Queue/Drivers/NullDriver.mjs +1 -1
  243. package/dist/Queue/Drivers/NullDriver.mjs.map +1 -1
  244. package/dist/Queue/Drivers/SyncDriver.cjs +1 -1
  245. package/dist/Queue/Drivers/SyncDriver.mjs +1 -1
  246. package/dist/Queue/Drivers/SyncDriver.mjs.map +1 -1
  247. package/dist/Queue/Events/JobExceptionOccurred.cjs +1 -1
  248. package/dist/Queue/Events/JobExceptionOccurred.mjs +1 -1
  249. package/dist/Queue/Events/JobExceptionOccurred.mjs.map +1 -1
  250. package/dist/Queue/Events/JobFailed.cjs +1 -1
  251. package/dist/Queue/Events/JobFailed.mjs +1 -1
  252. package/dist/Queue/Events/JobFailed.mjs.map +1 -1
  253. package/dist/Queue/Events/JobProcessed.cjs +1 -1
  254. package/dist/Queue/Events/JobProcessed.mjs +1 -1
  255. package/dist/Queue/Events/JobProcessed.mjs.map +1 -1
  256. package/dist/Queue/Events/JobProcessing.cjs +1 -1
  257. package/dist/Queue/Events/JobProcessing.mjs +1 -1
  258. package/dist/Queue/Events/JobProcessing.mjs.map +1 -1
  259. package/dist/Queue/Events/JobQueued.cjs +1 -1
  260. package/dist/Queue/Events/JobQueued.mjs +1 -1
  261. package/dist/Queue/Events/JobQueued.mjs.map +1 -1
  262. package/dist/Queue/Events/JobRetryRequested.cjs +1 -1
  263. package/dist/Queue/Events/JobRetryRequested.mjs +1 -1
  264. package/dist/Queue/Events/JobRetryRequested.mjs.map +1 -1
  265. package/dist/Queue/Events/WorkerStopping.cjs +1 -1
  266. package/dist/Queue/Events/WorkerStopping.mjs +1 -1
  267. package/dist/Queue/Events/WorkerStopping.mjs.map +1 -1
  268. package/dist/Queue/Failed/DatabaseFailedJobProvider.cjs +1 -1
  269. package/dist/Queue/Failed/DatabaseFailedJobProvider.mjs +1 -1
  270. package/dist/Queue/Failed/DatabaseFailedJobProvider.mjs.map +1 -1
  271. package/dist/Queue/Middleware/RateLimited.cjs +1 -1
  272. package/dist/Queue/Middleware/RateLimited.mjs +1 -1
  273. package/dist/Queue/Middleware/RateLimited.mjs.map +1 -1
  274. package/dist/Queue/Middleware/ThrottlesExceptions.cjs +1 -1
  275. package/dist/Queue/Middleware/ThrottlesExceptions.mjs +1 -1
  276. package/dist/Queue/Middleware/ThrottlesExceptions.mjs.map +1 -1
  277. package/dist/Queue/Middleware/WithoutOverlapping.cjs +1 -1
  278. package/dist/Queue/Middleware/WithoutOverlapping.mjs +1 -1
  279. package/dist/Queue/Middleware/WithoutOverlapping.mjs.map +1 -1
  280. package/dist/Queue/PendingChain.cjs +1 -1
  281. package/dist/Queue/PendingChain.mjs +1 -1
  282. package/dist/Queue/PendingChain.mjs.map +1 -1
  283. package/dist/Queue/PendingDispatch.cjs +1 -1
  284. package/dist/Queue/PendingDispatch.mjs +1 -1
  285. package/dist/Queue/PendingDispatch.mjs.map +1 -1
  286. package/dist/Queue/QueueManager.cjs +1 -1
  287. package/dist/Queue/QueueManager.mjs +1 -1
  288. package/dist/Queue/QueueManager.mjs.map +1 -1
  289. package/dist/Queue/QueueServiceProvider.mjs.map +1 -1
  290. package/dist/Queue/Workers/Worker.cjs +1 -1
  291. package/dist/Queue/Workers/Worker.mjs +1 -1
  292. package/dist/Queue/Workers/Worker.mjs.map +1 -1
  293. package/dist/Routing/Request.mjs.map +1 -1
  294. package/dist/Routing/Response.mjs.map +1 -1
  295. package/dist/Support/EventDiscovery.cjs +1 -1
  296. package/dist/Support/EventDiscovery.mjs +1 -1
  297. package/dist/Support/EventDiscovery.mjs.map +1 -1
  298. package/dist/Support/Testing/Fakes/EventFake.cjs +1 -1
  299. package/dist/Support/Testing/Fakes/EventFake.mjs +1 -1
  300. package/dist/Support/Testing/Fakes/EventFake.mjs.map +1 -1
  301. package/dist/Support/helpers.mjs.map +1 -1
  302. package/dist/View/Engines/TemplateEngine.mjs.map +1 -1
  303. package/package.json +17 -17
@@ -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=`make:job <name>`;description=`Create a new job class`;constructor(e){super(),this.app=e}async handle(e,r){let i=e[0];if(!i){this.error(`Job name is required.`),this.line(`Usage: make:job <name>`);return}let a=this.getPath(r),o=n.join(a,`${i}.ts`);if(await this.fileExists(o)){this.error(`Job already exists: ${o}`);return}await t.mkdir(a,{recursive:!0});let s=(r.sync===!0||r.sync===`true`?this.getSyncStub():this.getStub()).replace(/\{\{className\}\}/g,i);await t.writeFile(o,s),this.info(`Job created successfully: ${o}`),this.newLine(),this.comment(`Next steps:`),this.comment(`1. Add your job logic to the handle() method`),this.comment(`2. Dispatch the job:`),this.comment(` await ${i}.dispatch();`)}getPath(e){return e.path||this.app.path(`Jobs`)}async fileExists(e){try{return await t.access(e),!0}catch{return!1}}getStub(){return`import { Job } 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=`make:job <name>`;description=`Create a new job class`;constructor(e){super(),this.app=e}async handle(e,r){let i=e[0];if(!i){this.error(`Job name is required.`),this.line(`Usage: make:job <name>`);return}let a=this.getPath(r),o=n.join(a,`${i}.ts`);if(await this.fileExists(o)){this.error(`Job already exists: ${o}`);return}await t.mkdir(a,{recursive:!0});let s=(r.sync===!0||r.sync===`true`?this.getSyncStub():this.getStub()).replace(/\{\{className\}\}/g,i);await t.writeFile(o,s),this.info(`Job created successfully: ${o}`),this.newLine(),this.comment(`Next steps:`),this.comment(`1. Add your job logic to the handle() method`),this.comment(`2. Dispatch the job:`),this.comment(` await ${i}.dispatch();`)}getPath(e){return e.path||this.app.path(`Jobs`)}async fileExists(e){try{return await t.access(e),!0}catch{return!1}}getStub(){return`import { Job } from '@orchestr-sh/orchestr';
2
2
 
3
3
  export class {{className}} extends Job {
4
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"MakeJobCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeJobCommand.ts"],"sourcesContent":["/**\n * MakeJobCommand\n *\n * Create a new job class.\n * Mirrors Laravel's `php artisan make:job`.\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 MakeJobCommand extends Command {\n signature = 'make:job <name>';\n description = 'Create a new job class';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('Job name is required.');\n this.line('Usage: make:job <name>');\n return;\n }\n\n const jobsPath = this.getPath(options);\n const filePath = path.join(jobsPath, `${name}.ts`);\n\n // Check if file already exists\n if (await this.fileExists(filePath)) {\n this.error(`Job already exists: ${filePath}`);\n return;\n }\n\n // Create directory if it doesn't exist\n await fs.mkdir(jobsPath, { recursive: true });\n\n // Determine if sync or queued\n const sync = options.sync === true || options.sync === 'true';\n\n // Generate file content\n const content = (sync ? this.getSyncStub() : this.getStub()).replace(/\\{\\{className\\}\\}/g, name);\n\n // Write file\n await fs.writeFile(filePath, content);\n\n this.info(`Job created successfully: ${filePath}`);\n this.newLine();\n this.comment('Next steps:');\n this.comment('1. Add your job logic to the handle() method');\n this.comment('2. Dispatch the job:');\n this.comment(` await ${name}.dispatch();`);\n }\n\n protected getPath(options: CommandOptions): string {\n return (options.path as string) || this.app.path('Jobs');\n }\n\n protected async fileExists(filePath: string): Promise<boolean> {\n try {\n await fs.access(filePath);\n return true;\n } catch {\n return false;\n }\n }\n\n protected getStub(): string {\n return `import { Job } from '@orchestr-sh/orchestr';\n\nexport class {{className}} extends Job {\n /**\n * The number of times the job may be attempted.\n */\n public tries = 3;\n\n /**\n * The number of seconds the job can run before timing out.\n */\n public timeout = 60;\n\n /**\n * The number of seconds to wait before retrying the job.\n * Can use an array for progressive backoff: [10, 30, 60]\n */\n public backoff = 10;\n\n /**\n * Create a new job instance.\n */\n constructor(\n // Add your job data here\n ) {\n super();\n }\n\n /**\n * Execute the job.\n */\n async handle(): Promise<void> {\n //\n }\n\n /**\n * Handle a job failure.\n */\n async failed(error: Error): Promise<void> {\n console.error(\\`[\\${this.displayName()}] Failed:\\`, error.message);\n }\n}\n`;\n }\n\n protected getSyncStub(): string {\n return `import { Job } from '@orchestr-sh/orchestr';\n\nexport class {{className}} extends Job {\n /**\n * Create a new job instance.\n */\n constructor(\n // Add your job data here\n ) {\n super();\n }\n\n /**\n * Execute the job.\n */\n async handle(): Promise<void> {\n //\n }\n}\n`;\n }\n}\n"],"mappings":"8FAYA,IAAa,EAAb,cAAoC,CAAQ,CAC1C,UAAY,kBACZ,YAAc,yBAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAO,EAAK,GAElB,GAAI,CAAC,EAAM,CACT,KAAK,MAAM,wBAAwB,CACnC,KAAK,KAAK,yBAAyB,CACnC,OAGF,IAAM,EAAW,KAAK,QAAQ,EAAQ,CAChC,EAAW,EAAK,KAAK,EAAU,GAAG,EAAK,KAAK,CAGlD,GAAI,MAAM,KAAK,WAAW,EAAS,CAAE,CACnC,KAAK,MAAM,uBAAuB,IAAW,CAC7C,OAIF,MAAM,EAAG,MAAM,EAAU,CAAE,UAAW,GAAM,CAAC,CAM7C,IAAM,GAHO,EAAQ,OAAS,IAAQ,EAAQ,OAAS,OAG/B,KAAK,aAAa,CAAG,KAAK,SAAS,EAAE,QAAQ,qBAAsB,EAAK,CAGhG,MAAM,EAAG,UAAU,EAAU,EAAQ,CAErC,KAAK,KAAK,6BAA6B,IAAW,CAClD,KAAK,SAAS,CACd,KAAK,QAAQ,cAAc,CAC3B,KAAK,QAAQ,+CAA+C,CAC5D,KAAK,QAAQ,uBAAuB,CACpC,KAAK,QAAQ,YAAY,EAAK,cAAc,CAG9C,QAAkB,EAAiC,CACjD,OAAQ,EAAQ,MAAmB,KAAK,IAAI,KAAK,OAAO,CAG1D,MAAgB,WAAW,EAAoC,CAC7D,GAAI,CAEF,OADA,MAAM,EAAG,OAAO,EAAS,CAClB,QACD,CACN,MAAO,IAIX,SAA4B,CAC1B,MAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CT,aAAgC,CAC9B,MAAO"}
1
+ {"version":3,"file":"MakeJobCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeJobCommand.ts"],"sourcesContent":["/**\n * MakeJobCommand\n *\n * Create a new job class.\n * Mirrors Laravel's `php artisan make:job`.\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 MakeJobCommand extends Command {\n signature = 'make:job <name>';\n description = 'Create a new job class';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('Job name is required.');\n this.line('Usage: make:job <name>');\n return;\n }\n\n const jobsPath = this.getPath(options);\n const filePath = path.join(jobsPath, `${name}.ts`);\n\n // Check if file already exists\n if (await this.fileExists(filePath)) {\n this.error(`Job already exists: ${filePath}`);\n return;\n }\n\n // Create directory if it doesn't exist\n await fs.mkdir(jobsPath, { recursive: true });\n\n // Determine if sync or queued\n const sync = options.sync === true || options.sync === 'true';\n\n // Generate file content\n const content = (sync ? this.getSyncStub() : this.getStub()).replace(/\\{\\{className\\}\\}/g, name);\n\n // Write file\n await fs.writeFile(filePath, content);\n\n this.info(`Job created successfully: ${filePath}`);\n this.newLine();\n this.comment('Next steps:');\n this.comment('1. Add your job logic to the handle() method');\n this.comment('2. Dispatch the job:');\n this.comment(` await ${name}.dispatch();`);\n }\n\n protected getPath(options: CommandOptions): string {\n return (options.path as string) || this.app.path('Jobs');\n }\n\n protected async fileExists(filePath: string): Promise<boolean> {\n try {\n await fs.access(filePath);\n return true;\n } catch {\n return false;\n }\n }\n\n protected getStub(): string {\n return `import { Job } from '@orchestr-sh/orchestr';\n\nexport class {{className}} extends Job {\n /**\n * The number of times the job may be attempted.\n */\n public tries = 3;\n\n /**\n * The number of seconds the job can run before timing out.\n */\n public timeout = 60;\n\n /**\n * The number of seconds to wait before retrying the job.\n * Can use an array for progressive backoff: [10, 30, 60]\n */\n public backoff = 10;\n\n /**\n * Create a new job instance.\n */\n constructor(\n // Add your job data here\n ) {\n super();\n }\n\n /**\n * Execute the job.\n */\n async handle(): Promise<void> {\n //\n }\n\n /**\n * Handle a job failure.\n */\n async failed(error: Error): Promise<void> {\n console.error(\\`[\\${this.displayName()}] Failed:\\`, error.message);\n }\n}\n`;\n }\n\n protected getSyncStub(): string {\n return `import { Job } from '@orchestr-sh/orchestr';\n\nexport class {{className}} extends Job {\n /**\n * Create a new job instance.\n */\n constructor(\n // Add your job data here\n ) {\n super();\n }\n\n /**\n * Execute the job.\n */\n async handle(): Promise<void> {\n //\n }\n}\n`;\n }\n}\n"],"mappings":"8FAYA,IAAa,EAAb,cAAoC,CAAQ,CAIpB,IAHtB,UAAY,kBACZ,YAAc,yBAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAO,EAAK,GAElB,GAAI,CAAC,EAAM,CACT,KAAK,MAAM,wBAAwB,CACnC,KAAK,KAAK,yBAAyB,CACnC,OAGF,IAAM,EAAW,KAAK,QAAQ,EAAQ,CAChC,EAAW,EAAK,KAAK,EAAU,GAAG,EAAK,KAAK,CAGlD,GAAI,MAAM,KAAK,WAAW,EAAS,CAAE,CACnC,KAAK,MAAM,uBAAuB,IAAW,CAC7C,OAIF,MAAM,EAAG,MAAM,EAAU,CAAE,UAAW,GAAM,CAAC,CAM7C,IAAM,GAHO,EAAQ,OAAS,IAAQ,EAAQ,OAAS,OAG/B,KAAK,aAAa,CAAG,KAAK,SAAS,EAAE,QAAQ,qBAAsB,EAAK,CAGhG,MAAM,EAAG,UAAU,EAAU,EAAQ,CAErC,KAAK,KAAK,6BAA6B,IAAW,CAClD,KAAK,SAAS,CACd,KAAK,QAAQ,cAAc,CAC3B,KAAK,QAAQ,+CAA+C,CAC5D,KAAK,QAAQ,uBAAuB,CACpC,KAAK,QAAQ,YAAY,EAAK,cAAc,CAG9C,QAAkB,EAAiC,CACjD,OAAQ,EAAQ,MAAmB,KAAK,IAAI,KAAK,OAAO,CAG1D,MAAgB,WAAW,EAAoC,CAC7D,GAAI,CAEF,OADA,MAAM,EAAG,OAAO,EAAS,CAClB,QACD,CACN,MAAO,IAIX,SAA4B,CAC1B,MAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CT,aAAgC,CAC9B,MAAO"}
@@ -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=`make:listener <name> [--event=] [--queued]`;description=`Create a new event listener class`;constructor(e){super(),this.app=e}async handle(e,t){let i=e[0];if(!i){this.error(`Listener name is required.`),this.line(`Usage: make:listener <name> [--event=EventName] [--queued]`);return}let a=t.event,o=t.queued===!0,s=this.getPath(t),c=r.join(s,`${i}.ts`);if(await this.fileExists(c)){this.error(`Listener already exists: ${c}`);return}await n.mkdir(s,{recursive:!0});let l=this.getStub(o,a).replace(/\{\{className\}\}/g,i).replace(/\{\{eventClass\}\}/g,a||`Event`);await n.writeFile(c,l),this.info(`Listener created successfully: ${c}`),a?(this.newLine(),this.comment(`Don't forget to register this listener in your EventServiceProvider:`),this.comment(` protected listen = {`),this.comment(` ${a}: '${i}',`),this.comment(` }`)):(this.newLine(),this.comment(`Remember to specify the event type in the handle method.`))}getPath(e){return e.path||this.app.path(`Listeners`)}async fileExists(e){try{return await n.access(e),!0}catch{return!1}}getStub(e,t){return e?`import { ShouldQueue } from '../../Listeners/Contracts/ShouldQueue';${t?`\nimport { ${t} } from '../Events/${t}';`:``}
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=`make:listener <name> [--event=] [--queued]`;description=`Create a new event listener class`;constructor(e){super(),this.app=e}async handle(e,t){let i=e[0];if(!i){this.error(`Listener name is required.`),this.line(`Usage: make:listener <name> [--event=EventName] [--queued]`);return}let a=t.event,o=t.queued===!0,s=this.getPath(t),c=r.join(s,`${i}.ts`);if(await this.fileExists(c)){this.error(`Listener already exists: ${c}`);return}await n.mkdir(s,{recursive:!0});let l=this.getStub(o,a).replace(/\{\{className\}\}/g,i).replace(/\{\{eventClass\}\}/g,a||`Event`);await n.writeFile(c,l),this.info(`Listener created successfully: ${c}`),a?(this.newLine(),this.comment(`Don't forget to register this listener in your EventServiceProvider:`),this.comment(` protected listen = {`),this.comment(` ${a}: '${i}',`),this.comment(` }`)):(this.newLine(),this.comment(`Remember to specify the event type in the handle method.`))}getPath(e){return e.path||this.app.path(`Listeners`)}async fileExists(e){try{return await n.access(e),!0}catch{return!1}}getStub(e,t){return e?`import { ShouldQueue } from '../../Listeners/Contracts/ShouldQueue';${t?`\nimport { ${t} } from '../Events/${t}';`:``}
2
2
 
3
3
  /**
4
4
  * {{className}} Listener
@@ -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=`make:listener <name> [--event=] [--queued]`;description=`Create a new event listener class`;constructor(e){super(),this.app=e}async handle(e,r){let i=e[0];if(!i){this.error(`Listener name is required.`),this.line(`Usage: make:listener <name> [--event=EventName] [--queued]`);return}let a=r.event,o=r.queued===!0,s=this.getPath(r),c=n.join(s,`${i}.ts`);if(await this.fileExists(c)){this.error(`Listener already exists: ${c}`);return}await t.mkdir(s,{recursive:!0});let l=this.getStub(o,a).replace(/\{\{className\}\}/g,i).replace(/\{\{eventClass\}\}/g,a||`Event`);await t.writeFile(c,l),this.info(`Listener created successfully: ${c}`),a?(this.newLine(),this.comment(`Don't forget to register this listener in your EventServiceProvider:`),this.comment(` protected listen = {`),this.comment(` ${a}: '${i}',`),this.comment(` }`)):(this.newLine(),this.comment(`Remember to specify the event type in the handle method.`))}getPath(e){return e.path||this.app.path(`Listeners`)}async fileExists(e){try{return await t.access(e),!0}catch{return!1}}getStub(e,t){return e?`import { ShouldQueue } from '../../Listeners/Contracts/ShouldQueue';${t?`\nimport { ${t} } from '../Events/${t}';`:``}
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=`make:listener <name> [--event=] [--queued]`;description=`Create a new event listener class`;constructor(e){super(),this.app=e}async handle(e,r){let i=e[0];if(!i){this.error(`Listener name is required.`),this.line(`Usage: make:listener <name> [--event=EventName] [--queued]`);return}let a=r.event,o=r.queued===!0,s=this.getPath(r),c=n.join(s,`${i}.ts`);if(await this.fileExists(c)){this.error(`Listener already exists: ${c}`);return}await t.mkdir(s,{recursive:!0});let l=this.getStub(o,a).replace(/\{\{className\}\}/g,i).replace(/\{\{eventClass\}\}/g,a||`Event`);await t.writeFile(c,l),this.info(`Listener created successfully: ${c}`),a?(this.newLine(),this.comment(`Don't forget to register this listener in your EventServiceProvider:`),this.comment(` protected listen = {`),this.comment(` ${a}: '${i}',`),this.comment(` }`)):(this.newLine(),this.comment(`Remember to specify the event type in the handle method.`))}getPath(e){return e.path||this.app.path(`Listeners`)}async fileExists(e){try{return await t.access(e),!0}catch{return!1}}getStub(e,t){return e?`import { ShouldQueue } from '../../Listeners/Contracts/ShouldQueue';${t?`\nimport { ${t} } from '../Events/${t}';`:``}
2
2
 
3
3
  /**
4
4
  * {{className}} Listener
@@ -1 +1 @@
1
- {"version":3,"file":"MakeListenerCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeListenerCommand.ts"],"sourcesContent":["/**\n * MakeListenerCommand\n *\n * Create a new event listener class following Laravel's Artisan pattern\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 MakeListenerCommand extends Command {\n signature = 'make:listener <name> [--event=] [--queued]';\n description = 'Create a new event listener class';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('Listener name is required.');\n this.line('Usage: make:listener <name> [--event=EventName] [--queued]');\n return;\n }\n\n const event = options.event as string | undefined;\n const queued = options.queued === true;\n\n const listenersPath = this.getPath(options);\n const filePath = path.join(listenersPath, `${name}.ts`);\n\n // Check if file already exists\n if (await this.fileExists(filePath)) {\n this.error(`Listener already exists: ${filePath}`);\n return;\n }\n\n // Create directory if it doesn't exist\n await fs.mkdir(listenersPath, { recursive: true });\n\n // Generate file content\n const content = this.getStub(queued, event)\n .replace(/\\{\\{className\\}\\}/g, name)\n .replace(/\\{\\{eventClass\\}\\}/g, event || 'Event');\n\n // Write file\n await fs.writeFile(filePath, content);\n\n this.info(`Listener created successfully: ${filePath}`);\n\n if (event) {\n this.newLine();\n this.comment(\"Don't forget to register this listener in your EventServiceProvider:\");\n this.comment(` protected listen = {`);\n this.comment(` ${event}: '${name}',`);\n this.comment(` }`);\n } else {\n this.newLine();\n this.comment('Remember to specify the event type in the handle method.');\n }\n }\n\n /**\n * Get the destination path for the listener class\n */\n protected getPath(options: CommandOptions): string {\n return (options.path as string) || this.app.path('Listeners');\n }\n\n /**\n * Check if a file exists\n */\n protected async fileExists(filePath: string): Promise<boolean> {\n try {\n await fs.access(filePath);\n return true;\n } catch {\n return false;\n }\n }\n\n /**\n * Get the stub template for the listener class\n */\n protected getStub(queued: boolean, event?: string): string {\n if (queued) {\n return `import { ShouldQueue } from '../../Listeners/Contracts/ShouldQueue';${event ? `\\nimport { ${event} } from '../Events/${event}';` : ''}\n\n/**\n * {{className}} Listener\n *\n * This listener will be queued automatically\n */\nexport class {{className}} implements ShouldQueue {\n // Queue configuration\n public connection = 'default';\n public queue = 'listeners';\n public tries = 3;\n\n /**\n * Handle the event\n */\n async handle(event: {{eventClass}}): Promise<void> {\n // Handle the event\n }\n\n /**\n * Handle a job failure\n */\n async failed(event: {{eventClass}}, error: Error): Promise<void> {\n // Handle the failure\n }\n}\n`;\n }\n\n return `${event ? `import { ${event} } from '../Events/${event}';\\n\\n` : ''}/**\n * {{className}} Listener\n */\nexport class {{className}} {\n /**\n * Handle the event\n */\n handle(event: {{eventClass}}): void {\n // Handle the event\n }\n}\n`;\n }\n}\n"],"mappings":"8FAWA,IAAa,EAAb,cAAyC,CAAQ,CAC/C,UAAY,6CACZ,YAAc,oCAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAO,EAAK,GAElB,GAAI,CAAC,EAAM,CACT,KAAK,MAAM,6BAA6B,CACxC,KAAK,KAAK,6DAA6D,CACvE,OAGF,IAAM,EAAQ,EAAQ,MAChB,EAAS,EAAQ,SAAW,GAE5B,EAAgB,KAAK,QAAQ,EAAQ,CACrC,EAAW,EAAK,KAAK,EAAe,GAAG,EAAK,KAAK,CAGvD,GAAI,MAAM,KAAK,WAAW,EAAS,CAAE,CACnC,KAAK,MAAM,4BAA4B,IAAW,CAClD,OAIF,MAAM,EAAG,MAAM,EAAe,CAAE,UAAW,GAAM,CAAC,CAGlD,IAAM,EAAU,KAAK,QAAQ,EAAQ,EAAM,CACxC,QAAQ,qBAAsB,EAAK,CACnC,QAAQ,sBAAuB,GAAS,QAAQ,CAGnD,MAAM,EAAG,UAAU,EAAU,EAAQ,CAErC,KAAK,KAAK,kCAAkC,IAAW,CAEnD,GACF,KAAK,SAAS,CACd,KAAK,QAAQ,uEAAuE,CACpF,KAAK,QAAQ,yBAAyB,CACtC,KAAK,QAAQ,OAAO,EAAM,KAAK,EAAK,IAAI,CACxC,KAAK,QAAQ,MAAM,GAEnB,KAAK,SAAS,CACd,KAAK,QAAQ,2DAA2D,EAO5E,QAAkB,EAAiC,CACjD,OAAQ,EAAQ,MAAmB,KAAK,IAAI,KAAK,YAAY,CAM/D,MAAgB,WAAW,EAAoC,CAC7D,GAAI,CAEF,OADA,MAAM,EAAG,OAAO,EAAS,CAClB,QACD,CACN,MAAO,IAOX,QAAkB,EAAiB,EAAwB,CAgCzD,OA/BI,EACK,uEAAuE,EAAQ,cAAc,EAAM,qBAAqB,EAAM,IAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BzI,GAAG,EAAQ,YAAY,EAAM,qBAAqB,EAAM,QAAU,GAAG"}
1
+ {"version":3,"file":"MakeListenerCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeListenerCommand.ts"],"sourcesContent":["/**\n * MakeListenerCommand\n *\n * Create a new event listener class following Laravel's Artisan pattern\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 MakeListenerCommand extends Command {\n signature = 'make:listener <name> [--event=] [--queued]';\n description = 'Create a new event listener class';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('Listener name is required.');\n this.line('Usage: make:listener <name> [--event=EventName] [--queued]');\n return;\n }\n\n const event = options.event as string | undefined;\n const queued = options.queued === true;\n\n const listenersPath = this.getPath(options);\n const filePath = path.join(listenersPath, `${name}.ts`);\n\n // Check if file already exists\n if (await this.fileExists(filePath)) {\n this.error(`Listener already exists: ${filePath}`);\n return;\n }\n\n // Create directory if it doesn't exist\n await fs.mkdir(listenersPath, { recursive: true });\n\n // Generate file content\n const content = this.getStub(queued, event)\n .replace(/\\{\\{className\\}\\}/g, name)\n .replace(/\\{\\{eventClass\\}\\}/g, event || 'Event');\n\n // Write file\n await fs.writeFile(filePath, content);\n\n this.info(`Listener created successfully: ${filePath}`);\n\n if (event) {\n this.newLine();\n this.comment(\"Don't forget to register this listener in your EventServiceProvider:\");\n this.comment(` protected listen = {`);\n this.comment(` ${event}: '${name}',`);\n this.comment(` }`);\n } else {\n this.newLine();\n this.comment('Remember to specify the event type in the handle method.');\n }\n }\n\n /**\n * Get the destination path for the listener class\n */\n protected getPath(options: CommandOptions): string {\n return (options.path as string) || this.app.path('Listeners');\n }\n\n /**\n * Check if a file exists\n */\n protected async fileExists(filePath: string): Promise<boolean> {\n try {\n await fs.access(filePath);\n return true;\n } catch {\n return false;\n }\n }\n\n /**\n * Get the stub template for the listener class\n */\n protected getStub(queued: boolean, event?: string): string {\n if (queued) {\n return `import { ShouldQueue } from '../../Listeners/Contracts/ShouldQueue';${event ? `\\nimport { ${event} } from '../Events/${event}';` : ''}\n\n/**\n * {{className}} Listener\n *\n * This listener will be queued automatically\n */\nexport class {{className}} implements ShouldQueue {\n // Queue configuration\n public connection = 'default';\n public queue = 'listeners';\n public tries = 3;\n\n /**\n * Handle the event\n */\n async handle(event: {{eventClass}}): Promise<void> {\n // Handle the event\n }\n\n /**\n * Handle a job failure\n */\n async failed(event: {{eventClass}}, error: Error): Promise<void> {\n // Handle the failure\n }\n}\n`;\n }\n\n return `${event ? `import { ${event} } from '../Events/${event}';\\n\\n` : ''}/**\n * {{className}} Listener\n */\nexport class {{className}} {\n /**\n * Handle the event\n */\n handle(event: {{eventClass}}): void {\n // Handle the event\n }\n}\n`;\n }\n}\n"],"mappings":"8FAWA,IAAa,EAAb,cAAyC,CAAQ,CAIzB,IAHtB,UAAY,6CACZ,YAAc,oCAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAO,EAAK,GAElB,GAAI,CAAC,EAAM,CACT,KAAK,MAAM,6BAA6B,CACxC,KAAK,KAAK,6DAA6D,CACvE,OAGF,IAAM,EAAQ,EAAQ,MAChB,EAAS,EAAQ,SAAW,GAE5B,EAAgB,KAAK,QAAQ,EAAQ,CACrC,EAAW,EAAK,KAAK,EAAe,GAAG,EAAK,KAAK,CAGvD,GAAI,MAAM,KAAK,WAAW,EAAS,CAAE,CACnC,KAAK,MAAM,4BAA4B,IAAW,CAClD,OAIF,MAAM,EAAG,MAAM,EAAe,CAAE,UAAW,GAAM,CAAC,CAGlD,IAAM,EAAU,KAAK,QAAQ,EAAQ,EAAM,CACxC,QAAQ,qBAAsB,EAAK,CACnC,QAAQ,sBAAuB,GAAS,QAAQ,CAGnD,MAAM,EAAG,UAAU,EAAU,EAAQ,CAErC,KAAK,KAAK,kCAAkC,IAAW,CAEnD,GACF,KAAK,SAAS,CACd,KAAK,QAAQ,uEAAuE,CACpF,KAAK,QAAQ,yBAAyB,CACtC,KAAK,QAAQ,OAAO,EAAM,KAAK,EAAK,IAAI,CACxC,KAAK,QAAQ,MAAM,GAEnB,KAAK,SAAS,CACd,KAAK,QAAQ,2DAA2D,EAO5E,QAAkB,EAAiC,CACjD,OAAQ,EAAQ,MAAmB,KAAK,IAAI,KAAK,YAAY,CAM/D,MAAgB,WAAW,EAAoC,CAC7D,GAAI,CAEF,OADA,MAAM,EAAG,OAAO,EAAS,CAClB,QACD,CACN,MAAO,IAOX,QAAkB,EAAiB,EAAwB,CAgCzD,OA/BI,EACK,uEAAuE,EAAQ,cAAc,EAAM,qBAAqB,EAAM,IAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BzI,GAAG,EAAQ,YAAY,EAAM,qBAAqB,EAAM,QAAU,GAAG"}
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../Database/Migrations/MigrationCreator.cjs`),t=require(`../Command.cjs`);var n=class extends t.Command{signature=`make:migration <name>`;description=`Create a new migration file`;constructor(e){super(),this.app=e}async handle(t,n){let r=t[0];if(!r){this.error(`Migration name is required.`),this.line(`Usage: make:migration <name>`);return}let i=n.path||this.app.databasePath(`migrations`),a=n.table,o=n.create===!0,s=new e.MigrationCreator;try{let e=await s.create(r,i,a,o);this.info(`Migration created successfully: ${e}`)}catch(e){throw this.error(`Failed to create migration: ${e.message}`),e}}};exports.MakeMigrationCommand=n;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../Database/Migrations/MigrationCreator.cjs`),t=require(`../Command.cjs`);var n=class extends t.Command{app;signature=`make:migration <name>`;description=`Create a new migration file`;constructor(e){super(),this.app=e}async handle(t,n){let r=t[0];if(!r){this.error(`Migration name is required.`),this.line(`Usage: make:migration <name>`);return}let i=n.path||this.app.databasePath(`migrations`),a=n.table,o=n.create===!0,s=new e.MigrationCreator;try{let e=await s.create(r,i,a,o);this.info(`Migration created successfully: ${e}`)}catch(e){throw this.error(`Failed to create migration: ${e.message}`),e}}};exports.MakeMigrationCommand=n;
@@ -1,2 +1,2 @@
1
- import{MigrationCreator as e}from"../../Database/Migrations/MigrationCreator.mjs";import{Command as t}from"../Command.mjs";var n=class extends t{signature=`make:migration <name>`;description=`Create a new migration file`;constructor(e){super(),this.app=e}async handle(t,n){let r=t[0];if(!r){this.error(`Migration name is required.`),this.line(`Usage: make:migration <name>`);return}let i=n.path||this.app.databasePath(`migrations`),a=n.table,o=n.create===!0,s=new e;try{let e=await s.create(r,i,a,o);this.info(`Migration created successfully: ${e}`)}catch(e){throw this.error(`Failed to create migration: ${e.message}`),e}}};export{n as MakeMigrationCommand};
1
+ import{MigrationCreator as e}from"../../Database/Migrations/MigrationCreator.mjs";import{Command as t}from"../Command.mjs";var n=class extends t{app;signature=`make:migration <name>`;description=`Create a new migration file`;constructor(e){super(),this.app=e}async handle(t,n){let r=t[0];if(!r){this.error(`Migration name is required.`),this.line(`Usage: make:migration <name>`);return}let i=n.path||this.app.databasePath(`migrations`),a=n.table,o=n.create===!0,s=new e;try{let e=await s.create(r,i,a,o);this.info(`Migration created successfully: ${e}`)}catch(e){throw this.error(`Failed to create migration: ${e.message}`),e}}};export{n as MakeMigrationCommand};
2
2
  //# sourceMappingURL=MakeMigrationCommand.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"MakeMigrationCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeMigrationCommand.ts"],"sourcesContent":["/**\n * MakeMigrationCommand\n *\n * Create a new migration file\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { MigrationCreator } from '@/Database/Migrations/MigrationCreator';\nimport { Application } from '@/Foundation/Application';\n\nexport class MakeMigrationCommand extends Command {\n signature = 'make:migration <name>';\n description = 'Create a new migration file';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('Migration name is required.');\n this.line('Usage: make:migration <name>');\n return;\n }\n\n const migrationPath = (options.path as string) || this.app.databasePath('migrations');\n const table = options.table as string | undefined;\n const create = options.create === true;\n\n const creator = new MigrationCreator();\n\n try {\n const filePath = await creator.create(name, migrationPath, table, create);\n\n this.info(`Migration created successfully: ${filePath}`);\n } catch (error) {\n this.error(`Failed to create migration: ${(error as Error).message}`);\n throw error;\n }\n }\n}\n"],"mappings":"2HAUA,IAAa,EAAb,cAA0C,CAAQ,CAChD,UAAY,wBACZ,YAAc,8BAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAO,EAAK,GAElB,GAAI,CAAC,EAAM,CACT,KAAK,MAAM,8BAA8B,CACzC,KAAK,KAAK,+BAA+B,CACzC,OAGF,IAAM,EAAiB,EAAQ,MAAmB,KAAK,IAAI,aAAa,aAAa,CAC/E,EAAQ,EAAQ,MAChB,EAAS,EAAQ,SAAW,GAE5B,EAAU,IAAI,EAEpB,GAAI,CACF,IAAM,EAAW,MAAM,EAAQ,OAAO,EAAM,EAAe,EAAO,EAAO,CAEzE,KAAK,KAAK,mCAAmC,IAAW,OACjD,EAAO,CAEd,MADA,KAAK,MAAM,+BAAgC,EAAgB,UAAU,CAC/D"}
1
+ {"version":3,"file":"MakeMigrationCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeMigrationCommand.ts"],"sourcesContent":["/**\n * MakeMigrationCommand\n *\n * Create a new migration file\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { MigrationCreator } from '@/Database/Migrations/MigrationCreator';\nimport { Application } from '@/Foundation/Application';\n\nexport class MakeMigrationCommand extends Command {\n signature = 'make:migration <name>';\n description = 'Create a new migration file';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('Migration name is required.');\n this.line('Usage: make:migration <name>');\n return;\n }\n\n const migrationPath = (options.path as string) || this.app.databasePath('migrations');\n const table = options.table as string | undefined;\n const create = options.create === true;\n\n const creator = new MigrationCreator();\n\n try {\n const filePath = await creator.create(name, migrationPath, table, create);\n\n this.info(`Migration created successfully: ${filePath}`);\n } catch (error) {\n this.error(`Failed to create migration: ${(error as Error).message}`);\n throw error;\n }\n }\n}\n"],"mappings":"2HAUA,IAAa,EAAb,cAA0C,CAAQ,CAI1B,IAHtB,UAAY,wBACZ,YAAc,8BAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAO,EAAK,GAElB,GAAI,CAAC,EAAM,CACT,KAAK,MAAM,8BAA8B,CACzC,KAAK,KAAK,+BAA+B,CACzC,OAGF,IAAM,EAAiB,EAAQ,MAAmB,KAAK,IAAI,aAAa,aAAa,CAC/E,EAAQ,EAAQ,MAChB,EAAS,EAAQ,SAAW,GAE5B,EAAU,IAAI,EAEpB,GAAI,CACF,IAAM,EAAW,MAAM,EAAQ,OAAO,EAAM,EAAe,EAAO,EAAO,CAEzE,KAAK,KAAK,mCAAmC,IAAW,OACjD,EAAO,CAEd,MADA,KAAK,MAAM,+BAAgC,EAAgB,UAAU,CAC/D"}
@@ -1,4 +1,4 @@
1
- const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`path`);n=e.__toESM(n);let r=require(`fs`);r=e.__toESM(r);var i=class extends t.Command{signature=`make:seeder <name>`;description=`Create a new seeder class`;constructor(e){super(),this.app=e}async handle(e,t){let n=e[0];if(!n){this.error(`Seeder name is required.`),this.line(`Usage: make:seeder <name>`);return}let r=t.path||`./database/seeders`;try{let e=await this.createSeeder(n,r);this.info(`Seeder created successfully: ${e}`)}catch(e){throw this.error(`Failed to create seeder: ${e.message}`),e}}async createSeeder(e,t){r.existsSync(t)||r.mkdirSync(t,{recursive:!0});let i=`${e}.ts`,a=n.join(t,i);if(r.existsSync(a))throw Error(`Seeder already exists: ${a}`);let o=this.getStub(e);return r.writeFileSync(a,o),a}getStub(e){return`import { Seeder } from '@orchestr-sh/orchestr';
1
+ const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`path`);n=e.__toESM(n,1);let r=require(`fs`);r=e.__toESM(r,1);var i=class extends t.Command{app;signature=`make:seeder <name>`;description=`Create a new seeder class`;constructor(e){super(),this.app=e}async handle(e,t){let n=e[0];if(!n){this.error(`Seeder name is required.`),this.line(`Usage: make:seeder <name>`);return}let r=t.path||`./database/seeders`;try{let e=await this.createSeeder(n,r);this.info(`Seeder created successfully: ${e}`)}catch(e){throw this.error(`Failed to create seeder: ${e.message}`),e}}async createSeeder(e,t){r.existsSync(t)||r.mkdirSync(t,{recursive:!0});let i=`${e}.ts`,a=n.join(t,i);if(r.existsSync(a))throw Error(`Seeder already exists: ${a}`);let o=this.getStub(e);return r.writeFileSync(a,o),a}getStub(e){return`import { Seeder } from '@orchestr-sh/orchestr';
2
2
 
3
3
  export default class ${e} extends Seeder {
4
4
  /**
@@ -1,4 +1,4 @@
1
- import{Command as e}from"../Command.mjs";import*as t from"path";import*as n from"fs";var r=class extends e{signature=`make:seeder <name>`;description=`Create a new seeder class`;constructor(e){super(),this.app=e}async handle(e,t){let n=e[0];if(!n){this.error(`Seeder name is required.`),this.line(`Usage: make:seeder <name>`);return}let r=t.path||`./database/seeders`;try{let e=await this.createSeeder(n,r);this.info(`Seeder created successfully: ${e}`)}catch(e){throw this.error(`Failed to create seeder: ${e.message}`),e}}async createSeeder(e,r){n.existsSync(r)||n.mkdirSync(r,{recursive:!0});let i=`${e}.ts`,a=t.join(r,i);if(n.existsSync(a))throw Error(`Seeder already exists: ${a}`);let o=this.getStub(e);return n.writeFileSync(a,o),a}getStub(e){return`import { Seeder } from '@orchestr-sh/orchestr';
1
+ import{Command as e}from"../Command.mjs";import*as t from"path";import*as n from"fs";var r=class extends e{app;signature=`make:seeder <name>`;description=`Create a new seeder class`;constructor(e){super(),this.app=e}async handle(e,t){let n=e[0];if(!n){this.error(`Seeder name is required.`),this.line(`Usage: make:seeder <name>`);return}let r=t.path||`./database/seeders`;try{let e=await this.createSeeder(n,r);this.info(`Seeder created successfully: ${e}`)}catch(e){throw this.error(`Failed to create seeder: ${e.message}`),e}}async createSeeder(e,r){n.existsSync(r)||n.mkdirSync(r,{recursive:!0});let i=`${e}.ts`,a=t.join(r,i);if(n.existsSync(a))throw Error(`Seeder already exists: ${a}`);let o=this.getStub(e);return n.writeFileSync(a,o),a}getStub(e){return`import { Seeder } from '@orchestr-sh/orchestr';
2
2
 
3
3
  export default class ${e} extends Seeder {
4
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"MakeSeederCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeSeederCommand.ts"],"sourcesContent":["/**\n * MakeSeederCommand\n *\n * Create a new seeder class\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class MakeSeederCommand extends Command {\n signature = 'make:seeder <name>';\n description = 'Create a new seeder class';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('Seeder name is required.');\n this.line('Usage: make:seeder <name>');\n return;\n }\n\n const seederPath = options.path || './database/seeders';\n\n try {\n const filePath = await this.createSeeder(name, seederPath);\n\n this.info(`Seeder created successfully: ${filePath}`);\n } catch (error) {\n this.error(`Failed to create seeder: ${(error as Error).message}`);\n throw error;\n }\n }\n\n /**\n * Create a new seeder file\n */\n protected async createSeeder(name: string, seederPath: string): Promise<string> {\n // Ensure directory exists\n if (!fs.existsSync(seederPath)) {\n fs.mkdirSync(seederPath, { recursive: true });\n }\n\n const fileName = `${name}.ts`;\n const filePath = path.join(seederPath, fileName);\n\n if (fs.existsSync(filePath)) {\n throw new Error(`Seeder already exists: ${filePath}`);\n }\n\n const stub = this.getStub(name);\n fs.writeFileSync(filePath, stub);\n\n return filePath;\n }\n\n /**\n * Get the seeder stub\n */\n protected getStub(name: string): string {\n return `import { Seeder } from '@orchestr-sh/orchestr';\n\nexport default class ${name} extends Seeder {\n /**\n * Run the database seeds\n */\n async run(): Promise<void> {\n // Example: Insert data into database\n // await this.connection?.table('users').insert({\n // name: 'John Doe',\n // email: 'john@example.com',\n // });\n }\n}\n`;\n }\n}\n"],"mappings":"qFAWA,IAAa,EAAb,cAAuC,CAAQ,CAC7C,UAAY,qBACZ,YAAc,4BAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAO,EAAK,GAElB,GAAI,CAAC,EAAM,CACT,KAAK,MAAM,2BAA2B,CACtC,KAAK,KAAK,4BAA4B,CACtC,OAGF,IAAM,EAAa,EAAQ,MAAQ,qBAEnC,GAAI,CACF,IAAM,EAAW,MAAM,KAAK,aAAa,EAAM,EAAW,CAE1D,KAAK,KAAK,gCAAgC,IAAW,OAC9C,EAAO,CAEd,MADA,KAAK,MAAM,4BAA6B,EAAgB,UAAU,CAC5D,GAOV,MAAgB,aAAa,EAAc,EAAqC,CAEzE,EAAG,WAAW,EAAW,EAC5B,EAAG,UAAU,EAAY,CAAE,UAAW,GAAM,CAAC,CAG/C,IAAM,EAAW,GAAG,EAAK,KACnB,EAAW,EAAK,KAAK,EAAY,EAAS,CAEhD,GAAI,EAAG,WAAW,EAAS,CACzB,MAAU,MAAM,0BAA0B,IAAW,CAGvD,IAAM,EAAO,KAAK,QAAQ,EAAK,CAG/B,OAFA,EAAG,cAAc,EAAU,EAAK,CAEzB,EAMT,QAAkB,EAAsB,CACtC,MAAO;;uBAEY,EAAK"}
1
+ {"version":3,"file":"MakeSeederCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeSeederCommand.ts"],"sourcesContent":["/**\n * MakeSeederCommand\n *\n * Create a new seeder class\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class MakeSeederCommand extends Command {\n signature = 'make:seeder <name>';\n description = 'Create a new seeder class';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('Seeder name is required.');\n this.line('Usage: make:seeder <name>');\n return;\n }\n\n const seederPath = options.path || './database/seeders';\n\n try {\n const filePath = await this.createSeeder(name, seederPath);\n\n this.info(`Seeder created successfully: ${filePath}`);\n } catch (error) {\n this.error(`Failed to create seeder: ${(error as Error).message}`);\n throw error;\n }\n }\n\n /**\n * Create a new seeder file\n */\n protected async createSeeder(name: string, seederPath: string): Promise<string> {\n // Ensure directory exists\n if (!fs.existsSync(seederPath)) {\n fs.mkdirSync(seederPath, { recursive: true });\n }\n\n const fileName = `${name}.ts`;\n const filePath = path.join(seederPath, fileName);\n\n if (fs.existsSync(filePath)) {\n throw new Error(`Seeder already exists: ${filePath}`);\n }\n\n const stub = this.getStub(name);\n fs.writeFileSync(filePath, stub);\n\n return filePath;\n }\n\n /**\n * Get the seeder stub\n */\n protected getStub(name: string): string {\n return `import { Seeder } from '@orchestr-sh/orchestr';\n\nexport default class ${name} extends Seeder {\n /**\n * Run the database seeds\n */\n async run(): Promise<void> {\n // Example: Insert data into database\n // await this.connection?.table('users').insert({\n // name: 'John Doe',\n // email: 'john@example.com',\n // });\n }\n}\n`;\n }\n}\n"],"mappings":"qFAWA,IAAa,EAAb,cAAuC,CAAQ,CAIvB,IAHtB,UAAY,qBACZ,YAAc,4BAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAO,EAAK,GAElB,GAAI,CAAC,EAAM,CACT,KAAK,MAAM,2BAA2B,CACtC,KAAK,KAAK,4BAA4B,CACtC,OAGF,IAAM,EAAa,EAAQ,MAAQ,qBAEnC,GAAI,CACF,IAAM,EAAW,MAAM,KAAK,aAAa,EAAM,EAAW,CAE1D,KAAK,KAAK,gCAAgC,IAAW,OAC9C,EAAO,CAEd,MADA,KAAK,MAAM,4BAA6B,EAAgB,UAAU,CAC5D,GAOV,MAAgB,aAAa,EAAc,EAAqC,CAEzE,EAAG,WAAW,EAAW,EAC5B,EAAG,UAAU,EAAY,CAAE,UAAW,GAAM,CAAC,CAG/C,IAAM,EAAW,GAAG,EAAK,KACnB,EAAW,EAAK,KAAK,EAAY,EAAS,CAEhD,GAAI,EAAG,WAAW,EAAS,CACzB,MAAU,MAAM,0BAA0B,IAAW,CAGvD,IAAM,EAAO,KAAK,QAAQ,EAAK,CAG/B,OAFA,EAAG,cAAc,EAAU,EAAK,CAEzB,EAMT,QAAkB,EAAsB,CACtC,MAAO;;uBAEY,EAAK"}
@@ -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=`make:view <name>`;description=`Create a new view file`;constructor(e){super(),this.app=e}async handle(e,t){let i=e[0];if(!i){this.error(`View name is required.`),this.line(`Usage: make:view <name>`);return}let a=this.getViewsPath(t),o=i.replace(/\./g,`/`)+(t.ext||`.html`),s=r.join(a,o),c=r.dirname(s);if(await this.fileExists(s)){this.error(`View already exists: ${s}`);return}await n.mkdir(c,{recursive:!0});let l=i.split(`.`).pop().replace(/-/g,` `).replace(/\b\w/g,e=>e.toUpperCase()),u=this.getStub(l);await n.writeFile(s,u),this.info(`View created successfully: ${s}`),this.newLine(),this.comment(`Render it in a route:`),this.comment(` return view('${i}', { title: '${l}' });`)}getViewsPath(e){if(e.path)return e.path;try{let e=this.app.make(`view`).getPaths?.()??[];if(e.length>0)return e[0]}catch{}return r.join(this.app.getBasePath(),`resources`,`views`)}async fileExists(e){try{return await n.access(e),!0}catch{return!1}}getStub(e){return`<!DOCTYPE html>
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=`make:view <name>`;description=`Create a new view file`;constructor(e){super(),this.app=e}async handle(e,t){let i=e[0];if(!i){this.error(`View name is required.`),this.line(`Usage: make:view <name>`);return}let a=this.getViewsPath(t),o=i.replace(/\./g,`/`)+(t.ext||`.html`),s=r.join(a,o),c=r.dirname(s);if(await this.fileExists(s)){this.error(`View already exists: ${s}`);return}await n.mkdir(c,{recursive:!0});let l=i.split(`.`).pop().replace(/-/g,` `).replace(/\b\w/g,e=>e.toUpperCase()),u=this.getStub(l);await n.writeFile(s,u),this.info(`View created successfully: ${s}`),this.newLine(),this.comment(`Render it in a route:`),this.comment(` return view('${i}', { title: '${l}' });`)}getViewsPath(e){if(e.path)return e.path;try{let e=this.app.make(`view`).getPaths?.()??[];if(e.length>0)return e[0]}catch{}return r.join(this.app.getBasePath(),`resources`,`views`)}async fileExists(e){try{return await n.access(e),!0}catch{return!1}}getStub(e){return`<!DOCTYPE html>
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="UTF-8">
@@ -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=`make:view <name>`;description=`Create a new view file`;constructor(e){super(),this.app=e}async handle(e,r){let i=e[0];if(!i){this.error(`View name is required.`),this.line(`Usage: make:view <name>`);return}let a=this.getViewsPath(r),o=i.replace(/\./g,`/`)+(r.ext||`.html`),s=n.join(a,o),c=n.dirname(s);if(await this.fileExists(s)){this.error(`View already exists: ${s}`);return}await t.mkdir(c,{recursive:!0});let l=i.split(`.`).pop().replace(/-/g,` `).replace(/\b\w/g,e=>e.toUpperCase()),u=this.getStub(l);await t.writeFile(s,u),this.info(`View created successfully: ${s}`),this.newLine(),this.comment(`Render it in a route:`),this.comment(` return view('${i}', { title: '${l}' });`)}getViewsPath(e){if(e.path)return e.path;try{let e=this.app.make(`view`).getPaths?.()??[];if(e.length>0)return e[0]}catch{}return n.join(this.app.getBasePath(),`resources`,`views`)}async fileExists(e){try{return await t.access(e),!0}catch{return!1}}getStub(e){return`<!DOCTYPE html>
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=`make:view <name>`;description=`Create a new view file`;constructor(e){super(),this.app=e}async handle(e,r){let i=e[0];if(!i){this.error(`View name is required.`),this.line(`Usage: make:view <name>`);return}let a=this.getViewsPath(r),o=i.replace(/\./g,`/`)+(r.ext||`.html`),s=n.join(a,o),c=n.dirname(s);if(await this.fileExists(s)){this.error(`View already exists: ${s}`);return}await t.mkdir(c,{recursive:!0});let l=i.split(`.`).pop().replace(/-/g,` `).replace(/\b\w/g,e=>e.toUpperCase()),u=this.getStub(l);await t.writeFile(s,u),this.info(`View created successfully: ${s}`),this.newLine(),this.comment(`Render it in a route:`),this.comment(` return view('${i}', { title: '${l}' });`)}getViewsPath(e){if(e.path)return e.path;try{let e=this.app.make(`view`).getPaths?.()??[];if(e.length>0)return e[0]}catch{}return n.join(this.app.getBasePath(),`resources`,`views`)}async fileExists(e){try{return await t.access(e),!0}catch{return!1}}getStub(e){return`<!DOCTYPE html>
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="UTF-8">
@@ -1 +1 @@
1
- {"version":3,"file":"MakeViewCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeViewCommand.ts"],"sourcesContent":["/**\n * MakeViewCommand\n *\n * Create a new view file.\n * Mirrors Laravel's `php artisan make:view`.\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 MakeViewCommand extends Command {\n signature = 'make:view <name>';\n description = 'Create a new view file';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('View name is required.');\n this.line('Usage: make:view <name>');\n return;\n }\n\n const viewsPath = this.getViewsPath(options);\n\n // Convert dot-notation to directory path: 'layouts.app' -> 'layouts/app'\n const relativePath = name.replace(/\\./g, '/');\n const ext = (options.ext as string) || '.html';\n const fileName = relativePath + ext;\n const filePath = path.join(viewsPath, fileName);\n const dirPath = path.dirname(filePath);\n\n // Check if file already exists\n if (await this.fileExists(filePath)) {\n this.error(`View already exists: ${filePath}`);\n return;\n }\n\n // Create directory if it doesn't exist\n await fs.mkdir(dirPath, { recursive: true });\n\n // Determine the view name for the title\n const viewTitle = name\n .split('.')\n .pop()!\n .replace(/-/g, ' ')\n .replace(/\\b\\w/g, (c) => c.toUpperCase());\n\n // Generate file content\n const content = this.getStub(viewTitle);\n\n // Write file\n await fs.writeFile(filePath, content);\n\n this.info(`View created successfully: ${filePath}`);\n this.newLine();\n this.comment('Render it in a route:');\n this.comment(` return view('${name}', { title: '${viewTitle}' });`);\n }\n\n protected getViewsPath(options: CommandOptions): string {\n if (options.path) {\n return options.path as string;\n }\n\n // Resolve from ViewFactory if available\n try {\n const factory = this.app.make('view') as any;\n const paths: string[] = factory.getPaths?.() ?? [];\n if (paths.length > 0) {\n return paths[0];\n }\n } catch {\n // ViewFactory not registered yet\n }\n\n return path.join(this.app.getBasePath(), 'resources', 'views');\n }\n\n protected async fileExists(filePath: string): Promise<boolean> {\n try {\n await fs.access(filePath);\n return true;\n } catch {\n return false;\n }\n }\n\n protected getStub(title: string): string {\n return `<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>{{ title }}</title>\n</head>\n<body>\n <h1>{{ title }}</h1>\n</body>\n</html>\n`;\n }\n}\n"],"mappings":"8FAYA,IAAa,EAAb,cAAqC,CAAQ,CAC3C,UAAY,mBACZ,YAAc,yBAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAO,EAAK,GAElB,GAAI,CAAC,EAAM,CACT,KAAK,MAAM,yBAAyB,CACpC,KAAK,KAAK,0BAA0B,CACpC,OAGF,IAAM,EAAY,KAAK,aAAa,EAAQ,CAKtC,EAFe,EAAK,QAAQ,MAAO,IAAI,EAChC,EAAQ,KAAkB,SAEjC,EAAW,EAAK,KAAK,EAAW,EAAS,CACzC,EAAU,EAAK,QAAQ,EAAS,CAGtC,GAAI,MAAM,KAAK,WAAW,EAAS,CAAE,CACnC,KAAK,MAAM,wBAAwB,IAAW,CAC9C,OAIF,MAAM,EAAG,MAAM,EAAS,CAAE,UAAW,GAAM,CAAC,CAG5C,IAAM,EAAY,EACf,MAAM,IAAI,CACV,KAAK,CACL,QAAQ,KAAM,IAAI,CAClB,QAAQ,QAAU,GAAM,EAAE,aAAa,CAAC,CAGrC,EAAU,KAAK,QAAQ,EAAU,CAGvC,MAAM,EAAG,UAAU,EAAU,EAAQ,CAErC,KAAK,KAAK,8BAA8B,IAAW,CACnD,KAAK,SAAS,CACd,KAAK,QAAQ,wBAAwB,CACrC,KAAK,QAAQ,kBAAkB,EAAK,eAAe,EAAU,OAAO,CAGtE,aAAuB,EAAiC,CACtD,GAAI,EAAQ,KACV,OAAO,EAAQ,KAIjB,GAAI,CAEF,IAAM,EADU,KAAK,IAAI,KAAK,OAAO,CACL,YAAY,EAAI,EAAE,CAClD,GAAI,EAAM,OAAS,EACjB,OAAO,EAAM,QAET,EAIR,OAAO,EAAK,KAAK,KAAK,IAAI,aAAa,CAAE,YAAa,QAAQ,CAGhE,MAAgB,WAAW,EAAoC,CAC7D,GAAI,CAEF,OADA,MAAM,EAAG,OAAO,EAAS,CAClB,QACD,CACN,MAAO,IAIX,QAAkB,EAAuB,CACvC,MAAO"}
1
+ {"version":3,"file":"MakeViewCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeViewCommand.ts"],"sourcesContent":["/**\n * MakeViewCommand\n *\n * Create a new view file.\n * Mirrors Laravel's `php artisan make:view`.\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 MakeViewCommand extends Command {\n signature = 'make:view <name>';\n description = 'Create a new view file';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('View name is required.');\n this.line('Usage: make:view <name>');\n return;\n }\n\n const viewsPath = this.getViewsPath(options);\n\n // Convert dot-notation to directory path: 'layouts.app' -> 'layouts/app'\n const relativePath = name.replace(/\\./g, '/');\n const ext = (options.ext as string) || '.html';\n const fileName = relativePath + ext;\n const filePath = path.join(viewsPath, fileName);\n const dirPath = path.dirname(filePath);\n\n // Check if file already exists\n if (await this.fileExists(filePath)) {\n this.error(`View already exists: ${filePath}`);\n return;\n }\n\n // Create directory if it doesn't exist\n await fs.mkdir(dirPath, { recursive: true });\n\n // Determine the view name for the title\n const viewTitle = name\n .split('.')\n .pop()!\n .replace(/-/g, ' ')\n .replace(/\\b\\w/g, (c) => c.toUpperCase());\n\n // Generate file content\n const content = this.getStub(viewTitle);\n\n // Write file\n await fs.writeFile(filePath, content);\n\n this.info(`View created successfully: ${filePath}`);\n this.newLine();\n this.comment('Render it in a route:');\n this.comment(` return view('${name}', { title: '${viewTitle}' });`);\n }\n\n protected getViewsPath(options: CommandOptions): string {\n if (options.path) {\n return options.path as string;\n }\n\n // Resolve from ViewFactory if available\n try {\n const factory = this.app.make('view') as any;\n const paths: string[] = factory.getPaths?.() ?? [];\n if (paths.length > 0) {\n return paths[0];\n }\n } catch {\n // ViewFactory not registered yet\n }\n\n return path.join(this.app.getBasePath(), 'resources', 'views');\n }\n\n protected async fileExists(filePath: string): Promise<boolean> {\n try {\n await fs.access(filePath);\n return true;\n } catch {\n return false;\n }\n }\n\n protected getStub(title: string): string {\n return `<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>{{ title }}</title>\n</head>\n<body>\n <h1>{{ title }}</h1>\n</body>\n</html>\n`;\n }\n}\n"],"mappings":"8FAYA,IAAa,EAAb,cAAqC,CAAQ,CAIrB,IAHtB,UAAY,mBACZ,YAAc,yBAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAO,EAAK,GAElB,GAAI,CAAC,EAAM,CACT,KAAK,MAAM,yBAAyB,CACpC,KAAK,KAAK,0BAA0B,CACpC,OAGF,IAAM,EAAY,KAAK,aAAa,EAAQ,CAKtC,EAFe,EAAK,QAAQ,MAAO,IAEZ,EADhB,EAAQ,KAAkB,SAEjC,EAAW,EAAK,KAAK,EAAW,EAAS,CACzC,EAAU,EAAK,QAAQ,EAAS,CAGtC,GAAI,MAAM,KAAK,WAAW,EAAS,CAAE,CACnC,KAAK,MAAM,wBAAwB,IAAW,CAC9C,OAIF,MAAM,EAAG,MAAM,EAAS,CAAE,UAAW,GAAM,CAAC,CAG5C,IAAM,EAAY,EACf,MAAM,IAAI,CACV,KAAK,CACL,QAAQ,KAAM,IAAI,CAClB,QAAQ,QAAU,GAAM,EAAE,aAAa,CAAC,CAGrC,EAAU,KAAK,QAAQ,EAAU,CAGvC,MAAM,EAAG,UAAU,EAAU,EAAQ,CAErC,KAAK,KAAK,8BAA8B,IAAW,CACnD,KAAK,SAAS,CACd,KAAK,QAAQ,wBAAwB,CACrC,KAAK,QAAQ,kBAAkB,EAAK,eAAe,EAAU,OAAO,CAGtE,aAAuB,EAAiC,CACtD,GAAI,EAAQ,KACV,OAAO,EAAQ,KAIjB,GAAI,CAEF,IAAM,EADU,KAAK,IAAI,KAAK,OACC,CAAC,YAAY,EAAI,EAAE,CAClD,GAAI,EAAM,OAAS,EACjB,OAAO,EAAM,QAET,EAIR,OAAO,EAAK,KAAK,KAAK,IAAI,aAAa,CAAE,YAAa,QAAQ,CAGhE,MAAgB,WAAW,EAAoC,CAC7D,GAAI,CAEF,OADA,MAAM,EAAG,OAAO,EAAS,CAClB,QACD,CACN,MAAO,IAIX,QAAkB,EAAuB,CACvC,MAAO"}
@@ -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`;description=`Run the 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(`Running migrations...`),this.newLine();try{let e=await a.run({pretend:n.pretend===!0});if(e.length===0){this.comment(`Nothing to migrate.`);return}e.forEach(e=>{this.info(`Migrated: ${e}`)}),this.newLine(),this.info(`Migration completed successfully.`)}catch(e){throw this.error(`Migration failed: ${e.message}`),e}}};exports.MigrateCommand=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`;description=`Run the 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(`Running migrations...`),this.newLine();try{let e=await a.run({pretend:n.pretend===!0});if(e.length===0){this.comment(`Nothing to migrate.`);return}e.forEach(e=>{this.info(`Migrated: ${e}`)}),this.newLine(),this.info(`Migration completed successfully.`)}catch(e){throw this.error(`Migration failed: ${e.message}`),e}}};exports.MigrateCommand=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`;description=`Run the 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(`Running migrations...`),this.newLine();try{let e=await a.run({pretend:n.pretend===!0});if(e.length===0){this.comment(`Nothing to migrate.`);return}e.forEach(e=>{this.info(`Migrated: ${e}`)}),this.newLine(),this.info(`Migration completed successfully.`)}catch(e){throw this.error(`Migration failed: ${e.message}`),e}}};export{n as MigrateCommand};
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`;description=`Run the 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(`Running migrations...`),this.newLine();try{let e=await a.run({pretend:n.pretend===!0});if(e.length===0){this.comment(`Nothing to migrate.`);return}e.forEach(e=>{this.info(`Migrated: ${e}`)}),this.newLine(),this.info(`Migration completed successfully.`)}catch(e){throw this.error(`Migration failed: ${e.message}`),e}}};export{n as MigrateCommand};
2
2
  //# sourceMappingURL=MigrateCommand.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"MigrateCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MigrateCommand.ts"],"sourcesContent":["/**\n * MigrateCommand\n *\n * Run the database migrations\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Migrator } from '@/Database/Migrations/Migrator';\nimport { Application } from '@/Foundation/Application';\n\nexport class MigrateCommand extends Command {\n signature = 'migrate';\n description = 'Run the 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('Running migrations...');\n this.newLine();\n\n try {\n const ran = await migrator.run({\n pretend: options.pretend === true,\n });\n\n if (ran.length === 0) {\n this.comment('Nothing to migrate.');\n return;\n }\n\n ran.forEach((migration) => {\n this.info(`Migrated: ${migration}`);\n });\n\n this.newLine();\n this.info(`Migration completed successfully.`);\n } catch (error) {\n this.error(`Migration failed: ${(error as Error).message}`);\n throw error;\n }\n }\n}\n"],"mappings":"2GAUA,IAAa,EAAb,cAAoC,CAAQ,CAC1C,UAAY,UACZ,YAAc,8BAEd,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,EAAM,MAAM,EAAS,IAAI,CAC7B,QAAS,EAAQ,UAAY,GAC9B,CAAC,CAEF,GAAI,EAAI,SAAW,EAAG,CACpB,KAAK,QAAQ,sBAAsB,CACnC,OAGF,EAAI,QAAS,GAAc,CACzB,KAAK,KAAK,aAAa,IAAY,EACnC,CAEF,KAAK,SAAS,CACd,KAAK,KAAK,oCAAoC,OACvC,EAAO,CAEd,MADA,KAAK,MAAM,qBAAsB,EAAgB,UAAU,CACrD"}
1
+ {"version":3,"file":"MigrateCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MigrateCommand.ts"],"sourcesContent":["/**\n * MigrateCommand\n *\n * Run the database migrations\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Migrator } from '@/Database/Migrations/Migrator';\nimport { Application } from '@/Foundation/Application';\n\nexport class MigrateCommand extends Command {\n signature = 'migrate';\n description = 'Run the 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('Running migrations...');\n this.newLine();\n\n try {\n const ran = await migrator.run({\n pretend: options.pretend === true,\n });\n\n if (ran.length === 0) {\n this.comment('Nothing to migrate.');\n return;\n }\n\n ran.forEach((migration) => {\n this.info(`Migrated: ${migration}`);\n });\n\n this.newLine();\n this.info(`Migration completed successfully.`);\n } catch (error) {\n this.error(`Migration failed: ${(error as Error).message}`);\n throw error;\n }\n }\n}\n"],"mappings":"2GAUA,IAAa,EAAb,cAAoC,CAAQ,CAIpB,IAHtB,UAAY,UACZ,YAAc,8BAEd,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,EAAM,MAAM,EAAS,IAAI,CAC7B,QAAS,EAAQ,UAAY,GAC9B,CAAC,CAEF,GAAI,EAAI,SAAW,EAAG,CACpB,KAAK,QAAQ,sBAAsB,CACnC,OAGF,EAAI,QAAS,GAAc,CACzB,KAAK,KAAK,aAAa,IAAY,EACnC,CAEF,KAAK,SAAS,CACd,KAAK,KAAK,oCAAoC,OACvC,EAAO,CAEd,MADA,KAAK,MAAM,qBAAsB,EAAgB,UAAU,CACrD"}
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../Database/Migrations/SchemaBuilder.cjs`),t=require(`../../Database/Migrations/Migrator.cjs`),n=require(`../Command.cjs`);var r=class extends n.Command{signature=`migrate:fresh`;description=`Drop all tables and re-run all migrations`;constructor(e){super(),this.app=e}async handle(n,r){let i=this.app.make(`db`).connection(),a=r.path||this.app.databasePath(`migrations`),o=Array.isArray(a)?a:[a];new e.SchemaBuilder(i);let s=new t.Migrator(i,o);this.warn(`This command will drop all tables. Are you sure you want to continue?`),this.newLine();try{this.info(`Dropping all tables...`),await s.dropAllTables(),this.newLine(),this.info(`Running migrations...`),this.newLine();let e=await s.run();e.length>0&&(e.forEach(e=>{this.info(`Migrated: ${e}`)}),this.newLine()),this.info(`Database fresh completed successfully.`)}catch(e){throw this.error(`Fresh migration failed: ${e.message}`),e}}};exports.MigrateFreshCommand=r;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../Database/Migrations/SchemaBuilder.cjs`),t=require(`../../Database/Migrations/Migrator.cjs`),n=require(`../Command.cjs`);var r=class extends n.Command{app;signature=`migrate:fresh`;description=`Drop all tables and re-run all migrations`;constructor(e){super(),this.app=e}async handle(n,r){let i=this.app.make(`db`).connection(),a=r.path||this.app.databasePath(`migrations`),o=Array.isArray(a)?a:[a];new e.SchemaBuilder(i);let s=new t.Migrator(i,o);this.warn(`This command will drop all tables. Are you sure you want to continue?`),this.newLine();try{this.info(`Dropping all tables...`),await s.dropAllTables(),this.newLine(),this.info(`Running migrations...`),this.newLine();let e=await s.run();e.length>0&&(e.forEach(e=>{this.info(`Migrated: ${e}`)}),this.newLine()),this.info(`Database fresh completed successfully.`)}catch(e){throw this.error(`Fresh migration failed: ${e.message}`),e}}};exports.MigrateFreshCommand=r;
@@ -1,2 +1,2 @@
1
- import{SchemaBuilder as e}from"../../Database/Migrations/SchemaBuilder.mjs";import{Migrator as t}from"../../Database/Migrations/Migrator.mjs";import{Command as n}from"../Command.mjs";var r=class extends n{signature=`migrate:fresh`;description=`Drop all tables and re-run all migrations`;constructor(e){super(),this.app=e}async handle(n,r){let i=this.app.make(`db`).connection(),a=r.path||this.app.databasePath(`migrations`),o=Array.isArray(a)?a:[a];new e(i);let s=new t(i,o);this.warn(`This command will drop all tables. Are you sure you want to continue?`),this.newLine();try{this.info(`Dropping all tables...`),await s.dropAllTables(),this.newLine(),this.info(`Running migrations...`),this.newLine();let e=await s.run();e.length>0&&(e.forEach(e=>{this.info(`Migrated: ${e}`)}),this.newLine()),this.info(`Database fresh completed successfully.`)}catch(e){throw this.error(`Fresh migration failed: ${e.message}`),e}}};export{r as MigrateFreshCommand};
1
+ import{SchemaBuilder as e}from"../../Database/Migrations/SchemaBuilder.mjs";import{Migrator as t}from"../../Database/Migrations/Migrator.mjs";import{Command as n}from"../Command.mjs";var r=class extends n{app;signature=`migrate:fresh`;description=`Drop all tables and re-run all migrations`;constructor(e){super(),this.app=e}async handle(n,r){let i=this.app.make(`db`).connection(),a=r.path||this.app.databasePath(`migrations`),o=Array.isArray(a)?a:[a];new e(i);let s=new t(i,o);this.warn(`This command will drop all tables. Are you sure you want to continue?`),this.newLine();try{this.info(`Dropping all tables...`),await s.dropAllTables(),this.newLine(),this.info(`Running migrations...`),this.newLine();let e=await s.run();e.length>0&&(e.forEach(e=>{this.info(`Migrated: ${e}`)}),this.newLine()),this.info(`Database fresh completed successfully.`)}catch(e){throw this.error(`Fresh migration failed: ${e.message}`),e}}};export{r as MigrateFreshCommand};
2
2
  //# sourceMappingURL=MigrateFreshCommand.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"MigrateFreshCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MigrateFreshCommand.ts"],"sourcesContent":["/**\n * MigrateFreshCommand\n *\n * Drop all tables and re-run all migrations\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Migrator } from '@/Database/Migrations/Migrator';\nimport { SchemaBuilder } from '@/Database/Migrations/SchemaBuilder';\nimport { Application } from '@/Foundation/Application';\n\nexport class MigrateFreshCommand extends Command {\n signature = 'migrate:fresh';\n description = 'Drop all tables 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 schema = new SchemaBuilder(connection);\n const migrator = new Migrator(connection, paths);\n\n this.warn('This command will drop all tables. Are you sure you want to continue?');\n this.newLine();\n\n try {\n // Drop all tables (including the migrations tracking table itself)\n this.info('Dropping all tables...');\n await migrator.dropAllTables();\n this.newLine();\n\n // Re-run all migrations\n this.info('Running migrations...');\n this.newLine();\n\n const ran = await migrator.run();\n\n if (ran.length > 0) {\n ran.forEach((migration) => {\n this.info(`Migrated: ${migration}`);\n });\n this.newLine();\n }\n\n this.info(`Database fresh completed successfully.`);\n } catch (error) {\n this.error(`Fresh migration failed: ${(error as Error).message}`);\n throw error;\n }\n }\n}\n"],"mappings":"uLAWA,IAAa,EAAb,cAAyC,CAAQ,CAC/C,UAAY,gBACZ,YAAc,4CAEd,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,CACnE,EAAQ,MAAM,QAAQ,EAAc,CAAG,EAAgB,CAAC,EAAc,CAE7D,IAAI,EAAc,EAAW,CAC5C,IAAM,EAAW,IAAI,EAAS,EAAY,EAAM,CAEhD,KAAK,KAAK,wEAAwE,CAClF,KAAK,SAAS,CAEd,GAAI,CAEF,KAAK,KAAK,yBAAyB,CACnC,MAAM,EAAS,eAAe,CAC9B,KAAK,SAAS,CAGd,KAAK,KAAK,wBAAwB,CAClC,KAAK,SAAS,CAEd,IAAM,EAAM,MAAM,EAAS,KAAK,CAE5B,EAAI,OAAS,IACf,EAAI,QAAS,GAAc,CACzB,KAAK,KAAK,aAAa,IAAY,EACnC,CACF,KAAK,SAAS,EAGhB,KAAK,KAAK,yCAAyC,OAC5C,EAAO,CAEd,MADA,KAAK,MAAM,2BAA4B,EAAgB,UAAU,CAC3D"}
1
+ {"version":3,"file":"MigrateFreshCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MigrateFreshCommand.ts"],"sourcesContent":["/**\n * MigrateFreshCommand\n *\n * Drop all tables and re-run all migrations\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Migrator } from '@/Database/Migrations/Migrator';\nimport { SchemaBuilder } from '@/Database/Migrations/SchemaBuilder';\nimport { Application } from '@/Foundation/Application';\n\nexport class MigrateFreshCommand extends Command {\n signature = 'migrate:fresh';\n description = 'Drop all tables 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 schema = new SchemaBuilder(connection);\n const migrator = new Migrator(connection, paths);\n\n this.warn('This command will drop all tables. Are you sure you want to continue?');\n this.newLine();\n\n try {\n // Drop all tables (including the migrations tracking table itself)\n this.info('Dropping all tables...');\n await migrator.dropAllTables();\n this.newLine();\n\n // Re-run all migrations\n this.info('Running migrations...');\n this.newLine();\n\n const ran = await migrator.run();\n\n if (ran.length > 0) {\n ran.forEach((migration) => {\n this.info(`Migrated: ${migration}`);\n });\n this.newLine();\n }\n\n this.info(`Database fresh completed successfully.`);\n } catch (error) {\n this.error(`Fresh migration failed: ${(error as Error).message}`);\n throw error;\n }\n }\n}\n"],"mappings":"uLAWA,IAAa,EAAb,cAAyC,CAAQ,CAIzB,IAHtB,UAAY,gBACZ,YAAc,4CAEd,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,CACnE,EAAQ,MAAM,QAAQ,EAAc,CAAG,EAAgB,CAAC,EAAc,CAE7D,IAAI,EAAc,EAAW,CAC5C,IAAM,EAAW,IAAI,EAAS,EAAY,EAAM,CAEhD,KAAK,KAAK,wEAAwE,CAClF,KAAK,SAAS,CAEd,GAAI,CAEF,KAAK,KAAK,yBAAyB,CACnC,MAAM,EAAS,eAAe,CAC9B,KAAK,SAAS,CAGd,KAAK,KAAK,wBAAwB,CAClC,KAAK,SAAS,CAEd,IAAM,EAAM,MAAM,EAAS,KAAK,CAE5B,EAAI,OAAS,IACf,EAAI,QAAS,GAAc,CACzB,KAAK,KAAK,aAAa,IAAY,EACnC,CACF,KAAK,SAAS,EAGhB,KAAK,KAAK,yCAAyC,OAC5C,EAAO,CAEd,MADA,KAAK,MAAM,2BAA4B,EAAgB,UAAU,CAC3D"}
@@ -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: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.Migrator(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}}};exports.MigrateRefreshCommand=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: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.Migrator(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}}};exports.MigrateRefreshCommand=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: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