@alanszp/express 9.2.0 → 10.0.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.
@@ -5,7 +5,7 @@ const body_parser_1 = require("body-parser");
5
5
  const errors_1 = require("@alanszp/errors");
6
6
  const errorView_1 = require("../views/errorView");
7
7
  function jsonBodyParser(options) {
8
- const bodyParser = (0, body_parser_1.json)(options);
8
+ const bodyParser = (0, body_parser_1.json)(Object.assign({ limit: "1mb" }, options));
9
9
  return function jsonBodyParserMiddleware(req, res, next) {
10
10
  try {
11
11
  bodyParser(req, res, (error) => {
@@ -1 +1 @@
1
- {"version":3,"file":"jsonBodyParser.js","sourceRoot":"","sources":["../../src/middlewares/jsonBodyParser.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAEhD,4CAAkD;AAClD,kDAA+C;AAG/C,SAAgB,cAAc,CAAC,OAAqB;IAClD,MAAM,UAAU,GAAG,IAAA,kBAAI,EAAC,OAAO,CAAC,CAAC;IACjC,OAAO,SAAS,wBAAwB,CACtC,GAAmB,EACnB,GAAa,EACb,IAAkB;QAElB,IAAI;YACF,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,KAAe,EAAE,EAAE;gBACvC,IAAI,CAAC,KAAK;oBAAE,OAAO,IAAI,EAAE,CAAC;gBAC1B,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAA,qBAAS,EAAC,IAAI,wBAAe,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;YACzE,CAAC,CAAC,CAAC;SACJ;QAAC,OAAO,KAAc,EAAE;YACvB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAA,qBAAS,EAAC,IAAI,wBAAe,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;SACxE;IACH,CAAC,CAAC;AACJ,CAAC;AAhBD,wCAgBC"}
1
+ {"version":3,"file":"jsonBodyParser.js","sourceRoot":"","sources":["../../src/middlewares/jsonBodyParser.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAEhD,4CAAkD;AAClD,kDAA+C;AAG/C,SAAgB,cAAc,CAAC,OAAqB;IAClD,MAAM,UAAU,GAAG,IAAA,kBAAI,kBAAG,KAAK,EAAE,KAAK,IAAK,OAAO,EAAG,CAAC;IACtD,OAAO,SAAS,wBAAwB,CACtC,GAAmB,EACnB,GAAa,EACb,IAAkB;QAElB,IAAI;YACF,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,KAAe,EAAE,EAAE;gBACvC,IAAI,CAAC,KAAK;oBAAE,OAAO,IAAI,EAAE,CAAC;gBAC1B,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAA,qBAAS,EAAC,IAAI,wBAAe,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;YACzE,CAAC,CAAC,CAAC;SACJ;QAAC,OAAO,KAAc,EAAE;YACvB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAA,qBAAS,EAAC,IAAI,wBAAe,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;SACxE;IACH,CAAC,CAAC;AACJ,CAAC;AAhBD,wCAgBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alanszp/express",
3
- "version": "9.2.0",
3
+ "version": "10.0.0",
4
4
  "description": "Alan's express utils and middlewares.",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -28,22 +28,22 @@
28
28
  "@types/jest": "^28.1.8",
29
29
  "@types/lodash": "^4.14.170",
30
30
  "@types/node": "^15.12.3",
31
- "babel-jest": "^29.0.0",
32
- "eslint-plugin-jest": "^26.8.7",
33
- "jest": "^29.0.0",
31
+ "babel-jest": "^29.7.0",
32
+ "jest": "^29.7.0",
34
33
  "ts-node": "^10.0.0",
35
34
  "tslint": "^6.1.3",
36
35
  "typescript": "^4.3.4"
37
36
  },
38
37
  "dependencies": {
39
- "@alanszp/audit": "^9.0.0",
40
- "@alanszp/errors": "^9.0.0",
41
- "@alanszp/jwt": "^9.2.0",
42
- "@alanszp/logger": "^9.0.0",
43
- "@alanszp/shared-context": "^9.0.0",
44
- "body-parser": "^1.19.0",
38
+ "@alanszp/audit": "^10.0.0",
39
+ "@alanszp/errors": "^10.0.0",
40
+ "@alanszp/jwt": "^10.0.0",
41
+ "@alanszp/logger": "^10.0.0",
42
+ "@alanszp/shared-context": "^10.0.0",
43
+ "@babel/core": "^7.23.9",
44
+ "body-parser": "^1.20.2",
45
45
  "cuid": "^2.1.8",
46
46
  "lodash": "^4.17.21"
47
47
  },
48
- "gitHead": "b9ac5a29570dc262d53ffc6e89815a296ab1f509"
48
+ "gitHead": "e06d4fec832847519814bcf472fdc9fff9ef0829"
49
49
  }
@@ -5,7 +5,7 @@ import { errorView } from "../views/errorView";
5
5
  import { GenericRequest } from "../types/GenericRequest";
6
6
 
7
7
  export function jsonBodyParser(options?: OptionsJson) {
8
- const bodyParser = json(options);
8
+ const bodyParser = json({ limit: "1mb", ...options });
9
9
  return function jsonBodyParserMiddleware(
10
10
  req: GenericRequest,
11
11
  res: Response,