@microsoft/applicationinsights-common 2.8.0-beta.2203-16 → 2.8.0-nightly.2204-05

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 (223) hide show
  1. package/browser/applicationinsights-common.integrity.json +9 -9
  2. package/browser/applicationinsights-common.js +521 -743
  3. package/browser/applicationinsights-common.js.map +1 -1
  4. package/browser/applicationinsights-common.min.js +2 -2
  5. package/browser/applicationinsights-common.min.js.map +1 -1
  6. package/dist/applicationinsights-common.api.json +2816 -1246
  7. package/dist/applicationinsights-common.api.md +87 -43
  8. package/dist/applicationinsights-common.d.ts +503 -290
  9. package/dist/applicationinsights-common.js +521 -743
  10. package/dist/applicationinsights-common.js.map +1 -1
  11. package/dist/applicationinsights-common.min.js +2 -2
  12. package/dist/applicationinsights-common.min.js.map +1 -1
  13. package/dist/applicationinsights-common.rollup.d.ts +503 -290
  14. package/dist-esm/ConnectionStringParser.js +1 -1
  15. package/dist-esm/Constants.js +1 -1
  16. package/dist-esm/DomHelperFuncs.js +1 -1
  17. package/dist-esm/Enums.js +1 -1
  18. package/dist-esm/HelperFuncs.js +1 -1
  19. package/dist-esm/Interfaces/ConnectionString.js +1 -1
  20. package/dist-esm/Interfaces/Context/IApplication.js +1 -1
  21. package/dist-esm/Interfaces/Context/IDevice.js +1 -1
  22. package/dist-esm/Interfaces/Context/IInternal.js +1 -1
  23. package/dist-esm/Interfaces/Context/ILocation.js +1 -1
  24. package/dist-esm/Interfaces/Context/IOperatingSystem.js +1 -1
  25. package/dist-esm/Interfaces/Context/ISample.js +1 -1
  26. package/dist-esm/Interfaces/Context/ISession.js +1 -1
  27. package/dist-esm/Interfaces/Context/ITelemetryTrace.js +1 -1
  28. package/dist-esm/Interfaces/Context/IUser.js +1 -1
  29. package/dist-esm/Interfaces/Context/IWeb.js +1 -1
  30. package/dist-esm/Interfaces/Contracts/AvailabilityData.js +1 -1
  31. package/dist-esm/Interfaces/Contracts/ContextTagKeys.js +1 -1
  32. package/dist-esm/Interfaces/Contracts/DataPointType.js +1 -1
  33. package/dist-esm/Interfaces/Contracts/DependencyKind.js +1 -1
  34. package/dist-esm/Interfaces/Contracts/DependencySourceType.js +1 -1
  35. package/dist-esm/Interfaces/Contracts/IBase.js +1 -1
  36. package/dist-esm/Interfaces/Contracts/IData.js +1 -1
  37. package/dist-esm/Interfaces/Contracts/IDataPoint.js +1 -1
  38. package/dist-esm/Interfaces/Contracts/IDomain.js +1 -1
  39. package/dist-esm/Interfaces/Contracts/IEnvelope.js +1 -1
  40. package/dist-esm/Interfaces/Contracts/IEventData.js +1 -1
  41. package/dist-esm/Interfaces/Contracts/IExceptionData.js +1 -1
  42. package/dist-esm/Interfaces/Contracts/IExceptionDetails.js +1 -1
  43. package/dist-esm/Interfaces/Contracts/IMessageData.js +1 -1
  44. package/dist-esm/Interfaces/Contracts/IMetricData.js +1 -1
  45. package/dist-esm/Interfaces/Contracts/IPageViewData.js +1 -1
  46. package/dist-esm/Interfaces/Contracts/IPageViewPerfData.js +1 -1
  47. package/dist-esm/Interfaces/Contracts/IRemoteDependencyData.js +1 -1
  48. package/dist-esm/Interfaces/Contracts/IStackFrame.js +1 -1
  49. package/dist-esm/Interfaces/Contracts/RequestData.js +1 -1
  50. package/dist-esm/Interfaces/Contracts/SeverityLevel.js +1 -1
  51. package/dist-esm/Interfaces/IAppInsights.js +1 -1
  52. package/dist-esm/Interfaces/IChannelControlsAI.js +1 -1
  53. package/dist-esm/Interfaces/IConfig.js +1 -1
  54. package/dist-esm/Interfaces/ICorrelationConfig.js +1 -1
  55. package/dist-esm/Interfaces/IDependencyTelemetry.js +1 -1
  56. package/dist-esm/Interfaces/IEventTelemetry.js +1 -1
  57. package/dist-esm/Interfaces/IExceptionTelemetry.js +1 -1
  58. package/dist-esm/Interfaces/IMetricTelemetry.js +1 -1
  59. package/dist-esm/Interfaces/IPageViewPerformanceTelemetry.js +1 -1
  60. package/dist-esm/Interfaces/IPageViewTelemetry.js +1 -1
  61. package/dist-esm/Interfaces/IPartC.js +1 -1
  62. package/dist-esm/Interfaces/IPropertiesPlugin.js +1 -1
  63. package/dist-esm/Interfaces/IRequestContext.js +1 -1
  64. package/dist-esm/Interfaces/ITelemetryContext.js +1 -1
  65. package/dist-esm/Interfaces/ITraceTelemetry.js +1 -1
  66. package/dist-esm/Interfaces/PartAExtensions.js +2 -2
  67. package/dist-esm/Interfaces/PartAExtensions.js.map +1 -1
  68. package/dist-esm/Interfaces/Telemetry/IEnvelope.js +1 -1
  69. package/dist-esm/Interfaces/Telemetry/ISerializable.js +1 -1
  70. package/dist-esm/RequestResponseHeaders.js +1 -1
  71. package/dist-esm/StorageHelperFuncs.js +8 -8
  72. package/dist-esm/StorageHelperFuncs.js.map +1 -1
  73. package/dist-esm/Telemetry/Common/Data.js +6 -11
  74. package/dist-esm/Telemetry/Common/Data.js.map +1 -1
  75. package/dist-esm/Telemetry/Common/DataPoint.js +8 -9
  76. package/dist-esm/Telemetry/Common/DataPoint.js.map +1 -1
  77. package/dist-esm/Telemetry/Common/DataSanitizer.js +9 -9
  78. package/dist-esm/Telemetry/Common/DataSanitizer.js.map +1 -1
  79. package/dist-esm/Telemetry/Common/Envelope.js +12 -12
  80. package/dist-esm/Telemetry/Common/Envelope.js.map +1 -1
  81. package/dist-esm/Telemetry/Event.js +9 -12
  82. package/dist-esm/Telemetry/Event.js.map +1 -1
  83. package/dist-esm/Telemetry/Exception.js +74 -81
  84. package/dist-esm/Telemetry/Exception.js.map +1 -1
  85. package/dist-esm/Telemetry/Metric.js +9 -12
  86. package/dist-esm/Telemetry/Metric.js.map +1 -1
  87. package/dist-esm/Telemetry/PageView.js +12 -15
  88. package/dist-esm/Telemetry/PageView.js.map +1 -1
  89. package/dist-esm/Telemetry/PageViewPerformance.js +16 -19
  90. package/dist-esm/Telemetry/PageViewPerformance.js.map +1 -1
  91. package/dist-esm/Telemetry/RemoteDependencyData.js +17 -20
  92. package/dist-esm/Telemetry/RemoteDependencyData.js.map +1 -1
  93. package/dist-esm/Telemetry/Trace.js +10 -13
  94. package/dist-esm/Telemetry/Trace.js.map +1 -1
  95. package/dist-esm/TelemetryItemCreator.js +1 -1
  96. package/dist-esm/UrlHelperFuncs.js +1 -1
  97. package/dist-esm/Util.js +1 -1
  98. package/dist-esm/applicationinsights-common.js +3 -6
  99. package/dist-esm/applicationinsights-common.js.map +1 -1
  100. package/package.json +3 -3
  101. package/src/Interfaces/IExceptionTelemetry.ts +1 -1
  102. package/src/Interfaces/ITraceTelemetry.ts +1 -1
  103. package/src/Interfaces/PartAExtensions.ts +1 -1
  104. package/src/Interfaces/Telemetry/IEnvelope.ts +35 -3
  105. package/src/StorageHelperFuncs.ts +7 -7
  106. package/src/Telemetry/Common/Data.ts +12 -4
  107. package/src/Telemetry/Common/DataPoint.ts +38 -2
  108. package/src/Telemetry/Common/DataSanitizer.ts +10 -10
  109. package/src/Telemetry/Common/Envelope.ts +51 -10
  110. package/src/Telemetry/Event.ts +30 -12
  111. package/src/Telemetry/Exception.ts +158 -71
  112. package/src/Telemetry/Metric.ts +27 -7
  113. package/src/Telemetry/PageView.ts +45 -10
  114. package/src/Telemetry/PageViewPerformance.ts +76 -14
  115. package/src/Telemetry/RemoteDependencyData.ts +70 -15
  116. package/src/Telemetry/Trace.ts +34 -8
  117. package/src/applicationinsights-common.ts +5 -5
  118. package/types/Enums.d.ts +4 -4
  119. package/types/Interfaces/IExceptionTelemetry.d.ts +1 -1
  120. package/types/Interfaces/ITraceTelemetry.d.ts +1 -1
  121. package/types/Interfaces/PartAExtensions.d.ts +1 -1
  122. package/types/Interfaces/Telemetry/IEnvelope.d.ts +24 -0
  123. package/types/Telemetry/Common/Data.d.ts +10 -2
  124. package/types/Telemetry/Common/DataPoint.d.ts +31 -2
  125. package/types/Telemetry/Common/DataSanitizer.d.ts +3 -3
  126. package/types/Telemetry/Common/Envelope.d.ts +35 -4
  127. package/types/Telemetry/Event.d.ts +19 -3
  128. package/types/Telemetry/Exception.d.ts +75 -7
  129. package/types/Telemetry/Metric.d.ts +19 -2
  130. package/types/Telemetry/PageView.d.ts +30 -2
  131. package/types/Telemetry/PageViewPerformance.d.ts +50 -2
  132. package/types/Telemetry/RemoteDependencyData.d.ts +46 -2
  133. package/types/Telemetry/Trace.d.ts +23 -3
  134. package/types/applicationinsights-common.d.ts +5 -5
  135. package/types/tsdoc-metadata.json +1 -1
  136. package/dist-esm/Interfaces/Contracts/Generated/AvailabilityData.js +0 -27
  137. package/dist-esm/Interfaces/Contracts/Generated/AvailabilityData.js.map +0 -1
  138. package/dist-esm/Interfaces/Contracts/Generated/Base.js +0 -17
  139. package/dist-esm/Interfaces/Contracts/Generated/Base.js.map +0 -1
  140. package/dist-esm/Interfaces/Contracts/Generated/ContextTagKeys.js +0 -89
  141. package/dist-esm/Interfaces/Contracts/Generated/ContextTagKeys.js.map +0 -1
  142. package/dist-esm/Interfaces/Contracts/Generated/Data.js +0 -21
  143. package/dist-esm/Interfaces/Contracts/Generated/Data.js.map +0 -1
  144. package/dist-esm/Interfaces/Contracts/Generated/DataPoint.js +0 -21
  145. package/dist-esm/Interfaces/Contracts/Generated/DataPoint.js.map +0 -1
  146. package/dist-esm/Interfaces/Contracts/Generated/DataPointType.js +0 -16
  147. package/dist-esm/Interfaces/Contracts/Generated/DataPointType.js.map +0 -1
  148. package/dist-esm/Interfaces/Contracts/Generated/DependencyKind.js +0 -17
  149. package/dist-esm/Interfaces/Contracts/Generated/DependencyKind.js.map +0 -1
  150. package/dist-esm/Interfaces/Contracts/Generated/DependencySourceType.js +0 -17
  151. package/dist-esm/Interfaces/Contracts/Generated/DependencySourceType.js.map +0 -1
  152. package/dist-esm/Interfaces/Contracts/Generated/Domain.js +0 -8
  153. package/dist-esm/Interfaces/Contracts/Generated/Domain.js.map +0 -1
  154. package/dist-esm/Interfaces/Contracts/Generated/Envelope.js +0 -28
  155. package/dist-esm/Interfaces/Contracts/Generated/Envelope.js.map +0 -1
  156. package/dist-esm/Interfaces/Contracts/Generated/EventData.js +0 -28
  157. package/dist-esm/Interfaces/Contracts/Generated/EventData.js.map +0 -1
  158. package/dist-esm/Interfaces/Contracts/Generated/ExceptionData.js +0 -32
  159. package/dist-esm/Interfaces/Contracts/Generated/ExceptionData.js.map +0 -1
  160. package/dist-esm/Interfaces/Contracts/Generated/ExceptionDetails.js +0 -24
  161. package/dist-esm/Interfaces/Contracts/Generated/ExceptionDetails.js.map +0 -1
  162. package/dist-esm/Interfaces/Contracts/Generated/MessageData.js +0 -28
  163. package/dist-esm/Interfaces/Contracts/Generated/MessageData.js.map +0 -1
  164. package/dist-esm/Interfaces/Contracts/Generated/MetricData.js +0 -32
  165. package/dist-esm/Interfaces/Contracts/Generated/MetricData.js.map +0 -1
  166. package/dist-esm/Interfaces/Contracts/Generated/PageViewData.js +0 -34
  167. package/dist-esm/Interfaces/Contracts/Generated/PageViewData.js.map +0 -1
  168. package/dist-esm/Interfaces/Contracts/Generated/PageViewPerfData.js +0 -34
  169. package/dist-esm/Interfaces/Contracts/Generated/PageViewPerfData.js.map +0 -1
  170. package/dist-esm/Interfaces/Contracts/Generated/RemoteDependencyData.js +0 -32
  171. package/dist-esm/Interfaces/Contracts/Generated/RemoteDependencyData.js.map +0 -1
  172. package/dist-esm/Interfaces/Contracts/Generated/RequestData.js +0 -28
  173. package/dist-esm/Interfaces/Contracts/Generated/RequestData.js.map +0 -1
  174. package/dist-esm/Interfaces/Contracts/Generated/SeverityLevel.js +0 -19
  175. package/dist-esm/Interfaces/Contracts/Generated/SeverityLevel.js.map +0 -1
  176. package/dist-esm/Interfaces/Contracts/Generated/StackFrame.js +0 -17
  177. package/dist-esm/Interfaces/Contracts/Generated/StackFrame.js.map +0 -1
  178. package/dist-esm/Telemetry/Common/Base.js +0 -22
  179. package/dist-esm/Telemetry/Common/Base.js.map +0 -1
  180. package/src/Interfaces/Contracts/Generated/AvailabilityData.ts +0 -57
  181. package/src/Interfaces/Contracts/Generated/Base.ts +0 -18
  182. package/src/Interfaces/Contracts/Generated/ContextTagKeys.ts +0 -299
  183. package/src/Interfaces/Contracts/Generated/Data.ts +0 -26
  184. package/src/Interfaces/Contracts/Generated/DataPoint.ts +0 -44
  185. package/src/Interfaces/Contracts/Generated/DataPointType.ts +0 -11
  186. package/src/Interfaces/Contracts/Generated/DependencyKind.ts +0 -12
  187. package/src/Interfaces/Contracts/Generated/DependencySourceType.ts +0 -12
  188. package/src/Interfaces/Contracts/Generated/Domain.ts +0 -10
  189. package/src/Interfaces/Contracts/Generated/Envelope.ts +0 -50
  190. package/src/Interfaces/Contracts/Generated/EventData.ts +0 -33
  191. package/src/Interfaces/Contracts/Generated/ExceptionData.ts +0 -40
  192. package/src/Interfaces/Contracts/Generated/ExceptionDetails.ts +0 -46
  193. package/src/Interfaces/Contracts/Generated/MessageData.ts +0 -39
  194. package/src/Interfaces/Contracts/Generated/MetricData.ts +0 -34
  195. package/src/Interfaces/Contracts/Generated/PageViewData.ts +0 -50
  196. package/src/Interfaces/Contracts/Generated/PageViewPerfData.ts +0 -70
  197. package/src/Interfaces/Contracts/Generated/RemoteDependencyData.ts +0 -68
  198. package/src/Interfaces/Contracts/Generated/RequestData.ts +0 -50
  199. package/src/Interfaces/Contracts/Generated/SeverityLevel.ts +0 -15
  200. package/src/Interfaces/Contracts/Generated/StackFrame.ts +0 -34
  201. package/src/Telemetry/Common/Base.ts +0 -14
  202. package/types/Interfaces/Contracts/Generated/AvailabilityData.d.ts +0 -42
  203. package/types/Interfaces/Contracts/Generated/Base.d.ts +0 -10
  204. package/types/Interfaces/Contracts/Generated/ContextTagKeys.d.ts +0 -175
  205. package/types/Interfaces/Contracts/Generated/Data.d.ts +0 -15
  206. package/types/Interfaces/Contracts/Generated/DataPoint.d.ts +0 -34
  207. package/types/Interfaces/Contracts/Generated/DataPointType.d.ts +0 -7
  208. package/types/Interfaces/Contracts/Generated/DependencyKind.d.ts +0 -8
  209. package/types/Interfaces/Contracts/Generated/DependencySourceType.d.ts +0 -8
  210. package/types/Interfaces/Contracts/Generated/Domain.d.ts +0 -5
  211. package/types/Interfaces/Contracts/Generated/Envelope.d.ts +0 -38
  212. package/types/Interfaces/Contracts/Generated/EventData.d.ts +0 -23
  213. package/types/Interfaces/Contracts/Generated/ExceptionData.d.ts +0 -29
  214. package/types/Interfaces/Contracts/Generated/ExceptionDetails.d.ts +0 -34
  215. package/types/Interfaces/Contracts/Generated/MessageData.d.ts +0 -28
  216. package/types/Interfaces/Contracts/Generated/MetricData.d.ts +0 -24
  217. package/types/Interfaces/Contracts/Generated/PageViewData.d.ts +0 -35
  218. package/types/Interfaces/Contracts/Generated/PageViewPerfData.d.ts +0 -51
  219. package/types/Interfaces/Contracts/Generated/RemoteDependencyData.d.ts +0 -51
  220. package/types/Interfaces/Contracts/Generated/RequestData.d.ts +0 -38
  221. package/types/Interfaces/Contracts/Generated/SeverityLevel.d.ts +0 -10
  222. package/types/Interfaces/Contracts/Generated/StackFrame.d.ts +0 -25
  223. package/types/Telemetry/Common/Base.d.ts +0 -8
@@ -1 +1 @@
1
- {"version":3,"file":"Data.js.map","sources":["Data.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { __extends } from \"tslib\";\r\nimport { Data as AIData } from \"../../Interfaces/Contracts/Generated/Data\";\r\nvar Data = /** @class */ (function (_super) {\r\n __extends(Data, _super);\r\n /**\r\n * Constructs a new instance of telemetry data.\r\n */\r\n function Data(baseType, data) {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n _this.aiDataContract = {\r\n baseType: 1 /* Required */,\r\n baseData: 1 /* Required */\r\n };\r\n _this.baseType = baseType;\r\n _this.baseData = data;\r\n return _this;\r\n }\r\n return Data;\r\n}(AIData));\r\nexport { Data };\r\n//# sourceMappingURL=Data.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"}
1
+ {"version":3,"file":"Data.js.map","sources":["Data.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar Data = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of telemetry data.\r\n */\r\n function Data(baseType, data) {\r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n this.aiDataContract = {\r\n baseType: 1 /* Required */,\r\n baseData: 1 /* Required */\r\n };\r\n this.baseType = baseType;\r\n this.baseData = data;\r\n }\r\n return Data;\r\n}());\r\nexport { Data };\r\n//# sourceMappingURL=Data.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"}
@@ -1,19 +1,15 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-beta.2203-16
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-05
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
6
6
 
7
- import { __extendsFn as __extends } from "@microsoft/applicationinsights-shims";
8
- import { DataPoint as AIDataPoint } from "../../Interfaces/Contracts/Generated/DataPoint";
9
- var DataPoint = /** @class */ (function (_super) {
10
- __extends(DataPoint, _super);
7
+ var DataPoint = /** @class */ (function () {
11
8
  function DataPoint() {
12
- var _this = _super !== null && _super.apply(this, arguments) || this;
13
9
  /**
14
10
  * The data contract for serializing this object.
15
11
  */
16
- _this.aiDataContract = {
12
+ this.aiDataContract = {
17
13
  name: 1 /* Required */,
18
14
  kind: 0 /* Default */,
19
15
  value: 1 /* Required */,
@@ -22,9 +18,12 @@ var DataPoint = /** @class */ (function (_super) {
22
18
  max: 0 /* Default */,
23
19
  stdDev: 0 /* Default */
24
20
  };
25
- return _this;
21
+ /**
22
+ * Metric type. Single measurement or the aggregated value.
23
+ */
24
+ this.kind = 0 /* Measurement */;
26
25
  }
27
26
  return DataPoint;
28
- }(AIDataPoint));
27
+ }());
29
28
  export { DataPoint };
30
29
  //# sourceMappingURL=DataPoint.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataPoint.js.map","sources":["DataPoint.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { __extends } from \"tslib\";\r\nimport { DataPoint as AIDataPoint } from \"../../Interfaces/Contracts/Generated/DataPoint\";\r\nvar DataPoint = /** @class */ (function (_super) {\r\n __extends(DataPoint, _super);\r\n function DataPoint() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n _this.aiDataContract = {\r\n name: 1 /* Required */,\r\n kind: 0 /* Default */,\r\n value: 1 /* Required */,\r\n count: 0 /* Default */,\r\n min: 0 /* Default */,\r\n max: 0 /* Default */,\r\n stdDev: 0 /* Default */\r\n };\r\n return _this;\r\n }\r\n return DataPoint;\r\n}(AIDataPoint));\r\nexport { DataPoint };\r\n//# sourceMappingURL=DataPoint.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"}
1
+ {"version":3,"file":"DataPoint.js.map","sources":["DataPoint.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar DataPoint = /** @class */ (function () {\r\n function DataPoint() {\r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n this.aiDataContract = {\r\n name: 1 /* Required */,\r\n kind: 0 /* Default */,\r\n value: 1 /* Required */,\r\n count: 0 /* Default */,\r\n min: 0 /* Default */,\r\n max: 0 /* Default */,\r\n stdDev: 0 /* Default */\r\n };\r\n /**\r\n * Metric type. Single measurement or the aggregated value.\r\n */\r\n this.kind = 0 /* Measurement */;\r\n }\r\n return DataPoint;\r\n}());\r\nexport { DataPoint };\r\n//# sourceMappingURL=DataPoint.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"}
@@ -1,10 +1,10 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-beta.2203-16
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-05
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
6
6
 
7
- import { _InternalMessageId, hasJSON, getJSON, objForEachKey, isObject, strTrim, _throwInternal } from "@microsoft/applicationinsights-core-js";
7
+ import { hasJSON, getJSON, objForEachKey, isObject, strTrim, _throwInternal } from "@microsoft/applicationinsights-core-js";
8
8
  export function dataSanitizeKeyAndAddUniqueness(logger, key, map) {
9
9
  var origLength = key.length;
10
10
  var field = dataSanitizeKey(logger, key);
@@ -28,7 +28,7 @@ export function dataSanitizeKey(logger, name) {
28
28
  // truncate the string to 150 chars
29
29
  if (name.length > 150 /* MAX_NAME_LENGTH */) {
30
30
  nameTrunc = name.substring(0, 150 /* MAX_NAME_LENGTH */);
31
- _throwInternal(logger, 2 /* WARNING */, _InternalMessageId.NameTooLong, "name is too long. It has been truncated to " + 150 /* MAX_NAME_LENGTH */ + " characters.", { name: name }, true);
31
+ _throwInternal(logger, 2 /* WARNING */, 57 /* NameTooLong */, "name is too long. It has been truncated to " + 150 /* MAX_NAME_LENGTH */ + " characters.", { name: name }, true);
32
32
  }
33
33
  }
34
34
  return nameTrunc || name;
@@ -41,20 +41,20 @@ export function dataSanitizeString(logger, value, maxLength) {
41
41
  value = strTrim(value);
42
42
  if (value.toString().length > maxLength) {
43
43
  valueTrunc = value.toString().substring(0, maxLength);
44
- _throwInternal(logger, 2 /* WARNING */, _InternalMessageId.StringValueTooLong, "string value is too long. It has been truncated to " + maxLength + " characters.", { value: value }, true);
44
+ _throwInternal(logger, 2 /* WARNING */, 61 /* StringValueTooLong */, "string value is too long. It has been truncated to " + maxLength + " characters.", { value: value }, true);
45
45
  }
46
46
  }
47
47
  return valueTrunc || value;
48
48
  }
49
49
  export function dataSanitizeUrl(logger, url) {
50
- return dataSanitizeInput(logger, url, 2048 /* MAX_URL_LENGTH */, _InternalMessageId.UrlTooLong);
50
+ return dataSanitizeInput(logger, url, 2048 /* MAX_URL_LENGTH */, 66 /* UrlTooLong */);
51
51
  }
52
52
  export function dataSanitizeMessage(logger, message) {
53
53
  var messageTrunc;
54
54
  if (message) {
55
55
  if (message.length > 32768 /* MAX_MESSAGE_LENGTH */) {
56
56
  messageTrunc = message.substring(0, 32768 /* MAX_MESSAGE_LENGTH */);
57
- _throwInternal(logger, 2 /* WARNING */, _InternalMessageId.MessageTruncated, "message is too long, it has been truncated to " + 32768 /* MAX_MESSAGE_LENGTH */ + " characters.", { message: message }, true);
57
+ _throwInternal(logger, 2 /* WARNING */, 56 /* MessageTruncated */, "message is too long, it has been truncated to " + 32768 /* MAX_MESSAGE_LENGTH */ + " characters.", { message: message }, true);
58
58
  }
59
59
  }
60
60
  return messageTrunc || message;
@@ -66,7 +66,7 @@ export function dataSanitizeException(logger, exception) {
66
66
  var value = "" + exception;
67
67
  if (value.length > 32768 /* MAX_EXCEPTION_LENGTH */) {
68
68
  exceptionTrunc = value.substring(0, 32768 /* MAX_EXCEPTION_LENGTH */);
69
- _throwInternal(logger, 2 /* WARNING */, _InternalMessageId.ExceptionTruncated, "exception is too long, it has been truncated to " + 32768 /* MAX_EXCEPTION_LENGTH */ + " characters.", { exception: exception }, true);
69
+ _throwInternal(logger, 2 /* WARNING */, 52 /* ExceptionTruncated */, "exception is too long, it has been truncated to " + 32768 /* MAX_EXCEPTION_LENGTH */ + " characters.", { exception: exception }, true);
70
70
  }
71
71
  }
72
72
  return exceptionTrunc || exception;
@@ -81,7 +81,7 @@ export function dataSanitizeProperties(logger, properties) {
81
81
  value = getJSON().stringify(value);
82
82
  }
83
83
  catch (e) {
84
- _throwInternal(logger, 2 /* WARNING */, _InternalMessageId.CannotSerializeObjectNonSerializable, "custom property is not valid", { exception: e }, true);
84
+ _throwInternal(logger, 2 /* WARNING */, 49 /* CannotSerializeObjectNonSerializable */, "custom property is not valid", { exception: e }, true);
85
85
  }
86
86
  }
87
87
  value = dataSanitizeString(logger, value, 8192 /* MAX_PROPERTY_LENGTH */);
@@ -104,7 +104,7 @@ export function dataSanitizeMeasurements(logger, measurements) {
104
104
  return measurements;
105
105
  }
106
106
  export function dataSanitizeId(logger, id) {
107
- return id ? dataSanitizeInput(logger, id, 128 /* MAX_ID_LENGTH */, _InternalMessageId.IdTooLong).toString() : id;
107
+ return id ? dataSanitizeInput(logger, id, 128 /* MAX_ID_LENGTH */, 69 /* IdTooLong */).toString() : id;
108
108
  }
109
109
  export function dataSanitizeInput(logger, input, maxLength, _msgId) {
110
110
  var inputTrunc;
@@ -1 +1 @@
1
- {"version":3,"file":"DataSanitizer.js.map","sources":["DataSanitizer.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { _InternalMessageId, hasJSON, getJSON, objForEachKey, isObject, strTrim, _throwInternal } from \"@microsoft/applicationinsights-core-js\";\r\nexport function dataSanitizeKeyAndAddUniqueness(logger, key, map) {\r\n var origLength = key.length;\r\n var field = dataSanitizeKey(logger, key);\r\n // validation truncated the length. We need to add uniqueness\r\n if (field.length !== origLength) {\r\n var i = 0;\r\n var uniqueField = field;\r\n while (map[uniqueField] !== undefined) {\r\n i++;\r\n uniqueField = field.substring(0, 150 /* MAX_NAME_LENGTH */ - 3) + dsPadNumber(i);\r\n }\r\n field = uniqueField;\r\n }\r\n return field;\r\n}\r\nexport function dataSanitizeKey(logger, name) {\r\n var nameTrunc;\r\n if (name) {\r\n // Remove any leading or trailing whitespace\r\n name = strTrim(name.toString());\r\n // truncate the string to 150 chars\r\n if (name.length > 150 /* MAX_NAME_LENGTH */) {\r\n nameTrunc = name.substring(0, 150 /* MAX_NAME_LENGTH */);\r\n _throwInternal(logger, 2 /* WARNING */, _InternalMessageId.NameTooLong, \"name is too long. It has been truncated to \" + 150 /* MAX_NAME_LENGTH */ + \" characters.\", { name: name }, true);\r\n }\r\n }\r\n return nameTrunc || name;\r\n}\r\nexport function dataSanitizeString(logger, value, maxLength) {\r\n if (maxLength === void 0) { maxLength = 1024 /* MAX_STRING_LENGTH */; }\r\n var valueTrunc;\r\n if (value) {\r\n maxLength = maxLength ? maxLength : 1024 /* MAX_STRING_LENGTH */; // in case default parameters dont work\r\n value = strTrim(value);\r\n if (value.toString().length > maxLength) {\r\n valueTrunc = value.toString().substring(0, maxLength);\r\n _throwInternal(logger, 2 /* WARNING */, _InternalMessageId.StringValueTooLong, \"string value is too long. It has been truncated to \" + maxLength + \" characters.\", { value: value }, true);\r\n }\r\n }\r\n return valueTrunc || value;\r\n}\r\nexport function dataSanitizeUrl(logger, url) {\r\n return dataSanitizeInput(logger, url, 2048 /* MAX_URL_LENGTH */, _InternalMessageId.UrlTooLong);\r\n}\r\nexport function dataSanitizeMessage(logger, message) {\r\n var messageTrunc;\r\n if (message) {\r\n if (message.length > 32768 /* MAX_MESSAGE_LENGTH */) {\r\n messageTrunc = message.substring(0, 32768 /* MAX_MESSAGE_LENGTH */);\r\n _throwInternal(logger, 2 /* WARNING */, _InternalMessageId.MessageTruncated, \"message is too long, it has been truncated to \" + 32768 /* MAX_MESSAGE_LENGTH */ + \" characters.\", { message: message }, true);\r\n }\r\n }\r\n return messageTrunc || message;\r\n}\r\nexport function dataSanitizeException(logger, exception) {\r\n var exceptionTrunc;\r\n if (exception) {\r\n // Make surte its a string\r\n var value = \"\" + exception;\r\n if (value.length > 32768 /* MAX_EXCEPTION_LENGTH */) {\r\n exceptionTrunc = value.substring(0, 32768 /* MAX_EXCEPTION_LENGTH */);\r\n _throwInternal(logger, 2 /* WARNING */, _InternalMessageId.ExceptionTruncated, \"exception is too long, it has been truncated to \" + 32768 /* MAX_EXCEPTION_LENGTH */ + \" characters.\", { exception: exception }, true);\r\n }\r\n }\r\n return exceptionTrunc || exception;\r\n}\r\nexport function dataSanitizeProperties(logger, properties) {\r\n if (properties) {\r\n var tempProps_1 = {};\r\n objForEachKey(properties, function (prop, value) {\r\n if (isObject(value) && hasJSON()) {\r\n // Stringify any part C properties\r\n try {\r\n value = getJSON().stringify(value);\r\n }\r\n catch (e) {\r\n _throwInternal(logger, 2 /* WARNING */, _InternalMessageId.CannotSerializeObjectNonSerializable, \"custom property is not valid\", { exception: e }, true);\r\n }\r\n }\r\n value = dataSanitizeString(logger, value, 8192 /* MAX_PROPERTY_LENGTH */);\r\n prop = dataSanitizeKeyAndAddUniqueness(logger, prop, tempProps_1);\r\n tempProps_1[prop] = value;\r\n });\r\n properties = tempProps_1;\r\n }\r\n return properties;\r\n}\r\nexport function dataSanitizeMeasurements(logger, measurements) {\r\n if (measurements) {\r\n var tempMeasurements_1 = {};\r\n objForEachKey(measurements, function (measure, value) {\r\n measure = dataSanitizeKeyAndAddUniqueness(logger, measure, tempMeasurements_1);\r\n tempMeasurements_1[measure] = value;\r\n });\r\n measurements = tempMeasurements_1;\r\n }\r\n return measurements;\r\n}\r\nexport function dataSanitizeId(logger, id) {\r\n return id ? dataSanitizeInput(logger, id, 128 /* MAX_ID_LENGTH */, _InternalMessageId.IdTooLong).toString() : id;\r\n}\r\nexport function dataSanitizeInput(logger, input, maxLength, _msgId) {\r\n var inputTrunc;\r\n if (input) {\r\n input = strTrim(input);\r\n if (input.length > maxLength) {\r\n inputTrunc = input.substring(0, maxLength);\r\n _throwInternal(logger, 2 /* WARNING */, _msgId, \"input is too long, it has been truncated to \" + maxLength + \" characters.\", { data: input }, true);\r\n }\r\n }\r\n return inputTrunc || input;\r\n}\r\nexport function dsPadNumber(num) {\r\n var s = \"00\" + num;\r\n return s.substr(s.length - 3);\r\n}\r\n/**\r\n * Provides the DataSanitizer functions within the previous namespace.\r\n */\r\nexport var DataSanitizer = {\r\n MAX_NAME_LENGTH: 150 /* MAX_NAME_LENGTH */,\r\n MAX_ID_LENGTH: 128 /* MAX_ID_LENGTH */,\r\n MAX_PROPERTY_LENGTH: 8192 /* MAX_PROPERTY_LENGTH */,\r\n MAX_STRING_LENGTH: 1024 /* MAX_STRING_LENGTH */,\r\n MAX_URL_LENGTH: 2048 /* MAX_URL_LENGTH */,\r\n MAX_MESSAGE_LENGTH: 32768 /* MAX_MESSAGE_LENGTH */,\r\n MAX_EXCEPTION_LENGTH: 32768 /* MAX_EXCEPTION_LENGTH */,\r\n sanitizeKeyAndAddUniqueness: dataSanitizeKeyAndAddUniqueness,\r\n sanitizeKey: dataSanitizeKey,\r\n sanitizeString: dataSanitizeString,\r\n sanitizeUrl: dataSanitizeUrl,\r\n sanitizeMessage: dataSanitizeMessage,\r\n sanitizeException: dataSanitizeException,\r\n sanitizeProperties: dataSanitizeProperties,\r\n sanitizeMeasurements: dataSanitizeMeasurements,\r\n sanitizeId: dataSanitizeId,\r\n sanitizeInput: dataSanitizeInput,\r\n padNumber: dsPadNumber,\r\n trim: strTrim\r\n};\r\n//# sourceMappingURL=DataSanitizer.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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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":"DataSanitizer.js.map","sources":["DataSanitizer.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { hasJSON, getJSON, objForEachKey, isObject, strTrim, _throwInternal } from \"@microsoft/applicationinsights-core-js\";\r\nexport function dataSanitizeKeyAndAddUniqueness(logger, key, map) {\r\n var origLength = key.length;\r\n var field = dataSanitizeKey(logger, key);\r\n // validation truncated the length. We need to add uniqueness\r\n if (field.length !== origLength) {\r\n var i = 0;\r\n var uniqueField = field;\r\n while (map[uniqueField] !== undefined) {\r\n i++;\r\n uniqueField = field.substring(0, 150 /* MAX_NAME_LENGTH */ - 3) + dsPadNumber(i);\r\n }\r\n field = uniqueField;\r\n }\r\n return field;\r\n}\r\nexport function dataSanitizeKey(logger, name) {\r\n var nameTrunc;\r\n if (name) {\r\n // Remove any leading or trailing whitespace\r\n name = strTrim(name.toString());\r\n // truncate the string to 150 chars\r\n if (name.length > 150 /* MAX_NAME_LENGTH */) {\r\n nameTrunc = name.substring(0, 150 /* MAX_NAME_LENGTH */);\r\n _throwInternal(logger, 2 /* WARNING */, 57 /* NameTooLong */, \"name is too long. It has been truncated to \" + 150 /* MAX_NAME_LENGTH */ + \" characters.\", { name: name }, true);\r\n }\r\n }\r\n return nameTrunc || name;\r\n}\r\nexport function dataSanitizeString(logger, value, maxLength) {\r\n if (maxLength === void 0) { maxLength = 1024 /* MAX_STRING_LENGTH */; }\r\n var valueTrunc;\r\n if (value) {\r\n maxLength = maxLength ? maxLength : 1024 /* MAX_STRING_LENGTH */; // in case default parameters dont work\r\n value = strTrim(value);\r\n if (value.toString().length > maxLength) {\r\n valueTrunc = value.toString().substring(0, maxLength);\r\n _throwInternal(logger, 2 /* WARNING */, 61 /* StringValueTooLong */, \"string value is too long. It has been truncated to \" + maxLength + \" characters.\", { value: value }, true);\r\n }\r\n }\r\n return valueTrunc || value;\r\n}\r\nexport function dataSanitizeUrl(logger, url) {\r\n return dataSanitizeInput(logger, url, 2048 /* MAX_URL_LENGTH */, 66 /* UrlTooLong */);\r\n}\r\nexport function dataSanitizeMessage(logger, message) {\r\n var messageTrunc;\r\n if (message) {\r\n if (message.length > 32768 /* MAX_MESSAGE_LENGTH */) {\r\n messageTrunc = message.substring(0, 32768 /* MAX_MESSAGE_LENGTH */);\r\n _throwInternal(logger, 2 /* WARNING */, 56 /* MessageTruncated */, \"message is too long, it has been truncated to \" + 32768 /* MAX_MESSAGE_LENGTH */ + \" characters.\", { message: message }, true);\r\n }\r\n }\r\n return messageTrunc || message;\r\n}\r\nexport function dataSanitizeException(logger, exception) {\r\n var exceptionTrunc;\r\n if (exception) {\r\n // Make surte its a string\r\n var value = \"\" + exception;\r\n if (value.length > 32768 /* MAX_EXCEPTION_LENGTH */) {\r\n exceptionTrunc = value.substring(0, 32768 /* MAX_EXCEPTION_LENGTH */);\r\n _throwInternal(logger, 2 /* WARNING */, 52 /* ExceptionTruncated */, \"exception is too long, it has been truncated to \" + 32768 /* MAX_EXCEPTION_LENGTH */ + \" characters.\", { exception: exception }, true);\r\n }\r\n }\r\n return exceptionTrunc || exception;\r\n}\r\nexport function dataSanitizeProperties(logger, properties) {\r\n if (properties) {\r\n var tempProps_1 = {};\r\n objForEachKey(properties, function (prop, value) {\r\n if (isObject(value) && hasJSON()) {\r\n // Stringify any part C properties\r\n try {\r\n value = getJSON().stringify(value);\r\n }\r\n catch (e) {\r\n _throwInternal(logger, 2 /* WARNING */, 49 /* CannotSerializeObjectNonSerializable */, \"custom property is not valid\", { exception: e }, true);\r\n }\r\n }\r\n value = dataSanitizeString(logger, value, 8192 /* MAX_PROPERTY_LENGTH */);\r\n prop = dataSanitizeKeyAndAddUniqueness(logger, prop, tempProps_1);\r\n tempProps_1[prop] = value;\r\n });\r\n properties = tempProps_1;\r\n }\r\n return properties;\r\n}\r\nexport function dataSanitizeMeasurements(logger, measurements) {\r\n if (measurements) {\r\n var tempMeasurements_1 = {};\r\n objForEachKey(measurements, function (measure, value) {\r\n measure = dataSanitizeKeyAndAddUniqueness(logger, measure, tempMeasurements_1);\r\n tempMeasurements_1[measure] = value;\r\n });\r\n measurements = tempMeasurements_1;\r\n }\r\n return measurements;\r\n}\r\nexport function dataSanitizeId(logger, id) {\r\n return id ? dataSanitizeInput(logger, id, 128 /* MAX_ID_LENGTH */, 69 /* IdTooLong */).toString() : id;\r\n}\r\nexport function dataSanitizeInput(logger, input, maxLength, _msgId) {\r\n var inputTrunc;\r\n if (input) {\r\n input = strTrim(input);\r\n if (input.length > maxLength) {\r\n inputTrunc = input.substring(0, maxLength);\r\n _throwInternal(logger, 2 /* WARNING */, _msgId, \"input is too long, it has been truncated to \" + maxLength + \" characters.\", { data: input }, true);\r\n }\r\n }\r\n return inputTrunc || input;\r\n}\r\nexport function dsPadNumber(num) {\r\n var s = \"00\" + num;\r\n return s.substr(s.length - 3);\r\n}\r\n/**\r\n * Provides the DataSanitizer functions within the previous namespace.\r\n */\r\nexport var DataSanitizer = {\r\n MAX_NAME_LENGTH: 150 /* MAX_NAME_LENGTH */,\r\n MAX_ID_LENGTH: 128 /* MAX_ID_LENGTH */,\r\n MAX_PROPERTY_LENGTH: 8192 /* MAX_PROPERTY_LENGTH */,\r\n MAX_STRING_LENGTH: 1024 /* MAX_STRING_LENGTH */,\r\n MAX_URL_LENGTH: 2048 /* MAX_URL_LENGTH */,\r\n MAX_MESSAGE_LENGTH: 32768 /* MAX_MESSAGE_LENGTH */,\r\n MAX_EXCEPTION_LENGTH: 32768 /* MAX_EXCEPTION_LENGTH */,\r\n sanitizeKeyAndAddUniqueness: dataSanitizeKeyAndAddUniqueness,\r\n sanitizeKey: dataSanitizeKey,\r\n sanitizeString: dataSanitizeString,\r\n sanitizeUrl: dataSanitizeUrl,\r\n sanitizeMessage: dataSanitizeMessage,\r\n sanitizeException: dataSanitizeException,\r\n sanitizeProperties: dataSanitizeProperties,\r\n sanitizeMeasurements: dataSanitizeMeasurements,\r\n sanitizeId: dataSanitizeId,\r\n sanitizeInput: dataSanitizeInput,\r\n padNumber: dsPadNumber,\r\n trim: strTrim\r\n};\r\n//# sourceMappingURL=DataSanitizer.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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,25 +1,26 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-beta.2203-16
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-05
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
6
6
 
7
- import { __extendsFn as __extends } from "@microsoft/applicationinsights-shims";
8
- import { Envelope as AIEnvelope } from "../../Interfaces/Contracts/Generated/Envelope";
9
7
  import { dataSanitizeString } from "./DataSanitizer";
10
8
  import { toISOString } from "@microsoft/applicationinsights-core-js";
11
9
  import { strNotSpecified } from "../../Constants";
12
- var Envelope = /** @class */ (function (_super) {
13
- __extends(Envelope, _super);
10
+ var Envelope = /** @class */ (function () {
14
11
  /**
15
12
  * Constructs a new instance of telemetry data.
16
13
  */
17
14
  function Envelope(logger, data, name) {
18
- var _this = _super.call(this) || this;
19
- _this.name = dataSanitizeString(logger, name) || strNotSpecified;
20
- _this.data = data;
21
- _this.time = toISOString(new Date());
22
- _this.aiDataContract = {
15
+ var _this = this;
16
+ var _self = this;
17
+ _self.ver = 1;
18
+ _self.sampleRate = 100.0;
19
+ _self.tags = {};
20
+ _self.name = dataSanitizeString(logger, name) || strNotSpecified;
21
+ _self.data = data;
22
+ _self.time = toISOString(new Date());
23
+ _self.aiDataContract = {
23
24
  time: 1 /* Required */,
24
25
  iKey: 1 /* Required */,
25
26
  name: 1 /* Required */,
@@ -29,9 +30,8 @@ var Envelope = /** @class */ (function (_super) {
29
30
  tags: 1 /* Required */,
30
31
  data: 1 /* Required */
31
32
  };
32
- return _this;
33
33
  }
34
34
  return Envelope;
35
- }(AIEnvelope));
35
+ }());
36
36
  export { Envelope };
37
37
  //# sourceMappingURL=Envelope.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Envelope.js.map","sources":["Envelope.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { __extends } from \"tslib\";\r\nimport { Envelope as AIEnvelope } from \"../../Interfaces/Contracts/Generated/Envelope\";\r\nimport { dataSanitizeString } from \"./DataSanitizer\";\r\nimport { toISOString } from \"@microsoft/applicationinsights-core-js\";\r\nimport { strNotSpecified } from \"../../Constants\";\r\nvar Envelope = /** @class */ (function (_super) {\r\n __extends(Envelope, _super);\r\n /**\r\n * Constructs a new instance of telemetry data.\r\n */\r\n function Envelope(logger, data, name) {\r\n var _this = _super.call(this) || this;\r\n _this.name = dataSanitizeString(logger, name) || strNotSpecified;\r\n _this.data = data;\r\n _this.time = toISOString(new Date());\r\n _this.aiDataContract = {\r\n time: 1 /* Required */,\r\n iKey: 1 /* Required */,\r\n name: 1 /* Required */,\r\n sampleRate: function () {\r\n return (_this.sampleRate === 100) ? 4 /* Hidden */ : 1 /* Required */;\r\n },\r\n tags: 1 /* Required */,\r\n data: 1 /* Required */\r\n };\r\n return _this;\r\n }\r\n return Envelope;\r\n}(AIEnvelope));\r\nexport { Envelope };\r\n//# sourceMappingURL=Envelope.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"}
1
+ {"version":3,"file":"Envelope.js.map","sources":["Envelope.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { dataSanitizeString } from \"./DataSanitizer\";\r\nimport { toISOString } from \"@microsoft/applicationinsights-core-js\";\r\nimport { strNotSpecified } from \"../../Constants\";\r\nvar Envelope = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of telemetry data.\r\n */\r\n function Envelope(logger, data, name) {\r\n var _this = this;\r\n var _self = this;\r\n _self.ver = 1;\r\n _self.sampleRate = 100.0;\r\n _self.tags = {};\r\n _self.name = dataSanitizeString(logger, name) || strNotSpecified;\r\n _self.data = data;\r\n _self.time = toISOString(new Date());\r\n _self.aiDataContract = {\r\n time: 1 /* Required */,\r\n iKey: 1 /* Required */,\r\n name: 1 /* Required */,\r\n sampleRate: function () {\r\n return (_this.sampleRate === 100) ? 4 /* Hidden */ : 1 /* Required */;\r\n },\r\n tags: 1 /* Required */,\r\n data: 1 /* Required */\r\n };\r\n }\r\n return Envelope;\r\n}());\r\nexport { Envelope };\r\n//# sourceMappingURL=Envelope.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"}
@@ -1,34 +1,31 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-beta.2203-16
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-05
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
6
6
 
7
- import { __extendsFn as __extends } from "@microsoft/applicationinsights-shims";
8
- import { EventData } from "../Interfaces/Contracts/Generated/EventData";
9
7
  import { dataSanitizeString, dataSanitizeProperties, dataSanitizeMeasurements } from "./Common/DataSanitizer";
10
8
  import { strNotSpecified } from "../Constants";
11
- var Event = /** @class */ (function (_super) {
12
- __extends(Event, _super);
9
+ var Event = /** @class */ (function () {
13
10
  /**
14
11
  * Constructs a new instance of the EventTelemetry object
15
12
  */
16
13
  function Event(logger, name, properties, measurements) {
17
- var _this = _super.call(this) || this;
18
- _this.aiDataContract = {
14
+ this.aiDataContract = {
19
15
  ver: 1 /* Required */,
20
16
  name: 1 /* Required */,
21
17
  properties: 0 /* Default */,
22
18
  measurements: 0 /* Default */
23
19
  };
24
- _this.name = dataSanitizeString(logger, name) || strNotSpecified;
25
- _this.properties = dataSanitizeProperties(logger, properties);
26
- _this.measurements = dataSanitizeMeasurements(logger, measurements);
27
- return _this;
20
+ var _self = this;
21
+ _self.ver = 2;
22
+ _self.name = dataSanitizeString(logger, name) || strNotSpecified;
23
+ _self.properties = dataSanitizeProperties(logger, properties);
24
+ _self.measurements = dataSanitizeMeasurements(logger, measurements);
28
25
  }
29
26
  Event.envelopeType = "Microsoft.ApplicationInsights.{0}.Event";
30
27
  Event.dataType = "EventData";
31
28
  return Event;
32
- }(EventData));
29
+ }());
33
30
  export { Event };
34
31
  //# sourceMappingURL=Event.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Event.js.map","sources":["Event.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { __extends } from \"tslib\";\r\nimport { EventData } from \"../Interfaces/Contracts/Generated/EventData\";\r\nimport { dataSanitizeString, dataSanitizeProperties, dataSanitizeMeasurements } from \"./Common/DataSanitizer\";\r\nimport { strNotSpecified } from \"../Constants\";\r\nvar Event = /** @class */ (function (_super) {\r\n __extends(Event, _super);\r\n /**\r\n * Constructs a new instance of the EventTelemetry object\r\n */\r\n function Event(logger, name, properties, measurements) {\r\n var _this = _super.call(this) || this;\r\n _this.aiDataContract = {\r\n ver: 1 /* Required */,\r\n name: 1 /* Required */,\r\n properties: 0 /* Default */,\r\n measurements: 0 /* Default */\r\n };\r\n _this.name = dataSanitizeString(logger, name) || strNotSpecified;\r\n _this.properties = dataSanitizeProperties(logger, properties);\r\n _this.measurements = dataSanitizeMeasurements(logger, measurements);\r\n return _this;\r\n }\r\n Event.envelopeType = \"Microsoft.ApplicationInsights.{0}.Event\";\r\n Event.dataType = \"EventData\";\r\n return Event;\r\n}(EventData));\r\nexport { Event };\r\n//# sourceMappingURL=Event.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"}
1
+ {"version":3,"file":"Event.js.map","sources":["Event.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { dataSanitizeString, dataSanitizeProperties, dataSanitizeMeasurements } from \"./Common/DataSanitizer\";\r\nimport { strNotSpecified } from \"../Constants\";\r\nvar Event = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of the EventTelemetry object\r\n */\r\n function Event(logger, name, properties, measurements) {\r\n this.aiDataContract = {\r\n ver: 1 /* Required */,\r\n name: 1 /* Required */,\r\n properties: 0 /* Default */,\r\n measurements: 0 /* Default */\r\n };\r\n var _self = this;\r\n _self.ver = 2;\r\n _self.name = dataSanitizeString(logger, name) || strNotSpecified;\r\n _self.properties = dataSanitizeProperties(logger, properties);\r\n _self.measurements = dataSanitizeMeasurements(logger, measurements);\r\n }\r\n Event.envelopeType = \"Microsoft.ApplicationInsights.{0}.Event\";\r\n Event.dataType = \"EventData\";\r\n return Event;\r\n}());\r\nexport { Event };\r\n//# sourceMappingURL=Event.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"}
@@ -1,13 +1,10 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Common, 2.8.0-beta.2203-16
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-05
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
6
6
 
7
- import { __assignFn as __assign, __extendsFn as __extends } from "@microsoft/applicationinsights-shims";
8
- import { StackFrame } from "../Interfaces/Contracts/Generated/StackFrame";
9
- import { ExceptionData } from "../Interfaces/Contracts/Generated/ExceptionData";
10
- import { ExceptionDetails } from "../Interfaces/Contracts/Generated/ExceptionDetails";
7
+ import { __assignFn as __assign } from "@microsoft/applicationinsights-shims";
11
8
  import { dataSanitizeException, dataSanitizeMeasurements, dataSanitizeMessage, dataSanitizeProperties, dataSanitizeString } from "./Common/DataSanitizer";
12
9
  import { isNullOrUndefined, arrMap, isString, strTrim, isArray, isError, arrForEach, isObject, isFunction } from "@microsoft/applicationinsights-core-js";
13
10
  import { strNotSpecified } from "../Constants";
@@ -279,54 +276,52 @@ export function _formatErrorCode(errorObj) {
279
276
  // Fallback to just letting the object format itself into a string
280
277
  return "" + (errorObj || "");
281
278
  }
282
- var Exception = /** @class */ (function (_super) {
283
- __extends(Exception, _super);
279
+ var Exception = /** @class */ (function () {
284
280
  /**
285
281
  * Constructs a new instance of the ExceptionTelemetry object
286
282
  */
287
283
  function Exception(logger, exception, properties, measurements, severityLevel, id) {
288
- var _this = _super.call(this) || this;
289
- _this.aiDataContract = {
284
+ this.aiDataContract = {
290
285
  ver: 1 /* Required */,
291
286
  exceptions: 1 /* Required */,
292
287
  severityLevel: 0 /* Default */,
293
288
  properties: 0 /* Default */,
294
289
  measurements: 0 /* Default */
295
290
  };
291
+ var _self = this;
292
+ _self.ver = 2; // TODO: handle the CS"4.0" ==> breeze 2 conversion in a better way
296
293
  if (!_isExceptionInternal(exception)) {
297
294
  if (!properties) {
298
295
  properties = {};
299
296
  }
300
- _this.exceptions = [new _ExceptionDetails(logger, exception, properties)];
301
- _this.properties = dataSanitizeProperties(logger, properties);
302
- _this.measurements = dataSanitizeMeasurements(logger, measurements);
297
+ _self.exceptions = [new _ExceptionDetails(logger, exception, properties)];
298
+ _self.properties = dataSanitizeProperties(logger, properties);
299
+ _self.measurements = dataSanitizeMeasurements(logger, measurements);
303
300
  if (severityLevel) {
304
- _this.severityLevel = severityLevel;
301
+ _self.severityLevel = severityLevel;
305
302
  }
306
303
  if (id) {
307
- _this.id = id;
304
+ _self.id = id;
308
305
  }
309
306
  }
310
307
  else {
311
- _this.exceptions = exception.exceptions;
312
- _this.properties = exception.properties;
313
- _this.measurements = exception.measurements;
308
+ _self.exceptions = exception.exceptions || [];
309
+ _self.properties = exception.properties;
310
+ _self.measurements = exception.measurements;
314
311
  if (exception.severityLevel) {
315
- _this.severityLevel = exception.severityLevel;
312
+ _self.severityLevel = exception.severityLevel;
316
313
  }
317
314
  if (exception.id) {
318
- _this.id = exception.id;
315
+ _self.id = exception.id;
319
316
  }
320
317
  if (exception.problemGroup) {
321
- _this.problemGroup = exception.problemGroup;
318
+ _self.problemGroup = exception.problemGroup;
322
319
  }
323
320
  // bool/int types, use isNullOrUndefined
324
- _this.ver = 2; // TODO: handle the CS"4.0" ==> breeze 2 conversion in a better way
325
321
  if (!isNullOrUndefined(exception.isManual)) {
326
- _this.isManual = exception.isManual;
322
+ _self.isManual = exception.isManual;
327
323
  }
328
324
  }
329
- return _this;
330
325
  }
331
326
  Exception.CreateAutoException = function (message, url, lineNumber, columnNumber, error, evt, stack, errorSrc) {
332
327
  var errorType = _getErrorType(error || evt || message);
@@ -383,13 +378,11 @@ var Exception = /** @class */ (function (_super) {
383
378
  Exception.dataType = "ExceptionData";
384
379
  Exception.formatError = _formatErrorCode;
385
380
  return Exception;
386
- }(ExceptionData));
381
+ }());
387
382
  export { Exception };
388
- var _ExceptionDetails = /** @class */ (function (_super) {
389
- __extends(_ExceptionDetails, _super);
383
+ var _ExceptionDetails = /** @class */ (function () {
390
384
  function _ExceptionDetails(logger, exception, properties) {
391
- var _this = _super.call(this) || this;
392
- _this.aiDataContract = {
385
+ this.aiDataContract = {
393
386
  id: 0 /* Default */,
394
387
  outerId: 0 /* Default */,
395
388
  typeName: 1 /* Required */,
@@ -398,41 +391,42 @@ var _ExceptionDetails = /** @class */ (function (_super) {
398
391
  stack: 0 /* Default */,
399
392
  parsedStack: 2 /* Array */
400
393
  };
394
+ var _self = this;
401
395
  if (!_isExceptionDetailsInternal(exception)) {
402
396
  var error = exception;
403
397
  var evt = error && error.evt;
404
398
  if (!isError(error)) {
405
399
  error = error[strError] || evt || error;
406
400
  }
407
- _this.typeName = dataSanitizeString(logger, _getErrorType(error)) || strNotSpecified;
408
- _this.message = dataSanitizeMessage(logger, _formatMessage(exception || error, _this.typeName)) || strNotSpecified;
401
+ _self.typeName = dataSanitizeString(logger, _getErrorType(error)) || strNotSpecified;
402
+ _self.message = dataSanitizeMessage(logger, _formatMessage(exception || error, _self.typeName)) || strNotSpecified;
409
403
  var stack = exception[strStackDetails] || _getStackFromErrorObj(exception);
410
- _this.parsedStack = _parseStack(stack);
411
- _this[strStack] = dataSanitizeException(logger, _formatStackTrace(stack));
412
- _this.hasFullStack = isArray(_this.parsedStack) && _this.parsedStack.length > 0;
404
+ _self.parsedStack = _parseStack(stack);
405
+ _self[strStack] = dataSanitizeException(logger, _formatStackTrace(stack));
406
+ _self.hasFullStack = isArray(_self.parsedStack) && _self.parsedStack.length > 0;
413
407
  if (properties) {
414
- properties.typeName = properties.typeName || _this.typeName;
408
+ properties.typeName = properties.typeName || _self.typeName;
415
409
  }
416
410
  }
417
411
  else {
418
- _this.typeName = exception.typeName;
419
- _this.message = exception.message;
420
- _this[strStack] = exception[strStack];
421
- _this.parsedStack = exception.parsedStack;
422
- _this.hasFullStack = exception.hasFullStack;
412
+ _self.typeName = exception.typeName;
413
+ _self.message = exception.message;
414
+ _self[strStack] = exception[strStack];
415
+ _self.parsedStack = exception.parsedStack || [];
416
+ _self.hasFullStack = exception.hasFullStack;
423
417
  }
424
- return _this;
425
418
  }
426
419
  _ExceptionDetails.prototype.toInterface = function () {
427
- var parsedStack = this.parsedStack instanceof Array
428
- && arrMap(this.parsedStack, function (frame) { return frame.toInterface(); });
420
+ var _self = this;
421
+ var parsedStack = _self.parsedStack instanceof Array
422
+ && arrMap(_self.parsedStack, function (frame) { return frame.toInterface(); });
429
423
  var exceptionDetailsInterface = {
430
- id: this.id,
431
- outerId: this.outerId,
432
- typeName: this.typeName,
433
- message: this.message,
434
- hasFullStack: this.hasFullStack,
435
- stack: this[strStack],
424
+ id: _self.id,
425
+ outerId: _self.outerId,
426
+ typeName: _self.typeName,
427
+ message: _self.message,
428
+ hasFullStack: _self.hasFullStack,
429
+ stack: _self[strStack],
436
430
  parsedStack: parsedStack || undefined
437
431
  };
438
432
  return exceptionDetailsInterface;
@@ -445,63 +439,62 @@ var _ExceptionDetails = /** @class */ (function (_super) {
445
439
  return exceptionDetails;
446
440
  };
447
441
  return _ExceptionDetails;
448
- }(ExceptionDetails));
442
+ }());
449
443
  export { _ExceptionDetails };
450
- var _StackFrame = /** @class */ (function (_super) {
451
- __extends(_StackFrame, _super);
444
+ var _StackFrame = /** @class */ (function () {
452
445
  function _StackFrame(sourceFrame, level) {
453
- var _this = _super.call(this) || this;
454
- _this.sizeInBytes = 0;
455
- _this.aiDataContract = {
446
+ this.aiDataContract = {
456
447
  level: 1 /* Required */,
457
448
  method: 1 /* Required */,
458
449
  assembly: 0 /* Default */,
459
450
  fileName: 0 /* Default */,
460
451
  line: 0 /* Default */
461
452
  };
453
+ var _self = this;
454
+ _self.sizeInBytes = 0;
462
455
  // Not converting this to isString() as typescript uses this logic to "understand" the different
463
456
  // types for the 2 different code paths
464
457
  if (typeof sourceFrame === "string") {
465
458
  var frame = sourceFrame;
466
- _this.level = level;
467
- _this.method = NoMethod;
468
- _this.assembly = strTrim(frame);
469
- _this.fileName = "";
470
- _this.line = 0;
459
+ _self.level = level;
460
+ _self.method = NoMethod;
461
+ _self.assembly = strTrim(frame);
462
+ _self.fileName = "";
463
+ _self.line = 0;
471
464
  var matches = frame.match(_StackFrame.regex);
472
465
  if (matches && matches.length >= 5) {
473
- _this.method = strTrim(matches[2]) || _this.method;
474
- _this.fileName = strTrim(matches[4]);
475
- _this.line = parseInt(matches[5]) || 0;
466
+ _self.method = strTrim(matches[2]) || _self.method;
467
+ _self.fileName = strTrim(matches[4]);
468
+ _self.line = parseInt(matches[5]) || 0;
476
469
  }
477
470
  }
478
471
  else {
479
- _this.level = sourceFrame.level;
480
- _this.method = sourceFrame.method;
481
- _this.assembly = sourceFrame.assembly;
482
- _this.fileName = sourceFrame.fileName;
483
- _this.line = sourceFrame.line;
484
- _this.sizeInBytes = 0;
472
+ _self.level = sourceFrame.level;
473
+ _self.method = sourceFrame.method;
474
+ _self.assembly = sourceFrame.assembly;
475
+ _self.fileName = sourceFrame.fileName;
476
+ _self.line = sourceFrame.line;
477
+ _self.sizeInBytes = 0;
485
478
  }
486
- _this.sizeInBytes += _this.method.length;
487
- _this.sizeInBytes += _this.fileName.length;
488
- _this.sizeInBytes += _this.assembly.length;
479
+ _self.sizeInBytes += _self.method.length;
480
+ _self.sizeInBytes += _self.fileName.length;
481
+ _self.sizeInBytes += _self.assembly.length;
489
482
  // todo: these might need to be removed depending on how the back-end settles on their size calculation
490
- _this.sizeInBytes += _StackFrame.baseSize;
491
- _this.sizeInBytes += _this.level.toString().length;
492
- _this.sizeInBytes += _this.line.toString().length;
493
- return _this;
483
+ _self.sizeInBytes += _StackFrame.baseSize;
484
+ _self.sizeInBytes += _self.level.toString().length;
485
+ _self.sizeInBytes += _self.line.toString().length;
494
486
  }
495
487
  _StackFrame.CreateFromInterface = function (frame) {
496
488
  return new _StackFrame(frame, null /* level is available in frame interface */);
497
489
  };
498
490
  _StackFrame.prototype.toInterface = function () {
491
+ var _self = this;
499
492
  return {
500
- level: this.level,
501
- method: this.method,
502
- assembly: this.assembly,
503
- fileName: this.fileName,
504
- line: this.line
493
+ level: _self.level,
494
+ method: _self.method,
495
+ assembly: _self.assembly,
496
+ fileName: _self.fileName,
497
+ line: _self.line
505
498
  };
506
499
  };
507
500
  // regex to match stack frames from ie/chrome/ff
@@ -509,6 +502,6 @@ var _StackFrame = /** @class */ (function (_super) {
509
502
  _StackFrame.regex = /^([\s]+at)?[\s]{0,50}([^\@\()]+?)[\s]{0,50}(\@|\()([^\(\n]+):([0-9]+):([0-9]+)(\)?)$/;
510
503
  _StackFrame.baseSize = 58; // '{"method":"","level":,"assembly":"","fileName":"","line":}'.length
511
504
  return _StackFrame;
512
- }(StackFrame));
505
+ }());
513
506
  export { _StackFrame };
514
507
  //# sourceMappingURL=Exception.js.map