@adhd/apigen-base-errors 0.2.0 → 0.2.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,32 @@
1
+ ## 0.2.2 (2026-09-26)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **vite-plugins:** absorb perf/test-resolve-fix — test-time @adhd/* source resolution ([3e344506](https://github.com/PseudoSky/adhd/commit/3e344506))
6
+
7
+ ### 🩹 Fixes
8
+
9
+ - **vite:** restore import.meta.url in CJS output under vite 8 ([7916e639](https://github.com/PseudoSky/adhd/commit/7916e639))
10
+ - **nx:** finish the ESLint v9 flat-config migration and unblock the gate ([53f4ff3e](https://github.com/PseudoSky/adhd/commit/53f4ff3e))
11
+
12
+ ### ❤️ Thank You
13
+
14
+ - pseudosky
15
+
16
+ ## 0.2.1 (2026-09-24)
17
+
18
+
19
+ ### 🩹 Fixes
20
+
21
+ - **apigen-cli:** restore 2768 files mass-deleted by 0117eb22 (BUG-APIGEN-052)
22
+
23
+
24
+ ### ❤️ Thank You
25
+
26
+ - parity-harness-self-test
27
+ - pseudosky
28
+ - Sky
29
+
1
30
  ## 0.1.6 (2026-07-25)
2
31
 
3
32
 
package/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=["invalid_argument","unauthenticated","permission_denied","not_found","internal"],i={invalid_argument:400,unauthenticated:401,permission_denied:403,not_found:404,internal:500},o={invalid_argument:"INVALID_ARGUMENT",unauthenticated:"UNAUTHENTICATED",permission_denied:"PERMISSION_DENIED",not_found:"NOT_FOUND",internal:"INTERNAL"},s={invalid_argument:2,unauthenticated:3,permission_denied:3,not_found:4,internal:1},u={invalid_argument:"error",unauthenticated:"error",permission_denied:"error",not_found:"error",internal:"error"},d={http:i,grpc:o,cli:s,mcp:u};class c extends Error{constructor(n,e,a){super(e),this.name="ApiError",this.code=n,this.details=a,Object.setPrototypeOf(this,new.target.prototype)}toJSON(){const n={code:this.code,message:this.message};return this.details!==void 0&&(n.details=this.details),n}}function _(t){return typeof t=="object"&&t!==null&&t.name==="ApiError"&&r.includes(t.code)&&typeof t.toJSON=="function"}function E(t,n,e=0){return t==="before-first-chunk"?{phase:t,error:n}:{phase:t,error:n,chunksDelivered:e}}function f(t){return t.phase==="before-first-chunk"}function p(t){return t.phase==="after-first-chunk"}exports.ApiError=c;exports.CLI_EXIT_CODE=s;exports.ERROR_CODES=r;exports.GRPC_CODE=o;exports.HTTP_STATUS=i;exports.MCP_ERROR_KIND=u;exports.isAfterFirstChunk=p;exports.isApiError=_;exports.isBeforeFirstChunk=f;exports.statusMaps=d;exports.toStreamingError=E;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=[`invalid_argument`,`unauthenticated`,`permission_denied`,`not_found`,`internal`],t={invalid_argument:400,unauthenticated:401,permission_denied:403,not_found:404,internal:500},n={invalid_argument:`INVALID_ARGUMENT`,unauthenticated:`UNAUTHENTICATED`,permission_denied:`PERMISSION_DENIED`,not_found:`NOT_FOUND`,internal:`INTERNAL`},r={invalid_argument:2,unauthenticated:3,permission_denied:3,not_found:4,internal:1},i={invalid_argument:`error`,unauthenticated:`error`,permission_denied:`error`,not_found:`error`,internal:`error`},a={http:t,grpc:n,cli:r,mcp:i},o=class extends Error{constructor(e,t,n){super(t),this.name=`ApiError`,this.code=e,this.details=n,Object.setPrototypeOf(this,new.target.prototype)}toJSON(){let e={code:this.code,message:this.message};return this.details!==void 0&&(e.details=this.details),e}};function s(t){return typeof t==`object`&&!!t&&t.name===`ApiError`&&e.includes(t.code)&&typeof t.toJSON==`function`}function c(e,t,n=0){return e===`before-first-chunk`?{phase:e,error:t}:{phase:e,error:t,chunksDelivered:n}}function l(e){return e.phase===`before-first-chunk`}function u(e){return e.phase===`after-first-chunk`}exports.ApiError=o,exports.CLI_EXIT_CODE=r,exports.ERROR_CODES=e,exports.GRPC_CODE=n,exports.HTTP_STATUS=t,exports.MCP_ERROR_KIND=i,exports.isAfterFirstChunk=u,exports.isApiError=s,exports.isBeforeFirstChunk=l,exports.statusMaps=a,exports.toStreamingError=c;
package/index.mjs CHANGED
@@ -1,74 +1,69 @@
1
- const r = [
2
- "invalid_argument",
3
- "unauthenticated",
4
- "permission_denied",
5
- "not_found",
6
- "internal"
7
- ], o = {
8
- invalid_argument: 400,
9
- unauthenticated: 401,
10
- permission_denied: 403,
11
- not_found: 404,
12
- internal: 500
13
- }, s = {
14
- invalid_argument: "INVALID_ARGUMENT",
15
- unauthenticated: "UNAUTHENTICATED",
16
- permission_denied: "PERMISSION_DENIED",
17
- not_found: "NOT_FOUND",
18
- internal: "INTERNAL"
19
- }, u = {
20
- invalid_argument: 2,
21
- unauthenticated: 3,
22
- permission_denied: 3,
23
- not_found: 4,
24
- internal: 1
1
+ //#region src/lib/errors.ts
2
+ var e = [
3
+ "invalid_argument",
4
+ "unauthenticated",
5
+ "permission_denied",
6
+ "not_found",
7
+ "internal"
8
+ ], t = {
9
+ invalid_argument: 400,
10
+ unauthenticated: 401,
11
+ permission_denied: 403,
12
+ not_found: 404,
13
+ internal: 500
14
+ }, n = {
15
+ invalid_argument: "INVALID_ARGUMENT",
16
+ unauthenticated: "UNAUTHENTICATED",
17
+ permission_denied: "PERMISSION_DENIED",
18
+ not_found: "NOT_FOUND",
19
+ internal: "INTERNAL"
20
+ }, r = {
21
+ invalid_argument: 2,
22
+ unauthenticated: 3,
23
+ permission_denied: 3,
24
+ not_found: 4,
25
+ internal: 1
26
+ }, i = {
27
+ invalid_argument: "error",
28
+ unauthenticated: "error",
29
+ permission_denied: "error",
30
+ not_found: "error",
31
+ internal: "error"
25
32
  }, a = {
26
- invalid_argument: "error",
27
- unauthenticated: "error",
28
- permission_denied: "error",
29
- not_found: "error",
30
- internal: "error"
31
- }, d = {
32
- http: o,
33
- grpc: s,
34
- cli: u,
35
- mcp: a
33
+ http: t,
34
+ grpc: n,
35
+ cli: r,
36
+ mcp: i
37
+ }, o = class extends Error {
38
+ constructor(e, t, n) {
39
+ super(t), this.name = "ApiError", this.code = e, this.details = n, Object.setPrototypeOf(this, new.target.prototype);
40
+ }
41
+ toJSON() {
42
+ let e = {
43
+ code: this.code,
44
+ message: this.message
45
+ };
46
+ return this.details !== void 0 && (e.details = this.details), e;
47
+ }
36
48
  };
37
- class c extends Error {
38
- constructor(n, e, i) {
39
- super(e), this.name = "ApiError", this.code = n, this.details = i, Object.setPrototypeOf(this, new.target.prototype);
40
- }
41
- /** Serialise to a plain object suitable for JSON transport. */
42
- toJSON() {
43
- const n = {
44
- code: this.code,
45
- message: this.message
46
- };
47
- return this.details !== void 0 && (n.details = this.details), n;
48
- }
49
+ function s(t) {
50
+ return typeof t == "object" && !!t && t.name === "ApiError" && e.includes(t.code) && typeof t.toJSON == "function";
49
51
  }
50
- function _(t) {
51
- return typeof t == "object" && t !== null && t.name === "ApiError" && r.includes(t.code) && typeof t.toJSON == "function";
52
+ function c(e, t, n = 0) {
53
+ return e === "before-first-chunk" ? {
54
+ phase: e,
55
+ error: t
56
+ } : {
57
+ phase: e,
58
+ error: t,
59
+ chunksDelivered: n
60
+ };
52
61
  }
53
- function f(t, n, e = 0) {
54
- return t === "before-first-chunk" ? { phase: t, error: n } : { phase: t, error: n, chunksDelivered: e };
62
+ function l(e) {
63
+ return e.phase === "before-first-chunk";
55
64
  }
56
- function p(t) {
57
- return t.phase === "before-first-chunk";
65
+ function u(e) {
66
+ return e.phase === "after-first-chunk";
58
67
  }
59
- function h(t) {
60
- return t.phase === "after-first-chunk";
61
- }
62
- export {
63
- c as ApiError,
64
- u as CLI_EXIT_CODE,
65
- r as ERROR_CODES,
66
- s as GRPC_CODE,
67
- o as HTTP_STATUS,
68
- a as MCP_ERROR_KIND,
69
- h as isAfterFirstChunk,
70
- _ as isApiError,
71
- p as isBeforeFirstChunk,
72
- d as statusMaps,
73
- f as toStreamingError
74
- };
68
+ //#endregion
69
+ export { o as ApiError, r as CLI_EXIT_CODE, e as ERROR_CODES, n as GRPC_CODE, t as HTTP_STATUS, i as MCP_ERROR_KIND, u as isAfterFirstChunk, s as isApiError, l as isBeforeFirstChunk, a as statusMaps, c as toStreamingError };
package/package.json CHANGED
@@ -1,10 +1,27 @@
1
1
  {
2
2
  "name": "@adhd/apigen-base-errors",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "main": "./index.js",
5
5
  "module": "./index.mjs",
6
6
  "typings": "./index.d.ts",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
+ },
10
+ "description": "Error types for the apigen code-first API generation engine",
11
+ "keywords": [
12
+ "api",
13
+ "errors",
14
+ "codegen",
15
+ "typescript"
16
+ ],
17
+ "license": "MIT",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/PseudoSky/adhd.git",
21
+ "directory": "packages/apigen/apigen-base-errors"
22
+ },
23
+ "homepage": "https://github.com/PseudoSky/adhd/tree/main/packages/apigen/apigen-base-errors#readme",
24
+ "bugs": {
25
+ "url": "https://github.com/PseudoSky/adhd/issues"
9
26
  }
10
27
  }