@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,102 @@
1
+ /**
2
+ * Resolve the target channel and git ref from CLI options and persisted channel.
3
+ * Priority: --version > --canary > --stable > persisted channel
4
+ */
5
+ export declare function resolveUpgradeContext(options: {
6
+ version?: string
7
+ canary?: boolean
8
+ stable?: boolean
9
+ }, currentChannel: 'stable' | 'canary'): UpgradeContext;
10
+ /**
11
+ * Build the gitit template string for a path under the stacks repo.
12
+ * `subPath` is relative to the repo root (e.g. `storage/framework/core`).
13
+ */
14
+ export declare function buildTemplateString(ref: string, subPath?: string): string;
15
+ /**
16
+ * Read a version from a package.json file. Returns null on any error.
17
+ */
18
+ export declare function readVersion(pkgPath: string): string | null;
19
+ /**
20
+ * Read the persisted channel from the channel file.
21
+ */
22
+ export declare function readChannel(channelFilePath: string): 'stable' | 'canary';
23
+ /**
24
+ * Persist the channel to the channel file.
25
+ */
26
+ export declare function writeChannel(channelFilePath: string, ch: 'stable' | 'canary'): void;
27
+ /**
28
+ * Determine the user-facing log message for the upgrade action.
29
+ */
30
+ export declare function resolveUpgradeMessage(ctx: UpgradeContext, currentChannel: 'stable' | 'canary', isStableFlag: boolean): string;
31
+ /**
32
+ * Determine the user-facing success message after an upgrade.
33
+ */
34
+ export declare function resolveSuccessMessage(ctx: UpgradeContext, currentVersion: string | null, newVersion: string | null, currentChannel: 'stable' | 'canary', force: boolean): string;
35
+ /**
36
+ * Auto-detect a local stacks checkout the user might be developing against.
37
+ *
38
+ * Order:
39
+ * 1. `STACKS_LOCAL_PATH` env var (explicit)
40
+ * 2. Sibling directory: `<project>/../stacks`
41
+ * 3. `~/Code/stacks` and a few common dev paths
42
+ *
43
+ * Returns null if nothing looks like a stacks checkout. We confirm by checking
44
+ * for `storage/framework/core/buddy/package.json` — the canonical marker.
45
+ */
46
+ export declare function detectLocalStacks(projectRoot: string): string | null;
47
+ /**
48
+ * Walk a directory recursively and return a Map of relative-path → entry,
49
+ * with each entry's size + content hash captured at the time of the call.
50
+ * Hashing the entire tree at snapshot time (rather than at diff time) means
51
+ * the "before" snapshot stays valid even after `cpSync` overwrites the
52
+ * files in place.
53
+ *
54
+ * Async because we read each file via `Bun.file().arrayBuffer()`. On a
55
+ * 3000-file framework tree this completes in ~50ms — `Bun.hash` is xxh3,
56
+ * not a crypto hash, and the I/O is fully parallelized.
57
+ */
58
+ export declare function snapshotTree(root: string, skip?: string[]): Promise<Map<string, SnapshotEntry>>;
59
+ /**
60
+ * Diff two snapshots produced by `snapshotTree`. Pure comparison — both
61
+ * inputs already carry their content hash, so this is just bookkeeping.
62
+ */
63
+ export declare function diffSnapshots(before: Map<string, SnapshotEntry>, after: Map<string, SnapshotEntry>): ChangeSummary;
64
+ export declare const MANAGED_PATHS: ManagedPath[];
65
+ export declare interface UpgradeContext {
66
+ channel: 'stable' | 'canary'
67
+ ref: string
68
+ targetVersion?: string
69
+ }
70
+ /**
71
+ * Framework-managed paths, relative to the project root, that `buddy update`
72
+ * keeps in sync with the upstream stacks repo. Each entry can be a directory
73
+ * (synced recursively) or a single file. The `subPath` is the path inside the
74
+ * upstream stacks checkout — almost always the same as `localPath`, except
75
+ * for root scripts that live at the project root in apps but at the repo root
76
+ * in the stacks monorepo.
77
+ */
78
+ export declare interface ManagedPath {
79
+ localPath: string
80
+ subPath: string
81
+ isFile?: boolean
82
+ skip?: string[]
83
+ label: string
84
+ }
85
+ /**
86
+ * Snapshot entry. We capture size + content hash at snapshot time so the
87
+ * before/after diff can detect "actually changed" vs "just re-copied with
88
+ * fresh mtimes". `cpSync` and `downloadTemplate` always touch mtimes,
89
+ * even when the destination bytes are identical to the source — using
90
+ * mtime as the change signal turns every no-op upgrade into a "1600
91
+ * changed" report.
92
+ */
93
+ export declare interface SnapshotEntry {
94
+ size: number
95
+ hash: bigint
96
+ }
97
+ export declare interface ChangeSummary {
98
+ added: number
99
+ changed: number
100
+ removed: number
101
+ unchanged: number
102
+ }
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{a,b,c,d,e,f,g,h,i,j,k}from"../../chunk-2kaj93p5.js";import"../../chunk-96b7fcmd.js";export{e as writeChannel,j as snapshotTree,f as resolveUpgradeMessage,a as resolveUpgradeContext,g as resolveSuccessMessage,c as readVersion,d as readChannel,k as diffSnapshots,i as detectLocalStacks,b as buildTemplateString,h as MANAGED_PATHS};
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,7 @@
1
+ // @bun
2
+ import{a as k,b as f,c as C,d as j,e as x,f as P,g as T,h as G,i as S,j as E,k as h}from"../../chunk-2kaj93p5.js";import{gb as m}from"../../chunk-96b7fcmd.js";import{copyFileSync as u,cpSync as g,existsSync as Y,mkdirSync as w,readFileSync as i,rmSync as c}from"fs";import{dirname as n,join as U}from"path";import $ from"process";import{parseOptions as s}from"@stacksjs/cli";import{downloadTemplate as y}from"@stacksjs/gitit";import{path as Z}from"@stacksjs/path";import{ExitCode as D}from"@stacksjs/types";var J=s(),N=Z.projectPath(),p=U(N,".stacks-channel"),L=j(p),B=k(J,L),d=Z.projectPath("storage/framework/core/buddy/package.json"),o=C(d),t=J.from?Z.projectPath(J.from):null,V=t??S(N),M=!!V;console.log(P(B,L,!!J.stable));console.log(M?` source: local checkout at ${V}`:` source: github:stacksjs/stacks#${B.ref}`);if(!J.force){let z=await qq(N);if(z.length>0){console.warn(`
3
+ \u26A0 The following framework-managed paths have uncommitted changes:`);for(let q of z)console.warn(` - ${q}`);console.warn(`
4
+ Aborting to avoid clobbering your edits.`),console.warn(` Re-run with --force to overwrite, or commit / stash the changes first.
5
+ `),$.exit(D.FatalError)}}var H=Z.frameworkPath("core/actions/src/upgrade/framework.ts"),F=await l(H),_={added:0,changed:0,removed:0,unchanged:0},A=[];try{for(let z of G){let q=U(N,z.localPath),K=z.isFile?await b(q):await E(q,z.skip);if(M&&V)await zq(V,z,q);else{if(z.isFile)continue;await Kq(B.ref,z,q,!!J.force)}let Q=z.isFile?await b(q):await E(q,z.skip),W=h(K,Q);_.added+=W.added,_.changed+=W.changed,_.removed+=W.removed,_.unchanged+=W.unchanged,A.push({managed:z,summary:W})}if(!M)await Qq(B.ref)}catch(z){console.error("\u2718 Failed to upgrade Stacks framework:",z?.message||z),$.exit(D.FatalError)}var r=C(d),R=await l(H),a=$.argv.includes("--__restarted");if(F!==0n&&R!==0n&&F!==R&&!a){console.log(`Upgrade pulled a newer version of the upgrade action \u2014 re-running once to pick up new sync paths and hooks.
6
+ `);let z=$.argv.slice(2).filter((Q)=>Q!=="--__restarted"),K=await Bun.spawn({cmd:[$.argv[0]||"bun",H,...z,"--__restarted"],cwd:N,stdout:"inherit",stderr:"inherit"}).exited;$.exit(K??0)}if(!B.targetVersion)x(p,B.channel);console.log(`\u2714 ${T(B,o,r,L,!!J.force)}`);console.log("Sync summary:");for(let{managed:z,summary:q}of A)if(z.isFile){let K=q.added+q.changed>0;console.log(` ${z.label.padEnd(10)} ${K?"updated":"unchanged"}`)}else if(q.added+q.changed+q.removed===0)console.log(` ${z.label.padEnd(10)} unchanged (${q.unchanged} files)`);else console.log(` ${z.label.padEnd(10)} +${q.added} ~${q.changed} -${q.removed} (${q.unchanged} unchanged)`);var e=!J.noPostinstall&&J.postinstall!==!1;if(e)await Wq({aggregate:_,perPath:A,projectRoot:N});if(B.channel==="canary"&&!B.targetVersion)console.warn("\u26A0 Canary builds may contain bugs or breaking changes. Not recommended for production.");$.exit(D.Success);async function qq(z){let q=U(z,".git");if(!Y(q))return[];try{let K=Bun.spawn({cmd:["git","-C",z,"status","--porcelain","--",...G.map((W)=>W.localPath)],stdout:"pipe",stderr:"pipe"}),Q=await new Response(K.stdout).text();return await K.exited,Q.split(`
7
+ `).filter((W)=>W.length>0).map((W)=>W.slice(3))}catch{return[]}}async function l(z){try{if(!Y(z))return 0n;let q=await Bun.file(z).arrayBuffer();return Bun.hash(q)}catch{return 0n}}async function b(z){let q=new Map;if(!Y(z))return q;try{let K=Bun.file(z);if(K.size>0){let Q=await K.arrayBuffer();q.set("self",{size:K.size,hash:Bun.hash(Q)})}}catch{}return q}async function zq(z,q,K){let Q=U(z,q.subPath);if(!Y(Q)){console.warn(` skip ${q.label}: source missing at ${Q}`);return}if(q.isFile){w(n(K),{recursive:!0}),u(Q,K);return}w(K,{recursive:!0}),g(Q,K,{recursive:!0,force:!0,filter:(W)=>{if(!q.skip)return!0;let v=W.split("/").pop()||"";return!q.skip.includes(v)}})}async function Kq(z,q,K,Q){let W=f(z,q.subPath);await y(W,{dir:K,force:!0,forceClean:!1,preferOffline:!Q})}async function Qq(z){let q=Z.projectPath(".tmp-upgrade");try{await y(`github:stacksjs/stacks#${z}`,{dir:q,force:!0,forceClean:!0,preferOffline:!0,silent:!0});for(let K of G){if(!K.isFile)continue;let Q=U(q,K.subPath),W=Z.projectPath(K.localPath);try{if(Y(Q)&&Y(W))u(Q,W)}catch{}}}catch{}finally{if(Y(q))c(q,{recursive:!0,force:!0})}}async function Wq(z){let{aggregate:q,perPath:K,projectRoot:Q}=z;if(q.added+q.changed+q.removed===0){console.log("Nothing changed \u2014 skipping post-sync hooks.");return}console.log("Regenerating auto-import manifest...");try{let{generateAutoImportFiles:X}=await import("@stacksjs/server");await X()}catch(X){console.warn(` auto-imports failed (non-fatal): ${X?.message||X}`)}if(K.some((X)=>{let{managed:I,summary:O}=X;if(I.isFile)return!1;if(I.label!=="core"&&I.label!=="defaults")return!1;if(O.added+O.changed===0)return!1;return Xq(U(Q,I.localPath))})){console.log("Running `bun install` to refresh dependencies...");try{let I=await Bun.spawn({cmd:[$.argv[0]||"bun","install"],cwd:Q,stdout:"inherit",stderr:"inherit"}).exited;if(I!==0)console.warn(` bun install exited with code ${I} (non-fatal)`)}catch(X){console.warn(` bun install failed (non-fatal): ${X?.message||X}`)}}let v=U(Q,"database","migrations");if(Y(v)){console.log("Running pending migrations...");try{let X=Z.frameworkPath("core/buddy/src/cli.ts"),O=await Bun.spawn({cmd:[$.argv[0]||"bun",X,"migrate"],cwd:Q,stdout:"inherit",stderr:"inherit"}).exited;if(O!==0)console.warn(` migrate exited with code ${O} (non-fatal \u2014 DB may not be set up yet)`)}catch(X){console.warn(` migrate failed (non-fatal): ${X?.message||X}`)}}}function Xq(z){try{if(!Y(z))return!1;return i(U(z,"package.json"),"utf-8").length>0}catch{return Y(z)}}
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"../../chunk-s735m9mg.js";import{Ya as r}from"../../chunk-n1y0gpv6.js";import"../../chunk-96b7fcmd.js";import e from"process";import{parseArgs as o}from"@stacksjs/cli";import{Action as i}from"@stacksjs/enums";import{ExitCode as t}from"@stacksjs/types";var a=o();if(a?.framework||a?.all)await r(i.UpgradeFramework,a);if(a?.dependencies||a?.all)await r(i.UpgradeDeps,a);if(a?.bun||a?.all)await r(i.UpgradeBun,a);if(a?.shell||a?.all)await r(i.UpgradeShell,a);if(a?.binary||a?.all)await r(i.UpgradeBinary,a);e.exit(t.Success);
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ var{$:K}=globalThis.Bun;import N from"process";import{italic as U,runCommand as I}from"@stacksjs/cli";import{log as q}from"@stacksjs/logging";import{path as A}from"@stacksjs/path";import{writeFile as V}from"@stacksjs/storage";import{ExitCode as W}from"@stacksjs/types";var O=(await K`echo $HOME`.text()).trim(),H=A.join(O,".zshrc"),J=A.shellPath("src/buddy.plugin.zsh"),D=A.join(O,".oh-my-zsh/custom/plugins/buddy/");q.info(`Setting up Oh My Zsh via ${H}...`);K.cwd(A.dirname(H));var G=await K`cat ${A.basename(H)}`.text(),Q=/^(?!#).*plugins=\(([^)]+)\)/m,M=G.match(Q);if(M){let B=M[1]?.split(/\s+/).filter(Boolean);if(!B)q.error("Maybe the plugins line in your .zshrc file could not be found? If this continues being an issue, please reach out to us on Discord."),N.exit(W.FatalError);if(!B.includes("buddy")){B.push("buddy");let S=`plugins=(
3
+ ${B.map((T)=>T.trim()).join(`
4
+ `)}
5
+ )`;G=G.replace(Q,S),await V(H,G),q.info(`Copying buddy zsh plugin ${J} to ${D}...`),await I(`mkdir -p ${D}`),await I(`cp -rf ${J} ${D}`),q.success("Copied buddy zsh plugin")}else q.info("Buddy is already set up"),q.info("Ensuring `buddy` is updated..."),await I(`cp -rf ${J} ${D}`),q.success("Updated buddy zsh plugin to latest version")}q.success("Oh My Zsh Setup Complete");q.info(U("To see changes reflect, you may need to open a new terminal window"));if(N.env.TERM_PROGRAM==="vscode")q.info("\u2318\u21E7P terminal.create.new.terminal");
@@ -0,0 +1,7 @@
1
+ import type { UpgradeOptions } from '@stacksjs/types';
2
+ // import { determineDebugLevel } from '@stacksjs/utils'
3
+ // export async function checkForUncommittedChanges(path = './stacks', options: UpgradeOptions) {
4
+ export declare function checkForUncommittedChanges(options: UpgradeOptions): void;
5
+ export declare function downloadFrameworkUpdate(options: UpgradeOptions): Promise<void>;
6
+ // export async function updateDependencies(options: UpgradeOptions) {
7
+ export declare function updateDependencies(): Promise<void>;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"../chunk-96b7fcmd.js";import r from"process";import{intro as b,outro as e,runCommand as d}from"@stacksjs/cli";import{NpmScript as j}from"@stacksjs/enums";import{log as k}from"@stacksjs/logging";import{projectPath as u}from"@stacksjs/path";import*as c from"@stacksjs/storage";import{ExitCode as n}from"@stacksjs/types";var i="0.70.26";function v(s){try{console.log("checkForUncommittedChanges",s)}catch(t){console.error(t)}}async function f(s){let a=u("updates");if(c.doesFolderExist(a))await c.deleteFolder(a);k.info("Downloading framework updates..."),await d("giget stacks updates",s),k.success(`Your framework updated correctly to version: v${i}`)}async function B(){let s=await b("buddy upgrade:dependencies"),t=await d(j.UpgradeDependencies,{cwd:u()});if(t.isErr)await e("While running the upgrade:dependencies command, there was an issue",{startTime:s,useSeconds:!0},t.error),r.exit(n.FatalError);await e("Freshly updated your dependencies.",{startTime:s,useSeconds:!0}),r.exit(n.Success)}export{B as updateDependencies,f as downloadFrameworkUpdate,v as checkForUncommittedChanges};
package/package.json CHANGED
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "name": "@stacksjs/actions",
3
3
  "type": "module",
4
- "version": "0.70.23",
4
+ "version": "0.70.26",
5
5
  "description": "The Stacks actions.",
6
6
  "author": "Chris Breuer",
7
- "contributors": ["Chris Breuer <chris@stacksjs.org>"],
7
+ "contributors": [
8
+ "Chris Breuer <chris@stacksjs.com>"
9
+ ],
8
10
  "license": "MIT",
9
11
  "funding": "https://github.com/sponsors/chrisbbreuer",
10
12
  "homepage": "https://github.com/stacksjs/stacks/tree/main/storage/framework/core/actions#readme",
@@ -22,43 +24,57 @@
22
24
  "framework",
23
25
  "typescript",
24
26
  "javascript",
25
- "bun",
26
- "vite"
27
+ "bun"
27
28
  ],
28
29
  "exports": {
29
30
  ".": {
31
+ "types": "./dist/index.d.ts",
32
+ "bun": "./src/index.ts",
30
33
  "import": "./dist/index.js"
31
34
  },
35
+ "./run-action": {
36
+ "types": "./dist/run-action.d.ts",
37
+ "bun": "./src/run-action.ts",
38
+ "import": "./dist/run-action.js"
39
+ },
32
40
  "./*": {
41
+ "bun": "./src/*",
33
42
  "import": "./dist/*"
34
43
  }
35
44
  },
36
45
  "module": "dist/index.js",
37
46
  "types": "dist/index.d.ts",
38
- "files": ["README.md", "dist"],
47
+ "files": [
48
+ "README.md",
49
+ "dist"
50
+ ],
39
51
  "scripts": {
40
52
  "build": "bun build.ts",
41
53
  "typecheck": "bun tsc --noEmit",
42
54
  "prepublishOnly": "bun run build"
43
55
  },
56
+ "dependencies": {
57
+ "@stacksjs/bunpress": "^0.1.5",
58
+ "@stacksjs/ts-cloud": "^0.2.15",
59
+ "@stacksjs/ts-md": "^0.1.1"
60
+ },
44
61
  "devDependencies": {
45
- "@stacksjs/api": "0.70.22",
46
- "@stacksjs/cli": "0.70.22",
47
- "@stacksjs/config": "0.70.22",
48
- "@stacksjs/database": "0.70.22",
49
- "@stacksjs/development": "0.70.22",
50
- "@stacksjs/dns": "0.70.22",
51
- "@stacksjs/enums": "0.70.22",
52
- "@stacksjs/env": "0.70.22",
53
- "@stacksjs/error-handling": "0.70.22",
54
- "@stacksjs/logging": "0.70.22",
55
- "@stacksjs/path": "0.70.22",
56
- "@stacksjs/security": "0.70.22",
57
- "@stacksjs/storage": "0.70.22",
58
- "@stacksjs/strings": "0.70.22",
59
- "@stacksjs/utils": "0.70.22",
60
- "@stacksjs/validation": "0.70.22",
61
- "markdown-it": "^14.1.0",
62
- "vue-component-meta": "^2.2.8"
62
+ "@stacksjs/api": "0.70.23",
63
+ "@stacksjs/cli": "0.70.23",
64
+ "@stacksjs/config": "0.70.23",
65
+ "@stacksjs/database": "0.70.23",
66
+ "@stacksjs/tlsx": "^0.13.2",
67
+ "better-dx": "^0.2.12",
68
+ "@stacksjs/dns": "0.70.23",
69
+ "@stacksjs/enums": "0.70.23",
70
+ "@stacksjs/env": "0.70.23",
71
+ "@stacksjs/error-handling": "0.70.23",
72
+ "@stacksjs/logging": "0.70.23",
73
+ "@stacksjs/path": "0.70.23",
74
+ "@stacksjs/security": "0.70.23",
75
+ "@stacksjs/storage": "0.70.23",
76
+ "@stacksjs/strings": "0.70.23",
77
+ "@stacksjs/utils": "0.70.23",
78
+ "@stacksjs/validation": "0.70.23"
63
79
  }
64
80
  }
@@ -1,9 +0,0 @@
1
- declare const domain: unknown;
2
- declare const validActions: unknown;
3
- export declare type ActionPath = ${files
4
- .filter(file => file.endsWith('.ts'))
5
- .map(value => `'${domain}/${value.replace('.ts', '')}'`)
6
- .join(' | ')}
7
- `
8
-
9
- await storage.writeFile(p.frameworkPath('types/actions.d.ts'), validActions)
package/dist/action.d.ts DELETED
@@ -1,64 +0,0 @@
1
- import type { JobOptions } from '@stacksjs/types';
2
-
3
- declare interface ActionValidations {
4
- [key: string]: {
5
- rule: ReturnType<typeof schema.string>
6
- message?: string | Record<string, string>
7
- }
8
- }
9
- declare type Request = any
10
- interface ActionOptions {
11
- name?: string
12
- description?: string
13
- apiResponse?: boolean
14
- validations?: ActionValidations
15
- method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'
16
- rate?: JobOptions['rate']
17
- tries?: JobOptions['tries']
18
- backoff?: JobOptions['backoff']
19
- enabled?: JobOptions['enabled']
20
- path?: string
21
- requestFile?: string
22
- handle: (options?: Request) => Promise<any> | string | number | boolean
23
- }
24
-
25
- export class Action {
26
- name?: string
27
- description?: string
28
- rate?: ActionOptions['rate']
29
- tries?: ActionOptions['tries']
30
- backoff?: ActionOptions['backoff']
31
- enabled?: ActionOptions['enabled']
32
- path?: ActionOptions['path']
33
- method?: ActionOptions['method']
34
- validations?: ActionOptions['validations']
35
- requestFile?: string
36
- handle: ActionOptions['handle']
37
-
38
- constructor({
39
- name,
40
- description,
41
- validations,
42
- handle,
43
- rate,
44
- tries,
45
- backoff,
46
- enabled,
47
- path,
48
- method,
49
- requestFile,
50
- }: ActionOptions) {
51
-
52
- this.name = name
53
- this.description = description
54
- this.validations = validations
55
- this.rate = rate
56
- this.tries = tries
57
- this.backoff = backoff
58
- this.enabled = enabled
59
- this.path = path
60
- this.method = method
61
- this.handle = handle
62
- this.requestFile = requestFile
63
- }
64
- }
package/dist/actions.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './helpers/utils'
2
- export * as actions from './helpers/utils'
package/dist/add.d.ts DELETED
@@ -1,5 +0,0 @@
1
- declare const options: unknown;
2
- declare const result: unknown;
3
- declare const nameServers: unknown;
4
- declare const registrar: string;
5
- declare const emojis: Array<'1️⃣' | '2️⃣' | '3️⃣' | ((...args: any[]) => unknown)>;
package/dist/add.js DELETED
@@ -1,33 +0,0 @@
1
- // @bun
2
- import"./chunk-9v6qtbez.js";
3
-
4
- // src/add.ts
5
- import { installPackage } from "@stacksjs/cli";
6
- async function invoke(options) {
7
- if (options?.table)
8
- await addTable();
9
- if (options?.calendar)
10
- await addCalendar();
11
- }
12
- async function add(options) {
13
- return await invoke(options);
14
- }
15
- async function addTable() {
16
- await installPackage("@stacksjs/table");
17
- }
18
- async function addCalendar() {
19
- await installPackage("@stacksjs/calendar");
20
- }
21
- async function installPackages(names) {
22
- for (const name of names)
23
- await installPackage(name);
24
- }
25
- export {
26
- invoke,
27
- installPackages,
28
- addTable,
29
- addCalendar,
30
- add
31
- };
32
-
33
- export { add };
package/dist/api.d.ts DELETED
@@ -1 +0,0 @@
1
- declare const options: unknown;
package/dist/binary.d.ts DELETED
@@ -1,2 +0,0 @@
1
- declare const source: unknown;
2
- declare const result: unknown;
@@ -1,9 +0,0 @@
1
- // @bun
2
- // src/build/component-libs.ts
3
- import { runCommand } from "@stacksjs/cli";
4
- import { NpmScript } from "@stacksjs/enums";
5
- import { frameworkPath } from "@stacksjs/path";
6
- await runCommand(NpmScript.BuildComponents, {
7
- cwd: frameworkPath(),
8
- verbose: true
9
- });
@@ -1,23 +0,0 @@
1
- // @bun
2
- import"../chunk-wkwtsvym.js";
3
- import"../chunk-9v6qtbez.js";
4
-
5
- // src/build/core.ts
6
- var {$ } = globalThis.Bun;
7
- import process from "node:process";
8
- import { dim, italic, log } from "@stacksjs/cli";
9
- import { corePath } from "@stacksjs/path";
10
- import { glob } from "@stacksjs/storage";
11
- log.info("Building core packages");
12
- var dirs = (await glob([corePath("*")], { onlyDirectories: true })).sort();
13
- if (dirs.length === 0) {
14
- log.info("No core packages found");
15
- process.exit(1 /* FatalError */);
16
- }
17
- for (const folder of dirs) {
18
- log.info(`\uD83C\uDFD7\uFE0F Building ${italic(dim(folder))}`);
19
- $.cwd(folder);
20
- await $`bun run build`;
21
- log.success(`${italic(dim(folder))} built`);
22
- console.log(``);
23
- }
@@ -1,8 +0,0 @@
1
- // @bun
2
- // src/build/stacks.ts
3
- import { runCommands } from "@stacksjs/cli";
4
- import { frameworkPath } from "@stacksjs/path";
5
- await runCommands([
6
- "bun build:cli",
7
- "bun build:core"
8
- ], { verbose: true, cwd: frameworkPath() });
package/dist/build.js DELETED
@@ -1,108 +0,0 @@
1
- // @bun
2
- import {
3
- generateTypes
4
- } from "./generate/index.js";
5
- import"./chunk-xgsmf4cy.js";
6
- import"./helpers/vscode-custom-data.js";
7
- import"./chunk-494jp8d5.js";
8
- import"./chunk-hvfeg6n6.js";
9
- import"./chunk-mdj7x1vs.js";
10
- import"./chunk-p0c688mg.js";
11
- import"./chunk-qkm8e752.js";
12
- import"./chunk-a13x0e43.js";
13
- import"./chunk-mdqphqep.js";
14
- import"./chunk-qhh0v93n.js";
15
- import"./chunk-ccnf3w1b.js";
16
- import"./chunk-7s5qcjkt.js";
17
- import"./chunk-bf8bq8pc.js";
18
- import"./chunk-b5g5w1hh.js";
19
- import"./chunk-zzerxbrm.js";
20
- import"./chunk-veja9rez.js";
21
- import"./chunk-a7k3cdby.js";
22
- import"./chunk-frw3va9v.js";
23
- import"./chunk-saqpg5nd.js";
24
- import"./chunk-2dvnt46s.js";
25
- import"./chunk-w6fdq4hk.js";
26
- import"./chunk-wkwtsvym.js";
27
- import"./chunk-ze46550n.js";
28
- import"./helpers/utils.js";
29
- import"./chunk-9v6qtbez.js";
30
-
31
- // src/build.ts
32
- import { NpmScript } from "@stacksjs/enums";
33
- import { log } from "@stacksjs/logging";
34
- import { hasComponents, hasFunctions } from "@stacksjs/storage";
35
- import { runNpmScript } from "@stacksjs/utils";
36
- async function invoke(options) {
37
- if (options.components)
38
- await componentLibraries(options);
39
- else if (options.vueComponents)
40
- await vueComponentLibrary(options);
41
- else if (options.webComponents || options.elements)
42
- await webComponentLibrary(options);
43
- else if (options.functions)
44
- await functionsLibrary(options);
45
- else if (options.docs)
46
- await docs(options);
47
- else if (options.stacks)
48
- await stacks(options);
49
- await generateTypes();
50
- }
51
- async function build(options) {
52
- return await invoke(options);
53
- }
54
- async function componentLibraries(options) {
55
- await runNpmScript(NpmScript.GenerateEntries, options);
56
- await vueComponentLibrary(options);
57
- await webComponentLibrary(options);
58
- }
59
- async function vueComponentLibrary(options) {
60
- if (hasComponents()) {
61
- log.info("Building your component library...");
62
- await runNpmScript(NpmScript.BuildComponents, options);
63
- log.success("Your component library was built successfully");
64
- } else {
65
- log.warn("No components found.");
66
- log.info("Before you can build components,");
67
- log.info("you need to have created some in the ./components folder.");
68
- }
69
- }
70
- async function webComponentLibrary(options) {
71
- log.info("Building your component library for production use & npm/CDN distribution...");
72
- if (hasComponents()) {
73
- await runNpmScript(NpmScript.BuildWebComponents, options);
74
- log.success("Your Web Component library was built successfully");
75
- } else {
76
- log.info("No components found.");
77
- }
78
- }
79
- async function docs(options) {
80
- log.info("Building the documentation site...");
81
- await runNpmScript(NpmScript.BuildDocs, options);
82
- log.success("Docs built successfully");
83
- }
84
- async function stacks(options) {
85
- log.info("Building the Stacks Framework...");
86
- await runNpmScript(NpmScript.BuildStacks, options);
87
- log.success("Stacks built successfully");
88
- }
89
- async function functionsLibrary(options) {
90
- if (hasFunctions()) {
91
- log.info("Building your functions library for production usages...");
92
- log.info("Production usages include: manual npm distribution and/or CDN distribution");
93
- await runNpmScript(NpmScript.BuildFunctions, options);
94
- log.success("Functions library built successfully");
95
- } else {
96
- log.info("No functions found");
97
- }
98
- }
99
- export {
100
- webComponentLibrary,
101
- vueComponentLibrary,
102
- stacks,
103
- invoke,
104
- functionsLibrary,
105
- docs,
106
- componentLibraries,
107
- build
108
- };
package/dist/bump.d.ts DELETED
@@ -1,2 +0,0 @@
1
- declare const options: unknown;
2
- declare const bumpCommand: unknown;
package/dist/bump.js DELETED
@@ -1,17 +0,0 @@
1
- // @bun
2
- // src/bump.ts
3
- import { log, parseOptions, runCommand } from "@stacksjs/cli";
4
- import { path as p } from "@stacksjs/path";
5
- var options = parseOptions();
6
- var changelogCommand = options?.dryRun ? "buddy changelog --quiet --dry-run" : "buddy changelog --quiet";
7
- var bumpCommand = options?.dryRun ? `bunx --bun bumpp ./package.json ./**/package.json ../package.json ../defaults/ide/vscode/package.json ../views/** ../cloud/package.json ../server/package.json ../orm/package.json ../docs/package.json ../api/package.json ../email/package.json ../libs/**/package.json ../system-tray/package.json --no-push` : `bunx --bun bumpp ./package.json ./**/package.json ../package.json ../defaults/ide/vscode/package.json ../views/** ../cloud/package.json ../server/package.json ../orm/package.json ../docs/package.json ../api/package.json ../email/package.json ../libs/**/package.json ../system-tray/package.json --all`;
8
- log.debug(`Running: ${bumpCommand}`);
9
- log.debug(`In frameworkPath: ${p.frameworkPath()}`);
10
- await runCommand(bumpCommand, {
11
- cwd: p.frameworkPath("core"),
12
- stdin: "inherit"
13
- });
14
- await runCommand(changelogCommand, {
15
- cwd: p.projectPath(),
16
- stdin: "inherit"
17
- });
@@ -1,2 +0,0 @@
1
- declare const fromRevision: unknown;
2
- declare const command: unknown;
package/dist/changelog.js DELETED
@@ -1,17 +0,0 @@
1
- // @bun
2
- // src/changelog.ts
3
- import { execSync, log, parseOptions, runCommand } from "@stacksjs/cli";
4
- import { projectPath } from "@stacksjs/path";
5
- log.debug("Generating changelog");
6
- var fromRevision = await execSync("git describe --abbrev=0 --tags HEAD^");
7
- log.debug("FromRevision", fromRevision);
8
- var toRevision = await execSync("git describe");
9
- log.debug("ToRevision", toRevision);
10
- var options = parseOptions();
11
- log.debug("Changelog Options", options);
12
- var command = options?.dryRun ? `bunx --bun changelogen --no-output --from ${fromRevision} --to ${toRevision}` : `bunx --bun changelogen --output CHANGELOG.md --from ${fromRevision} --to ${toRevision}`;
13
- await runCommand(command, {
14
- cwd: projectPath(),
15
- quiet: options?.quiet,
16
- verbose: options?.verbose
17
- });