@microsoft/applicationinsights-properties-js 3.0.3-nightly3.2306-01 → 3.0.3-nightly3.2307-24

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 (58) hide show
  1. package/browser/es5/{ai.props.3.0.3-nightly3.2306-01.gbl.js → ai.props.3.0.3-nightly3.2307-24.cjs.js} +162 -123
  2. package/browser/es5/ai.props.3.0.3-nightly3.2307-24.cjs.js.map +1 -0
  3. package/browser/es5/ai.props.3.0.3-nightly3.2307-24.cjs.min.js +6 -0
  4. package/browser/es5/ai.props.3.0.3-nightly3.2307-24.cjs.min.js.map +1 -0
  5. package/browser/es5/{ai.props.3.0.3-nightly3.2306-01.cjs.js → ai.props.3.0.3-nightly3.2307-24.gbl.js} +185 -100
  6. package/browser/es5/ai.props.3.0.3-nightly3.2307-24.gbl.js.map +1 -0
  7. package/browser/es5/ai.props.3.0.3-nightly3.2307-24.gbl.min.js +6 -0
  8. package/browser/es5/ai.props.3.0.3-nightly3.2307-24.gbl.min.js.map +1 -0
  9. package/browser/es5/ai.props.3.0.3-nightly3.2307-24.integrity.json +66 -0
  10. package/browser/es5/{ai.props.3.0.3-nightly3.2306-01.js → ai.props.3.0.3-nightly3.2307-24.js} +164 -102
  11. package/browser/es5/ai.props.3.0.3-nightly3.2307-24.js.map +1 -0
  12. package/browser/es5/ai.props.3.0.3-nightly3.2307-24.min.js +6 -0
  13. package/browser/es5/ai.props.3.0.3-nightly3.2307-24.min.js.map +1 -0
  14. package/browser/es5/ai.props.3.cjs.js +161 -99
  15. package/browser/es5/ai.props.3.cjs.js.map +1 -1
  16. package/browser/es5/ai.props.3.cjs.min.js +2 -2
  17. package/browser/es5/ai.props.3.cjs.min.js.map +1 -1
  18. package/browser/es5/ai.props.3.gbl.js +163 -101
  19. package/browser/es5/ai.props.3.gbl.js.map +1 -1
  20. package/browser/es5/ai.props.3.gbl.min.js +2 -2
  21. package/browser/es5/ai.props.3.gbl.min.js.map +1 -1
  22. package/browser/es5/ai.props.3.integrity.json +66 -0
  23. package/browser/es5/ai.props.3.js +163 -101
  24. package/browser/es5/ai.props.3.js.map +1 -1
  25. package/browser/es5/ai.props.3.min.js +2 -2
  26. package/browser/es5/ai.props.3.min.js.map +1 -1
  27. package/dist/es5/applicationinsights-properties-js.js +161 -99
  28. package/dist/es5/applicationinsights-properties-js.js.map +1 -1
  29. package/dist/es5/applicationinsights-properties-js.min.js +2 -2
  30. package/dist/es5/applicationinsights-properties-js.min.js.map +1 -1
  31. package/dist-es5/Context/Application.js +1 -1
  32. package/dist-es5/Context/Device.js +1 -1
  33. package/dist-es5/Context/Internal.js +2 -2
  34. package/dist-es5/Context/Internal.js.map +1 -1
  35. package/dist-es5/Context/Location.js +1 -1
  36. package/dist-es5/Context/Session.js +1 -1
  37. package/dist-es5/Context/TelemetryTrace.js +1 -1
  38. package/dist-es5/Context/User.js +1 -1
  39. package/dist-es5/Interfaces/IPropTelemetryContext.js +1 -1
  40. package/dist-es5/Interfaces/IPropertiesConfig.js +1 -1
  41. package/dist-es5/PropertiesPlugin.js +5 -2
  42. package/dist-es5/PropertiesPlugin.js.map +1 -1
  43. package/dist-es5/TelemetryContext.js +1 -1
  44. package/dist-es5/__DynamicConstants.js +1 -1
  45. package/dist-es5/applicationinsights-properties-js.js +1 -1
  46. package/package.json +6 -5
  47. package/types/applicationinsights-properties-js.d.ts +5 -4
  48. package/types/applicationinsights-properties-js.namespaced.d.ts +5 -4
  49. package/browser/es5/ai.props.3.0.3-nightly3.2306-01.cjs.js.map +0 -1
  50. package/browser/es5/ai.props.3.0.3-nightly3.2306-01.cjs.min.js +0 -6
  51. package/browser/es5/ai.props.3.0.3-nightly3.2306-01.cjs.min.js.map +0 -1
  52. package/browser/es5/ai.props.3.0.3-nightly3.2306-01.gbl.js.map +0 -1
  53. package/browser/es5/ai.props.3.0.3-nightly3.2306-01.gbl.min.js +0 -6
  54. package/browser/es5/ai.props.3.0.3-nightly3.2306-01.gbl.min.js.map +0 -1
  55. package/browser/es5/ai.props.3.0.3-nightly3.2306-01.integrity.json +0 -66
  56. package/browser/es5/ai.props.3.0.3-nightly3.2306-01.js.map +0 -1
  57. package/browser/es5/ai.props.3.0.3-nightly3.2306-01.min.js +0 -6
  58. package/browser/es5/ai.props.3.0.3-nightly3.2306-01.min.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Properties Plugin, 3.0.3-nightly3.2306-01
2
+ * Application Insights JavaScript SDK - Properties Plugin, 3.0.3-nightly3.2307-24
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 - Properties Plugin, 3.0.3-nightly3.2306-01
2
+ * Application Insights JavaScript SDK - Properties Plugin, 3.0.3-nightly3.2307-24
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,11 +1,11 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Properties Plugin, 3.0.3-nightly3.2306-01
2
+ * Application Insights JavaScript SDK - Properties Plugin, 3.0.3-nightly3.2307-24
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
6
6
 
7
7
  import { onConfigChange } from "@microsoft/applicationinsights-core-js";
8
- var Version = "3.0.3-nightly3.2306-01";
8
+ var Version = '3.0.3-nightly3.2307-24';
9
9
  var Internal = /** @class */ (function () {
10
10
  /**
11
11
  * Constructs a new instance of the internal telemetry data class.
@@ -1 +1 @@
1
- {"version":3,"file":"Internal.js.map","sources":["Internal.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { onConfigChange } from \"@microsoft/applicationinsights-core-js\";\r\nvar Version = \"3.0.3-nightly3.2306-01\";\r\nvar Internal = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of the internal telemetry data class.\r\n */\r\n function Internal(config, unloadHookContainer) {\r\n var _this = this;\r\n var unloadHook = onConfigChange((config), function () {\r\n var prefix = config.sdkExtension;\r\n _this.sdkVersion = (prefix ? prefix + \"_\" : \"\") + \"javascript:\" + Version;\r\n });\r\n unloadHookContainer && unloadHookContainer.add(unloadHook);\r\n }\r\n return Internal;\r\n}());\r\nexport { Internal };\r\n//# sourceMappingURL=Internal.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
1
+ {"version":3,"file":"Internal.js.map","sources":["Internal.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { onConfigChange } from \"@microsoft/applicationinsights-core-js\";\r\nvar Version = '3.0.3-nightly3.2307-24';\r\nvar Internal = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of the internal telemetry data class.\r\n */\r\n function Internal(config, unloadHookContainer) {\r\n var _this = this;\r\n var unloadHook = onConfigChange((config), function () {\r\n var prefix = config.sdkExtension;\r\n _this.sdkVersion = (prefix ? prefix + \"_\" : \"\") + \"javascript:\" + Version;\r\n });\r\n unloadHookContainer && unloadHookContainer.add(unloadHook);\r\n }\r\n return Internal;\r\n}());\r\nexport { Internal };\r\n//# sourceMappingURL=Internal.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Properties Plugin, 3.0.3-nightly3.2306-01
2
+ * Application Insights JavaScript SDK - Properties Plugin, 3.0.3-nightly3.2307-24
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 - Properties Plugin, 3.0.3-nightly3.2306-01
2
+ * Application Insights JavaScript SDK - Properties Plugin, 3.0.3-nightly3.2307-24
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 - Properties Plugin, 3.0.3-nightly3.2306-01
2
+ * Application Insights JavaScript SDK - Properties Plugin, 3.0.3-nightly3.2307-24
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 - Properties Plugin, 3.0.3-nightly3.2306-01
2
+ * Application Insights JavaScript SDK - Properties Plugin, 3.0.3-nightly3.2307-24
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 - Properties Plugin, 3.0.3-nightly3.2306-01
2
+ * Application Insights JavaScript SDK - Properties Plugin, 3.0.3-nightly3.2307-24
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 - Properties Plugin, 3.0.3-nightly3.2306-01
2
+ * Application Insights JavaScript SDK - Properties Plugin, 3.0.3-nightly3.2307-24
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 - Properties Plugin, 3.0.3-nightly3.2306-01
2
+ * Application Insights JavaScript SDK - Properties Plugin, 3.0.3-nightly3.2307-24
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  /**
@@ -9,7 +9,7 @@
9
9
  var _a;
10
10
  import { __extendsFn as __extends } from "@microsoft/applicationinsights-shims";
11
11
  import dynamicProto from "@microsoft/dynamicproto-js";
12
- import { BreezeChannelIdentifier, PageView, PropertiesPluginIdentifier, createDistributedTraceContextFromTrace } from "@microsoft/applicationinsights-common";
12
+ import { BreezeChannelIdentifier, PageView, PropertiesPluginIdentifier, createDistributedTraceContextFromTrace, utlSetStoragePrefix } from "@microsoft/applicationinsights-common";
13
13
  import { BaseTelemetryPlugin, _InternalLogMessage, _logInternalMessage, createProcessTelemetryContext, getNavigator, getSetValue, isNullOrUndefined, onConfigChange } from "@microsoft/applicationinsights-core-js";
14
14
  import { objDeepFreeze, objDefine } from "@nevware21/ts-utils";
15
15
  import { TelemetryContext } from "./TelemetryContext";
@@ -106,6 +106,9 @@ var PropertiesPlugin = /** @class */ (function (_super) {
106
106
  // This function will be re-called whenever any referenced configuration is changed
107
107
  _self._addHook(onConfigChange(config, function () {
108
108
  var ctx = createProcessTelemetryContext(null, config, core);
109
+ if (config.storagePrefix) {
110
+ utlSetStoragePrefix(config.storagePrefix);
111
+ }
109
112
  _extensionConfig = ctx.getExtCfg(identifier, _defaultConfig);
110
113
  // Test hook to allow accessing the internal values -- explicitly not defined as an available property on the class
111
114
  _self["_extConfig"] = _extensionConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"PropertiesPlugin.js.map","sources":["PropertiesPlugin.js"],"sourcesContent":["/**\r\n* PropertiesPlugin.ts\r\n* @copyright Microsoft 2018\r\n*/\r\nvar _a;\r\nimport { __extends } from \"tslib\";\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { BreezeChannelIdentifier, PageView, PropertiesPluginIdentifier, createDistributedTraceContextFromTrace } from \"@microsoft/applicationinsights-common\";\r\nimport { BaseTelemetryPlugin, _InternalLogMessage, _logInternalMessage, createProcessTelemetryContext, getNavigator, getSetValue, isNullOrUndefined, onConfigChange } from \"@microsoft/applicationinsights-core-js\";\r\nimport { objDeepFreeze, objDefine } from \"@nevware21/ts-utils\";\r\nimport { TelemetryContext } from \"./TelemetryContext\";\r\nimport { _DYN_ACCOUNT_ID, _DYN_APPLY_APPLICATION_CO1, _DYN_APPLY_DEVICE_CONTEXT, _DYN_APPLY_INTERNAL_CONTE5, _DYN_APPLY_LOCATION_CONTE4, _DYN_APPLY_OPERATING_SYST3, _DYN_APPLY_OPERATION_CONT2, _DYN_APPLY_SESSION_CONTEX0, _DYN_APPLY_USER_CONTEXT, _DYN_GET_NEW_ID, _DYN_GET_SESSION_ID, _DYN_GET_TRACE_CTX, _DYN_ID_LENGTH, _DYN_IS_NEW_USER, _DYN_IS_USER_COOKIE_SET, _DYN_NAME_PREFIX, _DYN_SESSION_COOKIE_POSTF6, _DYN_SESSION_MANAGER, _DYN_TELEMETRY_TRACE, _DYN_UPDATE, _DYN_USER_COOKIE_POSTFIX } from \"./__DynamicConstants\";\r\nvar undefString;\r\nvar nullValue = null;\r\nvar _defaultConfig = objDeepFreeze((_a = {},\r\n _a[_DYN_ACCOUNT_ID /* @min:accountId */] = nullValue,\r\n _a.sessionRenewalMs = 30 * 60 * 1000,\r\n _a.samplingPercentage = 100,\r\n _a.sessionExpirationMs = 24 * 60 * 60 * 1000,\r\n _a.cookieDomain = nullValue,\r\n _a.sdkExtension = nullValue,\r\n _a.isBrowserLinkTrackingEnabled = false,\r\n _a.appId = nullValue,\r\n _a[_DYN_GET_SESSION_ID /* @min:getSessionId */] = nullValue,\r\n _a[_DYN_NAME_PREFIX /* @min:namePrefix */] = undefString,\r\n _a[_DYN_SESSION_COOKIE_POSTF6 /* @min:sessionCookiePostfix */] = undefString,\r\n _a[_DYN_USER_COOKIE_POSTFIX /* @min:userCookiePostfix */] = undefString,\r\n _a[_DYN_ID_LENGTH /* @min:idLength */] = 22,\r\n _a[_DYN_GET_NEW_ID /* @min:getNewId */] = nullValue,\r\n _a));\r\nvar PropertiesPlugin = /** @class */ (function (_super) {\r\n __extends(PropertiesPlugin, _super);\r\n function PropertiesPlugin() {\r\n var _this = _super.call(this) || this;\r\n _this.priority = 110;\r\n _this.identifier = PropertiesPluginIdentifier;\r\n var _extensionConfig;\r\n var _distributedTraceCtx;\r\n var _previousTraceCtx;\r\n var _context;\r\n dynamicProto(PropertiesPlugin, _this, function (_self, _base) {\r\n _initDefaults();\r\n objDefine(_self, \"context\", {\r\n g: function () {\r\n return _context;\r\n }\r\n });\r\n _self.initialize = function (config, core, extensions, pluginChain) {\r\n _base.initialize(config, core, extensions, pluginChain);\r\n _populateDefaults(config);\r\n };\r\n /**\r\n * Add Part A fields to the event\r\n * @param event - The event that needs to be processed\r\n */\r\n _self.processTelemetry = function (event, itemCtx) {\r\n if (!isNullOrUndefined(event)) {\r\n itemCtx = _self._getTelCtx(itemCtx);\r\n // If the envelope is PageView, reset the internal message count so that we can send internal telemetry for the new page.\r\n if (event.name === PageView.envelopeType) {\r\n itemCtx.diagLog().resetInternalMessageCount();\r\n }\r\n var theContext = (_context || {});\r\n if (theContext.session) {\r\n // If customer did not provide custom session id update the session manager\r\n if (typeof _context.session.id !== \"string\" && theContext[_DYN_SESSION_MANAGER /* @min:%2esessionManager */]) {\r\n theContext[_DYN_SESSION_MANAGER /* @min:%2esessionManager */][_DYN_UPDATE /* @min:%2eupdate */]();\r\n }\r\n }\r\n var userCtx = theContext.user;\r\n if (userCtx && !userCtx[_DYN_IS_USER_COOKIE_SET /* @min:%2eisUserCookieSet */]) {\r\n userCtx[_DYN_UPDATE /* @min:%2eupdate */](theContext.user.id);\r\n }\r\n _processTelemetryInternal(event, itemCtx);\r\n if (userCtx && userCtx[_DYN_IS_NEW_USER /* @min:%2eisNewUser */]) {\r\n userCtx[_DYN_IS_NEW_USER /* @min:%2eisNewUser */] = false;\r\n var message = new _InternalLogMessage(72 /* _eInternalMessageId.SendBrowserInfoOnUserInit */, ((getNavigator() || {}).userAgent || \"\"));\r\n _logInternalMessage(itemCtx.diagLog(), 1 /* eLoggingSeverity.CRITICAL */, message);\r\n }\r\n _self.processNext(event, itemCtx);\r\n }\r\n };\r\n _self._doTeardown = function (unloadCtx, unloadState) {\r\n var core = (unloadCtx || {}).core();\r\n if (core && core[_DYN_GET_TRACE_CTX /* @min:%2egetTraceCtx */]) {\r\n var traceCtx = core[_DYN_GET_TRACE_CTX /* @min:%2egetTraceCtx */](false);\r\n if (traceCtx === _distributedTraceCtx) {\r\n core.setTraceCtx(_previousTraceCtx);\r\n }\r\n }\r\n _initDefaults();\r\n };\r\n function _initDefaults() {\r\n _extensionConfig = null;\r\n _distributedTraceCtx = null;\r\n _previousTraceCtx = null;\r\n _context = null;\r\n }\r\n function _populateDefaults(config) {\r\n var identifier = _self.identifier;\r\n var core = _self.core;\r\n // This function will be re-called whenever any referenced configuration is changed\r\n _self._addHook(onConfigChange(config, function () {\r\n var ctx = createProcessTelemetryContext(null, config, core);\r\n _extensionConfig = ctx.getExtCfg(identifier, _defaultConfig);\r\n // Test hook to allow accessing the internal values -- explicitly not defined as an available property on the class\r\n _self[\"_extConfig\"] = _extensionConfig;\r\n }));\r\n // This is outside of the onConfigChange as we don't want to update (replace) these values whenever a referenced config item changes\r\n _previousTraceCtx = core[_DYN_GET_TRACE_CTX /* @min:%2egetTraceCtx */](false);\r\n _context = new TelemetryContext(core, _extensionConfig, _previousTraceCtx, _self._unloadHooks);\r\n _distributedTraceCtx = createDistributedTraceContextFromTrace(_self.context[_DYN_TELEMETRY_TRACE /* @min:%2etelemetryTrace */], _previousTraceCtx);\r\n core.setTraceCtx(_distributedTraceCtx);\r\n _self.context.appId = function () {\r\n var breezeChannel = core.getPlugin(BreezeChannelIdentifier);\r\n return breezeChannel ? breezeChannel.plugin[\"_appId\"] : null;\r\n };\r\n }\r\n function _processTelemetryInternal(evt, itemCtx) {\r\n // Set Part A fields\r\n getSetValue(evt, \"tags\", []);\r\n getSetValue(evt, \"ext\", {});\r\n var ctx = _self.context;\r\n ctx[_DYN_APPLY_SESSION_CONTEX0 /* @min:%2eapplySessionContext */](evt, itemCtx);\r\n ctx[_DYN_APPLY_APPLICATION_CO1 /* @min:%2eapplyApplicationContext */](evt, itemCtx);\r\n ctx[_DYN_APPLY_DEVICE_CONTEXT /* @min:%2eapplyDeviceContext */](evt, itemCtx);\r\n ctx[_DYN_APPLY_OPERATION_CONT2 /* @min:%2eapplyOperationContext */](evt, itemCtx);\r\n ctx[_DYN_APPLY_USER_CONTEXT /* @min:%2eapplyUserContext */](evt, itemCtx);\r\n ctx[_DYN_APPLY_OPERATING_SYST3 /* @min:%2eapplyOperatingSystemContxt */](evt, itemCtx);\r\n ctx.applyWebContext(evt, itemCtx);\r\n ctx[_DYN_APPLY_LOCATION_CONTE4 /* @min:%2eapplyLocationContext */](evt, itemCtx); // legacy tags\r\n ctx[_DYN_APPLY_INTERNAL_CONTE5 /* @min:%2eapplyInternalContext */](evt, itemCtx); // legacy tags\r\n ctx.cleanUp(evt, itemCtx);\r\n }\r\n });\r\n return _this;\r\n }\r\n PropertiesPlugin.prototype.initialize = function (config, core, extensions, pluginChain) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Add Part A fields to the event\r\n * @param event - The event that needs to be processed\r\n */\r\n PropertiesPlugin.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 PropertiesPlugin;\r\n}(BaseTelemetryPlugin));\r\nexport default PropertiesPlugin;\r\n//# sourceMappingURL=PropertiesPlugin.js.map"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA,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;gEASM,CAAC;;;;;4BACqB;AAC5B;AACA;AACA"}
1
+ {"version":3,"file":"PropertiesPlugin.js.map","sources":["PropertiesPlugin.js"],"sourcesContent":["/**\r\n* PropertiesPlugin.ts\r\n* @copyright Microsoft 2018\r\n*/\r\nvar _a;\r\nimport { __extends } from \"tslib\";\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { BreezeChannelIdentifier, PageView, PropertiesPluginIdentifier, createDistributedTraceContextFromTrace, utlSetStoragePrefix } from \"@microsoft/applicationinsights-common\";\r\nimport { BaseTelemetryPlugin, _InternalLogMessage, _logInternalMessage, createProcessTelemetryContext, getNavigator, getSetValue, isNullOrUndefined, onConfigChange } from \"@microsoft/applicationinsights-core-js\";\r\nimport { objDeepFreeze, objDefine } from \"@nevware21/ts-utils\";\r\nimport { TelemetryContext } from \"./TelemetryContext\";\r\nimport { _DYN_ACCOUNT_ID, _DYN_APPLY_APPLICATION_CO1, _DYN_APPLY_DEVICE_CONTEXT, _DYN_APPLY_INTERNAL_CONTE5, _DYN_APPLY_LOCATION_CONTE4, _DYN_APPLY_OPERATING_SYST3, _DYN_APPLY_OPERATION_CONT2, _DYN_APPLY_SESSION_CONTEX0, _DYN_APPLY_USER_CONTEXT, _DYN_GET_NEW_ID, _DYN_GET_SESSION_ID, _DYN_GET_TRACE_CTX, _DYN_ID_LENGTH, _DYN_IS_NEW_USER, _DYN_IS_USER_COOKIE_SET, _DYN_NAME_PREFIX, _DYN_SESSION_COOKIE_POSTF6, _DYN_SESSION_MANAGER, _DYN_TELEMETRY_TRACE, _DYN_UPDATE, _DYN_USER_COOKIE_POSTFIX } from \"./__DynamicConstants\";\r\nvar undefString;\r\nvar nullValue = null;\r\nvar _defaultConfig = objDeepFreeze((_a = {},\r\n _a[_DYN_ACCOUNT_ID /* @min:accountId */] = nullValue,\r\n _a.sessionRenewalMs = 30 * 60 * 1000,\r\n _a.samplingPercentage = 100,\r\n _a.sessionExpirationMs = 24 * 60 * 60 * 1000,\r\n _a.cookieDomain = nullValue,\r\n _a.sdkExtension = nullValue,\r\n _a.isBrowserLinkTrackingEnabled = false,\r\n _a.appId = nullValue,\r\n _a[_DYN_GET_SESSION_ID /* @min:getSessionId */] = nullValue,\r\n _a[_DYN_NAME_PREFIX /* @min:namePrefix */] = undefString,\r\n _a[_DYN_SESSION_COOKIE_POSTF6 /* @min:sessionCookiePostfix */] = undefString,\r\n _a[_DYN_USER_COOKIE_POSTFIX /* @min:userCookiePostfix */] = undefString,\r\n _a[_DYN_ID_LENGTH /* @min:idLength */] = 22,\r\n _a[_DYN_GET_NEW_ID /* @min:getNewId */] = nullValue,\r\n _a));\r\nvar PropertiesPlugin = /** @class */ (function (_super) {\r\n __extends(PropertiesPlugin, _super);\r\n function PropertiesPlugin() {\r\n var _this = _super.call(this) || this;\r\n _this.priority = 110;\r\n _this.identifier = PropertiesPluginIdentifier;\r\n var _extensionConfig;\r\n var _distributedTraceCtx;\r\n var _previousTraceCtx;\r\n var _context;\r\n dynamicProto(PropertiesPlugin, _this, function (_self, _base) {\r\n _initDefaults();\r\n objDefine(_self, \"context\", {\r\n g: function () {\r\n return _context;\r\n }\r\n });\r\n _self.initialize = function (config, core, extensions, pluginChain) {\r\n _base.initialize(config, core, extensions, pluginChain);\r\n _populateDefaults(config);\r\n };\r\n /**\r\n * Add Part A fields to the event\r\n * @param event - The event that needs to be processed\r\n */\r\n _self.processTelemetry = function (event, itemCtx) {\r\n if (!isNullOrUndefined(event)) {\r\n itemCtx = _self._getTelCtx(itemCtx);\r\n // If the envelope is PageView, reset the internal message count so that we can send internal telemetry for the new page.\r\n if (event.name === PageView.envelopeType) {\r\n itemCtx.diagLog().resetInternalMessageCount();\r\n }\r\n var theContext = (_context || {});\r\n if (theContext.session) {\r\n // If customer did not provide custom session id update the session manager\r\n if (typeof _context.session.id !== \"string\" && theContext[_DYN_SESSION_MANAGER /* @min:%2esessionManager */]) {\r\n theContext[_DYN_SESSION_MANAGER /* @min:%2esessionManager */][_DYN_UPDATE /* @min:%2eupdate */]();\r\n }\r\n }\r\n var userCtx = theContext.user;\r\n if (userCtx && !userCtx[_DYN_IS_USER_COOKIE_SET /* @min:%2eisUserCookieSet */]) {\r\n userCtx[_DYN_UPDATE /* @min:%2eupdate */](theContext.user.id);\r\n }\r\n _processTelemetryInternal(event, itemCtx);\r\n if (userCtx && userCtx[_DYN_IS_NEW_USER /* @min:%2eisNewUser */]) {\r\n userCtx[_DYN_IS_NEW_USER /* @min:%2eisNewUser */] = false;\r\n var message = new _InternalLogMessage(72 /* _eInternalMessageId.SendBrowserInfoOnUserInit */, ((getNavigator() || {}).userAgent || \"\"));\r\n _logInternalMessage(itemCtx.diagLog(), 1 /* eLoggingSeverity.CRITICAL */, message);\r\n }\r\n _self.processNext(event, itemCtx);\r\n }\r\n };\r\n _self._doTeardown = function (unloadCtx, unloadState) {\r\n var core = (unloadCtx || {}).core();\r\n if (core && core[_DYN_GET_TRACE_CTX /* @min:%2egetTraceCtx */]) {\r\n var traceCtx = core[_DYN_GET_TRACE_CTX /* @min:%2egetTraceCtx */](false);\r\n if (traceCtx === _distributedTraceCtx) {\r\n core.setTraceCtx(_previousTraceCtx);\r\n }\r\n }\r\n _initDefaults();\r\n };\r\n function _initDefaults() {\r\n _extensionConfig = null;\r\n _distributedTraceCtx = null;\r\n _previousTraceCtx = null;\r\n _context = null;\r\n }\r\n function _populateDefaults(config) {\r\n var identifier = _self.identifier;\r\n var core = _self.core;\r\n // This function will be re-called whenever any referenced configuration is changed\r\n _self._addHook(onConfigChange(config, function () {\r\n var ctx = createProcessTelemetryContext(null, config, core);\r\n if (config.storagePrefix) {\r\n utlSetStoragePrefix(config.storagePrefix);\r\n }\r\n _extensionConfig = ctx.getExtCfg(identifier, _defaultConfig);\r\n // Test hook to allow accessing the internal values -- explicitly not defined as an available property on the class\r\n _self[\"_extConfig\"] = _extensionConfig;\r\n }));\r\n // This is outside of the onConfigChange as we don't want to update (replace) these values whenever a referenced config item changes\r\n _previousTraceCtx = core[_DYN_GET_TRACE_CTX /* @min:%2egetTraceCtx */](false);\r\n _context = new TelemetryContext(core, _extensionConfig, _previousTraceCtx, _self._unloadHooks);\r\n _distributedTraceCtx = createDistributedTraceContextFromTrace(_self.context[_DYN_TELEMETRY_TRACE /* @min:%2etelemetryTrace */], _previousTraceCtx);\r\n core.setTraceCtx(_distributedTraceCtx);\r\n _self.context.appId = function () {\r\n var breezeChannel = core.getPlugin(BreezeChannelIdentifier);\r\n return breezeChannel ? breezeChannel.plugin[\"_appId\"] : null;\r\n };\r\n }\r\n function _processTelemetryInternal(evt, itemCtx) {\r\n // Set Part A fields\r\n getSetValue(evt, \"tags\", []);\r\n getSetValue(evt, \"ext\", {});\r\n var ctx = _self.context;\r\n ctx[_DYN_APPLY_SESSION_CONTEX0 /* @min:%2eapplySessionContext */](evt, itemCtx);\r\n ctx[_DYN_APPLY_APPLICATION_CO1 /* @min:%2eapplyApplicationContext */](evt, itemCtx);\r\n ctx[_DYN_APPLY_DEVICE_CONTEXT /* @min:%2eapplyDeviceContext */](evt, itemCtx);\r\n ctx[_DYN_APPLY_OPERATION_CONT2 /* @min:%2eapplyOperationContext */](evt, itemCtx);\r\n ctx[_DYN_APPLY_USER_CONTEXT /* @min:%2eapplyUserContext */](evt, itemCtx);\r\n ctx[_DYN_APPLY_OPERATING_SYST3 /* @min:%2eapplyOperatingSystemContxt */](evt, itemCtx);\r\n ctx.applyWebContext(evt, itemCtx);\r\n ctx[_DYN_APPLY_LOCATION_CONTE4 /* @min:%2eapplyLocationContext */](evt, itemCtx); // legacy tags\r\n ctx[_DYN_APPLY_INTERNAL_CONTE5 /* @min:%2eapplyInternalContext */](evt, itemCtx); // legacy tags\r\n ctx.cleanUp(evt, itemCtx);\r\n }\r\n });\r\n return _this;\r\n }\r\n PropertiesPlugin.prototype.initialize = function (config, core, extensions, pluginChain) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Add Part A fields to the event\r\n * @param event - The event that needs to be processed\r\n */\r\n PropertiesPlugin.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 PropertiesPlugin;\r\n}(BaseTelemetryPlugin));\r\nexport default PropertiesPlugin;\r\n//# sourceMappingURL=PropertiesPlugin.js.map"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA,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;gEASM,CAAC;;;;;4BACqB;AAC5B;AACA;AACA"}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Properties Plugin, 3.0.3-nightly3.2306-01
2
+ * Application Insights JavaScript SDK - Properties Plugin, 3.0.3-nightly3.2307-24
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 - Properties Plugin, 3.0.3-nightly3.2306-01
2
+ * Application Insights JavaScript SDK - Properties Plugin, 3.0.3-nightly3.2307-24
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 - Properties Plugin, 3.0.3-nightly3.2306-01
2
+ * Application Insights JavaScript SDK - Properties Plugin, 3.0.3-nightly3.2307-24
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/applicationinsights-properties-js",
3
- "version": "3.0.3-nightly3.2306-01",
3
+ "version": "3.0.3-nightly3.2307-24",
4
4
  "description": "Microsoft Application Insights properties (Part A) plugin",
5
5
  "homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
6
6
  "author": "Microsoft Application Insights Team",
@@ -13,6 +13,7 @@
13
13
  "url": "https://github.com/microsoft/ApplicationInsights-JS/tree/main/extensions/applicationinsights-properties-js"
14
14
  },
15
15
  "scripts": {
16
+ "clean": "git clean -xdf",
16
17
  "build": "npm run build:esm && npm run build:browser && npm run sri && npm run dtsgen",
17
18
  "build:esm": "grunt properties",
18
19
  "build:browser": "rollup -c rollup.config.js --bundleConfigAsCjs",
@@ -30,7 +31,7 @@
30
31
  "@microsoft/ai-test-framework": "0.0.1",
31
32
  "@microsoft/applicationinsights-rollup-plugin-uglify3-js": "1.0.0",
32
33
  "@microsoft/applicationinsights-rollup-es5": "1.0.2",
33
- "@microsoft/api-extractor": "^7.18.1",
34
+ "@microsoft/api-extractor": "^7.18.19",
34
35
  "typescript": "^4.9.3",
35
36
  "tslib": "^2.0.0",
36
37
  "grunt": "^1.5.3",
@@ -55,9 +56,9 @@
55
56
  "dependencies": {
56
57
  "@microsoft/dynamicproto-js": "^2.0.2",
57
58
  "@microsoft/applicationinsights-shims": "3.0.1",
58
- "@microsoft/applicationinsights-core-js": "3.0.3-nightly3.2306-01",
59
- "@microsoft/applicationinsights-common": "3.0.3-nightly3.2306-01",
60
- "@nevware21/ts-utils": ">= 0.9.5 < 2.x"
59
+ "@microsoft/applicationinsights-core-js": "3.0.3-nightly3.2307-24",
60
+ "@microsoft/applicationinsights-common": "3.0.3-nightly3.2307-24",
61
+ "@nevware21/ts-utils": ">= 0.9.6 < 2.x"
61
62
  },
62
63
  "license": "MIT",
63
64
  "publishConfig": {
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights properties plugin, 3.0.3-nightly3.2306-01
2
+ * Microsoft Application Insights properties plugin, 3.0.3-nightly3.2307-24
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -27,6 +27,7 @@ import { IPlugin } from '@microsoft/applicationinsights-core-js';
27
27
  import { IProcessTelemetryContext } from '@microsoft/applicationinsights-core-js';
28
28
  import { IPropertiesPlugin } from '@microsoft/applicationinsights-common';
29
29
  import { ISession } from '@microsoft/applicationinsights-common';
30
+ import { ISessionManager } from '@microsoft/applicationinsights-common';
30
31
  import { ITelemetryContext } from '@microsoft/applicationinsights-common';
31
32
  import { ITelemetryItem } from '@microsoft/applicationinsights-core-js';
32
33
  import { ITelemetryPluginChain } from '@microsoft/applicationinsights-core-js';
@@ -54,7 +55,7 @@ declare interface IPropertiesConfig {
54
55
  }
55
56
 
56
57
  export declare interface IPropTelemetryContext extends ITelemetryContext {
57
- readonly sessionManager: SessionManager;
58
+ readonly sessionManager: ISessionManager;
58
59
  applySessionContext(evt: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
59
60
  applyOperatingSystemContxt(event: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
60
61
  applyApplicationContext(event: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
@@ -111,7 +112,7 @@ export declare class Session implements ISession {
111
112
  renewalDate?: number;
112
113
  }
113
114
 
114
- export declare class SessionManager {
115
+ export declare class SessionManager implements ISessionManager {
115
116
  automaticSession: Session;
116
117
  constructor(config: ISessionConfig, core?: IAppInsightsCore, unloadHookContainer?: IUnloadHookContainer);
117
118
  update(): void;
@@ -131,7 +132,7 @@ export declare class TelemetryContext implements IPropTelemetryContext {
131
132
  user: IUserContext;
132
133
  internal: IInternal;
133
134
  session: ISession;
134
- sessionManager: SessionManager;
135
+ sessionManager: ISessionManager;
135
136
  os: IOperatingSystem;
136
137
  web: IWeb;
137
138
  appId: () => string;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights properties plugin, 3.0.3-nightly3.2306-01
2
+ * Microsoft Application Insights properties plugin, 3.0.3-nightly3.2307-24
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -22,6 +22,7 @@ declare namespace ApplicationInsights {
22
22
  import { IProcessTelemetryContext } from '@microsoft/applicationinsights-core-js';
23
23
  import { IPropertiesPlugin } from '@microsoft/applicationinsights-common';
24
24
  import { ISession } from '@microsoft/applicationinsights-common';
25
+ import { ISessionManager } from '@microsoft/applicationinsights-common';
25
26
  import { ITelemetryContext } from '@microsoft/applicationinsights-common';
26
27
  import { ITelemetryItem } from '@microsoft/applicationinsights-core-js';
27
28
  import { ITelemetryPluginChain } from '@microsoft/applicationinsights-core-js';
@@ -49,7 +50,7 @@ declare namespace ApplicationInsights {
49
50
  }
50
51
 
51
52
  interface IPropTelemetryContext extends ITelemetryContext {
52
- readonly sessionManager: SessionManager;
53
+ readonly sessionManager: ISessionManager;
53
54
  applySessionContext(evt: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
54
55
  applyOperatingSystemContxt(event: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
55
56
  applyApplicationContext(event: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
@@ -106,7 +107,7 @@ declare namespace ApplicationInsights {
106
107
  renewalDate?: number;
107
108
  }
108
109
 
109
- class SessionManager {
110
+ class SessionManager implements ISessionManager {
110
111
  automaticSession: Session;
111
112
  constructor(config: ISessionConfig, core?: IAppInsightsCore, unloadHookContainer?: IUnloadHookContainer);
112
113
  update(): void;
@@ -126,7 +127,7 @@ declare namespace ApplicationInsights {
126
127
  user: IUserContext;
127
128
  internal: IInternal;
128
129
  session: ISession;
129
- sessionManager: SessionManager;
130
+ sessionManager: ISessionManager;
130
131
  os: IOperatingSystem;
131
132
  web: IWeb;
132
133
  appId: () => string;