rudder-sdk-js 2.37.1 → 2.38.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rudder-sdk-js",
3
- "version": "2.37.1",
3
+ "version": "2.38.1",
4
4
  "description": "RudderStack Javascript SDK",
5
5
  "main": "index.js",
6
6
  "module": "index.es.js",
@@ -4150,9 +4150,13 @@ return false;}return isRetryableError(error)&&IDEMPOTENT_HTTP_METHODS.indexOf(er
4150
4150
  */function isNetworkOrIdempotentRequestError(error){return isNetworkError(error)||isIdempotentRequestError(error);}/**
4151
4151
  * @return {number} - delay in milliseconds, always 0
4152
4152
  */function noDelay(){return 0;}/**
4153
+ * Set delayFactor 1000 for an exponential delay to occur on the order
4154
+ * of seconds
4153
4155
  * @param {number} [retryNumber=0]
4156
+ * @param {Error} error - unused; for existing API of retryDelay callback
4157
+ * @param {number} [delayFactor=100] milliseconds
4154
4158
  * @return {number} - delay in milliseconds
4155
- */function exponentialDelay(){var retryNumber=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var delay=Math.pow(2,retryNumber)*100;var randomSum=delay*0.2*Math.random();// 0-20% of the delay
4159
+ */function exponentialDelay(){var retryNumber=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var delayFactor=arguments.length>2&&arguments[2]!==undefined?arguments[2]:100;var delay=Math.pow(2,retryNumber)*delayFactor;var randomSum=delay*0.2*Math.random();// 0-20% of the delay
4156
4160
  return delay+randomSum;}/**
4157
4161
  * Initializes and returns the retry state for the given request/config
4158
4162
  * @param {AxiosRequestConfig} config
@@ -5215,7 +5219,7 @@ description:this.description,number:this.number,// Mozilla
5215
5219
  fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,// Axios
5216
5220
  config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null};};return error;}
5217
5221
 
5218
- var version='2.37.1';var removeTrailingSlashes=function removeTrailingSlashes(inURL){return inURL&&inURL.endsWith('/')?inURL.replace(/\/+$/,''):inURL;};var isFunction=function isFunction(value){return typeof value==='function'&&Boolean(value.constructor&&value.call&&value.apply);};var setImmediate=browser$1.nextTick.bind(browser$1);var noop=function noop(){};var Analytics=/*#__PURE__*/function(){/**
5222
+ var version='2.38.1';var removeTrailingSlashes=function removeTrailingSlashes(inURL){return inURL&&inURL.endsWith('/')?inURL.replace(/\/+$/,''):inURL;};var isFunction=function isFunction(value){return typeof value==='function'&&Boolean(value.constructor&&value.call&&value.apply);};var setImmediate=browser$1.nextTick.bind(browser$1);var noop=function noop(){};var Analytics=/*#__PURE__*/function(){/**
5219
5223
  * Initialize a new `Analytics` with your RudderStack source's `writeKey` and an
5220
5224
  * optional dictionary of `options`.
5221
5225
  *
@@ -4156,9 +4156,13 @@
4156
4156
  */function isNetworkOrIdempotentRequestError(error){return isNetworkError(error)||isIdempotentRequestError(error);}/**
4157
4157
  * @return {number} - delay in milliseconds, always 0
4158
4158
  */function noDelay(){return 0;}/**
4159
+ * Set delayFactor 1000 for an exponential delay to occur on the order
4160
+ * of seconds
4159
4161
  * @param {number} [retryNumber=0]
4162
+ * @param {Error} error - unused; for existing API of retryDelay callback
4163
+ * @param {number} [delayFactor=100] milliseconds
4160
4164
  * @return {number} - delay in milliseconds
4161
- */function exponentialDelay(){var retryNumber=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var delay=Math.pow(2,retryNumber)*100;var randomSum=delay*0.2*Math.random();// 0-20% of the delay
4165
+ */function exponentialDelay(){var retryNumber=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var delayFactor=arguments.length>2&&arguments[2]!==undefined?arguments[2]:100;var delay=Math.pow(2,retryNumber)*delayFactor;var randomSum=delay*0.2*Math.random();// 0-20% of the delay
4162
4166
  return delay+randomSum;}/**
4163
4167
  * Initializes and returns the retry state for the given request/config
4164
4168
  * @param {AxiosRequestConfig} config
@@ -5221,7 +5225,7 @@
5221
5225
  fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,// Axios
5222
5226
  config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null};};return error;}
5223
5227
 
5224
- var version='2.37.1';var removeTrailingSlashes=function removeTrailingSlashes(inURL){return inURL&&inURL.endsWith('/')?inURL.replace(/\/+$/,''):inURL;};var isFunction=function isFunction(value){return typeof value==='function'&&Boolean(value.constructor&&value.call&&value.apply);};var setImmediate=browser$1.nextTick.bind(browser$1);var noop=function noop(){};var Analytics=/*#__PURE__*/function(){/**
5228
+ var version='2.38.1';var removeTrailingSlashes=function removeTrailingSlashes(inURL){return inURL&&inURL.endsWith('/')?inURL.replace(/\/+$/,''):inURL;};var isFunction=function isFunction(value){return typeof value==='function'&&Boolean(value.constructor&&value.call&&value.apply);};var setImmediate=browser$1.nextTick.bind(browser$1);var noop=function noop(){};var Analytics=/*#__PURE__*/function(){/**
5225
5229
  * Initialize a new `Analytics` with your RudderStack source's `writeKey` and an
5226
5230
  * optional dictionary of `options`.
5227
5231
  *