@stacksjs/actions 0.70.23 → 0.70.26

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 (384) hide show
  1. package/dist/chunk-2gh7kgpc.js +3 -0
  2. package/dist/chunk-2kaj93p5.js +3 -0
  3. package/dist/chunk-2qchdrf9.js +3 -0
  4. package/dist/chunk-3086k7zk.js +184 -0
  5. package/dist/chunk-3beht8ja.js +130 -0
  6. package/dist/chunk-60qjz7zb.js +3 -0
  7. package/dist/chunk-67y94dzt.js +658 -0
  8. package/dist/chunk-6x1m5rkr.js +17 -0
  9. package/dist/chunk-7bpdkc40.js +714 -0
  10. package/dist/chunk-96b7fcmd.js +3 -0
  11. package/dist/chunk-aw6d8zr3.js +7 -0
  12. package/dist/chunk-c8qt2xst.js +3 -0
  13. package/dist/chunk-d4srk6ma.js +3 -0
  14. package/dist/chunk-e9tcbk71.js +1 -0
  15. package/dist/chunk-gt77jmb5.js +46 -0
  16. package/dist/chunk-h93n2j40.js +95 -0
  17. package/dist/chunk-jd1yzkq5.js +3 -0
  18. package/dist/chunk-kzhgexj4.js +3 -0
  19. package/dist/chunk-n1y0gpv6.js +3 -0
  20. package/dist/chunk-n2fd1d0m.js +3 -0
  21. package/dist/chunk-n2x7v39b.js +5 -0
  22. package/dist/chunk-rdajkt2s.js +88 -0
  23. package/dist/chunk-s735m9mg.js +1 -0
  24. package/dist/chunk-schcaf73.js +3 -0
  25. package/dist/chunk-tc935b45.js +93 -0
  26. package/dist/chunk-v0wnrnaa.js +7 -0
  27. package/dist/chunk-w418anbq.js +5 -0
  28. package/dist/chunk-wnrgcx3d.js +114 -0
  29. package/dist/chunk-wv5yb5wb.js +101 -0
  30. package/dist/chunk-x471rxrn.js +7 -0
  31. package/dist/chunk-xg9xscqz.js +1 -0
  32. package/dist/src/action.d.ts +60 -0
  33. package/dist/src/action.js +2 -0
  34. package/dist/src/actions.d.ts +2 -0
  35. package/dist/src/actions.js +2 -0
  36. package/dist/src/add.d.ts +6 -0
  37. package/dist/src/add.js +2 -0
  38. package/dist/src/ai/request-model-access.d.ts +1 -0
  39. package/dist/src/ai/request-model-access.js +2 -0
  40. package/dist/src/auth/client.d.ts +1 -0
  41. package/dist/src/auth/client.js +3 -0
  42. package/dist/src/auth/prune.d.ts +1 -0
  43. package/dist/src/auth/prune.js +2 -0
  44. package/dist/src/auth/setup.d.ts +1 -0
  45. package/dist/src/auth/setup.js +148 -0
  46. package/dist/src/auth/token.d.ts +1 -0
  47. package/dist/src/auth/token.js +2 -0
  48. package/dist/src/build/cli.d.ts +1 -0
  49. package/dist/src/build/cli.js +2 -0
  50. package/dist/src/build/component-libs.d.ts +1 -0
  51. package/dist/src/build/component-libs.js +2 -0
  52. package/dist/src/build/core.d.ts +1 -0
  53. package/dist/src/build/core.js +2 -0
  54. package/dist/src/build/desktop.d.ts +1 -0
  55. package/dist/src/build/desktop.js +2 -0
  56. package/dist/src/build/docs.d.ts +1 -0
  57. package/dist/src/build/docs.js +2 -0
  58. package/dist/src/build/server.d.ts +1 -0
  59. package/dist/src/build/server.js +2 -0
  60. package/dist/src/build/stacks.d.ts +1 -0
  61. package/dist/src/build/stacks.js +2 -0
  62. package/dist/src/build/views.d.ts +1 -0
  63. package/dist/src/build/views.js +2 -0
  64. package/dist/{build.d.ts → src/build.d.ts} +1 -2
  65. package/dist/src/build.js +2 -0
  66. package/dist/src/bump.d.ts +1 -0
  67. package/dist/src/bump.js +2 -0
  68. package/dist/src/cdn/invalidate-cache.d.ts +1 -0
  69. package/dist/src/cdn/invalidate-cache.js +1 -0
  70. package/dist/src/changelog.d.ts +1 -0
  71. package/dist/src/changelog.js +2 -0
  72. package/dist/src/check/ports.d.ts +1 -0
  73. package/dist/src/check/ports.js +2 -0
  74. package/dist/src/clean.d.ts +1 -0
  75. package/dist/src/clean.js +2 -0
  76. package/dist/{commit.d.ts → src/commit.d.ts} +1 -2
  77. package/dist/src/commit.js +2 -0
  78. package/dist/src/copy-types.d.ts +1 -0
  79. package/dist/src/copy-types.js +3 -0
  80. package/dist/src/database/seed.d.ts +1 -0
  81. package/dist/src/database/seed.js +2 -0
  82. package/dist/src/deploy/create-receipt-rule.d.ts +1 -0
  83. package/dist/src/deploy/create-receipt-rule.js +2 -0
  84. package/dist/src/deploy/index.d.ts +1 -0
  85. package/dist/src/deploy/index.js +307 -0
  86. package/dist/src/dev/api.d.ts +1 -0
  87. package/dist/src/dev/api.js +6 -0
  88. package/dist/src/dev/components.d.ts +1 -0
  89. package/dist/src/dev/components.js +2 -0
  90. package/dist/src/dev/dashboard-globals.d.ts +4 -0
  91. package/dist/src/dev/dashboard-globals.js +3 -0
  92. package/dist/src/dev/dashboard-utils.d.ts +126 -0
  93. package/dist/src/dev/dashboard-utils.js +2 -0
  94. package/dist/src/dev/dashboard.d.ts +12 -0
  95. package/dist/src/dev/dashboard.js +8 -0
  96. package/dist/src/dev/desktop.d.ts +1 -0
  97. package/dist/src/dev/desktop.js +2 -0
  98. package/dist/src/dev/docs.d.ts +1 -0
  99. package/dist/src/dev/docs.js +2 -0
  100. package/dist/src/dev/index.d.ts +10 -0
  101. package/dist/src/dev/index.js +2 -0
  102. package/dist/src/dev/system-tray.d.ts +1 -0
  103. package/dist/src/dev/system-tray.js +2 -0
  104. package/dist/src/dev/views.d.ts +1 -0
  105. package/dist/src/dev/views.js +2 -0
  106. package/dist/src/discover-packages.d.ts +18 -0
  107. package/dist/src/discover-packages.js +2 -0
  108. package/dist/src/domains/add.d.ts +1 -0
  109. package/dist/src/domains/add.js +2 -0
  110. package/dist/src/domains/purchase.d.ts +1 -0
  111. package/dist/src/domains/purchase.js +2 -0
  112. package/dist/src/domains/remove.d.ts +1 -0
  113. package/dist/src/domains/remove.js +2 -0
  114. package/dist/{examples.d.ts → src/examples.d.ts} +1 -2
  115. package/dist/src/examples.js +2 -0
  116. package/dist/src/find-projects.d.ts +1 -0
  117. package/dist/src/find-projects.js +2 -0
  118. package/dist/src/fresh.d.ts +1 -0
  119. package/dist/src/fresh.js +2 -0
  120. package/dist/src/generate/action-types.d.ts +1 -0
  121. package/dist/src/generate/action-types.js +8 -0
  122. package/dist/src/generate/component-meta.d.ts +1 -0
  123. package/dist/src/generate/component-meta.js +3 -0
  124. package/dist/src/generate/custom-cli-file.d.ts +1 -0
  125. package/dist/src/generate/custom-cli-file.js +4 -0
  126. package/dist/src/generate/env-files.d.ts +1 -0
  127. package/dist/src/generate/env-files.js +26 -0
  128. package/dist/src/generate/ide-helpers.d.ts +1 -0
  129. package/dist/src/generate/ide-helpers.js +3 -0
  130. package/dist/src/generate/index.d.ts +36 -0
  131. package/dist/src/generate/index.js +2 -0
  132. package/dist/src/generate/lib-entries.d.ts +1 -0
  133. package/dist/src/generate/lib-entries.js +3 -0
  134. package/dist/src/generate/pantry-file.d.ts +1 -0
  135. package/dist/src/generate/pantry-file.js +2 -0
  136. package/dist/src/generate/symlink-core.d.ts +1 -0
  137. package/dist/src/generate/symlink-core.js +2 -0
  138. package/dist/src/generate/types.d.ts +1 -0
  139. package/dist/src/generate/types.js +2 -0
  140. package/dist/src/generate/vscode-custom-data.d.ts +1 -0
  141. package/dist/src/generate/vscode-custom-data.js +3 -0
  142. package/dist/src/generate/web-types.d.ts +1 -0
  143. package/dist/src/generate/web-types.js +1 -0
  144. package/dist/src/helpers/component-meta.d.ts +26 -0
  145. package/dist/src/helpers/component-meta.js +2 -0
  146. package/dist/src/helpers/index.d.ts +4 -0
  147. package/dist/src/helpers/index.js +2 -0
  148. package/dist/{lib-entries.d.ts → src/helpers/lib-entries.d.ts} +9 -5
  149. package/dist/src/helpers/lib-entries.js +2 -0
  150. package/dist/src/helpers/package-json.d.ts +2 -0
  151. package/dist/src/helpers/package-json.js +43 -0
  152. package/dist/src/helpers/utils.d.ts +23 -0
  153. package/dist/src/helpers/utils.js +2 -0
  154. package/dist/{vscode-custom-data.d.ts → src/helpers/vscode-custom-data.d.ts} +1 -1
  155. package/dist/src/helpers/vscode-custom-data.js +2 -0
  156. package/dist/src/index.d.ts +42 -0
  157. package/dist/src/index.js +2 -0
  158. package/dist/src/key-generate.d.ts +1 -0
  159. package/dist/src/key-generate.js +2 -0
  160. package/dist/src/lint/fix.d.ts +1 -0
  161. package/dist/src/lint/fix.js +4 -0
  162. package/dist/src/lint/index.d.ts +1 -0
  163. package/dist/src/lint/index.js +3 -0
  164. package/dist/src/make-command.d.ts +10 -0
  165. package/dist/src/make-command.js +2 -0
  166. package/dist/src/make-job.d.ts +5 -0
  167. package/dist/src/make-job.js +2 -0
  168. package/dist/src/make-policy.d.ts +10 -0
  169. package/dist/src/make-policy.js +2 -0
  170. package/dist/src/make-resource.d.ts +10 -0
  171. package/dist/src/make-resource.js +2 -0
  172. package/dist/{make.d.ts → src/make.d.ts} +11 -9
  173. package/dist/src/make.js +2 -0
  174. package/dist/src/migrate/database.d.ts +1 -0
  175. package/dist/src/migrate/database.js +2 -0
  176. package/dist/src/migrate/fresh.d.ts +1 -0
  177. package/dist/src/migrate/fresh.js +2 -0
  178. package/dist/src/orm/base.d.ts +1 -0
  179. package/dist/src/orm/base.js +2 -0
  180. package/dist/src/orm/test.d.ts +1 -0
  181. package/dist/src/orm/test.js +1 -0
  182. package/dist/src/prepublish.d.ts +1 -0
  183. package/dist/src/prepublish.js +2 -0
  184. package/dist/src/queue/clear.d.ts +1 -0
  185. package/dist/src/queue/clear.js +2 -0
  186. package/dist/src/queue/failed.d.ts +1 -0
  187. package/dist/src/queue/failed.js +5 -0
  188. package/dist/src/queue/flush.d.ts +1 -0
  189. package/dist/src/queue/flush.js +3 -0
  190. package/dist/src/queue/inspect.d.ts +1 -0
  191. package/dist/src/queue/inspect.js +8 -0
  192. package/dist/src/queue/monitor.d.ts +1 -0
  193. package/dist/src/queue/monitor.js +7 -0
  194. package/dist/src/queue/retry.d.ts +1 -0
  195. package/dist/src/queue/retry.js +2 -0
  196. package/dist/src/queue/schedule-list.d.ts +1 -0
  197. package/dist/src/queue/schedule-list.js +5 -0
  198. package/dist/src/queue/schedule.d.ts +1 -0
  199. package/dist/src/queue/schedule.js +2 -0
  200. package/dist/src/queue/status.d.ts +1 -0
  201. package/dist/src/queue/status.js +5 -0
  202. package/dist/src/queue/table.d.ts +1 -0
  203. package/dist/src/queue/table.js +2 -0
  204. package/dist/src/queue/work.d.ts +1 -0
  205. package/dist/src/queue/work.js +2 -0
  206. package/dist/src/release.d.ts +1 -0
  207. package/dist/src/release.js +3 -0
  208. package/dist/src/route/list.d.ts +1 -0
  209. package/dist/src/route/list.js +3 -0
  210. package/dist/src/run-action.d.ts +2 -0
  211. package/dist/src/run-action.js +2 -0
  212. package/dist/src/saas/setup.d.ts +1 -0
  213. package/dist/src/saas/setup.js +2 -0
  214. package/dist/src/scaffold-crud.d.ts +25 -0
  215. package/dist/src/scaffold-crud.js +2 -0
  216. package/dist/src/schedule/run.d.ts +1 -0
  217. package/dist/src/schedule/run.js +2 -0
  218. package/dist/src/search/flush.d.ts +1 -0
  219. package/dist/src/search/flush.js +2 -0
  220. package/dist/src/search/import.d.ts +1 -0
  221. package/dist/src/search/import.js +2 -0
  222. package/dist/src/search/settings-list.d.ts +1 -0
  223. package/dist/src/search/settings-list.js +2 -0
  224. package/dist/src/search/settings.d.ts +1 -0
  225. package/dist/src/search/settings.js +2 -0
  226. package/dist/src/serve/api.d.ts +1 -0
  227. package/dist/src/serve/api.js +2 -0
  228. package/dist/src/setup/index.d.ts +1 -0
  229. package/dist/src/setup/index.js +2 -0
  230. package/dist/src/setup/ssl.d.ts +38 -0
  231. package/dist/src/setup/ssl.js +2 -0
  232. package/dist/src/stacks.d.ts +4 -0
  233. package/dist/src/stacks.js +2 -0
  234. package/dist/src/templates.d.ts +8 -0
  235. package/dist/src/templates.js +2 -0
  236. package/dist/src/test/feature.d.ts +1 -0
  237. package/dist/src/test/feature.js +2 -0
  238. package/dist/src/test/index.d.ts +1 -0
  239. package/dist/src/test/index.js +2 -0
  240. package/dist/src/test/ui.d.ts +1 -0
  241. package/dist/src/test/ui.js +2 -0
  242. package/dist/src/test/unit.d.ts +1 -0
  243. package/dist/src/test/unit.js +2 -0
  244. package/dist/src/typecheck.d.ts +1 -0
  245. package/dist/src/typecheck.js +2 -0
  246. package/dist/{types.d.ts → src/types.d.ts} +1 -2
  247. package/dist/src/types.js +2 -0
  248. package/dist/src/upgrade/binary.d.ts +1 -0
  249. package/dist/src/upgrade/binary.js +2 -0
  250. package/dist/src/upgrade/bun.d.ts +1 -0
  251. package/dist/src/upgrade/bun.js +1 -0
  252. package/dist/src/upgrade/dependencies.d.ts +1 -0
  253. package/dist/src/upgrade/dependencies.js +2 -0
  254. package/dist/src/upgrade/framework-utils.d.ts +102 -0
  255. package/dist/src/upgrade/framework-utils.js +2 -0
  256. package/dist/src/upgrade/framework.d.ts +1 -0
  257. package/dist/src/upgrade/framework.js +7 -0
  258. package/dist/src/upgrade/index.d.ts +1 -0
  259. package/dist/src/upgrade/index.js +2 -0
  260. package/dist/src/upgrade/shell.d.ts +1 -0
  261. package/dist/src/upgrade/shell.js +5 -0
  262. package/dist/src/upgrade.d.ts +7 -0
  263. package/dist/src/upgrade.js +2 -0
  264. package/package.json +39 -23
  265. package/dist/action-types.d.ts +0 -9
  266. package/dist/action.d.ts +0 -64
  267. package/dist/actions.d.ts +0 -2
  268. package/dist/add.d.ts +0 -5
  269. package/dist/add.js +0 -33
  270. package/dist/api.d.ts +0 -1
  271. package/dist/binary.d.ts +0 -2
  272. package/dist/build/component-libs.js +0 -9
  273. package/dist/build/core.js +0 -23
  274. package/dist/build/stacks.js +0 -8
  275. package/dist/build.js +0 -108
  276. package/dist/bump.d.ts +0 -2
  277. package/dist/bump.js +0 -17
  278. package/dist/changelog.d.ts +0 -2
  279. package/dist/changelog.js +0 -17
  280. package/dist/chunk-2dvnt46s.js +0 -7657
  281. package/dist/chunk-494jp8d5.js +0 -54
  282. package/dist/chunk-4axj3j8y.js +0 -34
  283. package/dist/chunk-56ar3gp7.js +0 -3823
  284. package/dist/chunk-76zhb40c.js +0 -92
  285. package/dist/chunk-7s5qcjkt.js +0 -105
  286. package/dist/chunk-9v6qtbez.js +0 -45
  287. package/dist/chunk-a13x0e43.js +0 -1180
  288. package/dist/chunk-a7k3cdby.js +0 -2266
  289. package/dist/chunk-b5g5w1hh.js +0 -1482
  290. package/dist/chunk-bf8bq8pc.js +0 -205
  291. package/dist/chunk-ccnf3w1b.js +0 -2228
  292. package/dist/chunk-dvkgakrr.js +0 -1283
  293. package/dist/chunk-frw3va9v.js +0 -69
  294. package/dist/chunk-hvfeg6n6.js +0 -179248
  295. package/dist/chunk-mdj7x1vs.js +0 -790
  296. package/dist/chunk-mdqphqep.js +0 -438
  297. package/dist/chunk-mmskr8ar.js +0 -212
  298. package/dist/chunk-nrr524a7.js +0 -658
  299. package/dist/chunk-p0c688mg.js +0 -729
  300. package/dist/chunk-pacq2bz6.js +0 -902
  301. package/dist/chunk-psa9yf21.js +0 -72
  302. package/dist/chunk-q81mf99q.js +0 -169
  303. package/dist/chunk-q9dmga3k.js +0 -11
  304. package/dist/chunk-qhh0v93n.js +0 -73
  305. package/dist/chunk-qkm8e752.js +0 -51
  306. package/dist/chunk-saqpg5nd.js +0 -118
  307. package/dist/chunk-t5em30ak.js +0 -379
  308. package/dist/chunk-veja9rez.js +0 -5764
  309. package/dist/chunk-w4bfpxhm.js +0 -311
  310. package/dist/chunk-w6fdq4hk.js +0 -14425
  311. package/dist/chunk-wkwtsvym.js +0 -477
  312. package/dist/chunk-xgsmf4cy.js +0 -410
  313. package/dist/chunk-ykb33tkv.js +0 -177
  314. package/dist/chunk-ze46550n.js +0 -0
  315. package/dist/chunk-zzerxbrm.js +0 -107
  316. package/dist/clean.js +0 -6
  317. package/dist/commit.js +0 -22
  318. package/dist/component-meta.d.ts +0 -15
  319. package/dist/components.d.ts +0 -3
  320. package/dist/copy-types.d.ts +0 -1
  321. package/dist/copy-types.js +0 -14
  322. package/dist/core.d.ts +0 -1
  323. package/dist/create-receipt-rule.d.ts +0 -4
  324. package/dist/database/seed.js +0 -30
  325. package/dist/database.d.ts +0 -2
  326. package/dist/deploy/index.js +0 -48
  327. package/dist/dev/components.js +0 -11
  328. package/dist/dev/docs.js +0 -7
  329. package/dist/dev/index.js +0 -58
  330. package/dist/env-files.d.ts +0 -9
  331. package/dist/examples.js +0 -46
  332. package/dist/feature.d.ts +0 -2
  333. package/dist/find-projects.d.ts +0 -1
  334. package/dist/fix.d.ts +0 -1
  335. package/dist/flush.d.ts +0 -2
  336. package/dist/fresh.d.ts +0 -1
  337. package/dist/fresh.js +0 -21
  338. package/dist/generate/component-meta.js +0 -17
  339. package/dist/generate/ide-helpers.js +0 -18
  340. package/dist/generate/index.js +0 -216
  341. package/dist/generate/lib-entries.js +0 -30
  342. package/dist/generate/vscode-custom-data.js +0 -17
  343. package/dist/helpers/component-meta.js +0 -204227
  344. package/dist/helpers/lib-entries.js +0 -122
  345. package/dist/helpers/package-json.js +0 -96
  346. package/dist/helpers/utils.js +0 -76
  347. package/dist/helpers/vscode-custom-data.js +0 -43
  348. package/dist/import.d.ts +0 -2
  349. package/dist/index.d.ts +0 -2
  350. package/dist/index.js +0 -172
  351. package/dist/key-generate.js +0 -15
  352. package/dist/lint/fix.js +0 -18
  353. package/dist/lint/index.js +0 -5
  354. package/dist/list.d.ts +0 -1
  355. package/dist/make.js +0 -349
  356. package/dist/package-json.d.ts +0 -92
  357. package/dist/pkgx-file.d.ts +0 -8
  358. package/dist/ports.d.ts +0 -2
  359. package/dist/prepublish.d.ts +0 -1
  360. package/dist/prepublish.js +0 -17
  361. package/dist/purchase.d.ts +0 -6
  362. package/dist/release.js +0 -49
  363. package/dist/remove.d.ts +0 -6
  364. package/dist/request-model-access.d.ts +0 -1
  365. package/dist/run.d.ts +0 -1
  366. package/dist/settings-list.d.ts +0 -2
  367. package/dist/settings.d.ts +0 -1
  368. package/dist/setup.d.ts +0 -1
  369. package/dist/shell.d.ts +0 -2
  370. package/dist/table.d.ts +0 -1
  371. package/dist/test/feature.js +0 -14
  372. package/dist/test/index.js +0 -14
  373. package/dist/test/ui.js +0 -6
  374. package/dist/test/unit.js +0 -14
  375. package/dist/typecheck.js +0 -6
  376. package/dist/types.js +0 -23
  377. package/dist/unit.d.ts +0 -2
  378. package/dist/upgrade/dependencies.js +0 -8
  379. package/dist/upgrade/index.js +0 -22
  380. package/dist/upgrade.d.ts +0 -5
  381. package/dist/upgrade.js +0 -50
  382. package/dist/utils.d.ts +0 -75
  383. package/dist/work.d.ts +0 -3
  384. /package/dist/{upgrade/framework.js → chunk-cdk2r2jd.js} +0 -0
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Create a new API resource file in app/Resources
3
+ */
4
+ export declare function makeResource(options: MakeResourceOptions): Promise<boolean>;
5
+ export declare interface MakeResourceOptions {
6
+ name?: string
7
+ model?: string
8
+ collection?: boolean
9
+ [key: string]: any
10
+ }
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{B as a}from"../chunk-wnrgcx3d.js";import"../chunk-96b7fcmd.js";export{a as makeResource};
@@ -1,5 +1,12 @@
1
1
  import type { MakeOptions } from '@stacksjs/types';
2
-
2
+ /**
3
+ * Toggle dry-run mode. The buddy CLI flips this on before invoking a
4
+ * scaffolder when the user passed `--dry-run`. Stays a module-level
5
+ * flag (rather than threading through every signature) so existing
6
+ * scaffolders can opt in just by switching their write call.
7
+ */
8
+ export declare function setDryRun(enabled: boolean): void;
9
+ export declare function isDryRunActive(): boolean;
3
10
  export declare function invoke(options: MakeOptions): Promise<void>;
4
11
  export declare function make(options: MakeOptions): Promise<void>;
5
12
  export declare function makeAction(options: MakeOptions): Promise<void>;
@@ -9,23 +16,18 @@ export declare function createComponent(options: MakeOptions): Promise<void>;
9
16
  export declare function makeDatabase(options: MakeOptions): void;
10
17
  export declare function createDatabase(options: MakeOptions): void;
11
18
  export declare function factory(options: MakeOptions): void;
12
- export declare function createFactory(options: MakeOptions): void;
19
+ export declare function createFactory(options: MakeOptions): Promise<void>;
13
20
  export declare function makeNotification(options: MakeOptions): Promise<void>;
14
21
  export declare function makePage(options: MakeOptions): Promise<void>;
15
22
  export declare function createPage(options: MakeOptions): Promise<void>;
16
23
  export declare function makeFunction(options: MakeOptions): Promise<void>;
17
24
  export declare function createFunction(options: MakeOptions): Promise<void>;
18
- declare function increment(): void;
19
25
  export declare function makeLanguage(options: MakeOptions): Promise<void>;
20
26
  export declare function createLanguage(options: MakeOptions): Promise<void>;
21
- export declare function makeStack(options: MakeOptions): void;
27
+ export declare function makeStack(options: MakeOptions): Promise<void>;
22
28
  export declare function createNotification(options: MakeOptions): Promise<boolean>;
23
- declare function content(): string;
24
- declare function send(): $;
25
29
  export declare function createMigration(options: MakeOptions): Promise<void>;
26
30
  export declare function makeQueueTable(): Promise<void>;
27
31
  export declare function makeCertificate(): Promise<void>;
28
32
  export declare function createModel(options: MakeOptions): Promise<void>;
29
-
30
- export {
31
- ${name},
33
+ export declare function createMiddleware(options: MakeOptions): Promise<void>;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$ as z,C as a,D as b,E as c,F as d,G as e,H as f,I as g,J as h,K as i,L as j,M as k,N as l,O as m,P as n,Q as o,R as p,S as q,T as r,U as s,V as t,W as u,X as v,Y as w,Z as x,_ as y}from"../chunk-6x1m5rkr.js";import"../chunk-3086k7zk.js";import"../chunk-s735m9mg.js";import"../chunk-n1y0gpv6.js";import"../chunk-96b7fcmd.js";export{a as setDryRun,t as makeStack,w as makeQueueTable,n as makePage,m as makeNotification,r as makeLanguage,p as makeFunction,i as makeDatabase,f as makeComponent,x as makeCertificate,e as makeAction,d as make,b as isDryRunActive,c as invoke,k as factory,o as createPage,u as createNotification,y as createModel,v as createMigration,z as createMiddleware,s as createLanguage,q as createFunction,l as createFactory,j as createDatabase,h as createComponent,g as createAction};
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import i from"process";import{generateMigrations as t,runDatabaseMigration as a}from"@stacksjs/database";import{log as e}from"@stacksjs/logging";var r=await t();if(r?.isErr)console.error(r.error),e.error("[stacks] generateMigrations failed",r.error),i.exit(1);var o=await a();if(o.isErr)e.error("runDatabaseMigration failed"),e.error(o.error),i.exit(1);i.exit(0);
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import q from"process";import{generateMigrations as z,resetDatabase as A,runDatabaseMigration as B}from"@stacksjs/database";import{log as f}from"@stacksjs/logging";var v=await A();if(v?.isErr)console.error(v.error),f.error("resetDatabase failed",v.error),q.exit(1);var w=await z();if(w?.isErr)console.error(w.error),f.error("generateMigrations failed",w.error),q.exit(1);var x=await B();if(x.isErr)f.error("runDatabaseMigration failed"),f.error(x.error),q.exit(1);q.exit(0);
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"../../chunk-96b7fcmd.js";var c=void 0;export{c as default};
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+ // @bun
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import z from"process";import{NpmScript as A}from"@stacksjs/enums";import{log as q}from"@stacksjs/logging";import{runtimePath as B}from"@stacksjs/path";import{ExitCode as D}from"@stacksjs/types";import{runNpmScript as F}from"@stacksjs/utils";q.info("Running prepublish command...");var v=await F(A.BuildStacks,{verbose:!0,cwd:B()});if(v.isErr)q.error(Error("There was an error while prepublishing your stack"),v.error),z.exit(D.FatalError);q.success("Prepublishing completed");
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import s from"process";import{log as r}from"@stacksjs/logging";import{Job as a}from"@stacksjs/orm";var n=c(),i=n.queue,f=n.force==="true";try{if(!f)r.warn("This will delete all jobs from the queue. Use --force to confirm."),s.exit(1);let e=0;if(i){r.info(`Clearing all jobs from queue "${i}"...`);let o=await a.where("queue",i).get();e=o.length;for(let t of o)await t.delete()}else{r.info("Clearing all jobs from all queues...");let o=await a.all();e=o.length;for(let t of o)await t.delete()}r.success(`Cleared ${e} job(s)`),s.exit(0)}catch(e){r.error("Failed to clear jobs",e),s.exit(1)}function c(){let e={};return s.argv.forEach((o)=>{if(o.startsWith("--")){let[t,l]=o.slice(2).split("=");if(t&&l)e[t]=l;else if(t)e[t]="true"}}),e}
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ import z from"process";import{log as D}from"@stacksjs/logging";import{FailedJob as E}from"@stacksjs/orm";var K=M(),G=K.queue;try{D.info(`Fetching failed jobs...
3
+ `);let h;if(G)h=await E.where("queue",G).get();else h=await E.all();if(h.length===0)console.log("\u2713 No failed jobs found"),z.exit(0);console.log("\u250C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"),console.log("\u2502 ID \u2502 Queue \u2502 Failed At \u2502 Exception \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");for(let w of h){let B=String(w.id).padEnd(3),C=(w.queue||"default").substring(0,48).padEnd(48),H=(w.failed_at||"N/A").substring(0,21).padEnd(21),I=(w.exception||"Unknown error").substring(0,31).padEnd(31);console.log(`\u2502 ${B} \u2502 ${C} \u2502 ${H} \u2502 ${I} \u2502`)}console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"),console.log(`
4
+ Total: ${h.length} failed job(s)`),z.exit(0)}catch(h){let w=h instanceof Error?h.message:String(h);if(/no such table:\s*(?:jobs|failed_jobs)\b/i.test(w))z.stdout.write(`Queue tables are not set up yet.
5
+ `),z.stdout.write("Run `buddy queue:table` to create the migrations, then `buddy migrate` to apply them.\n"),z.exit(0);D.error("Failed to fetch failed jobs",h),z.exit(1)}function M(){let h={};return z.argv.forEach((w)=>{if(w.startsWith("--")){let[B,C]=w.slice(2).split("=");if(B&&C)h[B]=C}}),h}
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import s from"process";import{log as i}from"@stacksjs/logging";import{FailedJob as l}from"@stacksjs/orm";var n=f(),r=n.queue,u=n.force==="true";try{if(!u)i.warn("This will permanently delete all failed jobs. Use --force to confirm."),s.exit(1);let e=0;if(r){i.info(`Flushing all failed jobs from queue "${r}"...`);let t=await l.where("queue",r).get();e=t.length;for(let o of t)await o.delete()}else{i.info("Flushing all failed jobs from all queues...");let t=await l.all();e=t.length;for(let o of t)await o.delete()}i.success(`Flushed ${e} failed job(s)`),s.exit(0)}catch(e){let t=e instanceof Error?e.message:String(e);if(/no such table:\s*(?:jobs|failed_jobs)\b/i.test(t))s.stdout.write(`Queue tables are not set up yet.
3
+ `),s.stdout.write("Run `buddy queue:table` to create the migrations, then `buddy migrate` to apply them.\n"),s.exit(0);i.error("Failed to flush failed jobs",e),s.exit(1)}function f(){let e={};return s.argv.forEach((t)=>{if(t.startsWith("--")){let[o,a]=t.slice(2).split("=");if(o&&a)e[o]=a;else if(o)e[o]="true"}}),e}
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,8 @@
1
+ // @bun
2
+ import N from"process";import{log as M}from"@stacksjs/logging";import{Job as S,FailedJob as U}from"@stacksjs/orm";var P=W(),O=P.id,V=P.failed==="true";try{if(!O)M.error("Please provide a job ID"),M.info("Usage: buddy queue:inspect --id=<jobId> [--failed]"),N.exit(1);let z=Number.parseInt(O,10);if(Number.isNaN(z))M.error("Invalid job ID provided"),N.exit(1);if(V){let B=await U.find(z);if(!B)M.error(`Failed job with ID ${z} not found`),N.exit(1);let h=B;console.log(`
3
+ \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510`),console.log("\u2502 Failed Job Details \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"),console.log(`\u2502 ID: ${String(h.id).padEnd(52)} \u2502`),console.log(`\u2502 Queue: ${(h.queue||"default").padEnd(52)} \u2502`),console.log(`\u2502 Connection: ${(h.connection||"database").padEnd(52)} \u2502`),console.log(`\u2502 Failed At: ${(h.failed_at||"N/A").padEnd(52)} \u2502`),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"),console.log("\u2502 Exception: \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");let E=h.exception||"Unknown error",G=E.match(/.{1,62}/g)||[E];for(let q of G.slice(0,20))console.log(`\u2502 ${q.padEnd(62)} \u2502`);if(G.length>20)console.log(`\u2502 ... (${G.length-20} more lines)`.padEnd(64)+" \u2502");if(console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"),console.log("\u2502 Payload: \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"),h.payload)try{let q=JSON.parse(h.payload);console.log(`\u2502 Name: ${q.name.padEnd(52)} \u2502`),console.log(`\u2502 Path: ${q.path.padEnd(52)} \u2502`),console.log(`\u2502 Max Tries: ${String(q.maxTries).padEnd(52)} \u2502`),console.log("\u2502 Parameters: \u2502");let K=JSON.stringify(q.params,null,2).split(`
4
+ `);for(let H of K.slice(0,15))console.log(`\u2502 ${H.substring(0,60).padEnd(60)} \u2502`);if(K.length>15)console.log(`\u2502 ... (${K.length-15} more lines)`.padEnd(64)+" \u2502")}catch{console.log(`\u2502 Raw: ${h.payload.substring(0,58).padEnd(58)} \u2502`)}else console.log("\u2502 (No payload) \u2502");console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"),console.log(`
5
+ Actions:`),console.log(` Retry this job: buddy queue:retry --id=${z}`),console.log(` Delete this job: buddy queue:flush --id=${z}`)}else{let B=await S.find(z);if(!B)M.error(`Job with ID ${z} not found`),M.info("Tip: Use --failed flag to inspect failed jobs"),N.exit(1);let h=B,E=Math.floor(Date.now()/1000),G="Pending";if(h.reserved_at)G="Processing";else if(h.available_at&&h.available_at>E)G="Delayed";if(console.log(`
6
+ \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510`),console.log("\u2502 Job Details \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"),console.log(`\u2502 ID: ${String(h.id).padEnd(50)} \u2502`),console.log(`\u2502 Queue: ${(h.queue||"default").padEnd(50)} \u2502`),console.log(`\u2502 Status: ${G.padEnd(50)} \u2502`),console.log(`\u2502 Attempts: ${String(h.attempts||0).padEnd(50)} \u2502`),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"),h.available_at){let q=new Date(h.available_at*1000);console.log(`\u2502 Available At: ${q.toISOString().padEnd(50)} \u2502`)}if(h.reserved_at){let q=new Date(h.reserved_at*1000);console.log(`\u2502 Reserved At: ${q.toISOString().padEnd(50)} \u2502`)}if(h.created_at)console.log(`\u2502 Created At: ${String(h.created_at).padEnd(50)} \u2502`);if(console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"),console.log("\u2502 Payload: \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"),h.payload)try{let q=JSON.parse(h.payload);console.log(`\u2502 Name: ${q.name.padEnd(52)} \u2502`),console.log(`\u2502 Path: ${q.path.padEnd(52)} \u2502`),console.log(`\u2502 Max Tries: ${String(q.maxTries).padEnd(52)} \u2502`),console.log(`\u2502 Timeout: ${String(q.timeOut||"N/A").padEnd(52)} \u2502`),console.log("\u2502 Parameters: \u2502");let K=JSON.stringify(q.params,null,2).split(`
7
+ `);for(let H of K.slice(0,15))console.log(`\u2502 ${H.substring(0,60).padEnd(60)} \u2502`);if(K.length>15)console.log(`\u2502 ... (${K.length-15} more lines)`.padEnd(64)+" \u2502");if(q.classPayload)try{let H=JSON.parse(q.classPayload);if(console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"),console.log("\u2502 Job Configuration: \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"),console.log(`\u2502 Tries: ${String(H.tries||3).padEnd(52)} \u2502`),console.log(`\u2502 Timeout: ${String(H.timeout||60).padEnd(52)} \u2502`),H.backoff)console.log(`\u2502 Backoff: ${String(JSON.stringify(H.backoff)).substring(0,52).padEnd(52)} \u2502`)}catch{}}catch{console.log(`\u2502 Raw: ${h.payload.substring(0,58).padEnd(58)} \u2502`)}else console.log("\u2502 (No payload) \u2502");if(console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"),G==="Delayed"&&h.available_at){let q=h.available_at-E;console.log(`
8
+ This job will be available in ${q} second(s)`)}}N.exit(0)}catch(z){M.error("Failed to inspect job",z),N.exit(1)}function W(){let z={};return N.argv.forEach((B)=>{if(B.startsWith("--")){let[h,E]=B.slice(2).split("=");if(h&&E)z[h]=E;else if(h)z[h]="true"}}),z}
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,7 @@
1
+ // @bun
2
+ import D from"process";import{log as O}from"@stacksjs/logging";import{Job as P,FailedJob as Q}from"@stacksjs/orm";import{getActiveJobCount as V,isWorkerRunning as X}from"@stacksjs/queue";var U=_(),G=U.queue,Y=Number(U.interval)||2000,H=!0;D.on("SIGINT",()=>{H=!1,console.log(`
3
+
4
+ Monitoring stopped.`),D.exit(0)});D.on("SIGTERM",()=>{H=!1,D.exit(0)});async function Z(){let x=G?await P.where("queue",G).get():await P.all(),z=G?await Q.where("queue",G).get():await Q.all(),B=Math.floor(Date.now()/1000),E=0,L=0,M=0;for(let K of x)if(K.reserved_at)L++;else if(K.available_at&&Number(K.available_at)>B)M++;else E++;return{pending:E,processing:L,delayed:M,failed:z.length,total:x.length,workerRunning:X(),activeJobs:V()}}async function T(){let x=await Z(),z=new Date().toLocaleTimeString();if(console.clear(),console.log("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"),console.log("\u2502 Queue Monitor \u2502"),console.log("\u2502 Press Ctrl+C to exit \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"),console.log(`\u2502 Last Updated: ${z.padEnd(48)} \u2502`),console.log(`\u2502 Queue Filter: ${(G||"All Queues").padEnd(48)} \u2502`),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"),console.log("\u2502 \u2502"),console.log(`\u2502 Pending Jobs: ${String(x.pending).padStart(8)} \u2502`),console.log(`\u2502 Processing Jobs: ${String(x.processing).padStart(8)} \u2502`),console.log(`\u2502 Delayed Jobs: ${String(x.delayed).padStart(8)} \u2502`),console.log(`\u2502 Failed Jobs: ${String(x.failed).padStart(8)} \u2502`),console.log("\u2502 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2502"),console.log(`\u2502 Total Jobs: ${String(x.total).padStart(8)} \u2502`),console.log("\u2502 \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"),console.log("\u2502 Worker Status \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"),console.log(`\u2502 Worker Running: ${(x.workerRunning?"Yes":"No").padEnd(8)} \u2502`),console.log(`\u2502 Active Jobs: ${String(x.activeJobs).padStart(8)} \u2502`),console.log("\u2502 \u2502"),console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"),x.failed>0)console.log(`
5
+ \u26A0\uFE0F Warning: ${x.failed} failed job(s) - run 'buddy queue:failed' for details`);if(!x.workerRunning&&x.pending>0)console.log(`
6
+ \u26A0\uFE0F Warning: Worker not running but ${x.pending} job(s) pending - run 'buddy queue:work'`)}try{O.info(`Starting queue monitor...
7
+ `),await T();while(H)if(await new Promise((x)=>setTimeout(x,Y)),H)await T()}catch(x){O.error("Monitor error:",x),D.exit(1)}function _(){let x={};return D.argv.forEach((z)=>{if(z.startsWith("--")){let[B,E]=z.slice(2).split("=");if(B&&E)x[B]=E;else if(B)x[B]="true"}}),x}
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import i from"process";import{log as r}from"@stacksjs/logging";import{executeFailedJobs as n,retryFailedJob as d}from"@stacksjs/queue";var l=f(),a=l.id,u=l.all==="true";try{if(u)r.info("Retrying all failed jobs..."),await n(),r.success("All failed jobs have been queued for retry");else if(a){let e=Number.parseInt(a,10);if(Number.isNaN(e))r.error("Invalid job ID provided"),i.exit(1);r.info(`Retrying failed job ${e}...`),await d(e),r.success(`Failed job ${e} has been queued for retry`)}else r.warn("Please provide a job ID or use --all to retry all failed jobs"),r.info("Usage: buddy queue:retry <id> or buddy queue:retry --all"),i.exit(1);i.exit(0)}catch(e){r.error("Failed to retry job(s)",e),i.exit(1)}function f(){let e={};return i.argv.forEach((t)=>{if(t.startsWith("--")){let[o,s]=t.slice(2).split("=");if(o&&s)e[o]=s;else if(o)e[o]="true"}}),e}
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ import n from"process";import{log as s}from"@stacksjs/logging";import{discoverJobs as d,getScheduledJobs as i}from"@stacksjs/queue";try{s.info(`Discovering scheduled jobs...
3
+ `),await d();let o=i();if(o.length===0)s.info("No scheduled jobs found."),s.info('Tip: Add a "rate" or "schedule" property to your job configuration.'),n.exit(0);console.log("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"),console.log("\u2502 Job Name \u2502 Schedule \u2502 Queue \u2502 Tries \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");for(let e of o){let l=e.name.substring(0,48).padEnd(48),r=(e.config.rate||e.config.schedule||"N/A").substring(0,21).padEnd(21),t=(e.config.queue||"default").substring(0,9).padEnd(9),c=String(e.config.tries||3).padStart(7);console.log(`\u2502 ${l} \u2502 ${r} \u2502 ${t} \u2502${c} \u2502`)}console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"),console.log(`
4
+ Total: ${o.length} scheduled job(s)`),console.log(`
5
+ Schedule Formats:`),console.log(' \u2022 Cron: "* * * * *" (minute hour day month dayOfWeek)'),console.log(" \u2022 Presets: @hourly, @daily, @weekly, @monthly"),console.log(" \u2022 Every: Every.Minute, Every.Hour, Every.Day"),n.exit(0)}catch(o){s.error("Failed to list scheduled jobs:",o),n.exit(1)}
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import e from"process";import{log as r}from"@stacksjs/logging";import{startScheduler as o}from"@stacksjs/queue";r.info("Starting job scheduler...");try{await o(),r.success("Scheduler is running. Press Ctrl+C to stop."),await new Promise(()=>{})}catch(t){r.error("Failed to start scheduler:",t),e.exit(1)}
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ import H from"process";import{log as V}from"@stacksjs/logging";import{Job as W,FailedJob as X}from"@stacksjs/orm";var h=A(),K=h.queue;try{V.info(`Fetching queue status...
3
+ `);let C=K?await W.where("queue",K).get():await W.all(),G=K?await X.where("queue",K).get():await X.all(),B=new Map;for(let x of C){let z=x.queue||"default";if(!B.has(z))B.set(z,{pending:0,processing:0,delayed:0});let I=B.get(z),L=Math.floor(Date.now()/1000);if(x.reserved_at)I.processing++;else if(x.available_at&&Number(x.available_at)>L)I.delayed++;else I.pending++}let E=new Map;for(let x of G){let z=x.queue||"default";E.set(z,(E.get(z)||0)+1)}console.log("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"),console.log("\u2502 Queue \u2502 Pending \u2502 Processing \u2502 Delayed \u2502 Failed \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");let M=new Set([...B.keys(),...E.keys()]);if(M.size===0)console.log("\u2502 No queues found \u2502");else for(let x of M){let z=B.get(x)||{pending:0,processing:0,delayed:0},I=E.get(x)||0,L=x.substring(0,48).padEnd(48),Y=String(z.pending).padStart(8),Z=String(z.processing).padStart(10),_=String(z.delayed).padStart(8),$=String(I).padStart(6);console.log(`\u2502 ${L} \u2502${Y} \u2502${Z} \u2502${_} \u2502${$} \u2502`)}console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518");let O=Array.from(B.values()).reduce((x,z)=>x+z.pending,0),R=Array.from(B.values()).reduce((x,z)=>x+z.processing,0),T=Array.from(B.values()).reduce((x,z)=>x+z.delayed,0),U=Array.from(E.values()).reduce((x,z)=>x+z,0);console.log(`
4
+ Summary:`),console.log(` Pending: ${O}`),console.log(` Processing: ${R}`),console.log(` Delayed: ${T}`),console.log(` Failed: ${U}`),console.log(` Total: ${O+R+T+U}`),H.exit(0)}catch(C){let G=C instanceof Error?C.message:String(C);if(/no such table:\s*(?:jobs|failed_jobs)\b/i.test(G))H.stdout.write(`Queue tables are not set up yet.
5
+ `),H.stdout.write("Run `buddy queue:table` to create the migrations, then `buddy migrate` to apply them.\n"),H.exit(0);V.error("Failed to get queue status",C),H.exit(1)}function A(){let C={};return H.argv.forEach((G)=>{if(G.startsWith("--")){let[B,E]=G.slice(2).split("=");if(B&&E)C[B]=E}}),C}
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import q from"process";import{createJobsMigration as v}from"@stacksjs/database";import{log as w}from"@stacksjs/logging";var m=await v();if(m?.isErr)console.error(m.error),w.error("generateMigrations failed",m.error),q.exit(1);q.exit(0);
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import x from"process";import{log as m}from"@stacksjs/logging";import{startProcessor as F}from"@stacksjs/queue";x.on("unhandledRejection",(b)=>{m.error(`Unhandled Rejection in queue worker: ${b}`)});x.on("uncaughtException",(b)=>{m.error(`Uncaught Exception in queue worker: ${b.message}`)});var D=H(),G=D.queue,E=Number(D.concurrency)||1;m.info(`Starting queue worker with ${E} concurrent worker(s)...`);var C=await F(G,{concurrency:E});if(C.isErr)m.error("Failed to start queue worker:",C.error),x.exit(1);m.success("Queue worker started successfully!");await new Promise(()=>{});function H(){let b={};return x.argv.forEach((z)=>{if(z.startsWith("--")){let[w,B]=z.slice(2).split("=");if(w&&B)b[w]=B;else if(w)b[w]="true"}}),b}
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env bun
2
+ // @bun
3
+ import"../chunk-e9tcbk71.js";import"../chunk-cdk2r2jd.js";import"../chunk-x471rxrn.js";import"../chunk-2qchdrf9.js";import"../chunk-rdajkt2s.js";import"../chunk-gt77jmb5.js";import"../chunk-3beht8ja.js";import"../chunk-h93n2j40.js";import"../chunk-wnrgcx3d.js";import"../chunk-6x1m5rkr.js";import"../chunk-3086k7zk.js";import"../chunk-60qjz7zb.js";import"../chunk-c8qt2xst.js";import"../chunk-2gh7kgpc.js";import"../chunk-schcaf73.js";import"../chunk-v0wnrnaa.js";import"../chunk-n2fd1d0m.js";import"../chunk-s735m9mg.js";import"../chunk-d4srk6ma.js";import{Za as C}from"../chunk-n1y0gpv6.js";import"../chunk-jd1yzkq5.js";import"../chunk-96b7fcmd.js";import{parseOptions as G}from"@stacksjs/cli";import{app as H}from"@stacksjs/config";import{Action as q}from"@stacksjs/enums";import{log as E}from"@stacksjs/logging";import{projectPath as I}from"@stacksjs/path";var J=G()??{},z={};for(let[B,F]of Object.entries(J)){if(B==="--"||B==="_")continue;z[B]=F}var K=z.dryRun===!0||z.dryRun==="true",L=K?[q.GenerateLibraryEntries,q.Bump]:[q.GenerateLibraryEntries,q.LintFix,q.Bump],x=await C(L,{cwd:I(),...z});if(x&&x.isErr)E.error(`Release failed: ${x.error?.message??String(x.error)}`),process.exit(1);E.success(`Successfully released ${H.name}`);
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import m from"process";import{italic as l,log as c}from"@stacksjs/cli";import{route as g}from"@stacksjs/router";var f=["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS"];function p(r){if(typeof r==="string")return r;if(typeof r==="function")return r.name?`[fn ${r.name}]`:"[fn]";return"[handler]"}function o(r,t){if(r.length>=t)return r;return r+" ".repeat(t-r.length)}function i(r){m.stdout.write(`${r}
3
+ `)}async function w(){try{await g.importRoutes()}catch(e){return{isErr:!0,error:e}}let r=g.routes??[];if(r.length===0)return i(l("No routes registered.")),{};let t=r.map((e)=>({method:String(e.method||"GET").toUpperCase(),uri:String(e.path||e.uri||""),handler:p(e.handler??e.action??""),name:String(e.name||""),middleware:Array.isArray(e.middleware)?e.middleware.join(","):String(e.middleware||"")}));t.sort((e,h)=>{let s=f.indexOf(e.method),a=f.indexOf(h.method);if(s!==a)return(s===-1?99:s)-(a===-1?99:a);return e.uri.localeCompare(h.uri)});let n={method:Math.max(6,...t.map((e)=>e.method.length)),uri:Math.max(3,...t.map((e)=>e.uri.length)),handler:Math.max(7,...t.map((e)=>e.handler.length)),name:Math.max(4,...t.map((e)=>e.name.length))},d=[o("METHOD",n.method),o("URI",n.uri),o("HANDLER",n.handler),o("NAME",n.name),"MIDDLEWARE"].join(" ");i(""),i(d),i("-".repeat(d.length));for(let e of t)i([o(e.method,n.method),o(e.uri,n.uri),o(e.handler,n.handler),o(e.name||"-",n.name),e.middleware||"-"].join(" "));return i(""),i(l(`${t.length} route${t.length===1?"":"s"} registered.`)),{}}var u=await w();if(u?.isErr)console.error(u.error),c.error("Route lists failed",u.error),m.exit(1);m.exit(0);
@@ -0,0 +1,2 @@
1
+ // Minimal export for runAction to optimize import performance
2
+ export { runAction } from './helpers/utils';
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ya as o}from"../chunk-n1y0gpv6.js";import"../chunk-96b7fcmd.js";export{o as runAction};
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import o from"process";import{log as e}from"@stacksjs/logging";import{createStripeProduct as t}from"@stacksjs/payments";var r=await t();if(r?.isErr)console.error(r.error),e.error("generateMigrations failed",r.error),o.exit(1);
@@ -0,0 +1,25 @@
1
+ import type { MakeOptions } from '@stacksjs/types';
2
+ export declare function parseFields(input: string | undefined): CrudField[];
3
+ /**
4
+ * Generate a complete CRUD stack for a resource:
5
+ * - app/Models/<Model>.ts (defineModel definition)
6
+ * - database/migrations/<ts>-create-<table>-table.ts
7
+ * - app/Actions/<Model>{Index,Show,Store,Update,Destroy}Action.ts
8
+ *
9
+ * Honors `--dry-run` via the shared `isDryRunActive()` flag, so users
10
+ * can preview every file before committing to disk.
11
+ *
12
+ * @example
13
+ * buddy scaffold:crud Post --fields=title:string,body:text,published:boolean
14
+ */
15
+ export declare function scaffoldCrud(name: string, options: MakeOptions & { fields?: string }): Promise<void>;
16
+ /**
17
+ * Field declaration for CRUD scaffolding. Examples:
18
+ *
19
+ * --fields=title,body
20
+ * --fields=title:string,body:text,published:boolean,views:number
21
+ */
22
+ export declare interface CrudField {
23
+ name: string
24
+ type: 'string' | 'text' | 'number' | 'boolean' | 'date' | 'json'
25
+ }
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{w as a,x as b}from"../chunk-rdajkt2s.js";import"../chunk-6x1m5rkr.js";import"../chunk-3086k7zk.js";import"../chunk-s735m9mg.js";import"../chunk-n1y0gpv6.js";import"../chunk-96b7fcmd.js";export{b as scaffoldCrud,a as parseFields};
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{log as o}from"@stacksjs/logging";import{runScheduler as e}from"@stacksjs/scheduler";var r=await e();if(r?.isErr)console.error(r.error),o.error("Schedule run failed",r.error);
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import r from"process";import{parseOptions as e}from"@stacksjs/cli";import{log as s}from"@stacksjs/logging";import{flushModelDocuments as i}from"@stacksjs/search-engine";var t=e(),n=t.model,o=await i(n);if(o?.isErr)console.error(o.error),s.error("Flushing search engine failed",o.error);r.exit(0);
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import r from"process";import{parseOptions as t}from"@stacksjs/cli";import{log as e}from"@stacksjs/logging";import{importModelDocuments as i}from"@stacksjs/search-engine";var s=t(),m=s.model,o=await i(m);if(o?.isErr)console.error(o.error),e.error("Import to search engine failed",o.error);r.exit(0);
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import o from"process";import{parseOptions as t}from"@stacksjs/cli";import{log as i}from"@stacksjs/logging";import{listIndexSettings as s}from"@stacksjs/search-engine";var e=t(),n=e.model,r=await s(n);if(r?.isErr)console.error(r.error),i.error("Listing index settings failed",r.error);o.exit(0);
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import o from"process";import{log as e}from"@stacksjs/logging";import{updateIndexSettings as t}from"@stacksjs/search-engine";var r=await t();if(r?.isErr)console.error(r.error),e.error("generateMigrations failed",r.error);o.exit(0);
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import o from"process";import{config as s}from"@stacksjs/config";import{log as r}from"@stacksjs/logging";import{cors as t,route as e}from"@stacksjs/router";var a=o.env.APP_ENV==="production"||o.env.NODE_ENV==="production",n=Number(o.env.PORT)||s.ports?.api||3008,i=o.env.HOST||(a?"0.0.0.0":"127.0.0.1");r.info("[Stacks API] Starting server...");r.info(`[Stacks API] Environment: ${o.env.APP_ENV||"development"}`);e.use(t().handle.bind(t()));await e.importRoutes();await e.serve({port:n,hostname:i});r.info(`[Stacks API] Server running at http://${i}:${n}`);
@@ -0,0 +1 @@
1
+ export * from './ssl';
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"../../chunk-cdk2r2jd.js";import{l as a,m as b,n as c,o as d,p as e,q as f,r as g,s as h}from"../../chunk-x471rxrn.js";import"../../chunk-96b7fcmd.js";export{e as trustCertificate,c as sslCertificatesExist,g as setupSSL,h as isSSLSetupComplete,a as isDomainInHosts,d as isCertificateTrusted,f as generateCertificates,b as addDomainToHosts};
@@ -0,0 +1,38 @@
1
+ import type { CliOptions } from '@stacksjs/types';
2
+ /**
3
+ * Check if a domain is in the hosts file
4
+ */
5
+ export declare function isDomainInHosts(domain: string): boolean;
6
+ /**
7
+ * Add a domain to the hosts file (requires sudo on Unix)
8
+ */
9
+ export declare function addDomainToHosts(domain: string, verbose?: boolean): Promise<boolean>;
10
+ /**
11
+ * Check if SSL certificates exist for a domain
12
+ */
13
+ export declare function sslCertificatesExist(domain: string): boolean;
14
+ /**
15
+ * Check if a certificate is trusted (macOS only for now)
16
+ */
17
+ export declare function isCertificateTrusted(domain: string): boolean;
18
+ /**
19
+ * Trust a certificate on macOS
20
+ */
21
+ export declare function trustCertificate(domain: string, verbose?: boolean): Promise<boolean>;
22
+ /**
23
+ * Generate SSL certificates for a domain using rpx
24
+ */
25
+ export declare function generateCertificates(domain: string, verbose?: boolean): Promise<boolean>;
26
+ /**
27
+ * Complete SSL setup for development
28
+ */
29
+ export declare function setupSSL(options?: SSLSetupOptions): Promise<boolean>;
30
+ /**
31
+ * Check if SSL setup is complete for a domain
32
+ */
33
+ export declare function isSSLSetupComplete(domain: string): boolean;
34
+ export declare interface SSLSetupOptions extends CliOptions {
35
+ domain?: string
36
+ skipHosts?: boolean
37
+ skipTrust?: boolean
38
+ }
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{l as a,m as b,n as c,o as d,p as e,q as f,r as g,s as h}from"../../chunk-x471rxrn.js";import"../../chunk-96b7fcmd.js";export{e as trustCertificate,c as sslCertificatesExist,g as setupSSL,h as isSSLSetupComplete,a as isDomainInHosts,d as isCertificateTrusted,f as generateCertificates,b as addDomainToHosts};
@@ -0,0 +1,4 @@
1
+ import type { StackInstallOptions, StackListEntry, StackManifestEntry, StackUninstallOptions } from '@stacksjs/types';
2
+ export declare function installStack(options: StackInstallOptions): Promise<StackManifestEntry | null>;
3
+ export declare function uninstallStack(options: StackUninstallOptions): Promise<boolean>;
4
+ export declare function listStacks(): Promise<StackListEntry[]>;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{t as a,u as b,v as c}from"../chunk-2qchdrf9.js";import"../chunk-96b7fcmd.js";export{b as uninstallStack,c as listStacks,a as installStack};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Code generation templates for the make command
3
+ *
4
+ * These templates use the {0}, {1}, etc. format for template substitution
5
+ * which works with the @stacksjs/strings template function
6
+ */
7
+ export declare const CODE_TEMPLATES: () => unknown;
8
+ export type TemplateKey = keyof typeof CODE_TEMPLATES;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{aa as a}from"../chunk-3086k7zk.js";import"../chunk-96b7fcmd.js";export{a as CODE_TEMPLATES};
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import q from"process";import{log as u}from"@stacksjs/cli";import{projectPath as w}from"@stacksjs/path";var y=Bun.spawn(["sh","-c","bun test ./tests/feature/**"],{cwd:w(),stdio:["inherit","inherit","inherit"]}),f=await y.exited;if(f!==0)u.error("Tests failed"),q.exit(f??1);
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import f from"process";import{log as m}from"@stacksjs/cli";import{projectPath as q}from"@stacksjs/path";var v=Bun.spawn(["sh","-c","bun test --timeout 30000 ./tests/feature/** ./tests/integration/** ./tests/unit/**"],{cwd:q(),stdio:["inherit","inherit","inherit"]}),b=await v.exited;if(b!==0)m.error("Tests failed"),f.exit(b??1);
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{runCommand as r}from"@stacksjs/cli";import{NpmScript as m}from"@stacksjs/enums";import{frameworkPath as o}from"@stacksjs/path";await r(m.TestUi,{verbose:!0,cwd:o()});
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import q from"process";import{log as u}from"@stacksjs/cli";import{projectPath as w}from"@stacksjs/path";var y=Bun.spawn(["sh","-c","bun test ./tests/unit/**"],{cwd:w(),stdio:["inherit","inherit","inherit"]}),f=await y.exited;if(f!==0)u.error("Tests failed"),q.exit(f??1);
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{runCommands as m}from"@stacksjs/cli";import{NpmScript as r}from"@stacksjs/enums";import{projectPath as o}from"@stacksjs/path";await m([r.TestTypes],{cwd:o()});
@@ -1,4 +1,3 @@
1
1
  import type { TypesOptions } from '@stacksjs/types';
2
-
3
2
  export declare function invoke(options?: TypesOptions): Promise<void>;
4
- export declare function types(options: TypesOptions): Promise<void>;
3
+ export declare function types(options: TypesOptions): Promise<void>;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"../chunk-96b7fcmd.js";import t from"process";import{NpmScript as e}from"@stacksjs/enums";import{log as s}from"@stacksjs/logging";import{ExitCode as i}from"@stacksjs/types";import{runNpmScript as p}from"@stacksjs/utils";async function m(r){let o=await p(e.TypesFix,r);if(o.isErr)s.error("There was an error fixing your types.",o.error),t.exit(i.FatalError);s.success("Types are set")}async function u(r){return await m(r)}export{u as types,m as invoke};
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import A from"process";import{runCommand as J}from"@stacksjs/cli";import{log as q}from"@stacksjs/logging";import{path as z}from"@stacksjs/path";import{ExitCode as B}from"@stacksjs/types";import{fs as F,storage as K}from"@stacksjs/storage";var v=z.buddyPath("dist/stacks"),G=z.homeDir(".stacks/bin/stacks"),L=z.homeDir(".stacks/bin/");q.info("Upgrading `stacks`...");var H=await J("bun compile.ts",{cwd:z.buddyPath()});if(H.isErr)q.error("There was an error compiling the binary",H.error),A.exit(B.FatalError);if(await K.exists(v))try{q.info("Updating Binary..."),q.info(`Source: ${v}`),q.info(`Destination: ${G}`),await F.ensureDir(L),await F.move(v,G,{overwrite:!0}),q.success("Binary Latest Version Is Used")}catch(I){q.error(I),A.exit(B.FatalError)}else q.error(`Binary source not found: ${v}`),A.exit(B.FatalError);
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+ // @bun
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"../../chunk-96b7fcmd.js";var c=void 0;export{c as default};