@digest/express 3.1.15 → 3.2.1

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/dist/app.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { Router } from 'express';
1
+ import type { Router } from 'express';
2
2
  import type { ServeStaticOptions } from 'serve-static';
3
3
  export default function (staticPath?: string, baseHref?: any, compression?: boolean, production?: boolean, serveStaticOptions?: ServeStaticOptions): Router;
package/dist/app.js CHANGED
@@ -8,7 +8,7 @@ const scripts_1 = __importDefault(require("@digest/scripts"));
8
8
  const express_1 = require("express");
9
9
  const express_static_gzip_1 = __importDefault(require("express-static-gzip"));
10
10
  const serve_static_1 = __importDefault(require("serve-static"));
11
- const router = express_1.Router();
11
+ const router = (0, express_1.Router)();
12
12
  const defaultServeStaticOptions = {
13
13
  cacheControl: true,
14
14
  maxAge: 31536000,
@@ -24,12 +24,12 @@ function default_1(staticPath = scripts_1.default.staticPath.replace('/bundle',
24
24
  const options = Object.assign(Object.assign({}, defaultServeStaticOptions), serveStaticOptions);
25
25
  if (production &&
26
26
  compression) {
27
- router.use(baseHref, express_static_gzip_1.default(staticPath, {
27
+ router.use(baseHref, (0, express_static_gzip_1.default)(staticPath, {
28
28
  serveStatic: options
29
29
  }));
30
30
  }
31
31
  else {
32
- router.use(baseHref, serve_static_1.default(staticPath, options));
32
+ router.use(baseHref, (0, serve_static_1.default)(staticPath, options));
33
33
  }
34
34
  const defaultIndex = path_1.default.join(staticPath, 'index.html');
35
35
  router.all(`${baseHref}*`, (request, response) => {
package/dist/start.js CHANGED
@@ -26,6 +26,6 @@ const express = __importStar(require("express"));
26
26
  const app_1 = __importDefault(require("./app"));
27
27
  const server_1 = __importDefault(require("./server"));
28
28
  const start = express.default();
29
- start.use(app_1.default());
30
- server_1.default(start);
29
+ start.use((0, app_1.default)());
30
+ (0, server_1.default)(start);
31
31
  exports.default = start;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@digest/express",
3
3
  "title": "Express Digest",
4
4
  "license": "GPL-3.0",
5
- "version": "3.1.15",
5
+ "version": "3.2.1",
6
6
  "description": "Digested Express configurations",
7
7
  "author": "wallzero @wallzeroblog (http://wallzero.com)",
8
8
  "contributors": [
@@ -38,7 +38,7 @@
38
38
  "clean": "rimraf node_modules dist package-lock.json npm-debug.log"
39
39
  },
40
40
  "dependencies": {
41
- "@digest/scripts": "^3.1.15",
41
+ "@digest/scripts": "^3.2.1",
42
42
  "express-static-gzip": "^2.1.1",
43
43
  "serve-static": "^1.14.1"
44
44
  },
@@ -53,5 +53,5 @@
53
53
  "digest",
54
54
  "express"
55
55
  ],
56
- "gitHead": "e6ce4f7beafe527ff14fe0b6427e89adab40626f"
56
+ "gitHead": "38f09129b4ebd032235ee07f06d7fa773e88f23d"
57
57
  }