@microsoft/1ds-post-js 4.3.6-nightly3.2502-14 → 4.3.7-nightly3.2503-02
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/bundle/es5/{ms.post-4.3.6-nightly3.2502-14.gbl.js → ms.post-4.3.7-nightly3.2503-02.gbl.js} +148 -187
- package/bundle/es5/ms.post-4.3.7-nightly3.2503-02.gbl.js.map +1 -0
- package/bundle/es5/ms.post-4.3.7-nightly3.2503-02.gbl.min.js +7 -0
- package/bundle/es5/ms.post-4.3.7-nightly3.2503-02.gbl.min.js.map +1 -0
- package/bundle/es5/ms.post-4.3.7-nightly3.2503-02.integrity.json +46 -0
- package/bundle/es5/{ms.post-4.3.6-nightly3.2502-14.js → ms.post-4.3.7-nightly3.2503-02.js} +148 -187
- package/bundle/es5/ms.post-4.3.7-nightly3.2503-02.js.map +1 -0
- package/bundle/es5/ms.post-4.3.7-nightly3.2503-02.min.js +7 -0
- package/bundle/es5/ms.post-4.3.7-nightly3.2503-02.min.js.map +1 -0
- package/bundle/es5/ms.post.gbl.js +147 -186
- package/bundle/es5/ms.post.gbl.js.map +1 -1
- package/bundle/es5/ms.post.gbl.min.js +2 -2
- package/bundle/es5/ms.post.gbl.min.js.map +1 -1
- package/bundle/es5/ms.post.integrity.json +17 -17
- package/bundle/es5/ms.post.js +147 -186
- package/bundle/es5/ms.post.js.map +1 -1
- package/bundle/es5/ms.post.min.js +2 -2
- package/bundle/es5/ms.post.min.js.map +1 -1
- package/dist/es5/ms.post.js +145 -184
- package/dist/es5/ms.post.js.map +1 -1
- package/dist/es5/ms.post.min.js +2 -2
- package/dist/es5/ms.post.min.js.map +1 -1
- package/dist-es5/BatchNotificationActions.js +1 -1
- package/dist-es5/ClockSkewManager.js +3 -3
- package/dist-es5/ClockSkewManager.js.map +1 -1
- package/dist-es5/DataModels.js +1 -1
- package/dist-es5/EventBatch.js +3 -3
- package/dist-es5/EventBatch.js.map +1 -1
- package/dist-es5/HttpManager.js +18 -18
- package/dist-es5/HttpManager.js.map +1 -1
- package/dist-es5/Index.js +1 -1
- package/dist-es5/InternalConstants.js +1 -1
- package/dist-es5/KillSwitch.js +1 -1
- package/dist-es5/PostChannel.js +23 -23
- package/dist-es5/PostChannel.js.map +1 -1
- package/dist-es5/RetryPolicy.js +4 -3
- package/dist-es5/RetryPolicy.js.map +1 -1
- package/dist-es5/Serializer.js +3 -3
- package/dist-es5/Serializer.js.map +1 -1
- package/dist-es5/TimeoutOverrideWrapper.js +1 -1
- package/dist-es5/__DynamicConstants.js +9 -25
- package/dist-es5/__DynamicConstants.js.map +1 -1
- package/dist-es5/typings/XDomainRequest.js +1 -1
- package/package.json +3 -3
- package/types/1ds-post-js.d.ts +1 -1
- package/types/1ds-post-js.namespaced.d.ts +1 -1
- package/bundle/es5/ms.post-4.3.6-nightly3.2502-14.gbl.js.map +0 -1
- package/bundle/es5/ms.post-4.3.6-nightly3.2502-14.gbl.min.js +0 -7
- package/bundle/es5/ms.post-4.3.6-nightly3.2502-14.gbl.min.js.map +0 -1
- package/bundle/es5/ms.post-4.3.6-nightly3.2502-14.integrity.json +0 -46
- package/bundle/es5/ms.post-4.3.6-nightly3.2502-14.js.map +0 -1
- package/bundle/es5/ms.post-4.3.6-nightly3.2502-14.min.js +0 -7
- package/bundle/es5/ms.post-4.3.6-nightly3.2502-14.min.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* 1DS JS SDK POST plugin, 4.3.
|
|
2
|
+
* 1DS JS SDK POST plugin, 4.3.7-nightly3.2503-02
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
* (Microsoft Internal Only)
|
|
5
5
|
*/
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @copyright Microsoft 2018
|
|
10
10
|
*/
|
|
11
11
|
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
12
|
-
import { _DYN_ALLOW_REQUEST_SENDIN0,
|
|
12
|
+
import { _DYN_ALLOW_REQUEST_SENDIN0, _DYN_GET_CLOCK_SKEW_HEADE2, _DYN_SET_CLOCK_SKEW, _DYN_SHOULD_ADD_CLOCK_SKE1 } from "./__DynamicConstants";
|
|
13
13
|
/**
|
|
14
14
|
* Class to manage clock skew correction.
|
|
15
15
|
*/
|
|
@@ -33,7 +33,7 @@ var ClockSkewManager = /** @class */ (function () {
|
|
|
33
33
|
* If this method had not yet been called AND the clock Skew had not been set this will set
|
|
34
34
|
* allowRequestSending to false until setClockSet() is called.
|
|
35
35
|
*/
|
|
36
|
-
_self
|
|
36
|
+
_self.firstRequestSent = function () {
|
|
37
37
|
if (_isFirstRequest) {
|
|
38
38
|
_isFirstRequest = false;
|
|
39
39
|
if (!_clockSkewSet) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClockSkewManager.js.map","sources":["ClockSkewManager.js"],"sourcesContent":["/**\r\n* ClockSkewManager.ts\r\n* @author Abhilash Panwar (abpanwar)\r\n* @copyright Microsoft 2018\r\n*/\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { _DYN_ALLOW_REQUEST_SENDIN0,
|
|
1
|
+
{"version":3,"file":"ClockSkewManager.js.map","sources":["ClockSkewManager.js"],"sourcesContent":["/**\r\n* ClockSkewManager.ts\r\n* @author Abhilash Panwar (abpanwar)\r\n* @copyright Microsoft 2018\r\n*/\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { _DYN_ALLOW_REQUEST_SENDIN0, _DYN_GET_CLOCK_SKEW_HEADE2, _DYN_SET_CLOCK_SKEW, _DYN_SHOULD_ADD_CLOCK_SKE1 } from \"./__DynamicConstants\";\r\n/**\r\n* Class to manage clock skew correction.\r\n*/\r\nvar ClockSkewManager = /** @class */ (function () {\r\n function ClockSkewManager() {\r\n var _allowRequestSending = true;\r\n var _shouldAddClockSkewHeaders = true;\r\n var _isFirstRequest = true;\r\n var _clockSkewHeaderValue = \"use-collector-delta\";\r\n var _clockSkewSet = false;\r\n dynamicProto(ClockSkewManager, this, function (_self) {\r\n /**\r\n * Determine if requests can be sent.\r\n * @returns True if requests can be sent, false otherwise.\r\n */\r\n _self[_DYN_ALLOW_REQUEST_SENDIN0 /* @min:%2eallowRequestSending */] = function () {\r\n return _allowRequestSending;\r\n };\r\n /**\r\n * Tells the ClockSkewManager that it should assume that the first request has now been sent,\r\n * If this method had not yet been called AND the clock Skew had not been set this will set\r\n * allowRequestSending to false until setClockSet() is called.\r\n */\r\n _self.firstRequestSent = function () {\r\n if (_isFirstRequest) {\r\n _isFirstRequest = false;\r\n if (!_clockSkewSet) {\r\n // Block sending until we get the first clock Skew\r\n _allowRequestSending = false;\r\n }\r\n }\r\n };\r\n /**\r\n * Determine if clock skew headers should be added to the request.\r\n * @returns True if clock skew headers should be added, false otherwise.\r\n */\r\n _self[_DYN_SHOULD_ADD_CLOCK_SKE1 /* @min:%2eshouldAddClockSkewHeaders */] = function () {\r\n return _shouldAddClockSkewHeaders;\r\n };\r\n /**\r\n * Gets the clock skew header value.\r\n * @returns The clock skew header value.\r\n */\r\n _self[_DYN_GET_CLOCK_SKEW_HEADE2 /* @min:%2egetClockSkewHeaderValue */] = function () {\r\n return _clockSkewHeaderValue;\r\n };\r\n /**\r\n * Sets the clock skew header value. Once clock skew is set this method\r\n * is no-op.\r\n * @param timeDeltaInMillis - Time delta to be saved as the clock skew header value.\r\n */\r\n _self[_DYN_SET_CLOCK_SKEW /* @min:%2esetClockSkew */] = function (timeDeltaInMillis) {\r\n if (!_clockSkewSet) {\r\n if (timeDeltaInMillis) {\r\n _clockSkewHeaderValue = timeDeltaInMillis;\r\n _shouldAddClockSkewHeaders = true;\r\n _clockSkewSet = true;\r\n }\r\n else {\r\n _shouldAddClockSkewHeaders = false;\r\n }\r\n // Unblock sending\r\n _allowRequestSending = true;\r\n }\r\n };\r\n });\r\n }\r\n /**\r\n * Determine if the request can be sent.\r\n * @returns True if requests can be sent, false otherwise.\r\n */\r\n ClockSkewManager.prototype.allowRequestSending = function () {\r\n // @DynamicProtoStub - DO NOT add any code as this will be removed during packaging\r\n return false;\r\n };\r\n /**\r\n * Tells the ClockSkewManager that it should assume that the first request has now been sent,\r\n * If this method had not yet been called AND the clock Skew had not been set this will set\r\n * allowRequestSending to false until setClockSet() is called.\r\n */\r\n ClockSkewManager.prototype.firstRequestSent = function () {\r\n // @DynamicProtoStub - DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Determine if clock skew headers should be added to the request.\r\n * @returns True if clock skew headers should be added, false otherwise.\r\n */\r\n ClockSkewManager.prototype.shouldAddClockSkewHeaders = function () {\r\n // @DynamicProtoStub - DO NOT add any code as this will be removed during packaging\r\n return false;\r\n };\r\n /**\r\n * Gets the clock skew header value.\r\n * @returns The clock skew header value.\r\n */\r\n ClockSkewManager.prototype.getClockSkewHeaderValue = 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 * Sets the clock skew header value. Once clock skew is set this method\r\n * is no-op.\r\n * @param timeDeltaInMillis - Time delta to be saved as the clock skew header value.\r\n */\r\n ClockSkewManager.prototype.setClockSkew = function (timeDeltaInMillis) {\r\n // @DynamicProtoStub - DO NOT add any code as this will be removed during packaging\r\n };\r\n return ClockSkewManager;\r\n}());\r\nexport { ClockSkewManager };\r\n//# sourceMappingURL=ClockSkewManager.js.map"],"names":[],"mappings":";;;;;AAAA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;4DAuCM,CAAC;;;;;4BACqB;AAC5B;AACA;AACA"}
|
package/dist-es5/DataModels.js
CHANGED
package/dist-es5/EventBatch.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* 1DS JS SDK POST plugin, 4.3.
|
|
2
|
+
* 1DS JS SDK POST plugin, 4.3.7-nightly3.2503-02
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
* (Microsoft Internal Only)
|
|
5
5
|
*/
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { isNullOrUndefined, isValueAssigned } from "@microsoft/1ds-core-js";
|
|
12
12
|
import { STR_EMPTY, STR_MSFPC } from "./InternalConstants";
|
|
13
|
-
import { _DYN_CONCAT, _DYN_COUNT, _DYN_EVENTS, _DYN_I_KEY, _DYN_LENGTH, _DYN_PUSH,
|
|
13
|
+
import { _DYN_CONCAT, _DYN_COUNT, _DYN_EVENTS, _DYN_I_KEY, _DYN_LENGTH, _DYN_PUSH, _DYN_SPLIT } from "./__DynamicConstants";
|
|
14
14
|
function _getEventMsfpc(theEvent) {
|
|
15
15
|
var intWeb = ((theEvent.ext || {})["intweb"]);
|
|
16
16
|
if (intWeb && isValueAssigned(intWeb[STR_MSFPC])) {
|
|
@@ -73,7 +73,7 @@ var EventBatch = /** @class */ (function () {
|
|
|
73
73
|
if (!isNullOrUndefined(numEvents)) {
|
|
74
74
|
cnt = numEvents < cnt ? numEvents : cnt;
|
|
75
75
|
}
|
|
76
|
-
theEvents = events
|
|
76
|
+
theEvents = events.splice(fromEvent, cnt);
|
|
77
77
|
// reset the fetched msfpc value
|
|
78
78
|
_msfpc = _getMsfpc(events);
|
|
79
79
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventBatch.js.map","sources":["EventBatch.js"],"sourcesContent":["/**\r\n* EventBatch.ts\r\n* @author Nev Wylie (newylie)\r\n* @copyright Microsoft 2020\r\n*/\r\nimport { isNullOrUndefined, isValueAssigned } from \"@microsoft/1ds-core-js\";\r\nimport { STR_EMPTY, STR_MSFPC } from \"./InternalConstants\";\r\nimport { _DYN_CONCAT, _DYN_COUNT, _DYN_EVENTS, _DYN_I_KEY, _DYN_LENGTH, _DYN_PUSH,
|
|
1
|
+
{"version":3,"file":"EventBatch.js.map","sources":["EventBatch.js"],"sourcesContent":["/**\r\n* EventBatch.ts\r\n* @author Nev Wylie (newylie)\r\n* @copyright Microsoft 2020\r\n*/\r\nimport { isNullOrUndefined, isValueAssigned } from \"@microsoft/1ds-core-js\";\r\nimport { STR_EMPTY, STR_MSFPC } from \"./InternalConstants\";\r\nimport { _DYN_CONCAT, _DYN_COUNT, _DYN_EVENTS, _DYN_I_KEY, _DYN_LENGTH, _DYN_PUSH, _DYN_SPLIT } from \"./__DynamicConstants\";\r\nfunction _getEventMsfpc(theEvent) {\r\n var intWeb = ((theEvent.ext || {})[\"intweb\"]);\r\n if (intWeb && isValueAssigned(intWeb[STR_MSFPC])) {\r\n return intWeb[STR_MSFPC];\r\n }\r\n return null;\r\n}\r\nfunction _getMsfpc(theEvents) {\r\n var msfpc = null;\r\n for (var lp = 0; msfpc === null && lp < theEvents[_DYN_LENGTH /* @min:%2elength */]; lp++) {\r\n msfpc = _getEventMsfpc(theEvents[lp]);\r\n }\r\n return msfpc;\r\n}\r\n/**\r\n* This class defines a \"batch\" events related to a specific iKey, it is used by the PostChannel and HttpManager\r\n* to collect and transfer ownership of events without duplicating them in-memory. This reduces the previous\r\n* array duplication and shared ownership issues that occurred due to race conditions caused by the async nature\r\n* of sending requests.\r\n*/\r\nvar EventBatch = /** @class */ (function () {\r\n /**\r\n * Private constructor so that caller is forced to use the static create method.\r\n * @param iKey - The iKey to associate with the events (not validated)\r\n * @param addEvents - The optional collection of events to assign to this batch - defaults to an empty array.\r\n */\r\n function EventBatch(iKey, addEvents) {\r\n var events = addEvents ? [][_DYN_CONCAT /* @min:%2econcat */](addEvents) : [];\r\n var _self = this;\r\n var _msfpc = _getMsfpc(events);\r\n _self[_DYN_I_KEY /* @min:%2eiKey */] = function () {\r\n return iKey;\r\n };\r\n _self.Msfpc = function () {\r\n // return the cached value unless it's undefined -- used to avoid cpu\r\n return _msfpc || STR_EMPTY;\r\n };\r\n _self[_DYN_COUNT /* @min:%2ecount */] = function () {\r\n return events[_DYN_LENGTH /* @min:%2elength */];\r\n };\r\n _self[_DYN_EVENTS /* @min:%2eevents */] = function () {\r\n return events;\r\n };\r\n _self.addEvent = function (theEvent) {\r\n if (theEvent) {\r\n events[_DYN_PUSH /* @min:%2epush */](theEvent);\r\n if (!_msfpc) {\r\n // Not found so try and find one\r\n _msfpc = _getEventMsfpc(theEvent);\r\n }\r\n return true;\r\n }\r\n return false;\r\n };\r\n _self[_DYN_SPLIT /* @min:%2esplit */] = function (fromEvent, numEvents) {\r\n // Create a new batch with the same iKey\r\n var theEvents;\r\n if (fromEvent < events[_DYN_LENGTH /* @min:%2elength */]) {\r\n var cnt = events[_DYN_LENGTH /* @min:%2elength */] - fromEvent;\r\n if (!isNullOrUndefined(numEvents)) {\r\n cnt = numEvents < cnt ? numEvents : cnt;\r\n }\r\n theEvents = events.splice(fromEvent, cnt);\r\n // reset the fetched msfpc value\r\n _msfpc = _getMsfpc(events);\r\n }\r\n return new EventBatch(iKey, theEvents);\r\n };\r\n }\r\n /**\r\n * Creates a new Event Batch object\r\n * @param iKey - The iKey associated with this batch of events\r\n */\r\n EventBatch.create = function (iKey, theEvents) {\r\n return new EventBatch(iKey, theEvents);\r\n };\r\n return EventBatch;\r\n}());\r\nexport { EventBatch };\r\n//# sourceMappingURL=EventBatch.js.map"],"names":[],"mappings":";;;;;AAAA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
|
package/dist-es5/HttpManager.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* 1DS JS SDK POST plugin, 4.3.
|
|
2
|
+
* 1DS JS SDK POST plugin, 4.3.7-nightly3.2503-02
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
* (Microsoft Internal Only)
|
|
5
5
|
*/
|
|
@@ -19,7 +19,7 @@ import { KillSwitch } from "./KillSwitch";
|
|
|
19
19
|
import { retryPolicyGetMillisToBackoffForRetry, retryPolicyShouldRetryForStatus } from "./RetryPolicy";
|
|
20
20
|
import { Serializer } from "./Serializer";
|
|
21
21
|
import { createTimeoutWrapper } from "./TimeoutOverrideWrapper";
|
|
22
|
-
import {
|
|
22
|
+
import { _DYN_ADD_NO_RESPONSE, _DYN_ALLOW_REQUEST_SENDIN0, _DYN_ALWAYS_USE_XHR_OVERR7, _DYN_AVOID_OPTIONS, _DYN_BATCHES, _DYN_CAN_SEND_REQUEST, _DYN_CLEAR_TIMEOUT_OVERRI3, _DYN_CONCAT, _DYN_COUNT, _DYN_CREATE_ONE_DSPAYLOAD, _DYN_CREATE_PAYLOAD, _DYN_DISABLE_EVENT_TIMING5, _DYN_DISABLE_FETCH_KEEP_A6, _DYN_DISABLE_XHR_SYNC, _DYN_ENABLE_COMPOUND_KEY, _DYN_EVENTS, _DYN_FETCH_CREDENTIALS, _DYN_GET_CLOCK_SKEW_HEADE2, _DYN_GET_OFFLINE_REQUEST_9, _DYN_GET_WPARAM, _DYN_HDRS, _DYN_HEADERS, _DYN_INITIALIZE, _DYN_IS_BEACON, _DYN_IS_TEARDOWN, _DYN_I_KEY, _DYN_LENGTH, _DYN_OVERRIDE_ENDPOINT_UR4, _DYN_PAYLOAD_BLOB, _DYN_PAYLOAD_PREPROCESSOR, _DYN_PUSH, _DYN_SEND_QUEUED_REQUESTS, _DYN_SEND_SYNCHRONOUS_BAT10, _DYN_SEND_TYPE, _DYN_SERIALIZE_OFFLINE_EV8, _DYN_SET_CLOCK_SKEW, _DYN_SET_KILL_SWITCH_TENA11, _DYN_SET_TIMEOUT_OVERRIDE, _DYN_SET_UNLOADING, _DYN_SHOULD_ADD_CLOCK_SKE1, _DYN_SPLIT, _DYN_TIMINGS, _DYN_TO_LOWER_CASE, _DYN_USE_HDRS, _DYN_USE_SEND_BEACON, _DYN__BACK_OFF_TRANSMISSI12, _DYN__SEND_REASON, _DYN__THE_PAYLOAD, _DYN__TRANSPORT } from "./__DynamicConstants";
|
|
23
23
|
var strSendAttempt = "sendAttempt";
|
|
24
24
|
var _noResponseQs = "&" + STR_NO_RESPONSE_BODY + "=true";
|
|
25
25
|
var UrlQueryString = "?cors=true&" + STR_CONTENT_TYPE_HEADER[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]() + "=" + DEFAULT_CONTENT_TYPE;
|
|
@@ -89,7 +89,7 @@ function _addQueryStringParameter(qsParams, name, value) {
|
|
|
89
89
|
function _removeQueryStringParameter(qsParams, name) {
|
|
90
90
|
for (var i = 0; i < qsParams[_DYN_LENGTH /* @min:%2elength */]; i++) {
|
|
91
91
|
if (qsParams[i].name === name) {
|
|
92
|
-
qsParams
|
|
92
|
+
qsParams.splice(i, 1);
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
@@ -168,7 +168,7 @@ var HttpManager = /** @class */ (function () {
|
|
|
168
168
|
_useHeaders = !isUndefined(channelConfig[_DYN_AVOID_OPTIONS /* @min:%2eavoidOptions */]) ? !channelConfig[_DYN_AVOID_OPTIONS /* @min:%2eavoidOptions */] : true;
|
|
169
169
|
_enableEventTimings = !channelConfig[_DYN_DISABLE_EVENT_TIMING5 /* @min:%2edisableEventTimings */];
|
|
170
170
|
var valueSanitizer = channelConfig.valueSanitizer;
|
|
171
|
-
var stringifyObjects = channelConfig
|
|
171
|
+
var stringifyObjects = channelConfig.stringifyObjects;
|
|
172
172
|
var enableCompoundKey = !!coreConfig[_DYN_ENABLE_COMPOUND_KEY /* @min:%2eenableCompoundKey */];
|
|
173
173
|
if (!isUndefined(channelConfig[_DYN_ENABLE_COMPOUND_KEY /* @min:%2eenableCompoundKey */])) {
|
|
174
174
|
enableCompoundKey = !!channelConfig[_DYN_ENABLE_COMPOUND_KEY /* @min:%2eenableCompoundKey */];
|
|
@@ -177,7 +177,7 @@ var HttpManager = /** @class */ (function () {
|
|
|
177
177
|
_disableXhrSync = !!channelConfig[_DYN_DISABLE_XHR_SYNC /* @min:%2edisableXhrSync */];
|
|
178
178
|
_disableFetchKeepAlive = !!channelConfig[_DYN_DISABLE_FETCH_KEEP_A6 /* @min:%2edisableFetchKeepAlive */];
|
|
179
179
|
_addNoResponse = channelConfig[_DYN_ADD_NO_RESPONSE /* @min:%2eaddNoResponse */] !== false;
|
|
180
|
-
_excludeCsMetaData = !!channelConfig
|
|
180
|
+
_excludeCsMetaData = !!channelConfig.excludeCsMetaData;
|
|
181
181
|
if (!!core.getPlugin("LocalStorage")) {
|
|
182
182
|
// Always disable fetch keep alive when persisten storage is available
|
|
183
183
|
_disableFetchKeepAlive = true;
|
|
@@ -231,7 +231,7 @@ var HttpManager = /** @class */ (function () {
|
|
|
231
231
|
}
|
|
232
232
|
if (!beaconHttpInterface) {
|
|
233
233
|
// Allow overriding the usage of sendBeacon
|
|
234
|
-
beaconUnloadTransports = prependTransports(beaconUnloadTransports, channelConfig
|
|
234
|
+
beaconUnloadTransports = prependTransports(beaconUnloadTransports, channelConfig.unloadTransports);
|
|
235
235
|
beaconHttpInterface = _getSenderInterface(beaconUnloadTransports, true);
|
|
236
236
|
}
|
|
237
237
|
_canHaveReducedPayload = !_customHttpInterface && ((_useBeacons && isBeaconsSupported()) || (!_disableFetchKeepAlive && isFetchSupported(true)));
|
|
@@ -251,7 +251,7 @@ var HttpManager = /** @class */ (function () {
|
|
|
251
251
|
rm: function () {
|
|
252
252
|
var index = _responseHandlers.indexOf(responseHandler);
|
|
253
253
|
if (index >= 0) {
|
|
254
|
-
_responseHandlers
|
|
254
|
+
_responseHandlers.splice(index, 1);
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
};
|
|
@@ -436,7 +436,7 @@ var HttpManager = /** @class */ (function () {
|
|
|
436
436
|
var internalPayloadData = payload;
|
|
437
437
|
var status = 200;
|
|
438
438
|
var thePayload = internalPayloadData[_DYN__THE_PAYLOAD /* @min:%2e_thePayload */];
|
|
439
|
-
var theUrl = payload
|
|
439
|
+
var theUrl = payload.urlString + (_addNoResponse ? _noResponseQs : STR_EMPTY);
|
|
440
440
|
try {
|
|
441
441
|
var nav_1 = getNavigator();
|
|
442
442
|
if (thePayload) {
|
|
@@ -493,7 +493,7 @@ var HttpManager = /** @class */ (function () {
|
|
|
493
493
|
}
|
|
494
494
|
return sendType;
|
|
495
495
|
}
|
|
496
|
-
_self
|
|
496
|
+
_self.addHeader = function (name, value) {
|
|
497
497
|
_headers[name] = value;
|
|
498
498
|
};
|
|
499
499
|
_self.removeHeader = function (name) {
|
|
@@ -514,7 +514,7 @@ var HttpManager = /** @class */ (function () {
|
|
|
514
514
|
_sendBatches(_clearQueue(), 0, false, sendType, sendReason || 0 /* SendRequestReason.Undefined */);
|
|
515
515
|
}
|
|
516
516
|
};
|
|
517
|
-
_self
|
|
517
|
+
_self.isCompletelyIdle = function () {
|
|
518
518
|
return !_paused && _outstandingRequests === 0 && _batchQueue[_DYN_LENGTH /* @min:%2elength */] === 0;
|
|
519
519
|
};
|
|
520
520
|
_self[_DYN_SET_UNLOADING /* @min:%2esetUnloading */] = function (value) {
|
|
@@ -552,7 +552,7 @@ var HttpManager = /** @class */ (function () {
|
|
|
552
552
|
/**
|
|
553
553
|
* Resume the sending of requests.
|
|
554
554
|
*/
|
|
555
|
-
_self
|
|
555
|
+
_self.resume = function () {
|
|
556
556
|
_paused = false;
|
|
557
557
|
_self[_DYN_SEND_QUEUED_REQUESTS /* @min:%2esendQueuedRequests */](0 /* EventSendType.Batched */, 4 /* SendRequestReason.Resumed */);
|
|
558
558
|
};
|
|
@@ -800,11 +800,11 @@ var HttpManager = /** @class */ (function () {
|
|
|
800
800
|
// Send sync requests if the request is immediate or we are tearing down telemetry.
|
|
801
801
|
sender = function (payload) {
|
|
802
802
|
// Notify the clock skew manager that we are sending the first request (Potentially blocking all further requests)
|
|
803
|
-
_clockSkewManager
|
|
803
|
+
_clockSkewManager.firstRequestSent();
|
|
804
804
|
var onComplete = function (status, headers) {
|
|
805
805
|
_retryRequestIfNeeded(status, headers, thePayload, sendReason);
|
|
806
806
|
};
|
|
807
|
-
var isSync = thePayload[_DYN_IS_TEARDOWN /* @min:%2eisTeardown */] || thePayload
|
|
807
|
+
var isSync = thePayload[_DYN_IS_TEARDOWN /* @min:%2eisTeardown */] || thePayload.isSync;
|
|
808
808
|
try {
|
|
809
809
|
sendInterface_1.sendPOST(payload, onComplete, isSync);
|
|
810
810
|
if (_sendListener) {
|
|
@@ -831,10 +831,10 @@ var HttpManager = /** @class */ (function () {
|
|
|
831
831
|
// - Task 9227844: [1DS] Some environments and packagers automatically "freeze" objects which are defined as const which causes any mutations to throw
|
|
832
832
|
// eslint-disable-next-line prefer-const
|
|
833
833
|
var hookData_1 = {
|
|
834
|
-
data: orgPayloadData
|
|
835
|
-
urlString: orgPayloadData
|
|
834
|
+
data: orgPayloadData.data,
|
|
835
|
+
urlString: orgPayloadData.urlString,
|
|
836
836
|
headers: extend({}, orgPayloadData[_DYN_HEADERS /* @min:%2eheaders */]),
|
|
837
|
-
timeout: orgPayloadData
|
|
837
|
+
timeout: orgPayloadData.timeout,
|
|
838
838
|
disableXhrSync: orgPayloadData[_DYN_DISABLE_XHR_SYNC /* @min:%2edisableXhrSync */],
|
|
839
839
|
disableFetchKeepAlive: orgPayloadData[_DYN_DISABLE_FETCH_KEEP_A6 /* @min:%2edisableFetchKeepAlive */]
|
|
840
840
|
};
|
|
@@ -864,7 +864,7 @@ var HttpManager = /** @class */ (function () {
|
|
|
864
864
|
}
|
|
865
865
|
}
|
|
866
866
|
});
|
|
867
|
-
}, function () { return ({ thePayload: thePayload, serializationStart: serializationStart, serializationCompleted: serializationCompleted, sendReason: sendReason }); }, thePayload
|
|
867
|
+
}, function () { return ({ thePayload: thePayload, serializationStart: serializationStart, serializationCompleted: serializationCompleted, sendReason: sendReason }); }, thePayload.isSync);
|
|
868
868
|
}
|
|
869
869
|
if (thePayload.sizeExceed && thePayload.sizeExceed[_DYN_LENGTH /* @min:%2elength */] > 0) {
|
|
870
870
|
// Ensure that we send any discard events for oversize events even when there was no payload to send
|
|
@@ -971,7 +971,7 @@ var HttpManager = /** @class */ (function () {
|
|
|
971
971
|
var theBatches = thePayload[_DYN_BATCHES /* @min:%2ebatches */];
|
|
972
972
|
if (batchReason === 200 /* EventBatchNotificationReason.Complete */) {
|
|
973
973
|
theBatches = thePayload.sentEvts || thePayload[_DYN_BATCHES /* @min:%2ebatches */];
|
|
974
|
-
if (!backOffTrans && !thePayload
|
|
974
|
+
if (!backOffTrans && !thePayload.isSync) {
|
|
975
975
|
// We have a successful async response, so the lets open the floodgates
|
|
976
976
|
// The reason for checking isSync is to avoid unblocking if beacon send occurred as it
|
|
977
977
|
// doesn't wait for a response.
|