@microsoft/applicationinsights-osplugin-js 3.3.5-nightly3.2501-06 → 3.3.5-nightly3.2501-08
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/es5/{ai.osplugin.3.3.5-nightly3.2501-06.cjs.js → ai.osplugin.3.3.5-nightly3.2501-08.cjs.js} +4 -4
- package/browser/es5/ai.osplugin.3.3.5-nightly3.2501-08.cjs.js.map +1 -0
- package/browser/es5/{ai.osplugin.3.3.5-nightly3.2501-06.cjs.min.js → ai.osplugin.3.3.5-nightly3.2501-08.cjs.min.js} +3 -3
- package/browser/es5/ai.osplugin.3.3.5-nightly3.2501-08.cjs.min.js.map +1 -0
- package/browser/es5/{ai.osplugin.3.3.5-nightly3.2501-06.gbl.js → ai.osplugin.3.3.5-nightly3.2501-08.gbl.js} +6 -6
- package/browser/es5/ai.osplugin.3.3.5-nightly3.2501-08.gbl.js.map +1 -0
- package/browser/es5/{ai.osplugin.3.3.5-nightly3.2501-06.gbl.min.js → ai.osplugin.3.3.5-nightly3.2501-08.gbl.min.js} +3 -3
- package/browser/es5/ai.osplugin.3.3.5-nightly3.2501-08.gbl.min.js.map +1 -0
- package/browser/es5/ai.osplugin.3.3.5-nightly3.2501-08.integrity.json +66 -0
- package/browser/es5/{ai.osplugin.3.3.5-nightly3.2501-06.js → ai.osplugin.3.3.5-nightly3.2501-08.js} +6 -6
- package/browser/es5/ai.osplugin.3.3.5-nightly3.2501-08.js.map +1 -0
- package/browser/es5/{ai.osplugin.3.3.5-nightly3.2501-06.min.js → ai.osplugin.3.3.5-nightly3.2501-08.min.js} +3 -3
- package/browser/es5/ai.osplugin.3.3.5-nightly3.2501-08.min.js.map +1 -0
- package/browser/es5/ai.osplugin.3.cjs.js +3 -3
- package/browser/es5/ai.osplugin.3.cjs.js.map +1 -1
- package/browser/es5/ai.osplugin.3.cjs.min.js +2 -2
- package/browser/es5/ai.osplugin.3.cjs.min.js.map +1 -1
- package/browser/es5/ai.osplugin.3.gbl.js +5 -5
- package/browser/es5/ai.osplugin.3.gbl.js.map +1 -1
- package/browser/es5/ai.osplugin.3.gbl.min.js +2 -2
- package/browser/es5/ai.osplugin.3.gbl.min.js.map +1 -1
- package/browser/es5/ai.osplugin.3.integrity.json +25 -25
- package/browser/es5/ai.osplugin.3.js +5 -5
- package/browser/es5/ai.osplugin.3.js.map +1 -1
- package/browser/es5/ai.osplugin.3.min.js +2 -2
- package/browser/es5/ai.osplugin.3.min.js.map +1 -1
- package/dist/es5/applicationinsights-osplugin-js.js +3 -3
- package/dist/es5/applicationinsights-osplugin-js.js.map +1 -1
- package/dist/es5/applicationinsights-osplugin-js.min.js +2 -2
- package/dist/es5/applicationinsights-osplugin-js.min.js.map +1 -1
- package/dist-es5/DataModels.js +1 -1
- package/dist-es5/OsPlugin.js +2 -2
- package/dist-es5/OsPlugin.js.map +1 -1
- package/dist-es5/__DynamicConstants.js +1 -1
- package/dist-es5/applicationinsights-osplugin-js.js +1 -1
- package/package.json +5 -5
- package/types/applicationinsights-osplugin-js.d.ts +3 -3
- package/types/applicationinsights-osplugin-js.namespaced.d.ts +8 -8
- package/browser/es5/ai.osplugin.3.3.5-nightly3.2501-06.cjs.js.map +0 -1
- package/browser/es5/ai.osplugin.3.3.5-nightly3.2501-06.cjs.min.js.map +0 -1
- package/browser/es5/ai.osplugin.3.3.5-nightly3.2501-06.gbl.js.map +0 -1
- package/browser/es5/ai.osplugin.3.3.5-nightly3.2501-06.gbl.min.js.map +0 -1
- package/browser/es5/ai.osplugin.3.3.5-nightly3.2501-06.integrity.json +0 -66
- package/browser/es5/ai.osplugin.3.3.5-nightly3.2501-06.js.map +0 -1
- package/browser/es5/ai.osplugin.3.3.5-nightly3.2501-06.min.js.map +0 -1
package/dist-es5/DataModels.js
CHANGED
package/dist-es5/OsPlugin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - OS Plugin, 3.3.5-nightly3.2501-
|
|
2
|
+
* Application Insights JavaScript SDK - OS Plugin, 3.3.5-nightly3.2501-08
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
import { __extendsFn as __extends } from "@microsoft/applicationinsights-shims";
|
|
@@ -26,7 +26,7 @@ var OsPlugin = /** @class */ (function (_super) {
|
|
|
26
26
|
var _this = _super.call(this) || this;
|
|
27
27
|
_this.identifier = "OsPlugin";
|
|
28
28
|
_this.priority = 195;
|
|
29
|
-
_this.version = '3.3.5-nightly3.2501-
|
|
29
|
+
_this.version = '3.3.5-nightly3.2501-08';
|
|
30
30
|
var _core;
|
|
31
31
|
var _ocConfig;
|
|
32
32
|
var _getOSInProgress;
|
package/dist-es5/OsPlugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OsPlugin.js.map","sources":["OsPlugin.js"],"sourcesContent":["import { __extends } from \"tslib\";\r\n/**\r\n* OsPlugin.ts\r\n* @author Siyu Niu (siyuniu)\r\n* @copyright Microsoft 2024\r\n*/\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { Extensions, utlCanUseSessionStorage, utlGetSessionStorage, utlSetSessionStorage } from \"@microsoft/applicationinsights-common\";\r\nimport { BaseTelemetryPlugin, _throwInternal, addPageHideEventListener, addPageUnloadEventListener, arrForEach, createProcessTelemetryContext, createUniqueNamespace, getSetValue, mergeEvtNamespace, onConfigChange, removePageHideEventListener, removePageUnloadEventListener, setValue } from \"@microsoft/applicationinsights-core-js\";\r\nimport { doAwaitResponse } from \"@nevware21/ts-async\";\r\nimport { isString, objDeepFreeze, scheduleTimeout } from \"@nevware21/ts-utils\";\r\nimport { _DYN_MERGE_OS_NAME_VERSIO0, _DYN_PLATFORM, _DYN_PLATFORM_VERSION } from \"./__DynamicConstants\";\r\nvar defaultMaxTimeout = 200;\r\nvar strExt = \"ext\";\r\nvar defaultOSConfig = objDeepFreeze({\r\n maxTimeout: defaultMaxTimeout,\r\n mergeOsNameVersion: undefined\r\n});\r\nvar OsPlugin = /** @class */ (function (_super) {\r\n __extends(OsPlugin, _super);\r\n function OsPlugin() {\r\n var _this = _super.call(this) || this;\r\n _this.identifier = \"OsPlugin\";\r\n _this.priority = 195;\r\n _this.version = '3.3.5-nightly3.2501-06';\r\n var _core;\r\n var _ocConfig;\r\n var _getOSInProgress;\r\n var _getOSTimeout;\r\n var _maxTimeout;\r\n var _platformVersionResponse;\r\n var _retrieveFullVersion;\r\n var _mergeOsNameVersion;\r\n var _eventQueue;\r\n var _evtNamespace;\r\n var _excludePageUnloadEvents;\r\n var _os;\r\n var _osVer;\r\n var _firstAttempt;\r\n dynamicProto(OsPlugin, _this, function (_self, _base) {\r\n _initDefaults();\r\n _self.initialize = function (coreConfig, core, extensions) {\r\n var _self = _this;\r\n _core = core;\r\n _super.prototype.initialize.call(_this, coreConfig, core, extensions);\r\n var identifier = _self.identifier;\r\n _evtNamespace = mergeEvtNamespace(createUniqueNamespace(identifier), core.evtNamespace && core.evtNamespace());\r\n if (utlCanUseSessionStorage) {\r\n try {\r\n _platformVersionResponse = JSON.parse(utlGetSessionStorage(core.logger, \"ai_osplugin\"));\r\n }\r\n catch (error) {\r\n // do nothing\r\n }\r\n }\r\n if (_platformVersionResponse) {\r\n _retrieveFullVersion = true;\r\n _osVer = parseInt(_platformVersionResponse[_DYN_PLATFORM_VERSION /* @min:%2eplatformVersion */]);\r\n _os = _platformVersionResponse[_DYN_PLATFORM /* @min:%2eplatform */];\r\n }\r\n _self._addHook(onConfigChange(coreConfig, function (details) {\r\n var coreConfig = details.cfg;\r\n var ctx = createProcessTelemetryContext(null, coreConfig, core);\r\n _ocConfig = ctx.getExtCfg(identifier, defaultOSConfig);\r\n _maxTimeout = _ocConfig.maxTimeout;\r\n if (_ocConfig[_DYN_MERGE_OS_NAME_VERSIO0 /* @min:%2emergeOsNameVersion */] !== undefined) {\r\n _mergeOsNameVersion = _ocConfig[_DYN_MERGE_OS_NAME_VERSIO0 /* @min:%2emergeOsNameVersion */];\r\n }\r\n else if (core.getPlugin(\"Sender\").plugin) {\r\n _mergeOsNameVersion = true;\r\n }\r\n else {\r\n _mergeOsNameVersion = false;\r\n }\r\n var excludePageUnloadEvents = coreConfig.disablePageUnloadEvents || [];\r\n if (_excludePageUnloadEvents && _excludePageUnloadEvents !== excludePageUnloadEvents) {\r\n removePageUnloadEventListener(null, _evtNamespace);\r\n removePageHideEventListener(null, _evtNamespace);\r\n _excludePageUnloadEvents = null;\r\n }\r\n if (!_excludePageUnloadEvents) {\r\n // If page is closed release queue\r\n addPageUnloadEventListener(_doUnload, excludePageUnloadEvents, _evtNamespace);\r\n addPageHideEventListener(_doUnload, excludePageUnloadEvents, _evtNamespace);\r\n }\r\n _excludePageUnloadEvents = excludePageUnloadEvents;\r\n }));\r\n function _doUnload() {\r\n _releaseEventQueue();\r\n }\r\n };\r\n _self.processTelemetry = function (event, itemCtx) {\r\n itemCtx = _self._getTelCtx(itemCtx);\r\n if (!_retrieveFullVersion && !_getOSInProgress && _firstAttempt) {\r\n // Start Requesting OS version process\r\n _getOSInProgress = true;\r\n startRetrieveOsVersion();\r\n _firstAttempt = false;\r\n }\r\n if (_getOSInProgress) {\r\n _eventQueue.push({\r\n ctx: itemCtx,\r\n item: event\r\n });\r\n }\r\n else {\r\n updateTeleItemWithOs(event);\r\n _self.processNext(event, itemCtx);\r\n }\r\n };\r\n _self._doTeardown = function (unloadCtx, unloadState) {\r\n _completeOsRetrieve();\r\n removePageUnloadEventListener(null, _evtNamespace);\r\n removePageHideEventListener(null, _evtNamespace);\r\n // Just register to remove all events associated with this namespace\r\n _initDefaults();\r\n };\r\n /**\r\n * Wait for the response from the browser for the OS version and store info in the session storage\r\n */\r\n function startRetrieveOsVersion() {\r\n // Timeout request if it takes more than 5 seconds (by default)\r\n var _a;\r\n _getOSTimeout = scheduleTimeout(function () {\r\n _completeOsRetrieve();\r\n }, _maxTimeout);\r\n if (navigator.userAgent) {\r\n var getHighEntropyValues = (_a = navigator.userAgentData) === null || _a === void 0 ? void 0 : _a.getHighEntropyValues;\r\n if (getHighEntropyValues) {\r\n doAwaitResponse(navigator.userAgentData.getHighEntropyValues([\"platformVersion\"]), function (response) {\r\n if (!response.rejected) {\r\n _platformVersionResponse = response.value;\r\n _retrieveFullVersion = true;\r\n if (_platformVersionResponse[_DYN_PLATFORM_VERSION /* @min:%2eplatformVersion */] && _platformVersionResponse[_DYN_PLATFORM /* @min:%2eplatform */]) {\r\n _os = _platformVersionResponse[_DYN_PLATFORM /* @min:%2eplatform */];\r\n _osVer = parseInt(_platformVersionResponse[_DYN_PLATFORM_VERSION /* @min:%2eplatformVersion */]);\r\n if (_os === \"Windows\") {\r\n if (_osVer == 0) {\r\n _osVer = 8;\r\n }\r\n else if (_osVer < 13) {\r\n _osVer = 10;\r\n }\r\n else {\r\n _osVer = 11;\r\n }\r\n }\r\n utlSetSessionStorage(_core.logger, \"ai_osplugin\", JSON.stringify({ platform: _os, platformVersion: _osVer }));\r\n }\r\n }\r\n else {\r\n _throwInternal(_core.logger, 1 /* eLoggingSeverity.CRITICAL */, 73 /* _eInternalMessageId.PluginException */, \"Could not retrieve operating system: \" + response.reason);\r\n }\r\n _completeOsRetrieve();\r\n });\r\n }\r\n }\r\n }\r\n function updateTeleItemWithOs(event) {\r\n if (_retrieveFullVersion) {\r\n var extOS = getSetValue(getSetValue(event, strExt), Extensions.OSExt);\r\n if (_mergeOsNameVersion) {\r\n setValue(extOS, \"osVer\", _os + _osVer, isString);\r\n }\r\n else {\r\n setValue(extOS, \"osVer\", _osVer);\r\n setValue(extOS, \"os\", _os, isString);\r\n }\r\n }\r\n }\r\n /**\r\n * Complete retrieving operating system info process, cleanup and release the event queue\r\n */\r\n function _completeOsRetrieve() {\r\n if (_getOSTimeout) {\r\n _getOSTimeout.cancel();\r\n }\r\n _getOSInProgress = false;\r\n _releaseEventQueue();\r\n }\r\n /**\r\n * Release internal event queue\r\n */\r\n function _releaseEventQueue() {\r\n arrForEach(_eventQueue, function (evt) {\r\n updateTeleItemWithOs(evt.item);\r\n _self.processNext(evt.item, evt.ctx);\r\n });\r\n _eventQueue = [];\r\n }\r\n function _initDefaults() {\r\n _core = null;\r\n _ocConfig = null;\r\n _getOSInProgress = false;\r\n _getOSTimeout = null;\r\n _maxTimeout = null;\r\n _retrieveFullVersion = false;\r\n _eventQueue = [];\r\n _firstAttempt = true;\r\n }\r\n // Special internal method to allow the DebugPlugin to hook embedded objects\r\n _self[\"_getDbgPlgTargets\"] = function () {\r\n return [_platformVersionResponse, _eventQueue, _getOSInProgress];\r\n };\r\n });\r\n return _this;\r\n }\r\n OsPlugin.prototype.initialize = function (config, core, extensions) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Process the event and add it to an internal queue if handshake in process\r\n * @param event - The event to process\r\n * @param itemCtx - This is the context for the current request, ITelemetryPlugin instances\r\n * can optionally use this to access the current core instance or define / pass additional information\r\n * to later plugins (vs appending items to the telemetry item)\r\n */\r\n OsPlugin.prototype.processTelemetry = function (event, itemCtx) {\r\n // @DynamicProtoStub - DO NOT add any code as this will be removed during packaging\r\n };\r\n return OsPlugin;\r\n}(BaseTelemetryPlugin));\r\nexport { OsPlugin };\r\n//# sourceMappingURL=OsPlugin.js.map"],"names":[],"mappings":";;;;AAAA,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;wDAYM,CAAC;;;;;oBACa;AACpB;AACA;AACA"}
|
|
1
|
+
{"version":3,"file":"OsPlugin.js.map","sources":["OsPlugin.js"],"sourcesContent":["import { __extends } from \"tslib\";\r\n/**\r\n* OsPlugin.ts\r\n* @author Siyu Niu (siyuniu)\r\n* @copyright Microsoft 2024\r\n*/\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { Extensions, utlCanUseSessionStorage, utlGetSessionStorage, utlSetSessionStorage } from \"@microsoft/applicationinsights-common\";\r\nimport { BaseTelemetryPlugin, _throwInternal, addPageHideEventListener, addPageUnloadEventListener, arrForEach, createProcessTelemetryContext, createUniqueNamespace, getSetValue, mergeEvtNamespace, onConfigChange, removePageHideEventListener, removePageUnloadEventListener, setValue } from \"@microsoft/applicationinsights-core-js\";\r\nimport { doAwaitResponse } from \"@nevware21/ts-async\";\r\nimport { isString, objDeepFreeze, scheduleTimeout } from \"@nevware21/ts-utils\";\r\nimport { _DYN_MERGE_OS_NAME_VERSIO0, _DYN_PLATFORM, _DYN_PLATFORM_VERSION } from \"./__DynamicConstants\";\r\nvar defaultMaxTimeout = 200;\r\nvar strExt = \"ext\";\r\nvar defaultOSConfig = objDeepFreeze({\r\n maxTimeout: defaultMaxTimeout,\r\n mergeOsNameVersion: undefined\r\n});\r\nvar OsPlugin = /** @class */ (function (_super) {\r\n __extends(OsPlugin, _super);\r\n function OsPlugin() {\r\n var _this = _super.call(this) || this;\r\n _this.identifier = \"OsPlugin\";\r\n _this.priority = 195;\r\n _this.version = '3.3.5-nightly3.2501-08';\r\n var _core;\r\n var _ocConfig;\r\n var _getOSInProgress;\r\n var _getOSTimeout;\r\n var _maxTimeout;\r\n var _platformVersionResponse;\r\n var _retrieveFullVersion;\r\n var _mergeOsNameVersion;\r\n var _eventQueue;\r\n var _evtNamespace;\r\n var _excludePageUnloadEvents;\r\n var _os;\r\n var _osVer;\r\n var _firstAttempt;\r\n dynamicProto(OsPlugin, _this, function (_self, _base) {\r\n _initDefaults();\r\n _self.initialize = function (coreConfig, core, extensions) {\r\n var _self = _this;\r\n _core = core;\r\n _super.prototype.initialize.call(_this, coreConfig, core, extensions);\r\n var identifier = _self.identifier;\r\n _evtNamespace = mergeEvtNamespace(createUniqueNamespace(identifier), core.evtNamespace && core.evtNamespace());\r\n if (utlCanUseSessionStorage) {\r\n try {\r\n _platformVersionResponse = JSON.parse(utlGetSessionStorage(core.logger, \"ai_osplugin\"));\r\n }\r\n catch (error) {\r\n // do nothing\r\n }\r\n }\r\n if (_platformVersionResponse) {\r\n _retrieveFullVersion = true;\r\n _osVer = parseInt(_platformVersionResponse[_DYN_PLATFORM_VERSION /* @min:%2eplatformVersion */]);\r\n _os = _platformVersionResponse[_DYN_PLATFORM /* @min:%2eplatform */];\r\n }\r\n _self._addHook(onConfigChange(coreConfig, function (details) {\r\n var coreConfig = details.cfg;\r\n var ctx = createProcessTelemetryContext(null, coreConfig, core);\r\n _ocConfig = ctx.getExtCfg(identifier, defaultOSConfig);\r\n _maxTimeout = _ocConfig.maxTimeout;\r\n if (_ocConfig[_DYN_MERGE_OS_NAME_VERSIO0 /* @min:%2emergeOsNameVersion */] !== undefined) {\r\n _mergeOsNameVersion = _ocConfig[_DYN_MERGE_OS_NAME_VERSIO0 /* @min:%2emergeOsNameVersion */];\r\n }\r\n else if (core.getPlugin(\"Sender\").plugin) {\r\n _mergeOsNameVersion = true;\r\n }\r\n else {\r\n _mergeOsNameVersion = false;\r\n }\r\n var excludePageUnloadEvents = coreConfig.disablePageUnloadEvents || [];\r\n if (_excludePageUnloadEvents && _excludePageUnloadEvents !== excludePageUnloadEvents) {\r\n removePageUnloadEventListener(null, _evtNamespace);\r\n removePageHideEventListener(null, _evtNamespace);\r\n _excludePageUnloadEvents = null;\r\n }\r\n if (!_excludePageUnloadEvents) {\r\n // If page is closed release queue\r\n addPageUnloadEventListener(_doUnload, excludePageUnloadEvents, _evtNamespace);\r\n addPageHideEventListener(_doUnload, excludePageUnloadEvents, _evtNamespace);\r\n }\r\n _excludePageUnloadEvents = excludePageUnloadEvents;\r\n }));\r\n function _doUnload() {\r\n _releaseEventQueue();\r\n }\r\n };\r\n _self.processTelemetry = function (event, itemCtx) {\r\n itemCtx = _self._getTelCtx(itemCtx);\r\n if (!_retrieveFullVersion && !_getOSInProgress && _firstAttempt) {\r\n // Start Requesting OS version process\r\n _getOSInProgress = true;\r\n startRetrieveOsVersion();\r\n _firstAttempt = false;\r\n }\r\n if (_getOSInProgress) {\r\n _eventQueue.push({\r\n ctx: itemCtx,\r\n item: event\r\n });\r\n }\r\n else {\r\n updateTeleItemWithOs(event);\r\n _self.processNext(event, itemCtx);\r\n }\r\n };\r\n _self._doTeardown = function (unloadCtx, unloadState) {\r\n _completeOsRetrieve();\r\n removePageUnloadEventListener(null, _evtNamespace);\r\n removePageHideEventListener(null, _evtNamespace);\r\n // Just register to remove all events associated with this namespace\r\n _initDefaults();\r\n };\r\n /**\r\n * Wait for the response from the browser for the OS version and store info in the session storage\r\n */\r\n function startRetrieveOsVersion() {\r\n // Timeout request if it takes more than 5 seconds (by default)\r\n var _a;\r\n _getOSTimeout = scheduleTimeout(function () {\r\n _completeOsRetrieve();\r\n }, _maxTimeout);\r\n if (navigator.userAgent) {\r\n var getHighEntropyValues = (_a = navigator.userAgentData) === null || _a === void 0 ? void 0 : _a.getHighEntropyValues;\r\n if (getHighEntropyValues) {\r\n doAwaitResponse(navigator.userAgentData.getHighEntropyValues([\"platformVersion\"]), function (response) {\r\n if (!response.rejected) {\r\n _platformVersionResponse = response.value;\r\n _retrieveFullVersion = true;\r\n if (_platformVersionResponse[_DYN_PLATFORM_VERSION /* @min:%2eplatformVersion */] && _platformVersionResponse[_DYN_PLATFORM /* @min:%2eplatform */]) {\r\n _os = _platformVersionResponse[_DYN_PLATFORM /* @min:%2eplatform */];\r\n _osVer = parseInt(_platformVersionResponse[_DYN_PLATFORM_VERSION /* @min:%2eplatformVersion */]);\r\n if (_os === \"Windows\") {\r\n if (_osVer == 0) {\r\n _osVer = 8;\r\n }\r\n else if (_osVer < 13) {\r\n _osVer = 10;\r\n }\r\n else {\r\n _osVer = 11;\r\n }\r\n }\r\n utlSetSessionStorage(_core.logger, \"ai_osplugin\", JSON.stringify({ platform: _os, platformVersion: _osVer }));\r\n }\r\n }\r\n else {\r\n _throwInternal(_core.logger, 1 /* eLoggingSeverity.CRITICAL */, 73 /* _eInternalMessageId.PluginException */, \"Could not retrieve operating system: \" + response.reason);\r\n }\r\n _completeOsRetrieve();\r\n });\r\n }\r\n }\r\n }\r\n function updateTeleItemWithOs(event) {\r\n if (_retrieveFullVersion) {\r\n var extOS = getSetValue(getSetValue(event, strExt), Extensions.OSExt);\r\n if (_mergeOsNameVersion) {\r\n setValue(extOS, \"osVer\", _os + _osVer, isString);\r\n }\r\n else {\r\n setValue(extOS, \"osVer\", _osVer);\r\n setValue(extOS, \"os\", _os, isString);\r\n }\r\n }\r\n }\r\n /**\r\n * Complete retrieving operating system info process, cleanup and release the event queue\r\n */\r\n function _completeOsRetrieve() {\r\n if (_getOSTimeout) {\r\n _getOSTimeout.cancel();\r\n }\r\n _getOSInProgress = false;\r\n _releaseEventQueue();\r\n }\r\n /**\r\n * Release internal event queue\r\n */\r\n function _releaseEventQueue() {\r\n arrForEach(_eventQueue, function (evt) {\r\n updateTeleItemWithOs(evt.item);\r\n _self.processNext(evt.item, evt.ctx);\r\n });\r\n _eventQueue = [];\r\n }\r\n function _initDefaults() {\r\n _core = null;\r\n _ocConfig = null;\r\n _getOSInProgress = false;\r\n _getOSTimeout = null;\r\n _maxTimeout = null;\r\n _retrieveFullVersion = false;\r\n _eventQueue = [];\r\n _firstAttempt = true;\r\n }\r\n // Special internal method to allow the DebugPlugin to hook embedded objects\r\n _self[\"_getDbgPlgTargets\"] = function () {\r\n return [_platformVersionResponse, _eventQueue, _getOSInProgress];\r\n };\r\n });\r\n return _this;\r\n }\r\n OsPlugin.prototype.initialize = function (config, core, extensions) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Process the event and add it to an internal queue if handshake in process\r\n * @param event - The event to process\r\n * @param itemCtx - This is the context for the current request, ITelemetryPlugin instances\r\n * can optionally use this to access the current core instance or define / pass additional information\r\n * to later plugins (vs appending items to the telemetry item)\r\n */\r\n OsPlugin.prototype.processTelemetry = function (event, itemCtx) {\r\n // @DynamicProtoStub - DO NOT add any code as this will be removed during packaging\r\n };\r\n return OsPlugin;\r\n}(BaseTelemetryPlugin));\r\nexport { OsPlugin };\r\n//# sourceMappingURL=OsPlugin.js.map"],"names":[],"mappings":";;;;AAAA,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;wDAYM,CAAC;;;;;oBACa;AACpB;AACA;AACA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/applicationinsights-osplugin-js",
|
|
3
|
-
"version": "3.3.5-nightly3.2501-
|
|
3
|
+
"version": "3.3.5-nightly3.2501-08",
|
|
4
4
|
"description": "Microsoft Application Insights OS Plugin",
|
|
5
5
|
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
|
6
6
|
"author": "Microsoft Application Insights Team",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@microsoft/applicationinsights-shims": "3.0.1",
|
|
33
|
-
"@microsoft/applicationinsights-common": "3.3.5-nightly3.2501-
|
|
33
|
+
"@microsoft/applicationinsights-common": "3.3.5-nightly3.2501-08",
|
|
34
34
|
"@microsoft/dynamicproto-js": "^2.0.3",
|
|
35
|
-
"@microsoft/applicationinsights-core-js": "3.3.5-nightly3.2501-
|
|
36
|
-
"@nevware21/ts-utils": ">= 0.11.
|
|
37
|
-
"@nevware21/ts-async": ">= 0.5.
|
|
35
|
+
"@microsoft/applicationinsights-core-js": "3.3.5-nightly3.2501-08",
|
|
36
|
+
"@nevware21/ts-utils": ">= 0.11.6 < 2.x",
|
|
37
|
+
"@nevware21/ts-async": ">= 0.5.4 < 2.x"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@microsoft/ai-test-framework": "0.0.1",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights osplugin plugin, 3.3.5-nightly3.2501-
|
|
2
|
+
* Microsoft Application Insights osplugin plugin, 3.3.5-nightly3.2501-08
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -28,8 +28,8 @@ import { ITelemetryItem } from '@microsoft/applicationinsights-core-js';
|
|
|
28
28
|
*/
|
|
29
29
|
/**
|
|
30
30
|
* Interface for OS Plugin SDK config
|
|
31
|
-
*
|
|
32
|
-
*
|
|
31
|
+
* \@maxTimeout: Maximum time to wait for the OS plugin to return the OS information
|
|
32
|
+
* \@mergeOsNameVersion: Whether to merge the OS name and version into one field
|
|
33
33
|
*/
|
|
34
34
|
export declare interface IOSPluginConfiguration {
|
|
35
35
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights osplugin plugin, 3.3.5-nightly3.2501-
|
|
2
|
+
* Microsoft Application Insights osplugin plugin, 3.3.5-nightly3.2501-08
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -1034,8 +1034,8 @@ declare namespace ApplicationInsights {
|
|
|
1034
1034
|
*/
|
|
1035
1035
|
enablePerfMgr?: boolean;
|
|
1036
1036
|
/**
|
|
1037
|
-
* [Optional] Callback function that will be called to create a the IPerfManager instance when required and
|
|
1038
|
-
* is enabled, this enables you to override the default creation of a PerfManager() without needing to
|
|
1037
|
+
* [Optional] Callback function that will be called to create a the IPerfManager instance when required and `enablePerfMgr`
|
|
1038
|
+
* is enabled, this enables you to override the default creation of a PerfManager() without needing to `setPerfMgr()`
|
|
1039
1039
|
* after initialization.
|
|
1040
1040
|
*/
|
|
1041
1041
|
createPerfMgr?: (core: IAppInsightsCore, notificationManager: INotificationManager) => IPerfManager;
|
|
@@ -1255,7 +1255,7 @@ declare namespace ApplicationInsights {
|
|
|
1255
1255
|
throwInternal(severity: LoggingSeverity, msgId: _InternalMessageId, msg: string, properties?: Object, isUserAct?: boolean): void;
|
|
1256
1256
|
/**
|
|
1257
1257
|
* This will write a debug message to the console if possible
|
|
1258
|
-
* @param message -
|
|
1258
|
+
* @param message - The debug message
|
|
1259
1259
|
*/
|
|
1260
1260
|
debugToConsole?(message: string): void;
|
|
1261
1261
|
/**
|
|
@@ -1403,7 +1403,7 @@ declare namespace ApplicationInsights {
|
|
|
1403
1403
|
/**
|
|
1404
1404
|
* Identifies configuration override values when given feature is enabled
|
|
1405
1405
|
* NOTE: should use flat string for fields, for example, if you want to set value for extensionConfig.Ananlytics.disableAjaxTrackig in configurations,
|
|
1406
|
-
* you should use "extensionConfig.Ananlytics.disableAjaxTrackig" as field name: {["extensionConfig.Analytics.disableAjaxTrackig"]:1}
|
|
1406
|
+
* you should use "extensionConfig.Ananlytics.disableAjaxTrackig" as field name: \{["extensionConfig.Analytics.disableAjaxTrackig"]:1\}
|
|
1407
1407
|
* Default: undefined
|
|
1408
1408
|
*/
|
|
1409
1409
|
onCfg?: {
|
|
@@ -1412,7 +1412,7 @@ declare namespace ApplicationInsights {
|
|
|
1412
1412
|
/**
|
|
1413
1413
|
* Identifies configuration override values when given feature is disabled
|
|
1414
1414
|
* NOTE: should use flat string for fields, for example, if you want to set value for extensionConfig.Ananlytics.disableAjaxTrackig in configurations,
|
|
1415
|
-
* you should use "extensionConfig.Ananlytics.disableAjaxTrackig" as field name: {["extensionConfig.Analytics.disableAjaxTrackig"]:1}
|
|
1415
|
+
* you should use "extensionConfig.Ananlytics.disableAjaxTrackig" as field name: \{["extensionConfig.Analytics.disableAjaxTrackig"]:1\}
|
|
1416
1416
|
* Default: undefined
|
|
1417
1417
|
*/
|
|
1418
1418
|
offCfg?: {
|
|
@@ -1639,8 +1639,8 @@ declare namespace ApplicationInsights {
|
|
|
1639
1639
|
*/
|
|
1640
1640
|
/**
|
|
1641
1641
|
* Interface for OS Plugin SDK config
|
|
1642
|
-
*
|
|
1643
|
-
*
|
|
1642
|
+
* \@maxTimeout: Maximum time to wait for the OS plugin to return the OS information
|
|
1643
|
+
* \@mergeOsNameVersion: Whether to merge the OS name and version into one field
|
|
1644
1644
|
*/
|
|
1645
1645
|
interface IOSPluginConfiguration {
|
|
1646
1646
|
/**
|