genesys-cloud-streaming-client 19.2.3-connection-logging.1 → 19.2.3-develop.1

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.
@@ -295,7 +295,6 @@ class Client extends events_1.default {
295
295
  }
296
296
  async connect(connectOpts) {
297
297
  var _a;
298
- this.logger.info('Attempting connect');
299
298
  if (this.connecting) {
300
299
  const error = new Error('Already trying to connect streaming client');
301
300
  return this.logger.warn(error);
@@ -457,7 +456,6 @@ class Client extends events_1.default {
457
456
  }
458
457
  async makeConnectionAttempt() {
459
458
  var _a, _b;
460
- this.logger.info('Entering makeConnectionAttempt');
461
459
  if (!navigator.onLine) {
462
460
  throw new offline_error_1.default('Browser is offline, skipping connection attempt');
463
461
  }
@@ -517,13 +515,10 @@ class Client extends events_1.default {
517
515
  }
518
516
  }
519
517
  async prepareForConnect() {
520
- this.logger.info('Entering prepareForConnect');
521
518
  if (this.config.jwt) {
522
519
  this.hardReconnectRequired = false;
523
520
  return this.connectionManager.setConfig(this.config);
524
521
  }
525
- this.logger.info('prepareForConnect: hardReconnectRequired is ', this.hardReconnectRequired);
526
- this.logger.info('prepareForConnect: channelReuses is ', this.channelReuses);
527
522
  if (!this.hardReconnectRequired) {
528
523
  this.channelReuses++;
529
524
  if (this.channelReuses >= MAX_CHANNEL_REUSES) {
@@ -535,7 +530,6 @@ class Client extends events_1.default {
535
530
  if (this.hardReconnectRequired) {
536
531
  let jidPromise;
537
532
  if (this.config.jid) {
538
- this.logger.info('We already have a JID, using that');
539
533
  jidPromise = Promise.resolve(this.config.jid);
540
534
  }
541
535
  else {
@@ -545,7 +539,6 @@ class Client extends events_1.default {
545
539
  authToken: this.config.authToken,
546
540
  logger: this.logger
547
541
  };
548
- this.logger.info('No existing JID, fetching it');
549
542
  jidPromise = await this.http.requestApi('users/me', jidRequestOpts)
550
543
  .then(res => res.data.chat.jabberId);
551
544
  }
@@ -557,7 +550,6 @@ class Client extends events_1.default {
557
550
  authToken: this.config.authToken,
558
551
  logger: this.logger
559
552
  };
560
- this.logger.info('Requesting a channel');
561
553
  const channelPromise = await this.http.requestApi('notifications/channels?connectionType=streaming', channelRequestOpts)
562
554
  .then(res => res.data.id);
563
555
  const [jid, channelId] = await Promise.all([jidPromise, channelPromise]);
@@ -23,7 +23,6 @@ class ConnectionManager {
23
23
  this.config = config;
24
24
  }
25
25
  async getNewStanzaConnection() {
26
- this.logger.info('Getting a new stanza instance');
27
26
  const options = this.getStanzaOptions();
28
27
  const stanza = stanza_1.createClient({});
29
28
  // this is a hack because stanza messes up the auth mechanism priority.
@@ -46,13 +45,9 @@ class ConnectionManager {
46
45
  boundSessionDisconnected = this.handleSessionDisconnected.bind(this, stanza, reject);
47
46
  stanza.on('disconnected', boundSessionDisconnected);
48
47
  stanza.updateConfig(options);
49
- this.logger.info('About to connect stanza');
50
48
  stanza.connect();
51
49
  }, 15 * 1000, 'connecting to streaming service', { channelId, stanzaInstanceId: stanza.id });
52
- connectionAttemptPromise.catch((reason) => {
53
- this.logger.info('Stanza connection failed; ', reason);
54
- void stanza.disconnect();
55
- });
50
+ connectionAttemptPromise.catch(() => stanza.disconnect());
56
51
  return connectionAttemptPromise.finally(() => {
57
52
  stanza.off('raw:incoming', boundCheckForErrorStanza);
58
53
  stanza.off('session:started', boundSessionStarted);
@@ -1,7 +1,7 @@
1
1
  {
2
- "version": "connection-logging",
2
+ "version": "19.2.3-develop",
3
3
  "build": "1",
4
- "buildDate": "2025-07-03T01:21:30.865Z",
4
+ "buildDate": "2025-06-28T03:10:09.944Z",
5
5
  "indexFiles": [
6
6
  {
7
7
  "file": "v19.2.3/streaming-client.browser.js"
package/dist/es/client.js CHANGED
@@ -298,7 +298,6 @@ export class Client extends EventEmitter {
298
298
  connect(connectOpts) {
299
299
  var _a;
300
300
  return __awaiter(this, void 0, void 0, function* () {
301
- this.logger.info('Attempting connect');
302
301
  if (this.connecting) {
303
302
  const error = new Error('Already trying to connect streaming client');
304
303
  return this.logger.warn(error);
@@ -464,7 +463,6 @@ export class Client extends EventEmitter {
464
463
  makeConnectionAttempt() {
465
464
  var _a, _b;
466
465
  return __awaiter(this, void 0, void 0, function* () {
467
- this.logger.info('Entering makeConnectionAttempt');
468
466
  if (!navigator.onLine) {
469
467
  throw new OfflineError('Browser is offline, skipping connection attempt');
470
468
  }
@@ -528,13 +526,10 @@ export class Client extends EventEmitter {
528
526
  }
529
527
  prepareForConnect() {
530
528
  return __awaiter(this, void 0, void 0, function* () {
531
- this.logger.info('Entering prepareForConnect');
532
529
  if (this.config.jwt) {
533
530
  this.hardReconnectRequired = false;
534
531
  return this.connectionManager.setConfig(this.config);
535
532
  }
536
- this.logger.info('prepareForConnect: hardReconnectRequired is ', this.hardReconnectRequired);
537
- this.logger.info('prepareForConnect: channelReuses is ', this.channelReuses);
538
533
  if (!this.hardReconnectRequired) {
539
534
  this.channelReuses++;
540
535
  if (this.channelReuses >= MAX_CHANNEL_REUSES) {
@@ -546,7 +541,6 @@ export class Client extends EventEmitter {
546
541
  if (this.hardReconnectRequired) {
547
542
  let jidPromise;
548
543
  if (this.config.jid) {
549
- this.logger.info('We already have a JID, using that');
550
544
  jidPromise = Promise.resolve(this.config.jid);
551
545
  }
552
546
  else {
@@ -556,7 +550,6 @@ export class Client extends EventEmitter {
556
550
  authToken: this.config.authToken,
557
551
  logger: this.logger
558
552
  };
559
- this.logger.info('No existing JID, fetching it');
560
553
  jidPromise = yield this.http.requestApi('users/me', jidRequestOpts)
561
554
  .then(res => res.data.chat.jabberId);
562
555
  }
@@ -568,7 +561,6 @@ export class Client extends EventEmitter {
568
561
  authToken: this.config.authToken,
569
562
  logger: this.logger
570
563
  };
571
- this.logger.info('Requesting a channel');
572
564
  const channelPromise = yield this.http.requestApi('notifications/channels?connectionType=streaming', channelRequestOpts)
573
565
  .then(res => res.data.id);
574
566
  const [jid, channelId] = yield Promise.all([jidPromise, channelPromise]);
@@ -21,7 +21,6 @@ export class ConnectionManager {
21
21
  }
22
22
  getNewStanzaConnection() {
23
23
  return __awaiter(this, void 0, void 0, function* () {
24
- this.logger.info('Getting a new stanza instance');
25
24
  const options = this.getStanzaOptions();
26
25
  const stanza = createClient({});
27
26
  // this is a hack because stanza messes up the auth mechanism priority.
@@ -44,13 +43,9 @@ export class ConnectionManager {
44
43
  boundSessionDisconnected = this.handleSessionDisconnected.bind(this, stanza, reject);
45
44
  stanza.on('disconnected', boundSessionDisconnected);
46
45
  stanza.updateConfig(options);
47
- this.logger.info('About to connect stanza');
48
46
  stanza.connect();
49
47
  }, 15 * 1000, 'connecting to streaming service', { channelId, stanzaInstanceId: stanza.id });
50
- connectionAttemptPromise.catch((reason) => {
51
- this.logger.info('Stanza connection failed; ', reason);
52
- void stanza.disconnect();
53
- });
48
+ connectionAttemptPromise.catch(() => stanza.disconnect());
54
49
  return connectionAttemptPromise.finally(() => {
55
50
  stanza.off('raw:incoming', boundCheckForErrorStanza);
56
51
  stanza.off('session:started', boundSessionStarted);
@@ -42586,7 +42586,6 @@ class ConnectionManager {
42586
42586
  }
42587
42587
  getNewStanzaConnection() {
42588
42588
  return __awaiter$5(this, void 0, void 0, function* () {
42589
- this.logger.info('Getting a new stanza instance');
42590
42589
  const options = this.getStanzaOptions();
42591
42590
  const stanza$1 = stanza.createClient({});
42592
42591
  // this is a hack because stanza messes up the auth mechanism priority.
@@ -42609,13 +42608,9 @@ class ConnectionManager {
42609
42608
  boundSessionDisconnected = this.handleSessionDisconnected.bind(this, stanza$1, reject);
42610
42609
  stanza$1.on('disconnected', boundSessionDisconnected);
42611
42610
  stanza$1.updateConfig(options);
42612
- this.logger.info('About to connect stanza');
42613
42611
  stanza$1.connect();
42614
42612
  }, 15 * 1000, 'connecting to streaming service', { channelId, stanzaInstanceId: stanza$1.id });
42615
- connectionAttemptPromise.catch((reason) => {
42616
- this.logger.info('Stanza connection failed; ', reason);
42617
- void stanza$1.disconnect();
42618
- });
42613
+ connectionAttemptPromise.catch(() => stanza$1.disconnect());
42619
42614
  return connectionAttemptPromise.finally(() => {
42620
42615
  stanza$1.off('raw:incoming', boundCheckForErrorStanza);
42621
42616
  stanza$1.off('session:started', boundSessionStarted);
@@ -43185,7 +43180,6 @@ class Client extends EventEmitter {
43185
43180
  connect(connectOpts) {
43186
43181
  var _a;
43187
43182
  return __awaiter$5(this, void 0, void 0, function* () {
43188
- this.logger.info('Attempting connect');
43189
43183
  if (this.connecting) {
43190
43184
  const error = new Error('Already trying to connect streaming client');
43191
43185
  return this.logger.warn(error);
@@ -43351,7 +43345,6 @@ class Client extends EventEmitter {
43351
43345
  makeConnectionAttempt() {
43352
43346
  var _a, _b;
43353
43347
  return __awaiter$5(this, void 0, void 0, function* () {
43354
- this.logger.info('Entering makeConnectionAttempt');
43355
43348
  if (!navigator.onLine) {
43356
43349
  throw new OfflineError('Browser is offline, skipping connection attempt');
43357
43350
  }
@@ -43415,13 +43408,10 @@ class Client extends EventEmitter {
43415
43408
  }
43416
43409
  prepareForConnect() {
43417
43410
  return __awaiter$5(this, void 0, void 0, function* () {
43418
- this.logger.info('Entering prepareForConnect');
43419
43411
  if (this.config.jwt) {
43420
43412
  this.hardReconnectRequired = false;
43421
43413
  return this.connectionManager.setConfig(this.config);
43422
43414
  }
43423
- this.logger.info('prepareForConnect: hardReconnectRequired is ', this.hardReconnectRequired);
43424
- this.logger.info('prepareForConnect: channelReuses is ', this.channelReuses);
43425
43415
  if (!this.hardReconnectRequired) {
43426
43416
  this.channelReuses++;
43427
43417
  if (this.channelReuses >= MAX_CHANNEL_REUSES) {
@@ -43433,7 +43423,6 @@ class Client extends EventEmitter {
43433
43423
  if (this.hardReconnectRequired) {
43434
43424
  let jidPromise;
43435
43425
  if (this.config.jid) {
43436
- this.logger.info('We already have a JID, using that');
43437
43426
  jidPromise = Promise.resolve(this.config.jid);
43438
43427
  }
43439
43428
  else {
@@ -43443,7 +43432,6 @@ class Client extends EventEmitter {
43443
43432
  authToken: this.config.authToken,
43444
43433
  logger: this.logger
43445
43434
  };
43446
- this.logger.info('No existing JID, fetching it');
43447
43435
  jidPromise = yield this.http.requestApi('users/me', jidRequestOpts)
43448
43436
  .then(res => res.data.chat.jabberId);
43449
43437
  }
@@ -43455,7 +43443,6 @@ class Client extends EventEmitter {
43455
43443
  authToken: this.config.authToken,
43456
43444
  logger: this.logger
43457
43445
  };
43458
- this.logger.info('Requesting a channel');
43459
43446
  const channelPromise = yield this.http.requestApi('notifications/channels?connectionType=streaming', channelRequestOpts)
43460
43447
  .then(res => res.data.id);
43461
43448
  const [jid, channelId] = yield Promise.all([jidPromise, channelPromise]);
@@ -1,7 +1,7 @@
1
1
  {
2
- "version": "connection-logging",
2
+ "version": "19.2.3-develop",
3
3
  "build": "1",
4
- "buildDate": "2025-07-03T01:21:30.865Z",
4
+ "buildDate": "2025-06-28T03:10:09.944Z",
5
5
  "indexFiles": [
6
6
  {
7
7
  "file": "v19.2.3/streaming-client.browser.js"
@@ -295,7 +295,6 @@ class Client extends events_1.default {
295
295
  }
296
296
  async connect(connectOpts) {
297
297
  var _a;
298
- this.logger.info('Attempting connect');
299
298
  if (this.connecting) {
300
299
  const error = new Error('Already trying to connect streaming client');
301
300
  return this.logger.warn(error);
@@ -457,7 +456,6 @@ class Client extends events_1.default {
457
456
  }
458
457
  async makeConnectionAttempt() {
459
458
  var _a, _b;
460
- this.logger.info('Entering makeConnectionAttempt');
461
459
  if (!navigator.onLine) {
462
460
  throw new offline_error_1.default('Browser is offline, skipping connection attempt');
463
461
  }
@@ -517,13 +515,10 @@ class Client extends events_1.default {
517
515
  }
518
516
  }
519
517
  async prepareForConnect() {
520
- this.logger.info('Entering prepareForConnect');
521
518
  if (this.config.jwt) {
522
519
  this.hardReconnectRequired = false;
523
520
  return this.connectionManager.setConfig(this.config);
524
521
  }
525
- this.logger.info('prepareForConnect: hardReconnectRequired is ', this.hardReconnectRequired);
526
- this.logger.info('prepareForConnect: channelReuses is ', this.channelReuses);
527
522
  if (!this.hardReconnectRequired) {
528
523
  this.channelReuses++;
529
524
  if (this.channelReuses >= MAX_CHANNEL_REUSES) {
@@ -535,7 +530,6 @@ class Client extends events_1.default {
535
530
  if (this.hardReconnectRequired) {
536
531
  let jidPromise;
537
532
  if (this.config.jid) {
538
- this.logger.info('We already have a JID, using that');
539
533
  jidPromise = Promise.resolve(this.config.jid);
540
534
  }
541
535
  else {
@@ -545,7 +539,6 @@ class Client extends events_1.default {
545
539
  authToken: this.config.authToken,
546
540
  logger: this.logger
547
541
  };
548
- this.logger.info('No existing JID, fetching it');
549
542
  jidPromise = await this.http.requestApi('users/me', jidRequestOpts)
550
543
  .then(res => res.data.chat.jabberId);
551
544
  }
@@ -557,7 +550,6 @@ class Client extends events_1.default {
557
550
  authToken: this.config.authToken,
558
551
  logger: this.logger
559
552
  };
560
- this.logger.info('Requesting a channel');
561
553
  const channelPromise = await this.http.requestApi('notifications/channels?connectionType=streaming', channelRequestOpts)
562
554
  .then(res => res.data.id);
563
555
  const [jid, channelId] = await Promise.all([jidPromise, channelPromise]);
@@ -23,7 +23,6 @@ class ConnectionManager {
23
23
  this.config = config;
24
24
  }
25
25
  async getNewStanzaConnection() {
26
- this.logger.info('Getting a new stanza instance');
27
26
  const options = this.getStanzaOptions();
28
27
  const stanza = stanza_1.createClient({});
29
28
  // this is a hack because stanza messes up the auth mechanism priority.
@@ -46,13 +45,9 @@ class ConnectionManager {
46
45
  boundSessionDisconnected = this.handleSessionDisconnected.bind(this, stanza, reject);
47
46
  stanza.on('disconnected', boundSessionDisconnected);
48
47
  stanza.updateConfig(options);
49
- this.logger.info('About to connect stanza');
50
48
  stanza.connect();
51
49
  }, 15 * 1000, 'connecting to streaming service', { channelId, stanzaInstanceId: stanza.id });
52
- connectionAttemptPromise.catch((reason) => {
53
- this.logger.info('Stanza connection failed; ', reason);
54
- void stanza.disconnect();
55
- });
50
+ connectionAttemptPromise.catch(() => stanza.disconnect());
56
51
  return connectionAttemptPromise.finally(() => {
57
52
  stanza.off('raw:incoming', boundCheckForErrorStanza);
58
53
  stanza.off('session:started', boundSessionStarted);