@stacksjs/buddy 0.70.159 → 0.70.160

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.
package/dist/cli.js CHANGED
@@ -55,7 +55,9 @@ if (needsFullSetup) {
55
55
  }
56
56
  async function main() {
57
57
  const buddy = cli("buddy");
58
- registerGlobalOptions(buddy);
58
+ registerGlobalOptions(buddy, {
59
+ version: requestedCommand !== "upgrade" && requestedCommand !== "update"
60
+ });
59
61
  const configPath = "./buddy.config.js";
60
62
  try {
61
63
  await Bun.file(configPath).text();
@@ -4,6 +4,7 @@ export declare function ensurePantryInstalled(): Promise<void>;
4
4
  export declare function ensurePantryDependencies(cwd: string): Promise<void>;
5
5
  export declare function ensureNodeDependencies(cwd: string): Promise<void>;
6
6
  export declare function ensureAppKey(cwd: string): Promise<void>;
7
+ export declare function ensureIdeSettings(cwd: string): void;
7
8
  export declare function pantryDatabasePackage(connection: string): DatabasePackage | undefined;
8
9
  /**
9
10
  * Reads config/deps.ts dependencies and merges in environment-detected
@@ -1,4 +1,4 @@
1
- import { existsSync, readFileSync, writeFileSync } from "node:fs";
1
+ import { cpSync, existsSync, readFileSync, writeFileSync } from "node:fs";
2
2
  import { join } from "node:path";
3
3
  import process from "node:process";
4
4
  import { runAction } from "@stacksjs/actions";
@@ -172,6 +172,7 @@ async function initializeProject(options) {
172
172
  if (!options.skipKeygen)
173
173
  await ensureAppKey(cwd);
174
174
  await runInitialMigration(cwd);
175
+ ensureIdeSettings(cwd);
175
176
  if (!options.skipAws) {
176
177
  log.info("Ensuring AWS is connected...");
177
178
  try {
@@ -192,6 +193,19 @@ async function initializeProject(options) {
192
193
  log.success("Project is setup");
193
194
  log.info("Run `./buddy doctor` anytime to check your setup. Happy coding! \uD83D\uDC99");
194
195
  }
196
+ export function ensureIdeSettings(cwd) {
197
+ const source = p.frameworkPath("defaults/ide/vscode/.vscode"), destination = join(cwd, ".vscode");
198
+ if (existsSync(destination)) {
199
+ log.debug(".vscode already exists; keeping the project settings");
200
+ return;
201
+ }
202
+ if (!existsSync(source)) {
203
+ log.debug("No bundled VS Code settings found; skipping IDE setup");
204
+ return;
205
+ }
206
+ cpSync(source, destination, { recursive: !0 });
207
+ log.success("Installed project VS Code settings");
208
+ }
195
209
  const DB_CONNECTION_PACKAGES = {
196
210
  postgres: { name: "postgresql.org", version: "^17.10" },
197
211
  mysql: { name: "mysql.com", version: "*" },
@@ -1,3 +1,6 @@
1
1
  import type { CLI } from '@stacksjs/cli';
2
2
  /** Register Buddy's process-wide controls before any command modules load. */
3
- export declare function registerGlobalOptions(buddy: CLI): void;
3
+ export declare function registerGlobalOptions(buddy: CLI, options?: GlobalOptionRegistration): void;
4
+ declare interface GlobalOptionRegistration {
5
+ version?: boolean
6
+ }
@@ -1,4 +1,4 @@
1
1
  import { versionDescriptor } from "./version-info";
2
- export function registerGlobalOptions(buddy) {
3
- buddy.version(versionDescriptor, "-V, --version").option("-v, --verbose", "Enable verbose output").option("-q, --quiet", "Suppress non-essential output").option("--debug", "Enable debug output and stack traces").option("--no-interaction", "Do not ask interactive questions").option("--env <environment>", "Target an environment").option("--dry-run", "Preview actions without making changes").option("--force", "Skip confirmation prompts").option("--no-emoji", "Disable emoji in output").option("--no-cache", "Disable command metadata caching");
2
+ export function registerGlobalOptions(buddy, options = {}) {
3
+ (options.version === !1 ? buddy : buddy.version(versionDescriptor, "-V, --version")).option("-v, --verbose", "Enable verbose output").option("-q, --quiet", "Suppress non-essential output").option("--debug", "Enable debug output and stack traces").option("--no-interaction", "Do not ask interactive questions").option("--env <environment>", "Target an environment").option("--dry-run", "Preview actions without making changes").option("--force", "Skip confirmation prompts").option("--no-emoji", "Disable emoji in output").option("--no-cache", "Disable command metadata caching");
4
4
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/buddy",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.70.159",
5
+ "version": "0.70.160",
6
6
  "description": "Meet Buddy. The Stacks runtime.",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [
@@ -92,52 +92,52 @@
92
92
  "prepublishOnly": "bun run build"
93
93
  },
94
94
  "dependencies": {
95
- "@stacksjs/actions": "^0.70.159",
96
- "@stacksjs/ai": "^0.70.159",
97
- "@stacksjs/alias": "^0.70.159",
98
- "@stacksjs/arrays": "^0.70.159",
99
- "@stacksjs/auth": "^0.70.159",
100
- "@stacksjs/build": "^0.70.159",
101
- "@stacksjs/cache": "^0.70.159",
102
- "@stacksjs/cli": "^0.70.159",
95
+ "@stacksjs/actions": "^0.70.160",
96
+ "@stacksjs/ai": "^0.70.160",
97
+ "@stacksjs/alias": "^0.70.160",
98
+ "@stacksjs/arrays": "^0.70.160",
99
+ "@stacksjs/auth": "^0.70.160",
100
+ "@stacksjs/build": "^0.70.160",
101
+ "@stacksjs/cache": "^0.70.160",
102
+ "@stacksjs/cli": "^0.70.160",
103
103
  "@stacksjs/clapp": "^0.2.12",
104
- "@stacksjs/cloud": "^0.70.159",
105
- "@stacksjs/collections": "^0.70.159",
106
- "@stacksjs/config": "^0.70.159",
107
- "@stacksjs/database": "^0.70.159",
108
- "@stacksjs/desktop": "^0.70.159",
109
- "@stacksjs/dns": "^0.70.159",
110
- "@stacksjs/email": "^0.70.159",
111
- "@stacksjs/enums": "^0.70.159",
112
- "@stacksjs/error-handling": "^0.70.159",
113
- "@stacksjs/events": "^0.70.159",
114
- "@stacksjs/git": "^0.70.159",
104
+ "@stacksjs/cloud": "^0.70.160",
105
+ "@stacksjs/collections": "^0.70.160",
106
+ "@stacksjs/config": "^0.70.160",
107
+ "@stacksjs/database": "^0.70.160",
108
+ "@stacksjs/desktop": "^0.70.160",
109
+ "@stacksjs/dns": "^0.70.160",
110
+ "@stacksjs/email": "^0.70.160",
111
+ "@stacksjs/enums": "^0.70.160",
112
+ "@stacksjs/error-handling": "^0.70.160",
113
+ "@stacksjs/events": "^0.70.160",
114
+ "@stacksjs/git": "^0.70.160",
115
115
  "@stacksjs/gitit": "^0.2.5",
116
- "@stacksjs/health": "^0.70.159",
116
+ "@stacksjs/health": "^0.70.160",
117
117
  "@stacksjs/dnsx": "^0.2.3",
118
118
  "@stacksjs/httx": "^0.1.10",
119
- "@stacksjs/lint": "^0.70.159",
120
- "@stacksjs/logging": "^0.70.159",
121
- "@stacksjs/notifications": "^0.70.159",
122
- "@stacksjs/objects": "^0.70.159",
123
- "@stacksjs/orm": "^0.70.159",
124
- "@stacksjs/path": "^0.70.159",
125
- "@stacksjs/payments": "^0.70.159",
126
- "@stacksjs/realtime": "^0.70.159",
127
- "@stacksjs/router": "^0.70.159",
119
+ "@stacksjs/lint": "^0.70.160",
120
+ "@stacksjs/logging": "^0.70.160",
121
+ "@stacksjs/notifications": "^0.70.160",
122
+ "@stacksjs/objects": "^0.70.160",
123
+ "@stacksjs/orm": "^0.70.160",
124
+ "@stacksjs/path": "^0.70.160",
125
+ "@stacksjs/payments": "^0.70.160",
126
+ "@stacksjs/realtime": "^0.70.160",
127
+ "@stacksjs/router": "^0.70.160",
128
128
  "@stacksjs/rpx": "^0.11.31",
129
- "@stacksjs/search-engine": "^0.70.159",
130
- "@stacksjs/security": "^0.70.159",
131
- "@stacksjs/server": "^0.70.159",
132
- "@stacksjs/storage": "^0.70.159",
133
- "@stacksjs/strings": "^0.70.159",
134
- "@stacksjs/testing": "^0.70.159",
135
- "@stacksjs/tunnel": "^0.70.159",
136
- "@stacksjs/types": "^0.70.159",
137
- "@stacksjs/ui": "^0.70.159",
138
- "@stacksjs/utils": "^0.70.159",
139
- "@stacksjs/validation": "^0.70.159",
140
- "@stacksjs/ts-cloud": "^0.7.47"
129
+ "@stacksjs/search-engine": "^0.70.160",
130
+ "@stacksjs/security": "^0.70.160",
131
+ "@stacksjs/server": "^0.70.160",
132
+ "@stacksjs/storage": "^0.70.160",
133
+ "@stacksjs/strings": "^0.70.160",
134
+ "@stacksjs/testing": "^0.70.160",
135
+ "@stacksjs/tunnel": "^0.70.160",
136
+ "@stacksjs/types": "^0.70.160",
137
+ "@stacksjs/ui": "^0.70.160",
138
+ "@stacksjs/utils": "^0.70.160",
139
+ "@stacksjs/validation": "^0.70.160",
140
+ "@stacksjs/ts-cloud": "^0.7.49"
141
141
  },
142
142
  "devDependencies": {
143
143
  "better-dx": "^0.2.17"