@microsoft/applicationinsights-channel-js 2.7.1-nightly.202110-07 → 2.7.1-nightly.202110-16

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.
Files changed (44) hide show
  1. package/browser/applicationinsights-channel-js.integrity.json +9 -9
  2. package/browser/applicationinsights-channel-js.js +74 -65
  3. package/browser/applicationinsights-channel-js.js.map +1 -1
  4. package/browser/applicationinsights-channel-js.min.js +2 -2
  5. package/browser/applicationinsights-channel-js.min.js.map +1 -1
  6. package/dist/applicationinsights-channel-js.api.json +1 -1
  7. package/dist/applicationinsights-channel-js.d.ts +1 -1
  8. package/dist/applicationinsights-channel-js.js +74 -65
  9. package/dist/applicationinsights-channel-js.js.map +1 -1
  10. package/dist/applicationinsights-channel-js.min.js +2 -2
  11. package/dist/applicationinsights-channel-js.min.js.map +1 -1
  12. package/dist/applicationinsights-channel-js.rollup.d.ts +1 -1
  13. package/dist-esm/EnvelopeCreator.js +17 -17
  14. package/dist-esm/EnvelopeCreator.js.map +1 -1
  15. package/dist-esm/Interfaces.js +1 -1
  16. package/dist-esm/Offline.js +5 -5
  17. package/dist-esm/Offline.js.map +1 -1
  18. package/dist-esm/SendBuffer.js +4 -4
  19. package/dist-esm/SendBuffer.js.map +1 -1
  20. package/dist-esm/Sender.js +17 -17
  21. package/dist-esm/Sender.js.map +1 -1
  22. package/dist-esm/Serializer.js +3 -3
  23. package/dist-esm/Serializer.js.map +1 -1
  24. package/dist-esm/TelemetryProcessors/Sample.js +4 -4
  25. package/dist-esm/TelemetryProcessors/Sample.js.map +1 -1
  26. package/dist-esm/TelemetryProcessors/SamplingScoreGenerators/HashCodeScoreGenerator.js +1 -1
  27. package/dist-esm/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.js +3 -3
  28. package/dist-esm/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.js.map +1 -1
  29. package/dist-esm/applicationinsights-channel-js.js +1 -1
  30. package/package.json +3 -4
  31. package/src/EnvelopeCreator.ts +18 -17
  32. package/src/Offline.ts +4 -4
  33. package/src/SendBuffer.ts +4 -4
  34. package/src/Sender.ts +17 -17
  35. package/src/Serializer.ts +3 -3
  36. package/src/TelemetryProcessors/Sample.ts +3 -3
  37. package/src/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.ts +3 -3
  38. package/types/EnvelopeCreator.d.ts +2 -2
  39. package/types/SendBuffer.d.ts +2 -2
  40. package/types/Sender.d.ts +4 -4
  41. package/types/Serializer.d.ts +2 -2
  42. package/types/TelemetryProcessors/Sample.d.ts +2 -2
  43. package/types/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.d.ts +1 -1
  44. package/types/tsdoc-metadata.json +1 -1
package/src/Sender.ts CHANGED
@@ -1,28 +1,28 @@
1
- import { ISenderConfig, XDomainRequest as IXDomainRequest, IBackendResponse } from './Interfaces';
2
- import { ISendBuffer, SessionStorageSendBuffer, ArraySendBuffer } from './SendBuffer';
1
+ import { ISenderConfig, XDomainRequest as IXDomainRequest, IBackendResponse } from "./Interfaces";
2
+ import { ISendBuffer, SessionStorageSendBuffer, ArraySendBuffer } from "./SendBuffer";
3
3
  import {
4
4
  DependencyEnvelopeCreator, EventEnvelopeCreator,
5
5
  ExceptionEnvelopeCreator, MetricEnvelopeCreator, PageViewEnvelopeCreator,
6
6
  PageViewPerformanceEnvelopeCreator, TraceEnvelopeCreator
7
- } from './EnvelopeCreator';
8
- import { Serializer } from './Serializer'; // todo move to channel
7
+ } from "./EnvelopeCreator";
8
+ import { Serializer } from "./Serializer"; // todo move to channel
9
9
  import {
10
10
  DisabledPropertyName, RequestHeaders, IEnvelope, PageView, Event,
11
11
  Trace, Exception, Metric, PageViewPerformance, RemoteDependencyData,
12
12
  IChannelControlsAI, IConfig, ProcessLegacy, BreezeChannelIdentifier,
13
13
  SampleRate, isInternalApplicationInsightsEndpoint, utlCanUseSessionStorage,
14
14
  ISample
15
- } from '@microsoft/applicationinsights-common';
15
+ } from "@microsoft/applicationinsights-common";
16
16
  import {
17
17
  ITelemetryItem, IProcessTelemetryContext, IConfiguration,
18
18
  _InternalMessageId, LoggingSeverity, IDiagnosticLogger, IAppInsightsCore, IPlugin,
19
19
  getWindow, getNavigator, getJSON, BaseTelemetryPlugin, ITelemetryPluginChain, INotificationManager,
20
20
  SendRequestReason, objForEachKey, isNullOrUndefined, arrForEach, dateNow, dumpObj, getExceptionName, getIEVersion, throwError, objKeys,
21
21
  isBeaconsSupported, isFetchSupported, useXDomainRequest, isXhrSupported, isArray
22
- } from '@microsoft/applicationinsights-core-js';
23
- import { Offline } from './Offline';
24
- import { Sample } from './TelemetryProcessors/Sample'
25
- import dynamicProto from '@microsoft/dynamicproto-js';
22
+ } from "@microsoft/applicationinsights-core-js";
23
+ import { Offline } from "./Offline";
24
+ import { Sample } from "./TelemetryProcessors/Sample"
25
+ import dynamicProto from "@microsoft/dynamicproto-js";
26
26
 
27
27
  const FetchSyncRequestSizeLimitBytes = 65000; // approx 64kb (the current Edge, Firefox and Chrome max limit)
28
28
 
@@ -504,7 +504,7 @@ export class Sender extends BaseTelemetryPlugin implements IChannelControlsAI {
504
504
  }
505
505
 
506
506
  if (failed.length > 0) {
507
- _self._onError(failed, _formatErrorMessageXhr(null, ['partial success', results.itemsAccepted, 'of', results.itemsReceived].join(' ')));
507
+ _self._onError(failed, _formatErrorMessageXhr(null, ["partial success", results.itemsAccepted, "of", results.itemsReceived].join(" ")));
508
508
  }
509
509
 
510
510
  if (retry.length > 0) {
@@ -619,7 +619,7 @@ export class Sender extends BaseTelemetryPlugin implements IChannelControlsAI {
619
619
  // _stamp_specific_redirects = 0;
620
620
  return false;
621
621
  }
622
- if(!isNullOrUndefined(responseUrl) && responseUrl !== '') {
622
+ if(!isNullOrUndefined(responseUrl) && responseUrl !== "") {
623
623
  if(responseUrl !== _self._senderConfig.endpointUrl()) {
624
624
  _self._senderConfig.endpointUrl = () => responseUrl;
625
625
  ++_stamp_specific_redirects;
@@ -647,7 +647,7 @@ export class Sender extends BaseTelemetryPlugin implements IChannelControlsAI {
647
647
 
648
648
  // Chrome only allows CORS-safelisted values for the sendBeacon data argument
649
649
  // see: https://bugs.chromium.org/p/chromium/issues/detail?id=720283
650
- const plainTextBatch = new Blob([batch], { type: 'text/plain;charset=UTF-8' });
650
+ const plainTextBatch = new Blob([batch], { type: "text/plain;charset=UTF-8" });
651
651
 
652
652
  // The sendBeacon method returns true if the user agent is able to successfully queue the data for transfer. Otherwise it returns false.
653
653
  const queued = nav.sendBeacon(url, plainTextBatch);
@@ -762,7 +762,7 @@ export class Sender extends BaseTelemetryPlugin implements IChannelControlsAI {
762
762
  function _doFetchSender(payload: string[], isAsync: boolean) {
763
763
  const endPointUrl = _self._senderConfig.endpointUrl();
764
764
  const batch = _self._buffer.batchPayloads(payload);
765
- const plainTextBatch = new Blob([batch], { type: 'application/json' });
765
+ const plainTextBatch = new Blob([batch], { type: "application/json" });
766
766
  let requestHeaders = new Headers();
767
767
  let batchLength = batch.length;
768
768
 
@@ -971,7 +971,7 @@ export class Sender extends BaseTelemetryPlugin implements IChannelControlsAI {
971
971
  }
972
972
 
973
973
  const endpointUrl = _self._senderConfig.endpointUrl().replace(/^(https?:)/, "");
974
- xdr.open('POST', endpointUrl);
974
+ xdr.open("POST", endpointUrl);
975
975
 
976
976
  // compose an array of payloads
977
977
  const batch = buffer.batchPayloads(payload);
@@ -990,13 +990,13 @@ export class Sender extends BaseTelemetryPlugin implements IChannelControlsAI {
990
990
 
991
991
  // Using function lookups for backward compatibility as the getNotifyMgr() did not exist until after v2.5.6
992
992
  function _getNotifyMgr() : INotificationManager {
993
- const func = 'getNotifyMgr';
993
+ const func = "getNotifyMgr";
994
994
  if (_self.core[func]) {
995
995
  return _self.core[func]();
996
996
  }
997
997
 
998
998
  // using _self.core['_notificationManager'] for backward compatibility
999
- return _self.core['_notificationManager'];
999
+ return _self.core["_notificationManager"];
1000
1000
  }
1001
1001
 
1002
1002
  function _notifySendRequest(sendRequest: SendRequestReason, isAsync: boolean) {
@@ -1022,7 +1022,7 @@ export class Sender extends BaseTelemetryPlugin implements IChannelControlsAI {
1022
1022
  if(disableIKeyValidationFlag) {
1023
1023
  return true;
1024
1024
  }
1025
- const UUID_Regex = '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$';
1025
+ const UUID_Regex = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$";
1026
1026
  const regexp = new RegExp(UUID_Regex);
1027
1027
  return regexp.test(config.instrumentationKey);
1028
1028
  }
package/src/Serializer.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { ISerializable, FieldType } from '@microsoft/applicationinsights-common';
1
+ import { ISerializable, FieldType } from "@microsoft/applicationinsights-common";
2
2
  import {
3
3
  IDiagnosticLogger, LoggingSeverity, _InternalMessageId, getJSON, objForEachKey, isFunction, isObject, isArray
4
- } from '@microsoft/applicationinsights-core-js';
5
- import dynamicProto from '@microsoft/dynamicproto-js'
4
+ } from "@microsoft/applicationinsights-core-js";
5
+ import dynamicProto from "@microsoft/dynamicproto-js"
6
6
 
7
7
  export class Serializer {
8
8
 
@@ -1,9 +1,9 @@
1
1
  // Copyright (c) Microsoft Corporation. All rights reserved.
2
2
  // Licensed under the MIT License.
3
3
 
4
- import { SamplingScoreGenerator } from './SamplingScoreGenerators/SamplingScoreGenerator';
5
- import { ISample, Metric } from '@microsoft/applicationinsights-common';
6
- import { ITelemetryItem, IDiagnosticLogger, _InternalMessageId, LoggingSeverity, safeGetLogger } from '@microsoft/applicationinsights-core-js';
4
+ import { SamplingScoreGenerator } from "./SamplingScoreGenerators/SamplingScoreGenerator";
5
+ import { ISample, Metric } from "@microsoft/applicationinsights-common";
6
+ import { ITelemetryItem, IDiagnosticLogger, _InternalMessageId, LoggingSeverity, safeGetLogger } from "@microsoft/applicationinsights-core-js";
7
7
 
8
8
  export class Sample implements ISample {
9
9
  public sampleRate: number;
@@ -1,9 +1,9 @@
1
1
  // Copyright (c) Microsoft Corporation. All rights reserved.
2
2
  // Licensed under the MIT License.
3
3
 
4
- import { HashCodeScoreGenerator } from './HashCodeScoreGenerator';
5
- import { ITelemetryItem } from '@microsoft/applicationinsights-core-js';
6
- import { ContextTagKeys } from '@microsoft/applicationinsights-common';
4
+ import { HashCodeScoreGenerator } from "./HashCodeScoreGenerator";
5
+ import { ITelemetryItem } from "@microsoft/applicationinsights-core-js";
6
+ import { ContextTagKeys } from "@microsoft/applicationinsights-common";
7
7
 
8
8
  export class SamplingScoreGenerator {
9
9
 
@@ -1,5 +1,5 @@
1
- import { IEnvelope } from '@microsoft/applicationinsights-common';
2
- import { ITelemetryItem, IDiagnosticLogger } from '@microsoft/applicationinsights-core-js';
1
+ import { IEnvelope } from "@microsoft/applicationinsights-common";
2
+ import { ITelemetryItem, IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
3
3
  export declare const EnvelopeCreator: {
4
4
  Version: string;
5
5
  };
@@ -1,5 +1,5 @@
1
- import { IDiagnosticLogger } from '@microsoft/applicationinsights-core-js';
2
- import { ISenderConfig } from './Interfaces';
1
+ import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
2
+ import { ISenderConfig } from "./Interfaces";
3
3
  export interface ISendBuffer {
4
4
  /**
5
5
  * Enqueue the payload
package/types/Sender.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { ISenderConfig, XDomainRequest as IXDomainRequest, IBackendResponse } from './Interfaces';
2
- import { ISendBuffer } from './SendBuffer';
3
- import { IEnvelope, IChannelControlsAI, IConfig, ISample } from '@microsoft/applicationinsights-common';
4
- import { ITelemetryItem, IProcessTelemetryContext, IConfiguration, IDiagnosticLogger, IAppInsightsCore, IPlugin, BaseTelemetryPlugin, ITelemetryPluginChain, SendRequestReason } from '@microsoft/applicationinsights-core-js';
1
+ import { ISenderConfig, XDomainRequest as IXDomainRequest, IBackendResponse } from "./Interfaces";
2
+ import { ISendBuffer } from "./SendBuffer";
3
+ import { IEnvelope, IChannelControlsAI, IConfig, ISample } from "@microsoft/applicationinsights-common";
4
+ import { ITelemetryItem, IProcessTelemetryContext, IConfiguration, IDiagnosticLogger, IAppInsightsCore, IPlugin, BaseTelemetryPlugin, ITelemetryPluginChain, SendRequestReason } from "@microsoft/applicationinsights-core-js";
5
5
  export declare type SenderFunction = (payload: string[], isAsync: boolean) => void;
6
6
  export declare class Sender extends BaseTelemetryPlugin implements IChannelControlsAI {
7
7
  static constructEnvelope(orig: ITelemetryItem, iKey: string, logger: IDiagnosticLogger, convertUndefined?: any): IEnvelope;
@@ -1,5 +1,5 @@
1
- import { ISerializable } from '@microsoft/applicationinsights-common';
2
- import { IDiagnosticLogger } from '@microsoft/applicationinsights-core-js';
1
+ import { ISerializable } from "@microsoft/applicationinsights-common";
2
+ import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
3
3
  export declare class Serializer {
4
4
  constructor(logger: IDiagnosticLogger);
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { ISample } from '@microsoft/applicationinsights-common';
2
- import { ITelemetryItem, IDiagnosticLogger } from '@microsoft/applicationinsights-core-js';
1
+ import { ISample } from "@microsoft/applicationinsights-common";
2
+ import { ITelemetryItem, IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
3
3
  export declare class Sample implements ISample {
4
4
  sampleRate: number;
5
5
  INT_MAX_VALUE: number;
@@ -1,4 +1,4 @@
1
- import { ITelemetryItem } from '@microsoft/applicationinsights-core-js';
1
+ import { ITelemetryItem } from "@microsoft/applicationinsights-core-js";
2
2
  export declare class SamplingScoreGenerator {
3
3
  getSamplingScore: (item: ITelemetryItem) => number;
4
4
  constructor();
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.18.11"
8
+ "packageVersion": "7.18.16"
9
9
  }
10
10
  ]
11
11
  }