itrm-tools 1.2.2-beta.1 → 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.
package/README.md
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
# itrm-tools
|
|
2
|
-
Library design for developing API Services
|
|
1
|
+
# itrm-tools
|
|
2
|
+
Library design for developing API Services
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"ExpressStandardConfiguration.js","sourceRoot":"","sources":["../../../src/api/express/ExpressStandardConfiguration.ts"],"names":[],"mappings":";;;;;;AAAA,sDAA2C;AAG3C,MAAa,4BAA4B;IAC9B,KAAK,CAAC,GAAY;QACrB,GAAG,CAAC,GAAG,CAAC,iBAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;QACzC,GAAG,CAAC,GAAG,CAAC,iBAAO,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACnE,CAAC;CACJ;AALD,oEAKC"}
|
package/package.json
CHANGED
|
@@ -1,76 +1,73 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "itrm-tools",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"files": [
|
|
8
|
-
"/dist"
|
|
9
|
-
],
|
|
10
|
-
"scripts": {
|
|
11
|
-
"build": "rimraf ./dist && tsc --skipLibCheck",
|
|
12
|
-
"publish-lib": "npm run build && npm publish",
|
|
13
|
-
"publish-beta": "npm run build && npm publish --tag beta",
|
|
14
|
-
"publish-dryrun": "npm run build && npm publish --dry-run",
|
|
15
|
-
"link": "npm run build && npm link",
|
|
16
|
-
"test": "npm run build && jest --runInBand --detectOpenHandles",
|
|
17
|
-
"test-silent": "npm run build && jest --runInBand --detectOpenHandles --silent",
|
|
18
|
-
"test-watch": "npm run build && jest --watch --runInBand --detectOpenHandles",
|
|
19
|
-
"test-watch-start": "jest --watch --runInBand --detectOpenHandles",
|
|
20
|
-
"test-coverage": "npm run build && jest --runInBand --detectOpenHandles --silent --coverage"
|
|
21
|
-
},
|
|
22
|
-
"repository": {
|
|
23
|
-
"type": "git",
|
|
24
|
-
"url": "git+https://github.com/ITRMachines/itrm-tools.git"
|
|
25
|
-
},
|
|
26
|
-
"keywords": [],
|
|
27
|
-
"author": "",
|
|
28
|
-
"license": "ISC",
|
|
29
|
-
"bugs": {
|
|
30
|
-
"url": "https://github.com/ITRMachines/itrm-tools/issues"
|
|
31
|
-
},
|
|
32
|
-
"homepage": "https://github.com/ITRMachines/itrm-tools#readme",
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"@sequelize/core": "^7.0.0-alpha.43",
|
|
35
|
-
"@sequelize/sqlite3": "^7.0.0-alpha.43",
|
|
36
|
-
"@types/cors": "^2.8.19",
|
|
37
|
-
"@types/crypto-js": "^4.2.2",
|
|
38
|
-
"@types/express": "^5.0.3",
|
|
39
|
-
"@types/jest": "^30.0.0",
|
|
40
|
-
"@types/morgan": "^1.9.10",
|
|
41
|
-
"@types/multer": "^
|
|
42
|
-
"@types/node": "^24.0
|
|
43
|
-
"@types/swagger-ui-express": "^4.1.8",
|
|
44
|
-
"@types/uuid": "^10.0.0",
|
|
45
|
-
"@types/ws": "^8.18.1",
|
|
46
|
-
"axios-mock-adapter": "^2.1.0",
|
|
47
|
-
"jest": "^30.0.
|
|
48
|
-
"jest-puppeteer": "^11.0.0",
|
|
49
|
-
"mongodb-memory-server": "^10.1.4",
|
|
50
|
-
"puppeteer": "^24.
|
|
51
|
-
"redis": "^5.
|
|
52
|
-
"rimraf": "^6.0.1",
|
|
53
|
-
"sqlite3": "^5.1.7",
|
|
54
|
-
"ts-jest": "^29.4.0",
|
|
55
|
-
"typescript": "^5.8.3",
|
|
56
|
-
"uuid": "^11.1.0"
|
|
57
|
-
},
|
|
58
|
-
"dependencies": {
|
|
59
|
-
"axios": "^1.
|
|
60
|
-
"axios-retry": "^4.5.0",
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"ws": "^8.18.2"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "itrm-tools",
|
|
3
|
+
"version": "1.2.3",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"/dist"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "rimraf ./dist && tsc --skipLibCheck",
|
|
12
|
+
"publish-lib": "npm run build && npm publish",
|
|
13
|
+
"publish-beta": "npm run build && npm publish --tag beta",
|
|
14
|
+
"publish-dryrun": "npm run build && npm publish --dry-run",
|
|
15
|
+
"link": "npm run build && npm link",
|
|
16
|
+
"test": "npm run build && jest --runInBand --detectOpenHandles",
|
|
17
|
+
"test-silent": "npm run build && jest --runInBand --detectOpenHandles --silent",
|
|
18
|
+
"test-watch": "npm run build && jest --watch --runInBand --detectOpenHandles",
|
|
19
|
+
"test-watch-start": "jest --watch --runInBand --detectOpenHandles",
|
|
20
|
+
"test-coverage": "npm run build && jest --runInBand --detectOpenHandles --silent --coverage"
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/ITRMachines/itrm-tools.git"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [],
|
|
27
|
+
"author": "",
|
|
28
|
+
"license": "ISC",
|
|
29
|
+
"bugs": {
|
|
30
|
+
"url": "https://github.com/ITRMachines/itrm-tools/issues"
|
|
31
|
+
},
|
|
32
|
+
"homepage": "https://github.com/ITRMachines/itrm-tools#readme",
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@sequelize/core": "^7.0.0-alpha.43",
|
|
35
|
+
"@sequelize/sqlite3": "^7.0.0-alpha.43",
|
|
36
|
+
"@types/cors": "^2.8.19",
|
|
37
|
+
"@types/crypto-js": "^4.2.2",
|
|
38
|
+
"@types/express": "^5.0.3",
|
|
39
|
+
"@types/jest": "^30.0.0",
|
|
40
|
+
"@types/morgan": "^1.9.10",
|
|
41
|
+
"@types/multer": "^2.0.0",
|
|
42
|
+
"@types/node": "^24.1.0",
|
|
43
|
+
"@types/swagger-ui-express": "^4.1.8",
|
|
44
|
+
"@types/uuid": "^10.0.0",
|
|
45
|
+
"@types/ws": "^8.18.1",
|
|
46
|
+
"axios-mock-adapter": "^2.1.0",
|
|
47
|
+
"jest": "^30.0.5",
|
|
48
|
+
"jest-puppeteer": "^11.0.0",
|
|
49
|
+
"mongodb-memory-server": "^10.1.4",
|
|
50
|
+
"puppeteer": "^24.15.0",
|
|
51
|
+
"redis": "^5.6.1",
|
|
52
|
+
"rimraf": "^6.0.1",
|
|
53
|
+
"sqlite3": "^5.1.7",
|
|
54
|
+
"ts-jest": "^29.4.0",
|
|
55
|
+
"typescript": "^5.8.3",
|
|
56
|
+
"uuid": "^11.1.0"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"axios": "^1.11.0",
|
|
60
|
+
"axios-retry": "^4.5.0",
|
|
61
|
+
"crypto-js": "^4.2.0",
|
|
62
|
+
"express": "^5.1.0",
|
|
63
|
+
"https": "^1.0.0",
|
|
64
|
+
"mongoose": "^8.16.5",
|
|
65
|
+
"morgan": "^1.10.0",
|
|
66
|
+
"multer": "^2.0.1",
|
|
67
|
+
"pg": "^8.16.3",
|
|
68
|
+
"pg-hstore": "^2.3.4",
|
|
69
|
+
"sequelize": "^6.37.7",
|
|
70
|
+
"swagger-ui-express": "^5.0.1",
|
|
71
|
+
"ws": "^8.18.3"
|
|
72
|
+
}
|
|
73
|
+
}
|