@digest/webpack-express 3.4.3 → 3.4.4
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.js +37 -1
- package/package.json +5 -5
package/dist/app.js
CHANGED
|
@@ -1,14 +1,50 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
29
|
const server_1 = __importDefault(require("@digest/express/dist/server"));
|
|
30
|
+
const scripts_1 = __importDefault(require("@digest/scripts"));
|
|
7
31
|
const connect_slashes_1 = __importDefault(require("connect-slashes"));
|
|
8
32
|
const express_1 = __importDefault(require("express"));
|
|
9
|
-
const helmet_1 =
|
|
33
|
+
const helmet_1 = __importStar(require("helmet"));
|
|
10
34
|
const routers_1 = __importDefault(require("./routers"));
|
|
35
|
+
const { production } = scripts_1.default;
|
|
11
36
|
const app = (0, express_1.default)();
|
|
12
37
|
app.use((0, helmet_1.default)(), routers_1.default, (0, connect_slashes_1.default)(false));
|
|
38
|
+
if (!production) {
|
|
39
|
+
app.use((0, helmet_1.contentSecurityPolicy)({
|
|
40
|
+
directives: {
|
|
41
|
+
defaultSrc: [
|
|
42
|
+
'\'self\'',
|
|
43
|
+
'\'unsafe-inline\''
|
|
44
|
+
],
|
|
45
|
+
upgradeInsecureRequests: null
|
|
46
|
+
}
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
13
49
|
(0, server_1.default)(app);
|
|
14
50
|
exports.default = app;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@digest/webpack-express",
|
|
3
3
|
"title": "Express Webpack Middleware Digest",
|
|
4
4
|
"license": "GPL-3.0",
|
|
5
|
-
"version": "3.4.
|
|
5
|
+
"version": "3.4.4",
|
|
6
6
|
"description": "Digested Express Webpack middleware configurations",
|
|
7
7
|
"author": "wallzero @wallzeroblog (http://wallzero.com)",
|
|
8
8
|
"contributors": [
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"clean": "rimraf node_modules dist package-lock.json npm-debug.log"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@digest/express": "^3.4.
|
|
48
|
-
"@digest/scripts": "^3.4.
|
|
49
|
-
"@digest/webpack": "^3.4.
|
|
47
|
+
"@digest/express": "^3.4.4",
|
|
48
|
+
"@digest/scripts": "^3.4.4",
|
|
49
|
+
"@digest/webpack": "^3.4.4",
|
|
50
50
|
"webpack-dev-middleware": "^5.3.1",
|
|
51
51
|
"webpack-hot-middleware": "^2.25.1"
|
|
52
52
|
},
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"express",
|
|
61
61
|
"webpack"
|
|
62
62
|
],
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "761a5dc78411ab3341afe877605bf82ec7f5c88d"
|
|
64
64
|
}
|