@webex/webex-core 3.12.0-next.33 → 3.12.0-next.34

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.
@@ -1528,10 +1528,11 @@ const Services = WebexPlugin.extend({
1528
1528
 
1529
1529
  // Race init against a hard timeout so a hung request never leaves
1530
1530
  // `services.ready` false forever - that would stall `webex.ready` and
1531
- // leave the app on a permanent spinner. Timeout is configurable via
1531
+ // leave consumers waiting on it indefinitely. Timeout is configurable via
1532
1532
  // `config.services.catalogInitTimeout` (defaults to 15s in config).
1533
1533
  const initTimeoutMs = this.webex.config?.services?.catalogInitTimeout;
1534
- const timeout = new Promise((_, reject) => {
1534
+
1535
+ const initServiceCatalogsTimeout = new Promise((_, reject) => {
1535
1536
  setTimeout(
1536
1537
  () => reject(new Error(`services: init timed out after ${initTimeoutMs}ms`)),
1537
1538
  initTimeoutMs
@@ -1543,7 +1544,7 @@ const Services = WebexPlugin.extend({
1543
1544
  // `initServiceCatalogs` marks the catalog ready internally once the
1544
1545
  // postauth catalog is collected - even if it loses the timeout race
1545
1546
  // above, so a slow fetch still eventually flips `catalog.isReady`.
1546
- Promise.race([this.initServiceCatalogs(), timeout])
1547
+ Promise.race([this.initServiceCatalogs(), initServiceCatalogsTimeout])
1547
1548
  .catch((error) => {
1548
1549
  this.initFailed = true;
1549
1550
  this.logger.error(
@@ -1554,7 +1555,10 @@ const Services = WebexPlugin.extend({
1554
1555
  } else {
1555
1556
  const {email} = this.webex.config;
1556
1557
 
1557
- Promise.race([this.collectPreauthCatalog(email ? {email} : undefined), timeout])
1558
+ Promise.race([
1559
+ this.collectPreauthCatalog(email ? {email} : undefined),
1560
+ initServiceCatalogsTimeout,
1561
+ ])
1558
1562
  .catch((error) => {
1559
1563
  this.initFailed = true;
1560
1564
  this.logger.error(
@@ -1487,10 +1487,10 @@ const Services = WebexPlugin.extend({
1487
1487
 
1488
1488
  // Race init against a hard timeout so a hung request never leaves
1489
1489
  // `services.ready` false forever - that would stall `webex.ready` and
1490
- // leave the app on a permanent spinner. Timeout is configurable via
1490
+ // leave consumers waiting on it indefinitely. Timeout is configurable via
1491
1491
  // `config.services.catalogInitTimeout` (defaults to 15s in config).
1492
1492
  const initTimeoutMs = this.webex.config?.services?.catalogInitTimeout;
1493
- const timeout = new Promise<never>((_, reject) => {
1493
+ const initServiceCatalogsTimeout = new Promise<never>((_, reject) => {
1494
1494
  setTimeout(
1495
1495
  () => reject(new Error(`services: init timed out after ${initTimeoutMs}ms`)),
1496
1496
  initTimeoutMs
@@ -1502,7 +1502,7 @@ const Services = WebexPlugin.extend({
1502
1502
  // `initServiceCatalogs` marks the catalog ready internally once the
1503
1503
  // postauth catalog is collected - even if it loses the timeout race
1504
1504
  // above, so a slow fetch still eventually flips `catalog.isReady`.
1505
- Promise.race([this.initServiceCatalogs(), timeout])
1505
+ Promise.race([this.initServiceCatalogs(), initServiceCatalogsTimeout])
1506
1506
  .catch((error) => {
1507
1507
  this.initFailed = true;
1508
1508
  this.logger.error(
@@ -1513,7 +1513,10 @@ const Services = WebexPlugin.extend({
1513
1513
  } else {
1514
1514
  const {email} = this.webex.config;
1515
1515
 
1516
- Promise.race([this.collectPreauthCatalog(email ? {email} : undefined), timeout])
1516
+ Promise.race([
1517
+ this.collectPreauthCatalog(email ? {email} : undefined),
1518
+ initServiceCatalogsTimeout,
1519
+ ])
1517
1520
  .catch((error) => {
1518
1521
  this.initFailed = true;
1519
1522
  this.logger.error(