@microsoft/applicationinsights-web-basic 3.0.0-beta.2302-04 → 3.0.0-beta.2302-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.
- package/browser/aib.2.js +165 -77
- package/browser/aib.2.js.map +1 -1
- package/browser/aib.2.min.js +2 -2
- package/browser/aib.2.min.js.map +1 -1
- package/browser/aib.3.0.0-beta.2302-05.integrity.json +26 -0
- package/browser/{aib.3.0.0-beta.2302-04.js → aib.3.0.0-beta.2302-05.js} +166 -78
- package/browser/aib.3.0.0-beta.2302-05.js.map +1 -0
- package/browser/aib.3.0.0-beta.2302-05.min.js +6 -0
- package/browser/aib.3.0.0-beta.2302-05.min.js.map +1 -0
- package/dist/applicationinsights-web-basic.d.ts +25 -4
- package/dist/applicationinsights-web-basic.js +165 -77
- package/dist/applicationinsights-web-basic.js.map +1 -1
- package/dist/applicationinsights-web-basic.min.js +2 -2
- package/dist/applicationinsights-web-basic.min.js.map +1 -1
- package/dist/applicationinsights-web-basic.rollup.d.ts +25 -4
- package/dist-esm/__DynamicConstants.js +1 -1
- package/dist-esm/index.js +3 -3
- package/dist-esm/index.js.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +2 -2
- package/browser/aib.3.0.0-beta.2302-04.integrity.json +0 -26
- package/browser/aib.3.0.0-beta.2302-04.js.map +0 -1
- package/browser/aib.3.0.0-beta.2302-04.min.js +0 -6
- package/browser/aib.3.0.0-beta.2302-04.min.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft.ApplicationInsights, 3.0.0-beta.2302-
|
|
2
|
+
* Microsoft.ApplicationInsights, 3.0.0-beta.2302-05
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -1123,7 +1123,7 @@ declare type IConfigCheckFn<V> = (value: V) => boolean;
|
|
|
1123
1123
|
/**
|
|
1124
1124
|
* The default values with a check function
|
|
1125
1125
|
*/
|
|
1126
|
-
declare interface IConfigDefaultCheck<T, V, C
|
|
1126
|
+
declare interface IConfigDefaultCheck<T, V, C = IConfiguration> {
|
|
1127
1127
|
/**
|
|
1128
1128
|
* Callback function to check if the user-supplied value is valid, if not the default will be applied
|
|
1129
1129
|
*/
|
|
@@ -1135,7 +1135,7 @@ declare interface IConfigDefaultCheck<T, V, C extends IConfiguration = IConfigur
|
|
|
1135
1135
|
/**
|
|
1136
1136
|
* The default value to apply if the user-supplied value is not valid
|
|
1137
1137
|
*/
|
|
1138
|
-
v?: V
|
|
1138
|
+
v?: V | IConfigDefaults<V, T>;
|
|
1139
1139
|
/**
|
|
1140
1140
|
* The default fallback key if the main key is not present, this is the key value from the config
|
|
1141
1141
|
*/
|
|
@@ -1145,13 +1145,34 @@ declare interface IConfigDefaultCheck<T, V, C extends IConfiguration = IConfigur
|
|
|
1145
1145
|
* therefore `null`; `""` are considered to be valid values.
|
|
1146
1146
|
*/
|
|
1147
1147
|
dfVal?: (value: any) => boolean;
|
|
1148
|
+
/**
|
|
1149
|
+
* Specify that any provided value should have the default value(s) merged into the value rather than
|
|
1150
|
+
* just using either the default of user provided values. Mergeed objects will automatically be marked
|
|
1151
|
+
* as referenced.
|
|
1152
|
+
*/
|
|
1153
|
+
mrg?: boolean;
|
|
1154
|
+
/**
|
|
1155
|
+
* Set this field of the target as referenced, which will cause any object or array instance
|
|
1156
|
+
* to be updated in-place rather than being entirely replaced. All other values will continue to be replaced.
|
|
1157
|
+
* This is required for nested default objects to avoid multiple repetitive updates to listeners
|
|
1158
|
+
* @returns The referenced properties current value
|
|
1159
|
+
*/
|
|
1160
|
+
ref?: boolean;
|
|
1161
|
+
/**
|
|
1162
|
+
* Set this field of the target as read-only, which will block this single named property from
|
|
1163
|
+
* ever being changed for the target instance.
|
|
1164
|
+
* This does NOT freeze or seal the instance, it just stops the direct re-assignment of the named property,
|
|
1165
|
+
* if the value is a non-primitive (ie. an object or array) it's properties will still be mutable.
|
|
1166
|
+
* @returns The referenced properties current value
|
|
1167
|
+
*/
|
|
1168
|
+
rdOnly?: boolean;
|
|
1148
1169
|
}
|
|
1149
1170
|
|
|
1150
1171
|
/**
|
|
1151
1172
|
* The Type definition to define default values to be applied to the config
|
|
1152
1173
|
* The value may be either the direct value or a ConfigDefaultCheck definition
|
|
1153
1174
|
*/
|
|
1154
|
-
declare type IConfigDefaults<T, C
|
|
1175
|
+
declare type IConfigDefaults<T, C = IConfiguration> = {
|
|
1155
1176
|
[key in keyof T]: T[key] | IConfigDefaultCheck<T, T[key], C>;
|
|
1156
1177
|
};
|
|
1157
1178
|
|
package/dist-esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript Web SDK - Basic, 3.0.0-beta.2302-
|
|
2
|
+
* Application Insights JavaScript Web SDK - Basic, 3.0.0-beta.2302-05
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
8
8
|
import { Sender } from "@microsoft/applicationinsights-channel-js";
|
|
9
9
|
import { DEFAULT_BREEZE_PATH, parseConnectionString } from "@microsoft/applicationinsights-common";
|
|
10
|
-
import { AppInsightsCore, createDynamicConfig, onConfigChange, proxyFunctions } from "@microsoft/applicationinsights-core-js";
|
|
10
|
+
import { AppInsightsCore, cfgDfValidate, createDynamicConfig, onConfigChange, proxyFunctions } from "@microsoft/applicationinsights-core-js";
|
|
11
11
|
import { isNullOrUndefined, objDefine, throwError } from "@nevware21/ts-utils";
|
|
12
12
|
import { _DYN_CONNECTION_STRING, _DYN_INSTRUMENTATION_KEY } from "./__DynamicConstants";
|
|
13
13
|
var defaultConfigValues = {
|
|
14
|
-
diagnosticLogInterval:
|
|
14
|
+
diagnosticLogInterval: cfgDfValidate(_chkDiagLevel, 10000)
|
|
15
15
|
};
|
|
16
16
|
function _chkDiagLevel(value) {
|
|
17
17
|
// Make sure we have a value > 0
|
package/dist-esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js.map","sources":["index.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { Sender } from \"@microsoft/applicationinsights-channel-js\";\r\nimport { DEFAULT_BREEZE_PATH, parseConnectionString } from \"@microsoft/applicationinsights-common\";\r\nimport { AppInsightsCore, createDynamicConfig, onConfigChange, proxyFunctions } from \"@microsoft/applicationinsights-core-js\";\r\nimport { isNullOrUndefined, objDefine, throwError } from \"@nevware21/ts-utils\";\r\nimport { _DYN_CONNECTION_STRING, _DYN_INSTRUMENTATION_KEY } from \"./__DynamicConstants\";\r\nvar defaultConfigValues = {\r\n diagnosticLogInterval:
|
|
1
|
+
{"version":3,"file":"index.js.map","sources":["index.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { Sender } from \"@microsoft/applicationinsights-channel-js\";\r\nimport { DEFAULT_BREEZE_PATH, parseConnectionString } from \"@microsoft/applicationinsights-common\";\r\nimport { AppInsightsCore, cfgDfValidate, createDynamicConfig, onConfigChange, proxyFunctions } from \"@microsoft/applicationinsights-core-js\";\r\nimport { isNullOrUndefined, objDefine, throwError } from \"@nevware21/ts-utils\";\r\nimport { _DYN_CONNECTION_STRING, _DYN_INSTRUMENTATION_KEY } from \"./__DynamicConstants\";\r\nvar defaultConfigValues = {\r\n diagnosticLogInterval: cfgDfValidate(_chkDiagLevel, 10000)\r\n};\r\nfunction _chkDiagLevel(value) {\r\n // Make sure we have a value > 0\r\n return value && value > 0;\r\n}\r\n/**\r\n * @export\r\n * @class ApplicationInsights\r\n */\r\nvar ApplicationInsights = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ApplicationInsights.\r\n * @param config\r\n * @memberof ApplicationInsights\r\n */\r\n function ApplicationInsights(config) {\r\n var core = new AppInsightsCore();\r\n var _config;\r\n // initialize the queue and config in case they are undefined\r\n if (isNullOrUndefined(config) ||\r\n (isNullOrUndefined(config[_DYN_INSTRUMENTATION_KEY /* @min:%2einstrumentationKey */]) && isNullOrUndefined(config[_DYN_CONNECTION_STRING /* @min:%2econnectionString */]))) {\r\n throwError(\"Invalid input configuration\");\r\n }\r\n dynamicProto(ApplicationInsights, this, function (_self) {\r\n // Define _self.config\r\n objDefine(_self, \"config\", {\r\n g: function () { return _config; }\r\n });\r\n _initialize();\r\n _self.initialize = _initialize;\r\n proxyFunctions(_self, core, [\r\n \"track\",\r\n \"flush\",\r\n \"pollInternalLogs\",\r\n \"stopPollingInternalLogs\",\r\n \"unload\",\r\n \"getPlugin\",\r\n \"addPlugin\",\r\n \"evtNamespace\",\r\n \"addUnloadCb\",\r\n \"onCfgChange\"\r\n ]);\r\n function _initialize() {\r\n var cfgHandler = createDynamicConfig(config || {}, defaultConfigValues);\r\n _config = cfgHandler.cfg;\r\n core.addUnloadHook(onConfigChange(cfgHandler, function () {\r\n if (_config[_DYN_CONNECTION_STRING /* @min:%2econnectionString */]) {\r\n var cs = parseConnectionString(_config[_DYN_CONNECTION_STRING /* @min:%2econnectionString */]);\r\n var ingest = cs.ingestionendpoint;\r\n _config.endpointUrl = ingest ? (ingest + DEFAULT_BREEZE_PATH) : _config.endpointUrl; // only add /v2/track when from connectionstring\r\n _config[_DYN_INSTRUMENTATION_KEY /* @min:%2einstrumentationKey */] = cs.instrumentationkey || _config[_DYN_INSTRUMENTATION_KEY /* @min:%2einstrumentationKey */];\r\n }\r\n }));\r\n // initialize core\r\n core.initialize(_config, [new Sender()]);\r\n }\r\n });\r\n }\r\n /**\r\n * Initialize this instance of ApplicationInsights\r\n *\r\n * @memberof ApplicationInsights\r\n */\r\n ApplicationInsights.prototype.initialize = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Send a manually constructed custom event\r\n *\r\n * @param item\r\n * @memberof ApplicationInsights\r\n */\r\n ApplicationInsights.prototype.track = function (item) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Immediately send all batched telemetry\r\n * @param [async=true]\r\n * @memberof ApplicationInsights\r\n */\r\n ApplicationInsights.prototype.flush = function (async) {\r\n if (async === void 0) { async = true; }\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n ApplicationInsights.prototype.pollInternalLogs = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n ApplicationInsights.prototype.stopPollingInternalLogs = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Unload and Tear down the SDK and any initialized plugins, after calling this the SDK will be considered\r\n * to be un-initialized and non-operational, re-initializing the SDK should only be attempted if the previous\r\n * unload call return `true` stating that all plugins reported that they also unloaded, the recommended\r\n * approach is to create a new instance and initialize that instance.\r\n * This is due to possible unexpected side effects caused by plugins not supporting unload / teardown, unable\r\n * to successfully remove any global references or they may just be completing the unload process asynchronously.\r\n */\r\n ApplicationInsights.prototype.unload = function (isAsync, unloadComplete) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n /**\r\n * Find and return the (first) plugin with the specified identifier if present\r\n * @param pluginIdentifier\r\n */\r\n ApplicationInsights.prototype.getPlugin = function (pluginIdentifier) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n /**\r\n * Add a new plugin to the installation\r\n * @param plugin - The new plugin to add\r\n * @param replaceExisting - should any existing plugin be replaced\r\n * @param doAsync - Should the add be performed asynchronously\r\n */\r\n ApplicationInsights.prototype.addPlugin = function (plugin, replaceExisting, doAsync, addCb) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Returns the unique event namespace that should be used\r\n */\r\n ApplicationInsights.prototype.evtNamespace = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n /**\r\n * Add an unload handler that will be called when the SDK is being unloaded\r\n * @param handler - the handler\r\n */\r\n ApplicationInsights.prototype.addUnloadCb = function (handler) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Watches and tracks changes for accesses to the current config, and if the accessed config changes the\r\n * handler will be recalled.\r\n * @param handler\r\n * @returns A watcher handler instance that can be used to remove itself when being unloaded\r\n */\r\n ApplicationInsights.prototype.onCfgChange = function (handler) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n return ApplicationInsights;\r\n}());\r\nexport { ApplicationInsights };\r\nexport { AppInsightsCore, arrForEach, isNullOrUndefined, throwError, proxyFunctions } from \"@microsoft/applicationinsights-core-js\";\r\nexport { SeverityLevel } from \"@microsoft/applicationinsights-common\";\r\nexport { Sender } from \"@microsoft/applicationinsights-channel-js\";\r\n//# sourceMappingURL=index.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;;;;;;;;;;8DAoFM,CAAC;;;;;+BACwB;AAC/B;AACA;AACA;AACA;AACA;AACA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/applicationinsights-web-basic",
|
|
3
|
-
"version": "3.0.0-beta.2302-
|
|
3
|
+
"version": "3.0.0-beta.2302-05",
|
|
4
4
|
"description": "Microsoft Application Insights Javascript SDK core and channel",
|
|
5
5
|
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
|
6
6
|
"author": "Microsoft Application Insights Team",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@microsoft/dynamicproto-js": "^1.1.7",
|
|
55
55
|
"@microsoft/applicationinsights-shims": "2.0.2",
|
|
56
|
-
"@microsoft/applicationinsights-common": "3.0.0-beta.2302-
|
|
57
|
-
"@microsoft/applicationinsights-channel-js": "3.0.0-beta.2302-
|
|
58
|
-
"@microsoft/applicationinsights-core-js": "3.0.0-beta.2302-
|
|
56
|
+
"@microsoft/applicationinsights-common": "3.0.0-beta.2302-05",
|
|
57
|
+
"@microsoft/applicationinsights-channel-js": "3.0.0-beta.2302-05",
|
|
58
|
+
"@microsoft/applicationinsights-core-js": "3.0.0-beta.2302-05",
|
|
59
59
|
"@nevware21/ts-utils": ">= 0.7 < 2.x"
|
|
60
60
|
},
|
|
61
61
|
"license": "MIT",
|
package/src/index.ts
CHANGED
|
@@ -6,12 +6,12 @@ import { Sender } from "@microsoft/applicationinsights-channel-js";
|
|
|
6
6
|
import { DEFAULT_BREEZE_PATH, IConfig, parseConnectionString } from "@microsoft/applicationinsights-common";
|
|
7
7
|
import {
|
|
8
8
|
AppInsightsCore, IConfigDefaults, IConfiguration, IDynamicConfigHandler, ILoadedPlugin, IPlugin, ITelemetryItem, ITelemetryPlugin,
|
|
9
|
-
IUnloadHook, UnloadHandler, WatcherFunction, createDynamicConfig, onConfigChange, proxyFunctions
|
|
9
|
+
IUnloadHook, UnloadHandler, WatcherFunction, cfgDfValidate, createDynamicConfig, onConfigChange, proxyFunctions
|
|
10
10
|
} from "@microsoft/applicationinsights-core-js";
|
|
11
11
|
import { isNullOrUndefined, objDefine, throwError } from "@nevware21/ts-utils";
|
|
12
12
|
|
|
13
13
|
const defaultConfigValues: IConfigDefaults<IConfiguration> = {
|
|
14
|
-
diagnosticLogInterval:
|
|
14
|
+
diagnosticLogInterval: cfgDfValidate(_chkDiagLevel, 10000)
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
function _chkDiagLevel(value: number) {
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "aib",
|
|
3
|
-
"version": "3.0.0-beta.2302-04",
|
|
4
|
-
"ext": {
|
|
5
|
-
"@js": {
|
|
6
|
-
"file": "aib.3.0.0-beta.2302-04.js",
|
|
7
|
-
"type": "text/javascript; charset=utf-8",
|
|
8
|
-
"integrity": "sha256-kqo/9dv5P0jn/rYqPLjFxG23eWZR7C/e3YLoBQL3rYE= sha384-pX39DMl1bDILhUX/eQjJn6QLnR0mH58McE106yknEpNSkyU/IvAOu//6Nx8jCRqa sha512-jZcTRj0nzOVIzNXi8/yNYFS3izYz3oYr4PUMcs2QW8geJippph2700BRPwq8S4laq3JeJwtlTbRZrHuQh9qi2g==",
|
|
9
|
-
"hashes": {
|
|
10
|
-
"sha256": "kqo/9dv5P0jn/rYqPLjFxG23eWZR7C/e3YLoBQL3rYE=",
|
|
11
|
-
"sha384": "pX39DMl1bDILhUX/eQjJn6QLnR0mH58McE106yknEpNSkyU/IvAOu//6Nx8jCRqa",
|
|
12
|
-
"sha512": "jZcTRj0nzOVIzNXi8/yNYFS3izYz3oYr4PUMcs2QW8geJippph2700BRPwq8S4laq3JeJwtlTbRZrHuQh9qi2g=="
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"@min.js": {
|
|
16
|
-
"file": "aib.3.0.0-beta.2302-04.min.js",
|
|
17
|
-
"type": "text/javascript; charset=utf-8",
|
|
18
|
-
"integrity": "sha256-k/N08x2ApVx1407WtoQvyeyTdOArXjU0UNuXtQFlgys= sha384-U9gOCg67qL1q57sYdYTGNu2eN1CPT1KSWCJYdCqxR5xxJtTQgcdlDxolr80XJPhC sha512-EXaqcgwOUh3jTvQK9APQMaNTth1j8zRrC3CYFirFuLB4UuACZYc3ozbaIzxMy0FHeaSjAvXpdWF499NFWzUceQ==",
|
|
19
|
-
"hashes": {
|
|
20
|
-
"sha256": "k/N08x2ApVx1407WtoQvyeyTdOArXjU0UNuXtQFlgys=",
|
|
21
|
-
"sha384": "U9gOCg67qL1q57sYdYTGNu2eN1CPT1KSWCJYdCqxR5xxJtTQgcdlDxolr80XJPhC",
|
|
22
|
-
"sha512": "EXaqcgwOUh3jTvQK9APQMaNTth1j8zRrC3CYFirFuLB4UuACZYc3ozbaIzxMy0FHeaSjAvXpdWF499NFWzUceQ=="
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|