genesys-cloud-streaming-client 15.1.6-develop.47 → 15.1.7-develop.48

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.
@@ -418,7 +418,7 @@ class Client extends events_1.default {
418
418
  return Client.version;
419
419
  }
420
420
  static get version() {
421
- return '15.1.6';
421
+ return '15.1.7';
422
422
  }
423
423
  }
424
424
  exports.Client = Client;
@@ -54,10 +54,14 @@ class HttpClient {
54
54
  .then(boundHandler, boundHandler);
55
55
  }
56
56
  handleResponse(logger, start, params, res) {
57
- var _a;
57
+ var _a, _b, _c;
58
58
  let now = new Date().getTime();
59
59
  let elapsed = (now - start) + 'ms';
60
60
  if (res instanceof axios_1.AxiosError) {
61
+ // sanitize the auth token
62
+ if ((_b = (_a = res.config) === null || _a === void 0 ? void 0 : _a.headers) === null || _b === void 0 ? void 0 : _b.Authorization) {
63
+ res.config.headers.Authorization = 'redacted';
64
+ }
61
65
  // handles request timeout
62
66
  if (res.code === 'ECONNABORTED') {
63
67
  logger.debug(`request error: ${params.url}`, {
@@ -74,7 +78,7 @@ class HttpClient {
74
78
  let body = response.data;
75
79
  let error = {
76
80
  ...res,
77
- text: (_a = response.request) === null || _a === void 0 ? void 0 : _a.response
81
+ text: (_c = response.request) === null || _c === void 0 ? void 0 : _c.response
78
82
  };
79
83
  logger.debug(`request error: ${params.url}`, {
80
84
  message: res.message,
@@ -91,6 +91,7 @@ class GenesysCloudMediaSession {
91
91
  this.peerConnection.close();
92
92
  }
93
93
  }, 2000);
94
+ this.onSessionTerminate(params.reason);
94
95
  }
95
96
  setupStatsGatherer() {
96
97
  this.statsGatherer = new webrtc_stats_gatherer_1.default(this.peerConnection);
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "developercenter-cdn/streaming-client",
3
- "version": "15.1.6",
3
+ "version": "15.1.7",
4
4
  "ecosystem": "pc",
5
5
  "team": "Genesys Client Media (WebRTC)",
6
6
  "indexFiles": [
7
7
  {
8
- "file": "/v15.1.6/streaming-client.browser.ie.js"
8
+ "file": "/v15.1.7/streaming-client.browser.ie.js"
9
9
  },
10
10
  {
11
- "file": "/v15.1.6/streaming-client.browser.js"
11
+ "file": "/v15.1.7/streaming-client.browser.js"
12
12
  },
13
13
  {
14
14
  "file": "/v15/streaming-client.browser.ie.js"
@@ -17,6 +17,6 @@
17
17
  "file": "/v15/streaming-client.browser.js"
18
18
  }
19
19
  ],
20
- "build": "47",
21
- "buildDate": "2023-03-17T22:33:17.809402Z"
20
+ "build": "48",
21
+ "buildDate": "2023-05-08T16:19:11.446549Z"
22
22
  }
package/dist/es/client.js CHANGED
@@ -428,6 +428,6 @@ export class Client extends EventEmitter {
428
428
  return Client.version;
429
429
  }
430
430
  static get version() {
431
- return '15.1.6';
431
+ return '15.1.7';
432
432
  }
433
433
  }
@@ -50,10 +50,14 @@ export class HttpClient {
50
50
  .then(boundHandler, boundHandler);
51
51
  }
52
52
  handleResponse(logger, start, params, res) {
53
- var _a;
53
+ var _a, _b, _c;
54
54
  let now = new Date().getTime();
55
55
  let elapsed = (now - start) + 'ms';
56
56
  if (res instanceof AxiosError) {
57
+ // sanitize the auth token
58
+ if ((_b = (_a = res.config) === null || _a === void 0 ? void 0 : _a.headers) === null || _b === void 0 ? void 0 : _b.Authorization) {
59
+ res.config.headers.Authorization = 'redacted';
60
+ }
57
61
  // handles request timeout
58
62
  if (res.code === 'ECONNABORTED') {
59
63
  logger.debug(`request error: ${params.url}`, {
@@ -68,7 +72,7 @@ export class HttpClient {
68
72
  let status = response.status;
69
73
  let correlationId = response.headers && response.headers[correlationIdHeaderName];
70
74
  let body = response.data;
71
- let error = Object.assign(Object.assign({}, res), { text: (_a = response.request) === null || _a === void 0 ? void 0 : _a.response });
75
+ let error = Object.assign(Object.assign({}, res), { text: (_c = response.request) === null || _c === void 0 ? void 0 : _c.response });
72
76
  logger.debug(`request error: ${params.url}`, {
73
77
  message: res.message,
74
78
  now,
@@ -27958,6 +27958,7 @@ class GenesysCloudMediaSession {
27958
27958
  this.peerConnection.close();
27959
27959
  }
27960
27960
  }, 2000);
27961
+ this.onSessionTerminate(params.reason);
27961
27962
  }
27962
27963
  setupStatsGatherer() {
27963
27964
  this.statsGatherer = new StatsGatherer(this.peerConnection);
@@ -29034,10 +29035,14 @@ class HttpClient {
29034
29035
  .then(boundHandler, boundHandler);
29035
29036
  }
29036
29037
  handleResponse(logger, start, params, res) {
29037
- var _a;
29038
+ var _a, _b, _c;
29038
29039
  let now = new Date().getTime();
29039
29040
  let elapsed = (now - start) + 'ms';
29040
29041
  if (res instanceof axios.AxiosError) {
29042
+ // sanitize the auth token
29043
+ if ((_b = (_a = res.config) === null || _a === void 0 ? void 0 : _a.headers) === null || _b === void 0 ? void 0 : _b.Authorization) {
29044
+ res.config.headers.Authorization = 'redacted';
29045
+ }
29041
29046
  // handles request timeout
29042
29047
  if (res.code === 'ECONNABORTED') {
29043
29048
  logger.debug(`request error: ${params.url}`, {
@@ -29052,7 +29057,7 @@ class HttpClient {
29052
29057
  let status = response.status;
29053
29058
  let correlationId = response.headers && response.headers[correlationIdHeaderName];
29054
29059
  let body = response.data;
29055
- let error = Object.assign(Object.assign({}, res), { text: (_a = response.request) === null || _a === void 0 ? void 0 : _a.response });
29060
+ let error = Object.assign(Object.assign({}, res), { text: (_c = response.request) === null || _c === void 0 ? void 0 : _c.response });
29056
29061
  logger.debug(`request error: ${params.url}`, {
29057
29062
  message: res.message,
29058
29063
  now,
@@ -43934,7 +43939,7 @@ class Client extends EventEmitter {
43934
43939
  return Client.version;
43935
43940
  }
43936
43941
  static get version() {
43937
- return '15.1.6';
43942
+ return '15.1.7';
43938
43943
  }
43939
43944
  }
43940
43945
 
@@ -90,6 +90,7 @@ export class GenesysCloudMediaSession {
90
90
  this.peerConnection.close();
91
91
  }
92
92
  }, 2000);
93
+ this.onSessionTerminate(params.reason);
93
94
  }
94
95
  setupStatsGatherer() {
95
96
  this.statsGatherer = new StatsGatherer(this.peerConnection);
@@ -4,9 +4,14 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
- # [Unreleased](https://github.com/purecloudlabs/genesys-cloud-streaming-client/compare/v15.1.5...HEAD)
7
+ # [Unreleased](https://github.com/purecloudlabs/genesys-cloud-streaming-client/compare/v15.1.6...HEAD)
8
+ ### Fixed
9
+ * [PCM-2141]((https://inindca.atlassian.net/browse/PCM-2141) - Sanitize auth token from error responses
10
+
11
+ # [v15.1.6](https://github.com/purecloudlabs/genesys-cloud-streaming-client/compare/v15.1.5...v15.1.6)
8
12
  ### Fixed
9
13
  * [PCM-2100]((https://inindca.atlassian.net/browse/PCM-2093) - Removed overly noisy data channel message logs.
14
+
10
15
  # [v15.1.5](https://github.com/purecloudlabs/genesys-cloud-streaming-client/compare/v15.1.4...v15.1.5)
11
16
  ### Fixed
12
17
  * [PCM-2093](https://inindca.atlassian.net/browse/PCM-2093) - Fixed error that occurs when connection is disconnected remotely before it has finished connecting
@@ -418,7 +418,7 @@ class Client extends events_1.default {
418
418
  return Client.version;
419
419
  }
420
420
  static get version() {
421
- return '15.1.6';
421
+ return '15.1.7';
422
422
  }
423
423
  }
424
424
  exports.Client = Client;
@@ -54,10 +54,14 @@ class HttpClient {
54
54
  .then(boundHandler, boundHandler);
55
55
  }
56
56
  handleResponse(logger, start, params, res) {
57
- var _a;
57
+ var _a, _b, _c;
58
58
  let now = new Date().getTime();
59
59
  let elapsed = (now - start) + 'ms';
60
60
  if (res instanceof axios_1.AxiosError) {
61
+ // sanitize the auth token
62
+ if ((_b = (_a = res.config) === null || _a === void 0 ? void 0 : _a.headers) === null || _b === void 0 ? void 0 : _b.Authorization) {
63
+ res.config.headers.Authorization = 'redacted';
64
+ }
61
65
  // handles request timeout
62
66
  if (res.code === 'ECONNABORTED') {
63
67
  logger.debug(`request error: ${params.url}`, {
@@ -74,7 +78,7 @@ class HttpClient {
74
78
  let body = response.data;
75
79
  let error = {
76
80
  ...res,
77
- text: (_a = response.request) === null || _a === void 0 ? void 0 : _a.response
81
+ text: (_c = response.request) === null || _c === void 0 ? void 0 : _c.response
78
82
  };
79
83
  logger.debug(`request error: ${params.url}`, {
80
84
  message: res.message,
@@ -91,6 +91,7 @@ class GenesysCloudMediaSession {
91
91
  this.peerConnection.close();
92
92
  }
93
93
  }, 2000);
94
+ this.onSessionTerminate(params.reason);
94
95
  }
95
96
  setupStatsGatherer() {
96
97
  this.statsGatherer = new webrtc_stats_gatherer_1.default(this.peerConnection);