@asapjs/router 1.0.0-alpha.25 → 1.0.0-alpha.27
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/middleware/errorHandler.d.ts +2 -2
- package/dist/middleware/errorHandler.d.ts.map +1 -1
- package/dist/middleware/errorHandler.js +11 -3
- package/dist/middleware/errorHandler.js.map +1 -1
- package/dist/utils/defineMiddleware.d.ts +0 -17
- package/dist/utils/defineMiddleware.d.ts.map +1 -1
- package/dist/utils/defineMiddleware.js +29 -1
- package/dist/utils/defineMiddleware.js.map +1 -1
- package/dist/utils/wrapper.d.ts.map +1 -1
- package/dist/utils/wrapper.js +19 -11
- package/dist/utils/wrapper.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { NextFunction, Request, Response } from 'express';
|
|
1
|
+
import type { NextFunction, Request, Response } from 'express';
|
|
2
2
|
export declare class HttpException extends Error {
|
|
3
3
|
status: number;
|
|
4
4
|
message: string;
|
|
5
5
|
constructor(status?: number, message?: string);
|
|
6
6
|
}
|
|
7
|
-
declare const errorHandler: (error:
|
|
7
|
+
declare const errorHandler: (error: unknown, _req: Request, res: Response, _next: NextFunction) => Response<any, Record<string, any>> | undefined;
|
|
8
8
|
export default errorHandler;
|
|
9
9
|
//# sourceMappingURL=errorHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorHandler.d.ts","sourceRoot":"","sources":["../../src/middleware/errorHandler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"errorHandler.d.ts","sourceRoot":"","sources":["../../src/middleware/errorHandler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE/D,qBAAa,aAAc,SAAQ,KAAK;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;gBAEX,MAAM,GAAE,MAAY,EAAE,OAAO,GAAE,MAAgC;CAK3E;AAED,QAAA,MAAM,YAAY,GAAI,OAAO,OAAO,EAAE,MAAM,OAAO,EAAE,KAAK,QAAQ,EAAE,OAAO,YAAY,mDAUtF,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.HttpException = void 0;
|
|
4
|
+
const error_1 = require("@asapjs/error");
|
|
4
5
|
class HttpException extends Error {
|
|
5
6
|
constructor(status = 500, message = '알 수 없는 서버 오류가 발생했습니다.') {
|
|
6
7
|
super(message);
|
|
@@ -9,9 +10,16 @@ class HttpException extends Error {
|
|
|
9
10
|
}
|
|
10
11
|
}
|
|
11
12
|
exports.HttpException = HttpException;
|
|
12
|
-
const errorHandler = (error,
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
const errorHandler = (error, _req, res, _next) => {
|
|
14
|
+
if (error instanceof error_1.HttpError) {
|
|
15
|
+
return res.status(error.status).json(error.toJSON());
|
|
16
|
+
}
|
|
17
|
+
if (error && typeof error === 'object' && 'status' in error && 'message' in error) {
|
|
18
|
+
const { status, message } = error;
|
|
19
|
+
return res.status(status).json(new error_1.HttpError(status, 'HTTP_EXCEPTION', String(message)).toJSON());
|
|
20
|
+
}
|
|
21
|
+
const message = error instanceof Error ? error.message : '알 수 없는 서버 오류가 발생했습니다.';
|
|
22
|
+
res.status(500).json(new error_1.HttpError(500, 'INTERNAL_SERVER_ERROR', message).toJSON());
|
|
15
23
|
};
|
|
16
24
|
exports.default = errorHandler;
|
|
17
25
|
//# sourceMappingURL=errorHandler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorHandler.js","sourceRoot":"","sources":["../../src/middleware/errorHandler.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"errorHandler.js","sourceRoot":"","sources":["../../src/middleware/errorHandler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@asapjs/error';
|
|
2
2
|
import type { TypedMiddleware } from '@asapjs/types';
|
|
3
3
|
export declare function defineMiddleware<RouteOptions extends Record<string, any> = {}, Context extends Record<string, any> = {}>(factory: (options: RouteOptions) => (req: any, res: any, next: any) => void, meta?: {
|
|
4
|
-
/**
|
|
5
|
-
* 이 미들웨어가 throw할 수 있는 에러 목록.
|
|
6
|
-
*
|
|
7
|
-
* - 배열: RouteOptions에 관계없이 항상 Swagger에 포함
|
|
8
|
-
* - 함수: RouteOptions를 받아 포함할 에러 목록을 동적으로 결정
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* // 항상 포함
|
|
12
|
-
* errors: [AuthErrors.UNAUTHORIZED]
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* // auth:true인 라우트에만 401 포함, roles가 있으면 403도 포함
|
|
16
|
-
* errors: (options) => [
|
|
17
|
-
* ...(options.auth !== false ? [AuthErrors.UNAUTHORIZED] : []),
|
|
18
|
-
* ...(options.roles?.length ? [AuthErrors.FORBIDDEN] : []),
|
|
19
|
-
* ]
|
|
20
|
-
*/
|
|
21
4
|
errors?: ErrorCreator[] | ((options: RouteOptions) => ErrorCreator[]);
|
|
22
5
|
}): TypedMiddleware<RouteOptions, Context>;
|
|
23
6
|
//# sourceMappingURL=defineMiddleware.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defineMiddleware.d.ts","sourceRoot":"","sources":["../../src/utils/defineMiddleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"defineMiddleware.d.ts","sourceRoot":"","sources":["../../src/utils/defineMiddleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAerD,wBAAgB,gBAAgB,CAC/B,YAAY,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,EAC7C,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,EAExC,OAAO,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,KAAK,IAAI,EAC3E,IAAI,CAAC,EAAE;IACN,MAAM,CAAC,EAAE,YAAY,EAAE,GAAG,CAAC,CAAC,OAAO,EAAE,YAAY,KAAK,YAAY,EAAE,CAAC,CAAC;CACtE,GACC,eAAe,CAAC,YAAY,EAAE,OAAO,CAAC,CAuBxC"}
|
|
@@ -1,9 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defineMiddleware = defineMiddleware;
|
|
4
|
+
const error_1 = require("@asapjs/error");
|
|
5
|
+
function respondWithError(err, res) {
|
|
6
|
+
if (err instanceof error_1.HttpError) {
|
|
7
|
+
res.status(err.status).json(err.toJSON());
|
|
8
|
+
}
|
|
9
|
+
else if (err && typeof err === 'object' && 'status' in err && 'message' in err) {
|
|
10
|
+
const { status, message } = err;
|
|
11
|
+
res.status(status).json(new error_1.HttpError(status, 'HTTP_EXCEPTION', String(message)).toJSON());
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
const message = err instanceof Error ? err.message : '알 수 없는 서버 오류가 발생했습니다.';
|
|
15
|
+
res.status(500).json(new error_1.HttpError(500, 'INTERNAL_SERVER_ERROR', message).toJSON());
|
|
16
|
+
}
|
|
17
|
+
}
|
|
4
18
|
function defineMiddleware(factory, meta) {
|
|
5
19
|
var _a;
|
|
6
|
-
const
|
|
20
|
+
const wrappedFactory = (options) => {
|
|
21
|
+
const handler = factory(options);
|
|
22
|
+
return (req, res, next) => {
|
|
23
|
+
try {
|
|
24
|
+
const result = handler(req, res, next);
|
|
25
|
+
if (result instanceof Promise) {
|
|
26
|
+
result.catch((err) => respondWithError(err, res));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
catch (err) {
|
|
30
|
+
respondWithError(err, res);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
const middleware = wrappedFactory;
|
|
7
35
|
Object.defineProperty(middleware, '__errors', {
|
|
8
36
|
value: (_a = meta === null || meta === void 0 ? void 0 : meta.errors) !== null && _a !== void 0 ? _a : [],
|
|
9
37
|
writable: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defineMiddleware.js","sourceRoot":"","sources":["../../src/utils/defineMiddleware.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"defineMiddleware.js","sourceRoot":"","sources":["../../src/utils/defineMiddleware.ts"],"names":[],"mappings":";;AAiBA,4CA+BC;AA/CD,yCAA0C;AAI1C,SAAS,gBAAgB,CAAC,GAAY,EAAE,GAAa;IACpD,IAAI,GAAG,YAAY,iBAAS,EAAE,CAAC;QAC9B,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;IAC3C,CAAC;SAAM,IAAI,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,QAAQ,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,EAAE,CAAC;QAClF,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,GAA0C,CAAC;QACvE,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,iBAAS,CAAC,MAAM,EAAE,gBAAgB,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IAC5F,CAAC;SAAM,CAAC;QACP,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,uBAAuB,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AAC,GAAG,QAAQ,CA6CrF"}
|
package/dist/utils/wrapper.js
CHANGED
|
@@ -50,7 +50,6 @@ function Wrapper(cb) {
|
|
|
50
50
|
return function _Wrapper(req, res, _next) {
|
|
51
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52
52
|
try {
|
|
53
|
-
const user = req.user;
|
|
54
53
|
const { page: pageProp = 0, limit: limitProp = 20 } = req.query;
|
|
55
54
|
const page = parseInt(String(pageProp), 10);
|
|
56
55
|
const limit = parseInt(String(limitProp), 10);
|
|
@@ -58,15 +57,14 @@ function Wrapper(cb) {
|
|
|
58
57
|
page,
|
|
59
58
|
limit,
|
|
60
59
|
};
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
};
|
|
60
|
+
const base = { req, res, query: req.query, path: req.params, body: req.body, paging };
|
|
61
|
+
const args = new Proxy(base, {
|
|
62
|
+
get(target, prop) {
|
|
63
|
+
if (prop in target)
|
|
64
|
+
return target[prop];
|
|
65
|
+
return req[prop];
|
|
66
|
+
},
|
|
67
|
+
});
|
|
70
68
|
const output = yield cb(args);
|
|
71
69
|
if (output) {
|
|
72
70
|
res.status(200).json(output);
|
|
@@ -83,7 +81,17 @@ function Wrapper(cb) {
|
|
|
83
81
|
Sentry.captureException(err);
|
|
84
82
|
}
|
|
85
83
|
}
|
|
86
|
-
(
|
|
84
|
+
if (err instanceof error_1.HttpError) {
|
|
85
|
+
res.status(err.status).json(err.toJSON());
|
|
86
|
+
}
|
|
87
|
+
else if (err && typeof err === 'object' && 'status' in err && 'message' in err) {
|
|
88
|
+
const { status, message } = err;
|
|
89
|
+
res.status(status).json(new error_1.HttpError(status, 'HTTP_EXCEPTION', String(message)).toJSON());
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
const message = err instanceof Error ? err.message : '알 수 없는 서버 오류가 발생했습니다.';
|
|
93
|
+
res.status(500).json(new error_1.HttpError(500, 'INTERNAL_SERVER_ERROR', message).toJSON());
|
|
94
|
+
}
|
|
87
95
|
}
|
|
88
96
|
});
|
|
89
97
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapper.js","sourceRoot":"","sources":["../../src/utils/wrapper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,
|
|
1
|
+
{"version":3,"file":"wrapper.js","sourceRoot":"","sources":["../../src/utils/wrapper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,0BA6CC;AA9ED,2CAA8D;AAC9D,yCAA0C;AAE1C,qDAAuC;AA8BvC,SAAwB,OAAO,CAAC,EAA2C;IAC1E,OAAO,SAAe,QAAQ,CAAC,GAAY,EAAE,GAAa,EAAE,KAAmB;;YAC9E,IAAI,CAAC;gBACJ,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,CAAC,EAAE,KAAK,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC;gBAChE,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC5C,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC9C,MAAM,MAAM,GAAwB;oBACnC,IAAI;oBACJ,KAAK;iBACL,CAAC;gBACF,MAAM,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;gBACtF,MAAM,IAAI,GAAG,IAAI,KAAK,CAAC,IAAW,EAAE;oBACnC,GAAG,CAAC,MAAM,EAAE,IAAY;wBACvB,IAAI,IA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AgB,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;gBAC5F,CAAC;qBAAM,CAAC;oBACP,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,uBAAuB,CAAC;oBAC7E,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,iBAAS,CAAC,GAAG,EAAE,uBAAuB,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;gBACrF,CAAC;YACF,CAAC;QACF,CAAC;KAAA,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asapjs/router",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.27",
|
|
4
4
|
"description": "Router and API layer for AsapJS",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"@types/swagger-ui-express": "^4.1.8",
|
|
44
44
|
"typescript": "^5.8.3"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "9267d6dc153ac381ea42dc589e34beabd9cc906a"
|
|
47
47
|
}
|