@microsoft/applicationinsights-react-native 4.3.9-nightly.2604-01 → 4.4.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
- * Microsoft Application Insights react native plugin, 4.3.9-nightly.2604-01
2
+ * Microsoft Application Insights react native plugin, 4.4.0
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - React Native Plugin, 4.3.9-nightly.2604-01
2
+ * Application Insights JavaScript SDK - React Native Plugin, 4.4.0
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - React Native Plugin, 4.3.9-nightly.2604-01
2
+ * Application Insights JavaScript SDK - React Native Plugin, 4.4.0
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - React Native Plugin, 4.3.9-nightly.2604-01
2
+ * Application Insights JavaScript SDK - React Native Plugin, 4.4.0
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - React Native Plugin, 4.3.9-nightly.2604-01
2
+ * Application Insights JavaScript SDK - React Native Plugin, 4.4.0
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - React Native Plugin, 4.3.9-nightly.2604-01
2
+ * Application Insights JavaScript SDK - React Native Plugin, 4.4.0
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - React Native Plugin, 4.3.9-nightly.2604-01
2
+ * Application Insights JavaScript SDK - React Native Plugin, 4.4.0
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,13 +1,12 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - React Native Plugin, 4.3.9-nightly.2604-01
2
+ * Application Insights JavaScript SDK - React Native Plugin, 4.4.0
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
6
6
 
7
7
  import { __extendsFn as __extends } from "@microsoft/applicationinsights-shims";
8
8
  import dynamicProto from "@microsoft/dynamicproto-js";
9
- import { AnalyticsPluginIdentifier } from "@microsoft/applicationinsights-common";
10
- import { BaseTelemetryPlugin, _throwInternal, _warnToConsole, arrForEach, dumpObj, getExceptionName, onConfigChange } from "@microsoft/applicationinsights-core-js";
9
+ import { BaseTelemetryPlugin, _throwInternal, _warnToConsole, arrForEach, dumpObj, getExceptionName, onConfigChange, AnalyticsPluginIdentifier } from "@microsoft/applicationinsights-core-js";
11
10
  import { getGlobal, strShimUndefined } from "@microsoft/applicationinsights-shims";
12
11
  import { isPromiseLike, isString, objDeepFreeze, scheduleTimeout } from "@nevware21/ts-utils";
13
12
  var defaultReactNativePluginConfig = objDeepFreeze({
@@ -1 +1 @@
1
- {"version":3,"file":"ReactNativeManualDevicePlugin.js.map","sources":["ReactNativeManualDevicePlugin.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { __extends } from \"tslib\";\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { AnalyticsPluginIdentifier } from \"@microsoft/applicationinsights-common\";\r\nimport { BaseTelemetryPlugin, _throwInternal, _warnToConsole, arrForEach, dumpObj, getExceptionName, onConfigChange } from \"@microsoft/applicationinsights-core-js\";\r\nimport { getGlobal, strShimUndefined } from \"@microsoft/applicationinsights-shims\";\r\nimport { isPromiseLike, isString, objDeepFreeze, scheduleTimeout } from \"@nevware21/ts-utils\";\r\nvar defaultReactNativePluginConfig = objDeepFreeze({\r\n disableDeviceCollection: false,\r\n disableExceptionCollection: false,\r\n uniqueIdPromiseTimeout: 5000\r\n});\r\nvar ReactNativeManualDevicePlugin = /** @class */ (function (_super) {\r\n __extends(ReactNativeManualDevicePlugin, _super);\r\n function ReactNativeManualDevicePlugin(config) {\r\n var _this = _super.call(this) || this;\r\n _this.identifier = \"AppInsightsReactNativePlugin\";\r\n _this.priority = 140;\r\n // Automatic defaults, don't set values here only set in _initDefaults()\r\n var _device;\r\n var _config;\r\n var _analyticsPlugin;\r\n var _defaultHandler;\r\n var _waitingForId;\r\n var _waitingTimer;\r\n var _waitingItems = null;\r\n var _deviceInfoModule;\r\n var _deviceInfoNeedsUpdate;\r\n var exceptionHandlerSet;\r\n dynamicProto(ReactNativeManualDevicePlugin, _this, function (_self, _base) {\r\n _initDefaults();\r\n _self.initialize = function (config, // need `| object` to coerce to interface\r\n core, extensions) {\r\n var identifier = _this.identifier;\r\n if (!_self.isInitialized()) {\r\n _base.initialize(config, core, extensions);\r\n _self._addHook(onConfigChange(config, function (details) {\r\n var _a;\r\n var ctx = _self._getTelCtx();\r\n _config = ctx.getExtCfg(identifier, defaultReactNativePluginConfig);\r\n if (!_config.disableDeviceCollection && _deviceInfoNeedsUpdate) {\r\n _deviceInfoNeedsUpdate = !_self._collectDeviceInfo();\r\n }\r\n if (core && core.getPlugin) {\r\n _analyticsPlugin = (_a = core.getPlugin(AnalyticsPluginIdentifier)) === null || _a === void 0 ? void 0 : _a.plugin;\r\n }\r\n else {\r\n _analyticsPlugin = null;\r\n }\r\n if (exceptionHandlerSet) {\r\n _resetGlobalErrorHandler();\r\n }\r\n if (!_config.disableExceptionCollection) {\r\n _self._setExceptionHandler();\r\n exceptionHandlerSet = true;\r\n }\r\n }));\r\n }\r\n };\r\n _self.processTelemetry = function (item, itemCtx) {\r\n if (!_waitingForId) {\r\n _applyDeviceContext(item);\r\n _self.processNext(item, itemCtx);\r\n }\r\n else {\r\n // Make sure we have an array for the waiting items\r\n _waitingItems = _waitingItems || [];\r\n _waitingItems.push({\r\n item: item,\r\n itemCtx: itemCtx\r\n });\r\n }\r\n };\r\n _self.setDeviceInfoModule = function (deviceInfoModule) {\r\n // Set the configured deviceInfoModule\r\n _deviceInfoModule = deviceInfoModule;\r\n _deviceInfoNeedsUpdate = true;\r\n };\r\n _self.setDeviceId = _setDeviceId;\r\n _self.setDeviceModel = function (newModel) {\r\n _device.model = newModel;\r\n };\r\n _self.setDeviceType = function (newType) {\r\n _device.deviceClass = newType;\r\n };\r\n /**\r\n * Automatically collects native device info for this device\r\n */\r\n _self._collectDeviceInfo = function () {\r\n try {\r\n _deviceInfoModule = _this.getDeviceInfoModule(_deviceInfoModule);\r\n if (!_deviceInfoModule) {\r\n return false;\r\n }\r\n _device.deviceClass = _deviceInfoModule.getDeviceType();\r\n _device.model = _deviceInfoModule.getModel();\r\n var uniqueId = _deviceInfoModule.getUniqueId(); // Installation ID support different versions which return a promise vs string\r\n if (isPromiseLike(uniqueId)) {\r\n _waitingForId = true;\r\n if (_waitingTimer) {\r\n _waitingTimer.cancel();\r\n }\r\n _waitingTimer = scheduleTimeout(function () {\r\n _waitingTimer = null;\r\n _setDeviceId(_device.id);\r\n }, 0);\r\n _waitingTimer.unref();\r\n uniqueId.then(function (value) {\r\n _setDeviceId(value);\r\n }, function (reason) {\r\n _warnToConsole(_self.diagLog(), \"Failed to get device id: \" + dumpObj(reason));\r\n // Just reuse the existing id (if any)\r\n _setDeviceId(_device.id);\r\n });\r\n }\r\n else if (isString(uniqueId)) {\r\n _device.id = uniqueId;\r\n }\r\n return true;\r\n }\r\n catch (e) {\r\n _warnToConsole(_self.diagLog(), \"Failed to get DeviceInfo: \" + getExceptionName(e) + \" - \" + dumpObj(e));\r\n }\r\n };\r\n _self._doTeardown = function (unloadCtx, unloadState, asyncCallback) {\r\n _resetGlobalErrorHandler();\r\n _initDefaults();\r\n };\r\n function _initDefaults() {\r\n _device = {};\r\n _config = {};\r\n _analyticsPlugin = null;\r\n _defaultHandler = null;\r\n _waitingForId = false;\r\n _deviceInfoModule = null;\r\n _deviceInfoNeedsUpdate = true;\r\n exceptionHandlerSet = false;\r\n }\r\n function _setDeviceId(newId) {\r\n _device.id = newId;\r\n _waitingForId = false;\r\n if (_waitingTimer) {\r\n _waitingTimer.cancel();\r\n }\r\n if (!_waitingForId && _waitingItems && _waitingItems.length > 0 && _self.isInitialized()) {\r\n var items = _waitingItems;\r\n _waitingItems = null;\r\n arrForEach(items, function (value) {\r\n try {\r\n _self.processTelemetry(value.item, value.itemCtx);\r\n }\r\n catch (e) {\r\n // Just ignore\r\n }\r\n });\r\n }\r\n }\r\n function _applyDeviceContext(item) {\r\n if (_device) {\r\n item.ext = item.ext || {};\r\n item.ext.device = item.ext.device || {};\r\n if (isString(_device.id)) {\r\n item.ext.device.localId = _device.id;\r\n }\r\n if (isString(_device.model)) {\r\n item.ext.device.model = _device.model;\r\n }\r\n if (isString(_device.deviceClass)) {\r\n item.ext.device.deviceClass = _device.deviceClass;\r\n }\r\n }\r\n }\r\n function _getGlobal() {\r\n if (typeof global !== strShimUndefined && global) {\r\n return global;\r\n }\r\n return getGlobal();\r\n }\r\n _self._setExceptionHandler = function () {\r\n var _global = _getGlobal();\r\n if (_global && _global.ErrorUtils) {\r\n // intercept react-native error handling\r\n _defaultHandler = (typeof _global.ErrorUtils.getGlobalHandler === \"function\" && _global.ErrorUtils.getGlobalHandler()) || _global.ErrorUtils._globalHandler;\r\n _global.ErrorUtils.setGlobalHandler(_trackException);\r\n }\r\n };\r\n function _resetGlobalErrorHandler() {\r\n var _global = _getGlobal();\r\n if (_global && _global.ErrorUtils && _global.ErrorUtils.getGlobalHandler() === _trackException) {\r\n _global.ErrorUtils.setGlobalHandler(_defaultHandler || null);\r\n }\r\n }\r\n // default global error handler syntax: handleError(e, isFatal)\r\n function _trackException(e, isFatal) {\r\n var exception = { exception: e, severityLevel: 3 /* eSeverityLevel.Error */ };\r\n if (_analyticsPlugin) {\r\n _analyticsPlugin.trackException(exception);\r\n }\r\n else {\r\n _throwInternal(_self.diagLog(), 1 /* eLoggingSeverity.CRITICAL */, 64 /* _eInternalMessageId.TelemetryInitializerFailed */, \"Analytics plugin is not available, ReactNative plugin telemetry will not be sent: \");\r\n }\r\n // call the _defaultHandler - react native also gets the error\r\n if (_defaultHandler) {\r\n _defaultHandler.call(global, e, isFatal);\r\n }\r\n }\r\n // Test Hooks\r\n _self._config = _config;\r\n _self._getDbgPlgTargets = function () {\r\n return [_device, _deviceInfoModule, _config];\r\n };\r\n });\r\n return _this;\r\n }\r\n ReactNativeManualDevicePlugin.prototype.getDeviceInfoModule = function (_deviceInfoModule) {\r\n if (!_deviceInfoModule) {\r\n _warnToConsole(this.diagLog(), \"Failed to get DeviceInfo. Provide DeviceInfo while init or turn it off by setting disableDeviceCollection flag to true\");\r\n return null;\r\n }\r\n return _deviceInfoModule;\r\n };\r\n ReactNativeManualDevicePlugin.prototype.initialize = function (config, // need `| object` to coerce to interface\r\n core, extensions) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n ReactNativeManualDevicePlugin.prototype.processTelemetry = function (env, itemCtx) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Set the module that will be used during initialization when collecting device is enabled\r\n * (the default), automatic collection can be disabled via the `disableDeviceCollection`\r\n * config. If no `deviceInfoModule` is set and collection is enabled, an error will be thrown.\r\n * @param deviceInfoModule\r\n */\r\n ReactNativeManualDevicePlugin.prototype.setDeviceInfoModule = function (deviceInfoModule) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Manually set the deviceId, if set before initialization and automatic device info collection\r\n * is enabled this value may get overwritten. If you want to keep this value disable auto\r\n * collection by setting the `disableDeviceCollection` config to true.\r\n * @param newId - The value to use as the device Id.\r\n */\r\n ReactNativeManualDevicePlugin.prototype.setDeviceId = function (newId) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Manually set the device model, if set before initialization and automatic device info\r\n * collection is enabled this value may get overwritten. If you want to keep this value\r\n * disable auto collection by setting the `disableDeviceCollection` config to true.\r\n * @param newModel - The value to use as the device model.\r\n */\r\n ReactNativeManualDevicePlugin.prototype.setDeviceModel = function (newModel) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Manually set the device type (class), if set before initialization and automatic device\r\n * info collection is enabled this value may get overwritten. If you want to keep this value\r\n * disable auto collection by setting the `disableDeviceCollection` config to true.\r\n * @param newType - The value to use as the device type\r\n */\r\n ReactNativeManualDevicePlugin.prototype.setDeviceType = function (newType) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n return ReactNativeManualDevicePlugin;\r\n}(BaseTelemetryPlugin));\r\nexport { ReactNativeManualDevicePlugin };\r\n//# sourceMappingURL=ReactNativeManualDevicePlugin.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC,gFAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;0EA0CM;AACN;AACA;AACA;AACA"}
1
+ {"version":3,"file":"ReactNativeManualDevicePlugin.js.map","sources":["ReactNativeManualDevicePlugin.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { __extends } from \"tslib\";\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { BaseTelemetryPlugin, _throwInternal, _warnToConsole, arrForEach, dumpObj, getExceptionName, onConfigChange, AnalyticsPluginIdentifier } from \"@microsoft/applicationinsights-core-js\";\r\nimport { getGlobal, strShimUndefined } from \"@microsoft/applicationinsights-shims\";\r\nimport { isPromiseLike, isString, objDeepFreeze, scheduleTimeout } from \"@nevware21/ts-utils\";\r\nvar defaultReactNativePluginConfig = objDeepFreeze({\r\n disableDeviceCollection: false,\r\n disableExceptionCollection: false,\r\n uniqueIdPromiseTimeout: 5000\r\n});\r\nvar ReactNativeManualDevicePlugin = /** @class */ (function (_super) {\r\n __extends(ReactNativeManualDevicePlugin, _super);\r\n function ReactNativeManualDevicePlugin(config) {\r\n var _this = _super.call(this) || this;\r\n _this.identifier = \"AppInsightsReactNativePlugin\";\r\n _this.priority = 140;\r\n // Automatic defaults, don't set values here only set in _initDefaults()\r\n var _device;\r\n var _config;\r\n var _analyticsPlugin;\r\n var _defaultHandler;\r\n var _waitingForId;\r\n var _waitingTimer;\r\n var _waitingItems = null;\r\n var _deviceInfoModule;\r\n var _deviceInfoNeedsUpdate;\r\n var exceptionHandlerSet;\r\n dynamicProto(ReactNativeManualDevicePlugin, _this, function (_self, _base) {\r\n _initDefaults();\r\n _self.initialize = function (config, // need `| object` to coerce to interface\r\n core, extensions) {\r\n var identifier = _this.identifier;\r\n if (!_self.isInitialized()) {\r\n _base.initialize(config, core, extensions);\r\n _self._addHook(onConfigChange(config, function (details) {\r\n var _a;\r\n var ctx = _self._getTelCtx();\r\n _config = ctx.getExtCfg(identifier, defaultReactNativePluginConfig);\r\n if (!_config.disableDeviceCollection && _deviceInfoNeedsUpdate) {\r\n _deviceInfoNeedsUpdate = !_self._collectDeviceInfo();\r\n }\r\n if (core && core.getPlugin) {\r\n _analyticsPlugin = (_a = core.getPlugin(AnalyticsPluginIdentifier)) === null || _a === void 0 ? void 0 : _a.plugin;\r\n }\r\n else {\r\n _analyticsPlugin = null;\r\n }\r\n if (exceptionHandlerSet) {\r\n _resetGlobalErrorHandler();\r\n }\r\n if (!_config.disableExceptionCollection) {\r\n _self._setExceptionHandler();\r\n exceptionHandlerSet = true;\r\n }\r\n }));\r\n }\r\n };\r\n _self.processTelemetry = function (item, itemCtx) {\r\n if (!_waitingForId) {\r\n _applyDeviceContext(item);\r\n _self.processNext(item, itemCtx);\r\n }\r\n else {\r\n // Make sure we have an array for the waiting items\r\n _waitingItems = _waitingItems || [];\r\n _waitingItems.push({\r\n item: item,\r\n itemCtx: itemCtx\r\n });\r\n }\r\n };\r\n _self.setDeviceInfoModule = function (deviceInfoModule) {\r\n // Set the configured deviceInfoModule\r\n _deviceInfoModule = deviceInfoModule;\r\n _deviceInfoNeedsUpdate = true;\r\n };\r\n _self.setDeviceId = _setDeviceId;\r\n _self.setDeviceModel = function (newModel) {\r\n _device.model = newModel;\r\n };\r\n _self.setDeviceType = function (newType) {\r\n _device.deviceClass = newType;\r\n };\r\n /**\r\n * Automatically collects native device info for this device\r\n */\r\n _self._collectDeviceInfo = function () {\r\n try {\r\n _deviceInfoModule = _this.getDeviceInfoModule(_deviceInfoModule);\r\n if (!_deviceInfoModule) {\r\n return false;\r\n }\r\n _device.deviceClass = _deviceInfoModule.getDeviceType();\r\n _device.model = _deviceInfoModule.getModel();\r\n var uniqueId = _deviceInfoModule.getUniqueId(); // Installation ID support different versions which return a promise vs string\r\n if (isPromiseLike(uniqueId)) {\r\n _waitingForId = true;\r\n if (_waitingTimer) {\r\n _waitingTimer.cancel();\r\n }\r\n _waitingTimer = scheduleTimeout(function () {\r\n _waitingTimer = null;\r\n _setDeviceId(_device.id);\r\n }, 0);\r\n _waitingTimer.unref();\r\n uniqueId.then(function (value) {\r\n _setDeviceId(value);\r\n }, function (reason) {\r\n _warnToConsole(_self.diagLog(), \"Failed to get device id: \" + dumpObj(reason));\r\n // Just reuse the existing id (if any)\r\n _setDeviceId(_device.id);\r\n });\r\n }\r\n else if (isString(uniqueId)) {\r\n _device.id = uniqueId;\r\n }\r\n return true;\r\n }\r\n catch (e) {\r\n _warnToConsole(_self.diagLog(), \"Failed to get DeviceInfo: \" + getExceptionName(e) + \" - \" + dumpObj(e));\r\n }\r\n };\r\n _self._doTeardown = function (unloadCtx, unloadState, asyncCallback) {\r\n _resetGlobalErrorHandler();\r\n _initDefaults();\r\n };\r\n function _initDefaults() {\r\n _device = {};\r\n _config = {};\r\n _analyticsPlugin = null;\r\n _defaultHandler = null;\r\n _waitingForId = false;\r\n _deviceInfoModule = null;\r\n _deviceInfoNeedsUpdate = true;\r\n exceptionHandlerSet = false;\r\n }\r\n function _setDeviceId(newId) {\r\n _device.id = newId;\r\n _waitingForId = false;\r\n if (_waitingTimer) {\r\n _waitingTimer.cancel();\r\n }\r\n if (!_waitingForId && _waitingItems && _waitingItems.length > 0 && _self.isInitialized()) {\r\n var items = _waitingItems;\r\n _waitingItems = null;\r\n arrForEach(items, function (value) {\r\n try {\r\n _self.processTelemetry(value.item, value.itemCtx);\r\n }\r\n catch (e) {\r\n // Just ignore\r\n }\r\n });\r\n }\r\n }\r\n function _applyDeviceContext(item) {\r\n if (_device) {\r\n item.ext = item.ext || {};\r\n item.ext.device = item.ext.device || {};\r\n if (isString(_device.id)) {\r\n item.ext.device.localId = _device.id;\r\n }\r\n if (isString(_device.model)) {\r\n item.ext.device.model = _device.model;\r\n }\r\n if (isString(_device.deviceClass)) {\r\n item.ext.device.deviceClass = _device.deviceClass;\r\n }\r\n }\r\n }\r\n function _getGlobal() {\r\n if (typeof global !== strShimUndefined && global) {\r\n return global;\r\n }\r\n return getGlobal();\r\n }\r\n _self._setExceptionHandler = function () {\r\n var _global = _getGlobal();\r\n if (_global && _global.ErrorUtils) {\r\n // intercept react-native error handling\r\n _defaultHandler = (typeof _global.ErrorUtils.getGlobalHandler === \"function\" && _global.ErrorUtils.getGlobalHandler()) || _global.ErrorUtils._globalHandler;\r\n _global.ErrorUtils.setGlobalHandler(_trackException);\r\n }\r\n };\r\n function _resetGlobalErrorHandler() {\r\n var _global = _getGlobal();\r\n if (_global && _global.ErrorUtils && _global.ErrorUtils.getGlobalHandler() === _trackException) {\r\n _global.ErrorUtils.setGlobalHandler(_defaultHandler || null);\r\n }\r\n }\r\n // default global error handler syntax: handleError(e, isFatal)\r\n function _trackException(e, isFatal) {\r\n var exception = { exception: e, severityLevel: 3 /* eSeverityLevel.Error */ };\r\n if (_analyticsPlugin) {\r\n _analyticsPlugin.trackException(exception);\r\n }\r\n else {\r\n _throwInternal(_self.diagLog(), 1 /* eLoggingSeverity.CRITICAL */, 64 /* _eInternalMessageId.TelemetryInitializerFailed */, \"Analytics plugin is not available, ReactNative plugin telemetry will not be sent: \");\r\n }\r\n // call the _defaultHandler - react native also gets the error\r\n if (_defaultHandler) {\r\n _defaultHandler.call(global, e, isFatal);\r\n }\r\n }\r\n // Test Hooks\r\n _self._config = _config;\r\n _self._getDbgPlgTargets = function () {\r\n return [_device, _deviceInfoModule, _config];\r\n };\r\n });\r\n return _this;\r\n }\r\n ReactNativeManualDevicePlugin.prototype.getDeviceInfoModule = function (_deviceInfoModule) {\r\n if (!_deviceInfoModule) {\r\n _warnToConsole(this.diagLog(), \"Failed to get DeviceInfo. Provide DeviceInfo while init or turn it off by setting disableDeviceCollection flag to true\");\r\n return null;\r\n }\r\n return _deviceInfoModule;\r\n };\r\n ReactNativeManualDevicePlugin.prototype.initialize = function (config, // need `| object` to coerce to interface\r\n core, extensions) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n ReactNativeManualDevicePlugin.prototype.processTelemetry = function (env, itemCtx) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Set the module that will be used during initialization when collecting device is enabled\r\n * (the default), automatic collection can be disabled via the `disableDeviceCollection`\r\n * config. If no `deviceInfoModule` is set and collection is enabled, an error will be thrown.\r\n * @param deviceInfoModule\r\n */\r\n ReactNativeManualDevicePlugin.prototype.setDeviceInfoModule = function (deviceInfoModule) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Manually set the deviceId, if set before initialization and automatic device info collection\r\n * is enabled this value may get overwritten. If you want to keep this value disable auto\r\n * collection by setting the `disableDeviceCollection` config to true.\r\n * @param newId - The value to use as the device Id.\r\n */\r\n ReactNativeManualDevicePlugin.prototype.setDeviceId = function (newId) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Manually set the device model, if set before initialization and automatic device info\r\n * collection is enabled this value may get overwritten. If you want to keep this value\r\n * disable auto collection by setting the `disableDeviceCollection` config to true.\r\n * @param newModel - The value to use as the device model.\r\n */\r\n ReactNativeManualDevicePlugin.prototype.setDeviceModel = function (newModel) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Manually set the device type (class), if set before initialization and automatic device\r\n * info collection is enabled this value may get overwritten. If you want to keep this value\r\n * disable auto collection by setting the `disableDeviceCollection` config to true.\r\n * @param newType - The value to use as the device type\r\n */\r\n ReactNativeManualDevicePlugin.prototype.setDeviceType = function (newType) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n return ReactNativeManualDevicePlugin;\r\n}(BaseTelemetryPlugin));\r\nexport { ReactNativeManualDevicePlugin };\r\n//# sourceMappingURL=ReactNativeManualDevicePlugin.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC,gFAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;0EA0CM;AACN;AACA;AACA;AACA"}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - React Native Plugin, 4.3.9-nightly.2604-01
2
+ * Application Insights JavaScript SDK - React Native Plugin, 4.4.0
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
package/dist-esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - React Native Plugin, 4.3.9-nightly.2604-01
2
+ * Application Insights JavaScript SDK - React Native Plugin, 4.4.0
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - React Native Plugin, 4.3.9-nightly.2604-01
2
+ * Application Insights JavaScript SDK - React Native Plugin, 4.4.0
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
package/package.json CHANGED
@@ -1,106 +1,104 @@
1
- {
2
- "name": "@microsoft/applicationinsights-react-native",
3
- "version": "4.3.9-nightly.2604-01",
4
- "description": "Microsoft Application Insights React Native Plugin",
5
- "main": "dist-esm/index.js",
6
- "exports": {
7
- ".": {
8
- "types": "./types/index.d.ts",
9
- "import": "./dist-esm/index.js",
10
- "require": "./dist/applicationinsights-react-native.js"
11
- },
12
- "./manual": {
13
- "types": "./types/manualIndex.d.ts",
14
- "import": "./dist-esm/manualIndex.js",
15
- "require": "./dist/applicationinsights-react-native.js"
16
- }
17
- },
18
- "types": "types/index.d.ts",
19
- "sideEffects": false,
20
- "author": "Microsoft Application Insights Team",
21
- "license": "MIT",
22
- "repository": {
23
- "type": "git",
24
- "url": "https://github.com/microsoft/applicationinsights-react-native"
25
- },
26
- "bugs": {
27
- "url": "https://github.com/microsoft/applicationinsights-react-native/issues"
28
- },
29
- "homepage": "https://github.com/microsoft/applicationinsights-react-native#readme",
30
- "keywords": [
31
- "performance monitoring",
32
- "application insights",
33
- "microsoft",
34
- "azure",
35
- "react native"
36
- ],
37
- "scripts": {
38
- "build": "npm run build:esm && npm run build:package && npm run dtsgen",
39
- "build:esm": "grunt reactnative",
40
- "build:package": "rollup -c",
41
- "rebuild": "npm run build",
42
- "test": "grunt reactnativetests",
43
- "mintest": "grunt reactnative-mintests",
44
- "testx": "npm run build:test && grunt reactnativetests",
45
- "lint": "tslint -p tsconfig.json",
46
- "dtsgen": "api-extractor run --local && node ../scripts/dtsgen.js \"Microsoft Application Insights react native plugin\"",
47
- "ai-min": "grunt reactnative-min",
48
- "ai-restore": "grunt reactnative-restore"
49
- },
50
- "devDependencies": {
51
- "@microsoft/ai-test-framework": "0.0.1",
52
- "@microsoft/applicationinsights-rollup-es3": "1.1.3",
53
- "@microsoft/api-extractor": "^7.18.1",
54
- "grunt": "^1.5.3",
55
- "grunt-cli": "^1.4.3",
56
- "grunt-contrib-uglify": "^5.0.1",
57
- "@nevware21/grunt-ts-plugin": "^0.4.3",
58
- "@nevware21/grunt-eslint-ts": "^0.2.2",
59
- "@typescript-eslint/eslint-plugin": "^4.28.0",
60
- "@typescript-eslint/parser": "^4.28.0",
61
- "eslint": "^7.29.0",
62
- "eslint-config-standard": "^16.0.3",
63
- "eslint-plugin-import": "^2.23.4",
64
- "eslint-plugin-node": "^11.1.0",
65
- "eslint-plugin-promise": "^5.1.0",
66
- "qunit": "^2.11.2",
67
- "react": "^18.0.0",
68
- "react-native": "^0.69.9",
69
- "globby": "^11.0.0",
70
- "magic-string": "^0.25.7",
71
- "@rollup/plugin-commonjs": "^18.0.0",
72
- "@rollup/plugin-node-resolve": "^11.2.1",
73
- "@rollup/plugin-replace": "^2.3.3",
74
- "rollup-plugin-cleanup": "^3.2.1",
75
- "rollup-plugin-peer-deps-external": "^2.2.4",
76
- "rollup": "^2.77.2",
77
- "typescript": "^4.3.4",
78
- "tslib": "^2.0.0",
79
- "uglify-js": "3.16.0",
80
- "@types/node": "24.0.14"
81
- },
82
- "dependencies": {
83
- "@microsoft/applicationinsights-common": "nightly3",
84
- "@microsoft/applicationinsights-core-js": "nightly3",
85
- "@microsoft/applicationinsights-shims": "^3.0.1",
86
- "@microsoft/dynamicproto-js": "^2.0.3",
87
- "@nevware21/ts-utils": ">= 0.11.3 < 2.x"
88
- },
89
- "overrides": {
90
- "form-data": "^2.5.4",
91
- "tar": "^7.5.3"
92
- },
93
- "peerDependencies": {
94
- "tslib": "*",
95
- "react-native": "*",
96
- "react-native-device-info": ">=5.2.1"
97
- },
98
- "peerDependenciesMeta": {
99
- "react-native-device-info": {
100
- "optional": true
101
- }
102
- },
103
- "publishConfig": {
104
- "tag": "nightly"
105
- }
106
- }
1
+ {
2
+ "name": "@microsoft/applicationinsights-react-native",
3
+ "version": "4.4.0",
4
+ "description": "Microsoft Application Insights React Native Plugin",
5
+ "main": "dist-esm/index.js",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./types/index.d.ts",
9
+ "import": "./dist-esm/index.js",
10
+ "require": "./dist/applicationinsights-react-native.js"
11
+ },
12
+ "./manual": {
13
+ "types": "./types/manualIndex.d.ts",
14
+ "import": "./dist-esm/manualIndex.js",
15
+ "require": "./dist/applicationinsights-react-native.js"
16
+ }
17
+ },
18
+ "types": "types/index.d.ts",
19
+ "sideEffects": false,
20
+ "author": "Microsoft Application Insights Team",
21
+ "license": "MIT",
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "https://github.com/microsoft/applicationinsights-react-native"
25
+ },
26
+ "bugs": {
27
+ "url": "https://github.com/microsoft/applicationinsights-react-native/issues"
28
+ },
29
+ "homepage": "https://github.com/microsoft/applicationinsights-react-native#readme",
30
+ "keywords": [
31
+ "performance monitoring",
32
+ "application insights",
33
+ "microsoft",
34
+ "azure",
35
+ "react native"
36
+ ],
37
+ "scripts": {
38
+ "build": "npm run build:esm && npm run build:package && npm run dtsgen",
39
+ "build:esm": "grunt reactnative",
40
+ "build:package": "rollup -c",
41
+ "rebuild": "npm run build",
42
+ "test": "grunt reactnativetests",
43
+ "mintest": "grunt reactnative-mintests",
44
+ "testx": "npm run build:test && grunt reactnativetests",
45
+ "lint": "tslint -p tsconfig.json",
46
+ "dtsgen": "api-extractor run --local && node ../scripts/dtsgen.js \"Microsoft Application Insights react native plugin\"",
47
+ "ai-min": "grunt reactnative-min",
48
+ "ai-restore": "grunt reactnative-restore"
49
+ },
50
+ "devDependencies": {
51
+ "@microsoft/ai-test-framework": "0.0.1",
52
+ "@microsoft/applicationinsights-rollup-es3": "1.1.3",
53
+ "@microsoft/api-extractor": "^7.18.1",
54
+ "grunt": "^1.5.3",
55
+ "grunt-cli": "^1.4.3",
56
+ "grunt-contrib-uglify": "^5.0.1",
57
+ "@nevware21/grunt-ts-plugin": "^0.4.3",
58
+ "@nevware21/grunt-eslint-ts": "^0.2.2",
59
+ "@typescript-eslint/eslint-plugin": "^4.28.0",
60
+ "@typescript-eslint/parser": "^4.28.0",
61
+ "eslint": "^7.29.0",
62
+ "eslint-config-standard": "^16.0.3",
63
+ "eslint-plugin-import": "^2.23.4",
64
+ "eslint-plugin-node": "^11.1.0",
65
+ "eslint-plugin-promise": "^5.1.0",
66
+ "qunit": "^2.11.2",
67
+ "react": "^18.0.0",
68
+ "react-native": "^0.69.9",
69
+ "globby": "^11.0.0",
70
+ "magic-string": "^0.25.7",
71
+ "@rollup/plugin-commonjs": "^18.0.0",
72
+ "@rollup/plugin-node-resolve": "^11.2.1",
73
+ "@rollup/plugin-replace": "^2.3.3",
74
+ "rollup-plugin-cleanup": "^3.2.1",
75
+ "rollup-plugin-peer-deps-external": "^2.2.4",
76
+ "rollup": "^2.77.2",
77
+ "typescript": "^4.3.4",
78
+ "tslib": "^2.0.0",
79
+ "uglify-js": "3.16.0",
80
+ "@types/node": "24.0.14"
81
+ },
82
+ "dependencies": {
83
+ "@microsoft/applicationinsights-core-js": "^3.4.1",
84
+ "@microsoft/applicationinsights-shims": "^3.0.1",
85
+ "@microsoft/dynamicproto-js": "^2.0.3",
86
+ "@nevware21/ts-utils": ">= 0.11.3 < 2.x"
87
+ },
88
+ "overrides": {
89
+ "basic-ftp": ">=5.2.0",
90
+ "form-data": "^2.5.5",
91
+ "tar": "^7.5.13",
92
+ "minimatch": "^3.1.4"
93
+ },
94
+ "peerDependencies": {
95
+ "tslib": "*",
96
+ "react-native": "*",
97
+ "react-native-device-info": ">=5.2.1"
98
+ },
99
+ "peerDependenciesMeta": {
100
+ "react-native-device-info": {
101
+ "optional": true
102
+ }
103
+ }
104
+ }
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.57.8"
8
+ "packageVersion": "7.58.1"
9
9
  }
10
10
  ]
11
11
  }