@microsoft/applicationinsights-common 2.8.8 → 2.8.9-nightly.2210-02
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 +6 -6
- 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.d.ts +1 -1
- package/dist/applicationinsights-common.js +6 -6
- 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 +1 -1
- package/dist-esm/ConnectionStringParser.js +1 -1
- package/dist-esm/Constants.js +1 -1
- package/dist-esm/DomHelperFuncs.js +1 -1
- package/dist-esm/Enums.js +1 -1
- package/dist-esm/HelperFuncs.js +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 +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 +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 +1 -1
- package/dist-esm/Telemetry/Common/Envelope.js +1 -1
- package/dist-esm/Telemetry/Event.js +1 -1
- package/dist-esm/Telemetry/Exception.js +1 -1
- package/dist-esm/Telemetry/Metric.js +1 -1
- package/dist-esm/Telemetry/PageView.js +1 -1
- package/dist-esm/Telemetry/PageViewPerformance.js +1 -1
- package/dist-esm/Telemetry/RemoteDependencyData.js +1 -1
- package/dist-esm/Telemetry/Trace.js +1 -1
- package/dist-esm/TelemetryItemCreator.js +1 -1
- package/dist-esm/UrlHelperFuncs.js +3 -3
- package/dist-esm/UrlHelperFuncs.js.map +1 -1
- package/dist-esm/Util.js +1 -1
- package/dist-esm/__DynamicConstants.js +1 -1
- package/dist-esm/applicationinsights-common.js +1 -1
- package/package.json +60 -57
- package/src/UrlHelperFuncs.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UrlHelperFuncs.js.map","sources":["UrlHelperFuncs.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { getDocument, isString } from \"@microsoft/applicationinsights-core-js\";\r\nimport { _DYN_LENGTH, _DYN_PATHNAME, _DYN_TO_LOWER_CASE } from \"./__DynamicConstants\";\r\nvar _document = getDocument() || {};\r\nvar _htmlAnchorIdx = 0;\r\n// Use an array of temporary values as it's possible for multiple calls to parseUrl() will be called with different URLs\r\n// Using a cache size of 5 for now as it current depth usage is at least 2, so adding a minor buffer to handle future updates\r\nvar _htmlAnchorElement = [null, null, null, null, null];\r\nexport function urlParseUrl(url) {\r\n var anchorIdx = _htmlAnchorIdx;\r\n var anchorCache = _htmlAnchorElement;\r\n var tempAnchor = anchorCache[anchorIdx];\r\n if (!_document.createElement) {\r\n // Always create the temp instance if createElement is not available\r\n tempAnchor = { host: urlParseHost(url, true) };\r\n }\r\n else if (!anchorCache[anchorIdx]) {\r\n // Create and cache the unattached anchor instance\r\n tempAnchor = anchorCache[anchorIdx] = _document.createElement(\"a\");\r\n }\r\n tempAnchor.href = url;\r\n // Move the cache index forward\r\n anchorIdx++;\r\n if (anchorIdx >= anchorCache[_DYN_LENGTH /* @min:%2elength */]) {\r\n anchorIdx = 0;\r\n }\r\n _htmlAnchorIdx = anchorIdx;\r\n return tempAnchor;\r\n}\r\nexport function urlGetAbsoluteUrl(url) {\r\n var result;\r\n var a = urlParseUrl(url);\r\n if (a) {\r\n result = a.href;\r\n }\r\n return result;\r\n}\r\nexport function urlGetPathName(url) {\r\n var result;\r\n var a = urlParseUrl(url);\r\n if (a) {\r\n result = a[_DYN_PATHNAME /* @min:%2epathname */];\r\n }\r\n return result;\r\n}\r\nexport function urlGetCompleteUrl(method, absoluteUrl) {\r\n if (method) {\r\n return method.toUpperCase() + \" \" + absoluteUrl;\r\n }\r\n return absoluteUrl;\r\n}\r\n// Fallback method to grab host from url if document.createElement method is not available\r\nexport function urlParseHost(url, inclPort) {\r\n var fullHost = urlParseFullHost(url, inclPort) || \"\";\r\n if (fullHost) {\r\n var match = fullHost.match(/(www
|
|
1
|
+
{"version":3,"file":"UrlHelperFuncs.js.map","sources":["UrlHelperFuncs.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { getDocument, isString } from \"@microsoft/applicationinsights-core-js\";\r\nimport { _DYN_LENGTH, _DYN_PATHNAME, _DYN_TO_LOWER_CASE } from \"./__DynamicConstants\";\r\nvar _document = getDocument() || {};\r\nvar _htmlAnchorIdx = 0;\r\n// Use an array of temporary values as it's possible for multiple calls to parseUrl() will be called with different URLs\r\n// Using a cache size of 5 for now as it current depth usage is at least 2, so adding a minor buffer to handle future updates\r\nvar _htmlAnchorElement = [null, null, null, null, null];\r\nexport function urlParseUrl(url) {\r\n var anchorIdx = _htmlAnchorIdx;\r\n var anchorCache = _htmlAnchorElement;\r\n var tempAnchor = anchorCache[anchorIdx];\r\n if (!_document.createElement) {\r\n // Always create the temp instance if createElement is not available\r\n tempAnchor = { host: urlParseHost(url, true) };\r\n }\r\n else if (!anchorCache[anchorIdx]) {\r\n // Create and cache the unattached anchor instance\r\n tempAnchor = anchorCache[anchorIdx] = _document.createElement(\"a\");\r\n }\r\n tempAnchor.href = url;\r\n // Move the cache index forward\r\n anchorIdx++;\r\n if (anchorIdx >= anchorCache[_DYN_LENGTH /* @min:%2elength */]) {\r\n anchorIdx = 0;\r\n }\r\n _htmlAnchorIdx = anchorIdx;\r\n return tempAnchor;\r\n}\r\nexport function urlGetAbsoluteUrl(url) {\r\n var result;\r\n var a = urlParseUrl(url);\r\n if (a) {\r\n result = a.href;\r\n }\r\n return result;\r\n}\r\nexport function urlGetPathName(url) {\r\n var result;\r\n var a = urlParseUrl(url);\r\n if (a) {\r\n result = a[_DYN_PATHNAME /* @min:%2epathname */];\r\n }\r\n return result;\r\n}\r\nexport function urlGetCompleteUrl(method, absoluteUrl) {\r\n if (method) {\r\n return method.toUpperCase() + \" \" + absoluteUrl;\r\n }\r\n return absoluteUrl;\r\n}\r\n// Fallback method to grab host from url if document.createElement method is not available\r\nexport function urlParseHost(url, inclPort) {\r\n var fullHost = urlParseFullHost(url, inclPort) || \"\";\r\n if (fullHost) {\r\n var match = fullHost.match(/(www\\d{0,5}\\.)?([^\\/:]{1,256})(:\\d{1,20})?/i);\r\n if (match != null && match[_DYN_LENGTH /* @min:%2elength */] > 3 && isString(match[2]) && match[2][_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n return match[2] + (match[3] || \"\");\r\n }\r\n }\r\n return fullHost;\r\n}\r\nexport function urlParseFullHost(url, inclPort) {\r\n var result = null;\r\n if (url) {\r\n var match = url.match(/(\\w{1,150}):\\/\\/([^\\/:]{1,256})(:\\d{1,20})?/i);\r\n if (match != null && match[_DYN_LENGTH /* @min:%2elength */] > 2 && isString(match[2]) && match[2][_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n result = match[2] || \"\";\r\n if (inclPort && match[_DYN_LENGTH /* @min:%2elength */] > 2) {\r\n var protocol = (match[1] || \"\")[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();\r\n var port = match[3] || \"\";\r\n // IE includes the standard port so pass it off if it's the same as the protocol\r\n if (protocol === \"http\" && port === \":80\") {\r\n port = \"\";\r\n }\r\n else if (protocol === \"https\" && port === \":443\") {\r\n port = \"\";\r\n }\r\n result += port;\r\n }\r\n }\r\n }\r\n return result;\r\n}\r\n//# sourceMappingURL=UrlHelperFuncs.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"}
|
package/dist-esm/Util.js
CHANGED
package/package.json
CHANGED
|
@@ -1,57 +1,60 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@microsoft/applicationinsights-common",
|
|
3
|
-
"version": "2.8.
|
|
4
|
-
"description": "Microsoft Application Insights Common JavaScript Library",
|
|
5
|
-
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
|
6
|
-
"author": "Microsoft Application Insights Team",
|
|
7
|
-
"main": "./dist/applicationinsights-common.js",
|
|
8
|
-
"module": "./dist-esm/applicationinsights-common.js",
|
|
9
|
-
"types": "./types/applicationinsights-common.d.ts",
|
|
10
|
-
"sideEffects": false,
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "https://github.com/microsoft/ApplicationInsights-JS/tree/master/shared/AppInsightsCommon"
|
|
14
|
-
},
|
|
15
|
-
"scripts": {
|
|
16
|
-
"build": "npm run build:esm && npm run build:browser && npm run sri && npm run dtsgen",
|
|
17
|
-
"build:esm": "grunt common",
|
|
18
|
-
"build:browser": "rollup -c",
|
|
19
|
-
"rebuild": "npm run build",
|
|
20
|
-
"test": "grunt commontest",
|
|
21
|
-
"mintest": "grunt common-mintest",
|
|
22
|
-
"lint": "tslint -p tsconfig.json",
|
|
23
|
-
"dtsgen": "api-extractor run --local && node ../../scripts/dtsgen.js \"Microsoft Application Insights Common JavaScript Library\"",
|
|
24
|
-
"sri": "node ../../tools/subResourceIntegrity/generateIntegrityFile.js",
|
|
25
|
-
"ai-min": "grunt common-min",
|
|
26
|
-
"ai-restore": "grunt common-restore"
|
|
27
|
-
},
|
|
28
|
-
"devDependencies": {
|
|
29
|
-
"@microsoft/ai-test-framework": "0.0.1",
|
|
30
|
-
"@microsoft/applicationinsights-rollup-plugin-uglify3-js": "1.0.0",
|
|
31
|
-
"@microsoft/applicationinsights-rollup-es3": "1.1.3",
|
|
32
|
-
"@microsoft/api-extractor": "^7.18.1",
|
|
33
|
-
"grunt": "^1.5.3",
|
|
34
|
-
"grunt-cli": "^1.4.3",
|
|
35
|
-
"grunt-contrib-qunit": "^5.0.1",
|
|
36
|
-
"@nevware21/grunt-ts-plugin": "^0.4.3",
|
|
37
|
-
"@nevware21/grunt-eslint-ts": "^0.2.2",
|
|
38
|
-
"@rollup/plugin-commonjs": "^18.0.0",
|
|
39
|
-
"@rollup/plugin-node-resolve": "^11.2.1",
|
|
40
|
-
"@rollup/plugin-replace": "^2.3.3",
|
|
41
|
-
"rollup-plugin-cleanup": "^3.2.1",
|
|
42
|
-
"rollup": "^2.32.0",
|
|
43
|
-
"typescript": "^4.3.4",
|
|
44
|
-
"tslib": "^2.0.0",
|
|
45
|
-
"globby": "^11.0.0",
|
|
46
|
-
"magic-string": "^0.25.7"
|
|
47
|
-
},
|
|
48
|
-
"peerDependencies": {
|
|
49
|
-
"tslib": "*"
|
|
50
|
-
},
|
|
51
|
-
"dependencies": {
|
|
52
|
-
"@microsoft/applicationinsights-shims": "2.0.1",
|
|
53
|
-
"@microsoft/applicationinsights-core-js": "2.8.
|
|
54
|
-
"@microsoft/dynamicproto-js": "^1.1.6"
|
|
55
|
-
},
|
|
56
|
-
"license": "MIT"
|
|
57
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@microsoft/applicationinsights-common",
|
|
3
|
+
"version": "2.8.9-nightly.2210-02",
|
|
4
|
+
"description": "Microsoft Application Insights Common JavaScript Library",
|
|
5
|
+
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
|
6
|
+
"author": "Microsoft Application Insights Team",
|
|
7
|
+
"main": "./dist/applicationinsights-common.js",
|
|
8
|
+
"module": "./dist-esm/applicationinsights-common.js",
|
|
9
|
+
"types": "./types/applicationinsights-common.d.ts",
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/microsoft/ApplicationInsights-JS/tree/master/shared/AppInsightsCommon"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "npm run build:esm && npm run build:browser && npm run sri && npm run dtsgen",
|
|
17
|
+
"build:esm": "grunt common",
|
|
18
|
+
"build:browser": "rollup -c",
|
|
19
|
+
"rebuild": "npm run build",
|
|
20
|
+
"test": "grunt commontest",
|
|
21
|
+
"mintest": "grunt common-mintest",
|
|
22
|
+
"lint": "tslint -p tsconfig.json",
|
|
23
|
+
"dtsgen": "api-extractor run --local && node ../../scripts/dtsgen.js \"Microsoft Application Insights Common JavaScript Library\"",
|
|
24
|
+
"sri": "node ../../tools/subResourceIntegrity/generateIntegrityFile.js",
|
|
25
|
+
"ai-min": "grunt common-min",
|
|
26
|
+
"ai-restore": "grunt common-restore"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@microsoft/ai-test-framework": "0.0.1",
|
|
30
|
+
"@microsoft/applicationinsights-rollup-plugin-uglify3-js": "1.0.0",
|
|
31
|
+
"@microsoft/applicationinsights-rollup-es3": "1.1.3",
|
|
32
|
+
"@microsoft/api-extractor": "^7.18.1",
|
|
33
|
+
"grunt": "^1.5.3",
|
|
34
|
+
"grunt-cli": "^1.4.3",
|
|
35
|
+
"grunt-contrib-qunit": "^5.0.1",
|
|
36
|
+
"@nevware21/grunt-ts-plugin": "^0.4.3",
|
|
37
|
+
"@nevware21/grunt-eslint-ts": "^0.2.2",
|
|
38
|
+
"@rollup/plugin-commonjs": "^18.0.0",
|
|
39
|
+
"@rollup/plugin-node-resolve": "^11.2.1",
|
|
40
|
+
"@rollup/plugin-replace": "^2.3.3",
|
|
41
|
+
"rollup-plugin-cleanup": "^3.2.1",
|
|
42
|
+
"rollup": "^2.32.0",
|
|
43
|
+
"typescript": "^4.3.4",
|
|
44
|
+
"tslib": "^2.0.0",
|
|
45
|
+
"globby": "^11.0.0",
|
|
46
|
+
"magic-string": "^0.25.7"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"tslib": "*"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@microsoft/applicationinsights-shims": "2.0.1",
|
|
53
|
+
"@microsoft/applicationinsights-core-js": "2.8.9-nightly.2210-02",
|
|
54
|
+
"@microsoft/dynamicproto-js": "^1.1.6"
|
|
55
|
+
},
|
|
56
|
+
"license": "MIT",
|
|
57
|
+
"publishConfig": {
|
|
58
|
+
"tag": "nightly"
|
|
59
|
+
}
|
|
60
|
+
}
|
package/src/UrlHelperFuncs.ts
CHANGED
|
@@ -67,7 +67,7 @@ export function urlGetCompleteUrl(method: string, absoluteUrl: string) {
|
|
|
67
67
|
export function urlParseHost(url: string, inclPort?: boolean) {
|
|
68
68
|
let fullHost = urlParseFullHost(url, inclPort) || "";
|
|
69
69
|
if (fullHost) {
|
|
70
|
-
const match = fullHost.match(/(www
|
|
70
|
+
const match = fullHost.match(/(www\d{0,5}\.)?([^\/:]{1,256})(:\d{1,20})?/i);
|
|
71
71
|
if (match != null && match.length > 3 && isString(match[2]) && match[2].length > 0) {
|
|
72
72
|
return match[2] + (match[3] || "");
|
|
73
73
|
}
|
|
@@ -79,7 +79,7 @@ export function urlParseHost(url: string, inclPort?: boolean) {
|
|
|
79
79
|
export function urlParseFullHost(url: string, inclPort?: boolean) {
|
|
80
80
|
let result = null;
|
|
81
81
|
if (url) {
|
|
82
|
-
const match = url.match(/(\w
|
|
82
|
+
const match = url.match(/(\w{1,150}):\/\/([^\/:]{1,256})(:\d{1,20})?/i);
|
|
83
83
|
if (match != null && match.length > 2 && isString(match[2]) && match[2].length > 0) {
|
|
84
84
|
result = match[2] || "";
|
|
85
85
|
if (inclPort && match.length > 2) {
|