@microsoft/applicationinsights-dependencies-js 2.7.2-nightly.2111-05 → 2.7.2-nightly.2111-09
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/Tests/Unit/src/ajax.tests.ts +2708 -0
- package/Tests/Unit/src/dependencies.tests.ts +7 -0
- package/Tests/UnitTests.html +52 -0
- package/Tests/tsconfig.json +13 -0
- package/api-extractor.json +361 -0
- package/applicationinsights-dependencies-js.build.error.log +20 -0
- package/applicationinsights-dependencies-js.build.log +249 -0
- package/browser/applicationinsights-dependencies-js.integrity.json +9 -9
- package/browser/applicationinsights-dependencies-js.js +1 -1
- package/browser/applicationinsights-dependencies-js.js.map +1 -1
- package/browser/applicationinsights-dependencies-js.min.js +1 -1
- package/browser/applicationinsights-dependencies-js.min.js.map +1 -1
- package/dist/applicationinsights-dependencies-js.api.json +1 -1
- package/dist/applicationinsights-dependencies-js.d.ts +1 -1
- package/dist/applicationinsights-dependencies-js.js +1 -1
- package/dist/applicationinsights-dependencies-js.js.map +1 -1
- package/dist/applicationinsights-dependencies-js.min.js +1 -1
- package/dist/applicationinsights-dependencies-js.min.js.map +1 -1
- package/dist/applicationinsights-dependencies-js.rollup.d.ts +1 -1
- package/dist-esm/TraceParent.js +1 -1
- package/dist-esm/ajax.js +1 -1
- package/dist-esm/ajaxRecord.js +1 -1
- package/dist-esm/ajaxUtils.js +1 -1
- package/dist-esm/applicationinsights-dependencies-js.js +1 -1
- package/microsoft-applicationinsights-dependencies-js-2.7.2-nightly.2111-09.tgz +0 -0
- package/package.json +3 -3
- package/rollup.config.js +139 -0
- package/temp/applicationinsights-dependencies-js.api.md +136 -0
- package/tslint.json +8 -0
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights XHR dependencies plugin, 2.7.2-nightly.2111-
|
|
2
|
+
* Microsoft Application Insights XHR dependencies plugin, 2.7.2-nightly.2111-09
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
package/dist-esm/TraceParent.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Dependencies Plugin, 2.7.2-nightly.2111-
|
|
2
|
+
* Application Insights JavaScript SDK - Dependencies Plugin, 2.7.2-nightly.2111-09
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
import { generateW3CId } from "@microsoft/applicationinsights-core-js";
|
package/dist-esm/ajax.js
CHANGED
package/dist-esm/ajaxRecord.js
CHANGED
package/dist-esm/ajaxUtils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/applicationinsights-dependencies-js",
|
|
3
|
-
"version": "2.7.2-nightly.2111-
|
|
3
|
+
"version": "2.7.2-nightly.2111-09",
|
|
4
4
|
"description": "Microsoft Application Insights XHR dependencies plugin",
|
|
5
5
|
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
|
6
6
|
"author": "Microsoft Application Insights Team",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@microsoft/dynamicproto-js": "^1.1.4",
|
|
52
52
|
"@microsoft/applicationinsights-shims": "2.0.0",
|
|
53
|
-
"@microsoft/applicationinsights-core-js": "2.7.2-nightly.2111-
|
|
54
|
-
"@microsoft/applicationinsights-common": "2.7.2-nightly.2111-
|
|
53
|
+
"@microsoft/applicationinsights-core-js": "2.7.2-nightly.2111-09",
|
|
54
|
+
"@microsoft/applicationinsights-common": "2.7.2-nightly.2111-09"
|
|
55
55
|
},
|
|
56
56
|
"license": "MIT",
|
|
57
57
|
"publishConfig": {
|
package/rollup.config.js
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import nodeResolve from "@rollup/plugin-node-resolve";
|
|
2
|
+
import { uglify } from "@microsoft/applicationinsights-rollup-plugin-uglify3-js";
|
|
3
|
+
import replace from "@rollup/plugin-replace";
|
|
4
|
+
import cleanup from "rollup-plugin-cleanup";
|
|
5
|
+
import dynamicRemove from "@microsoft/dynamicproto-js/tools/rollup/node/removedynamic";
|
|
6
|
+
import { es3Poly, es3Check, importCheck } from "@microsoft/applicationinsights-rollup-es3";
|
|
7
|
+
import { updateDistEsmFiles } from "../../tools/updateDistEsm/updateDistEsm";
|
|
8
|
+
|
|
9
|
+
const version = require("./package.json").version;
|
|
10
|
+
const outputName = "applicationinsights-dependencies-js";
|
|
11
|
+
const banner = [
|
|
12
|
+
"/*!",
|
|
13
|
+
` * Application Insights JavaScript SDK - Dependencies Plugin, ${version}`,
|
|
14
|
+
" * Copyright (c) Microsoft and contributors. All rights reserved.",
|
|
15
|
+
" */"
|
|
16
|
+
].join("\n");
|
|
17
|
+
|
|
18
|
+
const replaceValues = {
|
|
19
|
+
"// Copyright (c) Microsoft Corporation. All rights reserved.": "",
|
|
20
|
+
"// Licensed under the MIT License.": ""
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
function doCleanup() {
|
|
24
|
+
return cleanup({
|
|
25
|
+
comments: [
|
|
26
|
+
'some',
|
|
27
|
+
/^.\s*@DynamicProtoStub/i,
|
|
28
|
+
/^\*\*\s*@class\s*$/
|
|
29
|
+
]
|
|
30
|
+
})
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const browserRollupConfigFactory = isProduction => {
|
|
34
|
+
const browserRollupConfig = {
|
|
35
|
+
input: `dist-esm/${outputName}.js`,
|
|
36
|
+
output: {
|
|
37
|
+
file: `browser/${outputName}.js`,
|
|
38
|
+
banner: banner,
|
|
39
|
+
format: "umd",
|
|
40
|
+
name: "Microsoft.ApplicationInsights",
|
|
41
|
+
extend: true,
|
|
42
|
+
freeze: false,
|
|
43
|
+
sourcemap: true
|
|
44
|
+
},
|
|
45
|
+
plugins: [
|
|
46
|
+
dynamicRemove(),
|
|
47
|
+
replace({
|
|
48
|
+
preventAssignment: true,
|
|
49
|
+
delimiters: ["", ""],
|
|
50
|
+
values: replaceValues
|
|
51
|
+
}),
|
|
52
|
+
importCheck({ exclude: [ "applicationinsights-dependencies-js" ] }),
|
|
53
|
+
nodeResolve({
|
|
54
|
+
browser: false,
|
|
55
|
+
preferBuiltins: false
|
|
56
|
+
}),
|
|
57
|
+
doCleanup(),
|
|
58
|
+
es3Poly(),
|
|
59
|
+
es3Check()
|
|
60
|
+
]
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
if (isProduction) {
|
|
64
|
+
browserRollupConfig.output.file = `browser/${outputName}.min.js`;
|
|
65
|
+
browserRollupConfig.plugins.push(
|
|
66
|
+
uglify({
|
|
67
|
+
ie8: true,
|
|
68
|
+
toplevel: true,
|
|
69
|
+
compress: {
|
|
70
|
+
passes:3,
|
|
71
|
+
unsafe: true
|
|
72
|
+
},
|
|
73
|
+
output: {
|
|
74
|
+
preamble: banner,
|
|
75
|
+
webkit:true
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return browserRollupConfig;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const nodeUmdRollupConfigFactory = (isProduction) => {
|
|
85
|
+
const nodeRollupConfig = {
|
|
86
|
+
input: `dist-esm/${outputName}.js`,
|
|
87
|
+
output: {
|
|
88
|
+
file: `dist/${outputName}.js`,
|
|
89
|
+
banner: banner,
|
|
90
|
+
format: "umd",
|
|
91
|
+
name: "Microsoft.ApplicationInsights",
|
|
92
|
+
extend: true,
|
|
93
|
+
freeze: false,
|
|
94
|
+
sourcemap: true
|
|
95
|
+
},
|
|
96
|
+
plugins: [
|
|
97
|
+
dynamicRemove(),
|
|
98
|
+
replace({
|
|
99
|
+
preventAssignment: true,
|
|
100
|
+
delimiters: ["", ""],
|
|
101
|
+
values: replaceValues
|
|
102
|
+
}),
|
|
103
|
+
importCheck({ exclude: [ "applicationinsights-dependencies-js" ] }),
|
|
104
|
+
nodeResolve(),
|
|
105
|
+
doCleanup(),
|
|
106
|
+
es3Poly(),
|
|
107
|
+
es3Check()
|
|
108
|
+
]
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
if (isProduction) {
|
|
112
|
+
nodeRollupConfig.output.file = `dist/${outputName}.min.js`;
|
|
113
|
+
nodeRollupConfig.plugins.push(
|
|
114
|
+
uglify({
|
|
115
|
+
ie8: true,
|
|
116
|
+
toplevel: true,
|
|
117
|
+
compress: {
|
|
118
|
+
passes:3,
|
|
119
|
+
unsafe: true
|
|
120
|
+
},
|
|
121
|
+
output: {
|
|
122
|
+
preamble: banner,
|
|
123
|
+
webkit:true
|
|
124
|
+
}
|
|
125
|
+
})
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return nodeRollupConfig;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
updateDistEsmFiles(replaceValues, banner);
|
|
133
|
+
|
|
134
|
+
export default [
|
|
135
|
+
nodeUmdRollupConfigFactory(true),
|
|
136
|
+
nodeUmdRollupConfigFactory(false),
|
|
137
|
+
browserRollupConfigFactory(true),
|
|
138
|
+
browserRollupConfigFactory(false)
|
|
139
|
+
];
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
## API Report File for "@microsoft/applicationinsights-dependencies-js"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { BaseTelemetryPlugin } from '@microsoft/applicationinsights-core-js';
|
|
8
|
+
import { IAppInsightsCore } from '@microsoft/applicationinsights-core-js';
|
|
9
|
+
import { IConfig } from '@microsoft/applicationinsights-common';
|
|
10
|
+
import { IConfiguration } from '@microsoft/applicationinsights-core-js';
|
|
11
|
+
import { ICorrelationConfig } from '@microsoft/applicationinsights-common';
|
|
12
|
+
import { IDependencyTelemetry } from '@microsoft/applicationinsights-common';
|
|
13
|
+
import { IDiagnosticLogger } from '@microsoft/applicationinsights-core-js';
|
|
14
|
+
import { IPlugin } from '@microsoft/applicationinsights-core-js';
|
|
15
|
+
import { IProcessTelemetryContext } from '@microsoft/applicationinsights-core-js';
|
|
16
|
+
import { ITelemetryItem } from '@microsoft/applicationinsights-core-js';
|
|
17
|
+
import { ITelemetryPluginChain } from '@microsoft/applicationinsights-core-js';
|
|
18
|
+
|
|
19
|
+
// @public (undocumented)
|
|
20
|
+
export class AjaxPlugin extends BaseTelemetryPlugin implements IDependenciesPlugin, IInstrumentationRequirements {
|
|
21
|
+
constructor();
|
|
22
|
+
// (undocumented)
|
|
23
|
+
static getDefaultConfig(): ICorrelationConfig;
|
|
24
|
+
// (undocumented)
|
|
25
|
+
static getEmptyConfig(): ICorrelationConfig;
|
|
26
|
+
// (undocumented)
|
|
27
|
+
static identifier: string;
|
|
28
|
+
// (undocumented)
|
|
29
|
+
identifier: string;
|
|
30
|
+
// (undocumented)
|
|
31
|
+
includeCorrelationHeaders(ajaxData: ajaxRecord, input?: Request | string, init?: RequestInit, xhr?: XMLHttpRequestInstrumented): any;
|
|
32
|
+
// (undocumented)
|
|
33
|
+
initialize(config: IConfiguration & IConfig, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?: ITelemetryPluginChain): void;
|
|
34
|
+
// (undocumented)
|
|
35
|
+
priority: number;
|
|
36
|
+
// (undocumented)
|
|
37
|
+
processTelemetry(item: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
|
|
38
|
+
// (undocumented)
|
|
39
|
+
teardown(): void;
|
|
40
|
+
trackDependencyData(dependency: IDependencyTelemetry, properties?: {
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
}): void;
|
|
43
|
+
protected trackDependencyDataInternal(dependency: IDependencyTelemetry, properties?: {
|
|
44
|
+
[key: string]: any;
|
|
45
|
+
}, systemProperties?: {
|
|
46
|
+
[key: string]: any;
|
|
47
|
+
}): void;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// @public (undocumented)
|
|
51
|
+
export class ajaxRecord {
|
|
52
|
+
constructor(traceID: string, spanID: string, logger: IDiagnosticLogger);
|
|
53
|
+
// (undocumented)
|
|
54
|
+
aborted: number;
|
|
55
|
+
// (undocumented)
|
|
56
|
+
ajaxTotalDuration: number;
|
|
57
|
+
// (undocumented)
|
|
58
|
+
async?: boolean;
|
|
59
|
+
// (undocumented)
|
|
60
|
+
callbackDuration: number;
|
|
61
|
+
// (undocumented)
|
|
62
|
+
callbackFinishedTime: number;
|
|
63
|
+
// (undocumented)
|
|
64
|
+
clientFailure: number;
|
|
65
|
+
// (undocumented)
|
|
66
|
+
completed: boolean;
|
|
67
|
+
// Warning: (ae-forgotten-export) The symbol "IAjaxRecordResponse" needs to be exported by the entry point applicationinsights-dependencies-js.d.ts
|
|
68
|
+
//
|
|
69
|
+
// (undocumented)
|
|
70
|
+
CreateTrackItem(ajaxType: string, enableRequestHeaderTracking: boolean, getResponse: () => IAjaxRecordResponse): IDependencyTelemetry;
|
|
71
|
+
// (undocumented)
|
|
72
|
+
endTime: number;
|
|
73
|
+
// (undocumented)
|
|
74
|
+
errorStatusText?: boolean;
|
|
75
|
+
// (undocumented)
|
|
76
|
+
getAbsoluteUrl(): string;
|
|
77
|
+
// (undocumented)
|
|
78
|
+
getPathName(): string;
|
|
79
|
+
// (undocumented)
|
|
80
|
+
method: string;
|
|
81
|
+
// (undocumented)
|
|
82
|
+
pageUrl: string;
|
|
83
|
+
// (undocumented)
|
|
84
|
+
perfAttempts?: number;
|
|
85
|
+
// (undocumented)
|
|
86
|
+
perfMark: PerformanceMark;
|
|
87
|
+
// (undocumented)
|
|
88
|
+
perfTiming: PerformanceResourceTiming;
|
|
89
|
+
// (undocumented)
|
|
90
|
+
requestHeaders: any;
|
|
91
|
+
// (undocumented)
|
|
92
|
+
requestHeadersSize: number;
|
|
93
|
+
// (undocumented)
|
|
94
|
+
requestSentTime: number;
|
|
95
|
+
// (undocumented)
|
|
96
|
+
requestSize: number;
|
|
97
|
+
// (undocumented)
|
|
98
|
+
requestUrl: string;
|
|
99
|
+
// (undocumented)
|
|
100
|
+
responseFinishedTime: number;
|
|
101
|
+
// (undocumented)
|
|
102
|
+
responseReceivingDuration: number;
|
|
103
|
+
// (undocumented)
|
|
104
|
+
responseStartedTime: number;
|
|
105
|
+
// (undocumented)
|
|
106
|
+
spanID: string;
|
|
107
|
+
// (undocumented)
|
|
108
|
+
status: string | number;
|
|
109
|
+
// (undocumented)
|
|
110
|
+
traceID: string;
|
|
111
|
+
// Warning: (ae-forgotten-export) The symbol "XHRMonitoringState" needs to be exported by the entry point applicationinsights-dependencies-js.d.ts
|
|
112
|
+
//
|
|
113
|
+
// (undocumented)
|
|
114
|
+
xhrMonitoringState: XHRMonitoringState;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// @public (undocumented)
|
|
118
|
+
export interface IDependenciesPlugin {
|
|
119
|
+
trackDependencyData(dependency: IDependencyTelemetry): void;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// @public (undocumented)
|
|
123
|
+
export interface IInstrumentationRequirements extends IDependenciesPlugin {
|
|
124
|
+
// (undocumented)
|
|
125
|
+
includeCorrelationHeaders: (ajaxData: ajaxRecord, input?: Request | string, init?: RequestInit, xhr?: XMLHttpRequestInstrumented) => any;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// @public (undocumented)
|
|
129
|
+
export interface XMLHttpRequestInstrumented extends XMLHttpRequest {
|
|
130
|
+
// (undocumented)
|
|
131
|
+
ajaxData: ajaxRecord;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// (No @packageDocumentation comment for this package)
|
|
135
|
+
|
|
136
|
+
```
|
package/tslint.json
ADDED