@microsoft/applicationinsights-react-native 2.5.0-beta.2203-09 → 2.5.0-beta.2203-12
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 +31 -8
- 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 +1 -1
- package/dist/applicationinsights-react-native.d.ts +1 -1
- package/dist/applicationinsights-react-native.js +31 -8
- 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/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 +22 -4
- package/dist-esm/ReactNativePlugin.js.map +1 -1
- package/dist-esm/index.js +1 -1
- package/package.json +4 -4
- package/src/ReactNativePlugin.ts +29 -5
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - React Native Plugin, 2.5.0-beta.2203-
|
|
2
|
+
* Application Insights JavaScript SDK - React Native Plugin, 2.5.0-beta.2203-12
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -66,7 +66,9 @@
|
|
|
66
66
|
(getGlobal() || {})["Reflect"];
|
|
67
67
|
var extendStaticsFn = function (d, b) {
|
|
68
68
|
extendStaticsFn = ObjClass["setPrototypeOf"] ||
|
|
69
|
-
({ __proto__: [] } instanceof Array && function (d, b) {
|
|
69
|
+
({ __proto__: [] } instanceof Array && function (d, b) {
|
|
70
|
+
d.__proto__ = b;
|
|
71
|
+
}) ||
|
|
70
72
|
function (d, b) {
|
|
71
73
|
for (var p in b) {
|
|
72
74
|
if (b[strShimHasOwnProperty](p)) {
|
|
@@ -81,7 +83,9 @@
|
|
|
81
83
|
throwTypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
82
84
|
}
|
|
83
85
|
extendStaticsFn(d, b);
|
|
84
|
-
function __() {
|
|
86
|
+
function __() {
|
|
87
|
+
this.constructor = d;
|
|
88
|
+
}
|
|
85
89
|
d[strShimPrototype] = b === null ? objCreateFn(b) : (__[strShimPrototype] = b[strShimPrototype], new __());
|
|
86
90
|
}
|
|
87
91
|
|
|
@@ -1005,7 +1009,7 @@
|
|
|
1005
1009
|
}
|
|
1006
1010
|
|
|
1007
1011
|
var _objDefineProperty = ObjDefineProperty;
|
|
1008
|
-
var version = "2.
|
|
1012
|
+
var version = "2.8.0-beta.2203-12";
|
|
1009
1013
|
var instanceName = "." + newId(6);
|
|
1010
1014
|
var _dataUid = 0;
|
|
1011
1015
|
function _createAccessor(target, prop, value) {
|
|
@@ -1103,7 +1107,9 @@
|
|
|
1103
1107
|
var context = {
|
|
1104
1108
|
_next: _moveNext,
|
|
1105
1109
|
ctx: {
|
|
1106
|
-
core: function () {
|
|
1110
|
+
core: function () {
|
|
1111
|
+
return core;
|
|
1112
|
+
},
|
|
1107
1113
|
diagLog: function () {
|
|
1108
1114
|
return safeGetLogger(core, config);
|
|
1109
1115
|
},
|
|
@@ -1727,11 +1733,12 @@
|
|
|
1727
1733
|
var _this = _super.call(this) || this;
|
|
1728
1734
|
_this.identifier = "AppInsightsReactNativePlugin";
|
|
1729
1735
|
_this.priority = 140;
|
|
1730
|
-
var _device
|
|
1731
|
-
var _config
|
|
1736
|
+
var _device;
|
|
1737
|
+
var _config;
|
|
1732
1738
|
var _analyticsPlugin;
|
|
1733
1739
|
var _defaultHandler;
|
|
1734
1740
|
dynamicProto(ReactNativePlugin, _this, function (_self, _base) {
|
|
1741
|
+
_initDefaults();
|
|
1735
1742
|
_self.initialize = function (config,
|
|
1736
1743
|
core, extensions) {
|
|
1737
1744
|
if (!_self.isInitialized()) {
|
|
@@ -1780,6 +1787,16 @@
|
|
|
1780
1787
|
_self.diagLog().warnToConsole("Failed to get DeviceInfo: " + getExceptionName(e) + " - " + dumpObj(e));
|
|
1781
1788
|
}
|
|
1782
1789
|
};
|
|
1790
|
+
_self._doTeardown = function (unloadCtx, unloadState, asyncCallback) {
|
|
1791
|
+
_resetGlobalErrorHandler();
|
|
1792
|
+
_initDefaults();
|
|
1793
|
+
};
|
|
1794
|
+
function _initDefaults() {
|
|
1795
|
+
_device = {};
|
|
1796
|
+
_config = config || _getDefaultConfig();
|
|
1797
|
+
_analyticsPlugin = null;
|
|
1798
|
+
_defaultHandler = null;
|
|
1799
|
+
}
|
|
1783
1800
|
function _applyDeviceContext(item) {
|
|
1784
1801
|
if (_device) {
|
|
1785
1802
|
item.ext = item.ext || {};
|
|
@@ -1805,9 +1822,15 @@
|
|
|
1805
1822
|
var _global = _getGlobal();
|
|
1806
1823
|
if (_global && _global.ErrorUtils) {
|
|
1807
1824
|
_defaultHandler = (typeof _global.ErrorUtils.getGlobalHandler === "function" && _global.ErrorUtils.getGlobalHandler()) || _global.ErrorUtils._globalHandler;
|
|
1808
|
-
_global.ErrorUtils.setGlobalHandler(_trackException
|
|
1825
|
+
_global.ErrorUtils.setGlobalHandler(_trackException);
|
|
1809
1826
|
}
|
|
1810
1827
|
};
|
|
1828
|
+
function _resetGlobalErrorHandler() {
|
|
1829
|
+
var _global = _getGlobal();
|
|
1830
|
+
if (_global && _global.ErrorUtils && _global.ErrorUtils.getGlobalHandler() === _trackException) {
|
|
1831
|
+
_global.ErrorUtils.setGlobalHandler(_defaultHandler || null);
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1811
1834
|
function _trackException(e, isFatal) {
|
|
1812
1835
|
var exception = { exception: e, severityLevel: SeverityLevel.Error };
|
|
1813
1836
|
if (_analyticsPlugin) {
|