@microsoft/applicationinsights-web-basic 3.0.0-beta.2303-11 → 3.0.0-beta.2304-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/browser/es5/aib.3.0.0-beta.2304-09.cjs.js +7452 -0
- package/browser/es5/aib.3.0.0-beta.2304-09.cjs.js.map +1 -0
- package/browser/es5/aib.3.0.0-beta.2304-09.cjs.min.js +6 -0
- package/browser/es5/aib.3.0.0-beta.2304-09.cjs.min.js.map +1 -0
- package/browser/es5/aib.3.0.0-beta.2304-09.gbl.js +7456 -0
- package/browser/es5/aib.3.0.0-beta.2304-09.gbl.js.map +1 -0
- package/browser/es5/aib.3.0.0-beta.2304-09.gbl.min.js +6 -0
- package/browser/es5/aib.3.0.0-beta.2304-09.gbl.min.js.map +1 -0
- package/browser/es5/aib.3.0.0-beta.2304-09.integrity.json +66 -0
- package/browser/{aib.3.0.0-beta.2303-11.js → es5/aib.3.0.0-beta.2304-09.js} +1095 -1037
- package/browser/es5/aib.3.0.0-beta.2304-09.js.map +1 -0
- package/browser/es5/aib.3.0.0-beta.2304-09.min.js +6 -0
- package/browser/es5/aib.3.0.0-beta.2304-09.min.js.map +1 -0
- package/browser/es5/aib.3.cjs.js +7452 -0
- package/browser/es5/aib.3.cjs.js.map +1 -0
- package/browser/es5/aib.3.cjs.min.js +6 -0
- package/browser/es5/aib.3.cjs.min.js.map +1 -0
- package/browser/es5/aib.3.gbl.js +7456 -0
- package/browser/es5/aib.3.gbl.js.map +1 -0
- package/browser/es5/aib.3.gbl.min.js +6 -0
- package/browser/es5/aib.3.gbl.min.js.map +1 -0
- package/browser/{aib.2.js → es5/aib.3.js} +1095 -1037
- package/browser/es5/aib.3.js.map +1 -0
- package/browser/es5/aib.3.min.js +6 -0
- package/browser/es5/aib.3.min.js.map +1 -0
- package/dist/{applicationinsights-web-basic.js → es5/applicationinsights-web-basic.js} +1094 -1036
- package/dist/es5/applicationinsights-web-basic.js.map +1 -0
- package/dist/es5/applicationinsights-web-basic.min.js +6 -0
- package/dist/es5/applicationinsights-web-basic.min.js.map +1 -0
- package/{dist-esm → dist-es5}/__DynamicConstants.js +1 -1
- package/{dist-esm → dist-es5}/index.js +1 -1
- package/package.json +18 -17
- package/tsconfig.json +5 -4
- package/{dist/applicationinsights-web-basic.rollup.d.ts → types/applicationinsights-web-basic.d.ts} +3 -4
- package/{dist/applicationinsights-web-basic.d.ts → types/applicationinsights-web-basic.namespaced.d.ts} +1 -1
- package/browser/aib.2.js.map +0 -1
- package/browser/aib.2.min.js +0 -6
- package/browser/aib.2.min.js.map +0 -1
- package/browser/aib.3.0.0-beta.2303-11.integrity.json +0 -26
- package/browser/aib.3.0.0-beta.2303-11.js.map +0 -1
- package/browser/aib.3.0.0-beta.2303-11.min.js +0 -6
- package/browser/aib.3.0.0-beta.2303-11.min.js.map +0 -1
- package/dist/applicationinsights-web-basic.api.json +0 -10735
- package/dist/applicationinsights-web-basic.api.md +0 -585
- package/dist/applicationinsights-web-basic.js.map +0 -1
- package/dist/applicationinsights-web-basic.min.js +0 -6
- package/dist/applicationinsights-web-basic.min.js.map +0 -1
- package/src/__DynamicConstants.ts +0 -14
- package/src/index.ts +0 -213
- package/types/__DynamicConstants.d.ts +0 -2
- package/types/index.d.ts +0 -76
- package/types/tsdoc-metadata.json +0 -11
- /package/{dist-esm → dist-es5}/__DynamicConstants.js.map +0 -0
- /package/{dist-esm → dist-es5}/index.js.map +0 -0
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
// @skip-file-minify
|
|
4
|
-
|
|
5
|
-
// ##############################################################
|
|
6
|
-
// AUTO GENERATED FILE: This file is Auto Generated during build.
|
|
7
|
-
// ##############################################################
|
|
8
|
-
|
|
9
|
-
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
10
|
-
// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!
|
|
11
|
-
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
12
|
-
|
|
13
|
-
export const _DYN_INSTRUMENTATION_KEY = "instrumentationKey"; // Count: 3
|
|
14
|
-
export const _DYN_CONNECTION_STRING = "connectionString"; // Count: 3
|
package/src/index.ts
DELETED
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
5
|
-
import { Sender } from "@microsoft/applicationinsights-channel-js";
|
|
6
|
-
import { DEFAULT_BREEZE_PATH, IConfig, parseConnectionString } from "@microsoft/applicationinsights-common";
|
|
7
|
-
import {
|
|
8
|
-
AppInsightsCore, IConfigDefaults, IConfiguration, IDynamicConfigHandler, ILoadedPlugin, IPlugin, ITelemetryItem, ITelemetryPlugin,
|
|
9
|
-
IUnloadHook, UnloadHandler, WatcherFunction, cfgDfValidate, createDynamicConfig, onConfigChange, proxyFunctions
|
|
10
|
-
} from "@microsoft/applicationinsights-core-js";
|
|
11
|
-
import { isNullOrUndefined, objDefine, throwError } from "@nevware21/ts-utils";
|
|
12
|
-
|
|
13
|
-
const defaultConfigValues: IConfigDefaults<IConfiguration> = {
|
|
14
|
-
diagnosticLogInterval: cfgDfValidate(_chkDiagLevel, 10000)
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
function _chkDiagLevel(value: number) {
|
|
18
|
-
// Make sure we have a value > 0
|
|
19
|
-
return value && value > 0;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* @export
|
|
24
|
-
* @class ApplicationInsights
|
|
25
|
-
*/
|
|
26
|
-
export class ApplicationInsights {
|
|
27
|
-
public readonly config: IConfiguration & IConfig;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Creates an instance of ApplicationInsights.
|
|
31
|
-
* @param config
|
|
32
|
-
* @memberof ApplicationInsights
|
|
33
|
-
*/
|
|
34
|
-
constructor(config: IConfiguration & IConfig) {
|
|
35
|
-
let core = new AppInsightsCore();
|
|
36
|
-
let _config: IConfiguration & IConfig;
|
|
37
|
-
|
|
38
|
-
// initialize the queue and config in case they are undefined
|
|
39
|
-
if (
|
|
40
|
-
isNullOrUndefined(config) ||
|
|
41
|
-
(isNullOrUndefined(config.instrumentationKey) && isNullOrUndefined(config.connectionString))
|
|
42
|
-
) {
|
|
43
|
-
throwError("Invalid input configuration");
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
dynamicProto(ApplicationInsights, this, (_self) => {
|
|
47
|
-
|
|
48
|
-
// Define _self.config
|
|
49
|
-
objDefine(_self, "config", {
|
|
50
|
-
g: () => _config
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
_initialize();
|
|
54
|
-
|
|
55
|
-
_self.initialize = _initialize;
|
|
56
|
-
|
|
57
|
-
proxyFunctions(_self, core, [
|
|
58
|
-
"track",
|
|
59
|
-
"flush",
|
|
60
|
-
"pollInternalLogs",
|
|
61
|
-
"stopPollingInternalLogs",
|
|
62
|
-
"unload",
|
|
63
|
-
"getPlugin",
|
|
64
|
-
"addPlugin",
|
|
65
|
-
"evtNamespace",
|
|
66
|
-
"addUnloadCb",
|
|
67
|
-
"onCfgChange"
|
|
68
|
-
]);
|
|
69
|
-
|
|
70
|
-
function _initialize(): void {
|
|
71
|
-
let cfgHandler: IDynamicConfigHandler<IConfiguration & IConfig> = createDynamicConfig(config || ({} as any), defaultConfigValues);
|
|
72
|
-
_config = cfgHandler.cfg;
|
|
73
|
-
|
|
74
|
-
core.addUnloadHook(onConfigChange(cfgHandler, () => {
|
|
75
|
-
if (_config.connectionString) {
|
|
76
|
-
const cs = parseConnectionString(_config.connectionString);
|
|
77
|
-
const ingest = cs.ingestionendpoint;
|
|
78
|
-
_config.endpointUrl = ingest ? (ingest + DEFAULT_BREEZE_PATH) : _config.endpointUrl; // only add /v2/track when from connectionstring
|
|
79
|
-
_config.instrumentationKey = cs.instrumentationkey || _config.instrumentationKey;
|
|
80
|
-
}
|
|
81
|
-
}));
|
|
82
|
-
|
|
83
|
-
// initialize core
|
|
84
|
-
core.initialize(_config, [new Sender()]);
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Initialize this instance of ApplicationInsights
|
|
91
|
-
*
|
|
92
|
-
* @memberof ApplicationInsights
|
|
93
|
-
*/
|
|
94
|
-
public initialize(): void {
|
|
95
|
-
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Send a manually constructed custom event
|
|
100
|
-
*
|
|
101
|
-
* @param item
|
|
102
|
-
* @memberof ApplicationInsights
|
|
103
|
-
*/
|
|
104
|
-
public track(item: ITelemetryItem) {
|
|
105
|
-
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Immediately send all batched telemetry
|
|
110
|
-
* @param [async=true]
|
|
111
|
-
* @memberof ApplicationInsights
|
|
112
|
-
*/
|
|
113
|
-
public flush(async: boolean = true) {
|
|
114
|
-
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
public pollInternalLogs(): void {
|
|
118
|
-
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
public stopPollingInternalLogs(): void {
|
|
122
|
-
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Unload and Tear down the SDK and any initialized plugins, after calling this the SDK will be considered
|
|
127
|
-
* to be un-initialized and non-operational, re-initializing the SDK should only be attempted if the previous
|
|
128
|
-
* unload call return `true` stating that all plugins reported that they also unloaded, the recommended
|
|
129
|
-
* approach is to create a new instance and initialize that instance.
|
|
130
|
-
* This is due to possible unexpected side effects caused by plugins not supporting unload / teardown, unable
|
|
131
|
-
* to successfully remove any global references or they may just be completing the unload process asynchronously.
|
|
132
|
-
*/
|
|
133
|
-
public unload(isAsync?: boolean, unloadComplete?: () => void): void {
|
|
134
|
-
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
|
|
135
|
-
return null;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Find and return the (first) plugin with the specified identifier if present
|
|
140
|
-
* @param pluginIdentifier
|
|
141
|
-
*/
|
|
142
|
-
public getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T> {
|
|
143
|
-
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
|
|
144
|
-
return null;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Add a new plugin to the installation
|
|
149
|
-
* @param plugin - The new plugin to add
|
|
150
|
-
* @param replaceExisting - should any existing plugin be replaced
|
|
151
|
-
* @param doAsync - Should the add be performed asynchronously
|
|
152
|
-
*/
|
|
153
|
-
public addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting: boolean, doAsync: boolean, addCb?: (added?: boolean) => void): void {
|
|
154
|
-
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Returns the unique event namespace that should be used
|
|
159
|
-
*/
|
|
160
|
-
public evtNamespace(): string {
|
|
161
|
-
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
|
|
162
|
-
return null;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Add an unload handler that will be called when the SDK is being unloaded
|
|
167
|
-
* @param handler - the handler
|
|
168
|
-
*/
|
|
169
|
-
public addUnloadCb(handler: UnloadHandler): void {
|
|
170
|
-
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Watches and tracks changes for accesses to the current config, and if the accessed config changes the
|
|
175
|
-
* handler will be recalled.
|
|
176
|
-
* @param handler
|
|
177
|
-
* @returns A watcher handler instance that can be used to remove itself when being unloaded
|
|
178
|
-
*/
|
|
179
|
-
public onCfgChange(handler: WatcherFunction<IConfiguration>): IUnloadHook {
|
|
180
|
-
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
|
|
181
|
-
return null;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
export {
|
|
187
|
-
IConfiguration,
|
|
188
|
-
AppInsightsCore,
|
|
189
|
-
IAppInsightsCore,
|
|
190
|
-
ITelemetryItem,
|
|
191
|
-
ILoadedPlugin,
|
|
192
|
-
arrForEach,
|
|
193
|
-
SendRequestReason,
|
|
194
|
-
_eInternalMessageId,
|
|
195
|
-
isNullOrUndefined,
|
|
196
|
-
throwError,
|
|
197
|
-
proxyFunctions,
|
|
198
|
-
IPlugin,
|
|
199
|
-
ITelemetryPlugin
|
|
200
|
-
} from "@microsoft/applicationinsights-core-js";
|
|
201
|
-
|
|
202
|
-
export {
|
|
203
|
-
SeverityLevel,
|
|
204
|
-
eSeverityLevel,
|
|
205
|
-
IPageViewTelemetry,
|
|
206
|
-
IDependencyTelemetry,
|
|
207
|
-
IAutoExceptionTelemetry,
|
|
208
|
-
IEventTelemetry,
|
|
209
|
-
IMetricTelemetry,
|
|
210
|
-
IPageViewPerformanceTelemetry,
|
|
211
|
-
ITraceTelemetry
|
|
212
|
-
} from "@microsoft/applicationinsights-common";
|
|
213
|
-
export { Sender } from "@microsoft/applicationinsights-channel-js";
|
package/types/index.d.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { IConfig } from "@microsoft/applicationinsights-common";
|
|
2
|
-
import { IConfiguration, ILoadedPlugin, IPlugin, ITelemetryItem, ITelemetryPlugin, IUnloadHook, UnloadHandler, WatcherFunction } from "@microsoft/applicationinsights-core-js";
|
|
3
|
-
/**
|
|
4
|
-
* @export
|
|
5
|
-
* @class ApplicationInsights
|
|
6
|
-
*/
|
|
7
|
-
export declare class ApplicationInsights {
|
|
8
|
-
readonly config: IConfiguration & IConfig;
|
|
9
|
-
/**
|
|
10
|
-
* Creates an instance of ApplicationInsights.
|
|
11
|
-
* @param config
|
|
12
|
-
* @memberof ApplicationInsights
|
|
13
|
-
*/
|
|
14
|
-
constructor(config: IConfiguration & IConfig);
|
|
15
|
-
/**
|
|
16
|
-
* Initialize this instance of ApplicationInsights
|
|
17
|
-
*
|
|
18
|
-
* @memberof ApplicationInsights
|
|
19
|
-
*/
|
|
20
|
-
initialize(): void;
|
|
21
|
-
/**
|
|
22
|
-
* Send a manually constructed custom event
|
|
23
|
-
*
|
|
24
|
-
* @param item
|
|
25
|
-
* @memberof ApplicationInsights
|
|
26
|
-
*/
|
|
27
|
-
track(item: ITelemetryItem): void;
|
|
28
|
-
/**
|
|
29
|
-
* Immediately send all batched telemetry
|
|
30
|
-
* @param [async=true]
|
|
31
|
-
* @memberof ApplicationInsights
|
|
32
|
-
*/
|
|
33
|
-
flush(async?: boolean): void;
|
|
34
|
-
pollInternalLogs(): void;
|
|
35
|
-
stopPollingInternalLogs(): void;
|
|
36
|
-
/**
|
|
37
|
-
* Unload and Tear down the SDK and any initialized plugins, after calling this the SDK will be considered
|
|
38
|
-
* to be un-initialized and non-operational, re-initializing the SDK should only be attempted if the previous
|
|
39
|
-
* unload call return `true` stating that all plugins reported that they also unloaded, the recommended
|
|
40
|
-
* approach is to create a new instance and initialize that instance.
|
|
41
|
-
* This is due to possible unexpected side effects caused by plugins not supporting unload / teardown, unable
|
|
42
|
-
* to successfully remove any global references or they may just be completing the unload process asynchronously.
|
|
43
|
-
*/
|
|
44
|
-
unload(isAsync?: boolean, unloadComplete?: () => void): void;
|
|
45
|
-
/**
|
|
46
|
-
* Find and return the (first) plugin with the specified identifier if present
|
|
47
|
-
* @param pluginIdentifier
|
|
48
|
-
*/
|
|
49
|
-
getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
|
|
50
|
-
/**
|
|
51
|
-
* Add a new plugin to the installation
|
|
52
|
-
* @param plugin - The new plugin to add
|
|
53
|
-
* @param replaceExisting - should any existing plugin be replaced
|
|
54
|
-
* @param doAsync - Should the add be performed asynchronously
|
|
55
|
-
*/
|
|
56
|
-
addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting: boolean, doAsync: boolean, addCb?: (added?: boolean) => void): void;
|
|
57
|
-
/**
|
|
58
|
-
* Returns the unique event namespace that should be used
|
|
59
|
-
*/
|
|
60
|
-
evtNamespace(): string;
|
|
61
|
-
/**
|
|
62
|
-
* Add an unload handler that will be called when the SDK is being unloaded
|
|
63
|
-
* @param handler - the handler
|
|
64
|
-
*/
|
|
65
|
-
addUnloadCb(handler: UnloadHandler): void;
|
|
66
|
-
/**
|
|
67
|
-
* Watches and tracks changes for accesses to the current config, and if the accessed config changes the
|
|
68
|
-
* handler will be recalled.
|
|
69
|
-
* @param handler
|
|
70
|
-
* @returns A watcher handler instance that can be used to remove itself when being unloaded
|
|
71
|
-
*/
|
|
72
|
-
onCfgChange(handler: WatcherFunction<IConfiguration>): IUnloadHook;
|
|
73
|
-
}
|
|
74
|
-
export { IConfiguration, AppInsightsCore, IAppInsightsCore, ITelemetryItem, ILoadedPlugin, arrForEach, SendRequestReason, _eInternalMessageId, isNullOrUndefined, throwError, proxyFunctions, IPlugin, ITelemetryPlugin } from "@microsoft/applicationinsights-core-js";
|
|
75
|
-
export { SeverityLevel, eSeverityLevel, IPageViewTelemetry, IDependencyTelemetry, IAutoExceptionTelemetry, IEventTelemetry, IMetricTelemetry, IPageViewPerformanceTelemetry, ITraceTelemetry } from "@microsoft/applicationinsights-common";
|
|
76
|
-
export { Sender } from "@microsoft/applicationinsights-channel-js";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
-
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
-
{
|
|
4
|
-
"tsdocVersion": "0.12",
|
|
5
|
-
"toolPackages": [
|
|
6
|
-
{
|
|
7
|
-
"packageName": "@microsoft/api-extractor",
|
|
8
|
-
"packageVersion": "7.34.4"
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
|
File without changes
|
|
File without changes
|