@newpeak/barista-cli 0.1.122 → 0.1.125

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.
@@ -21,4 +21,12 @@ export interface OutputOptions {
21
21
  * @returns `true` if JSON should be used, `false` for human-readable tables
22
22
  */
23
23
  export declare function shouldUseJson(options: OutputOptions, configOutputFormat?: string): boolean;
24
+ export interface ErrorResponse {
25
+ success: boolean;
26
+ error?: {
27
+ code?: string;
28
+ message?: string;
29
+ };
30
+ }
31
+ export declare function handleCommandError(response: ErrorResponse, options: OutputOptions): boolean;
24
32
  //# sourceMappingURL=output.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,aAAa,EACtB,kBAAkB,CAAC,EAAE,MAAM,GAC1B,OAAO,CAcT"}
1
+ {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,aAAa,EACtB,kBAAkB,CAAC,EAAE,MAAM,GAC1B,OAAO,CAcT;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7C;AAED,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,aAAa,EACvB,OAAO,EAAE,aAAa,GACrB,OAAO,CAOT"}
@@ -31,4 +31,12 @@ export function shouldUseJson(options, configOutputFormat) {
31
31
  }
32
32
  return false;
33
33
  }
34
+ export function handleCommandError(response, options) {
35
+ const outputJson = options.json === true || process.argv.includes('--json');
36
+ if (outputJson) {
37
+ console.log(JSON.stringify({ success: false, error: response.error }, null, 2));
38
+ return true;
39
+ }
40
+ return false;
41
+ }
34
42
  //# sourceMappingURL=output.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAC3B,OAAsB,EACtB,kBAA2B;IAE3B,mCAAmC;IACnC,IAAI,OAAO,CAAC,IAAI,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAEvC,4CAA4C;IAC5C,IAAI,kBAAkB,KAAK,MAAM;QAAE,OAAO,IAAI,CAAC;IAE/C,uDAAuD;IACvD,+EAA+E;IAC/E,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,KAAK,EAAE,CAAC;QACzE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAC3B,OAAsB,EACtB,kBAA2B;IAE3B,mCAAmC;IACnC,IAAI,OAAO,CAAC,IAAI,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAEvC,4CAA4C;IAC5C,IAAI,kBAAkB,KAAK,MAAM;QAAE,OAAO,IAAI,CAAC;IAE/C,uDAAuD;IACvD,+EAA+E;IAC/E,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,KAAK,EAAE,CAAC;QACzE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAOD,MAAM,UAAU,kBAAkB,CAChC,QAAuB,EACvB,OAAsB;IAEtB,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,KAAK,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC5E,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAChF,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newpeak/barista-cli",
3
- "version": "0.1.122",
3
+ "version": "0.1.125",
4
4
  "description": "AI Tools CLI for Liberica and Arabica services",
5
5
  "license": "MIT",
6
6
  "keywords": [