Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 11 additions & 16 deletions .aiAutoMinify.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,19 @@
"eLoggingSeverity",
"_eInternalMessageId",
"SendRequestReason",
"TransportType",
"eStatsType",
"TelemetryUnloadReason",
"TelemetryUpdateReason",
"eTraceHeadersMode",
"eValueKind",
"EventLatencyValue",
"eEventPropertyType",
"EventSendType",
"eTraceLevel",
"_eExtendedInternalMessageId",
"GuidStyle",
"FieldValueSanitizerType",
"TransportType",
"eAttributeChangeOp",
"eOTelSamplingDecision",
"eOTelSpanKind",
Expand Down Expand Up @@ -65,9 +73,7 @@
"constEnums": []
},
"@microsoft/applicationinsights-clickanalytics-js": {
"constEnums": [
"_eExtendedInternalMessageId"
]
"constEnums": []
},
"@microsoft/applicationinsights-web-basic": {
"constEnums": []
Expand All @@ -92,18 +98,7 @@
]
},
"@microsoft/1ds-core-js": {
"constEnums": [
"eValueKind",
"EventLatencyValue",
"eEventPropertyType",
"EventPersistenceValue",
"EventSendType",
"eTraceLevel",
"_eExtendedInternalMessageId",
"GuidStyle",
"FieldValueSanitizerType",
"TransportType"
]
"constEnums": []
},
"@microsoft/1ds-post-js": {
"constEnums": [
Expand Down
2 changes: 1 addition & 1 deletion channels/1ds-post-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"dependencies": {
"@microsoft/applicationinsights-shims": "3.0.1",
"@microsoft/dynamicproto-js": "^2.0.3",
"@microsoft/1ds-core-js": "4.3.11",
"@microsoft/applicationinsights-core-js": "3.3.11",
"@nevware21/ts-utils": ">= 0.12.6 < 2.x",
"@nevware21/ts-async": ">= 0.5.5 < 2.x"
},
Expand Down
2 changes: 1 addition & 1 deletion channels/1ds-post-js/src/BatchNotificationActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @author Nev Wylie (newylie)
* @copyright Microsoft 2020
*/
import { EventSendType } from "@microsoft/1ds-core-js";
import { EventSendType } from "@microsoft/applicationinsights-core-js";
import { EventBatchNotificationReason } from "./DataModels";
import { EventBatch } from "./EventBatch";

Expand Down
2 changes: 1 addition & 1 deletion channels/1ds-post-js/src/DataModels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import {
IDiagnosticLogger, IExtendedTelemetryItem, IPayloadData, IProcessTelemetryContext, ITelemetryPlugin, IUnloadHook, IValueSanitizer,
IXHROverride
} from "@microsoft/1ds-core-js";
} from "@microsoft/applicationinsights-core-js";

/**
* Defines the function signature for the Payload Preprocessor.
Expand Down
2 changes: 1 addition & 1 deletion channels/1ds-post-js/src/EventBatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @author Nev Wylie (newylie)
* @copyright Microsoft 2020
*/
import { isNullOrUndefined, isValueAssigned } from "@microsoft/1ds-core-js";
import { isNullOrUndefined, isValueAssigned } from "@microsoft/applicationinsights-core-js";
import { IPostTransmissionTelemetryItem } from "./DataModels";
import { STR_EMPTY, STR_MSFPC } from "./InternalConstants";

Expand Down
2 changes: 1 addition & 1 deletion channels/1ds-post-js/src/HttpManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
_throwInternal, _warnToConsole, arrForEach, dateNow, doPerf, dumpObj, eLoggingSeverity, extend, getCommonSchemaMetaData, getNavigator,
getResponseText, getTime, hasOwnProperty, isBeaconsSupported, isFeatureEnabled, isFetchSupported, isNullOrUndefined, isReactNative,
isUndefined, isValueAssigned, objForEachKey, objKeys, onConfigChange, optimizeObject, prependTransports, strUndefined
} from "@microsoft/1ds-core-js";
} from "@microsoft/applicationinsights-core-js";
import { arrAppend, getInst, isFunction } from "@nevware21/ts-utils";
import { BatchNotificationAction, BatchNotificationActions } from "./BatchNotificationActions";
import { IClockSkewManager, createClockSkewManager } from "./ClockSkewManager";
Expand Down
2 changes: 1 addition & 1 deletion channels/1ds-post-js/src/Index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* File to export public classes.
*/

import { IPayloadData, IXHROverride, OnCompleteCallback, SendPOSTFunction } from "@microsoft/1ds-core-js";
import { IPayloadData, IXHROverride, OnCompleteCallback, SendPOSTFunction } from "@microsoft/applicationinsights-core-js";
import {
BE_PROFILE, IChannelConfiguration, IPostChannel, IRequestSizeLimit, NRT_PROFILE, PayloadListenerFunction, PayloadPreprocessorFunction,
RT_PROFILE
Expand Down
2 changes: 1 addition & 1 deletion channels/1ds-post-js/src/KillSwitch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @copyright Microsoft 2018
*/

import { arrForEach, dateNow, strTrim } from "@microsoft/1ds-core-js";
import { arrForEach, dateNow, strTrim } from "@microsoft/applicationinsights-core-js";

const SecToMsMultiplier = 1000;

Expand Down
2 changes: 1 addition & 1 deletion channels/1ds-post-js/src/PostChannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
createUniqueNamespace, doPerf, eLoggingSeverity, getWindow, isChromium, isGreaterThanZero, isNumber, mergeEvtNamespace, objForEachKey,
onConfigChange, optimizeObject, proxyFunctions, removePageHideEventListener, removePageShowEventListener, removePageUnloadEventListener,
setProcessTelemetryTimings
} from "@microsoft/1ds-core-js";
} from "@microsoft/applicationinsights-core-js";
import { IPromise, createPromise } from "@nevware21/ts-async";
import { ITimerHandler, isPromiseLike, mathCeil, mathMax, mathMin, objDeepFreeze } from "@nevware21/ts-utils";
import {
Expand Down
2 changes: 1 addition & 1 deletion channels/1ds-post-js/src/Serializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
EventSendType, FieldValueSanitizerFunc, FieldValueSanitizerType, IEventProperty, IPerfManagerProvider, IValueSanitizer,
SendRequestReason, arrIndexOf, doPerf, getCommonSchemaMetaData, getTenantId, isArray, isValueAssigned, objForEachKey, sanitizeProperty,
strStartsWith
} from "@microsoft/1ds-core-js";
} from "@microsoft/applicationinsights-core-js";
import { IChannelConfiguration, IPostTransmissionTelemetryItem, IRequestSizeLimit } from "./DataModels";
import { EventBatch } from "./EventBatch";
import { STR_EMPTY } from "./InternalConstants";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { _testHookMaxUnloadHooksCb } from "@microsoft/1ds-core-js";
import { _testHookMaxUnloadHooksCb } from "@microsoft/applicationinsights-core-js";
import { Assert } from "@microsoft/ai-test-framework";
import { dumpObj } from "@nevware21/ts-utils";

Expand Down
26 changes: 13 additions & 13 deletions channels/1ds-post-js/test/Unit/src/HttpManagerTest.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AITestClass, PollingAssert } from "@microsoft/ai-test-framework";
import { HttpManager } from "../../../src/HttpManager";
import { AppInsightsCore, BaseTelemetryPlugin, EventSendType, IAppInsightsCore, IConfiguration, IExtendedConfiguration, IPlugin, IProcessTelemetryContext, ITelemetryItem, SendRequestReason, TransportType, isBeaconsSupported} from "@microsoft/1ds-core-js";
import { PostChannel, IXHROverride, IPayloadData } from "../../../src/Index";
import { AppInsightsExtCore, BaseTelemetryPlugin, EventSendType, IAppInsightsCore, IExtendedConfiguration, IPlugin, IProcessTelemetryContext, ITelemetryItem, SendRequestReason, TransportType, isBeaconsSupported, IXHROverride, IPayloadData } from "@microsoft/applicationinsights-core-js";
import { PostChannel } from "../../../src/PostChannel";
import { IPostTransmissionTelemetryItem, EventBatchNotificationReason, IChannelConfiguration } from "../../../src/DataModels";
import { EventBatch } from "../../../src/EventBatch";
import { retryPolicyShouldRetryForStatus } from "../../../src/RetryPolicy";
Expand All @@ -22,7 +22,7 @@ export class HttpManagerTest extends AITestClass {

private postManager: PostChannel
private xhrOverrideSpy: any;
private core: AppInsightsCore;
private core: IAppInsightsCore;
private _requeueEvents: EventDetail[] = [];
private _sendEvents: EventDetail[] = [];
private _sentEvents: EventDetail[] = [];
Expand All @@ -48,7 +48,7 @@ export class HttpManagerTest extends AITestClass {
this._sentEvents = [];
this._dropEvents = [];
this._hookCalls = [];
this.core = new AppInsightsCore();
this.core = new AppInsightsExtCore();
var config = {
instrumentationKey: ""
};
Expand Down Expand Up @@ -837,7 +837,7 @@ export class HttpManagerTest extends AITestClass {
transports: TransportType.Fetch,
};

let core = new AppInsightsCore();
let core = new AppInsightsExtCore();
var config: IExtendedConfiguration = {
instrumentationKey: "",
extensionConfig: {
Expand Down Expand Up @@ -899,7 +899,7 @@ export class HttpManagerTest extends AITestClass {
useSendBeacon: true
};

let core = new AppInsightsCore();
let core = new AppInsightsExtCore();
var config: IExtendedConfiguration = {
instrumentationKey: "",
extensionConfig: {
Expand Down Expand Up @@ -965,7 +965,7 @@ export class HttpManagerTest extends AITestClass {
addNoResponse: false
};

let core = new AppInsightsCore();
let core = new AppInsightsExtCore();
var config: IExtendedConfiguration = {
instrumentationKey: "",
extensionConfig: {
Expand Down Expand Up @@ -1029,7 +1029,7 @@ export class HttpManagerTest extends AITestClass {
useSendBeacon: false
};

let core = new AppInsightsCore();
let core = new AppInsightsExtCore();
var config: IExtendedConfiguration = {
instrumentationKey: "",
extensionConfig: {
Expand Down Expand Up @@ -1093,7 +1093,7 @@ export class HttpManagerTest extends AITestClass {
unloadTransports: TransportType.Fetch
};

let core = new AppInsightsCore();
let core = new AppInsightsExtCore();
var config: IExtendedConfiguration = {
instrumentationKey: "",
extensionConfig: {
Expand Down Expand Up @@ -1161,7 +1161,7 @@ export class HttpManagerTest extends AITestClass {
disableFetchKeepAlive: true
};

let core = new AppInsightsCore();
let core = new AppInsightsExtCore();
var config: IExtendedConfiguration = {
instrumentationKey: "",
extensionConfig: {
Expand Down Expand Up @@ -1229,7 +1229,7 @@ export class HttpManagerTest extends AITestClass {
unloadTransports: [ TransportType.Fetch ]
};

let core = new AppInsightsCore();
let core = new AppInsightsExtCore();
var config: IExtendedConfiguration = {
instrumentationKey: "",
extensionConfig: {
Expand Down Expand Up @@ -1298,7 +1298,7 @@ export class HttpManagerTest extends AITestClass {
addNoResponse: false
};

let core = new AppInsightsCore();
let core = new AppInsightsExtCore();
var config: IExtendedConfiguration = {
instrumentationKey: "",
extensionConfig: {
Expand Down Expand Up @@ -2627,7 +2627,7 @@ export class HttpManagerTest extends AITestClass {
xhrTimeout: 500
};

let core = new AppInsightsCore();
let core = new AppInsightsExtCore();
var config: IExtendedConfiguration = {
instrumentationKey: "",
extensionConfig: {
Expand Down
16 changes: 10 additions & 6 deletions channels/1ds-post-js/test/Unit/src/PostChannelTest.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { AITestClass, PollingAssert, TestHelper } from "@microsoft/ai-test-framework";
import { IExtendedConfiguration, AppInsightsCore, EventLatency, ITelemetryItem, IExtendedTelemetryItem, SendRequestReason, EventSendType, isFetchSupported, objKeys, arrForEach, isBeaconsSupported, EventPersistence, isNullOrUndefined, getGlobal } from '@microsoft/1ds-core-js';
import { PostChannel, IXHROverride, IPayloadData } from '../../../src/Index';
import {
IExtendedConfiguration, EventLatency, ITelemetryItem, IExtendedTelemetryItem, SendRequestReason, EventSendType,
isFetchSupported, objKeys, arrForEach, isBeaconsSupported, EventPersistence, isNullOrUndefined, IXHROverride,
IPayloadData
} from '@microsoft/applicationinsights-core-js';
import { PostChannel } from '../../../src/PostChannel';
import { IPostTransmissionTelemetryItem, IChannelConfiguration } from '../../../src/DataModels';
import { SinonSpy } from 'sinon';
import { createAsyncResolvedPromise, IPromise } from "@nevware21/ts-async";
import { ActiveStatus } from "@microsoft/1ds-core-js";
import { createAsyncResolvedPromise } from "@nevware21/ts-async";
import { ActiveStatus, AppInsightsExtCore } from "@microsoft/applicationinsights-core-js";
import { setBypassLazyCache } from "@nevware21/ts-utils";


Expand All @@ -30,7 +34,7 @@ export class PostChannelTest extends AITestClass {
private setTimeoutOverride: Function;
private clearTimeoutOverride: Function;
private genericSpy: SinonSpy;
private core: AppInsightsCore;
private core: AppInsightsExtCore;
private eventsSent: Array<IExtendedTelemetryItem> = [];
private eventsDiscarded: Array<IExtendedTelemetryItem> = [];
private eventsSendRequests: Array<IEventsSendRequests> = [];
Expand All @@ -53,7 +57,7 @@ export class PostChannelTest extends AITestClass {
// Reset the cached isBeacons supported
isBeaconsSupported(false);

this.core = new AppInsightsCore();
this.core = new AppInsightsExtCore();
this.config = {
instrumentationKey: 'testIkey',
endpointUrl: 'https://testEndpoint',
Expand Down
4 changes: 2 additions & 2 deletions channels/1ds-post-js/test/Unit/src/SerializerTest.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AITestClass } from "@microsoft/ai-test-framework";
import { HttpManager } from '../../../src/HttpManager';
import { AppInsightsCore, EventLatency, EventSendType, IEventProperty, SendRequestReason } from '@microsoft/1ds-core-js';
import { PostChannel, IXHROverride, IPayloadData } from '../../../src/Index';
import { AppInsightsCore, EventLatency, EventSendType, IEventProperty, SendRequestReason, IXHROverride, IPayloadData } from '@microsoft/applicationinsights-core-js';
import { PostChannel } from '../../../src/PostChannel';
import { IPostTransmissionTelemetryItem, EventBatchNotificationReason, IChannelConfiguration } from '../../../src/DataModels';
import { Serializer } from '../../../src/Serializer';
import { EventBatch } from "../../../src/EventBatch";
Expand Down
2 changes: 1 addition & 1 deletion channels/1ds-post-js/test/Unit/src/TestHelper.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IExtendedTelemetryItem } from '@microsoft/1ds-core-js';
import { IExtendedTelemetryItem } from '@microsoft/applicationinsights-core-js';

export class TestHelper {
private static _idCount = 0;
Expand Down
Loading
Loading