axe-api 1.0.6 → 1.0.8
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.
|
@@ -71,8 +71,8 @@ class URLService {
|
|
|
71
71
|
LogService_1.default.info(`${method} ${pattern}`);
|
|
72
72
|
const phases = middlewares.map((middleware) => {
|
|
73
73
|
return {
|
|
74
|
-
isAsync:
|
|
75
|
-
name: `middleware:test`,
|
|
74
|
+
isAsync: true,
|
|
75
|
+
name: middleware.name || `middleware:test`,
|
|
76
76
|
callback: (context) => __awaiter(this, void 0, void 0, function* () {
|
|
77
77
|
if ((0, ConverterService_1.isMiddlewareFunction)(middleware)) {
|
|
78
78
|
// It should be wrapped
|
package/build/src/Types.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export type ModelMiddleware = Array<AxeFunction | IHandlerBaseMiddleware>;
|
|
|
13
13
|
export type AdaptorType = "redis" | "memory";
|
|
14
14
|
export type DefaultResponse = Promise<void> | void | undefined;
|
|
15
15
|
export type NextFunction = (error?: any) => void;
|
|
16
|
-
export type
|
|
16
|
+
export type SchemaInspectorFunction = (database: Knex) => SchemaInspector;
|
|
17
17
|
export type SerializationFunction = (item: any, request: AxeRequest) => any;
|
|
18
18
|
export type MiddlewareFunction = (req: IncomingMessage, res: ServerResponse, next: NextFunction) => DefaultResponse;
|
|
19
19
|
export type HandlerFunction = (request: AxeRequest, response: AxeResponse) => DefaultResponse;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "axe-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "AXE API is a simple tool to create Rest APIs quickly.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
"dev-kit": "ts-node-dev --respawn --clear dev-kit.ts",
|
|
34
34
|
"dev-kit:install": "node ./scripts/dev-kit-install.js",
|
|
35
35
|
"dev-kit:remove": "node ./scripts/dev-kit-remove.js",
|
|
36
|
-
"dev-kit:docs": "open-swagger-ui http://localhost:3000/swagger",
|
|
37
36
|
"test": "jest --runInBand",
|
|
38
37
|
"test:all": "npm run lint && npm run prettier:check && npm run test && npm run test:sqlite",
|
|
39
38
|
"test:dev": "jest --watch",
|
|
@@ -105,7 +104,6 @@
|
|
|
105
104
|
"node-cache": "^5.1.2",
|
|
106
105
|
"node-color-log": "^11.0.0",
|
|
107
106
|
"nodemon": "^3.0.2",
|
|
108
|
-
"open-swagger-ui": "^1.2.0",
|
|
109
107
|
"pg": "^8.11.3",
|
|
110
108
|
"prettier": "^3.1.1",
|
|
111
109
|
"redis": "^4.6.11",
|