@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,60 @@
1
+ import type { JobOptions, RequestInstance } from '@stacksjs/types';
2
+ declare interface ActionValidations {
3
+ [key: string]: {
4
+ rule: { validate: (value: unknown) => { valid: boolean, errors?: Array<{ message: string }> } }
5
+ message?: string | Record<string, string>
6
+ }
7
+ }
8
+ declare interface ActionOptions<TModel = string> {
9
+ name?: string
10
+ description?: string
11
+ apiResponse?: boolean
12
+ validations?: ActionValidations
13
+ method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'
14
+ rate?: JobOptions['rate']
15
+ tries?: JobOptions['tries']
16
+ backoff?: JobOptions['backoff']
17
+ enabled?: JobOptions['enabled']
18
+ path?: string
19
+ requestFile?: string
20
+ model?: TModel
21
+ handle: (request: InferRequest<TModel>) => Promise<any> | any
22
+ }
23
+ /**
24
+ * Infer the correct RequestInstance type from the model value.
25
+ *
26
+ * When `model: Post` (a defineModel() return), resolves to RequestInstance<typeof Post>
27
+ * with full field narrowing. When `model: 'Post'` (string) or omitted, falls back
28
+ * to bare RequestInstance.
29
+ */
30
+ declare type InferRequest<TModel> = TModel extends { _isStacksModel: true }
31
+ ? RequestInstance<TModel>
32
+ : RequestInstance;
33
+ export declare class Action<TModel = string> {
34
+ name?: string;
35
+ description?: string;
36
+ rate?: ActionOptions['rate'];
37
+ tries?: ActionOptions['tries'];
38
+ backoff?: ActionOptions['backoff'];
39
+ enabled?: ActionOptions['enabled'];
40
+ path?: ActionOptions['path'];
41
+ method?: ActionOptions['method'];
42
+ validations?: ActionOptions['validations'];
43
+ requestFile?: string;
44
+ handle: ActionOptions<TModel>['handle'];
45
+ model?: string;
46
+ constructor({
47
+ name,
48
+ description,
49
+ validations,
50
+ handle,
51
+ rate,
52
+ tries,
53
+ backoff,
54
+ enabled,
55
+ path,
56
+ method,
57
+ requestFile,
58
+ model,
59
+ }: ActionOptions<TModel>);
60
+ }
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Xa as a}from"../chunk-d4srk6ma.js";import"../chunk-96b7fcmd.js";export{a as Action};
@@ -0,0 +1,2 @@
1
+ export * from './helpers/utils';
2
+ export * as actions from './helpers/utils';
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$a as o,Ya as a,Za as e,_a as f}from"../chunk-n1y0gpv6.js";import"../chunk-96b7fcmd.js";export{e as runActions,a as runAction,f as hasAction,o as actions};
@@ -0,0 +1,6 @@
1
+ import type { AddOptions } from '@stacksjs/types';
2
+ export declare function invoke(options: AddOptions): Promise<void>;
3
+ export declare function add(options: AddOptions): Promise<void>;
4
+ export declare function addTable(): Promise<void>;
5
+ export declare function addCalendar(): Promise<void>;
6
+ export declare function installPackages(names: string[]): Promise<void>;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ab as a,bb as b,cb as c,db as d,eb as e}from"../chunk-jd1yzkq5.js";import"../chunk-96b7fcmd.js";export{a as invoke,e as installPackages,c as addTable,d as addCalendar,b as add};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"../../chunk-96b7fcmd.js";import{requestModelAccess as e}from"@stacksjs/ai";async function o(){try{await e()}catch(r){console.error("Error requesting model access:",r)}}if(import.meta.main)o();
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import L from"process";import{randomBytes as T,scryptSync as _}from"crypto";import{db as $}from"@stacksjs/database";import{HttpError as w}from"@stacksjs/error-handling";import{log as D}from"@stacksjs/logging";var J=L.argv.slice(2),U=(G)=>{let M=J.findIndex((z)=>z.startsWith(`--${G}=`)||z.startsWith(`-${G.charAt(0)}=`));if(M!==-1){let z=J[M];if(!z)return;let O=z.indexOf("=");return O>=0?z.slice(O+1):void 0}let N=J.findIndex((z)=>z===`--${G}`||z===`-${G.charAt(0)}`),K=N!==-1?J[N+1]:void 0;if(K&&!K.startsWith("-"))return K;return},V=(G)=>{return J.includes(`--${G}`)},W=U("name")||"OAuth Client",X=U("redirect")||"http://localhost",C=V("personal"),E=V("password");D.info(`Creating OAuth client: ${W}`);var Y=T(40).toString("hex"),Q=T(16).toString("hex"),H=`${Q}:${_(Y,Q,64).toString("hex")}`,R=await $.insertInto("oauth_clients").values({name:W,secret:H,provider:"local",redirect:X,personal_access_client:C,password_client:E,revoked:!1}).executeTakeFirst(),Z=R?.insertId||Number(R?.numInsertedOrUpdatedRows);if(!Z)throw new w(500,"Failed to create OAuth client");D.success("OAuth client created successfully");D.info("");D.info("Client Details:");D.info(` Client ID: ${Z}`);D.info(" Client Secret: [REDACTED]");L.stdout.write(`Client Secret (save now, shown once): ${Y}
3
+ `);D.info(` Redirect URI: ${X}`);D.info("");D.warn("Make sure to save the client secret. You will not be able to retrieve it again.");L.exit(0);
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import S from"process";import{db as T,sql as V}from"@stacksjs/database";import{log as B}from"@stacksjs/logging";var G=S.argv.slice(2),U=(w)=>{return G.includes(`--${w}`)},W=(w)=>{let L=G.findIndex((z)=>z.startsWith(`--${w}=`)||z.startsWith(`-${w.charAt(0)}=`));if(L!==-1){let z=G[L];if(!z)return;let N=z.indexOf("=");return N>=0?z.slice(N+1):void 0}let M=G.findIndex((z)=>z===`--${w}`||z===`-${w.charAt(0)}`),H=M!==-1?G[M+1]:void 0;if(H&&!H.startsWith("-"))return H;return},X=!U("no-expired"),Y=!U("no-revoked"),Q=Number(W("days"))||7;B.info("Pruning authentication tokens...");var J=0,K=0;if(X)B.info("Removing expired tokens..."),J=await T.deleteFrom("personal_access_tokens").where("expires_at","<",V.raw("NOW()")).execute(),B.success(`Removed ${J} expired token(s)`);if(Y){B.info(`Removing tokens revoked more than ${Q} day(s) ago...`);let w=new Date;w.setDate(w.getDate()-Q),K=await T.deleteFrom("personal_access_tokens").where("revoked_at","is not",null).where("revoked_at","<",w.toISOString()).execute(),B.success(`Removed ${K} revoked token(s)`)}B.success(`Token pruning complete. Total removed: ${J+K}`);S.exit(0);
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,148 @@
1
+ // @bun
2
+ import E from"process";import{randomBytes as I}from"crypto";import{db as f}from"@stacksjs/database";import{log as x}from"@stacksjs/logging";import{env as J}from"@stacksjs/env";import{sqlHelpers as K}from"@stacksjs/database";var G=J.DB_CONNECTION||"sqlite",N=K(G),{isPostgres:A,isMysql:C,now:O,boolTrue:R,boolFalse:_}=N;x.info("Setting up authentication...");x.info(`Database driver: ${G}`);x.info("Ensuring OAuth tables exist...");try{if(A)await f.unsafe(`
3
+ CREATE TABLE IF NOT EXISTS oauth_clients (
4
+ id SERIAL PRIMARY KEY,
5
+ name VARCHAR(255) NOT NULL,
6
+ secret VARCHAR(100),
7
+ provider VARCHAR(255),
8
+ redirect VARCHAR(2000) NOT NULL,
9
+ personal_access_client BOOLEAN NOT NULL DEFAULT false,
10
+ password_client BOOLEAN NOT NULL DEFAULT false,
11
+ revoked BOOLEAN NOT NULL DEFAULT false,
12
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
13
+ updated_at TIMESTAMP
14
+ )
15
+ `);else if(C)await f.unsafe(`
16
+ CREATE TABLE IF NOT EXISTS oauth_clients (
17
+ id INTEGER AUTO_INCREMENT PRIMARY KEY,
18
+ name VARCHAR(255) NOT NULL,
19
+ secret VARCHAR(100),
20
+ provider VARCHAR(255),
21
+ redirect VARCHAR(2000) NOT NULL,
22
+ personal_access_client BOOLEAN NOT NULL DEFAULT 0,
23
+ password_client BOOLEAN NOT NULL DEFAULT 0,
24
+ revoked BOOLEAN NOT NULL DEFAULT 0,
25
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
26
+ updated_at TIMESTAMP
27
+ )
28
+ `);else await f.unsafe(`
29
+ CREATE TABLE IF NOT EXISTS oauth_clients (
30
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
31
+ name VARCHAR(255) NOT NULL,
32
+ secret VARCHAR(100),
33
+ provider VARCHAR(255),
34
+ redirect VARCHAR(2000) NOT NULL,
35
+ personal_access_client BOOLEAN NOT NULL DEFAULT 0,
36
+ password_client BOOLEAN NOT NULL DEFAULT 0,
37
+ revoked BOOLEAN NOT NULL DEFAULT 0,
38
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
39
+ updated_at TIMESTAMP
40
+ )
41
+ `);if(A)await f.unsafe(`
42
+ CREATE TABLE IF NOT EXISTS oauth_access_tokens (
43
+ id SERIAL PRIMARY KEY,
44
+ user_id INTEGER NOT NULL,
45
+ oauth_client_id INTEGER NOT NULL,
46
+ token TEXT NOT NULL,
47
+ name VARCHAR(255),
48
+ scopes TEXT,
49
+ revoked BOOLEAN NOT NULL DEFAULT false,
50
+ expires_at TIMESTAMP,
51
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
52
+ updated_at TIMESTAMP
53
+ )
54
+ `);else if(C)await f.unsafe(`
55
+ CREATE TABLE IF NOT EXISTS oauth_access_tokens (
56
+ id INTEGER AUTO_INCREMENT PRIMARY KEY,
57
+ user_id INTEGER NOT NULL,
58
+ oauth_client_id INTEGER NOT NULL,
59
+ token TEXT NOT NULL,
60
+ name VARCHAR(255),
61
+ scopes TEXT,
62
+ revoked BOOLEAN NOT NULL DEFAULT 0,
63
+ expires_at TIMESTAMP NULL,
64
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
65
+ updated_at TIMESTAMP NULL
66
+ )
67
+ `);else await f.unsafe(`
68
+ CREATE TABLE IF NOT EXISTS oauth_access_tokens (
69
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
70
+ user_id INTEGER NOT NULL,
71
+ oauth_client_id INTEGER NOT NULL,
72
+ token TEXT NOT NULL,
73
+ name VARCHAR(255),
74
+ scopes TEXT,
75
+ revoked BOOLEAN NOT NULL DEFAULT 0,
76
+ expires_at TIMESTAMP,
77
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
78
+ updated_at TIMESTAMP
79
+ )
80
+ `);if(await f.unsafe(`
81
+ CREATE INDEX IF NOT EXISTS idx_oauth_access_tokens_token ON oauth_access_tokens(token)
82
+ `),A)await f.unsafe(`
83
+ CREATE TABLE IF NOT EXISTS oauth_refresh_tokens (
84
+ id SERIAL PRIMARY KEY,
85
+ access_token_id INTEGER NOT NULL,
86
+ token TEXT NOT NULL,
87
+ revoked BOOLEAN NOT NULL DEFAULT false,
88
+ expires_at TIMESTAMP,
89
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
90
+ )
91
+ `);else if(C)await f.unsafe(`
92
+ CREATE TABLE IF NOT EXISTS oauth_refresh_tokens (
93
+ id INTEGER AUTO_INCREMENT PRIMARY KEY,
94
+ access_token_id INTEGER NOT NULL,
95
+ token TEXT NOT NULL,
96
+ revoked BOOLEAN NOT NULL DEFAULT 0,
97
+ expires_at TIMESTAMP NULL,
98
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
99
+ )
100
+ `);else await f.unsafe(`
101
+ CREATE TABLE IF NOT EXISTS oauth_refresh_tokens (
102
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
103
+ access_token_id INTEGER NOT NULL,
104
+ token TEXT NOT NULL,
105
+ revoked BOOLEAN NOT NULL DEFAULT 0,
106
+ expires_at TIMESTAMP,
107
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
108
+ )
109
+ `);await f.unsafe(`
110
+ CREATE INDEX IF NOT EXISTS idx_oauth_refresh_tokens_token ON oauth_refresh_tokens(token)
111
+ `),x.success("OAuth tables ready")}catch(z){x.error("Failed to create OAuth tables",z),E.exit(1)}x.info("Ensuring password_resets table exists...");try{if(A)await f.unsafe(`
112
+ CREATE TABLE IF NOT EXISTS password_resets (
113
+ id SERIAL PRIMARY KEY,
114
+ email VARCHAR(255) NOT NULL,
115
+ token VARCHAR(255) NOT NULL,
116
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
117
+ )
118
+ `);else if(C)await f.unsafe(`
119
+ CREATE TABLE IF NOT EXISTS password_resets (
120
+ id INTEGER AUTO_INCREMENT PRIMARY KEY,
121
+ email VARCHAR(255) NOT NULL,
122
+ token VARCHAR(255) NOT NULL,
123
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
124
+ )
125
+ `);else await f.unsafe(`
126
+ CREATE TABLE IF NOT EXISTS password_resets (
127
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
128
+ email VARCHAR(255) NOT NULL,
129
+ token VARCHAR(255) NOT NULL,
130
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
131
+ )
132
+ `);await f.unsafe(`
133
+ CREATE INDEX IF NOT EXISTS idx_password_resets_email ON password_resets(email)
134
+ `),x.success("Password resets table ready")}catch(z){x.error("Failed to create password_resets table",z),E.exit(1)}x.info("Creating personal access client...");try{if((await f.unsafe(`
135
+ SELECT id FROM oauth_clients WHERE personal_access_client = ${R} LIMIT 1
136
+ `))?.length>0)console.log(`
137
+ \u2713 Personal access client already exists`);else{let F=I(40).toString("hex");if(A)await f.unsafe(`
138
+ INSERT INTO oauth_clients (name, secret, provider, redirect, personal_access_client, password_client, revoked, created_at)
139
+ VALUES ($1, $2, $3, $4, $5, $6, $7, NOW())
140
+ `,["Personal Access Client",F,"local","http://localhost",!0,!1,!1]);else await f.unsafe(`
141
+ INSERT INTO oauth_clients (name, secret, provider, redirect, personal_access_client, password_client, revoked, created_at)
142
+ VALUES (?, ?, ?, ?, ?, ?, ?, ${O})
143
+ `,["Personal Access Client",F,"local","http://localhost",1,0,0]);console.log(`
144
+ \u2713 Personal access client created successfully`)}}catch(z){console.error("Failed to create personal access client:",z),E.exit(1)}console.log(`
145
+ \u2713 Authentication setup complete!`);console.log(`
146
+ Features enabled:`);console.log(" - Token hashing (SHA-256) for secure storage");console.log(" - Refresh tokens for seamless token renewal");console.log(" - Scope-based authorization");console.log(" - Password reset flow");console.log(`
147
+ Next steps:`);console.log(" 1. Use createToken(userId, name, scopes) to generate tokens");console.log(" 2. Use refreshToken(token) to exchange refresh tokens");console.log(' 3. Use the "auth" middleware to protect routes');console.log(" 4. Use tokenCan(scope) for authorization checks");console.log(" 5. POST /password/forgot to request password reset");console.log(` 6. POST /password/reset to reset password with token
148
+ `);E.exit(0);
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import q from"process";import{createPersonalAccessClient as v}from"@stacksjs/auth";import{log as w}from"@stacksjs/logging";var m=await v();if(m?.isErr)console.error(m.error),w.error("createPersonalAccessClient failed",m.error),q.exit(1);q.exit(0);
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var{$:i}=globalThis.Bun;import{log as m}from"@stacksjs/cli";import{buddyPath as o}from"@stacksjs/path";m.info("Building CLI...");i.cwd(o());await i`bun ${o("build.ts")}`;
@@ -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.BuildComponents,{cwd:o(),verbose:!0});
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var{$:G}=globalThis.Bun;import{existsSync as H,readFileSync as K,statSync as L}from"fs";import M from"process";import{dim as z,italic as A,log as w}from"@stacksjs/cli";import{corePath as N}from"@stacksjs/path";import{glob as Q}from"@stacksjs/storage";import{ExitCode as R}from"@stacksjs/types";w.info("Building core packages");var T=(await Q([N("*")],{onlyFiles:!1})).sort(),I=T.filter((q)=>{if(!H(q)||!L(q).isDirectory())return!1;let D=`${q}/package.json`;if(!H(D))return!1;try{return typeof JSON.parse(K(D,"utf8")).scripts?.build==="string"}catch(J){return w.warn(`Skipping ${A(z(q))}: package.json could not be read`),!1}});if(I.length===0)w.info("No core packages found"),M.exit(R.FatalError);var B=[];for(let q of I){w.info(`\uD83C\uDFD7\uFE0F Building ${A(z(q))}`);try{G.cwd(q),await G`bun run build`,w.success(`${A(z(q))} built`)}catch(D){w.warn(`Failed to build ${A(z(q))}, skipping...`),B.push(q)}console.log("")}if(B.length>0){w.warn(`${B.length} package(s) failed to build:`);for(let q of B)w.warn(` - ${q}`)}
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{runCommand as o}from"@stacksjs/cli";import{corePath as r}from"@stacksjs/path";await o("bun run build:app",{cwd:r("desktop")});
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{runCommand as r}from"@stacksjs/cli";import{projectPath as m}from"@stacksjs/path";await r("bunpress build",{cwd:m()});
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var{$:o}=globalThis.Bun;import{log as r}from"@stacksjs/cli";import{frameworkPath as i}from"@stacksjs/path";r.info("Building Server...");o.cwd(i("cloud"));await o`bun build.ts`;
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{runCommands as q}from"@stacksjs/cli";import{projectPath as v}from"@stacksjs/path";await q(["bun storage/framework/core/actions/src/build/cli.ts"],{verbose:!0,cwd:v()});await q(["bun storage/framework/core/actions/src/build/core.ts"],{verbose:!0,cwd:v()});
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{runCommand as r}from"@stacksjs/cli";import{frameworkPath as m}from"@stacksjs/path";await r("bun run build",{cwd:m("views/web")});
@@ -1,5 +1,4 @@
1
1
  import type { BuildOptions } from '@stacksjs/types';
2
-
3
2
  export declare function invoke(options: BuildOptions): Promise<void>;
4
3
  export declare function build(options: BuildOptions): Promise<void>;
5
4
  export declare function componentLibraries(options: BuildOptions): Promise<void>;
@@ -7,4 +6,4 @@ export declare function vueComponentLibrary(options: BuildOptions): Promise<void
7
6
  export declare function webComponentLibrary(options: BuildOptions): Promise<void>;
8
7
  export declare function docs(options: BuildOptions): Promise<void>;
9
8
  export declare function stacks(options: BuildOptions): Promise<void>;
10
- export declare function functionsLibrary(options: BuildOptions): Promise<void>;
9
+ export declare function functionsLibrary(options: BuildOptions): Promise<void>;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Oa as B}from"../chunk-schcaf73.js";import"../chunk-v0wnrnaa.js";import"../chunk-n2fd1d0m.js";import"../chunk-s735m9mg.js";import"../chunk-n1y0gpv6.js";import"../chunk-96b7fcmd.js";import{NpmScript as z}from"@stacksjs/enums";import{log as x}from"@stacksjs/logging";import{hasComponents as D,hasFunctions as G}from"@stacksjs/storage";import{runNpmScript as A}from"@stacksjs/utils";async function H(q){if(q.components)await I(q);else if(q.webComponents||q.elements)await E(q);else if(q.functions)await O(q);else if(q.docs)await K(q);else if(q.stacks)await M(q);await B()}async function W(q){return await H(q)}async function I(q){await A(z.GenerateEntries,q),await J(q),await E(q)}async function J(q){if(D())x.info("Building your component library..."),await A(z.BuildComponents,q),x.success("Your component library was built successfully");else x.warn("No components found."),x.info("Before you can build components,"),x.info("you need to have created some in the ./components folder.")}async function E(q){if(x.info("Building your component library for production use & npm/CDN distribution..."),D())await A(z.BuildWebComponents,q),x.success("Your Web Component library was built successfully");else x.info("No components found.")}async function K(q){x.info("Building the documentation site..."),await A(z.BuildDocs,q),x.success("Docs built successfully")}async function M(q){x.info("Building the Stacks Framework..."),await A(z.BuildStacks,q),x.success("Stacks built successfully")}async function O(q){if(G())x.info("Building your functions library for production usages..."),x.info("Production usages include: manual npm distribution and/or CDN distribution"),await A(z.BuildFunctions,q),x.success("Functions library built successfully");else x.info("No functions found")}export{E as webComponentLibrary,J as vueComponentLibrary,M as stacks,H as invoke,O as functionsLibrary,K as docs,I as componentLibraries,W as build};
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{log as L,parseOptions as Y,runCommand as T}from"@stacksjs/cli";import{path as J}from"@stacksjs/path";import{join as Z,relative as _}from"path";var M=Y(),$=new Set(["patch","minor","major","prepatch","preminor","premajor","prerelease"]),H=M?.bump?.toString(),U=H?$.has(H)||/^\d+\.\d+\.\d+(?:-[\w.]+)?$/.test(H)?H:null:null;if(H&&!U)L.warn(`Ignoring invalid --bump "${H}"; expected one of patch|minor|major or x.y.z`);async function O(q){if(!q||/^\d+\.\d+\.\d+(?:-[\w.]+)?$/.test(q))return q;if(!["patch","minor","major"].includes(q))return q;let D=(await Bun.file(J.frameworkPath("core/package.json")).json()).version?.match(/^(\d+)\.(\d+)\.(\d+)$/);if(!D)return q;let[,z,E,X]=D.map(Number);if(q==="major")return`${z+1}.0.0`;if(q==="minor")return`${z}.${E+1}.0`;return`${z}.${E}.${X+1}`}var Q=await O(U),R=J.projectPath("buddy"),S=M?.dryRun?`${R} changelog --quiet --dry-run`:`${R} changelog --quiet`,G=J.frameworkPath("core");async function K(q,I){let D=new Bun.Glob(q),z=[];for await(let E of D.scan({cwd:I,absolute:!0,onlyFiles:!0})){if(E.includes("/node_modules/")||E.includes("/dist/")||E.includes("/pantry/"))continue;z.push(`./${_(G,E)}`)}return z}async function P(q){let I=[];for(let D of q){let z=Z(G,D);if(await Bun.file(z).exists())I.push(D)}return I}var x=new Set([...await K("package.json",G),...await K("*/package.json",G),...await K("*/*/package.json",G),...await P(["../package.json","../defaults/ide/vscode/package.json","../api/package.json","../cloud/package.json","../docs/package.json","../orm/package.json","../server/package.json"]),...await K("../libs/**/package.json",G)]),V=Array.from(x).join(","),N=["--all","--no-recursive"];if(M?.dryRun)N.push("--dry-run","--no-push");if(Q)N.push("--yes");if(M?.verbose)N.push("--verbose");var W=`bunx --bun bumpx ${Q?`${Q} `:""}--files ${V} ${N.join(" ")}`;L.debug(`Running: ${W}`);L.debug(`Bumping ${V.split(",").filter(Boolean).length} package manifest(s)`);L.debug(`In frameworkPath: ${J.frameworkPath()}`);await T(W,{cwd:G,stdin:"inherit"});await T(S,{cwd:J.projectPath(),stdin:"inherit"});
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+ // @bun
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{execSync as F,log as A,parseOptions as I,runCommand as J}from"@stacksjs/cli";import{projectPath as K}from"@stacksjs/path";var G=(H)=>{let B=H.trim();if(!/^[A-Za-z0-9._/-]+$/.test(B))throw Error(`Invalid git revision: ${B}`);return B};A.debug("Generating changelog");var D=G(await F("git describe --abbrev=0 --tags HEAD^"));A.debug("FromRevision",D);var E=G(await F("git describe"));A.debug("ToRevision",E);var q=I();A.debug("Changelog Options",q);var L=q?.dryRun?`bunx --bun changelogen --no-output --from ${D} --to ${E}`:`bunx --bun changelogen --output CHANGELOG.md --from ${D} --to ${E}`;await J(L,{cwd:K(),quiet:q?.quiet,verbose:q?.verbose});
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var{$:x}=globalThis.Bun;import z from"process";import{log as m}from"@stacksjs/logging";import{findStacksProjects as A}from"@stacksjs/utils";var v=await A(void 0,{quiet:!0});m.debug("Running `buddy ports`");m.debug(`Found ${v.length} projects`);m.debug("Projects:",v);for(let q of v){m.debug("Running `buddy ports`"),m.debug("Project:",q),x.cwd(q);let y=await x`./buddy ports --project ${q} --quiet`.text();m.debug("ports",y)}z.exit(0);
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{log as o}from"@stacksjs/logging";import{cleanProject as n}from"@stacksjs/utils";o.info("Running clean command...");await n();
@@ -1,4 +1,3 @@
1
1
  import type { CleanOptions } from '@stacksjs/types';
2
-
3
2
  export declare function invoke(options: CleanOptions): Promise<void>;
4
- export declare function commit(options: CleanOptions): Promise<void>;
3
+ export declare function commit(options: CleanOptions): Promise<void>;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Fa as a,Ga as b}from"../chunk-2gh7kgpc.js";import"../chunk-96b7fcmd.js";export{a as invoke,b as commit};
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env bun
2
+ // @bun
3
+ import{frameworkPath as b}from"@stacksjs/path";import{copyFolder as x}from"@stacksjs/storage";var z=[[b("dist/types/components"),b("defaults/resources/components/vue/dist/types")],[b("dist/types/components"),b("defaults/resources/components/web/dist/types")],[b("dist/types/functions"),b("defaults/functions/dist/types")]];z.forEach(([q,u])=>{x(q,u)});
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import A from"process";import{log as q}from"@stacksjs/cli";import{seed as C}from"@stacksjs/database";var D=Date.now();try{let y=await C({verbose:!0}),B=Date.now()-D;if(y.failed>0){q.warn(""),q.warn(`Seeding completed with ${y.failed} failure(s):`);for(let z of y.results)if(!z.success)q.error(` - ${z.model}: ${z.error}`);q.info(""),q.info("Note: Failed models may have schema mismatches or invalid factory functions."),q.info("Tip: Run `./buddy migrate:fresh` to ensure schema is up to date.")}q.info(""),q.success(`Seeding completed in ${B}ms`),q.info(` Total models: ${y.total}`),q.info(` Successful: ${y.successful}`),q.info(` Failed: ${y.failed}`),A.exit(0)}catch(y){q.error("Seeding failed catastrophically:",y),A.exit(1)}
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import B from"process";import{S3Client as D,SESClient as F}from"@stacksjs/ts-cloud";import{log as G}from"@stacksjs/cli";import{ExitCode as H}from"@stacksjs/types";var I=new F,J=new D,q,A=await J.listBuckets();if(A.Buckets)q=A.Buckets.find((z)=>z.Name?.includes("-email-"))?.Name;console.log("Bucket Name:",q);if(!q)console.log("Stacks Email Bucket not found"),B.exit(H.FatalError);try{await I.createReceiptRule({RuleSetName:"your-rule-set-name",Rule:{Name:"Inbound",Enabled:!0,ScanEnabled:!0,TlsPolicy:"Require",Actions:[{S3Action:{BucketName:q,ObjectKeyPrefix:"tmp/email_in"}}]}}),G.info("Success: Receipt rule created")}catch(z){console.error(z)}
@@ -0,0 +1 @@
1
+