@orchestr-sh/orchestr 1.11.0 → 1.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (340) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/CODE_OF_CONDUCT.md +43 -0
  3. package/CONTRIBUTING.md +274 -0
  4. package/dist/Cache/CacheManager.cjs +1 -1
  5. package/dist/Cache/CacheManager.mjs +1 -1
  6. package/dist/Cache/CacheManager.mjs.map +1 -1
  7. package/dist/Cache/Events/CacheFlushed.cjs +1 -1
  8. package/dist/Cache/Events/CacheFlushed.mjs +1 -1
  9. package/dist/Cache/Events/CacheFlushed.mjs.map +1 -1
  10. package/dist/Cache/Events/CacheHit.cjs +1 -1
  11. package/dist/Cache/Events/CacheHit.mjs +1 -1
  12. package/dist/Cache/Events/CacheHit.mjs.map +1 -1
  13. package/dist/Cache/Events/CacheMissed.cjs +1 -1
  14. package/dist/Cache/Events/CacheMissed.mjs +1 -1
  15. package/dist/Cache/Events/CacheMissed.mjs.map +1 -1
  16. package/dist/Cache/Events/KeyForgotten.cjs +1 -1
  17. package/dist/Cache/Events/KeyForgotten.mjs +1 -1
  18. package/dist/Cache/Events/KeyForgotten.mjs.map +1 -1
  19. package/dist/Cache/Events/KeyWritten.cjs +1 -1
  20. package/dist/Cache/Events/KeyWritten.mjs +1 -1
  21. package/dist/Cache/Events/KeyWritten.mjs.map +1 -1
  22. package/dist/Cache/Locks/CacheLock.cjs +1 -1
  23. package/dist/Cache/Locks/CacheLock.mjs +1 -1
  24. package/dist/Cache/Locks/CacheLock.mjs.map +1 -1
  25. package/dist/Cache/Locks/Lock.cjs +1 -1
  26. package/dist/Cache/Locks/Lock.mjs +1 -1
  27. package/dist/Cache/Locks/Lock.mjs.map +1 -1
  28. package/dist/Cache/Repository.cjs +1 -1
  29. package/dist/Cache/Repository.mjs +1 -1
  30. package/dist/Cache/Repository.mjs.map +1 -1
  31. package/dist/Cache/Stores/ArrayStore.cjs +1 -1
  32. package/dist/Cache/Stores/ArrayStore.mjs +1 -1
  33. package/dist/Cache/Stores/ArrayStore.mjs.map +1 -1
  34. package/dist/Cache/Stores/DatabaseStore.cjs +1 -1
  35. package/dist/Cache/Stores/DatabaseStore.mjs +1 -1
  36. package/dist/Cache/Stores/DatabaseStore.mjs.map +1 -1
  37. package/dist/Cache/Stores/FileStore.cjs +1 -1
  38. package/dist/Cache/Stores/FileStore.mjs +1 -1
  39. package/dist/Cache/Stores/FileStore.mjs.map +1 -1
  40. package/dist/Cache/Tags/TagSet.cjs +1 -1
  41. package/dist/Cache/Tags/TagSet.mjs +1 -1
  42. package/dist/Cache/Tags/TagSet.mjs.map +1 -1
  43. package/dist/Cache/Tags/TaggedCache.cjs +1 -1
  44. package/dist/Cache/Tags/TaggedCache.mjs +1 -1
  45. package/dist/Cache/Tags/TaggedCache.mjs.map +1 -1
  46. package/dist/Console/Commands/CacheClearCommand.cjs +1 -1
  47. package/dist/Console/Commands/CacheClearCommand.mjs +1 -1
  48. package/dist/Console/Commands/CacheClearCommand.mjs.map +1 -1
  49. package/dist/Console/Commands/CacheForgetCommand.cjs +1 -1
  50. package/dist/Console/Commands/CacheForgetCommand.mjs +1 -1
  51. package/dist/Console/Commands/CacheForgetCommand.mjs.map +1 -1
  52. package/dist/Console/Commands/CacheTableCommand.cjs +1 -1
  53. package/dist/Console/Commands/CacheTableCommand.mjs +1 -1
  54. package/dist/Console/Commands/CacheTableCommand.mjs.map +1 -1
  55. package/dist/Console/Commands/DeployCommand.mjs.map +1 -1
  56. package/dist/Console/Commands/DeployEnvCommand.mjs.map +1 -1
  57. package/dist/Console/Commands/DeployInitCommand.mjs.map +1 -1
  58. package/dist/Console/Commands/DeployProvisionCommand.mjs.map +1 -1
  59. package/dist/Console/Commands/DeployRollbackCommand.mjs.map +1 -1
  60. package/dist/Console/Commands/DeployServerCommand.mjs.map +1 -1
  61. package/dist/Console/Commands/DeployStatusCommand.mjs.map +1 -1
  62. package/dist/Console/Commands/EventCacheCommand.cjs +1 -1
  63. package/dist/Console/Commands/EventCacheCommand.mjs +1 -1
  64. package/dist/Console/Commands/EventCacheCommand.mjs.map +1 -1
  65. package/dist/Console/Commands/EventClearCommand.cjs +1 -1
  66. package/dist/Console/Commands/EventClearCommand.mjs +1 -1
  67. package/dist/Console/Commands/EventClearCommand.mjs.map +1 -1
  68. package/dist/Console/Commands/EventListCommand.cjs +1 -1
  69. package/dist/Console/Commands/EventListCommand.mjs +1 -1
  70. package/dist/Console/Commands/EventListCommand.mjs.map +1 -1
  71. package/dist/Console/Commands/MakeControllerCommand.cjs +1 -1
  72. package/dist/Console/Commands/MakeControllerCommand.mjs +1 -1
  73. package/dist/Console/Commands/MakeControllerCommand.mjs.map +1 -1
  74. package/dist/Console/Commands/MakeEventCommand.cjs +1 -1
  75. package/dist/Console/Commands/MakeEventCommand.mjs +1 -1
  76. package/dist/Console/Commands/MakeEventCommand.mjs.map +1 -1
  77. package/dist/Console/Commands/MakeJobCommand.cjs +1 -1
  78. package/dist/Console/Commands/MakeJobCommand.mjs +1 -1
  79. package/dist/Console/Commands/MakeJobCommand.mjs.map +1 -1
  80. package/dist/Console/Commands/MakeListenerCommand.cjs +1 -1
  81. package/dist/Console/Commands/MakeListenerCommand.mjs +1 -1
  82. package/dist/Console/Commands/MakeListenerCommand.mjs.map +1 -1
  83. package/dist/Console/Commands/MakeMigrationCommand.cjs +1 -1
  84. package/dist/Console/Commands/MakeMigrationCommand.mjs +1 -1
  85. package/dist/Console/Commands/MakeMigrationCommand.mjs.map +1 -1
  86. package/dist/Console/Commands/MakeSeederCommand.cjs +1 -1
  87. package/dist/Console/Commands/MakeSeederCommand.mjs +1 -1
  88. package/dist/Console/Commands/MakeSeederCommand.mjs.map +1 -1
  89. package/dist/Console/Commands/MakeViewCommand.cjs +1 -1
  90. package/dist/Console/Commands/MakeViewCommand.mjs +1 -1
  91. package/dist/Console/Commands/MakeViewCommand.mjs.map +1 -1
  92. package/dist/Console/Commands/MigrateCommand.cjs +1 -1
  93. package/dist/Console/Commands/MigrateCommand.mjs +1 -1
  94. package/dist/Console/Commands/MigrateCommand.mjs.map +1 -1
  95. package/dist/Console/Commands/MigrateFreshCommand.cjs +1 -1
  96. package/dist/Console/Commands/MigrateFreshCommand.mjs +1 -1
  97. package/dist/Console/Commands/MigrateFreshCommand.mjs.map +1 -1
  98. package/dist/Console/Commands/MigrateRefreshCommand.cjs +1 -1
  99. package/dist/Console/Commands/MigrateRefreshCommand.mjs +1 -1
  100. package/dist/Console/Commands/MigrateRefreshCommand.mjs.map +1 -1
  101. package/dist/Console/Commands/MigrateResetCommand.cjs +1 -1
  102. package/dist/Console/Commands/MigrateResetCommand.mjs +1 -1
  103. package/dist/Console/Commands/MigrateResetCommand.mjs.map +1 -1
  104. package/dist/Console/Commands/MigrateRollbackCommand.cjs +1 -1
  105. package/dist/Console/Commands/MigrateRollbackCommand.mjs +1 -1
  106. package/dist/Console/Commands/MigrateRollbackCommand.mjs.map +1 -1
  107. package/dist/Console/Commands/MigrateStatusCommand.cjs +1 -1
  108. package/dist/Console/Commands/MigrateStatusCommand.mjs +1 -1
  109. package/dist/Console/Commands/MigrateStatusCommand.mjs.map +1 -1
  110. package/dist/Console/Commands/QueueBatchesTableCommand.cjs +1 -1
  111. package/dist/Console/Commands/QueueBatchesTableCommand.mjs +1 -1
  112. package/dist/Console/Commands/QueueBatchesTableCommand.mjs.map +1 -1
  113. package/dist/Console/Commands/QueueClearCommand.cjs +1 -1
  114. package/dist/Console/Commands/QueueClearCommand.mjs +1 -1
  115. package/dist/Console/Commands/QueueClearCommand.mjs.map +1 -1
  116. package/dist/Console/Commands/QueueFailedCommand.cjs +1 -1
  117. package/dist/Console/Commands/QueueFailedCommand.mjs +1 -1
  118. package/dist/Console/Commands/QueueFailedCommand.mjs.map +1 -1
  119. package/dist/Console/Commands/QueueFailedTableCommand.cjs +1 -1
  120. package/dist/Console/Commands/QueueFailedTableCommand.mjs +1 -1
  121. package/dist/Console/Commands/QueueFailedTableCommand.mjs.map +1 -1
  122. package/dist/Console/Commands/QueueFlushCommand.cjs +1 -1
  123. package/dist/Console/Commands/QueueFlushCommand.mjs +1 -1
  124. package/dist/Console/Commands/QueueFlushCommand.mjs.map +1 -1
  125. package/dist/Console/Commands/QueueForgetCommand.cjs +1 -1
  126. package/dist/Console/Commands/QueueForgetCommand.mjs +1 -1
  127. package/dist/Console/Commands/QueueForgetCommand.mjs.map +1 -1
  128. package/dist/Console/Commands/QueueMonitorCommand.cjs +1 -1
  129. package/dist/Console/Commands/QueueMonitorCommand.mjs +1 -1
  130. package/dist/Console/Commands/QueueMonitorCommand.mjs.map +1 -1
  131. package/dist/Console/Commands/QueuePruneBatchesCommand.cjs +1 -1
  132. package/dist/Console/Commands/QueuePruneBatchesCommand.mjs +1 -1
  133. package/dist/Console/Commands/QueuePruneBatchesCommand.mjs.map +1 -1
  134. package/dist/Console/Commands/QueuePruneFailedCommand.cjs +1 -1
  135. package/dist/Console/Commands/QueuePruneFailedCommand.mjs +1 -1
  136. package/dist/Console/Commands/QueuePruneFailedCommand.mjs.map +1 -1
  137. package/dist/Console/Commands/QueueRestartCommand.cjs +1 -1
  138. package/dist/Console/Commands/QueueRestartCommand.mjs +1 -1
  139. package/dist/Console/Commands/QueueRestartCommand.mjs.map +1 -1
  140. package/dist/Console/Commands/QueueRetryCommand.cjs +1 -1
  141. package/dist/Console/Commands/QueueRetryCommand.mjs +1 -1
  142. package/dist/Console/Commands/QueueRetryCommand.mjs.map +1 -1
  143. package/dist/Console/Commands/QueueTableCommand.cjs +1 -1
  144. package/dist/Console/Commands/QueueTableCommand.mjs +1 -1
  145. package/dist/Console/Commands/QueueTableCommand.mjs.map +1 -1
  146. package/dist/Console/Commands/QueueWorkCommand.cjs +1 -1
  147. package/dist/Console/Commands/QueueWorkCommand.mjs +1 -1
  148. package/dist/Console/Commands/QueueWorkCommand.mjs.map +1 -1
  149. package/dist/Console/Commands/SeedCommand.cjs +1 -1
  150. package/dist/Console/Commands/SeedCommand.mjs +1 -1
  151. package/dist/Console/Commands/SeedCommand.mjs.map +1 -1
  152. package/dist/Console/ConsoleKernel.cjs +1 -1
  153. package/dist/Console/ConsoleKernel.mjs +1 -1
  154. package/dist/Console/ConsoleKernel.mjs.map +1 -1
  155. package/dist/Console/orchestr.cjs +2 -0
  156. package/dist/Console/orchestr.d.cts +1 -0
  157. package/dist/Console/orchestr.d.mts +1 -0
  158. package/dist/Console/orchestr.mjs +3 -0
  159. package/dist/Console/orchestr.mjs.map +1 -0
  160. package/dist/Container/Container.mjs.map +1 -1
  161. package/dist/Database/Adapters/DrizzleAdapter.cjs +1 -1
  162. package/dist/Database/Adapters/DrizzleAdapter.mjs +1 -1
  163. package/dist/Database/Adapters/DrizzleAdapter.mjs.map +1 -1
  164. package/dist/Database/Connection.cjs +1 -1
  165. package/dist/Database/Connection.mjs +1 -1
  166. package/dist/Database/Connection.mjs.map +1 -1
  167. package/dist/Database/DatabaseManager.cjs +1 -1
  168. package/dist/Database/DatabaseManager.mjs +1 -1
  169. package/dist/Database/DatabaseManager.mjs.map +1 -1
  170. package/dist/Database/Ensemble/Ensemble.mjs.map +1 -1
  171. package/dist/Database/Ensemble/EnsembleBuilder.mjs.map +1 -1
  172. package/dist/Database/Ensemble/EnsembleCollection.cjs +1 -1
  173. package/dist/Database/Ensemble/EnsembleCollection.mjs +1 -1
  174. package/dist/Database/Ensemble/EnsembleCollection.mjs.map +1 -1
  175. package/dist/Database/Ensemble/Relations/BelongsTo.mjs.map +1 -1
  176. package/dist/Database/Ensemble/Relations/BelongsToMany.cjs +1 -1
  177. package/dist/Database/Ensemble/Relations/BelongsToMany.mjs +1 -1
  178. package/dist/Database/Ensemble/Relations/BelongsToMany.mjs.map +1 -1
  179. package/dist/Database/Ensemble/Relations/HasMany.mjs.map +1 -1
  180. package/dist/Database/Ensemble/Relations/MorphTo.mjs.map +1 -1
  181. package/dist/Database/Ensemble/Relations/MorphToMany.mjs.map +1 -1
  182. package/dist/Database/Migrations/Blueprint.cjs +1 -1
  183. package/dist/Database/Migrations/Blueprint.mjs +1 -1
  184. package/dist/Database/Migrations/Blueprint.mjs.map +1 -1
  185. package/dist/Database/Migrations/MigrationCreator.cjs +1 -1
  186. package/dist/Database/Migrations/MigrationCreator.mjs +1 -1
  187. package/dist/Database/Migrations/MigrationCreator.mjs.map +1 -1
  188. package/dist/Database/Migrations/MigrationRepository.cjs +1 -1
  189. package/dist/Database/Migrations/MigrationRepository.mjs +1 -1
  190. package/dist/Database/Migrations/MigrationRepository.mjs.map +1 -1
  191. package/dist/Database/Migrations/Migrator.cjs +1 -1
  192. package/dist/Database/Migrations/Migrator.mjs +1 -1
  193. package/dist/Database/Migrations/Migrator.mjs.map +1 -1
  194. package/dist/Database/Migrations/SchemaBuilder.cjs +1 -1
  195. package/dist/Database/Migrations/SchemaBuilder.mjs +1 -1
  196. package/dist/Database/Migrations/SchemaBuilder.mjs.map +1 -1
  197. package/dist/Database/Query/Builder.cjs +1 -1
  198. package/dist/Database/Query/Builder.mjs +1 -1
  199. package/dist/Database/Query/Builder.mjs.map +1 -1
  200. package/dist/Database/Query/Expression.cjs +1 -1
  201. package/dist/Database/Query/Expression.mjs +1 -1
  202. package/dist/Database/Query/Expression.mjs.map +1 -1
  203. package/dist/Database/Seeders/SeederRunner.cjs +1 -1
  204. package/dist/Database/Seeders/SeederRunner.mjs +1 -1
  205. package/dist/Database/Seeders/SeederRunner.mjs.map +1 -1
  206. package/dist/Deploy/Deployer.cjs +1 -1
  207. package/dist/Deploy/Deployer.mjs +1 -1
  208. package/dist/Deploy/Deployer.mjs.map +1 -1
  209. package/dist/Deploy/ProjectConfig.mjs.map +1 -1
  210. package/dist/Deploy/Provisioner.cjs +1 -1
  211. package/dist/Deploy/Provisioner.mjs +1 -1
  212. package/dist/Deploy/Provisioner.mjs.map +1 -1
  213. package/dist/Deploy/SSHConnection.mjs.map +1 -1
  214. package/dist/Deploy/SymphonyClient.cjs +1 -1
  215. package/dist/Deploy/SymphonyClient.mjs +1 -1
  216. package/dist/Deploy/SymphonyClient.mjs.map +1 -1
  217. package/dist/Deploy/TarBuilder.mjs.map +1 -1
  218. package/dist/Deploy/prompt.mjs.map +1 -1
  219. package/dist/Events/Dispatcher.cjs +1 -1
  220. package/dist/Events/Dispatcher.d.cts +1 -1
  221. package/dist/Events/Dispatcher.d.mts +1 -1
  222. package/dist/Events/Dispatcher.mjs +1 -1
  223. package/dist/Events/Dispatcher.mjs.map +1 -1
  224. package/dist/Events/EventServiceProvider.cjs +1 -1
  225. package/dist/Events/EventServiceProvider.d.cts +1 -1
  226. package/dist/Events/EventServiceProvider.d.mts +1 -1
  227. package/dist/Events/EventServiceProvider.mjs.map +1 -1
  228. package/dist/Events/index.cjs +1 -0
  229. package/dist/Events/index.d.cts +7 -0
  230. package/dist/Events/index.d.mts +7 -0
  231. package/dist/Events/index.mjs +1 -0
  232. package/dist/Facades/Bus.mjs.map +1 -1
  233. package/dist/Facades/Cache.mjs.map +1 -1
  234. package/dist/Facades/Config.mjs.map +1 -1
  235. package/dist/Facades/DB.mjs.map +1 -1
  236. package/dist/Facades/Event.d.cts +1 -1
  237. package/dist/Facades/Event.d.mts +1 -1
  238. package/dist/Facades/Event.mjs.map +1 -1
  239. package/dist/Facades/Queue.mjs.map +1 -1
  240. package/dist/Facades/Route.d.cts +1 -1
  241. package/dist/Facades/Route.d.mts +1 -1
  242. package/dist/Facades/Route.mjs.map +1 -1
  243. package/dist/Facades/View.mjs.map +1 -1
  244. package/dist/Facades/index.cjs +1 -0
  245. package/dist/Facades/index.d.cts +9 -0
  246. package/dist/Facades/index.d.mts +9 -0
  247. package/dist/Facades/index.mjs +1 -0
  248. package/dist/Foundation/Application.mjs.map +1 -1
  249. package/dist/Foundation/Config/ConfigServiceProvider.d.cts +1 -1
  250. package/dist/Foundation/Config/ConfigServiceProvider.d.mts +1 -1
  251. package/dist/Foundation/Http/FormRequest.d.cts +1 -1
  252. package/dist/Foundation/Http/FormRequest.d.mts +1 -1
  253. package/dist/Foundation/Http/FormRequest.mjs.map +1 -1
  254. package/dist/Foundation/Http/Rules/AnyOfRule.mjs.map +1 -1
  255. package/dist/Foundation/Http/Rules/ImageFileRule.mjs.map +1 -1
  256. package/dist/Foundation/Http/Validator.mjs.map +1 -1
  257. package/dist/Queue/Batching/Batch.cjs +1 -1
  258. package/dist/Queue/Batching/Batch.mjs +1 -1
  259. package/dist/Queue/Batching/Batch.mjs.map +1 -1
  260. package/dist/Queue/Batching/PendingBatch.cjs +1 -1
  261. package/dist/Queue/Batching/PendingBatch.mjs +1 -1
  262. package/dist/Queue/Batching/PendingBatch.mjs.map +1 -1
  263. package/dist/Queue/Concerns/Dispatchable.mjs.map +1 -1
  264. package/dist/Queue/Drivers/DatabaseDriver.cjs +1 -1
  265. package/dist/Queue/Drivers/DatabaseDriver.mjs +1 -1
  266. package/dist/Queue/Drivers/DatabaseDriver.mjs.map +1 -1
  267. package/dist/Queue/Drivers/NullDriver.cjs +1 -1
  268. package/dist/Queue/Drivers/NullDriver.mjs +1 -1
  269. package/dist/Queue/Drivers/NullDriver.mjs.map +1 -1
  270. package/dist/Queue/Drivers/SyncDriver.cjs +1 -1
  271. package/dist/Queue/Drivers/SyncDriver.mjs +1 -1
  272. package/dist/Queue/Drivers/SyncDriver.mjs.map +1 -1
  273. package/dist/Queue/Events/JobExceptionOccurred.cjs +1 -1
  274. package/dist/Queue/Events/JobExceptionOccurred.mjs +1 -1
  275. package/dist/Queue/Events/JobExceptionOccurred.mjs.map +1 -1
  276. package/dist/Queue/Events/JobFailed.cjs +1 -1
  277. package/dist/Queue/Events/JobFailed.mjs +1 -1
  278. package/dist/Queue/Events/JobFailed.mjs.map +1 -1
  279. package/dist/Queue/Events/JobProcessed.cjs +1 -1
  280. package/dist/Queue/Events/JobProcessed.mjs +1 -1
  281. package/dist/Queue/Events/JobProcessed.mjs.map +1 -1
  282. package/dist/Queue/Events/JobProcessing.cjs +1 -1
  283. package/dist/Queue/Events/JobProcessing.mjs +1 -1
  284. package/dist/Queue/Events/JobProcessing.mjs.map +1 -1
  285. package/dist/Queue/Events/JobQueued.cjs +1 -1
  286. package/dist/Queue/Events/JobQueued.mjs +1 -1
  287. package/dist/Queue/Events/JobQueued.mjs.map +1 -1
  288. package/dist/Queue/Events/JobRetryRequested.cjs +1 -1
  289. package/dist/Queue/Events/JobRetryRequested.mjs +1 -1
  290. package/dist/Queue/Events/JobRetryRequested.mjs.map +1 -1
  291. package/dist/Queue/Events/WorkerStopping.cjs +1 -1
  292. package/dist/Queue/Events/WorkerStopping.mjs +1 -1
  293. package/dist/Queue/Events/WorkerStopping.mjs.map +1 -1
  294. package/dist/Queue/Failed/DatabaseFailedJobProvider.cjs +1 -1
  295. package/dist/Queue/Failed/DatabaseFailedJobProvider.mjs +1 -1
  296. package/dist/Queue/Failed/DatabaseFailedJobProvider.mjs.map +1 -1
  297. package/dist/Queue/Middleware/RateLimited.cjs +1 -1
  298. package/dist/Queue/Middleware/RateLimited.mjs +1 -1
  299. package/dist/Queue/Middleware/RateLimited.mjs.map +1 -1
  300. package/dist/Queue/Middleware/ThrottlesExceptions.cjs +1 -1
  301. package/dist/Queue/Middleware/ThrottlesExceptions.mjs +1 -1
  302. package/dist/Queue/Middleware/ThrottlesExceptions.mjs.map +1 -1
  303. package/dist/Queue/Middleware/WithoutOverlapping.cjs +1 -1
  304. package/dist/Queue/Middleware/WithoutOverlapping.mjs +1 -1
  305. package/dist/Queue/Middleware/WithoutOverlapping.mjs.map +1 -1
  306. package/dist/Queue/PendingChain.cjs +1 -1
  307. package/dist/Queue/PendingChain.mjs +1 -1
  308. package/dist/Queue/PendingChain.mjs.map +1 -1
  309. package/dist/Queue/PendingDispatch.cjs +1 -1
  310. package/dist/Queue/PendingDispatch.mjs +1 -1
  311. package/dist/Queue/PendingDispatch.mjs.map +1 -1
  312. package/dist/Queue/QueueManager.cjs +1 -1
  313. package/dist/Queue/QueueManager.mjs +1 -1
  314. package/dist/Queue/QueueManager.mjs.map +1 -1
  315. package/dist/Queue/QueueServiceProvider.mjs.map +1 -1
  316. package/dist/Queue/Workers/Worker.cjs +1 -1
  317. package/dist/Queue/Workers/Worker.mjs +1 -1
  318. package/dist/Queue/Workers/Worker.mjs.map +1 -1
  319. package/dist/Routing/Request.mjs.map +1 -1
  320. package/dist/Routing/Response.mjs.map +1 -1
  321. package/dist/Routing/Route.d.cts +1 -1
  322. package/dist/Routing/Route.d.mts +1 -1
  323. package/dist/Routing/Router.d.cts +1 -1
  324. package/dist/Routing/Router.d.mts +1 -1
  325. package/dist/Support/EventDiscovery.cjs +1 -1
  326. package/dist/Support/EventDiscovery.mjs +1 -1
  327. package/dist/Support/EventDiscovery.mjs.map +1 -1
  328. package/dist/Support/Testing/Fakes/EventFake.cjs +1 -1
  329. package/dist/Support/Testing/Fakes/EventFake.d.cts +1 -1
  330. package/dist/Support/Testing/Fakes/EventFake.d.mts +1 -1
  331. package/dist/Support/Testing/Fakes/EventFake.mjs +1 -1
  332. package/dist/Support/Testing/Fakes/EventFake.mjs.map +1 -1
  333. package/dist/Support/helpers.mjs.map +1 -1
  334. package/dist/View/Engines/TemplateEngine.mjs.map +1 -1
  335. package/dist/index.d.cts +19 -19
  336. package/dist/index.d.mts +19 -19
  337. package/docs/events-typescript-usage.md +126 -0
  338. package/docs/future-improvements.md +49 -0
  339. package/docs/validation.md +201 -0
  340. package/package.json +65 -31
package/CHANGELOG.md ADDED
@@ -0,0 +1,20 @@
1
+ ## [1.11.2](https://github.com/orchestr-sh/orchestr/compare/v1.11.1...v1.11.2) (2026-05-08)
2
+
3
+ ## [1.11.1](https://github.com/orchestr-sh/orchestr/compare/v1.11.0...v1.11.1) (2026-04-07)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * commit message for release ([#24](https://github.com/orchestr-sh/orchestr/issues/24)) ([accef91](https://github.com/orchestr-sh/orchestr/commit/accef91c66616ebf9e83874b00bb59e46f8fc6ac))
9
+
10
+ # [1.11.0](https://github.com/orchestr-sh/orchestr/compare/v1.10.0...v1.11.0) (2026-04-07)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * release workflow ([#21](https://github.com/orchestr-sh/orchestr/issues/21)) ([9bad22d](https://github.com/orchestr-sh/orchestr/commit/9bad22d8dd96407f24d80e16695d7162c0497425))
16
+
17
+
18
+ ### Features
19
+
20
+ * tsdown, typescript 6 ([#17](https://github.com/orchestr-sh/orchestr/issues/17)) ([54581fe](https://github.com/orchestr-sh/orchestr/commit/54581fe8bd6c47d385fa7f61e59fde73fa0a030f))
@@ -0,0 +1,43 @@
1
+ # Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We are committed to providing a welcoming and inspiring community for all. We pledge to make participation in our community a harassment-free experience regardless of age, body size, caste, disability, ethnicity, gender identity and expression, level of experience, family status, gender, marital status, military or veteran status, national origin, personal appearance, race, religion, sex, sexual orientation, socioeconomic status, or any other dimension of diversity.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to creating a positive environment include:
10
+
11
+ - Using welcoming and inclusive language
12
+ - Being respectful of differing opinions, viewpoints, and experiences
13
+ - Giving and gracefully accepting constructive criticism
14
+ - Focusing on what is best for the community
15
+ - Showing empathy towards other community members
16
+ - Demonstrating patience and understanding
17
+
18
+ Examples of unacceptable behavior include:
19
+
20
+ - The use of sexualized language or imagery and unwelcome sexual attention or advances
21
+ - Trolling, insulting/derogatory comments, and personal or political attacks
22
+ - Public or private harassment
23
+ - Publishing others' private information, such as a physical or electronic address, without explicit permission
24
+ - Other conduct which could reasonably be considered inappropriate in a professional setting
25
+ - Violence, threats of violence, or violent language directed against another person
26
+ - Deliberate intimidation or stalking
27
+ - Advocating for, or encouraging, any of the above behaviors
28
+
29
+ ## Enforcement
30
+
31
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
32
+
33
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
34
+
35
+ ### Reporting Violations
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement. All complaints will be reviewed and investigated promptly and fairly.
38
+
39
+ If you witness or experience unacceptable behavior, please report it by opening an issue or contacting the maintainers directly.
40
+
41
+ ## Attribution
42
+
43
+ This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.
@@ -0,0 +1,274 @@
1
+ # Contributing to Orchestr
2
+
3
+ Thank you for your interest in contributing to Orchestr! We welcome contributions from the community. This document provides guidelines and instructions for contributing.
4
+
5
+ ## Code of Conduct
6
+
7
+ Be respectful, inclusive, and constructive in all interactions with other contributors and maintainers.
8
+
9
+ ## Getting Started
10
+
11
+ ### Prerequisites
12
+
13
+ - Node.js >= 22.0.0
14
+ - npm or preferred package manager
15
+ - TypeScript knowledge
16
+
17
+ ### Setup Development Environment
18
+
19
+ 1. Fork the repository on GitHub
20
+ 2. Clone your fork locally:
21
+ ```bash
22
+ git clone https://github.com/your-username/orchestr.git
23
+ cd orchestr
24
+ ```
25
+ 3. Add upstream remote:
26
+ ```bash
27
+ git remote add upstream https://github.com/orchestr-sh/orchestr.git
28
+ ```
29
+ 4. Install dependencies:
30
+ ```bash
31
+ npm install
32
+ ```
33
+
34
+ ## Development Workflow
35
+
36
+ ### Building
37
+
38
+ Build the TypeScript code:
39
+ ```bash
40
+ npm run build
41
+ ```
42
+
43
+ ### Testing
44
+
45
+ Run the test suite:
46
+ ```bash
47
+ npm test # Run tests once
48
+ npm run test:watch # Watch mode
49
+ npm run test:coverage # With coverage report
50
+ ```
51
+
52
+ ### Linting & Formatting
53
+
54
+ The project uses **oxlint** and **Prettier** for code quality. Run before committing:
55
+ ```bash
56
+ npm run lint # Lint and auto-fix
57
+ npm run format # Format code
58
+ ```
59
+
60
+ Validate without changes:
61
+ ```bash
62
+ npm run test:lint # Check linting
63
+ npm run format:check # Check formatting
64
+ ```
65
+
66
+ ### Type Checking
67
+
68
+ Verify TypeScript types:
69
+ ```bash
70
+ npm run test:types
71
+ ```
72
+
73
+ ## Making Changes
74
+
75
+ ### Create a Branch
76
+
77
+ Create a feature or fix branch from `main`:
78
+ ```bash
79
+ git checkout -b feature/your-feature-name
80
+ # or
81
+ git checkout -b fix/your-bug-fix
82
+ ```
83
+
84
+ Use descriptive branch names (e.g., `feature/queue-batching`, `fix/cache-expiry`).
85
+
86
+ ### Write Code
87
+
88
+ - Follow the existing code style and patterns
89
+ - Use TypeScript with proper type annotations
90
+ - Keep changes focused and atomic
91
+ - Add tests for new functionality
92
+ - Update documentation if needed
93
+
94
+ ### Commit Guidelines
95
+
96
+ Write clear, concise commit messages:
97
+
98
+ - Use present tense: "Add feature" not "Added feature"
99
+ - Be descriptive: "feat: add job batching to queue system" not "update"
100
+ - Be in the format `<type>[scope?][!]: Add job batching to queue system`
101
+ - Start with a conventional commit type from the allowed type list
102
+ - Breaking changes should include `!` after the allowed commit type e.g. `fix!:`
103
+
104
+ Example:
105
+ ```
106
+ feat: add queue job batching
107
+
108
+ - Implement PendingBatch class for grouped job execution
109
+ - Add batch callback support (then/catch/finally)
110
+ - Include integration tests for batch workflows
111
+ ```
112
+
113
+ #### Revert
114
+
115
+ If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
116
+
117
+ #### Type
118
+
119
+ The type must be one of the following:
120
+
121
+ | Type | Description |
122
+ | ------------ | ----------------------------------------------------------------------------------------------------------- |
123
+ | **build** | Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) |
124
+ | **chore** | Routine maintenance tasks that do not directly impact the functionality of the application |
125
+ | **ci** | Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) |
126
+ | **docs** | Documentation only changes |
127
+ | **feat** | A new feature |
128
+ | **fix** | A bug fix |
129
+ | **perf** | A code change that improves performance |
130
+ | **refactor** | A code change that neither fixes a bug nor adds a feature |
131
+ | **style** | Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) |
132
+ | **test** | Adding missing tests or correcting existing tests |
133
+
134
+ ### Git Hooks
135
+ This project uses **husky** to automatically perform tasks during the git hook events.
136
+
137
+ #### Pre-commit
138
+ - **lint-staged** to automatically lint and format staged files. Ensure your code passes these checks before committing.
139
+
140
+ #### Commit-msg
141
+ - **commitlint** to automatically check your commit messages follow our CONTRIBUTING guidelines around conventional commits.
142
+
143
+ ## Testing
144
+
145
+ ### Writing Tests
146
+
147
+ - Place tests in the tests directory
148
+ - Use descriptive test names
149
+ - Test both success and failure paths
150
+ - Keep tests focused and independent
151
+
152
+ Example structure:
153
+ ```typescript
154
+ import { describe, it, expect, beforeEach } from 'vitest';
155
+
156
+ describe('MyFeature', () => {
157
+ beforeEach(() => {
158
+ // Setup
159
+ });
160
+
161
+ it('should do something', () => {
162
+ // Test code
163
+ expect(result).toBe(expected);
164
+ });
165
+
166
+ it('should handle error cases', () => {
167
+ // Error test
168
+ expect(() => {
169
+ // code that throws
170
+ }).toThrow();
171
+ });
172
+ });
173
+ ```
174
+
175
+ ## Pull Request Process
176
+
177
+ 1. **Update your branch** with latest upstream changes:
178
+ ```bash
179
+ git fetch upstream
180
+ git rebase upstream/main
181
+ ```
182
+
183
+ 2. **Push to your fork**:
184
+ ```bash
185
+ git push origin your-branch-name
186
+ ```
187
+
188
+ 3. **Create a Pull Request** on GitHub with:
189
+ - Clear title describing the change
190
+ - Description explaining what and why
191
+ - Reference any related issues (#123)
192
+ - Screenshots or examples if applicable
193
+
194
+ 4. **PR Description Template**:
195
+ ```
196
+ ## Description
197
+ Brief description of changes.
198
+
199
+ ## Related Issues
200
+ Closes #123
201
+
202
+ ## Type of Change
203
+ - [ ] Bug fix (non-breaking)
204
+ - [ ] New feature (non-breaking)
205
+ - [ ] Breaking change
206
+ - [ ] Documentation update
207
+
208
+ ## Testing
209
+ - [ ] Tests pass locally
210
+ - [ ] Added/updated tests
211
+ - [ ] Linting passes
212
+
213
+ ## Checklist
214
+ - [ ] Code follows style guidelines
215
+ - [ ] Comments added for complex logic
216
+ - [ ] Documentation updated
217
+ - [ ] No new warnings generated
218
+ ```
219
+
220
+ 5. **Review Process**:
221
+ - Address feedback promptly
222
+ - Request re-review after making changes
223
+ - Discuss disagreements respectfully
224
+ - All checks must pass (tests, linting, type checking)
225
+
226
+ ## Architecture & Patterns
227
+
228
+ Orchestr follows Laravel's architecture patterns. Familiarize yourself with:
229
+
230
+ - **Service Providers**: Extend `ServiceProvider`, implement `register()` and `boot()`
231
+ - **Managers**: Connection managers using the manager pattern (DatabaseManager, QueueManager, CacheManager)
232
+ - **Facades**: Static interfaces via `Facade` base class using Proxy forwarding
233
+ - **Commands**: Extend `Command` with `signature`, `description`, `handle()`
234
+ - **Events**: System event dispatcher with listeners and subscribers
235
+
236
+ See README.md and docs/ for detailed patterns.
237
+
238
+ ## Documentation
239
+
240
+ - Update README.md for user-facing changes
241
+ - Add inline comments for complex logic
242
+ - Document public APIs with JSDoc
243
+ - Update docs/ folder if adding major features
244
+
245
+ ## Reporting Issues
246
+
247
+ ### Bug Reports
248
+
249
+ Include:
250
+ - Node.js and npm versions
251
+ - Orchestr version
252
+ - Minimal reproduction code
253
+ - Expected vs actual behavior
254
+ - Relevant error messages
255
+
256
+ ### Feature Requests
257
+
258
+ Include:
259
+ - Clear use case and motivation
260
+ - Proposed API/interface
261
+ - Examples of how it would be used
262
+ - Any alternatives considered
263
+
264
+ ## Questions?
265
+
266
+ - Check existing issues and discussions
267
+ - Ask in pull request comments
268
+ - Open a GitHub discussion for questions
269
+
270
+ ## License
271
+
272
+ By contributing, you agree that your contributions will be licensed under the MIT License.
273
+
274
+ Thank you for helping make Orchestr better! 🎉
@@ -1 +1 @@
1
- require(`../_virtual/_rolldown/runtime.cjs`);const e=require(`./Repository.cjs`);var t=class{stores=new Map;driverFactories=new Map;constructor(e){this.config=e}registerDriver(e,t){this.driverFactories.set(e,t)}store(e){let t=e||this.config.default;if(this.stores.has(t))return this.stores.get(t);let n=this.createStore(t);return this.stores.set(t,n),n}createStore(t){let n=this.config.stores[t];if(!n)throw Error(`Cache store [${t}] not configured.`);let r=this.driverFactories.get(n.driver);if(!r)throw Error(`Cache driver [${n.driver}] not registered. Available drivers: ${Array.from(this.driverFactories.keys()).join(`, `)}`);let i=new e.Repository(r(n),n);return i.setStoreName(t),i}extend(e,t){this.registerDriver(e,t)}getDefaultDriver(){return this.config.default}setDefaultDriver(e){this.config.default=e}getPrefix(){return this.config.prefix}getStoreNames(){return Object.keys(this.config.stores)}getStoreConfig(e){let t=e||this.config.default,n=this.config.stores[t];if(!n)throw Error(`Cache store [${t}] not configured.`);return n}getConfig(){return this.config}purge(e){let t=e||this.config.default;this.stores.delete(t)}purgeAll(){this.stores.clear()}async get(e,t){return this.store().get(e,t)}async put(e,t,n){return this.store().put(e,t,n)}async has(e){return this.store().has(e)}async forget(e){return this.store().forget(e)}async flush(){return this.store().flush()}async remember(e,t,n){return this.store().remember(e,t,n)}async rememberForever(e,t){return this.store().rememberForever(e,t)}async forever(e,t){return this.store().forever(e,t)}async pull(e,t){return this.store().pull(e,t)}async many(e){return this.store().many(e)}async putMany(e,t){return this.store().putMany(e,t)}async increment(e,t){return this.store().increment(e,t)}async decrement(e,t){return this.store().decrement(e,t)}async add(e,t,n){return this.store().add(e,t,n)}};exports.CacheManager=t;
1
+ require(`../_virtual/_rolldown/runtime.cjs`);const e=require(`./Repository.cjs`);var t=class{config;stores=new Map;driverFactories=new Map;constructor(e){this.config=e}registerDriver(e,t){this.driverFactories.set(e,t)}store(e){let t=e||this.config.default;if(this.stores.has(t))return this.stores.get(t);let n=this.createStore(t);return this.stores.set(t,n),n}createStore(t){let n=this.config.stores[t];if(!n)throw Error(`Cache store [${t}] not configured.`);let r=this.driverFactories.get(n.driver);if(!r)throw Error(`Cache driver [${n.driver}] not registered. Available drivers: ${Array.from(this.driverFactories.keys()).join(`, `)}`);let i=new e.Repository(r(n),n);return i.setStoreName(t),i}extend(e,t){this.registerDriver(e,t)}getDefaultDriver(){return this.config.default}setDefaultDriver(e){this.config.default=e}getPrefix(){return this.config.prefix}getStoreNames(){return Object.keys(this.config.stores)}getStoreConfig(e){let t=e||this.config.default,n=this.config.stores[t];if(!n)throw Error(`Cache store [${t}] not configured.`);return n}getConfig(){return this.config}purge(e){let t=e||this.config.default;this.stores.delete(t)}purgeAll(){this.stores.clear()}async get(e,t){return this.store().get(e,t)}async put(e,t,n){return this.store().put(e,t,n)}async has(e){return this.store().has(e)}async forget(e){return this.store().forget(e)}async flush(){return this.store().flush()}async remember(e,t,n){return this.store().remember(e,t,n)}async rememberForever(e,t){return this.store().rememberForever(e,t)}async forever(e,t){return this.store().forever(e,t)}async pull(e,t){return this.store().pull(e,t)}async many(e){return this.store().many(e)}async putMany(e,t){return this.store().putMany(e,t)}async increment(e,t){return this.store().increment(e,t)}async decrement(e,t){return this.store().decrement(e,t)}async add(e,t,n){return this.store().add(e,t,n)}};exports.CacheManager=t;
@@ -1,2 +1,2 @@
1
- import{Repository as e}from"./Repository.mjs";var t=class{stores=new Map;driverFactories=new Map;constructor(e){this.config=e}registerDriver(e,t){this.driverFactories.set(e,t)}store(e){let t=e||this.config.default;if(this.stores.has(t))return this.stores.get(t);let n=this.createStore(t);return this.stores.set(t,n),n}createStore(t){let n=this.config.stores[t];if(!n)throw Error(`Cache store [${t}] not configured.`);let r=this.driverFactories.get(n.driver);if(!r)throw Error(`Cache driver [${n.driver}] not registered. Available drivers: ${Array.from(this.driverFactories.keys()).join(`, `)}`);let i=new e(r(n),n);return i.setStoreName(t),i}extend(e,t){this.registerDriver(e,t)}getDefaultDriver(){return this.config.default}setDefaultDriver(e){this.config.default=e}getPrefix(){return this.config.prefix}getStoreNames(){return Object.keys(this.config.stores)}getStoreConfig(e){let t=e||this.config.default,n=this.config.stores[t];if(!n)throw Error(`Cache store [${t}] not configured.`);return n}getConfig(){return this.config}purge(e){let t=e||this.config.default;this.stores.delete(t)}purgeAll(){this.stores.clear()}async get(e,t){return this.store().get(e,t)}async put(e,t,n){return this.store().put(e,t,n)}async has(e){return this.store().has(e)}async forget(e){return this.store().forget(e)}async flush(){return this.store().flush()}async remember(e,t,n){return this.store().remember(e,t,n)}async rememberForever(e,t){return this.store().rememberForever(e,t)}async forever(e,t){return this.store().forever(e,t)}async pull(e,t){return this.store().pull(e,t)}async many(e){return this.store().many(e)}async putMany(e,t){return this.store().putMany(e,t)}async increment(e,t){return this.store().increment(e,t)}async decrement(e,t){return this.store().decrement(e,t)}async add(e,t,n){return this.store().add(e,t,n)}};export{t as CacheManager};
1
+ import{Repository as e}from"./Repository.mjs";var t=class{config;stores=new Map;driverFactories=new Map;constructor(e){this.config=e}registerDriver(e,t){this.driverFactories.set(e,t)}store(e){let t=e||this.config.default;if(this.stores.has(t))return this.stores.get(t);let n=this.createStore(t);return this.stores.set(t,n),n}createStore(t){let n=this.config.stores[t];if(!n)throw Error(`Cache store [${t}] not configured.`);let r=this.driverFactories.get(n.driver);if(!r)throw Error(`Cache driver [${n.driver}] not registered. Available drivers: ${Array.from(this.driverFactories.keys()).join(`, `)}`);let i=new e(r(n),n);return i.setStoreName(t),i}extend(e,t){this.registerDriver(e,t)}getDefaultDriver(){return this.config.default}setDefaultDriver(e){this.config.default=e}getPrefix(){return this.config.prefix}getStoreNames(){return Object.keys(this.config.stores)}getStoreConfig(e){let t=e||this.config.default,n=this.config.stores[t];if(!n)throw Error(`Cache store [${t}] not configured.`);return n}getConfig(){return this.config}purge(e){let t=e||this.config.default;this.stores.delete(t)}purgeAll(){this.stores.clear()}async get(e,t){return this.store().get(e,t)}async put(e,t,n){return this.store().put(e,t,n)}async has(e){return this.store().has(e)}async forget(e){return this.store().forget(e)}async flush(){return this.store().flush()}async remember(e,t,n){return this.store().remember(e,t,n)}async rememberForever(e,t){return this.store().rememberForever(e,t)}async forever(e,t){return this.store().forever(e,t)}async pull(e,t){return this.store().pull(e,t)}async many(e){return this.store().many(e)}async putMany(e,t){return this.store().putMany(e,t)}async increment(e,t){return this.store().increment(e,t)}async decrement(e,t){return this.store().decrement(e,t)}async add(e,t,n){return this.store().add(e,t,n)}};export{t as CacheManager};
2
2
  //# sourceMappingURL=CacheManager.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"CacheManager.mjs","names":[],"sources":["../../src/Cache/CacheManager.ts"],"sourcesContent":["/**\n * CacheManager\n *\n * Manages multiple cache store connections.\n * Follows the Manager pattern established by DatabaseManager and QueueManager.\n *\n * Mirrors Laravel's Illuminate\\Cache\\CacheManager.\n *\n * @example\n * ```typescript\n * const manager = new CacheManager({\n * default: 'file',\n * prefix: 'app_',\n * stores: {\n * file: { driver: 'file', path: 'storage/cache' },\n * array: { driver: 'array' },\n * database: { driver: 'database', table: 'cache' },\n * },\n * });\n *\n * // Use default store\n * const repo = manager.store();\n * await repo.put('key', 'value', 3600);\n *\n * // Use specific store\n * const redis = manager.store('redis');\n * ```\n */\n\nimport type { Store } from './Contracts/Store';\nimport { Repository } from './Repository';\n\nexport interface StoreConfig {\n driver: string;\n [key: string]: any;\n}\n\nexport interface CacheConfig {\n default: string;\n prefix: string;\n stores: Record<string, StoreConfig>;\n}\n\nexport type StoreFactory = (config: StoreConfig) => Store;\n\nexport class CacheManager {\n protected stores: Map<string, Repository> = new Map();\n protected driverFactories: Map<string, StoreFactory> = new Map();\n\n constructor(protected config: CacheConfig) {}\n\n /**\n * Register a cache store driver factory\n */\n registerDriver(name: string, factory: StoreFactory): void {\n this.driverFactories.set(name, factory);\n }\n\n /**\n * Get a cache store instance by name\n */\n store(name?: string): Repository {\n const storeName = name || this.config.default;\n\n if (this.stores.has(storeName)) {\n return this.stores.get(storeName)!;\n }\n\n const repository = this.createStore(storeName);\n this.stores.set(storeName, repository);\n\n return repository;\n }\n\n /**\n * Create a new cache store instance\n */\n protected createStore(name: string): Repository {\n const storeConfig = this.config.stores[name];\n\n if (!storeConfig) {\n throw new Error(`Cache store [${name}] not configured.`);\n }\n\n const factory = this.driverFactories.get(storeConfig.driver);\n\n if (!factory) {\n throw new Error(\n `Cache driver [${storeConfig.driver}] not registered. ` +\n `Available drivers: ${Array.from(this.driverFactories.keys()).join(', ')}`\n );\n }\n\n const store = factory(storeConfig);\n const repository = new Repository(store, storeConfig);\n repository.setStoreName(name);\n\n return repository;\n }\n\n /**\n * Extend the manager with a custom driver\n */\n extend(driver: string, factory: StoreFactory): void {\n this.registerDriver(driver, factory);\n }\n\n /**\n * Get the default store name\n */\n getDefaultDriver(): string {\n return this.config.default;\n }\n\n /**\n * Set the default store name\n */\n setDefaultDriver(name: string): void {\n this.config.default = name;\n }\n\n /**\n * Get the cache prefix\n */\n getPrefix(): string {\n return this.config.prefix;\n }\n\n /**\n * Get all configured store names\n */\n getStoreNames(): string[] {\n return Object.keys(this.config.stores);\n }\n\n /**\n * Get the store configuration\n */\n getStoreConfig(name?: string): StoreConfig {\n const storeName = name || this.config.default;\n const config = this.config.stores[storeName];\n\n if (!config) {\n throw new Error(`Cache store [${storeName}] not configured.`);\n }\n\n return config;\n }\n\n /**\n * Get the full configuration\n */\n getConfig(): CacheConfig {\n return this.config;\n }\n\n /**\n * Purge a store from the cache (remove the cached instance)\n */\n purge(name?: string): void {\n const storeName = name || this.config.default;\n this.stores.delete(storeName);\n }\n\n /**\n * Purge all cached store instances\n */\n purgeAll(): void {\n this.stores.clear();\n }\n\n // --- Proxy methods to default store for convenience ---\n\n async get<T = any>(key: string, defaultValue?: T | (() => T)): Promise<T | null> {\n return this.store().get<T>(key, defaultValue);\n }\n\n async put<T = any>(key: string, value: T, ttl?: number | Date): Promise<boolean> {\n return this.store().put<T>(key, value, ttl);\n }\n\n async has(key: string): Promise<boolean> {\n return this.store().has(key);\n }\n\n async forget(key: string): Promise<boolean> {\n return this.store().forget(key);\n }\n\n async flush(): Promise<boolean> {\n return this.store().flush();\n }\n\n async remember<T = any>(key: string, ttl: number | Date, callback: () => T | Promise<T>): Promise<T> {\n return this.store().remember<T>(key, ttl, callback);\n }\n\n async rememberForever<T = any>(key: string, callback: () => T | Promise<T>): Promise<T> {\n return this.store().rememberForever<T>(key, callback);\n }\n\n async forever<T = any>(key: string, value: T): Promise<boolean> {\n return this.store().forever<T>(key, value);\n }\n\n async pull<T = any>(key: string, defaultValue?: T): Promise<T | null> {\n return this.store().pull<T>(key, defaultValue);\n }\n\n async many<T = any>(keys: string[]): Promise<Record<string, T | null>> {\n return this.store().many<T>(keys);\n }\n\n async putMany<T = any>(values: Record<string, T>, ttl?: number | Date): Promise<boolean> {\n return this.store().putMany<T>(values, ttl);\n }\n\n async increment(key: string, value?: number): Promise<number | boolean> {\n return this.store().increment(key, value);\n }\n\n async decrement(key: string, value?: number): Promise<number | boolean> {\n return this.store().decrement(key, value);\n }\n\n async add<T = any>(key: string, value: T, ttl?: number | Date): Promise<boolean> {\n return this.store().add<T>(key, value, ttl);\n }\n}\n"],"mappings":"8CA6CA,IAAa,EAAb,KAA0B,CACxB,OAA4C,IAAI,IAChD,gBAAuD,IAAI,IAE3D,YAAY,EAA+B,CAArB,KAAA,OAAA,EAKtB,eAAe,EAAc,EAA6B,CACxD,KAAK,gBAAgB,IAAI,EAAM,EAAQ,CAMzC,MAAM,EAA2B,CAC/B,IAAM,EAAY,GAAQ,KAAK,OAAO,QAEtC,GAAI,KAAK,OAAO,IAAI,EAAU,CAC5B,OAAO,KAAK,OAAO,IAAI,EAAU,CAGnC,IAAM,EAAa,KAAK,YAAY,EAAU,CAG9C,OAFA,KAAK,OAAO,IAAI,EAAW,EAAW,CAE/B,EAMT,YAAsB,EAA0B,CAC9C,IAAM,EAAc,KAAK,OAAO,OAAO,GAEvC,GAAI,CAAC,EACH,MAAU,MAAM,gBAAgB,EAAK,mBAAmB,CAG1D,IAAM,EAAU,KAAK,gBAAgB,IAAI,EAAY,OAAO,CAE5D,GAAI,CAAC,EACH,MAAU,MACR,iBAAiB,EAAY,OAAO,uCACZ,MAAM,KAAK,KAAK,gBAAgB,MAAM,CAAC,CAAC,KAAK,KAAK,GAC3E,CAIH,IAAM,EAAa,IAAI,EADT,EAAQ,EAAY,CACO,EAAY,CAGrD,OAFA,EAAW,aAAa,EAAK,CAEtB,EAMT,OAAO,EAAgB,EAA6B,CAClD,KAAK,eAAe,EAAQ,EAAQ,CAMtC,kBAA2B,CACzB,OAAO,KAAK,OAAO,QAMrB,iBAAiB,EAAoB,CACnC,KAAK,OAAO,QAAU,EAMxB,WAAoB,CAClB,OAAO,KAAK,OAAO,OAMrB,eAA0B,CACxB,OAAO,OAAO,KAAK,KAAK,OAAO,OAAO,CAMxC,eAAe,EAA4B,CACzC,IAAM,EAAY,GAAQ,KAAK,OAAO,QAChC,EAAS,KAAK,OAAO,OAAO,GAElC,GAAI,CAAC,EACH,MAAU,MAAM,gBAAgB,EAAU,mBAAmB,CAG/D,OAAO,EAMT,WAAyB,CACvB,OAAO,KAAK,OAMd,MAAM,EAAqB,CACzB,IAAM,EAAY,GAAQ,KAAK,OAAO,QACtC,KAAK,OAAO,OAAO,EAAU,CAM/B,UAAiB,CACf,KAAK,OAAO,OAAO,CAKrB,MAAM,IAAa,EAAa,EAAiD,CAC/E,OAAO,KAAK,OAAO,CAAC,IAAO,EAAK,EAAa,CAG/C,MAAM,IAAa,EAAa,EAAU,EAAuC,CAC/E,OAAO,KAAK,OAAO,CAAC,IAAO,EAAK,EAAO,EAAI,CAG7C,MAAM,IAAI,EAA+B,CACvC,OAAO,KAAK,OAAO,CAAC,IAAI,EAAI,CAG9B,MAAM,OAAO,EAA+B,CAC1C,OAAO,KAAK,OAAO,CAAC,OAAO,EAAI,CAGjC,MAAM,OAA0B,CAC9B,OAAO,KAAK,OAAO,CAAC,OAAO,CAG7B,MAAM,SAAkB,EAAa,EAAoB,EAA4C,CACnG,OAAO,KAAK,OAAO,CAAC,SAAY,EAAK,EAAK,EAAS,CAGrD,MAAM,gBAAyB,EAAa,EAA4C,CACtF,OAAO,KAAK,OAAO,CAAC,gBAAmB,EAAK,EAAS,CAGvD,MAAM,QAAiB,EAAa,EAA4B,CAC9D,OAAO,KAAK,OAAO,CAAC,QAAW,EAAK,EAAM,CAG5C,MAAM,KAAc,EAAa,EAAqC,CACpE,OAAO,KAAK,OAAO,CAAC,KAAQ,EAAK,EAAa,CAGhD,MAAM,KAAc,EAAmD,CACrE,OAAO,KAAK,OAAO,CAAC,KAAQ,EAAK,CAGnC,MAAM,QAAiB,EAA2B,EAAuC,CACvF,OAAO,KAAK,OAAO,CAAC,QAAW,EAAQ,EAAI,CAG7C,MAAM,UAAU,EAAa,EAA2C,CACtE,OAAO,KAAK,OAAO,CAAC,UAAU,EAAK,EAAM,CAG3C,MAAM,UAAU,EAAa,EAA2C,CACtE,OAAO,KAAK,OAAO,CAAC,UAAU,EAAK,EAAM,CAG3C,MAAM,IAAa,EAAa,EAAU,EAAuC,CAC/E,OAAO,KAAK,OAAO,CAAC,IAAO,EAAK,EAAO,EAAI"}
1
+ {"version":3,"file":"CacheManager.mjs","names":[],"sources":["../../src/Cache/CacheManager.ts"],"sourcesContent":["/**\n * CacheManager\n *\n * Manages multiple cache store connections.\n * Follows the Manager pattern established by DatabaseManager and QueueManager.\n *\n * Mirrors Laravel's Illuminate\\Cache\\CacheManager.\n *\n * @example\n * ```typescript\n * const manager = new CacheManager({\n * default: 'file',\n * prefix: 'app_',\n * stores: {\n * file: { driver: 'file', path: 'storage/cache' },\n * array: { driver: 'array' },\n * database: { driver: 'database', table: 'cache' },\n * },\n * });\n *\n * // Use default store\n * const repo = manager.store();\n * await repo.put('key', 'value', 3600);\n *\n * // Use specific store\n * const redis = manager.store('redis');\n * ```\n */\n\nimport type { Store } from './Contracts/Store';\nimport { Repository } from './Repository';\n\nexport interface StoreConfig {\n driver: string;\n [key: string]: any;\n}\n\nexport interface CacheConfig {\n default: string;\n prefix: string;\n stores: Record<string, StoreConfig>;\n}\n\nexport type StoreFactory = (config: StoreConfig) => Store;\n\nexport class CacheManager {\n protected stores: Map<string, Repository> = new Map();\n protected driverFactories: Map<string, StoreFactory> = new Map();\n\n constructor(protected config: CacheConfig) {}\n\n /**\n * Register a cache store driver factory\n */\n registerDriver(name: string, factory: StoreFactory): void {\n this.driverFactories.set(name, factory);\n }\n\n /**\n * Get a cache store instance by name\n */\n store(name?: string): Repository {\n const storeName = name || this.config.default;\n\n if (this.stores.has(storeName)) {\n return this.stores.get(storeName)!;\n }\n\n const repository = this.createStore(storeName);\n this.stores.set(storeName, repository);\n\n return repository;\n }\n\n /**\n * Create a new cache store instance\n */\n protected createStore(name: string): Repository {\n const storeConfig = this.config.stores[name];\n\n if (!storeConfig) {\n throw new Error(`Cache store [${name}] not configured.`);\n }\n\n const factory = this.driverFactories.get(storeConfig.driver);\n\n if (!factory) {\n throw new Error(\n `Cache driver [${storeConfig.driver}] not registered. ` +\n `Available drivers: ${Array.from(this.driverFactories.keys()).join(', ')}`\n );\n }\n\n const store = factory(storeConfig);\n const repository = new Repository(store, storeConfig);\n repository.setStoreName(name);\n\n return repository;\n }\n\n /**\n * Extend the manager with a custom driver\n */\n extend(driver: string, factory: StoreFactory): void {\n this.registerDriver(driver, factory);\n }\n\n /**\n * Get the default store name\n */\n getDefaultDriver(): string {\n return this.config.default;\n }\n\n /**\n * Set the default store name\n */\n setDefaultDriver(name: string): void {\n this.config.default = name;\n }\n\n /**\n * Get the cache prefix\n */\n getPrefix(): string {\n return this.config.prefix;\n }\n\n /**\n * Get all configured store names\n */\n getStoreNames(): string[] {\n return Object.keys(this.config.stores);\n }\n\n /**\n * Get the store configuration\n */\n getStoreConfig(name?: string): StoreConfig {\n const storeName = name || this.config.default;\n const config = this.config.stores[storeName];\n\n if (!config) {\n throw new Error(`Cache store [${storeName}] not configured.`);\n }\n\n return config;\n }\n\n /**\n * Get the full configuration\n */\n getConfig(): CacheConfig {\n return this.config;\n }\n\n /**\n * Purge a store from the cache (remove the cached instance)\n */\n purge(name?: string): void {\n const storeName = name || this.config.default;\n this.stores.delete(storeName);\n }\n\n /**\n * Purge all cached store instances\n */\n purgeAll(): void {\n this.stores.clear();\n }\n\n // --- Proxy methods to default store for convenience ---\n\n async get<T = any>(key: string, defaultValue?: T | (() => T)): Promise<T | null> {\n return this.store().get<T>(key, defaultValue);\n }\n\n async put<T = any>(key: string, value: T, ttl?: number | Date): Promise<boolean> {\n return this.store().put<T>(key, value, ttl);\n }\n\n async has(key: string): Promise<boolean> {\n return this.store().has(key);\n }\n\n async forget(key: string): Promise<boolean> {\n return this.store().forget(key);\n }\n\n async flush(): Promise<boolean> {\n return this.store().flush();\n }\n\n async remember<T = any>(key: string, ttl: number | Date, callback: () => T | Promise<T>): Promise<T> {\n return this.store().remember<T>(key, ttl, callback);\n }\n\n async rememberForever<T = any>(key: string, callback: () => T | Promise<T>): Promise<T> {\n return this.store().rememberForever<T>(key, callback);\n }\n\n async forever<T = any>(key: string, value: T): Promise<boolean> {\n return this.store().forever<T>(key, value);\n }\n\n async pull<T = any>(key: string, defaultValue?: T): Promise<T | null> {\n return this.store().pull<T>(key, defaultValue);\n }\n\n async many<T = any>(keys: string[]): Promise<Record<string, T | null>> {\n return this.store().many<T>(keys);\n }\n\n async putMany<T = any>(values: Record<string, T>, ttl?: number | Date): Promise<boolean> {\n return this.store().putMany<T>(values, ttl);\n }\n\n async increment(key: string, value?: number): Promise<number | boolean> {\n return this.store().increment(key, value);\n }\n\n async decrement(key: string, value?: number): Promise<number | boolean> {\n return this.store().decrement(key, value);\n }\n\n async add<T = any>(key: string, value: T, ttl?: number | Date): Promise<boolean> {\n return this.store().add<T>(key, value, ttl);\n }\n}\n"],"mappings":"8CA6CA,IAAa,EAAb,KAA0B,CAIF,OAHtB,OAA4C,IAAI,IAChD,gBAAuD,IAAI,IAE3D,YAAY,EAA+B,CAArB,KAAA,OAAA,EAKtB,eAAe,EAAc,EAA6B,CACxD,KAAK,gBAAgB,IAAI,EAAM,EAAQ,CAMzC,MAAM,EAA2B,CAC/B,IAAM,EAAY,GAAQ,KAAK,OAAO,QAEtC,GAAI,KAAK,OAAO,IAAI,EAAU,CAC5B,OAAO,KAAK,OAAO,IAAI,EAAU,CAGnC,IAAM,EAAa,KAAK,YAAY,EAAU,CAG9C,OAFA,KAAK,OAAO,IAAI,EAAW,EAAW,CAE/B,EAMT,YAAsB,EAA0B,CAC9C,IAAM,EAAc,KAAK,OAAO,OAAO,GAEvC,GAAI,CAAC,EACH,MAAU,MAAM,gBAAgB,EAAK,mBAAmB,CAG1D,IAAM,EAAU,KAAK,gBAAgB,IAAI,EAAY,OAAO,CAE5D,GAAI,CAAC,EACH,MAAU,MACR,iBAAiB,EAAY,OAAO,uCACZ,MAAM,KAAK,KAAK,gBAAgB,MAAM,CAAC,CAAC,KAAK,KAAK,GAC3E,CAIH,IAAM,EAAa,IAAI,EADT,EAAQ,EACiB,CAAE,EAAY,CAGrD,OAFA,EAAW,aAAa,EAAK,CAEtB,EAMT,OAAO,EAAgB,EAA6B,CAClD,KAAK,eAAe,EAAQ,EAAQ,CAMtC,kBAA2B,CACzB,OAAO,KAAK,OAAO,QAMrB,iBAAiB,EAAoB,CACnC,KAAK,OAAO,QAAU,EAMxB,WAAoB,CAClB,OAAO,KAAK,OAAO,OAMrB,eAA0B,CACxB,OAAO,OAAO,KAAK,KAAK,OAAO,OAAO,CAMxC,eAAe,EAA4B,CACzC,IAAM,EAAY,GAAQ,KAAK,OAAO,QAChC,EAAS,KAAK,OAAO,OAAO,GAElC,GAAI,CAAC,EACH,MAAU,MAAM,gBAAgB,EAAU,mBAAmB,CAG/D,OAAO,EAMT,WAAyB,CACvB,OAAO,KAAK,OAMd,MAAM,EAAqB,CACzB,IAAM,EAAY,GAAQ,KAAK,OAAO,QACtC,KAAK,OAAO,OAAO,EAAU,CAM/B,UAAiB,CACf,KAAK,OAAO,OAAO,CAKrB,MAAM,IAAa,EAAa,EAAiD,CAC/E,OAAO,KAAK,OAAO,CAAC,IAAO,EAAK,EAAa,CAG/C,MAAM,IAAa,EAAa,EAAU,EAAuC,CAC/E,OAAO,KAAK,OAAO,CAAC,IAAO,EAAK,EAAO,EAAI,CAG7C,MAAM,IAAI,EAA+B,CACvC,OAAO,KAAK,OAAO,CAAC,IAAI,EAAI,CAG9B,MAAM,OAAO,EAA+B,CAC1C,OAAO,KAAK,OAAO,CAAC,OAAO,EAAI,CAGjC,MAAM,OAA0B,CAC9B,OAAO,KAAK,OAAO,CAAC,OAAO,CAG7B,MAAM,SAAkB,EAAa,EAAoB,EAA4C,CACnG,OAAO,KAAK,OAAO,CAAC,SAAY,EAAK,EAAK,EAAS,CAGrD,MAAM,gBAAyB,EAAa,EAA4C,CACtF,OAAO,KAAK,OAAO,CAAC,gBAAmB,EAAK,EAAS,CAGvD,MAAM,QAAiB,EAAa,EAA4B,CAC9D,OAAO,KAAK,OAAO,CAAC,QAAW,EAAK,EAAM,CAG5C,MAAM,KAAc,EAAa,EAAqC,CACpE,OAAO,KAAK,OAAO,CAAC,KAAQ,EAAK,EAAa,CAGhD,MAAM,KAAc,EAAmD,CACrE,OAAO,KAAK,OAAO,CAAC,KAAQ,EAAK,CAGnC,MAAM,QAAiB,EAA2B,EAAuC,CACvF,OAAO,KAAK,OAAO,CAAC,QAAW,EAAQ,EAAI,CAG7C,MAAM,UAAU,EAAa,EAA2C,CACtE,OAAO,KAAK,OAAO,CAAC,UAAU,EAAK,EAAM,CAG3C,MAAM,UAAU,EAAa,EAA2C,CACtE,OAAO,KAAK,OAAO,CAAC,UAAU,EAAK,EAAM,CAG3C,MAAM,IAAa,EAAa,EAAU,EAAuC,CAC/E,OAAO,KAAK,OAAO,CAAC,IAAO,EAAK,EAAO,EAAI"}
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);var e=class{constructor(e,t=[]){this.storeName=e,this.tags=t}};exports.CacheFlushed=e;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);var e=class{storeName;tags;constructor(e,t=[]){this.storeName=e,this.tags=t}};exports.CacheFlushed=e;
@@ -1,2 +1,2 @@
1
- var e=class{constructor(e,t=[]){this.storeName=e,this.tags=t}};export{e as CacheFlushed};
1
+ var e=class{storeName;tags;constructor(e,t=[]){this.storeName=e,this.tags=t}};export{e as CacheFlushed};
2
2
  //# sourceMappingURL=CacheFlushed.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"CacheFlushed.mjs","names":[],"sources":["../../../src/Cache/Events/CacheFlushed.ts"],"sourcesContent":["/**\n * CacheFlushed Event\n *\n * Dispatched after all items have been flushed from the cache.\n */\nexport class CacheFlushed {\n constructor(\n public readonly storeName: string,\n public readonly tags: string[] = []\n ) {}\n}\n"],"mappings":"AAKA,IAAa,EAAb,KAA0B,CACxB,YACE,EACA,EAAiC,EAAE,CACnC,CAFgB,KAAA,UAAA,EACA,KAAA,KAAA"}
1
+ {"version":3,"file":"CacheFlushed.mjs","names":[],"sources":["../../../src/Cache/Events/CacheFlushed.ts"],"sourcesContent":["/**\n * CacheFlushed Event\n *\n * Dispatched after all items have been flushed from the cache.\n */\nexport class CacheFlushed {\n constructor(\n public readonly storeName: string,\n public readonly tags: string[] = []\n ) {}\n}\n"],"mappings":"AAKA,IAAa,EAAb,KAA0B,CAEN,UACA,KAFlB,YACE,EACA,EAAiC,EAAE,CACnC,CAFgB,KAAA,UAAA,EACA,KAAA,KAAA"}
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);var e=class{constructor(e,t,n,r=[]){this.storeName=e,this.key=t,this.value=n,this.tags=r}};exports.CacheHit=e;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);var e=class{storeName;key;value;tags;constructor(e,t,n,r=[]){this.storeName=e,this.key=t,this.value=n,this.tags=r}};exports.CacheHit=e;
@@ -1,2 +1,2 @@
1
- var e=class{constructor(e,t,n,r=[]){this.storeName=e,this.key=t,this.value=n,this.tags=r}};export{e as CacheHit};
1
+ var e=class{storeName;key;value;tags;constructor(e,t,n,r=[]){this.storeName=e,this.key=t,this.value=n,this.tags=r}};export{e as CacheHit};
2
2
  //# sourceMappingURL=CacheHit.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"CacheHit.mjs","names":[],"sources":["../../../src/Cache/Events/CacheHit.ts"],"sourcesContent":["/**\n * CacheHit Event\n *\n * Dispatched when a cache key is found.\n */\nexport class CacheHit {\n constructor(\n public readonly storeName: string,\n public readonly key: string,\n public readonly value: any,\n public readonly tags: string[] = []\n ) {}\n}\n"],"mappings":"AAKA,IAAa,EAAb,KAAsB,CACpB,YACE,EACA,EACA,EACA,EAAiC,EAAE,CACnC,CAJgB,KAAA,UAAA,EACA,KAAA,IAAA,EACA,KAAA,MAAA,EACA,KAAA,KAAA"}
1
+ {"version":3,"file":"CacheHit.mjs","names":[],"sources":["../../../src/Cache/Events/CacheHit.ts"],"sourcesContent":["/**\n * CacheHit Event\n *\n * Dispatched when a cache key is found.\n */\nexport class CacheHit {\n constructor(\n public readonly storeName: string,\n public readonly key: string,\n public readonly value: any,\n public readonly tags: string[] = []\n ) {}\n}\n"],"mappings":"AAKA,IAAa,EAAb,KAAsB,CAEF,UACA,IACA,MACA,KAJlB,YACE,EACA,EACA,EACA,EAAiC,EAAE,CACnC,CAJgB,KAAA,UAAA,EACA,KAAA,IAAA,EACA,KAAA,MAAA,EACA,KAAA,KAAA"}
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);var e=class{constructor(e,t,n=[]){this.storeName=e,this.key=t,this.tags=n}};exports.CacheMissed=e;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);var e=class{storeName;key;tags;constructor(e,t,n=[]){this.storeName=e,this.key=t,this.tags=n}};exports.CacheMissed=e;
@@ -1,2 +1,2 @@
1
- var e=class{constructor(e,t,n=[]){this.storeName=e,this.key=t,this.tags=n}};export{e as CacheMissed};
1
+ var e=class{storeName;key;tags;constructor(e,t,n=[]){this.storeName=e,this.key=t,this.tags=n}};export{e as CacheMissed};
2
2
  //# sourceMappingURL=CacheMissed.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"CacheMissed.mjs","names":[],"sources":["../../../src/Cache/Events/CacheMissed.ts"],"sourcesContent":["/**\n * CacheMissed Event\n *\n * Dispatched when a cache key is not found.\n */\nexport class CacheMissed {\n constructor(\n public readonly storeName: string,\n public readonly key: string,\n public readonly tags: string[] = []\n ) {}\n}\n"],"mappings":"AAKA,IAAa,EAAb,KAAyB,CACvB,YACE,EACA,EACA,EAAiC,EAAE,CACnC,CAHgB,KAAA,UAAA,EACA,KAAA,IAAA,EACA,KAAA,KAAA"}
1
+ {"version":3,"file":"CacheMissed.mjs","names":[],"sources":["../../../src/Cache/Events/CacheMissed.ts"],"sourcesContent":["/**\n * CacheMissed Event\n *\n * Dispatched when a cache key is not found.\n */\nexport class CacheMissed {\n constructor(\n public readonly storeName: string,\n public readonly key: string,\n public readonly tags: string[] = []\n ) {}\n}\n"],"mappings":"AAKA,IAAa,EAAb,KAAyB,CAEL,UACA,IACA,KAHlB,YACE,EACA,EACA,EAAiC,EAAE,CACnC,CAHgB,KAAA,UAAA,EACA,KAAA,IAAA,EACA,KAAA,KAAA"}
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);var e=class{constructor(e,t,n=[]){this.storeName=e,this.key=t,this.tags=n}};exports.KeyForgotten=e;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);var e=class{storeName;key;tags;constructor(e,t,n=[]){this.storeName=e,this.key=t,this.tags=n}};exports.KeyForgotten=e;
@@ -1,2 +1,2 @@
1
- var e=class{constructor(e,t,n=[]){this.storeName=e,this.key=t,this.tags=n}};export{e as KeyForgotten};
1
+ var e=class{storeName;key;tags;constructor(e,t,n=[]){this.storeName=e,this.key=t,this.tags=n}};export{e as KeyForgotten};
2
2
  //# sourceMappingURL=KeyForgotten.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"KeyForgotten.mjs","names":[],"sources":["../../../src/Cache/Events/KeyForgotten.ts"],"sourcesContent":["/**\n * KeyForgotten Event\n *\n * Dispatched when a key is removed from the cache.\n */\nexport class KeyForgotten {\n constructor(\n public readonly storeName: string,\n public readonly key: string,\n public readonly tags: string[] = []\n ) {}\n}\n"],"mappings":"AAKA,IAAa,EAAb,KAA0B,CACxB,YACE,EACA,EACA,EAAiC,EAAE,CACnC,CAHgB,KAAA,UAAA,EACA,KAAA,IAAA,EACA,KAAA,KAAA"}
1
+ {"version":3,"file":"KeyForgotten.mjs","names":[],"sources":["../../../src/Cache/Events/KeyForgotten.ts"],"sourcesContent":["/**\n * KeyForgotten Event\n *\n * Dispatched when a key is removed from the cache.\n */\nexport class KeyForgotten {\n constructor(\n public readonly storeName: string,\n public readonly key: string,\n public readonly tags: string[] = []\n ) {}\n}\n"],"mappings":"AAKA,IAAa,EAAb,KAA0B,CAEN,UACA,IACA,KAHlB,YACE,EACA,EACA,EAAiC,EAAE,CACnC,CAHgB,KAAA,UAAA,EACA,KAAA,IAAA,EACA,KAAA,KAAA"}
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);var e=class{constructor(e,t,n,r,i=[]){this.storeName=e,this.key=t,this.value=n,this.seconds=r,this.tags=i}};exports.KeyWritten=e;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);var e=class{storeName;key;value;seconds;tags;constructor(e,t,n,r,i=[]){this.storeName=e,this.key=t,this.value=n,this.seconds=r,this.tags=i}};exports.KeyWritten=e;
@@ -1,2 +1,2 @@
1
- var e=class{constructor(e,t,n,r,i=[]){this.storeName=e,this.key=t,this.value=n,this.seconds=r,this.tags=i}};export{e as KeyWritten};
1
+ var e=class{storeName;key;value;seconds;tags;constructor(e,t,n,r,i=[]){this.storeName=e,this.key=t,this.value=n,this.seconds=r,this.tags=i}};export{e as KeyWritten};
2
2
  //# sourceMappingURL=KeyWritten.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"KeyWritten.mjs","names":[],"sources":["../../../src/Cache/Events/KeyWritten.ts"],"sourcesContent":["/**\n * KeyWritten Event\n *\n * Dispatched when a value is written to the cache.\n */\nexport class KeyWritten {\n constructor(\n public readonly storeName: string,\n public readonly key: string,\n public readonly value: any,\n public readonly seconds: number | null,\n public readonly tags: string[] = []\n ) {}\n}\n"],"mappings":"AAKA,IAAa,EAAb,KAAwB,CACtB,YACE,EACA,EACA,EACA,EACA,EAAiC,EAAE,CACnC,CALgB,KAAA,UAAA,EACA,KAAA,IAAA,EACA,KAAA,MAAA,EACA,KAAA,QAAA,EACA,KAAA,KAAA"}
1
+ {"version":3,"file":"KeyWritten.mjs","names":[],"sources":["../../../src/Cache/Events/KeyWritten.ts"],"sourcesContent":["/**\n * KeyWritten Event\n *\n * Dispatched when a value is written to the cache.\n */\nexport class KeyWritten {\n constructor(\n public readonly storeName: string,\n public readonly key: string,\n public readonly value: any,\n public readonly seconds: number | null,\n public readonly tags: string[] = []\n ) {}\n}\n"],"mappings":"AAKA,IAAa,EAAb,KAAwB,CAEJ,UACA,IACA,MACA,QACA,KALlB,YACE,EACA,EACA,EACA,EACA,EAAiC,EAAE,CACnC,CALgB,KAAA,UAAA,EACA,KAAA,IAAA,EACA,KAAA,MAAA,EACA,KAAA,QAAA,EACA,KAAA,KAAA"}
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`./Lock.cjs`);var t=class extends e.Lock{constructor(e,t,n=0,r){super(t,n,r),this.store=e}async acquire(){let e=await this.store.get(this.name);return e===null?this.seconds>0?this.store.put(this.name,this.ownerValue,this.seconds):this.store.forever(this.name,this.ownerValue):e===this.ownerValue}async release(){return await this.isOwnedByCurrentProcess()?this.store.forget(this.name):!1}async forceRelease(){return this.store.forget(this.name)}async getCurrentOwner(){return this.store.get(this.name)}};exports.CacheLock=t;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`./Lock.cjs`);var t=class extends e.Lock{store;constructor(e,t,n=0,r){super(t,n,r),this.store=e}async acquire(){let e=await this.store.get(this.name);return e===null?this.seconds>0?this.store.put(this.name,this.ownerValue,this.seconds):this.store.forever(this.name,this.ownerValue):e===this.ownerValue}async release(){return await this.isOwnedByCurrentProcess()?this.store.forget(this.name):!1}async forceRelease(){return this.store.forget(this.name)}async getCurrentOwner(){return this.store.get(this.name)}};exports.CacheLock=t;
@@ -1,2 +1,2 @@
1
- import{Lock as e}from"./Lock.mjs";var t=class extends e{constructor(e,t,n=0,r){super(t,n,r),this.store=e}async acquire(){let e=await this.store.get(this.name);return e===null?this.seconds>0?this.store.put(this.name,this.ownerValue,this.seconds):this.store.forever(this.name,this.ownerValue):e===this.ownerValue}async release(){return await this.isOwnedByCurrentProcess()?this.store.forget(this.name):!1}async forceRelease(){return this.store.forget(this.name)}async getCurrentOwner(){return this.store.get(this.name)}};export{t as CacheLock};
1
+ import{Lock as e}from"./Lock.mjs";var t=class extends e{store;constructor(e,t,n=0,r){super(t,n,r),this.store=e}async acquire(){let e=await this.store.get(this.name);return e===null?this.seconds>0?this.store.put(this.name,this.ownerValue,this.seconds):this.store.forever(this.name,this.ownerValue):e===this.ownerValue}async release(){return await this.isOwnedByCurrentProcess()?this.store.forget(this.name):!1}async forceRelease(){return this.store.forget(this.name)}async getCurrentOwner(){return this.store.get(this.name)}};export{t as CacheLock};
2
2
  //# sourceMappingURL=CacheLock.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"CacheLock.mjs","names":[],"sources":["../../../src/Cache/Locks/CacheLock.ts"],"sourcesContent":["/**\n * CacheLock\n *\n * Cache store-backed atomic lock implementation.\n * Uses the cache store's add/forget methods for locking.\n *\n * Mirrors Laravel's Illuminate\\Cache\\CacheLock.\n */\n\nimport type { Store } from '@/Cache/Contracts/Store';\nimport { Lock } from './Lock';\n\nexport class CacheLock extends Lock {\n constructor(\n protected store: Store,\n name: string,\n seconds: number = 0,\n owner?: string\n ) {\n super(name, seconds, owner);\n }\n\n protected async acquire(): Promise<boolean> {\n // Check if already locked\n const existing = await this.store.get(this.name);\n\n if (existing !== null) {\n // Already locked - check if it's us\n if (existing === this.ownerValue) {\n return true;\n }\n return false;\n }\n\n // Acquire the lock\n if (this.seconds > 0) {\n return this.store.put(this.name, this.ownerValue, this.seconds);\n }\n\n return this.store.forever(this.name, this.ownerValue);\n }\n\n async release(): Promise<boolean> {\n if (await this.isOwnedByCurrentProcess()) {\n return this.store.forget(this.name);\n }\n return false;\n }\n\n async forceRelease(): Promise<boolean> {\n return this.store.forget(this.name);\n }\n\n protected async getCurrentOwner(): Promise<string | null> {\n return this.store.get(this.name);\n }\n}\n"],"mappings":"kCAYA,IAAa,EAAb,cAA+B,CAAK,CAClC,YACE,EACA,EACA,EAAkB,EAClB,EACA,CACA,MAAM,EAAM,EAAS,EAAM,CALjB,KAAA,MAAA,EAQZ,MAAgB,SAA4B,CAE1C,IAAM,EAAW,MAAM,KAAK,MAAM,IAAI,KAAK,KAAK,CAehD,OAbI,IAAa,KASb,KAAK,QAAU,EACV,KAAK,MAAM,IAAI,KAAK,KAAM,KAAK,WAAY,KAAK,QAAQ,CAG1D,KAAK,MAAM,QAAQ,KAAK,KAAM,KAAK,WAAW,CAX/C,IAAa,KAAK,WAc1B,MAAM,SAA4B,CAIhC,OAHI,MAAM,KAAK,yBAAyB,CAC/B,KAAK,MAAM,OAAO,KAAK,KAAK,CAE9B,GAGT,MAAM,cAAiC,CACrC,OAAO,KAAK,MAAM,OAAO,KAAK,KAAK,CAGrC,MAAgB,iBAA0C,CACxD,OAAO,KAAK,MAAM,IAAI,KAAK,KAAK"}
1
+ {"version":3,"file":"CacheLock.mjs","names":[],"sources":["../../../src/Cache/Locks/CacheLock.ts"],"sourcesContent":["/**\n * CacheLock\n *\n * Cache store-backed atomic lock implementation.\n * Uses the cache store's add/forget methods for locking.\n *\n * Mirrors Laravel's Illuminate\\Cache\\CacheLock.\n */\n\nimport type { Store } from '@/Cache/Contracts/Store';\nimport { Lock } from './Lock';\n\nexport class CacheLock extends Lock {\n constructor(\n protected store: Store,\n name: string,\n seconds: number = 0,\n owner?: string\n ) {\n super(name, seconds, owner);\n }\n\n protected async acquire(): Promise<boolean> {\n // Check if already locked\n const existing = await this.store.get(this.name);\n\n if (existing !== null) {\n // Already locked - check if it's us\n if (existing === this.ownerValue) {\n return true;\n }\n return false;\n }\n\n // Acquire the lock\n if (this.seconds > 0) {\n return this.store.put(this.name, this.ownerValue, this.seconds);\n }\n\n return this.store.forever(this.name, this.ownerValue);\n }\n\n async release(): Promise<boolean> {\n if (await this.isOwnedByCurrentProcess()) {\n return this.store.forget(this.name);\n }\n return false;\n }\n\n async forceRelease(): Promise<boolean> {\n return this.store.forget(this.name);\n }\n\n protected async getCurrentOwner(): Promise<string | null> {\n return this.store.get(this.name);\n }\n}\n"],"mappings":"kCAYA,IAAa,EAAb,cAA+B,CAAK,CAEtB,MADZ,YACE,EACA,EACA,EAAkB,EAClB,EACA,CACA,MAAM,EAAM,EAAS,EAAM,CALjB,KAAA,MAAA,EAQZ,MAAgB,SAA4B,CAE1C,IAAM,EAAW,MAAM,KAAK,MAAM,IAAI,KAAK,KAAK,CAehD,OAbI,IAAa,KASb,KAAK,QAAU,EACV,KAAK,MAAM,IAAI,KAAK,KAAM,KAAK,WAAY,KAAK,QAAQ,CAG1D,KAAK,MAAM,QAAQ,KAAK,KAAM,KAAK,WAAW,CAX/C,IAAa,KAAK,WAc1B,MAAM,SAA4B,CAIhC,OAHI,MAAM,KAAK,yBAAyB,CAC/B,KAAK,MAAM,OAAO,KAAK,KAAK,CAE9B,GAGT,MAAM,cAAiC,CACrC,OAAO,KAAK,MAAM,OAAO,KAAK,KAAK,CAGrC,MAAgB,iBAA0C,CACxD,OAAO,KAAK,MAAM,IAAI,KAAK,KAAK"}
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`./LockTimeoutException.cjs`);let t=require(`crypto`);var n=class{ownerValue;constructor(e,n=0,r){this.name=e,this.seconds=n,this.ownerValue=r||(0,t.randomUUID)()}async get(e){if(!await this.acquire())return!1;if(e)try{return await e()}finally{await this.release()}return!0}async block(t,n){let r=Date.now(),i=t*1e3;for(;Date.now()-r<i;){if(await this.acquire()){if(n)try{return await n()}finally{await this.release()}return!0}await this.sleep(250)}throw new e.LockTimeoutException(`Unable to acquire lock [${this.name}] within ${t} second(s).`)}owner(){return this.ownerValue}async isOwnedByCurrentProcess(){return await this.getCurrentOwner()===this.ownerValue}sleep(e){return new Promise(t=>setTimeout(t,e))}};exports.Lock=n;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`./LockTimeoutException.cjs`);let t=require(`crypto`);var n=class{name;seconds;ownerValue;constructor(e,n=0,r){this.name=e,this.seconds=n,this.ownerValue=r||(0,t.randomUUID)()}async get(e){if(!await this.acquire())return!1;if(e)try{return await e()}finally{await this.release()}return!0}async block(t,n){let r=Date.now(),i=t*1e3;for(;Date.now()-r<i;){if(await this.acquire()){if(n)try{return await n()}finally{await this.release()}return!0}await this.sleep(250)}throw new e.LockTimeoutException(`Unable to acquire lock [${this.name}] within ${t} second(s).`)}owner(){return this.ownerValue}async isOwnedByCurrentProcess(){return await this.getCurrentOwner()===this.ownerValue}sleep(e){return new Promise(t=>setTimeout(t,e))}};exports.Lock=n;
@@ -1,2 +1,2 @@
1
- import{LockTimeoutException as e}from"./LockTimeoutException.mjs";import{randomUUID as t}from"crypto";var n=class{ownerValue;constructor(e,n=0,r){this.name=e,this.seconds=n,this.ownerValue=r||t()}async get(e){if(!await this.acquire())return!1;if(e)try{return await e()}finally{await this.release()}return!0}async block(t,n){let r=Date.now(),i=t*1e3;for(;Date.now()-r<i;){if(await this.acquire()){if(n)try{return await n()}finally{await this.release()}return!0}await this.sleep(250)}throw new e(`Unable to acquire lock [${this.name}] within ${t} second(s).`)}owner(){return this.ownerValue}async isOwnedByCurrentProcess(){return await this.getCurrentOwner()===this.ownerValue}sleep(e){return new Promise(t=>setTimeout(t,e))}};export{n as Lock};
1
+ import{LockTimeoutException as e}from"./LockTimeoutException.mjs";import{randomUUID as t}from"crypto";var n=class{name;seconds;ownerValue;constructor(e,n=0,r){this.name=e,this.seconds=n,this.ownerValue=r||t()}async get(e){if(!await this.acquire())return!1;if(e)try{return await e()}finally{await this.release()}return!0}async block(t,n){let r=Date.now(),i=t*1e3;for(;Date.now()-r<i;){if(await this.acquire()){if(n)try{return await n()}finally{await this.release()}return!0}await this.sleep(250)}throw new e(`Unable to acquire lock [${this.name}] within ${t} second(s).`)}owner(){return this.ownerValue}async isOwnedByCurrentProcess(){return await this.getCurrentOwner()===this.ownerValue}sleep(e){return new Promise(t=>setTimeout(t,e))}};export{n as Lock};
2
2
  //# sourceMappingURL=Lock.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Lock.mjs","names":[],"sources":["../../../src/Cache/Locks/Lock.ts"],"sourcesContent":["/**\n * Lock Base Class\n *\n * Abstract base class for atomic lock implementations.\n * Provides the shared logic for acquiring, blocking, and releasing locks.\n *\n * Mirrors Laravel's Illuminate\\Cache\\Lock.\n */\n\nimport { randomUUID } from 'crypto';\nimport type { LockContract } from '@/Cache/Contracts/Lock';\nimport { LockTimeoutException } from './LockTimeoutException';\n\nexport abstract class Lock implements LockContract {\n protected ownerValue: string;\n\n constructor(\n protected name: string,\n protected seconds: number = 0,\n owner?: string\n ) {\n this.ownerValue = owner || randomUUID();\n }\n\n /**\n * Attempt to acquire the lock at the driver level\n */\n protected abstract acquire(): Promise<boolean>;\n\n /**\n * Release the lock at the driver level\n */\n abstract release(): Promise<boolean>;\n\n /**\n * Force release the lock regardless of ownership\n */\n abstract forceRelease(): Promise<boolean>;\n\n /**\n * Get the current owner of the lock from the store\n */\n protected abstract getCurrentOwner(): Promise<string | null>;\n\n /**\n * Attempt to acquire the lock.\n * If a callback is provided, execute it and auto-release.\n */\n async get(): Promise<boolean>;\n async get<T = any>(callback: () => Promise<T> | T): Promise<T>;\n async get<T = any>(callback?: () => Promise<T> | T): Promise<boolean | T> {\n const acquired = await this.acquire();\n\n if (!acquired) {\n return false;\n }\n\n if (callback) {\n try {\n return await callback();\n } finally {\n await this.release();\n }\n }\n\n return true;\n }\n\n /**\n * Block until the lock is acquired or timeout expires.\n * If a callback is provided, execute it and auto-release.\n */\n async block(seconds: number): Promise<boolean>;\n async block<T = any>(seconds: number, callback: () => Promise<T> | T): Promise<T>;\n async block<T = any>(seconds: number, callback?: () => Promise<T> | T): Promise<boolean | T> {\n const startTime = Date.now();\n const timeoutMs = seconds * 1000;\n\n while (Date.now() - startTime < timeoutMs) {\n if (await this.acquire()) {\n if (callback) {\n try {\n return await callback();\n } finally {\n await this.release();\n }\n }\n return true;\n }\n\n await this.sleep(250);\n }\n\n throw new LockTimeoutException(`Unable to acquire lock [${this.name}] within ${seconds} second(s).`);\n }\n\n /**\n * Returns the lock owner identifier\n */\n owner(): string {\n return this.ownerValue;\n }\n\n /**\n * Check if the lock is owned by the current process\n */\n async isOwnedByCurrentProcess(): Promise<boolean> {\n const currentOwner = await this.getCurrentOwner();\n return currentOwner === this.ownerValue;\n }\n\n protected sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n }\n}\n"],"mappings":"sGAaA,IAAsB,EAAtB,KAAmD,CACjD,WAEA,YACE,EACA,EAA4B,EAC5B,EACA,CAHU,KAAA,KAAA,EACA,KAAA,QAAA,EAGV,KAAK,WAAa,GAAS,GAAY,CA6BzC,MAAM,IAAa,EAAuD,CAGxE,GAAI,CAFa,MAAM,KAAK,SAAS,CAGnC,MAAO,GAGT,GAAI,EACF,GAAI,CACF,OAAO,MAAM,GAAU,QACf,CACR,MAAM,KAAK,SAAS,CAIxB,MAAO,GAST,MAAM,MAAe,EAAiB,EAAuD,CAC3F,IAAM,EAAY,KAAK,KAAK,CACtB,EAAY,EAAU,IAE5B,KAAO,KAAK,KAAK,CAAG,EAAY,GAAW,CACzC,GAAI,MAAM,KAAK,SAAS,CAAE,CACxB,GAAI,EACF,GAAI,CACF,OAAO,MAAM,GAAU,QACf,CACR,MAAM,KAAK,SAAS,CAGxB,MAAO,GAGT,MAAM,KAAK,MAAM,IAAI,CAGvB,MAAM,IAAI,EAAqB,2BAA2B,KAAK,KAAK,WAAW,EAAQ,aAAa,CAMtG,OAAgB,CACd,OAAO,KAAK,WAMd,MAAM,yBAA4C,CAEhD,OADqB,MAAM,KAAK,iBAAiB,GACzB,KAAK,WAG/B,MAAgB,EAA2B,CACzC,OAAO,IAAI,QAAS,GAAY,WAAW,EAAS,EAAG,CAAC"}
1
+ {"version":3,"file":"Lock.mjs","names":[],"sources":["../../../src/Cache/Locks/Lock.ts"],"sourcesContent":["/**\n * Lock Base Class\n *\n * Abstract base class for atomic lock implementations.\n * Provides the shared logic for acquiring, blocking, and releasing locks.\n *\n * Mirrors Laravel's Illuminate\\Cache\\Lock.\n */\n\nimport { randomUUID } from 'crypto';\nimport type { LockContract } from '@/Cache/Contracts/Lock';\nimport { LockTimeoutException } from './LockTimeoutException';\n\nexport abstract class Lock implements LockContract {\n protected ownerValue: string;\n\n constructor(\n protected name: string,\n protected seconds: number = 0,\n owner?: string\n ) {\n this.ownerValue = owner || randomUUID();\n }\n\n /**\n * Attempt to acquire the lock at the driver level\n */\n protected abstract acquire(): Promise<boolean>;\n\n /**\n * Release the lock at the driver level\n */\n abstract release(): Promise<boolean>;\n\n /**\n * Force release the lock regardless of ownership\n */\n abstract forceRelease(): Promise<boolean>;\n\n /**\n * Get the current owner of the lock from the store\n */\n protected abstract getCurrentOwner(): Promise<string | null>;\n\n /**\n * Attempt to acquire the lock.\n * If a callback is provided, execute it and auto-release.\n */\n async get(): Promise<boolean>;\n async get<T = any>(callback: () => Promise<T> | T): Promise<T>;\n async get<T = any>(callback?: () => Promise<T> | T): Promise<boolean | T> {\n const acquired = await this.acquire();\n\n if (!acquired) {\n return false;\n }\n\n if (callback) {\n try {\n return await callback();\n } finally {\n await this.release();\n }\n }\n\n return true;\n }\n\n /**\n * Block until the lock is acquired or timeout expires.\n * If a callback is provided, execute it and auto-release.\n */\n async block(seconds: number): Promise<boolean>;\n async block<T = any>(seconds: number, callback: () => Promise<T> | T): Promise<T>;\n async block<T = any>(seconds: number, callback?: () => Promise<T> | T): Promise<boolean | T> {\n const startTime = Date.now();\n const timeoutMs = seconds * 1000;\n\n while (Date.now() - startTime < timeoutMs) {\n if (await this.acquire()) {\n if (callback) {\n try {\n return await callback();\n } finally {\n await this.release();\n }\n }\n return true;\n }\n\n await this.sleep(250);\n }\n\n throw new LockTimeoutException(`Unable to acquire lock [${this.name}] within ${seconds} second(s).`);\n }\n\n /**\n * Returns the lock owner identifier\n */\n owner(): string {\n return this.ownerValue;\n }\n\n /**\n * Check if the lock is owned by the current process\n */\n async isOwnedByCurrentProcess(): Promise<boolean> {\n const currentOwner = await this.getCurrentOwner();\n return currentOwner === this.ownerValue;\n }\n\n protected sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n }\n}\n"],"mappings":"sGAaA,IAAsB,EAAtB,KAAmD,CAIrC,KACA,QAJZ,WAEA,YACE,EACA,EAA4B,EAC5B,EACA,CAHU,KAAA,KAAA,EACA,KAAA,QAAA,EAGV,KAAK,WAAa,GAAS,GAAY,CA6BzC,MAAM,IAAa,EAAuD,CAGxE,GAAI,CAAC,MAFkB,KAAK,SAAS,CAGnC,MAAO,GAGT,GAAI,EACF,GAAI,CACF,OAAO,MAAM,GAAU,QACf,CACR,MAAM,KAAK,SAAS,CAIxB,MAAO,GAST,MAAM,MAAe,EAAiB,EAAuD,CAC3F,IAAM,EAAY,KAAK,KAAK,CACtB,EAAY,EAAU,IAE5B,KAAO,KAAK,KAAK,CAAG,EAAY,GAAW,CACzC,GAAI,MAAM,KAAK,SAAS,CAAE,CACxB,GAAI,EACF,GAAI,CACF,OAAO,MAAM,GAAU,QACf,CACR,MAAM,KAAK,SAAS,CAGxB,MAAO,GAGT,MAAM,KAAK,MAAM,IAAI,CAGvB,MAAM,IAAI,EAAqB,2BAA2B,KAAK,KAAK,WAAW,EAAQ,aAAa,CAMtG,OAAgB,CACd,OAAO,KAAK,WAMd,MAAM,yBAA4C,CAEhD,OAAO,MADoB,KAAK,iBAAiB,GACzB,KAAK,WAG/B,MAAgB,EAA2B,CACzC,OAAO,IAAI,QAAS,GAAY,WAAW,EAAS,EAAG,CAAC"}
@@ -1 +1 @@
1
- require(`../_virtual/_rolldown/runtime.cjs`);const e=require(`./Locks/CacheLock.cjs`),t=require(`./Tags/TaggedCache.cjs`),n=require(`./Tags/TagSet.cjs`);var r=class{defaultCacheTime=null;storeName=``;constructor(e,t={}){this.store=e,this.config=t}setStoreName(e){return this.storeName=e,this}async get(e,t){return await this.store.get(e)??(typeof t==`function`?t():t??null)}async many(e){return this.store.many(e)}async put(e,t,n){let r=this.getSeconds(n);return r===null?this.forever(e,t):r<=0?this.forget(e):this.store.put(e,t,r)}async putMany(e,t){let n=this.getSeconds(t)??0;return this.store.putMany(e,n)}async increment(e,t=1){return this.store.increment(e,t)}async decrement(e,t=1){return this.store.decrement(e,t)}async forever(e,t){return this.store.forever(e,t)}async forget(e){return this.store.forget(e)}async flush(){return this.store.flush()}getPrefix(){return this.store.getPrefix()}async has(e){return await this.store.get(e)!=null}async missing(e){return!await this.has(e)}async pull(e,t){let n=await this.get(e,t);return n!=null&&n!==t&&await this.forget(e),n}async add(e,t,n){return await this.has(e)?!1:this.put(e,t,n)}async remember(e,t,n){let r=await this.store.get(e);if(r!=null)return r;let i=await n(),a=this.getSeconds(t);return a!==null&&a>0?await this.store.put(e,i,a):await this.store.forever(e,i),i}async rememberForever(e,t){let n=await this.store.get(e);if(n!=null)return n;let r=await t();return await this.store.forever(e,r),r}async flexible(e,t,n){let[r,i]=t,a=`${e}:flexible_meta`,o=await this.store.get(e),s=await this.store.get(a);if(o!=null&&s&&typeof s==`object`&&s.freshUntil)return Math.floor(Date.now()/1e3)<s.freshUntil||setImmediate(async()=>{try{let t=await n(),o=Math.floor(Date.now()/1e3)+r;await this.store.put(e,t,i),await this.store.put(a,{freshUntil:o},i)}catch{}}),o;let c=await n(),l=Math.floor(Date.now()/1e3)+r;return await this.store.put(e,c,i),await this.store.put(a,{freshUntil:l},i),c}lock(t,n=0,r){return new e.CacheLock(this.store,t,n,r)}restoreLock(t,n){return new e.CacheLock(this.store,t,0,n)}tags(e){let r=Array.isArray(e)?e:[e],i=new n.TagSet(this.store,r);return new t.TaggedCache(this.store,i)}getStore(){return this.store}getDefaultCacheTime(){return this.defaultCacheTime}setDefaultCacheTime(e){return this.defaultCacheTime=e,this}getSeconds(e){if(e==null)return this.defaultCacheTime;if(e instanceof Date){let t=Math.floor((e.getTime()-Date.now())/1e3);return Math.max(0,t)}return e}};exports.Repository=r;
1
+ require(`../_virtual/_rolldown/runtime.cjs`);const e=require(`./Locks/CacheLock.cjs`),t=require(`./Tags/TaggedCache.cjs`),n=require(`./Tags/TagSet.cjs`);var r=class{store;config;defaultCacheTime=null;storeName=``;constructor(e,t={}){this.store=e,this.config=t}setStoreName(e){return this.storeName=e,this}async get(e,t){return await this.store.get(e)??(typeof t==`function`?t():t??null)}async many(e){return this.store.many(e)}async put(e,t,n){let r=this.getSeconds(n);return r===null?this.forever(e,t):r<=0?this.forget(e):this.store.put(e,t,r)}async putMany(e,t){let n=this.getSeconds(t)??0;return this.store.putMany(e,n)}async increment(e,t=1){return this.store.increment(e,t)}async decrement(e,t=1){return this.store.decrement(e,t)}async forever(e,t){return this.store.forever(e,t)}async forget(e){return this.store.forget(e)}async flush(){return this.store.flush()}getPrefix(){return this.store.getPrefix()}async has(e){return await this.store.get(e)!=null}async missing(e){return!await this.has(e)}async pull(e,t){let n=await this.get(e,t);return n!=null&&n!==t&&await this.forget(e),n}async add(e,t,n){return await this.has(e)?!1:this.put(e,t,n)}async remember(e,t,n){let r=await this.store.get(e);if(r!=null)return r;let i=await n(),a=this.getSeconds(t);return a!==null&&a>0?await this.store.put(e,i,a):await this.store.forever(e,i),i}async rememberForever(e,t){let n=await this.store.get(e);if(n!=null)return n;let r=await t();return await this.store.forever(e,r),r}async flexible(e,t,n){let[r,i]=t,a=`${e}:flexible_meta`,o=await this.store.get(e),s=await this.store.get(a);if(o!=null&&s&&typeof s==`object`&&s.freshUntil)return Math.floor(Date.now()/1e3)<s.freshUntil||setImmediate(async()=>{try{let t=await n(),o=Math.floor(Date.now()/1e3)+r;await this.store.put(e,t,i),await this.store.put(a,{freshUntil:o},i)}catch{}}),o;let c=await n(),l=Math.floor(Date.now()/1e3)+r;return await this.store.put(e,c,i),await this.store.put(a,{freshUntil:l},i),c}lock(t,n=0,r){return new e.CacheLock(this.store,t,n,r)}restoreLock(t,n){return new e.CacheLock(this.store,t,0,n)}tags(e){let r=Array.isArray(e)?e:[e],i=new n.TagSet(this.store,r);return new t.TaggedCache(this.store,i)}getStore(){return this.store}getDefaultCacheTime(){return this.defaultCacheTime}setDefaultCacheTime(e){return this.defaultCacheTime=e,this}getSeconds(e){if(e==null)return this.defaultCacheTime;if(e instanceof Date){let t=Math.floor((e.getTime()-Date.now())/1e3);return Math.max(0,t)}return e}};exports.Repository=r;
@@ -1,2 +1,2 @@
1
- import{CacheLock as e}from"./Locks/CacheLock.mjs";import{TaggedCache as t}from"./Tags/TaggedCache.mjs";import{TagSet as n}from"./Tags/TagSet.mjs";var r=class{defaultCacheTime=null;storeName=``;constructor(e,t={}){this.store=e,this.config=t}setStoreName(e){return this.storeName=e,this}async get(e,t){return await this.store.get(e)??(typeof t==`function`?t():t??null)}async many(e){return this.store.many(e)}async put(e,t,n){let r=this.getSeconds(n);return r===null?this.forever(e,t):r<=0?this.forget(e):this.store.put(e,t,r)}async putMany(e,t){let n=this.getSeconds(t)??0;return this.store.putMany(e,n)}async increment(e,t=1){return this.store.increment(e,t)}async decrement(e,t=1){return this.store.decrement(e,t)}async forever(e,t){return this.store.forever(e,t)}async forget(e){return this.store.forget(e)}async flush(){return this.store.flush()}getPrefix(){return this.store.getPrefix()}async has(e){return await this.store.get(e)!=null}async missing(e){return!await this.has(e)}async pull(e,t){let n=await this.get(e,t);return n!=null&&n!==t&&await this.forget(e),n}async add(e,t,n){return await this.has(e)?!1:this.put(e,t,n)}async remember(e,t,n){let r=await this.store.get(e);if(r!=null)return r;let i=await n(),a=this.getSeconds(t);return a!==null&&a>0?await this.store.put(e,i,a):await this.store.forever(e,i),i}async rememberForever(e,t){let n=await this.store.get(e);if(n!=null)return n;let r=await t();return await this.store.forever(e,r),r}async flexible(e,t,n){let[r,i]=t,a=`${e}:flexible_meta`,o=await this.store.get(e),s=await this.store.get(a);if(o!=null&&s&&typeof s==`object`&&s.freshUntil)return Math.floor(Date.now()/1e3)<s.freshUntil||setImmediate(async()=>{try{let t=await n(),o=Math.floor(Date.now()/1e3)+r;await this.store.put(e,t,i),await this.store.put(a,{freshUntil:o},i)}catch{}}),o;let c=await n(),l=Math.floor(Date.now()/1e3)+r;return await this.store.put(e,c,i),await this.store.put(a,{freshUntil:l},i),c}lock(t,n=0,r){return new e(this.store,t,n,r)}restoreLock(t,n){return new e(this.store,t,0,n)}tags(e){let r=Array.isArray(e)?e:[e],i=new n(this.store,r);return new t(this.store,i)}getStore(){return this.store}getDefaultCacheTime(){return this.defaultCacheTime}setDefaultCacheTime(e){return this.defaultCacheTime=e,this}getSeconds(e){if(e==null)return this.defaultCacheTime;if(e instanceof Date){let t=Math.floor((e.getTime()-Date.now())/1e3);return Math.max(0,t)}return e}};export{r as Repository};
1
+ import{CacheLock as e}from"./Locks/CacheLock.mjs";import{TaggedCache as t}from"./Tags/TaggedCache.mjs";import{TagSet as n}from"./Tags/TagSet.mjs";var r=class{store;config;defaultCacheTime=null;storeName=``;constructor(e,t={}){this.store=e,this.config=t}setStoreName(e){return this.storeName=e,this}async get(e,t){return await this.store.get(e)??(typeof t==`function`?t():t??null)}async many(e){return this.store.many(e)}async put(e,t,n){let r=this.getSeconds(n);return r===null?this.forever(e,t):r<=0?this.forget(e):this.store.put(e,t,r)}async putMany(e,t){let n=this.getSeconds(t)??0;return this.store.putMany(e,n)}async increment(e,t=1){return this.store.increment(e,t)}async decrement(e,t=1){return this.store.decrement(e,t)}async forever(e,t){return this.store.forever(e,t)}async forget(e){return this.store.forget(e)}async flush(){return this.store.flush()}getPrefix(){return this.store.getPrefix()}async has(e){return await this.store.get(e)!=null}async missing(e){return!await this.has(e)}async pull(e,t){let n=await this.get(e,t);return n!=null&&n!==t&&await this.forget(e),n}async add(e,t,n){return await this.has(e)?!1:this.put(e,t,n)}async remember(e,t,n){let r=await this.store.get(e);if(r!=null)return r;let i=await n(),a=this.getSeconds(t);return a!==null&&a>0?await this.store.put(e,i,a):await this.store.forever(e,i),i}async rememberForever(e,t){let n=await this.store.get(e);if(n!=null)return n;let r=await t();return await this.store.forever(e,r),r}async flexible(e,t,n){let[r,i]=t,a=`${e}:flexible_meta`,o=await this.store.get(e),s=await this.store.get(a);if(o!=null&&s&&typeof s==`object`&&s.freshUntil)return Math.floor(Date.now()/1e3)<s.freshUntil||setImmediate(async()=>{try{let t=await n(),o=Math.floor(Date.now()/1e3)+r;await this.store.put(e,t,i),await this.store.put(a,{freshUntil:o},i)}catch{}}),o;let c=await n(),l=Math.floor(Date.now()/1e3)+r;return await this.store.put(e,c,i),await this.store.put(a,{freshUntil:l},i),c}lock(t,n=0,r){return new e(this.store,t,n,r)}restoreLock(t,n){return new e(this.store,t,0,n)}tags(e){let r=Array.isArray(e)?e:[e],i=new n(this.store,r);return new t(this.store,i)}getStore(){return this.store}getDefaultCacheTime(){return this.defaultCacheTime}setDefaultCacheTime(e){return this.defaultCacheTime=e,this}getSeconds(e){if(e==null)return this.defaultCacheTime;if(e instanceof Date){let t=Math.floor((e.getTime()-Date.now())/1e3);return Math.max(0,t)}return e}};export{r as Repository};
2
2
  //# sourceMappingURL=Repository.mjs.map