itrm-tools 1.2.2 → 1.2.3

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,11 +1,5 @@
1
1
  import { Express } from "express";
2
- import cors from "cors";
3
2
  import { ExpressConfiguration } from "../ExpressConfiguration";
4
3
  export declare class ExpressStandardConfiguration implements ExpressConfiguration {
5
4
  apply(app: Express): void;
6
- static getCorsConfiguration(): (req: cors.CorsRequest, res: {
7
- statusCode?: number | undefined;
8
- setHeader(key: string, value: string): any;
9
- end(): any;
10
- }, next: (err?: any) => any) => void;
11
5
  }
@@ -5,25 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ExpressStandardConfiguration = void 0;
7
7
  const express_1 = __importDefault(require("express"));
8
- const cors_1 = __importDefault(require("cors"));
9
- const APIService_1 = require("../APIService");
10
8
  class ExpressStandardConfiguration {
11
9
  apply(app) {
12
- app.use(ExpressStandardConfiguration.getCorsConfiguration());
13
10
  app.use(express_1.default.json({ limit: '50mb' }));
14
11
  app.use(express_1.default.urlencoded({ limit: '50mb', extended: true }));
15
- //app.use(urlencoded({ extended: true }));
16
- }
17
- static getCorsConfiguration() {
18
- return (0, cors_1.default)({
19
- origin: function (origin, callback) {
20
- let whitelist = APIService_1.ITRMAPIServiceGlobal.whitelist;
21
- if (whitelist.length == 0 || (origin && whitelist.indexOf(origin) !== -1))
22
- callback(null, true);
23
- else
24
- callback(new Error('Not allowed by CORS'), false);
25
- }
26
- });
27
12
  }
28
13
  }
29
14
  exports.ExpressStandardConfiguration = ExpressStandardConfiguration;
@@ -1 +1 @@
1
- {"version":3,"file":"ExpressStandardConfiguration.js","sourceRoot":"","sources":["../../../src/api/express/ExpressStandardConfiguration.ts"],"names":[],"mappings":";;;;;;AAAA,sDAA2C;AAC3C,gDAAwB;AAExB,8CAAqD;AAGrD,MAAa,4BAA4B;IAC9B,KAAK,CAAC,G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oEAKC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itrm-tools",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -38,17 +38,17 @@
38
38
  "@types/express": "^5.0.3",
39
39
  "@types/jest": "^30.0.0",
40
40
  "@types/morgan": "^1.9.10",
41
- "@types/multer": "^1.4.13",
42
- "@types/node": "^24.0.4",
41
+ "@types/multer": "^2.0.0",
42
+ "@types/node": "^24.1.0",
43
43
  "@types/swagger-ui-express": "^4.1.8",
44
44
  "@types/uuid": "^10.0.0",
45
45
  "@types/ws": "^8.18.1",
46
46
  "axios-mock-adapter": "^2.1.0",
47
- "jest": "^30.0.3",
47
+ "jest": "^30.0.5",
48
48
  "jest-puppeteer": "^11.0.0",
49
49
  "mongodb-memory-server": "^10.1.4",
50
- "puppeteer": "^24.10.2",
51
- "redis": "^5.5.6",
50
+ "puppeteer": "^24.15.0",
51
+ "redis": "^5.6.1",
52
52
  "rimraf": "^6.0.1",
53
53
  "sqlite3": "^5.1.7",
54
54
  "ts-jest": "^29.4.0",
@@ -56,20 +56,18 @@
56
56
  "uuid": "^11.1.0"
57
57
  },
58
58
  "dependencies": {
59
- "axios": "^1.10.0",
59
+ "axios": "^1.11.0",
60
60
  "axios-retry": "^4.5.0",
61
- "body-parser": "^2.2.0",
62
- "cors": "^2.8.5",
63
61
  "crypto-js": "^4.2.0",
64
62
  "express": "^5.1.0",
65
63
  "https": "^1.0.0",
66
- "mongoose": "^8.16.0",
64
+ "mongoose": "^8.16.5",
67
65
  "morgan": "^1.10.0",
68
66
  "multer": "^2.0.1",
69
- "pg": "^8.16.2",
67
+ "pg": "^8.16.3",
70
68
  "pg-hstore": "^2.3.4",
71
69
  "sequelize": "^6.37.7",
72
70
  "swagger-ui-express": "^5.0.1",
73
- "ws": "^8.18.2"
71
+ "ws": "^8.18.3"
74
72
  }
75
73
  }