node-pluginsmanager-plugin 4.8.3 → 4.8.4

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.
@@ -121,12 +121,15 @@ module.exports = class Server extends MediatorUser {
121
121
  req.params = !checkNonEmptyObject("params", req.params, false) ? req.params : extractParams(req.pattern, pathname);
122
122
 
123
123
  // ensure content length formate
124
- if ("string" === typeof req.headers["content-length"]) {
124
+ if ("undefined" === typeof req.headers["content-length"]) {
125
+ req.headers["content-length"] = 0;
126
+ }
127
+ else if ("string" === typeof req.headers["content-length"]) {
125
128
  req.headers["content-length"] = parseInt(req.headers["content-length"], 10);
126
129
  }
127
130
 
128
- // set default content-typ
129
- if ("string" !== typeof req.headers["content-length"]) {
131
+ // set default content-type
132
+ if ("string" !== typeof req.headers["content-type"]) {
130
133
  req.headers["content-type"] = "application/json";
131
134
  }
132
135
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-pluginsmanager-plugin",
3
- "version": "4.8.3",
3
+ "version": "4.8.4",
4
4
  "description": "An abstract parent plugin for node-pluginsmanager",
5
5
  "main": "lib/main.js",
6
6
  "typings": "lib/index.d.ts",
@@ -39,21 +39,21 @@
39
39
  "express-openapi-validate": "0.6.1"
40
40
  },
41
41
  "devDependencies": {
42
- "@types/node": "17.0.29",
42
+ "@types/node": "17.0.31",
43
43
  "@types/socket.io": "3.0.2",
44
44
  "@types/ws": "8.5.3",
45
45
  "check-version-modules": "1.3.5",
46
46
  "coveralls": "3.1.1",
47
47
  "colors": "1.4.0",
48
48
  "eslint": "8.14.0",
49
- "express": "4.18.0",
49
+ "express": "4.18.1",
50
50
  "husky": "7.0.4",
51
- "mocha": "9.2.2",
51
+ "mocha": "10.0.0",
52
52
  "nyc": "15.1.0",
53
53
  "socket.io": "4.5.0",
54
54
  "socket.io-client": "4.5.0",
55
- "typescript": "4.6.3",
56
- "ws": "8.5.0"
55
+ "typescript": "4.6.4",
56
+ "ws": "8.6.0"
57
57
  },
58
58
  "homepage": "https://github.com/Psychopoulet/node-pluginsmanager-plugin#readme",
59
59
  "engines": {
@@ -1,17 +0,0 @@
1
- "use strict";
2
-
3
- // module
4
-
5
- module.exports = function errToString (err) {
6
-
7
- if ("string" === typeof err) {
8
- return err;
9
- }
10
- else if ("object" === typeof err && err.message) {
11
- return err.message;
12
- }
13
- else {
14
- return "";
15
- }
16
-
17
- };