@openforis/arena-server 2.4.7 → 2.5.0
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.
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { RequestHandler } from 'express';
|
|
1
2
|
import { ArenaApp } from '../arenaApp';
|
|
2
3
|
export interface InitAppOptions {
|
|
3
4
|
fileSizeLimit?: number;
|
|
4
5
|
bodyParseLimit?: string;
|
|
5
6
|
skipPublicSchemaDbMigrations?: boolean;
|
|
6
7
|
skipSurveySchemaDbMigrations?: boolean;
|
|
8
|
+
initialMiddlewares?: RequestHandler[];
|
|
7
9
|
}
|
|
8
10
|
export declare const initApp: (options?: InitAppOptions) => ArenaApp;
|
|
@@ -17,8 +17,11 @@ const defaultOptions = {
|
|
|
17
17
|
bodyParseLimit: '5000kb',
|
|
18
18
|
};
|
|
19
19
|
const initApp = (options = defaultOptions) => {
|
|
20
|
-
const { bodyParseLimit, fileSizeLimit } = { ...defaultOptions, ...options };
|
|
20
|
+
const { bodyParseLimit, fileSizeLimit, initialMiddlewares = [] } = { ...defaultOptions, ...options };
|
|
21
21
|
const app = (0, express_1.default)();
|
|
22
|
+
for (const middleware of initialMiddlewares) {
|
|
23
|
+
app.use(middleware);
|
|
24
|
+
}
|
|
22
25
|
if (processEnv_1.ProcessEnv.useHttps) {
|
|
23
26
|
middleware_1.HttpsMiddleware.init(app);
|
|
24
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initApp.js","sourceRoot":"","sources":["../../../src/server/arenaServer/initApp.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"initApp.js","sourceRoot":"","sources":["../../../src/server/arenaServer/initApp.ts"],"names":[],"mappings":";;;;;;AAAA,sDAA0D;AAC1D,4EAAkD;AAClD,8DAAqC;AACrC,kEAAwC;AAExC,sDAAuD;AAEvD,iDAA6C;AAE7C,8CAMsB;AACtB,mCAA+B;AAW/B,MA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AI,CAAC,GAAG,CAAC,CAAA;IAEzB,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,4BAAe,CAAC,WAAW,EAAE,EAAE,CAAA;AACzE,CAAC,CAAA;AArCY,QAAA,OAAO,WAqCnB"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"name": "OpenForis",
|
|
5
5
|
"email": "openforis.arena@gmail.com"
|
|
6
6
|
},
|
|
7
|
-
"version": "2.
|
|
7
|
+
"version": "2.5.0",
|
|
8
8
|
"description": "",
|
|
9
9
|
"main": "dist/index.js",
|
|
10
10
|
"types": "dist/index.d.ts",
|
|
@@ -20,39 +20,39 @@
|
|
|
20
20
|
"@types/jest": "^30.0.0",
|
|
21
21
|
"@types/jsonwebtoken": "^9.0.10",
|
|
22
22
|
"@types/lodash.throttle": "^4.1.9",
|
|
23
|
-
"@types/node": "^26.2
|
|
23
|
+
"@types/node": "^26.6.2",
|
|
24
24
|
"@types/passport": "^1.0.17",
|
|
25
25
|
"@types/passport-jwt": "^4.0.1",
|
|
26
26
|
"@types/passport-local": "^1.0.38",
|
|
27
27
|
"@types/pdfkit": "^0.17.6",
|
|
28
28
|
"@types/supertest": "^7.2.1",
|
|
29
|
-
"@typescript-eslint/eslint-plugin": "^8.70.
|
|
30
|
-
"@typescript-eslint/parser": "^8.70.
|
|
29
|
+
"@typescript-eslint/eslint-plugin": "^8.70.1",
|
|
30
|
+
"@typescript-eslint/parser": "^8.70.1",
|
|
31
31
|
"copyfiles": "^2.4.1",
|
|
32
|
-
"dotenv": "^18.0.
|
|
33
|
-
"eslint": "^10.
|
|
32
|
+
"dotenv": "^18.0.4",
|
|
33
|
+
"eslint": "^10.11.0",
|
|
34
34
|
"husky": "9.1.7",
|
|
35
|
-
"jest": "^30.5.
|
|
35
|
+
"jest": "^30.5.2",
|
|
36
36
|
"lint-staged": "^17.5.1",
|
|
37
37
|
"npm-run-all": "^4.1.5",
|
|
38
|
-
"prettier": "3.9.
|
|
38
|
+
"prettier": "3.9.9",
|
|
39
39
|
"rimraf": "^6.1.3",
|
|
40
|
-
"supertest": "^7.
|
|
41
|
-
"ts-jest": "^29.4.
|
|
40
|
+
"supertest": "^7.3.0",
|
|
41
|
+
"ts-jest": "^29.4.14",
|
|
42
42
|
"ts-node": "^10.9.2",
|
|
43
|
-
"typescript": "
|
|
44
|
-
"typescript-eslint": "^8.70.
|
|
43
|
+
"typescript": "~6.0.3",
|
|
44
|
+
"typescript-eslint": "^8.70.1"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@aws-sdk/client-s3": "^3.
|
|
47
|
+
"@aws-sdk/client-s3": "^3.1141.0",
|
|
48
48
|
"@godaddy/terminus": "^4.12.1",
|
|
49
|
-
"@openforis/arena-core": "^2.3.
|
|
49
|
+
"@openforis/arena-core": "^2.3.10",
|
|
50
50
|
"bcryptjs": "^3.0.3",
|
|
51
51
|
"compression": "^1.8.2",
|
|
52
52
|
"cookie-parser": "^1.4.7",
|
|
53
53
|
"db-migrate": "^0.11.14",
|
|
54
54
|
"db-migrate-pg": "^1.5.2",
|
|
55
|
-
"docx": "^9.7.
|
|
55
|
+
"docx": "^9.7.2",
|
|
56
56
|
"express": "^5.2.1",
|
|
57
57
|
"express-fileupload": "^1.5.2",
|
|
58
58
|
"express-rate-limit": "^8.7.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"passport-local": "^1.0.0",
|
|
68
68
|
"pdfkit": "^0.20.2",
|
|
69
69
|
"pg-promise": "^12.7.1",
|
|
70
|
-
"socket.io": "^4.8.
|
|
70
|
+
"socket.io": "^4.8.4"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
73
73
|
"build": "run-s tsc copy-assets",
|