stacks 0.58.28 → 0.58.30

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 (233) hide show
  1. package/core/README.md +1 -1
  2. package/core/actions/dist/src/deploy/index.js +1 -1
  3. package/core/actions/dist/src/dev/components.js +1 -1
  4. package/core/actions/dist/src/dev/index.js +10 -0
  5. package/core/actions/dist/src/generate/lib-entries.js +3 -3
  6. package/core/actions/dist/src/helpers/lib-entries.js +3 -3
  7. package/core/actions/dist/src/index.js +10 -0
  8. package/core/actions/dist/src/lint/fix.js +1 -1
  9. package/core/actions/dist/src/release.js +8 -0
  10. package/core/actions/dist/src/upgrade.js +1 -1
  11. package/core/actions/package.json +1 -1
  12. package/core/actions/src/build/docs.ts +7 -0
  13. package/core/actions/src/deploy/index.ts +1 -1
  14. package/core/actions/src/dev/api.ts +2 -2
  15. package/core/actions/src/dev/components.ts +1 -1
  16. package/core/actions/src/dev/dashboard.ts +7 -0
  17. package/core/actions/src/dev/desktop.ts +3 -3
  18. package/core/actions/src/dev/index.ts +10 -0
  19. package/core/actions/src/dev/system-tray.ts +6 -0
  20. package/core/actions/src/helpers/lib-entries.ts +3 -3
  21. package/core/actions/src/lint/fix.ts +1 -1
  22. package/core/ai/package.json +3 -3
  23. package/core/alias/package.json +1 -1
  24. package/core/analytics/package.json +1 -1
  25. package/core/api/package.json +1 -1
  26. package/core/arrays/package.json +1 -1
  27. package/core/auth/package.json +1 -1
  28. package/core/buddy/README.md +2 -2
  29. package/core/buddy/dist/{chunk-b75e6db0012faa55.js → chunk-0455e53fab4244b1.js} +1 -4
  30. package/core/buddy/dist/{chunk-fd47b42fb923a4be.js → chunk-61e8f138963fc709.js} +173 -137
  31. package/core/buddy/dist/cli.js +2 -2
  32. package/core/buddy/dist/index.js +2 -2
  33. package/core/buddy/package.json +1 -1
  34. package/core/buddy/src/commands/add.ts +4 -0
  35. package/core/buddy/src/commands/build.ts +12 -1
  36. package/core/buddy/src/commands/changelog.ts +2 -0
  37. package/core/buddy/src/commands/clean.ts +2 -0
  38. package/core/buddy/src/commands/cloud.ts +6 -0
  39. package/core/buddy/src/commands/commit.ts +2 -0
  40. package/core/buddy/src/commands/configure.ts +3 -0
  41. package/core/buddy/src/commands/create.ts +8 -8
  42. package/core/buddy/src/commands/deploy.ts +24 -23
  43. package/core/buddy/src/commands/dev.ts +50 -10
  44. package/core/buddy/src/commands/dns.ts +2 -0
  45. package/core/buddy/src/commands/domains.ts +2 -0
  46. package/core/buddy/src/commands/example.ts +4 -0
  47. package/core/buddy/src/commands/fresh.ts +2 -0
  48. package/core/buddy/src/commands/generate.ts +12 -3
  49. package/core/buddy/src/commands/http.ts +2 -0
  50. package/core/buddy/src/commands/install.ts +2 -0
  51. package/core/buddy/src/commands/key.ts +4 -2
  52. package/core/buddy/src/commands/lint.ts +3 -0
  53. package/core/buddy/src/commands/make.ts +11 -1
  54. package/core/buddy/src/commands/migrate.ts +3 -0
  55. package/core/buddy/src/commands/prepublish.ts +2 -0
  56. package/core/buddy/src/commands/release.ts +2 -0
  57. package/core/buddy/src/commands/seed.ts +2 -0
  58. package/core/buddy/src/commands/setup.ts +33 -34
  59. package/core/buddy/src/commands/test.ts +2 -0
  60. package/core/buddy/src/commands/tinker.ts +2 -0
  61. package/core/buddy/src/commands/types.ts +3 -0
  62. package/core/buddy/src/commands/upgrade.ts +6 -0
  63. package/core/build/package.json +1 -1
  64. package/core/bun-create/bud/package.json +3 -2
  65. package/core/bun-create/buddy/package.json +2 -2
  66. package/core/bun-create/stack/package.json +2 -2
  67. package/core/bun-create/stacks/package.json +2 -2
  68. package/core/bun-create/stx/package.json +2 -2
  69. package/core/bun-plugin-yaml/dist/index.js +1 -19
  70. package/core/bun-plugin-yaml/package.json +1 -1
  71. package/core/bun-plugin-yaml/src/index.ts +1 -1
  72. package/core/cache/package.json +2 -2
  73. package/core/chat/package.json +1 -1
  74. package/core/cli/dist/index.js +24 -23
  75. package/core/cli/package.json +1 -1
  76. package/core/cli/src/helpers.ts +21 -31
  77. package/core/cli/src/run.ts +9 -7
  78. package/core/cloud/buddy +2 -0
  79. package/core/cloud/package.json +33 -33
  80. package/core/cloud/src/cloud/ai.ts +45 -36
  81. package/core/cloud/src/cloud/aws-sdk-layer/nodejs/package-lock.json +10 -10
  82. package/core/cloud/src/cloud/aws-sdk-layer/nodejs/package.json +2 -2
  83. package/core/cloud/src/cloud/cdn.ts +44 -5
  84. package/core/cloud/src/cloud/cli.ts +45 -0
  85. package/core/cloud/src/cloud/compute.ts +1 -1
  86. package/core/cloud/src/cloud/index.ts +6 -1
  87. package/core/cloud/src/cloud/lambda/cli-setup/index.js +67 -0
  88. package/core/cloud/src/index.ts +1 -0
  89. package/core/cloud/src/runtime/example/lambda.ts +1 -1
  90. package/core/cloud/src/runtime/runtime.ts +1 -0
  91. package/core/cloud/src/runtime/server.ts +1 -1
  92. package/core/collections/package.json +1 -1
  93. package/core/config/dist/index.js +130 -122
  94. package/core/config/package.json +1 -1
  95. package/core/config/src/overrides.ts +0 -2
  96. package/core/database/package.json +2 -2
  97. package/core/database/src/kysely-bun-worker/driver.ts +1 -0
  98. package/core/database/src/kysely-bun-worker/worker.ts +1 -1
  99. package/core/datetime/package.json +1 -1
  100. package/core/desktop/dist/index.js +6 -0
  101. package/core/desktop/package.json +5 -5
  102. package/core/desktop/src/index.ts +2 -0
  103. package/core/desktop/src/system-tray.ts +1 -0
  104. package/core/development/package.json +1 -1
  105. package/core/dns/package.json +7 -7
  106. package/core/docs/build.ts +1 -1
  107. package/core/docs/dist/index.js +29878 -9995
  108. package/core/docs/package.json +6 -5
  109. package/core/docs/src/index.ts +7 -1
  110. package/core/docs/src/meta.ts +32 -0
  111. package/core/docs/src/scripts/pwa.ts +116 -0
  112. package/core/email/email-forwarder.cjs +1 -0
  113. package/core/email/package.json +3 -3
  114. package/core/email/src/server/converter.ts +1 -0
  115. package/core/email/src/server/inbound.ts +1 -0
  116. package/core/email/src/server/outbound.ts +6 -4
  117. package/core/enums/dist/index.js +4 -2
  118. package/core/enums/package.json +1 -1
  119. package/core/enums/src/index.ts +4 -2
  120. package/core/env/package.json +1 -1
  121. package/core/error-handling/package.json +1 -1
  122. package/core/eslint-config/package.json +18 -18
  123. package/core/eslint-config/src/configs/comments.ts +1 -1
  124. package/core/eslint-config/src/configs/imports.ts +9 -0
  125. package/core/eslint-config/src/configs/svelte.ts +1 -0
  126. package/core/eslint-config/src/configs/unicorn.ts +1 -1
  127. package/core/eslint-config/src/configs/vue.ts +0 -1
  128. package/core/eslint-config/src/factory.ts +2 -8
  129. package/core/events/package.json +1 -1
  130. package/core/faker/package.json +2 -2
  131. package/core/git/dist/index.js +40 -0
  132. package/core/git/package.json +3 -3
  133. package/core/git/src/index.ts +62 -0
  134. package/core/health/package.json +1 -1
  135. package/core/http/package.json +1 -1
  136. package/core/lint/package.json +1 -1
  137. package/core/logging/dist/index.js +0 -6
  138. package/core/logging/package.json +1 -1
  139. package/core/music/package.json +3 -3
  140. package/core/notifications/package.json +2 -2
  141. package/core/objects/package.json +1 -1
  142. package/core/orm/package.json +1 -1
  143. package/core/path/dist/index.js +6 -3
  144. package/core/path/package.json +1 -1
  145. package/core/path/src/index.ts +7 -3
  146. package/core/payments/dist/index.js +2 -5
  147. package/core/payments/package.json +3 -3
  148. package/core/push/package.json +1 -1
  149. package/core/query-builder/package.json +1 -1
  150. package/core/queue/package.json +1 -1
  151. package/core/raycast/package.json +5 -0
  152. package/core/raycast/src/index.ts +0 -0
  153. package/core/realtime/package.json +1 -1
  154. package/core/repl/package.json +1 -1
  155. package/core/router/dist/index.js +16 -496
  156. package/core/router/package.json +1 -1
  157. package/core/router/src/middleware.ts +16 -14
  158. package/core/scheduler/package.json +1 -1
  159. package/core/search-engine/package.json +2 -2
  160. package/core/security/dist/index.js +3 -6
  161. package/core/security/package.json +2 -2
  162. package/core/server/dist/index.js +6 -2
  163. package/core/server/package.json +2 -2
  164. package/core/server/src/config.ts +14 -9
  165. package/core/signals/package.json +1 -1
  166. package/core/slug/package.json +1 -1
  167. package/core/sms/package.json +1 -1
  168. package/core/storage/dist/index.js +28 -10
  169. package/core/storage/package.json +1 -1
  170. package/core/storage/src/files.ts +10 -2
  171. package/core/storage/src/zip.ts +1 -1
  172. package/core/strings/package.json +3 -3
  173. package/core/stx +2 -0
  174. package/core/tables/package.json +3 -3
  175. package/core/testing/package.json +3 -3
  176. package/core/tinker/package.json +1 -1
  177. package/core/tsconfig.json +4 -9
  178. package/core/tunnel/package.json +1 -1
  179. package/core/types/dist/index.js +3 -1
  180. package/core/types/package.json +13 -13
  181. package/core/types/src/cli.ts +3 -3
  182. package/core/types/src/cloud.ts +4 -1
  183. package/core/types/src/dns.ts +1 -1
  184. package/core/types/src/native.ts +0 -0
  185. package/core/types/src/stacks.ts +0 -10
  186. package/core/ui/package.json +8 -8
  187. package/core/utils/dist/index.js +1 -1
  188. package/core/utils/package.json +1 -1
  189. package/core/validation/package.json +1 -1
  190. package/core/vite/README.md +1 -1
  191. package/core/vite/build.ts +1 -1
  192. package/core/vite/dist/index.js +211 -203
  193. package/core/vite/package.json +5 -5
  194. package/core/vite/src/components.ts +1 -1
  195. package/core/vite/src/dashboard.ts +100 -0
  196. package/core/vite/src/desktop.ts +2 -58
  197. package/core/vite/src/example-vue.ts +1 -1
  198. package/core/vite/src/example-wc.ts +1 -1
  199. package/core/vite/src/functions.ts +1 -1
  200. package/core/vite/src/index.ts +9 -11
  201. package/core/vite/src/plugin/auto-imports.ts +1 -1
  202. package/core/vite/src/plugin/layouts.ts +6 -7
  203. package/core/vite/src/plugin/router.ts +3 -1
  204. package/core/vite/src/system-tray.ts +100 -0
  205. package/core/vite/src/views.ts +13 -2
  206. package/core/vite/src/web-components.ts +1 -1
  207. package/core/whois/dist/index.js +1 -2
  208. package/core/whois/package.json +1 -1
  209. package/core/whois/src/index.ts +10 -8
  210. package/core/x-ray/package.json +1 -1
  211. package/core/zsh-buddy/README.md +51 -0
  212. package/core/zsh-buddy/package.json +29 -0
  213. package/ide/dictionary.txt +12 -0
  214. package/ide/jetbrains/.idea/stacks.iml +0 -1
  215. package/ide/vscode/.vscode/settings.json +7 -2
  216. package/ide/vscode/package.json +2 -4
  217. package/package.json +12 -7
  218. package/core/cloud/src/server/.dockerignore +0 -15
  219. package/core/cloud/src/server/Dockerfile +0 -21
  220. package/core/cloud/src/server/index.ts +0 -3
  221. package/core/cloud/src/server/package.json +0 -12
  222. package/core/cloud/src/server/runtime.ts +0 -828
  223. package/core/scripts/build +0 -58
  224. package/core/scripts/ensure +0 -33
  225. package/core/scripts/fresh +0 -14
  226. package/core/scripts/link +0 -14
  227. package/core/scripts/move-built-src-files.ts +0 -28
  228. package/core/scripts/move-dts-files.ts +0 -35
  229. package/core/scripts/publish +0 -43
  230. package/core/scripts/setup +0 -176
  231. package/core/tables/vite.config.ts +0 -84
  232. package/core/vite/src/plugin/index.ts +0 -21
  233. /package/core/vite/src/{stacks.ts → plugins.ts} +0 -0
@@ -1,8 +1,3 @@
1
- import {
2
- __require,
3
- __toESM
4
- } from "./chunk-b75e6db0012faa55.js";
5
-
6
1
  // src/commands/build.ts
7
2
  import process from "process";
8
3
  import {runAction} from "@stacksjs/actions";
@@ -22,9 +17,10 @@ function build(buddy) {
22
17
  docs: "Build your documentation",
23
18
  framework: "Build Stacks framework",
24
19
  select: "What are you trying to build?",
20
+ project: "Target a specific project",
25
21
  verbose: "Enable verbose output"
26
22
  };
27
- buddy.command("build", "Automagically build any of your libraries/packages for production use. Select any of the following packages").option("-c, --components", descriptions.components).option("-v, --vue-components", descriptions.vueComponents).option("-w, --web-components", descriptions.webComponents).option("-e, --elements", descriptions.elements).option("-f, --functions", descriptions.functions).option("-p, --views", descriptions.pages).option("-d, --docs", descriptions.docs).option("-s, --stacks", descriptions.framework, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
23
+ buddy.command("build", "Automagically build any of your libraries/packages for production use. Select any of the following packages").option("-c, --components", descriptions.components).option("-v, --vue-components", descriptions.vueComponents).option("-w, --web-components", descriptions.webComponents).option("-e, --elements", descriptions.elements).option("-f, --functions", descriptions.functions).option("-p, --views", descriptions.pages).option("-d, --docs", descriptions.docs).option("-s, --stacks", descriptions.framework, { default: false }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
28
24
  if (hasNoOptions(options)) {
29
25
  let answers = await prompt.require().multiselect(descriptions.select, {
30
26
  options: [
@@ -43,25 +39,25 @@ function build(buddy) {
43
39
  await runAction(Action.BuildStacks, options);
44
40
  process.exit(ExitCode.Success);
45
41
  });
46
- buddy.command("build:components", "Automagically build component libraries for production use & npm/CDN distribution").option("-c, --components", descriptions.components, { default: true }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
42
+ buddy.command("build:components", "Automagically build component libraries for production use & npm/CDN distribution").option("-c, --components", descriptions.components, { default: true }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
47
43
  await runAction(Action.BuildComponentLibs, options);
48
44
  });
49
- buddy.command("build:cli", "Automagically build the CLI").option("-c, --components", descriptions.components, { default: true }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
45
+ buddy.command("build:cli", "Automagically build the CLI").option("-c, --components", descriptions.components, { default: true }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
50
46
  await runAction(Action.BuildCli, options);
51
47
  });
52
- buddy.command("build:functions", "Automagically build function library for npm/CDN distribution").option("-f, --functions", descriptions.functions, { default: true }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
48
+ buddy.command("build:functions", "Automagically build function library for npm/CDN distribution").option("-f, --functions", descriptions.functions, { default: true }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
53
49
  await runAction(Action.BuildFunctionLib, options);
54
50
  });
55
- buddy.command("build:vue-components", "Automagically build Vue component library for npm/CDN distribution").option("-v, --vue-components", descriptions.vueComponents, { default: true }).option("--verbose", descriptions.verbose, { default: false }).alias("build:vue").action(async (options) => {
51
+ buddy.command("build:vue-components", "Automagically build Vue component library for npm/CDN distribution").option("-v, --vue-components", descriptions.vueComponents, { default: true }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).alias("build:vue").action(async (options) => {
56
52
  await runAction(Action.BuildVueComponentLib, options);
57
53
  });
58
- buddy.command("build:web-components", "Automagically build Web Component library for npm/CDN distribution").option("-w, --web-components", descriptions.webComponents, { default: true }).option("--verbose", descriptions.verbose, { default: false }).alias("build:elements").alias("build:wc").action(async (options) => {
54
+ buddy.command("build:web-components", "Automagically build Web Component library for npm/CDN distribution").option("-w, --web-components", descriptions.webComponents, { default: true }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).alias("build:elements").alias("build:wc").action(async (options) => {
59
55
  await runAction(Action.BuildWebComponentLib, options);
60
56
  });
61
- buddy.command("build:docs", "Automagically build your documentation site.").option("-d, --docs", descriptions.docs, { default: true }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
57
+ buddy.command("build:docs", "Automagically build your documentation site.").option("-d, --docs", descriptions.docs, { default: true }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
62
58
  await runAction(Action.BuildDocs, options);
63
59
  });
64
- buddy.command("build:core", "Automagically build the Stacks core.").option("--verbose", descriptions.verbose, { default: true }).action(async (options) => {
60
+ buddy.command("build:core", "Automagically build the Stacks core.").option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: true }).action(async (options) => {
65
61
  const startTime = await intro("buddy build:core");
66
62
  const result = await runAction(Action.BuildCore, options);
67
63
  if (result.isErr()) {
@@ -70,7 +66,7 @@ function build(buddy) {
70
66
  }
71
67
  await outro("Stacks core built successfully", { startTime, useSeconds: true });
72
68
  });
73
- buddy.command("build:desktop", descriptions.desktop).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
69
+ buddy.command("build:desktop", descriptions.desktop).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
74
70
  const perf = await intro("buddy build:desktop");
75
71
  const result = await runAction(Action.BuildDesktop, options);
76
72
  if (result.isErr()) {
@@ -81,7 +77,7 @@ function build(buddy) {
81
77
  await outro("Exited", { startTime: perf, useSeconds: true });
82
78
  process.exit(ExitCode.Success);
83
79
  });
84
- buddy.command("build:stacks", "Build the Stacks framework.").option("-s, --stacks", descriptions.framework, { default: true }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
80
+ buddy.command("build:stacks", "Build the Stacks framework.").option("-s, --stacks", descriptions.framework, { default: true }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
85
81
  const startTime = await intro("buddy build:stacks");
86
82
  const result = await runAction(Action.BuildStacks, options);
87
83
  if (result.isErr()) {
@@ -96,7 +92,7 @@ function build(buddy) {
96
92
  });
97
93
  }
98
94
  var hasNoOptions = function(options) {
99
- return !options.components && !options.vueComponents && !options.webComponents && !options.elements && !options.functions && !options.pages && !options.docs && !options.framework;
95
+ return !options.components && !options.vueComponents && !options.webComponents && !options.elements && !options.functions && !options.pages && !options.docs && !options.stacks;
100
96
  };
101
97
 
102
98
  // src/commands/changelog.ts
@@ -109,9 +105,10 @@ function changelog(buddy) {
109
105
  const descriptions = {
110
106
  changelog: "Create a CHANGELOG.md file",
111
107
  quiet: "Minimal output",
108
+ project: "Target a specific project",
112
109
  verbose: "Enable verbose output"
113
110
  };
114
- buddy.command("changelog", descriptions.changelog).option("--quiet", descriptions.quiet, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
111
+ buddy.command("changelog", descriptions.changelog).option("--quiet", descriptions.quiet, { default: false }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
115
112
  const perf = await intro2("buddy changelog");
116
113
  const result = await runAction2(Action2.Changelog, options);
117
114
  if (result.isErr()) {
@@ -136,9 +133,10 @@ import {Action as Action3} from "@stacksjs/enums";
136
133
  function clean(buddy) {
137
134
  const descriptions = {
138
135
  clean: "Removes all node_modules & lock files",
136
+ project: "Target a specific project",
139
137
  verbose: "Enable verbose output"
140
138
  };
141
- buddy.command("clean", descriptions.clean).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
139
+ buddy.command("clean", descriptions.clean).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
142
140
  const perf = await intro3("buddy clean");
143
141
  const result = await runAction3(Action3.Clean, options);
144
142
  if (result.isErr()) {
@@ -169,9 +167,10 @@ function cloud2(buddy) {
169
167
  remove: "Removes the Stacks Cloud. In case it fails, try again",
170
168
  optimizeCost: "Removes certain resources that may be re-applied at a later time",
171
169
  cleanUp: "Removes all resources that were retained during the cloud deletion",
170
+ project: "Target a specific project",
172
171
  verbose: "Enable verbose output"
173
172
  };
174
- buddy.command("cloud", descriptions.cloud).option("--ssh", descriptions.ssh, { default: false }).option("--connect", descriptions.ssh, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
173
+ buddy.command("cloud", descriptions.cloud).option("--ssh", descriptions.ssh, { default: false }).option("--connect", descriptions.ssh, { default: false }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
175
174
  if (options.ssh || options.connect) {
176
175
  const startTime = performance.now();
177
176
  const jumpBoxId = await getJumpBoxInstanceId();
@@ -190,7 +189,7 @@ function cloud2(buddy) {
190
189
  log3.info("Not implemented yet. Please use the --ssh (or --connect) flag to connect to the Stacks Cloud.");
191
190
  process4.exit(ExitCode4.Success);
192
191
  });
193
- buddy.command("cloud:add", descriptions.add).option("--jump-box", "Remove the jump-box", { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
192
+ buddy.command("cloud:add", descriptions.add).option("--jump-box", "Remove the jump-box", { default: false }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
194
193
  const startTime = await intro4("buddy cloud:add");
195
194
  if (options.jumpBox) {
196
195
  const { confirm } = await prompts({
@@ -220,7 +219,7 @@ function cloud2(buddy) {
220
219
  log3.info("This functionality is not yet implemented.");
221
220
  process4.exit(ExitCode4.Success);
222
221
  });
223
- buddy.command("cloud:remove", descriptions.remove).alias("cloud:destroy").alias("cloud:rm").alias("undeploy").option("--jump-box", "Remove the jump-box", { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
222
+ buddy.command("cloud:remove", descriptions.remove).alias("cloud:destroy").alias("cloud:rm").alias("undeploy").option("--jump-box", "Remove the jump-box", { default: false }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
224
223
  const startTime = await intro4("buddy cloud:remove");
225
224
  if (options.jumpBox) {
226
225
  const { confirm } = await prompts({
@@ -275,7 +274,7 @@ function cloud2(buddy) {
275
274
  process4.exit(ExitCode4.FatalError);
276
275
  }
277
276
  });
278
- buddy.command("cloud:optimize-cost", descriptions.optimizeCost).option("--jump-box", "Remove the jump-box", { default: true }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
277
+ buddy.command("cloud:optimize-cost", descriptions.optimizeCost).option("--jump-box", "Remove the jump-box", { default: true }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
279
278
  const startTime = await intro4("buddy cloud:remove");
280
279
  if (options.jumpBox) {
281
280
  const { confirm } = await prompts({
@@ -294,7 +293,7 @@ function cloud2(buddy) {
294
293
  await outro4("No cost optimization was applied", { startTime, useSeconds: true });
295
294
  process4.exit(ExitCode4.Success);
296
295
  });
297
- buddy.command("cloud:cleanup", descriptions.cleanUp).alias("cloud:clean-up").option("--verbose", descriptions.verbose, { default: false }).action(async () => {
296
+ buddy.command("cloud:cleanup", descriptions.cleanUp).alias("cloud:clean-up").option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async () => {
298
297
  const startTime = await intro4("buddy cloud:cleanup");
299
298
  log3.info(`Cleaning up your cloud resources will take a while to complete. Please be patient.`);
300
299
  await new Promise((resolve) => setTimeout(resolve, 2000));
@@ -359,9 +358,10 @@ import {runCommit} from "@stacksjs/actions";
359
358
  function commit(buddy) {
360
359
  const descriptions = {
361
360
  commit: "Commit your stashed changes",
361
+ project: "Target a specific project",
362
362
  verbose: "Enable verbose output"
363
363
  };
364
- buddy.command("commit", descriptions.commit).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
364
+ buddy.command("commit", descriptions.commit).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
365
365
  await runCommit(options);
366
366
  });
367
367
  buddy.on("commit:*", () => {
@@ -380,9 +380,10 @@ function configure(buddy) {
380
380
  const descriptions = {
381
381
  configure: "Configure options",
382
382
  aws: "Configure the AWS connection",
383
+ project: "Target a specific project",
383
384
  verbose: "Enable verbose output"
384
385
  };
385
- buddy.command("configure", descriptions.configure).option("--aws", descriptions.aws, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
386
+ buddy.command("configure", descriptions.configure).option("--aws", descriptions.aws, { default: false }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
386
387
  if (options?.aws) {
387
388
  const startTime = performance.now();
388
389
  const result = await runCommand2("aws configure", {
@@ -400,7 +401,7 @@ function configure(buddy) {
400
401
  log4.info("Not implemented yet. Please use the --aws flag to configure AWS.");
401
402
  process6.exit(ExitCode5.Success);
402
403
  });
403
- buddy.command("configure:aws", descriptions.aws).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
404
+ buddy.command("configure:aws", descriptions.aws).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
404
405
  const startTime = performance.now();
405
406
  const result = await runCommand2(`aws configure --profile ${config2.app.url}`, {
406
407
  ...options,
@@ -436,13 +437,14 @@ function create(buddy) {
436
437
  components: "Are you building UI components?",
437
438
  webComponents: "Automagically built optimized custom elements/web components?",
438
439
  vue: "Automagically built a Vue component library?",
439
- pages: "How about views/views?",
440
+ views: "How about views?",
440
441
  functions: "Are you developing functions/composables?",
441
442
  api: "Are you building an API?",
442
443
  database: "Do you need a database?",
444
+ project: "Target a specific project",
443
445
  verbose: "Enable verbose output"
444
446
  };
445
- buddy.command("new <name>", descriptions.command).option("-u, --ui", descriptions.ui, { default: true }).option("-c, --components", descriptions.components, { default: true }).option("-w, --web-components", descriptions.webComponents, { default: true }).option("-v, --vue", descriptions.vue, { default: true }).option("-p, --views", descriptions.pages, { default: true }).option("-f, --functions", descriptions.functions, { default: true }).option("-a, --api", descriptions.api, { default: true }).option("-d, --database", descriptions.database, { default: true }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
447
+ buddy.command("new <name>", descriptions.command).option("-u, --ui", descriptions.ui, { default: true }).option("-c, --components", descriptions.components, { default: true }).option("-w, --web-components", descriptions.webComponents, { default: true }).option("-v, --vue", descriptions.vue, { default: true }).option("-p, --views", descriptions.views, { default: true }).option("-f, --functions", descriptions.functions, { default: true }).option("-a, --api", descriptions.api, { default: true }).option("-d, --database", descriptions.database, { default: true }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
446
448
  const startTime = await intro5("stacks new");
447
449
  const name = options.name;
448
450
  const path5 = resolve(process7.cwd(), name);
@@ -485,13 +487,13 @@ var onlineCheck = function() {
485
487
  };
486
488
  async function download(name, path5, options) {
487
489
  log5.info("Setting up your stack.");
488
- const result = await runCommand3(`giget stacks ${name}`, options);
490
+ const result = await runCommand3(`bunx giget stacks ${name}`, options);
489
491
  log5.success(`Successfully scaffolded your project at ${cyan(path5)}`);
490
492
  return result;
491
493
  }
492
494
  async function ensureEnv(path5, options) {
493
495
  log5.info("Ensuring your environment is ready...");
494
- await runCommand3("tea -SE", { ...options, cwd: path5 });
496
+ await runCommand3("pkgx --update ", { ...options, cwd: path5 });
495
497
  log5.success("Environment is ready");
496
498
  }
497
499
  async function install(path5, options) {
@@ -526,9 +528,10 @@ import {addDomain, hasUserDomainBeenAddedToCloud} from "@stacksjs/dns";
526
528
  function deploy(buddy) {
527
529
  const descriptions = {
528
530
  deploy: "Reinstalls your npm dependencies",
531
+ project: "Target a specific project",
529
532
  verbose: "Enable verbose output"
530
533
  };
531
- buddy.command("deploy", descriptions.deploy).option("--domain", "Specify a domain to deploy to", { default: undefined }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
534
+ buddy.command("deploy", descriptions.deploy).option("--domain", "Specify a domain to deploy to", { default: undefined }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
532
535
  const startTime = await intro6("buddy deploy");
533
536
  const domain = options.domain || app.url;
534
537
  if (!domain) {
@@ -554,35 +557,34 @@ function deploy(buddy) {
554
557
  if (await hasUserDomainBeenAddedToCloud(domain)) {
555
558
  log6.success("Your domain is properly configured.");
556
559
  log6.info("Your cloud is deploying...");
557
- console.log(`\u23F3 ${italic2("This may take a while...")}`);
560
+ console.log(`${italic2("This may take a while...")}`);
558
561
  await new Promise((resolve2) => setTimeout(resolve2, 2000));
559
562
  options.domain = domain;
560
- } else {
561
- console.log("");
562
- log6.info(` \uD83D\uDC4B It appears to be your first ${italic2(domain)} deployment.`);
563
- console.log("");
564
- log6.info(italic2("Let\u2019s ensure it is all connected properly."));
565
- log6.info(italic2("One moment..."));
566
- console.log("");
567
- options.domain = domain;
568
- const result2 = await addDomain({
569
- ...options,
570
- deploy: true,
571
- startTime
572
- });
563
+ const result2 = await runAction5(Action5.Deploy, options);
573
564
  if (result2.isErr()) {
574
565
  await outro6("While running the `buddy deploy`, there was an issue", { startTime, useSeconds: true }, result2.error);
575
566
  process8.exit(ExitCode7.FatalError);
576
567
  }
577
- await outro6("Added your domain.", { startTime, useSeconds: true });
568
+ await outro6("Deployment succeeded.", { startTime, useSeconds: true });
578
569
  process8.exit(ExitCode7.Success);
579
570
  }
580
- const result = await runAction5(Action5.Deploy, options);
571
+ console.log("");
572
+ log6.info(` \uD83D\uDC4B It appears to be your first ${italic2(domain)} deployment.`);
573
+ console.log("");
574
+ log6.info(italic2("Let\u2019s ensure it is all connected properly."));
575
+ log6.info(italic2("One moment..."));
576
+ console.log("");
577
+ options.domain = domain;
578
+ const result = await addDomain({
579
+ ...options,
580
+ deploy: true,
581
+ startTime
582
+ });
581
583
  if (result.isErr()) {
582
584
  await outro6("While running the `buddy deploy`, there was an issue", { startTime, useSeconds: true }, result.error);
583
585
  process8.exit(ExitCode7.FatalError);
584
586
  }
585
- await outro6("Deployment succeeded.", { startTime, useSeconds: true });
587
+ await outro6("Added your domain.", { startTime, useSeconds: true });
586
588
  process8.exit(ExitCode7.Success);
587
589
  });
588
590
  buddy.on("deploy:*", () => {
@@ -594,10 +596,18 @@ function deploy(buddy) {
594
596
  // src/commands/dev.ts
595
597
  import process9 from "process";
596
598
  import {Action as Action6} from "@stacksjs/enums";
597
- import {runAction as runAction6, runApiDevServer, runComponentsDevServer, runDocsDevServer, runFrontendDevServer} from "@stacksjs/actions";
599
+ import {
600
+ runAction as runAction6,
601
+ runApiDevServer,
602
+ runComponentsDevServer,
603
+ runDashboardDevServer,
604
+ runDesktopDevServer,
605
+ runDocsDevServer,
606
+ runFrontendDevServer,
607
+ runSystemTrayDevServer
608
+ } from "@stacksjs/actions";
598
609
  import {ExitCode as ExitCode8} from "@stacksjs/types";
599
610
  import {intro as intro7, log as log7, outro as outro7, prompt as prompt2, runCommand as runCommand4} from "@stacksjs/cli";
600
- import {sleep} from "@stacksjs/utils";
601
611
  import {libsPath} from "@stacksjs/path";
602
612
  function dev(buddy) {
603
613
  const descriptions = {
@@ -609,14 +619,15 @@ function dev(buddy) {
609
619
  api: "Start the local API development server",
610
620
  email: "Start the Email development server",
611
621
  docs: "Start the Documentation development server",
622
+ systemTray: "Start the System Tray development server",
612
623
  interactive: "Get asked which development server to start",
613
624
  select: "Which development server are you trying to start?",
614
625
  withLocalhost: "Include the localhost URL in the output",
626
+ project: "Target a specific project",
615
627
  verbose: "Enable verbose output"
616
628
  };
617
- buddy.command("dev [server]", descriptions.dev).option("-f, --frontend", descriptions.frontend).option("-a, --api", descriptions.api).option("-e, --email", descriptions.email).option("-c, --components", descriptions.components).option("-d, --dashboard", descriptions.dashboard).option("-t, --desktop", descriptions.desktop).option("-d, --docs", descriptions.docs).option("-i, --interactive", descriptions.interactive, { default: false }).option("-l, --with-localhost", descriptions.withLocalhost, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (server, options) => {
629
+ buddy.command("dev [server]", descriptions.dev).option("-f, --frontend", descriptions.frontend).option("-a, --api", descriptions.api).option("-e, --email", descriptions.email).option("-c, --components", descriptions.components).option("-d, --dashboard", descriptions.dashboard).option("-t, --desktop", descriptions.desktop).option("-d, --docs", descriptions.docs).option("-t, --system-tray", descriptions.systemTray).option("-i, --interactive", descriptions.interactive, { default: false }).option("-l, --with-localhost", descriptions.withLocalhost, { default: false }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (server, options) => {
618
630
  const perf = await intro7("buddy dev");
619
- await sleep(100);
620
631
  switch (server) {
621
632
  case "frontend":
622
633
  await runFrontendDevServer(options);
@@ -627,9 +638,15 @@ function dev(buddy) {
627
638
  case "components":
628
639
  await runComponentsDevServer(options);
629
640
  break;
641
+ case "dashboard":
642
+ await runDashboardDevServer(options);
643
+ break;
630
644
  case "desktop":
631
645
  await runDesktopDevServer(options);
632
646
  break;
647
+ case "system-tray":
648
+ await runSystemTrayDevServer(options);
649
+ break;
633
650
  case "docs":
634
651
  await runDocsDevServer(options);
635
652
  break;
@@ -641,6 +658,7 @@ function dev(buddy) {
641
658
  { value: "all", label: "All" },
642
659
  { value: "frontend", label: "Frontend" },
643
660
  { value: "api", label: "Backend" },
661
+ { value: "dashboard", label: "Dashboard" },
644
662
  { value: "desktop", label: "Desktop" },
645
663
  { value: "email", label: "Email" },
646
664
  { value: "components", label: "Components" },
@@ -651,6 +669,8 @@ function dev(buddy) {
651
669
  await runComponentsDevServer(options);
652
670
  } else if (answer === "api") {
653
671
  await runApiDevServer(options);
672
+ } else if (answer === "dashboard") {
673
+ await runDashboardDevServer(options);
654
674
  } else if (answer === "docs") {
655
675
  await runDocsDevServer(options);
656
676
  } else {
@@ -669,7 +689,7 @@ function dev(buddy) {
669
689
  outro7("Exited", { startTime: perf, useSeconds: true });
670
690
  process9.exit(ExitCode8.Success);
671
691
  });
672
- buddy.command("dev:components", descriptions.components).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
692
+ buddy.command("dev:components", descriptions.components).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
673
693
  const perf = await intro7("buddy dev:components");
674
694
  const result = await runCommand4("bun run dev", {
675
695
  cwd: libsPath("components/vue")
@@ -684,7 +704,7 @@ function dev(buddy) {
684
704
  await outro7("Exited", { startTime: perf, useSeconds: true });
685
705
  process9.exit(ExitCode8.Success);
686
706
  });
687
- buddy.command("dev:docs", descriptions.docs).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
707
+ buddy.command("dev:docs", descriptions.docs).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
688
708
  const perf = await intro7("buddy dev:docs");
689
709
  const result = await runAction6(Action6.DevDocs, options);
690
710
  if (result.isErr()) {
@@ -695,7 +715,7 @@ function dev(buddy) {
695
715
  await outro7("Exited", { startTime: perf, useSeconds: true });
696
716
  process9.exit(ExitCode8.Success);
697
717
  });
698
- buddy.command("dev:desktop", descriptions.desktop).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
718
+ buddy.command("dev:desktop", descriptions.desktop).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
699
719
  const perf = await intro7("buddy dev:desktop");
700
720
  const result = await runAction6(Action6.DevDesktop, options);
701
721
  if (result.isErr()) {
@@ -706,12 +726,18 @@ function dev(buddy) {
706
726
  await outro7("Exited", { startTime: perf, useSeconds: true });
707
727
  process9.exit(ExitCode8.Success);
708
728
  });
709
- buddy.command("dev:api", descriptions.api).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
729
+ buddy.command("dev:api", descriptions.api).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
710
730
  await runApiDevServer(options);
711
- });
712
- buddy.command("dev:frontend", descriptions.frontend).alias("dev:pages").alias("dev:views").option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
731
+ }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false });
732
+ buddy.command("dev:frontend", descriptions.frontend).alias("dev:pages").alias("dev:views").option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
713
733
  await runFrontendDevServer(options);
714
734
  });
735
+ buddy.command("dev:dashboard", descriptions.dashboard).alias("dev:admin").option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
736
+ await runDashboardDevServer(options);
737
+ });
738
+ buddy.command("dev:system-tray", descriptions.systemTray).alias("dev:tray").option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
739
+ await runSystemTrayDevServer(options);
740
+ });
715
741
  buddy.on("dev:*", () => {
716
742
  console.error("Invalid command: %s\nSee --help for a list of available commands.", buddy.args.join(" "));
717
743
  process9.exit(1);
@@ -742,10 +768,11 @@ function domains(buddy) {
742
768
  add: "Add a domain to your cloud",
743
769
  remove: "Remove a domain from your cloud",
744
770
  skip: "Skip the confirmation prompt",
771
+ project: "Target a specific project",
745
772
  verbose: "Enable verbose output"
746
773
  };
747
774
  const c = config5.dns.contactInfo;
748
- buddy.command("domains:purchase <domain>", descriptions.purchase).option("--years <years>", "Number of years to purchase the domain for", { default: 1 }).option("--privacy", "Enable privacy protection", { default: true }).option("--auto-renew", "Enable auto-renew", { default: true }).option("--first-name <firstName>", "Registrant first name", { default: c?.firstName }).option("--last-name <lastName>", "Registrant last name", { default: c?.lastName }).option("--organization <organization>", "Registrant organization name", { default: c?.organizationName }).option("--address-line1 <address>", "Registrant address line 1", { default: c?.addressLine1 }).option("--address-line2 <address>", "Registrant address line 2", { default: c?.addressLine2 }).option("--city <city>", "Registrant city", { default: c?.city }).option("--state <state>", "Registrant state", { default: c?.state }).option("--country <country>", "Registrant country code", { default: c?.countryCode }).option("--zip <zip>", "Registrant zip", { default: c?.zip }).option("--phone <phone>", "Registrant phone", { default: c?.phoneNumber }).option("--email <email>", "Registrant email", { default: c?.email }).option("--admin-first-name <firstName>", "Admin first name", { default: c?.admin?.firstName || c?.firstName }).option("--admin-last-name <lastName>", "Admin last name", { default: c?.admin?.lastName || c?.lastName }).option("--admin-organization <organization>", "Admin organization", { default: c?.admin?.organizationName || c?.organizationName }).option("--admin-address-line1 <address>", "Admin address line 1", { default: c?.admin?.addressLine1 || c?.addressLine1 }).option("--admin-address-line2 <address>", "Admin address line 2", { default: c?.admin?.addressLine2 || c?.addressLine2 }).option("--admin-city <city>", "Admin city", { default: c?.admin?.city || c?.city }).option("--admin-state <state>", "Admin state", { default: c?.admin?.state || c?.state }).option("--admin-country <country>", "Admin country code", { default: c?.admin?.countryCode || c?.countryCode }).option("--admin-zip <zip>", "Admin zip", { default: c?.admin?.zip || c?.zip }).option("--admin-phone <phone>", "Admin phone number", { default: c?.admin?.phoneNumber || c?.phoneNumber }).option("--admin-email <email>", "Admin email", { default: c?.admin?.email || c?.email }).option("--tech-first-name <firstName>", "Tech first name", { default: c?.tech?.firstName || c?.firstName }).option("--tech-last-name <lastName>", "Tech last name", { default: c?.tech?.lastName || c?.lastName }).option("--tech-organization <organization>", "Tech organization name", { default: c?.tech?.organizationName || c?.organizationName }).option("--tech-address-line1 <address>", "Tech address line 1", { default: c?.tech?.addressLine1 || c?.addressLine1 }).option("--tech-address-line2 <address>", "Tech address line 2", { default: c?.tech?.addressLine2 || c?.addressLine2 }).option("--tech-city <city>", "Tech city", { default: c?.tech?.city || c?.city }).option("--tech-state <state>", "Tech state", { default: c?.tech?.state || c?.state }).option("--tech-country <country>", "Tech country", { default: c?.tech?.countryCode || c?.countryCode }).option("--tech-zip <zip>", "Tech zip", { default: c?.tech?.zip || c?.zip }).option("--tech-phone <phone>", "Tech phone", { default: c?.tech?.phoneNumber || c?.phoneNumber }).option("--tech-email <email>", "Tech email", { default: c?.tech?.email || c?.email }).option("--privacy-admin", "Enable privacy protection for admin", { default: c?.privacyAdmin || c?.privacy || true }).option("--privacy-tech", "Enable privacy protection for tech", { default: c?.privacyTech || c?.privacy || true }).option("--privacy-registrant", "Enable privacy protection for registrant", { default: c?.privacyRegistrant || c?.privacy || true }).option("--contact-type <type>", "Contact type", { default: "person" }).option("--verbose", descriptions.verbose, { default: false }).action(async (domain, options) => {
775
+ buddy.command("domains:purchase <domain>", descriptions.purchase).option("--years <years>", "Number of years to purchase the domain for", { default: 1 }).option("--privacy", "Enable privacy protection", { default: true }).option("--auto-renew", "Enable auto-renew", { default: true }).option("--first-name <firstName>", "Registrant first name", { default: c?.firstName }).option("--last-name <lastName>", "Registrant last name", { default: c?.lastName }).option("--organization <organization>", "Registrant organization name", { default: c?.organizationName }).option("--address-line1 <address>", "Registrant address line 1", { default: c?.addressLine1 }).option("--address-line2 <address>", "Registrant address line 2", { default: c?.addressLine2 }).option("--city <city>", "Registrant city", { default: c?.city }).option("--state <state>", "Registrant state", { default: c?.state }).option("--country <country>", "Registrant country code", { default: c?.countryCode }).option("--zip <zip>", "Registrant zip", { default: c?.zip }).option("--phone <phone>", "Registrant phone", { default: c?.phoneNumber }).option("--email <email>", "Registrant email", { default: c?.email }).option("--admin-first-name <firstName>", "Admin first name", { default: c?.admin?.firstName || c?.firstName }).option("--admin-last-name <lastName>", "Admin last name", { default: c?.admin?.lastName || c?.lastName }).option("--admin-organization <organization>", "Admin organization", { default: c?.admin?.organizationName || c?.organizationName }).option("--admin-address-line1 <address>", "Admin address line 1", { default: c?.admin?.addressLine1 || c?.addressLine1 }).option("--admin-address-line2 <address>", "Admin address line 2", { default: c?.admin?.addressLine2 || c?.addressLine2 }).option("--admin-city <city>", "Admin city", { default: c?.admin?.city || c?.city }).option("--admin-state <state>", "Admin state", { default: c?.admin?.state || c?.state }).option("--admin-country <country>", "Admin country code", { default: c?.admin?.countryCode || c?.countryCode }).option("--admin-zip <zip>", "Admin zip", { default: c?.admin?.zip || c?.zip }).option("--admin-phone <phone>", "Admin phone number", { default: c?.admin?.phoneNumber || c?.phoneNumber }).option("--admin-email <email>", "Admin email", { default: c?.admin?.email || c?.email }).option("--tech-first-name <firstName>", "Tech first name", { default: c?.tech?.firstName || c?.firstName }).option("--tech-last-name <lastName>", "Tech last name", { default: c?.tech?.lastName || c?.lastName }).option("--tech-organization <organization>", "Tech organization name", { default: c?.tech?.organizationName || c?.organizationName }).option("--tech-address-line1 <address>", "Tech address line 1", { default: c?.tech?.addressLine1 || c?.addressLine1 }).option("--tech-address-line2 <address>", "Tech address line 2", { default: c?.tech?.addressLine2 || c?.addressLine2 }).option("--tech-city <city>", "Tech city", { default: c?.tech?.city || c?.city }).option("--tech-state <state>", "Tech state", { default: c?.tech?.state || c?.state }).option("--tech-country <country>", "Tech country", { default: c?.tech?.countryCode || c?.countryCode }).option("--tech-zip <zip>", "Tech zip", { default: c?.tech?.zip || c?.zip }).option("--tech-phone <phone>", "Tech phone", { default: c?.tech?.phoneNumber || c?.phoneNumber }).option("--tech-email <email>", "Tech email", { default: c?.tech?.email || c?.email }).option("--privacy-admin", "Enable privacy protection for admin", { default: c?.privacyAdmin || c?.privacy || true }).option("--privacy-tech", "Enable privacy protection for tech", { default: c?.privacyTech || c?.privacy || true }).option("--privacy-registrant", "Enable privacy protection for registrant", { default: c?.privacyRegistrant || c?.privacy || true }).option("--contact-type <type>", "Contact type", { default: "person" }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (domain, options) => {
749
776
  options.domain = domain;
750
777
  const startTime = await intro8("buddy domains:purchase");
751
778
  const result = await runAction7(Action7.DomainsPurchase, options);
@@ -834,9 +861,10 @@ function dns3(buddy) {
834
861
  short: "Short mode: display nothing but the first result",
835
862
  json: "Display the output as JSON",
836
863
  pretty: "Display the output as JSON in a pretty format",
864
+ project: "Target a specific project",
837
865
  verbose: "Enable verbose output"
838
866
  };
839
- buddy.command("dns [domain]", descriptions.dns).option("-q, --query <query>", descriptions.query).option("-t, --type <type>", descriptions.type, { default: "ANY" }).option("-n, --nameserver <nameserver>", descriptions.nameserver).option("--class <class>", descriptions.nameserver).option("-U, --udp", descriptions.udp).option("-T, --tcp", descriptions.tcp).option("-S, --tls", descriptions.tls).option("-H, --https", descriptions.https).option("-1, --short", descriptions.short, { default: false }).option("-J, --json", descriptions.json, { default: false }).option("-p, --pretty", descriptions.pretty, { default: true }).option("--verbose", descriptions.verbose, { default: false }).action(async (domain, options) => {
867
+ buddy.command("dns [domain]", descriptions.dns).option("-q, --query <query>", descriptions.query).option("-t, --type <type>", descriptions.type, { default: "ANY" }).option("-n, --nameserver <nameserver>", descriptions.nameserver).option("--class <class>", descriptions.nameserver).option("-U, --udp", descriptions.udp).option("-T, --tcp", descriptions.tcp).option("-S, --tls", descriptions.tls).option("-H, --https", descriptions.https).option("-1, --short", descriptions.short, { default: false }).option("-J, --json", descriptions.json, { default: false }).option("-p, --pretty", descriptions.pretty, { default: true }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (domain, options) => {
840
868
  delete options.pretty;
841
869
  delete options.p;
842
870
  const optionsString = Object.entries(options).filter(([key, value]) => key !== "--" && key.length > 1 && value !== false).map(([key, value]) => `--${key} ${value}`).join(" ");
@@ -856,16 +884,17 @@ function example(buddy) {
856
884
  vue: "Test your Vue component library",
857
885
  webComponents: "Test your web component library",
858
886
  select: "Which example are you trying to view?",
887
+ project: "Target a specific project",
859
888
  verbose: "Enable verbose output"
860
889
  };
861
- buddy.command("example", descriptions.example).option("-c, --components", descriptions.components).option("-v, --vue", descriptions.vue).option("-w, --web-components", descriptions.webComponents).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
890
+ buddy.command("example", descriptions.example).option("-c, --components", descriptions.components).option("-v, --vue", descriptions.vue).option("-w, --web-components", descriptions.webComponents).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
862
891
  await runExample(options);
863
892
  process12.exit(ExitCode11.Success);
864
893
  });
865
- buddy.command("example:vue", descriptions.vue).option("-v, --vue", descriptions.verbose, { default: true }).option("--verbose", descriptions.verbose, { default: false }).alias("example:components").action(async (options) => {
894
+ buddy.command("example:vue", descriptions.vue).option("-v, --vue", descriptions.verbose, { default: true }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).alias("example:components").action(async (options) => {
866
895
  await runExample(options);
867
896
  });
868
- buddy.command("example:web-components", "Test your Web Component library.").option("-w, --web-components", descriptions.verbose, { default: true }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
897
+ buddy.command("example:web-components", "Test your Web Component library.").option("-w, --web-components", descriptions.verbose, { default: true }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
869
898
  await runExample(options);
870
899
  });
871
900
  buddy.on("example:*", () => {
@@ -883,9 +912,10 @@ import {Action as Action8} from "@stacksjs/enums";
883
912
  function fresh(buddy) {
884
913
  const descriptions = {
885
914
  fresh: "Reinstalls your npm dependencies",
915
+ project: "Target a specific project",
886
916
  verbose: "Enable verbose output"
887
917
  };
888
- buddy.command("fresh", descriptions.fresh).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
918
+ buddy.command("fresh", descriptions.fresh).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
889
919
  const perf = await intro9("buddy fresh");
890
920
  const result = await runAction8(Action8.Fresh, { ...options, stdout: "inherit" });
891
921
  if (result.isErr()) {
@@ -926,11 +956,12 @@ function generate(buddy) {
926
956
  customData: "Generate VS Code custom data (custom-elements.json) for IDEs",
927
957
  ideHelpers: "Generate IDE helpers",
928
958
  componentMeta: "Generate component meta information",
929
- tea: "Generate the Tea configuration file",
959
+ pkgx: "Generate the pkgx configuration file",
930
960
  select: "What are you trying to generate?",
961
+ project: "Target a specific project",
931
962
  verbose: "Enable verbose output"
932
963
  };
933
- buddy.command("generate", descriptions.command).option("-t, --types", descriptions.types).option("-e, --entries", descriptions.entries).option("-w, --web-types", descriptions.webTypes).option("-c, --custom-data", descriptions.customData).option("-i, --ide-helpers", descriptions.ideHelpers).option("-c, --component-meta", descriptions.componentMeta).option("-tc, --tea-config", descriptions.tea).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
964
+ buddy.command("generate", descriptions.command).option("-t, --types", descriptions.types).option("-e, --entries", descriptions.entries).option("-w, --web-types", descriptions.webTypes).option("-c, --custom-data", descriptions.customData).option("-i, --ide-helpers", descriptions.ideHelpers).option("-c, --component-meta", descriptions.componentMeta).option("-p, --pkgx", descriptions.pkgx).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
934
965
  if (hasNoOptions2(options)) {
935
966
  let answers = await prompt3.require().multiselect(descriptions.select, {
936
967
  options: [
@@ -949,25 +980,25 @@ function generate(buddy) {
949
980
  await startGenerationProcess(options);
950
981
  process14.exit(ExitCode13.Success);
951
982
  });
952
- buddy.command("generate:types", descriptions.types).option("--verbose", descriptions.verbose, { default: false }).alias("types:generate").action(async (options) => {
983
+ buddy.command("generate:types", descriptions.types).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).alias("types:generate").action(async (options) => {
953
984
  await generateTypes(options);
954
985
  });
955
- buddy.command("generate:entries", descriptions.entries).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
986
+ buddy.command("generate:entries", descriptions.entries).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
956
987
  await generateLibEntries(options);
957
988
  });
958
- buddy.command("generate:web-types", descriptions.webTypes).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
989
+ buddy.command("generate:web-types", descriptions.webTypes).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
959
990
  await generateWebTypes(options);
960
991
  });
961
- buddy.command("generate:vscode-custom-data", descriptions.customData).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
992
+ buddy.command("generate:vscode-custom-data", descriptions.customData).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
962
993
  await generateVsCodeCustomData(options);
963
994
  });
964
- buddy.command("generate:ide-helpers", descriptions.ideHelpers).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
995
+ buddy.command("generate:ide-helpers", descriptions.ideHelpers).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
965
996
  await generateIdeHelpers(options);
966
997
  });
967
- buddy.command("generate:component-meta", descriptions.componentMeta).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
998
+ buddy.command("generate:component-meta", descriptions.componentMeta).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
968
999
  await generateComponentMeta(options);
969
1000
  });
970
- buddy.command("generate:tea-config", descriptions.tea).option("--verbose", descriptions.verbose, { default: false }).action(() => {
1001
+ buddy.command("generate:pkgx-config", descriptions.pkgx).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(() => {
971
1002
  generatePkgxConfig();
972
1003
  });
973
1004
  buddy.command("generate:migrations", "Generate Migrations").action(() => {
@@ -990,9 +1021,10 @@ import {runCommandSync as runCommandSync2} from "@stacksjs/cli";
990
1021
  function http(buddy) {
991
1022
  const descriptions = {
992
1023
  http: "Send an HTTP request to a domain",
1024
+ project: "Target a specific project",
993
1025
  verbose: "Enable verbose output"
994
1026
  };
995
- buddy.command("http [domain]", descriptions.http).action(async (domain, options) => {
1027
+ buddy.command("http [domain]", descriptions.http).option("-p, --project", descriptions.project, { default: false }).action(async (domain, options) => {
996
1028
  const optionsString = Object.entries(options).filter(([key, value]) => key !== "--" && key.length > 1 && value !== false).map(([key, value]) => `--${key} ${value}`).join(" ");
997
1029
  const command = `http GET ${domain || config9.app.url} ${optionsString}`;
998
1030
  console.log(`Running command: ${command}`);
@@ -1010,9 +1042,10 @@ function lint(buddy) {
1010
1042
  const descriptions = {
1011
1043
  lint: "Automagically lints your project codebase",
1012
1044
  lintFix: "Automagically fixes all lint errors",
1045
+ project: "Target a specific project",
1013
1046
  verbose: "Enable verbose output"
1014
1047
  };
1015
- buddy.command("lint", descriptions.lint).option("-f, --fix", descriptions.lintFix, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1048
+ buddy.command("lint", descriptions.lint).option("-f, --fix", descriptions.lintFix, { default: false }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1016
1049
  const startTime = await intro10("buddy lint");
1017
1050
  const result = await runAction9(Action9.Lint, { ...options });
1018
1051
  if (result.isErr()) {
@@ -1021,7 +1054,7 @@ function lint(buddy) {
1021
1054
  }
1022
1055
  await outro10("Linted your project", { startTime, useSeconds: true });
1023
1056
  });
1024
- buddy.command("lint:fix", descriptions.lintFix).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1057
+ buddy.command("lint:fix", descriptions.lintFix).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1025
1058
  log8.info("Fixing lint errors...");
1026
1059
  const result = await runAction9(Action9.LintFix, { ...options });
1027
1060
  if (result.isErr()) {
@@ -1062,9 +1095,10 @@ import {path as p3} from "@stacksjs/path";
1062
1095
  function install2(buddy) {
1063
1096
  const descriptions = {
1064
1097
  install: "Install your dependencies",
1098
+ project: "Target a specific project",
1065
1099
  verbose: "Enable verbose output"
1066
1100
  };
1067
- buddy.command("install", descriptions.install).option("-v, --verbose", descriptions.verbose, { default: false }).action(async (options) => {
1101
+ buddy.command("install", descriptions.install).option("-p, --project", descriptions.project, { default: false }).option("-v, --verbose", descriptions.verbose, { default: false }).action(async (options) => {
1068
1102
  await runCommand6("bun install", {
1069
1103
  ...options,
1070
1104
  cwd: p3.projectPath()
@@ -1084,16 +1118,17 @@ import {runAction as runAction11} from "@stacksjs/actions";
1084
1118
  function key(buddy) {
1085
1119
  const descriptions = {
1086
1120
  command: "Generate & set the application key.",
1121
+ project: "Target a specific project",
1087
1122
  verbose: "Enable verbose output"
1088
1123
  };
1089
- buddy.command("key:generate", descriptions.command).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1090
- const startTime = await intro12("buddy key:generate");
1124
+ buddy.command("key:generate", descriptions.command).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1125
+ await intro12("buddy key:generate");
1091
1126
  const result = await runAction11(Action11.KeyGenerate, options);
1092
1127
  if (result.isErr()) {
1093
1128
  log9.error("Failed to set random application key.", result.error);
1094
1129
  process19.exit();
1095
1130
  }
1096
- await outro12("Random application key set.", { startTime });
1131
+ await outro12("Random application key set.");
1097
1132
  });
1098
1133
  buddy.on("key:*", () => {
1099
1134
  console.error("Invalid command: %s\nSee --help for a list of available commands.", buddy.args.join(" "));
@@ -1131,9 +1166,10 @@ function make(buddy) {
1131
1166
  notification: "Create a new notification",
1132
1167
  stack: "Create a new new stack",
1133
1168
  select: "What are you trying to make?",
1169
+ project: "Target a specific project",
1134
1170
  verbose: "Enable verbose output"
1135
1171
  };
1136
- buddy.command("make", "The make command").option("-c, --component", descriptions.component, { default: false }).option("-p, --page", descriptions.page, { default: false }).option("-f, --function", descriptions.function, { default: false }).option("-l, --language", descriptions.language, { default: false }).option("-d, --database", descriptions.database, { default: false }).option("-m, --migration", descriptions.migration, { default: false }).option("-f, --factory", descriptions.factory, { default: false }).option("-n, --notification", descriptions.notification, { default: false }).option("-s, --stack", descriptions.stack, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1172
+ buddy.command("make", "The make command").option("-c, --component", descriptions.component, { default: false }).option("-p, --page", descriptions.page, { default: false }).option("-f, --function", descriptions.function, { default: false }).option("-l, --language", descriptions.language, { default: false }).option("-d, --database", descriptions.database, { default: false }).option("-m, --migration", descriptions.migration, { default: false }).option("-f, --factory", descriptions.factory, { default: false }).option("-n, --notification", descriptions.notification, { default: false }).option("-s, --stack", descriptions.stack, { default: false }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1137
1173
  const name = buddy.args[0];
1138
1174
  if (!name) {
1139
1175
  log10.error("You need to specify a name. Read more about the documentation here.");
@@ -1162,7 +1198,7 @@ function make(buddy) {
1162
1198
  await invoke(options);
1163
1199
  process20.exit(ExitCode16.Success);
1164
1200
  });
1165
- buddy.command("make:component", descriptions.component).option("-n, --name", "The name of the component").option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1201
+ buddy.command("make:component", descriptions.component).option("-n, --name", "The name of the component").option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1166
1202
  const name = buddy.args[0] || options.name;
1167
1203
  options.name = name;
1168
1204
  if (!name) {
@@ -1171,7 +1207,7 @@ function make(buddy) {
1171
1207
  }
1172
1208
  await makeComponent(options);
1173
1209
  });
1174
- buddy.command("make:database", descriptions.database).option("-n, --name", "The name of the database").option("--verbose", descriptions.verbose, { default: false }).action((options) => {
1210
+ buddy.command("make:database", descriptions.database).option("-n, --name", "The name of the database").option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action((options) => {
1175
1211
  const name = buddy.args[0] || options.name;
1176
1212
  options.name = name;
1177
1213
  if (!name) {
@@ -1180,7 +1216,7 @@ function make(buddy) {
1180
1216
  }
1181
1217
  makeDatabase(options);
1182
1218
  });
1183
- buddy.command("make:factory", descriptions.factory).option("-n, --name", "The name of the factory").option("--verbose", descriptions.verbose, { default: false }).action((options) => {
1219
+ buddy.command("make:factory", descriptions.factory).option("-n, --name", "The name of the factory").option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action((options) => {
1184
1220
  const name = buddy.args[0] || options.name;
1185
1221
  options.name = name;
1186
1222
  if (!name) {
@@ -1188,7 +1224,7 @@ function make(buddy) {
1188
1224
  process20.exit();
1189
1225
  }
1190
1226
  });
1191
- buddy.command("make:view", descriptions.page).alias("make:page").option("-n, --name", "The name of the page").option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1227
+ buddy.command("make:view", descriptions.page).alias("make:page").option("-n, --name", "The name of the page").option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1192
1228
  const name = buddy.args[0] || options.name;
1193
1229
  options.name = name;
1194
1230
  if (!name) {
@@ -1197,10 +1233,10 @@ function make(buddy) {
1197
1233
  }
1198
1234
  await makePage(options);
1199
1235
  });
1200
- buddy.command("make:function", descriptions.function).option("-n, --name", "The name of the function").option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1236
+ buddy.command("make:function", descriptions.function).option("-n, --name", "The name of the function").option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1201
1237
  await makeFunction(options);
1202
1238
  });
1203
- buddy.command("make:lang", descriptions.language).option("-n, --name", "The name of the language").option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1239
+ buddy.command("make:lang", descriptions.language).option("-n, --name", "The name of the language").option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1204
1240
  const name = buddy.args[0] || options.name;
1205
1241
  options.name = name;
1206
1242
  if (!name) {
@@ -1209,7 +1245,7 @@ function make(buddy) {
1209
1245
  }
1210
1246
  await makeLanguage(options);
1211
1247
  });
1212
- buddy.command("make:notification", descriptions.notification).option("-n, --name", "The name of the notification").option("-e, --email", "Is it an email notification?", { default: true }).option("-c, --chat", "Is it a chat notification?", { default: false }).option("-s, --sms", "Is it a SMS notification?", { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1248
+ buddy.command("make:notification", descriptions.notification).option("-n, --name", "The name of the notification").option("-e, --email", "Is it an email notification?", { default: true }).option("-c, --chat", "Is it a chat notification?", { default: false }).option("-s, --sms", "Is it a SMS notification?", { default: false }).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1213
1249
  const perf = await intro13("buddy make:notification");
1214
1250
  const name = buddy.args[0] || options.name;
1215
1251
  options.name = name;
@@ -1225,7 +1261,7 @@ function make(buddy) {
1225
1261
  await outro13(`Created your ${italic4(name)} notification.`, { startTime: perf, useSeconds: true });
1226
1262
  process20.exit(ExitCode16.Success);
1227
1263
  });
1228
- buddy.command("make:stack", descriptions.stack).option("-n, --name", "The name of the stack").option("--verbose", descriptions.verbose, { default: false }).action((options) => {
1264
+ buddy.command("make:stack", descriptions.stack).option("-n, --name", "The name of the stack").option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action((options) => {
1229
1265
  const name = buddy.args[0] || options.name;
1230
1266
  options.name = name;
1231
1267
  if (!name) {
@@ -1258,7 +1294,7 @@ function make(buddy) {
1258
1294
  });
1259
1295
  }
1260
1296
  var hasNoOptions3 = function(options) {
1261
- return !options.component && !options.page && !options.function && !options.language && !options.database && !options.migration && !options.factory && !options.notification && !options.stack;
1297
+ return !options.component && !options.page && !options.function && !options.language && !options.database && !options.migration && !options.notification && !options.stack;
1262
1298
  };
1263
1299
 
1264
1300
  // src/commands/migrate.ts
@@ -1271,9 +1307,10 @@ function migrate(buddy) {
1271
1307
  const descriptions = {
1272
1308
  migrate: "Migrates your database",
1273
1309
  dns: "Writes the DNS records for a domain to ./config/dns.ts",
1310
+ project: "Target a specific project",
1274
1311
  verbose: "Enable verbose output"
1275
1312
  };
1276
- buddy.command("migrate", descriptions.migrate).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1313
+ buddy.command("migrate", descriptions.migrate).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1277
1314
  const perf = await intro14("buddy migrate");
1278
1315
  const result = await runAction12(Action12.Migrate, { ...options });
1279
1316
  if (result.isErr()) {
@@ -1284,7 +1321,7 @@ function migrate(buddy) {
1284
1321
  await outro14(`Migrated your ${APP_ENV} database.`, { startTime: perf, useSeconds: true });
1285
1322
  process21.exit(ExitCode17.Success);
1286
1323
  });
1287
- buddy.command("migrate:dns", descriptions.migrate).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1324
+ buddy.command("migrate:dns", descriptions.migrate).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1288
1325
  const perf = await intro14("buddy migrate");
1289
1326
  const result = await runAction12(Action12.MigrateDns, { ...options });
1290
1327
  if (result.isErr()) {
@@ -1308,9 +1345,10 @@ import {runAction as runAction13} from "@stacksjs/actions";
1308
1345
  function prepublish(buddy) {
1309
1346
  const descriptions = {
1310
1347
  command: "Run your prepublish script",
1348
+ project: "Target a specific project",
1311
1349
  verbose: "Enable verbose output"
1312
1350
  };
1313
- buddy.command("prepublish", descriptions.command).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1351
+ buddy.command("prepublish", descriptions.command).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1314
1352
  await runAction13(Action13.Prepublish, options);
1315
1353
  });
1316
1354
  buddy.on("prepublish:*", () => {
@@ -1326,7 +1364,7 @@ import {ExitCode as ExitCode18} from "@stacksjs/types";
1326
1364
  import {intro as intro15, log as log11, outro as outro15} from "@stacksjs/cli";
1327
1365
  import {runAction as runAction14} from "@stacksjs/actions";
1328
1366
  function release(buddy) {
1329
- buddy.command("release", descriptions.release).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1367
+ buddy.command("release", descriptions.release).option("-p, --project", descriptions.project, { default: false }).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
1330
1368
  const startTime = await intro15("buddy release");
1331
1369
  const result = await runAction14(Action14.Release, { ...options, stdin: "inherit" });
1332
1370
  if (result.isErr()) {
@@ -1342,6 +1380,7 @@ function release(buddy) {
1342
1380
  }
1343
1381
  var descriptions = {
1344
1382
  release: "Release a new version of your libraries/packages",
1383
+ project: "Target a specific project",
1345
1384
  verbose: "Enable verbose output"
1346
1385
  };
1347
1386
 
@@ -1354,9 +1393,10 @@ import {Action as Action15} from "@stacksjs/enums";
1354
1393
  function seed(buddy) {
1355
1394
  const descriptions2 = {
1356
1395
  seed: "Seed your database",
1396
+ project: "Target a specific project",
1357
1397
  verbose: "Enable verbose output"
1358
1398
  };
1359
- buddy.command("seed", descriptions2.seed).option("--verbose", descriptions2.verbose, { default: false }).action(async (options) => {
1399
+ buddy.command("seed", descriptions2.seed).option("-p, --project", descriptions2.project, { default: false }).option("--verbose", descriptions2.verbose, { default: false }).action(async (options) => {
1360
1400
  const perf = await intro16("buddy seed");
1361
1401
  const result = await runAction15(Action15.Seed, options);
1362
1402
  if (result.isErr()) {
@@ -1377,19 +1417,19 @@ function seed(buddy) {
1377
1417
  import process25 from "process";
1378
1418
  import {path as p4} from "@stacksjs/path";
1379
1419
  import {handleError} from "@stacksjs/error-handling";
1420
+ import {storage as storage3} from "@stacksjs/storage";
1380
1421
  import {log as log12, runCommand as runCommand7} from "@stacksjs/cli";
1381
1422
  import {ExitCode as ExitCode20} from "@stacksjs/types";
1382
1423
  function setup(buddy) {
1383
1424
  const descriptions2 = {
1384
- ensure: "This command ensures your project is setup correctly",
1385
- setup: "This command sets up your project for the first time",
1425
+ setup: "This command ensures your project is setup correctly",
1426
+ project: "Target a specific project",
1386
1427
  verbose: "Enable verbose output"
1387
1428
  };
1388
- buddy.command("setup", descriptions2.setup).alias("ensure").option("--verbose", descriptions2.verbose, { default: false }).action(async (options) => {
1389
- if (await ensurePkgxIsInstalled())
1390
- await optimizePkgxDeps();
1391
- else
1429
+ buddy.command("setup", descriptions2.setup).alias("ensure").option("-p, --project", descriptions2.project, { default: false }).option("--verbose", descriptions2.verbose, { default: false }).action(async (options) => {
1430
+ if (!await isPkgxInstalled())
1392
1431
  await installPkgx();
1432
+ await optimizePkgxDeps();
1393
1433
  await initializeProject(options);
1394
1434
  });
1395
1435
  buddy.on("setup:*", () => {
@@ -1397,22 +1437,21 @@ function setup(buddy) {
1397
1437
  process25.exit(ExitCode20.FatalError);
1398
1438
  });
1399
1439
  }
1400
- async function ensurePkgxIsInstalled() {
1440
+ async function isPkgxInstalled() {
1401
1441
  const result = await runCommand7("pkgx --version", { silent: true });
1402
1442
  if (result.isOk())
1403
1443
  return true;
1404
1444
  return false;
1405
1445
  }
1406
1446
  async function installPkgx() {
1407
- const result = await runCommand7("./scripts/setup");
1447
+ const result = await runCommand7(p4.frameworkPath("scripts/pkgx-install"));
1408
1448
  if (result.isOk())
1409
1449
  return;
1410
1450
  handleError(result.error);
1411
1451
  process25.exit(ExitCode20.FatalError);
1412
1452
  }
1413
1453
  async function initializeProject(options) {
1414
- log12.info("\u23F3 Installing node_modules...");
1415
- await new Promise((resolve2) => setTimeout(resolve2, 1500));
1454
+ log12.info("Installing dependencies...");
1416
1455
  const result = await runCommand7("bun install", {
1417
1456
  cwd: options.cwd || p4.projectPath()
1418
1457
  });
@@ -1421,16 +1460,19 @@ async function initializeProject(options) {
1421
1460
  process25.exit(ExitCode20.FatalError);
1422
1461
  }
1423
1462
  log12.success("Installed node_modules");
1424
- log12.info("\u23F3 Ensuring .env exists...");
1425
- const envResult = await runCommand7("cp .env.example .env", {
1426
- cwd: options.cwd || p4.projectPath()
1427
- });
1428
- if (envResult.isErr()) {
1429
- handleError(envResult.error);
1430
- process25.exit(ExitCode20.FatalError);
1463
+ log12.info("Ensuring .env exists...");
1464
+ if (storage3.doesNotExist(p4.projectPath(".env"))) {
1465
+ const envResult = await runCommand7("cp .env.example .env", {
1466
+ cwd: options.cwd || p4.projectPath()
1467
+ });
1468
+ if (envResult.isErr()) {
1469
+ handleError(envResult.error);
1470
+ process25.exit(ExitCode20.FatalError);
1471
+ }
1472
+ log12.success(".env created");
1473
+ } else {
1474
+ log12.success(".env existed");
1431
1475
  }
1432
- log12.success(".env exists");
1433
- log12.info("\u23F3 Generating application key...");
1434
1476
  const keyResult = await runCommand7("buddy key:generate", {
1435
1477
  cwd: options.cwd || p4.projectPath()
1436
1478
  });
@@ -1438,20 +1480,10 @@ async function initializeProject(options) {
1438
1480
  handleError(keyResult.error);
1439
1481
  process25.exit(ExitCode20.FatalError);
1440
1482
  }
1441
- log12.success("Generated application key");
1442
- log12.info("\u23F3 Ensuring AWS is connected...");
1443
- const awsResult = await runCommand7("buddy configure:aws", {
1444
- cwd: options.cwd || p4.projectPath()
1445
- });
1446
- if (awsResult.isErr()) {
1447
- handleError(awsResult.error);
1448
- process25.exit(ExitCode20.FatalError);
1449
- }
1483
+ log12.info("Ensuring AWS is connected...");
1450
1484
  log12.success("Configured AWS");
1451
- await new Promise((resolve2) => setTimeout(resolve2, 300));
1452
1485
  log12.success("Project is setup");
1453
- await new Promise((resolve2) => setTimeout(resolve2, 300));
1454
- log12.info("\uD83C\uDF89 Happy coding!");
1486
+ log12.info("Happy coding! \uD83D\uDC99");
1455
1487
  }
1456
1488
  async function optimizePkgxDeps() {
1457
1489
  return new Promise((resolve2) => setTimeout(resolve2, 300));
@@ -1472,9 +1504,10 @@ function test(buddy) {
1472
1504
  unit: "Runs your unit tests",
1473
1505
  feature: "Runs your feature tests",
1474
1506
  showReport: "Show the test report",
1507
+ project: "Target a specific project",
1475
1508
  verbose: "Enable verbose output"
1476
1509
  };
1477
- buddy.command("test", descriptions2.command).option("--ui", descriptions2.ui, { default: false }).option("--verbose", descriptions2.verbose, { default: true }).action(async (options) => {
1510
+ buddy.command("test", descriptions2.command).option("--ui", descriptions2.ui, { default: false }).option("-p, --project", descriptions2.project, { default: false }).option("--verbose", descriptions2.verbose, { default: true }).action(async (options) => {
1478
1511
  const perf = await intro17("buddy test");
1479
1512
  const result = await runAction16(Action16.Test, { ...options, cwd: projectPath() });
1480
1513
  if (result.isErr()) {
@@ -1548,9 +1581,10 @@ import {Action as Action17} from "@stacksjs/enums";
1548
1581
  function tinker(buddy) {
1549
1582
  const descriptions2 = {
1550
1583
  tinker: "Tinker with your code",
1584
+ project: "Target a specific project",
1551
1585
  verbose: "Enable verbose output"
1552
1586
  };
1553
- buddy.command("tinker", descriptions2.tinker).option("--verbose", descriptions2.verbose, { default: false }).action(async (options) => {
1587
+ buddy.command("tinker", descriptions2.tinker).option("-p, --project", descriptions2.project, { default: false }).option("--verbose", descriptions2.verbose, { default: false }).action(async (options) => {
1554
1588
  const perf = await intro18("buddy tinker");
1555
1589
  const result = await runAction17(Action17.Tinker, options);
1556
1590
  if (result.isErr()) {
@@ -1573,12 +1607,13 @@ function types22(buddy) {
1573
1607
  const descriptions2 = {
1574
1608
  generate: "Generate the types of & for your library/libraries",
1575
1609
  fix: "wip",
1610
+ project: "Target a specific project",
1576
1611
  verbose: "Enable verbose output"
1577
1612
  };
1578
- buddy.command("types:generate", descriptions2.generate).option("--verbose", descriptions2.verbose, { default: false }).action(async () => {
1613
+ buddy.command("types:generate", descriptions2.generate).option("-p, --project", descriptions2.project, { default: false }).option("--verbose", descriptions2.verbose, { default: false }).action(async () => {
1579
1614
  await generateTypes2();
1580
1615
  });
1581
- buddy.command("types:fix", descriptions2.fix).option("--verbose", descriptions2.verbose, { default: false }).action(async () => {
1616
+ buddy.command("types:fix", descriptions2.fix).option("-p, --project", descriptions2.project, { default: false }).option("--verbose", descriptions2.verbose, { default: false }).action(async () => {
1582
1617
  });
1583
1618
  buddy.on("types:*", () => {
1584
1619
  console.error("Invalid command: %s\nSee --help for a list of available commands.", buddy.args.join(" "));
@@ -1602,9 +1637,10 @@ function upgrade(buddy) {
1602
1637
  all: "Upgrade Node, package manager, project dependencies, and framework",
1603
1638
  force: "Overwrite possible local updates with remote framework updates",
1604
1639
  select: "What are you trying to upgrade?",
1640
+ project: "Target a specific project",
1605
1641
  verbose: "Enable verbose output"
1606
1642
  };
1607
- buddy.command("upgrade", descriptions2.command).option("-c, --framework", descriptions2.framework, { default: false }).option("-d, --dependencies", descriptions2.dependencies, { default: false }).option("-b, --bun", descriptions2.bun, { default: false }).option("-a, --all", descriptions2.all, { default: false }).option("-f, --force", descriptions2.force, { default: false }).option("--verbose", descriptions2.verbose, { default: false }).alias("update").example("buddy upgrade -a --verbose").action(async (options) => {
1643
+ buddy.command("upgrade", descriptions2.command).option("-c, --framework", descriptions2.framework, { default: false }).option("-d, --dependencies", descriptions2.dependencies, { default: false }).option("-b, --bun", descriptions2.bun, { default: false }).option("-a, --all", descriptions2.all, { default: false }).option("-f, --force", descriptions2.force, { default: false }).option("-p, --project", descriptions2.project, { default: false }).option("--verbose", descriptions2.verbose, { default: false }).alias("update").example("buddy upgrade -a --verbose").action(async (options) => {
1608
1644
  const perf = await intro19("buddy upgrade");
1609
1645
  if (hasNoOptions4(options)) {
1610
1646
  let answers = await prompt5.require().multiselect(descriptions2.select, {
@@ -1629,13 +1665,13 @@ function upgrade(buddy) {
1629
1665
  await outro19("Upgrade complete.", { startTime: perf, useSeconds: true });
1630
1666
  process29.exit();
1631
1667
  });
1632
- buddy.command("upgrade:framework", descriptions2.framework).option("--verbose", descriptions2.verbose, { default: false }).example("buddy upgrade:framework --verbose").action(async (options) => {
1668
+ buddy.command("upgrade:framework", descriptions2.framework).option("-p, --project", descriptions2.project, { default: false }).option("--verbose", descriptions2.verbose, { default: false }).example("buddy upgrade:framework --verbose").action(async (options) => {
1633
1669
  await runAction18(Action18.Upgrade, options);
1634
1670
  });
1635
- buddy.command("upgrade:dependencies", descriptions2.dependencies).option("--verbose", descriptions2.verbose, { default: false }).alias("upgrade:deps").example("buddy upgrade:dependencies --verbose").action(async (options) => {
1671
+ buddy.command("upgrade:dependencies", descriptions2.dependencies).option("-p, --project", descriptions2.project, { default: false }).option("--verbose", descriptions2.verbose, { default: false }).alias("upgrade:deps").example("buddy upgrade:dependencies --verbose").action(async (options) => {
1636
1672
  await runAction18(Action18.Upgrade, options);
1637
1673
  });
1638
- buddy.command("upgrade:bun", descriptions2.bun).option("--verbose", descriptions2.verbose, { default: false }).action(async (options) => {
1674
+ buddy.command("upgrade:bun", descriptions2.bun).option("-p, --project", descriptions2.project, { default: false }).option("--verbose", descriptions2.verbose, { default: false }).action(async (options) => {
1639
1675
  const perf = await intro19("buddy upgrade:bun");
1640
1676
  const result = await runAction18(Action18.UpgradeBun, options);
1641
1677
  if (result.isErr()) {
@@ -1644,7 +1680,7 @@ function upgrade(buddy) {
1644
1680
  }
1645
1681
  process29.exit(ExitCode22.Success);
1646
1682
  });
1647
- buddy.command("upgrade:all", descriptions2.all).option("--verbose", descriptions2.verbose, { default: false }).action(async (options) => {
1683
+ buddy.command("upgrade:all", descriptions2.all).option("-p, --project", descriptions2.project, { default: false }).option("--verbose", descriptions2.verbose, { default: false }).action(async (options) => {
1648
1684
  await runAction18(Action18.Upgrade, options);
1649
1685
  });
1650
1686
  }
@@ -1654,14 +1690,14 @@ var hasNoOptions4 = function(options) {
1654
1690
 
1655
1691
  // src/commands/version.ts
1656
1692
  import {bold as bold3, dim as dim2, green, intro as intro20, log as log13} from "@stacksjs/cli";
1657
- import {storage as storage3} from "@stacksjs/storage";
1693
+ import {storage as storage5} from "@stacksjs/storage";
1658
1694
  function version(buddy) {
1659
1695
  const descriptions2 = {
1660
1696
  version: "Retrieving Stacks build version"
1661
1697
  };
1662
1698
  buddy.command("version", descriptions2.version).action(async () => {
1663
1699
  await intro20("buddy version");
1664
- const pkg = await storage3.readPackageJson("./package.json");
1700
+ const pkg = await storage5.readPackageJson("./package.json");
1665
1701
  const bunVersion = "wip";
1666
1702
  const stacksVersion = pkg.version;
1667
1703
  log13.info(green(bold3("@stacksjs/ ")) + dim2(` ${stacksVersion}`));