@braingrid/cli 0.2.29 → 0.2.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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.30] - 2025-02-02
11
+
12
+ ### Fixed
13
+
14
+ - **Validation error handling crash**
15
+ - Fixed `TypeError: errors is not iterable` when API returns single string errors
16
+ - Error handler now handles both array and string formats for validation errors
17
+
10
18
  ## [0.2.29] - 2025-02-02
11
19
 
12
20
  ### Added
package/dist/cli.js CHANGED
@@ -222,7 +222,7 @@ async function axiosWithRetry(config2, options) {
222
222
 
223
223
  // src/build-config.ts
224
224
  var BUILD_ENV = true ? "production" : process.env.NODE_ENV === "test" ? "development" : "production";
225
- var CLI_VERSION = true ? "0.2.29" : "0.0.0-test";
225
+ var CLI_VERSION = true ? "0.2.30" : "0.0.0-test";
226
226
  var PRODUCTION_CONFIG = {
227
227
  apiUrl: "https://app.braingrid.ai",
228
228
  workosAuthUrl: "https://auth.braingrid.ai",
@@ -1759,12 +1759,13 @@ ${chalk.yellow(responseData.message)}`;
1759
1759
  message += `
1760
1760
 
1761
1761
  ${chalk.dim("Validation errors:")}`;
1762
- for (const [field, errors] of Object.entries(responseData.errors)) {
1762
+ for (const [field, fieldErrors] of Object.entries(responseData.errors)) {
1763
1763
  message += `
1764
1764
  ${chalk.dim(` ${field}:`)}`;
1765
- for (const error2 of errors) {
1765
+ const errorList = Array.isArray(fieldErrors) ? fieldErrors : [fieldErrors];
1766
+ for (const err of errorList) {
1766
1767
  message += `
1767
- ${chalk.dim(` - ${error2}`)}`;
1768
+ ${chalk.dim(` - ${err}`)}`;
1768
1769
  }
1769
1770
  }
1770
1771
  } else {