@microsoft/applicationinsights-react-js 3.3.0-nightly.2204-19 → 3.3.0

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - React Plugin, 3.3.0-nightly.2204-19
2
+ * Application Insights JavaScript SDK - React Plugin, 3.3.0
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -1283,7 +1283,7 @@
1283
1283
  }
1284
1284
 
1285
1285
  var _objDefineProperty = ObjDefineProperty;
1286
- var version = "2.8.0-nightly.2204-19";
1286
+ var version = "2.8.0";
1287
1287
  var instanceName = "." + newId(6);
1288
1288
  var _dataUid = 0;
1289
1289
  function _createAccessor(target, prop, value) {
@@ -1363,20 +1363,20 @@
1363
1363
  var strHasRunFlags = "_hasRun";
1364
1364
  var strGetTelCtx = "_getTelCtx";
1365
1365
  var _chainId = 0;
1366
- function _getNextProxyStart(proxy, config, core, startAt) {
1366
+ function _getNextProxyStart(proxy, core, startAt) {
1367
1367
  while (proxy) {
1368
1368
  if (proxy.getPlugin() === startAt) {
1369
1369
  return proxy;
1370
1370
  }
1371
1371
  proxy = proxy.getNext();
1372
1372
  }
1373
- return createTelemetryProxyChain([startAt], config, core);
1373
+ return createTelemetryProxyChain([startAt], core.config || {}, core);
1374
1374
  }
1375
1375
  function _createInternalContext(telemetryChain, config, core, startAt) {
1376
1376
  var _nextProxy = null;
1377
1377
  var _onComplete = [];
1378
1378
  if (startAt !== null) {
1379
- _nextProxy = startAt ? _getNextProxyStart(telemetryChain, config, core, startAt) : telemetryChain;
1379
+ _nextProxy = startAt ? _getNextProxyStart(telemetryChain, core, startAt) : telemetryChain;
1380
1380
  }
1381
1381
  var context = {
1382
1382
  _next: _moveNext,
@@ -1463,6 +1463,7 @@
1463
1463
  }
1464
1464
  });
1465
1465
  }
1466
+ theConfig = newConfig_1;
1466
1467
  }
1467
1468
  }
1468
1469
  return theConfig;
@@ -1509,7 +1510,8 @@
1509
1510
  context.createNew = _createNew;
1510
1511
  return context;
1511
1512
  }
1512
- function createProcessTelemetryUnloadContext(telemetryChain, config, core, startAt) {
1513
+ function createProcessTelemetryUnloadContext(telemetryChain, core, startAt) {
1514
+ var config = core.config || {};
1513
1515
  var internalContext = _createInternalContext(telemetryChain, config, core, startAt);
1514
1516
  var context = internalContext.ctx;
1515
1517
  function _processNext(unloadState) {
@@ -1522,19 +1524,20 @@
1522
1524
  if (isArray(plugins)) {
1523
1525
  plugins = createTelemetryProxyChain(plugins, config, core, startAt);
1524
1526
  }
1525
- return createProcessTelemetryUnloadContext(plugins || context.getNext(), config, core, startAt);
1527
+ return createProcessTelemetryUnloadContext(plugins || context.getNext(), core, startAt);
1526
1528
  }
1527
1529
  context.processNext = _processNext;
1528
1530
  context.createNew = _createNew;
1529
1531
  return context;
1530
1532
  }
1531
- function createProcessTelemetryUpdateContext(telemetryChain, config, core, startAt) {
1533
+ function createProcessTelemetryUpdateContext(telemetryChain, core, startAt) {
1534
+ var config = core.config || {};
1532
1535
  var internalContext = _createInternalContext(telemetryChain, config, core, startAt);
1533
1536
  var context = internalContext.ctx;
1534
1537
  function _processNext(updateState) {
1535
1538
  return context.iterate(function (plugin) {
1536
- if (isFunction(plugin[strUpdate])) {
1537
- plugin[strUpdate](context, updateState);
1539
+ if (isFunction(plugin.update)) {
1540
+ plugin.update(context, updateState);
1538
1541
  }
1539
1542
  });
1540
1543
  }
@@ -1543,7 +1546,7 @@
1543
1546
  if (isArray(plugins)) {
1544
1547
  plugins = createTelemetryProxyChain(plugins, config, core, startAt);
1545
1548
  }
1546
- return createProcessTelemetryUpdateContext(plugins || context.getNext(), config, core, startAt);
1549
+ return createProcessTelemetryUpdateContext(plugins || context.getNext(), core, startAt);
1547
1550
  }
1548
1551
  context.processNext = _processNext;
1549
1552
  context.createNew = _createNew;
@@ -1635,7 +1638,7 @@
1635
1638
  hasRun = true;
1636
1639
  }
1637
1640
  if (!nextProxy || !hasNextRun) {
1638
- _throwInternal(itemCtx.diagLog(), 1 , 73 , "Plugin [" + plugin.identifier + "] failed during " + name + " - " + dumpObj(error) + ", run flags: " + dumpObj(hasRunContext));
1641
+ _throwInternal(itemCtx.diagLog(), 1 , 73 , "Plugin [" + identifier + "] failed during " + name + " - " + dumpObj(error) + ", run flags: " + dumpObj(hasRunContext));
1639
1642
  }
1640
1643
  }
1641
1644
  }, details, isAsync);
@@ -1649,7 +1652,7 @@
1649
1652
  return false;
1650
1653
  }
1651
1654
  var pluginState = _getPluginState(plugin);
1652
- if (pluginState[strTeardown] || pluginState[strDisabled]) {
1655
+ if (pluginState.teardown || pluginState[strDisabled]) {
1653
1656
  return false;
1654
1657
  }
1655
1658
  if (hasSetNext) {
@@ -1991,12 +1994,13 @@
1991
1994
  _isinitialized = true;
1992
1995
  };
1993
1996
  _self.teardown = function (unloadCtx, unloadState) {
1994
- if (!_self.core || (unloadCtx && _self.core !== unloadCtx.core())) {
1997
+ var core = _self.core;
1998
+ if (!core || (unloadCtx && core !== unloadCtx.core())) {
1995
1999
  return;
1996
2000
  }
1997
2001
  var result;
1998
2002
  var unloadDone = false;
1999
- var theUnloadCtx = unloadCtx || createProcessTelemetryUnloadContext(null, {}, _self.core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);
2003
+ var theUnloadCtx = unloadCtx || createProcessTelemetryUnloadContext(null, core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);
2000
2004
  var theUnloadState = unloadState || {
2001
2005
  reason: 0 ,
2002
2006
  isAsync: false
@@ -2024,12 +2028,13 @@
2024
2028
  return result;
2025
2029
  };
2026
2030
  _self.update = function (updateCtx, updateState) {
2027
- if (!_self.core || (updateCtx && _self.core !== updateCtx.core())) {
2031
+ var core = _self.core;
2032
+ if (!core || (updateCtx && core !== updateCtx.core())) {
2028
2033
  return;
2029
2034
  }
2030
2035
  var result;
2031
2036
  var updateDone = false;
2032
- var theUpdateCtx = updateCtx || createProcessTelemetryUpdateContext(null, {}, _self.core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);
2037
+ var theUpdateCtx = updateCtx || createProcessTelemetryUpdateContext(null, core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);
2033
2038
  var theUpdateState = updateState || {
2034
2039
  reason: 0
2035
2040
  };