@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
package/dist/make.js DELETED
@@ -1,349 +0,0 @@
1
- // @bun
2
- import"./chunk-ze46550n.js";
3
- import {
4
- runAction
5
- } from "./helpers/utils.js";
6
- import"./chunk-9v6qtbez.js";
7
-
8
- // src/make.ts
9
- import process from "node:process";
10
- import { italic, runCommand } from "@stacksjs/cli";
11
- import { localUrl } from "@stacksjs/config";
12
- import { Action } from "@stacksjs/enums";
13
- import { handleError } from "@stacksjs/error-handling";
14
- import { log } from "@stacksjs/logging";
15
- import { frameworkPath, path as p, resolve } from "@stacksjs/path";
16
- import { createFolder, doesFolderExist, writeTextFile } from "@stacksjs/storage";
17
- async function invoke(options) {
18
- if (options.component)
19
- await makeComponent(options);
20
- if (options.database)
21
- makeDatabase(options);
22
- if (options.function)
23
- await makeFunction(options);
24
- if (options.language)
25
- await makeLanguage(options);
26
- if (options.notification)
27
- await makeNotification(options);
28
- if (options.page)
29
- await makePage(options);
30
- if (options.stack)
31
- makeStack(options);
32
- }
33
- async function make(options) {
34
- return await invoke(options);
35
- }
36
- async function makeAction(options) {
37
- try {
38
- const name = options.name;
39
- log.info("Creating your action...");
40
- await createAction(options);
41
- log.success(`Created ${italic(name)} action`);
42
- } catch (error) {
43
- log.error("There was an error creating your action", error);
44
- process.exit();
45
- }
46
- }
47
- async function makeComponent(options) {
48
- try {
49
- const name = options.name;
50
- log.info("Creating your component...");
51
- await createComponent(options);
52
- log.success(`Created ${italic(name)} component`);
53
- } catch (error) {
54
- log.error("There was an error creating your component", error);
55
- process.exit();
56
- }
57
- }
58
- async function createAction(options) {
59
- const name = options.name;
60
- await writeTextFile({
61
- path: p.userActionsPath(name),
62
- data: `import { Action } from '@stacksjs/actions'
63
-
64
- export default new Action({
65
- name: '${name}',
66
- description: '${name} action',
67
-
68
- handle() {
69
- return 'Hello World action'
70
- },
71
- })
72
- `
73
- });
74
- }
75
- async function createComponent(options) {
76
- const name = options.name;
77
- await writeTextFile({
78
- path: p.userComponentsPath(`${name}.vue`),
79
- data: `<script setup lang="ts">
80
- console.log('Hello World component created')
81
- </script>
82
-
83
- <template>
84
- <div>
85
- Some HTML block
86
- </div>
87
- </template>
88
- `
89
- });
90
- }
91
- function makeDatabase(options) {
92
- try {
93
- const name = options.name;
94
- log.info(`Creating your ${italic(name)} database...`);
95
- createDatabase(options);
96
- log.success(`Created ${italic(name)} database`);
97
- } catch (error) {
98
- log.error("There was an error creating your database", error);
99
- process.exit();
100
- }
101
- }
102
- function createDatabase(options) {
103
- console.log("createDatabase options", options);
104
- }
105
- function factory(options) {
106
- try {
107
- const name = options.name;
108
- log.info(`Creating your ${italic(name)} factory...`);
109
- createDatabase(options);
110
- log.success(`Created ${italic(name)} factory`);
111
- } catch (error) {
112
- log.error("There was an error creating your factory", error);
113
- process.exit();
114
- }
115
- }
116
- function createFactory(options) {
117
- console.log("options", options);
118
- }
119
- async function makeNotification(options) {
120
- try {
121
- const name = options.name;
122
- log.info(`Creating your ${italic(name)} notification...`);
123
- await createNotification(options);
124
- log.success(`Created ${italic(name)} notification`);
125
- } catch (error) {
126
- log.error("There was an error creating your notification", error);
127
- process.exit();
128
- }
129
- }
130
- async function makePage(options) {
131
- try {
132
- const name = options.name;
133
- log.info("Creating your page...");
134
- await createPage(options);
135
- log.success(`Created ${name} page`);
136
- } catch (error) {
137
- log.error("There was an error creating your page", error);
138
- process.exit();
139
- }
140
- }
141
- async function createPage(options) {
142
- const name = options.name;
143
- await writeTextFile({
144
- path: p.userViewsPath(`${name}.vue`),
145
- data: `<script setup lang="ts">
146
- console.log('Hello World page created')
147
- </script>
148
-
149
- <template>
150
- <div>
151
- Visit http://127.0.0.1/${name}
152
- </div>
153
- </template>
154
- `
155
- });
156
- }
157
- async function makeFunction(options) {
158
- try {
159
- const name = options.name;
160
- log.info("Creating your function...");
161
- await createFunction(options);
162
- log.success(`Created ${name} function`);
163
- } catch (error) {
164
- log.error("There was an error creating your function", error);
165
- process.exit();
166
- }
167
- }
168
- async function createFunction(options) {
169
- const name = options.name;
170
- await writeTextFile({
171
- path: p.userFunctionsPath(`${name}.ts`),
172
- data: `// reactive state
173
- const ${name} = ref(0)
174
-
175
- // functions that mutate state and trigger updates
176
- function increment() {
177
- ${name}.value++
178
- }
179
-
180
- export {
181
- ${name},
182
- increment,
183
- }
184
- `
185
- });
186
- }
187
- async function makeLanguage(options) {
188
- try {
189
- const name = options.name;
190
- log.info("Creating your translation file...");
191
- await createLanguage(options);
192
- log.success(`Created ${name} translation file`);
193
- } catch (error) {
194
- log.error("There was an error creating your language.", error);
195
- process.exit();
196
- }
197
- }
198
- async function createLanguage(options) {
199
- const name = options.name;
200
- await writeTextFile({
201
- path: p.resourcesPath(`lang/${name}.yml`),
202
- data: `button:
203
- text: Copy
204
- `
205
- });
206
- }
207
- function makeStack(options) {
208
- try {
209
- const name = options.name;
210
- log.info(`Creating your ${name} stack...`);
211
- const path = resolve(process.cwd(), name);
212
- log.success("Successfully scaffolded your project");
213
- log.info(`cd ${path} && bun install`);
214
- } catch (error) {
215
- log.error("There was an error creating your stack", error);
216
- process.exit();
217
- }
218
- }
219
- async function createNotification(options) {
220
- const name = options.name;
221
- try {
222
- let importOption = "EmailOptions";
223
- if (!doesFolderExist("notifications"))
224
- await createFolder("./notifications");
225
- if (options.chat)
226
- importOption = "ChatOptions";
227
- if (options.sms)
228
- importOption = "SMSOptions";
229
- await writeTextFile({
230
- path: p.userNotificationsPath(`${name}.ts`),
231
- data: `import type { ${importOption} } from '@stacksjs/types'
232
-
233
- function content(): string {
234
- return 'example'
235
- }
236
-
237
- function send(): ${importOption} {
238
- return {
239
- content: content(),
240
- }
241
- }`
242
- });
243
- return true;
244
- } catch (error) {
245
- handleError("Error creating notification", error);
246
- return false;
247
- }
248
- }
249
- async function createMigration(options) {
250
- const optionName = options.name;
251
- const table = "dummy-name";
252
- if (!optionName[0])
253
- throw new Error("options.name is required and cannot be empty");
254
- const name = optionName[0].toUpperCase() + optionName.slice(1);
255
- const path = frameworkPath(`database/migrations/${name}.ts`);
256
- try {
257
- await writeTextFile({
258
- path: `${path}`,
259
- data: `import { Kysely } from 'kysely'
260
-
261
- export async function up(db: Kysely<any>): Promise<void> {
262
- await db.schema
263
- .createTable('${table}')
264
- .addColumn('id', 'integer', col => col.autoIncrement().primaryKey())
265
- .execute()
266
- }`
267
- });
268
- log.success(`Successfully created your migration file at stacks/database/migrations/${name}.ts`);
269
- } catch (error) {
270
- log.error(error);
271
- }
272
- }
273
- async function makeQueueTable() {
274
- await runAction(Action.QueueTable);
275
- }
276
- async function makeCertificate() {
277
- const domain = await localUrl();
278
- log.info(`Creating SSL certificate...`);
279
- await runCommand(`tlsx ${domain}`, {
280
- cwd: p.storagePath("keys")
281
- });
282
- log.success("Certificate created");
283
- log.info(`Installing SSL certificate...`);
284
- await runCommand(`tlsx -install`, {
285
- cwd: p.storagePath("keys")
286
- });
287
- log.success("Certificate installed");
288
- }
289
- async function createModel(options) {
290
- const optionName = options.name;
291
- if (!optionName[0])
292
- throw new Error("options.name is required and cannot be empty");
293
- const name = optionName[0].toUpperCase() + optionName.slice(1);
294
- const path = p.userModelsPath(`${name}.ts`);
295
- try {
296
- await writeTextFile({
297
- path: `${path}`,
298
- data: `import { faker } from '@stacksjs/faker'
299
- import { schema } from '@stacksjs/validation'
300
- import type { Model } from '@stacksjs/types'
301
-
302
- export default {
303
- name: '${name}',
304
-
305
- traits: {
306
- useTimestamps: true,
307
-
308
- useSeeder: {
309
- count: 10,
310
- },
311
- },
312
-
313
- attributes: {
314
- // your attributes here
315
- },
316
- } satisfies Model`
317
- });
318
- log.success(`Model created: ${italic(`app/Models/${name}.ts`)}`);
319
- } catch (error) {
320
- log.error(error);
321
- }
322
- }
323
- export {
324
- makeStack,
325
- makeQueueTable,
326
- makePage,
327
- makeNotification,
328
- makeLanguage,
329
- makeFunction,
330
- makeDatabase,
331
- makeComponent,
332
- makeCertificate,
333
- makeAction,
334
- make,
335
- invoke,
336
- factory,
337
- createPage,
338
- createNotification,
339
- createModel,
340
- createMigration,
341
- createLanguage,
342
- createFunction,
343
- createFactory,
344
- createDatabase,
345
- createComponent,
346
- createAction
347
- };
348
-
349
- export { make, makeAction, makeComponent, createComponent, makeDatabase, createDatabase, createFactory, makeNotification, makePage, createPage, makeFunction, createFunction, makeLanguage, createLanguage, makeStack, createNotification, createMigration, makeQueueTable, makeCertificate, createModel };
@@ -1,92 +0,0 @@
1
- declare type PackageJsonType = 'vue-components' | 'web-components' | 'functions'
2
-
3
- export async function generatePackageJson(type: PackageJsonType): Promise<void> {
4
- let name
5
- let description
6
- let directory
7
- let keywords
8
- let config
9
- let prettyName
10
-
11
- if (type === 'vue-components') {
12
- name = library.vueComponents?.name
13
- description = library.vueComponents?.description
14
- directory = 'components'
15
- keywords = library.vueComponents?.keywords
16
- config = 'vue-components'
17
- }
18
- else if (type === 'web-components') {
19
- name = library.webComponents?.name
20
- description = library.webComponents?.description
21
- directory = 'components'
22
- keywords = library.webComponents?.keywords
23
- config = 'web-components'
24
- }
25
- else if (type === 'functions') {
26
- name = library.functions?.name
27
- description = library.functions?.description
28
- directory = 'functions'
29
- keywords = library.functions?.keywords
30
- config = 'functions'
31
- }
32
-
33
- try {
34
- await writeTextFile({
35
- path: packageJsonPath(type),
36
- data: `{
37
- "name": "${name}",
38
- "type": "module",
39
- "version": "",
40
- "packageManager": "bun",
41
- "description": "${description}",
42
- "author": "${library.author}",
43
- "license": "MIT",
44
- "homepage": "https:
45
- "repository": {
46
- "type": "git",
47
- "url": "git+https:
48
- "directory": "${directory}"
49
- },
50
- "bugs": {
51
- "url": "https:
52
- },
53
- "keywords": ${JSON.stringify(keywords)},
54
- "contributors": ${JSON.stringify(library.contributors)},
55
- "exports": {
56
- ".": {
57
- "types": "./dist/index.d.ts",
58
- "require": "./dist/index.cjs",
59
- "import": "./dist/index.js"
60
- }
61
- },
62
- "main": "dist/index.cjs",
63
- "module": "dist/index.js",
64
- "types": "dist/index.d.ts",
65
- "files": [
66
- "dist",
67
- "README.md"
68
- ],
69
- "scripts": {
70
- "build": "vite build -c ../build/${config}.ts",
71
- "prepublishOnly": "bun run build"
72
- },
73
- "devDependencies": {
74
- "stacks": "workspace:*"
75
- }
76
- }
77
- `,
78
- })
79
-
80
- if (type === 'vue-components')
81
- prettyName = 'Vue Component library'
82
- else if (type === 'web-components')
83
- prettyName = 'Web Component library'
84
- else if (type === 'functions')
85
- prettyName = 'Function Library'
86
-
87
- log.success(`Created ${prettyName} package.json file`)
88
- }
89
- catch (err) {
90
- log.error(`There was an error creating the ${prettyName} package.json`, err)
91
- }
92
- }
@@ -1,8 +0,0 @@
1
- declare const result: unknown;
2
- declare const result: unknown;
3
- declare const result: unknown;
4
- declare const result: unknown;
5
- declare const result: unknown;
6
- declare const result: unknown;
7
- declare const result: unknown;
8
- declare const result: unknown;
package/dist/ports.d.ts DELETED
@@ -1,2 +0,0 @@
1
- declare const projects: unknown;
2
- declare const ports: unknown;
@@ -1 +0,0 @@
1
- declare const result: unknown;
@@ -1,17 +0,0 @@
1
- // @bun
2
- // src/prepublish.ts
3
- import process from "node:process";
4
- import { NpmScript } from "@stacksjs/enums";
5
- import { log } from "@stacksjs/logging";
6
- import { runtimePath } from "@stacksjs/path";
7
- import { runNpmScript } from "@stacksjs/utils";
8
- log.info("Running prepublish command...");
9
- var result = await runNpmScript(NpmScript.BuildStacks, {
10
- verbose: true,
11
- cwd: runtimePath()
12
- });
13
- if (result.isErr()) {
14
- log.error(new Error("There was an error while prepublishing your stack"), result.error);
15
- process.exit();
16
- }
17
- log.success("Prepublishing completed");
@@ -1,6 +0,0 @@
1
- import type { PurchaseOptions } from '@stacksjs/cloud';
2
-
3
- declare const c: unknown;
4
- declare const defaultOptions: PurchaseOptions;
5
- declare const options: PurchaseOptions;
6
- declare const result: unknown;
package/dist/release.js DELETED
@@ -1,49 +0,0 @@
1
- #!/usr/bin/env bun
2
- // @bun
3
- import"./index.js";
4
- import"./commit.js";
5
- import"./make.js";
6
- import"./add.js";
7
- import"./generate/index.js";
8
- import"./chunk-xgsmf4cy.js";
9
- import"./helpers/vscode-custom-data.js";
10
- import"./chunk-494jp8d5.js";
11
- import"./chunk-hvfeg6n6.js";
12
- import"./chunk-mdj7x1vs.js";
13
- import"./chunk-p0c688mg.js";
14
- import"./chunk-qkm8e752.js";
15
- import"./chunk-a13x0e43.js";
16
- import"./chunk-mdqphqep.js";
17
- import"./chunk-qhh0v93n.js";
18
- import"./chunk-ccnf3w1b.js";
19
- import"./chunk-7s5qcjkt.js";
20
- import"./chunk-bf8bq8pc.js";
21
- import"./chunk-b5g5w1hh.js";
22
- import"./chunk-zzerxbrm.js";
23
- import"./chunk-veja9rez.js";
24
- import"./chunk-a7k3cdby.js";
25
- import"./chunk-frw3va9v.js";
26
- import"./chunk-saqpg5nd.js";
27
- import"./chunk-2dvnt46s.js";
28
- import"./chunk-w6fdq4hk.js";
29
- import"./chunk-wkwtsvym.js";
30
- import"./dev/index.js";
31
- import"./chunk-ze46550n.js";
32
- import {
33
- runActions
34
- } from "./helpers/utils.js";
35
- import"./chunk-9v6qtbez.js";
36
-
37
- // src/release.ts
38
- import { app } from "@stacksjs/config";
39
- import { Action } from "@stacksjs/enums";
40
- import { log } from "@stacksjs/logging";
41
- import { projectPath } from "@stacksjs/path";
42
- await runActions([
43
- Action.GenerateLibraryEntries,
44
- Action.LintFix,
45
- Action.Bump
46
- ], {
47
- cwd: projectPath()
48
- });
49
- log.success(`Successfully released ${app.name}`);
package/dist/remove.d.ts DELETED
@@ -1,6 +0,0 @@
1
- declare interface RemoveOptions {
2
- domain?: string
3
- verbose: boolean
4
- }
5
- declare const options: RemoveOptions;
6
- declare const result: unknown;
@@ -1 +0,0 @@
1
- declare function main(): void;
package/dist/run.d.ts DELETED
@@ -1 +0,0 @@
1
- declare const result: unknown;
@@ -1,2 +0,0 @@
1
- declare const options: unknown;
2
- declare const result: unknown;
@@ -1 +0,0 @@
1
- declare const result: unknown;
package/dist/setup.d.ts DELETED
@@ -1 +0,0 @@
1
- declare const result: unknown;
package/dist/shell.d.ts DELETED
@@ -1,2 +0,0 @@
1
- declare const homePath: unknown;
2
- declare const match: (...args: any[]) => unknown;
package/dist/table.d.ts DELETED
@@ -1 +0,0 @@
1
- declare const result: unknown;
@@ -1,14 +0,0 @@
1
- // @bun
2
- // src/test/feature.ts
3
- import process from "node:process";
4
- import { log } from "@stacksjs/cli";
5
- import { projectPath } from "@stacksjs/path";
6
- var proc = Bun.spawn(["sh", "-c", "bun test ./tests/feature/**"], {
7
- cwd: projectPath(),
8
- stdio: ["inherit", "inherit", "inherit"]
9
- });
10
- var exitCode = await proc.exited;
11
- if (exitCode !== 0) {
12
- log.error("Tests failed");
13
- process.exit(exitCode);
14
- }
@@ -1,14 +0,0 @@
1
- // @bun
2
- // src/test/index.ts
3
- import process from "node:process";
4
- import { log } from "@stacksjs/cli";
5
- import { projectPath } from "@stacksjs/path";
6
- var proc = Bun.spawn(["sh", "-c", "bun test ./tests/feature/** ./tests/unit/**"], {
7
- cwd: projectPath(),
8
- stdio: ["inherit", "inherit", "inherit"]
9
- });
10
- var exitCode = await proc.exited;
11
- if (exitCode !== 0) {
12
- log.error("Tests failed");
13
- process.exit(exitCode);
14
- }
package/dist/test/ui.js DELETED
@@ -1,6 +0,0 @@
1
- // @bun
2
- // src/test/ui.ts
3
- import { runCommand } from "@stacksjs/cli";
4
- import { NpmScript } from "@stacksjs/enums";
5
- import { frameworkPath } from "@stacksjs/path";
6
- await runCommand(NpmScript.TestUi, { verbose: true, cwd: frameworkPath() });
package/dist/test/unit.js DELETED
@@ -1,14 +0,0 @@
1
- // @bun
2
- // src/test/unit.ts
3
- import process from "node:process";
4
- import { log } from "@stacksjs/cli";
5
- import { projectPath } from "@stacksjs/path";
6
- var proc = Bun.spawn(["sh", "-c", "bun test ./tests/unit/**"], {
7
- cwd: projectPath(),
8
- stdio: ["inherit", "inherit", "inherit"]
9
- });
10
- var exitCode = await proc.exited;
11
- if (exitCode !== 0) {
12
- log.error("Tests failed");
13
- process.exit(exitCode);
14
- }
package/dist/typecheck.js DELETED
@@ -1,6 +0,0 @@
1
- // @bun
2
- // src/typecheck.ts
3
- import { runCommands } from "@stacksjs/cli";
4
- import { NpmScript } from "@stacksjs/enums";
5
- import { projectPath } from "@stacksjs/path";
6
- await runCommands([NpmScript.TestTypes], { cwd: projectPath() });
package/dist/types.js DELETED
@@ -1,23 +0,0 @@
1
- // @bun
2
- import"./chunk-9v6qtbez.js";
3
-
4
- // src/types.ts
5
- import process from "node:process";
6
- import { NpmScript } from "@stacksjs/enums";
7
- import { log } from "@stacksjs/logging";
8
- import { runNpmScript } from "@stacksjs/utils";
9
- async function invoke(options) {
10
- const results = await runNpmScript(NpmScript.TypesFix, options);
11
- if (results.isErr()) {
12
- log.error("There was an error fixing your types.", results.error);
13
- process.exit();
14
- }
15
- log.success("Types are set");
16
- }
17
- async function types(options) {
18
- return await invoke(options);
19
- }
20
- export {
21
- types,
22
- invoke
23
- };
package/dist/unit.d.ts DELETED
@@ -1,2 +0,0 @@
1
- declare const proc: unknown;
2
- declare const exitCode: unknown;
@@ -1,8 +0,0 @@
1
- // @bun
2
- import"../chunk-9v6qtbez.js";
3
-
4
- // src/upgrade/dependencies.ts
5
- var dependencies_default = undefined;
6
- export {
7
- dependencies_default as default
8
- };
@@ -1,22 +0,0 @@
1
- // @bun
2
- import"../chunk-wkwtsvym.js";
3
- import"../chunk-ze46550n.js";
4
- import {
5
- runAction
6
- } from "../helpers/utils.js";
7
- import"../chunk-9v6qtbez.js";
8
-
9
- // src/upgrade/index.ts
10
- import process from "node:process";
11
- import { parseArgs } from "@stacksjs/cli";
12
- import { Action } from "@stacksjs/enums";
13
- var options = parseArgs();
14
- if (options?.dependencies || options?.all)
15
- await runAction(Action.UpgradeDeps, options);
16
- if (options?.bun || options?.all)
17
- await runAction(Action.UpgradeBun, options);
18
- if (options?.shell || options?.all)
19
- await runAction(Action.UpgradeShell, options);
20
- if (options?.binary || options?.all)
21
- await runAction(Action.UpgradeBinary, options);
22
- process.exit(9 /* InvalidArgument */);