@datatruck/cli 0.36.6 → 0.36.7

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.
@@ -686,6 +686,9 @@
686
686
  }
687
687
  ]
688
688
  },
689
+ "keepAliveTimeout": {
690
+ "type": "number"
691
+ },
689
692
  "allowlist": {
690
693
  "type": "object",
691
694
  "properties": {
@@ -14,6 +14,7 @@ export type DatatruckRepositoryServerOptions = {
14
14
  trustProxy?: true | {
15
15
  remoteAddressHeader: string;
16
16
  };
17
+ keepAliveTimeout?: number;
17
18
  allowlist?: {
18
19
  /**
19
20
  * @default true
@@ -58,7 +58,7 @@ const getRemoteAddress = (req, options) => {
58
58
  };
59
59
  function createDatatruckRepositoryServer(inOptions, config = {}) {
60
60
  const counter = new math_1.Counter();
61
- return (0, http_2.createServer)(async (req, res) => {
61
+ const server = (0, http_2.createServer)(async (req, res) => {
62
62
  const url = req.url || "";
63
63
  if (url === "/" || url === "/favicon.ico")
64
64
  return res.end();
@@ -132,5 +132,8 @@ function createDatatruckRepositoryServer(inOptions, config = {}) {
132
132
  res.end();
133
133
  }
134
134
  });
135
+ if (typeof inOptions.keepAliveTimeout === "number")
136
+ server.keepAliveTimeout = inOptions.keepAliveTimeout;
137
+ return server;
135
138
  }
136
139
  exports.createDatatruckRepositoryServer = createDatatruckRepositoryServer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datatruck/cli",
3
- "version": "0.36.6",
3
+ "version": "0.36.7",
4
4
  "description": "Tool for creating and managing backups",
5
5
  "homepage": "https://github.com/swordev/datatruck#readme",
6
6
  "bugs": {