[Beta] Fix merge issues from master
This commit is contained in:
Родитель
d8abe518ac
Коммит
894d913193
|
@ -4,7 +4,7 @@ import {
|
|||
DistributedTracingModes, PropertiesPluginIdentifier, RequestHeaders, SeverityLevel
|
||||
} from "@microsoft/applicationinsights-common";
|
||||
import { dumpObj, LoggingSeverity, objForEachKey, objKeys, strUndefined } from "@microsoft/applicationinsights-core-js";
|
||||
import { Snippet } from "../../../src/Initialization";
|
||||
import { Snippet } from "../../../src/Snippet";
|
||||
|
||||
declare var define;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
crossOrigin: "anonymous", // When supplied this will add the provided value as the cross origin attribute on the script tag
|
||||
cfg: { // Application Insights Configuration
|
||||
instrumentationKey: "INSTRUMENTATION_KEY",
|
||||
disableIKeyValidation: true
|
||||
//disableIKeyValidation: true
|
||||
}});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ import {
|
|||
DependencyListenerFunction, IDependencyListenerHandler
|
||||
} from "@microsoft/applicationinsights-dependencies-js/types/DependencyListener";
|
||||
import { PropertiesPlugin } from "@microsoft/applicationinsights-properties-js";
|
||||
import { objDefineProp, strIndexOf, throwUnsupported } from "@nevware21/ts-utils";
|
||||
import { objDefine, strIndexOf, throwUnsupported } from "@nevware21/ts-utils";
|
||||
import { IApplicationInsights } from "./IApplicationInsights";
|
||||
import {
|
||||
STR_ADD_TELEMETRY_INITIALIZER, STR_CLEAR_AUTHENTICATED_USER_CONTEXT, STR_EVT_NAMESPACE, STR_GET_COOKIE_MGR, STR_GET_PLUGIN,
|
||||
|
@ -97,24 +97,20 @@ export class AppInsightsSku implements IApplicationInsights {
|
|||
dynamicProto(AppInsightsSku, this, (_self) => {
|
||||
_initDefaults();
|
||||
|
||||
objDefineProp(_self, "config", {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
get: function() {
|
||||
objDefine(_self, "config", {
|
||||
g: function() {
|
||||
return _config;
|
||||
},
|
||||
set: function(newValue: IConfiguration) {
|
||||
s: function(newValue: IConfiguration) {
|
||||
if (_core) {
|
||||
_core.config = newValue;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
arrForEach(["pluginVersionStringArr", "pluginVersionString"], (key) => {
|
||||
objDefineProp(_self, key, {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
get: () => {
|
||||
arrForEach(["pluginVersionStringArr", "pluginVersionString"], (key: keyof AppInsightsSku) => {
|
||||
objDefine(_self, key, {
|
||||
g: () => {
|
||||
if (_core) {
|
||||
return _core[key];
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ export class ApplicationInsightsDynamicConfigTests extends AITestClass {
|
|||
static registerTests: any;
|
||||
|
||||
constructor(testName?: string) {
|
||||
super(testName || "ApplicationInsightsAISKULightTests");
|
||||
super(testName || "AISKU Dynamic Config");
|
||||
}
|
||||
|
||||
protected _getTestConfig(sessionPrefix: string) {
|
||||
|
|
|
@ -8,7 +8,7 @@ import {
|
|||
AppInsightsCore, IConfigDefaults, IConfiguration, IDynamicConfigHandler, ILoadedPlugin, IPlugin, ITelemetryItem, ITelemetryPlugin,
|
||||
IUnloadHook, UnloadHandler, WatcherFunction, createDynamicConfig, onConfigChange, proxyFunctions
|
||||
} from "@microsoft/applicationinsights-core-js";
|
||||
import { isNullOrUndefined, objDefineProp, throwError } from "@nevware21/ts-utils";
|
||||
import { isNullOrUndefined, objDefine, throwError } from "@nevware21/ts-utils";
|
||||
|
||||
const defaultConfigValues: IConfigDefaults<IConfiguration> = {
|
||||
diagnosticLogInterval: { isVal: _chkDiagLevel, v: 10000 }
|
||||
|
@ -45,18 +45,9 @@ export class ApplicationInsights {
|
|||
|
||||
dynamicProto(ApplicationInsights, this, (_self) => {
|
||||
|
||||
if (config.connectionString) {
|
||||
const cs = parseConnectionString(config.connectionString);
|
||||
const ingest = cs.ingestionendpoint;
|
||||
config.endpointUrl = ingest ? (ingest + DEFAULT_BREEZE_PATH) : config.endpointUrl; // only add /v2/track when from connectionstring
|
||||
config.instrumentationKey = cs.instrumentationkey || config.instrumentationKey;
|
||||
}
|
||||
|
||||
// Define _self.config
|
||||
objDefineProp(_self, "config", {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
get: () => _config
|
||||
objDefine(_self, "config", {
|
||||
g: () => _config
|
||||
});
|
||||
|
||||
_initialize();
|
||||
|
|
|
@ -5,18 +5,17 @@
|
|||
<meta charset="utf-8">
|
||||
<meta http-equiv="Cache-control" content="no-Cache" />
|
||||
<title>Tests for Application Insights JavaScript API</title>
|
||||
<link rel="stylesheet" href="../../../common/Tests//External/qunit-2.9.1.css">
|
||||
<link rel="stylesheet" href="../../../common/Tests/External/qunit-2.9.3.css">
|
||||
<!-- <script src="../../../common/Tests/External/sinon-7.3.1.js"></script> -->
|
||||
<script src="../../../common/Tests/External/require-2.3.6.js"></script>
|
||||
<script src="../../../common/Tests/Selenium/ModuleLoader.js"></script>
|
||||
<script src="../../../common/Tests/Selenium/SimpleSyncPromise.js"></script>
|
||||
<script>
|
||||
var modules = new ModuleLoader({
|
||||
baseUrl: '../',
|
||||
paths: {
|
||||
qunit: "../../common/Tests/External/qunit-1.23.1",
|
||||
qunit: "../../common/Tests/External/qunit-2.9.3",
|
||||
sinon: "../../common/Tests/External/sinon-7.3.1",
|
||||
"whatwg-fetch": "../../common/Tests/External/whatwg-fetch.3.0.0"
|
||||
"whatwg-fetch": "../../common/Tests/External/whatwg-fetch.3.6.2"
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -2296,9 +2296,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-security": {
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-1.7.0.tgz",
|
||||
"integrity": "sha512-+ahcCh7M5w7fdFaNccaChBGq8nd3Wa+XvGJS+hY74kvrMhG4EuLbljRIjilOqh1iDMW/EckB1oOWmiVIYlVACQ==",
|
||||
"version": "1.7.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-1.7.1.tgz",
|
||||
"integrity": "sha512-sMStceig8AFglhhT2LqlU5r+/fn9OwsA72O5bBuQVTssPCdQAOQzL+oMn/ZcpeUY6KcNfLJArgcrsSULNjYYdQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"safe-regex": "^2.1.1"
|
||||
|
@ -5383,9 +5383,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/validator": {
|
||||
"version": "13.7.0",
|
||||
"resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz",
|
||||
"integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==",
|
||||
"version": "13.9.0",
|
||||
"resolved": "https://registry.npmjs.org/validator/-/validator-13.9.0.tgz",
|
||||
"integrity": "sha512-B+dGG8U3fdtM0/aNK4/X8CXq/EcxU2WPrPEkJGslb47qyHsxmbggTWK0yEA4qnYVNF+nxNlN88o14hIcPmSIEA==",
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
|
@ -7293,9 +7293,9 @@
|
|||
}
|
||||
},
|
||||
"eslint-plugin-security": {
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-1.7.0.tgz",
|
||||
"integrity": "sha512-+ahcCh7M5w7fdFaNccaChBGq8nd3Wa+XvGJS+hY74kvrMhG4EuLbljRIjilOqh1iDMW/EckB1oOWmiVIYlVACQ==",
|
||||
"version": "1.7.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-1.7.1.tgz",
|
||||
"integrity": "sha512-sMStceig8AFglhhT2LqlU5r+/fn9OwsA72O5bBuQVTssPCdQAOQzL+oMn/ZcpeUY6KcNfLJArgcrsSULNjYYdQ==",
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"safe-regex": "^2.1.1"
|
||||
|
@ -9613,9 +9613,9 @@
|
|||
}
|
||||
},
|
||||
"validator": {
|
||||
"version": "13.7.0",
|
||||
"resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz",
|
||||
"integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw=="
|
||||
"version": "13.9.0",
|
||||
"resolved": "https://registry.npmjs.org/validator/-/validator-13.9.0.tgz",
|
||||
"integrity": "sha512-B+dGG8U3fdtM0/aNK4/X8CXq/EcxU2WPrPEkJGslb47qyHsxmbggTWK0yEA4qnYVNF+nxNlN88o14hIcPmSIEA=="
|
||||
},
|
||||
"webidl-conversions": {
|
||||
"version": "3.0.1",
|
||||
|
|
|
@ -2,7 +2,7 @@ import { Assert, AITestClass } from "@microsoft/ai-test-framework";
|
|||
import * as pako from "pako";
|
||||
|
||||
export class PropertiesExtensionSizeCheck extends AITestClass {
|
||||
private readonly MAX_DEFLATE_SIZE = 16;
|
||||
private readonly MAX_DEFLATE_SIZE = 17;
|
||||
private readonly rawFilePath = "../dist/applicationinsights-properties-js.min.js";
|
||||
private readonly proFilePath = "../browser/applicationinsights-properties-js.min.js";
|
||||
|
||||
|
|
|
@ -535,7 +535,7 @@ export class ThrottleMgrTest extends AITestClass {
|
|||
} as IThrottleLimit,
|
||||
interval: {
|
||||
monthInterval: 1,
|
||||
dayInterval: date.getUTCDate()
|
||||
dayInterval: 1
|
||||
} as IThrottleInterval
|
||||
} as IThrottleMgrConfig;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче