@stacksjs/actions 0.70.22 → 0.70.25

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 +2 -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-0m948f1p.js +0 -2177
  281. package/dist/chunk-23btgw5e.js +0 -1402
  282. package/dist/chunk-2dvnt46s.js +0 -7657
  283. package/dist/chunk-3y8t4qyf.js +0 -72
  284. package/dist/chunk-494jp8d5.js +0 -54
  285. package/dist/chunk-5wdfth6e.js +0 -901
  286. package/dist/chunk-8qsrwjam.js +0 -92
  287. package/dist/chunk-90y2wmyz.js +0 -2376
  288. package/dist/chunk-92e6scf8.js +0 -379
  289. package/dist/chunk-9v6qtbez.js +0 -45
  290. package/dist/chunk-a13x0e43.js +0 -1180
  291. package/dist/chunk-atahpwz7.js +0 -5762
  292. package/dist/chunk-bz3nmjmp.js +0 -212
  293. package/dist/chunk-ddw2jq8f.js +0 -179250
  294. package/dist/chunk-frw3va9v.js +0 -69
  295. package/dist/chunk-hqmjfnnn.js +0 -105
  296. package/dist/chunk-jq06qn43.js +0 -410
  297. package/dist/chunk-mbvdyeyw.js +0 -50
  298. package/dist/chunk-mdj7x1vs.js +0 -790
  299. package/dist/chunk-mdqphqep.js +0 -438
  300. package/dist/chunk-ny592jcd.js +0 -133
  301. package/dist/chunk-p0c688mg.js +0 -729
  302. package/dist/chunk-q9dmga3k.js +0 -11
  303. package/dist/chunk-qhh0v93n.js +0 -73
  304. package/dist/chunk-qka5w6cv.js +0 -1282
  305. package/dist/chunk-qkm8e752.js +0 -51
  306. package/dist/chunk-rbsehxzg.js +0 -65
  307. package/dist/chunk-rfdmx5yh.js +0 -170
  308. package/dist/chunk-s3xxrvrk.js +0 -311
  309. package/dist/chunk-w6fdq4hk.js +0 -14425
  310. package/dist/chunk-wkwtsvym.js +0 -477
  311. package/dist/chunk-y08qabyb.js +0 -3821
  312. package/dist/chunk-yyvh669b.js +0 -197
  313. package/dist/chunk-ze46550n.js +0 -0
  314. package/dist/chunk-zhrbz0qv.js +0 -661
  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,3 @@
1
+ // @bun
2
+ import{NpmScript as i}from"@stacksjs/enums";import{log as t}from"@stacksjs/logging";import{projectPath as m}from"@stacksjs/path";import{runNpmScript as r}from"@stacksjs/utils";async function n(o){t.info("Committing..."),await r(i.Commit,{cwd:m(),...o}),t.success("Committed")}async function a(o){return await n(o)}
3
+ export{n as Fa,a as Ga};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{existsSync as T,readdirSync as $,readFileSync as X,statSync as z,writeFileSync as J}from"fs";import{homedir as Q}from"os";import{join as Y,resolve as I}from"path";import A from"process";function m(q,B){let D=q.version;if(D)return{channel:"stable",ref:D.startsWith("v")?D:`v${D}`,targetVersion:D};if(q.canary)return{channel:"canary",ref:"canary"};if(q.stable)return{channel:"stable",ref:"main"};if(B==="canary")return{channel:"canary",ref:"canary"};return{channel:"stable",ref:"main"}}function F(q,B="storage/framework/core"){return`github:stacksjs/stacks#${q}/${B}`}function S(q){try{if(T(q))return JSON.parse(X(q,"utf-8")).version||null}catch{}return null}function v(q){try{if(T(q)){if(X(q,"utf-8").trim()==="canary")return"canary"}}catch{}return"stable"}function P(q,B){try{J(q,B,"utf-8")}catch{}}function g(q,B,D){if(q.targetVersion)return`Installing Stacks v${q.targetVersion.replace(/^v/,"")}...`;if(q.channel==="canary")return"Upgrading to the latest canary build...";if(D&&B==="canary")return"Switching back to the latest stable release...";return"Upgrading to the latest version..."}function w(q,B,D,G,H){if(q.targetVersion){let E=q.targetVersion.replace(/^v/,"");if(B===E&&!H)return`Stacks is already at v${E}`;if(B)return`Installed Stacks v${E} (was v${B})`;return`Installed Stacks v${E}`}if(B&&D&&B===D&&!H){if(q.channel==="canary")return`Stacks is already up to date (canary ${B})`;return`Stacks is already up to date (v${B})`}if(B&&D){let E=G==="canary"?`canary ${B}`:`v${B}`,K=q.channel==="canary"?`canary ${D}`:`v${D}`;return`Upgraded Stacks from ${E} to ${K}`}if(D)return`Upgraded Stacks to ${q.channel==="canary"?`canary ${D}`:`v${D}`}`;return`Upgraded Stacks to ${q.ref} (latest)`}var b=[{localPath:"storage/framework/core",subPath:"storage/framework/core",label:"core",skip:["node_modules","dist","bun.lock",".DS_Store"]},{localPath:"storage/framework/defaults",subPath:"storage/framework/defaults",label:"defaults",skip:["node_modules","dist",".DS_Store",".discovered-models.json"]},{localPath:"buddy",subPath:"buddy",label:"buddy",isFile:!0},{localPath:"bootstrap",subPath:"bootstrap",label:"bootstrap",isFile:!0}];function x(q){let B=[A.env.STACKS_LOCAL_PATH,I(q,"..","stacks"),I(q,"..","..","stacks"),I(Q(),"Code","stacks"),I(Q(),"code","stacks"),I(Q(),"projects","stacks"),I(Q(),"src","stacks")];for(let D of B){if(!D)continue;let G=Y(D,"storage","framework","core","buddy","package.json");try{if(T(G)&&I(D)!==I(q))return I(D)}catch{}}return null}async function f(q,B=[]){let D=new Map;if(!T(q))return D;let G=new Set(B),H=[{abs:q,rel:""}],E=[];while(H.length>0){let{abs:K,rel:M}=H.pop(),L;try{L=$(K)}catch{continue}for(let N of L){if(G.has(N))continue;let U=Y(K,N),W=M?`${M}/${N}`:N,O;try{O=z(U)}catch{continue}if(O.isDirectory())H.push({abs:U,rel:W});else if(O.isFile()){let Z=O.size;E.push((async()=>{let _=await C(U);D.set(W,{size:Z,hash:_})})())}}}return await Promise.all(E),D}function p(q,B){let D=0,G=0,H=0;for(let[K,M]of B){let L=q.get(K);if(!L)D++;else if(L.size!==M.size||L.hash!==M.hash)G++;else H++}let E=0;for(let K of q.keys())if(!B.has(K))E++;return{added:D,changed:G,removed:E,unchanged:H}}async function C(q){try{let B=await Bun.file(q).arrayBuffer();return Bun.hash(B)}catch{return 0n}}
3
+ export{m as a,F as b,S as c,v as d,P as e,g as f,w as g,b as h,x as i,f as j,p as k};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{log as H}from"@stacksjs/logging";import{dirname as T,join as Z,projectPath as A,relative as m,stacksBackupPath as u,stacksLockPath as b}from"@stacksjs/path";import{copyFile as K,createFolder as R,deleteFile as g,deleteEmptyFolders as d,doesFolderExist as P,fs as J}from"@stacksjs/storage";var F=["app","config","database","resources","routes","public","locales"];async function L(){let z=b();try{if(J.existsSync(z)){let q=await Bun.file(z).text();return JSON.parse(q)}}catch{}return{version:1,generatedAt:new Date().toISOString(),stacks:{}}}async function D(z){let q=b(),W=T(q);if(!J.existsSync(W))await R(W);z.generatedAt=new Date().toISOString(),await Bun.write(q,JSON.stringify(z,null,2))}function y(z){let q=A("pantry"),W=Z(q,z);if(J.existsSync(Z(W,"package.json")))return W;let X=Z(q,"@stacksjs",z);if(J.existsSync(Z(X,"package.json")))return X;if(z.startsWith("@")){let Q=Z(q,z);if(J.existsSync(Z(Q,"package.json")))return Q}let M=["*/package.json","@*/*/package.json"];for(let Q of M){let Y=new Bun.Glob(Q);for(let $ of Y.scanSync({cwd:q,absolute:!0,onlyFiles:!0}))try{if(JSON.parse(J.readFileSync($,"utf-8"))?.stacks?.name===z)return T($)}catch{}}return null}function C(z,q){let W=[];if(!J.existsSync(z))return W;let X=J.readdirSync(z,{withFileTypes:!0});for(let M of X){let Q=Z(z,M.name);if(M.isDirectory())W.push(...C(Q,q));else W.push(m(q,Q))}return W}async function n(z){let{name:q,force:W=!1,dryRun:X=!1,verbose:M=!1}=z,Q=W?"overwrite":z.conflict??"skip";H.info(`Installing stack "${q}"...`);let Y=y(q);if(!Y)return H.error(`Stack "${q}" not found in pantry. Install it first with: bun add <package-name>`),null;let $,G;try{let V=await Bun.file(Z(Y,"package.json")).text();if($=JSON.parse(V),G=$.stacks,!G?.name)return H.error(`Package at "${Y}" does not have a valid "stacks" field in package.json`),null}catch(V){return H.error(`Failed to read stack package.json: ${V}`),null}let O=await L(),U=$.name||q;if(O.stacks[U]&&!W)return H.warn(`Stack "${G.name}" is already installed. Use --force to reinstall.`),O.stacks[U];let B=G.directories??F,w=[];for(let V of B){let E=Z(Y,V);if(J.existsSync(E)){let _=C(E,Y);w.push(..._)}}if(w.length===0)return H.warn(`Stack "${G.name}" has no files to install`),null;if(M)H.info(`Found ${w.length} file(s) to install`);let x=[],I=[];for(let V of w){let E=Z(Y,V),_=A(V);if(X){if(J.existsSync(_))if(H.info(`[dry-run] Would ${Q}: ${V}`),Q==="skip")I.push(V);else x.push(V);else H.info(`[dry-run] Would copy: ${V}`),x.push(V);continue}if(J.existsSync(_))switch(Q){case"skip":if(M)H.warn(`Skipping (file exists): ${V}`);I.push(V);continue;case"backup":{let f=u(G.name),v=Z(f,V),j=T(v);if(!J.existsSync(j))await R(j);if(K(_,v),M)H.info(`Backed up: ${V}`);break}case"overwrite":if(M)H.warn(`Overwriting: ${V}`);break}let S=T(_);if(!J.existsSync(S))await R(S);if(K(E,_),x.push(V),M)H.info(`Copied: ${V}`)}if(X)return H.info(`[dry-run] Would install ${x.length} file(s), skip ${I.length} file(s)`),null;let N={packageName:U,name:G.name,version:$.version||"0.0.0",installedAt:new Date().toISOString(),files:x,skipped:I,conflictStrategy:Q};return O.stacks[U]=N,await D(O),H.success(`Installed stack "${G.name}" (${x.length} file(s) copied, ${I.length} skipped)`),N}async function c(z){let{name:q,force:W=!1,verbose:X=!1}=z;H.info(`Uninstalling stack "${q}"...`);let M=await L(),Q=null,Y=null;for(let[O,U]of Object.entries(M.stacks))if(U.name===q||O===q){Q=O,Y=U;break}if(!Y||!Q)return H.error(`Stack "${q}" is not installed`),!1;let $=0;for(let O of Y.files){let U=A(O);if(!J.existsSync(U)){if(X)H.info(`Already removed: ${O}`);continue}if(!W){let B=y(q);if(B){let w=Z(B,O);if(J.existsSync(w)){let x=await Bun.file(w).text(),I=await Bun.file(U).text();if(x!==I){H.warn(`Skipping modified file: ${O} (use --force to remove)`);continue}}}}if(await g(U),$++,X)H.info(`Removed: ${O}`)}let G=u(Y.name);if(J.existsSync(G)&&P(G)){let O=C(G,G);for(let U of O){let B=Z(G,U),w=A(U),x=T(w);if(!J.existsSync(x))await R(x);if(K(B,w),X)H.info(`Restored from backup: ${U}`)}J.rmSync(G,{recursive:!0,force:!0})}for(let O of F){let U=A(O);if(J.existsSync(U))await d(U)}return delete M.stacks[Q],await D(M),H.success(`Uninstalled stack "${Y.name}" (${$} file(s) removed)`),!0}async function i(){let z=[],q=await L(),W=A("pantry");if(J.existsSync(W)){let X=["*/package.json","@*/*/package.json"];for(let M of X){let Q=new Bun.Glob(M);for(let Y of Q.scanSync({cwd:W,absolute:!0,onlyFiles:!0}))try{let $=J.readFileSync(Y,"utf-8"),G=JSON.parse($);if(!G?.stacks?.name)continue;let O=G.name,U=!!q.stacks[O],B=q.stacks[O];z.push({name:G.stacks.name,packageName:O,version:G.version||"0.0.0",description:G.stacks.description,installed:U,installedAt:B?.installedAt,fileCount:B?.files.length})}catch{}}}for(let[X,M]of Object.entries(q.stacks))if(!z.some((Q)=>Q.packageName===X))z.push({name:M.name,packageName:X,version:M.version,installed:!0,installedAt:M.installedAt,fileCount:M.files.length});return z}
3
+ export{n as t,c as u,i as v};
@@ -0,0 +1,184 @@
1
+ // @bun
2
+ var b={action:`import { Action } from '@stacksjs/actions'
3
+
4
+ export default new Action({
5
+ name: '{0}',
6
+ description: '{0} action',
7
+
8
+ handle() {
9
+ return 'Hello World action'
10
+ },
11
+ })`,actionWithValidation:`import { Action } from '@stacksjs/actions'
12
+ import { schema, validate } from '@stacksjs/validation'
13
+
14
+ export default new Action({
15
+ name: '{0}',
16
+ description: '{0} action',
17
+
18
+ async handle(request) {
19
+ // Replace these rules with whatever this action expects. The
20
+ // returned object is typed to the rule shape; type-narrow further
21
+ // by passing a generic to validate&lt;Payload&gt;().
22
+ const data = await validate(request, {
23
+ // example: title: schema.string().required().min(1),
24
+ })
25
+
26
+ return { ok: true, data }
27
+ },
28
+ })`,actionWithAuth:`import { Action } from '@stacksjs/actions'
29
+
30
+ export default new Action({
31
+ name: '{0}',
32
+ description: '{0} action (authenticated)',
33
+
34
+ async handle(request) {
35
+ const user = await request.user()
36
+ if (!user) {
37
+ return new Response('Unauthorized', { status: 401 })
38
+ }
39
+
40
+ return { ok: true, userId: user.id }
41
+ },
42
+ })`,actionWithBoth:`import { Action } from '@stacksjs/actions'
43
+ import { schema, validate } from '@stacksjs/validation'
44
+
45
+ export default new Action({
46
+ name: '{0}',
47
+ description: '{0} action (authenticated + validated)',
48
+
49
+ async handle(request) {
50
+ const user = await request.user()
51
+ if (!user) {
52
+ return new Response('Unauthorized', { status: 401 })
53
+ }
54
+
55
+ const data = await validate(request, {
56
+ // example: title: schema.string().required().min(1),
57
+ })
58
+
59
+ return { ok: true, userId: user.id, data }
60
+ },
61
+ })`,component:`<script setup lang="ts">
62
+ console.log('Hello World component created')
63
+ </script>
64
+
65
+ <template>
66
+ <div>
67
+ Some HTML block
68
+ </div>
69
+ </template>`,page:`<script setup lang="ts">
70
+ console.log('Hello World page created')
71
+ </script>
72
+
73
+ <template>
74
+ <div>
75
+ Visit http://127.0.0.1/{0}
76
+ </div>
77
+ </template>`,function:`// reactive state
78
+ const {0} = ref(0)
79
+
80
+ // functions that mutate state and trigger updates
81
+ function increment() {
82
+ {0}.value++
83
+ }
84
+
85
+ export {
86
+ {0},
87
+ increment,
88
+ }`,language:`button:
89
+ text: Copy`,notification:`import type { {0} } from '@stacksjs/types'
90
+
91
+ function content(): string {
92
+ return 'example'
93
+ }
94
+
95
+ function send(): {0} {
96
+ return {
97
+ content: content(),
98
+ }
99
+ }`,middleware:`import type { Request } from '@stacksjs/router'
100
+ import { Middleware } from '@stacksjs/router'
101
+
102
+ export default new Middleware({
103
+ name: '{0}',
104
+ priority: 1,
105
+ async handle(request: Request) {
106
+ // Your middleware logic here
107
+ },
108
+ })`,model:`import { defineModel } from '@stacksjs/orm'
109
+ import { schema } from '@stacksjs/validation'
110
+
111
+ export default defineModel({
112
+ name: '{0}',
113
+ table: '{1}',
114
+ primaryKey: 'id',
115
+ autoIncrement: true,
116
+
117
+ traits: {
118
+ useTimestamps: true,
119
+
120
+ useSeeder: {
121
+ count: 10,
122
+ },
123
+ },
124
+
125
+ attributes: {
126
+ // your attributes here
127
+ },
128
+ } as const)`,migration:`import type { Database } from '@stacksjs/database'
129
+
130
+ export async function up(db: Database): Promise<void> {
131
+ await db.schema
132
+ .createTable('{0}')
133
+ .addColumn('id', 'integer', col => col.autoIncrement().primaryKey())
134
+ .execute()
135
+ }`,stackPackageJson:`{
136
+ "name": "{0}",
137
+ "version": "0.0.1",
138
+ "type": "module",
139
+ "stacks": {
140
+ "name": "{1}",
141
+ "description": "A Stacks extension"
142
+ }
143
+ }`,job:`import { Job } from '@stacksjs/jobs'
144
+
145
+ export default new Job({
146
+ name: '{0}',
147
+ description: '{0} job',
148
+
149
+ async handle() {
150
+ // Your job logic here
151
+ console.log('Job executed')
152
+ },
153
+ })`,event:`import { Event } from '@stacksjs/events'
154
+
155
+ export default new Event({
156
+ name: '{0}',
157
+ description: '{0} event',
158
+
159
+ async handle(data: any) {
160
+ // Your event handler logic here
161
+ console.log('Event handled:', data)
162
+ },
163
+ })`,listener:`import { Listener } from '@stacksjs/events'
164
+
165
+ export default new Listener({
166
+ name: '{0}',
167
+ description: '{0} listener',
168
+
169
+ async handle(data: any) {
170
+ // Your listener logic here
171
+ console.log('Listener triggered:', data)
172
+ },
173
+ })`,command:`import { Command } from '@stacksjs/cli'
174
+
175
+ export default new Command({
176
+ name: '{0}',
177
+ description: '{0} command',
178
+
179
+ async handle() {
180
+ // Your command logic here
181
+ console.log('Command executed')
182
+ },
183
+ })`};
184
+ export{b as aa};
@@ -0,0 +1,130 @@
1
+ // @bun
2
+ import{log as A}from"@stacksjs/logging";import*as H from"@stacksjs/path";import{writeFile as L}from"@stacksjs/storage";async function T(v){let x=v,y=v.name;if(!y)return A.error("Job name is required"),!1;let z=y.endsWith("Job")?y:`${y}Job`,I=x.class??!1?Q(z,x):M(z,x),E=H.userJobsPath(`${z}.ts`);try{return await L(E,I),A.success(`Created job: ${E}`),!0}catch(K){return A.error(`Failed to create job: ${K.message}`),!1}}function M(v,x){let y=x.queue??"default",z=x.tries??3,D=x.backoff??3;return`import { Job } from '@stacksjs/queue'
3
+
4
+ export default new Job({
5
+ /**
6
+ * The job name (optional, defaults to filename)
7
+ */
8
+ name: '${v}',
9
+
10
+ /**
11
+ * A description of what this job does (optional)
12
+ */
13
+ description: '${v} job',
14
+
15
+ /**
16
+ * The queue this job should be dispatched to
17
+ */
18
+ queue: '${y}',
19
+
20
+ /**
21
+ * Number of times to retry if the job fails
22
+ */
23
+ tries: ${z},
24
+
25
+ /**
26
+ * Seconds to wait between retry attempts
27
+ */
28
+ backoff: ${D},
29
+
30
+ /**
31
+ * Cron expression for scheduled jobs (optional)
32
+ * Examples:
33
+ * - '* * * * *' - Every minute
34
+ * - '0 * * * *' - Every hour
35
+ * - '0 0 * * *' - Every day at midnight
36
+ */
37
+ // rate: '* * * * *',
38
+
39
+ /**
40
+ * Backoff configuration for advanced retry strategies (optional)
41
+ */
42
+ // backoffConfig: {
43
+ // strategy: 'exponential', // 'fixed' | 'exponential' | 'linear'
44
+ // initialDelay: 1000,
45
+ // factor: 2,
46
+ // maxDelay: 60000,
47
+ // },
48
+
49
+ /**
50
+ * Handle the job
51
+ * @param payload - The job payload data
52
+ * @returns The result of the job processing
53
+ */
54
+ async handle(payload: Record<string, unknown>) {
55
+ // Add your job logic here.
56
+ console.log('Processing job with payload:', payload)
57
+
58
+ return { success: true }
59
+ },
60
+ })
61
+ `}function Q(v,x){let y=x.queue??"default",z=x.tries??3;return`import { log } from '@stacksjs/logging'
62
+
63
+ /**
64
+ * ${v}
65
+ *
66
+ * Generated job class.
67
+ */
68
+ export default class ${v} {
69
+ /**
70
+ * Job configuration
71
+ */
72
+ public static config = {
73
+ /**
74
+ * The queue this job should be dispatched to
75
+ */
76
+ queue: '${y}',
77
+
78
+ /**
79
+ * Cron expression for scheduled jobs (optional)
80
+ * Examples:
81
+ * - '* * * * *' - Every minute
82
+ * - '0 * * * *' - Every hour
83
+ * - '0 0 * * *' - Every day at midnight
84
+ */
85
+ // schedule: '0 0 * * *',
86
+
87
+ /**
88
+ * Prevent overlapping job executions
89
+ */
90
+ withoutOverlapping: false,
91
+
92
+ /**
93
+ * Timeout in seconds
94
+ */
95
+ timeout: 60,
96
+
97
+ /**
98
+ * Number of retry attempts
99
+ */
100
+ retries: ${z},
101
+
102
+ /**
103
+ * Delay between retries in seconds
104
+ */
105
+ retryAfter: [60, 120, 300],
106
+ }
107
+
108
+ /**
109
+ * Execute the job
110
+ * @param payload - The job payload data
111
+ */
112
+ public static async handle(payload?: Record<string, unknown>): Promise<{ success: boolean }> {
113
+ try {
114
+ log.info('${v}: Starting job execution')
115
+
116
+ // Add your job logic here.
117
+ console.log('Processing with payload:', payload)
118
+
119
+ log.info('${v}: Job completed successfully')
120
+
121
+ return { success: true }
122
+ }
123
+ catch (error) {
124
+ log.error('${v}: Job failed:', error)
125
+ throw error
126
+ }
127
+ }
128
+ }
129
+ `}
130
+ export{T as z};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{Ya as o}from"./chunk-n1y0gpv6.js";import{Action as r}from"@stacksjs/enums";async function v(e){await o(r.Dev,e)}async function s(e){await o(r.Dev,e)}async function a(e){await n(e)}async function n(e){await o(r.DevApi,e)}async function D(e){await o(r.DevComponents,e)}async function p(e){await o(r.DevDashboard,e)}async function c(e){await o(r.DevSystemTray,e)}async function m(e){await o(r.DevDesktop,e)}async function u(e){await o(r.DevDocs,e)}
3
+ export{v as ia,s as ja,a as ka,n as la,D as ma,p as na,c as oa,m as pa,u as qa};