@genesislcap/foundation-comms 14.167.3-alpha-b40d1e5.0 → 14.168.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/dts/networkMonitor/service.d.ts.map +1 -1
- package/dist/dts/networkMonitor/types.d.ts +1 -1
- package/dist/dts/networkMonitor/types.d.ts.map +1 -1
- package/dist/esm/networkMonitor/service.js +21 -8
- package/dist/foundation-comms.api.json +1 -1
- package/dist/foundation-comms.d.ts +1 -1
- package/docs/api/foundation-comms.resourcehealth.md +1 -1
- package/docs/api-report.md +1 -1
- package/package.json +11 -11
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/networkMonitor/service.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG1D,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAChF,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EACL,iBAAiB,EAEjB,yBAAyB,EACzB,cAAc,EAEd,kBAAkB,EACnB,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,eAAO,MAAM,aAAa,iDAA4D,CAAC;AAsBvF;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,IAAI,IAAI,CAAC;IACf,OAAO,IAAI,IAAI,CAAC;IAChB;;;OAGG;IACH,YAAY,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/D;;;OAGG;IACH,WAAW,CAAC,QAAQ,EAAE,iBAAiB,EAAE,QAAQ,EAAE,yBAAyB,GAAG,IAAI,CAAC;IACpF;;OAEG;IACH,cAAc,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAC;CACnD;AAED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UAAU,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,YAAY,IAAI,IAAI,CAAC;IACrB;;OAEG;IACH,wBAAwB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CAC9C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAE3D;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC,kBAAkB,CAAC,CAAC;AAEvE;;;;;;;;GAQG;AACH,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,QAAQ,CAAC"}
|
@@ -57,12 +57,19 @@ export class DefaultNetworkMonitor {
|
|
57
57
|
if (!isOnline) {
|
58
58
|
networkLogger.warn(`Network disconnected at ${formattedTimestamp}`);
|
59
59
|
const socket = this.normaliseSerializedSocketStatus(this.socketStatus.serialize(), false);
|
60
|
-
const resources = [...this.resources].reduce((output, [_, metadata]) =>
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
}
|
60
|
+
const resources = [...this.resources].reduce((output, [_, metadata]) => {
|
61
|
+
const existingEntry = output[metadata.resourceName];
|
62
|
+
if (existingEntry) {
|
63
|
+
existingEntry.sourceRef = [...existingEntry.sourceRef, metadata.message.SOURCE_REF];
|
64
|
+
return output;
|
65
|
+
}
|
66
|
+
return Object.assign(Object.assign({}, output), { [metadata.resourceName]: this.normaliseResourceHealth({
|
67
|
+
name: metadata.resourceName,
|
68
|
+
sourceRef: [metadata.message.SOURCE_REF],
|
69
|
+
isConnected: false,
|
70
|
+
lastUpdated: undefined,
|
71
|
+
}, false) });
|
72
|
+
}, {});
|
66
73
|
this.reportSystemHealth({
|
67
74
|
isAuthenticated: socket.hasValidSession,
|
68
75
|
isOnline: false,
|
@@ -147,7 +154,7 @@ export class DefaultNetworkMonitor {
|
|
147
154
|
*/
|
148
155
|
return {
|
149
156
|
name,
|
150
|
-
sourceRef,
|
157
|
+
sourceRef: [sourceRef],
|
151
158
|
isConnected,
|
152
159
|
lastUpdated,
|
153
160
|
lastError,
|
@@ -158,6 +165,11 @@ export class DefaultNetworkMonitor {
|
|
158
165
|
const results = yield Promise.allSettled(allChecks);
|
159
166
|
const resources = results.reduce((prev, curr) => {
|
160
167
|
if (curr.status === 'fulfilled') {
|
168
|
+
const existingEntry = prev[curr.value.name];
|
169
|
+
if (existingEntry) {
|
170
|
+
existingEntry.sourceRef = [...existingEntry.sourceRef, ...curr.value.sourceRef];
|
171
|
+
return prev;
|
172
|
+
}
|
161
173
|
return Object.assign(Object.assign({}, prev), { [curr.value.name]: this.normaliseResourceHealth(curr.value) });
|
162
174
|
}
|
163
175
|
networkLogger.warn(`Unexpected promise rejection occurred. Please check any custom resourceChecks return MonitoredResourceChecksResult.`);
|
@@ -272,7 +284,8 @@ export class DefaultNetworkMonitor {
|
|
272
284
|
var _a;
|
273
285
|
const eventEmitter = (_a = this.config.eventEmitter) !== null && _a !== void 0 ? _a : document;
|
274
286
|
this.status = this.normaliseEventDetail(detail);
|
275
|
-
networkLogger.debug
|
287
|
+
const loggerFn = this.status.isHealthy ? networkLogger.debug : networkLogger.warn;
|
288
|
+
loggerFn(`Emitting 'system-health-changed' event`, this.status);
|
276
289
|
eventEmitter === null || eventEmitter === void 0 ? void 0 : eventEmitter.dispatchEvent(new CustomEvent(SystemHealthChanged, {
|
277
290
|
detail: this.status,
|
278
291
|
bubbles: eventEmitter !== document,
|
@@ -22779,7 +22779,7 @@
|
|
22779
22779
|
},
|
22780
22780
|
{
|
22781
22781
|
"kind": "Content",
|
22782
|
-
"text": " & {\n name: string;\n sourceRef: string;\n lastError?: any;\n}"
|
22782
|
+
"text": " & {\n name: string;\n sourceRef: string[];\n lastError?: any;\n}"
|
22783
22783
|
},
|
22784
22784
|
{
|
22785
22785
|
"kind": "Content",
|
package/docs/api-report.md
CHANGED
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@genesislcap/foundation-comms",
|
3
3
|
"description": "Genesis Foundation UI Comms",
|
4
|
-
"version": "14.
|
4
|
+
"version": "14.168.0",
|
5
5
|
"sideEffects": false,
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
7
7
|
"main": "dist/esm/index.js",
|
@@ -66,13 +66,13 @@
|
|
66
66
|
"test:debug": "genx test --debug"
|
67
67
|
},
|
68
68
|
"devDependencies": {
|
69
|
-
"@genesislcap/foundation-testing": "14.
|
70
|
-
"@genesislcap/genx": "14.
|
71
|
-
"@genesislcap/rollup-builder": "14.
|
72
|
-
"@genesislcap/ts-builder": "14.
|
73
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
74
|
-
"@genesislcap/vite-builder": "14.
|
75
|
-
"@genesislcap/webpack-builder": "14.
|
69
|
+
"@genesislcap/foundation-testing": "14.168.0",
|
70
|
+
"@genesislcap/genx": "14.168.0",
|
71
|
+
"@genesislcap/rollup-builder": "14.168.0",
|
72
|
+
"@genesislcap/ts-builder": "14.168.0",
|
73
|
+
"@genesislcap/uvu-playwright-builder": "14.168.0",
|
74
|
+
"@genesislcap/vite-builder": "14.168.0",
|
75
|
+
"@genesislcap/webpack-builder": "14.168.0",
|
76
76
|
"@types/js-cookie": "^3.0.2",
|
77
77
|
"@types/json-schema": "^7.0.11",
|
78
78
|
"@types/webappsec-credential-management": "^0.6.2",
|
@@ -80,8 +80,8 @@
|
|
80
80
|
},
|
81
81
|
"dependencies": {
|
82
82
|
"@finos/fdc3": "^1.2.0",
|
83
|
-
"@genesislcap/foundation-logger": "14.
|
84
|
-
"@genesislcap/foundation-utils": "14.
|
83
|
+
"@genesislcap/foundation-logger": "14.168.0",
|
84
|
+
"@genesislcap/foundation-utils": "14.168.0",
|
85
85
|
"@microsoft/fast-element": "^1.12.0",
|
86
86
|
"@microsoft/fast-foundation": "^2.49.4",
|
87
87
|
"analytics": "^0.8.0",
|
@@ -100,5 +100,5 @@
|
|
100
100
|
"publishConfig": {
|
101
101
|
"access": "public"
|
102
102
|
},
|
103
|
-
"gitHead": "
|
103
|
+
"gitHead": "5c2dfe8431713254545105d0ce1da29bc62ff483"
|
104
104
|
}
|