@napp/dti-server 3.0.5 → 3.0.7
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/adapter.js +15 -11
- package/package.json +2 -2
package/adapter.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
3
|
-
for (var i = 0,
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
|
+
if (ar || !(i in from)) {
|
|
5
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6
|
+
ar[i] = from[i];
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
6
10
|
};
|
|
7
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
12
|
exports.ServerAdapter = exports.ServerInstance = void 0;
|
|
@@ -130,23 +134,23 @@ var ServerAdapter = /** @class */ (function () {
|
|
|
130
134
|
var _loop_1 = function (it) {
|
|
131
135
|
var befores = it.beforeFuncs || [];
|
|
132
136
|
if (it.method === 'get') {
|
|
133
|
-
_route.get(it.path, __spreadArray(__spreadArray([], befores), [function (req, res, next) {
|
|
137
|
+
_route.get(it.path, __spreadArray(__spreadArray([], befores, true), [function (req, res, next) {
|
|
134
138
|
_this.callAction(it, req, res, next);
|
|
135
|
-
}]));
|
|
139
|
+
}], false));
|
|
136
140
|
}
|
|
137
141
|
else if (it.method === 'post') {
|
|
138
142
|
var bodyparser = this_1.getBodyParser(it);
|
|
139
143
|
if (bodyparser.length === 0) {
|
|
140
|
-
this_1.logger('warn', "not found body parser. name=\""
|
|
144
|
+
this_1.logger('warn', "not found body parser. name=\"".concat(it.name, "\"; bodyMode=\"").concat(it.bodyMode, "\""));
|
|
141
145
|
}
|
|
142
|
-
_route.post(it.path, __spreadArray(__spreadArray(__spreadArray([], bodyparser), befores), [function (req, res, next) {
|
|
146
|
+
_route.post(it.path, __spreadArray(__spreadArray(__spreadArray([], bodyparser, true), befores, true), [function (req, res, next) {
|
|
143
147
|
_this.callAction(it, req, res, next);
|
|
144
|
-
}]));
|
|
148
|
+
}], false));
|
|
145
149
|
}
|
|
146
150
|
else {
|
|
147
|
-
this_1.logger('warn', "not supored method. \""
|
|
151
|
+
this_1.logger('warn', "not supored method. \"".concat(it.method, "\""));
|
|
148
152
|
}
|
|
149
|
-
this_1.logger('info', "["
|
|
153
|
+
this_1.logger('info', "[".concat(it.method, "] ").concat(it.path));
|
|
150
154
|
};
|
|
151
155
|
var this_1 = this;
|
|
152
156
|
for (var _i = 0, _a = this.actions; _i < _a.length; _i++) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@napp/dti-server",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
4
4
|
"description": "data transaction interface server library",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"main": "index.js",
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
"author": "Farcek <farcek@gmail.com>",
|
|
13
13
|
"license": "ISC",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@napp/dti-core": "3.0.
|
|
15
|
+
"@napp/dti-core": "3.0.7"
|
|
16
16
|
}
|
|
17
17
|
}
|