@microsoft/applicationinsights-react-native 3.0.1-nightly.2301-01 → 3.0.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.
- package/browser/applicationinsights-react-native.js +88 -17
- package/browser/applicationinsights-react-native.js.map +1 -1
- package/browser/applicationinsights-react-native.min.js +2 -2
- package/browser/applicationinsights-react-native.min.js.map +1 -1
- package/dist/applicationinsights-react-native.api.json +15 -5
- package/dist/applicationinsights-react-native.d.ts +1 -1
- package/dist/applicationinsights-react-native.js +88 -17
- package/dist/applicationinsights-react-native.js.map +1 -1
- package/dist/applicationinsights-react-native.min.js +2 -2
- package/dist/applicationinsights-react-native.min.js.map +1 -1
- package/dist/applicationinsights-react-native.rollup.d.ts +1 -1
- package/dist-esm/DeviceInfo/DeviceModule.js +1 -1
- package/dist-esm/DeviceInfo/ReactNativeDeviceInfo.js +1 -1
- package/dist-esm/Interfaces/IDeviceInfoModule.js +1 -1
- package/dist-esm/Interfaces/INativeDevice.js +1 -1
- package/dist-esm/Interfaces/IReactNativePluginConfig.js +1 -1
- package/dist-esm/Interfaces/index.js +1 -1
- package/dist-esm/ReactNativePlugin.js +7 -6
- package/dist-esm/ReactNativePlugin.js.map +1 -1
- package/dist-esm/index.js +1 -1
- package/package.json +83 -86
- package/src/ReactNativePlugin.ts +7 -6
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - React Native Plugin, 3.0.1
|
|
2
|
+
* Application Insights JavaScript SDK - React Native Plugin, 3.0.1
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -472,7 +472,7 @@
|
|
|
472
472
|
}
|
|
473
473
|
return false;
|
|
474
474
|
}
|
|
475
|
-
var isArray = _isArray || _isArrayPoly;
|
|
475
|
+
var isArray$1 = _isArray || _isArrayPoly;
|
|
476
476
|
function _isArrayPoly(obj) {
|
|
477
477
|
return !!(obj && _objToString[_DYN_CALL ](obj) === "[object Array]");
|
|
478
478
|
}
|
|
@@ -606,7 +606,7 @@
|
|
|
606
606
|
}
|
|
607
607
|
for (; idx < argLen; idx++) {
|
|
608
608
|
var arg = theArgs[idx];
|
|
609
|
-
var isArgArray = isArray(arg);
|
|
609
|
+
var isArgArray = isArray$1(arg);
|
|
610
610
|
var isArgObj = isObject(arg);
|
|
611
611
|
for (var prop in arg) {
|
|
612
612
|
var propOk = (isArgArray && (prop in arg)) || (isArgObj && (ObjHasOwnProperty[_DYN_CALL ](arg, prop)));
|
|
@@ -615,10 +615,10 @@
|
|
|
615
615
|
}
|
|
616
616
|
var newValue = arg[prop];
|
|
617
617
|
var isNewArray = void 0;
|
|
618
|
-
if (deep && newValue && ((isNewArray = isArray(newValue)) || isPlainObject(newValue))) {
|
|
618
|
+
if (deep && newValue && ((isNewArray = isArray$1(newValue)) || isPlainObject(newValue))) {
|
|
619
619
|
var clone = extended[prop];
|
|
620
620
|
if (isNewArray) {
|
|
621
|
-
if (!isArray(clone)) {
|
|
621
|
+
if (!isArray$1(clone)) {
|
|
622
622
|
clone = [];
|
|
623
623
|
}
|
|
624
624
|
}
|
|
@@ -937,7 +937,7 @@
|
|
|
937
937
|
_self[_DYN_COMPLETE ] = function () {
|
|
938
938
|
var childTime = 0;
|
|
939
939
|
var childEvts = _self[_DYN_GET_CTX ](PerfEvent[strChildrenContextKey]);
|
|
940
|
-
if (isArray(childEvts)) {
|
|
940
|
+
if (isArray$1(childEvts)) {
|
|
941
941
|
for (var lp = 0; lp < childEvts[_DYN_LENGTH ]; lp++) {
|
|
942
942
|
var childEvt = childEvts[lp];
|
|
943
943
|
if (childEvt) {
|
|
@@ -1070,7 +1070,7 @@
|
|
|
1070
1070
|
}
|
|
1071
1071
|
|
|
1072
1072
|
var _objDefineProperty = ObjDefineProperty;
|
|
1073
|
-
var version = '2.8.
|
|
1073
|
+
var version = '2.8.10';
|
|
1074
1074
|
var instanceName = "." + newId(6);
|
|
1075
1075
|
var _dataUid = 0;
|
|
1076
1076
|
function _createAccessor(target, prop, value) {
|
|
@@ -1288,7 +1288,7 @@
|
|
|
1288
1288
|
}
|
|
1289
1289
|
function _createNew(plugins, startAt) {
|
|
1290
1290
|
if (plugins === void 0) { plugins = null; }
|
|
1291
|
-
if (isArray(plugins)) {
|
|
1291
|
+
if (isArray$1(plugins)) {
|
|
1292
1292
|
plugins = createTelemetryProxyChain(plugins, config, core, startAt);
|
|
1293
1293
|
}
|
|
1294
1294
|
return createProcessTelemetryContext(plugins || context[_DYN_GET_NEXT ](), config, core, startAt);
|
|
@@ -1308,7 +1308,7 @@
|
|
|
1308
1308
|
}
|
|
1309
1309
|
function _createNew(plugins, startAt) {
|
|
1310
1310
|
if (plugins === void 0) { plugins = null; }
|
|
1311
|
-
if (isArray(plugins)) {
|
|
1311
|
+
if (isArray$1(plugins)) {
|
|
1312
1312
|
plugins = createTelemetryProxyChain(plugins, config, core, startAt);
|
|
1313
1313
|
}
|
|
1314
1314
|
return createProcessTelemetryUnloadContext(plugins || context[_DYN_GET_NEXT ](), core, startAt);
|
|
@@ -1330,7 +1330,7 @@
|
|
|
1330
1330
|
}
|
|
1331
1331
|
function _createNew(plugins, startAt) {
|
|
1332
1332
|
if (plugins === void 0) { plugins = null; }
|
|
1333
|
-
if (isArray(plugins)) {
|
|
1333
|
+
if (isArray$1(plugins)) {
|
|
1334
1334
|
plugins = createTelemetryProxyChain(plugins, config, core, startAt);
|
|
1335
1335
|
}
|
|
1336
1336
|
return createProcessTelemetryUpdateContext(plugins || context[_DYN_GET_NEXT ](), core, startAt);
|
|
@@ -1342,7 +1342,7 @@
|
|
|
1342
1342
|
function createTelemetryProxyChain(plugins, config, core, startAt) {
|
|
1343
1343
|
var firstProxy = null;
|
|
1344
1344
|
var add = startAt ? false : true;
|
|
1345
|
-
if (isArray(plugins) && plugins[_DYN_LENGTH ] > 0) {
|
|
1345
|
+
if (isArray$1(plugins) && plugins[_DYN_LENGTH ] > 0) {
|
|
1346
1346
|
var lastProxy_1 = null;
|
|
1347
1347
|
arrForEach(plugins, function (thePlugin) {
|
|
1348
1348
|
if (!add && startAt === thePlugin) {
|
|
@@ -1597,7 +1597,7 @@
|
|
|
1597
1597
|
};
|
|
1598
1598
|
_self._addHook = function (hooks) {
|
|
1599
1599
|
if (hooks) {
|
|
1600
|
-
if (isArray(hooks)) {
|
|
1600
|
+
if (isArray$1(hooks)) {
|
|
1601
1601
|
_hooks = _hooks.concat(hooks);
|
|
1602
1602
|
}
|
|
1603
1603
|
else {
|
|
@@ -1690,8 +1690,10 @@
|
|
|
1690
1690
|
|
|
1691
1691
|
var AnalyticsPluginIdentifier = "ApplicationInsightsAnalytics";
|
|
1692
1692
|
|
|
1693
|
+
var UNDEF_VALUE = undefined;
|
|
1693
1694
|
var FUNCTION = "function";
|
|
1694
1695
|
var STRING = "string";
|
|
1696
|
+
var LENGTH = "length";
|
|
1695
1697
|
var ArrCls = Array;
|
|
1696
1698
|
|
|
1697
1699
|
function _createIs(theType) {
|
|
@@ -1701,11 +1703,79 @@
|
|
|
1701
1703
|
}
|
|
1702
1704
|
var isString = _createIs(STRING);
|
|
1703
1705
|
var isFunction = _createIs(FUNCTION);
|
|
1704
|
-
ArrCls.isArray;
|
|
1706
|
+
var isArray = ArrCls.isArray;
|
|
1705
1707
|
function isPromiseLike(value) {
|
|
1706
1708
|
return !!value && isFunction(value.then);
|
|
1707
1709
|
}
|
|
1708
1710
|
|
|
1711
|
+
function _extractArgs(args, startAt) {
|
|
1712
|
+
var theArgs = [];
|
|
1713
|
+
for (var lp = startAt; lp < args[LENGTH]; lp++) {
|
|
1714
|
+
theArgs[lp - startAt] = args[lp];
|
|
1715
|
+
}
|
|
1716
|
+
return theArgs;
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
function _createTimerHandler(startTimer, refreshFn, cancelFn) {
|
|
1720
|
+
var ref = true;
|
|
1721
|
+
var timerId = startTimer ? refreshFn(null) : null;
|
|
1722
|
+
function _unref() {
|
|
1723
|
+
ref = false;
|
|
1724
|
+
timerId && timerId["unref"] && timerId["unref"]();
|
|
1725
|
+
return timer;
|
|
1726
|
+
}
|
|
1727
|
+
function _ref() {
|
|
1728
|
+
ref = true;
|
|
1729
|
+
timerId && timerId["ref"] && timerId["ref"]();
|
|
1730
|
+
return timer;
|
|
1731
|
+
}
|
|
1732
|
+
function _hasRef() {
|
|
1733
|
+
if (timerId && timerId["hasRef"]) {
|
|
1734
|
+
return timerId["hasRef"]();
|
|
1735
|
+
}
|
|
1736
|
+
return ref;
|
|
1737
|
+
}
|
|
1738
|
+
var timer = {
|
|
1739
|
+
cancel: function () {
|
|
1740
|
+
timerId && cancelFn(timerId);
|
|
1741
|
+
timerId = null;
|
|
1742
|
+
},
|
|
1743
|
+
refresh: function () {
|
|
1744
|
+
timerId = refreshFn(timerId);
|
|
1745
|
+
if (!ref) {
|
|
1746
|
+
_unref();
|
|
1747
|
+
}
|
|
1748
|
+
return timer;
|
|
1749
|
+
},
|
|
1750
|
+
hasRef: _hasRef,
|
|
1751
|
+
ref: _ref,
|
|
1752
|
+
unref: _unref
|
|
1753
|
+
};
|
|
1754
|
+
return timer;
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
|
|
1758
|
+
var isArr = isArray(overrideFn);
|
|
1759
|
+
var len = isArr ? overrideFn.length : 0;
|
|
1760
|
+
var setFn = (len > 0 ? overrideFn[0] : (!isArr ? overrideFn : UNDEF_VALUE)) || setTimeout;
|
|
1761
|
+
var clearFn = (len > 1 ? overrideFn[1] : UNDEF_VALUE) || clearTimeout;
|
|
1762
|
+
return _createTimerHandler(startTimer, function (timerId) {
|
|
1763
|
+
if (timerId) {
|
|
1764
|
+
if (timerId.refresh) {
|
|
1765
|
+
timerId.refresh();
|
|
1766
|
+
return timerId;
|
|
1767
|
+
}
|
|
1768
|
+
clearFn.call(self, timerId);
|
|
1769
|
+
}
|
|
1770
|
+
return setFn.apply(self, theArgs);
|
|
1771
|
+
}, function (timerId) {
|
|
1772
|
+
clearFn.call(self, timerId);
|
|
1773
|
+
});
|
|
1774
|
+
}
|
|
1775
|
+
function scheduleTimeout(callback, timeout) {
|
|
1776
|
+
return _createTimeoutWith(this, true, UNDEF_VALUE, _extractArgs(arguments, 0));
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1709
1779
|
function getReactNativeDeviceInfo() {
|
|
1710
1780
|
return DeviceInfo__default["default"];
|
|
1711
1781
|
}
|
|
@@ -1779,12 +1849,13 @@
|
|
|
1779
1849
|
if (isPromiseLike(uniqueId)) {
|
|
1780
1850
|
_waitingForId = true;
|
|
1781
1851
|
if (_waitingTimer) {
|
|
1782
|
-
|
|
1852
|
+
_waitingTimer.cancel();
|
|
1783
1853
|
}
|
|
1784
|
-
_waitingTimer =
|
|
1854
|
+
_waitingTimer = scheduleTimeout(function () {
|
|
1785
1855
|
_waitingTimer = null;
|
|
1786
1856
|
_setDeviceId(_device.id);
|
|
1787
|
-
});
|
|
1857
|
+
}, 0);
|
|
1858
|
+
_waitingTimer.unref();
|
|
1788
1859
|
uniqueId.then(function (value) {
|
|
1789
1860
|
_setDeviceId(value);
|
|
1790
1861
|
}, function (reason) {
|
|
@@ -1816,7 +1887,7 @@
|
|
|
1816
1887
|
_device.id = newId;
|
|
1817
1888
|
_waitingForId = false;
|
|
1818
1889
|
if (_waitingTimer) {
|
|
1819
|
-
|
|
1890
|
+
_waitingTimer.cancel();
|
|
1820
1891
|
}
|
|
1821
1892
|
if (!_waitingForId && _waitingItems && _waitingItems.length > 0 && _self.isInitialized()) {
|
|
1822
1893
|
var items = _waitingItems;
|