@lssm/lib.error 1.11.1 → 1.41.1
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/README.md +5 -0
- package/package.json +11 -10
- package/dist/appError.d.ts +0 -16
- package/dist/codes.d.ts +0 -18
- package/dist/http.d.ts +0 -10
- package/dist/index.d.ts +0 -4
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/lib.error",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.41.1",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
|
|
6
|
+
"publish:pkg:canary": "bun publish:pkg --tag canary",
|
|
6
7
|
"build": "bun build:bundle && bun build:types",
|
|
7
8
|
"build:bundle": "tsdown",
|
|
8
9
|
"build:types": "tsc --noEmit",
|
|
@@ -13,15 +14,15 @@
|
|
|
13
14
|
"lint:check": "eslint src"
|
|
14
15
|
},
|
|
15
16
|
"devDependencies": {
|
|
16
|
-
"@lssm/tool.typescript": "
|
|
17
|
-
"tsdown": "^0.
|
|
17
|
+
"@lssm/tool.typescript": "1.41.1",
|
|
18
|
+
"tsdown": "^0.17.4",
|
|
18
19
|
"typescript": "^5.9.3"
|
|
19
20
|
},
|
|
20
21
|
"dependencies": {},
|
|
21
22
|
"peerDependencies": {
|
|
22
|
-
"elysia": "^1.4.
|
|
23
|
-
"express": "^5.1
|
|
24
|
-
"next": "16.0.
|
|
23
|
+
"elysia": "^1.4.19",
|
|
24
|
+
"express": "^5.2.1",
|
|
25
|
+
"next": "16.0.10"
|
|
25
26
|
},
|
|
26
27
|
"type": "module",
|
|
27
28
|
"main": "./dist/index.js",
|
|
@@ -32,10 +33,10 @@
|
|
|
32
33
|
"README.md"
|
|
33
34
|
],
|
|
34
35
|
"exports": {
|
|
35
|
-
".": "./
|
|
36
|
-
"./appError": "./
|
|
37
|
-
"./codes": "./
|
|
38
|
-
"./http": "./
|
|
36
|
+
".": "./src/index.ts",
|
|
37
|
+
"./appError": "./src/appError.ts",
|
|
38
|
+
"./codes": "./src/codes.ts",
|
|
39
|
+
"./http": "./src/http.ts",
|
|
39
40
|
"./*": "./*"
|
|
40
41
|
},
|
|
41
42
|
"publishConfig": {
|
package/dist/appError.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ErrorCode } from "./codes.js";
|
|
2
|
-
|
|
3
|
-
//#region src/appError.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Generic application error with code and optional details.
|
|
7
|
-
*/
|
|
8
|
-
declare class AppError extends Error {
|
|
9
|
-
code: ErrorCode;
|
|
10
|
-
details?: Record<string, unknown> | undefined;
|
|
11
|
-
constructor(code: ErrorCode, message: string, details?: Record<string, unknown> | undefined);
|
|
12
|
-
}
|
|
13
|
-
/** Type guard to detect AppError */
|
|
14
|
-
declare function isAppError(err: unknown): err is AppError;
|
|
15
|
-
//#endregion
|
|
16
|
-
export { AppError, isAppError };
|
package/dist/codes.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
//#region src/codes.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Centralised error codes used across services.
|
|
4
|
-
* Extend this enum to add more domain-specific codes.
|
|
5
|
-
*/
|
|
6
|
-
declare enum ErrorCode {
|
|
7
|
-
UNAUTHENTICATED = "UNAUTHENTICATED",
|
|
8
|
-
FORBIDDEN = "FORBIDDEN",
|
|
9
|
-
NOT_FOUND = "NOT_FOUND",
|
|
10
|
-
INVALID_INPUT = "INVALID_INPUT",
|
|
11
|
-
CONFLICT = "CONFLICT",
|
|
12
|
-
RATE_LIMITED = "RATE_LIMITED",
|
|
13
|
-
SERVER_ERROR = "SERVER_ERROR",
|
|
14
|
-
POLICY_DENIED = "POLICY_DENIED",
|
|
15
|
-
}
|
|
16
|
-
declare function isKnownErrorCode(code: string): code is ErrorCode;
|
|
17
|
-
//#endregion
|
|
18
|
-
export { ErrorCode, isKnownErrorCode };
|
package/dist/http.d.ts
DELETED
package/dist/index.d.ts
DELETED