@braingrid/cli 0.2.50 → 0.2.52

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/CHANGELOG.md CHANGED
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.52] - 2026-02-24
11
+
12
+ ### Fixed
13
+
14
+ - **Project discovery** — surface real error when `.braingrid/project.json` exists but fails to load (e.g., corrupted JSON, Zod validation error) instead of misleading "no local project found" message
15
+
16
+ ### Changed
17
+
18
+ - **Docs** — sync OpenAPI spec from braingrid-app
19
+
20
+ ## [0.2.51] - 2026-02-23
21
+
22
+ ### Fixed
23
+
24
+ - **Docs sync** — add `log-helper.sh` to docs sync script so it gets distributed to the BrainGridAI/braingrid repo alongside hook scripts
25
+
10
26
  ## [0.2.50] - 2026-02-23
11
27
 
12
28
  ### Fixed
package/dist/cli.js CHANGED
@@ -228,7 +228,7 @@ async function axiosWithRetry(config2, options) {
228
228
 
229
229
  // src/build-config.ts
230
230
  var BUILD_ENV = true ? "production" : process.env.NODE_ENV === "test" ? "development" : "production";
231
- var CLI_VERSION = true ? "0.2.50" : "0.0.0-test";
231
+ var CLI_VERSION = true ? "0.2.52" : "0.0.0-test";
232
232
  var PRODUCTION_CONFIG = {
233
233
  apiUrl: "https://app.braingrid.ai",
234
234
  workosAuthUrl: "https://auth.braingrid.ai",
@@ -5844,6 +5844,18 @@ var WorkspaceManager = class {
5844
5844
  projectId: normalized
5845
5845
  };
5846
5846
  }
5847
+ const configExists = await projectConfigExists();
5848
+ if (configExists) {
5849
+ try {
5850
+ await loadProjectConfig();
5851
+ } catch (error) {
5852
+ const msg = error instanceof Error ? error.message : String(error);
5853
+ return {
5854
+ success: false,
5855
+ error: chalk13.red("\u274C Found .braingrid/project.json but failed to load it:") + "\n" + chalk13.dim(` ${msg}`) + "\n\n" + chalk13.dim("Try re-initializing with:\n") + chalk13.cyan(" braingrid init --force")
5856
+ };
5857
+ }
5858
+ }
5847
5859
  return {
5848
5860
  success: false,
5849
5861
  error: chalk13.red("\u274C No project specified and no local project found.") + "\n\n" + chalk13.dim("To initialize this workspace, run:\n") + chalk13.cyan(" braingrid init") + "\n\n" + chalk13.dim("Or specify a project explicitly:\n") + chalk13.cyan(" braingrid <command> -p PROJ-123")