@contractspec/lib.error 1.56.0 → 1.57.0
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/dist/appError.d.ts +0 -1
- package/dist/appError.d.ts.map +1 -1
- package/dist/codes.d.ts +1 -1
- package/dist/codes.d.ts.map +1 -1
- package/dist/codes.js +10 -10
- package/dist/codes.js.map +1 -1
- package/dist/http.d.ts +0 -1
- package/dist/http.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/appError.d.ts
CHANGED
package/dist/appError.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appError.d.ts","names":[],"sources":["../src/appError.ts"],"
|
|
1
|
+
{"version":3,"file":"appError.d.ts","names":[],"sources":["../src/appError.ts"],"mappings":";;;;;AAKA;cAAa,QAAA,SAAiB,KAAA;EAEnB,IAAA,EAAM,SAAA;EAEN,OAAA,GAAU,MAAA;cAFV,IAAA,EAAM,SAAA,EACb,OAAA,UACO,OAAA,GAAU,MAAA;AAAA;;iBASL,UAAA,CAAW,GAAA,YAAe,GAAA,IAAO,QAAA"}
|
package/dist/codes.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ declare enum ErrorCode {
|
|
|
11
11
|
CONFLICT = "CONFLICT",
|
|
12
12
|
RATE_LIMITED = "RATE_LIMITED",
|
|
13
13
|
SERVER_ERROR = "SERVER_ERROR",
|
|
14
|
-
POLICY_DENIED = "POLICY_DENIED"
|
|
14
|
+
POLICY_DENIED = "POLICY_DENIED"
|
|
15
15
|
}
|
|
16
16
|
declare function isKnownErrorCode(code: string): code is ErrorCode;
|
|
17
17
|
//#endregion
|
package/dist/codes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codes.d.ts","names":[],"sources":["../src/codes.ts"],"
|
|
1
|
+
{"version":3,"file":"codes.d.ts","names":[],"sources":["../src/codes.ts"],"mappings":";;AAIA;;;aAAY,SAAA;EACV,eAAA;EACA,SAAA;EACA,SAAA;EACA,aAAA;EACA,QAAA;EACA,YAAA;EACA,YAAA;EACA,aAAA;AAAA;AAAA,iBAIc,gBAAA,CAAiB,IAAA,WAAe,IAAA,IAAQ,SAAA"}
|
package/dist/codes.js
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
* Centralised error codes used across services.
|
|
4
4
|
* Extend this enum to add more domain-specific codes.
|
|
5
5
|
*/
|
|
6
|
-
let ErrorCode = /* @__PURE__ */ function(ErrorCode
|
|
7
|
-
ErrorCode
|
|
8
|
-
ErrorCode
|
|
9
|
-
ErrorCode
|
|
10
|
-
ErrorCode
|
|
11
|
-
ErrorCode
|
|
12
|
-
ErrorCode
|
|
13
|
-
ErrorCode
|
|
14
|
-
ErrorCode
|
|
15
|
-
return ErrorCode
|
|
6
|
+
let ErrorCode = /* @__PURE__ */ function(ErrorCode) {
|
|
7
|
+
ErrorCode["UNAUTHENTICATED"] = "UNAUTHENTICATED";
|
|
8
|
+
ErrorCode["FORBIDDEN"] = "FORBIDDEN";
|
|
9
|
+
ErrorCode["NOT_FOUND"] = "NOT_FOUND";
|
|
10
|
+
ErrorCode["INVALID_INPUT"] = "INVALID_INPUT";
|
|
11
|
+
ErrorCode["CONFLICT"] = "CONFLICT";
|
|
12
|
+
ErrorCode["RATE_LIMITED"] = "RATE_LIMITED";
|
|
13
|
+
ErrorCode["SERVER_ERROR"] = "SERVER_ERROR";
|
|
14
|
+
ErrorCode["POLICY_DENIED"] = "POLICY_DENIED";
|
|
15
|
+
return ErrorCode;
|
|
16
16
|
}({});
|
|
17
17
|
function isKnownErrorCode(code) {
|
|
18
18
|
return Object.values(ErrorCode).includes(code);
|
package/dist/codes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codes.js","names":[],"sources":["../src/codes.ts"],"sourcesContent":["/**\n * Centralised error codes used across services.\n * Extend this enum to add more domain-specific codes.\n */\nexport enum ErrorCode {\n UNAUTHENTICATED = 'UNAUTHENTICATED',\n FORBIDDEN = 'FORBIDDEN',\n NOT_FOUND = 'NOT_FOUND',\n INVALID_INPUT = 'INVALID_INPUT',\n CONFLICT = 'CONFLICT',\n RATE_LIMITED = 'RATE_LIMITED',\n SERVER_ERROR = 'SERVER_ERROR',\n POLICY_DENIED = 'POLICY_DENIED',\n // add more codes here\n}\n\nexport function isKnownErrorCode(code: string): code is ErrorCode {\n return Object.values(ErrorCode).includes(code as ErrorCode);\n}\n"],"mappings":";;;;;AAIA,IAAY,
|
|
1
|
+
{"version":3,"file":"codes.js","names":[],"sources":["../src/codes.ts"],"sourcesContent":["/**\n * Centralised error codes used across services.\n * Extend this enum to add more domain-specific codes.\n */\nexport enum ErrorCode {\n UNAUTHENTICATED = 'UNAUTHENTICATED',\n FORBIDDEN = 'FORBIDDEN',\n NOT_FOUND = 'NOT_FOUND',\n INVALID_INPUT = 'INVALID_INPUT',\n CONFLICT = 'CONFLICT',\n RATE_LIMITED = 'RATE_LIMITED',\n SERVER_ERROR = 'SERVER_ERROR',\n POLICY_DENIED = 'POLICY_DENIED',\n // add more codes here\n}\n\nexport function isKnownErrorCode(code: string): code is ErrorCode {\n return Object.values(ErrorCode).includes(code as ErrorCode);\n}\n"],"mappings":";;;;;AAIA,IAAY,gDAAL;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAIF,SAAgB,iBAAiB,MAAiC;AAChE,QAAO,OAAO,OAAO,UAAU,CAAC,SAAS,KAAkB"}
|
package/dist/http.d.ts
CHANGED
package/dist/http.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","names":[],"sources":["../src/http.ts"],"
|
|
1
|
+
{"version":3,"file":"http.d.ts","names":[],"sources":["../src/http.ts"],"mappings":";;;;;AAKA;iBAAgB,UAAA,CAAW,IAAA,EAAM,SAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/lib.error",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.57.0",
|
|
4
4
|
"description": "Structured error handling and HTTP error utilities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"contractspec",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"lint:check": "eslint src"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@contractspec/tool.tsdown": "1.
|
|
26
|
-
"@contractspec/tool.typescript": "1.
|
|
27
|
-
"tsdown": "^0.
|
|
25
|
+
"@contractspec/tool.tsdown": "1.57.0",
|
|
26
|
+
"@contractspec/tool.typescript": "1.57.0",
|
|
27
|
+
"tsdown": "^0.20.3",
|
|
28
28
|
"typescript": "^5.9.3"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {},
|