@microsoft/applicationinsights-react-native 2.5.0-nightly.2204-19 → 2.5.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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - React Native Plugin, 2.5.0-nightly.2204-19
2
+ * Application Insights JavaScript SDK - React Native Plugin, 2.5.1
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -1000,7 +1000,7 @@
1000
1000
  }
1001
1001
 
1002
1002
  var _objDefineProperty = ObjDefineProperty;
1003
- var version = "2.8.0-nightly.2204-19";
1003
+ var version = "2.8.1";
1004
1004
  var instanceName = "." + newId(6);
1005
1005
  var _dataUid = 0;
1006
1006
  function _createAccessor(target, prop, value) {
@@ -1080,20 +1080,20 @@
1080
1080
  var strHasRunFlags = "_hasRun";
1081
1081
  var strGetTelCtx = "_getTelCtx";
1082
1082
  var _chainId = 0;
1083
- function _getNextProxyStart(proxy, config, core, startAt) {
1083
+ function _getNextProxyStart(proxy, core, startAt) {
1084
1084
  while (proxy) {
1085
1085
  if (proxy.getPlugin() === startAt) {
1086
1086
  return proxy;
1087
1087
  }
1088
1088
  proxy = proxy.getNext();
1089
1089
  }
1090
- return createTelemetryProxyChain([startAt], config, core);
1090
+ return createTelemetryProxyChain([startAt], core.config || {}, core);
1091
1091
  }
1092
1092
  function _createInternalContext(telemetryChain, config, core, startAt) {
1093
1093
  var _nextProxy = null;
1094
1094
  var _onComplete = [];
1095
1095
  if (startAt !== null) {
1096
- _nextProxy = startAt ? _getNextProxyStart(telemetryChain, config, core, startAt) : telemetryChain;
1096
+ _nextProxy = startAt ? _getNextProxyStart(telemetryChain, core, startAt) : telemetryChain;
1097
1097
  }
1098
1098
  var context = {
1099
1099
  _next: _moveNext,
@@ -1180,6 +1180,7 @@
1180
1180
  }
1181
1181
  });
1182
1182
  }
1183
+ theConfig = newConfig_1;
1183
1184
  }
1184
1185
  }
1185
1186
  return theConfig;
@@ -1226,7 +1227,8 @@
1226
1227
  context.createNew = _createNew;
1227
1228
  return context;
1228
1229
  }
1229
- function createProcessTelemetryUnloadContext(telemetryChain, config, core, startAt) {
1230
+ function createProcessTelemetryUnloadContext(telemetryChain, core, startAt) {
1231
+ var config = core.config || {};
1230
1232
  var internalContext = _createInternalContext(telemetryChain, config, core, startAt);
1231
1233
  var context = internalContext.ctx;
1232
1234
  function _processNext(unloadState) {
@@ -1239,19 +1241,20 @@
1239
1241
  if (isArray(plugins)) {
1240
1242
  plugins = createTelemetryProxyChain(plugins, config, core, startAt);
1241
1243
  }
1242
- return createProcessTelemetryUnloadContext(plugins || context.getNext(), config, core, startAt);
1244
+ return createProcessTelemetryUnloadContext(plugins || context.getNext(), core, startAt);
1243
1245
  }
1244
1246
  context.processNext = _processNext;
1245
1247
  context.createNew = _createNew;
1246
1248
  return context;
1247
1249
  }
1248
- function createProcessTelemetryUpdateContext(telemetryChain, config, core, startAt) {
1250
+ function createProcessTelemetryUpdateContext(telemetryChain, core, startAt) {
1251
+ var config = core.config || {};
1249
1252
  var internalContext = _createInternalContext(telemetryChain, config, core, startAt);
1250
1253
  var context = internalContext.ctx;
1251
1254
  function _processNext(updateState) {
1252
1255
  return context.iterate(function (plugin) {
1253
- if (isFunction(plugin[strUpdate])) {
1254
- plugin[strUpdate](context, updateState);
1256
+ if (isFunction(plugin.update)) {
1257
+ plugin.update(context, updateState);
1255
1258
  }
1256
1259
  });
1257
1260
  }
@@ -1260,7 +1263,7 @@
1260
1263
  if (isArray(plugins)) {
1261
1264
  plugins = createTelemetryProxyChain(plugins, config, core, startAt);
1262
1265
  }
1263
- return createProcessTelemetryUpdateContext(plugins || context.getNext(), config, core, startAt);
1266
+ return createProcessTelemetryUpdateContext(plugins || context.getNext(), core, startAt);
1264
1267
  }
1265
1268
  context.processNext = _processNext;
1266
1269
  context.createNew = _createNew;
@@ -1352,7 +1355,7 @@
1352
1355
  hasRun = true;
1353
1356
  }
1354
1357
  if (!nextProxy || !hasNextRun) {
1355
- _throwInternal(itemCtx.diagLog(), 1 , 73 , "Plugin [" + plugin.identifier + "] failed during " + name + " - " + dumpObj(error) + ", run flags: " + dumpObj(hasRunContext));
1358
+ _throwInternal(itemCtx.diagLog(), 1 , 73 , "Plugin [" + identifier + "] failed during " + name + " - " + dumpObj(error) + ", run flags: " + dumpObj(hasRunContext));
1356
1359
  }
1357
1360
  }
1358
1361
  }, details, isAsync);
@@ -1366,7 +1369,7 @@
1366
1369
  return false;
1367
1370
  }
1368
1371
  var pluginState = _getPluginState(plugin);
1369
- if (pluginState[strTeardown] || pluginState[strDisabled]) {
1372
+ if (pluginState.teardown || pluginState[strDisabled]) {
1370
1373
  return false;
1371
1374
  }
1372
1375
  if (hasSetNext) {
@@ -1463,12 +1466,13 @@
1463
1466
  _isinitialized = true;
1464
1467
  };
1465
1468
  _self.teardown = function (unloadCtx, unloadState) {
1466
- if (!_self.core || (unloadCtx && _self.core !== unloadCtx.core())) {
1469
+ var core = _self.core;
1470
+ if (!core || (unloadCtx && core !== unloadCtx.core())) {
1467
1471
  return;
1468
1472
  }
1469
1473
  var result;
1470
1474
  var unloadDone = false;
1471
- var theUnloadCtx = unloadCtx || createProcessTelemetryUnloadContext(null, {}, _self.core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);
1475
+ var theUnloadCtx = unloadCtx || createProcessTelemetryUnloadContext(null, core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);
1472
1476
  var theUnloadState = unloadState || {
1473
1477
  reason: 0 ,
1474
1478
  isAsync: false
@@ -1496,12 +1500,13 @@
1496
1500
  return result;
1497
1501
  };
1498
1502
  _self.update = function (updateCtx, updateState) {
1499
- if (!_self.core || (updateCtx && _self.core !== updateCtx.core())) {
1503
+ var core = _self.core;
1504
+ if (!core || (updateCtx && core !== updateCtx.core())) {
1500
1505
  return;
1501
1506
  }
1502
1507
  var result;
1503
1508
  var updateDone = false;
1504
- var theUpdateCtx = updateCtx || createProcessTelemetryUpdateContext(null, {}, _self.core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);
1509
+ var theUpdateCtx = updateCtx || createProcessTelemetryUpdateContext(null, core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);
1505
1510
  var theUpdateState = updateState || {
1506
1511
  reason: 0
1507
1512
  };