systemlynx 1.7.1 → 1.8.2
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/index.test.js
CHANGED
package/package.json
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "systemlynx",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "node index.js",
|
|
8
|
-
"test": "jest --verbose
|
|
8
|
+
"test": "jest --verbose"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"
|
|
12
|
-
"express": "^4.16.4",
|
|
11
|
+
"express": "^4.18.2",
|
|
13
12
|
"mime": "^2.4.0",
|
|
14
13
|
"multer": "^1.4.2",
|
|
15
14
|
"request": "^2.88.0",
|
package/systemlynx/App/App.js
CHANGED
|
@@ -73,7 +73,7 @@ module.exports = function SystemLynxRouter(server, config) {
|
|
|
73
73
|
if (!isEmpty(query) && !args.length) args.push(query);
|
|
74
74
|
if (isObject(args[0]) && method === "PUT") args[0] = { ...args[0], file, files };
|
|
75
75
|
|
|
76
|
-
const results = Module[fn].apply(Module, args);
|
|
76
|
+
const results = Module[fn].apply({ ...Module, req, res }, args);
|
|
77
77
|
|
|
78
78
|
if (isPromise(results)) {
|
|
79
79
|
results.then(sendResponse).catch(sendError);
|
|
@@ -6,7 +6,6 @@ module.exports = function SystemLynxServer() {
|
|
|
6
6
|
const express = require("express");
|
|
7
7
|
const server = express();
|
|
8
8
|
//express middleware
|
|
9
|
-
const bodyParser = require("body-parser");
|
|
10
9
|
const multer = require("multer");
|
|
11
10
|
//express file upload middleware setup
|
|
12
11
|
const TEMP_LOCATION = "./temp";
|
|
@@ -36,7 +35,7 @@ module.exports = function SystemLynxServer() {
|
|
|
36
35
|
server.use("/sf", singleFileUpload);
|
|
37
36
|
server.use("/mf", multiFileUpload);
|
|
38
37
|
server.use(express.static(cwd + "/public"));
|
|
39
|
-
server.use(
|
|
38
|
+
server.use(express.json({ limit: "5mb" }));
|
|
40
39
|
|
|
41
40
|
server.use((req, res, next) => {
|
|
42
41
|
res.setHeader("Access-Control-Allow-Origin", "*");
|