@stacksjs/actions 0.70.86 → 0.70.88

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 (284) hide show
  1. package/package.json +16 -16
  2. package/dist/action.d.ts +0 -149
  3. package/dist/action.js +0 -2
  4. package/dist/actions.d.ts +0 -2
  5. package/dist/actions.js +0 -2
  6. package/dist/add.d.ts +0 -6
  7. package/dist/add.js +0 -2
  8. package/dist/ai/request-model-access.d.ts +0 -1
  9. package/dist/ai/request-model-access.js +0 -2
  10. package/dist/auth/client.d.ts +0 -1
  11. package/dist/auth/client.js +0 -3
  12. package/dist/auth/prune.d.ts +0 -1
  13. package/dist/auth/prune.js +0 -2
  14. package/dist/auth/setup.d.ts +0 -1
  15. package/dist/auth/setup.js +0 -206
  16. package/dist/auth/token.d.ts +0 -1
  17. package/dist/auth/token.js +0 -2
  18. package/dist/blog.d.ts +0 -19
  19. package/dist/blog.js +0 -148
  20. package/dist/build/cli.d.ts +0 -1
  21. package/dist/build/cli.js +0 -2
  22. package/dist/build/component-libs.d.ts +0 -1
  23. package/dist/build/component-libs.js +0 -2
  24. package/dist/build/core.d.ts +0 -1
  25. package/dist/build/core.js +0 -2
  26. package/dist/build/desktop.d.ts +0 -1
  27. package/dist/build/desktop.js +0 -2
  28. package/dist/build/docs.d.ts +0 -1
  29. package/dist/build/docs.js +0 -2
  30. package/dist/build/frontend-static.d.ts +0 -16
  31. package/dist/build/frontend-static.js +0 -9
  32. package/dist/build/server.d.ts +0 -1
  33. package/dist/build/server.js +0 -2
  34. package/dist/build/stacks.d.ts +0 -1
  35. package/dist/build/stacks.js +0 -2
  36. package/dist/build/views.d.ts +0 -1
  37. package/dist/build/views.js +0 -2
  38. package/dist/build.d.ts +0 -9
  39. package/dist/build.js +0 -2
  40. package/dist/bump.d.ts +0 -1
  41. package/dist/bump.js +0 -8
  42. package/dist/cdn/invalidate-cache.d.ts +0 -1
  43. package/dist/cdn/invalidate-cache.js +0 -1
  44. package/dist/changelog.d.ts +0 -9
  45. package/dist/changelog.js +0 -3
  46. package/dist/check/ports.d.ts +0 -1
  47. package/dist/check/ports.js +0 -2
  48. package/dist/chunk-0c8sd1t6.js +0 -2
  49. package/dist/chunk-0g2nzhx9.js +0 -240
  50. package/dist/chunk-0gadhvn7.js +0 -3
  51. package/dist/chunk-0h27aa4r.js +0 -93
  52. package/dist/chunk-3peh8kqs.js +0 -851
  53. package/dist/chunk-62gdfav8.js +0 -3
  54. package/dist/chunk-6bk53y02.js +0 -3
  55. package/dist/chunk-78c5n3s2.js +0 -3
  56. package/dist/chunk-c74qv38e.js +0 -17
  57. package/dist/chunk-cdk2r2jd.js +0 -1
  58. package/dist/chunk-dbz9dp2h.js +0 -3
  59. package/dist/chunk-e142dheq.js +0 -3
  60. package/dist/chunk-ec4gky40.js +0 -3
  61. package/dist/chunk-h3d81wrg.js +0 -3
  62. package/dist/chunk-m3q0x4h0.js +0 -688
  63. package/dist/chunk-mqgbyhph.js +0 -5
  64. package/dist/chunk-n24m8prb.js +0 -3
  65. package/dist/chunk-n5eqwhck.js +0 -7
  66. package/dist/chunk-nsvnqv8y.js +0 -5
  67. package/dist/chunk-nty6mmx4.js +0 -283
  68. package/dist/chunk-s735m9mg.js +0 -1
  69. package/dist/chunk-tpb8jgsk.js +0 -7
  70. package/dist/chunk-tsbk5vne.js +0 -3
  71. package/dist/chunk-xg9xscqz.js +0 -1
  72. package/dist/chunk-y6e448he.js +0 -7
  73. package/dist/clean.d.ts +0 -1
  74. package/dist/clean.js +0 -2
  75. package/dist/commit.d.ts +0 -3
  76. package/dist/commit.js +0 -2
  77. package/dist/copy-types.d.ts +0 -1
  78. package/dist/copy-types.js +0 -3
  79. package/dist/database/seed.d.ts +0 -1
  80. package/dist/database/seed.js +0 -2
  81. package/dist/deploy/create-receipt-rule.d.ts +0 -1
  82. package/dist/deploy/create-receipt-rule.js +0 -2
  83. package/dist/deploy/index.d.ts +0 -1
  84. package/dist/deploy/index.js +0 -300
  85. package/dist/dev/api.d.ts +0 -1
  86. package/dist/dev/api.js +0 -6
  87. package/dist/dev/components.d.ts +0 -1
  88. package/dist/dev/components.js +0 -2
  89. package/dist/dev/dashboard-globals.d.ts +0 -4
  90. package/dist/dev/dashboard-globals.js +0 -3
  91. package/dist/dev/dashboard-utils.d.ts +0 -150
  92. package/dist/dev/dashboard-utils.js +0 -2
  93. package/dist/dev/dashboard.d.ts +0 -22
  94. package/dist/dev/dashboard.js +0 -8
  95. package/dist/dev/desktop.d.ts +0 -1
  96. package/dist/dev/desktop.js +0 -2
  97. package/dist/dev/docs.d.ts +0 -1
  98. package/dist/dev/docs.js +0 -2
  99. package/dist/dev/index.d.ts +0 -10
  100. package/dist/dev/index.js +0 -2
  101. package/dist/dev/migrate-watcher.d.ts +0 -1
  102. package/dist/dev/migrate-watcher.js +0 -2
  103. package/dist/dev/system-tray.d.ts +0 -1
  104. package/dist/dev/system-tray.js +0 -2
  105. package/dist/dev/views.d.ts +0 -1
  106. package/dist/dev/views.js +0 -2
  107. package/dist/discover-packages.d.ts +0 -18
  108. package/dist/discover-packages.js +0 -2
  109. package/dist/domains/add.d.ts +0 -1
  110. package/dist/domains/add.js +0 -2
  111. package/dist/domains/purchase.d.ts +0 -1
  112. package/dist/domains/purchase.js +0 -2
  113. package/dist/domains/remove.d.ts +0 -1
  114. package/dist/domains/remove.js +0 -2
  115. package/dist/examples.d.ts +0 -5
  116. package/dist/examples.js +0 -2
  117. package/dist/find-projects.d.ts +0 -1
  118. package/dist/find-projects.js +0 -2
  119. package/dist/fresh.d.ts +0 -1
  120. package/dist/fresh.js +0 -2
  121. package/dist/generate/action-types.d.ts +0 -1
  122. package/dist/generate/action-types.js +0 -8
  123. package/dist/generate/component-meta.d.ts +0 -1
  124. package/dist/generate/component-meta.js +0 -3
  125. package/dist/generate/custom-cli-file.d.ts +0 -1
  126. package/dist/generate/custom-cli-file.js +0 -4
  127. package/dist/generate/env-files.d.ts +0 -1
  128. package/dist/generate/env-files.js +0 -26
  129. package/dist/generate/ide-helpers.d.ts +0 -1
  130. package/dist/generate/ide-helpers.js +0 -3
  131. package/dist/generate/index.d.ts +0 -36
  132. package/dist/generate/index.js +0 -2
  133. package/dist/generate/lib-entries.d.ts +0 -1
  134. package/dist/generate/lib-entries.js +0 -3
  135. package/dist/generate/pantry-file.d.ts +0 -1
  136. package/dist/generate/pantry-file.js +0 -2
  137. package/dist/generate/symlink-core.d.ts +0 -1
  138. package/dist/generate/symlink-core.js +0 -2
  139. package/dist/generate/types.d.ts +0 -1
  140. package/dist/generate/types.js +0 -2
  141. package/dist/generate/vscode-custom-data.d.ts +0 -1
  142. package/dist/generate/vscode-custom-data.js +0 -3
  143. package/dist/generate/web-types.d.ts +0 -1
  144. package/dist/generate/web-types.js +0 -1
  145. package/dist/helpers/component-meta.d.ts +0 -26
  146. package/dist/helpers/component-meta.js +0 -2
  147. package/dist/helpers/index.d.ts +0 -4
  148. package/dist/helpers/index.js +0 -2
  149. package/dist/helpers/lib-entries.d.ts +0 -12
  150. package/dist/helpers/lib-entries.js +0 -2
  151. package/dist/helpers/package-json.d.ts +0 -2
  152. package/dist/helpers/package-json.js +0 -43
  153. package/dist/helpers/utils.d.ts +0 -23
  154. package/dist/helpers/utils.js +0 -2
  155. package/dist/helpers/vscode-custom-data.d.ts +0 -3
  156. package/dist/helpers/vscode-custom-data.js +0 -2
  157. package/dist/index.d.ts +0 -49
  158. package/dist/index.js +0 -2
  159. package/dist/key-generate.d.ts +0 -1
  160. package/dist/key-generate.js +0 -2
  161. package/dist/lint/fix.d.ts +0 -1
  162. package/dist/lint/fix.js +0 -3
  163. package/dist/lint/index.d.ts +0 -1
  164. package/dist/lint/index.js +0 -3
  165. package/dist/lint/lint.d.ts +0 -14
  166. package/dist/lint/lint.js +0 -2
  167. package/dist/make-command.d.ts +0 -10
  168. package/dist/make-command.js +0 -45
  169. package/dist/make-job.d.ts +0 -5
  170. package/dist/make-job.js +0 -129
  171. package/dist/make-policy.d.ts +0 -10
  172. package/dist/make-policy.js +0 -94
  173. package/dist/make-resource.d.ts +0 -10
  174. package/dist/make-resource.js +0 -113
  175. package/dist/make.d.ts +0 -52
  176. package/dist/make.js +0 -2
  177. package/dist/migrate/database.d.ts +0 -1
  178. package/dist/migrate/database.js +0 -2
  179. package/dist/migrate/fresh.d.ts +0 -1
  180. package/dist/migrate/fresh.js +0 -2
  181. package/dist/orm/base.d.ts +0 -1
  182. package/dist/orm/base.js +0 -2
  183. package/dist/orm/test.d.ts +0 -1
  184. package/dist/orm/test.js +0 -1
  185. package/dist/prepublish.d.ts +0 -1
  186. package/dist/prepublish.js +0 -2
  187. package/dist/queue/clear.d.ts +0 -1
  188. package/dist/queue/clear.js +0 -2
  189. package/dist/queue/dlq-purge.d.ts +0 -1
  190. package/dist/queue/dlq-purge.js +0 -2
  191. package/dist/queue/dlq-retry.d.ts +0 -1
  192. package/dist/queue/dlq-retry.js +0 -2
  193. package/dist/queue/dlq.d.ts +0 -1
  194. package/dist/queue/dlq.js +0 -5
  195. package/dist/queue/failed.d.ts +0 -1
  196. package/dist/queue/failed.js +0 -5
  197. package/dist/queue/flush.d.ts +0 -1
  198. package/dist/queue/flush.js +0 -3
  199. package/dist/queue/inspect.d.ts +0 -1
  200. package/dist/queue/inspect.js +0 -8
  201. package/dist/queue/list.d.ts +0 -1
  202. package/dist/queue/list.js +0 -5
  203. package/dist/queue/monitor.d.ts +0 -1
  204. package/dist/queue/monitor.js +0 -7
  205. package/dist/queue/pause.d.ts +0 -1
  206. package/dist/queue/pause.js +0 -2
  207. package/dist/queue/quarantine.d.ts +0 -1
  208. package/dist/queue/quarantine.js +0 -3
  209. package/dist/queue/resume.d.ts +0 -1
  210. package/dist/queue/resume.js +0 -2
  211. package/dist/queue/retry.d.ts +0 -1
  212. package/dist/queue/retry.js +0 -2
  213. package/dist/queue/schedule-list.d.ts +0 -1
  214. package/dist/queue/schedule-list.js +0 -5
  215. package/dist/queue/schedule.d.ts +0 -1
  216. package/dist/queue/schedule.js +0 -2
  217. package/dist/queue/status.d.ts +0 -1
  218. package/dist/queue/status.js +0 -5
  219. package/dist/queue/table.d.ts +0 -1
  220. package/dist/queue/table.js +0 -2
  221. package/dist/queue/unquarantine.d.ts +0 -1
  222. package/dist/queue/unquarantine.js +0 -2
  223. package/dist/queue/work.d.ts +0 -1
  224. package/dist/queue/work.js +0 -2
  225. package/dist/release.d.ts +0 -1
  226. package/dist/release.js +0 -3
  227. package/dist/route/list.d.ts +0 -1
  228. package/dist/route/list.js +0 -3
  229. package/dist/run-action.d.ts +0 -2
  230. package/dist/run-action.js +0 -2
  231. package/dist/saas/setup.d.ts +0 -1
  232. package/dist/saas/setup.js +0 -2
  233. package/dist/scaffold-crud.d.ts +0 -25
  234. package/dist/scaffold-crud.js +0 -87
  235. package/dist/schedule/run.d.ts +0 -1
  236. package/dist/schedule/run.js +0 -2
  237. package/dist/search/flush.d.ts +0 -1
  238. package/dist/search/flush.js +0 -2
  239. package/dist/search/import.d.ts +0 -1
  240. package/dist/search/import.js +0 -2
  241. package/dist/search/settings-list.d.ts +0 -1
  242. package/dist/search/settings-list.js +0 -2
  243. package/dist/search/settings.d.ts +0 -1
  244. package/dist/search/settings.js +0 -2
  245. package/dist/serve/api.d.ts +0 -1
  246. package/dist/serve/api.js +0 -2
  247. package/dist/setup/index.d.ts +0 -1
  248. package/dist/setup/index.js +0 -2
  249. package/dist/setup/ssl.d.ts +0 -38
  250. package/dist/setup/ssl.js +0 -2
  251. package/dist/stacks.d.ts +0 -4
  252. package/dist/stacks.js +0 -2
  253. package/dist/templates.d.ts +0 -28
  254. package/dist/templates.js +0 -2
  255. package/dist/test/feature.d.ts +0 -1
  256. package/dist/test/feature.js +0 -2
  257. package/dist/test/index.d.ts +0 -1
  258. package/dist/test/index.js +0 -2
  259. package/dist/test/ui.d.ts +0 -1
  260. package/dist/test/ui.js +0 -2
  261. package/dist/test/unit.d.ts +0 -1
  262. package/dist/test/unit.js +0 -2
  263. package/dist/typecheck.d.ts +0 -1
  264. package/dist/typecheck.js +0 -2
  265. package/dist/types.d.ts +0 -3
  266. package/dist/types.js +0 -2
  267. package/dist/upgrade/binary.d.ts +0 -1
  268. package/dist/upgrade/binary.js +0 -2
  269. package/dist/upgrade/bun.d.ts +0 -1
  270. package/dist/upgrade/bun.js +0 -1
  271. package/dist/upgrade/dependencies.d.ts +0 -1
  272. package/dist/upgrade/dependencies.js +0 -2
  273. package/dist/upgrade/framework-utils.d.ts +0 -150
  274. package/dist/upgrade/framework-utils.js +0 -2
  275. package/dist/upgrade/framework.d.ts +0 -1
  276. package/dist/upgrade/framework.js +0 -7
  277. package/dist/upgrade/index.d.ts +0 -1
  278. package/dist/upgrade/index.js +0 -2
  279. package/dist/upgrade/packages.d.ts +0 -14
  280. package/dist/upgrade/packages.js +0 -12
  281. package/dist/upgrade/shell.d.ts +0 -1
  282. package/dist/upgrade/shell.js +0 -5
  283. package/dist/upgrade.d.ts +0 -7
  284. package/dist/upgrade.js +0 -2
@@ -1,5 +0,0 @@
1
- // @bun
2
- import"./chunk-h3d81wrg.js";var q={type:"aws",useLoadBalancer:!0,app:{name:"app-server-1",domain:"stacksjs.com",region:"us-east-1",type:"app",size:"t3.micro",diskSize:20,serverOS:"ubuntu-20-lts-x86_64",bunVersion:"1.1.26",database:"sqlite",databaseName:"stacks"},app2:{name:"app-server-2",domain:"stacksjs.com",instanceType:"t3.micro",userData:`#!/bin/bash
3
- echo "Hello World from App Server 2!" > /tmp/test.txt
4
- chown ubuntu:ubuntu /tmp/test.txt
5
- `},web:{name:"web-server",domain:"ow3.org",region:"us-east-1",type:"web",size:"t3.micro",diskSize:20,serverOS:"ubuntu-20-lts-x86_64",bunVersion:"1.1.26"},cache:{name:"cache-server",domain:"stacksjs.com",region:"us-east-1",type:"cache",size:"t3.micro",diskSize:20,serverOS:"ubuntu-20-lts-x86_64",bunVersion:"1.1.26"}};import{env as m}from"@stacksjs/env";var C={project:{name:"stacks",slug:"stacks",region:"us-east-1"},cloud:{provider:"hetzner"},mode:"server",environments:{production:{type:"production",deployBranch:"main",region:"us-east-1",variables:{NODE_ENV:"production",LOG_LEVEL:"info"}},staging:{type:"staging",deployBranch:"stage",domainPrefix:"staging",region:"us-east-1",variables:{NODE_ENV:"staging",LOG_LEVEL:"debug"}},development:{type:"development",deployBranch:"dev",domainPrefix:"dev",region:"us-east-1",variables:{NODE_ENV:"development",LOG_LEVEL:"debug"}}},infrastructure:{compute:{instances:1,size:"small",disk:{size:20,type:"ssd",encrypted:!0},webServer:"rpx",proxy:{engine:"rpx",onDemandTls:!0,onDemandTlsEmail:"hello@stacksjs.com"}},servers:{app:q.app},containers:{api:{cpu:512,memory:1024,port:3000,healthCheck:"/health",desiredCount:2,autoScaling:{min:1,max:10,targetCpuUtilization:70,targetMemoryUtilization:80}}},loadBalancer:{enabled:!0,type:"application",healthCheck:{path:"/health",interval:30,healthyThreshold:2,unhealthyThreshold:5}},ssl:{enabled:!0,provider:"acm",domains:m.SSL_DOMAINS?.split(",")||["stacksjs.com","www.stacksjs.com"],redirectHttp:!0,letsEncrypt:{email:m.LETSENCRYPT_EMAIL||"admin@stacksjs.com",staging:!1,autoRenew:!0}},dns:{domain:m.APP_DOMAIN||"stacksjs.com",hostedZoneId:m.AWS_HOSTED_ZONE_ID||"Z01455702Q7952O6RCY37"},storage:{public:{public:!0,encryption:!0,versioning:!0,website:{indexDocument:"index.html",errorDocument:"index.html"}},private:{encryption:!0,versioning:!0},docs:{public:!0,encryption:!0,versioning:!0,path:"/docs",pathRewriteStyle:"flat",website:{indexDocument:"index.html",errorDocument:"404.html"}},blog:{public:!0,encryption:!0,versioning:!0,path:"/blog",website:{indexDocument:"index.html",errorDocument:"404.html"}},logs:{encryption:!0,versioning:!1},backups:{encryption:!0,versioning:!0},email:{public:!1,encryption:!0,versioning:!1}},functions:{},queues:{jobs:{visibilityTimeout:120,deadLetterQueue:!0,maxReceiveCount:3}},databases:{},cdn:{},monitoring:{}},sites:{main:{root:".",path:"/",domain:m.APP_DOMAIN||"stacksjs.com",start:"bun --conditions development storage/framework/core/buddy/src/cli.ts serve",port:3000,preStart:["bun install","bun --conditions development storage/framework/core/buddy/src/cli.ts migrate"]},api:{root:".",start:"bun --conditions development storage/framework/core/actions/src/serve/api.ts",port:3008,preStart:["bun install"],env:{HOST:"127.0.0.1",APP_ENV:"production"}},docs:{deploy:"server",root:"dist/docs/.bunpress",path:"/docs",domain:m.APP_DOMAIN||"stacksjs.com",build:"bunx @stacksjs/bunpress build --dir ./docs --outdir ./dist/docs",pathRewriteStyle:"directory"},blog:{deploy:"server",root:"dist/blog",path:"/blog",domain:m.APP_DOMAIN||"stacksjs.com",build:`bun -e "const {buildBlog}=await import('./storage/framework/core/actions/src/blog'); await buildBlog({outDir:'./dist/blog', baseUrl: (process.env.APP_URL?(/^https?:/.test(process.env.APP_URL)?process.env.APP_URL:'https://'+process.env.APP_URL):'https://stacksjs.com')})"`,pathRewriteStyle:"directory"},wwwStacksjs:{domain:"www.stacksjs.com",redirect:"https://stacksjs.com"}}},w={},E=w;export{C as tsCloud,E as default};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{existsSync as N,readdirSync as z,readFileSync as W,statSync as J,writeFileSync as Y}from"fs";import{homedir as T}from"os";import{join as Z,resolve as I}from"path";import A from"process";function y(q,D){let B=q.version;if(B)return{channel:"stable",ref:B.startsWith("v")?B:`v${B}`,targetVersion:B};if(q.canary)return{channel:"canary",ref:"main"};if(q.stable)return{channel:"stable",ref:"stable"};if(D==="canary")return{channel:"canary",ref:"main"};return{channel:"stable",ref:"stable"}}function S(q,D="storage/framework/core"){return`github:stacksjs/stacks#${q}/${D}`}function w(q){try{if(N(q))return JSON.parse(W(q,"utf-8")).version||null}catch{}return null}function g(q){try{if(N(q)){if(W(q,"utf-8").trim()==="canary")return"canary"}}catch{}return"stable"}function b(q,D){try{Y(q,D,"utf-8")}catch{}}function v(q){try{if(N(q)){let D=W(q,"utf-8").trim(),[B,E]=D.split(/\s+/);if((B==="stable"||B==="canary")&&E&&/^[0-9a-f]{40}$/i.test(E))return{channel:B,sha:E.toLowerCase()}}}catch{}return null}function F(q,D,B){try{Y(q,`${D} ${B}`,"utf-8")}catch{}}function P(q){let{force:D,targetVersion:B,remoteSha:E,synced:H,channel:G}=q;if(D||B)return!1;if(!E||!H)return!1;return H.channel===G&&H.sha===E.toLowerCase()}function x(q,D,B){if(q.targetVersion)return`Installing Stacks v${q.targetVersion.replace(/^v/,"")}...`;if(q.channel==="canary")return"Upgrading to the latest canary build...";if(B&&D==="canary")return"Switching back to the latest stable release...";return"Upgrading to the latest version..."}function f(q,D,B,E,H){if(q.targetVersion){let G=q.targetVersion.replace(/^v/,"");if(D===G&&!H)return`Stacks is already at v${G}`;if(D)return`Installed Stacks v${G} (was v${D})`;return`Installed Stacks v${G}`}if(D&&B&&D===B&&!H){if(q.channel==="canary")return`Stacks is already up to date (canary ${D})`;return`Stacks is already up to date (v${D})`}if(D&&B){let G=E==="canary"?`canary ${D}`:`v${D}`,K=q.channel==="canary"?`canary ${B}`:`v${B}`;return`Upgraded Stacks from ${G} to ${K}`}if(B)return`Upgraded Stacks to ${q.channel==="canary"?`canary ${B}`:`v${B}`}`;return`Upgraded Stacks to ${q.ref} (latest)`}var p=[{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 u(q){let D=[A.env.STACKS_LOCAL_PATH,I(q,"..","stacks"),I(q,"..","..","stacks"),I(T(),"Code","stacks"),I(T(),"code","stacks"),I(T(),"projects","stacks"),I(T(),"src","stacks")];for(let B of D){if(!B)continue;let E=Z(B,"storage","framework","core","buddy","package.json");try{if(N(E)&&I(B)!==I(q))return I(B)}catch{}}return null}async function V(q,D=[]){let B=new Map;if(!N(q))return B;let E=new Set(D),H=[{abs:q,rel:""}],G=[];while(H.length>0){let{abs:K,rel:M}=H.pop(),L;try{L=z(K)}catch{continue}for(let O of L){if(E.has(O))continue;let U=Z(K,O),X=M?`${M}/${O}`:O,Q;try{Q=J(U)}catch{continue}if(Q.isDirectory())H.push({abs:U,rel:X});else if(Q.isFile()){let _=Q.size;G.push((async()=>{let $=await C(U);B.set(X,{size:_,hash:$})})())}}}return await Promise.all(G),B}function d(q,D){let B=0,E=0,H=0;for(let[K,M]of D){let L=q.get(K);if(!L)B++;else if(L.size!==M.size||L.hash!==M.hash)E++;else H++}let G=0;for(let K of q.keys())if(!D.has(K))G++;return{added:B,changed:E,removed:G,unchanged:H}}async function C(q){try{let D=await Bun.file(q).arrayBuffer();return Bun.hash(D)}catch{return 0n}}
3
- export{y as c,S as d,w as e,g as f,b as g,v as h,F as i,P as j,x as k,f as l,p as m,u as n,V as o,d as p};
@@ -1,7 +0,0 @@
1
- // @bun
2
- import{Lb as H}from"./chunk-h3d81wrg.js";import{execSync as M,spawn as j}from"child_process";import Z from"fs";import E from"os";import $ from"path";import Y from"process";import{log as B}from"@stacksjs/cli";var q=Y.platform==="win32"?$.join(Y.env.windir||"C:\\Windows","System32","drivers","etc","hosts"):"/etc/hosts",X=$.join(E.homedir(),".stacks","ssl");function T(){return Y.stdin.isTTY===!0&&Y.stdout.isTTY===!0}function V(){return Y.env.SUDO_PASSWORD}function k(){return T()||!!V()}function F(z){try{let G=Z.readFileSync(q,"utf-8");return G.includes(`127.0.0.1 ${z}`)||G.includes(`::1 ${z}`)}catch{if(Y.platform!=="win32"){let G=V();if(G)try{let J=M(`echo '${G}' | sudo -S cat "${q}" 2>/dev/null`,{encoding:"utf-8"});return J.includes(`127.0.0.1 ${z}`)||J.includes(`::1 ${z}`)}catch{return!1}}return!1}}async function x(z,G){if(F(z)){if(G)B.info(`${z} already in hosts file`);return!0}let J=`
3
- # Added by Stacks
4
- 127.0.0.1 ${z}
5
- ::1 ${z}
6
- `;if(Y.platform==="win32")return B.warn("Please add this to your hosts file manually:"),B.warn(`127.0.0.1 ${z}`),B.warn(`::1 ${z}`),B.warn(`File location: ${q}`),!1;if(!k()){if(G)B.warn(`Cannot add ${z} to hosts file (non-interactive mode and no SUDO_PASSWORD set)`),B.info("Run `buddy setup:ssl` in a terminal or set SUDO_PASSWORD environment variable");return!1}let K=V();return new Promise((Q)=>{let N;if(K)N=j("sh",["-c",`echo '${K}' | sudo -S sh -c "echo '${J}' >> '${q}'"`],{stdio:["pipe","inherit","inherit"]});else N=j("sudo",["sh","-c",`echo '${J}' >> "${q}"`],{stdio:"inherit"});N.on("close",(U)=>{if(U===0){if(G)B.success(`Added ${z} to hosts file`);Q(!0)}else{if(G)B.error(`Failed to add ${z} to hosts file`),B.warn(`Manually add: 127.0.0.1 ${z}`);Q(!1)}}),N.on("error",()=>{B.error("Failed to run sudo command"),Q(!1)})})}function O(z){let G=$.join(X,`${z}.crt`),J=$.join(X,`${z}.key`),K=$.join(X,`${z}.ca.crt`);return Z.existsSync(G)&&Z.existsSync(J)&&Z.existsSync(K)}function y(z){if(Y.platform!=="darwin")return!0;let G=$.join(X,`${z}.crt`);if(!Z.existsSync(G))return!1;try{let J=M(`openssl x509 -noout -fingerprint -sha256 -in "${G}"`,{encoding:"utf-8"}),K=J.indexOf("="),Q=K>=0?J.slice(K+1).trim():"";if(!Q)return!1;return M("security find-certificate -a -Z -p | openssl x509 -noout -fingerprint -sha256 2>/dev/null || true",{encoding:"utf-8"}).includes(Q)}catch{return!1}}async function D(z,G){let J=$.join(X,`${z}.ca.crt`),K=$.join(X,`${z}.crt`);if(!Z.existsSync(J))return B.error(`CA certificate not found: ${J}`),!1;if(y(z)){if(G)B.info("Certificate is already trusted, skipping trust step");return!0}if(!k()){if(G)B.warn("Cannot trust certificate (non-interactive mode and no SUDO_PASSWORD set)"),B.info("Run `buddy setup:ssl` in a terminal or set SUDO_PASSWORD environment variable");return!1}let Q=V();if(Y.platform==="darwin")return new Promise((N)=>{let U=`security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain '${J}' && security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain '${K}'`,W;if(Q)W=j("sh",["-c",`echo '${Q}' | sudo -S sh -c "${U}"`],{stdio:["pipe","inherit","inherit"]});else W=j("sudo",["sh","-c",U],{stdio:"inherit"});W.on("close",(A)=>{if(A===0){try{M(`security add-trusted-cert -d -r trustRoot -k ~/Library/Keychains/login.keychain-db "${K}" 2>/dev/null || true`)}catch{}N(!0)}else{if(G)B.warn("Could not trust certificate automatically"),B.info(` sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain "${J}"`);N(!1)}}),W.on("error",()=>{B.error("Failed to run sudo command"),N(!1)})});else if(Y.platform==="linux")return new Promise((N)=>{let U=`mkdir -p /usr/local/share/ca-certificates/stacks && cp '${J}' /usr/local/share/ca-certificates/stacks/ && update-ca-certificates`,W;if(Q)W=j("sh",["-c",`echo '${Q}' | sudo -S sh -c "${U}"`],{stdio:["pipe","inherit","inherit"]});else W=j("sudo",["sh","-c",U],{stdio:"inherit"});W.on("close",(A)=>{if(A===0)B.success("Certificate trusted"),N(!0);else B.warn("Could not trust certificate automatically"),N(!1)}),W.on("error",()=>N(!1))});else if(Y.platform==="win32")return B.warn("Please manually trust the certificate in Windows:"),B.warn(` 1. Double-click: ${J}`),B.warn(' 2. Click "Install Certificate"'),B.warn(' 3. Select "Local Machine" and place in "Trusted Root Certification Authorities"'),!1;return!1}async function R(z,G){try{let J=await import("@stacksjs/tlsx"),{generateCertificate:K,createRootCA:Q}=J,N=J.httpsConfig;if(!Z.existsSync(X))Z.mkdirSync(X,{recursive:!0});let U={domain:z,hostCertCN:z,basePath:X,caCertPath:$.join(X,`${z}.ca.crt`),certPath:$.join(X,`${z}.crt`),keyPath:$.join(X,`${z}.key`),altNameIPs:["127.0.0.1","::1"],altNameURIs:["localhost",z],organizationName:"Stacks Development",countryName:"US",stateName:"California",localityName:"Playa Vista",commonName:z,validityDays:825,verbose:G||!1,subjectAltNames:[{type:2,value:z},{type:2,value:`*.${z.split(".").slice(1).join(".")}`},{type:2,value:"localhost"},{type:2,value:"*.localhost"}]};if(G)B.info("Generating Root CA certificate...");let W=await Q(U);if(G)B.info(`Generating host certificate for ${z}...`);let A=await K({...U,rootCA:{certificate:W.certificate,privateKey:W.privateKey}});if(Z.writeFileSync(U.caCertPath,W.certificate),Z.writeFileSync(U.certPath,A.certificate),Z.writeFileSync(U.keyPath,A.privateKey),G)B.success(`SSL certificates generated for ${z}`);return!0}catch(J){return B.error(`Failed to generate certificates: ${J}`),!1}}async function C(z={}){let G=z.domain||Y.env.APP_URL?.replace(/^https?:\/\//,"")||"stacks.localhost";if(G==="localhost"||G.startsWith("localhost:"))return B.info("Skipping SSL setup for localhost"),!0;let J=!0;if(!z.skipHosts){if(!await x(G,z.verbose)&&z.verbose)B.warn("Hosts file not updated - you may need to add the entry manually")}if(!O(G)){if(z.verbose)B.info("Generating SSL certificates...");if(!await R(G,z.verbose))return B.error("Failed to generate SSL certificates"),!1}if(!z.skipTrust&&!y(G)){if(!await D(G,z.verbose))B.warn("Certificate not trusted - you may see browser warnings"),J=!1}return J}function f(z){return F(z)&&O(z)}
7
- export{F as Fa,x as Ga,O as Ha,y as Ia,D as Ja,R as Ka,C as La,f as Ma};
@@ -1,5 +0,0 @@
1
- // @bun
2
- import{Gb as z}from"./chunk-tsbk5vne.js";import A from"process";import{log as v}from"@stacksjs/logging";import{componentsPath as J,functionsPath as K,libraryEntryPath as N}from"@stacksjs/path";import{writeTextFile as O}from"@stacksjs/storage";import{kebabCase as M}from"@stacksjs/strings";import{ExitCode as B}from"@stacksjs/types";import{determineResetPreset as U}from"@stacksjs/utils";async function T(k){await V(k)}async function V(k){if(k==="web-components")await X();if(k==="functions")await Y()}async function X(k="web-components"){v.info("Ensuring Web Component Library Entry Point..."),await O({path:N(k),data:Q(k)}).catch((q)=>{v.error("There was an error generating the Web Component library entry point",q),A.exit(B.FatalError)}),v.success("Created Web Component Library Entry Point")}async function Y(k="functions"){v.info("Ensuring Function Library Entry Point..."),await O({path:N(k),data:Q(k)}).catch((q)=>{v.error("There was an error generating Function Library Entry Point",q),A.exit(B.FatalError)}),v.success("Created Functions Library Entry Point")}function Q(k){let q=[];if(k==="functions"){if(!z.functions?.files)v.error(Error("There are no functions defined to be built. Please check your config/library.ts file for potential adjustments")),A.exit(B.FatalError);for(let j of z.functions.files)if(Array.isArray(j))q.push(`export * as ${j[1]} from '${K(j[0])}'`);else q.push(`export * from '${K(j)}'`);return q.join(`\r
3
- `)}q=U();let G=[...q,"import { defineCustomElement } from 'vue'"],H=[],I=[];if(!z.webComponents?.tags)v.error(Error("There are no components defined to be built. Please check your config/library.ts file for potential adjustments")),A.exit(B.FatalError);for(let j of z.webComponents.tags.map((S)=>S.name))if(Array.isArray(j))G.push(`import ${j[1]} from '${J(j[0])}.vue'`),H.push(`const ${j[1]}CustomElement = defineCustomElement(${j[1]})`),I.push(`customElements.define('${M(j[1])}', ${j[1]}CustomElement)`);else G.push(`import ${j} from '${J(j)}.vue'`),H.push(`const ${j}CustomElement = defineCustomElement(${j})`),I.push(`customElements.define('${M(j)}', ${j}CustomElement)`);return[...G,...H,...I].join(`\r
4
- `)}
5
- export{T as Sa,V as Ta,X as Ua,Y as Va,Q as Wa};
@@ -1,283 +0,0 @@
1
- // @bun
2
- var f={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<Payload>().
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
- }`,mail:`import { Mailable } from '@stacksjs/email'
100
-
101
- /**
102
- * Props passed into the {0} email. Add the fields your template
103
- * needs and they'll flow through to the stx template's \`props\` \u2014
104
- * \`Mailable<{0}Props>\` ensures \`.template()\` and \`this.props\`
105
- * type-check against this shape (stacksjs/stacks#1903).
106
- */
107
- export interface {0}Props extends Record<string, unknown> {
108
- /** Recipient email address. */
109
- to: string
110
- /** Display name for the greeting (falls back to 'there'). */
111
- userName?: string
112
- }
113
-
114
- /**
115
- * {0} mailable. Subclass of \`Mailable<{0}Props>\` \u2014 \`build()\` wires the
116
- * recipient / subject / template (props typed against \`{0}Props\`),
117
- * then \`send()\` (inherited) dispatches via the configured mail driver.
118
- *
119
- * @example
120
- * \`\`\`ts
121
- * await new {0}({ to: 'user@example.com', userName: 'Ada' }).send()
122
- * \`\`\`
123
- */
124
- export class {0} extends Mailable<{0}Props> {
125
- constructor(private readonly props: {0}Props) {
126
- super()
127
- }
128
-
129
- build(): this {
130
- return this
131
- .to(this.props.to)
132
- .subject('{0}')
133
- .template('{1}', {
134
- to: this.props.to,
135
- userName: this.props.userName ?? 'there',
136
- })
137
- }
138
- }`,mailTemplate:`<script server>
139
- // Generated by \`buddy make:mail {0}\`. Edit freely \u2014 \`props\` is the
140
- // object passed by the Mailable's \`build()\`.
141
- const appName = props.appName || 'Stacks'
142
- const appUrl = props.appUrl || 'https://stacksjs.com'
143
- const userName = props.userName || 'there'
144
- const primaryColor = props.primaryColor || '#3451b2'
145
- const primaryColorDark = props.primaryColorDark || '#2a4198'
146
- const subject = props.subject || '{0}'
147
- const year = props.year || new Date().getFullYear()
148
- </script>
149
-
150
- <!DOCTYPE html>
151
- <html lang="en">
152
- <head>
153
- <meta charset="UTF-8">
154
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
155
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
156
- <title>{{ subject }}</title>
157
- <style>
158
- .button { display: inline-block; padding: 14px 32px; background-color: {{ primaryColor }}; color: #ffffff !important; text-decoration: none; border-radius: 6px; font-weight: 600; font-size: 16px; text-align: center; }
159
- .button:hover { background-color: {{ primaryColorDark }}; }
160
- @media only screen and (max-width: 600px) {
161
- .container { width: 100% !important; padding: 20px !important; }
162
- .content { padding: 24px !important; }
163
- .button { display: block !important; width: 100% !important; }
164
- }
165
- </style>
166
- </head>
167
- <body style="margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background-color: #f4f4f5; line-height: 1.6;">
168
- <table role="presentation" cellpadding="0" cellspacing="0" style="width: 100%; border-collapse: collapse;">
169
- <tr>
170
- <td style="padding: 40px 20px;">
171
- <table role="presentation" cellpadding="0" cellspacing="0" class="container" style="max-width: 600px; margin: 0 auto; background-color: #ffffff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);">
172
- <tr>
173
- <td style="background-color: {{ primaryColor }}; padding: 30px 40px; text-align: center;">
174
- <h1 style="margin: 0; color: #ffffff; font-size: 24px; font-weight: 600;">{{ appName }}</h1>
175
- </td>
176
- </tr>
177
- <tr>
178
- <td class="content" style="padding: 40px;">
179
- <h2 style="margin: 0 0 20px; color: #111827; font-size: 20px; font-weight: 600;">{0}</h2>
180
- <p style="margin: 0 0 20px; color: #4b5563; font-size: 16px;">Hi {{ userName }},</p>
181
- <p style="margin: 0 0 20px; color: #4b5563; font-size: 16px;">Your message body goes here.</p>
182
- <table role="presentation" cellpadding="0" cellspacing="0" style="margin: 30px 0;">
183
- <tr><td><a href="{{ appUrl }}" class="button">Open {{ appName }}</a></td></tr>
184
- </table>
185
- </td>
186
- </tr>
187
- <tr>
188
- <td style="padding: 20px 40px; background-color: #f9fafb; border-top: 1px solid #e5e7eb;">
189
- <p style="margin: 0; color: #6b7280; font-size: 12px; text-align: center;">This is an automated message from {{ appName }}.</p>
190
- <p style="margin: 10px 0 0; color: #9ca3af; font-size: 11px; text-align: center;">&copy; {{ year }} {{ appName }}. All rights reserved.</p>
191
- </td>
192
- </tr>
193
- </table>
194
- </td>
195
- </tr>
196
- </table>
197
- </body>
198
- </html>`,middleware:`import type { Request } from '@stacksjs/router'
199
- import { Middleware } from '@stacksjs/router'
200
-
201
- export default new Middleware({
202
- name: '{0}',
203
- priority: 1,
204
- async handle(request: Request) {
205
- // Your middleware logic here
206
- },
207
- })`,model:`import { defineModel } from '@stacksjs/orm'
208
- import { schema } from '@stacksjs/validation'
209
-
210
- export default defineModel({
211
- name: '{0}',
212
- table: '{1}',
213
- primaryKey: 'id',
214
- autoIncrement: true,
215
-
216
- traits: {
217
- useTimestamps: true,
218
-
219
- useSeeder: {
220
- count: 10,
221
- },
222
- },
223
-
224
- attributes: {
225
- // your attributes here
226
- },
227
- } as const)`,migration:`import type { Database } from '@stacksjs/database'
228
-
229
- export async function up(db: Database): Promise<void> {
230
- await db.schema
231
- .createTable('{0}')
232
- .addColumn('id', 'integer', col => col.autoIncrement().primaryKey())
233
- .execute()
234
- }`,stackPackageJson:`{
235
- "name": "{0}",
236
- "version": "0.0.1",
237
- "type": "module",
238
- "stacks": {
239
- "name": "{1}",
240
- "description": "A Stacks extension"
241
- }
242
- }`,job:`import { Job } from '@stacksjs/jobs'
243
-
244
- export default new Job({
245
- name: '{0}',
246
- description: '{0} job',
247
-
248
- async handle() {
249
- // Your job logic here
250
- console.log('Job executed')
251
- },
252
- })`,event:`import { Event } from '@stacksjs/events'
253
-
254
- export default new Event({
255
- name: '{0}',
256
- description: '{0} event',
257
-
258
- async handle(data: any) {
259
- // Your event handler logic here
260
- console.log('Event handled:', data)
261
- },
262
- })`,listener:`import { Listener } from '@stacksjs/events'
263
-
264
- export default new Listener({
265
- name: '{0}',
266
- description: '{0} listener',
267
-
268
- async handle(data: any) {
269
- // Your listener logic here
270
- console.log('Listener triggered:', data)
271
- },
272
- })`,command:`import { Command } from '@stacksjs/cli'
273
-
274
- export default new Command({
275
- name: '{0}',
276
- description: '{0} command',
277
-
278
- async handle() {
279
- // Your command logic here
280
- console.log('Command executed')
281
- },
282
- })`};
283
- export{f as S};
@@ -1 +0,0 @@
1
- // @bun
@@ -1,7 +0,0 @@
1
- // @bun
2
- import{Gb as z}from"./chunk-tsbk5vne.js";import{err as A,ok as B}from"@stacksjs/error-handling";import{log as q}from"@stacksjs/logging";import{customElementsDataPath as G}from"@stacksjs/path";import{writeTextFile as H}from"@stacksjs/storage";function J(){return`{
3
- "version": 1.1,
4
- "tags": ${JSON.stringify(z.webComponents?.tags)}
5
- }
6
- `}async function Q(){try{return q.info("Generating custom-elements.json..."),await H({path:G(),data:J()}),q.success("Generated custom-elements.json for IDEs."),B(void 0)}catch(v){return q.error("There was an error generating the custom-elements.json file.",v),A("There was an error generating the custom-elements.json file.")}}async function R(){q.info("Generating web-types.json..."),q.info("This feature is not yet implemented.")}
7
- export{Q as Eb,R as Fb};
@@ -1,3 +0,0 @@
1
- // @bun
2
- var b={name:"hello-world",owner:"@stacksjs",repository:"stacksjs/stacks",license:"MIT",author:"Chris Breuer",contributors:["Chris Breuer <chris@stacksjs.com>"],defaultLanguage:"en",releaseable:!0,webComponents:{name:"hello-world-elements",description:"Your framework agnostic web component library description.",keywords:["custom-elements","web-components","library","framework-agnostic","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},functions:{name:"hello-world-fx",description:"Your function library description.",keywords:["functions","composables","library","typescript","javascript"],shouldGenerateSourcemap:!1,files:["counter","dark"]}};
3
- export{b as Gb};
@@ -1 +0,0 @@
1
- // @bun
@@ -1,7 +0,0 @@
1
- // @bun
2
- import{Lb as U}from"./chunk-h3d81wrg.js";import{frameworkPath as E,join as W,path as R,projectPath as L}from"@stacksjs/path";import{existsSync as T,globSync as j,mkdirSync as I,writeFileSync as F}from"@stacksjs/storage";import{readFileSync as v}from"fs";var $=null;async function P(){if($)return $;try{$=(await import("@stacksjs/ts-md")).parseMarkdown}catch{$=(q)=>q}return $}function M(q){if(!q)return"";return $?$(q):q}async function p(){await P();let q=j(["components/*.stx","components/**/*.stx","resources/components/**/*.stx","storage/framework/defaults/resources/components/**/*.stx"],{cwd:L(),absolute:!0}),G=E("component-meta");if(!T(G))I(G,{recursive:!0});for(let X of q){let Q=R.parse(X).name,H=B(X),z=W(G,`${Q}.json`);F(z,JSON.stringify(H,null,2))}}function B(q){let G=v(q,"utf8"),X=b(G),Q=x(G),H=X?D(X):[],z=X?f(X):[],Z=h(Q);return{props:H,events:z,slots:Z}}function b(q){let G=/<script\b[^>]*\bserver\b[^>]*>([\s\S]*?)<\/script>/i.exec(q);if(G?.[1])return G[1];return/<script\b[^>]*>([\s\S]*?)<\/script>/i.exec(q)?.[1]??null}function x(q){let G=/<template\b[^>]*>([\s\S]*?)<\/template>/i.exec(q);if(G?.[1])return G[1];return q.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"")}function D(q){let G=w(q),X=S(q,G);if(!X)return[];let Q=k(X,G),H=g(q);return Q.map((z)=>{return{name:z.required?z.name:`${z.name}?`,description:M(z.description),type:z.type,default:H[z.name]??z.default??"unknown",required:z.required}})}function w(q){let G=new Map,X=/(?:export\s+)?interface\s+([A-Z][\w$]*)\s*(?:extends\s+[\w$,\s]+)?\s*\{/g,Q;while((Q=X.exec(q))!==null){let z=Q[1];if(!z)continue;let Z=Q.index+Q[0].length,Y=K(q,Z-1,"{","}");if(Y!==null)G.set(z,Y)}let H=/(?:export\s+)?type\s+([A-Z][\w$]*)\s*=\s*\{/g;while((Q=H.exec(q))!==null){let z=Q[1];if(!z)continue;let Z=Q.index+Q[0].length,Y=K(q,Z-1,"{","}");if(Y!==null)G.set(z,Y)}return G}function S(q,G){let Q=/defineProps\s*<\s*([\s\S]+?)\s*>\s*\(/.exec(q),H=Q?.[1]?.trim();if(!Q||!H)return null;if(H.startsWith("{")){let Z=q.indexOf("{",Q.index);return K(q,Z,"{","}")}let z=H.replace(/[<>(].*$/,"").split("&")[0]?.trim();if(!z)return null;return G.get(z)??null}function k(q,G){let X=[],Q=N(q,[";",`
3
- `]),H="";for(let z of Q){let Z=z.trim();if(!Z)continue;let Y=/^\/\*\*([\s\S]*?)\*\/\s*([\s\S]*)$/.exec(Z);if(Y){H=(Y[1]??"").split(`
4
- `).map((A)=>A.replace(/^\s*\*\s?/,"")).join(`
5
- `).trim();let C=(Y[2]??"").trim();if(!C)continue;let J=V(C,H,G);if(J)X.push(J);H="";continue}if(Z.startsWith("//")){H=Z.replace(/^\/\/\s?/,"");continue}let _=V(Z,H,G);if(_)X.push(_);H=""}return X}function V(q,G,X){if(/^[a-zA-Z_$][\w$]*\s*\(/.test(q.trimStart()))return null;let Q=/^([a-zA-Z_$][\w$]*)\s*(\??)\s*:\s*([\s\S]+?)\s*[;,]?\s*$/.exec(q);if(!Q)return null;let H=Q[1],z=Q[2]??"",Z=Q[3];if(!H||!Z)return null;return{name:H,type:O(Z),required:z!=="?",description:G}}function g(q){let G={},X=/const\s*\{\s*([\s\S]*?)\s*\}\s*=\s*(?:withDefaults\s*\(\s*)?defineProps/g,Q;while((Q=X.exec(q))!==null)if(Q[1])y(Q[1],G);let H=q.indexOf("withDefaults(");if(H>=0){let z=q.indexOf("defineProps",H);if(z>0){let Z=q.indexOf(">",z),Y=q.indexOf(")",Z>=0?Z:z);if(Y>0){let _=q.indexOf(",",Y),C=_>=0?q.indexOf("{",_):-1;if(C>0){let J=K(q,C,"{","}");if(J)u(J,G)}}}}return G}function y(q,G){for(let X of N(q,[","])){let Q=/^\s*([a-zA-Z_$][\w$]*)\s*=\s*([\s\S]+?)\s*$/.exec(X),H=Q?.[1],z=Q?.[2];if(H&&z)G[H]=O(z)}}function u(q,G){for(let X of N(q,[","])){let Q=/^\s*([a-zA-Z_$][\w$]*)\s*:\s*([\s\S]+?)\s*$/.exec(X.trim()),H=Q?.[1],z=Q?.[2];if(H&&z)G[H]=O(z)}}function f(q){let G=/defineEmits\s*<\s*\{([\s\S]*?)\}\s*>\s*\(/.exec(q);if(!G?.[1])return[];let X=[];for(let Q of N(G[1],[";",`
6
- `])){let H=Q.trim();if(!H)continue;let z=/^['"]?([\w-]+)['"]?\s*:\s*\[(.*?)\]\s*$/.exec(H);if(z){let Y=z[1];if(!Y)continue;X.push({name:Y,type:z[2]?.trim()||"void",description:""});continue}let Z=/^([a-zA-Z_$][\w$]*)\s*\(([\s\S]*?)\)\s*:\s*([\s\S]+)$/.exec(H);if(Z){let Y=Z[1];if(!Y)continue;X.push({name:Y,type:Z[2]?.trim()||"void",description:""})}}return X}function h(q){let G=[],X=new Set,Q=/<slot\b([^>]*)>/g,H;while((H=Q.exec(q))!==null){let z=H[1]??"",Y=/\bname\s*=\s*["']([^"']+)["']/.exec(z)?.[1]??"default";if(X.has(Y))continue;X.add(Y),G.push({name:Y,description:""})}return G}function K(q,G,X,Q){if(q[G]!==X)return null;let H=0,z=G,Z=null;while(z<q.length){let Y=q[z];if(Y===void 0)break;if(Z){if(Y==="\\"){z+=2;continue}if(Y===Z)Z=null;z++;continue}if(Y==='"'||Y==="'"||Y==="`"){Z=Y,z++;continue}if(Y===X)H++;else if(Y===Q){if(H--,H===0)return q.slice(G+1,z)}z++}return null}function N(q,G){let X=[],Q=new Set(G),H=0,z=null,Z=0;for(let Y=0;Y<q.length;Y++){let _=q[Y];if(_===void 0)break;if(z){if(_==="\\"){Y++;continue}if(_===z)z=null;continue}if(_==='"'||_==="'"||_==="`"){z=_;continue}if(_==="{"||_==="["||_==="("||_==="<")H++;else if(_==="}"||_==="]"||_===")"||_===">")H--;else if(H===0&&Q.has(_))X.push(q.slice(Z,Y)),Z=Y+1}return X.push(q.slice(Z)),X}function O(q){return q.replace(/\s+/g," ").trim()}
7
- export{p as Qa,B as Ra};
package/dist/clean.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
package/dist/clean.js DELETED
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{log as o}from"@stacksjs/logging";import{cleanProject as n}from"@stacksjs/utils";o.info("Running clean command...");await n();
package/dist/commit.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import type { CleanOptions } from '@stacksjs/types';
2
- export declare function invoke(options: CleanOptions): Promise<void>;
3
- export declare function commit(options: CleanOptions): Promise<void>;
package/dist/commit.js DELETED
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-h3d81wrg.js";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)}export{n as invoke,a as commit};
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env bun
2
- // @bun
3
- import{frameworkPath as b}from"@stacksjs/path";import{copyFolder as x}from"@stacksjs/storage";var z=[[b("dist/types/components"),b("defaults/resources/components/vue/dist/types")],[b("dist/types/components"),b("defaults/resources/components/web/dist/types")],[b("dist/types/functions"),b("defaults/functions/dist/types")]];z.forEach(([q,u])=>{x(q,u)});
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import A from"process";import{log as q}from"@stacksjs/cli";import{seed as D}from"@stacksjs/database";var B=A.argv.slice(2),F=B.includes("--allow-protected")||B.includes("--allowProtected"),G=B.includes("--fresh"),H=Date.now();try{let y=await D({verbose:!0,fresh:G,allowProtected:F}),C=Date.now()-H;if(y.failed>0){q.warn(""),q.warn(`Seeding completed with ${y.failed} failure(s):`);for(let z of y.results)if(!z.success)q.error(` - ${z.model}: ${z.error}`);q.info(""),q.info("Note: Failed models may have schema mismatches or invalid factory functions."),q.info("Tip: Run `./buddy migrate:fresh` to ensure schema is up to date.")}q.info(""),q.success(`Seeding completed in ${C}ms`),q.info(` Total models: ${y.total}`),q.info(` Successful: ${y.successful}`),q.info(` Failed: ${y.failed}`),A.exit(0)}catch(y){q.error("Seeding failed catastrophically:",y),A.exit(1)}
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import B from"process";import{S3Client as D,SESClient as F}from"@stacksjs/ts-cloud";import{log as G}from"@stacksjs/cli";import{ExitCode as H}from"@stacksjs/types";var I=new F,J=new D,q,A=await J.listBuckets();if(A.Buckets)q=A.Buckets.find((z)=>z.Name?.includes("-email-"))?.Name;console.log("Bucket Name:",q);if(!q)console.log("Stacks Email Bucket not found"),B.exit(H.FatalError);try{await I.createReceiptRule({RuleSetName:"your-rule-set-name",Rule:{Name:"Inbound",Enabled:!0,ScanEnabled:!0,TlsPolicy:"Require",Actions:[{S3Action:{BucketName:q,ObjectKeyPrefix:"tmp/email_in"}}]}}),G.info("Success: Receipt rule created")}catch(z){console.error(z)}
@@ -1 +0,0 @@
1
- export {};