@microsoft/1ds-post-js 4.3.6-nightly3.2502-13 → 4.3.6-nightly3.2503-01

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 (53) hide show
  1. package/bundle/es5/{ms.post-4.3.6-nightly3.2502-13.gbl.js → ms.post-4.3.6-nightly3.2503-01.gbl.js} +148 -187
  2. package/bundle/es5/ms.post-4.3.6-nightly3.2503-01.gbl.js.map +1 -0
  3. package/bundle/es5/ms.post-4.3.6-nightly3.2503-01.gbl.min.js +7 -0
  4. package/bundle/es5/ms.post-4.3.6-nightly3.2503-01.gbl.min.js.map +1 -0
  5. package/bundle/es5/ms.post-4.3.6-nightly3.2503-01.integrity.json +46 -0
  6. package/bundle/es5/{ms.post-4.3.6-nightly3.2502-13.js → ms.post-4.3.6-nightly3.2503-01.js} +148 -187
  7. package/bundle/es5/ms.post-4.3.6-nightly3.2503-01.js.map +1 -0
  8. package/bundle/es5/ms.post-4.3.6-nightly3.2503-01.min.js +7 -0
  9. package/bundle/es5/ms.post-4.3.6-nightly3.2503-01.min.js.map +1 -0
  10. package/bundle/es5/ms.post.gbl.js +147 -186
  11. package/bundle/es5/ms.post.gbl.js.map +1 -1
  12. package/bundle/es5/ms.post.gbl.min.js +2 -2
  13. package/bundle/es5/ms.post.gbl.min.js.map +1 -1
  14. package/bundle/es5/ms.post.integrity.json +17 -17
  15. package/bundle/es5/ms.post.js +147 -186
  16. package/bundle/es5/ms.post.js.map +1 -1
  17. package/bundle/es5/ms.post.min.js +2 -2
  18. package/bundle/es5/ms.post.min.js.map +1 -1
  19. package/dist/es5/ms.post.js +145 -184
  20. package/dist/es5/ms.post.js.map +1 -1
  21. package/dist/es5/ms.post.min.js +2 -2
  22. package/dist/es5/ms.post.min.js.map +1 -1
  23. package/dist-es5/BatchNotificationActions.js +1 -1
  24. package/dist-es5/ClockSkewManager.js +3 -3
  25. package/dist-es5/ClockSkewManager.js.map +1 -1
  26. package/dist-es5/DataModels.js +1 -1
  27. package/dist-es5/EventBatch.js +3 -3
  28. package/dist-es5/EventBatch.js.map +1 -1
  29. package/dist-es5/HttpManager.js +18 -18
  30. package/dist-es5/HttpManager.js.map +1 -1
  31. package/dist-es5/Index.js +1 -1
  32. package/dist-es5/InternalConstants.js +1 -1
  33. package/dist-es5/KillSwitch.js +1 -1
  34. package/dist-es5/PostChannel.js +23 -23
  35. package/dist-es5/PostChannel.js.map +1 -1
  36. package/dist-es5/RetryPolicy.js +4 -3
  37. package/dist-es5/RetryPolicy.js.map +1 -1
  38. package/dist-es5/Serializer.js +3 -3
  39. package/dist-es5/Serializer.js.map +1 -1
  40. package/dist-es5/TimeoutOverrideWrapper.js +1 -1
  41. package/dist-es5/__DynamicConstants.js +9 -25
  42. package/dist-es5/__DynamicConstants.js.map +1 -1
  43. package/dist-es5/typings/XDomainRequest.js +1 -1
  44. package/package.json +3 -3
  45. package/types/1ds-post-js.d.ts +1 -1
  46. package/types/1ds-post-js.namespaced.d.ts +1 -1
  47. package/bundle/es5/ms.post-4.3.6-nightly3.2502-13.gbl.js.map +0 -1
  48. package/bundle/es5/ms.post-4.3.6-nightly3.2502-13.gbl.min.js +0 -7
  49. package/bundle/es5/ms.post-4.3.6-nightly3.2502-13.gbl.min.js.map +0 -1
  50. package/bundle/es5/ms.post-4.3.6-nightly3.2502-13.integrity.json +0 -46
  51. package/bundle/es5/ms.post-4.3.6-nightly3.2502-13.js.map +0 -1
  52. package/bundle/es5/ms.post-4.3.6-nightly3.2502-13.min.js +0 -7
  53. package/bundle/es5/ms.post-4.3.6-nightly3.2502-13.min.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- * 1DS JS SDK POST plugin, 4.3.6-nightly3.2502-13
2
+ * 1DS JS SDK POST plugin, 4.3.6-nightly3.2503-01
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  * (Microsoft Internal Only)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * 1DS JS SDK POST plugin, 4.3.6-nightly3.2502-13
2
+ * 1DS JS SDK POST plugin, 4.3.6-nightly3.2503-01
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, _DYN_FIRST_REQUEST_SENT, _DYN_GET_CLOCK_SKEW_HEADE2, _DYN_SET_CLOCK_SKEW, _DYN_SHOULD_ADD_CLOCK_SKE1 } from "./__DynamicConstants";
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[_DYN_FIRST_REQUEST_SENT /* @min:%2efirstRequestSent */] = function () {
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, _DYN_FIRST_REQUEST_SENT, _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[_DYN_FIRST_REQUEST_SENT /* @min:%2efirstRequestSent */] = 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"}
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"}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * 1DS JS SDK POST plugin, 4.3.6-nightly3.2502-13
2
+ * 1DS JS SDK POST plugin, 4.3.6-nightly3.2503-01
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  * (Microsoft Internal Only)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * 1DS JS SDK POST plugin, 4.3.6-nightly3.2502-13
2
+ * 1DS JS SDK POST plugin, 4.3.6-nightly3.2503-01
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, _DYN_SPLICE, _DYN_SPLIT } from "./__DynamicConstants";
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[_DYN_SPLICE /* @min:%2esplice */](fromEvent, cnt);
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, _DYN_SPLICE, _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[_DYN_SPLICE /* @min:%2esplice */](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"}
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"}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * 1DS JS SDK POST plugin, 4.3.6-nightly3.2502-13
2
+ * 1DS JS SDK POST plugin, 4.3.6-nightly3.2503-01
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 { _DYN_ADD_HEADER, _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_DATA, _DYN_DISABLE_EVENT_TIMING5, _DYN_DISABLE_FETCH_KEEP_A6, _DYN_DISABLE_XHR_SYNC, _DYN_ENABLE_COMPOUND_KEY, _DYN_EVENTS, _DYN_EXCLUDE_CS_META_DATA, _DYN_FETCH_CREDENTIALS, _DYN_FIRST_REQUEST_SENT, _DYN_GET_CLOCK_SKEW_HEADE2, _DYN_GET_OFFLINE_REQUEST_9, _DYN_GET_WPARAM, _DYN_HDRS, _DYN_HEADERS, _DYN_INITIALIZE, _DYN_IS_BEACON, _DYN_IS_COMPLETELY_IDLE, _DYN_IS_SYNC, _DYN_IS_TEARDOWN, _DYN_I_KEY, _DYN_LENGTH, _DYN_OVERRIDE_ENDPOINT_UR4, _DYN_PAYLOAD_BLOB, _DYN_PAYLOAD_PREPROCESSOR, _DYN_PUSH, _DYN_RESUME, _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_SPLICE, _DYN_SPLIT, _DYN_STRINGIFY_OBJECTS, _DYN_TIMEOUT, _DYN_TIMINGS, _DYN_TO_LOWER_CASE, _DYN_UNLOAD_TRANSPORTS, _DYN_URL_STRING, _DYN_USE_HDRS, _DYN_USE_SEND_BEACON, _DYN__BACK_OFF_TRANSMISSI12, _DYN__SEND_REASON, _DYN__THE_PAYLOAD, _DYN__TRANSPORT } from "./__DynamicConstants";
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[_DYN_SPLICE /* @min:%2esplice */](i, 1);
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[_DYN_STRINGIFY_OBJECTS /* @min:%2estringifyObjects */];
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[_DYN_EXCLUDE_CS_META_DATA /* @min:%2eexcludeCsMetaData */];
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[_DYN_UNLOAD_TRANSPORTS /* @min:%2eunloadTransports */]);
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[_DYN_SPLICE /* @min:%2esplice */](index, 1);
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[_DYN_URL_STRING /* @min:%2eurlString */] + (_addNoResponse ? _noResponseQs : STR_EMPTY);
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[_DYN_ADD_HEADER /* @min:%2eaddHeader */] = function (name, value) {
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[_DYN_IS_COMPLETELY_IDLE /* @min:%2eisCompletelyIdle */] = function () {
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[_DYN_RESUME /* @min:%2eresume */] = function () {
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[_DYN_FIRST_REQUEST_SENT /* @min:%2efirstRequestSent */]();
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[_DYN_IS_SYNC /* @min:%2eisSync */];
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[_DYN_DATA /* @min:%2edata */],
835
- urlString: orgPayloadData[_DYN_URL_STRING /* @min:%2eurlString */],
834
+ data: orgPayloadData.data,
835
+ urlString: orgPayloadData.urlString,
836
836
  headers: extend({}, orgPayloadData[_DYN_HEADERS /* @min:%2eheaders */]),
837
- timeout: orgPayloadData[_DYN_TIMEOUT /* @min:%2etimeout */],
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[_DYN_IS_SYNC /* @min:%2eisSync */]);
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[_DYN_IS_SYNC /* @min:%2eisSync */]) {
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.