@microsoft/applicationinsights-react-native 4.3.4-nightly.2410-11 → 4.3.4

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.
Files changed (34) hide show
  1. package/dist-esm/DeviceInfo/DeviceModule.js +2 -6
  2. package/dist-esm/DeviceInfo/DeviceModule.js.map +1 -1
  3. package/dist-esm/DeviceInfo/ReactNativeDeviceInfo.js +2 -6
  4. package/dist-esm/DeviceInfo/ReactNativeDeviceInfo.js.map +1 -1
  5. package/dist-esm/Interfaces/IDeviceInfoModule.js +2 -6
  6. package/dist-esm/Interfaces/IDeviceInfoModule.js.map +1 -1
  7. package/dist-esm/Interfaces/INativeDevice.js +2 -6
  8. package/dist-esm/Interfaces/INativeDevice.js.map +1 -1
  9. package/dist-esm/Interfaces/IReactNativePluginConfig.js +0 -4
  10. package/dist-esm/Interfaces/IReactNativePluginConfig.js.map +1 -1
  11. package/dist-esm/Interfaces/index.js +2 -6
  12. package/dist-esm/Interfaces/index.js.map +1 -1
  13. package/dist-esm/ReactNativeManualDevicePlugin.js +46 -13
  14. package/dist-esm/ReactNativeManualDevicePlugin.js.map +1 -1
  15. package/dist-esm/ReactNativePlugin.js +3 -7
  16. package/dist-esm/ReactNativePlugin.js.map +1 -1
  17. package/dist-esm/index.js +2 -6
  18. package/dist-esm/index.js.map +1 -1
  19. package/dist-esm/manualIndex.js +2 -6
  20. package/dist-esm/manualIndex.js.map +1 -1
  21. package/package.json +97 -100
  22. package/browser/applicationinsights-react-native.js +0 -3133
  23. package/browser/applicationinsights-react-native.js.map +0 -1
  24. package/browser/applicationinsights-react-native.min.js +0 -6
  25. package/browser/applicationinsights-react-native.min.js.map +0 -1
  26. package/dist/applicationinsights-react-native.api.json +0 -1149
  27. package/dist/applicationinsights-react-native.api.md +0 -68
  28. package/dist/applicationinsights-react-native.d.ts +0 -126
  29. package/dist/applicationinsights-react-native.js +0 -3133
  30. package/dist/applicationinsights-react-native.js.map +0 -1
  31. package/dist/applicationinsights-react-native.min.js +0 -6
  32. package/dist/applicationinsights-react-native.min.js.map +0 -1
  33. package/dist/applicationinsights-react-native.rollup.d.ts +0 -131
  34. package/types/tsdoc-metadata.json +0 -11
@@ -1,9 +1,5 @@
1
- /*
2
- * Application Insights JavaScript SDK - React Native Plugin, 4.3.4-nightly.2410-11
3
- * Copyright (c) Microsoft and contributors. All rights reserved.
4
- */
5
-
6
-
1
+ // Copyright (c) Microsoft Corporation. All rights reserved.
2
+ // Licensed under the MIT License.
7
3
  import { objDefineAccessors } from "@microsoft/applicationinsights-core-js";
8
4
  export var DEVICE_MODEL = "model";
9
5
  export var DEVICE_TYPE = "type";
@@ -1 +1 @@
1
- {"version":3,"file":"DeviceModule.js.map","sources":["DeviceModule.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { objDefineAccessors } from \"@microsoft/applicationinsights-core-js\";\r\nexport var DEVICE_MODEL = \"model\";\r\nexport var DEVICE_TYPE = \"type\";\r\nexport var UNIQUE_ID = \"id\";\r\nvar DeviceModule = /** @class */ (function () {\r\n function DeviceModule() {\r\n var _self = this;\r\n var _model = null;\r\n var _deviceType = null;\r\n var _uniqueId = null;\r\n function _getModel() {\r\n return _model;\r\n }\r\n function _getDeviceType() {\r\n return _deviceType;\r\n }\r\n function _getUniqueId() {\r\n return _uniqueId;\r\n }\r\n // Provide the public interface methods for accessing the values\r\n _self.getModel = _getModel;\r\n _self.getDeviceType = _getDeviceType;\r\n _self.getUniqueId = _getUniqueId;\r\n // Provide setters (for testing) and re-use the functions for minification\r\n objDefineAccessors(_self, DEVICE_MODEL, _getModel, function (value) { return _model = value; });\r\n objDefineAccessors(_self, DEVICE_TYPE, _getDeviceType, function (value) { return _deviceType = value; });\r\n objDefineAccessors(_self, UNIQUE_ID, _getUniqueId, function (value) { return _uniqueId = value; });\r\n }\r\n return DeviceModule;\r\n}());\r\nexport { DeviceModule };\r\n//# sourceMappingURL=DeviceModule.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;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"}
1
+ {"version":3,"file":"DeviceModule.js","sourceRoot":"","sources":["../../src/DeviceInfo/DeviceModule.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAG5E,MAAM,CAAC,IAAM,YAAY,GAAG,OAAO,CAAC;AACpC,MAAM,CAAC,IAAM,WAAW,GAAG,MAAM,CAAC;AAClC,MAAM,CAAC,IAAM,SAAS,GAAG,IAAI,CAAC;AAE9B;IAKI;QACI,IAAI,KAAK,GAAG,IAAI,CAAC;QACjB,IAAI,MAAM,GAAW,IAAI,CAAC;QAC1B,IAAI,WAAW,GAAW,IAAI,CAAC;QAC/B,IAAI,SAAS,GAA6B,IAAI,CAAC;QAE/C,SAAS,SAAS;YACd,OAAO,MAAM,CAAC;QAClB,CAAC;QAED,SAAS,cAAc;YACnB,OAAO,WAAW,CAAC;QACvB,CAAC;QAED,SAAS,YAAY;YACjB,OAAO,SAAS,CAAC;QACrB,CAAC;QAED,gEAAgE;QAChE,KAAK,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC3B,KAAK,CAAC,aAAa,GAAG,cAAc,CAAC;QACrC,KAAK,CAAC,WAAW,GAAG,YAAY,CAAA;QAEhC,0EAA0E;QAC1E,kBAAkB,CAAC,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,UAAC,KAAK,IAAK,OAAA,MAAM,GAAG,KAAK,EAAd,CAAc,CAAC,CAAC;QAC9E,kBAAkB,CAAC,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,UAAC,KAAK,IAAK,OAAA,WAAW,GAAG,KAAK,EAAnB,CAAmB,CAAC,CAAC;QACvF,kBAAkB,CAAC,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,UAAC,KAAK,IAAK,OAAA,SAAS,GAAG,KAAK,EAAjB,CAAiB,CAAC,CAAC;IACrF,CAAC;IACL,mBAAC;AAAD,CAAC,AAjCD,IAiCC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nimport { objDefineAccessors } from \"@microsoft/applicationinsights-core-js\";\r\nimport { IDeviceInfoModule } from \"../Interfaces/IDeviceInfoModule\";\r\n\r\nexport const DEVICE_MODEL = \"model\";\r\nexport const DEVICE_TYPE = \"type\";\r\nexport const UNIQUE_ID = \"id\";\r\n\r\nexport class DeviceModule implements IDeviceInfoModule {\r\n public getModel: () => string;\r\n public getDeviceType: () => string;\r\n public getUniqueId: () => string | Promise<string>;\r\n\r\n constructor() {\r\n let _self = this;\r\n let _model: string = null;\r\n let _deviceType: string = null;\r\n let _uniqueId: string | Promise<string> = null;\r\n\r\n function _getModel() {\r\n return _model;\r\n }\r\n\r\n function _getDeviceType() {\r\n return _deviceType;\r\n }\r\n\r\n function _getUniqueId() {\r\n return _uniqueId;\r\n }\r\n\r\n // Provide the public interface methods for accessing the values\r\n _self.getModel = _getModel;\r\n _self.getDeviceType = _getDeviceType;\r\n _self.getUniqueId = _getUniqueId\r\n\r\n // Provide setters (for testing) and re-use the functions for minification\r\n objDefineAccessors(_self, DEVICE_MODEL, _getModel, (value) => _model = value);\r\n objDefineAccessors(_self, DEVICE_TYPE, _getDeviceType, (value) => _deviceType = value);\r\n objDefineAccessors(_self, UNIQUE_ID, _getUniqueId, (value) => _uniqueId = value);\r\n }\r\n}"]}
@@ -1,9 +1,5 @@
1
- /*
2
- * Application Insights JavaScript SDK - React Native Plugin, 4.3.4-nightly.2410-11
3
- * Copyright (c) Microsoft and contributors. All rights reserved.
4
- */
5
-
6
-
1
+ // Copyright (c) Microsoft Corporation. All rights reserved.
2
+ // Licensed under the MIT License.
7
3
  import DeviceInfo from "react-native-device-info";
8
4
  /**
9
5
  * Returns the "react-native-device-info" as the Device Info Module
@@ -1 +1 @@
1
- {"version":3,"file":"ReactNativeDeviceInfo.js.map","sources":["ReactNativeDeviceInfo.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport DeviceInfo from \"react-native-device-info\";\r\n/**\r\n * Returns the \"react-native-device-info\" as the Device Info Module\r\n * @returns\r\n */\r\nexport function getReactNativeDeviceInfo() {\r\n return DeviceInfo;\r\n}\r\n//# sourceMappingURL=ReactNativeDeviceInfo.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
1
+ {"version":3,"file":"ReactNativeDeviceInfo.js","sourceRoot":"","sources":["../../src/DeviceInfo/ReactNativeDeviceInfo.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAGlD;;;GAGG;AACH,MAAM,UAAU,wBAAwB;IACpC,OAAO,UAAU,CAAC;AACtB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nimport DeviceInfo from \"react-native-device-info\";\r\nimport { IDeviceInfoModule } from \"../Interfaces/IDeviceInfoModule\";\r\n\r\n/**\r\n * Returns the \"react-native-device-info\" as the Device Info Module\r\n * @returns\r\n */\r\nexport function getReactNativeDeviceInfo(): IDeviceInfoModule {\r\n return DeviceInfo;\r\n}"]}
@@ -1,8 +1,4 @@
1
- /*
2
- * Application Insights JavaScript SDK - React Native Plugin, 4.3.4-nightly.2410-11
3
- * Copyright (c) Microsoft and contributors. All rights reserved.
4
- */
5
-
6
-
1
+ // Copyright (c) Microsoft Corporation. All rights reserved.
2
+ // Licensed under the MIT License.
7
3
  export {};
8
4
  //# sourceMappingURL=IDeviceInfoModule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IDeviceInfoModule.js.map","sources":["IDeviceInfoModule.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport {};\r\n//# sourceMappingURL=IDeviceInfoModule.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA"}
1
+ {"version":3,"file":"IDeviceInfoModule.js","sourceRoot":"","sources":["../../src/Interfaces/IDeviceInfoModule.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\n/**\r\n * Interface to abstract how the plugin can access the Device Info, this is a stripped\r\n * down version of the \"react-native-device-info\" interface and is mostly supplied for\r\n * testing.\r\n */\r\nexport interface IDeviceInfoModule {\r\n /**\r\n * Returns the Device Model\r\n */\r\n getModel: () => string;\r\n\r\n /**\r\n * Returns the device type\r\n */\r\n getDeviceType: () => string;\r\n\r\n /**\r\n * Returns the unique Id for the device, to support both the current version and previous\r\n * versions react-native-device-info, this may return either a `string` or `Promise<string>`,\r\n * when a promise is returned the plugin will \"wait\" for the promise to `resolve` or `reject`\r\n * before processing any events. This WILL cause telemetry to be BLOCKED until either of these\r\n * states, so when returning a Promise it MUST `resolve` or `reject` it can't just never resolve.\r\n * There is a default timeout configured via `uniqueIdPromiseTimeout` to automatically unblock\r\n * event processing when this issue occurs.\r\n */\r\n getUniqueId: () => Promise<string> | string;\r\n}\r\n\r\n"]}
@@ -1,8 +1,4 @@
1
- /*
2
- * Application Insights JavaScript SDK - React Native Plugin, 4.3.4-nightly.2410-11
3
- * Copyright (c) Microsoft and contributors. All rights reserved.
4
- */
5
-
6
-
1
+ // Copyright (c) Microsoft Corporation. All rights reserved.
2
+ // Licensed under the MIT License.
7
3
  export {};
8
4
  //# sourceMappingURL=INativeDevice.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"INativeDevice.js.map","sources":["INativeDevice.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport {};\r\n//# sourceMappingURL=INativeDevice.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA"}
1
+ {"version":3,"file":"INativeDevice.js","sourceRoot":"","sources":["../../src/Interfaces/INativeDevice.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nexport interface INativeDevice {\r\n /**\r\n * Device type, e.g. Handset, Tablet, Tv\r\n */\r\n deviceClass?: string;\r\n\r\n /**\r\n * Unique installation ID\r\n */\r\n id?: string;\r\n\r\n /**\r\n * The device model: iPhone XS Max, Galaxy S10, etc\r\n */\r\n model?: string;\r\n}\r\n"]}
@@ -1,6 +1,2 @@
1
- /*
2
- * Application Insights JavaScript SDK - React Native Plugin, 4.3.4-nightly.2410-11
3
- * Copyright (c) Microsoft and contributors. All rights reserved.
4
- */
5
1
  export {};
6
2
  //# sourceMappingURL=IReactNativePluginConfig.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IReactNativePluginConfig.js.map","sources":["IReactNativePluginConfig.js"],"sourcesContent":["export {};\r\n//# sourceMappingURL=IReactNativePluginConfig.js.map"],"names":[],"mappings":";;;;AAAA;AACA"}
1
+ {"version":3,"file":"IReactNativePluginConfig.js","sourceRoot":"","sources":["../../src/Interfaces/IReactNativePluginConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport interface IReactNativePluginConfig {\r\n /**\r\n * Disable automatic device collection\r\n */\r\n disableDeviceCollection?: boolean;\r\n\r\n /**\r\n * Disable automatic exception collection\r\n */\r\n disableExceptionCollection?: boolean;\r\n\r\n /**\r\n * Timeout value to unblock the processing of events if the DeviceInfoModule\r\n * returns a Promise.\r\n */\r\n uniqueIdPromiseTimeout?: number;\r\n}\r\n"]}
@@ -1,8 +1,4 @@
1
- /*
2
- * Application Insights JavaScript SDK - React Native Plugin, 4.3.4-nightly.2410-11
3
- * Copyright (c) Microsoft and contributors. All rights reserved.
4
- */
5
-
6
-
1
+ // Copyright (c) Microsoft Corporation. All rights reserved.
2
+ // Licensed under the MIT License.
7
3
  export {};
8
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js.map","sources":["index.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport {};\r\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Interfaces/index.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nimport { INativeDevice } from \"./INativeDevice\";\r\nimport { IReactNativePluginConfig } from \"./IReactNativePluginConfig\";\r\n\r\nexport { INativeDevice, IReactNativePluginConfig };\r\n"]}
@@ -1,10 +1,6 @@
1
- /*
2
- * Application Insights JavaScript SDK - React Native Plugin, 4.3.4-nightly.2410-11
3
- * Copyright (c) Microsoft and contributors. All rights reserved.
4
- */
5
-
6
-
7
- import { __extendsFn as __extends } from "@microsoft/applicationinsights-shims";
1
+ // Copyright (c) Microsoft Corporation. All rights reserved.
2
+ // Licensed under the MIT License.
3
+ import { __extends } from "tslib";
8
4
  import dynamicProto from "@microsoft/dynamicproto-js";
9
5
  import { AnalyticsPluginIdentifier } from "@microsoft/applicationinsights-common";
10
6
  import { BaseTelemetryPlugin, _throwInternal, _warnToConsole, arrForEach, dumpObj, getExceptionName, onConfigChange } from "@microsoft/applicationinsights-core-js";
@@ -224,12 +220,49 @@ var ReactNativeManualDevicePlugin = /** @class */ (function (_super) {
224
220
  }
225
221
  return _deviceInfoModule;
226
222
  };
227
- // Removed Stub for ReactNativeManualDevicePlugin.prototype.initialize.
228
- // Removed Stub for ReactNativeManualDevicePlugin.prototype.processTelemetry.
229
- // Removed Stub for ReactNativeManualDevicePlugin.prototype.setDeviceInfoModule.
230
- // Removed Stub for ReactNativeManualDevicePlugin.prototype.setDeviceId.
231
- // Removed Stub for ReactNativeManualDevicePlugin.prototype.setDeviceModel.
232
- // Removed Stub for ReactNativeManualDevicePlugin.prototype.setDeviceType.
223
+ ReactNativeManualDevicePlugin.prototype.initialize = function (config, // need `| object` to coerce to interface
224
+ core, extensions) {
225
+ // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
226
+ };
227
+ ReactNativeManualDevicePlugin.prototype.processTelemetry = function (env, itemCtx) {
228
+ // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
229
+ };
230
+ /**
231
+ * Set the module that will be used during initialization when collecting device is enabled
232
+ * (the default), automatic collection can be disabled via the `disableDeviceCollection`
233
+ * config. If no `deviceInfoModule` is set and collection is enabled, an error will be thrown.
234
+ * @param deviceInfoModule
235
+ */
236
+ ReactNativeManualDevicePlugin.prototype.setDeviceInfoModule = function (deviceInfoModule) {
237
+ // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
238
+ };
239
+ /**
240
+ * Manually set the deviceId, if set before initialization and automatic device info collection
241
+ * is enabled this value may get overwritten. If you want to keep this value disable auto
242
+ * collection by setting the `disableDeviceCollection` config to true.
243
+ * @param newId - The value to use as the device Id.
244
+ */
245
+ ReactNativeManualDevicePlugin.prototype.setDeviceId = function (newId) {
246
+ // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
247
+ };
248
+ /**
249
+ * Manually set the device model, if set before initialization and automatic device info
250
+ * collection is enabled this value may get overwritten. If you want to keep this value
251
+ * disable auto collection by setting the `disableDeviceCollection` config to true.
252
+ * @param newModel - The value to use as the device model.
253
+ */
254
+ ReactNativeManualDevicePlugin.prototype.setDeviceModel = function (newModel) {
255
+ // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
256
+ };
257
+ /**
258
+ * Manually set the device type (class), if set before initialization and automatic device
259
+ * info collection is enabled this value may get overwritten. If you want to keep this value
260
+ * disable auto collection by setting the `disableDeviceCollection` config to true.
261
+ * @param newType - The value to use as the device type
262
+ */
263
+ ReactNativeManualDevicePlugin.prototype.setDeviceType = function (newType) {
264
+ // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
265
+ };
233
266
  return ReactNativeManualDevicePlugin;
234
267
  }(BaseTelemetryPlugin));
235
268
  export { ReactNativeManualDevicePlugin };
@@ -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;AAC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AAO,CAAC;YAChC,KAAa,CAAC,iBAAiB,GAAG;gBAC/B,OAAO,CAAC,OAAO,EAAE,iBAAiB,EAAE,OAAO,CAAC,CAAC;YACjD,CAAC,CAAA;QACL,CAAC,CAAC,CAAC;;IACP,CAAC;IAES,2DAAmB,GAA7B,UAA8B,iBAAiB;QAC3C,IAAI,CAAC,iBAAiB,EAAE;YACpB,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,wHAAwH,CAAC,CAAC;YACzJ,OAAO,IAAI,CAAC;SACf;QACD,OAAO,iBAAiB,CAAC;IAC7B,CAAC;IAEM,kDAAU,GAAjB,UACI,MAA0C,EAAE,yCAAyC;IACrF,IAAuB,EACvB,UAAsB;QAEtB,oFAAoF;IACxF,CAAC;IAEM,wDAAgB,GAAvB,UAAwB,GAAmB,EAAE,OAAkC;QAC3E,oFAAoF;IACxF,CAAC;IAED;;;;;OAKG;IACI,2DAAmB,GAA1B,UAA2B,gBAAmC;QAC1D,oFAAoF;IACxF,CAAC;IAED;;;;;OAKG;IACI,mDAAW,GAAlB,UAAmB,KAAa;QAC5B,oFAAoF;IACxF,CAAC;IAED;;;;;OAKG;IACI,sDAAc,GAArB,UAAsB,QAAgB;QAClC,oFAAoF;IACxF,CAAC;IAED;;;;;OAKG;IACI,qDAAa,GAApB,UAAqB,OAAe;QAChC,oFAAoF;IACxF,CAAC;IACL,oCAAC;AAAD,CAAC,AAtSD,CAAmD,mBAAmB,GAsSrE","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport {\r\n AnalyticsPluginIdentifier, IAppInsights, IDevice, IExceptionTelemetry, eSeverityLevel\r\n} from \"@microsoft/applicationinsights-common\";\r\nimport {\r\n BaseTelemetryPlugin, IAppInsightsCore, IConfigDefaults, IPlugin, IProcessTelemetryContext, IProcessTelemetryUnloadContext, ITelemetryItem,\r\n ITelemetryPlugin, ITelemetryUnloadState, _eInternalMessageId, _throwInternal, _warnToConsole, arrForEach, dumpObj, eLoggingSeverity,\r\n getExceptionName, onConfigChange\r\n} from \"@microsoft/applicationinsights-core-js\";\r\nimport { getGlobal, strShimUndefined } from \"@microsoft/applicationinsights-shims\";\r\nimport { INativeDevice, IReactNativePluginConfig } from \"./Interfaces\";\r\nimport { isPromiseLike, isString, ITimerHandler, objDeepFreeze, scheduleTimeout } from \"@nevware21/ts-utils\";\r\nimport { IDeviceInfoModule } from \"./Interfaces/IDeviceInfoModule\";\r\n\r\ndeclare var global: Window;\r\nconst defaultReactNativePluginConfig: IConfigDefaults<IReactNativePluginConfig> = objDeepFreeze({\r\n disableDeviceCollection: false,\r\n disableExceptionCollection: false,\r\n uniqueIdPromiseTimeout: 5000\r\n});\r\n\r\nexport class ReactNativeManualDevicePlugin extends BaseTelemetryPlugin {\r\n\r\n identifier: string = \"AppInsightsReactNativePlugin\";\r\n priority: number = 140;\r\n _nextPlugin?: ITelemetryPlugin;\r\n\r\n private _setExceptionHandler: () => void;\r\n private _collectDeviceInfo: () => boolean;\r\n\r\n constructor(config?: IReactNativePluginConfig) {\r\n super();\r\n\r\n // Automatic defaults, don't set values here only set in _initDefaults()\r\n let _device: INativeDevice;\r\n let _config: IReactNativePluginConfig;\r\n let _analyticsPlugin: IAppInsights;\r\n let _defaultHandler;\r\n let _waitingForId: boolean;\r\n let _waitingTimer: ITimerHandler;\r\n let _waitingItems: { item: ITelemetryItem, itemCtx?: IProcessTelemetryContext }[] = null;\r\n let _deviceInfoModule: IDeviceInfoModule;\r\n \r\n let _deviceInfoNeedsUpdate:boolean;\r\n let exceptionHandlerSet:boolean;\r\n \r\n dynamicProto(ReactNativeManualDevicePlugin, this, (_self, _base) => {\r\n _initDefaults();\r\n\r\n _self.initialize = (\r\n config?: IReactNativePluginConfig | object, // need `| object` to coerce to interface\r\n core?: IAppInsightsCore,\r\n extensions?: IPlugin[]\r\n ) => {\r\n let identifier = this.identifier;\r\n if (!_self.isInitialized()) {\r\n _base.initialize(config, core, extensions);\r\n\r\n _self._addHook(onConfigChange(config, (details) => {\r\n let ctx = _self._getTelCtx();\r\n _config = ctx.getExtCfg<IReactNativePluginConfig>(identifier, defaultReactNativePluginConfig);\r\n\r\n if (!_config.disableDeviceCollection && _deviceInfoNeedsUpdate) {\r\n _deviceInfoNeedsUpdate = !_self._collectDeviceInfo();\r\n }\r\n \r\n if (core && core.getPlugin) {\r\n _analyticsPlugin = core.getPlugin<any>(AnalyticsPluginIdentifier)?.plugin as IAppInsights;\r\n } else {\r\n _analyticsPlugin = null;\r\n }\r\n\r\n if (exceptionHandlerSet){\r\n _resetGlobalErrorHandler();\r\n }\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\r\n\r\n _self.processTelemetry = (item: ITelemetryItem, itemCtx?: IProcessTelemetryContext) => {\r\n if (!_waitingForId) {\r\n _applyDeviceContext(item);\r\n _self.processNext(item, itemCtx);\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,\r\n itemCtx\r\n });\r\n }\r\n };\r\n \r\n _self.setDeviceInfoModule = (deviceInfoModule: IDeviceInfoModule) => {\r\n // Set the configured deviceInfoModule\r\n _deviceInfoModule = deviceInfoModule;\r\n _deviceInfoNeedsUpdate = true;\r\n };\r\n\r\n _self.setDeviceId =_setDeviceId;\r\n \r\n _self.setDeviceModel = (newModel: string) => {\r\n _device.model = newModel;\r\n };\r\n \r\n _self.setDeviceType = (newType: string) => {\r\n _device.deviceClass = newType;\r\n };\r\n \r\n /**\r\n * Automatically collects native device info for this device\r\n */\r\n _self._collectDeviceInfo = () : boolean => {\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 let 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(() => {\r\n _waitingTimer = null;\r\n _setDeviceId(_device.id);\r\n }, 0);\r\n _waitingTimer.unref();\r\n uniqueId.then((value) => {\r\n _setDeviceId(value);\r\n }, (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 } else if (isString(uniqueId)) {\r\n _device.id = uniqueId;\r\n }\r\n return true;\r\n } catch (e) {\r\n _warnToConsole(_self.diagLog(), \"Failed to get DeviceInfo: \" + getExceptionName(e) + \" - \" + dumpObj(e));\r\n }\r\n }\r\n\r\n _self._doTeardown = (unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState, asyncCallback?: () => void): void | boolean => {\r\n _resetGlobalErrorHandler();\r\n _initDefaults();\r\n };\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\r\n \r\n\r\n function _setDeviceId(newId: string) {\r\n _device.id = newId;\r\n _waitingForId = false;\r\n if (_waitingTimer) {\r\n _waitingTimer.cancel();\r\n }\r\n\r\n if (!_waitingForId && _waitingItems && _waitingItems.length > 0 && _self.isInitialized()) {\r\n let items = _waitingItems;\r\n _waitingItems = null;\r\n arrForEach(items, (value) => {\r\n try {\r\n _self.processTelemetry(value.item, value.itemCtx);\r\n } catch (e) {\r\n // Just ignore\r\n }\r\n });\r\n }\r\n }\r\n\r\n function _applyDeviceContext(item: ITelemetryItem) {\r\n if (_device) {\r\n item.ext = item.ext || {};\r\n item.ext.device = item.ext.device || ({} as IDevice);\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\r\n function _getGlobal(): any {\r\n if (typeof global !== strShimUndefined && global) {\r\n return global as any;\r\n }\r\n\r\n return getGlobal() as any;\r\n }\r\n\r\n _self._setExceptionHandler = () => {\r\n const _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\r\n function _resetGlobalErrorHandler() {\r\n const _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\r\n // default global error handler syntax: handleError(e, isFatal)\r\n function _trackException(e, isFatal) {\r\n const exception: IExceptionTelemetry = { exception: e, severityLevel: eSeverityLevel.Error };\r\n\r\n if (_analyticsPlugin) {\r\n _analyticsPlugin.trackException(exception);\r\n } else {\r\n _throwInternal(_self.diagLog(),\r\n eLoggingSeverity.CRITICAL, _eInternalMessageId.TelemetryInitializerFailed, \"Analytics plugin is not available, ReactNative plugin telemetry will not be sent: \");\r\n }\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\r\n // Test Hooks\r\n (_self as any)._config = _config;\r\n (_self as any)._getDbgPlgTargets = () => {\r\n return [_device, _deviceInfoModule, _config];\r\n }\r\n });\r\n }\r\n\r\n protected getDeviceInfoModule(_deviceInfoModule): IDeviceInfoModule {\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\r\n public initialize(\r\n config?: IReactNativePluginConfig | object, // need `| object` to coerce to interface\r\n core?: IAppInsightsCore,\r\n extensions?: IPlugin[]) {\r\n\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n }\r\n\r\n public processTelemetry(env: ITelemetryItem, itemCtx?: IProcessTelemetryContext) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n }\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 public setDeviceInfoModule(deviceInfoModule: IDeviceInfoModule) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n }\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 public setDeviceId(newId: string) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n }\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 public setDeviceModel(newModel: string) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n }\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 public setDeviceType(newType: string) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n }\r\n}\r\n"]}
@@ -1,10 +1,6 @@
1
- /*
2
- * Application Insights JavaScript SDK - React Native Plugin, 4.3.4-nightly.2410-11
3
- * Copyright (c) Microsoft and contributors. All rights reserved.
4
- */
5
-
6
-
7
- import { __extendsFn as __extends } from "@microsoft/applicationinsights-shims";
1
+ // Copyright (c) Microsoft Corporation. All rights reserved.
2
+ // Licensed under the MIT License.
3
+ import { __extends } from "tslib";
8
4
  import { getReactNativeDeviceInfo } from "./DeviceInfo/ReactNativeDeviceInfo";
9
5
  import { ReactNativeManualDevicePlugin } from "./ReactNativeManualDevicePlugin";
10
6
  var ReactNativePlugin = /** @class */ (function (_super) {
@@ -1 +1 @@
1
- {"version":3,"file":"ReactNativePlugin.js.map","sources":["ReactNativePlugin.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { __extends } from \"tslib\";\r\nimport { getReactNativeDeviceInfo } from \"./DeviceInfo/ReactNativeDeviceInfo\";\r\nimport { ReactNativeManualDevicePlugin } from \"./ReactNativeManualDevicePlugin\";\r\nvar ReactNativePlugin = /** @class */ (function (_super) {\r\n __extends(ReactNativePlugin, _super);\r\n function ReactNativePlugin() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ReactNativePlugin.prototype.getDeviceInfoModule = function (_deviceInfoModule) {\r\n return _deviceInfoModule || getReactNativeDeviceInfo();\r\n };\r\n return ReactNativePlugin;\r\n}(ReactNativeManualDevicePlugin));\r\nexport { ReactNativePlugin };\r\n//# sourceMappingURL=ReactNativePlugin.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC,gFAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
1
+ {"version":3,"file":"ReactNativePlugin.js","sourceRoot":"","sources":["../src/ReactNativePlugin.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AAGlC,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAE9E,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAGhF;IAAuC,qCAA6B;IAApE;;IAIA,CAAC;IAHa,+CAAmB,GAA7B,UAA8B,iBAAiB;QAC3C,OAAO,iBAAiB,IAAI,wBAAwB,EAAE,CAAC;IAC3D,CAAC;IACL,wBAAC;AAAD,CAAC,AAJD,CAAuC,6BAA6B,GAInE","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\n\r\nimport { getReactNativeDeviceInfo } from \"./DeviceInfo/ReactNativeDeviceInfo\";\r\nimport { IDeviceInfoModule } from \"./Interfaces/IDeviceInfoModule\";\r\nimport { ReactNativeManualDevicePlugin } from \"./ReactNativeManualDevicePlugin\";\r\n\r\n\r\nexport class ReactNativePlugin extends ReactNativeManualDevicePlugin {\r\n protected getDeviceInfoModule(_deviceInfoModule): IDeviceInfoModule {\r\n return _deviceInfoModule || getReactNativeDeviceInfo();\r\n }\r\n}\r\n"]}
package/dist-esm/index.js CHANGED
@@ -1,9 +1,5 @@
1
- /*
2
- * Application Insights JavaScript SDK - React Native Plugin, 4.3.4-nightly.2410-11
3
- * Copyright (c) Microsoft and contributors. All rights reserved.
4
- */
5
-
6
-
1
+ // Copyright (c) Microsoft Corporation. All rights reserved.
2
+ // Licensed under the MIT License.
7
3
  import { ReactNativePlugin } from "./ReactNativePlugin";
8
4
  import { getReactNativeDeviceInfo } from "./DeviceInfo/ReactNativeDeviceInfo";
9
5
  import { ReactNativeManualDevicePlugin } from "./ReactNativeManualDevicePlugin";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js.map","sources":["index.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { ReactNativePlugin } from \"./ReactNativePlugin\";\r\nimport { getReactNativeDeviceInfo } from \"./DeviceInfo/ReactNativeDeviceInfo\";\r\nimport { ReactNativeManualDevicePlugin } from \"./ReactNativeManualDevicePlugin\";\r\nexport { ReactNativePlugin, ReactNativeManualDevicePlugin };\r\nexport { getReactNativeDeviceInfo };\r\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAEhF,OAAO,EAAE,iBAAiB,EAAE,6BAA6B,EAA8D,CAAC;AACxH,OAAO,EAAE,wBAAwB,EAAE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nimport { ReactNativePlugin } from \"./ReactNativePlugin\";\r\nimport { INativeDevice, IReactNativePluginConfig } from \"./Interfaces\";\r\nimport { IDeviceInfoModule } from \"./Interfaces/IDeviceInfoModule\";\r\nimport { getReactNativeDeviceInfo } from \"./DeviceInfo/ReactNativeDeviceInfo\";\r\nimport { ReactNativeManualDevicePlugin } from \"./ReactNativeManualDevicePlugin\";\r\n\r\nexport { ReactNativePlugin, ReactNativeManualDevicePlugin, INativeDevice, IReactNativePluginConfig, IDeviceInfoModule };\r\nexport { getReactNativeDeviceInfo };\r\n"]}
@@ -1,9 +1,5 @@
1
- /*
2
- * Application Insights JavaScript SDK - React Native Plugin, 4.3.4-nightly.2410-11
3
- * Copyright (c) Microsoft and contributors. All rights reserved.
4
- */
5
-
6
-
1
+ // Copyright (c) Microsoft Corporation. All rights reserved.
2
+ // Licensed under the MIT License.
7
3
  import { ReactNativeManualDevicePlugin } from "./ReactNativeManualDevicePlugin";
8
4
  export { ReactNativeManualDevicePlugin };
9
5
  //# sourceMappingURL=manualIndex.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"manualIndex.js.map","sources":["manualIndex.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { ReactNativeManualDevicePlugin } from \"./ReactNativeManualDevicePlugin\";\r\nexport { ReactNativeManualDevicePlugin };\r\n//# sourceMappingURL=manualIndex.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA"}
1
+ {"version":3,"file":"manualIndex.js","sourceRoot":"","sources":["../src/manualIndex.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAKlC,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAEhF,OAAO,EAAE,6BAA6B,EAA8D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\n\r\nimport { INativeDevice, IReactNativePluginConfig } from \"./Interfaces\";\r\nimport { IDeviceInfoModule } from \"./Interfaces/IDeviceInfoModule\";\r\nimport { ReactNativeManualDevicePlugin } from \"./ReactNativeManualDevicePlugin\";\r\n\r\nexport { ReactNativeManualDevicePlugin, INativeDevice, IReactNativePluginConfig, IDeviceInfoModule };\r\n\r\n"]}
package/package.json CHANGED
@@ -1,100 +1,97 @@
1
- {
2
- "name": "@microsoft/applicationinsights-react-native",
3
- "version": "4.3.4-nightly.2410-11",
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
- },
11
- "./manual": {
12
- "types": "./types/manualIndex.d.ts",
13
- "import": "./dist-esm/manualIndex.js"
14
- }
15
- },
16
- "types": "types/index.d.ts",
17
- "sideEffects": false,
18
- "author": "Microsoft Application Insights Team",
19
- "license": "MIT",
20
- "repository": {
21
- "type": "git",
22
- "url": "https://github.com/microsoft/applicationinsights-react-native"
23
- },
24
- "bugs": {
25
- "url": "https://github.com/microsoft/applicationinsights-react-native/issues"
26
- },
27
- "homepage": "https://github.com/microsoft/applicationinsights-react-native#readme",
28
- "keywords": [
29
- "performance monitoring",
30
- "application insights",
31
- "microsoft",
32
- "azure",
33
- "react native"
34
- ],
35
- "scripts": {
36
- "build": "npm run build:esm && npm run build:package && npm run dtsgen",
37
- "build:esm": "grunt reactnative",
38
- "build:package": "rollup -c",
39
- "rebuild": "npm run build",
40
- "test": "grunt reactnativetests",
41
- "mintest": "grunt reactnative-mintests",
42
- "testx": "npm run build:test && grunt reactnativetests",
43
- "lint": "tslint -p tsconfig.json",
44
- "dtsgen": "api-extractor run --local && node ../scripts/dtsgen.js \"Microsoft Application Insights react native plugin\"",
45
- "ai-min": "grunt reactnative-min",
46
- "ai-restore": "grunt reactnative-restore"
47
- },
48
- "devDependencies": {
49
- "@microsoft/ai-test-framework": "0.0.1",
50
- "@microsoft/applicationinsights-rollup-es3": "1.1.3",
51
- "@microsoft/api-extractor": "^7.18.1",
52
- "grunt": "^1.5.3",
53
- "grunt-cli": "^1.4.3",
54
- "grunt-contrib-qunit": "^5.0.1",
55
- "grunt-contrib-uglify": "^5.0.1",
56
- "@nevware21/grunt-ts-plugin": "^0.4.3",
57
- "@nevware21/grunt-eslint-ts": "^0.2.2",
58
- "@typescript-eslint/eslint-plugin": "^4.28.0",
59
- "@typescript-eslint/parser": "^4.28.0",
60
- "eslint": "^7.29.0",
61
- "eslint-config-standard": "^16.0.3",
62
- "eslint-plugin-import": "^2.23.4",
63
- "eslint-plugin-node": "^11.1.0",
64
- "eslint-plugin-promise": "^5.1.0",
65
- "qunit": "^2.11.2",
66
- "react": "^18.0.0",
67
- "react-native": "^0.69.9",
68
- "globby": "^11.0.0",
69
- "magic-string": "^0.25.7",
70
- "@rollup/plugin-commonjs": "^18.0.0",
71
- "@rollup/plugin-node-resolve": "^11.2.1",
72
- "@rollup/plugin-replace": "^2.3.3",
73
- "rollup-plugin-cleanup": "^3.2.1",
74
- "rollup-plugin-peer-deps-external": "^2.2.4",
75
- "rollup": "^2.77.2",
76
- "typescript": "^4.3.4",
77
- "tslib": "^2.0.0",
78
- "uglify-js": "3.16.0"
79
- },
80
- "dependencies": {
81
- "@microsoft/applicationinsights-common": "^3.3.3",
82
- "@microsoft/applicationinsights-core-js": "^3.3.3",
83
- "@microsoft/applicationinsights-shims": "^3.0.1",
84
- "@microsoft/dynamicproto-js": "^2.0.3",
85
- "@nevware21/ts-utils": ">= 0.11.3 < 2.x"
86
- },
87
- "peerDependencies": {
88
- "tslib": "*",
89
- "react-native": "*",
90
- "react-native-device-info": ">=5.2.1"
91
- },
92
- "peerDependenciesMeta": {
93
- "react-native-device-info": {
94
- "optional": true
95
- }
96
- },
97
- "publishConfig": {
98
- "tag": "nightly"
99
- }
100
- }
1
+ {
2
+ "name": "@microsoft/applicationinsights-react-native",
3
+ "version": "4.3.4",
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
+ },
11
+ "./manual": {
12
+ "types": "./types/manualIndex.d.ts",
13
+ "import": "./dist-esm/manualIndex.js"
14
+ }
15
+ },
16
+ "types": "types/index.d.ts",
17
+ "sideEffects": false,
18
+ "author": "Microsoft Application Insights Team",
19
+ "license": "MIT",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "https://github.com/microsoft/applicationinsights-react-native"
23
+ },
24
+ "bugs": {
25
+ "url": "https://github.com/microsoft/applicationinsights-react-native/issues"
26
+ },
27
+ "homepage": "https://github.com/microsoft/applicationinsights-react-native#readme",
28
+ "keywords": [
29
+ "performance monitoring",
30
+ "application insights",
31
+ "microsoft",
32
+ "azure",
33
+ "react native"
34
+ ],
35
+ "scripts": {
36
+ "build": "npm run build:esm && npm run build:package && npm run dtsgen",
37
+ "build:esm": "grunt reactnative",
38
+ "build:package": "rollup -c",
39
+ "rebuild": "npm run build",
40
+ "test": "grunt reactnativetests",
41
+ "mintest": "grunt reactnative-mintests",
42
+ "testx": "npm run build:test && grunt reactnativetests",
43
+ "lint": "tslint -p tsconfig.json",
44
+ "dtsgen": "api-extractor run --local && node ../scripts/dtsgen.js \"Microsoft Application Insights react native plugin\"",
45
+ "ai-min": "grunt reactnative-min",
46
+ "ai-restore": "grunt reactnative-restore"
47
+ },
48
+ "devDependencies": {
49
+ "@microsoft/ai-test-framework": "0.0.1",
50
+ "@microsoft/applicationinsights-rollup-es3": "1.1.3",
51
+ "@microsoft/api-extractor": "^7.18.1",
52
+ "grunt": "^1.5.3",
53
+ "grunt-cli": "^1.4.3",
54
+ "grunt-contrib-qunit": "^5.0.1",
55
+ "grunt-contrib-uglify": "^5.0.1",
56
+ "@nevware21/grunt-ts-plugin": "^0.4.3",
57
+ "@nevware21/grunt-eslint-ts": "^0.2.2",
58
+ "@typescript-eslint/eslint-plugin": "^4.28.0",
59
+ "@typescript-eslint/parser": "^4.28.0",
60
+ "eslint": "^7.29.0",
61
+ "eslint-config-standard": "^16.0.3",
62
+ "eslint-plugin-import": "^2.23.4",
63
+ "eslint-plugin-node": "^11.1.0",
64
+ "eslint-plugin-promise": "^5.1.0",
65
+ "qunit": "^2.11.2",
66
+ "react": "^18.0.0",
67
+ "react-native": "^0.69.9",
68
+ "globby": "^11.0.0",
69
+ "magic-string": "^0.25.7",
70
+ "@rollup/plugin-commonjs": "^18.0.0",
71
+ "@rollup/plugin-node-resolve": "^11.2.1",
72
+ "@rollup/plugin-replace": "^2.3.3",
73
+ "rollup-plugin-cleanup": "^3.2.1",
74
+ "rollup-plugin-peer-deps-external": "^2.2.4",
75
+ "rollup": "^2.77.2",
76
+ "typescript": "^4.3.4",
77
+ "tslib": "^2.0.0",
78
+ "uglify-js": "3.16.0"
79
+ },
80
+ "dependencies": {
81
+ "@microsoft/applicationinsights-common": "^3.3.4",
82
+ "@microsoft/applicationinsights-core-js": "^3.3.4",
83
+ "@microsoft/applicationinsights-shims": "^3.0.1",
84
+ "@microsoft/dynamicproto-js": "^2.0.3",
85
+ "@nevware21/ts-utils": ">= 0.11.3 < 2.x"
86
+ },
87
+ "peerDependencies": {
88
+ "tslib": "*",
89
+ "react-native": "*",
90
+ "react-native-device-info": ">=5.2.1"
91
+ },
92
+ "peerDependenciesMeta": {
93
+ "react-native-device-info": {
94
+ "optional": true
95
+ }
96
+ }
97
+ }