@hmcts/opal-frontend-common-node 0.0.9 → 0.0.10
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/helmet/index.d.ts +2 -0
- package/helmet/index.d.ts.map +1 -1
- package/helmet/index.js +5 -5
- package/helmet/index.js.map +1 -1
- package/package.json +3 -3
package/helmet/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as express from 'express';
|
|
2
2
|
/**
|
|
3
3
|
* Module that enables helmet in the application
|
|
4
|
+
* Removed redundant google fonts and aligned with rpx-xui-node-lib
|
|
5
|
+
* https://github.com/hmcts/rpx-xui-node-lib/blob/056788aeb79ea2250cc3c8f92f6a5df689367a63/src/common/util/contentSecurityPolicy.ts
|
|
4
6
|
*/
|
|
5
7
|
export declare class Helmet {
|
|
6
8
|
private readonly developmentMode;
|
package/helmet/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helmet/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helmet/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAUnC;;;;GAIG;AACH,qBAAa,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAU;gBAC9B,eAAe,EAAE,OAAO;IAI7B,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;CAsC/D"}
|
package/helmet/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import helmet from 'helmet';
|
|
2
2
|
import { Logger } from '@hmcts/nodejs-logging';
|
|
3
3
|
const logger = Logger.getLogger('helmet');
|
|
4
|
-
const googleAnalyticsDomain = '*.google-analytics.com';
|
|
5
4
|
const self = "'self'";
|
|
6
5
|
const dynatraceDomain = '*.dynatrace.com';
|
|
7
6
|
const LaunchDarklyDomain = '*.launchdarkly.com';
|
|
@@ -9,6 +8,8 @@ const azureDomain = '*.azure.com';
|
|
|
9
8
|
const applicationInsightsDomain = '*.applicationinsights.azure.com';
|
|
10
9
|
/**
|
|
11
10
|
* Module that enables helmet in the application
|
|
11
|
+
* Removed redundant google fonts and aligned with rpx-xui-node-lib
|
|
12
|
+
* https://github.com/hmcts/rpx-xui-node-lib/blob/056788aeb79ea2250cc3c8f92f6a5df689367a63/src/common/util/contentSecurityPolicy.ts
|
|
12
13
|
*/
|
|
13
14
|
export class Helmet {
|
|
14
15
|
developmentMode;
|
|
@@ -21,7 +22,6 @@ export class Helmet {
|
|
|
21
22
|
// include default helmet functions
|
|
22
23
|
const scriptSrc = [
|
|
23
24
|
self,
|
|
24
|
-
googleAnalyticsDomain,
|
|
25
25
|
dynatraceDomain,
|
|
26
26
|
"'sha256-+6WnXIl4mbFTCARd8N3COQmT3bJJmo32N8q8ZSQAIcU='",
|
|
27
27
|
"'unsafe-inline'",
|
|
@@ -38,11 +38,11 @@ export class Helmet {
|
|
|
38
38
|
directives: {
|
|
39
39
|
connectSrc: [self, dynatraceDomain, LaunchDarklyDomain, azureDomain, applicationInsightsDomain],
|
|
40
40
|
defaultSrc: ["'none'"],
|
|
41
|
-
fontSrc: [self, 'data:'
|
|
42
|
-
imgSrc: [self
|
|
41
|
+
fontSrc: [self, 'data:'],
|
|
42
|
+
imgSrc: [self],
|
|
43
43
|
objectSrc: [self],
|
|
44
44
|
scriptSrc,
|
|
45
|
-
styleSrc: [self, "'unsafe-inline'"
|
|
45
|
+
styleSrc: [self, "'unsafe-inline'"],
|
|
46
46
|
scriptSrcAttr: ["'unsafe-inline'"],
|
|
47
47
|
},
|
|
48
48
|
},
|
package/helmet/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../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V,UAAU,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,kBAAkB,EAAE,WAAW,EAAE,yBAAyB,CAAC;wBAC/F,UAAU,EAAE,CAAC,QAAQ,CAAC;wBACtB,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC;wBACxB,MAAM,EAAE,CAAC,IAAI,CAAC;wBACd,SAAS,EAAE,CAAC,IAAI,CAAC;wBACjB,SAAS;wBACT,QAAQ,EAAE,CAAC,IAAI,EAAE,iBAAiB,CAAC;wBACnC,aAAa,EAAE,CAAC,iBAAiB,CAAC;qBACnC;iBACF;gBACD,cAAc,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;aACrC,CAAC,CACH,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hmcts/opal-frontend-common-node",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.10",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Common nodejs library components for opal",
|
|
7
7
|
"main": "dist/index",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"@types/luxon": "^3.4.2",
|
|
45
45
|
"@types/node": "^22.0.0",
|
|
46
46
|
"@types/session-file-store": "^1.2.5",
|
|
47
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
48
|
-
"@typescript-eslint/parser": "8.
|
|
47
|
+
"@typescript-eslint/eslint-plugin": "8.38.0",
|
|
48
|
+
"@typescript-eslint/parser": "8.38.0",
|
|
49
49
|
"eslint": "^9.0.0",
|
|
50
50
|
"eslint-plugin-prettier": "^5.2.6",
|
|
51
51
|
"typescript": "~5.8.0",
|