@microsoft/applicationinsights-common 2.8.5-nightly.2206-04 → 2.8.5-nightly.2206-06
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/applicationinsights-common.integrity.json +9 -9
- package/browser/applicationinsights-common.js +619 -530
- package/browser/applicationinsights-common.js.map +1 -1
- package/browser/applicationinsights-common.min.js +2 -2
- package/browser/applicationinsights-common.min.js.map +1 -1
- package/dist/applicationinsights-common.api.json +293 -106
- package/dist/applicationinsights-common.api.md +15 -4
- package/dist/applicationinsights-common.d.ts +15 -5
- package/dist/applicationinsights-common.js +619 -530
- package/dist/applicationinsights-common.js.map +1 -1
- package/dist/applicationinsights-common.min.js +2 -2
- package/dist/applicationinsights-common.min.js.map +1 -1
- package/dist/applicationinsights-common.rollup.d.ts +15 -5
- package/dist-esm/ConnectionStringParser.js +10 -9
- package/dist-esm/ConnectionStringParser.js.map +1 -1
- package/dist-esm/Constants.js +2 -1
- package/dist-esm/Constants.js.map +1 -1
- package/dist-esm/DomHelperFuncs.js +1 -1
- package/dist-esm/Enums.js +1 -1
- package/dist-esm/HelperFuncs.js +7 -6
- package/dist-esm/HelperFuncs.js.map +1 -1
- package/dist-esm/Interfaces/ConnectionString.js +1 -1
- package/dist-esm/Interfaces/Context/IApplication.js +1 -1
- package/dist-esm/Interfaces/Context/IDevice.js +1 -1
- package/dist-esm/Interfaces/Context/IInternal.js +1 -1
- package/dist-esm/Interfaces/Context/ILocation.js +1 -1
- package/dist-esm/Interfaces/Context/IOperatingSystem.js +1 -1
- package/dist-esm/Interfaces/Context/ISample.js +1 -1
- package/dist-esm/Interfaces/Context/ISession.js +1 -1
- package/dist-esm/Interfaces/Context/ITelemetryTrace.js +1 -1
- package/dist-esm/Interfaces/Context/IUser.js +1 -1
- package/dist-esm/Interfaces/Context/IWeb.js +1 -1
- package/dist-esm/Interfaces/Contracts/AvailabilityData.js +1 -1
- package/dist-esm/Interfaces/Contracts/ContextTagKeys.js +1 -1
- package/dist-esm/Interfaces/Contracts/DataPointType.js +1 -1
- package/dist-esm/Interfaces/Contracts/DependencyKind.js +1 -1
- package/dist-esm/Interfaces/Contracts/DependencySourceType.js +1 -1
- package/dist-esm/Interfaces/Contracts/IBase.js +1 -1
- package/dist-esm/Interfaces/Contracts/IData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IDataPoint.js +1 -1
- package/dist-esm/Interfaces/Contracts/IDomain.js +1 -1
- package/dist-esm/Interfaces/Contracts/IEnvelope.js +1 -1
- package/dist-esm/Interfaces/Contracts/IEventData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IExceptionData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IExceptionDetails.js +1 -1
- package/dist-esm/Interfaces/Contracts/IMessageData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IMetricData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IPageViewData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IPageViewPerfData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IRemoteDependencyData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IStackFrame.js +1 -1
- package/dist-esm/Interfaces/Contracts/RequestData.js +1 -1
- package/dist-esm/Interfaces/Contracts/SeverityLevel.js +1 -1
- package/dist-esm/Interfaces/IAppInsights.js +1 -1
- package/dist-esm/Interfaces/IChannelControlsAI.js +1 -1
- package/dist-esm/Interfaces/IConfig.js +4 -3
- package/dist-esm/Interfaces/IConfig.js.map +1 -1
- package/dist-esm/Interfaces/ICorrelationConfig.js +1 -1
- package/dist-esm/Interfaces/IDependencyTelemetry.js +1 -1
- package/dist-esm/Interfaces/IEventTelemetry.js +1 -1
- package/dist-esm/Interfaces/IExceptionTelemetry.js +1 -1
- package/dist-esm/Interfaces/IMetricTelemetry.js +1 -1
- package/dist-esm/Interfaces/IPageViewPerformanceTelemetry.js +1 -1
- package/dist-esm/Interfaces/IPageViewTelemetry.js +1 -1
- package/dist-esm/Interfaces/IPartC.js +1 -1
- package/dist-esm/Interfaces/IPropertiesPlugin.js +1 -1
- package/dist-esm/Interfaces/IRequestContext.js +1 -1
- package/dist-esm/Interfaces/ITelemetryContext.js +1 -1
- package/dist-esm/Interfaces/ITraceTelemetry.js +1 -1
- package/dist-esm/Interfaces/PartAExtensions.js +1 -1
- package/dist-esm/Interfaces/Telemetry/IEnvelope.js +1 -1
- package/dist-esm/Interfaces/Telemetry/ISerializable.js +1 -1
- package/dist-esm/RequestResponseHeaders.js +1 -1
- package/dist-esm/StorageHelperFuncs.js +7 -6
- package/dist-esm/StorageHelperFuncs.js.map +1 -1
- package/dist-esm/Telemetry/Common/Data.js +1 -1
- package/dist-esm/Telemetry/Common/DataPoint.js +1 -1
- package/dist-esm/Telemetry/Common/DataSanitizer.js +43 -40
- package/dist-esm/Telemetry/Common/DataSanitizer.js.map +1 -1
- package/dist-esm/Telemetry/Common/Envelope.js +4 -3
- package/dist-esm/Telemetry/Common/Envelope.js.map +1 -1
- package/dist-esm/Telemetry/Event.js +6 -5
- package/dist-esm/Telemetry/Event.js.map +1 -1
- package/dist-esm/Telemetry/Exception.js +122 -115
- package/dist-esm/Telemetry/Exception.js.map +1 -1
- package/dist-esm/Telemetry/Metric.js +7 -6
- package/dist-esm/Telemetry/Metric.js.map +1 -1
- package/dist-esm/Telemetry/PageView.js +8 -7
- package/dist-esm/Telemetry/PageView.js.map +1 -1
- package/dist-esm/Telemetry/PageViewPerformance.js +8 -7
- package/dist-esm/Telemetry/PageViewPerformance.js.map +1 -1
- package/dist-esm/Telemetry/RemoteDependencyData.js +8 -7
- package/dist-esm/Telemetry/RemoteDependencyData.js.map +1 -1
- package/dist-esm/Telemetry/Trace.js +7 -6
- package/dist-esm/Telemetry/Trace.js.map +1 -1
- package/dist-esm/TelemetryItemCreator.js +16 -13
- package/dist-esm/TelemetryItemCreator.js.map +1 -1
- package/dist-esm/UrlHelperFuncs.js +8 -7
- package/dist-esm/UrlHelperFuncs.js.map +1 -1
- package/dist-esm/Util.js +30 -29
- package/dist-esm/Util.js.map +1 -1
- package/dist-esm/__DynamicConstants.js +50 -0
- package/dist-esm/__DynamicConstants.js.map +1 -0
- package/dist-esm/applicationinsights-common.js +2 -2
- package/dist-esm/applicationinsights-common.js.map +1 -1
- package/package.json +6 -3
- package/src/ConnectionStringParser.ts +8 -10
- package/src/Constants.ts +1 -0
- package/src/HelperFuncs.ts +6 -6
- package/src/Interfaces/IConfig.ts +7 -7
- package/src/StorageHelperFuncs.ts +10 -7
- package/src/Telemetry/Common/DataPoint.ts +3 -3
- package/src/Telemetry/Common/DataSanitizer.ts +8 -6
- package/src/Telemetry/Common/Envelope.ts +11 -11
- package/src/Telemetry/Event.ts +11 -11
- package/src/Telemetry/Exception.ts +21 -17
- package/src/Telemetry/Metric.ts +12 -12
- package/src/Telemetry/PageView.ts +14 -12
- package/src/Telemetry/PageViewPerformance.ts +12 -13
- package/src/Telemetry/RemoteDependencyData.ts +12 -12
- package/src/Telemetry/Trace.ts +12 -12
- package/src/TelemetryItemCreator.ts +10 -9
- package/src/UrlHelperFuncs.ts +6 -6
- package/src/Util.ts +26 -28
- package/src/__DynamicConstants.ts +48 -0
- package/src/applicationinsights-common.ts +1 -1
- package/types/Constants.d.ts +1 -0
- package/types/Telemetry/Common/DataPoint.d.ts +2 -2
- package/types/Telemetry/Common/DataSanitizer.d.ts +5 -4
- package/types/Telemetry/Common/Envelope.d.ts +1 -1
- package/types/Telemetry/Event.d.ts +2 -2
- package/types/Telemetry/Exception.d.ts +5 -5
- package/types/Telemetry/Metric.d.ts +2 -2
- package/types/Telemetry/PageView.d.ts +2 -2
- package/types/Telemetry/PageViewPerformance.d.ts +3 -3
- package/types/Telemetry/RemoteDependencyData.d.ts +2 -2
- package/types/Telemetry/Trace.d.ts +3 -3
- package/types/TelemetryItemCreator.d.ts +1 -1
- package/types/Util.d.ts +2 -2
- package/types/__DynamicConstants.d.ts +36 -0
- package/types/applicationinsights-common.d.ts +1 -1
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights Common JavaScript Library, 2.8.5-nightly.2206-
|
|
2
|
+
* Microsoft Application Insights Common JavaScript Library, 2.8.5-nightly.2206-06
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -253,6 +253,8 @@ export declare function dateTimeUtilsNow(): number;
|
|
|
253
253
|
|
|
254
254
|
export declare const DEFAULT_BREEZE_ENDPOINT = "https://dc.services.visualstudio.com";
|
|
255
255
|
|
|
256
|
+
export declare const DEFAULT_BREEZE_PATH = "/v2/track";
|
|
257
|
+
|
|
256
258
|
/**
|
|
257
259
|
* This is an internal property used to cause internal (reporting) requests to be ignored from reporting
|
|
258
260
|
* additional telemetry, to handle polyfil implementations ALL urls used with a disabled request will
|
|
@@ -268,6 +270,14 @@ export declare type DistributedTracingModes = number | eDistributedTracingModes;
|
|
|
268
270
|
|
|
269
271
|
export declare function dsPadNumber(num: number): string;
|
|
270
272
|
|
|
273
|
+
declare const _DYN_SANITIZE_EXCEPTION = "sanitizeException";
|
|
274
|
+
|
|
275
|
+
declare const _DYN_SANITIZE_KEY_AND_ADD2 = "sanitizeKeyAndAddUniqueness";
|
|
276
|
+
|
|
277
|
+
declare const _DYN_SANITIZE_MEASUREMENT3 = "sanitizeMeasurements";
|
|
278
|
+
|
|
279
|
+
declare const _DYN_SANITIZE_PROPERTIES = "sanitizeProperties";
|
|
280
|
+
|
|
271
281
|
export declare const enum eDistributedTracingModes {
|
|
272
282
|
/**
|
|
273
283
|
* (Default) Send Application Insights correlation headers
|
|
@@ -1192,14 +1202,14 @@ export declare interface IDataSanitizer {
|
|
|
1192
1202
|
* Max length allowed for exceptions.
|
|
1193
1203
|
*/
|
|
1194
1204
|
MAX_EXCEPTION_LENGTH: number;
|
|
1195
|
-
|
|
1205
|
+
[_DYN_SANITIZE_KEY_AND_ADD2]: (logger: IDiagnosticLogger, key: any, map: any) => string;
|
|
1196
1206
|
sanitizeKey: (logger: IDiagnosticLogger, name: any) => string;
|
|
1197
1207
|
sanitizeString: (logger: IDiagnosticLogger, value: any, maxLength?: number) => string;
|
|
1198
1208
|
sanitizeUrl: (logger: IDiagnosticLogger, url: any) => string;
|
|
1199
1209
|
sanitizeMessage: (logger: IDiagnosticLogger, message: any) => string;
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1210
|
+
[_DYN_SANITIZE_EXCEPTION]: (logger: IDiagnosticLogger, exception: any) => string;
|
|
1211
|
+
[_DYN_SANITIZE_PROPERTIES]: (logger: IDiagnosticLogger, properties: any) => any;
|
|
1212
|
+
[_DYN_SANITIZE_MEASUREMENT3]: (logger: IDiagnosticLogger, measurements: any) => any;
|
|
1203
1213
|
sanitizeId: (logger: IDiagnosticLogger, id: string) => string;
|
|
1204
1214
|
sanitizeInput: (logger: IDiagnosticLogger, input: any, maxLength: number, _msgId: _eInternalMessageId) => any;
|
|
1205
1215
|
padNumber: (num: number) => string;
|
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Common, 2.8.5-nightly.2206-
|
|
2
|
+
* Application Insights JavaScript SDK - Common, 2.8.5-nightly.2206-06
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
import { DEFAULT_BREEZE_ENDPOINT } from "./Constants";
|
|
8
7
|
import { arrReduce, objKeys } from "@microsoft/applicationinsights-core-js";
|
|
8
|
+
import { DEFAULT_BREEZE_ENDPOINT } from "./Constants";
|
|
9
|
+
import { _DYN_INGESTIONENDPOINT, _DYN_LENGTH, _DYN_SPLIT, _DYN_TO_LOWER_CASE } from "./__DynamicConstants";
|
|
9
10
|
var _FIELDS_SEPARATOR = ";";
|
|
10
11
|
var _FIELD_KEY_VALUE_SEPARATOR = "=";
|
|
11
12
|
export function parseConnectionString(connectionString) {
|
|
12
13
|
if (!connectionString) {
|
|
13
14
|
return {};
|
|
14
15
|
}
|
|
15
|
-
var kvPairs = connectionString
|
|
16
|
+
var kvPairs = connectionString[_DYN_SPLIT /* @min:%2esplit */](_FIELDS_SEPARATOR);
|
|
16
17
|
var result = arrReduce(kvPairs, function (fields, kv) {
|
|
17
|
-
var kvParts = kv
|
|
18
|
-
if (kvParts
|
|
19
|
-
var key = kvParts[0]
|
|
18
|
+
var kvParts = kv[_DYN_SPLIT /* @min:%2esplit */](_FIELD_KEY_VALUE_SEPARATOR);
|
|
19
|
+
if (kvParts[_DYN_LENGTH /* @min:%2elength */] === 2) { // only save fields with valid formats
|
|
20
|
+
var key = kvParts[0][_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();
|
|
20
21
|
var value = kvParts[1];
|
|
21
22
|
fields[key] = value;
|
|
22
23
|
}
|
|
23
24
|
return fields;
|
|
24
25
|
}, {});
|
|
25
|
-
if (objKeys(result)
|
|
26
|
+
if (objKeys(result)[_DYN_LENGTH /* @min:%2elength */] > 0) {
|
|
26
27
|
// this is a valid connection string, so parse the results
|
|
27
28
|
if (result.endpointsuffix) {
|
|
28
29
|
// use endpoint suffix where overrides are not provided
|
|
29
30
|
var locationPrefix = result.location ? result.location + "." : "";
|
|
30
|
-
result
|
|
31
|
+
result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */] = result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */] || ("https://" + locationPrefix + "dc." + result.endpointsuffix);
|
|
31
32
|
}
|
|
32
33
|
// apply the default endpoints
|
|
33
|
-
result
|
|
34
|
+
result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */] = result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */] || DEFAULT_BREEZE_ENDPOINT;
|
|
34
35
|
}
|
|
35
36
|
return result;
|
|
36
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionStringParser.js.map","sources":["ConnectionStringParser.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { DEFAULT_BREEZE_ENDPOINT } from \"./Constants\";\r\nimport {
|
|
1
|
+
{"version":3,"file":"ConnectionStringParser.js.map","sources":["ConnectionStringParser.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { arrReduce, objKeys } from \"@microsoft/applicationinsights-core-js\";\r\nimport { DEFAULT_BREEZE_ENDPOINT } from \"./Constants\";\r\nimport { _DYN_INGESTIONENDPOINT, _DYN_LENGTH, _DYN_SPLIT, _DYN_TO_LOWER_CASE } from \"./__DynamicConstants\";\r\nvar _FIELDS_SEPARATOR = \";\";\r\nvar _FIELD_KEY_VALUE_SEPARATOR = \"=\";\r\nexport function parseConnectionString(connectionString) {\r\n if (!connectionString) {\r\n return {};\r\n }\r\n var kvPairs = connectionString[_DYN_SPLIT /* @min:%2esplit */](_FIELDS_SEPARATOR);\r\n var result = arrReduce(kvPairs, function (fields, kv) {\r\n var kvParts = kv[_DYN_SPLIT /* @min:%2esplit */](_FIELD_KEY_VALUE_SEPARATOR);\r\n if (kvParts[_DYN_LENGTH /* @min:%2elength */] === 2) { // only save fields with valid formats\r\n var key = kvParts[0][_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();\r\n var value = kvParts[1];\r\n fields[key] = value;\r\n }\r\n return fields;\r\n }, {});\r\n if (objKeys(result)[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n // this is a valid connection string, so parse the results\r\n if (result.endpointsuffix) {\r\n // use endpoint suffix where overrides are not provided\r\n var locationPrefix = result.location ? result.location + \".\" : \"\";\r\n result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */] = result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */] || (\"https://\" + locationPrefix + \"dc.\" + result.endpointsuffix);\r\n }\r\n // apply the default endpoints\r\n result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */] = result[_DYN_INGESTIONENDPOINT /* @min:%2eingestionendpoint */] || DEFAULT_BREEZE_ENDPOINT;\r\n }\r\n return result;\r\n}\r\nexport var ConnectionStringParser = {\r\n parse: parseConnectionString\r\n};\r\n//# sourceMappingURL=ConnectionStringParser.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"}
|
package/dist-esm/Constants.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Common, 2.8.5-nightly.2206-
|
|
2
|
+
* Application Insights JavaScript SDK - Common, 2.8.5-nightly.2206-06
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -16,6 +16,7 @@ export var SampleRate = "sampleRate";
|
|
|
16
16
|
export var ProcessLegacy = "ProcessLegacy";
|
|
17
17
|
export var HttpMethod = "http.method";
|
|
18
18
|
export var DEFAULT_BREEZE_ENDPOINT = "https://dc.services.visualstudio.com";
|
|
19
|
+
export var DEFAULT_BREEZE_PATH = "/v2/track";
|
|
19
20
|
export var strNotSpecified = "not_specified";
|
|
20
21
|
export var strIkey = "iKey";
|
|
21
22
|
//# sourceMappingURL=Constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Constants.js.map","sources":["Constants.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n/**\r\n * This is an internal property used to cause internal (reporting) requests to be ignored from reporting\r\n * additional telemetry, to handle polyfil implementations ALL urls used with a disabled request will\r\n * also be ignored for future requests even when this property is not provided.\r\n * Tagging as Ignore as this is an internal value and is not expected to be used outside of the SDK\r\n * @ignore\r\n */\r\nexport var DisabledPropertyName = \"Microsoft_ApplicationInsights_BypassAjaxInstrumentation\";\r\nexport var SampleRate = \"sampleRate\";\r\nexport var ProcessLegacy = \"ProcessLegacy\";\r\nexport var HttpMethod = \"http.method\";\r\nexport var DEFAULT_BREEZE_ENDPOINT = \"https://dc.services.visualstudio.com\";\r\nexport var strNotSpecified = \"not_specified\";\r\nexport var strIkey = \"iKey\";\r\n//# sourceMappingURL=Constants.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
|
|
1
|
+
{"version":3,"file":"Constants.js.map","sources":["Constants.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n/**\r\n * This is an internal property used to cause internal (reporting) requests to be ignored from reporting\r\n * additional telemetry, to handle polyfil implementations ALL urls used with a disabled request will\r\n * also be ignored for future requests even when this property is not provided.\r\n * Tagging as Ignore as this is an internal value and is not expected to be used outside of the SDK\r\n * @ignore\r\n */\r\nexport var DisabledPropertyName = \"Microsoft_ApplicationInsights_BypassAjaxInstrumentation\";\r\nexport var SampleRate = \"sampleRate\";\r\nexport var ProcessLegacy = \"ProcessLegacy\";\r\nexport var HttpMethod = \"http.method\";\r\nexport var DEFAULT_BREEZE_ENDPOINT = \"https://dc.services.visualstudio.com\";\r\nexport var DEFAULT_BREEZE_PATH = \"/v2/track\";\r\nexport var strNotSpecified = \"not_specified\";\r\nexport var strIkey = \"iKey\";\r\n//# sourceMappingURL=Constants.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
|
package/dist-esm/Enums.js
CHANGED
package/dist-esm/HelperFuncs.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Common, 2.8.5-nightly.2206-
|
|
2
|
+
* Application Insights JavaScript SDK - Common, 2.8.5-nightly.2206-06
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
import { arrForEach, isString } from "@microsoft/applicationinsights-core-js";
|
|
8
|
+
import { _DYN_LENGTH, _DYN_TO_LOWER_CASE } from "./__DynamicConstants";
|
|
8
9
|
var strEmpty = "";
|
|
9
10
|
export function stringToBoolOrDefault(str, defaultValue) {
|
|
10
11
|
if (defaultValue === void 0) { defaultValue = false; }
|
|
11
12
|
if (str === undefined || str === null) {
|
|
12
13
|
return defaultValue;
|
|
13
14
|
}
|
|
14
|
-
return str.toString()
|
|
15
|
+
return str.toString()[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]() === "true";
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
18
|
* Convert ms to c# time span format
|
|
@@ -26,10 +27,10 @@ export function msToTimeSpan(totalms) {
|
|
|
26
27
|
var min = strEmpty + Math.floor(totalms / (1000 * 60)) % 60;
|
|
27
28
|
var hour = strEmpty + Math.floor(totalms / (1000 * 60 * 60)) % 24;
|
|
28
29
|
var days = Math.floor(totalms / (1000 * 60 * 60 * 24));
|
|
29
|
-
ms = ms
|
|
30
|
-
sec = sec
|
|
31
|
-
min = min
|
|
32
|
-
hour = hour
|
|
30
|
+
ms = ms[_DYN_LENGTH /* @min:%2elength */] === 1 ? "00" + ms : ms[_DYN_LENGTH /* @min:%2elength */] === 2 ? "0" + ms : ms;
|
|
31
|
+
sec = sec[_DYN_LENGTH /* @min:%2elength */] < 2 ? "0" + sec : sec;
|
|
32
|
+
min = min[_DYN_LENGTH /* @min:%2elength */] < 2 ? "0" + min : min;
|
|
33
|
+
hour = hour[_DYN_LENGTH /* @min:%2elength */] < 2 ? "0" + hour : hour;
|
|
33
34
|
return (days > 0 ? days + "." : strEmpty) + hour + ":" + min + ":" + sec + "." + ms;
|
|
34
35
|
}
|
|
35
36
|
export function getExtensionByName(extensions, identifier) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HelperFuncs.js.map","sources":["HelperFuncs.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { arrForEach, isString } from \"@microsoft/applicationinsights-core-js\";\r\nvar strEmpty = \"\";\r\nexport function stringToBoolOrDefault(str, defaultValue) {\r\n if (defaultValue === void 0) { defaultValue = false; }\r\n if (str === undefined || str === null) {\r\n return defaultValue;\r\n }\r\n return str.toString()
|
|
1
|
+
{"version":3,"file":"HelperFuncs.js.map","sources":["HelperFuncs.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { arrForEach, isString } from \"@microsoft/applicationinsights-core-js\";\r\nimport { _DYN_LENGTH, _DYN_TO_LOWER_CASE } from \"./__DynamicConstants\";\r\nvar strEmpty = \"\";\r\nexport function stringToBoolOrDefault(str, defaultValue) {\r\n if (defaultValue === void 0) { defaultValue = false; }\r\n if (str === undefined || str === null) {\r\n return defaultValue;\r\n }\r\n return str.toString()[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]() === \"true\";\r\n}\r\n/**\r\n * Convert ms to c# time span format\r\n */\r\nexport function msToTimeSpan(totalms) {\r\n if (isNaN(totalms) || totalms < 0) {\r\n totalms = 0;\r\n }\r\n totalms = Math.round(totalms);\r\n var ms = strEmpty + totalms % 1000;\r\n var sec = strEmpty + Math.floor(totalms / 1000) % 60;\r\n var min = strEmpty + Math.floor(totalms / (1000 * 60)) % 60;\r\n var hour = strEmpty + Math.floor(totalms / (1000 * 60 * 60)) % 24;\r\n var days = Math.floor(totalms / (1000 * 60 * 60 * 24));\r\n ms = ms[_DYN_LENGTH /* @min:%2elength */] === 1 ? \"00\" + ms : ms[_DYN_LENGTH /* @min:%2elength */] === 2 ? \"0\" + ms : ms;\r\n sec = sec[_DYN_LENGTH /* @min:%2elength */] < 2 ? \"0\" + sec : sec;\r\n min = min[_DYN_LENGTH /* @min:%2elength */] < 2 ? \"0\" + min : min;\r\n hour = hour[_DYN_LENGTH /* @min:%2elength */] < 2 ? \"0\" + hour : hour;\r\n return (days > 0 ? days + \".\" : strEmpty) + hour + \":\" + min + \":\" + sec + \".\" + ms;\r\n}\r\nexport function getExtensionByName(extensions, identifier) {\r\n var extension = null;\r\n arrForEach(extensions, function (value) {\r\n if (value.identifier === identifier) {\r\n extension = value;\r\n return -1;\r\n }\r\n });\r\n return extension;\r\n}\r\nexport function isCrossOriginError(message, url, lineNumber, columnNumber, error) {\r\n return !error && isString(message) && (message === \"Script error.\" || message === \"Script error\");\r\n}\r\n//# sourceMappingURL=HelperFuncs.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"}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Common, 2.8.5-nightly.2206-
|
|
2
|
+
* Application Insights JavaScript SDK - Common, 2.8.5-nightly.2206-06
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
import { isNullOrUndefined } from "@microsoft/applicationinsights-core-js";
|
|
8
|
+
import { _DYN_EXTENSION_CONFIG } from "../__DynamicConstants";
|
|
8
9
|
var ConfigurationManager = /** @class */ (function () {
|
|
9
10
|
function ConfigurationManager() {
|
|
10
11
|
}
|
|
11
12
|
ConfigurationManager.getConfig = function (config, field, identifier, defaultValue) {
|
|
12
13
|
if (defaultValue === void 0) { defaultValue = false; }
|
|
13
14
|
var configValue;
|
|
14
|
-
if (identifier && config
|
|
15
|
-
configValue = config
|
|
15
|
+
if (identifier && config[_DYN_EXTENSION_CONFIG /* @min:%2eextensionConfig */] && config[_DYN_EXTENSION_CONFIG /* @min:%2eextensionConfig */][identifier] && !isNullOrUndefined(config[_DYN_EXTENSION_CONFIG /* @min:%2eextensionConfig */][identifier][field])) {
|
|
16
|
+
configValue = config[_DYN_EXTENSION_CONFIG /* @min:%2eextensionConfig */][identifier][field];
|
|
16
17
|
}
|
|
17
18
|
else {
|
|
18
19
|
configValue = config[field];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IConfig.js.map","sources":["IConfig.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { isNullOrUndefined } from \"@microsoft/applicationinsights-core-js\";\r\nvar ConfigurationManager = /** @class */ (function () {\r\n function ConfigurationManager() {\r\n }\r\n ConfigurationManager.getConfig = function (config, field, identifier, defaultValue) {\r\n if (defaultValue === void 0) { defaultValue = false; }\r\n var configValue;\r\n if (identifier && config
|
|
1
|
+
{"version":3,"file":"IConfig.js.map","sources":["IConfig.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { isNullOrUndefined } from \"@microsoft/applicationinsights-core-js\";\r\nimport { _DYN_EXTENSION_CONFIG } from \"../__DynamicConstants\";\r\nvar ConfigurationManager = /** @class */ (function () {\r\n function ConfigurationManager() {\r\n }\r\n ConfigurationManager.getConfig = function (config, field, identifier, defaultValue) {\r\n if (defaultValue === void 0) { defaultValue = false; }\r\n var configValue;\r\n if (identifier && config[_DYN_EXTENSION_CONFIG /* @min:%2eextensionConfig */] && config[_DYN_EXTENSION_CONFIG /* @min:%2eextensionConfig */][identifier] && !isNullOrUndefined(config[_DYN_EXTENSION_CONFIG /* @min:%2eextensionConfig */][identifier][field])) {\r\n configValue = config[_DYN_EXTENSION_CONFIG /* @min:%2eextensionConfig */][identifier][field];\r\n }\r\n else {\r\n configValue = config[field];\r\n }\r\n return !isNullOrUndefined(configValue) ? configValue : defaultValue;\r\n };\r\n return ConfigurationManager;\r\n}());\r\nexport { ConfigurationManager };\r\n//# sourceMappingURL=IConfig.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"}
|