@apso/cli 0.39.1 → 0.39.2

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.
@@ -60,6 +60,8 @@ export declare class ApsorcNamingError extends Error {
60
60
  code: string;
61
61
  entity: string;
62
62
  field?: string | undefined;
63
+ /** A problem in the user's .apsorc, not a CLI bug: PostHog only, never Sentry. */
64
+ readonly userError = true;
63
65
  constructor(message: string, code: string, entity: string, field?: string | undefined);
64
66
  }
65
67
  /**
@@ -34,6 +34,8 @@ class ApsorcNamingError extends Error {
34
34
  this.code = code;
35
35
  this.entity = entity;
36
36
  this.field = field;
37
+ /** A problem in the user's .apsorc, not a CLI bug: PostHog only, never Sentry. */
38
+ this.userError = true;
37
39
  this.name = "ApsorcNamingError";
38
40
  }
39
41
  }
@@ -1,5 +1,9 @@
1
1
  import { Command } from "@oclif/core";
2
- /** True for errors oclif raised deliberately (this.error, this.exit, parse errors). */
2
+ /**
3
+ * True for errors oclif raised deliberately (this.error, this.exit, parse
4
+ * errors) and for errors that mark themselves `userError` (problems in the
5
+ * user's input, such as an .apsorc that would not compile).
6
+ */
3
7
  export declare function isUserError(err: unknown): boolean;
4
8
  export default abstract class BaseCommand extends Command {
5
9
  /**
@@ -6,9 +6,15 @@ const core_1 = require("@oclif/core");
6
6
  const child_process_1 = require("child_process");
7
7
  const os_1 = tslib_1.__importDefault(require("os"));
8
8
  const telemetry_1 = require("./telemetry/telemetry");
9
- /** True for errors oclif raised deliberately (this.error, this.exit, parse errors). */
9
+ /**
10
+ * True for errors oclif raised deliberately (this.error, this.exit, parse
11
+ * errors) and for errors that mark themselves `userError` (problems in the
12
+ * user's input, such as an .apsorc that would not compile).
13
+ */
10
14
  function isUserError(err) {
11
- return Boolean(err && typeof err === "object" && "oclif" in err);
15
+ if (!err || typeof err !== "object")
16
+ return false;
17
+ return "oclif" in err || err.userError === true;
12
18
  }
13
19
  exports.isUserError = isUserError;
14
20
  class BaseCommand extends core_1.Command {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@apso/cli",
3
- "version": "0.39.1",
3
+ "version": "0.39.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@apso/cli",
9
- "version": "0.39.1",
9
+ "version": "0.39.2",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "@apso/schema-tools": "^0.2.0",
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.39.1",
2
+ "version": "0.39.2",
3
3
  "commands": {
4
4
  "config": {
5
5
  "id": "config",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apso/cli",
3
- "version": "0.39.1",
3
+ "version": "0.39.2",
4
4
  "mcpName": "io.github.apsoai/apso",
5
5
  "description": "Apso CLI",
6
6
  "author": "Apso by Mavric - @mavric",