@hmcts/rpx-xui-node-lib 2.30.14-exui-3692 → 2.30.15-package-update
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/common/util/debug.logger.d.ts.map +1 -1
- package/dist/common/util/debug.logger.js +2 -3
- package/dist/common/util/debug.logger.js.map +1 -1
- package/dist/session/models/redisSessionStore.class.d.ts +6 -6
- package/dist/session/models/redisSessionStore.class.d.ts.map +1 -1
- package/dist/session/models/redisSessionStore.class.js +15 -46
- package/dist/session/models/redisSessionStore.class.js.map +1 -1
- package/package.json +4 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug.logger.d.ts","sourceRoot":"","sources":["../../../src/common/util/debug.logger.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,SAAS;IACtB,GAAG,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IAC5B,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IAC7B,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IAC7B,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;CACjC;AAMD,eAAO,MAAM,SAAS,GAAI,WAAW,MAAM,EAAE,kBAAe,KAAG,
|
|
1
|
+
{"version":3,"file":"debug.logger.d.ts","sourceRoot":"","sources":["../../../src/common/util/debug.logger.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,SAAS;IACtB,GAAG,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IAC5B,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IAC7B,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IAC7B,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;CACjC;AAMD,eAAO,MAAM,SAAS,GAAI,WAAW,MAAM,EAAE,kBAAe,KAAG,SAmB9D,CAAA"}
|
|
@@ -18,9 +18,8 @@ const getLogger = (namespace, delimiter = ':') => {
|
|
|
18
18
|
}
|
|
19
19
|
logger = cache.get(newNamespace);
|
|
20
20
|
});
|
|
21
|
-
//
|
|
22
|
-
|
|
23
|
-
logger.log = (...args) => console.info(...args);
|
|
21
|
+
// Make everything go to stdout so that AppInsights will pick it up in Traces
|
|
22
|
+
logger.log = console.info.bind(console);
|
|
24
23
|
return {
|
|
25
24
|
log: logger,
|
|
26
25
|
warn: logger,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug.logger.js","sourceRoot":"","sources":["../../../src/common/util/debug.logger.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AASzB,MAAM,KAAK,GAAgC,IAAI,GAAG,EAA0B,CAAA;AAE5E,IAAI,KAAK,GAAG,CAAC,CAAA;AAEN,MAAM,SAAS,GAAG,CAAC,SAAiB,EAAE,SAAS,GAAG,GAAG,EAAa,EAAE;IACvE,IAAI,MAAM,GAAmB,IAAA,eAAK,EAAC,SAAS,CAAC,CAAA;IAC7C,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,YAAoB,EAAE,EAAE;QACxD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;YAC3B,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAA;YAC7C,SAAS,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;YAC/B,KAAK,CAAC,GAAG,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA;YAClC,KAAK,IAAI,CAAC,CAAA;QACd,CAAC;QACD,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,YAAY,CAAmB,CAAA;IACtD,CAAC,CAAC,CAAA;IACF,
|
|
1
|
+
{"version":3,"file":"debug.logger.js","sourceRoot":"","sources":["../../../src/common/util/debug.logger.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AASzB,MAAM,KAAK,GAAgC,IAAI,GAAG,EAA0B,CAAA;AAE5E,IAAI,KAAK,GAAG,CAAC,CAAA;AAEN,MAAM,SAAS,GAAG,CAAC,SAAiB,EAAE,SAAS,GAAG,GAAG,EAAa,EAAE;IACvE,IAAI,MAAM,GAAmB,IAAA,eAAK,EAAC,SAAS,CAAC,CAAA;IAC7C,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,YAAoB,EAAE,EAAE;QACxD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;YAC3B,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAA;YAC7C,SAAS,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;YAC/B,KAAK,CAAC,GAAG,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA;YAClC,KAAK,IAAI,CAAC,CAAA;QACd,CAAC;QACD,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,YAAY,CAAmB,CAAA;IACtD,CAAC,CAAC,CAAA;IACF,6EAA6E;IAC7E,MAAM,CAAC,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IACvC,OAAO;QACH,GAAG,EAAE,MAAM;QACX,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,MAAM;QACb,IAAI,EAAE,MAAM;KACf,CAAA;AACL,CAAC,CAAA;AAnBY,QAAA,SAAS,aAmBrB"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { RedisSessionMetadata } from './sessionMetadata.interface';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { RedisStore } from 'connect-redis';
|
|
3
|
+
import { RedisClientType } from 'redis';
|
|
4
4
|
import { SessionStore } from './sessionStore.class';
|
|
5
5
|
import { XuiLogger } from '../../common';
|
|
6
6
|
export declare class RedisSessionStore extends SessionStore {
|
|
7
|
-
protected redisClient:
|
|
7
|
+
protected redisClient: RedisClientType;
|
|
8
8
|
constructor(router?: import("express-serve-static-core").Router, logger?: XuiLogger);
|
|
9
|
-
getStore: (options: RedisSessionMetadata) =>
|
|
10
|
-
redisClientReadyListener: (redisClient:
|
|
11
|
-
redisClientErrorListener: (redisClient:
|
|
9
|
+
getStore: (options: RedisSessionMetadata) => RedisStore;
|
|
10
|
+
redisClientReadyListener: (redisClient: RedisClientType) => void;
|
|
11
|
+
redisClientErrorListener: (redisClient: RedisClientType) => void;
|
|
12
12
|
emitEvent: (eventName: string, eventObject: any) => void;
|
|
13
13
|
}
|
|
14
14
|
export declare const redisStore: RedisSessionStore;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redisSessionStore.class.d.ts","sourceRoot":"","sources":["../../../src/session/models/redisSessionStore.class.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"redisSessionStore.class.d.ts","sourceRoot":"","sources":["../../../src/session/models/redisSessionStore.class.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAgB,eAAe,EAAE,MAAM,OAAO,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEnD,OAAO,EAAa,SAAS,EAAE,MAAM,cAAc,CAAA;AAEnD,qBAAa,iBAAkB,SAAQ,YAAY;IAC/C,SAAS,CAAC,WAAW,EAAG,eAAe,CAAA;gBAE3B,MAAM,6CAAgC,EAAE,MAAM,GAAE,SAAsC;IAI3F,QAAQ,GAAI,SAAS,oBAAoB,KAAG,UAAU,CAsB5D;IAKM,wBAAwB,GAAI,aAAa,eAAe,UAM9D;IAEM,wBAAwB,GAAI,aAAa,eAAe,UAM9D;IAEM,SAAS,GAAI,WAAW,MAAM,EAAE,aAAa,GAAG,UAItD;CACJ;AAED,eAAO,MAAM,UAAU,mBAA0B,CAAA"}
|
|
@@ -1,46 +1,9 @@
|
|
|
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 () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
3
|
exports.redisStore = exports.RedisSessionStore = void 0;
|
|
40
4
|
const session_constants_1 = require("../session.constants");
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const redis = __importStar(require("redis"));
|
|
5
|
+
const connect_redis_1 = require("connect-redis");
|
|
6
|
+
const redis_1 = require("redis");
|
|
44
7
|
const sessionStore_class_1 = require("./sessionStore.class");
|
|
45
8
|
const express_1 = require("express");
|
|
46
9
|
const common_1 = require("../../common");
|
|
@@ -48,16 +11,22 @@ class RedisSessionStore extends sessionStore_class_1.SessionStore {
|
|
|
48
11
|
constructor(router = (0, express_1.Router)({ mergeParams: true }), logger = (0, common_1.getLogger)('session:redis')) {
|
|
49
12
|
super(session_constants_1.SESSION.REDIS_STORE_NAME, router, logger);
|
|
50
13
|
this.getStore = (options) => {
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
this.redisClient =
|
|
14
|
+
const ttl = options.redisStoreOptions.redisTtl === undefined
|
|
15
|
+
? undefined
|
|
16
|
+
: Number(options.redisStoreOptions.redisTtl);
|
|
17
|
+
this.redisClient = (0, redis_1.createClient)({
|
|
18
|
+
url: options.redisStoreOptions.redisCloudUrl,
|
|
19
|
+
});
|
|
55
20
|
this.redisClientReadyListener(this.redisClient);
|
|
56
21
|
this.redisClientErrorListener(this.redisClient);
|
|
57
|
-
|
|
58
|
-
|
|
22
|
+
this.redisClient.connect().catch((error) => {
|
|
23
|
+
this.logger.error(error);
|
|
24
|
+
this.emitEvent(session_constants_1.SESSION.EVENT.REDIS_CLIENT_ERROR, error);
|
|
25
|
+
});
|
|
26
|
+
return new connect_redis_1.RedisStore({
|
|
59
27
|
client: this.redisClient,
|
|
60
|
-
|
|
28
|
+
prefix: options.redisStoreOptions.redisKeyPrefix,
|
|
29
|
+
ttl,
|
|
61
30
|
});
|
|
62
31
|
};
|
|
63
32
|
// TODO: This should be a pure function. Remove side effecting on redisClient,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redisSessionStore.class.js","sourceRoot":"","sources":["../../../src/session/models/redisSessionStore.class.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"redisSessionStore.class.js","sourceRoot":"","sources":["../../../src/session/models/redisSessionStore.class.ts"],"names":[],"mappings":";;;AAAA,4DAA8C;AAE9C,iDAA0C;AAC1C,iCAAqD;AACrD,6DAAmD;AACnD,qCAAgC;AAChC,yCAAmD;AAEnD,MAAa,iBAAkB,SAAQ,iCAAY;IAG/C,YAAY,MAAM,GAAG,IAAA,gBAAM,EAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,EAAE,SAAoB,IAAA,kBAAS,EAAC,eAAe,CAAC;QAC9F,KAAK,CAAC,2BAAO,CAAC,gBAAgB,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;QAG5C,aAAQ,GAAG,CAAC,OAA6B,EAAc,EAAE;YAC5D,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC,QAAQ,KAAK,SAAS;gBACxD,CAAC,CAAC,SAAS;gBACX,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAA;YAEhD,IAAI,CAAC,WAAW,GAAG,IAAA,oBAAY,EAAC;gBAC5B,GAAG,EAAE,OAAO,CAAC,iBAAiB,CAAC,aAAa;aAC/C,CAAC,CAAA;YAEF,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;YAC/C,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;YAE/C,IAAI,CAAC,WAAW,CAAC,OAAO,EA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EAAE,EAAE;YACvD,IAAI,IAAI,CAAC,aAAa,CAAC,2BAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,EAAE,CAAC;gBACvD,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAA;YACrC,CAAC;QACL,CAAC,CAAA;IAjDD,CAAC;CAkDJ;AAvDD,8CAuDC;AAEY,QAAA,UAAU,GAAG,IAAI,iBAAiB,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hmcts/rpx-xui-node-lib",
|
|
3
|
-
"version": "2.30.
|
|
3
|
+
"version": "2.30.15-package-update",
|
|
4
4
|
"description": "Common nodejs library components for XUI",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -50,7 +50,6 @@
|
|
|
50
50
|
"@semantic-release/changelog": "^6.0.3",
|
|
51
51
|
"@semantic-release/git": "^10.0.1",
|
|
52
52
|
"@semantic-release/github": "^8.1.0",
|
|
53
|
-
"@types/connect-redis": "^0.0.23",
|
|
54
53
|
"@types/debug": "^4.1.5",
|
|
55
54
|
"@types/express": "^4.17.2",
|
|
56
55
|
"@types/express-session": "1.17.10",
|
|
@@ -85,8 +84,8 @@
|
|
|
85
84
|
},
|
|
86
85
|
"dependencies": {
|
|
87
86
|
"@dr.pogodin/csurf": "^1.14.0",
|
|
88
|
-
"axios": "^1.
|
|
89
|
-
"connect-redis": "^
|
|
87
|
+
"axios": "^1.17.0",
|
|
88
|
+
"connect-redis": "^9.0.0",
|
|
90
89
|
"debug": "^4.3.7",
|
|
91
90
|
"deepmerge": "^4.2.2",
|
|
92
91
|
"express": "^4.20.0",
|
|
@@ -97,7 +96,7 @@
|
|
|
97
96
|
"otplib": "^13.4.0",
|
|
98
97
|
"passport": "^0.7.0",
|
|
99
98
|
"passport-oauth2": "^1.8.0",
|
|
100
|
-
"redis": "^
|
|
99
|
+
"redis": "^6.0.0",
|
|
101
100
|
"session-file-store": "^1.5.0"
|
|
102
101
|
},
|
|
103
102
|
"resolutions": {
|