@saasquatch/program-boilerplate 3.5.9 → 3.5.11

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/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [3.5.11] - 2021-12-1
11
+
12
+ - Set default payload size limit to 1mb
13
+ - Added MAX_PAYLOAD_SIZE env var to allow easier configuration
14
+ - Fixes payload too large error that can occur during introspection
15
+
10
16
  ## [3.5.9] - 2021-10-20
11
17
 
12
18
  ### Added
@@ -18,5 +24,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
18
24
 
19
25
  ### Removed
20
26
 
21
- [unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/%40saasquatch/program-boilerplate%403.5.9...HEAD
22
- [3.5.9]: https://github.com/olivierlacan/keep-a-changelog/releases/tag/%40saasquatch/program-boilerplate%403.5.9
27
+ [unreleased]: https://github.com/saasquatch/program-tools/compare/%40saasquatch/program-boilerplate%403.5.9...HEAD
28
+ [3.5.9]: https://github.com/saasquatch/program-tools/releases/tag/%40saasquatch/program-boilerplate%403.5.9
package/dist/index.js CHANGED
@@ -34,10 +34,9 @@ Object.defineProperty(exports, "getTriggerSchema", { enumerable: true, get: func
34
34
  * @return {Object} The express server
35
35
  */
36
36
  function webtask(program = {}) {
37
- const bodyParser = require("body-parser");
38
37
  const compression = require("compression");
39
38
  const app = express();
40
- app.use(bodyParser.json());
39
+ app.use(express.json({ limit: process.env.MAX_PAYLOAD_SIZE || "1mb" }));
41
40
  app.use(compression());
42
41
  // Enforce HTTPS. The server does not redirect http -> https
43
42
  // because OWASP advises not to
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saasquatch/program-boilerplate",
3
- "version": "3.5.9",
3
+ "version": "3.5.11",
4
4
  "description": "Boilerplate for writing programs",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -32,7 +32,6 @@
32
32
  "typescript": "^3.9.9"
33
33
  },
34
34
  "dependencies": {
35
- "body-parser": "^1.19.0",
36
35
  "bson-objectid": "^1.3.1",
37
36
  "compression": "^1.7.4",
38
37
  "express": "^4.17.1",